Now we could use pci_scan_host_bridge() to scan
pci buses, provide powerpc specific pci_host_bridge_ops.
Signed-off-by: Yijing Wang
CC: Benjamin Herrenschmidt
CC: linuxppc-dev@lists.ozlabs.org
---
arch/powerpc/kernel/pci-common.c | 62 +++--
1 files changed
hanks very much for your test and review.
Thanks!
Yijing.
>
>
> On Fri, 2015-04-03 at 17:25 +0800, Yijing Wang wrote:
>> Now we could use pci_scan_host_bridge() to scan
>> pci buses, provide powerpc specific pci_host_bridge_ops.
>>
>> Sign
Now we could use pci_scan_host_bridge() to scan
pci buses, provide powerpc specific pci_host_bridge_ops.
Tested-by: Daniel Axtens
Signed-off-by: Yijing Wang
Reviewed-by: Daniel Axtens
CC: Benjamin Herrenschmidt
CC: linuxppc-dev@lists.ozlabs.org
---
arch/powerpc/kernel/pci-common.c | 62
Pci_host_bridge hold the domain number, we need
to assign domain number prior to root bus creation,
because root bus need to know the domain number
to check whether it's alreay exist.
Signed-off-by: Yijing Wang
---
drivers/pci/probe.c | 60 ++--
Now we save the domain number in pci_host_bridge,
we could remove pci_bus_assign_domain_nr() and
clean the domain member in pci_bus.
Signed-off-by: Yijing Wang
---
drivers/pci/pci.c |5 -
drivers/pci/pci.h |9 -
drivers/pci/probe.c | 11 +++
include/linux/pci.h
pci_bus_assign_domain_nr() is only called in probe.c,
Move pci_bus_assign_domain_nr() declaration into
drivers/pci/pci.h.
Signed-off-by: Yijing Wang
---
drivers/pci/pci.h |9 +
include/linux/pci.h |6 --
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a
Pcibios_root_bridge_prepare() in powerpc set root bus
speed, it's not the preparation for pci host bridge.
For better separation of host bridge and root bus creation,
It's need to rename it to another weak function.
Signed-off-by: Yijing Wang
---
arch/powerpc/include/asm/machdep.h
Now pci_host_bridge holds the domain number,
so we could eliminate all platform specific
pci_domain_nr().
Signed-off-by: Yijing Wang
---
arch/alpha/include/asm/pci.h |2 --
arch/ia64/include/asm/pci.h |1 -
arch/microblaze/pci/pci-common.c | 11 ---
arch/mips/include
Introduce pci_host_assign_domain_nr() to save domain number
in pci_host_bridge.
Signed-off-by: Yijing Wang
---
drivers/pci/pci.c | 24 +++-
drivers/pci/pci.h |1 +
2 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
Now platform specific sysdata is saved in pci_bus,
and pcibios_root_bridge_prepare() need to know
the sysdata. Later, we would move pcibios_root_bridge_prepare()
prior to root bus creation, so we need to make
pci_host_bridge hold sysdata.
Signed-off-by: Yijing Wang
---
arch/ia64/pci/pci.c
, so we pass meaningless -1 as the domain
number.
Tested-by: Gregory CLEMENT #mvebu part
Signed-off-by: Yijing Wang
---
arch/alpha/kernel/pci.c|4 ++--
arch/alpha/kernel/sys_nautilus.c |2 +-
arch/arm/kernel/bios32.c |2 +-
arch/arm/mach-dove/pcie.c
github.com/YijingWang/linux-pci.git enumer11
Yijing Wang (9):
PCI: Save domain in pci_host_bridge
PCI: Move pci_bus_assign_domain_nr() declaration into
drivers/pci/pci.h
PCI: Remove declaration for pci_get_new_domain_nr()
PCI: Introduce pci_host_assign_domain_nr() to assign domain
p
pci_get_new_domain_nr() is only used in drivers/pci/pci.c,
remove the declaration in include/linux/pci.h.
Signed-off-by: Yijing Wang
---
drivers/pci/pci.c |4 ++--
include/linux/pci.h |3 ---
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/pci/pci.c b/drivers
_chip() used in ARM platform, find the MSI chip
by pci bus.
Signed-off-by: Yijing Wang
---
drivers/pci/msi.c |7 ++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index a77e7f7..539c11d 100644
--- a/drivers/pci/msi.c
+++ b/driver
Currently, pcie-designware, pcie-rcar, 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. So irq_set_chip_data() in arch_setup_msi_irq()
is useless.
Signed-off-by: Yijing Wang
---
drivers/pci/msi.c |2
all platforms.
Signed-off-by: Yijing Wang
CC: Konrad Rzeszutek Wilk
---
arch/x86/include/asm/apic.h |4
arch/x86/include/asm/x86_init.h |3 ---
arch/x86/kernel/apic/io_apic.c |2 +-
arch/x86/kernel/x86_init.c | 10 --
arch/x86/pci/xen.c |
def 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 (21):
PCI/MSI: Clean up struct msi_chip a
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/include/asm/x86_init.h |4
arch/x86/kernel/apic/io_apic.c |2 +-
arch/x86/kernel/x86_init.c | 24
drivers/iommu
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/msi-octeon.c | 35 ++-
1 files changed, 22 insertions(+), 13 deletions(-)
diff
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 |8 +++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/drivers/iommu
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/x86/include/asm/pci.h |1 +
arch/x86/kernel/apic/io_apic.c | 12
2 files changed, 13 insertions
. This patch add
.restore_irq() and .setup_irqs() to make it become more common.
Signed-off-by: Yijing Wang
---
drivers/pci/msi.c | 15 +++
include/linux/msi.h |3 +++
2 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index
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
CC: Konrad Rzeszutek Wilk
---
arch/x86/pci/xen.c | 46 ++
1 files changed, 30
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/s390/pci/pci.c | 18 ++
1 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/arch/s390/pci
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/powerpc/kernel/msi.c | 14 --
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc
Currently, PCI drivers will initialize bus->msi in
pcibios_add_bus(). pcibios_add_bus() will be called
in every pci bus initialization. So the bus->msi
assignment in pci_alloc_child_bus() is useless.
Signed-off-by: Yijing Wang
CC: Thierry Reding
CC: Thomas Petazzoni
---
drivers/pci/p
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 |2 ++
arch/arm/mach-iop13xx/iq81340mc.c|1 +
arch/arm/mach-iop13xx
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 --
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/arch/sparc/kernel
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/msi-xlp.c | 14 --
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/arch/mips/pci/msi
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/kernel/msi_ia64.c | 18 ++
1 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/arch/ia64
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(-)
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 | 15 +--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/arch/mips/pci
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/iommu/irq_remapping.c |2 +-
drivers/pci/msi.c | 99 -
include/linux/msi.h
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/kernel/pci_gx.c | 14 --
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/arch/tile
Msi_chip functions setup_irq/teardown_irq rarely use msi_chip
argument. We can look up msi_chip pointer by the device pointer
or irq number, so clean up msi_chip argument.
Signed-off-by: Yijing Wang
CC: Thierry Reding
CC: Thomas Petazzoni
---
drivers/irqchip/irq-armada-370-xp.c | 12
On 2014/9/5 22:29, David Vrabel wrote:
> On 05/09/14 11:09, 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.
> [...]
>> --- a/arch/x86/pci/xen.c
>
On 2014/9/10 20:36, David Vrabel wrote:
> On 05/09/14 11:09, Yijing Wang wrote:
>> Commit 0e4ccb150 added two __weak arch functions arch_msix_mask_irq()
>> and arch_msi_mask_irq() to fix a bug found when running xen in x86.
>> Introduced these two funcntions make MSI code com
On 2014/9/10 20:38, David Vrabel wrote:
> On 09/09/14 03:06, Yijing Wang wrote:
>> On 2014/9/5 22:29, David Vrabel wrote:
>>> On 05/09/14 11:09, Yijing Wang wrote:
>>>> Use MSI chip framework instead of arch MSI functions to configure
>>>> MSI/MSI-X irq. S
On 2014/9/10 22:59, Konrad Rzeszutek Wilk wrote:
> On Wed, Sep 10, 2014 at 01:38:25PM +0100, David Vrabel wrote:
>> On 09/09/14 03:06, Yijing Wang wrote:
>>> On 2014/9/5 22:29, David Vrabel wrote:
>>>> On 05/09/14 11:09, Yijing Wang wrote:
>>>>> Use MSI
On 2014/9/15 22:00, Lucas Stach wrote:
> Am Freitag, den 05.09.2014, 18:09 +0800 schrieb Yijing Wang:
>> Currently, pcie-designware, pcie-rcar, 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
On 2014/9/15 22:42, Lucas Stach wrote:
> Am Freitag, den 05.09.2014, 18:09 +0800 schrieb Yijing Wang:
>> Introduce weak arch_find_msi_chip() to find the match msi_chip.
>> Currently, MSI chip associates pci bus to msi_chip. Because in
>> ARM platform, there may be more than
On 2014/9/15 22:44, Lucas Stach wrote:
> Am Freitag, den 05.09.2014, 18:09 +0800 schrieb Yijing Wang:
>> Now there are a lot of __weak arch functions in MSI code.
>> These functions make MSI driver complex. Thierry Reding Introduced
>> a new MSI chip framework to configure
On 2014/9/15 22:47, Lucas Stach wrote:
> Am Freitag, den 05.09.2014, 18:10 +0800 schrieb 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
>
>
On 2014/9/16 13:28, Michael Ellerman wrote:
> On Fri, 2014-09-05 at 18:10 +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
On 2014/9/16 14:34, Michael Ellerman wrote:
> On Fri, 2014-08-22 at 16:08 +0800, Yijing Wang wrote:
>> Read_msi_msg() only be called in rtas_setup_msi_irqs(),
>> use __read_msi_msg() instead of read_msi_msg for
>> simplification. And rename __read_msi_msg() to
>> read_
>>> arch_teardown_msi_irq() expects to find the msi_chip in the irq
>>> chip_data field. As this means drivers don't have any reasonable other
>>> possibility to stuff things into this field, I think it would make sense
>>> to do the cleanup the other way around: keep the irq_set_chip_data
>>> arch
On 2014/9/16 19:35, Sebastian Ott wrote:
> Hello,
>
> On Fri, 5 Sep 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: Yiji
Read_msi_msg() only be called in rtas_setup_msi_irqs(),
use __read_msi_msg() instead of read_msi_msg for
simplification.
Signed-off-by: Yijing Wang
Acked-by: Michael Ellerman
CC: Benjamin Herrenschmidt
CC: linuxppc-dev@lists.ozlabs.org
---
arch/powerpc/platforms/pseries/msi.c |2 +-
1
Read_msi_msg() only be called in rtas_setup_msi_irqs(),
use __read_msi_msg() instead of read_msi_msg for
simplification.
Signed-off-by: Yijing Wang
Acked-by: Michael Ellerman
CC: Benjamin Herrenschmidt
CC: linuxppc-dev@lists.ozlabs.org
---
arch/powerpc/platforms/pseries/msi.c |2 +-
1
On 2014/9/24 5:09, Bjorn Helgaas wrote:
> On Fri, Sep 05, 2014 at 06:09:45PM +0800, Yijing Wang wrote:
>> This series is based Bjorn's pci-next branch + Alexander Gordeev's two
>> patches
>> "Remove arch_msi_check_device()" link: https://lkml.org/lkml/2014
. This patch add
.restore_irq() and .setup_irqs() to make it become more common.
Signed-off-by: Yijing Wang
Reviewed-by: Lucas Stach
---
drivers/pci/msi.c | 15 +++
include/linux/msi.h |3 +++
2 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/drivers/pci/msi.c b
_chip() used in ARM platform, find the MSI chip
by pci bus.
Signed-off-by: Yijing Wang
---
drivers/pci/msi.c |7 ++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index 5f8f3af..3acbe65 100644
--- a/drivers/pci/msi.c
+++ b/driver
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
---
arch/s390/pci/pci.c |4
Currently, PCI drivers will initialize bus->msi in
pcibios_add_bus(). pcibios_add_bus() will be called
in every pci bus initialization. So the bus->msi
assignment in pci_alloc_child_bus() is useless.
Signed-off-by: Yijing Wang
CC: Thierry Reding
CC: Thomas Petazzoni
---
drivers/pci/p
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 |6 ++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/iommu
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.
Tested-by: Konrad Rzeszutek Wilk
Signed-off-by: Yijing Wang
Acked-by: David Vrabel
Reviewed-by: Konrad Rzeszutek Wilk
CC: Konrad Rzeszutek Wilk
---
arch
Msi_chip functions setup_irq/teardown_irq rarely use msi_chip
argument. We can look up msi_chip pointer by the device pointer
or irq number, so clean up msi_chip argument.
Signed-off-by: Yijing Wang
CC: Thierry Reding
CC: Thomas Petazzoni
---
drivers/irqchip/irq-armada-370-xp.c |8
et_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 (22):
PCI/MSI: Clean up struct msi_chip argument
PCI/MSI: Remove useless bus->msi assignment
MSI: Remove the redundant irq_set_chip_data()
x86
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(-)
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/include/asm/x86_init.h |4
arch/x86/kernel/apic/io_apic.c |2 +-
arch/x86/kernel/x86_init.c | 24
drivers/iommu
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/msi-xlp.c | 14 --
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/arch/mips/pci/msi
all platforms.
Keep default_msi_mask_irq() and default_msix_mask_irq() in
linux/msi.h to make s390 MSI code compile happy, they wiil be removed
in the later patch.
Tested-by: Konrad Rzeszutek Wilk
Signed-off-by: Yijing Wang
Acked-by: David Vrabel
Reviewed-by: Konrad Rzeszutek Wilk
CC: Konrad Rzeszu
Currently, pcie-designware, pcie-rcar, 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. So irq_set_chip_data() in arch_setup_msi_irq()
is useless.
Signed-off-by: Yijing Wang
---
drivers/pci/msi.c |5
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
Acked-by: Michael Ellerman
---
arch/powerpc/kernel/msi.c | 14 --
1 files changed, 12 insertions(+), 2 deletions
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/msi-octeon.c | 35 ++-
1 files changed, 22 insertions(+), 13 deletions(-)
diff
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 |2 ++
arch/arm/mach-iop13xx/iq81340mc.c|1 +
arch/arm/mach-iop13xx
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 | 15 +--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/arch/mips/pci
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
Acked-by: Sebastian Ott
---
arch/s390/pci/pci.c | 14 --
1 files changed, 12 insertions(+), 2 deletions(-)
diff
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/kernel/msi_ia64.c | 18 ++
1 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/arch/ia64
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 --
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/arch/sparc/kernel
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/kernel/pci_gx.c | 14 --
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/arch/tile
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
Reviewed-by: Lucas Stach
---
drivers/iommu/irq_remapping.c |2 +-
drivers/pci/msi.c | 100 +++-
include
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/x86/include/asm/pci.h |1 +
arch/x86/kernel/apic/io_apic.c | 12
2 files changed, 13 insertions
On 2014/9/25 15:06, Thierry Reding wrote:
> On Thu, Sep 25, 2014 at 11:14:12AM +0800, Yijing Wang wrote:
>> Currently, PCI drivers will initialize bus->msi in
>> pcibios_add_bus(). pcibios_add_bus() will be called
>> in every pci bus initialization. So the b
On 2014/9/25 15:15, Thierry Reding wrote:
> On Thu, Sep 25, 2014 at 11:14:11AM +0800, Yijing Wang wrote:
>> Msi_chip functions setup_irq/teardown_irq rarely use msi_chip
>> argument.
>
> That's not true. Out of the four drivers that you modify two use the
> para
On 2014/9/25 15:19, Thierry Reding wrote:
> On Thu, Sep 25, 2014 at 11:14:13AM +0800, Yijing Wang wrote:
>> Currently, pcie-designware, pcie-rcar, 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
On 2014/9/25 15:26, Thierry Reding wrote:
> On Thu, Sep 25, 2014 at 11:14:16AM +0800, Yijing Wang wrote:
>> Introduce weak arch_find_msi_chip() to find the match msi_chip.
>> Currently, MSI chip associates pci bus to msi_chip. Because in
>> ARM platform, there may be more th
On 2014/9/25 15:34, Thierry Reding wrote:
> On Thu, Sep 25, 2014 at 11:14:22AM +0800, Yijing Wang wrote:
> [...]
>> diff --git a/arch/mips/pci/msi-octeon.c b/arch/mips/pci/msi-octeon.c
> [...]
>> @@ -132,12 +132,12 @@ msi_irq_allocated:
>> /* Make sure the sear
On 2014/9/25 15:36, Thierry Reding wrote:
> On Thu, Sep 25, 2014 at 11:14:24AM +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.
>
> Nit: s/irq/IRQ/ in the ab
On 2014/9/25 15:38, Thierry Reding wrote:
> On Thu, Sep 25, 2014 at 11:14:27AM +0800, Yijing Wang wrote:
> [...]
>> diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c
> [...]
>> @@ -358,7 +358,7 @@ static void zpci_irq_handler(struct airq_struct *airq)
>>
On 2014/9/25 18:20, Thomas Gleixner wrote:
> On Thu, 25 Sep 2014, Thierry Reding wrote:
>
>> On Thu, Sep 25, 2014 at 11:14:11AM +0800, Yijing Wang wrote:
>>> Msi_chip functions setup_irq/teardown_irq rarely use msi_chip
>>> argument.
>>
>> That's no
On 2014/9/25 15:37, Thierry Reding wrote:
> On Thu, Sep 25, 2014 at 11:14:25AM +0800, Yijing Wang wrote:
> [...]
>> diff --git a/arch/mips/pci/pci-xlr.c b/arch/mips/pci/pci-xlr.c
> [...]
>> @@ -214,11 +214,11 @@ static int get_irq_vector(const struct pci_dev *dev)
On 2014/9/25 18:38, Thomas Gleixner wrote:
> On Thu, 25 Sep 2014, Yijing Wang wrote:
>
>> Introduce weak arch_find_msi_chip() to find the match msi_chip.
>> Currently, MSI chip associates pci bus to msi_chip. Because in
>> ARM platform, there may be more than one
On 2014/9/25 18:38, Thomas Gleixner wrote:
> On Thu, 25 Sep 2014, Yijing Wang wrote:
>
>> Introduce weak arch_find_msi_chip() to find the match msi_chip.
>> Currently, MSI chip associates pci bus to msi_chip. Because in
>> ARM platform, there may be more than one
On 2014/9/25 22:23, Konrad Rzeszutek Wilk wrote:
> On Thu, Sep 25, 2014 at 11:14:10AM +0800, Yijing Wang wrote:
>> This series is based Bjorn's pci/msi branch
>> git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git pci/msi
>
> Is there a git tree for these p
On 2014/9/25 22:33, Konrad Rzeszutek Wilk wrote:
> On Thu, Sep 25, 2014 at 11:14:14AM +0800, 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 thes
>> I am actually in disagreement with you, Thierry. I don't like the general
>> direction
>> of the patches, or at least I don't like the fact that we don't have a
>> portable
>> way of setting up the msi_chip without having to rely on weak architectural
>> hooks.
>
> Oh, good. That's actually
>> The PCI core can already deal with that. An MSI chip can be set per bus
>> and the weak pcibios_add_bus() can be used to set that. Often it might
>> not even be necessary to do it via pcibios_add_bus() if you create the
>> root bus directly, since you can attach the MSI chip at that time.
>
> B
What I would like to see is a way of creating the pci_host_bridge
structure outside
the pci_create_root_bus(). That would then allow us to pass this sort of
platform
details like associated msi_chip into the host bridge and the child busses
will
have an easy wa
On 2014/9/26 17:05, Thierry Reding wrote:
> On Fri, Sep 26, 2014 at 10:54:32AM +0200, Thierry Reding wrote:
> [...]
>> At least for Tegra it's trivial to just hook it up in tegra_pcie_scan_bus()
>> directly (patch attached).
>
> Really attached this time.
>
> Thierry
>
It looks good to me, so I
>> MSI chip in this series is to setup MSI irq, including IRQ allocation, Map,
>> compose MSI msg ..., in different platform, many arch specific MSI irq
>> details in it.
>> It's difficult to extract the common data and code.
>>
>> I have a plan to rework MSI related irq_chips in kernel, PCI and N
On 2014/9/28 10:32, Yijing Wang wrote:
> On 2014/9/26 17:05, Thierry Reding wrote:
>> On Fri, Sep 26, 2014 at 10:54:32AM +0200, Thierry Reding wrote:
>> [...]
>>> At least for Tegra it's trivial to just hook it up in tegra_pcie_scan_bus()
>>> directly (patch
On 2014/9/28 19:21, Liviu Dudau wrote:
> On Sun, Sep 28, 2014 at 10:16:12AM +0800, Yijing Wang wrote:
>>>>>> What I would like to see is a way of creating the pci_host_bridge
>>>>>> structure outside
>>>>>> the pci_create_root_bus(). That
>>> Not necessarily. What I have in mind is something like this:
>>
>> This is a good idea, what I'm worried is this series is already large, so I
>> think we need to post
>> another series to do it.
>
> I wasn't asking to do it here, I was just offering a suggestion (and sharing
> some experien
On 2014/9/29 16:37, Lucas Stach wrote:
> Am Sonntag, den 28.09.2014, 14:11 +0800 schrieb Yijing Wang:
>> On 2014/9/28 10:32, Yijing Wang wrote:
>>> On 2014/9/26 17:05, Thierry Reding wrote:
>>>> On Fri, Sep 26, 2014 at 10:54:32AM +0200, Thierry Reding wrote:
>&
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
---
arch/s390/pci/pci.c |4
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
-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
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/x86/include/asm/pci.h | 13 +
arch/x86/kernel/apic/io_apic.c | 19 +++
arch/x86/pci
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
1 - 100 of 303 matches
Mail list logo