From: Christoph Hellwig <hch@lst.de>
To: Geert Uytterhoeven <geert@linux-m68k.org>,
Greg Ungerer <gerg@linux-m68k.org>
Cc: Michael Schmitz <schmitzmic@gmail.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
linux-m68k@lists.linux-m68k.org
Subject: [PATCH 2/6] m68k: remove the 030 case in virt_to_phys_slow
Date: Thu, 16 Sep 2021 09:04:01 +0200 [thread overview]
Message-ID: <20210916070405.52750-3-hch@lst.de> (raw)
In-Reply-To: <20210916070405.52750-1-hch@lst.de>
The 030 case in virt_to_phys_slow can't ever be reached, so remove it.
Suggested-by: Michael Schmitz <schmitzmic@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
arch/m68k/mm/cache.c | 19 +------------------
1 file changed, 1 insertion(+), 18 deletions(-)
diff --git a/arch/m68k/mm/cache.c b/arch/m68k/mm/cache.c
index b486c0889eece..e7c1cabbfac45 100644
--- a/arch/m68k/mm/cache.c
+++ b/arch/m68k/mm/cache.c
@@ -49,24 +49,7 @@ static unsigned long virt_to_phys_slow(unsigned long vaddr)
if (mmusr & MMU_R_040)
return (mmusr & PAGE_MASK) | (vaddr & ~PAGE_MASK);
} else {
- unsigned short mmusr;
- unsigned long *descaddr;
-
- asm volatile ("ptestr %3,%2@,#7,%0\n\t"
- "pmove %%psr,%1"
- : "=a&" (descaddr), "=m" (mmusr)
- : "a" (vaddr), "d" (get_fs().seg));
- if (mmusr & (MMU_I|MMU_B|MMU_L))
- return 0;
- descaddr = phys_to_virt((unsigned long)descaddr);
- switch (mmusr & MMU_NUM) {
- case 1:
- return (*descaddr & 0xfe000000) | (vaddr & 0x01ffffff);
- case 2:
- return (*descaddr & 0xfffc0000) | (vaddr & 0x0003ffff);
- case 3:
- return (*descaddr & PAGE_MASK) | (vaddr & ~PAGE_MASK);
- }
+ WARN_ON_ONCE(!CPU_IS_040_OR_060);
}
return 0;
}
--
2.30.2
next prev parent reply other threads:[~2021-09-16 7:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-16 7:03 remove set_fs for m68k Christoph Hellwig
2021-09-16 7:04 ` [PATCH 1/6] m68k: document that access_ok is broken for !CONFIG_CPU_HAS_ADDRESS_SPACES Christoph Hellwig
2021-09-16 7:04 ` Christoph Hellwig [this message]
2021-09-16 7:04 ` [PATCH 3/6] m68k: use BUILD_BUG for passing invalid sizes to get_user/put_user Christoph Hellwig
2021-09-23 14:46 ` Geert Uytterhoeven
2021-09-16 7:04 ` [PATCH 4/6] m68k: factor the 8-byte lowlevel {get,put}_user code into helpers Christoph Hellwig
2021-09-23 14:47 ` Geert Uytterhoeven
2021-09-16 7:04 ` [PATCH 5/6] m68k: provide __{get,put}_kernel_nofault Christoph Hellwig
2021-09-23 14:47 ` Geert Uytterhoeven
2021-09-16 7:04 ` [PATCH 6/6] m68k: remove set_fs() Christoph Hellwig
2021-09-23 14:48 ` Geert Uytterhoeven
2021-09-17 5:40 ` remove set_fs for m68k Michael Schmitz
2021-09-23 14:52 ` Geert Uytterhoeven
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=20210916070405.52750-3-hch@lst.de \
--to=hch@lst.de \
--cc=geert@linux-m68k.org \
--cc=gerg@linux-m68k.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=schmitzmic@gmail.com \
--cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.