[linux-next][DLPAR CPU][Oops] Kernel crash with CPU hotunplug

2017-10-05 Thread Abdul Haleem
Hi, linux-next kernel panic while DLPAR CPU add/remove operation in a loop. Test: CPU hot-unplug Machine Type: Power8 PowerVM LPAR kernel: 4.14.0-rc2-next-20170928 gcc : 5.2.1 trace logs -- cpu 10 (hwid 10) Ready to die... cpu 11 (hwid 11) Ready to die... cpu 12 (hwid 12) Ready to

Re: [PATCH v2] kernel/module_64.c: Add REL24 relocation support of livepatch symbols

2017-10-05 Thread Naveen N . Rao
On 2017/10/04 03:25PM, Kamalesh Babulal wrote: > With commit 425595a7fc20 ("livepatch: reuse module loader code to > write relocations") livepatch uses module loader to write relocations > of livepatch symbols, instead of managing them by arch-dependent > klp_write_module_reloc() function. > >

Re: [PATCH 10/13] timer: Remove expires and data arguments from DEFINE_TIMER

2017-10-05 Thread Arnd Bergmann
On Thu, Oct 5, 2017 at 1:27 AM, Kees Cook wrote: > Drop the arguments from the macro and adjust all callers with the > following script: > > perl -pi -e 's/DEFINE_TIMER\((.*), 0, 0\);/DEFINE_TIMER($1);/g;' \ > $(git grep DEFINE_TIMER | cut -d: -f1 | sort -u | grep -v

Re: [PATCH 0/2] powerpc/xive: fix CPU hot unplug

2017-10-05 Thread Cédric Le Goater
>>> I haven't yet because I fail to understand why the decrementer is not >>> interrupting the dying CPU under xics as it is the case under XIVE. >> >> Oh.. ok. This sounds very similar to the problem Nikunj hit under TCG >> with decrementer interrupts waking up a supposedly dead CPU. He had a

Re: [RFC PATCH] powerpc/perf: Add compact mode pmu support for powernv

2017-10-05 Thread Santosh Sivaraj
* Madhavan Srinivasan wrote (on 2017-10-03 12:25:15 +): > Most of the power processor generation performance monitoring > unit (PMU) driver code is bundled in the kernel and one of those > is enabled/registered based on the oprofile_cpu_type check at > the boot. >

Re: [PATCH] powerpc/perf: Fix for core/nest imc call trace on cpuhotplug

2017-10-05 Thread Anju T Sudhakar
Hi Santosh, On Thursday 05 October 2017 03:20 PM, Santosh Sivaraj wrote: * Anju T Sudhakar wrote (on 2017-10-04 06:50:52 +): Nest/core pmu units are enabled only when it is used. A reference count is maintained for the events which uses the nest/core pmu units.

Re: [PATCH] powerpc: Default to enabling STRICT_KERNEL_RWX

2017-10-05 Thread Christophe LEROY
Le 05/10/2017 à 05:45, Kees Cook a écrit : When available, CONFIG_KERNEL_RWX should be default-enabled. On PPC32, this option implies deactivating BATs and/or LTLB mapping of the linear kernel address space, hence a significant performance degradation. So at least on PPC32, it should

Re: [PATCH] powerpc/perf: Fix for core/nest imc call trace on cpuhotplug

2017-10-05 Thread Santosh Sivaraj
* Anju T Sudhakar wrote (on 2017-10-04 06:50:52 +): > Nest/core pmu units are enabled only when it is used. A reference count is > > maintained for the events which uses the nest/core pmu units. Currently in > > *_imc_counters_release function a WARN()

Re: [PATCH tip/core/rcu 1/3] membarrier: Provide register expedited private command

2017-10-05 Thread Mathieu Desnoyers
- On Oct 5, 2017, at 6:02 PM, Andrea Parri parri.and...@gmail.com wrote: > On Thu, Oct 05, 2017 at 04:02:06PM +, Mathieu Desnoyers wrote: >> - On Oct 5, 2017, at 8:12 AM, Peter Zijlstra pet...@infradead.org wrote: >> >> > On Wed, Oct 04, 2017 at 02:37:53PM -0700, Paul E. McKenney

[RFC PATCH v2 for 4.14 2/2] Fix: membarrier: Handle CLONE_VM + !CLONE_THREAD correctly on powerpc

2017-10-05 Thread Mathieu Desnoyers
Threads targeting the same VM but which belong to different thread groups is a tricky case. It has a few consequences: It turns out that we cannot rely on get_nr_threads(p) to count the number of threads using a VM. We can use (atomic_read(>mm_users) == 1 && get_nr_threads(p) == 1) instead to

Re: [linux-next][Oops] CPU toggle resulted in kernel crash

2017-10-05 Thread Michael Ellerman
Kees Cook writes: > On Thu, Oct 5, 2017 at 10:21 AM, Abdul Haleem > wrote: >> Hi, >> >> CPU off on in a loop for single cpu results in kernel panic for >> 4.14.0-rc2-next-20170929 >> >> Machine: Power 8 PowerVM LPAR >> Kernel:

Re: [PATCH] powerpc/tm: P9 disabled suspend mode workaround

2017-10-05 Thread Michael Neuling
> > This patch blocks this from happening on POWER9 but sanity checking > > sigcontexts passed in. > > Should 'but' say 'by'? Thanks Mikey

Re: [PATCH 1/2] powerpc/platforms/cell: Delete an error message for a failed memory allocation in three functions

2017-10-05 Thread Joe Perches
On Thu, 2017-10-05 at 22:29 +0200, Michal Suchánek wrote: > I do not expect the kernel to generate a > stack trace every time memory allocation fails. With all the hooks in > the code it is hard to tell, though. All [kv].alloc failures without __GFP_NOWARN call dump_stack()

Re: [RFC PATCH for 4.14 2/2] Fix: membarrier: Handle CLONE_VM + !CLONE_THREAD correctly on powerpc

2017-10-05 Thread Mathieu Desnoyers
- On Oct 5, 2017, at 5:40 PM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: > Threads targeting the same VM but which belong to different thread > groups is a tricky case. It has a few consequences: > > It turns out that we cannot rely on get_nr_threads(p) to count the > number of

[RFC PATCH for 4.14 1/2] membarrier: Remove unused code for architectures without membarrier hooks

2017-10-05 Thread Mathieu Desnoyers
Architectures without membarrier hooks don't need to emit the empty membarrier_arch_switch_mm() static inline when CONFIG_MEMBARRIER=y. Adapt the CONFIG_MEMBARRIER=n counterpart to only emit the empty membarrier_arch_switch_mm() for architectures with membarrier hooks. Reported-by: Nicholas

[PATCH] selftests/powerpc: Remove redundant cp_abort test

2017-10-05 Thread Michael Neuling
Paste on POWER9 only works on accelerators and no longer on real memory. Hence this test is broken so remove it. Signed-off-by: Michael Neuling --- tools/testing/selftests/powerpc/Makefile | 1 - .../selftests/powerpc/context_switch/.gitignore| 1 -

Re: [linux-next][DLPAR CPU][Oops] Kernel crash with CPU hotunplug

2017-10-05 Thread Michael Ellerman
Abdul Haleem writes: > Hi, > > linux-next kernel panic while DLPAR CPU add/remove operation in a loop. > > Test: CPU hot-unplug > Machine Type: Power8 PowerVM LPAR > kernel: 4.14.0-rc2-next-20170928 > gcc : 5.2.1 > > trace logs > -- > cpu 10 (hwid 10) Ready

Re: [PATCH] powerpc/tm: P9 disabled suspend mode workaround

2017-10-05 Thread Michael Ellerman
Michael Neuling writes: > Each POWER9 core is made of two super slices. Each super slice can > only have one thread at a time in TM suspend mode. The super slice > restricts ever entering a state where both threads are in suspend by > aborting transactions on tsuspend or

[PATCH] KVM: PPC: Book3S HV: Delete an error message for a failed memory allocation in kvmppc_allocate_hpt()

2017-10-05 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 5 Oct 2017 13:16:51 +0200 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

Re: [PATCH 03/13] timer: Remove init_timer_on_stack() in favor of timer_setup_on_stack()

2017-10-05 Thread Rafael J. Wysocki
On Thu, Oct 5, 2017 at 1:26 AM, Kees Cook wrote: > Remove uses of init_timer_on_stack() with open-coded function and data > assignments that could be expressed using timer_setup_on_stack(). Several > were removed from the stack entirely since there was a one-to-one mapping

Re: [PATCH tip/core/rcu 1/3] membarrier: Provide register expedited private command

2017-10-05 Thread Peter Zijlstra
On Thu, Oct 05, 2017 at 02:12:50PM +0200, Peter Zijlstra wrote: > On Wed, Oct 04, 2017 at 02:37:53PM -0700, Paul E. McKenney wrote: > > diff --git a/arch/powerpc/kernel/membarrier.c > > b/arch/powerpc/kernel/membarrier.c > > new file mode 100644 > > index ..b0d79a5f5981 > > ---

Re: [PATCH tip/core/rcu 1/3] membarrier: Provide register expedited private command

2017-10-05 Thread Peter Zijlstra
On Wed, Oct 04, 2017 at 02:37:53PM -0700, Paul E. McKenney wrote: > diff --git a/arch/powerpc/kernel/membarrier.c > b/arch/powerpc/kernel/membarrier.c > new file mode 100644 > index ..b0d79a5f5981 > --- /dev/null > +++ b/arch/powerpc/kernel/membarrier.c > @@ -0,0 +1,45 @@ > +void

Re: [PATCH] powerpc: Drop lockdep_assert_cpus_held call from arch_update_cpu_topology

2017-10-05 Thread Thomas Gleixner
On Wed, 4 Oct 2017, Thiago Jung Bauermann wrote: > It turns out that not all paths calling arch_update_cpu_topology hold > cpu_hotplug_lock, but that's ok because those paths aren't supposed to race > with any concurrent hotplug events. > > Callers of arch_update_cpu_topology are expected to

Re: [PATCH v2] kernel/module_64.c: Add REL24 relocation support of livepatch symbols

2017-10-05 Thread Torsten Duwe
On Wed, Oct 04, 2017 at 11:25:16AM -0400, Kamalesh Babulal wrote: > > Both the failures with REL24 livepatch symbols relocation, can be > resolved by constructing a new livepatch stub. The newly setup klp_stub > mimics the functionality of entry_64.S::livepatch_handler introduced by > commit

[PATCH] bootwrapper: mspsc.c: fix pointer-to-int-cast warnings

2017-10-05 Thread Michal Suchanek
I get these warnings: ../arch/powerpc/boot/mpsc.c: In function 'mpsc_get_virtreg_of_phandle': ../arch/powerpc/boot/mpsc.c:113:35: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] ../arch/powerpc/boot/mpsc.c: In function 'mpsc_console_init':

Re: [patch V2 22/29] lockup_detector: Make watchdog_nmi_reconfigure() two stage

2017-10-05 Thread Don Zickus
On Tue, Oct 03, 2017 at 07:27:01PM +, Thomas Gleixner wrote: > On Tue, 3 Oct 2017, Thomas Gleixner wrote: > > On Tue, 3 Oct 2017, Thomas Gleixner wrote: > > > On Tue, 3 Oct 2017, Michael Ellerman wrote: > > > > Hmm, I tried that patch, it makes the warning go away. But then I > > > > triggered

Re: [PATCH] powerpc: Default to enabling STRICT_KERNEL_RWX

2017-10-05 Thread Kees Cook
On Thu, Oct 5, 2017 at 12:49 AM, Christophe LEROY wrote: > > > Le 05/10/2017 à 05:45, Kees Cook a écrit : >> >> When available, CONFIG_KERNEL_RWX should be default-enabled. > > > On PPC32, this option implies deactivating BATs and/or LTLB mapping of the > linear kernel

[PATCH] powerpc/perf/hv-24x7: Delete an error message for a failed memory allocation in create_events_from_catalog()

2017-10-05 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 5 Oct 2017 18:02:05 +0200 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

Re: [PATCH tip/core/rcu 1/3] membarrier: Provide register expedited private command

2017-10-05 Thread Peter Zijlstra
On Thu, Oct 05, 2017 at 04:02:06PM +, Mathieu Desnoyers wrote: > - On Oct 5, 2017, at 8:12 AM, Peter Zijlstra pet...@infradead.org wrote: > > > On Wed, Oct 04, 2017 at 02:37:53PM -0700, Paul E. McKenney wrote: > >> diff --git a/arch/powerpc/kernel/membarrier.c > >>

[PATCH 2/2] powerpc/oprofile/cell: Improve a size determination in two functions

2017-10-05 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 5 Oct 2017 17:18:33 +0200 Replace the specification of data structures by pointer dereferences as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style

Re: [PATCH tip/core/rcu 1/3] membarrier: Provide register expedited private command

2017-10-05 Thread Mathieu Desnoyers
- On Oct 5, 2017, at 8:22 AM, Avi Kivity a...@scylladb.com wrote: > On 10/05/2017 07:23 AM, Nicholas Piggin wrote: >> On Wed, 4 Oct 2017 14:37:53 -0700 >> "Paul E. McKenney" wrote: >> >>> From: Mathieu Desnoyers >>> >>> Provide a

Re: [PATCH tip/core/rcu 1/3] membarrier: Provide register expedited private command

2017-10-05 Thread Mathieu Desnoyers
- On Oct 5, 2017, at 8:12 AM, Peter Zijlstra pet...@infradead.org wrote: > On Wed, Oct 04, 2017 at 02:37:53PM -0700, Paul E. McKenney wrote: >> diff --git a/arch/powerpc/kernel/membarrier.c >> b/arch/powerpc/kernel/membarrier.c >> new file mode 100644 >> index ..b0d79a5f5981 >>

[PATCH 0/2] PowerPC-Cell OProfile: Adjustments for three function implementations

2017-10-05 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 5 Oct 2017 17:32:10 +0200 Two update suggestions were taken into account from static source code analysis. Markus Elfring (2): Delete an error message for a failed memory allocation in three functions Improve a size

Re: [PATCH tip/core/rcu 1/3] membarrier: Provide register expedited private command

2017-10-05 Thread Mathieu Desnoyers
- On Oct 5, 2017, at 12:23 AM, Nicholas Piggin npig...@gmail.com wrote: > On Wed, 4 Oct 2017 14:37:53 -0700 > "Paul E. McKenney" wrote: > >> From: Mathieu Desnoyers >> >> Provide a new command allowing processes to register

Re: [PATCH tip/core/rcu 1/3] membarrier: Provide register expedited private command

2017-10-05 Thread Mathieu Desnoyers
- On Oct 5, 2017, at 8:24 AM, Peter Zijlstra pet...@infradead.org wrote: > On Thu, Oct 05, 2017 at 02:12:50PM +0200, Peter Zijlstra wrote: >> On Wed, Oct 04, 2017 at 02:37:53PM -0700, Paul E. McKenney wrote: >> > diff --git a/arch/powerpc/kernel/membarrier.c >> >

[PATCH 1/2] powerpc/oprofile/cell: Delete an error message for a failed memory allocation in three functions

2017-10-05 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 5 Oct 2017 17:10:11 +0200 Omit extra messages for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

Re: Possible LMB hot unplug bug in 4.13+ kernels

2017-10-05 Thread Nathan Fontenot
On 10/04/2017 03:21 PM, Daniel Henrique Barboza wrote: > Hi, > > I've stumbled in a LMB hot unplug problem when running a guest with 4.13+ > kernel using QEMU 2.10. When trying to hot unplug a recently hotplugged LMB > this is what I got, using an upstream kernel: > > --- > QEMU

Re: [PATCH tip/core/rcu 1/3] membarrier: Provide register expedited private command

2017-10-05 Thread Steven Rostedt
On Thu, 5 Oct 2017 22:19:15 + (UTC) Mathieu Desnoyers wrote: > AFAIU the scheduler rq->lock is held while preemption is disabled. > synchronize_sched() is used here to ensure that all pre-existing > preempt-off critical sections have completed. > > So saying

Re: [PATCH v3 00/20] Speculative page faults

2017-10-05 Thread Alexei Starovoitov
On Wed, Oct 04, 2017 at 08:50:49AM +0200, Laurent Dufour wrote: > On 25/09/2017 18:27, Alexei Starovoitov wrote: > > On Mon, Sep 18, 2017 at 12:15 AM, Laurent Dufour > > wrote: > >> Despite the unprovable lockdep warning raised by Sergey, I didn't get any > >> feedback

Re: Possible LMB hot unplug bug in 4.13+ kernels

2017-10-05 Thread Michael Ellerman
Nathan Fontenot writes: > On 10/04/2017 03:21 PM, Daniel Henrique Barboza wrote: ... >> It appears that the hot unplug is failing because lmb_is_removable(lmb) is >> returning >> false inside dlpar_remove_lmb, triggering the hotplug of the LMBs again: ... >> >> I am

Re: [PATCH v2] kernel/module_64.c: Add REL24 relocation support of livepatch symbols

2017-10-05 Thread Kamalesh Babulal
On Thursday 05 October 2017 06:13 PM, Torsten Duwe wrote: On Wed, Oct 04, 2017 at 11:25:16AM -0400, Kamalesh Babulal wrote: Both the failures with REL24 livepatch symbols relocation, can be resolved by constructing a new livepatch stub. The newly setup klp_stub mimics the functionality of

Re: [PATCH v2] kernel/module_64.c: Add REL24 relocation support of livepatch symbols

2017-10-05 Thread Kamalesh Babulal
On Thursday 05 October 2017 06:13 PM, Torsten Duwe wrote: On Wed, Oct 04, 2017 at 11:25:16AM -0400, Kamalesh Babulal wrote: Both the failures with REL24 livepatch symbols relocation, can be resolved by constructing a new livepatch stub. The newly setup klp_stub mimics the functionality of

Re: [PATCH] powerpc: Drop lockdep_assert_cpus_held call from arch_update_cpu_topology

2017-10-05 Thread Thiago Jung Bauermann
Hello Thomas, Thanks for your comments. Thomas Gleixner writes: > On Wed, 4 Oct 2017, Thiago Jung Bauermann wrote: > >> It turns out that not all paths calling arch_update_cpu_topology hold >> cpu_hotplug_lock, but that's ok because those paths aren't supposed to race >>

[PATCH v2] powerpc: Default to enabling STRICT_KERNEL_RWX

2017-10-05 Thread Kees Cook
When available, CONFIG_KERNEL_RWX should be default-enabled for PPC64. On PPC32, there is a performance trade-off. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Christophe LEROY

Re: [linux-next][Oops] CPU toggle resulted in kernel crash

2017-10-05 Thread Kees Cook
On Thu, Oct 5, 2017 at 10:21 AM, Abdul Haleem wrote: > Hi, > > CPU off on in a loop for single cpu results in kernel panic for > 4.14.0-rc2-next-20170929 > > Machine: Power 8 PowerVM LPAR > Kernel: 4.14.0-rc2-next-20170929 > gcc: 5.1.1 > config : attached > > Steps to

Re: [PATCH] powerpc: Default to enabling STRICT_KERNEL_RWX

2017-10-05 Thread christophe leroy
Le 05/10/2017 à 19:30, Kees Cook a écrit : On Thu, Oct 5, 2017 at 12:49 AM, Christophe LEROY wrote: Le 05/10/2017 à 05:45, Kees Cook a écrit : When available, CONFIG_KERNEL_RWX should be default-enabled. On PPC32, this option implies deactivating BATs and/or

Re: [PATCH] powerpc: Default to enabling STRICT_KERNEL_RWX

2017-10-05 Thread Kees Cook
On Thu, Oct 5, 2017 at 11:57 AM, christophe leroy wrote: > > > Le 05/10/2017 à 19:30, Kees Cook a écrit : >> >> On Thu, Oct 5, 2017 at 12:49 AM, Christophe LEROY >> wrote: >>> >>> >>> >>> Le 05/10/2017 à 05:45, Kees Cook a écrit :

Re: [PATCH] powerpc: Drop lockdep_assert_cpus_held call from arch_update_cpu_topology

2017-10-05 Thread Thomas Gleixner
Thiago, On Thu, 5 Oct 2017, Thiago Jung Bauermann wrote: > Thomas Gleixner writes: > It doesn't look like powerpc uses arch_update_cpu_topology differently > than other arches. Are you saying that all callers of the function > should be holding cpu_hotplug_lock? No. I didn't

Re: [PATCH kernel v2] powerpc/powernv: Reserve a hole which appears after enabling IOV

2017-10-05 Thread Alexey Kardashevskiy
On 27/09/17 16:52, Alexey Kardashevskiy wrote: > In order to make generic IOV code work, the physical function IOV BAR > should start from offset of the first VF. Since M64 segments share > PE number space across PHB, and some PEs may be in use at the time > when IOV is enabled, the existing code

Re: [PATCH] powerpc/perf/hv-24x7: Delete an error message for a failed memory allocation in create_events_from_catalog()

2017-10-05 Thread Thiago Jung Bauermann
Thanks, Markus. SF Markus Elfring writes: > From: Markus Elfring > Date: Thu, 5 Oct 2017 18:02:05 +0200 > > Omit an extra message for a memory allocation failure in this function. > > This issue was detected by using the Coccinelle

[PATCH 1/2] powerpc/platforms/cell: Delete an error message for a failed memory allocation in three functions

2017-10-05 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 5 Oct 2017 21:04:30 +0200 Omit extra messages for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

Re: [PATCH 1/2] powerpc/platforms/cell: Delete an error message for a failed memory allocation in three functions

2017-10-05 Thread Michal Suchánek
Hello, On Thu, 5 Oct 2017 21:36:26 +0200 SF Markus Elfring wrote: > From: Markus Elfring > Date: Thu, 5 Oct 2017 21:04:30 +0200 > > Omit extra messages for a memory allocation failure in these > functions. this is bogus. All these

Re: [PATCH 1/2] powerpc/platforms/cell: Delete an error message for a failed memory allocation in three functions

2017-10-05 Thread Michal Suchánek
On Thu, 5 Oct 2017 22:06:11 +0200 (CEST) Julia Lawall wrote: > On Thu, 5 Oct 2017, Michal Suchánek wrote: > > > Hello, > > > > On Thu, 5 Oct 2017 21:36:26 +0200 > > SF Markus Elfring wrote: > > > > > From: Markus Elfring

[PATCH 0/2] PowerPC-Cell platform: Adjustments for four function implementations

2017-10-05 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 5 Oct 2017 21:25:43 +0200 Two update suggestions were taken into account from static source code analysis. Markus Elfring (2): Delete an error message for a failed memory allocation in three functions Improve a size

[PATCH 2/2] powerpc/platforms/cell: Improve a size determination in three functions

2017-10-05 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 5 Oct 2017 21:12:41 +0200 Replace the specification of data structures by pointer dereferences as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style

Re: [PATCH 1/2] powerpc/platforms/cell: Delete an error message for a failed memory allocation in three functions

2017-10-05 Thread Julia Lawall
On Thu, 5 Oct 2017, Michal Suchánek wrote: > Hello, > > On Thu, 5 Oct 2017 21:36:26 +0200 > SF Markus Elfring wrote: > > > From: Markus Elfring > > Date: Thu, 5 Oct 2017 21:04:30 +0200 > > > > Omit extra messages for a memory

[PATCH 0/4] PCI: Cleanup unused stuff

2017-10-05 Thread Bjorn Helgaas
Sorry for the long cc list. These are pretty trivial; they just remove some unnecessary declarations across several arches. --- Bjorn Helgaas (4): PCI: Remove redundant pcibios_set_master() declarations PCI: Remove redundant pci_dev, pci_bus, resource declarations PCI: Remove

[PATCH 4/4] alpha/PCI: Make pdev_save_srm_config() static

2017-10-05 Thread Bjorn Helgaas
From: Bjorn Helgaas pdev_save_srm_config() and struct pdev_srm_saved_conf are only used in arch/alpha/kernel/pci.c, so make them static there. Signed-off-by: Bjorn Helgaas --- arch/alpha/kernel/pci.c | 11 ++-

[PATCH 0/2] Power Mac: Adjustments for five function implementations

2017-10-05 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 5 Oct 2017 22:48:22 +0200 Two update suggestions were taken into account from static source code analysis. Markus Elfring (2): Delete an error message for a failed memory allocation in kw_i2c_host_init() Improve a size

[PATCH 2/2] powermac: Improve a size determination in five functions

2017-10-05 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 5 Oct 2017 22:40:39 +0200 Replace the specification of data structures by pointer dereferences as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style

[PATCH 1/2] powermac: Delete an error message for a failed memory allocation in kw_i2c_host_init()

2017-10-05 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 5 Oct 2017 22:30:29 +0200 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

Re: [PATCH 3/4] PCI: Remove unused declarations

2017-10-05 Thread Thomas Gleixner
On Thu, 5 Oct 2017, Bjorn Helgaas wrote: > From: Bjorn Helgaas > > Remove these unused declarations: > > pcibios_config_init() # never defined anywhere > pcibios_scan_root()# only defined by x86 > pcibios_get_irq_routing_table()# only

[PATCH v10 01/10] x86/mm: setting fields in deferred pages

2017-10-05 Thread Pavel Tatashin
Without deferred struct page feature (CONFIG_DEFERRED_STRUCT_PAGE_INIT), flags and other fields in "struct page"es are never changed prior to first initializing struct pages by going through __init_single_page(). With deferred struct page feature enabled, however, we set fields in

[PATCH v10 00/10] complete deferred page initialization

2017-10-05 Thread Pavel Tatashin
Changelog: v10 - v9 - Addressed new comments from Michal Hocko. - Sent "mm: deferred_init_memmap improvements" as a separate patch as it is also fixing existing problem. - Merged "mm: stop zeroing memory during allocation in vmemmap" with "mm: zero struct pages during initialization". - Added

[PATCH v10 07/10] x86/kasan: use kasan_map_populate()

2017-10-05 Thread Pavel Tatashin
To optimize the performance of struct page initialization, vmemmap_populate() will no longer zero memory. Therefore, we must use a new interface to allocate and map kasan shadow memory, that also zeroes memory for us. Signed-off-by: Pavel Tatashin ---

[PATCH v10 02/10] sparc64/mm: setting fields in deferred pages

2017-10-05 Thread Pavel Tatashin
Without deferred struct page feature (CONFIG_DEFERRED_STRUCT_PAGE_INIT), flags and other fields in "struct page"es are never changed prior to first initializing struct pages by going through __init_single_page(). With deferred struct page feature enabled there is a case where we set some fields

[PATCH v10 08/10] arm64/kasan: use kasan_map_populate()

2017-10-05 Thread Pavel Tatashin
To optimize the performance of struct page initialization, vmemmap_populate() will no longer zero memory. Therefore, we must use a new interface to allocate and map kasan shadow memory, that also zeroes memory for us. Signed-off-by: Pavel Tatashin ---

Re: [PATCH] powerpc/tm: P9 disabled suspend mode workaround

2017-10-05 Thread Joel Stanley
On Thu, Oct 5, 2017 at 2:25 PM, Michael Neuling wrote: > Each POWER9 core is made of two super slices. Each super slice can > only have one thread at a time in TM suspend mode. The super slice > restricts ever entering a state where both threads are in suspend by > aborting

[RFC PATCH for 4.14 1/2] membarrier: Remove unused code for architectures without membarrier hooks

2017-10-05 Thread Mathieu Desnoyers
Architectures without membarrier hooks don't need to emit the empty membarrier_arch_switch_mm() static inline when CONFIG_MEMBARRIER=y. Adapt the CONFIG_MEMBARRIER=n counterpart to only emit the empty membarrier_arch_switch_mm() for architectures with membarrier hooks. Reported-by: Nicholas

[PATCH 1/4] PCI: Remove redundant pcibios_set_master() declarations

2017-10-05 Thread Bjorn Helgaas
From: Bjorn Helgaas All users of pcibios_set_master() include , which already has a declaration. Remove the unnecessary declarations from the files. Signed-off-by: Bjorn Helgaas --- arch/alpha/include/asm/pci.h |2 --

[PATCH 2/4] PCI: Remove redundant pci_dev, pci_bus, resource declarations

2017-10-05 Thread Bjorn Helgaas
From: Bjorn Helgaas defines struct pci_bus and struct pci_dev and includes the struct resource definition before including . Nobody includes directly, so they don't need their own declarations. Remove the redundant struct pci_dev, pci_bus, resource declarations.

[PATCH 3/4] PCI: Remove unused declarations

2017-10-05 Thread Bjorn Helgaas
From: Bjorn Helgaas Remove these unused declarations: pcibios_config_init() # never defined anywhere pcibios_scan_root()# only defined by x86 pcibios_get_irq_routing_table()# only defined by x86 pcibios_set_irq_routing() #

Re: [PATCH 1/4] PCI: Remove redundant pcibios_set_master() declarations

2017-10-05 Thread Thomas Gleixner
On Thu, 5 Oct 2017, Bjorn Helgaas wrote: > From: Bjorn Helgaas > > All users of pcibios_set_master() include , which already has > a declaration. Remove the unnecessary declarations from the > files. > > Signed-off-by: Bjorn Helgaas Reviewed-by:

[PATCH v10 03/10] sparc64: simplify vmemmap_populate

2017-10-05 Thread Pavel Tatashin
Remove duplicating code by using common functions vmemmap_pud_populate and vmemmap_pgd_populate. Signed-off-by: Pavel Tatashin Reviewed-by: Steven Sistare Reviewed-by: Daniel Jordan Reviewed-by: Bob Picco

[PATCH v10 05/10] mm: zero reserved and unavailable struct pages

2017-10-05 Thread Pavel Tatashin
Some memory is reserved but unavailable: not present in memblock.memory (because not backed by physical pages), but present in memblock.reserved. Such memory has backing struct pages, but they are not initialized by going through __init_single_page(). In some cases these struct pages are accessed

[PATCH v10 09/10] mm: stop zeroing memory during allocation in vmemmap

2017-10-05 Thread Pavel Tatashin
vmemmap_alloc_block() will no longer zero the block, so zero memory at its call sites for everything except struct pages. Struct page memory is zero'd by struct page initialization. Replace allocators in sprase-vmemmap to use the non-zeroing version. So, we will get the performance improvement

[PATCH v10 04/10] mm: defining memblock_virt_alloc_try_nid_raw

2017-10-05 Thread Pavel Tatashin
* A new variant of memblock_virt_alloc_* allocations: memblock_virt_alloc_try_nid_raw() - Does not zero the allocated memory - Does not panic if request cannot be satisfied * optimize early system hash allocations Clients can call alloc_large_system_hash() with flag: HASH_ZERO to specify

[PATCH v10 06/10] mm/kasan: kasan specific map populate function

2017-10-05 Thread Pavel Tatashin
During early boot, kasan uses vmemmap_populate() to establish its shadow memory. But, that interface is intended for struct pages use. Because of the current project, vmemmap won't be zeroed during allocation, but kasan expects that memory to be zeroed. We are adding a new kasan_map_populate()

[PATCH v10 10/10] sparc64: optimized struct page zeroing

2017-10-05 Thread Pavel Tatashin
Add an optimized mm_zero_struct_page(), so struct page's are zeroed without calling memset(). We do eight to ten regular stores based on the size of struct page. Compiler optimizes out the conditions of switch() statement. SPARC-M6 with 15T of memory, single thread performance:

[RFC PATCH for 4.14 2/2] Fix: membarrier: Handle CLONE_VM + !CLONE_THREAD correctly on powerpc

2017-10-05 Thread Mathieu Desnoyers
Threads targeting the same VM but which belong to different thread groups is a tricky case. It has a few consequences: It turns out that we cannot rely on get_nr_threads(p) to count the number of threads using a VM. We can use (atomic_read(>mm_users) == 1 && get_nr_threads(p) == 1) instead to

Re: [PATCH tip/core/rcu 1/3] membarrier: Provide register expedited private command

2017-10-05 Thread Mathieu Desnoyers
- On Oct 5, 2017, at 12:21 PM, Peter Zijlstra pet...@infradead.org wrote: > On Thu, Oct 05, 2017 at 04:02:06PM +, Mathieu Desnoyers wrote: >> - On Oct 5, 2017, at 8:12 AM, Peter Zijlstra pet...@infradead.org wrote: >> >> > On Wed, Oct 04, 2017 at 02:37:53PM -0700, Paul E. McKenney

Re: [PATCH v2] powerpc: Default to enabling STRICT_KERNEL_RWX

2017-10-05 Thread Balbir Singh
On Fri, Oct 6, 2017 at 6:03 AM, Kees Cook wrote: > When available, CONFIG_KERNEL_RWX should be default-enabled for PPC64. > On PPC32, there is a performance trade-off. > > Cc: Benjamin Herrenschmidt > Cc: Paul Mackerras > Cc: