* [PATCH 2/3] m68k: Switch to asm-generic/barrier.h
[not found] <1391544954-7422-1-git-send-email-geert@linux-m68k.org>
@ 2014-02-04 20:15 ` Geert Uytterhoeven
2014-02-04 20:15 ` [PATCH 3/3] m68k: Wire up sched_setattr and sched_getattr Geert Uytterhoeven
` (3 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2014-02-04 20:15 UTC (permalink / raw)
To: linux-m68k, Greg Ungerer; +Cc: linux-kernel, Geert Uytterhoeven
The generic nop() implementation is fine for m68k.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
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
diff --git a/arch/m68k/include/asm/Kbuild b/arch/m68k/include/asm/Kbuild
index df4d46fc321b..6fb9e813a910 100644
--- a/arch/m68k/include/asm/Kbuild
+++ b/arch/m68k/include/asm/Kbuild
@@ -1,3 +1,4 @@
+generic-y += barrier.h
generic-y += bitsperlong.h
generic-y += clkdev.h
generic-y += cputime.h
diff --git a/arch/m68k/include/asm/barrier.h b/arch/m68k/include/asm/barrier.h
deleted file mode 100644
index 15c5f77c1614..000000000000
--- a/arch/m68k/include/asm/barrier.h
+++ /dev/null
@@ -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 */
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 3/3] m68k: Wire up sched_setattr and sched_getattr
[not found] <1391544954-7422-1-git-send-email-geert@linux-m68k.org>
2014-02-04 20:15 ` [PATCH 2/3] m68k: Switch to asm-generic/barrier.h Geert Uytterhoeven
@ 2014-02-04 20:15 ` Geert Uytterhoeven
2014-02-05 0:59 ` [PATCH 1/3] m68k: Sort arch/m68k/include/asm/Kbuild Greg Ungerer
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2014-02-04 20:15 UTC (permalink / raw)
To: linux-m68k, Greg Ungerer; +Cc: linux-kernel, Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
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(-)
diff --git a/arch/m68k/include/asm/unistd.h b/arch/m68k/include/asm/unistd.h
index 014f288fc813..9d38b73989eb 100644
--- a/arch/m68k/include/asm/unistd.h
+++ b/arch/m68k/include/asm/unistd.h
@@ -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
diff --git a/arch/m68k/include/uapi/asm/unistd.h b/arch/m68k/include/uapi/asm/unistd.h
index 625f321001dc..b932dd470041 100644
--- a/arch/m68k/include/uapi/asm/unistd.h
+++ b/arch/m68k/include/uapi/asm/unistd.h
@@ -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_ */
diff --git a/arch/m68k/kernel/syscalltable.S b/arch/m68k/kernel/syscalltable.S
index 3f04ea0ab802..b6223dc41d82 100644
--- a/arch/m68k/kernel/syscalltable.S
+++ b/arch/m68k/kernel/syscalltable.S
@@ -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 */
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH 1/3] m68k: Sort arch/m68k/include/asm/Kbuild
[not found] <1391544954-7422-1-git-send-email-geert@linux-m68k.org>
2014-02-04 20:15 ` [PATCH 2/3] m68k: Switch to asm-generic/barrier.h Geert Uytterhoeven
2014-02-04 20:15 ` [PATCH 3/3] m68k: Wire up sched_setattr and sched_getattr Geert Uytterhoeven
@ 2014-02-05 0:59 ` Greg Ungerer
[not found] ` <1391544954-7422-2-git-send-email-geert@linux-m68k.org>
[not found] ` <1391544954-7422-3-git-send-email-geert@linux-m68k.org>
4 siblings, 0 replies; 8+ messages in thread
From: Greg Ungerer @ 2014-02-05 0:59 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: linux-m68k, linux-kernel
On 05/02/14 06:15, Geert Uytterhoeven wrote:
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Greg Ungerer <gerg@uclinux.org>
> ---
> arch/m68k/include/asm/Kbuild | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/arch/m68k/include/asm/Kbuild b/arch/m68k/include/asm/Kbuild
> index 7cc8c364924d..df4d46fc321b 100644
> --- a/arch/m68k/include/asm/Kbuild
> +++ b/arch/m68k/include/asm/Kbuild
> @@ -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
>
^ permalink raw reply [flat|nested] 8+ messages in thread[parent not found: <1391544954-7422-2-git-send-email-geert@linux-m68k.org>]
* Re: [PATCH 2/3] m68k: Switch to asm-generic/barrier.h
[not found] ` <1391544954-7422-2-git-send-email-geert@linux-m68k.org>
@ 2014-02-05 0:59 ` Greg Ungerer
2014-02-05 1:03 ` Finn Thain
1 sibling, 0 replies; 8+ messages in thread
From: Greg Ungerer @ 2014-02-05 0:59 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: linux-m68k, linux-kernel
On 05/02/14 06:15, Geert Uytterhoeven wrote:
> The generic nop() implementation is fine for m68k.
>
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Greg Ungerer <gerg@uclinux.org>
> ---
> 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
>
> diff --git a/arch/m68k/include/asm/Kbuild b/arch/m68k/include/asm/Kbuild
> index df4d46fc321b..6fb9e813a910 100644
> --- a/arch/m68k/include/asm/Kbuild
> +++ b/arch/m68k/include/asm/Kbuild
> @@ -1,3 +1,4 @@
> +generic-y += barrier.h
> generic-y += bitsperlong.h
> generic-y += clkdev.h
> generic-y += cputime.h
> diff --git a/arch/m68k/include/asm/barrier.h b/arch/m68k/include/asm/barrier.h
> deleted file mode 100644
> index 15c5f77c1614..000000000000
> --- a/arch/m68k/include/asm/barrier.h
> +++ /dev/null
> @@ -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 */
>
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH 2/3] m68k: Switch to asm-generic/barrier.h
[not found] ` <1391544954-7422-2-git-send-email-geert@linux-m68k.org>
2014-02-05 0:59 ` [PATCH 2/3] m68k: Switch to asm-generic/barrier.h Greg Ungerer
@ 2014-02-05 1:03 ` Finn Thain
2014-02-05 7:47 ` Geert Uytterhoeven
1 sibling, 1 reply; 8+ messages in thread
From: Finn Thain @ 2014-02-05 1:03 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: linux-m68k
On Tue, 4 Feb 2014, Geert Uytterhoeven wrote:
> 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
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH 2/3] m68k: Switch to asm-generic/barrier.h
2014-02-05 1:03 ` Finn Thain
@ 2014-02-05 7:47 ` Geert Uytterhoeven
2014-02-06 7:05 ` Finn Thain
0 siblings, 1 reply; 8+ messages in thread
From: Geert Uytterhoeven @ 2014-02-05 7:47 UTC (permalink / raw)
To: Finn Thain; +Cc: linux-m68k
Hi Finn,
On Wed, Feb 5, 2014 at 2:03 AM, Finn Thain <fthain@telegraphics.com.au> wrote:
> On Tue, 4 Feb 2014, Geert Uytterhoeven wrote:
>> 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 -- geert@linux-m68k.org
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
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH 2/3] m68k: Switch to asm-generic/barrier.h
2014-02-05 7:47 ` Geert Uytterhoeven
@ 2014-02-06 7:05 ` Finn Thain
0 siblings, 0 replies; 8+ messages in thread
From: Finn Thain @ 2014-02-06 7:05 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: linux-m68k
On Wed, 5 Feb 2014, Geert Uytterhoeven wrote:
>
> #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.
>
> 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
^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <1391544954-7422-3-git-send-email-geert@linux-m68k.org>]
* Re: [PATCH 3/3] m68k: Wire up sched_setattr and sched_getattr
[not found] ` <1391544954-7422-3-git-send-email-geert@linux-m68k.org>
@ 2014-02-05 1:00 ` Greg Ungerer
0 siblings, 0 replies; 8+ messages in thread
From: Greg Ungerer @ 2014-02-05 1:00 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: linux-m68k, linux-kernel
On 05/02/14 06:15, Geert Uytterhoeven wrote:
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Greg Ungerer <gerg@uclinux.org>
> ---
> 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(-)
>
> diff --git a/arch/m68k/include/asm/unistd.h b/arch/m68k/include/asm/unistd.h
> index 014f288fc813..9d38b73989eb 100644
> --- a/arch/m68k/include/asm/unistd.h
> +++ b/arch/m68k/include/asm/unistd.h
> @@ -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
> diff --git a/arch/m68k/include/uapi/asm/unistd.h b/arch/m68k/include/uapi/asm/unistd.h
> index 625f321001dc..b932dd470041 100644
> --- a/arch/m68k/include/uapi/asm/unistd.h
> +++ b/arch/m68k/include/uapi/asm/unistd.h
> @@ -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_ */
> diff --git a/arch/m68k/kernel/syscalltable.S b/arch/m68k/kernel/syscalltable.S
> index 3f04ea0ab802..b6223dc41d82 100644
> --- a/arch/m68k/kernel/syscalltable.S
> +++ b/arch/m68k/kernel/syscalltable.S
> @@ -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 */
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread