[parisc-linux-cvs] linux-2.5 willy
Matthew Wilcox
willy@debian.org
Mon, 22 Jul 2002 16:57:09 +0100
On Mon, Jul 22, 2002 at 09:55:29AM -0600, Matthew Wilcox wrote:
> Log message:
> switch from cli()/sti() to using the right spinlock.
> also fix a bug where we were reporting one thread too few.
diff -u -p -r1.2 sys_parisc32.c
--- arch/parisc/kernel/sys_parisc32.c 22 Jul 2002 05:05:50 -0000 1.2
+++ arch/parisc/kernel/sys_parisc32.c 22 Jul 2002 15:54:08 -0000
@@ -3017,15 +3017,15 @@ asmlinkage int sys32_sysinfo(struct sysi
* struct to userspace once element at a time.
*/
- cli();
+ read_lock_irq(&xtime_lock);
val.uptime = jiffies / HZ;
val.loads[0] = avenrun[0] << (SI_LOAD_SHIFT - FSHIFT);
val.loads[1] = avenrun[1] << (SI_LOAD_SHIFT - FSHIFT);
val.loads[2] = avenrun[2] << (SI_LOAD_SHIFT - FSHIFT);
- val.procs = nr_threads-1;
- sti();
+ val.procs = nr_threads;
+ read_unlock_irq(&xtime_lock);
si_meminfo(&val);
si_swapinfo(&val);
--
Revolutions do not require corporate support.