android_kernel_xiaomi_sdm845/arch/frv/include/asm
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
..
atomic.h FRV: Implement atomic64_t 2009-07-01 19:38:09 -07:00
auxvec.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
ax88796.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
bitops.h FRV: bitops: Change the bitmap index from int to unsigned long 2009-06-11 09:01:26 -07:00
bitsperlong.h asm-generic: introduce asm/bitsperlong.h 2009-06-11 21:02:14 +02:00
bug.h FRV: Stop gcc from generating uninitialised variable warnings after BUG() 2009-04-27 08:04:49 -07:00
bugs.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
busctl-regs.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
byteorder.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
cache.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
cacheflush.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
checksum.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
cpu-irqs.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
cpumask.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
cputime.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
current.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
delay.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
device.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
div64.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
dm9000.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
dma-mapping.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
dma.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
elf.h FRV: Implement new-style ptrace 2009-06-11 09:01:26 -07:00
emergency-restart.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
errno.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
fb.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
fcntl.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
fpu.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
ftrace.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
futex.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
gdb-stub.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
gpio-regs.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
hardirq.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
highmem.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
hw_irq.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
io.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
ioctl.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
ioctls.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
ipcbuf.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
irc-regs.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
irq_regs.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
irq.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
Kbuild FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
kdebug.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
kmap_types.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
linkage.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
local.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
math-emu.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
mb86943a.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
mb93091-fpga-irqs.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
mb93093-fpga-irqs.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
mb93493-irqs.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
mb93493-regs.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
mb-regs.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
mc146818rtc.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
mem-layout.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
mman.h asm-generic: rename termios.h, signal.h and mman.h 2009-06-11 21:01:52 +02:00
mmu_context.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
mmu.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
module.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
msgbuf.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
mutex.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
page.h asm-generic: rename page.h and uaccess.h 2009-06-11 21:02:17 +02:00
param.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
pci.h asm-generic: merge branch 'master' of torvalds/linux-2.6 2009-06-12 11:32:58 +02:00
percpu.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
pgalloc.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
pgtable.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
poll.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
posix_types.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
processor.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
ptrace.h FRV: Implement new-style ptrace 2009-06-11 09:01:26 -07:00
registers.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
resource.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
scatterlist.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
sections.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
segment.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
sembuf.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
serial-regs.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
serial.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
setup.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
shmbuf.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
shmparam.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
sigcontext.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
siginfo.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
signal.h FRV: Fix interaction with new generic header stuff 2009-06-13 13:17:28 -07:00
smp.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
socket.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
sockios.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
spinlock.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
spr-regs.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
stat.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
statfs.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
string.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
suspend.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
swab.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
syscall.h FRV: Implement new-style ptrace 2009-06-11 09:01:26 -07:00
system.h FRV: Implement atomic64_t 2009-07-01 19:38:09 -07:00
termbits.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
termios.h asm-generic: rename termios.h, signal.h and mman.h 2009-06-11 21:01:52 +02:00
thread_info.h FRV: Implement TIF_NOTIFY_RESUME 2009-06-11 09:01:26 -07:00
timer-regs.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
timex.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
tlb.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
tlbflush.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
topology.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
types.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
uaccess.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
ucontext.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
unaligned.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
unistd.h FRV: Wire up new syscalls 2009-06-30 18:58:37 -07:00
user.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
vga.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
virtconvert.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00
xor.h FRV: Move to arch/frv/include/asm/ 2009-04-10 01:48:06 +01:00