Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 74764
b: refs/heads/master
c: 685c7f5
h: refs/heads/master
v: v3
  • Loading branch information
Li Zefan authored and Tony Luck committed Dec 8, 2007
1 parent 67dc996 commit 83a80bd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 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: b898a424ed68ba73d6d4562d6370985b2e9bec61
refs/heads/master: 685c7f5d3629d558b17ee193b6d7f194e82aadf0
10 changes: 5 additions & 5 deletions trunk/arch/ia64/kernel/efi.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,15 +370,15 @@ efi_get_pal_addr (void)
continue;
}

if (md->num_pages << EFI_PAGE_SHIFT > IA64_GRANULE_SIZE)
if (efi_md_size(md) > IA64_GRANULE_SIZE)
panic("Woah! PAL code size bigger than a granule!");

#if EFI_DEBUG
mask = ~((1 << IA64_GRANULE_SHIFT) - 1);

printk(KERN_INFO "CPU %d: mapping PAL code [0x%lx-0x%lx) into [0x%lx-0x%lx)\n",
smp_processor_id(), md->phys_addr,
md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT),
md->phys_addr + efi_md_size(md),
vaddr & mask, (vaddr & mask) + IA64_GRANULE_SIZE);
#endif
return __va(md->phys_addr);
Expand Down Expand Up @@ -523,7 +523,7 @@ efi_init (void)
md = p;
printk("mem%02u: type=%u, attr=0x%lx, range=[0x%016lx-0x%016lx) (%luMB)\n",
i, md->type, md->attribute, md->phys_addr,
md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT),
md->phys_addr + efi_md_size(md),
md->num_pages >> (20 - EFI_PAGE_SHIFT));
}
}
Expand Down Expand Up @@ -656,7 +656,7 @@ efi_memory_descriptor (unsigned long phys_addr)
for (p = efi_map_start; p < efi_map_end; p += efi_desc_size) {
md = p;

if (phys_addr - md->phys_addr < (md->num_pages << EFI_PAGE_SHIFT))
if (phys_addr - md->phys_addr < efi_md_size(md))
return md;
}
return NULL;
Expand Down Expand Up @@ -1158,7 +1158,7 @@ efi_initialize_iomem_resources(struct resource *code_resource,

res->name = name;
res->start = md->phys_addr;
res->end = md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT) - 1;
res->end = md->phys_addr + efi_md_size(md) - 1;
res->flags = flags;

if (insert_resource(&iomem_resource, res) < 0)
Expand Down

0 comments on commit 83a80bd

Please sign in to comment.