RE: [RFC][PATCH] powerpc: add Book E support to 64-bit hibernation

2013-02-21 Thread Wang Dongsheng-B40534
Hi Benjamin & Johannes, Any thoughts about this patch? > -Original Message- > From: Wang Dongsheng-B40534 > Sent: Thursday, February 07, 2013 10:25 AM > To: linuxppc-dev@lists.ozlabs.org > Cc: Wood Scott-B07421; Li Yang-R58472; Zhao Chenhui-B35336; Wang > Dongsheng-B40534 > Subject: [RFC]

Re: [RFC PATCH -V2 01/21] powerpc: Use signed formatting when printing error

2013-02-21 Thread Paul Mackerras
On Thu, Feb 21, 2013 at 10:17:08PM +0530, Aneesh Kumar K.V wrote: > From: "Aneesh Kumar K.V" > > PAPR define these errors as negative values. So print them accordingly ^ defines > for easy debugging. > > Signed-off-by: Aneesh Kumar K.V Acked-by: Paul Mackerras

Re: [RFC PATCH -V2 06/21] powerpc: Add size argument to pgtable_cache_add

2013-02-21 Thread Paul Mackerras
On Thu, Feb 21, 2013 at 10:17:13PM +0530, Aneesh Kumar K.V wrote: > From: "Aneesh Kumar K.V" > > We will use this later with THP changes. With THP we want to create PMD with > twice the size. The second half will be used to depoist pgtable, which will

Re: [RFC PATCH -V2 04/21] powerpc: Reduce the PTE_INDEX_SIZE

2013-02-21 Thread Paul Mackerras
On Thu, Feb 21, 2013 at 10:17:11PM +0530, Aneesh Kumar K.V wrote: > From: "Aneesh Kumar K.V" > > This make one PMD cover 16MB range. That helps in easier implementation of THP > on power. THP core code make use of one pmd entry to track the huge page and > the range mapped by a single pmd entry s

Re: [RFC PATCH -V2 03/21] powerpc: Don't hard code the size of pte page

2013-02-21 Thread Paul Mackerras
On Thu, Feb 21, 2013 at 10:17:10PM +0530, Aneesh Kumar K.V wrote: > From: "Aneesh Kumar K.V" > > USE PTRS_PER_PTE to indicate the size of pte page. > > Signed-off-by: Aneesh Kumar K.V > powerpc: Don't hard code the size of pte page > > USE PTRS_PER_PTE to indicate the size of pte page. > > Si

Re: [RFC PATCH -V2 02/21] powerpc: Save DAR and DSISR in pt_regs on MCE

2013-02-21 Thread Paul Mackerras
On Thu, Feb 21, 2013 at 10:17:09PM +0530, Aneesh Kumar K.V wrote: > From: "Aneesh Kumar K.V" > > We were not saving DAR and DSISR on MCE. Save then and also print the values > along with exception details in xmon. The one reservation I have about this is that xmon will now be printing bogus valu

Re: [RFC PATCH -V2 05/21] powerpc: Reduce PTE table memory wastage

2013-02-21 Thread Paul Mackerras
On Thu, Feb 21, 2013 at 10:17:12PM +0530, Aneesh Kumar K.V wrote: > From: "Aneesh Kumar K.V" > > We now have PTE page consuming only 2K of the 64K page.This is in order to In fact the PTE page together with the hash table indexes occupies 4k, doesn't it? The comments in the code are similarly c

Re: [RFC PATCH -V2 08/21] powerpc: Decode the pte-lp-encoding bits correctly.

2013-02-21 Thread Paul Mackerras
On Thu, Feb 21, 2013 at 10:17:15PM +0530, Aneesh Kumar K.V wrote: > From: "Aneesh Kumar K.V" > > We look at both the segment base page size and actual page size and store > the pte-lp-encodings in an array per base page size. > > Signed-off-by: Aneesh Kumar K.V This needs more than 2 lines of

Re: [RFC PATCH -V2 07/21] powerpc: Use encode avpn where we need only avpn values

2013-02-21 Thread Paul Mackerras
On Thu, Feb 21, 2013 at 10:17:14PM +0530, Aneesh Kumar K.V wrote: > From: "Aneesh Kumar K.V" > > Signed-off-by: Aneesh Kumar K.V Needs a patch description. What is the motivation for doing this? Is the new code completely equivalent to the old, or if not, what are the differences? Etc. Paul

Re: [RFC PATCH -V2 05/21] powerpc: Reduce PTE table memory wastage

2013-02-21 Thread Aneesh Kumar K.V
David Gibson writes: > On Thu, Feb 21, 2013 at 10:17:12PM +0530, Aneesh Kumar K.V wrote: >> From: "Aneesh Kumar K.V" >> >> We now have PTE page consuming only 2K of the 64K page.This is in order to >> facilitate transparent huge page support, which works much better if our PMDs >> cover 16MB in

[PATCH] powerpc: Remove unused postfix parameter to DEFINE_BITOP()

2013-02-21 Thread Michael Ellerman
None of the users of DEFINE_BITOP pass a postfix, and as far as I can tell none ever did, so drop it. Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/bitops.h | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/include/asm/bitops.h b/arch/

Re: [RFC PATCH -V2 05/21] powerpc: Reduce PTE table memory wastage

2013-02-21 Thread David Gibson
On Thu, Feb 21, 2013 at 10:17:12PM +0530, Aneesh Kumar K.V wrote: > From: "Aneesh Kumar K.V" > > We now have PTE page consuming only 2K of the 64K page.This is in order to > facilitate transparent huge page support, which works much better if our PMDs > cover 16MB instead of 256MB. > > Inorder t

Re: PS3: Strange issue with kexec and FreeBSD loader

2013-02-21 Thread Benjamin Herrenschmidt
On Thu, 2013-02-21 at 23:06 +0100, Phileas Fogg wrote: > Does it look like the new data at offset 0x80 and 0x88 in DT are MSR > flags > MSR_DR, MSR_IR and MSR_EE ? Yes, that looks plausible though I would have expected ME to be set as well ... Or it could be a CCR value. But it does look like som

Re: PS3: Strange issue with kexec and FreeBSD loader

2013-02-21 Thread Benjamin Herrenschmidt
On Thu, 2013-02-21 at 22:44 +0100, Phileas Fogg wrote: > Stripped OpenWRT image: > > > c001a474: 48 00 00 05 bl 0xc001a478 > c001a478: 7c a8 02 a6 mflrr5 > c001a47c: 38 a5 00 1c addir5,r5,28 > c

[patch 2/2] mm: use vm_unmapped_area() on powerpc architecture

2013-02-21 Thread akpm
From: Michel Lespinasse Subject: mm: use vm_unmapped_area() on powerpc architecture Update the powerpc slice_get_unmapped_area function to make use of vm_unmapped_area() instead of implementing a brute force search. Signed-off-by: Michel Lespinasse Cc: Benjamin Herrenschmidt Cc: Paul Mackerras

[patch 1/2] mm: remove free_area_cache use in powerpc architecture

2013-02-21 Thread akpm
From: Michel Lespinasse Subject: mm: remove free_area_cache use in powerpc architecture As all other architectures have been converted to use vm_unmapped_area(), we are about to retire the free_area_cache. This change simply removes the use of that cache in slice_get_unmapped_area(), which will

Re: linux-next: manual merge of the signal tree with the powerpc tree

2013-02-21 Thread Stephen Rothwell
r Al stuff to go in first & fixup the conflict > > before I send the pull request to Linus. I'm off travelling around but I > > should be able to get stuff out this week-end. > > The merge looks fine to me. My TM signal tests still pass on > next-20130221. I think a

Re: PS3: Strange issue with kexec and FreeBSD loader

2013-02-21 Thread Phileas Fogg
Benjamin Herrenschmidt wrote: On Thu, 2013-02-21 at 21:38 +0100, Phileas Fogg wrote: The new 8 bytes at offset 0x90 in dt.dump.hex look suspicously like the kernel virtual address: 0xc001a4a0. It does indeed. What does that address correspond to in the kernel text ? Can you disassemble

Re: PS3: Strange issue with kexec and FreeBSD loader

2013-02-21 Thread Phileas Fogg
Benjamin Herrenschmidt wrote: On Thu, 2013-02-21 at 21:38 +0100, Phileas Fogg wrote: The new 8 bytes at offset 0x90 in dt.dump.hex look suspicously like the kernel virtual address: 0xc001a4a0. It does indeed. What does that address correspond to in the kernel text ? Can you disassemble

Re: linux-next: manual merge of the signal tree with the powerpc tree

2013-02-21 Thread Michael Neuling
but I > should be able to get stuff out this week-end. The merge looks fine to me. My TM signal tests still pass on next-20130221. Thanks sfr! Mikey ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: PS3: Strange issue with kexec and FreeBSD loader

2013-02-21 Thread Benjamin Herrenschmidt
On Thu, 2013-02-21 at 21:38 +0100, Phileas Fogg wrote: > The new 8 bytes at offset 0x90 in dt.dump.hex look suspicously like > the kernel virtual address: 0xc001a4a0. It does indeed. What does that address correspond to in the kernel text ? Can you disassemble around it with "objdump -D vm

Re: PS3: Strange issue with kexec and FreeBSD loader

2013-02-21 Thread Phileas Fogg
Benjamin Herrenschmidt wrote: On Wed, 2013-02-20 at 21:43 +0100, Phileas Fogg wrote: I found the single commit which brakes kexec stuff for FreeBSD loader or other custom ELF kernels on the PS3 console. From 7230c5644188cd9e3fb380cc97dde00c464a3ba7 Mon Sep 17 00:00:00 2001 From: Benjamin He

[PATCH] Handling of IRQ in MPC8xx GPIO

2013-02-21 Thread Christophe Leroy
This patch allows the use IRQ to notify the change of GPIO status on the MPC8xx CPM IO ports. This then allows to associate IRQs to GPIOs in the Device Tree. Ex: CPM1_PIO_C: gpio-controller@960 { #gpio-cells = <2>; compatible = "fsl,cpm1-pario-bank-c";

[RFC PATCH -V2 07/21] powerpc: Use encode avpn where we need only avpn values

2013-02-21 Thread Aneesh Kumar K.V
From: "Aneesh Kumar K.V" Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/hash_native_64.c|8 arch/powerpc/platforms/cell/beat_htab.c | 10 +- arch/powerpc/platforms/ps3/htab.c |2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ar

[RFC PATCH -V2 20/21] powerpc/THP: get_user_pages_fast changes

2013-02-21 Thread Aneesh Kumar K.V
From: "Aneesh Kumar K.V" handle large pages for get_user_pages_fast. Also take care of large page splitting. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/gup.c | 84 +++-- 1 file changed, 82 insertions(+), 2 deletions(-) diff --git a/arch/

[RFC PATCH -V2 19/21] powerpc/THP: hypervisor require few WIMG bit set

2013-02-21 Thread Aneesh Kumar K.V
From: "Aneesh Kumar K.V" Without this insert will return H_PARAMETER error. Also use the signed variant when printing error. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/largepage-hash64.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/mm/largepage-hash64.c b/arc

[RFC PATCH -V2 18/21] powerpc/THP: Add code to handle HPTE faults for large pages

2013-02-21 Thread Aneesh Kumar K.V
From: "Aneesh Kumar K.V" We now have pmd entries covering to 16MB range. To implement THP on powerpc, we double the size of PMD. The second half is used to deposit the pgtable (PTE page). We also use the depoisted PTE page for tracking the HPTE information. The information include [ secondary g

[RFC PATCH -V2 17/21] powerpc/THP: Differentiate THP PMD entries from HUGETLB PMD entries

2013-02-21 Thread Aneesh Kumar K.V
From: "Aneesh Kumar K.V" HUGETLB clear the top bit of PMD entries and use that to indicate a HUGETLB page directory. Since we store pfns in PMDs for THP, we would have the top bit cleared by default. Add the top bit mask for THP PMD entries and clear that when we are looking for pmd_pfn. Signed-

[RFC PATCH -V2 21/21] powerpc/THP: Enable THP on PPC64

2013-02-21 Thread Aneesh Kumar K.V
From: "Aneesh Kumar K.V" We enable only if the we support 16MB page size. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/pgtable.h | 33 +++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/pgtable.h b/arch/p

[RFC PATCH -V2 10/21] powerpc: print both base and actual page size on hash failure

2013-02-21 Thread Aneesh Kumar K.V
From: "Aneesh Kumar K.V" Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/mmu-hash64.h |3 ++- arch/powerpc/mm/hash_utils_64.c | 12 +++- arch/powerpc/mm/hugetlbpage-hash64.c |2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/arch/powerpc

[RFC PATCH -V2 00/21] THP support for PPC64

2013-02-21 Thread Aneesh Kumar K.V
Hi, This patchset adds transparent huge page support for PPC64. I am marking the series to linux-mm because the PPC64 implementation required few interface changes to core THP code. I still have considerable number of FIXME!! in the patchset mostly related to PPC64 mm susbsytem. Those would requi

[RFC PATCH -V2 16/21] powerpc/THP: Implement transparent huge pages for ppc64

2013-02-21 Thread Aneesh Kumar K.V
From: "Aneesh Kumar K.V" We now have pmd entries covering to 16MB range. To implement THP on powerpc, we double the size of PMD. The second half is used to deposit the pgtable (PTE page). We also use the depoisted PTE page for tracking the HPTE information. The information include [ secondary g

[RFC PATCH -V2 13/21] mm/THP: HPAGE_SHIFT is not a #define on some arch

2013-02-21 Thread Aneesh Kumar K.V
From: "Aneesh Kumar K.V" On archs like powerpc that support different huge page sizes, HPAGE_SHIFT and other derived values like HPAGE_PMD_ORDER are not constants. So move that to hugepage_init Signed-off-by: Aneesh Kumar K.V --- include/linux/huge_mm.h |3 --- mm/huge_memory.c|

[RFC PATCH -V2 12/21] powerpc: Fix hpte_decode to use the correct decoding for page sizes

2013-02-21 Thread Aneesh Kumar K.V
From: "Aneesh Kumar K.V" As per ISA doc, we encode base and actual page size in the LP bits of PTE. The number of bit used to encode the page sizes depend on actual page size. ISA doc lists this as PTE LP actual page size rrrz ≥8KB rrzz ≥16KB rzzz ≥32KB r

[RFC PATCH -V2 14/21] mm/THP: Add pmd args to pgtable deposit and withdraw APIs

2013-02-21 Thread Aneesh Kumar K.V
From: "Aneesh Kumar K.V" This will be later used by powerpc THP support. In powerpc we want to use pgtable for storing the hash index values. So instead of adding them to mm_context list, we would like to store them in the second half of pmd Signed-off-by: Aneesh Kumar K.V --- arch/s390/includ

[RFC PATCH -V2 15/21] mm/THP: support for zerout withdraw.

2013-02-21 Thread Aneesh Kumar K.V
From: "Aneesh Kumar K.V" Signed-off-by: Aneesh Kumar K.V --- arch/s390/include/asm/pgtable.h |6 ++ arch/sparc/include/asm/pgtable_64.h |6 ++ include/asm-generic/pgtable.h |9 + mm/huge_memory.c|7 ++- 4 files changed, 27 insert

[RFC PATCH -V2 11/21] powerpc: Print page size info during boot

2013-02-21 Thread Aneesh Kumar K.V
From: "Aneesh Kumar K.V" This gives hint about different base and actual page size combination supported by the platform. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/hash_utils_64.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/mm/hash_ut

[RFC PATCH -V2 09/21] powerpc: Update tlbie/tlbiel as per ISA doc

2013-02-21 Thread Aneesh Kumar K.V
From: "Aneesh Kumar K.V" This make sure we handle Multiple page size segment correctly. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/hash_native_64.c | 52 +- 1 file changed, 40 insertions(+), 12 deletions(-) diff --git a/arch/powerpc/mm/hash_nativ

[RFC PATCH -V2 08/21] powerpc: Decode the pte-lp-encoding bits correctly.

2013-02-21 Thread Aneesh Kumar K.V
From: "Aneesh Kumar K.V" We look at both the segment base page size and actual page size and store the pte-lp-encodings in an array per base page size. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/machdep.h |3 +- arch/powerpc/include/asm/mmu-hash64.h | 30 +---

[RFC PATCH -V2 05/21] powerpc: Reduce PTE table memory wastage

2013-02-21 Thread Aneesh Kumar K.V
From: "Aneesh Kumar K.V" We now have PTE page consuming only 2K of the 64K page.This is in order to facilitate transparent huge page support, which works much better if our PMDs cover 16MB instead of 256MB. Inorder to reduce the wastage, we now have multiple PTE page fragment from the same PTE p

[RFC PATCH -V2 02/21] powerpc: Save DAR and DSISR in pt_regs on MCE

2013-02-21 Thread Aneesh Kumar K.V
From: "Aneesh Kumar K.V" We were not saving DAR and DSISR on MCE. Save then and also print the values along with exception details in xmon. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/kernel/exceptions-64s.S |9 + arch/powerpc/xmon/xmon.c |2 +- 2 files changed

[RFC PATCH -V2 04/21] powerpc: Reduce the PTE_INDEX_SIZE

2013-02-21 Thread Aneesh Kumar K.V
From: "Aneesh Kumar K.V" This make one PMD cover 16MB range. That helps in easier implementation of THP on power. THP core code make use of one pmd entry to track the huge page and the range mapped by a single pmd entry should be equal to the huge page size supported by the hardware. Signed-off-

[RFC PATCH -V2 06/21] powerpc: Add size argument to pgtable_cache_add

2013-02-21 Thread Aneesh Kumar K.V
From: "Aneesh Kumar K.V" We will use this later with THP changes. With THP we want to create PMD with twice the size. The second half will be used to depoist pgtable, which will carry the hpte hash index value Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/pgtable-ppc64.h |7

[RFC PATCH -V2 03/21] powerpc: Don't hard code the size of pte page

2013-02-21 Thread Aneesh Kumar K.V
From: "Aneesh Kumar K.V" USE PTRS_PER_PTE to indicate the size of pte page. Signed-off-by: Aneesh Kumar K.V powerpc: Don't hard code the size of pte page USE PTRS_PER_PTE to indicate the size of pte page. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/pgtable.h |6 ++

[RFC PATCH -V2 01/21] powerpc: Use signed formatting when printing error

2013-02-21 Thread Aneesh Kumar K.V
From: "Aneesh Kumar K.V" PAPR define these errors as negative values. So print them accordingly for easy debugging. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/platforms/pseries/lpar.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/pseries/lp

Re: [PATCH 3/4] KVM: PPC: Book3S HV: Preserve guest CFAR register value

2013-02-21 Thread Alexander Graf
On 05.02.2013, at 05:10, Paul Mackerras wrote: > The CFAR (Come-From Address Register) is a useful debugging aid that > exists on POWER7 processors. Currently HV KVM doesn't save or restore > the CFAR register for guest vcpus, making the CFAR of limited use in > guests. > > This adds the necess

Re: [PATCH] i2c: Remove unneeded xxx_set_drvdata(..., NULL) calls

2013-02-21 Thread Wolfram Sang
On Fri, Feb 15, 2013 at 03:18:35PM -0800, Doug Anderson wrote: > There is simply no reason to be manually setting the private driver > data to NULL in the remove/fail to probe cases. This is just extra > cruft code that can be removed. > > A few notes: > * Nothing relies on drvdata being set to N

PATCH [1/1] GIANFAR infiinate loop on reception of PAUSE FRAME

2013-02-21 Thread Staale.Aakermann
There is a undesired behavior in the GIANFAR driver that causes a infinite loop stalling the CPU when reception of PAUSE FRAMES. I found this error during testing with a DSL modem (Westermo http://www.westermo.com). This equipment spawns PAUSE FRAMES continuously on its LAN side as long as the l