linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Eugene Surovegin <ebs@innocent.com>
To: "Joakim Tjernlund" <Joakim.Tjernlund@lumentis.se>
Cc: <linuxppc-dev@lists.linuxppc.org>
Subject: Re: Is the preemptive kernel patch unsafe for 8xx/PPC?
Date: Thu, 12 Dec 2002 22:09:48 -0800	[thread overview]
Message-ID: <5.1.0.14.2.20021212214102.02bf1338@mail.attbi.com> (raw)
In-Reply-To: <001901c2a21d$f3f4e760$0200a8c0@jockeXP>


Joakim,

At 12:35 PM 12/12/2002, you wrote:
>Was that the 2.4.19-2 patch? What were the bugs and have you fixed them?

I had the following issues with 2.4.19-2 (2.4.20-1 is identical in this
regard):

1) arch/ppc/kernel.entry.S

diff -urN linux-2.4.20/arch/ppc/kernel/entry.S linux/arch/ppc/kernel/entry.S
--- linux-2.4.20/arch/ppc/kernel/entry.S        2002-11-28
18:53:11.000000000 -0500
+++ linux/arch/ppc/kernel/entry.S       2002-12-11 02:34:47.000000000 -0500
@@ -278,6 +278,41 @@
          */
         cmpi    0,r3,0
         beq     restore
+#ifdef CONFIG_PREEMPT
+       lwz     r3,PREEMPT_COUNT(r2)
+       cmpi    0,r3,1
+       bge     ret_from_except
+       lwz     r5,_MSR(r1)
+       andi.   r5,r5,MSR_PR
+       bne     do_signal_ret

     <rest of the diff is skipped>

I had to change the last command to "bne ret_from_except".
I checked MontaVista tree, and they have "ret_from_except" there also.

Without this change trivial code:

   while (true) ;

locked the box completely.

2) include/asm-ppc/pgalloc.h  There are curly brackets missing in
get_pgd_fast()

3) to support 440GP you have to modify arc/ppc/kernel/irc.c:preempt_intercept:

#if !defined(CONFIG_4xx) || defined(CONFIG_440)
         case 0x900:
#else
         case 0x1000:
#endif

With these changes (an maybe some others I forgot to mention here :),
I have pretty stable preemptable kernel (2.4.19, PPC440GP & 405GP, also
with rtsched patch by George Anzinger)

Thanks,


  Eugene Surovegin <mailto:ebs@innocent.com>


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

  parent reply	other threads:[~2002-12-13  6:09 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-06 13:18 Regarding consistent_alloc Pantelis Antoniou
2002-12-06 13:23 ` Pantelis Antoniou
2002-12-06 14:25   ` Joakim Tjernlund
2002-12-06 15:59     ` Matt Porter
2002-12-06 16:08       ` Joakim Tjernlund
2002-12-06 18:30         ` Matt Porter
2002-12-06 18:15           ` Joakim Tjernlund
2002-12-06 18:52             ` Matt Porter
2002-12-06 19:59             ` Dan Malek
2002-12-06 22:11               ` Joakim Tjernlund
2002-12-07  0:16         ` Paul Mackerras
2002-12-07 12:53           ` Joakim Tjernlund
2002-12-07 16:53             ` Dan Malek
2002-12-09  9:06           ` Pantelis Antoniou
2002-12-10 17:49             ` Tom Rini
2002-12-11  3:52               ` acurtis
2002-12-11  8:57                 ` Joakim Tjernlund
2002-12-11  9:58                   ` Pantelis Antoniou
2002-12-11 14:41                     ` acurtis
2002-12-11 15:01                       ` Pantelis Antoniou
2002-12-11 15:36                         ` acurtis
2002-12-12  3:32                       ` Dan Malek
2002-12-11 14:56                     ` Tom Rini
2002-12-11 15:07                       ` Pantelis Antoniou
2002-12-12  3:41                         ` Dan Malek
2002-12-12  8:00                           ` Pantelis Antoniou
2002-12-12  8:18                             ` Wolfgang Denk
2002-12-12  8:37                               ` Pantelis Antoniou
2002-12-12 12:56                                 ` Is the preemptive kernel patch unsafe for 8xx/PPC? Joakim Tjernlund
2002-12-12 18:28                                   ` Eugene Surovegin
2002-12-12 20:35                                     ` Joakim Tjernlund
2002-12-13  4:12                                       ` acurtis
2002-12-13  6:09                                       ` Eugene Surovegin [this message]
2002-12-13  7:47                                         ` Joakim Tjernlund
2002-12-16 14:41                                           ` acurtis
2002-12-13  4:08                                     ` acurtis
2002-12-12 16:53                               ` "Missing" patches (Was: Re: Regarding consistent_alloc) Tom Rini
2002-12-06 16:56       ` Regarding consistent_alloc Dan Malek
2002-12-06 18:29         ` Matt Porter
2002-12-06 19:45           ` Dan Malek
2002-12-07  0:25           ` Paul Mackerras
2002-12-06 15:54 ` Matt Porter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5.1.0.14.2.20021212214102.02bf1338@mail.attbi.com \
    --to=ebs@innocent.com \
    --cc=Joakim.Tjernlund@lumentis.se \
    --cc=linuxppc-dev@lists.linuxppc.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).