* [PATCH] mn10300: select generic atomic64_t support
@ 2012-08-14 15:17 Fengguang Wu
2012-12-28 22:15 ` Geert Uytterhoeven
0 siblings, 1 reply; 2+ messages in thread
From: Fengguang Wu @ 2012-08-14 15:17 UTC (permalink / raw)
To: David Howells
Cc: Koichi Yasutake, Eric W. Biederman, linux-am33-list, linux-kernel
Rationals from Eric:
So I just looked a little deeper and it appears architectures that do
not support atomic64_t are broken.
The generic atomic64 support came in 2009 to support the perf subsystem
with the expectation that all architectures would implement atomic64
support.
Furthermore upon inspection of the kernel atomic64_t is used in a fair
number of places beyond the performance counters:
block/blk-cgroup.c
drivers/acpi/apei/
drivers/block/rbd.c
drivers/crypto/nx/nx.h
drivers/gpu/drm/radeon/radeon.h
drivers/infiniband/hw/ipath/
drivers/infiniband/hw/qib/
drivers/staging/octeon/
fs/xfs/
include/linux/perf_event.h
include/net/netfilter/nf_conntrack_acct.h
kernel/events/
kernel/trace/
net/mac80211/key.h
net/rds/
The block control group, infiniband, xfs, crypto, 802.11, netfilter.
Nothing quite so fundamental as fs/namespace.c but definitely in
multiplatform-code that should work, and is already broken on those
architecutres.
Looking at the implementation of atomic64_add_return in lib/atomic64.c
the code looks as efficient as these kinds of things get.
Which leads me to the conclusion that we need atomic64 support on all
architectures.
CC: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
arch/mn10300/Kconfig | 1 +
1 file changed, 1 insertion(+)
--- linux.orig/arch/mn10300/Kconfig 2012-08-03 15:36:21.391560778 +0800
+++ linux/arch/mn10300/Kconfig 2012-08-14 22:53:14.751795832 +0800
@@ -8,6 +8,7 @@ config MN10300
select HAVE_ARCH_KGDB
select HAVE_NMI_WATCHDOG if MN10300_WD_TIMER
select GENERIC_CLOCKEVENTS
+ select GENERIC_ATOMIC64
config AM33_2
def_bool n
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] mn10300: select generic atomic64_t support
2012-08-14 15:17 [PATCH] mn10300: select generic atomic64_t support Fengguang Wu
@ 2012-12-28 22:15 ` Geert Uytterhoeven
0 siblings, 0 replies; 2+ messages in thread
From: Geert Uytterhoeven @ 2012-12-28 22:15 UTC (permalink / raw)
To: Fengguang Wu, Andrew Morton
Cc: David Howells, Koichi Yasutake, Eric W. Biederman,
linux-am33-list, linux-kernel
On Tue, Aug 14, 2012 at 5:17 PM, Fengguang Wu <fengguang.wu@intel.com> wrote:
> Rationals from Eric:
>
> So I just looked a little deeper and it appears architectures that do
> not support atomic64_t are broken.
>
> The generic atomic64 support came in 2009 to support the perf subsystem
> with the expectation that all architectures would implement atomic64
> support.
>
> Furthermore upon inspection of the kernel atomic64_t is used in a fair
> number of places beyond the performance counters:
>
> block/blk-cgroup.c
> drivers/acpi/apei/
> drivers/block/rbd.c
> drivers/crypto/nx/nx.h
> drivers/gpu/drm/radeon/radeon.h
> drivers/infiniband/hw/ipath/
> drivers/infiniband/hw/qib/
> drivers/staging/octeon/
> fs/xfs/
> include/linux/perf_event.h
> include/net/netfilter/nf_conntrack_acct.h
> kernel/events/
> kernel/trace/
> net/mac80211/key.h
> net/rds/
>
> The block control group, infiniband, xfs, crypto, 802.11, netfilter.
> Nothing quite so fundamental as fs/namespace.c but definitely in
> multiplatform-code that should work, and is already broken on those
> architecutres.
>
> Looking at the implementation of atomic64_add_return in lib/atomic64.c
> the code looks as efficient as these kinds of things get.
>
> Which leads me to the conclusion that we need atomic64 support on all
> architectures.
>
> CC: "Eric W. Biederman" <ebiederm@xmission.com>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
> ---
> arch/mn10300/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> --- linux.orig/arch/mn10300/Kconfig 2012-08-03 15:36:21.391560778 +0800
> +++ linux/arch/mn10300/Kconfig 2012-08-14 22:53:14.751795832 +0800
> @@ -8,6 +8,7 @@ config MN10300
> select HAVE_ARCH_KGDB
> select HAVE_NMI_WATCHDOG if MN10300_WD_TIMER
> select GENERIC_CLOCKEVENTS
> + select GENERIC_ATOMIC64
>
> config AM33_2
> def_bool n
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] 2+ messages in thread
end of thread, other threads:[~2012-12-28 22:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-14 15:17 [PATCH] mn10300: select generic atomic64_t support Fengguang Wu
2012-12-28 22:15 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox