diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2013-08-14 10:45:00 +0200 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2013-08-23 12:49:01 +0200 |
commit | 55490050df0f5d82ce070be11351c65f7696101c (patch) | |
tree | 80ffaf29f1e1af88d928d332e18c65957fad1e8e /arch/m68k/emu/nfcon.c | |
parent | 3c776a07914c9a154902486ac848abc16111d35e (diff) |
m68k/atari: ARAnyM - Always use physical addresses in NatFeat calls
Pointers passed to ARAnyM NatFeat calls should be physical addresses,
not virtual addresses. This worked before because on Atari, physical and
virtual kernel addresses are the same, as long as normal kernel memory
is concerned.
Correct the few remaining places where virtual addresses were used.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k/emu/nfcon.c')
-rw-r--r-- | arch/m68k/emu/nfcon.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/m68k/emu/nfcon.c b/arch/m68k/emu/nfcon.c index 6685bf45c2c..57e8c8fb5eb 100644 --- a/arch/m68k/emu/nfcon.c +++ b/arch/m68k/emu/nfcon.c @@ -15,6 +15,7 @@ #include <linux/slab.h> #include <linux/err.h> #include <linux/uaccess.h> +#include <linux/io.h> #include <asm/natfeat.h> @@ -25,17 +26,18 @@ static struct tty_driver *nfcon_tty_driver; static void nfputs(const char *str, unsigned int count) { char buf[68]; + unsigned long phys = virt_to_phys(buf); buf[64] = 0; while (count > 64) { memcpy(buf, str, 64); - nf_call(stderr_id, buf); + nf_call(stderr_id, phys); str += 64; count -= 64; } memcpy(buf, str, count); buf[count] = 0; - nf_call(stderr_id, buf); + nf_call(stderr_id, phys); } static void nfcon_write(struct console *con, const char *str, @@ -79,7 +81,7 @@ static int nfcon_tty_put_char(struct tty_struct *tty, unsigned char ch) { char temp[2] = { ch, 0 }; - nf_call(stderr_id, temp); + nf_call(stderr_id, virt_to_phys(temp)); return 1; } |