Currently, PCI drivers will initialize bus-msi in
pcibios_add_bus(). pcibios_add_bus() will be called
in every pci bus initialization. So the bus-msi
assignment in pci_alloc_child_bus() is useless.
Signed-off-by: Yijing Wang wangyij...@huawei.com
CC: Thierry Reding
Now there are a lot of __weak arch functions in MSI code.
These functions make MSI driver complex, It's time to
refactor it. Add .restore_irq(), .setup_irqs(), .teardown_irqs()
to make msi_chip common across all platforms.
Also replace the argument struct pci_dev with struct device
to support
Msi_chip functions setup_irq/teardown_irq/check_device rarely
use msi_chip argument. We can get msi_chip pointer from the
device pointer or irq number, so clean up msi_chip arguments.
This patch is also preparation for using msi_chip in all
platforms to setup/teardown MSI irqs.
Signed-off-by:
Currently, pcie-designware, pcie-rcar, pci-tegra drivers
use irq chip_data to the msi_chip pointer. They already call
irq_set_chip_data() in their own MSI irq map functions.
So irq_set_chip_data() in arch_setup_msi_irq() is useless.
Signed-off-by: Yijing Wang wangyij...@huawei.com
---
Introduce a new struct msi_chip iop13xx_msi_chip instead of weak arch
functions to configure MSI/MSI-X. And associate the pci bus with msi_chip
in pcibios_add_bus().
Signed-off-by: Yijing Wang wangyij...@huawei.com
---
arch/arm/mach-iop13xx/include/mach/pci.h |2 ++
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
Introduce a new struct msi_chip sparc_msi_chip instead of weak arch
functions to configure MSI/MSI-X.
Signed-off-by: Yijing Wang wangyij...@huawei.com
---
arch/sparc/kernel/pci.c | 18 ++
1 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/arch/sparc/kernel/pci.c
Commit 0e4ccb150 added two __weak arch functions arch_msix_mask_irq()
and arch_msi_mask_irq() to fix a bug found when running xen in x86.
Introduced these two funcntions make MSI code complex. This patch
reverted commit 0e4ccb150 and add #ifdef for x86 msi_chip to fix this
bug for simplicity. Also
Introduce a new struct msi_chip apic_msi_chip instead of weak arch
functions to configure MSI/MSI-X in x86.
Signed-off-by: Yijing Wang wangyij...@huawei.com
---
arch/x86/include/asm/pci.h |1 +
arch/x86/kernel/apic/io_apic.c | 20
2 files changed, 17 insertions(+),
Introduce __weak arch_get_match_msi_chip() to find the match msi_chip.
We prepare to use struct msi_chip to eliminate arch_xxx functions
in all platforms. The MSI device and the msi_chip binding is platform
specific. For instance, in x86, LAPICs receive all MSI irq, but in
arm, PCI device usually
Introduce a new struct msi_chip ia64_msi_chip instead of weak arch
functions to configure MSI/MSI-X.
Signed-off-by: Yijing Wang wangyij...@huawei.com
---
arch/ia64/kernel/msi_ia64.c | 18 ++
1 files changed, 14 insertions(+), 4 deletions(-)
diff --git
Now we can clean up MSI weak arch functions in x86.
Signed-off-by: Yijing Wang wangyij...@huawei.com
---
arch/x86/include/asm/pci.h |3 ---
arch/x86/kernel/apic/io_apic.c |2 +-
arch/x86/kernel/x86_init.c | 24
3 files changed, 1 insertions(+), 28
Introduce a new struct msi_chip zpci_msi_chip instead of weak arch
functions to configure MSI/MSI-X.
Signed-off-by: Yijing Wang wangyij...@huawei.com
---
arch/s390/pci/pci.c | 16 ++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/arch/s390/pci/pci.c
Introduce a new struct msi_chip xlp_chip instead of weak arch
functions to configure MSI/MSI-X.
Signed-off-by: Yijing Wang wangyij...@huawei.com
---
arch/mips/pci/msi-xlp.c | 15 +--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/arch/mips/pci/msi-xlp.c
Introduce a new struct msi_chip remap_msi_chip instead of weak arch
functions to configure irq remapping MSI/MSI-X in x86.
Signed-off-by: Yijing Wang wangyij...@huawei.com
---
drivers/iommu/irq_remapping.c | 13 +
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git
Introduce a new struct msi_chip xlr_msi_chip instead of weak arch
functions to configure MSI/MSI-X.
Signed-off-by: Yijing Wang wangyij...@huawei.com
---
arch/mips/pci/pci-xlr.c | 19 +++
1 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/arch/mips/pci/pci-xlr.c
Introduce a new struct msi_chip ppc_msi_chip instead of weak arch
functions to configure MSI/MSI-X.
Signed-off-by: Yijing Wang wangyij...@huawei.com
---
arch/powerpc/kernel/msi.c | 23 +--
1 files changed, 17 insertions(+), 6 deletions(-)
diff --git
Now we use struct msi_chip in all platforms to configure
MSI/MSI-X. We can clean up the unused arch functions.
Signed-off-by: Yijing Wang wangyij...@huawei.com
---
drivers/pci/msi.c | 82
1 files changed, 32 insertions(+), 50 deletions(-)
Introduce a new struct msi_chip xen_msi_chip instead of weak arch
functions to configure MSI/MSI-X.
Signed-off-by: Yijing Wang wangyij...@huawei.com
CC: Konrad Rzeszutek Wilk konrad.w...@oracle.com
---
arch/x86/pci/xen.c | 128 +--
1 files
Introduce a new struct msi_chip octeon_msi_chip instead of weak arch
functions to configure MSI/MSI-X.
Signed-off-by: Yijing Wang wangyij...@huawei.com
---
arch/mips/pci/msi-octeon.c | 45 ++-
1 files changed, 19 insertions(+), 26 deletions(-)
diff
LPC IOMMU and VFIO MicroConference - Call for Participation
===
We are pleased to announce that this year there will be the first IOMMU
and VFIO MicroConference held at Linux Plumbers Conference in
Düsseldorf. An initial request for support
On Mon, Aug 11, 2014 at 9:51 PM, Hiroshi Doyu hd...@nvidia.com wrote:
Hi Olav,
Olav Haugan ohau...@codeaurora.org writes:
@@ -93,6 +94,10 @@ enum iommu_attr {
* @detach_dev: detach device from an iommu domain
* @map: map a physically contiguous memory region to an iommu domain
*
On 2014/8/12 17:09, David Vrabel wrote:
On 12/08/14 08:25, Yijing Wang wrote:
Commit 0e4ccb150 added two __weak arch functions arch_msix_mask_irq()
and arch_msi_mask_irq() to fix a bug found when running xen in x86.
Introduced these two funcntions make MSI code complex. This patch
reverted
On 8/11/2014 6:35 PM, Konrad Rzeszutek Wilk wrote:
On Mon, Aug 11, 2014 at 03:45:50PM -0700, Olav Haugan wrote:
.. snip..
+for_each_sg(sg, s, nents, i) {
+phys_addr_t phys = page_to_phys(sg_page(s));
+size_t page_len = s-offset + s-length;
+
+ret =
Hi Olav,
Thank you for the patch.
On Monday 11 August 2014 15:45:50 Olav Haugan wrote:
Mapping and unmapping are more often than not in the critical path.
map_sg and unmap_sg allows IOMMU driver implementations to optimize
the process of mapping and unmapping buffers into the IOMMU page
On 8/12/2014 3:48 AM, Rob Clark wrote:
On Mon, Aug 11, 2014 at 9:51 PM, Hiroshi Doyu hd...@nvidia.com wrote:
Hi Olav,
Olav Haugan ohau...@codeaurora.org writes:
@@ -93,6 +94,10 @@ enum iommu_attr {
* @detach_dev: detach device from an iommu domain
* @map: map a physically contiguous
Hi Laurent,
On 8/12/2014 9:55 AM, Laurent Pinchart wrote:
Hi Olav,
Thank you for the patch.
On Monday 11 August 2014 15:45:50 Olav Haugan wrote:
Mapping and unmapping are more often than not in the critical path.
map_sg and unmap_sg allows IOMMU driver implementations to optimize
the
On 12/08/14 08:25, Yijing Wang wrote:
Commit 0e4ccb150 added two __weak arch functions arch_msix_mask_irq()
and arch_msi_mask_irq() to fix a bug found when running xen in x86.
Introduced these two funcntions make MSI code complex. This patch
reverted commit 0e4ccb150 and add #ifdef for x86
On Tue, Aug 12, 2014 at 03:26:00PM +0800, Yijing Wang wrote:
Introduce a new struct msi_chip apic_msi_chip instead of weak arch
functions to configure MSI/MSI-X in x86.
Why not 'x86_msi_ops' (see arch/x86/kernel/x86_init.c)
Signed-off-by: Yijing Wang wangyij...@huawei.com
---
This series contains a some enhancements to the ARM SMMU driver. These
are mostly distinct but I'm sending them out in a single series since
they depend on each other for clean application.
The first two patches are related to power-saving features (clocks and
regulators).
The third adds support
Add a workaround for some buggy hardware that requires a TLB invalidate
operation to occur at map time. Activate the feature with the
qcom,smmu-invalidate-on-map boolean DT property.
Signed-off-by: Mitchel Humpherys mitch...@codeaurora.org
---
Documentation/devicetree/bindings/iommu/arm,smmu.txt
Generic IOMMU device tree bindings were recently added in
[devicetree: Add generic IOMMU device tree bindings]. Implement the
bindings in the ARM SMMU driver.
See Documentation/devicetree/bindings/iommu/iommu.txt for the bindings
themselves.
Signed-off-by: Mitchel Humpherys
On some platforms with tight power constraints it is polite to only
leave your clocks on for as long as you absolutely need them. Currently
we assume that all clocks necessary for SMMU register access are always
on.
Add some optional device tree properties to specify any clocks that are
necessary
On some power-constrained platforms it's useful to disable power when a
device is not in use. Add support for specifying regulators for SMMUs
and only leave power on as long as the SMMU is in use (attached).
Signed-off-by: Mitchel Humpherys mitch...@codeaurora.org
---
Currently, we provide the iommu_ops.iova_to_phys service by doing a
table walk in software to translate IO virtual addresses to physical
addresses. On SMMUs that support it, it can be useful to ask the SMMU
itself to do the translation. This can be used to warm the TLBs for an
SMMU. It can also be
Under certain conditions coherent hardware translation table walks can
result in degraded performance. Add a new domain attribute to
disable/enable this feature in generic code along with the domain
attribute setter and getter to handle it in the ARM SMMU driver.
Signed-off-by: Mitchel Humpherys
36 matches
Mail list logo