From: Yijing Wang <hidden> Date: 2014-10-15 02:35:11
Now there are a lot of weak arch functions in MSI code.
Thierry Reding Introduced MSI chip framework to configure MSI/MSI-X in arm,
that's a better solution than overriding lots of existing weak arch functionsin.
This series use MSI chip framework to refactor MSI code across all platforms
to eliminate weak arch functions. Then all MSI irqs will be managed in a
unified framework. Because this series changed a lot of ARCH MSI code,
so tests in the related platforms are warmly welcomed!
And you may access it at:
https://github.com/YijingWang/msi-chip-v3.git master
v2->v3:
1. For patch "x86/xen/MSI: Eliminate...", introduce a new global flag "pci_msi_ignore_mask"
to control the msi mask instead of replacing the irqchip->mask with nop function,
the latter method has problem pointed out by Konrad Rzeszutek Wilk.
2. Save msi chip in arch pci sysdata instead of associating msi chip to pci bus.
Because pci devices under same host share the same msi chip, so I think associate
msi chip to pci host/pci sysdata is better than to bother every pci bus/devices.
A better solution suggested by Liviu is to rip out pci_host_bridge from pci_create_root_bus(),
then we can save some pci host common attributes like domain_nr, msi_chip, resources,
into the generic pci_host_bridge. Because this changes to pci host bridge is also
a large series, so I think we should go step by step, I will try to post it in another
series later.
4. Clean up arm pcibios_add_bus() and pcibios_remove_bus() which were used to associate
msi chip to pci bus.
v1->v2:
Add a patch to make s390 MSI code build happy between patch "x86/xen/MSI: E.."
and "s390/MSI: Use MSI..". Fix several typo problems found by Lucas.
RFC->v1:
Updated "[patch 4/21] x86/xen/MSI: Eliminate...", export msi_chip instead
of #ifdef to fix MSI bug in xen running in x86.
Rename arch_get_match_msi_chip() to arch_find_msi_chip().
Drop use struct device as the msi_chip argument, we will do that
later in another patchset.
Yijing Wang (27):
MSI: Remove the redundant irq_set_chip_data()
x86/xen/MSI: Eliminate arch_msix_mask_irq() and arch_msi_mask_irq()
s390/MSI: Use __msi_mask_irq() instead of default_msi_mask_irq()
arm/MSI: Save MSI chip in pci_sys_data
PCI: tegra: Save msi chip in pci_sys_data
PCI: designware: Save msi chip in pci_sys_data
PCI: rcar: Save msi chip in pci_sys_data
PCI: mvebu: Save msi chip in pci_sys_data
arm/PCI: Clean unused pcibios_add_bus() and pcibios_remove_bus()
PCI/MSI: Remove useless bus->msi assignment
PCI/MSI: Refactor struct msi_chip to make it become more common
x86/MSI: Use MSI chip framework to configure MSI/MSI-X irq
x86/xen/MSI: Use MSI chip framework to configure MSI/MSI-X irq
Irq_remapping/MSI: Use MSI chip framework to configure MSI/MSI-X irq
x86/MSI: Remove unused MSI weak arch functions
Mips/MSI: Save msi chip in pci sysdata
MIPS/Octeon/MSI: Use MSI chip framework to configure MSI/MSI-X irq
MIPS/Xlp: Remove the dead function destroy_irq() to fix build error
MIPS/Xlp/MSI: Use MSI chip framework to configure MSI/MSI-X irq
MIPS/Xlr/MSI: Use MSI chip framework to configure MSI/MSI-X irq
Powerpc/MSI: Use MSI chip framework to configure MSI/MSI-X irq
s390/MSI: Use MSI chip framework to configure MSI/MSI-X irq
arm/iop13xx/MSI: Use MSI chip framework to configure MSI/MSI-X irq
IA64/MSI: Use MSI chip framework to configure MSI/MSI-X irq
Sparc/MSI: Use MSI chip framework to configure MSI/MSI-X irq
tile/MSI: Use MSI chip framework to configure MSI/MSI-X irq
PCI/MSI: Clean up unused MSI arch functions
arch/arm/include/asm/mach/pci.h | 10 +-
arch/arm/include/asm/pci.h | 9 ++
arch/arm/kernel/bios32.c | 19 +---
arch/arm/mach-iop13xx/include/mach/pci.h | 4 +
arch/arm/mach-iop13xx/iq81340mc.c | 3 +
arch/arm/mach-iop13xx/iq81340sc.c | 5 +-
arch/arm/mach-iop13xx/msi.c | 11 ++-
arch/ia64/include/asm/pci.h | 10 ++
arch/ia64/kernel/msi_ia64.c | 14 ++-
arch/ia64/pci/pci.c | 1 +
arch/mips/include/asm/netlogic/xlp-hal/pcibus.h | 1 +
arch/mips/include/asm/octeon/pci-octeon.h | 4 +
arch/mips/include/asm/pci.h | 14 +++
arch/mips/pci/msi-octeon.c | 31 +++---
arch/mips/pci/msi-xlp.c | 15 ++-
arch/mips/pci/pci-octeon.c | 3 +
arch/mips/pci/pci-xlp.c | 3 +
arch/mips/pci/pci-xlr.c | 17 +++-
arch/powerpc/include/asm/pci-bridge.h | 15 +++
arch/powerpc/kernel/msi.c | 12 ++-
arch/powerpc/kernel/pci-common.c | 3 +
arch/s390/include/asm/pci.h | 9 ++
arch/s390/pci/pci.c | 16 ++-
arch/sparc/kernel/pci.c | 14 ++-
arch/sparc/kernel/pci_impl.h | 12 ++
arch/tile/include/asm/pci.h | 10 ++
arch/tile/kernel/pci_gx.c | 13 ++-
arch/x86/include/asm/pci.h | 18 +++-
arch/x86/include/asm/x86_init.h | 7 --
arch/x86/kernel/apic/io_apic.c | 12 ++-
arch/x86/kernel/x86_init.c | 34 ------
arch/x86/pci/acpi.c | 1 +
arch/x86/pci/common.c | 3 +
arch/x86/pci/xen.c | 72 +++++++------
drivers/iommu/irq_remapping.c | 13 ++-
drivers/pci/host/pci-mvebu.c | 10 +--
drivers/pci/host/pci-tegra.c | 13 +--
drivers/pci/host/pcie-designware.c | 15 +--
drivers/pci/host/pcie-rcar.c | 13 +--
drivers/pci/msi.c | 133 ++++++++++-------------
drivers/pci/probe.c | 1 -
include/linux/msi.h | 24 ++---
include/linux/pci.h | 1 +
43 files changed, 379 insertions(+), 269 deletions(-)
From: Yijing Wang <hidden> Date: 2014-10-15 02:25:51
Now msi chip is saved in pci_sys_data in arm,
we could clean the bus->msi assignment in
pci core.
Signed-off-by: Yijing Wang <redacted>
CC: Thierry Reding <redacted>
CC: Thomas Petazzoni <redacted>
---
drivers/pci/probe.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
From: Yijing Wang <hidden> Date: 2014-10-15 02:25:54
Now only s390/MSI use default_msi_mask_irq() and
default_msix_mask_irq(), replace them with the common
msi mask irq functions __msi_mask_irq() and __msix_mask_irq().
Remove default_msi_mask_irq() and default_msix_mask_irq().
Signed-off-by: Yijing Wang <redacted>
---
arch/s390/pci/pci.c | 4 ++--
include/linux/msi.h | 2 --
2 files changed, 2 insertions(+), 4 deletions(-)
From: Yijing Wang <hidden> Date: 2014-10-15 02:25:57
Save msi chip in pci_sys_data instead of assign
msi chip to every pci bus in .add_bus().
Signed-off-by: Yijing Wang <redacted>
---
drivers/pci/host/pcie-rcar.c | 13 +++----------
1 files changed, 3 insertions(+), 10 deletions(-)
From: Yijing Wang <hidden> Date: 2014-10-15 02:26:01
MSI chip will be saved in pci_sys_data, now we can
clean up pcibios_add_bus() and pcibios_remove_bus()
in arm, and use pci_find_msi_chip() to get msi chip
in core MSI code.
Signed-off-by: Yijing Wang <redacted>
---
arch/arm/include/asm/mach/pci.h | 4 ----
arch/arm/kernel/bios32.c | 16 ----------------
drivers/pci/msi.c | 11 +++--------
3 files changed, 3 insertions(+), 28 deletions(-)
From: Yijing Wang <hidden> Date: 2014-10-15 02:26:05
Save msi chip in pci_sys_data instead of assign
msi chip to every pci bus in .add_bus().
Signed-off-by: Yijing Wang <redacted>
---
drivers/pci/host/pcie-designware.c | 15 ++++-----------
1 files changed, 4 insertions(+), 11 deletions(-)
From: Yijing Wang <hidden> Date: 2014-10-15 02:26:07
Save msi chip in pci_sys_data instead of assign
msi chip to every pci bus in .add_bus().
Signed-off-by: Yijing Wang <redacted>
---
drivers/pci/host/pci-tegra.c | 13 +++----------
1 files changed, 3 insertions(+), 10 deletions(-)
From: Yijing Wang <hidden> Date: 2014-10-15 02:26:11
Currently, pcie-designware, pcie-rcar and pci-tegra drivers
use irq chip_data to save the msi_chip pointer. They
already call irq_set_chip_data() in their own MSI irq map
functions. And chip_data is an opaque pointer, how to use
it is arch dependent. It should not be placed in MSI core.
Signed-off-by: Yijing Wang <redacted>
Reviewed-by: Thierry Reding <redacted>
---
drivers/pci/msi.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
From: Yijing Wang <hidden> Date: 2014-10-15 02:26:14
Save msi chip in pci_sys_data instead of assign
msi chip to every pci bus in .add_bus().
Signed-off-by: Yijing Wang <redacted>
---
drivers/pci/host/pci-mvebu.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
From: Yijing Wang <hidden> Date: 2014-10-15 02:26:16
Use MSI chip framework instead of arch MSI functions to configure
MSI/MSI-X irq. So we can manage MSI/MSI-X irq in a unified framework.
Signed-off-by: Yijing Wang <redacted>
---
drivers/iommu/irq_remapping.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
From: Yijing Wang <hidden> Date: 2014-10-15 02:26:19
Use MSI chip framework instead of arch MSI functions to configure
MSI/MSI-X irq. So we can manage MSI/MSI-X irq in a unified framework.
Signed-off-by: Yijing Wang <redacted>
---
Hi Sebastian,
I dropped the Acked-by , because this version has a
lot changes compared to last. So, I guess you may want to check it again.
---
arch/s390/include/asm/pci.h | 9 +++++++++
arch/s390/pci/pci.c | 12 ++++++++++--
2 files changed, 19 insertions(+), 2 deletions(-)
From: Yijing Wang <hidden> Date: 2014-10-15 02:26:24
Use MSI chip framework instead of arch MSI functions to configure
MSI/MSI-X irq. So we can manage MSI/MSI-X irq in a unified framework.
Signed-off-by: Yijing Wang <redacted>
---
arch/tile/include/asm/pci.h | 10 ++++++++++
arch/tile/kernel/pci_gx.c | 13 +++++++++++--
2 files changed, 21 insertions(+), 2 deletions(-)
@@ -152,6 +152,7 @@ struct pci_controller {intpio_io_index;/* PIO region index for I/O space access */#endif+structmsi_chip*msi_chip;/**Mem-MapregionsforallthememorycontrollerssothatLinuxcan*mapallofitsphysicalmemoryspacetothePCIbus.
From: Yijing Wang <hidden> Date: 2014-10-15 02:26:28
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 <redacted>
---
Hi Lucas,
I dropped the reviewed-by, because this version has a lot changes
compared to last one, I guess you may want to check it again.
---
drivers/iommu/irq_remapping.c | 2 +-
drivers/pci/msi.c | 103 +++++++++++++++--------------------------
include/linux/msi.h | 14 ------
include/linux/pci.h | 8 ---
4 files changed, 39 insertions(+), 88 deletions(-)
@@ -85,13 +62,20 @@ int __weak arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)return0;}-/*-*Wehaveadefaultimplementationavailableasaseparatenon-weak-*function,asitisusedbytheXenx86PCIcode-*/-voiddefault_teardown_msi_irqs(structpci_dev*dev)+staticvoidteardown_msi_irqs(structpci_dev*dev){structmsi_desc*entry;+structmsi_chip*chip;++chip=pci_msi_chip(dev->bus);+if(!chip)+return;++if(chip->teardown_irqs)+returnchip->teardown_irqs(chip,dev);++if(!chip->teardown_irq)+return;list_for_each_entry(entry,&dev->msi_list,list){inti,nvec;
@@ -1433,14 +1433,6 @@ static inline int pci_get_new_domain_nr(void) { return -ENOSYS; }#include<asm/pci.h>-/* Just avoid compile error, will be clean up later */-#ifdef CONFIG_PCI_MSI--#ifndef pci_msi_chip-#define pci_msi_chip(bus) NULL-#endif--#endif/* these helpers provide future and backwards compatibility*foraccessingpopularPCIBARinfo*/
@@ -94,6 +94,7 @@ struct pci_controller {intsegment;intnode;/* nearest node with memory or NUMA_NO_NODE for global allocation */+structmsi_chip*msi_chip;void*platform_data;};
From: Yijing Wang <hidden> Date: 2014-10-15 02:27:08
Use MSI chip framework instead of arch MSI functions to configure
MSI/MSI-X irq. So we can manage MSI/MSI-X irq in a unified framework.
Signed-off-by: Yijing Wang <redacted>
---
arch/sparc/kernel/pci.c | 14 ++++++++++++--
arch/sparc/kernel/pci_impl.h | 12 ++++++++++++
2 files changed, 24 insertions(+), 2 deletions(-)
From: Yijing Wang <hidden> Date: 2014-10-15 02:29:13
Use MSI chip framework instead of arch MSI functions to configure
MSI/MSI-X irq. So we can manage MSI/MSI-X irq in a unified framework.
Signed-off-by: Yijing Wang <redacted>
---
Hi Michael,
I dropped the Acked-by , because this version has a
lot changes compared to last. So, I guess you may want to check it again.
---
arch/powerpc/include/asm/pci-bridge.h | 15 +++++++++++++++
arch/powerpc/kernel/msi.c | 12 ++++++++++--
arch/powerpc/kernel/pci-common.c | 3 +++
3 files changed, 28 insertions(+), 2 deletions(-)
@@ -94,6 +98,17 @@ struct pci_controller {void*private_data;};+#ifdef CONFIG_PCI_MSI+externstructmsi_chipppc_msi_chip;++staticinlinestructmsi_chip*pci_msi_chip(structpci_bus*bus)+{+structpci_controller*hose=bus->sysdata;++returnhose->msi_chip;+}+#endif+/* These are used for config access before all the PCI probinghasbeendone.*/externintearly_read_config_byte(structpci_controller*hose,intbus,
@@ -13,7 +13,8 @@#include<asm/machdep.h>-intarch_setup_msi_irqs(structpci_dev*dev,intnvec,inttype)+staticintppc_setup_msi_irqs(structmsi_chip*chip,+structpci_dev*dev,intnvec,inttype){if(!ppc_md.setup_msi_irqs||!ppc_md.teardown_msi_irqs){pr_debug("msi: Platform doesn't provide MSI callbacks.\n");
@@ -27,7 +28,13 @@ int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)returnppc_md.setup_msi_irqs(dev,nvec,type);}-voidarch_teardown_msi_irqs(structpci_dev*dev)+staticvoidppc_teardown_msi_irqs(structmsi_chip*chip,+structpci_dev*dev){ppc_md.teardown_msi_irqs(dev);}++structmsi_chipppc_msi_chip={+.setup_irqs=ppc_setup_msi_irqs,+.teardown_irqs=ppc_teardown_msi_irqs,+};
From: Yijing Wang <hidden> Date: 2014-10-15 02:29:43
Commit 465665f78a7 ("mips: Kill pointless destroy_irq()") removed
the destroy_irq(). So remove the leftover one in xlp_setup_msix()
to fix build error.
arch/mips/pci/msi-xlp.c: In function 'xlp_setup_msix':
arch/mips/pci/msi-xlp.c:447:3: error: implicit declaration of function 'destroy_irq'..
cc1: some warnings being treated as errors
make[1]: *** [arch/mips/pci/msi-xlp.o] Error 1
make: *** [arch/mips/pci/] Error 2
Signed-off-by: Yijing Wang <redacted>
Cc: Thomas Gleixner <redacted>
---
arch/mips/pci/msi-xlp.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
@@ -443,10 +443,8 @@ static int xlp_setup_msix(uint64_t lnkbase, int node, int link,msg.data=0xc00|msixvec;ret=irq_set_msi_desc(xirq,desc);-if(ret<0){-destroy_irq(xirq);+if(ret<0)returnret;-}write_msi_msg(xirq,&msg);return0;
@@ -57,7 +57,7 @@ static int msi_irq_size;**Returns0onsuccess.*/-intarch_setup_msi_irq(structpci_dev*dev,structmsi_desc*desc)+staticintocteon_setup_msi_irq(structpci_dev*dev,structmsi_desc*desc){structmsi_msgmsg;u16control;
@@ -132,12 +132,12 @@ msi_irq_allocated:/* Make sure the search for available interrupts didn't fail */if(irq>=64){if(request_private_bits){-pr_err("arch_setup_msi_irq: Unable to find %d free interrupts, trying just one",-1<<request_private_bits);+pr_err("%s: Unable to find %d free interrupts, trying just one",+__func__,1<<request_private_bits);request_private_bits=0;gototry_only_one;}else-panic("arch_setup_msi_irq: Unable to find a free MSI interrupt");+panic("%s: Unable to find a free MSI interrupt",__func__);}/* MSI interrupts start at logical IRQ OCTEON_IRQ_MSI_BIT0 */
@@ -201,7 +202,7 @@ int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)return1;list_for_each_entry(entry,&dev->msi_list,list){-ret=arch_setup_msi_irq(dev,entry);+ret=octeon_setup_msi_irq(dev,entry);if(ret<0)returnret;if(ret>0)
@@ -210,14 +211,13 @@ int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)return0;}-/***CalledwhenadevicenolongerneedsitsMSIinterrupts.All*MSIinterruptsforthedevicearefreed.**@irq:Thedevicesfirstirqnumber.Theremaybemultpleinsequence.*/-voidarch_teardown_msi_irq(unsignedintirq)+staticvoidocteon_teardown_msi_irq(structmsi_chip*chip,unsignedintirq){intnumber_irqs;u64bitmask;
@@ -226,8 +226,8 @@ void arch_teardown_msi_irq(unsigned int irq)if((irq<OCTEON_IRQ_MSI_BIT0)||(irq>msi_irq_size+OCTEON_IRQ_MSI_BIT0))-panic("arch_teardown_msi_irq: Attempted to teardown illegal "-"MSI interrupt (%d)",irq);+panic("%s: Attempted to teardown illegal "+"MSI interrupt (%d)",__func__,irq);irq-=OCTEON_IRQ_MSI_BIT0;index=irq/64;
@@ -249,8 +249,8 @@ void arch_teardown_msi_irq(unsigned int irq)/* Shift the mask to the correct bit location */bitmask<<=irq0;if((msi_free_irq_bitmask[index]&bitmask)!=bitmask)-panic("arch_teardown_msi_irq: Attempted to teardown MSI "-"interrupt (%d) not in use",irq);+panic("%s: Attempted to teardown MSI "+"interrupt (%d) not in use",__func__,irq);/* Checks are done, update the in use bitmask */spin_lock(&msi_free_irq_bitmask_lock);
@@ -259,6 +259,11 @@ void arch_teardown_msi_irq(unsigned int irq)spin_unlock(&msi_free_irq_bitmask_lock);}+structmsi_chipocteon_msi_chip={+.setup_irqs=octeon_setup_msi_irqs,+.teardown_irq=octeon_teardown_msi_irq,+};+staticDEFINE_RAW_SPINLOCK(octeon_irq_msi_lock);staticu64msi_rcv_reg[4];
From: Yijing Wang <hidden> Date: 2014-10-15 02:30:37
Use MSI chip framework instead of arch MSI functions to configure
MSI/MSI-X irq. So we can manage MSI/MSI-X irq in a unified framework.
Signed-off-by: Yijing Wang <redacted>
---
arch/mips/pci/pci-xlr.c | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
@@ -450,7 +451,8 @@ static int xlp_setup_msix(uint64_t lnkbase, int node, int link,return0;}-intarch_setup_msi_irq(structpci_dev*dev,structmsi_desc*desc)+staticintxlp_setup_msi_irq(structmsi_chip*chip,+structpci_dev*dev,structmsi_desc*desc){structpci_dev*lnkdev;uint64_tlnkbase;
@@ -3227,26 +3228,14 @@ int native_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)return0;}-staticint__native_setup_msi_irqs(structmsi_chip*chip,-structpci_dev*dev,intnvec,inttype)-{-returnnative_setup_msi_irqs(dev,nvec,type);-}--voidnative_teardown_msi_irq(unsignedintirq)+voidnative_teardown_msi_irq(structmsi_chip*chip,unsignedintirq){irq_free_hwirq(irq);}-staticvoid__native_teardown_msi_irq(structmsi_chip*chip,-unsignedintirq)-{-native_teardown_msi_irq(irq);-}-staticstructmsi_chipnative_msi_chip={-.setup_irqs=__native_setup_msi_irqs,-.teardown_irq=__native_teardown_msi_irq,+.setup_irqs=native_setup_msi_irqs,+.teardown_irq=native_teardown_msi_irq,};structmsi_chip*x86_msi_chip=&native_msi_chip;
From: Yijing Wang <hidden> Date: 2014-10-15 02:33:32
Now there are a lot of __weak arch functions in MSI code.
These functions make MSI driver complex. Thierry introduced
MSI chip framework to configure MSI/MSI-X irq in arm. Use
MSI chip framework to refactor all other platform MSI
code to eliminate weak arch MSI functions. This patch add
.restore_irqs(), .teardown_irqs() and .setup_irqs() to make it
become more common.
Signed-off-by: Yijing Wang <redacted>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
---
drivers/pci/msi.c | 15 +++++++++++++++
include/linux/msi.h | 4 ++++
2 files changed, 19 insertions(+), 0 deletions(-)
@@ -61,6 +61,11 @@ int __weak arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type){structmsi_desc*entry;intret;+structmsi_chip*chip;++chip=pci_msi_chip(dev->bus);+if(chip&&chip->setup_irqs)+returnchip->setup_irqs(chip,dev,nvec,type);/**IfanarchitecturewantstosupportmultipleMSI,itneedsto
From: Yijing Wang <hidden> Date: 2014-10-15 02:33:53
Saving msi chip in pci_sys_data can make pci bus and
devices don't need to know msi chip detail, it also
make pci enumeration code be decoupled from msi chip.
In fact, all pci devices under the same pci hostbridge
share same msi chip. So msi chip should be seen as one
of resources or attributes to be initialized in pci host
bridge driver. Currently, pci hostbridge drivers create
pci_host_bridge in pci_create_root_bus(), and pass arch
specific pci sysdata to core pci scan functions. So pci
arch sysdata is good place to save msi chip.
Signed-off-by: Yijing Wang <redacted>
---
arch/arm/include/asm/mach/pci.h | 6 ++++++
arch/arm/include/asm/pci.h | 9 +++++++++
arch/arm/kernel/bios32.c | 3 +++
drivers/pci/msi.c | 6 ++++++
include/linux/pci.h | 9 +++++++++
5 files changed, 33 insertions(+), 0 deletions(-)
@@ -1433,6 +1433,15 @@ static inline int pci_get_new_domain_nr(void) { return -ENOSYS; }#include<asm/pci.h>+/* Just avoid compile error, will be clean up later */+#ifdef CONFIG_PCI_MSI++#ifndef pci_msi_chip+#define pci_msi_chip(bus) NULL+#endif++#endif+/* these helpers provide future and backwards compatibility*foraccessingpopularPCIBARinfo*/#define pci_resource_start(dev, bar) ((dev)->resource[(bar)].start)
From: Yijing Wang <hidden> Date: 2014-10-15 02:33:57
Commit 0e4ccb1505a9 ("PCI: Add x86_msi.msi_mask_irq() and msix_mask_irq()")
introduced two __weak arch functions arch_msix_mask_irq() and
arch_msi_mask_irq() to work around a bug when running xen in x86.
These two functions made msi code more complex. This patch reverts
the commit and introduces a global flag to control msi mask action to
avoid the bug. The patch is also preparation for using MSI chip framework
instead of weak arch MSI functions in all platforms. Keep default_msi_mask_irq()
and default_msix_mask_irq() in linux/msi.h to make s390 MSI code compile
happy, they will be removed in the later patch.
Signed-off-by: Yijing Wang <redacted>
CC: David Vrabel <redacted>
CC: Konrad Rzeszutek Wilk <redacted>
---
Hi David and Konrad,
I dropped the Acked-by and tested-by, because this version has a
lot changes compared to last. So, I guess you may want to check it again.
---
arch/x86/include/asm/x86_init.h | 3 ---
arch/x86/kernel/x86_init.c | 10 ----------
arch/x86/pci/xen.c | 14 ++------------
drivers/pci/msi.c | 29 ++++++++++++-----------------
include/linux/msi.h | 8 ++++++--
5 files changed, 20 insertions(+), 44 deletions(-)
@@ -866,7 +861,7 @@ void pci_msi_shutdown(struct pci_dev *dev)/* Return the device with MSI unmasked as initial states */mask=msi_mask(desc->msi_attrib.multi_cap);/* Keep cached state to be restored */-arch_msi_mask_irq(desc,mask,~mask);+__msi_mask_irq(desc,mask,~mask);/* Restore dev->irq to its default pin-assertion irq */dev->irq=desc->msi_attrib.default_irq;
@@ -964,7 +959,7 @@ void pci_msix_shutdown(struct pci_dev *dev)/* Return the device with MSI-X masked as initial states */list_for_each_entry(entry,&dev->msi_list,list){/* Keep cached states to be restored */-arch_msix_mask_irq(entry,1);+__msix_mask_irq(entry,1);}msix_clear_and_set_ctrl(dev,PCI_MSIX_FLAGS_ENABLE,0);
From: Yijing Wang <hidden> Date: 2014-10-15 02:33:59
Use MSI chip framework instead of arch MSI functions to configure
MSI/MSI-X irq. So we can manage MSI/MSI-X irq in a unified framework.
Signed-off-by: Yijing Wang <redacted>
Acked-by: David Vrabel <redacted>
CC: Konrad Rzeszutek Wilk <redacted>
---
arch/x86/pci/xen.c | 58 +++++++++++++++++++++++++++++++++++-----------------
1 files changed, 39 insertions(+), 19 deletions(-)
@@ -386,14 +396,22 @@ static void xen_teardown_msi_irqs(struct pci_dev *dev)elsexen_pci_frontend_disable_msi(dev);-/* Free the IRQ's and the msidesc using the generic code. */-default_teardown_msi_irqs(dev);-}+list_for_each_entry(msidesc,&dev->msi_list,list){+inti,nvec;+if(msidesc->irq==0)+continue;+if(msidesc->nvec_used)+nvec=msidesc->nvec_used;+else+nvec=1<<msidesc->msi_attrib.multiple;+for(i=0;i<nvec;i++)+xen_teardown_msi_irq(chip,msidesc->irq+i);+}-staticvoidxen_teardown_msi_irq(unsignedintirq)-{-xen_destroy_irq(irq);}++structmsi_chipxen_msi_chip;+#endifint__initpci_xen_init(void)
@@ -414,9 +432,9 @@ int __init pci_xen_init(void)#endif#ifdef CONFIG_PCI_MSI-x86_msi.setup_msi_irqs=xen_setup_msi_irqs;-x86_msi.teardown_msi_irq=xen_teardown_msi_irq;-x86_msi.teardown_msi_irqs=xen_teardown_msi_irqs;+xen_msi_chip.setup_irqs=xen_setup_msi_irqs;+xen_msi_chip.teardown_irqs=xen_teardown_msi_irqs;+x86_msi_chip=&xen_msi_chip;pci_msi_ignore_mask=1;#endifreturn0;
@@ -436,8 +454,9 @@ int __init pci_xen_hvm_init(void)#endif#ifdef CONFIG_PCI_MSI-x86_msi.setup_msi_irqs=xen_hvm_setup_msi_irqs;-x86_msi.teardown_msi_irq=xen_teardown_msi_irq;+xen_msi_chip.setup_irqs=xen_hvm_setup_msi_irqs;+xen_msi_chip.teardown_irq=xen_teardown_msi_irq;+x86_msi_chip=&xen_msi_chip;#endifreturn0;}
@@ -494,9 +513,10 @@ int __init pci_xen_initial_domain(void)intirq;#ifdef CONFIG_PCI_MSI-x86_msi.setup_msi_irqs=xen_initdom_setup_msi_irqs;-x86_msi.teardown_msi_irq=xen_teardown_msi_irq;-x86_msi.restore_msi_irqs=xen_initdom_restore_msi_irqs;+xen_msi_chip.setup_irqs=xen_initdom_setup_msi_irqs;+xen_msi_chip.teardown_irq=xen_teardown_msi_irq;+xen_msi_chip.restore_irqs=xen_initdom_restore_msi_irqs;+x86_msi_chip=&xen_msi_chip;pci_msi_ignore_mask=1;#endifxen_setup_acpi_sci();
@@ -41,6 +44,15 @@ static inline int pci_proc_domain(struct pci_bus *bus)}#endif+#ifdef CONFIG_PCI_MSI+staticinlinestructmsi_chip*pci_msi_chip(structpci_bus*bus)+{+structpci_sysdata*sd=bus->sysdata;++returnsd->msi_chip;+}+#endif+/* Can be used to override the logic in pci_scan_bus for skippingalready-configuredbusnumbers-tobeusedforbuggyBIOSesorarchitectureswithincompletePCIsetupbytheloader*/
@@ -3227,11 +3227,30 @@ int native_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)return0;}+staticint__native_setup_msi_irqs(structmsi_chip*chip,+structpci_dev*dev,intnvec,inttype)+{+returnnative_setup_msi_irqs(dev,nvec,type);+}+voidnative_teardown_msi_irq(unsignedintirq){irq_free_hwirq(irq);}+staticvoid__native_teardown_msi_irq(structmsi_chip*chip,+unsignedintirq)+{+native_teardown_msi_irq(irq);+}++staticstructmsi_chipnative_msi_chip={+.setup_irqs=__native_setup_msi_irqs,+.teardown_irq=__native_teardown_msi_irq,+};++structmsi_chip*x86_msi_chip=&native_msi_chip;+#ifdef CONFIG_DMAR_TABLEstaticintdmar_msi_set_affinity(structirq_data*data,conststructcpumask*mask,
From: David Miller <davem@davemloft.net> Date: 2014-10-15 02:36:54
From: Yijing Wang <redacted>
Date: Wed, 15 Oct 2014 11:07:13 +0800
Use MSI chip framework instead of arch MSI functions to configure
MSI/MSI-X irq. So we can manage MSI/MSI-X irq in a unified framework.
Signed-off-by: Yijing Wang <redacted>
From: Sebastian Ott <hidden> Date: 2014-10-16 12:13:47
On Wed, 15 Oct 2014, Yijing Wang wrote:
Use MSI chip framework instead of arch MSI functions to configure
MSI/MSI-X irq. So we can manage MSI/MSI-X irq in a unified framework.
Signed-off-by: Yijing Wang <redacted>
---
Hi Sebastian,
I dropped the Acked-by , because this version has a
lot changes compared to last. So, I guess you may want to check it again.
I did and I agree with that one too.
Regards,
Sebastian
From: Yijing Wang <hidden> Date: 2014-10-17 01:05:15
On 2014/10/16 20:13, Sebastian Ott wrote:
On Wed, 15 Oct 2014, Yijing Wang wrote:
quoted
Use MSI chip framework instead of arch MSI functions to configure
MSI/MSI-X irq. So we can manage MSI/MSI-X irq in a unified framework.
Signed-off-by: Yijing Wang <redacted>
---
Hi Sebastian,
I dropped the Acked-by , because this version has a
lot changes compared to last. So, I guess you may want to check it again.
From: Michael Ellerman <mpe@ellerman.id.au> Date: 2014-10-17 07:23:29
On Wed, 2014-10-15 at 11:07 +0800, Yijing Wang wrote:
Use MSI chip framework instead of arch MSI functions to configure
MSI/MSI-X irq. So we can manage MSI/MSI-X irq in a unified framework.
Signed-off-by: Yijing Wang <redacted>
---
Hi Michael,
I dropped the Acked-by , because this version has a
lot changes compared to last. So, I guess you may want to check it again.
OK thanks.
Still looks OK and boots on one of my test systems that uses MSI.
Acked-by: Michael Ellerman <mpe@ellerman.id.au> (for powerpc)
cheers
From: Yijing Wang <hidden> Date: 2014-10-17 07:42:59
On 2014/10/17 15:23, Michael Ellerman wrote:
On Wed, 2014-10-15 at 11:07 +0800, Yijing Wang wrote:
quoted
Use MSI chip framework instead of arch MSI functions to configure
MSI/MSI-X irq. So we can manage MSI/MSI-X irq in a unified framework.
Signed-off-by: Yijing Wang <redacted>
---
Hi Michael,
I dropped the Acked-by , because this version has a
lot changes compared to last. So, I guess you may want to check it again.
OK thanks.
Still looks OK and boots on one of my test systems that uses MSI.
Good!
Acked-by: Michael Ellerman <mpe@ellerman.id.au> (for powerpc)
From: Lorenzo Pieralisi <hidden> Date: 2014-10-20 17:22:14
On Wed, Oct 15, 2014 at 04:06:52AM +0100, Yijing Wang wrote:
quoted hunk
Saving msi chip in pci_sys_data can make pci bus and
devices don't need to know msi chip detail, it also
make pci enumeration code be decoupled from msi chip.
In fact, all pci devices under the same pci hostbridge
share same msi chip. So msi chip should be seen as one
of resources or attributes to be initialized in pci host
bridge driver. Currently, pci hostbridge drivers create
pci_host_bridge in pci_create_root_bus(), and pass arch
specific pci sysdata to core pci scan functions. So pci
arch sysdata is good place to save msi chip.
=20
Signed-off-by: Yijing Wang <redacted>
---
arch/arm/include/asm/mach/pci.h | 6 ++++++
arch/arm/include/asm/pci.h | 9 +++++++++
arch/arm/kernel/bios32.c | 3 +++
drivers/pci/msi.c | 6 ++++++
include/linux/pci.h | 9 +++++++++
5 files changed, 33 insertions(+), 0 deletions(-)
=20
This struct is defined for ARM only. We are trying to remove dependency on =
it
so that we can have a single driver for ARM32 and ARM64 systems without
pcibios dependency. Why can't we add this msi chip data to the host
bridge struct instead ? I understand it is all a matter of how to pass
the pointer to pci_scan_root_bus(), where the bridge is created.
We could initialize the msi chip on the bridge through the bus pointer
returned by the pci_scan_root_bus() function.
Thanks,
Lorenzo
@@ -1433,6 +1433,15 @@ static inline int pci_get_new_domain_nr(void) { re=
turn -ENOSYS; }
=20
#include <asm/pci.h>
=20
+/* Just avoid compile error, will be clean up later */
+#ifdef CONFIG_PCI_MSI
+
+#ifndef pci_msi_chip
+#define pci_msi_chip(bus)=09NULL
+#endif
+
+#endif
+
/* these helpers provide future and backwards compatibility
* for accessing popular PCI BAR info */
#define pci_resource_start(dev, bar)=09((dev)->resource[(bar)].start)
--=20
1.7.1
=20
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" i=
From: Yijing Wang <hidden> Date: 2014-10-21 01:33:05
On 2014/10/21 1:21, Lorenzo Pieralisi wrote:
On Wed, Oct 15, 2014 at 04:06:52AM +0100, Yijing Wang wrote:
quoted
Saving msi chip in pci_sys_data can make pci bus and
devices don't need to know msi chip detail, it also
make pci enumeration code be decoupled from msi chip.
In fact, all pci devices under the same pci hostbridge
share same msi chip. So msi chip should be seen as one
of resources or attributes to be initialized in pci host
bridge driver. Currently, pci hostbridge drivers create
pci_host_bridge in pci_create_root_bus(), and pass arch
specific pci sysdata to core pci scan functions. So pci
arch sysdata is good place to save msi chip.
Signed-off-by: Yijing Wang <redacted>
---
arch/arm/include/asm/mach/pci.h | 6 ++++++
arch/arm/include/asm/pci.h | 9 +++++++++
arch/arm/kernel/bios32.c | 3 +++
drivers/pci/msi.c | 6 ++++++
include/linux/pci.h | 9 +++++++++
5 files changed, 33 insertions(+), 0 deletions(-)
This struct is defined for ARM only. We are trying to remove dependency on it
so that we can have a single driver for ARM32 and ARM64 systems without
pcibios dependency. Why can't we add this msi chip data to the host
bridge struct instead ? I understand it is all a matter of how to pass
the pointer to pci_scan_root_bus(), where the bridge is created.
We could initialize the msi chip on the bridge through the bus pointer
returned by the pci_scan_root_bus() function.
As mentioned in Patch 0, I will refactor generic pci hostbridge in another series,
We need not only save msi_chip into pci_host_bridge, and other common info, like domain_nr,
resources.
Thanks!
Yijing.
Thanks,
Lorenzo
quoted
struct list_head node;
int busnr; /* primary bus number */
u64 mem_offset; /* bus->cpu memory mapping offset */
@@ -1433,6 +1433,15 @@ static inline int pci_get_new_domain_nr(void) { return -ENOSYS; }#include<asm/pci.h>+/* Just avoid compile error, will be clean up later */+#ifdef CONFIG_PCI_MSI++#ifndef pci_msi_chip+#define pci_msi_chip(bus) NULL+#endif++#endif+/* these helpers provide future and backwards compatibility*foraccessingpopularPCIBARinfo*/#define pci_resource_start(dev, bar) ((dev)->resource[(bar)].start)
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
On Wed, Oct 15, 2014 at 11:07:12AM +0800, Yijing Wang wrote:
Use MSI chip framework instead of arch MSI functions to configure
MSI/MSI-X irq. So we can manage MSI/MSI-X irq in a unified framework.
This needs slightly more detail. You're using the MSI chip framework
"instead of arch MSI functions". Well, there are still arch-specific
functions, i.e., arch_ia64_setup_msi_irq() and
arch_ia64_teardown_msi_irq().
We used to have arch_setup_msi_irq() which had a weak default
implementation, and a strong arch-specific implementation here, and you're
replacing that model with the new "msi-ops" model. I don't know how you
want to write that, but it's not that you're getting rid of the
arch-specific code; you're keeping arch-specific code but structuring it
differently.
@@ -94,6 +94,7 @@ struct pci_controller {intsegment;intnode;/* nearest node with memory or NUMA_NO_NODE for global allocation */+structmsi_chip*msi_chip;void*platform_data;};
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Yijing Wang <hidden> Date: 2014-10-23 01:18:07
On 2014/10/23 7:53, Bjorn Helgaas wrote:
On Wed, Oct 15, 2014 at 11:07:12AM +0800, Yijing Wang wrote:
quoted
Use MSI chip framework instead of arch MSI functions to configure
MSI/MSI-X irq. So we can manage MSI/MSI-X irq in a unified framework.
This needs slightly more detail. You're using the MSI chip framework
"instead of arch MSI functions". Well, there are still arch-specific
functions, i.e., arch_ia64_setup_msi_irq() and
arch_ia64_teardown_msi_irq().
We used to have arch_setup_msi_irq() which had a weak default
implementation, and a strong arch-specific implementation here, and you're
replacing that model with the new "msi-ops" model. I don't know how you
want to write that, but it's not that you're getting rid of the
arch-specific code; you're keeping arch-specific code but structuring it
differently.
@@ -94,6 +94,7 @@ struct pci_controller {intsegment;intnode;/* nearest node with memory or NUMA_NO_NODE for global allocation */+structmsi_chip*msi_chip;void*platform_data;};
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
On Wed, Oct 15, 2014 at 11:06:50AM +0800, Yijing Wang wrote:
Commit 0e4ccb1505a9 ("PCI: Add x86_msi.msi_mask_irq() and msix_mask_irq()")
introduced two __weak arch functions arch_msix_mask_irq() and
arch_msi_mask_irq() to work around a bug when running xen in x86.
These two functions made msi code more complex. This patch reverts
the commit and introduces a global flag to control msi mask action to
avoid the bug. The patch is also preparation for using MSI chip framework
instead of weak arch MSI functions in all platforms. Keep default_msi_mask_irq()
and default_msix_mask_irq() in linux/msi.h to make s390 MSI code compile
happy, they will be removed in the later patch.
This patch is basically a revert of 0e4ccb1505a9 intermingled with the
addition of the new pci_msi_ignore_mask technique.
Can you please split this into two patches:
- Add the pci_msi_ignore_mask stuff (alongside the existing way)
- Revert 0e4ccb1505a9
I think that will make it easier to see what's going on.
quoted hunk
Signed-off-by: Yijing Wang <redacted>
CC: David Vrabel <redacted>
CC: Konrad Rzeszutek Wilk <redacted>
---
Hi David and Konrad,
I dropped the Acked-by and tested-by, because this version has a
lot changes compared to last. So, I guess you may want to check it again.
---
arch/x86/include/asm/x86_init.h | 3 ---
arch/x86/kernel/x86_init.c | 10 ----------
arch/x86/pci/xen.c | 14 ++------------
drivers/pci/msi.c | 29 ++++++++++++-----------------
include/linux/msi.h | 8 ++++++--
5 files changed, 20 insertions(+), 44 deletions(-)
@@ -866,7 +861,7 @@ void pci_msi_shutdown(struct pci_dev *dev)/* Return the device with MSI unmasked as initial states */mask=msi_mask(desc->msi_attrib.multi_cap);/* Keep cached state to be restored */-arch_msi_mask_irq(desc,mask,~mask);+__msi_mask_irq(desc,mask,~mask);/* Restore dev->irq to its default pin-assertion irq */dev->irq=desc->msi_attrib.default_irq;
@@ -964,7 +959,7 @@ void pci_msix_shutdown(struct pci_dev *dev)/* Return the device with MSI-X masked as initial states */list_for_each_entry(entry,&dev->msi_list,list){/* Keep cached states to be restored */-arch_msix_mask_irq(entry,1);+__msix_mask_irq(entry,1);}msix_clear_and_set_ctrl(dev,PCI_MSIX_FLAGS_ENABLE,0);
From: Yijing Wang <hidden> Date: 2014-10-23 04:45:16
On 2014/10/23 12:25, Bjorn Helgaas wrote:
On Wed, Oct 15, 2014 at 11:06:50AM +0800, Yijing Wang wrote:
quoted
Commit 0e4ccb1505a9 ("PCI: Add x86_msi.msi_mask_irq() and msix_mask_irq()")
introduced two __weak arch functions arch_msix_mask_irq() and
arch_msi_mask_irq() to work around a bug when running xen in x86.
These two functions made msi code more complex. This patch reverts
the commit and introduces a global flag to control msi mask action to
avoid the bug. The patch is also preparation for using MSI chip framework
instead of weak arch MSI functions in all platforms. Keep default_msi_mask_irq()
and default_msix_mask_irq() in linux/msi.h to make s390 MSI code compile
happy, they will be removed in the later patch.
This patch is basically a revert of 0e4ccb1505a9 intermingled with the
addition of the new pci_msi_ignore_mask technique.
Can you please split this into two patches:
- Add the pci_msi_ignore_mask stuff (alongside the existing way)
- Revert 0e4ccb1505a9
I think that will make it easier to see what's going on.
OK, I will do it, thanks.
Thanks!
Yijing.
quoted
Signed-off-by: Yijing Wang <redacted>
CC: David Vrabel <redacted>
CC: Konrad Rzeszutek Wilk <redacted>
---
Hi David and Konrad,
I dropped the Acked-by and tested-by, because this version has a
lot changes compared to last. So, I guess you may want to check it again.
---
arch/x86/include/asm/x86_init.h | 3 ---
arch/x86/kernel/x86_init.c | 10 ----------
arch/x86/pci/xen.c | 14 ++------------
drivers/pci/msi.c | 29 ++++++++++++-----------------
include/linux/msi.h | 8 ++++++--
5 files changed, 20 insertions(+), 44 deletions(-)
@@ -866,7 +861,7 @@ void pci_msi_shutdown(struct pci_dev *dev)/* Return the device with MSI unmasked as initial states */mask=msi_mask(desc->msi_attrib.multi_cap);/* Keep cached state to be restored */-arch_msi_mask_irq(desc,mask,~mask);+__msi_mask_irq(desc,mask,~mask);/* Restore dev->irq to its default pin-assertion irq */dev->irq=desc->msi_attrib.default_irq;
@@ -964,7 +959,7 @@ void pci_msix_shutdown(struct pci_dev *dev)/* Return the device with MSI-X masked as initial states */list_for_each_entry(entry,&dev->msi_list,list){/* Keep cached states to be restored */-arch_msix_mask_irq(entry,1);+__msix_mask_irq(entry,1);}msix_clear_and_set_ctrl(dev,PCI_MSIX_FLAGS_ENABLE,0);
On Wed, Oct 15, 2014 at 11:06:53AM +0800, Yijing Wang wrote:
quoted hunk
Save msi chip in pci_sys_data instead of assign
msi chip to every pci bus in .add_bus().
Signed-off-by: Yijing Wang <redacted>
---
drivers/pci/host/pci-tegra.c | 13 +++----------
1 files changed, 3 insertions(+), 10 deletions(-)
@@ -1881,11 +1872,13 @@ static int tegra_pcie_enable(struct tegra_pcie *pcie)memset(&hw,0,sizeof(hw));+#ifdef CONFIG_PCI_MSI+hw.msi_chip=&pcie->msi.chip;+#endif
Why did you use "#ifdef CONFIG_PCI_MSI" instead of the
"IS_ENABLED(CONFIG_PCI_MSI)" used previously?
It's true that CONFIG_PCI_MSI will never be a tristate symbol, so we don't
really *need* the extra smarts of IS_ENABLED(), but I'm fairly sympathetic
to James' argument [1] that we should just use IS_ENABLED() all the time
because it's simpler overall.
If you want to change the #ifdef to IS_ENABLED(), that should be a separate
patch from your msi_chip change, and we can debate the merits of that by
itself.
[1] http://lkml.iu.edu//hypermail/linux/kernel/1204.3/00081.html
hw.nr_controllers = 1;
hw.private_data = (void **)&pcie;
hw.setup = tegra_pcie_setup;
hw.map_irq = tegra_pcie_map_irq;
- hw.add_bus = tegra_pcie_add_bus;
hw.scan = tegra_pcie_scan_bus;
hw.ops = &tegra_pcie_ops;
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
On Wed, Oct 15, 2014 at 11:06:52AM +0800, Yijing Wang wrote:
quoted hunk
Saving msi chip in pci_sys_data can make pci bus and
devices don't need to know msi chip detail, it also
make pci enumeration code be decoupled from msi chip.
In fact, all pci devices under the same pci hostbridge
share same msi chip. So msi chip should be seen as one
of resources or attributes to be initialized in pci host
bridge driver. Currently, pci hostbridge drivers create
pci_host_bridge in pci_create_root_bus(), and pass arch
specific pci sysdata to core pci scan functions. So pci
arch sysdata is good place to save msi chip.
Signed-off-by: Yijing Wang <redacted>
---
arch/arm/include/asm/mach/pci.h | 6 ++++++
arch/arm/include/asm/pci.h | 9 +++++++++
arch/arm/kernel/bios32.c | 3 +++
drivers/pci/msi.c | 6 ++++++
include/linux/pci.h | 9 +++++++++
5 files changed, 33 insertions(+), 0 deletions(-)
@@ -1433,6 +1433,15 @@ static inline int pci_get_new_domain_nr(void) { return -ENOSYS; }#include<asm/pci.h>+/* Just avoid compile error, will be clean up later */+#ifdef CONFIG_PCI_MSI++#ifndef pci_msi_chip+#define pci_msi_chip(bus) NULL+#endif+#endif
I don't like the mixture of ARM changes and PCI core changes in the same
patch. Can you split this into a core patch that does something like this:
struct msi_chip * __weak pcibios_msi_controller(struct pci_bus *bus)
{
return NULL;
}
struct msi_chip *pci_msi_controller(struct pci_bus *bus)
{
msi_chip *controller = bus->msi;
if (controller)
return controller;
return pcibios_msi_controller(bus);
}
followed by an ARM patch that puts the msi_chip pointer in struct hw_pci
and implements pcibios_msi_controller()?
I know you're trying to *remove* weak functions, and this adds one, but
this section of the series is more about getting rid of the ARM
pcibios_add_bus() because all it was used for was setting the bus->msi
pointer.
Eventually we might have a way to stash an MSI controller pointer in the
generic pci_host_bridge struct, and then the pcibios_msi_controller()
interface could go away.
+
/* these helpers provide future and backwards compatibility
* for accessing popular PCI BAR info */
#define pci_resource_start(dev, bar) ((dev)->resource[(bar)].start)
--
1.7.1
On Wed, Oct 15, 2014 at 11:06:57AM +0800, Yijing Wang wrote:
quoted hunk
MSI chip will be saved in pci_sys_data, now we can
clean up pcibios_add_bus() and pcibios_remove_bus()
in arm, and use pci_find_msi_chip() to get msi chip
in core MSI code.
Signed-off-by: Yijing Wang <redacted>
---
arch/arm/include/asm/mach/pci.h | 4 ----
arch/arm/kernel/bios32.c | 16 ----------------
drivers/pci/msi.c | 11 +++--------
3 files changed, 3 insertions(+), 28 deletions(-)
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, Oct 15, 2014 at 11:06:58AM +0800, Yijing Wang wrote:
quoted hunk
Now msi chip is saved in pci_sys_data in arm,
we could clean the bus->msi assignment in
pci core.
Signed-off-by: Yijing Wang <redacted>
CC: Thierry Reding <redacted>
CC: Thomas Petazzoni <redacted>
---
drivers/pci/probe.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
This needs an explanation of why ARM was the only arch to depend on this.
child->sysdata = parent->sysdata;
child->bus_flags = parent->bus_flags;
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, Oct 15, 2014 at 11:06:48AM +0800, Yijing Wang wrote:
Now there are a lot of weak arch functions in MSI code.
Thierry Reding Introduced MSI chip framework to configure MSI/MSI-X in arm,
that's a better solution than overriding lots of existing weak arch functionsin.
This series use MSI chip framework to refactor MSI code across all platforms
to eliminate weak arch functions. Then all MSI irqs will be managed in a
unified framework. Because this series changed a lot of ARCH MSI code,
so tests in the related platforms are warmly welcomed!
And you may access it at:
https://github.com/YijingWang/msi-chip-v3.git master
v2->v3:
1. For patch "x86/xen/MSI: Eliminate...", introduce a new global flag "pci_msi_ignore_mask"
to control the msi mask instead of replacing the irqchip->mask with nop function,
the latter method has problem pointed out by Konrad Rzeszutek Wilk.
2. Save msi chip in arch pci sysdata instead of associating msi chip to pci bus.
Because pci devices under same host share the same msi chip, so I think associate
msi chip to pci host/pci sysdata is better than to bother every pci bus/devices.
A better solution suggested by Liviu is to rip out pci_host_bridge from pci_create_root_bus(),
then we can save some pci host common attributes like domain_nr, msi_chip, resources,
into the generic pci_host_bridge. Because this changes to pci host bridge is also
a large series, so I think we should go step by step, I will try to post it in another
series later.
4. Clean up arm pcibios_add_bus() and pcibios_remove_bus() which were used to associate
msi chip to pci bus.
v1->v2:
Add a patch to make s390 MSI code build happy between patch "x86/xen/MSI: E.."
and "s390/MSI: Use MSI..". Fix several typo problems found by Lucas.
RFC->v1:
Updated "[patch 4/21] x86/xen/MSI: Eliminate...", export msi_chip instead
of #ifdef to fix MSI bug in xen running in x86.
Rename arch_get_match_msi_chip() to arch_find_msi_chip().
Drop use struct device as the msi_chip argument, we will do that
later in another patchset.
Yijing Wang (27):
This is a lot of stuff, and it's not all related, so putting it all
together in one series makes it hard for me to deal with it.
MSI: Remove the redundant irq_set_chip_data()
This doesn't seem related to eliminating weak functions.
x86/xen/MSI: Eliminate arch_msix_mask_irq() and arch_msi_mask_irq()
s390/MSI: Use __msi_mask_irq() instead of default_msi_mask_irq()
These two seem to go together.
arm/MSI: Save MSI chip in pci_sys_data
PCI: tegra: Save msi chip in pci_sys_data
PCI: designware: Save msi chip in pci_sys_data
PCI: rcar: Save msi chip in pci_sys_data
PCI: mvebu: Save msi chip in pci_sys_data
arm/PCI: Clean unused pcibios_add_bus() and pcibios_remove_bus()
PCI/MSI: Remove useless bus->msi assignment
These seem to go together (it'd be nice if they were all capitalized the
same).
I don't like the "msi_chip" name because the "chip" part doesn't convey
much information, other than telling us that apparently some sort of
semiconductor integrated circuit is involved. I sort of assumed that
much :)
Something like "msi_controller" would be more descriptive since we're
talking about an interrupt controller that accepts writes from a device and
turns them into CPU interrupts, e.g., a LAPIC.
PCI/MSI: Refactor struct msi_chip to make it become more common
x86/MSI: Use MSI chip framework to configure MSI/MSI-X irq
x86/xen/MSI: Use MSI chip framework to configure MSI/MSI-X irq
Irq_remapping/MSI: Use MSI chip framework to configure MSI/MSI-X irq
x86/MSI: Remove unused MSI weak arch functions
Mips/MSI: Save msi chip in pci sysdata
MIPS/Octeon/MSI: Use MSI chip framework to configure MSI/MSI-X irq
MIPS/Xlp: Remove the dead function destroy_irq() to fix build error
MIPS/Xlp/MSI: Use MSI chip framework to configure MSI/MSI-X irq
MIPS/Xlr/MSI: Use MSI chip framework to configure MSI/MSI-X irq
Powerpc/MSI: Use MSI chip framework to configure MSI/MSI-X irq
s390/MSI: Use MSI chip framework to configure MSI/MSI-X irq
arm/iop13xx/MSI: Use MSI chip framework to configure MSI/MSI-X irq
IA64/MSI: Use MSI chip framework to configure MSI/MSI-X irq
Sparc/MSI: Use MSI chip framework to configure MSI/MSI-X irq
tile/MSI: Use MSI chip framework to configure MSI/MSI-X irq
PCI/MSI: Clean up unused MSI arch functions
arch/arm/include/asm/mach/pci.h | 10 +-
arch/arm/include/asm/pci.h | 9 ++
arch/arm/kernel/bios32.c | 19 +---
arch/arm/mach-iop13xx/include/mach/pci.h | 4 +
arch/arm/mach-iop13xx/iq81340mc.c | 3 +
arch/arm/mach-iop13xx/iq81340sc.c | 5 +-
arch/arm/mach-iop13xx/msi.c | 11 ++-
arch/ia64/include/asm/pci.h | 10 ++
arch/ia64/kernel/msi_ia64.c | 14 ++-
arch/ia64/pci/pci.c | 1 +
arch/mips/include/asm/netlogic/xlp-hal/pcibus.h | 1 +
arch/mips/include/asm/octeon/pci-octeon.h | 4 +
arch/mips/include/asm/pci.h | 14 +++
arch/mips/pci/msi-octeon.c | 31 +++---
arch/mips/pci/msi-xlp.c | 15 ++-
arch/mips/pci/pci-octeon.c | 3 +
arch/mips/pci/pci-xlp.c | 3 +
arch/mips/pci/pci-xlr.c | 17 +++-
arch/powerpc/include/asm/pci-bridge.h | 15 +++
arch/powerpc/kernel/msi.c | 12 ++-
arch/powerpc/kernel/pci-common.c | 3 +
arch/s390/include/asm/pci.h | 9 ++
arch/s390/pci/pci.c | 16 ++-
arch/sparc/kernel/pci.c | 14 ++-
arch/sparc/kernel/pci_impl.h | 12 ++
arch/tile/include/asm/pci.h | 10 ++
arch/tile/kernel/pci_gx.c | 13 ++-
arch/x86/include/asm/pci.h | 18 +++-
arch/x86/include/asm/x86_init.h | 7 --
arch/x86/kernel/apic/io_apic.c | 12 ++-
arch/x86/kernel/x86_init.c | 34 ------
arch/x86/pci/acpi.c | 1 +
arch/x86/pci/common.c | 3 +
arch/x86/pci/xen.c | 72 +++++++------
drivers/iommu/irq_remapping.c | 13 ++-
drivers/pci/host/pci-mvebu.c | 10 +--
drivers/pci/host/pci-tegra.c | 13 +--
drivers/pci/host/pcie-designware.c | 15 +--
drivers/pci/host/pcie-rcar.c | 13 +--
drivers/pci/msi.c | 133 ++++++++++-------------
drivers/pci/probe.c | 1 -
include/linux/msi.h | 24 ++---
include/linux/pci.h | 1 +
43 files changed, 379 insertions(+), 269 deletions(-)
Huh. I was hoping this was going to simplify things, and maybe it does
somehow, but it's unfortunate that it adds 110 lines of code overall. Does
that seem right to you? Why does it add code?
Who do you want to apply this? I can take it if that makes the most sense,
but I'd like acks from the architecture folks for their pieces, and
especially one from Thomas for the overall direction and the x86 parts.
If you want me to take this, can you refresh it to be based on v3.18-rc1?
I tried to apply it on v3.18-rc1, but [15/27] didn't apply because of
conflicts in arch/x86/kernel/apic/io_apic.c.
I'll look at these more tomorrow, I'm getting bleary-eyed tonight.
Bjorn
From: Yijing Wang <hidden> Date: 2014-10-23 06:24:10
On 2014/10/23 13:18, Bjorn Helgaas wrote:
On Wed, Oct 15, 2014 at 11:06:53AM +0800, Yijing Wang wrote:
quoted
Save msi chip in pci_sys_data instead of assign
msi chip to every pci bus in .add_bus().
Signed-off-by: Yijing Wang <redacted>
---
drivers/pci/host/pci-tegra.c | 13 +++----------
1 files changed, 3 insertions(+), 10 deletions(-)
@@ -1881,11 +1872,13 @@ static int tegra_pcie_enable(struct tegra_pcie *pcie)memset(&hw,0,sizeof(hw));+#ifdef CONFIG_PCI_MSI+hw.msi_chip=&pcie->msi.chip;+#endif
Why did you use "#ifdef CONFIG_PCI_MSI" instead of the
"IS_ENABLED(CONFIG_PCI_MSI)" used previously?
Just personal habit. :)
It's true that CONFIG_PCI_MSI will never be a tristate symbol, so we don't
really *need* the extra smarts of IS_ENABLED(), but I'm fairly sympathetic
to James' argument [1] that we should just use IS_ENABLED() all the time
because it's simpler overall.
If you want to change the #ifdef to IS_ENABLED(), that should be a separate
patch from your msi_chip change, and we can debate the merits of that by
itself.
[1] http://lkml.iu.edu//hypermail/linux/kernel/1204.3/00081.html
Hi Bjorn, thanks for your guidance. I will use IS_ENABLED() instead of #ifdef for simplification
in a separate patch.
quoted
hw.nr_controllers = 1;
hw.private_data = (void **)&pcie;
hw.setup = tegra_pcie_setup;
hw.map_irq = tegra_pcie_map_irq;
- hw.add_bus = tegra_pcie_add_bus;
hw.scan = tegra_pcie_scan_bus;
hw.ops = &tegra_pcie_ops;
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
@@ -1433,6 +1433,15 @@ static inline int pci_get_new_domain_nr(void) { return -ENOSYS; }#include<asm/pci.h>+/* Just avoid compile error, will be clean up later */+#ifdef CONFIG_PCI_MSI++#ifndef pci_msi_chip+#define pci_msi_chip(bus) NULL+#endif+#endif
I don't like the mixture of ARM changes and PCI core changes in the same
patch. Can you split this into a core patch that does something like this:
struct msi_chip * __weak pcibios_msi_controller(struct pci_bus *bus)
{
return NULL;
}
struct msi_chip *pci_msi_controller(struct pci_bus *bus)
{
msi_chip *controller = bus->msi;
if (controller)
return controller;
return pcibios_msi_controller(bus);
}
followed by an ARM patch that puts the msi_chip pointer in struct hw_pci
and implements pcibios_msi_controller()?
OK, I will split it in half.
I know you're trying to *remove* weak functions, and this adds one, but
this section of the series is more about getting rid of the ARM
pcibios_add_bus() because all it was used for was setting the bus->msi
pointer.
Yes, agree.
Eventually we might have a way to stash an MSI controller pointer in the
generic pci_host_bridge struct, and then the pcibios_msi_controller()
interface could go away.
Yep, I am doing the work to make a generic pci_host_bridge, and try to rip it out from
pci_create_root_bus, that's also a large changes across many archs.
quoted
+
/* these helpers provide future and backwards compatibility
* for accessing popular PCI BAR info */
#define pci_resource_start(dev, bar) ((dev)->resource[(bar)].start)
--
1.7.1
What do the core changes below have to do with the ARM changes above?
They should be a separate patch unless they can't be separated.
Hm, it's not the thing have to do, because the changes below is only used by arm arch, so I put it here
together. It's ok to split the core changes out to another one.
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Yijing Wang <hidden> Date: 2014-10-23 06:41:20
On 2014/10/23 13:41, Bjorn Helgaas wrote:
On Wed, Oct 15, 2014 at 11:06:58AM +0800, Yijing Wang wrote:
quoted
Now msi chip is saved in pci_sys_data in arm,
we could clean the bus->msi assignment in
pci core.
Signed-off-by: Yijing Wang <redacted>
CC: Thierry Reding <redacted>
CC: Thomas Petazzoni <redacted>
---
drivers/pci/probe.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
This needs an explanation of why ARM was the only arch to depend on this.
OK, will add explanation in next version.
quoted
child->sysdata = parent->sysdata;
child->bus_flags = parent->bus_flags;
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Yijing Wang <hidden> Date: 2014-10-23 07:46:20
quoted
v1->v2:
Add a patch to make s390 MSI code build happy between patch "x86/xen/MSI: E.."
and "s390/MSI: Use MSI..". Fix several typo problems found by Lucas.
RFC->v1:
Updated "[patch 4/21] x86/xen/MSI: Eliminate...", export msi_chip instead
of #ifdef to fix MSI bug in xen running in x86.
Rename arch_get_match_msi_chip() to arch_find_msi_chip().
Drop use struct device as the msi_chip argument, we will do that
later in another patchset.
Yijing Wang (27):
This is a lot of stuff, and it's not all related, so putting it all
together in one series makes it hard for me to deal with it.
quoted
MSI: Remove the redundant irq_set_chip_data()
OK, will post it out separately.
This doesn't seem related to eliminating weak functions.
quoted
x86/xen/MSI: Eliminate arch_msix_mask_irq() and arch_msi_mask_irq()
s390/MSI: Use __msi_mask_irq() instead of default_msi_mask_irq()
Will update your comments and post these together.
These two seem to go together.
quoted
arm/MSI: Save MSI chip in pci_sys_data
PCI: tegra: Save msi chip in pci_sys_data
PCI: designware: Save msi chip in pci_sys_data
PCI: rcar: Save msi chip in pci_sys_data
PCI: mvebu: Save msi chip in pci_sys_data
arm/PCI: Clean unused pcibios_add_bus() and pcibios_remove_bus()
PCI/MSI: Remove useless bus->msi assignment
These seem to go together (it'd be nice if they were all capitalized the
same).
OK, will update the titles and post together.
I don't like the "msi_chip" name because the "chip" part doesn't convey
much information, other than telling us that apparently some sort of
semiconductor integrated circuit is involved. I sort of assumed that
much :)
I think so, msi_chip easily make me confuse with x86 irq_chip msi_chip.
Something like "msi_controller" would be more descriptive since we're
talking about an interrupt controller that accepts writes from a device and
turns them into CPU interrupts, e.g., a LAPIC.
Hm, it's a better one, arm also use "msi-controller" to represent the msi related
object in DTS file.
quoted
PCI/MSI: Refactor struct msi_chip to make it become more common
x86/MSI: Use MSI chip framework to configure MSI/MSI-X irq
x86/xen/MSI: Use MSI chip framework to configure MSI/MSI-X irq
Irq_remapping/MSI: Use MSI chip framework to configure MSI/MSI-X irq
x86/MSI: Remove unused MSI weak arch functions
Mips/MSI: Save msi chip in pci sysdata
MIPS/Octeon/MSI: Use MSI chip framework to configure MSI/MSI-X irq
MIPS/Xlp: Remove the dead function destroy_irq() to fix build error
MIPS/Xlp/MSI: Use MSI chip framework to configure MSI/MSI-X irq
MIPS/Xlr/MSI: Use MSI chip framework to configure MSI/MSI-X irq
Powerpc/MSI: Use MSI chip framework to configure MSI/MSI-X irq
s390/MSI: Use MSI chip framework to configure MSI/MSI-X irq
arm/iop13xx/MSI: Use MSI chip framework to configure MSI/MSI-X irq
IA64/MSI: Use MSI chip framework to configure MSI/MSI-X irq
Sparc/MSI: Use MSI chip framework to configure MSI/MSI-X irq
tile/MSI: Use MSI chip framework to configure MSI/MSI-X irq
PCI/MSI: Clean up unused MSI arch functions
arch/arm/include/asm/mach/pci.h | 10 +-
arch/arm/include/asm/pci.h | 9 ++
arch/arm/kernel/bios32.c | 19 +---
arch/arm/mach-iop13xx/include/mach/pci.h | 4 +
arch/arm/mach-iop13xx/iq81340mc.c | 3 +
arch/arm/mach-iop13xx/iq81340sc.c | 5 +-
arch/arm/mach-iop13xx/msi.c | 11 ++-
arch/ia64/include/asm/pci.h | 10 ++
arch/ia64/kernel/msi_ia64.c | 14 ++-
arch/ia64/pci/pci.c | 1 +
arch/mips/include/asm/netlogic/xlp-hal/pcibus.h | 1 +
arch/mips/include/asm/octeon/pci-octeon.h | 4 +
arch/mips/include/asm/pci.h | 14 +++
arch/mips/pci/msi-octeon.c | 31 +++---
arch/mips/pci/msi-xlp.c | 15 ++-
arch/mips/pci/pci-octeon.c | 3 +
arch/mips/pci/pci-xlp.c | 3 +
arch/mips/pci/pci-xlr.c | 17 +++-
arch/powerpc/include/asm/pci-bridge.h | 15 +++
arch/powerpc/kernel/msi.c | 12 ++-
arch/powerpc/kernel/pci-common.c | 3 +
arch/s390/include/asm/pci.h | 9 ++
arch/s390/pci/pci.c | 16 ++-
arch/sparc/kernel/pci.c | 14 ++-
arch/sparc/kernel/pci_impl.h | 12 ++
arch/tile/include/asm/pci.h | 10 ++
arch/tile/kernel/pci_gx.c | 13 ++-
arch/x86/include/asm/pci.h | 18 +++-
arch/x86/include/asm/x86_init.h | 7 --
arch/x86/kernel/apic/io_apic.c | 12 ++-
arch/x86/kernel/x86_init.c | 34 ------
arch/x86/pci/acpi.c | 1 +
arch/x86/pci/common.c | 3 +
arch/x86/pci/xen.c | 72 +++++++------
drivers/iommu/irq_remapping.c | 13 ++-
drivers/pci/host/pci-mvebu.c | 10 +--
drivers/pci/host/pci-tegra.c | 13 +--
drivers/pci/host/pcie-designware.c | 15 +--
drivers/pci/host/pcie-rcar.c | 13 +--
drivers/pci/msi.c | 133 ++++++++++-------------
drivers/pci/probe.c | 1 -
include/linux/msi.h | 24 ++---
include/linux/pci.h | 1 +
43 files changed, 379 insertions(+), 269 deletions(-)
Huh. I was hoping this was going to simplify things, and maybe it does
somehow, but it's unfortunate that it adds 110 lines of code overall. Does
that seem right to you? Why does it add code?
I filter out these patches which add code.
[PATCH v3 04/27] arm/MSI: Save MSI chip in pci_sys_data
5 files changed, 33 insertions(+), 0 deletions(-)
Insertions code mainly to introduce arch specific pci_msi_chip() to extract msi_chip from pci_sys_data, and temporary #ifdef
[PATCH v3 11/27] PCI/MSI: Refactor struct msi_chip to make it become more common
2 files changed, 19 insertions(+), 0 deletions(-)
Insertions here is to add msi ops like restore, teardown to msi_chip.
[PATCH v3 12/27] x86/MSI: Use MSI chip framework to configure MSI/MSI-X irq
4 files changed, 36 insertions(+), 0 deletions(-)
Arch specific pci_msi_chip() and declaration of msi_chip in x86, also some temporary code to compile ok.
[PATCH v3 13/27] x86/xen/MSI: Use MSI chip framework to configure MSI/MSI-X irq
1 files changed, 39 insertions(+), 19 deletions(-)
To avoid call default_teardown_msi_irq(), copy the default_teardown_msi_irq() code in this file.
[PATCH v3 16/27] Mips/MSI: Save msi chip in pci sysdata
1 files changed, 14 insertions(+), 0 deletions(-)
Arch specific pci_msi_chip() and some #ifdef code
[PATCH v3 17/27] MIPS/Octeon/MSI: Use MSI chip framework to configure MSI/MSI-X irq
3 files changed, 25 insertions(+), 13 deletions(-)
Archs Use msi chip framework to configure MSI/MSI-x
3 files changed, 13 insertions(+), 2 deletions(-)
1 files changed, 15 insertions(+), 2 deletions(-)
3 files changed, 28 insertions(+), 2 deletions(-)
2 files changed, 19 insertions(+), 2 deletions(-)
4 files changed, 20 insertions(+), 3 deletions(-)
3 files changed, 21 insertions(+), 4 deletions(-)
2 files changed, 24 insertions(+), 2 deletions(-)
2 files changed, 21 insertions(+), 2 deletions(-)
So the most adding code is to introduce arch specific pci_msi_chip(), this one will be removed after we make
pci_host_bridge generic and save msi_chip in it. There are also lots of #ifdef in arm code for msi_chip.
Who do you want to apply this? I can take it if that makes the most sense,
I hope you can apply this.
but I'd like acks from the architecture folks for their pieces, and
especially one from Thomas for the overall direction and the x86 parts.
OK.
If you want me to take this, can you refresh it to be based on v3.18-rc1?
I tried to apply it on v3.18-rc1, but [15/27] didn't apply because of
conflicts in arch/x86/kernel/apic/io_apic.c.
OK.
I'll look at these more tomorrow, I'm getting bleary-eyed tonight.
Thanks for your review and comments very much!
Thanks!
Yijing.