linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: richardliu@ms1.techarea.org (Richard Liu)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] PCI Domains Support
Date: Thu, 31 Dec 2009 11:37:10 +0800	[thread overview]
Message-ID: <4B3C1C66.5050203@ms1.techarea.org> (raw)
In-Reply-To: <20091223040710.GA3352@verge.net.au>

Dear Simon:

    Regenerate the patch.

--
 arch/arm/Kconfig                |    3 +++
 arch/arm/include/asm/mach/pci.h |    6 ++++++
 arch/arm/include/asm/pci.h      |    5 +++++
 arch/arm/kernel/bios32.c        |   17 +++++++++++++++++
 4 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 233a222..cd3756c 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -957,6 +957,9 @@ config PCI
       your box. Other bus systems are ISA, EISA, MicroChannel (MCA) or
       VESA. If you have PCI, say Y, otherwise N.
 
+config PCI_DOMAINS
+        depends on PCI
+
 config PCI_SYSCALL
     def_bool PCI
 
diff --git a/arch/arm/include/asm/mach/pci.h
b/arch/arm/include/asm/mach/pci.h
index a38bdc7..e6f3ad7 100644
--- a/arch/arm/include/asm/mach/pci.h
+++ b/arch/arm/include/asm/mach/pci.h
@@ -20,6 +20,9 @@ struct hw_pci {
     void        (*postinit)(void);
     u8        (*swizzle)(struct pci_dev *dev, u8 *pin);
     int        (*map_irq)(struct pci_dev *dev, u8 slot, u8 pin);
+#ifdef CONFIG_PCI_DOMAINS
+    int        nr_domains;
+#endif
 };
 
 /*
@@ -37,6 +40,9 @@ struct pci_sys_data {
                     /* IRQ mapping                */
     int        (*map_irq)(struct pci_dev *, u8, u8);
     struct hw_pci    *hw;
+#ifdef CONFIG_PCI_DOMAINS
+    int        domain;
+#endif
 };
 
 /*
diff --git a/arch/arm/include/asm/pci.h b/arch/arm/include/asm/pci.h
index 226cddd..6937d58 100644
--- a/arch/arm/include/asm/pci.h
+++ b/arch/arm/include/asm/pci.h
@@ -23,6 +23,11 @@ static inline void pcibios_penalize_isa_irq(int irq,
int active)
     /* We don't do dynamic PCI IRQ allocation */
 }
 
+#ifdef CONFIG_PCI_DOMAINS
+int pci_domain_nr(struct pci_bus *bus);
+int pci_proc_domain(struct pci_bus *bus);
+#endif
+
 /*
  * The PCI address space does equal the physical memory address space.
  * The networking and block device layers use this boolean for bounce
diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c
index 8096819..3a784a1 100644
--- a/arch/arm/kernel/bios32.c
+++ b/arch/arm/kernel/bios32.c
@@ -531,6 +531,7 @@ static void __init pcibios_init_hw(struct hw_pci *hw)
         sys->busnr   = busnr;
         sys->swizzle = hw->swizzle;
         sys->map_irq = hw->map_irq;
+        sys->domain  = hw->nr_domains;
         sys->resource[0] = &ioport_resource;
         sys->resource[1] = &iomem_resource;
 
@@ -694,3 +695,19 @@ int pci_mmap_page_range(struct pci_dev *dev, struct
vm_area_struct *vma,
 
     return 0;
 }
+#ifdef CONFIG_PCI_DOMAINS
+int pci_domain_nr(struct pci_bus *bus)
+{
+
+        struct pci_sys_data *sd = bus->sysdata;
+        return sd->domain;
+
+}
+EXPORT_SYMBOL(pci_domain_nr);
+
+int pci_proc_domain(struct pci_bus *bus)
+{
+        return pci_domain_nr(bus);
+}
+EXPORT_SYMBOL(pci_proc_domain);
+#endif

  reply	other threads:[~2009-12-31  3:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-16 14:13 [Fwd: [PATCH] PCI Domains Support] Richard Liu
2009-12-17  0:06 ` Simon Horman
2009-12-17 13:01   ` [PATCH] PCI Domains Support Richard Liu
2009-12-20  1:27     ` Simon Horman
2009-12-21  6:00       ` Richard Liu
2009-12-22  4:55         ` Simon Horman
2009-12-25 21:58           ` Richard Liu
2009-12-23  4:07             ` Simon Horman
2009-12-31  3:37               ` Richard Liu [this message]
2009-12-31  4:36                 ` Simon Horman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B3C1C66.5050203@ms1.techarea.org \
    --to=richardliu@ms1.techarea.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).