[RFC PATCH 07/20] x86/MSI: Use msi_chip instead of arch func to configure MSI/MSI-X

2014-08-12 Thread Yijing Wang
Introduce a new struct msi_chip apic_msi_chip instead of weak arch functions to configure MSI/MSI-X in x86. Signed-off-by: Yijing Wang wangyij...@huawei.com --- arch/x86/include/asm/pci.h |1 + arch/x86/kernel/apic/io_apic.c | 20 2 files changed, 17 insertions(+),

[RFC PATCH 04/20] MSI: Remove the redundant irq_set_chip_data()

2014-08-12 Thread Yijing Wang
Currently, pcie-designware, pcie-rcar, pci-tegra drivers use irq chip_data to the msi_chip pointer. They already call irq_set_chip_data() in their own MSI irq map functions. So irq_set_chip_data() in arch_setup_msi_irq() is useless. Signed-off-by: Yijing Wang wangyij...@huawei.com ---

[RFC PATCH 00/20] Use msi_chip to configure MSI/MSI-X in all platforms

2014-08-12 Thread Yijing Wang
This series is mainly to use msi_chip instead of currently weak arch functions across all platforms. Also clean up current MSI code and make drivers support MSI easier. Yijing Wang (20): x86/xen/MSI: Eliminate arch_msix_mask_irq() and arch_msi_mask_irq() MSI: Clean up struct msi_chip

[RFC PATCH 01/20] x86/xen/MSI: Eliminate arch_msix_mask_irq() and arch_msi_mask_irq()

2014-08-12 Thread Yijing Wang
Commit 0e4ccb150 added two __weak arch functions arch_msix_mask_irq() and arch_msi_mask_irq() to fix a bug found when running xen in x86. Introduced these two funcntions make MSI code complex. This patch reverted commit 0e4ccb150 and add #ifdef for x86 msi_chip to fix this bug for simplicity. Also

[RFC PATCH 06/20] PCI/MSI: Introduce arch_get_match_msi_chip() to find the match msi_chip

2014-08-12 Thread Yijing Wang
Introduce __weak arch_get_match_msi_chip() to find the match msi_chip. We prepare to use struct msi_chip to eliminate arch_xxx functions in all platforms. The MSI device and the msi_chip binding is platform specific. For instance, in x86, LAPICs receive all MSI irq, but in arm, PCI device usually

[RFC PATCH 03/20] PCI/MSI: Remove useless bus-msi assignment

2014-08-12 Thread Yijing Wang
Currently, PCI drivers will initialize bus-msi in pcibios_add_bus(). pcibios_add_bus() will be called in every pci bus initialization. So the bus-msi assignment in pci_alloc_child_bus() is useless. Signed-off-by: Yijing Wang wangyij...@huawei.com CC: Thierry Reding

[RFC PATCH 05/20] MSI: Refactor struct msi_chip to become more common

2014-08-12 Thread Yijing Wang
Now there are a lot of __weak arch functions in MSI code. These functions make MSI driver complex, It's time to refactor it. Add .restore_irq(), .setup_irqs(), .teardown_irqs() to make msi_chip common across all platforms. Also replace the argument struct pci_dev with struct device to support

[RFC PATCH 02/20] MSI: Clean up struct msi_chip argument

2014-08-12 Thread Yijing Wang
Msi_chip functions setup_irq/teardown_irq/check_device rarely use msi_chip argument. We can get msi_chip pointer from the device pointer or irq number, so clean up msi_chip arguments. This patch is also preparation for using msi_chip in all platforms to setup/teardown MSI irqs. Signed-off-by:

[RFC PATCH 10/20] x86/MSI: Remove unused MSI weak arch functions

2014-08-12 Thread Yijing Wang
Now we can clean up MSI weak arch functions in x86. Signed-off-by: Yijing Wang wangyij...@huawei.com --- arch/x86/include/asm/pci.h |3 --- arch/x86/kernel/apic/io_apic.c |2 +- arch/x86/kernel/x86_init.c | 24 3 files changed, 1 insertions(+), 28

[RFC PATCH 12/20] MIPS/Xlp/MSI: Use msi_chip instead of arch func to configure MSI/MSI-X

2014-08-12 Thread Yijing Wang
Introduce a new struct msi_chip xlp_chip instead of weak arch functions to configure MSI/MSI-X. Signed-off-by: Yijing Wang wangyij...@huawei.com --- arch/mips/pci/msi-xlp.c | 15 +-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/arch/mips/pci/msi-xlp.c

[RFC PATCH 08/20] x86/xen/MSI: Use msi_chip instead of arch func to configure MSI/MSI-X

2014-08-12 Thread Yijing Wang
Introduce a new struct msi_chip xen_msi_chip instead of weak arch functions to configure MSI/MSI-X. Signed-off-by: Yijing Wang wangyij...@huawei.com CC: Konrad Rzeszutek Wilk konrad.w...@oracle.com --- arch/x86/pci/xen.c | 128 +-- 1 files

[RFC PATCH 13/20] MIPS/xlr/MSI: Use msi_chip instead of arch func to configure MSI/MSI-X

2014-08-12 Thread Yijing Wang
Introduce a new struct msi_chip xlr_msi_chip instead of weak arch functions to configure MSI/MSI-X. Signed-off-by: Yijing Wang wangyij...@huawei.com --- arch/mips/pci/pci-xlr.c | 19 +++ 1 files changed, 15 insertions(+), 4 deletions(-) diff --git a/arch/mips/pci/pci-xlr.c

[RFC PATCH 20/20] PCI/MSI: Clean up unused MSI arch functions

2014-08-12 Thread Yijing Wang
Now we use struct msi_chip in all platforms to configure MSI/MSI-X. We can clean up the unused arch functions. Signed-off-by: Yijing Wang wangyij...@huawei.com --- drivers/pci/msi.c | 82 1 files changed, 32 insertions(+), 50 deletions(-)

[RFC PATCH 11/20] MIPS/Octeon/MSI: Use msi_chip instead of arch func to configure MSI/MSI-X

2014-08-12 Thread Yijing Wang
Introduce a new struct msi_chip octeon_msi_chip instead of weak arch functions to configure MSI/MSI-X. Signed-off-by: Yijing Wang wangyij...@huawei.com --- arch/mips/pci/msi-octeon.c | 45 ++- 1 files changed, 19 insertions(+), 26 deletions(-) diff

[RFC PATCH 16/20] arm/iop13xx/MSI: Use msi_chip instead of arch func to configure MSI/MSI-X

2014-08-12 Thread Yijing Wang
Introduce a new struct msi_chip iop13xx_msi_chip instead of weak arch functions to configure MSI/MSI-X. And associate the pci bus with msi_chip in pcibios_add_bus(). Signed-off-by: Yijing Wang wangyij...@huawei.com --- arch/arm/mach-iop13xx/include/mach/pci.h |2 ++

[RFC PATCH 17/20] IA64/MSI: Use msi_chip instead of arch func to configure MSI/MSI-X

2014-08-12 Thread Yijing Wang
Introduce a new struct msi_chip ia64_msi_chip instead of weak arch functions to configure MSI/MSI-X. Signed-off-by: Yijing Wang wangyij...@huawei.com --- arch/ia64/kernel/msi_ia64.c | 18 ++ 1 files changed, 14 insertions(+), 4 deletions(-) diff --git

[RFC PATCH 15/20] s390/MSI: Use msi_chip instead of arch func to configure MSI/MSI-X

2014-08-12 Thread Yijing Wang
Introduce a new struct msi_chip zpci_msi_chip instead of weak arch functions to configure MSI/MSI-X. Signed-off-by: Yijing Wang wangyij...@huawei.com --- arch/s390/pci/pci.c | 16 ++-- 1 files changed, 14 insertions(+), 2 deletions(-) diff --git a/arch/s390/pci/pci.c

[RFC PATCH 19/20] tile/MSI: Use msi_chip instead of arch func to configure MSI/MSI-X

2014-08-12 Thread Yijing Wang
Introduce a new struct msi_chip tile_msi_chip instead of weak arch functions to configure MSI/MSI-X. Signed-off-by: Yijing Wang wangyij...@huawei.com --- arch/tile/kernel/pci_gx.c | 20 +++- 1 files changed, 15 insertions(+), 5 deletions(-) diff --git

[RFC PATCH 09/20] irq_remapping/MSI: Use msi_chip instead of arch func to configure MSI/MSI-X

2014-08-12 Thread Yijing Wang
Introduce a new struct msi_chip remap_msi_chip instead of weak arch functions to configure irq remapping MSI/MSI-X in x86. Signed-off-by: Yijing Wang wangyij...@huawei.com --- drivers/iommu/irq_remapping.c | 13 + 1 files changed, 9 insertions(+), 4 deletions(-) diff --git

[RFC PATCH 18/20] Sparc/MSI: Use msi_chip instead of arch func to configure MSI/MSI-X

2014-08-12 Thread Yijing Wang
Introduce a new struct msi_chip sparc_msi_chip instead of weak arch functions to configure MSI/MSI-X. Signed-off-by: Yijing Wang wangyij...@huawei.com --- arch/sparc/kernel/pci.c | 18 ++ 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/arch/sparc/kernel/pci.c

[RFC PATCH 14/20] Powerpc/MSI: Use msi_chip instead of arch func to configure MSI/MSI-X

2014-08-12 Thread Yijing Wang
Introduce a new struct msi_chip ppc_msi_chip instead of weak arch functions to configure MSI/MSI-X. Signed-off-by: Yijing Wang wangyij...@huawei.com --- arch/powerpc/kernel/msi.c | 23 +-- 1 files changed, 17 insertions(+), 6 deletions(-) diff --git

Re: [PATCH] fsl-rio: add support for mapping inbound windows

2014-08-12 Thread Martijn de Gouw
On 08/05/2014 11:37 PM, Scott Wood wrote: On Tue, 2014-08-05 at 15:52 +0200, Martijn de Gouw wrote: Add support for mapping and unmapping of inbound rapidio windows. Signed-off-by: Martijn de Gouw martijn.de.g...@prodrive-technologies.com Could you elaborate in the changelog on what this

Re: [PATCH 3/5] mmc: sdhci-pltfm: Do not use parent as the host's device

2014-08-12 Thread Ulf Hansson
On 11 August 2014 11:32, Ulf Hansson ulf.hans...@linaro.org wrote: On 11 August 2014 11:15, Pawel Moll pawel.m...@arm.com wrote: On Mon, 2014-08-11 at 10:07 +0100, Ulf Hansson wrote: On 8 August 2014 18:36, Pawel Moll pawel.m...@arm.com wrote: On Fri, 2014-07-25 at 15:23 +0100, Pawel Moll

[PATCH powerpc] use machine_subsys_initcall() for opal_hmi_handler_init()

2014-08-12 Thread Li Zhong
As opal_message_init() uses machine_early_initcall(powernv, ), and opal_hmi_handler_init() depends on that early initcall, so it also needs use machine_* to check the machine_id. Signed-off-by: Li Zhong zh...@linux.vnet.ibm.com --- arch/powerpc/platforms/powernv/opal-hmi.c | 3 ++- 1 file

Re: [Xen-devel] [RFC PATCH 01/20] x86/xen/MSI: Eliminate arch_msix_mask_irq() and arch_msi_mask_irq()

2014-08-12 Thread David Vrabel
On 12/08/14 08:25, Yijing Wang wrote: Commit 0e4ccb150 added two __weak arch functions arch_msix_mask_irq() and arch_msi_mask_irq() to fix a bug found when running xen in x86. Introduced these two funcntions make MSI code complex. This patch reverted commit 0e4ccb150 and add #ifdef for x86

[PATCH 3/5 v2] mmc: sdhci-pltfm: Do not use parent as the host's device

2014-08-12 Thread Pawel Moll
The code selecting a device for the sdhci host has been continuously tweaked (4b711cb13843f5082e82970dd1e8031383134a65 mmc: sdhci-pltfm: Add structure for host-specific data and a4d2177f00a5252d825236c5124bc1e9918bdb41 mmc: sdhci-pltfm: dt device does not pass parent to sdhci_alloc_host while

Re: [Xen-devel] [RFC PATCH 01/20] x86/xen/MSI: Eliminate arch_msix_mask_irq() and arch_msi_mask_irq()

2014-08-12 Thread Yijing Wang
On 2014/8/12 17:09, David Vrabel wrote: On 12/08/14 08:25, Yijing Wang wrote: Commit 0e4ccb150 added two __weak arch functions arch_msix_mask_irq() and arch_msi_mask_irq() to fix a bug found when running xen in x86. Introduced these two funcntions make MSI code complex. This patch reverted

Re: [PATCH v3] powerpc/kvm: support to handle sw breakpoint

2014-08-12 Thread Alexander Graf
On 12.08.14 07:17, Madhavan Srinivasan wrote: On Monday 11 August 2014 02:45 PM, Alexander Graf wrote: On 11.08.14 10:51, Benjamin Herrenschmidt wrote: On Mon, 2014-08-11 at 09:26 +0200, Alexander Graf wrote: diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c index

Re: [PATCH v3] powerpc/kvm: support to handle sw breakpoint

2014-08-12 Thread Madhavan Srinivasan
On Tuesday 12 August 2014 04:49 PM, Alexander Graf wrote: On 12.08.14 07:17, Madhavan Srinivasan wrote: On Monday 11 August 2014 02:45 PM, Alexander Graf wrote: On 11.08.14 10:51, Benjamin Herrenschmidt wrote: On Mon, 2014-08-11 at 09:26 +0200, Alexander Graf wrote: diff --git

Re: [PATCH 3/5 v2] mmc: sdhci-pltfm: Do not use parent as the host's device

2014-08-12 Thread Ulf Hansson
On 12 August 2014 12:37, Pawel Moll pawel.m...@arm.com wrote: The code selecting a device for the sdhci host has been continuously tweaked (4b711cb13843f5082e82970dd1e8031383134a65 mmc: sdhci-pltfm: Add structure for host-specific data and a4d2177f00a5252d825236c5124bc1e9918bdb41 mmc:

MPC8641D SMP Processor 1 is stuck

2014-08-12 Thread Chris Enrique
Hello, i am currently working on a GE PPC9A board which has a MPC8641D processor. My work on this board is currently based on the yocto project (where i also put this issue on the mailinglist) but the issue affects mainly the kernel's SMP feature so i want to share this issue here as well and

Re: [tip:timers/core] timekeeping: Fixup typo in update_vsyscall_old definition

2014-08-12 Thread John Stultz
On 08/10/2014 09:19 PM, Benjamin Herrenschmidt wrote: On Wed, 2014-07-30 at 00:31 -0700, tip-bot for John Stultz wrote: Commit-ID: 953dec21aed4038464fec02f96a2f1b8701a5bce Gitweb: http://git.kernel.org/tip/953dec21aed4038464fec02f96a2f1b8701a5bce Author: John Stultz

Re: [RFC PATCH 07/20] x86/MSI: Use msi_chip instead of arch func to configure MSI/MSI-X

2014-08-12 Thread Konrad Rzeszutek Wilk
On Tue, Aug 12, 2014 at 03:26:00PM +0800, Yijing Wang wrote: Introduce a new struct msi_chip apic_msi_chip instead of weak arch functions to configure MSI/MSI-X in x86. Why not 'x86_msi_ops' (see arch/x86/kernel/x86_init.c) Signed-off-by: Yijing Wang wangyij...@huawei.com ---

Re: [PATCH v3 1/2] printk: Add function to return log buffer address and size

2014-08-12 Thread Andrew Morton
On Mon, 11 Aug 2014 11:13:32 +1000 Benjamin Herrenschmidt b...@kernel.crashing.org wrote: On Sat, 2014-08-09 at 11:15 +0530, Vasant Hegde wrote: Ben, - This patchset applies cleanly on powerpc next branch. - Andrew Morton suggested to include this patch in powerpc tree.

Re: [RFC PATCH 07/20] x86/MSI: Use msi_chip instead of arch func to configure MSI/MSI-X

2014-08-12 Thread Yijing Wang
On 2014/8/13 3:09, Konrad Rzeszutek Wilk wrote: On Tue, Aug 12, 2014 at 03:26:00PM +0800, Yijing Wang wrote: Introduce a new struct msi_chip apic_msi_chip instead of weak arch functions to configure MSI/MSI-X in x86. Why not 'x86_msi_ops' (see arch/x86/kernel/x86_init.c) Hi Konrad, I think

Re: [tip:timers/core] timekeeping: Fixup typo in update_vsyscall_old definition

2014-08-12 Thread Tony Breeds
On Tue, Aug 12, 2014 at 08:30:40AM -0700, John Stultz wrote: Thanks for pointing it out. I'll send a fix here shortly (though I only have the ppc64le toolchain handy, so forgive me if its not quite right). /me pimps the kernel.org toolchains:

[PATCH] PC, KVM, CMA: Fix regression caused by wrong get_order() use

2014-08-12 Thread Alexey Kardashevskiy
fc95ca7284bc54953165cba76c3228bd2cdb9591 claims that there is no functional change but this is not true as it calls get_order() (which takes bytes) where it should have called ilog2() and the kernel stops on VM_BUG_ON(). This replaces get_order() with ilog2(). Suggested-by: Paul Mackerras