You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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>
|
16 years ago |
.. |
Makefile
|
…
|
|
asm-offsets.c
|
…
|
|
break.S
|
…
|
|
cmode.S
|
…
|
|
debug-stub.c
|
…
|
|
dma.c
|
…
|
|
entry-table.S
|
…
|
|
entry.S
|
FRV: Wire up new syscalls
|
16 years ago |
frv_ksyms.c
|
FRV: Implement atomic64_t
|
16 years ago |
futex.c
|
…
|
|
gdb-io.c
|
…
|
|
gdb-io.h
|
…
|
|
gdb-stub.c
|
…
|
|
head-mmu-fr451.S
|
FRV: Use __INIT macro instead of .text.init.
|
16 years ago |
head-uc-fr401.S
|
FRV: Use __INIT macro instead of .text.init.
|
16 years ago |
head-uc-fr451.S
|
FRV: Use __INIT macro instead of .text.init.
|
16 years ago |
head-uc-fr555.S
|
FRV: Use __INIT macro instead of .text.init.
|
16 years ago |
head.S
|
frv: convert frv to use __HEAD and HEAD_TEXT macros.
|
16 years ago |
head.inc
|
…
|
|
init_task.c
|
mm: consolidate init_mm definition
|
16 years ago |
irq-mb93091.c
|
cpumask: remove references to struct irqaction's mask field.
|
16 years ago |
irq-mb93093.c
|
cpumask: remove references to struct irqaction's mask field.
|
16 years ago |
irq-mb93493.c
|
cpumask: remove references to struct irqaction's mask field.
|
16 years ago |
irq.c
|
…
|
|
kernel_execve.S
|
…
|
|
kernel_thread.S
|
…
|
|
local.h
|
…
|
|
module.c
|
module: cleanup FIXME comments about trimming exception table entries.
|
16 years ago |
pm-mb93093.c
|
…
|
|
pm.c
|
…
|
|
process.c
|
Simplify copy_thread()
|
16 years ago |
ptrace.c
|
FRV: Implement new-style ptrace
|
16 years ago |
setup.c
|
FRV: Don't attempt to #include <linux/blk.h> as it doesn't exist
|
16 years ago |
signal.c
|
FRV: Implement new-style ptrace
|
16 years ago |
sleep.S
|
…
|
|
switch_to.S
|
…
|
|
sys_frv.c
|
…
|
|
sysctl.c
|
…
|
|
time.c
|
cpumask: remove references to struct irqaction's mask field.
|
16 years ago |
traps.c
|
…
|
|
uaccess.c
|
FRV: BUG to BUG_ON changes
|
16 years ago |
vmlinux.lds.S
|
frv: convert frv to use __HEAD and HEAD_TEXT macros.
|
16 years ago |