diff options
author | Tony Luck <tony.luck@intel.com> | 2008-04-17 13:13:57 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2008-04-17 13:13:57 -0400 |
commit | f4df39cbdd9e9ab615e80148cc271db22a8508ad (patch) | |
tree | 312fcf9de1154c85782c121a46fa2952f9812292 /arch/ia64/kernel | |
parent | a49072bb367a94a9af6c6a6dcbaa1dc5617d7fa0 (diff) | |
parent | a6c75b86ce9f01db4ea9912877b526c2dc4d2f0a (diff) |
Pull nptcg into release branch
Conflicts:
arch/ia64/mm/tlb.c
Diffstat (limited to 'arch/ia64/kernel')
-rw-r--r-- | arch/ia64/kernel/efi.c | 46 | ||||
-rw-r--r-- | arch/ia64/kernel/setup.c | 6 |
2 files changed, 50 insertions, 2 deletions
diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c index 728d7247a1a6..d45f215bc8fc 100644 --- a/arch/ia64/kernel/efi.c +++ b/arch/ia64/kernel/efi.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <asm/pgtable.h> | 37 | #include <asm/pgtable.h> |
38 | #include <asm/processor.h> | 38 | #include <asm/processor.h> |
39 | #include <asm/mca.h> | 39 | #include <asm/mca.h> |
40 | #include <asm/tlbflush.h> | ||
40 | 41 | ||
41 | #define EFI_DEBUG 0 | 42 | #define EFI_DEBUG 0 |
42 | 43 | ||
@@ -403,6 +404,41 @@ efi_get_pal_addr (void) | |||
403 | return NULL; | 404 | return NULL; |
404 | } | 405 | } |
405 | 406 | ||
407 | |||
408 | static u8 __init palo_checksum(u8 *buffer, u32 length) | ||
409 | { | ||
410 | u8 sum = 0; | ||
411 | u8 *end = buffer + length; | ||
412 | |||
413 | while (buffer < end) | ||
414 | sum = (u8) (sum + *(buffer++)); | ||
415 | |||
416 | return sum; | ||
417 | } | ||
418 | |||
419 | /* | ||
420 | * Parse and handle PALO table which is published at: | ||
421 | * http://www.dig64.org/home/DIG64_PALO_R1_0.pdf | ||
422 | */ | ||
423 | static void __init handle_palo(unsigned long palo_phys) | ||
424 | { | ||
425 | struct palo_table *palo = __va(palo_phys); | ||
426 | u8 checksum; | ||
427 | |||
428 | if (strncmp(palo->signature, PALO_SIG, sizeof(PALO_SIG) - 1)) { | ||
429 | printk(KERN_INFO "PALO signature incorrect.\n"); | ||
430 | return; | ||
431 | } | ||
432 | |||
433 | checksum = palo_checksum((u8 *)palo, palo->length); | ||
434 | if (checksum) { | ||
435 | printk(KERN_INFO "PALO checksum incorrect.\n"); | ||
436 | return; | ||
437 | } | ||
438 | |||
439 | setup_ptcg_sem(palo->max_tlb_purges, NPTCG_FROM_PALO); | ||
440 | } | ||
441 | |||
406 | void | 442 | void |
407 | efi_map_pal_code (void) | 443 | efi_map_pal_code (void) |
408 | { | 444 | { |
@@ -432,6 +468,7 @@ efi_init (void) | |||
432 | u64 efi_desc_size; | 468 | u64 efi_desc_size; |
433 | char *cp, vendor[100] = "unknown"; | 469 | char *cp, vendor[100] = "unknown"; |
434 | int i; | 470 | int i; |
471 | unsigned long palo_phys; | ||
435 | 472 | ||
436 | /* | 473 | /* |
437 | * It's too early to be able to use the standard kernel command line | 474 | * It's too early to be able to use the standard kernel command line |
@@ -496,6 +533,8 @@ efi_init (void) | |||
496 | efi.hcdp = EFI_INVALID_TABLE_ADDR; | 533 | efi.hcdp = EFI_INVALID_TABLE_ADDR; |
497 | efi.uga = EFI_INVALID_TABLE_ADDR; | 534 | efi.uga = EFI_INVALID_TABLE_ADDR; |
498 | 535 | ||
536 | palo_phys = EFI_INVALID_TABLE_ADDR; | ||
537 | |||
499 | for (i = 0; i < (int) efi.systab->nr_tables; i++) { | 538 | for (i = 0; i < (int) efi.systab->nr_tables; i++) { |
500 | if (efi_guidcmp(config_tables[i].guid, MPS_TABLE_GUID) == 0) { | 539 | if (efi_guidcmp(config_tables[i].guid, MPS_TABLE_GUID) == 0) { |
501 | efi.mps = config_tables[i].table; | 540 | efi.mps = config_tables[i].table; |
@@ -515,10 +554,17 @@ efi_init (void) | |||
515 | } else if (efi_guidcmp(config_tables[i].guid, HCDP_TABLE_GUID) == 0) { | 554 | } else if (efi_guidcmp(config_tables[i].guid, HCDP_TABLE_GUID) == 0) { |
516 | efi.hcdp = config_tables[i].table; | 555 | efi.hcdp = config_tables[i].table; |
517 | printk(" HCDP=0x%lx", config_tables[i].table); | 556 | printk(" HCDP=0x%lx", config_tables[i].table); |
557 | } else if (efi_guidcmp(config_tables[i].guid, | ||
558 | PROCESSOR_ABSTRACTION_LAYER_OVERWRITE_GUID) == 0) { | ||
559 | palo_phys = config_tables[i].table; | ||
560 | printk(" PALO=0x%lx", config_tables[i].table); | ||
518 | } | 561 | } |
519 | } | 562 | } |
520 | printk("\n"); | 563 | printk("\n"); |
521 | 564 | ||
565 | if (palo_phys != EFI_INVALID_TABLE_ADDR) | ||
566 | handle_palo(palo_phys); | ||
567 | |||
522 | runtime = __va(efi.systab->runtime); | 568 | runtime = __va(efi.systab->runtime); |
523 | efi.get_time = phys_get_time; | 569 | efi.get_time = phys_get_time; |
524 | efi.set_time = phys_set_time; | 570 | efi.set_time = phys_set_time; |
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c index 6206541f9e87..b86a072418a2 100644 --- a/arch/ia64/kernel/setup.c +++ b/arch/ia64/kernel/setup.c | |||
@@ -59,6 +59,7 @@ | |||
59 | #include <asm/setup.h> | 59 | #include <asm/setup.h> |
60 | #include <asm/smp.h> | 60 | #include <asm/smp.h> |
61 | #include <asm/system.h> | 61 | #include <asm/system.h> |
62 | #include <asm/tlbflush.h> | ||
62 | #include <asm/unistd.h> | 63 | #include <asm/unistd.h> |
63 | #include <asm/hpsim.h> | 64 | #include <asm/hpsim.h> |
64 | 65 | ||
@@ -948,9 +949,10 @@ cpu_init (void) | |||
948 | #endif | 949 | #endif |
949 | 950 | ||
950 | /* set ia64_ctx.max_rid to the maximum RID that is supported by all CPUs: */ | 951 | /* set ia64_ctx.max_rid to the maximum RID that is supported by all CPUs: */ |
951 | if (ia64_pal_vm_summary(NULL, &vmi) == 0) | 952 | if (ia64_pal_vm_summary(NULL, &vmi) == 0) { |
952 | max_ctx = (1U << (vmi.pal_vm_info_2_s.rid_size - 3)) - 1; | 953 | max_ctx = (1U << (vmi.pal_vm_info_2_s.rid_size - 3)) - 1; |
953 | else { | 954 | setup_ptcg_sem(vmi.pal_vm_info_2_s.max_purges, NPTCG_FROM_PAL); |
955 | } else { | ||
954 | printk(KERN_WARNING "cpu_init: PAL VM summary failed, assuming 18 RID bits\n"); | 956 | printk(KERN_WARNING "cpu_init: PAL VM summary failed, assuming 18 RID bits\n"); |
955 | max_ctx = (1U << 15) - 1; /* use architected minimum */ | 957 | max_ctx = (1U << 15) - 1; /* use architected minimum */ |
956 | } | 958 | } |