Skip to contentSkip to conversation

m68k: add generic atomic64_t support

PATCH In review Fengguang Wu 3 participants 5 messages Aug 12, 2012 – Aug 13, 2012 m68k architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 m68k: add generic atomic64_t support

This fixes build errors like:

fs/namespace.c:2290:1: error: unknown type name 'atomic64_t'
fs/namespace.c:2290:1: error: implicit declaration of function 'ATOMIC64_INIT' [-Werror=implicit-function-declaration] fs/namespace.c:2290:1: error: initializer element is not constant
fs/namespace.c: In function 'alloc_mnt_ns':
fs/namespace.c:2299:2: error: implicit declaration of function 'atomic64_add_return' [-Werror=implicit-function-declaration]

---
 arch/m68k/Kconfig |    1 +
 1 file changed, 1 insertion(+)
arch/m68k/Kconfig +1 -0
@@ -12,6 +12,7 @@ config M68K
 	select FPU if MMU
 	select ARCH_WANT_IPC_PARSE_VERSION
 	select ARCH_USES_GETTIMEOFFSET if MMU && !COLDFIRE
+	select GENERIC_ATOMIC64
 
 config RWSEM_GENERIC_SPINLOCK
 	bool
#1 lore raw

Hi Fengguang,

Quoted 16 lines · Fengguang Wu

This fixes build errors like:

fs/namespace.c:2290:1: error: unknown type name 'atomic64_t'
fs/namespace.c:2290:1: error: implicit declaration of function 'ATOMIC64_INIT' [-Werror=implicit-function-declaration] fs/namespace.c:2290:1: error: initializer element is not constant
fs/namespace.c: In function 'alloc_mnt_ns':
fs/namespace.c:2299:2: error: implicit declaration of function 'atomic64_add_return' [-Werror=implicit-function-declaration]

---
 arch/m68k/Kconfig |    1 +
 1 file changed, 1 insertion(+)

arch/m68k/Kconfig 2012-08-12 22:19:56.202624988 +0800 config M68K · line 15

Quoted 4 lines
arch/m68k/Kconfig 2012-08-12 22:19:56.202624988 +0800 renamed from arch/m68k/Kconfig 2012-08-12 21:15:49.730533572 +0800 +1 -0
@@ -12,6 +12,7 @@ config M68K
        select FPU if MMU
        select ARCH_WANT_IPC_PARSE_VERSION
        select ARCH_USES_GETTIMEOFFSET if MMU && !COLDFIRE
+       select GENERIC_ATOMIC64

For several CPU types (68020/68030/68040/68080), this is already selected in arch/m68k/Kconfig.cpu
So probably this select should be moved to cover more CPU types?

For which config do you get this build error? I can't seem to trigger it in current mainline nor -next with m5475evb_defconfig.
Does it depend on additional patches to introduce more atomic64 uses?

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

#2 lore raw
In reply to Fengguang Wu

Hi Fengguang,

Quoted 16 lines · Fengguang Wu

This fixes build errors like:

fs/namespace.c:2290:1: error: unknown type name 'atomic64_t'
fs/namespace.c:2290:1: error: implicit declaration of function 'ATOMIC64_INIT' [-Werror=implicit-function-declaration] fs/namespace.c:2290:1: error: initializer element is not constant
fs/namespace.c: In function 'alloc_mnt_ns':
fs/namespace.c:2299:2: error: implicit declaration of function 'atomic64_add_return' [-Werror=implicit-function-declaration]

---
 arch/m68k/Kconfig |    1 +
 1 file changed, 1 insertion(+)

arch/m68k/Kconfig 2012-08-12 22:19:56.202624988 +0800 config M68K · line 15

Quoted 4 lines
arch/m68k/Kconfig 2012-08-12 22:19:56.202624988 +0800 renamed from arch/m68k/Kconfig 2012-08-12 21:15:49.730533572 +0800 +1 -0
@@ -12,6 +12,7 @@ config M68K
        select FPU if MMU
        select ARCH_WANT_IPC_PARSE_VERSION
        select ARCH_USES_GETTIMEOFFSET if MMU && !COLDFIRE
+       select GENERIC_ATOMIC64

For several CPU types (68020/68030/68040/68080), this is already selected in arch/m68k/Kconfig.cpu
So probably this select should be moved to cover more CPU types?

For which config do you get this build error? I can't seem to trigger it in current mainline nor -next with m5475evb_defconfig.
Does it depend on additional patches to introduce more atomic64 uses?

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

#3 lore raw
Quoted 16 lines · Geert Uytterhoeven

Hi Fengguang,

Quoted 13 lines · Fengguang Wu

This fixes build errors like:

fs/namespace.c:2290:1: error: unknown type name 'atomic64_t'
fs/namespace.c:2290:1: error: implicit declaration of function 'ATOMIC64_INIT' [-Werror=implicit-function-declaration] fs/namespace.c:2290:1: error: initializer element is not constant
fs/namespace.c: In function 'alloc_mnt_ns':
fs/namespace.c:2299:2: error: implicit declaration of function 'atomic64_add_return' [-Werror=implicit-function-declaration]

---
 arch/m68k/Kconfig |    1 +
 1 file changed, 1 insertion(+)
Quoted 11 lines

arch/m68k/Kconfig 2012-08-12 22:19:56.202624988 +0800 config M68K · line 15

Quoted 7 lines
arch/m68k/Kconfig 2012-08-12 22:19:56.202624988 +0800 renamed from arch/m68k/Kconfig 2012-08-12 21:15:49.730533572 +0800 +1 -0
@@ -12,6 +12,7 @@ config M68K
        select FPU if MMU
        select ARCH_WANT_IPC_PARSE_VERSION
        select ARCH_USES_GETTIMEOFFSET if MMU && !COLDFIRE
+       select GENERIC_ATOMIC64

For several CPU types (68020/68030/68040/68080), this is already selected in arch/m68k/Kconfig.cpu
So probably this select should be moved to cover more CPU types?

Got it! If possible, will you do that move? You surely know it much better than me :)

Quoted 3 lines

For which config do you get this build error? I can't seem to trigger it in current mainline nor -next with m5475evb_defconfig.
Does it depend on additional patches to introduce more atomic64 uses?

Yes, it's triggered on Eric's userns tree. I just sent out another email with details. Sorry that I blindly used it as an example in the changelog, w/o foreseeing it caused reproduce trouble on your side..

Thanks,
Fengguang

#4 lore raw
In reply to Geert Uytterhoeven

Hi Geert,

Quoted 16 lines · Geert Uytterhoeven

Hi Fengguang,

Quoted 13 lines · Fengguang Wu

This fixes build errors like:

fs/namespace.c:2290:1: error: unknown type name 'atomic64_t'
fs/namespace.c:2290:1: error: implicit declaration of function 'ATOMIC64_INIT' [-Werror=implicit-function-declaration] fs/namespace.c:2290:1: error: initializer element is not constant
fs/namespace.c: In function 'alloc_mnt_ns':
fs/namespace.c:2299:2: error: implicit declaration of function 'atomic64_add_return' [-Werror=implicit-function-declaration]

---
  arch/m68k/Kconfig |    1 +
  1 file changed, 1 insertion(+)
Quoted 11 lines

arch/m68k/Kconfig 2012-08-12 22:19:56.202624988 +0800 config M68K · line 15

Quoted 7 lines
arch/m68k/Kconfig 2012-08-12 22:19:56.202624988 +0800 renamed from arch/m68k/Kconfig 2012-08-12 21:15:49.730533572 +0800 +1 -0
@@ -12,6 +12,7 @@ config M68K
         select FPU if MMU
         select ARCH_WANT_IPC_PARSE_VERSION
         select ARCH_USES_GETTIMEOFFSET if MMU && !COLDFIRE
+       select GENERIC_ATOMIC64

For several CPU types (68020/68030/68040/68080), this is already selected in arch/m68k/Kconfig.cpu
So probably this select should be moved to cover more CPU types?

I think we need CONFIG_GENERIC_ATOMC64 for all the other types too. Is there any reason we can't remove all these CPU defined ones and have a single select for m68k?

Tested and verified on a variety of ColdFire targets if I do that.

Regards
Greg

Quoted 17 lines

For which config do you get this build error? I can't seem to trigger it in current mainline nor -next with m5475evb_defconfig.
Does it depend on additional patches to introduce more atomic64 uses?

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

Signature · 5 lines
------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     [email protected]
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
8 Gardner Close                             FAX:         +61 7 3217 5323
Milton, QLD, 4064, Australia                WEB: http://www.SnapGear.com