Linux PARISC architecture development
 help / color / mirror / Atom feed
From: Ryan Bradetich <rbradetich@uswest.net>
To: parisc-linux@lists.parisc-linux.org
Subject: [parisc-linux] Broken Cache Flushing in arch/parisc/kernel/signal.c.??
Date: 13 Nov 2002 00:44:52 -0700	[thread overview]
Message-ID: <1037173492.9031.7.camel@beavis> (raw)

Hello parisc-linux hackers,

I spent the evening tracking down why the serial mux failed to start
init and I kept getting the cow message on 2.5.47...and why it worked
for 2.5.46-pa7. After re-merging all the cvs commits in the last 4 days,
I finally tracked the problem down to this chunk of code from
arch/parisc/kernel/singal.c:

Index: arch/parisc/kernel/signal.c
===================================================================
RCS file: /var/cvs/linux-2.5/arch/parisc/kernel/signal.c,v
retrieving revision 1.6
diff -u -p -r1.6 signal.c
--- arch/parisc/kernel/signal.c	10 Nov 2002 19:39:16 -0000	1.6
+++ arch/parisc/kernel/signal.c	13 Nov 2002 07:38:58 -0000
@@ -308,8 +308,21 @@ setup_rt_frame(int sig, struct k_sigacti
 	}
 #endif
 
+#if CACHE_FLUSHING_IS_NOT_BROKEN
 	flush_icache_range((unsigned long) &frame->tramp[0],
 			   (unsigned long) &frame->tramp[4]);
+#else
+       /* It should *always* be cache line-aligned, but the compiler
+           sometimes screws up. */
+       asm volatile("fdc 0(%%sr3,%0)\n\t"
+                    "fdc %1(%%sr3,%0)\n\t"
+                    "sync\n\t"
+                    "fic 0(%%sr3,%0)\n\t"
+                    "fic %1(%%sr3,%0)\n\t"
+                    "sync\n\t"
+                    : : "r" (frame->tramp), "r" (L1_CACHE_BYTES));
+#endif
+
 	rp = (unsigned long) frame->tramp;
 
 	if (err)


This patch is needed to restore the functionality of the 2.5.46 kernel
so the Serial Mux, pdc console, etc will boot on the K460, etc.  I did
not want to re-commit this patch because it is ugly, and it would be
nice to figure out how to solve this problem properly.  

Any thoughts, suggestions, etc?

Thanks!

- Ryan

             reply	other threads:[~2002-11-13  7:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-13  7:44 Ryan Bradetich [this message]
2002-11-13  7:52 ` [parisc-linux] Broken Cache Flushing in arch/parisc/kernel/signal.c.?? Randolph Chung
2002-11-13 12:28   ` Matthew Wilcox
2002-11-13 19:27     ` Thibaut VARENE

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=1037173492.9031.7.camel@beavis \
    --to=rbradetich@uswest.net \
    --cc=parisc-linux@lists.parisc-linux.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