aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-arm26/a.out.h39
-rw-r--r--include/asm-arm26/assembler.h106
-rw-r--r--include/asm-arm26/atomic.h123
-rw-r--r--include/asm-arm26/auxvec.h4
-rw-r--r--include/asm-arm26/bitops.h207
-rw-r--r--include/asm-arm26/bug.h19
-rw-r--r--include/asm-arm26/bugs.h15
-rw-r--r--include/asm-arm26/byteorder.h24
-rw-r--r--include/asm-arm26/cache.h12
-rw-r--r--include/asm-arm26/cacheflush.h53
-rw-r--r--include/asm-arm26/checksum.h151
-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/device.h7
-rw-r--r--include/asm-arm26/div64.h1
-rw-r--r--include/asm-arm26/dma.h183
-rw-r--r--include/asm-arm26/ecard.h294
-rw-r--r--include/asm-arm26/elf.h77
-rw-r--r--include/asm-arm26/emergency-restart.h6
-rw-r--r--include/asm-arm26/errno.h6
-rw-r--r--include/asm-arm26/fb.h12
-rw-r--r--include/asm-arm26/fcntl.h13
-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/futex.h6
-rw-r--r--include/asm-arm26/hardirq.h32
-rw-r--r--include/asm-arm26/hardware.h109
-rw-r--r--include/asm-arm26/ide.h34
-rw-r--r--include/asm-arm26/io.h434
-rw-r--r--include/asm-arm26/ioc.h72
-rw-r--r--include/asm-arm26/ioctl.h1
-rw-r--r--include/asm-arm26/ioctls.h85
-rw-r--r--include/asm-arm26/ipc.h1
-rw-r--r--include/asm-arm26/ipcbuf.h29
-rw-r--r--include/asm-arm26/irq.h43
-rw-r--r--include/asm-arm26/irqchip.h101
-rw-r--r--include/asm-arm26/kdebug.h1
-rw-r--r--include/asm-arm26/kmap_types.h12
-rw-r--r--include/asm-arm26/leds.h50
-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.h36
-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.h17
-rw-r--r--include/asm-arm26/mmu.h9
-rw-r--r--include/asm-arm26/mmu_context.h53
-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.h102
-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.h298
-rw-r--r--include/asm-arm26/poll.h8
-rw-r--r--include/asm-arm26/posix_types.h81
-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.h100
-rw-r--r--include/asm-arm26/sembuf.h25
-rw-r--r--include/asm-arm26/serial.h44
-rw-r--r--include/asm-arm26/setup.h209
-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.h176
-rw-r--r--include/asm-arm26/sizes.h52
-rw-r--r--include/asm-arm26/smp.h9
-rw-r--r--include/asm-arm26/socket.h55
-rw-r--r--include/asm-arm26/sockios.h13
-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.h60
-rw-r--r--include/asm-arm26/system.h247
-rw-r--r--include/asm-arm26/termbits.h196
-rw-r--r--include/asm-arm26/termios.h92
-rw-r--r--include/asm-arm26/thread_info.h137
-rw-r--r--include/asm-arm26/timex.h29
-rw-r--r--include/asm-arm26/tlb.h63
-rw-r--r--include/asm-arm26/tlbflush.h70
-rw-r--r--include/asm-arm26/topology.h6
-rw-r--r--include/asm-arm26/types.h59
-rw-r--r--include/asm-arm26/uaccess-asm.h153
-rw-r--r--include/asm-arm26/uaccess.h293
-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.h343
-rw-r--r--include/asm-arm26/user.h84
-rw-r--r--include/asm-arm26/xor.h141
-rw-r--r--include/linux/mmzone.h1
112 files changed, 0 insertions, 7406 deletions
diff --git a/include/asm-arm26/a.out.h b/include/asm-arm26/a.out.h
deleted file mode 100644
index 7167f54ae3fc..000000000000
--- a/include/asm-arm26/a.out.h
+++ /dev/null
@@ -1,39 +0,0 @@
1#ifndef __ARM_A_OUT_H__
2#define __ARM_A_OUT_H__
3
4#include <linux/personality.h>
5#include <asm/types.h>
6
7struct exec
8{
9 __u32 a_info; /* Use macros N_MAGIC, etc for access */
10 __u32 a_text; /* length of text, in bytes */
11 __u32 a_data; /* length of data, in bytes */
12 __u32 a_bss; /* length of uninitialized data area for file, in bytes */
13 __u32 a_syms; /* length of symbol table data in file, in bytes */
14 __u32 a_entry; /* start address */
15 __u32 a_trsize; /* length of relocation info for text, in bytes */
16 __u32 a_drsize; /* length of relocation info for data, in bytes */
17};
18
19/*
20 * This is always the same
21 */
22#define N_TXTADDR(a) (0x00008000)
23
24#define N_TRSIZE(a) ((a).a_trsize)
25#define N_DRSIZE(a) ((a).a_drsize)
26#define N_SYMSIZE(a) ((a).a_syms)
27
28#define M_ARM 103
29
30#ifdef __KERNEL__
31#define STACK_TOP TASK_SIZE
32#define STACK_TOP_MAX STACK_TOP
33#endif
34
35#ifndef LIBRARY_START_TEXT
36#define LIBRARY_START_TEXT (0x00c00000)
37#endif
38
39#endif /* __A_OUT_GNU_H__ */
diff --git a/include/asm-arm26/assembler.h b/include/asm-arm26/assembler.h
deleted file mode 100644
index bb507a9a4a55..000000000000
--- a/include/asm-arm26/assembler.h
+++ /dev/null
@@ -1,106 +0,0 @@
1/*
2 * linux/include/asm-arm26/assembler.h
3 *
4 * This file contains arm architecture specific defines
5 * for the different processors.
6 *
7 * Do not include any C declarations in this file - it is included by
8 * assembler source.
9 */
10#ifndef __ASSEMBLY__
11#error "Only include this from assembly code"
12#endif
13
14/*
15 * Endian independent macros for shifting bytes within registers.
16 */
17#define pull lsr
18#define push lsl
19#define byte(x) (x*8)
20
21#ifdef __STDC__
22#define LOADREGS(cond, base, reglist...)\
23 ldm##cond base,reglist^
24
25#define RETINSTR(instr, regs...)\
26 instr##s regs
27#else
28#define LOADREGS(cond, base, reglist...)\
29 ldm/**/cond base,reglist^
30
31#define RETINSTR(instr, regs...)\
32 instr/**/s regs
33#endif
34
35#define MODENOP\
36 mov r0, r0
37
38#define MODE(savereg,tmpreg,mode) \
39 mov savereg, pc; \
40 bic tmpreg, savereg, $0x0c000003; \
41 orr tmpreg, tmpreg, $mode; \
42 teqp tmpreg, $0
43
44#define RESTOREMODE(savereg) \
45 teqp savereg, $0
46
47#define SAVEIRQS(tmpreg)
48
49#define RESTOREIRQS(tmpreg)
50
51#define DISABLEIRQS(tmpreg)\
52 teqp pc, $0x08000003
53
54#define ENABLEIRQS(tmpreg)\
55 teqp pc, $0x00000003
56
57#define USERMODE(tmpreg)\
58 teqp pc, $0x00000000;\
59 mov r0, r0
60
61#define SVCMODE(tmpreg)\
62 teqp pc, $0x00000003;\
63 mov r0, r0
64
65
66/*
67 * Save the current IRQ state and disable IRQs
68 * Note that this macro assumes FIQs are enabled, and
69 * that the processor is in SVC mode.
70 */
71 .macro save_and_disable_irqs, oldcpsr, temp
72 mov \oldcpsr, pc
73 orr \temp, \oldcpsr, #0x08000000
74 teqp \temp, #0
75 .endm
76
77/*
78 * Restore interrupt state previously stored in
79 * a register
80 * ** Actually do nothing on Arc - hope that the caller uses a MOVS PC soon
81 * after!
82 */
83 .macro restore_irqs, oldcpsr
84 @ This be restore_irqs
85 .endm
86
87/*
88 * These two are used to save LR/restore PC over a user-based access.
89 * The old 26-bit architecture requires that we save lr (R14)
90 */
91 .macro save_lr
92 str lr, [sp, #-4]!
93 .endm
94
95 .macro restore_pc
96 ldmfd sp!, {pc}^
97 .endm
98
99#define USER(x...) \
1009999: x; \
101 .section __ex_table,"a"; \
102 .align 3; \
103 .long 9999b,9001f; \
104 .previous
105
106
diff --git a/include/asm-arm26/atomic.h b/include/asm-arm26/atomic.h
deleted file mode 100644
index d6dd42374cf3..000000000000
--- a/include/asm-arm26/atomic.h
+++ /dev/null
@@ -1,123 +0,0 @@
1/*
2 * linux/include/asm-arm26/atomic.h
3 *
4 * Copyright (c) 1996 Russell King.
5 * Modified for arm26 by Ian Molton
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * Changelog:
12 * 25-11-2004 IM Updated for 2.6.9
13 * 27-06-1996 RMK Created
14 * 13-04-1997 RMK Made functions atomic!
15 * 07-12-1997 RMK Upgraded for v2.1.
16 * 26-08-1998 PJB Added #ifdef __KERNEL__
17 *
18 * FIXME - its probably worth seeing what these compile into...
19 */
20#ifndef __ASM_ARM_ATOMIC_H
21#define __ASM_ARM_ATOMIC_H
22
23#ifdef CONFIG_SMP
24#error SMP is NOT supported
25#endif
26
27typedef struct { volatile int counter; } atomic_t;
28
29#define ATOMIC_INIT(i) { (i) }
30
31#ifdef __KERNEL__
32#include <asm/system.h>
33
34#define atomic_read(v) ((v)->counter)
35#define atomic_set(v,i) (((v)->counter) = (i))
36
37static inline int atomic_add_return(int i, atomic_t *v)
38{
39 unsigned long flags;
40 int val;
41
42 local_irq_save(flags);
43 val = v->counter;
44 v->counter = val += i;
45 local_irq_restore(flags);
46
47 return val;
48}
49
50static inline int atomic_sub_return(int i, atomic_t *v)
51{
52 unsigned long flags;
53 int val;
54
55 local_irq_save(flags);
56 val = v->counter;
57 v->counter = val -= i;
58 local_irq_restore(flags);
59
60 return val;
61}
62
63static inline int atomic_cmpxchg(atomic_t *v, int old, int new)
64{
65 int ret;
66 unsigned long flags;
67
68 local_irq_save(flags);
69 ret = v->counter;
70 if (likely(ret == old))
71 v->counter = new;
72 local_irq_restore(flags);
73
74 return ret;
75}
76
77#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
78
79static inline int atomic_add_unless(atomic_t *v, int a, int u)
80{
81 int ret;
82 unsigned long flags;
83
84 local_irq_save(flags);
85 ret = v->counter;
86 if (ret != u)
87 v->counter += a;
88 local_irq_restore(flags);
89
90 return ret != u;
91}
92#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
93
94static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
95{
96 unsigned long flags;
97
98 local_irq_save(flags);
99 *addr &= ~mask;
100 local_irq_restore(flags);
101}
102
103#define atomic_add(i, v) (void) atomic_add_return(i, v)
104#define atomic_inc(v) (void) atomic_add_return(1, v)
105#define atomic_sub(i, v) (void) atomic_sub_return(i, v)
106#define atomic_dec(v) (void) atomic_sub_return(1, v)
107
108#define atomic_inc_and_test(v) (atomic_add_return(1, v) == 0)
109#define atomic_dec_and_test(v) (atomic_sub_return(1, v) == 0)
110#define atomic_inc_return(v) (atomic_add_return(1, v))
111#define atomic_dec_return(v) (atomic_sub_return(1, v))
112
113#define atomic_add_negative(i,v) (atomic_add_return(i, v) < 0)
114
115/* Atomic operations are already serializing on ARM26 */
116#define smp_mb__before_atomic_dec() barrier()
117#define smp_mb__after_atomic_dec() barrier()
118#define smp_mb__before_atomic_inc() barrier()
119#define smp_mb__after_atomic_inc() barrier()
120
121#include <asm-generic/atomic.h>
122#endif
123#endif
diff --git a/include/asm-arm26/auxvec.h b/include/asm-arm26/auxvec.h
deleted file mode 100644
index c0536f6b29a7..000000000000
--- a/include/asm-arm26/auxvec.h
+++ /dev/null
@@ -1,4 +0,0 @@
1#ifndef __ASMARM_AUXVEC_H
2#define __ASMARM_AUXVEC_H
3
4#endif
diff --git a/include/asm-arm26/bitops.h b/include/asm-arm26/bitops.h
deleted file mode 100644
index 19a69573a654..000000000000
--- a/include/asm-arm26/bitops.h
+++ /dev/null
@@ -1,207 +0,0 @@
1/*
2 * Copyright 1995, Russell King.
3 *
4 * Based on the arm32 version by RMK (and others). Their copyrights apply to
5 * Those parts.
6 * Modified for arm26 by Ian Molton on 25/11/04
7 *
8 * bit 0 is the LSB of an "unsigned long" quantity.
9 *
10 * Please note that the code in this file should never be included
11 * from user space. Many of these are not implemented in assembler
12 * since they would be too costly. Also, they require privileged
13 * instructions (which are not available from user mode) to ensure
14 * that they are atomic.
15 */
16
17#ifndef __ASM_ARM_BITOPS_H
18#define __ASM_ARM_BITOPS_H
19
20#ifdef __KERNEL__
21
22#include <linux/compiler.h>
23#include <asm/system.h>
24
25#define smp_mb__before_clear_bit() do { } while (0)
26#define smp_mb__after_clear_bit() do { } while (0)
27
28/*
29 * These functions are the basis of our bit ops.
30 *
31 * First, the atomic bitops. These use native endian.
32 */
33static inline void ____atomic_set_bit(unsigned int bit, volatile unsigned long *p)
34{
35 unsigned long flags;
36 unsigned long mask = 1UL << (bit & 31);
37
38 p += bit >> 5;
39
40 local_irq_save(flags);
41 *p |= mask;
42 local_irq_restore(flags);
43}
44
45static inline void ____atomic_clear_bit(unsigned int bit, volatile unsigned long *p)
46{
47 unsigned long flags;
48 unsigned long mask = 1UL << (bit & 31);
49
50 p += bit >> 5;
51
52 local_irq_save(flags);
53 *p &= ~mask;
54 local_irq_restore(flags);
55}
56
57static inline void ____atomic_change_bit(unsigned int bit, volatile unsigned long *p)
58{
59 unsigned long flags;
60 unsigned long mask = 1UL << (bit & 31);
61
62 p += bit >> 5;
63
64 local_irq_save(flags);
65 *p ^= mask;
66 local_irq_restore(flags);
67}
68
69static inline int
70____atomic_test_and_set_bit(unsigned int bit, volatile unsigned long *p)
71{
72 unsigned long flags;
73 unsigned int res;
74 unsigned long mask = 1UL << (bit & 31);
75
76 p += bit >> 5;
77
78 local_irq_save(flags);
79 res = *p;
80 *p = res | mask;
81 local_irq_restore(flags);
82
83 return res & mask;
84}
85
86static inline int
87____atomic_test_and_clear_bit(unsigned int bit, volatile unsigned long *p)
88{
89 unsigned long flags;
90 unsigned int res;
91 unsigned long mask = 1UL << (bit & 31);
92
93 p += bit >> 5;
94
95 local_irq_save(flags);
96 res = *p;
97 *p = res & ~mask;
98 local_irq_restore(flags);
99
100 return res & mask;
101}
102
103static inline int
104____atomic_test_and_change_bit(unsigned int bit, volatile unsigned long *p)
105{
106 unsigned long flags;
107 unsigned int res;
108 unsigned long mask = 1UL << (bit & 31);
109
110 p += bit >> 5;
111
112 local_irq_save(flags);
113 res = *p;
114 *p = res ^ mask;
115 local_irq_restore(flags);
116
117 return res & mask;
118}
119
120#include <asm-generic/bitops/non-atomic.h>
121
122/*
123 * Little endian assembly bitops. nr = 0 -> byte 0 bit 0.
124 */
125extern void _set_bit_le(int nr, volatile unsigned long * p);
126extern void _clear_bit_le(int nr, volatile unsigned long * p);
127extern void _change_bit_le(int nr, volatile unsigned long * p);
128extern int _test_and_set_bit_le(int nr, volatile unsigned long * p);
129extern int _test_and_clear_bit_le(int nr, volatile unsigned long * p);
130extern int _test_and_change_bit_le(int nr, volatile unsigned long * p);
131extern int _find_first_zero_bit_le(const unsigned long * p, unsigned size);
132extern int _find_next_zero_bit_le(void * p, int size, int offset);
133extern int _find_first_bit_le(const unsigned long *p, unsigned size);
134extern int _find_next_bit_le(const unsigned long *p, int size, int offset);
135
136/*
137 * The __* form of bitops are non-atomic and may be reordered.
138 */
139#define ATOMIC_BITOP_LE(name,nr,p) \
140 (__builtin_constant_p(nr) ? \
141 ____atomic_##name(nr, p) : \
142 _##name##_le(nr,p))
143
144#define NONATOMIC_BITOP(name,nr,p) \
145 (____nonatomic_##name(nr, p))
146
147/*
148 * These are the little endian, atomic definitions.
149 */
150#define set_bit(nr,p) ATOMIC_BITOP_LE(set_bit,nr,p)
151#define clear_bit(nr,p) ATOMIC_BITOP_LE(clear_bit,nr,p)
152#define change_bit(nr,p) ATOMIC_BITOP_LE(change_bit,nr,p)
153#define test_and_set_bit(nr,p) ATOMIC_BITOP_LE(test_and_set_bit,nr,p)
154#define test_and_clear_bit(nr,p) ATOMIC_BITOP_LE(test_and_clear_bit,nr,p)
155#define test_and_change_bit(nr,p) ATOMIC_BITOP_LE(test_and_change_bit,nr,p)
156#define find_first_zero_bit(p,sz) _find_first_zero_bit_le(p,sz)
157#define find_next_zero_bit(p,sz,off) _find_next_zero_bit_le(p,sz,off)
158#define find_first_bit(p,sz) _find_first_bit_le(p,sz)
159#define find_next_bit(p,sz,off) _find_next_bit_le(p,sz,off)
160
161#define WORD_BITOFF_TO_LE(x) ((x))
162
163#include <asm-generic/bitops/ffz.h>
164#include <asm-generic/bitops/__ffs.h>
165#include <asm-generic/bitops/fls.h>
166#include <asm-generic/bitops/fls64.h>
167#include <asm-generic/bitops/ffs.h>
168#include <asm-generic/bitops/sched.h>
169#include <asm-generic/bitops/hweight.h>
170
171/*
172 * Ext2 is defined to use little-endian byte ordering.
173 * These do not need to be atomic.
174 */
175#define ext2_set_bit(nr,p) \
176 __test_and_set_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p))
177#define ext2_set_bit_atomic(lock,nr,p) \
178 test_and_set_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p))
179#define ext2_clear_bit(nr,p) \
180 __test_and_clear_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p))
181#define ext2_clear_bit_atomic(lock,nr,p) \
182 test_and_clear_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p))
183#define ext2_test_bit(nr,p) \
184 test_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p))
185#define ext2_find_first_zero_bit(p,sz) \
186 _find_first_zero_bit_le(p,sz)
187#define ext2_find_next_zero_bit(p,sz,off) \
188 _find_next_zero_bit_le(p,sz,off)
189
190/*
191 * Minix is defined to use little-endian byte ordering.
192 * These do not need to be atomic.
193 */
194#define minix_set_bit(nr,p) \
195 __set_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p))
196#define minix_test_bit(nr,p) \
197 test_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p))
198#define minix_test_and_set_bit(nr,p) \
199 __test_and_set_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p))
200#define minix_test_and_clear_bit(nr,p) \
201 __test_and_clear_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p))
202#define minix_find_first_zero_bit(p,sz) \
203 _find_first_zero_bit_le((unsigned long *)(p),sz)
204
205#endif /* __KERNEL__ */
206
207#endif /* _ARM_BITOPS_H */
diff --git a/include/asm-arm26/bug.h b/include/asm-arm26/bug.h
deleted file mode 100644
index 8545d58b0475..000000000000
--- a/include/asm-arm26/bug.h
+++ /dev/null
@@ -1,19 +0,0 @@
1#ifndef _ASMARM_BUG_H
2#define _ASMARM_BUG_H
3
4
5#ifdef CONFIG_BUG
6#ifdef CONFIG_DEBUG_BUGVERBOSE
7extern volatile void __bug(const char *file, int line, void *data);
8/* give file/line information */
9#define BUG() __bug(__FILE__, __LINE__, NULL)
10#else
11#define BUG() (*(int *)0 = 0)
12#endif
13
14#define HAVE_ARCH_BUG
15#endif
16
17#include <asm-generic/bug.h>
18
19#endif
diff --git a/include/asm-arm26/bugs.h b/include/asm-arm26/bugs.h
deleted file mode 100644
index e99ac2e46d7f..000000000000
--- a/include/asm-arm26/bugs.h
+++ /dev/null
@@ -1,15 +0,0 @@
1/*
2 * linux/include/asm-arm26/bugs.h
3 *
4 * Copyright (C) 1995 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#ifndef __ASM_BUGS_H
11#define __ASM_BUGS_H
12
13#define check_bugs() cpu_check_bugs()
14
15#endif
diff --git a/include/asm-arm26/byteorder.h b/include/asm-arm26/byteorder.h
deleted file mode 100644
index 0b4af9ac76e9..000000000000
--- a/include/asm-arm26/byteorder.h
+++ /dev/null
@@ -1,24 +0,0 @@
1/*
2 * linux/include/asm-arm/byteorder.h
3 *
4 * ARM Endian-ness. In little endian mode, the data bus is connected such
5 * that byte accesses appear as:
6 * 0 = d0...d7, 1 = d8...d15, 2 = d16...d23, 3 = d24...d31
7 * and word accesses (data or instruction) appear as:
8 * d0...d31
9 *
10 */
11#ifndef __ASM_ARM_BYTEORDER_H
12#define __ASM_ARM_BYTEORDER_H
13
14#include <asm/types.h>
15
16#if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
17# define __BYTEORDER_HAS_U64__
18# define __SWAB_64_THRU_32__
19#endif
20
21#include <linux/byteorder/little_endian.h>
22
23#endif
24
diff --git a/include/asm-arm26/cache.h b/include/asm-arm26/cache.h
deleted file mode 100644
index 8c3abcf728fe..000000000000
--- a/include/asm-arm26/cache.h
+++ /dev/null
@@ -1,12 +0,0 @@
1/*
2 * linux/include/asm-arm26/cache.h
3 */
4#ifndef __ASMARM_CACHE_H
5#define __ASMARM_CACHE_H
6
7#define L1_CACHE_SHIFT 5
8#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
9#define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1))
10#define SMP_CACHE_BYTES L1_CACHE_BYTES
11
12#endif
diff --git a/include/asm-arm26/cacheflush.h b/include/asm-arm26/cacheflush.h
deleted file mode 100644
index 14ae15b6faab..000000000000
--- a/include/asm-arm26/cacheflush.h
+++ /dev/null
@@ -1,53 +0,0 @@
1/*
2 * linux/include/asm-arm/cacheflush.h
3 *
4 * Copyright (C) 2000-2002 Russell King
5 * Copyright (C) 2003 Ian Molton
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * ARM26 cache 'functions'
12 *
13 */
14
15#ifndef _ASMARM_CACHEFLUSH_H
16#define _ASMARM_CACHEFLUSH_H
17
18#if 1 //FIXME - BAD INCLUDES!!!
19#include <linux/sched.h>
20#include <linux/mm.h>
21#endif
22
23#define flush_cache_all() do { } while (0)
24#define flush_cache_mm(mm) do { } while (0)
25#define flush_cache_dup_mm(mm) do { } while (0)
26#define flush_cache_range(vma,start,end) do { } while (0)
27#define flush_cache_page(vma,vmaddr,pfn) do { } while (0)
28#define flush_cache_vmap(start, end) do { } while (0)
29#define flush_cache_vunmap(start, end) do { } while (0)
30
31#define invalidate_dcache_range(start,end) do { } while (0)
32#define clean_dcache_range(start,end) do { } while (0)
33#define flush_dcache_range(start,end) do { } while (0)
34#define flush_dcache_page(page) do { } while (0)
35#define flush_dcache_mmap_lock(mapping) do { } while (0)
36#define flush_dcache_mmap_unlock(mapping) do { } while (0)
37#define clean_dcache_entry(_s) do { } while (0)
38#define clean_cache_entry(_start) do { } while (0)
39
40#define flush_icache_user_range(start,end, bob, fred) do { } while (0)
41#define flush_icache_range(start,end) do { } while (0)
42#define flush_icache_page(vma,page) do { } while (0)
43
44#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
45 memcpy(dst, src, len)
46#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
47 memcpy(dst, src, len)
48
49/* DAG: ARM3 will flush cache on MEMC updates anyway? so don't bother */
50/* IM : Yes, it will, but only if setup to do so (we do this). */
51#define clean_cache_area(_start,_size) do { } while (0)
52
53#endif
diff --git a/include/asm-arm26/checksum.h b/include/asm-arm26/checksum.h
deleted file mode 100644
index f2b4b0a403bd..000000000000
--- a/include/asm-arm26/checksum.h
+++ /dev/null
@@ -1,151 +0,0 @@
1/*
2 * linux/include/asm-arm/checksum.h
3 *
4 * IP checksum routines
5 *
6 * Copyright (C) Original authors of ../asm-i386/checksum.h
7 * Copyright (C) 1996-1999 Russell King
8 */
9#ifndef __ASM_ARM_CHECKSUM_H
10#define __ASM_ARM_CHECKSUM_H
11
12#include <linux/in6.h>
13
14/*
15 * computes the checksum of a memory block at buff, length len,
16 * and adds in "sum" (32-bit)
17 *
18 * returns a 32-bit number suitable for feeding into itself
19 * or csum_tcpudp_magic
20 *
21 * this function must be called with even lengths, except
22 * for the last fragment, which may be odd
23 *
24 * it's best to have buff aligned on a 32-bit boundary
25 */
26__wsum csum_partial(const void *buff, int len, __wsum sum);
27
28/*
29 * the same as csum_partial, but copies from src while it
30 * checksums, and handles user-space pointer exceptions correctly, when needed.
31 *
32 * here even more important to align src and dst on a 32-bit (or even
33 * better 64-bit) boundary
34 */
35
36__wsum
37csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum);
38
39__wsum
40csum_partial_copy_from_user(const void __user *src, void *dst, int len, __wsum sum, int *err_ptr);
41
42/*
43 * This is a version of ip_compute_csum() optimized for IP headers,
44 * which always checksum on 4 octet boundaries.
45 */
46static inline __sum16
47ip_fast_csum(const void *iph, unsigned int ihl)
48{
49 unsigned int sum, tmp1;
50
51 __asm__ __volatile__(
52 "ldr %0, [%1], #4 @ ip_fast_csum \n\
53 ldr %3, [%1], #4 \n\
54 sub %2, %2, #5 \n\
55 adds %0, %0, %3 \n\
56 ldr %3, [%1], #4 \n\
57 adcs %0, %0, %3 \n\
58 ldr %3, [%1], #4 \n\
591: adcs %0, %0, %3 \n\
60 ldr %3, [%1], #4 \n\
61 tst %2, #15 @ do this carefully \n\
62 subne %2, %2, #1 @ without destroying \n\
63 bne 1b @ the carry flag \n\
64 adcs %0, %0, %3 \n\
65 adc %0, %0, #0 \n\
66 adds %0, %0, %0, lsl #16 \n\
67 addcs %0, %0, #0x10000 \n\
68 mvn %0, %0 \n\
69 mov %0, %0, lsr #16"
70 : "=r" (sum), "=r" (iph), "=r" (ihl), "=r" (tmp1)
71 : "1" (iph), "2" (ihl)
72 : "cc");
73 return (__force __sum16)sum;
74}
75
76/*
77 * Fold a partial checksum without adding pseudo headers
78 */
79static inline __sum16 csum_fold(__wsum sum)
80{
81 __asm__(
82 "adds %0, %1, %1, lsl #16 @ csum_fold \n\
83 addcs %0, %0, #0x10000"
84 : "=r" (sum)
85 : "r" (sum)
86 : "cc");
87 return (__force __sum16)(~(__force u32)sum >> 16);
88}
89
90static inline __wsum
91csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len,
92 unsigned short proto, __wsum sum)
93{
94 __asm__(
95 "adds %0, %1, %2 @ csum_tcpudp_nofold \n\
96 adcs %0, %0, %3 \n\
97 adcs %0, %0, %4 \n\
98 adcs %0, %0, %5 \n\
99 adc %0, %0, #0"
100 : "=&r"(sum)
101 : "r" (sum), "r" (daddr), "r" (saddr), "r" (htons(len)), "Ir" (htons(proto))
102 : "cc");
103 return sum;
104}
105/*
106 * computes the checksum of the TCP/UDP pseudo-header
107 * returns a 16-bit checksum, already complemented
108 */
109static inline __sum16
110csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len,
111 unsigned short proto, __wsum sum)
112{
113 __asm__(
114 "adds %0, %1, %2 @ csum_tcpudp_magic \n\
115 adcs %0, %0, %3 \n\
116 adcs %0, %0, %4 \n\
117 adcs %0, %0, %5 \n\
118 adc %0, %0, #0 \n\
119 adds %0, %0, %0, lsl #16 \n\
120 addcs %0, %0, #0x10000 \n\
121 mvn %0, %0"
122 : "=&r"(sum)
123 : "r" (sum), "r" (daddr), "r" (saddr), "r" (htons(len)), "Ir" (htons(proto))
124 : "cc");
125 return (__force __sum16)((__force u32)sum >> 16);
126}
127
128
129/*
130 * this routine is used for miscellaneous IP-like checksums, mainly
131 * in icmp.c
132 */
133static inline __sum16
134ip_compute_csum(const void *buff, int len)
135{
136 return csum_fold(csum_partial(buff, len, 0));
137}
138
139#define _HAVE_ARCH_IPV6_CSUM
140extern __wsum
141__csum_ipv6_magic(const struct in6_addr *saddr, const struct in6_addr *daddr, __be32 len,
142 __be32 proto, __wsum sum);
143
144static inline __sum16
145csum_ipv6_magic(const struct in6_addr *saddr, const struct in6_addr *daddr, __u32 len,
146 unsigned short proto, __wsum sum)
147{
148 return csum_fold(__csum_ipv6_magic(saddr, daddr, htonl(len),
149 htonl(proto), sum));
150}
151#endif
diff --git a/include/asm-arm26/constants.h b/include/asm-arm26/constants.h
deleted file mode 100644
index 0d0b14415563..000000000000
--- a/include/asm-arm26/constants.h
+++ /dev/null
@@ -1,28 +0,0 @@
1#ifndef __ASM_OFFSETS_H__
2#define __ASM_OFFSETS_H__
3/*
4 * DO NOT MODIFY.
5 *
6 * This file was generated by arch/arm26/Makefile
7 *
8 */
9
10#define TSK_ACTIVE_MM 96 /* offsetof(struct task_struct, active_mm) */
11
12#define VMA_VM_MM 0 /* offsetof(struct vm_area_struct, vm_mm) */
13#define VMA_VM_FLAGS 20 /* offsetof(struct vm_area_struct, vm_flags) */
14
15#define VM_EXEC 4 /* VM_EXEC */
16
17
18#define PAGE_PRESENT 1 /* L_PTE_PRESENT */
19#define PAGE_READONLY 95 /* PAGE_READONLY */
20#define PAGE_NOT_USER 3 /* PAGE_NONE */
21#define PAGE_OLD 3 /* PAGE_NONE */
22#define PAGE_CLEAN 128 /* L_PTE_DIRTY */
23
24#define PAGE_SZ 32768 /* PAGE_SIZE */
25
26#define SYS_ERROR0 10420224 /* 0x9f0000 */
27
28#endif
diff --git a/include/asm-arm26/cputime.h b/include/asm-arm26/cputime.h
deleted file mode 100644
index d2783a9e47b3..000000000000
--- a/include/asm-arm26/cputime.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __ARM26_CPUTIME_H
2#define __ARM26_CPUTIME_H
3
4#include <asm-generic/cputime.h>
5
6#endif /* __ARM26_CPUTIME_H */
diff --git a/include/asm-arm26/current.h b/include/asm-arm26/current.h
deleted file mode 100644
index 75d21e2a3ff7..000000000000
--- a/include/asm-arm26/current.h
+++ /dev/null
@@ -1,15 +0,0 @@
1#ifndef _ASMARM_CURRENT_H
2#define _ASMARM_CURRENT_H
3
4#include <linux/thread_info.h>
5
6static inline struct task_struct *get_current(void) __attribute_const__;
7
8static inline struct task_struct *get_current(void)
9{
10 return current_thread_info()->task;
11}
12
13#define current (get_current())
14
15#endif /* _ASMARM_CURRENT_H */
diff --git a/include/asm-arm26/delay.h b/include/asm-arm26/delay.h
deleted file mode 100644
index 40fbf7bbe6c2..000000000000
--- a/include/asm-arm26/delay.h
+++ /dev/null
@@ -1,34 +0,0 @@
1#ifndef __ASM_ARM_DELAY_H
2#define __ASM_ARM_DELAY_H
3
4/*
5 * Copyright (C) 1995 Russell King
6 *
7 * Delay routines, using a pre-computed "loops_per_second" value.
8 */
9
10extern void __delay(int loops);
11
12/*
13 * division by multiplication: you don't have to worry about
14 * loss of precision.
15 *
16 * Use only for very small delays ( < 1 msec). Should probably use a
17 * lookup table, really, as the multiplications take much too long with
18 * short delays. This is a "reasonable" implementation, though (and the
19 * first constant multiplications gets optimized away if the delay is
20 * a constant)
21 *
22 * FIXME - lets improve it then...
23 */
24extern void udelay(unsigned long usecs);
25
26static inline unsigned long muldiv(unsigned long a, unsigned long b, unsigned long c)
27{
28 return a * b / c;
29}
30
31
32
33#endif /* defined(_ARM_DELAY_H) */
34
diff --git a/include/asm-arm26/device.h b/include/asm-arm26/device.h
deleted file mode 100644
index d8f9872b0e2d..000000000000
--- a/include/asm-arm26/device.h
+++ /dev/null
@@ -1,7 +0,0 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#include <asm-generic/device.h>
7
diff --git a/include/asm-arm26/div64.h b/include/asm-arm26/div64.h
deleted file mode 100644
index 6cd978cefb28..000000000000
--- a/include/asm-arm26/div64.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/div64.h>
diff --git a/include/asm-arm26/dma.h b/include/asm-arm26/dma.h
deleted file mode 100644
index 4326ba85eb72..000000000000
--- a/include/asm-arm26/dma.h
+++ /dev/null
@@ -1,183 +0,0 @@
1#ifndef __ASM_ARM_DMA_H
2#define __ASM_ARM_DMA_H
3
4typedef unsigned int dmach_t;
5
6#include <linux/spinlock.h>
7#include <asm/system.h>
8#include <asm/memory.h>
9#include <asm/scatterlist.h>
10
11// FIXME - do we really need this? arm26 cant do 'proper' DMA
12
13typedef struct dma_struct dma_t;
14typedef unsigned int dmamode_t;
15
16struct dma_ops {
17 int (*request)(dmach_t, dma_t *); /* optional */
18 void (*free)(dmach_t, dma_t *); /* optional */
19 void (*enable)(dmach_t, dma_t *); /* mandatory */
20 void (*disable)(dmach_t, dma_t *); /* mandatory */
21 int (*residue)(dmach_t, dma_t *); /* optional */
22 int (*setspeed)(dmach_t, dma_t *, int); /* optional */
23 char *type;
24};
25
26struct dma_struct {
27 struct scatterlist buf; /* single DMA */
28 int sgcount; /* number of DMA SG */
29 struct scatterlist *sg; /* DMA Scatter-Gather List */
30
31 unsigned int active:1; /* Transfer active */
32 unsigned int invalid:1; /* Address/Count changed */
33 unsigned int using_sg:1; /* using scatter list? */
34 dmamode_t dma_mode; /* DMA mode */
35 int speed; /* DMA speed */
36
37 unsigned int lock; /* Device is allocated */
38 const char *device_id; /* Device name */
39
40 unsigned int dma_base; /* Controller base address */
41 int dma_irq; /* Controller IRQ */
42 int state; /* Controller state */
43 struct scatterlist cur_sg; /* Current controller buffer */
44
45 struct dma_ops *d_ops;
46};
47
48/* Prototype: void arch_dma_init(dma)
49 * Purpose : Initialise architecture specific DMA
50 * Params : dma - pointer to array of DMA structures
51 */
52extern void arch_dma_init(dma_t *dma);
53
54extern void isa_init_dma(dma_t *dma);
55
56
57#define MAX_DMA_ADDRESS 0x03000000
58#define MAX_DMA_CHANNELS 3
59
60/* ARC */
61#define DMA_VIRTUAL_FLOPPY0 0
62#define DMA_VIRTUAL_FLOPPY1 1
63#define DMA_VIRTUAL_SOUND 2
64
65/* A5K */
66#define DMA_FLOPPY 0
67
68/*
69 * DMA modes
70 */
71#define DMA_MODE_MASK 3
72
73#define DMA_MODE_READ 0
74#define DMA_MODE_WRITE 1
75#define DMA_MODE_CASCADE 2
76#define DMA_AUTOINIT 4
77
78extern spinlock_t dma_spin_lock;
79
80static inline unsigned long claim_dma_lock(void)
81{
82 unsigned long flags;
83 spin_lock_irqsave(&dma_spin_lock, flags);
84 return flags;
85}
86
87static inline void release_dma_lock(unsigned long flags)
88{
89 spin_unlock_irqrestore(&dma_spin_lock, flags);
90}
91
92/* Clear the 'DMA Pointer Flip Flop'.
93 * Write 0 for LSB/MSB, 1 for MSB/LSB access.
94 */
95#define clear_dma_ff(channel)
96
97/* Set only the page register bits of the transfer address.
98 *
99 * NOTE: This is an architecture specific function, and should
100 * be hidden from the drivers
101 */
102extern void set_dma_page(dmach_t channel, char pagenr);
103
104/* Request a DMA channel
105 *
106 * Some architectures may need to do allocate an interrupt
107 */
108extern int request_dma(dmach_t channel, const char * device_id);
109
110/* Free a DMA channel
111 *
112 * Some architectures may need to do free an interrupt
113 */
114extern void free_dma(dmach_t channel);
115
116/* Enable DMA for this channel
117 *
118 * On some architectures, this may have other side effects like
119 * enabling an interrupt and setting the DMA registers.
120 */
121extern void enable_dma(dmach_t channel);
122
123/* Disable DMA for this channel
124 *
125 * On some architectures, this may have other side effects like
126 * disabling an interrupt or whatever.
127 */
128extern void disable_dma(dmach_t channel);
129
130/* Test whether the specified channel has an active DMA transfer
131 */
132extern int dma_channel_active(dmach_t channel);
133
134/* Set the DMA scatter gather list for this channel
135 *
136 * This should not be called if a DMA channel is enabled,
137 * especially since some DMA architectures don't update the
138 * DMA address immediately, but defer it to the enable_dma().
139 */
140extern void set_dma_sg(dmach_t channel, struct scatterlist *sg, int nr_sg);
141
142/* Set the DMA address for this channel
143 *
144 * This should not be called if a DMA channel is enabled,
145 * especially since some DMA architectures don't update the
146 * DMA address immediately, but defer it to the enable_dma().
147 */
148extern void set_dma_addr(dmach_t channel, unsigned long physaddr);
149
150/* Set the DMA byte count for this channel
151 *
152 * This should not be called if a DMA channel is enabled,
153 * especially since some DMA architectures don't update the
154 * DMA count immediately, but defer it to the enable_dma().
155 */
156extern void set_dma_count(dmach_t channel, unsigned long count);
157
158/* Set the transfer direction for this channel
159 *
160 * This should not be called if a DMA channel is enabled,
161 * especially since some DMA architectures don't update the
162 * DMA transfer direction immediately, but defer it to the
163 * enable_dma().
164 */
165extern void set_dma_mode(dmach_t channel, dmamode_t mode);
166
167/* Set the transfer speed for this channel
168 */
169extern void set_dma_speed(dmach_t channel, int cycle_ns);
170
171/* Get DMA residue count. After a DMA transfer, this
172 * should return zero. Reading this while a DMA transfer is
173 * still in progress will return unpredictable results.
174 * If called before the channel has been used, it may return 1.
175 * Otherwise, it returns the number of _bytes_ left to transfer.
176 */
177extern int get_dma_residue(dmach_t channel);
178
179#ifndef NO_DMA
180#define NO_DMA 255
181#endif
182
183#endif /* _ARM_DMA_H */
diff --git a/include/asm-arm26/ecard.h b/include/asm-arm26/ecard.h
deleted file mode 100644
index 66691939c3c1..000000000000
--- a/include/asm-arm26/ecard.h
+++ /dev/null
@@ -1,294 +0,0 @@
1/*
2 * linux/include/asm-arm26/ecard.h
3 *
4 * definitions for expansion cards
5 *
6 * This is a new system as from Linux 1.2.3
7 *
8 * Changelog:
9 * 11-12-1996 RMK Further minor improvements
10 * 12-09-1997 RMK Added interrupt enable/disable for card level
11 * 18-05-2003 IM Adjusted for ARM26
12 *
13 * Reference: Acorns Risc OS 3 Programmers Reference Manuals.
14 */
15
16#ifndef __ASM_ECARD_H
17#define __ASM_ECARD_H
18
19/*
20 * Currently understood cards (but not necessarily
21 * supported):
22 * Manufacturer Product ID
23 */
24#define MANU_ACORN 0x0000
25#define PROD_ACORN_SCSI 0x0002
26#define PROD_ACORN_ETHER1 0x0003
27#define PROD_ACORN_MFM 0x000b
28
29#define MANU_CCONCEPTS 0x0009
30#define PROD_CCONCEPTS_COLOURCARD 0x0050
31
32#define MANU_ANT2 0x0011
33#define PROD_ANT_ETHER3 0x00a4
34
35#define MANU_ATOMWIDE 0x0017
36#define PROD_ATOMWIDE_3PSERIAL 0x0090
37
38#define MANU_IRLAM_INSTRUMENTS 0x001f
39#define MANU_IRLAM_INSTRUMENTS_ETHERN 0x5678
40
41#define MANU_OAK 0x0021
42#define PROD_OAK_SCSI 0x0058
43
44#define MANU_MORLEY 0x002b
45#define PROD_MORLEY_SCSI_UNCACHED 0x0067
46
47#define MANU_CUMANA 0x003a
48#define PROD_CUMANA_SCSI_2 0x003a
49#define PROD_CUMANA_SCSI_1 0x00a0
50
51#define MANU_ICS 0x003c
52#define PROD_ICS_IDE 0x00ae
53
54#define MANU_ICS2 0x003d
55#define PROD_ICS2_IDE 0x00ae
56
57#define MANU_SERPORT 0x003f
58#define PROD_SERPORT_DSPORT 0x00b9
59
60#define MANU_ARXE 0x0041
61#define PROD_ARXE_SCSI 0x00be
62
63#define MANU_I3 0x0046
64#define PROD_I3_ETHERLAN500 0x00d4
65#define PROD_I3_ETHERLAN600 0x00ec
66#define PROD_I3_ETHERLAN600A 0x011e
67
68#define MANU_ANT 0x0053
69#define PROD_ANT_ETHERM 0x00d8
70#define PROD_ANT_ETHERB 0x00e4
71
72#define MANU_ALSYSTEMS 0x005b
73#define PROD_ALSYS_SCSIATAPI 0x0107
74
75#define MANU_MCS 0x0063
76#define PROD_MCS_CONNECT32 0x0125
77
78#define MANU_EESOX 0x0064
79#define PROD_EESOX_SCSI2 0x008c
80
81#define MANU_YELLOWSTONE 0x0096
82#define PROD_YELLOWSTONE_RAPIDE32 0x0120
83
84#define MANU_SIMTEC 0x005f
85#define PROD_SIMTEC_IDE8 0x0130
86#define PROD_SIMTEC_IDE16 0x0131
87
88
89#ifdef ECARD_C
90#define CONST
91#else
92#define CONST const
93#endif
94
95#define MAX_ECARDS 4
96
97typedef enum { /* Cards address space */
98 ECARD_IOC,
99 ECARD_MEMC,
100 ECARD_EASI
101} card_type_t;
102
103typedef enum { /* Speed for ECARD_IOC space */
104 ECARD_SLOW = 0,
105 ECARD_MEDIUM = 1,
106 ECARD_FAST = 2,
107 ECARD_SYNC = 3
108} card_speed_t;
109
110struct ecard_id { /* Card ID structure */
111 unsigned short manufacturer;
112 unsigned short product;
113 void *data;
114};
115
116struct in_ecid { /* Packed card ID information */
117 unsigned short product; /* Product code */
118 unsigned short manufacturer; /* Manufacturer code */
119 unsigned char id:4; /* Simple ID */
120 unsigned char cd:1; /* Chunk dir present */
121 unsigned char is:1; /* Interrupt status pointers */
122 unsigned char w:2; /* Width */
123 unsigned char country; /* Country */
124 unsigned char irqmask; /* IRQ mask */
125 unsigned char fiqmask; /* FIQ mask */
126 unsigned long irqoff; /* IRQ offset */
127 unsigned long fiqoff; /* FIQ offset */
128};
129
130typedef struct expansion_card ecard_t;
131typedef unsigned long *loader_t;
132
133typedef struct { /* Card handler routines */
134 void (*irqenable)(ecard_t *ec, int irqnr);
135 void (*irqdisable)(ecard_t *ec, int irqnr);
136 int (*irqpending)(ecard_t *ec);
137 void (*fiqenable)(ecard_t *ec, int fiqnr);
138 void (*fiqdisable)(ecard_t *ec, int fiqnr);
139 int (*fiqpending)(ecard_t *ec);
140} expansioncard_ops_t;
141
142#define ECARD_NUM_RESOURCES (6)
143
144#define ECARD_RES_IOCSLOW (0)
145#define ECARD_RES_IOCMEDIUM (1)
146#define ECARD_RES_IOCFAST (2)
147#define ECARD_RES_IOCSYNC (3)
148#define ECARD_RES_MEMC (4)
149#define ECARD_RES_EASI (5)
150
151#define ecard_resource_start(ec,nr) ((ec)->resource[nr].start)
152#define ecard_resource_end(ec,nr) ((ec)->resource[nr].end)
153#define ecard_resource_len(ec,nr) ((ec)->resource[nr].end - \
154 (ec)->resource[nr].start + 1)
155
156/*
157 * This contains all the info needed on an expansion card
158 */
159struct expansion_card {
160 struct expansion_card *next;
161
162 struct device dev;
163 struct resource resource[ECARD_NUM_RESOURCES];
164
165 /* Public data */
166 volatile unsigned char *irqaddr; /* address of IRQ register */
167 volatile unsigned char *fiqaddr; /* address of FIQ register */
168 unsigned char irqmask; /* IRQ mask */
169 unsigned char fiqmask; /* FIQ mask */
170 unsigned char claimed; /* Card claimed? */
171
172 void *irq_data; /* Data for use for IRQ by card */
173 void *fiq_data; /* Data for use for FIQ by card */
174 const expansioncard_ops_t *ops; /* Enable/Disable Ops for card */
175
176 CONST unsigned int slot_no; /* Slot number */
177 CONST unsigned int dma; /* DMA number (for request_dma) */
178 CONST unsigned int irq; /* IRQ number (for request_irq) */
179 CONST unsigned int fiq; /* FIQ number (for request_irq) */
180 CONST card_type_t type; /* Type of card */
181 CONST struct in_ecid cid; /* Card Identification */
182
183 /* Private internal data */
184 const char *card_desc; /* Card description */
185 CONST unsigned int podaddr; /* Base Linux address for card */
186 CONST loader_t loader; /* loader program */
187 u64 dma_mask;
188};
189
190struct in_chunk_dir {
191 unsigned int start_offset;
192 union {
193 unsigned char string[256];
194 unsigned char data[1];
195 } d;
196};
197
198/*
199 * ecard_claim: claim an expansion card entry
200 * FIXME - are these atomic / called with interrupts off ?
201 */
202#define ecard_claim(ec) ((ec)->claimed = 1)
203
204/*
205 * ecard_release: release an expansion card entry
206 */
207#define ecard_release(ec) ((ec)->claimed = 0)
208
209/*
210 * Read a chunk from an expansion card
211 * cd : where to put read data
212 * ec : expansion card info struct
213 * id : id number to find
214 * num: (n+1)'th id to find.
215 */
216extern int ecard_readchunk (struct in_chunk_dir *cd, struct expansion_card *ec, int id, int num);
217
218/*
219 * Obtain the address of a card
220 */
221extern unsigned int ecard_address (struct expansion_card *ec, card_type_t card_type, card_speed_t speed);
222
223#ifdef ECARD_C
224/* Definitions internal to ecard.c - for it's use only!!
225 *
226 * External expansion card header as read from the card
227 */
228struct ex_ecid {
229 unsigned char r_irq:1;
230 unsigned char r_zero:1;
231 unsigned char r_fiq:1;
232 unsigned char r_id:4;
233 unsigned char r_a:1;
234
235 unsigned char r_cd:1;
236 unsigned char r_is:1;
237 unsigned char r_w:2;
238 unsigned char r_r1:4;
239
240 unsigned char r_r2:8;
241
242 unsigned char r_prod[2];
243
244 unsigned char r_manu[2];
245
246 unsigned char r_country;
247
248 unsigned char r_irqmask;
249 unsigned char r_irqoff[3];
250
251 unsigned char r_fiqmask;
252 unsigned char r_fiqoff[3];
253};
254
255/*
256 * Chunk directory entry as read from the card
257 */
258struct ex_chunk_dir {
259 unsigned char r_id;
260 unsigned char r_len[3];
261 unsigned long r_start;
262 union {
263 char string[256];
264 char data[1];
265 } d;
266#define c_id(x) ((x)->r_id)
267#define c_len(x) ((x)->r_len[0]|((x)->r_len[1]<<8)|((x)->r_len[2]<<16))
268#define c_start(x) ((x)->r_start)
269};
270
271#endif
272
273extern struct bus_type ecard_bus_type;
274
275#define ECARD_DEV(_d) container_of((_d), struct expansion_card, dev)
276
277struct ecard_driver {
278 int (*probe)(struct expansion_card *, const struct ecard_id *id);
279 void (*remove)(struct expansion_card *);
280 void (*shutdown)(struct expansion_card *);
281 const struct ecard_id *id_table;
282 unsigned int id;
283 struct device_driver drv;
284};
285
286#define ECARD_DRV(_d) container_of((_d), struct ecard_driver, drv)
287
288#define ecard_set_drvdata(ec,data) dev_set_drvdata(&(ec)->dev, (data))
289#define ecard_get_drvdata(ec) dev_get_drvdata(&(ec)->dev)
290
291int ecard_register_driver(struct ecard_driver *);
292void ecard_remove_driver(struct ecard_driver *);
293
294#endif
diff --git a/include/asm-arm26/elf.h b/include/asm-arm26/elf.h
deleted file mode 100644
index 5a47fdb3015d..000000000000
--- a/include/asm-arm26/elf.h
+++ /dev/null
@@ -1,77 +0,0 @@
1#ifndef __ASMARM_ELF_H
2#define __ASMARM_ELF_H
3
4/*
5 * ELF register definitions..
6 */
7
8#include <asm/ptrace.h>
9#include <asm/procinfo.h>
10
11//FIXME - is it always 32K ?
12
13#define ELF_EXEC_PAGESIZE 32768
14#define SET_PERSONALITY(ex,ibcs2) set_personality(PER_LINUX)
15
16typedef unsigned long elf_greg_t;
17typedef unsigned long elf_freg_t[3];
18
19#define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t))
20typedef elf_greg_t elf_gregset_t[ELF_NGREG];
21
22typedef struct { void *null; } elf_fpregset_t;
23
24/*
25 * This is used to ensure we don't load something for the wrong architecture.
26 * We can only execute 26-bit code.
27 */
28
29#define EM_ARM 40
30#define EF_ARM_APCS26 0x08
31
32//#define elf_check_arch(x) ( ((x)->e_machine == EM_ARM) && ((x)->e_flags & EF_ARM_APCS26) ) FIXME!!!!! - this looks OK, but the flags seem to be wrong.
33#define elf_check_arch(x) (1)
34
35/*
36 * These are used to set parameters in the core dumps.
37 */
38#define ELF_CLASS ELFCLASS32
39#define ELF_DATA ELFDATA2LSB
40#define ELF_ARCH EM_ARM
41
42#define USE_ELF_CORE_DUMP
43
44/* This is the location that an ET_DYN program is loaded if exec'ed. Typical
45 use of this is to invoke "./ld.so someprog" to test out a new version of
46 the loader. We need to make sure that it is out of the way of the program
47 that it will "exec", and that there is sufficient room for the brk. */
48
49#define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3)
50
51/* When the program starts, a1 contains a pointer to a function to be
52 registered with atexit, as per the SVR4 ABI. A value of 0 means we
53 have no such handler. */
54#define ELF_PLAT_INIT(_r, load_addr) (_r)->ARM_r0 = 0
55
56/* This yields a mask that user programs can use to figure out what
57 instruction set this cpu supports. */
58
59extern unsigned int elf_hwcap;
60#define ELF_HWCAP (elf_hwcap)
61
62/* This yields a string that ld.so will use to load implementation
63 specific libraries for optimization. This is more specific in
64 intent than poking at uname or /proc/cpuinfo. */
65
66/* For now we just provide a fairly general string that describes the
67 processor family. This could be made more specific later if someone
68 implemented optimisations that require it. 26-bit CPUs give you
69 "v1l" for ARM2 (no SWP) and "v2l" for anything else (ARM1 isn't
70 supported).
71 */
72
73#define ELF_PLATFORM_SIZE 8
74extern char elf_platform[];
75#define ELF_PLATFORM (elf_platform)
76
77#endif
diff --git a/include/asm-arm26/emergency-restart.h b/include/asm-arm26/emergency-restart.h
deleted file mode 100644
index 108d8c48e42e..000000000000
--- a/include/asm-arm26/emergency-restart.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _ASM_EMERGENCY_RESTART_H
2#define _ASM_EMERGENCY_RESTART_H
3
4#include <asm-generic/emergency-restart.h>
5
6#endif /* _ASM_EMERGENCY_RESTART_H */
diff --git a/include/asm-arm26/errno.h b/include/asm-arm26/errno.h
deleted file mode 100644
index 6e60f0612bb6..000000000000
--- a/include/asm-arm26/errno.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _ARM_ERRNO_H
2#define _ARM_ERRNO_H
3
4#include <asm-generic/errno.h>
5
6#endif
diff --git a/include/asm-arm26/fb.h b/include/asm-arm26/fb.h
deleted file mode 100644
index c7df38030992..000000000000
--- a/include/asm-arm26/fb.h
+++ /dev/null
@@ -1,12 +0,0 @@
1#ifndef _ASM_FB_H_
2#define _ASM_FB_H_
3#include <linux/fb.h>
4
5#define fb_pgprotect(...) do {} while (0)
6
7static inline int fb_is_primary_device(struct fb_info *info)
8{
9 return 0;
10}
11
12#endif /* _ASM_FB_H_ */
diff --git a/include/asm-arm26/fcntl.h b/include/asm-arm26/fcntl.h
deleted file mode 100644
index d85995e7459e..000000000000
--- a/include/asm-arm26/fcntl.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#ifndef _ARM_FCNTL_H
2#define _ARM_FCNTL_H
3
4/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
5 located on an ext2 file system */
6#define O_DIRECTORY 040000 /* must be a directory */
7#define O_NOFOLLOW 0100000 /* don't follow links */
8#define O_DIRECT 0200000 /* direct disk access hint - currently ignored */
9#define O_LARGEFILE 0400000
10
11#include <asm-generic/fcntl.h>
12
13#endif
diff --git a/include/asm-arm26/fiq.h b/include/asm-arm26/fiq.h
deleted file mode 100644
index a3bad09e825c..000000000000
--- a/include/asm-arm26/fiq.h
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2 * linux/include/asm-arm/fiq.h
3 *
4 * Support for FIQ on ARM architectures.
5 * Written by Philip Blundell <philb@gnu.org>, 1998
6 * Re-written by Russell King
7 */
8
9#ifndef __ASM_FIQ_H
10#define __ASM_FIQ_H
11
12#include <asm/ptrace.h>
13
14struct fiq_handler {
15 struct fiq_handler *next;
16 /* Name
17 */
18 const char *name;
19 /* Called to ask driver to relinquish/
20 * reacquire FIQ
21 * return zero to accept, or -<errno>
22 */
23 int (*fiq_op)(void *, int relinquish);
24 /* data for the relinquish/reacquire functions
25 */
26 void *dev_id;
27};
28
29extern int claim_fiq(struct fiq_handler *f);
30extern void release_fiq(struct fiq_handler *f);
31extern void set_fiq_handler(void *start, unsigned int length);
32extern void set_fiq_regs(struct pt_regs *regs);
33extern void get_fiq_regs(struct pt_regs *regs);
34extern void enable_fiq(int fiq);
35extern void disable_fiq(int fiq);
36
37#endif
diff --git a/include/asm-arm26/floppy.h b/include/asm-arm26/floppy.h
deleted file mode 100644
index efb732165a4f..000000000000
--- a/include/asm-arm26/floppy.h
+++ /dev/null
@@ -1,141 +0,0 @@
1/*
2 * linux/include/asm-arm/floppy.h
3 *
4 * Copyright (C) 1996-2000 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * Note that we don't touch FLOPPY_DMA nor FLOPPY_IRQ here
11 */
12#ifndef __ASM_ARM_FLOPPY_H
13#define __ASM_ARM_FLOPPY_H
14
15#define fd_outb(val,port) \
16 do { \
17 if ((port) == FD_DOR) \
18 fd_setdor((val)); \
19 else \
20 outb((val),(port)); \
21 } while(0)
22
23#define fd_inb(port) inb((port))
24#define fd_request_irq() request_irq(IRQ_FLOPPYDISK,floppy_interrupt,\
25 IRQF_DISABLED,"floppy",NULL)
26#define fd_free_irq() free_irq(IRQ_FLOPPYDISK,NULL)
27#define fd_disable_irq() disable_irq(IRQ_FLOPPYDISK)
28#define fd_enable_irq() enable_irq(IRQ_FLOPPYDISK)
29
30#define fd_request_dma() request_dma(DMA_FLOPPY,"floppy")
31#define fd_free_dma() free_dma(DMA_FLOPPY)
32#define fd_disable_dma() disable_dma(DMA_FLOPPY)
33#define fd_enable_dma() enable_dma(DMA_FLOPPY)
34#define fd_clear_dma_ff() clear_dma_ff(DMA_FLOPPY)
35#define fd_set_dma_mode(mode) set_dma_mode(DMA_FLOPPY, (mode))
36#define fd_set_dma_addr(addr) set_dma_addr(DMA_FLOPPY, virt_to_bus((addr)))
37#define fd_set_dma_count(len) set_dma_count(DMA_FLOPPY, (len))
38#define fd_cacheflush(addr,sz)
39
40/* need to clean up dma.h */
41#define DMA_FLOPPYDISK DMA_FLOPPY
42
43/* Floppy_selects is the list of DOR's to select drive fd
44 *
45 * On initialisation, the floppy list is scanned, and the drives allocated
46 * in the order that they are found. This is done by seeking the drive
47 * to a non-zero track, and then restoring it to track 0. If an error occurs,
48 * then there is no floppy drive present. [to be put back in again]
49 */
50static unsigned char floppy_selects[2][4] =
51{
52 { 0x10, 0x21, 0x23, 0x33 },
53 { 0x10, 0x21, 0x23, 0x33 }
54};
55
56#define fd_setdor(dor) \
57do { \
58 int new_dor = (dor); \
59 if (new_dor & 0xf0) \
60 new_dor = (new_dor & 0x0c) | floppy_selects[fdc][new_dor & 3]; \
61 else \
62 new_dor &= 0x0c; \
63 outb(new_dor, FD_DOR); \
64} while (0)
65
66/*
67 * Someday, we'll automatically detect which drives are present...
68 */
69static inline void fd_scandrives (void)
70{
71#if 0
72 int floppy, drive_count;
73
74 fd_disable_irq();
75 raw_cmd = &default_raw_cmd;
76 raw_cmd->flags = FD_RAW_SPIN | FD_RAW_NEED_SEEK;
77 raw_cmd->track = 0;
78 raw_cmd->rate = ?;
79 drive_count = 0;
80 for (floppy = 0; floppy < 4; floppy ++) {
81 current_drive = drive_count;
82 /*
83 * Turn on floppy motor
84 */
85 if (start_motor(redo_fd_request))
86 continue;
87 /*
88 * Set up FDC
89 */
90 fdc_specify();
91 /*
92 * Tell FDC to recalibrate
93 */
94 output_byte(FD_RECALIBRATE);
95 LAST_OUT(UNIT(floppy));
96 /* wait for command to complete */
97 if (!successful) {
98 int i;
99 for (i = drive_count; i < 3; i--)
100 floppy_selects[fdc][i] = floppy_selects[fdc][i + 1];
101 floppy_selects[fdc][3] = 0;
102 floppy -= 1;
103 } else
104 drive_count++;
105 }
106#else
107 floppy_selects[0][0] = 0x10;
108 floppy_selects[0][1] = 0x21;
109 floppy_selects[0][2] = 0x23;
110 floppy_selects[0][3] = 0x33;
111#endif
112}
113
114#define FDC1 (0x3f0)
115
116#define FLOPPY0_TYPE 4
117#define FLOPPY1_TYPE 4
118
119#define N_FDC 1
120#define N_DRIVE 4
121
122#define FLOPPY_MOTOR_MASK 0xf0
123
124#define CROSS_64KB(a,s) (0)
125
126/*
127 * This allows people to reverse the order of
128 * fd0 and fd1, in case their hardware is
129 * strangely connected (as some RiscPCs
130 * and A5000s seem to be).
131 */
132static void driveswap(int *ints, int dummy, int dummy2)
133{
134 floppy_selects[0][0] ^= floppy_selects[0][1];
135 floppy_selects[0][1] ^= floppy_selects[0][0];
136 floppy_selects[0][0] ^= floppy_selects[0][1];
137}
138
139#define EXTRA_FLOPPY_PARAMS ,{ "driveswap", &driveswap, NULL, 0, 0 }
140
141#endif
diff --git a/include/asm-arm26/fpstate.h b/include/asm-arm26/fpstate.h
deleted file mode 100644
index 785749b3c5ab..000000000000
--- a/include/asm-arm26/fpstate.h
+++ /dev/null
@@ -1,29 +0,0 @@
1/*
2 * linux/include/asm-arm/fpstate.h
3 *
4 * Copyright (C) 1995 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __ASM_ARM_FPSTATE_H
12#define __ASM_ARM_FPSTATE_H
13
14#define FP_SIZE 35
15
16struct fp_hard_struct {
17 unsigned int save[FP_SIZE]; /* as yet undefined */
18};
19
20struct fp_soft_struct {
21 unsigned int save[FP_SIZE]; /* undefined information */
22};
23
24union fp_state {
25 struct fp_hard_struct hard;
26 struct fp_soft_struct soft;
27};
28
29#endif
diff --git a/include/asm-arm26/futex.h b/include/asm-arm26/futex.h
deleted file mode 100644
index 6a332a9f099c..000000000000
--- a/include/asm-arm26/futex.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _ASM_FUTEX_H
2#define _ASM_FUTEX_H
3
4#include <asm-generic/futex.h>
5
6#endif
diff --git a/include/asm-arm26/hardirq.h b/include/asm-arm26/hardirq.h
deleted file mode 100644
index e717742ffce0..000000000000
--- a/include/asm-arm26/hardirq.h
+++ /dev/null
@@ -1,32 +0,0 @@
1#ifndef __ASM_HARDIRQ_H
2#define __ASM_HARDIRQ_H
3
4#include <linux/cache.h>
5#include <linux/threads.h>
6#include <asm/irq.h>
7
8typedef struct {
9 unsigned int __softirq_pending;
10} ____cacheline_aligned irq_cpustat_t;
11
12#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
13
14#define HARDIRQ_BITS 8
15
16/*
17 * The hardirq mask has to be large enough to have space
18 * for potentially all IRQ sources in the system nesting
19 * on a single CPU:
20 */
21#if (1 << HARDIRQ_BITS) < NR_IRQS
22# error HARDIRQ_BITS is too low!
23#endif
24
25#ifndef CONFIG_SMP
26
27extern asmlinkage void __do_softirq(void);
28
29#endif
30
31
32#endif /* __ASM_HARDIRQ_H */
diff --git a/include/asm-arm26/hardware.h b/include/asm-arm26/hardware.h
deleted file mode 100644
index 801df0bde8b7..000000000000
--- a/include/asm-arm26/hardware.h
+++ /dev/null
@@ -1,109 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-arc/hardware.h
3 *
4 * Copyright (C) 1996-1999 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * This file contains the hardware definitions of the
11 * Acorn Archimedes/A5000 machines.
12 *
13 * Modifications:
14 * 04-04-1998 PJB/RMK Merged arc and a5k versions
15 */
16#ifndef __ASM_HARDWARE_H
17#define __ASM_HARDWARE_H
18
19
20
21/*
22 * What hardware must be present - these can be tested by the kernel
23 * source.
24 */
25#define HAS_IOC
26#define HAS_MEMC
27#define HAS_VIDC
28
29#define VDMA_ALIGNMENT PAGE_SIZE
30#define VDMA_XFERSIZE 16
31#define VDMA_INIT 0
32#define VDMA_START 1
33#define VDMA_END 2
34
35#ifndef __ASSEMBLY__
36extern void memc_write(unsigned int reg, unsigned long val);
37
38#define video_set_dma(start,end,offset) \
39do { \
40 memc_write (VDMA_START, (start >> 2)); \
41 memc_write (VDMA_END, (end - VDMA_XFERSIZE) >> 2); \
42 memc_write (VDMA_INIT, (offset >> 2)); \
43} while (0)
44#endif
45
46
47/* Hardware addresses of major areas.
48 * *_START is the physical address
49 * *_SIZE is the size of the region
50 * *_BASE is the virtual address
51 */
52#define IO_START 0x03000000
53#define IO_SIZE 0x01000000
54#define IO_BASE 0x03000000
55
56/*
57 * Screen mapping information
58 */
59#define SCREEN_START 0x02000000
60#define SCREEN_END 0x02078000
61#define SCREEN_SIZE 0x00078000
62#define SCREEN_BASE 0x02000000
63
64
65#define EXPMASK_BASE 0x03360000
66#define IOEB_BASE 0x03350000
67#define VIDC_BASE 0x03400000
68#define LATCHA_BASE 0x03250040
69#define LATCHB_BASE 0x03250018
70#define IOC_BASE 0x03200000
71#define FLOPPYDMA_BASE 0x0302a000
72#define PCIO_BASE 0x03010000
73
74// FIXME - are the below correct?
75#define PODSLOT_IOC0_BASE 0x03240000
76#define PODSLOT_IOC_SIZE (1 << 14)
77#define PODSLOT_MEMC_BASE 0x03000000
78#define PODSLOT_MEMC_SIZE (1 << 14)
79
80#define vidc_writel(val) __raw_writel(val, VIDC_BASE)
81
82#ifndef __ASSEMBLY__
83
84/*
85 * for use with inb/outb
86 */
87#define IOEB_VID_CTL (IOEB_BASE + 0x48)
88#define IOEB_PRESENT (IOEB_BASE + 0x50)
89#define IOEB_PSCLR (IOEB_BASE + 0x58)
90#define IOEB_MONTYPE (IOEB_BASE + 0x70)
91
92//FIXME - These adresses are weird - ISTR some weirdo address shifting stuff was going on here...
93#define IO_EC_IOC_BASE 0x80090000
94#define IO_EC_MEMC_BASE 0x80000000
95
96#ifdef CONFIG_ARCH_ARC
97/* A680 hardware */
98#define WD1973_BASE 0x03290000
99#define WD1973_LATCH 0x03350000
100#define Z8530_BASE 0x032b0008
101#define SCSI_BASE 0x03100000
102#endif
103
104#endif
105
106#define EXPMASK_STATUS (EXPMASK_BASE + 0x00)
107#define EXPMASK_ENABLE (EXPMASK_BASE + 0x04)
108
109#endif
diff --git a/include/asm-arm26/ide.h b/include/asm-arm26/ide.h
deleted file mode 100644
index db804d751df9..000000000000
--- a/include/asm-arm26/ide.h
+++ /dev/null
@@ -1,34 +0,0 @@
1/*
2 * linux/include/asm-arm/ide.h
3 *
4 * Copyright (C) 1994-1996 Linus Torvalds & authors
5 */
6
7/*
8 * This file contains the i386 architecture specific IDE code.
9 */
10
11#ifndef __ASMARM_IDE_H
12#define __ASMARM_IDE_H
13
14#ifdef __KERNEL__
15
16#ifndef MAX_HWIFS
17#define MAX_HWIFS 4
18#endif
19
20#include <asm/irq.h>
21#include <asm/mach-types.h>
22
23/* JMA 18.05.03 these will never be needed, but the kernel needs them to compile */
24#define __ide_mm_insw(port,addr,len) readsw(port,addr,len)
25#define __ide_mm_insl(port,addr,len) readsl(port,addr,len)
26#define __ide_mm_outsw(port,addr,len) writesw(port,addr,len)
27#define __ide_mm_outsl(port,addr,len) writesl(port,addr,len)
28
29#define IDE_ARCH_OBSOLETE_INIT
30#define ide_default_io_ctl(base) (0)
31
32#endif /* __KERNEL__ */
33
34#endif /* __ASMARM_IDE_H */
diff --git a/include/asm-arm26/io.h b/include/asm-arm26/io.h
deleted file mode 100644
index a5a7a4d5e09c..000000000000
--- a/include/asm-arm26/io.h
+++ /dev/null
@@ -1,434 +0,0 @@
1/*
2 * linux/include/asm-arm/io.h
3 *
4 * Copyright (C) 1996-2000 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * Modifications:
11 * 16-Sep-1996 RMK Inlined the inx/outx functions & optimised for both
12 * constant addresses and variable addresses.
13 * 04-Dec-1997 RMK Moved a lot of this stuff to the new architecture
14 * specific IO header files.
15 * 27-Mar-1999 PJB Second parameter of memcpy_toio is const..
16 * 04-Apr-1999 PJB Added check_signature.
17 * 12-Dec-1999 RMK More cleanups
18 * 18-Jun-2000 RMK Removed virt_to_* and friends definitions
19 */
20#ifndef __ASM_ARM_IO_H
21#define __ASM_ARM_IO_H
22
23#ifdef __KERNEL__
24
25#include <linux/types.h>
26#include <asm/byteorder.h>
27#include <asm/memory.h>
28#include <asm/hardware.h>
29
30/*
31 * Generic IO read/write. These perform native-endian accesses. Note
32 * that some architectures will want to re-define __raw_{read,write}w.
33 */
34extern void __raw_writesb(unsigned int addr, const void *data, int bytelen);
35extern void __raw_writesw(unsigned int addr, const void *data, int wordlen);
36extern void __raw_writesl(unsigned int addr, const void *data, int longlen);
37
38extern void __raw_readsb(unsigned int addr, void *data, int bytelen);
39extern void __raw_readsw(unsigned int addr, void *data, int wordlen);
40extern void __raw_readsl(unsigned int addr, void *data, int longlen);
41
42#define __raw_writeb(v,a) (*(volatile unsigned char *)(a) = (v))
43#define __raw_writew(v,a) (*(volatile unsigned short *)(a) = (v))
44#define __raw_writel(v,a) (*(volatile unsigned int *)(a) = (v))
45
46#define __raw_readb(a) (*(volatile unsigned char *)(a))
47#define __raw_readw(a) (*(volatile unsigned short *)(a))
48#define __raw_readl(a) (*(volatile unsigned int *)(a))
49
50
51/*
52 * Bad read/write accesses...
53 */
54extern void __readwrite_bug(const char *fn);
55
56/*
57 * Now, pick up the machine-defined IO definitions
58 */
59
60#define IO_SPACE_LIMIT 0xffffffff
61
62/*
63 * GCC is totally crap at loading/storing data. We try to persuade it
64 * to do the right thing by using these whereever possible instead of
65 * the above.
66 */
67#define __arch_base_getb(b,o) \
68 ({ \
69 unsigned int v, r = (b); \
70 __asm__ __volatile__( \
71 "ldrb %0, [%1, %2]" \
72 : "=r" (v) \
73 : "r" (r), "Ir" (o)); \
74 v; \
75 })
76
77#define __arch_base_getl(b,o) \
78 ({ \
79 unsigned int v, r = (b); \
80 __asm__ __volatile__( \
81 "ldr %0, [%1, %2]" \
82 : "=r" (v) \
83 : "r" (r), "Ir" (o)); \
84 v; \
85 })
86
87#define __arch_base_putb(v,b,o) \
88 ({ \
89 unsigned int r = (b); \
90 __asm__ __volatile__( \
91 "strb %0, [%1, %2]" \
92 : \
93 : "r" (v), "r" (r), "Ir" (o)); \
94 })
95
96#define __arch_base_putl(v,b,o) \
97 ({ \
98 unsigned int r = (b); \
99 __asm__ __volatile__( \
100 "str %0, [%1, %2]" \
101 : \
102 : "r" (v), "r" (r), "Ir" (o)); \
103 })
104
105/*
106 * We use two different types of addressing - PC style addresses, and ARM
107 * addresses. PC style accesses the PC hardware with the normal PC IO
108 * addresses, eg 0x3f8 for serial#1. ARM addresses are 0x80000000+
109 * and are translated to the start of IO. Note that all addresses are
110 * shifted left!
111 */
112#define __PORT_PCIO(x) (!((x) & 0x80000000))
113
114/*
115 * Dynamic IO functions - let the compiler
116 * optimize the expressions
117 */
118static inline void __outb (unsigned int value, unsigned int port)
119{
120 unsigned long temp;
121 __asm__ __volatile__(
122 "tst %2, #0x80000000\n\t"
123 "mov %0, %4\n\t"
124 "addeq %0, %0, %3\n\t"
125 "strb %1, [%0, %2, lsl #2] @ outb"
126 : "=&r" (temp)
127 : "r" (value), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE)
128 : "cc");
129}
130
131static inline void __outw (unsigned int value, unsigned int port)
132{
133 unsigned long temp;
134 __asm__ __volatile__(
135 "tst %2, #0x80000000\n\t"
136 "mov %0, %4\n\t"
137 "addeq %0, %0, %3\n\t"
138 "str %1, [%0, %2, lsl #2] @ outw"
139 : "=&r" (temp)
140 : "r" (value|value<<16), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE)
141 : "cc");
142}
143
144static inline void __outl (unsigned int value, unsigned int port)
145{
146 unsigned long temp;
147 __asm__ __volatile__(
148 "tst %2, #0x80000000\n\t"
149 "mov %0, %4\n\t"
150 "addeq %0, %0, %3\n\t"
151 "str %1, [%0, %2, lsl #2] @ outl"
152 : "=&r" (temp)
153 : "r" (value), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE)
154 : "cc");
155}
156
157#define DECLARE_DYN_IN(sz,fnsuffix,instr) \
158static inline unsigned sz __in##fnsuffix (unsigned int port) \
159{ \
160 unsigned long temp, value; \
161 __asm__ __volatile__( \
162 "tst %2, #0x80000000\n\t" \
163 "mov %0, %4\n\t" \
164 "addeq %0, %0, %3\n\t" \
165 "ldr" instr " %1, [%0, %2, lsl #2] @ in" #fnsuffix \
166 : "=&r" (temp), "=r" (value) \
167 : "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE) \
168 : "cc"); \
169 return (unsigned sz)value; \
170}
171
172static inline unsigned int __ioaddr (unsigned int port) \
173{ \
174 if (__PORT_PCIO(port)) \
175 return (unsigned int)(PCIO_BASE + (port << 2)); \
176 else \
177 return (unsigned int)(IO_BASE + (port << 2)); \
178}
179
180#define DECLARE_IO(sz,fnsuffix,instr) \
181 DECLARE_DYN_IN(sz,fnsuffix,instr)
182
183DECLARE_IO(char,b,"b")
184DECLARE_IO(short,w,"")
185DECLARE_IO(int,l,"")
186
187#undef DECLARE_IO
188#undef DECLARE_DYN_IN
189
190/*
191 * Constant address IO functions
192 *
193 * These have to be macros for the 'J' constraint to work -
194 * +/-4096 immediate operand.
195 */
196#define __outbc(value,port) \
197({ \
198 if (__PORT_PCIO((port))) \
199 __asm__ __volatile__( \
200 "strb %0, [%1, %2] @ outbc" \
201 : : "r" (value), "r" (PCIO_BASE), "Jr" ((port) << 2)); \
202 else \
203 __asm__ __volatile__( \
204 "strb %0, [%1, %2] @ outbc" \
205 : : "r" (value), "r" (IO_BASE), "r" ((port) << 2)); \
206})
207
208#define __inbc(port) \
209({ \
210 unsigned char result; \
211 if (__PORT_PCIO((port))) \
212 __asm__ __volatile__( \
213 "ldrb %0, [%1, %2] @ inbc" \
214 : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port) << 2)); \
215 else \
216 __asm__ __volatile__( \
217 "ldrb %0, [%1, %2] @ inbc" \
218 : "=r" (result) : "r" (IO_BASE), "r" ((port) << 2)); \
219 result; \
220})
221
222#define __outwc(value,port) \
223({ \
224 unsigned long v = value; \
225 if (__PORT_PCIO((port))) \
226 __asm__ __volatile__( \
227 "str %0, [%1, %2] @ outwc" \
228 : : "r" (v|v<<16), "r" (PCIO_BASE), "Jr" ((port) << 2)); \
229 else \
230 __asm__ __volatile__( \
231 "str %0, [%1, %2] @ outwc" \
232 : : "r" (v|v<<16), "r" (IO_BASE), "r" ((port) << 2)); \
233})
234
235#define __inwc(port) \
236({ \
237 unsigned short result; \
238 if (__PORT_PCIO((port))) \
239 __asm__ __volatile__( \
240 "ldr %0, [%1, %2] @ inwc" \
241 : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port) << 2)); \
242 else \
243 __asm__ __volatile__( \
244 "ldr %0, [%1, %2] @ inwc" \
245 : "=r" (result) : "r" (IO_BASE), "r" ((port) << 2)); \
246 result & 0xffff; \
247})
248
249#define __outlc(value,port) \
250({ \
251 unsigned long v = value; \
252 if (__PORT_PCIO((port))) \
253 __asm__ __volatile__( \
254 "str %0, [%1, %2] @ outlc" \
255 : : "r" (v), "r" (PCIO_BASE), "Jr" ((port) << 2)); \
256 else \
257 __asm__ __volatile__( \
258 "str %0, [%1, %2] @ outlc" \
259 : : "r" (v), "r" (IO_BASE), "r" ((port) << 2)); \
260})
261
262#define __inlc(port) \
263({ \
264 unsigned long result; \
265 if (__PORT_PCIO((port))) \
266 __asm__ __volatile__( \
267 "ldr %0, [%1, %2] @ inlc" \
268 : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port) << 2)); \
269 else \
270 __asm__ __volatile__( \
271 "ldr %0, [%1, %2] @ inlc" \
272 : "=r" (result) : "r" (IO_BASE), "r" ((port) << 2)); \
273 result; \
274})
275
276#define __ioaddrc(port) \
277({ \
278 unsigned long addr; \
279 if (__PORT_PCIO((port))) \
280 addr = PCIO_BASE + ((port) << 2); \
281 else \
282 addr = IO_BASE + ((port) << 2); \
283 addr; \
284})
285
286#define inb(p) (__builtin_constant_p((p)) ? __inbc(p) : __inb(p))
287#define inw(p) (__builtin_constant_p((p)) ? __inwc(p) : __inw(p))
288#define inl(p) (__builtin_constant_p((p)) ? __inlc(p) : __inl(p))
289#define outb(v,p) (__builtin_constant_p((p)) ? __outbc(v,p) : __outb(v,p))
290#define outw(v,p) (__builtin_constant_p((p)) ? __outwc(v,p) : __outw(v,p))
291#define outl(v,p) (__builtin_constant_p((p)) ? __outlc(v,p) : __outl(v,p))
292#define __ioaddr(p) (__builtin_constant_p((p)) ? __ioaddr(p) : __ioaddrc(p))
293
294/* JMA 18.02.03 added sb,sl from arm/io.h, changing io to ioaddr */
295
296#define outsb(p,d,l) __raw_writesb(__ioaddr(p),d,l)
297#define outsw(p,d,l) __raw_writesw(__ioaddr(p),d,l)
298#define outsl(p,d,l) __raw_writesl(__ioaddr(p),d,l)
299
300#define insb(p,d,l) __raw_readsb(__ioaddr(p),d,l)
301#define insw(p,d,l) __raw_readsw(__ioaddr(p),d,l)
302#define insl(p,d,l) __raw_readsl(__ioaddr(p),d,l)
303
304#define insw(p,d,l) __raw_readsw(__ioaddr(p),d,l)
305#define outsw(p,d,l) __raw_writesw(__ioaddr(p),d,l)
306
307#define readb(c) (__readwrite_bug("readb"),0)
308#define readw(c) (__readwrite_bug("readw"),0)
309#define readl(c) (__readwrite_bug("readl"),0)
310#define readb_relaxed(addr) readb(addr)
311#define readw_relaxed(addr) readw(addr)
312#define readl_relaxed(addr) readl(addr)
313#define writeb(v,c) __readwrite_bug("writeb")
314#define writew(v,c) __readwrite_bug("writew")
315#define writel(v,c) __readwrite_bug("writel")
316
317#define readsw(p,d,l) (__readwrite_bug("readsw"),0)
318#define readsl(p,d,l) (__readwrite_bug("readsl"),0)
319#define writesw(p,d,l) __readwrite_bug("writesw")
320#define writesl(p,d,l) __readwrite_bug("writesl")
321
322#define mmiowb()
323
324/* the following macro is deprecated */
325#define ioaddr(port) __ioaddr((port))
326
327/*
328 * No ioremap support here.
329 */
330#define __arch_ioremap(c,s,f,a) ((void *)(c))
331#define __arch_iounmap(c) do { } while (0)
332
333
334#if defined(__arch_putb) || defined(__arch_putw) || defined(__arch_putl) || \
335 defined(__arch_getb) || defined(__arch_getw) || defined(__arch_getl)
336#warning machine class uses old __arch_putw or __arch_getw
337#endif
338
339/*
340 * IO port access primitives
341 * -------------------------
342 *
343 * The ARM doesn't have special IO access instructions; all IO is memory
344 * mapped. Note that these are defined to perform little endian accesses
345 * only. Their primary purpose is to access PCI and ISA peripherals.
346 *
347 * Note that for a big endian machine, this implies that the following
348 * big endian mode connectivity is in place, as described by numerious
349 * ARM documents:
350 *
351 * PCI: D0-D7 D8-D15 D16-D23 D24-D31
352 * ARM: D24-D31 D16-D23 D8-D15 D0-D7
353 *
354 * The machine specific io.h include defines __io to translate an "IO"
355 * address to a memory address.
356 *
357 * Note that we prevent GCC re-ordering or caching values in expressions
358 * by introducing sequence points into the in*() definitions. Note that
359 * __raw_* do not guarantee this behaviour.
360 */
361/*
362#define outsb(p,d,l) __raw_writesb(__io(p),d,l)
363#define outsw(p,d,l) __raw_writesw(__io(p),d,l)
364
365#define insb(p,d,l) __raw_readsb(__io(p),d,l)
366#define insw(p,d,l) __raw_readsw(__io(p),d,l)
367*/
368#define outb_p(val,port) outb((val),(port))
369#define outw_p(val,port) outw((val),(port))
370#define inb_p(port) inb((port))
371#define inw_p(port) inw((port))
372#define inl_p(port) inl((port))
373
374#define outsb_p(port,from,len) outsb(port,from,len)
375#define outsw_p(port,from,len) outsw(port,from,len)
376#define insb_p(port,to,len) insb(port,to,len)
377#define insw_p(port,to,len) insw(port,to,len)
378
379/*
380 * String version of IO memory access ops:
381 */
382extern void _memcpy_fromio(void *, unsigned long, size_t);
383extern void _memcpy_toio(unsigned long, const void *, size_t);
384extern void _memset_io(unsigned long, int, size_t);
385
386/*
387 * ioremap and friends.
388 *
389 * ioremap takes a PCI memory address, as specified in
390 * Documentation/IO-mapping.txt.
391 */
392extern void * __ioremap(unsigned long, size_t, unsigned long, unsigned long);
393extern void __iounmap(void *addr);
394
395#ifndef __arch_ioremap
396#define ioremap(cookie,size) __ioremap(cookie,size,0,1)
397#define ioremap_nocache(cookie,size) __ioremap(cookie,size,0,1)
398#define iounmap(cookie) __iounmap(cookie)
399#else
400#define ioremap(cookie,size) __arch_ioremap((cookie),(size),0,1)
401#define ioremap_nocache(cookie,size) __arch_ioremap((cookie),(size),0,1)
402#define iounmap(cookie) __arch_iounmap(cookie)
403#endif
404
405/*
406 * DMA-consistent mapping functions. These allocate/free a region of
407 * uncached, unwrite-buffered mapped memory space for use with DMA
408 * devices. This is the "generic" version. The PCI specific version
409 * is in pci.h
410 */
411extern void *consistent_alloc(int gfp, size_t size, dma_addr_t *handle);
412extern void consistent_free(void *vaddr, size_t size, dma_addr_t handle);
413extern void consistent_sync(void *vaddr, size_t size, int rw);
414
415/*
416 * can the hardware map this into one segment or not, given no other
417 * constraints.
418 */
419#define BIOVEC_MERGEABLE(vec1, vec2) \
420 ((bvec_to_phys((vec1)) + (vec1)->bv_len) == bvec_to_phys((vec2)))
421
422/*
423 * Convert a physical pointer to a virtual kernel pointer for /dev/mem
424 * access
425 */
426#define xlate_dev_mem_ptr(p) __va(p)
427
428/*
429 * Convert a virtual cached pointer to an uncached pointer
430 */
431#define xlate_dev_kmem_ptr(p) p
432
433#endif /* __KERNEL__ */
434#endif /* __ASM_ARM_IO_H */
diff --git a/include/asm-arm26/ioc.h b/include/asm-arm26/ioc.h
deleted file mode 100644
index b3b46ef65943..000000000000
--- a/include/asm-arm26/ioc.h
+++ /dev/null
@@ -1,72 +0,0 @@
1/*
2 * linux/include/asm-arm/hardware/ioc.h
3 *
4 * Copyright (C) Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * Use these macros to read/write the IOC. All it does is perform the actual
11 * read/write.
12 */
13#ifndef __ASMARM_HARDWARE_IOC_H
14#define __ASMARM_HARDWARE_IOC_H
15
16#ifndef __ASSEMBLY__
17
18/*
19 * We use __raw_base variants here so that we give the compiler the
20 * chance to keep IOC_BASE in a register.
21 */
22#define ioc_readb(off) __raw_readb(IOC_BASE + (off))
23#define ioc_writeb(val,off) __raw_writeb(val, IOC_BASE + (off))
24
25#endif
26
27#define IOC_CONTROL (0x00)
28#define IOC_KARTTX (0x04)
29#define IOC_KARTRX (0x04)
30
31#define IOC_IRQSTATA (0x10)
32#define IOC_IRQREQA (0x14)
33#define IOC_IRQCLRA (0x14)
34#define IOC_IRQMASKA (0x18)
35
36#define IOC_IRQSTATB (0x20)
37#define IOC_IRQREQB (0x24)
38#define IOC_IRQMASKB (0x28)
39
40#define IOC_FIQSTAT (0x30)
41#define IOC_FIQREQ (0x34)
42#define IOC_FIQMASK (0x38)
43
44#define IOC_T0CNTL (0x40)
45#define IOC_T0LTCHL (0x40)
46#define IOC_T0CNTH (0x44)
47#define IOC_T0LTCHH (0x44)
48#define IOC_T0GO (0x48)
49#define IOC_T0LATCH (0x4c)
50
51#define IOC_T1CNTL (0x50)
52#define IOC_T1LTCHL (0x50)
53#define IOC_T1CNTH (0x54)
54#define IOC_T1LTCHH (0x54)
55#define IOC_T1GO (0x58)
56#define IOC_T1LATCH (0x5c)
57
58#define IOC_T2CNTL (0x60)
59#define IOC_T2LTCHL (0x60)
60#define IOC_T2CNTH (0x64)
61#define IOC_T2LTCHH (0x64)
62#define IOC_T2GO (0x68)
63#define IOC_T2LATCH (0x6c)
64
65#define IOC_T3CNTL (0x70)
66#define IOC_T3LTCHL (0x70)
67#define IOC_T3CNTH (0x74)
68#define IOC_T3LTCHH (0x74)
69#define IOC_T3GO (0x78)
70#define IOC_T3LATCH (0x7c)
71
72#endif
diff --git a/include/asm-arm26/ioctl.h b/include/asm-arm26/ioctl.h
deleted file mode 100644
index b279fe06dfe5..000000000000
--- a/include/asm-arm26/ioctl.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/ioctl.h>
diff --git a/include/asm-arm26/ioctls.h b/include/asm-arm26/ioctls.h
deleted file mode 100644
index 8a3296200be1..000000000000
--- a/include/asm-arm26/ioctls.h
+++ /dev/null
@@ -1,85 +0,0 @@
1#ifndef __ASM_ARM_IOCTLS_H
2#define __ASM_ARM_IOCTLS_H
3
4#include <asm/ioctl.h>
5
6/* 0x54 is just a magic number to make these relatively unique ('T') */
7
8#define TCGETS 0x5401
9#define TCSETS 0x5402
10#define TCSETSW 0x5403
11#define TCSETSF 0x5404
12#define TCGETA 0x5405
13#define TCSETA 0x5406
14#define TCSETAW 0x5407
15#define TCSETAF 0x5408
16#define TCSBRK 0x5409
17#define TCXONC 0x540A
18#define TCFLSH 0x540B
19#define TIOCEXCL 0x540C
20#define TIOCNXCL 0x540D
21#define TIOCSCTTY 0x540E
22#define TIOCGPGRP 0x540F
23#define TIOCSPGRP 0x5410
24#define TIOCOUTQ 0x5411
25#define TIOCSTI 0x5412
26#define TIOCGWINSZ 0x5413
27#define TIOCSWINSZ 0x5414
28#define TIOCMGET 0x5415
29#define TIOCMBIS 0x5416
30#define TIOCMBIC 0x5417
31#define TIOCMSET 0x5418
32#define TIOCGSOFTCAR 0x5419
33#define TIOCSSOFTCAR 0x541A
34#define FIONREAD 0x541B
35#define TIOCINQ FIONREAD
36#define TIOCLINUX 0x541C
37#define TIOCCONS 0x541D
38#define TIOCGSERIAL 0x541E
39#define TIOCSSERIAL 0x541F
40#define TIOCPKT 0x5420
41#define FIONBIO 0x5421
42#define TIOCNOTTY 0x5422
43#define TIOCSETD 0x5423
44#define TIOCGETD 0x5424
45#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */
46#define TIOCTTYGSTRUCT 0x5426 /* For debugging only */
47#define TIOCSBRK 0x5427 /* BSD compatibility */
48#define TIOCCBRK 0x5428 /* BSD compatibility */
49#define TIOCGSID 0x5429 /* Return the session ID of FD */
50#define TCGETS2 _IOR('T',0x2A, struct termios2)
51#define TCSETS2 _IOW('T',0x2B, struct termios2)
52#define TCSETSW2 _IOW('T',0x2C, struct termios2)
53#define TCSETSF2 _IOW('T',0x2D, struct termios2)
54#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
55#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */
56
57#define FIONCLEX 0x5450 /* these numbers need to be adjusted. */
58#define FIOCLEX 0x5451
59#define FIOASYNC 0x5452
60#define TIOCSERCONFIG 0x5453
61#define TIOCSERGWILD 0x5454
62#define TIOCSERSWILD 0x5455
63#define TIOCGLCKTRMIOS 0x5456
64#define TIOCSLCKTRMIOS 0x5457
65#define TIOCSERGSTRUCT 0x5458 /* For debugging only */
66#define TIOCSERGETLSR 0x5459 /* Get line status register */
67#define TIOCSERGETMULTI 0x545A /* Get multiport config */
68#define TIOCSERSETMULTI 0x545B /* Set multiport config */
69
70#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */
71#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */
72#define FIOQSIZE 0x545E
73
74/* Used for packet mode */
75#define TIOCPKT_DATA 0
76#define TIOCPKT_FLUSHREAD 1
77#define TIOCPKT_FLUSHWRITE 2
78#define TIOCPKT_STOP 4
79#define TIOCPKT_START 8
80#define TIOCPKT_NOSTOP 16
81#define TIOCPKT_DOSTOP 32
82
83#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
84
85#endif
diff --git a/include/asm-arm26/ipc.h b/include/asm-arm26/ipc.h
deleted file mode 100644
index a46e3d9c2a3f..000000000000
--- a/include/asm-arm26/ipc.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/ipc.h>
diff --git a/include/asm-arm26/ipcbuf.h b/include/asm-arm26/ipcbuf.h
deleted file mode 100644
index 97683975f7df..000000000000
--- a/include/asm-arm26/ipcbuf.h
+++ /dev/null
@@ -1,29 +0,0 @@
1#ifndef __ASMARM_IPCBUF_H
2#define __ASMARM_IPCBUF_H
3
4/*
5 * The ipc64_perm structure for arm architecture.
6 * Note extra padding because this structure is passed back and forth
7 * between kernel and user space.
8 *
9 * Pad space is left for:
10 * - 32-bit mode_t and seq
11 * - 2 miscellaneous 32-bit values
12 */
13
14struct ipc64_perm
15{
16 __kernel_key_t key;
17 __kernel_uid32_t uid;
18 __kernel_gid32_t gid;
19 __kernel_uid32_t cuid;
20 __kernel_gid32_t cgid;
21 __kernel_mode_t mode;
22 unsigned short __pad1;
23 unsigned short seq;
24 unsigned short __pad2;
25 unsigned long __unused1;
26 unsigned long __unused2;
27};
28
29#endif /* __ASMARM_IPCBUF_H */
diff --git a/include/asm-arm26/irq.h b/include/asm-arm26/irq.h
deleted file mode 100644
index 52971b49ed3b..000000000000
--- a/include/asm-arm26/irq.h
+++ /dev/null
@@ -1,43 +0,0 @@
1#ifndef __ASM_ARM_IRQ_H
2#define __ASM_ARM_IRQ_H
3
4#include <asm/sysirq.h>
5
6#ifndef NR_IRQS
7#define NR_IRQS 128
8#endif
9
10
11/* JMA 18.05.02 Copied off arch/arm/irq.h */
12#ifndef irq_canonicalize
13#define irq_canonicalize(i) (i)
14#endif
15
16
17/*
18 * Use this value to indicate lack of interrupt
19 * capability
20 */
21#ifndef NO_IRQ
22#define NO_IRQ ((unsigned int)(-1))
23#endif
24
25struct irqaction;
26
27#define __IRQT_FALEDGE (1 << 0)
28#define __IRQT_RISEDGE (1 << 1)
29#define __IRQT_LOWLVL (1 << 2)
30#define __IRQT_HIGHLVL (1 << 3)
31
32#define IRQT_NOEDGE (0)
33#define IRQT_RISING (__IRQT_RISEDGE)
34#define IRQT_FALLING (__IRQT_FALEDGE)
35#define IRQT_BOTHEDGE (__IRQT_RISEDGE|__IRQT_FALEDGE)
36#define IRQT_LOW (__IRQT_LOWLVL)
37#define IRQT_HIGH (__IRQT_HIGHLVL)
38#define IRQT_PROBE (1 << 4)
39
40int set_irq_type(unsigned int irq, unsigned int type);
41
42#endif
43
diff --git a/include/asm-arm26/irqchip.h b/include/asm-arm26/irqchip.h
deleted file mode 100644
index 6a007a954098..000000000000
--- a/include/asm-arm26/irqchip.h
+++ /dev/null
@@ -1,101 +0,0 @@
1/*
2 * linux/include/asm-arm/mach/irq.h
3 *
4 * Copyright (C) 1995-2000 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#ifndef __ASM_ARM_MACH_IRQ_H
11#define __ASM_ARM_MACH_IRQ_H
12
13struct irqdesc;
14struct pt_regs;
15struct seq_file;
16
17typedef void (*irq_handler_t)(unsigned int, struct irqdesc *, struct pt_regs *);
18typedef void (*irq_control_t)(unsigned int);
19
20struct irqchip {
21 /*
22 * Acknowledge the IRQ.
23 * If this is a level-based IRQ, then it is expected to mask the IRQ
24 * as well.
25 */
26 void (*ack)(unsigned int);
27 /*
28 * Mask the IRQ in hardware.
29 */
30 void (*mask)(unsigned int);
31 /*
32 * Unmask the IRQ in hardware.
33 */
34 void (*unmask)(unsigned int);
35 /*
36 * Re-run the IRQ
37 */
38 void (*rerun)(unsigned int);
39 /*
40 * Set the type of the IRQ.
41 */
42 int (*type)(unsigned int, unsigned int);
43};
44
45struct irqdesc {
46 irq_handler_t handle;
47 struct irqchip *chip;
48 struct irqaction *action;
49
50 unsigned int enabled : 1; /* IRQ is currently enabled */
51 unsigned int triggered: 1; /* IRQ has occurred */
52 unsigned int running : 1; /* IRQ is running */
53 unsigned int pending : 1; /* IRQ is pending */
54 unsigned int probing : 1; /* IRQ in use for a probe */
55 unsigned int probe_ok : 1; /* IRQ can be used for probe */
56 unsigned int valid : 1; /* IRQ claimable */
57 unsigned int noautoenable : 1; /* don't automatically enable IRQ */
58 unsigned int unused :23;
59 unsigned int depth; /* disable depth */
60
61 /*
62 * IRQ lock detection
63 */
64 unsigned int lck_cnt;
65 unsigned int lck_pc;
66 unsigned int lck_jif;
67};
68
69extern struct irqdesc irq_desc[];
70
71/*
72 * This is internal. Do not use it.
73 */
74extern void (*init_arch_irq)(void);
75extern void init_FIQ(void);
76extern int show_fiq_list(struct seq_file *, void *);
77void __set_irq_handler(unsigned int irq, irq_handler_t, int);
78
79/*
80 * External stuff.
81 */
82#define set_irq_handler(irq,handler) __set_irq_handler(irq,handler,0)
83#define set_irq_chained_handler(irq,handler) __set_irq_handler(irq,handler,1)
84
85void set_irq_chip(unsigned int irq, struct irqchip *);
86void set_irq_flags(unsigned int irq, unsigned int flags);
87
88#define IRQF_VALID (1 << 0)
89#define IRQF_PROBE (1 << 1)
90#define IRQF_NOAUTOEN (1 << 2)
91
92/*
93 * Built-in IRQ handlers.
94 */
95void do_level_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs);
96void do_edge_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs);
97void do_simple_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs);
98void do_bad_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs);
99void dummy_mask_unmask_irq(unsigned int irq);
100
101#endif
diff --git a/include/asm-arm26/kdebug.h b/include/asm-arm26/kdebug.h
deleted file mode 100644
index 6ece1b037665..000000000000
--- a/include/asm-arm26/kdebug.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <asm-generic/kdebug.h>
diff --git a/include/asm-arm26/kmap_types.h b/include/asm-arm26/kmap_types.h
deleted file mode 100644
index d5da712b723c..000000000000
--- a/include/asm-arm26/kmap_types.h
+++ /dev/null
@@ -1,12 +0,0 @@
1#ifndef __ARM_KMAP_TYPES_H
2#define __ARM_KMAP_TYPES_H
3
4/*
5 * This is the "bare minimum". AIO seems to require this.
6 */
7enum km_type {
8 KM_IRQ0,
9 KM_USER1
10};
11
12#endif
diff --git a/include/asm-arm26/leds.h b/include/asm-arm26/leds.h
deleted file mode 100644
index 12290ea55801..000000000000
--- a/include/asm-arm26/leds.h
+++ /dev/null
@@ -1,50 +0,0 @@
1/*
2 * linux/include/asm-arm/leds.h
3 *
4 * Copyright (C) 1998 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * Event-driven interface for LEDs on machines
11 * Added led_start and led_stop- Alex Holden, 28th Dec 1998.
12 */
13#ifndef ASM_ARM_LEDS_H
14#define ASM_ARM_LEDS_H
15
16
17typedef enum {
18 led_idle_start,
19 led_idle_end,
20 led_timer,
21 led_start,
22 led_stop,
23 led_claim, /* override idle & timer leds */
24 led_release, /* restore idle & timer leds */
25 led_start_timer_mode,
26 led_stop_timer_mode,
27 led_green_on,
28 led_green_off,
29 led_amber_on,
30 led_amber_off,
31 led_red_on,
32 led_red_off,
33 led_blue_on,
34 led_blue_off,
35 /*
36 * I want this between led_timer and led_start, but
37 * someone has decided to export this to user space
38 */
39 led_halted
40} led_event_t;
41
42/* Use this routine to handle LEDs */
43
44#ifdef CONFIG_LEDS
45extern void (*leds_event)(led_event_t);
46#else
47#define leds_event(e)
48#endif
49
50#endif
diff --git a/include/asm-arm26/limits.h b/include/asm-arm26/limits.h
deleted file mode 100644
index 08d8c6600804..000000000000
--- a/include/asm-arm26/limits.h
+++ /dev/null
@@ -1,11 +0,0 @@
1#ifndef __ASM_PIPE_H
2#define __ASM_PIPE_H
3
4#ifndef PAGE_SIZE
5#include <asm/page.h>
6#endif
7
8#define PIPE_BUF PAGE_SIZE
9
10#endif
11
diff --git a/include/asm-arm26/linkage.h b/include/asm-arm26/linkage.h
deleted file mode 100644
index dbe4b4e31a5b..000000000000
--- a/include/asm-arm26/linkage.h
+++ /dev/null
@@ -1,7 +0,0 @@
1#ifndef __ASM_LINKAGE_H
2#define __ASM_LINKAGE_H
3
4#define __ALIGN .align 0
5#define __ALIGN_STR ".align 0"
6
7#endif
diff --git a/include/asm-arm26/local.h b/include/asm-arm26/local.h
deleted file mode 100644
index 6759e9183cef..000000000000
--- a/include/asm-arm26/local.h
+++ /dev/null
@@ -1,2 +0,0 @@
1//FIXME - nicked from arm32 - check it is correct...
2#include <asm-generic/local.h>
diff --git a/include/asm-arm26/locks.h b/include/asm-arm26/locks.h
deleted file mode 100644
index 81b3bda2ed00..000000000000
--- a/include/asm-arm26/locks.h
+++ /dev/null
@@ -1,161 +0,0 @@
1/*
2 * linux/include/asm-arm/proc-armo/locks.h
3 *
4 * Copyright (C) 2000 Russell King
5 * Fixes for 26 bit machines, (C) 2000 Dave Gilbert
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * Interrupt safe locking assembler.
12 */
13#ifndef __ASM_PROC_LOCKS_H
14#define __ASM_PROC_LOCKS_H
15
16/* Decrements by 1, fails if value < 0 */
17#define __down_op(ptr,fail) \
18 ({ \
19 __asm__ __volatile__ ( \
20 "@ atomic down operation\n" \
21" mov ip, pc\n" \
22" orr lr, ip, #0x08000000\n" \
23" teqp lr, #0\n" \
24" ldr lr, [%0]\n" \
25" and ip, ip, #0x0c000003\n" \
26" subs lr, lr, #1\n" \
27" str lr, [%0]\n" \
28" orrmi ip, ip, #0x80000000 @ set N\n" \
29" teqp ip, #0\n" \
30" movmi ip, %0\n" \
31" blmi " #fail \
32 : \
33 : "r" (ptr) \
34 : "ip", "lr", "cc"); \
35 })
36
37#define __down_op_ret(ptr,fail) \
38 ({ \
39 unsigned int result; \
40 __asm__ __volatile__ ( \
41" @ down_op_ret\n" \
42" mov ip, pc\n" \
43" orr lr, ip, #0x08000000\n" \
44" teqp lr, #0\n" \
45" ldr lr, [%1]\n" \
46" and ip, ip, #0x0c000003\n" \
47" subs lr, lr, #1\n" \
48" str lr, [%1]\n" \
49" orrmi ip, ip, #0x80000000 @ set N\n" \
50" teqp ip, #0\n" \
51" movmi ip, %1\n" \
52" movpl ip, #0\n" \
53" blmi " #fail "\n" \
54" mov %0, ip" \
55 : "=&r" (result) \
56 : "r" (ptr) \
57 : "ip", "lr", "cc"); \
58 result; \
59 })
60
61#define __up_op(ptr,wake) \
62 ({ \
63 __asm__ __volatile__ ( \
64 "@ up_op\n" \
65" mov ip, pc\n" \
66" orr lr, ip, #0x08000000\n" \
67" teqp lr, #0\n" \
68" ldr lr, [%0]\n" \
69" and ip, ip, #0x0c000003\n" \
70" adds lr, lr, #1\n" \
71" str lr, [%0]\n" \
72" orrle ip, ip, #0x80000000 @ set N - should this be mi ??? DAG ! \n" \
73" teqp ip, #0\n" \
74" movmi ip, %0\n" \
75" blmi " #wake \
76 : \
77 : "r" (ptr) \
78 : "ip", "lr", "cc"); \
79 })
80
81/*
82 * The value 0x01000000 supports up to 128 processors and
83 * lots of processes. BIAS must be chosen such that sub'ing
84 * BIAS once per CPU will result in the long remaining
85 * negative.
86 */
87#define RW_LOCK_BIAS 0x01000000
88#define RW_LOCK_BIAS_STR "0x01000000"
89
90/* Decrements by RW_LOCK_BIAS rather than 1, fails if value != 0 */
91#define __down_op_write(ptr,fail) \
92 ({ \
93 __asm__ __volatile__( \
94 "@ down_op_write\n" \
95" mov ip, pc\n" \
96" orr lr, ip, #0x08000000\n" \
97" teqp lr, #0\n" \
98" and ip, ip, #0x0c000003\n" \
99\
100" ldr lr, [%0]\n" \
101" subs lr, lr, %1\n" \
102" str lr, [%0]\n" \
103\
104" orreq ip, ip, #0x40000000 @ set Z \n"\
105" teqp ip, #0\n" \
106" movne ip, %0\n" \
107" blne " #fail \
108 : \
109 : "r" (ptr), "I" (RW_LOCK_BIAS) \
110 : "ip", "lr", "cc"); \
111 })
112
113/* Increments by RW_LOCK_BIAS, wakes if value >= 0 */
114#define __up_op_write(ptr,wake) \
115 ({ \
116 __asm__ __volatile__( \
117 "@ up_op_read\n" \
118" mov ip, pc\n" \
119" orr lr, ip, #0x08000000\n" \
120" teqp lr, #0\n" \
121\
122" ldr lr, [%0]\n" \
123" and ip, ip, #0x0c000003\n" \
124" adds lr, lr, %1\n" \
125" str lr, [%0]\n" \
126\
127" orrcs ip, ip, #0x20000000 @ set C\n" \
128" teqp ip, #0\n" \
129" movcs ip, %0\n" \
130" blcs " #wake \
131 : \
132 : "r" (ptr), "I" (RW_LOCK_BIAS) \
133 : "ip", "lr", "cc"); \
134 })
135
136#define __down_op_read(ptr,fail) \
137 __down_op(ptr, fail)
138
139#define __up_op_read(ptr,wake) \
140 ({ \
141 __asm__ __volatile__( \
142 "@ up_op_read\n" \
143" mov ip, pc\n" \
144" orr lr, ip, #0x08000000\n" \
145" teqp lr, #0\n" \
146\
147" ldr lr, [%0]\n" \
148" and ip, ip, #0x0c000003\n" \
149" adds lr, lr, %1\n" \
150" str lr, [%0]\n" \
151\
152" orreq ip, ip, #0x40000000 @ Set Z \n" \
153" teqp ip, #0\n" \
154" moveq ip, %0\n" \
155" bleq " #wake \
156 : \
157 : "r" (ptr), "I" (1) \
158 : "ip", "lr", "cc"); \
159 })
160
161#endif
diff --git a/include/asm-arm26/mach-types.h b/include/asm-arm26/mach-types.h
deleted file mode 100644
index 0aeaedcbac96..000000000000
--- a/include/asm-arm26/mach-types.h
+++ /dev/null
@@ -1,36 +0,0 @@
1/*
2 * Unlike ARM32 this is NOT automatically generated. DONT delete it
3 * Instead, consider FIXME-ing it so its auto-detected.
4 */
5
6#ifndef __ASM_ARM_MACH_TYPE_H
7#define __ASM_ARM_MACH_TYPE_H
8
9
10#ifndef __ASSEMBLY__
11extern unsigned int __machine_arch_type;
12#endif
13
14#define MACH_TYPE_ARCHIMEDES 10
15#define MACH_TYPE_A5K 11
16
17#ifdef CONFIG_ARCH_ARC
18# define machine_arch_type MACH_TYPE_ARCHIMEDES
19# define machine_is_archimedes() (machine_arch_type == MACH_TYPE_ARCHIMEDES)
20#else
21# define machine_is_archimedes() (0)
22#endif
23
24#ifdef CONFIG_ARCH_A5K
25# define machine_arch_type MACH_TYPE_A5K
26# define machine_is_a5k() (machine_arch_type == MACH_TYPE_A5K)
27#else
28# define machine_is_a5k() (0)
29#endif
30
31#ifndef machine_arch_type
32#error Unknown machine type
33#define machine_arch_type __machine_arch_type
34#endif
35
36#endif
diff --git a/include/asm-arm26/map.h b/include/asm-arm26/map.h
deleted file mode 100644
index 6e12a7fa5c5d..000000000000
--- a/include/asm-arm26/map.h
+++ /dev/null
@@ -1,24 +0,0 @@
1/*
2 * linux/include/asm-arm/map.h
3 *
4 * Copyright (C) 1999-2000 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * Page table mapping constructs and function prototypes
11 */
12struct map_desc {
13 unsigned long virtual;
14 unsigned long physical;
15 unsigned long length;
16 unsigned int type;
17};
18
19struct meminfo;
20
21extern void create_memmap_holes(struct meminfo *);
22extern void memtable_init(struct meminfo *);
23extern void iotable_init(struct map_desc *);
24extern void setup_io_desc(void);
diff --git a/include/asm-arm26/mc146818rtc.h b/include/asm-arm26/mc146818rtc.h
deleted file mode 100644
index a234130db8f1..000000000000
--- a/include/asm-arm26/mc146818rtc.h
+++ /dev/null
@@ -1,28 +0,0 @@
1/*
2 * Machine dependent access functions for RTC registers.
3 */
4#ifndef _ASM_MC146818RTC_H
5#define _ASM_MC146818RTC_H
6
7#include <asm/irq.h>
8#include <asm/io.h>
9
10#ifndef RTC_PORT
11#define RTC_PORT(x) (0x70 + (x))
12#define RTC_ALWAYS_BCD 1 /* RTC operates in binary mode */
13#endif
14
15/*
16 * The yet supported machines all access the RTC index register via
17 * an ISA port access but the way to access the date register differs ...
18 */
19#define CMOS_READ(addr) ({ \
20outb_p((addr),RTC_PORT(0)); \
21inb_p(RTC_PORT(1)); \
22})
23#define CMOS_WRITE(val, addr) ({ \
24outb_p((addr),RTC_PORT(0)); \
25outb_p((val),RTC_PORT(1)); \
26})
27
28#endif /* _ASM_MC146818RTC_H */
diff --git a/include/asm-arm26/memory.h b/include/asm-arm26/memory.h
deleted file mode 100644
index 7c1e5be39060..000000000000
--- a/include/asm-arm26/memory.h
+++ /dev/null
@@ -1,101 +0,0 @@
1/*
2 * linux/include/asm-arm26/memory.h
3 *
4 * Copyright (C) 2000-2002 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * Note: this file should not be included by non-asm/.h files
11 */
12#ifndef __ASM_ARM_MEMORY_H
13#define __ASM_ARM_MEMORY_H
14
15/*
16 * User space: 26MB
17 */
18#define TASK_SIZE (0x01a00000UL)
19
20/*
21 * This decides where the kernel will search for a free chunk of vm
22 * space during mmap's.
23 */
24#define TASK_UNMAPPED_BASE (TASK_SIZE / 3)
25
26/*
27 * Page offset: 32MB
28 */
29#define PAGE_OFFSET (0x02000000UL)
30#define PHYS_OFFSET (0x02000000UL)
31
32#define PHYS_TO_NID(addr) (0)
33
34/*
35 * PFNs are used to describe any physical page; this means
36 * PFN 0 == physical address 0.
37 *
38 * This is the PFN of the first RAM page in the kernel
39 * direct-mapped view. We assume this is the first page
40 * of RAM in the mem_map as well.
41 */
42#define PHYS_PFN_OFFSET (PHYS_OFFSET >> PAGE_SHIFT)
43
44/*
45 * These are *only* valid on the kernel direct mapped RAM memory.
46 */
47static inline unsigned long virt_to_phys(void *x)
48{
49 return (unsigned long)x;
50}
51
52static inline void *phys_to_virt(unsigned long x)
53{
54 return (void *)((unsigned long)x);
55}
56
57#define __pa(x) (unsigned long)(x)
58#define __va(x) ((void *)(unsigned long)(x))
59
60/*
61 * Virtual <-> DMA view memory address translations
62 * Again, these are *only* valid on the kernel direct mapped RAM
63 * memory. Use of these is *deprecated*.
64 */
65#define virt_to_bus(x) ((unsigned long)(x))
66#define bus_to_virt(x) ((void *)((unsigned long)(x)))
67
68/*
69 * Conversion between a struct page and a physical address.
70 *
71 * Note: when converting an unknown physical address to a
72 * struct page, the resulting pointer must be validated
73 * using VALID_PAGE(). It must return an invalid struct page
74 * for any physical address not corresponding to a system
75 * RAM address.
76 *
77 * page_to_pfn(page) convert a struct page * to a PFN number
78 * pfn_to_page(pfn) convert a _valid_ PFN number to struct page *
79 * pfn_valid(pfn) indicates whether a PFN number is valid
80 *
81 * virt_to_page(k) convert a _valid_ virtual address to struct page *
82 * virt_addr_valid(k) indicates whether a virtual address is valid
83 */
84#define ARCH_PFN_OFFSET (PHYS_PFN_OFFSET)
85#define pfn_valid(pfn) ((pfn) >= PHYS_PFN_OFFSET && (pfn) < (PHYS_PFN_OFFSET + max_mapnr))
86
87#define virt_to_page(kaddr) (pfn_to_page(__pa(kaddr) >> PAGE_SHIFT))
88#define virt_addr_valid(kaddr) ((int)(kaddr) >= PAGE_OFFSET && (int)(kaddr) < (unsigned long)high_memory)
89
90/*
91 * For BIO. "will die". Kill me when bio_to_phys() and bvec_to_phys() die.
92 */
93#define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
94
95/*
96 * We should really eliminate virt_to_bus() here - it's deprecated.
97 */
98#define page_to_bus(page) (page_address(page))
99
100#include <asm-generic/memory_model.h>
101#endif
diff --git a/include/asm-arm26/mman.h b/include/asm-arm26/mman.h
deleted file mode 100644
index 4000a6c1b76b..000000000000
--- a/include/asm-arm26/mman.h
+++ /dev/null
@@ -1,17 +0,0 @@
1#ifndef __ARM_MMAN_H__
2#define __ARM_MMAN_H__
3
4#include <asm-generic/mman.h>
5
6#define MAP_GROWSDOWN 0x0100 /* stack-like segment */
7#define MAP_DENYWRITE 0x0800 /* ETXTBSY */
8#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */
9#define MAP_LOCKED 0x2000 /* pages are locked */
10#define MAP_NORESERVE 0x4000 /* don't check for reservations */
11#define MAP_POPULATE 0x8000 /* populate (prefault) page tables */
12#define MAP_NONBLOCK 0x10000 /* do not block on IO */
13
14#define MCL_CURRENT 1 /* lock all current mappings */
15#define MCL_FUTURE 2 /* lock all future mappings */
16
17#endif /* __ARM_MMAN_H__ */
diff --git a/include/asm-arm26/mmu.h b/include/asm-arm26/mmu.h
deleted file mode 100644
index 9b8d3d781a1e..000000000000
--- a/include/asm-arm26/mmu.h
+++ /dev/null
@@ -1,9 +0,0 @@
1#ifndef __ARM_MMU_H
2#define __ARM_MMU_H
3
4/*
5 * The ARM doesn't have a mmu context
6 */
7typedef struct { } mm_context_t;
8
9#endif
diff --git a/include/asm-arm26/mmu_context.h b/include/asm-arm26/mmu_context.h
deleted file mode 100644
index 16c821f81b8d..000000000000
--- a/include/asm-arm26/mmu_context.h
+++ /dev/null
@@ -1,53 +0,0 @@
1/*
2 * linux/include/asm-arm/mmu_context.h
3 *
4 * Copyright (C) 1996 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * Changelog:
11 * 27-06-1996 RMK Created
12 */
13#ifndef __ASM_ARM_MMU_CONTEXT_H
14#define __ASM_ARM_MMU_CONTEXT_H
15
16#include <asm-generic/mm_hooks.h>
17
18#define init_new_context(tsk,mm) 0
19#define destroy_context(mm) do { } while(0)
20
21/*
22 * This is called when "tsk" is about to enter lazy TLB mode.
23 *
24 * mm: describes the currently active mm context
25 * tsk: task which is entering lazy tlb
26 * cpu: cpu number which is entering lazy tlb
27 *
28 * tsk->mm will be NULL
29 */
30static inline void
31enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
32{
33}
34
35/*
36 * This is the actual mm switch as far as the scheduler
37 * is concerned. No registers are touched.
38 */
39static inline void
40switch_mm(struct mm_struct *prev, struct mm_struct *next,
41 struct task_struct *tsk)
42{
43 cpu_switch_mm(next->pgd, next);
44}
45
46#define deactivate_mm(tsk,mm) do { } while (0)
47
48static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next)
49{
50 cpu_switch_mm(next->pgd, next);
51}
52
53#endif
diff --git a/include/asm-arm26/module.h b/include/asm-arm26/module.h
deleted file mode 100644
index 1157f178daec..000000000000
--- a/include/asm-arm26/module.h
+++ /dev/null
@@ -1,7 +0,0 @@
1#ifndef _ASM_ARM_MODULE_H
2#define _ASM_ARM_MODULE_H
3/*
4 * This file contains the arm architecture specific module code.
5 */
6
7#endif /* _ASM_ARM_MODULE_H */
diff --git a/include/asm-arm26/msgbuf.h b/include/asm-arm26/msgbuf.h
deleted file mode 100644
index 33b35b946eaa..000000000000
--- a/include/asm-arm26/msgbuf.h
+++ /dev/null
@@ -1,31 +0,0 @@
1#ifndef _ASMARM_MSGBUF_H
2#define _ASMARM_MSGBUF_H
3
4/*
5 * The msqid64_ds structure for arm architecture.
6 * Note extra padding because this structure is passed back and forth
7 * between kernel and user space.
8 *
9 * Pad space is left for:
10 * - 64-bit time_t to solve y2038 problem
11 * - 2 miscellaneous 32-bit values
12 */
13
14struct msqid64_ds {
15 struct ipc64_perm msg_perm;
16 __kernel_time_t msg_stime; /* last msgsnd time */
17 unsigned long __unused1;
18 __kernel_time_t msg_rtime; /* last msgrcv time */
19 unsigned long __unused2;
20 __kernel_time_t msg_ctime; /* last change time */
21 unsigned long __unused3;
22 unsigned long msg_cbytes; /* current number of bytes on queue */
23 unsigned long msg_qnum; /* number of messages in queue */
24 unsigned long msg_qbytes; /* max number of bytes on queue */
25 __kernel_pid_t msg_lspid; /* pid of last msgsnd */
26 __kernel_pid_t msg_lrpid; /* last receive pid */
27 unsigned long __unused4;
28 unsigned long __unused5;
29};
30
31#endif /* _ASMARM_MSGBUF_H */
diff --git a/include/asm-arm26/namei.h b/include/asm-arm26/namei.h
deleted file mode 100644
index 3f5d340110eb..000000000000
--- a/include/asm-arm26/namei.h
+++ /dev/null
@@ -1,25 +0,0 @@
1/*
2 * linux/include/asm-arm26/namei.h
3 *
4 * Routines to handle famous /usr/gnemul
5 * Derived from the Sparc version of this file
6 *
7 * Included from linux/fs/namei.c
8 */
9
10#ifndef __ASMARM_NAMEI_H
11#define __ASMARM_NAMEI_H
12
13#define ARM_BSD_EMUL "usr/gnemul/bsd/"
14
15static inline char *__emul_prefix(void)
16{
17 switch (current->personality) {
18 case PER_BSD:
19 return ARM_BSD_EMUL;
20 default:
21 return NULL;
22 }
23}
24
25#endif /* __ASMARM_NAMEI_H */
diff --git a/include/asm-arm26/oldlatches.h b/include/asm-arm26/oldlatches.h
deleted file mode 100644
index bc87089b2152..000000000000
--- a/include/asm-arm26/oldlatches.h
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-arc/oldlatches.h
3 *
4 * Copyright (C) 1996 Russell King, Dave Gilbert
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * Modifications:
11 * 04-04-1998 PJB/RMK Merged arc and a5k versions
12 */
13#ifndef _ASM_ARCH_OLDLATCH_H
14#define _ASM_ARCH_OLDLATCH_H
15
16#define LATCHA_FDSEL0 (1<<0)
17#define LATCHA_FDSEL1 (1<<1)
18#define LATCHA_FDSEL2 (1<<2)
19#define LATCHA_FDSEL3 (1<<3)
20#define LATCHA_FDSELALL (0xf)
21#define LATCHA_SIDESEL (1<<4)
22#define LATCHA_MOTOR (1<<5)
23#define LATCHA_INUSE (1<<6)
24#define LATCHA_CHANGERST (1<<7)
25
26#define LATCHB_FDCDENSITY (1<<1)
27#define LATCHB_FDCRESET (1<<3)
28#define LATCHB_PRINTSTROBE (1<<4)
29
30/* newval=(oldval & mask)|newdata */
31void oldlatch_bupdate(unsigned char mask,unsigned char newdata);
32
33/* newval=(oldval & mask)|newdata */
34void oldlatch_aupdate(unsigned char mask,unsigned char newdata);
35
36#endif
37
diff --git a/include/asm-arm26/page.h b/include/asm-arm26/page.h
deleted file mode 100644
index fa19de28fda0..000000000000
--- a/include/asm-arm26/page.h
+++ /dev/null
@@ -1,102 +0,0 @@
1#ifndef _ASMARM_PAGE_H
2#define _ASMARM_PAGE_H
3
4
5#ifdef __KERNEL__
6#ifndef __ASSEMBLY__
7
8extern void __clear_user_page(void *p, unsigned long user);
9extern void __copy_user_page(void *to, const void *from, unsigned long user);
10extern void copy_page(void *to, const void *from);
11
12//FIXME these may be wrong on ARM26
13#define clear_user_page(addr,vaddr,pg) \
14 do { \
15 preempt_disable(); \
16 __clear_user_page(addr, vaddr); \
17 preempt_enable(); \
18 } while (0)
19
20#define copy_user_page(to,from,vaddr,pg) \
21 do { \
22 preempt_disable(); \
23 __copy_user_page(to, from, vaddr); \
24 preempt_enable(); \
25 } while (0)
26
27#define clear_page(page) memzero((void *)(page), PAGE_SIZE)
28#define copy_page(to, from) __copy_user_page(to, from, 0);
29
30#undef STRICT_MM_TYPECHECKS
31
32#ifdef STRICT_MM_TYPECHECKS
33/*
34 * These are used to make use of C type-checking..
35 */
36typedef struct { unsigned long pgd; } pgd_t;
37typedef struct { unsigned long pte; } pte_t;
38typedef struct { unsigned long pmd; } pmd_t;
39typedef struct { unsigned long pgprot; } pgprot_t;
40
41#define pgd_val(x) ((x).pgd)
42#define pte_val(x) ((x).pte)
43#define pmd_val(x) ((x).pmd)
44#define pgprot_val(x) ((x).pgprot)
45
46#define __pte(x) ((pte_t) { (x) } )
47#define __pmd(x) ((pmd_t) { (x) } )
48#define __pgprot(x) ((pgprot_t) { (x) } )
49
50#else
51/*
52 * .. while these make it easier on the compiler
53 */
54typedef unsigned long pgd_t;
55typedef unsigned long pte_t;
56typedef unsigned long pmd_t;
57typedef unsigned long pgprot_t;
58
59//FIXME - should these cast to unsigned long?
60#define pgd_val(x) (x)
61#define pte_val(x) (x)
62#define pmd_val(x) (x)
63#define pgprot_val(x) (x)
64
65#define __pte(x) (x)
66#define __pmd(x) (x)
67#define __pgprot(x) (x)
68
69#endif /* STRICT_MM_TYPECHECKS */
70#endif /* !__ASSEMBLY__ */
71#endif /* __KERNEL__ */
72
73/* PAGE_SHIFT determines the page size. This is configurable. */
74#if defined(CONFIG_PAGESIZE_16)
75#define PAGE_SHIFT 14 /* 16K */
76#else /* default */
77#define PAGE_SHIFT 15 /* 32K */
78#endif
79
80#define EXEC_PAGESIZE 32768
81
82#define PAGE_SIZE (1UL << PAGE_SHIFT)
83#define PAGE_MASK (~(PAGE_SIZE-1))
84
85/* to align the pointer to the (next) page boundary */
86#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK)
87
88#ifdef __KERNEL__
89#ifndef __ASSEMBLY__
90
91#include <asm/memory.h>
92
93#endif /* !__ASSEMBLY__ */
94
95#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
96 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
97
98#endif /* __KERNEL__ */
99
100#include <asm-generic/page.h>
101
102#endif
diff --git a/include/asm-arm26/param.h b/include/asm-arm26/param.h
deleted file mode 100644
index 6b1e52df542e..000000000000
--- a/include/asm-arm26/param.h
+++ /dev/null
@@ -1,33 +0,0 @@
1/*
2 * linux/include/asm-arm/param.h
3 *
4 * Copyright (C) 1995-1999 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#ifndef __ASM_PARAM_H
11#define __ASM_PARAM_H
12
13#ifndef __KERNEL_HZ
14#define __KERNEL_HZ 100
15#endif
16
17#ifdef __KERNEL__
18# define HZ __KERNEL_HZ /* Internal kernel timer frequency */
19# define USER_HZ 100 /* User interfaces are in "ticks" */
20# define CLOCKS_PER_SEC (USER_HZ) /* like times() */
21#else
22# define HZ 100
23#endif
24
25#ifndef NOGROUP
26#define NOGROUP (-1)
27#endif
28
29/* max length of hostname */
30#define MAXHOSTNAMELEN 64
31
32#endif
33
diff --git a/include/asm-arm26/parport.h b/include/asm-arm26/parport.h
deleted file mode 100644
index f2f90c76ddd1..000000000000
--- a/include/asm-arm26/parport.h
+++ /dev/null
@@ -1,18 +0,0 @@
1/*
2 * linux/include/asm-arm/parport.h: ARM-specific parport initialisation
3 *
4 * Copyright (C) 1999, 2000 Tim Waugh <tim@cyberelk.demon.co.uk>
5 *
6 * This file should only be included by drivers/parport/parport_pc.c.
7 */
8
9#ifndef __ASMARM_PARPORT_H
10#define __ASMARM_PARPORT_H
11
12static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma);
13static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma)
14{
15 return parport_pc_find_isa_ports (autoirq, autodma);
16}
17
18#endif /* !(_ASMARM_PARPORT_H) */
diff --git a/include/asm-arm26/pci.h b/include/asm-arm26/pci.h
deleted file mode 100644
index 6ac67ed7718c..000000000000
--- a/include/asm-arm26/pci.h
+++ /dev/null
@@ -1,6 +0,0 @@
1/* Should not be needed. IDE stupidity */
2/* JMA 18.05.03 - is kinda needed, if only to tell it we don't have a PCI bus */
3
4#define PCI_DMA_BUS_IS_PHYS 0
5#define pcibios_scan_all_fns(a, b) 0
6
diff --git a/include/asm-arm26/percpu.h b/include/asm-arm26/percpu.h
deleted file mode 100644
index b4e32d8ec072..000000000000
--- a/include/asm-arm26/percpu.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __ARM_PERCPU
2#define __ARM_PERCPU
3
4#include <asm-generic/percpu.h>
5
6#endif
diff --git a/include/asm-arm26/pgalloc.h b/include/asm-arm26/pgalloc.h
deleted file mode 100644
index 7725af3ddb4d..000000000000
--- a/include/asm-arm26/pgalloc.h
+++ /dev/null
@@ -1,70 +0,0 @@
1/*
2 * linux/include/asm-arm/pgalloc.h
3 *
4 * Copyright (C) 2000-2001 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#ifndef _ASMARM_PGALLOC_H
11#define _ASMARM_PGALLOC_H
12
13#include <asm/processor.h>
14#include <asm/cacheflush.h>
15#include <asm/tlbflush.h>
16#include <linux/slab.h>
17
18extern struct kmem_cache *pte_cache;
19
20static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long addr){
21 return kmem_cache_alloc(pte_cache, GFP_KERNEL);
22}
23
24static inline void pte_free_kernel(pte_t *pte){
25 if (pte)
26 kmem_cache_free(pte_cache, pte);
27}
28
29/*
30 * Populate the pmdp entry with a pointer to the pte. This pmd is part
31 * of the mm address space.
32 *
33 * If 'mm' is the init tasks mm, then we are doing a vmalloc, and we
34 * need to set stuff up correctly for it.
35 */
36static inline void
37pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmdp, pte_t *ptep)
38{
39//FIXME - is this doing the right thing?
40 set_pmd(pmdp, (unsigned long)ptep | 1/*FIXME _PMD_PRESENT*/);
41}
42
43/*
44 * FIXME - We use the old 2.5.5-rmk1 hack for this.
45 * This is not truly correct, but should be functional.
46 */
47#define pte_alloc_one(mm,addr) ((struct page *)pte_alloc_one_kernel(mm,addr))
48#define pte_free(pte) pte_free_kernel((pte_t *)pte)
49#define pmd_populate(mm,pmdp,ptep) pmd_populate_kernel(mm,pmdp,(pte_t *)ptep)
50
51/*
52 * Since we have only two-level page tables, these are trivial
53 *
54 * trick __pmd_alloc into optimising away. The actual value is irrelevant though as it
55 * is thrown away. It just cant be zero. -IM
56 */
57
58#define pmd_alloc_one(mm,addr) ({ BUG(); ((pmd_t *)2); })
59#define pmd_free(pmd) do { } while (0)
60#define pgd_populate(mm,pmd,pte) BUG()
61
62extern pgd_t *get_pgd_slow(struct mm_struct *mm);
63extern void free_pgd_slow(pgd_t *pgd);
64
65#define pgd_alloc(mm) get_pgd_slow(mm)
66#define pgd_free(pgd) free_pgd_slow(pgd)
67
68#define check_pgt_cache() do { } while (0)
69
70#endif
diff --git a/include/asm-arm26/pgtable.h b/include/asm-arm26/pgtable.h
deleted file mode 100644
index 55a1a697d12b..000000000000
--- a/include/asm-arm26/pgtable.h
+++ /dev/null
@@ -1,298 +0,0 @@
1/*
2 * linux/include/asm-arm26/pgtable.h
3 *
4 * Copyright (C) 2000-2002 Russell King
5 * Copyright (C) 2003 Ian Molton
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11#ifndef _ASMARM_PGTABLE_H
12#define _ASMARM_PGTABLE_H
13
14#include <asm-generic/4level-fixup.h>
15
16#include <asm/memory.h>
17
18/*
19 * The table below defines the page protection levels that we insert into our
20 * Linux page table version. These get translated into the best that the
21 * architecture can perform. Note that on most ARM hardware:
22 * 1) We cannot do execute protection
23 * 2) If we could do execute protection, then read is implied
24 * 3) write implies read permissions
25 */
26#define __P000 PAGE_NONE
27#define __P001 PAGE_READONLY
28#define __P010 PAGE_COPY
29#define __P011 PAGE_COPY
30#define __P100 PAGE_READONLY
31#define __P101 PAGE_READONLY
32#define __P110 PAGE_COPY
33#define __P111 PAGE_COPY
34
35#define __S000 PAGE_NONE
36#define __S001 PAGE_READONLY
37#define __S010 PAGE_SHARED
38#define __S011 PAGE_SHARED
39#define __S100 PAGE_READONLY
40#define __S101 PAGE_READONLY
41#define __S110 PAGE_SHARED
42#define __S111 PAGE_SHARED
43
44/*
45 * PMD_SHIFT determines the size of the area a second-level page table can map
46 * PGDIR_SHIFT determines what a third-level page table entry can map
47 */
48#define PGD_SHIFT 25
49#define PMD_SHIFT 20
50
51#define PGD_SIZE (1UL << PGD_SHIFT)
52#define PGD_MASK (~(PGD_SIZE-1))
53#define PMD_SIZE (1UL << PMD_SHIFT)
54#define PMD_MASK (~(PMD_SIZE-1))
55
56/* The kernel likes to use these names for the above (ick) */
57#define PGDIR_SIZE PGD_SIZE
58#define PGDIR_MASK PGD_MASK
59
60#define PTRS_PER_PGD 32
61#define PTRS_PER_PMD 1
62#define PTRS_PER_PTE 32
63
64/*
65 * This is the lowest virtual address we can permit any user space
66 * mapping to be mapped at. This is particularly important for
67 * non-high vector CPUs.
68 */
69#define FIRST_USER_ADDRESS PAGE_SIZE
70
71#define FIRST_USER_PGD_NR 1
72#define USER_PTRS_PER_PGD ((TASK_SIZE/PGD_SIZE) - FIRST_USER_PGD_NR)
73
74// FIXME - WTF?
75#define LIBRARY_TEXT_START 0x0c000000
76
77
78
79#ifndef __ASSEMBLY__
80extern void __pte_error(const char *file, int line, unsigned long val);
81extern void __pmd_error(const char *file, int line, unsigned long val);
82extern void __pgd_error(const char *file, int line, unsigned long val);
83
84#define pte_ERROR(pte) __pte_error(__FILE__, __LINE__, pte_val(pte))
85#define pmd_ERROR(pmd) __pmd_error(__FILE__, __LINE__, pmd_val(pmd))
86#define pgd_ERROR(pgd) __pgd_error(__FILE__, __LINE__, pgd_val(pgd))
87
88/*
89 * ZERO_PAGE is a global shared page that is always zero: used
90 * for zero-mapped memory areas etc..
91 */
92extern struct page *empty_zero_page;
93#define ZERO_PAGE(vaddr) (empty_zero_page)
94
95#define pte_pfn(pte) (pte_val(pte) >> PAGE_SHIFT)
96#define pte_page(pte) (pfn_to_page(pte_pfn(pte)))
97#define pfn_pte(pfn,prot) (__pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot)))
98#define pages_to_mb(x) ((x) >> (20 - PAGE_SHIFT))
99#define mk_pte(page,prot) pfn_pte(page_to_pfn(page),prot)
100
101/*
102 * Terminology: PGD = Page Directory, PMD = Page Middle Directory,
103 * PTE = Page Table Entry
104 *
105 * on arm26 we have no 2nd level page table. we simulate this by removing the
106 * PMD.
107 *
108 * pgd_none is 0 to prevernt pmd_alloc() calling __pmd_alloc(). This causes it
109 * to return pmd_offset(pgd,addr) which is a pointer to the pgd (IOW, a no-op).
110 *
111 * however, to work this way, whilst we are allocating 32 pgds, containing 32
112 * PTEs, the actual work is done on the PMDs, thus:
113 *
114 * instead of mm->pgd->pmd->pte
115 * we have mm->pgdpmd->pte
116 *
117 * IOW, think of PGD operations and PMD ones as being the same thing, just
118 * that PGD stuff deals with the mm_struct side of things, wheras PMD stuff
119 * deals with the pte side of things.
120 *
121 * additionally, we store some bits in the PGD and PTE pointers:
122 * PGDs:
123 * o The lowest (1) bit of the PGD is to determine if it is present or swap.
124 * o The 2nd bit of the PGD is unused and must be zero.
125 * o The top 6 bits of the PGD must be zero.
126 * PTEs:
127 * o The lower 5 bits of a pte are flags. bit 1 is the 'present' flag. The
128 * others determine the pages attributes.
129 *
130 * the pgd_val, pmd_val, and pte_val macros seem to be private to our code.
131 * They get the RAW value of the PGD/PMD/PTE entry, including our flags
132 * encoded into the pointers.
133 *
134 * The pgd_offset, pmd_offset, and pte_offset macros are used by the kernel,
135 * so they shouldnt have our flags attached.
136 *
137 * If you understood that, feel free to explain it to me...
138 *
139 */
140
141#define _PMD_PRESENT (0x01)
142
143/* These definitions allow us to optimise out stuff like pmd_alloc() */
144#define pgd_none(pgd) (0)
145#define pgd_bad(pgd) (0)
146#define pgd_present(pgd) (1)
147#define pgd_clear(pgdp) do { } while (0)
148
149/* Whilst these handle our actual 'page directory' (the agglomeration of pgd and pmd)
150 */
151#define pmd_none(pmd) (!pmd_val(pmd))
152#define pmd_bad(pmd) ((pmd_val(pmd) & 0xfc000002))
153#define pmd_present(pmd) (pmd_val(pmd) & _PMD_PRESENT)
154#define set_pmd(pmd_ptr, pmd) ((*(pmd_ptr)) = (pmd))
155#define pmd_clear(pmdp) set_pmd(pmdp, __pmd(0))
156
157/* and these handle our pte tables */
158#define pte_none(pte) (!pte_val(pte))
159#define pte_present(pte) (pte_val(pte) & _PAGE_PRESENT)
160#define set_pte(pte_ptr, pte) ((*(pte_ptr)) = (pte))
161#define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval)
162#define pte_clear(mm,addr,ptep) set_pte_at((mm),(addr),(ptep), __pte(0))
163
164/* macros to ease the getting of pointers to stuff... */
165#define pgd_offset(mm, addr) ((pgd_t *)(mm)->pgd + __pgd_index(addr))
166#define pmd_offset(pgd, addr) ((pmd_t *)(pgd))
167#define pte_offset(pmd, addr) ((pte_t *)pmd_page(*(pmd)) + __pte_index(addr))
168
169/* there is no __pmd_index as we dont use pmds */
170#define __pgd_index(addr) ((addr) >> PGD_SHIFT)
171#define __pte_index(addr) (((addr) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
172
173
174/* Keep the kernel happy */
175#define pgd_index(addr) __pgd_index(addr)
176#define pgd_offset_k(addr) (pgd_offset(&init_mm, addr))
177
178/*
179 * The vmalloc() routines leaves a hole of 4kB between each vmalloced
180 * area for the same reason. ;) FIXME: surely 1 page not 4k ?
181 */
182#define VMALLOC_START 0x01a00000
183#define VMALLOC_END 0x01c00000
184
185/* Is pmd_page supposed to return a pointer to a page in some arches? ours seems to
186 * return a pointer to memory (no special alignment)
187 */
188#define pmd_page(pmd) ((struct page *)(pmd_val((pmd)) & ~_PMD_PRESENT))
189#define pmd_page_vaddr(pmd) ((pte_t *)(pmd_val((pmd)) & ~_PMD_PRESENT))
190
191#define pte_offset_kernel(dir,addr) (pmd_page_vaddr(*(dir)) + __pte_index(addr))
192
193#define pte_offset_map(dir,addr) (pmd_page_vaddr(*(dir)) + __pte_index(addr))
194#define pte_offset_map_nested(dir,addr) (pmd_page_vaddr(*(dir)) + __pte_index(addr))
195#define pte_unmap(pte) do { } while (0)
196#define pte_unmap_nested(pte) do { } while (0)
197
198
199#define _PAGE_PRESENT 0x01
200#define _PAGE_READONLY 0x02
201#define _PAGE_NOT_USER 0x04
202#define _PAGE_OLD 0x08
203#define _PAGE_CLEAN 0x10
204
205// an old page has never been read.
206// a clean page has never been written.
207
208/* -- present -- -- !dirty -- --- !write --- ---- !user --- */
209#define PAGE_NONE __pgprot(_PAGE_PRESENT | _PAGE_CLEAN | _PAGE_READONLY | _PAGE_NOT_USER)
210#define PAGE_SHARED __pgprot(_PAGE_PRESENT | _PAGE_CLEAN )
211#define PAGE_COPY __pgprot(_PAGE_PRESENT | _PAGE_CLEAN | _PAGE_READONLY )
212#define PAGE_READONLY __pgprot(_PAGE_PRESENT | _PAGE_CLEAN | _PAGE_READONLY )
213#define PAGE_KERNEL __pgprot(_PAGE_PRESENT | _PAGE_NOT_USER)
214
215#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_OLD | _PAGE_CLEAN)
216
217/*
218 * The following only work if pte_present() is true.
219 * Undefined behaviour if not..
220 */
221#define pte_write(pte) (!(pte_val(pte) & _PAGE_READONLY))
222#define pte_dirty(pte) (!(pte_val(pte) & _PAGE_CLEAN))
223#define pte_young(pte) (!(pte_val(pte) & _PAGE_OLD))
224//ONLY when !pte_present() I think. nicked from arm32 (FIXME!)
225#define pte_file(pte) (!(pte_val(pte) & _PAGE_OLD))
226
227#define PTE_BIT_FUNC(fn,op) \
228static inline pte_t pte_##fn(pte_t pte) { pte_val(pte) op; return pte; }
229
230PTE_BIT_FUNC(wrprotect, |= _PAGE_READONLY);
231PTE_BIT_FUNC(mkwrite, &= ~_PAGE_READONLY);
232PTE_BIT_FUNC(mkclean, |= _PAGE_CLEAN);
233PTE_BIT_FUNC(mkdirty, &= ~_PAGE_CLEAN);
234PTE_BIT_FUNC(mkold, |= _PAGE_OLD);
235PTE_BIT_FUNC(mkyoung, &= ~_PAGE_OLD);
236
237/*
238 * We don't store cache state bits in the page table here. FIXME - or do we?
239 */
240#define pgprot_noncached(prot) (prot)
241#define pgprot_writecombine(prot) (prot) //FIXME - is a no-op?
242
243extern void pgtable_cache_init(void);
244
245//FIXME - nicked from arm32 and brutally hacked. probably wrong.
246#define pte_to_pgoff(x) (pte_val(x) >> 2)
247#define pgoff_to_pte(x) __pte(((x) << 2) & ~_PAGE_OLD)
248
249//FIXME - next line borrowed from arm32. is it right?
250#define PTE_FILE_MAX_BITS 30
251
252
253static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
254{
255 pte_val(pte) = (pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot);
256 return pte;
257}
258
259extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
260
261/* Encode and decode a swap entry.
262 *
263 * We support up to 32GB of swap on 4k machines
264 */
265#define __swp_type(x) (((x).val >> 2) & 0x7f)
266#define __swp_offset(x) ((x).val >> 9)
267#define __swp_entry(type,offset) ((swp_entry_t) { ((type) << 2) | ((offset) << 9) })
268#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
269#define __swp_entry_to_pte(swp) ((pte_t) { (swp).val })
270
271/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
272/* FIXME: this is not correct */
273#define kern_addr_valid(addr) (1)
274
275/*
276 * Conversion functions: convert a page and protection to a page entry,
277 * and a page entry and page directory to the page they refer to.
278 */
279static inline pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot)
280{
281 pte_t pte;
282 pte_val(pte) = physpage | pgprot_val(pgprot);
283 return pte;
284}
285
286
287#include <asm-generic/pgtable.h>
288
289/*
290 * remap a physical page `pfn' of size `size' with page protection `prot'
291 * into virtual address `from'
292 */
293#define io_remap_pfn_range(vma,from,pfn,size,prot) \
294 remap_pfn_range(vma, from, pfn, size, prot)
295
296#endif /* !__ASSEMBLY__ */
297
298#endif /* _ASMARM_PGTABLE_H */
diff --git a/include/asm-arm26/poll.h b/include/asm-arm26/poll.h
deleted file mode 100644
index 1170e7065f6a..000000000000
--- a/include/asm-arm26/poll.h
+++ /dev/null
@@ -1,8 +0,0 @@
1#ifndef __ASMARM_POLL_H
2#define __ASMARM_POLL_H
3
4#include <asm-generic/poll.h>
5
6#undef POLLREMOVE
7
8#endif
diff --git a/include/asm-arm26/posix_types.h b/include/asm-arm26/posix_types.h
deleted file mode 100644
index f8d1eb4f4cb1..000000000000
--- a/include/asm-arm26/posix_types.h
+++ /dev/null
@@ -1,81 +0,0 @@
1/*
2 * linux/include/asm-arm/posix_types.h
3 *
4 * Copyright (C) 1996-1998 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * Changelog:
11 * 27-06-1996 RMK Created
12 */
13#ifndef __ARCH_ARM_POSIX_TYPES_H
14#define __ARCH_ARM_POSIX_TYPES_H
15
16/*
17 * This file is generally used by user-level software, so you need to
18 * be a little careful about namespace pollution etc. Also, we cannot
19 * assume GCC is being used.
20 */
21
22typedef unsigned long __kernel_ino_t;
23typedef unsigned short __kernel_mode_t;
24typedef unsigned short __kernel_nlink_t;
25typedef long __kernel_off_t;
26typedef int __kernel_pid_t;
27typedef unsigned short __kernel_ipc_pid_t;
28typedef unsigned short __kernel_uid_t;
29typedef unsigned short __kernel_gid_t;
30typedef unsigned int __kernel_size_t;
31typedef int __kernel_ssize_t;
32typedef int __kernel_ptrdiff_t;
33typedef long __kernel_time_t;
34typedef long __kernel_suseconds_t;
35typedef long __kernel_clock_t;
36typedef int __kernel_timer_t;
37typedef int __kernel_clockid_t;
38typedef int __kernel_daddr_t;
39typedef char * __kernel_caddr_t;
40typedef unsigned short __kernel_uid16_t;
41typedef unsigned short __kernel_gid16_t;
42typedef unsigned int __kernel_uid32_t;
43typedef unsigned int __kernel_gid32_t;
44
45typedef unsigned short __kernel_old_uid_t;
46typedef unsigned short __kernel_old_gid_t;
47typedef unsigned short __kernel_old_dev_t;
48
49#ifdef __GNUC__
50typedef long long __kernel_loff_t;
51#endif
52
53typedef struct {
54#if defined(__KERNEL__) || defined(__USE_ALL)
55 int val[2];
56#else /* !defined(__KERNEL__) && !defined(__USE_ALL) */
57 int __val[2];
58#endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */
59} __kernel_fsid_t;
60
61#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
62
63#undef __FD_SET
64#define __FD_SET(fd, fdsetp) \
65 (((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] |= (1<<((fd) & 31)))
66
67#undef __FD_CLR
68#define __FD_CLR(fd, fdsetp) \
69 (((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] &= ~(1<<((fd) & 31)))
70
71#undef __FD_ISSET
72#define __FD_ISSET(fd, fdsetp) \
73 ((((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] & (1<<((fd) & 31))) != 0)
74
75#undef __FD_ZERO
76#define __FD_ZERO(fdsetp) \
77 (memset ((fdsetp), 0, sizeof (*(fd_set *)(fdsetp))))
78
79#endif
80
81#endif
diff --git a/include/asm-arm26/proc-fns.h b/include/asm-arm26/proc-fns.h
deleted file mode 100644
index a83100454055..000000000000
--- a/include/asm-arm26/proc-fns.h
+++ /dev/null
@@ -1,49 +0,0 @@
1/*
2 * linux/include/asm-arm26/proc-fns.h
3 *
4 * Copyright (C) 2000 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#ifndef __ASSEMBLY__
11
12#include <asm/page.h>
13
14/*
15 * Don't change this structure - ASM code
16 * relies on it.
17 */
18extern struct processor {
19 /* check for any bugs */
20 void (*_check_bugs)(void);
21 /* Set up any processor specifics */
22 void (*_proc_init)(void);
23 /* Disable any processor specifics */
24 void (*_proc_fin)(void);
25 /* set the MEMC hardware mappings */
26 void (*_set_pgd)(pgd_t *pgd);
27 /* XCHG */
28 unsigned long (*_xchg_1)(unsigned long x, volatile void *ptr);
29 unsigned long (*_xchg_4)(unsigned long x, volatile void *ptr);
30} processor;
31
32extern const struct processor arm2_processor_functions;
33extern const struct processor arm250_processor_functions;
34extern const struct processor arm3_processor_functions;
35
36#define cpu_check_bugs() processor._check_bugs()
37#define cpu_proc_init() processor._proc_init()
38#define cpu_proc_fin() processor._proc_fin()
39#define cpu_do_idle() do { } while (0)
40#define cpu_switch_mm(pgd,mm) processor._set_pgd(pgd)
41#define cpu_xchg_1(x,ptr) processor._xchg_1(x,ptr)
42#define cpu_xchg_4(x,ptr) processor._xchg_4(x,ptr)
43
44
45//FIXME - these shouldnt be in proc-fn.h
46extern void cpu_memc_update_all(pgd_t *pgd);
47extern void cpu_memc_update_entry(pgd_t *pgd, unsigned long phys_pte, unsigned long log_addr);
48
49#endif
diff --git a/include/asm-arm26/processor.h b/include/asm-arm26/processor.h
deleted file mode 100644
index 1d2d5f7b467b..000000000000
--- a/include/asm-arm26/processor.h
+++ /dev/null
@@ -1,113 +0,0 @@
1/*
2 * linux/include/asm-arm26/processor.h
3 *
4 * Copyright (C) 1995 Russell King
5 * Copyright (C) 2003 Ian Molton
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#ifndef __ASM_ARM_PROCESSOR_H
13#define __ASM_ARM_PROCESSOR_H
14
15/*
16 * Default implementation of macro that returns current
17 * instruction pointer ("program counter").
18 */
19#define current_text_addr() ({ __label__ _l; _l: &&_l;})
20
21#ifdef __KERNEL__
22
23#include <asm/atomic.h>
24#include <asm/ptrace.h>
25#include <linux/string.h>
26
27#define KERNEL_STACK_SIZE 4096
28
29typedef struct {
30 void (*put_byte)(void); /* Special calling convention */
31 void (*get_byte)(void); /* Special calling convention */
32 void (*put_half)(void); /* Special calling convention */
33 void (*get_half)(void); /* Special calling convention */
34 void (*put_word)(void); /* Special calling convention */
35 void (*get_word)(void); /* Special calling convention */
36 void (*put_dword)(void); /* Special calling convention */
37 unsigned long (*copy_from_user)(void *to, const void *from, unsigned long sz);
38 unsigned long (*copy_to_user)(void *to, const void *from, unsigned long sz);
39 unsigned long (*clear_user)(void *addr, unsigned long sz);
40 unsigned long (*strncpy_from_user)(char *to, const char *from, unsigned long sz);
41 unsigned long (*strnlen_user)(const char *s, long n);
42} uaccess_t;
43
44extern uaccess_t uaccess_user, uaccess_kernel;
45
46#define EXTRA_THREAD_STRUCT \
47 uaccess_t *uaccess; /* User access functions*/
48
49#define EXTRA_THREAD_STRUCT_INIT \
50 .uaccess = &uaccess_kernel,
51
52// FIXME?!!
53
54#define start_thread(regs,pc,sp) \
55({ \
56 unsigned long *stack = (unsigned long *)sp; \
57 set_fs(USER_DS); \
58 memzero(regs->uregs, sizeof (regs->uregs)); \
59 regs->ARM_pc = pc | ~0xfc000003; /* pc */ \
60 regs->ARM_sp = sp; /* sp */ \
61 regs->ARM_r2 = stack[2]; /* r2 (envp) */ \
62 regs->ARM_r1 = stack[1]; /* r1 (argv) */ \
63 regs->ARM_r0 = stack[0]; /* r0 (argc) */ \
64})
65
66#define KSTK_EIP(tsk) (((unsigned long *)(4096+(unsigned long)(tsk)))[1020])
67#define KSTK_ESP(tsk) (((unsigned long *)(4096+(unsigned long)(tsk)))[1018])
68
69struct debug_entry {
70 u32 address;
71 u32 insn;
72};
73
74struct debug_info {
75 int nsaved;
76 struct debug_entry bp[2];
77};
78
79struct thread_struct {
80 /* fault info */
81 unsigned long address;
82 unsigned long trap_no;
83 unsigned long error_code;
84 /* debugging */
85 struct debug_info debug;
86 EXTRA_THREAD_STRUCT
87};
88
89#define INIT_THREAD { \
90EXTRA_THREAD_STRUCT_INIT \
91}
92
93/* Forward declaration, a strange C thing */
94struct task_struct;
95
96/* Free all resources held by a thread. */
97extern void release_thread(struct task_struct *);
98
99unsigned long get_wchan(struct task_struct *p);
100
101#define cpu_relax() barrier()
102
103/* Prepare to copy thread state - unlazy all lazy status */
104#define prepare_to_copy(tsk) do { } while (0)
105
106/*
107 * Create a new kernel thread
108 */
109extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
110
111#endif
112
113#endif /* __ASM_ARM_PROCESSOR_H */
diff --git a/include/asm-arm26/procinfo.h b/include/asm-arm26/procinfo.h
deleted file mode 100644
index b28624db69ff..000000000000
--- a/include/asm-arm26/procinfo.h
+++ /dev/null
@@ -1,56 +0,0 @@
1/*
2 * linux/include/asm-arm/procinfo.h
3 *
4 * Copyright (C) 1996-1999 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#ifndef __ASM_PROCINFO_H
11#define __ASM_PROCINFO_H
12
13#ifndef __ASSEMBLY__
14
15//struct processor;
16//struct cpu_user_fns;
17
18struct proc_info_item {
19 const char *manufacturer;
20 const char *cpu_name;
21};
22
23/*
24 * Note! struct processor is always defined if we're
25 * using MULTI_CPU, otherwise this entry is unused,
26 * but still exists.
27 *
28 * NOTE! The following structure is defined by assembly
29 * language, NOT C code. For more information, check:
30 * arch/arm/mm/proc-*.S and arch/arm/kernel/head-armv.S
31 */
32struct proc_info_list {
33 unsigned int cpu_val;
34 unsigned int cpu_mask;
35 const char *arch_name;
36 const char *elf_name;
37 unsigned int elf_hwcap;
38 struct proc_info_item *info;
39 struct processor *proc;
40};
41
42#endif /* __ASSEMBLY__ */
43
44#define PROC_INFO_SZ 48
45
46#define HWCAP_SWP 1
47#define HWCAP_HALF 2
48#define HWCAP_THUMB 4
49#define HWCAP_26BIT 8 /* Play it safe */
50#define HWCAP_FAST_MULT 16
51#define HWCAP_FPA 32
52#define HWCAP_VFP 64
53#define HWCAP_EDSP 128
54#define HWCAP_JAVA 256
55
56#endif
diff --git a/include/asm-arm26/ptrace.h b/include/asm-arm26/ptrace.h
deleted file mode 100644
index 6a46b5ae1156..000000000000
--- a/include/asm-arm26/ptrace.h
+++ /dev/null
@@ -1,104 +0,0 @@
1#ifndef __ASM_ARM_PTRACE_H
2#define __ASM_ARM_PTRACE_H
3
4#define PTRACE_GETREGS 12
5#define PTRACE_SETREGS 13
6#define PTRACE_GETFPREGS 14
7#define PTRACE_SETFPREGS 15
8#define PTRACE_OLDSETOPTIONS 21
9
10/* options set using PTRACE_SETOPTIONS */
11#define PTRACE_O_TRACESYSGOOD 0x00000001
12
13#define MODE_USR26 0x00000000
14#define MODE_FIQ26 0x00000001
15#define MODE_IRQ26 0x00000002
16#define MODE_SVC26 0x00000003
17#define MODE_MASK 0x00000003
18
19#define PSR_F_BIT 0x04000000
20#define PSR_I_BIT 0x08000000
21#define PSR_V_BIT 0x10000000
22#define PSR_C_BIT 0x20000000
23#define PSR_Z_BIT 0x40000000
24#define PSR_N_BIT 0x80000000
25
26#define PCMASK 0xfc000003
27
28
29#ifndef __ASSEMBLY__
30
31#define pc_pointer(v) ((v) & ~PCMASK) /* convert v to pc type address */
32#define instruction_pointer(regs) (pc_pointer((regs)->ARM_pc)) /* get pc */
33#define profile_pc(regs) instruction_pointer(regs)
34
35/* this struct defines the way the registers are stored on the
36 stack during a system call. */
37
38struct pt_regs {
39 long uregs[17];
40};
41
42#define ARM_pc uregs[15]
43#define ARM_lr uregs[14]
44#define ARM_sp uregs[13]
45#define ARM_ip uregs[12]
46#define ARM_fp uregs[11]
47#define ARM_r10 uregs[10]
48#define ARM_r9 uregs[9]
49#define ARM_r8 uregs[8]
50#define ARM_r7 uregs[7]
51#define ARM_r6 uregs[6]
52#define ARM_r5 uregs[5]
53#define ARM_r4 uregs[4]
54#define ARM_r3 uregs[3]
55#define ARM_r2 uregs[2]
56#define ARM_r1 uregs[1]
57#define ARM_r0 uregs[0]
58#define ARM_ORIG_r0 uregs[16]
59
60#ifdef __KERNEL__
61
62#define processor_mode(regs) \
63 ((regs)->ARM_pc & MODE_MASK)
64
65#define user_mode(regs) \
66 (processor_mode(regs) == MODE_USR26)
67
68#define interrupts_enabled(regs) \
69 (!((regs)->ARM_pc & PSR_I_BIT))
70
71#define fast_interrupts_enabled(regs) \
72 (!((regs)->ARM_pc & PSR_F_BIT))
73
74#define condition_codes(regs) \
75 ((regs)->ARM_pc & (PSR_V_BIT|PSR_C_BIT|PSR_Z_BIT|PSR_N_BIT))
76
77/* Are the current registers suitable for user mode?
78 * (used to maintain security in signal handlers)
79 */
80static inline int valid_user_regs(struct pt_regs *regs)
81{
82 if (user_mode(regs) &&
83 (regs->ARM_pc & (PSR_F_BIT | PSR_I_BIT)) == 0)
84 return 1;
85
86 /*
87 * force it to be something sensible
88 */
89 regs->ARM_pc &= ~(MODE_MASK | PSR_F_BIT | PSR_I_BIT);
90
91 return 0;
92}
93
94extern void show_regs(struct pt_regs *);
95
96#define predicate(x) (x & 0xf0000000)
97#define PREDICATE_ALWAYS 0xe0000000
98
99#endif /* __KERNEL__ */
100
101#endif /* __ASSEMBLY__ */
102
103#endif
104
diff --git a/include/asm-arm26/resource.h b/include/asm-arm26/resource.h
deleted file mode 100644
index 734b581b5b6a..000000000000
--- a/include/asm-arm26/resource.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _ARM_RESOURCE_H
2#define _ARM_RESOURCE_H
3
4#include <asm-generic/resource.h>
5
6#endif
diff --git a/include/asm-arm26/scatterlist.h b/include/asm-arm26/scatterlist.h
deleted file mode 100644
index d9c056c7784e..000000000000
--- a/include/asm-arm26/scatterlist.h
+++ /dev/null
@@ -1,26 +0,0 @@
1#ifndef _ASMARM_SCATTERLIST_H
2#define _ASMARM_SCATTERLIST_H
3
4#include <asm/types.h>
5
6struct scatterlist {
7 struct page *page; /* buffer page */
8 unsigned int offset; /* buffer offset */
9 dma_addr_t dma_address; /* dma address */
10 unsigned int length; /* length */
11 char *__address; /* for set_dma_addr */
12};
13
14/*
15 * These macros should be used after a pci_map_sg call has been done
16 * to get bus addresses of each of the SG entries and their lengths.
17 * You should only work with the number of sg entries pci_map_sg
18 * returns, or alternatively stop on the first sg_dma_len(sg) which
19 * is 0.
20 */
21#define sg_dma_address(sg) ((sg)->dma_address)
22#define sg_dma_len(sg) ((sg)->length)
23
24#define ISA_DMA_THRESHOLD (0xffffffff)
25
26#endif /* _ASMARM_SCATTERLIST_H */
diff --git a/include/asm-arm26/sections.h b/include/asm-arm26/sections.h
deleted file mode 100644
index 10b6370efad0..000000000000
--- a/include/asm-arm26/sections.h
+++ /dev/null
@@ -1,2 +0,0 @@
1//FIXME - nicked from arm32 - check its correct.
2#include <asm-generic/sections.h>
diff --git a/include/asm-arm26/segment.h b/include/asm-arm26/segment.h
deleted file mode 100644
index 9e24c21f6304..000000000000
--- a/include/asm-arm26/segment.h
+++ /dev/null
@@ -1,11 +0,0 @@
1#ifndef __ASM_ARM_SEGMENT_H
2#define __ASM_ARM_SEGMENT_H
3
4#define __KERNEL_CS 0x0
5#define __KERNEL_DS 0x0
6
7#define __USER_CS 0x1
8#define __USER_DS 0x1
9
10#endif /* __ASM_ARM_SEGMENT_H */
11
diff --git a/include/asm-arm26/semaphore-helper.h b/include/asm-arm26/semaphore-helper.h
deleted file mode 100644
index 1d7f1987edb9..000000000000
--- a/include/asm-arm26/semaphore-helper.h
+++ /dev/null
@@ -1,84 +0,0 @@
1#ifndef ASMARM_SEMAPHORE_HELPER_H
2#define ASMARM_SEMAPHORE_HELPER_H
3
4/*
5 * These two _must_ execute atomically wrt each other.
6 */
7static inline void wake_one_more(struct semaphore * sem)
8{
9 unsigned long flags;
10
11 spin_lock_irqsave(&semaphore_wake_lock, flags);
12 if (atomic_read(&sem->count) <= 0)
13 sem->waking++;
14 spin_unlock_irqrestore(&semaphore_wake_lock, flags);
15}
16
17static inline int waking_non_zero(struct semaphore *sem)
18{
19 unsigned long flags;
20 int ret = 0;
21
22 spin_lock_irqsave(&semaphore_wake_lock, flags);
23 if (sem->waking > 0) {
24 sem->waking--;
25 ret = 1;
26 }
27 spin_unlock_irqrestore(&semaphore_wake_lock, flags);
28 return ret;
29}
30
31/*
32 * waking non zero interruptible
33 * 1 got the lock
34 * 0 go to sleep
35 * -EINTR interrupted
36 *
37 * We must undo the sem->count down_interruptible() increment while we are
38 * protected by the spinlock in order to make this atomic_inc() with the
39 * atomic_read() in wake_one_more(), otherwise we can race. -arca
40 */
41static inline int waking_non_zero_interruptible(struct semaphore *sem,
42 struct task_struct *tsk)
43{
44 unsigned long flags;
45 int ret = 0;
46
47 spin_lock_irqsave(&semaphore_wake_lock, flags);
48 if (sem->waking > 0) {
49 sem->waking--;
50 ret = 1;
51 } else if (signal_pending(tsk)) {
52 atomic_inc(&sem->count);
53 ret = -EINTR;
54 }
55 spin_unlock_irqrestore(&semaphore_wake_lock, flags);
56 return ret;
57}
58
59/*
60 * waking_non_zero_try_lock:
61 * 1 failed to lock
62 * 0 got the lock
63 *
64 * We must undo the sem->count down_interruptible() increment while we are
65 * protected by the spinlock in order to make this atomic_inc() with the
66 * atomic_read() in wake_one_more(), otherwise we can race. -arca
67 */
68static inline int waking_non_zero_trylock(struct semaphore *sem)
69{
70 unsigned long flags;
71 int ret = 1;
72
73 spin_lock_irqsave(&semaphore_wake_lock, flags);
74 if (sem->waking <= 0)
75 atomic_inc(&sem->count);
76 else {
77 sem->waking--;
78 ret = 0;
79 }
80 spin_unlock_irqrestore(&semaphore_wake_lock, flags);
81 return ret;
82}
83
84#endif
diff --git a/include/asm-arm26/semaphore.h b/include/asm-arm26/semaphore.h
deleted file mode 100644
index 1fda54375ed8..000000000000
--- a/include/asm-arm26/semaphore.h
+++ /dev/null
@@ -1,100 +0,0 @@
1/*
2 * linux/include/asm-arm26/semaphore.h
3 */
4#ifndef __ASM_ARM_SEMAPHORE_H
5#define __ASM_ARM_SEMAPHORE_H
6
7#include <linux/linkage.h>
8#include <linux/spinlock.h>
9#include <linux/wait.h>
10#include <linux/rwsem.h>
11
12#include <asm/atomic.h>
13#include <asm/locks.h>
14
15struct semaphore {
16 atomic_t count;
17 int sleepers;
18 wait_queue_head_t wait;
19};
20
21#define __SEMAPHORE_INIT(name, n) \
22{ \
23 .count = ATOMIC_INIT(n), \
24 .sleepers = 0, \
25 .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait), \
26}
27
28#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
29 struct semaphore name = __SEMAPHORE_INIT(name,count)
30
31#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1)
32#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0)
33
34static inline void sema_init(struct semaphore *sem, int val)
35{
36 atomic_set(&sem->count, val);
37 sem->sleepers = 0;
38 init_waitqueue_head(&sem->wait);
39}
40
41static inline void init_MUTEX(struct semaphore *sem)
42{
43 sema_init(sem, 1);
44}
45
46static inline void init_MUTEX_LOCKED(struct semaphore *sem)
47{
48 sema_init(sem, 0);
49}
50
51/*
52 * special register calling convention
53 */
54asmlinkage void __down_failed(void);
55asmlinkage int __down_interruptible_failed(void);
56asmlinkage int __down_trylock_failed(void);
57asmlinkage void __up_wakeup(void);
58
59extern void __down(struct semaphore * sem);
60extern int __down_interruptible(struct semaphore * sem);
61extern int __down_trylock(struct semaphore * sem);
62extern void __up(struct semaphore * sem);
63
64/*
65 * This is ugly, but we want the default case to fall through.
66 * "__down" is the actual routine that waits...
67 */
68static inline void down(struct semaphore * sem)
69{
70 might_sleep();
71 __down_op(sem, __down_failed);
72}
73
74/*
75 * This is ugly, but we want the default case to fall through.
76 * "__down_interruptible" is the actual routine that waits...
77 */
78static inline int down_interruptible (struct semaphore * sem)
79{
80 might_sleep();
81 return __down_op_ret(sem, __down_interruptible_failed);
82}
83
84static inline int down_trylock(struct semaphore *sem)
85{
86 return __down_op_ret(sem, __down_trylock_failed);
87}
88
89/*
90 * Note! This is subtle. We jump to wake people up only if
91 * the semaphore was negative (== somebody was waiting on it).
92 * The default case (no contention) will result in NO
93 * jumps for both down() and up().
94 */
95static inline void up(struct semaphore * sem)
96{
97 __up_op(sem, __up_wakeup);
98}
99
100#endif
diff --git a/include/asm-arm26/sembuf.h b/include/asm-arm26/sembuf.h
deleted file mode 100644
index 1c0283954289..000000000000
--- a/include/asm-arm26/sembuf.h
+++ /dev/null
@@ -1,25 +0,0 @@
1#ifndef _ASMARM_SEMBUF_H
2#define _ASMARM_SEMBUF_H
3
4/*
5 * The semid64_ds structure for arm architecture.
6 * Note extra padding because this structure is passed back and forth
7 * between kernel and user space.
8 *
9 * Pad space is left for:
10 * - 64-bit time_t to solve y2038 problem
11 * - 2 miscellaneous 32-bit values
12 */
13
14struct semid64_ds {
15 struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
16 __kernel_time_t sem_otime; /* last semop time */
17 unsigned long __unused1;
18 __kernel_time_t sem_ctime; /* last change time */
19 unsigned long __unused2;
20 unsigned long sem_nsems; /* no. of semaphores in array */
21 unsigned long __unused3;
22 unsigned long __unused4;
23};
24
25#endif /* _ASMARM_SEMBUF_H */
diff --git a/include/asm-arm26/serial.h b/include/asm-arm26/serial.h
deleted file mode 100644
index dd86a716cb0b..000000000000
--- a/include/asm-arm26/serial.h
+++ /dev/null
@@ -1,44 +0,0 @@
1/*
2 * linux/include/asm-arm/serial.h
3 *
4 * Copyright (C) 1996 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * Changelog:
11 * 15-10-1996 RMK Created
12 */
13
14#ifndef __ASM_SERIAL_H
15#define __ASM_SERIAL_H
16
17
18/*
19 * This assumes you have a 1.8432 MHz clock for your UART.
20 *
21 * It'd be nice if someone built a serial card with a 24.576 MHz
22 * clock, since the 16550A is capable of handling a top speed of 1.5
23 * megabits/second; but this requires the faster clock.
24 */
25#define BASE_BAUD (1843200 / 16)
26
27#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST)
28
29#if defined(CONFIG_ARCH_A5K)
30 /* UART CLK PORT IRQ FLAGS */
31
32#define SERIAL_PORT_DFNS \
33 { 0, BASE_BAUD, 0x3F8, 10, STD_COM_FLAGS }, /* ttyS0 */ \
34 { 0, BASE_BAUD, 0x2F8, 10, STD_COM_FLAGS }, /* ttyS1 */
35
36#else
37
38#define SERIAL_PORT_DFNS \
39 { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS0 */ \
40 { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS1 */
41
42#endif
43
44#endif
diff --git a/include/asm-arm26/setup.h b/include/asm-arm26/setup.h
deleted file mode 100644
index e82562306475..000000000000
--- a/include/asm-arm26/setup.h
+++ /dev/null
@@ -1,209 +0,0 @@
1/*
2 * linux/include/asm/setup.h
3 *
4 * Copyright (C) 1997-1999 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * Structure passed to kernel to tell it about the
11 * hardware it's running on. See Documentation/arm/Setup
12 * for more info.
13 */
14#ifndef __ASMARM_SETUP_H
15#define __ASMARM_SETUP_H
16
17#define COMMAND_LINE_SIZE 1024
18
19#ifdef __KERNEL__
20
21/* The list ends with an ATAG_NONE node. */
22#define ATAG_NONE 0x00000000
23
24struct tag_header {
25 u32 size;
26 u32 tag;
27};
28
29/* The list must start with an ATAG_CORE node */
30#define ATAG_CORE 0x54410001
31
32struct tag_core {
33 u32 flags; /* bit 0 = read-only */
34 u32 pagesize;
35 u32 rootdev;
36};
37
38/* it is allowed to have multiple ATAG_MEM nodes */
39#define ATAG_MEM 0x54410002
40
41struct tag_mem32 {
42 u32 size;
43 u32 start; /* physical start address */
44};
45
46/* VGA text type displays */
47#define ATAG_VIDEOTEXT 0x54410003
48
49struct tag_videotext {
50 u8 x;
51 u8 y;
52 u16 video_page;
53 u8 video_mode;
54 u8 video_cols;
55 u16 video_ega_bx;
56 u8 video_lines;
57 u8 video_isvga;
58 u16 video_points;
59};
60
61/* describes how the ramdisk will be used in kernel */
62#define ATAG_RAMDISK 0x54410004
63
64struct tag_ramdisk {
65 u32 flags; /* bit 0 = load, bit 1 = prompt */
66 u32 size; /* decompressed ramdisk size in _kilo_ bytes */
67 u32 start; /* starting block of floppy-based RAM disk image */
68};
69
70/* describes where the compressed ramdisk image lives */
71/*
72 * this one accidentally used virtual addresses - as such,
73 * it's deprecated.
74 */
75#define ATAG_INITRD 0x54410005
76
77/* describes where the compressed ramdisk image lives */
78#define ATAG_INITRD2 0x54420005
79
80struct tag_initrd {
81 u32 start; /* physical start address */
82 u32 size; /* size of compressed ramdisk image in bytes */
83};
84
85/* board serial number. "64 bits should be enough for everybody" */
86#define ATAG_SERIAL 0x54410006
87
88struct tag_serialnr {
89 u32 low;
90 u32 high;
91};
92
93/* board revision */
94#define ATAG_REVISION 0x54410007
95
96struct tag_revision {
97 u32 rev;
98};
99
100/* initial values for vesafb-type framebuffers. see struct screen_info
101 * in include/linux/tty.h
102 */
103#define ATAG_VIDEOLFB 0x54410008
104
105struct tag_videolfb {
106 u16 lfb_width;
107 u16 lfb_height;
108 u16 lfb_depth;
109 u16 lfb_linelength;
110 u32 lfb_base;
111 u32 lfb_size;
112 u8 red_size;
113 u8 red_pos;
114 u8 green_size;
115 u8 green_pos;
116 u8 blue_size;
117 u8 blue_pos;
118 u8 rsvd_size;
119 u8 rsvd_pos;
120};
121
122/* command line: \0 terminated string */
123#define ATAG_CMDLINE 0x54410009
124
125struct tag_cmdline {
126 char cmdline[1]; /* this is the minimum size */
127};
128
129/* acorn RiscPC specific information */
130#define ATAG_ACORN 0x41000101
131
132struct tag_acorn {
133 u32 memc_control_reg;
134 u32 vram_pages;
135 u8 sounddefault;
136 u8 adfsdrives;
137};
138
139/* footbridge memory clock, see arch/arm/mach-footbridge/arch.c */
140#define ATAG_MEMCLK 0x41000402
141
142struct tag_memclk {
143 u32 fmemclk;
144};
145
146struct tag {
147 struct tag_header hdr;
148 union {
149 struct tag_core core;
150 struct tag_mem32 mem;
151 struct tag_videotext videotext;
152 struct tag_ramdisk ramdisk;
153 struct tag_initrd initrd;
154 struct tag_serialnr serialnr;
155 struct tag_revision revision;
156 struct tag_videolfb videolfb;
157 struct tag_cmdline cmdline;
158
159 /*
160 * Acorn specific
161 */
162 struct tag_acorn acorn;
163
164 /*
165 * DC21285 specific
166 */
167 struct tag_memclk memclk;
168 } u;
169};
170
171struct tagtable {
172 u32 tag;
173 int (*parse)(const struct tag *);
174};
175
176#define __tag __used __attribute__((__section__(".taglist")))
177#define __tagtable(tag, fn) \
178static struct tagtable __tagtable_##fn __tag = { tag, fn }
179
180#define tag_member_present(tag,member) \
181 ((unsigned long)(&((struct tag *)0L)->member + 1) \
182 <= (tag)->hdr.size * 4)
183
184#define tag_next(t) ((struct tag *)((u32 *)(t) + (t)->hdr.size))
185#define tag_size(type) ((sizeof(struct tag_header) + sizeof(struct type)) >> 2)
186
187#define for_each_tag(t,base) \
188 for (t = base; t->hdr.size; t = tag_next(t))
189
190/*
191 * Memory map description
192 */
193#define NR_BANKS 8
194
195struct meminfo {
196 int nr_banks;
197 unsigned long end;
198 struct {
199 unsigned long start;
200 unsigned long size;
201 int node;
202 } bank[NR_BANKS];
203};
204
205extern struct meminfo meminfo;
206
207#endif /* __KERNEL__ */
208
209#endif
diff --git a/include/asm-arm26/shmbuf.h b/include/asm-arm26/shmbuf.h
deleted file mode 100644
index 2e5c67ba1c97..000000000000
--- a/include/asm-arm26/shmbuf.h
+++ /dev/null
@@ -1,42 +0,0 @@
1#ifndef _ASMARM_SHMBUF_H
2#define _ASMARM_SHMBUF_H
3
4/*
5 * The shmid64_ds structure for arm architecture.
6 * Note extra padding because this structure is passed back and forth
7 * between kernel and user space.
8 *
9 * Pad space is left for:
10 * - 64-bit time_t to solve y2038 problem
11 * - 2 miscellaneous 32-bit values
12 */
13
14struct shmid64_ds {
15 struct ipc64_perm shm_perm; /* operation perms */
16 size_t shm_segsz; /* size of segment (bytes) */
17 __kernel_time_t shm_atime; /* last attach time */
18 unsigned long __unused1;
19 __kernel_time_t shm_dtime; /* last detach time */
20 unsigned long __unused2;
21 __kernel_time_t shm_ctime; /* last change time */
22 unsigned long __unused3;
23 __kernel_pid_t shm_cpid; /* pid of creator */
24 __kernel_pid_t shm_lpid; /* pid of last operator */
25 unsigned long shm_nattch; /* no. of current attaches */
26 unsigned long __unused4;
27 unsigned long __unused5;
28};
29
30struct shminfo64 {
31 unsigned long shmmax;
32 unsigned long shmmin;
33 unsigned long shmmni;
34 unsigned long shmseg;
35 unsigned long shmall;
36 unsigned long __unused1;
37 unsigned long __unused2;
38 unsigned long __unused3;
39 unsigned long __unused4;
40};
41
42#endif /* _ASMARM_SHMBUF_H */
diff --git a/include/asm-arm26/shmparam.h b/include/asm-arm26/shmparam.h
deleted file mode 100644
index d3748686631e..000000000000
--- a/include/asm-arm26/shmparam.h
+++ /dev/null
@@ -1,15 +0,0 @@
1#ifndef _ASMARM_SHMPARAM_H
2#define _ASMARM_SHMPARAM_H
3
4#ifndef SHMMAX
5#define SHMMAX 0x003fa000
6#endif
7
8/*
9 * This should be the size of the virtually indexed cache/ways,
10 * or page size, whichever is greater since the cache aliases
11 * every size/ways bytes.
12 */
13#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
14
15#endif /* _ASMARM_SHMPARAM_H */
diff --git a/include/asm-arm26/sigcontext.h b/include/asm-arm26/sigcontext.h
deleted file mode 100644
index 013ad2074fc7..000000000000
--- a/include/asm-arm26/sigcontext.h
+++ /dev/null
@@ -1,33 +0,0 @@
1#ifndef _ASMARM_SIGCONTEXT_H
2#define _ASMARM_SIGCONTEXT_H
3
4/*
5 * Signal context structure - contains all info to do with the state
6 * before the signal handler was invoked. Note: only add new entries
7 * to the end of the structure.
8 */
9struct sigcontext {
10 unsigned long trap_no;
11 unsigned long error_code;
12 unsigned long oldmask;
13 unsigned long arm_r0;
14 unsigned long arm_r1;
15 unsigned long arm_r2;
16 unsigned long arm_r3;
17 unsigned long arm_r4;
18 unsigned long arm_r5;
19 unsigned long arm_r6;
20 unsigned long arm_r7;
21 unsigned long arm_r8;
22 unsigned long arm_r9;
23 unsigned long arm_r10;
24 unsigned long arm_fp;
25 unsigned long arm_ip;
26 unsigned long arm_sp;
27 unsigned long arm_lr;
28 unsigned long arm_pc;
29 unsigned long fault_address;
30};
31
32
33#endif
diff --git a/include/asm-arm26/siginfo.h b/include/asm-arm26/siginfo.h
deleted file mode 100644
index 5e21852e6039..000000000000
--- a/include/asm-arm26/siginfo.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _ASMARM_SIGINFO_H
2#define _ASMARM_SIGINFO_H
3
4#include <asm-generic/siginfo.h>
5
6#endif
diff --git a/include/asm-arm26/signal.h b/include/asm-arm26/signal.h
deleted file mode 100644
index 967ba4947e40..000000000000
--- a/include/asm-arm26/signal.h
+++ /dev/null
@@ -1,176 +0,0 @@
1#ifndef _ASMARM_SIGNAL_H
2#define _ASMARM_SIGNAL_H
3
4#include <linux/types.h>
5
6/* Avoid too many header ordering problems. */
7struct siginfo;
8
9#ifdef __KERNEL__
10/* Most things should be clean enough to redefine this at will, if care
11 is taken to make libc match. */
12
13#define _NSIG 64
14#define _NSIG_BPW 32
15#define _NSIG_WORDS (_NSIG / _NSIG_BPW)
16
17typedef unsigned long old_sigset_t; /* at least 32 bits */
18
19typedef struct {
20 unsigned long sig[_NSIG_WORDS];
21} sigset_t;
22
23#else
24/* Here we must cater to libcs that poke about in kernel headers. */
25
26#define NSIG 32
27typedef unsigned long sigset_t;
28
29#endif /* __KERNEL__ */
30
31#define SIGHUP 1
32#define SIGINT 2
33#define SIGQUIT 3
34#define SIGILL 4
35#define SIGTRAP 5
36#define SIGABRT 6
37#define SIGIOT 6
38#define SIGBUS 7
39#define SIGFPE 8
40#define SIGKILL 9
41#define SIGUSR1 10
42#define SIGSEGV 11
43#define SIGUSR2 12
44#define SIGPIPE 13
45#define SIGALRM 14
46#define SIGTERM 15
47#define SIGSTKFLT 16
48#define SIGCHLD 17
49#define SIGCONT 18
50#define SIGSTOP 19
51#define SIGTSTP 20
52#define SIGTTIN 21
53#define SIGTTOU 22
54#define SIGURG 23
55#define SIGXCPU 24
56#define SIGXFSZ 25
57#define SIGVTALRM 26
58#define SIGPROF 27
59#define SIGWINCH 28
60#define SIGIO 29
61#define SIGPOLL SIGIO
62/*
63#define SIGLOST 29
64*/
65#define SIGPWR 30
66#define SIGSYS 31
67#define SIGUNUSED 31
68
69/* These should not be considered constants from userland. */
70#define SIGRTMIN 32
71#define SIGRTMAX _NSIG
72
73#define SIGSWI 32
74
75/*
76 * SA_FLAGS values:
77 *
78 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
79 * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
80 * SA_SIGINFO deliver the signal with SIGINFO structs
81 * SA_THIRTYTWO delivers the signal in 32-bit mode, even if the task
82 * is running in 26-bit.
83 * SA_ONSTACK allows alternate signal stacks (see sigaltstack(2)).
84 * SA_RESTART flag to get restarting signals (which were the default long ago)
85 * SA_NODEFER prevents the current signal from being masked in the handler.
86 * SA_RESETHAND clears the handler when the signal is delivered.
87 *
88 * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
89 * Unix names RESETHAND and NODEFER respectively.
90 */
91#define SA_NOCLDSTOP 0x00000001
92#define SA_NOCLDWAIT 0x00000002 /* not supported yet */
93#define SA_SIGINFO 0x00000004
94#define SA_THIRTYTWO 0x02000000
95#define SA_RESTORER 0x04000000
96#define SA_ONSTACK 0x08000000
97#define SA_RESTART 0x10000000
98#define SA_NODEFER 0x40000000
99#define SA_RESETHAND 0x80000000
100
101#define SA_NOMASK SA_NODEFER
102#define SA_ONESHOT SA_RESETHAND
103
104
105/*
106 * sigaltstack controls
107 */
108#define SS_ONSTACK 1
109#define SS_DISABLE 2
110
111#define MINSIGSTKSZ 2048
112#define SIGSTKSZ 8192
113
114#ifdef __KERNEL__
115#define SA_IRQNOMASK 0x08000000
116#endif
117
118#include <asm-generic/signal.h>
119
120#ifdef __KERNEL__
121struct old_sigaction {
122 __sighandler_t sa_handler;
123 old_sigset_t sa_mask;
124 unsigned long sa_flags;
125 void (*sa_restorer)(void);
126};
127
128struct sigaction {
129 __sighandler_t sa_handler;
130 unsigned long sa_flags;
131 void (*sa_restorer)(void);
132 sigset_t sa_mask; /* mask last for extensibility */
133};
134
135struct k_sigaction {
136 struct sigaction sa;
137};
138
139#else
140/* Here we must cater to libcs that poke about in kernel headers. */
141
142struct sigaction {
143 union {
144 __sighandler_t _sa_handler;
145 void (*_sa_sigaction)(int, struct siginfo *, void *);
146 } _u;
147 sigset_t sa_mask;
148 unsigned long sa_flags;
149 void (*sa_restorer)(void);
150};
151
152#define sa_handler _u._sa_handler
153#define sa_sigaction _u._sa_sigaction
154
155#endif /* __KERNEL__ */
156
157typedef struct sigaltstack {
158 void *ss_sp;
159 int ss_flags;
160 size_t ss_size;
161} stack_t;
162
163#ifdef __KERNEL__
164#include <asm/sigcontext.h>
165
166#define sigmask(sig) (1UL << ((sig) - 1))
167#endif
168
169
170#ifdef __KERNEL__
171#include <asm/sigcontext.h>
172#define ptrace_signal_deliver(regs, cookie) do { } while (0)
173#endif
174
175
176#endif
diff --git a/include/asm-arm26/sizes.h b/include/asm-arm26/sizes.h
deleted file mode 100644
index f8d92ca12040..000000000000
--- a/include/asm-arm26/sizes.h
+++ /dev/null
@@ -1,52 +0,0 @@
1/*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License, or
5 * (at your option) any later version.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15 */
16/* DO NOT EDIT!! - this file automatically generated
17 * from .s file by awk -f s2h.awk
18 */
19/* Size defintions
20 * Copyright (C) ARM Limited 1998. All rights reserved.
21 */
22
23#ifndef __sizes_h
24#define __sizes_h 1
25
26/* handy sizes */
27#define SZ_1K 0x00000400
28#define SZ_4K 0x00001000
29#define SZ_8K 0x00002000
30#define SZ_16K 0x00004000
31#define SZ_64K 0x00010000
32#define SZ_128K 0x00020000
33#define SZ_256K 0x00040000
34#define SZ_512K 0x00080000
35
36#define SZ_1M 0x00100000
37#define SZ_2M 0x00200000
38#define SZ_4M 0x00400000
39#define SZ_8M 0x00800000
40#define SZ_16M 0x01000000
41#define SZ_32M 0x02000000
42#define SZ_64M 0x04000000
43#define SZ_128M 0x08000000
44#define SZ_256M 0x10000000
45#define SZ_512M 0x20000000
46
47#define SZ_1G 0x40000000
48#define SZ_2G 0x80000000
49
50#endif
51
52/* END */
diff --git a/include/asm-arm26/smp.h b/include/asm-arm26/smp.h
deleted file mode 100644
index 38349ec8b61b..000000000000
--- a/include/asm-arm26/smp.h
+++ /dev/null
@@ -1,9 +0,0 @@
1#ifndef __ASM_SMP_H
2#define __ASM_SMP_H
3
4
5#ifdef CONFIG_SMP
6#error SMP not supported
7#endif
8
9#endif
diff --git a/include/asm-arm26/socket.h b/include/asm-arm26/socket.h
deleted file mode 100644
index 65a1a64bf934..000000000000
--- a/include/asm-arm26/socket.h
+++ /dev/null
@@ -1,55 +0,0 @@
1#ifndef _ASMARM_SOCKET_H
2#define _ASMARM_SOCKET_H
3
4#include <asm/sockios.h>
5
6/* For setsockopt(2) */
7#define SOL_SOCKET 1
8
9#define SO_DEBUG 1
10#define SO_REUSEADDR 2
11#define SO_TYPE 3
12#define SO_ERROR 4
13#define SO_DONTROUTE 5
14#define SO_BROADCAST 6
15#define SO_SNDBUF 7
16#define SO_RCVBUF 8
17#define SO_SNDBUFFORCE 32
18#define SO_RCVBUFFORCE 33
19#define SO_KEEPALIVE 9
20#define SO_OOBINLINE 10
21#define SO_NO_CHECK 11
22#define SO_PRIORITY 12
23#define SO_LINGER 13
24#define SO_BSDCOMPAT 14
25/* To add :#define SO_REUSEPORT 15 */
26#define SO_PASSCRED 16
27#define SO_PEERCRED 17
28#define SO_RCVLOWAT 18
29#define SO_SNDLOWAT 19
30#define SO_RCVTIMEO 20
31#define SO_SNDTIMEO 21
32
33/* Security levels - as per NRL IPv6 - don't actually do anything */
34#define SO_SECURITY_AUTHENTICATION 22
35#define SO_SECURITY_ENCRYPTION_TRANSPORT 23
36#define SO_SECURITY_ENCRYPTION_NETWORK 24
37
38#define SO_BINDTODEVICE 25
39
40/* Socket filtering */
41#define SO_ATTACH_FILTER 26
42#define SO_DETACH_FILTER 27
43
44#define SO_PEERNAME 28
45#define SO_TIMESTAMP 29
46#define SCM_TIMESTAMP SO_TIMESTAMP
47
48#define SO_ACCEPTCONN 30
49
50#define SO_PEERSEC 31
51#define SO_PASSSEC 34
52#define SO_TIMESTAMPNS 35
53#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
54
55#endif /* _ASM_SOCKET_H */
diff --git a/include/asm-arm26/sockios.h b/include/asm-arm26/sockios.h
deleted file mode 100644
index a2588a2512df..000000000000
--- a/include/asm-arm26/sockios.h
+++ /dev/null
@@ -1,13 +0,0 @@
1#ifndef __ARCH_ARM_SOCKIOS_H
2#define __ARCH_ARM_SOCKIOS_H
3
4/* Socket-level I/O control calls. */
5#define FIOSETOWN 0x8901
6#define SIOCSPGRP 0x8902
7#define FIOGETOWN 0x8903
8#define SIOCGPGRP 0x8904
9#define SIOCATMARK 0x8905
10#define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */
11#define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */
12
13#endif
diff --git a/include/asm-arm26/spinlock.h b/include/asm-arm26/spinlock.h
deleted file mode 100644
index e92e81deb4fd..000000000000
--- a/include/asm-arm26/spinlock.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __ASM_SPINLOCK_H
2#define __ASM_SPINLOCK_H
3
4#error ARM architecture does not support SMP spin locks
5
6#endif /* __ASM_SPINLOCK_H */
diff --git a/include/asm-arm26/stat.h b/include/asm-arm26/stat.h
deleted file mode 100644
index e4abc4fa0850..000000000000
--- a/include/asm-arm26/stat.h
+++ /dev/null
@@ -1,77 +0,0 @@
1#ifndef _ASMARM_STAT_H
2#define _ASMARM_STAT_H
3
4struct __old_kernel_stat {
5 unsigned short st_dev;
6 unsigned short st_ino;
7 unsigned short st_mode;
8 unsigned short st_nlink;
9 unsigned short st_uid;
10 unsigned short st_gid;
11 unsigned short st_rdev;
12 unsigned long st_size;
13 unsigned long st_atime;
14 unsigned long st_mtime;
15 unsigned long st_ctime;
16};
17
18struct stat {
19 unsigned short st_dev;
20 unsigned short __pad1;
21 unsigned long st_ino;
22 unsigned short st_mode;
23 unsigned short st_nlink;
24 unsigned short st_uid;
25 unsigned short st_gid;
26 unsigned short st_rdev;
27 unsigned short __pad2;
28 unsigned long st_size;
29 unsigned long st_blksize;
30 unsigned long st_blocks;
31 unsigned long st_atime;
32 unsigned long st_atime_nsec;
33 unsigned long st_mtime;
34 unsigned long st_mtime_nsec;
35 unsigned long st_ctime;
36 unsigned long st_ctime_nsec;
37 unsigned long __unused4;
38 unsigned long __unused5;
39};
40
41/* This matches struct stat64 in glibc2.1, hence the absolutely
42 * insane amounts of padding around dev_t's.
43 */
44struct stat64 {
45 unsigned long long st_dev;
46 unsigned char __pad0[4];
47
48#define STAT64_HAS_BROKEN_ST_INO 1
49 unsigned long __st_ino;
50 unsigned int st_mode;
51 unsigned int st_nlink;
52
53 unsigned long st_uid;
54 unsigned long st_gid;
55
56 unsigned long long st_rdev;
57 unsigned char __pad3[4];
58
59 long long st_size;
60 unsigned long st_blksize;
61
62 unsigned long st_blocks; /* Number 512-byte blocks allocated. */
63 unsigned long __pad4; /* Future possible st_blocks hi bits */
64
65 unsigned long st_atime;
66 unsigned long st_atime_nsec;
67
68 unsigned long st_mtime;
69 unsigned long st_mtime_nsec;
70
71 unsigned long st_ctime;
72 unsigned long st_ctime_nsec;
73
74 unsigned long long st_ino;
75};
76
77#endif
diff --git a/include/asm-arm26/statfs.h b/include/asm-arm26/statfs.h
deleted file mode 100644
index 776dbc8f7623..000000000000
--- a/include/asm-arm26/statfs.h
+++ /dev/null
@@ -1,8 +0,0 @@
1#ifndef _ASMARM_STATFS_H
2#define _ASMARM_STATFS_H
3
4//FIXME - this may not be appropriate for arm26. check it out.
5
6#include <asm-generic/statfs.h>
7
8#endif
diff --git a/include/asm-arm26/string.h b/include/asm-arm26/string.h
deleted file mode 100644
index 2a8ab162412f..000000000000
--- a/include/asm-arm26/string.h
+++ /dev/null
@@ -1,43 +0,0 @@
1#ifndef __ASM_ARM_STRING_H
2#define __ASM_ARM_STRING_H
3
4/*
5 * We don't do inline string functions, since the
6 * optimised inline asm versions are not small.
7 */
8
9#define __HAVE_ARCH_STRRCHR
10extern char * strrchr(const char * s, int c);
11
12#define __HAVE_ARCH_STRCHR
13extern char * strchr(const char * s, int c);
14
15#define __HAVE_ARCH_MEMCPY
16extern void * memcpy(void *, const void *, __kernel_size_t);
17
18#define __HAVE_ARCH_MEMMOVE
19extern void * memmove(void *, const void *, __kernel_size_t);
20
21#define __HAVE_ARCH_MEMCHR
22extern void * memchr(const void *, int, __kernel_size_t);
23
24#define __HAVE_ARCH_MEMZERO
25#define __HAVE_ARCH_MEMSET
26extern void * memset(void *, int, __kernel_size_t);
27
28extern void __memzero(void *ptr, __kernel_size_t n);
29
30#define memset(p,v,n) \
31 ({ \
32 if ((n) != 0) { \
33 if (__builtin_constant_p((v)) && (v) == 0) \
34 __memzero((p),(n)); \
35 else \
36 memset((p),(v),(n)); \
37 } \
38 (p); \
39 })
40
41#define memzero(p,n) ({ if ((n) != 0) __memzero((p),(n)); (p); })
42
43#endif
diff --git a/include/asm-arm26/suspend.h b/include/asm-arm26/suspend.h
deleted file mode 100644
index 5e4c1cc0c19d..000000000000
--- a/include/asm-arm26/suspend.h
+++ /dev/null
@@ -1,4 +0,0 @@
1#ifdef _ASMARM_SUSPEND_H
2#define _ASMARM_SUSPEND_H
3
4#endif
diff --git a/include/asm-arm26/sysirq.h b/include/asm-arm26/sysirq.h
deleted file mode 100644
index 81dca90d9a3f..000000000000
--- a/include/asm-arm26/sysirq.h
+++ /dev/null
@@ -1,60 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-arc/irqs.h
3 *
4 * Copyright (C) 1996 Russell King, Dave Gilbert
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * Modifications:
11 * 04-04-1998 PJB Merged arc and a5k versions
12 */
13
14
15#if defined(CONFIG_ARCH_A5K)
16#define IRQ_PRINTER 0
17#define IRQ_BATLOW 1
18#define IRQ_FLOPPYINDEX 2
19#define IRQ_FLOPPYDISK 12
20#elif defined(CONFIG_ARCH_ARC)
21#define IRQ_PRINTERBUSY 0
22#define IRQ_SERIALRING 1
23#define IRQ_PRINTERACK 2
24#define IRQ_FLOPPYCHANGED 12
25#endif
26
27#define IRQ_VSYNCPULSE 3
28#define IRQ_POWERON 4
29#define IRQ_TIMER0 5
30#define IRQ_TIMER1 6
31#define IRQ_IMMEDIATE 7
32#define IRQ_EXPCARDFIQ 8
33#define IRQ_SOUNDCHANGE 9
34#define IRQ_SERIALPORT 10
35#define IRQ_HARDDISK 11
36#define IRQ_EXPANSIONCARD 13
37#define IRQ_KEYBOARDTX 14
38#define IRQ_KEYBOARDRX 15
39
40#if defined(CONFIG_ARCH_A5K)
41#define FIQ_SERIALPORT 4
42#elif defined(CONFIG_ARCH_ARC)
43#define FIQ_FLOPPYIRQ 1
44#define FIQ_FD1772 FIQ_FLOPPYIRQ
45#endif
46
47#define FIQ_FLOPPYDATA 0
48#define FIQ_ECONET 2
49#define FIQ_EXPANSIONCARD 6
50#define FIQ_FORCE 7
51
52#define IRQ_TIMER IRQ_TIMER0
53
54/*
55 * This is the offset of the FIQ "IRQ" numbers
56 */
57#define FIQ_START 64
58
59#define irq_cannonicalize(i) (i)
60
diff --git a/include/asm-arm26/system.h b/include/asm-arm26/system.h
deleted file mode 100644
index e09da5ff1f54..000000000000
--- a/include/asm-arm26/system.h
+++ /dev/null
@@ -1,247 +0,0 @@
1#ifndef __ASM_ARM_SYSTEM_H
2#define __ASM_ARM_SYSTEM_H
3
4#ifdef __KERNEL__
5
6
7/*
8 * This is used to ensure the compiler did actually allocate the register we
9 * asked it for some inline assembly sequences. Apparently we can't trust
10 * the compiler from one version to another so a bit of paranoia won't hurt.
11 * This string is meant to be concatenated with the inline asm string and
12 * will cause compilation to stop on mismatch. (From ARM32 - may come in handy)
13 */
14#define __asmeq(x, y) ".ifnc " x "," y " ; .err ; .endif\n\t"
15
16#ifndef __ASSEMBLY__
17
18#include <linux/linkage.h>
19
20struct thread_info;
21struct task_struct;
22
23#if 0
24/* information about the system we're running on */
25extern unsigned int system_rev;
26extern unsigned int system_serial_low;
27extern unsigned int system_serial_high;
28extern unsigned int mem_fclk_21285;
29
30FIXME - sort this
31/*
32 * We need to turn the caches off before calling the reset vector - RiscOS
33 * messes up if we don't
34 */
35#define proc_hard_reset() cpu_proc_fin()
36
37#endif
38
39struct pt_regs;
40
41void die(const char *msg, struct pt_regs *regs, int err)
42 __attribute__((noreturn));
43
44void die_if_kernel(const char *str, struct pt_regs *regs, int err);
45
46void hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int,
47 struct pt_regs *),
48 int sig, const char *name);
49
50#include <asm/proc-fns.h>
51
52#define xchg(ptr,x) \
53 ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
54
55extern asmlinkage void __backtrace(void);
56
57#define set_cr(x) \
58 __asm__ __volatile__( \
59 "mcr p15, 0, %0, c1, c0, 0 @ set CR" \
60 : : "r" (x) : "cc")
61
62#define get_cr() \
63 ({ \
64 unsigned int __val; \
65 __asm__ __volatile__( \
66 "mrc p15, 0, %0, c1, c0, 0 @ get CR" \
67 : "=r" (__val) : : "cc"); \
68 __val; \
69 })
70
71extern unsigned long cr_no_alignment; /* defined in entry-armv.S */
72extern unsigned long cr_alignment; /* defined in entry-armv.S */
73
74#define UDBG_UNDEFINED (1 << 0)
75#define UDBG_SYSCALL (1 << 1)
76#define UDBG_BADABORT (1 << 2)
77#define UDBG_SEGV (1 << 3)
78#define UDBG_BUS (1 << 4)
79
80extern unsigned int user_debug;
81
82#define vectors_base() (0)
83
84#define mb() __asm__ __volatile__ ("" : : : "memory")
85#define rmb() mb()
86#define wmb() mb()
87#define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t");
88
89#define read_barrier_depends() do { } while(0)
90#define set_mb(var, value) do { var = value; mb(); } while (0)
91
92/*
93 * We assume knowledge of how
94 * spin_unlock_irq() and friends are implemented. This avoids
95 * us needlessly decrementing and incrementing the preempt count.
96 */
97#define prepare_arch_switch(next) local_irq_enable()
98#define finish_arch_switch(prev) spin_unlock(&(rq)->lock)
99
100/*
101 * switch_to(prev, next) should switch from task `prev' to `next'
102 * `prev' will never be the same as `next'. schedule() itself
103 * contains the memory barrier to tell GCC not to cache `current'.
104 */
105extern struct task_struct *__switch_to(struct task_struct *, struct thread_info *, struct thread_info *);
106
107#define switch_to(prev,next,last) \
108do { \
109 last = __switch_to(prev,task_thread_info(prev),task_thread_info(next)); \
110} while (0)
111
112/*
113 * Save the current interrupt enable state & disable IRQs
114 */
115#define local_irq_save(x) \
116 do { \
117 unsigned long temp; \
118 __asm__ __volatile__( \
119" mov %0, pc @ save_flags_cli\n" \
120" orr %1, %0, #0x08000000\n" \
121" and %0, %0, #0x0c000000\n" \
122" teqp %1, #0\n" \
123 : "=r" (x), "=r" (temp) \
124 : \
125 : "memory"); \
126 } while (0)
127
128/*
129 * Enable IRQs (sti)
130 */
131#define local_irq_enable() \
132 do { \
133 unsigned long temp; \
134 __asm__ __volatile__( \
135" mov %0, pc @ sti\n" \
136" bic %0, %0, #0x08000000\n" \
137" teqp %0, #0\n" \
138 : "=r" (temp) \
139 : \
140 : "memory"); \
141 } while(0)
142
143/*
144 * Disable IRQs (cli)
145 */
146#define local_irq_disable() \
147 do { \
148 unsigned long temp; \
149 __asm__ __volatile__( \
150" mov %0, pc @ cli\n" \
151" orr %0, %0, #0x08000000\n" \
152" teqp %0, #0\n" \
153 : "=r" (temp) \
154 : \
155 : "memory"); \
156 } while(0)
157
158/* Enable FIQs (stf) */
159
160#define __stf() do { \
161 unsigned long temp; \
162 __asm__ __volatile__( \
163" mov %0, pc @ stf\n" \
164" bic %0, %0, #0x04000000\n" \
165" teqp %0, #0\n" \
166 : "=r" (temp)); \
167 } while(0)
168
169/* Disable FIQs (clf) */
170
171#define __clf() do { \
172 unsigned long temp; \
173 __asm__ __volatile__( \
174" mov %0, pc @ clf\n" \
175" orr %0, %0, #0x04000000\n" \
176" teqp %0, #0\n" \
177 : "=r" (temp)); \
178 } while(0)
179
180
181/*
182 * Save the current interrupt enable state.
183 */
184#define local_save_flags(x) \
185 do { \
186 __asm__ __volatile__( \
187" mov %0, pc @ save_flags\n" \
188" and %0, %0, #0x0c000000\n" \
189 : "=r" (x)); \
190 } while (0)
191
192
193/*
194 * restore saved IRQ & FIQ state
195 */
196#define local_irq_restore(x) \
197 do { \
198 unsigned long temp; \
199 __asm__ __volatile__( \
200" mov %0, pc @ restore_flags\n" \
201" bic %0, %0, #0x0c000000\n" \
202" orr %0, %0, %1\n" \
203" teqp %0, #0\n" \
204 : "=&r" (temp) \
205 : "r" (x) \
206 : "memory"); \
207 } while (0)
208
209
210#ifdef CONFIG_SMP
211#error SMP not supported
212#endif
213
214#define smp_mb() barrier()
215#define smp_rmb() barrier()
216#define smp_wmb() barrier()
217#define smp_read_barrier_depends() do { } while(0)
218
219#define clf() __clf()
220#define stf() __stf()
221
222#define irqs_disabled() \
223({ \
224 unsigned long flags; \
225 local_save_flags(flags); \
226 flags & PSR_I_BIT; \
227})
228
229static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size)
230{
231 extern void __bad_xchg(volatile void *, int);
232
233 switch (size) {
234 case 1: return cpu_xchg_1(x, ptr);
235 case 4: return cpu_xchg_4(x, ptr);
236 default: __bad_xchg(ptr, size);
237 }
238 return 0;
239}
240
241#endif /* __ASSEMBLY__ */
242
243#define arch_align_stack(x) (x)
244
245#endif /* __KERNEL__ */
246
247#endif
diff --git a/include/asm-arm26/termbits.h b/include/asm-arm26/termbits.h
deleted file mode 100644
index 48d2f5c7bcb8..000000000000
--- a/include/asm-arm26/termbits.h
+++ /dev/null
@@ -1,196 +0,0 @@
1#ifndef __ASM_ARM_TERMBITS_H
2#define __ASM_ARM_TERMBITS_H
3
4typedef unsigned char cc_t;
5typedef unsigned int speed_t;
6typedef unsigned int tcflag_t;
7
8#define NCCS 19
9struct termios {
10 tcflag_t c_iflag; /* input mode flags */
11 tcflag_t c_oflag; /* output mode flags */
12 tcflag_t c_cflag; /* control mode flags */
13 tcflag_t c_lflag; /* local mode flags */
14 cc_t c_line; /* line discipline */
15 cc_t c_cc[NCCS]; /* control characters */
16};
17
18struct termios2 {
19 tcflag_t c_iflag; /* input mode flags */
20 tcflag_t c_oflag; /* output mode flags */
21 tcflag_t c_cflag; /* control mode flags */
22 tcflag_t c_lflag; /* local mode flags */
23 cc_t c_line; /* line discipline */
24 cc_t c_cc[NCCS]; /* control characters */
25 speed_t c_ispeed; /* input speed */
26 speed_t c_ospeed; /* output speed */
27};
28
29struct ktermios {
30 tcflag_t c_iflag; /* input mode flags */
31 tcflag_t c_oflag; /* output mode flags */
32 tcflag_t c_cflag; /* control mode flags */
33 tcflag_t c_lflag; /* local mode flags */
34 cc_t c_line; /* line discipline */
35 cc_t c_cc[NCCS]; /* control characters */
36 speed_t c_ispeed; /* input speed */
37 speed_t c_ospeed; /* output speed */
38};
39
40/* c_cc characters */
41#define VINTR 0
42#define VQUIT 1
43#define VERASE 2
44#define VKILL 3
45#define VEOF 4
46#define VTIME 5
47#define VMIN 6
48#define VSWTC 7
49#define VSTART 8
50#define VSTOP 9
51#define VSUSP 10
52#define VEOL 11
53#define VREPRINT 12
54#define VDISCARD 13
55#define VWERASE 14
56#define VLNEXT 15
57#define VEOL2 16
58
59/* c_iflag bits */
60#define IGNBRK 0000001
61#define BRKINT 0000002
62#define IGNPAR 0000004
63#define PARMRK 0000010
64#define INPCK 0000020
65#define ISTRIP 0000040
66#define INLCR 0000100
67#define IGNCR 0000200
68#define ICRNL 0000400
69#define IUCLC 0001000
70#define IXON 0002000
71#define IXANY 0004000
72#define IXOFF 0010000
73#define IMAXBEL 0020000
74#define IUTF8 0040000
75
76/* c_oflag bits */
77#define OPOST 0000001
78#define OLCUC 0000002
79#define ONLCR 0000004
80#define OCRNL 0000010
81#define ONOCR 0000020
82#define ONLRET 0000040
83#define OFILL 0000100
84#define OFDEL 0000200
85#define NLDLY 0000400
86#define NL0 0000000
87#define NL1 0000400
88#define CRDLY 0003000
89#define CR0 0000000
90#define CR1 0001000
91#define CR2 0002000
92#define CR3 0003000
93#define TABDLY 0014000
94#define TAB0 0000000
95#define TAB1 0004000
96#define TAB2 0010000
97#define TAB3 0014000
98#define XTABS 0014000
99#define BSDLY 0020000
100#define BS0 0000000
101#define BS1 0020000
102#define VTDLY 0040000
103#define VT0 0000000
104#define VT1 0040000
105#define FFDLY 0100000
106#define FF0 0000000
107#define FF1 0100000
108
109/* c_cflag bit meaning */
110#define CBAUD 0010017
111#define B0 0000000 /* hang up */
112#define B50 0000001
113#define B75 0000002
114#define B110 0000003
115#define B134 0000004
116#define B150 0000005
117#define B200 0000006
118#define B300 0000007
119#define B600 0000010
120#define B1200 0000011
121#define B1800 0000012
122#define B2400 0000013
123#define B4800 0000014
124#define B9600 0000015
125#define B19200 0000016
126#define B38400 0000017
127#define EXTA B19200
128#define EXTB B38400
129#define CSIZE 0000060
130#define CS5 0000000
131#define CS6 0000020
132#define CS7 0000040
133#define CS8 0000060
134#define CSTOPB 0000100
135#define CREAD 0000200
136#define PARENB 0000400
137#define PARODD 0001000
138#define HUPCL 0002000
139#define CLOCAL 0004000
140#define CBAUDEX 0010000
141#define BOTHER 0010000
142#define B57600 0010001
143#define B115200 0010002
144#define B230400 0010003
145#define B460800 0010004
146#define B500000 0010005
147#define B576000 0010006
148#define B921600 0010007
149#define B1000000 0010010
150#define B1152000 0010011
151#define B1500000 0010012
152#define B2000000 0010013
153#define B2500000 0010014
154#define B3000000 0010015
155#define B3500000 0010016
156#define B4000000 0010017
157#define CIBAUD 002003600000 /* input baud rate */
158#define CMSPAR 010000000000 /* mark or space (stick) parity */
159#define CRTSCTS 020000000000 /* flow control */
160
161#define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */
162
163/* c_lflag bits */
164#define ISIG 0000001
165#define ICANON 0000002
166#define XCASE 0000004
167#define ECHO 0000010
168#define ECHOE 0000020
169#define ECHOK 0000040
170#define ECHONL 0000100
171#define NOFLSH 0000200
172#define TOSTOP 0000400
173#define ECHOCTL 0001000
174#define ECHOPRT 0002000
175#define ECHOKE 0004000
176#define FLUSHO 0010000
177#define PENDIN 0040000
178#define IEXTEN 0100000
179
180/* tcflow() and TCXONC use these */
181#define TCOOFF 0
182#define TCOON 1
183#define TCIOFF 2
184#define TCION 3
185
186/* tcflush() and TCFLSH use these */
187#define TCIFLUSH 0
188#define TCOFLUSH 1
189#define TCIOFLUSH 2
190
191/* tcsetattr uses these */
192#define TCSANOW 0
193#define TCSADRAIN 1
194#define TCSAFLUSH 2
195
196#endif /* __ASM_ARM_TERMBITS_H */
diff --git a/include/asm-arm26/termios.h b/include/asm-arm26/termios.h
deleted file mode 100644
index 293e3f1bc3f2..000000000000
--- a/include/asm-arm26/termios.h
+++ /dev/null
@@ -1,92 +0,0 @@
1#ifndef __ASM_ARM_TERMIOS_H
2#define __ASM_ARM_TERMIOS_H
3
4#include <asm/termbits.h>
5#include <asm/ioctls.h>
6
7struct winsize {
8 unsigned short ws_row;
9 unsigned short ws_col;
10 unsigned short ws_xpixel;
11 unsigned short ws_ypixel;
12};
13
14#define NCC 8
15struct termio {
16 unsigned short c_iflag; /* input mode flags */
17 unsigned short c_oflag; /* output mode flags */
18 unsigned short c_cflag; /* control mode flags */
19 unsigned short c_lflag; /* local mode flags */
20 unsigned char c_line; /* line discipline */
21 unsigned char c_cc[NCC]; /* control characters */
22};
23
24#ifdef __KERNEL__
25/* intr=^C quit=^| erase=del kill=^U
26 eof=^D vtime=\0 vmin=\1 sxtc=\0
27 start=^Q stop=^S susp=^Z eol=\0
28 reprint=^R discard=^U werase=^W lnext=^V
29 eol2=\0
30*/
31#define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0"
32#endif
33
34/* modem lines */
35#define TIOCM_LE 0x001
36#define TIOCM_DTR 0x002
37#define TIOCM_RTS 0x004
38#define TIOCM_ST 0x008
39#define TIOCM_SR 0x010
40#define TIOCM_CTS 0x020
41#define TIOCM_CAR 0x040
42#define TIOCM_RNG 0x080
43#define TIOCM_DSR 0x100
44#define TIOCM_CD TIOCM_CAR
45#define TIOCM_RI TIOCM_RNG
46#define TIOCM_OUT1 0x2000
47#define TIOCM_OUT2 0x4000
48#define TIOCM_LOOP 0x8000
49
50/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
51
52#ifdef __KERNEL__
53
54/*
55 * Translate a "termio" structure into a "termios". Ugh.
56 */
57#define SET_LOW_TERMIOS_BITS(termios, termio, x) { \
58 unsigned short __tmp; \
59 get_user(__tmp,&(termio)->x); \
60 *(unsigned short *) &(termios)->x = __tmp; \
61}
62
63#define user_termio_to_kernel_termios(termios, termio) \
64({ \
65 SET_LOW_TERMIOS_BITS(termios, termio, c_iflag); \
66 SET_LOW_TERMIOS_BITS(termios, termio, c_oflag); \
67 SET_LOW_TERMIOS_BITS(termios, termio, c_cflag); \
68 SET_LOW_TERMIOS_BITS(termios, termio, c_lflag); \
69 copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \
70})
71
72/*
73 * Translate a "termios" structure into a "termio". Ugh.
74 */
75#define kernel_termios_to_user_termio(termio, termios) \
76({ \
77 put_user((termios)->c_iflag, &(termio)->c_iflag); \
78 put_user((termios)->c_oflag, &(termio)->c_oflag); \
79 put_user((termios)->c_cflag, &(termio)->c_cflag); \
80 put_user((termios)->c_lflag, &(termio)->c_lflag); \
81 put_user((termios)->c_line, &(termio)->c_line); \
82 copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \
83})
84
85#define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2))
86#define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2))
87#define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios))
88#define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios))
89
90#endif /* __KERNEL__ */
91
92#endif /* __ASM_ARM_TERMIOS_H */
diff --git a/include/asm-arm26/thread_info.h b/include/asm-arm26/thread_info.h
deleted file mode 100644
index f9b5c09b560f..000000000000
--- a/include/asm-arm26/thread_info.h
+++ /dev/null
@@ -1,137 +0,0 @@
1/*
2 * linux/include/asm-arm26/thread_info.h
3 *
4 * Copyright (C) 2002 Russell King.
5 * Copyright (C) 2003 Ian Molton.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11#ifndef __ASM_ARM_THREAD_INFO_H
12#define __ASM_ARM_THREAD_INFO_H
13
14#ifdef __KERNEL__
15
16#ifndef __ASSEMBLY__
17
18struct task_struct;
19struct exec_domain;
20
21#include <linux/compiler.h>
22#include <asm/fpstate.h>
23#include <asm/ptrace.h>
24#include <asm/types.h>
25
26typedef unsigned long mm_segment_t;
27
28struct cpu_context_save {
29 __u32 r4;
30 __u32 r5;
31 __u32 r6;
32 __u32 r7;
33 __u32 r8;
34 __u32 r9;
35 __u32 sl;
36 __u32 fp;
37 __u32 sp;
38 __u32 pc;
39};
40
41/*
42 * low level task data that entry.S needs immediate access to.
43 * We assume cpu_context follows immedately after cpu_domain.
44 */
45struct thread_info {
46 unsigned long flags; /* low level flags */
47 int preempt_count; /* 0 => preemptable, <0 => bug */
48 mm_segment_t addr_limit; /* address limit */
49 struct task_struct *task; /* main task structure */
50 struct exec_domain *exec_domain; /* execution domain */
51 __u32 cpu; /* cpu */
52 struct cpu_context_save cpu_context; /* cpu context */
53 struct restart_block restart_block;
54 union fp_state fpstate;
55};
56
57#define INIT_THREAD_INFO(tsk) \
58{ \
59 .task &tsk, \
60 .exec_domain &default_exec_domain, \
61 .flags 0, \
62 .preempt_count 0, \
63 .addr_limit KERNEL_DS, \
64 .restart_block = { \
65 .fn = do_no_restart_syscall, \
66 }, \
67}
68
69#define init_thread_info (init_thread_union.thread_info)
70#define init_stack (init_thread_union.stack)
71
72/*
73 * how to get the thread information struct from C
74 */
75static inline struct thread_info *current_thread_info(void) __attribute_const__;
76
77static inline struct thread_info *current_thread_info(void)
78{
79 register unsigned long sp asm ("sp");
80 return (struct thread_info *)(sp & ~0x1fff);
81}
82
83#define THREAD_SIZE PAGE_SIZE
84#define task_pt_regs(task) ((struct pt_regs *)(task_stack_page(task) + THREAD_SIZE - 8) - 1)
85
86extern struct thread_info *alloc_thread_info(struct task_struct *task);
87extern void free_thread_info(struct thread_info *);
88
89#define thread_saved_pc(tsk) \
90 ((unsigned long)(pc_pointer(task_thread_info(tsk)->cpu_context.pc)))
91#define thread_saved_fp(tsk) \
92 ((unsigned long)(task_thread_info(tsk)->cpu_context.fp))
93
94#else /* !__ASSEMBLY__ */
95
96#define TI_FLAGS 0
97#define TI_PREEMPT 4
98#define TI_ADDR_LIMIT 8
99#define TI_TASK 12
100#define TI_EXEC_DOMAIN 16
101#define TI_CPU 20
102#define TI_CPU_SAVE 24
103#define TI_RESTART_BLOCK 28
104#define TI_FPSTATE 68
105
106#endif
107
108#define PREEMPT_ACTIVE 0x04000000
109
110/*
111 * thread information flags:
112 * TIF_SYSCALL_TRACE - syscall trace active
113 * TIF_SIGPENDING - signal pending
114 * TIF_NEED_RESCHED - rescheduling necessary
115 * TIF_USEDFPU - FPU was used by this task this quantum (SMP)
116 * TIF_POLLING_NRFLAG - true if poll_idle() is polling TIF_NEED_RESCHED
117 */
118#define TIF_SIGPENDING 0
119#define TIF_NEED_RESCHED 1
120#define TIF_SYSCALL_TRACE 8
121#define TIF_USED_FPU 16
122#define TIF_POLLING_NRFLAG 17
123#define TIF_MEMDIE 18
124
125#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
126#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
127#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
128#define _TIF_USED_FPU (1 << TIF_USED_FPU)
129#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)
130
131/*
132 * Change these and you break ASM code in entry-common.S
133 */
134#define _TIF_WORK_MASK 0x000000ff
135
136#endif /* __KERNEL__ */
137#endif /* __ASM_ARM_THREAD_INFO_H */
diff --git a/include/asm-arm26/timex.h b/include/asm-arm26/timex.h
deleted file mode 100644
index 68322fbc1aed..000000000000
--- a/include/asm-arm26/timex.h
+++ /dev/null
@@ -1,29 +0,0 @@
1/*
2 * linux/include/asm-arm/timex.h
3 *
4 * Copyright (C) 1997,1998 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * Architecture Specific TIME specifications
11 */
12#ifndef _ASMARM_TIMEX_H
13#define _ASMARM_TIMEX_H
14
15/*
16 * On the RiscPC, the clock ticks at 2MHz.
17 */
18#define CLOCK_TICK_RATE 2000000
19
20/* IS THAT RIGHT ON A5000? FIXME */
21
22typedef unsigned long cycles_t;
23
24static inline cycles_t get_cycles (void)
25{
26 return 0;
27}
28
29#endif
diff --git a/include/asm-arm26/tlb.h b/include/asm-arm26/tlb.h
deleted file mode 100644
index 08ddd85b8d35..000000000000
--- a/include/asm-arm26/tlb.h
+++ /dev/null
@@ -1,63 +0,0 @@
1#ifndef __ASMARM_TLB_H
2#define __ASMARM_TLB_H
3
4#include <asm/pgalloc.h>
5#include <asm/tlbflush.h>
6
7/*
8 * TLB handling. This allows us to remove pages from the page
9 * tables, and efficiently handle the TLB issues.
10 */
11struct mmu_gather {
12 struct mm_struct *mm;
13 unsigned int need_flush;
14 unsigned int fullmm;
15};
16
17DECLARE_PER_CPU(struct mmu_gather, mmu_gathers);
18
19static inline struct mmu_gather *
20tlb_gather_mmu(struct mm_struct *mm, unsigned int full_mm_flush)
21{
22 struct mmu_gather *tlb = &get_cpu_var(mmu_gathers);
23
24 tlb->mm = mm;
25 tlb->need_flush = 0;
26 tlb->fullmm = full_mm_flush;
27
28 return tlb;
29}
30
31static inline void
32tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end)
33{
34 if (tlb->need_flush)
35 flush_tlb_mm(tlb->mm);
36
37 /* keep the page table cache within bounds */
38 check_pgt_cache();
39
40 put_cpu_var(mmu_gathers);
41}
42
43#define tlb_remove_tlb_entry(tlb,ptep,address) do { } while (0)
44//#define tlb_start_vma(tlb,vma) do { } while (0)
45//FIXME - ARM32 uses this now that things changed in the kernel. seems like it may be pointless on arm26, however to get things compiling...
46#define tlb_start_vma(tlb,vma) \
47 do { \
48 if (!tlb->fullmm) \
49 flush_cache_range(vma, vma->vm_start, vma->vm_end); \
50 } while (0)
51#define tlb_end_vma(tlb,vma) do { } while (0)
52
53static inline void
54tlb_remove_page(struct mmu_gather *tlb, struct page *page)
55{
56 tlb->need_flush = 1;
57 free_page_and_swap_cache(page);
58}
59
60#define pte_free_tlb(tlb,ptep) pte_free(ptep)
61#define pmd_free_tlb(tlb,pmdp) pmd_free(pmdp)
62
63#endif
diff --git a/include/asm-arm26/tlbflush.h b/include/asm-arm26/tlbflush.h
deleted file mode 100644
index f79c1cbf4f69..000000000000
--- a/include/asm-arm26/tlbflush.h
+++ /dev/null
@@ -1,70 +0,0 @@
1#ifndef __ASMARM_TLBFLUSH_H
2#define __ASMARM_TLBFLUSH_H
3
4/*
5 * TLB flushing:
6 *
7 * - flush_tlb_all() flushes all processes TLBs
8 * - flush_tlb_mm(mm) flushes the specified mm context TLB's
9 * - flush_tlb_page(vma, vmaddr) flushes one page
10 * - flush_tlb_range(vma, start, end) flushes a range of pages
11 */
12
13#define flush_tlb_all() memc_update_all()
14#define flush_tlb_mm(mm) memc_update_mm(mm)
15#define flush_tlb_page(vma, vmaddr) do { printk("flush_tlb_page\n");} while (0) // IS THIS RIGHT?
16#define flush_tlb_range(vma,start,end) \
17 do { memc_update_mm(vma->vm_mm); (void)(start); (void)(end); } while (0)
18#define flush_tlb_pgtables(mm,start,end) do { printk("flush_tlb_pgtables\n");} while (0)
19#define flush_tlb_kernel_range(s,e) do { printk("flush_tlb_range\n");} while (0)
20
21/*
22 * The following handle the weird MEMC chip
23 */
24static inline void memc_update_all(void)
25{
26 struct task_struct *p;
27 cpu_memc_update_all(init_mm.pgd);
28 for_each_process(p) {
29 if (!p->mm)
30 continue;
31 cpu_memc_update_all(p->mm->pgd);
32 }
33 processor._set_pgd(current->active_mm->pgd);
34}
35
36static inline void memc_update_mm(struct mm_struct *mm)
37{
38 cpu_memc_update_all(mm->pgd);
39
40 if (mm == current->active_mm)
41 processor._set_pgd(mm->pgd);
42}
43
44static inline void
45memc_clear(struct mm_struct *mm, struct page *page)
46{
47 cpu_memc_update_entry(mm->pgd, (unsigned long) page_address(page), 0);
48
49 if (mm == current->active_mm)
50 processor._set_pgd(mm->pgd);
51}
52
53static inline void
54memc_update_addr(struct mm_struct *mm, pte_t pte, unsigned long vaddr)
55{
56 cpu_memc_update_entry(mm->pgd, pte_val(pte), vaddr);
57
58 if (mm == current->active_mm)
59 processor._set_pgd(mm->pgd);
60}
61
62static inline void
63update_mmu_cache(struct vm_area_struct *vma, unsigned long addr, pte_t pte)
64{
65 struct mm_struct *mm = vma->vm_mm;
66printk("update_mmu_cache\n");
67 memc_update_addr(mm, pte, addr);
68}
69
70#endif
diff --git a/include/asm-arm26/topology.h b/include/asm-arm26/topology.h
deleted file mode 100644
index accbd7cad9b5..000000000000
--- a/include/asm-arm26/topology.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef _ASM_ARM_TOPOLOGY_H
2#define _ASM_ARM_TOPOLOGY_H
3
4#include <asm-generic/topology.h>
5
6#endif /* _ASM_ARM_TOPOLOGY_H */
diff --git a/include/asm-arm26/types.h b/include/asm-arm26/types.h
deleted file mode 100644
index 81bd357ada02..000000000000
--- a/include/asm-arm26/types.h
+++ /dev/null
@@ -1,59 +0,0 @@
1#ifndef __ASM_ARM_TYPES_H
2#define __ASM_ARM_TYPES_H
3
4#ifndef __ASSEMBLY__
5
6typedef unsigned short umode_t;
7
8/*
9 * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
10 * header files exported to user space
11 */
12
13typedef __signed__ char __s8;
14typedef unsigned char __u8;
15
16typedef __signed__ short __s16;
17typedef unsigned short __u16;
18
19typedef __signed__ int __s32;
20typedef unsigned int __u32;
21
22#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
23typedef __signed__ long long __s64;
24typedef unsigned long long __u64;
25#endif
26
27#endif /* __ASSEMBLY__ */
28
29/*
30 * These aren't exported outside the kernel to avoid name space clashes
31 */
32#ifdef __KERNEL__
33
34#define BITS_PER_LONG 32
35
36#ifndef __ASSEMBLY__
37
38typedef signed char s8;
39typedef unsigned char u8;
40
41typedef signed short s16;
42typedef unsigned short u16;
43
44typedef signed int s32;
45typedef unsigned int u32;
46
47typedef signed long long s64;
48typedef unsigned long long u64;
49
50/* Dma addresses are 32-bits wide. */
51
52typedef u32 dma_addr_t;
53typedef u32 dma64_addr_t;
54
55#endif /* __ASSEMBLY__ */
56
57#endif /* __KERNEL__ */
58
59#endif
diff --git a/include/asm-arm26/uaccess-asm.h b/include/asm-arm26/uaccess-asm.h
deleted file mode 100644
index ade76ec02995..000000000000
--- a/include/asm-arm26/uaccess-asm.h
+++ /dev/null
@@ -1,153 +0,0 @@
1/*
2 * linux/include/asm-arm/proc-armo/uaccess.h
3 *
4 * Copyright (C) 1996 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11/*
12 * The fs functions are implemented on the ARM2 and ARM3 architectures
13 * manually.
14 * Use *_user functions to access user memory with faulting behaving
15 * as though the user is accessing the memory.
16 * Use set_fs(get_ds()) and then the *_user functions to allow them to
17 * access kernel memory.
18 */
19
20/*
21 * These are the values used to represent the user `fs' and the kernel `ds'
22 * FIXME - the KERNEL_DS should end at 0x03000000 but we want to access ROM at
23 * 0x03400000. ideally we want to forbid access to the IO space inbetween.
24 */
25#define KERNEL_DS 0x03FFFFFF
26#define USER_DS 0x02000000
27
28extern uaccess_t uaccess_user, uaccess_kernel;
29
30static inline void set_fs (mm_segment_t fs)
31{
32 current_thread_info()->addr_limit = fs;
33 current->thread.uaccess = (fs == USER_DS ? &uaccess_user : &uaccess_kernel);
34}
35
36#define __range_ok(addr,size) ({ \
37 unsigned long flag, roksum; \
38 __asm__ __volatile__("subs %1, %0, %3; cmpcs %1, %2; movcs %0, #0" \
39 : "=&r" (flag), "=&r" (roksum) \
40 : "r" (addr), "Ir" (size), "0" (current_thread_info()->addr_limit) \
41 : "cc"); \
42 flag; })
43
44#define __addr_ok(addr) ({ \
45 unsigned long flag; \
46 __asm__ __volatile__("cmp %2, %0; movlo %0, #0" \
47 : "=&r" (flag) \
48 : "0" (current_thread_info()->addr_limit), "r" (addr) \
49 : "cc"); \
50 (flag == 0); })
51
52#define __put_user_asm_byte(x,addr,err) \
53 __asm__ __volatile__( \
54 " mov r0, %1\n" \
55 " mov r1, %2\n" \
56 " mov r2, %0\n" \
57 " mov lr, pc\n" \
58 " mov pc, %3\n" \
59 " mov %0, r2\n" \
60 : "=r" (err) \
61 : "r" (x), "r" (addr), "r" (current->thread.uaccess->put_byte), \
62 "0" (err) \
63 : "r0", "r1", "r2", "lr")
64
65#define __put_user_asm_half(x,addr,err) \
66 __asm__ __volatile__( \
67 " mov r0, %1\n" \
68 " mov r1, %2\n" \
69 " mov r2, %0\n" \
70 " mov lr, pc\n" \
71 " mov pc, %3\n" \
72 " mov %0, r2\n" \
73 : "=r" (err) \
74 : "r" (x), "r" (addr), "r" (current->thread.uaccess->put_half), \
75 "0" (err) \
76 : "r0", "r1", "r2", "lr")
77
78#define __put_user_asm_word(x,addr,err) \
79 __asm__ __volatile__( \
80 " mov r0, %1\n" \
81 " mov r1, %2\n" \
82 " mov r2, %0\n" \
83 " mov lr, pc\n" \
84 " mov pc, %3\n" \
85 " mov %0, r2\n" \
86 : "=r" (err) \
87 : "r" (x), "r" (addr), "r" (current->thread.uaccess->put_word), \
88 "0" (err) \
89 : "r0", "r1", "r2", "lr")
90
91#define __put_user_asm_dword(x,addr,err) \
92 __asm__ __volatile__( \
93 " mov r0, %1\n" \
94 " mov r1, %2\n" \
95 " mov r2, %0\n" \
96 " mov lr, pc\n" \
97 " mov pc, %3\n" \
98 " mov %0, r2\n" \
99 : "=r" (err) \
100 : "r" (x), "r" (addr), "r" (current->thread.uaccess->put_dword), \
101 "0" (err) \
102 : "r0", "r1", "r2", "lr")
103
104#define __get_user_asm_byte(x,addr,err) \
105 __asm__ __volatile__( \
106 " mov r0, %2\n" \
107 " mov r1, %0\n" \
108 " mov lr, pc\n" \
109 " mov pc, %3\n" \
110 " mov %0, r1\n" \
111 " mov %1, r0\n" \
112 : "=r" (err), "=r" (x) \
113 : "r" (addr), "r" (current->thread.uaccess->get_byte), "0" (err) \
114 : "r0", "r1", "r2", "lr")
115
116#define __get_user_asm_half(x,addr,err) \
117 __asm__ __volatile__( \
118 " mov r0, %2\n" \
119 " mov r1, %0\n" \
120 " mov lr, pc\n" \
121 " mov pc, %3\n" \
122 " mov %0, r1\n" \
123 " mov %1, r0\n" \
124 : "=r" (err), "=r" (x) \
125 : "r" (addr), "r" (current->thread.uaccess->get_half), "0" (err) \
126 : "r0", "r1", "r2", "lr")
127
128#define __get_user_asm_word(x,addr,err) \
129 __asm__ __volatile__( \
130 " mov r0, %2\n" \
131 " mov r1, %0\n" \
132 " mov lr, pc\n" \
133 " mov pc, %3\n" \
134 " mov %0, r1\n" \
135 " mov %1, r0\n" \
136 : "=r" (err), "=r" (x) \
137 : "r" (addr), "r" (current->thread.uaccess->get_word), "0" (err) \
138 : "r0", "r1", "r2", "lr")
139
140#define __do_copy_from_user(to,from,n) \
141 (n) = current->thread.uaccess->copy_from_user((to),(from),(n))
142
143#define __do_copy_to_user(to,from,n) \
144 (n) = current->thread.uaccess->copy_to_user((to),(from),(n))
145
146#define __do_clear_user(addr,sz) \
147 (sz) = current->thread.uaccess->clear_user((addr),(sz))
148
149#define __do_strncpy_from_user(dst,src,count,res) \
150 (res) = current->thread.uaccess->strncpy_from_user(dst,src,count)
151
152#define __do_strnlen_user(s,n,res) \
153 (res) = current->thread.uaccess->strnlen_user(s,n)
diff --git a/include/asm-arm26/uaccess.h b/include/asm-arm26/uaccess.h
deleted file mode 100644
index d64ed84cb2d3..000000000000
--- a/include/asm-arm26/uaccess.h
+++ /dev/null
@@ -1,293 +0,0 @@
1#ifndef _ASMARM_UACCESS_H
2#define _ASMARM_UACCESS_H
3
4/*
5 * User space memory access functions
6 */
7#include <linux/sched.h>
8#include <asm/errno.h>
9
10#define VERIFY_READ 0
11#define VERIFY_WRITE 1
12
13/*
14 * The exception table consists of pairs of addresses: the first is the
15 * address of an instruction that is allowed to fault, and the second is
16 * the address at which the program should continue. No registers are
17 * modified, so it is entirely up to the continuation code to figure out
18 * what to do.
19 *
20 * All the routines below use bits of fixup code that are out of line
21 * with the main instruction path. This means when everything is well,
22 * we don't even have to jump over them. Further, they do not intrude
23 * on our cache or tlb entries.
24 */
25
26struct exception_table_entry
27{
28 unsigned long insn, fixup;
29};
30
31/* Returns 0 if exception not found and fixup otherwise. */
32extern unsigned long search_exception_table(unsigned long);
33extern int fixup_exception(struct pt_regs *regs);
34
35#define get_ds() (KERNEL_DS)
36#define get_fs() (current_thread_info()->addr_limit)
37#define segment_eq(a,b) ((a) == (b))
38
39#include <asm/uaccess-asm.h>
40
41#define access_ok(type,addr,size) (__range_ok(addr,size) == 0)
42
43/*
44 * Single-value transfer routines. They automatically use the right
45 * size if we just have the right pointer type. Note that the functions
46 * which read from user space (*get_*) need to take care not to leak
47 * kernel data even if the calling code is buggy and fails to check
48 * the return value. This means zeroing out the destination variable
49 * or buffer on error. Normally this is done out of line by the
50 * fixup code, but there are a few places where it intrudes on the
51 * main code path. When we only write to user space, there is no
52 * problem.
53 *
54 * The "__xxx" versions of the user access functions do not verify the
55 * address space - it must have been done previously with a separate
56 * "access_ok()" call.
57 *
58 * The "xxx_error" versions set the third argument to EFAULT if an
59 * error occurs, and leave it unchanged on success. Note that these
60 * versions are void (ie, don't return a value as such).
61 */
62
63extern int __get_user_1(void *);
64extern int __get_user_2(void *);
65extern int __get_user_4(void *);
66extern int __get_user_8(void *);
67extern int __get_user_bad(void);
68
69#define __get_user_x(__r1,__p,__e,__s,__i...) \
70 __asm__ __volatile__ ("bl __get_user_" #__s \
71 : "=&r" (__e), "=r" (__r1) \
72 : "0" (__p) \
73 : __i)
74
75#define get_user(x,p) \
76 ({ \
77 register const typeof(*(p)) *__p asm("r0") = (p); \
78 register typeof(*(p)) __r1 asm("r1"); \
79 register int __e asm("r0"); \
80 switch (sizeof(*(p))) { \
81 case 1: \
82 __get_user_x(__r1, __p, __e, 1, "lr"); \
83 break; \
84 case 2: \
85 __get_user_x(__r1, __p, __e, 2, "r2", "lr"); \
86 break; \
87 case 4: \
88 __get_user_x(__r1, __p, __e, 4, "lr"); \
89 break; \
90 case 8: \
91 __get_user_x(__r1, __p, __e, 8, "lr"); \
92 break; \
93 default: __e = __get_user_bad(); break; \
94 } \
95 x = __r1; \
96 __e; \
97 })
98
99
100#define __get_user(x,ptr) \
101({ \
102 long __gu_err = 0; \
103 __get_user_err((x),(ptr),__gu_err); \
104 __gu_err; \
105})
106
107#define __get_user_error(x,ptr,err) \
108({ \
109 __get_user_err((x),(ptr),err); \
110 (void) 0; \
111})
112
113#define __get_user_err(x,ptr,err) \
114do { \
115 unsigned long __gu_addr = (unsigned long)(ptr); \
116 unsigned long __gu_val; \
117 switch (sizeof(*(ptr))) { \
118 case 1: __get_user_asm_byte(__gu_val,__gu_addr,err); break; \
119 case 2: __get_user_asm_half(__gu_val,__gu_addr,err); break; \
120 case 4: __get_user_asm_word(__gu_val,__gu_addr,err); break; \
121 default: (__gu_val) = __get_user_bad(); \
122 } \
123 (x) = (__typeof__(*(ptr)))__gu_val; \
124} while (0)
125
126extern int __put_user_1(void *, unsigned int);
127extern int __put_user_2(void *, unsigned int);
128extern int __put_user_4(void *, unsigned int);
129extern int __put_user_8(void *, unsigned long long);
130extern int __put_user_bad(void);
131
132#define __put_user_x(__r1,__p,__e,__s) \
133 __asm__ __volatile__ ( \
134 __asmeq("%0", "r0") __asmeq("%2", "r1") \
135 "bl __put_user_" #__s \
136 : "=&r" (__e) \
137 : "0" (__p), "r" (__r1) \
138 : "ip", "lr", "cc")
139
140#define put_user(x,p) \
141 ({ \
142 register const typeof(*(p)) __r1 asm("r1") = (x); \
143 register const typeof(*(p)) *__p asm("r0") = (p); \
144 register int __e asm("r0"); \
145 switch (sizeof(*(__p))) { \
146 case 1: \
147 __put_user_x(__r1, __p, __e, 1); \
148 break; \
149 case 2: \
150 __put_user_x(__r1, __p, __e, 2); \
151 break; \
152 case 4: \
153 __put_user_x(__r1, __p, __e, 4); \
154 break; \
155 case 8: \
156 __put_user_x(__r1, __p, __e, 8); \
157 break; \
158 default: __e = __put_user_bad(); break; \
159 } \
160 __e; \
161 })
162
163#if 0
164/********************* OLD METHOD *******************/
165#define __put_user_x(__r1,__p,__e,__s,__i...) \
166 __asm__ __volatile__ ("bl __put_user_" #__s \
167 : "=&r" (__e) \
168 : "0" (__p), "r" (__r1) \
169 : __i)
170
171#define put_user(x,p) \
172 ({ \
173 register const typeof(*(p)) __r1 asm("r1") = (x); \
174 register const typeof(*(p)) *__p asm("r0") = (p); \
175 register int __e asm("r0"); \
176 switch (sizeof(*(p))) { \
177 case 1: \
178 __put_user_x(__r1, __p, __e, 1, "r2", "lr"); \
179 break; \
180 case 2: \
181 __put_user_x(__r1, __p, __e, 2, "r2", "lr"); \
182 break; \
183 case 4: \
184 __put_user_x(__r1, __p, __e, 4, "r2", "lr"); \
185 break; \
186 case 8: \
187 __put_user_x(__r1, __p, __e, 8, "r2", "ip", "lr"); \
188 break; \
189 default: __e = __put_user_bad(); break; \
190 } \
191 __e; \
192 })
193/*************************************************/
194#endif
195
196#define __put_user(x,ptr) \
197({ \
198 long __pu_err = 0; \
199 __put_user_err((x),(ptr),__pu_err); \
200 __pu_err; \
201})
202
203#define __put_user_error(x,ptr,err) \
204({ \
205 __put_user_err((x),(ptr),err); \
206 (void) 0; \
207})
208
209#define __put_user_err(x,ptr,err) \
210do { \
211 unsigned long __pu_addr = (unsigned long)(ptr); \
212 __typeof__(*(ptr)) __pu_val = (x); \
213 switch (sizeof(*(ptr))) { \
214 case 1: __put_user_asm_byte(__pu_val,__pu_addr,err); break; \
215 case 2: __put_user_asm_half(__pu_val,__pu_addr,err); break; \
216 case 4: __put_user_asm_word(__pu_val,__pu_addr,err); break; \
217 case 8: __put_user_asm_dword(__pu_val,__pu_addr,err); break; \
218 default: __put_user_bad(); \
219 } \
220} while (0)
221
222static __inline__ unsigned long copy_from_user(void *to, const void *from, unsigned long n)
223{
224 if (access_ok(VERIFY_READ, from, n))
225 __do_copy_from_user(to, from, n);
226 else /* security hole - plug it */
227 memzero(to, n);
228 return n;
229}
230
231static __inline__ unsigned long __copy_from_user(void *to, const void *from, unsigned long n)
232{
233 __do_copy_from_user(to, from, n);
234 return n;
235}
236
237static __inline__ unsigned long copy_to_user(void *to, const void *from, unsigned long n)
238{
239 if (access_ok(VERIFY_WRITE, to, n))
240 __do_copy_to_user(to, from, n);
241 return n;
242}
243
244static __inline__ unsigned long __copy_to_user(void *to, const void *from, unsigned long n)
245{
246 __do_copy_to_user(to, from, n);
247 return n;
248}
249
250#define __copy_to_user_inatomic __copy_to_user
251#define __copy_from_user_inatomic __copy_from_user
252
253static __inline__ unsigned long clear_user (void *to, unsigned long n)
254{
255 if (access_ok(VERIFY_WRITE, to, n))
256 __do_clear_user(to, n);
257 return n;
258}
259
260static __inline__ unsigned long __clear_user (void *to, unsigned long n)
261{
262 __do_clear_user(to, n);
263 return n;
264}
265
266static __inline__ long strncpy_from_user (char *dst, const char *src, long count)
267{
268 long res = -EFAULT;
269 if (access_ok(VERIFY_READ, src, 1))
270 __do_strncpy_from_user(dst, src, count, res);
271 return res;
272}
273
274static __inline__ long __strncpy_from_user (char *dst, const char *src, long count)
275{
276 long res;
277 __do_strncpy_from_user(dst, src, count, res);
278 return res;
279}
280
281#define strlen_user(s) strnlen_user(s, ~0UL >> 1)
282
283static inline long strnlen_user(const char *s, long n)
284{
285 unsigned long res = 0;
286
287 if (__addr_ok(s))
288 __do_strnlen_user(s, n, res);
289
290 return res;
291}
292
293#endif /* _ASMARM_UACCESS_H */
diff --git a/include/asm-arm26/ucontext.h b/include/asm-arm26/ucontext.h
deleted file mode 100644
index f853130137cc..000000000000
--- a/include/asm-arm26/ucontext.h
+++ /dev/null
@@ -1,12 +0,0 @@
1#ifndef _ASMARM_UCONTEXT_H
2#define _ASMARM_UCONTEXT_H
3
4struct ucontext {
5 unsigned long uc_flags;
6 struct ucontext *uc_link;
7 stack_t uc_stack;
8 struct sigcontext uc_mcontext;
9 sigset_t uc_sigmask; /* mask last for extensibility */
10};
11
12#endif /* !_ASMARM_UCONTEXT_H */
diff --git a/include/asm-arm26/unaligned.h b/include/asm-arm26/unaligned.h
deleted file mode 100644
index d992782089fd..000000000000
--- a/include/asm-arm26/unaligned.h
+++ /dev/null
@@ -1,118 +0,0 @@
1#ifndef __ASM_ARM_UNALIGNED_H
2#define __ASM_ARM_UNALIGNED_H
3
4#include <asm/types.h>
5
6extern int __bug_unaligned_x(void *ptr);
7
8/*
9 * What is the most efficient way of loading/storing an unaligned value?
10 *
11 * That is the subject of this file. Efficiency here is defined as
12 * minimum code size with minimum register usage for the common cases.
13 * It is currently not believed that long longs are common, so we
14 * trade efficiency for the chars, shorts and longs against the long
15 * longs.
16 *
17 * Current stats with gcc 2.7.2.2 for these functions:
18 *
19 * ptrsize get: code regs put: code regs
20 * 1 1 1 1 2
21 * 2 3 2 3 2
22 * 4 7 3 7 3
23 * 8 20 6 16 6
24 *
25 * gcc 2.95.1 seems to code differently:
26 *
27 * ptrsize get: code regs put: code regs
28 * 1 1 1 1 2
29 * 2 3 2 3 2
30 * 4 7 4 7 4
31 * 8 19 8 15 6
32 *
33 * which may or may not be more efficient (depending upon whether
34 * you can afford the extra registers). Hopefully the gcc 2.95
35 * is inteligent enough to decide if it is better to use the
36 * extra register, but evidence so far seems to suggest otherwise.
37 *
38 * Unfortunately, gcc is not able to optimise the high word
39 * out of long long >> 32, or the low word from long long << 32
40 */
41
42#define __get_unaligned_2_le(__p) \
43 (__p[0] | __p[1] << 8)
44
45#define __get_unaligned_4_le(__p) \
46 (__p[0] | __p[1] << 8 | __p[2] << 16 | __p[3] << 24)
47
48#define __get_unaligned_le(ptr) \
49 ({ \
50 __typeof__(*(ptr)) __v; \
51 __u8 *__p = (__u8 *)(ptr); \
52 switch (sizeof(*(ptr))) { \
53 case 1: __v = *(ptr); break; \
54 case 2: __v = __get_unaligned_2_le(__p); break; \
55 case 4: __v = __get_unaligned_4_le(__p); break; \
56 case 8: { \
57 unsigned int __v1, __v2; \
58 __v2 = __get_unaligned_4_le((__p+4)); \
59 __v1 = __get_unaligned_4_le(__p); \
60 __v = ((unsigned long long)__v2 << 32 | __v1); \
61 } \
62 break; \
63 default: __v = __bug_unaligned_x(__p); break; \
64 } \
65 __v; \
66 })
67
68static inline void __put_unaligned_2_le(__u32 __v, register __u8 *__p)
69{
70 *__p++ = __v;
71 *__p++ = __v >> 8;
72}
73
74static inline void __put_unaligned_4_le(__u32 __v, register __u8 *__p)
75{
76 __put_unaligned_2_le(__v >> 16, __p + 2);
77 __put_unaligned_2_le(__v, __p);
78}
79
80static inline void __put_unaligned_8_le(const unsigned long long __v, register __u8 *__p)
81{
82 /*
83 * tradeoff: 8 bytes of stack for all unaligned puts (2
84 * instructions), or an extra register in the long long
85 * case - go for the extra register.
86 */
87 __put_unaligned_4_le(__v >> 32, __p+4);
88 __put_unaligned_4_le(__v, __p);
89}
90
91/*
92 * Try to store an unaligned value as efficiently as possible.
93 */
94#define __put_unaligned_le(val,ptr) \
95 ({ \
96 switch (sizeof(*(ptr))) { \
97 case 1: \
98 *(ptr) = (val); \
99 break; \
100 case 2: __put_unaligned_2_le((val),(__u8 *)(ptr)); \
101 break; \
102 case 4: __put_unaligned_4_le((val),(__u8 *)(ptr)); \
103 break; \
104 case 8: __put_unaligned_8_le((val),(__u8 *)(ptr)); \
105 break; \
106 default: __bug_unaligned_x(ptr); \
107 break; \
108 } \
109 (void) 0; \
110 })
111
112/*
113 * Select endianness
114 */
115#define get_unaligned __get_unaligned_le
116#define put_unaligned __put_unaligned_le
117
118#endif
diff --git a/include/asm-arm26/uncompress.h b/include/asm-arm26/uncompress.h
deleted file mode 100644
index df2cba816a4e..000000000000
--- a/include/asm-arm26/uncompress.h
+++ /dev/null
@@ -1,111 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-arc/uncompress.h
3 *
4 * Copyright (C) 1996 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#define VIDMEM ((char *)0x02000000)
11
12int video_num_columns, video_num_lines, video_size_row;
13int white, bytes_per_char_h;
14extern unsigned long con_charconvtable[256];
15
16struct param_struct {
17 unsigned long page_size;
18 unsigned long nr_pages;
19 unsigned long ramdisk_size;
20 unsigned long mountrootrdonly;
21 unsigned long rootdev;
22 unsigned long video_num_cols;
23 unsigned long video_num_rows;
24 unsigned long video_x;
25 unsigned long video_y;
26 unsigned long memc_control_reg;
27 unsigned char sounddefault;
28 unsigned char adfsdrives;
29 unsigned char bytes_per_char_h;
30 unsigned char bytes_per_char_v;
31 unsigned long unused[256/4-11];
32};
33
34static struct param_struct *params = (struct param_struct *)0x0207c000;
35
36/*
37 * This does not append a newline
38 */
39static void puts(const char *s)
40{
41 extern void ll_write_char(char *, unsigned long);
42 int x,y;
43 unsigned char c;
44 char *ptr;
45
46 x = params->video_x;
47 y = params->video_y;
48
49 while ( ( c = *(unsigned char *)s++ ) != '\0' ) {
50 if ( c == '\n' ) {
51 x = 0;
52 if ( ++y >= video_num_lines ) {
53 y--;
54 }
55 } else {
56 ptr = VIDMEM + ((y*video_num_columns*params->bytes_per_char_v+x)*bytes_per_char_h);
57 ll_write_char(ptr, c|(white<<16));
58 if ( ++x >= video_num_columns ) {
59 x = 0;
60 if ( ++y >= video_num_lines ) {
61 y--;
62 }
63 }
64 }
65 }
66
67 params->video_x = x;
68 params->video_y = y;
69}
70
71static void error(char *x);
72
73/*
74 * Setup for decompression
75 */
76static void arch_decomp_setup(void)
77{
78 int i;
79
80 video_num_lines = params->video_num_rows;
81 video_num_columns = params->video_num_cols;
82 bytes_per_char_h = params->bytes_per_char_h;
83 video_size_row = video_num_columns * bytes_per_char_h;
84 if (bytes_per_char_h == 4)
85 for (i = 0; i < 256; i++)
86 con_charconvtable[i] =
87 (i & 128 ? 1 << 0 : 0) |
88 (i & 64 ? 1 << 4 : 0) |
89 (i & 32 ? 1 << 8 : 0) |
90 (i & 16 ? 1 << 12 : 0) |
91 (i & 8 ? 1 << 16 : 0) |
92 (i & 4 ? 1 << 20 : 0) |
93 (i & 2 ? 1 << 24 : 0) |
94 (i & 1 ? 1 << 28 : 0);
95 else
96 for (i = 0; i < 16; i++)
97 con_charconvtable[i] =
98 (i & 8 ? 1 << 0 : 0) |
99 (i & 4 ? 1 << 8 : 0) |
100 (i & 2 ? 1 << 16 : 0) |
101 (i & 1 ? 1 << 24 : 0);
102
103 white = bytes_per_char_h == 8 ? 0xfc : 7;
104
105 if (params->nr_pages * params->page_size < 4096*1024) error("<4M of mem\n");
106}
107
108/*
109 * nothing to do
110 */
111#define arch_decomp_wdog()
diff --git a/include/asm-arm26/unistd.h b/include/asm-arm26/unistd.h
deleted file mode 100644
index 4c3b919177e5..000000000000
--- a/include/asm-arm26/unistd.h
+++ /dev/null
@@ -1,343 +0,0 @@
1/*
2 * linux/include/asm-arm/unistd.h
3 *
4 * Copyright (C) 2001-2003 Russell King
5 * Modified 25/11/04 Ian Molton for arm26.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * Please forward _all_ changes to this file to spyro@f2s.com
12 * no matter what the change is. Thanks!
13 */
14#ifndef __ASM_ARM_UNISTD_H
15#define __ASM_ARM_UNISTD_H
16
17#define __NR_SYSCALL_BASE 0x900000
18
19/*
20 * This file contains the system call numbers.
21 */
22
23#define __NR_restart_syscall (__NR_SYSCALL_BASE+ 0)
24#define __NR_exit (__NR_SYSCALL_BASE+ 1)
25#define __NR_fork (__NR_SYSCALL_BASE+ 2)
26#define __NR_read (__NR_SYSCALL_BASE+ 3)
27#define __NR_write (__NR_SYSCALL_BASE+ 4)
28#define __NR_open (__NR_SYSCALL_BASE+ 5)
29#define __NR_close (__NR_SYSCALL_BASE+ 6)
30 /* 7 was sys_waitpid */
31#define __NR_creat (__NR_SYSCALL_BASE+ 8)
32#define __NR_link (__NR_SYSCALL_BASE+ 9)
33#define __NR_unlink (__NR_SYSCALL_BASE+ 10)
34#define __NR_execve (__NR_SYSCALL_BASE+ 11)
35#define __NR_chdir (__NR_SYSCALL_BASE+ 12)
36#define __NR_time (__NR_SYSCALL_BASE+ 13)
37#define __NR_mknod (__NR_SYSCALL_BASE+ 14)
38#define __NR_chmod (__NR_SYSCALL_BASE+ 15)
39#define __NR_lchown (__NR_SYSCALL_BASE+ 16)
40 /* 17 was sys_break */
41 /* 18 was sys_stat */
42#define __NR_lseek (__NR_SYSCALL_BASE+ 19)
43#define __NR_getpid (__NR_SYSCALL_BASE+ 20)
44#define __NR_mount (__NR_SYSCALL_BASE+ 21)
45#define __NR_umount (__NR_SYSCALL_BASE+ 22)
46#define __NR_setuid (__NR_SYSCALL_BASE+ 23)
47#define __NR_getuid (__NR_SYSCALL_BASE+ 24)
48#define __NR_stime (__NR_SYSCALL_BASE+ 25)
49#define __NR_ptrace (__NR_SYSCALL_BASE+ 26)
50#define __NR_alarm (__NR_SYSCALL_BASE+ 27)
51 /* 28 was sys_fstat */
52#define __NR_pause (__NR_SYSCALL_BASE+ 29)
53#define __NR_utime (__NR_SYSCALL_BASE+ 30)
54 /* 31 was sys_stty */
55 /* 32 was sys_gtty */
56#define __NR_access (__NR_SYSCALL_BASE+ 33)
57#define __NR_nice (__NR_SYSCALL_BASE+ 34)
58 /* 35 was sys_ftime */
59#define __NR_sync (__NR_SYSCALL_BASE+ 36)
60#define __NR_kill (__NR_SYSCALL_BASE+ 37)
61#define __NR_rename (__NR_SYSCALL_BASE+ 38)
62#define __NR_mkdir (__NR_SYSCALL_BASE+ 39)
63#define __NR_rmdir (__NR_SYSCALL_BASE+ 40)
64#define __NR_dup (__NR_SYSCALL_BASE+ 41)
65#define __NR_pipe (__NR_SYSCALL_BASE+ 42)
66#define __NR_times (__NR_SYSCALL_BASE+ 43)
67 /* 44 was sys_prof */
68#define __NR_brk (__NR_SYSCALL_BASE+ 45)
69#define __NR_setgid (__NR_SYSCALL_BASE+ 46)
70#define __NR_getgid (__NR_SYSCALL_BASE+ 47)
71 /* 48 was sys_signal */
72#define __NR_geteuid (__NR_SYSCALL_BASE+ 49)
73#define __NR_getegid (__NR_SYSCALL_BASE+ 50)
74#define __NR_acct (__NR_SYSCALL_BASE+ 51)
75#define __NR_umount2 (__NR_SYSCALL_BASE+ 52)
76 /* 53 was sys_lock */
77#define __NR_ioctl (__NR_SYSCALL_BASE+ 54)
78#define __NR_fcntl (__NR_SYSCALL_BASE+ 55)
79 /* 56 was sys_mpx */
80#define __NR_setpgid (__NR_SYSCALL_BASE+ 57)
81 /* 58 was sys_ulimit */
82 /* 59 was sys_olduname */
83#define __NR_umask (__NR_SYSCALL_BASE+ 60)
84#define __NR_chroot (__NR_SYSCALL_BASE+ 61)
85#define __NR_ustat (__NR_SYSCALL_BASE+ 62)
86#define __NR_dup2 (__NR_SYSCALL_BASE+ 63)
87#define __NR_getppid (__NR_SYSCALL_BASE+ 64)
88#define __NR_getpgrp (__NR_SYSCALL_BASE+ 65)
89#define __NR_setsid (__NR_SYSCALL_BASE+ 66)
90#define __NR_sigaction (__NR_SYSCALL_BASE+ 67)
91 /* 68 was sys_sgetmask */
92 /* 69 was sys_ssetmask */
93#define __NR_setreuid (__NR_SYSCALL_BASE+ 70)
94#define __NR_setregid (__NR_SYSCALL_BASE+ 71)
95#define __NR_sigsuspend (__NR_SYSCALL_BASE+ 72)
96#define __NR_sigpending (__NR_SYSCALL_BASE+ 73)
97#define __NR_sethostname (__NR_SYSCALL_BASE+ 74)
98#define __NR_setrlimit (__NR_SYSCALL_BASE+ 75)
99#define __NR_getrlimit (__NR_SYSCALL_BASE+ 76) /* Back compat 2GB limited rlimit */
100#define __NR_getrusage (__NR_SYSCALL_BASE+ 77)
101#define __NR_gettimeofday (__NR_SYSCALL_BASE+ 78)
102#define __NR_settimeofday (__NR_SYSCALL_BASE+ 79)
103#define __NR_getgroups (__NR_SYSCALL_BASE+ 80)
104#define __NR_setgroups (__NR_SYSCALL_BASE+ 81)
105#define __NR_select (__NR_SYSCALL_BASE+ 82)
106#define __NR_symlink (__NR_SYSCALL_BASE+ 83)
107 /* 84 was sys_lstat */
108#define __NR_readlink (__NR_SYSCALL_BASE+ 85)
109#define __NR_uselib (__NR_SYSCALL_BASE+ 86)
110#define __NR_swapon (__NR_SYSCALL_BASE+ 87)
111#define __NR_reboot (__NR_SYSCALL_BASE+ 88)
112#define __NR_readdir (__NR_SYSCALL_BASE+ 89)
113#define __NR_mmap (__NR_SYSCALL_BASE+ 90)
114#define __NR_munmap (__NR_SYSCALL_BASE+ 91)
115#define __NR_truncate (__NR_SYSCALL_BASE+ 92)
116#define __NR_ftruncate (__NR_SYSCALL_BASE+ 93)
117#define __NR_fchmod (__NR_SYSCALL_BASE+ 94)
118#define __NR_fchown (__NR_SYSCALL_BASE+ 95)
119#define __NR_getpriority (__NR_SYSCALL_BASE+ 96)
120#define __NR_setpriority (__NR_SYSCALL_BASE+ 97)
121 /* 98 was sys_profil */
122#define __NR_statfs (__NR_SYSCALL_BASE+ 99)
123#define __NR_fstatfs (__NR_SYSCALL_BASE+100)
124 /* 101 was sys_ioperm */
125#define __NR_socketcall (__NR_SYSCALL_BASE+102)
126#define __NR_syslog (__NR_SYSCALL_BASE+103)
127#define __NR_setitimer (__NR_SYSCALL_BASE+104)
128#define __NR_getitimer (__NR_SYSCALL_BASE+105)
129#define __NR_stat (__NR_SYSCALL_BASE+106)
130#define __NR_lstat (__NR_SYSCALL_BASE+107)
131#define __NR_fstat (__NR_SYSCALL_BASE+108)
132 /* 109 was sys_uname */
133 /* 110 was sys_iopl */
134#define __NR_vhangup (__NR_SYSCALL_BASE+111)
135 /* 112 was sys_idle */
136#define __NR_syscall (__NR_SYSCALL_BASE+113) /* syscall to call a syscall! */
137#define __NR_wait4 (__NR_SYSCALL_BASE+114)
138#define __NR_swapoff (__NR_SYSCALL_BASE+115)
139#define __NR_sysinfo (__NR_SYSCALL_BASE+116)
140#define __NR_ipc (__NR_SYSCALL_BASE+117)
141#define __NR_fsync (__NR_SYSCALL_BASE+118)
142#define __NR_sigreturn (__NR_SYSCALL_BASE+119)
143#define __NR_clone (__NR_SYSCALL_BASE+120)
144#define __NR_setdomainname (__NR_SYSCALL_BASE+121)
145#define __NR_uname (__NR_SYSCALL_BASE+122)
146 /* 123 was sys_modify_ldt */
147#define __NR_adjtimex (__NR_SYSCALL_BASE+124)
148#define __NR_mprotect (__NR_SYSCALL_BASE+125)
149#define __NR_sigprocmask (__NR_SYSCALL_BASE+126)
150 /* 127 was sys_create_module */
151#define __NR_init_module (__NR_SYSCALL_BASE+128)
152#define __NR_delete_module (__NR_SYSCALL_BASE+129)
153 /* 130 was sys_get_kernel_syms */
154#define __NR_quotactl (__NR_SYSCALL_BASE+131)
155#define __NR_getpgid (__NR_SYSCALL_BASE+132)
156#define __NR_fchdir (__NR_SYSCALL_BASE+133)
157#define __NR_bdflush (__NR_SYSCALL_BASE+134)
158#define __NR_sysfs (__NR_SYSCALL_BASE+135)
159#define __NR_personality (__NR_SYSCALL_BASE+136)
160 /* 137 was sys_afs_syscall */
161#define __NR_setfsuid (__NR_SYSCALL_BASE+138)
162#define __NR_setfsgid (__NR_SYSCALL_BASE+139)
163#define __NR__llseek (__NR_SYSCALL_BASE+140)
164#define __NR_getdents (__NR_SYSCALL_BASE+141)
165#define __NR__newselect (__NR_SYSCALL_BASE+142)
166#define __NR_flock (__NR_SYSCALL_BASE+143)
167#define __NR_msync (__NR_SYSCALL_BASE+144)
168#define __NR_readv (__NR_SYSCALL_BASE+145)
169#define __NR_writev (__NR_SYSCALL_BASE+146)
170#define __NR_getsid (__NR_SYSCALL_BASE+147)
171#define __NR_fdatasync (__NR_SYSCALL_BASE+148)
172#define __NR__sysctl (__NR_SYSCALL_BASE+149)
173#define __NR_mlock (__NR_SYSCALL_BASE+150)
174#define __NR_munlock (__NR_SYSCALL_BASE+151)
175#define __NR_mlockall (__NR_SYSCALL_BASE+152)
176#define __NR_munlockall (__NR_SYSCALL_BASE+153)
177#define __NR_sched_setparam (__NR_SYSCALL_BASE+154)
178#define __NR_sched_getparam (__NR_SYSCALL_BASE+155)
179#define __NR_sched_setscheduler (__NR_SYSCALL_BASE+156)
180#define __NR_sched_getscheduler (__NR_SYSCALL_BASE+157)
181#define __NR_sched_yield (__NR_SYSCALL_BASE+158)
182#define __NR_sched_get_priority_max (__NR_SYSCALL_BASE+159)
183#define __NR_sched_get_priority_min (__NR_SYSCALL_BASE+160)
184#define __NR_sched_rr_get_interval (__NR_SYSCALL_BASE+161)
185#define __NR_nanosleep (__NR_SYSCALL_BASE+162)
186#define __NR_mremap (__NR_SYSCALL_BASE+163)
187#define __NR_setresuid (__NR_SYSCALL_BASE+164)
188#define __NR_getresuid (__NR_SYSCALL_BASE+165)
189 /* 166 was sys_vm86 */
190 /* 167 was sys_query_module */
191#define __NR_poll (__NR_SYSCALL_BASE+168)
192#define __NR_nfsservctl (__NR_SYSCALL_BASE+169)
193#define __NR_setresgid (__NR_SYSCALL_BASE+170)
194#define __NR_getresgid (__NR_SYSCALL_BASE+171)
195#define __NR_prctl (__NR_SYSCALL_BASE+172)
196#define __NR_rt_sigreturn (__NR_SYSCALL_BASE+173)
197#define __NR_rt_sigaction (__NR_SYSCALL_BASE+174)
198#define __NR_rt_sigprocmask (__NR_SYSCALL_BASE+175)
199#define __NR_rt_sigpending (__NR_SYSCALL_BASE+176)
200#define __NR_rt_sigtimedwait (__NR_SYSCALL_BASE+177)
201#define __NR_rt_sigqueueinfo (__NR_SYSCALL_BASE+178)
202#define __NR_rt_sigsuspend (__NR_SYSCALL_BASE+179)
203#define __NR_pread64 (__NR_SYSCALL_BASE+180)
204#define __NR_pwrite64 (__NR_SYSCALL_BASE+181)
205#define __NR_chown (__NR_SYSCALL_BASE+182)
206#define __NR_getcwd (__NR_SYSCALL_BASE+183)
207#define __NR_capget (__NR_SYSCALL_BASE+184)
208#define __NR_capset (__NR_SYSCALL_BASE+185)
209#define __NR_sigaltstack (__NR_SYSCALL_BASE+186)
210#define __NR_sendfile (__NR_SYSCALL_BASE+187)
211 /* 188 reserved */
212 /* 189 reserved */
213#define __NR_vfork (__NR_SYSCALL_BASE+190)
214#define __NR_ugetrlimit (__NR_SYSCALL_BASE+191) /* SuS compliant getrlimit */
215#define __NR_mmap2 (__NR_SYSCALL_BASE+192)
216#define __NR_truncate64 (__NR_SYSCALL_BASE+193)
217#define __NR_ftruncate64 (__NR_SYSCALL_BASE+194)
218#define __NR_stat64 (__NR_SYSCALL_BASE+195)
219#define __NR_lstat64 (__NR_SYSCALL_BASE+196)
220#define __NR_fstat64 (__NR_SYSCALL_BASE+197)
221#define __NR_lchown32 (__NR_SYSCALL_BASE+198)
222#define __NR_getuid32 (__NR_SYSCALL_BASE+199)
223#define __NR_getgid32 (__NR_SYSCALL_BASE+200)
224#define __NR_geteuid32 (__NR_SYSCALL_BASE+201)
225#define __NR_getegid32 (__NR_SYSCALL_BASE+202)
226#define __NR_setreuid32 (__NR_SYSCALL_BASE+203)
227#define __NR_setregid32 (__NR_SYSCALL_BASE+204)
228#define __NR_getgroups32 (__NR_SYSCALL_BASE+205)
229#define __NR_setgroups32 (__NR_SYSCALL_BASE+206)
230#define __NR_fchown32 (__NR_SYSCALL_BASE+207)
231#define __NR_setresuid32 (__NR_SYSCALL_BASE+208)
232#define __NR_getresuid32 (__NR_SYSCALL_BASE+209)
233#define __NR_setresgid32 (__NR_SYSCALL_BASE+210)
234#define __NR_getresgid32 (__NR_SYSCALL_BASE+211)
235#define __NR_chown32 (__NR_SYSCALL_BASE+212)
236#define __NR_setuid32 (__NR_SYSCALL_BASE+213)
237#define __NR_setgid32 (__NR_SYSCALL_BASE+214)
238#define __NR_setfsuid32 (__NR_SYSCALL_BASE+215)
239#define __NR_setfsgid32 (__NR_SYSCALL_BASE+216)
240#define __NR_getdents64 (__NR_SYSCALL_BASE+217)
241#define __NR_pivot_root (__NR_SYSCALL_BASE+218)
242#define __NR_mincore (__NR_SYSCALL_BASE+219)
243#define __NR_madvise (__NR_SYSCALL_BASE+220)
244#define __NR_fcntl64 (__NR_SYSCALL_BASE+221)
245 /* 222 for tux */
246 /* 223 is unused */
247#define __NR_gettid (__NR_SYSCALL_BASE+224)
248#define __NR_readahead (__NR_SYSCALL_BASE+225)
249#define __NR_setxattr (__NR_SYSCALL_BASE+226)
250#define __NR_lsetxattr (__NR_SYSCALL_BASE+227)
251#define __NR_fsetxattr (__NR_SYSCALL_BASE+228)
252#define __NR_getxattr (__NR_SYSCALL_BASE+229)
253#define __NR_lgetxattr (__NR_SYSCALL_BASE+230)
254#define __NR_fgetxattr (__NR_SYSCALL_BASE+231)
255#define __NR_listxattr (__NR_SYSCALL_BASE+232)
256#define __NR_llistxattr (__NR_SYSCALL_BASE+233)
257#define __NR_flistxattr (__NR_SYSCALL_BASE+234)
258#define __NR_removexattr (__NR_SYSCALL_BASE+235)
259#define __NR_lremovexattr (__NR_SYSCALL_BASE+236)
260#define __NR_fremovexattr (__NR_SYSCALL_BASE+237)
261#define __NR_tkill (__NR_SYSCALL_BASE+238)
262#define __NR_sendfile64 (__NR_SYSCALL_BASE+239)
263#define __NR_futex (__NR_SYSCALL_BASE+240)
264#define __NR_sched_setaffinity (__NR_SYSCALL_BASE+241)
265#define __NR_sched_getaffinity (__NR_SYSCALL_BASE+242)
266#define __NR_io_setup (__NR_SYSCALL_BASE+243)
267#define __NR_io_destroy (__NR_SYSCALL_BASE+244)
268#define __NR_io_getevents (__NR_SYSCALL_BASE+245)
269#define __NR_io_submit (__NR_SYSCALL_BASE+246)
270#define __NR_io_cancel (__NR_SYSCALL_BASE+247)
271#define __NR_exit_group (__NR_SYSCALL_BASE+248)
272#define __NR_lookup_dcookie (__NR_SYSCALL_BASE+249)
273#define __NR_epoll_create (__NR_SYSCALL_BASE+250)
274#define __NR_epoll_ctl (__NR_SYSCALL_BASE+251)
275#define __NR_epoll_wait (__NR_SYSCALL_BASE+252)
276#define __NR_remap_file_pages (__NR_SYSCALL_BASE+253)
277 /* 254 for set_thread_area */
278 /* 255 for get_thread_area */
279 /* 256 for set_tid_address */
280#define __NR_timer_create (__NR_SYSCALL_BASE+257)
281#define __NR_timer_settime (__NR_SYSCALL_BASE+258)
282#define __NR_timer_gettime (__NR_SYSCALL_BASE+259)
283#define __NR_timer_getoverrun (__NR_SYSCALL_BASE+260)
284#define __NR_timer_delete (__NR_SYSCALL_BASE+261)
285#define __NR_clock_settime (__NR_SYSCALL_BASE+262)
286#define __NR_clock_gettime (__NR_SYSCALL_BASE+263)
287#define __NR_clock_getres (__NR_SYSCALL_BASE+264)
288#define __NR_clock_nanosleep (__NR_SYSCALL_BASE+265)
289#define __NR_statfs64 (__NR_SYSCALL_BASE+266)
290#define __NR_fstatfs64 (__NR_SYSCALL_BASE+267)
291#define __NR_tgkill (__NR_SYSCALL_BASE+268)
292#define __NR_utimes (__NR_SYSCALL_BASE+269)
293#define __NR_fadvise64_64 (__NR_SYSCALL_BASE+270)
294#define __NR_pciconfig_iobase (__NR_SYSCALL_BASE+271)
295#define __NR_pciconfig_read (__NR_SYSCALL_BASE+272)
296#define __NR_pciconfig_write (__NR_SYSCALL_BASE+273)
297#define __NR_mq_open (__NR_SYSCALL_BASE+274)
298#define __NR_mq_unlink (__NR_SYSCALL_BASE+275)
299#define __NR_mq_timedsend (__NR_SYSCALL_BASE+276)
300#define __NR_mq_timedreceive (__NR_SYSCALL_BASE+277)
301#define __NR_mq_notify (__NR_SYSCALL_BASE+278)
302#define __NR_mq_getsetattr (__NR_SYSCALL_BASE+279)
303#define __NR_waitid (__NR_SYSCALL_BASE+280)
304
305/*
306 * The following SWIs are ARM private. FIXME - make appropriate for arm26
307 */
308#define __ARM_NR_BASE (__NR_SYSCALL_BASE+0x0f0000)
309#define __ARM_NR_breakpoint (__ARM_NR_BASE+1)
310#define __ARM_NR_cacheflush (__ARM_NR_BASE+2)
311#define __ARM_NR_usr26 (__ARM_NR_BASE+3)
312
313#ifdef __KERNEL__
314
315#define __ARCH_WANT_IPC_PARSE_VERSION
316#define __ARCH_WANT_OLD_READDIR
317#define __ARCH_WANT_STAT64
318#define __ARCH_WANT_SYS_ALARM
319#define __ARCH_WANT_SYS_GETHOSTNAME
320#define __ARCH_WANT_SYS_PAUSE
321#define __ARCH_WANT_SYS_TIME
322#define __ARCH_WANT_SYS_UTIME
323#define __ARCH_WANT_SYS_SOCKETCALL
324#define __ARCH_WANT_SYS_FADVISE64
325#define __ARCH_WANT_SYS_GETPGRP
326#define __ARCH_WANT_SYS_LLSEEK
327#define __ARCH_WANT_SYS_NICE
328#define __ARCH_WANT_SYS_OLD_GETRLIMIT
329#define __ARCH_WANT_SYS_OLDUMOUNT
330#define __ARCH_WANT_SYS_SIGPENDING
331#define __ARCH_WANT_SYS_SIGPROCMASK
332#define __ARCH_WANT_SYS_RT_SIGACTION
333
334/*
335 * "Conditional" syscalls
336 *
337 * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
338 * but it doesn't work on all toolchains, so we just do it by hand
339 */
340#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
341
342#endif /* __KERNEL__ */
343#endif /* __ASM_ARM_UNISTD_H */
diff --git a/include/asm-arm26/user.h b/include/asm-arm26/user.h
deleted file mode 100644
index 3e8b0f879159..000000000000
--- a/include/asm-arm26/user.h
+++ /dev/null
@@ -1,84 +0,0 @@
1#ifndef _ARM_USER_H
2#define _ARM_USER_H
3
4#include <asm/page.h>
5#include <asm/ptrace.h>
6/* Core file format: The core file is written in such a way that gdb
7 can understand it and provide useful information to the user (under
8 linux we use the 'trad-core' bfd). There are quite a number of
9 obstacles to being able to view the contents of the floating point
10 registers, and until these are solved you will not be able to view the
11 contents of them. Actually, you can read in the core file and look at
12 the contents of the user struct to find out what the floating point
13 registers contain.
14 The actual file contents are as follows:
15 UPAGE: 1 page consisting of a user struct that tells gdb what is present
16 in the file. Directly after this is a copy of the task_struct, which
17 is currently not used by gdb, but it may come in useful at some point.
18 All of the registers are stored as part of the upage. The upage should
19 always be only one page.
20 DATA: The data area is stored. We use current->end_text to
21 current->brk to pick up all of the user variables, plus any memory
22 that may have been malloced. No attempt is made to determine if a page
23 is demand-zero or if a page is totally unused, we just cover the entire
24 range. All of the addresses are rounded in such a way that an integral
25 number of pages is written.
26 STACK: We need the stack information in order to get a meaningful
27 backtrace. We need to write the data from (esp) to
28 current->start_stack, so we round each of these off in order to be able
29 to write an integer number of pages.
30 The minimum core file size is 3 pages, or 12288 bytes.
31*/
32
33struct user_fp {
34 struct fp_reg {
35 unsigned int sign1:1;
36 unsigned int unused:15;
37 unsigned int sign2:1;
38 unsigned int exponent:14;
39 unsigned int j:1;
40 unsigned int mantissa1:31;
41 unsigned int mantissa0:32;
42 } fpregs[8];
43 unsigned int fpsr:32;
44 unsigned int fpcr:32;
45 unsigned char ftype[8];
46 unsigned int init_flag;
47};
48
49/* When the kernel dumps core, it starts by dumping the user struct -
50 this will be used by gdb to figure out where the data and stack segments
51 are within the file, and what virtual addresses to use. */
52struct user{
53/* We start with the registers, to mimic the way that "memory" is returned
54 from the ptrace(3,...) function. */
55 struct pt_regs regs; /* Where the registers are actually stored */
56/* ptrace does not yet supply these. Someday.... */
57 int u_fpvalid; /* True if math co-processor being used. */
58 /* for this mess. Not yet used. */
59/* The rest of this junk is to help gdb figure out what goes where */
60 unsigned long int u_tsize; /* Text segment size (pages). */
61 unsigned long int u_dsize; /* Data segment size (pages). */
62 unsigned long int u_ssize; /* Stack segment size (pages). */
63 unsigned long start_code; /* Starting virtual address of text. */
64 unsigned long start_stack; /* Starting virtual address of stack area.
65 This is actually the bottom of the stack,
66 the top of the stack is always found in the
67 esp register. */
68 long int signal; /* Signal that caused the core dump. */
69 int reserved; /* No longer used */
70 struct pt_regs * u_ar0; /* Used by gdb to help find the values for */
71 /* the registers. */
72 unsigned long magic; /* To uniquely identify a core file */
73 char u_comm[32]; /* User command that was responsible */
74 int u_debugreg[8];
75 struct user_fp u_fp; /* FP state */
76 struct user_fp_struct * u_fp0;/* Used by gdb to help find the values for */
77 /* the FP registers. */
78};
79#define NBPG PAGE_SIZE
80#define UPAGES 1
81#define HOST_TEXT_START_ADDR (u.start_code)
82#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
83
84#endif /* _ARM_USER_H */
diff --git a/include/asm-arm26/xor.h b/include/asm-arm26/xor.h
deleted file mode 100644
index e7c4cf58bed1..000000000000
--- a/include/asm-arm26/xor.h
+++ /dev/null
@@ -1,141 +0,0 @@
1/*
2 * linux/include/asm-arm/xor.h
3 *
4 * Copyright (C) 2001 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#include <asm-generic/xor.h>
11
12#define __XOR(a1, a2) a1 ^= a2
13
14#define GET_BLOCK_2(dst) \
15 __asm__("ldmia %0, {%1, %2}" \
16 : "=r" (dst), "=r" (a1), "=r" (a2) \
17 : "0" (dst))
18
19#define GET_BLOCK_4(dst) \
20 __asm__("ldmia %0, {%1, %2, %3, %4}" \
21 : "=r" (dst), "=r" (a1), "=r" (a2), "=r" (a3), "=r" (a4) \
22 : "0" (dst))
23
24#define XOR_BLOCK_2(src) \
25 __asm__("ldmia %0!, {%1, %2}" \
26 : "=r" (src), "=r" (b1), "=r" (b2) \
27 : "0" (src)); \
28 __XOR(a1, b1); __XOR(a2, b2);
29
30#define XOR_BLOCK_4(src) \
31 __asm__("ldmia %0!, {%1, %2, %3, %4}" \
32 : "=r" (src), "=r" (b1), "=r" (b2), "=r" (b3), "=r" (b4) \
33 : "0" (src)); \
34 __XOR(a1, b1); __XOR(a2, b2); __XOR(a3, b3); __XOR(a4, b4)
35
36#define PUT_BLOCK_2(dst) \
37 __asm__ __volatile__("stmia %0!, {%2, %3}" \
38 : "=r" (dst) \
39 : "0" (dst), "r" (a1), "r" (a2))
40
41#define PUT_BLOCK_4(dst) \
42 __asm__ __volatile__("stmia %0!, {%2, %3, %4, %5}" \
43 : "=r" (dst) \
44 : "0" (dst), "r" (a1), "r" (a2), "r" (a3), "r" (a4))
45
46static void
47xor_arm4regs_2(unsigned long bytes, unsigned long *p1, unsigned long *p2)
48{
49 unsigned int lines = bytes / sizeof(unsigned long) / 4;
50 register unsigned int a1 __asm__("r4");
51 register unsigned int a2 __asm__("r5");
52 register unsigned int a3 __asm__("r6");
53 register unsigned int a4 __asm__("r7");
54 register unsigned int b1 __asm__("r8");
55 register unsigned int b2 __asm__("r9");
56 register unsigned int b3 __asm__("ip");
57 register unsigned int b4 __asm__("lr");
58
59 do {
60 GET_BLOCK_4(p1);
61 XOR_BLOCK_4(p2);
62 PUT_BLOCK_4(p1);
63 } while (--lines);
64}
65
66static void
67xor_arm4regs_3(unsigned long bytes, unsigned long *p1, unsigned long *p2,
68 unsigned long *p3)
69{
70 unsigned int lines = bytes / sizeof(unsigned long) / 4;
71 register unsigned int a1 __asm__("r4");
72 register unsigned int a2 __asm__("r5");
73 register unsigned int a3 __asm__("r6");
74 register unsigned int a4 __asm__("r7");
75 register unsigned int b1 __asm__("r8");
76 register unsigned int b2 __asm__("r9");
77 register unsigned int b3 __asm__("ip");
78 register unsigned int b4 __asm__("lr");
79
80 do {
81 GET_BLOCK_4(p1);
82 XOR_BLOCK_4(p2);
83 XOR_BLOCK_4(p3);
84 PUT_BLOCK_4(p1);
85 } while (--lines);
86}
87
88static void
89xor_arm4regs_4(unsigned long bytes, unsigned long *p1, unsigned long *p2,
90 unsigned long *p3, unsigned long *p4)
91{
92 unsigned int lines = bytes / sizeof(unsigned long) / 2;
93 register unsigned int a1 __asm__("r8");
94 register unsigned int a2 __asm__("r9");
95 register unsigned int b1 __asm__("ip");
96 register unsigned int b2 __asm__("lr");
97
98 do {
99 GET_BLOCK_2(p1);
100 XOR_BLOCK_2(p2);
101 XOR_BLOCK_2(p3);
102 XOR_BLOCK_2(p4);
103 PUT_BLOCK_2(p1);
104 } while (--lines);
105}
106
107static void
108xor_arm4regs_5(unsigned long bytes, unsigned long *p1, unsigned long *p2,
109 unsigned long *p3, unsigned long *p4, unsigned long *p5)
110{
111 unsigned int lines = bytes / sizeof(unsigned long) / 2;
112 register unsigned int a1 __asm__("r8");
113 register unsigned int a2 __asm__("r9");
114 register unsigned int b1 __asm__("ip");
115 register unsigned int b2 __asm__("lr");
116
117 do {
118 GET_BLOCK_2(p1);
119 XOR_BLOCK_2(p2);
120 XOR_BLOCK_2(p3);
121 XOR_BLOCK_2(p4);
122 XOR_BLOCK_2(p5);
123 PUT_BLOCK_2(p1);
124 } while (--lines);
125}
126
127static struct xor_block_template xor_block_arm4regs = {
128 .name = "arm4regs",
129 .do_2 = xor_arm4regs_2,
130 .do_3 = xor_arm4regs_3,
131 .do_4 = xor_arm4regs_4,
132 .do_5 = xor_arm4regs_5,
133};
134
135#undef XOR_TRY_TEMPLATES
136#define XOR_TRY_TEMPLATES \
137 do { \
138 xor_speed(&xor_block_arm4regs); \
139 xor_speed(&xor_block_8regs); \
140 xor_speed(&xor_block_32regs); \
141 } while (0)
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index da8eb8ad9e9b..3ea68cd3b61f 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -120,7 +120,6 @@ enum zone_type {
120 * --------------------------- 120 * ---------------------------
121 * parisc, ia64, sparc <4G 121 * parisc, ia64, sparc <4G
122 * s390 <2G 122 * s390 <2G
123 * arm26 <48M
124 * arm Various 123 * arm Various
125 * alpha Unlimited or 0-16MB. 124 * alpha Unlimited or 0-16MB.
126 * 125 *