patch-2.1.97 linux/arch/sparc/prom/devops.c
Next file: linux/arch/sparc/prom/init.c
Previous file: linux/arch/sparc/prom/devmap.c
Back to the patch index
Back to the overall index
- Lines: 49
- Date:
Tue Apr 14 17:44:20 1998
- Orig file:
v2.1.96/linux/arch/sparc/prom/devops.c
- Orig date:
Thu May 15 16:48:02 1997
diff -u --recursive --new-file v2.1.96/linux/arch/sparc/prom/devops.c linux/arch/sparc/prom/devops.c
@@ -1,4 +1,4 @@
-/* $Id: devops.c,v 1.10 1997/05/14 20:44:59 davem Exp $
+/* $Id: devops.c,v 1.11 1998/03/09 14:04:24 jj Exp $
* devops.c: Device operations using the PROM.
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
@@ -10,8 +10,7 @@
#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];
+extern void restore_current(void);
/* Open the device described by the string 'dstr'. Returns the handle
* to that device used for subsequent operations on that device.
@@ -37,9 +36,7 @@
handle = -1;
break;
};
- __asm__ __volatile__("ld [%0], %%g6\n\t" : :
- "r" (¤t_set[hard_smp_processor_id()]) :
- "memory");
+ restore_current();
restore_flags(flags);
return handle;
@@ -63,9 +60,7 @@
default:
break;
};
- __asm__ __volatile__("ld [%0], %%g6\n\t" : :
- "r" (¤t_set[hard_smp_processor_id()]) :
- "memory");
+ restore_current();
restore_flags(flags);
return 0;
}
@@ -90,9 +85,7 @@
default:
break;
};
- __asm__ __volatile__("ld [%0], %%g6\n\t" : :
- "r" (¤t_set[hard_smp_processor_id()]) :
- "memory");
+ restore_current();
restore_flags(flags);
return;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov