Re: [PATCH] Extract initrd free logic from arch-specific code.

2018-03-29 Thread kbuild test robot
Hi Shea, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v4.16-rc7] [cannot apply to next-20180329] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https

Re: [PATCH] Extract initrd free logic from arch-specific code.

2018-03-29 Thread kbuild test robot
Hi Shea, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v4.16-rc7] [cannot apply to next-20180329] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https

Re: [PATCH] powerpc/boot: Remove duplicate typedefs from libfdt_env.h

2018-03-29 Thread Mark Greer
On Thu, Mar 29, 2018 at 07:22:50PM -0700, Mark Greer wrote: > On Tue, Mar 20, 2018 at 10:55:07AM +1100, Oliver wrote: > > Yeah that's pretty odd. It might be a bug in your specific version of > > GCC since I can't replicate it with this dumb test case: > > > > #include > > typedef unsigned int

Re: [PATCH] powerpc/boot: Remove duplicate typedefs from libfdt_env.h

2018-03-29 Thread Mark Greer
On Tue, Mar 20, 2018 at 10:55:07AM +1100, Oliver wrote: > On Tue, Mar 20, 2018 at 3:02 AM, Mark Greer wrote: > > On Mon, Mar 19, 2018 at 09:53:09AM +0100, Christophe LEROY wrote: > >> > >> > >> Le 16/03/2018 à 22:54, Mark Greer a écrit : > >> >When building a uImage or zImage using ppc6xx_defconfi

Re: RFC on writel and writel_relaxed

2018-03-29 Thread Benjamin Herrenschmidt
On Thu, 2018-03-29 at 09:56 -0400, Sinan Kaya wrote: > On 3/28/2018 11:55 AM, David Miller wrote: > > From: Benjamin Herrenschmidt > > Date: Thu, 29 Mar 2018 02:13:16 +1100 > > > > > Let's fix all archs, it's way easier than fixing all drivers. Half of > > > the archs are unused or dead anyway. >

[PATCH 2/2] powerpc/cpuidle: dynamically register/unregister cpuidle_device during hotplug

2018-03-29 Thread Pingfan Liu
Now for pseries, ../cpu/cpuX is created and deleted dynamically. Hence cpuX/cpuidle should be created and deleted dynamically. For powernv, it is harmless to use the same method. Signed-off-by: Pingfan Liu --- drivers/cpuidle/cpuidle-powernv.c | 2 ++ drivers/cpuidle/cpuidle-pseries.c | 2 ++ 2

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

2018-03-29 Thread Pingfan Liu
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 info of boot-cpu-hwid in dtb. This patch uses the interfac

Re: [PATCH] Extract initrd free logic from arch-specific code.

2018-03-29 Thread Rob Landley
On 03/29/2018 10:27 AM, Russell King - ARM Linux wrote: > On Thu, Mar 29, 2018 at 09:37:52AM +1100, Oliver wrote: >> On Thu, Mar 29, 2018 at 9:14 AM, Russell King - ARM Linux >>> LD_DEAD_CODE_DATA_ELIMINATION is a symbol without a prompt, and from >>> what I can see, nothing selects it. Therefore,

Re: [PATCH] Extract initrd free logic from arch-specific code.

2018-03-29 Thread Russell King - ARM Linux
On Thu, Mar 29, 2018 at 05:53:14PM +0100, Marc Zyngier wrote: > On Thu, 29 Mar 2018 16:58:27 +0100, > Russell King - ARM Linux wrote: > > > > On Thu, Mar 29, 2018 at 05:43:47PM +0200, Geert Uytterhoeven wrote: > > > On Thu, Mar 29, 2018 at 5:27 PM, Russell King - ARM Linux > > > wrote: > > > > On

Re: [PATCH] Extract initrd free logic from arch-specific code.

2018-03-29 Thread Rob Landley
On 03/28/2018 05:14 PM, Russell King - ARM Linux wrote: > On Wed, Mar 28, 2018 at 02:04:22PM -0500, Rob Landley wrote: >> >> >> On 03/28/2018 11:48 AM, Russell King - ARM Linux wrote: >>> On Wed, Mar 28, 2018 at 10:58:51AM -0500, Rob Landley wrote: On 03/28/2018 10:26 AM, Shea Levy wrote: >>

Re: [PATCH] Extract initrd free logic from arch-specific code.

2018-03-29 Thread Marc Zyngier
On Thu, 29 Mar 2018 18:32:47 +0100, Russell King - ARM Linux wrote: > > On Thu, Mar 29, 2018 at 05:53:14PM +0100, Marc Zyngier wrote: > > On Thu, 29 Mar 2018 16:58:27 +0100, > > Russell King - ARM Linux wrote: [...] > > > I'm not aware of there being an emulated UART in the guest's address > > >

Re: [PATCH] Extract initrd free logic from arch-specific code.

2018-03-29 Thread Russell King - ARM Linux
On Thu, Mar 29, 2018 at 11:39:24AM -0500, Rob Landley wrote: > > > On 03/28/2018 05:14 PM, Russell King - ARM Linux wrote: > > On Wed, Mar 28, 2018 at 02:04:22PM -0500, Rob Landley wrote: > >> > >> > >> On 03/28/2018 11:48 AM, Russell King - ARM Linux wrote: > >>> On Wed, Mar 28, 2018 at 10:58:51

Re: [PATCH] Extract initrd free logic from arch-specific code.

2018-03-29 Thread Marc Zyngier
On Thu, 29 Mar 2018 16:58:27 +0100, Russell King - ARM Linux wrote: > > On Thu, Mar 29, 2018 at 05:43:47PM +0200, Geert Uytterhoeven wrote: > > On Thu, Mar 29, 2018 at 5:27 PM, Russell King - ARM Linux > > wrote: > > > On Thu, Mar 29, 2018 at 09:37:52AM +1100, Oliver wrote: > > >> On Thu, Mar 29,

Re: [PATCH] Extract initrd free logic from arch-specific code.

2018-03-29 Thread Russell King - ARM Linux
On Thu, Mar 29, 2018 at 05:43:47PM +0200, Geert Uytterhoeven wrote: > On Thu, Mar 29, 2018 at 5:27 PM, Russell King - ARM Linux > wrote: > > On Thu, Mar 29, 2018 at 09:37:52AM +1100, Oliver wrote: > >> On Thu, Mar 29, 2018 at 9:14 AM, Russell King - ARM Linux > >> wrote: > >> > On Wed, Mar 28, 20

Re: [PATCH] Extract initrd free logic from arch-specific code.

2018-03-29 Thread Geert Uytterhoeven
On Thu, Mar 29, 2018 at 5:27 PM, Russell King - ARM Linux wrote: > On Thu, Mar 29, 2018 at 09:37:52AM +1100, Oliver wrote: >> On Thu, Mar 29, 2018 at 9:14 AM, Russell King - ARM Linux >> wrote: >> > On Wed, Mar 28, 2018 at 02:04:22PM -0500, Rob Landley wrote: >> >> On 03/28/2018 11:48 AM, Russell

Re: [PATCH] Extract initrd free logic from arch-specific code.

2018-03-29 Thread Russell King - ARM Linux
On Thu, Mar 29, 2018 at 09:37:52AM +1100, Oliver wrote: > On Thu, Mar 29, 2018 at 9:14 AM, Russell King - ARM Linux > wrote: > > On Wed, Mar 28, 2018 at 02:04:22PM -0500, Rob Landley wrote: > >> > >> > >> On 03/28/2018 11:48 AM, Russell King - ARM Linux wrote: > >> > On Wed, Mar 28, 2018 at 10:58:

[RFC PATCH] powerpc/64/kexec: fix race in kexec when XIVE is shutdown

2018-03-29 Thread Cédric Le Goater
The kexec_state KEXEC_STATE_IRQS_OFF barrier is reached by all secondary CPUs before the kexec_cpu_down() operation is called on secondaries. This can raise conflicts and provoque errors in the XIVE hcalls when XIVE is shutdowned with H_INT_RESET on the primary CPU. To synchronize the kexec_cpu_do

Re: [PATCH 00/32] docs/vm: convert to ReST format

2018-03-29 Thread Jonathan Corbet
On Wed, 21 Mar 2018 21:22:16 +0200 Mike Rapoport wrote: > These patches convert files in Documentation/vm to ReST format, add an > initial index and link it to the top level documentation. > > There are no contents changes in the documentation, except few spelling > fixes. The relatively large d

[PATCH] powerpc: kexec_file: Fix error code when trying to load kdump kernel

2018-03-29 Thread Thiago Jung Bauermann
kexec_file_load() on powerpc doesn't support kdump kernels yet, so it returns -ENOTSUPP in that case. I've recently learned that this errno is internal to the kernel and isn't supposed to be exposed to userspace. Therefore, change to -EOPNOTSUPP which is defined in an uapi header. This does indee

Re: [PATCH v3 00/41] cxlflash: OCXL transport support and miscellaneous fixes

2018-03-29 Thread Uma Krishnan
> On Mar 28, 2018, at 4:34 PM, Martin K. Petersen > wrote: > > > Uma, > >> This patch series adds OCXL support to the cxlflash driver. With this >> support, new devices using the OCXL transport will be supported by the >> cxlflash driver along with the existing CXL devices. An effort is made

Re: [PATCH v2 03/10] powerpc/pseries: Set or clear security feature flags

2018-03-29 Thread Mauricio Faria de Oliveira
Hi Michael, On 03/27/2018 09:01 AM, Michael Ellerman wrote: + if (!(result->character & H_CPU_BEHAV_FAVOUR_SECURITY)) + security_ftr_clear(SEC_FTR_FAVOUR_SECURITY); + + if (!(result->character & H_CPU_BEHAV_L1D_FLUSH_PR)) + security_ftr_clear(SEC_FTR_L1D_F

[PATCH] powerpc/pseries: Fix to clear security feature flags

2018-03-29 Thread Mauricio Faria de Oliveira
The H_CPU_BEHAV_* flags should be checked for in the 'behaviour' field of 'struct h_cpu_char_result' -- 'character' is for H_CPU_CHAR_* flags. Found it by playing around with QEMU's implementation of the hypercall: Example: H_CPU_CHAR=0xf000 H_CPU_BEHAV=0x This

Re: RFC on writel and writel_relaxed

2018-03-29 Thread Sinan Kaya
On 3/29/2018 12:29 PM, Arnd Bergmann wrote: > On Thu, Mar 29, 2018 at 3:56 PM, Sinan Kaya wrote: >> On 3/28/2018 11:55 AM, David Miller wrote: >>> From: Benjamin Herrenschmidt >>> Date: Thu, 29 Mar 2018 02:13:16 +1100 >>> Let's fix all archs, it's way easier than fixing all drivers. Half of

Re: RFC on writel and writel_relaxed

2018-03-29 Thread Jason Gunthorpe
On Thu, Mar 29, 2018 at 02:58:34PM +, David Laight wrote: > From: Jason Gunthorpe > > Sent: 29 March 2018 15:45 > ... > > > > When talking about ordering between the devices, the relevant question > > > > is what happens if the writel(DEVICE_BAR) triggers DEVICE_BAR to DMA > > > > from the DEVI

Re: RFC on writel and writel_relaxed

2018-03-29 Thread Arnd Bergmann
On Thu, Mar 29, 2018 at 3:56 PM, Sinan Kaya wrote: > On 3/28/2018 11:55 AM, David Miller wrote: >> From: Benjamin Herrenschmidt >> Date: Thu, 29 Mar 2018 02:13:16 +1100 >> >>> Let's fix all archs, it's way easier than fixing all drivers. Half of >>> the archs are unused or dead anyway. >> >> Agre

Re: [PATCH v2 04/19] powerpc/kvm: Prefer fault_in_pages_readable function

2018-03-29 Thread LEROY Christophe
Mathieu Malaterre a écrit : Directly use fault_in_pages_readable instead of manual __get_user code. Fix warning treated as error with W=1: arch/powerpc/kernel/kvm.c:675:6: error: variable ‘tmp’ set but not used [-Werror=unused-but-set-variable] Suggested-by: Christophe Leroy Signed-off-

Re: [PATCH v2 05/19] powerpc/chrp/setup: Add attribute unused and make some functions static

2018-03-29 Thread LEROY Christophe
The subject of the patch should be updated as well Christophe Mathieu Malaterre a écrit : 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:9

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

2018-03-29 Thread LEROY Christophe
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: Christophe Leroy Signed-off-by: Mathieu Malate

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

2018-03-29 Thread LEROY Christophe
Mathieu Malaterre a écrit : Since the value of x is never intended to be read, remove it. Fix warning treated as error with W=1: arch/powerpc/platforms/powermac/udbg_scc.c:76:9: error: variable ‘x’ set but not used [-Werror=unused-but-set-variable] Suggested-by: Christophe Leroy Signed-

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

2018-03-29 Thread LEROY Christophe
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: variable ‘x’ set but not used [-Werror=unused-but-set-variable] Signe

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

2018-03-29 Thread LEROY Christophe
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 warning treated as error in W=1: arch/powerpc/lib/rheap.c:740:6: error: no previous prototype

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

2018-03-29 Thread LEROY Christophe
Mathieu Malaterre a écrit : On Fri, Mar 23, 2018 at 1:13 PM, christophe leroy wrote: Le 22/03/2018 à 21:19, Mathieu Malaterre a écrit : 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

Re: [PATCH] powerpc/64: Fix checksum folding in csum_add

2018-03-29 Thread LEROY Christophe
Paul Mackerras a écrit : On Tue, Mar 27, 2018 at 05:22:32PM +0200, LEROY Christophe wrote: Shile Zhang a écrit : >fix the missed point in Paul's patch: >"powerpc/64: Fix checksum folding in csum_tcpudp_nofold and >ip_fast_csum_nofold" > >Signed-off-by: Shile Zhang >--- > arch/powerpc/includ

Re: [PATCH 12/14] powerpc: pass node id into create_section_mapping

2018-03-29 Thread Nicholas Piggin
On Thu, 29 Mar 2018 16:51:16 +1100 Michael Ellerman wrote: > Nicholas Piggin writes: > > > diff --git a/arch/powerpc/mm/pgtable-radix.c > > b/arch/powerpc/mm/pgtable-radix.c > > index 328ff9abc333..435b19e74508 100644 > > --- a/arch/powerpc/mm/pgtable-radix.c > > +++ b/arch/powerpc/mm/pgtable-

RE: RFC on writel and writel_relaxed

2018-03-29 Thread David Laight
From: Jason Gunthorpe > Sent: 29 March 2018 15:45 ... > > > When talking about ordering between the devices, the relevant question > > > is what happens if the writel(DEVICE_BAR) triggers DEVICE_BAR to DMA > > > from the DEVICE_FOO. 'ordered' means that in this case > > > writel(DEVICE_FOO) must be

Re: RFC on writel and writel_relaxed

2018-03-29 Thread Jason Gunthorpe
On Thu, Mar 29, 2018 at 10:19:41AM +0100, Will Deacon wrote: > On Wed, Mar 28, 2018 at 10:57:32AM -0600, Jason Gunthorpe wrote: > > On Wed, Mar 28, 2018 at 11:13:45AM +0100, Will Deacon wrote: > > > On Wed, Mar 28, 2018 at 09:01:27PM +1100, Benjamin Herrenschmidt wrote: > > > > On Wed, 2018-03-28 a

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

2018-03-29 Thread Michael Ellerman
"Aneesh Kumar K.V" writes: > 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 cache for 16M is placed at PUD level > and 16G at the PGD level. >

Re: RFC on writel and writel_relaxed

2018-03-29 Thread David Miller
From: Sinan Kaya Date: Thu, 29 Mar 2018 09:56:01 -0400 > sparc question sent Sparc never lets physical memory accesses pass MMIO, and vice versa. They are always strongly ordered amongst eachother. Therefore no explicit barrier instructions are necessary.

Re: RFC on writel and writel_relaxed

2018-03-29 Thread Sinan Kaya
On 3/28/2018 11:55 AM, David Miller wrote: > From: Benjamin Herrenschmidt > Date: Thu, 29 Mar 2018 02:13:16 +1100 > >> Let's fix all archs, it's way easier than fixing all drivers. Half of >> the archs are unused or dead anyway. > > Agreed. > I pinged most of the maintainers yesterday. Which a

Re: [PATCH v4 14/16] powerpc: Use generic free_initrd_mem.

2018-03-29 Thread Michael Ellerman
Shea Levy writes: > Joe Perches writes: > >> On Wed, 2018-03-28 at 16:36 -0400, Shea Levy wrote: >>> Signed-off-by: Shea Levy >> >> Most people seem to want some form of commit message >> and not just your sign-off. >> > > Ah, if the subject is insufficient I can add some more detail. Yeah ple

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

2018-03-29 Thread Laurent Dufour
On 22/03/2018 02:21, Ganesh Mahendran wrote: > Hi, Laurent > > 2018-03-14 1:59 GMT+08:00 Laurent Dufour : >> 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 is to try to handle user space page faults with

Re: [PATCH 00/14] numa aware allocation for pacas, stacks, pagetables

2018-03-29 Thread Nicholas Piggin
On Thu, 29 Mar 2018 17:18:12 +1100 Michael Ellerman wrote: > Nicholas Piggin writes: > > On Wed, 07 Mar 2018 21:50:04 +1100 > > Michael Ellerman wrote: > >> Nicholas Piggin writes: > >> > This series allows numa aware allocations for various early data > >> > structures for radix. Hash sti

Re: [PATCH] powerpc: Clear branch trap (MSR.BE) before delivering SIGTRAP

2018-03-29 Thread Matt Evans
Hi Michael, > On 28 Mar 2018, at 11:36, Matt Evans wrote: > > Howdy Michael, > >> On 28 Mar 2018, at 06:54, Michael Ellerman wrote: >> >> Matt Evans writes: >> >>> When using SIG_DBG_BRANCH_TRACING, MSR.BE is left enabled in the >>> user context when single_step_exception() prepares the SIG

[PATCH v5 14/16] powerpc: Switch to generic free_initrd_mem.

2018-03-29 Thread Shea Levy
The generic implementation is functionally identical. Signed-off-by: Shea Levy --- arch/powerpc/mm/mem.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index fe8c61149fb8..e85b2a3cd264 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/

Re: RFC on writel and writel_relaxed

2018-03-29 Thread Will Deacon
On Thu, Mar 29, 2018 at 08:31:32AM +1100, Benjamin Herrenschmidt wrote: > On Thu, 2018-03-29 at 02:23 +1000, Nicholas Piggin wrote: > > This is a variation on the mandatory write barrier that causes writes to > > weakly > > ordered I/O regions to be partially ordered. Its effects may go beyon

Re: RFC on writel and writel_relaxed

2018-03-29 Thread Will Deacon
On Wed, Mar 28, 2018 at 10:57:32AM -0600, Jason Gunthorpe wrote: > On Wed, Mar 28, 2018 at 11:13:45AM +0100, Will Deacon wrote: > > On Wed, Mar 28, 2018 at 09:01:27PM +1100, Benjamin Herrenschmidt wrote: > > > On Wed, 2018-03-28 at 11:55 +0200, Arnd Bergmann wrote: > > > > > powerpc and ARM can't q

Re: [PATCH v8 22/24] mm: Speculative page fault handler return VMA

2018-03-29 Thread Laurent Dufour
On 29/03/2018 05:06, Ganesh Mahendran wrote: > 2018-03-29 10:26 GMT+08:00 Ganesh Mahendran : >> Hi, Laurent >> >> 2018-02-16 23:25 GMT+08:00 Laurent Dufour : >>> When the speculative page fault handler is returning VM_RETRY, there is a >>> chance that VMA fetched without grabbing the mmap_sem can b

linux-next: build failure after merge of the powerpc tree

2018-03-29 Thread Stephen Rothwell
Hi all, After merging the powerpc tree, today's linux-next build (powerpc64 allnoconfig) failed like this: WARNING: vmlinux.o(.text+0x12e34): Section mismatch in reference from the function .setup_rfi_flush() to the function .init.text:.ppc64_bolted_size() The function .setup_rfi_flush() referen