m68k: Sort arch/m68k/include/asm/Kbuild
Geert Uytterhoeven
maintainerPATCH 1/3 m68k: Sort arch/m68k/include/asm/Kbuild
--- arch/m68k/include/asm/Kbuild | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
arch/m68k/include/asm/Kbuild +2 -3
@@ -1,4 +1,3 @@ - generic-y += bitsperlong.h generic-y += clkdev.h generic-y += cputime.h
@@ -6,6 +5,7 @@ generic-y += device.h generic-y += emergency-restart.h generic-y += errno.h generic-y += exec.h +generic-y += hash.h generic-y += hw_irq.h generic-y += ioctl.h generic-y += ipcbuf.h
@@ -18,6 +18,7 @@ generic-y += local.h generic-y += mman.h generic-y += mutex.h generic-y += percpu.h +generic-y += preempt.h generic-y += resource.h generic-y += scatterlist.h generic-y += sections.h
@@ -31,5 +32,3 @@ generic-y += trace_clock.h generic-y += types.h generic-y += word-at-a-time.h generic-y += xor.h -generic-y += preempt.h -generic-y += hash.h
Signature · 1 line
1.7.9.5
Geert Uytterhoeven
maintainerPATCH 2/3 m68k: Switch to asm-generic/barrier.h
The generic nop() implementation is fine for m68k.
--- arch/m68k/include/asm/Kbuild | 1 + arch/m68k/include/asm/barrier.h | 8 -------- 2 files changed, 1 insertion(+), 8 deletions(-) delete mode 100644 arch/m68k/include/asm/barrier.h
arch/m68k/include/asm/Kbuild +1 -0
@@ -1,3 +1,4 @@ +generic-y += barrier.h generic-y += bitsperlong.h generic-y += clkdev.h generic-y += cputime.h
arch/m68k/include/asm/barrier.h deleted +0 -8
@@ -1,8 +0,0 @@ -#ifndef _M68K_BARRIER_H -#define _M68K_BARRIER_H - -#define nop () do { asm volatile ("nop"); barrier(); } while (0) - -#include <asm-generic/barrier.h> - -#endif /* _M68K_BARRIER_H */
Signature · 1 line
1.7.9.5
Geert Uytterhoeven
maintainerPATCH 2/3 m68k: Switch to asm-generic/barrier.h
In reply to Geert UytterhoevenThe generic nop() implementation is fine for m68k.
--- arch/m68k/include/asm/Kbuild | 1 + arch/m68k/include/asm/barrier.h | 8 -------- 2 files changed, 1 insertion(+), 8 deletions(-) delete mode 100644 arch/m68k/include/asm/barrier.h
arch/m68k/include/asm/Kbuild +1 -0
@@ -1,3 +1,4 @@ +generic-y += barrier.h generic-y += bitsperlong.h generic-y += clkdev.h generic-y += cputime.h
arch/m68k/include/asm/barrier.h deleted +0 -8
@@ -1,8 +0,0 @@ -#ifndef _M68K_BARRIER_H -#define _M68K_BARRIER_H - -#define nop () do { asm volatile ("nop"); barrier(); } while (0) - -#include <asm-generic/barrier.h> - -#endif /* _M68K_BARRIER_H */
Signature · 1 line
1.7.9.5
Re: [PATCH 2/3] m68k: Switch to asm-generic/barrier.h
Quoted 3 lines · Geert Uytterhoeven
The generic
nop()implementation is fine for m68k.Signed-off-by Geert Uytterhoeven <[email protected]>
Quoted 30 lines
--- arch/m68k/include/asm/Kbuild | 1 + arch/m68k/include/asm/barrier.h | 8 -------- 2 files changed, 1 insertion(+), 8 deletions(-) delete mode 100644 arch/m68k/include/asm/barrier.harch/m68k/include/asm/Kbuild +1
-0@@ -1,3 +1,4 @@ +generic-y += barrier.h generic-y += bitsperlong.h generic-y += clkdev.h generic-y += cputime.harch/m68k/include/asm/barrier.h deleted +0
-8@@ -1,8 +0,0 @@ -#ifndef _M68K_BARRIER_H -#define _M68K_BARRIER_H - -#define nop () do { asm volatile ("nop"); barrier(); } while (0) - -#include <asm-generic/barrier.h> - -#endif /* _M68K_BARRIER_H */
Re: [PATCH 2/3] m68k: Switch to asm-generic/barrier.h
In reply to Geert UytterhoevenQuoted 2 lines · Geert Uytterhoeven
The generic
nop()implementation is fine for m68k.
If the barrier in the old nop() implementation isn't needed anymore, perhaps we should also remove the nop() instances in macfb.c? One comment from this file says, "the nop's are there to order writes". (I don't know whether there is any timing issue here. Seeing the way nop() was sprinkled through macfb.c, I doubt that there is.) Is the volatile casting in nubus_writeb() aka raw_outb() aka out_8() equivalent to the old barrier?
Finn
Geert Uytterhoeven
maintainerRe: [PATCH 2/3] m68k: Switch to asm-generic/barrier.h
Hi Finn,
Quoted 9 lines · Finn Thain
Quoted 1 line · Geert Uytterhoeven
The generic
nop()implementation is fine for m68k.If the barrier in the old
nop()implementation isn't needed anymore, perhaps we should also remove thenop()instances inmacfb.c? One comment from this file says, "the nop's are there to order writes". (I don't know whether there is any timing issue here. Seeing the waynop()was sprinkled throughmacfb.c, I doubt that there is.) Is the volatile casting innubus_writeb()akaraw_outb()akaout_8()equivalent to the old barrier?
barrier() does:
#define barrier() __asm__ __volatile__("": : :"memory")
I.e. it prevents gcc from:
1. Reordering instructions due to the volatile,
2. Caching data in registers due to the "memory".
nop() still has the former, while the volatile casting in the I/O macros should have the same effect as the latter.
So yes, I think they can be removed. Can you test that, please?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Re: [PATCH 2/3] m68k: Switch to asm-generic/barrier.h
Quoted 9 lines · Geert Uytterhoeven
#define
barrier()__asm____volatile__("": : :"memory")I.e. it prevents gcc from:
1. Reordering instructions due to the volatile,
2. Caching data in registers due to the "memory".
nop()still has the former, while the volatile casting in the I/O macros should have the same effect as the latter.
OK. Thanks for clarifying that for me.
Quoted 3 lines
So yes, I think they can be removed. Can you test that, please?
Yes, but I don't know how long it will take. Removing the nop() instances will affect the fb_setcolreg() routines for 3 types of nubus card and 4 types of on-board framebuffer so it means testing on a range of hardware. Progress is slow because I can't access my Mac hardware except when I'm in Melbourne.
Finn
Re: [PATCH 2/3] m68k: Switch to asm-generic/barrier.h
In reply to Geert UytterhoevenQuoted 3 lines · Geert Uytterhoeven
The generic
nop()implementation is fine for m68k.Signed-off-by Geert Uytterhoeven <[email protected]>
Quoted 30 lines
--- arch/m68k/include/asm/Kbuild | 1 + arch/m68k/include/asm/barrier.h | 8 -------- 2 files changed, 1 insertion(+), 8 deletions(-) delete mode 100644 arch/m68k/include/asm/barrier.harch/m68k/include/asm/Kbuild +1
-0@@ -1,3 +1,4 @@ +generic-y += barrier.h generic-y += bitsperlong.h generic-y += clkdev.h generic-y += cputime.harch/m68k/include/asm/barrier.h deleted +0
-8@@ -1,8 +0,0 @@ -#ifndef _M68K_BARRIER_H -#define _M68K_BARRIER_H - -#define nop () do { asm volatile ("nop"); barrier(); } while (0) - -#include <asm-generic/barrier.h> - -#endif /* _M68K_BARRIER_H */
Geert Uytterhoeven
maintainerPATCH 3/3 m68k: Wire up sched_setattr and sched_getattr
In reply to Geert Uytterhoeven--- arch/m68k/include/asm/unistd.h | 2 +- arch/m68k/include/uapi/asm/unistd.h | 2 ++ arch/m68k/kernel/syscalltable.S | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-)
arch/m68k/include/asm/unistd.h +1 -1
@@ -4,7 +4,7 @@#include <uapi/asm/unistd.h> -#define NR_syscalls 349 +#define NR_syscalls 351#define __ARCH_WANT_OLD_READDIR#define __ARCH_WANT_OLD_STAT
arch/m68k/include/uapi/asm/unistd.h +2 -0
@@ -354,5 +354,7 @@#define __NR_process_vm_writev 346#define __NR_kcmp 347#define __NR_finit_module 348 +#define __NR_sched_setattr 349 +#define __NR_sched_getattr 350#endif /* _UAPI_ASM_M68K_UNISTD_H_ */
arch/m68k/kernel/syscalltable.S +2 -0
@@ -369,4 +369,6 @@ ENTRY(sys_call_table) .long sys_process_vm_writev .long sys_kcmp .long sys_finit_module + .long sys_sched_setattr + .long sys_sched_getattr /* 350 */
Signature · 1 line
1.7.9.5
Geert Uytterhoeven
maintainerPATCH 3/3 m68k: Wire up sched_setattr and sched_getattr
In reply to Geert Uytterhoeven--- arch/m68k/include/asm/unistd.h | 2 +- arch/m68k/include/uapi/asm/unistd.h | 2 ++ arch/m68k/kernel/syscalltable.S | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-)
arch/m68k/include/asm/unistd.h +1 -1
@@ -4,7 +4,7 @@#include <uapi/asm/unistd.h> -#define NR_syscalls 349 +#define NR_syscalls 351#define __ARCH_WANT_OLD_READDIR#define __ARCH_WANT_OLD_STAT
arch/m68k/include/uapi/asm/unistd.h +2 -0
@@ -354,5 +354,7 @@#define __NR_process_vm_writev 346#define __NR_kcmp 347#define __NR_finit_module 348 +#define __NR_sched_setattr 349 +#define __NR_sched_getattr 350#endif /* _UAPI_ASM_M68K_UNISTD_H_ */
arch/m68k/kernel/syscalltable.S +2 -0
@@ -369,4 +369,6 @@ ENTRY(sys_call_table) .long sys_process_vm_writev .long sys_kcmp .long sys_finit_module + .long sys_sched_setattr + .long sys_sched_getattr /* 350 */
Signature · 1 line
1.7.9.5
Re: [PATCH 3/3] m68k: Wire up sched_setattr and sched_getattr
Quoted 1 line · Geert Uytterhoeven
Signed-off-by Geert Uytterhoeven <[email protected]>
Quoted 43 lines
--- arch/m68k/include/asm/unistd.h | 2 +- arch/m68k/include/uapi/asm/unistd.h | 2 ++ arch/m68k/kernel/syscalltable.S | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-)arch/m68k/include/asm/unistd.h +1
-1@@ -4,7 +4,7 @@#include <uapi/asm/unistd.h> -#define NR_syscalls 349 +#define NR_syscalls 351#define __ARCH_WANT_OLD_READDIR#define __ARCH_WANT_OLD_STATarch/m68k/include/uapi/asm/unistd.h +2
-0@@ -354,5 +354,7 @@#define __NR_process_vm_writev 346#define __NR_kcmp 347#define __NR_finit_module 348 +#define __NR_sched_setattr 349 +#define __NR_sched_getattr 350#endif /* _UAPI_ASM_M68K_UNISTD_H_ */ arch/m68k/kernel/syscalltable.S +2
-0@@ -369,4 +369,6 @@ ENTRY(sys_call_table) .long sys_process_vm_writev .long sys_kcmp .long sys_finit_module + .long sys_sched_setattr + .long sys_sched_getattr /* 350 */
Quoted 1 line · Geert Uytterhoeven
Signed-off-by Geert Uytterhoeven <[email protected]>
Quoted 36 lines
--- arch/m68k/include/asm/Kbuild | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)arch/m68k/include/asm/Kbuild +2
-3@@ -1,4 +1,3 @@ - generic-y += bitsperlong.h generic-y += clkdev.h generic-y += cputime.h@@ -6,6 +5,7 @@ generic-y += device.h generic-y += emergency-restart.h generic-y += errno.h generic-y += exec.h +generic-y += hash.h generic-y += hw_irq.h generic-y += ioctl.h generic-y += ipcbuf.h@@ -18,6 +18,7 @@ generic-y += local.h generic-y += mman.h generic-y += mutex.h generic-y += percpu.h +generic-y += preempt.h generic-y += resource.h generic-y += scatterlist.h generic-y += sections.h@@ -31,5 +32,3 @@ generic-y += trace_clock.h generic-y += types.h generic-y += word-at-a-time.h generic-y += xor.h -generic-y += preempt.h -generic-y += hash.h