[PATCH] powerpc/85xx: Add platform_device declaration to fsl_pci.h

2013-03-04 Thread Jia Hongtao
mpc85xx_pci_err_probe(struct platform_device *op) need platform_device declaration for definition. Otherwise, it will cause compile error if any files including fsl_pci.h without declaration of platform_device. Signed-off-by: Jia Hongtao --- arch/powerpc/sysdev/fsl_pci.h |2 ++ 1 files chang

[PATCH V4] powerpc/85xx: Add machine check handler to fix PCIe erratum on mpc85xx

2013-03-04 Thread Jia Hongtao
A PCIe erratum of mpc85xx may causes a core hang when a link of PCIe goes down. when the link goes down, Non-posted transactions issued via the ATMU requiring completion result in an instruction stall. At the same time a machine-check exception is generated to the core to allow further processing b

[PATCH 0/3] powerpc: FSCR fixes for POWER8

2013-03-04 Thread Michael Neuling
Benh, Here are a few fixes for the POWER8 FSCR. First patch changes the FSCR so that it's set on secondary CPUs as well as when MSR HV=0. Second two patches make sure that the FSCR DSCR bit is set so that we don't trap on DSCR accesses. These are aimed to fix issues in 3.9. Mikey

[PATCH 1/3] powerpc: Fix setting FSCR for HV=0 and secondary CPUs

2013-03-04 Thread Michael Neuling
Currently we only set the FSCR when HV=1 but this feature is available when HV=0 also. This patch sets FSCR when HV=0. Also, we currently only set the FSCR on the master CPU. This patch also sets the FSCR on secondary CPUs. Signed-off-by: Michael Neuling cc: Ian Munsie --- arch/powerpc/kerne

[PATCH 2/3] powerpc: Add DSCR FSCR register bit definition

2013-03-04 Thread Michael Neuling
Also harmonise TAR bit definition too. Signed-off-by: Michael Neuling --- arch/powerpc/include/asm/reg.h |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h index e665861..a43cd2d 100644 --- a/arch/powerpc/inclu

[PATCH 3/3] powerpc: Set DSCR bit in FSCR setup

2013-03-04 Thread Michael Neuling
We support DSCR so we should make sure we set it in the FSCR incase some firmwares don't set it. Signed-off-by: Michael Neuling --- arch/powerpc/kernel/cpu_setup_power.S |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/cpu_setup_power.S b/arch/powerpc/k

Re: [PATCH -V1 06/24] powerpc: Reduce PTE table memory wastage

2013-03-04 Thread Aneesh Kumar K.V
Paul Mackerras writes: > On Tue, Feb 26, 2013 at 01:34:56PM +0530, Aneesh Kumar K.V wrote: >> From: "Aneesh Kumar K.V" >> >> We allocate one page for the last level of linux page table. With THP and >> large page size of 16MB, that would mean we are be wasting large part >> of that page. To map

Re: [PATCH -V1 07/24] powerpc: Add size argument to pgtable_cache_add

2013-03-04 Thread Aneesh Kumar K.V
Paul Mackerras writes: > On Tue, Feb 26, 2013 at 01:34:57PM +0530, Aneesh Kumar K.V wrote: >> From: "Aneesh Kumar K.V" >> >> We will use this later with THP changes to request for pmd table of double >> the size. >> THP code does PTE page allocation along with large page request and deposit >

RE: [PATCH 6/6 v8] iommu/fsl: Freescale PAMU driver and IOMMU API implementation.

2013-03-04 Thread Sethi Varun-B16395
> -Original Message- > From: Stuart Yoder [mailto:b08...@gmail.com] > Sent: Saturday, March 02, 2013 4:58 AM > To: Sethi Varun-B16395 > Cc: io...@lists.linux-foundation.org; linuxppc-dev@lists.ozlabs.org; > linux-ker...@vger.kernel.org; Wood Scott-B07421; Joerg Roedel; Yoder > Stuart-B082

Re: [PATCH -V1 09/24] powerpc: Decode the pte-lp-encoding bits correctly.

2013-03-04 Thread Aneesh Kumar K.V
Paul Mackerras writes: > On Tue, Feb 26, 2013 at 01:34:59PM +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. >> >> We also update all relevant funct

Re: [PATCH -V1 09/24] powerpc: Decode the pte-lp-encoding bits correctly.

2013-03-04 Thread Aneesh Kumar K.V
Paul Mackerras writes: > On Tue, Feb 26, 2013 at 01:34:59PM +0530, Aneesh Kumar K.V wrote: >> From: "Aneesh Kumar K.V" >> >> +static inline int hpte_actual_psize(struct hash_pte *hptep, int psize) >> +{ >> +unsigned int mask; >> +int i, penc, shift; >> +/* Look at the 8 bit LP value

Re: [PATCH V4] powerpc/85xx: Add machine check handler to fix PCIe erratum on mpc85xx

2013-03-04 Thread Stuart Yoder
On Mon, Mar 4, 2013 at 2:40 AM, Jia Hongtao wrote: > A PCIe erratum of mpc85xx may causes a core hang when a link of PCIe > goes down. when the link goes down, Non-posted transactions issued > via the ATMU requiring completion result in an instruction stall. > At the same time a machine-check exce

RE: [PATCH 6/6 v8] iommu/fsl: Freescale PAMU driver and IOMMU API implementation.

2013-03-04 Thread Yoder Stuart-B08248
> -Original Message- > From: Sethi Varun-B16395 > Sent: Monday, March 04, 2013 5:31 AM > To: Stuart Yoder > Cc: io...@lists.linux-foundation.org; linuxppc-dev@lists.ozlabs.org; > linux-ker...@vger.kernel.org; Wood > Scott-B07421; Joerg Roedel; Yoder Stuart-B08248 > Subject: RE: [PATCH 6/

RE: [PATCH V4] powerpc/85xx: Add machine check handler to fix PCIe erratum on mpc85xx

2013-03-04 Thread David Laight
> A PCIe erratum of mpc85xx may causes a core hang when a link of PCIe > goes down. when the link goes down, Non-posted transactions issued > via the ATMU requiring completion result in an instruction stall. > At the same time a machine-check exception is generated to the core > to allow further pr

Re: [PATCH -V1 09/24] powerpc: Decode the pte-lp-encoding bits correctly.

2013-03-04 Thread Aneesh Kumar K.V
"Aneesh Kumar K.V" writes: > Paul Mackerras writes: > >> On Tue, Feb 26, 2013 at 01:34:59PM +0530, Aneesh Kumar K.V wrote: >>> From: "Aneesh Kumar K.V" >>> >>> +static inline int hpte_actual_psize(struct hash_pte *hptep, int psize) >>> +{ >>> + unsigned int mask; >>> + int i, penc, shift;

Re: [PATCH -V1 06/24] powerpc: Reduce PTE table memory wastage

2013-03-04 Thread Benjamin Herrenschmidt
On Mon, 2013-03-04 at 16:28 +0530, Aneesh Kumar K.V wrote: > I added the below comment when initializing the list. > > +#ifdef CONFIG_PPC_64K_PAGES > + /* > +* Used to support 4K PTE fragment. The pages are added to list, > +* when we have free framents in the page. We track

Re: [PATCH V4] powerpc/85xx: Add machine check handler to fix PCIe erratum on mpc85xx

2013-03-04 Thread Scott Wood
On 03/04/2013 10:16:10 AM, Stuart Yoder wrote: On Mon, Mar 4, 2013 at 2:40 AM, Jia Hongtao wrote: > A PCIe erratum of mpc85xx may causes a core hang when a link of PCIe > goes down. when the link goes down, Non-posted transactions issued > via the ATMU requiring completion result in an instruc

Re: [PATCH 0/3] Enable multiple MSI feature in pSeries

2013-03-04 Thread Michael Ellerman
On Mon, Mar 04, 2013 at 11:14:53AM +0800, Mike Qiu wrote: > 于 2013/3/1 11:54, Michael Ellerman 写道: > >On Fri, Mar 01, 2013 at 11:08:45AM +0800, Mike wrote: > >>Hi all > >> > >>Any comments? or any questions about my patchset? > >You were going to get some performance numbers that show a definite >

[PATCH] powerpc: Wireup the kcmp syscall to sys_ni

2013-03-04 Thread Tony Breeds
Since kmp takes 2 unsigned long args there should be a compat wrapper. Since one isn't provided I think it's safer just to hook this up to not implemented. If we need it later we can do it properly then. Signed-off-by: Tony Breeds --- arch/powerpc/include/asm/systbl.h | 1 + arch/powerpc/i

Re: [PATCH] ppc32: Fix compile of sha1-powerpc-asm.S

2013-03-04 Thread Christian Kujau
On Tue, 26 Feb 2013 at 13:20, Tony Breeds wrote: > When building with CRYPTO_SHA1_PPC enabled we fail with: > --- > powerpc/crypto/sha1-powerpc-asm.S: Assembler messages: > powerpc/crypto/sha1-powerpc-asm.S:116: Error: can't resolve `0' {*ABS* > section} - `STACKFRAMESIZE' {*UND* section} > powerp

Re: [PATCH V2] lglock: add read-preference local-global rwlock

2013-03-04 Thread Michel Lespinasse
On Sun, Mar 3, 2013 at 9:40 AM, Oleg Nesterov wrote: >> However, I still think that FALLBACK_BASE only adds the unnecessary >> complications. But even if I am right this is subjective of course, please >> feel free to ignore. Would it help if I sent out that version (without FALLBACK_BASE) as a f

Re: [PATCH] kexec/ppc: Fix kernel program entry point while changing the load addr

2013-03-04 Thread Simon Horman
On Mon, Mar 04, 2013 at 11:26:24AM +0530, Suzuki K. Poulose wrote: > On 03/04/2013 07:11 AM, Simon Horman wrote: > >[ Cc: linuxppc-dev@lists.ozlabs.org ] > > > >On Sun, Mar 03, 2013 at 01:06:00PM +0530, Suzuki K. Poulose wrote: > >>From: Suzuki K. Poulose > >> > >>uImage probe fills the entry poin

Re: [PATCH] powerpc: Wireup the kcmp syscall to sys_ni

2013-03-04 Thread Stephen Rothwell
Hi Tony, On Tue, 5 Mar 2013 11:39:54 +1100 Tony Breeds wrote: > > diff --git a/arch/powerpc/include/asm/systbl.h > b/arch/powerpc/include/asm/systbl.h > index 535b6d8..289bb52 100644 > --- a/arch/powerpc/include/asm/systbl.h > +++ b/arch/powerpc/include/asm/systbl.h > @@ -358,3 +358,4 @@ SYSCAL

[PATCH v2] powerpc: Wireup the kcmp syscall to sys_ni

2013-03-04 Thread Tony Breeds
Since kmp takes 2 unsigned long args there should be a compat wrapper. Since one isn't provided I think it's safer just to hook this up to not implemented. If we need it later we can do it properly then. Signed-off-by: Tony Breeds --- Changes since v1: - Add comment to make finding the syscall

Re: [PATCH] drivers/tty/hvc: using strlcpy instead of strncpy

2013-03-04 Thread Chen Gang
于 2013年02月28日 21:47, Jiri Slaby 写道: >>> when strlen(&pi->location_code[0]) == HVCS_CLC_LENGTH + 2 > It cannot, pi->location_code is defined as char[HVCS_CLC_LENGTH + 1]. > really, it is, I did not notice it. but I still prefer to modify it, but the patch should be changed such as: su

Re: [PATCH -V1 07/24] powerpc: Add size argument to pgtable_cache_add

2013-03-04 Thread Paul Mackerras
On Mon, Mar 04, 2013 at 04:32:24PM +0530, Aneesh Kumar K.V wrote: > > Now with table_size argument, the first arg is no more the shift value, > rather it is index into the array. Hence i changed the variable name. I > will split that patch to make it easy for review. OK, so you're saying that the

Re: [PATCH -V1 06/24] powerpc: Reduce PTE table memory wastage

2013-03-04 Thread Paul Mackerras
On Mon, Mar 04, 2013 at 04:28:42PM +0530, Aneesh Kumar K.V wrote: > Paul Mackerras writes: > > > The other general comment I have is that it's not really clear when a > > page will be on the mm->context.pgtable_list and when it won't. I > > would like to see an invariant that says something like

Re: [PATCH -V1 09/24] powerpc: Decode the pte-lp-encoding bits correctly.

2013-03-04 Thread Paul Mackerras
On Mon, Mar 04, 2013 at 05:11:53PM +0530, Aneesh Kumar K.V wrote: > Paul Mackerras writes: > >> +static inline int hpte_actual_psize(struct hash_pte *hptep, int psize) > >> +{ > >> + unsigned int mask; > >> + int i, penc, shift; > >> + /* Look at the 8 bit LP value */ > >> + unsigned int lp =

Re: [PATCH 2/3] irq: Add hw continuous IRQs map to virtual continuous IRQs support

2013-03-04 Thread Michael Ellerman
On Tue, Jan 15, 2013 at 03:38:55PM +0800, Mike Qiu wrote: > Adding a function irq_create_mapping_many() which can associate > multiple MSIs to a continous irq mapping. > > This is needed to enable multiple MSI support for pSeries. > > Signed-off-by: Mike Qiu > --- > include/linux/irq.h |

Re: [PATCH 2/3] irq: Add hw continuous IRQs map to virtual continuous IRQs support

2013-03-04 Thread Paul Mundt
On Tue, Jan 15, 2013 at 03:38:55PM +0800, Mike Qiu wrote: > Adding a function irq_create_mapping_many() which can associate > multiple MSIs to a continous irq mapping. > > This is needed to enable multiple MSI support for pSeries. > > +int irq_create_mapping_many(struct irq_domain *domain, > +

Re: [PATCH 1/3] powerpc: Fix setting FSCR for HV=0 and secondary CPUs

2013-03-04 Thread Benjamin Herrenschmidt
On Mon, 2013-03-04 at 20:46 +1100, Michael Neuling wrote: > Currently we only set the FSCR when HV=1 but this feature is available when > HV=0 also. This patch sets FSCR when HV=0. > > Also, we currently only set the FSCR on the master CPU. This patch also sets > the FSCR on secondary CPUs. Ple

Re: [PATCH 2/3] powerpc: Add DSCR FSCR register bit definition

2013-03-04 Thread Benjamin Herrenschmidt
On Mon, 2013-03-04 at 20:46 +1100, Michael Neuling wrote: > Also harmonise TAR bit definition too. Same, expand accronyms, minimum blurb about what these are about (not a long explanation, just so that when I come out of the blue I can at least connect it to something that makes sense :-) Cheers,

[PATCH 0/3] powerpc: FSCR fixes for POWER8

2013-03-04 Thread Michael Neuling
Benh, Here are a few fixes for the POWER8 (Performance Optimization With Enhanced RISC Eight) FSCR (Facility Status & Control Register). First patch changes the FSCR so that it's set on secondary CPUs as well as when MSR HV=0. Second two patches make sure that the FSCR DSCR (Data Stream Control

[PATCH 1/3] powerpc: Fix setting FSCR for HV=0 and on secondary CPUs

2013-03-04 Thread Michael Neuling
Currently we only set the FSCR (Facility Status and Control Register) when HV=1 but this feature is available when HV=0 also. This patch sets FSCR when HV=0. Also, we currently only set the FSCR on the master CPU. This patch also sets the FSCR on secondary CPUs. Signed-off-by: Michael Neuling

[PATCH 2/3] powerpc: Add DSCR FSCR register bit definition

2013-03-04 Thread Michael Neuling
This sets the DSCR (Data Stream Control Register) in the FSCR (Facility Status & Control Register). Also harmonise TAR (Target Address Register) FSCR bit definition too. Signed-off-by: Michael Neuling --- arch/powerpc/include/asm/reg.h |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

[PATCH 3/3] powerpc: Set DSCR bit in FSCR setup

2013-03-04 Thread Michael Neuling
We support DSCR (Data Stream Control Register) so we should make sure we set it in the FSCR (Facility Status & Control Register) incase some firmwares don't set it. If we don't set this, we'll take a facility unavailable exception when using the DSCR. Signed-off-by: Michael Neuling --- arch/pow

[git pull] Please pull powerpc.git merge branch

2013-03-04 Thread Benjamin Herrenschmidt
Hi Linus ! Here are a few powerpc bits & fixes for rc1. A couple of str*cpy fixes, some fixes in handling the FSCR register on Power8 (controls the enabling of processor features), a 32-bit build fix and a couple more nits. Cheers, Ben. The following changes since commit 6dbe51c251a327e012439c47

[PATCH] powerpc/powernv: Fix next available MSI IRQ

2013-03-04 Thread Gavin Shan
The allocation of MSI is implemented based on bitmap and working like the mechanism of strict round through the traced next available cursor. However, the next available MSI is never updated in current implementation. The patch fixes the issue. Signed-off-by: Gavin Shan --- arch/powerpc/platform

Re: [PATCH 2/3] irq: Add hw continuous IRQs map to virtual continuous IRQs support

2013-03-04 Thread Mike Qiu
于 2013/3/5 10:23, Michael Ellerman 写道: On Tue, Jan 15, 2013 at 03:38:55PM +0800, Mike Qiu wrote: Adding a function irq_create_mapping_many() which can associate multiple MSIs to a continous irq mapping. This is needed to enable multiple MSI support for pSeries. Signed-off-by: Mike Qiu --- i

Re: [PATCH 2/3] irq: Add hw continuous IRQs map to virtual continuous IRQs support

2013-03-04 Thread Mike Qiu
于 2013/3/5 10:41, Paul Mundt 写道: On Tue, Jan 15, 2013 at 03:38:55PM +0800, Mike Qiu wrote: Adding a function irq_create_mapping_many() which can associate multiple MSIs to a continous irq mapping. This is needed to enable multiple MSI support for pSeries. +int irq_create_mapping_many(struct ir