[PATCH] video: Replace local macro with PCI standard macro

2013-12-05 Thread Yijing Wang
Replace local macro TGA_BUS_PCI with PCI standard marco dev_is_pci(). Signed-off-by: Yijing Wang --- drivers/video/tgafb.c | 16 +--- 1 files changed, 5 insertions(+), 11 deletions(-) diff --git a/drivers/video/tgafb.c b/drivers/video/tgafb.c index f28674f..5e94c6e 100644 --- a

[PATCH] ioat/dca: Use dev_is_pci() to check whether it is pci device

2013-12-05 Thread Yijing Wang
Use PCI standard marco dev_is_pci() instead of directly compare pci_bus_type to check whether it is pci device. Signed-off-by: Yijing Wang --- drivers/dma/ioat/dca.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/dma/ioat/dca.c b/drivers/dma/ioat

[PATCH] xen: Use dev_is_pci() to check whether it is pci device

2013-12-05 Thread Yijing Wang
Use PCI standard marco dev_is_pci() instead of directly compare pci_bus_type to check whether it is pci device. Signed-off-by: Yijing Wang --- drivers/xen/dbgp.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/xen/dbgp.c b/drivers/xen/dbgp.c index f3ccc80

[PATCH 2/2] net/fddi: Replace local marco with PCI standard macro

2013-12-05 Thread Yijing Wang
Replace local marco DFX_BUS_PCI with PCI standard marco dev_is_pci(). Signed-off-by: Yijing Wang --- drivers/net/fddi/defxx.c | 20 +++- 1 files changed, 7 insertions(+), 13 deletions(-) diff --git a/drivers/net/fddi/defxx.c b/drivers/net/fddi/defxx.c index 0b40e1c..0344f71

[PATCH 1/2] 3c59x/net: Use dev_is_pci() to simplify code

2013-12-05 Thread Yijing Wang
Use standard PCI macro dev_is_pci() to simplify code. Signed-off-by: Yijing Wang --- drivers/net/ethernet/3com/3c59x.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/ethernet/3com/3c59x.c b/drivers/net/ethernet/3com/3c59x.c index ad5272b..af24c3c 100644

[PATCH 2/3] iommu/fsl_pamu: Use dev_is_pci() to check whether it is pci device

2013-12-05 Thread Yijing Wang
Use PCI standard marco dev_is_pci() instead of directly compare pci_bus_type to check whether it is pci device. Signed-off-by: Yijing Wang --- drivers/iommu/fsl_pamu_domain.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/fsl_pamu_domain.c b/drivers

[PATCH 1/3] iommu/amd: Use dev_is_pci() to check whether it is pci device

2013-12-05 Thread Yijing Wang
Use PCI standard marco dev_is_pci() instead of directly compare pci_bus_type to check whether it is pci device. Signed-off-by: Yijing Wang --- drivers/iommu/amd_iommu.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu

[PATCH 3/3] iommu/vt-d: Use dev_is_pci() to check whether it is pci device

2013-12-05 Thread Yijing Wang
Use PCI standard marco dev_is_pci() instead of directly compare pci_bus_type to check whether it is pci device. Signed-off-by: Yijing Wang --- drivers/iommu/intel-iommu.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel

[PATCH 1/9] PCI: Use dev_is_pci() to check whether it is pci device

2013-12-05 Thread Yijing Wang
Use dev_is_pci() instead of directly compare pci_bus_type to check whether it is pci device. Signed-off-by: Yijing Wang --- drivers/pci/pci-acpi.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c index 577074e..e0431f1

[PATCH 2/9] x86/pci: Use dev_is_pci() to check whether it is pci device

2013-12-05 Thread Yijing Wang
Use PCI standard marco dev_is_pci() instead of directly compare pci_bus_type to check whether it is pci device. Signed-off-by: Yijing Wang --- arch/x86/kernel/acpi/boot.c |4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel

[PATCH 3/9] IA64/PCI: Use dev_is_pci() to check whether it is pci device

2013-12-05 Thread Yijing Wang
Use PCI dev_is_pci() instead of directly compare pci_bus_type to check whether it is pci device. Signed-off-by: Yijing Wang --- arch/ia64/hp/common/sba_iommu.c |2 +- arch/ia64/sn/pci/pci_dma.c | 24 2 files changed, 13 insertions(+), 13 deletions(-) diff

[PATCH 4/9] sparc/pci: Use dev_is_pci() to check whether it is pci device

2013-12-05 Thread Yijing Wang
Use PCI standard marco dev_is_pci() instead of directly compare pci_bus_type to check whether it is pci device. Signed-off-by: Yijing Wang --- arch/sparc/include/asm/dma-mapping.h | 10 -- arch/sparc/kernel/iommu.c|2 +- arch/sparc/kernel/ioport.c |4

[PATCH 5/9] parisc/pci: Repalce local inline function with PCI standard marco

2013-12-05 Thread Yijing Wang
Repalce local inline function is_pci_dev() with PCI standard marco dev_is_pci(). Signed-off-by: Yijing Wang --- arch/parisc/kernel/drivers.c | 22 +- 1 files changed, 5 insertions(+), 17 deletions(-) diff --git a/arch/parisc/kernel/drivers.c b/arch/parisc/kernel/drivers.c

[PATCH 6/9] powerpc/pci: Use dev_is_pci() to check whether it is pci device

2013-12-05 Thread Yijing Wang
Use PCI standard marco dev_is_pci() instead of directly compare pci_bus_type to check whether it is pci device. Signed-off-by: Yijing Wang --- arch/powerpc/sysdev/fsl_pci.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc

[PATCH 9/9] alpha/pci: Use dev_is_pci() to check whether it is pci device

2013-12-05 Thread Yijing Wang
Use PCI standard marco dev_is_pci() instead of directly compare pci_bus_type to check whether it is pci device. Signed-off-by: Yijing Wang --- arch/alpha/kernel/pci_iommu.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/alpha/kernel/pci_iommu.c b/arch/alpha

[PATCH 8/9] arm/mach-ixp4xx: Use dev_is_pci() to check whether it is pci device

2013-12-05 Thread Yijing Wang
Use PCI standard marco dev_is_pci() instead of directly compare pci_bus_type to check whether it is pci device. Signed-off-by: Yijing Wang --- arch/arm/mach-ixp4xx/common-pci.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-ixp4xx/common-pci.c b

[PATCH 7/9] arm/pci: Use dev_is_pci() to check whether it is pci device

2013-12-05 Thread Yijing Wang
Use PCI standard marco dev_is_pci() instead of directly compare pci_bus_type to check whether it is pci device. Signed-off-by: Yijing Wang --- arch/arm/common/it8152.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/common/it8152.c b/arch/arm/common/it8152.c

Re: [PATCH 2/2] net/fddi: Replace local marco with PCI standard macro

2013-12-05 Thread Yijing Wang
On 2013/12/6 6:06, Maciej W. Rozycki wrote: > On Thu, 5 Dec 2013, Yijing Wang wrote: > >> Replace local marco DFX_BUS_PCI with PCI standard marco >> dev_is_pci(). > > Typos above: marco -> macro Sorry for the mistake, David, should i need to resend this pa

[PATCH net v2 1/2] net/fddi: Replace local macro with PCI standard macro

2013-12-05 Thread Yijing Wang
Replace local macro DFX_BUS_PCI() with PCI standard macro dev_is_pci(). Acked-by: Maciej W. Rozycki Signed-off-by: Yijing Wang --- drivers/net/fddi/defxx.c | 20 +++- 1 files changed, 7 insertions(+), 13 deletions(-) diff --git a/drivers/net/fddi/defxx.c b/drivers/net/fddi

[PATCH net v2 2/2] 3c59x/net: Use dev_is_pci() instead of hardcoding

2013-12-05 Thread Yijing Wang
Use PCI standard macro dev_is_pci() instead of hardcoding. Signed-off-by: Yijing Wang --- drivers/net/ethernet/3com/3c59x.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/ethernet/3com/3c59x.c b/drivers/net/ethernet/3com/3c59x.c index ad5272b..af24c3c

Re: [PATCH 2/2] net/fddi: Replace local marco with PCI standard macro

2013-12-05 Thread Yijing Wang
On 2013/12/6 12:44, David Miller wrote: > From: Yijing Wang > Date: Fri, 6 Dec 2013 11:06:28 +0800 > >> On 2013/12/6 6:06, Maciej W. Rozycki wrote: >>> On Thu, 5 Dec 2013, Yijing Wang wrote: >>> >>>> Replace local marco DFX_BUS_PCI with PCI standard

[PATCH] x86, hpet: fix memleak when hpet enable fail

2014-01-02 Thread Yijing Wang
We should free hpet_boot_cfg if hpet enable fail. Signed-off-by: Yijing Wang --- arch/x86/kernel/hpet.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c index da85a8e..0ed00cc 100644 --- a/arch/x86/kernel/hpet.c +++ b/arch

[PATCH] clocksource: fix some comments typo in clocksource.c

2014-01-02 Thread Yijing Wang
Fix some trivial comments typo in kernel/time/clocksource.c Signed-off-by: Yijing Wang --- kernel/time/clocksource.c |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c index ba3e502..9951575 100644 --- a/kernel/time

Re: [PATCH v2 10/10] IOMMU: Add intel iommu irq-remapping and dmar hotplug support

2014-01-05 Thread Yijing Wang
Hi Yinghai, There is a problem, consider that static DMAR table contains the hotplug CPU DMAR info(include drhd and atsr). So, if we enable irq remapping, all DMAR drhd unit and atsr unit will be parsed during boot path. When IOH hub object in DSDT was enumerated, we found device that support

Re: [PATCH v2 10/10] IOMMU: Add intel iommu irq-remapping and dmar hotplug support

2014-01-05 Thread Yijing Wang
Hi Yinghai, Maybe we should add some guards to protect from initializing DMAR when we disable Intel IOMMU like append intel_iommu=off to boot command. Thanks! Yijing. On 2014/1/3 8:08, Yinghai Lu wrote: > during hostbridge hotadd/hotremove, we call acpi_pci_iommu_add/remove in > acpi_pci_root

Re: tg3 and sd card reader at acer aspire

2013-12-25 Thread Yijing Wang
On 2013/12/25 15:51, Vasiliy Tolstov wrote: > 2013/12/25 Robert Hancock : >> So apparently this machine got broken when we changed the behavior for the >> ACPI ASPM-not-supported bit from forcing ASPM off for everything to leaving >> ASPM in whatever state the BIOS left it in. And apparently for so

Re: [PATCH] ARM: PCI: Use PCI_CLASS_* defines for PCI class

2014-08-25 Thread Yijing Wang
the 3 bytes Class code in the PCI Configuration space >> header -- 1B Base class, 1B Sub-class, 1B Reg-level interface. >> >> In that case >> (PCI_CLASS_BRIDGE_OTHER << 8) >> is equivalent to 0x68000 (imagine the leading zero) >> and >> ((PCI_CLASS_SYSTEM_D

Re: [PATCH v10 07/10] OF: Introduce helper function for getting PCI domain_nr

2014-09-08 Thread Yijing Wang
>>> on new requests. This function gets called quite a lot and I'm trying not to >>> make it too heavy weight. >> >> Generally, nothing should be accessing the same DT value frequently. >> It should get cached somewhere. >> > > The problem appears for DTs that don't have the pci-domain info. Then

Re: [PATCH v10 07/10] OF: Introduce helper function for getting PCI domain_nr

2014-09-09 Thread Yijing Wang
On 2014/9/9 16:46, Liviu Dudau wrote: > On Tue, Sep 09, 2014 at 06:54:21AM +0100, Yijing Wang wrote: >>>>> on new requests. This function gets called quite a lot and I'm trying not >>>>> to >>>>> make it too heavy weight. >>>&

Re: [PATCH v10 07/10] OF: Introduce helper function for getting PCI domain_nr

2014-09-09 Thread Yijing Wang
>> OK. Sorry, I have one last question, because domain will be used to >> calculate the address used to >> access PCI hardware config registers. So if DTS file doesn't report the >> domain, how do we know >> we would access the right registers when we use the auto increment domain >> vaule ? >

Re: [PATCH v10 07/10] OF: Introduce helper function for getting PCI domain_nr

2014-09-09 Thread Yijing Wang
>> OK. Sorry, I have one last question, because domain will be used to >> calculate the address used to >> access PCI hardware config registers. So if DTS file doesn't report the >> domain, how do we know >> we would access the right registers when we use the auto increment domain >> vaule ? >>

Re: [RFC PATCH 00/11] Refactor MSI to support Non-PCI device

2014-08-19 Thread Yijing Wang
>> The key difference between PCI device and Non-PCI MSI is the interfaces to >> access hardware MSI registers. >> for instance, currently, msi_chip->setup_irq() to setup MSI irq and configure >> the MSI address/data registers, so we need to provide device specific >> write_msi_msg() interface, the

Re: [RFC PATCH 03/11] PCI/MSI: Refactor pci_dev_msi_enabled()

2014-08-19 Thread Yijing Wang
On 2014/8/20 13:57, bharat.bhus...@freescale.com wrote: > > >> -Original Message- >> From: linux-pci-ow...@vger.kernel.org >> [mailto:linux-pci-ow...@vger.kernel.org] >> On Behalf Of Yijing Wang >> Sent: Saturday, July 26, 2014 8:39 AM >> To:

Re: [RFC PATCH 09/11] PCI/MSI: refactor PCI MSI driver

2014-08-19 Thread Yijing Wang
>> @@ -1025,21 +1059,52 @@ int pci_msi_enabled(void) >> } >> EXPORT_SYMBOL(pci_msi_enabled); >> >> -void pci_msi_init_pci_dev(struct pci_dev *dev) >> +static struct msi_ops pci_msi = { >> +.msi_set_enable = msi_set_enable, >> +.msi_setup_entry = msi_setup_entry, >> +.msix_setup_entrie

Re: [RFC PATCH 10/11] PCI/MSI: Split the generic MSI code into new file

2014-08-19 Thread Yijing Wang
> +int msi_capability_init(struct msi_irqs *msi, int nvec) >> +{ >> +struct msi_desc *entry; >> +int ret; >> +unsigned mask; >> + >> +msi_set_enable(msi, 0, MSI_TYPE); /* Disable MSI during set up */ >> + >> +/* MSI Entry Initialization */ >> +entry = msi_setup_entry(m

Re: [RFC PATCH 11/11] x86/MSI: Refactor x86 MSI code

2014-08-20 Thread Yijing Wang
On 2014/8/20 14:20, bharat.bhus...@freescale.com wrote: > > >> -Original Message- >> From: linux-pci-ow...@vger.kernel.org >> [mailto:linux-pci-ow...@vger.kernel.org] >> On Behalf Of Yijing Wang >> Sent: Saturday, July 26, 2014 8:39 AM >> To:

Re: [RFC PATCH 00/11] Refactor MSI to support Non-PCI device

2014-08-20 Thread Yijing Wang
>>> We in Freescale will be using MSI for the devices behind a new-bus (which is >> not PCI based), We have a separate bus driver for same. And this new bus >> driver >> register/provide its own address/data write function which is based on that >> specific bus protocol. >> >> Hi Bharat, I'm glad

Re: [PATCH v9 03/12] PCI: Introduce helper functions to deal with PCI I/O ranges.

2014-09-01 Thread Yijing Wang
On 2014/8/13 0:25, Liviu Dudau wrote: > Some architectures do not have a simple view of the PCI I/O space > and instead use a range of CPU addresses that map to bus addresses. > For some architectures these ranges will be expressed by OF bindings > in a device tree file. > > This patch introduces

Re: [RFC PATCH 00/11] Refactor MSI to support Non-PCI device

2014-09-03 Thread Yijing Wang
>> Provide the private MSI setup functions in bus-driver layer can't apply to >> all >> Non-PCI MSI devices, because we can not guarantee Non-PCI MSI devices are >> always >> on a bus. The existing HPET, DMAR device both have no bus bind. > > Yes, that's why I was not sure of bus-driver or devic

Re: [RFC PATCH 03/11] PCI/MSI: Refactor pci_dev_msi_enabled()

2014-08-05 Thread Yijing Wang
On 2014/8/6 6:35, Stuart Yoder wrote: > On Fri, Jul 25, 2014 at 10:08 PM, Yijing Wang wrote: >> Pci_dev_msi_enabled() is used to check whether device >> MSI/MSIX enabled. Refactor this function to suuport >> checking only device MSI or MSIX enabled. >> >> Signed-

[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 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 --- arch/mips/pci/msi-octeon.c | 45 ++- 1 files changed, 19 insertions(+), 26 deletions(-) diff --git a/arch/mips/pci/msi

[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 --- arch/s390/pci/pci.c | 16 ++-- 1 files changed, 14 insertions(+), 2 deletions(-) diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c index

[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 --- arch/powerpc/kernel/msi.c | 23 +-- 1 files changed, 17 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/kernel/msi.c b/arch/powerpc

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

2014-08-12 Thread Yijing Wang
deliver their MSI to PCI hostbridge, if more than one msi_chip found in system, DTS file will report the binding between MSI devices and target msi_chip. So we need a platform implemented interface to do that. Signed-off-by: Yijing Wang --- drivers/pci/msi.c | 30

[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 --- arch/arm/mach-iop13xx/include/mach/pci.h |2 ++ arch/arm/mach-iop13xx/iq81340mc.c

[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 --- arch/ia64/kernel/msi_ia64.c | 18 ++ 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/arch/ia64/kernel/msi_ia64.c b/arch/ia64

[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 --- arch/sparc/kernel/pci.c | 18 ++ 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel

[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 --- arch/tile/kernel/pci_gx.c | 20 +++- 1 files changed, 15 insertions(+), 5 deletions(-) diff --git a/arch/tile/kernel/pci_gx.c b/arch/tile/kernel

[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 --- drivers/iommu/irq_remapping.c | 13 + 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/iommu

[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 --- arch/mips/pci/msi-xlp.c | 15 +-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/arch/mips/pci/msi-xlp.c b/arch/mips/pci/msi-xlp.c index

[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 CC: Konrad Rzeszutek Wilk --- arch/x86/pci/xen.c | 128 +-- 1 files changed, 73 insertions(+), 55 deletions(-) diff

[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 --- 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 deletions(-) diff --git a

[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 --- arch/mips/pci/pci-xlr.c | 19 +++ 1 files changed, 15 insertions(+), 4 deletions(-) diff --git a/arch/mips/pci/pci-xlr.c b/arch/mips/pci/pci

[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 --- drivers/pci/msi.c | 82 1 files changed, 32 insertions(+), 50 deletions(-) diff --git a/drivers

[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 --- arch/x86/include/asm/pci.h |1 + arch/x86/kernel/apic/io_apic.c | 20 2 files changed, 17 insertions(+), 4 deletions(-) diff

[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 --- drivers/pci/msi.c |2 -- 1

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

2014-08-12 Thread Yijing Wang
this is preparation for using struct msi_chip instead of weak arch MSI functions in all platforms. Signed-off-by: Yijing Wang CC: Konrad Rzeszutek Wilk --- arch/x86/include/asm/x86_init.h |3 --- arch/x86/kernel/apic/io_apic.c | 15 +++ arch/x86/kernel/x86_init.c | 10

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 cod

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/x8

Re: [RFC PATCH 00/11] Refactor MSI to support Non-PCI device

2014-08-03 Thread Yijing Wang
>> MSI was introduced in PCI Spec 2.2. Currently, kernel MSI driver codes >> are bonding with PCI device. Because MSI has a lot advantages in design. >> More and more non-PCI devices want to use MSI as their default interrupt. >> The existing MSI device include HPET. HPET driver provide its own MSI

Re: [RFC PATCH 00/11] Refactor MSI to support Non-PCI device

2014-08-03 Thread Yijing Wang
On 2014/8/1 21:16, Arnd Bergmann wrote: > On Wednesday 30 July 2014, Yijing Wang wrote: >>>>> >>>>> The other part I'm not completely sure about is how you want to >>>>> have MSIs map into normal IRQ descriptors. At the moment, all >>

Re: [RFC PATCH 00/11] Refactor MSI to support Non-PCI device

2014-08-03 Thread Yijing Wang
On 2014/8/1 21:52, Arnd Bergmann wrote: > On Wednesday 30 July 2014, Yijing Wang wrote: >> On 2014/7/29 22:08, Arnd Bergmann wrote: >>> On Saturday 26 July 2014 11:08:37 Yijing Wang wrote: >>>> >>>> The new data struct for generic MSI driver. >>&g

Re: [RFC PATCH 00/11] Refactor MSI to support Non-PCI device

2014-08-04 Thread Yijing Wang
>>> The method you describe here makes sense for PCI devices that are required >>> to support >>> legacy interrupts and may or may not support MSI on a given system, but not >>> so much >>> for platform devices for which we know exactly whether we want to use MSI >>> or legacy interrupts. >>> >>>

Re: [RFC PATCH 00/11] Refactor MSI to support Non-PCI device

2014-08-04 Thread Yijing Wang
On 2014/8/4 22:45, Arnd Bergmann wrote: > On Monday 04 August 2014, Yijing Wang wrote: >> I have another question is some drivers will request more than one >> MSI/MSI-X IRQ, and the driver will use them to process different things. >> Eg. network driver generally uses o

Re: [PATCH v3 24/27] IA64/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-10-22 Thread Yijing Wang
On 2014/10/23 7:53, Bjorn Helgaas wrote: > 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

Re: [PATCH v3 02/27] x86/xen/MSI: Eliminate arch_msix_mask_irq() and arch_msi_mask_irq()

2014-10-22 Thread Yijing Wang
On 2014/10/23 12:25, Bjorn Helgaas wrote: > 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_

Re: [PATCH v3 05/27] PCI: tegra: Save msi chip in pci_sys_data

2014-10-22 Thread Yijing Wang
On 2014/10/23 13:18, Bjorn Helgaas wrote: > On Wed, Oct 15, 2014 at 11:06:53AM +0800, Yijing Wang wrote: >> Save msi chip in pci_sys_data instead of assign >> msi chip to every pci bus in .add_bus(). >> >> Signed-off-by: Yijing Wang >> --- >&g

Re: [PATCH v3 04/27] arm/MSI: Save MSI chip in pci_sys_data

2014-10-22 Thread Yijing Wang
>> diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c >> index 22e413c..f11108c 100644 >> --- a/drivers/pci/msi.c >> +++ b/drivers/pci/msi.c >> @@ -35,6 +35,9 @@ int __weak arch_setup_msi_irq(struct pci_dev *dev, struct >> msi_desc *desc) >> struct msi_chip *chip = dev->bus->msi; >> int

Re: [PATCH v3 09/27] arm/PCI: Clean unused pcibios_add_bus() and pcibios_remove_bus()

2014-10-22 Thread Yijing Wang
>> /* >> * Swizzle the device pin each time we cross a bridge. If a platform does >> * not provide a swizzle function, we perform the standard PCI swizzling. >> @@ -478,8 +464,6 @@ static void pcibios_init_hw(struct device *parent, >> struct hw_pci *hw, >> sys->swizzle = hw->swi

Re: [PATCH v3 10/27] PCI/MSI: Remove useless bus->msi assignment

2014-10-22 Thread Yijing Wang
On 2014/10/23 13:41, Bjorn Helgaas wrote: > On Wed, Oct 15, 2014 at 11:06:58AM +0800, Yijing Wang wrote: >> 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 >> C

Re: [PATCH v3 00/27] Use MSI chip framework to configure MSI/MSI-X in all platforms

2014-10-23 Thread Yijing Wang
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. >> >> Y

Re: Subject: [PATCH] kobject: fix the race between kobject_del and get_device_parent

2014-11-04 Thread Yijing Wang
On 2014/11/5 3:15, Tejun Heo wrote: > Hello, > > Sorry about the delay. Thank you for your review and comments. > > On Wed, Oct 22, 2014 at 04:07:44PM +0800, Weng Meiling wrote: >> diff --git a/drivers/base/core.c b/drivers/base/core.c >> index 28b808c..645eacf 100644 >> --- a/drivers/base/core

Re: Subject: [PATCH] kobject: fix the race between kobject_del and get_device_parent

2014-11-04 Thread Yijing Wang
On 2014/11/5 11:13, Tejun Heo wrote: > Hello, > > On Wed, Nov 05, 2014 at 10:01:39AM +0800, Yijing Wang wrote: >>> So, yeah, this looks like a correct approach; however, do we even need >>> to clear the glue directories? >> >> Yes. In our platform, the g

Re: Subject: [PATCH] kobject: fix the race between kobject_del and get_device_parent

2014-11-04 Thread Yijing Wang
On 2014/11/5 11:52, Greg KH wrote: > On Tue, Nov 04, 2014 at 10:29:43PM -0500, Tejun Heo wrote: >> Hello, >> >> On Wed, Nov 05, 2014 at 11:27:39AM +0800, Yijing Wang wrote: >>> Keep the parent directory looks good to me, we could only add >>> kobject_g

Re: [Patch Part2 v4 20/31] PCI/MSI: Kill redundant calling for irq_set_msi_desc() for MSIx interrupts

2014-11-05 Thread Yijing Wang
On 2014/11/6 6:45, Bjorn Helgaas wrote: > On Tue, Nov 04, 2014 at 08:01:54PM +0800, Jiang Liu wrote: >> It's arch_setup_msi_irq()/arch_setup_msi_irqs()'s responsibility to call >> irq_set_msi_desc() to associate IRQ descriptors and MSI descriptors, >> so kill the redundant call of irq_set_msi_desc(

Re: [Patch Part2 v4 21/31] PCI/MSI: enhance PCI MSI core to support hierarchy irqdomain

2014-11-05 Thread Yijing Wang
>> >> @@ -1098,3 +1099,128 @@ int pci_enable_msix_range(struct pci_dev *dev, >> struct msix_entry *entries, >> return nvec; >> } >> EXPORT_SYMBOL(pci_enable_msix_range); >> + >> +#ifdef CONFIG_PCI_MSI_IRQ_DOMAIN > > Space, not tab. > >> +static inline irq_hw_number_t >> +msi_get_hw

Re: [Patch Part2 v4 21/31] PCI/MSI: enhance PCI MSI core to support hierarchy irqdomain

2014-11-05 Thread Yijing Wang
On 2014/11/6 12:10, Bjorn Helgaas wrote: > On Wed, Nov 5, 2014 at 6:58 PM, Yijing Wang wrote: > >>>> +{ >>>> +return (irq_hw_number_t)msidesc->msi_attrib.entry_nr | >>>> +PCI_DEVID(pdev->bus->number, pdev->devfn) << 1

Re: [Patch Part2 v4 21/31] PCI/MSI: enhance PCI MSI core to support hierarchy irqdomain

2014-11-05 Thread Yijing Wang
On 2014/11/6 13:06, Jiang Liu wrote: > On 2014/11/6 9:58, Yijing Wang wrote: >>>> >>>> @@ -1098,3 +1099,128 @@ int pci_enable_msix_range(struct pci_dev *dev, >>>> struct msix_entry *entries, >>>>return nvec; >>>> }

[PATCH] sysfs: driver core: Fix glue dir race condition

2014-11-05 Thread Yijing Wang
+0x14/0x20 <4>[ 3965.686753] [] blk_register_queue+0x3b/0x120 <4>[ 3965.686756] [] add_disk+0x1cc/0x490 --- Signed-off-by: Yijing Wang Signed-off-by: Weng Meiling Cc: #3.4+ --- drivers/base/core.c | 21 + 1 files changed, 1 insertions(+), 20

Re: [Patch Part2 v4 13/31] x86: irq_remapping: Introduce new interfaces to support hierarchy irqdomain

2014-11-06 Thread Yijing Wang
> + > +enum irq_alloc_type { > + X86_IRQ_ALLOC_TYPE_IOAPIC = 1, > + X86_IRQ_ALLOC_TYPE_HPET, > + X86_IRQ_ALLOC_TYPE_MSI, > + X86_IRQ_ALLOC_TYPE_MSIX, > +}; Hi Gerry, why not to use X86_IRQ_ALLOC_TYPE_MSI to represent both MSI and MSI-X type? There are some differences to process M

[PATCH v3 27/27] PCI/MSI: Clean up unused MSI arch functions

2014-10-14 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 --- 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

[PATCH v3 01/27] MSI: Remove the redundant irq_set_chip_data()

2014-10-14 Thread Yijing Wang
-off-by: Yijing Wang Reviewed-by: Thierry Reding --- drivers/pci/msi.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index 2f7c92c..ecb92a5 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -41,14 +41,13 @@ int __weak

[PATCH v3 24/27] IA64/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-10-14 Thread Yijing Wang
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 --- arch/ia64/include/asm/pci.h | 10 ++ arch/ia64/kernel/msi_ia64.c | 14 ++ arch/ia64/pci/pci.c

[PATCH v3 25/27] Sparc/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-10-14 Thread Yijing Wang
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 --- arch/sparc/kernel/pci.c | 14 -- arch/sparc/kernel/pci_impl.h | 12 2 files changed, 24

[PATCH v3 26/27] tile/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-10-14 Thread Yijing Wang
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 --- arch/tile/include/asm/pci.h | 10 ++ arch/tile/kernel/pci_gx.c | 13 +++-- 2 files changed, 21 insertions

[PATCH v3 08/27] PCI: mvebu: Save msi chip in pci_sys_data

2014-10-14 Thread Yijing Wang
Save msi chip in pci_sys_data instead of assign msi chip to every pci bus in .add_bus(). Signed-off-by: Yijing Wang --- drivers/pci/host/pci-mvebu.c | 10 +++--- 1 files changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c

[PATCH v3 14/27] Irq_remapping/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-10-14 Thread Yijing Wang
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 --- drivers/iommu/irq_remapping.c | 11 --- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/iommu

[PATCH v3 22/27] s390/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-10-14 Thread Yijing Wang
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 --- Hi Sebastian, I dropped the Acked-by , because this version has a lot changes compared to last. So, I guess you may want to

[PATCH v3 23/27] arm/iop13xx/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-10-14 Thread Yijing Wang
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 --- arch/arm/mach-iop13xx/include/mach/pci.h |4 arch/arm/mach-iop13xx/iq81340mc.c|3 +++ arch/arm/mach-iop13xx

[PATCH v3 21/27] Powerpc/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-10-14 Thread Yijing Wang
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 --- Hi Michael, I dropped the Acked-by , because this version has a lot changes compared to last. So, I guess you may want to

[PATCH v3 18/27] MIPS/Xlp: Remove the dead function destroy_irq() to fix build error

2014-10-14 Thread Yijing Wang
nction '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 Cc: Thomas Gleixner --- arch/mips/pci/msi-xlp.c |4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)

[PATCH v3 05/27] PCI: tegra: Save msi chip in pci_sys_data

2014-10-14 Thread Yijing Wang
Save msi chip in pci_sys_data instead of assign msi chip to every pci bus in .add_bus(). Signed-off-by: Yijing Wang --- drivers/pci/host/pci-tegra.c | 13 +++-- 1 files changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c

[PATCH v3 19/27] MIPS/Xlp/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-10-14 Thread Yijing Wang
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 --- arch/mips/include/asm/netlogic/xlp-hal/pcibus.h |1 + arch/mips/pci/msi-xlp.c | 11

[PATCH v3 17/27] MIPS/Octeon/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-10-14 Thread Yijing Wang
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 --- arch/mips/include/asm/octeon/pci-octeon.h |4 +++ arch/mips/pci/msi-octeon.c| 31

[PATCH v3 06/27] PCI: designware: Save msi chip in pci_sys_data

2014-10-14 Thread Yijing Wang
Save msi chip in pci_sys_data instead of assign msi chip to every pci bus in .add_bus(). Signed-off-by: Yijing Wang --- drivers/pci/host/pcie-designware.c | 15 --- 1 files changed, 4 insertions(+), 11 deletions(-) diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci

[PATCH v3 20/27] MIPS/Xlr/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-10-14 Thread Yijing Wang
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 --- arch/mips/pci/pci-xlr.c | 17 +++-- 1 files changed, 15 insertions(+), 2 deletions(-) diff --git a/arch/mips/pci

[PATCH v3 07/27] PCI: rcar: Save msi chip in pci_sys_data

2014-10-14 Thread Yijing Wang
Save msi chip in pci_sys_data instead of assign msi chip to every pci bus in .add_bus(). Signed-off-by: Yijing Wang --- drivers/pci/host/pcie-rcar.c | 13 +++-- 1 files changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c

[PATCH v3 09/27] arm/PCI: Clean unused pcibios_add_bus() and pcibios_remove_bus()

2014-10-14 Thread Yijing Wang
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 --- arch/arm/include/asm/mach/pci.h |4 arch/arm/kernel/bios32.c| 16

[PATCH v3 15/27] x86/MSI: Remove unused MSI weak arch functions

2014-10-14 Thread Yijing Wang
Now we can clean up MSI weak arch functions in x86. Signed-off-by: Yijing Wang --- arch/x86/include/asm/pci.h |5 + arch/x86/include/asm/x86_init.h |4 arch/x86/kernel/apic/io_apic.c | 21 + arch/x86/kernel/x86_init.c | 24

<    1   2   3   4   5   6   7   8   9   10   >