Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e01c0d6d8cf29c1c11725837b265598cab687952
Commit:     e01c0d6d8cf29c1c11725837b265598cab687952
Parent:     22d6a1cba3e9ec9baf8ce4d8dd1d088e112a64f1
Author:     David S. Miller <[EMAIL PROTECTED]>
AuthorDate: Fri May 25 01:04:15 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Tue May 29 02:49:34 2007 -0700

    [SPARC64]: Negotiate hypervisor API for PCI services.
    
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 arch/sparc64/kernel/pci_sun4v.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/arch/sparc64/kernel/pci_sun4v.c b/arch/sparc64/kernel/pci_sun4v.c
index 62e4d04..6b3fe2c 100644
--- a/arch/sparc64/kernel/pci_sun4v.c
+++ b/arch/sparc64/kernel/pci_sun4v.c
@@ -27,6 +27,9 @@
 
 #include "pci_sun4v.h"
 
+static unsigned long vpci_major = 1;
+static unsigned long vpci_minor = 1;
+
 #define PGLIST_NENTS   (PAGE_SIZE / sizeof(u64))
 
 struct iommu_batch {
@@ -1162,6 +1165,7 @@ static void pci_sun4v_pbm_init(struct pci_controller_info 
*p, struct device_node
 
 void sun4v_pci_init(struct device_node *dp, char *model_name)
 {
+       static int hvapi_negotiated = 0;
        struct pci_controller_info *p;
        struct pci_pbm_info *pbm;
        struct iommu *iommu;
@@ -1170,6 +1174,20 @@ void sun4v_pci_init(struct device_node *dp, char 
*model_name)
        u32 devhandle;
        int i;
 
+       if (!hvapi_negotiated++) {
+               int err = sun4v_hvapi_register(HV_GRP_PCI,
+                                              vpci_major,
+                                              &vpci_minor);
+
+               if (err) {
+                       prom_printf("SUN4V_PCI: Could not register hvapi, "
+                                   "err=%d\n", err);
+                       prom_halt();
+               }
+               printk("SUN4V_PCI: Registered hvapi major[%lu] minor[%lu]\n",
+                      vpci_major, vpci_minor);
+       }
+
        prop = of_find_property(dp, "reg", NULL);
        regs = prop->value;
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to