diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-12-26 10:16:55 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-12-26 10:16:55 -0800 |
commit | e0783bb42448a4f2a6bd405c890010a3950feada (patch) | |
tree | 22d693b76f70c3cf4b8ae400b36fb7612e9028e0 /arch/m68k/include/asm | |
parent | 5694cecdb092656a822287a6691aa7ce668c8160 (diff) | |
parent | 005e13a96c0ed1437cb7f113d5d0f07ad9590962 (diff) | |
download | talos-obmc-linux-e0783bb42448a4f2a6bd405c890010a3950feada.tar.gz talos-obmc-linux-e0783bb42448a4f2a6bd405c890010a3950feada.zip |
Merge tag 'm68k-for-v4.21-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k
Pull m68k updates from Geert Uytterhoeven:
- Generate syscall headers
- Small improvements and cleanups
- defconfig updates
* tag 'm68k-for-v4.21-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
m68k: Generate uapi header and syscall table header files
m68k: Add system call table generation support
m68k: Add __NR_syscalls along with NR_syscalls
m68k/defconfig: Update defconfigs for v4.20-rc1
m68k: Remove redundant 'default n' from Kconfig
m68k: Unroll raw_outsb() loop
Diffstat (limited to 'arch/m68k/include/asm')
-rw-r--r-- | arch/m68k/include/asm/Kbuild | 1 | ||||
-rw-r--r-- | arch/m68k/include/asm/raw_io.h | 39 | ||||
-rw-r--r-- | arch/m68k/include/asm/unistd.h | 3 |
3 files changed, 37 insertions, 6 deletions
diff --git a/arch/m68k/include/asm/Kbuild b/arch/m68k/include/asm/Kbuild index a4b8d3331a9e..9f1dd26903e3 100644 --- a/arch/m68k/include/asm/Kbuild +++ b/arch/m68k/include/asm/Kbuild @@ -1,3 +1,4 @@ +generated-y += syscall_table.h generic-y += barrier.h generic-y += compat.h generic-y += device.h diff --git a/arch/m68k/include/asm/raw_io.h b/arch/m68k/include/asm/raw_io.h index 85761255dde5..8a6dc6e5a279 100644 --- a/arch/m68k/include/asm/raw_io.h +++ b/arch/m68k/include/asm/raw_io.h @@ -107,12 +107,43 @@ static inline void raw_insb(volatile u8 __iomem *port, u8 *buf, unsigned int len } static inline void raw_outsb(volatile u8 __iomem *port, const u8 *buf, - unsigned int len) + unsigned int nr) { - unsigned int i; + unsigned int tmp; - for (i = 0; i < len; i++) - out_8(port, *buf++); + if (nr & 15) { + tmp = (nr & 15) - 1; + asm volatile ( + "1: moveb %0@+,%2@; dbra %1,1b" + : "=a" (buf), "=d" (tmp) + : "a" (port), "0" (buf), + "1" (tmp)); + } + if (nr >> 4) { + tmp = (nr >> 4) - 1; + asm volatile ( + "1: " + "moveb %0@+,%2@; " + "moveb %0@+,%2@; " + "moveb %0@+,%2@; " + "moveb %0@+,%2@; " + "moveb %0@+,%2@; " + "moveb %0@+,%2@; " + "moveb %0@+,%2@; " + "moveb %0@+,%2@; " + "moveb %0@+,%2@; " + "moveb %0@+,%2@; " + "moveb %0@+,%2@; " + "moveb %0@+,%2@; " + "moveb %0@+,%2@; " + "moveb %0@+,%2@; " + "moveb %0@+,%2@; " + "moveb %0@+,%2@; " + "dbra %1,1b" + : "=a" (buf), "=d" (tmp) + : "a" (port), "0" (buf), + "1" (tmp)); + } } static inline void raw_insw(volatile u16 __iomem *port, u16 *buf, unsigned int nr) diff --git a/arch/m68k/include/asm/unistd.h b/arch/m68k/include/asm/unistd.h index e680031bda7b..49d5de18646b 100644 --- a/arch/m68k/include/asm/unistd.h +++ b/arch/m68k/include/asm/unistd.h @@ -4,8 +4,7 @@ #include <uapi/asm/unistd.h> - -#define NR_syscalls 380 +#define NR_syscalls __NR_syscalls #define __ARCH_WANT_NEW_STAT #define __ARCH_WANT_OLD_READDIR |