[PATCH] powerpc/pseries: Fix stack corruption in htpe code

2016-10-06 Thread Laurent Dufour
This commit fixes a stack corruption in the pseries specific code dealing with the huge pages. In __pSeries_lpar_hugepage_invalidate() the buffer used to pass arguments to the hypervisor is not large enough. This leads to a stack corruption where a previously saved register could be corrupted lead

[PATCH] powerpc: cmp -> cmpd for 64-bit

2016-10-06 Thread Segher Boessenkool
PowerPC's "cmp" instruction has four operands. Normally people write "cmpw" or "cmpd" for the second cmp operand 0 or 1. But, frequently people forget, and write "cmp" with just three operands. With older binutils this is silently accepted as if this was "cmpw", while often "cmpd" is wanted. Wi

Re: [PATCH] powerpc/pseries: Fix stack corruption in htpe code

2016-10-06 Thread Aneesh Kumar K.V
Laurent Dufour writes: > This commit fixes a stack corruption in the pseries specific code dealing > with the huge pages. > > In __pSeries_lpar_hugepage_invalidate() the buffer used to pass arguments > to the hypervisor is not large enough. This leads to a stack corruption > where a previously sa

[PATCH v4 4/5] mm: make processing of movable_node arch-specific

2016-10-06 Thread Reza Arbab
Currently, CONFIG_MOVABLE_NODE depends on X86_64. In preparation to enable it for other arches, we need to factor a detail which is unique to x86 out of the generic mm code. Specifically, as documented in kernel-parameters.txt, the use of "movable_node" should remain restricted to x86: movable_no

[PATCH v4 5/5] mm: enable CONFIG_MOVABLE_NODE on non-x86 arches

2016-10-06 Thread Reza Arbab
To support movable memory nodes (CONFIG_MOVABLE_NODE), at least one of the following must be true: 1. We're on x86. This arch has the capability to identify movable nodes at boot by parsing the ACPI SRAT, if the movable_node option is used. 2. Our config supports memory hotplug, which means th

[PATCH v4 1/5] drivers/of: introduce of_fdt_device_is_available()

2016-10-06 Thread Reza Arbab
In __fdt_scan_reserved_mem(), the availability of a node is determined by testing its "status" property. Move this check into its own function, borrowing logic from the unflattened version, of_device_is_available(). Another caller will be added in a subsequent patch. Signed-off-by: Reza Arbab A

[PATCH v4 0/5] powerpc/mm: movable hotplug memory nodes

2016-10-06 Thread Reza Arbab
These changes enable the dynamic creation of movable nodes on power. On x86, the ACPI SRAT memory affinity structure can mark memory hotpluggable, allowing the kernel to possibly create movable nodes at boot. While power has no analog of this SRAT information, we can still create a movable memory

[PATCH v4 3/5] powerpc/mm: allow memory hotplug into a memoryless node

2016-10-06 Thread Reza Arbab
Remove the check which prevents us from hotplugging into an empty node. This limitation has been questioned before [1], and judging by the response, there doesn't seem to be a reason we can't remove it. No issues have been found in light testing. [1] http://lkml.kernel.org/r/cagzkibrmksa1yyhbf5h

[PATCH v4 2/5] drivers/of: do not add memory for unavailable nodes

2016-10-06 Thread Reza Arbab
Respect the standard dt "status" property when scanning memory nodes in early_init_dt_scan_memory(), so that if the node is unavailable, no memory will be added. The use case at hand is accelerator or device memory, which may be unusable until post-boot initialization of the memory link. Such a no

Re: [PATCH v15 03/15] selftests/powerpc: Add ptrace tests for EBB

2016-10-06 Thread Michael Ellerman
wei.guo.si...@gmail.com writes: > From: Anshuman Khandual > > This patch adds ptrace interface test for EBB/PMU specific > registers. This also adds some generic ptrace interface > based helper functions to be used by other patches later > on in the series. This is consistently failing for me on

Re: [PATCH] powerpc/pseries: Fix stack corruption in htpe code

2016-10-06 Thread Benjamin Herrenschmidt
On Thu, 2016-10-06 at 15:33 +0200, Laurent Dufour wrote: > This commit fixes a stack corruption in the pseries specific code > dealing > with the huge pages. Wow, nice catch ! > In __pSeries_lpar_hugepage_invalidate() the buffer used to pass > arguments > to the hypervisor is not large enough. Th

Re: [net-next 00/13] fsl/fman: cleanup and small fixes

2016-10-06 Thread David Miller
From: Madalin Bucur Date: Tue, 4 Oct 2016 10:30:24 +0300 > This series contains fixes for the DPAA FMan driver. > Adding myself as maintainer of the driver. > > The following are changes since commit > a4cc96d1f0170b779c32c6b2cc58764f5d2cdef0 > net: phy: Add Edge-rate driver for Microsemi PHYs

Re: [PATCH] net: ps3_gelic: Add missing \n to end of deb_dbg message

2016-10-06 Thread David Miller
From: Colin King Date: Tue, 4 Oct 2016 12:15:54 +0100 > From: Colin Ian King > > Trival fix, dev_dbg message is missing a \n, so add it. > > Signed-off-by: Colin Ian King Applied.

[GIT PULL] Please pull powerpc/linux.git powerpc-4.9-1 tag

2016-10-06 Thread Michael Ellerman
Hi Linus, Please pull the first batch of powerpc updates for 4.9: The following changes since commit c6935931c1894ff857616ff8549b61236a19148f: Linux 4.8-rc5 (2016-09-04 14:31:46 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git

Re: Commit 1b7898ee276b "powerpc/boot: Use the pre-boot decompression API" breaks boot

2016-10-06 Thread Oliver O'Halloran
Hi, Heiner Could you send me a copy of the kernel .config (or which defconfig) that you're using, the name of the HW platform that you're using and if possible the kernel image itself? Thanks, Oliver

Re: [PATCH v4 4/5] mm: make processing of movable_node arch-specific

2016-10-06 Thread Aneesh Kumar K.V
Reza Arbab writes: > Currently, CONFIG_MOVABLE_NODE depends on X86_64. In preparation to > enable it for other arches, we need to factor a detail which is unique > to x86 out of the generic mm code. > > Specifically, as documented in kernel-parameters.txt, the use of > "movable_node" should remai

Re: [PATCH v4 5/5] mm: enable CONFIG_MOVABLE_NODE on non-x86 arches

2016-10-06 Thread Aneesh Kumar K.V
Reza Arbab writes: > To support movable memory nodes (CONFIG_MOVABLE_NODE), at least one of > the following must be true: > > 1. We're on x86. This arch has the capability to identify movable nodes >at boot by parsing the ACPI SRAT, if the movable_node option is used. > > 2. Our config suppor