diff options
author | David Woodhouse <dwmw2@infradead.org> | 2006-06-26 17:35:44 +0200 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-06-26 17:35:44 +0200 |
commit | 62ed948cb1405fe95d61d8c6445c102e0c9da0a6 (patch) | |
tree | f139adcc861a05e7cc09cdb387a271a652fc2d07 /arch/sparc64/kernel/traps.c | |
parent | [MTD] Initialize 'writesize' (diff) | |
parent | [PATCH] uclinux: use PER_LINUX_32BIT in binfmt_flat (diff) | |
download | linux-62ed948cb1405fe95d61d8c6445c102e0c9da0a6.tar.xz linux-62ed948cb1405fe95d61d8c6445c102e0c9da0a6.zip |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'arch/sparc64/kernel/traps.c')
-rw-r--r-- | arch/sparc64/kernel/traps.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c index 5059cbd4feee..1ff34b019f3f 100644 --- a/arch/sparc64/kernel/traps.c +++ b/arch/sparc64/kernel/traps.c @@ -42,6 +42,7 @@ #ifdef CONFIG_KMOD #include <linux/kmod.h> #endif +#include <asm/prom.h> ATOMIC_NOTIFIER_HEAD(sparc64die_chain); @@ -807,7 +808,8 @@ extern unsigned int cheetah_deferred_trap_vector[], cheetah_deferred_trap_vector void __init cheetah_ecache_flush_init(void) { unsigned long largest_size, smallest_linesize, order, ver; - int node, i, instance; + struct device_node *dp; + int i, instance, sz; /* Scan all cpu device tree nodes, note two values: * 1) largest E-cache size @@ -817,14 +819,14 @@ void __init cheetah_ecache_flush_init(void) smallest_linesize = ~0UL; instance = 0; - while (!cpu_find_by_instance(instance, &node, NULL)) { + while (!cpu_find_by_instance(instance, &dp, NULL)) { unsigned long val; - val = prom_getintdefault(node, "ecache-size", - (2 * 1024 * 1024)); + val = of_getintprop_default(dp, "ecache-size", + (2 * 1024 * 1024)); if (val > largest_size) largest_size = val; - val = prom_getintdefault(node, "ecache-line-size", 64); + val = of_getintprop_default(dp, "ecache-line-size", 64); if (val < smallest_linesize) smallest_linesize = val; instance++; @@ -849,16 +851,16 @@ void __init cheetah_ecache_flush_init(void) } /* Now allocate error trap reporting scoreboard. */ - node = NR_CPUS * (2 * sizeof(struct cheetah_err_info)); + sz = NR_CPUS * (2 * sizeof(struct cheetah_err_info)); for (order = 0; order < MAX_ORDER; order++) { - if ((PAGE_SIZE << order) >= node) + if ((PAGE_SIZE << order) >= sz) break; } cheetah_error_log = (struct cheetah_err_info *) __get_free_pages(GFP_KERNEL, order); if (!cheetah_error_log) { prom_printf("cheetah_ecache_flush_init: Failed to allocate " - "error logging scoreboard (%d bytes).\n", node); + "error logging scoreboard (%d bytes).\n", sz); prom_halt(); } memset(cheetah_error_log, 0, PAGE_SIZE << order); |