summaryrefslogtreecommitdiffstats
path: root/arch/sparc/prom/devops.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/devops.c
parent19c9bba94152148523ba0f7ef7cffe3d45656b11 (diff)
Initial revision
Diffstat (limited to 'arch/sparc/prom/devops.c')
-rw-r--r--arch/sparc/prom/devops.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/arch/sparc/prom/devops.c b/arch/sparc/prom/devops.c
index 2b33dd2b7..f7feb0815 100644
--- a/arch/sparc/prom/devops.c
+++ b/arch/sparc/prom/devops.c
@@ -1,4 +1,4 @@
-/* $Id: devops.c,v 1.7 1997/03/18 17:58:19 jj Exp $
+/* $Id: devops.c,v 1.10 1997/05/14 20:44:59 davem Exp $
* devops.c: Device operations using the PROM.
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
@@ -10,6 +10,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];
+
/* Open the device described by the string 'dstr'. Returns the handle
* to that device used for subsequent operations on that device.
* Returns -1 on failure.
@@ -35,7 +38,7 @@ prom_devopen(char *dstr)
break;
};
__asm__ __volatile__("ld [%0], %%g6\n\t" : :
- "r" (&current_set[smp_processor_id()]) :
+ "r" (&current_set[hard_smp_processor_id()]) :
"memory");
restore_flags(flags);
@@ -57,10 +60,11 @@ prom_devclose(int dhandle)
(*(romvec->pv_v2devops.v2_dev_close))(dhandle);
break;
case PROM_AP1000:
+ default:
break;
};
__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 0;
@@ -83,10 +87,11 @@ prom_seek(int dhandle, unsigned int seekhi, unsigned int seeklo)
(*(romvec->pv_v2devops.v2_dev_seek))(dhandle, seekhi, seeklo);
break;
case PROM_AP1000:
+ default:
break;
};
__asm__ __volatile__("ld [%0], %%g6\n\t" : :
- "r" (&current_set[smp_processor_id()]) :
+ "r" (&current_set[hard_smp_processor_id()]) :
"memory");
restore_flags(flags);