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 -- To unsubscribe from this list: send the line "unsubscribe linux-m68k" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html