Re: Disabled LocalPlus Controller (LPC) clock on MPC512x

2014-12-16 Thread Alexander Popov
02.12.2014 13:47, Matteo Facchinetti пишет: On 26/11/2014 12:49, Alexander Popov wrote: Hello. Hi. Thanks for your reply, Matteo. I've looked deeper and have more information about the crash. My Freescale TWR-MPC5125 board instantly reboots if I touch any physical address on the LocalPlus

[PATCH 06/11] powerpc/8xx: Remove duplicated code in set_context()

2014-12-16 Thread Christophe Leroy
Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- arch/powerpc/kernel/head_8xx.S | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S index aa45225..b227902e 100644 ---

[PATCH 01/11] powerpc/8xx: remove remaining unnecessary code in FixupDAR

2014-12-16 Thread Christophe Leroy
Since commit 33fb845a6f01 (powerpc/8xx: Don't use MD_TWC for walk), MD_EPN and MD_TWC are not writen anymore in FixupDAR so saving r3 has become useless. Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- arch/powerpc/kernel/head_8xx.S | 6 -- 1 file changed, 6 deletions(-) diff

[PATCH 03/11] powerpc32: Use kmem_cache memory for PGDIR

2014-12-16 Thread Christophe Leroy
When pages are not 4K, PGDIR table is allocated with kmalloc(). In order to optimise TLB handlers, aligned memory is needed. kmalloc() doesn't provide aligned memory blocks, so lets use a kmem_cache pool instead. Signed-off-by: Christophe Leroy christophe.le...@c-s.fr ---

[PATCH 00/11] powerpc8xx: Further optimisation of TLB handling

2014-12-16 Thread Christophe Leroy
This patchset provides a further optimisation of TLB handling in the 8xx. Main changes are based on: - Using processor handling of PGD/PTE Validity bits instead of testing ourselves the entries validity - Aligning PGD address to allow direct bit manipulation - Not saving registers like CR when not

[PATCH 07/11] powerpc/8xx: macro for handling CPU15 errata

2014-12-16 Thread Christophe Leroy
Having a macro will help keep clear code. Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- arch/powerpc/kernel/head_8xx.S | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S index

[PATCH 02/11] powerpc/8xx: remove tests on PGDIR entry validity

2014-12-16 Thread Christophe Leroy
Kernel MMU handling code handles validity of entries via _PMD_PRESENT which corresponds to V bit in MD_TWC and MI_TWC. When the V bit is not set, MPC8xx triggers TLBError exception. So we don't have to check that and branch ourself to TLBError. We can set TLB entries with non present entries,

[PATCH 05/11] powerpc/8xx: Optimise access to swapper_pg_dir

2014-12-16 Thread Christophe Leroy
All accessed to PGD entries are done via 0(r11). By using lower part of swapper_pg_dir as load index to r11, we can remove the ori instruction. Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- arch/powerpc/kernel/head_8xx.S | 22 ++ 1 file changed, 10

[PATCH 11/11] powerpc/8xx: Add support for TASK_SIZE greater than 0x80000000

2014-12-16 Thread Christophe Leroy
By default, TASK_SIZE is set to 0x8000 for PPC_8xx, which is most likely sufficient for most cases. However, kernel configuration allows to set TASK_SIZE to another value, so the 8xx shall handle it. Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- arch/powerpc/kernel/head_8xx.S

[PATCH 08/11] powerpc/8xx: Handle CR out of exception PROLOG/EPILOG

2014-12-16 Thread Christophe Leroy
In order to be able to reduce scope during which CR is saved, we take CR saving/restoring out of exception PROLOG and EPILOG Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- arch/powerpc/kernel/head_8xx.S | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git

[PATCH 10/11] powerpc/8xx: Use SPRG2 instead of DAR for saving r3

2014-12-16 Thread Christophe Leroy
We now have SPRG2 available as in it not used anymore for saving CR, so we don't need to crash DAR anymore for saving r3 for CPU6 ERRATA handling. Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- arch/powerpc/kernel/head_8xx.S | 9 - 1 file changed, 4 insertions(+), 5

[PATCH 09/11] powerpc/8xx: dont save CR in SCRATCH registers

2014-12-16 Thread Christophe Leroy
CR only needs to be preserved when checking if we are handling a kernel address. So we can preserve CR in a register: - In ITLBMiss, check is done only when CONFIG_MODULES is defined. Otherwise we don't need to do anything at all with CR. - If CONFIG_8xx_CPU6 is defined, we have r3 available for

[PATCH 04/11] powerpc/8xx: Take benefit of aligned PGDIR

2014-12-16 Thread Christophe Leroy
L1 base address is now aligned so we can insert L1 index into r11 directly and then preserve r10 Signed-off-by: Christophe Leroy christophe.le...@c-s.fr --- arch/powerpc/kernel/head_8xx.S | 34 +++--- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git

Re: [PATCH 13/18] powerpc/uaccess: fix sparse errors

2014-12-16 Thread Michael S. Tsirkin
On Sun, Dec 14, 2014 at 06:52:51PM +0200, Michael S. Tsirkin wrote: virtio wants to read bitwise types from userspace using get_user. At the moment this triggers sparse errors, since the value is passed through an integer. Fix that up using __force. Signed-off-by: Michael S. Tsirkin

[PATCH v2 0/3] powerpc/pstore: Add pstore support for nvram partitions

2014-12-16 Thread Hari Bathini
This patch series adds pstore support on powernv platform to read different nvram partitions and write compressed data to oops-log nvram partition. As pseries platform already has pstore support, this series moves most of the common code for pseries and powernv platforms to a common file. Tested

[PATCH v2 1/3] powerpc/nvram: move generic code for nvram and pstore

2014-12-16 Thread Hari Bathini
With minor checks, we can move most of the code for nvram under pseries to a common place to be re-used by other powerpc platforms like powernv. This patch moves such common code to arch/powerpc/kernel/nvram_64.c file. Signed-off-by: Hari Bathini hbath...@linux.vnet.ibm.com ---

[PATCH v2 2/3] pstore: Add pstore type id for firmware partition

2014-12-16 Thread Hari Bathini
This patch adds a pstore type id to be used for opal specific nvram partitions. Signed-off-by: Hari Bathini hbath...@linux.vnet.ibm.com --- fs/pstore/inode.c |3 +++ include/linux/pstore.h |1 + 2 files changed, 4 insertions(+) diff --git a/fs/pstore/inode.c b/fs/pstore/inode.c

[PATCH v2 3/3] pstore: add pstore support on powernv

2014-12-16 Thread Hari Bathini
This patch extends pstore, a generic interface to platform dependent persistent storage, support for powernv platform to capture certain useful information, during dying moments. Such support is already in place for pseries platform. This patch re-uses most of that code. Signed-off-by: Hari

Re: [PATCH 13/18] powerpc/uaccess: fix sparse errors

2014-12-16 Thread Michael Ellerman
On Tue, 2014-12-16 at 18:47 +0200, Michael S. Tsirkin wrote: On Sun, Dec 14, 2014 at 06:52:51PM +0200, Michael S. Tsirkin wrote: virtio wants to read bitwise types from userspace using get_user. At the moment this triggers sparse errors, since the value is passed through an integer.

Re: [PATCH v2 1/3] powerpc/nvram: move generic code for nvram and pstore

2014-12-16 Thread Michael Ellerman
On Tue, 2014-12-16 at 23:35 +0530, Hari Bathini wrote: With minor checks, we can move most of the code for nvram under pseries to a common place to be re-used by other powerpc platforms like powernv. This patch moves such common code to arch/powerpc/kernel/nvram_64.c file. Sharing the code is

Re: [PATCH 13/18] powerpc/uaccess: fix sparse errors

2014-12-16 Thread Benjamin Herrenschmidt
On Tue, 2014-12-16 at 18:47 +0200, Michael S. Tsirkin wrote: On Sun, Dec 14, 2014 at 06:52:51PM +0200, Michael S. Tsirkin wrote: virtio wants to read bitwise types from userspace using get_user. At the moment this triggers sparse errors, since the value is passed through an integer.

Re: [PATCH 1/3] powerpc: Don't use local named register variable in current_thread_info

2014-12-16 Thread Alexander Graf
On 31.10.14 04:47, Anton Blanchard wrote: LLVM doesn't support local named register variables and is unlikely to. current_thread_info is using one, fix it by moving it out and calling it __current_r1(). I gave it a bit of an obscure name because we don't want anyone else using it - they

RE: PROBLEM: USB isochronous urb leak on EHCI driver

2014-12-16 Thread Peter Chen
My configuration: - Host: Freescale i.MX512 with ARM Cortex A8 (USB 2.0 host controller) Linux kernel: 2.6.31, using EHCI USB driver Hub: 4-PORT USB 1.1 HUB (Texas Instruments PN: tusb2046b) Devices: 4 USB 1.1 audio codecs (Texas Instruments PN: pcm2901) Note: each

Re: [PATCH 1/3] powerpc: Don't use local named register variable in current_thread_info

2014-12-16 Thread Anton Blanchard
Hi Alex, Git bisect managed to point me to this commit as the offender for OOPSes on e5500 and e6500 (and maybe the G4 as well, not sure). Doing a git revert of this commit on top of linus/master makes things work fine for me again. Ouch, sorry for that, I'll work to reproduce. What gcc