From: Finn Thain <fthain@telegraphics.com.au>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Andreas Schwab <schwab@linux-m68k.org>,
Linux/m68k <linux-m68k@vger.kernel.org>,
Mikael Pettersson <mikpelinux@gmail.com>
Subject: Re: Boot crash on 68030, was Re: [PATCH][M68K] implement futex.h to support userspace robust futexes and PI mutexes
Date: Fri, 21 Feb 2014 13:33:43 +1100 (EST) [thread overview]
Message-ID: <alpine.LNX.2.00.1402211323140.7194@nippy.intranet> (raw)
In-Reply-To: <CAMuHMdVB3w3JpNSrdZXPk+xrDXyhm-CgDHX5XW_1CUKn8pQmtA@mail.gmail.com>
On Tue, 10 Dec 2013, Geert Uytterhoeven wrote:
> On '030, the relevant code is:
>
> if (mmusr & (MMU_I | MMU_WP)) {
> if (ssw & 4) {
> printk("Data %s fault at %#010lx in %s (pc=%#lx)\n",
> ssw & RW ? "read" : "write",
> fp->un.fmtb.daddr,
> space_names[ssw & DFC], fp->ptregs.pc);
> goto buserr;
> }
> /* Don't try to do anything further if an exception was
> handled. */
> if (do_page_fault (&fp->ptregs, addr, errorcode) < 0)
> return;
>
> But we never get to do_page_fault(), as ssw = 5 (SUPER_DATA).
>
> The "if (ssw & 4) { ... }" chunk was added in commit
> e48d483d581278fae02a5fffeba2b1fef47be4d4 (from full-history-linux):
The entire commit can be found here as well,
https://git.kernel.org/cgit/linux/kernel/git/tglx/history.git/commit/arch/m68k/kernel/traps.c?id=cf9c906f8eb31033b39f47b4313f7228dc5aa201
> Which originates from a CVS commit in 2003, based on v2 (v1 didn't have
> the chunk) of a patch in the thread "RMW instructions on MC68020/MC68851
> combo..." between Kars and Roman Z.
>
> I guess this case will work(TM) if you remove that chunk again? But what
> are the other implications of that?
So how shall we understand the intention of that patch? Here's the new
logic:
if (mmusr & (MMU_I | MMU_WP)) {
if (ssw & 4) {
...
}
...
} else if (!(mmusr & MMU_I)) {
/* propably a 020 cas fault */
...
} else if (mmusr & (MMU_B|MMU_L|MMU_S)) {
...
} else {
...
}
Seems to me that everything after the first else clause is dead code.
Finn
next prev parent reply other threads:[~2014-02-21 2:44 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-08 14:03 [PATCH][M68K] implement futex.h to support userspace robust futexes and PI mutexes Mikael Pettersson
2013-05-17 8:44 ` Andreas Schwab
2013-05-17 9:02 ` Geert Uytterhoeven
2013-05-17 9:38 ` Andreas Schwab
2013-05-17 10:04 ` Geert Uytterhoeven
2013-05-17 12:05 ` Mikael Pettersson
2013-05-31 9:16 ` Geert Uytterhoeven
2013-12-09 23:11 ` Boot crash on 68030, was " Finn Thain
2013-12-09 23:27 ` Andreas Schwab
2013-12-10 0:54 ` Finn Thain
2013-12-10 10:12 ` Geert Uytterhoeven
2013-12-10 10:19 ` Andreas Schwab
2014-02-28 3:12 ` futex_init() vs. KERNEL_DS, was Re: Boot crash on 68030 Finn Thain
2014-02-28 7:48 ` Heiko Carstens
2014-02-28 10:30 ` Finn Thain
2014-02-21 2:33 ` Finn Thain [this message]
2014-02-21 9:53 ` Boot crash on 68030, was Re: [PATCH][M68K] implement futex.h to support userspace robust futexes and PI mutexes Andreas Schwab
2013-12-10 10:13 ` Mikael Pettersson
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=alpine.LNX.2.00.1402211323140.7194@nippy.intranet \
--to=fthain@telegraphics.com.au \
--cc=geert@linux-m68k.org \
--cc=linux-m68k@vger.kernel.org \
--cc=mikpelinux@gmail.com \
--cc=schwab@linux-m68k.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