RE: [PATCH 5/6 v2] kvm: powerpc: booke: Add linux pte lookup like booke3s

2013-08-06 Thread Bhushan Bharat-R65777
-Original Message- From: Bhushan Bharat-R65777 Sent: Tuesday, August 06, 2013 6:42 AM To: Wood Scott-B07421 Cc: Benjamin Herrenschmidt; ag...@suse.de; kvm-...@vger.kernel.org; k...@vger.kernel.org; linuxppc-dev@lists.ozlabs.org Subject: RE: [PATCH 5/6 v2] kvm: powerpc: booke: Add

Re: PCIE device errors after linux kernel upgrade

2013-08-06 Thread Johannes Thumshirn
On Mon, Aug 05, 2013 at 09:38:45AM -0600, Bjorn Helgaas wrote: [+cc linuxppc-dev] On Mon, Aug 5, 2013 at 5:17 AM, Leon Ravich lrav...@gmail.com wrote: Hi all , I am trying to upgrade ours embedded device (freescale powerPC P2020 cpu) linux kernel , till now we used 2.6.32 I am trying to

Re: mm/slab: ppc: ubi: kmalloc_slab WARNING / PPC + UBI driver

2013-08-06 Thread Wladislav Wiebe
Hi, On 31/07/13 19:04, Christoph Lameter wrote: On Wed, 31 Jul 2013, Wladislav Wiebe wrote: Thanks for the point, do you plan to make kmalloc_large available for extern access in a separate mainline patch? Since kmalloc_large is statically defined in slub_def.h and when including it to

[PATCH v3 1/3] selftests: Add infrastructure for powerpc selftests

2013-08-06 Thread Michael Ellerman
This commit adds a powerpc subdirectory to tools/testing/selftests, for tests that are powerpc specific. On other architectures nothing is built. The makefile supports cross compilation if the user sets ARCH and CROSS_COMPILE. Signed-off-by: Michael Ellerman mich...@ellerman.id.au --- v3: Add

[PATCH v3 2/3] selftests: Add support files for powerpc tests

2013-08-06 Thread Michael Ellerman
This commit adds support code used by upcoming powerpc tests. Signed-off-by: Michael Ellerman mich...@ellerman.id.au --- v3: Print when the child dies due to a signal v2: Put back the SIGALARM handler to make the hang logic work. tools/testing/selftests/powerpc/harness.c | 105

Re: PCIE device errors after linux kernel upgrade

2013-08-06 Thread Johannes Thumshirn
On Tue, Aug 06, 2013 at 10:26:18AM +0300, Leon Ravich wrote: Hi Johannes no panic just reboot. it is not the first read, it takes few minutes of work with pcie to reboot. Ah, OK. Unfortunately I can't really help you then. Have you looked up the error values from the EDAC driver? If it's

[PATCH v3 3/3] selftests: Add test of PMU instruction counting on powerpc

2013-08-06 Thread Michael Ellerman
This commit adds a test of instruction counting using the PMU on powerpc. Although the bulk of the code is architecture agnostic, the code needs to run a precisely sized loop which is implemented in assembler. Signed-off-by: Michael Ellerman mich...@ellerman.id.au --- v2,3: No change

Re: PCIE device errors after linux kernel upgrade

2013-08-06 Thread Leon Ravich
Thanks Bjorn. 1) If I understand it right this patch only removes the pci :00:00.0: ignoring class 0x0b2000 (doesn't match header type 01) message , don't care about it , had it before . 2) regarding the comparing of printouts: kernel 3.8.13: [ 37.908846] pci_bus :00: scanning bus [

Re: PCIE device errors after linux kernel upgrade

2013-08-06 Thread Leon Ravich
Hi Johannes no panic just reboot. it is not the first read, it takes few minutes of work with pcie to reboot. On 6 August 2013 10:07, Johannes Thumshirn johannes.thumsh...@men.de wrote: On Mon, Aug 05, 2013 at 09:38:45AM -0600, Bjorn Helgaas wrote: [+cc linuxppc-dev] On Mon, Aug 5, 2013 at

Re: PCIE device errors after linux kernel upgrade

2013-08-06 Thread Leon Ravich
Have you looked up the error values from the EDAC driver? [ 37.961580] PCIE error(s) detected [ 37.964971] PCIE ERR_DR register: 0x0002 = Invalid CONFIG_ADDR/PEX_CONFIG_DATA access detected [ 37.969229] PCIE ERR_CAP_STAT register: 0x0041 = Transaction originated

[PATCH 0/3] powerpc: several patches for icache flush

2013-08-06 Thread Kevin Hao
These patches passed the build test with the following configurations. ppc40x_defconfig ppc64e_defconfig ppc64_defconfig mpc85xx_defconfig mpc85xx_smp_defconfig corenet32_smp_defconfig corenet64_smp_defconfig ppc44x_defconfig

[PATCH 1/3] powerpc: move the testing of CPU_FTR_COHERENT_ICACHE into __flush_icache_range

2013-08-06 Thread Kevin Hao
In function flush_icache_range(), we use cpu_has_feature() to test the feature bit of CPU_FTR_COHERENT_ICACHE. But this seems not optimal for two reasons: a) For ppc32, the function __flush_icache_range() already do this check with the macro END_FTR_SECTION_IFSET. b) Compare with the

[PATCH 2/3] powerpc: remove the symbol __flush_icache_range

2013-08-06 Thread Kevin Hao
And now the function flush_icache_range() is just a wrapper which only invoke the function __flush_icache_range() directly. So we don't have reason to keep it anymore. Signed-off-by: Kevin Hao haoke...@gmail.com --- arch/powerpc/include/asm/cacheflush.h | 7 +-- arch/powerpc/kernel/misc_32.S

Re: [PATCH 1/3] powerpc: move the testing of CPU_FTR_COHERENT_ICACHE into __flush_icache_range

2013-08-06 Thread Benjamin Herrenschmidt
On Tue, 2013-08-06 at 18:23 +0800, Kevin Hao wrote: In function flush_icache_range(), we use cpu_has_feature() to test the feature bit of CPU_FTR_COHERENT_ICACHE. But this seems not optimal for two reasons: a) For ppc32, the function __flush_icache_range() already do this check with the

Re: [PATCH 3/3] powerpc: check CPU_FTR_COHERENT_ICACHE in __flush_dcache_icache for 64bit kernel

2013-08-06 Thread Benjamin Herrenschmidt
On Tue, 2013-08-06 at 18:23 +0800, Kevin Hao wrote: We don't need to flush the dcache and invalidate the icache on the CPU which has CPU_FTR_COHERENT_ICACHE set. Actually we probably need an isync... Ben. Signed-off-by: Kevin Hao haoke...@gmail.com --- arch/powerpc/kernel/misc_64.S | 3

[PATCH] powerpc: Convert out of line __arch_hweight to inline

2013-08-06 Thread Madhavan Srinivasan
Patch attempts to improve the performace of __arch_hweight functions by making them inline instead of current out of line implementation. Testcase is to disable/enable SMT on a large (192 thread) POWER7 lpar. Program used for SMT disable/enable is ppc64_cpu with --smt=[off/on] option. Here are

[PATCH 2/6 v3] kvm: powerpc: allow guest control E attribute in mas2

2013-08-06 Thread Bharat Bhushan
E bit in MAS2 bit indicates whether the page is accessed in Little-Endian or Big-Endian byte order. There is no reason to stop guest setting E, so allow him. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v2-v3 - no change v1-v2 - no change arch/powerpc/kvm/e500.h |2 +- 1

[PATCH 1/6 v3] powerpc: book3e: _PAGE_LENDIAN must be _PAGE_ENDIAN

2013-08-06 Thread Bharat Bhushan
For booke3e _PAGE_ENDIAN is not defined. Infact what is defined is _PAGE_LENDIAN which is wrong and should be _PAGE_ENDIAN. There are no compilation errors as arch/powerpc/include/asm/pte-common.h defines _PAGE_ENDIAN to 0 as it is not defined anywhere. Signed-off-by: Bharat Bhushan

[PATCH 0/6 v3] kvm: powerpc: use cache attributes from linux pte

2013-08-06 Thread Bharat Bhushan
From: Bharat Bhushan bharat.bhus...@freescale.com First patch is a typo fix where book3e define _PAGE_LENDIAN while it should be defined as _PAGE_ENDIAN. This seems to show that this is never exercised :-) Second and third patch is to allow guest controlling G-Guarded and E-Endian TLB attributes

[PATCH 3/6 v3] kvm: powerpc: allow guest control G attribute in mas2

2013-08-06 Thread Bharat Bhushan
G bit in MAS2 indicates whether the page is Guarded. There is no reason to stop guest setting G, so allow him. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v2-v3 - no change v1-v2 - no change arch/powerpc/kvm/e500.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-)

[PATCH 4/6 v3] powerpc: move linux pte/hugepte search to more generic file

2013-08-06 Thread Bharat Bhushan
Linux pte search functions find_linux_pte_or_hugepte() and find_linux_pte() have nothing specific to 64bit anymore. So they are move from pgtable-ppc64.h to asm/pgtable.h Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v2-v3 - no change v1-v2 - This is a new change in this

[PATCH 6/6 v3] kvm: powerpc: use caching attributes as per linux pte

2013-08-06 Thread Bharat Bhushan
KVM uses same WIM tlb attributes as the corresponding qemu pte. For this we now search the linux pte for the requested page and get these cache caching/coherency attributes from pte. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- v2-v3 - setting pgdir before

[PATCH 5/6 v3] kvm: powerpc: keep only pte search logic in lookup_linux_pte

2013-08-06 Thread Bharat Bhushan
lookup_linux_pte() was searching for a pte and also sets access flags is writable. This function now searches only pte while access flag setting is done explicitly. This pte lookup is not kvm specific, so moved to common code (asm/pgtable.h) My Followup patch will use this on booke.

RE: [PATCH 5/6 v2] kvm: powerpc: booke: Add linux pte lookup like booke3s

2013-08-06 Thread Bhushan Bharat-R65777
-Original Message- From: Wood Scott-B07421 Sent: Tuesday, August 06, 2013 12:49 AM To: Bhushan Bharat-R65777 Cc: Benjamin Herrenschmidt; Wood Scott-B07421; ag...@suse.de; kvm- p...@vger.kernel.org; k...@vger.kernel.org; linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH 5/6 v2]

Re: mm/slab: ppc: ubi: kmalloc_slab WARNING / PPC + UBI driver

2013-08-06 Thread Christoph Lameter
On Tue, 6 Aug 2013, Wladislav Wiebe wrote: ok, just saw in slab/for-linus branch that those stuff is reverted again.. No that was only for the 3.11 merge by Linus. The 3.12 patches have not been put into pekkas tree. ___ Linuxppc-dev mailing list

[PATCH 00/63] 64bit PowerPC little endian support

2013-08-06 Thread Anton Blanchard
This patchset adds support for building a 64bit PowerPC little endian kernel. binutils and gcc support (powerpcle/powerpc64le) is already upstream. For gcc you can use gcc tip, or for the less adventurous the gcc 4.8 branch works too. QEMU patches to boot a little endian kernel will be posted

[PATCH 01/63] powerpc: Align p_toc

2013-08-06 Thread Anton Blanchard
p_toc is an 8 byte relative offset to the TOC that we place in the text section. This means it is only 4 byte aligned where it should be 8 byte aligned. Add an explicit alignment. Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/kernel/head_64.S | 1 + 1 file changed, 1

[PATCH 03/63] powerpc: Wrap MSR macros with parentheses

2013-08-06 Thread Anton Blanchard
Not having parentheses around a macro is asking for trouble. Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/include/asm/reg.h | 8 arch/powerpc/include/asm/reg_booke.h | 8 2 files changed, 8 insertions(+), 8 deletions(-) diff --git

[PATCH 04/63] powerpc: Remove SAVE_VSRU and REST_VSRU macros

2013-08-06 Thread Anton Blanchard
We always use VMX loads and stores to manage the high 32 VSRs. Remove these unused macros. Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/include/asm/ppc_asm.h | 13 - 1 file changed, 13 deletions(-) diff --git a/arch/powerpc/include/asm/ppc_asm.h

[PATCH 07/63] powerpc: Fix a number of sparse warnings

2013-08-06 Thread Anton Blanchard
Address some of the trivial sparse warnings in arch/powerpc. Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/kernel/legacy_serial.c | 2 +- arch/powerpc/kernel/pci-common.c| 4 ++-- arch/powerpc/kernel/pci_64.c| 2 +-

[PATCH 05/63] powerpc: Simplify logic in include/uapi/asm/elf.h

2013-08-06 Thread Anton Blanchard
Simplify things by putting all the 32bit and 64bit defines together instead of in two spots. Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/include/uapi/asm/elf.h | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git

[PATCH 06/63] powerpc/pseries: Simplify H_GET_TERM_CHAR

2013-08-06 Thread Anton Blanchard
plpar_get_term_char is only used once and just adds a layer of complexity to H_GET_TERM_CHAR. plpar_put_term_char isn't used at all so we can remove it. Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/platforms/pseries/hvconsole.c | 12 +---

[PATCH 08/63] powerpc/pci: Don't use bitfield for force_32bit_msi

2013-08-06 Thread Anton Blanchard
Fix a sparse warning about force_32bit_msi being a one bit bitfield. Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/include/asm/pci-bridge.h | 2 +- arch/powerpc/kernel/pci_64.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 10/63] powerpc: Make prom.c device tree accesses endian safe

2013-08-06 Thread Anton Blanchard
From: Ian Munsie imun...@au1.ibm.com On PowerPC the device tree is always big endian, but the CPU could be either, so add be32_to_cpu where appropriate and change the types of device tree data to __be32 etc to allow sparse to locate endian issues. Signed-off-by: Ian Munsie imun...@au1.ibm.com

[PATCH 09/63] powerpc: Stop using non-architected shared_proc field in lppaca

2013-08-06 Thread Anton Blanchard
Although the shared_proc field in the lppaca works today, it is not architected. A shared processor partition will always have a non zero yield_count so use that instead. Create a wrapper so users don't have to know about the details. In order for older kernels to continue to work on KVM we need

[PATCH 11/63] powerpc: More little endian fixes for prom.c

2013-08-06 Thread Anton Blanchard
From: Alistair Popple alist...@popple.id.au Signed-off-by: Alistair Popple alist...@popple.id.au --- arch/powerpc/kernel/prom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index d072f67..987a4fb 100644 ---

[PATCH 13/63] powerpc: Make cache info device tree accesses endian safe

2013-08-06 Thread Anton Blanchard
Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/kernel/setup_64.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index b3b5fd3..00dfcc5 100644 --- a/arch/powerpc/kernel/setup_64.c +++

[PATCH 12/63] powerpc: Make RTAS device tree accesses endian safe

2013-08-06 Thread Anton Blanchard
Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/kernel/rtas.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c index 80b5ef4..98b26af 100644 --- a/arch/powerpc/kernel/rtas.c

[PATCH 15/63] powerpc: Make logical to real cpu mapping code endian safe

2013-08-06 Thread Anton Blanchard
Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/kernel/setup-common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index 63d051f..ee0e055 100644 ---

[PATCH 14/63] powerpc: Make RTAS calls endian safe

2013-08-06 Thread Anton Blanchard
RTAS expects arguments in the call buffer to be big endian so we need to byteswap on little endian builds Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/include/asm/rtas.h | 8 arch/powerpc/kernel/rtas.c | 38 +++--- 2 files

[PATCH 02/63] powerpc: handle unaligned ldbrx/stdbrx

2013-08-06 Thread Anton Blanchard
Normally when we haven't implemented an alignment handler for a load or store instruction the process will be terminated. The alignment handler uses the DSISR (or a pseudo one) to locate the right handler. Unfortunately ldbrx and stdbrx overlap lfs and stfs so we incorrectly think ldbrx is an lfs

[PATCH 16/63] powerpc: More little endian fixes for setup-common.c

2013-08-06 Thread Anton Blanchard
From: Alistair Popple alist...@popple.id.au Signed-off-by: Alistair Popple alist...@popple.id.au --- arch/powerpc/kernel/setup-common.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index

[PATCH 18/63] powerpc: Fix some endian issues in xics code

2013-08-06 Thread Anton Blanchard
Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/sysdev/xics/xics-common.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/sysdev/xics/xics-common.c b/arch/powerpc/sysdev/xics/xics-common.c index 9049d9f..fe0cca4 100644 ---

[PATCH 17/63] powerpc: Add some endian annotations to time and xics code

2013-08-06 Thread Anton Blanchard
Fix a couple of sparse warnings. Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/kernel/time.c| 2 +- arch/powerpc/sysdev/xics/icp-native.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c

[PATCH 20/63] powerpc: Make device tree accesses in cache info code endian safe

2013-08-06 Thread Anton Blanchard
Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/kernel/cacheinfo.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/kernel/cacheinfo.c b/arch/powerpc/kernel/cacheinfo.c index 9262cf2..6549327 100644 --- a/arch/powerpc/kernel/cacheinfo.c

[PATCH 19/63] powerpc: of_parse_dma_window should take a __be32 *dma_window

2013-08-06 Thread Anton Blanchard
We pass dma_window to of_parse_dma_window as a void * and then run through hoops to cast it back to a u32 array. In the process we lose endian annotation. Simplify it by just passing a __be32 * down. Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/include/asm/prom.h| 5

[PATCH 21/63] powerpc: Make prom_init.c endian safe

2013-08-06 Thread Anton Blanchard
From: Benjamin Herrenschmidt b...@kernel.crashing.org Signed-off-by: Benjamin Herrenschmidt b...@kernel.crashing.org Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/kernel/prom_init.c | 253 +++- 1 file changed, 147 insertions(+), 106

[PATCH 22/63] powerpc: Make device tree accesses in HVC VIO console endian safe

2013-08-06 Thread Anton Blanchard
Signed-off-by: Anton Blanchard an...@samba.org --- drivers/tty/hvc/hvc_vio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/hvc/hvc_vio.c b/drivers/tty/hvc/hvc_vio.c index 0c62980..c791b18 100644 --- a/drivers/tty/hvc/hvc_vio.c +++ b/drivers/tty/hvc/hvc_vio.c

[PATCH 24/63] powerpc: Make OF PCI device tree accesses endian safe

2013-08-06 Thread Anton Blanchard
Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/kernel/pci-common.c | 6 +++--- arch/powerpc/kernel/pci_of_scan.c | 23 +-- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c

[PATCH 23/63] powerpc: Make device tree accesses in VIO subsystem endian safe

2013-08-06 Thread Anton Blanchard
Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/kernel/vio.c | 31 +-- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c index 31875a6..78a3506 100644 --- a/arch/powerpc/kernel/vio.c

[PATCH 25/63] powerpc: Make PCI device node device tree accesses endian safe

2013-08-06 Thread Anton Blanchard
Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/kernel/pci_dn.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/kernel/pci_dn.c b/arch/powerpc/kernel/pci_dn.c index df03844..1f61fab 100644 --- a/arch/powerpc/kernel/pci_dn.c

[PATCH 26/63] powerpc: Little endian fixes for legacy_serial.c

2013-08-06 Thread Anton Blanchard
From: Alistair Popple alist...@popple.id.au Signed-off-by: Alistair Popple alist...@popple.id.au --- arch/powerpc/kernel/legacy_serial.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c index

[PATCH 27/63] powerpc: Make NUMA device node code endian safe

2013-08-06 Thread Anton Blanchard
From: Alistair Popple alist...@popple.id.au The device tree is big endian so make sure we byteswap on little endian. We assume any pHyp calls also return big endian results in memory. Signed-off-by: Alistair Popple alist...@popple.id.au --- arch/powerpc/mm/numa.c | 100

[PATCH 30/63] powerpc: Emulate instructions in little endian mode

2013-08-06 Thread Anton Blanchard
Alistair noticed we got a SIGILL on userspace mfpvr instructions. Remove the little endian check in the emulation code, it is probably there to protect against the old pseudo little endian implementations but doesn't make sense for real little endian. Signed-off-by: Anton Blanchard

[PATCH 29/63] powerpc: Fix little endian lppaca, slb_shadow and dtl_entry

2013-08-06 Thread Anton Blanchard
The lppaca, slb_shadow and dtl_entry hypervisor structures are big endian, so we have to byte swap them in little endian builds. LE KVM hosts will also need to be fixed but for now add an #error to remind us. Signed-off-by: Anton Blanchard an...@samba.org ---

[PATCH 31/63] powerpc: Little endian SMP IPI demux

2013-08-06 Thread Anton Blanchard
Add little endian support for demuxing SMP IPIs Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/kernel/smp.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index 98822400..bcdb706

[PATCH 32/63] powerpc/pseries: Fix endian issues in H_GET_TERM_CHAR/H_PUT_TERM_CHAR

2013-08-06 Thread Anton Blanchard
Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/platforms/pseries/hvconsole.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/platforms/pseries/hvconsole.c b/arch/powerpc/platforms/pseries/hvconsole.c index aa0aa37..ef6d59a 100644 ---

[PATCH 33/63] powerpc: Fix little endian coredumps

2013-08-06 Thread Anton Blanchard
We need to set ELF_DATA correctly on LE coredumps. Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/include/uapi/asm/elf.h | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/uapi/asm/elf.h b/arch/powerpc/include/uapi/asm/elf.h index

[PATCH 34/63] powerpc: Make rwlocks endian safe

2013-08-06 Thread Anton Blanchard
Our ppc64 spinlocks and rwlocks use a trick where a lock token and the paca index are placed in the lock with a single store. Since we are using two u16s they need adjusting for little endian. Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/include/asm/paca.h | 5 +

[PATCH 35/63] powerpc: Fix endian issues in VMX copy loops

2013-08-06 Thread Anton Blanchard
Fix the permute loops for little endian. Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/lib/copyuser_power7.S | 54 + arch/powerpc/lib/memcpy_power7.S | 55 ++ 2 files changed, 63 insertions(+), 46

[PATCH 38/63] powerpc: PTRACE_PEEKUSR/PTRACE_POKEUSER of FPR registers in little endian builds

2013-08-06 Thread Anton Blanchard
FPRs overlap the high 64bits of the first 32 VSX registers. The ptrace FP read/write code assumes big endian ordering and grabs the lowest 64 bits. Fix this by using the TS_FPR macro which does the right thing. Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/kernel/ptrace.c | 8

[PATCH 37/63] powerpc: Fix offset of FPRs in VSX registers in little endian builds

2013-08-06 Thread Anton Blanchard
The FPRs overlap the high doublewords of the first 32 VSX registers. Fix TS_FPROFFSET and TS_VSRLOWOFFSET so we access the correct fields in little endian mode. If VSX is disabled the FPRs are only one doubleword in length so TS_FPROFFSET needs adjusting in little endian. Signed-off-by: Anton

[PATCH 36/63] powerpc: Book 3S MMU little endian support

2013-08-06 Thread Anton Blanchard
Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/include/asm/mmu-hash64.h | 4 +-- arch/powerpc/mm/hash_native_64.c | 46 --- arch/powerpc/mm/hash_utils_64.c | 38 ++--- 3 files changed, 46 insertions(+), 42

[PATCH 39/63] powerpc: Little endian builds double word swap VSX state during context save/restore

2013-08-06 Thread Anton Blanchard
The elements within VSX loads and stores are big endian ordered regardless of endianness. Our VSX context save/restore code uses lxvd2x and stxvd2x which is a 2x doubleword operation. This means the two doublewords will be swapped and we have to perform another swap to undo it. We need to do this

[PATCH 40/63] powerpc: Support endian agnostic MMIO

2013-08-06 Thread Anton Blanchard
From: Ian Munsie imun...@au1.ibm.com This patch maps the MMIO functions for 32bit PowerPC to their appropriate instructions depending on CPU endianness. The macros used to create the corresponding inline functions are also renamed by this patch. Previously they had BE or LE in their names which

[PATCH 28/63] powerpc: Add endian annotations to lppaca, slb_shadow and dtl_entry

2013-08-06 Thread Anton Blanchard
Add endian annotation to various hypervisor structures which are defined as big endian. Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/include/asm/lppaca.h | 50 +++ 1 file changed, 25 insertions(+), 25 deletions(-) diff --git

[PATCH 41/63] powerpc: Add little endian support for word-at-a-time functions

2013-08-06 Thread Anton Blanchard
The powerpc word-at-a-time functions are big endian specific. Bring in the x86 version in order to support little endian builds. Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/include/asm/word-at-a-time.h | 71 +++ 1 file changed, 71 insertions(+)

[PATCH 42/63] powerpc: Set MSR_LE bit on little endian builds

2013-08-06 Thread Anton Blanchard
We need to set MSR_LE in kernel and userspace for little endian builds Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/include/asm/reg.h | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h index

[PATCH 43/63] powerpc: Reset MSR_LE on signal entry

2013-08-06 Thread Anton Blanchard
We always take signals in big endian which is wrong. Signals should be taken in native endian. Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/kernel/signal_32.c | 3 ++- arch/powerpc/kernel/signal_64.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git

[PATCH 44/63] powerpc: Include the appropriate endianness header

2013-08-06 Thread Anton Blanchard
From: Ian Munsie imun...@au1.ibm.com This patch will have powerpc include the appropriate generic endianness header depending on what the compiler reports. Signed-off-by: Ian Munsie imun...@au1.ibm.com Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/include/uapi/asm/byteorder.h

[PATCH 45/63] powerpc: endian safe trampoline

2013-08-06 Thread Anton Blanchard
From: Benjamin Herrenschmidt b...@kernel.crashing.org Create a trampoline that works in either endian and flips to the expected endian. Use it for primary and secondary thread entry as well as RTAS and OF call return. Signed-off-by: Benjamin Herrenschmidt b...@kernel.crashing.org Signed-off-by:

[PATCH 46/63] powerpc: Add endian safe trampoline to pseries secondary thread entry

2013-08-06 Thread Anton Blanchard
We might need to flip endian when starting secondary threads via RTAS. Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/kernel/head_64.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index 065d10f..2ae41ab 100644

[PATCH 47/63] pseries: Add H_SET_MODE to change exception endianness

2013-08-06 Thread Anton Blanchard
On little endian builds call H_SET_MODE so exceptions have the correct endianness. We need a better hook to handle flipping back into big endian mode on a kexec, but insert it into the mmu teardown callback for now. Signed-off-by: Anton Blanchard an...@samba.org ---

[PATCH 48/63] powerpc/kvm/book3s_hv: Add little endian guest support

2013-08-06 Thread Anton Blanchard
Add support for the H_SET_MODE hcall so we can select the endianness of our exceptions. We create a guest MSR from scratch when delivering exceptions in a few places and instead of extracting the LPCR[ILE] and inserting it into MSR_LE each time simply create a new variable intr_msr which contains

[PATCH 49/63] powerpc: Remove open coded byte swap macro in alignment handler

2013-08-06 Thread Anton Blanchard
Use swab64/32/16 instead of open coding it. Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/kernel/align.c | 36 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/arch/powerpc/kernel/align.c b/arch/powerpc/kernel/align.c index

[PATCH 50/63] powerpc: Remove hard coded FP offsets in alignment handler

2013-08-06 Thread Anton Blanchard
The alignment handler assumes big endian ordering when selecting the low word of a 64bit floating point value. Use the existing union which works in both little and big endian. Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/kernel/align.c | 4 ++-- 1 file changed, 2

[PATCH 51/63] powerpc: Alignment handler shouldn't access VSX registers with TS_FPR

2013-08-06 Thread Anton Blanchard
The TS_FPR macro selects the FPR component of a VSX register (the high doubleword). emulate_vsx is using this macro to get the address of the associated VSX register. This happens to work on big endian, but fails on little endian. Replace it with an explicit array access. Signed-off-by: Anton

[PATCH 52/63] powerpc: Add little endian support to alignment handler

2013-08-06 Thread Anton Blanchard
Handle most unaligned load and store faults in little endian mode. Strings, multiples and VSX are not supported. Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/kernel/align.c | 93 ++--- 1 file changed, 63 insertions(+), 30 deletions(-)

[PATCH 53/63] powerpc: Handle VSX alignment faults in little endian mode

2013-08-06 Thread Anton Blanchard
Things are complicated by the fact that VSX elements are big endian ordered even in little endian mode. 8 byte loads and stores also write to the top 8 bytes of the register. Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/kernel/align.c | 41

[PATCH 55/63] ibmvscsi: Fix little endian issues

2013-08-06 Thread Anton Blanchard
The hypervisor is big endian, so little endian kernel builds need to byteswap. Signed-off-by: Anton Blanchard an...@samba.org --- drivers/scsi/ibmvscsi/ibmvscsi.c | 153 ++- drivers/scsi/ibmvscsi/viosrp.h | 46 ++-- 2 files changed, 108

[PATCH 54/63] ibmveth: Fix little endian issues

2013-08-06 Thread Anton Blanchard
The hypervisor is big endian, so little endian kernel builds need to byteswap. Signed-off-by: Anton Blanchard an...@samba.org --- drivers/net/ethernet/ibm/ibmveth.c | 4 ++-- drivers/net/ethernet/ibm/ibmveth.h | 19 --- 2 files changed, 18 insertions(+), 5 deletions(-) diff

[PATCH 56/63] [SCSI] lpfc: Don't force CONFIG_GENERIC_CSUM on

2013-08-06 Thread Anton Blanchard
We want ppc64 to be able to select between optimised assembly checksum routines in big endian, and the generic lib/checksum.c routines in little endian. The lpfc driver is forcing CONFIG_GENERIC_CSUM on which means we are unable to make the choice of when to enable and disable it in the arch

[PATCH 57/63] powerpc: Use generic checksum code in little endian

2013-08-06 Thread Anton Blanchard
We need to fix some endian issues in our checksum code. For now just enable the generic checksum routines for little endian builds. Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/Kconfig| 3 +++ arch/powerpc/include/asm/checksum.h | 5 +

[PATCH 58/63] powerpc: Use generic memcpy code in little endian

2013-08-06 Thread Anton Blanchard
We need to fix some endian issues in our memcpy code. For now just enable the generic memcpy routine for little endian builds. Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/include/asm/string.h | 4 arch/powerpc/kernel/ppc_ksyms.c | 2 ++ arch/powerpc/lib/Makefile

[PATCH 60/63] powerpc: Add ability to build little endian kernels

2013-08-06 Thread Anton Blanchard
From: Ian Munsie imun...@au1.ibm.com This patch allows the kbuild system to successfully compile a kernel for the little endian PowerPC64 architecture. To build such a kernel a supported platform must be used and CONFIG_CPU_LITTLE_ENDIAN must be set. If cross compiling, CROSS_COMPILE must point

[PATCH 61/63] powerpc: Don't set HAVE_EFFICIENT_UNALIGNED_ACCESS on little endian builds

2013-08-06 Thread Anton Blanchard
POWER7 takes alignment exceptions on some unaligned addresses, so disable HAVE_EFFICIENT_UNALIGNED_ACCESS. This fixes an early boot issue in the printk code. Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 62/63] powerpc: Work around little endian gcc bug

2013-08-06 Thread Anton Blanchard
Temporarily work around an ICE we are seeing while building in little endian mode: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57134 Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/Makefile

[PATCH 63/63] powerpc: Add pseries_le_defconfig

2013-08-06 Thread Anton Blanchard
This is the pseries_defconfig with CONFIG_CPU_LITTLE_ENDIAN enabled and CONFIG_VIRTUALIZATION disabled (required until we fix some endian issues in KVM). Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/configs/pseries_le_defconfig | 347 ++ 1 file

[PATCH] powerpc: Ignore zImage.epapr

2013-08-06 Thread Mark Brown
From: Mark Brown broo...@linaro.org This is another file we can generate so add it to the list. Signed-off-by: Mark Brown broo...@linaro.org --- arch/powerpc/boot/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/boot/.gitignore b/arch/powerpc/boot/.gitignore index

Re: Failure to detect PCI card

2013-08-06 Thread Anatolij Gustschin
On Mon, 5 Aug 2013 16:14:29 -0700 Peter LaDow pet...@gocougs.wsu.edu wrote: ... Perhaps it is a BIOS option ROM like you suggested earlier. The 3c90xC reference manual I found (http://people.freebsd.org/~wpaul/3Com/3c90xc.pdf) mentions an option ROM (and there is an Atmel part stuffed). I

[PATCH v4 00/31] add COMMON_CLK support for PowerPC MPC512x

2013-08-06 Thread Gerhard Sittig
this series - fixes several drivers that are used in the MPC512x platform (UART, SPI, ethernet, PCI, USB, CAN, NAND flash, video capture) in how they handle clocks (appropriately acquire and setup them, hold references during use, release clocks after use) - introduces support for the common

[PATCH v4 01/31] spi: mpc512x: cleanup clock API use

2013-08-06 Thread Gerhard Sittig
cleanup the MPC512x SoC's SPI master's use of the clock API - get, prepare, and enable the MCLK during probe; disable, unprepare and put the MCLK upon remove; hold a reference to the clock over the period of use - fetch MCLK rate (reference) once during probe and slightly reword BCLK

[PATCH v4 02/31] serial: mpc512x: cleanup clock API use

2013-08-06 Thread Gerhard Sittig
cleanup the clock API use of the UART driver which is shared among the MPC512x and the MPC5200 platforms - get, prepare, and enable the MCLK during port allocation; disable, unprepare and put the MCLK upon port release; hold a reference to the clock over the period of use; check for and

[PATCH v4 04/31] mtd: mpc5121_nfc: cleanup clock API use

2013-08-06 Thread Gerhard Sittig
use devm_clk_get() for automatic put after device close, check for and propagate errors when enabling clocks, need to prepare clocks before they can get enabled, adjust error code paths to correctly balance get/put and prepare/unprepare and enable/disable calls Signed-off-by: Gerhard Sittig

[PATCH v4 03/31] USB: fsl-mph-dr-of: cleanup clock API use

2013-08-06 Thread Gerhard Sittig
use devm_get_clk() for automatic put upon device close, check for and propagate errors when enabling clocks, must prepare clocks before they can get enabled, unprepare after disable Signed-off-by: Gerhard Sittig g...@denx.de --- drivers/usb/host/fsl-mph-dr-of.c | 16 +--- 1 file

[PATCH v4 05/31] [media] fsl-viu: cleanup clock API use

2013-08-06 Thread Gerhard Sittig
use devm_clk_get() for automatic put after device close, check for and propagate errors when enabling clocks, need to prepare clocks before they can get enabled, adjust code paths to correctly balance get/put and prepare/unprepare and enable/disable calls Signed-off-by: Gerhard Sittig

Re: [PATCH 3/8] Add all memory via sysfs probe interface at once

2013-08-06 Thread Nathan Fontenot
On 08/04/2013 10:13 PM, Michael Ellerman wrote: On Fri, Aug 02, 2013 at 02:13:06PM -0500, Nathan Fontenot wrote: On 08/01/2013 09:32 PM, Michael Ellerman wrote: On Wed, Jul 24, 2013 at 01:37:47PM -0500, Nathan Fontenot wrote: When doing memory hot add via the 'probe' interface in sysfs we do

[PATCH v4 06/31] i2c: mpc: cleanup clock API use

2013-08-06 Thread Gerhard Sittig
make the MPC I2C driver get, prepare and enable the peripheral clock during probe ('per' for access to the peripheral's registers); disable and unprepare the clock upon remove(), put is done by the devm approach; hold a reference to the clock over the period of use clock lookup is non-fatal in

[PATCH v4 07/31] fs_enet: silence a build warning (unused variable)

2013-08-06 Thread Gerhard Sittig
Signed-off-by: Gerhard Sittig g...@denx.de --- drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c b/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c index 8de53a1..c04eb3a 100644

[PATCH v4 08/31] fs_enet: cleanup clock API use

2013-08-06 Thread Gerhard Sittig
make the Freescale ethernet driver get, prepare and enable the FEC clock during probe(); disable and unprepare the clock upon remove(), put is done by the devm approach; hold a reference to the clock over the period of use clock lookup is non-fatal as not all platforms provide clock specs in

  1   2   >