Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 57729
b: refs/heads/master
c: 56f5c0b
h: refs/heads/master
i:
  57727: c06840c
v: v3
  • Loading branch information
David S. Miller committed Jun 13, 2007
1 parent fd77e42 commit de33f99
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4a907dec9845001dc2b117a0ed2a2150384a4cea
refs/heads/master: 56f5c0bd50e948408ac0fd587b5c89fa7e2a1b6e
12 changes: 9 additions & 3 deletions trunk/arch/sparc64/kernel/pci_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,18 +291,24 @@ void pci_determine_mem_io_space(struct pci_pbm_info *pbm)

for (i = 0; i < num_pbm_ranges; i++) {
const struct linux_prom_pci_ranges *pr = &pbm_ranges[i];
unsigned long a;
unsigned long a, size;
u32 parent_phys_hi, parent_phys_lo;
u32 size_hi, size_lo;
int type;

parent_phys_hi = pr->parent_phys_hi;
parent_phys_lo = pr->parent_phys_lo;
if (tlb_type == hypervisor)
parent_phys_hi &= 0x0fffffff;

size_hi = pr->size_hi;
size_lo = pr->size_lo;

type = (pr->child_phys_hi >> 24) & 0x3;
a = (((unsigned long)parent_phys_hi << 32UL) |
((unsigned long)parent_phys_lo << 0UL));
size = (((unsigned long)size_hi << 32UL) |
((unsigned long)size_lo << 0UL));

switch (type) {
case 0:
Expand All @@ -313,15 +319,15 @@ void pci_determine_mem_io_space(struct pci_pbm_info *pbm)
case 1:
/* 16-bit IO space, 16MB */
pbm->io_space.start = a;
pbm->io_space.end = a + ((16UL*1024UL*1024UL) - 1UL);
pbm->io_space.end = a + size - 1UL;
pbm->io_space.flags = IORESOURCE_IO;
saw_io = 1;
break;

case 2:
/* 32-bit MEM space, 2GB */
pbm->mem_space.start = a;
pbm->mem_space.end = a + (0x80000000UL - 1UL);
pbm->mem_space.end = a + size - 1UL;
pbm->mem_space.flags = IORESOURCE_MEM;
saw_mem = 1;
break;
Expand Down

0 comments on commit de33f99

Please sign in to comment.