[PATCH] mtd: powernv_flash: set of_node in mtd's dev

2018-07-13 Thread Rafał Miłecki
From: Rafał Miłecki This enables some features implemented in mtd subsystem like reading label and partitioning info from DT. Reported-by: Timothy Pearson Signed-off-by: Rafał Miłecki --- drivers/mtd/devices/powernv_flash.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mtd/devic

Re: [next-20180711][Oops] linux-next kernel boot is broken on powerpc

2018-07-13 Thread Abdul Haleem
On Thu, 2018-07-12 at 13:44 -0400, Pavel Tatashin wrote: > > Related commit could be one of below ? I see lots of patches related to mm > > and could not bisect > > > > 5479976fda7d3ab23ba0a4eb4d60b296eb88b866 mm: page_alloc: restore > > memblock_next_valid_pfn() on arm/arm64 > > 41619b27b5696e7e

CONFIG_ANDROID_BINDER_IPC=y (Re: powerpc: 32BIT vs. 64BIT (PPC32 vs. PPC64))

2018-07-13 Thread Mathieu Malaterre
Randy, On Mon, Jul 9, 2018 at 2:00 PM Mathieu Malaterre wrote: > > On Sun, Jul 8, 2018 at 1:53 PM Michael Ellerman wrote: > > > > Randy Dunlap writes: > > > Hi, > > > > > > Is there a good way (or a shortcut) to do something like: > > > > The best I know of is: > > > > > $ make ARCH=powerpc O=P

Re: misc: ocxl: Change return type for fault handler

2018-07-13 Thread Souptick Joarder
On Wed, Jul 11, 2018 at 6:54 PM, Michael Ellerman wrote: > On Mon, 2018-06-11 at 20:29:04 UTC, Souptick Joarder wrote: >> Use new return type vm_fault_t for fault handler. For >> now, this is just documenting that the function returns >> a VM_FAULT value rather than an errno. Once all instances >>

[PATCH] powerpc/8xx: fix handling of early NULL pointer dereference

2018-07-13 Thread Christophe Leroy
NULL pointers are pointers to user memory space. So user pagetable has to be set in order to avoid random behaviour in case of NULL pointer dereference, otherwise we may encounter random memory access hence Machine Check Exception from TLB Miss handlers. Set user pagetable as early as possible in

[PATCH v3 1/6] powerpc/fsl: Disable the speculation barrier from the command line

2018-07-13 Thread Diana Craciun
The speculation barrier can be disabled from the command line with the parameter: "nospectre_v1". Signed-off-by: Diana Craciun --- History: v2-->v3 - no changes arch/powerpc/kernel/security.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/s

[PATCH v3 0/6] powerpc/fsl: Speculation barrier for NXP PowerPC Book3E

2018-07-13 Thread Diana Craciun
Implement barrier_nospec for NXP PowerPC Book3E processors. Diana Craciun (6): Disable the speculation barrier from the command line Document nospectre_v1 kernel parameter. Make stf barrier PPC_BOOK3S_64 specific. Enable cpu vulnerabilities reporting for NXP PPC BOOK3E Add barrier_nospec

[PATCH v3 2/6] powerpc/fsl: Document nospectre_v1 kernel parameter.

2018-07-13 Thread Diana Craciun
Signed-off-by: Diana Craciun --- History: v2-->v3 - new Documentation/admin-guide/kernel-parameters.txt | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index efc7aa7..b346cc7 100644 --- a/

[PATCH v3 3/6] powerpc/fsl: Make stf barrier PPC_BOOK3S_64 specific.

2018-07-13 Thread Diana Craciun
NXP Book3E platforms are not vulnerable to speculative store bypass, so make the mitigations PPC_BOOK3S_64 specific. Signed-off-by: Diana Craciun --- History: v2-->v3 - new arch/powerpc/kernel/security.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/kernel/security.c b/ar

[PATCH v3 4/6] powerpc/fsl: Enable cpu vulnerabilities reporting for NXP PPC BOOK3E

2018-07-13 Thread Diana Craciun
The NXP PPC Book3E platforms are not vulnerable to meltdown, so make it PPC_BOOK3S_64 specific. Signed-off-by: Diana Craciun --- History: v2-->v3 - used the existing functions for spectre v1/v2 arch/powerpc/Kconfig | 7 ++- arch/powerpc/kernel/security.c | 2 ++ 2 files changed,

[PATCH v3 5/6] powerpc/fsl: Add barrier_nospec implementation for NXP PowerPC Book3E

2018-07-13 Thread Diana Craciun
Implement the barrier_nospec as a isync;sync instruction sequence. The implementation uses the infrastructure built for BOOK3S 64. Signed-off-by: Diana Craciun --- History: v2-->v3 - added PPC_NOSPEC Kconfig - addressed the review comments It was a discussion at the previous review cycle about

[PATCH v3 6/6] powerpc/fsl: Sanitize the syscall table for NXP PowerPC 32 bit platforms

2018-07-13 Thread Diana Craciun
Used barrier_nospec to sanitize the syscall table. Signed-off-by: Diana Craciun --- History: v2-->v3 - included in the series arch/powerpc/kernel/entry_32.S | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S index 973

Re: [PATCH v06 1/9] hotplug/cpu: Conditionally acquire/release DRC index

2018-07-13 Thread Michael Bringmann
See below. Code cleanups accepted for next revision. On 07/11/2018 11:00 AM, Naveen N. Rao wrote: > Michael Bringmann wrote: >> powerpc/cpu: Modify dlpar_cpu_add and dlpar_cpu_remove to allow the >> skipping of DRC index acquire or release operations during the CPU >> add or remove operations.  T

[RFC PATCH v1 0/4] KASAN for nohash PPC32

2018-07-13 Thread Christophe Leroy
This serie adds support to nohash PPC32 Tested on MPC8xx Christophe Leroy (4): powerpc/mm: prepare kernel for KAsan on PPC32 powerpc: add missing header in pgtable-types.h powerpc/32: Move early_init() in a separate file powerpc/nohash32: Add KASAN support arch/powerpc/Kconfig

[RFC PATCH v1 1/4] powerpc/mm: prepare kernel for KAsan on PPC32

2018-07-13 Thread Christophe Leroy
In kernel/cputable.c, explicitly use memcpy() in order to allow GCC to replace it with __memcpy() when KASAN is selected. Since commit 400c47d81ca38 ("powerpc32: memset: only use dcbz once cache is enabled"), memset() can be used before activation of the cache, so no need to use memset_io() for ze

[RFC PATCH v1 2/4] powerpc: add missing header in pgtable-types.h

2018-07-13 Thread Christophe Leroy
pte_basic_t is defined in page.h Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/pgtable-types.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/include/asm/pgtable-types.h b/arch/powerpc/include/asm/pgtable-types.h index eccb30b38b47..3d8f68aebea3 100644 --- a/a

[RFC PATCH v1 3/4] powerpc/32: Move early_init() in a separate file

2018-07-13 Thread Christophe Leroy
In preparation of KASAN, move early_init() into a separate file in order to allow deactivation of KASAN for that function. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/Makefile | 2 +- arch/powerpc/kernel/early_32.c | 35 +++ arch/powerpc/kernel/setu

[RFC PATCH v1 4/4] powerpc/nohash32: Add KASAN support

2018-07-13 Thread Christophe Leroy
This patch adds KASAN support for nohash PPC32. Signed-off-by: Christophe Leroy --- arch/powerpc/Kconfig | 1 + arch/powerpc/include/asm/kasan.h | 21 arch/powerpc/include/asm/nohash/32/pgtable.h | 2 + arch/powerpc/include/asm/ppc_asm.h |

[PATCH v07 0/9] powerpc/hotplug: Update affinity for migrated CPUs

2018-07-13 Thread Michael Bringmann
The migration of LPARs across Power systems affects many attributes including that of the associativity of CPUs. The patches in this set execute when a system is coming up fresh upon a migration target. They are intended to, * Recognize changes to the associativity of CPUs recorded in internal

[PATCH v07 1/9] hotplug/cpu: Conditionally acquire/release DRC index

2018-07-13 Thread Michael Bringmann
powerpc/cpu: Modify dlpar_cpu_add and dlpar_cpu_remove to allow the skipping of DRC index acquire or release operations during the CPU add or remove operations. This is intended to support subsequent changes to provide a 'CPU readd' operation. Signed-off-by: Michael Bringmann --- Changes in patc

[PATCH v07 2/9] hotplug/cpu: Add operation queuing function

2018-07-13 Thread Michael Bringmann
migration/dlpar: This patch adds function dlpar_queue_action() which will queued up information about a CPU/Memory 'readd' operation according to resource type, action code, and DRC index. At a subsequent point, the list of operations can be run/played in series. Examples of such oprations include

[PATCH v07 3/9] hotplug/cpu: Provide CPU readd operation

2018-07-13 Thread Michael Bringmann
powerpc/dlpar: Provide hotplug CPU 'readd by index' operation to support LPAR Post Migration state updates. When such changes are invoked by the PowerPC 'mobility' code, they will be queued up so that modifications to CPU properties will take place after the new property value is written to the de

[PATCH v07 4/9] mobility/numa: Ensure numa update does not overlap

2018-07-13 Thread Michael Bringmann
mobility/numa: Ensure that numa_update_cpu_topology() can not be entered multiple times concurrently. It may be accessed through many different paths / concurrent work functions, and the lock ordering may be difficult to ensure otherwise. Signed-off-by: Michael Bringmann --- arch/powerpc/mm/num

[PATCH v07 5/9] numa: Disable/enable arch_update_cpu_topology

2018-07-13 Thread Michael Bringmann
numa: Provide mechanism to disable/enable operation of arch_update_cpu_topology/numa_update_cpu_topology. This is a simple tool to eliminate some avenues for thread deadlock observed during system execution. Signed-off-by: Michael Bringmann --- arch/powerpc/include/asm/topology.h | 10 +++

[PATCH v07 6/9] pmt/numa: Disable arch_update_cpu_topology during CPU readd

2018-07-13 Thread Michael Bringmann
pmt/numa: Disable arch_update_cpu_topology during post migration CPU readd updates when evaluating device-tree changes after LPM to avoid thread deadlocks trying to update node assignments. System timing between all of the threads and timers restarted in a migrated system overlapped frequently allo

[PATCH v07 7/9] powerpc/rtas: Allow disabling rtas_event_scan

2018-07-13 Thread Michael Bringmann
powerpc/rtas: Provide mechanism by which the rtas_event_scan can be disabled/re-enabled by other portions of the powerpc code. Among other things, this simplifies the usage of locking mechanisms for shared kernel resources. Signed-off-by: Michael Bringmann --- arch/powerpc/include/asm/rtas.h |

[PATCH v07 8/9] hotplug/rtas: No rtas_event_scan during PMT update

2018-07-13 Thread Michael Bringmann
hotplug/rtas: Disable rtas_event_scan during device-tree property updates after migration to reduce conflicts with changes propagated to other parts of the kernel configuration, such as CPUs or memory. Signed-off-by: Michael Bringmann --- arch/powerpc/platforms/pseries/hotplug-cpu.c |4

[PATCH v07 9/9] hotplug/pmt: Update topology after PMT

2018-07-13 Thread Michael Bringmann
hotplug/pmt: Call rebuild_sched_domains after applying changes to update CPU associativity i.e. 'readd' CPUs. This is to ensure that the deferred calls to arch_update_cpu_topology are now reflected in the system data structures. Signed-off-by: Michael Bringmann --- arch/powerpc/platforms/pserie

Re: CONFIG_ANDROID_BINDER_IPC=y (Re: powerpc: 32BIT vs. 64BIT (PPC32 vs. PPC64))

2018-07-13 Thread Randy Dunlap
On 07/13/2018 04:41 AM, Mathieu Malaterre wrote: > Randy, > > On Mon, Jul 9, 2018 at 2:00 PM Mathieu Malaterre wrote: >> >> On Sun, Jul 8, 2018 at 1:53 PM Michael Ellerman wrote: >>> >>> Randy Dunlap writes: Hi, Is there a good way (or a shortcut) to do something like: >>> >>> Th

Re: [next-20180711][Oops] linux-next kernel boot is broken on powerpc

2018-07-13 Thread Stephen Rothwell
ime in zero_resv_unresv() > > > > Looks like: > > 0ba29a108979 mm/sparse: Remove CONFIG_SPARSEMEM_ALLOC_MEM_MAP_TOGETHER > > > > This patch is going to be reverted from linux-next. Abdul, please > > verify that issue is gone once you revert this pa

Re: [PATCH 1/2] powerpc: Add ppc32_allmodconfig defconfig target

2018-07-13 Thread Randy Dunlap
On 07/09/2018 07:24 AM, Michael Ellerman wrote: > Because the allmodconfig logic just sets every symbol to M or Y, it > has the effect of always generating a 64-bit config, because > CONFIG_PPC64 becomes Y. > > So to make it easier for folks to test 32-bit code, provide a phony > defconfig target

[PATCH 0/2] powerpc/pseries: Improve serialization of PRRN events

2018-07-13 Thread John Allen
Stress testing has uncovered issues with handling continuously queued PRRN events. Running PRRN events in this way can seriously load the system given the sheer volume of dlpar being handled. This patchset ensures that PRRN events are handled more synchronously, only allowing the PRRN handler to qu

[PATCH 1/2] powerpc/pseries: Avoid blocking rtas polling handling multiple PRRN events

2018-07-13 Thread John Allen
When a PRRN event is being handled and another PRRN event comes in, the second event will block rtas polling waiting on the first to complete, preventing any further rtas events from being handled. This can be especially problematic in case that PRRN events are continuously being queued in which ca

[PATCH 2/2] powerpc/pseries: Wait for completion of hotplug events during PRRN handling

2018-07-13 Thread John Allen
While handling PRRN events, the time to handle the actual hotplug events dwarfs the time it takes to perform the device tree updates and queue the hotplug events. In the case that PRRN events are being queued continuously, hotplug events have been observed to be queued faster than the kernel can ac

[PATCH] net/ethernet/freescale/fman: fix cross-build error

2018-07-13 Thread Randy Dunlap
From: Randy Dunlap CC [M] drivers/net/ethernet/freescale/fman/fman.o In file included from ../drivers/net/ethernet/freescale/fman/fman.c:35: ../include/linux/fsl/guts.h: In function 'guts_set_dmacr': ../include/linux/fsl/guts.h:165:2: error: implicit declaration of function 'clrsetbits_be32'

[PATCH] chrp/nvram.c: add MODULE_LICENSE()

2018-07-13 Thread Randy Dunlap
From: Randy Dunlap Add MODULE_LICENSE() to the chrp nvram.c driver to fix the build warning message: WARNING: modpost: missing MODULE_LICENSE() in arch/powerpc/platforms/chrp/nvram.o Signed-off-by: Randy Dunlap Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linuxppc

Re: [PATCH 1/2] powerpc: Add ppc32_allmodconfig defconfig target

2018-07-13 Thread Randy Dunlap
On 07/09/2018 07:24 AM, Michael Ellerman wrote: > Because the allmodconfig logic just sets every symbol to M or Y, it > has the effect of always generating a 64-bit config, because > CONFIG_PPC64 becomes Y. > > So to make it easier for folks to test 32-bit code, provide a phony > defconfig target