1 #include <linux/sched.h>
2 #include <linux/interrupt.h>
4 unsigned int spinlocks
[32];
6 static void show_stack(unsigned int *stack
)
10 for (i
= 0; i
< 40; i
++) {
11 extern int get_options
, __start_fixup
;
12 unsigned int p
= stack
[i
];
13 if (p
>= (unsigned int) &get_options
&& p
< (unsigned int)&__start_fixup
)
14 printk("[<%08x>] ", p
);
18 void __putlock_negative(
22 unsigned int from_where
)
26 spinlocks
[current
->processor
] = 0;
30 printk("negative putlock from %x\n", from_where
);
35 void __check_locks(unsigned int type
)
37 static int warned
= 0;
40 unsigned int from_where
= (&type
)[-1];
41 unsigned int this_cpu
= current
->processor
;
47 if (!(flags
& 0x200) || (global_irq_holder
== this_cpu
))
51 if (spinlocks
[this_cpu
] ||
52 local_irq_count
[this_cpu
] ||
53 local_bh_count
[this_cpu
] ||
56 printk("scheduling with spinlocks=%d at %x\n", spinlocks
[this_cpu
], from_where
);