aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/emu/natfeat.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2013-08-14 04:45:00 -0400
committerGeert Uytterhoeven <geert@linux-m68k.org>2013-08-23 06:49:01 -0400
commit55490050df0f5d82ce070be11351c65f7696101c (patch)
tree80ffaf29f1e1af88d928d332e18c65957fad1e8e /arch/m68k/emu/natfeat.c
parent3c776a07914c9a154902486ac848abc16111d35e (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/natfeat.c')
-rw-r--r--arch/m68k/emu/natfeat.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/m68k/emu/natfeat.c b/arch/m68k/emu/natfeat.c
index fa277aecfb78..121a6660ad4e 100644
--- a/arch/m68k/emu/natfeat.c
+++ b/arch/m68k/emu/natfeat.c
@@ -18,11 +18,11 @@
18#include <asm/machdep.h> 18#include <asm/machdep.h>
19#include <asm/natfeat.h> 19#include <asm/natfeat.h>
20 20
21extern long nf_get_id2(const char *feature_name); 21extern long nf_get_id_phys(unsigned long feature_name);
22 22
23asm("\n" 23asm("\n"
24" .global nf_get_id2,nf_call\n" 24" .global nf_get_id_phys,nf_call\n"
25"nf_get_id2:\n" 25"nf_get_id_phys:\n"
26" .short 0x7300\n" 26" .short 0x7300\n"
27" rts\n" 27" rts\n"
28"nf_call:\n" 28"nf_call:\n"
@@ -31,7 +31,7 @@ asm("\n"
31"1: moveq.l #0,%d0\n" 31"1: moveq.l #0,%d0\n"
32" rts\n" 32" rts\n"
33" .section __ex_table,\"a\"\n" 33" .section __ex_table,\"a\"\n"
34" .long nf_get_id2,1b\n" 34" .long nf_get_id_phys,1b\n"
35" .long nf_call,1b\n" 35" .long nf_call,1b\n"
36" .previous"); 36" .previous");
37EXPORT_SYMBOL_GPL(nf_call); 37EXPORT_SYMBOL_GPL(nf_call);
@@ -46,7 +46,7 @@ long nf_get_id(const char *feature_name)
46 if (n >= sizeof(name_copy)) 46 if (n >= sizeof(name_copy))
47 return 0; 47 return 0;
48 48
49 return nf_get_id2(name_copy); 49 return nf_get_id_phys(virt_to_phys(name_copy));
50} 50}
51EXPORT_SYMBOL_GPL(nf_get_id); 51EXPORT_SYMBOL_GPL(nf_get_id);
52 52
@@ -58,7 +58,7 @@ void nfprint(const char *fmt, ...)
58 58
59 va_start(ap, fmt); 59 va_start(ap, fmt);
60 n = vsnprintf(buf, 256, fmt, ap); 60 n = vsnprintf(buf, 256, fmt, ap);
61 nf_call(nf_get_id("NF_STDERR"), buf); 61 nf_call(nf_get_id("NF_STDERR"), virt_to_phys(buf));
62 va_end(ap); 62 va_end(ap);
63} 63}
64 64
@@ -83,7 +83,7 @@ void nf_init(void)
83 id = nf_get_id("NF_NAME"); 83 id = nf_get_id("NF_NAME");
84 if (!id) 84 if (!id)
85 return; 85 return;
86 nf_call(id, buf, 256); 86 nf_call(id, virt_to_phys(buf), 256);
87 buf[255] = 0; 87 buf[255] = 0;
88 88
89 pr_info("NatFeats found (%s, %lu.%lu)\n", buf, version >> 16, 89 pr_info("NatFeats found (%s, %lu.%lu)\n", buf, version >> 16,