[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [microblaze-uclinux] BUG: scheduling while atomic: (Kernel 2.6)
Hi again,
Yeoh Chun Yeow wrote:
After patching the entry.S, I don't see thje BUG: scheduling problem in
my compiled kernel (without CONFIG_PREEMPT). However, the ping results
contain "ping: recvfrom: Invalid argument". Any ideas?
Can you please try the attached patch?
Thanks,
John
Index: linux-2.6.x/arch/microblaze/kernel/setup.c
===================================================================
--- linux-2.6.x/arch/microblaze/kernel/setup.c (revision 2733)
+++ linux-2.6.x/arch/microblaze/kernel/setup.c (working copy)
@@ -35,7 +35,6 @@
DEFINE_PER_CPU(unsigned int, ENTRY_SP); /* Saved SP on kernel entry */
DEFINE_PER_CPU(unsigned int, R11_SAVE); /* Temp variable for entry */
DEFINE_PER_CPU(unsigned int, CURRENT_SAVE); /* Saved current pointer */
-DEFINE_PER_CPU(unsigned int, SYSCALL_SAVE); /* Saved syscall number */
extern void early_printk(const char *fmt, ...);
extern void irq_early_init(void);
@@ -150,7 +149,6 @@
per_cpu(CURRENT_SAVE,0) = (unsigned long)current;
/*!!!!!!!!!! These two shall be removed in release !!!!!!!!!!!*/
- per_cpu(SYSCALL_SAVE,0) = 0x0;
//*((unsigned long *)0x74) = 0x0; /* debug */
irq_early_init();
Index: linux-2.6.x/arch/microblaze/kernel/signal.c
===================================================================
--- linux-2.6.x/arch/microblaze/kernel/signal.c (revision 2739)
+++ linux-2.6.x/arch/microblaze/kernel/signal.c (working copy)
@@ -455,7 +455,6 @@
/* fallthrough */
case -ERESTARTNOINTR:
do_restart:
- regs->r12 = get_cpu_var(SYSCALL_SAVE);
/* offset of 4 bytes to re-execute trap (brki) instruction */
regs->pc -= 4;
break;
Index: linux-2.6.x/arch/microblaze/kernel/entry.S
===================================================================
--- linux-2.6.x/arch/microblaze/kernel/entry.S (revision 3031)
+++ linux-2.6.x/arch/microblaze/kernel/entry.S (working copy)
@@ -197,7 +197,6 @@
bri 0
ENTRY(_user_exception)
- swi r12, r0, PER_CPU(SYSCALL_SAVE) /* sys num */
swi r1, r0, PER_CPU(ENTRY_SP) /* save the current sp */
swi r11, r0, PER_CPU(R11_SAVE) /* temporarily save r11 */
lwi r11, r0, PER_CPU(KM) /* load mode indicator */
@@ -557,7 +556,6 @@
addk r7, r1, r0
sys_execve_wrapper:
- swi r1, r0, PER_CPU(SYSCALL_SAVE)
brid sys_execve
addk r8, r1, r0