summaryrefslogtreecommitdiffstats
path: root/arch/sparc/prom/devmap.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1997-06-01 03:16:17 +0000
committerRalf Baechle <ralf@linux-mips.org>1997-06-01 03:16:17 +0000
commitd8d9b8f76f22b7a16a83e261e64f89ee611f49df (patch)
tree3067bc130b80d52808e6390c9fc7fc087ec1e33c /arch/sparc/prom/devmap.c
parent19c9bba94152148523ba0f7ef7cffe3d45656b11 (diff)
Initial revision
Diffstat (limited to 'arch/sparc/prom/devmap.c')
-rw-r--r--arch/sparc/prom/devmap.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/sparc/prom/devmap.c b/arch/sparc/prom/devmap.c
index 841d63a47..cd99ac3d6 100644
--- a/arch/sparc/prom/devmap.c
+++ b/arch/sparc/prom/devmap.c
@@ -1,4 +1,4 @@
-/* $Id: devmap.c,v 1.3 1996/09/19 20:27:19 davem Exp $
+/* $Id: devmap.c,v 1.5 1997/05/14 20:44:59 davem Exp $
* promdevmap.c: Map device/IO areas to virtual addresses.
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
@@ -11,6 +11,9 @@
#include <asm/openprom.h>
#include <asm/oplib.h>
+/* XXX Let's get rid of this thing if we can... */
+extern struct task_struct *current_set[NR_CPUS];
+
/* Just like the routines in palloc.c, these should not be used
* by the kernel at all. Bootloader facility mainly. And again,
* this is only available on V2 proms and above.
@@ -33,7 +36,7 @@ prom_mapio(char *vhint, int ios, unsigned int paddr, unsigned int num_bytes)
ret = (*(romvec->pv_v2devops.v2_dumb_mmap))(vhint, ios, paddr,
num_bytes);
__asm__ __volatile__("ld [%0], %%g6\n\t" : :
- "r" (&current_set[smp_processor_id()]) :
+ "r" (&current_set[hard_smp_processor_id()]) :
"memory");
restore_flags(flags);
return ret;
@@ -49,7 +52,7 @@ prom_unmapio(char *vaddr, unsigned int num_bytes)
save_flags(flags); cli();
(*(romvec->pv_v2devops.v2_dumb_munmap))(vaddr, num_bytes);
__asm__ __volatile__("ld [%0], %%g6\n\t" : :
- "r" (&current_set[smp_processor_id()]) :
+ "r" (&current_set[hard_smp_processor_id()]) :
"memory");
restore_flags(flags);
return;