Skip to contentSkip to conversation

m68k: Sort arch/m68k/include/asm/Kbuild

PATCH In review Geert Uytterhoeven 3 participants 12 messages Feb 4, 2014 – Feb 6, 2014 m68k architecture

lore
Share & tools
lore

Geert Uytterhoeven

author maintainer
#0 lore raw

PATCH 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
index 7cc8c364924d..df4d46fc321b 100644
@@ -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
author maintainer
#1 lore raw

PATCH 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
index df4d46fc321b..6fb9e813a910 100644
@@ -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
deleted file mode 100644
index 15c5f77c1614..000000000000
@@ -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
author maintainer
#2 lore raw

PATCH 2/3 m68k: Switch to asm-generic/barrier.h

In reply to Geert Uytterhoeven

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
index df4d46fc321b..6fb9e813a910 100644
@@ -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
deleted file mode 100644
index 15c5f77c1614..000000000000
@@ -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
Acked-by on v1 2/3
#3 lore raw

Re: [PATCH 2/3] m68k: Switch to asm-generic/barrier.h

Quoted 3 lines · Geert Uytterhoeven

The generic nop() implementation is fine for m68k.

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.h
arch/m68k/include/asm/Kbuild +1 -0
index df4d46fc321b..6fb9e813a910 100644
@@ -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
deleted file mode 100644
index 15c5f77c1614..000000000000
@@ -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 */
#4 lore raw

Re: [PATCH 2/3] m68k: Switch to asm-generic/barrier.h

In reply to Geert Uytterhoeven
Quoted 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

author maintainer
#5 lore raw

Re: [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 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?

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

#6 lore raw

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

Acked-by on v1 2/3
#7 lore raw

Re: [PATCH 2/3] m68k: Switch to asm-generic/barrier.h

In reply to Geert Uytterhoeven
Quoted 3 lines · Geert Uytterhoeven

The generic nop() implementation is fine for m68k.

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.h
arch/m68k/include/asm/Kbuild +1 -0
index df4d46fc321b..6fb9e813a910 100644
@@ -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
deleted file mode 100644
index 15c5f77c1614..000000000000
@@ -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 */
author maintainer
#8 lore raw

PATCH 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
index 014f288fc813..9d38b73989eb 100644
@@ -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
index 625f321001dc..b932dd470041 100644
@@ -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
index 3f04ea0ab802..b6223dc41d82 100644
@@ -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
author maintainer
#9 lore raw

PATCH 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
index 014f288fc813..9d38b73989eb 100644
@@ -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
index 625f321001dc..b932dd470041 100644
@@ -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
index 3f04ea0ab802..b6223dc41d82 100644
@@ -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
Acked-by on v1 3/3
#10 lore raw

Re: [PATCH 3/3] m68k: Wire up sched_setattr and sched_getattr

Quoted 1 line · Geert Uytterhoeven
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
index 014f288fc813..9d38b73989eb 100644
@@ -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
index 625f321001dc..b932dd470041 100644
@@ -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
index 3f04ea0ab802..b6223dc41d82 100644
@@ -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 */
 
Acked-by on v1 1/3
#11 lore raw
In reply to Geert Uytterhoeven
Quoted 1 line · Geert Uytterhoeven
Quoted 36 lines
---
 arch/m68k/include/asm/Kbuild |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
arch/m68k/include/asm/Kbuild +2 -3
index 7cc8c364924d..df4d46fc321b 100644
@@ -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