[PATCH v2 0/9] improve early structure allocations (paca, lppaca, etc)

2017-08-12 Thread Nicholas Piggin
I last posted this series here, http://marc.info/?l=linuxppc-embedded=150068630827162=2 Since then it's become apparent that NUMA allocation support was not quite right and will require some fiddly rejigging of the early dt parsing to make it work. So I've dropped those NUMA patches from the

[PATCH v2 1/9] KVM: PPC: Book3S HV: Fix H_REGISTER_VPA VPA size validation

2017-08-12 Thread Nicholas Piggin
KVM currently validates the size of the VPA registered by the client against sizeof(struct lppaca), however we align (and therefore size) that struct to 1kB to avoid crossing a 4kB boundary in the client. PAPR calls for sizes >= 640 bytes to be accepted. Hard code this with a comment.

[PATCH v2 2/9] powerpc/powernv: powernv platform is not constrained by RMA

2017-08-12 Thread Nicholas Piggin
Remove incorrect comment about real mode address restrictions on powernv (bare metal), and unnecessary clamping to ppc64_rma_size. Signed-off-by: Nicholas Piggin --- arch/powerpc/platforms/powernv/opal.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git

[PATCH v2 3/9] powerpc/powernv: Remove real mode access limit for early allocations

2017-08-12 Thread Nicholas Piggin
This removes the RMA limit on powernv platform, which constrains early allocations such as PACAs and stacks. There are still other restrictions that must be followed, such as bolted SLB limits, but real mode addressing has no constraints. Signed-off-by: Nicholas Piggin ---

[PATCH v2 5/9] powerpc/64s: Relax PACA address limitations

2017-08-12 Thread Nicholas Piggin
Book3S radix-mode has no SLB interrupt limitation, and hash-mode has a 1T limitation on modern CPUs, so PACA allocation limits can be lifted. Update the paca alloation limits. Share TLB/SLB calculation with the stack allocation code. Signed-off-by: Nicholas Piggin ---

[PATCH v2 4/9] powerpc/64s/radix: Remove bolted-SLB address limit for per-cpu stacks

2017-08-12 Thread Nicholas Piggin
Radix MMU does not take SLB or TLB interrupts when accessing kernel linear address. Remove this restriction for radix mode. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/setup_64.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git

[PATCH v2 8/9] powerpc/64: Use a table of paca pointers and allocate pacas individually

2017-08-12 Thread Nicholas Piggin
Change the paca array into an array of pointers to pacas. Allocate pacas individually. This allows flexibility in where the PACAs are allocated. Future work will allocate them node-local. Platforms that don't have address limits on PACAs would be able to defer PACA allocations until later in boot

[PATCH v2 7/9] powerpc/64s: do not allocate lppaca if we are not virtualized

2017-08-12 Thread Nicholas Piggin
The "lppaca" is a structure registered with the hypervisor. This is unnecessary when running on non-virtualised platforms. One field from the lppaca (pmcregs_in_use) is also used by the host, so move the host part out into the paca (lppaca field is still updated in guest mode). Signed-off-by:

[PATCH v2 6/9] powerpc/64s/radix: Do not allocate SLB shadow structures

2017-08-12 Thread Nicholas Piggin
These are unused in radix mode. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/paca.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c index 64401f551765..354a955ca377 100644 ---

[PATCH v2 9/9] powerpc/64: Use a table of lppaca pointers and allocate lppacas individually

2017-08-12 Thread Nicholas Piggin
Similary to the previous patch, allocate LPPACAs individually. We no longer allocate lppacas in an array, so this patch removes the 1kB static alignment for the structure, and enforce the PAPR alignment requirements at allocation time. We can not reduce the 1kB allocation size however, due to

Re: [PATCH] rtc: rtctest: Improve support detection

2017-08-12 Thread Alexandre Belloni
Hi, On 11/08/2017 at 11:14:55 +0200, Lukáš Doktor wrote: > The rtc-generic and opal-rtc are failing to run this test as they do not > support all the features. Let's treat the error returns and skip to the > following test. > > Theoretically the test_DATE should be also adjusted, but as it's

Re: [PATCH v2 2/3] livepatch: send a fake signal to all blocking tasks

2017-08-12 Thread Jiri Kosina
On Fri, 11 Aug 2017, Josh Poimboeuf wrote: > > + read_lock(_lock); > > + for_each_process_thread(g, task) { > > + if (!klp_patch_pending(task)) > > + continue; > > + > > + /* > > +* There is a small race here. We could see TIF_PATCH_PENDING >