diff options
Diffstat (limited to 'include/asm-arm')
-rw-r--r-- | include/asm-arm/a.out-core.h | 49 | ||||
-rw-r--r-- | include/asm-arm/a.out.h | 6 | ||||
-rw-r--r-- | include/asm-arm/arch-orion/debug-macro.S | 9 | ||||
-rw-r--r-- | include/asm-arm/arch-orion/entry-macro.S | 4 | ||||
-rw-r--r-- | include/asm-arm/arch-orion/hardware.h | 13 | ||||
-rw-r--r-- | include/asm-arm/arch-orion/orion.h | 102 | ||||
-rw-r--r-- | include/asm-arm/arch-orion/uncompress.h | 14 | ||||
-rw-r--r-- | include/asm-arm/arch-orion/vmalloc.h | 2 | ||||
-rw-r--r-- | include/asm-arm/mutex.h | 6 | ||||
-rw-r--r-- | include/asm-arm/page.h | 2 | ||||
-rw-r--r-- | include/asm-arm/pgalloc.h | 9 | ||||
-rw-r--r-- | include/asm-arm/posix_types.h | 6 | ||||
-rw-r--r-- | include/asm-arm/processor.h | 6 |
13 files changed, 146 insertions, 82 deletions
diff --git a/include/asm-arm/a.out-core.h b/include/asm-arm/a.out-core.h new file mode 100644 index 000000000000..93d04acaa31f --- /dev/null +++ b/include/asm-arm/a.out-core.h | |||
@@ -0,0 +1,49 @@ | |||
1 | /* a.out coredump register dumper | ||
2 | * | ||
3 | * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved. | ||
4 | * Written by David Howells (dhowells@redhat.com) | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public Licence | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the Licence, or (at your option) any later version. | ||
10 | */ | ||
11 | |||
12 | #ifndef _ASM_A_OUT_CORE_H | ||
13 | #define _ASM_A_OUT_CORE_H | ||
14 | |||
15 | #ifdef __KERNEL__ | ||
16 | |||
17 | #include <linux/user.h> | ||
18 | #include <linux/elfcore.h> | ||
19 | |||
20 | /* | ||
21 | * fill in the user structure for an a.out core dump | ||
22 | */ | ||
23 | static inline void aout_dump_thread(struct pt_regs *regs, struct user *dump) | ||
24 | { | ||
25 | struct task_struct *tsk = current; | ||
26 | |||
27 | dump->magic = CMAGIC; | ||
28 | dump->start_code = tsk->mm->start_code; | ||
29 | dump->start_stack = regs->ARM_sp & ~(PAGE_SIZE - 1); | ||
30 | |||
31 | dump->u_tsize = (tsk->mm->end_code - tsk->mm->start_code) >> PAGE_SHIFT; | ||
32 | dump->u_dsize = (tsk->mm->brk - tsk->mm->start_data + PAGE_SIZE - 1) >> PAGE_SHIFT; | ||
33 | dump->u_ssize = 0; | ||
34 | |||
35 | dump->u_debugreg[0] = tsk->thread.debug.bp[0].address; | ||
36 | dump->u_debugreg[1] = tsk->thread.debug.bp[1].address; | ||
37 | dump->u_debugreg[2] = tsk->thread.debug.bp[0].insn.arm; | ||
38 | dump->u_debugreg[3] = tsk->thread.debug.bp[1].insn.arm; | ||
39 | dump->u_debugreg[4] = tsk->thread.debug.nsaved; | ||
40 | |||
41 | if (dump->start_stack < 0x04000000) | ||
42 | dump->u_ssize = (0x04000000 - dump->start_stack) >> PAGE_SHIFT; | ||
43 | |||
44 | dump->regs = *regs; | ||
45 | dump->u_fpvalid = dump_fpu (regs, &dump->u_fp); | ||
46 | } | ||
47 | |||
48 | #endif /* __KERNEL__ */ | ||
49 | #endif /* _ASM_A_OUT_CORE_H */ | ||
diff --git a/include/asm-arm/a.out.h b/include/asm-arm/a.out.h index d7165e86df25..79489fdcc8b8 100644 --- a/include/asm-arm/a.out.h +++ b/include/asm-arm/a.out.h | |||
@@ -27,12 +27,6 @@ struct exec | |||
27 | 27 | ||
28 | #define M_ARM 103 | 28 | #define M_ARM 103 |
29 | 29 | ||
30 | #ifdef __KERNEL__ | ||
31 | #define STACK_TOP ((current->personality == PER_LINUX_32BIT) ? \ | ||
32 | TASK_SIZE : TASK_SIZE_26) | ||
33 | #define STACK_TOP_MAX TASK_SIZE | ||
34 | #endif | ||
35 | |||
36 | #ifndef LIBRARY_START_TEXT | 30 | #ifndef LIBRARY_START_TEXT |
37 | #define LIBRARY_START_TEXT (0x00c00000) | 31 | #define LIBRARY_START_TEXT (0x00c00000) |
38 | #endif | 32 | #endif |
diff --git a/include/asm-arm/arch-orion/debug-macro.S b/include/asm-arm/arch-orion/debug-macro.S index e2a80641f214..2746220f5d85 100644 --- a/include/asm-arm/arch-orion/debug-macro.S +++ b/include/asm-arm/arch-orion/debug-macro.S | |||
@@ -8,9 +8,14 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <asm/arch/orion.h> | ||
12 | |||
11 | .macro addruart,rx | 13 | .macro addruart,rx |
12 | mov \rx, #0xf1000000 | 14 | mrc p15, 0, \rx, c1, c0 |
13 | orr \rx, \rx, #0x00012000 | 15 | tst \rx, #1 @ MMU enabled? |
16 | ldreq \rx, =ORION_REGS_PHYS_BASE | ||
17 | ldrne \rx, =ORION_REGS_VIRT_BASE | ||
18 | orr \rx, \rx, #0x00012000 | ||
14 | .endm | 19 | .endm |
15 | 20 | ||
16 | #define UART_SHIFT 2 | 21 | #define UART_SHIFT 2 |
diff --git a/include/asm-arm/arch-orion/entry-macro.S b/include/asm-arm/arch-orion/entry-macro.S index b76075a7e44b..cda096b2acfd 100644 --- a/include/asm-arm/arch-orion/entry-macro.S +++ b/include/asm-arm/arch-orion/entry-macro.S | |||
@@ -3,8 +3,8 @@ | |||
3 | * | 3 | * |
4 | * Low-level IRQ helper macros for Orion platforms | 4 | * Low-level IRQ helper macros for Orion platforms |
5 | * | 5 | * |
6 | * This file is licensed under the terms of the GNU General Public | 6 | * This file is licensed under the terms of the GNU General Public |
7 | * License version 2. This program is licensed "as is" without any | 7 | * License version 2. This program is licensed "as is" without any |
8 | * warranty of any kind, whether express or implied. | 8 | * warranty of any kind, whether express or implied. |
9 | */ | 9 | */ |
10 | 10 | ||
diff --git a/include/asm-arm/arch-orion/hardware.h b/include/asm-arm/arch-orion/hardware.h index 8a12d213fbdc..65da374de735 100644 --- a/include/asm-arm/arch-orion/hardware.h +++ b/include/asm-arm/arch-orion/hardware.h | |||
@@ -4,7 +4,6 @@ | |||
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License version 2 as | 5 | * it under the terms of the GNU General Public License version 2 as |
6 | * published by the Free Software Foundation. | 6 | * published by the Free Software Foundation. |
7 | * | ||
8 | */ | 7 | */ |
9 | 8 | ||
10 | #ifndef __ASM_ARCH_HARDWARE_H__ | 9 | #ifndef __ASM_ARCH_HARDWARE_H__ |
@@ -12,13 +11,11 @@ | |||
12 | 11 | ||
13 | #include "orion.h" | 12 | #include "orion.h" |
14 | 13 | ||
15 | #define PCI_MEMORY_VADDR ORION_PCI_SYS_MEM_BASE | 14 | #define pcibios_assign_all_busses() 1 |
16 | #define PCI_IO_VADDR ORION_PCI_SYS_IO_BASE | ||
17 | 15 | ||
18 | #define pcibios_assign_all_busses() 1 | 16 | #define PCIBIOS_MIN_IO 0x00001000 |
17 | #define PCIBIOS_MIN_MEM 0x01000000 | ||
18 | #define PCIMEM_BASE ORION_PCIE_MEM_PHYS_BASE | ||
19 | 19 | ||
20 | #define PCIBIOS_MIN_IO 0x1000 | ||
21 | #define PCIBIOS_MIN_MEM 0x01000000 | ||
22 | #define PCIMEM_BASE PCI_MEMORY_VADDR /* mem base for VGA */ | ||
23 | 20 | ||
24 | #endif /* _ASM_ARCH_HARDWARE_H */ | 21 | #endif |
diff --git a/include/asm-arm/arch-orion/orion.h b/include/asm-arm/arch-orion/orion.h index f787f752e58c..673a418a7419 100644 --- a/include/asm-arm/arch-orion/orion.h +++ b/include/asm-arm/arch-orion/orion.h | |||
@@ -14,32 +14,40 @@ | |||
14 | #ifndef __ASM_ARCH_ORION_H__ | 14 | #ifndef __ASM_ARCH_ORION_H__ |
15 | #define __ASM_ARCH_ORION_H__ | 15 | #define __ASM_ARCH_ORION_H__ |
16 | 16 | ||
17 | /******************************************************************************* | 17 | /***************************************************************************** |
18 | * Orion Address Map | 18 | * Orion Address Map |
19 | * Use the same mapping (1:1 virtual:physical) of internal registers and | 19 | * |
20 | * PCI system (PCI+PCIE) for all machines. | 20 | * virt phys size |
21 | * Each machine defines the rest of its mapping (e.g. device bus flashes) | 21 | * fdd00000 f1000000 1M on-chip peripheral registers |
22 | ******************************************************************************/ | 22 | * fde00000 f2000000 1M PCIe I/O space |
23 | #define ORION_REGS_BASE 0xf1000000 | 23 | * fdf00000 f2100000 1M PCI I/O space |
24 | * fe000000 f0000000 16M PCIe WA space (Orion-NAS only) | ||
25 | ****************************************************************************/ | ||
26 | #define ORION_REGS_PHYS_BASE 0xf1000000 | ||
27 | #define ORION_REGS_VIRT_BASE 0xfdd00000 | ||
24 | #define ORION_REGS_SIZE SZ_1M | 28 | #define ORION_REGS_SIZE SZ_1M |
25 | 29 | ||
26 | #define ORION_PCI_SYS_MEM_BASE 0xe0000000 | 30 | #define ORION_PCIE_IO_PHYS_BASE 0xf2000000 |
27 | #define ORION_PCIE_MEM_BASE ORION_PCI_SYS_MEM_BASE | 31 | #define ORION_PCIE_IO_VIRT_BASE 0xfde00000 |
28 | #define ORION_PCIE_MEM_SIZE SZ_128M | 32 | #define ORION_PCIE_IO_BUS_BASE 0x00000000 |
29 | #define ORION_PCI_MEM_BASE (ORION_PCIE_MEM_BASE + ORION_PCIE_MEM_SIZE) | ||
30 | #define ORION_PCI_MEM_SIZE SZ_128M | ||
31 | |||
32 | #define ORION_PCI_SYS_IO_BASE 0xf2000000 | ||
33 | #define ORION_PCIE_IO_BASE ORION_PCI_SYS_IO_BASE | ||
34 | #define ORION_PCIE_IO_SIZE SZ_1M | 33 | #define ORION_PCIE_IO_SIZE SZ_1M |
35 | #define ORION_PCIE_IO_REMAP (ORION_PCIE_IO_BASE - ORION_PCI_SYS_IO_BASE) | 34 | |
36 | #define ORION_PCI_IO_BASE (ORION_PCIE_IO_BASE + ORION_PCIE_IO_SIZE) | 35 | #define ORION_PCI_IO_PHYS_BASE 0xf2100000 |
36 | #define ORION_PCI_IO_VIRT_BASE 0xfdf00000 | ||
37 | #define ORION_PCI_IO_BUS_BASE 0x00100000 | ||
37 | #define ORION_PCI_IO_SIZE SZ_1M | 38 | #define ORION_PCI_IO_SIZE SZ_1M |
38 | #define ORION_PCI_IO_REMAP (ORION_PCI_IO_BASE - ORION_PCI_SYS_IO_BASE) | 39 | |
39 | /* Relevant only for Orion-NAS */ | 40 | /* Relevant only for Orion-NAS */ |
40 | #define ORION_PCIE_WA_BASE 0xf0000000 | 41 | #define ORION_PCIE_WA_PHYS_BASE 0xf0000000 |
42 | #define ORION_PCIE_WA_VIRT_BASE 0xfe000000 | ||
41 | #define ORION_PCIE_WA_SIZE SZ_16M | 43 | #define ORION_PCIE_WA_SIZE SZ_16M |
42 | 44 | ||
45 | #define ORION_PCIE_MEM_PHYS_BASE 0xe0000000 | ||
46 | #define ORION_PCIE_MEM_SIZE SZ_128M | ||
47 | |||
48 | #define ORION_PCI_MEM_PHYS_BASE 0xe8000000 | ||
49 | #define ORION_PCI_MEM_SIZE SZ_128M | ||
50 | |||
43 | /******************************************************************************* | 51 | /******************************************************************************* |
44 | * Supported Devices & Revisions | 52 | * Supported Devices & Revisions |
45 | ******************************************************************************/ | 53 | ******************************************************************************/ |
@@ -57,25 +65,42 @@ | |||
57 | /******************************************************************************* | 65 | /******************************************************************************* |
58 | * Orion Registers Map | 66 | * Orion Registers Map |
59 | ******************************************************************************/ | 67 | ******************************************************************************/ |
60 | #define ORION_DDR_REG_BASE (ORION_REGS_BASE | 0x00000) | 68 | #define ORION_DDR_VIRT_BASE (ORION_REGS_VIRT_BASE | 0x00000) |
61 | #define ORION_DEV_BUS_REG_BASE (ORION_REGS_BASE | 0x10000) | 69 | #define ORION_DDR_REG(x) (ORION_DDR_VIRT_BASE | (x)) |
62 | #define ORION_BRIDGE_REG_BASE (ORION_REGS_BASE | 0x20000) | 70 | |
63 | #define ORION_PCI_REG_BASE (ORION_REGS_BASE | 0x30000) | 71 | #define ORION_DEV_BUS_PHYS_BASE (ORION_REGS_PHYS_BASE | 0x10000) |
64 | #define ORION_PCIE_REG_BASE (ORION_REGS_BASE | 0x40000) | 72 | #define ORION_DEV_BUS_VIRT_BASE (ORION_REGS_VIRT_BASE | 0x10000) |
65 | #define ORION_USB0_REG_BASE (ORION_REGS_BASE | 0x50000) | 73 | #define ORION_DEV_BUS_REG(x) (ORION_DEV_BUS_VIRT_BASE | (x)) |
66 | #define ORION_ETH_REG_BASE (ORION_REGS_BASE | 0x70000) | 74 | #define I2C_PHYS_BASE (ORION_DEV_BUS_PHYS_BASE | 0x1000) |
67 | #define ORION_SATA_REG_BASE (ORION_REGS_BASE | 0x80000) | 75 | #define UART0_PHYS_BASE (ORION_DEV_BUS_PHYS_BASE | 0x2000) |
68 | #define ORION_USB1_REG_BASE (ORION_REGS_BASE | 0xa0000) | 76 | #define UART0_VIRT_BASE (ORION_DEV_BUS_VIRT_BASE | 0x2000) |
69 | 77 | #define UART1_PHYS_BASE (ORION_DEV_BUS_PHYS_BASE | 0x2100) | |
70 | #define ORION_DDR_REG(x) (ORION_DDR_REG_BASE | (x)) | 78 | #define UART1_VIRT_BASE (ORION_DEV_BUS_VIRT_BASE | 0x2100) |
71 | #define ORION_DEV_BUS_REG(x) (ORION_DEV_BUS_REG_BASE | (x)) | 79 | |
72 | #define ORION_BRIDGE_REG(x) (ORION_BRIDGE_REG_BASE | (x)) | 80 | #define ORION_BRIDGE_VIRT_BASE (ORION_REGS_VIRT_BASE | 0x20000) |
73 | #define ORION_PCI_REG(x) (ORION_PCI_REG_BASE | (x)) | 81 | #define ORION_BRIDGE_REG(x) (ORION_BRIDGE_VIRT_BASE | (x)) |
74 | #define ORION_PCIE_REG(x) (ORION_PCIE_REG_BASE | (x)) | 82 | |
75 | #define ORION_USB0_REG(x) (ORION_USB0_REG_BASE | (x)) | 83 | #define ORION_PCI_VIRT_BASE (ORION_REGS_VIRT_BASE | 0x30000) |
76 | #define ORION_USB1_REG(x) (ORION_USB1_REG_BASE | (x)) | 84 | #define ORION_PCI_REG(x) (ORION_PCI_VIRT_BASE | (x)) |
77 | #define ORION_ETH_REG(x) (ORION_ETH_REG_BASE | (x)) | 85 | |
78 | #define ORION_SATA_REG(x) (ORION_SATA_REG_BASE | (x)) | 86 | #define ORION_PCIE_VIRT_BASE (ORION_REGS_VIRT_BASE | 0x40000) |
87 | #define ORION_PCIE_REG(x) (ORION_PCIE_VIRT_BASE | (x)) | ||
88 | |||
89 | #define ORION_USB0_PHYS_BASE (ORION_REGS_PHYS_BASE | 0x50000) | ||
90 | #define ORION_USB0_VIRT_BASE (ORION_REGS_VIRT_BASE | 0x50000) | ||
91 | #define ORION_USB0_REG(x) (ORION_USB0_VIRT_BASE | (x)) | ||
92 | |||
93 | #define ORION_ETH_PHYS_BASE (ORION_REGS_PHYS_BASE | 0x70000) | ||
94 | #define ORION_ETH_VIRT_BASE (ORION_REGS_VIRT_BASE | 0x70000) | ||
95 | #define ORION_ETH_REG(x) (ORION_ETH_VIRT_BASE | (x)) | ||
96 | |||
97 | #define ORION_SATA_PHYS_BASE (ORION_REGS_PHYS_BASE | 0x80000) | ||
98 | #define ORION_SATA_VIRT_BASE (ORION_REGS_VIRT_BASE | 0x80000) | ||
99 | #define ORION_SATA_REG(x) (ORION_SATA_VIRT_BASE | (x)) | ||
100 | |||
101 | #define ORION_USB1_PHYS_BASE (ORION_REGS_PHYS_BASE | 0xa0000) | ||
102 | #define ORION_USB1_VIRT_BASE (ORION_REGS_VIRT_BASE | 0xa0000) | ||
103 | #define ORION_USB1_REG(x) (ORION_USB1_VIRT_BASE | (x)) | ||
79 | 104 | ||
80 | /******************************************************************************* | 105 | /******************************************************************************* |
81 | * Device Bus Registers | 106 | * Device Bus Registers |
@@ -100,9 +125,6 @@ | |||
100 | #define DEV_BUS_CTRL ORION_DEV_BUS_REG(0x4c0) | 125 | #define DEV_BUS_CTRL ORION_DEV_BUS_REG(0x4c0) |
101 | #define DEV_BUS_INT_CAUSE ORION_DEV_BUS_REG(0x4d0) | 126 | #define DEV_BUS_INT_CAUSE ORION_DEV_BUS_REG(0x4d0) |
102 | #define DEV_BUS_INT_MASK ORION_DEV_BUS_REG(0x4d4) | 127 | #define DEV_BUS_INT_MASK ORION_DEV_BUS_REG(0x4d4) |
103 | #define I2C_BASE ORION_DEV_BUS_REG(0x1000) | ||
104 | #define UART0_BASE ORION_DEV_BUS_REG(0x2000) | ||
105 | #define UART1_BASE ORION_DEV_BUS_REG(0x2100) | ||
106 | #define GPIO_MAX 32 | 128 | #define GPIO_MAX 32 |
107 | 129 | ||
108 | /*************************************************************************** | 130 | /*************************************************************************** |
diff --git a/include/asm-arm/arch-orion/uncompress.h b/include/asm-arm/arch-orion/uncompress.h index a1a222fb438c..59f44039909a 100644 --- a/include/asm-arm/arch-orion/uncompress.h +++ b/include/asm-arm/arch-orion/uncompress.h | |||
@@ -10,8 +10,8 @@ | |||
10 | 10 | ||
11 | #include <asm/arch/orion.h> | 11 | #include <asm/arch/orion.h> |
12 | 12 | ||
13 | #define MV_UART_LSR ((volatile unsigned char *)(UART0_BASE + 0x14)) | 13 | #define MV_UART_THR ((volatile unsigned char *)(UART0_PHYS_BASE + 0x0)) |
14 | #define MV_UART_THR ((volatile unsigned char *)(UART0_BASE + 0x0)) | 14 | #define MV_UART_LSR ((volatile unsigned char *)(UART0_PHYS_BASE + 0x14)) |
15 | 15 | ||
16 | #define LSR_THRE 0x20 | 16 | #define LSR_THRE 0x20 |
17 | 17 | ||
@@ -27,16 +27,6 @@ static void flush(void) | |||
27 | { | 27 | { |
28 | } | 28 | } |
29 | 29 | ||
30 | static void orion_early_putstr(const char *ptr) | ||
31 | { | ||
32 | char c; | ||
33 | while ((c = *ptr++) != '\0') { | ||
34 | if (c == '\n') | ||
35 | putc('\r'); | ||
36 | putc(c); | ||
37 | } | ||
38 | } | ||
39 | |||
40 | /* | 30 | /* |
41 | * nothing to do | 31 | * nothing to do |
42 | */ | 32 | */ |
diff --git a/include/asm-arm/arch-orion/vmalloc.h b/include/asm-arm/arch-orion/vmalloc.h index 23e2a102fe0c..9d580278d2bc 100644 --- a/include/asm-arm/arch-orion/vmalloc.h +++ b/include/asm-arm/arch-orion/vmalloc.h | |||
@@ -2,4 +2,4 @@ | |||
2 | * include/asm-arm/arch-orion/vmalloc.h | 2 | * include/asm-arm/arch-orion/vmalloc.h |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #define VMALLOC_END 0xf0000000 | 5 | #define VMALLOC_END 0xfd800000 |
diff --git a/include/asm-arm/mutex.h b/include/asm-arm/mutex.h index cb29d84e690d..020bd98710a1 100644 --- a/include/asm-arm/mutex.h +++ b/include/asm-arm/mutex.h | |||
@@ -24,7 +24,7 @@ | |||
24 | * reattempted until it succeeds. | 24 | * reattempted until it succeeds. |
25 | */ | 25 | */ |
26 | static inline void | 26 | static inline void |
27 | __mutex_fastpath_lock(atomic_t *count, fastcall void (*fail_fn)(atomic_t *)) | 27 | __mutex_fastpath_lock(atomic_t *count, void (*fail_fn)(atomic_t *)) |
28 | { | 28 | { |
29 | int __ex_flag, __res; | 29 | int __ex_flag, __res; |
30 | 30 | ||
@@ -44,7 +44,7 @@ __mutex_fastpath_lock(atomic_t *count, fastcall void (*fail_fn)(atomic_t *)) | |||
44 | } | 44 | } |
45 | 45 | ||
46 | static inline int | 46 | static inline int |
47 | __mutex_fastpath_lock_retval(atomic_t *count, fastcall int (*fail_fn)(atomic_t *)) | 47 | __mutex_fastpath_lock_retval(atomic_t *count, int (*fail_fn)(atomic_t *)) |
48 | { | 48 | { |
49 | int __ex_flag, __res; | 49 | int __ex_flag, __res; |
50 | 50 | ||
@@ -70,7 +70,7 @@ __mutex_fastpath_lock_retval(atomic_t *count, fastcall int (*fail_fn)(atomic_t * | |||
70 | * better generated assembly. | 70 | * better generated assembly. |
71 | */ | 71 | */ |
72 | static inline void | 72 | static inline void |
73 | __mutex_fastpath_unlock(atomic_t *count, fastcall void (*fail_fn)(atomic_t *)) | 73 | __mutex_fastpath_unlock(atomic_t *count, void (*fail_fn)(atomic_t *)) |
74 | { | 74 | { |
75 | int __ex_flag, __res, __orig; | 75 | int __ex_flag, __res, __orig; |
76 | 76 | ||
diff --git a/include/asm-arm/page.h b/include/asm-arm/page.h index 31ff12f4ffb7..c86f68ee6511 100644 --- a/include/asm-arm/page.h +++ b/include/asm-arm/page.h | |||
@@ -171,6 +171,8 @@ typedef unsigned long pgprot_t; | |||
171 | 171 | ||
172 | #endif /* STRICT_MM_TYPECHECKS */ | 172 | #endif /* STRICT_MM_TYPECHECKS */ |
173 | 173 | ||
174 | typedef struct page *pgtable_t; | ||
175 | |||
174 | #endif /* CONFIG_MMU */ | 176 | #endif /* CONFIG_MMU */ |
175 | 177 | ||
176 | #include <asm/memory.h> | 178 | #include <asm/memory.h> |
diff --git a/include/asm-arm/pgalloc.h b/include/asm-arm/pgalloc.h index fb6c6e3222bd..163b0305dd76 100644 --- a/include/asm-arm/pgalloc.h +++ b/include/asm-arm/pgalloc.h | |||
@@ -66,7 +66,7 @@ pte_alloc_one_kernel(struct mm_struct *mm, unsigned long addr) | |||
66 | return pte; | 66 | return pte; |
67 | } | 67 | } |
68 | 68 | ||
69 | static inline struct page * | 69 | static inline pgtable_t |
70 | pte_alloc_one(struct mm_struct *mm, unsigned long addr) | 70 | pte_alloc_one(struct mm_struct *mm, unsigned long addr) |
71 | { | 71 | { |
72 | struct page *pte; | 72 | struct page *pte; |
@@ -75,6 +75,7 @@ pte_alloc_one(struct mm_struct *mm, unsigned long addr) | |||
75 | if (pte) { | 75 | if (pte) { |
76 | void *page = page_address(pte); | 76 | void *page = page_address(pte); |
77 | clean_dcache_area(page, sizeof(pte_t) * PTRS_PER_PTE); | 77 | clean_dcache_area(page, sizeof(pte_t) * PTRS_PER_PTE); |
78 | pgtable_page_ctor(pte); | ||
78 | } | 79 | } |
79 | 80 | ||
80 | return pte; | 81 | return pte; |
@@ -91,8 +92,9 @@ static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) | |||
91 | } | 92 | } |
92 | } | 93 | } |
93 | 94 | ||
94 | static inline void pte_free(struct mm_struct *mm, struct page *pte) | 95 | static inline void pte_free(struct mm_struct *mm, pgtable_t pte) |
95 | { | 96 | { |
97 | pgtable_page_dtor(pte); | ||
96 | __free_page(pte); | 98 | __free_page(pte); |
97 | } | 99 | } |
98 | 100 | ||
@@ -123,10 +125,11 @@ pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmdp, pte_t *ptep) | |||
123 | } | 125 | } |
124 | 126 | ||
125 | static inline void | 127 | static inline void |
126 | pmd_populate(struct mm_struct *mm, pmd_t *pmdp, struct page *ptep) | 128 | pmd_populate(struct mm_struct *mm, pmd_t *pmdp, pgtable_t ptep) |
127 | { | 129 | { |
128 | __pmd_populate(pmdp, page_to_pfn(ptep) << PAGE_SHIFT | _PAGE_USER_TABLE); | 130 | __pmd_populate(pmdp, page_to_pfn(ptep) << PAGE_SHIFT | _PAGE_USER_TABLE); |
129 | } | 131 | } |
132 | #define pmd_pgtable(pmd) pmd_page(pmd) | ||
130 | 133 | ||
131 | #endif /* CONFIG_MMU */ | 134 | #endif /* CONFIG_MMU */ |
132 | 135 | ||
diff --git a/include/asm-arm/posix_types.h b/include/asm-arm/posix_types.h index e142a2a016ca..c37379dadcb2 100644 --- a/include/asm-arm/posix_types.h +++ b/include/asm-arm/posix_types.h | |||
@@ -51,14 +51,10 @@ typedef long long __kernel_loff_t; | |||
51 | #endif | 51 | #endif |
52 | 52 | ||
53 | typedef struct { | 53 | typedef struct { |
54 | #if defined(__KERNEL__) || defined(__USE_ALL) | ||
55 | int val[2]; | 54 | 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; | 55 | } __kernel_fsid_t; |
60 | 56 | ||
61 | #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) | 57 | #if defined(__KERNEL__) |
62 | 58 | ||
63 | #undef __FD_SET | 59 | #undef __FD_SET |
64 | #define __FD_SET(fd, fdsetp) \ | 60 | #define __FD_SET(fd, fdsetp) \ |
diff --git a/include/asm-arm/processor.h b/include/asm-arm/processor.h index 1bbf16182d62..bd8029e8dc67 100644 --- a/include/asm-arm/processor.h +++ b/include/asm-arm/processor.h | |||
@@ -22,6 +22,12 @@ | |||
22 | #include <asm/ptrace.h> | 22 | #include <asm/ptrace.h> |
23 | #include <asm/types.h> | 23 | #include <asm/types.h> |
24 | 24 | ||
25 | #ifdef __KERNEL__ | ||
26 | #define STACK_TOP ((current->personality == PER_LINUX_32BIT) ? \ | ||
27 | TASK_SIZE : TASK_SIZE_26) | ||
28 | #define STACK_TOP_MAX TASK_SIZE | ||
29 | #endif | ||
30 | |||
25 | union debug_insn { | 31 | union debug_insn { |
26 | u32 arm; | 32 | u32 arm; |
27 | u16 thumb; | 33 | u16 thumb; |