diff options
Diffstat (limited to 'arch/ia64/kernel')
-rw-r--r-- | arch/ia64/kernel/efi.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c index 8e8f8b6193ee..242d79341120 100644 --- a/arch/ia64/kernel/efi.c +++ b/arch/ia64/kernel/efi.c | |||
@@ -370,7 +370,7 @@ efi_get_pal_addr (void) | |||
370 | continue; | 370 | continue; |
371 | } | 371 | } |
372 | 372 | ||
373 | if (md->num_pages << EFI_PAGE_SHIFT > IA64_GRANULE_SIZE) | 373 | if (efi_md_size(md) > IA64_GRANULE_SIZE) |
374 | panic("Woah! PAL code size bigger than a granule!"); | 374 | panic("Woah! PAL code size bigger than a granule!"); |
375 | 375 | ||
376 | #if EFI_DEBUG | 376 | #if EFI_DEBUG |
@@ -378,7 +378,7 @@ efi_get_pal_addr (void) | |||
378 | 378 | ||
379 | printk(KERN_INFO "CPU %d: mapping PAL code [0x%lx-0x%lx) into [0x%lx-0x%lx)\n", | 379 | printk(KERN_INFO "CPU %d: mapping PAL code [0x%lx-0x%lx) into [0x%lx-0x%lx)\n", |
380 | smp_processor_id(), md->phys_addr, | 380 | smp_processor_id(), md->phys_addr, |
381 | md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT), | 381 | md->phys_addr + efi_md_size(md), |
382 | vaddr & mask, (vaddr & mask) + IA64_GRANULE_SIZE); | 382 | vaddr & mask, (vaddr & mask) + IA64_GRANULE_SIZE); |
383 | #endif | 383 | #endif |
384 | return __va(md->phys_addr); | 384 | return __va(md->phys_addr); |
@@ -523,7 +523,7 @@ efi_init (void) | |||
523 | md = p; | 523 | md = p; |
524 | printk("mem%02u: type=%u, attr=0x%lx, range=[0x%016lx-0x%016lx) (%luMB)\n", | 524 | printk("mem%02u: type=%u, attr=0x%lx, range=[0x%016lx-0x%016lx) (%luMB)\n", |
525 | i, md->type, md->attribute, md->phys_addr, | 525 | i, md->type, md->attribute, md->phys_addr, |
526 | md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT), | 526 | md->phys_addr + efi_md_size(md), |
527 | md->num_pages >> (20 - EFI_PAGE_SHIFT)); | 527 | md->num_pages >> (20 - EFI_PAGE_SHIFT)); |
528 | } | 528 | } |
529 | } | 529 | } |
@@ -656,7 +656,7 @@ efi_memory_descriptor (unsigned long phys_addr) | |||
656 | for (p = efi_map_start; p < efi_map_end; p += efi_desc_size) { | 656 | for (p = efi_map_start; p < efi_map_end; p += efi_desc_size) { |
657 | md = p; | 657 | md = p; |
658 | 658 | ||
659 | if (phys_addr - md->phys_addr < (md->num_pages << EFI_PAGE_SHIFT)) | 659 | if (phys_addr - md->phys_addr < efi_md_size(md)) |
660 | return md; | 660 | return md; |
661 | } | 661 | } |
662 | return NULL; | 662 | return NULL; |
@@ -1158,7 +1158,7 @@ efi_initialize_iomem_resources(struct resource *code_resource, | |||
1158 | 1158 | ||
1159 | res->name = name; | 1159 | res->name = name; |
1160 | res->start = md->phys_addr; | 1160 | res->start = md->phys_addr; |
1161 | res->end = md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT) - 1; | 1161 | res->end = md->phys_addr + efi_md_size(md) - 1; |
1162 | res->flags = flags; | 1162 | res->flags = flags; |
1163 | 1163 | ||
1164 | if (insert_resource(&iomem_resource, res) < 0) | 1164 | if (insert_resource(&iomem_resource, res) < 0) |