diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-08 20:06:51 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-08 20:06:51 -0500 |
commit | 0bdd340c092b0936f78a54bdbd3927463ed4fca3 (patch) | |
tree | d9215d382cdc4c2dc6366a2c551079590e8b8216 /arch | |
parent | 9908104935325bd6beba67d637b6f5396d47075c (diff) | |
parent | f478af9dc58c01880832a321c3eea7703772c420 (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Diffstat (limited to 'arch')
-rw-r--r-- | arch/ia64/kernel/efi.c | 16 | ||||
-rw-r--r-- | arch/ia64/kernel/head.S | 1 | ||||
-rw-r--r-- | arch/ia64/kernel/setup.c | 4 | ||||
-rw-r--r-- | arch/ia64/kernel/time.c | 27 | ||||
-rw-r--r-- | arch/ia64/sn/kernel/mca.c | 5 | ||||
-rw-r--r-- | arch/ia64/sn/kernel/setup.c | 40 | ||||
-rw-r--r-- | arch/ia64/sn/kernel/sn2/sn_hwperf.c | 5 |
7 files changed, 70 insertions, 28 deletions
diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c index c485a3b32ba8..9990320b6f9a 100644 --- a/arch/ia64/kernel/efi.c +++ b/arch/ia64/kernel/efi.c | |||
@@ -410,24 +410,16 @@ efi_init (void) | |||
410 | efi_config_table_t *config_tables; | 410 | efi_config_table_t *config_tables; |
411 | efi_char16_t *c16; | 411 | efi_char16_t *c16; |
412 | u64 efi_desc_size; | 412 | u64 efi_desc_size; |
413 | char *cp, *end, vendor[100] = "unknown"; | 413 | char *cp, vendor[100] = "unknown"; |
414 | extern char saved_command_line[]; | 414 | extern char saved_command_line[]; |
415 | int i; | 415 | int i; |
416 | 416 | ||
417 | /* it's too early to be able to use the standard kernel command line support... */ | 417 | /* it's too early to be able to use the standard kernel command line support... */ |
418 | for (cp = saved_command_line; *cp; ) { | 418 | for (cp = saved_command_line; *cp; ) { |
419 | if (memcmp(cp, "mem=", 4) == 0) { | 419 | if (memcmp(cp, "mem=", 4) == 0) { |
420 | cp += 4; | 420 | mem_limit = memparse(cp + 4, &cp); |
421 | mem_limit = memparse(cp, &end); | ||
422 | if (end != cp) | ||
423 | break; | ||
424 | cp = end; | ||
425 | } else if (memcmp(cp, "max_addr=", 9) == 0) { | 421 | } else if (memcmp(cp, "max_addr=", 9) == 0) { |
426 | cp += 9; | 422 | max_addr = GRANULEROUNDDOWN(memparse(cp + 9, &cp)); |
427 | max_addr = GRANULEROUNDDOWN(memparse(cp, &end)); | ||
428 | if (end != cp) | ||
429 | break; | ||
430 | cp = end; | ||
431 | } else { | 423 | } else { |
432 | while (*cp != ' ' && *cp) | 424 | while (*cp != ' ' && *cp) |
433 | ++cp; | 425 | ++cp; |
@@ -458,7 +450,7 @@ efi_init (void) | |||
458 | /* Show what we know for posterity */ | 450 | /* Show what we know for posterity */ |
459 | c16 = __va(efi.systab->fw_vendor); | 451 | c16 = __va(efi.systab->fw_vendor); |
460 | if (c16) { | 452 | if (c16) { |
461 | for (i = 0;i < (int) sizeof(vendor) && *c16; ++i) | 453 | for (i = 0;i < (int) sizeof(vendor) - 1 && *c16; ++i) |
462 | vendor[i] = *c16++; | 454 | vendor[i] = *c16++; |
463 | vendor[i] = '\0'; | 455 | vendor[i] = '\0'; |
464 | } | 456 | } |
diff --git a/arch/ia64/kernel/head.S b/arch/ia64/kernel/head.S index fbc7ea35dd57..f1778a84ea61 100644 --- a/arch/ia64/kernel/head.S +++ b/arch/ia64/kernel/head.S | |||
@@ -352,6 +352,7 @@ start_ap: | |||
352 | mov ar.rsc=0 // place RSE in enforced lazy mode | 352 | mov ar.rsc=0 // place RSE in enforced lazy mode |
353 | ;; | 353 | ;; |
354 | loadrs // clear the dirty partition | 354 | loadrs // clear the dirty partition |
355 | mov IA64_KR(PER_CPU_DATA)=r0 // clear physical per-CPU base | ||
355 | ;; | 356 | ;; |
356 | mov ar.bspstore=r2 // establish the new RSE stack | 357 | mov ar.bspstore=r2 // establish the new RSE stack |
357 | ;; | 358 | ;; |
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c index c0766575a3a2..35f7835294a3 100644 --- a/arch/ia64/kernel/setup.c +++ b/arch/ia64/kernel/setup.c | |||
@@ -71,6 +71,8 @@ unsigned long __per_cpu_offset[NR_CPUS]; | |||
71 | EXPORT_SYMBOL(__per_cpu_offset); | 71 | EXPORT_SYMBOL(__per_cpu_offset); |
72 | #endif | 72 | #endif |
73 | 73 | ||
74 | extern void ia64_setup_printk_clock(void); | ||
75 | |||
74 | DEFINE_PER_CPU(struct cpuinfo_ia64, cpu_info); | 76 | DEFINE_PER_CPU(struct cpuinfo_ia64, cpu_info); |
75 | DEFINE_PER_CPU(unsigned long, local_per_cpu_offset); | 77 | DEFINE_PER_CPU(unsigned long, local_per_cpu_offset); |
76 | DEFINE_PER_CPU(unsigned long, ia64_phys_stacked_size_p8); | 78 | DEFINE_PER_CPU(unsigned long, ia64_phys_stacked_size_p8); |
@@ -445,6 +447,8 @@ setup_arch (char **cmdline_p) | |||
445 | /* process SAL system table: */ | 447 | /* process SAL system table: */ |
446 | ia64_sal_init(efi.sal_systab); | 448 | ia64_sal_init(efi.sal_systab); |
447 | 449 | ||
450 | ia64_setup_printk_clock(); | ||
451 | |||
448 | #ifdef CONFIG_SMP | 452 | #ifdef CONFIG_SMP |
449 | cpu_physical_id(0) = hard_smp_processor_id(); | 453 | cpu_physical_id(0) = hard_smp_processor_id(); |
450 | 454 | ||
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c index 028a2b95936c..a094ec49ccfa 100644 --- a/arch/ia64/kernel/time.c +++ b/arch/ia64/kernel/time.c | |||
@@ -278,3 +278,30 @@ udelay (unsigned long usecs) | |||
278 | } | 278 | } |
279 | } | 279 | } |
280 | EXPORT_SYMBOL(udelay); | 280 | EXPORT_SYMBOL(udelay); |
281 | |||
282 | static unsigned long long ia64_itc_printk_clock(void) | ||
283 | { | ||
284 | if (ia64_get_kr(IA64_KR_PER_CPU_DATA)) | ||
285 | return sched_clock(); | ||
286 | return 0; | ||
287 | } | ||
288 | |||
289 | static unsigned long long ia64_default_printk_clock(void) | ||
290 | { | ||
291 | return (unsigned long long)(jiffies_64 - INITIAL_JIFFIES) * | ||
292 | (1000000000/HZ); | ||
293 | } | ||
294 | |||
295 | unsigned long long (*ia64_printk_clock)(void) = &ia64_default_printk_clock; | ||
296 | |||
297 | unsigned long long printk_clock(void) | ||
298 | { | ||
299 | return ia64_printk_clock(); | ||
300 | } | ||
301 | |||
302 | void __init | ||
303 | ia64_setup_printk_clock(void) | ||
304 | { | ||
305 | if (!(sal_platform_features & IA64_SAL_PLATFORM_FEATURE_ITC_DRIFT)) | ||
306 | ia64_printk_clock = ia64_itc_printk_clock; | ||
307 | } | ||
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 aac1ba32c5e5..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); |
@@ -358,6 +359,16 @@ sn_scan_pcdp(void) | |||
358 | } | 359 | } |
359 | } | 360 | } |
360 | 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 | |||
361 | /** | 372 | /** |
362 | * sn_setup - SN platform setup routine | 373 | * sn_setup - SN platform setup routine |
363 | * @cmdline_p: kernel command line | 374 | * @cmdline_p: kernel command line |
@@ -372,6 +383,7 @@ void __init sn_setup(char **cmdline_p) | |||
372 | u32 version = sn_sal_rev(); | 383 | u32 version = sn_sal_rev(); |
373 | extern void sn_cpu_init(void); | 384 | extern void sn_cpu_init(void); |
374 | 385 | ||
386 | sn2_rtc_initial = rtc_time(); | ||
375 | ia64_sn_plat_set_error_handling_features(); // obsolete | 387 | ia64_sn_plat_set_error_handling_features(); // obsolete |
376 | 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); |
377 | ia64_sn_set_os_feature(OSF_FEAT_LOG_SBES); | 389 | ia64_sn_set_os_feature(OSF_FEAT_LOG_SBES); |
@@ -423,19 +435,6 @@ void __init sn_setup(char **cmdline_p) | |||
423 | */ | 435 | */ |
424 | build_cnode_tables(); | 436 | build_cnode_tables(); |
425 | 437 | ||
426 | /* | ||
427 | * Old PROMs do not provide an ACPI FADT. Disable legacy keyboard | ||
428 | * support here so we don't have to listen to failed keyboard probe | ||
429 | * messages. | ||
430 | */ | ||
431 | if (version <= 0x0209 && acpi_kbd_controller_present) { | ||
432 | printk(KERN_INFO "Disabling legacy keyboard support as prom " | ||
433 | "is too old and doesn't provide FADT\n"); | ||
434 | acpi_kbd_controller_present = 0; | ||
435 | } | ||
436 | |||
437 | printk("SGI SAL version %x.%02x\n", version >> 8, version & 0x00FF); | ||
438 | |||
439 | status = | 438 | status = |
440 | 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, |
441 | &drift); | 440 | &drift); |
@@ -449,6 +448,21 @@ void __init sn_setup(char **cmdline_p) | |||
449 | 448 | ||
450 | platform_intr_list[ACPI_INTERRUPT_CPEI] = IA64_CPE_VECTOR; | 449 | platform_intr_list[ACPI_INTERRUPT_CPEI] = IA64_CPE_VECTOR; |
451 | 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 | |||
452 | /* | 466 | /* |
453 | * we set the default root device to /dev/hda | 467 | * we set the default root device to /dev/hda |
454 | * 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 | /* |