linux/arch/frv/kernel
David Howells 00460f41ff FRV: Implement atomic64_t
Implement atomic64_t and its ops for FRV.  Tested with the following patch:

	diff --git a/arch/frv/kernel/setup.c b/arch/frv/kernel/setup.c
	index 55e4fab..086d50d 100644
	--- a/arch/frv/kernel/setup.c
	+++ b/arch/frv/kernel/setup.c
	@@ -746,6 +746,52 @@ static void __init parse_cmdline_early(char *cmdline)

	 } /* end parse_cmdline_early() */

	+static atomic64_t xxx;
	+
	+static void test_atomic64(void)
	+{
	+	atomic64_set(&xxx, 0x12300000023LL);
	+
	+	mb();
	+	BUG_ON(atomic64_read(&xxx) != 0x12300000023LL);
	+	mb();
	+	if (atomic64_inc_return(&xxx) != 0x12300000024LL)
	+		BUG();
	+	mb();
	+	BUG_ON(atomic64_read(&xxx) != 0x12300000024LL);
	+	mb();
	+	if (atomic64_sub_return(0x36900000050LL, &xxx) != -0x2460000002cLL)
	+		BUG();
	+	mb();
	+	BUG_ON(atomic64_read(&xxx) != -0x2460000002cLL);
	+	mb();
	+	if (atomic64_dec_return(&xxx) != -0x2460000002dLL)
	+		BUG();
	+	mb();
	+	BUG_ON(atomic64_read(&xxx) != -0x2460000002dLL);
	+	mb();
	+	if (atomic64_add_return(0x36800000001LL, &xxx) != 0x121ffffffd4LL)
	+		BUG();
	+	mb();
	+	BUG_ON(atomic64_read(&xxx) != 0x121ffffffd4LL);
	+	mb();
	+	if (atomic64_cmpxchg(&xxx, 0x123456789abcdefLL, 0x121ffffffd4LL) != 0x121ffffffd4LL)
	+		BUG();
	+	mb();
	+	BUG_ON(atomic64_read(&xxx) != 0x121ffffffd4LL);
	+	mb();
	+	if (atomic64_cmpxchg(&xxx, 0x121ffffffd4LL, 0x123456789abcdefLL) != 0x121ffffffd4LL)
	+		BUG();
	+	mb();
	+	BUG_ON(atomic64_read(&xxx) != 0x123456789abcdefLL);
	+	mb();
	+	if (atomic64_xchg(&xxx, 0xabcdef123456789LL) != 0x123456789abcdefLL)
	+		BUG();
	+	mb();
	+	BUG_ON(atomic64_read(&xxx) != 0xabcdef123456789LL);
	+	mb();
	+}
	+
	 /*****************************************************************************/
	 /*
	  *
	@@ -845,6 +891,8 @@ void __init setup_arch(char **cmdline_p)
	 //	asm volatile("movgs %0,timerd" :: "r"(10000000));
	 //	__set_HSR(0, __get_HSR(0) | HSR0_ETMD);

	+	test_atomic64();
	+
	 } /* end setup_arch() */

	 #if 0

Note that this doesn't cover all the trivial wrappers, but does cover all the
substantial implementations.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-07-01 19:38:09 -07:00
..
Makefile Generic semaphore implementation 2008-04-17 10:42:34 -04:00
asm-offsets.c frv: use kbuild.h instead of defining macros in asm-offsets.c 2008-04-29 08:06:30 -07:00
break.S FRV: arrange things such that BRA can reach from the trap table 2007-11-29 09:24:54 -08:00
cmode.S Fix various old email addresses for dwmw2 2008-06-06 11:29:10 -07:00
debug-stub.c [PATCH] FRV: Introduce asm-offsets for FRV arch 2006-07-10 13:24:22 -07:00
dma.c IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
entry-table.S FRV: Add support for emulation of userspace atomic ops [try #2] 2008-04-10 13:41:29 -07:00
entry.S FRV: Wire up new syscalls 2009-06-30 18:58:37 -07:00
frv_ksyms.c FRV: Implement atomic64_t 2009-07-01 19:38:09 -07:00
futex.c [PATCH] arch/frv/kernel/futex.c must #include <linux/uaccess.h> 2006-12-07 08:39:26 -08:00
gdb-io.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
gdb-io.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
gdb-stub.c frv: use the common ascii hex helpers 2008-07-26 12:00:05 -07:00
head-mmu-fr451.S FRV: Use __INIT macro instead of .text.init. 2009-04-27 19:46:30 -07:00
head-uc-fr401.S FRV: Use __INIT macro instead of .text.init. 2009-04-27 19:46:30 -07:00
head-uc-fr451.S FRV: Use __INIT macro instead of .text.init. 2009-04-27 19:46:30 -07:00
head-uc-fr555.S FRV: Use __INIT macro instead of .text.init. 2009-04-27 19:46:30 -07:00
head.S frv: convert frv to use __HEAD and HEAD_TEXT macros. 2009-04-26 09:20:38 -07:00
head.inc FRV: Make NOMMU-mode work with base addresses other than 0xC0000000 [try #2] 2008-04-10 13:41:29 -07:00
init_task.c mm: consolidate init_mm definition 2009-06-16 19:47:28 -07:00
irq-mb93091.c cpumask: remove references to struct irqaction's mask field. 2009-03-30 22:05:14 +10:30
irq-mb93093.c cpumask: remove references to struct irqaction's mask field. 2009-03-30 22:05:14 +10:30
irq-mb93493.c cpumask: remove references to struct irqaction's mask field. 2009-03-30 22:05:14 +10:30
irq.c sparseirq: use kstat_irqs_cpu instead 2009-01-11 15:53:13 +01:00
kernel_execve.S [PATCH] provide kernel_execve on all architectures 2006-10-02 07:57:23 -07:00
kernel_thread.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
local.h [PATCH] FRV: Fix FRV arch compile errors 2006-07-10 13:24:21 -07:00
module.c module: cleanup FIXME comments about trimming exception table entries. 2009-06-12 21:47:05 +09:30
pm-mb93093.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
pm.c sysctl: simplify ->strategy 2008-10-16 11:21:47 -07:00
process.c Simplify copy_thread() 2009-04-02 19:04:51 -07:00
ptrace.c FRV: Implement new-style ptrace 2009-06-11 09:01:26 -07:00
setup.c FRV: Don't attempt to #include <linux/blk.h> as it doesn't exist 2009-04-20 08:12:59 -07:00
signal.c FRV: Implement new-style ptrace 2009-06-11 09:01:26 -07:00
sleep.S Fix various old email addresses for dwmw2 2008-06-06 11:29:10 -07:00
switch_to.S FRV: Make NOMMU-mode work with base addresses other than 0xC0000000 [try #2] 2008-04-10 13:41:29 -07:00
sys_frv.c frv: fix mmap2 error handling 2008-12-01 19:55:24 -08:00
sysctl.c [PATCH] sysctl: remove insert_at_head from register_sysctl 2007-02-14 08:09:59 -08:00
time.c cpumask: remove references to struct irqaction's mask field. 2009-03-30 22:05:14 +10:30
traps.c kernel: Move arches to use common unaligned access 2008-04-29 08:06:27 -07:00
uaccess.c FRV: BUG to BUG_ON changes 2009-06-11 09:01:26 -07:00
vmlinux.lds.S frv: convert frv to use __HEAD and HEAD_TEXT macros. 2009-04-26 09:20:38 -07:00