[RFC][PATCH] powerpc/CoreNet64: compile with CONFIG_E{5, 6}500_CPU well

2013-11-20 Thread Tiejun Chen
CONFIG_ALTIVEC is always enabled for CoreNet64. And if we select CONFIG_E{5,6}500_CPU this may introduce -mcpu=e500mc64 into $CFLAGS. But Altivec and Spe options not allowed with e500mc64, so : CC arch/powerpc/lib/xor_vmx.o arch/powerpc/lib/xor_vmx.c:1:0: error: AltiVec not supported in

[PATCH] powerpc/eeh: Dump PHB3 diag-data on frozen PE

2013-11-20 Thread Gavin Shan
While we detect frozen PE on PHB3, it's always meaningful to have the dumped diag-data for further diagnosis and analysis. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/platforms/powernv/eeh-ioda.c |3 +++ 1 file changed, 3 insertions(+) diff --git

Re: [PATCH] powerpc/eeh: Dump PHB3 diag-data on frozen PE

2013-11-20 Thread Benjamin Herrenschmidt
On Wed, 2013-11-20 at 17:36 +0800, Gavin Shan wrote: While we detect frozen PE on PHB3, it's always meaningful to have the dumped diag-data for further diagnosis and analysis. Don't we trip that during PCI probing ? For example if we probe behind a PCI-X bridge (which can exist on an adapter)

[PATCH v7] clk: corenet: Adds the clock binding

2013-11-20 Thread Yuantian.Tang
From: Tang Yuantian yuantian.t...@freescale.com Adds the clock bindings for Freescale PowerPC CoreNet platforms Signed-off-by: Tang Yuantian yuantian.t...@freescale.com Signed-off-by: Li Yang le...@freescale.com --- v7: - refined some properties' definitions v6: - splited the

Re: [PATCH] powerpc/eeh: Dump PHB3 diag-data on frozen PE

2013-11-20 Thread Gavin Shan
On Wed, Nov 20, 2013 at 08:38:48PM +1100, Benjamin Herrenschmidt wrote: On Wed, 2013-11-20 at 17:36 +0800, Gavin Shan wrote: While we detect frozen PE on PHB3, it's always meaningful to have the dumped diag-data for further diagnosis and analysis. Don't we trip that during PCI probing ? For

BUG: Patch Convert some mftb/mftbu into mfspr breaks MPC885

2013-11-20 Thread leroy christophe
Scott, The patch Convert some mftb/mftbu into mfspr (beb2dc0a7a84be003ce54e98b95d65cc66e6e536) breaks startup on MPC885. The CPU traps (SoftwareEmulation trap) at sched_clock() when trying to read TBU with mfspr. Reverting the patch solves the issue. What's the prefered way to fix this ?

Re: [PATCH RESEND v4] powerpc: kvm: fix rare but potential deadlock scene

2013-11-20 Thread Alexander Graf
Am 20.11.2013 um 03:42 schrieb Liu ping fan kernelf...@gmail.com: On Tue, Nov 19, 2013 at 6:39 PM, Alexander Graf ag...@suse.de wrote: On 19.11.2013, at 07:12, Liu Ping Fan kernelf...@gmail.com wrote: Since kvmppc_hv_find_lock_hpte() is called from both virtmode and realmode, so it

[PATCH 0/9] ppc64 little endian updates

2013-11-20 Thread Anton Blanchard
This patch series adds support for the new ABI, LPAR support for H_SET_MODE and finally adds a kconfig option and defconfig. ABIv2 support was recently committed to binutils and gcc, and should be merged into glibc soon. There are a number of very nice improvements including the removal of

[PATCH 3/9] powerpc: Add TIF_ELF2ABI flag.

2013-11-20 Thread Anton Blanchard
From: Rusty Russell ru...@rustcorp.com.au Little endian ppc64 is getting an exciting new ABI. This is reflected by the bottom two bits of e_flags in the ELF header: 0 == legacy binaries (v1 ABI) 1 == binaries using the old ABI (compiled with a new toolchain) 2 ==

[PATCH 5/9] powerpc: ELF2 binaries launched directly.

2013-11-20 Thread Anton Blanchard
From: Rusty Russell ru...@rustcorp.com.au No function descriptor, but we set r12 up and set TIF_RESTOREALL as it normally isn't restored on return from syscall. Signed-off-by: Rusty Russell ru...@rustcorp.com.au Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/kernel/process.c |

[PATCH 6/9] powerpc: ELF2 binaries signal handling

2013-11-20 Thread Anton Blanchard
From: Rusty Russell ru...@rustcorp.com.au For the ELFv2 ABI, the hander is the entry point, not a function descriptor. We also need to set up r12, and fortunately the fast_exception_return exit path restores r12 for us so nothing else is required. Signed-off-by: Rusty Russell

[PATCH 9/9] powerpc: Add pseries_le_defconfig

2013-11-20 Thread Anton Blanchard
Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/configs/pseries_le_defconfig | 352 ++ 1 file changed, 352 insertions(+) create mode 100644 arch/powerpc/configs/pseries_le_defconfig diff --git a/arch/powerpc/configs/pseries_le_defconfig

[PATCH 1/9] powerpc/pseries: Fix endian issues in pseries EEH code

2013-11-20 Thread Anton Blanchard
Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/platforms/pseries/eeh_pseries.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/platforms/pseries/eeh_pseries.c b/arch/powerpc/platforms/pseries/eeh_pseries.c index

[PATCH 4/9] powerpc: Set eflags correctly for ELF ABIv2 core dumps.

2013-11-20 Thread Anton Blanchard
From: Rusty Russell ru...@rustcorp.com.au We leave it at zero (though it could be 1) for old tasks. Signed-off-by: Rusty Russell ru...@rustcorp.com.au Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/include/asm/elf.h | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH 2/9] pseries: Add H_SET_MODE to change exception endianness

2013-11-20 Thread Anton Blanchard
On little endian builds call H_SET_MODE so exceptions have the correct endianness. We need to reset the endian during kexec so do that in the MMU hashtable clear callback. Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/include/asm/hvcall.h | 2 ++

[PATCH 7/9] powerpc: Don't use ELFv2 ABI to build the kernel

2013-11-20 Thread Anton Blanchard
From: Alistair Popple alist...@popple.id.au The kernel doesn't build correctly using the ELFv2 ABI. This patch ensures that the ELFv1 ABI is used when building a kernel with an ELFv2 enabled compiler. Signed-off-by: Alistair Popple alist...@popple.id.au Signed-off-by: Anton Blanchard

[PATCH 8/9] powerpc: Add CONFIG_CPU_LITTLE_ENDIAN kernel config option.

2013-11-20 Thread Anton Blanchard
With the little endian support merged, we can add the CONFIG_CPU_LITTLE_ENDIAN kernel config option. Signed-off-by: Anton Blanchard an...@samba.org --- arch/powerpc/platforms/Kconfig.cputype | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/powerpc/platforms/Kconfig.cputype

BUG: Patch Convert some mftb/mftbu into mfspr breaks MPC885

2013-11-20 Thread leroy christophe
Scott, The patch Convert some mftb/mftbu into mfspr (beb2dc0a7a84be003ce54e98b95d65cc66e6e536 https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/arch/powerpc/include/asm/reg.h?id=beb2dc0a7a84be003ce54e98b95d65cc66e6e536) breaks startup on MPC885. The CPU traps

Re: [RFC][PATCH] powerpc/CoreNet64: compile with CONFIG_E{5,6}500_CPU well

2013-11-20 Thread Scott Wood
On Wed, 2013-11-20 at 16:35 +0800, Tiejun Chen wrote: CONFIG_ALTIVEC is always enabled for CoreNet64. In the defconfig perhaps, but this isn't a generally true statement. And if we select CONFIG_E{5,6}500_CPU this may introduce -mcpu=e500mc64 into $CFLAGS. But Altivec and Spe options not

Re: BUG: Patch Convert some mftb/mftbu into mfspr breaks MPC885

2013-11-20 Thread Scott Wood
On Wed, 2013-11-20 at 10:37 +0100, leroy christophe wrote: Scott, The patch Convert some mftb/mftbu into mfspr (beb2dc0a7a84be003ce54e98b95d65cc66e6e536) breaks startup on MPC885. The CPU traps (SoftwareEmulation trap) at sched_clock() when trying to read TBU with mfspr. Reverting the

Re: [PATCH 0/9 v2] vfio-pci: add support for Freescale IOMMU (PAMU)

2013-11-20 Thread Alex Williamson
On Tue, 2013-11-19 at 10:47 +0530, Bharat Bhushan wrote: From: Bharat Bhushan bharat.bhus...@freescale.com PAMU (FSL IOMMU) has a concept of primary window and subwindows. Primary window corresponds to the complete guest iova address space (including MSI space), with respect to IOMMU_API

Re: [RFC][PATCH] powerpc/CoreNet64: compile with CONFIG_E{5, 6}500_CPU well

2013-11-20 Thread Kumar Gala
On Nov 20, 2013, at 10:41 AM, Scott Wood scottw...@freescale.com wrote: On Wed, 2013-11-20 at 16:35 +0800, Tiejun Chen wrote: CONFIG_ALTIVEC is always enabled for CoreNet64. In the defconfig perhaps, but this isn't a generally true statement. And if we select CONFIG_E{5,6}500_CPU this

[PATCH] powerpc: Wrong DWARF CFI in the kernel vdso for little-endian / ELFv2

2013-11-20 Thread Anton Blanchard
From: Ulrich Weigand ulrich.weig...@de.ibm.com I've finally tracked down why my CR signal-unwind test case still fails on little-endian. The problem turned to be that the kernel installs a signal trampoline in the vDSO, and provides a DWARF CFI record for that trampoline. This CFI describes the

Re: [PATCH v3] KVM: PPC: vfio kvm device: support spapr tce

2013-11-20 Thread Alex Williamson
On Wed, 2013-11-20 at 16:18 +1100, Alexey Kardashevskiy wrote: In addition to the external VFIO user API, a VFIO KVM device has been introduced recently. sPAPR TCE IOMMU is para-virtualized and the guest does map/unmap via hypercalls which take a logical bus id (LIOBN) as a target IOMMU

Re: [PATCH v2] offb: make the screen properties endian safe

2013-11-20 Thread Benjamin Herrenschmidt
On Thu, 2013-10-31 at 10:36 +0100, Cédric Le Goater wrote: The screen properties : depth, width, height, linebytes need to be converted to the host endian order when read from the device tree. Signed-off-by: Cédric Le Goater c...@fr.ibm.com --- Did you actually test that ? IE, using

[git pull] Please pull powerpc.git merge branch

2013-11-20 Thread Benjamin Herrenschmidt
Hi Linus ! With my previous pull request I mentioned some remaining Little Endian patches, notably support for our new ABI, which I was sitting on making sure it was all finalized. The toolchain folks confirmed it now, the new ABI is stable and merged with gcc, so we are all good. Oh and we

Re: [RFC PATCH powerpc] Fix a dma_mask issue of vio

2013-11-20 Thread Russell King - ARM Linux
On Wed, Nov 20, 2013 at 12:28:02PM +1100, Benjamin Herrenschmidt wrote: On Tue, 2013-11-19 at 16:11 +0800, Li Zhong wrote: I encountered following issue: [0.283035] ibmvscsi 3015: couldn't initialize event pool [5.688822] ibmvscsi: probe of 3015 failed with error -1

Re: [RFC PATCH powerpc] Fix a dma_mask issue of vio

2013-11-20 Thread Benjamin Herrenschmidt
On Wed, 2013-11-20 at 23:23 +, Russell King - ARM Linux wrote: Li Zong's patch works around the issue of a failing dma_set_mask(), but as I've already said elsewhere, the real fix is to get whatever created the struct device to initialise the dev-dma_mask with a bus default. Using

Re: [RFC PATCH powerpc] Fix a dma_mask issue of vio

2013-11-20 Thread Russell King - ARM Linux
On Thu, Nov 21, 2013 at 11:01:42AM +1100, Benjamin Herrenschmidt wrote: On Wed, 2013-11-20 at 23:23 +, Russell King - ARM Linux wrote: Li Zong's patch works around the issue of a failing dma_set_mask(), but as I've already said elsewhere, the real fix is to get whatever created the

Re: [RFC PATCH powerpc] Fix a dma_mask issue of vio

2013-11-20 Thread Benjamin Herrenschmidt
On Thu, 2013-11-21 at 00:08 +, Russell King - ARM Linux wrote: On Thu, Nov 21, 2013 at 11:01:42AM +1100, Benjamin Herrenschmidt wrote: On Wed, 2013-11-20 at 23:23 +, Russell King - ARM Linux wrote: Li Zong's patch works around the issue of a failing dma_set_mask(), but as I've

Re: [PATCH] powerpc/gpio: Fix the wrong GPIO input data on MPC8572/MPC8536

2013-11-20 Thread Scott Wood
On Wed, 2013-11-20 at 10:54 +0800, Liu Gang wrote: On Tue, 2013-11-19 at 16:51 -0600, Scott Wood wrote: @@ -71,6 +71,7 @@ static int mpc8572_gpio_get(struct gpio_chip *gc, unsigned int gpio) struct mpc8xxx_gpio_chip *mpc8xxx_gc = to_mpc8xxx_gpio_chip(mm); val =

[git pull] Please pull powerpc.git merge branch

2013-11-20 Thread Benjamin Herrenschmidt
Hi Linus ! Since you pulled my previous one in less than 20mn (the LE stuff), there's no point waiting for tomorrow for these fixes I mentioned earlier so here they are. This is a small collection of random bug fixes and a few improvements of Oops output which I deemed valuable enough to include

Re: [PATCH v3] KVM: PPC: vfio kvm device: support spapr tce

2013-11-20 Thread Alexey Kardashevskiy
On 11/21/2013 07:57 AM, Alex Williamson wrote: On Wed, 2013-11-20 at 16:18 +1100, Alexey Kardashevskiy wrote: In addition to the external VFIO user API, a VFIO KVM device has been introduced recently. sPAPR TCE IOMMU is para-virtualized and the guest does map/unmap via hypercalls which take

Re: [RFC PATCH powerpc] Fix a dma_mask issue of vio

2013-11-20 Thread Li Zhong
On Thu, 2013-11-21 at 11:22 +1100, Benjamin Herrenschmidt wrote: On Thu, 2013-11-21 at 00:08 +, Russell King - ARM Linux wrote: On Thu, Nov 21, 2013 at 11:01:42AM +1100, Benjamin Herrenschmidt wrote: On Wed, 2013-11-20 at 23:23 +, Russell King - ARM Linux wrote: Li Zong's patch

[PATCH 1/2] powerpc: mm: use macro PGTABLE_EADDR_SIZE instead of digital

2013-11-20 Thread Liu Ping Fan
In case of extending the eaddr in future, use this macro PGTABLE_EADDR_SIZE to ease the maintenance of the code. Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com --- arch/powerpc/mm/slb_low.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/mm/slb_low.S

[PATCH 2/2] powerpc: mm: change pgtable index size for 64K page

2013-11-20 Thread Liu Ping Fan
For 64K page, we waste half of the pte_t page. With this patch, after changing PGD_INDEX_SIZE from 12 to 11, PTE_INDEX_SIZE from 8 to 9, we can improve the usage of pte_t page and shrink the continuous phys size for pgd_t. Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com ---

linux-next: build failure after merge of the final tree (Linus' tree related - powerpc)

2013-11-20 Thread Stephen Rothwell
Hi all, After merging the final tree, today's linux-next build (powerpc allyesconfig) failed like this: stdin:1:0: error: -mcall-aixdesc must be big endian stdin:1:0: error: -mcall-aixdesc must be big endian scripts/gcc-version.sh: line 31: printf: #: invalid number scripts/gcc-version.sh: line

Re: linux-next: build failure after merge of the final tree (Linus' tree related - powerpc)

2013-11-20 Thread Anton Blanchard
Hi, After merging the final tree, today's linux-next build (powerpc allyesconfig) failed like this: stdin:1:0: error: -mcall-aixdesc must be big endian Urgh, allyesconfig is building an LE kernel. Ian: do we need to reverse the polarity of the option, and call it CONFIG_CPU_BIG_ENDIAN?

[PATCH] powerpc: Fix error when cross building TAGS cscope

2013-11-20 Thread Michael Neuling
Currently if I cross build TAGS or cscope from x86 I get this: % make ARCH=powerpc TAGS gcc-4.8.real: error: unrecognized command line option ‘-mbig-endian’ GEN TAGS % I'm not setting CROSS_COMPILE= as logically I shouldn't need to and I haven't needed to in the past when building

powerpc: Fix missing includes needed for chroma

2013-11-20 Thread Michael Neuling
chroma_defconfig is horribly broken currently, so add a bunch of #includes to fix it. Signed-off-by: Michael Neuling mi...@neuling.org --- So when are we dropping arch/powerpc/platforms/wsp? diff --git a/arch/powerpc/platforms/wsp/chroma.c b/arch/powerpc/platforms/wsp/chroma.c index

[PATCH] powerpc: allyesconfig should not select CONFIG_CPU_LITTLE_ENDIAN

2013-11-20 Thread Anton Blanchard
Stephen reported a failure in an allyesconfig build. CONFIG_CPU_LITTLE_ENDIAN=y gets set but his toolchain is not new enough to support little endian. We really want to default to a big endian build; Ben suggested using a choice which defaults to CPU_BIG_ENDIAN. Signed-off-by: Anton Blanchard

Re: [PATCH v9] PPC: POWERNV: move iommu_add_device earlier

2013-11-20 Thread Jeremy Kerr
Hi Alexey, This patch does 2 things: 1. removes the loop in which PCI devices were added to groups and adds explicit iommu_add_device() calls to add devices as soon as they get the iommu_table pointer assigned to them. 2. moves a bus notifier to powernv code in order to avoid conflict with

[PATCH] iommu: Add empty stub for iommu_group_get_by_id()

2013-11-20 Thread Alexey Kardashevskiy
Almost every function in include/linux/iommu.h has an empty stub but the iommu_group_get_by_id() did not get one by mistake. This adds an empty stub for iommu_group_get_by_id() for IOMMU_API disabled config. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- include/linux/iommu.h | 5 +

[PATCH v10] PPC: POWERNV: move iommu_add_device earlier

2013-11-20 Thread Alexey Kardashevskiy
The current implementation of IOMMU on sPAPR does not use iommu_ops and therefore does not call IOMMU API's bus_set_iommu() which 1) sets iommu_ops for a bus 2) registers a bus notifier Instead, PCI devices are added to IOMMU groups from subsys_initcall_sync(tce_iommu_init) which does basically