summaryrefslogtreecommitdiffstats
path: root/arch/sparc/prom/devops.c
diff options
context:
space:
mode:
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);