diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-08 05:40:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-08 05:40:17 -0400 |
commit | 0223f9aaef94a09ffc0b6abcba732e62a483b88c (patch) | |
tree | 3cf04190e2698415d6e80756c9fb4516f190c671 /arch | |
parent | 8a9e838f59115e55ca206fb5f0b567d7b3540517 (diff) | |
parent | 24cae7934cf1455c9793a95376a206ca6b965ade (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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/m68k/Kconfig.devices | 2 | ||||
-rw-r--r-- | arch/m68k/atari/stram.c | 1 | ||||
-rw-r--r-- | arch/m68k/include/asm/io_mm.h | 9 | ||||
-rw-r--r-- | arch/m68k/mm/hwtest.c | 78 |
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 config AMIGA_BUILTIN_SERIAL tristate "Amiga builtin serial support" - depends on AMIGA + depends on AMIGA && TTY help If you want to use your Amiga's built-in serial port in Linux, 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 @@ #include <linux/mount.h> #include <linux/blkdev.h> #include <linux/module.h> +#include <linux/ioport.h> #include <asm/setup.h> #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 */ #define xlate_dev_kmem_ptr(p) p -#define ioport_map(port, nr) ((void __iomem *)(port)) +static inline void __iomem *ioport_map(unsigned long port, unsigned int nr) +{ + return (void __iomem *) port; +} + +static inline void ioport_unmap(void __iomem *p) +{ +} #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 @@ #include <linux/module.h> -int hwreg_present( volatile void *regp ) +int hwreg_present(volatile void *regp) { - int ret = 0; - long save_sp, save_vbr; - long tmp_vectors[3]; + int ret = 0; + unsigned long flags; + long save_sp, save_vbr; + long tmp_vectors[3]; - __asm__ __volatile__ - ( "movec %/vbr,%2\n\t" - "movel #Lberr1,%4@(8)\n\t" - "movec %4,%/vbr\n\t" - "movel %/sp,%1\n\t" - "moveq #0,%0\n\t" - "tstb %3@\n\t" + local_irq_save(flags); + __asm__ __volatile__ ( + "movec %/vbr,%2\n\t" + "movel #Lberr1,%4@(8)\n\t" + "movec %4,%/vbr\n\t" + "movel %/sp,%1\n\t" + "moveq #0,%0\n\t" + "tstb %3@\n\t" "nop\n\t" - "moveq #1,%0\n" - "Lberr1:\n\t" - "movel %1,%/sp\n\t" - "movec %2,%/vbr" + "moveq #1,%0\n" + "Lberr1:\n\t" + "movel %1,%/sp\n\t" + "movec %2,%/vbr" : "=&d" (ret), "=&r" (save_sp), "=&r" (save_vbr) : "a" (regp), "a" (tmp_vectors) - ); + ); + local_irq_restore(flags); - return( ret ); + return ret; } EXPORT_SYMBOL(hwreg_present); @@ -55,31 +58,36 @@ EXPORT_SYMBOL(hwreg_present); * by a bus error handler. Returns 1 if successful, 0 otherwise. */ -int hwreg_write( volatile void *regp, unsigned short val ) +int hwreg_write(volatile void *regp, unsigned short val) { - int ret; - long save_sp, save_vbr; - long tmp_vectors[3]; + int ret; + unsigned long flags; + long save_sp, save_vbr; + long tmp_vectors[3]; - __asm__ __volatile__ - ( "movec %/vbr,%2\n\t" - "movel #Lberr2,%4@(8)\n\t" - "movec %4,%/vbr\n\t" - "movel %/sp,%1\n\t" - "moveq #0,%0\n\t" - "movew %5,%3@\n\t" - "nop \n\t" /* If this nop isn't present, 'ret' may already be - * loaded with 1 at the time the bus error - * happens! */ - "moveq #1,%0\n" + local_irq_save(flags); + __asm__ __volatile__ ( + "movec %/vbr,%2\n\t" + "movel #Lberr2,%4@(8)\n\t" + "movec %4,%/vbr\n\t" + "movel %/sp,%1\n\t" + "moveq #0,%0\n\t" + "movew %5,%3@\n\t" + "nop\n\t" + /* + * If this nop isn't present, 'ret' may already be loaded + * with 1 at the time the bus error happens! + */ + "moveq #1,%0\n" "Lberr2:\n\t" - "movel %1,%/sp\n\t" - "movec %2,%/vbr" + "movel %1,%/sp\n\t" + "movec %2,%/vbr" : "=&d" (ret), "=&r" (save_sp), "=&r" (save_vbr) : "a" (regp), "a" (tmp_vectors), "g" (val) ); + local_irq_restore(flags); - return( ret ); + return ret; } EXPORT_SYMBOL(hwreg_write); |