Re: RFC on writel and writel_relaxed

2018-03-28 Thread Benjamin Herrenschmidt
On Thu, 2018-03-29 at 02:23 +1000, Nicholas Piggin wrote: > On Wed, 28 Mar 2018 11:55:09 -0400 (EDT) > 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

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

2018-03-28 Thread Martin K. Petersen
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 > to keep this transport specific function independent of the existing > c

Re: RFC on writel and writel_relaxed

2018-03-28 Thread Nicholas Piggin
On Thu, 29 Mar 2018 08:31:32 +1100 Benjamin Herrenschmidt wrote: > On Thu, 2018-03-29 at 02:23 +1000, Nicholas Piggin wrote: > > On Wed, 28 Mar 2018 11:55:09 -0400 (EDT) > > David Miller wrote: > > > > > From: Benjamin Herrenschmidt > > > Date: Thu, 29 Mar 2018 02:13:16 +1100 > > > > > >

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

2018-03-28 Thread Kees Cook
On Wed, Mar 28, 2018 at 8:26 AM, Shea Levy wrote: > Now only those architectures that have custom initrd free requirements > need to define free_initrd_mem. > > Signed-off-by: Shea Levy Yay consolidation! :) > --- a/usr/Kconfig > +++ b/usr/Kconfig > @@ -233,3 +233,7 @@ config INITRAMFS_COMPRESS

Re: Linux 4.16: Reported regressions as of Tuesday, 2018-03-27 (Was: Linux 4.16-rc7)

2018-03-28 Thread David Sterba
On Tue, Mar 27, 2018 at 09:13:32PM +0200, Thorsten Leemhuis wrote: > On 26.03.2018 01:37, Linus Torvalds wrote: > > […] Anyway. Go out and test. And let's hope next week is nice and calm and > > I can release the final 4.16 next Sunday without any extra rc's. > > > >Linus > > Hi!

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

2018-03-28 Thread Shea Levy
Now only those architectures that have custom initrd free requirements need to define free_initrd_mem. Signed-off-by: Shea Levy --- arch/alpha/mm/init.c | 8 arch/arc/mm/init.c| 7 --- arch/arm/Kconfig | 1 + arch/arm64/Kconfig| 1 + arch/blackfin/K

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

2018-03-28 Thread Rob Landley
On 03/28/2018 10:26 AM, Shea Levy wrote: > Now only those architectures that have custom initrd free requirements > need to define free_initrd_mem. ... > --- a/arch/arc/mm/init.c > +++ b/arch/arc/mm/init.c > @@ -229,10 +229,3 @@ void __ref free_initmem(void) > { > free_initmem_default(-1); >

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

2018-03-28 Thread Shea Levy
Hi Rob, Rob Landley writes: > On 03/28/2018 10:26 AM, Shea Levy wrote: >> Now only those architectures that have custom initrd free requirements >> need to define free_initrd_mem. > ... >> --- a/arch/arc/mm/init.c >> +++ b/arch/arc/mm/init.c >> @@ -229,10 +229,3 @@ void __ref free_initmem(void)

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

2018-03-28 Thread Russell King - ARM Linux
On Wed, Mar 28, 2018 at 10:58:51AM -0500, Rob Landley wrote: > On 03/28/2018 10:26 AM, Shea Levy wrote: > > Now only those architectures that have custom initrd free requirements > > need to define free_initrd_mem. > ... > > --- a/arch/arc/mm/init.c > > +++ b/arch/arc/mm/init.c > > @@ -229,10 +229,

Re: [RFC PATCH v2 0/2] Randomization of address chosen by mmap.

2018-03-28 Thread Ilya Smith
> On 27 Mar 2018, at 17:38, Michal Hocko wrote: > > On Tue 27-03-18 16:51:08, Ilya Smith wrote: >> >>> On 27 Mar 2018, at 10:24, Michal Hocko wrote: >>> >>> On Mon 26-03-18 22:45:31, Ilya Smith wrote: > On 26 Mar 2018, at 11:46, Michal Hocko wrote: > > On Fri 23-03-18 20:5

Re: [RFC PATCH v2 0/2] Randomization of address chosen by mmap.

2018-03-28 Thread Ilya Smith
> On 28 Mar 2018, at 01:16, Theodore Y. Ts'o wrote: > > On Tue, Mar 27, 2018 at 04:51:08PM +0300, Ilya Smith wrote: >>> /dev/[u]random is not sufficient? >> >> Using /dev/[u]random makes 3 syscalls - open, read, close. This is a >> performance >> issue. > > You may want to take a look at the g

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

2018-03-28 Thread Rob Landley
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: >>> Now only those architectures that have custom initrd free requirements >>> need to define free_initrd_mem. >> ... >>> --- a/arch/a

RE: [RFC PATCH v2 0/2] Randomization of address chosen by mmap.

2018-03-28 Thread Luck, Tony
> The default limit of only 65536 VMAs will also quickly come into play > if consecutive anon mmaps don't get merged. Of course this can be > raised, but it has significant resource and performance (fork) costs. Could the random mmap address chooser look for how many existing VMAs have space befor

Re: [RFC PATCH v2 0/2] Randomization of address chosen by mmap.

2018-03-28 Thread Ilya Smith
> On 28 Mar 2018, at 02:49, Matthew Wilcox wrote: > > On Tue, Mar 27, 2018 at 03:53:53PM -0700, Kees Cook wrote: >> I agree: pushing this off to libc leaves a lot of things unprotected. >> I think this should live in the kernel. The question I have is about >> making it maintainable/readable/etc

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

2018-03-28 Thread Russell King - ARM Linux
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: > >>> Now only those architectures that have custom initrd free

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

2018-03-28 Thread Oliver
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:51AM -0500, Rob Landley wrote: >> >> On 03/28/2018 10:26 AM, Shea Levy

Re: [PATCH v12 07/22] selftests/vm: fixed bugs in pkey_disable_clear()

2018-03-28 Thread Thiago Jung Bauermann
Dave Hansen writes: > On 03/28/2018 01:47 PM, Thiago Jung Bauermann wrote: if (flags) - assert(rdpkey_reg() > orig_pkey_reg); + assert(rdpkey_reg() < orig_pkey_reg); } void pkey_write_allow(int pkey) >>> This seems so horribly wrong that I won

[PATCH] macintosh/adb: Use C99 initializers for struct adb_driver instances

2018-03-28 Thread Finn Thain
No change to object files. Cc: Benjamin Herrenschmidt Signed-off-by: Finn Thain --- drivers/macintosh/adb-iop.c| 14 +++--- drivers/macintosh/macio-adb.c | 15 +++ drivers/macintosh/via-macii.c | 14 +++--- drivers/macintosh/via-pmu.c| 14 +++--- d

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

2018-03-28 Thread Nicholas Piggin
On Thu, 29 Mar 2018 09:37:52 +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:5

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

2018-03-28 Thread Wei Yang
On Wed, Mar 28, 2018 at 09:55:07AM -0700, Kees Cook wrote: >On Wed, Mar 28, 2018 at 8:26 AM, Shea Levy wrote: >> Now only those architectures that have custom initrd free requirements >> need to define free_initrd_mem. >> >> Signed-off-by: Shea Levy > >Yay consolidation! :) > >> --- a/usr/Kconfig

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

2018-03-28 Thread 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 be reused by the > legacy page fault handler. By reusing it, we avoid calling find_vma() > again. To achi

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

2018-03-28 Thread Ganesh Mahendran
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 be reused by the >> legacy page fault handler. By re

Re: [PATCH 6/6] doc/devicetree: NVDIMM region documentation

2018-03-28 Thread Oliver
On Thu, Mar 29, 2018 at 4:06 AM, Rob Herring wrote: > On Tue, Mar 27, 2018 at 9:53 AM, Oliver wrote: >> On Tue, Mar 27, 2018 at 9:24 AM, Rob Herring wrote: >>> On Fri, Mar 23, 2018 at 07:12:09PM +1100, Oliver O'Halloran wrote: Add device-tree binding documentation for the nvdimm region driv

[PATCH v2 1/4] powerpc/fadump: Reservationless firmware assisted dump

2018-03-28 Thread Mahesh J Salgaonkar
From: Mahesh Salgaonkar One of the primary issues with Firmware Assisted Dump (fadump) on Power is that it needs a large amount of memory to be reserved. On large systems with TeraBytes of memory, this reservation can be quite significant. In some cases, fadump fails if the memory reserved is in

[PATCH v2 2/4] powerpc/fadump: exclude memory holes while reserving memory in second kernel.

2018-03-28 Thread Mahesh J Salgaonkar
From: Mahesh Salgaonkar The second kernel, during early boot after the crash, reserves rest of the memory above boot memory size to make sure it does not touch any of the dump memory area. It uses memblock_reserve() that reserves the specified memory region irrespective of memory holes present wi

[PATCH v2 3/4] powerpc/fadump: throw proper error message on fadump registration failure.

2018-03-28 Thread Mahesh J Salgaonkar
From: Mahesh Salgaonkar fadump fails to register when there are holes in reserved memory area. This can happen if user has hot-removed a memory that falls in the fadump reserved memory area. Throw a meaningful error message to the user in such case. Signed-off-by: Mahesh Salgaonkar --- arch/po

[PATCH v2 4/4] powerpc/fadump: Do not allow hot-remove memory from fadump reserved area.

2018-03-28 Thread Mahesh J Salgaonkar
From: Mahesh Salgaonkar For fadump to work successfully there should not be any holes in reserved memory ranges where kernel has asked firmware to move the content of old kernel memory in event of crash. But this memory area is currently not protected from hot-remove operations. Hence, fadump ser

Re: [PATCH] powerpc/powernv/nvram: opal_nvram_write handle unknown OPAL errors

2018-03-28 Thread Stewart Smith
Nicholas Piggin writes: > opal_nvram_write currently just assumes success if it encounters an > error other than OPAL_BUSY or OPAL_BUSY_EVENT. Have it return -EIO > on other errors instead. > > Signed-off-by: Nicholas Piggin > --- > arch/powerpc/platforms/powernv/opal-nvram.c | 2 ++ > 1 file ch

[PATCH] powerpc/fscr: Enable interrupts earlier before calling get_user()

2018-03-28 Thread Anshuman Khandual
The function get_user() can sleep while trying to fetch instruction from user address space and causes the following warning from the scheduler. BUG: sleeping function called from invalid context Though interrupts get enabled back but it happens bit later after get_user() is called. This change m

Re: [PATCH 10/14] powerpc/64: allocate pacas per node

2018-03-28 Thread Michael Ellerman
Nicholas Piggin writes: > Per-node allocations are possible on 64s with radix that does > not have the bolted SLB limitation. > > Hash would be able to do the same if all CPUs had the bottom of > their node-local memory bolted as well. This is left as an > exercise for the reader. > --- > arch/p

Re: [PATCH 08/14] powerpc/setup: cpu_to_phys_id array

2018-03-28 Thread Michael Ellerman
Nicholas Piggin writes: > Build an array that finds hardware CPU number from logical CPU > number in firmware CPU discovery. Use that rather than setting > paca of other CPUs directly, to begin with. Subsequent patch will > not have pacas allocated at this point. > --- > arch/powerpc/include/asm

Re: [PATCH 09/14] powerpc/64: defer paca allocation until memory topology is discovered

2018-03-28 Thread Michael Ellerman
Nicholas Piggin writes: > --- > arch/powerpc/include/asm/paca.h| 3 +- > arch/powerpc/kernel/paca.c | 90 > -- > arch/powerpc/kernel/prom.c | 5 ++- > arch/powerpc/kernel/setup-common.c | 24 +++--- > 4 files changed, 51 insertions(+)

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

2018-03-28 Thread Michael Ellerman
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-radix.c > @@ -862,9 +862,9 @@ static void remove_pagetable(unsigned long start

[PATCH] hvc_opal: don't set tb_ticks_per_usec in udbg_init_opal_common()

2018-03-28 Thread Stewart Smith
time_init() will set up tb_ticks_per_usec based on reality. time_init() is called *after* udbg_init_opal_common() during boot. from arch/powerpc/kernel/time.c: unsigned long tb_ticks_per_usec = 100; /* sane default */ Currently, all powernv systems have a timebase frequency of 512mhz (51200

[PATCH 2/5] drivers/soc/fsl: add EPU FSM configuration for deep sleep

2018-03-28 Thread Ran Wang
In the last stage of deep sleep, software will trigger a Finite State Machine (FSM) to control the hardware procedure, such a board isolation, killing PLLs, removing power, and so on. When the system is waked up by an interrupt, the FSM controls the hardware to complete the early resume procedure.

[PATCH 1/5] powerpc/pm: Fix suspend=n in menuconfig for e500mc platforms.

2018-03-28 Thread Ran Wang
Also, unselect FSL_PMC which is for older platfroms instead. Signed-off-by: Ran Wang --- arch/powerpc/Kconfig |4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 73ce5dd..ed60c83 100644 --- a/arch/powerpc/Kconfig +++ b/arc

[PATCH 3/5] powerpc/cache: add cache flush operation for various e500

2018-03-28 Thread Ran Wang
Various e500 core have different cache architecture, so they need different cache flush operations. Therefore, add a callback function cpu_flush_caches to the struct cpu_spec. The cache flush operation for the specific kind of e500 is selected at init time. The callback function will flush all cach

[PATCH 5/5] powerpc:dts:pm: add power management node

2018-03-28 Thread Ran Wang
Enable Power Management feature on device tree, including MPC8536, MPC8544, MPC8548, MPC8572, P1010, P1020, P1021, P1022, P2020, P2041, P3041, T104X, T1024. Signed-off-by: Zhao Chenhui Signed-off-by: Ran Wang --- arch/powerpc/boot/dts/fsl/mpc8536si-post.dtsi | 14 ++- arch/powerpc/boot/dt

[PATCH 4/5] powerpc/pm: add sleep and deep sleep on QorIQ SoCs

2018-03-28 Thread Ran Wang
In sleep mode, the clocks of CPU core and unused IP blocks are turned off (IP blocks allowed to wake up system will running). Some QorIQ SoCs like MPC8536, P1022 and T104x, have deep sleep PM mode in addtion to the sleep PM mode. While in deep sleep mode, additionally, the power supply is removed

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

2018-03-28 Thread Michael Ellerman
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 still has a bolted SLB limitation that >> > prevents at least pacas and stacks f

[PATCH V2] powerpc/fscr: Enable interrupts earlier before calling get_user()

2018-03-28 Thread Anshuman Khandual
The function get_user() can sleep while trying to fetch instruction from user address space and causes the following warning from the scheduler. BUG: sleeping function called from invalid context Though interrupts get enabled back but it happens bit later after get_user() is called. This change m

<    1   2