Re: [PATCH v5] powerpc/64s: support nospectre_v2 cmdline option

2019-06-05 Thread Andrew Donnellan
On 24/5/19 12:46 pm, Christopher M. Riedl wrote: Add support for disabling the kernel implemented spectre v2 mitigation (count cache flush on context switch) via the nospectre_v2 and mitigations=off cmdline options. Suggested-by: Michael Ellerman Signed-off-by: Christopher M. Riedl Reviewed-by

Re: [PATCH] powerpc/nvdimm: Add support for multibyte read/write for metadata

2019-06-05 Thread Alexey Kardashevskiy
On 02/06/2019 14:43, Aneesh Kumar K.V wrote: > SCM_READ/WRITE_MEATADATA hcall supports multibyte read/write. This patch > updates the metadata read/write to use 1, 2, 4 or 8 byte read/write as > mentioned in PAPR document. > > READ/WRITE_METADATA hcall supports the 1, 2, 4, or 8 bytes read/writ

Re: [WIP RFC PATCH 0/6] Generic Firmware Variable Filesystem

2019-06-05 Thread Greg KH
On Tue, Jun 04, 2019 at 01:05:45PM -0700, Matthew Garrett wrote: > On Tue, Jun 4, 2019 at 1:01 PM Nayna wrote: > > It seems efivars were first implemented in sysfs and then later > > separated out as efivarfs. > > Refer - Documentation/filesystems/efivarfs.txt. > > > > So, the reason wasn't that s

Re: [PATCH kernel] powerpc/pci/of: Fix OF flags parsing for 64bit BARs

2019-06-05 Thread Shawn Anastasio
On 6/4/19 10:38 PM, Alexey Kardashevskiy wrote: When the firmware does PCI BAR resource allocation, it passes the assigned addresses and flags (prefetch/64bit/...) via the "reg" property of a PCI device device tree node so the kernel does not need to do resource allocation. The flags are stored

Re: [PATCH v3 07/11] mm/memory_hotplug: Create memory block devices after arch_add_memory()

2019-06-05 Thread David Hildenbrand
>> /* >> * For now, we have a linear search to go find the appropriate >> * memory_block corresponding to a particular phys_index. If >> @@ -658,6 +670,11 @@ static int init_memory_block(struct memory_block >> **memory, int block_id, >> unsigned long start_pfn; >> int ret = 0; >> >> +

Re: [PATCH v3 09/11] mm/memory_hotplug: Remove memory block devices before arch_remove_memory()

2019-06-05 Thread David Hildenbrand
On 05.06.19 00:07, Wei Yang wrote: > On Mon, May 27, 2019 at 01:11:50PM +0200, David Hildenbrand wrote: >> Let's factor out removing of memory block devices, which is only >> necessary for memory added via add_memory() and friends that created >> memory block devices. Remove the devices before call

Re: [PATCH] Documentation/stackprotector: powerpc supports stack protector

2019-06-05 Thread Bhupesh Sharma
Hi Jonathan, On Fri, May 31, 2019 at 8:44 PM Michael Ellerman wrote: > > Jonathan Corbet writes: > > On Thu, 30 May 2019 18:37:46 +0530 > > Bhupesh Sharma wrote: > > > >> > This should probably go via the documentation tree? > >> > > >> > Acked-by: Michael Ellerman > >> > >> Thanks for the rev

Re: [PATCH] ASoC: fsl_esai: fix the channel swap issue after xrun

2019-06-05 Thread S.j. Wang
Hi > > > > > Sounds like a bug to me...should fix it first by marking the > > > > > data registers as volatile. > > > > > > > > > The ETDR is a writable register, it is not volatile. Even we > > > > change it to Volatile, I don't think we can't avoid this issue. > > > > for the regcache_sync Just t

Re: [PATCH] powerpc/nvdimm: Add support for multibyte read/write for metadata

2019-06-05 Thread Michael Ellerman
"Aneesh Kumar K.V" writes: > Oliver writes: >> On Sun, Jun 2, 2019 at 2:44 PM Aneesh Kumar K.V >> wrote: ... >>> diff --git a/arch/powerpc/platforms/pseries/papr_scm.c >>> b/arch/powerpc/platforms/pseries/papr_scm.c >>> index 0176ce66673f..e33cebb8ee6c 100644 >>> --- a/arch/powerpc/platforms/ps

Re: [PATCH v3 07/11] mm/memory_hotplug: Create memory block devices after arch_add_memory()

2019-06-05 Thread David Hildenbrand
On 05.06.19 10:58, David Hildenbrand wrote: >>> /* >>> * For now, we have a linear search to go find the appropriate >>> * memory_block corresponding to a particular phys_index. If >>> @@ -658,6 +670,11 @@ static int init_memory_block(struct memory_block >>> **memory, int block_id, >>> unsig

Re: crash after NX error

2019-06-05 Thread Michael Ellerman
Stewart Smith writes: > On my two socket POWER9 system (powernv) with 842 zwap set up, I > recently got a crash with the Ubuntu kernel (I haven't tried with > upstream, and this is the first time the system has died like this, so > I'm not sure how repeatable it is). > > [2.891463] zswap: load

Re: [PATCH v3] scsi: ibmvscsi: Don't use rc uninitialized in ibmvscsi_do_work

2019-06-05 Thread Michael Ellerman
"Martin K. Petersen" writes: > Nathan, > >> clang warns: >> >> drivers/scsi/ibmvscsi/ibmvscsi.c:2126:7: warning: variable 'rc' is used >> uninitialized whenever switch case is taken [-Wsometimes-uninitialized] >> case IBMVSCSI_HOST_ACTION_NONE: >> ^ > >

[PATCH] ocxl: Update for AFU descriptor template version 1.1

2019-06-05 Thread Frederic Barrat
From: Alastair D'Silva The OpenCAPI discovery and configuration specification has been updated and introduces version 1.1 of the AFU descriptor template, with new fields to better define the memory layout of an OpenCAPI adapter. The ocxl driver doesn't do much yet to support LPC memory but as we

Re: [RFC V2] mm: Generalize notify_page_fault()

2019-06-05 Thread Michael Ellerman
Anshuman Khandual writes: > Similar notify_page_fault() definitions are being used by architectures > duplicating much of the same code. This attempts to unify them into a > single implementation, generalize it and then move it to a common place. > kprobes_built_in() can detect CONFIG_KPROBES, hen

Re: [RFC V2] mm: Generalize notify_page_fault()

2019-06-05 Thread Matthew Wilcox
On Wed, Jun 05, 2019 at 09:19:22PM +1000, Michael Ellerman wrote: > Anshuman Khandual writes: > > Similar notify_page_fault() definitions are being used by architectures > > duplicating much of the same code. This attempts to unify them into a > > single implementation, generalize it and then move

Re: [PATCH] powerpc/32s: fix booting with CONFIG_PPC_EARLY_DEBUG_BOOTX

2019-06-05 Thread Mathieu Malaterre
On Mon, Jun 3, 2019 at 3:00 PM Christophe Leroy wrote: > > When booting through OF, setup_disp_bat() does nothing because > disp_BAT are not set. By change, it used to work because BOOTX > buffer is mapped 1:1 at address 0x8100 by the bootloader, and > btext_setup_display() sets virt addr same

[PATCH] powerpc/32: Add .data..LASAN* sections explicitly

2019-06-05 Thread Mathieu Malaterre
When both `CONFIG_LD_DEAD_CODE_DATA_ELIMINATION=y` and `CONFIG_KASAN=y` are set, link step typically produce numberous warnings about orphan section: powerpc-linux-gnu-ld: warning: orphan section `.data..LASAN0' from `net/core/filter.o' being placed in section `.data..LASAN0' powerpc-linux-gn

[PATCH v2 1/2] powerpc/powernv: Enhance opal message read interface

2019-06-05 Thread Vasant Hegde
Use "opal-msg-size" device tree property to allocate memory for "opal_msg". Cc: Mahesh Salgaonkar Cc: Jeremy Kerr Signed-off-by: Vasant Hegde --- arch/powerpc/platforms/powernv/opal.c | 30 -- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/arch/powe

[PATCH v2 2/2] powerpc/powernv: Add new opal message type

2019-06-05 Thread Vasant Hegde
We have OPAL_MSG_PRD message type to pass prd related messages from OPAL to `opal-prd`. It can handle messages upto 64 bytes. We have a requirement to send bigger than 64 bytes of data from OPAL to `opal-prd`. Lets add new message type (OPAL_MSG_PRD2) to pass bigger data. Cc: Jeremy Kerr Signed-o

Re: [PATCH v3] powerpc: fix kexec failure on book3s/32

2019-06-05 Thread Aaro Koskinen
Hi, On Mon, Jun 03, 2019 at 08:20:28AM +, Christophe Leroy wrote: > In the old days, _PAGE_EXEC didn't exist on 6xx aka book3s/32. > Therefore, allthough __mapin_ram_chunk() was already mapping kernel > text with PAGE_KERNEL_TEXT and the rest with PAGE_KERNEL, the entire > memory was executabl

[PATCH] powerpc/setup_64: fix -Wempty-body warnings

2019-06-05 Thread Qian Cai
At the beginning of setup_64.c, it has, #ifdef DEBUG #define DBG(fmt...) udbg_printf(fmt) #else #define DBG(fmt...) #endif where DBG() could be compiled away, and generate warnings, arch/powerpc/kernel/setup_64.c: In function 'initialize_cache_info': arch/powerpc/kernel/setup_64.c:579:

Re: [PATCH] powerpc/setup_64: fix -Wempty-body warnings

2019-06-05 Thread Tyrel Datwyler
On 06/05/2019 01:17 PM, Qian Cai wrote: > At the beginning of setup_64.c, it has, > > #ifdef DEBUG > #define DBG(fmt...) udbg_printf(fmt) > #else > #define DBG(fmt...) > #endif Simpler solution is just to define the debug in the else clause as such: #define DBG(fmt...) do { } while(0)

[PATCH] powerpc/eeh_cache: fix a W=1 kernel-doc warning

2019-06-05 Thread Qian Cai
The opening comment mark "/**" is reserved for kernel-doc comments, so it will generate a warning with "make W=1". arch/powerpc/kernel/eeh_cache.c:37: warning: cannot understand function prototype: 'struct pci_io_addr_range Since this is not a kernel-doc for the struct below, but rather an overvi

[PATCH v2] powerpc/setup_64: fix -Wempty-body warnings

2019-06-05 Thread Qian Cai
At the beginning of setup_64.c, it has, #ifdef DEBUG #define DBG(fmt...) udbg_printf(fmt) #else #define DBG(fmt...) #endif where DBG() could be compiled away, and generate warnings, arch/powerpc/kernel/setup_64.c: In function 'initialize_cache_info': arch/powerpc/kernel/setup_64.c:579:

Re: [PATCH v3 10/11] mm/memory_hotplug: Make unregister_memory_block_under_nodes() never fail

2019-06-05 Thread Wei Yang
On Mon, May 27, 2019 at 01:11:51PM +0200, David Hildenbrand wrote: >We really don't want anything during memory hotunplug to fail. >We always pass a valid memory block device, that check can go. Avoid >allocating memory and eventually failing. As we are always called under >lock, we can use a stati

Re: [PATCH v3 11/11] mm/memory_hotplug: Remove "zone" parameter from sparse_remove_one_section

2019-06-05 Thread Wei Yang
On Mon, May 27, 2019 at 01:11:52PM +0200, David Hildenbrand wrote: >The parameter is unused, so let's drop it. Memory removal paths should >never care about zones. This is the job of memory offlining and will >require more refactorings. > >Reviewed-by: Dan Williams >Signed-off-by: David Hildenbran

Re: [PATCH v3 07/11] mm/memory_hotplug: Create memory block devices after arch_add_memory()

2019-06-05 Thread Wei Yang
On Wed, Jun 05, 2019 at 12:58:46PM +0200, David Hildenbrand wrote: >On 05.06.19 10:58, David Hildenbrand wrote: /* * For now, we have a linear search to go find the appropriate * memory_block corresponding to a particular phys_index. If @@ -658,6 +670,11 @@ static int init_mem

PowerPC arch_ptrace() writes beyond thread_struct/task_struct

2019-06-05 Thread Radu Rendec
Hi Everyone, I'm seeing some weird memory corruption that I have been able to isolate to arch_ptrace() [arch/powerpc/kernel/ptrace.c] and PTRACE_POKEUSR. I am on PowerPC 32 (MPC8378), kernel 4.9.179. It's not very easy for me to test on the latest kernel, but I guess little has changed since 4.9

Re: [PATCH v3 07/11] mm/memory_hotplug: Create memory block devices after arch_add_memory()

2019-06-05 Thread David Hildenbrand
On 05.06.19 23:22, Wei Yang wrote: > On Wed, Jun 05, 2019 at 12:58:46PM +0200, David Hildenbrand wrote: >> On 05.06.19 10:58, David Hildenbrand wrote: > /* > * For now, we have a linear search to go find the appropriate > * memory_block corresponding to a particular phys_index. If >>>

[BISECTED REGRESSION] b43legacy broken on G4 PowerBook

2019-06-05 Thread Aaro Koskinen
Hi, When upgrading from v5.0 -> v5.1 on G4 PowerBook, I noticed WLAN does not work anymore: [ 42.004303] b43legacy-phy0: Loading firmware version 0x127, patch level 14 (2005-04-18 02:36:27) [ 42.184837] b43legacy-phy0 debug: Chip initialized [ 42.184873] b43legacy-phy0 ERROR: The machine/k

Re: [PATCH] ASoC: fsl_esai: fix the channel swap issue after xrun

2019-06-05 Thread Nicolin Chen
Hello Shengjiu, On Wed, Jun 05, 2019 at 10:29:37AM +, S.j. Wang wrote: > > > ETDR is not volatile, if we mark it is volatile, is it correct? > > > > Well, you have a point -- it might not be ideally true, but it sounds like a > > correct fix to me according to this comments. > > > > We can

Re: [BISECTED REGRESSION] b43legacy broken on G4 PowerBook

2019-06-05 Thread Benjamin Herrenschmidt
On Thu, 2019-06-06 at 01:50 +0300, Aaro Koskinen wrote: > Hi, > > When upgrading from v5.0 -> v5.1 on G4 PowerBook, I noticed WLAN does > not work anymore: > > [ 42.004303] b43legacy-phy0: Loading firmware version 0x127, patch level 14 > (2005-04-18 02:36:27) > [ 42.184837] b43legacy-phy0 de

Re: [RFC V2] mm: Generalize notify_page_fault()

2019-06-05 Thread Anshuman Khandual
On 06/05/2019 03:23 AM, Matthew Wilcox wrote: > On Tue, Jun 04, 2019 at 12:04:06PM +0530, Anshuman Khandual wrote: >> +++ b/arch/x86/mm/fault.c >> @@ -46,23 +46,6 @@ kmmio_fault(struct pt_regs *regs, unsigned long addr) >> return 0; >> } >> >> -static nokprobe_inline int kprobes_fault(st

Re: crash after NX error

2019-06-05 Thread Stewart Smith
Michael Ellerman writes: > Stewart Smith writes: >> On my two socket POWER9 system (powernv) with 842 zwap set up, I >> recently got a crash with the Ubuntu kernel (I haven't tried with >> upstream, and this is the first time the system has died like this, so >> I'm not sure how repeatable it is)

Re: [RFC V2] mm: Generalize notify_page_fault()

2019-06-05 Thread Anshuman Khandual
On 06/05/2019 04:49 PM, Michael Ellerman wrote: > Anshuman Khandual writes: >> Similar notify_page_fault() definitions are being used by architectures >> duplicating much of the same code. This attempts to unify them into a >> single implementation, generalize it and then move it to a common place

Re: [RFC V2] mm: Generalize notify_page_fault()

2019-06-05 Thread Anshuman Khandual
On 06/05/2019 04:53 PM, Matthew Wilcox wrote: > On Wed, Jun 05, 2019 at 09:19:22PM +1000, Michael Ellerman wrote: >> Anshuman Khandual writes: >>> Similar notify_page_fault() definitions are being used by architectures >>> duplicating much of the same code. This attempts to unify them into a >>

Re: [BISECTED REGRESSION] b43legacy broken on G4 PowerBook

2019-06-05 Thread Larry Finger
On 6/5/19 5:50 PM, Aaro Koskinen wrote: Hi, When upgrading from v5.0 -> v5.1 on G4 PowerBook, I noticed WLAN does not work anymore: [ 42.004303] b43legacy-phy0: Loading firmware version 0x127, patch level 14 (2005-04-18 02:36:27) [ 42.184837] b43legacy-phy0 debug: Chip initialized [ 42.1

Re: [PATCH kernel v3 0/3] powerpc/ioda2: Yet another attempt to allow DMA masks between 32 and 59

2019-06-05 Thread Shawn Anastasio
On 5/30/19 2:03 AM, Alexey Kardashevskiy wrote: This is an attempt to allow DMA masks between 32..59 which are not large enough to use either a PHB3 bypass mode or a sketchy bypass. Depending on the max order, up to 40 is usually available. This is based on v5.2-rc2. Please comment. Thanks.

Re: PowerPC arch_ptrace() writes beyond thread_struct/task_struct

2019-06-05 Thread Christophe Leroy
Le 05/06/2019 à 23:45, Radu Rendec a écrit : Hi Everyone, I'm seeing some weird memory corruption that I have been able to isolate to arch_ptrace() [arch/powerpc/kernel/ptrace.c] and PTRACE_POKEUSR. I am on PowerPC 32 (MPC8378), kernel 4.9.179. It's not very easy for me to test on the latest

Re: [PATCH 12/16] mm: consolidate the get_user_pages* implementations

2019-06-05 Thread John Hubbard
On 6/1/19 12:49 AM, Christoph Hellwig wrote: > Always build mm/gup.c, and move the nommu versions and replace the > separate stubs for various functions by the default ones, with the _fast > version always falling back to the slow path because gup_fast_permitted > always returns false now if HAVE_F

Re: [PATCH 12/16] mm: consolidate the get_user_pages* implementations

2019-06-05 Thread Christoph Hellwig
On Wed, Jun 05, 2019 at 11:01:17PM -0700, John Hubbard wrote: > I started reviewing this one patch, and it's kind of messy figuring out > if the code motion preserves everything because of > all the consolidation from other places, plus having to move things in > and out of the ifdef blocks. So I

Re: [BISECTED REGRESSION] b43legacy broken on G4 PowerBook

2019-06-05 Thread Christoph Hellwig
On Wed, Jun 05, 2019 at 10:06:18PM -0500, Larry Finger wrote: > First of all, you have my sympathy for the laborious bisection on a > PowerBook G4. I have done several myself. Thank you. > > I confirm your results. > > The ppc code has a maximum DMA size of 31 bits, thus a 32-bit request will > f

Re: [PATCH v12 00/31] Speculative page faults

2019-06-05 Thread Haiyan Song
Hi Laurent, Regression test for v12 patch serials have been run on Intel 2s skylake platform, some regressions were found by LKP-tools (linux kernel performance). Only tested the cases that have been run and found regressions on v11 patch serials. Get the patch serials from https://github.com/l