diff options
Diffstat (limited to 'arch/ia64/kernel/palinfo.c')
-rw-r--r-- | arch/ia64/kernel/palinfo.c | 47 |
1 files changed, 20 insertions, 27 deletions
diff --git a/arch/ia64/kernel/palinfo.c b/arch/ia64/kernel/palinfo.c index 3f5bac59209a..0b546e2b36ac 100644 --- a/arch/ia64/kernel/palinfo.c +++ b/arch/ia64/kernel/palinfo.c | |||
@@ -566,29 +566,23 @@ version_info(char *page) | |||
566 | pal_version_u_t min_ver, cur_ver; | 566 | pal_version_u_t min_ver, cur_ver; |
567 | char *p = page; | 567 | char *p = page; |
568 | 568 | ||
569 | /* The PAL_VERSION call is advertised as being able to support | 569 | if (ia64_pal_version(&min_ver, &cur_ver) != 0) |
570 | * both physical and virtual mode calls. This seems to be a documentation | 570 | return 0; |
571 | * bug rather than firmware bug. In fact, it does only support physical mode. | ||
572 | * So now the code reflects this fact and the pal_version() has been updated | ||
573 | * accordingly. | ||
574 | */ | ||
575 | if (ia64_pal_version(&min_ver, &cur_ver) != 0) return 0; | ||
576 | 571 | ||
577 | p += sprintf(p, | 572 | p += sprintf(p, |
578 | "PAL_vendor : 0x%02x (min=0x%02x)\n" | 573 | "PAL_vendor : 0x%02x (min=0x%02x)\n" |
579 | "PAL_A : %x.%x.%x (min=%x.%x.%x)\n" | 574 | "PAL_A : %02x.%02x (min=%02x.%02x)\n" |
580 | "PAL_B : %x.%x.%x (min=%x.%x.%x)\n", | 575 | "PAL_B : %02x.%02x (min=%02x.%02x)\n", |
581 | cur_ver.pal_version_s.pv_pal_vendor, min_ver.pal_version_s.pv_pal_vendor, | 576 | cur_ver.pal_version_s.pv_pal_vendor, |
582 | 577 | min_ver.pal_version_s.pv_pal_vendor, | |
583 | cur_ver.pal_version_s.pv_pal_a_model>>4, | 578 | cur_ver.pal_version_s.pv_pal_a_model, |
584 | cur_ver.pal_version_s.pv_pal_a_model&0xf, cur_ver.pal_version_s.pv_pal_a_rev, | 579 | cur_ver.pal_version_s.pv_pal_a_rev, |
585 | min_ver.pal_version_s.pv_pal_a_model>>4, | 580 | min_ver.pal_version_s.pv_pal_a_model, |
586 | min_ver.pal_version_s.pv_pal_a_model&0xf, min_ver.pal_version_s.pv_pal_a_rev, | 581 | min_ver.pal_version_s.pv_pal_a_rev, |
587 | 582 | cur_ver.pal_version_s.pv_pal_b_model, | |
588 | cur_ver.pal_version_s.pv_pal_b_model>>4, | 583 | cur_ver.pal_version_s.pv_pal_b_rev, |
589 | cur_ver.pal_version_s.pv_pal_b_model&0xf, cur_ver.pal_version_s.pv_pal_b_rev, | 584 | min_ver.pal_version_s.pv_pal_b_model, |
590 | min_ver.pal_version_s.pv_pal_b_model>>4, | 585 | min_ver.pal_version_s.pv_pal_b_rev); |
591 | min_ver.pal_version_s.pv_pal_b_model&0xf, min_ver.pal_version_s.pv_pal_b_rev); | ||
592 | return p - page; | 586 | return p - page; |
593 | } | 587 | } |
594 | 588 | ||
@@ -958,9 +952,9 @@ remove_palinfo_proc_entries(unsigned int hcpu) | |||
958 | } | 952 | } |
959 | } | 953 | } |
960 | 954 | ||
961 | static int __cpuinit palinfo_cpu_callback(struct notifier_block *nfb, | 955 | #ifdef CONFIG_HOTPLUG_CPU |
962 | unsigned long action, | 956 | static int palinfo_cpu_callback(struct notifier_block *nfb, |
963 | void *hcpu) | 957 | unsigned long action, void *hcpu) |
964 | { | 958 | { |
965 | unsigned int hotcpu = (unsigned long)hcpu; | 959 | unsigned int hotcpu = (unsigned long)hcpu; |
966 | 960 | ||
@@ -968,20 +962,19 @@ static int __cpuinit palinfo_cpu_callback(struct notifier_block *nfb, | |||
968 | case CPU_ONLINE: | 962 | case CPU_ONLINE: |
969 | create_palinfo_proc_entries(hotcpu); | 963 | create_palinfo_proc_entries(hotcpu); |
970 | break; | 964 | break; |
971 | #ifdef CONFIG_HOTPLUG_CPU | ||
972 | case CPU_DEAD: | 965 | case CPU_DEAD: |
973 | remove_palinfo_proc_entries(hotcpu); | 966 | remove_palinfo_proc_entries(hotcpu); |
974 | break; | 967 | break; |
975 | #endif | ||
976 | } | 968 | } |
977 | return NOTIFY_OK; | 969 | return NOTIFY_OK; |
978 | } | 970 | } |
979 | 971 | ||
980 | static struct notifier_block __cpuinitdata palinfo_cpu_notifier = | 972 | static struct notifier_block palinfo_cpu_notifier = |
981 | { | 973 | { |
982 | .notifier_call = palinfo_cpu_callback, | 974 | .notifier_call = palinfo_cpu_callback, |
983 | .priority = 0, | 975 | .priority = 0, |
984 | }; | 976 | }; |
977 | #endif | ||
985 | 978 | ||
986 | static int __init | 979 | static int __init |
987 | palinfo_init(void) | 980 | palinfo_init(void) |
@@ -1020,7 +1013,7 @@ palinfo_exit(void) | |||
1020 | /* | 1013 | /* |
1021 | * Unregister from cpu notifier callbacks | 1014 | * Unregister from cpu notifier callbacks |
1022 | */ | 1015 | */ |
1023 | unregister_cpu_notifier(&palinfo_cpu_notifier); | 1016 | unregister_hotcpu_notifier(&palinfo_cpu_notifier); |
1024 | } | 1017 | } |
1025 | 1018 | ||
1026 | module_init(palinfo_init); | 1019 | module_init(palinfo_init); |