diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-10-11 05:55:04 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-10-11 05:55:04 -0400 |
commit | a0f0dd57f4a85310d9936f1770a0424b49fef876 (patch) | |
tree | 2f85b8b67dda13d19b02ca39e0fbef921cb1cf8b /arch/arm/include | |
parent | 2a552d5e63d7fa602c9a9a0717008737f55625a6 (diff) | |
parent | 846a136881b8f73c1f74250bf6acfaa309cab1f2 (diff) |
Merge branch 'fixes' into for-linus
Conflicts:
arch/arm/kernel/smp.c
Diffstat (limited to 'arch/arm/include')
58 files changed, 814 insertions, 829 deletions
diff --git a/arch/arm/include/asm/Kbuild b/arch/arm/include/asm/Kbuild index 960abceb8e1..8a7196ca510 100644 --- a/arch/arm/include/asm/Kbuild +++ b/arch/arm/include/asm/Kbuild | |||
@@ -5,16 +5,33 @@ header-y += hwcap.h | |||
5 | generic-y += auxvec.h | 5 | generic-y += auxvec.h |
6 | generic-y += bitsperlong.h | 6 | generic-y += bitsperlong.h |
7 | generic-y += cputime.h | 7 | generic-y += cputime.h |
8 | generic-y += current.h | ||
8 | generic-y += emergency-restart.h | 9 | generic-y += emergency-restart.h |
9 | generic-y += errno.h | 10 | generic-y += errno.h |
11 | generic-y += exec.h | ||
10 | generic-y += ioctl.h | 12 | generic-y += ioctl.h |
13 | generic-y += ipcbuf.h | ||
11 | generic-y += irq_regs.h | 14 | generic-y += irq_regs.h |
12 | generic-y += kdebug.h | 15 | generic-y += kdebug.h |
13 | generic-y += local.h | 16 | generic-y += local.h |
14 | generic-y += local64.h | 17 | generic-y += local64.h |
18 | generic-y += msgbuf.h | ||
19 | generic-y += param.h | ||
20 | generic-y += parport.h | ||
15 | generic-y += percpu.h | 21 | generic-y += percpu.h |
16 | generic-y += poll.h | 22 | generic-y += poll.h |
17 | generic-y += resource.h | 23 | generic-y += resource.h |
18 | generic-y += sections.h | 24 | generic-y += sections.h |
25 | generic-y += segment.h | ||
26 | generic-y += sembuf.h | ||
27 | generic-y += serial.h | ||
28 | generic-y += shmbuf.h | ||
19 | generic-y += siginfo.h | 29 | generic-y += siginfo.h |
20 | generic-y += sizes.h | 30 | generic-y += sizes.h |
31 | generic-y += socket.h | ||
32 | generic-y += sockios.h | ||
33 | generic-y += termbits.h | ||
34 | generic-y += termios.h | ||
35 | generic-y += timex.h | ||
36 | generic-y += types.h | ||
37 | generic-y += unaligned.h | ||
diff --git a/arch/arm/include/asm/arch_timer.h b/arch/arm/include/asm/arch_timer.h index 62e75475e57..d40229d9a1c 100644 --- a/arch/arm/include/asm/arch_timer.h +++ b/arch/arm/include/asm/arch_timer.h | |||
@@ -2,11 +2,12 @@ | |||
2 | #define __ASMARM_ARCH_TIMER_H | 2 | #define __ASMARM_ARCH_TIMER_H |
3 | 3 | ||
4 | #include <asm/errno.h> | 4 | #include <asm/errno.h> |
5 | #include <linux/clocksource.h> | ||
5 | 6 | ||
6 | #ifdef CONFIG_ARM_ARCH_TIMER | 7 | #ifdef CONFIG_ARM_ARCH_TIMER |
7 | #define ARCH_HAS_READ_CURRENT_TIMER | ||
8 | int arch_timer_of_register(void); | 8 | int arch_timer_of_register(void); |
9 | int arch_timer_sched_clock_init(void); | 9 | int arch_timer_sched_clock_init(void); |
10 | struct timecounter *arch_timer_get_timecounter(void); | ||
10 | #else | 11 | #else |
11 | static inline int arch_timer_of_register(void) | 12 | static inline int arch_timer_of_register(void) |
12 | { | 13 | { |
@@ -17,6 +18,11 @@ static inline int arch_timer_sched_clock_init(void) | |||
17 | { | 18 | { |
18 | return -ENXIO; | 19 | return -ENXIO; |
19 | } | 20 | } |
21 | |||
22 | static inline struct timecounter *arch_timer_get_timecounter(void) | ||
23 | { | ||
24 | return NULL; | ||
25 | } | ||
20 | #endif | 26 | #endif |
21 | 27 | ||
22 | #endif | 28 | #endif |
diff --git a/arch/arm/include/asm/barrier.h b/arch/arm/include/asm/barrier.h index 05112380dc5..8dcd9c702d9 100644 --- a/arch/arm/include/asm/barrier.h +++ b/arch/arm/include/asm/barrier.h | |||
@@ -44,10 +44,9 @@ | |||
44 | #define rmb() dsb() | 44 | #define rmb() dsb() |
45 | #define wmb() mb() | 45 | #define wmb() mb() |
46 | #else | 46 | #else |
47 | #include <asm/memory.h> | 47 | #define mb() barrier() |
48 | #define mb() do { if (arch_is_coherent()) dmb(); else barrier(); } while (0) | 48 | #define rmb() barrier() |
49 | #define rmb() do { if (arch_is_coherent()) dmb(); else barrier(); } while (0) | 49 | #define wmb() barrier() |
50 | #define wmb() do { if (arch_is_coherent()) dmb(); else barrier(); } while (0) | ||
51 | #endif | 50 | #endif |
52 | 51 | ||
53 | #ifndef CONFIG_SMP | 52 | #ifndef CONFIG_SMP |
diff --git a/arch/arm/include/asm/current.h b/arch/arm/include/asm/current.h deleted file mode 100644 index 75d21e2a3ff..00000000000 --- a/arch/arm/include/asm/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 | |||
6 | static inline struct task_struct *get_current(void) __attribute_const__; | ||
7 | |||
8 | static 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/arch/arm/include/asm/delay.h b/arch/arm/include/asm/delay.h index dc6145120de..ab98fdd083b 100644 --- a/arch/arm/include/asm/delay.h +++ b/arch/arm/include/asm/delay.h | |||
@@ -15,6 +15,11 @@ | |||
15 | 15 | ||
16 | #ifndef __ASSEMBLY__ | 16 | #ifndef __ASSEMBLY__ |
17 | 17 | ||
18 | struct delay_timer { | ||
19 | unsigned long (*read_current_timer)(void); | ||
20 | unsigned long freq; | ||
21 | }; | ||
22 | |||
18 | extern struct arm_delay_ops { | 23 | extern struct arm_delay_ops { |
19 | void (*delay)(unsigned long); | 24 | void (*delay)(unsigned long); |
20 | void (*const_udelay)(unsigned long); | 25 | void (*const_udelay)(unsigned long); |
@@ -56,6 +61,10 @@ extern void __loop_delay(unsigned long loops); | |||
56 | extern void __loop_udelay(unsigned long usecs); | 61 | extern void __loop_udelay(unsigned long usecs); |
57 | extern void __loop_const_udelay(unsigned long); | 62 | extern void __loop_const_udelay(unsigned long); |
58 | 63 | ||
64 | /* Delay-loop timer registration. */ | ||
65 | #define ARCH_HAS_READ_CURRENT_TIMER | ||
66 | extern void register_current_timer_delay(const struct delay_timer *timer); | ||
67 | |||
59 | #endif /* __ASSEMBLY__ */ | 68 | #endif /* __ASSEMBLY__ */ |
60 | 69 | ||
61 | #endif /* defined(_ARM_DELAY_H) */ | 70 | #endif /* defined(_ARM_DELAY_H) */ |
diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h index 5c44dcb0987..23004847bb0 100644 --- a/arch/arm/include/asm/dma-mapping.h +++ b/arch/arm/include/asm/dma-mapping.h | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #define DMA_ERROR_CODE (~0) | 14 | #define DMA_ERROR_CODE (~0) |
15 | extern struct dma_map_ops arm_dma_ops; | 15 | extern struct dma_map_ops arm_dma_ops; |
16 | extern struct dma_map_ops arm_coherent_dma_ops; | ||
16 | 17 | ||
17 | static inline struct dma_map_ops *get_dma_ops(struct device *dev) | 18 | static inline struct dma_map_ops *get_dma_ops(struct device *dev) |
18 | { | 19 | { |
diff --git a/arch/arm/include/asm/exec.h b/arch/arm/include/asm/exec.h deleted file mode 100644 index 7c4fbef72b3..00000000000 --- a/arch/arm/include/asm/exec.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __ASM_ARM_EXEC_H | ||
2 | #define __ASM_ARM_EXEC_H | ||
3 | |||
4 | #define arch_align_stack(x) (x) | ||
5 | |||
6 | #endif /* __ASM_ARM_EXEC_H */ | ||
diff --git a/arch/arm/include/asm/glue-cache.h b/arch/arm/include/asm/glue-cache.h index 2d6a7de87a8..cca9f15704e 100644 --- a/arch/arm/include/asm/glue-cache.h +++ b/arch/arm/include/asm/glue-cache.h | |||
@@ -110,19 +110,19 @@ | |||
110 | #endif | 110 | #endif |
111 | 111 | ||
112 | #if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) | 112 | #if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) |
113 | //# ifdef _CACHE | 113 | # ifdef _CACHE |
114 | # define MULTI_CACHE 1 | 114 | # define MULTI_CACHE 1 |
115 | //# else | 115 | # else |
116 | //# define _CACHE v6 | 116 | # define _CACHE v6 |
117 | //# endif | 117 | # endif |
118 | #endif | 118 | #endif |
119 | 119 | ||
120 | #if defined(CONFIG_CPU_V7) | 120 | #if defined(CONFIG_CPU_V7) |
121 | //# ifdef _CACHE | 121 | # ifdef _CACHE |
122 | # define MULTI_CACHE 1 | 122 | # define MULTI_CACHE 1 |
123 | //# else | 123 | # else |
124 | //# define _CACHE v7 | 124 | # define _CACHE v7 |
125 | //# endif | 125 | # endif |
126 | #endif | 126 | #endif |
127 | 127 | ||
128 | #if !defined(_CACHE) && !defined(MULTI_CACHE) | 128 | #if !defined(_CACHE) && !defined(MULTI_CACHE) |
diff --git a/arch/arm/include/asm/gpio.h b/arch/arm/include/asm/gpio.h index c402e9b31f4..477e0206e01 100644 --- a/arch/arm/include/asm/gpio.h +++ b/arch/arm/include/asm/gpio.h | |||
@@ -6,7 +6,9 @@ | |||
6 | #endif | 6 | #endif |
7 | 7 | ||
8 | /* not all ARM platforms necessarily support this API ... */ | 8 | /* not all ARM platforms necessarily support this API ... */ |
9 | #ifdef CONFIG_NEED_MACH_GPIO_H | ||
9 | #include <mach/gpio.h> | 10 | #include <mach/gpio.h> |
11 | #endif | ||
10 | 12 | ||
11 | #ifndef __ARM_GPIOLIB_COMPLEX | 13 | #ifndef __ARM_GPIOLIB_COMPLEX |
12 | /* Note: this may rely upon the value of ARCH_NR_GPIOS set in mach/gpio.h */ | 14 | /* Note: this may rely upon the value of ARCH_NR_GPIOS set in mach/gpio.h */ |
diff --git a/arch/arm/include/asm/hardirq.h b/arch/arm/include/asm/hardirq.h index 436e60b2cf7..2740c2a2df6 100644 --- a/arch/arm/include/asm/hardirq.h +++ b/arch/arm/include/asm/hardirq.h | |||
@@ -5,7 +5,7 @@ | |||
5 | #include <linux/threads.h> | 5 | #include <linux/threads.h> |
6 | #include <asm/irq.h> | 6 | #include <asm/irq.h> |
7 | 7 | ||
8 | #define NR_IPI 5 | 8 | #define NR_IPI 6 |
9 | 9 | ||
10 | typedef struct { | 10 | typedef struct { |
11 | unsigned int __softirq_pending; | 11 | unsigned int __softirq_pending; |
diff --git a/arch/arm/include/asm/hardware/cache-tauros2.h b/arch/arm/include/asm/hardware/cache-tauros2.h index 538f17ca905..295e2e40151 100644 --- a/arch/arm/include/asm/hardware/cache-tauros2.h +++ b/arch/arm/include/asm/hardware/cache-tauros2.h | |||
@@ -8,4 +8,7 @@ | |||
8 | * warranty of any kind, whether express or implied. | 8 | * warranty of any kind, whether express or implied. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | extern void __init tauros2_init(void); | 11 | #define CACHE_TAUROS2_PREFETCH_ON (1 << 0) |
12 | #define CACHE_TAUROS2_LINEFILL_BURST8 (1 << 1) | ||
13 | |||
14 | extern void __init tauros2_init(unsigned int features); | ||
diff --git a/arch/arm/include/asm/hardware/iop3xx.h b/arch/arm/include/asm/hardware/iop3xx.h index 2ff2c75a463..02fe2fbe247 100644 --- a/arch/arm/include/asm/hardware/iop3xx.h +++ b/arch/arm/include/asm/hardware/iop3xx.h | |||
@@ -217,18 +217,8 @@ extern int iop3xx_get_init_atu(void); | |||
217 | #define IOP3XX_PCI_LOWER_MEM_PA 0x80000000 | 217 | #define IOP3XX_PCI_LOWER_MEM_PA 0x80000000 |
218 | #define IOP3XX_PCI_MEM_WINDOW_SIZE 0x08000000 | 218 | #define IOP3XX_PCI_MEM_WINDOW_SIZE 0x08000000 |
219 | 219 | ||
220 | #define IOP3XX_PCI_IO_WINDOW_SIZE 0x00010000 | ||
221 | #define IOP3XX_PCI_LOWER_IO_PA 0x90000000 | 220 | #define IOP3XX_PCI_LOWER_IO_PA 0x90000000 |
222 | #define IOP3XX_PCI_LOWER_IO_VA 0xfe000000 | 221 | #define IOP3XX_PCI_LOWER_IO_BA 0x00000000 |
223 | #define IOP3XX_PCI_LOWER_IO_BA 0x90000000 | ||
224 | #define IOP3XX_PCI_UPPER_IO_PA (IOP3XX_PCI_LOWER_IO_PA +\ | ||
225 | IOP3XX_PCI_IO_WINDOW_SIZE - 1) | ||
226 | #define IOP3XX_PCI_UPPER_IO_VA (IOP3XX_PCI_LOWER_IO_VA +\ | ||
227 | IOP3XX_PCI_IO_WINDOW_SIZE - 1) | ||
228 | #define IOP3XX_PCI_IO_PHYS_TO_VIRT(addr) (((u32) (addr) -\ | ||
229 | IOP3XX_PCI_LOWER_IO_PA) +\ | ||
230 | IOP3XX_PCI_LOWER_IO_VA) | ||
231 | |||
232 | 222 | ||
233 | #ifndef __ASSEMBLY__ | 223 | #ifndef __ASSEMBLY__ |
234 | 224 | ||
diff --git a/arch/arm/include/asm/hardware/linkup-l1110.h b/arch/arm/include/asm/hardware/linkup-l1110.h deleted file mode 100644 index 7ec91168a57..00000000000 --- a/arch/arm/include/asm/hardware/linkup-l1110.h +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | /* | ||
2 | * | ||
3 | * Definitions for H3600 Handheld Computer | ||
4 | * | ||
5 | * Copyright 2001 Compaq Computer Corporation. | ||
6 | * | ||
7 | * Use consistent with the GNU GPL is permitted, | ||
8 | * provided that this copyright notice is | ||
9 | * preserved in its entirety in all copies and derived works. | ||
10 | * | ||
11 | * COMPAQ COMPUTER CORPORATION MAKES NO WARRANTIES, EXPRESSED OR IMPLIED, | ||
12 | * AS TO THE USEFULNESS OR CORRECTNESS OF THIS CODE OR ITS | ||
13 | * FITNESS FOR ANY PARTICULAR PURPOSE. | ||
14 | * | ||
15 | * Author: Jamey Hicks. | ||
16 | * | ||
17 | */ | ||
18 | |||
19 | /* LinkUp Systems PCCard/CompactFlash Interface for SA-1100 */ | ||
20 | |||
21 | /* PC Card Status Register */ | ||
22 | #define LINKUP_PRS_S1 (1 << 0) /* voltage control bits S1-S4 */ | ||
23 | #define LINKUP_PRS_S2 (1 << 1) | ||
24 | #define LINKUP_PRS_S3 (1 << 2) | ||
25 | #define LINKUP_PRS_S4 (1 << 3) | ||
26 | #define LINKUP_PRS_BVD1 (1 << 4) | ||
27 | #define LINKUP_PRS_BVD2 (1 << 5) | ||
28 | #define LINKUP_PRS_VS1 (1 << 6) | ||
29 | #define LINKUP_PRS_VS2 (1 << 7) | ||
30 | #define LINKUP_PRS_RDY (1 << 8) | ||
31 | #define LINKUP_PRS_CD1 (1 << 9) | ||
32 | #define LINKUP_PRS_CD2 (1 << 10) | ||
33 | |||
34 | /* PC Card Command Register */ | ||
35 | #define LINKUP_PRC_S1 (1 << 0) | ||
36 | #define LINKUP_PRC_S2 (1 << 1) | ||
37 | #define LINKUP_PRC_S3 (1 << 2) | ||
38 | #define LINKUP_PRC_S4 (1 << 3) | ||
39 | #define LINKUP_PRC_RESET (1 << 4) | ||
40 | #define LINKUP_PRC_APOE (1 << 5) /* Auto Power Off Enable: clears S1-S4 when either nCD goes high */ | ||
41 | #define LINKUP_PRC_CFE (1 << 6) /* CompactFlash mode Enable: addresses A[10:0] only, A[25:11] high */ | ||
42 | #define LINKUP_PRC_SOE (1 << 7) /* signal output driver enable */ | ||
43 | #define LINKUP_PRC_SSP (1 << 8) /* sock select polarity: 0 for socket 0, 1 for socket 1 */ | ||
44 | #define LINKUP_PRC_MBZ (1 << 15) /* must be zero */ | ||
45 | |||
46 | struct linkup_l1110 { | ||
47 | volatile short prc; | ||
48 | }; | ||
diff --git a/arch/arm/include/asm/hypervisor.h b/arch/arm/include/asm/hypervisor.h new file mode 100644 index 00000000000..b90d9e523d6 --- /dev/null +++ b/arch/arm/include/asm/hypervisor.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef _ASM_ARM_HYPERVISOR_H | ||
2 | #define _ASM_ARM_HYPERVISOR_H | ||
3 | |||
4 | #include <asm/xen/hypervisor.h> | ||
5 | |||
6 | #endif | ||
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h index 815c669fec0..35c1ed89b93 100644 --- a/arch/arm/include/asm/io.h +++ b/arch/arm/include/asm/io.h | |||
@@ -47,13 +47,68 @@ extern void __raw_readsb(const void __iomem *addr, void *data, int bytelen); | |||
47 | extern void __raw_readsw(const void __iomem *addr, void *data, int wordlen); | 47 | extern void __raw_readsw(const void __iomem *addr, void *data, int wordlen); |
48 | extern void __raw_readsl(const void __iomem *addr, void *data, int longlen); | 48 | extern void __raw_readsl(const void __iomem *addr, void *data, int longlen); |
49 | 49 | ||
50 | #define __raw_writeb(v,a) ((void)(__chk_io_ptr(a), *(volatile unsigned char __force *)(a) = (v))) | 50 | #if __LINUX_ARM_ARCH__ < 6 |
51 | #define __raw_writew(v,a) ((void)(__chk_io_ptr(a), *(volatile unsigned short __force *)(a) = (v))) | 51 | /* |
52 | #define __raw_writel(v,a) ((void)(__chk_io_ptr(a), *(volatile unsigned int __force *)(a) = (v))) | 52 | * Half-word accesses are problematic with RiscPC due to limitations of |
53 | * the bus. Rather than special-case the machine, just let the compiler | ||
54 | * generate the access for CPUs prior to ARMv6. | ||
55 | */ | ||
56 | #define __raw_readw(a) (__chk_io_ptr(a), *(volatile unsigned short __force *)(a)) | ||
57 | #define __raw_writew(v,a) ((void)(__chk_io_ptr(a), *(volatile unsigned short __force *)(a) = (v))) | ||
58 | #else | ||
59 | /* | ||
60 | * When running under a hypervisor, we want to avoid I/O accesses with | ||
61 | * writeback addressing modes as these incur a significant performance | ||
62 | * overhead (the address generation must be emulated in software). | ||
63 | */ | ||
64 | static inline void __raw_writew(u16 val, volatile void __iomem *addr) | ||
65 | { | ||
66 | asm volatile("strh %1, %0" | ||
67 | : "+Qo" (*(volatile u16 __force *)addr) | ||
68 | : "r" (val)); | ||
69 | } | ||
70 | |||
71 | static inline u16 __raw_readw(const volatile void __iomem *addr) | ||
72 | { | ||
73 | u16 val; | ||
74 | asm volatile("ldrh %1, %0" | ||
75 | : "+Qo" (*(volatile u16 __force *)addr), | ||
76 | "=r" (val)); | ||
77 | return val; | ||
78 | } | ||
79 | #endif | ||
80 | |||
81 | static inline void __raw_writeb(u8 val, volatile void __iomem *addr) | ||
82 | { | ||
83 | asm volatile("strb %1, %0" | ||
84 | : "+Qo" (*(volatile u8 __force *)addr) | ||
85 | : "r" (val)); | ||
86 | } | ||
87 | |||
88 | static inline void __raw_writel(u32 val, volatile void __iomem *addr) | ||
89 | { | ||
90 | asm volatile("str %1, %0" | ||
91 | : "+Qo" (*(volatile u32 __force *)addr) | ||
92 | : "r" (val)); | ||
93 | } | ||
94 | |||
95 | static inline u8 __raw_readb(const volatile void __iomem *addr) | ||
96 | { | ||
97 | u8 val; | ||
98 | asm volatile("ldrb %1, %0" | ||
99 | : "+Qo" (*(volatile u8 __force *)addr), | ||
100 | "=r" (val)); | ||
101 | return val; | ||
102 | } | ||
53 | 103 | ||
54 | #define __raw_readb(a) (__chk_io_ptr(a), *(volatile unsigned char __force *)(a)) | 104 | static inline u32 __raw_readl(const volatile void __iomem *addr) |
55 | #define __raw_readw(a) (__chk_io_ptr(a), *(volatile unsigned short __force *)(a)) | 105 | { |
56 | #define __raw_readl(a) (__chk_io_ptr(a), *(volatile unsigned int __force *)(a)) | 106 | u32 val; |
107 | asm volatile("ldr %1, %0" | ||
108 | : "+Qo" (*(volatile u32 __force *)addr), | ||
109 | "=r" (val)); | ||
110 | return val; | ||
111 | } | ||
57 | 112 | ||
58 | /* | 113 | /* |
59 | * Architecture ioremap implementation. | 114 | * Architecture ioremap implementation. |
@@ -113,11 +168,19 @@ static inline void __iomem *__typesafe_io(unsigned long addr) | |||
113 | #define __iowmb() do { } while (0) | 168 | #define __iowmb() do { } while (0) |
114 | #endif | 169 | #endif |
115 | 170 | ||
171 | /* PCI fixed i/o mapping */ | ||
172 | #define PCI_IO_VIRT_BASE 0xfee00000 | ||
173 | |||
174 | extern int pci_ioremap_io(unsigned int offset, phys_addr_t phys_addr); | ||
175 | |||
116 | /* | 176 | /* |
117 | * Now, pick up the machine-defined IO definitions | 177 | * Now, pick up the machine-defined IO definitions |
118 | */ | 178 | */ |
119 | #ifdef CONFIG_NEED_MACH_IO_H | 179 | #ifdef CONFIG_NEED_MACH_IO_H |
120 | #include <mach/io.h> | 180 | #include <mach/io.h> |
181 | #elif defined(CONFIG_PCI) | ||
182 | #define IO_SPACE_LIMIT ((resource_size_t)0xfffff) | ||
183 | #define __io(a) __typesafe_io(PCI_IO_VIRT_BASE + ((a) & IO_SPACE_LIMIT)) | ||
121 | #else | 184 | #else |
122 | #define __io(a) __typesafe_io((a) & IO_SPACE_LIMIT) | 185 | #define __io(a) __typesafe_io((a) & IO_SPACE_LIMIT) |
123 | #endif | 186 | #endif |
diff --git a/arch/arm/include/asm/ipcbuf.h b/arch/arm/include/asm/ipcbuf.h deleted file mode 100644 index 84c7e51cb6d..00000000000 --- a/arch/arm/include/asm/ipcbuf.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/ipcbuf.h> | ||
diff --git a/arch/arm/include/asm/leds.h b/arch/arm/include/asm/leds.h deleted file mode 100644 index c545739f39b..00000000000 --- a/arch/arm/include/asm/leds.h +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/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 | |||
17 | typedef 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 | ||
45 | extern void (*leds_event)(led_event_t); | ||
46 | #else | ||
47 | #define leds_event(e) | ||
48 | #endif | ||
49 | |||
50 | #endif | ||
diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h index 0b1c94b8c65..917d4fcfd9b 100644 --- a/arch/arm/include/asm/mach/arch.h +++ b/arch/arm/include/asm/mach/arch.h | |||
@@ -14,6 +14,12 @@ struct tag; | |||
14 | struct meminfo; | 14 | struct meminfo; |
15 | struct sys_timer; | 15 | struct sys_timer; |
16 | struct pt_regs; | 16 | struct pt_regs; |
17 | struct smp_operations; | ||
18 | #ifdef CONFIG_SMP | ||
19 | #define smp_ops(ops) (&(ops)) | ||
20 | #else | ||
21 | #define smp_ops(ops) (struct smp_operations *)NULL | ||
22 | #endif | ||
17 | 23 | ||
18 | struct machine_desc { | 24 | struct machine_desc { |
19 | unsigned int nr; /* architecture number */ | 25 | unsigned int nr; /* architecture number */ |
@@ -35,6 +41,7 @@ struct machine_desc { | |||
35 | unsigned char reserve_lp1 :1; /* never has lp1 */ | 41 | unsigned char reserve_lp1 :1; /* never has lp1 */ |
36 | unsigned char reserve_lp2 :1; /* never has lp2 */ | 42 | unsigned char reserve_lp2 :1; /* never has lp2 */ |
37 | char restart_mode; /* default restart mode */ | 43 | char restart_mode; /* default restart mode */ |
44 | struct smp_operations *smp; /* SMP operations */ | ||
38 | void (*fixup)(struct tag *, char **, | 45 | void (*fixup)(struct tag *, char **, |
39 | struct meminfo *); | 46 | struct meminfo *); |
40 | void (*reserve)(void);/* reserve mem blocks */ | 47 | void (*reserve)(void);/* reserve mem blocks */ |
diff --git a/arch/arm/include/asm/mach/map.h b/arch/arm/include/asm/mach/map.h index a6efcdd6fd2..195ac2f9d3d 100644 --- a/arch/arm/include/asm/mach/map.h +++ b/arch/arm/include/asm/mach/map.h | |||
@@ -9,6 +9,9 @@ | |||
9 | * | 9 | * |
10 | * Page table mapping constructs and function prototypes | 10 | * Page table mapping constructs and function prototypes |
11 | */ | 11 | */ |
12 | #ifndef __ASM_MACH_MAP_H | ||
13 | #define __ASM_MACH_MAP_H | ||
14 | |||
12 | #include <asm/io.h> | 15 | #include <asm/io.h> |
13 | 16 | ||
14 | struct map_desc { | 17 | struct map_desc { |
@@ -34,6 +37,8 @@ struct map_desc { | |||
34 | 37 | ||
35 | #ifdef CONFIG_MMU | 38 | #ifdef CONFIG_MMU |
36 | extern void iotable_init(struct map_desc *, int); | 39 | extern void iotable_init(struct map_desc *, int); |
40 | extern void vm_reserve_area_early(unsigned long addr, unsigned long size, | ||
41 | void *caller); | ||
37 | 42 | ||
38 | struct mem_type; | 43 | struct mem_type; |
39 | extern const struct mem_type *get_mem_type(unsigned int type); | 44 | extern const struct mem_type *get_mem_type(unsigned int type); |
@@ -44,4 +49,7 @@ extern int ioremap_page(unsigned long virt, unsigned long phys, | |||
44 | const struct mem_type *mtype); | 49 | const struct mem_type *mtype); |
45 | #else | 50 | #else |
46 | #define iotable_init(map,num) do { } while (0) | 51 | #define iotable_init(map,num) do { } while (0) |
52 | #define vm_reserve_area_early(a,s,c) do { } while (0) | ||
53 | #endif | ||
54 | |||
47 | #endif | 55 | #endif |
diff --git a/arch/arm/include/asm/mach/pci.h b/arch/arm/include/asm/mach/pci.h index 26c511fddf8..db9fedb57f2 100644 --- a/arch/arm/include/asm/mach/pci.h +++ b/arch/arm/include/asm/mach/pci.h | |||
@@ -11,6 +11,8 @@ | |||
11 | #ifndef __ASM_MACH_PCI_H | 11 | #ifndef __ASM_MACH_PCI_H |
12 | #define __ASM_MACH_PCI_H | 12 | #define __ASM_MACH_PCI_H |
13 | 13 | ||
14 | #include <linux/ioport.h> | ||
15 | |||
14 | struct pci_sys_data; | 16 | struct pci_sys_data; |
15 | struct pci_ops; | 17 | struct pci_ops; |
16 | struct pci_bus; | 18 | struct pci_bus; |
@@ -42,6 +44,8 @@ struct pci_sys_data { | |||
42 | unsigned long io_offset; /* bus->cpu IO mapping offset */ | 44 | unsigned long io_offset; /* bus->cpu IO mapping offset */ |
43 | struct pci_bus *bus; /* PCI bus */ | 45 | struct pci_bus *bus; /* PCI bus */ |
44 | struct list_head resources; /* root bus resources (apertures) */ | 46 | struct list_head resources; /* root bus resources (apertures) */ |
47 | struct resource io_res; | ||
48 | char io_res_name[12]; | ||
45 | /* Bridge swizzling */ | 49 | /* Bridge swizzling */ |
46 | u8 (*swizzle)(struct pci_dev *, u8 *); | 50 | u8 (*swizzle)(struct pci_dev *, u8 *); |
47 | /* IRQ mapping */ | 51 | /* IRQ mapping */ |
@@ -55,6 +59,15 @@ struct pci_sys_data { | |||
55 | void pci_common_init(struct hw_pci *); | 59 | void pci_common_init(struct hw_pci *); |
56 | 60 | ||
57 | /* | 61 | /* |
62 | * Setup early fixed I/O mapping. | ||
63 | */ | ||
64 | #if defined(CONFIG_PCI) | ||
65 | extern void pci_map_io_early(unsigned long pfn); | ||
66 | #else | ||
67 | static inline void pci_map_io_early(unsigned long pfn) {} | ||
68 | #endif | ||
69 | |||
70 | /* | ||
58 | * PCI controllers | 71 | * PCI controllers |
59 | */ | 72 | */ |
60 | extern struct pci_ops iop3xx_ops; | 73 | extern struct pci_ops iop3xx_ops; |
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h index 5f6ddcc5645..73cf03aa981 100644 --- a/arch/arm/include/asm/memory.h +++ b/arch/arm/include/asm/memory.h | |||
@@ -275,14 +275,6 @@ static inline __deprecated void *bus_to_virt(unsigned long x) | |||
275 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) | 275 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) |
276 | #define virt_addr_valid(kaddr) ((unsigned long)(kaddr) >= PAGE_OFFSET && (unsigned long)(kaddr) < (unsigned long)high_memory) | 276 | #define virt_addr_valid(kaddr) ((unsigned long)(kaddr) >= PAGE_OFFSET && (unsigned long)(kaddr) < (unsigned long)high_memory) |
277 | 277 | ||
278 | /* | ||
279 | * Optional coherency support. Currently used only by selected | ||
280 | * Intel XSC3-based systems. | ||
281 | */ | ||
282 | #ifndef arch_is_coherent | ||
283 | #define arch_is_coherent() 0 | ||
284 | #endif | ||
285 | |||
286 | #endif | 278 | #endif |
287 | 279 | ||
288 | #include <asm-generic/memory_model.h> | 280 | #include <asm-generic/memory_model.h> |
diff --git a/arch/arm/include/asm/msgbuf.h b/arch/arm/include/asm/msgbuf.h deleted file mode 100644 index 33b35b946ea..00000000000 --- a/arch/arm/include/asm/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 | |||
14 | struct 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/arch/arm/include/asm/mutex.h b/arch/arm/include/asm/mutex.h index b1479fd04a9..87c044910fe 100644 --- a/arch/arm/include/asm/mutex.h +++ b/arch/arm/include/asm/mutex.h | |||
@@ -9,8 +9,13 @@ | |||
9 | #define _ASM_MUTEX_H | 9 | #define _ASM_MUTEX_H |
10 | /* | 10 | /* |
11 | * On pre-ARMv6 hardware this results in a swp-based implementation, | 11 | * On pre-ARMv6 hardware this results in a swp-based implementation, |
12 | * which is the most efficient. For ARMv6+, we emit a pair of exclusive | 12 | * which is the most efficient. For ARMv6+, we have exclusive memory |
13 | * accesses instead. | 13 | * accessors and use atomic_dec to avoid the extra xchg operations |
14 | * on the locking slowpaths. | ||
14 | */ | 15 | */ |
16 | #if __LINUX_ARM_ARCH__ < 6 | ||
15 | #include <asm-generic/mutex-xchg.h> | 17 | #include <asm-generic/mutex-xchg.h> |
18 | #else | ||
19 | #include <asm-generic/mutex-dec.h> | ||
16 | #endif | 20 | #endif |
21 | #endif /* _ASM_MUTEX_H */ | ||
diff --git a/arch/arm/include/asm/page.h b/arch/arm/include/asm/page.h index ecf901902e4..812a4944e78 100644 --- a/arch/arm/include/asm/page.h +++ b/arch/arm/include/asm/page.h | |||
@@ -19,7 +19,7 @@ | |||
19 | 19 | ||
20 | #ifndef CONFIG_MMU | 20 | #ifndef CONFIG_MMU |
21 | 21 | ||
22 | #include "page-nommu.h" | 22 | #include <asm/page-nommu.h> |
23 | 23 | ||
24 | #else | 24 | #else |
25 | 25 | ||
diff --git a/arch/arm/include/asm/param.h b/arch/arm/include/asm/param.h deleted file mode 100644 index 8b24bf94c06..00000000000 --- a/arch/arm/include/asm/param.h +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/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 | #ifdef __KERNEL__ | ||
14 | # define HZ CONFIG_HZ /* Internal kernel timer frequency */ | ||
15 | # define USER_HZ 100 /* User interfaces are in "ticks" */ | ||
16 | # define CLOCKS_PER_SEC (USER_HZ) /* like times() */ | ||
17 | #else | ||
18 | # define HZ 100 | ||
19 | #endif | ||
20 | |||
21 | #define EXEC_PAGESIZE 4096 | ||
22 | |||
23 | #ifndef NOGROUP | ||
24 | #define NOGROUP (-1) | ||
25 | #endif | ||
26 | |||
27 | /* max length of hostname */ | ||
28 | #define MAXHOSTNAMELEN 64 | ||
29 | |||
30 | #endif | ||
31 | |||
diff --git a/arch/arm/include/asm/parport.h b/arch/arm/include/asm/parport.h deleted file mode 100644 index 26e94b09035..00000000000 --- a/arch/arm/include/asm/parport.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/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 | |||
12 | static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma); | ||
13 | static 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/arch/arm/include/asm/perf_event.h b/arch/arm/include/asm/perf_event.h index e074948d814..625cd621a43 100644 --- a/arch/arm/include/asm/perf_event.h +++ b/arch/arm/include/asm/perf_event.h | |||
@@ -12,6 +12,13 @@ | |||
12 | #ifndef __ARM_PERF_EVENT_H__ | 12 | #ifndef __ARM_PERF_EVENT_H__ |
13 | #define __ARM_PERF_EVENT_H__ | 13 | #define __ARM_PERF_EVENT_H__ |
14 | 14 | ||
15 | /* Nothing to see here... */ | 15 | /* |
16 | * The ARMv7 CPU PMU supports up to 32 event counters. | ||
17 | */ | ||
18 | #define ARMPMU_MAX_HWEVENTS 32 | ||
19 | |||
20 | #define HW_OP_UNSUPPORTED 0xFFFF | ||
21 | #define C(_x) PERF_COUNT_HW_CACHE_##_x | ||
22 | #define CACHE_OP_UNSUPPORTED 0xFFFF | ||
16 | 23 | ||
17 | #endif /* __ARM_PERF_EVENT_H__ */ | 24 | #endif /* __ARM_PERF_EVENT_H__ */ |
diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h index 41dc31f834c..08c12312a1f 100644 --- a/arch/arm/include/asm/pgtable.h +++ b/arch/arm/include/asm/pgtable.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #ifndef CONFIG_MMU | 16 | #ifndef CONFIG_MMU |
17 | 17 | ||
18 | #include <asm-generic/4level-fixup.h> | 18 | #include <asm-generic/4level-fixup.h> |
19 | #include "pgtable-nommu.h" | 19 | #include <asm/pgtable-nommu.h> |
20 | 20 | ||
21 | #else | 21 | #else |
22 | 22 | ||
diff --git a/arch/arm/include/asm/pmu.h b/arch/arm/include/asm/pmu.h index 4432305f4a2..a26170dce02 100644 --- a/arch/arm/include/asm/pmu.h +++ b/arch/arm/include/asm/pmu.h | |||
@@ -16,69 +16,30 @@ | |||
16 | #include <linux/perf_event.h> | 16 | #include <linux/perf_event.h> |
17 | 17 | ||
18 | /* | 18 | /* |
19 | * Types of PMUs that can be accessed directly and require mutual | ||
20 | * exclusion between profiling tools. | ||
21 | */ | ||
22 | enum arm_pmu_type { | ||
23 | ARM_PMU_DEVICE_CPU = 0, | ||
24 | ARM_NUM_PMU_DEVICES, | ||
25 | }; | ||
26 | |||
27 | /* | ||
28 | * struct arm_pmu_platdata - ARM PMU platform data | 19 | * struct arm_pmu_platdata - ARM PMU platform data |
29 | * | 20 | * |
30 | * @handle_irq: an optional handler which will be called from the | 21 | * @handle_irq: an optional handler which will be called from the |
31 | * interrupt and passed the address of the low level handler, | 22 | * interrupt and passed the address of the low level handler, |
32 | * and can be used to implement any platform specific handling | 23 | * and can be used to implement any platform specific handling |
33 | * before or after calling it. | 24 | * before or after calling it. |
34 | * @enable_irq: an optional handler which will be called after | 25 | * @runtime_resume: an optional handler which will be called by the |
35 | * request_irq and be used to handle some platform specific | 26 | * runtime PM framework following a call to pm_runtime_get(). |
36 | * irq enablement | 27 | * Note that if pm_runtime_get() is called more than once in |
37 | * @disable_irq: an optional handler which will be called before | 28 | * succession this handler will only be called once. |
38 | * free_irq and be used to handle some platform specific | 29 | * @runtime_suspend: an optional handler which will be called by the |
39 | * irq disablement | 30 | * runtime PM framework following a call to pm_runtime_put(). |
31 | * Note that if pm_runtime_get() is called more than once in | ||
32 | * succession this handler will only be called following the | ||
33 | * final call to pm_runtime_put() that actually disables the | ||
34 | * hardware. | ||
40 | */ | 35 | */ |
41 | struct arm_pmu_platdata { | 36 | struct arm_pmu_platdata { |
42 | irqreturn_t (*handle_irq)(int irq, void *dev, | 37 | irqreturn_t (*handle_irq)(int irq, void *dev, |
43 | irq_handler_t pmu_handler); | 38 | irq_handler_t pmu_handler); |
44 | void (*enable_irq)(int irq); | 39 | int (*runtime_resume)(struct device *dev); |
45 | void (*disable_irq)(int irq); | 40 | int (*runtime_suspend)(struct device *dev); |
46 | }; | 41 | }; |
47 | 42 | ||
48 | #ifdef CONFIG_CPU_HAS_PMU | ||
49 | |||
50 | /** | ||
51 | * reserve_pmu() - reserve the hardware performance counters | ||
52 | * | ||
53 | * Reserve the hardware performance counters in the system for exclusive use. | ||
54 | * Returns 0 on success or -EBUSY if the lock is already held. | ||
55 | */ | ||
56 | extern int | ||
57 | reserve_pmu(enum arm_pmu_type type); | ||
58 | |||
59 | /** | ||
60 | * release_pmu() - Relinquish control of the performance counters | ||
61 | * | ||
62 | * Release the performance counters and allow someone else to use them. | ||
63 | */ | ||
64 | extern void | ||
65 | release_pmu(enum arm_pmu_type type); | ||
66 | |||
67 | #else /* CONFIG_CPU_HAS_PMU */ | ||
68 | |||
69 | #include <linux/err.h> | ||
70 | |||
71 | static inline int | ||
72 | reserve_pmu(enum arm_pmu_type type) | ||
73 | { | ||
74 | return -ENODEV; | ||
75 | } | ||
76 | |||
77 | static inline void | ||
78 | release_pmu(enum arm_pmu_type type) { } | ||
79 | |||
80 | #endif /* CONFIG_CPU_HAS_PMU */ | ||
81 | |||
82 | #ifdef CONFIG_HW_PERF_EVENTS | 43 | #ifdef CONFIG_HW_PERF_EVENTS |
83 | 44 | ||
84 | /* The events for a given PMU register set. */ | 45 | /* The events for a given PMU register set. */ |
@@ -103,7 +64,6 @@ struct pmu_hw_events { | |||
103 | 64 | ||
104 | struct arm_pmu { | 65 | struct arm_pmu { |
105 | struct pmu pmu; | 66 | struct pmu pmu; |
106 | enum arm_pmu_type type; | ||
107 | cpumask_t active_irqs; | 67 | cpumask_t active_irqs; |
108 | char *name; | 68 | char *name; |
109 | irqreturn_t (*handle_irq)(int irq_num, void *dev); | 69 | irqreturn_t (*handle_irq)(int irq_num, void *dev); |
@@ -118,6 +78,8 @@ struct arm_pmu { | |||
118 | void (*start)(void); | 78 | void (*start)(void); |
119 | void (*stop)(void); | 79 | void (*stop)(void); |
120 | void (*reset)(void *); | 80 | void (*reset)(void *); |
81 | int (*request_irq)(irq_handler_t handler); | ||
82 | void (*free_irq)(void); | ||
121 | int (*map_event)(struct perf_event *event); | 83 | int (*map_event)(struct perf_event *event); |
122 | int num_events; | 84 | int num_events; |
123 | atomic_t active_events; | 85 | atomic_t active_events; |
@@ -129,7 +91,9 @@ struct arm_pmu { | |||
129 | 91 | ||
130 | #define to_arm_pmu(p) (container_of(p, struct arm_pmu, pmu)) | 92 | #define to_arm_pmu(p) (container_of(p, struct arm_pmu, pmu)) |
131 | 93 | ||
132 | int __init armpmu_register(struct arm_pmu *armpmu, char *name, int type); | 94 | extern const struct dev_pm_ops armpmu_dev_pm_ops; |
95 | |||
96 | int armpmu_register(struct arm_pmu *armpmu, char *name, int type); | ||
133 | 97 | ||
134 | u64 armpmu_event_update(struct perf_event *event, | 98 | u64 armpmu_event_update(struct perf_event *event, |
135 | struct hw_perf_event *hwc, | 99 | struct hw_perf_event *hwc, |
@@ -139,6 +103,13 @@ int armpmu_event_set_period(struct perf_event *event, | |||
139 | struct hw_perf_event *hwc, | 103 | struct hw_perf_event *hwc, |
140 | int idx); | 104 | int idx); |
141 | 105 | ||
106 | int armpmu_map_event(struct perf_event *event, | ||
107 | const unsigned (*event_map)[PERF_COUNT_HW_MAX], | ||
108 | const unsigned (*cache_map)[PERF_COUNT_HW_CACHE_MAX] | ||
109 | [PERF_COUNT_HW_CACHE_OP_MAX] | ||
110 | [PERF_COUNT_HW_CACHE_RESULT_MAX], | ||
111 | u32 raw_event_mask); | ||
112 | |||
142 | #endif /* CONFIG_HW_PERF_EVENTS */ | 113 | #endif /* CONFIG_HW_PERF_EVENTS */ |
143 | 114 | ||
144 | #endif /* __ARM_PMU_H__ */ | 115 | #endif /* __ARM_PMU_H__ */ |
diff --git a/arch/arm/include/asm/segment.h b/arch/arm/include/asm/segment.h deleted file mode 100644 index 9e24c21f630..00000000000 --- a/arch/arm/include/asm/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/arch/arm/include/asm/sembuf.h b/arch/arm/include/asm/sembuf.h deleted file mode 100644 index 1c028395428..00000000000 --- a/arch/arm/include/asm/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 | |||
14 | struct 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/arch/arm/include/asm/serial.h b/arch/arm/include/asm/serial.h deleted file mode 100644 index ebb049091e2..00000000000 --- a/arch/arm/include/asm/serial.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/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 | #define BASE_BAUD (1843200 / 16) | ||
18 | |||
19 | #endif | ||
diff --git a/arch/arm/include/asm/shmbuf.h b/arch/arm/include/asm/shmbuf.h deleted file mode 100644 index 2e5c67ba1c9..00000000000 --- a/arch/arm/include/asm/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 | |||
14 | struct 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 | |||
30 | struct 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/arch/arm/include/asm/smp.h b/arch/arm/include/asm/smp.h index ae29293270a..2e3be16c676 100644 --- a/arch/arm/include/asm/smp.h +++ b/arch/arm/include/asm/smp.h | |||
@@ -60,15 +60,6 @@ extern int boot_secondary(unsigned int cpu, struct task_struct *); | |||
60 | */ | 60 | */ |
61 | asmlinkage void secondary_start_kernel(void); | 61 | asmlinkage void secondary_start_kernel(void); |
62 | 62 | ||
63 | /* | ||
64 | * Perform platform specific initialisation of the specified CPU. | ||
65 | */ | ||
66 | extern void platform_secondary_init(unsigned int cpu); | ||
67 | |||
68 | /* | ||
69 | * Initialize cpu_possible map, and enable coherency | ||
70 | */ | ||
71 | extern void platform_smp_prepare_cpus(unsigned int); | ||
72 | 63 | ||
73 | /* | 64 | /* |
74 | * Initial data for bringing up a secondary CPU. | 65 | * Initial data for bringing up a secondary CPU. |
@@ -79,18 +70,47 @@ struct secondary_data { | |||
79 | void *stack; | 70 | void *stack; |
80 | }; | 71 | }; |
81 | extern struct secondary_data secondary_data; | 72 | extern struct secondary_data secondary_data; |
73 | extern volatile int pen_release; | ||
82 | 74 | ||
83 | extern int __cpu_disable(void); | 75 | extern int __cpu_disable(void); |
84 | extern int platform_cpu_disable(unsigned int cpu); | ||
85 | 76 | ||
86 | extern void __cpu_die(unsigned int cpu); | 77 | extern void __cpu_die(unsigned int cpu); |
87 | extern void cpu_die(void); | 78 | extern void cpu_die(void); |
88 | 79 | ||
89 | extern void platform_cpu_die(unsigned int cpu); | ||
90 | extern int platform_cpu_kill(unsigned int cpu); | ||
91 | extern void platform_cpu_enable(unsigned int cpu); | ||
92 | |||
93 | extern void arch_send_call_function_single_ipi(int cpu); | 80 | extern void arch_send_call_function_single_ipi(int cpu); |
94 | extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); | 81 | extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); |
95 | 82 | ||
83 | struct smp_operations { | ||
84 | #ifdef CONFIG_SMP | ||
85 | /* | ||
86 | * Setup the set of possible CPUs (via set_cpu_possible) | ||
87 | */ | ||
88 | void (*smp_init_cpus)(void); | ||
89 | /* | ||
90 | * Initialize cpu_possible map, and enable coherency | ||
91 | */ | ||
92 | void (*smp_prepare_cpus)(unsigned int max_cpus); | ||
93 | |||
94 | /* | ||
95 | * Perform platform specific initialisation of the specified CPU. | ||
96 | */ | ||
97 | void (*smp_secondary_init)(unsigned int cpu); | ||
98 | /* | ||
99 | * Boot a secondary CPU, and assign it the specified idle task. | ||
100 | * This also gives us the initial stack to use for this CPU. | ||
101 | */ | ||
102 | int (*smp_boot_secondary)(unsigned int cpu, struct task_struct *idle); | ||
103 | #ifdef CONFIG_HOTPLUG_CPU | ||
104 | int (*cpu_kill)(unsigned int cpu); | ||
105 | void (*cpu_die)(unsigned int cpu); | ||
106 | int (*cpu_disable)(unsigned int cpu); | ||
107 | #endif | ||
108 | #endif | ||
109 | }; | ||
110 | |||
111 | /* | ||
112 | * set platform specific SMP operations | ||
113 | */ | ||
114 | extern void smp_set_ops(struct smp_operations *); | ||
115 | |||
96 | #endif /* ifndef __ASM_ARM_SMP_H */ | 116 | #endif /* ifndef __ASM_ARM_SMP_H */ |
diff --git a/arch/arm/include/asm/socket.h b/arch/arm/include/asm/socket.h deleted file mode 100644 index 6433cadb6ed..00000000000 --- a/arch/arm/include/asm/socket.h +++ /dev/null | |||
@@ -1,72 +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 | #define SO_MARK 36 | ||
56 | |||
57 | #define SO_TIMESTAMPING 37 | ||
58 | #define SCM_TIMESTAMPING SO_TIMESTAMPING | ||
59 | |||
60 | #define SO_PROTOCOL 38 | ||
61 | #define SO_DOMAIN 39 | ||
62 | |||
63 | #define SO_RXQ_OVFL 40 | ||
64 | |||
65 | #define SO_WIFI_STATUS 41 | ||
66 | #define SCM_WIFI_STATUS SO_WIFI_STATUS | ||
67 | #define SO_PEEK_OFF 42 | ||
68 | |||
69 | /* Instruct lower device to use last 4-bytes of skb data as FCS */ | ||
70 | #define SO_NOFCS 43 | ||
71 | |||
72 | #endif /* _ASM_SOCKET_H */ | ||
diff --git a/arch/arm/include/asm/sockios.h b/arch/arm/include/asm/sockios.h deleted file mode 100644 index a2588a2512d..00000000000 --- a/arch/arm/include/asm/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/arch/arm/include/asm/sync_bitops.h b/arch/arm/include/asm/sync_bitops.h new file mode 100644 index 00000000000..63479eecbf7 --- /dev/null +++ b/arch/arm/include/asm/sync_bitops.h | |||
@@ -0,0 +1,27 @@ | |||
1 | #ifndef __ASM_SYNC_BITOPS_H__ | ||
2 | #define __ASM_SYNC_BITOPS_H__ | ||
3 | |||
4 | #include <asm/bitops.h> | ||
5 | #include <asm/system.h> | ||
6 | |||
7 | /* sync_bitops functions are equivalent to the SMP implementation of the | ||
8 | * original functions, independently from CONFIG_SMP being defined. | ||
9 | * | ||
10 | * We need them because _set_bit etc are not SMP safe if !CONFIG_SMP. But | ||
11 | * under Xen you might be communicating with a completely external entity | ||
12 | * who might be on another CPU (e.g. two uniprocessor guests communicating | ||
13 | * via event channels and grant tables). So we need a variant of the bit | ||
14 | * ops which are SMP safe even on a UP kernel. | ||
15 | */ | ||
16 | |||
17 | #define sync_set_bit(nr, p) _set_bit(nr, p) | ||
18 | #define sync_clear_bit(nr, p) _clear_bit(nr, p) | ||
19 | #define sync_change_bit(nr, p) _change_bit(nr, p) | ||
20 | #define sync_test_and_set_bit(nr, p) _test_and_set_bit(nr, p) | ||
21 | #define sync_test_and_clear_bit(nr, p) _test_and_clear_bit(nr, p) | ||
22 | #define sync_test_and_change_bit(nr, p) _test_and_change_bit(nr, p) | ||
23 | #define sync_test_bit(nr, addr) test_bit(nr, addr) | ||
24 | #define sync_cmpxchg cmpxchg | ||
25 | |||
26 | |||
27 | #endif | ||
diff --git a/arch/arm/include/asm/syscall.h b/arch/arm/include/asm/syscall.h index c334a23ddf7..9fdded6b108 100644 --- a/arch/arm/include/asm/syscall.h +++ b/arch/arm/include/asm/syscall.h | |||
@@ -8,6 +8,11 @@ | |||
8 | #define _ASM_ARM_SYSCALL_H | 8 | #define _ASM_ARM_SYSCALL_H |
9 | 9 | ||
10 | #include <linux/err.h> | 10 | #include <linux/err.h> |
11 | #include <linux/sched.h> | ||
12 | |||
13 | #include <asm/unistd.h> | ||
14 | |||
15 | #define NR_syscalls (__NR_syscalls) | ||
11 | 16 | ||
12 | extern const unsigned long sys_call_table[]; | 17 | extern const unsigned long sys_call_table[]; |
13 | 18 | ||
diff --git a/arch/arm/include/asm/termbits.h b/arch/arm/include/asm/termbits.h deleted file mode 100644 index 704135d28d1..00000000000 --- a/arch/arm/include/asm/termbits.h +++ /dev/null | |||
@@ -1,198 +0,0 @@ | |||
1 | #ifndef __ASM_ARM_TERMBITS_H | ||
2 | #define __ASM_ARM_TERMBITS_H | ||
3 | |||
4 | typedef unsigned char cc_t; | ||
5 | typedef unsigned int speed_t; | ||
6 | typedef unsigned int tcflag_t; | ||
7 | |||
8 | #define NCCS 19 | ||
9 | struct 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 | |||
18 | struct 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 | |||
29 | struct 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 | |||
41 | /* c_cc characters */ | ||
42 | #define VINTR 0 | ||
43 | #define VQUIT 1 | ||
44 | #define VERASE 2 | ||
45 | #define VKILL 3 | ||
46 | #define VEOF 4 | ||
47 | #define VTIME 5 | ||
48 | #define VMIN 6 | ||
49 | #define VSWTC 7 | ||
50 | #define VSTART 8 | ||
51 | #define VSTOP 9 | ||
52 | #define VSUSP 10 | ||
53 | #define VEOL 11 | ||
54 | #define VREPRINT 12 | ||
55 | #define VDISCARD 13 | ||
56 | #define VWERASE 14 | ||
57 | #define VLNEXT 15 | ||
58 | #define VEOL2 16 | ||
59 | |||
60 | /* c_iflag bits */ | ||
61 | #define IGNBRK 0000001 | ||
62 | #define BRKINT 0000002 | ||
63 | #define IGNPAR 0000004 | ||
64 | #define PARMRK 0000010 | ||
65 | #define INPCK 0000020 | ||
66 | #define ISTRIP 0000040 | ||
67 | #define INLCR 0000100 | ||
68 | #define IGNCR 0000200 | ||
69 | #define ICRNL 0000400 | ||
70 | #define IUCLC 0001000 | ||
71 | #define IXON 0002000 | ||
72 | #define IXANY 0004000 | ||
73 | #define IXOFF 0010000 | ||
74 | #define IMAXBEL 0020000 | ||
75 | #define IUTF8 0040000 | ||
76 | |||
77 | /* c_oflag bits */ | ||
78 | #define OPOST 0000001 | ||
79 | #define OLCUC 0000002 | ||
80 | #define ONLCR 0000004 | ||
81 | #define OCRNL 0000010 | ||
82 | #define ONOCR 0000020 | ||
83 | #define ONLRET 0000040 | ||
84 | #define OFILL 0000100 | ||
85 | #define OFDEL 0000200 | ||
86 | #define NLDLY 0000400 | ||
87 | #define NL0 0000000 | ||
88 | #define NL1 0000400 | ||
89 | #define CRDLY 0003000 | ||
90 | #define CR0 0000000 | ||
91 | #define CR1 0001000 | ||
92 | #define CR2 0002000 | ||
93 | #define CR3 0003000 | ||
94 | #define TABDLY 0014000 | ||
95 | #define TAB0 0000000 | ||
96 | #define TAB1 0004000 | ||
97 | #define TAB2 0010000 | ||
98 | #define TAB3 0014000 | ||
99 | #define XTABS 0014000 | ||
100 | #define BSDLY 0020000 | ||
101 | #define BS0 0000000 | ||
102 | #define BS1 0020000 | ||
103 | #define VTDLY 0040000 | ||
104 | #define VT0 0000000 | ||
105 | #define VT1 0040000 | ||
106 | #define FFDLY 0100000 | ||
107 | #define FF0 0000000 | ||
108 | #define FF1 0100000 | ||
109 | |||
110 | /* c_cflag bit meaning */ | ||
111 | #define CBAUD 0010017 | ||
112 | #define B0 0000000 /* hang up */ | ||
113 | #define B50 0000001 | ||
114 | #define B75 0000002 | ||
115 | #define B110 0000003 | ||
116 | #define B134 0000004 | ||
117 | #define B150 0000005 | ||
118 | #define B200 0000006 | ||
119 | #define B300 0000007 | ||
120 | #define B600 0000010 | ||
121 | #define B1200 0000011 | ||
122 | #define B1800 0000012 | ||
123 | #define B2400 0000013 | ||
124 | #define B4800 0000014 | ||
125 | #define B9600 0000015 | ||
126 | #define B19200 0000016 | ||
127 | #define B38400 0000017 | ||
128 | #define EXTA B19200 | ||
129 | #define EXTB B38400 | ||
130 | #define CSIZE 0000060 | ||
131 | #define CS5 0000000 | ||
132 | #define CS6 0000020 | ||
133 | #define CS7 0000040 | ||
134 | #define CS8 0000060 | ||
135 | #define CSTOPB 0000100 | ||
136 | #define CREAD 0000200 | ||
137 | #define PARENB 0000400 | ||
138 | #define PARODD 0001000 | ||
139 | #define HUPCL 0002000 | ||
140 | #define CLOCAL 0004000 | ||
141 | #define CBAUDEX 0010000 | ||
142 | #define BOTHER 0010000 | ||
143 | #define B57600 0010001 | ||
144 | #define B115200 0010002 | ||
145 | #define B230400 0010003 | ||
146 | #define B460800 0010004 | ||
147 | #define B500000 0010005 | ||
148 | #define B576000 0010006 | ||
149 | #define B921600 0010007 | ||
150 | #define B1000000 0010010 | ||
151 | #define B1152000 0010011 | ||
152 | #define B1500000 0010012 | ||
153 | #define B2000000 0010013 | ||
154 | #define B2500000 0010014 | ||
155 | #define B3000000 0010015 | ||
156 | #define B3500000 0010016 | ||
157 | #define B4000000 0010017 | ||
158 | #define CIBAUD 002003600000 /* input baud rate */ | ||
159 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ | ||
160 | #define CRTSCTS 020000000000 /* flow control */ | ||
161 | |||
162 | #define IBSHIFT 16 | ||
163 | |||
164 | /* c_lflag bits */ | ||
165 | #define ISIG 0000001 | ||
166 | #define ICANON 0000002 | ||
167 | #define XCASE 0000004 | ||
168 | #define ECHO 0000010 | ||
169 | #define ECHOE 0000020 | ||
170 | #define ECHOK 0000040 | ||
171 | #define ECHONL 0000100 | ||
172 | #define NOFLSH 0000200 | ||
173 | #define TOSTOP 0000400 | ||
174 | #define ECHOCTL 0001000 | ||
175 | #define ECHOPRT 0002000 | ||
176 | #define ECHOKE 0004000 | ||
177 | #define FLUSHO 0010000 | ||
178 | #define PENDIN 0040000 | ||
179 | #define IEXTEN 0100000 | ||
180 | #define EXTPROC 0200000 | ||
181 | |||
182 | /* tcflow() and TCXONC use these */ | ||
183 | #define TCOOFF 0 | ||
184 | #define TCOON 1 | ||
185 | #define TCIOFF 2 | ||
186 | #define TCION 3 | ||
187 | |||
188 | /* tcflush() and TCFLSH use these */ | ||
189 | #define TCIFLUSH 0 | ||
190 | #define TCOFLUSH 1 | ||
191 | #define TCIOFLUSH 2 | ||
192 | |||
193 | /* tcsetattr uses these */ | ||
194 | #define TCSANOW 0 | ||
195 | #define TCSADRAIN 1 | ||
196 | #define TCSAFLUSH 2 | ||
197 | |||
198 | #endif /* __ASM_ARM_TERMBITS_H */ | ||
diff --git a/arch/arm/include/asm/termios.h b/arch/arm/include/asm/termios.h deleted file mode 100644 index 293e3f1bc3f..00000000000 --- a/arch/arm/include/asm/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 | |||
7 | struct 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 | ||
15 | struct 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/arch/arm/include/asm/thread_info.h b/arch/arm/include/asm/thread_info.h index af7b0bda335..f71cdab18b8 100644 --- a/arch/arm/include/asm/thread_info.h +++ b/arch/arm/include/asm/thread_info.h | |||
@@ -59,7 +59,9 @@ struct thread_info { | |||
59 | __u32 syscall; /* syscall number */ | 59 | __u32 syscall; /* syscall number */ |
60 | __u8 used_cp[16]; /* thread used copro */ | 60 | __u8 used_cp[16]; /* thread used copro */ |
61 | unsigned long tp_value; | 61 | unsigned long tp_value; |
62 | #ifdef CONFIG_CRUNCH | ||
62 | struct crunch_state crunchstate; | 63 | struct crunch_state crunchstate; |
64 | #endif | ||
63 | union fp_state fpstate __attribute__((aligned(8))); | 65 | union fp_state fpstate __attribute__((aligned(8))); |
64 | union vfp_state vfpstate; | 66 | union vfp_state vfpstate; |
65 | #ifdef CONFIG_ARM_THUMBEE | 67 | #ifdef CONFIG_ARM_THUMBEE |
@@ -148,6 +150,7 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *, | |||
148 | #define TIF_NOTIFY_RESUME 2 /* callback before returning to user */ | 150 | #define TIF_NOTIFY_RESUME 2 /* callback before returning to user */ |
149 | #define TIF_SYSCALL_TRACE 8 | 151 | #define TIF_SYSCALL_TRACE 8 |
150 | #define TIF_SYSCALL_AUDIT 9 | 152 | #define TIF_SYSCALL_AUDIT 9 |
153 | #define TIF_SYSCALL_TRACEPOINT 10 | ||
151 | #define TIF_POLLING_NRFLAG 16 | 154 | #define TIF_POLLING_NRFLAG 16 |
152 | #define TIF_USING_IWMMXT 17 | 155 | #define TIF_USING_IWMMXT 17 |
153 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ | 156 | #define TIF_MEMDIE 18 /* is terminating due to OOM killer */ |
@@ -160,12 +163,13 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *, | |||
160 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) | 163 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) |
161 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) | 164 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) |
162 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) | 165 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) |
166 | #define _TIF_SYSCALL_TRACEPOINT (1 << TIF_SYSCALL_TRACEPOINT) | ||
163 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) | 167 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) |
164 | #define _TIF_USING_IWMMXT (1 << TIF_USING_IWMMXT) | 168 | #define _TIF_USING_IWMMXT (1 << TIF_USING_IWMMXT) |
165 | #define _TIF_SECCOMP (1 << TIF_SECCOMP) | 169 | #define _TIF_SECCOMP (1 << TIF_SECCOMP) |
166 | 170 | ||
167 | /* Checks for any syscall work in entry-common.S */ | 171 | /* Checks for any syscall work in entry-common.S */ |
168 | #define _TIF_SYSCALL_WORK (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT) | 172 | #define _TIF_SYSCALL_WORK (_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | _TIF_SYSCALL_TRACEPOINT) |
169 | 173 | ||
170 | /* | 174 | /* |
171 | * Change these and you break ASM code in entry-common.S | 175 | * Change these and you break ASM code in entry-common.S |
diff --git a/arch/arm/include/asm/timex.h b/arch/arm/include/asm/timex.h index ce119442277..83f2aa83899 100644 --- a/arch/arm/include/asm/timex.h +++ b/arch/arm/include/asm/timex.h | |||
@@ -12,15 +12,13 @@ | |||
12 | #ifndef _ASMARM_TIMEX_H | 12 | #ifndef _ASMARM_TIMEX_H |
13 | #define _ASMARM_TIMEX_H | 13 | #define _ASMARM_TIMEX_H |
14 | 14 | ||
15 | #include <asm/arch_timer.h> | 15 | #ifdef CONFIG_ARCH_MULTIPLATFORM |
16 | #define CLOCK_TICK_RATE 1000000 | ||
17 | #else | ||
16 | #include <mach/timex.h> | 18 | #include <mach/timex.h> |
19 | #endif | ||
17 | 20 | ||
18 | typedef unsigned long cycles_t; | 21 | typedef unsigned long cycles_t; |
19 | |||
20 | #ifdef ARCH_HAS_READ_CURRENT_TIMER | ||
21 | #define get_cycles() ({ cycles_t c; read_current_timer(&c) ? 0 : c; }) | 22 | #define get_cycles() ({ cycles_t c; read_current_timer(&c) ? 0 : c; }) |
22 | #else | ||
23 | #define get_cycles() (0) | ||
24 | #endif | ||
25 | 23 | ||
26 | #endif | 24 | #endif |
diff --git a/arch/arm/include/asm/types.h b/arch/arm/include/asm/types.h deleted file mode 100644 index 28beab917ff..00000000000 --- a/arch/arm/include/asm/types.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | #ifndef __ASM_ARM_TYPES_H | ||
2 | #define __ASM_ARM_TYPES_H | ||
3 | |||
4 | #include <asm-generic/int-ll64.h> | ||
5 | |||
6 | /* | ||
7 | * These aren't exported outside the kernel to avoid name space clashes | ||
8 | */ | ||
9 | #ifdef __KERNEL__ | ||
10 | |||
11 | #define BITS_PER_LONG 32 | ||
12 | |||
13 | #endif /* __KERNEL__ */ | ||
14 | |||
15 | #endif | ||
16 | |||
diff --git a/arch/arm/include/asm/unaligned.h b/arch/arm/include/asm/unaligned.h deleted file mode 100644 index 44593a89490..00000000000 --- a/arch/arm/include/asm/unaligned.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | #ifndef _ASM_ARM_UNALIGNED_H | ||
2 | #define _ASM_ARM_UNALIGNED_H | ||
3 | |||
4 | #include <linux/unaligned/le_byteshift.h> | ||
5 | #include <linux/unaligned/be_byteshift.h> | ||
6 | #include <linux/unaligned/generic.h> | ||
7 | |||
8 | /* | ||
9 | * Select endianness | ||
10 | */ | ||
11 | #ifndef __ARMEB__ | ||
12 | #define get_unaligned __get_unaligned_le | ||
13 | #define put_unaligned __put_unaligned_le | ||
14 | #else | ||
15 | #define get_unaligned __get_unaligned_be | ||
16 | #define put_unaligned __put_unaligned_be | ||
17 | #endif | ||
18 | |||
19 | #endif /* _ASM_ARM_UNALIGNED_H */ | ||
diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h index 2fde5fd1acc..d9ff5cc3a50 100644 --- a/arch/arm/include/asm/unistd.h +++ b/arch/arm/include/asm/unistd.h | |||
@@ -407,6 +407,14 @@ | |||
407 | /* 378 for kcmp */ | 407 | /* 378 for kcmp */ |
408 | 408 | ||
409 | /* | 409 | /* |
410 | * This may need to be greater than __NR_last_syscall+1 in order to | ||
411 | * account for the padding in the syscall table | ||
412 | */ | ||
413 | #ifdef __KERNEL__ | ||
414 | #define __NR_syscalls (380) | ||
415 | #endif /* __KERNEL__ */ | ||
416 | |||
417 | /* | ||
410 | * The following SWIs are ARM private. | 418 | * The following SWIs are ARM private. |
411 | */ | 419 | */ |
412 | #define __ARM_NR_BASE (__NR_SYSCALL_BASE+0x0f0000) | 420 | #define __ARM_NR_BASE (__NR_SYSCALL_BASE+0x0f0000) |
diff --git a/arch/arm/include/asm/vfpmacros.h b/arch/arm/include/asm/vfpmacros.h index 3d5fc41ae8d..6a6f1e485f4 100644 --- a/arch/arm/include/asm/vfpmacros.h +++ b/arch/arm/include/asm/vfpmacros.h | |||
@@ -5,7 +5,7 @@ | |||
5 | */ | 5 | */ |
6 | #include <asm/hwcap.h> | 6 | #include <asm/hwcap.h> |
7 | 7 | ||
8 | #include "vfp.h" | 8 | #include <asm/vfp.h> |
9 | 9 | ||
10 | @ Macros to allow building with old toolkits (with no VFP support) | 10 | @ Macros to allow building with old toolkits (with no VFP support) |
11 | .macro VFPFMRX, rd, sysreg, cond | 11 | .macro VFPFMRX, rd, sysreg, cond |
@@ -28,7 +28,7 @@ | |||
28 | ldr \tmp, =elf_hwcap @ may not have MVFR regs | 28 | ldr \tmp, =elf_hwcap @ may not have MVFR regs |
29 | ldr \tmp, [\tmp, #0] | 29 | ldr \tmp, [\tmp, #0] |
30 | tst \tmp, #HWCAP_VFPv3D16 | 30 | tst \tmp, #HWCAP_VFPv3D16 |
31 | ldceq p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d16-d31} | 31 | ldceql p11, cr0, [\base],#32*4 @ FLDMIAD \base!, {d16-d31} |
32 | addne \base, \base, #32*4 @ step over unused register space | 32 | addne \base, \base, #32*4 @ step over unused register space |
33 | #else | 33 | #else |
34 | VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0 | 34 | VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0 |
@@ -52,7 +52,7 @@ | |||
52 | ldr \tmp, =elf_hwcap @ may not have MVFR regs | 52 | ldr \tmp, =elf_hwcap @ may not have MVFR regs |
53 | ldr \tmp, [\tmp, #0] | 53 | ldr \tmp, [\tmp, #0] |
54 | tst \tmp, #HWCAP_VFPv3D16 | 54 | tst \tmp, #HWCAP_VFPv3D16 |
55 | stceq p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d16-d31} | 55 | stceql p11, cr0, [\base],#32*4 @ FSTMIAD \base!, {d16-d31} |
56 | addne \base, \base, #32*4 @ step over unused register space | 56 | addne \base, \base, #32*4 @ step over unused register space |
57 | #else | 57 | #else |
58 | VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0 | 58 | VFPFMRX \tmp, MVFR0 @ Media and VFP Feature Register 0 |
diff --git a/arch/arm/include/asm/xen/events.h b/arch/arm/include/asm/xen/events.h new file mode 100644 index 00000000000..94b4e9020b0 --- /dev/null +++ b/arch/arm/include/asm/xen/events.h | |||
@@ -0,0 +1,18 @@ | |||
1 | #ifndef _ASM_ARM_XEN_EVENTS_H | ||
2 | #define _ASM_ARM_XEN_EVENTS_H | ||
3 | |||
4 | #include <asm/ptrace.h> | ||
5 | |||
6 | enum ipi_vector { | ||
7 | XEN_PLACEHOLDER_VECTOR, | ||
8 | |||
9 | /* Xen IPIs go here */ | ||
10 | XEN_NR_IPIS, | ||
11 | }; | ||
12 | |||
13 | static inline int xen_irqs_disabled(struct pt_regs *regs) | ||
14 | { | ||
15 | return raw_irqs_disabled_flags(regs->ARM_cpsr); | ||
16 | } | ||
17 | |||
18 | #endif /* _ASM_ARM_XEN_EVENTS_H */ | ||
diff --git a/arch/arm/include/asm/xen/hypercall.h b/arch/arm/include/asm/xen/hypercall.h new file mode 100644 index 00000000000..8a823253d77 --- /dev/null +++ b/arch/arm/include/asm/xen/hypercall.h | |||
@@ -0,0 +1,69 @@ | |||
1 | /****************************************************************************** | ||
2 | * hypercall.h | ||
3 | * | ||
4 | * Linux-specific hypervisor handling. | ||
5 | * | ||
6 | * Stefano Stabellini <stefano.stabellini@eu.citrix.com>, Citrix, 2012 | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License version 2 | ||
10 | * as published by the Free Software Foundation; or, when distributed | ||
11 | * separately from the Linux kernel or incorporated into other | ||
12 | * software packages, subject to the following license: | ||
13 | * | ||
14 | * Permission is hereby granted, free of charge, to any person obtaining a copy | ||
15 | * of this source file (the "Software"), to deal in the Software without | ||
16 | * restriction, including without limitation the rights to use, copy, modify, | ||
17 | * merge, publish, distribute, sublicense, and/or sell copies of the Software, | ||
18 | * and to permit persons to whom the Software is furnished to do so, subject to | ||
19 | * the following conditions: | ||
20 | * | ||
21 | * The above copyright notice and this permission notice shall be included in | ||
22 | * all copies or substantial portions of the Software. | ||
23 | * | ||
24 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
25 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
26 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
27 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
28 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
29 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS | ||
30 | * IN THE SOFTWARE. | ||
31 | */ | ||
32 | |||
33 | #ifndef _ASM_ARM_XEN_HYPERCALL_H | ||
34 | #define _ASM_ARM_XEN_HYPERCALL_H | ||
35 | |||
36 | #include <xen/interface/xen.h> | ||
37 | |||
38 | long privcmd_call(unsigned call, unsigned long a1, | ||
39 | unsigned long a2, unsigned long a3, | ||
40 | unsigned long a4, unsigned long a5); | ||
41 | int HYPERVISOR_xen_version(int cmd, void *arg); | ||
42 | int HYPERVISOR_console_io(int cmd, int count, char *str); | ||
43 | int HYPERVISOR_grant_table_op(unsigned int cmd, void *uop, unsigned int count); | ||
44 | int HYPERVISOR_sched_op(int cmd, void *arg); | ||
45 | int HYPERVISOR_event_channel_op(int cmd, void *arg); | ||
46 | unsigned long HYPERVISOR_hvm_op(int op, void *arg); | ||
47 | int HYPERVISOR_memory_op(unsigned int cmd, void *arg); | ||
48 | int HYPERVISOR_physdev_op(int cmd, void *arg); | ||
49 | |||
50 | static inline void | ||
51 | MULTI_update_va_mapping(struct multicall_entry *mcl, unsigned long va, | ||
52 | unsigned int new_val, unsigned long flags) | ||
53 | { | ||
54 | BUG(); | ||
55 | } | ||
56 | |||
57 | static inline void | ||
58 | MULTI_mmu_update(struct multicall_entry *mcl, struct mmu_update *req, | ||
59 | int count, int *success_count, domid_t domid) | ||
60 | { | ||
61 | BUG(); | ||
62 | } | ||
63 | |||
64 | static inline int | ||
65 | HYPERVISOR_multicall(void *call_list, int nr_calls) | ||
66 | { | ||
67 | BUG(); | ||
68 | } | ||
69 | #endif /* _ASM_ARM_XEN_HYPERCALL_H */ | ||
diff --git a/arch/arm/include/asm/xen/hypervisor.h b/arch/arm/include/asm/xen/hypervisor.h new file mode 100644 index 00000000000..d7ab99a0c9e --- /dev/null +++ b/arch/arm/include/asm/xen/hypervisor.h | |||
@@ -0,0 +1,19 @@ | |||
1 | #ifndef _ASM_ARM_XEN_HYPERVISOR_H | ||
2 | #define _ASM_ARM_XEN_HYPERVISOR_H | ||
3 | |||
4 | extern struct shared_info *HYPERVISOR_shared_info; | ||
5 | extern struct start_info *xen_start_info; | ||
6 | |||
7 | /* Lazy mode for batching updates / context switch */ | ||
8 | enum paravirt_lazy_mode { | ||
9 | PARAVIRT_LAZY_NONE, | ||
10 | PARAVIRT_LAZY_MMU, | ||
11 | PARAVIRT_LAZY_CPU, | ||
12 | }; | ||
13 | |||
14 | static inline enum paravirt_lazy_mode paravirt_get_lazy_mode(void) | ||
15 | { | ||
16 | return PARAVIRT_LAZY_NONE; | ||
17 | } | ||
18 | |||
19 | #endif /* _ASM_ARM_XEN_HYPERVISOR_H */ | ||
diff --git a/arch/arm/include/asm/xen/interface.h b/arch/arm/include/asm/xen/interface.h new file mode 100644 index 00000000000..ae05e56dd17 --- /dev/null +++ b/arch/arm/include/asm/xen/interface.h | |||
@@ -0,0 +1,73 @@ | |||
1 | /****************************************************************************** | ||
2 | * Guest OS interface to ARM Xen. | ||
3 | * | ||
4 | * Stefano Stabellini <stefano.stabellini@eu.citrix.com>, Citrix, 2012 | ||
5 | */ | ||
6 | |||
7 | #ifndef _ASM_ARM_XEN_INTERFACE_H | ||
8 | #define _ASM_ARM_XEN_INTERFACE_H | ||
9 | |||
10 | #include <linux/types.h> | ||
11 | |||
12 | #define uint64_aligned_t uint64_t __attribute__((aligned(8))) | ||
13 | |||
14 | #define __DEFINE_GUEST_HANDLE(name, type) \ | ||
15 | typedef struct { union { type *p; uint64_aligned_t q; }; } \ | ||
16 | __guest_handle_ ## name | ||
17 | |||
18 | #define DEFINE_GUEST_HANDLE_STRUCT(name) \ | ||
19 | __DEFINE_GUEST_HANDLE(name, struct name) | ||
20 | #define DEFINE_GUEST_HANDLE(name) __DEFINE_GUEST_HANDLE(name, name) | ||
21 | #define GUEST_HANDLE(name) __guest_handle_ ## name | ||
22 | |||
23 | #define set_xen_guest_handle(hnd, val) \ | ||
24 | do { \ | ||
25 | if (sizeof(hnd) == 8) \ | ||
26 | *(uint64_t *)&(hnd) = 0; \ | ||
27 | (hnd).p = val; \ | ||
28 | } while (0) | ||
29 | |||
30 | #ifndef __ASSEMBLY__ | ||
31 | /* Explicitly size integers that represent pfns in the interface with | ||
32 | * Xen so that we can have one ABI that works for 32 and 64 bit guests. */ | ||
33 | typedef uint64_t xen_pfn_t; | ||
34 | typedef uint64_t xen_ulong_t; | ||
35 | /* Guest handles for primitive C types. */ | ||
36 | __DEFINE_GUEST_HANDLE(uchar, unsigned char); | ||
37 | __DEFINE_GUEST_HANDLE(uint, unsigned int); | ||
38 | __DEFINE_GUEST_HANDLE(ulong, unsigned long); | ||
39 | DEFINE_GUEST_HANDLE(char); | ||
40 | DEFINE_GUEST_HANDLE(int); | ||
41 | DEFINE_GUEST_HANDLE(long); | ||
42 | DEFINE_GUEST_HANDLE(void); | ||
43 | DEFINE_GUEST_HANDLE(uint64_t); | ||
44 | DEFINE_GUEST_HANDLE(uint32_t); | ||
45 | DEFINE_GUEST_HANDLE(xen_pfn_t); | ||
46 | |||
47 | /* Maximum number of virtual CPUs in multi-processor guests. */ | ||
48 | #define MAX_VIRT_CPUS 1 | ||
49 | |||
50 | struct arch_vcpu_info { }; | ||
51 | struct arch_shared_info { }; | ||
52 | |||
53 | /* TODO: Move pvclock definitions some place arch independent */ | ||
54 | struct pvclock_vcpu_time_info { | ||
55 | u32 version; | ||
56 | u32 pad0; | ||
57 | u64 tsc_timestamp; | ||
58 | u64 system_time; | ||
59 | u32 tsc_to_system_mul; | ||
60 | s8 tsc_shift; | ||
61 | u8 flags; | ||
62 | u8 pad[2]; | ||
63 | } __attribute__((__packed__)); /* 32 bytes */ | ||
64 | |||
65 | /* It is OK to have a 12 bytes struct with no padding because it is packed */ | ||
66 | struct pvclock_wall_clock { | ||
67 | u32 version; | ||
68 | u32 sec; | ||
69 | u32 nsec; | ||
70 | } __attribute__((__packed__)); | ||
71 | #endif | ||
72 | |||
73 | #endif /* _ASM_ARM_XEN_INTERFACE_H */ | ||
diff --git a/arch/arm/include/asm/xen/page.h b/arch/arm/include/asm/xen/page.h new file mode 100644 index 00000000000..174202318df --- /dev/null +++ b/arch/arm/include/asm/xen/page.h | |||
@@ -0,0 +1,82 @@ | |||
1 | #ifndef _ASM_ARM_XEN_PAGE_H | ||
2 | #define _ASM_ARM_XEN_PAGE_H | ||
3 | |||
4 | #include <asm/page.h> | ||
5 | #include <asm/pgtable.h> | ||
6 | |||
7 | #include <linux/pfn.h> | ||
8 | #include <linux/types.h> | ||
9 | |||
10 | #include <xen/interface/grant_table.h> | ||
11 | |||
12 | #define pfn_to_mfn(pfn) (pfn) | ||
13 | #define phys_to_machine_mapping_valid (1) | ||
14 | #define mfn_to_pfn(mfn) (mfn) | ||
15 | #define mfn_to_virt(m) (__va(mfn_to_pfn(m) << PAGE_SHIFT)) | ||
16 | |||
17 | #define pte_mfn pte_pfn | ||
18 | #define mfn_pte pfn_pte | ||
19 | |||
20 | /* Xen machine address */ | ||
21 | typedef struct xmaddr { | ||
22 | phys_addr_t maddr; | ||
23 | } xmaddr_t; | ||
24 | |||
25 | /* Xen pseudo-physical address */ | ||
26 | typedef struct xpaddr { | ||
27 | phys_addr_t paddr; | ||
28 | } xpaddr_t; | ||
29 | |||
30 | #define XMADDR(x) ((xmaddr_t) { .maddr = (x) }) | ||
31 | #define XPADDR(x) ((xpaddr_t) { .paddr = (x) }) | ||
32 | |||
33 | static inline xmaddr_t phys_to_machine(xpaddr_t phys) | ||
34 | { | ||
35 | unsigned offset = phys.paddr & ~PAGE_MASK; | ||
36 | return XMADDR(PFN_PHYS(pfn_to_mfn(PFN_DOWN(phys.paddr))) | offset); | ||
37 | } | ||
38 | |||
39 | static inline xpaddr_t machine_to_phys(xmaddr_t machine) | ||
40 | { | ||
41 | unsigned offset = machine.maddr & ~PAGE_MASK; | ||
42 | return XPADDR(PFN_PHYS(mfn_to_pfn(PFN_DOWN(machine.maddr))) | offset); | ||
43 | } | ||
44 | /* VIRT <-> MACHINE conversion */ | ||
45 | #define virt_to_machine(v) (phys_to_machine(XPADDR(__pa(v)))) | ||
46 | #define virt_to_pfn(v) (PFN_DOWN(__pa(v))) | ||
47 | #define virt_to_mfn(v) (pfn_to_mfn(virt_to_pfn(v))) | ||
48 | #define mfn_to_virt(m) (__va(mfn_to_pfn(m) << PAGE_SHIFT)) | ||
49 | |||
50 | static inline xmaddr_t arbitrary_virt_to_machine(void *vaddr) | ||
51 | { | ||
52 | /* TODO: assuming it is mapped in the kernel 1:1 */ | ||
53 | return virt_to_machine(vaddr); | ||
54 | } | ||
55 | |||
56 | /* TODO: this shouldn't be here but it is because the frontend drivers | ||
57 | * are using it (its rolled in headers) even though we won't hit the code path. | ||
58 | * So for right now just punt with this. | ||
59 | */ | ||
60 | static inline pte_t *lookup_address(unsigned long address, unsigned int *level) | ||
61 | { | ||
62 | BUG(); | ||
63 | return NULL; | ||
64 | } | ||
65 | |||
66 | static inline int m2p_add_override(unsigned long mfn, struct page *page, | ||
67 | struct gnttab_map_grant_ref *kmap_op) | ||
68 | { | ||
69 | return 0; | ||
70 | } | ||
71 | |||
72 | static inline int m2p_remove_override(struct page *page, bool clear_pte) | ||
73 | { | ||
74 | return 0; | ||
75 | } | ||
76 | |||
77 | static inline bool set_phys_to_machine(unsigned long pfn, unsigned long mfn) | ||
78 | { | ||
79 | BUG(); | ||
80 | return false; | ||
81 | } | ||
82 | #endif /* _ASM_ARM_XEN_PAGE_H */ | ||
diff --git a/arch/arm/include/debug/highbank.S b/arch/arm/include/debug/highbank.S new file mode 100644 index 00000000000..8cad4322a5a --- /dev/null +++ b/arch/arm/include/debug/highbank.S | |||
@@ -0,0 +1,17 @@ | |||
1 | /* | ||
2 | * Debugging macro include header | ||
3 | * | ||
4 | * Copyright (C) 1994-1999 Russell King | ||
5 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
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 | .macro addruart,rp,rv,tmp | ||
13 | ldr \rv, =0xfee36000 | ||
14 | ldr \rp, =0xfff36000 | ||
15 | .endm | ||
16 | |||
17 | #include <asm/hardware/debug-pl01x.S> | ||
diff --git a/arch/arm/include/debug/icedcc.S b/arch/arm/include/debug/icedcc.S new file mode 100644 index 00000000000..43afcb021fa --- /dev/null +++ b/arch/arm/include/debug/icedcc.S | |||
@@ -0,0 +1,90 @@ | |||
1 | /* | ||
2 | * arch/arm/include/debug/icedcc.S | ||
3 | * | ||
4 | * Copyright (C) 1994-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 | */ | ||
11 | |||
12 | @@ debug using ARM EmbeddedICE DCC channel | ||
13 | |||
14 | .macro addruart, rp, rv, tmp | ||
15 | .endm | ||
16 | |||
17 | #if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) || defined(CONFIG_CPU_V7) | ||
18 | |||
19 | .macro senduart, rd, rx | ||
20 | mcr p14, 0, \rd, c0, c5, 0 | ||
21 | .endm | ||
22 | |||
23 | .macro busyuart, rd, rx | ||
24 | 1001: | ||
25 | mrc p14, 0, \rx, c0, c1, 0 | ||
26 | tst \rx, #0x20000000 | ||
27 | beq 1001b | ||
28 | .endm | ||
29 | |||
30 | .macro waituart, rd, rx | ||
31 | mov \rd, #0x2000000 | ||
32 | 1001: | ||
33 | subs \rd, \rd, #1 | ||
34 | bmi 1002f | ||
35 | mrc p14, 0, \rx, c0, c1, 0 | ||
36 | tst \rx, #0x20000000 | ||
37 | bne 1001b | ||
38 | 1002: | ||
39 | .endm | ||
40 | |||
41 | #elif defined(CONFIG_CPU_XSCALE) | ||
42 | |||
43 | .macro senduart, rd, rx | ||
44 | mcr p14, 0, \rd, c8, c0, 0 | ||
45 | .endm | ||
46 | |||
47 | .macro busyuart, rd, rx | ||
48 | 1001: | ||
49 | mrc p14, 0, \rx, c14, c0, 0 | ||
50 | tst \rx, #0x10000000 | ||
51 | beq 1001b | ||
52 | .endm | ||
53 | |||
54 | .macro waituart, rd, rx | ||
55 | mov \rd, #0x10000000 | ||
56 | 1001: | ||
57 | subs \rd, \rd, #1 | ||
58 | bmi 1002f | ||
59 | mrc p14, 0, \rx, c14, c0, 0 | ||
60 | tst \rx, #0x10000000 | ||
61 | bne 1001b | ||
62 | 1002: | ||
63 | .endm | ||
64 | |||
65 | #else | ||
66 | |||
67 | .macro senduart, rd, rx | ||
68 | mcr p14, 0, \rd, c1, c0, 0 | ||
69 | .endm | ||
70 | |||
71 | .macro busyuart, rd, rx | ||
72 | 1001: | ||
73 | mrc p14, 0, \rx, c0, c0, 0 | ||
74 | tst \rx, #2 | ||
75 | beq 1001b | ||
76 | |||
77 | .endm | ||
78 | |||
79 | .macro waituart, rd, rx | ||
80 | mov \rd, #0x2000000 | ||
81 | 1001: | ||
82 | subs \rd, \rd, #1 | ||
83 | bmi 1002f | ||
84 | mrc p14, 0, \rx, c0, c0, 0 | ||
85 | tst \rx, #2 | ||
86 | bne 1001b | ||
87 | 1002: | ||
88 | .endm | ||
89 | |||
90 | #endif /* CONFIG_CPU_V6 */ | ||
diff --git a/arch/arm/include/debug/mvebu.S b/arch/arm/include/debug/mvebu.S new file mode 100644 index 00000000000..865c6d02b33 --- /dev/null +++ b/arch/arm/include/debug/mvebu.S | |||
@@ -0,0 +1,25 @@ | |||
1 | /* | ||
2 | * Early serial output macro for Marvell SoC | ||
3 | * | ||
4 | * Copyright (C) 2012 Marvell | ||
5 | * | ||
6 | * Lior Amsalem <alior@marvell.com> | ||
7 | * Gregory Clement <gregory.clement@free-electrons.com> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #define ARMADA_370_XP_REGS_PHYS_BASE 0xd0000000 | ||
15 | #define ARMADA_370_XP_REGS_VIRT_BASE 0xfeb00000 | ||
16 | |||
17 | .macro addruart, rp, rv, tmp | ||
18 | ldr \rp, =ARMADA_370_XP_REGS_PHYS_BASE | ||
19 | ldr \rv, =ARMADA_370_XP_REGS_VIRT_BASE | ||
20 | orr \rp, \rp, #0x00012000 | ||
21 | orr \rv, \rv, #0x00012000 | ||
22 | .endm | ||
23 | |||
24 | #define UART_SHIFT 2 | ||
25 | #include <asm/hardware/debug-8250.S> | ||
diff --git a/arch/arm/include/debug/picoxcell.S b/arch/arm/include/debug/picoxcell.S new file mode 100644 index 00000000000..7419deb1b94 --- /dev/null +++ b/arch/arm/include/debug/picoxcell.S | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2011 Picochip Ltd., Jamie Iles | ||
3 | * | ||
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 | ||
6 | * published by the Free Software Foundation. | ||
7 | * | ||
8 | * Derived from arch/arm/mach-davinci/include/mach/debug-macro.S to use 32-bit | ||
9 | * accesses to the 8250. | ||
10 | */ | ||
11 | #include <linux/serial_reg.h> | ||
12 | |||
13 | #define UART_SHIFT 2 | ||
14 | #define PICOXCELL_UART1_BASE 0x80230000 | ||
15 | #define PHYS_TO_IO(x) (((x) & 0x00ffffff) | 0xfe000000) | ||
16 | |||
17 | .macro addruart, rp, rv, tmp | ||
18 | ldr \rv, =PHYS_TO_IO(PICOXCELL_UART1_BASE) | ||
19 | ldr \rp, =PICOXCELL_UART1_BASE | ||
20 | .endm | ||
21 | |||
22 | .macro senduart,rd,rx | ||
23 | str \rd, [\rx, #UART_TX << UART_SHIFT] | ||
24 | .endm | ||
25 | |||
26 | .macro busyuart,rd,rx | ||
27 | 1002: ldr \rd, [\rx, #UART_LSR << UART_SHIFT] | ||
28 | and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE | ||
29 | teq \rd, #UART_LSR_TEMT | UART_LSR_THRE | ||
30 | bne 1002b | ||
31 | .endm | ||
32 | |||
33 | /* The UART's don't have any flow control IO's wired up. */ | ||
34 | .macro waituart,rd,rx | ||
35 | .endm | ||
diff --git a/arch/arm/include/debug/socfpga.S b/arch/arm/include/debug/socfpga.S new file mode 100644 index 00000000000..d6f26d23374 --- /dev/null +++ b/arch/arm/include/debug/socfpga.S | |||
@@ -0,0 +1,16 @@ | |||
1 | /* | ||
2 | * Copyright (C) 1994-1999 Russell King | ||
3 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License version 2 as | ||
7 | * published by the Free Software Foundation. | ||
8 | */ | ||
9 | |||
10 | .macro addruart, rp, rv, tmp | ||
11 | mov \rp, #DEBUG_LL_UART_OFFSET | ||
12 | orr \rp, \rp, #0x00c00000 | ||
13 | orr \rv, \rp, #0xfe000000 @ virtual base | ||
14 | orr \rp, \rp, #0xff000000 @ physical base | ||
15 | .endm | ||
16 | |||
diff --git a/arch/arm/include/debug/vexpress.S b/arch/arm/include/debug/vexpress.S new file mode 100644 index 00000000000..9f509f55d07 --- /dev/null +++ b/arch/arm/include/debug/vexpress.S | |||
@@ -0,0 +1,84 @@ | |||
1 | /* arch/arm/mach-realview/include/mach/debug-macro.S | ||
2 | * | ||
3 | * Debugging macro include header | ||
4 | * | ||
5 | * Copyright (C) 1994-1999 Russell King | ||
6 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #define DEBUG_LL_PHYS_BASE 0x10000000 | ||
14 | #define DEBUG_LL_UART_OFFSET 0x00009000 | ||
15 | |||
16 | #define DEBUG_LL_PHYS_BASE_RS1 0x1c000000 | ||
17 | #define DEBUG_LL_UART_OFFSET_RS1 0x00090000 | ||
18 | |||
19 | #define DEBUG_LL_VIRT_BASE 0xf8000000 | ||
20 | |||
21 | #if defined(CONFIG_DEBUG_VEXPRESS_UART0_DETECT) | ||
22 | |||
23 | .macro addruart,rp,rv,tmp | ||
24 | |||
25 | @ Make an educated guess regarding the memory map: | ||
26 | @ - the original A9 core tile, which has MPCore peripherals | ||
27 | @ located at 0x1e000000, should use UART at 0x10009000 | ||
28 | @ - all other (RS1 complaint) tiles use UART mapped | ||
29 | @ at 0x1c090000 | ||
30 | mrc p15, 4, \tmp, c15, c0, 0 | ||
31 | cmp \tmp, #0x1e000000 | ||
32 | |||
33 | @ Original memory map | ||
34 | moveq \rp, #DEBUG_LL_UART_OFFSET | ||
35 | orreq \rv, \rp, #DEBUG_LL_VIRT_BASE | ||
36 | orreq \rp, \rp, #DEBUG_LL_PHYS_BASE | ||
37 | |||
38 | @ RS1 memory map | ||
39 | movne \rp, #DEBUG_LL_UART_OFFSET_RS1 | ||
40 | orrne \rv, \rp, #DEBUG_LL_VIRT_BASE | ||
41 | orrne \rp, \rp, #DEBUG_LL_PHYS_BASE_RS1 | ||
42 | |||
43 | .endm | ||
44 | |||
45 | #include <asm/hardware/debug-pl01x.S> | ||
46 | |||
47 | #elif defined(CONFIG_DEBUG_VEXPRESS_UART0_CA9) | ||
48 | |||
49 | .macro addruart,rp,rv,tmp | ||
50 | mov \rp, #DEBUG_LL_UART_OFFSET | ||
51 | orr \rv, \rp, #DEBUG_LL_VIRT_BASE | ||
52 | orr \rp, \rp, #DEBUG_LL_PHYS_BASE | ||
53 | .endm | ||
54 | |||
55 | #include <asm/hardware/debug-pl01x.S> | ||
56 | |||
57 | #elif defined(CONFIG_DEBUG_VEXPRESS_UART0_RS1) | ||
58 | |||
59 | .macro addruart,rp,rv,tmp | ||
60 | mov \rp, #DEBUG_LL_UART_OFFSET_RS1 | ||
61 | orr \rv, \rp, #DEBUG_LL_VIRT_BASE | ||
62 | orr \rp, \rp, #DEBUG_LL_PHYS_BASE_RS1 | ||
63 | .endm | ||
64 | |||
65 | #include <asm/hardware/debug-pl01x.S> | ||
66 | |||
67 | #else /* CONFIG_DEBUG_LL_UART_NONE */ | ||
68 | |||
69 | .macro addruart, rp, rv, tmp | ||
70 | /* Safe dummy values */ | ||
71 | mov \rp, #0 | ||
72 | mov \rv, #DEBUG_LL_VIRT_BASE | ||
73 | .endm | ||
74 | |||
75 | .macro senduart,rd,rx | ||
76 | .endm | ||
77 | |||
78 | .macro waituart,rd,rx | ||
79 | .endm | ||
80 | |||
81 | .macro busyuart,rd,rx | ||
82 | .endm | ||
83 | |||
84 | #endif | ||
diff --git a/arch/arm/include/uapi/asm/Kbuild b/arch/arm/include/uapi/asm/Kbuild new file mode 100644 index 00000000000..baebb3da1d4 --- /dev/null +++ b/arch/arm/include/uapi/asm/Kbuild | |||
@@ -0,0 +1,3 @@ | |||
1 | # UAPI Header export list | ||
2 | include include/uapi/asm-generic/Kbuild.asm | ||
3 | |||