Re: PowerPC: Move Freescale device tree files into fsl folder

2015-10-16 Thread Scott Wood
On Fri, Sep 18, 2015 at 12:00:24PM +0800, Hongtao Jia wrote: > It makes no sense that some Freescale device tree files are in fsl > directory while some others not. This patch move Freescale device tree > files into fsl folder. To do that the following two steps are made: > - Move Freescale device

Re: [PATCH] rtas: Validate rtas entry before calling enter_rtas

2015-10-16 Thread Vasant Hegde
On 10/16/2015 11:49 PM, Denis Kirjanov wrote: > On 10/16/15, Vasant Hegde wrote: >> On 10/16/2015 04:02 PM, Denis Kirjanov wrote: >>> On 10/16/15, Vasant Hegde wrote: Currently we do not validate rtas entry before calling enter_rtas(). This is resulting in a kernel oops (see below)

Re: [PATCH 0/3] mm/powerpc: enabling memory soft dirty tracking

2015-10-16 Thread Benjamin Herrenschmidt
On Fri, 2015-10-16 at 14:11 -0700, Andrew Morton wrote: > I grabbed these patches, but they're more a ppc thing than a core > kernel thing. I can merge them into 4.3 with suitable acks or drop > them if they turn up in the powerpc tree. Or something else? I'm happy for you to keep the generic on

Re: [PATCH] powerpc: on crash, kexec'ed kernel needs all CPUs are online

2015-10-16 Thread Benjamin Herrenschmidt
On Fri, 2015-10-16 at 09:57 +0200, Laurent Vivier wrote: > For me the problem is: as these CPUs are offline, I guess the core has > been switched to 1 thread per core, so the CPUs (1 to 7 for core 0) > don't exist anymore, how can we return them to OPAL ? Another option is to make the new kernel k

Re: [PATCH] powerpc: on crash, kexec'ed kernel needs all CPUs are online

2015-10-16 Thread Benjamin Herrenschmidt
On Fri, 2015-10-16 at 09:48 +0200, Laurent Vivier wrote: > > Yes, we know :) > > On the crash, as the CPUs are offline, kernel doesn't call > opal_return_cpu(), so for OPAL all these CPU are always in the > kernel. Hrm and they may even be in winkle state, so basically off... waking them up *cou

Re: [V2,1/2] powerpc/fsl: Add PCI node in device tree of bsc9132qds

2015-10-16 Thread Scott Wood
On Fri, Oct 16, 2015 at 05:01:10PM +0800, Zhiqiang Hou wrote: > From: Harninder Rai > > Signed-off-by: Harninder Rai > Signed-off-by: Minghuan Lian > Change-Id: I4355add4a92d1fcf514843aea5ecadd2e2517969 > Reviewed-on: http://git.am.freescale.net:8181/2454 > Reviewed-by: Zang Tiefei-R61911 > Re

Re: [v2] powerpc/e6500: hw tablewalk: make sure we invalidate and write to the same tlb entry

2015-10-16 Thread Scott Wood
On Tue, Aug 18, 2015 at 03:55:56PM +0800, Kevin Hao wrote: > diff --git a/arch/powerpc/mm/tlb_low_64e.S b/arch/powerpc/mm/tlb_low_64e.S > index e4185581c5a7..3a5b89dfb5a1 100644 > --- a/arch/powerpc/mm/tlb_low_64e.S > +++ b/arch/powerpc/mm/tlb_low_64e.S > @@ -68,11 +68,21 @@ END_FTR_SECTION_IFSET(C

Re: [2/3] powerpc: dts: p1022si: Add fsl,wake-on-filer for eTSEC

2015-10-16 Thread Scott Wood
On Thu, Oct 01, 2015 at 01:10:22PM +0300, Claudiu Manoil wrote: > Enable the "wake-on-filer" (aka. wake on user defined packet) > wake on lan capability for the eTSEC ethernet nodes. > > Cc: Li Yang > Cc: Zhao Chenhui > > Signed-off-by: Claudiu Manoil > --- > arch/powerpc/boot/dts/fsl/p1022si

[PATCH v2] powerpc/prom: Avoid reference to potentially freed memory

2015-10-16 Thread Christophe JAILLET
of_get_property() is used inside the loop, but then the reference to the node is dropped before dereferencing the prop pointer, which could by then point to junk if the node has been freed. Instead use of_property_read_u32() to actually read the property value before dropping the reference. Signe

Re: [PATCH 0/3] mm/powerpc: enabling memory soft dirty tracking

2015-10-16 Thread Andrew Morton
On Fri, 16 Oct 2015 14:07:05 +0200 Laurent Dufour wrote: > This series is enabling the software memory dirty tracking in the > kernel for powerpc. This is the follow up of the commit 0f8975ec4db2 > ("mm: soft-dirty bits for user memory changes tracking") which > introduced this feature in the m

Re: [PATCH] powerpc/prom: Avoid reference to potentially freed memory

2015-10-16 Thread Christophe JAILLET
Le 16/10/2015 12:02, Michael Ellerman a écrit : As the kbuild robot detected you have left an extra "}" here. I don't mind too much if you send patches that aren't compile tested, but you might save yourself some time by compiling them. Sorry about it, and thanks for your patience. IMHO, this

Re: [PATCH v2] powerpc/mpc5xxx: Avoid dereferencing potentially freed memory

2015-10-16 Thread Christophe JAILLET
Le 16/10/2015 11:49, Michael Ellerman a écrit : On Fri, 2015-10-16 at 08:20 +0200, Christophe JAILLET wrote: Le 15/10/2015 08:36, Michael Ellerman a écrit : On Thu, 2015-10-15 at 07:56 +0200, Christophe JAILLET wrote: Use 'of_property_read_u32()' instead of 'of_get_property()'+pointer derefere

Re: [PATCH] rtas: Validate rtas entry before calling enter_rtas

2015-10-16 Thread Denis Kirjanov
On 10/16/15, Vasant Hegde wrote: > On 10/16/2015 04:02 PM, Denis Kirjanov wrote: >> On 10/16/15, Vasant Hegde wrote: >>> Currently we do not validate rtas entry before calling enter_rtas(). >>> This >>> is resulting in a kernel oops (see below) when user space calls rtas >>> system >>> call on Po

Re: [PATCH] rtas: Validate rtas entry before calling enter_rtas

2015-10-16 Thread Vasant Hegde
On 10/16/2015 04:02 PM, Denis Kirjanov wrote: > On 10/16/15, Vasant Hegde wrote: >> Currently we do not validate rtas entry before calling enter_rtas(). This >> is resulting in a kernel oops (see below) when user space calls rtas system >> call on PowerNV platform. We hit below oops when we ran tr

Re: [PATCH 1/3] mm: clearing pte in clear_soft_dirty()

2015-10-16 Thread Benjamin Herrenschmidt
On Fri, 2015-10-16 at 14:07 +0200, Laurent Dufour wrote: > As mentioned in the commit 56eecdb912b5 ("mm: Use > ptep/pmdp_set_numa() > for updating _PAGE_NUMA bit"), architecture like ppc64 doesn't do > tlb flush in set_pte/pmd functions. > > So when dealing with existing pte in clear_soft_dirty, t

[PATCH 3/3] powerpc/mm: Add page soft dirty tracking

2015-10-16 Thread Laurent Dufour
User space checkpoint and restart tool (CRIU) needs the page's change to be soft tracked. This allows to do a pre checkpoint and then dump only touched pages. This is done by using a newly assigned PTE bit (_PAGE_SOFT_DIRTY) when the page is backed in memory, and a new _PAGE_SWP_SOFT_DIRTY bit whe

[PATCH 2/3] mm: clear_soft_dirty_pmd requires THP

2015-10-16 Thread Laurent Dufour
Don't build clear_soft_dirty_pmd() if the transparent huge pages are not enabled. Signed-off-by: Laurent Dufour CC: Aneesh Kumar K.V --- fs/proc/task_mmu.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index c9454ee39b

[PATCH 1/3] mm: clearing pte in clear_soft_dirty()

2015-10-16 Thread Laurent Dufour
As mentioned in the commit 56eecdb912b5 ("mm: Use ptep/pmdp_set_numa() for updating _PAGE_NUMA bit"), architecture like ppc64 doesn't do tlb flush in set_pte/pmd functions. So when dealing with existing pte in clear_soft_dirty, the pte must be cleared before being modified. Signed-off-by: Laurent

[PATCH 0/3] mm/powerpc: enabling memory soft dirty tracking

2015-10-16 Thread Laurent Dufour
This series is enabling the software memory dirty tracking in the kernel for powerpc. This is the follow up of the commit 0f8975ec4db2 ("mm: soft-dirty bits for user memory changes tracking") which introduced this feature in the mm code. The first patch is fixing an issue in the code clearing the

Re: [PATCH] selfttest/powerpc: Add memory page migration tests

2015-10-16 Thread Aneesh Kumar K.V
Anshuman Khandual writes: > On 10/15/2015 09:16 PM, Anshuman Khandual wrote: >> This adds two tests for memory page migration. One for normal page >> migration which works for both 4K or 64K base page size kernel and >> the other one is for 16MB huge page migration which will work both >> 4K or 6

[GIT PULL] Please pull powerpc/linux.git powerpc-4.3-4 tag

2015-10-16 Thread Michael Ellerman
Hi Linus, Please pull some more powerpc fixes for 4.3: The following changes since commit 9ffecb10283508260936b96022d4ee43a7798b4c: Linux 4.3-rc3 (2015-09-27 07:50:08 -0400) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git tags/powerp

Re: [PATCH] selfttest/powerpc: Add memory page migration tests

2015-10-16 Thread Anshuman Khandual
On 10/15/2015 09:16 PM, Anshuman Khandual wrote: > This adds two tests for memory page migration. One for normal page > migration which works for both 4K or 64K base page size kernel and > the other one is for 16MB huge page migration which will work both > 4K or 64K base page sized 16MB huge pages

Re: [PATCH] rtas: Validate rtas entry before calling enter_rtas

2015-10-16 Thread Denis Kirjanov
On 10/16/15, Vasant Hegde wrote: > Currently we do not validate rtas entry before calling enter_rtas(). This > is resulting in a kernel oops (see below) when user space calls rtas system > call on PowerNV platform. We hit below oops when we ran trinity (system call > fuzzer) on PowerNV. This patch

[PATCH] rtas: Validate rtas entry before calling enter_rtas

2015-10-16 Thread Vasant Hegde
Currently we do not validate rtas entry before calling enter_rtas(). This is resulting in a kernel oops (see below) when user space calls rtas system call on PowerNV platform. We hit below oops when we ran trinity (system call fuzzer) on PowerNV. This patch adds code to validate rtas entry before m

Re: [PATCH] powerpc/prom: Avoid reference to potentially freed memory

2015-10-16 Thread Michael Ellerman
On Fri, 2015-10-16 at 08:14 +0200, Christophe JAILLET wrote: > of_get_property() is used inside the loop, but then the reference to the > node is dropped before dereferencing the prop pointer, which could by then > point to junk if the node has been freed. > > Instead use of_property_read_u32() t

Re: [PATCH v2] powerpc/mpc5xxx: Avoid dereferencing potentially freed memory

2015-10-16 Thread Michael Ellerman
On Fri, 2015-10-16 at 08:20 +0200, Christophe JAILLET wrote: > Le 15/10/2015 08:36, Michael Ellerman a écrit : > > On Thu, 2015-10-15 at 07:56 +0200, Christophe JAILLET wrote: > > > Use 'of_property_read_u32()' instead of > > > 'of_get_property()'+pointer > > > dereference in order to avoid access

[PATCH V2 1/2] powerpc/fsl: Add PCI node in device tree of bsc9132qds

2015-10-16 Thread Zhiqiang Hou
From: Harninder Rai Signed-off-by: Harninder Rai Signed-off-by: Minghuan Lian Change-Id: I4355add4a92d1fcf514843aea5ecadd2e2517969 Reviewed-on: http://git.am.freescale.net:8181/2454 Reviewed-by: Zang Tiefei-R61911 Reviewed-by: Kushwaha Prabhakar-B32579 Reviewed-by: Fleming Andrew-AFLEMING Te

[PATCH V2 2/2] powerpc/85xx: Add PCIe controller support for bsc9132qds

2015-10-16 Thread Zhiqiang Hou
From: Harninder Rai 1. Use machine_arch_initcall to hook mpc85xx_common_publish_devices This can ensure before pcibios_init() is called, pci controllers have been probed and added to the hose_list. 2. Add a workaround for errata A-005434 For the BSC9132, PEX_PEXIWARn[TRGT] for all windows default

Re: [PATCH] powerpc: on crash, kexec'ed kernel needs all CPUs are online

2015-10-16 Thread Laurent Vivier
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 16/10/2015 04:29, David Gibson wrote: > On Thu, 15 Oct 2015 21:00:58 +0200 Laurent Vivier > wrote: > >> On kexec, all secondary offline CPUs are onlined before starting >> the new kernel, this is not done in the case of kdump. >> >> If kdump

Re: [PATCH] powerpc/prom: Avoid reference to potentially freed memory

2015-10-16 Thread kbuild test robot
Hi Christophe, [auto build test ERROR on powerpc/next -- if it's inappropriate base, please suggest rules for selecting the more suitable base] url: https://github.com/0day-ci/linux/commits/Christophe-JAILLET/powerpc-prom-Avoid-reference-to-potentially-freed-memory/20151016-141714 c

Re: [PATCH] powerpc: on crash, kexec'ed kernel needs all CPUs are online

2015-10-16 Thread Laurent Vivier
On 16/10/2015 04:14, Michael Ellerman wrote: > On Thu, 2015-10-15 at 21:00 +0200, Laurent Vivier wrote: >> On kexec, all secondary offline CPUs are onlined before >> starting the new kernel, this is not done in the case of kdump. >> >> If kdump is configured and a kernel crash occurs whereas >> s

Re: [PATCH v2] powerpc/mpc5xxx: Avoid dereferencing potentially freed memory

2015-10-16 Thread Gabriel Paubert
On Fri, Oct 16, 2015 at 08:20:13AM +0200, Christophe JAILLET wrote: > Le 15/10/2015 08:36, Michael Ellerman a écrit : > >On Thu, 2015-10-15 at 07:56 +0200, Christophe JAILLET wrote: > >>Use 'of_property_read_u32()' instead of 'of_get_property()'+pointer > >>dereference in order to avoid access to p