Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 57073
b: refs/heads/master
c: e01c0d6
h: refs/heads/master
i:
  57071: 2a06e24
v: v3
  • Loading branch information
David S. Miller committed May 29, 2007
1 parent 47ab2ef commit 54495b2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 22d6a1cba3e9ec9baf8ce4d8dd1d088e112a64f1
refs/heads/master: e01c0d6d8cf29c1c11725837b265598cab687952
18 changes: 18 additions & 0 deletions trunk/arch/sparc64/kernel/pci_sun4v.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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;
Expand All @@ -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;

Expand Down

0 comments on commit 54495b2

Please sign in to comment.