Kernel Preemption patch

4 messages, 3 authors, 2003-02-23 · open the first message on its own page

Kernel Preemption patch

From: <hidden>
Date: 2003-02-23 22:28:22

Hello,

Has anyone successfully applied and run the linux kernel preemption patch on
a 2.4.20 kernel. I have the following:

- Latest Denx kernel (2_4_devel) running on 440GP ebony
- 'preempt-kernel-rml-2.4.20-1.patch' applied to my kernel source
  (I manually corrected a couple of fails and double checked a few
   'successfully applied with fuzz' instances when applying the patch).
- Kernel compiled with 'Kernel preemption =y' in make oldconfig

When I try to boot this kernel, I get the following error:

<------- snipped
Kernel command line: root=/dev/nfs rw
nfsroot=172.16.77.152:/opt/eldk/ppc_4xx
ip=172.16.77.155:172.16.77.152::255.255.255.0:EBONY-2::off
kernel BUG at irq.c:575!
Oops: Exception in kernel mode, sig: 4
NIP: C0002B04 XER: 00000000 LR: C0002B04 SP: C0125F50 REGS: c0125ea0 TRAP:
0700    Not tainted
MSR: 00001030 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 11
TASK = c0124060[0] 'swapper' Last syscall: 0
last math 00000000 last altivec 00000000
PLB0: bear= 0x00008000 acr=   0x9b000000 besr=  0x00000000

GPR00: C0002B04 C0125F50 C0124060 00000019 00001030 00000001 00000020
C0170000
GPR08: 000001D8 00000002 00000000 C0125E70 C012A8A8 71000000 07FE7300
007FFC73
GPR16: 00000000 00000001 007FFC00 FFFFFFFF 00001032 C0125F60 00000000
C00017CC
GPR24: C0002AA0 007FFB90 00000E00 007FFC73 007FFC00 00000000 00000000
007FFB90
Call backtrace:
C0002B04 C00017CC C0133504 C0000224
Kernel panic: Attempted to kill the idle task!
In idle task - not syncing
 <0>Rebooting in 180 seconds..
---------> the end

-- Brian

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

RE: Kernel Preemption patch

From: Allen Curtis <hidden>
Date: 2003-02-23 22:33:55

Has anyone successfully applied and run the linux kernel
preemption patch on
a 2.4.20 kernel. I have the following:

- Latest Denx kernel (2_4_devel) running on 440GP ebony
- 'preempt-kernel-rml-2.4.20-1.patch' applied to my kernel source
  (I manually corrected a couple of fails and double checked a few
   'successfully applied with fuzz' instances when applying the patch).
- Kernel compiled with 'Kernel preemption =y' in make oldconfig
Yes, but didn't you get any compile errors? There are some missing brackets,
etc. to fix. Check the attached message from this list.

Re: Kernel Preemption patch

From: Eugene Surovegin <hidden>
Date: 2003-02-23 22:54:20

At 02:28 PM 2/23/2003, brian.auld@adic.com wrote:
Hello,

Has anyone successfully applied and run the linux kernel preemption patch on
a 2.4.20 kernel. I have the following:

- Latest Denx kernel (2_4_devel) running on 440GP ebony
- 'preempt-kernel-rml-2.4.20-1.patch' applied to my kernel source
  (I manually corrected a couple of fails and double checked a few
   'successfully applied with fuzz' instances when applying the patch).
- Kernel compiled with 'Kernel preemption =y' in make oldconfig

When I try to boot this kernel, I get the following error:

<------- snipped
Kernel command line: root=/dev/nfs rw
nfsroot=172.16.77.152:/opt/eldk/ppc_4xx
ip=172.16.77.155:172.16.77.152::255.255.255.0:EBONY-2::off
kernel BUG at irq.c:575!
Oops: Exception in kernel mode, sig: 4
NIP: C0002B04 XER: 00000000 LR: C0002B04 SP: C0125F50 REGS: c0125ea0 TRAP:
0700    Not tainted
MSR: 00001030 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 11
TASK = c0124060[0] 'swapper' Last syscall: 0
last math 00000000 last altivec 00000000
PLB0: bear= 0x00008000 acr=   0x9b000000 besr=  0x00000000

GPR00: C0002B04 C0125F50 C0124060 00000019 00001030 00000001 00000020
C0170000
GPR08: 000001D8 00000002 00000000 C0125E70 C012A8A8 71000000 07FE7300
007FFC73
GPR16: 00000000 00000001 007FFC00 FFFFFFFF 00001032 C0125F60 00000000
C00017CC
GPR24: C0002AA0 007FFB90 00000E00 007FFC73 007FFC00 00000000 00000000
007FFB90
Call backtrace:
C0002B04 C00017CC C0133504 C0000224
Kernel panic: Attempted to kill the idle task!
In idle task - not syncing
 <0>Rebooting in 180 seconds..
RML patches doesn't support 2_4_devel tree very well (and especially PPC440).

If irq.c:575 correspond to preempt_intercept function in your tree, it
should look like:

#ifdef CONFIG_PREEMPT
int
preempt_intercept(struct pt_regs *regs)
{
         int ret;

         preempt_disable();

         switch(regs->trap) {
         case 0x500:
                 ret = do_IRQ(regs);
                 break;
#if !defined(CONFIG_4xx) || defined(CONFIG_440)
         case 0x900:
#else
         case 0x1000:
#endif
                 ret = timer_interrupt(regs);
                 break;
         default:
                 BUG();
         }

         preempt_enable_no_resched();
         return ret;
}
#endif /* CONFIG_PREEMPT */


Please, note additional "defined(CONFIG_440)"

Eugene


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

Re: Kernel Preemption patch

From: Eugene Surovegin <hidden>
Date: 2003-02-23 23:05:12

At 02:28 PM 2/23/2003, brian.auld@adic.com wrote:
Has anyone successfully applied and run the linux kernel preemption patch on
a 2.4.20 kernel. I have the following:

- Latest Denx kernel (2_4_devel) running on 440GP ebony
- 'preempt-kernel-rml-2.4.20-1.patch' applied to my kernel source
  (I manually corrected a couple of fails and double checked a few
   'successfully applied with fuzz' instances when applying the patch).
Please, search mailing list archives.
There was some discussion about RML patches about a month ago.

In particular, there were some bugs/typos in PPC part.
Also I had problems on 440GP, and corrected them by using MVL 2.1 tree, not
RML patches.

Eugene.


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help