aboutsummaryrefslogtreecommitdiff
path: root/include/asm-arm26
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 15:20:36 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 15:20:36 -0700
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-arm26
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/asm-arm26')
-rw-r--r--include/asm-arm26/a.out.h38
-rw-r--r--include/asm-arm26/assembler.h106
-rw-r--r--include/asm-arm26/atomic.h93
-rw-r--r--include/asm-arm26/bitops.h332
-rw-r--r--include/asm-arm26/bug.h17
-rw-r--r--include/asm-arm26/bugs.h15
-rw-r--r--include/asm-arm26/byteorder.h24
-rw-r--r--include/asm-arm26/cache.h11
-rw-r--r--include/asm-arm26/cacheflush.h52
-rw-r--r--include/asm-arm26/checksum.h160
-rw-r--r--include/asm-arm26/constants.h28
-rw-r--r--include/asm-arm26/cputime.h6
-rw-r--r--include/asm-arm26/current.h15
-rw-r--r--include/asm-arm26/delay.h34
-rw-r--r--include/asm-arm26/div64.h1
-rw-r--r--include/asm-arm26/dma-mapping.h2
-rw-r--r--include/asm-arm26/dma.h184
-rw-r--r--include/asm-arm26/ecard.h294
-rw-r--r--include/asm-arm26/elf.h77
-rw-r--r--include/asm-arm26/errno.h6
-rw-r--r--include/asm-arm26/fcntl.h87
-rw-r--r--include/asm-arm26/fiq.h37
-rw-r--r--include/asm-arm26/floppy.h141
-rw-r--r--include/asm-arm26/fpstate.h29
-rw-r--r--include/asm-arm26/hardirq.h41
-rw-r--r--include/asm-arm26/hardware.h110
-rw-r--r--include/asm-arm26/hdreg.h1
-rw-r--r--include/asm-arm26/ide.h34
-rw-r--r--include/asm-arm26/io.h435
-rw-r--r--include/asm-arm26/ioc.h72
-rw-r--r--include/asm-arm26/ioctl.h74
-rw-r--r--include/asm-arm26/ioctls.h81
-rw-r--r--include/asm-arm26/ipc.h1
-rw-r--r--include/asm-arm26/ipcbuf.h29
-rw-r--r--include/asm-arm26/irq.h52
-rw-r--r--include/asm-arm26/irqchip.h101
-rw-r--r--include/asm-arm26/kmap_types.h12
-rw-r--r--include/asm-arm26/leds.h51
-rw-r--r--include/asm-arm26/limits.h11
-rw-r--r--include/asm-arm26/linkage.h7
-rw-r--r--include/asm-arm26/local.h2
-rw-r--r--include/asm-arm26/locks.h161
-rw-r--r--include/asm-arm26/mach-types.h37
-rw-r--r--include/asm-arm26/map.h24
-rw-r--r--include/asm-arm26/mc146818rtc.h28
-rw-r--r--include/asm-arm26/memory.h101
-rw-r--r--include/asm-arm26/mman.h43
-rw-r--r--include/asm-arm26/mmu.h9
-rw-r--r--include/asm-arm26/mmu_context.h51
-rw-r--r--include/asm-arm26/module.h7
-rw-r--r--include/asm-arm26/msgbuf.h31
-rw-r--r--include/asm-arm26/namei.h25
-rw-r--r--include/asm-arm26/oldlatches.h37
-rw-r--r--include/asm-arm26/page.h115
-rw-r--r--include/asm-arm26/param.h33
-rw-r--r--include/asm-arm26/parport.h18
-rw-r--r--include/asm-arm26/pci.h6
-rw-r--r--include/asm-arm26/percpu.h6
-rw-r--r--include/asm-arm26/pgalloc.h70
-rw-r--r--include/asm-arm26/pgtable.h305
-rw-r--r--include/asm-arm26/poll.h25
-rw-r--r--include/asm-arm26/posix_types.h80
-rw-r--r--include/asm-arm26/proc-fns.h49
-rw-r--r--include/asm-arm26/processor.h113
-rw-r--r--include/asm-arm26/procinfo.h56
-rw-r--r--include/asm-arm26/ptrace.h104
-rw-r--r--include/asm-arm26/resource.h6
-rw-r--r--include/asm-arm26/scatterlist.h26
-rw-r--r--include/asm-arm26/sections.h2
-rw-r--r--include/asm-arm26/segment.h11
-rw-r--r--include/asm-arm26/semaphore-helper.h84
-rw-r--r--include/asm-arm26/semaphore.h103
-rw-r--r--include/asm-arm26/sembuf.h25
-rw-r--r--include/asm-arm26/serial.h63
-rw-r--r--include/asm-arm26/setup.h205
-rw-r--r--include/asm-arm26/shmbuf.h42
-rw-r--r--include/asm-arm26/shmparam.h15
-rw-r--r--include/asm-arm26/sigcontext.h33
-rw-r--r--include/asm-arm26/siginfo.h6
-rw-r--r--include/asm-arm26/signal.h201
-rw-r--r--include/asm-arm26/sizes.h52
-rw-r--r--include/asm-arm26/smp.h10
-rw-r--r--include/asm-arm26/socket.h50
-rw-r--r--include/asm-arm26/sockios.h12
-rw-r--r--include/asm-arm26/spinlock.h6
-rw-r--r--include/asm-arm26/stat.h77
-rw-r--r--include/asm-arm26/statfs.h8
-rw-r--r--include/asm-arm26/string.h43
-rw-r--r--include/asm-arm26/suspend.h4
-rw-r--r--include/asm-arm26/sysirq.h61
-rw-r--r--include/asm-arm26/system.h252
-rw-r--r--include/asm-arm26/termbits.h171
-rw-r--r--include/asm-arm26/termios.h108
-rw-r--r--include/asm-arm26/thread_info.h144
-rw-r--r--include/asm-arm26/timex.h29
-rw-r--r--include/asm-arm26/tlb.h78
-rw-r--r--include/asm-arm26/tlbflush.h70
-rw-r--r--include/asm-arm26/topology.h6
-rw-r--r--include/asm-arm26/types.h61
-rw-r--r--include/asm-arm26/uaccess-asm.h153
-rw-r--r--include/asm-arm26/uaccess.h299
-rw-r--r--include/asm-arm26/ucontext.h12
-rw-r--r--include/asm-arm26/unaligned.h118
-rw-r--r--include/asm-arm26/uncompress.h111
-rw-r--r--include/asm-arm26/unistd.h500
-rw-r--r--include/asm-arm26/user.h84
-rw-r--r--include/asm-arm26/xor.h141
107 files changed, 7919 insertions, 0 deletions
diff --git a/include/asm-arm26/a.out.h b/include/asm-arm26/a.out.h
new file mode 100644
index 00000000000..9b2702c42c8
--- /dev/null
+++ b/include/asm-arm26/a.out.h
@@ -0,0 +1,38 @@
+#ifndef __ARM_A_OUT_H__
+#define __ARM_A_OUT_H__
+
+#include <linux/personality.h>
+#include <asm/types.h>
+
+struct exec
+{
+ __u32 a_info; /* Use macros N_MAGIC, etc for access */
+ __u32 a_text; /* length of text, in bytes */
+ __u32 a_data; /* length of data, in bytes */
+ __u32 a_bss; /* length of uninitialized data area for file, in bytes */
+ __u32 a_syms; /* length of symbol table data in file, in bytes */
+ __u32 a_entry; /* start address */
+ __u32 a_trsize; /* length of relocation info for text, in bytes */
+ __u32 a_drsize; /* length of relocation info for data, in bytes */
+};
+
+/*
+ * This is always the same
+ */
+#define N_TXTADDR(a) (0x00008000)
+
+#define N_TRSIZE(a) ((a).a_trsize)
+#define N_DRSIZE(a) ((a).a_drsize)
+#define N_SYMSIZE(a) ((a).a_syms)
+
+#define M_ARM 103
+
+#ifdef __KERNEL__
+#define STACK_TOP TASK_SIZE
+#endif
+
+#ifndef LIBRARY_START_TEXT
+#define LIBRARY_START_TEXT (0x00c00000)
+#endif
+
+#endif /* __A_OUT_GNU_H__ */
diff --git a/include/asm-arm26/assembler.h b/include/asm-arm26/assembler.h
new file mode 100644
index 00000000000..83f9aec55e4
--- /dev/null
+++ b/include/asm-arm26/assembler.h
@@ -0,0 +1,106 @@
+/*
+ * linux/asm/assembler.h
+ *
+ * This file contains arm architecture specific defines
+ * for the different processors.
+ *
+ * Do not include any C declarations in this file - it is included by
+ * assembler source.
+ */
+#ifndef __ASSEMBLY__
+#error "Only include this from assembly code"
+#endif
+
+/*
+ * Endian independent macros for shifting bytes within registers.
+ */
+#define pull lsr
+#define push lsl
+#define byte(x) (x*8)
+
+#ifdef __STDC__
+#define LOADREGS(cond, base, reglist...)\
+ ldm##cond base,reglist^
+
+#define RETINSTR(instr, regs...)\
+ instr##s regs
+#else
+#define LOADREGS(cond, base, reglist...)\
+ ldm/**/cond base,reglist^
+
+#define RETINSTR(instr, regs...)\
+ instr/**/s regs
+#endif
+
+#define MODENOP\
+ mov r0, r0
+
+#define MODE(savereg,tmpreg,mode) \
+ mov savereg, pc; \
+ bic tmpreg, savereg, $0x0c000003; \
+ orr tmpreg, tmpreg, $mode; \
+ teqp tmpreg, $0
+
+#define RESTOREMODE(savereg) \
+ teqp savereg, $0
+
+#define SAVEIRQS(tmpreg)
+
+#define RESTOREIRQS(tmpreg)
+
+#define DISABLEIRQS(tmpreg)\
+ teqp pc, $0x08000003
+
+#define ENABLEIRQS(tmpreg)\
+ teqp pc, $0x00000003
+
+#define USERMODE(tmpreg)\
+ teqp pc, $0x00000000;\
+ mov r0, r0
+
+#define SVCMODE(tmpreg)\
+ teqp pc, $0x00000003;\
+ mov r0, r0
+
+
+/*
+ * Save the current IRQ state and disable IRQs
+ * Note that this macro assumes FIQs are enabled, and
+ * that the processor is in SVC mode.
+ */
+ .macro save_and_disable_irqs, oldcpsr, temp
+ mov \oldcpsr, pc
+ orr \temp, \oldcpsr, #0x08000000
+ teqp \temp, #0
+ .endm
+
+/*
+ * Restore interrupt state previously stored in
+ * a register
+ * ** Actually do nothing on Arc - hope that the caller uses a MOVS PC soon
+ * after!
+ */
+ .macro restore_irqs, oldcpsr
+ @ This be restore_irqs
+ .endm
+
+/*
+ * These two are used to save LR/restore PC over a user-based access.
+ * The old 26-bit architecture requires that we save lr (R14)
+ */
+ .macro save_lr
+ str lr, [sp, #-4]!
+ .endm
+
+ .macro restore_pc
+ ldmfd sp!, {pc}^
+ .endm
+
+#define USER(x...) \
+9999: x; \
+ .section __ex_table,"a"; \
+ .align 3; \
+ .long 9999b,9001f; \
+ .previous
+
+
diff --git a/include/asm-arm26/atomic.h b/include/asm-arm26/atomic.h
new file mode 100644
index 00000000000..4a88235c0e7
--- /dev/null
+++ b/include/asm-arm26/atomic.h
@@ -0,0 +1,93 @@
+/*
+ * linux/include/asm-arm26/atomic.h
+ *
+ * Copyright (c) 1996 Russell King.
+ * Modified for arm26 by Ian Molton
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Changelog:
+ * 25-11-2004 IM Updated for 2.6.9
+ * 27-06-1996 RMK Created
+ * 13-04-1997 RMK Made functions atomic!
+ * 07-12-1997 RMK Upgraded for v2.1.
+ * 26-08-1998 PJB Added #ifdef __KERNEL__
+ *
+ * FIXME - its probably worth seeing what these compile into...
+ */
+#ifndef __ASM_ARM_ATOMIC_H
+#define __ASM_ARM_ATOMIC_H
+
+#include <linux/config.h>
+
+#ifdef CONFIG_SMP
+#error SMP is NOT supported
+#endif
+
+typedef struct { volatile int counter; } atomic_t;
+
+#define ATOMIC_INIT(i) { (i) }
+
+#ifdef __KERNEL__
+#include <asm/system.h>
+
+#define atomic_read(v) ((v)->counter)
+#define atomic_set(v,i) (((v)->counter) = (i))
+
+static inline int atomic_add_return(int i, atomic_t *v)
+{
+ unsigned long flags;
+ int val;
+
+ local_irq_save(flags);
+ val = v->counter;
+ v->counter = val += i;
+ local_irq_restore(flags);
+
+ return val;
+}
+
+static inline int atomic_sub_return(int i, atomic_t *v)
+{
+ unsigned long flags;
+ int val;
+
+ local_irq_save(flags);
+ val = v->counter;
+ v->counter = val -= i;
+ local_irq_restore(flags);
+
+ return val;
+}
+
+static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
+{
+ unsigned long flags;
+
+ local_irq_save(flags);
+ *addr &= ~mask;
+ local_irq_restore(flags);
+}
+
+#define atomic_add(i, v) (void) atomic_add_return(i, v)
+#define atomic_inc(v) (void) atomic_add_return(1, v)
+#define atomic_sub(i, v) (void) atomic_sub_return(i, v)
+#define atomic_dec(v) (void) atomic_sub_return(1, v)
+
+#define atomic_inc_and_test(v) (atomic_add_return(1, v) == 0)
+#define atomic_dec_and_test(v) (atomic_sub_return(1, v) == 0)
+#define atomic_inc_return(v) (atomic_add_return(1, v))
+#define atomic_dec_return(v) (atomic_sub_return(1, v))
+
+#define atomic_add_negative(i,v) (atomic_add_return(i, v) < 0)
+
+/* Atomic operations are already serializing on ARM26 */
+#define smp_mb__before_atomic_dec() barrier()
+#define smp_mb__after_atomic_dec() barrier()
+#define smp_mb__before_atomic_inc() barrier()
+#define smp_mb__after_atomic_inc() barrier()
+
+#endif
+#endif
diff --git a/include/asm-arm26/bitops.h b/include/asm-arm26/bitops.h
new file mode 100644
index 00000000000..7d062fb2e34
--- /dev/null
+++ b/include/asm-arm26/bitops.h
@@ -0,0 +1,332 @@
+/*
+ * Copyright 1995, Russell King.
+ *
+ * Based on the arm32 version by RMK (and others). Their copyrights apply to
+ * Those parts.
+ * Modified for arm26 by Ian Molton on 25/11/04
+ *
+ * bit 0 is the LSB of an "unsigned long" quantity.
+ *
+ * Please note that the code in this file should never be included
+ * from user space. Many of these are not implemented in assembler
+ * since they would be too costly. Also, they require privileged
+ * instructions (which are not available from user mode) to ensure
+ * that they are atomic.
+ */
+
+#ifndef __ASM_ARM_BITOPS_H
+#define __ASM_ARM_BITOPS_H
<