Re: [PATCH 12/12] leds: Only descend into leds directory when CONFIG_NEW_LEDS is set

2016-06-14 Thread Jacek Anaszewski
Hi Andrew, Thanks for the patch. Please address the issue [1] raised by test bot and resubmit. Thanks, Jacek Anaszewski [1] https://lkml.org/lkml/2016/6/13/1091 On 06/13/2016 10:02 PM, Andrew F. Davis wrote: When CONFIG_NEW_LEDS is not set make will still descend into the leds directory but

[PATCH 2/2] powerpc: tm: Always reclaim in start_thread() for exec() class syscalls

2016-06-14 Thread Cyril Bur
Userspace can quite legitimately perform an exec() syscall with a suspended transaction. exec() does not return to the old process, rather it load a new one and starts that, the expectation therefore is that the new process starts not in a transaction. Currently exec() is not treated any differentl

[PATCH 1/2] selftests/powerpc: exec() with suspended transaction

2016-06-14 Thread Cyril Bur
Perform an exec() class syscall with a suspended transaction. Signed-off-by: Cyril Bur --- tools/testing/selftests/powerpc/tm/Makefile | 3 +- tools/testing/selftests/powerpc/tm/tm-exec.c| 55 + tools/testing/selftests/powerpc/tm/tm-execed.c | 47 +++

Re: [v6, 07/11] powerpc/powernv: set power_save func after the idle states are initialized

2016-06-14 Thread Shreyas B Prabhu
On 06/15/2016 11:11 AM, Michael Ellerman wrote: > On Wed, 2016-08-06 at 16:54:27 UTC, "Shreyas B. Prabhu" wrote: >> pnv_init_idle_states discovers supported idle states from the >> device tree and does the required initialization. Set power_save >> function pointer only after this initialization

Re: [V2][PATCH] New MMU feature for new hpte format in ISA3

2016-06-14 Thread Aneesh Kumar K.V
Balbir Singh writes: > On 15/06/16 10:38, Balbir Singh wrote: >> >> Thanks for a review, I'll do a V2 with some changes >> >> Balbir >> > > Michael, please review and check if you like the #ifdef, > since we are crossing the 32 bit boundary, I've used a > conditional define to select the featur

Re: [v6, 07/11] powerpc/powernv: set power_save func after the idle states are initialized

2016-06-14 Thread Michael Ellerman
On Wed, 2016-08-06 at 16:54:27 UTC, "Shreyas B. Prabhu" wrote: > pnv_init_idle_states discovers supported idle states from the > device tree and does the required initialization. Set power_save > function pointer only after this initialization is done This looks like a bug fix? Or is this not a co

Re: [v6, 03/11] powerpc/powernv: Rename idle_power7.S to idle_power_common.S

2016-06-14 Thread Michael Ellerman
On Wed, 2016-08-06 at 16:54:23 UTC, "Shreyas B. Prabhu" wrote: > idle_power7.S handles idle entry/exit for POWER7, POWER8 and in next > patch for POWER9. Rename the file to a non-hardware specific > name. It's not common for all powerpc CPUs though. So can you call it something other than just "co

[V2][PATCH] New MMU feature for new hpte format in ISA3

2016-06-14 Thread Balbir Singh
On 15/06/16 10:38, Balbir Singh wrote: > > Thanks for a review, I'll do a V2 with some changes > > Balbir > Michael, please review and check if you like the #ifdef, since we are crossing the 32 bit boundary, I've used a conditional define to select the feature. Changelog v2: The new fe

Re: [PATCH v6 10/11] cpuidle/powernv: Add support for POWER ISA v3 idle states

2016-06-14 Thread Shreyas B Prabhu
On 06/14/2016 04:59 PM, Benjamin Herrenschmidt wrote: > On Tue, 2016-06-14 at 16:17 +0530, Shreyas B Prabhu wrote: > >> >> I ignored adding this check because this is part of initcall and we are >> unlikely to run out of memory at this state. But I'll add the check in >> next version. > > Why d

Re: [PATCH kernel 9/9] KVM: PPC: VFIO device: support SPAPR TCE

2016-06-14 Thread David Gibson
On Tue, Jun 14, 2016 at 01:30:53PM +1000, Alexey Kardashevskiy wrote: > On 10/06/16 16:50, David Gibson wrote: > > On Thu, Jun 09, 2016 at 04:47:59PM +1000, Alexey Kardashevskiy wrote: > >> On 23/03/16 14:03, David Gibson wrote: > >>> On Tue, Mar 22, 2016 at 11:34:55AM +1100, Alexey Kardashevskiy w

Re: [PATCH] New MMU feature for new hpte format in ISA3

2016-06-14 Thread Balbir Singh
On Wed, Jun 15, 2016 at 2:51 AM, Aneesh Kumar K.V wrote: > Balbir Singh writes: > >> This patch has been lightly tested and needs testing >> on additional platforms and different page sizes, largely >> due to the mmu_features changes noted below >> >> Commit 50de596de introduced support for the n

Re: [PATCH] New MMU feature for new hpte format in ISA3

2016-06-14 Thread kbuild test robot
Hi, [auto build test ERROR on v4.7-rc3] [also build test ERROR on next-20160614] [cannot apply to powerpc/next] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Balbir-Singh/New-MMU-feature-for

Re: [PATCH] New MMU feature for new hpte format in ISA3

2016-06-14 Thread Aneesh Kumar K.V
Balbir Singh writes: > This patch has been lightly tested and needs testing > on additional platforms and different page sizes, largely > due to the mmu_features changes noted below > > Commit 50de596de introduced support for the new PTE > format in the functions hpte_encode_r and hpte_encode_avp

[PATCH] hsi: Build hsi_boardinfo.c into hsi core if enabled

2016-06-14 Thread Andrew F. Davis
If the HSI core is built as a module hsi_boardinfo may still be built-in as its Kconfig type is bool, which can cause build issues. Fix this by building this code into the HSI core when enabled. Reported-by: kbuild test robot Signed-off-by: Andrew F. Davis --- This build error seems to be due to

[PATCH] New MMU feature for new hpte format in ISA3

2016-06-14 Thread Balbir Singh
This patch has been lightly tested and needs testing on additional platforms and different page sizes, largely due to the mmu_features changes noted below Commit 50de596de introduced support for the new PTE format in the functions hpte_encode_r and hpte_encode_avpn. This patch abstracts the chang

Re: [v5, 1/2] cxl: Add mechanism for delivering AFU driver specific events

2016-06-14 Thread Matthew R. Ochs
Hi Philippe, So I think we're largely okay with this revision. I made one comment below with respect to the name of the event retrieval callback. -matt > On May 23, 2016, at 7:49 AM, Philippe Bergheaud > wrote: > > This adds an afu_driver_ops structure with deliver_event() and > event_delive

[PATCH v2 4/9] powerpc: Factor out relocation code from module_64.c to elf_util_64.c.

2016-06-14 Thread Thiago Jung Bauermann
The kexec_file_load system call needs to relocate the purgatory, so factor out the module relocation code so that it can be shared. This patch's purpose is to move the ELF relocation logic from apply_relocate_add to elf_util_64.c with as few changes as possible. The following changes were needed:

[PATCH v2 7/9] powerpc: Implement kexec_file_load.

2016-06-14 Thread Thiago Jung Bauermann
Adds the basic machinery needed by kexec_file_load. Signed-off-by: Josh Sklar Signed-off-by: Thiago Jung Bauermann Cc: ke...@lists.infradead.org Cc: linux-ker...@vger.kernel.org --- arch/powerpc/Kconfig | 13 + arch/powerpc/include/asm/systbl.h | 1 + arch/powerp

[PATCH v2 9/9] powerpc: Add purgatory for kexec_file_load implementation.

2016-06-14 Thread Thiago Jung Bauermann
This purgatory implementation comes from kexec-tools, almost unchanged. The only changes were that the sha256_regions global variable was renamed to sha_regions to match what kexec_file_load expects, and to use the sha256.c file from x86's purgatory to avoid adding yet another SHA-256 implementati

[PATCH v2 6/9] powerpc: Add functions to read ELF files of any endianness.

2016-06-14 Thread Thiago Jung Bauermann
A little endian kernel might need to kexec a big endian kernel (the opposite is less likely but could happen as well), so we can't just cast the buffer with the binary to ELF structs and use them as is done elsewhere. This patch adds functions which do byte-swapping as necessary when populating th

[PATCH v2 8/9] powerpc: Add support for loading ELF kernels with kexec_file_load.

2016-06-14 Thread Thiago Jung Bauermann
This uses all the infrastructure built up by the previous patches in the series to load an ELF vmlinux file and an initrd. It uses the flattened device tree at initial_boot_params as a base and adjusts memory reservations and its /chosen node for the next kernel. elf64_apply_relocate_add was exten

[PATCH v2 5/9] powerpc: Generalize elf64_apply_relocate_add.

2016-06-14 Thread Thiago Jung Bauermann
When apply_relocate_add is called, modules are already loaded at their final location in memory so Elf64_Shdr.sh_addr can be used for accessing the section contents as well as the base address for relocations. This is not the case for kexec's purgatory, because it will only be copied to its final

[PATCH v2 3/9] kexec_file: Factor out kexec_locate_mem_hole from kexec_add_buffer.

2016-06-14 Thread Thiago Jung Bauermann
kexec_locate_mem_hole will be used by the PowerPC kexec_file_load implementation to find free memory for the purgatory stack. Signed-off-by: Thiago Jung Bauermann Cc: Eric Biederman Cc: Dave Young Cc: ke...@lists.infradead.org Cc: linux-ker...@vger.kernel.org --- include/linux/kexec.h | 4 +++

[PATCH v2 2/9] kexec_file: Generalize kexec_add_buffer.

2016-06-14 Thread Thiago Jung Bauermann
Allow architectures to specify different memory walking functions for kexec_add_buffer. Intel uses iomem to track reserved memory ranges, but PowerPC uses the memblock subsystem. Signed-off-by: Thiago Jung Bauermann Cc: Eric Biederman Cc: Dave Young Cc: ke...@lists.infradead.org Cc: linux-ker..

[PATCH v2 1/9] kexec_file: Remove unused members from struct kexec_buf.

2016-06-14 Thread Thiago Jung Bauermann
kexec_add_buffer uses kexec_buf.buffer and kexec_buf.bufsz to pass along its own arguments buffer and bufsz, but since they aren't used anywhere else, it's pointless. Signed-off-by: Thiago Jung Bauermann Cc: Eric Biederman Cc: ke...@lists.infradead.org Cc: linux-ker...@vger.kernel.org Acked-by:

[PATCH v2 0/9] kexec_file_load implementation for PowerPC

2016-06-14 Thread Thiago Jung Bauermann
Hello, This patch series implements the kexec_file_load system call on PowerPC. It starts by removing an x86 assumption from kexec_file: kexec_add_buffer uses iomem to find reserved memory ranges, but PowerPC uses the memblock subsystem. A hook is added so that each arch can specify how memory ra

Re: [v5, 1/2] cxl: Add mechanism for delivering AFU driver specific events

2016-06-14 Thread Matthew R. Ochs
Vaibhav/Philippe, Finally getting back around to looking at this. -matt > On May 25, 2016, at 2:22 AM, Vaibhav Jain wrote: > > Hi Matt, > > "Matthew R. Ochs" writes: >> The purpose for the count is so the AFU driver is only called when it >> has something to send. Otherwise we don't want to

Re: [PATCH 2/2] perf annotate: add powerpc support

2016-06-14 Thread Arnaldo Carvalho de Melo
Em Tue, Jun 14, 2016 at 01:40:47PM +1000, Michael Ellerman escreveu: > On Fri, 2016-06-10 at 20:08 +0530, Naveen N. Rao wrote: > > On 2016/06/10 10:36AM, Arnaldo Carvalho de Melo wrote: > > > Em Fri, Jun 10, 2016 at 06:32:51PM +0530, Naveen N. Rao escreveu: > > > > Convert ins__find() to a __weak f

Re: [PATCH v6 10/11] cpuidle/powernv: Add support for POWER ISA v3 idle states

2016-06-14 Thread Benjamin Herrenschmidt
<1465404871-5406-11-git-send-email-shre...@linux.vnet.ibm.com> <1465854492.3022.30.ca...@au1.ibm.com> <575fe64c.9080...@linux.vnet.ibm.com> Organization: IBM Australia Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.20.3 (3.20.3-1.fc24) Mime-Ve

Re: [PATCH v6 10/11] cpuidle/powernv: Add support for POWER ISA v3 idle states

2016-06-14 Thread Benjamin Herrenschmidt
On Tue, 2016-06-14 at 16:17 +0530, Shreyas B Prabhu wrote: > > I ignored adding this check because this is part of initcall and we are > unlikely to run out of memory at this state. But I'll add the check in > next version. Why do you malloc the u64 array and not the string pointer array ? Shoul

Re: [PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU

2016-06-14 Thread Peter Zijlstra
On Tue, Jun 07, 2016 at 08:44:03PM +0530, Gautham R. Shenoy wrote: I'm still puzzled why we don't see this on x86. Afaict there's nothing PPC specific about this. > This patch sets the affinity of the worker to > a) the only online CPU in the cpumask of the worker pool when it comes >online.

Re: Rational for having CONFIG_FB_RADEON=m

2016-06-14 Thread Benjamin Herrenschmidt
On Tue, 2016-06-14 at 13:26 +1000, Michael Ellerman wrote: > On Mon, 2016-06-13 at 17:46 +0200, Mathieu Malaterre wrote: > > > 2. Try to fix `radeonfb` so that it is able to kick offb out of the > > way. Eg: https://lists.freedesktop.org/archives/dri-devel/2010-Augu > > st/002907.html > > > > Fro

Re: [PATCH v6 10/11] cpuidle/powernv: Add support for POWER ISA v3 idle states

2016-06-14 Thread Shreyas B Prabhu
On 06/14/2016 03:18 AM, Benjamin Herrenschmidt wrote: > On Wed, 2016-06-08 at 11:54 -0500, Shreyas B. Prabhu wrote: >> >> /* >> * States for dedicated partition case. >> */ >> @@ -167,6 +183,8 @@ static int powernv_add_idle_states(void) >> int nr_idle_states = 1; /* Snooze */ >> in

Re: [PATCH v6 10/11] cpuidle/powernv: Add support for POWER ISA v3 idle states

2016-06-14 Thread Shreyas B Prabhu
On 06/13/2016 09:04 PM, Daniel Lezcano wrote: > On Wed, Jun 08, 2016 at 11:54:30AM -0500, Shreyas B. Prabhu wrote: >> POWER ISA v3 defines a new idle processor core mechanism. In summary, >> a) new instruction named stop is added. >> b) new per thread SPR named PSSCR is added which controls the

Re: [V2, 08/10] powerpc/mm: Clear top 16 bits of va only on older cpus

2016-06-14 Thread Aneesh Kumar K.V
Michael Ellerman writes: > On Thu, 2016-09-06 at 06:19:15 UTC, "Aneesh Kumar K.V" wrote: >> Updated patch below. MMU_FTRS_POWER4 is inherited by others, hence don't >> update that. >> >> >From 4ed66fd24dc4f976969cc34aca8df2ddbc69fe61 Mon Sep 17 00:00:00 2001 >> From: "Aneesh Kumar K.V" >> Date:

Re: [PATCH 01/12] gpio: Only descend into gpio directory when CONFIG_GPIOLIB is set

2016-06-14 Thread Linus Walleij
On Mon, Jun 13, 2016 at 10:02 PM, Andrew F. Davis wrote: > When CONFIG_GPIOLIB is not set make will still descend into the gpio > directory but nothing will be built. This produces unneeded build > artifacts and messages in addition to slowing the build. Fix this here. > > Signed-off-by: Andrew F

[RFC PATCH V1 10/10] powerpc/mm: Catch the usage of cpu/mmu_has_feature before jump label init

2016-06-14 Thread Aneesh Kumar K.V
This enable us to catch the wrong usage of cpu_has_feature and mmu_has_feature in the code. We need to use the feature bit based check in show_regs because that is used in the reporting code. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/cpufeatures.h | 6 ++ arch/powerpc/inc

[RFC PATCH V1 09/10] powerpc: use jump label for mmu_has_feature

2016-06-14 Thread Aneesh Kumar K.V
From: Kevin Hao The mmu features are fixed once the probe of mmu features are done. And the function mmu_has_feature() does be used in some hot path. The checking of the mmu features for each time of invoking of mmu_has_feature() seems suboptimal. This tries to reduce this overhead of this check

[RFC PATCH V1 08/10] powerpc: use the jump label for cpu_has_feature

2016-06-14 Thread Aneesh Kumar K.V
From: Kevin Hao The cpu features are fixed once the probe of cpu features are done. And the function cpu_has_feature() does be used in some hot path. The checking of the cpu features for each time of invoking of cpu_has_feature() seems suboptimal. This tries to reduce this overhead of this check

[RFC PATCH V1 06/10] powerpc: kill mfvtb()

2016-06-14 Thread Aneesh Kumar K.V
From: Kevin Hao This function is only used by get_vtb(). They are almost the same except the reading from the real register. Move the mfspr() to get_vtb() and kill the function mfvtb(). With this, we can eliminate the use of cpu_has_feature() in very core header file like reg.h. This is a prepara

[RFC PATCH V1 07/10] powerpc: move the cpu_has_feature to a separate file

2016-06-14 Thread Aneesh Kumar K.V
From: Kevin Hao We plan to use jump label for cpu_has_feature. In order to implement this we need to include the linux/jump_label.h in asm/cputable.h. But it seems that asm/cputable.h is so basic header file for ppc that it is almost included by all the other header files. The including of the li

[RFC PATCH V1 05/10] powerpc: Call jump_label_init early

2016-06-14 Thread Aneesh Kumar K.V
Call jump_label_init early so that can use static keys for cpu and mmu feature check. We should have finalzed all the cpu/mmu features when we call setup_system and we also did feature fixup for ASM based code. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/kernel/setup_32.c | 6 ++ arch/p

[RFC PATCH V1 04/10] jump_label: make it possible for the archs to invoke jump_label_init() much earlier

2016-06-14 Thread Aneesh Kumar K.V
From: Kevin Hao For some archs (such as powerpc) would want to invoke jump_label_init() in a much earlier stage. So check static_key_initialized in order to make sure this function run only once. Signed-off-by: Kevin Hao Signed-off-by: Aneesh Kumar K.V --- kernel/jump_label.c | 3 +++ 1 file

[RFC PATCH V1 03/10] powerpc/mm/radix: Add radix_set_pte to use in early init

2016-06-14 Thread Aneesh Kumar K.V
We want to use the static key based feature check in set_pte_at. Since we call radix__map_kernel_page early in boot before jump label is initialized we can't call set_pte_at there. Add radix__set_pte for the same. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/pgtable-radix.c | 23 +