aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-10-08 05:40:17 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-10-08 05:40:17 -0400
commit0223f9aaef94a09ffc0b6abcba732e62a483b88c (patch)
tree3cf04190e2698415d6e80756c9fb4516f190c671
parent8a9e838f59115e55ca206fb5f0b567d7b3540517 (diff)
parent24cae7934cf1455c9793a95376a206ca6b965ade (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k
Pull m68k updates from Geert Uytterhoeven: "Summary: - a fix for an intermittent crash in macsonic and hilkbd, marked for stable, - build fixes for uncommon configs. Note: "m68k: AMIGA_BUILTIN_SERIAL should depend on TTY" was also picked up by GregKH for his TTY/Serial patches tree" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k: Reformat arch/m68k/mm/hwtest.c m68k: Disable/restore interrupts in hwreg_present()/hwreg_write() m68k: AMIGA_BUILTIN_SERIAL should depend on TTY m68k: Add missing ioport_unmap() m68k/atari - stram: Add missing #include <linux/ioport.h>
-rw-r--r--arch/m68k/Kconfig.devices2
-rw-r--r--arch/m68k/atari/stram.c1
-rw-r--r--arch/m68k/include/asm/io_mm.h9
-rw-r--r--arch/m68k/mm/hwtest.c78
4 files changed, 53 insertions, 37 deletions
diff --git a/arch/m68k/Kconfig.devices b/arch/m68k/Kconfig.devices
index 2a74777667fd..42b6fcfc30ef 100644
--- a/arch/m68k/Kconfig.devices
+++ b/arch/m68k/Kconfig.devices
@@ -95,7 +95,7 @@ config ATARI_DSP56K
95 95
96config AMIGA_BUILTIN_SERIAL 96config AMIGA_BUILTIN_SERIAL
97 tristate "Amiga builtin serial support" 97 tristate "Amiga builtin serial support"
98 depends on AMIGA 98 depends on AMIGA && TTY
99 help 99 help
100 If you want to use your Amiga's built-in serial port in Linux, 100 If you want to use your Amiga's built-in serial port in Linux,
101 answer Y. 101 answer Y.
diff --git a/arch/m68k/atari/stram.c b/arch/m68k/atari/stram.c
index 5f8cb5a234d9..c83d66442612 100644
--- a/arch/m68k/atari/stram.c
+++ b/arch/m68k/atari/stram.c
@@ -21,6 +21,7 @@
21#include <linux/mount.h> 21#include <linux/mount.h>
22#include <linux/blkdev.h> 22#include <linux/blkdev.h>
23#include <linux/module.h> 23#include <linux/module.h>
24#include <linux/ioport.h>
24 25
25#include <asm/setup.h> 26#include <asm/setup.h>
26#include <asm/machdep.h> 27#include <asm/machdep.h>
diff --git a/arch/m68k/include/asm/io_mm.h b/arch/m68k/include/asm/io_mm.h
index ffdf54f44bc6..8955b40a5dc4 100644
--- a/arch/m68k/include/asm/io_mm.h
+++ b/arch/m68k/include/asm/io_mm.h
@@ -510,6 +510,13 @@ static inline void memcpy_toio(volatile void __iomem *dst, const void *src, int
510 */ 510 */
511#define xlate_dev_kmem_ptr(p) p 511#define xlate_dev_kmem_ptr(p) p
512 512
513#define ioport_map(port, nr) ((void __iomem *)(port)) 513static inline void __iomem *ioport_map(unsigned long port, unsigned int nr)
514{
515 return (void __iomem *) port;
516}
517
518static inline void ioport_unmap(void __iomem *p)
519{
520}
514 521
515#endif /* _IO_H */ 522#endif /* _IO_H */
diff --git a/arch/m68k/mm/hwtest.c b/arch/m68k/mm/hwtest.c
index 2c7dde3c6430..fb8be4dd38c4 100644
--- a/arch/m68k/mm/hwtest.c
+++ b/arch/m68k/mm/hwtest.c
@@ -25,29 +25,32 @@
25 25
26#include <linux/module.h> 26#include <linux/module.h>
27 27
28int hwreg_present( volatile void *regp ) 28int hwreg_present(volatile void *regp)
29{ 29{
30 int ret = 0; 30 int ret = 0;
31 long save_sp, save_vbr; 31 unsigned long flags;
32 long tmp_vectors[3]; 32 long save_sp, save_vbr;
33 long tmp_vectors[3];
33 34
34 __asm__ __volatile__ 35 local_irq_save(flags);
35 ( "movec %/vbr,%2\n\t" 36 __asm__ __volatile__ (
36 "movel #Lberr1,%4@(8)\n\t" 37 "movec %/vbr,%2\n\t"
37 "movec %4,%/vbr\n\t" 38 "movel #Lberr1,%4@(8)\n\t"
38 "movel %/sp,%1\n\t" 39 "movec %4,%/vbr\n\t"
39 "moveq #0,%0\n\t" 40 "movel %/sp,%1\n\t"
40 "tstb %3@\n\t" 41 "moveq #0,%0\n\t"
42 "tstb %3@\n\t"
41 "nop\n\t" 43 "nop\n\t"
42 "moveq #1,%0\n" 44 "moveq #1,%0\n"
43 "Lberr1:\n\t" 45 "Lberr1:\n\t"
44 "movel %1,%/sp\n\t" 46 "movel %1,%/sp\n\t"
45 "movec %2,%/vbr" 47 "movec %2,%/vbr"
46 : "=&d" (ret), "=&r" (save_sp), "=&r" (save_vbr) 48 : "=&d" (ret), "=&r" (save_sp), "=&r" (save_vbr)
47 : "a" (regp), "a" (tmp_vectors) 49 : "a" (regp), "a" (tmp_vectors)
48 ); 50 );
51 local_irq_restore(flags);
49 52
50 return( ret ); 53 return ret;
51} 54}
52EXPORT_SYMBOL(hwreg_present); 55EXPORT_SYMBOL(hwreg_present);
53 56
@@ -55,31 +58,36 @@ EXPORT_SYMBOL(hwreg_present);
55 * by a bus error handler. Returns 1 if successful, 0 otherwise. 58 * by a bus error handler. Returns 1 if successful, 0 otherwise.
56 */ 59 */
57 60
58int hwreg_write( volatile void *regp, unsigned short val ) 61int hwreg_write(volatile void *regp, unsigned short val)
59{ 62{
60 int ret; 63 int ret;
61 long save_sp, save_vbr; 64 unsigned long flags;
62 long tmp_vectors[3]; 65 long save_sp, save_vbr;
66 long tmp_vectors[3];
63 67
64 __asm__ __volatile__ 68 local_irq_save(flags);
65 ( "movec %/vbr,%2\n\t" 69 __asm__ __volatile__ (
66 "movel #Lberr2,%4@(8)\n\t" 70 "movec %/vbr,%2\n\t"
67 "movec %4,%/vbr\n\t" 71 "movel #Lberr2,%4@(8)\n\t"
68 "movel %/sp,%1\n\t" 72 "movec %4,%/vbr\n\t"
69 "moveq #0,%0\n\t" 73 "movel %/sp,%1\n\t"
70 "movew %5,%3@\n\t" 74 "moveq #0,%0\n\t"
71 "nop \n\t" /* If this nop isn't present, 'ret' may already be 75 "movew %5,%3@\n\t"
72 * loaded with 1 at the time the bus error 76 "nop\n\t"
73 * happens! */ 77 /*
74 "moveq #1,%0\n" 78 * If this nop isn't present, 'ret' may already be loaded
79 * with 1 at the time the bus error happens!
80 */
81 "moveq #1,%0\n"
75 "Lberr2:\n\t" 82 "Lberr2:\n\t"
76 "movel %1,%/sp\n\t" 83 "movel %1,%/sp\n\t"
77 "movec %2,%/vbr" 84 "movec %2,%/vbr"
78 : "=&d" (ret), "=&r" (save_sp), "=&r" (save_vbr) 85 : "=&d" (ret), "=&r" (save_sp), "=&r" (save_vbr)
79 : "a" (regp), "a" (tmp_vectors), "g" (val) 86 : "a" (regp), "a" (tmp_vectors), "g" (val)
80 ); 87 );
88 local_irq_restore(flags);
81 89
82 return( ret ); 90 return ret;
83} 91}
84EXPORT_SYMBOL(hwreg_write); 92EXPORT_SYMBOL(hwreg_write);
85 93