Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0223f9aa authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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>
parents 8a9e838f 24cae793
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -95,7 +95,7 @@ config ATARI_DSP56K


config AMIGA_BUILTIN_SERIAL
config AMIGA_BUILTIN_SERIAL
	tristate "Amiga builtin serial support"
	tristate "Amiga builtin serial support"
	depends on AMIGA
	depends on AMIGA && TTY
	help
	help
	  If you want to use your Amiga's built-in serial port in Linux,
	  If you want to use your Amiga's built-in serial port in Linux,
	  answer Y.
	  answer Y.
+1 −0
Original line number Original line Diff line number Diff line
@@ -21,6 +21,7 @@
#include <linux/mount.h>
#include <linux/mount.h>
#include <linux/blkdev.h>
#include <linux/blkdev.h>
#include <linux/module.h>
#include <linux/module.h>
#include <linux/ioport.h>


#include <asm/setup.h>
#include <asm/setup.h>
#include <asm/machdep.h>
#include <asm/machdep.h>
+8 −1
Original line number Original line Diff line number Diff line
@@ -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 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 */
#endif /* _IO_H */
+43 −35
Original line number Original line Diff line number Diff line
@@ -28,11 +28,13 @@
int hwreg_present(volatile void *regp)
int hwreg_present(volatile void *regp)
{
{
	int ret = 0;
	int ret = 0;
	unsigned long flags;
	long save_sp, save_vbr;
	long save_sp, save_vbr;
	long tmp_vectors[3];
	long tmp_vectors[3];


    __asm__ __volatile__
	local_irq_save(flags);
	(	"movec	%/vbr,%2\n\t"
	__asm__ __volatile__ (
		"movec %/vbr,%2\n\t"
		"movel #Lberr1,%4@(8)\n\t"
		"movel #Lberr1,%4@(8)\n\t"
		"movec %4,%/vbr\n\t"
		"movec %4,%/vbr\n\t"
		"movel %/sp,%1\n\t"
		"movel %/sp,%1\n\t"
@@ -46,8 +48,9 @@ int hwreg_present( volatile void *regp )
		: "=&d" (ret), "=&r" (save_sp), "=&r" (save_vbr)
		: "=&d" (ret), "=&r" (save_sp), "=&r" (save_vbr)
		: "a" (regp), "a" (tmp_vectors)
		: "a" (regp), "a" (tmp_vectors)
	);
	);
	local_irq_restore(flags);


    return( ret );
	return ret;
}
}
EXPORT_SYMBOL(hwreg_present);
EXPORT_SYMBOL(hwreg_present);


@@ -58,19 +61,23 @@ EXPORT_SYMBOL(hwreg_present);
int hwreg_write(volatile void *regp, unsigned short val)
int hwreg_write(volatile void *regp, unsigned short val)
{
{
	int ret;
	int ret;
	unsigned long flags;
	long save_sp, save_vbr;
	long save_sp, save_vbr;
	long tmp_vectors[3];
	long tmp_vectors[3];


	__asm__ __volatile__
	local_irq_save(flags);
	(	"movec	%/vbr,%2\n\t"
	__asm__ __volatile__ (
		"movec %/vbr,%2\n\t"
		"movel #Lberr2,%4@(8)\n\t"
		"movel #Lberr2,%4@(8)\n\t"
		"movec %4,%/vbr\n\t"
		"movec %4,%/vbr\n\t"
		"movel %/sp,%1\n\t"
		"movel %/sp,%1\n\t"
		"moveq #0,%0\n\t"
		"moveq #0,%0\n\t"
		"movew %5,%3@\n\t"
		"movew %5,%3@\n\t"
		"nop	\n\t"	/* If this nop isn't present, 'ret' may already be
		"nop\n\t"
				 * loaded with 1 at the time the bus error
		/*
				 * happens! */
		 * If this nop isn't present, 'ret' may already be loaded
		 * with 1 at the time the bus error happens!
		 */
		"moveq #1,%0\n"
		"moveq #1,%0\n"
	"Lberr2:\n\t"
	"Lberr2:\n\t"
		"movel %1,%/sp\n\t"
		"movel %1,%/sp\n\t"
@@ -78,8 +85,9 @@ int hwreg_write( volatile void *regp, unsigned short val )
		: "=&d" (ret), "=&r" (save_sp), "=&r" (save_vbr)
		: "=&d" (ret), "=&r" (save_sp), "=&r" (save_vbr)
		: "a" (regp), "a" (tmp_vectors), "g" (val)
		: "a" (regp), "a" (tmp_vectors), "g" (val)
	);
	);
	local_irq_restore(flags);


	return( ret );
	return ret;
}
}
EXPORT_SYMBOL(hwreg_write);
EXPORT_SYMBOL(hwreg_write);