diff options
Diffstat (limited to 'arch/ia64/sn')
-rw-r--r-- | arch/ia64/sn/kernel/mca.c | 5 | ||||
-rw-r--r-- | arch/ia64/sn/kernel/setup.c | 54 | ||||
-rw-r--r-- | arch/ia64/sn/kernel/sn2/sn_hwperf.c | 5 |
3 files changed, 34 insertions, 30 deletions
diff --git a/arch/ia64/sn/kernel/mca.c b/arch/ia64/sn/kernel/mca.c index 9ab684d1bb55..3db62f24596c 100644 --- a/arch/ia64/sn/kernel/mca.c +++ b/arch/ia64/sn/kernel/mca.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. | 6 | * Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
@@ -137,7 +137,8 @@ int sn_salinfo_platform_oemdata(const u8 *sect_header, u8 **oemdata, u64 *oemdat | |||
137 | 137 | ||
138 | static int __init sn_salinfo_init(void) | 138 | static int __init sn_salinfo_init(void) |
139 | { | 139 | { |
140 | salinfo_platform_oemdata = &sn_salinfo_platform_oemdata; | 140 | if (ia64_platform_is("sn2")) |
141 | salinfo_platform_oemdata = &sn_salinfo_platform_oemdata; | ||
141 | return 0; | 142 | return 0; |
142 | } | 143 | } |
143 | 144 | ||
diff --git a/arch/ia64/sn/kernel/setup.c b/arch/ia64/sn/kernel/setup.c index ee36bff93c30..48645ac120fc 100644 --- a/arch/ia64/sn/kernel/setup.c +++ b/arch/ia64/sn/kernel/setup.c | |||
@@ -67,6 +67,7 @@ extern unsigned long last_time_offset; | |||
67 | extern void (*ia64_mark_idle) (int); | 67 | extern void (*ia64_mark_idle) (int); |
68 | extern void snidle(int); | 68 | extern void snidle(int); |
69 | extern unsigned char acpi_kbd_controller_present; | 69 | extern unsigned char acpi_kbd_controller_present; |
70 | extern unsigned long long (*ia64_printk_clock)(void); | ||
70 | 71 | ||
71 | unsigned long sn_rtc_cycles_per_second; | 72 | unsigned long sn_rtc_cycles_per_second; |
72 | EXPORT_SYMBOL(sn_rtc_cycles_per_second); | 73 | EXPORT_SYMBOL(sn_rtc_cycles_per_second); |
@@ -125,20 +126,6 @@ struct screen_info sn_screen_info = { | |||
125 | }; | 126 | }; |
126 | 127 | ||
127 | /* | 128 | /* |
128 | * This is here so we can use the CMOS detection in ide-probe.c to | ||
129 | * determine what drives are present. In theory, we don't need this | ||
130 | * as the auto-detection could be done via ide-probe.c:do_probe() but | ||
131 | * in practice that would be much slower, which is painful when | ||
132 | * running in the simulator. Note that passing zeroes in DRIVE_INFO | ||
133 | * is sufficient (the IDE driver will autodetect the drive geometry). | ||
134 | */ | ||
135 | #ifdef CONFIG_IA64_GENERIC | ||
136 | extern char drive_info[4 * 16]; | ||
137 | #else | ||
138 | char drive_info[4 * 16]; | ||
139 | #endif | ||
140 | |||
141 | /* | ||
142 | * This routine can only be used during init, since | 129 | * This routine can only be used during init, since |
143 | * smp_boot_data is an init data structure. | 130 | * smp_boot_data is an init data structure. |
144 | * We have to use smp_boot_data.cpu_phys_id to find | 131 | * We have to use smp_boot_data.cpu_phys_id to find |
@@ -372,6 +359,16 @@ sn_scan_pcdp(void) | |||
372 | } | 359 | } |
373 | } | 360 | } |
374 | 361 | ||
362 | static unsigned long sn2_rtc_initial; | ||
363 | |||
364 | static unsigned long long ia64_sn2_printk_clock(void) | ||
365 | { | ||
366 | unsigned long rtc_now = rtc_time(); | ||
367 | |||
368 | return (rtc_now - sn2_rtc_initial) * | ||
369 | (1000000000 / sn_rtc_cycles_per_second); | ||
370 | } | ||
371 | |||
375 | /** | 372 | /** |
376 | * sn_setup - SN platform setup routine | 373 | * sn_setup - SN platform setup routine |
377 | * @cmdline_p: kernel command line | 374 | * @cmdline_p: kernel command line |
@@ -386,6 +383,7 @@ void __init sn_setup(char **cmdline_p) | |||
386 | u32 version = sn_sal_rev(); | 383 | u32 version = sn_sal_rev(); |
387 | extern void sn_cpu_init(void); | 384 | extern void sn_cpu_init(void); |
388 | 385 | ||
386 | sn2_rtc_initial = rtc_time(); | ||
389 | ia64_sn_plat_set_error_handling_features(); // obsolete | 387 | ia64_sn_plat_set_error_handling_features(); // obsolete |
390 | ia64_sn_set_os_feature(OSF_MCA_SLV_TO_OS_INIT_SLV); | 388 | ia64_sn_set_os_feature(OSF_MCA_SLV_TO_OS_INIT_SLV); |
391 | ia64_sn_set_os_feature(OSF_FEAT_LOG_SBES); | 389 | ia64_sn_set_os_feature(OSF_FEAT_LOG_SBES); |
@@ -437,19 +435,6 @@ void __init sn_setup(char **cmdline_p) | |||
437 | */ | 435 | */ |
438 | build_cnode_tables(); | 436 | build_cnode_tables(); |
439 | 437 | ||
440 | /* | ||
441 | * Old PROMs do not provide an ACPI FADT. Disable legacy keyboard | ||
442 | * support here so we don't have to listen to failed keyboard probe | ||
443 | * messages. | ||
444 | */ | ||
445 | if (version <= 0x0209 && acpi_kbd_controller_present) { | ||
446 | printk(KERN_INFO "Disabling legacy keyboard support as prom " | ||
447 | "is too old and doesn't provide FADT\n"); | ||
448 | acpi_kbd_controller_present = 0; | ||
449 | } | ||
450 | |||
451 | printk("SGI SAL version %x.%02x\n", version >> 8, version & 0x00FF); | ||
452 | |||
453 | status = | 438 | status = |
454 | ia64_sal_freq_base(SAL_FREQ_BASE_REALTIME_CLOCK, &ticks_per_sec, | 439 | ia64_sal_freq_base(SAL_FREQ_BASE_REALTIME_CLOCK, &ticks_per_sec, |
455 | &drift); | 440 | &drift); |
@@ -463,6 +448,21 @@ void __init sn_setup(char **cmdline_p) | |||
463 | 448 | ||
464 | platform_intr_list[ACPI_INTERRUPT_CPEI] = IA64_CPE_VECTOR; | 449 | platform_intr_list[ACPI_INTERRUPT_CPEI] = IA64_CPE_VECTOR; |
465 | 450 | ||
451 | ia64_printk_clock = ia64_sn2_printk_clock; | ||
452 | |||
453 | /* | ||
454 | * Old PROMs do not provide an ACPI FADT. Disable legacy keyboard | ||
455 | * support here so we don't have to listen to failed keyboard probe | ||
456 | * messages. | ||
457 | */ | ||
458 | if (version <= 0x0209 && acpi_kbd_controller_present) { | ||
459 | printk(KERN_INFO "Disabling legacy keyboard support as prom " | ||
460 | "is too old and doesn't provide FADT\n"); | ||
461 | acpi_kbd_controller_present = 0; | ||
462 | } | ||
463 | |||
464 | printk("SGI SAL version %x.%02x\n", version >> 8, version & 0x00FF); | ||
465 | |||
466 | /* | 466 | /* |
467 | * we set the default root device to /dev/hda | 467 | * we set the default root device to /dev/hda |
468 | * to make simulation easy | 468 | * to make simulation easy |
diff --git a/arch/ia64/sn/kernel/sn2/sn_hwperf.c b/arch/ia64/sn/kernel/sn2/sn_hwperf.c index 19b54fbcd7ea..70db21f3df21 100644 --- a/arch/ia64/sn/kernel/sn2/sn_hwperf.c +++ b/arch/ia64/sn/kernel/sn2/sn_hwperf.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 2004-2005 Silicon Graphics, Inc. All rights reserved. | 6 | * Copyright (C) 2004-2006 Silicon Graphics, Inc. All rights reserved. |
7 | * | 7 | * |
8 | * SGI Altix topology and hardware performance monitoring API. | 8 | * SGI Altix topology and hardware performance monitoring API. |
9 | * Mark Goodwin <markgw@sgi.com>. | 9 | * Mark Goodwin <markgw@sgi.com>. |
@@ -973,6 +973,9 @@ static int __devinit sn_hwperf_misc_register_init(void) | |||
973 | { | 973 | { |
974 | int e; | 974 | int e; |
975 | 975 | ||
976 | if (!ia64_platform_is("sn2")) | ||
977 | return 0; | ||
978 | |||
976 | sn_hwperf_init(); | 979 | sn_hwperf_init(); |
977 | 980 | ||
978 | /* | 981 | /* |