Re: [RESEND 2/3] powerpc/memcpy: Add memcpy_mcsafe for pmem

2018-04-04 Thread Nicholas Piggin
On Thu, 5 Apr 2018 15:53:07 +1000 Balbir Singh wrote: > On Thu, 5 Apr 2018 15:04:05 +1000 > Nicholas Piggin wrote: > > > On Wed, 4 Apr 2018 20:00:52 -0700 > > Dan Williams wrote: > > > > > [ adding Matthew, Christoph, and Tony ] > > > > > > On Wed, Apr 4, 2018 at 4:57 PM, Nicholas Piggin

[PATCH] powerpc/64s/idle: POWER9 restore AMOR after deep sleep

2018-04-04 Thread Nicholas Piggin
POWER8 restores AMOR when waking from deep sleep, but POWER9 does not, because it does not go through the subcore restore. Have POWER9 restore it in core restore. Cc: Vaidyanathan Srinivasan Signed-off-by: Nicholas Piggin --- Do we need this guy after waking from deep sleep? This code is a li

[PATCH 2/2] powerpc/64s: Fix POWER9 DD2.2 and above in cputable features

2018-04-04 Thread Nicholas Piggin
The CPU_FTR_POWER9_DD2_1 flag is intended to be set for DD2.1 and above (which is what the dt_cpu_ftrs setup does). Fix cputable for DD2.2 to match. This came about due to patches b5af4f279323 ("powerpc: Add CPU feature bits for TM bug workarounds on POWER9 v2.2"), and 9e9626ed3a4a ("powerpc/64s:

[PATCH 1/2] powerpc/64s: Fix pkey support in dt_cpu_ftrs, add CPU_FTR_PKEY bit

2018-04-04 Thread Nicholas Piggin
The pkey code added a CPU_FTR_PKEY bit, but did not add it to the dt_cpu_ftrs feature set. Although capability is supported by all processors in the base dt_cpu_ftrs set for 64s, it's a significant and sufficiently well defined feature to make it optional. So add it as a quirk for now, which can be

[PATCH 0/2] a couple of cpu ftrs fixes

2018-04-04 Thread Nicholas Piggin
These are a couple of differences between cputable and dt_cpu_ftrs I noticed with CPU_FTR bits. We have to be a bit careful now to keep them in sync when we change one or the other. Nicholas Piggin (2): powerpc/64s: Fix pkey support in dt_cpu_ftrs, add CPU_FTR_PKEY bit powerpc/64s: Fix POWER9

Re: [PATCH v2 03/19] powerpc: Mark variables as unused

2018-04-04 Thread Michael Ellerman
LEROY Christophe writes: > Mathieu Malaterre a écrit : > >> Add gcc attribute unused for two variables. Fix warnings treated as errors >> with W=1: >> >> arch/powerpc/kernel/prom_init.c:1388:8: error: variable ‘path’ set >> but not used [-Werror=unused-but-set-variable] >> >> Suggested-by: C

Re: [RESEND 2/3] powerpc/memcpy: Add memcpy_mcsafe for pmem

2018-04-04 Thread Balbir Singh
On Thu, 5 Apr 2018 15:04:05 +1000 Nicholas Piggin wrote: > On Wed, 4 Apr 2018 20:00:52 -0700 > Dan Williams wrote: > > > [ adding Matthew, Christoph, and Tony ] > > > > On Wed, Apr 4, 2018 at 4:57 PM, Nicholas Piggin wrote: > > > On Thu, 5 Apr 2018 09:19:42 +1000 > > > Balbir Singh wrote

[PATCH] powerpc/64s: Fix dt_cpu_ftrs to have restore_cpu clear unwanted LPCR bits

2018-04-04 Thread Nicholas Piggin
Presently the dt_cpu_ftrs restore_cpu will only add bits to the LPCR for secondaries, but some bits must be removed (e.g., UPRT for HPT). Not clearing these bits on secondaries causes checkstops when booting with disable_radix. restore_cpu can not just set LPCR, because it is also called by the id

Re: [RESEND 2/3] powerpc/memcpy: Add memcpy_mcsafe for pmem

2018-04-04 Thread Nicholas Piggin
On Wed, 4 Apr 2018 20:00:52 -0700 Dan Williams wrote: > [ adding Matthew, Christoph, and Tony ] > > On Wed, Apr 4, 2018 at 4:57 PM, Nicholas Piggin wrote: > > On Thu, 5 Apr 2018 09:19:42 +1000 > > Balbir Singh wrote: > > > >> The pmem infrastructure uses memcpy_mcsafe in the pmem > >> laye

Re: [PATCH v3 1/7] powerpc/fadump: Move the metadata region to start of the reserved area.

2018-04-04 Thread Mahesh Jagannath Salgaonkar
On 04/04/2018 12:56 AM, Hari Bathini wrote: > Mahesh, I think we should explicitly document that production and > capture kernel > versions should be same. For changes like below, older/newer production > kernel vs > capture kernel is bound to fail. Of course, production and capture > kernel versio

Re: [RESEND v2 3/4] doc/devicetree: Persistent memory region bindings

2018-04-04 Thread Balbir Singh
On Wed, 4 Apr 2018 07:21:32 -0700 Dan Williams wrote: > On Wed, Apr 4, 2018 at 7:04 AM, Oliver wrote: > > On Wed, Apr 4, 2018 at 10:07 PM, Balbir Singh > > wrote: > >> On Tue, 3 Apr 2018 10:37:51 -0700 > >> Dan Williams wrote: > >> > >>> On Tue, Apr 3, 2018 at 7:24 AM, Oliver O'Halloran

Re: [RESEND 2/3] powerpc/memcpy: Add memcpy_mcsafe for pmem

2018-04-04 Thread Dan Williams
[ adding Matthew, Christoph, and Tony ] On Wed, Apr 4, 2018 at 4:57 PM, Nicholas Piggin wrote: > On Thu, 5 Apr 2018 09:19:42 +1000 > Balbir Singh wrote: > >> The pmem infrastructure uses memcpy_mcsafe in the pmem >> layer so as to convert machine check excpetions into >> a return value on fail

Re: [RESEND 1/3] powerpc/mce: Bug fixes for MCE handling in kernel space

2018-04-04 Thread Balbir Singh
On Thu, 5 Apr 2018 09:49:00 +1000 Nicholas Piggin wrote: > On Thu, 5 Apr 2018 09:19:41 +1000 > Balbir Singh wrote: > > > The code currently assumes PAGE_SHIFT as the shift value of > > the pfn, this works correctly (mostly) for user space pages, > > but the correct thing to do is > > It wou

Re: [RESEND 2/3] powerpc/memcpy: Add memcpy_mcsafe for pmem

2018-04-04 Thread Nicholas Piggin
On Thu, 5 Apr 2018 09:19:42 +1000 Balbir Singh wrote: > The pmem infrastructure uses memcpy_mcsafe in the pmem > layer so as to convert machine check excpetions into > a return value on failure in case a machine check > exception is encoutered during the memcpy. > > This patch largely borrows f

Re: [RESEND 1/3] powerpc/mce: Bug fixes for MCE handling in kernel space

2018-04-04 Thread Nicholas Piggin
On Thu, 5 Apr 2018 09:19:41 +1000 Balbir Singh wrote: > The code currently assumes PAGE_SHIFT as the shift value of > the pfn, this works correctly (mostly) for user space pages, > but the correct thing to do is It would be good to actually explain the problem in the changelog. I would have tho

[RESEND 3/3] powerpc/mce: Handle memcpy_mcsafe

2018-04-04 Thread Balbir Singh
Add a blocking notifier callback to be called in real-mode on machine check exceptions for UE (ld/st) errors only. The patch registers a callback on boot to be notified of machine check exceptions and returns a NOTIFY_STOP when a page of interest is seen as the source of the machine check exception

[RESEND 2/3] powerpc/memcpy: Add memcpy_mcsafe for pmem

2018-04-04 Thread Balbir Singh
The pmem infrastructure uses memcpy_mcsafe in the pmem layer so as to convert machine check excpetions into a return value on failure in case a machine check exception is encoutered during the memcpy. This patch largely borrows from the copyuser_power7 logic and does not add the VMX optimizations,

[RESEND 1/3] powerpc/mce: Bug fixes for MCE handling in kernel space

2018-04-04 Thread Balbir Singh
The code currently assumes PAGE_SHIFT as the shift value of the pfn, this works correctly (mostly) for user space pages, but the correct thing to do is 1. Extrace the shift value returned via the pte-walk API's 2. Use the shift value to access the instruction address. Note, the final physical add

[RESEND 0/3] Add support for memcpy_mcsafe

2018-04-04 Thread Balbir Singh
memcpy_mcsafe() is an API currently used by the pmem subsystem to convert errors while doing a memcpy (machine check exception errors) to a return value. This patchset consists of three patches 1. The first patch is a bug fix to handle machine check errors correctly while walking the page tables i

Re: [PATCH v9 15/24] mm: Introduce __vm_normal_page()

2018-04-04 Thread Jerome Glisse
On Wed, Apr 04, 2018 at 06:26:44PM +0200, Laurent Dufour wrote: > > > On 03/04/2018 21:39, Jerome Glisse wrote: > > On Tue, Mar 13, 2018 at 06:59:45PM +0100, Laurent Dufour wrote: > >> When dealing with the speculative fault path we should use the VMA's field > >> cached value stored in the vm_fa

Re: [mm] b1f0502d04: INFO:trying_to_register_non-static_key

2018-04-04 Thread David Rientjes
On Wed, 4 Apr 2018, Laurent Dufour wrote: > > I also think the following is needed: > > > > diff --git a/fs/exec.c b/fs/exec.c > > --- a/fs/exec.c > > +++ b/fs/exec.c > > @@ -312,6 +312,10 @@ static int __bprm_mm_init(struct linux_binprm *bprm) > > vma->vm_flags = VM_SOFTDIRTY | VM_STACK_FLAG

Re: [PATCH v2] powerpc, pkey: make protection key 0 less special

2018-04-04 Thread Thiago Jung Bauermann
Hello Ram, Ram Pai writes: > Applications need the ability to associate an address-range with some > key and latter revert to its initial default key. Pkey-0 comes close to > providing this function but falls short, because the current > implementation disallows applications to explicitly assoc

Re: [PATCH v2 01/19] powerpc/powermac: Mark variable x as unused

2018-04-04 Thread Mathieu Malaterre
On Thu, Mar 29, 2018 at 6:07 PM, LEROY Christophe wrote: > Mathieu Malaterre a écrit : > > >> Since the value of x is never intended to be read, declare it with gcc >> attribute as unused. Fix warning treated as error with W=1: >> >> arch/powerpc/platforms/powermac/bootx_init.c:471:21: error: v

Re: [PATCH 15/19] powerpc: Add missing prototype

2018-04-04 Thread Mathieu Malaterre
On Thu, Mar 29, 2018 at 6:02 PM, LEROY Christophe wrote: > Mathieu Malaterre a écrit : > > >> On Fri, Mar 23, 2018 at 1:20 PM, christophe leroy >> wrote: >>> >>> >>> >>> Le 22/03/2018 à 21:20, Mathieu Malaterre a écrit : Add one missing prototype for function rh_dump_blk. Fix warn

[PATCH v3 09/19] powerpc/chrp/pci: Make some functions static

2018-04-04 Thread Mathieu Malaterre
These functions can all be static, make it so. Fix warnings treated as errors with W=1: arch/powerpc/platforms/chrp/pci.c:34:5: error: no previous prototype for ‘gg2_read_config’ [-Werror=missing-prototypes] arch/powerpc/platforms/chrp/pci.c:61:5: error: no previous prototype for ‘gg2_write_

[PATCH v3 11/19] powerpc/powermac: Move pmac_pfunc_base_install prototype to header file

2018-04-04 Thread Mathieu Malaterre
The pmac_pfunc_base_install prototype was declared in powermac/smp.c since function was used there, move it to pmac_pfunc.h header to be visible in pfunc_base.c. Fix a warning treated as error with W=1: arch/powerpc/platforms/powermac/pfunc_base.c:330:12: error: no previous prototype for ‘pmac_

[PATCH v3 12/19] powerpc/powermac: Add missing prototype for note_bootable_part()

2018-04-04 Thread Mathieu Malaterre
Add a missing prototype for function `note_bootable_part` to silence a warning treated as error with W=1: arch/powerpc/platforms/powermac/setup.c:361:12: error: no previous prototype for ‘note_bootable_part’ [-Werror=missing-prototypes] Suggested-by: Christophe Leroy Signed-off-by: Mathieu Ma

[PATCH v3 13/19] powerpc/52xx: Add missing functions prototypes

2018-04-04 Thread Mathieu Malaterre
The function prototypes were declared within a `#ifdef CONFIG_PPC_LITE5200` block which would prevent them from being visible when compiling `mpc52xx_pm.c`. Move the prototypes outside of the `#ifdef` block to fix the following warnings treated as errors with W=1: arch/powerpc/platforms/52xx/mpc

[PATCH v3 15/19] powerpc: Add missing prototype

2018-04-04 Thread Mathieu Malaterre
Add one missing prototype for function rh_dump_blk. Fix warning treated as error in W=1: arch/powerpc/lib/rheap.c:740:6: error: no previous prototype for ‘rh_dump_blk’ [-Werror=missing-prototypes] Suggested-by: Christophe Leroy Signed-off-by: Mathieu Malaterre --- v3: remove extern keyword v

[PATCH v3 19/19] powerpc/tau: Synchronize function prototypes and body

2018-04-04 Thread Mathieu Malaterre
Some function prototypes and body for Thermal Assist Units were not in sync. Update the function definition to match the existing function declaration found in `setup-common.c`, changing an `int` return type to a `u32` return type. Move the prototypes to a header file. Fix the following warnings, t

[PATCH v3 05/19] powerpc/chrp/setup: Remove idu_size variable and make some functions static

2018-04-04 Thread Mathieu Malaterre
Remove variable declaration idu_size and associated code since not used. These functions can all be static, make it so. Fix warnings treated as errors with W=1: arch/powerpc/platforms/chrp/setup.c:97:6: error: no previous prototype for ‘chrp_show_cpuinfo’ [-Werror=missing-prototypes] arch/po

[PATCH v3 03/19] powerpc: Move `path` variable inside DEBUG_PROM

2018-04-04 Thread Mathieu Malaterre
Add gcc attribute unused for two variables. Fix warnings treated as errors with W=1: arch/powerpc/kernel/prom_init.c:1388:8: error: variable ‘path’ set but not used [-Werror=unused-but-set-variable] Suggested-by: Christophe Leroy Signed-off-by: Mathieu Malaterre --- v3: really move path with

[PATCH v3 01/19] powerpc/powermac: Mark variable x as unused

2018-04-04 Thread Mathieu Malaterre
Since the value of x is never intended to be read, declare it with gcc attribute as unused. Fix warning treated as error with W=1: arch/powerpc/platforms/powermac/bootx_init.c:471:21: error: variable ‘x’ set but not used [-Werror=unused-but-set-variable] Suggested-by: Christophe Leroy Signed-

[PATCH 2/2] powerpc/fadump: Do not use hugepages when fadump is active

2018-04-04 Thread Hari Bathini
FADump capture kernel boots in a restricted memory environment saving the context of previous kernel to capture vmcore. Having hugepages support in such environment would make things unnecessarily complicated, as hugepages need memory set aside for them and this would mean too much memory wasted in

[PATCH 1/2] powerpc/fadump: exclude memory holes while reserving memory in second kernel

2018-04-04 Thread Hari Bathini
From: Mahesh Salgaonkar The second kernel, during early boot after the crash, reserves rest of the memory above boot memory size to make sure it does not touch any of the dump memory area. It uses memblock_reserve() that reserves the specified memory region irrespective of memory holes present wi

Re: [PATCH v9 15/24] mm: Introduce __vm_normal_page()

2018-04-04 Thread Laurent Dufour
On 03/04/2018 21:39, Jerome Glisse wrote: > On Tue, Mar 13, 2018 at 06:59:45PM +0100, Laurent Dufour wrote: >> When dealing with the speculative fault path we should use the VMA's field >> cached value stored in the vm_fault structure. >> >> Currently vm_normal_page() is using the pointer to the

Re: [PATCH v9 15/24] mm: Introduce __vm_normal_page()

2018-04-04 Thread Laurent Dufour
On 03/04/2018 01:18, David Rientjes wrote: > On Tue, 13 Mar 2018, Laurent Dufour wrote: > >> diff --git a/include/linux/mm.h b/include/linux/mm.h >> index a84ddc218bbd..73b8b99f482b 100644 >> --- a/include/linux/mm.h >> +++ b/include/linux/mm.h >> @@ -1263,8 +1263,11 @@ struct zap_details { >>

Re: [PATCH v9 14/24] mm: Introduce __maybe_mkwrite()

2018-04-04 Thread Laurent Dufour
On 03/04/2018 01:12, David Rientjes wrote: > On Tue, 13 Mar 2018, Laurent Dufour wrote: > >> diff --git a/include/linux/mm.h b/include/linux/mm.h >> index dfa81a638b7c..a84ddc218bbd 100644 >> --- a/include/linux/mm.h >> +++ b/include/linux/mm.h >> @@ -684,13 +684,18 @@ void free_compound_page(stru

Re: [PATCH v9 11/24] mm: Cache some VMA fields in the vm_fault structure

2018-04-04 Thread Laurent Dufour
On 03/04/2018 00:24, David Rientjes wrote: > On Tue, 13 Mar 2018, Laurent Dufour wrote: > >> diff --git a/include/linux/mm.h b/include/linux/mm.h >> index ef6ef0627090..dfa81a638b7c 100644 >> --- a/include/linux/mm.h >> +++ b/include/linux/mm.h >> @@ -359,6 +359,12 @@ struct vm_fault { >>

[PATCH, RESEND, pci, v2] pci: Delete PCI disabling informational messages

2018-04-04 Thread Desnes A. Nunes do Rosario
The disabling informational messages on the PCI subsystem should be deleted since they do not represent any real value for the system logs. These messages are either not presented, or presented for all PCI devices (e.g., powerpc now realigns all PCI devices to its page size). Thus, they are floodi

Re: powerpc/hw_breakpoint: Only disable hw breakpoint if cpu supports it

2018-04-04 Thread Michael Ellerman
On Wed, 2018-04-04 at 10:41:16 UTC, "Naveen N. Rao" wrote: > We get the below warning if we try to use kexec on P9: > kexec_core: Starting new kernel > WARNING: CPU: 0 PID: 1223 at arch/powerpc/kernel/process.c:826 > __set_breakpoint+0xb4/0x140 > [snip] > NIP [c001bf44] __s

Re: [v2] cxl: Fix possible deadlock when processing page faults from cxllib

2018-04-04 Thread Michael Ellerman
On Tue, 2018-04-03 at 13:54:02 UTC, Frederic Barrat wrote: > cxllib_handle_fault() is called by an external driver when it needs to > have the host resolve page faults for a buffer. The buffer can cover > several pages and VMAs. The function iterates over all the pages used > by the buffer, based o

Re: [v2,1/3] powerpc: use NMI IPI for smp_send_stop

2018-04-04 Thread Michael Ellerman
On Sun, 2018-04-01 at 10:36:13 UTC, Nicholas Piggin wrote: > Use the NMI IPI rather than smp_call_function for smp_send_stop. > Have stopped CPUs hard disable interrupts rather than just soft > disable. > > This function is used in crash/panic/shutdown paths to bring other > CPUs down as quickly a

Re: [v3, 3/3] powerpc/64s/idle: POWER9 ESL=0 stop avoid save/restore overhead

2018-04-04 Thread Michael Ellerman
On Sun, 2018-04-01 at 05:48:55 UTC, Nicholas Piggin wrote: > When stop is executed with EC=ESL=0, it appears to execute like a > normal instruction (resuming from NIP when woken by interrupt). So all > the save/restore handling can be avoided completely. In particular NV > GPRs do not have to be sa

Re: powerpc/powernv: Fix SMT4 forcing idle code

2018-04-04 Thread Michael Ellerman
On Sun, 2018-04-01 at 05:38:13 UTC, Nicholas Piggin wrote: > PSSCR value is not stored to PACA_REQ_PSSCR in case the CPU does > not have the XER[SO] bug. > > Fix this by storing up-front, outside the workaround code. The > initial test is not required because it is a slow path. > > The workaround

Re: [1/2] powerpc/mm/radix: Parse disable_radix commandline correctly.

2018-04-04 Thread Michael Ellerman
On Fri, 2018-03-30 at 12:09:01 UTC, "Aneesh Kumar K.V" wrote: > From: "Aneesh Kumar K.V" > > kernel parameter disable_radix takes different options > disable_radix=yes|no|1|0 or just disable_radix. When using the later format > we get below error. > > `Malformed early option 'disable_radix'` >

Re: [V3] powerpc/mm/hugetlb: initialize the pagetable cache correctly for hugetlb

2018-04-04 Thread Michael Ellerman
On Fri, 2018-03-30 at 12:04:08 UTC, "Aneesh Kumar K.V" wrote: > From: "Aneesh Kumar K.V" > > With 64k page size, we have hugetlb pte entries at the pmd and pud level for > book3s64. We don't need to create a separate page table cache for that. With > 4k > we need to make sure hugepd page table c

Re: [V2] powerpc/mm/radix: Update pte fragment count from 16 to 256 on radix

2018-04-04 Thread Michael Ellerman
On Thu, 2018-03-22 at 08:43:50 UTC, "Aneesh Kumar K.V" wrote: > Right now we use only 4K out of the 64k page allocated for the level 4 page > table. W.r.t the performance impact due to lock contention, with ebizzy > > 256 threads: > without patch (10 runs of ./ebizzy -m -n 1000 -s 131072 -S 100)

Re: [2/2] powerpc/mm/keys: Update documentation in key fault handling

2018-04-04 Thread Michael Ellerman
On Wed, 2018-03-07 at 13:36:45 UTC, "Aneesh Kumar K.V" wrote: > No functionality change in this patch. Adds more code comments. We also remove > an unnecessary pkey check after we check for pkey error in this patch. > > Signed-off-by: Aneesh Kumar K.V Applied to powerpc next, thanks. https://gi

Re: [RESEND v2 3/4] doc/devicetree: Persistent memory region bindings

2018-04-04 Thread Dan Williams
On Wed, Apr 4, 2018 at 7:04 AM, Oliver wrote: > On Wed, Apr 4, 2018 at 10:07 PM, Balbir Singh wrote: >> On Tue, 3 Apr 2018 10:37:51 -0700 >> Dan Williams wrote: >> >>> On Tue, Apr 3, 2018 at 7:24 AM, Oliver O'Halloran wrote: >>> > Add device-tree binding documentation for the nvdimm region driv

Re: [RESEND v2 3/4] doc/devicetree: Persistent memory region bindings

2018-04-04 Thread Oliver
On Wed, Apr 4, 2018 at 10:07 PM, Balbir Singh wrote: > On Tue, 3 Apr 2018 10:37:51 -0700 > Dan Williams wrote: > >> On Tue, Apr 3, 2018 at 7:24 AM, Oliver O'Halloran wrote: >> > Add device-tree binding documentation for the nvdimm region driver. >> > >> > Cc: devicet...@vger.kernel.org >> > Sign

Re: [PATCH] cxl: Fix possible deadlock when processing page faults from cxllib

2018-04-04 Thread Frederic Barrat
Le 03/04/2018 à 17:31, Aneesh Kumar K.V a écrit : On 04/03/2018 08:10 PM, Aneesh Kumar K.V wrote: On 04/03/2018 03:13 PM, Frederic Barrat wrote: cxllib_handle_fault() is called by an external driver when it needs to have the host process page faults for a buffer which may cover several pages.

Re: [PATCH 1/2] powerpc/cpu: raise DEVICE_ADD/REMOVE msg to usrspace

2018-04-04 Thread Hari Bathini
On Friday 30 March 2018 06:47 AM, Pingfan Liu wrote: Some user space tools such as kexec-tools resort to the event add/remove to decide whether rebuilding dtb or not. So if a new core added and a crash happens on one of its thread, then kexec fails to bring up the 2nd kernel since lacking the i

Re: [1/3] powerpc/64s/idle: POWER9 implement a separate idle stop function for hotplug

2018-04-04 Thread Michael Ellerman
Nicholas Piggin writes: > On Wed, 4 Apr 2018 02:03:18 +1000 (AEST) > Michael Ellerman wrote: >> On Fri, 2017-11-17 at 14:08:05 UTC, Nicholas Piggin wrote: >> > Implement a new function to invoke stop, power9_offline_stop, which is >> > like power9_idle_stop but used by the cpu hotplug code. >> >

Re: [RFC 1/2] powerpc/swiotlb: Dont free up allocated SWIOTLB slab on POWER

2018-04-04 Thread Michael Ellerman
Anshuman Khandual writes: > Even though SWIOTLB slab gets allocated and initialized on powerpc with > swiotlb_init() called during mem_init(), it gets released away again on > POWER platform because 'ppc_swiotlb_enable' never gets set. The function > swiotlb_detect_4g() checks for 4GB memory and t

Re: [RESEND v2 4/4] powerpc/powernv: Create platform devs for nvdimm buses

2018-04-04 Thread Balbir Singh
On Wed, 4 Apr 2018 00:24:15 +1000 Oliver O'Halloran wrote: > Scan the devicetree for an nvdimm-bus compatible and create > a platform device for them. > > Signed-off-by: Oliver O'Halloran > --- Acked-by: Balbir Singh

Re: [RESEND v2 3/4] doc/devicetree: Persistent memory region bindings

2018-04-04 Thread Balbir Singh
On Tue, 3 Apr 2018 10:37:51 -0700 Dan Williams wrote: > On Tue, Apr 3, 2018 at 7:24 AM, Oliver O'Halloran wrote: > > Add device-tree binding documentation for the nvdimm region driver. > > > > Cc: devicet...@vger.kernel.org > > Signed-off-by: Oliver O'Halloran > > --- > > v2: Changed name from

Re: [RESEND v2 1/4] libnvdimm: Add of_node to region and bus descriptors

2018-04-04 Thread Balbir Singh
On Wed, 4 Apr 2018 00:24:12 +1000 Oliver O'Halloran wrote: > We want to be able to cross reference the region and bus devices > with the device tree node that they were spawned from. libNVDIMM > handles creating the actual devices for these internally, so we > need to pass in a pointer to the re

[PATCH] powerpc/hw_breakpoint: Only disable hw breakpoint if cpu supports it

2018-04-04 Thread Naveen N. Rao
We get the below warning if we try to use kexec on P9: kexec_core: Starting new kernel WARNING: CPU: 0 PID: 1223 at arch/powerpc/kernel/process.c:826 __set_breakpoint+0xb4/0x140 [snip] NIP [c001bf44] __set_breakpoint+0xb4/0x140 LR [c0061268] kexec_prepare_cpus_w

Re: [mm] b1f0502d04: INFO:trying_to_register_non-static_key

2018-04-04 Thread Laurent Dufour
On 04/04/2018 03:03, David Rientjes wrote: > On Tue, 3 Apr 2018, David Rientjes wrote: > > I found the root cause of this lockdep warning. > > In mmap_region(), unmap_region() may be called while vma_link() has not > been > called. This happens during the error path if call_

Re: [mm] b1f0502d04: INFO:trying_to_register_non-static_key

2018-04-04 Thread Laurent Dufour
On 04/04/2018 02:48, David Rientjes wrote: > On Wed, 28 Mar 2018, Laurent Dufour wrote: > >> On 26/03/2018 00:10, David Rientjes wrote: >>> On Wed, 21 Mar 2018, Laurent Dufour wrote: >>> I found the root cause of this lockdep warning. In mmap_region(), unmap_region() may be called

Re: [PATCH v9 06/24] mm: make pte_unmap_same compatible with SPF

2018-04-04 Thread Laurent Dufour
On 03/04/2018 21:10, Jerome Glisse wrote: > On Tue, Mar 13, 2018 at 06:59:36PM +0100, Laurent Dufour wrote: >> pte_unmap_same() is making the assumption that the page table are still >> around because the mmap_sem is held. >> This is no more the case when running a speculative page fault and >> a

Re: [PATCH v9 04/24] mm: Prepare for FAULT_FLAG_SPECULATIVE

2018-04-04 Thread Laurent Dufour
On 03/04/2018 23:57, David Rientjes wrote: > On Wed, 28 Mar 2018, Laurent Dufour wrote: > diff --git a/include/linux/mm.h b/include/linux/mm.h index 4d02524a7998..2f3e98edc94a 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -300,6 +300,7 @@ extern pgprot_t pr

Re: [PATCH 2/2] smp: introduce kick_active_cpus_sync()

2018-04-04 Thread Mark Rutland
On Wed, Apr 04, 2018 at 06:36:25AM +0300, Yury Norov wrote: > On Tue, Apr 03, 2018 at 02:48:32PM +0100, Mark Rutland wrote: > > On Sun, Apr 01, 2018 at 02:11:08PM +0300, Yury Norov wrote: > > > @@ -840,8 +861,10 @@ el0_svc: > > > mov wsc_nr, #__NR_syscalls > > > el0_svc_naked:

Re: [PATCH v9 09/24] mm: protect mremap() against SPF hanlder

2018-04-04 Thread Laurent Dufour
On 28/03/2018 23:21, David Rientjes wrote: > On Wed, 28 Mar 2018, Laurent Dufour wrote: > @@ -326,7 +336,10 @@ static unsigned long move_vma(struct vm_area_struct *vma, mremap_userfaultfd_prep(new_vma, uf); arch_remap(mm, old_addr, old_addr + old_len, >

Re: [PATCH v9 00/24] Speculative page faults

2018-04-04 Thread Laurent Dufour
Hi Jerome, Thanks for reviewing this series. On 03/04/2018 22:37, Jerome Glisse wrote: > On Tue, Mar 13, 2018 at 06:59:30PM +0100, Laurent Dufour wrote: >> This is a port on kernel 4.16 of the work done by Peter Zijlstra to >> handle page fault without holding the mm semaphore [1]. >> >> The idea