Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-15 Thread Nicholas Piggin
On Thu, 15 Dec 2016 12:19:02 +0100 Hannes Frederic Sowa wrote: > On 15.12.2016 03:06, Nicholas Piggin wrote: > > On Wed, 14 Dec 2016 15:04:36 +0100 > > Hannes Frederic Sowa wrote: > > > >> On 09.12.2016 17:03, Greg Kroah-Hartman wrote: > >>>

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-15 Thread Nicholas Piggin
On Thu, 15 Dec 2016 14:15:31 +0100 Hannes Frederic Sowa wrote: > On 15.12.2016 13:03, Nicholas Piggin wrote: > > On Thu, 15 Dec 2016 12:19:02 +0100 > > Hannes Frederic Sowa wrote: > > > >> On 15.12.2016 03:06, Nicholas Piggin wrote: > >>> On We

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-11-28 Thread Nicholas Piggin
On Tue, 29 Nov 2016 01:15:48 + Ben Hutchings wrote: > [I've had to guess at the cc list for this, because we no longer have > mail archives that preserve them.] You got it about right. > On Fri, 2016-11-25 at 10:01 -0800, Linus Torvalds wrote: > > On Thu, Nov 24, 2016

Re: linker-tables v5 testing

2016-11-29 Thread Nicholas Piggin
On Wed, 30 Nov 2016 02:33:49 +0100 "Luis R. Rodriguez" wrote: > On Thu, Nov 24, 2016 at 08:18:40AM -0800, Guenter Roeck wrote: > > Hi Luis, > > > > On 11/23/2016 08:11 PM, Luis R. Rodriguez wrote: > > > Guenter, > > > > > > I think I'm ready to start pushing a new patch set out for review. >

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-11-30 Thread Nicholas Piggin
On Tue, 29 Nov 2016 12:35:57 -0800 Linus Torvalds wrote: > On Tue, Nov 29, 2016 at 11:57 AM, Ben Hutchings wrote: > > > > If the modversion is missing then the fallback should be to a full > > vermagic match, i.e. including the release string. Something like > > this (untested): > > This rea

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-11-30 Thread Nicholas Piggin
On Wed, 30 Nov 2016 21:33:01 + Ben Hutchings wrote: > On Wed, 2016-11-30 at 10:40 -0800, Linus Torvalds wrote: > > > On Wed, Nov 30, 2016 at 10:18 AM, Nicholas Piggin > > > wrote: > > > > > > Here's an initial rough hack at removing modversio

Re: linux-next: build warning after merge of the kbuild tree

2016-11-30 Thread Nicholas Piggin
On Thu, 1 Dec 2016 10:06:08 +1100 Stephen Rothwell wrote: > Hi Michal, > > After merging the kbuild tree, today's linux-next build (x86_64 > allmodconfig) produced this warning: > > WARNING: EXPORT symbol "__sw_hweight32" [vmlinux] version generation failed, > symbol will not be versioned. > W

Re: linker-tables v5 testing

2016-11-30 Thread Nicholas Piggin
On Wed, 30 Nov 2016 18:38:16 +0100 "Luis R. Rodriguez" wrote: > On Wed, Nov 30, 2016 at 02:09:47PM +1100, Nicholas Piggin wrote: > > On Wed, 30 Nov 2016 02:33:49 +0100 > > "Luis R. Rodriguez" wrote: > > > > > On Thu, Nov 24, 2016 at 08:18:

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-11-30 Thread Nicholas Piggin
On Thu, 01 Dec 2016 02:35:54 + Ben Hutchings wrote: > On Thu, 2016-12-01 at 12:55 +1100, Nicholas Piggin wrote: > > On Wed, 30 Nov 2016 21:33:01 + > > > Ben Hutchings wrote: > > > > > On Wed, 2016-11-30 at 10:40 -0800, Linus Torvalds wrote: >

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-11-30 Thread Nicholas Piggin
On Wed, 30 Nov 2016 23:13:25 -0500 Don Zickus wrote: > On Wed, Nov 30, 2016 at 10:40:02AM -0800, Linus Torvalds wrote: > > On Wed, Nov 30, 2016 at 10:18 AM, Nicholas Piggin > > wrote: > > > > > > Here's an initial rough hack at removing modversions. It

Re: linker-tables v5 testing

2016-11-30 Thread Nicholas Piggin
On Wed, 30 Nov 2016 19:15:27 -0800 "Luis R. Rodriguez" wrote: > On Wed, Nov 30, 2016 at 6:51 PM, Nicholas Piggin wrote: > > On Wed, 30 Nov 2016 18:38:16 +0100 > > "Luis R. Rodriguez" wrote: > > > >> On Wed, Nov 30, 2016 at 02:09:47PM +110

Re: linker-tables v5 testing

2016-11-30 Thread Nicholas Piggin
On Thu, 1 Dec 2016 16:04:30 +1100 Nicholas Piggin wrote: > On Wed, 30 Nov 2016 19:15:27 -0800 > "Luis R. Rodriguez" wrote: > > > On Wed, Nov 30, 2016 at 6:51 PM, Nicholas Piggin wrote: > > > On Wed, 30 Nov 2016 18:38:16 +0100 > > > "Luis R.

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-01 Thread Nicholas Piggin
On Thu, 1 Dec 2016 11:48:09 +0100 Stanislav Kozina wrote: > On 12/01/2016 05:13 AM, Don Zickus wrote: > > ... > > > I think GregKH pointed to one such tool, libabigail? We are working on > > others too. > > I should mention one of the others here: > https://github.com/skozina/kabi-dw > > I

Re: 'kbuild' merge before 4.9-rc1 breaks build and boot

2016-11-20 Thread Nicholas Piggin
On Sun, 20 Nov 2016 19:26:23 +0100 Peter Wu wrote: > Hi Nicholas, > > Current git master (v4.9-rc5-364-g77079b1) with the latest kbuild fixes > is still failing to load modules when built with CONFIG_MODVERSIONS=y on > x86_64 using GCC 6.2.1. > > It can still be reproduced with make defconfig,

Re: [PATCH 1/2] kbuild: provide include/asm/asm-prototypes.h for ARM

2016-11-20 Thread Nicholas Piggin
On Sun, 20 Nov 2016 19:12:57 + Russell King - ARM Linux wrote: > On Sun, Nov 20, 2016 at 10:32:50AM -0800, Linus Torvalds wrote: > > On Sun, Nov 20, 2016 at 5:21 AM, Russell King - ARM Linux > > wrote: > > > On Tue, Oct 25, 2016 at 07:32:00PM +110

Re: [PATCH resend] kbuild: provide include/asm/asm-prototypes.h for x86

2016-11-20 Thread Nicholas Piggin
order for them to be versioned. Add these declarations for x86, and an architecture-independent file that can be used for common symbols. (if you want to use that as-is or rewrite it, no problem). You can add Acked-by: Nicholas Piggin Also it's not a big deal, but if you redo the

Re: [1/2] kbuild: provide include/asm/asm-prototypes.h for ARM

2016-11-21 Thread Nicholas Piggin
On Mon, 21 Nov 2016 19:13:55 + Russell King - ARM Linux wrote: > On Mon, Nov 21, 2016 at 07:46:44PM +0100, Uwe Kleine-König wrote: > > Hello, > > > > On Mon, Oct 24, 2016 at 05:05:26PM +0200, Arnd Bergmann wrote: > > > This adds an asm/asm-prototypes.h header for ARM to fix the > > > broke

Re: linker-tables v5 testing

2016-12-08 Thread Nicholas Piggin
On Fri, 2 Dec 2016 07:49:52 -0800 "Luis R. Rodriguez" wrote: > On Thu, Dec 1, 2016 at 10:31 PM, Nicholas Piggin > wrote: > > > > On 2 Dec 2016 2:35 AM, "Luis R. Rodriguez" wrote: > >> > >> On Wed, Nov 30, 2016 at 9:20 PM, Nicholas

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-08 Thread Nicholas Piggin
On Thu, 1 Dec 2016 17:12:41 +0100 Michal Marek wrote: > On 2016-12-01 04:39, Nicholas Piggin wrote: > > On Thu, 01 Dec 2016 02:35:54 + > > Ben Hutchings wrote: > >> As I understand it, genksyms incorporates the definitions of a > >> function's param

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-08 Thread Nicholas Piggin
On Thu, 1 Dec 2016 10:20:39 -0500 Don Zickus wrote: > On Thu, Dec 01, 2016 at 03:32:15PM +1100, Nicholas Piggin wrote: > > > Anyway, MODVERSIONS is our way of protecting our kabi for the last 10 > > > years. > > > It isn't perfect and we have fixed th

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-09 Thread Nicholas Piggin
On Fri, 9 Dec 2016 08:55:51 +0100 Stanislav Kozina wrote: > >> The question is how to provide a similar guarantee if a different way? > > As a tool to aid distro reviewers, modversions has some value, but the > > debug info parsing tools that have been mentioned in this thread seem > > superior

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-09 Thread Nicholas Piggin
On Fri, 9 Dec 2016 15:36:04 +0100 Stanislav Kozina wrote: > The question is how to provide a similar guarantee if a different way? > >>> As a tool to aid distro reviewers, modversions has some value, but the > >>> debug info parsing tools that have been mentioned in this thread seem > >>>

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-09 Thread Nicholas Piggin
On Fri, 09 Dec 2016 15:21:33 + Ian Campbell wrote: > On Fri, 2016-12-09 at 13:33 +1000, Nicholas Piggin wrote: > >  > > Well I simply tested the outcome. If you have: > > > > struct blah { > >   int x; > > }; > > int foo(struct blah *blah) >

Re: [PATCH] x86/kbuild: enable modversions for symbols exported from asm

2016-12-11 Thread Nicholas Piggin
On Sat, 10 Dec 2016 13:41:03 +0100 Greg Kroah-Hartman wrote: > On Fri, Dec 09, 2016 at 11:46:54PM +0100, Dodji Seketeli wrote: > > Hello, > > > > Nicholas Piggin a écrit: > > > > [...] > > > > > That said, a dwarf based checker tool shoul

Re: [v2 PATCH 4/4] powernv: Recover correct PACA on wakeup from a stop on P9 DD1

2017-03-21 Thread Nicholas Piggin
On Tue, 21 Mar 2017 02:59:46 +1000 Nicholas Piggin wrote: > On Mon, 20 Mar 2017 21:24:18 +0530 > This is quite neat now you've moved it to its own function. Nice. > It will be only a trivial clash with my patches now, I think. > > Reviewed-by: Nicholas Piggin Hmm... This

Re: [v2 PATCH 4/4] powernv: Recover correct PACA on wakeup from a stop on P9 DD1

2017-03-22 Thread Nicholas Piggin
On Wed, 22 Mar 2017 11:28:46 +0530 Gautham R Shenoy wrote: > On Tue, Mar 21, 2017 at 02:59:46AM +1000, Nicholas Piggin wrote: > > On Mon, 20 Mar 2017 21:24:18 +0530 > > "Gautham R. Shenoy" wrote: > > > > > From: "Gautham R. Shenoy" >

Re: [v3 PATCH 4/4] powernv: Recover correct PACA on wakeup from a stop on P9 DD1

2017-03-22 Thread Nicholas Piggin
on the > way out by setting the NAPSTATELOST in paca. > > [Changelog written with inputs from sva...@linux.vnet.ibm.com] Looks good. Reviewed-by: Nicholas Piggin

Re: [v2 PATCH 1/4] powernv: Move CPU-Offline idle state invocation from smp.c to idle.c

2017-03-20 Thread Nicholas Piggin
.c could become static (pnv_deepest_stop_psscr_*). Reviewed-by: Nicholas Piggin

Re: [v2 PATCH 3/4] powernv:idle: Don't override default/deepest directly in kernel

2017-03-20 Thread Nicholas Piggin
t; +static u64 pnv_deepest_stop_psscr_val; > +static u64 pnv_deepest_stop_psscr_mask; > +static bool deepest_stop_found; Aha you have made them static. Nitpick withdrawn :) The log messages look good now. Reviewed-by: Nicholas Piggin

Re: [v2 PATCH 4/4] powernv: Recover correct PACA on wakeup from a stop on P9 DD1

2017-03-20 Thread Nicholas Piggin
n up with > * hypervisor state loss. If yes, restore hypervisor state and return > @@ -385,7 +425,14 @@ _GLOBAL(power9_idle_stop) > */ > _GLOBAL(pnv_restore_hyp_resource) > BEGIN_FTR_SECTION > - ld r2,PACATOC(r13); > +BEGIN_FTR_SECTION_NESTED(70) > + mflrr6 > + bl power9_dd1_recover_paca > + mtlrr6 > + ld r2, PACATOC(r13) > +FTR_SECTION_ELSE_NESTED(70) > + ld r2, PACATOC(r13) > +ALT_FTR_SECTION_END_NESTED_IFSET(CPU_FTR_POWER9_DD1, 70) This is quite neat now you've moved it to its own function. Nice. It will be only a trivial clash with my patches now, I think. Reviewed-by: Nicholas Piggin

Re: [PATCH 1/3] powernv:smp: Add busy-wait loop as fall back for CPU-Hotplug

2017-03-14 Thread Nicholas Piggin
On Mon, 13 Mar 2017 11:31:26 +0530 "Gautham R. Shenoy" wrote: > [Changelog written with inputs from sva...@linux.vnet.ibm.com] > Signed-off-by: Gautham R. Shenoy Reviewed-by: Nicholas Piggin > --- > arch/powerpc/platforms/powernv/smp.c | 10 +- > 1 file ch

Re: [PATCH 2/3] powernv:idle: Don't override default/deepest directly in kernel

2017-03-14 Thread Nicholas Piggin
On Mon, 13 Mar 2017 11:31:27 +0530 "Gautham R. Shenoy" wrote: > From: "Gautham R. Shenoy" > > Currently during idle-init on power9, if we don't find suitable stop > states in the device tree that can be used as the > default_stop/deepest_stop, we set stop0 (ESL=1,EC=1) as the default > stop sta

Re: [PATCH 3/3] powernv:Recover correct PACA on wakeup from a stop on P9 DD1

2017-03-14 Thread Nicholas Piggin
On Mon, 13 Mar 2017 11:31:28 +0530 "Gautham R. Shenoy" wrote: > From: "Gautham R. Shenoy" > > POWER9 platform can be configured to rebalance per-thread resources > within a core in order to improve SMT performance. Certain STOP > states can be configure to relinquish resources include some > h

Re: [PATCH] mm: fix KPF_SWAPCACHE

2017-02-08 Thread Nicholas Piggin
instead > of being shown on unrelated pages which have PG_owner_priv_1 set. > > Signed-off-by: Hugh Dickins Thanks Hugh, this seems fine to me. We want this for 4.10, no? Fixes: 6326fec1122c ("mm: Use owner_priv bit for PageSwapCache, valid when PageSwapBacked") Reviewed-by: N

Re: [PATCH v2 1/3] powerpc: Factor out common code in setup-common.c

2016-08-09 Thread Nicholas Piggin
On Tue, 9 Aug 2016 09:30:54 -0700 Andrey Smirnov wrote: > On Sun, Jul 31, 2016 at 8:40 PM, Nicholas Piggin wrote: > > On Thu, 28 Jul 2016 16:07:16 -0700 > > Andrey Smirnov wrote: > > > >> Factor out a small bit of common code in machine_restart(), > >&g

Re: [PATCH v2 3/3] powerpc: Convert fsl_rstcr_restart to a reset handler

2016-08-09 Thread Nicholas Piggin
On Tue, 9 Aug 2016 11:47:37 -0700 Andrey Smirnov wrote: > On Sun, Jul 31, 2016 at 9:03 PM, Nicholas Piggin wrote: > > On Thu, 28 Jul 2016 16:07:18 -0700 > > Andrey Smirnov wrote: > > > >> Convert fsl_rstcr_restart into a function to be registered wi

Re: powerpc allyesconfig / allmodconfig linux-next next-20160729 - next-20160729 build failures

2016-08-11 Thread Nicholas Piggin
On Wed, 03 Aug 2016 22:13:28 +0200 Arnd Bergmann wrote: > On Wednesday, August 3, 2016 2:44:29 PM CEST Segher Boessenkool wrote: > > Hi Arnd, > > > > On Wed, Aug 03, 2016 at 08:52:48PM +0200, Arnd Bergmann wrote: > > > From my first look, it seems that all of lib/*.o is now getting linked > >

Re: powerpc allyesconfig / allmodconfig linux-next next-20160729 - next-20160729 build failures

2016-08-11 Thread Nicholas Piggin
On Thu, 11 Aug 2016 15:04:00 +0200 Arnd Bergmann wrote: > On Thursday, August 11, 2016 10:43:20 PM CEST Nicholas Piggin wrote: > > On Wed, 03 Aug 2016 22:13:28 +0200 > > Final ld time > > inclink > > real0m0.378s > > user0m0.304s > >

Re: powerpc allyesconfig / allmodconfig linux-next next-20160729 - next-20160729 build failures

2016-08-03 Thread Nicholas Piggin
On Wed, 03 Aug 2016 14:29:13 +0200 Arnd Bergmann wrote: > On Wednesday, August 3, 2016 10:19:11 PM CEST Stephen Rothwell wrote: > > Hi Arnd, > > > > On Wed, 03 Aug 2016 09:52:23 +0200 Arnd Bergmann wrote: > > > > > > Using a different way to link the kernel would also help us with > > > the r

Re: powerpc allyesconfig / allmodconfig linux-next next-20160729 - next-20160729 build failures

2016-08-04 Thread Nicholas Piggin
On Thu, 04 Aug 2016 12:37:41 +0200 Arnd Bergmann wrote: > On Thursday, August 4, 2016 11:00:49 AM CEST Arnd Bergmann wrote: > > I tried this > > > > diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh > > index b5e40ed86e60..89bca1a25916 100755 > > --- a/scripts/link-vmlinux.sh > > ++

Re: powerpc allyesconfig / allmodconfig linux-next next-20160729 - next-20160729 build failures

2016-08-04 Thread Nicholas Piggin
On Thu, 04 Aug 2016 14:09:02 +0200 Arnd Bergmann wrote: > On Thursday, August 4, 2016 9:47:13 PM CEST Nicholas Piggin wrote: > > On Thu, 04 Aug 2016 12:37:41 +0200 Arnd Bergmann wrote: > > > On Thursday, August 4, 2016 11:00:49 AM CEST Arnd Bergmann wrote: &g

Re: [RFC][PATCH] Fix a race between rwsem and the scheduler

2016-08-30 Thread Nicholas Piggin
takes a long time to > reproduce. I am trying to work on a test case that can reproduce > the issue faster, but thats work in progress. I am still testing the > changes on my still in a loop and the tests seem OK thus far. > > Big thanks to Benjamin and Nick for helping debug this as

Re: linux-next: build warnings after merge of the kbuild tree

2016-08-17 Thread Nicholas Piggin
On Wed, 17 Aug 2016 14:59:59 +0200 Michal Marek wrote: > On 2016-08-17 03:44, Stephen Rothwell wrote: > > Hi Michal, > > > > After merging the kbuild tree, today's linux-next build (powerpc > > ppc64_defconfig) produced these warnings: > > > > WARNING: 25 bad relocations > > c0cf2570 R_

Re: linux-next: build warnings after merge of the kbuild tree

2016-08-18 Thread Nicholas Piggin
On Fri, 19 Aug 2016 15:09:14 +1000 Stephen Rothwell wrote: > Hi Nick, > > On Fri, 19 Aug 2016 13:38:54 +1000 Stephen Rothwell > wrote: > > > > On Thu, 18 Aug 2016 11:09:48 +1000 Nicholas Piggin > > wrote: > > > > > > On Wed, 17 A

Re: linux-next: build warnings after merge of the kbuild tree

2016-08-19 Thread Nicholas Piggin
On Fri, 19 Aug 2016 10:37:00 +0200 Michal Marek wrote: > On 2016-08-19 07:09, Stephen Rothwell wrote: > > Hi Nick, > > > > On Fri, 19 Aug 2016 13:38:54 +1000 Stephen Rothwell > > wrote: > >> > >> On Thu, 18 Aug 2016 11:09:48 +1000 Nicholas Pigg

[PATCH 1/8] powerpc/powernv: must include hvcall.h to get PAPR defines

2020-07-02 Thread Nicholas Piggin
An include goes away in future patches which breaks compilation without this. Signed-off-by: Nicholas Piggin --- arch/powerpc/platforms/powernv/pci-ioda-tce.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/platforms/powernv/pci-ioda-tce.c b/arch/powerpc/platforms/powernv/pci

[PATCH 0/8] powerpc: queued spinlocks and rwlocks

2020-07-02 Thread Nicholas Piggin
airly soon. Thanks, Nick Nicholas Piggin (8): powerpc/powernv: must include hvcall.h to get PAPR defines powerpc/pseries: use smp_rmb() in H_CONFER spin yield powerpc/pseries: move some PAPR paravirt functions to their own file powerpc: move spinlock implementation to simple_spinlock p

[PATCH 2/8] powerpc/pseries: use smp_rmb() in H_CONFER spin yield

2020-07-02 Thread Nicholas Piggin
There is no need for rmb(), this allows faster lwsync here. Signed-off-by: Nicholas Piggin --- arch/powerpc/lib/locks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/lib/locks.c b/arch/powerpc/lib/locks.c index 6440d5943c00..47a530de733e 100644 --- a/arch

[PATCH 3/8] powerpc/pseries: move some PAPR paravirt functions to their own file

2020-07-02 Thread Nicholas Piggin
Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/paravirt.h | 61 + arch/powerpc/include/asm/spinlock.h | 24 +--- arch/powerpc/lib/locks.c| 12 +++--- 3 files changed, 68 insertions(+), 29 deletions(-) create mode 100644 arch/powerpc

[PATCH 5/8] powerpc/64s: implement queued spinlocks and rwlocks

2020-07-02 Thread Nicholas Piggin
. Signed-off-by: Nicholas Piggin --- arch/powerpc/Kconfig | 13 + arch/powerpc/include/asm/Kbuild | 2 ++ arch/powerpc/include/asm/qspinlock.h | 20 arch/powerpc/include/asm/spinlock.h | 5 + arch/powerpc/include/asm

[PATCH 8/8] powerpc/64s: remove paravirt from simple spinlocks (RFC only)

2020-07-02 Thread Nicholas Piggin
RFC until we settle on queued spinlocks for 64s and remove the option to go back to simple locks. If other sub-archs want to keep simple spinlocks, the code can be nicely simplified. --- arch/powerpc/include/asm/simple_spinlock.h | 61 +--- arch/powerpc/kvm/book3s_hv_rm_mmu.c

[PATCH 7/8] powerpc/qspinlock: optimised atomic_try_cmpxchg_lock that adds the lock hint

2020-07-02 Thread Nicholas Piggin
This brings the behaviour of the uncontended fast path back to roughly equivalent to simple spinlocks -- a single atomic op with lock hint. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/atomic.h| 28 arch/powerpc/include/asm/qspinlock.h | 2 +- 2

[PATCH 6/8] powerpc/pseries: implement paravirt qspinlocks for SPLPAR

2020-07-02 Thread Nicholas Piggin
Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/paravirt.h | 23 arch/powerpc/include/asm/qspinlock.h | 55 +++ arch/powerpc/include/asm/qspinlock_paravirt.h | 5 ++ arch/powerpc/platforms/pseries/Kconfig| 5 ++ arch/powerpc

[PATCH 4/8] powerpc: move spinlock implementation to simple_spinlock

2020-07-02 Thread Nicholas Piggin
To prepare for queued spinlocks. This is a simple rename except to update preprocessor guard name and a file reference. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/simple_spinlock.h| 292 ++ .../include/asm/simple_spinlock_types.h | 21 ++ arch/powerpc

Re: [PATCH 5/8] powerpc/64s: implement queued spinlocks and rwlocks

2020-07-02 Thread Nicholas Piggin
Excerpts from Will Deacon's message of July 2, 2020 6:02 pm: > On Thu, Jul 02, 2020 at 05:48:36PM +1000, Nicholas Piggin wrote: >> diff --git a/arch/powerpc/include/asm/qspinlock.h >> b/arch/powerpc/include/asm/qspinlock.h >> new file mode 100644 >> index 00

Re: [PATCH 2/8] powerpc/pseries: use smp_rmb() in H_CONFER spin yield

2020-07-02 Thread Nicholas Piggin
Excerpts from Peter Zijlstra's message of July 2, 2020 6:28 pm: > On Thu, Jul 02, 2020 at 05:48:33PM +1000, Nicholas Piggin wrote: >> There is no need for rmb(), this allows faster lwsync here. > > Since you determined this; I'm thinking you actually understand the &

Re: [PATCH 5/8] powerpc/64s: implement queued spinlocks and rwlocks

2020-07-02 Thread Nicholas Piggin
Excerpts from Will Deacon's message of July 2, 2020 8:35 pm: > On Thu, Jul 02, 2020 at 08:25:43PM +1000, Nicholas Piggin wrote: >> Excerpts from Will Deacon's message of July 2, 2020 6:02 pm: >> > On Thu, Jul 02, 2020 at 05:48:36PM +1000, Nicholas Piggin wrote: >

Re: [PATCH v2 4/4] mm/vmalloc: Hugepage vmalloc mappings

2020-07-02 Thread Nicholas Piggin
Excerpts from Zefan Li's message of July 1, 2020 5:10 pm: >> static void *__vmalloc_node(unsigned long size, unsigned long align, >> -gfp_t gfp_mask, pgprot_t prot, >> -int node, const void *caller); >> +gfp_t gfp_mask, pgprot_t p

[PATCH v2 2/6] powerpc/pseries: move some PAPR paravirt functions to their own file

2020-07-03 Thread Nicholas Piggin
Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/paravirt.h | 61 + arch/powerpc/include/asm/spinlock.h | 24 +--- arch/powerpc/lib/locks.c| 12 +++--- 3 files changed, 68 insertions(+), 29 deletions(-) create mode 100644 arch/powerpc

[PATCH v2 1/6] powerpc/powernv: must include hvcall.h to get PAPR defines

2020-07-03 Thread Nicholas Piggin
An include goes away in future patches which breaks compilation without this. Signed-off-by: Nicholas Piggin --- arch/powerpc/platforms/powernv/pci-ioda-tce.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/platforms/powernv/pci-ioda-tce.c b/arch/powerpc/platforms/powernv/pci

[PATCH v2 4/6] powerpc/64s: implement queued spinlocks and rwlocks

2020-07-03 Thread Nicholas Piggin
. Signed-off-by: Nicholas Piggin --- arch/powerpc/Kconfig | 13 arch/powerpc/include/asm/Kbuild | 2 ++ arch/powerpc/include/asm/qspinlock.h | 25 +++ arch/powerpc/include/asm/spinlock.h | 5 + arch/powerpc/include

[PATCH v2 3/6] powerpc: move spinlock implementation to simple_spinlock

2020-07-03 Thread Nicholas Piggin
To prepare for queued spinlocks. This is a simple rename except to update preprocessor guard name and a file reference. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/simple_spinlock.h| 292 ++ .../include/asm/simple_spinlock_types.h | 21 ++ arch/powerpc

[PATCH v2 0/6] powerpc: queued spinlocks and rwlocks

2020-07-03 Thread Nicholas Piggin
v2 is updated to account for feedback from Will, Peter, and Waiman (thank you), and trims off a couple of RFC and unrelated patches. Thanks, Nick Nicholas Piggin (6): powerpc/powernv: must include hvcall.h to get PAPR defines powerpc/pseries: move some PAPR paravirt functions to their own

[PATCH v2 5/6] powerpc/pseries: implement paravirt qspinlocks for SPLPAR

2020-07-03 Thread Nicholas Piggin
Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/paravirt.h | 28 ++ arch/powerpc/include/asm/qspinlock.h | 55 +++ arch/powerpc/include/asm/qspinlock_paravirt.h | 5 ++ arch/powerpc/platforms/pseries/Kconfig| 5 ++ arch/powerpc

[PATCH v2 6/6] powerpc/qspinlock: optimised atomic_try_cmpxchg_lock that adds the lock hint

2020-07-03 Thread Nicholas Piggin
This brings the behaviour of the uncontended fast path back to roughly equivalent to simple spinlocks -- a single atomic op with lock hint. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/atomic.h| 28 arch/powerpc/include/asm/qspinlock.h | 2 +- 2

Re: [PATCH] ring-buffer: speed up buffer resets by avoiding synchronize_rcu for each CPU

2020-06-29 Thread Nicholas Piggin
Excerpts from Steven Rostedt's message of June 30, 2020 8:16 am: > On Thu, 25 Jun 2020 15:34:03 +1000 > Nicholas Piggin wrote: > >> Batch these up so we disable all the per-cpu buffers first, then >> synchronize_rcu() once, then reset each of the buffers. This brings

Re: wait_on_page_bit_common(TASK_KILLABLE, EXCLUSIVE) can miss wakeup?

2020-06-29 Thread Nicholas Piggin
Excerpts from Oleg Nesterov's message of June 30, 2020 12:02 am: > On 06/29, Nicholas Piggin wrote: >> >> prepare_to_wait_event() has a pretty good pattern (and comment), I would >> favour using that (test the signal when inserting on the waitqueue). >> >> @@

Re: wait_on_page_bit_common(TASK_KILLABLE, EXCLUSIVE) can miss wakeup?

2020-06-29 Thread Nicholas Piggin
Excerpts from Linus Torvalds's message of June 30, 2020 2:36 am: > On Mon, Jun 29, 2020 at 6:16 AM Nicholas Piggin wrote: >> >> No, ignore this part (which you explained well it was just a thinko, >> and your patch of course would not have worked if this was the case)

Re: wait_on_page_bit_common(TASK_KILLABLE, EXCLUSIVE) can miss wakeup?

2020-06-30 Thread Nicholas Piggin
Excerpts from Oleg Nesterov's message of June 30, 2020 4:17 pm: > On 06/30, Nicholas Piggin wrote: >> Excerpts from Oleg Nesterov's message of June 30, 2020 12:02 am: >> > On 06/29, Nicholas Piggin wrote: >> >> >> >> prepare_to_wait_even

[PATCH] ring-buffer: speed up buffer resets by avoiding synchronize_rcu for each CPU

2020-06-24 Thread Nicholas Piggin
. Cc: Paul McKenney Cc: Anton Blanchard Cc: Steven Rostedt Cc: linux-kernel@vger.kernel.org Signed-off-by: Nicholas Piggin --- include/linux/ring_buffer.h | 1 + kernel/trace/ring_buffer.c | 85 +++-- kernel/trace/trace.c| 4 +- 3 files changed, 73

Re: [PATCH v3 0/6] powerpc: queued spinlocks and rwlocks

2020-07-07 Thread Nicholas Piggin
Excerpts from Waiman Long's message of July 8, 2020 1:33 pm: > On 7/7/20 1:57 AM, Nicholas Piggin wrote: >> Yes, powerpc could certainly get more performance out of the slow >> paths, and then there are a few parameters to tune. >> >> We don't have a good alte

Re: [RFC PATCH 4/7] x86: use exit_lazy_tlb rather than membarrier_mm_sync_core_before_usermode

2020-07-13 Thread Nicholas Piggin
Excerpts from Nicholas Piggin's message of July 13, 2020 2:45 pm: > Excerpts from Andy Lutomirski's message of July 11, 2020 3:04 am: >> Also, as it stands, I can easily see in_irq() ceasing to promise to >> serialize. There are older kernels for which it does not promise to >> serialize. And I h

Re: [RFC PATCH 4/7] x86: use exit_lazy_tlb rather than membarrier_mm_sync_core_before_usermode

2020-07-13 Thread Nicholas Piggin
Excerpts from Andy Lutomirski's message of July 14, 2020 1:48 am: > On Mon, Jul 13, 2020 at 7:13 AM Mathieu Desnoyers > wrote: >> >> - On Jul 13, 2020, at 9:47 AM, Nicholas Piggin npig...@gmail.com wrote: >> >> > Excerpts from Nicholas Piggin's messa

Re: [RFC PATCH 7/7] lazy tlb: shoot lazies, a non-refcounting lazy tlb option

2020-07-13 Thread Nicholas Piggin
Excerpts from Andy Lutomirski's message of July 14, 2020 1:59 am: > On Thu, Jul 9, 2020 at 6:57 PM Nicholas Piggin wrote: >> >> On big systems, the mm refcount can become highly contented when doing >> a lot of context switching with threaded applications (particularl

Re: [PATCH v2 0/3] Power10 basic energy management

2020-07-13 Thread Nicholas Piggin
Excerpts from Pratik Sampat's message of July 13, 2020 8:02 pm: > Thank you for your comments, > > On 13/07/20 10:53 am, Nicholas Piggin wrote: >> Excerpts from Pratik Rajesh Sampat's message of July 10, 2020 3:22 pm: >>> Changelog v1 --> v2: >>> 1.

Re: [PATCH v2 0/3] Power10 basic energy management

2020-07-13 Thread Nicholas Piggin
Excerpts from Gautham R Shenoy's message of July 13, 2020 8:48 pm: > On Mon, Jul 13, 2020 at 03:23:21PM +1000, Nicholas Piggin wrote: >> Excerpts from Pratik Rajesh Sampat's message of July 10, 2020 3:22 pm: >> > Changelog v1 --> v2: >> > 1. Save-restore DA

Re: [RFC PATCH 7/7] lazy tlb: shoot lazies, a non-refcounting lazy tlb option

2020-07-13 Thread Nicholas Piggin
Excerpts from Andy Lutomirski's message of July 14, 2020 4:18 am: > >> On Jul 13, 2020, at 9:48 AM, Nicholas Piggin wrote: >> >> Excerpts from Andy Lutomirski's message of July 14, 2020 1:59 am: >>>> On Thu, Jul 9, 2020 at 6:57 PM Nicholas Piggi

Re: [RFC PATCH 7/7] lazy tlb: shoot lazies, a non-refcounting lazy tlb option

2020-07-13 Thread Nicholas Piggin
Excerpts from Nicholas Piggin's message of July 14, 2020 3:04 pm: > Excerpts from Andy Lutomirski's message of July 14, 2020 4:18 am: >> >>> On Jul 13, 2020, at 9:48 AM, Nicholas Piggin wrote: >>> >>> Excerpts from Andy Lutomirski's message

[PATCH v7 00/12] huge vmalloc mappings

2020-08-25 Thread Nicholas Piggin
veral compile errors and warnings - Keep the page array and accounting in small page units because struct vm_struct is an interface (this should fix x86 vmap stack debug assert). [Thanks Zefan] Nicholas Piggin (12): mm/vmalloc: fix vmalloc_to_page for huge vmap mappings mm: apply_to_pte_

[PATCH v7 04/12] mm/ioremap: rename ioremap_*_range to vmap_*_range

2020-08-25 Thread Nicholas Piggin
This will be used as a generic kernel virtual mapping function, so re-name it in preparation. Signed-off-by: Nicholas Piggin --- mm/ioremap.c | 64 +++- 1 file changed, 33 insertions(+), 31 deletions(-) diff --git a/mm/ioremap.c b/mm/ioremap.c

[PATCH v7 02/12] mm: apply_to_pte_range warn and fail if a large pte is encountered

2020-08-25 Thread Nicholas Piggin
apply_to_pte_range might mistake a large pte for bad, or treat it as a page table, resulting in a crash or corruption. Add a test to warn and return error if large entries are found. Signed-off-by: Nicholas Piggin --- mm/memory.c | 60 +++-- 1

[PATCH v7 03/12] mm/vmalloc: rename vmap_*_range vmap_pages_*_range

2020-08-25 Thread Nicholas Piggin
The vmalloc mapper operates on a struct page * array rather than a linear physical address, re-name it to make this distinction clear. Signed-off-by: Nicholas Piggin --- mm/vmalloc.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c

[PATCH v7 01/12] mm/vmalloc: fix vmalloc_to_page for huge vmap mappings

2020-08-25 Thread Nicholas Piggin
pings") Signed-off-by: Nicholas Piggin --- mm/vmalloc.c | 41 ++--- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index b482d240f9a2..4e9b21adc73d 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -36,7 +36,7 @@

[PATCH v7 10/12] mm/vmalloc: add vmap_range_noflush variant

2020-08-25 Thread Nicholas Piggin
As a side-effect, the order of flush_cache_vmap() and arch_sync_kernel_mappings() calls are switched, but that now matches the other callers in this file. Signed-off-by: Nicholas Piggin --- mm/vmalloc.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/mm

[PATCH v7 05/12] mm: HUGE_VMAP arch support cleanup

2020-08-25 Thread Nicholas Piggin
d.org Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: x...@kernel.org Cc: "H. Peter Anvin" Signed-off-by: Nicholas Piggin --- Ack or objection from arch maintainers if this goes via the -mm tree? arch/arm64/include/asm/vmalloc.h | 8 +++ arch

[PATCH v7 06/12] powerpc: inline huge vmap supported functions

2020-08-25 Thread Nicholas Piggin
This allows unsupported levels to be constant folded away, and so p4d_free_pud_page can be removed because it's no longer linked to. Cc: linuxppc-...@lists.ozlabs.org Signed-off-by: Nicholas Piggin --- Ack or objection if this goes via the -mm tree? arch/powerpc/include/asm/vmal

[PATCH v7 07/12] arm64: inline huge vmap supported functions

2020-08-25 Thread Nicholas Piggin
This allows unsupported levels to be constant folded away, and so p4d_free_pud_page can be removed because it's no longer linked to. Cc: Catalin Marinas Cc: Will Deacon Cc: linux-arm-ker...@lists.infradead.org Signed-off-by: Nicholas Piggin --- Ack or objection if this goes via the -mm

[PATCH v7 09/12] mm: Move vmap_range from mm/ioremap.c to mm/vmalloc.c

2020-08-25 Thread Nicholas Piggin
This is a generic kernel virtual memory mapper, not specific to ioremap. Signed-off-by: Nicholas Piggin --- include/linux/vmalloc.h | 3 + mm/ioremap.c| 197 mm/vmalloc.c| 196 +++ 3 files

[PATCH v7 08/12] x86: inline huge vmap supported functions

2020-08-25 Thread Nicholas Piggin
This allows unsupported levels to be constant folded away, and so p4d_free_pud_page can be removed because it's no longer linked to. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: x...@kernel.org Cc: "H. Peter Anvin" Signed-off-by: Nicholas Piggin --- Ack or ob

[PATCH v7 12/12] powerpc/64s/radix: Enable huge vmalloc mappings

2020-08-25 Thread Nicholas Piggin
Cc: linuxppc-...@lists.ozlabs.org Signed-off-by: Nicholas Piggin --- Documentation/admin-guide/kernel-parameters.txt | 2 ++ arch/powerpc/Kconfig| 1 + 2 files changed, 3 insertions(+) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation

[PATCH v7 11/12] mm/vmalloc: Hugepage vmalloc mappings

2020-08-25 Thread Nicholas Piggin
ces CPU cycles by 0.54%. This can result in more internal fragmentation and memory overhead for a given allocation, an option nohugevmalloc is added to disable at boot. Signed-off-by: Nicholas Piggin --- arch/Kconfig| 4 + include/linux/vmalloc.h | 1 + mm/page_alloc.c |

Re: [PATCH 01/24] asm-generic: add generic versions of mmu context functions

2020-08-26 Thread Nicholas Piggin
Excerpts from Vineet Gupta's message of July 28, 2020 2:01 pm: > On 7/27/20 8:33 PM, Nicholas Piggin wrote: >> Many of these are no-ops on many architectures, so extend mmu_context.h >> to cover MMU and NOMMU, and split the NOMMU bits out to nommu_context.h >> > >

Re: [PATCH 04/24] arm: use asm-generic/mmu_context.h for no-op implementations

2020-08-26 Thread Nicholas Piggin
Excerpts from Vineet Gupta's message of July 28, 2020 2:14 pm: > On 7/27/20 8:33 PM, Nicholas Piggin wrote: >> Cc: Russell King >> Cc: linux-arm-ker...@lists.infradead.org >> Signed-off-by: Nicholas Piggin >> --- >> arch/arm/include/asm/mmu_context.h | 26

Re: [PATCH 14/24] openrisc: use asm-generic/mmu_context.h for no-op implementations

2020-08-26 Thread Nicholas Piggin
Excerpts from Stafford Horne's message of July 29, 2020 9:45 pm: > On Tue, Jul 28, 2020 at 01:33:55PM +1000, Nicholas Piggin wrote: >> Cc: Jonas Bonn >> Cc: Stefan Kristiansson >> Cc: Stafford Horne >> Cc: openr...@lists.librecores.org >> Signed-off-by: Nic

[PATCH v2 01/23] asm-generic: add generic MMU versions of mmu context functions

2020-08-26 Thread Nicholas Piggin
Many of these are no-ops on many architectures, so extend mmu_context.h to cover MMU and NOMMU, and split the NOMMU bits out to nommu_context.h Cc: Arnd Bergmann Cc: linux-a...@vger.kernel.org Signed-off-by: Nicholas Piggin --- arch/microblaze/include/asm/mmu_context.h | 2 +- arch/sh/include

[PATCH v2 11/23] mips: use asm-generic/mmu_context.h for no-op implementations

2020-08-26 Thread Nicholas Piggin
Cc: Thomas Bogendoerfer Cc: linux-m...@vger.kernel.org Signed-off-by: Nicholas Piggin --- arch/mips/include/asm/mmu_context.h | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/arch/mips/include/asm/mmu_context.h b/arch/mips/include/asm/mmu_context.h index

[PATCH v2 09/23] m68k: use asm-generic/mmu_context.h for no-op implementations

2020-08-26 Thread Nicholas Piggin
Cc: Geert Uytterhoeven Cc: linux-m...@lists.linux-m68k.org Signed-off-by: Nicholas Piggin --- arch/m68k/include/asm/mmu_context.h | 47 + 1 file changed, 8 insertions(+), 39 deletions(-) diff --git a/arch/m68k/include/asm/mmu_context.h b/arch/m68k/include/asm

[PATCH v2 12/23] nds32: use asm-generic/mmu_context.h for no-op implementations

2020-08-26 Thread Nicholas Piggin
Cc: Nick Hu Cc: Greentime Hu Cc: Vincent Chen Signed-off-by: Nicholas Piggin --- arch/nds32/include/asm/mmu_context.h | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/arch/nds32/include/asm/mmu_context.h b/arch/nds32/include/asm/mmu_context.h index b8fd3d189fdc

[PATCH v2 13/23] nios2: use asm-generic/mmu_context.h for no-op implementations

2020-08-26 Thread Nicholas Piggin
Cc: Ley Foon Tan Signed-off-by: Nicholas Piggin --- arch/nios2/include/asm/mmu_context.h | 21 - 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/arch/nios2/include/asm/mmu_context.h b/arch/nios2/include/asm/mmu_context.h index 78ab3dacf579..4f99ed09b5a7

[PATCH v2 20/23] sparc: use asm-generic/mmu_context.h for no-op implementations

2020-08-26 Thread Nicholas Piggin
Cc: "David S. Miller" Cc: sparcli...@vger.kernel.org Signed-off-by: Nicholas Piggin --- arch/sparc/include/asm/mmu_context_32.h | 10 -- arch/sparc/include/asm/mmu_context_64.h | 10 +- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/arch/sparc/i

<    1   2   3   4   5   6   7   8   9   10   >