aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@sgi.com>2005-01-10 23:49:52 -0800
committerTony Luck <tony.luck@intel.com>2005-01-10 23:49:52 -0800
commit5e2a73373ab4ad14fec0a8a5e2e2c175b10d732d (patch)
treed28627349414adb775b8e05d7937bd91814fd755 /arch
parentf00fb0ec1d7b4bcfcc404e8edef5dcc77ebff0db (diff)
downloadhistory-5e2a73373ab4ad14fec0a8a5e2e2c175b10d732d.tar.gz
[IA64-SGI] fix bogus address dereference in sn/setup.c
Some code in sn/setup.c was trying to dereference a physical address, which usually doesn't work (esp. not with the region register init patch I posted). This patch converts the function used to find the klconfig to return virtual char * instead of a physical address and updates the caller to deal with it. Signed-off-by: Jesse Barnes <jbarnes@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/ia64/sn/kernel/setup.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/ia64/sn/kernel/setup.c b/arch/ia64/sn/kernel/setup.c
index 92171c00fbce34..aa87b33c9d2e67 100644
--- a/arch/ia64/sn/kernel/setup.c
+++ b/arch/ia64/sn/kernel/setup.c
@@ -505,15 +505,15 @@ static void __init scan_for_ionodes(void)
/* Setup ionodes with memory */
for (nasid = 0; nasid < MAX_PHYSNODE_ID; nasid += 2) {
- u64 klgraph_header;
+ char *klgraph_header;
cnodeid_t cnodeid;
if (physical_node_map[nasid] == -1)
continue;
- klgraph_header = cnodeid = -1;
- klgraph_header = ia64_sn_get_klconfig_addr(nasid);
- if (klgraph_header <= 0) {
+ cnodeid = -1;
+ klgraph_header = __va(ia64_sn_get_klconfig_addr(nasid));
+ if (!klgraph_header) {
if (IS_RUNNING_ON_SIMULATOR())
continue;
BUG(); /* All nodes must have klconfig tables! */