diff options
Diffstat (limited to 'include')
638 files changed, 10098 insertions, 4143 deletions
diff --git a/include/acpi/acinterp.h b/include/acpi/acinterp.h index ce7c9d653910..73967c8152d3 100644 --- a/include/acpi/acinterp.h +++ b/include/acpi/acinterp.h | |||
@@ -253,7 +253,8 @@ acpi_ex_release_mutex(union acpi_operand_object *obj_desc, | |||
253 | 253 | ||
254 | void acpi_ex_release_all_mutexes(struct acpi_thread_state *thread); | 254 | void acpi_ex_release_all_mutexes(struct acpi_thread_state *thread); |
255 | 255 | ||
256 | void acpi_ex_unlink_mutex(union acpi_operand_object *obj_desc); | 256 | void acpi_ex_unlink_mutex(union acpi_operand_object *obj_desc, |
257 | struct acpi_thread_state *thread); | ||
257 | 258 | ||
258 | /* | 259 | /* |
259 | * exprep - ACPI AML execution - prep utilities | 260 | * exprep - ACPI AML execution - prep utilities |
diff --git a/include/acpi/acobject.h b/include/acpi/acobject.h index 04e9735a6742..5206d61d74a6 100644 --- a/include/acpi/acobject.h +++ b/include/acpi/acobject.h | |||
@@ -155,7 +155,7 @@ struct acpi_object_event { | |||
155 | struct acpi_object_mutex { | 155 | struct acpi_object_mutex { |
156 | ACPI_OBJECT_COMMON_HEADER u8 sync_level; /* 0-15, specified in Mutex() call */ | 156 | ACPI_OBJECT_COMMON_HEADER u8 sync_level; /* 0-15, specified in Mutex() call */ |
157 | u16 acquisition_depth; /* Allow multiple Acquires, same thread */ | 157 | u16 acquisition_depth; /* Allow multiple Acquires, same thread */ |
158 | struct acpi_thread_state *owner_thread; /* Current owner of the mutex */ | 158 | acpi_thread_id owner_thread_id; /* Current owner of the mutex */ |
159 | acpi_mutex os_mutex; /* Actual OS synchronization object */ | 159 | acpi_mutex os_mutex; /* Actual OS synchronization object */ |
160 | union acpi_operand_object *prev; /* Link for list of acquired mutexes */ | 160 | union acpi_operand_object *prev; /* Link for list of acquired mutexes */ |
161 | union acpi_operand_object *next; /* Link for list of acquired mutexes */ | 161 | union acpi_operand_object *next; /* Link for list of acquired mutexes */ |
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h index 4dc8a5043ef0..f6275b0e66dd 100644 --- a/include/acpi/acpi_drivers.h +++ b/include/acpi/acpi_drivers.h | |||
@@ -105,12 +105,6 @@ int acpi_ec_ecdt_probe(void); | |||
105 | 105 | ||
106 | int acpi_processor_set_thermal_limit(acpi_handle handle, int type); | 106 | int acpi_processor_set_thermal_limit(acpi_handle handle, int type); |
107 | 107 | ||
108 | /* -------------------------------------------------------------------------- | ||
109 | Hot Keys | ||
110 | -------------------------------------------------------------------------- */ | ||
111 | |||
112 | extern int acpi_specific_hotkey_enabled; | ||
113 | |||
114 | /*-------------------------------------------------------------------------- | 108 | /*-------------------------------------------------------------------------- |
115 | Dock Station | 109 | Dock Station |
116 | -------------------------------------------------------------------------- */ | 110 | -------------------------------------------------------------------------- */ |
@@ -122,10 +116,34 @@ extern int register_hotplug_dock_device(acpi_handle handle, | |||
122 | acpi_notify_handler handler, void *context); | 116 | acpi_notify_handler handler, void *context); |
123 | extern void unregister_hotplug_dock_device(acpi_handle handle); | 117 | extern void unregister_hotplug_dock_device(acpi_handle handle); |
124 | #else | 118 | #else |
125 | #define is_dock_device(h) (0) | 119 | static inline int is_dock_device(acpi_handle handle) |
126 | #define register_dock_notifier(nb) (-ENODEV) | 120 | { |
127 | #define unregister_dock_notifier(nb) do { } while(0) | 121 | return 0; |
128 | #define register_hotplug_dock_device(h1, h2, c) (-ENODEV) | 122 | } |
129 | #define unregister_hotplug_dock_device(h) do { } while(0) | 123 | static inline int register_dock_notifier(struct notifier_block *nb) |
124 | { | ||
125 | return -ENODEV; | ||
126 | } | ||
127 | static inline void unregister_dock_notifier(struct notifier_block *nb) | ||
128 | { | ||
129 | } | ||
130 | static inline int register_hotplug_dock_device(acpi_handle handle, | ||
131 | acpi_notify_handler handler, void *context) | ||
132 | { | ||
133 | return -ENODEV; | ||
134 | } | ||
135 | static inline void unregister_hotplug_dock_device(acpi_handle handle) | ||
136 | { | ||
137 | } | ||
138 | #endif | ||
139 | |||
140 | /*-------------------------------------------------------------------------- | ||
141 | Suspend/Resume | ||
142 | -------------------------------------------------------------------------- */ | ||
143 | #ifdef CONFIG_ACPI_SLEEP | ||
144 | extern int acpi_sleep_init(void); | ||
145 | #else | ||
146 | #define acpi_sleep_init() do {} while (0) | ||
130 | #endif | 147 | #endif |
148 | |||
131 | #endif /*__ACPI_DRIVERS_H__*/ | 149 | #endif /*__ACPI_DRIVERS_H__*/ |
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h index 781394b9efe0..2785058c82ab 100644 --- a/include/acpi/acpiosxf.h +++ b/include/acpi/acpiosxf.h | |||
@@ -240,12 +240,6 @@ acpi_status | |||
240 | acpi_os_validate_address(u8 space_id, | 240 | acpi_os_validate_address(u8 space_id, |
241 | acpi_physical_address address, acpi_size length); | 241 | acpi_physical_address address, acpi_size length); |
242 | 242 | ||
243 | u8 acpi_os_readable(void *pointer, acpi_size length); | ||
244 | |||
245 | #ifdef ACPI_FUTURE_USAGE | ||
246 | u8 acpi_os_writable(void *pointer, acpi_size length); | ||
247 | #endif | ||
248 | |||
249 | u64 acpi_os_get_timer(void); | 243 | u64 acpi_os_get_timer(void); |
250 | 244 | ||
251 | acpi_status acpi_os_signal(u32 function, void *info); | 245 | acpi_status acpi_os_signal(u32 function, void *info); |
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index 7798d2a9f793..916c0102db5b 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
@@ -79,6 +79,7 @@ struct acpi_processor_power { | |||
79 | u32 bm_activity; | 79 | u32 bm_activity; |
80 | int count; | 80 | int count; |
81 | struct acpi_processor_cx states[ACPI_PROCESSOR_MAX_POWER]; | 81 | struct acpi_processor_cx states[ACPI_PROCESSOR_MAX_POWER]; |
82 | int timer_broadcast_on_state; | ||
82 | }; | 83 | }; |
83 | 84 | ||
84 | /* Performance Management */ | 85 | /* Performance Management */ |
diff --git a/include/asm-alpha/mman.h b/include/asm-alpha/mman.h index 5f24c755f577..90d7c35d2867 100644 --- a/include/asm-alpha/mman.h +++ b/include/asm-alpha/mman.h | |||
@@ -49,7 +49,6 @@ | |||
49 | #define MADV_DOFORK 11 /* do inherit across fork */ | 49 | #define MADV_DOFORK 11 /* do inherit across fork */ |
50 | 50 | ||
51 | /* compatibility flags */ | 51 | /* compatibility flags */ |
52 | #define MAP_ANON MAP_ANONYMOUS | ||
53 | #define MAP_FILE 0 | 52 | #define MAP_FILE 0 |
54 | 53 | ||
55 | #endif /* __ALPHA_MMAN_H__ */ | 54 | #endif /* __ALPHA_MMAN_H__ */ |
diff --git a/include/asm-alpha/percpu.h b/include/asm-alpha/percpu.h index 48348fe34c19..651ebb141b24 100644 --- a/include/asm-alpha/percpu.h +++ b/include/asm-alpha/percpu.h | |||
@@ -1,6 +1,20 @@ | |||
1 | #ifndef __ALPHA_PERCPU_H | 1 | #ifndef __ALPHA_PERCPU_H |
2 | #define __ALPHA_PERCPU_H | 2 | #define __ALPHA_PERCPU_H |
3 | 3 | ||
4 | /* | ||
5 | * Increase the per cpu area for Alpha so that | ||
6 | * modules using percpu area can load. | ||
7 | */ | ||
8 | #ifdef CONFIG_MODULES | ||
9 | # define PERCPU_MODULE_RESERVE 8192 | ||
10 | #else | ||
11 | # define PERCPU_MODULE_RESERVE 0 | ||
12 | #endif | ||
13 | |||
14 | #define PERCPU_ENOUGH_ROOM \ | ||
15 | (ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES) + \ | ||
16 | PERCPU_MODULE_RESERVE) | ||
17 | |||
4 | #include <asm-generic/percpu.h> | 18 | #include <asm-generic/percpu.h> |
5 | 19 | ||
6 | #endif /* __ALPHA_PERCPU_H */ | 20 | #endif /* __ALPHA_PERCPU_H */ |
diff --git a/include/asm-alpha/termios.h b/include/asm-alpha/termios.h index 1cfd27f0ad73..39e492c3bfa3 100644 --- a/include/asm-alpha/termios.h +++ b/include/asm-alpha/termios.h | |||
@@ -66,24 +66,6 @@ struct termio { | |||
66 | #define _VEOL2 6 | 66 | #define _VEOL2 6 |
67 | #define _VSWTC 7 | 67 | #define _VSWTC 7 |
68 | 68 | ||
69 | /* line disciplines */ | ||
70 | #define N_TTY 0 | ||
71 | #define N_SLIP 1 | ||
72 | #define N_MOUSE 2 | ||
73 | #define N_PPP 3 | ||
74 | #define N_STRIP 4 | ||
75 | #define N_AX25 5 | ||
76 | #define N_X25 6 /* X.25 async */ | ||
77 | #define N_6PACK 7 | ||
78 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
79 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
80 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
81 | #define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ | ||
82 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
83 | #define N_HDLC 13 /* synchronous HDLC */ | ||
84 | #define N_SYNC_PPP 14 | ||
85 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
86 | |||
87 | #ifdef __KERNEL__ | 69 | #ifdef __KERNEL__ |
88 | /* eof=^D eol=\0 eol2=\0 erase=del | 70 | /* eof=^D eol=\0 eol2=\0 erase=del |
89 | werase=^W kill=^U reprint=^R sxtc=\0 | 71 | werase=^W kill=^U reprint=^R sxtc=\0 |
diff --git a/include/asm-arm/.gitignore b/include/asm-arm/.gitignore new file mode 100644 index 000000000000..e02c15d158fc --- /dev/null +++ b/include/asm-arm/.gitignore | |||
@@ -0,0 +1,2 @@ | |||
1 | arch | ||
2 | mach-types.h | ||
diff --git a/include/asm-arm/arch-aaec2000/entry-macro.S b/include/asm-arm/arch-aaec2000/entry-macro.S index 1eb3503bd16e..83fdf68f6b7c 100644 --- a/include/asm-arm/arch-aaec2000/entry-macro.S +++ b/include/asm-arm/arch-aaec2000/entry-macro.S | |||
@@ -15,6 +15,12 @@ | |||
15 | .macro disable_fiq | 15 | .macro disable_fiq |
16 | .endm | 16 | .endm |
17 | 17 | ||
18 | .macro get_irqnr_preamble, base, tmp | ||
19 | .endm | ||
20 | |||
21 | .macro arch_ret_to_user, tmp1, tmp2 | ||
22 | .endm | ||
23 | |||
18 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 24 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
19 | mov r4, #0xf8000000 | 25 | mov r4, #0xf8000000 |
20 | add r4, r4, #0x00000500 | 26 | add r4, r4, #0x00000500 |
diff --git a/include/asm-arm/arch-at91rm9200/at91_aic.h b/include/asm-arm/arch-at91/at91_aic.h index 267e69812e26..df44c12a12d4 100644 --- a/include/asm-arm/arch-at91rm9200/at91_aic.h +++ b/include/asm-arm/arch-at91/at91_aic.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/at91_aic.h | 2 | * include/asm-arm/arch-at91/at91_aic.h |
3 | * | 3 | * |
4 | * Copyright (C) 2005 Ivan Kokshaysky | 4 | * Copyright (C) 2005 Ivan Kokshaysky |
5 | * Copyright (C) SAN People | 5 | * Copyright (C) SAN People |
diff --git a/include/asm-arm/arch-at91rm9200/at91_dbgu.h b/include/asm-arm/arch-at91/at91_dbgu.h index e4b8b27acfca..b0369e176f7b 100644 --- a/include/asm-arm/arch-at91rm9200/at91_dbgu.h +++ b/include/asm-arm/arch-at91/at91_dbgu.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/at91_dbgu.h | 2 | * include/asm-arm/arch-at91/at91_dbgu.h |
3 | * | 3 | * |
4 | * Copyright (C) 2005 Ivan Kokshaysky | 4 | * Copyright (C) 2005 Ivan Kokshaysky |
5 | * Copyright (C) SAN People | 5 | * Copyright (C) SAN People |
@@ -35,6 +35,20 @@ | |||
35 | #define AT91_CIDR_NVPSIZ (0xf << 8) /* Nonvolatile Program Memory Size */ | 35 | #define AT91_CIDR_NVPSIZ (0xf << 8) /* Nonvolatile Program Memory Size */ |
36 | #define AT91_CIDR_NVPSIZ2 (0xf << 12) /* Second Nonvolatile Program Memory Size */ | 36 | #define AT91_CIDR_NVPSIZ2 (0xf << 12) /* Second Nonvolatile Program Memory Size */ |
37 | #define AT91_CIDR_SRAMSIZ (0xf << 16) /* Internal SRAM Size */ | 37 | #define AT91_CIDR_SRAMSIZ (0xf << 16) /* Internal SRAM Size */ |
38 | #define AT91_CIDR_SRAMSIZ_1K (1 << 16) | ||
39 | #define AT91_CIDR_SRAMSIZ_2K (2 << 16) | ||
40 | #define AT91_CIDR_SRAMSIZ_112K (4 << 16) | ||
41 | #define AT91_CIDR_SRAMSIZ_4K (5 << 16) | ||
42 | #define AT91_CIDR_SRAMSIZ_80K (6 << 16) | ||
43 | #define AT91_CIDR_SRAMSIZ_160K (7 << 16) | ||
44 | #define AT91_CIDR_SRAMSIZ_8K (8 << 16) | ||
45 | #define AT91_CIDR_SRAMSIZ_16K (9 << 16) | ||
46 | #define AT91_CIDR_SRAMSIZ_32K (10 << 16) | ||
47 | #define AT91_CIDR_SRAMSIZ_64K (11 << 16) | ||
48 | #define AT91_CIDR_SRAMSIZ_128K (12 << 16) | ||
49 | #define AT91_CIDR_SRAMSIZ_256K (13 << 16) | ||
50 | #define AT91_CIDR_SRAMSIZ_96K (14 << 16) | ||
51 | #define AT91_CIDR_SRAMSIZ_512K (15 << 16) | ||
38 | #define AT91_CIDR_ARCH (0xff << 20) /* Architecture Identifier */ | 52 | #define AT91_CIDR_ARCH (0xff << 20) /* Architecture Identifier */ |
39 | #define AT91_CIDR_NVPTYP (7 << 28) /* Nonvolatile Program Memory Type */ | 53 | #define AT91_CIDR_NVPTYP (7 << 28) /* Nonvolatile Program Memory Type */ |
40 | #define AT91_CIDR_EXT (1 << 31) /* Extension Flag */ | 54 | #define AT91_CIDR_EXT (1 << 31) /* Extension Flag */ |
diff --git a/include/asm-arm/arch-at91rm9200/at91_ecc.h b/include/asm-arm/arch-at91/at91_ecc.h index 5c564ede5c5d..ff93df516d6d 100644 --- a/include/asm-arm/arch-at91rm9200/at91_ecc.h +++ b/include/asm-arm/arch-at91/at91_ecc.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/at91_ecc.h | 2 | * include/asm-arm/arch-at91/at91_ecc.h |
3 | * | 3 | * |
4 | * Error Corrected Code Controller (ECC) - System peripherals regsters. | 4 | * Error Corrected Code Controller (ECC) - System peripherals regsters. |
5 | * Based on AT91SAM9260 datasheet revision B. | 5 | * Based on AT91SAM9260 datasheet revision B. |
diff --git a/include/asm-arm/arch-at91rm9200/at91_lcdc.h b/include/asm-arm/arch-at91/at91_lcdc.h index 9cbfcdd3c471..ab040a40d37b 100644 --- a/include/asm-arm/arch-at91rm9200/at91_lcdc.h +++ b/include/asm-arm/arch-at91/at91_lcdc.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/at91_lcdc.h | 2 | * include/asm-arm/arch-at91/at91_lcdc.h |
3 | * | 3 | * |
4 | * LCD Controller (LCDC). | 4 | * LCD Controller (LCDC). |
5 | * Based on AT91SAM9261 datasheet revision E. | 5 | * Based on AT91SAM9261 datasheet revision E. |
diff --git a/include/asm-arm/arch-at91rm9200/at91_mci.h b/include/asm-arm/arch-at91/at91_mci.h index 9a552cb743c0..40a9876b661a 100644 --- a/include/asm-arm/arch-at91rm9200/at91_mci.h +++ b/include/asm-arm/arch-at91/at91_mci.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/at91_mci.h | 2 | * include/asm-arm/arch-at91/at91_mci.h |
3 | * | 3 | * |
4 | * Copyright (C) 2005 Ivan Kokshaysky | 4 | * Copyright (C) 2005 Ivan Kokshaysky |
5 | * Copyright (C) SAN People | 5 | * Copyright (C) SAN People |
diff --git a/include/asm-arm/arch-at91rm9200/at91_pio.h b/include/asm-arm/arch-at91/at91_pio.h index 680eaa1f5915..84c3866d309f 100644 --- a/include/asm-arm/arch-at91rm9200/at91_pio.h +++ b/include/asm-arm/arch-at91/at91_pio.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/at91_pio.h | 2 | * include/asm-arm/arch-at91/at91_pio.h |
3 | * | 3 | * |
4 | * Copyright (C) 2005 Ivan Kokshaysky | 4 | * Copyright (C) 2005 Ivan Kokshaysky |
5 | * Copyright (C) SAN People | 5 | * Copyright (C) SAN People |
diff --git a/include/asm-arm/arch-at91rm9200/at91_pit.h b/include/asm-arm/arch-at91/at91_pit.h index 4a30d009c588..5026325a5ae4 100644 --- a/include/asm-arm/arch-at91rm9200/at91_pit.h +++ b/include/asm-arm/arch-at91/at91_pit.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/at91_pit.h | 2 | * include/asm-arm/arch-at91/at91_pit.h |
3 | * | 3 | * |
4 | * Periodic Interval Timer (PIT) - System peripherals regsters. | 4 | * Periodic Interval Timer (PIT) - System peripherals regsters. |
5 | * Based on AT91SAM9261 datasheet revision D. | 5 | * Based on AT91SAM9261 datasheet revision D. |
diff --git a/include/asm-arm/arch-at91rm9200/at91_pmc.h b/include/asm-arm/arch-at91/at91_pmc.h index c3b489d09b6c..33ff5b6798ee 100644 --- a/include/asm-arm/arch-at91rm9200/at91_pmc.h +++ b/include/asm-arm/arch-at91/at91_pmc.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/at91_pmc.h | 2 | * include/asm-arm/arch-at91/at91_pmc.h |
3 | * | 3 | * |
4 | * Copyright (C) 2005 Ivan Kokshaysky | 4 | * Copyright (C) 2005 Ivan Kokshaysky |
5 | * Copyright (C) SAN People | 5 | * Copyright (C) SAN People |
diff --git a/include/asm-arm/arch-at91rm9200/at91_rstc.h b/include/asm-arm/arch-at91/at91_rstc.h index 237d3c40b318..fb8d1618a231 100644 --- a/include/asm-arm/arch-at91rm9200/at91_rstc.h +++ b/include/asm-arm/arch-at91/at91_rstc.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/at91_rstc.h | 2 | * include/asm-arm/arch-at91/at91_rstc.h |
3 | * | 3 | * |
4 | * Reset Controller (RSTC) - System peripherals regsters. | 4 | * Reset Controller (RSTC) - System peripherals regsters. |
5 | * Based on AT91SAM9261 datasheet revision D. | 5 | * Based on AT91SAM9261 datasheet revision D. |
@@ -17,7 +17,7 @@ | |||
17 | #define AT91_RSTC_PROCRST (1 << 0) /* Processor Reset */ | 17 | #define AT91_RSTC_PROCRST (1 << 0) /* Processor Reset */ |
18 | #define AT91_RSTC_PERRST (1 << 2) /* Peripheral Reset */ | 18 | #define AT91_RSTC_PERRST (1 << 2) /* Peripheral Reset */ |
19 | #define AT91_RSTC_EXTRST (1 << 3) /* External Reset */ | 19 | #define AT91_RSTC_EXTRST (1 << 3) /* External Reset */ |
20 | #define AT91_RSTC_KEY (0xff << 24) /* KEY Password */ | 20 | #define AT91_RSTC_KEY (0xa5 << 24) /* KEY Password */ |
21 | 21 | ||
22 | #define AT91_RSTC_SR (AT91_RSTC + 0x04) /* Reset Controller Status Register */ | 22 | #define AT91_RSTC_SR (AT91_RSTC + 0x04) /* Reset Controller Status Register */ |
23 | #define AT91_RSTC_URSTS (1 << 0) /* User Reset Status */ | 23 | #define AT91_RSTC_URSTS (1 << 0) /* User Reset Status */ |
@@ -34,6 +34,5 @@ | |||
34 | #define AT91_RSTC_URSTEN (1 << 0) /* User Reset Enable */ | 34 | #define AT91_RSTC_URSTEN (1 << 0) /* User Reset Enable */ |
35 | #define AT91_RSTC_URSTIEN (1 << 4) /* User Reset Interrupt Enable */ | 35 | #define AT91_RSTC_URSTIEN (1 << 4) /* User Reset Interrupt Enable */ |
36 | #define AT91_RSTC_ERSTL (0xf << 8) /* External Reset Length */ | 36 | #define AT91_RSTC_ERSTL (0xf << 8) /* External Reset Length */ |
37 | #define AT91_RSTC_KEY (0xff << 24) /* KEY Password */ | ||
38 | 37 | ||
39 | #endif | 38 | #endif |
diff --git a/include/asm-arm/arch-at91rm9200/at91_rtc.h b/include/asm-arm/arch-at91/at91_rtc.h index 095fe0883102..af9bd28174c0 100644 --- a/include/asm-arm/arch-at91rm9200/at91_rtc.h +++ b/include/asm-arm/arch-at91/at91_rtc.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/at91_rtc.h | 2 | * include/asm-arm/arch-at91/at91_rtc.h |
3 | * | 3 | * |
4 | * Copyright (C) 2005 Ivan Kokshaysky | 4 | * Copyright (C) 2005 Ivan Kokshaysky |
5 | * Copyright (C) SAN People | 5 | * Copyright (C) SAN People |
diff --git a/include/asm-arm/arch-at91rm9200/at91_rtt.h b/include/asm-arm/arch-at91/at91_rtt.h index c6751ba3cccc..bae1103fbbb2 100644 --- a/include/asm-arm/arch-at91rm9200/at91_rtt.h +++ b/include/asm-arm/arch-at91/at91_rtt.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/at91_rtt.h | 2 | * include/asm-arm/arch-at91/at91_rtt.h |
3 | * | 3 | * |
4 | * Real-time Timer (RTT) - System peripherals regsters. | 4 | * Real-time Timer (RTT) - System peripherals regsters. |
5 | * Based on AT91SAM9261 datasheet revision D. | 5 | * Based on AT91SAM9261 datasheet revision D. |
diff --git a/include/asm-arm/arch-at91rm9200/at91_shdwc.h b/include/asm-arm/arch-at91/at91_shdwc.h index 0439250553c9..795fcc266228 100644 --- a/include/asm-arm/arch-at91rm9200/at91_shdwc.h +++ b/include/asm-arm/arch-at91/at91_shdwc.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/at91_shdwc.h | 2 | * include/asm-arm/arch-at91/at91_shdwc.h |
3 | * | 3 | * |
4 | * Shutdown Controller (SHDWC) - System peripherals regsters. | 4 | * Shutdown Controller (SHDWC) - System peripherals regsters. |
5 | * Based on AT91SAM9261 datasheet revision D. | 5 | * Based on AT91SAM9261 datasheet revision D. |
diff --git a/include/asm-arm/arch-at91rm9200/at91_spi.h b/include/asm-arm/arch-at91/at91_spi.h index bec48ca89bba..f9b9a8464997 100644 --- a/include/asm-arm/arch-at91rm9200/at91_spi.h +++ b/include/asm-arm/arch-at91/at91_spi.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/at91_spi.h | 2 | * include/asm-arm/arch-at91/at91_spi.h |
3 | * | 3 | * |
4 | * Copyright (C) 2005 Ivan Kokshaysky | 4 | * Copyright (C) 2005 Ivan Kokshaysky |
5 | * Copyright (C) SAN People | 5 | * Copyright (C) SAN People |
diff --git a/include/asm-arm/arch-at91rm9200/at91_ssc.h b/include/asm-arm/arch-at91/at91_ssc.h index 694bcaa8f7c2..0ecc73460b50 100644 --- a/include/asm-arm/arch-at91rm9200/at91_ssc.h +++ b/include/asm-arm/arch-at91/at91_ssc.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/at91_ssc.h | 2 | * include/asm-arm/arch-at91/at91_ssc.h |
3 | * | 3 | * |
4 | * Copyright (C) SAN People | 4 | * Copyright (C) SAN People |
5 | * | 5 | * |
diff --git a/include/asm-arm/arch-at91rm9200/at91_st.h b/include/asm-arm/arch-at91/at91_st.h index 2432ddfc6c47..30446e2ea772 100644 --- a/include/asm-arm/arch-at91rm9200/at91_st.h +++ b/include/asm-arm/arch-at91/at91_st.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/at91_st.h | 2 | * include/asm-arm/arch-at91/at91_st.h |
3 | * | 3 | * |
4 | * Copyright (C) 2005 Ivan Kokshaysky | 4 | * Copyright (C) 2005 Ivan Kokshaysky |
5 | * Copyright (C) SAN People | 5 | * Copyright (C) SAN People |
diff --git a/include/asm-arm/arch-at91rm9200/at91_tc.h b/include/asm-arm/arch-at91/at91_tc.h index 8d06eb078e1d..b85d3faeef5c 100644 --- a/include/asm-arm/arch-at91rm9200/at91_tc.h +++ b/include/asm-arm/arch-at91/at91_tc.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/at91_tc.h | 2 | * include/asm-arm/arch-at91/at91_tc.h |
3 | * | 3 | * |
4 | * Copyright (C) SAN People | 4 | * Copyright (C) SAN People |
5 | * | 5 | * |
diff --git a/include/asm-arm/arch-at91rm9200/at91_twi.h b/include/asm-arm/arch-at91/at91_twi.h index cda914f1e740..ca9a90733456 100644 --- a/include/asm-arm/arch-at91rm9200/at91_twi.h +++ b/include/asm-arm/arch-at91/at91_twi.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/at91_twi.h | 2 | * include/asm-arm/arch-at91/at91_twi.h |
3 | * | 3 | * |
4 | * Copyright (C) 2005 Ivan Kokshaysky | 4 | * Copyright (C) 2005 Ivan Kokshaysky |
5 | * Copyright (C) SAN People | 5 | * Copyright (C) SAN People |
diff --git a/include/asm-arm/arch-at91rm9200/at91_wdt.h b/include/asm-arm/arch-at91/at91_wdt.h index ac63e775772c..7251a344c740 100644 --- a/include/asm-arm/arch-at91rm9200/at91_wdt.h +++ b/include/asm-arm/arch-at91/at91_wdt.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/at91_wdt.h | 2 | * include/asm-arm/arch-at91/at91_wdt.h |
3 | * | 3 | * |
4 | * Watchdog Timer (WDT) - System peripherals regsters. | 4 | * Watchdog Timer (WDT) - System peripherals regsters. |
5 | * Based on AT91SAM9261 datasheet revision D. | 5 | * Based on AT91SAM9261 datasheet revision D. |
diff --git a/include/asm-arm/arch-at91rm9200/at91rm9200.h b/include/asm-arm/arch-at91/at91rm9200.h index c569b6a21a42..a12ac8ab2ad0 100644 --- a/include/asm-arm/arch-at91rm9200/at91rm9200.h +++ b/include/asm-arm/arch-at91/at91rm9200.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/at91rm9200.h | 2 | * include/asm-arm/arch-at91/at91rm9200.h |
3 | * | 3 | * |
4 | * Copyright (C) 2005 Ivan Kokshaysky | 4 | * Copyright (C) 2005 Ivan Kokshaysky |
5 | * Copyright (C) SAN People | 5 | * Copyright (C) SAN People |
diff --git a/include/asm-arm/arch-at91rm9200/at91rm9200_emac.h b/include/asm-arm/arch-at91/at91rm9200_emac.h index fbc091e61e2f..0c417af5fe7f 100644 --- a/include/asm-arm/arch-at91rm9200/at91rm9200_emac.h +++ b/include/asm-arm/arch-at91/at91rm9200_emac.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/at91rm9200_emac.h | 2 | * include/asm-arm/arch-at91/at91rm9200_emac.h |
3 | * | 3 | * |
4 | * Copyright (C) 2005 Ivan Kokshaysky | 4 | * Copyright (C) 2005 Ivan Kokshaysky |
5 | * Copyright (C) SAN People | 5 | * Copyright (C) SAN People |
diff --git a/include/asm-arm/arch-at91rm9200/at91rm9200_mc.h b/include/asm-arm/arch-at91/at91rm9200_mc.h index 0c0d81480b3a..24d012939cc4 100644 --- a/include/asm-arm/arch-at91rm9200/at91rm9200_mc.h +++ b/include/asm-arm/arch-at91/at91rm9200_mc.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/at91rm9200_mc.h | 2 | * include/asm-arm/arch-at91/at91rm9200_mc.h |
3 | * | 3 | * |
4 | * Copyright (C) 2005 Ivan Kokshaysky | 4 | * Copyright (C) 2005 Ivan Kokshaysky |
5 | * Copyright (C) SAN People | 5 | * Copyright (C) SAN People |
diff --git a/include/asm-arm/arch-at91rm9200/at91sam9260.h b/include/asm-arm/arch-at91/at91sam9260.h index 46f4dd65c035..2cadebc36af7 100644 --- a/include/asm-arm/arch-at91rm9200/at91sam9260.h +++ b/include/asm-arm/arch-at91/at91sam9260.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/at91sam9260.h | 2 | * include/asm-arm/arch-at91/at91sam9260.h |
3 | * | 3 | * |
4 | * (C) 2006 Andrew Victor | 4 | * (C) 2006 Andrew Victor |
5 | * | 5 | * |
@@ -113,6 +113,10 @@ | |||
113 | 113 | ||
114 | #define AT91SAM9260_UHP_BASE 0x00500000 /* USB Host controller */ | 114 | #define AT91SAM9260_UHP_BASE 0x00500000 /* USB Host controller */ |
115 | 115 | ||
116 | #define AT91SAM9XE_FLASH_BASE 0x00200000 /* Internal FLASH base address */ | ||
117 | #define AT91SAM9XE_SRAM_BASE 0x00300000 /* Internal SRAM base address */ | ||
118 | |||
119 | |||
116 | #if 0 | 120 | #if 0 |
117 | /* | 121 | /* |
118 | * PIO pin definitions (peripheral A/B multiplexing). | 122 | * PIO pin definitions (peripheral A/B multiplexing). |
diff --git a/include/asm-arm/arch-at91rm9200/at91sam9260_matrix.h b/include/asm-arm/arch-at91/at91sam9260_matrix.h index 78f6b4917b8b..aacb1e976422 100644 --- a/include/asm-arm/arch-at91rm9200/at91sam9260_matrix.h +++ b/include/asm-arm/arch-at91/at91sam9260_matrix.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/at91sam9260_matrix.h | 2 | * include/asm-arm/arch-at91/at91sam9260_matrix.h |
3 | * | 3 | * |
4 | * Memory Controllers (MATRIX, EBI) - System peripherals registers. | 4 | * Memory Controllers (MATRIX, EBI) - System peripherals registers. |
5 | * Based on AT91SAM9260 datasheet revision B. | 5 | * Based on AT91SAM9260 datasheet revision B. |
@@ -18,7 +18,7 @@ | |||
18 | #define AT91_MATRIX_MCFG2 (AT91_MATRIX + 0x08) /* Master Configuration Register 2 */ | 18 | #define AT91_MATRIX_MCFG2 (AT91_MATRIX + 0x08) /* Master Configuration Register 2 */ |
19 | #define AT91_MATRIX_MCFG3 (AT91_MATRIX + 0x0C) /* Master Configuration Register 3 */ | 19 | #define AT91_MATRIX_MCFG3 (AT91_MATRIX + 0x0C) /* Master Configuration Register 3 */ |
20 | #define AT91_MATRIX_MCFG4 (AT91_MATRIX + 0x10) /* Master Configuration Register 4 */ | 20 | #define AT91_MATRIX_MCFG4 (AT91_MATRIX + 0x10) /* Master Configuration Register 4 */ |
21 | #define AT91_MATRIX_MCFG5 (AT91_MATRIX + 0x04) /* Master Configuration Register 5 */ | 21 | #define AT91_MATRIX_MCFG5 (AT91_MATRIX + 0x14) /* Master Configuration Register 5 */ |
22 | #define AT91_MATRIX_ULBT (7 << 0) /* Undefined Length Burst Type */ | 22 | #define AT91_MATRIX_ULBT (7 << 0) /* Undefined Length Burst Type */ |
23 | #define AT91_MATRIX_ULBT_INFINITE (0 << 0) | 23 | #define AT91_MATRIX_ULBT_INFINITE (0 << 0) |
24 | #define AT91_MATRIX_ULBT_SINGLE (1 << 0) | 24 | #define AT91_MATRIX_ULBT_SINGLE (1 << 0) |
diff --git a/include/asm-arm/arch-at91rm9200/at91sam9261.h b/include/asm-arm/arch-at91/at91sam9261.h index 8d39672d5b82..01b58ffe2e27 100644 --- a/include/asm-arm/arch-at91rm9200/at91sam9261.h +++ b/include/asm-arm/arch-at91/at91sam9261.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/at91sam9261.h | 2 | * include/asm-arm/arch-at91/at91sam9261.h |
3 | * | 3 | * |
4 | * Copyright (C) SAN People | 4 | * Copyright (C) SAN People |
5 | * | 5 | * |
diff --git a/include/asm-arm/arch-at91rm9200/at91sam9261_matrix.h b/include/asm-arm/arch-at91/at91sam9261_matrix.h index ec88efabbe6c..6f072421be5b 100644 --- a/include/asm-arm/arch-at91rm9200/at91sam9261_matrix.h +++ b/include/asm-arm/arch-at91/at91sam9261_matrix.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/at91sam9261_matrix.h | 2 | * include/asm-arm/arch-at91/at91sam9261_matrix.h |
3 | * | 3 | * |
4 | * Memory Controllers (MATRIX, EBI) - System peripherals registers. | 4 | * Memory Controllers (MATRIX, EBI) - System peripherals registers. |
5 | * Based on AT91SAM9261 datasheet revision D. | 5 | * Based on AT91SAM9261 datasheet revision D. |
diff --git a/include/asm-arm/arch-at91/at91sam9263.h b/include/asm-arm/arch-at91/at91sam9263.h new file mode 100644 index 000000000000..f4af68ae0ea9 --- /dev/null +++ b/include/asm-arm/arch-at91/at91sam9263.h | |||
@@ -0,0 +1,131 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91/at91sam9263.h | ||
3 | * | ||
4 | * (C) 2007 Atmel Corporation. | ||
5 | * | ||
6 | * Common definitions. | ||
7 | * Based on AT91SAM9263 datasheet revision B (Preliminary). | ||
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 as published by | ||
11 | * the Free Software Foundation; either version 2 of the License, or | ||
12 | * (at your option) any later version. | ||
13 | */ | ||
14 | |||
15 | #ifndef AT91SAM9263_H | ||
16 | #define AT91SAM9263_H | ||
17 | |||
18 | /* | ||
19 | * Peripheral identifiers/interrupts. | ||
20 | */ | ||
21 | #define AT91_ID_FIQ 0 /* Advanced Interrupt Controller (FIQ) */ | ||
22 | #define AT91_ID_SYS 1 /* System Peripherals */ | ||
23 | #define AT91SAM9263_ID_PIOA 2 /* Parallel IO Controller A */ | ||
24 | #define AT91SAM9263_ID_PIOB 3 /* Parallel IO Controller B */ | ||
25 | #define AT91SAM9263_ID_PIOCDE 4 /* Parallel IO Controller C, D and E */ | ||
26 | #define AT91SAM9263_ID_US0 7 /* USART 0 */ | ||
27 | #define AT91SAM9263_ID_US1 8 /* USART 1 */ | ||
28 | #define AT91SAM9263_ID_US2 9 /* USART 2 */ | ||
29 | #define AT91SAM9263_ID_MCI0 10 /* Multimedia Card Interface 0 */ | ||
30 | #define AT91SAM9263_ID_MCI1 11 /* Multimedia Card Interface 1 */ | ||
31 | #define AT91SAM9263_ID_CAN 12 /* CAN */ | ||
32 | #define AT91SAM9263_ID_TWI 13 /* Two-Wire Interface */ | ||
33 | #define AT91SAM9263_ID_SPI0 14 /* Serial Peripheral Interface 0 */ | ||
34 | #define AT91SAM9263_ID_SPI1 15 /* Serial Peripheral Interface 1 */ | ||
35 | #define AT91SAM9263_ID_SSC0 16 /* Serial Synchronous Controller 0 */ | ||
36 | #define AT91SAM9263_ID_SSC1 17 /* Serial Synchronous Controller 1 */ | ||
37 | #define AT91SAM9263_ID_AC97C 18 /* AC97 Controller */ | ||
38 | #define AT91SAM9263_ID_TCB 19 /* Timer Counter 0, 1 and 2 */ | ||
39 | #define AT91SAM9263_ID_PWMC 20 /* Pulse Width Modulation Controller */ | ||
40 | #define AT91SAM9263_ID_EMAC 21 /* Ethernet */ | ||
41 | #define AT91SAM9263_ID_2DGE 23 /* 2D Graphic Engine */ | ||
42 | #define AT91SAM9263_ID_UDP 24 /* USB Device Port */ | ||
43 | #define AT91SAM9263_ID_ISI 25 /* Image Sensor Interface */ | ||
44 | #define AT91SAM9263_ID_LCDC 26 /* LCD Controller */ | ||
45 | #define AT91SAM9263_ID_DMA 27 /* DMA Controller */ | ||
46 | #define AT91SAM9263_ID_UHP 29 /* USB Host port */ | ||
47 | #define AT91SAM9263_ID_IRQ0 30 /* Advanced Interrupt Controller (IRQ0) */ | ||
48 | #define AT91SAM9263_ID_IRQ1 31 /* Advanced Interrupt Controller (IRQ1) */ | ||
49 | |||
50 | |||
51 | /* | ||
52 | * User Peripheral physical base addresses. | ||
53 | */ | ||
54 | #define AT91SAM9263_BASE_UDP 0xfff78000 | ||
55 | #define AT91SAM9263_BASE_TCB0 0xfff7c000 | ||
56 | #define AT91SAM9263_BASE_TC0 0xfff7c000 | ||
57 | #define AT91SAM9263_BASE_TC1 0xfff7c040 | ||
58 | #define AT91SAM9263_BASE_TC2 0xfff7c080 | ||
59 | #define AT91SAM9263_BASE_MCI0 0xfff80000 | ||
60 | #define AT91SAM9263_BASE_MCI1 0xfff84000 | ||
61 | #define AT91SAM9263_BASE_TWI 0xfff88000 | ||
62 | #define AT91SAM9263_BASE_US0 0xfff8c000 | ||
63 | #define AT91SAM9263_BASE_US1 0xfff90000 | ||
64 | #define AT91SAM9263_BASE_US2 0xfff94000 | ||
65 | #define AT91SAM9263_BASE_SSC0 0xfff98000 | ||
66 | #define AT91SAM9263_BASE_SSC1 0xfff9c000 | ||
67 | #define AT91SAM9263_BASE_AC97C 0xfffa0000 | ||
68 | #define AT91SAM9263_BASE_SPI0 0xfffa4000 | ||
69 | #define AT91SAM9263_BASE_SPI1 0xfffa8000 | ||
70 | #define AT91SAM9263_BASE_CAN 0xfffac000 | ||
71 | #define AT91SAM9263_BASE_PWMC 0xfffb8000 | ||
72 | #define AT91SAM9263_BASE_EMAC 0xfffbc000 | ||
73 | #define AT91SAM9263_BASE_ISI 0xfffc4000 | ||
74 | #define AT91SAM9263_BASE_2DGE 0xfffc8000 | ||
75 | #define AT91_BASE_SYS 0xffffe000 | ||
76 | |||
77 | /* | ||
78 | * System Peripherals (offset from AT91_BASE_SYS) | ||
79 | */ | ||
80 | #define AT91_ECC0 (0xffffe000 - AT91_BASE_SYS) | ||
81 | #define AT91_SDRAMC0 (0xffffe200 - AT91_BASE_SYS) | ||
82 | #define AT91_SMC0 (0xffffe400 - AT91_BASE_SYS) | ||
83 | #define AT91_ECC1 (0xffffe600 - AT91_BASE_SYS) | ||
84 | #define AT91_SDRAMC1 (0xffffe800 - AT91_BASE_SYS) | ||
85 | #define AT91_SMC1 (0xffffea00 - AT91_BASE_SYS) | ||
86 | #define AT91_MATRIX (0xffffec00 - AT91_BASE_SYS) | ||
87 | #define AT91_CCFG (0xffffed10 - AT91_BASE_SYS) | ||
88 | #define AT91_DBGU (0xffffee00 - AT91_BASE_SYS) | ||
89 | #define AT91_AIC (0xfffff000 - AT91_BASE_SYS) | ||
90 | #define AT91_PIOA (0xfffff200 - AT91_BASE_SYS) | ||
91 | #define AT91_PIOB (0xfffff400 - AT91_BASE_SYS) | ||
92 | #define AT91_PIOC (0xfffff600 - AT91_BASE_SYS) | ||
93 | #define AT91_PIOD (0xfffff800 - AT91_BASE_SYS) | ||
94 | #define AT91_PIOE (0xfffffa00 - AT91_BASE_SYS) | ||
95 | #define AT91_PMC (0xfffffc00 - AT91_BASE_SYS) | ||
96 | #define AT91_RSTC (0xfffffd00 - AT91_BASE_SYS) | ||
97 | #define AT91_SHDWC (0xfffffd10 - AT91_BASE_SYS) | ||
98 | #define AT91_RTT0 (0xfffffd20 - AT91_BASE_SYS) | ||
99 | #define AT91_PIT (0xfffffd30 - AT91_BASE_SYS) | ||
100 | #define AT91_WDT (0xfffffd40 - AT91_BASE_SYS) | ||
101 | #define AT91_RTT1 (0xfffffd50 - AT91_BASE_SYS) | ||
102 | #define AT91_GPBR (0xfffffd60 - AT91_BASE_SYS) | ||
103 | |||
104 | #define AT91_SMC AT91_SMC0 | ||
105 | |||
106 | /* | ||
107 | * Internal Memory. | ||
108 | */ | ||
109 | #define AT91SAM9263_SRAM0_BASE 0x00300000 /* Internal SRAM 0 base address */ | ||
110 | #define AT91SAM9263_SRAM0_SIZE (80 * SZ_1K) /* Internal SRAM 0 size (80Kb) */ | ||
111 | |||
112 | #define AT91SAM9263_ROM_BASE 0x00400000 /* Internal ROM base address */ | ||
113 | #define AT91SAM9263_ROM_SIZE SZ_128K /* Internal ROM size (128Kb) */ | ||
114 | |||
115 | #define AT91SAM9263_SRAM1_BASE 0x00500000 /* Internal SRAM 1 base address */ | ||
116 | #define AT91SAM9263_SRAM1_SIZE SZ_16K /* Internal SRAM 1 size (16Kb) */ | ||
117 | |||
118 | #define AT91SAM9263_LCDC_BASE 0x00700000 /* LCD Controller */ | ||
119 | #define AT91SAM9263_DMAC_BASE 0x00800000 /* DMA Controller */ | ||
120 | #define AT91SAM9263_UHP_BASE 0x00a00000 /* USB Host controller */ | ||
121 | |||
122 | #if 0 | ||
123 | /* | ||
124 | * PIO pin definitions (peripheral A/B multiplexing). | ||
125 | */ | ||
126 | |||
127 | // TODO: Add | ||
128 | |||
129 | #endif | ||
130 | |||
131 | #endif | ||
diff --git a/include/asm-arm/arch-at91/at91sam9263_matrix.h b/include/asm-arm/arch-at91/at91sam9263_matrix.h new file mode 100644 index 000000000000..6fc6e4be624e --- /dev/null +++ b/include/asm-arm/arch-at91/at91sam9263_matrix.h | |||
@@ -0,0 +1,129 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91/at91sam9263_matrix.h | ||
3 | * | ||
4 | * Copyright (C) 2006 Atmel Corporation. | ||
5 | * | ||
6 | * Memory Controllers (MATRIX, EBI) - System peripherals registers. | ||
7 | * Based on AT91SAM9263 datasheet revision B (Preliminary). | ||
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 as published by | ||
11 | * the Free Software Foundation; either version 2 of the License, or | ||
12 | * (at your option) any later version. | ||
13 | */ | ||
14 | |||
15 | #ifndef AT91SAM9263_MATRIX_H | ||
16 | #define AT91SAM9263_MATRIX_H | ||
17 | |||
18 | #define AT91_MATRIX_MCFG0 (AT91_MATRIX + 0x00) /* Master Configuration Register 0 */ | ||
19 | #define AT91_MATRIX_MCFG1 (AT91_MATRIX + 0x04) /* Master Configuration Register 1 */ | ||
20 | #define AT91_MATRIX_MCFG2 (AT91_MATRIX + 0x08) /* Master Configuration Register 2 */ | ||
21 | #define AT91_MATRIX_MCFG3 (AT91_MATRIX + 0x0C) /* Master Configuration Register 3 */ | ||
22 | #define AT91_MATRIX_MCFG4 (AT91_MATRIX + 0x10) /* Master Configuration Register 4 */ | ||
23 | #define AT91_MATRIX_MCFG5 (AT91_MATRIX + 0x14) /* Master Configuration Register 5 */ | ||
24 | #define AT91_MATRIX_MCFG6 (AT91_MATRIX + 0x18) /* Master Configuration Register 6 */ | ||
25 | #define AT91_MATRIX_MCFG7 (AT91_MATRIX + 0x1C) /* Master Configuration Register 7 */ | ||
26 | #define AT91_MATRIX_MCFG8 (AT91_MATRIX + 0x20) /* Master Configuration Register 8 */ | ||
27 | #define AT91_MATRIX_ULBT (7 << 0) /* Undefined Length Burst Type */ | ||
28 | #define AT91_MATRIX_ULBT_INFINITE (0 << 0) | ||
29 | #define AT91_MATRIX_ULBT_SINGLE (1 << 0) | ||
30 | #define AT91_MATRIX_ULBT_FOUR (2 << 0) | ||
31 | #define AT91_MATRIX_ULBT_EIGHT (3 << 0) | ||
32 | #define AT91_MATRIX_ULBT_SIXTEEN (4 << 0) | ||
33 | |||
34 | #define AT91_MATRIX_SCFG0 (AT91_MATRIX + 0x40) /* Slave Configuration Register 0 */ | ||
35 | #define AT91_MATRIX_SCFG1 (AT91_MATRIX + 0x44) /* Slave Configuration Register 1 */ | ||
36 | #define AT91_MATRIX_SCFG2 (AT91_MATRIX + 0x48) /* Slave Configuration Register 2 */ | ||
37 | #define AT91_MATRIX_SCFG3 (AT91_MATRIX + 0x4C) /* Slave Configuration Register 3 */ | ||
38 | #define AT91_MATRIX_SCFG4 (AT91_MATRIX + 0x50) /* Slave Configuration Register 4 */ | ||
39 | #define AT91_MATRIX_SCFG5 (AT91_MATRIX + 0x54) /* Slave Configuration Register 5 */ | ||
40 | #define AT91_MATRIX_SCFG6 (AT91_MATRIX + 0x58) /* Slave Configuration Register 6 */ | ||
41 | #define AT91_MATRIX_SCFG7 (AT91_MATRIX + 0x5C) /* Slave Configuration Register 7 */ | ||
42 | #define AT91_MATRIX_SLOT_CYCLE (0xff << 0) /* Maximum Number of Allowed Cycles for a Burst */ | ||
43 | #define AT91_MATRIX_DEFMSTR_TYPE (3 << 16) /* Default Master Type */ | ||
44 | #define AT91_MATRIX_DEFMSTR_TYPE_NONE (0 << 16) | ||
45 | #define AT91_MATRIX_DEFMSTR_TYPE_LAST (1 << 16) | ||
46 | #define AT91_MATRIX_DEFMSTR_TYPE_FIXED (2 << 16) | ||
47 | #define AT91_MATRIX_FIXED_DEFMSTR (7 << 18) /* Fixed Index of Default Master */ | ||
48 | #define AT91_MATRIX_ARBT (3 << 24) /* Arbitration Type */ | ||
49 | #define AT91_MATRIX_ARBT_ROUND_ROBIN (0 << 24) | ||
50 | #define AT91_MATRIX_ARBT_FIXED_PRIORITY (1 << 24) | ||
51 | |||
52 | #define AT91_MATRIX_PRAS0 (AT91_MATRIX + 0x80) /* Priority Register A for Slave 0 */ | ||
53 | #define AT91_MATRIX_PRBS0 (AT91_MATRIX + 0x84) /* Priority Register B for Slave 0 */ | ||
54 | #define AT91_MATRIX_PRAS1 (AT91_MATRIX + 0x88) /* Priority Register A for Slave 1 */ | ||
55 | #define AT91_MATRIX_PRBS1 (AT91_MATRIX + 0x8C) /* Priority Register B for Slave 1 */ | ||
56 | #define AT91_MATRIX_PRAS2 (AT91_MATRIX + 0x90) /* Priority Register A for Slave 2 */ | ||
57 | #define AT91_MATRIX_PRBS2 (AT91_MATRIX + 0x94) /* Priority Register B for Slave 2 */ | ||
58 | #define AT91_MATRIX_PRAS3 (AT91_MATRIX + 0x98) /* Priority Register A for Slave 3 */ | ||
59 | #define AT91_MATRIX_PRBS3 (AT91_MATRIX + 0x9C) /* Priority Register B for Slave 3 */ | ||
60 | #define AT91_MATRIX_PRAS4 (AT91_MATRIX + 0xA0) /* Priority Register A for Slave 4 */ | ||
61 | #define AT91_MATRIX_PRBS4 (AT91_MATRIX + 0xA4) /* Priority Register B for Slave 4 */ | ||
62 | #define AT91_MATRIX_PRAS5 (AT91_MATRIX + 0xA8) /* Priority Register A for Slave 5 */ | ||
63 | #define AT91_MATRIX_PRBS5 (AT91_MATRIX + 0xAC) /* Priority Register B for Slave 5 */ | ||
64 | #define AT91_MATRIX_PRAS6 (AT91_MATRIX + 0xB0) /* Priority Register A for Slave 6 */ | ||
65 | #define AT91_MATRIX_PRBS6 (AT91_MATRIX + 0xB4) /* Priority Register B for Slave 6 */ | ||
66 | #define AT91_MATRIX_PRAS7 (AT91_MATRIX + 0xB8) /* Priority Register A for Slave 7 */ | ||
67 | #define AT91_MATRIX_PRBS7 (AT91_MATRIX + 0xBC) /* Priority Register B for Slave 7 */ | ||
68 | #define AT91_MATRIX_M0PR (3 << 0) /* Master 0 Priority */ | ||
69 | #define AT91_MATRIX_M1PR (3 << 4) /* Master 1 Priority */ | ||
70 | #define AT91_MATRIX_M2PR (3 << 8) /* Master 2 Priority */ | ||
71 | #define AT91_MATRIX_M3PR (3 << 12) /* Master 3 Priority */ | ||
72 | #define AT91_MATRIX_M4PR (3 << 16) /* Master 4 Priority */ | ||
73 | #define AT91_MATRIX_M5PR (3 << 20) /* Master 5 Priority */ | ||
74 | #define AT91_MATRIX_M6PR (3 << 24) /* Master 6 Priority */ | ||
75 | #define AT91_MATRIX_M7PR (3 << 28) /* Master 7 Priority */ | ||
76 | #define AT91_MATRIX_M8PR (3 << 0) /* Master 8 Priority (in Register B) */ | ||
77 | |||
78 | #define AT91_MATRIX_MRCR (AT91_MATRIX + 0x100) /* Master Remap Control Register */ | ||
79 | #define AT91_MATRIX_RCB0 (1 << 0) /* Remap Command for AHB Master 0 (ARM926EJ-S Instruction Master) */ | ||
80 | #define AT91_MATRIX_RCB1 (1 << 1) /* Remap Command for AHB Master 1 (ARM926EJ-S Data Master) */ | ||
81 | #define AT91_MATRIX_RCB2 (1 << 2) | ||
82 | #define AT91_MATRIX_RCB3 (1 << 3) | ||
83 | #define AT91_MATRIX_RCB4 (1 << 4) | ||
84 | #define AT91_MATRIX_RCB5 (1 << 5) | ||
85 | #define AT91_MATRIX_RCB6 (1 << 6) | ||
86 | #define AT91_MATRIX_RCB7 (1 << 7) | ||
87 | #define AT91_MATRIX_RCB8 (1 << 8) | ||
88 | |||
89 | #define AT91_MATRIX_TCMR (AT91_MATRIX + 0x114) /* TCM Configuration Register */ | ||
90 | #define AT91_MATRIX_ITCM_SIZE (0xf << 0) /* Size of ITCM enabled memory block */ | ||
91 | #define AT91_MATRIX_ITCM_0 (0 << 0) | ||
92 | #define AT91_MATRIX_ITCM_16 (5 << 0) | ||
93 | #define AT91_MATRIX_ITCM_32 (6 << 0) | ||
94 | #define AT91_MATRIX_DTCM_SIZE (0xf << 4) /* Size of DTCM enabled memory block */ | ||
95 | #define AT91_MATRIX_DTCM_0 (0 << 4) | ||
96 | #define AT91_MATRIX_DTCM_16 (5 << 4) | ||
97 | #define AT91_MATRIX_DTCM_32 (6 << 4) | ||
98 | |||
99 | #define AT91_MATRIX_EBI0CSA (AT91_MATRIX + 0x120) /* EBI0 Chip Select Assignment Register */ | ||
100 | #define AT91_MATRIX_EBI0_CS1A (1 << 1) /* Chip Select 1 Assignment */ | ||
101 | #define AT91_MATRIX_EBI0_CS1A_SMC (0 << 1) | ||
102 | #define AT91_MATRIX_EBI0_CS1A_SDRAMC (1 << 1) | ||
103 | #define AT91_MATRIX_EBI0_CS3A (1 << 3) /* Chip Select 3 Assignment */ | ||
104 | #define AT91_MATRIX_EBI0_CS3A_SMC (0 << 3) | ||
105 | #define AT91_MATRIX_EBI0_CS3A_SMC_SMARTMEDIA (1 << 3) | ||
106 | #define AT91_MATRIX_EBI0_CS4A (1 << 4) /* Chip Select 4 Assignment */ | ||
107 | #define AT91_MATRIX_EBI0_CS4A_SMC (0 << 4) | ||
108 | #define AT91_MATRIX_EBI0_CS4A_SMC_CF1 (1 << 4) | ||
109 | #define AT91_MATRIX_EBI0_CS5A (1 << 5) /* Chip Select 5 Assignment */ | ||
110 | #define AT91_MATRIX_EBI0_CS5A_SMC (0 << 5) | ||
111 | #define AT91_MATRIX_EBI0_CS5A_SMC_CF2 (1 << 5) | ||
112 | #define AT91_MATRIX_EBI0_DBPUC (1 << 8) /* Data Bus Pull-up Configuration */ | ||
113 | #define AT91_MATRIX_EBI0_VDDIOMSEL (1 << 16) /* Memory voltage selection */ | ||
114 | #define AT91_MATRIX_EBI0_VDDIOMSEL_1_8V (0 << 16) | ||
115 | #define AT91_MATRIX_EBI0_VDDIOMSEL_3_3V (1 << 16) | ||
116 | |||
117 | #define AT91_MATRIX_EBI1CSA (AT91_MATRIX + 0x124) /* EBI1 Chip Select Assignment Register */ | ||
118 | #define AT91_MATRIX_EBI1_CS1A (1 << 1) /* Chip Select 1 Assignment */ | ||
119 | #define AT91_MATRIX_EBI1_CS1A_SMC (0 << 1) | ||
120 | #define AT91_MATRIX_EBI1_CS1A_SDRAMC (1 << 1) | ||
121 | #define AT91_MATRIX_EBI1_CS2A (1 << 3) /* Chip Select 3 Assignment */ | ||
122 | #define AT91_MATRIX_EBI1_CS2A_SMC (0 << 3) | ||
123 | #define AT91_MATRIX_EBI1_CS2A_SMC_SMARTMEDIA (1 << 3) | ||
124 | #define AT91_MATRIX_EBI1_DBPUC (1 << 8) /* Data Bus Pull-up Configuration */ | ||
125 | #define AT91_MATRIX_EBI1_VDDIOMSEL (1 << 16) /* Memory voltage selection */ | ||
126 | #define AT91_MATRIX_EBI1_VDDIOMSEL_1_8V (0 << 16) | ||
127 | #define AT91_MATRIX_EBI1_VDDIOMSEL_3_3V (1 << 16) | ||
128 | |||
129 | #endif | ||
diff --git a/include/asm-arm/arch-at91rm9200/at91sam926x_mc.h b/include/asm-arm/arch-at91/at91sam926x_mc.h index 972e7531c7f4..d82631c251f1 100644 --- a/include/asm-arm/arch-at91rm9200/at91sam926x_mc.h +++ b/include/asm-arm/arch-at91/at91sam926x_mc.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/at91sam926x_mc.h | 2 | * include/asm-arm/arch-at91/at91sam926x_mc.h |
3 | * | 3 | * |
4 | * Memory Controllers (SMC, SDRAMC) - System peripherals registers. | 4 | * Memory Controllers (SMC, SDRAMC) - System peripherals registers. |
5 | * Based on AT91SAM9261 datasheet revision D. | 5 | * Based on AT91SAM9261 datasheet revision D. |
@@ -131,4 +131,11 @@ | |||
131 | #define AT91_SMC_PS_16 (2 << 28) | 131 | #define AT91_SMC_PS_16 (2 << 28) |
132 | #define AT91_SMC_PS_32 (3 << 28) | 132 | #define AT91_SMC_PS_32 (3 << 28) |
133 | 133 | ||
134 | #if defined(AT91_SMC1) /* The AT91SAM9263 has 2 Static Memory contollers */ | ||
135 | #define AT91_SMC1_SETUP(n) (AT91_SMC1 + 0x00 + ((n)*0x10)) /* Setup Register for CS n */ | ||
136 | #define AT91_SMC1_PULSE(n) (AT91_SMC1 + 0x04 + ((n)*0x10)) /* Pulse Register for CS n */ | ||
137 | #define AT91_SMC1_CYCLE(n) (AT91_SMC1 + 0x08 + ((n)*0x10)) /* Cycle Register for CS n */ | ||
138 | #define AT91_SMC1_MODE(n) (AT91_SMC1 + 0x0c + ((n)*0x10)) /* Mode Register for CS n */ | ||
139 | #endif | ||
140 | |||
134 | #endif | 141 | #endif |
diff --git a/include/asm-arm/arch-at91rm9200/board.h b/include/asm-arm/arch-at91/board.h index 768e0fc6aa2f..7b9903c2c447 100644 --- a/include/asm-arm/arch-at91rm9200/board.h +++ b/include/asm-arm/arch-at91/board.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/board.h | 2 | * include/asm-arm/arch-at91/board.h |
3 | * | 3 | * |
4 | * Copyright (C) 2005 HP Labs | 4 | * Copyright (C) 2005 HP Labs |
5 | * | 5 | * |
@@ -60,7 +60,7 @@ struct at91_mmc_data { | |||
60 | u8 wp_pin; /* (SD) writeprotect detect */ | 60 | u8 wp_pin; /* (SD) writeprotect detect */ |
61 | u8 vcc_pin; /* power switching (high == on) */ | 61 | u8 vcc_pin; /* power switching (high == on) */ |
62 | }; | 62 | }; |
63 | extern void __init at91_add_device_mmc(struct at91_mmc_data *data); | 63 | extern void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data); |
64 | 64 | ||
65 | /* Ethernet */ | 65 | /* Ethernet */ |
66 | struct at91_eth_data { | 66 | struct at91_eth_data { |
@@ -69,9 +69,14 @@ struct at91_eth_data { | |||
69 | }; | 69 | }; |
70 | extern void __init at91_add_device_eth(struct at91_eth_data *data); | 70 | extern void __init at91_add_device_eth(struct at91_eth_data *data); |
71 | 71 | ||
72 | #if defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9263) | ||
73 | #define eth_platform_data at91_eth_data | ||
74 | #endif | ||
75 | |||
72 | /* USB Host */ | 76 | /* USB Host */ |
73 | struct at91_usbh_data { | 77 | struct at91_usbh_data { |
74 | u8 ports; /* number of ports on root hub */ | 78 | u8 ports; /* number of ports on root hub */ |
79 | u8 vbus_pin[]; /* port power-control pin */ | ||
75 | }; | 80 | }; |
76 | extern void __init at91_add_device_usbh(struct at91_usbh_data *data); | 81 | extern void __init at91_add_device_usbh(struct at91_usbh_data *data); |
77 | 82 | ||
diff --git a/include/asm-arm/arch-at91rm9200/cpu.h b/include/asm-arm/arch-at91/cpu.h index 6f8d09b08692..d464ca58cdbc 100644 --- a/include/asm-arm/arch-at91rm9200/cpu.h +++ b/include/asm-arm/arch-at91/cpu.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/cpu.h | 2 | * include/asm-arm/arch-at91/cpu.h |
3 | * | 3 | * |
4 | * Copyright (C) 2006 SAN People | 4 | * Copyright (C) 2006 SAN People |
5 | * | 5 | * |
@@ -20,7 +20,11 @@ | |||
20 | #define ARCH_ID_AT91RM9200 0x09290780 | 20 | #define ARCH_ID_AT91RM9200 0x09290780 |
21 | #define ARCH_ID_AT91SAM9260 0x019803a0 | 21 | #define ARCH_ID_AT91SAM9260 0x019803a0 |
22 | #define ARCH_ID_AT91SAM9261 0x019703a0 | 22 | #define ARCH_ID_AT91SAM9261 0x019703a0 |
23 | #define ARCH_ID_AT91SAM9263 0x019607a0 | ||
23 | 24 | ||
25 | #define ARCH_ID_AT91SAM9XE128 0x329973a0 | ||
26 | #define ARCH_ID_AT91SAM9XE256 0x329a93a0 | ||
27 | #define ARCH_ID_AT91SAM9XE512 0x329aa3a0 | ||
24 | 28 | ||
25 | static inline unsigned long at91_cpu_identify(void) | 29 | static inline unsigned long at91_cpu_identify(void) |
26 | { | 30 | { |
@@ -28,6 +32,16 @@ static inline unsigned long at91_cpu_identify(void) | |||
28 | } | 32 | } |
29 | 33 | ||
30 | 34 | ||
35 | #define ARCH_FAMILY_AT91X92 0x09200000 | ||
36 | #define ARCH_FAMILY_AT91SAM9 0x01900000 | ||
37 | #define ARCH_FAMILY_AT91SAM9XE 0x02900000 | ||
38 | |||
39 | static inline unsigned long at91_arch_identify(void) | ||
40 | { | ||
41 | return (at91_sys_read(AT91_DBGU_CIDR) & AT91_CIDR_ARCH); | ||
42 | } | ||
43 | |||
44 | |||
31 | #ifdef CONFIG_ARCH_AT91RM9200 | 45 | #ifdef CONFIG_ARCH_AT91RM9200 |
32 | #define cpu_is_at91rm9200() (at91_cpu_identify() == ARCH_ID_AT91RM9200) | 46 | #define cpu_is_at91rm9200() (at91_cpu_identify() == ARCH_ID_AT91RM9200) |
33 | #else | 47 | #else |
@@ -35,8 +49,10 @@ static inline unsigned long at91_cpu_identify(void) | |||
35 | #endif | 49 | #endif |
36 | 50 | ||
37 | #ifdef CONFIG_ARCH_AT91SAM9260 | 51 | #ifdef CONFIG_ARCH_AT91SAM9260 |
38 | #define cpu_is_at91sam9260() (at91_cpu_identify() == ARCH_ID_AT91SAM9260) | 52 | #define cpu_is_at91sam9xe() (at91_arch_identify() == ARCH_FAMILY_AT91SAM9XE) |
53 | #define cpu_is_at91sam9260() ((at91_cpu_identify() == ARCH_ID_AT91SAM9260) || cpu_is_at91sam9xe()) | ||
39 | #else | 54 | #else |
55 | #define cpu_is_at91sam9xe() (0) | ||
40 | #define cpu_is_at91sam9260() (0) | 56 | #define cpu_is_at91sam9260() (0) |
41 | #endif | 57 | #endif |
42 | 58 | ||
@@ -46,4 +62,10 @@ static inline unsigned long at91_cpu_identify(void) | |||
46 | #define cpu_is_at91sam9261() (0) | 62 | #define cpu_is_at91sam9261() (0) |
47 | #endif | 63 | #endif |
48 | 64 | ||
65 | #ifdef CONFIG_ARCH_AT91SAM9263 | ||
66 | #define cpu_is_at91sam9263() (at91_cpu_identify() == ARCH_ID_AT91SAM9263) | ||
67 | #else | ||
68 | #define cpu_is_at91sam9263() (0) | ||
69 | #endif | ||
70 | |||
49 | #endif | 71 | #endif |
diff --git a/include/asm-arm/arch-at91/debug-macro.S b/include/asm-arm/arch-at91/debug-macro.S new file mode 100644 index 000000000000..13e9f5e1d4ff --- /dev/null +++ b/include/asm-arm/arch-at91/debug-macro.S | |||
@@ -0,0 +1,39 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91/debug-macro.S | ||
3 | * | ||
4 | * Copyright (C) 2003-2005 SAN People | ||
5 | * | ||
6 | * Debugging macro include header | ||
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 | |||
14 | #include <asm/hardware.h> | ||
15 | #include <asm/arch/at91_dbgu.h> | ||
16 | |||
17 | .macro addruart,rx | ||
18 | mrc p15, 0, \rx, c1, c0 | ||
19 | tst \rx, #1 @ MMU enabled? | ||
20 | ldreq \rx, =(AT91_BASE_SYS + AT91_DBGU) @ System peripherals (phys address) | ||
21 | ldrne \rx, =(AT91_VA_BASE_SYS + AT91_DBGU) @ System peripherals (virt address) | ||
22 | .endm | ||
23 | |||
24 | .macro senduart,rd,rx | ||
25 | strb \rd, [\rx, #(AT91_DBGU_THR - AT91_DBGU)] @ Write to Transmitter Holding Register | ||
26 | .endm | ||
27 | |||
28 | .macro waituart,rd,rx | ||
29 | 1001: ldr \rd, [\rx, #(AT91_DBGU_SR - AT91_DBGU)] @ Read Status Register | ||
30 | tst \rd, #AT91_DBGU_TXRDY @ DBGU_TXRDY = 1 when ready to transmit | ||
31 | beq 1001b | ||
32 | .endm | ||
33 | |||
34 | .macro busyuart,rd,rx | ||
35 | 1001: ldr \rd, [\rx, #(AT91_DBGU_SR - AT91_DBGU)] @ Read Status Register | ||
36 | tst \rd, #AT91_DBGU_TXEMPTY @ DBGU_TXEMPTY = 1 when transmission complete | ||
37 | beq 1001b | ||
38 | .endm | ||
39 | |||
diff --git a/include/asm-arm/arch-at91rm9200/dma.h b/include/asm-arm/arch-at91/dma.h index 22c1dfdd8da3..774565412beb 100644 --- a/include/asm-arm/arch-at91rm9200/dma.h +++ b/include/asm-arm/arch-at91/dma.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/dma.h | 2 | * include/asm-arm/arch-at91/dma.h |
3 | * | 3 | * |
4 | * Copyright (C) 2003 SAN People | 4 | * Copyright (C) 2003 SAN People |
5 | * | 5 | * |
diff --git a/include/asm-arm/arch-at91/entry-macro.S b/include/asm-arm/arch-at91/entry-macro.S new file mode 100644 index 000000000000..cc1d850a0788 --- /dev/null +++ b/include/asm-arm/arch-at91/entry-macro.S | |||
@@ -0,0 +1,32 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91/entry-macro.S | ||
3 | * | ||
4 | * Copyright (C) 2003-2005 SAN People | ||
5 | * | ||
6 | * Low-level IRQ helper macros for AT91RM9200 platforms | ||
7 | * | ||
8 | * This file is licensed under the terms of the GNU General Public | ||
9 | * License version 2. This program is licensed "as is" without any | ||
10 | * warranty of any kind, whether express or implied. | ||
11 | */ | ||
12 | |||
13 | #include <asm/hardware.h> | ||
14 | #include <asm/arch/at91_aic.h> | ||
15 | |||
16 | .macro disable_fiq | ||
17 | .endm | ||
18 | |||
19 | .macro get_irqnr_preamble, base, tmp | ||
20 | .endm | ||
21 | |||
22 | .macro arch_ret_to_user, tmp1, tmp2 | ||
23 | .endm | ||
24 | |||
25 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
26 | ldr \base, =(AT91_VA_BASE_SYS + AT91_AIC) @ base virtual address of AIC peripheral | ||
27 | ldr \irqnr, [\base, #(AT91_AIC_IVR - AT91_AIC)] @ read IRQ vector register: de-asserts nIRQ to processor (and clears interrupt) | ||
28 | ldr \irqstat, [\base, #(AT91_AIC_ISR - AT91_AIC)] @ read interrupt source number | ||
29 | teq \irqstat, #0 @ ISR is 0 when no current interrupt, or spurious interrupt | ||
30 | streq \tmp, [\base, #(AT91_AIC_EOICR - AT91_AIC)] @ not going to be handled further, then ACK it now. | ||
31 | .endm | ||
32 | |||
diff --git a/include/asm-arm/arch-at91rm9200/gpio.h b/include/asm-arm/arch-at91/gpio.h index a011d27876a2..98ad2114f43a 100644 --- a/include/asm-arm/arch-at91rm9200/gpio.h +++ b/include/asm-arm/arch-at91/gpio.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/gpio.h | 2 | * include/asm-arm/arch-at91/gpio.h |
3 | * | 3 | * |
4 | * Copyright (C) 2005 HP Labs | 4 | * Copyright (C) 2005 HP Labs |
5 | * | 5 | * |
@@ -17,7 +17,7 @@ | |||
17 | 17 | ||
18 | #define PIN_BASE NR_AIC_IRQS | 18 | #define PIN_BASE NR_AIC_IRQS |
19 | 19 | ||
20 | #define MAX_GPIO_BANKS 4 | 20 | #define MAX_GPIO_BANKS 5 |
21 | 21 | ||
22 | /* these pin numbers double as IRQ numbers, like AT91xxx_ID_* values */ | 22 | /* these pin numbers double as IRQ numbers, like AT91xxx_ID_* values */ |
23 | 23 | ||
@@ -26,37 +26,31 @@ | |||
26 | #define AT91_PIN_PA2 (PIN_BASE + 0x00 + 2) | 26 | #define AT91_PIN_PA2 (PIN_BASE + 0x00 + 2) |
27 | #define AT91_PIN_PA3 (PIN_BASE + 0x00 + 3) | 27 | #define AT91_PIN_PA3 (PIN_BASE + 0x00 + 3) |
28 | #define AT91_PIN_PA4 (PIN_BASE + 0x00 + 4) | 28 | #define AT91_PIN_PA4 (PIN_BASE + 0x00 + 4) |
29 | |||
30 | #define AT91_PIN_PA5 (PIN_BASE + 0x00 + 5) | 29 | #define AT91_PIN_PA5 (PIN_BASE + 0x00 + 5) |
31 | #define AT91_PIN_PA6 (PIN_BASE + 0x00 + 6) | 30 | #define AT91_PIN_PA6 (PIN_BASE + 0x00 + 6) |
32 | #define AT91_PIN_PA7 (PIN_BASE + 0x00 + 7) | 31 | #define AT91_PIN_PA7 (PIN_BASE + 0x00 + 7) |
33 | #define AT91_PIN_PA8 (PIN_BASE + 0x00 + 8) | 32 | #define AT91_PIN_PA8 (PIN_BASE + 0x00 + 8) |
34 | #define AT91_PIN_PA9 (PIN_BASE + 0x00 + 9) | 33 | #define AT91_PIN_PA9 (PIN_BASE + 0x00 + 9) |
35 | |||
36 | #define AT91_PIN_PA10 (PIN_BASE + 0x00 + 10) | 34 | #define AT91_PIN_PA10 (PIN_BASE + 0x00 + 10) |
37 | #define AT91_PIN_PA11 (PIN_BASE + 0x00 + 11) | 35 | #define AT91_PIN_PA11 (PIN_BASE + 0x00 + 11) |
38 | #define AT91_PIN_PA12 (PIN_BASE + 0x00 + 12) | 36 | #define AT91_PIN_PA12 (PIN_BASE + 0x00 + 12) |
39 | #define AT91_PIN_PA13 (PIN_BASE + 0x00 + 13) | 37 | #define AT91_PIN_PA13 (PIN_BASE + 0x00 + 13) |
40 | #define AT91_PIN_PA14 (PIN_BASE + 0x00 + 14) | 38 | #define AT91_PIN_PA14 (PIN_BASE + 0x00 + 14) |
41 | |||
42 | #define AT91_PIN_PA15 (PIN_BASE + 0x00 + 15) | 39 | #define AT91_PIN_PA15 (PIN_BASE + 0x00 + 15) |
43 | #define AT91_PIN_PA16 (PIN_BASE + 0x00 + 16) | 40 | #define AT91_PIN_PA16 (PIN_BASE + 0x00 + 16) |
44 | #define AT91_PIN_PA17 (PIN_BASE + 0x00 + 17) | 41 | #define AT91_PIN_PA17 (PIN_BASE + 0x00 + 17) |
45 | #define AT91_PIN_PA18 (PIN_BASE + 0x00 + 18) | 42 | #define AT91_PIN_PA18 (PIN_BASE + 0x00 + 18) |
46 | #define AT91_PIN_PA19 (PIN_BASE + 0x00 + 19) | 43 | #define AT91_PIN_PA19 (PIN_BASE + 0x00 + 19) |
47 | |||
48 | #define AT91_PIN_PA20 (PIN_BASE + 0x00 + 20) | 44 | #define AT91_PIN_PA20 (PIN_BASE + 0x00 + 20) |
49 | #define AT91_PIN_PA21 (PIN_BASE + 0x00 + 21) | 45 | #define AT91_PIN_PA21 (PIN_BASE + 0x00 + 21) |
50 | #define AT91_PIN_PA22 (PIN_BASE + 0x00 + 22) | 46 | #define AT91_PIN_PA22 (PIN_BASE + 0x00 + 22) |
51 | #define AT91_PIN_PA23 (PIN_BASE + 0x00 + 23) | 47 | #define AT91_PIN_PA23 (PIN_BASE + 0x00 + 23) |
52 | #define AT91_PIN_PA24 (PIN_BASE + 0x00 + 24) | 48 | #define AT91_PIN_PA24 (PIN_BASE + 0x00 + 24) |
53 | |||
54 | #define AT91_PIN_PA25 (PIN_BASE + 0x00 + 25) | 49 | #define AT91_PIN_PA25 (PIN_BASE + 0x00 + 25) |
55 | #define AT91_PIN_PA26 (PIN_BASE + 0x00 + 26) | 50 | #define AT91_PIN_PA26 (PIN_BASE + 0x00 + 26) |
56 | #define AT91_PIN_PA27 (PIN_BASE + 0x00 + 27) | 51 | #define AT91_PIN_PA27 (PIN_BASE + 0x00 + 27) |
57 | #define AT91_PIN_PA28 (PIN_BASE + 0x00 + 28) | 52 | #define AT91_PIN_PA28 (PIN_BASE + 0x00 + 28) |
58 | #define AT91_PIN_PA29 (PIN_BASE + 0x00 + 29) | 53 | #define AT91_PIN_PA29 (PIN_BASE + 0x00 + 29) |
59 | |||
60 | #define AT91_PIN_PA30 (PIN_BASE + 0x00 + 30) | 54 | #define AT91_PIN_PA30 (PIN_BASE + 0x00 + 30) |
61 | #define AT91_PIN_PA31 (PIN_BASE + 0x00 + 31) | 55 | #define AT91_PIN_PA31 (PIN_BASE + 0x00 + 31) |
62 | 56 | ||
@@ -65,37 +59,31 @@ | |||
65 | #define AT91_PIN_PB2 (PIN_BASE + 0x20 + 2) | 59 | #define AT91_PIN_PB2 (PIN_BASE + 0x20 + 2) |
66 | #define AT91_PIN_PB3 (PIN_BASE + 0x20 + 3) | 60 | #define AT91_PIN_PB3 (PIN_BASE + 0x20 + 3) |
67 | #define AT91_PIN_PB4 (PIN_BASE + 0x20 + 4) | 61 | #define AT91_PIN_PB4 (PIN_BASE + 0x20 + 4) |
68 | |||
69 | #define AT91_PIN_PB5 (PIN_BASE + 0x20 + 5) | 62 | #define AT91_PIN_PB5 (PIN_BASE + 0x20 + 5) |
70 | #define AT91_PIN_PB6 (PIN_BASE + 0x20 + 6) | 63 | #define AT91_PIN_PB6 (PIN_BASE + 0x20 + 6) |
71 | #define AT91_PIN_PB7 (PIN_BASE + 0x20 + 7) | 64 | #define AT91_PIN_PB7 (PIN_BASE + 0x20 + 7) |
72 | #define AT91_PIN_PB8 (PIN_BASE + 0x20 + 8) | 65 | #define AT91_PIN_PB8 (PIN_BASE + 0x20 + 8) |
73 | #define AT91_PIN_PB9 (PIN_BASE + 0x20 + 9) | 66 | #define AT91_PIN_PB9 (PIN_BASE + 0x20 + 9) |
74 | |||
75 | #define AT91_PIN_PB10 (PIN_BASE + 0x20 + 10) | 67 | #define AT91_PIN_PB10 (PIN_BASE + 0x20 + 10) |
76 | #define AT91_PIN_PB11 (PIN_BASE + 0x20 + 11) | 68 | #define AT91_PIN_PB11 (PIN_BASE + 0x20 + 11) |
77 | #define AT91_PIN_PB12 (PIN_BASE + 0x20 + 12) | 69 | #define AT91_PIN_PB12 (PIN_BASE + 0x20 + 12) |
78 | #define AT91_PIN_PB13 (PIN_BASE + 0x20 + 13) | 70 | #define AT91_PIN_PB13 (PIN_BASE + 0x20 + 13) |
79 | #define AT91_PIN_PB14 (PIN_BASE + 0x20 + 14) | 71 | #define AT91_PIN_PB14 (PIN_BASE + 0x20 + 14) |
80 | |||
81 | #define AT91_PIN_PB15 (PIN_BASE + 0x20 + 15) | 72 | #define AT91_PIN_PB15 (PIN_BASE + 0x20 + 15) |
82 | #define AT91_PIN_PB16 (PIN_BASE + 0x20 + 16) | 73 | #define AT91_PIN_PB16 (PIN_BASE + 0x20 + 16) |
83 | #define AT91_PIN_PB17 (PIN_BASE + 0x20 + 17) | 74 | #define AT91_PIN_PB17 (PIN_BASE + 0x20 + 17) |
84 | #define AT91_PIN_PB18 (PIN_BASE + 0x20 + 18) | 75 | #define AT91_PIN_PB18 (PIN_BASE + 0x20 + 18) |
85 | #define AT91_PIN_PB19 (PIN_BASE + 0x20 + 19) | 76 | #define AT91_PIN_PB19 (PIN_BASE + 0x20 + 19) |
86 | |||
87 | #define AT91_PIN_PB20 (PIN_BASE + 0x20 + 20) | 77 | #define AT91_PIN_PB20 (PIN_BASE + 0x20 + 20) |
88 | #define AT91_PIN_PB21 (PIN_BASE + 0x20 + 21) | 78 | #define AT91_PIN_PB21 (PIN_BASE + 0x20 + 21) |
89 | #define AT91_PIN_PB22 (PIN_BASE + 0x20 + 22) | 79 | #define AT91_PIN_PB22 (PIN_BASE + 0x20 + 22) |
90 | #define AT91_PIN_PB23 (PIN_BASE + 0x20 + 23) | 80 | #define AT91_PIN_PB23 (PIN_BASE + 0x20 + 23) |
91 | #define AT91_PIN_PB24 (PIN_BASE + 0x20 + 24) | 81 | #define AT91_PIN_PB24 (PIN_BASE + 0x20 + 24) |
92 | |||
93 | #define AT91_PIN_PB25 (PIN_BASE + 0x20 + 25) | 82 | #define AT91_PIN_PB25 (PIN_BASE + 0x20 + 25) |
94 | #define AT91_PIN_PB26 (PIN_BASE + 0x20 + 26) | 83 | #define AT91_PIN_PB26 (PIN_BASE + 0x20 + 26) |
95 | #define AT91_PIN_PB27 (PIN_BASE + 0x20 + 27) | 84 | #define AT91_PIN_PB27 (PIN_BASE + 0x20 + 27) |
96 | #define AT91_PIN_PB28 (PIN_BASE + 0x20 + 28) | 85 | #define AT91_PIN_PB28 (PIN_BASE + 0x20 + 28) |
97 | #define AT91_PIN_PB29 (PIN_BASE + 0x20 + 29) | 86 | #define AT91_PIN_PB29 (PIN_BASE + 0x20 + 29) |
98 | |||
99 | #define AT91_PIN_PB30 (PIN_BASE + 0x20 + 30) | 87 | #define AT91_PIN_PB30 (PIN_BASE + 0x20 + 30) |
100 | #define AT91_PIN_PB31 (PIN_BASE + 0x20 + 31) | 88 | #define AT91_PIN_PB31 (PIN_BASE + 0x20 + 31) |
101 | 89 | ||
@@ -104,37 +92,31 @@ | |||
104 | #define AT91_PIN_PC2 (PIN_BASE + 0x40 + 2) | 92 | #define AT91_PIN_PC2 (PIN_BASE + 0x40 + 2) |
105 | #define AT91_PIN_PC3 (PIN_BASE + 0x40 + 3) | 93 | #define AT91_PIN_PC3 (PIN_BASE + 0x40 + 3) |
106 | #define AT91_PIN_PC4 (PIN_BASE + 0x40 + 4) | 94 | #define AT91_PIN_PC4 (PIN_BASE + 0x40 + 4) |
107 | |||
108 | #define AT91_PIN_PC5 (PIN_BASE + 0x40 + 5) | 95 | #define AT91_PIN_PC5 (PIN_BASE + 0x40 + 5) |
109 | #define AT91_PIN_PC6 (PIN_BASE + 0x40 + 6) | 96 | #define AT91_PIN_PC6 (PIN_BASE + 0x40 + 6) |
110 | #define AT91_PIN_PC7 (PIN_BASE + 0x40 + 7) | 97 | #define AT91_PIN_PC7 (PIN_BASE + 0x40 + 7) |
111 | #define AT91_PIN_PC8 (PIN_BASE + 0x40 + 8) | 98 | #define AT91_PIN_PC8 (PIN_BASE + 0x40 + 8) |
112 | #define AT91_PIN_PC9 (PIN_BASE + 0x40 + 9) | 99 | #define AT91_PIN_PC9 (PIN_BASE + 0x40 + 9) |
113 | |||
114 | #define AT91_PIN_PC10 (PIN_BASE + 0x40 + 10) | 100 | #define AT91_PIN_PC10 (PIN_BASE + 0x40 + 10) |
115 | #define AT91_PIN_PC11 (PIN_BASE + 0x40 + 11) | 101 | #define AT91_PIN_PC11 (PIN_BASE + 0x40 + 11) |
116 | #define AT91_PIN_PC12 (PIN_BASE + 0x40 + 12) | 102 | #define AT91_PIN_PC12 (PIN_BASE + 0x40 + 12) |
117 | #define AT91_PIN_PC13 (PIN_BASE + 0x40 + 13) | 103 | #define AT91_PIN_PC13 (PIN_BASE + 0x40 + 13) |
118 | #define AT91_PIN_PC14 (PIN_BASE + 0x40 + 14) | 104 | #define AT91_PIN_PC14 (PIN_BASE + 0x40 + 14) |
119 | |||
120 | #define AT91_PIN_PC15 (PIN_BASE + 0x40 + 15) | 105 | #define AT91_PIN_PC15 (PIN_BASE + 0x40 + 15) |
121 | #define AT91_PIN_PC16 (PIN_BASE + 0x40 + 16) | 106 | #define AT91_PIN_PC16 (PIN_BASE + 0x40 + 16) |
122 | #define AT91_PIN_PC17 (PIN_BASE + 0x40 + 17) | 107 | #define AT91_PIN_PC17 (PIN_BASE + 0x40 + 17) |
123 | #define AT91_PIN_PC18 (PIN_BASE + 0x40 + 18) | 108 | #define AT91_PIN_PC18 (PIN_BASE + 0x40 + 18) |
124 | #define AT91_PIN_PC19 (PIN_BASE + 0x40 + 19) | 109 | #define AT91_PIN_PC19 (PIN_BASE + 0x40 + 19) |
125 | |||
126 | #define AT91_PIN_PC20 (PIN_BASE + 0x40 + 20) | 110 | #define AT91_PIN_PC20 (PIN_BASE + 0x40 + 20) |
127 | #define AT91_PIN_PC21 (PIN_BASE + 0x40 + 21) | 111 | #define AT91_PIN_PC21 (PIN_BASE + 0x40 + 21) |
128 | #define AT91_PIN_PC22 (PIN_BASE + 0x40 + 22) | 112 | #define AT91_PIN_PC22 (PIN_BASE + 0x40 + 22) |
129 | #define AT91_PIN_PC23 (PIN_BASE + 0x40 + 23) | 113 | #define AT91_PIN_PC23 (PIN_BASE + 0x40 + 23) |
130 | #define AT91_PIN_PC24 (PIN_BASE + 0x40 + 24) | 114 | #define AT91_PIN_PC24 (PIN_BASE + 0x40 + 24) |
131 | |||
132 | #define AT91_PIN_PC25 (PIN_BASE + 0x40 + 25) | 115 | #define AT91_PIN_PC25 (PIN_BASE + 0x40 + 25) |
133 | #define AT91_PIN_PC26 (PIN_BASE + 0x40 + 26) | 116 | #define AT91_PIN_PC26 (PIN_BASE + 0x40 + 26) |
134 | #define AT91_PIN_PC27 (PIN_BASE + 0x40 + 27) | 117 | #define AT91_PIN_PC27 (PIN_BASE + 0x40 + 27) |
135 | #define AT91_PIN_PC28 (PIN_BASE + 0x40 + 28) | 118 | #define AT91_PIN_PC28 (PIN_BASE + 0x40 + 28) |
136 | #define AT91_PIN_PC29 (PIN_BASE + 0x40 + 29) | 119 | #define AT91_PIN_PC29 (PIN_BASE + 0x40 + 29) |
137 | |||
138 | #define AT91_PIN_PC30 (PIN_BASE + 0x40 + 30) | 120 | #define AT91_PIN_PC30 (PIN_BASE + 0x40 + 30) |
139 | #define AT91_PIN_PC31 (PIN_BASE + 0x40 + 31) | 121 | #define AT91_PIN_PC31 (PIN_BASE + 0x40 + 31) |
140 | 122 | ||
@@ -143,42 +125,70 @@ | |||
143 | #define AT91_PIN_PD2 (PIN_BASE + 0x60 + 2) | 125 | #define AT91_PIN_PD2 (PIN_BASE + 0x60 + 2) |
144 | #define AT91_PIN_PD3 (PIN_BASE + 0x60 + 3) | 126 | #define AT91_PIN_PD3 (PIN_BASE + 0x60 + 3) |
145 | #define AT91_PIN_PD4 (PIN_BASE + 0x60 + 4) | 127 | #define AT91_PIN_PD4 (PIN_BASE + 0x60 + 4) |
146 | |||
147 | #define AT91_PIN_PD5 (PIN_BASE + 0x60 + 5) | 128 | #define AT91_PIN_PD5 (PIN_BASE + 0x60 + 5) |
148 | #define AT91_PIN_PD6 (PIN_BASE + 0x60 + 6) | 129 | #define AT91_PIN_PD6 (PIN_BASE + 0x60 + 6) |
149 | #define AT91_PIN_PD7 (PIN_BASE + 0x60 + 7) | 130 | #define AT91_PIN_PD7 (PIN_BASE + 0x60 + 7) |
150 | #define AT91_PIN_PD8 (PIN_BASE + 0x60 + 8) | 131 | #define AT91_PIN_PD8 (PIN_BASE + 0x60 + 8) |
151 | #define AT91_PIN_PD9 (PIN_BASE + 0x60 + 9) | 132 | #define AT91_PIN_PD9 (PIN_BASE + 0x60 + 9) |
152 | |||
153 | #define AT91_PIN_PD10 (PIN_BASE + 0x60 + 10) | 133 | #define AT91_PIN_PD10 (PIN_BASE + 0x60 + 10) |
154 | #define AT91_PIN_PD11 (PIN_BASE + 0x60 + 11) | 134 | #define AT91_PIN_PD11 (PIN_BASE + 0x60 + 11) |
155 | #define AT91_PIN_PD12 (PIN_BASE + 0x60 + 12) | 135 | #define AT91_PIN_PD12 (PIN_BASE + 0x60 + 12) |
156 | #define AT91_PIN_PD13 (PIN_BASE + 0x60 + 13) | 136 | #define AT91_PIN_PD13 (PIN_BASE + 0x60 + 13) |
157 | #define AT91_PIN_PD14 (PIN_BASE + 0x60 + 14) | 137 | #define AT91_PIN_PD14 (PIN_BASE + 0x60 + 14) |
158 | |||
159 | #define AT91_PIN_PD15 (PIN_BASE + 0x60 + 15) | 138 | #define AT91_PIN_PD15 (PIN_BASE + 0x60 + 15) |
160 | #define AT91_PIN_PD16 (PIN_BASE + 0x60 + 16) | 139 | #define AT91_PIN_PD16 (PIN_BASE + 0x60 + 16) |
161 | #define AT91_PIN_PD17 (PIN_BASE + 0x60 + 17) | 140 | #define AT91_PIN_PD17 (PIN_BASE + 0x60 + 17) |
162 | #define AT91_PIN_PD18 (PIN_BASE + 0x60 + 18) | 141 | #define AT91_PIN_PD18 (PIN_BASE + 0x60 + 18) |
163 | #define AT91_PIN_PD19 (PIN_BASE + 0x60 + 19) | 142 | #define AT91_PIN_PD19 (PIN_BASE + 0x60 + 19) |
164 | |||
165 | #define AT91_PIN_PD20 (PIN_BASE + 0x60 + 20) | 143 | #define AT91_PIN_PD20 (PIN_BASE + 0x60 + 20) |
166 | #define AT91_PIN_PD21 (PIN_BASE + 0x60 + 21) | 144 | #define AT91_PIN_PD21 (PIN_BASE + 0x60 + 21) |
167 | #define AT91_PIN_PD22 (PIN_BASE + 0x60 + 22) | 145 | #define AT91_PIN_PD22 (PIN_BASE + 0x60 + 22) |
168 | #define AT91_PIN_PD23 (PIN_BASE + 0x60 + 23) | 146 | #define AT91_PIN_PD23 (PIN_BASE + 0x60 + 23) |
169 | #define AT91_PIN_PD24 (PIN_BASE + 0x60 + 24) | 147 | #define AT91_PIN_PD24 (PIN_BASE + 0x60 + 24) |
170 | |||
171 | #define AT91_PIN_PD25 (PIN_BASE + 0x60 + 25) | 148 | #define AT91_PIN_PD25 (PIN_BASE + 0x60 + 25) |
172 | #define AT91_PIN_PD26 (PIN_BASE + 0x60 + 26) | 149 | #define AT91_PIN_PD26 (PIN_BASE + 0x60 + 26) |
173 | #define AT91_PIN_PD27 (PIN_BASE + 0x60 + 27) | 150 | #define AT91_PIN_PD27 (PIN_BASE + 0x60 + 27) |
174 | #define AT91_PIN_PD28 (PIN_BASE + 0x60 + 28) | 151 | #define AT91_PIN_PD28 (PIN_BASE + 0x60 + 28) |
175 | #define AT91_PIN_PD29 (PIN_BASE + 0x60 + 29) | 152 | #define AT91_PIN_PD29 (PIN_BASE + 0x60 + 29) |
176 | |||
177 | #define AT91_PIN_PD30 (PIN_BASE + 0x60 + 30) | 153 | #define AT91_PIN_PD30 (PIN_BASE + 0x60 + 30) |
178 | #define AT91_PIN_PD31 (PIN_BASE + 0x60 + 31) | 154 | #define AT91_PIN_PD31 (PIN_BASE + 0x60 + 31) |
179 | 155 | ||
156 | #define AT91_PIN_PE0 (PIN_BASE + 0x80 + 0) | ||
157 | #define AT91_PIN_PE1 (PIN_BASE + 0x80 + 1) | ||
158 | #define AT91_PIN_PE2 (PIN_BASE + 0x80 + 2) | ||
159 | #define AT91_PIN_PE3 (PIN_BASE + 0x80 + 3) | ||
160 | #define AT91_PIN_PE4 (PIN_BASE + 0x80 + 4) | ||
161 | #define AT91_PIN_PE5 (PIN_BASE + 0x80 + 5) | ||
162 | #define AT91_PIN_PE6 (PIN_BASE + 0x80 + 6) | ||
163 | #define AT91_PIN_PE7 (PIN_BASE + 0x80 + 7) | ||
164 | #define AT91_PIN_PE8 (PIN_BASE + 0x80 + 8) | ||
165 | #define AT91_PIN_PE9 (PIN_BASE + 0x80 + 9) | ||
166 | #define AT91_PIN_PE10 (PIN_BASE + 0x80 + 10) | ||
167 | #define AT91_PIN_PE11 (PIN_BASE + 0x80 + 11) | ||
168 | #define AT91_PIN_PE12 (PIN_BASE + 0x80 + 12) | ||
169 | #define AT91_PIN_PE13 (PIN_BASE + 0x80 + 13) | ||
170 | #define AT91_PIN_PE14 (PIN_BASE + 0x80 + 14) | ||
171 | #define AT91_PIN_PE15 (PIN_BASE + 0x80 + 15) | ||
172 | #define AT91_PIN_PE16 (PIN_BASE + 0x80 + 16) | ||
173 | #define AT91_PIN_PE17 (PIN_BASE + 0x80 + 17) | ||
174 | #define AT91_PIN_PE18 (PIN_BASE + 0x80 + 18) | ||
175 | #define AT91_PIN_PE19 (PIN_BASE + 0x80 + 19) | ||
176 | #define AT91_PIN_PE20 (PIN_BASE + 0x80 + 20) | ||
177 | #define AT91_PIN_PE21 (PIN_BASE + 0x80 + 21) | ||
178 | #define AT91_PIN_PE22 (PIN_BASE + 0x80 + 22) | ||
179 | #define AT91_PIN_PE23 (PIN_BASE + 0x80 + 23) | ||
180 | #define AT91_PIN_PE24 (PIN_BASE + 0x80 + 24) | ||
181 | #define AT91_PIN_PE25 (PIN_BASE + 0x80 + 25) | ||
182 | #define AT91_PIN_PE26 (PIN_BASE + 0x80 + 26) | ||
183 | #define AT91_PIN_PE27 (PIN_BASE + 0x80 + 27) | ||
184 | #define AT91_PIN_PE28 (PIN_BASE + 0x80 + 28) | ||
185 | #define AT91_PIN_PE29 (PIN_BASE + 0x80 + 29) | ||
186 | #define AT91_PIN_PE30 (PIN_BASE + 0x80 + 30) | ||
187 | #define AT91_PIN_PE31 (PIN_BASE + 0x80 + 31) | ||
188 | |||
180 | #ifndef __ASSEMBLY__ | 189 | #ifndef __ASSEMBLY__ |
181 | /* setup setup routines, called from board init or driver probe() */ | 190 | /* setup setup routines, called from board init or driver probe() */ |
191 | extern int __init_or_module at91_set_GPIO_periph(unsigned pin, int use_pullup); | ||
182 | extern int __init_or_module at91_set_A_periph(unsigned pin, int use_pullup); | 192 | extern int __init_or_module at91_set_A_periph(unsigned pin, int use_pullup); |
183 | extern int __init_or_module at91_set_B_periph(unsigned pin, int use_pullup); | 193 | extern int __init_or_module at91_set_B_periph(unsigned pin, int use_pullup); |
184 | extern int __init_or_module at91_set_gpio_input(unsigned pin, int use_pullup); | 194 | extern int __init_or_module at91_set_gpio_input(unsigned pin, int use_pullup); |
@@ -193,7 +203,50 @@ extern int at91_get_gpio_value(unsigned pin); | |||
193 | /* callable only from core power-management code */ | 203 | /* callable only from core power-management code */ |
194 | extern void at91_gpio_suspend(void); | 204 | extern void at91_gpio_suspend(void); |
195 | extern void at91_gpio_resume(void); | 205 | extern void at91_gpio_resume(void); |
196 | #endif | ||
197 | 206 | ||
198 | #endif | 207 | /*-------------------------------------------------------------------------*/ |
208 | |||
209 | /* wrappers for "new style" GPIO calls. the old AT91-specfic ones should | ||
210 | * eventually be removed (along with this errno.h inclusion), and the | ||
211 | * gpio request/free calls should probably be implemented. | ||
212 | */ | ||
213 | |||
214 | #include <asm/errno.h> | ||
199 | 215 | ||
216 | static inline int gpio_request(unsigned gpio, const char *label) | ||
217 | { | ||
218 | return 0; | ||
219 | } | ||
220 | |||
221 | static inline void gpio_free(unsigned gpio) | ||
222 | { | ||
223 | } | ||
224 | |||
225 | extern int gpio_direction_input(unsigned gpio); | ||
226 | extern int gpio_direction_output(unsigned gpio); | ||
227 | |||
228 | static inline int gpio_get_value(unsigned gpio) | ||
229 | { | ||
230 | return at91_get_gpio_value(gpio); | ||
231 | } | ||
232 | |||
233 | static inline void gpio_set_value(unsigned gpio, int value) | ||
234 | { | ||
235 | at91_set_gpio_value(gpio, value); | ||
236 | } | ||
237 | |||
238 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | ||
239 | |||
240 | static inline int gpio_to_irq(unsigned gpio) | ||
241 | { | ||
242 | return gpio; | ||
243 | } | ||
244 | |||
245 | static inline int irq_to_gpio(unsigned irq) | ||
246 | { | ||
247 | return irq; | ||
248 | } | ||
249 | |||
250 | #endif /* __ASSEMBLY__ */ | ||
251 | |||
252 | #endif | ||
diff --git a/include/asm-arm/arch-at91rm9200/hardware.h b/include/asm-arm/arch-at91/hardware.h index 9ea5bfe06320..28133e0154dd 100644 --- a/include/asm-arm/arch-at91rm9200/hardware.h +++ b/include/asm-arm/arch-at91/hardware.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/hardware.h | 2 | * include/asm-arm/arch-at91/hardware.h |
3 | * | 3 | * |
4 | * Copyright (C) 2003 SAN People | 4 | * Copyright (C) 2003 SAN People |
5 | * Copyright (C) 2003 ATMEL | 5 | * Copyright (C) 2003 ATMEL |
@@ -22,21 +22,23 @@ | |||
22 | #include <asm/arch/at91sam9260.h> | 22 | #include <asm/arch/at91sam9260.h> |
23 | #elif defined(CONFIG_ARCH_AT91SAM9261) | 23 | #elif defined(CONFIG_ARCH_AT91SAM9261) |
24 | #include <asm/arch/at91sam9261.h> | 24 | #include <asm/arch/at91sam9261.h> |
25 | #elif defined(CONFIG_ARCH_AT91SAM9263) | ||
26 | #include <asm/arch/at91sam9263.h> | ||
25 | #else | 27 | #else |
26 | #error "Unsupported AT91 processor" | 28 | #error "Unsupported AT91 processor" |
27 | #endif | 29 | #endif |
28 | 30 | ||
29 | 31 | ||
30 | /* | 32 | /* |
31 | * Remap the peripherals from address 0xFFFA0000 .. 0xFFFFFFFF | 33 | * Remap the peripherals from address 0xFFF78000 .. 0xFFFFFFFF |
32 | * to 0xFEFA0000 .. 0xFF000000. (384Kb) | 34 | * to 0xFEF78000 .. 0xFF000000. (544Kb) |
33 | */ | 35 | */ |
34 | #define AT91_IO_PHYS_BASE 0xFFFA0000 | 36 | #define AT91_IO_PHYS_BASE 0xFFF78000 |
35 | #define AT91_IO_SIZE (0xFFFFFFFF - AT91_IO_PHYS_BASE + 1) | 37 | #define AT91_IO_SIZE (0xFFFFFFFF - AT91_IO_PHYS_BASE + 1) |
36 | #define AT91_IO_VIRT_BASE (0xFF000000 - AT91_IO_SIZE) | 38 | #define AT91_IO_VIRT_BASE (0xFF000000 - AT91_IO_SIZE) |
37 | 39 | ||
38 | /* Convert a physical IO address to virtual IO address */ | 40 | /* Convert a physical IO address to virtual IO address */ |
39 | #define AT91_IO_P2V(x) ((x) - AT91_IO_PHYS_BASE + AT91_IO_VIRT_BASE) | 41 | #define AT91_IO_P2V(x) ((x) - AT91_IO_PHYS_BASE + AT91_IO_VIRT_BASE) |
40 | 42 | ||
41 | /* | 43 | /* |
42 | * Virtual to Physical Address mapping for IO devices. | 44 | * Virtual to Physical Address mapping for IO devices. |
diff --git a/include/asm-arm/arch-at91rm9200/io.h b/include/asm-arm/arch-at91/io.h index 88fd1bebcef3..401f327ec047 100644 --- a/include/asm-arm/arch-at91rm9200/io.h +++ b/include/asm-arm/arch-at91/io.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/io.h | 2 | * include/asm-arm/arch-at91/io.h |
3 | * | 3 | * |
4 | * Copyright (C) 2003 SAN People | 4 | * Copyright (C) 2003 SAN People |
5 | * | 5 | * |
diff --git a/include/asm-arm/arch-at91rm9200/irqs.h b/include/asm-arm/arch-at91/irqs.h index c0679eaefaf2..1ffa3bb9a9c1 100644 --- a/include/asm-arm/arch-at91rm9200/irqs.h +++ b/include/asm-arm/arch-at91/irqs.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/irqs.h | 2 | * include/asm-arm/arch-at91/irqs.h |
3 | * | 3 | * |
4 | * Copyright (C) 2004 SAN People | 4 | * Copyright (C) 2004 SAN People |
5 | * | 5 | * |
@@ -37,8 +37,8 @@ | |||
37 | * IRQ interrupt symbols are the AT91xxx_ID_* symbols | 37 | * IRQ interrupt symbols are the AT91xxx_ID_* symbols |
38 | * for IRQs handled directly through the AIC, or else the AT91_PIN_* | 38 | * for IRQs handled directly through the AIC, or else the AT91_PIN_* |
39 | * symbols in gpio.h for ones handled indirectly as GPIOs. | 39 | * symbols in gpio.h for ones handled indirectly as GPIOs. |
40 | * We make provision for 4 banks of GPIO. | 40 | * We make provision for 5 banks of GPIO. |
41 | */ | 41 | */ |
42 | #define NR_IRQS (NR_AIC_IRQS + (4 * 32)) | 42 | #define NR_IRQS (NR_AIC_IRQS + (5 * 32)) |
43 | 43 | ||
44 | #endif | 44 | #endif |
diff --git a/include/asm-arm/arch-at91rm9200/memory.h b/include/asm-arm/arch-at91/memory.h index f985069e6d01..4835d6784509 100644 --- a/include/asm-arm/arch-at91rm9200/memory.h +++ b/include/asm-arm/arch-at91/memory.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/memory.h | 2 | * include/asm-arm/arch-at91/memory.h |
3 | * | 3 | * |
4 | * Copyright (C) 2004 SAN People | 4 | * Copyright (C) 2004 SAN People |
5 | * | 5 | * |
diff --git a/include/asm-arm/arch-at91rm9200/system.h b/include/asm-arm/arch-at91/system.h index 9c67130603b2..6bf846098ea9 100644 --- a/include/asm-arm/arch-at91rm9200/system.h +++ b/include/asm-arm/arch-at91/system.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/system.h | 2 | * include/asm-arm/arch-at91/system.h |
3 | * | 3 | * |
4 | * Copyright (C) 2003 SAN People | 4 | * Copyright (C) 2003 SAN People |
5 | * | 5 | * |
diff --git a/include/asm-arm/arch-at91rm9200/timex.h b/include/asm-arm/arch-at91/timex.h index faeca45a8d44..f41636d607a2 100644 --- a/include/asm-arm/arch-at91rm9200/timex.h +++ b/include/asm-arm/arch-at91/timex.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/timex.h | 2 | * include/asm-arm/arch-at91/timex.h |
3 | * | 3 | * |
4 | * Copyright (C) 2003 SAN People | 4 | * Copyright (C) 2003 SAN People |
5 | * | 5 | * |
@@ -32,6 +32,11 @@ | |||
32 | #define AT91SAM9_MASTER_CLOCK 99300000 | 32 | #define AT91SAM9_MASTER_CLOCK 99300000 |
33 | #define CLOCK_TICK_RATE (AT91SAM9_MASTER_CLOCK/16) | 33 | #define CLOCK_TICK_RATE (AT91SAM9_MASTER_CLOCK/16) |
34 | 34 | ||
35 | #elif defined(CONFIG_ARCH_AT91SAM9263) | ||
36 | |||
37 | #define AT91SAM9_MASTER_CLOCK 99959500 | ||
38 | #define CLOCK_TICK_RATE (AT91SAM9_MASTER_CLOCK/16) | ||
39 | |||
35 | #endif | 40 | #endif |
36 | 41 | ||
37 | #endif | 42 | #endif |
diff --git a/include/asm-arm/arch-at91rm9200/uncompress.h b/include/asm-arm/arch-at91/uncompress.h index 34b4b93fa015..a193d28304b6 100644 --- a/include/asm-arm/arch-at91rm9200/uncompress.h +++ b/include/asm-arm/arch-at91/uncompress.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/uncompress.h | 2 | * include/asm-arm/arch-at91/uncompress.h |
3 | * | 3 | * |
4 | * Copyright (C) 2003 SAN People | 4 | * Copyright (C) 2003 SAN People |
5 | * | 5 | * |
diff --git a/include/asm-arm/arch-at91rm9200/vmalloc.h b/include/asm-arm/arch-at91/vmalloc.h index 0a23b8c562b9..bb05e70e932a 100644 --- a/include/asm-arm/arch-at91rm9200/vmalloc.h +++ b/include/asm-arm/arch-at91/vmalloc.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91rm9200/vmalloc.h | 2 | * include/asm-arm/arch-at91/vmalloc.h |
3 | * | 3 | * |
4 | * Copyright (C) 2003 SAN People | 4 | * Copyright (C) 2003 SAN People |
5 | * | 5 | * |
diff --git a/include/asm-arm/arch-at91rm9200/at91_pdc.h b/include/asm-arm/arch-at91rm9200/at91_pdc.h deleted file mode 100644 index 79d6e02fa45e..000000000000 --- a/include/asm-arm/arch-at91rm9200/at91_pdc.h +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91rm9200/at91_pdc.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Ivan Kokshaysky | ||
5 | * Copyright (C) SAN People | ||
6 | * | ||
7 | * Peripheral Data Controller (PDC) registers. | ||
8 | * Based on AT91RM9200 datasheet revision E. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or | ||
13 | * (at your option) any later version. | ||
14 | */ | ||
15 | |||
16 | #ifndef AT91_PDC_H | ||
17 | #define AT91_PDC_H | ||
18 | |||
19 | #define AT91_PDC_RPR 0x100 /* Receive Pointer Register */ | ||
20 | #define AT91_PDC_RCR 0x104 /* Receive Counter Register */ | ||
21 | #define AT91_PDC_TPR 0x108 /* Transmit Pointer Register */ | ||
22 | #define AT91_PDC_TCR 0x10c /* Transmit Counter Register */ | ||
23 | #define AT91_PDC_RNPR 0x110 /* Receive Next Pointer Register */ | ||
24 | #define AT91_PDC_RNCR 0x114 /* Receive Next Counter Register */ | ||
25 | #define AT91_PDC_TNPR 0x118 /* Transmit Next Pointer Register */ | ||
26 | #define AT91_PDC_TNCR 0x11c /* Transmit Next Counter Register */ | ||
27 | |||
28 | #define AT91_PDC_PTCR 0x120 /* Transfer Control Register */ | ||
29 | #define AT91_PDC_RXTEN (1 << 0) /* Receiver Transfer Enable */ | ||
30 | #define AT91_PDC_RXTDIS (1 << 1) /* Receiver Transfer Disable */ | ||
31 | #define AT91_PDC_TXTEN (1 << 8) /* Transmitter Transfer Enable */ | ||
32 | #define AT91_PDC_TXTDIS (1 << 9) /* Transmitter Transfer Disable */ | ||
33 | |||
34 | #define AT91_PDC_PTSR 0x124 /* Transfer Status Register */ | ||
35 | |||
36 | #endif | ||
diff --git a/include/asm-arm/arch-at91rm9200/debug-macro.S b/include/asm-arm/arch-at91rm9200/debug-macro.S deleted file mode 100644 index 85cdadf26634..000000000000 --- a/include/asm-arm/arch-at91rm9200/debug-macro.S +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91rm9200/debug-macro.S | ||
3 | * | ||
4 | * Copyright (C) 2003-2005 SAN People | ||
5 | * | ||
6 | * Debugging macro include header | ||
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 | |||
14 | #include <asm/hardware.h> | ||
15 | #include <asm/arch/at91_dbgu.h> | ||
16 | |||
17 | .macro addruart,rx | ||
18 | mrc p15, 0, \rx, c1, c0 | ||
19 | tst \rx, #1 @ MMU enabled? | ||
20 | ldreq \rx, =AT91_BASE_SYS @ System peripherals (phys address) | ||
21 | ldrne \rx, =AT91_VA_BASE_SYS @ System peripherals (virt address) | ||
22 | .endm | ||
23 | |||
24 | .macro senduart,rd,rx | ||
25 | strb \rd, [\rx, #AT91_DBGU_THR] @ Write to Transmitter Holding Register | ||
26 | .endm | ||
27 | |||
28 | .macro waituart,rd,rx | ||
29 | 1001: ldr \rd, [\rx, #AT91_DBGU_SR] @ Read Status Register | ||
30 | tst \rd, #AT91_DBGU_TXRDY @ DBGU_TXRDY = 1 when ready to transmit | ||
31 | beq 1001b | ||
32 | .endm | ||
33 | |||
34 | .macro busyuart,rd,rx | ||
35 | 1001: ldr \rd, [\rx, #AT91_DBGU_SR] @ Read Status Register | ||
36 | tst \rd, #AT91_DBGU_TXEMPTY @ DBGU_TXEMPTY = 1 when transmission complete | ||
37 | beq 1001b | ||
38 | .endm | ||
39 | |||
diff --git a/include/asm-arm/arch-at91rm9200/entry-macro.S b/include/asm-arm/arch-at91rm9200/entry-macro.S deleted file mode 100644 index 57248a796472..000000000000 --- a/include/asm-arm/arch-at91rm9200/entry-macro.S +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91rm9200/entry-macro.S | ||
3 | * | ||
4 | * Copyright (C) 2003-2005 SAN People | ||
5 | * | ||
6 | * Low-level IRQ helper macros for AT91RM9200 platforms | ||
7 | * | ||
8 | * This file is licensed under the terms of the GNU General Public | ||
9 | * License version 2. This program is licensed "as is" without any | ||
10 | * warranty of any kind, whether express or implied. | ||
11 | */ | ||
12 | |||
13 | #include <asm/hardware.h> | ||
14 | #include <asm/arch/at91_aic.h> | ||
15 | |||
16 | .macro disable_fiq | ||
17 | .endm | ||
18 | |||
19 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
20 | ldr \base, =(AT91_VA_BASE_SYS) @ base virtual address of SYS peripherals | ||
21 | ldr \irqnr, [\base, #AT91_AIC_IVR] @ read IRQ vector register: de-asserts nIRQ to processor (and clears interrupt) | ||
22 | ldr \irqstat, [\base, #AT91_AIC_ISR] @ read interrupt source number | ||
23 | teq \irqstat, #0 @ ISR is 0 when no current interrupt, or spurious interrupt | ||
24 | streq \tmp, [\base, #AT91_AIC_EOICR] @ not going to be handled further, then ACK it now. | ||
25 | .endm | ||
26 | |||
diff --git a/include/asm-arm/arch-cl7500/entry-macro.S b/include/asm-arm/arch-cl7500/entry-macro.S index c9e5395e5106..0cfb89b229d1 100644 --- a/include/asm-arm/arch-cl7500/entry-macro.S +++ b/include/asm-arm/arch-cl7500/entry-macro.S | |||
@@ -1,3 +1,8 @@ | |||
1 | #include <asm/hardware.h> | 1 | #include <asm/hardware.h> |
2 | #include <asm/hardware/entry-macro-iomd.S> | 2 | #include <asm/hardware/entry-macro-iomd.S> |
3 | .macro get_irqnr_preamble, base, tmp | ||
4 | .endm | ||
5 | |||
6 | .macro arch_ret_to_user, tmp1, tmp2 | ||
7 | .endm | ||
3 | 8 | ||
diff --git a/include/asm-arm/arch-clps711x/entry-macro.S b/include/asm-arm/arch-clps711x/entry-macro.S index de4481dd8ba0..cd8c5a0bc7bc 100644 --- a/include/asm-arm/arch-clps711x/entry-macro.S +++ b/include/asm-arm/arch-clps711x/entry-macro.S | |||
@@ -13,6 +13,12 @@ | |||
13 | .macro disable_fiq | 13 | .macro disable_fiq |
14 | .endm | 14 | .endm |
15 | 15 | ||
16 | .macro get_irqnr_preamble, base, tmp | ||
17 | .endm | ||
18 | |||
19 | .macro arch_ret_to_user, tmp1, tmp2 | ||
20 | .endm | ||
21 | |||
16 | #if (INTSR2 - INTSR1) != (INTMR2 - INTMR1) | 22 | #if (INTSR2 - INTSR1) != (INTMR2 - INTMR1) |
17 | #error INTSR stride != INTMR stride | 23 | #error INTSR stride != INTMR stride |
18 | #endif | 24 | #endif |
diff --git a/include/asm-arm/arch-ebsa110/entry-macro.S b/include/asm-arm/arch-ebsa110/entry-macro.S index b12ca04f998c..aa23c5d6c69e 100644 --- a/include/asm-arm/arch-ebsa110/entry-macro.S +++ b/include/asm-arm/arch-ebsa110/entry-macro.S | |||
@@ -15,6 +15,12 @@ | |||
15 | .macro disable_fiq | 15 | .macro disable_fiq |
16 | .endm | 16 | .endm |
17 | 17 | ||
18 | .macro get_irqnr_preamble, base, tmp | ||
19 | .endm | ||
20 | |||
21 | .macro arch_ret_to_user, tmp1, tmp2 | ||
22 | .endm | ||
23 | |||
18 | .macro get_irqnr_and_base, irqnr, stat, base, tmp | 24 | .macro get_irqnr_and_base, irqnr, stat, base, tmp |
19 | mov \base, #IRQ_STAT | 25 | mov \base, #IRQ_STAT |
20 | ldrb \stat, [\base] @ get interrupts | 26 | ldrb \stat, [\base] @ get interrupts |
diff --git a/include/asm-arm/arch-ebsa285/entry-macro.S b/include/asm-arm/arch-ebsa285/entry-macro.S index ce812d4f4a33..4203dbf10662 100644 --- a/include/asm-arm/arch-ebsa285/entry-macro.S +++ b/include/asm-arm/arch-ebsa285/entry-macro.S | |||
@@ -14,6 +14,12 @@ | |||
14 | .macro disable_fiq | 14 | .macro disable_fiq |
15 | .endm | 15 | .endm |
16 | 16 | ||
17 | .macro get_irqnr_preamble, base, tmp | ||
18 | .endm | ||
19 | |||
20 | .macro arch_ret_to_user, tmp1, tmp2 | ||
21 | .endm | ||
22 | |||
17 | .equ dc21285_high, ARMCSR_BASE & 0xff000000 | 23 | .equ dc21285_high, ARMCSR_BASE & 0xff000000 |
18 | .equ dc21285_low, ARMCSR_BASE & 0x00ffffff | 24 | .equ dc21285_low, ARMCSR_BASE & 0x00ffffff |
19 | 25 | ||
diff --git a/include/asm-arm/arch-ep93xx/entry-macro.S b/include/asm-arm/arch-ep93xx/entry-macro.S index 84140a28dfcf..241ec221a047 100644 --- a/include/asm-arm/arch-ep93xx/entry-macro.S +++ b/include/asm-arm/arch-ep93xx/entry-macro.S | |||
@@ -14,6 +14,12 @@ | |||
14 | .macro disable_fiq | 14 | .macro disable_fiq |
15 | .endm | 15 | .endm |
16 | 16 | ||
17 | .macro get_irqnr_preamble, base, tmp | ||
18 | .endm | ||
19 | |||
20 | .macro arch_ret_to_user, tmp1, tmp2 | ||
21 | .endm | ||
22 | |||
17 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 23 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
18 | ldr \base, =(EP93XX_AHB_VIRT_BASE) | 24 | ldr \base, =(EP93XX_AHB_VIRT_BASE) |
19 | orr \base, \base, #0x000b0000 | 25 | orr \base, \base, #0x000b0000 |
diff --git a/include/asm-arm/arch-ep93xx/ep93xx-regs.h b/include/asm-arm/arch-ep93xx/ep93xx-regs.h index 593f562f85c3..625c6f0abc03 100644 --- a/include/asm-arm/arch-ep93xx/ep93xx-regs.h +++ b/include/asm-arm/arch-ep93xx/ep93xx-regs.h | |||
@@ -73,6 +73,11 @@ | |||
73 | 73 | ||
74 | #define EP93XX_GPIO_BASE (EP93XX_APB_VIRT_BASE + 0x00040000) | 74 | #define EP93XX_GPIO_BASE (EP93XX_APB_VIRT_BASE + 0x00040000) |
75 | #define EP93XX_GPIO_REG(x) (EP93XX_GPIO_BASE + (x)) | 75 | #define EP93XX_GPIO_REG(x) (EP93XX_GPIO_BASE + (x)) |
76 | #define EP93XX_GPIO_F_INT_TYPE1 EP93XX_GPIO_REG(0x4c) | ||
77 | #define EP93XX_GPIO_F_INT_TYPE2 EP93XX_GPIO_REG(0x50) | ||
78 | #define EP93XX_GPIO_F_INT_ACK EP93XX_GPIO_REG(0x54) | ||
79 | #define EP93XX_GPIO_F_INT_ENABLE EP93XX_GPIO_REG(0x58) | ||
80 | #define EP93XX_GPIO_F_INT_STATUS EP93XX_GPIO_REG(0x5c) | ||
76 | #define EP93XX_GPIO_A_INT_TYPE1 EP93XX_GPIO_REG(0x90) | 81 | #define EP93XX_GPIO_A_INT_TYPE1 EP93XX_GPIO_REG(0x90) |
77 | #define EP93XX_GPIO_A_INT_TYPE2 EP93XX_GPIO_REG(0x94) | 82 | #define EP93XX_GPIO_A_INT_TYPE2 EP93XX_GPIO_REG(0x94) |
78 | #define EP93XX_GPIO_A_INT_ACK EP93XX_GPIO_REG(0x98) | 83 | #define EP93XX_GPIO_A_INT_ACK EP93XX_GPIO_REG(0x98) |
diff --git a/include/asm-arm/arch-ep93xx/irqs.h b/include/asm-arm/arch-ep93xx/irqs.h index ae532e304bf1..2a8c63638c5e 100644 --- a/include/asm-arm/arch-ep93xx/irqs.h +++ b/include/asm-arm/arch-ep93xx/irqs.h | |||
@@ -67,9 +67,13 @@ | |||
67 | #define IRQ_EP93XX_SAI 60 | 67 | #define IRQ_EP93XX_SAI 60 |
68 | #define EP93XX_VIC2_VALID_IRQ_MASK 0x1fffffff | 68 | #define EP93XX_VIC2_VALID_IRQ_MASK 0x1fffffff |
69 | 69 | ||
70 | #define IRQ_EP93XX_GPIO(x) (64 + (x)) | 70 | /* |
71 | * Map GPIO A0..A7 to irq 64..71, B0..B7 to 72..79, and | ||
72 | * F0..F7 to 80..87. | ||
73 | */ | ||
74 | #define IRQ_EP93XX_GPIO(x) (64 + (((x) + (((x) >> 2) & 8)) & 0x1f)) | ||
71 | 75 | ||
72 | #define NR_EP93XX_IRQS IRQ_EP93XX_GPIO(16) | 76 | #define NR_EP93XX_IRQS (64 + 24) |
73 | 77 | ||
74 | #define EP93XX_BOARD_IRQ(x) (NR_EP93XX_IRQS + (x)) | 78 | #define EP93XX_BOARD_IRQ(x) (NR_EP93XX_IRQS + (x)) |
75 | #define EP93XX_BOARD_IRQS 32 | 79 | #define EP93XX_BOARD_IRQS 32 |
diff --git a/include/asm-arm/arch-ep93xx/platform.h b/include/asm-arm/arch-ep93xx/platform.h index b4a8deb8bdef..44eccec2cba4 100644 --- a/include/asm-arm/arch-ep93xx/platform.h +++ b/include/asm-arm/arch-ep93xx/platform.h | |||
@@ -8,7 +8,6 @@ void ep93xx_map_io(void); | |||
8 | void ep93xx_init_irq(void); | 8 | void ep93xx_init_irq(void); |
9 | void ep93xx_init_time(unsigned long); | 9 | void ep93xx_init_time(unsigned long); |
10 | void ep93xx_init_devices(void); | 10 | void ep93xx_init_devices(void); |
11 | void ep93xx_clock_init(void); | ||
12 | extern struct sys_timer ep93xx_timer; | 11 | extern struct sys_timer ep93xx_timer; |
13 | 12 | ||
14 | struct ep93xx_eth_data | 13 | struct ep93xx_eth_data |
diff --git a/include/asm-arm/arch-h720x/entry-macro.S b/include/asm-arm/arch-h720x/entry-macro.S index 8f165648e2af..38dd63ae104e 100644 --- a/include/asm-arm/arch-h720x/entry-macro.S +++ b/include/asm-arm/arch-h720x/entry-macro.S | |||
@@ -11,6 +11,12 @@ | |||
11 | .macro disable_fiq | 11 | .macro disable_fiq |
12 | .endm | 12 | .endm |
13 | 13 | ||
14 | .macro get_irqnr_preamble, base, tmp | ||
15 | .endm | ||
16 | |||
17 | .macro arch_ret_to_user, tmp1, tmp2 | ||
18 | .endm | ||
19 | |||
14 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 20 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
15 | #if defined (CONFIG_CPU_H7201) || defined (CONFIG_CPU_H7202) | 21 | #if defined (CONFIG_CPU_H7201) || defined (CONFIG_CPU_H7202) |
16 | @ we could use the id register on H7202, but this is not | 22 | @ we could use the id register on H7202, but this is not |
diff --git a/include/asm-arm/arch-imx/entry-macro.S b/include/asm-arm/arch-imx/entry-macro.S index 3b9ef6914627..0b84e81031c3 100644 --- a/include/asm-arm/arch-imx/entry-macro.S +++ b/include/asm-arm/arch-imx/entry-macro.S | |||
@@ -11,21 +11,22 @@ | |||
11 | 11 | ||
12 | .macro disable_fiq | 12 | .macro disable_fiq |
13 | .endm | 13 | .endm |
14 | |||
15 | .macro get_irqnr_preamble, base, tmp | ||
16 | .endm | ||
17 | |||
18 | .macro arch_ret_to_user, tmp1, tmp2 | ||
19 | .endm | ||
20 | |||
14 | #define AITC_NIVECSR 0x40 | 21 | #define AITC_NIVECSR 0x40 |
15 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 22 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
16 | ldr \irqstat, =IO_ADDRESS(IMX_AITC_BASE) | 23 | ldr \base, =IO_ADDRESS(IMX_AITC_BASE) |
17 | @ Load offset & priority of the highest priority | 24 | @ Load offset & priority of the highest priority |
18 | @ interrupt pending. | 25 | @ interrupt pending. |
19 | ldr \irqnr, [\irqstat, #AITC_NIVECSR] | 26 | ldr \irqstat, [\base, #AITC_NIVECSR] |
20 | @ Shift off the priority leaving the offset or | 27 | @ Shift off the priority leaving the offset or |
21 | @ "interrupt number" | 28 | @ "interrupt number", use arithmetic shift to |
22 | mov \irqnr, \irqnr, lsr #16 | 29 | @ transform illegal source (0xffff) as -1 |
23 | ldr \irqstat, =1 @ dummy compare | 30 | mov \irqnr, \irqstat, asr #16 |
24 | ldr \base, =0xFFFF // invalid interrupt | 31 | adds \tmp, \irqnr, #1 |
25 | cmp \irqnr, \base | ||
26 | bne 1001f | ||
27 | ldr \irqstat, =0 | ||
28 | 1001: | ||
29 | tst \irqstat, #1 @ to make the condition code = TRUE | ||
30 | .endm | 32 | .endm |
31 | |||
diff --git a/include/asm-arm/arch-imx/spi_imx.h b/include/asm-arm/arch-imx/spi_imx.h new file mode 100644 index 000000000000..2165449e976e --- /dev/null +++ b/include/asm-arm/arch-imx/spi_imx.h | |||
@@ -0,0 +1,72 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-imx/spi_imx.h | ||
3 | * | ||
4 | * Copyright (C) 2006 SWAPP | ||
5 | * Andrea Paterniani <a.paterniani@swapp-eng.it> | ||
6 | * | ||
7 | * Initial version inspired by: | ||
8 | * linux-2.6.17-rc3-mm1/include/asm-arm/arch-pxa/pxa2xx_spi.h | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or | ||
13 | * (at your option) any later version. | ||
14 | * | ||
15 | * This program is distributed in the hope that it will be useful, | ||
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | * GNU General Public License for more details. | ||
19 | * | ||
20 | * You should have received a copy of the GNU General Public License | ||
21 | * along with this program; if not, write to the Free Software | ||
22 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
23 | */ | ||
24 | |||
25 | #ifndef SPI_IMX_H_ | ||
26 | #define SPI_IMX_H_ | ||
27 | |||
28 | |||
29 | /*-------------------------------------------------------------------------*/ | ||
30 | /** | ||
31 | * struct spi_imx_master - device.platform_data for SPI controller devices. | ||
32 | * @num_chipselect: chipselects are used to distinguish individual | ||
33 | * SPI slaves, and are numbered from zero to num_chipselects - 1. | ||
34 | * each slave has a chipselect signal, but it's common that not | ||
35 | * every chipselect is connected to a slave. | ||
36 | * @enable_dma: if true enables DMA driven transfers. | ||
37 | */ | ||
38 | struct spi_imx_master { | ||
39 | u8 num_chipselect; | ||
40 | u8 enable_dma:1; | ||
41 | }; | ||
42 | /*-------------------------------------------------------------------------*/ | ||
43 | |||
44 | |||
45 | /*-------------------------------------------------------------------------*/ | ||
46 | /** | ||
47 | * struct spi_imx_chip - spi_board_info.controller_data for SPI | ||
48 | * slave devices, copied to spi_device.controller_data. | ||
49 | * @enable_loopback : used for test purpouse to internally connect RX and TX | ||
50 | * sections. | ||
51 | * @enable_dma : enables dma transfer (provided that controller driver has | ||
52 | * dma enabled too). | ||
53 | * @ins_ss_pulse : enable /SS pulse insertion between SPI burst. | ||
54 | * @bclk_wait : number of bclk waits between each bits_per_word SPI burst. | ||
55 | * @cs_control : function pointer to board-specific function to assert/deassert | ||
56 | * I/O port to control HW generation of devices chip-select. | ||
57 | */ | ||
58 | struct spi_imx_chip { | ||
59 | u8 enable_loopback:1; | ||
60 | u8 enable_dma:1; | ||
61 | u8 ins_ss_pulse:1; | ||
62 | u16 bclk_wait:15; | ||
63 | void (*cs_control)(u32 control); | ||
64 | }; | ||
65 | |||
66 | /* Chip-select state */ | ||
67 | #define SPI_CS_ASSERT (1 << 0) | ||
68 | #define SPI_CS_DEASSERT (1 << 1) | ||
69 | /*-------------------------------------------------------------------------*/ | ||
70 | |||
71 | |||
72 | #endif /* SPI_IMX_H_*/ | ||
diff --git a/include/asm-arm/arch-integrator/entry-macro.S b/include/asm-arm/arch-integrator/entry-macro.S index 69838d04f90b..491af1a23de5 100644 --- a/include/asm-arm/arch-integrator/entry-macro.S +++ b/include/asm-arm/arch-integrator/entry-macro.S | |||
@@ -13,6 +13,12 @@ | |||
13 | .macro disable_fiq | 13 | .macro disable_fiq |
14 | .endm | 14 | .endm |
15 | 15 | ||
16 | .macro get_irqnr_preamble, base, tmp | ||
17 | .endm | ||
18 | |||
19 | .macro arch_ret_to_user, tmp1, tmp2 | ||
20 | .endm | ||
21 | |||
16 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 22 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
17 | /* FIXME: should not be using soo many LDRs here */ | 23 | /* FIXME: should not be using soo many LDRs here */ |
18 | ldr \base, =IO_ADDRESS(INTEGRATOR_IC_BASE) | 24 | ldr \base, =IO_ADDRESS(INTEGRATOR_IC_BASE) |
diff --git a/include/asm-arm/arch-iop13xx/entry-macro.S b/include/asm-arm/arch-iop13xx/entry-macro.S index 94c50283dc56..a624a7870c64 100644 --- a/include/asm-arm/arch-iop13xx/entry-macro.S +++ b/include/asm-arm/arch-iop13xx/entry-macro.S | |||
@@ -19,21 +19,27 @@ | |||
19 | .macro disable_fiq | 19 | .macro disable_fiq |
20 | .endm | 20 | .endm |
21 | 21 | ||
22 | .macro get_irqnr_preamble, base, tmp | ||
23 | mrc p15, 0, \tmp, c15, c1, 0 | ||
24 | orr \tmp, \tmp, #(1 << 6) | ||
25 | mcr p15, 0, \tmp, c15, c1, 0 @ Enable cp6 access | ||
26 | .endm | ||
27 | |||
22 | /* | 28 | /* |
23 | * Note: a 1-cycle window exists where iintvec will return the value | 29 | * Note: a 1-cycle window exists where iintvec will return the value |
24 | * of iintbase, so we explicitly check for "bad zeros" | 30 | * of iintbase, so we explicitly check for "bad zeros" |
25 | */ | 31 | */ |
26 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 32 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
27 | mrc p15, 0, \tmp, c15, c1, 0 | ||
28 | orr \tmp, \tmp, #(1 << 6) | ||
29 | mcr p15, 0, \tmp, c15, c1, 0 @ Enable cp6 access | ||
30 | |||
31 | mrc p6, 0, \irqnr, c3, c2, 0 @ Read IINTVEC | 33 | mrc p6, 0, \irqnr, c3, c2, 0 @ Read IINTVEC |
32 | cmp \irqnr, #0 | 34 | cmp \irqnr, #0 |
33 | mrceq p6, 0, \irqnr, c3, c2, 0 @ Re-read on potentially bad zero | 35 | mrceq p6, 0, \irqnr, c3, c2, 0 @ Re-read on potentially bad zero |
34 | adds \irqstat, \irqnr, #1 @ Check for 0xffffffff | 36 | adds \irqstat, \irqnr, #1 @ Check for 0xffffffff |
35 | movne \irqnr, \irqnr, lsr #2 @ Convert to irqnr | 37 | movne \irqnr, \irqnr, lsr #2 @ Convert to irqnr |
38 | .endm | ||
36 | 39 | ||
37 | biceq \tmp, \tmp, #(1 << 6) | 40 | .macro arch_ret_to_user, tmp1, tmp2 |
38 | mcreq p15, 0, \tmp, c15, c1, 0 @ Disable cp6 access if no more interrupts | 41 | mrc p15, 0, \tmp1, c15, c1, 0 |
42 | ands \tmp2, \tmp1, #(1 << 6) | ||
43 | bicne \tmp1, \tmp1, #(1 << 6) | ||
44 | mcrne p15, 0, \tmp1, c15, c1, 0 @ Disable cp6 access | ||
39 | .endm | 45 | .endm |
diff --git a/include/asm-arm/arch-iop13xx/iop13xx.h b/include/asm-arm/arch-iop13xx/iop13xx.h index a88522a0ff8e..d26b755a9879 100644 --- a/include/asm-arm/arch-iop13xx/iop13xx.h +++ b/include/asm-arm/arch-iop13xx/iop13xx.h | |||
@@ -9,34 +9,6 @@ void iop13xx_init_irq(void); | |||
9 | void iop13xx_map_io(void); | 9 | void iop13xx_map_io(void); |
10 | void iop13xx_platform_init(void); | 10 | void iop13xx_platform_init(void); |
11 | void iop13xx_init_irq(void); | 11 | void iop13xx_init_irq(void); |
12 | void iop13xx_init_time(unsigned long tickrate); | ||
13 | unsigned long iop13xx_gettimeoffset(void); | ||
14 | |||
15 | /* handle cp6 access | ||
16 | * to do: handle access in entry-armv5.S and unify with | ||
17 | * the iop3xx implementation | ||
18 | * note: use iop13xx_cp6_enable_irq_save and iop13xx_cp6_irq_restore (irq.h) | ||
19 | * when interrupts are enabled | ||
20 | */ | ||
21 | static inline unsigned long iop13xx_cp6_save(void) | ||
22 | { | ||
23 | u32 temp, cp_flags; | ||
24 | |||
25 | asm volatile ( | ||
26 | "mrc p15, 0, %1, c15, c1, 0\n\t" | ||
27 | "orr %0, %1, #(1 << 6)\n\t" | ||
28 | "mcr p15, 0, %0, c15, c1, 0\n\t" | ||
29 | : "=r" (temp), "=r"(cp_flags)); | ||
30 | |||
31 | return cp_flags; | ||
32 | } | ||
33 | |||
34 | static inline void iop13xx_cp6_restore(unsigned long cp_flags) | ||
35 | { | ||
36 | asm volatile ( | ||
37 | "mcr p15, 0, %0, c15, c1, 0\n\t" | ||
38 | : : "r" (cp_flags) ); | ||
39 | } | ||
40 | 12 | ||
41 | /* CPUID CP6 R0 Page 0 */ | 13 | /* CPUID CP6 R0 Page 0 */ |
42 | static inline int iop13xx_cpu_id(void) | 14 | static inline int iop13xx_cpu_id(void) |
@@ -479,14 +451,4 @@ static inline int iop13xx_cpu_id(void) | |||
479 | #define IOP13XX_PBI_BAR1 IOP13XX_PBI_OFFSET(0x10) | 451 | #define IOP13XX_PBI_BAR1 IOP13XX_PBI_OFFSET(0x10) |
480 | #define IOP13XX_PBI_LR1 IOP13XX_PBI_OFFSET(0x14) | 452 | #define IOP13XX_PBI_LR1 IOP13XX_PBI_OFFSET(0x14) |
481 | 453 | ||
482 | #define IOP13XX_TMR_TC 0x01 | ||
483 | #define IOP13XX_TMR_EN 0x02 | ||
484 | #define IOP13XX_TMR_RELOAD 0x04 | ||
485 | #define IOP13XX_TMR_PRIVILEGED 0x08 | ||
486 | |||
487 | #define IOP13XX_TMR_RATIO_1_1 0x00 | ||
488 | #define IOP13XX_TMR_RATIO_4_1 0x10 | ||
489 | #define IOP13XX_TMR_RATIO_8_1 0x20 | ||
490 | #define IOP13XX_TMR_RATIO_16_1 0x30 | ||
491 | |||
492 | #endif /* _IOP13XX_HW_H_ */ | 454 | #endif /* _IOP13XX_HW_H_ */ |
diff --git a/include/asm-arm/arch-iop13xx/irqs.h b/include/asm-arm/arch-iop13xx/irqs.h index 442e35a40359..5c6fac2a4004 100644 --- a/include/asm-arm/arch-iop13xx/irqs.h +++ b/include/asm-arm/arch-iop13xx/irqs.h | |||
@@ -3,8 +3,6 @@ | |||
3 | 3 | ||
4 | #ifndef __ASSEMBLER__ | 4 | #ifndef __ASSEMBLER__ |
5 | #include <linux/types.h> | 5 | #include <linux/types.h> |
6 | #include <asm/system.h> /* local_irq_save */ | ||
7 | #include <asm/arch/iop13xx.h> /* iop13xx_cp6_* */ | ||
8 | 6 | ||
9 | /* INTPND0 CP6 R0 Page 3 | 7 | /* INTPND0 CP6 R0 Page 3 |
10 | */ | 8 | */ |
@@ -41,21 +39,6 @@ static inline u32 read_intpnd_3(void) | |||
41 | asm volatile("mrc p6, 0, %0, c3, c3, 0":"=r" (val)); | 39 | asm volatile("mrc p6, 0, %0, c3, c3, 0":"=r" (val)); |
42 | return val; | 40 | return val; |
43 | } | 41 | } |
44 | |||
45 | static inline void | ||
46 | iop13xx_cp6_enable_irq_save(unsigned long *cp_flags, unsigned long *irq_flags) | ||
47 | { | ||
48 | local_irq_save(*irq_flags); | ||
49 | *cp_flags = iop13xx_cp6_save(); | ||
50 | } | ||
51 | |||
52 | static inline void | ||
53 | iop13xx_cp6_irq_restore(unsigned long *cp_flags, | ||
54 | unsigned long *irq_flags) | ||
55 | { | ||
56 | iop13xx_cp6_restore(*cp_flags); | ||
57 | local_irq_restore(*irq_flags); | ||
58 | } | ||
59 | #endif | 42 | #endif |
60 | 43 | ||
61 | #define INTBASE 0 | 44 | #define INTBASE 0 |
diff --git a/include/asm-arm/arch-iop13xx/system.h b/include/asm-arm/arch-iop13xx/system.h index ee3a62530af2..127827058e1f 100644 --- a/include/asm-arm/arch-iop13xx/system.h +++ b/include/asm-arm/arch-iop13xx/system.h | |||
@@ -48,12 +48,10 @@ static inline void arch_reset(char mode) | |||
48 | /* | 48 | /* |
49 | * Reset the internal bus (warning both cores are reset) | 49 | * Reset the internal bus (warning both cores are reset) |
50 | */ | 50 | */ |
51 | u32 cp_flags = iop13xx_cp6_save(); | ||
52 | write_wdtcr(IOP13XX_WDTCR_EN_ARM); | 51 | write_wdtcr(IOP13XX_WDTCR_EN_ARM); |
53 | write_wdtcr(IOP13XX_WDTCR_EN); | 52 | write_wdtcr(IOP13XX_WDTCR_EN); |
54 | write_wdtsr(IOP13XX_WDTSR_WRITE_EN | IOP13XX_WDTCR_IB_RESET); | 53 | write_wdtsr(IOP13XX_WDTSR_WRITE_EN | IOP13XX_WDTCR_IB_RESET); |
55 | write_wdtcr(0x1000); | 54 | write_wdtcr(0x1000); |
56 | iop13xx_cp6_restore(cp_flags); | ||
57 | 55 | ||
58 | for(;;); | 56 | for(;;); |
59 | } | 57 | } |
diff --git a/include/asm-arm/arch-iop13xx/time.h b/include/asm-arm/arch-iop13xx/time.h new file mode 100644 index 000000000000..77a837a02dec --- /dev/null +++ b/include/asm-arm/arch-iop13xx/time.h | |||
@@ -0,0 +1,51 @@ | |||
1 | #ifndef _IOP13XX_TIME_H_ | ||
2 | #define _IOP13XX_TIME_H_ | ||
3 | #define IRQ_IOP_TIMER0 IRQ_IOP13XX_TIMER0 | ||
4 | |||
5 | #define IOP_TMR_EN 0x02 | ||
6 | #define IOP_TMR_RELOAD 0x04 | ||
7 | #define IOP_TMR_PRIVILEGED 0x08 | ||
8 | #define IOP_TMR_RATIO_1_1 0x00 | ||
9 | |||
10 | void iop_init_time(unsigned long tickrate); | ||
11 | unsigned long iop_gettimeoffset(void); | ||
12 | |||
13 | static inline void write_tmr0(u32 val) | ||
14 | { | ||
15 | asm volatile("mcr p6, 0, %0, c0, c9, 0" : : "r" (val)); | ||
16 | } | ||
17 | |||
18 | static inline void write_tmr1(u32 val) | ||
19 | { | ||
20 | asm volatile("mcr p6, 0, %0, c1, c9, 0" : : "r" (val)); | ||
21 | } | ||
22 | |||
23 | static inline u32 read_tcr0(void) | ||
24 | { | ||
25 | u32 val; | ||
26 | asm volatile("mrc p6, 0, %0, c2, c9, 0" : "=r" (val)); | ||
27 | return val; | ||
28 | } | ||
29 | |||
30 | static inline u32 read_tcr1(void) | ||
31 | { | ||
32 | u32 val; | ||
33 | asm volatile("mrc p6, 0, %0, c3, c9, 0" : "=r" (val)); | ||
34 | return val; | ||
35 | } | ||
36 | |||
37 | static inline void write_trr0(u32 val) | ||
38 | { | ||
39 | asm volatile("mcr p6, 0, %0, c4, c9, 0" : : "r" (val)); | ||
40 | } | ||
41 | |||
42 | static inline void write_trr1(u32 val) | ||
43 | { | ||
44 | asm volatile("mcr p6, 0, %0, c5, c9, 0" : : "r" (val)); | ||
45 | } | ||
46 | |||
47 | static inline void write_tisr(u32 val) | ||
48 | { | ||
49 | asm volatile("mcr p6, 0, %0, c6, c9, 0" : : "r" (val)); | ||
50 | } | ||
51 | #endif | ||
diff --git a/include/asm-arm/arch-iop32x/entry-macro.S b/include/asm-arm/arch-iop32x/entry-macro.S index 1500cbbd2295..207db99dfbd2 100644 --- a/include/asm-arm/arch-iop32x/entry-macro.S +++ b/include/asm-arm/arch-iop32x/entry-macro.S | |||
@@ -9,13 +9,28 @@ | |||
9 | */ | 9 | */ |
10 | #include <asm/arch/iop32x.h> | 10 | #include <asm/arch/iop32x.h> |
11 | 11 | ||
12 | .macro disable_fiq | 12 | .macro disable_fiq |
13 | .endm | 13 | .endm |
14 | 14 | ||
15 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 15 | .macro get_irqnr_preamble, base, tmp |
16 | ldr \base, =IOP3XX_REG_ADDR(0x07D8) | 16 | mrc p15, 0, \tmp, c15, c1, 0 |
17 | ldr \irqstat, [\base] @ Read IINTSRC | 17 | orr \tmp, \tmp, #(1 << 6) |
18 | cmp \irqstat, #0 | 18 | mcr p15, 0, \tmp, c15, c1, 0 @ Enable cp6 access |
19 | clzne \irqnr, \irqstat | 19 | mrc p15, 0, \tmp, c15, c1, 0 |
20 | rsbne \irqnr, \irqnr, #31 | 20 | mov \tmp, \tmp |
21 | .endm | 21 | sub pc, pc, #4 @ cp_wait |
22 | .endm | ||
23 | |||
24 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
25 | mrc p6, 0, \irqstat, c8, c0, 0 @ Read IINTSRC | ||
26 | cmp \irqstat, #0 | ||
27 | clzne \irqnr, \irqstat | ||
28 | rsbne \irqnr, \irqnr, #31 | ||
29 | .endm | ||
30 | |||
31 | .macro arch_ret_to_user, tmp1, tmp2 | ||
32 | mrc p15, 0, \tmp1, c15, c1, 0 | ||
33 | ands \tmp2, \tmp1, #(1 << 6) | ||
34 | bicne \tmp1, \tmp1, #(1 << 6) | ||
35 | mcrne p15, 0, \tmp1, c15, c1, 0 @ Disable cp6 access | ||
36 | .endm | ||
diff --git a/include/asm-arm/arch-iop32x/io.h b/include/asm-arm/arch-iop32x/io.h index 12d9ee02cde3..5f570a598a37 100644 --- a/include/asm-arm/arch-iop32x/io.h +++ b/include/asm-arm/arch-iop32x/io.h | |||
@@ -13,10 +13,16 @@ | |||
13 | 13 | ||
14 | #include <asm/hardware.h> | 14 | #include <asm/hardware.h> |
15 | 15 | ||
16 | #define IO_SPACE_LIMIT 0xffffffff | 16 | extern void __iomem * __ioremap(unsigned long, size_t, unsigned long); |
17 | extern void __iomem *__iop3xx_ioremap(unsigned long cookie, size_t size, | ||
18 | unsigned long flags); | ||
19 | extern void __iop3xx_iounmap(void __iomem *addr); | ||
17 | 20 | ||
18 | #define __io(p) ((void __iomem *)(p)) | 21 | #define IO_SPACE_LIMIT 0xffffffff |
22 | #define __io(p) ((void __iomem *)IOP3XX_PCI_IO_PHYS_TO_VIRT(p)) | ||
19 | #define __mem_pci(a) (a) | 23 | #define __mem_pci(a) (a) |
20 | 24 | ||
25 | #define __arch_ioremap(a, s, f) __iop3xx_ioremap(a, s, f) | ||
26 | #define __arch_iounmap(a) __iop3xx_iounmap(a) | ||
21 | 27 | ||
22 | #endif | 28 | #endif |
diff --git a/include/asm-arm/arch-iop32x/time.h b/include/asm-arm/arch-iop32x/time.h new file mode 100644 index 000000000000..0f28c9949623 --- /dev/null +++ b/include/asm-arm/arch-iop32x/time.h | |||
@@ -0,0 +1,4 @@ | |||
1 | #ifndef _IOP32X_TIME_H_ | ||
2 | #define _IOP32X_TIME_H_ | ||
3 | #define IRQ_IOP_TIMER0 IRQ_IOP32X_TIMER0 | ||
4 | #endif | ||
diff --git a/include/asm-arm/arch-iop33x/entry-macro.S b/include/asm-arm/arch-iop33x/entry-macro.S index 92b791702e34..b8e3d449e882 100644 --- a/include/asm-arm/arch-iop33x/entry-macro.S +++ b/include/asm-arm/arch-iop33x/entry-macro.S | |||
@@ -9,14 +9,29 @@ | |||
9 | */ | 9 | */ |
10 | #include <asm/arch/iop33x.h> | 10 | #include <asm/arch/iop33x.h> |
11 | 11 | ||
12 | .macro disable_fiq | 12 | .macro disable_fiq |
13 | .endm | 13 | .endm |
14 | 14 | ||
15 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 15 | .macro get_irqnr_preamble, base, tmp |
16 | ldr \base, =IOP3XX_REG_ADDR(0x07C8) | 16 | mrc p15, 0, \tmp, c15, c1, 0 |
17 | ldr \irqstat, [\base] @ Read IINTVEC | 17 | orr \tmp, \tmp, #(1 << 6) |
18 | cmp \irqstat, #0 | 18 | mcr p15, 0, \tmp, c15, c1, 0 @ Enable cp6 access |
19 | ldreq \irqstat, [\base] @ erratum 63 workaround | 19 | mrc p15, 0, \tmp, c15, c1, 0 |
20 | adds \irqnr, \irqstat, #1 | 20 | mov \tmp, \tmp |
21 | movne \irqnr, \irqstat, lsr #2 | 21 | sub pc, pc, #4 @ cp_wait |
22 | .endm | 22 | .endm |
23 | |||
24 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
25 | mrc p6, 0, \irqstat, c14, c0, 0 @ Read IINTVEC | ||
26 | cmp \irqstat, #0 | ||
27 | mrceq p6, 0, \irqstat, c14, c0, 0 @ erratum 63 workaround | ||
28 | adds \irqnr, \irqstat, #1 | ||
29 | movne \irqnr, \irqstat, lsr #2 | ||
30 | .endm | ||
31 | |||
32 | .macro arch_ret_to_user, tmp1, tmp2 | ||
33 | mrc p15, 0, \tmp1, c15, c1, 0 | ||
34 | ands \tmp2, \tmp1, #(1 << 6) | ||
35 | bicne \tmp1, \tmp1, #(1 << 6) | ||
36 | mcrne p15, 0, \tmp1, c15, c1, 0 @ Disable cp6 access | ||
37 | .endm | ||
diff --git a/include/asm-arm/arch-iop33x/io.h b/include/asm-arm/arch-iop33x/io.h index c017402bab96..1bb5071e1fa8 100644 --- a/include/asm-arm/arch-iop33x/io.h +++ b/include/asm-arm/arch-iop33x/io.h | |||
@@ -13,9 +13,16 @@ | |||
13 | 13 | ||
14 | #include <asm/hardware.h> | 14 | #include <asm/hardware.h> |
15 | 15 | ||
16 | extern void __iomem * __ioremap(unsigned long, size_t, unsigned long); | ||
17 | extern void __iomem *__iop3xx_ioremap(unsigned long cookie, size_t size, | ||
18 | unsigned long flags); | ||
19 | extern void __iop3xx_iounmap(void __iomem *addr); | ||
20 | |||
16 | #define IO_SPACE_LIMIT 0xffffffff | 21 | #define IO_SPACE_LIMIT 0xffffffff |
17 | #define __io(p) ((void __iomem *)(p)) | 22 | #define __io(p) ((void __iomem *)IOP3XX_PCI_IO_PHYS_TO_VIRT(p)) |
18 | #define __mem_pci(a) (a) | 23 | #define __mem_pci(a) (a) |
19 | 24 | ||
25 | #define __arch_ioremap(a, s, f) __iop3xx_ioremap(a, s, f) | ||
26 | #define __arch_iounmap(a) __iop3xx_iounmap(a) | ||
20 | 27 | ||
21 | #endif | 28 | #endif |
diff --git a/include/asm-arm/arch-iop33x/time.h b/include/asm-arm/arch-iop33x/time.h new file mode 100644 index 000000000000..4ac4d7664f85 --- /dev/null +++ b/include/asm-arm/arch-iop33x/time.h | |||
@@ -0,0 +1,4 @@ | |||
1 | #ifndef _IOP33X_TIME_H_ | ||
2 | #define _IOP33X_TIME_H_ | ||
3 | #define IRQ_IOP_TIMER0 IRQ_IOP33X_TIMER0 | ||
4 | #endif | ||
diff --git a/include/asm-arm/arch-ixp2000/entry-macro.S b/include/asm-arm/arch-ixp2000/entry-macro.S index 16e1e6124b31..11d512ad5945 100644 --- a/include/asm-arm/arch-ixp2000/entry-macro.S +++ b/include/asm-arm/arch-ixp2000/entry-macro.S | |||
@@ -12,6 +12,12 @@ | |||
12 | .macro disable_fiq | 12 | .macro disable_fiq |
13 | .endm | 13 | .endm |
14 | 14 | ||
15 | .macro get_irqnr_preamble, base, tmp | ||
16 | .endm | ||
17 | |||
18 | .macro arch_ret_to_user, tmp1, tmp2 | ||
19 | .endm | ||
20 | |||
15 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 21 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
16 | 22 | ||
17 | mov \irqnr, #0x0 @clear out irqnr as default | 23 | mov \irqnr, #0x0 @clear out irqnr as default |
diff --git a/include/asm-arm/arch-ixp23xx/entry-macro.S b/include/asm-arm/arch-ixp23xx/entry-macro.S index 867761677b57..ec9dd6fc2d0f 100644 --- a/include/asm-arm/arch-ixp23xx/entry-macro.S +++ b/include/asm-arm/arch-ixp23xx/entry-macro.S | |||
@@ -5,6 +5,12 @@ | |||
5 | .macro disable_fiq | 5 | .macro disable_fiq |
6 | .endm | 6 | .endm |
7 | 7 | ||
8 | .macro get_irqnr_preamble, base, tmp | ||
9 | .endm | ||
10 | |||
11 | .macro arch_ret_to_user, tmp1, tmp2 | ||
12 | .endm | ||
13 | |||
8 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 14 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
9 | ldr \irqnr, =(IXP23XX_INTC_VIRT + IXP23XX_INTR_IRQ_ENC_ST_OFFSET) | 15 | ldr \irqnr, =(IXP23XX_INTC_VIRT + IXP23XX_INTR_IRQ_ENC_ST_OFFSET) |
10 | ldr \irqnr, [\irqnr] @ get interrupt number | 16 | ldr \irqnr, [\irqnr] @ get interrupt number |
diff --git a/include/asm-arm/arch-ixp23xx/ixdp2351.h b/include/asm-arm/arch-ixp23xx/ixdp2351.h index 4a24f8f15655..d5e8a43d7bbd 100644 --- a/include/asm-arm/arch-ixp23xx/ixdp2351.h +++ b/include/asm-arm/arch-ixp23xx/ixdp2351.h | |||
@@ -46,7 +46,7 @@ | |||
46 | #define IXDP2351_VIRT_NVRAM_BASE IXDP2351_BB_AREA_BASE(0x0) | 46 | #define IXDP2351_VIRT_NVRAM_BASE IXDP2351_BB_AREA_BASE(0x0) |
47 | #define IXDP2351_NVRAM_SIZE (0x20000) | 47 | #define IXDP2351_NVRAM_SIZE (0x20000) |
48 | 48 | ||
49 | #define IXDP2351_VIRT_MB_IXF1104_BASE IXDP3251_BB_AREA_BASE(0x00020000) | 49 | #define IXDP2351_VIRT_MB_IXF1104_BASE IXDP2351_BB_AREA_BASE(0x00020000) |
50 | #define IXDP2351_VIRT_ADD_UART_BASE IXDP2351_BB_AREA_BASE(0x000240C0) | 50 | #define IXDP2351_VIRT_ADD_UART_BASE IXDP2351_BB_AREA_BASE(0x000240C0) |
51 | #define IXDP2351_VIRT_FIC_BASE IXDP2351_BB_AREA_BASE(0x00200000) | 51 | #define IXDP2351_VIRT_FIC_BASE IXDP2351_BB_AREA_BASE(0x00200000) |
52 | #define IXDP2351_VIRT_DB0_BASE IXDP2351_BB_AREA_BASE(0x00400000) | 52 | #define IXDP2351_VIRT_DB0_BASE IXDP2351_BB_AREA_BASE(0x00400000) |
diff --git a/include/asm-arm/arch-ixp4xx/avila.h b/include/asm-arm/arch-ixp4xx/avila.h new file mode 100644 index 000000000000..0dfea0ccd6ba --- /dev/null +++ b/include/asm-arm/arch-ixp4xx/avila.h | |||
@@ -0,0 +1,39 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ixp4xx/avila.h | ||
3 | * | ||
4 | * Gateworks Avila platform specific definitions | ||
5 | * | ||
6 | * Author: Michael-Luke Jones <mlj28@cam.ac.uk> | ||
7 | * | ||
8 | * Based on ixdp425.h | ||
9 | * Author: Deepak Saxena <dsaxena@plexity.net> | ||
10 | * | ||
11 | * Copyright 2004 (c) MontaVista, Software, Inc. | ||
12 | * | ||
13 | * This file is licensed under the terms of the GNU General Public | ||
14 | * License version 2. This program is licensed "as is" without any | ||
15 | * warranty of any kind, whether express or implied. | ||
16 | */ | ||
17 | |||
18 | #ifndef __ASM_ARCH_HARDWARE_H__ | ||
19 | #error "Do not include this directly, instead #include <asm/hardware.h>" | ||
20 | #endif | ||
21 | |||
22 | #define AVILA_SDA_PIN 7 | ||
23 | #define AVILA_SCL_PIN 6 | ||
24 | |||
25 | /* | ||
26 | * AVILA PCI IRQs | ||
27 | */ | ||
28 | #define AVILA_PCI_MAX_DEV 4 | ||
29 | #define LOFT_PCI_MAX_DEV 6 | ||
30 | #define AVILA_PCI_IRQ_LINES 4 | ||
31 | |||
32 | |||
33 | /* PCI controller GPIO to IRQ pin mappings */ | ||
34 | #define AVILA_PCI_INTA_PIN 11 | ||
35 | #define AVILA_PCI_INTB_PIN 10 | ||
36 | #define AVILA_PCI_INTC_PIN 9 | ||
37 | #define AVILA_PCI_INTD_PIN 8 | ||
38 | |||
39 | |||
diff --git a/include/asm-arm/arch-ixp4xx/entry-macro.S b/include/asm-arm/arch-ixp4xx/entry-macro.S index 27e124132e4c..dadb568b7ef0 100644 --- a/include/asm-arm/arch-ixp4xx/entry-macro.S +++ b/include/asm-arm/arch-ixp4xx/entry-macro.S | |||
@@ -12,6 +12,12 @@ | |||
12 | .macro disable_fiq | 12 | .macro disable_fiq |
13 | .endm | 13 | .endm |
14 | 14 | ||
15 | .macro get_irqnr_preamble, base, tmp | ||
16 | .endm | ||
17 | |||
18 | .macro arch_ret_to_user, tmp1, tmp2 | ||
19 | .endm | ||
20 | |||
15 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 21 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
16 | ldr \irqstat, =(IXP4XX_INTC_BASE_VIRT+IXP4XX_ICIP_OFFSET) | 22 | ldr \irqstat, =(IXP4XX_INTC_BASE_VIRT+IXP4XX_ICIP_OFFSET) |
17 | ldr \irqstat, [\irqstat] @ get interrupts | 23 | ldr \irqstat, [\irqstat] @ get interrupts |
diff --git a/include/asm-arm/arch-ixp4xx/hardware.h b/include/asm-arm/arch-ixp4xx/hardware.h index 6acb69c95ef9..88fd0877dcc1 100644 --- a/include/asm-arm/arch-ixp4xx/hardware.h +++ b/include/asm-arm/arch-ixp4xx/hardware.h | |||
@@ -42,6 +42,7 @@ extern unsigned int processor_id; | |||
42 | 42 | ||
43 | /* Platform specific details */ | 43 | /* Platform specific details */ |
44 | #include "ixdp425.h" | 44 | #include "ixdp425.h" |
45 | #include "avila.h" | ||
45 | #include "coyote.h" | 46 | #include "coyote.h" |
46 | #include "prpmc1100.h" | 47 | #include "prpmc1100.h" |
47 | #include "nslu2.h" | 48 | #include "nslu2.h" |
diff --git a/include/asm-arm/arch-ixp4xx/irqs.h b/include/asm-arm/arch-ixp4xx/irqs.h index f24b763ca18e..e44a563d00ff 100644 --- a/include/asm-arm/arch-ixp4xx/irqs.h +++ b/include/asm-arm/arch-ixp4xx/irqs.h | |||
@@ -79,6 +79,15 @@ | |||
79 | #define IRQ_IXDP425_PCI_INTD IRQ_IXP4XX_GPIO8 | 79 | #define IRQ_IXDP425_PCI_INTD IRQ_IXP4XX_GPIO8 |
80 | 80 | ||
81 | /* | 81 | /* |
82 | * Gateworks Avila board IRQs | ||
83 | */ | ||
84 | #define IRQ_AVILA_PCI_INTA IRQ_IXP4XX_GPIO11 | ||
85 | #define IRQ_AVILA_PCI_INTB IRQ_IXP4XX_GPIO10 | ||
86 | #define IRQ_AVILA_PCI_INTC IRQ_IXP4XX_GPIO9 | ||
87 | #define IRQ_AVILA_PCI_INTD IRQ_IXP4XX_GPIO8 | ||
88 | |||
89 | |||
90 | /* | ||
82 | * PrPMC1100 Board IRQs | 91 | * PrPMC1100 Board IRQs |
83 | */ | 92 | */ |
84 | #define IRQ_PRPMC1100_PCI_INTA IRQ_IXP4XX_GPIO11 | 93 | #define IRQ_PRPMC1100_PCI_INTA IRQ_IXP4XX_GPIO11 |
diff --git a/include/asm-arm/arch-ixp4xx/udc.h b/include/asm-arm/arch-ixp4xx/udc.h index dbdec36ff0d1..79b850a3be47 100644 --- a/include/asm-arm/arch-ixp4xx/udc.h +++ b/include/asm-arm/arch-ixp4xx/udc.h | |||
@@ -6,3 +6,25 @@ | |||
6 | 6 | ||
7 | extern void ixp4xx_set_udc_info(struct pxa2xx_udc_mach_info *info); | 7 | extern void ixp4xx_set_udc_info(struct pxa2xx_udc_mach_info *info); |
8 | 8 | ||
9 | static inline int udc_gpio_to_irq(unsigned gpio) | ||
10 | { | ||
11 | return 0; | ||
12 | } | ||
13 | |||
14 | static inline void udc_gpio_init_vbus(unsigned gpio) | ||
15 | { | ||
16 | } | ||
17 | |||
18 | static inline void udc_gpio_init_pullup(unsigned gpio) | ||
19 | { | ||
20 | } | ||
21 | |||
22 | static inline int udc_gpio_get(unsigned gpio) | ||
23 | { | ||
24 | return 0; | ||
25 | } | ||
26 | |||
27 | static inline void udc_gpio_set(unsigned gpio, int is_on) | ||
28 | { | ||
29 | } | ||
30 | |||
diff --git a/include/asm-arm/arch-l7200/entry-macro.S b/include/asm-arm/arch-l7200/entry-macro.S index 8b6342dc4be2..63411d3e9df4 100644 --- a/include/asm-arm/arch-l7200/entry-macro.S +++ b/include/asm-arm/arch-l7200/entry-macro.S | |||
@@ -14,6 +14,12 @@ | |||
14 | .macro disable_fiq | 14 | .macro disable_fiq |
15 | .endm | 15 | .endm |
16 | 16 | ||
17 | .macro get_irqnr_preamble, base, tmp | ||
18 | .endm | ||
19 | |||
20 | .macro arch_ret_to_user, tmp1, tmp2 | ||
21 | .endm | ||
22 | |||
17 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 23 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
18 | mov \irqstat, #irq_base_addr @ Virt addr IRQ regs | 24 | mov \irqstat, #irq_base_addr @ Virt addr IRQ regs |
19 | add \irqstat, \irqstat, #0x00001000 @ Status reg | 25 | add \irqstat, \irqstat, #0x00001000 @ Status reg |
diff --git a/include/asm-arm/arch-lh7a40x/entry-macro.S b/include/asm-arm/arch-lh7a40x/entry-macro.S index 9fc7f4988124..502700604e00 100644 --- a/include/asm-arm/arch-lh7a40x/entry-macro.S +++ b/include/asm-arm/arch-lh7a40x/entry-macro.S | |||
@@ -26,6 +26,12 @@ | |||
26 | .macro disable_fiq | 26 | .macro disable_fiq |
27 | .endm | 27 | .endm |
28 | 28 | ||
29 | .macro get_irqnr_preamble, base, tmp | ||
30 | .endm | ||
31 | |||
32 | .macro arch_ret_to_user, tmp1, tmp2 | ||
33 | .endm | ||
34 | |||
29 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 35 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
30 | 36 | ||
31 | branch_irq_lh7a400: b 1000f | 37 | branch_irq_lh7a400: b 1000f |
diff --git a/include/asm-arm/arch-netx/entry-macro.S b/include/asm-arm/arch-netx/entry-macro.S index 658df4d60ff3..83ad188a0847 100644 --- a/include/asm-arm/arch-netx/entry-macro.S +++ b/include/asm-arm/arch-netx/entry-macro.S | |||
@@ -23,6 +23,12 @@ | |||
23 | .macro disable_fiq | 23 | .macro disable_fiq |
24 | .endm | 24 | .endm |
25 | 25 | ||
26 | .macro get_irqnr_preamble, base, tmp | ||
27 | .endm | ||
28 | |||
29 | .macro arch_ret_to_user, tmp1, tmp2 | ||
30 | .endm | ||
31 | |||
26 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 32 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
27 | mov \base, #io_p2v(0x00100000) | 33 | mov \base, #io_p2v(0x00100000) |
28 | add \base, \base, #0x000ff000 | 34 | add \base, \base, #0x000ff000 |
diff --git a/include/asm-arm/arch-ns9xxx/board.h b/include/asm-arm/arch-ns9xxx/board.h new file mode 100644 index 000000000000..91dc8fb1027f --- /dev/null +++ b/include/asm-arm/arch-ns9xxx/board.h | |||
@@ -0,0 +1,18 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ns9xxx/board.h | ||
3 | * | ||
4 | * Copyright (C) 2006 by Digi International Inc. | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_BOARD_H | ||
12 | #define __ASM_ARCH_BOARD_H | ||
13 | |||
14 | #include <asm/mach-types.h> | ||
15 | |||
16 | #define board_is_a9m9750dev() (machine_is_cc9p9360dev()) | ||
17 | |||
18 | #endif /* ifndef __ASM_ARCH_BOARD_H */ | ||
diff --git a/include/asm-arm/arch-ns9xxx/clock.h b/include/asm-arm/arch-ns9xxx/clock.h new file mode 100644 index 000000000000..4371a485db47 --- /dev/null +++ b/include/asm-arm/arch-ns9xxx/clock.h | |||
@@ -0,0 +1,37 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ns9xxx/clock.h | ||
3 | * | ||
4 | * Copyright (C) 2007 by Digi International Inc. | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_CLOCK_H | ||
12 | #define __ASM_ARCH_CLOCK_H | ||
13 | |||
14 | static inline u32 ns9xxx_systemclock(void) | ||
15 | { | ||
16 | /* | ||
17 | * This should be a multiple of HZ * TIMERCLOCKSELECT (in time.c) | ||
18 | */ | ||
19 | return 353894400; | ||
20 | } | ||
21 | |||
22 | static inline const u32 ns9xxx_cpuclock(void) | ||
23 | { | ||
24 | return ns9xxx_systemclock() / 2; | ||
25 | } | ||
26 | |||
27 | static inline const u32 ns9xxx_ahbclock(void) | ||
28 | { | ||
29 | return ns9xxx_systemclock() / 4; | ||
30 | } | ||
31 | |||
32 | static inline const u32 ns9xxx_bbusclock(void) | ||
33 | { | ||
34 | return ns9xxx_systemclock() / 8; | ||
35 | } | ||
36 | |||
37 | #endif /* ifndef __ASM_ARCH_CLOCK_H */ | ||
diff --git a/include/asm-arm/arch-ns9xxx/debug-macro.S b/include/asm-arm/arch-ns9xxx/debug-macro.S new file mode 100644 index 000000000000..b21b93eb2dbc --- /dev/null +++ b/include/asm-arm/arch-ns9xxx/debug-macro.S | |||
@@ -0,0 +1,22 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ns9xxx/debug-macro.S | ||
3 | * Copyright (C) 2006 by Digi International Inc. | ||
4 | * All rights reserved. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License version 2 as published by | ||
8 | * the Free Software Foundation. | ||
9 | */ | ||
10 | #include <asm/hardware.h> | ||
11 | |||
12 | #include <asm/arch-ns9xxx/regs-board-a9m9750dev.h> | ||
13 | |||
14 | .macro addruart,rx | ||
15 | mrc p15, 0, \rx, c1, c0 | ||
16 | tst \rx, #1 | ||
17 | ldreq \rx, =NS9XXX_CSxSTAT_PHYS(0) | ||
18 | ldrne \rx, =io_p2v(NS9XXX_CSxSTAT_PHYS(0)) | ||
19 | .endm | ||
20 | |||
21 | #define UART_SHIFT 2 | ||
22 | #include <asm/hardware/debug-8250.S> | ||
diff --git a/include/asm-arm/arch-ns9xxx/dma.h b/include/asm-arm/arch-ns9xxx/dma.h new file mode 100644 index 000000000000..a67cbbe009c4 --- /dev/null +++ b/include/asm-arm/arch-ns9xxx/dma.h | |||
@@ -0,0 +1,14 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ns9xxx/dma.h | ||
3 | * | ||
4 | * Copyright (C) 2006 by Digi International Inc. | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_DMA_H | ||
12 | #define __ASM_ARCH_DMA_H | ||
13 | |||
14 | #endif /* ifndef __ASM_ARCH_DMA_H */ | ||
diff --git a/include/asm-arm/arch-ns9xxx/entry-macro.S b/include/asm-arm/arch-ns9xxx/entry-macro.S new file mode 100644 index 000000000000..86aec87303e4 --- /dev/null +++ b/include/asm-arm/arch-ns9xxx/entry-macro.S | |||
@@ -0,0 +1,28 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ns9xxx/entry-macro.S | ||
3 | * | ||
4 | * Copyright (C) 2006 by Digi International Inc. | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #include <asm/hardware.h> | ||
12 | #include <asm/arch-ns9xxx/regs-sys.h> | ||
13 | |||
14 | .macro get_irqnr_preamble, base, tmp | ||
15 | .endm | ||
16 | |||
17 | .macro arch_ret_to_user, tmp1, tmp2 | ||
18 | .endm | ||
19 | |||
20 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
21 | ldr \base, =SYS_ISRADDR | ||
22 | ldr \irqstat, [\base, #(SYS_ISA - SYS_ISRADDR)] | ||
23 | cmp \irqstat, #0 | ||
24 | ldrne \irqnr, [\base] | ||
25 | .endm | ||
26 | |||
27 | .macro disable_fiq | ||
28 | .endm | ||
diff --git a/include/asm-arm/arch-ns9xxx/hardware.h b/include/asm-arm/arch-ns9xxx/hardware.h new file mode 100644 index 000000000000..6819da7c48d4 --- /dev/null +++ b/include/asm-arm/arch-ns9xxx/hardware.h | |||
@@ -0,0 +1,67 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ns9xxx/hardware.h | ||
3 | * | ||
4 | * Copyright (C) 2006 by Digi International Inc. | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_HARDWARE_H | ||
12 | #define __ASM_ARCH_HARDWARE_H | ||
13 | |||
14 | #include <asm/memory.h> | ||
15 | |||
16 | /* | ||
17 | * NetSilicon NS9xxx internal mapping: | ||
18 | * | ||
19 | * physical <--> virtual | ||
20 | * 0x90000000 - 0x906fffff <--> 0xf9000000 - 0xf96fffff | ||
21 | * 0xa0100000 - 0xa0afffff <--> 0xfa100000 - 0xfaafffff | ||
22 | */ | ||
23 | #define io_p2v(x) (0xf0000000 \ | ||
24 | + (((x) & 0xf0000000) >> 4) \ | ||
25 | + ((x) & 0x00ffffff)) | ||
26 | |||
27 | #define io_v2p(x) ((((x) & 0x0f000000) << 4) \ | ||
28 | + ((x) & 0x00ffffff)) | ||
29 | |||
30 | #define __REGBIT(bit) ((u32)1 << (bit)) | ||
31 | #define __REGBITS(hbit, lbit) ((((u32)1 << ((hbit) - (lbit) + 1)) - 1) << (lbit)) | ||
32 | #define __REGVAL(mask, value) (((value) * ((mask) & (-(mask))) & (mask))) | ||
33 | |||
34 | #ifndef __ASSEMBLY__ | ||
35 | |||
36 | # define __REG(x) (*((volatile u32 *)io_p2v((x)))) | ||
37 | # define __REG2(x, y) (*((volatile u32 *)io_p2v((x)) + (y))) | ||
38 | |||
39 | # define __REGB(x) (*((volatile u8 *)io_p2v((x)))) | ||
40 | # define __REGB2(x) (*((volatile u8 *)io_p2v((x)) + (y))) | ||
41 | |||
42 | # define REGSET(var, reg, field, value) \ | ||
43 | ((var) = (((var) \ | ||
44 | & ~(reg ## _ ## field & \ | ||
45 | ~ reg ## _ ## field ## _ ## value)) \ | ||
46 | | (reg ## _ ## field ## _ ## value))) | ||
47 | |||
48 | # define REGSETIM(var, reg, field, value) \ | ||
49 | ((var) = (((var) \ | ||
50 | & ~(reg ## _ ## field & \ | ||
51 | ~(__REGVAL(reg ## _ ## field, value)))) \ | ||
52 | | (__REGVAL(reg ## _ ## field, value)))) | ||
53 | |||
54 | # define REGGET(reg, field) \ | ||
55 | ((reg & (reg ## _ ## field)) / (field & (-field))) | ||
56 | |||
57 | #else | ||
58 | |||
59 | # define __REG(x) io_p2v(x) | ||
60 | # define __REG2(x, y) io_p2v((x) + (y)) | ||
61 | |||
62 | # define __REGB(x) __REG((x)) | ||
63 | # define __REGB2(x, y) __REG2((x), (y)) | ||
64 | |||
65 | #endif | ||
66 | |||
67 | #endif /* ifndef __ASM_ARCH_HARDWARE_H */ | ||
diff --git a/include/asm-arm/arch-ns9xxx/io.h b/include/asm-arm/arch-ns9xxx/io.h new file mode 100644 index 000000000000..6f82d28af120 --- /dev/null +++ b/include/asm-arm/arch-ns9xxx/io.h | |||
@@ -0,0 +1,20 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ns9xxx/io.h | ||
3 | * | ||
4 | * Copyright (C) 2006 by Digi International Inc. | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_IO_H | ||
12 | #define __ASM_ARCH_IO_H | ||
13 | |||
14 | #define IO_SPACE_LIMIT 0xffffffff /* XXX */ | ||
15 | |||
16 | #define __io(a) ((void __iomem *)(a)) | ||
17 | #define __mem_pci(a) (a) | ||
18 | #define __mem_isa(a) (IO_BASE + (a)) | ||
19 | |||
20 | #endif /* ifndef __ASM_ARCH_IO_H */ | ||
diff --git a/include/asm-arm/arch-ns9xxx/irqs.h b/include/asm-arm/arch-ns9xxx/irqs.h new file mode 100644 index 000000000000..25d8d28b27f3 --- /dev/null +++ b/include/asm-arm/arch-ns9xxx/irqs.h | |||
@@ -0,0 +1,85 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ns9xxx/irqs.h | ||
3 | * | ||
4 | * Copyright (C) 2006 by Digi International Inc. | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_IRQS_H | ||
12 | #define __ASM_ARCH_IRQS_H | ||
13 | |||
14 | #define IRQ_WATCHDOG 0 | ||
15 | #define IRQ_AHBBUSERR 1 | ||
16 | #define IRQ_BBUSAGG 2 | ||
17 | /* irq 3 is reserved for NS9360 */ | ||
18 | #define IRQ_ETHRX 4 | ||
19 | #define IRQ_ETHTX 5 | ||
20 | #define IRQ_ETHPHY 6 | ||
21 | #define IRQ_LCD 7 | ||
22 | #define IRQ_SERBRX 8 | ||
23 | #define IRQ_SERBTX 9 | ||
24 | #define IRQ_SERARX 10 | ||
25 | #define IRQ_SERATX 11 | ||
26 | #define IRQ_SERCRX 12 | ||
27 | #define IRQ_SERCTX 13 | ||
28 | #define IRQ_I2C 14 | ||
29 | #define IRQ_BBUSDMA 15 | ||
30 | #define IRQ_TIMER0 16 | ||
31 | #define IRQ_TIMER1 17 | ||
32 | #define IRQ_TIMER2 18 | ||
33 | #define IRQ_TIMER3 19 | ||
34 | #define IRQ_TIMER4 20 | ||
35 | #define IRQ_TIMER5 21 | ||
36 | #define IRQ_TIMER6 22 | ||
37 | #define IRQ_TIMER7 23 | ||
38 | #define IRQ_RTC 24 | ||
39 | #define IRQ_USBHOST 25 | ||
40 | #define IRQ_USBDEVICE 26 | ||
41 | #define IRQ_IEEE1284 27 | ||
42 | #define IRQ_EXT0 28 | ||
43 | #define IRQ_EXT1 29 | ||
44 | #define IRQ_EXT2 30 | ||
45 | #define IRQ_EXT3 31 | ||
46 | |||
47 | #define BBUS_IRQ(irq) (32 + irq) | ||
48 | |||
49 | #define IRQ_BBUS_DMA BBUS_IRQ(0) | ||
50 | #define IRQ_BBUS_SERBRX BBUS_IRQ(2) | ||
51 | #define IRQ_BBUS_SERBTX BBUS_IRQ(3) | ||
52 | #define IRQ_BBUS_SERARX BBUS_IRQ(4) | ||
53 | #define IRQ_BBUS_SERATX BBUS_IRQ(5) | ||
54 | #define IRQ_BBUS_SERCRX BBUS_IRQ(6) | ||
55 | #define IRQ_BBUS_SERCTX BBUS_IRQ(7) | ||
56 | #define IRQ_BBUS_SERDRX BBUS_IRQ(8) | ||
57 | #define IRQ_BBUS_SERDTX BBUS_IRQ(9) | ||
58 | #define IRQ_BBUS_I2C BBUS_IRQ(10) | ||
59 | #define IRQ_BBUS_1284 BBUS_IRQ(11) | ||
60 | #define IRQ_BBUS_UTIL BBUS_IRQ(12) | ||
61 | #define IRQ_BBUS_RTC BBUS_IRQ(13) | ||
62 | #define IRQ_BBUS_USBHST BBUS_IRQ(14) | ||
63 | #define IRQ_BBUS_USBDEV BBUS_IRQ(15) | ||
64 | #define IRQ_BBUS_AHBDMA1 BBUS_IRQ(24) | ||
65 | #define IRQ_BBUS_AHBDMA2 BBUS_IRQ(25) | ||
66 | |||
67 | /* | ||
68 | * these Interrupts are specific for the a9m9750dev board. | ||
69 | * They are generated by an FPGA that interrupts the CPU on | ||
70 | * IRQ_EXT2 | ||
71 | */ | ||
72 | #define FPGA_IRQ(irq) (64 + irq) | ||
73 | |||
74 | #define IRQ_FPGA_UARTA FPGA_IRQ(0) | ||
75 | #define IRQ_FPGA_UARTB FPGA_IRQ(1) | ||
76 | #define IRQ_FPGA_UARTC FPGA_IRQ(2) | ||
77 | #define IRQ_FPGA_UARTD FPGA_IRQ(3) | ||
78 | #define IRQ_FPGA_TOUCH FPGA_IRQ(4) | ||
79 | #define IRQ_FPGA_CF FPGA_IRQ(5) | ||
80 | #define IRQ_FPGA_CAN0 FPGA_IRQ(6) | ||
81 | #define IRQ_FPGA_CAN1 FPGA_IRQ(7) | ||
82 | |||
83 | #define NR_IRQS 72 | ||
84 | |||
85 | #endif /* __ASM_ARCH_IRQS_H */ | ||
diff --git a/include/asm-arm/arch-ns9xxx/memory.h b/include/asm-arm/arch-ns9xxx/memory.h new file mode 100644 index 000000000000..ce1343e593e1 --- /dev/null +++ b/include/asm-arm/arch-ns9xxx/memory.h | |||
@@ -0,0 +1,27 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ns9xxx/memory.h | ||
3 | * | ||
4 | * Copyright (C) 2006 by Digi International Inc. | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_MEMORY_H | ||
12 | #define __ASM_ARCH_MEMORY_H | ||
13 | |||
14 | /* x in [0..3] */ | ||
15 | #define NS9XXX_CSxSTAT_PHYS(x) UL(((x) + 4) << 28) | ||
16 | |||
17 | #define NS9XXX_CS0STAT_LENGTH UL(0x1000) | ||
18 | #define NS9XXX_CS1STAT_LENGTH UL(0x1000) | ||
19 | #define NS9XXX_CS2STAT_LENGTH UL(0x1000) | ||
20 | #define NS9XXX_CS3STAT_LENGTH UL(0x1000) | ||
21 | |||
22 | #define PHYS_OFFSET UL(0x00000000) | ||
23 | |||
24 | #define __virt_to_bus(x) __virt_to_phys(x) | ||
25 | #define __bus_to_virt(x) __phys_to_virt(x) | ||
26 | |||
27 | #endif | ||
diff --git a/include/asm-arm/arch-ns9xxx/processor.h b/include/asm-arm/arch-ns9xxx/processor.h new file mode 100644 index 000000000000..716c106ac0bf --- /dev/null +++ b/include/asm-arm/arch-ns9xxx/processor.h | |||
@@ -0,0 +1,18 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ns9xxx/processor.h | ||
3 | * | ||
4 | * Copyright (C) 2006 by Digi International Inc. | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_PROCESSOR_H | ||
12 | #define __ASM_ARCH_PROCESSOR_H | ||
13 | |||
14 | #include <asm/mach-types.h> | ||
15 | |||
16 | #define processor_is_ns9360() (machine_is_cc9p9360dev()) | ||
17 | |||
18 | #endif /* ifndef __ASM_ARCH_PROCESSOR_H */ | ||
diff --git a/include/asm-arm/arch-ns9xxx/regs-bbu.h b/include/asm-arm/arch-ns9xxx/regs-bbu.h new file mode 100644 index 000000000000..e26269546240 --- /dev/null +++ b/include/asm-arm/arch-ns9xxx/regs-bbu.h | |||
@@ -0,0 +1,21 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ns9xxx/regs-bbu.h | ||
3 | * | ||
4 | * Copyright (C) 2006 by Digi International Inc. | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_REGSBBU_H | ||
12 | #define __ASM_ARCH_REGSBBU_H | ||
13 | |||
14 | #include <asm/hardware.h> | ||
15 | |||
16 | /* BBus Utility */ | ||
17 | |||
18 | /* GPIO Configuration Register */ | ||
19 | #define BBU_GC(x) __REG2(0x9060000c, (x)) | ||
20 | |||
21 | #endif /* ifndef __ASM_ARCH_REGSBBU_H */ | ||
diff --git a/include/asm-arm/arch-ns9xxx/regs-board-a9m9750dev.h b/include/asm-arm/arch-ns9xxx/regs-board-a9m9750dev.h new file mode 100644 index 000000000000..c3dc532dd20c --- /dev/null +++ b/include/asm-arm/arch-ns9xxx/regs-board-a9m9750dev.h | |||
@@ -0,0 +1,24 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ns9xxx/regs-board-a9m9750dev.h | ||
3 | * | ||
4 | * Copyright (C) 2006 by Digi International Inc. | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_REGSBOARDA9M9750_H | ||
12 | #define __ASM_ARCH_REGSBOARDA9M9750_H | ||
13 | |||
14 | #include <asm/hardware.h> | ||
15 | |||
16 | #define FPGA_UARTA_BASE io_p2v(NS9XXX_CSxSTAT_PHYS(0)) | ||
17 | #define FPGA_UARTB_BASE io_p2v(NS9XXX_CSxSTAT_PHYS(0) + 0x08) | ||
18 | #define FPGA_UARTC_BASE io_p2v(NS9XXX_CSxSTAT_PHYS(0) + 0x10) | ||
19 | #define FPGA_UARTD_BASE io_p2v(NS9XXX_CSxSTAT_PHYS(0) + 0x18) | ||
20 | |||
21 | #define FPGA_IER __REGB(NS9XXX_CSxSTAT_PHYS(0) + 0x50) | ||
22 | #define FPGA_ISR __REGB(NS9XXX_CSxSTAT_PHYS(0) + 0x60) | ||
23 | |||
24 | #endif /* ifndef __ASM_ARCH_REGSBOARDA9M9750_H */ | ||
diff --git a/include/asm-arm/arch-ns9xxx/regs-mem.h b/include/asm-arm/arch-ns9xxx/regs-mem.h new file mode 100644 index 000000000000..8ed8448767b9 --- /dev/null +++ b/include/asm-arm/arch-ns9xxx/regs-mem.h | |||
@@ -0,0 +1,135 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ns9xxx/regs-mem.h | ||
3 | * | ||
4 | * Copyright (C) 2006 by Digi International Inc. | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_REGSMEM_H | ||
12 | #define __ASM_ARCH_REGSMEM_H | ||
13 | |||
14 | #include <asm/hardware.h> | ||
15 | |||
16 | /* Memory Module */ | ||
17 | |||
18 | /* Control register */ | ||
19 | #define MEM_CTRL __REG(0xa0700000) | ||
20 | |||
21 | /* Status register */ | ||
22 | #define MEM_STAT __REG(0xa0700004) | ||
23 | |||
24 | /* Configuration register */ | ||
25 | #define MEM_CONF __REG(0xa0700008) | ||
26 | |||
27 | /* Dynamic Memory Control register */ | ||
28 | #define MEM_DMCTRL __REG(0xa0700020) | ||
29 | |||
30 | /* Dynamic Memory Refresh Timer */ | ||
31 | #define MEM_DMRT __REG(0xa0700024) | ||
32 | |||
33 | /* Dynamic Memory Read Configuration register */ | ||
34 | #define MEM_DMRC __REG(0xa0700028) | ||
35 | |||
36 | /* Dynamic Memory Precharge Command Period (tRP) */ | ||
37 | #define MEM_DMPCP __REG(0xa0700030) | ||
38 | |||
39 | /* Dynamic Memory Active to Precharge Command Period (tRAS) */ | ||
40 | #define MEM_DMAPCP __REG(0xa0700034) | ||
41 | |||
42 | /* Dynamic Memory Self-Refresh Exit Time (tSREX) */ | ||
43 | #define MEM_DMSRET __REG(0xa0700038) | ||
44 | |||
45 | /* Dynamic Memory Last Data Out to Active Time (tAPR) */ | ||
46 | #define MEM_DMLDOAT __REG(0xa070003c) | ||
47 | |||
48 | /* Dynamic Memory Data-in to Active Command Time (tDAL or TAPW) */ | ||
49 | #define MEM_DMDIACT __REG(0xa0700040) | ||
50 | |||
51 | /* Dynamic Memory Write Recovery Time (tWR, tDPL, tRWL, tRDL) */ | ||
52 | #define MEM_DMWRT __REG(0xa0700044) | ||
53 | |||
54 | /* Dynamic Memory Active to Active Command Period (tRC) */ | ||
55 | #define MEM_DMAACP __REG(0xa0700048) | ||
56 | |||
57 | /* Dynamic Memory Auto Refresh Period, and Auto Refresh to Active Command Period (tRFC) */ | ||
58 | #define MEM_DMARP __REG(0xa070004c) | ||
59 | |||
60 | /* Dynamic Memory Exit Self-Refresh to Active Command (tXSR) */ | ||
61 | #define MEM_DMESRAC __REG(0xa0700050) | ||
62 | |||
63 | /* Dynamic Memory Active Bank A to Active B Time (tRRD) */ | ||
64 | #define MEM_DMABAABT __REG(0xa0700054) | ||
65 | |||
66 | /* Dynamic Memory Load Mode register to Active Command Time (tMRD) */ | ||
67 | #define MEM_DMLMACT __REG(0xa0700058) | ||
68 | |||
69 | /* Static Memory Extended Wait */ | ||
70 | #define MEM_SMEW __REG(0xa0700080) | ||
71 | |||
72 | /* Dynamic Memory Configuration Register x */ | ||
73 | #define MEM_DMCONF(x) __REG2(0xa0700100, (x) << 3) | ||
74 | |||
75 | /* Dynamic Memory RAS and CAS Delay x */ | ||
76 | #define MEM_DMRCD(x) __REG2(0xa0700104, (x) << 3) | ||
77 | |||
78 | /* Static Memory Configuration Register x */ | ||
79 | #define MEM_SMC(x) __REG2(0xa0700200, (x) << 3) | ||
80 | |||
81 | /* Static Memory Configuration Register x: Write protect */ | ||
82 | #define MEM_SMC_WSMC __REGBIT(20) | ||
83 | #define MEM_SMC_WSMC_OFF __REGVAL(MEM_SMC_WSMC, 0) | ||
84 | #define MEM_SMC_WSMC_ON __REGVAL(MEM_SMC_WSMC, 1) | ||
85 | |||
86 | /* Static Memory Configuration Register x: Buffer enable */ | ||
87 | #define MEM_SMC_BSMC __REGBIT(19) | ||
88 | #define MEM_SMC_BSMC_OFF __REGVAL(MEM_SMC_BSMC, 0) | ||
89 | #define MEM_SMC_BSMC_ON __REGVAL(MEM_SMC_BSMC, 1) | ||
90 | |||
91 | /* Static Memory Configuration Register x: Extended Wait */ | ||
92 | #define MEM_SMC_EW __REGBIT(8) | ||
93 | #define MEM_SMC_EW_OFF __REGVAL(MEM_SMC_EW, 0) | ||
94 | #define MEM_SMC_EW_ON __REGVAL(MEM_SMC_EW, 1) | ||
95 | |||
96 | /* Static Memory Configuration Register x: Byte lane state */ | ||
97 | #define MEM_SMC_PB __REGBIT(7) | ||
98 | #define MEM_SMC_PB_0 __REGVAL(MEM_SMC_PB, 0) | ||
99 | #define MEM_SMC_PB_1 __REGVAL(MEM_SMC_PB, 1) | ||
100 | |||
101 | /* Static Memory Configuration Register x: Chip select polarity */ | ||
102 | #define MEM_SMC_PC __REGBIT(6) | ||
103 | #define MEM_SMC_PC_AL __REGVAL(MEM_SMC_PC, 0) | ||
104 | #define MEM_SMC_PC_AH __REGVAL(MEM_SMC_PC, 1) | ||
105 | |||
106 | /* static memory configuration register x: page mode*/ | ||
107 | #define MEM_SMC_PM __REGBIT(3) | ||
108 | #define MEM_SMC_PM_DIS __REGVAL(MEM_SMC_PM, 0) | ||
109 | #define MEM_SMC_PM_ASYNC __REGVAL(MEM_SMC_PM, 1) | ||
110 | |||
111 | /* static memory configuration register x: Memory width */ | ||
112 | #define MEM_SMC_MW __REGBITS(1, 0) | ||
113 | #define MEM_SMC_MW_8 __REGVAL(MEM_SMC_MW, 0) | ||
114 | #define MEM_SMC_MW_16 __REGVAL(MEM_SMC_MW, 1) | ||
115 | #define MEM_SMC_MW_32 __REGVAL(MEM_SMC_MW, 2) | ||
116 | |||
117 | /* Static Memory Write Enable Delay x */ | ||
118 | #define MEM_SMWED(x) __REG2(0xa0700204, (x) << 3) | ||
119 | |||
120 | /* Static Memory Output Enable Delay x */ | ||
121 | #define MEM_SMOED(x) __REG2(0xa0700208, (x) << 3) | ||
122 | |||
123 | /* Static Memory Read Delay x */ | ||
124 | #define MEM_SMRD(x) __REG2(0xa070020c, (x) << 3) | ||
125 | |||
126 | /* Static Memory Page Mode Read Delay 0 */ | ||
127 | #define MEM_SMPMRD(x) __REG2(0xa0700210, (x) << 3) | ||
128 | |||
129 | /* Static Memory Write Delay */ | ||
130 | #define MEM_SMWD(x) __REG2(0xa0700214, (x) << 3) | ||
131 | |||
132 | /* Static Memory Turn Round Delay x */ | ||
133 | #define MEM_SWT(x) __REG2(0xa0700218, (x) << 3) | ||
134 | |||
135 | #endif /* ifndef __ASM_ARCH_REGSMEM_H */ | ||
diff --git a/include/asm-arm/arch-ns9xxx/regs-sys.h b/include/asm-arm/arch-ns9xxx/regs-sys.h new file mode 100644 index 000000000000..8162a50bb273 --- /dev/null +++ b/include/asm-arm/arch-ns9xxx/regs-sys.h | |||
@@ -0,0 +1,157 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ns9xxx/regs-sys.h | ||
3 | * | ||
4 | * Copyright (C) 2006 by Digi International Inc. | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_REGSSYS_H | ||
12 | #define __ASM_ARCH_REGSSYS_H | ||
13 | |||
14 | #include <asm/hardware.h> | ||
15 | |||
16 | /* System Control Module */ | ||
17 | |||
18 | /* AHB Arbiter Gen Configuration */ | ||
19 | #define SYS_AHBAGENCONF __REG(0xa0900000) | ||
20 | |||
21 | /* BRC */ | ||
22 | #define SYS_BRC(x) __REG2(0xa0900004, (x)) | ||
23 | |||
24 | /* Timer x Reload Count register */ | ||
25 | #define SYS_TRC(x) __REG2(0xa0900044, (x)) | ||
26 | |||
27 | /* Timer x Read register */ | ||
28 | #define SYS_TR(x) __REG2(0xa0900084, (x)) | ||
29 | |||
30 | /* Interrupt Vector Address Register Level x */ | ||
31 | #define SYS_IVA(x) __REG2(0xa09000c4, (x)) | ||
32 | |||
33 | /* Interrupt Configuration registers */ | ||
34 | #define SYS_IC(x) __REG2(0xa0900144, (x)) | ||
35 | |||
36 | /* ISRADDR */ | ||
37 | #define SYS_ISRADDR __REG(0xa0900164) | ||
38 | |||
39 | /* Interrupt Status Active */ | ||
40 | #define SYS_ISA __REG(0xa0900168) | ||
41 | |||
42 | /* Interrupt Status Raw */ | ||
43 | #define SYS_ISR __REG(0xa090016c) | ||
44 | |||
45 | /* Timer Interrupt Status register */ | ||
46 | #define SYS_TIS __REG(0xa0900170) | ||
47 | |||
48 | /* PLL Configuration register */ | ||
49 | #define SYS_PLL __REG(0xa0900188) | ||
50 | |||
51 | /* PLL Configuration register: PLL SW change */ | ||
52 | #define SYS_PLL_SWC __REGBIT(15) | ||
53 | #define SYS_PLL_SWC_NO __REGVAL(SYS_PLL_SWC, 0) | ||
54 | #define SYS_PLL_SWC_YES __REGVAL(SYS_PLL_SWC, 1) | ||
55 | |||
56 | /* Timer x Control register */ | ||
57 | #define SYS_TC(x) __REG2(0xa0900190, (x)) | ||
58 | |||
59 | /* Timer x Control register: Timer enable */ | ||
60 | #define SYS_TCx_TEN __REGBIT(15) | ||
61 | #define SYS_TCx_TEN_DIS __REGVAL(SYS_TCx_TEN, 1) | ||
62 | #define SYS_TCx_TEN_EN __REGVAL(SYS_TCx_TEN, 1) | ||
63 | |||
64 | /* Timer x Control register: CPU debug mode */ | ||
65 | #define SYS_TCx_TDBG __REGBIT(10) | ||
66 | #define SYS_TCx_TDBG_CONT __REGVAL(SYS_TCx_TDBG, 0) | ||
67 | #define SYS_TCx_TDBG_STOP __REGVAL(SYS_TCx_TDBG, 1) | ||
68 | |||
69 | /* Timer x Control register: Interrupt clear */ | ||
70 | #define SYS_TCx_INTC __REGBIT(9) | ||
71 | #define SYS_TCx_INTC_UNSET __REGVAL(SYS_TCx_INTC, 0) | ||
72 | #define SYS_TCx_INTC_SET __REGVAL(SYS_TCx_INTC, 1) | ||
73 | |||
74 | /* Timer x Control register: Timer clock select */ | ||
75 | #define SYS_TCx_TLCS __REGBITS(8, 6) | ||
76 | #define SYS_TCx_TLCS_CPU __REGVAL(SYS_TCx_TLCS, 0) /* CPU clock */ | ||
77 | #define SYS_TCx_TLCS_DIV2 __REGVAL(SYS_TCx_TLCS, 1) /* CPU clock / 2 */ | ||
78 | #define SYS_TCx_TLCS_DIV4 __REGVAL(SYS_TCx_TLCS, 2) /* CPU clock / 4 */ | ||
79 | #define SYS_TCx_TLCS_DIV8 __REGVAL(SYS_TCx_TLCS, 3) /* CPU clock / 8 */ | ||
80 | #define SYS_TCx_TLCS_DIV16 __REGVAL(SYS_TCx_TLCS, 4) /* CPU clock / 16 */ | ||
81 | #define SYS_TCx_TLCS_DIV32 __REGVAL(SYS_TCx_TLCS, 5) /* CPU clock / 32 */ | ||
82 | #define SYS_TCx_TLCS_DIV64 __REGVAL(SYS_TCx_TLCS, 6) /* CPU clock / 64 */ | ||
83 | #define SYS_TCx_TLCS_EXT __REGVAL(SYS_TCx_TLCS, 7) | ||
84 | |||
85 | /* Timer x Control register: Timer mode */ | ||
86 | #define SYS_TCx_TM __REGBITS(5, 4) | ||
87 | #define SYS_TCx_TM_IEE __REGVAL(SYS_TCx_TM, 0) /* Internal timer or external event */ | ||
88 | #define SYS_TCx_TM_ELL __REGVAL(SYS_TCx_TM, 1) /* External low-level, gated timer */ | ||
89 | #define SYS_TCx_TM_EHL __REGVAL(SYS_TCx_TM, 2) /* External high-level, gated timer */ | ||
90 | #define SYS_TCx_TM_CONCAT __REGVAL(SYS_TCx_TM, 3) /* Concatenate the lower timer. */ | ||
91 | |||
92 | /* Timer x Control register: Interrupt select */ | ||
93 | #define SYS_TCx_INTS __REGBIT(3) | ||
94 | #define SYS_TCx_INTS_DIS __REGVAL(SYS_TCx_INTS, 0) | ||
95 | #define SYS_TCx_INTS_EN __REGVAL(SYS_TCx_INTS, 1) | ||
96 | |||
97 | /* Timer x Control register: Up/down select */ | ||
98 | #define SYS_TCx_UDS __REGBIT(2) | ||
99 | #define SYS_TCx_UDS_UP __REGVAL(SYS_TCx_UDS, 0) | ||
100 | #define SYS_TCx_UDS_DOWN __REGVAL(SYS_TCx_UDS, 1) | ||
101 | |||
102 | /* Timer x Control register: 32- or 16-bit timer */ | ||
103 | #define SYS_TCx_TSZ __REGBIT(1) | ||
104 | #define SYS_TCx_TSZ_16 __REGVAL(SYS_TCx_TSZ, 0) | ||
105 | #define SYS_TCx_TSZ_32 __REGVAL(SYS_TCx_TSZ, 1) | ||
106 | |||
107 | /* Timer x Control register: Reload enable */ | ||
108 | #define SYS_TCx_REN __REGBIT(0) | ||
109 | #define SYS_TCx_REN_DIS __REGVAL(SYS_TCx_REN, 0) | ||
110 | #define SYS_TCx_REN_EN __REGVAL(SYS_TCx_REN, 1) | ||
111 | |||
112 | /* System Memory Chip Select x Dynamic Memory Base */ | ||
113 | #define SYS_SMCSDMB(x) __REG2(0xa09001d0, (x) << 1) | ||
114 | |||
115 | /* System Memory Chip Select x Dynamic Memory Mask */ | ||
116 | #define SYS_SMCSDMM(x) __REG2(0xa09001d4, (x) << 1) | ||
117 | |||
118 | /* System Memory Chip Select x Static Memory Base */ | ||
119 | #define SYS_SMCSSMB(x) __REG2(0xa09001f0, (x) << 1) | ||
120 | |||
121 | /* System Memory Chip Select x Static Memory Base: Chip select x base */ | ||
122 | #define SYS_SMCSSMB_CSxB __REGBITS(31, 12) | ||
123 | |||
124 | /* System Memory Chip Select x Static Memory Mask */ | ||
125 | #define SYS_SMCSSMM(x) __REG2(0xa09001f4, (x) << 1) | ||
126 | |||
127 | /* System Memory Chip Select x Static Memory Mask: Chip select x mask */ | ||
128 | #define SYS_SMCSSMM_CSxM __REGBITS(31, 12) | ||
129 | |||
130 | /* System Memory Chip Select x Static Memory Mask: Chip select x enable */ | ||
131 | #define SYS_SMCSSMM_CSEx __REGBIT(0) | ||
132 | #define SYS_SMCSSMM_CSEx_DIS __REGVAL(SYS_SMCSSMM_CSEx, 0) | ||
133 | #define SYS_SMCSSMM_CSEx_EN __REGVAL(SYS_SMCSSMM_CSEx, 1) | ||
134 | |||
135 | /* General purpose, user-defined ID register */ | ||
136 | #define SYS_GENID __REG(0xa0900210) | ||
137 | |||
138 | /* External Interrupt x Control register */ | ||
139 | #define SYS_EIC(x) __REG2(0xa0900214, (x)) | ||
140 | |||
141 | /* External Interrupt x Control register: Status */ | ||
142 | #define SYS_EIC_STS __REGBIT(3) | ||
143 | |||
144 | /* External Interrupt x Control register: Clear */ | ||
145 | #define SYS_EIC_CLR __REGBIT(2) | ||
146 | |||
147 | /* External Interrupt x Control register: Polarity */ | ||
148 | #define SYS_EIC_PLTY __REGBIT(1) | ||
149 | #define SYS_EIC_PLTY_AH __REGVAL(SYS_EIC_PLTY, 0) | ||
150 | #define SYS_EIC_PLTY_AL __REGVAL(SYS_EIC_PLTY, 1) | ||
151 | |||
152 | /* External Interrupt x Control register: Level edge */ | ||
153 | #define SYS_EIC_LVEDG __REGBIT(0) | ||
154 | #define SYS_EIC_LVEDG_LEVEL __REGVAL(SYS_EIC_LVEDG, 0) | ||
155 | #define SYS_EIC_LVEDG_EDGE __REGVAL(SYS_EIC_LVEDG, 1) | ||
156 | |||
157 | #endif /* ifndef __ASM_ARCH_REGSSYS_H */ | ||
diff --git a/include/asm-arm/arch-ns9xxx/system.h b/include/asm-arm/arch-ns9xxx/system.h new file mode 100644 index 000000000000..e3cd4d31b3f3 --- /dev/null +++ b/include/asm-arm/arch-ns9xxx/system.h | |||
@@ -0,0 +1,34 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ns9xxx/system.h | ||
3 | * | ||
4 | * Copyright (C) 2006 by Digi International Inc. | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_SYSTEM_H | ||
12 | #define __ASM_ARCH_SYSTEM_H | ||
13 | |||
14 | #include <asm/proc-fns.h> | ||
15 | #include <asm/arch-ns9xxx/regs-sys.h> | ||
16 | #include <asm/mach-types.h> | ||
17 | |||
18 | static inline void arch_idle(void) | ||
19 | { | ||
20 | cpu_do_idle(); | ||
21 | } | ||
22 | |||
23 | static inline void arch_reset(char mode) | ||
24 | { | ||
25 | u32 reg; | ||
26 | |||
27 | reg = SYS_PLL >> 16; | ||
28 | REGSET(reg, SYS_PLL, SWC, YES); | ||
29 | SYS_PLL = reg; | ||
30 | |||
31 | BUG(); | ||
32 | } | ||
33 | |||
34 | #endif /* ifndef __ASM_ARCH_SYSTEM_H */ | ||
diff --git a/include/asm-arm/arch-ns9xxx/timex.h b/include/asm-arm/arch-ns9xxx/timex.h new file mode 100644 index 000000000000..f776cbd2622d --- /dev/null +++ b/include/asm-arm/arch-ns9xxx/timex.h | |||
@@ -0,0 +1,20 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ns9xxx/timex.h | ||
3 | * | ||
4 | * Copyright (C) 2005-2006 by Digi International Inc. | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_TIMEX_H | ||
12 | #define __ASM_ARCH_TIMEX_H | ||
13 | |||
14 | /* | ||
15 | * value for CLOCK_TICK_RATE stolen from include/asm-arm/arch-s3c2410/timex.h. | ||
16 | * See there for an explanation. | ||
17 | */ | ||
18 | #define CLOCK_TICK_RATE 12000000 | ||
19 | |||
20 | #endif /* ifndef __ASM_ARCH_TIMEX_H */ | ||
diff --git a/include/asm-arm/arch-ns9xxx/uncompress.h b/include/asm-arm/arch-ns9xxx/uncompress.h new file mode 100644 index 000000000000..961ca7dc9954 --- /dev/null +++ b/include/asm-arm/arch-ns9xxx/uncompress.h | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ns9xxx/uncompress.h | ||
3 | * | ||
4 | * Copyright (C) 2006 by Digi International Inc. | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_UNCOMPRESS_H | ||
12 | #define __ASM_ARCH_UNCOMPRESS_H | ||
13 | |||
14 | static void putc(char c) | ||
15 | { | ||
16 | volatile u8 *base = (volatile u8 *)0x40000000; | ||
17 | int t = 0x10000; | ||
18 | |||
19 | do { | ||
20 | if (base[5] & 0x20) { | ||
21 | base[0] = c; | ||
22 | break; | ||
23 | } | ||
24 | } while (--t); | ||
25 | } | ||
26 | |||
27 | #define arch_decomp_setup() | ||
28 | #define arch_decomp_wdog() | ||
29 | |||
30 | static void flush(void) | ||
31 | { | ||
32 | /* nothing */ | ||
33 | } | ||
34 | |||
35 | #endif /* ifndef __ASM_ARCH_UNCOMPRESS_H */ | ||
diff --git a/include/asm-arm/arch-ns9xxx/vmalloc.h b/include/asm-arm/arch-ns9xxx/vmalloc.h new file mode 100644 index 000000000000..2f3cb6f6be24 --- /dev/null +++ b/include/asm-arm/arch-ns9xxx/vmalloc.h | |||
@@ -0,0 +1,16 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ns9xxx/vmalloc.h | ||
3 | * | ||
4 | * Copyright (C) 2006 by Digi International Inc. | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_VMALLOC_H | ||
12 | #define __ASM_ARCH_VMALLOC_H | ||
13 | |||
14 | #define VMALLOC_END (0xf0000000) | ||
15 | |||
16 | #endif /* ifndef __ASM_ARCH_VMALLOC_H */ | ||
diff --git a/include/asm-arm/arch-omap/entry-macro.S b/include/asm-arm/arch-omap/entry-macro.S index 0ffb1185f1ac..c90dff4828f7 100644 --- a/include/asm-arm/arch-omap/entry-macro.S +++ b/include/asm-arm/arch-omap/entry-macro.S | |||
@@ -29,6 +29,12 @@ | |||
29 | .macro disable_fiq | 29 | .macro disable_fiq |
30 | .endm | 30 | .endm |
31 | 31 | ||
32 | .macro get_irqnr_preamble, base, tmp | ||
33 | .endm | ||
34 | |||
35 | .macro arch_ret_to_user, tmp1, tmp2 | ||
36 | .endm | ||
37 | |||
32 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 38 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
33 | ldr \base, =IO_ADDRESS(OMAP_IH1_BASE) | 39 | ldr \base, =IO_ADDRESS(OMAP_IH1_BASE) |
34 | ldr \irqnr, [\base, #IRQ_ITR_REG_OFFSET] | 40 | ldr \irqnr, [\base, #IRQ_ITR_REG_OFFSET] |
diff --git a/include/asm-arm/arch-omap/gpio.h b/include/asm-arm/arch-omap/gpio.h index f486b72070ea..3762a6ae6a7f 100644 --- a/include/asm-arm/arch-omap/gpio.h +++ b/include/asm-arm/arch-omap/gpio.h | |||
@@ -76,4 +76,70 @@ extern void omap_set_gpio_direction(int gpio, int is_input); | |||
76 | extern void omap_set_gpio_dataout(int gpio, int enable); | 76 | extern void omap_set_gpio_dataout(int gpio, int enable); |
77 | extern int omap_get_gpio_datain(int gpio); | 77 | extern int omap_get_gpio_datain(int gpio); |
78 | 78 | ||
79 | /*-------------------------------------------------------------------------*/ | ||
80 | |||
81 | /* wrappers for "new style" GPIO calls. the old OMAP-specfic ones should | ||
82 | * eventually be removed (along with this errno.h inclusion), and maybe | ||
83 | * gpios should put MPUIOs last too. | ||
84 | */ | ||
85 | |||
86 | #include <asm/errno.h> | ||
87 | |||
88 | static inline int gpio_request(unsigned gpio, const char *label) | ||
89 | { | ||
90 | return omap_request_gpio(gpio); | ||
91 | } | ||
92 | |||
93 | static inline void gpio_free(unsigned gpio) | ||
94 | { | ||
95 | omap_free_gpio(gpio); | ||
96 | } | ||
97 | |||
98 | static inline int __gpio_set_direction(unsigned gpio, int is_input) | ||
99 | { | ||
100 | if (cpu_class_is_omap2()) { | ||
101 | if (gpio > OMAP_MAX_GPIO_LINES) | ||
102 | return -EINVAL; | ||
103 | } else { | ||
104 | if (gpio > (OMAP_MAX_GPIO_LINES + 16 /* MPUIO */)) | ||
105 | return -EINVAL; | ||
106 | } | ||
107 | omap_set_gpio_direction(gpio, is_input); | ||
108 | return 0; | ||
109 | } | ||
110 | |||
111 | static inline int gpio_direction_input(unsigned gpio) | ||
112 | { | ||
113 | return __gpio_set_direction(gpio, 1); | ||
114 | } | ||
115 | |||
116 | static inline int gpio_direction_output(unsigned gpio) | ||
117 | { | ||
118 | return __gpio_set_direction(gpio, 0); | ||
119 | } | ||
120 | |||
121 | static inline int gpio_get_value(unsigned gpio) | ||
122 | { | ||
123 | return omap_get_gpio_datain(gpio); | ||
124 | } | ||
125 | |||
126 | static inline void gpio_set_value(unsigned gpio, int value) | ||
127 | { | ||
128 | omap_set_gpio_dataout(gpio, value); | ||
129 | } | ||
130 | |||
131 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | ||
132 | |||
133 | static inline int gpio_to_irq(unsigned gpio) | ||
134 | { | ||
135 | return OMAP_GPIO_IRQ(gpio); | ||
136 | } | ||
137 | |||
138 | static inline int irq_to_gpio(unsigned irq) | ||
139 | { | ||
140 | if (cpu_class_is_omap1() && (irq < (IH_MPUIO_BASE + 16))) | ||
141 | return (irq - IH_MPUIO_BASE) + OMAP_MAX_GPIO_LINES; | ||
142 | return irq - IH_GPIO_BASE; | ||
143 | } | ||
144 | |||
79 | #endif | 145 | #endif |
diff --git a/include/asm-arm/arch-pnx4008/entry-macro.S b/include/asm-arm/arch-pnx4008/entry-macro.S index c1c198e3680b..f11731974e5d 100644 --- a/include/asm-arm/arch-pnx4008/entry-macro.S +++ b/include/asm-arm/arch-pnx4008/entry-macro.S | |||
@@ -28,6 +28,12 @@ | |||
28 | .macro disable_fiq | 28 | .macro disable_fiq |
29 | .endm | 29 | .endm |
30 | 30 | ||
31 | .macro get_irqnr_preamble, base, tmp | ||
32 | .endm | ||
33 | |||
34 | .macro arch_ret_to_user, tmp1, tmp2 | ||
35 | .endm | ||
36 | |||
31 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 37 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
32 | /* decode the MIC interrupt numbers */ | 38 | /* decode the MIC interrupt numbers */ |
33 | ldr \base, =IO_ADDRESS(PNX4008_INTCTRLMIC_BASE) | 39 | ldr \base, =IO_ADDRESS(PNX4008_INTCTRLMIC_BASE) |
diff --git a/include/asm-arm/arch-pxa/entry-macro.S b/include/asm-arm/arch-pxa/entry-macro.S index 4985e33afc12..1d5fbb9b379a 100644 --- a/include/asm-arm/arch-pxa/entry-macro.S +++ b/include/asm-arm/arch-pxa/entry-macro.S | |||
@@ -13,6 +13,12 @@ | |||
13 | .macro disable_fiq | 13 | .macro disable_fiq |
14 | .endm | 14 | .endm |
15 | 15 | ||
16 | .macro get_irqnr_preamble, base, tmp | ||
17 | .endm | ||
18 | |||
19 | .macro arch_ret_to_user, tmp1, tmp2 | ||
20 | .endm | ||
21 | |||
16 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 22 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
17 | #ifdef CONFIG_PXA27x | 23 | #ifdef CONFIG_PXA27x |
18 | mrc p6, 0, \irqstat, c0, c0, 0 @ ICIP | 24 | mrc p6, 0, \irqstat, c0, c0, 0 @ ICIP |
diff --git a/include/asm-arm/arch-pxa/gpio.h b/include/asm-arm/arch-pxa/gpio.h new file mode 100644 index 000000000000..3d348a351157 --- /dev/null +++ b/include/asm-arm/arch-pxa/gpio.h | |||
@@ -0,0 +1,80 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-pxa/gpio.h | ||
3 | * | ||
4 | * PXA GPIO wrappers for arch-neutral GPIO calls | ||
5 | * | ||
6 | * Written by Philipp Zabel <philipp.zabel@gmail.com> | ||
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 as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | * | ||
22 | */ | ||
23 | |||
24 | #ifndef __ASM_ARCH_PXA_GPIO_H | ||
25 | #define __ASM_ARCH_PXA_GPIO_H | ||
26 | |||
27 | #include <asm/arch/pxa-regs.h> | ||
28 | #include <asm/irq.h> | ||
29 | #include <asm/hardware.h> | ||
30 | |||
31 | static inline int gpio_request(unsigned gpio, const char *label) | ||
32 | { | ||
33 | return 0; | ||
34 | } | ||
35 | |||
36 | static inline void gpio_free(unsigned gpio) | ||
37 | { | ||
38 | return; | ||
39 | } | ||
40 | |||
41 | static inline int gpio_direction_input(unsigned gpio) | ||
42 | { | ||
43 | return pxa_gpio_mode(gpio | GPIO_IN); | ||
44 | } | ||
45 | |||
46 | static inline int gpio_direction_output(unsigned gpio) | ||
47 | { | ||
48 | return pxa_gpio_mode(gpio | GPIO_OUT); | ||
49 | } | ||
50 | |||
51 | static inline int __gpio_get_value(unsigned gpio) | ||
52 | { | ||
53 | return GPLR(gpio) & GPIO_bit(gpio); | ||
54 | } | ||
55 | |||
56 | #define gpio_get_value(gpio) \ | ||
57 | (__builtin_constant_p(gpio) ? \ | ||
58 | __gpio_get_value(gpio) : \ | ||
59 | pxa_gpio_get_value(gpio)) | ||
60 | |||
61 | static inline void __gpio_set_value(unsigned gpio, int value) | ||
62 | { | ||
63 | if (value) | ||
64 | GPSR(gpio) = GPIO_bit(gpio); | ||
65 | else | ||
66 | GPCR(gpio) = GPIO_bit(gpio); | ||
67 | } | ||
68 | |||
69 | #define gpio_set_value(gpio,value) \ | ||
70 | (__builtin_constant_p(gpio) ? \ | ||
71 | __gpio_set_value(gpio, value) : \ | ||
72 | pxa_gpio_set_value(gpio, value)) | ||
73 | |||
74 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | ||
75 | |||
76 | #define gpio_to_irq(gpio) IRQ_GPIO(gpio) | ||
77 | #define irq_to_gpio(irq) IRQ_TO_GPIO(irq) | ||
78 | |||
79 | |||
80 | #endif | ||
diff --git a/include/asm-arm/arch-pxa/hardware.h b/include/asm-arm/arch-pxa/hardware.h index 3e70bd95472c..e2bdc2fbede1 100644 --- a/include/asm-arm/arch-pxa/hardware.h +++ b/include/asm-arm/arch-pxa/hardware.h | |||
@@ -65,7 +65,17 @@ | |||
65 | /* | 65 | /* |
66 | * Handy routine to set GPIO alternate functions | 66 | * Handy routine to set GPIO alternate functions |
67 | */ | 67 | */ |
68 | extern void pxa_gpio_mode( int gpio_mode ); | 68 | extern int pxa_gpio_mode( int gpio_mode ); |
69 | |||
70 | /* | ||
71 | * Return GPIO level, nonzero means high, zero is low | ||
72 | */ | ||
73 | extern int pxa_gpio_get_value(unsigned gpio); | ||
74 | |||
75 | /* | ||
76 | * Set output GPIO level | ||
77 | */ | ||
78 | extern void pxa_gpio_set_value(unsigned gpio, int value); | ||
69 | 79 | ||
70 | /* | 80 | /* |
71 | * Routine to enable or disable CKEN | 81 | * Routine to enable or disable CKEN |
diff --git a/include/asm-arm/arch-pxa/pxa-regs.h b/include/asm-arm/arch-pxa/pxa-regs.h index e24f6b6c79ae..aec835b6f057 100644 --- a/include/asm-arm/arch-pxa/pxa-regs.h +++ b/include/asm-arm/arch-pxa/pxa-regs.h | |||
@@ -463,9 +463,6 @@ | |||
463 | * Serial Audio Controller | 463 | * Serial Audio Controller |
464 | */ | 464 | */ |
465 | 465 | ||
466 | /* FIXME: This clash with SA1111 defines */ | ||
467 | #ifndef _ASM_ARCH_SA1111 | ||
468 | |||
469 | #define SACR0 __REG(0x40400000) /* Global Control Register */ | 466 | #define SACR0 __REG(0x40400000) /* Global Control Register */ |
470 | #define SACR1 __REG(0x40400004) /* Serial Audio I 2 S/MSB-Justified Control Register */ | 467 | #define SACR1 __REG(0x40400004) /* Serial Audio I 2 S/MSB-Justified Control Register */ |
471 | #define SASR0 __REG(0x4040000C) /* Serial Audio I 2 S/MSB-Justified Interface and FIFO Status Register */ | 468 | #define SASR0 __REG(0x4040000C) /* Serial Audio I 2 S/MSB-Justified Interface and FIFO Status Register */ |
@@ -474,8 +471,8 @@ | |||
474 | #define SADIV __REG(0x40400060) /* Audio Clock Divider Register. */ | 471 | #define SADIV __REG(0x40400060) /* Audio Clock Divider Register. */ |
475 | #define SADR __REG(0x40400080) /* Serial Audio Data Register (TX and RX FIFO access Register). */ | 472 | #define SADR __REG(0x40400080) /* Serial Audio Data Register (TX and RX FIFO access Register). */ |
476 | 473 | ||
477 | #define SACR0_RFTH(x) (x << 12) /* Rx FIFO Interrupt or DMA Trigger Threshold */ | 474 | #define SACR0_RFTH(x) ((x) << 12) /* Rx FIFO Interrupt or DMA Trigger Threshold */ |
478 | #define SACR0_TFTH(x) (x << 8) /* Tx FIFO Interrupt or DMA Trigger Threshold */ | 475 | #define SACR0_TFTH(x) ((x) << 8) /* Tx FIFO Interrupt or DMA Trigger Threshold */ |
479 | #define SACR0_STRF (1 << 5) /* FIFO Select for EFWR Special Function */ | 476 | #define SACR0_STRF (1 << 5) /* FIFO Select for EFWR Special Function */ |
480 | #define SACR0_EFWR (1 << 4) /* Enable EFWR Function */ | 477 | #define SACR0_EFWR (1 << 4) /* Enable EFWR Function */ |
481 | #define SACR0_RST (1 << 3) /* FIFO, i2s Register Reset */ | 478 | #define SACR0_RST (1 << 3) /* FIFO, i2s Register Reset */ |
@@ -503,8 +500,6 @@ | |||
503 | #define SAIMR_RFS (1 << 4) /* Enable Rx FIFO Service Interrupt */ | 500 | #define SAIMR_RFS (1 << 4) /* Enable Rx FIFO Service Interrupt */ |
504 | #define SAIMR_TFS (1 << 3) /* Enable Tx FIFO Service Interrupt */ | 501 | #define SAIMR_TFS (1 << 3) /* Enable Tx FIFO Service Interrupt */ |
505 | 502 | ||
506 | #endif | ||
507 | |||
508 | /* | 503 | /* |
509 | * AC97 Controller registers | 504 | * AC97 Controller registers |
510 | */ | 505 | */ |
@@ -1682,15 +1677,18 @@ | |||
1682 | #define SSSR_PINT (1 << 18) /* Peripheral Trailing Byte Interrupt */ | 1677 | #define SSSR_PINT (1 << 18) /* Peripheral Trailing Byte Interrupt */ |
1683 | 1678 | ||
1684 | #define SSPSP_FSRT (1 << 25) /* Frame Sync Relative Timing */ | 1679 | #define SSPSP_FSRT (1 << 25) /* Frame Sync Relative Timing */ |
1685 | #define SSPSP_DMYSTOP(x) (x << 23) /* Dummy Stop */ | 1680 | #define SSPSP_DMYSTOP(x) ((x) << 23) /* Dummy Stop */ |
1686 | #define SSPSP_SFRMWDTH(x) (x << 16) /* Serial Frame Width */ | 1681 | #define SSPSP_SFRMWDTH(x) ((x) << 16) /* Serial Frame Width */ |
1687 | #define SSPSP_SFRMDLY(x) (x << 9) /* Serial Frame Delay */ | 1682 | #define SSPSP_SFRMDLY(x) ((x) << 9) /* Serial Frame Delay */ |
1688 | #define SSPSP_DMYSTRT(x) (x << 7) /* Dummy Start */ | 1683 | #define SSPSP_DMYSTRT(x) ((x) << 7) /* Dummy Start */ |
1689 | #define SSPSP_STRTDLY(x) (x << 4) /* Start Delay */ | 1684 | #define SSPSP_STRTDLY(x) ((x) << 4) /* Start Delay */ |
1690 | #define SSPSP_ETDS (1 << 3) /* End of Transfer data State */ | 1685 | #define SSPSP_ETDS (1 << 3) /* End of Transfer data State */ |
1691 | #define SSPSP_SFRMP (1 << 2) /* Serial Frame Polarity */ | 1686 | #define SSPSP_SFRMP (1 << 2) /* Serial Frame Polarity */ |
1692 | #define SSPSP_SCMODE(x) (x << 0) /* Serial Bit Rate Clock Mode */ | 1687 | #define SSPSP_SCMODE(x) ((x) << 0) /* Serial Bit Rate Clock Mode */ |
1693 | 1688 | ||
1689 | #define SSACD_SCDB (1 << 3) /* SSPSYSCLK Divider Bypass */ | ||
1690 | #define SSACD_ACPS(x) ((x) << 4) /* Audio clock PLL select */ | ||
1691 | #define SSACD_ACDS(x) ((x) << 0) /* Audio clock divider select */ | ||
1694 | 1692 | ||
1695 | #define SSCR0_P1 __REG(0x41000000) /* SSP Port 1 Control Register 0 */ | 1693 | #define SSCR0_P1 __REG(0x41000000) /* SSP Port 1 Control Register 0 */ |
1696 | #define SSCR1_P1 __REG(0x41000004) /* SSP Port 1 Control Register 1 */ | 1694 | #define SSCR1_P1 __REG(0x41000004) /* SSP Port 1 Control Register 1 */ |
diff --git a/include/asm-arm/arch-pxa/udc.h b/include/asm-arm/arch-pxa/udc.h index 646480d37256..8bc6f9c3e3ea 100644 --- a/include/asm-arm/arch-pxa/udc.h +++ b/include/asm-arm/arch-pxa/udc.h | |||
@@ -9,3 +9,33 @@ | |||
9 | 9 | ||
10 | extern void pxa_set_udc_info(struct pxa2xx_udc_mach_info *info); | 10 | extern void pxa_set_udc_info(struct pxa2xx_udc_mach_info *info); |
11 | 11 | ||
12 | static inline int udc_gpio_to_irq(unsigned gpio) | ||
13 | { | ||
14 | return IRQ_GPIO(gpio & GPIO_MD_MASK_NR); | ||
15 | } | ||
16 | |||
17 | static inline void udc_gpio_init_vbus(unsigned gpio) | ||
18 | { | ||
19 | pxa_gpio_mode((gpio & GPIO_MD_MASK_NR) | GPIO_IN); | ||
20 | } | ||
21 | |||
22 | static inline void udc_gpio_init_pullup(unsigned gpio) | ||
23 | { | ||
24 | pxa_gpio_mode((gpio & GPIO_MD_MASK_NR) | GPIO_OUT | GPIO_DFLT_LOW); | ||
25 | } | ||
26 | |||
27 | static inline int udc_gpio_get(unsigned gpio) | ||
28 | { | ||
29 | return (GPLR(gpio) & GPIO_bit(gpio)) != 0; | ||
30 | } | ||
31 | |||
32 | static inline void udc_gpio_set(unsigned gpio, int is_on) | ||
33 | { | ||
34 | int mask = GPIO_bit(gpio); | ||
35 | |||
36 | if (is_on) | ||
37 | GPSR(gpio) = mask; | ||
38 | else | ||
39 | GPCR(gpio) = mask; | ||
40 | } | ||
41 | |||
diff --git a/include/asm-arm/arch-realview/entry-macro.S b/include/asm-arm/arch-realview/entry-macro.S index 1a6eec86bd47..138838d4ad75 100644 --- a/include/asm-arm/arch-realview/entry-macro.S +++ b/include/asm-arm/arch-realview/entry-macro.S | |||
@@ -13,6 +13,12 @@ | |||
13 | .macro disable_fiq | 13 | .macro disable_fiq |
14 | .endm | 14 | .endm |
15 | 15 | ||
16 | .macro get_irqnr_preamble, base, tmp | ||
17 | .endm | ||
18 | |||
19 | .macro arch_ret_to_user, tmp1, tmp2 | ||
20 | .endm | ||
21 | |||
16 | /* | 22 | /* |
17 | * The interrupt numbering scheme is defined in the | 23 | * The interrupt numbering scheme is defined in the |
18 | * interrupt controller spec. To wit: | 24 | * interrupt controller spec. To wit: |
diff --git a/include/asm-arm/arch-realview/hardware.h b/include/asm-arm/arch-realview/hardware.h index 9ca76dc3a7af..aa78fe087ab2 100644 --- a/include/asm-arm/arch-realview/hardware.h +++ b/include/asm-arm/arch-realview/hardware.h | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <asm/arch/platform.h> | 26 | #include <asm/arch/platform.h> |
27 | 27 | ||
28 | /* macro to get at IO space when running virtually */ | 28 | /* macro to get at IO space when running virtually */ |
29 | #define IO_ADDRESS(x) (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + 0xf0000000) | 29 | #define IO_ADDRESS(x) ((((x) & 0x0effffff) | (((x) >> 4) & 0x0f000000)) + 0xf0000000) |
30 | #define __io_address(n) __io(IO_ADDRESS(n)) | 30 | #define __io_address(n) __io(IO_ADDRESS(n)) |
31 | 31 | ||
32 | #endif | 32 | #endif |
diff --git a/include/asm-arm/arch-realview/irqs.h b/include/asm-arm/arch-realview/irqs.h index c16223c9588d..5a5db56f86b8 100644 --- a/include/asm-arm/arch-realview/irqs.h +++ b/include/asm-arm/arch-realview/irqs.h | |||
@@ -65,6 +65,21 @@ | |||
65 | #define IRQ_AACI (IRQ_GIC_START + INT_AACI) | 65 | #define IRQ_AACI (IRQ_GIC_START + INT_AACI) |
66 | #define IRQ_ETH (IRQ_GIC_START + INT_ETH) | 66 | #define IRQ_ETH (IRQ_GIC_START + INT_ETH) |
67 | #define IRQ_USB (IRQ_GIC_START + INT_USB) | 67 | #define IRQ_USB (IRQ_GIC_START + INT_USB) |
68 | #define IRQ_PMU_CPU0 (IRQ_GIC_START + INT_PMU_CPU0) | ||
69 | #define IRQ_PMU_CPU1 (IRQ_GIC_START + INT_PMU_CPU1) | ||
70 | #define IRQ_PMU_CPU2 (IRQ_GIC_START + INT_PMU_CPU2) | ||
71 | #define IRQ_PMU_CPU3 (IRQ_GIC_START + INT_PMU_CPU3) | ||
72 | #define IRQ_PMU_SCU0 (IRQ_GIC_START + INT_PMU_SCU0) | ||
73 | #define IRQ_PMU_SCU1 (IRQ_GIC_START + INT_PMU_SCU1) | ||
74 | #define IRQ_PMU_SCU2 (IRQ_GIC_START + INT_PMU_SCU2) | ||
75 | #define IRQ_PMU_SCU3 (IRQ_GIC_START + INT_PMU_SCU3) | ||
76 | #define IRQ_PMU_SCU4 (IRQ_GIC_START + INT_PMU_SCU4) | ||
77 | #define IRQ_PMU_SCU5 (IRQ_GIC_START + INT_PMU_SCU5) | ||
78 | #define IRQ_PMU_SCU6 (IRQ_GIC_START + INT_PMU_SCU6) | ||
79 | #define IRQ_PMU_SCU7 (IRQ_GIC_START + INT_PMU_SCU7) | ||
80 | |||
81 | #define IRQ_EB_IRQ1 (IRQ_GIC_START + INT_EB_IRQ1) | ||
82 | #define IRQ_EB_IRQ2 (IRQ_GIC_START + INT_EB_IRQ2) | ||
68 | 83 | ||
69 | #define IRQMASK_WDOGINT INTMASK_WDOGINT | 84 | #define IRQMASK_WDOGINT INTMASK_WDOGINT |
70 | #define IRQMASK_SOFTINT INTMASK_SOFTINT | 85 | #define IRQMASK_SOFTINT INTMASK_SOFTINT |
@@ -103,4 +118,4 @@ | |||
103 | #define IRQMASK_ETH INTMASK_ETH | 118 | #define IRQMASK_ETH INTMASK_ETH |
104 | #define IRQMASK_USB INTMASK_USB | 119 | #define IRQMASK_USB INTMASK_USB |
105 | 120 | ||
106 | #define NR_IRQS (IRQ_GIC_START + 64) | 121 | #define NR_IRQS (IRQ_GIC_START + 96) |
diff --git a/include/asm-arm/arch-realview/platform.h b/include/asm-arm/arch-realview/platform.h index 18d7c18b738c..6e0eab95a3a2 100644 --- a/include/asm-arm/arch-realview/platform.h +++ b/include/asm-arm/arch-realview/platform.h | |||
@@ -207,11 +207,25 @@ | |||
207 | #define REALVIEW_GIC_CPU_BASE 0x10040000 /* Generic interrupt controller CPU interface */ | 207 | #define REALVIEW_GIC_CPU_BASE 0x10040000 /* Generic interrupt controller CPU interface */ |
208 | #define REALVIEW_GIC_DIST_BASE 0x10041000 /* Generic interrupt controller distributor */ | 208 | #define REALVIEW_GIC_DIST_BASE 0x10041000 /* Generic interrupt controller distributor */ |
209 | #else | 209 | #else |
210 | #ifdef CONFIG_REALVIEW_MPCORE_REVB | ||
210 | #define REALVIEW_MPCORE_SCU_BASE 0x10100000 /* SCU registers */ | 211 | #define REALVIEW_MPCORE_SCU_BASE 0x10100000 /* SCU registers */ |
211 | #define REALVIEW_GIC_CPU_BASE 0x10100100 /* Generic interrupt controller CPU interface */ | 212 | #define REALVIEW_GIC_CPU_BASE 0x10100100 /* Generic interrupt controller CPU interface */ |
212 | #define REALVIEW_TWD_BASE 0x10100700 | 213 | #define REALVIEW_TWD_BASE 0x10100700 |
213 | #define REALVIEW_TWD_SIZE 0x00000100 | 214 | #define REALVIEW_TWD_SIZE 0x00000100 |
214 | #define REALVIEW_GIC_DIST_BASE 0x10101000 /* Generic interrupt controller distributor */ | 215 | #define REALVIEW_GIC_DIST_BASE 0x10101000 /* Generic interrupt controller distributor */ |
216 | #define REALVIEW_MPCORE_L220_BASE 0x10102000 /* L220 registers */ | ||
217 | #define REALVIEW_MPCORE_SYS_PLD_CTRL1 0xD8 /* Register offset for MPCore sysctl */ | ||
218 | #else | ||
219 | #define REALVIEW_MPCORE_SCU_BASE 0x1F000000 /* SCU registers */ | ||
220 | #define REALVIEW_GIC_CPU_BASE 0x1F000100 /* Generic interrupt controller CPU interface */ | ||
221 | #define REALVIEW_TWD_BASE 0x1F000700 | ||
222 | #define REALVIEW_TWD_SIZE 0x00000100 | ||
223 | #define REALVIEW_GIC_DIST_BASE 0x1F001000 /* Generic interrupt controller distributor */ | ||
224 | #define REALVIEW_MPCORE_L220_BASE 0x1F002000 /* L220 registers */ | ||
225 | #define REALVIEW_MPCORE_SYS_PLD_CTRL1 0x74 /* Register offset for MPCore sysctl */ | ||
226 | #endif | ||
227 | #define REALVIEW_GIC1_CPU_BASE 0x10040000 /* Generic interrupt controller CPU interface */ | ||
228 | #define REALVIEW_GIC1_DIST_BASE 0x10041000 /* Generic interrupt controller distributor */ | ||
215 | #endif | 229 | #endif |
216 | #define REALVIEW_SMC_BASE 0x10080000 /* SMC */ | 230 | #define REALVIEW_SMC_BASE 0x10080000 /* SMC */ |
217 | /* Reserved 0x10090000 - 0x100EFFFF */ | 231 | /* Reserved 0x10090000 - 0x100EFFFF */ |
@@ -306,7 +320,11 @@ | |||
306 | #define INT_USB 29 /* USB controller */ | 320 | #define INT_USB 29 /* USB controller */ |
307 | #define INT_TSPENINT 30 /* Touchscreen pen */ | 321 | #define INT_TSPENINT 30 /* Touchscreen pen */ |
308 | #define INT_TSKPADINT 31 /* Touchscreen keypad */ | 322 | #define INT_TSKPADINT 31 /* Touchscreen keypad */ |
323 | |||
309 | #else | 324 | #else |
325 | |||
326 | #define MAX_GIC_NR 2 | ||
327 | |||
310 | #define INT_AACI 0 | 328 | #define INT_AACI 0 |
311 | #define INT_TIMERINT0_1 1 | 329 | #define INT_TIMERINT0_1 1 |
312 | #define INT_TIMERINT2_3 2 | 330 | #define INT_TIMERINT2_3 2 |
diff --git a/include/asm-arm/arch-realview/scu.h b/include/asm-arm/arch-realview/scu.h new file mode 100644 index 000000000000..cc293640178e --- /dev/null +++ b/include/asm-arm/arch-realview/scu.h | |||
@@ -0,0 +1,8 @@ | |||
1 | #ifndef __ASMARM_ARCH_SCU_H | ||
2 | #define __ASMARM_ARCH_SCU_H | ||
3 | |||
4 | #include <asm/arch/platform.h> | ||
5 | |||
6 | #define SCU_BASE REALVIEW_MPCORE_SCU_BASE | ||
7 | |||
8 | #endif | ||
diff --git a/include/asm-arm/arch-rpc/entry-macro.S b/include/asm-arm/arch-rpc/entry-macro.S index c9e5395e5106..0cfb89b229d1 100644 --- a/include/asm-arm/arch-rpc/entry-macro.S +++ b/include/asm-arm/arch-rpc/entry-macro.S | |||
@@ -1,3 +1,8 @@ | |||
1 | #include <asm/hardware.h> | 1 | #include <asm/hardware.h> |
2 | #include <asm/hardware/entry-macro-iomd.S> | 2 | #include <asm/hardware/entry-macro-iomd.S> |
3 | .macro get_irqnr_preamble, base, tmp | ||
4 | .endm | ||
5 | |||
6 | .macro arch_ret_to_user, tmp1, tmp2 | ||
7 | .endm | ||
3 | 8 | ||
diff --git a/include/asm-arm/arch-s3c2410/audio.h b/include/asm-arm/arch-s3c2410/audio.h index 65e0acffa1ad..0a6977fb5770 100644 --- a/include/asm-arm/arch-s3c2410/audio.h +++ b/include/asm-arm/arch-s3c2410/audio.h | |||
@@ -31,9 +31,9 @@ struct s3c24xx_iis_ops { | |||
31 | int (*suspend)(struct s3c24xx_iis_ops *me); | 31 | int (*suspend)(struct s3c24xx_iis_ops *me); |
32 | int (*resume)(struct s3c24xx_iis_ops *me); | 32 | int (*resume)(struct s3c24xx_iis_ops *me); |
33 | 33 | ||
34 | int (*open)(struct s3c24xx_iis_ops *me, snd_pcm_substream_t *strm); | 34 | int (*open)(struct s3c24xx_iis_ops *me, struct snd_pcm_substream *strm); |
35 | int (*close)(struct s3c24xx_iis_ops *me, snd_pcm_substream_t *strm); | 35 | int (*close)(struct s3c24xx_iis_ops *me, struct snd_pcm_substream *strm); |
36 | int (*prepare)(struct s3c24xx_iis_ops *me, snd_pcm_substream_t *strm, snd_pcm_runtime_t *rt); | 36 | int (*prepare)(struct s3c24xx_iis_ops *me, struct snd_pcm_substream *strm, struct snd_pcm_runtime *rt); |
37 | }; | 37 | }; |
38 | 38 | ||
39 | struct s3c24xx_platdata_iis { | 39 | struct s3c24xx_platdata_iis { |
diff --git a/include/asm-arm/arch-s3c2410/dma.h b/include/asm-arm/arch-s3c2410/dma.h index 58ffa7ba3c88..c6e8d8f64938 100644 --- a/include/asm-arm/arch-s3c2410/dma.h +++ b/include/asm-arm/arch-s3c2410/dma.h | |||
@@ -51,13 +51,19 @@ enum dma_ch { | |||
51 | DMACH_UART0_SRC2, /* s3c2412 second uart sources */ | 51 | DMACH_UART0_SRC2, /* s3c2412 second uart sources */ |
52 | DMACH_UART1_SRC2, | 52 | DMACH_UART1_SRC2, |
53 | DMACH_UART2_SRC2, | 53 | DMACH_UART2_SRC2, |
54 | DMACH_UART3, /* s3c2443 has extra uart */ | ||
55 | DMACH_UART3_SRC2, | ||
54 | DMACH_MAX, /* the end entry */ | 56 | DMACH_MAX, /* the end entry */ |
55 | }; | 57 | }; |
56 | 58 | ||
57 | #define DMACH_LOW_LEVEL (1<<28) /* use this to specifiy hardware ch no */ | 59 | #define DMACH_LOW_LEVEL (1<<28) /* use this to specifiy hardware ch no */ |
58 | 60 | ||
59 | /* we have 4 dma channels */ | 61 | /* we have 4 dma channels */ |
60 | #define S3C2410_DMA_CHANNELS (4) | 62 | #ifndef CONFIG_CPU_S3C2443 |
63 | #define S3C2410_DMA_CHANNELS (4) | ||
64 | #else | ||
65 | #define S3C2410_DMA_CHANNELS (6) | ||
66 | #endif | ||
61 | 67 | ||
62 | /* types */ | 68 | /* types */ |
63 | 69 | ||
@@ -321,6 +327,7 @@ extern int s3c2410_dma_set_buffdone_fn(dmach_t, s3c2410_dma_cbfn_t rtn); | |||
321 | #define S3C2410_DMA_DCDST (0x1C) | 327 | #define S3C2410_DMA_DCDST (0x1C) |
322 | #define S3C2410_DMA_DMASKTRIG (0x20) | 328 | #define S3C2410_DMA_DMASKTRIG (0x20) |
323 | #define S3C2412_DMA_DMAREQSEL (0x24) | 329 | #define S3C2412_DMA_DMAREQSEL (0x24) |
330 | #define S3C2443_DMA_DMAREQSEL (0x24) | ||
324 | 331 | ||
325 | #define S3C2410_DISRCC_INC (1<<0) | 332 | #define S3C2410_DISRCC_INC (1<<0) |
326 | #define S3C2410_DISRCC_APB (1<<1) | 333 | #define S3C2410_DISRCC_APB (1<<1) |
@@ -415,4 +422,31 @@ extern int s3c2410_dma_set_buffdone_fn(dmach_t, s3c2410_dma_cbfn_t rtn); | |||
415 | #define S3C2412_DMAREQSEL_UART2_1 S3C2412_DMAREQSEL_SRC(24) | 422 | #define S3C2412_DMAREQSEL_UART2_1 S3C2412_DMAREQSEL_SRC(24) |
416 | 423 | ||
417 | #endif | 424 | #endif |
425 | |||
426 | #define S3C2443_DMAREQSEL_SRC(x) ((x)<<1) | ||
427 | |||
428 | #define S3C2443_DMAREQSEL_HW (1) | ||
429 | |||
430 | #define S3C2443_DMAREQSEL_SPI0TX S3C2443_DMAREQSEL_SRC(0) | ||
431 | #define S3C2443_DMAREQSEL_SPI0RX S3C2443_DMAREQSEL_SRC(1) | ||
432 | #define S3C2443_DMAREQSEL_SPI1TX S3C2443_DMAREQSEL_SRC(2) | ||
433 | #define S3C2443_DMAREQSEL_SPI1RX S3C2443_DMAREQSEL_SRC(3) | ||
434 | #define S3C2443_DMAREQSEL_I2STX S3C2443_DMAREQSEL_SRC(4) | ||
435 | #define S3C2443_DMAREQSEL_I2SRX S3C2443_DMAREQSEL_SRC(5) | ||
436 | #define S3C2443_DMAREQSEL_TIMER S3C2443_DMAREQSEL_SRC(9) | ||
437 | #define S3C2443_DMAREQSEL_SDI S3C2443_DMAREQSEL_SRC(10) | ||
438 | #define S3C2443_DMAREQSEL_XDREQ0 S3C2443_DMAREQSEL_SRC(17) | ||
439 | #define S3C2443_DMAREQSEL_XDREQ1 S3C2443_DMAREQSEL_SRC(18) | ||
440 | #define S3C2443_DMAREQSEL_UART0_0 S3C2443_DMAREQSEL_SRC(19) | ||
441 | #define S3C2443_DMAREQSEL_UART0_1 S3C2443_DMAREQSEL_SRC(20) | ||
442 | #define S3C2443_DMAREQSEL_UART1_0 S3C2443_DMAREQSEL_SRC(21) | ||
443 | #define S3C2443_DMAREQSEL_UART1_1 S3C2443_DMAREQSEL_SRC(22) | ||
444 | #define S3C2443_DMAREQSEL_UART2_0 S3C2443_DMAREQSEL_SRC(23) | ||
445 | #define S3C2443_DMAREQSEL_UART2_1 S3C2443_DMAREQSEL_SRC(24) | ||
446 | #define S3C2443_DMAREQSEL_UART3_0 S3C2443_DMAREQSEL_SRC(25) | ||
447 | #define S3C2443_DMAREQSEL_UART3_1 S3C2443_DMAREQSEL_SRC(26) | ||
448 | #define S3C2443_DMAREQSEL_PCMOUT S3C2443_DMAREQSEL_SRC(27) | ||
449 | #define S3C2443_DMAREQSEL_PCMIN S3C2443_DMAREQSEL_SRC(28) | ||
450 | #define S3C2443_DMAREQSEL_MICIN S3C2443_DMAREQSEL_SRC(29) | ||
451 | |||
418 | #endif /* __ASM_ARCH_DMA_H */ | 452 | #endif /* __ASM_ARCH_DMA_H */ |
diff --git a/include/asm-arm/arch-s3c2410/entry-macro.S b/include/asm-arm/arch-s3c2410/entry-macro.S index 1eb4e6b8d249..bbec0a8ff158 100644 --- a/include/asm-arm/arch-s3c2410/entry-macro.S +++ b/include/asm-arm/arch-s3c2410/entry-macro.S | |||
@@ -22,6 +22,12 @@ | |||
22 | #include <asm/hardware.h> | 22 | #include <asm/hardware.h> |
23 | #include <asm/irq.h> | 23 | #include <asm/irq.h> |
24 | 24 | ||
25 | .macro get_irqnr_preamble, base, tmp | ||
26 | .endm | ||
27 | |||
28 | .macro arch_ret_to_user, tmp1, tmp2 | ||
29 | .endm | ||
30 | |||
25 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 31 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
26 | 32 | ||
27 | mov \base, #S3C24XX_VA_IRQ | 33 | mov \base, #S3C24XX_VA_IRQ |
diff --git a/include/asm-arm/arch-s3c2410/gpio.h b/include/asm-arm/arch-s3c2410/gpio.h new file mode 100644 index 000000000000..d47ae453f8ca --- /dev/null +++ b/include/asm-arm/arch-s3c2410/gpio.h | |||
@@ -0,0 +1,66 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-s3c2410/gpio.h | ||
3 | * | ||
4 | * S3C2410 GPIO wrappers for arch-neutral GPIO calls | ||
5 | * | ||
6 | * Written by Philipp Zabel <philipp.zabel@gmail.com> | ||
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 as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | * | ||
22 | */ | ||
23 | |||
24 | #ifndef __ASM_ARCH_S3C2410_GPIO_H | ||
25 | #define __ASM_ARCH_S3C2410_GPIO_H | ||
26 | |||
27 | #include <asm/irq.h> | ||
28 | #include <asm/hardware.h> | ||
29 | #include <asm/arch/regs-gpio.h> | ||
30 | |||
31 | static inline int gpio_request(unsigned gpio, const char *label) | ||
32 | { | ||
33 | return 0; | ||
34 | } | ||
35 | |||
36 | static inline void gpio_free(unsigned gpio) | ||
37 | { | ||
38 | return; | ||
39 | } | ||
40 | |||
41 | static inline int gpio_direction_input(unsigned gpio) | ||
42 | { | ||
43 | s3c2410_gpio_cfgpin(gpio, S3C2410_GPIO_INPUT); | ||
44 | return 0; | ||
45 | } | ||
46 | |||
47 | static inline int gpio_direction_output(unsigned gpio) | ||
48 | { | ||
49 | s3c2410_gpio_cfgpin(gpio, S3C2410_GPIO_OUTPUT); | ||
50 | return 0; | ||
51 | } | ||
52 | |||
53 | #define gpio_get_value(gpio) s3c2410_gpio_getpin(gpio) | ||
54 | #define gpio_set_value(gpio,value) s3c2410_gpio_setpin(gpio, value) | ||
55 | |||
56 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | ||
57 | |||
58 | #ifdef CONFIG_CPU_S3C2400 | ||
59 | #define gpio_to_irq(gpio) s3c2400_gpio_getirq(gpio) | ||
60 | #else | ||
61 | #define gpio_to_irq(gpio) s3c2410_gpio_getirq(gpio) | ||
62 | #endif | ||
63 | |||
64 | /* FIXME implement irq_to_gpio() */ | ||
65 | |||
66 | #endif | ||
diff --git a/include/asm-arm/arch-s3c2410/irqs.h b/include/asm-arm/arch-s3c2410/irqs.h index 4b7cff456c4e..c79cb1819913 100644 --- a/include/asm-arm/arch-s3c2410/irqs.h +++ b/include/asm-arm/arch-s3c2410/irqs.h | |||
@@ -34,10 +34,10 @@ | |||
34 | #define IRQ_EINT4t7 S3C2410_IRQ(4) /* 20 */ | 34 | #define IRQ_EINT4t7 S3C2410_IRQ(4) /* 20 */ |
35 | #define IRQ_EINT8t23 S3C2410_IRQ(5) | 35 | #define IRQ_EINT8t23 S3C2410_IRQ(5) |
36 | #define IRQ_RESERVED6 S3C2410_IRQ(6) /* for s3c2410 */ | 36 | #define IRQ_RESERVED6 S3C2410_IRQ(6) /* for s3c2410 */ |
37 | #define IRQ_CAM S3C2410_IRQ(6) /* for s3c2440 */ | 37 | #define IRQ_CAM S3C2410_IRQ(6) /* for s3c2440,s3c2443 */ |
38 | #define IRQ_BATT_FLT S3C2410_IRQ(7) | 38 | #define IRQ_BATT_FLT S3C2410_IRQ(7) |
39 | #define IRQ_TICK S3C2410_IRQ(8) /* 24 */ | 39 | #define IRQ_TICK S3C2410_IRQ(8) /* 24 */ |
40 | #define IRQ_WDT S3C2410_IRQ(9) | 40 | #define IRQ_WDT S3C2410_IRQ(9) /* WDT/AC97 for s3c2443 */ |
41 | #define IRQ_TIMER0 S3C2410_IRQ(10) | 41 | #define IRQ_TIMER0 S3C2410_IRQ(10) |
42 | #define IRQ_TIMER1 S3C2410_IRQ(11) | 42 | #define IRQ_TIMER1 S3C2410_IRQ(11) |
43 | #define IRQ_TIMER2 S3C2410_IRQ(12) | 43 | #define IRQ_TIMER2 S3C2410_IRQ(12) |
@@ -45,7 +45,7 @@ | |||
45 | #define IRQ_TIMER4 S3C2410_IRQ(14) | 45 | #define IRQ_TIMER4 S3C2410_IRQ(14) |
46 | #define IRQ_UART2 S3C2410_IRQ(15) | 46 | #define IRQ_UART2 S3C2410_IRQ(15) |
47 | #define IRQ_LCD S3C2410_IRQ(16) /* 32 */ | 47 | #define IRQ_LCD S3C2410_IRQ(16) /* 32 */ |
48 | #define IRQ_DMA0 S3C2410_IRQ(17) | 48 | #define IRQ_DMA0 S3C2410_IRQ(17) /* IRQ_DMA for s3c2443 */ |
49 | #define IRQ_DMA1 S3C2410_IRQ(18) | 49 | #define IRQ_DMA1 S3C2410_IRQ(18) |
50 | #define IRQ_DMA2 S3C2410_IRQ(19) | 50 | #define IRQ_DMA2 S3C2410_IRQ(19) |
51 | #define IRQ_DMA3 S3C2410_IRQ(20) | 51 | #define IRQ_DMA3 S3C2410_IRQ(20) |
@@ -94,29 +94,63 @@ | |||
94 | * these need to be ordered in number of appearance in the | 94 | * these need to be ordered in number of appearance in the |
95 | * SUBSRC mask register | 95 | * SUBSRC mask register |
96 | */ | 96 | */ |
97 | #define IRQ_S3CUART_RX0 S3C2410_IRQ(54) /* 70 */ | ||
98 | #define IRQ_S3CUART_TX0 S3C2410_IRQ(55) /* 71 */ | ||
99 | #define IRQ_S3CUART_ERR0 S3C2410_IRQ(56) | ||
100 | 97 | ||
101 | #define IRQ_S3CUART_RX1 S3C2410_IRQ(57) | 98 | #define S3C2410_IRQSUB(x) S3C2410_IRQ((x)+54) |
102 | #define IRQ_S3CUART_TX1 S3C2410_IRQ(58) | ||
103 | #define IRQ_S3CUART_ERR1 S3C2410_IRQ(59) | ||
104 | 99 | ||
105 | #define IRQ_S3CUART_RX2 S3C2410_IRQ(60) | 100 | #define IRQ_S3CUART_RX0 S3C2410_IRQSUB(0) /* 70 */ |
106 | #define IRQ_S3CUART_TX2 S3C2410_IRQ(61) | 101 | #define IRQ_S3CUART_TX0 S3C2410_IRQSUB(1) |
107 | #define IRQ_S3CUART_ERR2 S3C2410_IRQ(62) | 102 | #define IRQ_S3CUART_ERR0 S3C2410_IRQSUB(2) |
108 | 103 | ||
109 | #define IRQ_TC S3C2410_IRQ(63) | 104 | #define IRQ_S3CUART_RX1 S3C2410_IRQSUB(3) /* 73 */ |
110 | #define IRQ_ADC S3C2410_IRQ(64) | 105 | #define IRQ_S3CUART_TX1 S3C2410_IRQSUB(4) |
106 | #define IRQ_S3CUART_ERR1 S3C2410_IRQSUB(5) | ||
111 | 107 | ||
112 | /* extra irqs for s3c2440 */ | 108 | #define IRQ_S3CUART_RX2 S3C2410_IRQSUB(6) /* 76 */ |
109 | #define IRQ_S3CUART_TX2 S3C2410_IRQSUB(7) | ||
110 | #define IRQ_S3CUART_ERR2 S3C2410_IRQSUB(8) | ||
113 | 111 | ||
114 | #define IRQ_S3C2440_CAM_C S3C2410_IRQ(65) | 112 | #define IRQ_TC S3C2410_IRQSUB(9) |
115 | #define IRQ_S3C2440_CAM_P S3C2410_IRQ(66) | 113 | #define IRQ_ADC S3C2410_IRQSUB(10) |
116 | #define IRQ_S3C2440_WDT S3C2410_IRQ(67) | ||
117 | #define IRQ_S3C2440_AC97 S3C2410_IRQ(68) | ||
118 | 114 | ||
119 | #define NR_IRQS (IRQ_S3C2440_AC97+1) | 115 | /* extra irqs for s3c2440 */ |
120 | 116 | ||
117 | #define IRQ_S3C2440_CAM_C S3C2410_IRQSUB(11) /* S3C2443 too */ | ||
118 | #define IRQ_S3C2440_CAM_P S3C2410_IRQSUB(12) /* S3C2443 too */ | ||
119 | #define IRQ_S3C2440_WDT S3C2410_IRQSUB(13) | ||
120 | #define IRQ_S3C2440_AC97 S3C2410_IRQSUB(14) | ||
121 | |||
122 | /* irqs for s3c2443 */ | ||
123 | |||
124 | #define IRQ_S3C2443_DMA S3C2410_IRQ(17) /* IRQ_DMA1 */ | ||
125 | #define IRQ_S3C2443_UART3 S3C2410_IRQ(18) /* IRQ_DMA2 */ | ||
126 | #define IRQ_S3C2443_CFCON S3C2410_IRQ(19) /* IRQ_DMA3 */ | ||
127 | #define IRQ_S3C2443_SDI1 S3C2410_IRQ(20) /* IRQ_SDI */ | ||
128 | #define IRQ_S3C2443_NAND S3C2410_IRQ(24) /* reserved */ | ||
129 | |||
130 | #define IRQ_S3C2443_LCD1 S3C2410_IRQSUB(14) | ||
131 | #define IRQ_S3C2443_LCD2 S3C2410_IRQSUB(15) | ||
132 | #define IRQ_S3C2443_LCD3 S3C2410_IRQSUB(16) | ||
133 | #define IRQ_S3C2443_LCD4 S3C2410_IRQSUB(17) | ||
134 | |||
135 | #define IRQ_S3C2443_DMA0 S3C2410_IRQSUB(18) | ||
136 | #define IRQ_S3C2443_DMA1 S3C2410_IRQSUB(19) | ||
137 | #define IRQ_S3C2443_DMA2 S3C2410_IRQSUB(20) | ||
138 | #define IRQ_S3C2443_DMA3 S3C2410_IRQSUB(21) | ||
139 | #define IRQ_S3C2443_DMA4 S3C2410_IRQSUB(22) | ||
140 | #define IRQ_S3C2443_DMA5 S3C2410_IRQSUB(23) | ||
141 | |||
142 | /* UART3 */ | ||
143 | #define IRQ_S3C2443_RX3 S3C2410_IRQSUB(24) | ||
144 | #define IRQ_S3C2443_TX3 S3C2410_IRQSUB(25) | ||
145 | #define IRQ_S3C2443_ERR3 S3C2410_IRQSUB(26) | ||
146 | |||
147 | #define IRQ_S3C2443_WDT S3C2410_IRQSUB(27) | ||
148 | #define IRQ_S3C2443_AC97 S3C2410_IRQSUB(28) | ||
149 | |||
150 | #ifdef CONFIG_CPU_S3C2443 | ||
151 | #define NR_IRQS (IRQ_S3C2443_AC97+1) | ||
152 | #else | ||
153 | #define NR_IRQS (IRQ_S3C2440_AC97+1) | ||
154 | #endif | ||
121 | 155 | ||
122 | #endif /* __ASM_ARCH_IRQ_H */ | 156 | #endif /* __ASM_ARCH_IRQ_H */ |
diff --git a/include/asm-arm/arch-s3c2410/regs-adc.h b/include/asm-arm/arch-s3c2410/regs-adc.h index 3196a2849e8a..c7f231963e76 100644 --- a/include/asm-arm/arch-s3c2410/regs-adc.h +++ b/include/asm-arm/arch-s3c2410/regs-adc.h | |||
@@ -41,7 +41,7 @@ | |||
41 | #define S3C2410_ADCTSC_XP_SEN (1<<4) | 41 | #define S3C2410_ADCTSC_XP_SEN (1<<4) |
42 | #define S3C2410_ADCTSC_PULL_UP_DISABLE (1<<3) | 42 | #define S3C2410_ADCTSC_PULL_UP_DISABLE (1<<3) |
43 | #define S3C2410_ADCTSC_AUTO_PST (1<<2) | 43 | #define S3C2410_ADCTSC_AUTO_PST (1<<2) |
44 | #define S3C2410_ADCTSC_XY_PST (0x3<<0) | 44 | #define S3C2410_ADCTSC_XY_PST(x) (((x)&0x3)<<0) |
45 | 45 | ||
46 | /* ADCDAT0 Bits */ | 46 | /* ADCDAT0 Bits */ |
47 | #define S3C2410_ADCDAT0_UPDOWN (1<<15) | 47 | #define S3C2410_ADCDAT0_UPDOWN (1<<15) |
diff --git a/include/asm-arm/arch-s3c2410/regs-gpio.h b/include/asm-arm/arch-s3c2410/regs-gpio.h index eae91694edcd..dea578b8f7f6 100644 --- a/include/asm-arm/arch-s3c2410/regs-gpio.h +++ b/include/asm-arm/arch-s3c2410/regs-gpio.h | |||
@@ -201,7 +201,7 @@ | |||
201 | #define S3C2400_GPBDAT S3C2410_GPIOREG(0x0C) | 201 | #define S3C2400_GPBDAT S3C2410_GPIOREG(0x0C) |
202 | #define S3C2400_GPBUP S3C2410_GPIOREG(0x10) | 202 | #define S3C2400_GPBUP S3C2410_GPIOREG(0x10) |
203 | 203 | ||
204 | /* no i/o pin in port b can have value 3! */ | 204 | /* no i/o pin in port b can have value 3 (unless it is a s3c2443) ! */ |
205 | 205 | ||
206 | #define S3C2410_GPB0 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 0) | 206 | #define S3C2410_GPB0 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 0) |
207 | #define S3C2410_GPB0_INP (0x00 << 0) | 207 | #define S3C2410_GPB0_INP (0x00 << 0) |
@@ -242,6 +242,7 @@ | |||
242 | #define S3C2410_GPB5_INP (0x00 << 10) | 242 | #define S3C2410_GPB5_INP (0x00 << 10) |
243 | #define S3C2410_GPB5_OUTP (0x01 << 10) | 243 | #define S3C2410_GPB5_OUTP (0x01 << 10) |
244 | #define S3C2410_GPB5_nXBACK (0x02 << 10) | 244 | #define S3C2410_GPB5_nXBACK (0x02 << 10) |
245 | #define S3C2443_GPB5_XBACK (0x03 << 10) | ||
245 | #define S3C2400_GPB5_DATA21 (0x02 << 10) | 246 | #define S3C2400_GPB5_DATA21 (0x02 << 10) |
246 | #define S3C2400_GPB5_nCTS1 (0x03 << 10) | 247 | #define S3C2400_GPB5_nCTS1 (0x03 << 10) |
247 | 248 | ||
@@ -249,6 +250,7 @@ | |||
249 | #define S3C2410_GPB6_INP (0x00 << 12) | 250 | #define S3C2410_GPB6_INP (0x00 << 12) |
250 | #define S3C2410_GPB6_OUTP (0x01 << 12) | 251 | #define S3C2410_GPB6_OUTP (0x01 << 12) |
251 | #define S3C2410_GPB6_nXBREQ (0x02 << 12) | 252 | #define S3C2410_GPB6_nXBREQ (0x02 << 12) |
253 | #define S3C2443_GPB6_XBREQ (0x03 << 12) | ||
252 | #define S3C2400_GPB6_DATA22 (0x02 << 12) | 254 | #define S3C2400_GPB6_DATA22 (0x02 << 12) |
253 | #define S3C2400_GPB6_nRTS1 (0x03 << 12) | 255 | #define S3C2400_GPB6_nRTS1 (0x03 << 12) |
254 | 256 | ||
@@ -256,6 +258,7 @@ | |||
256 | #define S3C2410_GPB7_INP (0x00 << 14) | 258 | #define S3C2410_GPB7_INP (0x00 << 14) |
257 | #define S3C2410_GPB7_OUTP (0x01 << 14) | 259 | #define S3C2410_GPB7_OUTP (0x01 << 14) |
258 | #define S3C2410_GPB7_nXDACK1 (0x02 << 14) | 260 | #define S3C2410_GPB7_nXDACK1 (0x02 << 14) |
261 | #define S3C2443_GPB7_XDACK1 (0x03 << 14) | ||
259 | #define S3C2400_GPB7_DATA23 (0x02 << 14) | 262 | #define S3C2400_GPB7_DATA23 (0x02 << 14) |
260 | 263 | ||
261 | #define S3C2410_GPB8 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 8) | 264 | #define S3C2410_GPB8 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 8) |
@@ -268,6 +271,7 @@ | |||
268 | #define S3C2410_GPB9_INP (0x00 << 18) | 271 | #define S3C2410_GPB9_INP (0x00 << 18) |
269 | #define S3C2410_GPB9_OUTP (0x01 << 18) | 272 | #define S3C2410_GPB9_OUTP (0x01 << 18) |
270 | #define S3C2410_GPB9_nXDACK0 (0x02 << 18) | 273 | #define S3C2410_GPB9_nXDACK0 (0x02 << 18) |
274 | #define S3C2443_GPB9_XDACK0 (0x03 << 18) | ||
271 | #define S3C2400_GPB9_DATA25 (0x02 << 18) | 275 | #define S3C2400_GPB9_DATA25 (0x02 << 18) |
272 | #define S3C2400_GPB9_I2SSDI (0x03 << 18) | 276 | #define S3C2400_GPB9_I2SSDI (0x03 << 18) |
273 | 277 | ||
@@ -275,6 +279,7 @@ | |||
275 | #define S3C2410_GPB10_INP (0x00 << 20) | 279 | #define S3C2410_GPB10_INP (0x00 << 20) |
276 | #define S3C2410_GPB10_OUTP (0x01 << 20) | 280 | #define S3C2410_GPB10_OUTP (0x01 << 20) |
277 | #define S3C2410_GPB10_nXDRE0 (0x02 << 20) | 281 | #define S3C2410_GPB10_nXDRE0 (0x02 << 20) |
282 | #define S3C2443_GPB10_XDREQ0 (0x03 << 20) | ||
278 | #define S3C2400_GPB10_DATA26 (0x02 << 20) | 283 | #define S3C2400_GPB10_DATA26 (0x02 << 20) |
279 | #define S3C2400_GPB10_nSS (0x03 << 20) | 284 | #define S3C2400_GPB10_nSS (0x03 << 20) |
280 | 285 | ||
@@ -556,6 +561,7 @@ | |||
556 | #define S3C2410_GPE0_INP (0x00 << 0) | 561 | #define S3C2410_GPE0_INP (0x00 << 0) |
557 | #define S3C2410_GPE0_OUTP (0x01 << 0) | 562 | #define S3C2410_GPE0_OUTP (0x01 << 0) |
558 | #define S3C2410_GPE0_I2SLRCK (0x02 << 0) | 563 | #define S3C2410_GPE0_I2SLRCK (0x02 << 0) |
564 | #define S3C2443_GPE0_AC_nRESET (0x03 << 0) | ||
559 | #define S3C2400_GPE0_EINT0 (0x02 << 0) | 565 | #define S3C2400_GPE0_EINT0 (0x02 << 0) |
560 | #define S3C2410_GPE0_MASK (0x03 << 0) | 566 | #define S3C2410_GPE0_MASK (0x03 << 0) |
561 | 567 | ||
@@ -563,6 +569,7 @@ | |||
563 | #define S3C2410_GPE1_INP (0x00 << 2) | 569 | #define S3C2410_GPE1_INP (0x00 << 2) |
564 | #define S3C2410_GPE1_OUTP (0x01 << 2) | 570 | #define S3C2410_GPE1_OUTP (0x01 << 2) |
565 | #define S3C2410_GPE1_I2SSCLK (0x02 << 2) | 571 | #define S3C2410_GPE1_I2SSCLK (0x02 << 2) |
572 | #define S3C2443_GPE1_AC_SYNC (0x03 << 2) | ||
566 | #define S3C2400_GPE1_EINT1 (0x02 << 2) | 573 | #define S3C2400_GPE1_EINT1 (0x02 << 2) |
567 | #define S3C2400_GPE1_nSS (0x03 << 2) | 574 | #define S3C2400_GPE1_nSS (0x03 << 2) |
568 | #define S3C2410_GPE1_MASK (0x03 << 2) | 575 | #define S3C2410_GPE1_MASK (0x03 << 2) |
@@ -571,6 +578,7 @@ | |||
571 | #define S3C2410_GPE2_INP (0x00 << 4) | 578 | #define S3C2410_GPE2_INP (0x00 << 4) |
572 | #define S3C2410_GPE2_OUTP (0x01 << 4) | 579 | #define S3C2410_GPE2_OUTP (0x01 << 4) |
573 | #define S3C2410_GPE2_CDCLK (0x02 << 4) | 580 | #define S3C2410_GPE2_CDCLK (0x02 << 4) |
581 | #define S3C2443_GPE2_AC_BITCLK (0x03 << 4) | ||
574 | #define S3C2400_GPE2_EINT2 (0x02 << 4) | 582 | #define S3C2400_GPE2_EINT2 (0x02 << 4) |
575 | #define S3C2400_GPE2_I2SSDI (0x03 << 4) | 583 | #define S3C2400_GPE2_I2SSDI (0x03 << 4) |
576 | 584 | ||
@@ -578,6 +586,7 @@ | |||
578 | #define S3C2410_GPE3_INP (0x00 << 6) | 586 | #define S3C2410_GPE3_INP (0x00 << 6) |
579 | #define S3C2410_GPE3_OUTP (0x01 << 6) | 587 | #define S3C2410_GPE3_OUTP (0x01 << 6) |
580 | #define S3C2410_GPE3_I2SSDI (0x02 << 6) | 588 | #define S3C2410_GPE3_I2SSDI (0x02 << 6) |
589 | #define S3C2443_GPE3_AC_SDI (0x03 << 6) | ||
581 | #define S3C2400_GPE3_EINT3 (0x02 << 6) | 590 | #define S3C2400_GPE3_EINT3 (0x02 << 6) |
582 | #define S3C2400_GPE3_nCTS1 (0x03 << 6) | 591 | #define S3C2400_GPE3_nCTS1 (0x03 << 6) |
583 | #define S3C2410_GPE3_nSS0 (0x03 << 6) | 592 | #define S3C2410_GPE3_nSS0 (0x03 << 6) |
@@ -587,6 +596,7 @@ | |||
587 | #define S3C2410_GPE4_INP (0x00 << 8) | 596 | #define S3C2410_GPE4_INP (0x00 << 8) |
588 | #define S3C2410_GPE4_OUTP (0x01 << 8) | 597 | #define S3C2410_GPE4_OUTP (0x01 << 8) |
589 | #define S3C2410_GPE4_I2SSDO (0x02 << 8) | 598 | #define S3C2410_GPE4_I2SSDO (0x02 << 8) |
599 | #define S3C2443_GPE4_AC_SDO (0x03 << 8) | ||
590 | #define S3C2400_GPE4_EINT4 (0x02 << 8) | 600 | #define S3C2400_GPE4_EINT4 (0x02 << 8) |
591 | #define S3C2400_GPE4_nRTS1 (0x03 << 8) | 601 | #define S3C2400_GPE4_nRTS1 (0x03 << 8) |
592 | #define S3C2410_GPE4_I2SSDI (0x03 << 8) | 602 | #define S3C2410_GPE4_I2SSDI (0x03 << 8) |
@@ -596,6 +606,7 @@ | |||
596 | #define S3C2410_GPE5_INP (0x00 << 10) | 606 | #define S3C2410_GPE5_INP (0x00 << 10) |
597 | #define S3C2410_GPE5_OUTP (0x01 << 10) | 607 | #define S3C2410_GPE5_OUTP (0x01 << 10) |
598 | #define S3C2410_GPE5_SDCLK (0x02 << 10) | 608 | #define S3C2410_GPE5_SDCLK (0x02 << 10) |
609 | #define S3C2443_GPE5_SD1_CLK (0x02 << 10) | ||
599 | #define S3C2400_GPE5_EINT5 (0x02 << 10) | 610 | #define S3C2400_GPE5_EINT5 (0x02 << 10) |
600 | #define S3C2400_GPE5_TCLK1 (0x03 << 10) | 611 | #define S3C2400_GPE5_TCLK1 (0x03 << 10) |
601 | 612 | ||
@@ -603,24 +614,32 @@ | |||
603 | #define S3C2410_GPE6_INP (0x00 << 12) | 614 | #define S3C2410_GPE6_INP (0x00 << 12) |
604 | #define S3C2410_GPE6_OUTP (0x01 << 12) | 615 | #define S3C2410_GPE6_OUTP (0x01 << 12) |
605 | #define S3C2410_GPE6_SDCMD (0x02 << 12) | 616 | #define S3C2410_GPE6_SDCMD (0x02 << 12) |
617 | #define S3C2443_GPE6_SD1_CMD (0x02 << 12) | ||
618 | #define S3C2443_GPE6_AC_BITCLK (0x03 << 12) | ||
606 | #define S3C2400_GPE6_EINT6 (0x02 << 12) | 619 | #define S3C2400_GPE6_EINT6 (0x02 << 12) |
607 | 620 | ||
608 | #define S3C2410_GPE7 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 7) | 621 | #define S3C2410_GPE7 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 7) |
609 | #define S3C2410_GPE7_INP (0x00 << 14) | 622 | #define S3C2410_GPE7_INP (0x00 << 14) |
610 | #define S3C2410_GPE7_OUTP (0x01 << 14) | 623 | #define S3C2410_GPE7_OUTP (0x01 << 14) |
611 | #define S3C2410_GPE7_SDDAT0 (0x02 << 14) | 624 | #define S3C2410_GPE7_SDDAT0 (0x02 << 14) |
625 | #define S3C2443_GPE5_SD1_DAT0 (0x02 << 14) | ||
626 | #define S3C2443_GPE7_AC_SDI (0x03 << 14) | ||
612 | #define S3C2400_GPE7_EINT7 (0x02 << 14) | 627 | #define S3C2400_GPE7_EINT7 (0x02 << 14) |
613 | 628 | ||
614 | #define S3C2410_GPE8 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 8) | 629 | #define S3C2410_GPE8 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 8) |
615 | #define S3C2410_GPE8_INP (0x00 << 16) | 630 | #define S3C2410_GPE8_INP (0x00 << 16) |
616 | #define S3C2410_GPE8_OUTP (0x01 << 16) | 631 | #define S3C2410_GPE8_OUTP (0x01 << 16) |
617 | #define S3C2410_GPE8_SDDAT1 (0x02 << 16) | 632 | #define S3C2410_GPE8_SDDAT1 (0x02 << 16) |
633 | #define S3C2443_GPE8_SD1_DAT1 (0x02 << 16) | ||
634 | #define S3C2443_GPE8_AC_SDO (0x03 << 16) | ||
618 | #define S3C2400_GPE8_nXDACK0 (0x02 << 16) | 635 | #define S3C2400_GPE8_nXDACK0 (0x02 << 16) |
619 | 636 | ||
620 | #define S3C2410_GPE9 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 9) | 637 | #define S3C2410_GPE9 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 9) |
621 | #define S3C2410_GPE9_INP (0x00 << 18) | 638 | #define S3C2410_GPE9_INP (0x00 << 18) |
622 | #define S3C2410_GPE9_OUTP (0x01 << 18) | 639 | #define S3C2410_GPE9_OUTP (0x01 << 18) |
623 | #define S3C2410_GPE9_SDDAT2 (0x02 << 18) | 640 | #define S3C2410_GPE9_SDDAT2 (0x02 << 18) |
641 | #define S3C2443_GPE9_SD1_DAT2 (0x02 << 18) | ||
642 | #define S3C2443_GPE9_AC_SYNC (0x03 << 18) | ||
624 | #define S3C2400_GPE9_nXDACK1 (0x02 << 18) | 643 | #define S3C2400_GPE9_nXDACK1 (0x02 << 18) |
625 | #define S3C2400_GPE9_nXBACK (0x03 << 18) | 644 | #define S3C2400_GPE9_nXBACK (0x03 << 18) |
626 | 645 | ||
@@ -628,6 +647,8 @@ | |||
628 | #define S3C2410_GPE10_INP (0x00 << 20) | 647 | #define S3C2410_GPE10_INP (0x00 << 20) |
629 | #define S3C2410_GPE10_OUTP (0x01 << 20) | 648 | #define S3C2410_GPE10_OUTP (0x01 << 20) |
630 | #define S3C2410_GPE10_SDDAT3 (0x02 << 20) | 649 | #define S3C2410_GPE10_SDDAT3 (0x02 << 20) |
650 | #define S3C2443_GPE10_SD1_DAT3 (0x02 << 20) | ||
651 | #define S3C2443_GPE10_AC_nRESET (0x03 << 20) | ||
631 | #define S3C2400_GPE10_nXDREQ0 (0x02 << 20) | 652 | #define S3C2400_GPE10_nXDREQ0 (0x02 << 20) |
632 | 653 | ||
633 | #define S3C2410_GPE11 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 11) | 654 | #define S3C2410_GPE11 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 11) |
@@ -796,6 +817,7 @@ | |||
796 | #define S3C2400_GPG4_MMCCLK (0x02 << 8) | 817 | #define S3C2400_GPG4_MMCCLK (0x02 << 8) |
797 | #define S3C2400_GPG4_I2SSDI (0x03 << 8) | 818 | #define S3C2400_GPG4_I2SSDI (0x03 << 8) |
798 | #define S3C2410_GPG4_LCDPWREN (0x03 << 8) | 819 | #define S3C2410_GPG4_LCDPWREN (0x03 << 8) |
820 | #define S3C2443_GPG4_LCDPWRDN (0x03 << 8) | ||
799 | 821 | ||
800 | #define S3C2410_GPG5 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 5) | 822 | #define S3C2410_GPG5 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 5) |
801 | #define S3C2410_GPG5_INP (0x00 << 10) | 823 | #define S3C2410_GPG5_INP (0x00 << 10) |
@@ -803,7 +825,7 @@ | |||
803 | #define S3C2410_GPG5_EINT13 (0x02 << 10) | 825 | #define S3C2410_GPG5_EINT13 (0x02 << 10) |
804 | #define S3C2400_GPG5_MMCCMD (0x02 << 10) | 826 | #define S3C2400_GPG5_MMCCMD (0x02 << 10) |
805 | #define S3C2400_GPG5_IICSDA (0x03 << 10) | 827 | #define S3C2400_GPG5_IICSDA (0x03 << 10) |
806 | #define S3C2410_GPG5_SPIMISO1 (0x03 << 10) | 828 | #define S3C2410_GPG5_SPIMISO1 (0x03 << 10) /* not s3c2443 */ |
807 | 829 | ||
808 | #define S3C2410_GPG6 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 6) | 830 | #define S3C2410_GPG6 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 6) |
809 | #define S3C2410_GPG6_INP (0x00 << 12) | 831 | #define S3C2410_GPG6_INP (0x00 << 12) |
@@ -845,6 +867,7 @@ | |||
845 | #define S3C2410_GPG11_OUTP (0x01 << 22) | 867 | #define S3C2410_GPG11_OUTP (0x01 << 22) |
846 | #define S3C2410_GPG11_EINT19 (0x02 << 22) | 868 | #define S3C2410_GPG11_EINT19 (0x02 << 22) |
847 | #define S3C2410_GPG11_TCLK1 (0x03 << 22) | 869 | #define S3C2410_GPG11_TCLK1 (0x03 << 22) |
870 | #define S3C2443_GPG11_CF_nIREQ (0x03 << 22) | ||
848 | 871 | ||
849 | #define S3C2410_GPG12 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 12) | 872 | #define S3C2410_GPG12 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 12) |
850 | #define S3C2410_GPG12_INP (0x00 << 24) | 873 | #define S3C2410_GPG12_INP (0x00 << 24) |
@@ -852,25 +875,28 @@ | |||
852 | #define S3C2410_GPG12_EINT20 (0x02 << 24) | 875 | #define S3C2410_GPG12_EINT20 (0x02 << 24) |
853 | #define S3C2410_GPG12_XMON (0x03 << 24) | 876 | #define S3C2410_GPG12_XMON (0x03 << 24) |
854 | #define S3C2442_GPG12_nSPICS0 (0x03 << 24) | 877 | #define S3C2442_GPG12_nSPICS0 (0x03 << 24) |
878 | #define S3C2443_GPG12_nINPACK (0x03 << 24) | ||
855 | 879 | ||
856 | #define S3C2410_GPG13 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 13) | 880 | #define S3C2410_GPG13 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 13) |
857 | #define S3C2410_GPG13_INP (0x00 << 26) | 881 | #define S3C2410_GPG13_INP (0x00 << 26) |
858 | #define S3C2410_GPG13_OUTP (0x01 << 26) | 882 | #define S3C2410_GPG13_OUTP (0x01 << 26) |
859 | #define S3C2410_GPG13_EINT21 (0x02 << 26) | 883 | #define S3C2410_GPG13_EINT21 (0x02 << 26) |
860 | #define S3C2410_GPG13_nXPON (0x03 << 26) | 884 | #define S3C2410_GPG13_nXPON (0x03 << 26) |
885 | #define S3C2443_GPG13_CF_nREG (0x03 << 26) | ||
861 | 886 | ||
862 | #define S3C2410_GPG14 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 14) | 887 | #define S3C2410_GPG14 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 14) |
863 | #define S3C2410_GPG14_INP (0x00 << 28) | 888 | #define S3C2410_GPG14_INP (0x00 << 28) |
864 | #define S3C2410_GPG14_OUTP (0x01 << 28) | 889 | #define S3C2410_GPG14_OUTP (0x01 << 28) |
865 | #define S3C2410_GPG14_EINT22 (0x02 << 28) | 890 | #define S3C2410_GPG14_EINT22 (0x02 << 28) |
866 | #define S3C2410_GPG14_YMON (0x03 << 28) | 891 | #define S3C2410_GPG14_YMON (0x03 << 28) |
892 | #define S3C2443_GPG14_CF_RESET (0x03 << 28) | ||
867 | 893 | ||
868 | #define S3C2410_GPG15 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 15) | 894 | #define S3C2410_GPG15 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 15) |
869 | #define S3C2410_GPG15_INP (0x00 << 30) | 895 | #define S3C2410_GPG15_INP (0x00 << 30) |
870 | #define S3C2410_GPG15_OUTP (0x01 << 30) | 896 | #define S3C2410_GPG15_OUTP (0x01 << 30) |
871 | #define S3C2410_GPG15_EINT23 (0x02 << 30) | 897 | #define S3C2410_GPG15_EINT23 (0x02 << 30) |
872 | #define S3C2410_GPG15_nYPON (0x03 << 30) | 898 | #define S3C2410_GPG15_nYPON (0x03 << 30) |
873 | 899 | #define S3C2443_GPG15_CF_PWR (0x03 << 30) | |
874 | 900 | ||
875 | #define S3C2410_GPG_PUPDIS(x) (1<<(x)) | 901 | #define S3C2410_GPG_PUPDIS(x) (1<<(x)) |
876 | 902 | ||
diff --git a/include/asm-arm/arch-s3c2410/regs-s3c2443-clock.h b/include/asm-arm/arch-s3c2410/regs-s3c2443-clock.h new file mode 100644 index 000000000000..ff0536d2de42 --- /dev/null +++ b/include/asm-arm/arch-s3c2410/regs-s3c2443-clock.h | |||
@@ -0,0 +1,194 @@ | |||
1 | /* linux/include/asm-arm/arch-s3c2410/regs-clock.h | ||
2 | * | ||
3 | * Copyright (c) 2007 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * http://armlinux.simtec.co.uk/ | ||
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 | * S3C2443 clock register definitions | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASM_ARM_REGS_S3C2443_CLOCK | ||
15 | #define __ASM_ARM_REGS_S3C2443_CLOCK | ||
16 | |||
17 | #define S3C2443_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR) | ||
18 | |||
19 | #define S3C2443_PLLCON_MDIVSHIFT 16 | ||
20 | #define S3C2443_PLLCON_PDIVSHIFT 8 | ||
21 | #define S3C2443_PLLCON_SDIVSHIFT 0 | ||
22 | #define S3C2443_PLLCON_MDIVMASK ((1<<(1+(23-16)))-1) | ||
23 | #define S3C2443_PLLCON_PDIVMASK ((1<<(1+(9-8)))-1) | ||
24 | #define S3C2443_PLLCON_SDIVMASK (3) | ||
25 | |||
26 | #define S3C2443_MPLLCON S3C2443_CLKREG(0x10) | ||
27 | #define S3C2443_EPLLCON S3C2443_CLKREG(0x18) | ||
28 | #define S3C2443_CLKSRC S3C2443_CLKREG(0x20) | ||
29 | #define S3C2443_CLKDIV0 S3C2443_CLKREG(0x24) | ||
30 | #define S3C2443_CLKDIV1 S3C2443_CLKREG(0x28) | ||
31 | #define S3C2443_HCLKCON S3C2443_CLKREG(0x30) | ||
32 | #define S3C2443_PCLKCON S3C2443_CLKREG(0x34) | ||
33 | #define S3C2443_SCLKCON S3C2443_CLKREG(0x38) | ||
34 | #define S3C2443_PWRMODE S3C2443_CLKREG(0x40) | ||
35 | #define S3C2443_SWRST S3C2443_CLKREG(0x44) | ||
36 | #define S3C2443_BUSPRI0 S3C2443_CLKREG(0x50) | ||
37 | #define S3C2443_SYSID S3C2443_CLKREG(0x5C) | ||
38 | #define S3C2443_PWRCFG S3C2443_CLKREG(0x60) | ||
39 | #define S3C2443_RSTCON S3C2443_CLKREG(0x64) | ||
40 | |||
41 | #define S3C2443_SWRST_RESET (0x533c2443) | ||
42 | |||
43 | #define S3C2443_PLLCON_OFF (1<<24) | ||
44 | |||
45 | #define S3C2443_CLKSRC_I2S_EXT (1<<14) | ||
46 | #define S3C2443_CLKSRC_I2S_EPLLDIV (0<<14) | ||
47 | #define S3C2443_CLKSRC_I2S_EPLLREF (2<<14) | ||
48 | #define S3C2443_CLKSRC_I2S_EPLLREF3 (3<<14) | ||
49 | #define S3C2443_CLKSRC_I2S_MASK (3<<14) | ||
50 | |||
51 | #define S3C2443_CLKSRC_EPLLREF_XTAL (2<<8) | ||
52 | #define S3C2443_CLKSRC_EPLLREF_EXTCLK (3<<8) | ||
53 | #define S3C2443_CLKSRC_EPLLREF_MPLLREF (0<<8) | ||
54 | #define S3C2443_CLKSRC_EPLLREF_MPLLREF2 (1<<8) | ||
55 | #define S3C2443_CLKSRC_EPLLREF_MASK (3<<8) | ||
56 | |||
57 | #define S3C2443_CLKSRC_ESYSCLK_EPLL (1<<6) | ||
58 | #define S3C2443_CLKSRC_MSYSCLK_MPLL (1<<4) | ||
59 | #define S3C2443_CLKSRC_EXTCLK_DIV (1<<3) | ||
60 | |||
61 | #define S3C2443_CLKDIV0_DVS (1<<13) | ||
62 | #define S3C2443_CLKDIV0_HALF_HCLK (1<<3) | ||
63 | #define S3C2443_CLKDIV0_HALF_PCLK (1<<2) | ||
64 | |||
65 | #define S3C2443_CLKDIV0_HCLKDIV_MASK (3<<0) | ||
66 | |||
67 | #define S3C2443_CLKDIV0_EXTDIV_MASK (3<<6) | ||
68 | #define S3C2443_CLKDIV0_EXTDIV_SHIFT (6) | ||
69 | |||
70 | #define S3C2443_CLKDIV0_PREDIV_MASK (3<<4) | ||
71 | #define S3C2443_CLKDIV0_PREDIV_SHIFT (4) | ||
72 | |||
73 | #define S3C2443_CLKDIV0_ARMDIV_MASK (15<<9) | ||
74 | #define S3C2443_CLKDIV0_ARMDIV_SHIFT (9) | ||
75 | #define S3C2443_CLKDIV0_ARMDIV_1 (0<<9) | ||
76 | #define S3C2443_CLKDIV0_ARMDIV_2 (8<<9) | ||
77 | #define S3C2443_CLKDIV0_ARMDIV_3 (2<<9) | ||
78 | #define S3C2443_CLKDIV0_ARMDIV_4 (9<<9) | ||
79 | #define S3C2443_CLKDIV0_ARMDIV_6 (10<<9) | ||
80 | #define S3C2443_CLKDIV0_ARMDIV_8 (11<<9) | ||
81 | #define S3C2443_CLKDIV0_ARMDIV_12 (13<<9) | ||
82 | #define S3C2443_CLKDIV0_ARMDIV_16 (15<<9) | ||
83 | |||
84 | /* S3C2443_CLKDIV1 */ | ||
85 | |||
86 | #define S3C2443_CLKDIV1_CAMDIV_MASK (15<<26) | ||
87 | #define S3C2443_CLKDIV1_CAMDIV_SHIFT (26) | ||
88 | |||
89 | #define S3C2443_CLKDIV1_HSSPIDIV_MASK (3<<24) | ||
90 | #define S3C2443_CLKDIV1_HSSPIDIV_SHIFT (24) | ||
91 | |||
92 | #define S3C2443_CLKDIV1_DISPDIV_MASK (0xff<<16) | ||
93 | #define S3C2443_CLKDIV1_DISPDIV_SHIFT (16) | ||
94 | |||
95 | #define S3C2443_CLKDIV1_I2SDIV_MASK (15<<12) | ||
96 | #define S3C2443_CLKDIV1_I2SDIV_SHIFT (12) | ||
97 | |||
98 | #define S3C2443_CLKDIV1_UARTDIV_MASK (15<<8) | ||
99 | #define S3C2443_CLKDIV1_UARTDIV_SHIFT (8) | ||
100 | |||
101 | #define S3C2443_CLKDIV1_HSMMCDIV_MASK (3<<6) | ||
102 | #define S3C2443_CLKDIV1_HSMMCDIV_SHIFT (6) | ||
103 | |||
104 | #define S3C2443_CLKDIV1_USBHOSTDIV_MASK (3<<4) | ||
105 | #define S3C2443_CLKDIV1_USBHOSTDIV_SHIFT (4) | ||
106 | |||
107 | #define S3C2443_CLKCON_NAND | ||
108 | |||
109 | #define S3C2443_HCLKCON_DMA0 (1<<0) | ||
110 | #define S3C2443_HCLKCON_DMA1 (1<<1) | ||
111 | #define S3C2443_HCLKCON_DMA2 (1<<2) | ||
112 | #define S3C2443_HCLKCON_DMA3 (1<<3) | ||
113 | #define S3C2443_HCLKCON_DMA4 (1<<4) | ||
114 | #define S3C2443_HCLKCON_DMA5 (1<<5) | ||
115 | #define S3C2443_HCLKCON_CAMIF (1<<8) | ||
116 | #define S3C2443_HCLKCON_DISP (1<<9) | ||
117 | #define S3C2443_HCLKCON_LCDC (1<<10) | ||
118 | #define S3C2443_HCLKCON_USBH (1<<11) | ||
119 | #define S3C2443_HCLKCON_USBD (1<<12) | ||
120 | #define S3C2443_HCLKCON_HSMMC (1<<16) | ||
121 | #define S3C2443_HCLKCON_CFC (1<<17) | ||
122 | #define S3C2443_HCLKCON_SSMC (1<<18) | ||
123 | #define S3C2443_HCLKCON_DRAMC (1<<19) | ||
124 | |||
125 | #define S3C2443_PCLKCON_UART0 (1<<0) | ||
126 | #define S3C2443_PCLKCON_UART1 (1<<1) | ||
127 | #define S3C2443_PCLKCON_UART2 (1<<2) | ||
128 | #define S3C2443_PCLKCON_UART3 (1<<3) | ||
129 | #define S3C2443_PCLKCON_IIC (1<<4) | ||
130 | #define S3C2443_PCLKCON_SDI (1<<5) | ||
131 | #define S3C2443_PCLKCON_ADC (1<<7) | ||
132 | #define S3C2443_PCLKCON_IIS (1<<9) | ||
133 | #define S3C2443_PCLKCON_PWMT (1<<10) | ||
134 | #define S3C2443_PCLKCON_WDT (1<<11) | ||
135 | #define S3C2443_PCLKCON_RTC (1<<12) | ||
136 | #define S3C2443_PCLKCON_GPIO (1<<13) | ||
137 | #define S3C2443_PCLKCON_SPI0 (1<<14) | ||
138 | #define S3C2443_PCLKCON_SPI1 (1<<15) | ||
139 | |||
140 | #define S3C2443_SCLKCON_DDRCLK (1<<16) | ||
141 | #define S3C2443_SCLKCON_SSMCCLK (1<<15) | ||
142 | #define S3C2443_SCLKCON_HSSPICLK (1<<14) | ||
143 | #define S3C2443_SCLKCON_HSMMCCLK_EXT (1<<13) | ||
144 | #define S3C2443_SCLKCON_HSMMCCLK_EPLL (1<<12) | ||
145 | #define S3C2443_SCLKCON_CAMCLK (1<<11) | ||
146 | #define S3C2443_SCLKCON_DISPCLK (1<<10) | ||
147 | #define S3C2443_SCLKCON_I2SCLK (1<<9) | ||
148 | #define S3C2443_SCLKCON_UARTCLK (1<<8) | ||
149 | #define S3C2443_SCLKCON_USBHOST (1<<1) | ||
150 | |||
151 | #include <asm/div64.h> | ||
152 | |||
153 | static inline unsigned int | ||
154 | s3c2443_get_mpll(unsigned int pllval, unsigned int baseclk) | ||
155 | { | ||
156 | unsigned int mdiv, pdiv, sdiv; | ||
157 | uint64_t fvco; | ||
158 | |||
159 | mdiv = pllval >> S3C2443_PLLCON_MDIVSHIFT; | ||
160 | pdiv = pllval >> S3C2443_PLLCON_PDIVSHIFT; | ||
161 | sdiv = pllval >> S3C2443_PLLCON_SDIVSHIFT; | ||
162 | |||
163 | mdiv &= S3C2443_PLLCON_MDIVMASK; | ||
164 | pdiv &= S3C2443_PLLCON_PDIVMASK; | ||
165 | sdiv &= S3C2443_PLLCON_SDIVMASK; | ||
166 | |||
167 | fvco = (uint64_t)baseclk * (2 * (mdiv + 8)); | ||
168 | do_div(fvco, pdiv << sdiv); | ||
169 | |||
170 | return (unsigned int)fvco; | ||
171 | } | ||
172 | |||
173 | static inline unsigned int | ||
174 | s3c2443_get_epll(unsigned int pllval, unsigned int baseclk) | ||
175 | { | ||
176 | unsigned int mdiv, pdiv, sdiv; | ||
177 | uint64_t fvco; | ||
178 | |||
179 | mdiv = pllval >> S3C2443_PLLCON_MDIVSHIFT; | ||
180 | pdiv = pllval >> S3C2443_PLLCON_PDIVSHIFT; | ||
181 | sdiv = pllval >> S3C2443_PLLCON_SDIVSHIFT; | ||
182 | |||
183 | mdiv &= S3C2443_PLLCON_MDIVMASK; | ||
184 | pdiv &= S3C2443_PLLCON_PDIVMASK; | ||
185 | sdiv &= S3C2443_PLLCON_SDIVMASK; | ||
186 | |||
187 | fvco = (uint64_t)baseclk * (mdiv + 8); | ||
188 | do_div(fvco, (pdiv + 2) << sdiv); | ||
189 | |||
190 | return (unsigned int)fvco; | ||
191 | } | ||
192 | |||
193 | #endif /* __ASM_ARM_REGS_S3C2443_CLOCK */ | ||
194 | |||
diff --git a/include/asm-arm/arch-s3c2410/regs-serial.h b/include/asm-arm/arch-s3c2410/regs-serial.h index 46f52401d132..8946702a87f5 100644 --- a/include/asm-arm/arch-s3c2410/regs-serial.h +++ b/include/asm-arm/arch-s3c2410/regs-serial.h | |||
@@ -35,10 +35,12 @@ | |||
35 | #define S3C24XX_VA_UART0 (S3C24XX_VA_UART) | 35 | #define S3C24XX_VA_UART0 (S3C24XX_VA_UART) |
36 | #define S3C24XX_VA_UART1 (S3C24XX_VA_UART + 0x4000 ) | 36 | #define S3C24XX_VA_UART1 (S3C24XX_VA_UART + 0x4000 ) |
37 | #define S3C24XX_VA_UART2 (S3C24XX_VA_UART + 0x8000 ) | 37 | #define S3C24XX_VA_UART2 (S3C24XX_VA_UART + 0x8000 ) |
38 | #define S3C24XX_VA_UART3 (S3C24XX_VA_UART + 0xC000 ) | ||
38 | 39 | ||
39 | #define S3C2410_PA_UART0 (S3C24XX_PA_UART) | 40 | #define S3C2410_PA_UART0 (S3C24XX_PA_UART) |
40 | #define S3C2410_PA_UART1 (S3C24XX_PA_UART + 0x4000 ) | 41 | #define S3C2410_PA_UART1 (S3C24XX_PA_UART + 0x4000 ) |
41 | #define S3C2410_PA_UART2 (S3C24XX_PA_UART + 0x8000 ) | 42 | #define S3C2410_PA_UART2 (S3C24XX_PA_UART + 0x8000 ) |
43 | #define S3C2443_PA_UART3 (S3C24XX_PA_UART + 0xC000 ) | ||
42 | 44 | ||
43 | #define S3C2410_URXH (0x24) | 45 | #define S3C2410_URXH (0x24) |
44 | #define S3C2410_UTXH (0x20) | 46 | #define S3C2410_UTXH (0x20) |
@@ -73,6 +75,8 @@ | |||
73 | #define S3C2440_UCON_UCLK (1<<10) | 75 | #define S3C2440_UCON_UCLK (1<<10) |
74 | #define S3C2440_UCON_PCLK2 (2<<10) | 76 | #define S3C2440_UCON_PCLK2 (2<<10) |
75 | #define S3C2440_UCON_FCLK (3<<10) | 77 | #define S3C2440_UCON_FCLK (3<<10) |
78 | #define S3C2443_UCON_EPLL (3<<10) | ||
79 | |||
76 | #define S3C2440_UCON2_FCLK_EN (1<<15) | 80 | #define S3C2440_UCON2_FCLK_EN (1<<15) |
77 | #define S3C2440_UCON0_DIVMASK (15 << 12) | 81 | #define S3C2440_UCON0_DIVMASK (15 << 12) |
78 | #define S3C2440_UCON1_DIVMASK (15 << 12) | 82 | #define S3C2440_UCON1_DIVMASK (15 << 12) |
@@ -93,6 +97,8 @@ | |||
93 | #define S3C2410_UCON_TXIRQMODE (1<<2) | 97 | #define S3C2410_UCON_TXIRQMODE (1<<2) |
94 | #define S3C2410_UCON_RXIRQMODE (1<<0) | 98 | #define S3C2410_UCON_RXIRQMODE (1<<0) |
95 | #define S3C2410_UCON_RXFIFO_TOI (1<<7) | 99 | #define S3C2410_UCON_RXFIFO_TOI (1<<7) |
100 | #define S3C2443_UCON_RXERR_IRQEN (1<<6) | ||
101 | #define S3C2443_UCON_LOOPBACK (1<<5) | ||
96 | 102 | ||
97 | #define S3C2410_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ | 103 | #define S3C2410_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ |
98 | S3C2410_UCON_RXILEVEL | \ | 104 | S3C2410_UCON_RXILEVEL | \ |
@@ -127,7 +133,7 @@ | |||
127 | #define S3C2410_UMCOM_AFC (1<<4) | 133 | #define S3C2410_UMCOM_AFC (1<<4) |
128 | #define S3C2410_UMCOM_RTS_LOW (1<<0) | 134 | #define S3C2410_UMCOM_RTS_LOW (1<<0) |
129 | 135 | ||
130 | #define S3C2412_UMCON_AFC_63 (0<<5) | 136 | #define S3C2412_UMCON_AFC_63 (0<<5) /* same as s3c2443 */ |
131 | #define S3C2412_UMCON_AFC_56 (1<<5) | 137 | #define S3C2412_UMCON_AFC_56 (1<<5) |
132 | #define S3C2412_UMCON_AFC_48 (2<<5) | 138 | #define S3C2412_UMCON_AFC_48 (2<<5) |
133 | #define S3C2412_UMCON_AFC_40 (3<<5) | 139 | #define S3C2412_UMCON_AFC_40 (3<<5) |
@@ -143,6 +149,7 @@ | |||
143 | #define S3C2410_UFSTAT_RXMASK (15<<0) | 149 | #define S3C2410_UFSTAT_RXMASK (15<<0) |
144 | #define S3C2410_UFSTAT_RXSHIFT (0) | 150 | #define S3C2410_UFSTAT_RXSHIFT (0) |
145 | 151 | ||
152 | /* UFSTAT S3C2443 same as S3C2440 */ | ||
146 | #define S3C2440_UFSTAT_TXFULL (1<<14) | 153 | #define S3C2440_UFSTAT_TXFULL (1<<14) |
147 | #define S3C2440_UFSTAT_RXFULL (1<<6) | 154 | #define S3C2440_UFSTAT_RXFULL (1<<6) |
148 | #define S3C2440_UFSTAT_TXSHIFT (8) | 155 | #define S3C2440_UFSTAT_TXSHIFT (8) |
@@ -157,6 +164,8 @@ | |||
157 | #define S3C2410_UERSTAT_OVERRUN (1<<0) | 164 | #define S3C2410_UERSTAT_OVERRUN (1<<0) |
158 | #define S3C2410_UERSTAT_FRAME (1<<2) | 165 | #define S3C2410_UERSTAT_FRAME (1<<2) |
159 | #define S3C2410_UERSTAT_BREAK (1<<3) | 166 | #define S3C2410_UERSTAT_BREAK (1<<3) |
167 | #define S3C2443_UERSTAT_PARITY (1<<1) | ||
168 | |||
160 | #define S3C2410_UERSTAT_ANY (S3C2410_UERSTAT_OVERRUN | \ | 169 | #define S3C2410_UERSTAT_ANY (S3C2410_UERSTAT_OVERRUN | \ |
161 | S3C2410_UERSTAT_FRAME | \ | 170 | S3C2410_UERSTAT_FRAME | \ |
162 | S3C2410_UERSTAT_BREAK) | 171 | S3C2410_UERSTAT_BREAK) |
@@ -164,6 +173,8 @@ | |||
164 | #define S3C2410_UMSTAT_CTS (1<<0) | 173 | #define S3C2410_UMSTAT_CTS (1<<0) |
165 | #define S3C2410_UMSTAT_DeltaCTS (1<<2) | 174 | #define S3C2410_UMSTAT_DeltaCTS (1<<2) |
166 | 175 | ||
176 | #define S3C2443_DIVSLOT (0x2C) | ||
177 | |||
167 | #ifndef __ASSEMBLY__ | 178 | #ifndef __ASSEMBLY__ |
168 | 179 | ||
169 | /* struct s3c24xx_uart_clksrc | 180 | /* struct s3c24xx_uart_clksrc |
diff --git a/include/asm-arm/arch-s3c2410/reset.h b/include/asm-arm/arch-s3c2410/reset.h new file mode 100644 index 000000000000..4f866cdecab0 --- /dev/null +++ b/include/asm-arm/arch-s3c2410/reset.h | |||
@@ -0,0 +1,22 @@ | |||
1 | /* linux/include/asm-arm/arch-s3c2410/reset.h | ||
2 | * | ||
3 | * Copyright (c) 2007 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * http://armlinux.simtec.co.uk/ | ||
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 | * S3C2410 CPU reset controls | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASM_ARCH_RESET_H | ||
15 | #define __ASM_ARCH_RESET_H __FILE__ | ||
16 | |||
17 | /* This allows the over-ride of the default reset code | ||
18 | */ | ||
19 | |||
20 | extern void (*s3c24xx_reset_hook)(void); | ||
21 | |||
22 | #endif /* __ASM_ARCH_RESET_H */ | ||
diff --git a/include/asm-arm/arch-s3c2410/system.h b/include/asm-arm/arch-s3c2410/system.h index ecf250db45fb..1c74ef17da33 100644 --- a/include/asm-arm/arch-s3c2410/system.h +++ b/include/asm-arm/arch-s3c2410/system.h | |||
@@ -15,15 +15,16 @@ | |||
15 | 15 | ||
16 | #include <asm/arch/map.h> | 16 | #include <asm/arch/map.h> |
17 | #include <asm/arch/idle.h> | 17 | #include <asm/arch/idle.h> |
18 | #include <asm/arch/reset.h> | ||
18 | 19 | ||
19 | #include <asm/arch/regs-watchdog.h> | 20 | #include <asm/arch/regs-watchdog.h> |
20 | #include <asm/arch/regs-clock.h> | 21 | #include <asm/arch/regs-clock.h> |
21 | 22 | ||
22 | void (*s3c24xx_idle)(void); | 23 | void (*s3c24xx_idle)(void); |
24 | void (*s3c24xx_reset_hook)(void); | ||
23 | 25 | ||
24 | void s3c24xx_default_idle(void) | 26 | void s3c24xx_default_idle(void) |
25 | { | 27 | { |
26 | void __iomem *reg = S3C2410_CLKCON; | ||
27 | unsigned long tmp; | 28 | unsigned long tmp; |
28 | int i; | 29 | int i; |
29 | 30 | ||
@@ -33,16 +34,18 @@ void s3c24xx_default_idle(void) | |||
33 | 34 | ||
34 | /* Warning: going into idle state upsets jtag scanning */ | 35 | /* Warning: going into idle state upsets jtag scanning */ |
35 | 36 | ||
36 | __raw_writel(__raw_readl(reg) | (1<<2), reg); | 37 | __raw_writel(__raw_readl(S3C2410_CLKCON) | S3C2410_CLKCON_IDLE, |
38 | S3C2410_CLKCON); | ||
37 | 39 | ||
38 | /* the samsung port seems to do a loop and then unset idle.. */ | 40 | /* the samsung port seems to do a loop and then unset idle.. */ |
39 | for (i = 0; i < 50; i++) { | 41 | for (i = 0; i < 50; i++) { |
40 | tmp += __raw_readl(reg); /* ensure loop not optimised out */ | 42 | tmp += __raw_readl(S3C2410_CLKCON); /* ensure loop not optimised out */ |
41 | } | 43 | } |
42 | 44 | ||
43 | /* this bit is not cleared on re-start... */ | 45 | /* this bit is not cleared on re-start... */ |
44 | 46 | ||
45 | __raw_writel(__raw_readl(reg) & ~(1<<2), reg); | 47 | __raw_writel(__raw_readl(S3C2410_CLKCON) & ~S3C2410_CLKCON_IDLE, |
48 | S3C2410_CLKCON); | ||
46 | } | 49 | } |
47 | 50 | ||
48 | static void arch_idle(void) | 51 | static void arch_idle(void) |
@@ -53,7 +56,6 @@ static void arch_idle(void) | |||
53 | s3c24xx_default_idle(); | 56 | s3c24xx_default_idle(); |
54 | } | 57 | } |
55 | 58 | ||
56 | |||
57 | static void | 59 | static void |
58 | arch_reset(char mode) | 60 | arch_reset(char mode) |
59 | { | 61 | { |
@@ -61,6 +63,9 @@ arch_reset(char mode) | |||
61 | cpu_reset(0); | 63 | cpu_reset(0); |
62 | } | 64 | } |
63 | 65 | ||
66 | if (s3c24xx_reset_hook) | ||
67 | s3c24xx_reset_hook(); | ||
68 | |||
64 | printk("arch_reset: attempting watchdog reset\n"); | 69 | printk("arch_reset: attempting watchdog reset\n"); |
65 | 70 | ||
66 | __raw_writel(0, S3C2410_WTCON); /* disable watchdog, to be safe */ | 71 | __raw_writel(0, S3C2410_WTCON); /* disable watchdog, to be safe */ |
diff --git a/include/asm-arm/arch-s3c2410/udc.h b/include/asm-arm/arch-s3c2410/udc.h new file mode 100644 index 000000000000..e59ec339d614 --- /dev/null +++ b/include/asm-arm/arch-s3c2410/udc.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* linux/include/asm/arch-s3c2410/udc.h | ||
2 | * | ||
3 | * Copyright (c) 2005 Arnaud Patard <arnaud.patard@rtp-net.org> | ||
4 | * | ||
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 | * Changelog: | ||
12 | * 14-Mar-2005 RTP Created file | ||
13 | * 02-Aug-2005 RTP File rename | ||
14 | * 07-Sep-2005 BJD Minor cleanups, changed cmd to enum | ||
15 | * 18-Jan-2007 HMW Add per-platform vbus_draw function | ||
16 | */ | ||
17 | |||
18 | #ifndef __ASM_ARM_ARCH_UDC_H | ||
19 | #define __ASM_ARM_ARCH_UDC_H | ||
20 | |||
21 | enum s3c2410_udc_cmd_e { | ||
22 | S3C2410_UDC_P_ENABLE = 1, /* Pull-up enable */ | ||
23 | S3C2410_UDC_P_DISABLE = 2, /* Pull-up disable */ | ||
24 | S3C2410_UDC_P_RESET = 3, /* UDC reset, in case of */ | ||
25 | }; | ||
26 | |||
27 | struct s3c2410_udc_mach_info { | ||
28 | void (*udc_command)(enum s3c2410_udc_cmd_e); | ||
29 | void (*vbus_draw)(unsigned int ma); | ||
30 | unsigned int vbus_pin; | ||
31 | unsigned char vbus_pin_inverted; | ||
32 | }; | ||
33 | |||
34 | extern void __init s3c24xx_udc_set_platdata(struct s3c2410_udc_mach_info *); | ||
35 | |||
36 | #endif /* __ASM_ARM_ARCH_UDC_H */ | ||
diff --git a/include/asm-arm/arch-sa1100/entry-macro.S b/include/asm-arm/arch-sa1100/entry-macro.S index 51fb50ce1169..028967629340 100644 --- a/include/asm-arm/arch-sa1100/entry-macro.S +++ b/include/asm-arm/arch-sa1100/entry-macro.S | |||
@@ -11,6 +11,12 @@ | |||
11 | .macro disable_fiq | 11 | .macro disable_fiq |
12 | .endm | 12 | .endm |
13 | 13 | ||
14 | .macro get_irqnr_preamble, base, tmp | ||
15 | .endm | ||
16 | |||
17 | .macro arch_ret_to_user, tmp1, tmp2 | ||
18 | .endm | ||
19 | |||
14 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 20 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
15 | mov r4, #0xfa000000 @ ICIP = 0xfa050000 | 21 | mov r4, #0xfa000000 @ ICIP = 0xfa050000 |
16 | add r4, r4, #0x00050000 | 22 | add r4, r4, #0x00050000 |
diff --git a/include/asm-arm/arch-sa1100/gpio.h b/include/asm-arm/arch-sa1100/gpio.h new file mode 100644 index 000000000000..da7575b0e5d0 --- /dev/null +++ b/include/asm-arm/arch-sa1100/gpio.h | |||
@@ -0,0 +1,75 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-sa1100/gpio.h | ||
3 | * | ||
4 | * SA1100 GPIO wrappers for arch-neutral GPIO calls | ||
5 | * | ||
6 | * Written by Philipp Zabel <philipp.zabel@gmail.com> | ||
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 as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | * | ||
22 | */ | ||
23 | |||
24 | #ifndef __ASM_ARCH_SA1100_GPIO_H | ||
25 | #define __ASM_ARCH_SA1100_GPIO_H | ||
26 | |||
27 | #include <asm/hardware.h> | ||
28 | #include <asm/irq.h> | ||
29 | |||
30 | static inline int gpio_request(unsigned gpio, const char *label) | ||
31 | { | ||
32 | return 0; | ||
33 | } | ||
34 | |||
35 | static inline void gpio_free(unsigned gpio) | ||
36 | { | ||
37 | return; | ||
38 | } | ||
39 | |||
40 | extern int gpio_direction_input(unsigned gpio); | ||
41 | extern int gpio_direction_output(unsigned gpio); | ||
42 | |||
43 | |||
44 | static inline int gpio_get_value(unsigned gpio) | ||
45 | { | ||
46 | return GPLR & GPIO_GPIO(gpio); | ||
47 | } | ||
48 | |||
49 | static inline void gpio_set_value(unsigned gpio, int value) | ||
50 | { | ||
51 | if (value) | ||
52 | GPSR = GPIO_GPIO(gpio); | ||
53 | else | ||
54 | GPCR = GPIO_GPIO(gpio); | ||
55 | } | ||
56 | |||
57 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | ||
58 | |||
59 | static inline unsigned gpio_to_irq(unsigned gpio) | ||
60 | { | ||
61 | if (gpio < 11) | ||
62 | return IRQ_GPIO0 + gpio; | ||
63 | else | ||
64 | return IRQ_GPIO11 - 11 + gpio; | ||
65 | } | ||
66 | |||
67 | static inline unsigned irq_to_gpio(unsigned irq) | ||
68 | { | ||
69 | if (irq < IRQ_GPIO11_27) | ||
70 | return irq - IRQ_GPIO0; | ||
71 | else | ||
72 | return irq - IRQ_GPIO11 + 11; | ||
73 | } | ||
74 | |||
75 | #endif | ||
diff --git a/include/asm-arm/arch-shark/entry-macro.S b/include/asm-arm/arch-shark/entry-macro.S index a924f27fb8d9..82463f30f3df 100644 --- a/include/asm-arm/arch-shark/entry-macro.S +++ b/include/asm-arm/arch-shark/entry-macro.S | |||
@@ -10,6 +10,12 @@ | |||
10 | .macro disable_fiq | 10 | .macro disable_fiq |
11 | .endm | 11 | .endm |
12 | 12 | ||
13 | .macro get_irqnr_preamble, base, tmp | ||
14 | .endm | ||
15 | |||
16 | .macro arch_ret_to_user, tmp1, tmp2 | ||
17 | .endm | ||
18 | |||
13 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 19 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
14 | mov r4, #0xe0000000 | 20 | mov r4, #0xe0000000 |
15 | 21 | ||
diff --git a/include/asm-arm/arch-versatile/entry-macro.S b/include/asm-arm/arch-versatile/entry-macro.S index feff771c0a0a..0fae002637a0 100644 --- a/include/asm-arm/arch-versatile/entry-macro.S +++ b/include/asm-arm/arch-versatile/entry-macro.S | |||
@@ -13,6 +13,12 @@ | |||
13 | .macro disable_fiq | 13 | .macro disable_fiq |
14 | .endm | 14 | .endm |
15 | 15 | ||
16 | .macro get_irqnr_preamble, base, tmp | ||
17 | .endm | ||
18 | |||
19 | .macro arch_ret_to_user, tmp1, tmp2 | ||
20 | .endm | ||
21 | |||
16 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 22 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
17 | ldr \base, =IO_ADDRESS(VERSATILE_VIC_BASE) | 23 | ldr \base, =IO_ADDRESS(VERSATILE_VIC_BASE) |
18 | ldr \irqstat, [\base, #VIC_IRQ_STATUS] @ get masked status | 24 | ldr \irqstat, [\base, #VIC_IRQ_STATUS] @ get masked status |
diff --git a/include/asm-arm/cacheflush.h b/include/asm-arm/cacheflush.h index 5f531ea03059..afad32c76e6c 100644 --- a/include/asm-arm/cacheflush.h +++ b/include/asm-arm/cacheflush.h | |||
@@ -185,9 +185,15 @@ struct cpu_cache_fns { | |||
185 | void (*coherent_user_range)(unsigned long, unsigned long); | 185 | void (*coherent_user_range)(unsigned long, unsigned long); |
186 | void (*flush_kern_dcache_page)(void *); | 186 | void (*flush_kern_dcache_page)(void *); |
187 | 187 | ||
188 | void (*dma_inv_range)(unsigned long, unsigned long); | 188 | void (*dma_inv_range)(const void *, const void *); |
189 | void (*dma_clean_range)(unsigned long, unsigned long); | 189 | void (*dma_clean_range)(const void *, const void *); |
190 | void (*dma_flush_range)(unsigned long, unsigned long); | 190 | void (*dma_flush_range)(const void *, const void *); |
191 | }; | ||
192 | |||
193 | struct outer_cache_fns { | ||
194 | void (*inv_range)(unsigned long, unsigned long); | ||
195 | void (*clean_range)(unsigned long, unsigned long); | ||
196 | void (*flush_range)(unsigned long, unsigned long); | ||
191 | }; | 197 | }; |
192 | 198 | ||
193 | /* | 199 | /* |
@@ -240,9 +246,40 @@ extern void __cpuc_flush_dcache_page(void *); | |||
240 | #define dmac_clean_range __glue(_CACHE,_dma_clean_range) | 246 | #define dmac_clean_range __glue(_CACHE,_dma_clean_range) |
241 | #define dmac_flush_range __glue(_CACHE,_dma_flush_range) | 247 | #define dmac_flush_range __glue(_CACHE,_dma_flush_range) |
242 | 248 | ||
243 | extern void dmac_inv_range(unsigned long, unsigned long); | 249 | extern void dmac_inv_range(const void *, const void *); |
244 | extern void dmac_clean_range(unsigned long, unsigned long); | 250 | extern void dmac_clean_range(const void *, const void *); |
245 | extern void dmac_flush_range(unsigned long, unsigned long); | 251 | extern void dmac_flush_range(const void *, const void *); |
252 | |||
253 | #endif | ||
254 | |||
255 | #ifdef CONFIG_OUTER_CACHE | ||
256 | |||
257 | extern struct outer_cache_fns outer_cache; | ||
258 | |||
259 | static inline void outer_inv_range(unsigned long start, unsigned long end) | ||
260 | { | ||
261 | if (outer_cache.inv_range) | ||
262 | outer_cache.inv_range(start, end); | ||
263 | } | ||
264 | static inline void outer_clean_range(unsigned long start, unsigned long end) | ||
265 | { | ||
266 | if (outer_cache.clean_range) | ||
267 | outer_cache.clean_range(start, end); | ||
268 | } | ||
269 | static inline void outer_flush_range(unsigned long start, unsigned long end) | ||
270 | { | ||
271 | if (outer_cache.flush_range) | ||
272 | outer_cache.flush_range(start, end); | ||
273 | } | ||
274 | |||
275 | #else | ||
276 | |||
277 | static inline void outer_inv_range(unsigned long start, unsigned long end) | ||
278 | { } | ||
279 | static inline void outer_clean_range(unsigned long start, unsigned long end) | ||
280 | { } | ||
281 | static inline void outer_flush_range(unsigned long start, unsigned long end) | ||
282 | { } | ||
246 | 283 | ||
247 | #endif | 284 | #endif |
248 | 285 | ||
diff --git a/include/asm-arm/checksum.h b/include/asm-arm/checksum.h index 8c0bb5bb14ee..eaa0efd8d0d4 100644 --- a/include/asm-arm/checksum.h +++ b/include/asm-arm/checksum.h | |||
@@ -40,13 +40,27 @@ __wsum | |||
40 | csum_partial_copy_from_user(const void __user *src, void *dst, int len, __wsum sum, int *err_ptr); | 40 | csum_partial_copy_from_user(const void __user *src, void *dst, int len, __wsum sum, int *err_ptr); |
41 | 41 | ||
42 | /* | 42 | /* |
43 | * Fold a partial checksum without adding pseudo headers | ||
44 | */ | ||
45 | static inline __sum16 csum_fold(__wsum sum) | ||
46 | { | ||
47 | __asm__( | ||
48 | "add %0, %1, %1, ror #16 @ csum_fold" | ||
49 | : "=r" (sum) | ||
50 | : "r" (sum) | ||
51 | : "cc"); | ||
52 | return (__force __sum16)(~(__force u32)sum >> 16); | ||
53 | } | ||
54 | |||
55 | /* | ||
43 | * This is a version of ip_compute_csum() optimized for IP headers, | 56 | * This is a version of ip_compute_csum() optimized for IP headers, |
44 | * which always checksum on 4 octet boundaries. | 57 | * which always checksum on 4 octet boundaries. |
45 | */ | 58 | */ |
46 | static inline __sum16 | 59 | static inline __sum16 |
47 | ip_fast_csum(const void *iph, unsigned int ihl) | 60 | ip_fast_csum(const void *iph, unsigned int ihl) |
48 | { | 61 | { |
49 | unsigned int sum, tmp1; | 62 | unsigned int tmp1; |
63 | __wsum sum; | ||
50 | 64 | ||
51 | __asm__ __volatile__( | 65 | __asm__ __volatile__( |
52 | "ldr %0, [%1], #4 @ ip_fast_csum \n\ | 66 | "ldr %0, [%1], #4 @ ip_fast_csum \n\ |
@@ -62,29 +76,11 @@ ip_fast_csum(const void *iph, unsigned int ihl) | |||
62 | subne %2, %2, #1 @ without destroying \n\ | 76 | subne %2, %2, #1 @ without destroying \n\ |
63 | bne 1b @ the carry flag \n\ | 77 | bne 1b @ the carry flag \n\ |
64 | adcs %0, %0, %3 \n\ | 78 | adcs %0, %0, %3 \n\ |
65 | adc %0, %0, #0 \n\ | 79 | adc %0, %0, #0" |
66 | adds %0, %0, %0, lsl #16 \n\ | ||
67 | addcs %0, %0, #0x10000 \n\ | ||
68 | mvn %0, %0 \n\ | ||
69 | mov %0, %0, lsr #16" | ||
70 | : "=r" (sum), "=r" (iph), "=r" (ihl), "=r" (tmp1) | 80 | : "=r" (sum), "=r" (iph), "=r" (ihl), "=r" (tmp1) |
71 | : "1" (iph), "2" (ihl) | 81 | : "1" (iph), "2" (ihl) |
72 | : "cc", "memory"); | 82 | : "cc", "memory"); |
73 | return (__force __sum16)sum; | 83 | return csum_fold(sum); |
74 | } | ||
75 | |||
76 | /* | ||
77 | * Fold a partial checksum without adding pseudo headers | ||
78 | */ | ||
79 | static inline __sum16 csum_fold(__wsum sum) | ||
80 | { | ||
81 | __asm__( | ||
82 | "adds %0, %1, %1, lsl #16 @ csum_fold \n\ | ||
83 | addcs %0, %0, #0x10000" | ||
84 | : "=r" (sum) | ||
85 | : "r" (sum) | ||
86 | : "cc"); | ||
87 | return (__force __sum16)(~(__force u32)sum >> 16); | ||
88 | } | 84 | } |
89 | 85 | ||
90 | static inline __wsum | 86 | static inline __wsum |
@@ -114,23 +110,7 @@ static inline __sum16 | |||
114 | csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len, | 110 | csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len, |
115 | unsigned short proto, __wsum sum) | 111 | unsigned short proto, __wsum sum) |
116 | { | 112 | { |
117 | __asm__( | 113 | return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); |
118 | "adds %0, %1, %2 @ csum_tcpudp_magic \n\ | ||
119 | adcs %0, %0, %3 \n" | ||
120 | #ifdef __ARMEB__ | ||
121 | "adcs %0, %0, %4 \n" | ||
122 | #else | ||
123 | "adcs %0, %0, %4, lsl #8 \n" | ||
124 | #endif | ||
125 | "adcs %0, %0, %5 \n\ | ||
126 | adc %0, %0, #0 \n\ | ||
127 | adds %0, %0, %0, lsl #16 \n\ | ||
128 | addcs %0, %0, #0x10000 \n\ | ||
129 | mvn %0, %0" | ||
130 | : "=&r"(sum) | ||
131 | : "r" (sum), "r" (daddr), "r" (saddr), "r" (len), "Ir" (htons(proto)) | ||
132 | : "cc"); | ||
133 | return (__force __sum16)((__force u32)sum >> 16); | ||
134 | } | 114 | } |
135 | 115 | ||
136 | 116 | ||
diff --git a/include/asm-arm/device.h b/include/asm-arm/device.h index d8f9872b0e2d..c61642b40603 100644 --- a/include/asm-arm/device.h +++ b/include/asm-arm/device.h | |||
@@ -3,5 +3,13 @@ | |||
3 | * | 3 | * |
4 | * This file is released under the GPLv2 | 4 | * This file is released under the GPLv2 |
5 | */ | 5 | */ |
6 | #include <asm-generic/device.h> | 6 | #ifndef ASMARM_DEVICE_H |
7 | #define ASMARM_DEVICE_H | ||
7 | 8 | ||
9 | struct dev_archdata { | ||
10 | #ifdef CONFIG_DMABOUNCE | ||
11 | struct dmabounce_device_info *dmabounce; | ||
12 | #endif | ||
13 | }; | ||
14 | |||
15 | #endif | ||
diff --git a/include/asm-arm/dma-mapping.h b/include/asm-arm/dma-mapping.h index 9bc46b486afb..abfb75b654c7 100644 --- a/include/asm-arm/dma-mapping.h +++ b/include/asm-arm/dma-mapping.h | |||
@@ -17,7 +17,7 @@ | |||
17 | * platforms with CONFIG_DMABOUNCE. | 17 | * platforms with CONFIG_DMABOUNCE. |
18 | * Use the driver DMA support - see dma-mapping.h (dma_sync_*) | 18 | * Use the driver DMA support - see dma-mapping.h (dma_sync_*) |
19 | */ | 19 | */ |
20 | extern void consistent_sync(void *kaddr, size_t size, int rw); | 20 | extern void consistent_sync(const void *kaddr, size_t size, int rw); |
21 | 21 | ||
22 | /* | 22 | /* |
23 | * Return whether the given device DMA address mask can be supported | 23 | * Return whether the given device DMA address mask can be supported |
@@ -61,6 +61,22 @@ static inline int dma_mapping_error(dma_addr_t dma_addr) | |||
61 | return dma_addr == ~0; | 61 | return dma_addr == ~0; |
62 | } | 62 | } |
63 | 63 | ||
64 | /* | ||
65 | * Dummy noncoherent implementation. We don't provide a dma_cache_sync | ||
66 | * function so drivers using this API are highlighted with build warnings. | ||
67 | */ | ||
68 | static inline void * | ||
69 | dma_alloc_noncoherent(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp) | ||
70 | { | ||
71 | return NULL; | ||
72 | } | ||
73 | |||
74 | static inline void | ||
75 | dma_free_noncoherent(struct device *dev, size_t size, void *cpu_addr, | ||
76 | dma_addr_t handle) | ||
77 | { | ||
78 | } | ||
79 | |||
64 | /** | 80 | /** |
65 | * dma_alloc_coherent - allocate consistent memory for DMA | 81 | * dma_alloc_coherent - allocate consistent memory for DMA |
66 | * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices | 82 | * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices |
diff --git a/include/asm-arm/domain.h b/include/asm-arm/domain.h index 4c2885abbe6c..3c12a7625304 100644 --- a/include/asm-arm/domain.h +++ b/include/asm-arm/domain.h | |||
@@ -57,6 +57,7 @@ | |||
57 | __asm__ __volatile__( \ | 57 | __asm__ __volatile__( \ |
58 | "mcr p15, 0, %0, c3, c0 @ set domain" \ | 58 | "mcr p15, 0, %0, c3, c0 @ set domain" \ |
59 | : : "r" (x)); \ | 59 | : : "r" (x)); \ |
60 | isb(); \ | ||
60 | } while (0) | 61 | } while (0) |
61 | 62 | ||
62 | #define modify_domain(dom,type) \ | 63 | #define modify_domain(dom,type) \ |
diff --git a/include/asm-arm/gpio.h b/include/asm-arm/gpio.h new file mode 100644 index 000000000000..fff4f800ee42 --- /dev/null +++ b/include/asm-arm/gpio.h | |||
@@ -0,0 +1,7 @@ | |||
1 | #ifndef _ARCH_ARM_GPIO_H | ||
2 | #define _ARCH_ARM_GPIO_H | ||
3 | |||
4 | /* not all ARM platforms necessarily support this API ... */ | ||
5 | #include <asm/arch/gpio.h> | ||
6 | |||
7 | #endif /* _ARCH_ARM_GPIO_H */ | ||
diff --git a/include/asm-arm/hardware/arm_scu.h b/include/asm-arm/hardware/arm_scu.h index 9903f60c84b7..7d28eb5a1758 100644 --- a/include/asm-arm/hardware/arm_scu.h +++ b/include/asm-arm/hardware/arm_scu.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef ASMARM_HARDWARE_ARM_SCU_H | 1 | #ifndef ASMARM_HARDWARE_ARM_SCU_H |
2 | #define ASMARM_HARDWARE_ARM_SCU_H | 2 | #define ASMARM_HARDWARE_ARM_SCU_H |
3 | 3 | ||
4 | #include <asm/arch/scu.h> | ||
5 | |||
4 | /* | 6 | /* |
5 | * SCU registers | 7 | * SCU registers |
6 | */ | 8 | */ |
diff --git a/include/asm-arm/hardware/cache-l2x0.h b/include/asm-arm/hardware/cache-l2x0.h new file mode 100644 index 000000000000..54029a740396 --- /dev/null +++ b/include/asm-arm/hardware/cache-l2x0.h | |||
@@ -0,0 +1,56 @@ | |||
1 | /* | ||
2 | * include/asm-arm/hardware/cache-l2x0.h | ||
3 | * | ||
4 | * Copyright (C) 2007 ARM Limited | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | #ifndef __ASM_ARM_HARDWARE_L2X0_H | ||
21 | #define __ASM_ARM_HARDWARE_L2X0_H | ||
22 | |||
23 | #define L2X0_CACHE_ID 0x000 | ||
24 | #define L2X0_CACHE_TYPE 0x004 | ||
25 | #define L2X0_CTRL 0x100 | ||
26 | #define L2X0_AUX_CTRL 0x104 | ||
27 | #define L2X0_EVENT_CNT_CTRL 0x200 | ||
28 | #define L2X0_EVENT_CNT1_CFG 0x204 | ||
29 | #define L2X0_EVENT_CNT0_CFG 0x208 | ||
30 | #define L2X0_EVENT_CNT1_VAL 0x20C | ||
31 | #define L2X0_EVENT_CNT0_VAL 0x210 | ||
32 | #define L2X0_INTR_MASK 0x214 | ||
33 | #define L2X0_MASKED_INTR_STAT 0x218 | ||
34 | #define L2X0_RAW_INTR_STAT 0x21C | ||
35 | #define L2X0_INTR_CLEAR 0x220 | ||
36 | #define L2X0_CACHE_SYNC 0x730 | ||
37 | #define L2X0_INV_LINE_PA 0x770 | ||
38 | #define L2X0_INV_WAY 0x77C | ||
39 | #define L2X0_CLEAN_LINE_PA 0x7B0 | ||
40 | #define L2X0_CLEAN_LINE_IDX 0x7B8 | ||
41 | #define L2X0_CLEAN_WAY 0x7BC | ||
42 | #define L2X0_CLEAN_INV_LINE_PA 0x7F0 | ||
43 | #define L2X0_CLEAN_INV_LINE_IDX 0x7F8 | ||
44 | #define L2X0_CLEAN_INV_WAY 0x7FC | ||
45 | #define L2X0_LOCKDOWN_WAY_D 0x900 | ||
46 | #define L2X0_LOCKDOWN_WAY_I 0x904 | ||
47 | #define L2X0_TEST_OPERATION 0xF00 | ||
48 | #define L2X0_LINE_DATA 0xF10 | ||
49 | #define L2X0_LINE_TAG 0xF30 | ||
50 | #define L2X0_DEBUG_CTRL 0xF40 | ||
51 | |||
52 | #ifndef __ASSEMBLY__ | ||
53 | extern void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask); | ||
54 | #endif | ||
55 | |||
56 | #endif | ||
diff --git a/include/asm-arm/hardware/gic.h b/include/asm-arm/hardware/gic.h index 3fa5eb70f64e..966e428ad32c 100644 --- a/include/asm-arm/hardware/gic.h +++ b/include/asm-arm/hardware/gic.h | |||
@@ -33,8 +33,9 @@ | |||
33 | #define GIC_DIST_SOFTINT 0xf00 | 33 | #define GIC_DIST_SOFTINT 0xf00 |
34 | 34 | ||
35 | #ifndef __ASSEMBLY__ | 35 | #ifndef __ASSEMBLY__ |
36 | void gic_dist_init(void __iomem *base); | 36 | void gic_dist_init(unsigned int gic_nr, void __iomem *base, unsigned int irq_start); |
37 | void gic_cpu_init(void __iomem *base); | 37 | void gic_cpu_init(unsigned int gic_nr, void __iomem *base); |
38 | void gic_cascade_irq(unsigned int gic_nr, unsigned int irq); | ||
38 | void gic_raise_softirq(cpumask_t cpumask, unsigned int irq); | 39 | void gic_raise_softirq(cpumask_t cpumask, unsigned int irq); |
39 | #endif | 40 | #endif |
40 | 41 | ||
diff --git a/include/asm-arm/hardware/gpio_keys.h b/include/asm-arm/hardware/gpio_keys.h new file mode 100644 index 000000000000..2b217c7b9312 --- /dev/null +++ b/include/asm-arm/hardware/gpio_keys.h | |||
@@ -0,0 +1,17 @@ | |||
1 | #ifndef _GPIO_KEYS_H | ||
2 | #define _GPIO_KEYS_H | ||
3 | |||
4 | struct gpio_keys_button { | ||
5 | /* Configuration parameters */ | ||
6 | int keycode; | ||
7 | int gpio; | ||
8 | int active_low; | ||
9 | char *desc; | ||
10 | }; | ||
11 | |||
12 | struct gpio_keys_platform_data { | ||
13 | struct gpio_keys_button *buttons; | ||
14 | int nbuttons; | ||
15 | }; | ||
16 | |||
17 | #endif | ||
diff --git a/include/asm-arm/hardware/iop3xx.h b/include/asm-arm/hardware/iop3xx.h index 13ac8a4cd01f..15141a9caca8 100644 --- a/include/asm-arm/hardware/iop3xx.h +++ b/include/asm-arm/hardware/iop3xx.h | |||
@@ -37,6 +37,13 @@ extern void gpio_line_set(int line, int value); | |||
37 | #define IOP3XX_PERIPHERAL_PHYS_BASE 0xffffe000 | 37 | #define IOP3XX_PERIPHERAL_PHYS_BASE 0xffffe000 |
38 | #define IOP3XX_PERIPHERAL_VIRT_BASE 0xfeffe000 | 38 | #define IOP3XX_PERIPHERAL_VIRT_BASE 0xfeffe000 |
39 | #define IOP3XX_PERIPHERAL_SIZE 0x00002000 | 39 | #define IOP3XX_PERIPHERAL_SIZE 0x00002000 |
40 | #define IOP3XX_PERIPHERAL_UPPER_PA (IOP3XX_PERIPHERAL_PHYS_BASE +\ | ||
41 | IOP3XX_PERIPHERAL_SIZE - 1) | ||
42 | #define IOP3XX_PERIPHERAL_UPPER_VA (IOP3XX_PERIPHERAL_VIRT_BASE +\ | ||
43 | IOP3XX_PERIPHERAL_SIZE - 1) | ||
44 | #define IOP3XX_PMMR_PHYS_TO_VIRT(addr) (u32) ((u32) addr -\ | ||
45 | (IOP3XX_PERIPHERAL_PHYS_BASE\ | ||
46 | - IOP3XX_PERIPHERAL_VIRT_BASE)) | ||
40 | #define IOP3XX_REG_ADDR(reg) (IOP3XX_PERIPHERAL_VIRT_BASE + (reg)) | 47 | #define IOP3XX_REG_ADDR(reg) (IOP3XX_PERIPHERAL_VIRT_BASE + (reg)) |
41 | 48 | ||
42 | /* Address Translation Unit */ | 49 | /* Address Translation Unit */ |
@@ -181,14 +188,10 @@ extern void gpio_line_set(int line, int value); | |||
181 | #define IOP3XX_TU_TRR1 (volatile u32 *)IOP3XX_TIMER_REG(0x0014) | 188 | #define IOP3XX_TU_TRR1 (volatile u32 *)IOP3XX_TIMER_REG(0x0014) |
182 | #define IOP3XX_TU_TISR (volatile u32 *)IOP3XX_TIMER_REG(0x0018) | 189 | #define IOP3XX_TU_TISR (volatile u32 *)IOP3XX_TIMER_REG(0x0018) |
183 | #define IOP3XX_TU_WDTCR (volatile u32 *)IOP3XX_TIMER_REG(0x001c) | 190 | #define IOP3XX_TU_WDTCR (volatile u32 *)IOP3XX_TIMER_REG(0x001c) |
184 | #define IOP3XX_TMR_TC 0x01 | 191 | #define IOP_TMR_EN 0x02 |
185 | #define IOP3XX_TMR_EN 0x02 | 192 | #define IOP_TMR_RELOAD 0x04 |
186 | #define IOP3XX_TMR_RELOAD 0x04 | 193 | #define IOP_TMR_PRIVILEGED 0x08 |
187 | #define IOP3XX_TMR_PRIVILEGED 0x09 | 194 | #define IOP_TMR_RATIO_1_1 0x00 |
188 | #define IOP3XX_TMR_RATIO_1_1 0x00 | ||
189 | #define IOP3XX_TMR_RATIO_4_1 0x10 | ||
190 | #define IOP3XX_TMR_RATIO_8_1 0x20 | ||
191 | #define IOP3XX_TMR_RATIO_16_1 0x30 | ||
192 | 195 | ||
193 | /* Application accelerator unit */ | 196 | /* Application accelerator unit */ |
194 | #define IOP3XX_AAU_ACR (volatile u32 *)IOP3XX_REG_ADDR(0x0800) | 197 | #define IOP3XX_AAU_ACR (volatile u32 *)IOP3XX_REG_ADDR(0x0800) |
@@ -258,43 +261,63 @@ extern void gpio_line_set(int line, int value); | |||
258 | #define IOP3XX_PCI_LOWER_IO_PA 0x90000000 | 261 | #define IOP3XX_PCI_LOWER_IO_PA 0x90000000 |
259 | #define IOP3XX_PCI_LOWER_IO_VA 0xfe000000 | 262 | #define IOP3XX_PCI_LOWER_IO_VA 0xfe000000 |
260 | #define IOP3XX_PCI_LOWER_IO_BA (*IOP3XX_OIOWTVR) | 263 | #define IOP3XX_PCI_LOWER_IO_BA (*IOP3XX_OIOWTVR) |
264 | #define IOP3XX_PCI_UPPER_IO_PA (IOP3XX_PCI_LOWER_IO_PA +\ | ||
265 | IOP3XX_PCI_IO_WINDOW_SIZE - 1) | ||
266 | #define IOP3XX_PCI_UPPER_IO_VA (IOP3XX_PCI_LOWER_IO_VA +\ | ||
267 | IOP3XX_PCI_IO_WINDOW_SIZE - 1) | ||
268 | #define IOP3XX_PCI_IO_PHYS_TO_VIRT(addr) (((u32) addr -\ | ||
269 | IOP3XX_PCI_LOWER_IO_PA) +\ | ||
270 | IOP3XX_PCI_LOWER_IO_VA) | ||
261 | 271 | ||
262 | 272 | ||
263 | #ifndef __ASSEMBLY__ | 273 | #ifndef __ASSEMBLY__ |
264 | void iop3xx_map_io(void); | 274 | void iop3xx_map_io(void); |
265 | void iop3xx_init_time(unsigned long); | 275 | void iop_init_cp6_handler(void); |
266 | unsigned long iop3xx_gettimeoffset(void); | 276 | void iop_init_time(unsigned long tickrate); |
277 | unsigned long iop_gettimeoffset(void); | ||
267 | 278 | ||
268 | extern struct platform_device iop3xx_i2c0_device; | 279 | static inline void write_tmr0(u32 val) |
269 | extern struct platform_device iop3xx_i2c1_device; | 280 | { |
281 | asm volatile("mcr p6, 0, %0, c0, c1, 0" : : "r" (val)); | ||
282 | } | ||
283 | |||
284 | static inline void write_tmr1(u32 val) | ||
285 | { | ||
286 | asm volatile("mcr p6, 0, %0, c1, c1, 0" : : "r" (val)); | ||
287 | } | ||
288 | |||
289 | static inline u32 read_tcr0(void) | ||
290 | { | ||
291 | u32 val; | ||
292 | asm volatile("mrc p6, 0, %0, c2, c1, 0" : "=r" (val)); | ||
293 | return val; | ||
294 | } | ||
270 | 295 | ||
271 | extern inline void iop3xx_cp6_enable(void) | 296 | static inline u32 read_tcr1(void) |
272 | { | 297 | { |
273 | u32 temp; | 298 | u32 val; |
299 | asm volatile("mrc p6, 0, %0, c3, c1, 0" : "=r" (val)); | ||
300 | return val; | ||
301 | } | ||
274 | 302 | ||
275 | asm volatile ( | 303 | static inline void write_trr0(u32 val) |
276 | "mrc p15, 0, %0, c15, c1, 0\n\t" | 304 | { |
277 | "orr %0, %0, #(1 << 6)\n\t" | 305 | asm volatile("mcr p6, 0, %0, c4, c1, 0" : : "r" (val)); |
278 | "mcr p15, 0, %0, c15, c1, 0\n\t" | ||
279 | "mrc p15, 0, %0, c15, c1, 0\n\t" | ||
280 | "mov %0, %0\n\t" | ||
281 | "sub pc, pc, #4\n\t" | ||
282 | : "=r" (temp) ); | ||
283 | } | 306 | } |
284 | 307 | ||
285 | extern inline void iop3xx_cp6_disable(void) | 308 | static inline void write_trr1(u32 val) |
286 | { | 309 | { |
287 | u32 temp; | 310 | asm volatile("mcr p6, 0, %0, c5, c1, 0" : : "r" (val)); |
311 | } | ||
288 | 312 | ||
289 | asm volatile ( | 313 | static inline void write_tisr(u32 val) |
290 | "mrc p15, 0, %0, c15, c1, 0\n\t" | 314 | { |
291 | "bic %0, %0, #(1 << 6)\n\t" | 315 | asm volatile("mcr p6, 0, %0, c6, c1, 0" : : "r" (val)); |
292 | "mcr p15, 0, %0, c15, c1, 0\n\t" | ||
293 | "mrc p15, 0, %0, c15, c1, 0\n\t" | ||
294 | "mov %0, %0\n\t" | ||
295 | "sub pc, pc, #4\n\t" | ||
296 | : "=r" (temp) ); | ||
297 | } | 316 | } |
317 | |||
318 | extern struct platform_device iop3xx_i2c0_device; | ||
319 | extern struct platform_device iop3xx_i2c1_device; | ||
320 | |||
298 | #endif | 321 | #endif |
299 | 322 | ||
300 | 323 | ||
diff --git a/include/asm-arm/hardware/sa1111.h b/include/asm-arm/hardware/sa1111.h index 6aa0a5b75b69..61b1d05c7df7 100644 --- a/include/asm-arm/hardware/sa1111.h +++ b/include/asm-arm/hardware/sa1111.h | |||
@@ -29,6 +29,9 @@ | |||
29 | #define _SA1111(x) ((x) + sa1111->resource.start) | 29 | #define _SA1111(x) ((x) + sa1111->resource.start) |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | #define sa1111_writel(val,addr) __raw_writel(val, addr) | ||
33 | #define sa1111_readl(addr) __raw_readl(addr) | ||
34 | |||
32 | /* | 35 | /* |
33 | * 26 bits of the SA-1110 address bus are available to the SA-1111. | 36 | * 26 bits of the SA-1110 address bus are available to the SA-1111. |
34 | * Use these when feeding target addresses to the DMA engines. | 37 | * Use these when feeding target addresses to the DMA engines. |
@@ -45,14 +48,6 @@ | |||
45 | #define SA1111_SAC_DMA_MIN_XFER (0x800) | 48 | #define SA1111_SAC_DMA_MIN_XFER (0x800) |
46 | 49 | ||
47 | /* | 50 | /* |
48 | * SA1111 register definitions. | ||
49 | */ | ||
50 | #define __CCREG(x) __REGP(SA1111_VBASE + (x)) | ||
51 | |||
52 | #define sa1111_writel(val,addr) __raw_writel(val, addr) | ||
53 | #define sa1111_readl(addr) __raw_readl(addr) | ||
54 | |||
55 | /* | ||
56 | * System Bus Interface (SBI) | 51 | * System Bus Interface (SBI) |
57 | * | 52 | * |
58 | * Registers | 53 | * Registers |
@@ -194,55 +189,37 @@ | |||
194 | * SADR Serial Audio Data Register (16 x 32-bit) | 189 | * SADR Serial Audio Data Register (16 x 32-bit) |
195 | */ | 190 | */ |
196 | 191 | ||
197 | #define _SACR0 _SA1111( 0x0600 ) | 192 | #define SA1111_SERAUDIO 0x0600 |
198 | #define _SACR1 _SA1111( 0x0604 ) | 193 | |
199 | #define _SACR2 _SA1111( 0x0608 ) | 194 | /* |
200 | #define _SASR0 _SA1111( 0x060c ) | 195 | * These are offsets from the above base. |
201 | #define _SASR1 _SA1111( 0x0610 ) | 196 | */ |
202 | #define _SASCR _SA1111( 0x0618 ) | 197 | #define SA1111_SACR0 0x00 |
203 | #define _L3_CAR _SA1111( 0x061c ) | 198 | #define SA1111_SACR1 0x04 |
204 | #define _L3_CDR _SA1111( 0x0620 ) | 199 | #define SA1111_SACR2 0x08 |
205 | #define _ACCAR _SA1111( 0x0624 ) | 200 | #define SA1111_SASR0 0x0c |
206 | #define _ACCDR _SA1111( 0x0628 ) | 201 | #define SA1111_SASR1 0x10 |
207 | #define _ACSAR _SA1111( 0x062c ) | 202 | #define SA1111_SASCR 0x18 |
208 | #define _ACSDR _SA1111( 0x0630 ) | 203 | #define SA1111_L3_CAR 0x1c |
209 | #define _SADTCS _SA1111( 0x0634 ) | 204 | #define SA1111_L3_CDR 0x20 |
210 | #define _SADTSA _SA1111( 0x0638 ) | 205 | #define SA1111_ACCAR 0x24 |
211 | #define _SADTCA _SA1111( 0x063c ) | 206 | #define SA1111_ACCDR 0x28 |
212 | #define _SADTSB _SA1111( 0x0640 ) | 207 | #define SA1111_ACSAR 0x2c |
213 | #define _SADTCB _SA1111( 0x0644 ) | 208 | #define SA1111_ACSDR 0x30 |
214 | #define _SADRCS _SA1111( 0x0648 ) | 209 | #define SA1111_SADTCS 0x34 |
215 | #define _SADRSA _SA1111( 0x064c ) | 210 | #define SA1111_SADTSA 0x38 |
216 | #define _SADRCA _SA1111( 0x0650 ) | 211 | #define SA1111_SADTCA 0x3c |
217 | #define _SADRSB _SA1111( 0x0654 ) | 212 | #define SA1111_SADTSB 0x40 |
218 | #define _SADRCB _SA1111( 0x0658 ) | 213 | #define SA1111_SADTCB 0x44 |
219 | #define _SAITR _SA1111( 0x065c ) | 214 | #define SA1111_SADRCS 0x48 |
220 | #define _SADR _SA1111( 0x0680 ) | 215 | #define SA1111_SADRSA 0x4c |
221 | 216 | #define SA1111_SADRCA 0x50 | |
222 | #define SACR0 __CCREG(0x0600) | 217 | #define SA1111_SADRSB 0x54 |
223 | #define SACR1 __CCREG(0x0604) | 218 | #define SA1111_SADRCB 0x58 |
224 | #define SACR2 __CCREG(0x0608) | 219 | #define SA1111_SAITR 0x5c |
225 | #define SASR0 __CCREG(0x060c) | 220 | #define SA1111_SADR 0x80 |
226 | #define SASR1 __CCREG(0x0610) | 221 | |
227 | #define SASCR __CCREG(0x0618) | 222 | #ifndef CONFIG_ARCH_PXA |
228 | #define L3_CAR __CCREG(0x061c) | ||
229 | #define L3_CDR __CCREG(0x0620) | ||
230 | #define ACCAR __CCREG(0x0624) | ||
231 | #define ACCDR __CCREG(0x0628) | ||
232 | #define ACSAR __CCREG(0x062c) | ||
233 | #define ACSDR __CCREG(0x0630) | ||
234 | #define SADTCS __CCREG(0x0634) | ||
235 | #define SADTSA __CCREG(0x0638) | ||
236 | #define SADTCA __CCREG(0x063c) | ||
237 | #define SADTSB __CCREG(0x0640) | ||
238 | #define SADTCB __CCREG(0x0644) | ||
239 | #define SADRCS __CCREG(0x0648) | ||
240 | #define SADRSA __CCREG(0x064c) | ||
241 | #define SADRCA __CCREG(0x0650) | ||
242 | #define SADRSB __CCREG(0x0654) | ||
243 | #define SADRCB __CCREG(0x0658) | ||
244 | #define SAITR __CCREG(0x065c) | ||
245 | #define SADR __CCREG(0x0680) | ||
246 | 223 | ||
247 | #define SACR0_ENB (1<<0) | 224 | #define SACR0_ENB (1<<0) |
248 | #define SACR0_BCKD (1<<2) | 225 | #define SACR0_BCKD (1<<2) |
@@ -330,6 +307,8 @@ | |||
330 | #define SAITR_RDBDA (1<<10) | 307 | #define SAITR_RDBDA (1<<10) |
331 | #define SAITR_RDBDB (1<<11) | 308 | #define SAITR_RDBDB (1<<11) |
332 | 309 | ||
310 | #endif /* !CONFIG_ARCH_PXA */ | ||
311 | |||
333 | /* | 312 | /* |
334 | * General-Purpose I/O Interface | 313 | * General-Purpose I/O Interface |
335 | * | 314 | * |
diff --git a/include/asm-arm/kexec.h b/include/asm-arm/kexec.h new file mode 100644 index 000000000000..8c1c6162a80c --- /dev/null +++ b/include/asm-arm/kexec.h | |||
@@ -0,0 +1,30 @@ | |||
1 | #ifndef _ARM_KEXEC_H | ||
2 | #define _ARM_KEXEC_H | ||
3 | |||
4 | #ifdef CONFIG_KEXEC | ||
5 | |||
6 | /* Maximum physical address we can use pages from */ | ||
7 | #define KEXEC_SOURCE_MEMORY_LIMIT (-1UL) | ||
8 | /* Maximum address we can reach in physical address mode */ | ||
9 | #define KEXEC_DESTINATION_MEMORY_LIMIT (-1UL) | ||
10 | /* Maximum address we can use for the control code buffer */ | ||
11 | #define KEXEC_CONTROL_MEMORY_LIMIT TASK_SIZE | ||
12 | |||
13 | #define KEXEC_CONTROL_CODE_SIZE 4096 | ||
14 | |||
15 | #define KEXEC_ARCH KEXEC_ARCH_ARM | ||
16 | |||
17 | #ifndef __ASSEMBLY__ | ||
18 | |||
19 | #define MAX_NOTE_BYTES 1024 | ||
20 | |||
21 | struct kimage; | ||
22 | /* Provide a dummy definition to avoid build failures. */ | ||
23 | static inline void crash_setup_regs(struct pt_regs *newregs, | ||
24 | struct pt_regs *oldregs) { } | ||
25 | |||
26 | #endif /* __ASSEMBLY__ */ | ||
27 | |||
28 | #endif /* CONFIG_KEXEC */ | ||
29 | |||
30 | #endif /* _ARM_KEXEC_H */ | ||
diff --git a/include/asm-arm/pgtable.h b/include/asm-arm/pgtable.h index b8cf2d5ec304..7b2bafce21a2 100644 --- a/include/asm-arm/pgtable.h +++ b/include/asm-arm/pgtable.h | |||
@@ -175,19 +175,29 @@ extern void __pgd_error(const char *file, int line, unsigned long val); | |||
175 | #ifndef __ASSEMBLY__ | 175 | #ifndef __ASSEMBLY__ |
176 | 176 | ||
177 | /* | 177 | /* |
178 | * The following macros handle the cache and bufferable bits... | 178 | * The pgprot_* and protection_map entries will be fixed up in runtime |
179 | * to include the cachable and bufferable bits based on memory policy, | ||
180 | * as well as any architecture dependent bits like global/ASID and SMP | ||
181 | * shared mapping bits. | ||
179 | */ | 182 | */ |
180 | #define _L_PTE_DEFAULT L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_CACHEABLE | L_PTE_BUFFERABLE | 183 | #define _L_PTE_DEFAULT L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_CACHEABLE | L_PTE_BUFFERABLE |
181 | #define _L_PTE_READ L_PTE_USER | L_PTE_EXEC | 184 | #define _L_PTE_READ L_PTE_USER | L_PTE_EXEC |
182 | 185 | ||
186 | extern pgprot_t pgprot_user; | ||
183 | extern pgprot_t pgprot_kernel; | 187 | extern pgprot_t pgprot_kernel; |
184 | 188 | ||
185 | #define PAGE_NONE __pgprot(_L_PTE_DEFAULT) | 189 | #define PAGE_NONE pgprot_user |
186 | #define PAGE_COPY __pgprot(_L_PTE_DEFAULT | _L_PTE_READ) | 190 | #define PAGE_COPY __pgprot(pgprot_val(pgprot_user) | _L_PTE_READ) |
187 | #define PAGE_SHARED __pgprot(_L_PTE_DEFAULT | _L_PTE_READ | L_PTE_WRITE) | 191 | #define PAGE_SHARED __pgprot(pgprot_val(pgprot_user) | _L_PTE_READ | \ |
188 | #define PAGE_READONLY __pgprot(_L_PTE_DEFAULT | _L_PTE_READ) | 192 | L_PTE_WRITE) |
193 | #define PAGE_READONLY __pgprot(pgprot_val(pgprot_user) | _L_PTE_READ) | ||
189 | #define PAGE_KERNEL pgprot_kernel | 194 | #define PAGE_KERNEL pgprot_kernel |
190 | 195 | ||
196 | #define __PAGE_NONE __pgprot(_L_PTE_DEFAULT) | ||
197 | #define __PAGE_COPY __pgprot(_L_PTE_DEFAULT | _L_PTE_READ) | ||
198 | #define __PAGE_SHARED __pgprot(_L_PTE_DEFAULT | _L_PTE_READ | L_PTE_WRITE) | ||
199 | #define __PAGE_READONLY __pgprot(_L_PTE_DEFAULT | _L_PTE_READ) | ||
200 | |||
191 | #endif /* __ASSEMBLY__ */ | 201 | #endif /* __ASSEMBLY__ */ |
192 | 202 | ||
193 | /* | 203 | /* |
@@ -198,23 +208,23 @@ extern pgprot_t pgprot_kernel; | |||
198 | * 2) If we could do execute protection, then read is implied | 208 | * 2) If we could do execute protection, then read is implied |
199 | * 3) write implies read permissions | 209 | * 3) write implies read permissions |
200 | */ | 210 | */ |
201 | #define __P000 PAGE_NONE | 211 | #define __P000 __PAGE_NONE |
202 | #define __P001 PAGE_READONLY | 212 | #define __P001 __PAGE_READONLY |
203 | #define __P010 PAGE_COPY | 213 | #define __P010 __PAGE_COPY |
204 | #define __P011 PAGE_COPY | 214 | #define __P011 __PAGE_COPY |
205 | #define __P100 PAGE_READONLY | 215 | #define __P100 __PAGE_READONLY |
206 | #define __P101 PAGE_READONLY | 216 | #define __P101 __PAGE_READONLY |
207 | #define __P110 PAGE_COPY | 217 | #define __P110 __PAGE_COPY |
208 | #define __P111 PAGE_COPY | 218 | #define __P111 __PAGE_COPY |
209 | 219 | ||
210 | #define __S000 PAGE_NONE | 220 | #define __S000 __PAGE_NONE |
211 | #define __S001 PAGE_READONLY | 221 | #define __S001 __PAGE_READONLY |
212 | #define __S010 PAGE_SHARED | 222 | #define __S010 __PAGE_SHARED |
213 | #define __S011 PAGE_SHARED | 223 | #define __S011 __PAGE_SHARED |
214 | #define __S100 PAGE_READONLY | 224 | #define __S100 __PAGE_READONLY |
215 | #define __S101 PAGE_READONLY | 225 | #define __S101 __PAGE_READONLY |
216 | #define __S110 PAGE_SHARED | 226 | #define __S110 __PAGE_SHARED |
217 | #define __S111 PAGE_SHARED | 227 | #define __S111 __PAGE_SHARED |
218 | 228 | ||
219 | #ifndef __ASSEMBLY__ | 229 | #ifndef __ASSEMBLY__ |
220 | /* | 230 | /* |
diff --git a/include/asm-arm/plat-s3c24xx/clock.h b/include/asm-arm/plat-s3c24xx/clock.h new file mode 100644 index 000000000000..f6135dbb9fa9 --- /dev/null +++ b/include/asm-arm/plat-s3c24xx/clock.h | |||
@@ -0,0 +1,63 @@ | |||
1 | /* linux/include/asm-arm/plat-s3c24xx/clock.h | ||
2 | * linux/arch/arm/mach-s3c2410/clock.h | ||
3 | * | ||
4 | * Copyright (c) 2004-2005 Simtec Electronics | ||
5 | * http://www.simtec.co.uk/products/SWLINUX/ | ||
6 | * Written by Ben Dooks, <ben@simtec.co.uk> | ||
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 | struct clk { | ||
14 | struct list_head list; | ||
15 | struct module *owner; | ||
16 | struct clk *parent; | ||
17 | const char *name; | ||
18 | int id; | ||
19 | int usage; | ||
20 | unsigned long rate; | ||
21 | unsigned long ctrlbit; | ||
22 | |||
23 | int (*enable)(struct clk *, int enable); | ||
24 | int (*set_rate)(struct clk *c, unsigned long rate); | ||
25 | unsigned long (*get_rate)(struct clk *c); | ||
26 | unsigned long (*round_rate)(struct clk *c, unsigned long rate); | ||
27 | int (*set_parent)(struct clk *c, struct clk *parent); | ||
28 | }; | ||
29 | |||
30 | /* other clocks which may be registered by board support */ | ||
31 | |||
32 | extern struct clk s3c24xx_dclk0; | ||
33 | extern struct clk s3c24xx_dclk1; | ||
34 | extern struct clk s3c24xx_clkout0; | ||
35 | extern struct clk s3c24xx_clkout1; | ||
36 | extern struct clk s3c24xx_uclk; | ||
37 | |||
38 | extern struct clk clk_usb_bus; | ||
39 | |||
40 | /* core clock support */ | ||
41 | |||
42 | extern struct clk clk_f; | ||
43 | extern struct clk clk_h; | ||
44 | extern struct clk clk_p; | ||
45 | extern struct clk clk_mpll; | ||
46 | extern struct clk clk_upll; | ||
47 | extern struct clk clk_xtal; | ||
48 | |||
49 | /* exports for arch/arm/mach-s3c2410 | ||
50 | * | ||
51 | * Please DO NOT use these outside of arch/arm/mach-s3c2410 | ||
52 | */ | ||
53 | |||
54 | extern struct mutex clocks_mutex; | ||
55 | |||
56 | extern int s3c2410_clkcon_enable(struct clk *clk, int enable); | ||
57 | |||
58 | extern int s3c24xx_register_clock(struct clk *clk); | ||
59 | |||
60 | extern int s3c24xx_setup_clocks(unsigned long xtal, | ||
61 | unsigned long fclk, | ||
62 | unsigned long hclk, | ||
63 | unsigned long pclk); | ||
diff --git a/include/asm-arm/plat-s3c24xx/common-smdk.h b/include/asm-arm/plat-s3c24xx/common-smdk.h new file mode 100644 index 000000000000..58d9094c935c --- /dev/null +++ b/include/asm-arm/plat-s3c24xx/common-smdk.h | |||
@@ -0,0 +1,15 @@ | |||
1 | /* linux/include/asm-arm/plat-s3c24xx/common-smdk.h | ||
2 | * | ||
3 | * Copyright (c) 2006 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * Common code for SMDK2410 and SMDK2440 boards | ||
7 | * | ||
8 | * http://www.fluff.org/ben/smdk2440/ | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | extern void smdk_machine_init(void); | ||
diff --git a/include/asm-arm/plat-s3c24xx/cpu.h b/include/asm-arm/plat-s3c24xx/cpu.h new file mode 100644 index 000000000000..15dd18810905 --- /dev/null +++ b/include/asm-arm/plat-s3c24xx/cpu.h | |||
@@ -0,0 +1,70 @@ | |||
1 | /* linux/include/asm-arm/plat-s3c24xx/cpu.h | ||
2 | * | ||
3 | * Copyright (c) 2004-2005 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * Header file for S3C24XX CPU support | ||
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 | /* todo - fix when rmk changes iodescs to use `void __iomem *` */ | ||
14 | |||
15 | #define IODESC_ENT(x) { (unsigned long)S3C24XX_VA_##x, __phys_to_pfn(S3C24XX_PA_##x), S3C24XX_SZ_##x, MT_DEVICE } | ||
16 | |||
17 | #ifndef MHZ | ||
18 | #define MHZ (1000*1000) | ||
19 | #endif | ||
20 | |||
21 | #define print_mhz(m) ((m) / MHZ), ((m / 1000) % 1000) | ||
22 | |||
23 | /* forward declaration */ | ||
24 | struct s3c24xx_uart_resources; | ||
25 | struct platform_device; | ||
26 | struct s3c2410_uartcfg; | ||
27 | struct map_desc; | ||
28 | |||
29 | /* core initialisation functions */ | ||
30 | |||
31 | extern void s3c24xx_init_irq(void); | ||
32 | |||
33 | extern void s3c24xx_init_io(struct map_desc *mach_desc, int size); | ||
34 | |||
35 | extern void s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no); | ||
36 | |||
37 | extern void s3c24xx_init_clocks(int xtal); | ||
38 | |||
39 | extern void s3c24xx_init_uartdevs(char *name, | ||
40 | struct s3c24xx_uart_resources *res, | ||
41 | struct s3c2410_uartcfg *cfg, int no); | ||
42 | |||
43 | /* the board structure is used at first initialsation time | ||
44 | * to get info such as the devices to register for this | ||
45 | * board. This is done because platfrom_add_devices() cannot | ||
46 | * be called from the map_io entry. | ||
47 | */ | ||
48 | |||
49 | struct s3c24xx_board { | ||
50 | struct platform_device **devices; | ||
51 | unsigned int devices_count; | ||
52 | |||
53 | struct clk **clocks; | ||
54 | unsigned int clocks_count; | ||
55 | }; | ||
56 | |||
57 | extern void s3c24xx_set_board(struct s3c24xx_board *board); | ||
58 | |||
59 | /* timer for 2410/2440 */ | ||
60 | |||
61 | struct sys_timer; | ||
62 | extern struct sys_timer s3c24xx_timer; | ||
63 | |||
64 | /* system device classes */ | ||
65 | |||
66 | extern struct sysdev_class s3c2410_sysclass; | ||
67 | extern struct sysdev_class s3c2412_sysclass; | ||
68 | extern struct sysdev_class s3c2440_sysclass; | ||
69 | extern struct sysdev_class s3c2442_sysclass; | ||
70 | extern struct sysdev_class s3c2443_sysclass; | ||
diff --git a/include/asm-arm/plat-s3c24xx/devs.h b/include/asm-arm/plat-s3c24xx/devs.h new file mode 100644 index 000000000000..dddf485fc067 --- /dev/null +++ b/include/asm-arm/plat-s3c24xx/devs.h | |||
@@ -0,0 +1,51 @@ | |||
1 | /* linux/include/asm-arm/plat-s3c24xx/devs.h | ||
2 | * | ||
3 | * Copyright (c) 2004 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * Header file for s3c2410 standard platform devices | ||
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 | #include <linux/platform_device.h> | ||
13 | |||
14 | struct s3c24xx_uart_resources { | ||
15 | struct resource *resources; | ||
16 | unsigned long nr_resources; | ||
17 | }; | ||
18 | |||
19 | extern struct s3c24xx_uart_resources s3c2410_uart_resources[]; | ||
20 | |||
21 | extern struct platform_device *s3c24xx_uart_devs[]; | ||
22 | extern struct platform_device *s3c24xx_uart_src[]; | ||
23 | |||
24 | extern struct platform_device s3c_device_usb; | ||
25 | extern struct platform_device s3c_device_lcd; | ||
26 | extern struct platform_device s3c_device_wdt; | ||
27 | extern struct platform_device s3c_device_i2c; | ||
28 | extern struct platform_device s3c_device_iis; | ||
29 | extern struct platform_device s3c_device_rtc; | ||
30 | extern struct platform_device s3c_device_adc; | ||
31 | extern struct platform_device s3c_device_sdi; | ||
32 | |||
33 | extern struct platform_device s3c_device_spi0; | ||
34 | extern struct platform_device s3c_device_spi1; | ||
35 | |||
36 | extern struct platform_device s3c_device_nand; | ||
37 | |||
38 | extern struct platform_device s3c_device_timer0; | ||
39 | extern struct platform_device s3c_device_timer1; | ||
40 | extern struct platform_device s3c_device_timer2; | ||
41 | extern struct platform_device s3c_device_timer3; | ||
42 | |||
43 | extern struct platform_device s3c_device_usbgadget; | ||
44 | |||
45 | /* s3c2440 specific devices */ | ||
46 | |||
47 | #ifdef CONFIG_CPU_S3C2440 | ||
48 | |||
49 | extern struct platform_device s3c_device_camif; | ||
50 | |||
51 | #endif | ||
diff --git a/include/asm-arm/plat-s3c24xx/dma.h b/include/asm-arm/plat-s3c24xx/dma.h new file mode 100644 index 000000000000..2c59406435e5 --- /dev/null +++ b/include/asm-arm/plat-s3c24xx/dma.h | |||
@@ -0,0 +1,77 @@ | |||
1 | /* linux/include/asm-arm/plat-s3c24xx/dma.h | ||
2 | * | ||
3 | * Copyright (C) 2006 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * Samsung S3C24XX DMA support | ||
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 | extern struct sysdev_class dma_sysclass; | ||
14 | extern struct s3c2410_dma_chan s3c2410_chans[S3C2410_DMA_CHANNELS]; | ||
15 | |||
16 | #define DMA_CH_VALID (1<<31) | ||
17 | #define DMA_CH_NEVER (1<<30) | ||
18 | |||
19 | struct s3c24xx_dma_addr { | ||
20 | unsigned long from; | ||
21 | unsigned long to; | ||
22 | }; | ||
23 | |||
24 | /* struct s3c24xx_dma_map | ||
25 | * | ||
26 | * this holds the mapping information for the channel selected | ||
27 | * to be connected to the specified device | ||
28 | */ | ||
29 | |||
30 | struct s3c24xx_dma_map { | ||
31 | const char *name; | ||
32 | struct s3c24xx_dma_addr hw_addr; | ||
33 | |||
34 | unsigned long channels[S3C2410_DMA_CHANNELS]; | ||
35 | }; | ||
36 | |||
37 | struct s3c24xx_dma_selection { | ||
38 | struct s3c24xx_dma_map *map; | ||
39 | unsigned long map_size; | ||
40 | unsigned long dcon_mask; | ||
41 | |||
42 | void (*select)(struct s3c2410_dma_chan *chan, | ||
43 | struct s3c24xx_dma_map *map); | ||
44 | }; | ||
45 | |||
46 | extern int s3c24xx_dma_init_map(struct s3c24xx_dma_selection *sel); | ||
47 | |||
48 | /* struct s3c24xx_dma_order_ch | ||
49 | * | ||
50 | * channel map for one of the `enum dma_ch` dma channels. the list | ||
51 | * entry contains a set of low-level channel numbers, orred with | ||
52 | * DMA_CH_VALID, which are checked in the order in the array. | ||
53 | */ | ||
54 | |||
55 | struct s3c24xx_dma_order_ch { | ||
56 | unsigned int list[S3C2410_DMA_CHANNELS]; /* list of channels */ | ||
57 | unsigned int flags; /* flags */ | ||
58 | }; | ||
59 | |||
60 | /* struct s3c24xx_dma_order | ||
61 | * | ||
62 | * information provided by either the core or the board to give the | ||
63 | * dma system a hint on how to allocate channels | ||
64 | */ | ||
65 | |||
66 | struct s3c24xx_dma_order { | ||
67 | struct s3c24xx_dma_order_ch channels[DMACH_MAX]; | ||
68 | }; | ||
69 | |||
70 | extern int s3c24xx_dma_order_set(struct s3c24xx_dma_order *map); | ||
71 | |||
72 | /* DMA init code, called from the cpu support code */ | ||
73 | |||
74 | extern int s3c2410_dma_init(void); | ||
75 | |||
76 | extern int s3c24xx_dma_init(unsigned int channels, unsigned int irq, | ||
77 | unsigned int stride); | ||
diff --git a/include/asm-arm/plat-s3c24xx/irq.h b/include/asm-arm/plat-s3c24xx/irq.h new file mode 100644 index 000000000000..8af6d9579b31 --- /dev/null +++ b/include/asm-arm/plat-s3c24xx/irq.h | |||
@@ -0,0 +1,107 @@ | |||
1 | /* linux/include/asm-arm/plat-s3c24xx/irq.h | ||
2 | * | ||
3 | * Copyright (c) 2004-2005 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * Header file for S3C24XX CPU IRQ support | ||
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 irqdbf(x...) | ||
14 | #define irqdbf2(x...) | ||
15 | |||
16 | #define EXTINT_OFF (IRQ_EINT4 - 4) | ||
17 | |||
18 | extern struct irq_chip s3c_irq_level_chip; | ||
19 | |||
20 | static inline void | ||
21 | s3c_irqsub_mask(unsigned int irqno, unsigned int parentbit, | ||
22 | int subcheck) | ||
23 | { | ||
24 | unsigned long mask; | ||
25 | unsigned long submask; | ||
26 | |||
27 | submask = __raw_readl(S3C2410_INTSUBMSK); | ||
28 | mask = __raw_readl(S3C2410_INTMSK); | ||
29 | |||
30 | submask |= (1UL << (irqno - IRQ_S3CUART_RX0)); | ||
31 | |||
32 | /* check to see if we need to mask the parent IRQ */ | ||
33 | |||
34 | if ((submask & subcheck) == subcheck) { | ||
35 | __raw_writel(mask | parentbit, S3C2410_INTMSK); | ||
36 | } | ||
37 | |||
38 | /* write back masks */ | ||
39 | __raw_writel(submask, S3C2410_INTSUBMSK); | ||
40 | |||
41 | } | ||
42 | |||
43 | static inline void | ||
44 | s3c_irqsub_unmask(unsigned int irqno, unsigned int parentbit) | ||
45 | { | ||
46 | unsigned long mask; | ||
47 | unsigned long submask; | ||
48 | |||
49 | submask = __raw_readl(S3C2410_INTSUBMSK); | ||
50 | mask = __raw_readl(S3C2410_INTMSK); | ||
51 | |||
52 | submask &= ~(1UL << (irqno - IRQ_S3CUART_RX0)); | ||
53 | mask &= ~parentbit; | ||
54 | |||
55 | /* write back masks */ | ||
56 | __raw_writel(submask, S3C2410_INTSUBMSK); | ||
57 | __raw_writel(mask, S3C2410_INTMSK); | ||
58 | } | ||
59 | |||
60 | |||
61 | static inline void | ||
62 | s3c_irqsub_maskack(unsigned int irqno, unsigned int parentmask, unsigned int group) | ||
63 | { | ||
64 | unsigned int bit = 1UL << (irqno - IRQ_S3CUART_RX0); | ||
65 | |||
66 | s3c_irqsub_mask(irqno, parentmask, group); | ||
67 | |||
68 | __raw_writel(bit, S3C2410_SUBSRCPND); | ||
69 | |||
70 | /* only ack parent if we've got all the irqs (seems we must | ||
71 | * ack, all and hope that the irq system retriggers ok when | ||
72 | * the interrupt goes off again) | ||
73 | */ | ||
74 | |||
75 | if (1) { | ||
76 | __raw_writel(parentmask, S3C2410_SRCPND); | ||
77 | __raw_writel(parentmask, S3C2410_INTPND); | ||
78 | } | ||
79 | } | ||
80 | |||
81 | static inline void | ||
82 | s3c_irqsub_ack(unsigned int irqno, unsigned int parentmask, unsigned int group) | ||
83 | { | ||
84 | unsigned int bit = 1UL << (irqno - IRQ_S3CUART_RX0); | ||
85 | |||
86 | __raw_writel(bit, S3C2410_SUBSRCPND); | ||
87 | |||
88 | /* only ack parent if we've got all the irqs (seems we must | ||
89 | * ack, all and hope that the irq system retriggers ok when | ||
90 | * the interrupt goes off again) | ||
91 | */ | ||
92 | |||
93 | if (1) { | ||
94 | __raw_writel(parentmask, S3C2410_SRCPND); | ||
95 | __raw_writel(parentmask, S3C2410_INTPND); | ||
96 | } | ||
97 | } | ||
98 | |||
99 | /* exported for use in arch/arm/mach-s3c2410 */ | ||
100 | |||
101 | #ifdef CONFIG_PM | ||
102 | extern int s3c_irq_wake(unsigned int irqno, unsigned int state); | ||
103 | #else | ||
104 | #define s3c_irq_wake NULL | ||
105 | #endif | ||
106 | |||
107 | extern int s3c_irqext_type(unsigned int irq, unsigned int type); | ||
diff --git a/include/asm-arm/plat-s3c24xx/pm.h b/include/asm-arm/plat-s3c24xx/pm.h new file mode 100644 index 000000000000..cc623667e48a --- /dev/null +++ b/include/asm-arm/plat-s3c24xx/pm.h | |||
@@ -0,0 +1,73 @@ | |||
1 | /* linux/include/asm-arm/plat-s3c24xx/pm.h | ||
2 | * | ||
3 | * Copyright (c) 2004 Simtec Electronics | ||
4 | * Written by Ben Dooks, <ben@simtec.co.uk> | ||
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 | /* s3c2410_pm_init | ||
12 | * | ||
13 | * called from board at initialisation time to setup the power | ||
14 | * management | ||
15 | */ | ||
16 | |||
17 | #ifdef CONFIG_PM | ||
18 | |||
19 | extern __init int s3c2410_pm_init(void); | ||
20 | |||
21 | #else | ||
22 | |||
23 | static inline int s3c2410_pm_init(void) | ||
24 | { | ||
25 | return 0; | ||
26 | } | ||
27 | #endif | ||
28 | |||
29 | /* configuration for the IRQ mask over sleep */ | ||
30 | extern unsigned long s3c_irqwake_intmask; | ||
31 | extern unsigned long s3c_irqwake_eintmask; | ||
32 | |||
33 | /* IRQ masks for IRQs allowed to go to sleep (see irq.c) */ | ||
34 | extern unsigned long s3c_irqwake_intallow; | ||
35 | extern unsigned long s3c_irqwake_eintallow; | ||
36 | |||
37 | /* per-cpu sleep functions */ | ||
38 | |||
39 | extern void (*pm_cpu_prep)(void); | ||
40 | extern void (*pm_cpu_sleep)(void); | ||
41 | |||
42 | /* Flags for PM Control */ | ||
43 | |||
44 | extern unsigned long s3c_pm_flags; | ||
45 | |||
46 | /* from sleep.S */ | ||
47 | |||
48 | extern int s3c2410_cpu_save(unsigned long *saveblk); | ||
49 | extern void s3c2410_cpu_suspend(void); | ||
50 | extern void s3c2410_cpu_resume(void); | ||
51 | |||
52 | extern unsigned long s3c2410_sleep_save_phys; | ||
53 | |||
54 | /* sleep save info */ | ||
55 | |||
56 | struct sleep_save { | ||
57 | void __iomem *reg; | ||
58 | unsigned long val; | ||
59 | }; | ||
60 | |||
61 | #define SAVE_ITEM(x) \ | ||
62 | { .reg = (x) } | ||
63 | |||
64 | extern void s3c2410_pm_do_save(struct sleep_save *ptr, int count); | ||
65 | extern void s3c2410_pm_do_restore(struct sleep_save *ptr, int count); | ||
66 | |||
67 | #ifdef CONFIG_PM | ||
68 | extern int s3c24xx_irq_suspend(struct sys_device *dev, pm_message_t state); | ||
69 | extern int s3c24xx_irq_resume(struct sys_device *dev); | ||
70 | #else | ||
71 | #define s3c24xx_irq_suspend NULL | ||
72 | #define s3c24xx_irq_resume NULL | ||
73 | #endif | ||
diff --git a/include/asm-arm/plat-s3c24xx/s3c2400.h b/include/asm-arm/plat-s3c24xx/s3c2400.h new file mode 100644 index 000000000000..3a5a16821af8 --- /dev/null +++ b/include/asm-arm/plat-s3c24xx/s3c2400.h | |||
@@ -0,0 +1,31 @@ | |||
1 | /* linux/include/asm-arm/plat-s3c24xx/s3c2400.h | ||
2 | * | ||
3 | * Copyright (c) 2004 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * Header file for S3C2400 cpu support | ||
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 | * Modifications: | ||
13 | * 09-Fev-2006 LCVR First version, based on s3c2410.h | ||
14 | */ | ||
15 | |||
16 | #ifdef CONFIG_CPU_S3C2400 | ||
17 | |||
18 | extern int s3c2400_init(void); | ||
19 | |||
20 | extern void s3c2400_map_io(struct map_desc *mach_desc, int size); | ||
21 | |||
22 | extern void s3c2400_init_uarts(struct s3c2410_uartcfg *cfg, int no); | ||
23 | |||
24 | extern void s3c2400_init_clocks(int xtal); | ||
25 | |||
26 | #else | ||
27 | #define s3c2400_init_clocks NULL | ||
28 | #define s3c2400_init_uarts NULL | ||
29 | #define s3c2400_map_io NULL | ||
30 | #define s3c2400_init NULL | ||
31 | #endif | ||
diff --git a/include/asm-arm/plat-s3c24xx/s3c2410.h b/include/asm-arm/plat-s3c24xx/s3c2410.h new file mode 100644 index 000000000000..36de0b835873 --- /dev/null +++ b/include/asm-arm/plat-s3c24xx/s3c2410.h | |||
@@ -0,0 +1,31 @@ | |||
1 | /* linux/include/asm-arm/plat-s3c24xx/s3c2410.h | ||
2 | * | ||
3 | * Copyright (c) 2004 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * Header file for s3c2410 machine directory | ||
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 | |||
14 | #ifdef CONFIG_CPU_S3C2410 | ||
15 | |||
16 | extern int s3c2410_init(void); | ||
17 | |||
18 | extern void s3c2410_map_io(struct map_desc *mach_desc, int size); | ||
19 | |||
20 | extern void s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no); | ||
21 | |||
22 | extern void s3c2410_init_clocks(int xtal); | ||
23 | |||
24 | extern int s3c2410_baseclk_add(void); | ||
25 | |||
26 | #else | ||
27 | #define s3c2410_init_clocks NULL | ||
28 | #define s3c2410_init_uarts NULL | ||
29 | #define s3c2410_map_io NULL | ||
30 | #define s3c2410_init NULL | ||
31 | #endif | ||
diff --git a/include/asm-arm/plat-s3c24xx/s3c2412.h b/include/asm-arm/plat-s3c24xx/s3c2412.h new file mode 100644 index 000000000000..3ec97685e781 --- /dev/null +++ b/include/asm-arm/plat-s3c24xx/s3c2412.h | |||
@@ -0,0 +1,29 @@ | |||
1 | /* linux/include/asm-arm/plat-s3c24xx/s3c2412.h | ||
2 | * | ||
3 | * Copyright (c) 2006 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * Header file for s3c2412 cpu support | ||
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 | #ifdef CONFIG_CPU_S3C2412 | ||
14 | |||
15 | extern int s3c2412_init(void); | ||
16 | |||
17 | extern void s3c2412_map_io(struct map_desc *mach_desc, int size); | ||
18 | |||
19 | extern void s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no); | ||
20 | |||
21 | extern void s3c2412_init_clocks(int xtal); | ||
22 | |||
23 | extern int s3c2412_baseclk_add(void); | ||
24 | #else | ||
25 | #define s3c2412_init_clocks NULL | ||
26 | #define s3c2412_init_uarts NULL | ||
27 | #define s3c2412_map_io NULL | ||
28 | #define s3c2412_init NULL | ||
29 | #endif | ||
diff --git a/include/asm-arm/plat-s3c24xx/s3c2440.h b/include/asm-arm/plat-s3c24xx/s3c2440.h new file mode 100644 index 000000000000..107853bf9481 --- /dev/null +++ b/include/asm-arm/plat-s3c24xx/s3c2440.h | |||
@@ -0,0 +1,17 @@ | |||
1 | /* linux/include/asm-arm/plat-s3c24xx/s3c2440.h | ||
2 | * | ||
3 | * Copyright (c) 2004-2005 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * Header file for s3c2440 cpu support | ||
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 | #ifdef CONFIG_CPU_S3C2440 | ||
14 | extern int s3c2440_init(void); | ||
15 | #else | ||
16 | #define s3c2440_init NULL | ||
17 | #endif | ||
diff --git a/include/asm-arm/plat-s3c24xx/s3c2442.h b/include/asm-arm/plat-s3c24xx/s3c2442.h new file mode 100644 index 000000000000..451a23a2092a --- /dev/null +++ b/include/asm-arm/plat-s3c24xx/s3c2442.h | |||
@@ -0,0 +1,17 @@ | |||
1 | /* linux/include/asm-arm/plat-s3c24xx/s3c2442.h | ||
2 | * | ||
3 | * Copyright (c) 2006 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * Header file for s3c2442 cpu support | ||
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 | #ifdef CONFIG_CPU_S3C2442 | ||
14 | extern int s3c2442_init(void); | ||
15 | #else | ||
16 | #define s3c2442_init NULL | ||
17 | #endif | ||
diff --git a/include/asm-arm/plat-s3c24xx/s3c2443.h b/include/asm-arm/plat-s3c24xx/s3c2443.h new file mode 100644 index 000000000000..11d83b5c84e6 --- /dev/null +++ b/include/asm-arm/plat-s3c24xx/s3c2443.h | |||
@@ -0,0 +1,32 @@ | |||
1 | /* linux/include/asm-arm/plat-s3c24xx/s3c2443.h | ||
2 | * | ||
3 | * Copyright (c) 2004-2005 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * Header file for s3c2443 cpu support | ||
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 | #ifdef CONFIG_CPU_S3C2443 | ||
14 | |||
15 | struct s3c2410_uartcfg; | ||
16 | |||
17 | extern int s3c2443_init(void); | ||
18 | |||
19 | extern void s3c2443_map_io(struct map_desc *mach_desc, int size); | ||
20 | |||
21 | extern void s3c2443_init_uarts(struct s3c2410_uartcfg *cfg, int no); | ||
22 | |||
23 | extern void s3c2443_init_clocks(int xtal); | ||
24 | |||
25 | extern int s3c2443_baseclk_add(void); | ||
26 | |||
27 | #else | ||
28 | #define s3c2443_init_clocks NULL | ||
29 | #define s3c2443_init_uarts NULL | ||
30 | #define s3c2443_map_io NULL | ||
31 | #define s3c2443_init NULL | ||
32 | #endif | ||
diff --git a/include/asm-arm/spinlock.h b/include/asm-arm/spinlock.h index 861092fbaa53..800ba5254daf 100644 --- a/include/asm-arm/spinlock.h +++ b/include/asm-arm/spinlock.h | |||
@@ -85,7 +85,6 @@ static inline void __raw_spin_unlock(raw_spinlock_t *lock) | |||
85 | * Write locks are easy - we just set bit 31. When unlocking, we can | 85 | * Write locks are easy - we just set bit 31. When unlocking, we can |
86 | * just write zero since the lock is exclusively held. | 86 | * just write zero since the lock is exclusively held. |
87 | */ | 87 | */ |
88 | #define rwlock_is_locked(x) (*((volatile unsigned int *)(x)) != 0) | ||
89 | 88 | ||
90 | static inline void __raw_write_lock(raw_rwlock_t *rw) | 89 | static inline void __raw_write_lock(raw_rwlock_t *rw) |
91 | { | 90 | { |
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h index aa223fc546af..f4386906b200 100644 --- a/include/asm-arm/system.h +++ b/include/asm-arm/system.h | |||
@@ -140,6 +140,40 @@ static inline int cpu_is_xsc3(void) | |||
140 | #define cpu_is_xscale() 1 | 140 | #define cpu_is_xscale() 1 |
141 | #endif | 141 | #endif |
142 | 142 | ||
143 | #define UDBG_UNDEFINED (1 << 0) | ||
144 | #define UDBG_SYSCALL (1 << 1) | ||
145 | #define UDBG_BADABORT (1 << 2) | ||
146 | #define UDBG_SEGV (1 << 3) | ||
147 | #define UDBG_BUS (1 << 4) | ||
148 | |||
149 | extern unsigned int user_debug; | ||
150 | |||
151 | #if __LINUX_ARM_ARCH__ >= 4 | ||
152 | #define vectors_high() (cr_alignment & CR_V) | ||
153 | #else | ||
154 | #define vectors_high() (0) | ||
155 | #endif | ||
156 | |||
157 | #if __LINUX_ARM_ARCH__ >= 6 | ||
158 | #define isb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c5, 4" \ | ||
159 | : : "r" (0) : "memory") | ||
160 | #define dsb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 4" \ | ||
161 | : : "r" (0) : "memory") | ||
162 | #define dmb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" \ | ||
163 | : : "r" (0) : "memory") | ||
164 | #else | ||
165 | #define isb() __asm__ __volatile__ ("" : : : "memory") | ||
166 | #define dsb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 4" \ | ||
167 | : : "r" (0) : "memory") | ||
168 | #define dmb() __asm__ __volatile__ ("" : : : "memory") | ||
169 | #endif | ||
170 | #define mb() dmb() | ||
171 | #define rmb() mb() | ||
172 | #define wmb() mb() | ||
173 | #define read_barrier_depends() do { } while(0) | ||
174 | #define set_mb(var, value) do { var = value; mb(); } while (0) | ||
175 | #define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t"); | ||
176 | |||
143 | extern unsigned long cr_no_alignment; /* defined in entry-armv.S */ | 177 | extern unsigned long cr_no_alignment; /* defined in entry-armv.S */ |
144 | extern unsigned long cr_alignment; /* defined in entry-armv.S */ | 178 | extern unsigned long cr_alignment; /* defined in entry-armv.S */ |
145 | 179 | ||
@@ -154,6 +188,7 @@ static inline void set_cr(unsigned int val) | |||
154 | { | 188 | { |
155 | asm volatile("mcr p15, 0, %0, c1, c0, 0 @ set CR" | 189 | asm volatile("mcr p15, 0, %0, c1, c0, 0 @ set CR" |
156 | : : "r" (val) : "cc"); | 190 | : : "r" (val) : "cc"); |
191 | isb(); | ||
157 | } | 192 | } |
158 | 193 | ||
159 | #ifndef CONFIG_SMP | 194 | #ifndef CONFIG_SMP |
@@ -176,34 +211,9 @@ static inline void set_copro_access(unsigned int val) | |||
176 | { | 211 | { |
177 | asm volatile("mcr p15, 0, %0, c1, c0, 2 @ set copro access" | 212 | asm volatile("mcr p15, 0, %0, c1, c0, 2 @ set copro access" |
178 | : : "r" (val) : "cc"); | 213 | : : "r" (val) : "cc"); |
214 | isb(); | ||
179 | } | 215 | } |
180 | 216 | ||
181 | #define UDBG_UNDEFINED (1 << 0) | ||
182 | #define UDBG_SYSCALL (1 << 1) | ||
183 | #define UDBG_BADABORT (1 << 2) | ||
184 | #define UDBG_SEGV (1 << 3) | ||
185 | #define UDBG_BUS (1 << 4) | ||
186 | |||
187 | extern unsigned int user_debug; | ||
188 | |||
189 | #if __LINUX_ARM_ARCH__ >= 4 | ||
190 | #define vectors_high() (cr_alignment & CR_V) | ||
191 | #else | ||
192 | #define vectors_high() (0) | ||
193 | #endif | ||
194 | |||
195 | #if __LINUX_ARM_ARCH__ >= 6 | ||
196 | #define mb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" \ | ||
197 | : : "r" (0) : "memory") | ||
198 | #else | ||
199 | #define mb() __asm__ __volatile__ ("" : : : "memory") | ||
200 | #endif | ||
201 | #define rmb() mb() | ||
202 | #define wmb() mb() | ||
203 | #define read_barrier_depends() do { } while(0) | ||
204 | #define set_mb(var, value) do { var = value; mb(); } while (0) | ||
205 | #define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t"); | ||
206 | |||
207 | /* | 217 | /* |
208 | * switch_mm() may do a full cache flush over the context switch, | 218 | * switch_mm() may do a full cache flush over the context switch, |
209 | * so enable interrupts over the context switch to avoid high | 219 | * so enable interrupts over the context switch to avoid high |
diff --git a/include/asm-arm/termios.h b/include/asm-arm/termios.h index 7b8f5e8ae063..329c324c4040 100644 --- a/include/asm-arm/termios.h +++ b/include/asm-arm/termios.h | |||
@@ -49,24 +49,6 @@ struct termio { | |||
49 | 49 | ||
50 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 50 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
51 | 51 | ||
52 | /* line disciplines */ | ||
53 | #define N_TTY 0 | ||
54 | #define N_SLIP 1 | ||
55 | #define N_MOUSE 2 | ||
56 | #define N_PPP 3 | ||
57 | #define N_STRIP 4 | ||
58 | #define N_AX25 5 | ||
59 | #define N_X25 6 /* X.25 async */ | ||
60 | #define N_6PACK 7 | ||
61 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
62 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
63 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
64 | #define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ | ||
65 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
66 | #define N_HDLC 13 /* synchronous HDLC */ | ||
67 | #define N_SYNC_PPP 14 | ||
68 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
69 | |||
70 | #ifdef __KERNEL__ | 52 | #ifdef __KERNEL__ |
71 | 53 | ||
72 | /* | 54 | /* |
diff --git a/include/asm-arm/tlbflush.h b/include/asm-arm/tlbflush.h index cd10a0b5f8ae..08c6991dc9c9 100644 --- a/include/asm-arm/tlbflush.h +++ b/include/asm-arm/tlbflush.h | |||
@@ -247,7 +247,7 @@ static inline void local_flush_tlb_all(void) | |||
247 | const unsigned int __tlb_flag = __cpu_tlb_flags; | 247 | const unsigned int __tlb_flag = __cpu_tlb_flags; |
248 | 248 | ||
249 | if (tlb_flag(TLB_WB)) | 249 | if (tlb_flag(TLB_WB)) |
250 | asm("mcr p15, 0, %0, c7, c10, 4" : : "r" (zero) : "cc"); | 250 | dsb(); |
251 | 251 | ||
252 | if (tlb_flag(TLB_V3_FULL)) | 252 | if (tlb_flag(TLB_V3_FULL)) |
253 | asm("mcr p15, 0, %0, c6, c0, 0" : : "r" (zero) : "cc"); | 253 | asm("mcr p15, 0, %0, c6, c0, 0" : : "r" (zero) : "cc"); |
@@ -257,6 +257,15 @@ static inline void local_flush_tlb_all(void) | |||
257 | asm("mcr p15, 0, %0, c8, c6, 0" : : "r" (zero) : "cc"); | 257 | asm("mcr p15, 0, %0, c8, c6, 0" : : "r" (zero) : "cc"); |
258 | if (tlb_flag(TLB_V4_I_FULL | TLB_V6_I_FULL)) | 258 | if (tlb_flag(TLB_V4_I_FULL | TLB_V6_I_FULL)) |
259 | asm("mcr p15, 0, %0, c8, c5, 0" : : "r" (zero) : "cc"); | 259 | asm("mcr p15, 0, %0, c8, c5, 0" : : "r" (zero) : "cc"); |
260 | |||
261 | if (tlb_flag(TLB_V6_I_FULL | TLB_V6_D_FULL | | ||
262 | TLB_V6_I_PAGE | TLB_V6_D_PAGE | | ||
263 | TLB_V6_I_ASID | TLB_V6_D_ASID)) { | ||
264 | /* flush the branch target cache */ | ||
265 | asm("mcr p15, 0, %0, c7, c5, 6" : : "r" (zero) : "cc"); | ||
266 | dsb(); | ||
267 | isb(); | ||
268 | } | ||
260 | } | 269 | } |
261 | 270 | ||
262 | static inline void local_flush_tlb_mm(struct mm_struct *mm) | 271 | static inline void local_flush_tlb_mm(struct mm_struct *mm) |
@@ -266,7 +275,7 @@ static inline void local_flush_tlb_mm(struct mm_struct *mm) | |||
266 | const unsigned int __tlb_flag = __cpu_tlb_flags; | 275 | const unsigned int __tlb_flag = __cpu_tlb_flags; |
267 | 276 | ||
268 | if (tlb_flag(TLB_WB)) | 277 | if (tlb_flag(TLB_WB)) |
269 | asm("mcr p15, 0, %0, c7, c10, 4" : : "r" (zero) : "cc"); | 278 | dsb(); |
270 | 279 | ||
271 | if (cpu_isset(smp_processor_id(), mm->cpu_vm_mask)) { | 280 | if (cpu_isset(smp_processor_id(), mm->cpu_vm_mask)) { |
272 | if (tlb_flag(TLB_V3_FULL)) | 281 | if (tlb_flag(TLB_V3_FULL)) |
@@ -285,6 +294,14 @@ static inline void local_flush_tlb_mm(struct mm_struct *mm) | |||
285 | asm("mcr p15, 0, %0, c8, c6, 2" : : "r" (asid) : "cc"); | 294 | asm("mcr p15, 0, %0, c8, c6, 2" : : "r" (asid) : "cc"); |
286 | if (tlb_flag(TLB_V6_I_ASID)) | 295 | if (tlb_flag(TLB_V6_I_ASID)) |
287 | asm("mcr p15, 0, %0, c8, c5, 2" : : "r" (asid) : "cc"); | 296 | asm("mcr p15, 0, %0, c8, c5, 2" : : "r" (asid) : "cc"); |
297 | |||
298 | if (tlb_flag(TLB_V6_I_FULL | TLB_V6_D_FULL | | ||
299 | TLB_V6_I_PAGE | TLB_V6_D_PAGE | | ||
300 | TLB_V6_I_ASID | TLB_V6_D_ASID)) { | ||
301 | /* flush the branch target cache */ | ||
302 | asm("mcr p15, 0, %0, c7, c5, 6" : : "r" (zero) : "cc"); | ||
303 | dsb(); | ||
304 | } | ||
288 | } | 305 | } |
289 | 306 | ||
290 | static inline void | 307 | static inline void |
@@ -296,7 +313,7 @@ local_flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr) | |||
296 | uaddr = (uaddr & PAGE_MASK) | ASID(vma->vm_mm); | 313 | uaddr = (uaddr & PAGE_MASK) | ASID(vma->vm_mm); |
297 | 314 | ||
298 | if (tlb_flag(TLB_WB)) | 315 | if (tlb_flag(TLB_WB)) |
299 | asm("mcr p15, 0, %0, c7, c10, 4" : : "r" (zero)); | 316 | dsb(); |
300 | 317 | ||
301 | if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask)) { | 318 | if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask)) { |
302 | if (tlb_flag(TLB_V3_PAGE)) | 319 | if (tlb_flag(TLB_V3_PAGE)) |
@@ -317,6 +334,14 @@ local_flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr) | |||
317 | asm("mcr p15, 0, %0, c8, c6, 1" : : "r" (uaddr) : "cc"); | 334 | asm("mcr p15, 0, %0, c8, c6, 1" : : "r" (uaddr) : "cc"); |
318 | if (tlb_flag(TLB_V6_I_PAGE)) | 335 | if (tlb_flag(TLB_V6_I_PAGE)) |
319 | asm("mcr p15, 0, %0, c8, c5, 1" : : "r" (uaddr) : "cc"); | 336 | asm("mcr p15, 0, %0, c8, c5, 1" : : "r" (uaddr) : "cc"); |
337 | |||
338 | if (tlb_flag(TLB_V6_I_FULL | TLB_V6_D_FULL | | ||
339 | TLB_V6_I_PAGE | TLB_V6_D_PAGE | | ||
340 | TLB_V6_I_ASID | TLB_V6_D_ASID)) { | ||
341 | /* flush the branch target cache */ | ||
342 | asm("mcr p15, 0, %0, c7, c5, 6" : : "r" (zero) : "cc"); | ||
343 | dsb(); | ||
344 | } | ||
320 | } | 345 | } |
321 | 346 | ||
322 | static inline void local_flush_tlb_kernel_page(unsigned long kaddr) | 347 | static inline void local_flush_tlb_kernel_page(unsigned long kaddr) |
@@ -327,7 +352,7 @@ static inline void local_flush_tlb_kernel_page(unsigned long kaddr) | |||
327 | kaddr &= PAGE_MASK; | 352 | kaddr &= PAGE_MASK; |
328 | 353 | ||
329 | if (tlb_flag(TLB_WB)) | 354 | if (tlb_flag(TLB_WB)) |
330 | asm("mcr p15, 0, %0, c7, c10, 4" : : "r" (zero) : "cc"); | 355 | dsb(); |
331 | 356 | ||
332 | if (tlb_flag(TLB_V3_PAGE)) | 357 | if (tlb_flag(TLB_V3_PAGE)) |
333 | asm("mcr p15, 0, %0, c6, c0, 0" : : "r" (kaddr) : "cc"); | 358 | asm("mcr p15, 0, %0, c6, c0, 0" : : "r" (kaddr) : "cc"); |
@@ -347,11 +372,14 @@ static inline void local_flush_tlb_kernel_page(unsigned long kaddr) | |||
347 | if (tlb_flag(TLB_V6_I_PAGE)) | 372 | if (tlb_flag(TLB_V6_I_PAGE)) |
348 | asm("mcr p15, 0, %0, c8, c5, 1" : : "r" (kaddr) : "cc"); | 373 | asm("mcr p15, 0, %0, c8, c5, 1" : : "r" (kaddr) : "cc"); |
349 | 374 | ||
350 | /* The ARM ARM states that the completion of a TLB maintenance | 375 | if (tlb_flag(TLB_V6_I_FULL | TLB_V6_D_FULL | |
351 | * operation is only guaranteed by a DSB instruction | 376 | TLB_V6_I_PAGE | TLB_V6_D_PAGE | |
352 | */ | 377 | TLB_V6_I_ASID | TLB_V6_D_ASID)) { |
353 | if (tlb_flag(TLB_V6_U_PAGE | TLB_V6_D_PAGE | TLB_V6_I_PAGE)) | 378 | /* flush the branch target cache */ |
354 | asm("mcr p15, 0, %0, c7, c10, 4" : : "r" (zero) : "cc"); | 379 | asm("mcr p15, 0, %0, c7, c5, 6" : : "r" (zero) : "cc"); |
380 | dsb(); | ||
381 | isb(); | ||
382 | } | ||
355 | } | 383 | } |
356 | 384 | ||
357 | /* | 385 | /* |
@@ -369,15 +397,13 @@ static inline void local_flush_tlb_kernel_page(unsigned long kaddr) | |||
369 | */ | 397 | */ |
370 | static inline void flush_pmd_entry(pmd_t *pmd) | 398 | static inline void flush_pmd_entry(pmd_t *pmd) |
371 | { | 399 | { |
372 | const unsigned int zero = 0; | ||
373 | const unsigned int __tlb_flag = __cpu_tlb_flags; | 400 | const unsigned int __tlb_flag = __cpu_tlb_flags; |
374 | 401 | ||
375 | if (tlb_flag(TLB_DCLEAN)) | 402 | if (tlb_flag(TLB_DCLEAN)) |
376 | asm("mcr p15, 0, %0, c7, c10, 1 @ flush_pmd" | 403 | asm("mcr p15, 0, %0, c7, c10, 1 @ flush_pmd" |
377 | : : "r" (pmd) : "cc"); | 404 | : : "r" (pmd) : "cc"); |
378 | if (tlb_flag(TLB_WB)) | 405 | if (tlb_flag(TLB_WB)) |
379 | asm("mcr p15, 0, %0, c7, c10, 4 @ flush_pmd" | 406 | dsb(); |
380 | : : "r" (zero) : "cc"); | ||
381 | } | 407 | } |
382 | 408 | ||
383 | static inline void clean_pmd_entry(pmd_t *pmd) | 409 | static inline void clean_pmd_entry(pmd_t *pmd) |
diff --git a/include/asm-arm/uaccess.h b/include/asm-arm/uaccess.h index 5f420a0149f1..4c1a3fa9f259 100644 --- a/include/asm-arm/uaccess.h +++ b/include/asm-arm/uaccess.h | |||
@@ -76,10 +76,10 @@ static inline void set_fs(mm_segment_t fs) | |||
76 | 76 | ||
77 | /* We use 33-bit arithmetic here... */ | 77 | /* We use 33-bit arithmetic here... */ |
78 | #define __range_ok(addr,size) ({ \ | 78 | #define __range_ok(addr,size) ({ \ |
79 | unsigned long flag, sum; \ | 79 | unsigned long flag, roksum; \ |
80 | __chk_user_ptr(addr); \ | 80 | __chk_user_ptr(addr); \ |
81 | __asm__("adds %1, %2, %3; sbcccs %1, %1, %0; movcc %0, #0" \ | 81 | __asm__("adds %1, %2, %3; sbcccs %1, %1, %0; movcc %0, #0" \ |
82 | : "=&r" (flag), "=&r" (sum) \ | 82 | : "=&r" (flag), "=&r" (roksum) \ |
83 | : "r" (addr), "Ir" (size), "0" (current_thread_info()->addr_limit) \ | 83 | : "r" (addr), "Ir" (size), "0" (current_thread_info()->addr_limit) \ |
84 | : "cc"); \ | 84 | : "cc"); \ |
85 | flag; }) | 85 | flag; }) |
@@ -109,7 +109,7 @@ extern int __get_user_4(void *); | |||
109 | 109 | ||
110 | #define get_user(x,p) \ | 110 | #define get_user(x,p) \ |
111 | ({ \ | 111 | ({ \ |
112 | const register typeof(*(p)) __user *__p asm("r0") = (p);\ | 112 | register const typeof(*(p)) __user *__p asm("r0") = (p);\ |
113 | register unsigned long __r2 asm("r2"); \ | 113 | register unsigned long __r2 asm("r2"); \ |
114 | register int __e asm("r0"); \ | 114 | register int __e asm("r0"); \ |
115 | switch (sizeof(*(__p))) { \ | 115 | switch (sizeof(*(__p))) { \ |
@@ -143,8 +143,8 @@ extern int __put_user_8(void *, unsigned long long); | |||
143 | 143 | ||
144 | #define put_user(x,p) \ | 144 | #define put_user(x,p) \ |
145 | ({ \ | 145 | ({ \ |
146 | const register typeof(*(p)) __r2 asm("r2") = (x); \ | 146 | register const typeof(*(p)) __r2 asm("r2") = (x); \ |
147 | const register typeof(*(p)) __user *__p asm("r0") = (p);\ | 147 | register const typeof(*(p)) __user *__p asm("r0") = (p);\ |
148 | register int __e asm("r0"); \ | 148 | register int __e asm("r0"); \ |
149 | switch (sizeof(*(__p))) { \ | 149 | switch (sizeof(*(__p))) { \ |
150 | case 1: \ | 150 | case 1: \ |
diff --git a/include/asm-arm/unistd.h b/include/asm-arm/unistd.h index 97e7060000cf..0991b7bc3f78 100644 --- a/include/asm-arm/unistd.h +++ b/include/asm-arm/unistd.h | |||
@@ -372,6 +372,7 @@ | |||
372 | #define __NR_move_pages (__NR_SYSCALL_BASE+344) | 372 | #define __NR_move_pages (__NR_SYSCALL_BASE+344) |
373 | #define __NR_getcpu (__NR_SYSCALL_BASE+345) | 373 | #define __NR_getcpu (__NR_SYSCALL_BASE+345) |
374 | /* 346 for epoll_pwait */ | 374 | /* 346 for epoll_pwait */ |
375 | #define __NR_sys_kexec_load (__NR_SYSCALL_BASE+347) | ||
375 | 376 | ||
376 | /* | 377 | /* |
377 | * The following SWIs are ARM private. | 378 | * The following SWIs are ARM private. |
diff --git a/include/asm-arm26/termios.h b/include/asm-arm26/termios.h index 7b8f5e8ae063..329c324c4040 100644 --- a/include/asm-arm26/termios.h +++ b/include/asm-arm26/termios.h | |||
@@ -49,24 +49,6 @@ struct termio { | |||
49 | 49 | ||
50 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 50 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
51 | 51 | ||
52 | /* line disciplines */ | ||
53 | #define N_TTY 0 | ||
54 | #define N_SLIP 1 | ||
55 | #define N_MOUSE 2 | ||
56 | #define N_PPP 3 | ||
57 | #define N_STRIP 4 | ||
58 | #define N_AX25 5 | ||
59 | #define N_X25 6 /* X.25 async */ | ||
60 | #define N_6PACK 7 | ||
61 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
62 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
63 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
64 | #define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ | ||
65 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
66 | #define N_HDLC 13 /* synchronous HDLC */ | ||
67 | #define N_SYNC_PPP 14 | ||
68 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
69 | |||
70 | #ifdef __KERNEL__ | 52 | #ifdef __KERNEL__ |
71 | 53 | ||
72 | /* | 54 | /* |
diff --git a/include/asm-arm26/uaccess-asm.h b/include/asm-arm26/uaccess-asm.h index 19f798e338c9..ade76ec02995 100644 --- a/include/asm-arm26/uaccess-asm.h +++ b/include/asm-arm26/uaccess-asm.h | |||
@@ -34,9 +34,9 @@ static inline void set_fs (mm_segment_t fs) | |||
34 | } | 34 | } |
35 | 35 | ||
36 | #define __range_ok(addr,size) ({ \ | 36 | #define __range_ok(addr,size) ({ \ |
37 | unsigned long flag, sum; \ | 37 | unsigned long flag, roksum; \ |
38 | __asm__ __volatile__("subs %1, %0, %3; cmpcs %1, %2; movcs %0, #0" \ | 38 | __asm__ __volatile__("subs %1, %0, %3; cmpcs %1, %2; movcs %0, #0" \ |
39 | : "=&r" (flag), "=&r" (sum) \ | 39 | : "=&r" (flag), "=&r" (roksum) \ |
40 | : "r" (addr), "Ir" (size), "0" (current_thread_info()->addr_limit) \ | 40 | : "r" (addr), "Ir" (size), "0" (current_thread_info()->addr_limit) \ |
41 | : "cc"); \ | 41 | : "cc"); \ |
42 | flag; }) | 42 | flag; }) |
diff --git a/include/asm-arm26/uaccess.h b/include/asm-arm26/uaccess.h index 3f2dd1093e58..d64ed84cb2d3 100644 --- a/include/asm-arm26/uaccess.h +++ b/include/asm-arm26/uaccess.h | |||
@@ -74,7 +74,7 @@ extern int __get_user_bad(void); | |||
74 | 74 | ||
75 | #define get_user(x,p) \ | 75 | #define get_user(x,p) \ |
76 | ({ \ | 76 | ({ \ |
77 | const register typeof(*(p)) *__p asm("r0") = (p); \ | 77 | register const typeof(*(p)) *__p asm("r0") = (p); \ |
78 | register typeof(*(p)) __r1 asm("r1"); \ | 78 | register typeof(*(p)) __r1 asm("r1"); \ |
79 | register int __e asm("r0"); \ | 79 | register int __e asm("r0"); \ |
80 | switch (sizeof(*(p))) { \ | 80 | switch (sizeof(*(p))) { \ |
@@ -139,8 +139,8 @@ extern int __put_user_bad(void); | |||
139 | 139 | ||
140 | #define put_user(x,p) \ | 140 | #define put_user(x,p) \ |
141 | ({ \ | 141 | ({ \ |
142 | const register typeof(*(p)) __r1 asm("r1") = (x); \ | 142 | register const typeof(*(p)) __r1 asm("r1") = (x); \ |
143 | const register typeof(*(p)) *__p asm("r0") = (p); \ | 143 | register const typeof(*(p)) *__p asm("r0") = (p); \ |
144 | register int __e asm("r0"); \ | 144 | register int __e asm("r0"); \ |
145 | switch (sizeof(*(__p))) { \ | 145 | switch (sizeof(*(__p))) { \ |
146 | case 1: \ | 146 | case 1: \ |
@@ -170,8 +170,8 @@ extern int __put_user_bad(void); | |||
170 | 170 | ||
171 | #define put_user(x,p) \ | 171 | #define put_user(x,p) \ |
172 | ({ \ | 172 | ({ \ |
173 | const register typeof(*(p)) __r1 asm("r1") = (x); \ | 173 | register const typeof(*(p)) __r1 asm("r1") = (x); \ |
174 | const register typeof(*(p)) *__p asm("r0") = (p); \ | 174 | register const typeof(*(p)) *__p asm("r0") = (p); \ |
175 | register int __e asm("r0"); \ | 175 | register int __e asm("r0"); \ |
176 | switch (sizeof(*(p))) { \ | 176 | switch (sizeof(*(p))) { \ |
177 | case 1: \ | 177 | case 1: \ |
diff --git a/include/asm-avr32/arch-at32ap/at91_pdc.h b/include/asm-avr32/arch-at32ap/at91_pdc.h deleted file mode 100644 index 79d6e02fa45e..000000000000 --- a/include/asm-avr32/arch-at32ap/at91_pdc.h +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91rm9200/at91_pdc.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Ivan Kokshaysky | ||
5 | * Copyright (C) SAN People | ||
6 | * | ||
7 | * Peripheral Data Controller (PDC) registers. | ||
8 | * Based on AT91RM9200 datasheet revision E. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or | ||
13 | * (at your option) any later version. | ||
14 | */ | ||
15 | |||
16 | #ifndef AT91_PDC_H | ||
17 | #define AT91_PDC_H | ||
18 | |||
19 | #define AT91_PDC_RPR 0x100 /* Receive Pointer Register */ | ||
20 | #define AT91_PDC_RCR 0x104 /* Receive Counter Register */ | ||
21 | #define AT91_PDC_TPR 0x108 /* Transmit Pointer Register */ | ||
22 | #define AT91_PDC_TCR 0x10c /* Transmit Counter Register */ | ||
23 | #define AT91_PDC_RNPR 0x110 /* Receive Next Pointer Register */ | ||
24 | #define AT91_PDC_RNCR 0x114 /* Receive Next Counter Register */ | ||
25 | #define AT91_PDC_TNPR 0x118 /* Transmit Next Pointer Register */ | ||
26 | #define AT91_PDC_TNCR 0x11c /* Transmit Next Counter Register */ | ||
27 | |||
28 | #define AT91_PDC_PTCR 0x120 /* Transfer Control Register */ | ||
29 | #define AT91_PDC_RXTEN (1 << 0) /* Receiver Transfer Enable */ | ||
30 | #define AT91_PDC_RXTDIS (1 << 1) /* Receiver Transfer Disable */ | ||
31 | #define AT91_PDC_TXTEN (1 << 8) /* Transmitter Transfer Enable */ | ||
32 | #define AT91_PDC_TXTDIS (1 << 9) /* Transmitter Transfer Disable */ | ||
33 | |||
34 | #define AT91_PDC_PTSR 0x124 /* Transfer Status Register */ | ||
35 | |||
36 | #endif | ||
diff --git a/include/asm-avr32/arch-at32ap/board.h b/include/asm-avr32/arch-at32ap/board.h index b120ee030c86..1a7b07d436ff 100644 --- a/include/asm-avr32/arch-at32ap/board.h +++ b/include/asm-avr32/arch-at32ap/board.h | |||
@@ -26,7 +26,9 @@ struct eth_platform_data { | |||
26 | struct platform_device * | 26 | struct platform_device * |
27 | at32_add_device_eth(unsigned int id, struct eth_platform_data *data); | 27 | at32_add_device_eth(unsigned int id, struct eth_platform_data *data); |
28 | 28 | ||
29 | struct platform_device *at32_add_device_spi(unsigned int id); | 29 | struct spi_board_info; |
30 | struct platform_device * | ||
31 | at32_add_device_spi(unsigned int id, struct spi_board_info *b, unsigned int n); | ||
30 | 32 | ||
31 | struct lcdc_platform_data { | 33 | struct lcdc_platform_data { |
32 | unsigned long fbmem_start; | 34 | unsigned long fbmem_start; |
diff --git a/include/asm-avr32/io.h b/include/asm-avr32/io.h index eec47500fa66..c08e81048393 100644 --- a/include/asm-avr32/io.h +++ b/include/asm-avr32/io.h | |||
@@ -28,13 +28,13 @@ static __inline__ void * phys_to_virt(unsigned long address) | |||
28 | * Generic IO read/write. These perform native-endian accesses. Note | 28 | * Generic IO read/write. These perform native-endian accesses. Note |
29 | * that some architectures will want to re-define __raw_{read,write}w. | 29 | * that some architectures will want to re-define __raw_{read,write}w. |
30 | */ | 30 | */ |
31 | extern void __raw_writesb(unsigned int addr, const void *data, int bytelen); | 31 | extern void __raw_writesb(void __iomem *addr, const void *data, int bytelen); |
32 | extern void __raw_writesw(unsigned int addr, const void *data, int wordlen); | 32 | extern void __raw_writesw(void __iomem *addr, const void *data, int wordlen); |
33 | extern void __raw_writesl(unsigned int addr, const void *data, int longlen); | 33 | extern void __raw_writesl(void __iomem *addr, const void *data, int longlen); |
34 | 34 | ||
35 | extern void __raw_readsb(unsigned int addr, void *data, int bytelen); | 35 | extern void __raw_readsb(const void __iomem *addr, void *data, int bytelen); |
36 | extern void __raw_readsw(unsigned int addr, void *data, int wordlen); | 36 | extern void __raw_readsw(const void __iomem *addr, void *data, int wordlen); |
37 | extern void __raw_readsl(unsigned int addr, void *data, int longlen); | 37 | extern void __raw_readsl(const void __iomem *addr, void *data, int longlen); |
38 | 38 | ||
39 | static inline void writeb(unsigned char b, volatile void __iomem *addr) | 39 | static inline void writeb(unsigned char b, volatile void __iomem *addr) |
40 | { | 40 | { |
@@ -252,6 +252,9 @@ extern void __iounmap(void __iomem *addr); | |||
252 | #define ioremap(offset, size) \ | 252 | #define ioremap(offset, size) \ |
253 | __ioremap((offset), (size), 0) | 253 | __ioremap((offset), (size), 0) |
254 | 254 | ||
255 | #define ioremap_nocache(offset, size) \ | ||
256 | __ioremap((offset), (size), 0) | ||
257 | |||
255 | #define iounmap(addr) \ | 258 | #define iounmap(addr) \ |
256 | __iounmap(addr) | 259 | __iounmap(addr) |
257 | 260 | ||
@@ -263,6 +266,14 @@ extern void __iounmap(void __iomem *addr); | |||
263 | #define page_to_bus page_to_phys | 266 | #define page_to_bus page_to_phys |
264 | #define bus_to_page phys_to_page | 267 | #define bus_to_page phys_to_page |
265 | 268 | ||
269 | /* | ||
270 | * Create a virtual mapping cookie for an IO port range. There exists | ||
271 | * no such thing as port-based I/O on AVR32, so a regular ioremap() | ||
272 | * should do what we need. | ||
273 | */ | ||
274 | #define ioport_map(port, nr) ioremap(port, nr) | ||
275 | #define ioport_unmap(port) iounmap(port) | ||
276 | |||
266 | #define dma_cache_wback_inv(_start, _size) \ | 277 | #define dma_cache_wback_inv(_start, _size) \ |
267 | flush_dcache_region(_start, _size) | 278 | flush_dcache_region(_start, _size) |
268 | #define dma_cache_inv(_start, _size) \ | 279 | #define dma_cache_inv(_start, _size) \ |
diff --git a/include/asm-avr32/termios.h b/include/asm-avr32/termios.h index 615bc0639e5c..0152aba35154 100644 --- a/include/asm-avr32/termios.h +++ b/include/asm-avr32/termios.h | |||
@@ -46,24 +46,6 @@ struct termio { | |||
46 | 46 | ||
47 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 47 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
48 | 48 | ||
49 | /* line disciplines */ | ||
50 | #define N_TTY 0 | ||
51 | #define N_SLIP 1 | ||
52 | #define N_MOUSE 2 | ||
53 | #define N_PPP 3 | ||
54 | #define N_STRIP 4 | ||
55 | #define N_AX25 5 | ||
56 | #define N_X25 6 /* X.25 async */ | ||
57 | #define N_6PACK 7 | ||
58 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
59 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
60 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
61 | #define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ | ||
62 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
63 | #define N_HDLC 13 /* synchronous HDLC */ | ||
64 | #define N_SYNC_PPP 14 /* synchronous PPP */ | ||
65 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
66 | |||
67 | #ifdef __KERNEL__ | 49 | #ifdef __KERNEL__ |
68 | /* intr=^C quit=^\ erase=del kill=^U | 50 | /* intr=^C quit=^\ erase=del kill=^U |
69 | eof=^D vtime=\0 vmin=\1 sxtc=\0 | 51 | eof=^D vtime=\0 vmin=\1 sxtc=\0 |
diff --git a/include/asm-avr32/unistd.h b/include/asm-avr32/unistd.h index 56ed1f9d348a..8f5120471819 100644 --- a/include/asm-avr32/unistd.h +++ b/include/asm-avr32/unistd.h | |||
@@ -120,7 +120,7 @@ | |||
120 | #define __NR_getitimer 105 | 120 | #define __NR_getitimer 105 |
121 | #define __NR_swapoff 106 | 121 | #define __NR_swapoff 106 |
122 | #define __NR_sysinfo 107 | 122 | #define __NR_sysinfo 107 |
123 | #define __NR_ipc 108 | 123 | /* 108 was __NR_ipc for a little while */ |
124 | #define __NR_sendfile 109 | 124 | #define __NR_sendfile 109 |
125 | #define __NR_setdomainname 110 | 125 | #define __NR_setdomainname 110 |
126 | #define __NR_uname 111 | 126 | #define __NR_uname 111 |
@@ -282,8 +282,21 @@ | |||
282 | #define __NR_vmsplice 264 | 282 | #define __NR_vmsplice 264 |
283 | #define __NR_epoll_pwait 265 | 283 | #define __NR_epoll_pwait 265 |
284 | 284 | ||
285 | #define __NR_msgget 266 | ||
286 | #define __NR_msgsnd 267 | ||
287 | #define __NR_msgrcv 268 | ||
288 | #define __NR_msgctl 269 | ||
289 | #define __NR_semget 270 | ||
290 | #define __NR_semop 271 | ||
291 | #define __NR_semctl 272 | ||
292 | #define __NR_semtimedop 273 | ||
293 | #define __NR_shmat 274 | ||
294 | #define __NR_shmget 275 | ||
295 | #define __NR_shmdt 276 | ||
296 | #define __NR_shmctl 277 | ||
297 | |||
285 | #ifdef __KERNEL__ | 298 | #ifdef __KERNEL__ |
286 | #define NR_syscalls 266 | 299 | #define NR_syscalls 278 |
287 | 300 | ||
288 | 301 | ||
289 | #define __ARCH_WANT_IPC_PARSE_VERSION | 302 | #define __ARCH_WANT_IPC_PARSE_VERSION |
diff --git a/include/asm-cris/semaphore-helper.h b/include/asm-cris/semaphore-helper.h index a8e1e6cb7cd0..27bfeca1b981 100644 --- a/include/asm-cris/semaphore-helper.h +++ b/include/asm-cris/semaphore-helper.h | |||
@@ -30,8 +30,7 @@ static inline int waking_non_zero(struct semaphore *sem) | |||
30 | unsigned long flags; | 30 | unsigned long flags; |
31 | int ret = 0; | 31 | int ret = 0; |
32 | 32 | ||
33 | local_save_flags(flags); | 33 | local_irq_save(flags); |
34 | local_irq_disable(); | ||
35 | if (read(&sem->waking) > 0) { | 34 | if (read(&sem->waking) > 0) { |
36 | dec(&sem->waking); | 35 | dec(&sem->waking); |
37 | ret = 1; | 36 | ret = 1; |
@@ -46,8 +45,7 @@ static inline int waking_non_zero_interruptible(struct semaphore *sem, | |||
46 | int ret = 0; | 45 | int ret = 0; |
47 | unsigned long flags; | 46 | unsigned long flags; |
48 | 47 | ||
49 | local_save_flags(flags); | 48 | local_irq_save(flags); |
50 | local_irq_disable(); | ||
51 | if (read(&sem->waking) > 0) { | 49 | if (read(&sem->waking) > 0) { |
52 | dec(&sem->waking); | 50 | dec(&sem->waking); |
53 | ret = 1; | 51 | ret = 1; |
@@ -64,8 +62,7 @@ static inline int waking_non_zero_trylock(struct semaphore *sem) | |||
64 | int ret = 1; | 62 | int ret = 1; |
65 | unsigned long flags; | 63 | unsigned long flags; |
66 | 64 | ||
67 | local_save_flags(flags); | 65 | local_irq_save(flags); |
68 | local_irq_disable(); | ||
69 | if (read(&sem->waking) <= 0) | 66 | if (read(&sem->waking) <= 0) |
70 | inc(&sem->count); | 67 | inc(&sem->count); |
71 | else { | 68 | else { |
diff --git a/include/asm-cris/system.h b/include/asm-cris/system.h index b869f6161aaa..fea0e8d57cb5 100644 --- a/include/asm-cris/system.h +++ b/include/asm-cris/system.h | |||
@@ -44,8 +44,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz | |||
44 | /* since Etrax doesn't have any atomic xchg instructions, we need to disable | 44 | /* since Etrax doesn't have any atomic xchg instructions, we need to disable |
45 | irq's (if enabled) and do it with move.d's */ | 45 | irq's (if enabled) and do it with move.d's */ |
46 | unsigned long flags,temp; | 46 | unsigned long flags,temp; |
47 | local_save_flags(flags); /* save flags, including irq enable bit */ | 47 | local_irq_save(flags); /* save flags, including irq enable bit and shut off irqs */ |
48 | local_irq_disable(); /* shut off irq's */ | ||
49 | switch (size) { | 48 | switch (size) { |
50 | case 1: | 49 | case 1: |
51 | *((unsigned char *)&temp) = x; | 50 | *((unsigned char *)&temp) = x; |
diff --git a/include/asm-cris/termios.h b/include/asm-cris/termios.h index 5ce1023c5d7b..c9dbd4d43368 100644 --- a/include/asm-cris/termios.h +++ b/include/asm-cris/termios.h | |||
@@ -40,24 +40,6 @@ struct termio { | |||
40 | 40 | ||
41 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 41 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
42 | 42 | ||
43 | /* line disciplines */ | ||
44 | #define N_TTY 0 | ||
45 | #define N_SLIP 1 | ||
46 | #define N_MOUSE 2 | ||
47 | #define N_PPP 3 | ||
48 | #define N_STRIP 4 | ||
49 | #define N_AX25 5 | ||
50 | #define N_X25 6 /* X.25 async */ | ||
51 | #define N_6PACK 7 | ||
52 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
53 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
54 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
55 | #define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ | ||
56 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
57 | #define N_HDLC 13 /* synchronous HDLC */ | ||
58 | #define N_SYNC_PPP 14 /* synchronous PPP */ | ||
59 | #define N_BT 15 /* bluetooth */ | ||
60 | |||
61 | #ifdef __KERNEL__ | 43 | #ifdef __KERNEL__ |
62 | 44 | ||
63 | /* intr=^C quit=^\ erase=del kill=^U | 45 | /* intr=^C quit=^\ erase=del kill=^U |
diff --git a/include/asm-frv/termios.h b/include/asm-frv/termios.h index 8840cf95e8dd..a62fb5872375 100644 --- a/include/asm-frv/termios.h +++ b/include/asm-frv/termios.h | |||
@@ -51,24 +51,6 @@ struct termio { | |||
51 | 51 | ||
52 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 52 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
53 | 53 | ||
54 | /* line disciplines */ | ||
55 | #define N_TTY 0 | ||
56 | #define N_SLIP 1 | ||
57 | #define N_MOUSE 2 | ||
58 | #define N_PPP 3 | ||
59 | #define N_STRIP 4 | ||
60 | #define N_AX25 5 | ||
61 | #define N_X25 6 /* X.25 async */ | ||
62 | #define N_6PACK 7 | ||
63 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
64 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
65 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
66 | #define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ | ||
67 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
68 | #define N_HDLC 13 /* synchronous HDLC */ | ||
69 | #define N_SYNC_PPP 14 | ||
70 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
71 | |||
72 | #ifdef __KERNEL__ | 54 | #ifdef __KERNEL__ |
73 | #include <asm-generic/termios.h> | 55 | #include <asm-generic/termios.h> |
74 | #endif | 56 | #endif |
diff --git a/include/asm-generic/dma-mapping-broken.h b/include/asm-generic/dma-mapping-broken.h index a7f1a55ce6b0..29413d3d4605 100644 --- a/include/asm-generic/dma-mapping-broken.h +++ b/include/asm-generic/dma-mapping-broken.h | |||
@@ -3,7 +3,6 @@ | |||
3 | 3 | ||
4 | /* This is used for archs that do not support DMA */ | 4 | /* This is used for archs that do not support DMA */ |
5 | 5 | ||
6 | |||
7 | static inline void * | 6 | static inline void * |
8 | dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, | 7 | dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, |
9 | gfp_t flag) | 8 | gfp_t flag) |
@@ -19,4 +18,7 @@ dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, | |||
19 | BUG(); | 18 | BUG(); |
20 | } | 19 | } |
21 | 20 | ||
21 | #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) | ||
22 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) | ||
23 | |||
22 | #endif /* _ASM_GENERIC_DMA_MAPPING_H */ | 24 | #endif /* _ASM_GENERIC_DMA_MAPPING_H */ |
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h new file mode 100644 index 000000000000..2d0aab1d8611 --- /dev/null +++ b/include/asm-generic/gpio.h | |||
@@ -0,0 +1,25 @@ | |||
1 | #ifndef _ASM_GENERIC_GPIO_H | ||
2 | #define _ASM_GENERIC_GPIO_H | ||
3 | |||
4 | /* platforms that don't directly support access to GPIOs through I2C, SPI, | ||
5 | * or other blocking infrastructure can use these wrappers. | ||
6 | */ | ||
7 | |||
8 | static inline int gpio_cansleep(unsigned gpio) | ||
9 | { | ||
10 | return 0; | ||
11 | } | ||
12 | |||
13 | static inline int gpio_get_value_cansleep(unsigned gpio) | ||
14 | { | ||
15 | might_sleep(); | ||
16 | return gpio_get_value(gpio); | ||
17 | } | ||
18 | |||
19 | static inline void gpio_set_value_cansleep(unsigned gpio, int value) | ||
20 | { | ||
21 | might_sleep(); | ||
22 | gpio_set_value(gpio, value); | ||
23 | } | ||
24 | |||
25 | #endif /* _ASM_GENERIC_GPIO_H */ | ||
diff --git a/include/asm-generic/memory_model.h b/include/asm-generic/memory_model.h index 8078cbd2c016..30d8d33491dd 100644 --- a/include/asm-generic/memory_model.h +++ b/include/asm-generic/memory_model.h | |||
@@ -54,7 +54,7 @@ | |||
54 | #define __page_to_pfn(pg) \ | 54 | #define __page_to_pfn(pg) \ |
55 | ({ struct page *__pg = (pg); \ | 55 | ({ struct page *__pg = (pg); \ |
56 | int __sec = page_to_section(__pg); \ | 56 | int __sec = page_to_section(__pg); \ |
57 | __pg - __section_mem_map_addr(__nr_to_section(__sec)); \ | 57 | (unsigned long)(__pg - __section_mem_map_addr(__nr_to_section(__sec))); \ |
58 | }) | 58 | }) |
59 | 59 | ||
60 | #define __pfn_to_page(pfn) \ | 60 | #define __pfn_to_page(pfn) \ |
diff --git a/include/asm-generic/mman.h b/include/asm-generic/mman.h index 3b41d2bb70da..5e3dde2ee5ad 100644 --- a/include/asm-generic/mman.h +++ b/include/asm-generic/mman.h | |||
@@ -36,7 +36,6 @@ | |||
36 | #define MADV_DOFORK 11 /* do inherit across fork */ | 36 | #define MADV_DOFORK 11 /* do inherit across fork */ |
37 | 37 | ||
38 | /* compatibility flags */ | 38 | /* compatibility flags */ |
39 | #define MAP_ANON MAP_ANONYMOUS | ||
40 | #define MAP_FILE 0 | 39 | #define MAP_FILE 0 |
41 | 40 | ||
42 | #endif | 41 | #endif |
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h index 9d774d07d95b..00c23433b39f 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm-generic/pgtable.h | |||
@@ -183,6 +183,19 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addres | |||
183 | #endif | 183 | #endif |
184 | 184 | ||
185 | /* | 185 | /* |
186 | * A facility to provide batching of the reload of page tables with the | ||
187 | * actual context switch code for paravirtualized guests. By convention, | ||
188 | * only one of the lazy modes (CPU, MMU) should be active at any given | ||
189 | * time, entry should never be nested, and entry and exits should always | ||
190 | * be paired. This is for sanity of maintaining and reasoning about the | ||
191 | * kernel code. | ||
192 | */ | ||
193 | #ifndef __HAVE_ARCH_ENTER_LAZY_CPU_MODE | ||
194 | #define arch_enter_lazy_cpu_mode() do {} while (0) | ||
195 | #define arch_leave_lazy_cpu_mode() do {} while (0) | ||
196 | #endif | ||
197 | |||
198 | /* | ||
186 | * When walking page tables, get the address of the next boundary, | 199 | * When walking page tables, get the address of the next boundary, |
187 | * or the end address of the range if that comes earlier. Although no | 200 | * or the end address of the range if that comes earlier. Although no |
188 | * vma end wraps to 0, rounded up __boundary may wrap to 0 throughout. | 201 | * vma end wraps to 0, rounded up __boundary may wrap to 0 throughout. |
diff --git a/include/asm-h8300/termios.h b/include/asm-h8300/termios.h index e2319f992af2..fb2925d08c49 100644 --- a/include/asm-h8300/termios.h +++ b/include/asm-h8300/termios.h | |||
@@ -49,24 +49,6 @@ struct termio { | |||
49 | 49 | ||
50 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 50 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
51 | 51 | ||
52 | /* line disciplines */ | ||
53 | #define N_TTY 0 | ||
54 | #define N_SLIP 1 | ||
55 | #define N_MOUSE 2 | ||
56 | #define N_PPP 3 | ||
57 | #define N_STRIP 4 | ||
58 | #define N_AX25 5 | ||
59 | #define N_X25 6 /* X.25 async */ | ||
60 | #define N_6PACK 7 | ||
61 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
62 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
63 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
64 | #define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ | ||
65 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
66 | #define N_HDLC 13 /* synchronous HDLC */ | ||
67 | #define N_SYNC_PPP 14 | ||
68 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
69 | |||
70 | #ifdef __KERNEL__ | 52 | #ifdef __KERNEL__ |
71 | 53 | ||
72 | /* | 54 | /* |
diff --git a/include/asm-i386/acpi.h b/include/asm-i386/acpi.h index 5e657eb8946c..449f3f272e07 100644 --- a/include/asm-i386/acpi.h +++ b/include/asm-i386/acpi.h | |||
@@ -127,6 +127,7 @@ extern int acpi_irq_balance_set(char *str); | |||
127 | #define acpi_ioapic 0 | 127 | #define acpi_ioapic 0 |
128 | static inline void acpi_noirq_set(void) { } | 128 | static inline void acpi_noirq_set(void) { } |
129 | static inline void acpi_disable_pci(void) { } | 129 | static inline void acpi_disable_pci(void) { } |
130 | static inline void disable_acpi(void) { } | ||
130 | 131 | ||
131 | #endif /* !CONFIG_ACPI */ | 132 | #endif /* !CONFIG_ACPI */ |
132 | 133 | ||
diff --git a/include/asm-i386/apic.h b/include/asm-i386/apic.h index 41a44319905f..cc6b1652249a 100644 --- a/include/asm-i386/apic.h +++ b/include/asm-i386/apic.h | |||
@@ -43,6 +43,8 @@ extern void generic_apic_probe(void); | |||
43 | #define apic_write native_apic_write | 43 | #define apic_write native_apic_write |
44 | #define apic_write_atomic native_apic_write_atomic | 44 | #define apic_write_atomic native_apic_write_atomic |
45 | #define apic_read native_apic_read | 45 | #define apic_read native_apic_read |
46 | #define setup_boot_clock setup_boot_APIC_clock | ||
47 | #define setup_secondary_clock setup_secondary_APIC_clock | ||
46 | #endif | 48 | #endif |
47 | 49 | ||
48 | static __inline fastcall void native_apic_write(unsigned long reg, | 50 | static __inline fastcall void native_apic_write(unsigned long reg, |
@@ -93,9 +95,7 @@ static inline void ack_APIC_irq(void) | |||
93 | apic_write_around(APIC_EOI, 0); | 95 | apic_write_around(APIC_EOI, 0); |
94 | } | 96 | } |
95 | 97 | ||
96 | extern void (*wait_timer_tick)(void); | 98 | extern int lapic_get_maxlvt(void); |
97 | |||
98 | extern int get_maxlvt(void); | ||
99 | extern void clear_local_APIC(void); | 99 | extern void clear_local_APIC(void); |
100 | extern void connect_bsp_APIC (void); | 100 | extern void connect_bsp_APIC (void); |
101 | extern void disconnect_bsp_APIC (int virt_wire_setup); | 101 | extern void disconnect_bsp_APIC (int virt_wire_setup); |
@@ -111,14 +111,9 @@ extern void smp_local_timer_interrupt (void); | |||
111 | extern void setup_boot_APIC_clock (void); | 111 | extern void setup_boot_APIC_clock (void); |
112 | extern void setup_secondary_APIC_clock (void); | 112 | extern void setup_secondary_APIC_clock (void); |
113 | extern int APIC_init_uniprocessor (void); | 113 | extern int APIC_init_uniprocessor (void); |
114 | extern void disable_APIC_timer(void); | ||
115 | extern void enable_APIC_timer(void); | ||
116 | 114 | ||
117 | extern void enable_NMI_through_LVT0 (void * dummy); | 115 | extern void enable_NMI_through_LVT0 (void * dummy); |
118 | 116 | ||
119 | void smp_send_timer_broadcast_ipi(void); | ||
120 | void switch_APIC_timer_to_ipi(void *cpumask); | ||
121 | void switch_ipi_to_APIC_timer(void *cpumask); | ||
122 | #define ARCH_APICTIMER_STOPS_ON_C3 1 | 117 | #define ARCH_APICTIMER_STOPS_ON_C3 1 |
123 | 118 | ||
124 | extern int timer_over_8254; | 119 | extern int timer_over_8254; |
diff --git a/include/asm-i386/atomic.h b/include/asm-i386/atomic.h index c57441bb2905..4dd272331361 100644 --- a/include/asm-i386/atomic.h +++ b/include/asm-i386/atomic.h | |||
@@ -211,12 +211,12 @@ static __inline__ int atomic_sub_return(int i, atomic_t *v) | |||
211 | #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) | 211 | #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) |
212 | 212 | ||
213 | /** | 213 | /** |
214 | * atomic_add_unless - add unless the number is a given value | 214 | * atomic_add_unless - add unless the number is already a given value |
215 | * @v: pointer of type atomic_t | 215 | * @v: pointer of type atomic_t |
216 | * @a: the amount to add to v... | 216 | * @a: the amount to add to v... |
217 | * @u: ...unless v is equal to u. | 217 | * @u: ...unless v is equal to u. |
218 | * | 218 | * |
219 | * Atomically adds @a to @v, so long as it was not @u. | 219 | * Atomically adds @a to @v, so long as @v was not already @u. |
220 | * Returns non-zero if @v was not @u, and zero otherwise. | 220 | * Returns non-zero if @v was not @u, and zero otherwise. |
221 | */ | 221 | */ |
222 | #define atomic_add_unless(v, a, u) \ | 222 | #define atomic_add_unless(v, a, u) \ |
diff --git a/include/asm-i386/bitops.h b/include/asm-i386/bitops.h index 1c780fa1e762..273b50629357 100644 --- a/include/asm-i386/bitops.h +++ b/include/asm-i386/bitops.h | |||
@@ -371,7 +371,7 @@ static inline unsigned long ffz(unsigned long word) | |||
371 | * | 371 | * |
372 | * This is defined the same way as | 372 | * This is defined the same way as |
373 | * the libc and compiler builtin ffs routines, therefore | 373 | * the libc and compiler builtin ffs routines, therefore |
374 | * differs in spirit from the above ffz (man ffs). | 374 | * differs in spirit from the above ffz() (man ffs). |
375 | */ | 375 | */ |
376 | static inline int ffs(int x) | 376 | static inline int ffs(int x) |
377 | { | 377 | { |
@@ -388,7 +388,7 @@ static inline int ffs(int x) | |||
388 | * fls - find last bit set | 388 | * fls - find last bit set |
389 | * @x: the word to search | 389 | * @x: the word to search |
390 | * | 390 | * |
391 | * This is defined the same way as ffs. | 391 | * This is defined the same way as ffs(). |
392 | */ | 392 | */ |
393 | static inline int fls(int x) | 393 | static inline int fls(int x) |
394 | { | 394 | { |
diff --git a/include/asm-i386/bugs.h b/include/asm-i386/bugs.h index 38f1aebbbdb5..c90c7c499302 100644 --- a/include/asm-i386/bugs.h +++ b/include/asm-i386/bugs.h | |||
@@ -160,7 +160,7 @@ static void __init check_config(void) | |||
160 | * If we configured ourselves for a TSC, we'd better have one! | 160 | * If we configured ourselves for a TSC, we'd better have one! |
161 | */ | 161 | */ |
162 | #ifdef CONFIG_X86_TSC | 162 | #ifdef CONFIG_X86_TSC |
163 | if (!cpu_has_tsc) | 163 | if (!cpu_has_tsc && !tsc_disable) |
164 | panic("Kernel compiled for Pentium+, requires TSC feature!"); | 164 | panic("Kernel compiled for Pentium+, requires TSC feature!"); |
165 | #endif | 165 | #endif |
166 | 166 | ||
diff --git a/include/asm-i386/desc.h b/include/asm-i386/desc.h index f398cc456448..050831f34f71 100644 --- a/include/asm-i386/desc.h +++ b/include/asm-i386/desc.h | |||
@@ -22,7 +22,7 @@ struct Xgt_desc_struct { | |||
22 | 22 | ||
23 | extern struct Xgt_desc_struct idt_descr; | 23 | extern struct Xgt_desc_struct idt_descr; |
24 | DECLARE_PER_CPU(struct Xgt_desc_struct, cpu_gdt_descr); | 24 | DECLARE_PER_CPU(struct Xgt_desc_struct, cpu_gdt_descr); |
25 | 25 | extern struct Xgt_desc_struct early_gdt_descr; | |
26 | 26 | ||
27 | static inline struct desc_struct *get_cpu_gdt_table(unsigned int cpu) | 27 | static inline struct desc_struct *get_cpu_gdt_table(unsigned int cpu) |
28 | { | 28 | { |
diff --git a/include/asm-i386/elf.h b/include/asm-i386/elf.h index 369035dfe4b6..8d33c9bb7c1c 100644 --- a/include/asm-i386/elf.h +++ b/include/asm-i386/elf.h | |||
@@ -90,8 +90,8 @@ typedef struct user_fxsr_struct elf_fpxregset_t; | |||
90 | pr_reg[6] = regs->eax; \ | 90 | pr_reg[6] = regs->eax; \ |
91 | pr_reg[7] = regs->xds; \ | 91 | pr_reg[7] = regs->xds; \ |
92 | pr_reg[8] = regs->xes; \ | 92 | pr_reg[8] = regs->xes; \ |
93 | savesegment(fs,pr_reg[9]); \ | 93 | pr_reg[9] = regs->xfs; \ |
94 | pr_reg[10] = regs->xgs; \ | 94 | savesegment(gs,pr_reg[10]); \ |
95 | pr_reg[11] = regs->orig_eax; \ | 95 | pr_reg[11] = regs->orig_eax; \ |
96 | pr_reg[12] = regs->eip; \ | 96 | pr_reg[12] = regs->eip; \ |
97 | pr_reg[13] = regs->xcs; \ | 97 | pr_reg[13] = regs->xcs; \ |
diff --git a/include/asm-i386/hpet.h b/include/asm-i386/hpet.h index e47be9a56cc2..fc03cf9de5c4 100644 --- a/include/asm-i386/hpet.h +++ b/include/asm-i386/hpet.h | |||
@@ -90,16 +90,19 @@ | |||
90 | #define HPET_MIN_PERIOD (100000UL) | 90 | #define HPET_MIN_PERIOD (100000UL) |
91 | #define HPET_TICK_RATE (HZ * 100000UL) | 91 | #define HPET_TICK_RATE (HZ * 100000UL) |
92 | 92 | ||
93 | extern unsigned long hpet_tick; /* hpet clks count per tick */ | ||
94 | extern unsigned long hpet_address; /* hpet memory map physical address */ | 93 | extern unsigned long hpet_address; /* hpet memory map physical address */ |
95 | extern int hpet_use_timer; | 94 | extern int is_hpet_enabled(void); |
96 | 95 | ||
96 | #ifdef CONFIG_X86_64 | ||
97 | extern unsigned long hpet_tick; /* hpet clks count per tick */ | ||
98 | extern int hpet_use_timer; | ||
97 | extern int hpet_rtc_timer_init(void); | 99 | extern int hpet_rtc_timer_init(void); |
98 | extern int hpet_enable(void); | 100 | extern int hpet_enable(void); |
99 | extern int hpet_reenable(void); | ||
100 | extern int is_hpet_enabled(void); | ||
101 | extern int is_hpet_capable(void); | 101 | extern int is_hpet_capable(void); |
102 | extern int hpet_readl(unsigned long a); | 102 | extern int hpet_readl(unsigned long a); |
103 | #else | ||
104 | extern int hpet_enable(void); | ||
105 | #endif | ||
103 | 106 | ||
104 | #ifdef CONFIG_HPET_EMULATE_RTC | 107 | #ifdef CONFIG_HPET_EMULATE_RTC |
105 | extern int hpet_mask_rtc_irq_bit(unsigned long bit_mask); | 108 | extern int hpet_mask_rtc_irq_bit(unsigned long bit_mask); |
@@ -110,5 +113,10 @@ extern int hpet_rtc_dropped_irq(void); | |||
110 | extern int hpet_rtc_timer_init(void); | 113 | extern int hpet_rtc_timer_init(void); |
111 | extern irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id); | 114 | extern irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id); |
112 | #endif /* CONFIG_HPET_EMULATE_RTC */ | 115 | #endif /* CONFIG_HPET_EMULATE_RTC */ |
116 | |||
117 | #else | ||
118 | |||
119 | static inline int hpet_enable(void) { return 0; } | ||
120 | |||
113 | #endif /* CONFIG_HPET_TIMER */ | 121 | #endif /* CONFIG_HPET_TIMER */ |
114 | #endif /* _I386_HPET_H */ | 122 | #endif /* _I386_HPET_H */ |
diff --git a/include/asm-i386/i8253.h b/include/asm-i386/i8253.h index 015d8df07690..6cb0dd4dcdde 100644 --- a/include/asm-i386/i8253.h +++ b/include/asm-i386/i8253.h | |||
@@ -1,6 +1,21 @@ | |||
1 | #ifndef __ASM_I8253_H__ | 1 | #ifndef __ASM_I8253_H__ |
2 | #define __ASM_I8253_H__ | 2 | #define __ASM_I8253_H__ |
3 | 3 | ||
4 | #include <linux/clockchips.h> | ||
5 | |||
4 | extern spinlock_t i8253_lock; | 6 | extern spinlock_t i8253_lock; |
5 | 7 | ||
8 | extern struct clock_event_device *global_clock_event; | ||
9 | |||
10 | /** | ||
11 | * pit_interrupt_hook - hook into timer tick | ||
12 | * @regs: standard registers from interrupt | ||
13 | * | ||
14 | * Call the global clock event handler. | ||
15 | **/ | ||
16 | static inline void pit_interrupt_hook(void) | ||
17 | { | ||
18 | global_clock_event->event_handler(global_clock_event); | ||
19 | } | ||
20 | |||
6 | #endif /* __ASM_I8253_H__ */ | 21 | #endif /* __ASM_I8253_H__ */ |
diff --git a/include/asm-i386/mach-default/do_timer.h b/include/asm-i386/mach-default/do_timer.h index 7d606e3364ae..56e5689863ae 100644 --- a/include/asm-i386/mach-default/do_timer.h +++ b/include/asm-i386/mach-default/do_timer.h | |||
@@ -1,86 +1,16 @@ | |||
1 | /* defines for inline arch setup functions */ | 1 | /* defines for inline arch setup functions */ |
2 | #include <linux/clockchips.h> | ||
2 | 3 | ||
3 | #include <asm/apic.h> | ||
4 | #include <asm/i8259.h> | 4 | #include <asm/i8259.h> |
5 | #include <asm/i8253.h> | ||
5 | 6 | ||
6 | /** | 7 | /** |
7 | * do_timer_interrupt_hook - hook into timer tick | 8 | * do_timer_interrupt_hook - hook into timer tick |
8 | * @regs: standard registers from interrupt | ||
9 | * | 9 | * |
10 | * Description: | 10 | * Call the pit clock event handler. see asm/i8253.h |
11 | * This hook is called immediately after the timer interrupt is ack'd. | ||
12 | * It's primary purpose is to allow architectures that don't possess | ||
13 | * individual per CPU clocks (like the CPU APICs supply) to broadcast the | ||
14 | * timer interrupt as a means of triggering reschedules etc. | ||
15 | **/ | 11 | **/ |
16 | 12 | ||
17 | static inline void do_timer_interrupt_hook(void) | 13 | static inline void do_timer_interrupt_hook(void) |
18 | { | 14 | { |
19 | do_timer(1); | 15 | pit_interrupt_hook(); |
20 | #ifndef CONFIG_SMP | ||
21 | update_process_times(user_mode_vm(get_irq_regs())); | ||
22 | #endif | ||
23 | /* | ||
24 | * In the SMP case we use the local APIC timer interrupt to do the | ||
25 | * profiling, except when we simulate SMP mode on a uniprocessor | ||
26 | * system, in that case we have to call the local interrupt handler. | ||
27 | */ | ||
28 | #ifndef CONFIG_X86_LOCAL_APIC | ||
29 | profile_tick(CPU_PROFILING); | ||
30 | #else | ||
31 | if (!using_apic_timer) | ||
32 | smp_local_timer_interrupt(); | ||
33 | #endif | ||
34 | } | ||
35 | |||
36 | |||
37 | /* you can safely undefine this if you don't have the Neptune chipset */ | ||
38 | |||
39 | #define BUGGY_NEPTUN_TIMER | ||
40 | |||
41 | /** | ||
42 | * do_timer_overflow - process a detected timer overflow condition | ||
43 | * @count: hardware timer interrupt count on overflow | ||
44 | * | ||
45 | * Description: | ||
46 | * This call is invoked when the jiffies count has not incremented but | ||
47 | * the hardware timer interrupt has. It means that a timer tick interrupt | ||
48 | * came along while the previous one was pending, thus a tick was missed | ||
49 | **/ | ||
50 | static inline int do_timer_overflow(int count) | ||
51 | { | ||
52 | int i; | ||
53 | |||
54 | spin_lock(&i8259A_lock); | ||
55 | /* | ||
56 | * This is tricky when I/O APICs are used; | ||
57 | * see do_timer_interrupt(). | ||
58 | */ | ||
59 | i = inb(0x20); | ||
60 | spin_unlock(&i8259A_lock); | ||
61 | |||
62 | /* assumption about timer being IRQ0 */ | ||
63 | if (i & 0x01) { | ||
64 | /* | ||
65 | * We cannot detect lost timer interrupts ... | ||
66 | * well, that's why we call them lost, don't we? :) | ||
67 | * [hmm, on the Pentium and Alpha we can ... sort of] | ||
68 | */ | ||
69 | count -= LATCH; | ||
70 | } else { | ||
71 | #ifdef BUGGY_NEPTUN_TIMER | ||
72 | /* | ||
73 | * for the Neptun bug we know that the 'latch' | ||
74 | * command doesn't latch the high and low value | ||
75 | * of the counter atomically. Thus we have to | ||
76 | * substract 256 from the counter | ||
77 | * ... funny, isnt it? :) | ||
78 | */ | ||
79 | |||
80 | count -= 256; | ||
81 | #else | ||
82 | printk("do_slow_gettimeoffset(): hardware timer problem?\n"); | ||
83 | #endif | ||
84 | } | ||
85 | return count; | ||
86 | } | 16 | } |
diff --git a/include/asm-i386/mach-voyager/do_timer.h b/include/asm-i386/mach-voyager/do_timer.h index 04e69c104a74..60f9dcc15d54 100644 --- a/include/asm-i386/mach-voyager/do_timer.h +++ b/include/asm-i386/mach-voyager/do_timer.h | |||
@@ -1,25 +1,18 @@ | |||
1 | /* defines for inline arch setup functions */ | 1 | /* defines for inline arch setup functions */ |
2 | #include <linux/clockchips.h> | ||
3 | |||
2 | #include <asm/voyager.h> | 4 | #include <asm/voyager.h> |
5 | #include <asm/i8253.h> | ||
3 | 6 | ||
7 | /** | ||
8 | * do_timer_interrupt_hook - hook into timer tick | ||
9 | * @regs: standard registers from interrupt | ||
10 | * | ||
11 | * Call the pit clock event handler. see asm/i8253.h | ||
12 | **/ | ||
4 | static inline void do_timer_interrupt_hook(void) | 13 | static inline void do_timer_interrupt_hook(void) |
5 | { | 14 | { |
6 | do_timer(1); | 15 | pit_interrupt_hook(); |
7 | #ifndef CONFIG_SMP | ||
8 | update_process_times(user_mode_vm(irq_regs)); | ||
9 | #endif | ||
10 | |||
11 | voyager_timer_interrupt(); | 16 | voyager_timer_interrupt(); |
12 | } | 17 | } |
13 | 18 | ||
14 | static inline int do_timer_overflow(int count) | ||
15 | { | ||
16 | /* can't read the ISR, just assume 1 tick | ||
17 | overflow */ | ||
18 | if(count > LATCH || count < 0) { | ||
19 | printk(KERN_ERR "VOYAGER PROBLEM: count is %d, latch is %d\n", count, LATCH); | ||
20 | count = LATCH; | ||
21 | } | ||
22 | count -= LATCH; | ||
23 | |||
24 | return count; | ||
25 | } | ||
diff --git a/include/asm-i386/mce.h b/include/asm-i386/mce.h index 7cc1a973bf00..b0a02ee34ffd 100644 --- a/include/asm-i386/mce.h +++ b/include/asm-i386/mce.h | |||
@@ -3,3 +3,5 @@ extern void mcheck_init(struct cpuinfo_x86 *c); | |||
3 | #else | 3 | #else |
4 | #define mcheck_init(c) do {} while(0) | 4 | #define mcheck_init(c) do {} while(0) |
5 | #endif | 5 | #endif |
6 | |||
7 | extern int mce_disabled; | ||
diff --git a/include/asm-i386/mmu_context.h b/include/asm-i386/mmu_context.h index 68ff102d6f5e..e6aa30f8de5b 100644 --- a/include/asm-i386/mmu_context.h +++ b/include/asm-i386/mmu_context.h | |||
@@ -63,7 +63,7 @@ static inline void switch_mm(struct mm_struct *prev, | |||
63 | } | 63 | } |
64 | 64 | ||
65 | #define deactivate_mm(tsk, mm) \ | 65 | #define deactivate_mm(tsk, mm) \ |
66 | asm("movl %0,%%fs": :"r" (0)); | 66 | asm("movl %0,%%gs": :"r" (0)); |
67 | 67 | ||
68 | #define activate_mm(prev, next) \ | 68 | #define activate_mm(prev, next) \ |
69 | switch_mm((prev),(next),NULL) | 69 | switch_mm((prev),(next),NULL) |
diff --git a/include/asm-i386/mpspec.h b/include/asm-i386/mpspec.h index 770bf6da8c3d..f21349399d14 100644 --- a/include/asm-i386/mpspec.h +++ b/include/asm-i386/mpspec.h | |||
@@ -23,7 +23,6 @@ extern struct mpc_config_intsrc mp_irqs [MAX_IRQ_SOURCES]; | |||
23 | extern int mpc_default_type; | 23 | extern int mpc_default_type; |
24 | extern unsigned long mp_lapic_addr; | 24 | extern unsigned long mp_lapic_addr; |
25 | extern int pic_mode; | 25 | extern int pic_mode; |
26 | extern int using_apic_timer; | ||
27 | 26 | ||
28 | #ifdef CONFIG_ACPI | 27 | #ifdef CONFIG_ACPI |
29 | extern void mp_register_lapic (u8 id, u8 enabled); | 28 | extern void mp_register_lapic (u8 id, u8 enabled); |
diff --git a/include/asm-i386/msr.h b/include/asm-i386/msr.h index 8c35f3d90a89..ec3b6803fd36 100644 --- a/include/asm-i386/msr.h +++ b/include/asm-i386/msr.h | |||
@@ -321,4 +321,7 @@ static inline void wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h) | |||
321 | #define MSR_CORE_PERF_GLOBAL_CTRL 0x38f | 321 | #define MSR_CORE_PERF_GLOBAL_CTRL 0x38f |
322 | #define MSR_CORE_PERF_GLOBAL_OVF_CTRL 0x390 | 322 | #define MSR_CORE_PERF_GLOBAL_OVF_CTRL 0x390 |
323 | 323 | ||
324 | /* Geode defined MSRs */ | ||
325 | #define MSR_GEODE_BUSCONT_CONF0 0x1900 | ||
326 | |||
324 | #endif /* __ASM_MSR_H */ | 327 | #endif /* __ASM_MSR_H */ |
diff --git a/include/asm-i386/paravirt.h b/include/asm-i386/paravirt.h index 9f06265065f4..6317e0a4d735 100644 --- a/include/asm-i386/paravirt.h +++ b/include/asm-i386/paravirt.h | |||
@@ -59,90 +59,102 @@ struct paravirt_ops | |||
59 | convention. This makes it easier to implement inline | 59 | convention. This makes it easier to implement inline |
60 | assembler replacements. */ | 60 | assembler replacements. */ |
61 | 61 | ||
62 | void (fastcall *cpuid)(unsigned int *eax, unsigned int *ebx, | 62 | void (*cpuid)(unsigned int *eax, unsigned int *ebx, |
63 | unsigned int *ecx, unsigned int *edx); | 63 | unsigned int *ecx, unsigned int *edx); |
64 | 64 | ||
65 | unsigned long (fastcall *get_debugreg)(int regno); | 65 | unsigned long (*get_debugreg)(int regno); |
66 | void (fastcall *set_debugreg)(int regno, unsigned long value); | 66 | void (*set_debugreg)(int regno, unsigned long value); |
67 | 67 | ||
68 | void (fastcall *clts)(void); | 68 | void (*clts)(void); |
69 | 69 | ||
70 | unsigned long (fastcall *read_cr0)(void); | 70 | unsigned long (*read_cr0)(void); |
71 | void (fastcall *write_cr0)(unsigned long); | 71 | void (*write_cr0)(unsigned long); |
72 | 72 | ||
73 | unsigned long (fastcall *read_cr2)(void); | 73 | unsigned long (*read_cr2)(void); |
74 | void (fastcall *write_cr2)(unsigned long); | 74 | void (*write_cr2)(unsigned long); |
75 | 75 | ||
76 | unsigned long (fastcall *read_cr3)(void); | 76 | unsigned long (*read_cr3)(void); |
77 | void (fastcall *write_cr3)(unsigned long); | 77 | void (*write_cr3)(unsigned long); |
78 | 78 | ||
79 | unsigned long (fastcall *read_cr4_safe)(void); | 79 | unsigned long (*read_cr4_safe)(void); |
80 | unsigned long (fastcall *read_cr4)(void); | 80 | unsigned long (*read_cr4)(void); |
81 | void (fastcall *write_cr4)(unsigned long); | 81 | void (*write_cr4)(unsigned long); |
82 | 82 | ||
83 | unsigned long (fastcall *save_fl)(void); | 83 | unsigned long (*save_fl)(void); |
84 | void (fastcall *restore_fl)(unsigned long); | 84 | void (*restore_fl)(unsigned long); |
85 | void (fastcall *irq_disable)(void); | 85 | void (*irq_disable)(void); |
86 | void (fastcall *irq_enable)(void); | 86 | void (*irq_enable)(void); |
87 | void (fastcall *safe_halt)(void); | 87 | void (*safe_halt)(void); |
88 | void (fastcall *halt)(void); | 88 | void (*halt)(void); |
89 | void (fastcall *wbinvd)(void); | 89 | void (*wbinvd)(void); |
90 | 90 | ||
91 | /* err = 0/-EFAULT. wrmsr returns 0/-EFAULT. */ | 91 | /* err = 0/-EFAULT. wrmsr returns 0/-EFAULT. */ |
92 | u64 (fastcall *read_msr)(unsigned int msr, int *err); | 92 | u64 (*read_msr)(unsigned int msr, int *err); |
93 | int (fastcall *write_msr)(unsigned int msr, u64 val); | 93 | int (*write_msr)(unsigned int msr, u64 val); |
94 | 94 | ||
95 | u64 (fastcall *read_tsc)(void); | 95 | u64 (*read_tsc)(void); |
96 | u64 (fastcall *read_pmc)(void); | 96 | u64 (*read_pmc)(void); |
97 | 97 | ||
98 | void (fastcall *load_tr_desc)(void); | 98 | void (*load_tr_desc)(void); |
99 | void (fastcall *load_gdt)(const struct Xgt_desc_struct *); | 99 | void (*load_gdt)(const struct Xgt_desc_struct *); |
100 | void (fastcall *load_idt)(const struct Xgt_desc_struct *); | 100 | void (*load_idt)(const struct Xgt_desc_struct *); |
101 | void (fastcall *store_gdt)(struct Xgt_desc_struct *); | 101 | void (*store_gdt)(struct Xgt_desc_struct *); |
102 | void (fastcall *store_idt)(struct Xgt_desc_struct *); | 102 | void (*store_idt)(struct Xgt_desc_struct *); |
103 | void (fastcall *set_ldt)(const void *desc, unsigned entries); | 103 | void (*set_ldt)(const void *desc, unsigned entries); |
104 | unsigned long (fastcall *store_tr)(void); | 104 | unsigned long (*store_tr)(void); |
105 | void (fastcall *load_tls)(struct thread_struct *t, unsigned int cpu); | 105 | void (*load_tls)(struct thread_struct *t, unsigned int cpu); |
106 | void (fastcall *write_ldt_entry)(void *dt, int entrynum, | 106 | void (*write_ldt_entry)(void *dt, int entrynum, |
107 | u32 low, u32 high); | 107 | u32 low, u32 high); |
108 | void (fastcall *write_gdt_entry)(void *dt, int entrynum, | 108 | void (*write_gdt_entry)(void *dt, int entrynum, |
109 | u32 low, u32 high); | 109 | u32 low, u32 high); |
110 | void (fastcall *write_idt_entry)(void *dt, int entrynum, | 110 | void (*write_idt_entry)(void *dt, int entrynum, |
111 | u32 low, u32 high); | 111 | u32 low, u32 high); |
112 | void (fastcall *load_esp0)(struct tss_struct *tss, | 112 | void (*load_esp0)(struct tss_struct *tss, |
113 | struct thread_struct *thread); | 113 | struct thread_struct *thread); |
114 | 114 | ||
115 | void (fastcall *set_iopl_mask)(unsigned mask); | 115 | void (*set_iopl_mask)(unsigned mask); |
116 | 116 | ||
117 | void (fastcall *io_delay)(void); | 117 | void (*io_delay)(void); |
118 | void (*const_udelay)(unsigned long loops); | 118 | void (*const_udelay)(unsigned long loops); |
119 | 119 | ||
120 | #ifdef CONFIG_X86_LOCAL_APIC | 120 | #ifdef CONFIG_X86_LOCAL_APIC |
121 | void (fastcall *apic_write)(unsigned long reg, unsigned long v); | 121 | void (*apic_write)(unsigned long reg, unsigned long v); |
122 | void (fastcall *apic_write_atomic)(unsigned long reg, unsigned long v); | 122 | void (*apic_write_atomic)(unsigned long reg, unsigned long v); |
123 | unsigned long (fastcall *apic_read)(unsigned long reg); | 123 | unsigned long (*apic_read)(unsigned long reg); |
124 | void (*setup_boot_clock)(void); | ||
125 | void (*setup_secondary_clock)(void); | ||
124 | #endif | 126 | #endif |
125 | 127 | ||
126 | void (fastcall *flush_tlb_user)(void); | 128 | void (*flush_tlb_user)(void); |
127 | void (fastcall *flush_tlb_kernel)(void); | 129 | void (*flush_tlb_kernel)(void); |
128 | void (fastcall *flush_tlb_single)(u32 addr); | 130 | void (*flush_tlb_single)(u32 addr); |
129 | 131 | ||
130 | void (fastcall *set_pte)(pte_t *ptep, pte_t pteval); | 132 | void (*alloc_pt)(u32 pfn); |
131 | void (fastcall *set_pte_at)(struct mm_struct *mm, u32 addr, pte_t *ptep, pte_t pteval); | 133 | void (*alloc_pd)(u32 pfn); |
132 | void (fastcall *set_pmd)(pmd_t *pmdp, pmd_t pmdval); | 134 | void (*alloc_pd_clone)(u32 pfn, u32 clonepfn, u32 start, u32 count); |
133 | void (fastcall *pte_update)(struct mm_struct *mm, u32 addr, pte_t *ptep); | 135 | void (*release_pt)(u32 pfn); |
134 | void (fastcall *pte_update_defer)(struct mm_struct *mm, u32 addr, pte_t *ptep); | 136 | void (*release_pd)(u32 pfn); |
137 | |||
138 | void (*set_pte)(pte_t *ptep, pte_t pteval); | ||
139 | void (*set_pte_at)(struct mm_struct *mm, u32 addr, pte_t *ptep, pte_t pteval); | ||
140 | void (*set_pmd)(pmd_t *pmdp, pmd_t pmdval); | ||
141 | void (*pte_update)(struct mm_struct *mm, u32 addr, pte_t *ptep); | ||
142 | void (*pte_update_defer)(struct mm_struct *mm, u32 addr, pte_t *ptep); | ||
135 | #ifdef CONFIG_X86_PAE | 143 | #ifdef CONFIG_X86_PAE |
136 | void (fastcall *set_pte_atomic)(pte_t *ptep, pte_t pteval); | 144 | void (*set_pte_atomic)(pte_t *ptep, pte_t pteval); |
137 | void (fastcall *set_pte_present)(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pte); | 145 | void (*set_pte_present)(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pte); |
138 | void (fastcall *set_pud)(pud_t *pudp, pud_t pudval); | 146 | void (*set_pud)(pud_t *pudp, pud_t pudval); |
139 | void (fastcall *pte_clear)(struct mm_struct *mm, unsigned long addr, pte_t *ptep); | 147 | void (*pte_clear)(struct mm_struct *mm, unsigned long addr, pte_t *ptep); |
140 | void (fastcall *pmd_clear)(pmd_t *pmdp); | 148 | void (*pmd_clear)(pmd_t *pmdp); |
141 | #endif | 149 | #endif |
142 | 150 | ||
151 | void (*set_lazy_mode)(int mode); | ||
152 | |||
143 | /* These two are jmp to, not actually called. */ | 153 | /* These two are jmp to, not actually called. */ |
144 | void (fastcall *irq_enable_sysexit)(void); | 154 | void (*irq_enable_sysexit)(void); |
145 | void (fastcall *iret)(void); | 155 | void (*iret)(void); |
156 | |||
157 | void (*startup_ipi_hook)(int phys_apicid, unsigned long start_eip, unsigned long start_esp); | ||
146 | }; | 158 | }; |
147 | 159 | ||
148 | /* Mark a paravirt probe function. */ | 160 | /* Mark a paravirt probe function. */ |
@@ -313,13 +325,38 @@ static inline unsigned long apic_read(unsigned long reg) | |||
313 | { | 325 | { |
314 | return paravirt_ops.apic_read(reg); | 326 | return paravirt_ops.apic_read(reg); |
315 | } | 327 | } |
328 | |||
329 | static inline void setup_boot_clock(void) | ||
330 | { | ||
331 | paravirt_ops.setup_boot_clock(); | ||
332 | } | ||
333 | |||
334 | static inline void setup_secondary_clock(void) | ||
335 | { | ||
336 | paravirt_ops.setup_secondary_clock(); | ||
337 | } | ||
316 | #endif | 338 | #endif |
317 | 339 | ||
340 | #ifdef CONFIG_SMP | ||
341 | static inline void startup_ipi_hook(int phys_apicid, unsigned long start_eip, | ||
342 | unsigned long start_esp) | ||
343 | { | ||
344 | return paravirt_ops.startup_ipi_hook(phys_apicid, start_eip, start_esp); | ||
345 | } | ||
346 | #endif | ||
318 | 347 | ||
319 | #define __flush_tlb() paravirt_ops.flush_tlb_user() | 348 | #define __flush_tlb() paravirt_ops.flush_tlb_user() |
320 | #define __flush_tlb_global() paravirt_ops.flush_tlb_kernel() | 349 | #define __flush_tlb_global() paravirt_ops.flush_tlb_kernel() |
321 | #define __flush_tlb_single(addr) paravirt_ops.flush_tlb_single(addr) | 350 | #define __flush_tlb_single(addr) paravirt_ops.flush_tlb_single(addr) |
322 | 351 | ||
352 | #define paravirt_alloc_pt(pfn) paravirt_ops.alloc_pt(pfn) | ||
353 | #define paravirt_release_pt(pfn) paravirt_ops.release_pt(pfn) | ||
354 | |||
355 | #define paravirt_alloc_pd(pfn) paravirt_ops.alloc_pd(pfn) | ||
356 | #define paravirt_alloc_pd_clone(pfn, clonepfn, start, count) \ | ||
357 | paravirt_ops.alloc_pd_clone(pfn, clonepfn, start, count) | ||
358 | #define paravirt_release_pd(pfn) paravirt_ops.release_pd(pfn) | ||
359 | |||
323 | static inline void set_pte(pte_t *ptep, pte_t pteval) | 360 | static inline void set_pte(pte_t *ptep, pte_t pteval) |
324 | { | 361 | { |
325 | paravirt_ops.set_pte(ptep, pteval); | 362 | paravirt_ops.set_pte(ptep, pteval); |
@@ -372,6 +409,19 @@ static inline void pmd_clear(pmd_t *pmdp) | |||
372 | } | 409 | } |
373 | #endif | 410 | #endif |
374 | 411 | ||
412 | /* Lazy mode for batching updates / context switch */ | ||
413 | #define PARAVIRT_LAZY_NONE 0 | ||
414 | #define PARAVIRT_LAZY_MMU 1 | ||
415 | #define PARAVIRT_LAZY_CPU 2 | ||
416 | |||
417 | #define __HAVE_ARCH_ENTER_LAZY_CPU_MODE | ||
418 | #define arch_enter_lazy_cpu_mode() paravirt_ops.set_lazy_mode(PARAVIRT_LAZY_CPU) | ||
419 | #define arch_leave_lazy_cpu_mode() paravirt_ops.set_lazy_mode(PARAVIRT_LAZY_NONE) | ||
420 | |||
421 | #define __HAVE_ARCH_ENTER_LAZY_MMU_MODE | ||
422 | #define arch_enter_lazy_mmu_mode() paravirt_ops.set_lazy_mode(PARAVIRT_LAZY_MMU) | ||
423 | #define arch_leave_lazy_mmu_mode() paravirt_ops.set_lazy_mode(PARAVIRT_LAZY_NONE) | ||
424 | |||
375 | /* These all sit in the .parainstructions section to tell us what to patch. */ | 425 | /* These all sit in the .parainstructions section to tell us what to patch. */ |
376 | struct paravirt_patch { | 426 | struct paravirt_patch { |
377 | u8 *instr; /* original instructions */ | 427 | u8 *instr; /* original instructions */ |
diff --git a/include/asm-i386/pda.h b/include/asm-i386/pda.h index 2ba2736aa109..b12d59a318b7 100644 --- a/include/asm-i386/pda.h +++ b/include/asm-i386/pda.h | |||
@@ -39,19 +39,19 @@ extern struct i386_pda _proxy_pda; | |||
39 | if (0) { T__ tmp__; tmp__ = (val); } \ | 39 | if (0) { T__ tmp__; tmp__ = (val); } \ |
40 | switch (sizeof(_proxy_pda.field)) { \ | 40 | switch (sizeof(_proxy_pda.field)) { \ |
41 | case 1: \ | 41 | case 1: \ |
42 | asm(op "b %1,%%gs:%c2" \ | 42 | asm(op "b %1,%%fs:%c2" \ |
43 | : "+m" (_proxy_pda.field) \ | 43 | : "+m" (_proxy_pda.field) \ |
44 | :"ri" ((T__)val), \ | 44 | :"ri" ((T__)val), \ |
45 | "i"(pda_offset(field))); \ | 45 | "i"(pda_offset(field))); \ |
46 | break; \ | 46 | break; \ |
47 | case 2: \ | 47 | case 2: \ |
48 | asm(op "w %1,%%gs:%c2" \ | 48 | asm(op "w %1,%%fs:%c2" \ |
49 | : "+m" (_proxy_pda.field) \ | 49 | : "+m" (_proxy_pda.field) \ |
50 | :"ri" ((T__)val), \ | 50 | :"ri" ((T__)val), \ |
51 | "i"(pda_offset(field))); \ | 51 | "i"(pda_offset(field))); \ |
52 | break; \ | 52 | break; \ |
53 | case 4: \ | 53 | case 4: \ |
54 | asm(op "l %1,%%gs:%c2" \ | 54 | asm(op "l %1,%%fs:%c2" \ |
55 | : "+m" (_proxy_pda.field) \ | 55 | : "+m" (_proxy_pda.field) \ |
56 | :"ri" ((T__)val), \ | 56 | :"ri" ((T__)val), \ |
57 | "i"(pda_offset(field))); \ | 57 | "i"(pda_offset(field))); \ |
@@ -65,19 +65,19 @@ extern struct i386_pda _proxy_pda; | |||
65 | typeof(_proxy_pda.field) ret__; \ | 65 | typeof(_proxy_pda.field) ret__; \ |
66 | switch (sizeof(_proxy_pda.field)) { \ | 66 | switch (sizeof(_proxy_pda.field)) { \ |
67 | case 1: \ | 67 | case 1: \ |
68 | asm(op "b %%gs:%c1,%0" \ | 68 | asm(op "b %%fs:%c1,%0" \ |
69 | : "=r" (ret__) \ | 69 | : "=r" (ret__) \ |
70 | : "i" (pda_offset(field)), \ | 70 | : "i" (pda_offset(field)), \ |
71 | "m" (_proxy_pda.field)); \ | 71 | "m" (_proxy_pda.field)); \ |
72 | break; \ | 72 | break; \ |
73 | case 2: \ | 73 | case 2: \ |
74 | asm(op "w %%gs:%c1,%0" \ | 74 | asm(op "w %%fs:%c1,%0" \ |
75 | : "=r" (ret__) \ | 75 | : "=r" (ret__) \ |
76 | : "i" (pda_offset(field)), \ | 76 | : "i" (pda_offset(field)), \ |
77 | "m" (_proxy_pda.field)); \ | 77 | "m" (_proxy_pda.field)); \ |
78 | break; \ | 78 | break; \ |
79 | case 4: \ | 79 | case 4: \ |
80 | asm(op "l %%gs:%c1,%0" \ | 80 | asm(op "l %%fs:%c1,%0" \ |
81 | : "=r" (ret__) \ | 81 | : "=r" (ret__) \ |
82 | : "i" (pda_offset(field)), \ | 82 | : "i" (pda_offset(field)), \ |
83 | "m" (_proxy_pda.field)); \ | 83 | "m" (_proxy_pda.field)); \ |
diff --git a/include/asm-i386/pgalloc.h b/include/asm-i386/pgalloc.h index 4b1e61359f89..c8dc2d0141a7 100644 --- a/include/asm-i386/pgalloc.h +++ b/include/asm-i386/pgalloc.h | |||
@@ -5,13 +5,31 @@ | |||
5 | #include <linux/threads.h> | 5 | #include <linux/threads.h> |
6 | #include <linux/mm.h> /* for struct page */ | 6 | #include <linux/mm.h> /* for struct page */ |
7 | 7 | ||
8 | #define pmd_populate_kernel(mm, pmd, pte) \ | 8 | #ifdef CONFIG_PARAVIRT |
9 | set_pmd(pmd, __pmd(_PAGE_TABLE + __pa(pte))) | 9 | #include <asm/paravirt.h> |
10 | #else | ||
11 | #define paravirt_alloc_pt(pfn) do { } while (0) | ||
12 | #define paravirt_alloc_pd(pfn) do { } while (0) | ||
13 | #define paravirt_alloc_pd(pfn) do { } while (0) | ||
14 | #define paravirt_alloc_pd_clone(pfn, clonepfn, start, count) do { } while (0) | ||
15 | #define paravirt_release_pt(pfn) do { } while (0) | ||
16 | #define paravirt_release_pd(pfn) do { } while (0) | ||
17 | #endif | ||
18 | |||
19 | #define pmd_populate_kernel(mm, pmd, pte) \ | ||
20 | do { \ | ||
21 | paravirt_alloc_pt(__pa(pte) >> PAGE_SHIFT); \ | ||
22 | set_pmd(pmd, __pmd(_PAGE_TABLE + __pa(pte))); \ | ||
23 | } while (0) | ||
10 | 24 | ||
11 | #define pmd_populate(mm, pmd, pte) \ | 25 | #define pmd_populate(mm, pmd, pte) \ |
26 | do { \ | ||
27 | paravirt_alloc_pt(page_to_pfn(pte)); \ | ||
12 | set_pmd(pmd, __pmd(_PAGE_TABLE + \ | 28 | set_pmd(pmd, __pmd(_PAGE_TABLE + \ |
13 | ((unsigned long long)page_to_pfn(pte) << \ | 29 | ((unsigned long long)page_to_pfn(pte) << \ |
14 | (unsigned long long) PAGE_SHIFT))) | 30 | (unsigned long long) PAGE_SHIFT))); \ |
31 | } while (0) | ||
32 | |||
15 | /* | 33 | /* |
16 | * Allocate and free page tables. | 34 | * Allocate and free page tables. |
17 | */ | 35 | */ |
@@ -32,7 +50,11 @@ static inline void pte_free(struct page *pte) | |||
32 | } | 50 | } |
33 | 51 | ||
34 | 52 | ||
35 | #define __pte_free_tlb(tlb,pte) tlb_remove_page((tlb),(pte)) | 53 | #define __pte_free_tlb(tlb,pte) \ |
54 | do { \ | ||
55 | paravirt_release_pt(page_to_pfn(pte)); \ | ||
56 | tlb_remove_page((tlb),(pte)); \ | ||
57 | } while (0) | ||
36 | 58 | ||
37 | #ifdef CONFIG_X86_PAE | 59 | #ifdef CONFIG_X86_PAE |
38 | /* | 60 | /* |
diff --git a/include/asm-i386/processor.h b/include/asm-i386/processor.h index 359f10b54f59..11bf899de8aa 100644 --- a/include/asm-i386/processor.h +++ b/include/asm-i386/processor.h | |||
@@ -424,7 +424,7 @@ struct thread_struct { | |||
424 | .vm86_info = NULL, \ | 424 | .vm86_info = NULL, \ |
425 | .sysenter_cs = __KERNEL_CS, \ | 425 | .sysenter_cs = __KERNEL_CS, \ |
426 | .io_bitmap_ptr = NULL, \ | 426 | .io_bitmap_ptr = NULL, \ |
427 | .gs = __KERNEL_PDA, \ | 427 | .fs = __KERNEL_PDA, \ |
428 | } | 428 | } |
429 | 429 | ||
430 | /* | 430 | /* |
@@ -442,8 +442,8 @@ struct thread_struct { | |||
442 | } | 442 | } |
443 | 443 | ||
444 | #define start_thread(regs, new_eip, new_esp) do { \ | 444 | #define start_thread(regs, new_eip, new_esp) do { \ |
445 | __asm__("movl %0,%%fs": :"r" (0)); \ | 445 | __asm__("movl %0,%%gs": :"r" (0)); \ |
446 | regs->xgs = 0; \ | 446 | regs->xfs = 0; \ |
447 | set_fs(USER_DS); \ | 447 | set_fs(USER_DS); \ |
448 | regs->xds = __USER_DS; \ | 448 | regs->xds = __USER_DS; \ |
449 | regs->xes = __USER_DS; \ | 449 | regs->xes = __USER_DS; \ |
diff --git a/include/asm-i386/ptrace.h b/include/asm-i386/ptrace.h index bdbc894339b4..6002597b9e12 100644 --- a/include/asm-i386/ptrace.h +++ b/include/asm-i386/ptrace.h | |||
@@ -16,8 +16,8 @@ struct pt_regs { | |||
16 | long eax; | 16 | long eax; |
17 | int xds; | 17 | int xds; |
18 | int xes; | 18 | int xes; |
19 | /* int xfs; */ | 19 | int xfs; |
20 | int xgs; | 20 | /* int xgs; */ |
21 | long orig_eax; | 21 | long orig_eax; |
22 | long eip; | 22 | long eip; |
23 | int xcs; | 23 | int xcs; |
@@ -49,6 +49,10 @@ static inline int user_mode_vm(struct pt_regs *regs) | |||
49 | { | 49 | { |
50 | return ((regs->xcs & SEGMENT_RPL_MASK) | (regs->eflags & VM_MASK)) >= USER_RPL; | 50 | return ((regs->xcs & SEGMENT_RPL_MASK) | (regs->eflags & VM_MASK)) >= USER_RPL; |
51 | } | 51 | } |
52 | static inline int v8086_mode(struct pt_regs *regs) | ||
53 | { | ||
54 | return (regs->eflags & VM_MASK); | ||
55 | } | ||
52 | 56 | ||
53 | #define instruction_pointer(regs) ((regs)->eip) | 57 | #define instruction_pointer(regs) ((regs)->eip) |
54 | #define regs_return_value(regs) ((regs)->eax) | 58 | #define regs_return_value(regs) ((regs)->eax) |
diff --git a/include/asm-i386/segment.h b/include/asm-i386/segment.h index 3c796af33776..065f10bfa487 100644 --- a/include/asm-i386/segment.h +++ b/include/asm-i386/segment.h | |||
@@ -83,14 +83,8 @@ | |||
83 | * The GDT has 32 entries | 83 | * The GDT has 32 entries |
84 | */ | 84 | */ |
85 | #define GDT_ENTRIES 32 | 85 | #define GDT_ENTRIES 32 |
86 | |||
87 | #define GDT_SIZE (GDT_ENTRIES * 8) | 86 | #define GDT_SIZE (GDT_ENTRIES * 8) |
88 | 87 | ||
89 | /* Matches __KERNEL_CS and __USER_CS (they must be 2 entries apart) */ | ||
90 | #define SEGMENT_IS_FLAT_CODE(x) (((x) & 0xec) == GDT_ENTRY_KERNEL_CS * 8) | ||
91 | /* Matches PNP_CS32 and PNP_CS16 (they must be consecutive) */ | ||
92 | #define SEGMENT_IS_PNP_CODE(x) (((x) & 0xf4) == GDT_ENTRY_PNPBIOS_BASE * 8) | ||
93 | |||
94 | /* Simple and small GDT entries for booting only */ | 88 | /* Simple and small GDT entries for booting only */ |
95 | 89 | ||
96 | #define GDT_ENTRY_BOOT_CS 2 | 90 | #define GDT_ENTRY_BOOT_CS 2 |
@@ -134,4 +128,17 @@ | |||
134 | #ifndef CONFIG_PARAVIRT | 128 | #ifndef CONFIG_PARAVIRT |
135 | #define get_kernel_rpl() 0 | 129 | #define get_kernel_rpl() 0 |
136 | #endif | 130 | #endif |
131 | /* | ||
132 | * Matching rules for certain types of segments. | ||
133 | */ | ||
134 | |||
135 | /* Matches only __KERNEL_CS, ignoring PnP / USER / APM segments */ | ||
136 | #define SEGMENT_IS_KERNEL_CODE(x) (((x) & 0xfc) == GDT_ENTRY_KERNEL_CS * 8) | ||
137 | |||
138 | /* Matches __KERNEL_CS and __USER_CS (they must be 2 entries apart) */ | ||
139 | #define SEGMENT_IS_FLAT_CODE(x) (((x) & 0xec) == GDT_ENTRY_KERNEL_CS * 8) | ||
140 | |||
141 | /* Matches PNP_CS32 and PNP_CS16 (they must be consecutive) */ | ||
142 | #define SEGMENT_IS_PNP_CODE(x) (((x) & 0xf4) == GDT_ENTRY_PNPBIOS_BASE * 8) | ||
143 | |||
137 | #endif | 144 | #endif |
diff --git a/include/asm-i386/setup.h b/include/asm-i386/setup.h index 67659dbaf120..0e8077cbfdac 100644 --- a/include/asm-i386/setup.h +++ b/include/asm-i386/setup.h | |||
@@ -6,7 +6,7 @@ | |||
6 | #ifndef _i386_SETUP_H | 6 | #ifndef _i386_SETUP_H |
7 | #define _i386_SETUP_H | 7 | #define _i386_SETUP_H |
8 | 8 | ||
9 | #define COMMAND_LINE_SIZE 256 | 9 | #define COMMAND_LINE_SIZE 2048 |
10 | 10 | ||
11 | #ifdef __KERNEL__ | 11 | #ifdef __KERNEL__ |
12 | #include <linux/pfn.h> | 12 | #include <linux/pfn.h> |
@@ -77,6 +77,8 @@ int __init sanitize_e820_map(struct e820entry * biosmap, char * pnr_map); | |||
77 | void __init add_memory_region(unsigned long long start, | 77 | void __init add_memory_region(unsigned long long start, |
78 | unsigned long long size, int type); | 78 | unsigned long long size, int type); |
79 | 79 | ||
80 | extern unsigned long init_pg_tables_end; | ||
81 | |||
80 | #endif /* __ASSEMBLY__ */ | 82 | #endif /* __ASSEMBLY__ */ |
81 | 83 | ||
82 | #endif /* __KERNEL__ */ | 84 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-i386/smp.h b/include/asm-i386/smp.h index 64fe624c02ca..6bf0033a301c 100644 --- a/include/asm-i386/smp.h +++ b/include/asm-i386/smp.h | |||
@@ -52,6 +52,11 @@ extern void cpu_exit_clear(void); | |||
52 | extern void cpu_uninit(void); | 52 | extern void cpu_uninit(void); |
53 | #endif | 53 | #endif |
54 | 54 | ||
55 | #ifndef CONFIG_PARAVIRT | ||
56 | #define startup_ipi_hook(phys_apicid, start_eip, start_esp) \ | ||
57 | do { } while (0) | ||
58 | #endif | ||
59 | |||
55 | /* | 60 | /* |
56 | * This function is needed by all SMP systems. It must _always_ be valid | 61 | * This function is needed by all SMP systems. It must _always_ be valid |
57 | * from the initial startup. We map APIC_BASE very early in page_setup(), | 62 | * from the initial startup. We map APIC_BASE very early in page_setup(), |
diff --git a/include/asm-i386/termios.h b/include/asm-i386/termios.h index 03f548536d6b..7c99678a8f86 100644 --- a/include/asm-i386/termios.h +++ b/include/asm-i386/termios.h | |||
@@ -39,24 +39,6 @@ struct termio { | |||
39 | 39 | ||
40 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 40 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
41 | 41 | ||
42 | /* line disciplines */ | ||
43 | #define N_TTY 0 | ||
44 | #define N_SLIP 1 | ||
45 | #define N_MOUSE 2 | ||
46 | #define N_PPP 3 | ||
47 | #define N_STRIP 4 | ||
48 | #define N_AX25 5 | ||
49 | #define N_X25 6 /* X.25 async */ | ||
50 | #define N_6PACK 7 | ||
51 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
52 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
53 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
54 | #define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ | ||
55 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
56 | #define N_HDLC 13 /* synchronous HDLC */ | ||
57 | #define N_SYNC_PPP 14 /* synchronous PPP */ | ||
58 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
59 | |||
60 | #ifdef __KERNEL__ | 42 | #ifdef __KERNEL__ |
61 | #include <linux/module.h> | 43 | #include <linux/module.h> |
62 | 44 | ||
diff --git a/include/asm-i386/time.h b/include/asm-i386/time.h index ea8065af825a..571b4294dc2e 100644 --- a/include/asm-i386/time.h +++ b/include/asm-i386/time.h | |||
@@ -30,6 +30,7 @@ static inline int native_set_wallclock(unsigned long nowtime) | |||
30 | 30 | ||
31 | #ifdef CONFIG_PARAVIRT | 31 | #ifdef CONFIG_PARAVIRT |
32 | #include <asm/paravirt.h> | 32 | #include <asm/paravirt.h> |
33 | extern unsigned long long native_sched_clock(void); | ||
33 | #else /* !CONFIG_PARAVIRT */ | 34 | #else /* !CONFIG_PARAVIRT */ |
34 | 35 | ||
35 | #define get_wallclock() native_get_wallclock() | 36 | #define get_wallclock() native_get_wallclock() |
diff --git a/include/asm-i386/timer.h b/include/asm-i386/timer.h index d0ebd05f8516..4752c3a6a708 100644 --- a/include/asm-i386/timer.h +++ b/include/asm-i386/timer.h | |||
@@ -8,6 +8,9 @@ void setup_pit_timer(void); | |||
8 | /* Modifiers for buggy PIT handling */ | 8 | /* Modifiers for buggy PIT handling */ |
9 | extern int pit_latch_buggy; | 9 | extern int pit_latch_buggy; |
10 | extern int timer_ack; | 10 | extern int timer_ack; |
11 | extern int no_timer_check; | ||
12 | extern unsigned long long (*custom_sched_clock)(void); | ||
13 | extern int no_sync_cmos_clock; | ||
11 | extern int recalibrate_cpu_khz(void); | 14 | extern int recalibrate_cpu_khz(void); |
12 | 15 | ||
13 | #endif | 16 | #endif |
diff --git a/include/asm-i386/tsc.h b/include/asm-i386/tsc.h index c13933185c1c..e997891cc7cc 100644 --- a/include/asm-i386/tsc.h +++ b/include/asm-i386/tsc.h | |||
@@ -1,48 +1 @@ | |||
1 | /* | #include <asm-x86_64/tsc.h> | |
2 | * linux/include/asm-i386/tsc.h | ||
3 | * | ||
4 | * i386 TSC related functions | ||
5 | */ | ||
6 | #ifndef _ASM_i386_TSC_H | ||
7 | #define _ASM_i386_TSC_H | ||
8 | |||
9 | #include <asm/processor.h> | ||
10 | |||
11 | /* | ||
12 | * Standard way to access the cycle counter on i586+ CPUs. | ||
13 | * Currently only used on SMP. | ||
14 | * | ||
15 | * If you really have a SMP machine with i486 chips or older, | ||
16 | * compile for that, and this will just always return zero. | ||
17 | * That's ok, it just means that the nicer scheduling heuristics | ||
18 | * won't work for you. | ||
19 | * | ||
20 | * We only use the low 32 bits, and we'd simply better make sure | ||
21 | * that we reschedule before that wraps. Scheduling at least every | ||
22 | * four billion cycles just basically sounds like a good idea, | ||
23 | * regardless of how fast the machine is. | ||
24 | */ | ||
25 | typedef unsigned long long cycles_t; | ||
26 | |||
27 | extern unsigned int cpu_khz; | ||
28 | extern unsigned int tsc_khz; | ||
29 | |||
30 | static inline cycles_t get_cycles(void) | ||
31 | { | ||
32 | unsigned long long ret = 0; | ||
33 | |||
34 | #ifndef CONFIG_X86_TSC | ||
35 | if (!cpu_has_tsc) | ||
36 | return 0; | ||
37 | #endif | ||
38 | |||
39 | #if defined(CONFIG_X86_GENERIC) || defined(CONFIG_X86_TSC) | ||
40 | rdtscll(ret); | ||
41 | #endif | ||
42 | return ret; | ||
43 | } | ||
44 | |||
45 | extern void tsc_init(void); | ||
46 | extern void mark_tsc_unstable(void); | ||
47 | |||
48 | #endif | ||
diff --git a/include/asm-i386/uaccess.h b/include/asm-i386/uaccess.h index eef5133b9ce2..70829ae3ad52 100644 --- a/include/asm-i386/uaccess.h +++ b/include/asm-i386/uaccess.h | |||
@@ -54,10 +54,10 @@ extern struct movsl_mask { | |||
54 | * This needs 33-bit arithmetic. We have a carry... | 54 | * This needs 33-bit arithmetic. We have a carry... |
55 | */ | 55 | */ |
56 | #define __range_ok(addr,size) ({ \ | 56 | #define __range_ok(addr,size) ({ \ |
57 | unsigned long flag,sum; \ | 57 | unsigned long flag,roksum; \ |
58 | __chk_user_ptr(addr); \ | 58 | __chk_user_ptr(addr); \ |
59 | asm("addl %3,%1 ; sbbl %0,%0; cmpl %1,%4; sbbl $0,%0" \ | 59 | asm("addl %3,%1 ; sbbl %0,%0; cmpl %1,%4; sbbl $0,%0" \ |
60 | :"=&r" (flag), "=r" (sum) \ | 60 | :"=&r" (flag), "=r" (roksum) \ |
61 | :"1" (addr),"g" ((int)(size)),"rm" (current_thread_info()->addr_limit.seg)); \ | 61 | :"1" (addr),"g" ((int)(size)),"rm" (current_thread_info()->addr_limit.seg)); \ |
62 | flag; }) | 62 | flag; }) |
63 | 63 | ||
diff --git a/include/asm-i386/vmi.h b/include/asm-i386/vmi.h new file mode 100644 index 000000000000..43c89333037e --- /dev/null +++ b/include/asm-i386/vmi.h | |||
@@ -0,0 +1,262 @@ | |||
1 | /* | ||
2 | * VMI interface definition | ||
3 | * | ||
4 | * Copyright (C) 2005, VMware, Inc. | ||
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 as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, but | ||
12 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or | ||
14 | * NON INFRINGEMENT. See the GNU General Public License for more | ||
15 | * details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
20 | * | ||
21 | * Maintained by: Zachary Amsden zach@vmware.com | ||
22 | * | ||
23 | */ | ||
24 | #include <linux/types.h> | ||
25 | |||
26 | /* | ||
27 | *--------------------------------------------------------------------- | ||
28 | * | ||
29 | * VMI Option ROM API | ||
30 | * | ||
31 | *--------------------------------------------------------------------- | ||
32 | */ | ||
33 | #define VMI_SIGNATURE 0x696d5663 /* "cVmi" */ | ||
34 | |||
35 | #define PCI_VENDOR_ID_VMWARE 0x15AD | ||
36 | #define PCI_DEVICE_ID_VMWARE_VMI 0x0801 | ||
37 | |||
38 | /* | ||
39 | * We use two version numbers for compatibility, with the major | ||
40 | * number signifying interface breakages, and the minor number | ||
41 | * interface extensions. | ||
42 | */ | ||
43 | #define VMI_API_REV_MAJOR 3 | ||
44 | #define VMI_API_REV_MINOR 0 | ||
45 | |||
46 | #define VMI_CALL_CPUID 0 | ||
47 | #define VMI_CALL_WRMSR 1 | ||
48 | #define VMI_CALL_RDMSR 2 | ||
49 | #define VMI_CALL_SetGDT 3 | ||
50 | #define VMI_CALL_SetLDT 4 | ||
51 | #define VMI_CALL_SetIDT 5 | ||
52 | #define VMI_CALL_SetTR 6 | ||
53 | #define VMI_CALL_GetGDT 7 | ||
54 | #define VMI_CALL_GetLDT 8 | ||
55 | #define VMI_CALL_GetIDT 9 | ||
56 | #define VMI_CALL_GetTR 10 | ||
57 | #define VMI_CALL_WriteGDTEntry 11 | ||
58 | #define VMI_CALL_WriteLDTEntry 12 | ||
59 | #define VMI_CALL_WriteIDTEntry 13 | ||
60 | #define VMI_CALL_UpdateKernelStack 14 | ||
61 | #define VMI_CALL_SetCR0 15 | ||
62 | #define VMI_CALL_SetCR2 16 | ||
63 | #define VMI_CALL_SetCR3 17 | ||
64 | #define VMI_CALL_SetCR4 18 | ||
65 | #define VMI_CALL_GetCR0 19 | ||
66 | #define VMI_CALL_GetCR2 20 | ||
67 | #define VMI_CALL_GetCR3 21 | ||
68 | #define VMI_CALL_GetCR4 22 | ||
69 | #define VMI_CALL_WBINVD 23 | ||
70 | #define VMI_CALL_SetDR 24 | ||
71 | #define VMI_CALL_GetDR 25 | ||
72 | #define VMI_CALL_RDPMC 26 | ||
73 | #define VMI_CALL_RDTSC 27 | ||
74 | #define VMI_CALL_CLTS 28 | ||
75 | #define VMI_CALL_EnableInterrupts 29 | ||
76 | #define VMI_CALL_DisableInterrupts 30 | ||
77 | #define VMI_CALL_GetInterruptMask 31 | ||
78 | #define VMI_CALL_SetInterruptMask 32 | ||
79 | #define VMI_CALL_IRET 33 | ||
80 | #define VMI_CALL_SYSEXIT 34 | ||
81 | #define VMI_CALL_Halt 35 | ||
82 | #define VMI_CALL_Reboot 36 | ||
83 | #define VMI_CALL_Shutdown 37 | ||
84 | #define VMI_CALL_SetPxE 38 | ||
85 | #define VMI_CALL_SetPxELong 39 | ||
86 | #define VMI_CALL_UpdatePxE 40 | ||
87 | #define VMI_CALL_UpdatePxELong 41 | ||
88 | #define VMI_CALL_MachineToPhysical 42 | ||
89 | #define VMI_CALL_PhysicalToMachine 43 | ||
90 | #define VMI_CALL_AllocatePage 44 | ||
91 | #define VMI_CALL_ReleasePage 45 | ||
92 | #define VMI_CALL_InvalPage 46 | ||
93 | #define VMI_CALL_FlushTLB 47 | ||
94 | #define VMI_CALL_SetLinearMapping 48 | ||
95 | |||
96 | #define VMI_CALL_SetIOPLMask 61 | ||
97 | #define VMI_CALL_SetInitialAPState 62 | ||
98 | #define VMI_CALL_APICWrite 63 | ||
99 | #define VMI_CALL_APICRead 64 | ||
100 | #define VMI_CALL_SetLazyMode 73 | ||
101 | |||
102 | /* | ||
103 | *--------------------------------------------------------------------- | ||
104 | * | ||
105 | * MMU operation flags | ||
106 | * | ||
107 | *--------------------------------------------------------------------- | ||
108 | */ | ||
109 | |||
110 | /* Flags used by VMI_{Allocate|Release}Page call */ | ||
111 | #define VMI_PAGE_PAE 0x10 /* Allocate PAE shadow */ | ||
112 | #define VMI_PAGE_CLONE 0x20 /* Clone from another shadow */ | ||
113 | #define VMI_PAGE_ZEROED 0x40 /* Page is pre-zeroed */ | ||
114 | |||
115 | |||
116 | /* Flags shared by Allocate|Release Page and PTE updates */ | ||
117 | #define VMI_PAGE_PT 0x01 | ||
118 | #define VMI_PAGE_PD 0x02 | ||
119 | #define VMI_PAGE_PDP 0x04 | ||
120 | #define VMI_PAGE_PML4 0x08 | ||
121 | |||
122 | #define VMI_PAGE_NORMAL 0x00 /* for debugging */ | ||
123 | |||
124 | /* Flags used by PTE updates */ | ||
125 | #define VMI_PAGE_CURRENT_AS 0x10 /* implies VMI_PAGE_VA_MASK is valid */ | ||
126 | #define VMI_PAGE_DEFER 0x20 /* may queue update until TLB inval */ | ||
127 | #define VMI_PAGE_VA_MASK 0xfffff000 | ||
128 | |||
129 | #ifdef CONFIG_X86_PAE | ||
130 | #define VMI_PAGE_L1 (VMI_PAGE_PT | VMI_PAGE_PAE | VMI_PAGE_ZEROED) | ||
131 | #define VMI_PAGE_L2 (VMI_PAGE_PD | VMI_PAGE_PAE | VMI_PAGE_ZEROED) | ||
132 | #else | ||
133 | #define VMI_PAGE_L1 (VMI_PAGE_PT | VMI_PAGE_ZEROED) | ||
134 | #define VMI_PAGE_L2 (VMI_PAGE_PD | VMI_PAGE_ZEROED) | ||
135 | #endif | ||
136 | |||
137 | /* Flags used by VMI_FlushTLB call */ | ||
138 | #define VMI_FLUSH_TLB 0x01 | ||
139 | #define VMI_FLUSH_GLOBAL 0x02 | ||
140 | |||
141 | /* | ||
142 | *--------------------------------------------------------------------- | ||
143 | * | ||
144 | * VMI relocation definitions for ROM call get_reloc | ||
145 | * | ||
146 | *--------------------------------------------------------------------- | ||
147 | */ | ||
148 | |||
149 | /* VMI Relocation types */ | ||
150 | #define VMI_RELOCATION_NONE 0 | ||
151 | #define VMI_RELOCATION_CALL_REL 1 | ||
152 | #define VMI_RELOCATION_JUMP_REL 2 | ||
153 | #define VMI_RELOCATION_NOP 3 | ||
154 | |||
155 | #ifndef __ASSEMBLY__ | ||
156 | struct vmi_relocation_info { | ||
157 | unsigned char *eip; | ||
158 | unsigned char type; | ||
159 | unsigned char reserved[3]; | ||
160 | }; | ||
161 | #endif | ||
162 | |||
163 | |||
164 | /* | ||
165 | *--------------------------------------------------------------------- | ||
166 | * | ||
167 | * Generic ROM structures and definitions | ||
168 | * | ||
169 | *--------------------------------------------------------------------- | ||
170 | */ | ||
171 | |||
172 | #ifndef __ASSEMBLY__ | ||
173 | |||
174 | struct vrom_header { | ||
175 | u16 rom_signature; // option ROM signature | ||
176 | u8 rom_length; // ROM length in 512 byte chunks | ||
177 | u8 rom_entry[4]; // 16-bit code entry point | ||
178 | u8 rom_pad0; // 4-byte align pad | ||
179 | u32 vrom_signature; // VROM identification signature | ||
180 | u8 api_version_min;// Minor version of API | ||
181 | u8 api_version_maj;// Major version of API | ||
182 | u8 jump_slots; // Number of jump slots | ||
183 | u8 reserved1; // Reserved for expansion | ||
184 | u32 virtual_top; // Hypervisor virtual address start | ||
185 | u16 reserved2; // Reserved for expansion | ||
186 | u16 license_offs; // Offset to License string | ||
187 | u16 pci_header_offs;// Offset to PCI OPROM header | ||
188 | u16 pnp_header_offs;// Offset to PnP OPROM header | ||
189 | u32 rom_pad3; // PnP reserverd / VMI reserved | ||
190 | u8 reserved[96]; // Reserved for headers | ||
191 | char vmi_init[8]; // VMI_Init jump point | ||
192 | char get_reloc[8]; // VMI_GetRelocationInfo jump point | ||
193 | } __attribute__((packed)); | ||
194 | |||
195 | struct pnp_header { | ||
196 | char sig[4]; | ||
197 | char rev; | ||
198 | char size; | ||
199 | short next; | ||
200 | short res; | ||
201 | long devID; | ||
202 | unsigned short manufacturer_offset; | ||
203 | unsigned short product_offset; | ||
204 | } __attribute__((packed)); | ||
205 | |||
206 | struct pci_header { | ||
207 | char sig[4]; | ||
208 | short vendorID; | ||
209 | short deviceID; | ||
210 | short vpdData; | ||
211 | short size; | ||
212 | char rev; | ||
213 | char class; | ||
214 | char subclass; | ||
215 | char interface; | ||
216 | short chunks; | ||
217 | char rom_version_min; | ||
218 | char rom_version_maj; | ||
219 | char codetype; | ||
220 | char lastRom; | ||
221 | short reserved; | ||
222 | } __attribute__((packed)); | ||
223 | |||
224 | /* Function prototypes for bootstrapping */ | ||
225 | extern void vmi_init(void); | ||
226 | extern void vmi_bringup(void); | ||
227 | extern void vmi_apply_boot_page_allocations(void); | ||
228 | |||
229 | /* State needed to start an application processor in an SMP system. */ | ||
230 | struct vmi_ap_state { | ||
231 | u32 cr0; | ||
232 | u32 cr2; | ||
233 | u32 cr3; | ||
234 | u32 cr4; | ||
235 | |||
236 | u64 efer; | ||
237 | |||
238 | u32 eip; | ||
239 | u32 eflags; | ||
240 | u32 eax; | ||
241 | u32 ebx; | ||
242 | u32 ecx; | ||
243 | u32 edx; | ||
244 | u32 esp; | ||
245 | u32 ebp; | ||
246 | u32 esi; | ||
247 | u32 edi; | ||
248 | u16 cs; | ||
249 | u16 ss; | ||
250 | u16 ds; | ||
251 | u16 es; | ||
252 | u16 fs; | ||
253 | u16 gs; | ||
254 | u16 ldtr; | ||
255 | |||
256 | u16 gdtr_limit; | ||
257 | u32 gdtr_base; | ||
258 | u32 idtr_base; | ||
259 | u16 idtr_limit; | ||
260 | }; | ||
261 | |||
262 | #endif | ||
diff --git a/include/asm-i386/vmi_time.h b/include/asm-i386/vmi_time.h new file mode 100644 index 000000000000..c12931211007 --- /dev/null +++ b/include/asm-i386/vmi_time.h | |||
@@ -0,0 +1,103 @@ | |||
1 | /* | ||
2 | * VMI Time wrappers | ||
3 | * | ||
4 | * Copyright (C) 2006, VMware, Inc. | ||
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 as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, but | ||
12 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or | ||
14 | * NON INFRINGEMENT. See the GNU General Public License for more | ||
15 | * details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
20 | * | ||
21 | * Send feedback to dhecht@vmware.com | ||
22 | * | ||
23 | */ | ||
24 | |||
25 | #ifndef __VMI_TIME_H | ||
26 | #define __VMI_TIME_H | ||
27 | |||
28 | /* | ||
29 | * Raw VMI call indices for timer functions | ||
30 | */ | ||
31 | #define VMI_CALL_GetCycleFrequency 66 | ||
32 | #define VMI_CALL_GetCycleCounter 67 | ||
33 | #define VMI_CALL_SetAlarm 68 | ||
34 | #define VMI_CALL_CancelAlarm 69 | ||
35 | #define VMI_CALL_GetWallclockTime 70 | ||
36 | #define VMI_CALL_WallclockUpdated 71 | ||
37 | |||
38 | /* Cached VMI timer operations */ | ||
39 | extern struct vmi_timer_ops { | ||
40 | u64 (*get_cycle_frequency)(void); | ||
41 | u64 (*get_cycle_counter)(int); | ||
42 | u64 (*get_wallclock)(void); | ||
43 | int (*wallclock_updated)(void); | ||
44 | void (*set_alarm)(u32 flags, u64 expiry, u64 period); | ||
45 | void (*cancel_alarm)(u32 flags); | ||
46 | } vmi_timer_ops; | ||
47 | |||
48 | /* Prototypes */ | ||
49 | extern void __init vmi_time_init(void); | ||
50 | extern unsigned long vmi_get_wallclock(void); | ||
51 | extern int vmi_set_wallclock(unsigned long now); | ||
52 | extern unsigned long long vmi_sched_clock(void); | ||
53 | |||
54 | #ifdef CONFIG_X86_LOCAL_APIC | ||
55 | extern void __init vmi_timer_setup_boot_alarm(void); | ||
56 | extern void __init vmi_timer_setup_secondary_alarm(void); | ||
57 | extern void apic_vmi_timer_interrupt(void); | ||
58 | #endif | ||
59 | |||
60 | #ifdef CONFIG_NO_IDLE_HZ | ||
61 | extern int vmi_stop_hz_timer(void); | ||
62 | extern void vmi_account_time_restart_hz_timer(void); | ||
63 | #endif | ||
64 | |||
65 | /* | ||
66 | * When run under a hypervisor, a vcpu is always in one of three states: | ||
67 | * running, halted, or ready. The vcpu is in the 'running' state if it | ||
68 | * is executing. When the vcpu executes the halt interface, the vcpu | ||
69 | * enters the 'halted' state and remains halted until there is some work | ||
70 | * pending for the vcpu (e.g. an alarm expires, host I/O completes on | ||
71 | * behalf of virtual I/O). At this point, the vcpu enters the 'ready' | ||
72 | * state (waiting for the hypervisor to reschedule it). Finally, at any | ||
73 | * time when the vcpu is not in the 'running' state nor the 'halted' | ||
74 | * state, it is in the 'ready' state. | ||
75 | * | ||
76 | * Real time is advances while the vcpu is 'running', 'ready', or | ||
77 | * 'halted'. Stolen time is the time in which the vcpu is in the | ||
78 | * 'ready' state. Available time is the remaining time -- the vcpu is | ||
79 | * either 'running' or 'halted'. | ||
80 | * | ||
81 | * All three views of time are accessible through the VMI cycle | ||
82 | * counters. | ||
83 | */ | ||
84 | |||
85 | /* The cycle counters. */ | ||
86 | #define VMI_CYCLES_REAL 0 | ||
87 | #define VMI_CYCLES_AVAILABLE 1 | ||
88 | #define VMI_CYCLES_STOLEN 2 | ||
89 | |||
90 | /* The alarm interface 'flags' bits */ | ||
91 | #define VMI_ALARM_COUNTERS 2 | ||
92 | |||
93 | #define VMI_ALARM_COUNTER_MASK 0x000000ff | ||
94 | |||
95 | #define VMI_ALARM_WIRED_IRQ0 0x00000000 | ||
96 | #define VMI_ALARM_WIRED_LVTT 0x00010000 | ||
97 | |||
98 | #define VMI_ALARM_IS_ONESHOT 0x00000000 | ||
99 | #define VMI_ALARM_IS_PERIODIC 0x00000100 | ||
100 | |||
101 | #define CONFIG_VMI_ALARM_HZ 100 | ||
102 | |||
103 | #endif | ||
diff --git a/include/asm-ia64/dma-mapping.h b/include/asm-ia64/dma-mapping.h index ebd5887f4b1a..6299b51575bb 100644 --- a/include/asm-ia64/dma-mapping.h +++ b/include/asm-ia64/dma-mapping.h | |||
@@ -8,9 +8,20 @@ | |||
8 | #include <asm/machvec.h> | 8 | #include <asm/machvec.h> |
9 | 9 | ||
10 | #define dma_alloc_coherent platform_dma_alloc_coherent | 10 | #define dma_alloc_coherent platform_dma_alloc_coherent |
11 | #define dma_alloc_noncoherent platform_dma_alloc_coherent /* coherent mem. is cheap */ | 11 | /* coherent mem. is cheap */ |
12 | static inline void * | ||
13 | dma_alloc_noncoherent(struct device *dev, size_t size, dma_addr_t *dma_handle, | ||
14 | gfp_t flag) | ||
15 | { | ||
16 | return dma_alloc_coherent(dev, size, dma_handle, flag); | ||
17 | } | ||
12 | #define dma_free_coherent platform_dma_free_coherent | 18 | #define dma_free_coherent platform_dma_free_coherent |
13 | #define dma_free_noncoherent platform_dma_free_coherent | 19 | static inline void |
20 | dma_free_noncoherent(struct device *dev, size_t size, void *cpu_addr, | ||
21 | dma_addr_t dma_handle) | ||
22 | { | ||
23 | dma_free_coherent(dev, size, cpu_addr, dma_handle); | ||
24 | } | ||
14 | #define dma_map_single platform_dma_map_single | 25 | #define dma_map_single platform_dma_map_single |
15 | #define dma_map_sg platform_dma_map_sg | 26 | #define dma_map_sg platform_dma_map_sg |
16 | #define dma_unmap_single platform_dma_unmap_single | 27 | #define dma_unmap_single platform_dma_unmap_single |
diff --git a/include/asm-ia64/kexec.h b/include/asm-ia64/kexec.h index 01c36b004747..f2ad469a6ddf 100644 --- a/include/asm-ia64/kexec.h +++ b/include/asm-ia64/kexec.h | |||
@@ -23,7 +23,7 @@ | |||
23 | 23 | ||
24 | extern struct kimage *ia64_kimage; | 24 | extern struct kimage *ia64_kimage; |
25 | DECLARE_PER_CPU(u64, ia64_mca_pal_base); | 25 | DECLARE_PER_CPU(u64, ia64_mca_pal_base); |
26 | const extern unsigned int relocate_new_kernel_size; | 26 | extern const unsigned int relocate_new_kernel_size; |
27 | extern void relocate_new_kernel(unsigned long, unsigned long, | 27 | extern void relocate_new_kernel(unsigned long, unsigned long, |
28 | struct ia64_boot_param *, unsigned long); | 28 | struct ia64_boot_param *, unsigned long); |
29 | static inline void | 29 | static inline void |
diff --git a/include/asm-ia64/libata-portmap.h b/include/asm-ia64/libata-portmap.h new file mode 100644 index 000000000000..0e00c9a9f410 --- /dev/null +++ b/include/asm-ia64/libata-portmap.h | |||
@@ -0,0 +1,12 @@ | |||
1 | #ifndef __ASM_IA64_LIBATA_PORTMAP_H | ||
2 | #define __ASM_IA64_LIBATA_PORTMAP_H | ||
3 | |||
4 | #define ATA_PRIMARY_CMD 0x1F0 | ||
5 | #define ATA_PRIMARY_CTL 0x3F6 | ||
6 | #define ATA_PRIMARY_IRQ(dev) isa_irq_to_vector(14) | ||
7 | |||
8 | #define ATA_SECONDARY_CMD 0x170 | ||
9 | #define ATA_SECONDARY_CTL 0x376 | ||
10 | #define ATA_SECONDARY_IRQ(dev) isa_irq_to_vector(15) | ||
11 | |||
12 | #endif | ||
diff --git a/include/asm-ia64/pal.h b/include/asm-ia64/pal.h index bc768153f3c9..e43021a99a20 100644 --- a/include/asm-ia64/pal.h +++ b/include/asm-ia64/pal.h | |||
@@ -32,7 +32,7 @@ | |||
32 | #define PAL_CACHE_FLUSH 1 /* flush i/d cache */ | 32 | #define PAL_CACHE_FLUSH 1 /* flush i/d cache */ |
33 | #define PAL_CACHE_INFO 2 /* get detailed i/d cache info */ | 33 | #define PAL_CACHE_INFO 2 /* get detailed i/d cache info */ |
34 | #define PAL_CACHE_INIT 3 /* initialize i/d cache */ | 34 | #define PAL_CACHE_INIT 3 /* initialize i/d cache */ |
35 | #define PAL_CACHE_SUMMARY 4 /* get summary of cache heirarchy */ | 35 | #define PAL_CACHE_SUMMARY 4 /* get summary of cache hierarchy */ |
36 | #define PAL_MEM_ATTRIB 5 /* list supported memory attributes */ | 36 | #define PAL_MEM_ATTRIB 5 /* list supported memory attributes */ |
37 | #define PAL_PTCE_INFO 6 /* purge TLB info */ | 37 | #define PAL_PTCE_INFO 6 /* purge TLB info */ |
38 | #define PAL_VM_INFO 7 /* return supported virtual memory features */ | 38 | #define PAL_VM_INFO 7 /* return supported virtual memory features */ |
@@ -113,14 +113,14 @@ typedef s64 pal_status_t; | |||
113 | */ | 113 | */ |
114 | #define PAL_STATUS_REQUIRES_MEMORY (-9) /* Call requires PAL memory buffer */ | 114 | #define PAL_STATUS_REQUIRES_MEMORY (-9) /* Call requires PAL memory buffer */ |
115 | 115 | ||
116 | /* Processor cache level in the heirarchy */ | 116 | /* Processor cache level in the hierarchy */ |
117 | typedef u64 pal_cache_level_t; | 117 | typedef u64 pal_cache_level_t; |
118 | #define PAL_CACHE_LEVEL_L0 0 /* L0 */ | 118 | #define PAL_CACHE_LEVEL_L0 0 /* L0 */ |
119 | #define PAL_CACHE_LEVEL_L1 1 /* L1 */ | 119 | #define PAL_CACHE_LEVEL_L1 1 /* L1 */ |
120 | #define PAL_CACHE_LEVEL_L2 2 /* L2 */ | 120 | #define PAL_CACHE_LEVEL_L2 2 /* L2 */ |
121 | 121 | ||
122 | 122 | ||
123 | /* Processor cache type at a particular level in the heirarchy */ | 123 | /* Processor cache type at a particular level in the hierarchy */ |
124 | 124 | ||
125 | typedef u64 pal_cache_type_t; | 125 | typedef u64 pal_cache_type_t; |
126 | #define PAL_CACHE_TYPE_INSTRUCTION 1 /* Instruction cache */ | 126 | #define PAL_CACHE_TYPE_INSTRUCTION 1 /* Instruction cache */ |
@@ -272,14 +272,14 @@ typedef struct pal_cache_protection_info_s { | |||
272 | #define PAL_CACHE_PROT_METHOD_ECC 3 /* ECC protection */ | 272 | #define PAL_CACHE_PROT_METHOD_ECC 3 /* ECC protection */ |
273 | 273 | ||
274 | 274 | ||
275 | /* Processor cache line identification in the heirarchy */ | 275 | /* Processor cache line identification in the hierarchy */ |
276 | typedef union pal_cache_line_id_u { | 276 | typedef union pal_cache_line_id_u { |
277 | u64 pclid_data; | 277 | u64 pclid_data; |
278 | struct { | 278 | struct { |
279 | u64 cache_type : 8, /* 7-0 cache type */ | 279 | u64 cache_type : 8, /* 7-0 cache type */ |
280 | level : 8, /* 15-8 level of the | 280 | level : 8, /* 15-8 level of the |
281 | * cache in the | 281 | * cache in the |
282 | * heirarchy. | 282 | * hierarchy. |
283 | */ | 283 | */ |
284 | way : 8, /* 23-16 way in the set | 284 | way : 8, /* 23-16 way in the set |
285 | */ | 285 | */ |
@@ -292,7 +292,7 @@ typedef union pal_cache_line_id_u { | |||
292 | u64 cache_type : 8, /* 7-0 cache type */ | 292 | u64 cache_type : 8, /* 7-0 cache type */ |
293 | level : 8, /* 15-8 level of the | 293 | level : 8, /* 15-8 level of the |
294 | * cache in the | 294 | * cache in the |
295 | * heirarchy. | 295 | * hierarchy. |
296 | */ | 296 | */ |
297 | way : 8, /* 23-16 way in the set | 297 | way : 8, /* 23-16 way in the set |
298 | */ | 298 | */ |
@@ -978,7 +978,7 @@ ia64_pal_cache_read (pal_cache_line_id_u_t line_id, u64 physical_addr) | |||
978 | return iprv.status; | 978 | return iprv.status; |
979 | } | 979 | } |
980 | 980 | ||
981 | /* Return summary information about the heirarchy of caches controlled by the processor */ | 981 | /* Return summary information about the hierarchy of caches controlled by the processor */ |
982 | static inline s64 | 982 | static inline s64 |
983 | ia64_pal_cache_summary (u64 *cache_levels, u64 *unique_caches) | 983 | ia64_pal_cache_summary (u64 *cache_levels, u64 *unique_caches) |
984 | { | 984 | { |
diff --git a/include/asm-ia64/setup.h b/include/asm-ia64/setup.h index ea29b57affcb..4399a44355b3 100644 --- a/include/asm-ia64/setup.h +++ b/include/asm-ia64/setup.h | |||
@@ -1,6 +1,6 @@ | |||
1 | #ifndef __IA64_SETUP_H | 1 | #ifndef __IA64_SETUP_H |
2 | #define __IA64_SETUP_H | 2 | #define __IA64_SETUP_H |
3 | 3 | ||
4 | #define COMMAND_LINE_SIZE 512 | 4 | #define COMMAND_LINE_SIZE 2048 |
5 | 5 | ||
6 | #endif | 6 | #endif |
diff --git a/include/asm-ia64/termios.h b/include/asm-ia64/termios.h index 42c95693240c..08750c2d3607 100644 --- a/include/asm-ia64/termios.h +++ b/include/asm-ia64/termios.h | |||
@@ -46,24 +46,6 @@ struct termio { | |||
46 | 46 | ||
47 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 47 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
48 | 48 | ||
49 | /* line disciplines */ | ||
50 | #define N_TTY 0 | ||
51 | #define N_SLIP 1 | ||
52 | #define N_MOUSE 2 | ||
53 | #define N_PPP 3 | ||
54 | #define N_STRIP 4 | ||
55 | #define N_AX25 5 | ||
56 | #define N_X25 6 /* X.25 async */ | ||
57 | #define N_6PACK 7 | ||
58 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
59 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
60 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
61 | #define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ | ||
62 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS msgs */ | ||
63 | #define N_HDLC 13 /* synchronous HDLC */ | ||
64 | #define N_SYNC_PPP 14 /* synchronous PPP */ | ||
65 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
66 | |||
67 | # ifdef __KERNEL__ | 49 | # ifdef __KERNEL__ |
68 | 50 | ||
69 | /* intr=^C quit=^\ erase=del kill=^U | 51 | /* intr=^C quit=^\ erase=del kill=^U |
diff --git a/include/asm-m32r/a.out.h b/include/asm-m32r/a.out.h index 4619ba5c372e..9a4a5d20160a 100644 --- a/include/asm-m32r/a.out.h +++ b/include/asm-m32r/a.out.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_A_OUT_H | 1 | #ifndef _ASM_M32R_A_OUT_H |
2 | #define _ASM_M32R_A_OUT_H | 2 | #define _ASM_M32R_A_OUT_H |
3 | 3 | ||
4 | /* orig : i386 2.4.18 */ | ||
5 | |||
6 | struct exec | 4 | struct exec |
7 | { | 5 | { |
8 | unsigned long a_info; /* Use macros N_MAGIC, etc for access */ | 6 | unsigned long a_info; /* Use macros N_MAGIC, etc for access */ |
diff --git a/include/asm-m32r/addrspace.h b/include/asm-m32r/addrspace.h index 06a83dc94648..81782c122da4 100644 --- a/include/asm-m32r/addrspace.h +++ b/include/asm-m32r/addrspace.h | |||
@@ -1,4 +1,3 @@ | |||
1 | /* $Id$ */ | ||
2 | /* | 1 | /* |
3 | * This file is subject to the terms and conditions of the GNU General Public | 2 | * This file is subject to the terms and conditions of the GNU General Public |
4 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
diff --git a/include/asm-m32r/bugs.h b/include/asm-m32r/bugs.h index 9a56f661bdb3..f77214eff136 100644 --- a/include/asm-m32r/bugs.h +++ b/include/asm-m32r/bugs.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_BUGS_H | 1 | #ifndef _ASM_M32R_BUGS_H |
2 | #define _ASM_M32R_BUGS_H | 2 | #define _ASM_M32R_BUGS_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* | 4 | /* |
7 | * This is included by init/main.c to check for architecture-dependent bugs. | 5 | * This is included by init/main.c to check for architecture-dependent bugs. |
8 | * | 6 | * |
diff --git a/include/asm-m32r/byteorder.h b/include/asm-m32r/byteorder.h index 3c0b9a2e03bc..10b2c1d11614 100644 --- a/include/asm-m32r/byteorder.h +++ b/include/asm-m32r/byteorder.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_BYTEORDER_H | 1 | #ifndef _ASM_M32R_BYTEORDER_H |
2 | #define _ASM_M32R_BYTEORDER_H | 2 | #define _ASM_M32R_BYTEORDER_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | #include <asm/types.h> | 4 | #include <asm/types.h> |
7 | 5 | ||
8 | #if !defined(__STRICT_ANSI__) || defined(__KERNEL__) | 6 | #if !defined(__STRICT_ANSI__) || defined(__KERNEL__) |
diff --git a/include/asm-m32r/cache.h b/include/asm-m32r/cache.h index 9c2b2d9998bc..40b3ee98193d 100644 --- a/include/asm-m32r/cache.h +++ b/include/asm-m32r/cache.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_CACHE_H | 1 | #ifndef _ASM_M32R_CACHE_H |
2 | #define _ASM_M32R_CACHE_H | 2 | #define _ASM_M32R_CACHE_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* L1 cache line size */ | 4 | /* L1 cache line size */ |
7 | #define L1_CACHE_SHIFT 4 | 5 | #define L1_CACHE_SHIFT 4 |
8 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) | 6 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) |
diff --git a/include/asm-m32r/cacheflush.h b/include/asm-m32r/cacheflush.h index 56961a9511b2..78587c958146 100644 --- a/include/asm-m32r/cacheflush.h +++ b/include/asm-m32r/cacheflush.h | |||
@@ -67,4 +67,3 @@ do { \ | |||
67 | memcpy(dst, src, len) | 67 | memcpy(dst, src, len) |
68 | 68 | ||
69 | #endif /* _ASM_M32R_CACHEFLUSH_H */ | 69 | #endif /* _ASM_M32R_CACHEFLUSH_H */ |
70 | |||
diff --git a/include/asm-m32r/current.h b/include/asm-m32r/current.h index c19d927ff22d..7859d864f2c2 100644 --- a/include/asm-m32r/current.h +++ b/include/asm-m32r/current.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_CURRENT_H | 1 | #ifndef _ASM_M32R_CURRENT_H |
2 | #define _ASM_M32R_CURRENT_H | 2 | #define _ASM_M32R_CURRENT_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | #include <linux/thread_info.h> | 4 | #include <linux/thread_info.h> |
7 | 5 | ||
8 | struct task_struct; | 6 | struct task_struct; |
@@ -15,4 +13,3 @@ static __inline__ struct task_struct *get_current(void) | |||
15 | #define current (get_current()) | 13 | #define current (get_current()) |
16 | 14 | ||
17 | #endif /* _ASM_M32R_CURRENT_H */ | 15 | #endif /* _ASM_M32R_CURRENT_H */ |
18 | |||
diff --git a/include/asm-m32r/delay.h b/include/asm-m32r/delay.h index f285eaee7d27..164448d23850 100644 --- a/include/asm-m32r/delay.h +++ b/include/asm-m32r/delay.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_DELAY_H | 1 | #ifndef _ASM_M32R_DELAY_H |
2 | #define _ASM_M32R_DELAY_H | 2 | #define _ASM_M32R_DELAY_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* | 4 | /* |
7 | * Copyright (C) 1993 Linus Torvalds | 5 | * Copyright (C) 1993 Linus Torvalds |
8 | * | 6 | * |
diff --git a/include/asm-m32r/dma.h b/include/asm-m32r/dma.h index 7263b013b67e..52f6a22dd232 100644 --- a/include/asm-m32r/dma.h +++ b/include/asm-m32r/dma.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_DMA_H | 1 | #ifndef _ASM_M32R_DMA_H |
2 | #define _ASM_M32R_DMA_H | 2 | #define _ASM_M32R_DMA_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | #include <asm/io.h> | 4 | #include <asm/io.h> |
7 | 5 | ||
8 | /* | 6 | /* |
diff --git a/include/asm-m32r/errno.h b/include/asm-m32r/errno.h index 7a98520194a7..777149262aad 100644 --- a/include/asm-m32r/errno.h +++ b/include/asm-m32r/errno.h | |||
@@ -1,9 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_ERRNO_H | 1 | #ifndef _ASM_M32R_ERRNO_H |
2 | #define _ASM_M32R_ERRNO_H | 2 | #define _ASM_M32R_ERRNO_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | #include <asm-generic/errno.h> | 4 | #include <asm-generic/errno.h> |
7 | 5 | ||
8 | #endif /* _ASM_M32R_ERRNO_H */ | 6 | #endif /* _ASM_M32R_ERRNO_H */ |
9 | |||
diff --git a/include/asm-m32r/ide.h b/include/asm-m32r/ide.h index c82ebe8f250d..4672a49e8760 100644 --- a/include/asm-m32r/ide.h +++ b/include/asm-m32r/ide.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_IDE_H | 1 | #ifndef _ASM_M32R_IDE_H |
2 | #define _ASM_M32R_IDE_H | 2 | #define _ASM_M32R_IDE_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* | 4 | /* |
7 | * linux/include/asm-m32r/ide.h | 5 | * linux/include/asm-m32r/ide.h |
8 | * | 6 | * |
@@ -15,6 +13,7 @@ | |||
15 | 13 | ||
16 | #ifdef __KERNEL__ | 14 | #ifdef __KERNEL__ |
17 | 15 | ||
16 | #include <asm/m32r.h> | ||
18 | 17 | ||
19 | #ifndef MAX_HWIFS | 18 | #ifndef MAX_HWIFS |
20 | # ifdef CONFIG_BLK_DEV_IDEPCI | 19 | # ifdef CONFIG_BLK_DEV_IDEPCI |
@@ -24,9 +23,6 @@ | |||
24 | # endif | 23 | # endif |
25 | #endif | 24 | #endif |
26 | 25 | ||
27 | #include <asm/m32r.h> | ||
28 | |||
29 | |||
30 | #define IDE_ARCH_OBSOLETE_DEFAULTS | 26 | #define IDE_ARCH_OBSOLETE_DEFAULTS |
31 | 27 | ||
32 | static __inline__ int ide_default_irq(unsigned long base) | 28 | static __inline__ int ide_default_irq(unsigned long base) |
diff --git a/include/asm-m32r/ioctls.h b/include/asm-m32r/ioctls.h index b3508292246a..d23cfc45738a 100644 --- a/include/asm-m32r/ioctls.h +++ b/include/asm-m32r/ioctls.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef __ARCH_M32R_IOCTLS_H__ | 1 | #ifndef __ARCH_M32R_IOCTLS_H__ |
2 | #define __ARCH_M32R_IOCTLS_H__ | 2 | #define __ARCH_M32R_IOCTLS_H__ |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* orig : i386 2.5.67 */ | ||
7 | |||
8 | #include <asm/ioctl.h> | 4 | #include <asm/ioctl.h> |
9 | 5 | ||
10 | /* 0x54 is just a magic number to make these relatively unique ('T') */ | 6 | /* 0x54 is just a magic number to make these relatively unique ('T') */ |
@@ -85,4 +81,3 @@ | |||
85 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ | 81 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ |
86 | 82 | ||
87 | #endif /* __ARCH_M32R_IOCTLS_H__ */ | 83 | #endif /* __ARCH_M32R_IOCTLS_H__ */ |
88 | |||
diff --git a/include/asm-m32r/ipcbuf.h b/include/asm-m32r/ipcbuf.h index 7c77fb0b1467..8d2d7c8ffdb0 100644 --- a/include/asm-m32r/ipcbuf.h +++ b/include/asm-m32r/ipcbuf.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_IPCBUF_H | 1 | #ifndef _ASM_M32R_IPCBUF_H |
2 | #define _ASM_M32R_IPCBUF_H | 2 | #define _ASM_M32R_IPCBUF_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* orig : i386 2.4.18 */ | ||
7 | |||
8 | /* | 4 | /* |
9 | * The ipc64_perm structure for m32r architecture. | 5 | * The ipc64_perm structure for m32r architecture. |
10 | * Note extra padding because this structure is passed back and forth | 6 | * Note extra padding because this structure is passed back and forth |
diff --git a/include/asm-m32r/kmap_types.h b/include/asm-m32r/kmap_types.h index 0524d89edb0f..fa94dc6410ea 100644 --- a/include/asm-m32r/kmap_types.h +++ b/include/asm-m32r/kmap_types.h | |||
@@ -1,9 +1,6 @@ | |||
1 | #ifndef __M32R_KMAP_TYPES_H | 1 | #ifndef __M32R_KMAP_TYPES_H |
2 | #define __M32R_KMAP_TYPES_H | 2 | #define __M32R_KMAP_TYPES_H |
3 | 3 | ||
4 | /* Dummy header just to define km_type. */ | ||
5 | |||
6 | |||
7 | #ifdef CONFIG_DEBUG_HIGHMEM | 4 | #ifdef CONFIG_DEBUG_HIGHMEM |
8 | # define D(n) __KM_FENCE_##n , | 5 | # define D(n) __KM_FENCE_##n , |
9 | #else | 6 | #else |
@@ -30,4 +27,3 @@ D(13) KM_TYPE_NR | |||
30 | #undef D | 27 | #undef D |
31 | 28 | ||
32 | #endif /* __M32R_KMAP_TYPES_H */ | 29 | #endif /* __M32R_KMAP_TYPES_H */ |
33 | |||
diff --git a/include/asm-m32r/m32104ut/m32104ut_pld.h b/include/asm-m32r/m32104ut/m32104ut_pld.h index cbdbc5891445..2dc89d68b6d9 100644 --- a/include/asm-m32r/m32104ut/m32104ut_pld.h +++ b/include/asm-m32r/m32104ut/m32104ut_pld.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #ifndef _M32104UT_M32104UT_PLD_H | ||
2 | #define _M32104UT_M32104UT_PLD_H | ||
3 | |||
1 | /* | 4 | /* |
2 | * include/asm-m32r/m32104ut/m32104ut_pld.h | 5 | * include/asm-m32r/m32104ut/m32104ut_pld.h |
3 | * | 6 | * |
@@ -12,10 +15,6 @@ | |||
12 | * this archive for more details. | 15 | * this archive for more details. |
13 | */ | 16 | */ |
14 | 17 | ||
15 | #ifndef _M32104UT_M32104UT_PLD_H | ||
16 | #define _M32104UT_M32104UT_PLD_H | ||
17 | |||
18 | |||
19 | #if defined(CONFIG_PLAT_M32104UT) | 18 | #if defined(CONFIG_PLAT_M32104UT) |
20 | #define PLD_PLAT_BASE 0x02c00000 | 19 | #define PLD_PLAT_BASE 0x02c00000 |
21 | #else | 20 | #else |
@@ -35,7 +34,7 @@ | |||
35 | #define __reg8 | 34 | #define __reg8 |
36 | #define __reg16 | 35 | #define __reg16 |
37 | #define __reg32 | 36 | #define __reg32 |
38 | #endif /* __ASSEMBLY__ */ | 37 | #endif /* __ASSEMBLY__ */ |
39 | 38 | ||
40 | /* CFC */ | 39 | /* CFC */ |
41 | #define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000) | 40 | #define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000) |
@@ -159,4 +158,4 @@ | |||
159 | #define PLD_SCTXB __reg16(PLD_BASE + 0x3800c) | 158 | #define PLD_SCTXB __reg16(PLD_BASE + 0x3800c) |
160 | #define PLD_SCRXB __reg16(PLD_BASE + 0x3800e) | 159 | #define PLD_SCRXB __reg16(PLD_BASE + 0x3800e) |
161 | 160 | ||
162 | #endif /* _M32104UT_M32104UT_PLD_H */ | 161 | #endif /* _M32104UT_M32104UT_PLD_H */ |
diff --git a/include/asm-m32r/m32700ut/m32700ut_lan.h b/include/asm-m32r/m32700ut/m32700ut_lan.h index f1e47ae1f891..aae810a4fb2c 100644 --- a/include/asm-m32r/m32700ut/m32700ut_lan.h +++ b/include/asm-m32r/m32700ut/m32700ut_lan.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #ifndef _M32700UT_M32700UT_LAN_H | ||
2 | #define _M32700UT_M32700UT_LAN_H | ||
3 | |||
1 | /* | 4 | /* |
2 | * include/asm-m32r/m32700ut/m32700ut_lan.h | 5 | * include/asm-m32r/m32700ut/m32700ut_lan.h |
3 | * | 6 | * |
@@ -8,14 +11,8 @@ | |||
8 | * This file is subject to the terms and conditions of the GNU General | 11 | * This file is subject to the terms and conditions of the GNU General |
9 | * Public License. See the file "COPYING" in the main directory of | 12 | * Public License. See the file "COPYING" in the main directory of |
10 | * this archive for more details. | 13 | * this archive for more details. |
11 | * | ||
12 | * $Id$ | ||
13 | */ | 14 | */ |
14 | 15 | ||
15 | #ifndef _M32700UT_M32700UT_LAN_H | ||
16 | #define _M32700UT_M32700UT_LAN_H | ||
17 | |||
18 | |||
19 | #ifndef __ASSEMBLY__ | 16 | #ifndef __ASSEMBLY__ |
20 | /* | 17 | /* |
21 | * C functions use non-cache address. | 18 | * C functions use non-cache address. |
@@ -23,7 +20,7 @@ | |||
23 | #define M32700UT_LAN_BASE (0x10000000 /* + NONCACHE_OFFSET */) | 20 | #define M32700UT_LAN_BASE (0x10000000 /* + NONCACHE_OFFSET */) |
24 | #else | 21 | #else |
25 | #define M32700UT_LAN_BASE (0x10000000 + NONCACHE_OFFSET) | 22 | #define M32700UT_LAN_BASE (0x10000000 + NONCACHE_OFFSET) |
26 | #endif /* __ASSEMBLY__ */ | 23 | #endif /* __ASSEMBLY__ */ |
27 | 24 | ||
28 | /* ICU | 25 | /* ICU |
29 | * ICUISTS: status register | 26 | * ICUISTS: status register |
@@ -103,4 +100,4 @@ | |||
103 | #define PLDI2CSTS_BB 0x00000010 | 100 | #define PLDI2CSTS_BB 0x00000010 |
104 | #define PLDI2CSTS_NOACK 0x00000001 /* 0:ack, 1:noack */ | 101 | #define PLDI2CSTS_NOACK 0x00000001 /* 0:ack, 1:noack */ |
105 | 102 | ||
106 | #endif /* _M32700UT_M32700UT_LAN_H */ | 103 | #endif /* _M32700UT_M32700UT_LAN_H */ |
diff --git a/include/asm-m32r/m32700ut/m32700ut_lcd.h b/include/asm-m32r/m32700ut/m32700ut_lcd.h index e41c4aa48b4c..4c2489079788 100644 --- a/include/asm-m32r/m32700ut/m32700ut_lcd.h +++ b/include/asm-m32r/m32700ut/m32700ut_lcd.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #ifndef _M32700UT_M32700UT_LCD_H | ||
2 | #define _M32700UT_M32700UT_LCD_H | ||
3 | |||
1 | /* | 4 | /* |
2 | * include/asm-m32r/m32700ut/m32700ut_lcd.h | 5 | * include/asm-m32r/m32700ut/m32700ut_lcd.h |
3 | * | 6 | * |
@@ -8,14 +11,8 @@ | |||
8 | * This file is subject to the terms and conditions of the GNU General | 11 | * This file is subject to the terms and conditions of the GNU General |
9 | * Public License. See the file "COPYING" in the main directory of | 12 | * Public License. See the file "COPYING" in the main directory of |
10 | * this archive for more details. | 13 | * this archive for more details. |
11 | * | ||
12 | * $Id$ | ||
13 | */ | 14 | */ |
14 | 15 | ||
15 | #ifndef _M32700UT_M32700UT_LCD_H | ||
16 | #define _M32700UT_M32700UT_LCD_H | ||
17 | |||
18 | |||
19 | #ifndef __ASSEMBLY__ | 16 | #ifndef __ASSEMBLY__ |
20 | /* | 17 | /* |
21 | * C functions use non-cache address. | 18 | * C functions use non-cache address. |
@@ -23,7 +20,7 @@ | |||
23 | #define M32700UT_LCD_BASE (0x10000000 /* + NONCACHE_OFFSET */) | 20 | #define M32700UT_LCD_BASE (0x10000000 /* + NONCACHE_OFFSET */) |
24 | #else | 21 | #else |
25 | #define M32700UT_LCD_BASE (0x10000000 + NONCACHE_OFFSET) | 22 | #define M32700UT_LCD_BASE (0x10000000 + NONCACHE_OFFSET) |
26 | #endif /* __ASSEMBLY__ */ | 23 | #endif /* __ASSEMBLY__ */ |
27 | 24 | ||
28 | /* | 25 | /* |
29 | * ICU | 26 | * ICU |
@@ -55,4 +52,4 @@ | |||
55 | #define M32700UT_LCD_ICUCR19 __reg16(M32700UT_LCD_BASE + 0x300036) | 52 | #define M32700UT_LCD_ICUCR19 __reg16(M32700UT_LCD_BASE + 0x300036) |
56 | #define M32700UT_LCD_ICUCR21 __reg16(M32700UT_LCD_BASE + 0x30003a) | 53 | #define M32700UT_LCD_ICUCR21 __reg16(M32700UT_LCD_BASE + 0x30003a) |
57 | 54 | ||
58 | #endif /* _M32700UT_M32700UT_LCD_H */ | 55 | #endif /* _M32700UT_M32700UT_LCD_H */ |
diff --git a/include/asm-m32r/m32700ut/m32700ut_pld.h b/include/asm-m32r/m32700ut/m32700ut_pld.h index a48c22c978ca..d39121279a1a 100644 --- a/include/asm-m32r/m32700ut/m32700ut_pld.h +++ b/include/asm-m32r/m32700ut/m32700ut_pld.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #ifndef _M32700UT_M32700UT_PLD_H | ||
2 | #define _M32700UT_M32700UT_PLD_H | ||
3 | |||
1 | /* | 4 | /* |
2 | * include/asm-m32r/m32700ut/m32700ut_pld.h | 5 | * include/asm-m32r/m32700ut/m32700ut_pld.h |
3 | * | 6 | * |
@@ -8,14 +11,8 @@ | |||
8 | * This file is subject to the terms and conditions of the GNU General | 11 | * This file is subject to the terms and conditions of the GNU General |
9 | * Public License. See the file "COPYING" in the main directory of | 12 | * Public License. See the file "COPYING" in the main directory of |
10 | * this archive for more details. | 13 | * this archive for more details. |
11 | * | ||
12 | * $Id$ | ||
13 | */ | 14 | */ |
14 | 15 | ||
15 | #ifndef _M32700UT_M32700UT_PLD_H | ||
16 | #define _M32700UT_M32700UT_PLD_H | ||
17 | |||
18 | |||
19 | #if defined(CONFIG_PLAT_M32700UT_Alpha) | 16 | #if defined(CONFIG_PLAT_M32700UT_Alpha) |
20 | #define PLD_PLAT_BASE 0x08c00000 | 17 | #define PLD_PLAT_BASE 0x08c00000 |
21 | #elif defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_USRV) | 18 | #elif defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_USRV) |
@@ -37,7 +34,7 @@ | |||
37 | #define __reg8 | 34 | #define __reg8 |
38 | #define __reg16 | 35 | #define __reg16 |
39 | #define __reg32 | 36 | #define __reg32 |
40 | #endif /* __ASSEMBLY__ */ | 37 | #endif /* __ASSEMBLY__ */ |
41 | 38 | ||
42 | /* CFC */ | 39 | /* CFC */ |
43 | #define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000) | 40 | #define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000) |
@@ -261,4 +258,4 @@ | |||
261 | #define PLD_SCTXB __reg16(PLD_BASE + 0x3800c) | 258 | #define PLD_SCTXB __reg16(PLD_BASE + 0x3800c) |
262 | #define PLD_SCRXB __reg16(PLD_BASE + 0x3800e) | 259 | #define PLD_SCRXB __reg16(PLD_BASE + 0x3800e) |
263 | 260 | ||
264 | #endif /* _M32700UT_M32700UT_PLD.H */ | 261 | #endif /* _M32700UT_M32700UT_PLD.H */ |
diff --git a/include/asm-m32r/mappi2/mappi2_pld.h b/include/asm-m32r/mappi2/mappi2_pld.h index 56a2b12f2bfc..2624c9db7255 100644 --- a/include/asm-m32r/mappi2/mappi2_pld.h +++ b/include/asm-m32r/mappi2/mappi2_pld.h | |||
@@ -1,18 +1,17 @@ | |||
1 | #ifndef _MAPPI2_PLD_H | ||
2 | #define _MAPPI2_PLD_H | ||
3 | |||
1 | /* | 4 | /* |
2 | * include/asm-m32r/mappi2/mappi2_pld.h | 5 | * include/asm-m32r/mappi2/mappi2_pld.h |
3 | * | 6 | * |
4 | * Definitions for Extended IO Logic on MAPPI2 board. | 7 | * Definitions for Extended IO Logic on MAPPI2 board. |
5 | * based on m32700ut_pld.h by | 8 | * based on m32700ut_pld.h |
6 | * | 9 | * |
7 | * This file is subject to the terms and conditions of the GNU General | 10 | * This file is subject to the terms and conditions of the GNU General |
8 | * Public License. See the file "COPYING" in the main directory of | 11 | * Public License. See the file "COPYING" in the main directory of |
9 | * this archive for more details. | 12 | * this archive for more details. |
10 | * | ||
11 | */ | 13 | */ |
12 | 14 | ||
13 | #ifndef _MAPPI2_PLD_H | ||
14 | #define _MAPPI2_PLD_H | ||
15 | |||
16 | #ifndef __ASSEMBLY__ | 15 | #ifndef __ASSEMBLY__ |
17 | /* FIXME: | 16 | /* FIXME: |
18 | * Some C functions use non-cache address, so can't define non-cache address. | 17 | * Some C functions use non-cache address, so can't define non-cache address. |
@@ -26,7 +25,7 @@ | |||
26 | #define __reg8 | 25 | #define __reg8 |
27 | #define __reg16 | 26 | #define __reg16 |
28 | #define __reg32 | 27 | #define __reg32 |
29 | #endif /* __ASSEMBLY__ */ | 28 | #endif /* __ASSEMBLY__ */ |
30 | 29 | ||
31 | /* CFC */ | 30 | /* CFC */ |
32 | #define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000) | 31 | #define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000) |
@@ -148,4 +147,4 @@ | |||
148 | 147 | ||
149 | #endif | 148 | #endif |
150 | 149 | ||
151 | #endif /* _MAPPI2_PLD.H */ | 150 | #endif /* _MAPPI2_PLD.H */ |
diff --git a/include/asm-m32r/mappi3/mappi3_pld.h b/include/asm-m32r/mappi3/mappi3_pld.h index 92f10defaef8..451c40ee70af 100644 --- a/include/asm-m32r/mappi3/mappi3_pld.h +++ b/include/asm-m32r/mappi3/mappi3_pld.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #ifndef _MAPPI3_PLD_H | ||
2 | #define _MAPPI3_PLD_H | ||
3 | |||
1 | /* | 4 | /* |
2 | * include/asm-m32r/mappi3/mappi3_pld.h | 5 | * include/asm-m32r/mappi3/mappi3_pld.h |
3 | * | 6 | * |
@@ -7,12 +10,8 @@ | |||
7 | * This file is subject to the terms and conditions of the GNU General | 10 | * This file is subject to the terms and conditions of the GNU General |
8 | * Public License. See the file "COPYING" in the main directory of | 11 | * Public License. See the file "COPYING" in the main directory of |
9 | * this archive for more details. | 12 | * this archive for more details. |
10 | * | ||
11 | */ | 13 | */ |
12 | 14 | ||
13 | #ifndef _MAPPI3_PLD_H | ||
14 | #define _MAPPI3_PLD_H | ||
15 | |||
16 | #ifndef __ASSEMBLY__ | 15 | #ifndef __ASSEMBLY__ |
17 | /* FIXME: | 16 | /* FIXME: |
18 | * Some C functions use non-cache address, so can't define non-cache address. | 17 | * Some C functions use non-cache address, so can't define non-cache address. |
@@ -26,7 +25,7 @@ | |||
26 | #define __reg8 | 25 | #define __reg8 |
27 | #define __reg16 | 26 | #define __reg16 |
28 | #define __reg32 | 27 | #define __reg32 |
29 | #endif /* __ASSEMBLY__ */ | 28 | #endif /* __ASSEMBLY__ */ |
30 | 29 | ||
31 | /* CFC */ | 30 | /* CFC */ |
32 | #define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000) | 31 | #define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000) |
@@ -140,4 +139,4 @@ | |||
140 | /* Reset Control */ | 139 | /* Reset Control */ |
141 | #define PLD_REBOOT __reg16(PLD_BASE + 0x38000) | 140 | #define PLD_REBOOT __reg16(PLD_BASE + 0x38000) |
142 | 141 | ||
143 | #endif /* _MAPPI3_PLD.H */ | 142 | #endif /* _MAPPI3_PLD.H */ |
diff --git a/include/asm-m32r/mc146818rtc.h b/include/asm-m32r/mc146818rtc.h index 755601d053cc..aa1b7bf84f51 100644 --- a/include/asm-m32r/mc146818rtc.h +++ b/include/asm-m32r/mc146818rtc.h | |||
@@ -7,7 +7,6 @@ | |||
7 | #include <asm/io.h> | 7 | #include <asm/io.h> |
8 | 8 | ||
9 | #ifndef RTC_PORT | 9 | #ifndef RTC_PORT |
10 | // #define RTC_PORT(x) (0x70 + (x)) | ||
11 | #define RTC_PORT(x) ((x)) | 10 | #define RTC_PORT(x) ((x)) |
12 | #define RTC_ALWAYS_BCD 1 /* RTC operates in binary mode */ | 11 | #define RTC_ALWAYS_BCD 1 /* RTC operates in binary mode */ |
13 | #endif | 12 | #endif |
@@ -26,7 +25,5 @@ outb_p((val),RTC_PORT(1)); \ | |||
26 | }) | 25 | }) |
27 | 26 | ||
28 | #define RTC_IRQ 8 | 27 | #define RTC_IRQ 8 |
29 | #if 0 | ||
30 | #endif | ||
31 | 28 | ||
32 | #endif /* _ASM_MC146818RTC_H */ | 29 | #endif /* _ASM_MC146818RTC_H */ |
diff --git a/include/asm-m32r/mman.h b/include/asm-m32r/mman.h index 695a860c024f..516a8973b130 100644 --- a/include/asm-m32r/mman.h +++ b/include/asm-m32r/mman.h | |||
@@ -3,8 +3,6 @@ | |||
3 | 3 | ||
4 | #include <asm-generic/mman.h> | 4 | #include <asm-generic/mman.h> |
5 | 5 | ||
6 | /* orig : i386 2.6.0-test6 */ | ||
7 | |||
8 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 6 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
9 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 7 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
10 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ | 8 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ |
diff --git a/include/asm-m32r/mmu.h b/include/asm-m32r/mmu.h index cf3f6d78ac66..d9bd724479cf 100644 --- a/include/asm-m32r/mmu.h +++ b/include/asm-m32r/mmu.h | |||
@@ -1,13 +1,14 @@ | |||
1 | #ifndef _ASM_M32R_MMU_H | 1 | #ifndef _ASM_M32R_MMU_H |
2 | #define _ASM_M32R_MMU_H | 2 | #define _ASM_M32R_MMU_H |
3 | 3 | ||
4 | |||
5 | #if !defined(CONFIG_MMU) | 4 | #if !defined(CONFIG_MMU) |
5 | |||
6 | typedef struct { | 6 | typedef struct { |
7 | struct vm_list_struct *vmlist; | 7 | struct vm_list_struct *vmlist; |
8 | unsigned long end_brk; | 8 | unsigned long end_brk; |
9 | } mm_context_t; | 9 | } mm_context_t; |
10 | #else | 10 | |
11 | #else /* CONFIG_MMU */ | ||
11 | 12 | ||
12 | /* Default "unsigned long" context */ | 13 | /* Default "unsigned long" context */ |
13 | #ifndef CONFIG_SMP | 14 | #ifndef CONFIG_SMP |
@@ -16,5 +17,6 @@ typedef unsigned long mm_context_t; | |||
16 | typedef unsigned long mm_context_t[NR_CPUS]; | 17 | typedef unsigned long mm_context_t[NR_CPUS]; |
17 | #endif | 18 | #endif |
18 | 19 | ||
19 | #endif /* CONFIG_MMU */ | 20 | #endif /* CONFIG_MMU */ |
20 | #endif /* _ASM_M32R_MMU_H */ | 21 | |
22 | #endif /* _ASM_M32R_MMU_H */ | ||
diff --git a/include/asm-m32r/mmu_context.h b/include/asm-m32r/mmu_context.h index 542302eb6bcb..1f40d4a0acf1 100644 --- a/include/asm-m32r/mmu_context.h +++ b/include/asm-m32r/mmu_context.h | |||
@@ -1,9 +1,7 @@ | |||
1 | #ifndef _ASM_M32R_MMU_CONTEXT_H | 1 | #ifndef _ASM_M32R_MMU_CONTEXT_H |
2 | #define _ASM_M32R_MMU_CONTEXT_H | 2 | #define _ASM_M32R_MMU_CONTEXT_H |
3 | |||
4 | #ifdef __KERNEL__ | 3 | #ifdef __KERNEL__ |
5 | 4 | ||
6 | |||
7 | #include <asm/m32r.h> | 5 | #include <asm/m32r.h> |
8 | 6 | ||
9 | #define MMU_CONTEXT_ASID_MASK (0x000000FF) | 7 | #define MMU_CONTEXT_ASID_MASK (0x000000FF) |
@@ -11,7 +9,6 @@ | |||
11 | #define MMU_CONTEXT_FIRST_VERSION (0x00000100) | 9 | #define MMU_CONTEXT_FIRST_VERSION (0x00000100) |
12 | #define NO_CONTEXT (0x00000000) | 10 | #define NO_CONTEXT (0x00000000) |
13 | 11 | ||
14 | |||
15 | #ifndef __ASSEMBLY__ | 12 | #ifndef __ASSEMBLY__ |
16 | 13 | ||
17 | #include <asm/atomic.h> | 14 | #include <asm/atomic.h> |
@@ -147,7 +144,7 @@ static inline void switch_mm(struct mm_struct *prev, | |||
147 | #define activate_mm(prev, next) \ | 144 | #define activate_mm(prev, next) \ |
148 | switch_mm((prev), (next), NULL) | 145 | switch_mm((prev), (next), NULL) |
149 | 146 | ||
150 | #else | 147 | #else /* not CONFIG_MMU */ |
151 | #define get_mmu_context(mm) do { } while (0) | 148 | #define get_mmu_context(mm) do { } while (0) |
152 | #define init_new_context(tsk,mm) (0) | 149 | #define init_new_context(tsk,mm) (0) |
153 | #define destroy_context(mm) do { } while (0) | 150 | #define destroy_context(mm) do { } while (0) |
@@ -158,11 +155,9 @@ static inline void switch_mm(struct mm_struct *prev, | |||
158 | #define deactivate_mm(mm,tsk) do { } while (0) | 155 | #define deactivate_mm(mm,tsk) do { } while (0) |
159 | #define activate_mm(prev,next) do { } while (0) | 156 | #define activate_mm(prev,next) do { } while (0) |
160 | #define enter_lazy_tlb(mm,tsk) do { } while (0) | 157 | #define enter_lazy_tlb(mm,tsk) do { } while (0) |
161 | #endif /* CONFIG_MMU */ | 158 | #endif /* not CONFIG_MMU */ |
162 | |||
163 | 159 | ||
164 | #endif /* not __ASSEMBLY__ */ | 160 | #endif /* not __ASSEMBLY__ */ |
165 | 161 | ||
166 | #endif /* __KERNEL__ */ | 162 | #endif /* __KERNEL__ */ |
167 | |||
168 | #endif /* _ASM_M32R_MMU_CONTEXT_H */ | 163 | #endif /* _ASM_M32R_MMU_CONTEXT_H */ |
diff --git a/include/asm-m32r/module.h b/include/asm-m32r/module.h index 3f2541c92a7b..eb73ee011215 100644 --- a/include/asm-m32r/module.h +++ b/include/asm-m32r/module.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_MODULE_H | 1 | #ifndef _ASM_M32R_MODULE_H |
2 | #define _ASM_M32R_MODULE_H | 2 | #define _ASM_M32R_MODULE_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | struct mod_arch_specific { }; | 4 | struct mod_arch_specific { }; |
7 | 5 | ||
8 | #define Elf_Shdr Elf32_Shdr | 6 | #define Elf_Shdr Elf32_Shdr |
@@ -10,4 +8,3 @@ struct mod_arch_specific { }; | |||
10 | #define Elf_Ehdr Elf32_Ehdr | 8 | #define Elf_Ehdr Elf32_Ehdr |
11 | 9 | ||
12 | #endif /* _ASM_M32R_MODULE_H */ | 10 | #endif /* _ASM_M32R_MODULE_H */ |
13 | |||
diff --git a/include/asm-m32r/msgbuf.h b/include/asm-m32r/msgbuf.h index 852ff52af4c2..0d5a877b813e 100644 --- a/include/asm-m32r/msgbuf.h +++ b/include/asm-m32r/msgbuf.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_MSGBUF_H | 1 | #ifndef _ASM_M32R_MSGBUF_H |
2 | #define _ASM_M32R_MSGBUF_H | 2 | #define _ASM_M32R_MSGBUF_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* orig : i386 2.4.18 */ | ||
7 | |||
8 | /* | 4 | /* |
9 | * The msqid64_ds structure for m32r architecture. | 5 | * The msqid64_ds structure for m32r architecture. |
10 | * Note extra padding because this structure is passed back and forth | 6 | * Note extra padding because this structure is passed back and forth |
diff --git a/include/asm-m32r/namei.h b/include/asm-m32r/namei.h index 7172d3d2e260..210f8056b805 100644 --- a/include/asm-m32r/namei.h +++ b/include/asm-m32r/namei.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_NAMEI_H | 1 | #ifndef _ASM_M32R_NAMEI_H |
2 | #define _ASM_M32R_NAMEI_H | 2 | #define _ASM_M32R_NAMEI_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* orig : i386 2.4.18 */ | ||
7 | |||
8 | /* | 4 | /* |
9 | * linux/include/asm-m32r/namei.h | 5 | * linux/include/asm-m32r/namei.h |
10 | * | 6 | * |
diff --git a/include/asm-m32r/opsput/opsput_lan.h b/include/asm-m32r/opsput/opsput_lan.h index f53e10187c03..a5f18dd1ab20 100644 --- a/include/asm-m32r/opsput/opsput_lan.h +++ b/include/asm-m32r/opsput/opsput_lan.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #ifndef _OPSPUT_OPSPUT_LAN_H | ||
2 | #define _OPSPUT_OPSPUT_LAN_H | ||
3 | |||
1 | /* | 4 | /* |
2 | * include/asm-m32r/opsput/opsput_lan.h | 5 | * include/asm-m32r/opsput/opsput_lan.h |
3 | * | 6 | * |
@@ -8,14 +11,8 @@ | |||
8 | * This file is subject to the terms and conditions of the GNU General | 11 | * This file is subject to the terms and conditions of the GNU General |
9 | * Public License. See the file "COPYING" in the main directory of | 12 | * Public License. See the file "COPYING" in the main directory of |
10 | * this archive for more details. | 13 | * this archive for more details. |
11 | * | ||
12 | * $Id: opsput_lan.h,v 1.1 2004/07/27 06:54:20 sakugawa Exp $ | ||
13 | */ | 14 | */ |
14 | 15 | ||
15 | #ifndef _OPSPUT_OPSPUT_LAN_H | ||
16 | #define _OPSPUT_OPSPUT_LAN_H | ||
17 | |||
18 | |||
19 | #ifndef __ASSEMBLY__ | 16 | #ifndef __ASSEMBLY__ |
20 | /* | 17 | /* |
21 | * C functions use non-cache address. | 18 | * C functions use non-cache address. |
@@ -23,7 +20,7 @@ | |||
23 | #define OPSPUT_LAN_BASE (0x10000000 /* + NONCACHE_OFFSET */) | 20 | #define OPSPUT_LAN_BASE (0x10000000 /* + NONCACHE_OFFSET */) |
24 | #else | 21 | #else |
25 | #define OPSPUT_LAN_BASE (0x10000000 + NONCACHE_OFFSET) | 22 | #define OPSPUT_LAN_BASE (0x10000000 + NONCACHE_OFFSET) |
26 | #endif /* __ASSEMBLY__ */ | 23 | #endif /* __ASSEMBLY__ */ |
27 | 24 | ||
28 | /* ICU | 25 | /* ICU |
29 | * ICUISTS: status register | 26 | * ICUISTS: status register |
@@ -52,4 +49,4 @@ | |||
52 | #define OPSPUT_LAN_ICUCR1 __reg16(OPSPUT_LAN_BASE + 0xc0010) | 49 | #define OPSPUT_LAN_ICUCR1 __reg16(OPSPUT_LAN_BASE + 0xc0010) |
53 | #define OPSPUT_LAN_ICUCR3 __reg16(OPSPUT_LAN_BASE + 0xc0014) | 50 | #define OPSPUT_LAN_ICUCR3 __reg16(OPSPUT_LAN_BASE + 0xc0014) |
54 | 51 | ||
55 | #endif /* _OPSPUT_OPSPUT_LAN_H */ | 52 | #endif /* _OPSPUT_OPSPUT_LAN_H */ |
diff --git a/include/asm-m32r/opsput/opsput_lcd.h b/include/asm-m32r/opsput/opsput_lcd.h index 99f296e1b61b..369c9f0832a6 100644 --- a/include/asm-m32r/opsput/opsput_lcd.h +++ b/include/asm-m32r/opsput/opsput_lcd.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #ifndef _OPSPUT_OPSPUT_LCD_H | ||
2 | #define _OPSPUT_OPSPUT_LCD_H | ||
3 | |||
1 | /* | 4 | /* |
2 | * include/asm-m32r/opsput/opsput_lcd.h | 5 | * include/asm-m32r/opsput/opsput_lcd.h |
3 | * | 6 | * |
@@ -8,14 +11,8 @@ | |||
8 | * This file is subject to the terms and conditions of the GNU General | 11 | * This file is subject to the terms and conditions of the GNU General |
9 | * Public License. See the file "COPYING" in the main directory of | 12 | * Public License. See the file "COPYING" in the main directory of |
10 | * this archive for more details. | 13 | * this archive for more details. |
11 | * | ||
12 | * $Id: opsput_lcd.h,v 1.1 2004/07/27 06:54:20 sakugawa Exp $ | ||
13 | */ | 14 | */ |
14 | 15 | ||
15 | #ifndef _OPSPUT_OPSPUT_LCD_H | ||
16 | #define _OPSPUT_OPSPUT_LCD_H | ||
17 | |||
18 | |||
19 | #ifndef __ASSEMBLY__ | 16 | #ifndef __ASSEMBLY__ |
20 | /* | 17 | /* |
21 | * C functions use non-cache address. | 18 | * C functions use non-cache address. |
@@ -23,7 +20,7 @@ | |||
23 | #define OPSPUT_LCD_BASE (0x10000000 /* + NONCACHE_OFFSET */) | 20 | #define OPSPUT_LCD_BASE (0x10000000 /* + NONCACHE_OFFSET */) |
24 | #else | 21 | #else |
25 | #define OPSPUT_LCD_BASE (0x10000000 + NONCACHE_OFFSET) | 22 | #define OPSPUT_LCD_BASE (0x10000000 + NONCACHE_OFFSET) |
26 | #endif /* __ASSEMBLY__ */ | 23 | #endif /* __ASSEMBLY__ */ |
27 | 24 | ||
28 | /* | 25 | /* |
29 | * ICU | 26 | * ICU |
@@ -55,4 +52,4 @@ | |||
55 | #define OPSPUT_LCD_ICUCR19 __reg16(OPSPUT_LCD_BASE + 0x300036) | 52 | #define OPSPUT_LCD_ICUCR19 __reg16(OPSPUT_LCD_BASE + 0x300036) |
56 | #define OPSPUT_LCD_ICUCR21 __reg16(OPSPUT_LCD_BASE + 0x30003a) | 53 | #define OPSPUT_LCD_ICUCR21 __reg16(OPSPUT_LCD_BASE + 0x30003a) |
57 | 54 | ||
58 | #endif /* _OPSPUT_OPSPUT_LCD_H */ | 55 | #endif /* _OPSPUT_OPSPUT_LCD_H */ |
diff --git a/include/asm-m32r/opsput/opsput_pld.h b/include/asm-m32r/opsput/opsput_pld.h index a8d6452076f1..3f11ea1aac2d 100644 --- a/include/asm-m32r/opsput/opsput_pld.h +++ b/include/asm-m32r/opsput/opsput_pld.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #ifndef _OPSPUT_OPSPUT_PLD_H | ||
2 | #define _OPSPUT_OPSPUT_PLD_H | ||
3 | |||
1 | /* | 4 | /* |
2 | * include/asm-m32r/opsput/opsput_pld.h | 5 | * include/asm-m32r/opsput/opsput_pld.h |
3 | * | 6 | * |
@@ -8,14 +11,8 @@ | |||
8 | * This file is subject to the terms and conditions of the GNU General | 11 | * This file is subject to the terms and conditions of the GNU General |
9 | * Public License. See the file "COPYING" in the main directory of | 12 | * Public License. See the file "COPYING" in the main directory of |
10 | * this archive for more details. | 13 | * this archive for more details. |
11 | * | ||
12 | * $Id: opsput_pld.h,v 1.1 2004/07/27 06:54:20 sakugawa Exp $ | ||
13 | */ | 14 | */ |
14 | 15 | ||
15 | #ifndef _OPSPUT_OPSPUT_PLD_H | ||
16 | #define _OPSPUT_OPSPUT_PLD_H | ||
17 | |||
18 | |||
19 | #define PLD_PLAT_BASE 0x1cc00000 | 16 | #define PLD_PLAT_BASE 0x1cc00000 |
20 | 17 | ||
21 | #ifndef __ASSEMBLY__ | 18 | #ifndef __ASSEMBLY__ |
@@ -31,7 +28,7 @@ | |||
31 | #define __reg8 | 28 | #define __reg8 |
32 | #define __reg16 | 29 | #define __reg16 |
33 | #define __reg32 | 30 | #define __reg32 |
34 | #endif /* __ASSEMBLY__ */ | 31 | #endif /* __ASSEMBLY__ */ |
35 | 32 | ||
36 | /* CFC */ | 33 | /* CFC */ |
37 | #define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000) | 34 | #define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000) |
@@ -255,4 +252,4 @@ | |||
255 | #define PLD_SCTXB __reg16(PLD_BASE + 0x3800c) | 252 | #define PLD_SCTXB __reg16(PLD_BASE + 0x3800c) |
256 | #define PLD_SCRXB __reg16(PLD_BASE + 0x3800e) | 253 | #define PLD_SCRXB __reg16(PLD_BASE + 0x3800e) |
257 | 254 | ||
258 | #endif /* _OPSPUT_OPSPUT_PLD.H */ | 255 | #endif /* _OPSPUT_OPSPUT_PLD.H */ |
diff --git a/include/asm-m32r/page.h b/include/asm-m32r/page.h index 404a4c24007b..6f6ecf7d14a3 100644 --- a/include/asm-m32r/page.h +++ b/include/asm-m32r/page.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_PAGE_H | 1 | #ifndef _ASM_M32R_PAGE_H |
2 | #define _ASM_M32R_PAGE_H | 2 | #define _ASM_M32R_PAGE_H |
3 | 3 | ||
4 | |||
5 | /* PAGE_SHIFT determines the page size */ | 4 | /* PAGE_SHIFT determines the page size */ |
6 | #define PAGE_SHIFT 12 | 5 | #define PAGE_SHIFT 12 |
7 | #define PAGE_SIZE (1UL << PAGE_SHIFT) | 6 | #define PAGE_SIZE (1UL << PAGE_SHIFT) |
@@ -57,9 +56,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
57 | * and CONFIG_HIGHMEM64G options in the kernel configuration. | 56 | * and CONFIG_HIGHMEM64G options in the kernel configuration. |
58 | */ | 57 | */ |
59 | 58 | ||
60 | |||
61 | /* This handles the memory map.. */ | ||
62 | |||
63 | #define __MEMORY_START CONFIG_MEMORY_START | 59 | #define __MEMORY_START CONFIG_MEMORY_START |
64 | #define __MEMORY_SIZE CONFIG_MEMORY_SIZE | 60 | #define __MEMORY_SIZE CONFIG_MEMORY_SIZE |
65 | 61 | ||
@@ -92,4 +88,3 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
92 | 88 | ||
93 | #endif /* __KERNEL__ */ | 89 | #endif /* __KERNEL__ */ |
94 | #endif /* _ASM_M32R_PAGE_H */ | 90 | #endif /* _ASM_M32R_PAGE_H */ |
95 | |||
diff --git a/include/asm-m32r/param.h b/include/asm-m32r/param.h index 750b938ccb52..3e14026e39cd 100644 --- a/include/asm-m32r/param.h +++ b/include/asm-m32r/param.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_PARAM_H | 1 | #ifndef _ASM_M32R_PARAM_H |
2 | #define _ASM_M32R_PARAM_H | 2 | #define _ASM_M32R_PARAM_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* orig : i386 2.5.67 */ | ||
7 | |||
8 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
9 | # define HZ 100 /* Internal kernel timer frequency */ | 5 | # define HZ 100 /* Internal kernel timer frequency */ |
10 | # define USER_HZ 100 /* .. some user interfaces are in "ticks" */ | 6 | # define USER_HZ 100 /* .. some user interfaces are in "ticks" */ |
diff --git a/include/asm-m32r/pci.h b/include/asm-m32r/pci.h index 00d7b6f39a33..fe785d167db6 100644 --- a/include/asm-m32r/pci.h +++ b/include/asm-m32r/pci.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_PCI_H | 1 | #ifndef _ASM_M32R_PCI_H |
2 | #define _ASM_M32R_PCI_H | 2 | #define _ASM_M32R_PCI_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | #include <asm-generic/pci.h> | 4 | #include <asm-generic/pci.h> |
7 | 5 | ||
8 | #define PCI_DMA_BUS_IS_PHYS (1) | 6 | #define PCI_DMA_BUS_IS_PHYS (1) |
diff --git a/include/asm-m32r/pgalloc.h b/include/asm-m32r/pgalloc.h index e09a86c3cadf..943ba63c1ebc 100644 --- a/include/asm-m32r/pgalloc.h +++ b/include/asm-m32r/pgalloc.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_PGALLOC_H | 1 | #ifndef _ASM_M32R_PGALLOC_H |
2 | #define _ASM_M32R_PGALLOC_H | 2 | #define _ASM_M32R_PGALLOC_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | #include <linux/mm.h> | 4 | #include <linux/mm.h> |
7 | 5 | ||
8 | #include <asm/io.h> | 6 | #include <asm/io.h> |
@@ -74,4 +72,3 @@ static __inline__ void pte_free(struct page *pte) | |||
74 | #define check_pgt_cache() do { } while (0) | 72 | #define check_pgt_cache() do { } while (0) |
75 | 73 | ||
76 | #endif /* _ASM_M32R_PGALLOC_H */ | 74 | #endif /* _ASM_M32R_PGALLOC_H */ |
77 | |||
diff --git a/include/asm-m32r/pgtable-2level.h b/include/asm-m32r/pgtable-2level.h index 84152760e0b5..750925726a10 100644 --- a/include/asm-m32r/pgtable-2level.h +++ b/include/asm-m32r/pgtable-2level.h | |||
@@ -1,9 +1,7 @@ | |||
1 | #ifndef _ASM_M32R_PGTABLE_2LEVEL_H | 1 | #ifndef _ASM_M32R_PGTABLE_2LEVEL_H |
2 | #define _ASM_M32R_PGTABLE_2LEVEL_H | 2 | #define _ASM_M32R_PGTABLE_2LEVEL_H |
3 | |||
4 | #ifdef __KERNEL__ | 3 | #ifdef __KERNEL__ |
5 | 4 | ||
6 | |||
7 | /* | 5 | /* |
8 | * traditional M32R two-level paging structure: | 6 | * traditional M32R two-level paging structure: |
9 | */ | 7 | */ |
@@ -77,5 +75,4 @@ static inline pmd_t *pmd_offset(pgd_t * dir, unsigned long address) | |||
77 | #define pgoff_to_pte(off) ((pte_t) { (((off) & 0xef) << 2) | (((off) >> 7) << 10) | _PAGE_FILE }) | 75 | #define pgoff_to_pte(off) ((pte_t) { (((off) & 0xef) << 2) | (((off) >> 7) << 10) | _PAGE_FILE }) |
78 | 76 | ||
79 | #endif /* __KERNEL__ */ | 77 | #endif /* __KERNEL__ */ |
80 | |||
81 | #endif /* _ASM_M32R_PGTABLE_2LEVEL_H */ | 78 | #endif /* _ASM_M32R_PGTABLE_2LEVEL_H */ |
diff --git a/include/asm-m32r/posix_types.h b/include/asm-m32r/posix_types.h index 47e7e85a3dc3..1caac65d208f 100644 --- a/include/asm-m32r/posix_types.h +++ b/include/asm-m32r/posix_types.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_POSIX_TYPES_H | 1 | #ifndef _ASM_M32R_POSIX_TYPES_H |
2 | #define _ASM_M32R_POSIX_TYPES_H | 2 | #define _ASM_M32R_POSIX_TYPES_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* orig : i386, sh 2.4.18 */ | ||
7 | |||
8 | /* | 4 | /* |
9 | * This file is generally used by user-level software, so you need to | 5 | * This file is generally used by user-level software, so you need to |
10 | * be a little careful about namespace pollution etc. Also, we cannot | 6 | * be a little careful about namespace pollution etc. Also, we cannot |
diff --git a/include/asm-m32r/rtc.h b/include/asm-m32r/rtc.h index 6b2b837c5978..0340633f3f4d 100644 --- a/include/asm-m32r/rtc.h +++ b/include/asm-m32r/rtc.h | |||
@@ -1,10 +1,6 @@ | |||
1 | /* $Id: rtc.h,v 1.1.1.1 2004/03/25 04:29:22 hitoshiy Exp $ */ | ||
2 | |||
3 | #ifndef __RTC_H__ | 1 | #ifndef __RTC_H__ |
4 | #define __RTC_H__ | 2 | #define __RTC_H__ |
5 | 3 | ||
6 | |||
7 | |||
8 | /* Dallas DS1302 clock/calendar register numbers. */ | 4 | /* Dallas DS1302 clock/calendar register numbers. */ |
9 | # define RTC_SECONDS 0 | 5 | # define RTC_SECONDS 0 |
10 | # define RTC_MINUTES 1 | 6 | # define RTC_MINUTES 1 |
diff --git a/include/asm-m32r/scatterlist.h b/include/asm-m32r/scatterlist.h index 09a10e43bf0f..c2de96cb69ed 100644 --- a/include/asm-m32r/scatterlist.h +++ b/include/asm-m32r/scatterlist.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_SCATTERLIST_H | 1 | #ifndef _ASM_M32R_SCATTERLIST_H |
2 | #define _ASM_M32R_SCATTERLIST_H | 2 | #define _ASM_M32R_SCATTERLIST_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | struct scatterlist { | 4 | struct scatterlist { |
7 | char * address; /* Location data is to be transferred to, NULL for | 5 | char * address; /* Location data is to be transferred to, NULL for |
8 | * highmem page */ | 6 | * highmem page */ |
diff --git a/include/asm-m32r/sections.h b/include/asm-m32r/sections.h index 6b969e53b806..5e5d21c4908a 100644 --- a/include/asm-m32r/sections.h +++ b/include/asm-m32r/sections.h | |||
@@ -5,4 +5,3 @@ | |||
5 | #include <asm-generic/sections.h> | 5 | #include <asm-generic/sections.h> |
6 | 6 | ||
7 | #endif /* _M32R_SECTIONS_H */ | 7 | #endif /* _M32R_SECTIONS_H */ |
8 | |||
diff --git a/include/asm-m32r/segment.h b/include/asm-m32r/segment.h index e45db68e6c2d..42b11aeb3249 100644 --- a/include/asm-m32r/segment.h +++ b/include/asm-m32r/segment.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_SEGMENT_H | 1 | #ifndef _ASM_M32R_SEGMENT_H |
2 | #define _ASM_M32R_SEGMENT_H | 2 | #define _ASM_M32R_SEGMENT_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* orig : i386 (2.4.18) */ | ||
7 | |||
8 | #define __KERNEL_CS 0x10 | 4 | #define __KERNEL_CS 0x10 |
9 | #define __KERNEL_DS 0x18 | 5 | #define __KERNEL_DS 0x18 |
10 | 6 | ||
diff --git a/include/asm-m32r/sembuf.h b/include/asm-m32r/sembuf.h index e69018e6ff71..c9873d6890e2 100644 --- a/include/asm-m32r/sembuf.h +++ b/include/asm-m32r/sembuf.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_SEMBUF_H | 1 | #ifndef _ASM_M32R_SEMBUF_H |
2 | #define _ASM_M32R_SEMBUF_H | 2 | #define _ASM_M32R_SEMBUF_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* orig : i386 2.4.18 */ | ||
7 | |||
8 | /* | 4 | /* |
9 | * The semid64_ds structure for m32r architecture. | 5 | * The semid64_ds structure for m32r architecture. |
10 | * Note extra padding because this structure is passed back and forth | 6 | * Note extra padding because this structure is passed back and forth |
diff --git a/include/asm-m32r/setup.h b/include/asm-m32r/setup.h index 6a0b32202d4e..c637ab992394 100644 --- a/include/asm-m32r/setup.h +++ b/include/asm-m32r/setup.h | |||
@@ -1,3 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_SETUP_H | ||
2 | #define _ASM_M32R_SETUP_H | ||
3 | |||
1 | /* | 4 | /* |
2 | * This is set up by the setup-routine at boot-time | 5 | * This is set up by the setup-routine at boot-time |
3 | */ | 6 | */ |
@@ -32,3 +35,4 @@ extern unsigned long memory_end; | |||
32 | 35 | ||
33 | #endif /* __KERNEL__ */ | 36 | #endif /* __KERNEL__ */ |
34 | 37 | ||
38 | #endif /* _ASM_M32R_SETUP_H */ | ||
diff --git a/include/asm-m32r/shmbuf.h b/include/asm-m32r/shmbuf.h index b84e897fa87b..b0cdf0aa7d65 100644 --- a/include/asm-m32r/shmbuf.h +++ b/include/asm-m32r/shmbuf.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_SHMBUF_H | 1 | #ifndef _ASM_M32R_SHMBUF_H |
2 | #define _ASM_M32R_SHMBUF_H | 2 | #define _ASM_M32R_SHMBUF_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* orig : i386 2.4.18 */ | ||
7 | |||
8 | /* | 4 | /* |
9 | * The shmid64_ds structure for M32R architecture. | 5 | * The shmid64_ds structure for M32R architecture. |
10 | * Note extra padding because this structure is passed back and forth | 6 | * Note extra padding because this structure is passed back and forth |
diff --git a/include/asm-m32r/shmparam.h b/include/asm-m32r/shmparam.h index db0019ba955d..35986d81a528 100644 --- a/include/asm-m32r/shmparam.h +++ b/include/asm-m32r/shmparam.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_SHMPARAM_H | 1 | #ifndef _ASM_M32R_SHMPARAM_H |
2 | #define _ASM_M32R_SHMPARAM_H | 2 | #define _ASM_M32R_SHMPARAM_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | #define SHMLBA PAGE_SIZE /* attach addr a multiple of this */ | 4 | #define SHMLBA PAGE_SIZE /* attach addr a multiple of this */ |
7 | 5 | ||
8 | #endif /* _ASM_M32R_SHMPARAM_H */ | 6 | #endif /* _ASM_M32R_SHMPARAM_H */ |
diff --git a/include/asm-m32r/sigcontext.h b/include/asm-m32r/sigcontext.h index 62537dc4dec9..da4a9c36d09b 100644 --- a/include/asm-m32r/sigcontext.h +++ b/include/asm-m32r/sigcontext.h | |||
@@ -1,9 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_SIGCONTEXT_H | 1 | #ifndef _ASM_M32R_SIGCONTEXT_H |
2 | #define _ASM_M32R_SIGCONTEXT_H | 2 | #define _ASM_M32R_SIGCONTEXT_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | |||
7 | struct sigcontext { | 4 | struct sigcontext { |
8 | /* CPU registers */ | 5 | /* CPU registers */ |
9 | /* Saved main processor registers. */ | 6 | /* Saved main processor registers. */ |
diff --git a/include/asm-m32r/siginfo.h b/include/asm-m32r/siginfo.h index 482202f2e77f..7d9cd9ebfd0e 100644 --- a/include/asm-m32r/siginfo.h +++ b/include/asm-m32r/siginfo.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _M32R_SIGINFO_H | 1 | #ifndef _M32R_SIGINFO_H |
2 | #define _M32R_SIGINFO_H | 2 | #define _M32R_SIGINFO_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | #include <asm-generic/siginfo.h> | 4 | #include <asm-generic/siginfo.h> |
7 | 5 | ||
8 | #endif /* _M32R_SIGINFO_H */ | 6 | #endif /* _M32R_SIGINFO_H */ |
diff --git a/include/asm-m32r/signal.h b/include/asm-m32r/signal.h index 65423bed32b1..937258686ba5 100644 --- a/include/asm-m32r/signal.h +++ b/include/asm-m32r/signal.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_SIGNAL_H | 1 | #ifndef _ASM_M32R_SIGNAL_H |
2 | #define _ASM_M32R_SIGNAL_H | 2 | #define _ASM_M32R_SIGNAL_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* orig : i386 2.4.18 */ | ||
7 | |||
8 | #include <linux/types.h> | 4 | #include <linux/types.h> |
9 | #include <linux/time.h> | 5 | #include <linux/time.h> |
10 | #include <linux/compiler.h> | 6 | #include <linux/compiler.h> |
diff --git a/include/asm-m32r/smp.h b/include/asm-m32r/smp.h index 650d2558c304..abd937ac5239 100644 --- a/include/asm-m32r/smp.h +++ b/include/asm-m32r/smp.h | |||
@@ -1,9 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_SMP_H | 1 | #ifndef _ASM_M32R_SMP_H |
2 | #define _ASM_M32R_SMP_H | 2 | #define _ASM_M32R_SMP_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | |||
7 | #ifdef CONFIG_SMP | 4 | #ifdef CONFIG_SMP |
8 | #ifndef __ASSEMBLY__ | 5 | #ifndef __ASSEMBLY__ |
9 | 6 | ||
diff --git a/include/asm-m32r/sockios.h b/include/asm-m32r/sockios.h index 147a118442ac..f89962e231fe 100644 --- a/include/asm-m32r/sockios.h +++ b/include/asm-m32r/sockios.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_SOCKIOS_H | 1 | #ifndef _ASM_M32R_SOCKIOS_H |
2 | #define _ASM_M32R_SOCKIOS_H | 2 | #define _ASM_M32R_SOCKIOS_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* Socket-level I/O control calls. */ | 4 | /* Socket-level I/O control calls. */ |
7 | #define FIOSETOWN 0x8901 | 5 | #define FIOSETOWN 0x8901 |
8 | #define SIOCSPGRP 0x8902 | 6 | #define SIOCSPGRP 0x8902 |
diff --git a/include/asm-m32r/spinlock_types.h b/include/asm-m32r/spinlock_types.h index 7e9941c45f40..83f52105c0e4 100644 --- a/include/asm-m32r/spinlock_types.h +++ b/include/asm-m32r/spinlock_types.h | |||
@@ -20,4 +20,4 @@ typedef struct { | |||
20 | 20 | ||
21 | #define __RAW_RW_LOCK_UNLOCKED { RW_LOCK_BIAS } | 21 | #define __RAW_RW_LOCK_UNLOCKED { RW_LOCK_BIAS } |
22 | 22 | ||
23 | #endif | 23 | #endif /* _ASM_M32R_SPINLOCK_TYPES_H */ |
diff --git a/include/asm-m32r/stat.h b/include/asm-m32r/stat.h index 05748fef4c8e..da4518f82d6d 100644 --- a/include/asm-m32r/stat.h +++ b/include/asm-m32r/stat.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_STAT_H | 1 | #ifndef _ASM_M32R_STAT_H |
2 | #define _ASM_M32R_STAT_H | 2 | #define _ASM_M32R_STAT_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* orig : i386 2.4.18 */ | ||
7 | |||
8 | #include <asm/byteorder.h> | 4 | #include <asm/byteorder.h> |
9 | 5 | ||
10 | struct __old_kernel_stat { | 6 | struct __old_kernel_stat { |
diff --git a/include/asm-m32r/string.h b/include/asm-m32r/string.h index cb54bcc2e677..e61e2b0bfc1f 100644 --- a/include/asm-m32r/string.h +++ b/include/asm-m32r/string.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_STRING_H | 1 | #ifndef _ASM_M32R_STRING_H |
2 | #define _ASM_M32R_STRING_H | 2 | #define _ASM_M32R_STRING_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | #define __HAVE_ARCH_STRLEN | 4 | #define __HAVE_ARCH_STRLEN |
7 | extern size_t strlen(const char * s); | 5 | extern size_t strlen(const char * s); |
8 | 6 | ||
diff --git a/include/asm-m32r/syscall.h b/include/asm-m32r/syscall.h index d8d4b2c7a7d4..25f316f2b78d 100644 --- a/include/asm-m32r/syscall.h +++ b/include/asm-m32r/syscall.h | |||
@@ -1,11 +1,8 @@ | |||
1 | #ifndef _ASM_M32R_SYSCALL_H | 1 | #ifndef _ASM_M32R_SYSCALL_H |
2 | #define _ASM_M32R_SYSCALL_H | 2 | #define _ASM_M32R_SYSCALL_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* Definitions for the system call vector. */ | 4 | /* Definitions for the system call vector. */ |
7 | #define SYSCALL_VECTOR "2" | 5 | #define SYSCALL_VECTOR "2" |
8 | #define SYSCALL_VECTOR_ADDRESS "0xa0" | 6 | #define SYSCALL_VECTOR_ADDRESS "0xa0" |
9 | 7 | ||
10 | #endif /* _ASM_M32R_SYSCALL_H */ | 8 | #endif /* _ASM_M32R_SYSCALL_H */ |
11 | |||
diff --git a/include/asm-m32r/system.h b/include/asm-m32r/system.h index 4ce0619f6989..99ee09889ff7 100644 --- a/include/asm-m32r/system.h +++ b/include/asm-m32r/system.h | |||
@@ -339,4 +339,4 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) | |||
339 | 339 | ||
340 | #define arch_align_stack(x) (x) | 340 | #define arch_align_stack(x) (x) |
341 | 341 | ||
342 | #endif /* _ASM_M32R_SYSTEM_H */ | 342 | #endif /* _ASM_M32R_SYSTEM_H */ |
diff --git a/include/asm-m32r/termbits.h b/include/asm-m32r/termbits.h index faf2bd0504c1..e402641dfbad 100644 --- a/include/asm-m32r/termbits.h +++ b/include/asm-m32r/termbits.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_TERMBITS_H | 1 | #ifndef _ASM_M32R_TERMBITS_H |
2 | #define _ASM_M32R_TERMBITS_H | 2 | #define _ASM_M32R_TERMBITS_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | #include <linux/posix_types.h> | 4 | #include <linux/posix_types.h> |
7 | 5 | ||
8 | typedef unsigned char cc_t; | 6 | typedef unsigned char cc_t; |
@@ -184,4 +182,4 @@ struct ktermios { | |||
184 | #define TCSADRAIN 1 | 182 | #define TCSADRAIN 1 |
185 | #define TCSAFLUSH 2 | 183 | #define TCSAFLUSH 2 |
186 | 184 | ||
187 | #endif /* _ASM_M32R_TERMBITS_H */ | 185 | #endif /* _ASM_M32R_TERMBITS_H */ |
diff --git a/include/asm-m32r/termios.h b/include/asm-m32r/termios.h index fc99d2e178d8..4943dd8db44d 100644 --- a/include/asm-m32r/termios.h +++ b/include/asm-m32r/termios.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _M32R_TERMIOS_H | 1 | #ifndef _M32R_TERMIOS_H |
2 | #define _M32R_TERMIOS_H | 2 | #define _M32R_TERMIOS_H |
3 | 3 | ||
4 | /* orig : i386 2.6.0-test5 */ | ||
5 | |||
6 | #include <asm/termbits.h> | 4 | #include <asm/termbits.h> |
7 | #include <asm/ioctls.h> | 5 | #include <asm/ioctls.h> |
8 | 6 | ||
@@ -41,24 +39,6 @@ struct termio { | |||
41 | 39 | ||
42 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 40 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
43 | 41 | ||
44 | /* line disciplines */ | ||
45 | #define N_TTY 0 | ||
46 | #define N_SLIP 1 | ||
47 | #define N_MOUSE 2 | ||
48 | #define N_PPP 3 | ||
49 | #define N_STRIP 4 | ||
50 | #define N_AX25 5 | ||
51 | #define N_X25 6 /* X.25 async */ | ||
52 | #define N_6PACK 7 | ||
53 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
54 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
55 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
56 | #define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ | ||
57 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
58 | #define N_HDLC 13 /* synchronous HDLC */ | ||
59 | #define N_SYNC_PPP 14 /* synchronous PPP */ | ||
60 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
61 | |||
62 | #ifdef __KERNEL__ | 42 | #ifdef __KERNEL__ |
63 | #include <linux/module.h> | 43 | #include <linux/module.h> |
64 | 44 | ||
diff --git a/include/asm-m32r/timex.h b/include/asm-m32r/timex.h index 019441c1d7a0..bb9fe4feb12d 100644 --- a/include/asm-m32r/timex.h +++ b/include/asm-m32r/timex.h | |||
@@ -1,15 +1,12 @@ | |||
1 | #ifndef _ASM_M32R_TIMEX_H | 1 | #ifndef _ASM_M32R_TIMEX_H |
2 | #define _ASM_M32R_TIMEX_H | 2 | #define _ASM_M32R_TIMEX_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* | 4 | /* |
7 | * linux/include/asm-m32r/timex.h | 5 | * linux/include/asm-m32r/timex.h |
8 | * | 6 | * |
9 | * m32r architecture timex specifications | 7 | * m32r architecture timex specifications |
10 | */ | 8 | */ |
11 | 9 | ||
12 | |||
13 | #define CLOCK_TICK_RATE (CONFIG_BUS_CLOCK / CONFIG_TIMER_DIVIDE) | 10 | #define CLOCK_TICK_RATE (CONFIG_BUS_CLOCK / CONFIG_TIMER_DIVIDE) |
14 | #define CLOCK_TICK_FACTOR 20 /* Factor of both 1000000 and CLOCK_TICK_RATE */ | 11 | #define CLOCK_TICK_FACTOR 20 /* Factor of both 1000000 and CLOCK_TICK_RATE */ |
15 | 12 | ||
diff --git a/include/asm-m32r/tlbflush.h b/include/asm-m32r/tlbflush.h index ae4494960593..3d37ac002bcc 100644 --- a/include/asm-m32r/tlbflush.h +++ b/include/asm-m32r/tlbflush.h | |||
@@ -98,4 +98,3 @@ static __inline__ void __flush_tlb_all(void) | |||
98 | extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t); | 98 | extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t); |
99 | 99 | ||
100 | #endif /* _ASM_M32R_TLBFLUSH_H */ | 100 | #endif /* _ASM_M32R_TLBFLUSH_H */ |
101 | |||
diff --git a/include/asm-m32r/types.h b/include/asm-m32r/types.h index fcf24c64c3ba..27d3eb539c50 100644 --- a/include/asm-m32r/types.h +++ b/include/asm-m32r/types.h | |||
@@ -3,10 +3,6 @@ | |||
3 | 3 | ||
4 | #ifndef __ASSEMBLY__ | 4 | #ifndef __ASSEMBLY__ |
5 | 5 | ||
6 | /* $Id$ */ | ||
7 | |||
8 | /* orig : i386 2.4.18 */ | ||
9 | |||
10 | typedef unsigned short umode_t; | 6 | typedef unsigned short umode_t; |
11 | 7 | ||
12 | /* | 8 | /* |
@@ -59,4 +55,4 @@ typedef u64 dma64_addr_t; | |||
59 | 55 | ||
60 | #endif /* __KERNEL__ */ | 56 | #endif /* __KERNEL__ */ |
61 | 57 | ||
62 | #endif /* _ASM_M32R_TYPES_H */ | 58 | #endif /* _ASM_M32R_TYPES_H */ |
diff --git a/include/asm-m32r/uaccess.h b/include/asm-m32r/uaccess.h index 26e978c7e3b4..bd8c83765a5c 100644 --- a/include/asm-m32r/uaccess.h +++ b/include/asm-m32r/uaccess.h | |||
@@ -68,7 +68,7 @@ static inline void set_fs(mm_segment_t s) | |||
68 | * This needs 33-bit arithmetic. We have a carry... | 68 | * This needs 33-bit arithmetic. We have a carry... |
69 | */ | 69 | */ |
70 | #define __range_ok(addr,size) ({ \ | 70 | #define __range_ok(addr,size) ({ \ |
71 | unsigned long flag, sum; \ | 71 | unsigned long flag, roksum; \ |
72 | __chk_user_ptr(addr); \ | 72 | __chk_user_ptr(addr); \ |
73 | asm ( \ | 73 | asm ( \ |
74 | " cmpu %1, %1 ; clear cbit\n" \ | 74 | " cmpu %1, %1 ; clear cbit\n" \ |
@@ -76,7 +76,7 @@ static inline void set_fs(mm_segment_t s) | |||
76 | " subx %0, %0\n" \ | 76 | " subx %0, %0\n" \ |
77 | " cmpu %4, %1\n" \ | 77 | " cmpu %4, %1\n" \ |
78 | " subx %0, %5\n" \ | 78 | " subx %0, %5\n" \ |
79 | : "=&r" (flag), "=r" (sum) \ | 79 | : "=&r" (flag), "=r" (roksum) \ |
80 | : "1" (addr), "r" ((int)(size)), \ | 80 | : "1" (addr), "r" ((int)(size)), \ |
81 | "r" (current_thread_info()->addr_limit.seg), "r" (0) \ | 81 | "r" (current_thread_info()->addr_limit.seg), "r" (0) \ |
82 | : "cbit" ); \ | 82 | : "cbit" ); \ |
diff --git a/include/asm-m32r/ucontext.h b/include/asm-m32r/ucontext.h index 2de709a5c53c..09324741eec3 100644 --- a/include/asm-m32r/ucontext.h +++ b/include/asm-m32r/ucontext.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_UCONTEXT_H | 1 | #ifndef _ASM_M32R_UCONTEXT_H |
2 | #define _ASM_M32R_UCONTEXT_H | 2 | #define _ASM_M32R_UCONTEXT_H |
3 | 3 | ||
4 | /* orig : i386 2.4.18 */ | ||
5 | |||
6 | struct ucontext { | 4 | struct ucontext { |
7 | unsigned long uc_flags; | 5 | unsigned long uc_flags; |
8 | struct ucontext *uc_link; | 6 | struct ucontext *uc_link; |
diff --git a/include/asm-m32r/unaligned.h b/include/asm-m32r/unaligned.h index 3aef9ac8d3aa..fccc180c3913 100644 --- a/include/asm-m32r/unaligned.h +++ b/include/asm-m32r/unaligned.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_UNALIGNED_H | 1 | #ifndef _ASM_M32R_UNALIGNED_H |
2 | #define _ASM_M32R_UNALIGNED_H | 2 | #define _ASM_M32R_UNALIGNED_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* orig : generic 2.4.18 */ | ||
7 | |||
8 | /* | 4 | /* |
9 | * For the benefit of those who are trying to port Linux to another | 5 | * For the benefit of those who are trying to port Linux to another |
10 | * architecture, here are some C-language equivalents. | 6 | * architecture, here are some C-language equivalents. |
@@ -12,7 +8,6 @@ | |||
12 | 8 | ||
13 | #include <asm/string.h> | 9 | #include <asm/string.h> |
14 | 10 | ||
15 | |||
16 | #define get_unaligned(ptr) \ | 11 | #define get_unaligned(ptr) \ |
17 | ({ __typeof__(*(ptr)) __tmp; memmove(&__tmp, (ptr), sizeof(*(ptr))); __tmp; }) | 12 | ({ __typeof__(*(ptr)) __tmp; memmove(&__tmp, (ptr), sizeof(*(ptr))); __tmp; }) |
18 | 13 | ||
@@ -21,5 +16,4 @@ | |||
21 | memmove((ptr), &__tmp, sizeof(*(ptr))); \ | 16 | memmove((ptr), &__tmp, sizeof(*(ptr))); \ |
22 | (void)0; }) | 17 | (void)0; }) |
23 | 18 | ||
24 | 19 | #endif /* _ASM_M32R_UNALIGNED_H */ | |
25 | #endif /* _ASM_M32R_UNALIGNED_H */ | ||
diff --git a/include/asm-m32r/unistd.h b/include/asm-m32r/unistd.h index 5b66bd3c6ed6..cbbd53762ea6 100644 --- a/include/asm-m32r/unistd.h +++ b/include/asm-m32r/unistd.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_UNISTD_H | 1 | #ifndef _ASM_M32R_UNISTD_H |
2 | #define _ASM_M32R_UNISTD_H | 2 | #define _ASM_M32R_UNISTD_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* | 4 | /* |
7 | * This file contains the system call numbers. | 5 | * This file contains the system call numbers. |
8 | */ | 6 | */ |
diff --git a/include/asm-m32r/user.h b/include/asm-m32r/user.h index 1ad4ded8483b..035258d713d0 100644 --- a/include/asm-m32r/user.h +++ b/include/asm-m32r/user.h | |||
@@ -1,12 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_USER_H | 1 | #ifndef _ASM_M32R_USER_H |
2 | #define _ASM_M32R_USER_H | 2 | #define _ASM_M32R_USER_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* orig : sh 2.4.18 | ||
7 | * mod : remove fpu registers | ||
8 | */ | ||
9 | |||
10 | #include <linux/types.h> | 4 | #include <linux/types.h> |
11 | #include <asm/ptrace.h> | 5 | #include <asm/ptrace.h> |
12 | #include <asm/page.h> | 6 | #include <asm/page.h> |
diff --git a/include/asm-m32r/vga.h b/include/asm-m32r/vga.h index 533163447cc9..a1b63061c06f 100644 --- a/include/asm-m32r/vga.h +++ b/include/asm-m32r/vga.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_VGA_H | 1 | #ifndef _ASM_M32R_VGA_H |
2 | #define _ASM_M32R_VGA_H | 2 | #define _ASM_M32R_VGA_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | /* | 4 | /* |
7 | * Access to VGA videoram | 5 | * Access to VGA videoram |
8 | * | 6 | * |
@@ -19,4 +17,4 @@ | |||
19 | #define vga_readb(x) (*(x)) | 17 | #define vga_readb(x) (*(x)) |
20 | #define vga_writeb(x,y) (*(y) = (x)) | 18 | #define vga_writeb(x,y) (*(y) = (x)) |
21 | 19 | ||
22 | #endif /* _ASM_M32R_VGA_H */ | 20 | #endif /* _ASM_M32R_VGA_H */ |
diff --git a/include/asm-m32r/xor.h b/include/asm-m32r/xor.h index fd960dc9bf76..6d525259df3e 100644 --- a/include/asm-m32r/xor.h +++ b/include/asm-m32r/xor.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_M32R_XOR_H | 1 | #ifndef _ASM_M32R_XOR_H |
2 | #define _ASM_M32R_XOR_H | 2 | #define _ASM_M32R_XOR_H |
3 | 3 | ||
4 | /* $Id$ */ | ||
5 | |||
6 | #include <asm-generic/xor.h> | 4 | #include <asm-generic/xor.h> |
7 | 5 | ||
8 | #endif /* _ASM_M32R_XOR_H */ | 6 | #endif /* _ASM_M32R_XOR_H */ |
diff --git a/include/asm-m68k/math-emu.h b/include/asm-m68k/math-emu.h index 7ac6259b68df..ddfab96403cb 100644 --- a/include/asm-m68k/math-emu.h +++ b/include/asm-m68k/math-emu.h | |||
@@ -226,6 +226,21 @@ extern unsigned int fp_debugprint; | |||
226 | .previous | 226 | .previous |
227 | .endm | 227 | .endm |
228 | 228 | ||
229 | /* work around binutils idiocy */ | ||
230 | old_gas=-1 | ||
231 | .irp gas_ident.x .x | ||
232 | old_gas=old_gas+1 | ||
233 | .endr | ||
234 | .if !old_gas | ||
235 | .irp m b,w,l | ||
236 | .macro getuser.\m src,dest,label,addr | ||
237 | getuser .\m,\src,\dest,\label,\addr | ||
238 | .endm | ||
239 | .macro putuser.\m src,dest,label,addr | ||
240 | putuser .\m,\src,\dest,\label,\addr | ||
241 | .endm | ||
242 | .endr | ||
243 | .endif | ||
229 | 244 | ||
230 | .macro movestack nr,arg1,arg2,arg3,arg4,arg5 | 245 | .macro movestack nr,arg1,arg2,arg3,arg4,arg5 |
231 | .if \nr | 246 | .if \nr |
diff --git a/include/asm-m68k/termios.h b/include/asm-m68k/termios.h index 857f0c9a9120..00edabd76168 100644 --- a/include/asm-m68k/termios.h +++ b/include/asm-m68k/termios.h | |||
@@ -49,24 +49,6 @@ struct termio { | |||
49 | 49 | ||
50 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 50 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
51 | 51 | ||
52 | /* line disciplines */ | ||
53 | #define N_TTY 0 | ||
54 | #define N_SLIP 1 | ||
55 | #define N_MOUSE 2 | ||
56 | #define N_PPP 3 | ||
57 | #define N_STRIP 4 | ||
58 | #define N_AX25 5 | ||
59 | #define N_X25 6 /* X.25 async */ | ||
60 | #define N_6PACK 7 | ||
61 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
62 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
63 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
64 | #define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ | ||
65 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
66 | #define N_HDLC 13 /* synchronous HDLC */ | ||
67 | #define N_SYNC_PPP 14 | ||
68 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
69 | |||
70 | #ifdef __KERNEL__ | 52 | #ifdef __KERNEL__ |
71 | 53 | ||
72 | /* | 54 | /* |
diff --git a/include/asm-m68k/user.h b/include/asm-m68k/user.h index d7c0b109bd45..8c56ccab4849 100644 --- a/include/asm-m68k/user.h +++ b/include/asm-m68k/user.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _M68K_USER_H | 1 | #ifndef _M68K_USER_H |
2 | #define _M68K_USER_H | 2 | #define _M68K_USER_H |
3 | 3 | ||
4 | #include <asm/page.h> | ||
5 | |||
6 | /* Core file format: The core file is written in such a way that gdb | 4 | /* Core file format: The core file is written in such a way that gdb |
7 | can understand it and provide useful information to the user (under | 5 | can understand it and provide useful information to the user (under |
8 | linux we use the 'trad-core' bfd). There are quite a number of | 6 | linux we use the 'trad-core' bfd). There are quite a number of |
diff --git a/include/asm-mips/abi.h b/include/asm-mips/abi.h index 1ce0518ace2e..1dd74fbdc09b 100644 --- a/include/asm-mips/abi.h +++ b/include/asm-mips/abi.h | |||
@@ -13,13 +13,13 @@ | |||
13 | #include <asm/siginfo.h> | 13 | #include <asm/siginfo.h> |
14 | 14 | ||
15 | struct mips_abi { | 15 | struct mips_abi { |
16 | void (* const do_signal)(struct pt_regs *regs); | ||
17 | int (* const setup_frame)(struct k_sigaction * ka, | 16 | int (* const setup_frame)(struct k_sigaction * ka, |
18 | struct pt_regs *regs, int signr, | 17 | struct pt_regs *regs, int signr, |
19 | sigset_t *set); | 18 | sigset_t *set); |
20 | int (* const setup_rt_frame)(struct k_sigaction * ka, | 19 | int (* const setup_rt_frame)(struct k_sigaction * ka, |
21 | struct pt_regs *regs, int signr, | 20 | struct pt_regs *regs, int signr, |
22 | sigset_t *set, siginfo_t *info); | 21 | sigset_t *set, siginfo_t *info); |
22 | const unsigned long restart; | ||
23 | }; | 23 | }; |
24 | 24 | ||
25 | #endif /* _ASM_ABI_H */ | 25 | #endif /* _ASM_ABI_H */ |
diff --git a/include/asm-mips/atomic.h b/include/asm-mips/atomic.h index c1a2409bb52a..8578869a8bcf 100644 --- a/include/asm-mips/atomic.h +++ b/include/asm-mips/atomic.h | |||
@@ -69,7 +69,10 @@ static __inline__ void atomic_add(int i, atomic_t * v) | |||
69 | "1: ll %0, %1 # atomic_add \n" | 69 | "1: ll %0, %1 # atomic_add \n" |
70 | " addu %0, %2 \n" | 70 | " addu %0, %2 \n" |
71 | " sc %0, %1 \n" | 71 | " sc %0, %1 \n" |
72 | " beqz %0, 1b \n" | 72 | " beqz %0, 2f \n" |
73 | " .subsection 2 \n" | ||
74 | "2: b 1b \n" | ||
75 | " .previous \n" | ||
73 | " .set mips0 \n" | 76 | " .set mips0 \n" |
74 | : "=&r" (temp), "=m" (v->counter) | 77 | : "=&r" (temp), "=m" (v->counter) |
75 | : "Ir" (i), "m" (v->counter)); | 78 | : "Ir" (i), "m" (v->counter)); |
@@ -111,7 +114,10 @@ static __inline__ void atomic_sub(int i, atomic_t * v) | |||
111 | "1: ll %0, %1 # atomic_sub \n" | 114 | "1: ll %0, %1 # atomic_sub \n" |
112 | " subu %0, %2 \n" | 115 | " subu %0, %2 \n" |
113 | " sc %0, %1 \n" | 116 | " sc %0, %1 \n" |
114 | " beqz %0, 1b \n" | 117 | " beqz %0, 2f \n" |
118 | " .subsection 2 \n" | ||
119 | "2: b 1b \n" | ||
120 | " .previous \n" | ||
115 | " .set mips0 \n" | 121 | " .set mips0 \n" |
116 | : "=&r" (temp), "=m" (v->counter) | 122 | : "=&r" (temp), "=m" (v->counter) |
117 | : "Ir" (i), "m" (v->counter)); | 123 | : "Ir" (i), "m" (v->counter)); |
@@ -155,8 +161,11 @@ static __inline__ int atomic_add_return(int i, atomic_t * v) | |||
155 | "1: ll %1, %2 # atomic_add_return \n" | 161 | "1: ll %1, %2 # atomic_add_return \n" |
156 | " addu %0, %1, %3 \n" | 162 | " addu %0, %1, %3 \n" |
157 | " sc %0, %2 \n" | 163 | " sc %0, %2 \n" |
158 | " beqz %0, 1b \n" | 164 | " beqz %0, 2f \n" |
159 | " addu %0, %1, %3 \n" | 165 | " addu %0, %1, %3 \n" |
166 | " .subsection 2 \n" | ||
167 | "2: b 1b \n" | ||
168 | " .previous \n" | ||
160 | " .set mips0 \n" | 169 | " .set mips0 \n" |
161 | : "=&r" (result), "=&r" (temp), "=m" (v->counter) | 170 | : "=&r" (result), "=&r" (temp), "=m" (v->counter) |
162 | : "Ir" (i), "m" (v->counter) | 171 | : "Ir" (i), "m" (v->counter) |
@@ -204,8 +213,11 @@ static __inline__ int atomic_sub_return(int i, atomic_t * v) | |||
204 | "1: ll %1, %2 # atomic_sub_return \n" | 213 | "1: ll %1, %2 # atomic_sub_return \n" |
205 | " subu %0, %1, %3 \n" | 214 | " subu %0, %1, %3 \n" |
206 | " sc %0, %2 \n" | 215 | " sc %0, %2 \n" |
207 | " beqz %0, 1b \n" | 216 | " beqz %0, 2f \n" |
208 | " subu %0, %1, %3 \n" | 217 | " subu %0, %1, %3 \n" |
218 | " .subsection 2 \n" | ||
219 | "2: b 1b \n" | ||
220 | " .previous \n" | ||
209 | " .set mips0 \n" | 221 | " .set mips0 \n" |
210 | : "=&r" (result), "=&r" (temp), "=m" (v->counter) | 222 | : "=&r" (result), "=&r" (temp), "=m" (v->counter) |
211 | : "Ir" (i), "m" (v->counter) | 223 | : "Ir" (i), "m" (v->counter) |
@@ -267,10 +279,13 @@ static __inline__ int atomic_sub_if_positive(int i, atomic_t * v) | |||
267 | " bltz %0, 1f \n" | 279 | " bltz %0, 1f \n" |
268 | " sc %0, %2 \n" | 280 | " sc %0, %2 \n" |
269 | " .set noreorder \n" | 281 | " .set noreorder \n" |
270 | " beqz %0, 1b \n" | 282 | " beqz %0, 2f \n" |
271 | " subu %0, %1, %3 \n" | 283 | " subu %0, %1, %3 \n" |
272 | " .set reorder \n" | 284 | " .set reorder \n" |
273 | "1: \n" | 285 | "1: \n" |
286 | " .subsection 2 \n" | ||
287 | "2: b 1b \n" | ||
288 | " .previous \n" | ||
274 | " .set mips0 \n" | 289 | " .set mips0 \n" |
275 | : "=&r" (result), "=&r" (temp), "=m" (v->counter) | 290 | : "=&r" (result), "=&r" (temp), "=m" (v->counter) |
276 | : "Ir" (i), "m" (v->counter) | 291 | : "Ir" (i), "m" (v->counter) |
@@ -429,7 +444,10 @@ static __inline__ void atomic64_add(long i, atomic64_t * v) | |||
429 | "1: lld %0, %1 # atomic64_add \n" | 444 | "1: lld %0, %1 # atomic64_add \n" |
430 | " addu %0, %2 \n" | 445 | " addu %0, %2 \n" |
431 | " scd %0, %1 \n" | 446 | " scd %0, %1 \n" |
432 | " beqz %0, 1b \n" | 447 | " beqz %0, 2f \n" |
448 | " .subsection 2 \n" | ||
449 | "2: b 1b \n" | ||
450 | " .previous \n" | ||
433 | " .set mips0 \n" | 451 | " .set mips0 \n" |
434 | : "=&r" (temp), "=m" (v->counter) | 452 | : "=&r" (temp), "=m" (v->counter) |
435 | : "Ir" (i), "m" (v->counter)); | 453 | : "Ir" (i), "m" (v->counter)); |
@@ -471,7 +489,10 @@ static __inline__ void atomic64_sub(long i, atomic64_t * v) | |||
471 | "1: lld %0, %1 # atomic64_sub \n" | 489 | "1: lld %0, %1 # atomic64_sub \n" |
472 | " subu %0, %2 \n" | 490 | " subu %0, %2 \n" |
473 | " scd %0, %1 \n" | 491 | " scd %0, %1 \n" |
474 | " beqz %0, 1b \n" | 492 | " beqz %0, 2f \n" |
493 | " .subsection 2 \n" | ||
494 | "2: b 1b \n" | ||
495 | " .previous \n" | ||
475 | " .set mips0 \n" | 496 | " .set mips0 \n" |
476 | : "=&r" (temp), "=m" (v->counter) | 497 | : "=&r" (temp), "=m" (v->counter) |
477 | : "Ir" (i), "m" (v->counter)); | 498 | : "Ir" (i), "m" (v->counter)); |
@@ -515,8 +536,11 @@ static __inline__ long atomic64_add_return(long i, atomic64_t * v) | |||
515 | "1: lld %1, %2 # atomic64_add_return \n" | 536 | "1: lld %1, %2 # atomic64_add_return \n" |
516 | " addu %0, %1, %3 \n" | 537 | " addu %0, %1, %3 \n" |
517 | " scd %0, %2 \n" | 538 | " scd %0, %2 \n" |
518 | " beqz %0, 1b \n" | 539 | " beqz %0, 2f \n" |
519 | " addu %0, %1, %3 \n" | 540 | " addu %0, %1, %3 \n" |
541 | " .subsection 2 \n" | ||
542 | "2: b 1b \n" | ||
543 | " .previous \n" | ||
520 | " .set mips0 \n" | 544 | " .set mips0 \n" |
521 | : "=&r" (result), "=&r" (temp), "=m" (v->counter) | 545 | : "=&r" (result), "=&r" (temp), "=m" (v->counter) |
522 | : "Ir" (i), "m" (v->counter) | 546 | : "Ir" (i), "m" (v->counter) |
@@ -564,8 +588,11 @@ static __inline__ long atomic64_sub_return(long i, atomic64_t * v) | |||
564 | "1: lld %1, %2 # atomic64_sub_return \n" | 588 | "1: lld %1, %2 # atomic64_sub_return \n" |
565 | " subu %0, %1, %3 \n" | 589 | " subu %0, %1, %3 \n" |
566 | " scd %0, %2 \n" | 590 | " scd %0, %2 \n" |
567 | " beqz %0, 1b \n" | 591 | " beqz %0, 2f \n" |
568 | " subu %0, %1, %3 \n" | 592 | " subu %0, %1, %3 \n" |
593 | " .subsection 2 \n" | ||
594 | "2: b 1b \n" | ||
595 | " .previous \n" | ||
569 | " .set mips0 \n" | 596 | " .set mips0 \n" |
570 | : "=&r" (result), "=&r" (temp), "=m" (v->counter) | 597 | : "=&r" (result), "=&r" (temp), "=m" (v->counter) |
571 | : "Ir" (i), "m" (v->counter) | 598 | : "Ir" (i), "m" (v->counter) |
@@ -627,10 +654,13 @@ static __inline__ long atomic64_sub_if_positive(long i, atomic64_t * v) | |||
627 | " bltz %0, 1f \n" | 654 | " bltz %0, 1f \n" |
628 | " scd %0, %2 \n" | 655 | " scd %0, %2 \n" |
629 | " .set noreorder \n" | 656 | " .set noreorder \n" |
630 | " beqz %0, 1b \n" | 657 | " beqz %0, 2f \n" |
631 | " dsubu %0, %1, %3 \n" | 658 | " dsubu %0, %1, %3 \n" |
632 | " .set reorder \n" | 659 | " .set reorder \n" |
633 | "1: \n" | 660 | "1: \n" |
661 | " .subsection 2 \n" | ||
662 | "2: b 1b \n" | ||
663 | " .previous \n" | ||
634 | " .set mips0 \n" | 664 | " .set mips0 \n" |
635 | : "=&r" (result), "=&r" (temp), "=m" (v->counter) | 665 | : "=&r" (result), "=&r" (temp), "=m" (v->counter) |
636 | : "Ir" (i), "m" (v->counter) | 666 | : "Ir" (i), "m" (v->counter) |
diff --git a/include/asm-mips/bitops.h b/include/asm-mips/bitops.h index 06445de1324b..89436b96ad66 100644 --- a/include/asm-mips/bitops.h +++ b/include/asm-mips/bitops.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (c) 1994 - 1997, 1999, 2000, 06 Ralf Baechle (ralf@linux-mips.org) | 6 | * Copyright (c) 1994 - 1997, 99, 2000, 06, 07 Ralf Baechle (ralf@linux-mips.org) |
7 | * Copyright (c) 1999, 2000 Silicon Graphics, Inc. | 7 | * Copyright (c) 1999, 2000 Silicon Graphics, Inc. |
8 | */ | 8 | */ |
9 | #ifndef _ASM_BITOPS_H | 9 | #ifndef _ASM_BITOPS_H |
@@ -24,11 +24,15 @@ | |||
24 | #define SZLONG_MASK 31UL | 24 | #define SZLONG_MASK 31UL |
25 | #define __LL "ll " | 25 | #define __LL "ll " |
26 | #define __SC "sc " | 26 | #define __SC "sc " |
27 | #define __INS "ins " | ||
28 | #define __EXT "ext " | ||
27 | #elif (_MIPS_SZLONG == 64) | 29 | #elif (_MIPS_SZLONG == 64) |
28 | #define SZLONG_LOG 6 | 30 | #define SZLONG_LOG 6 |
29 | #define SZLONG_MASK 63UL | 31 | #define SZLONG_MASK 63UL |
30 | #define __LL "lld " | 32 | #define __LL "lld " |
31 | #define __SC "scd " | 33 | #define __SC "scd " |
34 | #define __INS "dins " | ||
35 | #define __EXT "dext " | ||
32 | #endif | 36 | #endif |
33 | 37 | ||
34 | /* | 38 | /* |
@@ -62,13 +66,29 @@ static inline void set_bit(unsigned long nr, volatile unsigned long *addr) | |||
62 | " .set mips0 \n" | 66 | " .set mips0 \n" |
63 | : "=&r" (temp), "=m" (*m) | 67 | : "=&r" (temp), "=m" (*m) |
64 | : "ir" (1UL << (nr & SZLONG_MASK)), "m" (*m)); | 68 | : "ir" (1UL << (nr & SZLONG_MASK)), "m" (*m)); |
69 | #ifdef CONFIG_CPU_MIPSR2 | ||
70 | } else if (__builtin_constant_p(nr)) { | ||
71 | __asm__ __volatile__( | ||
72 | "1: " __LL "%0, %1 # set_bit \n" | ||
73 | " " __INS "%0, %4, %2, 1 \n" | ||
74 | " " __SC "%0, %1 \n" | ||
75 | " beqz %0, 2f \n" | ||
76 | " .subsection 2 \n" | ||
77 | "2: b 1b \n" | ||
78 | " .previous \n" | ||
79 | : "=&r" (temp), "=m" (*m) | ||
80 | : "ir" (nr & SZLONG_MASK), "m" (*m), "r" (~0)); | ||
81 | #endif /* CONFIG_CPU_MIPSR2 */ | ||
65 | } else if (cpu_has_llsc) { | 82 | } else if (cpu_has_llsc) { |
66 | __asm__ __volatile__( | 83 | __asm__ __volatile__( |
67 | " .set mips3 \n" | 84 | " .set mips3 \n" |
68 | "1: " __LL "%0, %1 # set_bit \n" | 85 | "1: " __LL "%0, %1 # set_bit \n" |
69 | " or %0, %2 \n" | 86 | " or %0, %2 \n" |
70 | " " __SC "%0, %1 \n" | 87 | " " __SC "%0, %1 \n" |
71 | " beqz %0, 1b \n" | 88 | " beqz %0, 2f \n" |
89 | " .subsection 2 \n" | ||
90 | "2: b 1b \n" | ||
91 | " .previous \n" | ||
72 | " .set mips0 \n" | 92 | " .set mips0 \n" |
73 | : "=&r" (temp), "=m" (*m) | 93 | : "=&r" (temp), "=m" (*m) |
74 | : "ir" (1UL << (nr & SZLONG_MASK)), "m" (*m)); | 94 | : "ir" (1UL << (nr & SZLONG_MASK)), "m" (*m)); |
@@ -110,13 +130,29 @@ static inline void clear_bit(unsigned long nr, volatile unsigned long *addr) | |||
110 | " .set mips0 \n" | 130 | " .set mips0 \n" |
111 | : "=&r" (temp), "=m" (*m) | 131 | : "=&r" (temp), "=m" (*m) |
112 | : "ir" (~(1UL << (nr & SZLONG_MASK))), "m" (*m)); | 132 | : "ir" (~(1UL << (nr & SZLONG_MASK))), "m" (*m)); |
133 | #ifdef CONFIG_CPU_MIPSR2 | ||
134 | } else if (__builtin_constant_p(nr)) { | ||
135 | __asm__ __volatile__( | ||
136 | "1: " __LL "%0, %1 # clear_bit \n" | ||
137 | " " __INS "%0, $0, %2, 1 \n" | ||
138 | " " __SC "%0, %1 \n" | ||
139 | " beqz %0, 2f \n" | ||
140 | " .subsection 2 \n" | ||
141 | "2: b 1b \n" | ||
142 | " .previous \n" | ||
143 | : "=&r" (temp), "=m" (*m) | ||
144 | : "ir" (nr & SZLONG_MASK), "m" (*m)); | ||
145 | #endif /* CONFIG_CPU_MIPSR2 */ | ||
113 | } else if (cpu_has_llsc) { | 146 | } else if (cpu_has_llsc) { |
114 | __asm__ __volatile__( | 147 | __asm__ __volatile__( |
115 | " .set mips3 \n" | 148 | " .set mips3 \n" |
116 | "1: " __LL "%0, %1 # clear_bit \n" | 149 | "1: " __LL "%0, %1 # clear_bit \n" |
117 | " and %0, %2 \n" | 150 | " and %0, %2 \n" |
118 | " " __SC "%0, %1 \n" | 151 | " " __SC "%0, %1 \n" |
119 | " beqz %0, 1b \n" | 152 | " beqz %0, 2f \n" |
153 | " .subsection 2 \n" | ||
154 | "2: b 1b \n" | ||
155 | " .previous \n" | ||
120 | " .set mips0 \n" | 156 | " .set mips0 \n" |
121 | : "=&r" (temp), "=m" (*m) | 157 | : "=&r" (temp), "=m" (*m) |
122 | : "ir" (~(1UL << (nr & SZLONG_MASK))), "m" (*m)); | 158 | : "ir" (~(1UL << (nr & SZLONG_MASK))), "m" (*m)); |
@@ -166,7 +202,10 @@ static inline void change_bit(unsigned long nr, volatile unsigned long *addr) | |||
166 | "1: " __LL "%0, %1 # change_bit \n" | 202 | "1: " __LL "%0, %1 # change_bit \n" |
167 | " xor %0, %2 \n" | 203 | " xor %0, %2 \n" |
168 | " " __SC "%0, %1 \n" | 204 | " " __SC "%0, %1 \n" |
169 | " beqz %0, 1b \n" | 205 | " beqz %0, 2f \n" |
206 | " .subsection 2 \n" | ||
207 | "2: b 1b \n" | ||
208 | " .previous \n" | ||
170 | " .set mips0 \n" | 209 | " .set mips0 \n" |
171 | : "=&r" (temp), "=m" (*m) | 210 | : "=&r" (temp), "=m" (*m) |
172 | : "ir" (1UL << (nr & SZLONG_MASK)), "m" (*m)); | 211 | : "ir" (1UL << (nr & SZLONG_MASK)), "m" (*m)); |
@@ -222,8 +261,12 @@ static inline int test_and_set_bit(unsigned long nr, | |||
222 | "1: " __LL "%0, %1 # test_and_set_bit \n" | 261 | "1: " __LL "%0, %1 # test_and_set_bit \n" |
223 | " or %2, %0, %3 \n" | 262 | " or %2, %0, %3 \n" |
224 | " " __SC "%2, %1 \n" | 263 | " " __SC "%2, %1 \n" |
225 | " beqz %2, 1b \n" | 264 | " beqz %2, 2f \n" |
226 | " and %2, %0, %3 \n" | 265 | " and %2, %0, %3 \n" |
266 | " .subsection 2 \n" | ||
267 | "2: b 1b \n" | ||
268 | " nop \n" | ||
269 | " .previous \n" | ||
227 | " .set pop \n" | 270 | " .set pop \n" |
228 | : "=&r" (temp), "=m" (*m), "=&r" (res) | 271 | : "=&r" (temp), "=m" (*m), "=&r" (res) |
229 | : "r" (1UL << (nr & SZLONG_MASK)), "m" (*m) | 272 | : "r" (1UL << (nr & SZLONG_MASK)), "m" (*m) |
@@ -278,6 +321,26 @@ static inline int test_and_clear_bit(unsigned long nr, | |||
278 | : "memory"); | 321 | : "memory"); |
279 | 322 | ||
280 | return res != 0; | 323 | return res != 0; |
324 | #ifdef CONFIG_CPU_MIPSR2 | ||
325 | } else if (__builtin_constant_p(nr)) { | ||
326 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); | ||
327 | unsigned long temp, res; | ||
328 | |||
329 | __asm__ __volatile__( | ||
330 | "1: " __LL "%0, %1 # test_and_clear_bit \n" | ||
331 | " " __EXT "%2, %0, %3, 1 \n" | ||
332 | " " __INS "%0, $0, %3, 1 \n" | ||
333 | " " __SC "%0, %1 \n" | ||
334 | " beqz %0, 2f \n" | ||
335 | " .subsection 2 \n" | ||
336 | "2: b 1b \n" | ||
337 | " .previous \n" | ||
338 | : "=&r" (temp), "=m" (*m), "=&r" (res) | ||
339 | : "ri" (nr & SZLONG_MASK), "m" (*m) | ||
340 | : "memory"); | ||
341 | |||
342 | return res; | ||
343 | #endif | ||
281 | } else if (cpu_has_llsc) { | 344 | } else if (cpu_has_llsc) { |
282 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); | 345 | unsigned long *m = ((unsigned long *) addr) + (nr >> SZLONG_LOG); |
283 | unsigned long temp, res; | 346 | unsigned long temp, res; |
@@ -290,8 +353,12 @@ static inline int test_and_clear_bit(unsigned long nr, | |||
290 | " or %2, %0, %3 \n" | 353 | " or %2, %0, %3 \n" |
291 | " xor %2, %3 \n" | 354 | " xor %2, %3 \n" |
292 | " " __SC "%2, %1 \n" | 355 | " " __SC "%2, %1 \n" |
293 | " beqz %2, 1b \n" | 356 | " beqz %2, 2f \n" |
294 | " and %2, %0, %3 \n" | 357 | " and %2, %0, %3 \n" |
358 | " .subsection 2 \n" | ||
359 | "2: b 1b \n" | ||
360 | " nop \n" | ||
361 | " .previous \n" | ||
295 | " .set pop \n" | 362 | " .set pop \n" |
296 | : "=&r" (temp), "=m" (*m), "=&r" (res) | 363 | : "=&r" (temp), "=m" (*m), "=&r" (res) |
297 | : "r" (1UL << (nr & SZLONG_MASK)), "m" (*m) | 364 | : "r" (1UL << (nr & SZLONG_MASK)), "m" (*m) |
@@ -356,8 +423,12 @@ static inline int test_and_change_bit(unsigned long nr, | |||
356 | "1: " __LL "%0, %1 # test_and_change_bit \n" | 423 | "1: " __LL "%0, %1 # test_and_change_bit \n" |
357 | " xor %2, %0, %3 \n" | 424 | " xor %2, %0, %3 \n" |
358 | " " __SC "\t%2, %1 \n" | 425 | " " __SC "\t%2, %1 \n" |
359 | " beqz %2, 1b \n" | 426 | " beqz %2, 2f \n" |
360 | " and %2, %0, %3 \n" | 427 | " and %2, %0, %3 \n" |
428 | " .subsection 2 \n" | ||
429 | "2: b 1b \n" | ||
430 | " nop \n" | ||
431 | " .previous \n" | ||
361 | " .set pop \n" | 432 | " .set pop \n" |
362 | : "=&r" (temp), "=m" (*m), "=&r" (res) | 433 | : "=&r" (temp), "=m" (*m), "=&r" (res) |
363 | : "r" (1UL << (nr & SZLONG_MASK)), "m" (*m) | 434 | : "r" (1UL << (nr & SZLONG_MASK)), "m" (*m) |
diff --git a/include/asm-mips/compat-signal.h b/include/asm-mips/compat-signal.h new file mode 100644 index 000000000000..6599a901b63e --- /dev/null +++ b/include/asm-mips/compat-signal.h | |||
@@ -0,0 +1,57 @@ | |||
1 | #ifndef __ASM_COMPAT_SIGNAL_H | ||
2 | #define __ASM_COMPAT_SIGNAL_H | ||
3 | |||
4 | #include <linux/bug.h> | ||
5 | #include <linux/compat.h> | ||
6 | #include <linux/compiler.h> | ||
7 | |||
8 | #include <asm/signal.h> | ||
9 | #include <asm/siginfo.h> | ||
10 | |||
11 | #include <asm/uaccess.h> | ||
12 | |||
13 | static inline int __copy_conv_sigset_to_user(compat_sigset_t __user *d, | ||
14 | const sigset_t *s) | ||
15 | { | ||
16 | int err; | ||
17 | |||
18 | BUG_ON(sizeof(*d) != sizeof(*s)); | ||
19 | BUG_ON(_NSIG_WORDS != 2); | ||
20 | |||
21 | err = __put_user(s->sig[0], &d->sig[0]); | ||
22 | err |= __put_user(s->sig[0] >> 32, &d->sig[1]); | ||
23 | err |= __put_user(s->sig[1], &d->sig[2]); | ||
24 | err |= __put_user(s->sig[1] >> 32, &d->sig[3]); | ||
25 | |||
26 | return err; | ||
27 | } | ||
28 | |||
29 | static inline int __copy_conv_sigset_from_user(sigset_t *d, | ||
30 | const compat_sigset_t __user *s) | ||
31 | { | ||
32 | int err; | ||
33 | union sigset_u { | ||
34 | sigset_t s; | ||
35 | compat_sigset_t c; | ||
36 | } *u = (union sigset_u *) d; | ||
37 | |||
38 | BUG_ON(sizeof(*d) != sizeof(*s)); | ||
39 | BUG_ON(_NSIG_WORDS != 2); | ||
40 | |||
41 | #ifdef CONFIG_CPU_BIG_ENDIAN | ||
42 | err = __get_user(u->c.sig[1], &s->sig[0]); | ||
43 | err |= __get_user(u->c.sig[0], &s->sig[1]); | ||
44 | err |= __get_user(u->c.sig[3], &s->sig[2]); | ||
45 | err |= __get_user(u->c.sig[2], &s->sig[3]); | ||
46 | #endif | ||
47 | #ifdef CONFIG_CPU_LITTLE_ENDIAN | ||
48 | err = __get_user(u->c.sig[0], &s->sig[0]); | ||
49 | err |= __get_user(u->c.sig[1], &s->sig[1]); | ||
50 | err |= __get_user(u->c.sig[2], &s->sig[2]); | ||
51 | err |= __get_user(u->c.sig[3], &s->sig[3]); | ||
52 | #endif | ||
53 | |||
54 | return err; | ||
55 | } | ||
56 | |||
57 | #endif /* __ASM_COMPAT_SIGNAL_H */ | ||
diff --git a/include/asm-mips/dma-mapping.h b/include/asm-mips/dma-mapping.h index 236d1a467cc7..230b3f1b69b1 100644 --- a/include/asm-mips/dma-mapping.h +++ b/include/asm-mips/dma-mapping.h | |||
@@ -68,6 +68,7 @@ extern int dma_is_consistent(struct device *dev, dma_addr_t dma_addr); | |||
68 | extern void dma_cache_sync(struct device *dev, void *vaddr, size_t size, | 68 | extern void dma_cache_sync(struct device *dev, void *vaddr, size_t size, |
69 | enum dma_data_direction direction); | 69 | enum dma_data_direction direction); |
70 | 70 | ||
71 | #if 0 | ||
71 | #define ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY | 72 | #define ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY |
72 | 73 | ||
73 | extern int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, | 74 | extern int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, |
@@ -75,5 +76,6 @@ extern int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, | |||
75 | extern void dma_release_declared_memory(struct device *dev); | 76 | extern void dma_release_declared_memory(struct device *dev); |
76 | extern void * dma_mark_declared_memory_occupied(struct device *dev, | 77 | extern void * dma_mark_declared_memory_occupied(struct device *dev, |
77 | dma_addr_t device_addr, size_t size); | 78 | dma_addr_t device_addr, size_t size); |
79 | #endif | ||
78 | 80 | ||
79 | #endif /* _ASM_DMA_MAPPING_H */ | 81 | #endif /* _ASM_DMA_MAPPING_H */ |
diff --git a/include/asm-mips/ds1216.h b/include/asm-mips/ds1216.h new file mode 100644 index 000000000000..1ff8b73f7a6a --- /dev/null +++ b/include/asm-mips/ds1216.h | |||
@@ -0,0 +1,31 @@ | |||
1 | #ifndef _DS1216_H | ||
2 | #define _DS1216_H | ||
3 | |||
4 | extern volatile unsigned char *ds1216_base; | ||
5 | unsigned long ds1216_get_cmos_time(void); | ||
6 | int ds1216_set_rtc_mmss(unsigned long nowtime); | ||
7 | |||
8 | #define DS1216_SEC_BYTE 1 | ||
9 | #define DS1216_MIN_BYTE 2 | ||
10 | #define DS1216_HOUR_BYTE 3 | ||
11 | #define DS1216_HOUR_MASK (0x1f) | ||
12 | #define DS1216_AMPM_MASK (1<<5) | ||
13 | #define DS1216_1224_MASK (1<<7) | ||
14 | #define DS1216_DAY_BYTE 4 | ||
15 | #define DS1216_DAY_MASK (0x7) | ||
16 | #define DS1216_DATE_BYTE 5 | ||
17 | #define DS1216_DATE_MASK (0x3f) | ||
18 | #define DS1216_MONTH_BYTE 6 | ||
19 | #define DS1216_MONTH_MASK (0x1f) | ||
20 | #define DS1216_YEAR_BYTE 7 | ||
21 | |||
22 | #define DS1216_SEC(buf) (buf[DS1216_SEC_BYTE]) | ||
23 | #define DS1216_MIN(buf) (buf[DS1216_MIN_BYTE]) | ||
24 | #define DS1216_HOUR(buf) (buf[DS1216_HOUR_BYTE] & DS1216_HOUR_MASK) | ||
25 | #define DS1216_AMPM(buf) (buf[DS1216_HOUR_BYTE] & DS1216_AMPM_MASK) | ||
26 | #define DS1216_1224(buf) (buf[DS1216_HOUR_BYTE] & DS1216_1224_MASK) | ||
27 | #define DS1216_DATE(buf) (buf[DS1216_DATE_BYTE] & DS1216_DATE_MASK) | ||
28 | #define DS1216_MONTH(buf) (buf[DS1216_MONTH_BYTE] & DS1216_MONTH_MASK) | ||
29 | #define DS1216_YEAR(buf) (buf[DS1216_YEAR_BYTE]) | ||
30 | |||
31 | #endif | ||
diff --git a/include/asm-mips/io.h b/include/asm-mips/io.h index b6a2eb816628..92ec2618560c 100644 --- a/include/asm-mips/io.h +++ b/include/asm-mips/io.h | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <asm/byteorder.h> | 20 | #include <asm/byteorder.h> |
21 | #include <asm/cpu.h> | 21 | #include <asm/cpu.h> |
22 | #include <asm/cpu-features.h> | 22 | #include <asm/cpu-features.h> |
23 | #include <asm-generic/iomap.h> | ||
23 | #include <asm/page.h> | 24 | #include <asm/page.h> |
24 | #include <asm/pgtable-bits.h> | 25 | #include <asm/pgtable-bits.h> |
25 | #include <asm/processor.h> | 26 | #include <asm/processor.h> |
@@ -518,34 +519,6 @@ static inline void memcpy_toio(volatile void __iomem *dst, const void *src, int | |||
518 | } | 519 | } |
519 | 520 | ||
520 | /* | 521 | /* |
521 | * Memory Mapped I/O | ||
522 | */ | ||
523 | #define ioread8(addr) readb(addr) | ||
524 | #define ioread16(addr) readw(addr) | ||
525 | #define ioread32(addr) readl(addr) | ||
526 | |||
527 | #define iowrite8(b,addr) writeb(b,addr) | ||
528 | #define iowrite16(w,addr) writew(w,addr) | ||
529 | #define iowrite32(l,addr) writel(l,addr) | ||
530 | |||
531 | #define ioread8_rep(a,b,c) readsb(a,b,c) | ||
532 | #define ioread16_rep(a,b,c) readsw(a,b,c) | ||
533 | #define ioread32_rep(a,b,c) readsl(a,b,c) | ||
534 | |||
535 | #define iowrite8_rep(a,b,c) writesb(a,b,c) | ||
536 | #define iowrite16_rep(a,b,c) writesw(a,b,c) | ||
537 | #define iowrite32_rep(a,b,c) writesl(a,b,c) | ||
538 | |||
539 | /* Create a virtual mapping cookie for an IO port range */ | ||
540 | extern void __iomem *ioport_map(unsigned long port, unsigned int nr); | ||
541 | extern void ioport_unmap(void __iomem *); | ||
542 | |||
543 | /* Create a virtual mapping cookie for a PCI BAR (memory or IO) */ | ||
544 | struct pci_dev; | ||
545 | extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max); | ||
546 | extern void pci_iounmap(struct pci_dev *dev, void __iomem *); | ||
547 | |||
548 | /* | ||
549 | * ISA space is 'always mapped' on currently supported MIPS systems, no need | 522 | * ISA space is 'always mapped' on currently supported MIPS systems, no need |
550 | * to explicitly ioremap() it. The fact that the ISA IO space is mapped | 523 | * to explicitly ioremap() it. The fact that the ISA IO space is mapped |
551 | * to PAGE_OFFSET is pure coincidence - it does not mean ISA values | 524 | * to PAGE_OFFSET is pure coincidence - it does not mean ISA values |
diff --git a/include/asm-mips/mach-generic/dma-coherence.h b/include/asm-mips/mach-generic/dma-coherence.h new file mode 100644 index 000000000000..df71822fd27b --- /dev/null +++ b/include/asm-mips/mach-generic/dma-coherence.h | |||
@@ -0,0 +1,43 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2006 Ralf Baechle <ralf@linux-mips.org> | ||
7 | * | ||
8 | */ | ||
9 | #ifndef __ASM_MACH_GENERIC_DMA_COHERENCE_H | ||
10 | #define __ASM_MACH_GENERIC_DMA_COHERENCE_H | ||
11 | |||
12 | struct device; | ||
13 | |||
14 | static dma_addr_t plat_map_dma_mem(struct device *dev, void *addr, size_t size) | ||
15 | { | ||
16 | return virt_to_phys(addr); | ||
17 | } | ||
18 | |||
19 | static dma_addr_t plat_map_dma_mem_page(struct device *dev, struct page *page) | ||
20 | { | ||
21 | return page_to_phys(page); | ||
22 | } | ||
23 | |||
24 | static unsigned long plat_dma_addr_to_phys(dma_addr_t dma_addr) | ||
25 | { | ||
26 | return dma_addr; | ||
27 | } | ||
28 | |||
29 | static void plat_unmap_dma_mem(dma_addr_t dma_addr) | ||
30 | { | ||
31 | } | ||
32 | |||
33 | static inline int plat_device_is_coherent(struct device *dev) | ||
34 | { | ||
35 | #ifdef CONFIG_DMA_COHERENT | ||
36 | return 1; | ||
37 | #endif | ||
38 | #ifdef CONFIG_DMA_NONCOHERENT | ||
39 | return 0; | ||
40 | #endif | ||
41 | } | ||
42 | |||
43 | #endif /* __ASM_MACH_GENERIC_DMA_COHERENCE_H */ | ||
diff --git a/include/asm-mips/mach-generic/kmalloc.h b/include/asm-mips/mach-generic/kmalloc.h index 410ab5f6c563..b8e6deba352f 100644 --- a/include/asm-mips/mach-generic/kmalloc.h +++ b/include/asm-mips/mach-generic/kmalloc.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #ifndef CONFIG_DMA_COHERENT | 5 | #ifndef CONFIG_DMA_COHERENT |
6 | /* | 6 | /* |
7 | * Total overkill for most systems but need as a safe default. | 7 | * Total overkill for most systems but need as a safe default. |
8 | * Set this one if any device in the system might do non-coherent DMA. | ||
8 | */ | 9 | */ |
9 | #define ARCH_KMALLOC_MINALIGN 128 | 10 | #define ARCH_KMALLOC_MINALIGN 128 |
10 | #endif | 11 | #endif |
diff --git a/include/asm-mips/mach-ip27/dma-coherence.h b/include/asm-mips/mach-ip27/dma-coherence.h new file mode 100644 index 000000000000..659816e200d4 --- /dev/null +++ b/include/asm-mips/mach-ip27/dma-coherence.h | |||
@@ -0,0 +1,49 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2006 Ralf Baechle <ralf@linux-mips.org> | ||
7 | * | ||
8 | */ | ||
9 | #ifndef __ASM_MACH_IP27_DMA_COHERENCE_H | ||
10 | #define __ASM_MACH_IP27_DMA_COHERENCE_H | ||
11 | |||
12 | #include <asm/pci/bridge.h> | ||
13 | |||
14 | #define pdev_to_baddr(pdev, addr) \ | ||
15 | (BRIDGE_CONTROLLER(pdev->bus)->baddr + (addr)) | ||
16 | #define dev_to_baddr(dev, addr) \ | ||
17 | pdev_to_baddr(to_pci_dev(dev), (addr)) | ||
18 | |||
19 | struct device; | ||
20 | |||
21 | static dma_addr_t plat_map_dma_mem(struct device *dev, void *addr, size_t size) | ||
22 | { | ||
23 | dma_addr_t pa = dev_to_baddr(dev, virt_to_phys(addr)); | ||
24 | |||
25 | return pa; | ||
26 | } | ||
27 | |||
28 | static dma_addr_t plat_map_dma_mem_page(struct device *dev, struct page *page) | ||
29 | { | ||
30 | dma_addr_t pa = dev_to_baddr(dev, page_to_phys(page)); | ||
31 | |||
32 | return pa; | ||
33 | } | ||
34 | |||
35 | static unsigned long plat_dma_addr_to_phys(dma_addr_t dma_addr) | ||
36 | { | ||
37 | return dma_addr & (0xffUL << 56); | ||
38 | } | ||
39 | |||
40 | static void plat_unmap_dma_mem(dma_addr_t dma_addr) | ||
41 | { | ||
42 | } | ||
43 | |||
44 | static inline int plat_device_is_coherent(struct device *dev) | ||
45 | { | ||
46 | return 1; /* IP27 non-cohernet mode is unsupported */ | ||
47 | } | ||
48 | |||
49 | #endif /* __ASM_MACH_IP27_DMA_COHERENCE_H */ | ||
diff --git a/include/asm-mips/mach-ip32/dma-coherence.h b/include/asm-mips/mach-ip32/dma-coherence.h new file mode 100644 index 000000000000..950be17bbb86 --- /dev/null +++ b/include/asm-mips/mach-ip32/dma-coherence.h | |||
@@ -0,0 +1,71 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2006 Ralf Baechle <ralf@linux-mips.org> | ||
7 | * | ||
8 | */ | ||
9 | #ifndef __ASM_MACH_IP35_DMA_COHERENCE_H | ||
10 | #define __ASM_MACH_IP35_DMA_COHERENCE_H | ||
11 | |||
12 | #include <asm/ip32/crime.h> | ||
13 | |||
14 | struct device; | ||
15 | |||
16 | /* | ||
17 | * Few notes. | ||
18 | * 1. CPU sees memory as two chunks: 0-256M@0x0, and the rest @0x40000000+256M | ||
19 | * 2. PCI sees memory as one big chunk @0x0 (or we could use 0x40000000 for | ||
20 | * native-endian) | ||
21 | * 3. All other devices see memory as one big chunk at 0x40000000 | ||
22 | * 4. Non-PCI devices will pass NULL as struct device* | ||
23 | * | ||
24 | * Thus we translate differently, depending on device. | ||
25 | */ | ||
26 | |||
27 | #define RAM_OFFSET_MASK 0x3fffffffUL | ||
28 | |||
29 | static dma_addr_t plat_map_dma_mem(struct device *dev, void *addr, size_t size) | ||
30 | { | ||
31 | dma_addr_t pa = virt_to_phys(addr) & RAM_OFFSET_MASK; | ||
32 | |||
33 | if (dev == NULL) | ||
34 | pa += CRIME_HI_MEM_BASE; | ||
35 | |||
36 | return pa; | ||
37 | } | ||
38 | |||
39 | static dma_addr_t plat_map_dma_mem_page(struct device *dev, struct page *page) | ||
40 | { | ||
41 | dma_addr_t pa; | ||
42 | |||
43 | pa = page_to_phys(page) & RAM_OFFSET_MASK; | ||
44 | |||
45 | if (dev == NULL) | ||
46 | pa += CRIME_HI_MEM_BASE; | ||
47 | |||
48 | return pa; | ||
49 | } | ||
50 | |||
51 | /* This is almost certainly wrong but it's what dma-ip32.c used to use */ | ||
52 | static unsigned long plat_dma_addr_to_phys(dma_addr_t dma_addr) | ||
53 | { | ||
54 | unsigned long addr = dma_addr & RAM_OFFSET_MASK; | ||
55 | |||
56 | if (dma_addr >= 256*1024*1024) | ||
57 | addr += CRIME_HI_MEM_BASE; | ||
58 | |||
59 | return addr; | ||
60 | } | ||
61 | |||
62 | static void plat_unmap_dma_mem(dma_addr_t dma_addr) | ||
63 | { | ||
64 | } | ||
65 | |||
66 | static inline int plat_device_is_coherent(struct device *dev) | ||
67 | { | ||
68 | return 0; /* IP32 is non-cohernet */ | ||
69 | } | ||
70 | |||
71 | #endif /* __ASM_MACH_IP35_DMA_COHERENCE_H */ | ||
diff --git a/include/asm-mips/mach-jazz/dma-coherence.h b/include/asm-mips/mach-jazz/dma-coherence.h new file mode 100644 index 000000000000..d66979a124a8 --- /dev/null +++ b/include/asm-mips/mach-jazz/dma-coherence.h | |||
@@ -0,0 +1,40 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2006 Ralf Baechle <ralf@linux-mips.org> | ||
7 | */ | ||
8 | #ifndef __ASM_MACH_JAZZ_DMA_COHERENCE_H | ||
9 | #define __ASM_MACH_JAZZ_DMA_COHERENCE_H | ||
10 | |||
11 | #include <asm/jazzdma.h> | ||
12 | |||
13 | struct device; | ||
14 | |||
15 | static dma_addr_t plat_map_dma_mem(struct device *dev, void *addr, size_t size) | ||
16 | { | ||
17 | return vdma_alloc(virt_to_phys(addr), size); | ||
18 | } | ||
19 | |||
20 | static dma_addr_t plat_map_dma_mem_page(struct device *dev, struct page *page) | ||
21 | { | ||
22 | return vdma_alloc(page_to_phys(page), PAGE_SIZE); | ||
23 | } | ||
24 | |||
25 | static unsigned long plat_dma_addr_to_phys(dma_addr_t dma_addr) | ||
26 | { | ||
27 | return vdma_log2phys(dma_addr); | ||
28 | } | ||
29 | |||
30 | static void plat_unmap_dma_mem(dma_addr_t dma_addr) | ||
31 | { | ||
32 | vdma_free(dma_addr); | ||
33 | } | ||
34 | |||
35 | static inline int plat_device_is_coherent(struct device *dev) | ||
36 | { | ||
37 | return 0; | ||
38 | } | ||
39 | |||
40 | #endif /* __ASM_MACH_JAZZ_DMA_COHERENCE_H */ | ||
diff --git a/include/asm-mips/mach-rm/cpu-feature-overrides.h b/include/asm-mips/mach-rm/cpu-feature-overrides.h index 11410ae10d36..7e07283140a3 100644 --- a/include/asm-mips/mach-rm/cpu-feature-overrides.h +++ b/include/asm-mips/mach-rm/cpu-feature-overrides.h | |||
@@ -21,9 +21,7 @@ | |||
21 | #define cpu_has_watch 0 | 21 | #define cpu_has_watch 0 |
22 | #define cpu_has_mips16 0 | 22 | #define cpu_has_mips16 0 |
23 | #define cpu_has_divec 0 | 23 | #define cpu_has_divec 0 |
24 | #define cpu_has_vce 0 | ||
25 | #define cpu_has_cache_cdex_p 1 | 24 | #define cpu_has_cache_cdex_p 1 |
26 | #define cpu_has_cache_cdex_s 0 | ||
27 | #define cpu_has_prefetch 0 | 25 | #define cpu_has_prefetch 0 |
28 | #define cpu_has_mcheck 0 | 26 | #define cpu_has_mcheck 0 |
29 | #define cpu_has_ejtag 0 | 27 | #define cpu_has_ejtag 0 |
@@ -35,9 +33,6 @@ | |||
35 | #define cpu_has_nofpuex 0 | 33 | #define cpu_has_nofpuex 0 |
36 | #define cpu_has_64bits 1 | 34 | #define cpu_has_64bits 1 |
37 | 35 | ||
38 | #define cpu_dcache_line_size() 32 | ||
39 | #define cpu_icache_line_size() 32 | ||
40 | |||
41 | #define cpu_has_mips32r1 0 | 36 | #define cpu_has_mips32r1 0 |
42 | #define cpu_has_mips32r2 0 | 37 | #define cpu_has_mips32r2 0 |
43 | #define cpu_has_mips64r1 0 | 38 | #define cpu_has_mips64r1 0 |
diff --git a/include/asm-mips/mips_mt.h b/include/asm-mips/mips_mt.h index c31a312b9783..fdfff0b8ce42 100644 --- a/include/asm-mips/mips_mt.h +++ b/include/asm-mips/mips_mt.h | |||
@@ -12,4 +12,7 @@ extern unsigned long mt_fpemul_threshold; | |||
12 | extern void mips_mt_regdump(unsigned long previous_mvpcontrol_value); | 12 | extern void mips_mt_regdump(unsigned long previous_mvpcontrol_value); |
13 | extern void mips_mt_set_cpuoptions(void); | 13 | extern void mips_mt_set_cpuoptions(void); |
14 | 14 | ||
15 | struct class; | ||
16 | extern struct class *mt_class; | ||
17 | |||
15 | #endif /* __ASM_MIPS_MT_H */ | 18 | #endif /* __ASM_MIPS_MT_H */ |
diff --git a/include/asm-mips/mman.h b/include/asm-mips/mman.h index 046cf686bee7..e4d6f1fb1cf7 100644 --- a/include/asm-mips/mman.h +++ b/include/asm-mips/mman.h | |||
@@ -72,7 +72,6 @@ | |||
72 | #define MADV_DOFORK 11 /* do inherit across fork */ | 72 | #define MADV_DOFORK 11 /* do inherit across fork */ |
73 | 73 | ||
74 | /* compatibility flags */ | 74 | /* compatibility flags */ |
75 | #define MAP_ANON MAP_ANONYMOUS | ||
76 | #define MAP_FILE 0 | 75 | #define MAP_FILE 0 |
77 | 76 | ||
78 | #endif /* _ASM_MMAN_H */ | 77 | #endif /* _ASM_MMAN_H */ |
diff --git a/include/asm-mips/pci.h b/include/asm-mips/pci.h index 7f0f120ca07c..3eea3ba0fca5 100644 --- a/include/asm-mips/pci.h +++ b/include/asm-mips/pci.h | |||
@@ -32,6 +32,7 @@ struct pci_controller { | |||
32 | unsigned long mem_offset; | 32 | unsigned long mem_offset; |
33 | struct resource *io_resource; | 33 | struct resource *io_resource; |
34 | unsigned long io_offset; | 34 | unsigned long io_offset; |
35 | unsigned long io_map_base; | ||
35 | 36 | ||
36 | unsigned int index; | 37 | unsigned int index; |
37 | /* For compatibility with current (as of July 2003) pciutils | 38 | /* For compatibility with current (as of July 2003) pciutils |
diff --git a/include/asm-mips/pgalloc.h b/include/asm-mips/pgalloc.h index af121c67dc71..5685d4fc7881 100644 --- a/include/asm-mips/pgalloc.h +++ b/include/asm-mips/pgalloc.h | |||
@@ -130,4 +130,6 @@ static inline void pmd_free(pmd_t *pmd) | |||
130 | 130 | ||
131 | #define check_pgt_cache() do { } while (0) | 131 | #define check_pgt_cache() do { } while (0) |
132 | 132 | ||
133 | extern void pagetable_init(void); | ||
134 | |||
133 | #endif /* _ASM_PGALLOC_H */ | 135 | #endif /* _ASM_PGALLOC_H */ |
diff --git a/include/asm-mips/ptrace.h b/include/asm-mips/ptrace.h index 8a1f2b6f04ac..1906938285c0 100644 --- a/include/asm-mips/ptrace.h +++ b/include/asm-mips/ptrace.h | |||
@@ -21,6 +21,7 @@ | |||
21 | #define FPC_EIR 70 | 21 | #define FPC_EIR 70 |
22 | #define DSP_BASE 71 /* 3 more hi / lo register pairs */ | 22 | #define DSP_BASE 71 /* 3 more hi / lo register pairs */ |
23 | #define DSP_CONTROL 77 | 23 | #define DSP_CONTROL 77 |
24 | #define ACX 78 | ||
24 | 25 | ||
25 | /* | 26 | /* |
26 | * This struct defines the way the registers are stored on the stack during a | 27 | * This struct defines the way the registers are stored on the stack during a |
@@ -39,6 +40,9 @@ struct pt_regs { | |||
39 | unsigned long cp0_status; | 40 | unsigned long cp0_status; |
40 | unsigned long hi; | 41 | unsigned long hi; |
41 | unsigned long lo; | 42 | unsigned long lo; |
43 | #ifdef CONFIG_CPU_HAS_SMARTMIPS | ||
44 | unsigned long acx; | ||
45 | #endif | ||
42 | unsigned long cp0_badvaddr; | 46 | unsigned long cp0_badvaddr; |
43 | unsigned long cp0_cause; | 47 | unsigned long cp0_cause; |
44 | unsigned long cp0_epc; | 48 | unsigned long cp0_epc; |
diff --git a/include/asm-mips/sigcontext.h b/include/asm-mips/sigcontext.h index cefa657dd04a..9ce0607d7a4e 100644 --- a/include/asm-mips/sigcontext.h +++ b/include/asm-mips/sigcontext.h | |||
@@ -19,11 +19,11 @@ | |||
19 | */ | 19 | */ |
20 | struct sigcontext { | 20 | struct sigcontext { |
21 | unsigned int sc_regmask; /* Unused */ | 21 | unsigned int sc_regmask; /* Unused */ |
22 | unsigned int sc_status; | 22 | unsigned int sc_status; /* Unused */ |
23 | unsigned long long sc_pc; | 23 | unsigned long long sc_pc; |
24 | unsigned long long sc_regs[32]; | 24 | unsigned long long sc_regs[32]; |
25 | unsigned long long sc_fpregs[32]; | 25 | unsigned long long sc_fpregs[32]; |
26 | unsigned int sc_ownedfp; /* Unused */ | 26 | unsigned int sc_acx; /* Was sc_ownedfp */ |
27 | unsigned int sc_fpc_csr; | 27 | unsigned int sc_fpc_csr; |
28 | unsigned int sc_fpc_eir; /* Unused */ | 28 | unsigned int sc_fpc_eir; /* Unused */ |
29 | unsigned int sc_used_math; | 29 | unsigned int sc_used_math; |
@@ -42,6 +42,7 @@ struct sigcontext { | |||
42 | 42 | ||
43 | #if _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 | 43 | #if _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 |
44 | 44 | ||
45 | #include <linux/posix_types.h> | ||
45 | /* | 46 | /* |
46 | * Keep this struct definition in sync with the sigcontext fragment | 47 | * Keep this struct definition in sync with the sigcontext fragment |
47 | * in arch/mips/tools/offset.c | 48 | * in arch/mips/tools/offset.c |
@@ -53,34 +54,32 @@ struct sigcontext { | |||
53 | * entries, add sc_dsp and sc_reserved for padding. No prisoners. | 54 | * entries, add sc_dsp and sc_reserved for padding. No prisoners. |
54 | */ | 55 | */ |
55 | struct sigcontext { | 56 | struct sigcontext { |
56 | unsigned long sc_regs[32]; | 57 | __u64 sc_regs[32]; |
57 | unsigned long sc_fpregs[32]; | 58 | __u64 sc_fpregs[32]; |
58 | unsigned long sc_mdhi; | 59 | __u64 sc_mdhi; |
59 | unsigned long sc_hi1; | 60 | __u64 sc_hi1; |
60 | unsigned long sc_hi2; | 61 | __u64 sc_hi2; |
61 | unsigned long sc_hi3; | 62 | __u64 sc_hi3; |
62 | unsigned long sc_mdlo; | 63 | __u64 sc_mdlo; |
63 | unsigned long sc_lo1; | 64 | __u64 sc_lo1; |
64 | unsigned long sc_lo2; | 65 | __u64 sc_lo2; |
65 | unsigned long sc_lo3; | 66 | __u64 sc_lo3; |
66 | unsigned long sc_pc; | 67 | __u64 sc_pc; |
67 | unsigned int sc_fpc_csr; | 68 | __u32 sc_fpc_csr; |
68 | unsigned int sc_used_math; | 69 | __u32 sc_used_math; |
69 | unsigned int sc_dsp; | 70 | __u32 sc_dsp; |
70 | unsigned int sc_reserved; | 71 | __u32 sc_reserved; |
71 | }; | 72 | }; |
72 | 73 | ||
73 | #ifdef __KERNEL__ | 74 | #ifdef __KERNEL__ |
74 | 75 | ||
75 | #include <linux/posix_types.h> | ||
76 | |||
77 | struct sigcontext32 { | 76 | struct sigcontext32 { |
78 | __u32 sc_regmask; /* Unused */ | 77 | __u32 sc_regmask; /* Unused */ |
79 | __u32 sc_status; | 78 | __u32 sc_status; /* Unused */ |
80 | __u64 sc_pc; | 79 | __u64 sc_pc; |
81 | __u64 sc_regs[32]; | 80 | __u64 sc_regs[32]; |
82 | __u64 sc_fpregs[32]; | 81 | __u64 sc_fpregs[32]; |
83 | __u32 sc_ownedfp; /* Unused */ | 82 | __u32 sc_acx; /* Only MIPS32; was sc_ownedfp */ |
84 | __u32 sc_fpc_csr; | 83 | __u32 sc_fpc_csr; |
85 | __u32 sc_fpc_eir; /* Unused */ | 84 | __u32 sc_fpc_eir; /* Unused */ |
86 | __u32 sc_used_math; | 85 | __u32 sc_used_math; |
diff --git a/include/asm-mips/signal.h b/include/asm-mips/signal.h index 8b391a2f0814..7a28989f7ee3 100644 --- a/include/asm-mips/signal.h +++ b/include/asm-mips/signal.h | |||
@@ -137,23 +137,6 @@ typedef struct sigaltstack { | |||
137 | 137 | ||
138 | #define ptrace_signal_deliver(regs, cookie) do { } while (0) | 138 | #define ptrace_signal_deliver(regs, cookie) do { } while (0) |
139 | 139 | ||
140 | struct pt_regs; | ||
141 | extern void do_signal(struct pt_regs *regs); | ||
142 | extern void do_signal32(struct pt_regs *regs); | ||
143 | |||
144 | extern int setup_frame(struct k_sigaction * ka, struct pt_regs *regs, | ||
145 | int signr, sigset_t *set); | ||
146 | extern int setup_rt_frame(struct k_sigaction * ka, struct pt_regs *regs, | ||
147 | int signr, sigset_t *set, siginfo_t *info); | ||
148 | |||
149 | extern int setup_frame_32(struct k_sigaction * ka, struct pt_regs *regs, | ||
150 | int signr, sigset_t *set); | ||
151 | extern int setup_rt_frame_32(struct k_sigaction * ka, struct pt_regs *regs, | ||
152 | int signr, sigset_t *set, siginfo_t *info); | ||
153 | |||
154 | extern int setup_rt_frame_n32(struct k_sigaction * ka, struct pt_regs *regs, | ||
155 | int signr, sigset_t *set, siginfo_t *info); | ||
156 | |||
157 | #endif /* __KERNEL__ */ | 140 | #endif /* __KERNEL__ */ |
158 | 141 | ||
159 | #endif /* _ASM_SIGNAL_H */ | 142 | #endif /* _ASM_SIGNAL_H */ |
diff --git a/include/asm-mips/sni.h b/include/asm-mips/sni.h index b9ba54d0dd35..62f9be6f7320 100644 --- a/include/asm-mips/sni.h +++ b/include/asm-mips/sni.h | |||
@@ -6,12 +6,72 @@ | |||
6 | * for more details. | 6 | * for more details. |
7 | * | 7 | * |
8 | * Copyright (C) 1997, 1998 by Ralf Baechle | 8 | * Copyright (C) 1997, 1998 by Ralf Baechle |
9 | * Copyright (C) 2006 Thomas Bogendoerfer (tsbogend@alpha.franken.de) | ||
9 | */ | 10 | */ |
10 | #ifndef __ASM_SNI_H | 11 | #ifndef __ASM_SNI_H |
11 | #define __ASM_SNI_H | 12 | #define __ASM_SNI_H |
12 | 13 | ||
14 | extern unsigned int sni_brd_type; | ||
15 | |||
16 | #define SNI_BRD_10 2 | ||
17 | #define SNI_BRD_10NEW 3 | ||
18 | #define SNI_BRD_TOWER_OASIC 4 | ||
19 | #define SNI_BRD_MINITOWER 5 | ||
20 | #define SNI_BRD_PCI_TOWER 6 | ||
21 | #define SNI_BRD_RM200 7 | ||
22 | #define SNI_BRD_PCI_MTOWER 8 | ||
23 | #define SNI_BRD_PCI_DESKTOP 9 | ||
24 | #define SNI_BRD_PCI_TOWER_CPLUS 10 | ||
25 | #define SNI_BRD_PCI_MTOWER_CPLUS 11 | ||
26 | |||
27 | /* RM400 cpu types */ | ||
28 | #define SNI_CPU_M8021 0x01 | ||
29 | #define SNI_CPU_M8030 0x04 | ||
30 | #define SNI_CPU_M8031 0x06 | ||
31 | #define SNI_CPU_M8034 0x0f | ||
32 | #define SNI_CPU_M8037 0x07 | ||
33 | #define SNI_CPU_M8040 0x05 | ||
34 | #define SNI_CPU_M8043 0x09 | ||
35 | #define SNI_CPU_M8050 0x0b | ||
36 | #define SNI_CPU_M8053 0x0d | ||
37 | |||
13 | #define SNI_PORT_BASE 0xb4000000 | 38 | #define SNI_PORT_BASE 0xb4000000 |
14 | 39 | ||
40 | #ifndef __MIPSEL__ | ||
41 | /* | ||
42 | * ASIC PCI registers for big endian configuration. | ||
43 | */ | ||
44 | #define PCIMT_UCONF 0xbfff0004 | ||
45 | #define PCIMT_IOADTIMEOUT2 0xbfff000c | ||
46 | #define PCIMT_IOMEMCONF 0xbfff0014 | ||
47 | #define PCIMT_IOMMU 0xbfff001c | ||
48 | #define PCIMT_IOADTIMEOUT1 0xbfff0024 | ||
49 | #define PCIMT_DMAACCESS 0xbfff002c | ||
50 | #define PCIMT_DMAHIT 0xbfff0034 | ||
51 | #define PCIMT_ERRSTATUS 0xbfff003c | ||
52 | #define PCIMT_ERRADDR 0xbfff0044 | ||
53 | #define PCIMT_SYNDROME 0xbfff004c | ||
54 | #define PCIMT_ITPEND 0xbfff0054 | ||
55 | #define IT_INT2 0x01 | ||
56 | #define IT_INTD 0x02 | ||
57 | #define IT_INTC 0x04 | ||
58 | #define IT_INTB 0x08 | ||
59 | #define IT_INTA 0x10 | ||
60 | #define IT_EISA 0x20 | ||
61 | #define IT_SCSI 0x40 | ||
62 | #define IT_ETH 0x80 | ||
63 | #define PCIMT_IRQSEL 0xbfff005c | ||
64 | #define PCIMT_TESTMEM 0xbfff0064 | ||
65 | #define PCIMT_ECCREG 0xbfff006c | ||
66 | #define PCIMT_CONFIG_ADDRESS 0xbfff0074 | ||
67 | #define PCIMT_ASIC_ID 0xbfff007c /* read */ | ||
68 | #define PCIMT_SOFT_RESET 0xbfff007c /* write */ | ||
69 | #define PCIMT_PIA_OE 0xbfff0084 | ||
70 | #define PCIMT_PIA_DATAOUT 0xbfff008c | ||
71 | #define PCIMT_PIA_DATAIN 0xbfff0094 | ||
72 | #define PCIMT_CACHECONF 0xbfff009c | ||
73 | #define PCIMT_INVSPACE 0xbfff00a4 | ||
74 | #else | ||
15 | /* | 75 | /* |
16 | * ASIC PCI registers for little endian configuration. | 76 | * ASIC PCI registers for little endian configuration. |
17 | */ | 77 | */ |
@@ -45,6 +105,8 @@ | |||
45 | #define PCIMT_PIA_DATAIN 0xbfff0090 | 105 | #define PCIMT_PIA_DATAIN 0xbfff0090 |
46 | #define PCIMT_CACHECONF 0xbfff0098 | 106 | #define PCIMT_CACHECONF 0xbfff0098 |
47 | #define PCIMT_INVSPACE 0xbfff00a0 | 107 | #define PCIMT_INVSPACE 0xbfff00a0 |
108 | #endif | ||
109 | |||
48 | #define PCIMT_PCI_CONF 0xbfff0100 | 110 | #define PCIMT_PCI_CONF 0xbfff0100 |
49 | 111 | ||
50 | /* | 112 | /* |
@@ -73,6 +135,36 @@ | |||
73 | #define PCIMT_PWDN 0xbfdf0000 | 135 | #define PCIMT_PWDN 0xbfdf0000 |
74 | 136 | ||
75 | /* | 137 | /* |
138 | * A20R based boards | ||
139 | */ | ||
140 | #define A20R_PT_CLOCK_BASE 0xbc040000 | ||
141 | #define A20R_PT_TIM0_ACK 0xbc050000 | ||
142 | #define A20R_PT_TIM1_ACK 0xbc060000 | ||
143 | |||
144 | #define SNI_MIPS_IRQ_CPU_BASE 16 | ||
145 | #define SNI_MIPS_IRQ_CPU_TIMER (SNI_MIPS_IRQ_CPU_BASE+7) | ||
146 | |||
147 | #define SNI_A20R_IRQ_BASE SNI_MIPS_IRQ_CPU_BASE | ||
148 | #define SNI_A20R_IRQ_TIMER (SNI_A20R_IRQ_BASE+5) | ||
149 | |||
150 | #define SNI_DS1216_A20R_BASE 0xbc081ffc | ||
151 | #define SNI_DS1216_RM200_BASE 0xbcd41ffc | ||
152 | |||
153 | #define SNI_PCIT_INT_REG 0xbfff000c | ||
154 | |||
155 | #define SNI_PCIT_INT_START 24 | ||
156 | #define SNI_PCIT_INT_END 30 | ||
157 | |||
158 | #define PCIT_IRQ_ETHERNET (SNI_MIPS_IRQ_CPU_BASE + 5) | ||
159 | #define PCIT_IRQ_INTA (SNI_PCIT_INT_START + 0) | ||
160 | #define PCIT_IRQ_INTB (SNI_PCIT_INT_START + 1) | ||
161 | #define PCIT_IRQ_INTC (SNI_PCIT_INT_START + 2) | ||
162 | #define PCIT_IRQ_INTD (SNI_PCIT_INT_START + 3) | ||
163 | #define PCIT_IRQ_SCSI0 (SNI_PCIT_INT_START + 4) | ||
164 | #define PCIT_IRQ_SCSI1 (SNI_PCIT_INT_START + 5) | ||
165 | |||
166 | |||
167 | /* | ||
76 | * Interrupt 0-16 are EISA interrupts. Interrupts from 16 on are assigned | 168 | * Interrupt 0-16 are EISA interrupts. Interrupts from 16 on are assigned |
77 | * to the other interrupts generated by ASIC PCI. | 169 | * to the other interrupts generated by ASIC PCI. |
78 | * | 170 | * |
@@ -80,18 +172,22 @@ | |||
80 | * ASIC PCI interrupt. | 172 | * ASIC PCI interrupt. |
81 | */ | 173 | */ |
82 | #define PCIMT_KEYBOARD_IRQ 1 | 174 | #define PCIMT_KEYBOARD_IRQ 1 |
83 | #define PCIMT_IRQ_INT2 16 | 175 | #define PCIMT_IRQ_INT2 24 |
84 | #define PCIMT_IRQ_INTD 17 | 176 | #define PCIMT_IRQ_INTD 25 |
85 | #define PCIMT_IRQ_INTC 18 | 177 | #define PCIMT_IRQ_INTC 26 |
86 | #define PCIMT_IRQ_INTB 19 | 178 | #define PCIMT_IRQ_INTB 27 |
87 | #define PCIMT_IRQ_INTA 20 | 179 | #define PCIMT_IRQ_INTA 28 |
88 | #define PCIMT_IRQ_EISA 21 | 180 | #define PCIMT_IRQ_EISA 29 |
89 | #define PCIMT_IRQ_SCSI 22 | 181 | #define PCIMT_IRQ_SCSI 30 |
90 | #define PCIMT_IRQ_ETHERNET 23 | 182 | |
183 | #define PCIMT_IRQ_ETHERNET (SNI_MIPS_IRQ_CPU_BASE+6) | ||
184 | |||
185 | #if 0 | ||
91 | #define PCIMT_IRQ_TEMPERATURE 24 | 186 | #define PCIMT_IRQ_TEMPERATURE 24 |
92 | #define PCIMT_IRQ_EISA_NMI 25 | 187 | #define PCIMT_IRQ_EISA_NMI 25 |
93 | #define PCIMT_IRQ_POWER_OFF 26 | 188 | #define PCIMT_IRQ_POWER_OFF 26 |
94 | #define PCIMT_IRQ_BUTTON 27 | 189 | #define PCIMT_IRQ_BUTTON 27 |
190 | #endif | ||
95 | 191 | ||
96 | /* | 192 | /* |
97 | * Base address for the mapped 16mb EISA bus segment. | 193 | * Base address for the mapped 16mb EISA bus segment. |
@@ -101,4 +197,24 @@ | |||
101 | /* PCI EISA Interrupt acknowledge */ | 197 | /* PCI EISA Interrupt acknowledge */ |
102 | #define PCIMT_INT_ACKNOWLEDGE 0xba000000 | 198 | #define PCIMT_INT_ACKNOWLEDGE 0xba000000 |
103 | 199 | ||
200 | /* board specific init functions */ | ||
201 | extern void sni_a20r_init (void); | ||
202 | extern void sni_pcit_init (void); | ||
203 | extern void sni_rm200_init (void); | ||
204 | extern void sni_pcimt_init (void); | ||
205 | |||
206 | /* board specific irq init functions */ | ||
207 | extern void sni_a20r_irq_init (void); | ||
208 | extern void sni_pcit_irq_init (void); | ||
209 | extern void sni_pcit_cplus_irq_init (void); | ||
210 | extern void sni_rm200_irq_init (void); | ||
211 | extern void sni_pcimt_irq_init (void); | ||
212 | |||
213 | /* timer inits */ | ||
214 | extern void sni_cpu_time_init(void); | ||
215 | |||
216 | /* common irq stuff */ | ||
217 | extern void (*sni_hwint)(void); | ||
218 | extern struct irqaction sni_isa_irq; | ||
219 | |||
104 | #endif /* __ASM_SNI_H */ | 220 | #endif /* __ASM_SNI_H */ |
diff --git a/include/asm-mips/spinlock.h b/include/asm-mips/spinlock.h index fc3217fc1118..f1755d28a36a 100644 --- a/include/asm-mips/spinlock.h +++ b/include/asm-mips/spinlock.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 1999, 2000, 06 by Ralf Baechle | 6 | * Copyright (C) 1999, 2000, 06 Ralf Baechle (ralf@linux-mips.org) |
7 | * Copyright (C) 1999, 2000 Silicon Graphics, Inc. | 7 | * Copyright (C) 1999, 2000 Silicon Graphics, Inc. |
8 | */ | 8 | */ |
9 | #ifndef _ASM_SPINLOCK_H | 9 | #ifndef _ASM_SPINLOCK_H |
@@ -49,11 +49,18 @@ static inline void __raw_spin_lock(raw_spinlock_t *lock) | |||
49 | __asm__ __volatile__( | 49 | __asm__ __volatile__( |
50 | " .set noreorder # __raw_spin_lock \n" | 50 | " .set noreorder # __raw_spin_lock \n" |
51 | "1: ll %1, %2 \n" | 51 | "1: ll %1, %2 \n" |
52 | " bnez %1, 1b \n" | 52 | " bnez %1, 2f \n" |
53 | " li %1, 1 \n" | 53 | " li %1, 1 \n" |
54 | " sc %1, %0 \n" | 54 | " sc %1, %0 \n" |
55 | " beqz %1, 1b \n" | 55 | " beqz %1, 2f \n" |
56 | " nop \n" | 56 | " nop \n" |
57 | " .subsection 2 \n" | ||
58 | "2: ll %1, %2 \n" | ||
59 | " bnez %1, 2b \n" | ||
60 | " li %1, 1 \n" | ||
61 | " b 1b \n" | ||
62 | " nop \n" | ||
63 | " .previous \n" | ||
57 | " .set reorder \n" | 64 | " .set reorder \n" |
58 | : "=m" (lock->lock), "=&r" (tmp) | 65 | : "=m" (lock->lock), "=&r" (tmp) |
59 | : "m" (lock->lock) | 66 | : "m" (lock->lock) |
@@ -99,8 +106,12 @@ static inline unsigned int __raw_spin_trylock(raw_spinlock_t *lock) | |||
99 | "1: ll %0, %3 \n" | 106 | "1: ll %0, %3 \n" |
100 | " ori %2, %0, 1 \n" | 107 | " ori %2, %0, 1 \n" |
101 | " sc %2, %1 \n" | 108 | " sc %2, %1 \n" |
102 | " beqz %2, 1b \n" | 109 | " beqz %2, 2f \n" |
103 | " andi %2, %0, 1 \n" | 110 | " andi %2, %0, 1 \n" |
111 | " .subsection 2 \n" | ||
112 | "2: b 1b \n" | ||
113 | " nop \n" | ||
114 | " .previous \n" | ||
104 | " .set reorder" | 115 | " .set reorder" |
105 | : "=&r" (temp), "=m" (lock->lock), "=&r" (res) | 116 | : "=&r" (temp), "=m" (lock->lock), "=&r" (res) |
106 | : "m" (lock->lock) | 117 | : "m" (lock->lock) |
@@ -154,11 +165,18 @@ static inline void __raw_read_lock(raw_rwlock_t *rw) | |||
154 | __asm__ __volatile__( | 165 | __asm__ __volatile__( |
155 | " .set noreorder # __raw_read_lock \n" | 166 | " .set noreorder # __raw_read_lock \n" |
156 | "1: ll %1, %2 \n" | 167 | "1: ll %1, %2 \n" |
157 | " bltz %1, 1b \n" | 168 | " bltz %1, 2f \n" |
158 | " addu %1, 1 \n" | 169 | " addu %1, 1 \n" |
159 | " sc %1, %0 \n" | 170 | " sc %1, %0 \n" |
160 | " beqz %1, 1b \n" | 171 | " beqz %1, 1b \n" |
161 | " nop \n" | 172 | " nop \n" |
173 | " .subsection 2 \n" | ||
174 | "2: ll %1, %2 \n" | ||
175 | " bltz %1, 2b \n" | ||
176 | " addu %1, 1 \n" | ||
177 | " b 1b \n" | ||
178 | " nop \n" | ||
179 | " .previous \n" | ||
162 | " .set reorder \n" | 180 | " .set reorder \n" |
163 | : "=m" (rw->lock), "=&r" (tmp) | 181 | : "=m" (rw->lock), "=&r" (tmp) |
164 | : "m" (rw->lock) | 182 | : "m" (rw->lock) |
@@ -192,8 +210,12 @@ static inline void __raw_read_unlock(raw_rwlock_t *rw) | |||
192 | "1: ll %1, %2 \n" | 210 | "1: ll %1, %2 \n" |
193 | " sub %1, 1 \n" | 211 | " sub %1, 1 \n" |
194 | " sc %1, %0 \n" | 212 | " sc %1, %0 \n" |
195 | " beqz %1, 1b \n" | 213 | " beqz %1, 2f \n" |
214 | " nop \n" | ||
215 | " .subsection 2 \n" | ||
216 | "2: b 1b \n" | ||
196 | " nop \n" | 217 | " nop \n" |
218 | " .previous \n" | ||
197 | " .set reorder \n" | 219 | " .set reorder \n" |
198 | : "=m" (rw->lock), "=&r" (tmp) | 220 | : "=m" (rw->lock), "=&r" (tmp) |
199 | : "m" (rw->lock) | 221 | : "m" (rw->lock) |
@@ -222,11 +244,18 @@ static inline void __raw_write_lock(raw_rwlock_t *rw) | |||
222 | __asm__ __volatile__( | 244 | __asm__ __volatile__( |
223 | " .set noreorder # __raw_write_lock \n" | 245 | " .set noreorder # __raw_write_lock \n" |
224 | "1: ll %1, %2 \n" | 246 | "1: ll %1, %2 \n" |
225 | " bnez %1, 1b \n" | 247 | " bnez %1, 2f \n" |
226 | " lui %1, 0x8000 \n" | 248 | " lui %1, 0x8000 \n" |
227 | " sc %1, %0 \n" | 249 | " sc %1, %0 \n" |
228 | " beqz %1, 1b \n" | 250 | " beqz %1, 2f \n" |
251 | " nop \n" | ||
252 | " .subsection 2 \n" | ||
253 | "2: ll %1, %2 \n" | ||
254 | " bnez %1, 2b \n" | ||
255 | " lui %1, 0x8000 \n" | ||
256 | " b 1b \n" | ||
229 | " nop \n" | 257 | " nop \n" |
258 | " .previous \n" | ||
230 | " .set reorder \n" | 259 | " .set reorder \n" |
231 | : "=m" (rw->lock), "=&r" (tmp) | 260 | : "=m" (rw->lock), "=&r" (tmp) |
232 | : "m" (rw->lock) | 261 | : "m" (rw->lock) |
@@ -322,12 +351,15 @@ static inline int __raw_write_trylock(raw_rwlock_t *rw) | |||
322 | " bnez %1, 2f \n" | 351 | " bnez %1, 2f \n" |
323 | " lui %1, 0x8000 \n" | 352 | " lui %1, 0x8000 \n" |
324 | " sc %1, %0 \n" | 353 | " sc %1, %0 \n" |
325 | " beqz %1, 1b \n" | 354 | " beqz %1, 3f \n" |
326 | " nop \n" | 355 | " li %2, 1 \n" |
356 | "2: \n" | ||
327 | __WEAK_ORDERING_MB | 357 | __WEAK_ORDERING_MB |
328 | " li %2, 1 \n" | 358 | " .subsection 2 \n" |
359 | "3: b 1b \n" | ||
360 | " li %2, 0 \n" | ||
361 | " .previous \n" | ||
329 | " .set reorder \n" | 362 | " .set reorder \n" |
330 | "2: \n" | ||
331 | : "=m" (rw->lock), "=&r" (tmp), "=&r" (ret) | 363 | : "=m" (rw->lock), "=&r" (tmp), "=&r" (ret) |
332 | : "m" (rw->lock) | 364 | : "m" (rw->lock) |
333 | : "memory"); | 365 | : "memory"); |
diff --git a/include/asm-mips/stackframe.h b/include/asm-mips/stackframe.h index 1fae5dc58138..7afa1fdf70ca 100644 --- a/include/asm-mips/stackframe.h +++ b/include/asm-mips/stackframe.h | |||
@@ -29,16 +29,25 @@ | |||
29 | .endm | 29 | .endm |
30 | 30 | ||
31 | .macro SAVE_TEMP | 31 | .macro SAVE_TEMP |
32 | #ifdef CONFIG_CPU_HAS_SMARTMIPS | ||
33 | mflhxu v1 | ||
34 | LONG_S v1, PT_LO(sp) | ||
35 | mflhxu v1 | ||
36 | LONG_S v1, PT_HI(sp) | ||
37 | mflhxu v1 | ||
38 | LONG_S v1, PT_ACX(sp) | ||
39 | #else | ||
32 | mfhi v1 | 40 | mfhi v1 |
41 | LONG_S v1, PT_HI(sp) | ||
42 | mflo v1 | ||
43 | LONG_S v1, PT_LO(sp) | ||
44 | #endif | ||
33 | #ifdef CONFIG_32BIT | 45 | #ifdef CONFIG_32BIT |
34 | LONG_S $8, PT_R8(sp) | 46 | LONG_S $8, PT_R8(sp) |
35 | LONG_S $9, PT_R9(sp) | 47 | LONG_S $9, PT_R9(sp) |
36 | #endif | 48 | #endif |
37 | LONG_S v1, PT_HI(sp) | ||
38 | mflo v1 | ||
39 | LONG_S $10, PT_R10(sp) | 49 | LONG_S $10, PT_R10(sp) |
40 | LONG_S $11, PT_R11(sp) | 50 | LONG_S $11, PT_R11(sp) |
41 | LONG_S v1, PT_LO(sp) | ||
42 | LONG_S $12, PT_R12(sp) | 51 | LONG_S $12, PT_R12(sp) |
43 | LONG_S $13, PT_R13(sp) | 52 | LONG_S $13, PT_R13(sp) |
44 | LONG_S $14, PT_R14(sp) | 53 | LONG_S $14, PT_R14(sp) |
@@ -182,16 +191,25 @@ | |||
182 | .endm | 191 | .endm |
183 | 192 | ||
184 | .macro RESTORE_TEMP | 193 | .macro RESTORE_TEMP |
194 | #ifdef CONFIG_CPU_HAS_SMARTMIPS | ||
195 | LONG_L $24, PT_ACX(sp) | ||
196 | mtlhx $24 | ||
197 | LONG_L $24, PT_HI(sp) | ||
198 | mtlhx $24 | ||
185 | LONG_L $24, PT_LO(sp) | 199 | LONG_L $24, PT_LO(sp) |
200 | mtlhx $24 | ||
201 | #else | ||
202 | LONG_L $24, PT_LO(sp) | ||
203 | mtlo $24 | ||
204 | LONG_L $24, PT_HI(sp) | ||
205 | mthi $24 | ||
206 | #endif | ||
186 | #ifdef CONFIG_32BIT | 207 | #ifdef CONFIG_32BIT |
187 | LONG_L $8, PT_R8(sp) | 208 | LONG_L $8, PT_R8(sp) |
188 | LONG_L $9, PT_R9(sp) | 209 | LONG_L $9, PT_R9(sp) |
189 | #endif | 210 | #endif |
190 | mtlo $24 | ||
191 | LONG_L $24, PT_HI(sp) | ||
192 | LONG_L $10, PT_R10(sp) | 211 | LONG_L $10, PT_R10(sp) |
193 | LONG_L $11, PT_R11(sp) | 212 | LONG_L $11, PT_R11(sp) |
194 | mthi $24 | ||
195 | LONG_L $12, PT_R12(sp) | 213 | LONG_L $12, PT_R12(sp) |
196 | LONG_L $13, PT_R13(sp) | 214 | LONG_L $13, PT_R13(sp) |
197 | LONG_L $14, PT_R14(sp) | 215 | LONG_L $14, PT_R14(sp) |
diff --git a/include/asm-mips/system.h b/include/asm-mips/system.h index 5e1289c85ed9..597a3743f6a1 100644 --- a/include/asm-mips/system.h +++ b/include/asm-mips/system.h | |||
@@ -110,7 +110,10 @@ static inline unsigned long __xchg_u32(volatile int * m, unsigned int val) | |||
110 | " move %2, %z4 \n" | 110 | " move %2, %z4 \n" |
111 | " .set mips3 \n" | 111 | " .set mips3 \n" |
112 | " sc %2, %1 \n" | 112 | " sc %2, %1 \n" |
113 | " beqz %2, 1b \n" | 113 | " beqz %2, 2f \n" |
114 | " .subsection 2 \n" | ||
115 | "2: b 1b \n" | ||
116 | " .previous \n" | ||
114 | " .set mips0 \n" | 117 | " .set mips0 \n" |
115 | : "=&r" (retval), "=m" (*m), "=&r" (dummy) | 118 | : "=&r" (retval), "=m" (*m), "=&r" (dummy) |
116 | : "R" (*m), "Jr" (val) | 119 | : "R" (*m), "Jr" (val) |
@@ -155,7 +158,10 @@ static inline __u64 __xchg_u64(volatile __u64 * m, __u64 val) | |||
155 | "1: lld %0, %3 # xchg_u64 \n" | 158 | "1: lld %0, %3 # xchg_u64 \n" |
156 | " move %2, %z4 \n" | 159 | " move %2, %z4 \n" |
157 | " scd %2, %1 \n" | 160 | " scd %2, %1 \n" |
158 | " beqz %2, 1b \n" | 161 | " beqz %2, 2f \n" |
162 | " .subsection 2 \n" | ||
163 | "2: b 1b \n" | ||
164 | " .previous \n" | ||
159 | " .set mips0 \n" | 165 | " .set mips0 \n" |
160 | : "=&r" (retval), "=m" (*m), "=&r" (dummy) | 166 | : "=&r" (retval), "=m" (*m), "=&r" (dummy) |
161 | : "R" (*m), "Jr" (val) | 167 | : "R" (*m), "Jr" (val) |
@@ -232,8 +238,11 @@ static inline unsigned long __cmpxchg_u32(volatile int * m, unsigned long old, | |||
232 | " move $1, %z4 \n" | 238 | " move $1, %z4 \n" |
233 | " .set mips3 \n" | 239 | " .set mips3 \n" |
234 | " sc $1, %1 \n" | 240 | " sc $1, %1 \n" |
235 | " beqz $1, 1b \n" | 241 | " beqz $1, 3f \n" |
236 | "2: \n" | 242 | "2: \n" |
243 | " .subsection 2 \n" | ||
244 | "3: b 1b \n" | ||
245 | " .previous \n" | ||
237 | " .set pop \n" | 246 | " .set pop \n" |
238 | : "=&r" (retval), "=R" (*m) | 247 | : "=&r" (retval), "=R" (*m) |
239 | : "R" (*m), "Jr" (old), "Jr" (new) | 248 | : "R" (*m), "Jr" (old), "Jr" (new) |
@@ -283,8 +292,11 @@ static inline unsigned long __cmpxchg_u64(volatile int * m, unsigned long old, | |||
283 | " bne %0, %z3, 2f \n" | 292 | " bne %0, %z3, 2f \n" |
284 | " move $1, %z4 \n" | 293 | " move $1, %z4 \n" |
285 | " scd $1, %1 \n" | 294 | " scd $1, %1 \n" |
286 | " beqz $1, 1b \n" | 295 | " beqz $1, 3f \n" |
287 | "2: \n" | 296 | "2: \n" |
297 | " .subsection 2 \n" | ||
298 | "3: b 1b \n" | ||
299 | " .previous \n" | ||
288 | " .set pop \n" | 300 | " .set pop \n" |
289 | : "=&r" (retval), "=R" (*m) | 301 | : "=&r" (retval), "=R" (*m) |
290 | : "R" (*m), "Jr" (old), "Jr" (new) | 302 | : "R" (*m), "Jr" (old), "Jr" (new) |
diff --git a/include/asm-mips/termios.h b/include/asm-mips/termios.h index 4906204d34fe..2ce07f4be369 100644 --- a/include/asm-mips/termios.h +++ b/include/asm-mips/termios.h | |||
@@ -87,24 +87,6 @@ struct termio { | |||
87 | #define TIOCM_OUT2 0x4000 | 87 | #define TIOCM_OUT2 0x4000 |
88 | #define TIOCM_LOOP 0x8000 | 88 | #define TIOCM_LOOP 0x8000 |
89 | 89 | ||
90 | /* line disciplines */ | ||
91 | #define N_TTY 0 | ||
92 | #define N_SLIP 1 | ||
93 | #define N_MOUSE 2 | ||
94 | #define N_PPP 3 | ||
95 | #define N_STRIP 4 | ||
96 | #define N_AX25 5 | ||
97 | #define N_X25 6 /* X.25 async */ | ||
98 | #define N_6PACK 7 | ||
99 | #define N_MASC 8 /* Reserved fo Mobitex module <kaz@cafe.net> */ | ||
100 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
101 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
102 | #define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ | ||
103 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
104 | #define N_HDLC 13 /* synchronous HDLC */ | ||
105 | #define N_SYNC_PPP 14 /* synchronous PPP */ | ||
106 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
107 | |||
108 | #ifdef __KERNEL__ | 90 | #ifdef __KERNEL__ |
109 | 91 | ||
110 | #include <linux/string.h> | 92 | #include <linux/string.h> |
diff --git a/include/asm-mips/uaccess.h b/include/asm-mips/uaccess.h index c12ebc53ef31..c62c20e7b5c6 100644 --- a/include/asm-mips/uaccess.h +++ b/include/asm-mips/uaccess.h | |||
@@ -265,12 +265,14 @@ do { \ | |||
265 | */ | 265 | */ |
266 | #define __get_user_asm_ll32(val, addr) \ | 266 | #define __get_user_asm_ll32(val, addr) \ |
267 | { \ | 267 | { \ |
268 | unsigned long long __gu_tmp; \ | 268 | union { \ |
269 | unsigned long long l; \ | ||
270 | __typeof__(*(addr)) t; \ | ||
271 | } __gu_tmp; \ | ||
269 | \ | 272 | \ |
270 | __asm__ __volatile__( \ | 273 | __asm__ __volatile__( \ |
271 | "1: lw %1, (%3) \n" \ | 274 | "1: lw %1, (%3) \n" \ |
272 | "2: lw %D1, 4(%3) \n" \ | 275 | "2: lw %D1, 4(%3) \n" \ |
273 | " move %0, $0 \n" \ | ||
274 | "3: .section .fixup,\"ax\" \n" \ | 276 | "3: .section .fixup,\"ax\" \n" \ |
275 | "4: li %0, %4 \n" \ | 277 | "4: li %0, %4 \n" \ |
276 | " move %1, $0 \n" \ | 278 | " move %1, $0 \n" \ |
@@ -281,9 +283,10 @@ do { \ | |||
281 | " " __UA_ADDR " 1b, 4b \n" \ | 283 | " " __UA_ADDR " 1b, 4b \n" \ |
282 | " " __UA_ADDR " 2b, 4b \n" \ | 284 | " " __UA_ADDR " 2b, 4b \n" \ |
283 | " .previous \n" \ | 285 | " .previous \n" \ |
284 | : "=r" (__gu_err), "=&r" (__gu_tmp) \ | 286 | : "=r" (__gu_err), "=&r" (__gu_tmp.l) \ |
285 | : "0" (0), "r" (addr), "i" (-EFAULT)); \ | 287 | : "0" (0), "r" (addr), "i" (-EFAULT)); \ |
286 | (val) = (__typeof__(*(addr))) __gu_tmp; \ | 288 | \ |
289 | (val) = __gu_tmp.t; \ | ||
287 | } | 290 | } |
288 | 291 | ||
289 | /* | 292 | /* |
@@ -432,8 +435,32 @@ extern size_t __copy_user(void *__to, const void *__from, size_t __n); | |||
432 | __cu_len; \ | 435 | __cu_len; \ |
433 | }) | 436 | }) |
434 | 437 | ||
435 | #define __copy_to_user_inatomic __copy_to_user | 438 | #define __copy_to_user_inatomic(to,from,n) \ |
436 | #define __copy_from_user_inatomic __copy_from_user | 439 | ({ \ |
440 | void __user *__cu_to; \ | ||
441 | const void *__cu_from; \ | ||
442 | long __cu_len; \ | ||
443 | \ | ||
444 | __cu_to = (to); \ | ||
445 | __cu_from = (from); \ | ||
446 | __cu_len = (n); \ | ||
447 | __cu_len = __invoke_copy_to_user(__cu_to, __cu_from, __cu_len); \ | ||
448 | __cu_len; \ | ||
449 | }) | ||
450 | |||
451 | #define __copy_from_user_inatomic(to,from,n) \ | ||
452 | ({ \ | ||
453 | void *__cu_to; \ | ||
454 | const void __user *__cu_from; \ | ||
455 | long __cu_len; \ | ||
456 | \ | ||
457 | __cu_to = (to); \ | ||
458 | __cu_from = (from); \ | ||
459 | __cu_len = (n); \ | ||
460 | __cu_len = __invoke_copy_from_user_inatomic(__cu_to, __cu_from, \ | ||
461 | __cu_len); \ | ||
462 | __cu_len; \ | ||
463 | }) | ||
437 | 464 | ||
438 | /* | 465 | /* |
439 | * copy_to_user: - Copy a block of data into user space. | 466 | * copy_to_user: - Copy a block of data into user space. |
@@ -487,6 +514,29 @@ extern size_t __copy_user(void *__to, const void *__from, size_t __n); | |||
487 | __cu_len_r; \ | 514 | __cu_len_r; \ |
488 | }) | 515 | }) |
489 | 516 | ||
517 | #define __invoke_copy_from_user_inatomic(to,from,n) \ | ||
518 | ({ \ | ||
519 | register void *__cu_to_r __asm__ ("$4"); \ | ||
520 | register const void __user *__cu_from_r __asm__ ("$5"); \ | ||
521 | register long __cu_len_r __asm__ ("$6"); \ | ||
522 | \ | ||
523 | __cu_to_r = (to); \ | ||
524 | __cu_from_r = (from); \ | ||
525 | __cu_len_r = (n); \ | ||
526 | __asm__ __volatile__( \ | ||
527 | ".set\tnoreorder\n\t" \ | ||
528 | __MODULE_JAL(__copy_user_inatomic) \ | ||
529 | ".set\tnoat\n\t" \ | ||
530 | __UA_ADDU "\t$1, %1, %2\n\t" \ | ||
531 | ".set\tat\n\t" \ | ||
532 | ".set\treorder" \ | ||
533 | : "+r" (__cu_to_r), "+r" (__cu_from_r), "+r" (__cu_len_r) \ | ||
534 | : \ | ||
535 | : "$8", "$9", "$10", "$11", "$12", "$15", "$24", "$31", \ | ||
536 | "memory"); \ | ||
537 | __cu_len_r; \ | ||
538 | }) | ||
539 | |||
490 | /* | 540 | /* |
491 | * __copy_from_user: - Copy a block of data from user space, with less checking. | 541 | * __copy_from_user: - Copy a block of data from user space, with less checking. |
492 | * @to: Destination address, in kernel space. | 542 | * @to: Destination address, in kernel space. |
diff --git a/include/asm-parisc/assembly.h b/include/asm-parisc/assembly.h index 5a1e0e8b1c32..5587f0023881 100644 --- a/include/asm-parisc/assembly.h +++ b/include/asm-parisc/assembly.h | |||
@@ -31,9 +31,13 @@ | |||
31 | #define STREGM std,ma | 31 | #define STREGM std,ma |
32 | #define SHRREG shrd | 32 | #define SHRREG shrd |
33 | #define SHLREG shld | 33 | #define SHLREG shld |
34 | #define ADDIB addib,* | ||
35 | #define CMPB cmpb,* | ||
36 | #define ANDCM andcm,* | ||
34 | #define RP_OFFSET 16 | 37 | #define RP_OFFSET 16 |
35 | #define FRAME_SIZE 128 | 38 | #define FRAME_SIZE 128 |
36 | #define CALLEE_REG_FRAME_SIZE 144 | 39 | #define CALLEE_REG_FRAME_SIZE 144 |
40 | #define ASM_ULONG_INSN .dword | ||
37 | #else /* CONFIG_64BIT */ | 41 | #else /* CONFIG_64BIT */ |
38 | #define LDREG ldw | 42 | #define LDREG ldw |
39 | #define STREG stw | 43 | #define STREG stw |
@@ -42,9 +46,13 @@ | |||
42 | #define STREGM stwm | 46 | #define STREGM stwm |
43 | #define SHRREG shr | 47 | #define SHRREG shr |
44 | #define SHLREG shlw | 48 | #define SHLREG shlw |
49 | #define ADDIB addib, | ||
50 | #define CMPB cmpb, | ||
51 | #define ANDCM andcm | ||
45 | #define RP_OFFSET 20 | 52 | #define RP_OFFSET 20 |
46 | #define FRAME_SIZE 64 | 53 | #define FRAME_SIZE 64 |
47 | #define CALLEE_REG_FRAME_SIZE 128 | 54 | #define CALLEE_REG_FRAME_SIZE 128 |
55 | #define ASM_ULONG_INSN .word | ||
48 | #endif | 56 | #endif |
49 | 57 | ||
50 | #define CALLEE_SAVE_FRAME_SIZE (CALLEE_REG_FRAME_SIZE + CALLEE_FLOAT_FRAME_SIZE) | 58 | #define CALLEE_SAVE_FRAME_SIZE (CALLEE_REG_FRAME_SIZE + CALLEE_FLOAT_FRAME_SIZE) |
@@ -65,7 +73,7 @@ | |||
65 | 73 | ||
66 | #ifdef __ASSEMBLY__ | 74 | #ifdef __ASSEMBLY__ |
67 | 75 | ||
68 | #ifdef __LP64__ | 76 | #ifdef CONFIG_64BIT |
69 | /* the 64-bit pa gnu assembler unfortunately defaults to .level 1.1 or 2.0 so | 77 | /* the 64-bit pa gnu assembler unfortunately defaults to .level 1.1 or 2.0 so |
70 | * work around that for now... */ | 78 | * work around that for now... */ |
71 | .level 2.0w | 79 | .level 2.0w |
@@ -156,7 +164,7 @@ | |||
156 | .endm | 164 | .endm |
157 | 165 | ||
158 | .macro loadgp | 166 | .macro loadgp |
159 | #ifdef __LP64__ | 167 | #ifdef CONFIG_64BIT |
160 | ldil L%__gp, %r27 | 168 | ldil L%__gp, %r27 |
161 | ldo R%__gp(%r27), %r27 | 169 | ldo R%__gp(%r27), %r27 |
162 | #else | 170 | #else |
@@ -334,7 +342,7 @@ | |||
334 | fldd,mb -8(%r30), %fr12 | 342 | fldd,mb -8(%r30), %fr12 |
335 | .endm | 343 | .endm |
336 | 344 | ||
337 | #ifdef __LP64__ | 345 | #ifdef CONFIG_64BIT |
338 | .macro callee_save | 346 | .macro callee_save |
339 | std,ma %r3, CALLEE_REG_FRAME_SIZE(%r30) | 347 | std,ma %r3, CALLEE_REG_FRAME_SIZE(%r30) |
340 | mfctl %cr27, %r3 | 348 | mfctl %cr27, %r3 |
@@ -377,7 +385,7 @@ | |||
377 | ldd,mb -CALLEE_REG_FRAME_SIZE(%r30), %r3 | 385 | ldd,mb -CALLEE_REG_FRAME_SIZE(%r30), %r3 |
378 | .endm | 386 | .endm |
379 | 387 | ||
380 | #else /* ! __LP64__ */ | 388 | #else /* ! CONFIG_64BIT */ |
381 | 389 | ||
382 | .macro callee_save | 390 | .macro callee_save |
383 | stw,ma %r3, CALLEE_REG_FRAME_SIZE(%r30) | 391 | stw,ma %r3, CALLEE_REG_FRAME_SIZE(%r30) |
@@ -420,7 +428,7 @@ | |||
420 | mtctl %r3, %cr27 | 428 | mtctl %r3, %cr27 |
421 | ldw,mb -CALLEE_REG_FRAME_SIZE(%r30), %r3 | 429 | ldw,mb -CALLEE_REG_FRAME_SIZE(%r30), %r3 |
422 | .endm | 430 | .endm |
423 | #endif /* ! __LP64__ */ | 431 | #endif /* ! CONFIG_64BIT */ |
424 | 432 | ||
425 | .macro save_specials regs | 433 | .macro save_specials regs |
426 | 434 | ||
@@ -441,7 +449,7 @@ | |||
441 | mtctl %r0, %cr18 | 449 | mtctl %r0, %cr18 |
442 | SAVE_CR (%cr18, PT_IAOQ1(\regs)) | 450 | SAVE_CR (%cr18, PT_IAOQ1(\regs)) |
443 | 451 | ||
444 | #ifdef __LP64__ | 452 | #ifdef CONFIG_64BIT |
445 | /* cr11 (sar) is a funny one. 5 bits on PA1.1 and 6 bit on PA2.0 | 453 | /* cr11 (sar) is a funny one. 5 bits on PA1.1 and 6 bit on PA2.0 |
446 | * For PA2.0 mtsar or mtctl always write 6 bits, but mfctl only | 454 | * For PA2.0 mtsar or mtctl always write 6 bits, but mfctl only |
447 | * reads 5 bits. Use mfctl,w to read all six bits. Otherwise | 455 | * reads 5 bits. Use mfctl,w to read all six bits. Otherwise |
diff --git a/include/asm-parisc/atomic.h b/include/asm-parisc/atomic.h index 48bf9b8ab8ff..7d57d34fcca8 100644 --- a/include/asm-parisc/atomic.h +++ b/include/asm-parisc/atomic.h | |||
@@ -58,7 +58,7 @@ extern void __xchg_called_with_bad_pointer(void); | |||
58 | /* __xchg32/64 defined in arch/parisc/lib/bitops.c */ | 58 | /* __xchg32/64 defined in arch/parisc/lib/bitops.c */ |
59 | extern unsigned long __xchg8(char, char *); | 59 | extern unsigned long __xchg8(char, char *); |
60 | extern unsigned long __xchg32(int, int *); | 60 | extern unsigned long __xchg32(int, int *); |
61 | #ifdef __LP64__ | 61 | #ifdef CONFIG_64BIT |
62 | extern unsigned long __xchg64(unsigned long, unsigned long *); | 62 | extern unsigned long __xchg64(unsigned long, unsigned long *); |
63 | #endif | 63 | #endif |
64 | 64 | ||
@@ -67,7 +67,7 @@ static __inline__ unsigned long | |||
67 | __xchg(unsigned long x, __volatile__ void * ptr, int size) | 67 | __xchg(unsigned long x, __volatile__ void * ptr, int size) |
68 | { | 68 | { |
69 | switch(size) { | 69 | switch(size) { |
70 | #ifdef __LP64__ | 70 | #ifdef CONFIG_64BIT |
71 | case 8: return __xchg64(x,(unsigned long *) ptr); | 71 | case 8: return __xchg64(x,(unsigned long *) ptr); |
72 | #endif | 72 | #endif |
73 | case 4: return __xchg32((int) x, (int *) ptr); | 73 | case 4: return __xchg32((int) x, (int *) ptr); |
@@ -81,7 +81,7 @@ __xchg(unsigned long x, __volatile__ void * ptr, int size) | |||
81 | /* | 81 | /* |
82 | ** REVISIT - Abandoned use of LDCW in xchg() for now: | 82 | ** REVISIT - Abandoned use of LDCW in xchg() for now: |
83 | ** o need to test sizeof(*ptr) to avoid clearing adjacent bytes | 83 | ** o need to test sizeof(*ptr) to avoid clearing adjacent bytes |
84 | ** o and while we are at it, could __LP64__ code use LDCD too? | 84 | ** o and while we are at it, could CONFIG_64BIT code use LDCD too? |
85 | ** | 85 | ** |
86 | ** if (__builtin_constant_p(x) && (x == NULL)) | 86 | ** if (__builtin_constant_p(x) && (x == NULL)) |
87 | ** if (((unsigned long)p & 0xf) == 0) | 87 | ** if (((unsigned long)p & 0xf) == 0) |
@@ -105,7 +105,7 @@ static __inline__ unsigned long | |||
105 | __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new_, int size) | 105 | __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new_, int size) |
106 | { | 106 | { |
107 | switch(size) { | 107 | switch(size) { |
108 | #ifdef __LP64__ | 108 | #ifdef CONFIG_64BIT |
109 | case 8: return __cmpxchg_u64((unsigned long *)ptr, old, new_); | 109 | case 8: return __cmpxchg_u64((unsigned long *)ptr, old, new_); |
110 | #endif | 110 | #endif |
111 | case 4: return __cmpxchg_u32((unsigned int *)ptr, (unsigned int) old, (unsigned int) new_); | 111 | case 4: return __cmpxchg_u32((unsigned int *)ptr, (unsigned int) old, (unsigned int) new_); |
@@ -218,7 +218,7 @@ static __inline__ int atomic_read(const atomic_t *v) | |||
218 | #define smp_mb__before_atomic_inc() smp_mb() | 218 | #define smp_mb__before_atomic_inc() smp_mb() |
219 | #define smp_mb__after_atomic_inc() smp_mb() | 219 | #define smp_mb__after_atomic_inc() smp_mb() |
220 | 220 | ||
221 | #ifdef __LP64__ | 221 | #ifdef CONFIG_64BIT |
222 | 222 | ||
223 | typedef struct { volatile s64 counter; } atomic64_t; | 223 | typedef struct { volatile s64 counter; } atomic64_t; |
224 | 224 | ||
@@ -270,7 +270,7 @@ atomic64_read(const atomic64_t *v) | |||
270 | #define atomic64_dec_and_test(v) (atomic64_dec_return(v) == 0) | 270 | #define atomic64_dec_and_test(v) (atomic64_dec_return(v) == 0) |
271 | #define atomic64_sub_and_test(i,v) (atomic64_sub_return((i),(v)) == 0) | 271 | #define atomic64_sub_and_test(i,v) (atomic64_sub_return((i),(v)) == 0) |
272 | 272 | ||
273 | #endif /* __LP64__ */ | 273 | #endif /* CONFIG_64BIT */ |
274 | 274 | ||
275 | #include <asm-generic/atomic.h> | 275 | #include <asm-generic/atomic.h> |
276 | 276 | ||
diff --git a/include/asm-parisc/bitops.h b/include/asm-parisc/bitops.h index 900561922c4c..015cb0d379bd 100644 --- a/include/asm-parisc/bitops.h +++ b/include/asm-parisc/bitops.h | |||
@@ -60,31 +60,37 @@ static __inline__ void change_bit(int nr, volatile unsigned long * addr) | |||
60 | static __inline__ int test_and_set_bit(int nr, volatile unsigned long * addr) | 60 | static __inline__ int test_and_set_bit(int nr, volatile unsigned long * addr) |
61 | { | 61 | { |
62 | unsigned long mask = 1UL << CHOP_SHIFTCOUNT(nr); | 62 | unsigned long mask = 1UL << CHOP_SHIFTCOUNT(nr); |
63 | unsigned long oldbit; | 63 | unsigned long old; |
64 | unsigned long flags; | 64 | unsigned long flags; |
65 | int set; | ||
65 | 66 | ||
66 | addr += (nr >> SHIFT_PER_LONG); | 67 | addr += (nr >> SHIFT_PER_LONG); |
67 | _atomic_spin_lock_irqsave(addr, flags); | 68 | _atomic_spin_lock_irqsave(addr, flags); |
68 | oldbit = *addr; | 69 | old = *addr; |
69 | *addr = oldbit | mask; | 70 | set = (old & mask) ? 1 : 0; |
71 | if (!set) | ||
72 | *addr = old | mask; | ||
70 | _atomic_spin_unlock_irqrestore(addr, flags); | 73 | _atomic_spin_unlock_irqrestore(addr, flags); |
71 | 74 | ||
72 | return (oldbit & mask) ? 1 : 0; | 75 | return set; |
73 | } | 76 | } |
74 | 77 | ||
75 | static __inline__ int test_and_clear_bit(int nr, volatile unsigned long * addr) | 78 | static __inline__ int test_and_clear_bit(int nr, volatile unsigned long * addr) |
76 | { | 79 | { |
77 | unsigned long mask = 1UL << CHOP_SHIFTCOUNT(nr); | 80 | unsigned long mask = 1UL << CHOP_SHIFTCOUNT(nr); |
78 | unsigned long oldbit; | 81 | unsigned long old; |
79 | unsigned long flags; | 82 | unsigned long flags; |
83 | int set; | ||
80 | 84 | ||
81 | addr += (nr >> SHIFT_PER_LONG); | 85 | addr += (nr >> SHIFT_PER_LONG); |
82 | _atomic_spin_lock_irqsave(addr, flags); | 86 | _atomic_spin_lock_irqsave(addr, flags); |
83 | oldbit = *addr; | 87 | old = *addr; |
84 | *addr = oldbit & ~mask; | 88 | set = (old & mask) ? 1 : 0; |
89 | if (set) | ||
90 | *addr = old & ~mask; | ||
85 | _atomic_spin_unlock_irqrestore(addr, flags); | 91 | _atomic_spin_unlock_irqrestore(addr, flags); |
86 | 92 | ||
87 | return (oldbit & mask) ? 1 : 0; | 93 | return set; |
88 | } | 94 | } |
89 | 95 | ||
90 | static __inline__ int test_and_change_bit(int nr, volatile unsigned long * addr) | 96 | static __inline__ int test_and_change_bit(int nr, volatile unsigned long * addr) |
@@ -130,7 +136,7 @@ static __inline__ unsigned long __ffs(unsigned long x) | |||
130 | unsigned long ret; | 136 | unsigned long ret; |
131 | 137 | ||
132 | __asm__( | 138 | __asm__( |
133 | #ifdef __LP64__ | 139 | #ifdef CONFIG_64BIT |
134 | " ldi 63,%1\n" | 140 | " ldi 63,%1\n" |
135 | " extrd,u,*<> %0,63,32,%%r0\n" | 141 | " extrd,u,*<> %0,63,32,%%r0\n" |
136 | " extrd,u,*TR %0,31,32,%0\n" /* move top 32-bits down */ | 142 | " extrd,u,*TR %0,31,32,%0\n" /* move top 32-bits down */ |
diff --git a/include/asm-parisc/bug.h b/include/asm-parisc/bug.h index 695588da41f8..83ba510ed5d8 100644 --- a/include/asm-parisc/bug.h +++ b/include/asm-parisc/bug.h | |||
@@ -1,14 +1,92 @@ | |||
1 | #ifndef _PARISC_BUG_H | 1 | #ifndef _PARISC_BUG_H |
2 | #define _PARISC_BUG_H | 2 | #define _PARISC_BUG_H |
3 | 3 | ||
4 | /* | ||
5 | * Tell the user there is some problem. | ||
6 | * The offending file and line are encoded in the __bug_table section. | ||
7 | */ | ||
8 | |||
4 | #ifdef CONFIG_BUG | 9 | #ifdef CONFIG_BUG |
5 | #define HAVE_ARCH_BUG | 10 | #define HAVE_ARCH_BUG |
6 | #define BUG() do { \ | 11 | #define HAVE_ARCH_WARN_ON |
7 | printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \ | 12 | |
8 | dump_stack(); \ | 13 | /* the break instruction is used as BUG() marker. */ |
9 | panic("BUG!"); \ | 14 | #define PARISC_BUG_BREAK_ASM "break 0x1f, 0x1fff" |
10 | } while (0) | 15 | #define PARISC_BUG_BREAK_INSN 0x03ffe01f /* PARISC_BUG_BREAK_ASM */ |
16 | |||
17 | #if defined(CONFIG_64BIT) | ||
18 | #define ASM_WORD_INSN ".dword\t" | ||
19 | #else | ||
20 | #define ASM_WORD_INSN ".word\t" | ||
21 | #endif | ||
22 | |||
23 | #ifdef CONFIG_DEBUG_BUGVERBOSE | ||
24 | #define BUG() \ | ||
25 | do { \ | ||
26 | asm volatile("\n" \ | ||
27 | "1:\t" PARISC_BUG_BREAK_ASM "\n" \ | ||
28 | "\t.pushsection __bug_table,\"a\"\n" \ | ||
29 | "2:\t" ASM_WORD_INSN "1b, %c0\n" \ | ||
30 | "\t.short %c1, %c2\n" \ | ||
31 | "\t.org 2b+%c3\n" \ | ||
32 | "\t.popsection" \ | ||
33 | : : "i" (__FILE__), "i" (__LINE__), \ | ||
34 | "i" (0), "i" (sizeof(struct bug_entry)) ); \ | ||
35 | for(;;) ; \ | ||
36 | } while(0) | ||
37 | |||
38 | #else | ||
39 | #define BUG() \ | ||
40 | do { \ | ||
41 | asm volatile(PARISC_BUG_BREAK_ASM : : ); \ | ||
42 | for(;;) ; \ | ||
43 | } while(0) | ||
44 | #endif | ||
45 | |||
46 | #ifdef CONFIG_DEBUG_BUGVERBOSE | ||
47 | #define __WARN() \ | ||
48 | do { \ | ||
49 | asm volatile("\n" \ | ||
50 | "1:\t" PARISC_BUG_BREAK_ASM "\n" \ | ||
51 | "\t.pushsection __bug_table,\"a\"\n" \ | ||
52 | "2:\t" ASM_WORD_INSN "1b, %c0\n" \ | ||
53 | "\t.short %c1, %c2\n" \ | ||
54 | "\t.org 2b+%c3\n" \ | ||
55 | "\t.popsection" \ | ||
56 | : : "i" (__FILE__), "i" (__LINE__), \ | ||
57 | "i" (BUGFLAG_WARNING), \ | ||
58 | "i" (sizeof(struct bug_entry)) ); \ | ||
59 | } while(0) | ||
60 | #else | ||
61 | #define __WARN() \ | ||
62 | do { \ | ||
63 | asm volatile("\n" \ | ||
64 | "1:\t" PARISC_BUG_BREAK_ASM "\n" \ | ||
65 | "\t.pushsection __bug_table,\"a\"\n" \ | ||
66 | "2:\t" ASM_WORD_INSN "1b\n" \ | ||
67 | "\t.short %c0\n" \ | ||
68 | "\t.org 2b+%c1\n" \ | ||
69 | "\t.popsection" \ | ||
70 | : : "i" (BUGFLAG_WARNING), \ | ||
71 | "i" (sizeof(struct bug_entry)) ); \ | ||
72 | } while(0) | ||
73 | #endif | ||
74 | |||
75 | |||
76 | #define WARN_ON(x) ({ \ | ||
77 | typeof(x) __ret_warn_on = (x); \ | ||
78 | if (__builtin_constant_p(__ret_warn_on)) { \ | ||
79 | if (__ret_warn_on) \ | ||
80 | __WARN(); \ | ||
81 | } else { \ | ||
82 | if (unlikely(__ret_warn_on)) \ | ||
83 | __WARN(); \ | ||
84 | } \ | ||
85 | unlikely(__ret_warn_on); \ | ||
86 | }) | ||
87 | |||
11 | #endif | 88 | #endif |
12 | 89 | ||
13 | #include <asm-generic/bug.h> | 90 | #include <asm-generic/bug.h> |
14 | #endif | 91 | #endif |
92 | |||
diff --git a/include/asm-parisc/cache.h b/include/asm-parisc/cache.h index 7d22fa206fc4..32c2cca74345 100644 --- a/include/asm-parisc/cache.h +++ b/include/asm-parisc/cache.h | |||
@@ -30,31 +30,11 @@ | |||
30 | 30 | ||
31 | #define __read_mostly __attribute__((__section__(".data.read_mostly"))) | 31 | #define __read_mostly __attribute__((__section__(".data.read_mostly"))) |
32 | 32 | ||
33 | extern void flush_data_cache_local(void *); /* flushes local data-cache only */ | 33 | void parisc_cache_init(void); /* initializes cache-flushing */ |
34 | extern void flush_instruction_cache_local(void *); /* flushes local code-cache only */ | 34 | void disable_sr_hashing_asm(int); /* low level support for above */ |
35 | #ifdef CONFIG_SMP | 35 | void disable_sr_hashing(void); /* turns off space register hashing */ |
36 | extern void flush_data_cache(void); /* flushes data-cache only (all processors) */ | 36 | void free_sid(unsigned long); |
37 | extern void flush_instruction_cache(void); /* flushes i-cache only (all processors) */ | ||
38 | #else | ||
39 | #define flush_data_cache() flush_data_cache_local(NULL) | ||
40 | #define flush_instruction_cache() flush_instruction_cache_local(NULL) | ||
41 | #endif | ||
42 | |||
43 | extern void parisc_cache_init(void); /* initializes cache-flushing */ | ||
44 | extern void flush_all_caches(void); /* flush everything (tlb & cache) */ | ||
45 | extern int get_cache_info(char *); | ||
46 | extern void flush_user_icache_range_asm(unsigned long, unsigned long); | ||
47 | extern void flush_kernel_icache_range_asm(unsigned long, unsigned long); | ||
48 | extern void flush_user_dcache_range_asm(unsigned long, unsigned long); | ||
49 | extern void flush_kernel_dcache_range_asm(unsigned long, unsigned long); | ||
50 | extern void flush_kernel_dcache_page_asm(void *); | ||
51 | extern void flush_kernel_icache_page(void *); | ||
52 | extern void disable_sr_hashing(void); /* turns off space register hashing */ | ||
53 | extern void disable_sr_hashing_asm(int); /* low level support for above */ | ||
54 | extern void free_sid(unsigned long); | ||
55 | unsigned long alloc_sid(void); | 37 | unsigned long alloc_sid(void); |
56 | extern void flush_user_dcache_page(unsigned long); | ||
57 | extern void flush_user_icache_page(unsigned long); | ||
58 | 38 | ||
59 | struct seq_file; | 39 | struct seq_file; |
60 | extern void show_cache_info(struct seq_file *m); | 40 | extern void show_cache_info(struct seq_file *m); |
@@ -63,6 +43,7 @@ extern int split_tlb; | |||
63 | extern int dcache_stride; | 43 | extern int dcache_stride; |
64 | extern int icache_stride; | 44 | extern int icache_stride; |
65 | extern struct pdc_cache_info cache_info; | 45 | extern struct pdc_cache_info cache_info; |
46 | void parisc_setup_cache_timing(void); | ||
66 | 47 | ||
67 | #define pdtlb(addr) asm volatile("pdtlb 0(%%sr1,%0)" : : "r" (addr)); | 48 | #define pdtlb(addr) asm volatile("pdtlb 0(%%sr1,%0)" : : "r" (addr)); |
68 | #define pitlb(addr) asm volatile("pitlb 0(%%sr1,%0)" : : "r" (addr)); | 49 | #define pitlb(addr) asm volatile("pitlb 0(%%sr1,%0)" : : "r" (addr)); |
diff --git a/include/asm-parisc/cacheflush.h b/include/asm-parisc/cacheflush.h index a799dd8ef395..2f1e1b05440a 100644 --- a/include/asm-parisc/cacheflush.h +++ b/include/asm-parisc/cacheflush.h | |||
@@ -2,60 +2,46 @@ | |||
2 | #define _PARISC_CACHEFLUSH_H | 2 | #define _PARISC_CACHEFLUSH_H |
3 | 3 | ||
4 | #include <linux/mm.h> | 4 | #include <linux/mm.h> |
5 | #include <asm/cache.h> /* for flush_user_dcache_range_asm() proto */ | ||
6 | 5 | ||
7 | /* The usual comment is "Caches aren't brain-dead on the <architecture>". | 6 | /* The usual comment is "Caches aren't brain-dead on the <architecture>". |
8 | * Unfortunately, that doesn't apply to PA-RISC. */ | 7 | * Unfortunately, that doesn't apply to PA-RISC. */ |
9 | 8 | ||
10 | /* Cache flush operations */ | 9 | /* Internal implementation */ |
11 | 10 | void flush_data_cache_local(void *); /* flushes local data-cache only */ | |
11 | void flush_instruction_cache_local(void *); /* flushes local code-cache only */ | ||
12 | #ifdef CONFIG_SMP | 12 | #ifdef CONFIG_SMP |
13 | #define flush_cache_mm(mm) flush_cache_all() | 13 | void flush_data_cache(void); /* flushes data-cache only (all processors) */ |
14 | void flush_instruction_cache(void); /* flushes i-cache only (all processors) */ | ||
14 | #else | 15 | #else |
15 | #define flush_cache_mm(mm) flush_cache_all_local() | 16 | #define flush_data_cache() flush_data_cache_local(NULL) |
17 | #define flush_instruction_cache() flush_instruction_cache_local(NULL) | ||
16 | #endif | 18 | #endif |
17 | 19 | ||
18 | #define flush_cache_dup_mm(mm) flush_cache_mm(mm) | 20 | #define flush_cache_dup_mm(mm) flush_cache_mm(mm) |
19 | 21 | ||
20 | #define flush_kernel_dcache_range(start,size) \ | 22 | void flush_user_icache_range_asm(unsigned long, unsigned long); |
21 | flush_kernel_dcache_range_asm((start), (start)+(size)); | 23 | void flush_kernel_icache_range_asm(unsigned long, unsigned long); |
24 | void flush_user_dcache_range_asm(unsigned long, unsigned long); | ||
25 | void flush_kernel_dcache_range_asm(unsigned long, unsigned long); | ||
26 | void flush_kernel_dcache_page_asm(void *); | ||
27 | void flush_kernel_icache_page(void *); | ||
28 | void flush_user_dcache_page(unsigned long); | ||
29 | void flush_user_icache_page(unsigned long); | ||
30 | void flush_user_dcache_range(unsigned long, unsigned long); | ||
31 | void flush_user_icache_range(unsigned long, unsigned long); | ||
22 | 32 | ||
23 | extern void flush_cache_all_local(void); | 33 | /* Cache flush operations */ |
24 | 34 | ||
25 | static inline void cacheflush_h_tmp_function(void *dummy) | 35 | void flush_cache_all_local(void); |
26 | { | 36 | void flush_cache_all(void); |
27 | flush_cache_all_local(); | 37 | void flush_cache_mm(struct mm_struct *mm); |
28 | } | ||
29 | 38 | ||
30 | static inline void flush_cache_all(void) | 39 | #define flush_kernel_dcache_range(start,size) \ |
31 | { | 40 | flush_kernel_dcache_range_asm((start), (start)+(size)); |
32 | on_each_cpu(cacheflush_h_tmp_function, NULL, 1, 1); | ||
33 | } | ||
34 | 41 | ||
35 | #define flush_cache_vmap(start, end) flush_cache_all() | 42 | #define flush_cache_vmap(start, end) flush_cache_all() |
36 | #define flush_cache_vunmap(start, end) flush_cache_all() | 43 | #define flush_cache_vunmap(start, end) flush_cache_all() |
37 | 44 | ||
38 | extern int parisc_cache_flush_threshold; | ||
39 | void parisc_setup_cache_timing(void); | ||
40 | |||
41 | static inline void | ||
42 | flush_user_dcache_range(unsigned long start, unsigned long end) | ||
43 | { | ||
44 | if ((end - start) < parisc_cache_flush_threshold) | ||
45 | flush_user_dcache_range_asm(start,end); | ||
46 | else | ||
47 | flush_data_cache(); | ||
48 | } | ||
49 | |||
50 | static inline void | ||
51 | flush_user_icache_range(unsigned long start, unsigned long end) | ||
52 | { | ||
53 | if ((end - start) < parisc_cache_flush_threshold) | ||
54 | flush_user_icache_range_asm(start,end); | ||
55 | else | ||
56 | flush_instruction_cache(); | ||
57 | } | ||
58 | |||
59 | extern void flush_dcache_page(struct page *page); | 45 | extern void flush_dcache_page(struct page *page); |
60 | 46 | ||
61 | #define flush_dcache_mmap_lock(mapping) \ | 47 | #define flush_dcache_mmap_lock(mapping) \ |
@@ -63,9 +49,15 @@ extern void flush_dcache_page(struct page *page); | |||
63 | #define flush_dcache_mmap_unlock(mapping) \ | 49 | #define flush_dcache_mmap_unlock(mapping) \ |
64 | write_unlock_irq(&(mapping)->tree_lock) | 50 | write_unlock_irq(&(mapping)->tree_lock) |
65 | 51 | ||
66 | #define flush_icache_page(vma,page) do { flush_kernel_dcache_page(page); flush_kernel_icache_page(page_address(page)); } while (0) | 52 | #define flush_icache_page(vma,page) do { \ |
53 | flush_kernel_dcache_page(page); \ | ||
54 | flush_kernel_icache_page(page_address(page)); \ | ||
55 | } while (0) | ||
67 | 56 | ||
68 | #define flush_icache_range(s,e) do { flush_kernel_dcache_range_asm(s,e); flush_kernel_icache_range_asm(s,e); } while (0) | 57 | #define flush_icache_range(s,e) do { \ |
58 | flush_kernel_dcache_range_asm(s,e); \ | ||
59 | flush_kernel_icache_range_asm(s,e); \ | ||
60 | } while (0) | ||
69 | 61 | ||
70 | #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ | 62 | #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ |
71 | do { \ | 63 | do { \ |
@@ -80,118 +72,17 @@ do { \ | |||
80 | memcpy(dst, src, len); \ | 72 | memcpy(dst, src, len); \ |
81 | } while (0) | 73 | } while (0) |
82 | 74 | ||
83 | static inline void flush_cache_range(struct vm_area_struct *vma, | 75 | void flush_cache_page(struct vm_area_struct *vma, unsigned long vmaddr, unsigned long pfn); |
84 | unsigned long start, unsigned long end) | 76 | void flush_cache_range(struct vm_area_struct *vma, |
85 | { | 77 | unsigned long start, unsigned long end); |
86 | int sr3; | ||
87 | |||
88 | if (!vma->vm_mm->context) { | ||
89 | BUG(); | ||
90 | return; | ||
91 | } | ||
92 | |||
93 | sr3 = mfsp(3); | ||
94 | if (vma->vm_mm->context == sr3) { | ||
95 | flush_user_dcache_range(start,end); | ||
96 | flush_user_icache_range(start,end); | ||
97 | } else { | ||
98 | flush_cache_all(); | ||
99 | } | ||
100 | } | ||
101 | |||
102 | /* Simple function to work out if we have an existing address translation | ||
103 | * for a user space vma. */ | ||
104 | static inline int translation_exists(struct vm_area_struct *vma, | ||
105 | unsigned long addr, unsigned long pfn) | ||
106 | { | ||
107 | pgd_t *pgd = pgd_offset(vma->vm_mm, addr); | ||
108 | pmd_t *pmd; | ||
109 | pte_t pte; | ||
110 | |||
111 | if(pgd_none(*pgd)) | ||
112 | return 0; | ||
113 | |||
114 | pmd = pmd_offset(pgd, addr); | ||
115 | if(pmd_none(*pmd) || pmd_bad(*pmd)) | ||
116 | return 0; | ||
117 | |||
118 | /* We cannot take the pte lock here: flush_cache_page is usually | ||
119 | * called with pte lock already held. Whereas flush_dcache_page | ||
120 | * takes flush_dcache_mmap_lock, which is lower in the hierarchy: | ||
121 | * the vma itself is secure, but the pte might come or go racily. | ||
122 | */ | ||
123 | pte = *pte_offset_map(pmd, addr); | ||
124 | /* But pte_unmap() does nothing on this architecture */ | ||
125 | |||
126 | /* Filter out coincidental file entries and swap entries */ | ||
127 | if (!(pte_val(pte) & (_PAGE_FLUSH|_PAGE_PRESENT))) | ||
128 | return 0; | ||
129 | |||
130 | return pte_pfn(pte) == pfn; | ||
131 | } | ||
132 | |||
133 | /* Private function to flush a page from the cache of a non-current | ||
134 | * process. cr25 contains the Page Directory of the current user | ||
135 | * process; we're going to hijack both it and the user space %sr3 to | ||
136 | * temporarily make the non-current process current. We have to do | ||
137 | * this because cache flushing may cause a non-access tlb miss which | ||
138 | * the handlers have to fill in from the pgd of the non-current | ||
139 | * process. */ | ||
140 | static inline void | ||
141 | flush_user_cache_page_non_current(struct vm_area_struct *vma, | ||
142 | unsigned long vmaddr) | ||
143 | { | ||
144 | /* save the current process space and pgd */ | ||
145 | unsigned long space = mfsp(3), pgd = mfctl(25); | ||
146 | |||
147 | /* we don't mind taking interrups since they may not | ||
148 | * do anything with user space, but we can't | ||
149 | * be preempted here */ | ||
150 | preempt_disable(); | ||
151 | |||
152 | /* make us current */ | ||
153 | mtctl(__pa(vma->vm_mm->pgd), 25); | ||
154 | mtsp(vma->vm_mm->context, 3); | ||
155 | |||
156 | flush_user_dcache_page(vmaddr); | ||
157 | if(vma->vm_flags & VM_EXEC) | ||
158 | flush_user_icache_page(vmaddr); | ||
159 | |||
160 | /* put the old current process back */ | ||
161 | mtsp(space, 3); | ||
162 | mtctl(pgd, 25); | ||
163 | preempt_enable(); | ||
164 | } | ||
165 | |||
166 | static inline void | ||
167 | __flush_cache_page(struct vm_area_struct *vma, unsigned long vmaddr) | ||
168 | { | ||
169 | if (likely(vma->vm_mm->context == mfsp(3))) { | ||
170 | flush_user_dcache_page(vmaddr); | ||
171 | if (vma->vm_flags & VM_EXEC) | ||
172 | flush_user_icache_page(vmaddr); | ||
173 | } else { | ||
174 | flush_user_cache_page_non_current(vma, vmaddr); | ||
175 | } | ||
176 | } | ||
177 | |||
178 | static inline void | ||
179 | flush_cache_page(struct vm_area_struct *vma, unsigned long vmaddr, unsigned long pfn) | ||
180 | { | ||
181 | BUG_ON(!vma->vm_mm->context); | ||
182 | |||
183 | if (likely(translation_exists(vma, vmaddr, pfn))) | ||
184 | __flush_cache_page(vma, vmaddr); | ||
185 | |||
186 | } | ||
187 | 78 | ||
79 | #define ARCH_HAS_FLUSH_ANON_PAGE | ||
188 | static inline void | 80 | static inline void |
189 | flush_anon_page(struct vm_area_struct *vma, struct page *page, unsigned long vmaddr) | 81 | flush_anon_page(struct vm_area_struct *vma, struct page *page, unsigned long vmaddr) |
190 | { | 82 | { |
191 | if (PageAnon(page)) | 83 | if (PageAnon(page)) |
192 | flush_user_dcache_page(vmaddr); | 84 | flush_user_dcache_page(vmaddr); |
193 | } | 85 | } |
194 | #define ARCH_HAS_FLUSH_ANON_PAGE | ||
195 | 86 | ||
196 | #define ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE | 87 | #define ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE |
197 | void flush_kernel_dcache_page_addr(void *addr); | 88 | void flush_kernel_dcache_page_addr(void *addr); |
diff --git a/include/asm-parisc/dma-mapping.h b/include/asm-parisc/dma-mapping.h index 66f0b408c669..c6c0e9ff6bde 100644 --- a/include/asm-parisc/dma-mapping.h +++ b/include/asm-parisc/dma-mapping.h | |||
@@ -236,7 +236,7 @@ int ccio_allocate_resource(const struct parisc_device *dev, | |||
236 | unsigned long min, unsigned long max, unsigned long align); | 236 | unsigned long min, unsigned long max, unsigned long align); |
237 | #else /* !CONFIG_IOMMU_CCIO */ | 237 | #else /* !CONFIG_IOMMU_CCIO */ |
238 | #define ccio_get_iommu(dev) NULL | 238 | #define ccio_get_iommu(dev) NULL |
239 | #define ccio_request_resource(dev, res) request_resource(&iomem_resource, res) | 239 | #define ccio_request_resource(dev, res) insert_resource(&iomem_resource, res) |
240 | #define ccio_allocate_resource(dev, res, size, min, max, align) \ | 240 | #define ccio_allocate_resource(dev, res, size, min, max, align) \ |
241 | allocate_resource(&iomem_resource, res, size, min, max, \ | 241 | allocate_resource(&iomem_resource, res, size, min, max, \ |
242 | align, NULL, NULL) | 242 | align, NULL, NULL) |
diff --git a/include/asm-parisc/elf.h b/include/asm-parisc/elf.h index adea65fc43c9..f628ac7de83d 100644 --- a/include/asm-parisc/elf.h +++ b/include/asm-parisc/elf.h | |||
@@ -220,7 +220,7 @@ typedef struct elf64_fdesc { | |||
220 | * macros, and then it includes fs/binfmt_elf.c to provide an alternate | 220 | * macros, and then it includes fs/binfmt_elf.c to provide an alternate |
221 | * elf binary handler for 32 bit binaries (on the 64 bit kernel). | 221 | * elf binary handler for 32 bit binaries (on the 64 bit kernel). |
222 | */ | 222 | */ |
223 | #ifdef __LP64__ | 223 | #ifdef CONFIG_64BIT |
224 | #define ELF_CLASS ELFCLASS64 | 224 | #define ELF_CLASS ELFCLASS64 |
225 | #else | 225 | #else |
226 | #define ELF_CLASS ELFCLASS32 | 226 | #define ELF_CLASS ELFCLASS32 |
diff --git a/include/asm-parisc/hardware.h b/include/asm-parisc/hardware.h index 106d3f7cd882..76d880dc4bae 100644 --- a/include/asm-parisc/hardware.h +++ b/include/asm-parisc/hardware.h | |||
@@ -1,19 +1,13 @@ | |||
1 | #ifndef _PARISC_HARDWARE_H | 1 | #ifndef _PARISC_HARDWARE_H |
2 | #define _PARISC_HARDWARE_H | 2 | #define _PARISC_HARDWARE_H |
3 | 3 | ||
4 | #include <linux/mod_devicetable.h> | ||
4 | #include <asm/pdc.h> | 5 | #include <asm/pdc.h> |
5 | 6 | ||
6 | struct parisc_device_id { | 7 | #define HWTYPE_ANY_ID PA_HWTYPE_ANY_ID |
7 | unsigned char hw_type; /* 5 bits used */ | 8 | #define HVERSION_ANY_ID PA_HVERSION_ANY_ID |
8 | unsigned char hversion_rev; /* 4 bits */ | 9 | #define HVERSION_REV_ANY_ID PA_HVERSION_REV_ANY_ID |
9 | unsigned short hversion; /* 12 bits */ | 10 | #define SVERSION_ANY_ID PA_SVERSION_ANY_ID |
10 | unsigned int sversion; /* 20 bits */ | ||
11 | }; | ||
12 | |||
13 | #define HWTYPE_ANY_ID 0xff | ||
14 | #define HVERSION_REV_ANY_ID 0xff | ||
15 | #define HVERSION_ANY_ID 0xffff | ||
16 | #define SVERSION_ANY_ID 0xffffffffU | ||
17 | 11 | ||
18 | struct hp_hardware { | 12 | struct hp_hardware { |
19 | unsigned short hw_type:5; /* HPHW_xxx */ | 13 | unsigned short hw_type:5; /* HPHW_xxx */ |
diff --git a/include/asm-parisc/io.h b/include/asm-parisc/io.h index ca46e7cc0940..c0fed91da3a2 100644 --- a/include/asm-parisc/io.h +++ b/include/asm-parisc/io.h | |||
@@ -67,7 +67,7 @@ static inline unsigned long long gsc_readq(unsigned long addr) | |||
67 | { | 67 | { |
68 | unsigned long long ret; | 68 | unsigned long long ret; |
69 | 69 | ||
70 | #ifdef __LP64__ | 70 | #ifdef CONFIG_64BIT |
71 | __asm__ __volatile__( | 71 | __asm__ __volatile__( |
72 | " ldda 0(%1),%0\n" | 72 | " ldda 0(%1),%0\n" |
73 | : "=r" (ret) : "r" (addr) ); | 73 | : "=r" (ret) : "r" (addr) ); |
@@ -108,7 +108,7 @@ static inline void gsc_writel(unsigned int val, unsigned long addr) | |||
108 | 108 | ||
109 | static inline void gsc_writeq(unsigned long long val, unsigned long addr) | 109 | static inline void gsc_writeq(unsigned long long val, unsigned long addr) |
110 | { | 110 | { |
111 | #ifdef __LP64__ | 111 | #ifdef CONFIG_64BIT |
112 | __asm__ __volatile__( | 112 | __asm__ __volatile__( |
113 | " stda %0,0(%1)\n" | 113 | " stda %0,0(%1)\n" |
114 | : : "r" (val), "r" (addr) ); | 114 | : : "r" (val), "r" (addr) ); |
diff --git a/include/asm-parisc/led.h b/include/asm-parisc/led.h index efadfd543ec6..c3405ab9d60a 100644 --- a/include/asm-parisc/led.h +++ b/include/asm-parisc/led.h | |||
@@ -31,7 +31,7 @@ void __init register_led_regions(void); | |||
31 | 31 | ||
32 | #ifdef CONFIG_CHASSIS_LCD_LED | 32 | #ifdef CONFIG_CHASSIS_LCD_LED |
33 | /* writes a string to the LCD display (if possible on this h/w) */ | 33 | /* writes a string to the LCD display (if possible on this h/w) */ |
34 | int lcd_print(char *str); | 34 | int lcd_print(const char *str); |
35 | #else | 35 | #else |
36 | #define lcd_print(str) | 36 | #define lcd_print(str) |
37 | #endif | 37 | #endif |
diff --git a/include/asm-parisc/linkage.h b/include/asm-parisc/linkage.h index 291c2d01c44f..7a09d911b538 100644 --- a/include/asm-parisc/linkage.h +++ b/include/asm-parisc/linkage.h | |||
@@ -1,6 +1,28 @@ | |||
1 | #ifndef __ASM_LINKAGE_H | 1 | #ifndef __ASM_PARISC_LINKAGE_H |
2 | #define __ASM_LINKAGE_H | 2 | #define __ASM_PARISC_LINKAGE_H |
3 | 3 | ||
4 | /* Nothing to see here... */ | 4 | #ifndef __ALIGN |
5 | #define __ALIGN .align 4 | ||
6 | #define __ALIGN_STR ".align 4" | ||
7 | #endif | ||
8 | |||
9 | /* | ||
10 | * In parisc assembly a semicolon marks a comment while a | ||
11 | * exclamation mark is used to seperate independend lines. | ||
12 | */ | ||
13 | #define ENTRY(name) \ | ||
14 | .export name !\ | ||
15 | ALIGN !\ | ||
16 | name: | ||
5 | 17 | ||
18 | #ifdef CONFIG_64BIT | ||
19 | #define ENDPROC(name) \ | ||
20 | END(name) | ||
21 | #else | ||
22 | #define ENDPROC(name) \ | ||
23 | .type name, @function !\ | ||
24 | END(name) | ||
6 | #endif | 25 | #endif |
26 | |||
27 | |||
28 | #endif /* __ASM_PARISC_LINKAGE_H */ | ||
diff --git a/include/asm-parisc/mman.h b/include/asm-parisc/mman.h index 0ef15ee0f17e..defe752cc996 100644 --- a/include/asm-parisc/mman.h +++ b/include/asm-parisc/mman.h | |||
@@ -55,7 +55,6 @@ | |||
55 | #define MADV_64M_PAGES 26 /* Use 64 Megabyte pages */ | 55 | #define MADV_64M_PAGES 26 /* Use 64 Megabyte pages */ |
56 | 56 | ||
57 | /* compatibility flags */ | 57 | /* compatibility flags */ |
58 | #define MAP_ANON MAP_ANONYMOUS | ||
59 | #define MAP_FILE 0 | 58 | #define MAP_FILE 0 |
60 | #define MAP_VARIABLE 0 | 59 | #define MAP_VARIABLE 0 |
61 | 60 | ||
diff --git a/include/asm-parisc/mmzone.h b/include/asm-parisc/mmzone.h index c87813662d4d..9608d2cf214a 100644 --- a/include/asm-parisc/mmzone.h +++ b/include/asm-parisc/mmzone.h | |||
@@ -35,7 +35,7 @@ extern struct node_map_data node_data[]; | |||
35 | #define PFNNID_MAP_MAX 512 /* support 512GB */ | 35 | #define PFNNID_MAP_MAX 512 /* support 512GB */ |
36 | extern unsigned char pfnnid_map[PFNNID_MAP_MAX]; | 36 | extern unsigned char pfnnid_map[PFNNID_MAP_MAX]; |
37 | 37 | ||
38 | #ifndef __LP64__ | 38 | #ifndef CONFIG_64BIT |
39 | #define pfn_is_io(pfn) ((pfn & (0xf0000000UL >> PAGE_SHIFT)) == (0xf0000000UL >> PAGE_SHIFT)) | 39 | #define pfn_is_io(pfn) ((pfn & (0xf0000000UL >> PAGE_SHIFT)) == (0xf0000000UL >> PAGE_SHIFT)) |
40 | #else | 40 | #else |
41 | /* io can be 0xf0f0f0f0f0xxxxxx or 0xfffffffff0000000 */ | 41 | /* io can be 0xf0f0f0f0f0xxxxxx or 0xfffffffff0000000 */ |
diff --git a/include/asm-parisc/module.h b/include/asm-parisc/module.h index 00f06885f843..c2cb49e934c1 100644 --- a/include/asm-parisc/module.h +++ b/include/asm-parisc/module.h | |||
@@ -3,7 +3,7 @@ | |||
3 | /* | 3 | /* |
4 | * This file contains the parisc architecture specific module code. | 4 | * This file contains the parisc architecture specific module code. |
5 | */ | 5 | */ |
6 | #ifdef __LP64__ | 6 | #ifdef CONFIG_64BIT |
7 | #define Elf_Shdr Elf64_Shdr | 7 | #define Elf_Shdr Elf64_Shdr |
8 | #define Elf_Sym Elf64_Sym | 8 | #define Elf_Sym Elf64_Sym |
9 | #define Elf_Ehdr Elf64_Ehdr | 9 | #define Elf_Ehdr Elf64_Ehdr |
diff --git a/include/asm-parisc/msgbuf.h b/include/asm-parisc/msgbuf.h index 14ffc2782f1e..fe88f2649418 100644 --- a/include/asm-parisc/msgbuf.h +++ b/include/asm-parisc/msgbuf.h | |||
@@ -13,15 +13,15 @@ | |||
13 | 13 | ||
14 | struct msqid64_ds { | 14 | struct msqid64_ds { |
15 | struct ipc64_perm msg_perm; | 15 | struct ipc64_perm msg_perm; |
16 | #ifndef __LP64__ | 16 | #ifndef CONFIG_64BIT |
17 | unsigned int __pad1; | 17 | unsigned int __pad1; |
18 | #endif | 18 | #endif |
19 | __kernel_time_t msg_stime; /* last msgsnd time */ | 19 | __kernel_time_t msg_stime; /* last msgsnd time */ |
20 | #ifndef __LP64__ | 20 | #ifndef CONFIG_64BIT |
21 | unsigned int __pad2; | 21 | unsigned int __pad2; |
22 | #endif | 22 | #endif |
23 | __kernel_time_t msg_rtime; /* last msgrcv time */ | 23 | __kernel_time_t msg_rtime; /* last msgrcv time */ |
24 | #ifndef __LP64__ | 24 | #ifndef CONFIG_64BIT |
25 | unsigned int __pad3; | 25 | unsigned int __pad3; |
26 | #endif | 26 | #endif |
27 | __kernel_time_t msg_ctime; /* last change time */ | 27 | __kernel_time_t msg_ctime; /* last change time */ |
diff --git a/include/asm-parisc/page.h b/include/asm-parisc/page.h index 3567208191e3..f6bba4c13664 100644 --- a/include/asm-parisc/page.h +++ b/include/asm-parisc/page.h | |||
@@ -105,7 +105,7 @@ extern int npmem_ranges; | |||
105 | /* WARNING: The definitions below must match exactly to sizeof(pte_t) | 105 | /* WARNING: The definitions below must match exactly to sizeof(pte_t) |
106 | * etc | 106 | * etc |
107 | */ | 107 | */ |
108 | #ifdef __LP64__ | 108 | #ifdef CONFIG_64BIT |
109 | #define BITS_PER_PTE_ENTRY 3 | 109 | #define BITS_PER_PTE_ENTRY 3 |
110 | #define BITS_PER_PMD_ENTRY 2 | 110 | #define BITS_PER_PMD_ENTRY 2 |
111 | #define BITS_PER_PGD_ENTRY 2 | 111 | #define BITS_PER_PGD_ENTRY 2 |
@@ -127,7 +127,11 @@ extern int npmem_ranges; | |||
127 | /* This governs the relationship between virtual and physical addresses. | 127 | /* This governs the relationship between virtual and physical addresses. |
128 | * If you alter it, make sure to take care of our various fixed mapping | 128 | * If you alter it, make sure to take care of our various fixed mapping |
129 | * segments in fixmap.h */ | 129 | * segments in fixmap.h */ |
130 | #define __PAGE_OFFSET (0x10000000) | 130 | #ifdef CONFIG_64BIT |
131 | #define __PAGE_OFFSET (0x40000000) /* 1GB */ | ||
132 | #else | ||
133 | #define __PAGE_OFFSET (0x10000000) /* 256MB */ | ||
134 | #endif | ||
131 | 135 | ||
132 | #define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET) | 136 | #define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET) |
133 | 137 | ||
diff --git a/include/asm-parisc/parisc-device.h b/include/asm-parisc/parisc-device.h index e12624d8941d..7aa13f2add7a 100644 --- a/include/asm-parisc/parisc-device.h +++ b/include/asm-parisc/parisc-device.h | |||
@@ -15,7 +15,7 @@ struct parisc_device { | |||
15 | unsigned int num_addrs; /* some devices have additional address ranges. */ | 15 | unsigned int num_addrs; /* some devices have additional address ranges. */ |
16 | unsigned long *addr; /* which will be stored here */ | 16 | unsigned long *addr; /* which will be stored here */ |
17 | 17 | ||
18 | #ifdef __LP64__ | 18 | #ifdef CONFIG_64BIT |
19 | /* parms for pdc_pat_cell_module() call */ | 19 | /* parms for pdc_pat_cell_module() call */ |
20 | unsigned long pcell_loc; /* Physical Cell location */ | 20 | unsigned long pcell_loc; /* Physical Cell location */ |
21 | unsigned long mod_index; /* PAT specific - Misc Module info */ | 21 | unsigned long mod_index; /* PAT specific - Misc Module info */ |
diff --git a/include/asm-parisc/pdc.h b/include/asm-parisc/pdc.h index 423c2b84b4a0..876fd8116d4a 100644 --- a/include/asm-parisc/pdc.h +++ b/include/asm-parisc/pdc.h | |||
@@ -341,7 +341,7 @@ struct pdc_model { /* for PDC_MODEL */ | |||
341 | 341 | ||
342 | struct pdc_cache_cf { /* for PDC_CACHE (I/D-caches) */ | 342 | struct pdc_cache_cf { /* for PDC_CACHE (I/D-caches) */ |
343 | unsigned long | 343 | unsigned long |
344 | #ifdef __LP64__ | 344 | #ifdef CONFIG_64BIT |
345 | cc_padW:32, | 345 | cc_padW:32, |
346 | #endif | 346 | #endif |
347 | cc_alias: 4, /* alias boundaries for virtual addresses */ | 347 | cc_alias: 4, /* alias boundaries for virtual addresses */ |
@@ -357,7 +357,7 @@ struct pdc_cache_cf { /* for PDC_CACHE (I/D-caches) */ | |||
357 | 357 | ||
358 | struct pdc_tlb_cf { /* for PDC_CACHE (I/D-TLB's) */ | 358 | struct pdc_tlb_cf { /* for PDC_CACHE (I/D-TLB's) */ |
359 | unsigned long tc_pad0:12, /* reserved */ | 359 | unsigned long tc_pad0:12, /* reserved */ |
360 | #ifdef __LP64__ | 360 | #ifdef CONFIG_64BIT |
361 | tc_padW:32, | 361 | tc_padW:32, |
362 | #endif | 362 | #endif |
363 | tc_sh : 2, /* 0 = separate I/D-TLB, else shared I/D-TLB */ | 363 | tc_sh : 2, /* 0 = separate I/D-TLB, else shared I/D-TLB */ |
@@ -445,7 +445,7 @@ struct pdc_btlb_info { /* PDC_BLOCK_TLB, return of PDC_BTLB_INFO */ | |||
445 | 445 | ||
446 | #endif /* !CONFIG_PA20 */ | 446 | #endif /* !CONFIG_PA20 */ |
447 | 447 | ||
448 | #ifdef __LP64__ | 448 | #ifdef CONFIG_64BIT |
449 | struct pdc_memory_table_raddr { /* PDC_MEM/PDC_MEM_TABLE (return info) */ | 449 | struct pdc_memory_table_raddr { /* PDC_MEM/PDC_MEM_TABLE (return info) */ |
450 | unsigned long entries_returned; | 450 | unsigned long entries_returned; |
451 | unsigned long entries_total; | 451 | unsigned long entries_total; |
@@ -456,7 +456,7 @@ struct pdc_memory_table { /* PDC_MEM/PDC_MEM_TABLE (arguments) */ | |||
456 | unsigned int pages; | 456 | unsigned int pages; |
457 | unsigned int reserved; | 457 | unsigned int reserved; |
458 | }; | 458 | }; |
459 | #endif /* __LP64__ */ | 459 | #endif /* CONFIG_64BIT */ |
460 | 460 | ||
461 | struct pdc_system_map_mod_info { /* PDC_SYSTEM_MAP/FIND_MODULE */ | 461 | struct pdc_system_map_mod_info { /* PDC_SYSTEM_MAP/FIND_MODULE */ |
462 | unsigned long mod_addr; | 462 | unsigned long mod_addr; |
@@ -752,7 +752,7 @@ int pdc_get_initiator(struct hardware_path *, struct pdc_initiator *); | |||
752 | int pdc_tod_read(struct pdc_tod *tod); | 752 | int pdc_tod_read(struct pdc_tod *tod); |
753 | int pdc_tod_set(unsigned long sec, unsigned long usec); | 753 | int pdc_tod_set(unsigned long sec, unsigned long usec); |
754 | 754 | ||
755 | #ifdef __LP64__ | 755 | #ifdef CONFIG_64BIT |
756 | int pdc_mem_mem_table(struct pdc_memory_table_raddr *r_addr, | 756 | int pdc_mem_mem_table(struct pdc_memory_table_raddr *r_addr, |
757 | struct pdc_memory_table *tbl, unsigned long entries); | 757 | struct pdc_memory_table *tbl, unsigned long entries); |
758 | #endif | 758 | #endif |
diff --git a/include/asm-parisc/pdcpat.h b/include/asm-parisc/pdcpat.h index b4b34c0e8c1a..47539f117958 100644 --- a/include/asm-parisc/pdcpat.h +++ b/include/asm-parisc/pdcpat.h | |||
@@ -250,7 +250,7 @@ struct pdc_pat_pd_addr_map_entry { | |||
250 | #define PAT_GET_ENTITY(value) (((value) >> 56) & 0xffUL) | 250 | #define PAT_GET_ENTITY(value) (((value) >> 56) & 0xffUL) |
251 | #define PAT_GET_DVI(value) (((value) >> 48) & 0xffUL) | 251 | #define PAT_GET_DVI(value) (((value) >> 48) & 0xffUL) |
252 | #define PAT_GET_IOC(value) (((value) >> 40) & 0xffUL) | 252 | #define PAT_GET_IOC(value) (((value) >> 40) & 0xffUL) |
253 | #define PAT_GET_MOD_PAGES(value)(((value) & 0xffffffUL) | 253 | #define PAT_GET_MOD_PAGES(value) ((value) & 0xffffffUL) |
254 | 254 | ||
255 | 255 | ||
256 | /* | 256 | /* |
@@ -303,35 +303,6 @@ extern int pdc_pat_io_pci_cfg_write(unsigned long pci_addr, int pci_size, u32 va | |||
303 | */ | 303 | */ |
304 | extern int pdc_pat; /* arch/parisc/kernel/inventory.c */ | 304 | extern int pdc_pat; /* arch/parisc/kernel/inventory.c */ |
305 | 305 | ||
306 | /******************************************************************** | ||
307 | * PDC_PAT_CELL[Return Cell Module] memaddr[0] conf_base_addr | ||
308 | * ---------------------------------------------------------- | ||
309 | * Bit 0 to 51 - conf_base_addr | ||
310 | * Bit 52 to 62 - reserved | ||
311 | * Bit 63 - endianess bit | ||
312 | ********************************************************************/ | ||
313 | #define PAT_GET_CBA(value) ((value) & 0xfffffffffffff000UL) | ||
314 | |||
315 | /******************************************************************** | ||
316 | * PDC_PAT_CELL[Return Cell Module] memaddr[1] mod_info | ||
317 | * ---------------------------------------------------- | ||
318 | * Bit 0 to 7 - entity type | ||
319 | * 0 = central agent, 1 = processor, | ||
320 | * 2 = memory controller, 3 = system bus adapter, | ||
321 | * 4 = local bus adapter, 5 = processor bus converter, | ||
322 | * 6 = crossbar fabric connect, 7 = fabric interconnect, | ||
323 | * 8 to 254 reserved, 255 = unknown. | ||
324 | * Bit 8 to 15 - DVI | ||
325 | * Bit 16 to 23 - IOC functions | ||
326 | * Bit 24 to 39 - reserved | ||
327 | * Bit 40 to 63 - mod_pages | ||
328 | * number of 4K pages a module occupies starting at conf_base_addr | ||
329 | ********************************************************************/ | ||
330 | #define PAT_GET_ENTITY(value) (((value) >> 56) & 0xffUL) | ||
331 | #define PAT_GET_DVI(value) (((value) >> 48) & 0xffUL) | ||
332 | #define PAT_GET_IOC(value) (((value) >> 40) & 0xffUL) | ||
333 | #define PAT_GET_MOD_PAGES(value)(((value) & 0xffffffUL) | ||
334 | |||
335 | #endif /* __ASSEMBLY__ */ | 306 | #endif /* __ASSEMBLY__ */ |
336 | 307 | ||
337 | #endif /* ! __PARISC_PATPDC_H */ | 308 | #endif /* ! __PARISC_PATPDC_H */ |
diff --git a/include/asm-parisc/pgalloc.h b/include/asm-parisc/pgalloc.h index 3122fad38a1b..1af1a41e0723 100644 --- a/include/asm-parisc/pgalloc.h +++ b/include/asm-parisc/pgalloc.h | |||
@@ -14,7 +14,7 @@ | |||
14 | * Here (for 64 bit kernels) we implement a Hybrid L2/L3 scheme: we | 14 | * Here (for 64 bit kernels) we implement a Hybrid L2/L3 scheme: we |
15 | * allocate the first pmd adjacent to the pgd. This means that we can | 15 | * allocate the first pmd adjacent to the pgd. This means that we can |
16 | * subtract a constant offset to get to it. The pmd and pgd sizes are | 16 | * subtract a constant offset to get to it. The pmd and pgd sizes are |
17 | * arranged so that a single pmd covers 4GB (giving a full LP64 | 17 | * arranged so that a single pmd covers 4GB (giving a full 64-bit |
18 | * process access to 8TB) so our lookups are effectively L2 for the | 18 | * process access to 8TB) so our lookups are effectively L2 for the |
19 | * first 4GB of the kernel (i.e. for all ILP32 processes and all the | 19 | * first 4GB of the kernel (i.e. for all ILP32 processes and all the |
20 | * kernel for machines with under 4GB of memory) */ | 20 | * kernel for machines with under 4GB of memory) */ |
@@ -26,7 +26,7 @@ static inline pgd_t *pgd_alloc(struct mm_struct *mm) | |||
26 | 26 | ||
27 | if (likely(pgd != NULL)) { | 27 | if (likely(pgd != NULL)) { |
28 | memset(pgd, 0, PAGE_SIZE<<PGD_ALLOC_ORDER); | 28 | memset(pgd, 0, PAGE_SIZE<<PGD_ALLOC_ORDER); |
29 | #ifdef __LP64__ | 29 | #ifdef CONFIG_64BIT |
30 | actual_pgd += PTRS_PER_PGD; | 30 | actual_pgd += PTRS_PER_PGD; |
31 | /* Populate first pmd with allocated memory. We mark it | 31 | /* Populate first pmd with allocated memory. We mark it |
32 | * with PxD_FLAG_ATTACHED as a signal to the system that this | 32 | * with PxD_FLAG_ATTACHED as a signal to the system that this |
@@ -45,7 +45,7 @@ static inline pgd_t *pgd_alloc(struct mm_struct *mm) | |||
45 | 45 | ||
46 | static inline void pgd_free(pgd_t *pgd) | 46 | static inline void pgd_free(pgd_t *pgd) |
47 | { | 47 | { |
48 | #ifdef __LP64__ | 48 | #ifdef CONFIG_64BIT |
49 | pgd -= PTRS_PER_PGD; | 49 | pgd -= PTRS_PER_PGD; |
50 | #endif | 50 | #endif |
51 | free_pages((unsigned long)pgd, PGD_ALLOC_ORDER); | 51 | free_pages((unsigned long)pgd, PGD_ALLOC_ORDER); |
@@ -72,7 +72,7 @@ static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address) | |||
72 | 72 | ||
73 | static inline void pmd_free(pmd_t *pmd) | 73 | static inline void pmd_free(pmd_t *pmd) |
74 | { | 74 | { |
75 | #ifdef __LP64__ | 75 | #ifdef CONFIG_64BIT |
76 | if(pmd_flag(*pmd) & PxD_FLAG_ATTACHED) | 76 | if(pmd_flag(*pmd) & PxD_FLAG_ATTACHED) |
77 | /* This is the permanent pmd attached to the pgd; | 77 | /* This is the permanent pmd attached to the pgd; |
78 | * cannot free it */ | 78 | * cannot free it */ |
@@ -99,7 +99,7 @@ static inline void pmd_free(pmd_t *pmd) | |||
99 | static inline void | 99 | static inline void |
100 | pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte) | 100 | pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte) |
101 | { | 101 | { |
102 | #ifdef __LP64__ | 102 | #ifdef CONFIG_64BIT |
103 | /* preserve the gateway marker if this is the beginning of | 103 | /* preserve the gateway marker if this is the beginning of |
104 | * the permanent pmd */ | 104 | * the permanent pmd */ |
105 | if(pmd_flag(*pmd) & PxD_FLAG_ATTACHED) | 105 | if(pmd_flag(*pmd) & PxD_FLAG_ATTACHED) |
diff --git a/include/asm-parisc/pgtable.h b/include/asm-parisc/pgtable.h index c0b61e0d1497..d7e1b10da5c6 100644 --- a/include/asm-parisc/pgtable.h +++ b/include/asm-parisc/pgtable.h | |||
@@ -10,7 +10,6 @@ | |||
10 | * we simulate an x86-style page table for the linux mm code | 10 | * we simulate an x86-style page table for the linux mm code |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/spinlock.h> | ||
14 | #include <linux/mm.h> /* for vm_area_struct */ | 13 | #include <linux/mm.h> /* for vm_area_struct */ |
15 | #include <asm/processor.h> | 14 | #include <asm/processor.h> |
16 | #include <asm/cache.h> | 15 | #include <asm/cache.h> |
diff --git a/include/asm-parisc/posix_types.h b/include/asm-parisc/posix_types.h index 9b19970de619..b634e3c47fdc 100644 --- a/include/asm-parisc/posix_types.h +++ b/include/asm-parisc/posix_types.h | |||
@@ -20,7 +20,7 @@ typedef int __kernel_timer_t; | |||
20 | typedef int __kernel_clockid_t; | 20 | typedef int __kernel_clockid_t; |
21 | typedef int __kernel_daddr_t; | 21 | typedef int __kernel_daddr_t; |
22 | /* Note these change from narrow to wide kernels */ | 22 | /* Note these change from narrow to wide kernels */ |
23 | #ifdef __LP64__ | 23 | #ifdef CONFIG_64BIT |
24 | typedef unsigned long __kernel_size_t; | 24 | typedef unsigned long __kernel_size_t; |
25 | typedef long __kernel_ssize_t; | 25 | typedef long __kernel_ssize_t; |
26 | typedef long __kernel_ptrdiff_t; | 26 | typedef long __kernel_ptrdiff_t; |
diff --git a/include/asm-parisc/processor.h b/include/asm-parisc/processor.h index fd7866dc8c83..d2f396721d3e 100644 --- a/include/asm-parisc/processor.h +++ b/include/asm-parisc/processor.h | |||
@@ -9,13 +9,10 @@ | |||
9 | #define __ASM_PARISC_PROCESSOR_H | 9 | #define __ASM_PARISC_PROCESSOR_H |
10 | 10 | ||
11 | #ifndef __ASSEMBLY__ | 11 | #ifndef __ASSEMBLY__ |
12 | #include <asm/prefetch.h> /* lockdep.h needs <linux/prefetch.h> */ | ||
13 | |||
14 | #include <linux/threads.h> | 12 | #include <linux/threads.h> |
15 | #include <linux/spinlock_types.h> | ||
16 | 13 | ||
14 | #include <asm/prefetch.h> | ||
17 | #include <asm/hardware.h> | 15 | #include <asm/hardware.h> |
18 | #include <asm/page.h> | ||
19 | #include <asm/pdc.h> | 16 | #include <asm/pdc.h> |
20 | #include <asm/ptrace.h> | 17 | #include <asm/ptrace.h> |
21 | #include <asm/types.h> | 18 | #include <asm/types.h> |
@@ -41,7 +38,7 @@ | |||
41 | #define DEFAULT_TASK_SIZE32 (0xFFF00000UL) | 38 | #define DEFAULT_TASK_SIZE32 (0xFFF00000UL) |
42 | #define DEFAULT_MAP_BASE32 (0x40000000UL) | 39 | #define DEFAULT_MAP_BASE32 (0x40000000UL) |
43 | 40 | ||
44 | #ifdef __LP64__ | 41 | #ifdef CONFIG_64BIT |
45 | #define DEFAULT_TASK_SIZE (MAX_ADDRESS-0xf000000) | 42 | #define DEFAULT_TASK_SIZE (MAX_ADDRESS-0xf000000) |
46 | #define DEFAULT_MAP_BASE (0x200000000UL) | 43 | #define DEFAULT_MAP_BASE (0x200000000UL) |
47 | #else | 44 | #else |
@@ -87,7 +84,6 @@ struct cpuinfo_parisc { | |||
87 | unsigned long hpa; /* Host Physical address */ | 84 | unsigned long hpa; /* Host Physical address */ |
88 | unsigned long txn_addr; /* MMIO addr of EIR or id_eid */ | 85 | unsigned long txn_addr; /* MMIO addr of EIR or id_eid */ |
89 | #ifdef CONFIG_SMP | 86 | #ifdef CONFIG_SMP |
90 | spinlock_t lock; /* synchronization for ipi's */ | ||
91 | unsigned long pending_ipi; /* bitmap of type ipi_message_type */ | 87 | unsigned long pending_ipi; /* bitmap of type ipi_message_type */ |
92 | unsigned long ipi_count; /* number ipi Interrupts */ | 88 | unsigned long ipi_count; /* number ipi Interrupts */ |
93 | #endif | 89 | #endif |
@@ -277,7 +273,7 @@ on downward growing arches, it looks like this: | |||
277 | * it in here from the current->personality | 273 | * it in here from the current->personality |
278 | */ | 274 | */ |
279 | 275 | ||
280 | #ifdef __LP64__ | 276 | #ifdef CONFIG_64BIT |
281 | #define USER_WIDE_MODE (!test_thread_flag(TIF_32BIT)) | 277 | #define USER_WIDE_MODE (!test_thread_flag(TIF_32BIT)) |
282 | #else | 278 | #else |
283 | #define USER_WIDE_MODE 0 | 279 | #define USER_WIDE_MODE 0 |
diff --git a/include/asm-parisc/sembuf.h b/include/asm-parisc/sembuf.h index 1083368ef8db..1e59ffd3bd1e 100644 --- a/include/asm-parisc/sembuf.h +++ b/include/asm-parisc/sembuf.h | |||
@@ -13,11 +13,11 @@ | |||
13 | 13 | ||
14 | struct semid64_ds { | 14 | struct semid64_ds { |
15 | struct ipc64_perm sem_perm; /* permissions .. see ipc.h */ | 15 | struct ipc64_perm sem_perm; /* permissions .. see ipc.h */ |
16 | #ifndef __LP64__ | 16 | #ifndef CONFIG_64BIT |
17 | unsigned int __pad1; | 17 | unsigned int __pad1; |
18 | #endif | 18 | #endif |
19 | __kernel_time_t sem_otime; /* last semop time */ | 19 | __kernel_time_t sem_otime; /* last semop time */ |
20 | #ifndef __LP64__ | 20 | #ifndef CONFIG_64BIT |
21 | unsigned int __pad2; | 21 | unsigned int __pad2; |
22 | #endif | 22 | #endif |
23 | __kernel_time_t sem_ctime; /* last change time */ | 23 | __kernel_time_t sem_ctime; /* last change time */ |
diff --git a/include/asm-parisc/shmbuf.h b/include/asm-parisc/shmbuf.h index 623b6c0c49e6..0a3eada1863b 100644 --- a/include/asm-parisc/shmbuf.h +++ b/include/asm-parisc/shmbuf.h | |||
@@ -13,19 +13,19 @@ | |||
13 | 13 | ||
14 | struct shmid64_ds { | 14 | struct shmid64_ds { |
15 | struct ipc64_perm shm_perm; /* operation perms */ | 15 | struct ipc64_perm shm_perm; /* operation perms */ |
16 | #ifndef __LP64__ | 16 | #ifndef CONFIG_64BIT |
17 | unsigned int __pad1; | 17 | unsigned int __pad1; |
18 | #endif | 18 | #endif |
19 | __kernel_time_t shm_atime; /* last attach time */ | 19 | __kernel_time_t shm_atime; /* last attach time */ |
20 | #ifndef __LP64__ | 20 | #ifndef CONFIG_64BIT |
21 | unsigned int __pad2; | 21 | unsigned int __pad2; |
22 | #endif | 22 | #endif |
23 | __kernel_time_t shm_dtime; /* last detach time */ | 23 | __kernel_time_t shm_dtime; /* last detach time */ |
24 | #ifndef __LP64__ | 24 | #ifndef CONFIG_64BIT |
25 | unsigned int __pad3; | 25 | unsigned int __pad3; |
26 | #endif | 26 | #endif |
27 | __kernel_time_t shm_ctime; /* last change time */ | 27 | __kernel_time_t shm_ctime; /* last change time */ |
28 | #ifndef __LP64__ | 28 | #ifndef CONFIG_64BIT |
29 | unsigned int __pad4; | 29 | unsigned int __pad4; |
30 | #endif | 30 | #endif |
31 | size_t shm_segsz; /* size of segment (bytes) */ | 31 | size_t shm_segsz; /* size of segment (bytes) */ |
@@ -36,7 +36,7 @@ struct shmid64_ds { | |||
36 | unsigned int __unused2; | 36 | unsigned int __unused2; |
37 | }; | 37 | }; |
38 | 38 | ||
39 | #ifdef __LP64__ | 39 | #ifdef CONFIG_64BIT |
40 | /* The 'unsigned int' (formerly 'unsigned long') data types below will | 40 | /* The 'unsigned int' (formerly 'unsigned long') data types below will |
41 | * ensure that a 32-bit app calling shmctl(*,IPC_INFO,*) will work on | 41 | * ensure that a 32-bit app calling shmctl(*,IPC_INFO,*) will work on |
42 | * a wide kernel, but if some of these values are meant to contain pointers | 42 | * a wide kernel, but if some of these values are meant to contain pointers |
diff --git a/include/asm-parisc/signal.h b/include/asm-parisc/signal.h index 98a82fa0cfdb..c20356375d1d 100644 --- a/include/asm-parisc/signal.h +++ b/include/asm-parisc/signal.h | |||
@@ -105,7 +105,7 @@ | |||
105 | struct siginfo; | 105 | struct siginfo; |
106 | 106 | ||
107 | /* Type of a signal handler. */ | 107 | /* Type of a signal handler. */ |
108 | #ifdef __LP64__ | 108 | #ifdef CONFIG_64BIT |
109 | /* function pointers on 64-bit parisc are pointers to little structs and the | 109 | /* function pointers on 64-bit parisc are pointers to little structs and the |
110 | * compiler doesn't support code which changes or tests the address of | 110 | * compiler doesn't support code which changes or tests the address of |
111 | * the function in the little struct. This is really ugly -PB | 111 | * the function in the little struct. This is really ugly -PB |
diff --git a/include/asm-parisc/smp.h b/include/asm-parisc/smp.h index d4c0e26afcd1..306f4950e32e 100644 --- a/include/asm-parisc/smp.h +++ b/include/asm-parisc/smp.h | |||
@@ -41,14 +41,6 @@ extern void smp_send_all_nop(void); | |||
41 | 41 | ||
42 | #define PROC_CHANGE_PENALTY 15 /* Schedule penalty */ | 42 | #define PROC_CHANGE_PENALTY 15 /* Schedule penalty */ |
43 | 43 | ||
44 | #undef ENTRY_SYS_CPUS | ||
45 | #ifdef ENTRY_SYS_CPUS | ||
46 | #define STATE_RENDEZVOUS 0 | ||
47 | #define STATE_STOPPED 1 | ||
48 | #define STATE_RUNNING 2 | ||
49 | #define STATE_HALTED 3 | ||
50 | #endif | ||
51 | |||
52 | extern unsigned long cpu_present_mask; | 44 | extern unsigned long cpu_present_mask; |
53 | 45 | ||
54 | #define raw_smp_processor_id() (current_thread_info()->cpu) | 46 | #define raw_smp_processor_id() (current_thread_info()->cpu) |
diff --git a/include/asm-parisc/spinlock_types.h b/include/asm-parisc/spinlock_types.h index d6b479bdb886..3f72f47cf4b2 100644 --- a/include/asm-parisc/spinlock_types.h +++ b/include/asm-parisc/spinlock_types.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef __ASM_SPINLOCK_TYPES_H | 1 | #ifndef __ASM_SPINLOCK_TYPES_H |
2 | #define __ASM_SPINLOCK_TYPES_H | 2 | #define __ASM_SPINLOCK_TYPES_H |
3 | 3 | ||
4 | #ifndef __LINUX_SPINLOCK_TYPES_H | ||
5 | # error "please don't include this file directly" | ||
6 | #endif | ||
7 | |||
8 | typedef struct { | 4 | typedef struct { |
9 | #ifdef CONFIG_PA20 | 5 | #ifdef CONFIG_PA20 |
10 | volatile unsigned int slock; | 6 | volatile unsigned int slock; |
diff --git a/include/asm-parisc/statfs.h b/include/asm-parisc/statfs.h index a52d8f93f05c..1d2b8130b23d 100644 --- a/include/asm-parisc/statfs.h +++ b/include/asm-parisc/statfs.h | |||
@@ -30,11 +30,11 @@ struct statfs { | |||
30 | struct statfs64 { | 30 | struct statfs64 { |
31 | long f_type; | 31 | long f_type; |
32 | long f_bsize; | 32 | long f_bsize; |
33 | u64 f_blocks; | 33 | __u64 f_blocks; |
34 | u64 f_bfree; | 34 | __u64 f_bfree; |
35 | u64 f_bavail; | 35 | __u64 f_bavail; |
36 | u64 f_files; | 36 | __u64 f_files; |
37 | u64 f_ffree; | 37 | __u64 f_ffree; |
38 | __kernel_fsid_t f_fsid; | 38 | __kernel_fsid_t f_fsid; |
39 | long f_namelen; | 39 | long f_namelen; |
40 | long f_frsize; | 40 | long f_frsize; |
diff --git a/include/asm-parisc/system.h b/include/asm-parisc/system.h index 74f037a39e6f..7e9afa720d43 100644 --- a/include/asm-parisc/system.h +++ b/include/asm-parisc/system.h | |||
@@ -34,7 +34,7 @@ struct pa_psw { | |||
34 | unsigned int i:1; | 34 | unsigned int i:1; |
35 | }; | 35 | }; |
36 | 36 | ||
37 | #ifdef __LP64__ | 37 | #ifdef CONFIG_64BIT |
38 | #define pa_psw(task) ((struct pa_psw *) ((char *) (task) + TASK_PT_PSW + 4)) | 38 | #define pa_psw(task) ((struct pa_psw *) ((char *) (task) + TASK_PT_PSW + 4)) |
39 | #else | 39 | #else |
40 | #define pa_psw(task) ((struct pa_psw *) ((char *) (task) + TASK_PT_PSW)) | 40 | #define pa_psw(task) ((struct pa_psw *) ((char *) (task) + TASK_PT_PSW)) |
diff --git a/include/asm-parisc/termios.h b/include/asm-parisc/termios.h index 6965e8f6c3e1..5345b3420475 100644 --- a/include/asm-parisc/termios.h +++ b/include/asm-parisc/termios.h | |||
@@ -39,24 +39,6 @@ struct termio { | |||
39 | 39 | ||
40 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 40 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
41 | 41 | ||
42 | /* line disciplines */ | ||
43 | #define N_TTY 0 | ||
44 | #define N_SLIP 1 | ||
45 | #define N_MOUSE 2 | ||
46 | #define N_PPP 3 | ||
47 | #define N_STRIP 4 | ||
48 | #define N_AX25 5 | ||
49 | #define N_X25 6 /* X.25 async */ | ||
50 | #define N_6PACK 7 | ||
51 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
52 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
53 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
54 | #define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ | ||
55 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
56 | #define N_HDLC 13 /* synchronous HDLC */ | ||
57 | #define N_SYNC_PPP 14 | ||
58 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
59 | |||
60 | #ifdef __KERNEL__ | 42 | #ifdef __KERNEL__ |
61 | 43 | ||
62 | /* intr=^C quit=^\ erase=del kill=^U | 44 | /* intr=^C quit=^\ erase=del kill=^U |
diff --git a/include/asm-parisc/thread_info.h b/include/asm-parisc/thread_info.h index f2f83b04cd8b..949314cf6188 100644 --- a/include/asm-parisc/thread_info.h +++ b/include/asm-parisc/thread_info.h | |||
@@ -62,6 +62,7 @@ struct thread_info { | |||
62 | #define TIF_POLLING_NRFLAG 4 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | 62 | #define TIF_POLLING_NRFLAG 4 /* true if poll_idle() is polling TIF_NEED_RESCHED */ |
63 | #define TIF_32BIT 5 /* 32 bit binary */ | 63 | #define TIF_32BIT 5 /* 32 bit binary */ |
64 | #define TIF_MEMDIE 6 | 64 | #define TIF_MEMDIE 6 |
65 | #define TIF_RESTORE_SIGMASK 7 /* restore saved signal mask */ | ||
65 | 66 | ||
66 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) | 67 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) |
67 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) | 68 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) |
@@ -69,9 +70,10 @@ struct thread_info { | |||
69 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) | 70 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) |
70 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) | 71 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) |
71 | #define _TIF_32BIT (1 << TIF_32BIT) | 72 | #define _TIF_32BIT (1 << TIF_32BIT) |
73 | #define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK) | ||
72 | 74 | ||
73 | #define _TIF_USER_WORK_MASK (_TIF_NOTIFY_RESUME | _TIF_SIGPENDING | \ | 75 | #define _TIF_USER_WORK_MASK (_TIF_NOTIFY_RESUME | _TIF_SIGPENDING | \ |
74 | _TIF_NEED_RESCHED) | 76 | _TIF_NEED_RESCHED | _TIF_RESTORE_SIGMASK) |
75 | 77 | ||
76 | #endif /* __KERNEL__ */ | 78 | #endif /* __KERNEL__ */ |
77 | 79 | ||
diff --git a/include/asm-parisc/tlbflush.h b/include/asm-parisc/tlbflush.h index f662e837dea1..3313da9ea00f 100644 --- a/include/asm-parisc/tlbflush.h +++ b/include/asm-parisc/tlbflush.h | |||
@@ -73,33 +73,11 @@ static inline void flush_tlb_page(struct vm_area_struct *vma, | |||
73 | purge_tlb_end(); | 73 | purge_tlb_end(); |
74 | } | 74 | } |
75 | 75 | ||
76 | static inline void flush_tlb_range(struct vm_area_struct *vma, | 76 | void __flush_tlb_range(unsigned long sid, |
77 | unsigned long start, unsigned long end) | 77 | unsigned long start, unsigned long end); |
78 | { | ||
79 | unsigned long npages; | ||
80 | 78 | ||
81 | npages = ((end - (start & PAGE_MASK)) + (PAGE_SIZE - 1)) >> PAGE_SHIFT; | 79 | #define flush_tlb_range(vma,start,end) __flush_tlb_range((vma)->vm_mm->context,start,end) |
82 | if (npages >= 512) /* 2MB of space: arbitrary, should be tuned */ | ||
83 | flush_tlb_all(); | ||
84 | else { | ||
85 | mtsp(vma->vm_mm->context,1); | ||
86 | purge_tlb_start(); | ||
87 | if (split_tlb) { | ||
88 | while (npages--) { | ||
89 | pdtlb(start); | ||
90 | pitlb(start); | ||
91 | start += PAGE_SIZE; | ||
92 | } | ||
93 | } else { | ||
94 | while (npages--) { | ||
95 | pdtlb(start); | ||
96 | start += PAGE_SIZE; | ||
97 | } | ||
98 | } | ||
99 | purge_tlb_end(); | ||
100 | } | ||
101 | } | ||
102 | 80 | ||
103 | #define flush_tlb_kernel_range(start, end) flush_tlb_all() | 81 | #define flush_tlb_kernel_range(start, end) __flush_tlb_range(0,start,end) |
104 | 82 | ||
105 | #endif | 83 | #endif |
diff --git a/include/asm-parisc/types.h b/include/asm-parisc/types.h index 34fdce361a5a..d4aa33033d98 100644 --- a/include/asm-parisc/types.h +++ b/include/asm-parisc/types.h | |||
@@ -31,7 +31,7 @@ typedef unsigned long long __u64; | |||
31 | */ | 31 | */ |
32 | #ifdef __KERNEL__ | 32 | #ifdef __KERNEL__ |
33 | 33 | ||
34 | #ifdef __LP64__ | 34 | #ifdef CONFIG_64BIT |
35 | #define BITS_PER_LONG 64 | 35 | #define BITS_PER_LONG 64 |
36 | #define SHIFT_PER_LONG 6 | 36 | #define SHIFT_PER_LONG 6 |
37 | #else | 37 | #else |
diff --git a/include/asm-parisc/uaccess.h b/include/asm-parisc/uaccess.h index d973e8b3466c..4878b9501f24 100644 --- a/include/asm-parisc/uaccess.h +++ b/include/asm-parisc/uaccess.h | |||
@@ -4,7 +4,6 @@ | |||
4 | /* | 4 | /* |
5 | * User space memory access functions | 5 | * User space memory access functions |
6 | */ | 6 | */ |
7 | #include <linux/sched.h> | ||
8 | #include <asm/page.h> | 7 | #include <asm/page.h> |
9 | #include <asm/system.h> | 8 | #include <asm/system.h> |
10 | #include <asm/cache.h> | 9 | #include <asm/cache.h> |
@@ -43,16 +42,18 @@ static inline long access_ok(int type, const void __user * addr, | |||
43 | #define put_user __put_user | 42 | #define put_user __put_user |
44 | #define get_user __get_user | 43 | #define get_user __get_user |
45 | 44 | ||
46 | #if BITS_PER_LONG == 32 | 45 | #if !defined(CONFIG_64BIT) |
47 | #define LDD_KERNEL(ptr) __get_kernel_bad(); | 46 | #define LDD_KERNEL(ptr) __get_kernel_bad(); |
48 | #define LDD_USER(ptr) __get_user_bad(); | 47 | #define LDD_USER(ptr) __get_user_bad(); |
49 | #define STD_KERNEL(x, ptr) __put_kernel_asm64(x,ptr) | 48 | #define STD_KERNEL(x, ptr) __put_kernel_asm64(x,ptr) |
50 | #define STD_USER(x, ptr) __put_user_asm64(x,ptr) | 49 | #define STD_USER(x, ptr) __put_user_asm64(x,ptr) |
50 | #define ASM_WORD_INSN ".word\t" | ||
51 | #else | 51 | #else |
52 | #define LDD_KERNEL(ptr) __get_kernel_asm("ldd",ptr) | 52 | #define LDD_KERNEL(ptr) __get_kernel_asm("ldd",ptr) |
53 | #define LDD_USER(ptr) __get_user_asm("ldd",ptr) | 53 | #define LDD_USER(ptr) __get_user_asm("ldd",ptr) |
54 | #define STD_KERNEL(x, ptr) __put_kernel_asm("std",x,ptr) | 54 | #define STD_KERNEL(x, ptr) __put_kernel_asm("std",x,ptr) |
55 | #define STD_USER(x, ptr) __put_user_asm("std",x,ptr) | 55 | #define STD_USER(x, ptr) __put_user_asm("std",x,ptr) |
56 | #define ASM_WORD_INSN ".dword\t" | ||
56 | #endif | 57 | #endif |
57 | 58 | ||
58 | /* | 59 | /* |
@@ -66,6 +67,11 @@ struct exception_table_entry { | |||
66 | long fixup; /* fixup routine */ | 67 | long fixup; /* fixup routine */ |
67 | }; | 68 | }; |
68 | 69 | ||
70 | #define ASM_EXCEPTIONTABLE_ENTRY( fault_addr, except_addr )\ | ||
71 | ".section __ex_table,\"aw\"\n" \ | ||
72 | ASM_WORD_INSN #fault_addr ", " #except_addr "\n\t" \ | ||
73 | ".previous\n" | ||
74 | |||
69 | /* | 75 | /* |
70 | * The page fault handler stores, in a per-cpu area, the following information | 76 | * The page fault handler stores, in a per-cpu area, the following information |
71 | * if a fixup routine is available. | 77 | * if a fixup routine is available. |
@@ -104,43 +110,19 @@ struct exception_data { | |||
104 | __gu_err; \ | 110 | __gu_err; \ |
105 | }) | 111 | }) |
106 | 112 | ||
107 | #ifdef __LP64__ | ||
108 | #define __get_kernel_asm(ldx,ptr) \ | ||
109 | __asm__("\n1:\t" ldx "\t0(%2),%0\n" \ | ||
110 | "\t.section __ex_table,\"aw\"\n" \ | ||
111 | "\t.dword\t1b,fixup_get_user_skip_1\n" \ | ||
112 | "\t.previous" \ | ||
113 | : "=r"(__gu_val), "=r"(__gu_err) \ | ||
114 | : "r"(ptr), "1"(__gu_err) \ | ||
115 | : "r1"); | ||
116 | |||
117 | #define __get_user_asm(ldx,ptr) \ | ||
118 | __asm__("\n1:\t" ldx "\t0(%%sr3,%2),%0\n" \ | ||
119 | "\t.section __ex_table,\"aw\"\n" \ | ||
120 | "\t.dword\t1b,fixup_get_user_skip_1\n" \ | ||
121 | "\t.previous" \ | ||
122 | : "=r"(__gu_val), "=r"(__gu_err) \ | ||
123 | : "r"(ptr), "1"(__gu_err) \ | ||
124 | : "r1"); | ||
125 | #else | ||
126 | #define __get_kernel_asm(ldx,ptr) \ | 113 | #define __get_kernel_asm(ldx,ptr) \ |
127 | __asm__("\n1:\t" ldx "\t0(%2),%0\n" \ | 114 | __asm__("\n1:\t" ldx "\t0(%2),%0\n\t" \ |
128 | "\t.section __ex_table,\"aw\"\n" \ | 115 | ASM_EXCEPTIONTABLE_ENTRY(1b, fixup_get_user_skip_1)\ |
129 | "\t.word\t1b,fixup_get_user_skip_1\n" \ | ||
130 | "\t.previous" \ | ||
131 | : "=r"(__gu_val), "=r"(__gu_err) \ | 116 | : "=r"(__gu_val), "=r"(__gu_err) \ |
132 | : "r"(ptr), "1"(__gu_err) \ | 117 | : "r"(ptr), "1"(__gu_err) \ |
133 | : "r1"); | 118 | : "r1"); |
134 | 119 | ||
135 | #define __get_user_asm(ldx,ptr) \ | 120 | #define __get_user_asm(ldx,ptr) \ |
136 | __asm__("\n1:\t" ldx "\t0(%%sr3,%2),%0\n" \ | 121 | __asm__("\n1:\t" ldx "\t0(%%sr3,%2),%0\n\t" \ |
137 | "\t.section __ex_table,\"aw\"\n" \ | 122 | ASM_EXCEPTIONTABLE_ENTRY(1b,fixup_get_user_skip_1)\ |
138 | "\t.word\t1b,fixup_get_user_skip_1\n" \ | ||
139 | "\t.previous" \ | ||
140 | : "=r"(__gu_val), "=r"(__gu_err) \ | 123 | : "=r"(__gu_val), "=r"(__gu_err) \ |
141 | : "r"(ptr), "1"(__gu_err) \ | 124 | : "r"(ptr), "1"(__gu_err) \ |
142 | : "r1"); | 125 | : "r1"); |
143 | #endif /* !__LP64__ */ | ||
144 | 126 | ||
145 | #define __put_user(x,ptr) \ | 127 | #define __put_user(x,ptr) \ |
146 | ({ \ | 128 | ({ \ |
@@ -179,80 +161,54 @@ struct exception_data { | |||
179 | * r8/r9 are already listed as err/val. | 161 | * r8/r9 are already listed as err/val. |
180 | */ | 162 | */ |
181 | 163 | ||
182 | #ifdef __LP64__ | ||
183 | #define __put_kernel_asm(stx,x,ptr) \ | 164 | #define __put_kernel_asm(stx,x,ptr) \ |
184 | __asm__ __volatile__ ( \ | 165 | __asm__ __volatile__ ( \ |
185 | "\n1:\t" stx "\t%2,0(%1)\n" \ | 166 | "\n1:\t" stx "\t%2,0(%1)\n\t" \ |
186 | "\t.section __ex_table,\"aw\"\n" \ | 167 | ASM_EXCEPTIONTABLE_ENTRY(1b,fixup_put_user_skip_1)\ |
187 | "\t.dword\t1b,fixup_put_user_skip_1\n" \ | ||
188 | "\t.previous" \ | ||
189 | : "=r"(__pu_err) \ | 168 | : "=r"(__pu_err) \ |
190 | : "r"(ptr), "r"(x), "0"(__pu_err) \ | 169 | : "r"(ptr), "r"(x), "0"(__pu_err) \ |
191 | : "r1") | 170 | : "r1") |
192 | 171 | ||
193 | #define __put_user_asm(stx,x,ptr) \ | 172 | #define __put_user_asm(stx,x,ptr) \ |
194 | __asm__ __volatile__ ( \ | 173 | __asm__ __volatile__ ( \ |
195 | "\n1:\t" stx "\t%2,0(%%sr3,%1)\n" \ | 174 | "\n1:\t" stx "\t%2,0(%%sr3,%1)\n\t" \ |
196 | "\t.section __ex_table,\"aw\"\n" \ | 175 | ASM_EXCEPTIONTABLE_ENTRY(1b,fixup_put_user_skip_1)\ |
197 | "\t.dword\t1b,fixup_put_user_skip_1\n" \ | ||
198 | "\t.previous" \ | ||
199 | : "=r"(__pu_err) \ | ||
200 | : "r"(ptr), "r"(x), "0"(__pu_err) \ | ||
201 | : "r1") | ||
202 | #else | ||
203 | #define __put_kernel_asm(stx,x,ptr) \ | ||
204 | __asm__ __volatile__ ( \ | ||
205 | "\n1:\t" stx "\t%2,0(%1)\n" \ | ||
206 | "\t.section __ex_table,\"aw\"\n" \ | ||
207 | "\t.word\t1b,fixup_put_user_skip_1\n" \ | ||
208 | "\t.previous" \ | ||
209 | : "=r"(__pu_err) \ | 176 | : "=r"(__pu_err) \ |
210 | : "r"(ptr), "r"(x), "0"(__pu_err) \ | 177 | : "r"(ptr), "r"(x), "0"(__pu_err) \ |
211 | : "r1") | 178 | : "r1") |
212 | 179 | ||
213 | #define __put_user_asm(stx,x,ptr) \ | ||
214 | __asm__ __volatile__ ( \ | ||
215 | "\n1:\t" stx "\t%2,0(%%sr3,%1)\n" \ | ||
216 | "\t.section __ex_table,\"aw\"\n" \ | ||
217 | "\t.word\t1b,fixup_put_user_skip_1\n" \ | ||
218 | "\t.previous" \ | ||
219 | : "=r"(__pu_err) \ | ||
220 | : "r"(ptr), "r"(x), "0"(__pu_err) \ | ||
221 | : "r1") | ||
222 | 180 | ||
223 | #define __put_kernel_asm64(__val,ptr) do { \ | 181 | #if !defined(CONFIG_64BIT) |
224 | u64 __val64 = (u64)(__val); \ | 182 | |
225 | u32 hi = (__val64) >> 32; \ | 183 | #define __put_kernel_asm64(__val,ptr) do { \ |
226 | u32 lo = (__val64) & 0xffffffff; \ | 184 | u64 __val64 = (u64)(__val); \ |
185 | u32 hi = (__val64) >> 32; \ | ||
186 | u32 lo = (__val64) & 0xffffffff; \ | ||
227 | __asm__ __volatile__ ( \ | 187 | __asm__ __volatile__ ( \ |
228 | "\n1:\tstw %2,0(%1)\n" \ | 188 | "\n1:\tstw %2,0(%1)" \ |
229 | "\n2:\tstw %3,4(%1)\n" \ | 189 | "\n2:\tstw %3,4(%1)\n\t" \ |
230 | "\t.section __ex_table,\"aw\"\n" \ | 190 | ASM_EXCEPTIONTABLE_ENTRY(1b,fixup_put_user_skip_2)\ |
231 | "\t.word\t1b,fixup_put_user_skip_2\n" \ | 191 | ASM_EXCEPTIONTABLE_ENTRY(2b,fixup_put_user_skip_1)\ |
232 | "\t.word\t2b,fixup_put_user_skip_1\n" \ | ||
233 | "\t.previous" \ | ||
234 | : "=r"(__pu_err) \ | 192 | : "=r"(__pu_err) \ |
235 | : "r"(ptr), "r"(hi), "r"(lo), "0"(__pu_err) \ | 193 | : "r"(ptr), "r"(hi), "r"(lo), "0"(__pu_err) \ |
236 | : "r1"); \ | 194 | : "r1"); \ |
237 | } while (0) | 195 | } while (0) |
238 | 196 | ||
239 | #define __put_user_asm64(__val,ptr) do { \ | 197 | #define __put_user_asm64(__val,ptr) do { \ |
240 | u64 __val64 = (u64)__val; \ | 198 | u64 __val64 = (u64)(__val); \ |
241 | u32 hi = (__val64) >> 32; \ | 199 | u32 hi = (__val64) >> 32; \ |
242 | u32 lo = (__val64) & 0xffffffff; \ | 200 | u32 lo = (__val64) & 0xffffffff; \ |
243 | __asm__ __volatile__ ( \ | 201 | __asm__ __volatile__ ( \ |
244 | "\n1:\tstw %2,0(%%sr3,%1)\n" \ | 202 | "\n1:\tstw %2,0(%%sr3,%1)" \ |
245 | "\n2:\tstw %3,4(%%sr3,%1)\n" \ | 203 | "\n2:\tstw %3,4(%%sr3,%1)\n\t" \ |
246 | "\t.section __ex_table,\"aw\"\n" \ | 204 | ASM_EXCEPTIONTABLE_ENTRY(1b,fixup_put_user_skip_2)\ |
247 | "\t.word\t1b,fixup_get_user_skip_2\n" \ | 205 | ASM_EXCEPTIONTABLE_ENTRY(2b,fixup_put_user_skip_1)\ |
248 | "\t.word\t2b,fixup_get_user_skip_1\n" \ | ||
249 | "\t.previous" \ | ||
250 | : "=r"(__pu_err) \ | 206 | : "=r"(__pu_err) \ |
251 | : "r"(ptr), "r"(hi), "r"(lo), "0"(__pu_err) \ | 207 | : "r"(ptr), "r"(hi), "r"(lo), "0"(__pu_err) \ |
252 | : "r1"); \ | 208 | : "r1"); \ |
253 | } while (0) | 209 | } while (0) |
254 | 210 | ||
255 | #endif /* !__LP64__ */ | 211 | #endif /* !defined(CONFIG_64BIT) */ |
256 | 212 | ||
257 | 213 | ||
258 | /* | 214 | /* |
diff --git a/include/asm-parisc/unistd.h b/include/asm-parisc/unistd.h index 53b0f5d290e4..2f7c40861c91 100644 --- a/include/asm-parisc/unistd.h +++ b/include/asm-parisc/unistd.h | |||
@@ -772,7 +772,7 @@ | |||
772 | #define __NR_mknodat (__NR_Linux + 277) | 772 | #define __NR_mknodat (__NR_Linux + 277) |
773 | #define __NR_fchownat (__NR_Linux + 278) | 773 | #define __NR_fchownat (__NR_Linux + 278) |
774 | #define __NR_futimesat (__NR_Linux + 279) | 774 | #define __NR_futimesat (__NR_Linux + 279) |
775 | #define __NR_newfstatat (__NR_Linux + 280) | 775 | #define __NR_fstatat64 (__NR_Linux + 280) |
776 | #define __NR_unlinkat (__NR_Linux + 281) | 776 | #define __NR_unlinkat (__NR_Linux + 281) |
777 | #define __NR_renameat (__NR_Linux + 282) | 777 | #define __NR_renameat (__NR_Linux + 282) |
778 | #define __NR_linkat (__NR_Linux + 283) | 778 | #define __NR_linkat (__NR_Linux + 283) |
@@ -786,8 +786,14 @@ | |||
786 | #define __NR_splice (__NR_Linux + 291) | 786 | #define __NR_splice (__NR_Linux + 291) |
787 | #define __NR_sync_file_range (__NR_Linux + 292) | 787 | #define __NR_sync_file_range (__NR_Linux + 292) |
788 | #define __NR_tee (__NR_Linux + 293) | 788 | #define __NR_tee (__NR_Linux + 293) |
789 | #define __NR_vmsplice (__NR_Linux + 294) | ||
790 | #define __NR_move_pages (__NR_Linux + 295) | ||
791 | #define __NR_getcpu (__NR_Linux + 296) | ||
792 | #define __NR_epoll_pwait (__NR_Linux + 297) | ||
793 | #define __NR_statfs64 (__NR_Linux + 298) | ||
794 | #define __NR_fstatfs64 (__NR_Linux + 299) | ||
789 | 795 | ||
790 | #define __NR_Linux_syscalls 294 | 796 | #define __NR_Linux_syscalls (__NR_fstatfs64 + 1) |
791 | 797 | ||
792 | #define HPUX_GATEWAY_ADDR 0xC0000004 | 798 | #define HPUX_GATEWAY_ADDR 0xC0000004 |
793 | #define LINUX_GATEWAY_ADDR 0x100 | 799 | #define LINUX_GATEWAY_ADDR 0x100 |
@@ -951,6 +957,8 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \ | |||
951 | #define __ARCH_WANT_SYS_SIGPENDING | 957 | #define __ARCH_WANT_SYS_SIGPENDING |
952 | #define __ARCH_WANT_SYS_SIGPROCMASK | 958 | #define __ARCH_WANT_SYS_SIGPROCMASK |
953 | #define __ARCH_WANT_SYS_RT_SIGACTION | 959 | #define __ARCH_WANT_SYS_RT_SIGACTION |
960 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND | ||
961 | #define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND | ||
954 | 962 | ||
955 | #endif /* __ASSEMBLY__ */ | 963 | #endif /* __ASSEMBLY__ */ |
956 | 964 | ||
diff --git a/include/asm-powerpc/Kbuild b/include/asm-powerpc/Kbuild index 703970fb0ec0..4869513b872f 100644 --- a/include/asm-powerpc/Kbuild +++ b/include/asm-powerpc/Kbuild | |||
@@ -23,6 +23,7 @@ header-y += linkage.h | |||
23 | header-y += resource.h | 23 | header-y += resource.h |
24 | header-y += sigcontext.h | 24 | header-y += sigcontext.h |
25 | header-y += statfs.h | 25 | header-y += statfs.h |
26 | header-y += ps3fb.h | ||
26 | 27 | ||
27 | unifdef-y += a.out.h | 28 | unifdef-y += a.out.h |
28 | unifdef-y += asm-compat.h | 29 | unifdef-y += asm-compat.h |
diff --git a/include/asm-powerpc/atomic.h b/include/asm-powerpc/atomic.h index f038e33e6d48..2ce4b6b7b348 100644 --- a/include/asm-powerpc/atomic.h +++ b/include/asm-powerpc/atomic.h | |||
@@ -165,7 +165,8 @@ static __inline__ int atomic_dec_return(atomic_t *v) | |||
165 | return t; | 165 | return t; |
166 | } | 166 | } |
167 | 167 | ||
168 | #define atomic_cmpxchg(v, o, n) ((int)cmpxchg(&((v)->counter), (o), (n))) | 168 | #define atomic_cmpxchg(v, o, n) \ |
169 | ((__typeof__((v)->counter))cmpxchg(&((v)->counter), (o), (n))) | ||
169 | #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) | 170 | #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) |
170 | 171 | ||
171 | /** | 172 | /** |
@@ -413,6 +414,43 @@ static __inline__ long atomic64_dec_if_positive(atomic64_t *v) | |||
413 | return t; | 414 | return t; |
414 | } | 415 | } |
415 | 416 | ||
417 | #define atomic64_cmpxchg(v, o, n) \ | ||
418 | ((__typeof__((v)->counter))cmpxchg(&((v)->counter), (o), (n))) | ||
419 | #define atomic64_xchg(v, new) (xchg(&((v)->counter), new)) | ||
420 | |||
421 | /** | ||
422 | * atomic64_add_unless - add unless the number is a given value | ||
423 | * @v: pointer of type atomic64_t | ||
424 | * @a: the amount to add to v... | ||
425 | * @u: ...unless v is equal to u. | ||
426 | * | ||
427 | * Atomically adds @a to @v, so long as it was not @u. | ||
428 | * Returns non-zero if @v was not @u, and zero otherwise. | ||
429 | */ | ||
430 | static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u) | ||
431 | { | ||
432 | long t; | ||
433 | |||
434 | __asm__ __volatile__ ( | ||
435 | LWSYNC_ON_SMP | ||
436 | "1: ldarx %0,0,%1 # atomic_add_unless\n\ | ||
437 | cmpd 0,%0,%3 \n\ | ||
438 | beq- 2f \n\ | ||
439 | add %0,%2,%0 \n" | ||
440 | " stdcx. %0,0,%1 \n\ | ||
441 | bne- 1b \n" | ||
442 | ISYNC_ON_SMP | ||
443 | " subf %0,%2,%0 \n\ | ||
444 | 2:" | ||
445 | : "=&r" (t) | ||
446 | : "r" (&v->counter), "r" (a), "r" (u) | ||
447 | : "cc", "memory"); | ||
448 | |||
449 | return t != u; | ||
450 | } | ||
451 | |||
452 | #define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0) | ||
453 | |||
416 | #endif /* __powerpc64__ */ | 454 | #endif /* __powerpc64__ */ |
417 | 455 | ||
418 | #include <asm-generic/atomic.h> | 456 | #include <asm-generic/atomic.h> |
diff --git a/include/asm-powerpc/cell-pmu.h b/include/asm-powerpc/cell-pmu.h index e8c2ebd3ddda..35b95773746c 100644 --- a/include/asm-powerpc/cell-pmu.h +++ b/include/asm-powerpc/cell-pmu.h | |||
@@ -53,6 +53,11 @@ | |||
53 | #define CBE_PM_CTR_POLARITY 0x01000000 | 53 | #define CBE_PM_CTR_POLARITY 0x01000000 |
54 | #define CBE_PM_CTR_COUNT_CYCLES 0x00800000 | 54 | #define CBE_PM_CTR_COUNT_CYCLES 0x00800000 |
55 | #define CBE_PM_CTR_ENABLE 0x00400000 | 55 | #define CBE_PM_CTR_ENABLE 0x00400000 |
56 | #define PM07_CTR_INPUT_MUX(x) (((x) & 0x3F) << 26) | ||
57 | #define PM07_CTR_INPUT_CONTROL(x) (((x) & 1) << 25) | ||
58 | #define PM07_CTR_POLARITY(x) (((x) & 1) << 24) | ||
59 | #define PM07_CTR_COUNT_CYCLES(x) (((x) & 1) << 23) | ||
60 | #define PM07_CTR_ENABLE(x) (((x) & 1) << 22) | ||
56 | 61 | ||
57 | /* Macros for the pm_status register. */ | 62 | /* Macros for the pm_status register. */ |
58 | #define CBE_PM_CTR_OVERFLOW_INTR(ctr) (1 << (31 - ((ctr) & 7))) | 63 | #define CBE_PM_CTR_OVERFLOW_INTR(ctr) (1 << (31 - ((ctr) & 7))) |
@@ -89,8 +94,7 @@ extern void cbe_read_trace_buffer(u32 cpu, u64 *buf); | |||
89 | 94 | ||
90 | extern void cbe_enable_pm_interrupts(u32 cpu, u32 thread, u32 mask); | 95 | extern void cbe_enable_pm_interrupts(u32 cpu, u32 thread, u32 mask); |
91 | extern void cbe_disable_pm_interrupts(u32 cpu); | 96 | extern void cbe_disable_pm_interrupts(u32 cpu); |
92 | extern u32 cbe_query_pm_interrupts(u32 cpu); | 97 | extern u32 cbe_get_and_clear_pm_interrupts(u32 cpu); |
93 | extern u32 cbe_clear_pm_interrupts(u32 cpu); | ||
94 | extern void cbe_sync_irq(int node); | 98 | extern void cbe_sync_irq(int node); |
95 | 99 | ||
96 | /* Utility functions, macros */ | 100 | /* Utility functions, macros */ |
@@ -103,11 +107,4 @@ extern u32 cbe_get_hw_thread_id(int cpu); | |||
103 | #define CBE_COUNT_PROBLEM_MODE 2 | 107 | #define CBE_COUNT_PROBLEM_MODE 2 |
104 | #define CBE_COUNT_ALL_MODES 3 | 108 | #define CBE_COUNT_ALL_MODES 3 |
105 | 109 | ||
106 | /* Macros for the pm07_control registers. */ | ||
107 | #define PM07_CTR_INPUT_MUX(x) (((x) & 0x3F) << 26) | ||
108 | #define PM07_CTR_INPUT_CONTROL(x) (((x) & 1) << 25) | ||
109 | #define PM07_CTR_POLARITY(x) (((x) & 1) << 24) | ||
110 | #define PM07_CTR_COUNT_CYCLES(x) (((x) & 1) << 23) | ||
111 | #define PM07_CTR_ENABLE(x) (((x) & 1) << 22) | ||
112 | |||
113 | #endif /* __ASM_CELL_PMU_H__ */ | 110 | #endif /* __ASM_CELL_PMU_H__ */ |
diff --git a/include/asm-powerpc/dcr-native.h b/include/asm-powerpc/dcr-native.h index d7a1bc1551c6..05af081222f6 100644 --- a/include/asm-powerpc/dcr-native.h +++ b/include/asm-powerpc/dcr-native.h | |||
@@ -26,8 +26,8 @@ typedef struct {} dcr_host_t; | |||
26 | 26 | ||
27 | #define DCR_MAP_OK(host) (1) | 27 | #define DCR_MAP_OK(host) (1) |
28 | 28 | ||
29 | #define dcr_map(dev, dcr_n, dcr_c) {} | 29 | #define dcr_map(dev, dcr_n, dcr_c) ((dcr_host_t){}) |
30 | #define dcr_unmap(host, dcr_n, dcr_c) {} | 30 | #define dcr_unmap(host, dcr_n, dcr_c) do {} while (0) |
31 | #define dcr_read(host, dcr_n) mfdcr(dcr_n) | 31 | #define dcr_read(host, dcr_n) mfdcr(dcr_n) |
32 | #define dcr_write(host, dcr_n, value) mtdcr(dcr_n, value) | 32 | #define dcr_write(host, dcr_n, value) mtdcr(dcr_n, value) |
33 | 33 | ||
diff --git a/include/asm-powerpc/floppy.h b/include/asm-powerpc/floppy.h index fd242a22331c..a0f14eea1da5 100644 --- a/include/asm-powerpc/floppy.h +++ b/include/asm-powerpc/floppy.h | |||
@@ -17,28 +17,115 @@ | |||
17 | #define fd_outb(value,port) outb_p(value,port) | 17 | #define fd_outb(value,port) outb_p(value,port) |
18 | 18 | ||
19 | #define fd_enable_dma() enable_dma(FLOPPY_DMA) | 19 | #define fd_enable_dma() enable_dma(FLOPPY_DMA) |
20 | #define fd_disable_dma() disable_dma(FLOPPY_DMA) | 20 | #define fd_disable_dma() fd_ops->_disable_dma(FLOPPY_DMA) |
21 | #define fd_request_dma() request_dma(FLOPPY_DMA, "floppy") | 21 | #define fd_free_dma() fd_ops->_free_dma(FLOPPY_DMA) |
22 | #define fd_free_dma() free_dma(FLOPPY_DMA) | ||
23 | #define fd_clear_dma_ff() clear_dma_ff(FLOPPY_DMA) | 22 | #define fd_clear_dma_ff() clear_dma_ff(FLOPPY_DMA) |
24 | #define fd_set_dma_mode(mode) set_dma_mode(FLOPPY_DMA, mode) | 23 | #define fd_set_dma_mode(mode) set_dma_mode(FLOPPY_DMA, mode) |
25 | #define fd_set_dma_count(count) set_dma_count(FLOPPY_DMA, count) | 24 | #define fd_set_dma_count(count) set_dma_count(FLOPPY_DMA, count) |
25 | #define fd_get_dma_residue() fd_ops->_get_dma_residue(FLOPPY_DMA) | ||
26 | #define fd_enable_irq() enable_irq(FLOPPY_IRQ) | 26 | #define fd_enable_irq() enable_irq(FLOPPY_IRQ) |
27 | #define fd_disable_irq() disable_irq(FLOPPY_IRQ) | 27 | #define fd_disable_irq() disable_irq(FLOPPY_IRQ) |
28 | #define fd_cacheflush(addr,size) /* nothing */ | 28 | #define fd_cacheflush(addr,size) /* nothing */ |
29 | #define fd_request_irq() request_irq(FLOPPY_IRQ, floppy_interrupt, \ | ||
30 | IRQF_DISABLED, "floppy", NULL) | ||
31 | #define fd_free_irq() free_irq(FLOPPY_IRQ, NULL); | 29 | #define fd_free_irq() free_irq(FLOPPY_IRQ, NULL); |
32 | 30 | ||
33 | #ifdef CONFIG_PCI | ||
34 | |||
35 | #include <linux/pci.h> | 31 | #include <linux/pci.h> |
36 | #include <asm/ppc-pci.h> /* for ppc64_isabridge_dev */ | 32 | #include <asm/ppc-pci.h> /* for ppc64_isabridge_dev */ |
37 | 33 | ||
38 | #define fd_dma_setup(addr,size,mode,io) powerpc_fd_dma_setup(addr,size,mode,io) | 34 | #define fd_dma_setup(addr,size,mode,io) fd_ops->_dma_setup(addr,size,mode,io) |
35 | |||
36 | static int fd_request_dma(void); | ||
37 | |||
38 | struct fd_dma_ops { | ||
39 | void (*_disable_dma)(unsigned int dmanr); | ||
40 | void (*_free_dma)(unsigned int dmanr); | ||
41 | int (*_get_dma_residue)(unsigned int dummy); | ||
42 | int (*_dma_setup)(char *addr, unsigned long size, int mode, int io); | ||
43 | }; | ||
44 | |||
45 | static int virtual_dma_count; | ||
46 | static int virtual_dma_residue; | ||
47 | static char *virtual_dma_addr; | ||
48 | static int virtual_dma_mode; | ||
49 | static int doing_vdma; | ||
50 | static struct fd_dma_ops *fd_ops; | ||
51 | |||
52 | static irqreturn_t floppy_hardint(int irq, void *dev_id) | ||
53 | { | ||
54 | unsigned char st; | ||
55 | int lcount; | ||
56 | char *lptr; | ||
57 | |||
58 | if (!doing_vdma) | ||
59 | return floppy_interrupt(irq, dev_id); | ||
60 | |||
61 | |||
62 | st = 1; | ||
63 | for (lcount=virtual_dma_count, lptr=virtual_dma_addr; | ||
64 | lcount; lcount--, lptr++) { | ||
65 | st=inb(virtual_dma_port+4) & 0xa0 ; | ||
66 | if (st != 0xa0) | ||
67 | break; | ||
68 | if (virtual_dma_mode) | ||
69 | outb_p(*lptr, virtual_dma_port+5); | ||
70 | else | ||
71 | *lptr = inb_p(virtual_dma_port+5); | ||
72 | } | ||
73 | virtual_dma_count = lcount; | ||
74 | virtual_dma_addr = lptr; | ||
75 | st = inb(virtual_dma_port+4); | ||
76 | |||
77 | if (st == 0x20) | ||
78 | return IRQ_HANDLED; | ||
79 | if (!(st & 0x20)) { | ||
80 | virtual_dma_residue += virtual_dma_count; | ||
81 | virtual_dma_count=0; | ||
82 | doing_vdma = 0; | ||
83 | floppy_interrupt(irq, dev_id); | ||
84 | return IRQ_HANDLED; | ||
85 | } | ||
86 | return IRQ_HANDLED; | ||
87 | } | ||
39 | 88 | ||
40 | static __inline__ int powerpc_fd_dma_setup(char *addr, unsigned long size, | 89 | static void vdma_disable_dma(unsigned int dummy) |
41 | int mode, int io) | 90 | { |
91 | doing_vdma = 0; | ||
92 | virtual_dma_residue += virtual_dma_count; | ||
93 | virtual_dma_count=0; | ||
94 | } | ||
95 | |||
96 | static void vdma_nop(unsigned int dummy) | ||
97 | { | ||
98 | } | ||
99 | |||
100 | |||
101 | static int vdma_get_dma_residue(unsigned int dummy) | ||
102 | { | ||
103 | return virtual_dma_count + virtual_dma_residue; | ||
104 | } | ||
105 | |||
106 | |||
107 | static int fd_request_irq(void) | ||
108 | { | ||
109 | if (can_use_virtual_dma) | ||
110 | return request_irq(FLOPPY_IRQ, floppy_hardint, | ||
111 | IRQF_DISABLED, "floppy", NULL); | ||
112 | else | ||
113 | return request_irq(FLOPPY_IRQ, floppy_interrupt, | ||
114 | IRQF_DISABLED, "floppy", NULL); | ||
115 | } | ||
116 | |||
117 | static int vdma_dma_setup(char *addr, unsigned long size, int mode, int io) | ||
118 | { | ||
119 | doing_vdma = 1; | ||
120 | virtual_dma_port = io; | ||
121 | virtual_dma_mode = (mode == DMA_MODE_WRITE); | ||
122 | virtual_dma_addr = addr; | ||
123 | virtual_dma_count = size; | ||
124 | virtual_dma_residue = 0; | ||
125 | return 0; | ||
126 | } | ||
127 | |||
128 | static int hard_dma_setup(char *addr, unsigned long size, int mode, int io) | ||
42 | { | 129 | { |
43 | static unsigned long prev_size; | 130 | static unsigned long prev_size; |
44 | static dma_addr_t bus_addr = 0; | 131 | static dma_addr_t bus_addr = 0; |
@@ -46,6 +133,7 @@ static __inline__ int powerpc_fd_dma_setup(char *addr, unsigned long size, | |||
46 | static int prev_dir; | 133 | static int prev_dir; |
47 | int dir; | 134 | int dir; |
48 | 135 | ||
136 | doing_vdma = 0; | ||
49 | dir = (mode == DMA_MODE_READ) ? PCI_DMA_FROMDEVICE : PCI_DMA_TODEVICE; | 137 | dir = (mode == DMA_MODE_READ) ? PCI_DMA_FROMDEVICE : PCI_DMA_TODEVICE; |
50 | 138 | ||
51 | if (bus_addr | 139 | if (bus_addr |
@@ -74,11 +162,32 @@ static __inline__ int powerpc_fd_dma_setup(char *addr, unsigned long size, | |||
74 | return 0; | 162 | return 0; |
75 | } | 163 | } |
76 | 164 | ||
77 | #endif /* CONFIG_PCI */ | 165 | static struct fd_dma_ops real_dma_ops = |
166 | { | ||
167 | ._disable_dma = disable_dma, | ||
168 | ._free_dma = free_dma, | ||
169 | ._get_dma_residue = get_dma_residue, | ||
170 | ._dma_setup = hard_dma_setup | ||
171 | }; | ||
172 | |||
173 | static struct fd_dma_ops virt_dma_ops = | ||
174 | { | ||
175 | ._disable_dma = vdma_disable_dma, | ||
176 | ._free_dma = vdma_nop, | ||
177 | ._get_dma_residue = vdma_get_dma_residue, | ||
178 | ._dma_setup = vdma_dma_setup | ||
179 | }; | ||
78 | 180 | ||
79 | __inline__ void virtual_dma_init(void) | 181 | static int fd_request_dma() |
80 | { | 182 | { |
81 | /* Nothing to do on PowerPC */ | 183 | if (can_use_virtual_dma & 1) { |
184 | fd_ops = &virt_dma_ops; | ||
185 | return 0; | ||
186 | } | ||
187 | else { | ||
188 | fd_ops = &real_dma_ops; | ||
189 | return request_dma(FLOPPY_DMA, "floppy"); | ||
190 | } | ||
82 | } | 191 | } |
83 | 192 | ||
84 | static int FDC1 = 0x3f0; | 193 | static int FDC1 = 0x3f0; |
diff --git a/include/asm-powerpc/pmi.h b/include/asm-powerpc/pmi.h new file mode 100644 index 000000000000..cb0f8aa43088 --- /dev/null +++ b/include/asm-powerpc/pmi.h | |||
@@ -0,0 +1,67 @@ | |||
1 | #ifndef _POWERPC_PMI_H | ||
2 | #define _POWERPC_PMI_H | ||
3 | |||
4 | /* | ||
5 | * Definitions for talking with PMI device on PowerPC | ||
6 | * | ||
7 | * PMI (Platform Management Interrupt) is a way to communicate | ||
8 | * with the BMC (Baseboard Management Controller) via interrupts. | ||
9 | * Unlike IPMI it is bidirectional and has a low latency. | ||
10 | * | ||
11 | * (C) Copyright IBM Deutschland Entwicklung GmbH 2005 | ||
12 | * | ||
13 | * Author: Christian Krafft <krafft@de.ibm.com> | ||
14 | * | ||
15 | * This program is free software; you can redistribute it and/or modify | ||
16 | * it under the terms of the GNU General Public License as published by | ||
17 | * the Free Software Foundation; either version 2, or (at your option) | ||
18 | * any later version. | ||
19 | * | ||
20 | * This program is distributed in the hope that it will be useful, | ||
21 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
22 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
23 | * GNU General Public License for more details. | ||
24 | * | ||
25 | * You should have received a copy of the GNU General Public License | ||
26 | * along with this program; if not, write to the Free Software | ||
27 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
28 | */ | ||
29 | |||
30 | #ifdef __KERNEL__ | ||
31 | |||
32 | #include <asm/of_device.h> | ||
33 | |||
34 | #define PMI_TYPE_FREQ_CHANGE 0x01 | ||
35 | #define PMI_READ_TYPE 0 | ||
36 | #define PMI_READ_DATA0 1 | ||
37 | #define PMI_READ_DATA1 2 | ||
38 | #define PMI_READ_DATA2 3 | ||
39 | #define PMI_WRITE_TYPE 4 | ||
40 | #define PMI_WRITE_DATA0 5 | ||
41 | #define PMI_WRITE_DATA1 6 | ||
42 | #define PMI_WRITE_DATA2 7 | ||
43 | |||
44 | #define PMI_ACK 0x80 | ||
45 | |||
46 | #define PMI_TIMEOUT 100 | ||
47 | |||
48 | typedef struct { | ||
49 | u8 type; | ||
50 | u8 data0; | ||
51 | u8 data1; | ||
52 | u8 data2; | ||
53 | } pmi_message_t; | ||
54 | |||
55 | struct pmi_handler { | ||
56 | struct list_head node; | ||
57 | u8 type; | ||
58 | void (*handle_pmi_message) (struct of_device *, pmi_message_t); | ||
59 | }; | ||
60 | |||
61 | void pmi_register_handler(struct of_device *, struct pmi_handler *); | ||
62 | void pmi_unregister_handler(struct of_device *, struct pmi_handler *); | ||
63 | |||
64 | void pmi_send_message(struct of_device *, pmi_message_t); | ||
65 | |||
66 | #endif /* __KERNEL__ */ | ||
67 | #endif /* _POWERPC_PMI_H */ | ||
diff --git a/include/asm-powerpc/prom.h b/include/asm-powerpc/prom.h index 0afee17f33b4..020ed015a94b 100644 --- a/include/asm-powerpc/prom.h +++ b/include/asm-powerpc/prom.h | |||
@@ -255,6 +255,8 @@ extern void kdump_move_device_tree(void); | |||
255 | /* CPU OF node matching */ | 255 | /* CPU OF node matching */ |
256 | struct device_node *of_get_cpu_node(int cpu, unsigned int *thread); | 256 | struct device_node *of_get_cpu_node(int cpu, unsigned int *thread); |
257 | 257 | ||
258 | /* Get the MAC address */ | ||
259 | extern const void *of_get_mac_address(struct device_node *np); | ||
258 | 260 | ||
259 | /* | 261 | /* |
260 | * OF interrupt mapping | 262 | * OF interrupt mapping |
diff --git a/include/asm-powerpc/ps3.h b/include/asm-powerpc/ps3.h index 4f5a1e01fdac..821581a8b643 100644 --- a/include/asm-powerpc/ps3.h +++ b/include/asm-powerpc/ps3.h | |||
@@ -355,13 +355,7 @@ extern struct bus_type ps3_system_bus_type; | |||
355 | 355 | ||
356 | /* vuart routines */ | 356 | /* vuart routines */ |
357 | 357 | ||
358 | struct ps3_vuart_stats { | 358 | struct ps3_vuart_port_priv; |
359 | unsigned long bytes_written; | ||
360 | unsigned long bytes_read; | ||
361 | unsigned long tx_interrupts; | ||
362 | unsigned long rx_interrupts; | ||
363 | unsigned long disconnect_interrupts; | ||
364 | }; | ||
365 | 359 | ||
366 | /** | 360 | /** |
367 | * struct ps3_vuart_port_device - a device on a vuart port | 361 | * struct ps3_vuart_port_device - a device on a vuart port |
@@ -370,22 +364,24 @@ struct ps3_vuart_stats { | |||
370 | struct ps3_vuart_port_device { | 364 | struct ps3_vuart_port_device { |
371 | enum ps3_match_id match_id; | 365 | enum ps3_match_id match_id; |
372 | struct device core; | 366 | struct device core; |
367 | struct ps3_vuart_port_priv* priv; /* private driver variables */ | ||
373 | 368 | ||
374 | /* private driver variables */ | ||
375 | unsigned int port_number; | ||
376 | u64 interrupt_mask; | ||
377 | struct { | ||
378 | spinlock_t lock; | ||
379 | struct list_head head; | ||
380 | } tx_list; | ||
381 | struct { | ||
382 | unsigned long bytes_held; | ||
383 | spinlock_t lock; | ||
384 | struct list_head head; | ||
385 | } rx_list; | ||
386 | struct ps3_vuart_stats stats; | ||
387 | }; | 369 | }; |
388 | 370 | ||
389 | int ps3_vuart_port_device_register(struct ps3_vuart_port_device *dev); | 371 | int ps3_vuart_port_device_register(struct ps3_vuart_port_device *dev); |
390 | 372 | ||
373 | /* system manager */ | ||
374 | |||
375 | void ps3_sys_manager_restart(void); | ||
376 | void ps3_sys_manager_power_off(void); | ||
377 | |||
378 | struct ps3_prealloc { | ||
379 | const char *name; | ||
380 | void *address; | ||
381 | unsigned long size; | ||
382 | unsigned long align; | ||
383 | }; | ||
384 | |||
385 | extern struct ps3_prealloc ps3fb_videomemory; | ||
386 | |||
391 | #endif | 387 | #endif |
diff --git a/include/asm-powerpc/ps3av.h b/include/asm-powerpc/ps3av.h new file mode 100644 index 000000000000..43e90ea96136 --- /dev/null +++ b/include/asm-powerpc/ps3av.h | |||
@@ -0,0 +1,738 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2006 Sony Computer Entertainment Inc. | ||
3 | * Copyright 2006, 2007 Sony Corporation | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it | ||
6 | * under the terms of the GNU General Public License as published | ||
7 | * by the Free Software Foundation; version 2 of the License. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, but | ||
10 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
12 | * General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along | ||
15 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
17 | */ | ||
18 | #ifndef _ASM_POWERPC_PS3AV_H_ | ||
19 | #define _ASM_POWERPC_PS3AV_H_ | ||
20 | |||
21 | #include <linux/mutex.h> | ||
22 | |||
23 | /** command for ioctl() **/ | ||
24 | #define PS3AV_VERSION 0x205 /* version of ps3av command */ | ||
25 | |||
26 | #define PS3AV_CID_AV_INIT 0x00000001 | ||
27 | #define PS3AV_CID_AV_FIN 0x00000002 | ||
28 | #define PS3AV_CID_AV_GET_HW_CONF 0x00000003 | ||
29 | #define PS3AV_CID_AV_GET_MONITOR_INFO 0x00000004 | ||
30 | #define PS3AV_CID_AV_ENABLE_EVENT 0x00000006 | ||
31 | #define PS3AV_CID_AV_DISABLE_EVENT 0x00000007 | ||
32 | #define PS3AV_CID_AV_TV_MUTE 0x0000000a | ||
33 | |||
34 | #define PS3AV_CID_AV_VIDEO_CS 0x00010001 | ||
35 | #define PS3AV_CID_AV_VIDEO_MUTE 0x00010002 | ||
36 | #define PS3AV_CID_AV_VIDEO_DISABLE_SIG 0x00010003 | ||
37 | #define PS3AV_CID_AV_AUDIO_PARAM 0x00020001 | ||
38 | #define PS3AV_CID_AV_AUDIO_MUTE 0x00020002 | ||
39 | #define PS3AV_CID_AV_HDMI_MODE 0x00040001 | ||
40 | |||
41 | #define PS3AV_CID_VIDEO_INIT 0x01000001 | ||
42 | #define PS3AV_CID_VIDEO_MODE 0x01000002 | ||
43 | #define PS3AV_CID_VIDEO_FORMAT 0x01000004 | ||
44 | #define PS3AV_CID_VIDEO_PITCH 0x01000005 | ||
45 | |||
46 | #define PS3AV_CID_AUDIO_INIT 0x02000001 | ||
47 | #define PS3AV_CID_AUDIO_MODE 0x02000002 | ||
48 | #define PS3AV_CID_AUDIO_MUTE 0x02000003 | ||
49 | #define PS3AV_CID_AUDIO_ACTIVE 0x02000004 | ||
50 | #define PS3AV_CID_AUDIO_INACTIVE 0x02000005 | ||
51 | #define PS3AV_CID_AUDIO_SPDIF_BIT 0x02000006 | ||
52 | #define PS3AV_CID_AUDIO_CTRL 0x02000007 | ||
53 | |||
54 | #define PS3AV_CID_EVENT_UNPLUGGED 0x10000001 | ||
55 | #define PS3AV_CID_EVENT_PLUGGED 0x10000002 | ||
56 | #define PS3AV_CID_EVENT_HDCP_DONE 0x10000003 | ||
57 | #define PS3AV_CID_EVENT_HDCP_FAIL 0x10000004 | ||
58 | #define PS3AV_CID_EVENT_HDCP_AUTH 0x10000005 | ||
59 | #define PS3AV_CID_EVENT_HDCP_ERROR 0x10000006 | ||
60 | |||
61 | #define PS3AV_CID_AVB_PARAM 0x04000001 | ||
62 | |||
63 | /* max backend ports */ | ||
64 | #define PS3AV_HDMI_MAX 2 /* HDMI_0 HDMI_1 */ | ||
65 | #define PS3AV_AVMULTI_MAX 1 /* AVMULTI_0 */ | ||
66 | #define PS3AV_AV_PORT_MAX (PS3AV_HDMI_MAX + PS3AV_AVMULTI_MAX) | ||
67 | #define PS3AV_OPT_PORT_MAX 1 /* SPDIF0 */ | ||
68 | #define PS3AV_HEAD_MAX 2 /* HEAD_A HEAD_B */ | ||
69 | |||
70 | /* num of pkt for PS3AV_CID_AVB_PARAM */ | ||
71 | #define PS3AV_AVB_NUM_VIDEO PS3AV_HEAD_MAX | ||
72 | #define PS3AV_AVB_NUM_AUDIO 0 /* not supported */ | ||
73 | #define PS3AV_AVB_NUM_AV_VIDEO PS3AV_AV_PORT_MAX | ||
74 | #define PS3AV_AVB_NUM_AV_AUDIO PS3AV_HDMI_MAX | ||
75 | |||
76 | #define PS3AV_MUTE_PORT_MAX 1 /* num of ports in mute pkt */ | ||
77 | |||
78 | /* event_bit */ | ||
79 | #define PS3AV_CMD_EVENT_BIT_UNPLUGGED (1 << 0) | ||
80 | #define PS3AV_CMD_EVENT_BIT_PLUGGED (1 << 1) | ||
81 | #define PS3AV_CMD_EVENT_BIT_HDCP_DONE (1 << 2) | ||
82 | #define PS3AV_CMD_EVENT_BIT_HDCP_FAIL (1 << 3) | ||
83 | #define PS3AV_CMD_EVENT_BIT_HDCP_REAUTH (1 << 4) | ||
84 | #define PS3AV_CMD_EVENT_BIT_HDCP_TOPOLOGY (1 << 5) | ||
85 | |||
86 | /* common params */ | ||
87 | /* mute */ | ||
88 | #define PS3AV_CMD_MUTE_OFF 0x0000 | ||
89 | #define PS3AV_CMD_MUTE_ON 0x0001 | ||
90 | /* avport */ | ||
91 | #define PS3AV_CMD_AVPORT_HDMI_0 0x0000 | ||
92 | #define PS3AV_CMD_AVPORT_HDMI_1 0x0001 | ||
93 | #define PS3AV_CMD_AVPORT_AVMULTI_0 0x0010 | ||
94 | #define PS3AV_CMD_AVPORT_SPDIF_0 0x0020 | ||
95 | #define PS3AV_CMD_AVPORT_SPDIF_1 0x0021 | ||
96 | |||
97 | /* for av backend */ | ||
98 | /* av_mclk */ | ||
99 | #define PS3AV_CMD_AV_MCLK_128 0x0000 | ||
100 | #define PS3AV_CMD_AV_MCLK_256 0x0001 | ||
101 | #define PS3AV_CMD_AV_MCLK_512 0x0003 | ||
102 | /* av_inputlen */ | ||
103 | #define PS3AV_CMD_AV_INPUTLEN_16 0x02 | ||
104 | #define PS3AV_CMD_AV_INPUTLEN_20 0x0a | ||
105 | #define PS3AV_CMD_AV_INPUTLEN_24 0x0b | ||
106 | /* alayout */ | ||
107 | #define PS3AV_CMD_AV_LAYOUT_32 (1 << 0) | ||
108 | #define PS3AV_CMD_AV_LAYOUT_44 (1 << 1) | ||
109 | #define PS3AV_CMD_AV_LAYOUT_48 (1 << 2) | ||
110 | #define PS3AV_CMD_AV_LAYOUT_88 (1 << 3) | ||
111 | #define PS3AV_CMD_AV_LAYOUT_96 (1 << 4) | ||
112 | #define PS3AV_CMD_AV_LAYOUT_176 (1 << 5) | ||
113 | #define PS3AV_CMD_AV_LAYOUT_192 (1 << 6) | ||
114 | /* hdmi_mode */ | ||
115 | #define PS3AV_CMD_AV_HDMI_MODE_NORMAL 0xff | ||
116 | #define PS3AV_CMD_AV_HDMI_HDCP_OFF 0x01 | ||
117 | #define PS3AV_CMD_AV_HDMI_EDID_PASS 0x80 | ||
118 | #define PS3AV_CMD_AV_HDMI_DVI 0x40 | ||
119 | |||
120 | /* for video module */ | ||
121 | /* video_head */ | ||
122 | #define PS3AV_CMD_VIDEO_HEAD_A 0x0000 | ||
123 | #define PS3AV_CMD_VIDEO_HEAD_B 0x0001 | ||
124 | /* video_cs_out video_cs_in */ | ||
125 | #define PS3AV_CMD_VIDEO_CS_NONE 0x0000 | ||
126 | #define PS3AV_CMD_VIDEO_CS_RGB_8 0x0001 | ||
127 | #define PS3AV_CMD_VIDEO_CS_YUV444_8 0x0002 | ||
128 | #define PS3AV_CMD_VIDEO_CS_YUV422_8 0x0003 | ||
129 | #define PS3AV_CMD_VIDEO_CS_XVYCC_8 0x0004 | ||
130 | #define PS3AV_CMD_VIDEO_CS_RGB_10 0x0005 | ||
131 | #define PS3AV_CMD_VIDEO_CS_YUV444_10 0x0006 | ||
132 | #define PS3AV_CMD_VIDEO_CS_YUV422_10 0x0007 | ||
133 | #define PS3AV_CMD_VIDEO_CS_XVYCC_10 0x0008 | ||
134 | #define PS3AV_CMD_VIDEO_CS_RGB_12 0x0009 | ||
135 | #define PS3AV_CMD_VIDEO_CS_YUV444_12 0x000a | ||
136 | #define PS3AV_CMD_VIDEO_CS_YUV422_12 0x000b | ||
137 | #define PS3AV_CMD_VIDEO_CS_XVYCC_12 0x000c | ||
138 | /* video_vid */ | ||
139 | #define PS3AV_CMD_VIDEO_VID_NONE 0x0000 | ||
140 | #define PS3AV_CMD_VIDEO_VID_480I 0x0001 | ||
141 | #define PS3AV_CMD_VIDEO_VID_576I 0x0003 | ||
142 | #define PS3AV_CMD_VIDEO_VID_480P 0x0005 | ||
143 | #define PS3AV_CMD_VIDEO_VID_576P 0x0006 | ||
144 | #define PS3AV_CMD_VIDEO_VID_1080I_60HZ 0x0007 | ||
145 | #define PS3AV_CMD_VIDEO_VID_1080I_50HZ 0x0008 | ||
146 | #define PS3AV_CMD_VIDEO_VID_720P_60HZ 0x0009 | ||
147 | #define PS3AV_CMD_VIDEO_VID_720P_50HZ 0x000a | ||
148 | #define PS3AV_CMD_VIDEO_VID_1080P_60HZ 0x000b | ||
149 | #define PS3AV_CMD_VIDEO_VID_1080P_50HZ 0x000c | ||
150 | #define PS3AV_CMD_VIDEO_VID_WXGA 0x000d | ||
151 | #define PS3AV_CMD_VIDEO_VID_SXGA 0x000e | ||
152 | #define PS3AV_CMD_VIDEO_VID_WUXGA 0x000f | ||
153 | #define PS3AV_CMD_VIDEO_VID_480I_A 0x0010 | ||
154 | /* video_format */ | ||
155 | #define PS3AV_CMD_VIDEO_FORMAT_BLACK 0x0000 | ||
156 | #define PS3AV_CMD_VIDEO_FORMAT_ARGB_8BIT 0x0007 | ||
157 | /* video_order */ | ||
158 | #define PS3AV_CMD_VIDEO_ORDER_RGB 0x0000 | ||
159 | #define PS3AV_CMD_VIDEO_ORDER_BGR 0x0001 | ||
160 | /* video_fmt */ | ||
161 | #define PS3AV_CMD_VIDEO_FMT_X8R8G8B8 0x0000 | ||
162 | /* video_out_format */ | ||
163 | #define PS3AV_CMD_VIDEO_OUT_FORMAT_RGB_12BIT 0x0000 | ||
164 | /* video_sync */ | ||
165 | #define PS3AV_CMD_VIDEO_SYNC_VSYNC 0x0001 | ||
166 | #define PS3AV_CMD_VIDEO_SYNC_CSYNC 0x0004 | ||
167 | #define PS3AV_CMD_VIDEO_SYNC_HSYNC 0x0010 | ||
168 | |||
169 | /* for audio module */ | ||
170 | /* num_of_ch */ | ||
171 | #define PS3AV_CMD_AUDIO_NUM_OF_CH_2 0x0000 | ||
172 | #define PS3AV_CMD_AUDIO_NUM_OF_CH_3 0x0001 | ||
173 | #define PS3AV_CMD_AUDIO_NUM_OF_CH_4 0x0002 | ||
174 | #define PS3AV_CMD_AUDIO_NUM_OF_CH_5 0x0003 | ||
175 | #define PS3AV_CMD_AUDIO_NUM_OF_CH_6 0x0004 | ||
176 | #define PS3AV_CMD_AUDIO_NUM_OF_CH_7 0x0005 | ||
177 | #define PS3AV_CMD_AUDIO_NUM_OF_CH_8 0x0006 | ||
178 | /* audio_fs */ | ||
179 | #define PS3AV_CMD_AUDIO_FS_32K 0x0001 | ||
180 | #define PS3AV_CMD_AUDIO_FS_44K 0x0002 | ||
181 | #define PS3AV_CMD_AUDIO_FS_48K 0x0003 | ||
182 | #define PS3AV_CMD_AUDIO_FS_88K 0x0004 | ||
183 | #define PS3AV_CMD_AUDIO_FS_96K 0x0005 | ||
184 | #define PS3AV_CMD_AUDIO_FS_176K 0x0006 | ||
185 | #define PS3AV_CMD_AUDIO_FS_192K 0x0007 | ||
186 | /* audio_word_bits */ | ||
187 | #define PS3AV_CMD_AUDIO_WORD_BITS_16 0x0001 | ||
188 | #define PS3AV_CMD_AUDIO_WORD_BITS_20 0x0002 | ||
189 | #define PS3AV_CMD_AUDIO_WORD_BITS_24 0x0003 | ||
190 | /* audio_format */ | ||
191 | #define PS3AV_CMD_AUDIO_FORMAT_PCM 0x0001 | ||
192 | #define PS3AV_CMD_AUDIO_FORMAT_BITSTREAM 0x00ff | ||
193 | /* audio_source */ | ||
194 | #define PS3AV_CMD_AUDIO_SOURCE_SERIAL 0x0000 | ||
195 | #define PS3AV_CMD_AUDIO_SOURCE_SPDIF 0x0001 | ||
196 | /* audio_swap */ | ||
197 | #define PS3AV_CMD_AUDIO_SWAP_0 0x0000 | ||
198 | #define PS3AV_CMD_AUDIO_SWAP_1 0x0000 | ||
199 | /* audio_map */ | ||
200 | #define PS3AV_CMD_AUDIO_MAP_OUTPUT_0 0x0000 | ||
201 | #define PS3AV_CMD_AUDIO_MAP_OUTPUT_1 0x0001 | ||
202 | #define PS3AV_CMD_AUDIO_MAP_OUTPUT_2 0x0002 | ||
203 | #define PS3AV_CMD_AUDIO_MAP_OUTPUT_3 0x0003 | ||
204 | /* audio_layout */ | ||
205 | #define PS3AV_CMD_AUDIO_LAYOUT_2CH 0x0000 | ||
206 | #define PS3AV_CMD_AUDIO_LAYOUT_6CH 0x000b /* LREClr */ | ||
207 | #define PS3AV_CMD_AUDIO_LAYOUT_8CH 0x001f /* LREClrXY */ | ||
208 | /* audio_downmix */ | ||
209 | #define PS3AV_CMD_AUDIO_DOWNMIX_PERMITTED 0x0000 | ||
210 | #define PS3AV_CMD_AUDIO_DOWNMIX_PROHIBITED 0x0001 | ||
211 | |||
212 | /* audio_port */ | ||
213 | #define PS3AV_CMD_AUDIO_PORT_HDMI_0 ( 1 << 0 ) | ||
214 | #define PS3AV_CMD_AUDIO_PORT_HDMI_1 ( 1 << 1 ) | ||
215 | #define PS3AV_CMD_AUDIO_PORT_AVMULTI_0 ( 1 << 10 ) | ||
216 | #define PS3AV_CMD_AUDIO_PORT_SPDIF_0 ( 1 << 20 ) | ||
217 | #define PS3AV_CMD_AUDIO_PORT_SPDIF_1 ( 1 << 21 ) | ||
218 | |||
219 | /* audio_ctrl_id */ | ||
220 | #define PS3AV_CMD_AUDIO_CTRL_ID_DAC_RESET 0x0000 | ||
221 | #define PS3AV_CMD_AUDIO_CTRL_ID_DAC_DE_EMPHASIS 0x0001 | ||
222 | #define PS3AV_CMD_AUDIO_CTRL_ID_AVCLK 0x0002 | ||
223 | /* audio_ctrl_data[0] reset */ | ||
224 | #define PS3AV_CMD_AUDIO_CTRL_RESET_NEGATE 0x0000 | ||
225 | #define PS3AV_CMD_AUDIO_CTRL_RESET_ASSERT 0x0001 | ||
226 | /* audio_ctrl_data[0] de-emphasis */ | ||
227 | #define PS3AV_CMD_AUDIO_CTRL_DE_EMPHASIS_OFF 0x0000 | ||
228 | #define PS3AV_CMD_AUDIO_CTRL_DE_EMPHASIS_ON 0x0001 | ||
229 | /* audio_ctrl_data[0] avclk */ | ||
230 | #define PS3AV_CMD_AUDIO_CTRL_AVCLK_22 0x0000 | ||
231 | #define PS3AV_CMD_AUDIO_CTRL_AVCLK_18 0x0001 | ||
232 | |||
233 | /* av_vid */ | ||
234 | /* do not use these params directly, use vid_video2av */ | ||
235 | #define PS3AV_CMD_AV_VID_480I 0x0000 | ||
236 | #define PS3AV_CMD_AV_VID_480P 0x0001 | ||
237 | #define PS3AV_CMD_AV_VID_720P_60HZ 0x0002 | ||
238 | #define PS3AV_CMD_AV_VID_1080I_60HZ 0x0003 | ||
239 | #define PS3AV_CMD_AV_VID_1080P_60HZ 0x0004 | ||
240 | #define PS3AV_CMD_AV_VID_576I 0x0005 | ||
241 | #define PS3AV_CMD_AV_VID_576P 0x0006 | ||
242 | #define PS3AV_CMD_AV_VID_720P_50HZ 0x0007 | ||
243 | #define PS3AV_CMD_AV_VID_1080I_50HZ 0x0008 | ||
244 | #define PS3AV_CMD_AV_VID_1080P_50HZ 0x0009 | ||
245 | #define PS3AV_CMD_AV_VID_WXGA 0x000a | ||
246 | #define PS3AV_CMD_AV_VID_SXGA 0x000b | ||
247 | #define PS3AV_CMD_AV_VID_WUXGA 0x000c | ||
248 | /* av_cs_out av_cs_in */ | ||
249 | /* use cs_video2av() */ | ||
250 | #define PS3AV_CMD_AV_CS_RGB_8 0x0000 | ||
251 | #define PS3AV_CMD_AV_CS_YUV444_8 0x0001 | ||
252 | #define PS3AV_CMD_AV_CS_YUV422_8 0x0002 | ||
253 | #define PS3AV_CMD_AV_CS_XVYCC_8 0x0003 | ||
254 | #define PS3AV_CMD_AV_CS_RGB_10 0x0004 | ||
255 | #define PS3AV_CMD_AV_CS_YUV444_10 0x0005 | ||
256 | #define PS3AV_CMD_AV_CS_YUV422_10 0x0006 | ||
257 | #define PS3AV_CMD_AV_CS_XVYCC_10 0x0007 | ||
258 | #define PS3AV_CMD_AV_CS_RGB_12 0x0008 | ||
259 | #define PS3AV_CMD_AV_CS_YUV444_12 0x0009 | ||
260 | #define PS3AV_CMD_AV_CS_YUV422_12 0x000a | ||
261 | #define PS3AV_CMD_AV_CS_XVYCC_12 0x000b | ||
262 | #define PS3AV_CMD_AV_CS_8 0x0000 | ||
263 | #define PS3AV_CMD_AV_CS_10 0x0001 | ||
264 | #define PS3AV_CMD_AV_CS_12 0x0002 | ||
265 | /* dither */ | ||
266 | #define PS3AV_CMD_AV_DITHER_OFF 0x0000 | ||
267 | #define PS3AV_CMD_AV_DITHER_ON 0x0001 | ||
268 | #define PS3AV_CMD_AV_DITHER_8BIT 0x0000 | ||
269 | #define PS3AV_CMD_AV_DITHER_10BIT 0x0002 | ||
270 | #define PS3AV_CMD_AV_DITHER_12BIT 0x0004 | ||
271 | /* super_white */ | ||
272 | #define PS3AV_CMD_AV_SUPER_WHITE_OFF 0x0000 | ||
273 | #define PS3AV_CMD_AV_SUPER_WHITE_ON 0x0001 | ||
274 | /* aspect */ | ||
275 | #define PS3AV_CMD_AV_ASPECT_16_9 0x0000 | ||
276 | #define PS3AV_CMD_AV_ASPECT_4_3 0x0001 | ||
277 | /* video_cs_cnv() */ | ||
278 | #define PS3AV_CMD_VIDEO_CS_RGB 0x0001 | ||
279 | #define PS3AV_CMD_VIDEO_CS_YUV422 0x0002 | ||
280 | #define PS3AV_CMD_VIDEO_CS_YUV444 0x0003 | ||
281 | |||
282 | /* for automode */ | ||
283 | #define PS3AV_RESBIT_720x480P 0x0003 /* 0x0001 | 0x0002 */ | ||
284 | #define PS3AV_RESBIT_720x576P 0x0003 /* 0x0001 | 0x0002 */ | ||
285 | #define PS3AV_RESBIT_1280x720P 0x0004 | ||
286 | #define PS3AV_RESBIT_1920x1080I 0x0008 | ||
287 | #define PS3AV_RESBIT_1920x1080P 0x4000 | ||
288 | #define PS3AV_RES_MASK_60 (PS3AV_RESBIT_720x480P \ | ||
289 | | PS3AV_RESBIT_1280x720P \ | ||
290 | | PS3AV_RESBIT_1920x1080I \ | ||
291 | | PS3AV_RESBIT_1920x1080P) | ||
292 | #define PS3AV_RES_MASK_50 (PS3AV_RESBIT_720x576P \ | ||
293 | | PS3AV_RESBIT_1280x720P \ | ||
294 | | PS3AV_RESBIT_1920x1080I \ | ||
295 | | PS3AV_RESBIT_1920x1080P) | ||
296 | |||
297 | #define PS3AV_MONITOR_TYPE_HDMI 1 /* HDMI */ | ||
298 | #define PS3AV_MONITOR_TYPE_DVI 2 /* DVI */ | ||
299 | #define PS3AV_DEFAULT_HDMI_VID_REG_60 PS3AV_CMD_VIDEO_VID_480P | ||
300 | #define PS3AV_DEFAULT_AVMULTI_VID_REG_60 PS3AV_CMD_VIDEO_VID_480I | ||
301 | #define PS3AV_DEFAULT_HDMI_VID_REG_50 PS3AV_CMD_VIDEO_VID_576P | ||
302 | #define PS3AV_DEFAULT_AVMULTI_VID_REG_50 PS3AV_CMD_VIDEO_VID_576I | ||
303 | #define PS3AV_DEFAULT_DVI_VID PS3AV_CMD_VIDEO_VID_480P | ||
304 | |||
305 | #define PS3AV_REGION_60 0x01 | ||
306 | #define PS3AV_REGION_50 0x02 | ||
307 | #define PS3AV_REGION_RGB 0x10 | ||
308 | |||
309 | #define get_status(buf) (((__u32 *)buf)[2]) | ||
310 | #define PS3AV_HDR_SIZE 4 /* version + size */ | ||
311 | |||
312 | /* for video mode */ | ||
313 | #define PS3AV_MODE_MASK 0x000F | ||
314 | #define PS3AV_MODE_HDCP_OFF 0x1000 /* Retail PS3 product doesn't support this */ | ||
315 | #define PS3AV_MODE_DITHER 0x0800 | ||
316 | #define PS3AV_MODE_FULL 0x0080 | ||
317 | #define PS3AV_MODE_DVI 0x0040 | ||
318 | #define PS3AV_MODE_RGB 0x0020 | ||
319 | |||
320 | |||
321 | /** command packet structure **/ | ||
322 | struct ps3av_send_hdr { | ||
323 | u16 version; | ||
324 | u16 size; /* size of command packet */ | ||
325 | u32 cid; /* command id */ | ||
326 | }; | ||
327 | |||
328 | struct ps3av_reply_hdr { | ||
329 | u16 version; | ||
330 | u16 size; | ||
331 | u32 cid; | ||
332 | u32 status; | ||
333 | }; | ||
334 | |||
335 | /* backend: initialization */ | ||
336 | struct ps3av_pkt_av_init { | ||
337 | struct ps3av_send_hdr send_hdr; | ||
338 | u32 event_bit; | ||
339 | }; | ||
340 | |||
341 | /* backend: finalize */ | ||
342 | struct ps3av_pkt_av_fin { | ||
343 | struct ps3av_send_hdr send_hdr; | ||
344 | /* recv */ | ||
345 | u32 reserved; | ||
346 | }; | ||
347 | |||
348 | /* backend: get port */ | ||
349 | struct ps3av_pkt_av_get_hw_conf { | ||
350 | struct ps3av_send_hdr send_hdr; | ||
351 | /* recv */ | ||
352 | u32 status; | ||
353 | u16 num_of_hdmi; /* out: number of hdmi */ | ||
354 | u16 num_of_avmulti; /* out: number of avmulti */ | ||
355 | u16 num_of_spdif; /* out: number of hdmi */ | ||
356 | u16 reserved; | ||
357 | }; | ||
358 | |||
359 | /* backend: get monitor info */ | ||
360 | struct ps3av_info_resolution { | ||
361 | u32 res_bits; | ||
362 | u32 native; | ||
363 | }; | ||
364 | |||
365 | struct ps3av_info_cs { | ||
366 | u8 rgb; | ||
367 | u8 yuv444; | ||
368 | u8 yuv422; | ||
369 | u8 reserved; | ||
370 | }; | ||
371 | |||
372 | struct ps3av_info_color { | ||
373 | u16 red_x; | ||
374 | u16 red_y; | ||
375 | u16 green_x; | ||
376 | u16 green_y; | ||
377 | u16 blue_x; | ||
378 | u16 blue_y; | ||
379 | u16 white_x; | ||
380 | u16 white_y; | ||
381 | u32 gamma; | ||
382 | }; | ||
383 | |||
384 | struct ps3av_info_audio { | ||
385 | u8 type; | ||
386 | u8 max_num_of_ch; | ||
387 | u8 fs; | ||
388 | u8 sbit; | ||
389 | }; | ||
390 | |||
391 | struct ps3av_info_monitor { | ||
392 | u8 avport; | ||
393 | u8 monitor_id[10]; | ||
394 | u8 monitor_type; | ||
395 | u8 monitor_name[16]; | ||
396 | struct ps3av_info_resolution res_60; | ||
397 | struct ps3av_info_resolution res_50; | ||
398 | struct ps3av_info_resolution res_other; | ||
399 | struct ps3av_info_resolution res_vesa; | ||
400 | struct ps3av_info_cs cs; | ||
401 | struct ps3av_info_color color; | ||
402 | u8 supported_ai; | ||
403 | u8 speaker_info; | ||
404 | u8 num_of_audio_block; | ||
405 | struct ps3av_info_audio audio[0]; /* 0 or more audio blocks */ | ||
406 | u8 reserved[169]; | ||
407 | } __attribute__ ((packed)); | ||
408 | |||
409 | struct ps3av_pkt_av_get_monitor_info { | ||
410 | struct ps3av_send_hdr send_hdr; | ||
411 | u16 avport; /* in: avport */ | ||
412 | u16 reserved; | ||
413 | /* recv */ | ||
414 | struct ps3av_info_monitor info; /* out: monitor info */ | ||
415 | }; | ||
416 | |||
417 | /* backend: enable/disable event */ | ||
418 | struct ps3av_pkt_av_event { | ||
419 | struct ps3av_send_hdr send_hdr; | ||
420 | u32 event_bit; /* in */ | ||
421 | }; | ||
422 | |||
423 | /* backend: video cs param */ | ||
424 | struct ps3av_pkt_av_video_cs { | ||
425 | struct ps3av_send_hdr send_hdr; | ||
426 | u16 avport; /* in: avport */ | ||
427 | u16 av_vid; /* in: video resolution */ | ||
428 | u16 av_cs_out; /* in: output color space */ | ||
429 | u16 av_cs_in; /* in: input color space */ | ||
430 | u8 dither; /* in: dither bit length */ | ||
431 | u8 bitlen_out; /* in: bit length */ | ||
432 | u8 super_white; /* in: super white */ | ||
433 | u8 aspect; /* in: aspect ratio */ | ||
434 | }; | ||
435 | |||
436 | /* backend: video mute */ | ||
437 | struct ps3av_av_mute { | ||
438 | u16 avport; /* in: avport */ | ||
439 | u16 mute; /* in: mute on/off */ | ||
440 | }; | ||
441 | |||
442 | struct ps3av_pkt_av_video_mute { | ||
443 | struct ps3av_send_hdr send_hdr; | ||
444 | struct ps3av_av_mute mute[PS3AV_MUTE_PORT_MAX]; | ||
445 | }; | ||
446 | |||
447 | /* backend: video disable signal */ | ||
448 | struct ps3av_pkt_av_video_disable_sig { | ||
449 | struct ps3av_send_hdr send_hdr; | ||
450 | u16 avport; /* in: avport */ | ||
451 | u16 reserved; | ||
452 | }; | ||
453 | |||
454 | /* backend: audio param */ | ||
455 | struct ps3av_audio_info_frame { | ||
456 | struct pb1_bit { | ||
457 | u8 ct:4; | ||
458 | u8 rsv:1; | ||
459 | u8 cc:3; | ||
460 | } pb1; | ||
461 | struct pb2_bit { | ||
462 | u8 rsv:3; | ||
463 | u8 sf:3; | ||
464 | u8 ss:2; | ||
465 | } pb2; | ||
466 | u8 pb3; | ||
467 | u8 pb4; | ||
468 | struct pb5_bit { | ||
469 | u8 dm:1; | ||
470 | u8 lsv:4; | ||
471 | u8 rsv:3; | ||
472 | } pb5; | ||
473 | }; | ||
474 | |||
475 | struct ps3av_pkt_av_audio_param { | ||
476 | struct ps3av_send_hdr send_hdr; | ||
477 | u16 avport; /* in: avport */ | ||
478 | u16 reserved; | ||
479 | u8 mclk; /* in: audio mclk */ | ||
480 | u8 ns[3]; /* in: audio ns val */ | ||
481 | u8 enable; /* in: audio enable */ | ||
482 | u8 swaplr; /* in: audio swap */ | ||
483 | u8 fifomap; /* in: audio fifomap */ | ||
484 | u8 inputctrl; /* in: audio input ctrl */ | ||
485 | u8 inputlen; /* in: sample bit size */ | ||
486 | u8 layout; /* in: speaker layout param */ | ||
487 | struct ps3av_audio_info_frame info; /* in: info */ | ||
488 | u8 chstat[5]; /* in: ch stat */ | ||
489 | }; | ||
490 | |||
491 | /* backend: audio_mute */ | ||
492 | struct ps3av_pkt_av_audio_mute { | ||
493 | struct ps3av_send_hdr send_hdr; | ||
494 | struct ps3av_av_mute mute[PS3AV_MUTE_PORT_MAX]; | ||
495 | }; | ||
496 | |||
497 | /* backend: hdmi_mode */ | ||
498 | struct ps3av_pkt_av_hdmi_mode { | ||
499 | struct ps3av_send_hdr send_hdr; | ||
500 | u8 mode; /* in: hdmi_mode */ | ||
501 | u8 reserved0; | ||
502 | u8 reserved1; | ||
503 | u8 reserved2; | ||
504 | }; | ||
505 | |||
506 | /* backend: tv_mute */ | ||
507 | struct ps3av_pkt_av_tv_mute { | ||
508 | struct ps3av_send_hdr send_hdr; | ||
509 | u16 avport; /* in: avport HDMI only */ | ||
510 | u16 mute; /* in: mute */ | ||
511 | }; | ||
512 | |||
513 | /* video: initialize */ | ||
514 | struct ps3av_pkt_video_init { | ||
515 | struct ps3av_send_hdr send_hdr; | ||
516 | /* recv */ | ||
517 | u32 reserved; | ||
518 | }; | ||
519 | |||
520 | /* video: mode setting */ | ||
521 | struct ps3av_pkt_video_mode { | ||
522 | struct ps3av_send_hdr send_hdr; | ||
523 | u32 video_head; /* in: head */ | ||
524 | u32 reserved; | ||
525 | u32 video_vid; /* in: video resolution */ | ||
526 | u16 reserved1; | ||
527 | u16 width; /* in: width in pixel */ | ||
528 | u16 reserved2; | ||
529 | u16 height; /* in: height in pixel */ | ||
530 | u32 pitch; /* in: line size in byte */ | ||
531 | u32 video_out_format; /* in: out format */ | ||
532 | u32 video_format; /* in: input frame buffer format */ | ||
533 | u8 reserved3; | ||
534 | u8 reserved4; | ||
535 | u16 video_order; /* in: input RGB order */ | ||
536 | u32 reserved5; | ||
537 | }; | ||
538 | |||
539 | /* video: format */ | ||
540 | struct ps3av_pkt_video_format { | ||
541 | struct ps3av_send_hdr send_hdr; | ||
542 | u32 video_head; /* in: head */ | ||
543 | u32 video_format; /* in: frame buffer format */ | ||
544 | u16 reserved; | ||
545 | u16 video_order; /* in: input RGB order */ | ||
546 | }; | ||
547 | |||
548 | /* video: pitch */ | ||
549 | struct ps3av_pkt_video_pitch { | ||
550 | u16 version; | ||
551 | u16 size; /* size of command packet */ | ||
552 | u32 cid; /* command id */ | ||
553 | u32 video_head; /* in: head */ | ||
554 | u32 pitch; /* in: line size in byte */ | ||
555 | }; | ||
556 | |||
557 | /* audio: initialize */ | ||
558 | struct ps3av_pkt_audio_init { | ||
559 | struct ps3av_send_hdr send_hdr; | ||
560 | /* recv */ | ||
561 | u32 reserved; | ||
562 | }; | ||
563 | |||
564 | /* audio: mode setting */ | ||
565 | struct ps3av_pkt_audio_mode { | ||
566 | struct ps3av_send_hdr send_hdr; | ||
567 | u8 avport; /* in: avport */ | ||
568 | u8 reserved0[3]; | ||
569 | u32 mask; /* in: mask */ | ||
570 | u32 audio_num_of_ch; /* in: number of ch */ | ||
571 | u32 audio_fs; /* in: sampling freq */ | ||
572 | u32 audio_word_bits; /* in: sample bit size */ | ||
573 | u32 audio_format; /* in: audio output format */ | ||
574 | u32 audio_source; /* in: audio source */ | ||
575 | u8 audio_enable[4]; /* in: audio enable */ | ||
576 | u8 audio_swap[4]; /* in: audio swap */ | ||
577 | u8 audio_map[4]; /* in: audio map */ | ||
578 | u32 audio_layout; /* in: speaker layout */ | ||
579 | u32 audio_downmix; /* in: audio downmix permission */ | ||
580 | u32 audio_downmix_level; | ||
581 | u8 audio_cs_info[8]; /* in: IEC channel status */ | ||
582 | }; | ||
583 | |||
584 | /* audio: mute */ | ||
585 | struct ps3av_audio_mute { | ||
586 | u8 avport; /* in: opt_port optical */ | ||
587 | u8 reserved[3]; | ||
588 | u32 mute; /* in: mute */ | ||
589 | }; | ||
590 | |||
591 | struct ps3av_pkt_audio_mute { | ||
592 | struct ps3av_send_hdr send_hdr; | ||
593 | struct ps3av_audio_mute mute[PS3AV_OPT_PORT_MAX]; | ||
594 | }; | ||
595 | |||
596 | /* audio: active/inactive */ | ||
597 | struct ps3av_pkt_audio_active { | ||
598 | struct ps3av_send_hdr send_hdr; | ||
599 | u32 audio_port; /* in: audio active/inactive port */ | ||
600 | }; | ||
601 | |||
602 | /* audio: SPDIF user bit */ | ||
603 | struct ps3av_pkt_audio_spdif_bit { | ||
604 | u16 version; | ||
605 | u16 size; /* size of command packet */ | ||
606 | u32 cid; /* command id */ | ||
607 | u8 avport; /* in: avport SPDIF only */ | ||
608 | u8 reserved[3]; | ||
609 | u32 audio_port; /* in: SPDIF only */ | ||
610 | u32 spdif_bit_data[12]; /* in: user bit data */ | ||
611 | }; | ||
612 | |||
613 | /* audio: audio control */ | ||
614 | struct ps3av_pkt_audio_ctrl { | ||
615 | u16 version; | ||
616 | u16 size; /* size of command packet */ | ||
617 | u32 cid; /* command id */ | ||
618 | u32 audio_ctrl_id; /* in: control id */ | ||
619 | u32 audio_ctrl_data[4]; /* in: control data */ | ||
620 | }; | ||
621 | |||
622 | /* avb:param */ | ||
623 | #define PS3AV_PKT_AVB_PARAM_MAX_BUF_SIZE \ | ||
624 | (PS3AV_AVB_NUM_VIDEO*sizeof(struct ps3av_pkt_video_mode) + \ | ||
625 | PS3AV_AVB_NUM_AUDIO*sizeof(struct ps3av_pkt_audio_mode) + \ | ||
626 | PS3AV_AVB_NUM_AV_VIDEO*sizeof(struct ps3av_pkt_av_video_cs) + \ | ||
627 | PS3AV_AVB_NUM_AV_AUDIO*sizeof(struct ps3av_pkt_av_audio_param)) | ||
628 | |||
629 | struct ps3av_pkt_avb_param { | ||
630 | struct ps3av_send_hdr send_hdr; | ||
631 | u16 num_of_video_pkt; | ||
632 | u16 num_of_audio_pkt; | ||
633 | u16 num_of_av_video_pkt; | ||
634 | u16 num_of_av_audio_pkt; | ||
635 | /* | ||
636 | * The actual buffer layout depends on the fields above: | ||
637 | * | ||
638 | * struct ps3av_pkt_video_mode video[num_of_video_pkt]; | ||
639 | * struct ps3av_pkt_audio_mode audio[num_of_audio_pkt]; | ||
640 | * struct ps3av_pkt_av_video_cs av_video[num_of_av_video_pkt]; | ||
641 | * struct ps3av_pkt_av_audio_param av_audio[num_of_av_audio_pkt]; | ||
642 | */ | ||
643 | u8 buf[PS3AV_PKT_AVB_PARAM_MAX_BUF_SIZE]; | ||
644 | }; | ||
645 | |||
646 | struct ps3av { | ||
647 | int available; | ||
648 | struct semaphore sem; | ||
649 | struct semaphore ping; | ||
650 | struct semaphore pong; | ||
651 | struct mutex mutex; | ||
652 | int open_count; | ||
653 | struct ps3_vuart_port_device *dev; | ||
654 | |||
655 | int region; | ||
656 | struct ps3av_pkt_av_get_hw_conf av_hw_conf; | ||
657 | u32 av_port[PS3AV_AV_PORT_MAX + PS3AV_OPT_PORT_MAX]; | ||
658 | u32 opt_port[PS3AV_OPT_PORT_MAX]; | ||
659 | u32 head[PS3AV_HEAD_MAX]; | ||
660 | u32 audio_port; | ||
661 | int ps3av_mode; | ||
662 | int ps3av_mode_old; | ||
663 | }; | ||
664 | |||
665 | /** command status **/ | ||
666 | #define PS3AV_STATUS_SUCCESS 0x0000 /* success */ | ||
667 | #define PS3AV_STATUS_RECEIVE_VUART_ERROR 0x0001 /* receive vuart error */ | ||
668 | #define PS3AV_STATUS_SYSCON_COMMUNICATE_FAIL 0x0002 /* syscon communication error */ | ||
669 | #define PS3AV_STATUS_INVALID_COMMAND 0x0003 /* obsolete invalid CID */ | ||
670 | #define PS3AV_STATUS_INVALID_PORT 0x0004 /* invalid port number */ | ||
671 | #define PS3AV_STATUS_INVALID_VID 0x0005 /* invalid video format */ | ||
672 | #define PS3AV_STATUS_INVALID_COLOR_SPACE 0x0006 /* invalid video colose space */ | ||
673 | #define PS3AV_STATUS_INVALID_FS 0x0007 /* invalid audio sampling freq */ | ||
674 | #define PS3AV_STATUS_INVALID_AUDIO_CH 0x0008 /* invalid audio channel number */ | ||
675 | #define PS3AV_STATUS_UNSUPPORTED_VERSION 0x0009 /* version mismatch */ | ||
676 | #define PS3AV_STATUS_INVALID_SAMPLE_SIZE 0x000a /* invalid audio sample bit size */ | ||
677 | #define PS3AV_STATUS_FAILURE 0x000b /* other failures */ | ||
678 | #define PS3AV_STATUS_UNSUPPORTED_COMMAND 0x000c /* unsupported cid */ | ||
679 | #define PS3AV_STATUS_BUFFER_OVERFLOW 0x000d /* write buffer overflow */ | ||
680 | #define PS3AV_STATUS_INVALID_VIDEO_PARAM 0x000e /* invalid video param */ | ||
681 | #define PS3AV_STATUS_NO_SEL 0x000f /* not exist selector */ | ||
682 | #define PS3AV_STATUS_INVALID_AV_PARAM 0x0010 /* invalid backend param */ | ||
683 | #define PS3AV_STATUS_INVALID_AUDIO_PARAM 0x0011 /* invalid audio param */ | ||
684 | #define PS3AV_STATUS_UNSUPPORTED_HDMI_MODE 0x0012 /* unsupported hdmi mode */ | ||
685 | #define PS3AV_STATUS_NO_SYNC_HEAD 0x0013 /* sync head failed */ | ||
686 | |||
687 | extern void ps3av_set_hdr(u32, u16, struct ps3av_send_hdr *); | ||
688 | extern int ps3av_do_pkt(u32, u16, size_t, struct ps3av_send_hdr *); | ||
689 | |||
690 | extern int ps3av_cmd_init(void); | ||
691 | extern int ps3av_cmd_fin(void); | ||
692 | extern int ps3av_cmd_av_video_mute(int, u32 *, u32); | ||
693 | extern int ps3av_cmd_av_video_disable_sig(u32); | ||
694 | extern int ps3av_cmd_av_tv_mute(u32, u32); | ||
695 | extern int ps3av_cmd_enable_event(void); | ||
696 | extern int ps3av_cmd_av_hdmi_mode(u8); | ||
697 | extern u32 ps3av_cmd_set_av_video_cs(void *, u32, int, int, int, u32); | ||
698 | extern u32 ps3av_cmd_set_video_mode(void *, u32, int, int, u32); | ||
699 | extern int ps3av_cmd_video_format_black(u32, u32, u32); | ||
700 | extern int ps3av_cmd_av_audio_mute(int, u32 *, u32); | ||
701 | extern u32 ps3av_cmd_set_av_audio_param(void *, u32, | ||
702 | const struct ps3av_pkt_audio_mode *, | ||
703 | u32); | ||
704 | extern void ps3av_cmd_set_audio_mode(struct ps3av_pkt_audio_mode *, u32, u32, | ||
705 | u32, u32, u32, u32); | ||
706 | extern int ps3av_cmd_audio_mode(struct ps3av_pkt_audio_mode *); | ||
707 | extern int ps3av_cmd_audio_mute(int, u32 *, u32); | ||
708 | extern int ps3av_cmd_audio_active(int, u32); | ||
709 | extern int ps3av_cmd_avb_param(struct ps3av_pkt_avb_param *, u32); | ||
710 | extern int ps3av_cmd_av_get_hw_conf(struct ps3av_pkt_av_get_hw_conf *); | ||
711 | #ifdef PS3AV_DEBUG | ||
712 | extern void ps3av_cmd_av_hw_conf_dump(const struct ps3av_pkt_av_get_hw_conf *); | ||
713 | extern void ps3av_cmd_av_monitor_info_dump(const struct ps3av_pkt_av_get_monitor_info *); | ||
714 | #else | ||
715 | static inline void ps3av_cmd_av_hw_conf_dump(const struct ps3av_pkt_av_get_hw_conf *hw_conf) {} | ||
716 | static inline void ps3av_cmd_av_monitor_info_dump(const struct ps3av_pkt_av_get_monitor_info *monitor_info) {} | ||
717 | #endif | ||
718 | extern int ps3av_cmd_video_get_monitor_info(struct ps3av_pkt_av_get_monitor_info *, | ||
719 | u32); | ||
720 | |||
721 | extern int ps3av_vuart_write(struct ps3_vuart_port_device *dev, | ||
722 | const void *buf, unsigned long size); | ||
723 | extern int ps3av_vuart_read(struct ps3_vuart_port_device *dev, void *buf, | ||
724 | unsigned long size, int timeout); | ||
725 | |||
726 | extern int ps3av_set_video_mode(u32, int); | ||
727 | extern int ps3av_set_audio_mode(u32, u32, u32, u32, u32); | ||
728 | extern int ps3av_set_mode(u32, int); | ||
729 | extern int ps3av_get_mode(void); | ||
730 | extern int ps3av_get_scanmode(int); | ||
731 | extern int ps3av_get_refresh_rate(int); | ||
732 | extern int ps3av_video_mode2res(u32, u32 *, u32 *); | ||
733 | extern int ps3av_video_mute(int); | ||
734 | extern int ps3av_audio_mute(int); | ||
735 | extern int ps3av_dev_open(void); | ||
736 | extern int ps3av_dev_close(void); | ||
737 | |||
738 | #endif /* _ASM_POWERPC_PS3AV_H_ */ | ||
diff --git a/include/asm-powerpc/ps3fb.h b/include/asm-powerpc/ps3fb.h new file mode 100644 index 000000000000..ad81cf431964 --- /dev/null +++ b/include/asm-powerpc/ps3fb.h | |||
@@ -0,0 +1,56 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2006 Sony Computer Entertainment Inc. | ||
3 | * Copyright 2006, 2007 Sony Corporation | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify it | ||
6 | * under the terms of the GNU General Public License as published | ||
7 | * by the Free Software Foundation; version 2 of the License. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, but | ||
10 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
12 | * General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along | ||
15 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
17 | */ | ||
18 | |||
19 | #ifndef _ASM_POWERPC_PS3FB_H_ | ||
20 | #define _ASM_POWERPC_PS3FB_H_ | ||
21 | |||
22 | #include <linux/ioctl.h> | ||
23 | |||
24 | /* ioctl */ | ||
25 | #define PS3FB_IOCTL_SETMODE _IOW('r', 1, int) /* set video mode */ | ||
26 | #define PS3FB_IOCTL_GETMODE _IOR('r', 2, int) /* get video mode */ | ||
27 | #define PS3FB_IOCTL_SCREENINFO _IOR('r', 3, int) /* get screen info */ | ||
28 | #define PS3FB_IOCTL_ON _IO('r', 4) /* use IOCTL_FSEL */ | ||
29 | #define PS3FB_IOCTL_OFF _IO('r', 5) /* return to normal-flip */ | ||
30 | #define PS3FB_IOCTL_FSEL _IOW('r', 6, int) /* blit and flip request */ | ||
31 | |||
32 | #ifndef FBIO_WAITFORVSYNC | ||
33 | #define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32) /* wait for vsync */ | ||
34 | #endif | ||
35 | |||
36 | struct ps3fb_ioctl_res { | ||
37 | __u32 xres; /* frame buffer x_size */ | ||
38 | __u32 yres; /* frame buffer y_size */ | ||
39 | __u32 xoff; /* margine x */ | ||
40 | __u32 yoff; /* margine y */ | ||
41 | __u32 num_frames; /* num of frame buffers */ | ||
42 | }; | ||
43 | |||
44 | #ifdef __KERNEL__ | ||
45 | |||
46 | #ifdef CONFIG_FB_PS3 | ||
47 | extern void ps3fb_flip_ctl(int on); | ||
48 | extern void ps3fb_cleanup(void); | ||
49 | #else | ||
50 | static inline void ps3fb_flip_ctl(int on) {} | ||
51 | static inline void ps3fb_cleanup(void) {} | ||
52 | #endif | ||
53 | |||
54 | #endif /* __KERNEL__ */ | ||
55 | |||
56 | #endif /* _ASM_POWERPC_PS3FB_H_ */ | ||
diff --git a/include/asm-powerpc/spu.h b/include/asm-powerpc/spu.h index b634e16575f2..0f9f2dd24a79 100644 --- a/include/asm-powerpc/spu.h +++ b/include/asm-powerpc/spu.h | |||
@@ -129,7 +129,6 @@ struct spu { | |||
129 | struct spu_runqueue *rq; | 129 | struct spu_runqueue *rq; |
130 | unsigned long long timestamp; | 130 | unsigned long long timestamp; |
131 | pid_t pid; | 131 | pid_t pid; |
132 | int prio; | ||
133 | int class_0_pending; | 132 | int class_0_pending; |
134 | spinlock_t register_lock; | 133 | spinlock_t register_lock; |
135 | 134 | ||
diff --git a/include/asm-powerpc/systbl.h b/include/asm-powerpc/systbl.h index 97b435484177..418e5c7e972c 100644 --- a/include/asm-powerpc/systbl.h +++ b/include/asm-powerpc/systbl.h | |||
@@ -305,3 +305,4 @@ SYSCALL_SPU(faccessat) | |||
305 | COMPAT_SYS_SPU(get_robust_list) | 305 | COMPAT_SYS_SPU(get_robust_list) |
306 | COMPAT_SYS_SPU(set_robust_list) | 306 | COMPAT_SYS_SPU(set_robust_list) |
307 | COMPAT_SYS(move_pages) | 307 | COMPAT_SYS(move_pages) |
308 | SYSCALL_SPU(getcpu) | ||
diff --git a/include/asm-powerpc/termios.h b/include/asm-powerpc/termios.h index 7f80a019b6a0..2c14fea07c8a 100644 --- a/include/asm-powerpc/termios.h +++ b/include/asm-powerpc/termios.h | |||
@@ -71,24 +71,6 @@ struct termio { | |||
71 | #define _VEOL2 8 | 71 | #define _VEOL2 8 |
72 | #define _VSWTC 9 | 72 | #define _VSWTC 9 |
73 | 73 | ||
74 | /* line disciplines */ | ||
75 | #define N_TTY 0 | ||
76 | #define N_SLIP 1 | ||
77 | #define N_MOUSE 2 | ||
78 | #define N_PPP 3 | ||
79 | #define N_STRIP 4 | ||
80 | #define N_AX25 5 | ||
81 | #define N_X25 6 /* X.25 async */ | ||
82 | #define N_6PACK 7 | ||
83 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
84 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
85 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
86 | #define N_IRDA 11 /* Linux IrDa - http://www.cs.uit.no/~dagb/irda/irda.html */ | ||
87 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
88 | #define N_HDLC 13 /* synchronous HDLC */ | ||
89 | #define N_SYNC_PPP 14 | ||
90 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
91 | |||
92 | #ifdef __KERNEL__ | 74 | #ifdef __KERNEL__ |
93 | /* ^C ^\ del ^U ^D 1 0 0 0 0 ^W ^R ^Z ^Q ^S ^V ^U */ | 75 | /* ^C ^\ del ^U ^D 1 0 0 0 0 ^W ^R ^Z ^Q ^S ^V ^U */ |
94 | #define INIT_C_CC "\003\034\177\025\004\001\000\000\000\000\027\022\032\021\023\026\025" | 76 | #define INIT_C_CC "\003\034\177\025\004\001\000\000\000\000\027\022\032\021\023\026\025" |
diff --git a/include/asm-powerpc/ucc_slow.h b/include/asm-powerpc/ucc_slow.h index ca93bc99237e..fdaac9d762bb 100644 --- a/include/asm-powerpc/ucc_slow.h +++ b/include/asm-powerpc/ucc_slow.h | |||
@@ -150,7 +150,7 @@ struct ucc_slow_info { | |||
150 | int ucc_num; | 150 | int ucc_num; |
151 | enum qe_clock rx_clock; | 151 | enum qe_clock rx_clock; |
152 | enum qe_clock tx_clock; | 152 | enum qe_clock tx_clock; |
153 | struct ucc_slow *us_regs; | 153 | u32 regs; |
154 | int irq; | 154 | int irq; |
155 | u16 uccm_mask; | 155 | u16 uccm_mask; |
156 | int data_mem_part; | 156 | int data_mem_part; |
@@ -199,9 +199,9 @@ struct ucc_slow_private { | |||
199 | and length for first BD in a frame */ | 199 | and length for first BD in a frame */ |
200 | u32 tx_base_offset; /* first BD in Tx BD table offset (In MURAM) */ | 200 | u32 tx_base_offset; /* first BD in Tx BD table offset (In MURAM) */ |
201 | u32 rx_base_offset; /* first BD in Rx BD table offset (In MURAM) */ | 201 | u32 rx_base_offset; /* first BD in Rx BD table offset (In MURAM) */ |
202 | u8 *confBd; /* next BD for confirm after Tx */ | 202 | struct qe_bd *confBd; /* next BD for confirm after Tx */ |
203 | u8 *tx_bd; /* next BD for new Tx request */ | 203 | struct qe_bd *tx_bd; /* next BD for new Tx request */ |
204 | u8 *rx_bd; /* next BD to collect after Rx */ | 204 | struct qe_bd *rx_bd; /* next BD to collect after Rx */ |
205 | void *p_rx_frame; /* accumulating receive frame */ | 205 | void *p_rx_frame; /* accumulating receive frame */ |
206 | u16 *p_ucce; /* a pointer to the event register in memory. | 206 | u16 *p_ucce; /* a pointer to the event register in memory. |
207 | */ | 207 | */ |
diff --git a/include/asm-powerpc/udbg.h b/include/asm-powerpc/udbg.h index 4cbc313aa02a..d03d8557f706 100644 --- a/include/asm-powerpc/udbg.h +++ b/include/asm-powerpc/udbg.h | |||
@@ -46,6 +46,7 @@ extern void __init udbg_init_iseries(void); | |||
46 | extern void __init udbg_init_rtas_panel(void); | 46 | extern void __init udbg_init_rtas_panel(void); |
47 | extern void __init udbg_init_rtas_console(void); | 47 | extern void __init udbg_init_rtas_console(void); |
48 | extern void __init udbg_init_debug_beat(void); | 48 | extern void __init udbg_init_debug_beat(void); |
49 | extern void __init udbg_init_btext(void); | ||
49 | 50 | ||
50 | #endif /* __KERNEL__ */ | 51 | #endif /* __KERNEL__ */ |
51 | #endif /* _ASM_POWERPC_UDBG_H */ | 52 | #endif /* _ASM_POWERPC_UDBG_H */ |
diff --git a/include/asm-powerpc/vdso.h b/include/asm-powerpc/vdso.h index b9f9118b1607..26fc449bd989 100644 --- a/include/asm-powerpc/vdso.h +++ b/include/asm-powerpc/vdso.h | |||
@@ -18,16 +18,11 @@ | |||
18 | 18 | ||
19 | #ifndef __ASSEMBLY__ | 19 | #ifndef __ASSEMBLY__ |
20 | 20 | ||
21 | extern unsigned int vdso64_pages; | ||
22 | extern unsigned int vdso32_pages; | ||
23 | |||
24 | /* Offsets relative to thread->vdso_base */ | 21 | /* Offsets relative to thread->vdso_base */ |
25 | extern unsigned long vdso64_rt_sigtramp; | 22 | extern unsigned long vdso64_rt_sigtramp; |
26 | extern unsigned long vdso32_sigtramp; | 23 | extern unsigned long vdso32_sigtramp; |
27 | extern unsigned long vdso32_rt_sigtramp; | 24 | extern unsigned long vdso32_rt_sigtramp; |
28 | 25 | ||
29 | extern void vdso_init(void); | ||
30 | |||
31 | #else /* __ASSEMBLY__ */ | 26 | #else /* __ASSEMBLY__ */ |
32 | 27 | ||
33 | #ifdef __VDSO64__ | 28 | #ifdef __VDSO64__ |
diff --git a/include/asm-ppc/ibm4xx.h b/include/asm-ppc/ibm4xx.h index 7a64ede53bb6..92fd02d7b177 100644 --- a/include/asm-ppc/ibm4xx.h +++ b/include/asm-ppc/ibm4xx.h | |||
@@ -109,6 +109,10 @@ void ppc4xx_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
109 | #include <platforms/4xx/ocotea.h> | 109 | #include <platforms/4xx/ocotea.h> |
110 | #endif | 110 | #endif |
111 | 111 | ||
112 | #if defined(CONFIG_TAISHAN) | ||
113 | #include <platforms/4xx/taishan.h> | ||
114 | #endif | ||
115 | |||
112 | #ifndef __ASSEMBLY__ | 116 | #ifndef __ASSEMBLY__ |
113 | #ifdef CONFIG_40x | 117 | #ifdef CONFIG_40x |
114 | /* | 118 | /* |
diff --git a/include/asm-s390/atomic.h b/include/asm-s390/atomic.h index af20c7462485..c17bdbf22067 100644 --- a/include/asm-s390/atomic.h +++ b/include/asm-s390/atomic.h | |||
@@ -215,6 +215,8 @@ static __inline__ void atomic64_set_mask(unsigned long mask, atomic64_t * v) | |||
215 | __CSG_LOOP(v, mask, "ogr"); | 215 | __CSG_LOOP(v, mask, "ogr"); |
216 | } | 216 | } |
217 | 217 | ||
218 | #define atomic64_xchg(v, new) (xchg(&((v)->counter), new)) | ||
219 | |||
218 | static __inline__ long long atomic64_cmpxchg(atomic64_t *v, | 220 | static __inline__ long long atomic64_cmpxchg(atomic64_t *v, |
219 | long long old, long long new) | 221 | long long old, long long new) |
220 | { | 222 | { |
diff --git a/include/asm-s390/ccwdev.h b/include/asm-s390/ccwdev.h index 58c70acffc73..cfc81533b9ba 100644 --- a/include/asm-s390/ccwdev.h +++ b/include/asm-s390/ccwdev.h | |||
@@ -110,7 +110,9 @@ extern void ccw_driver_unregister (struct ccw_driver *driver); | |||
110 | 110 | ||
111 | struct ccw1; | 111 | struct ccw1; |
112 | 112 | ||
113 | extern int ccw_device_set_options_mask(struct ccw_device *, unsigned long); | ||
113 | extern int ccw_device_set_options(struct ccw_device *, unsigned long); | 114 | extern int ccw_device_set_options(struct ccw_device *, unsigned long); |
115 | extern void ccw_device_clear_options(struct ccw_device *, unsigned long); | ||
114 | 116 | ||
115 | /* Allow for i/o completion notification after primary interrupt status. */ | 117 | /* Allow for i/o completion notification after primary interrupt status. */ |
116 | #define CCWDEV_EARLY_NOTIFICATION 0x0001 | 118 | #define CCWDEV_EARLY_NOTIFICATION 0x0001 |
diff --git a/include/asm-s390/io.h b/include/asm-s390/io.h index a4c2d550dad4..b7ff6afc3caa 100644 --- a/include/asm-s390/io.h +++ b/include/asm-s390/io.h | |||
@@ -13,13 +13,10 @@ | |||
13 | 13 | ||
14 | #ifdef __KERNEL__ | 14 | #ifdef __KERNEL__ |
15 | 15 | ||
16 | #include <linux/vmalloc.h> | ||
17 | #include <asm/page.h> | 16 | #include <asm/page.h> |
18 | 17 | ||
19 | #define IO_SPACE_LIMIT 0xffffffff | 18 | #define IO_SPACE_LIMIT 0xffffffff |
20 | 19 | ||
21 | #define __io_virt(x) ((void *)(PAGE_OFFSET | (unsigned long)(x))) | ||
22 | |||
23 | /* | 20 | /* |
24 | * Change virtual addresses to physical addresses and vv. | 21 | * Change virtual addresses to physical addresses and vv. |
25 | * These are pretty trivial | 22 | * These are pretty trivial |
@@ -38,75 +35,9 @@ static inline unsigned long virt_to_phys(volatile void * address) | |||
38 | 35 | ||
39 | static inline void * phys_to_virt(unsigned long address) | 36 | static inline void * phys_to_virt(unsigned long address) |
40 | { | 37 | { |
41 | return __io_virt(address); | 38 | return (void *) address; |
42 | } | ||
43 | |||
44 | extern void * __ioremap(unsigned long offset, unsigned long size, unsigned long flags); | ||
45 | |||
46 | static inline void * ioremap (unsigned long offset, unsigned long size) | ||
47 | { | ||
48 | return __ioremap(offset, size, 0); | ||
49 | } | ||
50 | |||
51 | /* | ||
52 | * This one maps high address device memory and turns off caching for that area. | ||
53 | * it's useful if some control registers are in such an area and write combining | ||
54 | * or read caching is not desirable: | ||
55 | */ | ||
56 | static inline void * ioremap_nocache (unsigned long offset, unsigned long size) | ||
57 | { | ||
58 | return __ioremap(offset, size, 0); | ||
59 | } | 39 | } |
60 | 40 | ||
61 | extern void iounmap(void *addr); | ||
62 | |||
63 | /* | ||
64 | * IO bus memory addresses are also 1:1 with the physical address | ||
65 | */ | ||
66 | #define virt_to_bus virt_to_phys | ||
67 | #define bus_to_virt phys_to_virt | ||
68 | |||
69 | /* | ||
70 | * readX/writeX() are used to access memory mapped devices. On some | ||
71 | * architectures the memory mapped IO stuff needs to be accessed | ||
72 | * differently. | ||
73 | */ | ||
74 | |||
75 | #define readb(addr) (*(volatile unsigned char *) __io_virt(addr)) | ||
76 | #define readw(addr) (*(volatile unsigned short *) __io_virt(addr)) | ||
77 | #define readl(addr) (*(volatile unsigned int *) __io_virt(addr)) | ||
78 | #define readq(addr) (*(volatile unsigned long long *) __io_virt(addr)) | ||
79 | |||
80 | #define readb_relaxed(addr) readb(addr) | ||
81 | #define readw_relaxed(addr) readw(addr) | ||
82 | #define readl_relaxed(addr) readl(addr) | ||
83 | #define readq_relaxed(addr) readq(addr) | ||
84 | #define __raw_readb readb | ||
85 | #define __raw_readw readw | ||
86 | #define __raw_readl readl | ||
87 | #define __raw_readq readq | ||
88 | |||
89 | #define writeb(b,addr) (*(volatile unsigned char *) __io_virt(addr) = (b)) | ||
90 | #define writew(b,addr) (*(volatile unsigned short *) __io_virt(addr) = (b)) | ||
91 | #define writel(b,addr) (*(volatile unsigned int *) __io_virt(addr) = (b)) | ||
92 | #define writeq(b,addr) (*(volatile unsigned long long *) __io_virt(addr) = (b)) | ||
93 | #define __raw_writeb writeb | ||
94 | #define __raw_writew writew | ||
95 | #define __raw_writel writel | ||
96 | #define __raw_writeq writeq | ||
97 | |||
98 | #define memset_io(a,b,c) memset(__io_virt(a),(b),(c)) | ||
99 | #define memcpy_fromio(a,b,c) memcpy((a),__io_virt(b),(c)) | ||
100 | #define memcpy_toio(a,b,c) memcpy(__io_virt(a),(b),(c)) | ||
101 | |||
102 | #define inb_p(addr) readb(addr) | ||
103 | #define inb(addr) readb(addr) | ||
104 | |||
105 | #define outb(x,addr) ((void) writeb(x,addr)) | ||
106 | #define outb_p(x,addr) outb(x,addr) | ||
107 | |||
108 | #define mmiowb() do { } while (0) | ||
109 | |||
110 | /* | 41 | /* |
111 | * Convert a physical pointer to a virtual kernel pointer for /dev/mem | 42 | * Convert a physical pointer to a virtual kernel pointer for /dev/mem |
112 | * access | 43 | * access |
diff --git a/include/asm-s390/ipl.h b/include/asm-s390/ipl.h new file mode 100644 index 000000000000..5650d3d4ae46 --- /dev/null +++ b/include/asm-s390/ipl.h | |||
@@ -0,0 +1,113 @@ | |||
1 | /* | ||
2 | * s390 (re)ipl support | ||
3 | * | ||
4 | * Copyright IBM Corp. 2007 | ||
5 | */ | ||
6 | |||
7 | #ifndef _ASM_S390_IPL_H | ||
8 | #define _ASM_S390_IPL_H | ||
9 | |||
10 | #include <asm/types.h> | ||
11 | |||
12 | #define IPL_PARMBLOCK_ORIGIN 0x2000 | ||
13 | |||
14 | #define IPL_PARM_BLK_FCP_LEN (sizeof(struct ipl_list_hdr) + \ | ||
15 | sizeof(struct ipl_block_fcp)) | ||
16 | |||
17 | #define IPL_PARM_BLK_CCW_LEN (sizeof(struct ipl_list_hdr) + \ | ||
18 | sizeof(struct ipl_block_ccw)) | ||
19 | |||
20 | #define IPL_MAX_SUPPORTED_VERSION (0) | ||
21 | |||
22 | #define IPL_PARMBLOCK_START ((struct ipl_parameter_block *) \ | ||
23 | IPL_PARMBLOCK_ORIGIN) | ||
24 | #define IPL_PARMBLOCK_SIZE (IPL_PARMBLOCK_START->hdr.len) | ||
25 | |||
26 | struct ipl_list_hdr { | ||
27 | u32 len; | ||
28 | u8 reserved1[3]; | ||
29 | u8 version; | ||
30 | u32 blk0_len; | ||
31 | u8 pbt; | ||
32 | u8 flags; | ||
33 | u16 reserved2; | ||
34 | } __attribute__((packed)); | ||
35 | |||
36 | struct ipl_block_fcp { | ||
37 | u8 reserved1[313-1]; | ||
38 | u8 opt; | ||
39 | u8 reserved2[3]; | ||
40 | u16 reserved3; | ||
41 | u16 devno; | ||
42 | u8 reserved4[4]; | ||
43 | u64 wwpn; | ||
44 | u64 lun; | ||
45 | u32 bootprog; | ||
46 | u8 reserved5[12]; | ||
47 | u64 br_lba; | ||
48 | u32 scp_data_len; | ||
49 | u8 reserved6[260]; | ||
50 | u8 scp_data[]; | ||
51 | } __attribute__((packed)); | ||
52 | |||
53 | struct ipl_block_ccw { | ||
54 | u8 load_param[8]; | ||
55 | u8 reserved1[84]; | ||
56 | u8 reserved2[2]; | ||
57 | u16 devno; | ||
58 | u8 vm_flags; | ||
59 | u8 reserved3[3]; | ||
60 | u32 vm_parm_len; | ||
61 | } __attribute__((packed)); | ||
62 | |||
63 | struct ipl_parameter_block { | ||
64 | struct ipl_list_hdr hdr; | ||
65 | union { | ||
66 | struct ipl_block_fcp fcp; | ||
67 | struct ipl_block_ccw ccw; | ||
68 | } ipl_info; | ||
69 | } __attribute__((packed)); | ||
70 | |||
71 | /* | ||
72 | * IPL validity flags and parameters as detected in head.S | ||
73 | */ | ||
74 | extern u32 ipl_flags; | ||
75 | extern u16 ipl_devno; | ||
76 | |||
77 | extern void do_reipl(void); | ||
78 | extern void ipl_save_parameters(void); | ||
79 | |||
80 | enum { | ||
81 | IPL_DEVNO_VALID = 1, | ||
82 | IPL_PARMBLOCK_VALID = 2, | ||
83 | IPL_NSS_VALID = 4, | ||
84 | }; | ||
85 | |||
86 | /* | ||
87 | * DIAG 308 support | ||
88 | */ | ||
89 | enum diag308_subcode { | ||
90 | DIAG308_REL_HSA = 2, | ||
91 | DIAG308_IPL = 3, | ||
92 | DIAG308_DUMP = 4, | ||
93 | DIAG308_SET = 5, | ||
94 | DIAG308_STORE = 6, | ||
95 | }; | ||
96 | |||
97 | enum diag308_ipl_type { | ||
98 | DIAG308_IPL_TYPE_FCP = 0, | ||
99 | DIAG308_IPL_TYPE_CCW = 2, | ||
100 | }; | ||
101 | |||
102 | enum diag308_opt { | ||
103 | DIAG308_IPL_OPT_IPL = 0x10, | ||
104 | DIAG308_IPL_OPT_DUMP = 0x20, | ||
105 | }; | ||
106 | |||
107 | enum diag308_rc { | ||
108 | DIAG308_RC_OK = 1, | ||
109 | }; | ||
110 | |||
111 | extern int diag308(unsigned long subcode, void *addr); | ||
112 | |||
113 | #endif /* _ASM_S390_IPL_H */ | ||
diff --git a/include/asm-s390/local.h b/include/asm-s390/local.h index 86745a1b29bb..c11c530f74d0 100644 --- a/include/asm-s390/local.h +++ b/include/asm-s390/local.h | |||
@@ -1,58 +1 @@ | |||
1 | #ifndef _ASM_LOCAL_H | #include <asm-generic/local.h> | |
2 | #define _ASM_LOCAL_H | ||
3 | |||
4 | #include <linux/percpu.h> | ||
5 | #include <asm/atomic.h> | ||
6 | |||
7 | #ifndef __s390x__ | ||
8 | |||
9 | typedef atomic_t local_t; | ||
10 | |||
11 | #define LOCAL_INIT(i) ATOMIC_INIT(i) | ||
12 | #define local_read(v) atomic_read(v) | ||
13 | #define local_set(v,i) atomic_set(v,i) | ||
14 | |||
15 | #define local_inc(v) atomic_inc(v) | ||
16 | #define local_dec(v) atomic_dec(v) | ||
17 | #define local_add(i, v) atomic_add(i, v) | ||
18 | #define local_sub(i, v) atomic_sub(i, v) | ||
19 | |||
20 | #else | ||
21 | |||
22 | typedef atomic64_t local_t; | ||
23 | |||
24 | #define LOCAL_INIT(i) ATOMIC64_INIT(i) | ||
25 | #define local_read(v) atomic64_read(v) | ||
26 | #define local_set(v,i) atomic64_set(v,i) | ||
27 | |||
28 | #define local_inc(v) atomic64_inc(v) | ||
29 | #define local_dec(v) atomic64_dec(v) | ||
30 | #define local_add(i, v) atomic64_add(i, v) | ||
31 | #define local_sub(i, v) atomic64_sub(i, v) | ||
32 | |||
33 | #endif | ||
34 | |||
35 | #define __local_inc(v) ((v)->counter++) | ||
36 | #define __local_dec(v) ((v)->counter--) | ||
37 | #define __local_add(i,v) ((v)->counter+=(i)) | ||
38 | #define __local_sub(i,v) ((v)->counter-=(i)) | ||
39 | |||
40 | /* | ||
41 | * Use these for per-cpu local_t variables: on some archs they are | ||
42 | * much more efficient than these naive implementations. Note they take | ||
43 | * a variable, not an address. | ||
44 | */ | ||
45 | #define cpu_local_read(v) local_read(&__get_cpu_var(v)) | ||
46 | #define cpu_local_set(v, i) local_set(&__get_cpu_var(v), (i)) | ||
47 | |||
48 | #define cpu_local_inc(v) local_inc(&__get_cpu_var(v)) | ||
49 | #define cpu_local_dec(v) local_dec(&__get_cpu_var(v)) | ||
50 | #define cpu_local_add(i, v) local_add((i), &__get_cpu_var(v)) | ||
51 | #define cpu_local_sub(i, v) local_sub((i), &__get_cpu_var(v)) | ||
52 | |||
53 | #define __cpu_local_inc(v) __local_inc(&__get_cpu_var(v)) | ||
54 | #define __cpu_local_dec(v) __local_dec(&__get_cpu_var(v)) | ||
55 | #define __cpu_local_add(i, v) __local_add((i), &__get_cpu_var(v)) | ||
56 | #define __cpu_local_sub(i, v) __local_sub((i), &__get_cpu_var(v)) | ||
57 | |||
58 | #endif /* _ASM_LOCAL_H */ | ||
diff --git a/include/asm-s390/processor.h b/include/asm-s390/processor.h index 4c1b73940351..33b80ced4bc1 100644 --- a/include/asm-s390/processor.h +++ b/include/asm-s390/processor.h | |||
@@ -36,6 +36,11 @@ typedef struct | |||
36 | unsigned int unused : 16; | 36 | unsigned int unused : 16; |
37 | } __attribute__ ((packed)) cpuid_t; | 37 | } __attribute__ ((packed)) cpuid_t; |
38 | 38 | ||
39 | static inline void get_cpu_id(cpuid_t *ptr) | ||
40 | { | ||
41 | asm volatile("stidp 0(%1)" : "=m" (*ptr) : "a" (ptr)); | ||
42 | } | ||
43 | |||
39 | struct cpuinfo_S390 | 44 | struct cpuinfo_S390 |
40 | { | 45 | { |
41 | cpuid_t cpu_id; | 46 | cpuid_t cpu_id; |
diff --git a/include/asm-s390/sections.h b/include/asm-s390/sections.h index 1c5a2c4ccdad..fbd9116eb17b 100644 --- a/include/asm-s390/sections.h +++ b/include/asm-s390/sections.h | |||
@@ -3,6 +3,6 @@ | |||
3 | 3 | ||
4 | #include <asm-generic/sections.h> | 4 | #include <asm-generic/sections.h> |
5 | 5 | ||
6 | extern char _eshared[]; | 6 | extern char _eshared[], _ehead[]; |
7 | 7 | ||
8 | #endif | 8 | #endif |
diff --git a/include/asm-s390/setup.h b/include/asm-s390/setup.h index 3388bb52597c..44c7aee2bd34 100644 --- a/include/asm-s390/setup.h +++ b/include/asm-s390/setup.h | |||
@@ -16,7 +16,6 @@ | |||
16 | 16 | ||
17 | #define PARMAREA 0x10400 | 17 | #define PARMAREA 0x10400 |
18 | #define MEMORY_CHUNKS 16 /* max 0x7fff */ | 18 | #define MEMORY_CHUNKS 16 /* max 0x7fff */ |
19 | #define IPL_PARMBLOCK_ORIGIN 0x2000 | ||
20 | 19 | ||
21 | #ifndef __ASSEMBLY__ | 20 | #ifndef __ASSEMBLY__ |
22 | 21 | ||
@@ -97,82 +96,9 @@ extern char vmpoff_cmd[]; | |||
97 | #define SET_CONSOLE_3215 do { console_mode = 2; } while (0) | 96 | #define SET_CONSOLE_3215 do { console_mode = 2; } while (0) |
98 | #define SET_CONSOLE_3270 do { console_mode = 3; } while (0) | 97 | #define SET_CONSOLE_3270 do { console_mode = 3; } while (0) |
99 | 98 | ||
100 | struct ipl_list_hdr { | ||
101 | u32 len; | ||
102 | u8 reserved1[3]; | ||
103 | u8 version; | ||
104 | u32 blk0_len; | ||
105 | u8 pbt; | ||
106 | u8 flags; | ||
107 | u16 reserved2; | ||
108 | } __attribute__((packed)); | ||
109 | |||
110 | struct ipl_block_fcp { | ||
111 | u8 reserved1[313-1]; | ||
112 | u8 opt; | ||
113 | u8 reserved2[3]; | ||
114 | u16 reserved3; | ||
115 | u16 devno; | ||
116 | u8 reserved4[4]; | ||
117 | u64 wwpn; | ||
118 | u64 lun; | ||
119 | u32 bootprog; | ||
120 | u8 reserved5[12]; | ||
121 | u64 br_lba; | ||
122 | u32 scp_data_len; | ||
123 | u8 reserved6[260]; | ||
124 | u8 scp_data[]; | ||
125 | } __attribute__((packed)); | ||
126 | |||
127 | struct ipl_block_ccw { | ||
128 | u8 load_param[8]; | ||
129 | u8 reserved1[84]; | ||
130 | u8 reserved2[2]; | ||
131 | u16 devno; | ||
132 | u8 vm_flags; | ||
133 | u8 reserved3[3]; | ||
134 | u32 vm_parm_len; | ||
135 | } __attribute__((packed)); | ||
136 | |||
137 | struct ipl_parameter_block { | ||
138 | struct ipl_list_hdr hdr; | ||
139 | union { | ||
140 | struct ipl_block_fcp fcp; | ||
141 | struct ipl_block_ccw ccw; | ||
142 | } ipl_info; | ||
143 | } __attribute__((packed)); | ||
144 | |||
145 | #define IPL_PARM_BLK_FCP_LEN (sizeof(struct ipl_list_hdr) + \ | ||
146 | sizeof(struct ipl_block_fcp)) | ||
147 | |||
148 | #define IPL_PARM_BLK_CCW_LEN (sizeof(struct ipl_list_hdr) + \ | ||
149 | sizeof(struct ipl_block_ccw)) | ||
150 | |||
151 | #define IPL_MAX_SUPPORTED_VERSION (0) | ||
152 | |||
153 | /* | ||
154 | * IPL validity flags and parameters as detected in head.S | ||
155 | */ | ||
156 | extern u32 ipl_flags; | ||
157 | extern u16 ipl_devno; | ||
158 | |||
159 | extern void do_reipl(void); | ||
160 | extern void ipl_save_parameters(void); | ||
161 | |||
162 | enum { | ||
163 | IPL_DEVNO_VALID = 1, | ||
164 | IPL_PARMBLOCK_VALID = 2, | ||
165 | IPL_NSS_VALID = 4, | ||
166 | }; | ||
167 | |||
168 | #define NSS_NAME_SIZE 8 | 99 | #define NSS_NAME_SIZE 8 |
169 | |||
170 | extern char kernel_nss_name[]; | 100 | extern char kernel_nss_name[]; |
171 | 101 | ||
172 | #define IPL_PARMBLOCK_START ((struct ipl_parameter_block *) \ | ||
173 | IPL_PARMBLOCK_ORIGIN) | ||
174 | #define IPL_PARMBLOCK_SIZE (IPL_PARMBLOCK_START->hdr.len) | ||
175 | |||
176 | #else /* __ASSEMBLY__ */ | 102 | #else /* __ASSEMBLY__ */ |
177 | 103 | ||
178 | #ifndef __s390x__ | 104 | #ifndef __s390x__ |
diff --git a/include/asm-s390/termios.h b/include/asm-s390/termios.h index 62b23caf370e..a3480e25eb4b 100644 --- a/include/asm-s390/termios.h +++ b/include/asm-s390/termios.h | |||
@@ -47,24 +47,6 @@ struct termio { | |||
47 | 47 | ||
48 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 48 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
49 | 49 | ||
50 | /* line disciplines */ | ||
51 | #define N_TTY 0 | ||
52 | #define N_SLIP 1 | ||
53 | #define N_MOUSE 2 | ||
54 | #define N_PPP 3 | ||
55 | #define N_STRIP 4 | ||
56 | #define N_AX25 5 | ||
57 | #define N_X25 6 /* X.25 async */ | ||
58 | #define N_6PACK 7 | ||
59 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
60 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
61 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
62 | #define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ | ||
63 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
64 | #define N_HDLC 13 /* synchronous HDLC */ | ||
65 | #define N_SYNC_PPP 14 /* synchronous PPP */ | ||
66 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
67 | |||
68 | #ifdef __KERNEL__ | 50 | #ifdef __KERNEL__ |
69 | 51 | ||
70 | /* intr=^C quit=^\ erase=del kill=^U | 52 | /* intr=^C quit=^\ erase=del kill=^U |
diff --git a/include/asm-sh/Kbuild b/include/asm-sh/Kbuild index c68e1680da01..76a8ccf254a5 100644 --- a/include/asm-sh/Kbuild +++ b/include/asm-sh/Kbuild | |||
@@ -1 +1,3 @@ | |||
1 | include include/asm-generic/Kbuild.asm | 1 | include include/asm-generic/Kbuild.asm |
2 | |||
3 | header-y += cpu-features.h | ||
diff --git a/include/asm-sh/bigsur/bigsur.h b/include/asm-sh/bigsur/bigsur.h deleted file mode 100644 index 427245f93589..000000000000 --- a/include/asm-sh/bigsur/bigsur.h +++ /dev/null | |||
@@ -1,80 +0,0 @@ | |||
1 | /* | ||
2 | * | ||
3 | * Hitachi Big Sur Eval Board support | ||
4 | * | ||
5 | * Dustin McIntire (dustin@sensoria.com) | ||
6 | * | ||
7 | * May be copied or modified under the terms of the GNU General Public | ||
8 | * License. See linux/COPYING for more information. | ||
9 | * | ||
10 | * Derived from Hitachi SH7751 reference manual | ||
11 | * | ||
12 | */ | ||
13 | |||
14 | #ifndef _ASM_BIGSUR_H_ | ||
15 | #define _ASM_BIGSUR_H_ | ||
16 | |||
17 | #include <asm/irq.h> | ||
18 | #include <asm/hd64465/hd64465.h> | ||
19 | |||
20 | /* 7751 Internal IRQ's used by external CPLD controller */ | ||
21 | #define BIGSUR_IRQ_LOW 0 | ||
22 | #define BIGSUR_IRQ_NUM 14 /* External CPLD level 1 IRQs */ | ||
23 | #define BIGSUR_IRQ_HIGH (BIGSUR_IRQ_LOW + BIGSUR_IRQ_NUM) | ||
24 | #define BIGSUR_2NDLVL_IRQ_LOW (HD64465_IRQ_BASE+HD64465_IRQ_NUM) | ||
25 | #define BIGSUR_2NDLVL_IRQ_NUM 32 /* Level 2 IRQs = 4 regs * 8 bits */ | ||
26 | #define BIGSUR_2NDLVL_IRQ_HIGH (BIGSUR_2NDLVL_IRQ_LOW + \ | ||
27 | BIGSUR_2NDLVL_IRQ_NUM) | ||
28 | |||
29 | /* PCI interrupt base number (A_INTA-A_INTD) */ | ||
30 | #define BIGSUR_SH7751_PCI_IRQ_BASE (BIGSUR_2NDLVL_IRQ_LOW+10) | ||
31 | |||
32 | /* CPLD registers and external chip addresses */ | ||
33 | #define BIGSUR_HD64464_ADDR 0xB2000000 | ||
34 | #define BIGSUR_DGDR 0xB1FFFE00 | ||
35 | #define BIGSUR_BIDR 0xB1FFFD00 | ||
36 | #define BIGSUR_CSLR 0xB1FFFC00 | ||
37 | #define BIGSUR_SW1R 0xB1FFFB00 | ||
38 | #define BIGSUR_DBGR 0xB1FFFA00 | ||
39 | #define BIGSUR_BDTR 0xB1FFF900 | ||
40 | #define BIGSUR_BDRR 0xB1FFF800 | ||
41 | #define BIGSUR_PPR1 0xB1FFF700 | ||
42 | #define BIGSUR_PPR2 0xB1FFF600 | ||
43 | #define BIGSUR_IDE2 0xB1FFF500 | ||
44 | #define BIGSUR_IDE3 0xB1FFF400 | ||
45 | #define BIGSUR_SPCR 0xB1FFF300 | ||
46 | #define BIGSUR_ETHR 0xB1FE0000 | ||
47 | #define BIGSUR_PPDR 0xB1FDFF00 | ||
48 | #define BIGSUR_ICTL 0xB1FDFE00 | ||
49 | #define BIGSUR_ICMD 0xB1FDFD00 | ||
50 | #define BIGSUR_DMA0 0xB1FDFC00 | ||
51 | #define BIGSUR_DMA1 0xB1FDFB00 | ||
52 | #define BIGSUR_IRQ0 0xB1FDFA00 | ||
53 | #define BIGSUR_IRQ1 0xB1FDF900 | ||
54 | #define BIGSUR_IRQ2 0xB1FDF800 | ||
55 | #define BIGSUR_IRQ3 0xB1FDF700 | ||
56 | #define BIGSUR_IMR0 0xB1FDF600 | ||
57 | #define BIGSUR_IMR1 0xB1FDF500 | ||
58 | #define BIGSUR_IMR2 0xB1FDF400 | ||
59 | #define BIGSUR_IMR3 0xB1FDF300 | ||
60 | #define BIGSUR_IRLMR0 0xB1FDF200 | ||
61 | #define BIGSUR_IRLMR1 0xB1FDF100 | ||
62 | #define BIGSUR_V320USC_ADDR 0xB1000000 | ||
63 | #define BIGSUR_HD64465_ADDR 0xB0000000 | ||
64 | #define BIGSUR_INTERNAL_BASE 0xB0000000 | ||
65 | |||
66 | /* SMC ethernet card parameters */ | ||
67 | #define BIGSUR_ETHER_IOPORT 0x220 | ||
68 | |||
69 | /* IDE register paramters */ | ||
70 | #define BIGSUR_IDECMD_IOPORT 0x1f0 | ||
71 | #define BIGSUR_IDECTL_IOPORT 0x1f8 | ||
72 | |||
73 | /* LED bit position in BIGSUR_CSLR */ | ||
74 | #define BIGSUR_LED (1<<4) | ||
75 | |||
76 | /* PCI: default LOCAL memory window sizes (seen from PCI bus) */ | ||
77 | #define BIGSUR_LSR0_SIZE (64*(1<<20)) //64MB | ||
78 | #define BIGSUR_LSR1_SIZE (64*(1<<20)) //64MB | ||
79 | |||
80 | #endif /* _ASM_BIGSUR_H_ */ | ||
diff --git a/include/asm-sh/bigsur/io.h b/include/asm-sh/bigsur/io.h deleted file mode 100644 index 1470ac8d4a39..000000000000 --- a/include/asm-sh/bigsur/io.h +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-sh/bigsur/io.h | ||
3 | * | ||
4 | * By Dustin McIntire (dustin@sensoria.com) (c)2001 | ||
5 | * Derived from io_hd64465.h, which bore the message: | ||
6 | * By Greg Banks <gbanks@pocketpenguins.com> | ||
7 | * (c) 2000 PocketPenguins Inc. | ||
8 | * and from io_hd64461.h, which bore the message: | ||
9 | * Copyright 2000 Stuart Menefy (stuart.menefy@st.com) | ||
10 | * | ||
11 | * May be copied or modified under the terms of the GNU General Public | ||
12 | * License. See linux/COPYING for more information. | ||
13 | * | ||
14 | * IO functions for a Hitachi Big Sur Evaluation Board. | ||
15 | */ | ||
16 | |||
17 | #ifndef _ASM_SH_IO_BIGSUR_H | ||
18 | #define _ASM_SH_IO_BIGSUR_H | ||
19 | |||
20 | #include <linux/types.h> | ||
21 | |||
22 | extern unsigned long bigsur_isa_port2addr(unsigned long offset); | ||
23 | extern int bigsur_irq_demux(int irq); | ||
24 | /* Provision for generic secondary demux step -- used by PCMCIA code */ | ||
25 | extern void bigsur_register_irq_demux(int irq, | ||
26 | int (*demux)(int irq, void *dev), void *dev); | ||
27 | extern void bigsur_unregister_irq_demux(int irq); | ||
28 | /* Set this variable to 1 to see port traffic */ | ||
29 | extern int bigsur_io_debug; | ||
30 | /* Map a range of ports to a range of kernel virtual memory. */ | ||
31 | extern void bigsur_port_map(u32 baseport, u32 nports, u32 addr, u8 shift); | ||
32 | extern void bigsur_port_unmap(u32 baseport, u32 nports); | ||
33 | |||
34 | #endif /* _ASM_SH_IO_BIGSUR_H */ | ||
35 | |||
diff --git a/include/asm-sh/bigsur/serial.h b/include/asm-sh/bigsur/serial.h deleted file mode 100644 index a08fa82fe45a..000000000000 --- a/include/asm-sh/bigsur/serial.h +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-sh/bigsur/serial.h | ||
3 | * | ||
4 | * Configuration details for Big Sur 16550 based serial ports | ||
5 | * i.e. HD64465, PCMCIA, etc. | ||
6 | */ | ||
7 | |||
8 | #ifndef _ASM_SERIAL_BIGSUR_H | ||
9 | #define _ASM_SERIAL_BIGSUR_H | ||
10 | #include <asm/hd64465.h> | ||
11 | |||
12 | #define BASE_BAUD (3379200 / 16) | ||
13 | |||
14 | #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) | ||
15 | |||
16 | |||
17 | #define SERIAL_PORT_DFNS \ | ||
18 | /* UART CLK PORT IRQ FLAGS */ \ | ||
19 | { 0, BASE_BAUD, 0x3F8, HD64465_IRQ_UART, STD_COM_FLAGS } /* ttyS0 */ | ||
20 | |||
21 | /* XXX: This should be moved ino irq.h */ | ||
22 | #define irq_cannonicalize(x) (x) | ||
23 | |||
24 | #endif /* _ASM_SERIAL_BIGSUR_H */ | ||
diff --git a/include/asm-sh/bugs.h b/include/asm-sh/bugs.h index a294997a8412..5a117ec43c77 100644 --- a/include/asm-sh/bugs.h +++ b/include/asm-sh/bugs.h | |||
@@ -19,9 +19,9 @@ static void __init check_bugs(void) | |||
19 | extern unsigned long loops_per_jiffy; | 19 | extern unsigned long loops_per_jiffy; |
20 | char *p = &init_utsname()->machine[2]; /* "sh" */ | 20 | char *p = &init_utsname()->machine[2]; /* "sh" */ |
21 | 21 | ||
22 | cpu_data->loops_per_jiffy = loops_per_jiffy; | 22 | current_cpu_data.loops_per_jiffy = loops_per_jiffy; |
23 | 23 | ||
24 | switch (cpu_data->type) { | 24 | switch (current_cpu_data.type) { |
25 | case CPU_SH7604 ... CPU_SH7619: | 25 | case CPU_SH7604 ... CPU_SH7619: |
26 | *p++ = '2'; | 26 | *p++ = '2'; |
27 | break; | 27 | break; |
@@ -54,7 +54,7 @@ static void __init check_bugs(void) | |||
54 | break; | 54 | break; |
55 | } | 55 | } |
56 | 56 | ||
57 | printk("CPU: %s\n", get_cpu_subtype()); | 57 | printk("CPU: %s\n", get_cpu_subtype(¤t_cpu_data)); |
58 | 58 | ||
59 | #ifndef __LITTLE_ENDIAN__ | 59 | #ifndef __LITTLE_ENDIAN__ |
60 | /* 'eb' means 'Endian Big' */ | 60 | /* 'eb' means 'Endian Big' */ |
diff --git a/include/asm-sh/cacheflush.h b/include/asm-sh/cacheflush.h index 07f62ec9ff0c..22f12634975b 100644 --- a/include/asm-sh/cacheflush.h +++ b/include/asm-sh/cacheflush.h | |||
@@ -30,5 +30,8 @@ extern void __flush_invalidate_region(void *start, int size); | |||
30 | 30 | ||
31 | #define HAVE_ARCH_UNMAPPED_AREA | 31 | #define HAVE_ARCH_UNMAPPED_AREA |
32 | 32 | ||
33 | /* Page flag for lazy dcache write-back for the aliasing UP caches */ | ||
34 | #define PG_dcache_dirty PG_arch_1 | ||
35 | |||
33 | #endif /* __KERNEL__ */ | 36 | #endif /* __KERNEL__ */ |
34 | #endif /* __ASM_SH_CACHEFLUSH_H */ | 37 | #endif /* __ASM_SH_CACHEFLUSH_H */ |
diff --git a/include/asm-sh/cpu-sh3/cacheflush.h b/include/asm-sh/cpu-sh3/cacheflush.h index f70d8ef76a15..6fabbba228de 100644 --- a/include/asm-sh/cpu-sh3/cacheflush.h +++ b/include/asm-sh/cpu-sh3/cacheflush.h | |||
@@ -36,8 +36,6 @@ | |||
36 | /* 32KB cache, 4kb PAGE sizes need to check bit 12 */ | 36 | /* 32KB cache, 4kb PAGE sizes need to check bit 12 */ |
37 | #define CACHE_ALIAS 0x00001000 | 37 | #define CACHE_ALIAS 0x00001000 |
38 | 38 | ||
39 | #define PG_mapped PG_arch_1 | ||
40 | |||
41 | void flush_cache_all(void); | 39 | void flush_cache_all(void); |
42 | void flush_cache_mm(struct mm_struct *mm); | 40 | void flush_cache_mm(struct mm_struct *mm); |
43 | #define flush_cache_dup_mm(mm) flush_cache_mm(mm) | 41 | #define flush_cache_dup_mm(mm) flush_cache_mm(mm) |
diff --git a/include/asm-sh/cpu-sh4/cacheflush.h b/include/asm-sh/cpu-sh4/cacheflush.h index b01a10f31225..b3746a936a09 100644 --- a/include/asm-sh/cpu-sh4/cacheflush.h +++ b/include/asm-sh/cpu-sh4/cacheflush.h | |||
@@ -17,6 +17,7 @@ | |||
17 | * so we need them. | 17 | * so we need them. |
18 | */ | 18 | */ |
19 | void flush_cache_all(void); | 19 | void flush_cache_all(void); |
20 | void flush_dcache_all(void); | ||
20 | void flush_cache_mm(struct mm_struct *mm); | 21 | void flush_cache_mm(struct mm_struct *mm); |
21 | #define flush_cache_dup_mm(mm) flush_cache_mm(mm) | 22 | #define flush_cache_dup_mm(mm) flush_cache_mm(mm) |
22 | void flush_cache_range(struct vm_area_struct *vma, unsigned long start, | 23 | void flush_cache_range(struct vm_area_struct *vma, unsigned long start, |
@@ -38,16 +39,4 @@ void flush_icache_user_range(struct vm_area_struct *vma, struct page *page, | |||
38 | /* Initialization of P3 area for copy_user_page */ | 39 | /* Initialization of P3 area for copy_user_page */ |
39 | void p3_cache_init(void); | 40 | void p3_cache_init(void); |
40 | 41 | ||
41 | #define PG_mapped PG_arch_1 | ||
42 | |||
43 | #ifdef CONFIG_MMU | ||
44 | extern int remap_area_pages(unsigned long addr, unsigned long phys_addr, | ||
45 | unsigned long size, unsigned long flags); | ||
46 | #else /* CONFIG_MMU */ | ||
47 | static inline int remap_area_pages(unsigned long addr, unsigned long phys_addr, | ||
48 | unsigned long size, unsigned long flags) | ||
49 | { | ||
50 | return 0; | ||
51 | } | ||
52 | #endif /* CONFIG_MMU */ | ||
53 | #endif /* __ASM_CPU_SH4_CACHEFLUSH_H */ | 42 | #endif /* __ASM_CPU_SH4_CACHEFLUSH_H */ |
diff --git a/include/asm-sh/cpu-sh4/dma.h b/include/asm-sh/cpu-sh4/dma.h index 3e4b3e6d80c0..c135e9cebd9c 100644 --- a/include/asm-sh/cpu-sh4/dma.h +++ b/include/asm-sh/cpu-sh4/dma.h | |||
@@ -3,6 +3,17 @@ | |||
3 | 3 | ||
4 | #define DMAOR_INIT ( 0x8000 | DMAOR_DME ) | 4 | #define DMAOR_INIT ( 0x8000 | DMAOR_DME ) |
5 | 5 | ||
6 | /* SH7751/7760/7780 DMA IRQ sources */ | ||
7 | #define DMTE0_IRQ 34 | ||
8 | #define DMTE1_IRQ 35 | ||
9 | #define DMTE2_IRQ 36 | ||
10 | #define DMTE3_IRQ 37 | ||
11 | #define DMTE4_IRQ 44 | ||
12 | #define DMTE5_IRQ 45 | ||
13 | #define DMTE6_IRQ 46 | ||
14 | #define DMTE7_IRQ 47 | ||
15 | #define DMAE_IRQ 38 | ||
16 | |||
6 | #ifdef CONFIG_CPU_SH4A | 17 | #ifdef CONFIG_CPU_SH4A |
7 | #define SH_DMAC_BASE 0xfc808020 | 18 | #define SH_DMAC_BASE 0xfc808020 |
8 | 19 | ||
diff --git a/include/asm-sh/dma-mapping.h b/include/asm-sh/dma-mapping.h index 8d0867b98e05..d3bc7818bbbe 100644 --- a/include/asm-sh/dma-mapping.h +++ b/include/asm-sh/dma-mapping.h | |||
@@ -53,6 +53,10 @@ static inline void dma_free_coherent(struct device *dev, size_t size, | |||
53 | consistent_free(vaddr, size); | 53 | consistent_free(vaddr, size); |
54 | } | 54 | } |
55 | 55 | ||
56 | #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) | ||
57 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) | ||
58 | #define dma_is_consistent(d, h) (1) | ||
59 | |||
56 | static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size, | 60 | static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size, |
57 | enum dma_data_direction dir) | 61 | enum dma_data_direction dir) |
58 | { | 62 | { |
diff --git a/include/asm-sh/ec3104/ec3104.h b/include/asm-sh/ec3104/ec3104.h deleted file mode 100644 index 639cfa489c8f..000000000000 --- a/include/asm-sh/ec3104/ec3104.h +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | #ifndef __ASM_EC3104_H | ||
2 | #define __ASM_EC3104_H | ||
3 | |||
4 | |||
5 | /* | ||
6 | * Most of the register set is at 0xb0ec0000 - 0xb0ecffff. | ||
7 | * | ||
8 | * as far as I've figured it out the register map is: | ||
9 | * 0xb0ec0000 - id string | ||
10 | * 0xb0ec0XXX - power management | ||
11 | * 0xb0ec1XXX - interrupt control | ||
12 | * 0xb0ec3XXX - ps2 port (touch pad on aero 8000) | ||
13 | * 0xb0ec6XXX - i2c | ||
14 | * 0xb0ec7000 - first serial port (proprietary connector on aero 8000) | ||
15 | * 0xb0ec8000 - second serial port | ||
16 | * 0xb0ec9000 - third serial port | ||
17 | * 0xb0eca000 - fourth serial port (keyboard controller on aero 8000) | ||
18 | * 0xb0eccXXX - GPIO | ||
19 | * 0xb0ecdXXX - GPIO | ||
20 | */ | ||
21 | |||
22 | #define EC3104_BASE 0xb0ec0000 | ||
23 | |||
24 | #define EC3104_SER4_DATA (EC3104_BASE+0xa000) | ||
25 | #define EC3104_SER4_IIR (EC3104_BASE+0xa008) | ||
26 | #define EC3104_SER4_MCR (EC3104_BASE+0xa010) | ||
27 | #define EC3104_SER4_LSR (EC3104_BASE+0xa014) | ||
28 | #define EC3104_SER4_MSR (EC3104_BASE+0xa018) | ||
29 | |||
30 | /* | ||
31 | * our ISA bus. this seems to be real ISA. | ||
32 | */ | ||
33 | #define EC3104_ISA_BASE 0xa5000000 | ||
34 | |||
35 | #define EC3104_IRQ 11 | ||
36 | #define EC3104_IRQBASE 64 | ||
37 | |||
38 | #define EC3104_IRQ_SER1 EC3104_IRQBASE + 7 | ||
39 | #define EC3104_IRQ_SER2 EC3104_IRQBASE + 8 | ||
40 | #define EC3104_IRQ_SER3 EC3104_IRQBASE + 9 | ||
41 | #define EC3104_IRQ_SER4 EC3104_IRQBASE + 10 | ||
42 | |||
43 | #endif /* __ASM_EC3104_H */ | ||
diff --git a/include/asm-sh/ec3104/io.h b/include/asm-sh/ec3104/io.h deleted file mode 100644 index ea5c8e65ac11..000000000000 --- a/include/asm-sh/ec3104/io.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | #ifndef _ASM_SH_IO_EC3104_H | ||
2 | #define _ASM_SH_IO_EC3104_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | extern unsigned char ec3104_inb(unsigned long port); | ||
7 | extern unsigned short ec3104_inw(unsigned long port); | ||
8 | extern unsigned long ec3104_inl(unsigned long port); | ||
9 | |||
10 | extern void ec3104_outb(unsigned char value, unsigned long port); | ||
11 | extern void ec3104_outw(unsigned short value, unsigned long port); | ||
12 | extern void ec3104_outl(unsigned long value, unsigned long port); | ||
13 | |||
14 | extern int ec3104_irq_demux(int irq); | ||
15 | |||
16 | #endif /* _ASM_SH_IO_EC3104_H */ | ||
diff --git a/include/asm-sh/ec3104/keyboard.h b/include/asm-sh/ec3104/keyboard.h deleted file mode 100644 index c1253a683197..000000000000 --- a/include/asm-sh/ec3104/keyboard.h +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | extern unsigned char ec3104_kbd_sysrq_xlate[]; | ||
2 | extern int ec3104_kbd_setkeycode(unsigned int scancode, unsigned int keycode); | ||
3 | extern int ec3104_kbd_getkeycode(unsigned int scancode); | ||
4 | extern int ec3104_kbd_translate(unsigned char, unsigned char *, char); | ||
5 | extern char ec3104_kbd_unexpected_up(unsigned char); | ||
6 | extern void ec3104_kbd_leds(unsigned char); | ||
7 | extern void ec3104_kbd_init_hw(void); | ||
8 | |||
9 | #define kbd_sysrq_xlate ec3104_kbd_sysrq_xlate | ||
10 | #define kbd_setkeycode ec3104_kbd_setkeycode | ||
11 | #define kbd_getkeycode ec3104_kbd_getkeycode | ||
12 | #define kbd_translate ec3104_kbd_translate | ||
13 | #define kbd_unexpected_up ec3104_kbd_unexpected_up | ||
14 | #define kbd_leds ec3104_kbd_leds | ||
15 | #define kbd_init_hw ec3104_kbd_init_hw | ||
diff --git a/include/asm-sh/ec3104/serial.h b/include/asm-sh/ec3104/serial.h deleted file mode 100644 index cfe4d78ec1ee..000000000000 --- a/include/asm-sh/ec3104/serial.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | #include <asm/ec3104.h> | ||
2 | /* Naturally we don't know the exact value but 115200 baud has a divisor | ||
3 | * of 9 and 19200 baud has a divisor of 52, so this seems like a good | ||
4 | * guess. */ | ||
5 | #define BASE_BAUD (16800000 / 16) | ||
6 | |||
7 | #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) | ||
8 | |||
9 | /* there is a fourth serial port with the expected values as well, but | ||
10 | * it's got the keyboard controller behind it so we can't really use it | ||
11 | * (without moving the keyboard driver to userspace, which doesn't sound | ||
12 | * like a very good idea) */ | ||
13 | #define SERIAL_PORT_DFNS \ | ||
14 | /* UART CLK PORT IRQ FLAGS */ \ | ||
15 | { 0, BASE_BAUD, 0x11C00, EC3104_IRQBASE+7, STD_COM_FLAGS }, /* ttyS0 */ \ | ||
16 | { 0, BASE_BAUD, 0x12000, EC3104_IRQBASE+8, STD_COM_FLAGS }, /* ttyS1 */ \ | ||
17 | { 0, BASE_BAUD, 0x12400, EC3104_IRQBASE+9, STD_COM_FLAGS }, /* ttyS2 */ | ||
18 | |||
19 | /* XXX: This should be moved ino irq.h */ | ||
20 | #define irq_cannonicalize(x) (x) | ||
diff --git a/include/asm-sh/irq.h b/include/asm-sh/irq.h index bff965ef4b95..8ccf7ae593ef 100644 --- a/include/asm-sh/irq.h +++ b/include/asm-sh/irq.h | |||
@@ -66,12 +66,8 @@ | |||
66 | /* 3. OFFCHIP_NR_IRQS */ | 66 | /* 3. OFFCHIP_NR_IRQS */ |
67 | #if defined(CONFIG_HD64461) | 67 | #if defined(CONFIG_HD64461) |
68 | # define OFFCHIP_NR_IRQS 18 | 68 | # define OFFCHIP_NR_IRQS 18 |
69 | #elif defined (CONFIG_SH_BIGSUR) /* must be before CONFIG_HD64465 */ | ||
70 | # define OFFCHIP_NR_IRQS 48 | ||
71 | #elif defined(CONFIG_HD64465) | 69 | #elif defined(CONFIG_HD64465) |
72 | # define OFFCHIP_NR_IRQS 16 | 70 | # define OFFCHIP_NR_IRQS 16 |
73 | #elif defined (CONFIG_SH_EC3104) | ||
74 | # define OFFCHIP_NR_IRQS 16 | ||
75 | #elif defined (CONFIG_SH_DREAMCAST) | 71 | #elif defined (CONFIG_SH_DREAMCAST) |
76 | # define OFFCHIP_NR_IRQS 96 | 72 | # define OFFCHIP_NR_IRQS 96 |
77 | #elif defined (CONFIG_SH_TITAN) | 73 | #elif defined (CONFIG_SH_TITAN) |
diff --git a/include/asm-sh/kgdb.h b/include/asm-sh/kgdb.h index 7b26f53fe343..0095c665d272 100644 --- a/include/asm-sh/kgdb.h +++ b/include/asm-sh/kgdb.h | |||
@@ -85,10 +85,10 @@ extern int setjmp(jmp_buf __jmpb); | |||
85 | #define KGDB_PRINTK(...) printk("KGDB: " __VA_ARGS__) | 85 | #define KGDB_PRINTK(...) printk("KGDB: " __VA_ARGS__) |
86 | 86 | ||
87 | /* Forced breakpoint */ | 87 | /* Forced breakpoint */ |
88 | #define BREAKPOINT() do { \ | 88 | #define BREAKPOINT() \ |
89 | if (kgdb_enabled) { \ | 89 | do { \ |
90 | asm volatile("trapa #0xff"); \ | 90 | if (kgdb_enabled) \ |
91 | } \ | 91 | __asm__ __volatile__("trapa #0x3c"); \ |
92 | } while (0) | 92 | } while (0) |
93 | 93 | ||
94 | /* KGDB should be able to flush all kernel text space */ | 94 | /* KGDB should be able to flush all kernel text space */ |
diff --git a/include/asm-sh/mmu.h b/include/asm-sh/mmu.h index cf47df79bb94..eb0358c097d0 100644 --- a/include/asm-sh/mmu.h +++ b/include/asm-sh/mmu.h | |||
@@ -1,25 +1,19 @@ | |||
1 | #ifndef __MMU_H | 1 | #ifndef __MMU_H |
2 | #define __MMU_H | 2 | #define __MMU_H |
3 | 3 | ||
4 | #if !defined(CONFIG_MMU) | 4 | /* Default "unsigned long" context */ |
5 | typedef unsigned long mm_context_id_t[NR_CPUS]; | ||
5 | 6 | ||
6 | typedef struct { | 7 | typedef struct { |
8 | #ifdef CONFIG_MMU | ||
9 | mm_context_id_t id; | ||
10 | void *vdso; | ||
11 | #else | ||
7 | struct vm_list_struct *vmlist; | 12 | struct vm_list_struct *vmlist; |
8 | unsigned long end_brk; | 13 | unsigned long end_brk; |
14 | #endif | ||
9 | } mm_context_t; | 15 | } mm_context_t; |
10 | 16 | ||
11 | #else | ||
12 | |||
13 | /* Default "unsigned long" context */ | ||
14 | typedef unsigned long mm_context_id_t; | ||
15 | |||
16 | typedef struct { | ||
17 | mm_context_id_t id; | ||
18 | void *vdso; | ||
19 | } mm_context_t; | ||
20 | |||
21 | #endif /* CONFIG_MMU */ | ||
22 | |||
23 | /* | 17 | /* |
24 | * Privileged Space Mapping Buffer (PMB) definitions | 18 | * Privileged Space Mapping Buffer (PMB) definitions |
25 | */ | 19 | */ |
diff --git a/include/asm-sh/mmu_context.h b/include/asm-sh/mmu_context.h index 46f04e23bd45..342024425b7d 100644 --- a/include/asm-sh/mmu_context.h +++ b/include/asm-sh/mmu_context.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 1999 Niibe Yutaka | 2 | * Copyright (C) 1999 Niibe Yutaka |
3 | * Copyright (C) 2003 Paul Mundt | 3 | * Copyright (C) 2003 - 2006 Paul Mundt |
4 | * | 4 | * |
5 | * ASID handling idea taken from MIPS implementation. | 5 | * ASID handling idea taken from MIPS implementation. |
6 | */ | 6 | */ |
@@ -19,11 +19,6 @@ | |||
19 | * (b) ASID (Address Space IDentifier) | 19 | * (b) ASID (Address Space IDentifier) |
20 | */ | 20 | */ |
21 | 21 | ||
22 | /* | ||
23 | * Cache of MMU context last used. | ||
24 | */ | ||
25 | extern unsigned long mmu_context_cache; | ||
26 | |||
27 | #define MMU_CONTEXT_ASID_MASK 0x000000ff | 22 | #define MMU_CONTEXT_ASID_MASK 0x000000ff |
28 | #define MMU_CONTEXT_VERSION_MASK 0xffffff00 | 23 | #define MMU_CONTEXT_VERSION_MASK 0xffffff00 |
29 | #define MMU_CONTEXT_FIRST_VERSION 0x00000100 | 24 | #define MMU_CONTEXT_FIRST_VERSION 0x00000100 |
@@ -32,6 +27,11 @@ extern unsigned long mmu_context_cache; | |||
32 | /* ASID is 8-bit value, so it can't be 0x100 */ | 27 | /* ASID is 8-bit value, so it can't be 0x100 */ |
33 | #define MMU_NO_ASID 0x100 | 28 | #define MMU_NO_ASID 0x100 |
34 | 29 | ||
30 | #define cpu_context(cpu, mm) ((mm)->context.id[cpu]) | ||
31 | #define cpu_asid(cpu, mm) (cpu_context((cpu), (mm)) & \ | ||
32 | MMU_CONTEXT_ASID_MASK) | ||
33 | #define asid_cache(cpu) (cpu_data[cpu].asid_cache) | ||
34 | |||
35 | /* | 35 | /* |
36 | * Virtual Page Number mask | 36 | * Virtual Page Number mask |
37 | */ | 37 | */ |
@@ -41,18 +41,17 @@ extern unsigned long mmu_context_cache; | |||
41 | /* | 41 | /* |
42 | * Get MMU context if needed. | 42 | * Get MMU context if needed. |
43 | */ | 43 | */ |
44 | static inline void get_mmu_context(struct mm_struct *mm) | 44 | static inline void get_mmu_context(struct mm_struct *mm, unsigned int cpu) |
45 | { | 45 | { |
46 | unsigned long mc = mmu_context_cache; | 46 | unsigned long asid = asid_cache(cpu); |
47 | 47 | ||
48 | /* Check if we have old version of context. */ | 48 | /* Check if we have old version of context. */ |
49 | if (((mm->context.id ^ mc) & MMU_CONTEXT_VERSION_MASK) == 0) | 49 | if (((cpu_context(cpu, mm) ^ asid) & MMU_CONTEXT_VERSION_MASK) == 0) |
50 | /* It's up to date, do nothing */ | 50 | /* It's up to date, do nothing */ |
51 | return; | 51 | return; |
52 | 52 | ||
53 | /* It's old, we need to get new context with new version. */ | 53 | /* It's old, we need to get new context with new version. */ |
54 | mc = ++mmu_context_cache; | 54 | if (!(++asid & MMU_CONTEXT_ASID_MASK)) { |
55 | if (!(mc & MMU_CONTEXT_ASID_MASK)) { | ||
56 | /* | 55 | /* |
57 | * We exhaust ASID of this version. | 56 | * We exhaust ASID of this version. |
58 | * Flush all TLB and start new cycle. | 57 | * Flush all TLB and start new cycle. |
@@ -63,10 +62,11 @@ static inline void get_mmu_context(struct mm_struct *mm) | |||
63 | * Fix version; Note that we avoid version #0 | 62 | * Fix version; Note that we avoid version #0 |
64 | * to distingush NO_CONTEXT. | 63 | * to distingush NO_CONTEXT. |
65 | */ | 64 | */ |
66 | if (!mc) | 65 | if (!asid) |
67 | mmu_context_cache = mc = MMU_CONTEXT_FIRST_VERSION; | 66 | asid = MMU_CONTEXT_FIRST_VERSION; |
68 | } | 67 | } |
69 | mm->context.id = mc; | 68 | |
69 | cpu_context(cpu, mm) = asid_cache(cpu) = asid; | ||
70 | } | 70 | } |
71 | 71 | ||
72 | /* | 72 | /* |
@@ -74,9 +74,13 @@ static inline void get_mmu_context(struct mm_struct *mm) | |||
74 | * instance. | 74 | * instance. |
75 | */ | 75 | */ |
76 | static inline int init_new_context(struct task_struct *tsk, | 76 | static inline int init_new_context(struct task_struct *tsk, |
77 | struct mm_struct *mm) | 77 | struct mm_struct *mm) |
78 | { | 78 | { |
79 | mm->context.id = NO_CONTEXT; | 79 | int i; |
80 | |||
81 | for (i = 0; i < num_online_cpus(); i++) | ||
82 | cpu_context(i, mm) = NO_CONTEXT; | ||
83 | |||
80 | return 0; | 84 | return 0; |
81 | } | 85 | } |
82 | 86 | ||
@@ -117,10 +121,10 @@ static inline unsigned long get_asid(void) | |||
117 | * After we have set current->mm to a new value, this activates | 121 | * After we have set current->mm to a new value, this activates |
118 | * the context for the new mm so we see the new mappings. | 122 | * the context for the new mm so we see the new mappings. |
119 | */ | 123 | */ |
120 | static inline void activate_context(struct mm_struct *mm) | 124 | static inline void activate_context(struct mm_struct *mm, unsigned int cpu) |
121 | { | 125 | { |
122 | get_mmu_context(mm); | 126 | get_mmu_context(mm, cpu); |
123 | set_asid(mm->context.id & MMU_CONTEXT_ASID_MASK); | 127 | set_asid(cpu_asid(cpu, mm)); |
124 | } | 128 | } |
125 | 129 | ||
126 | /* MMU_TTB is used for optimizing the fault handling. */ | 130 | /* MMU_TTB is used for optimizing the fault handling. */ |
@@ -138,10 +142,15 @@ static inline void switch_mm(struct mm_struct *prev, | |||
138 | struct mm_struct *next, | 142 | struct mm_struct *next, |
139 | struct task_struct *tsk) | 143 | struct task_struct *tsk) |
140 | { | 144 | { |
145 | unsigned int cpu = smp_processor_id(); | ||
146 | |||
141 | if (likely(prev != next)) { | 147 | if (likely(prev != next)) { |
148 | cpu_set(cpu, next->cpu_vm_mask); | ||
142 | set_TTB(next->pgd); | 149 | set_TTB(next->pgd); |
143 | activate_context(next); | 150 | activate_context(next, cpu); |
144 | } | 151 | } else |
152 | if (!cpu_test_and_set(cpu, next->cpu_vm_mask)) | ||
153 | activate_context(next, cpu); | ||
145 | } | 154 | } |
146 | 155 | ||
147 | #define deactivate_mm(tsk,mm) do { } while (0) | 156 | #define deactivate_mm(tsk,mm) do { } while (0) |
@@ -159,7 +168,7 @@ enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) | |||
159 | #define destroy_context(mm) do { } while (0) | 168 | #define destroy_context(mm) do { } while (0) |
160 | #define set_asid(asid) do { } while (0) | 169 | #define set_asid(asid) do { } while (0) |
161 | #define get_asid() (0) | 170 | #define get_asid() (0) |
162 | #define activate_context(mm) do { } while (0) | 171 | #define activate_context(mm,cpu) do { } while (0) |
163 | #define switch_mm(prev,next,tsk) do { } while (0) | 172 | #define switch_mm(prev,next,tsk) do { } while (0) |
164 | #define deactivate_mm(tsk,mm) do { } while (0) | 173 | #define deactivate_mm(tsk,mm) do { } while (0) |
165 | #define activate_mm(prev,next) do { } while (0) | 174 | #define activate_mm(prev,next) do { } while (0) |
@@ -174,14 +183,16 @@ enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) | |||
174 | */ | 183 | */ |
175 | static inline void enable_mmu(void) | 184 | static inline void enable_mmu(void) |
176 | { | 185 | { |
186 | unsigned int cpu = smp_processor_id(); | ||
187 | |||
177 | /* Enable MMU */ | 188 | /* Enable MMU */ |
178 | ctrl_outl(MMU_CONTROL_INIT, MMUCR); | 189 | ctrl_outl(MMU_CONTROL_INIT, MMUCR); |
179 | ctrl_barrier(); | 190 | ctrl_barrier(); |
180 | 191 | ||
181 | if (mmu_context_cache == NO_CONTEXT) | 192 | if (asid_cache(cpu) == NO_CONTEXT) |
182 | mmu_context_cache = MMU_CONTEXT_FIRST_VERSION; | 193 | asid_cache(cpu) = MMU_CONTEXT_FIRST_VERSION; |
183 | 194 | ||
184 | set_asid(mmu_context_cache & MMU_CONTEXT_ASID_MASK); | 195 | set_asid(asid_cache(cpu) & MMU_CONTEXT_ASID_MASK); |
185 | } | 196 | } |
186 | 197 | ||
187 | static inline void disable_mmu(void) | 198 | static inline void disable_mmu(void) |
diff --git a/include/asm-sh/page.h b/include/asm-sh/page.h index 380fd62dd05a..ac4b4677f28c 100644 --- a/include/asm-sh/page.h +++ b/include/asm-sh/page.h | |||
@@ -13,6 +13,8 @@ | |||
13 | [ P4 control ] 0xE0000000 | 13 | [ P4 control ] 0xE0000000 |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #ifdef __KERNEL__ | ||
17 | |||
16 | /* PAGE_SHIFT determines the page size */ | 18 | /* PAGE_SHIFT determines the page size */ |
17 | #if defined(CONFIG_PAGE_SIZE_4KB) | 19 | #if defined(CONFIG_PAGE_SIZE_4KB) |
18 | # define PAGE_SHIFT 12 | 20 | # define PAGE_SHIFT 12 |
@@ -51,7 +53,6 @@ | |||
51 | #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT-PAGE_SHIFT) | 53 | #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT-PAGE_SHIFT) |
52 | #endif | 54 | #endif |
53 | 55 | ||
54 | #ifdef __KERNEL__ | ||
55 | #ifndef __ASSEMBLY__ | 56 | #ifndef __ASSEMBLY__ |
56 | 57 | ||
57 | extern void (*clear_page)(void *to); | 58 | extern void (*clear_page)(void *to); |
diff --git a/include/asm-sh/pgtable.h b/include/asm-sh/pgtable.h index 036ca2843866..9214c015fe14 100644 --- a/include/asm-sh/pgtable.h +++ b/include/asm-sh/pgtable.h | |||
@@ -43,17 +43,17 @@ extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)]; | |||
43 | /* PGD bits */ | 43 | /* PGD bits */ |
44 | #define PGDIR_SHIFT (PTE_SHIFT + PTE_BITS) | 44 | #define PGDIR_SHIFT (PTE_SHIFT + PTE_BITS) |
45 | #define PGDIR_BITS (32 - PGDIR_SHIFT) | 45 | #define PGDIR_BITS (32 - PGDIR_SHIFT) |
46 | #define PGDIR_SIZE (1 << PGDIR_SHIFT) | 46 | #define PGDIR_SIZE (1UL << PGDIR_SHIFT) |
47 | #define PGDIR_MASK (~(PGDIR_SIZE-1)) | 47 | #define PGDIR_MASK (~(PGDIR_SIZE-1)) |
48 | 48 | ||
49 | /* Entries per level */ | 49 | /* Entries per level */ |
50 | #define PTRS_PER_PTE (PAGE_SIZE / 4) | 50 | #define PTRS_PER_PTE (PAGE_SIZE / (1 << PTE_MAGNITUDE)) |
51 | #define PTRS_PER_PGD (PAGE_SIZE / 4) | 51 | #define PTRS_PER_PGD (PAGE_SIZE / 4) |
52 | 52 | ||
53 | #define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE) | 53 | #define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE) |
54 | #define FIRST_USER_ADDRESS 0 | 54 | #define FIRST_USER_ADDRESS 0 |
55 | 55 | ||
56 | #define PTE_PHYS_MASK 0x1ffff000 | 56 | #define PTE_PHYS_MASK (0x20000000 - PAGE_SIZE) |
57 | 57 | ||
58 | /* | 58 | /* |
59 | * First 1MB map is used by fixed purpose. | 59 | * First 1MB map is used by fixed purpose. |
@@ -583,11 +583,6 @@ struct mm_struct; | |||
583 | extern unsigned int kobjsize(const void *objp); | 583 | extern unsigned int kobjsize(const void *objp); |
584 | #endif /* !CONFIG_MMU */ | 584 | #endif /* !CONFIG_MMU */ |
585 | 585 | ||
586 | #if defined(CONFIG_CPU_SH4) || defined(CONFIG_SH7705_CACHE_32KB) | ||
587 | #define __HAVE_ARCH_PTEP_GET_AND_CLEAR | ||
588 | extern pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep); | ||
589 | #endif | ||
590 | |||
591 | extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; | 586 | extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; |
592 | extern void paging_init(void); | 587 | extern void paging_init(void); |
593 | 588 | ||
diff --git a/include/asm-sh/processor.h b/include/asm-sh/processor.h index e29f2abb92de..3e46a7afe764 100644 --- a/include/asm-sh/processor.h +++ b/include/asm-sh/processor.h | |||
@@ -27,8 +27,6 @@ | |||
27 | #define CCN_CVR 0xff000040 | 27 | #define CCN_CVR 0xff000040 |
28 | #define CCN_PRR 0xff000044 | 28 | #define CCN_PRR 0xff000044 |
29 | 29 | ||
30 | const char *get_cpu_subtype(void); | ||
31 | |||
32 | /* | 30 | /* |
33 | * CPU type and hardware bug flags. Kept separately for each CPU. | 31 | * CPU type and hardware bug flags. Kept separately for each CPU. |
34 | * | 32 | * |
@@ -66,6 +64,7 @@ enum cpu_type { | |||
66 | struct sh_cpuinfo { | 64 | struct sh_cpuinfo { |
67 | unsigned int type; | 65 | unsigned int type; |
68 | unsigned long loops_per_jiffy; | 66 | unsigned long loops_per_jiffy; |
67 | unsigned long asid_cache; | ||
69 | 68 | ||
70 | struct cache_info icache; /* Primary I-cache */ | 69 | struct cache_info icache; /* Primary I-cache */ |
71 | struct cache_info dcache; /* Primary D-cache */ | 70 | struct cache_info dcache; /* Primary D-cache */ |
@@ -288,5 +287,8 @@ extern int vsyscall_init(void); | |||
288 | #define vsyscall_init() do { } while (0) | 287 | #define vsyscall_init() do { } while (0) |
289 | #endif | 288 | #endif |
290 | 289 | ||
290 | /* arch/sh/kernel/setup.c */ | ||
291 | const char *get_cpu_subtype(struct sh_cpuinfo *c); | ||
292 | |||
291 | #endif /* __KERNEL__ */ | 293 | #endif /* __KERNEL__ */ |
292 | #endif /* __ASM_SH_PROCESSOR_H */ | 294 | #endif /* __ASM_SH_PROCESSOR_H */ |
diff --git a/include/asm-sh/rts7751r2d.h b/include/asm-sh/rts7751r2d.h index 796b8fcb81a8..10565ac7966a 100644 --- a/include/asm-sh/rts7751r2d.h +++ b/include/asm-sh/rts7751r2d.h | |||
@@ -68,6 +68,10 @@ | |||
68 | #define IRQ_PCISLOT2 10 /* PCI Slot #2 IRQ */ | 68 | #define IRQ_PCISLOT2 10 /* PCI Slot #2 IRQ */ |
69 | #define IRQ_EXTENTION 11 /* EXTn IRQ */ | 69 | #define IRQ_EXTENTION 11 /* EXTn IRQ */ |
70 | 70 | ||
71 | /* arch/sh/boards/renesas/rts7751r2d/irq.c */ | ||
72 | void init_rts7751r2d_IRQ(void); | ||
73 | int rts7751r2d_irq_demux(int); | ||
74 | |||
71 | #define __IO_PREFIX rts7751r2d | 75 | #define __IO_PREFIX rts7751r2d |
72 | #include <asm/io_generic.h> | 76 | #include <asm/io_generic.h> |
73 | 77 | ||
diff --git a/include/asm-sh/serial.h b/include/asm-sh/serial.h index 8734590d27e8..21f6d330f189 100644 --- a/include/asm-sh/serial.h +++ b/include/asm-sh/serial.h | |||
@@ -9,11 +9,6 @@ | |||
9 | 9 | ||
10 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
11 | 11 | ||
12 | #ifdef CONFIG_SH_EC3104 | ||
13 | #include <asm/serial-ec3104.h> | ||
14 | #elif defined (CONFIG_SH_BIGSUR) | ||
15 | #include <asm/serial-bigsur.h> | ||
16 | #else | ||
17 | /* | 12 | /* |
18 | * This assumes you have a 1.8432 MHz clock for your UART. | 13 | * This assumes you have a 1.8432 MHz clock for your UART. |
19 | * | 14 | * |
@@ -34,12 +29,8 @@ | |||
34 | 29 | ||
35 | #else | 30 | #else |
36 | 31 | ||
37 | #define SERIAL_PORT_DFNS \ | 32 | #define SERIAL_PORT_DFNS |
38 | /* UART CLK PORT IRQ FLAGS */ \ | ||
39 | { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \ | ||
40 | { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS } /* ttyS1 */ | ||
41 | 33 | ||
42 | #endif | 34 | #endif |
43 | 35 | ||
44 | #endif | ||
45 | #endif /* _ASM_SERIAL_H */ | 36 | #endif /* _ASM_SERIAL_H */ |
diff --git a/include/asm-sh/termios.h b/include/asm-sh/termios.h index 44edfd471443..e7c8f86ef890 100644 --- a/include/asm-sh/termios.h +++ b/include/asm-sh/termios.h | |||
@@ -39,24 +39,6 @@ struct termio { | |||
39 | 39 | ||
40 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 40 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
41 | 41 | ||
42 | /* line disciplines */ | ||
43 | #define N_TTY 0 | ||
44 | #define N_SLIP 1 | ||
45 | #define N_MOUSE 2 | ||
46 | #define N_PPP 3 | ||
47 | #define N_STRIP 4 | ||
48 | #define N_AX25 5 | ||
49 | #define N_X25 6 /* X.25 async */ | ||
50 | #define N_6PACK 7 | ||
51 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
52 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
53 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
54 | #define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ | ||
55 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
56 | #define N_HDLC 13 /* synchronous HDLC */ | ||
57 | #define N_SYNC_PPP 14 | ||
58 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
59 | |||
60 | #ifdef __KERNEL__ | 42 | #ifdef __KERNEL__ |
61 | 43 | ||
62 | /* intr=^C quit=^\ erase=del kill=^U | 44 | /* intr=^C quit=^\ erase=del kill=^U |
diff --git a/include/asm-sh/thread_info.h b/include/asm-sh/thread_info.h index 879f741105db..279e70a77c75 100644 --- a/include/asm-sh/thread_info.h +++ b/include/asm-sh/thread_info.h | |||
@@ -32,12 +32,20 @@ struct thread_info { | |||
32 | 32 | ||
33 | #define PREEMPT_ACTIVE 0x10000000 | 33 | #define PREEMPT_ACTIVE 0x10000000 |
34 | 34 | ||
35 | #ifdef CONFIG_4KSTACKS | 35 | #if defined(CONFIG_4KSTACKS) |
36 | #define THREAD_SIZE (PAGE_SIZE) | 36 | #define THREAD_SIZE_ORDER (0) |
37 | #elif defined(CONFIG_PAGE_SIZE_4KB) | ||
38 | #define THREAD_SIZE_ORDER (1) | ||
39 | #elif defined(CONFIG_PAGE_SIZE_8KB) | ||
40 | #define THREAD_SIZE_ORDER (1) | ||
41 | #elif defined(CONFIG_PAGE_SIZE_64KB) | ||
42 | #define THREAD_SIZE_ORDER (0) | ||
37 | #else | 43 | #else |
38 | #define THREAD_SIZE (PAGE_SIZE * 2) | 44 | #error "Unknown thread size" |
39 | #endif | 45 | #endif |
40 | #define STACK_WARN (THREAD_SIZE / 8) | 46 | |
47 | #define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER) | ||
48 | #define STACK_WARN (THREAD_SIZE >> 3) | ||
41 | 49 | ||
42 | /* | 50 | /* |
43 | * macros/functions for gaining access to the thread information structure | 51 | * macros/functions for gaining access to the thread information structure |
diff --git a/include/asm-sh/tlbflush.h b/include/asm-sh/tlbflush.h index 28c073b0fbab..455fb8da441e 100644 --- a/include/asm-sh/tlbflush.h +++ b/include/asm-sh/tlbflush.h | |||
@@ -4,7 +4,6 @@ | |||
4 | /* | 4 | /* |
5 | * TLB flushing: | 5 | * TLB flushing: |
6 | * | 6 | * |
7 | * - flush_tlb() flushes the current mm struct TLBs | ||
8 | * - flush_tlb_all() flushes all processes TLBs | 7 | * - flush_tlb_all() flushes all processes TLBs |
9 | * - flush_tlb_mm(mm) flushes the specified mm context TLB's | 8 | * - flush_tlb_mm(mm) flushes the specified mm context TLB's |
10 | * - flush_tlb_page(vma, vmaddr) flushes one page | 9 | * - flush_tlb_page(vma, vmaddr) flushes one page |
@@ -12,20 +11,45 @@ | |||
12 | * - flush_tlb_kernel_range(start, end) flushes a range of kernel pages | 11 | * - flush_tlb_kernel_range(start, end) flushes a range of kernel pages |
13 | * - flush_tlb_pgtables(mm, start, end) flushes a range of page tables | 12 | * - flush_tlb_pgtables(mm, start, end) flushes a range of page tables |
14 | */ | 13 | */ |
14 | extern void local_flush_tlb_all(void); | ||
15 | extern void local_flush_tlb_mm(struct mm_struct *mm); | ||
16 | extern void local_flush_tlb_range(struct vm_area_struct *vma, | ||
17 | unsigned long start, | ||
18 | unsigned long end); | ||
19 | extern void local_flush_tlb_page(struct vm_area_struct *vma, | ||
20 | unsigned long page); | ||
21 | extern void local_flush_tlb_kernel_range(unsigned long start, | ||
22 | unsigned long end); | ||
23 | extern void local_flush_tlb_one(unsigned long asid, unsigned long page); | ||
24 | |||
25 | #ifdef CONFIG_SMP | ||
15 | 26 | ||
16 | extern void flush_tlb(void); | ||
17 | extern void flush_tlb_all(void); | 27 | extern void flush_tlb_all(void); |
18 | extern void flush_tlb_mm(struct mm_struct *mm); | 28 | extern void flush_tlb_mm(struct mm_struct *mm); |
19 | extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, | 29 | extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, |
20 | unsigned long end); | 30 | unsigned long end); |
21 | extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long page); | 31 | extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long page); |
22 | extern void __flush_tlb_page(unsigned long asid, unsigned long page); | 32 | extern void flush_tlb_kernel_range(unsigned long start, unsigned long end); |
33 | extern void flush_tlb_one(unsigned long asid, unsigned long page); | ||
34 | |||
35 | #else | ||
36 | |||
37 | #define flush_tlb_all() local_flush_tlb_all() | ||
38 | #define flush_tlb_mm(mm) local_flush_tlb_mm(mm) | ||
39 | #define flush_tlb_page(vma, page) local_flush_tlb_page(vma, page) | ||
40 | #define flush_tlb_one(asid, page) local_flush_tlb_one(asid, page) | ||
41 | |||
42 | #define flush_tlb_range(vma, start, end) \ | ||
43 | local_flush_tlb_range(vma, start, end) | ||
44 | |||
45 | #define flush_tlb_kernel_range(start, end) \ | ||
46 | local_flush_tlb_kernel_range(start, end) | ||
47 | |||
48 | #endif /* CONFIG_SMP */ | ||
23 | 49 | ||
24 | static inline void flush_tlb_pgtables(struct mm_struct *mm, | 50 | static inline void flush_tlb_pgtables(struct mm_struct *mm, |
25 | unsigned long start, unsigned long end) | 51 | unsigned long start, unsigned long end) |
26 | { /* Nothing to do */ | 52 | { |
53 | /* Nothing to do */ | ||
27 | } | 54 | } |
28 | |||
29 | extern void flush_tlb_kernel_range(unsigned long start, unsigned long end); | ||
30 | |||
31 | #endif /* __ASM_SH_TLBFLUSH_H */ | 55 | #endif /* __ASM_SH_TLBFLUSH_H */ |
diff --git a/include/asm-sh/ubc.h b/include/asm-sh/ubc.h index 694f51f47941..ae9bbdeefbe1 100644 --- a/include/asm-sh/ubc.h +++ b/include/asm-sh/ubc.h | |||
@@ -17,7 +17,7 @@ | |||
17 | /* User Break Controller */ | 17 | /* User Break Controller */ |
18 | #if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709) || \ | 18 | #if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709) || \ |
19 | defined(CONFIG_CPU_SUBTYPE_SH7300) | 19 | defined(CONFIG_CPU_SUBTYPE_SH7300) |
20 | #define UBC_TYPE_SH7729 (cpu_data->type == CPU_SH7729) | 20 | #define UBC_TYPE_SH7729 (current_cpu_data.type == CPU_SH7729) |
21 | #else | 21 | #else |
22 | #define UBC_TYPE_SH7729 0 | 22 | #define UBC_TYPE_SH7729 0 |
23 | #endif | 23 | #endif |
diff --git a/include/asm-sh/unistd.h b/include/asm-sh/unistd.h index f982073dc6c6..17f527bfd455 100644 --- a/include/asm-sh/unistd.h +++ b/include/asm-sh/unistd.h | |||
@@ -292,22 +292,22 @@ | |||
292 | #define __NR_mq_getsetattr (__NR_mq_open+5) | 292 | #define __NR_mq_getsetattr (__NR_mq_open+5) |
293 | #define __NR_kexec_load 283 | 293 | #define __NR_kexec_load 283 |
294 | #define __NR_waitid 284 | 294 | #define __NR_waitid 284 |
295 | /* #define __NR_sys_setaltroot 285 */ | 295 | #define __NR_add_key 285 |
296 | #define __NR_add_key 286 | 296 | #define __NR_request_key 286 |
297 | #define __NR_request_key 287 | 297 | #define __NR_keyctl 287 |
298 | #define __NR_keyctl 288 | 298 | #define __NR_ioprio_set 288 |
299 | #define __NR_ioprio_set 289 | 299 | #define __NR_ioprio_get 289 |
300 | #define __NR_ioprio_get 290 | 300 | #define __NR_inotify_init 290 |
301 | #define __NR_inotify_init 291 | 301 | #define __NR_inotify_add_watch 291 |
302 | #define __NR_inotify_add_watch 292 | 302 | #define __NR_inotify_rm_watch 292 |
303 | #define __NR_inotify_rm_watch 293 | 303 | /* 293 is unused */ |
304 | #define __NR_migrate_pages 294 | 304 | #define __NR_migrate_pages 294 |
305 | #define __NR_openat 295 | 305 | #define __NR_openat 295 |
306 | #define __NR_mkdirat 296 | 306 | #define __NR_mkdirat 296 |
307 | #define __NR_mknodat 297 | 307 | #define __NR_mknodat 297 |
308 | #define __NR_fchownat 298 | 308 | #define __NR_fchownat 298 |
309 | #define __NR_futimesat 299 | 309 | #define __NR_futimesat 299 |
310 | #define __NR_newfstatat 300 | 310 | #define __NR_fstatat64 300 |
311 | #define __NR_unlinkat 301 | 311 | #define __NR_unlinkat 301 |
312 | #define __NR_renameat 302 | 312 | #define __NR_renameat 302 |
313 | #define __NR_linkat 303 | 313 | #define __NR_linkat 303 |
diff --git a/include/asm-sh/voyagergx.h b/include/asm-sh/voyagergx.h index 99b0807d1c9f..64c936b22715 100644 --- a/include/asm-sh/voyagergx.h +++ b/include/asm-sh/voyagergx.h | |||
@@ -308,6 +308,9 @@ | |||
308 | #define AC97C_READ (1 << 19) | 308 | #define AC97C_READ (1 << 19) |
309 | #define AC97C_WD_BIT (1 << 2) | 309 | #define AC97C_WD_BIT (1 << 2) |
310 | #define AC97C_INDEX_MASK 0x7f | 310 | #define AC97C_INDEX_MASK 0x7f |
311 | /* -------------------------------------------------------------------- */ | 311 | |
312 | /* arch/sh/cchips/voyagergx/consistent.c */ | ||
313 | void *voyagergx_consistent_alloc(struct device *, size_t, dma_addr_t *, gfp_t); | ||
314 | int voyagergx_consistent_free(struct device *, size_t, void *, dma_addr_t); | ||
312 | 315 | ||
313 | #endif /* _VOYAGER_GX_REG_H */ | 316 | #endif /* _VOYAGER_GX_REG_H */ |
diff --git a/include/asm-sh64/termios.h b/include/asm-sh64/termios.h index 4a9c7fb411bc..dc44e6ed3a7c 100644 --- a/include/asm-sh64/termios.h +++ b/include/asm-sh64/termios.h | |||
@@ -50,24 +50,6 @@ struct termio { | |||
50 | 50 | ||
51 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 51 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
52 | 52 | ||
53 | /* line disciplines */ | ||
54 | #define N_TTY 0 | ||
55 | #define N_SLIP 1 | ||
56 | #define N_MOUSE 2 | ||
57 | #define N_PPP 3 | ||
58 | #define N_STRIP 4 | ||
59 | #define N_AX25 5 | ||
60 | #define N_X25 6 /* X.25 async */ | ||
61 | #define N_6PACK 7 | ||
62 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
63 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
64 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
65 | #define N_IRDA 11 /* Linux IR - http://www.cs.uit.no/~dagb/irda/irda.html */ | ||
66 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
67 | #define N_HDLC 13 /* synchronous HDLC */ | ||
68 | #define N_SYNC_PPP 14 | ||
69 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
70 | |||
71 | #ifdef __KERNEL__ | 53 | #ifdef __KERNEL__ |
72 | 54 | ||
73 | /* intr=^C quit=^\ erase=del kill=^U | 55 | /* intr=^C quit=^\ erase=del kill=^U |
diff --git a/include/asm-sparc/io.h b/include/asm-sparc/io.h index cab0b851b8b1..c23e74a0eaa8 100644 --- a/include/asm-sparc/io.h +++ b/include/asm-sparc/io.h | |||
@@ -256,6 +256,35 @@ extern void iounmap(volatile void __iomem *addr); | |||
256 | #define iowrite16(val,X) writew(val,X) | 256 | #define iowrite16(val,X) writew(val,X) |
257 | #define iowrite32(val,X) writel(val,X) | 257 | #define iowrite32(val,X) writel(val,X) |
258 | 258 | ||
259 | static inline void ioread8_rep(void __iomem *port, void *buf, unsigned long count) | ||
260 | { | ||
261 | insb((unsigned long __force)port, buf, count); | ||
262 | } | ||
263 | static inline void ioread16_rep(void __iomem *port, void *buf, unsigned long count) | ||
264 | { | ||
265 | insw((unsigned long __force)port, buf, count); | ||
266 | } | ||
267 | |||
268 | static inline void ioread32_rep(void __iomem *port, void *buf, unsigned long count) | ||
269 | { | ||
270 | insl((unsigned long __force)port, buf, count); | ||
271 | } | ||
272 | |||
273 | static inline void iowrite8_rep(void __iomem *port, const void *buf, unsigned long count) | ||
274 | { | ||
275 | outsb((unsigned long __force)port, buf, count); | ||
276 | } | ||
277 | |||
278 | static inline void iowrite16_rep(void __iomem *port, const void *buf, unsigned long count) | ||
279 | { | ||
280 | outsw((unsigned long __force)port, buf, count); | ||
281 | } | ||
282 | |||
283 | static inline void iowrite32_rep(void __iomem *port, const void *buf, unsigned long count) | ||
284 | { | ||
285 | outsl((unsigned long __force)port, buf, count); | ||
286 | } | ||
287 | |||
259 | /* Create a virtual mapping cookie for an IO port range */ | 288 | /* Create a virtual mapping cookie for an IO port range */ |
260 | extern void __iomem *ioport_map(unsigned long port, unsigned int nr); | 289 | extern void __iomem *ioport_map(unsigned long port, unsigned int nr); |
261 | extern void ioport_unmap(void __iomem *); | 290 | extern void ioport_unmap(void __iomem *); |
diff --git a/include/asm-sparc/termios.h b/include/asm-sparc/termios.h index d05f83c80989..d767f206ab33 100644 --- a/include/asm-sparc/termios.h +++ b/include/asm-sparc/termios.h | |||
@@ -45,24 +45,6 @@ struct winsize { | |||
45 | unsigned short ws_ypixel; | 45 | unsigned short ws_ypixel; |
46 | }; | 46 | }; |
47 | 47 | ||
48 | /* line disciplines */ | ||
49 | #define N_TTY 0 | ||
50 | #define N_SLIP 1 | ||
51 | #define N_MOUSE 2 | ||
52 | #define N_PPP 3 | ||
53 | #define N_STRIP 4 | ||
54 | #define N_AX25 5 | ||
55 | #define N_X25 6 | ||
56 | #define N_6PACK 7 | ||
57 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
58 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
59 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
60 | #define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ | ||
61 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
62 | #define N_HDLC 13 /* synchronous HDLC */ | ||
63 | #define N_SYNC_PPP 14 /* synchronous PPP */ | ||
64 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
65 | |||
66 | #ifdef __KERNEL__ | 48 | #ifdef __KERNEL__ |
67 | #include <linux/module.h> | 49 | #include <linux/module.h> |
68 | 50 | ||
diff --git a/include/asm-sparc64/irq.h b/include/asm-sparc64/irq.h index 905e59b4a737..5d233b42fe13 100644 --- a/include/asm-sparc64/irq.h +++ b/include/asm-sparc64/irq.h | |||
@@ -46,6 +46,10 @@ extern void irq_install_pre_handler(int virt_irq, | |||
46 | #define irq_canonicalize(irq) (irq) | 46 | #define irq_canonicalize(irq) (irq) |
47 | extern unsigned int build_irq(int inofixup, unsigned long iclr, unsigned long imap); | 47 | extern unsigned int build_irq(int inofixup, unsigned long iclr, unsigned long imap); |
48 | extern unsigned int sun4v_build_irq(u32 devhandle, unsigned int devino); | 48 | extern unsigned int sun4v_build_irq(u32 devhandle, unsigned int devino); |
49 | extern unsigned int sun4v_build_msi(u32 devhandle, unsigned int *virt_irq_p, | ||
50 | unsigned int msi_devino_start, | ||
51 | unsigned int msi_devino_end); | ||
52 | extern void sun4v_destroy_msi(unsigned int virt_irq); | ||
49 | extern unsigned int sbus_build_irq(void *sbus, unsigned int ino); | 53 | extern unsigned int sbus_build_irq(void *sbus, unsigned int ino); |
50 | 54 | ||
51 | static __inline__ void set_softint(unsigned long bits) | 55 | static __inline__ void set_softint(unsigned long bits) |
diff --git a/include/asm-sparc64/pbm.h b/include/asm-sparc64/pbm.h index dcfa7629358c..7a246d8a1828 100644 --- a/include/asm-sparc64/pbm.h +++ b/include/asm-sparc64/pbm.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/pci.h> | 11 | #include <linux/pci.h> |
12 | #include <linux/ioport.h> | 12 | #include <linux/ioport.h> |
13 | #include <linux/spinlock.h> | 13 | #include <linux/spinlock.h> |
14 | #include <linux/msi.h> | ||
14 | 15 | ||
15 | #include <asm/io.h> | 16 | #include <asm/io.h> |
16 | #include <asm/page.h> | 17 | #include <asm/page.h> |
@@ -177,6 +178,24 @@ struct pci_pbm_info { | |||
177 | int is_66mhz_capable; | 178 | int is_66mhz_capable; |
178 | int all_devs_66mhz; | 179 | int all_devs_66mhz; |
179 | 180 | ||
181 | #ifdef CONFIG_PCI_MSI | ||
182 | /* MSI info. */ | ||
183 | u32 msiq_num; | ||
184 | u32 msiq_ent_count; | ||
185 | u32 msiq_first; | ||
186 | u32 msiq_first_devino; | ||
187 | u32 msi_num; | ||
188 | u32 msi_first; | ||
189 | u32 msi_data_mask; | ||
190 | u32 msix_data_width; | ||
191 | u64 msi32_start; | ||
192 | u64 msi64_start; | ||
193 | u32 msi32_len; | ||
194 | u32 msi64_len; | ||
195 | void *msi_queues; | ||
196 | unsigned long *msi_bitmap; | ||
197 | #endif /* !(CONFIG_PCI_MSI) */ | ||
198 | |||
180 | /* This PBM's streaming buffer. */ | 199 | /* This PBM's streaming buffer. */ |
181 | struct pci_strbuf stc; | 200 | struct pci_strbuf stc; |
182 | 201 | ||
@@ -213,6 +232,12 @@ struct pci_controller_info { | |||
213 | void (*base_address_update)(struct pci_dev *, int); | 232 | void (*base_address_update)(struct pci_dev *, int); |
214 | void (*resource_adjust)(struct pci_dev *, struct resource *, struct resource *); | 233 | void (*resource_adjust)(struct pci_dev *, struct resource *, struct resource *); |
215 | 234 | ||
235 | #ifdef CONFIG_PCI_MSI | ||
236 | int (*setup_msi_irq)(unsigned int *virt_irq_p, struct pci_dev *pdev, | ||
237 | struct msi_desc *entry); | ||
238 | void (*teardown_msi_irq)(unsigned int virt_irq, struct pci_dev *pdev); | ||
239 | #endif | ||
240 | |||
216 | /* Now things for the actual PCI bus probes. */ | 241 | /* Now things for the actual PCI bus probes. */ |
217 | struct pci_ops *pci_ops; | 242 | struct pci_ops *pci_ops; |
218 | unsigned int pci_first_busno; | 243 | unsigned int pci_first_busno; |
@@ -231,6 +256,9 @@ struct pcidev_cookie { | |||
231 | int num_prom_regs; | 256 | int num_prom_regs; |
232 | struct linux_prom_pci_registers prom_assignments[PROMREG_MAX]; | 257 | struct linux_prom_pci_registers prom_assignments[PROMREG_MAX]; |
233 | int num_prom_assignments; | 258 | int num_prom_assignments; |
259 | #ifdef CONFIG_PCI_MSI | ||
260 | unsigned int msi_num; | ||
261 | #endif | ||
234 | }; | 262 | }; |
235 | 263 | ||
236 | /* Currently these are the same across all PCI controllers | 264 | /* Currently these are the same across all PCI controllers |
diff --git a/include/asm-sparc64/setup.h b/include/asm-sparc64/setup.h index b356ee2cda92..5053df3cec40 100644 --- a/include/asm-sparc64/setup.h +++ b/include/asm-sparc64/setup.h | |||
@@ -5,6 +5,6 @@ | |||
5 | #ifndef _SPARC64_SETUP_H | 5 | #ifndef _SPARC64_SETUP_H |
6 | #define _SPARC64_SETUP_H | 6 | #define _SPARC64_SETUP_H |
7 | 7 | ||
8 | #define COMMAND_LINE_SIZE 256 | 8 | #define COMMAND_LINE_SIZE 2048 |
9 | 9 | ||
10 | #endif /* _SPARC64_SETUP_H */ | 10 | #endif /* _SPARC64_SETUP_H */ |
diff --git a/include/asm-sparc64/termios.h b/include/asm-sparc64/termios.h index ee26a071c677..f05d390993d5 100644 --- a/include/asm-sparc64/termios.h +++ b/include/asm-sparc64/termios.h | |||
@@ -45,24 +45,6 @@ struct winsize { | |||
45 | unsigned short ws_ypixel; | 45 | unsigned short ws_ypixel; |
46 | }; | 46 | }; |
47 | 47 | ||
48 | /* line disciplines */ | ||
49 | #define N_TTY 0 | ||
50 | #define N_SLIP 1 | ||
51 | #define N_MOUSE 2 | ||
52 | #define N_PPP 3 | ||
53 | #define N_STRIP 4 | ||
54 | #define N_AX25 5 | ||
55 | #define N_X25 6 | ||
56 | #define N_6PACK 7 | ||
57 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
58 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
59 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
60 | #define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ | ||
61 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
62 | #define N_HDLC 13 /* synchronous HDLC */ | ||
63 | #define N_SYNC_PPP 14 /* synchronous PPP */ | ||
64 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
65 | |||
66 | #ifdef __KERNEL__ | 48 | #ifdef __KERNEL__ |
67 | #include <linux/module.h> | 49 | #include <linux/module.h> |
68 | 50 | ||
diff --git a/include/asm-um/elf-ppc.h b/include/asm-um/elf-ppc.h index 99711134e477..d3b90b7ac3e9 100644 --- a/include/asm-um/elf-ppc.h +++ b/include/asm-um/elf-ppc.h | |||
@@ -11,7 +11,7 @@ extern long elf_aux_hwcap; | |||
11 | 11 | ||
12 | #define elf_check_arch(x) (1) | 12 | #define elf_check_arch(x) (1) |
13 | 13 | ||
14 | #ifdef CONFIG_64_BIT | 14 | #ifdef CONFIG_64BIT |
15 | #define ELF_CLASS ELFCLASS64 | 15 | #define ELF_CLASS ELFCLASS64 |
16 | #else | 16 | #else |
17 | #define ELF_CLASS ELFCLASS32 | 17 | #define ELF_CLASS ELFCLASS32 |
diff --git a/include/asm-um/processor-x86_64.h b/include/asm-um/processor-x86_64.h index 10609af376c0..31c2d4d685bd 100644 --- a/include/asm-um/processor-x86_64.h +++ b/include/asm-um/processor-x86_64.h | |||
@@ -13,6 +13,7 @@ | |||
13 | struct arch_thread { | 13 | struct arch_thread { |
14 | unsigned long debugregs[8]; | 14 | unsigned long debugregs[8]; |
15 | int debugregs_seq; | 15 | int debugregs_seq; |
16 | unsigned long fs; | ||
16 | struct faultinfo faultinfo; | 17 | struct faultinfo faultinfo; |
17 | }; | 18 | }; |
18 | 19 | ||
@@ -25,8 +26,9 @@ extern inline void rep_nop(void) | |||
25 | #define cpu_relax() rep_nop() | 26 | #define cpu_relax() rep_nop() |
26 | 27 | ||
27 | #define INIT_ARCH_THREAD { .debugregs = { [ 0 ... 7 ] = 0 }, \ | 28 | #define INIT_ARCH_THREAD { .debugregs = { [ 0 ... 7 ] = 0 }, \ |
28 | .debugregs_seq = 0, \ | 29 | .debugregs_seq = 0, \ |
29 | .faultinfo = { 0, 0, 0 } } | 30 | .fs = 0, \ |
31 | .faultinfo = { 0, 0, 0 } } | ||
30 | 32 | ||
31 | static inline void arch_flush_thread(struct arch_thread *thread) | 33 | static inline void arch_flush_thread(struct arch_thread *thread) |
32 | { | 34 | { |
diff --git a/include/asm-um/ptrace-x86_64.h b/include/asm-um/ptrace-x86_64.h index 03b4af4ac09a..bf61d17de3f7 100644 --- a/include/asm-um/ptrace-x86_64.h +++ b/include/asm-um/ptrace-x86_64.h | |||
@@ -81,9 +81,10 @@ static inline void arch_switch_to_tt(struct task_struct *from, | |||
81 | { | 81 | { |
82 | } | 82 | } |
83 | 83 | ||
84 | static inline void arch_switch_to_skas(struct task_struct *from, | 84 | extern void arch_switch_to_skas(struct task_struct *from, |
85 | struct task_struct *to) | 85 | struct task_struct *to); |
86 | { | 86 | |
87 | } | 87 | extern long arch_prctl_skas(struct task_struct *task, int code, |
88 | unsigned long __user *addr); | ||
88 | 89 | ||
89 | #endif | 90 | #endif |
diff --git a/include/asm-v850/termios.h b/include/asm-v850/termios.h index 79e97b59806e..c2c2b1d58776 100644 --- a/include/asm-v850/termios.h +++ b/include/asm-v850/termios.h | |||
@@ -39,24 +39,6 @@ struct termio { | |||
39 | 39 | ||
40 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 40 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
41 | 41 | ||
42 | /* line disciplines */ | ||
43 | #define N_TTY 0 | ||
44 | #define N_SLIP 1 | ||
45 | #define N_MOUSE 2 | ||
46 | #define N_PPP 3 | ||
47 | #define N_STRIP 4 | ||
48 | #define N_AX25 5 | ||
49 | #define N_X25 6 /* X.25 async */ | ||
50 | #define N_6PACK 7 | ||
51 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
52 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
53 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
54 | #define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ | ||
55 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
56 | #define N_HDLC 13 /* synchronous HDLC */ | ||
57 | #define N_SYNC_PPP 14 /* synchronous PPP */ | ||
58 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
59 | |||
60 | #ifdef __KERNEL__ | 42 | #ifdef __KERNEL__ |
61 | 43 | ||
62 | /* intr=^C quit=^\ erase=del kill=^U | 44 | /* intr=^C quit=^\ erase=del kill=^U |
diff --git a/include/asm-x86_64/bitops.h b/include/asm-x86_64/bitops.h index 8da9609070f4..d4dbbe5f7bd9 100644 --- a/include/asm-x86_64/bitops.h +++ b/include/asm-x86_64/bitops.h | |||
@@ -7,7 +7,7 @@ | |||
7 | 7 | ||
8 | #include <asm/alternative.h> | 8 | #include <asm/alternative.h> |
9 | 9 | ||
10 | #if __GNUC__ < 4 || __GNUC_MINOR__ < 1 | 10 | #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 1) |
11 | /* Technically wrong, but this avoids compilation errors on some gcc | 11 | /* Technically wrong, but this avoids compilation errors on some gcc |
12 | versions. */ | 12 | versions. */ |
13 | #define ADDR "=m" (*(volatile long *) addr) | 13 | #define ADDR "=m" (*(volatile long *) addr) |
diff --git a/include/asm-x86_64/bootsetup.h b/include/asm-x86_64/bootsetup.h index b829f7b534be..7b1c3ad155fd 100644 --- a/include/asm-x86_64/bootsetup.h +++ b/include/asm-x86_64/bootsetup.h | |||
@@ -31,7 +31,7 @@ extern char x86_boot_params[BOOT_PARAM_SIZE]; | |||
31 | #define EDD_MBR_SIG_NR (*(unsigned char *) (PARAM+EDD_MBR_SIG_NR_BUF)) | 31 | #define EDD_MBR_SIG_NR (*(unsigned char *) (PARAM+EDD_MBR_SIG_NR_BUF)) |
32 | #define EDD_MBR_SIGNATURE ((unsigned int *) (PARAM+EDD_MBR_SIG_BUF)) | 32 | #define EDD_MBR_SIGNATURE ((unsigned int *) (PARAM+EDD_MBR_SIG_BUF)) |
33 | #define EDD_BUF ((struct edd_info *) (PARAM+EDDBUF)) | 33 | #define EDD_BUF ((struct edd_info *) (PARAM+EDDBUF)) |
34 | #define COMMAND_LINE saved_command_line | 34 | #define COMMAND_LINE boot_command_line |
35 | 35 | ||
36 | #define RAMDISK_IMAGE_START_MASK 0x07FF | 36 | #define RAMDISK_IMAGE_START_MASK 0x07FF |
37 | #define RAMDISK_PROMPT_FLAG 0x8000 | 37 | #define RAMDISK_PROMPT_FLAG 0x8000 |
diff --git a/include/asm-x86_64/dma-mapping.h b/include/asm-x86_64/dma-mapping.h index 49dbab09ef2b..d2af227f06d0 100644 --- a/include/asm-x86_64/dma-mapping.h +++ b/include/asm-x86_64/dma-mapping.h | |||
@@ -66,6 +66,9 @@ static inline int dma_mapping_error(dma_addr_t dma_addr) | |||
66 | #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) | 66 | #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) |
67 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) | 67 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) |
68 | 68 | ||
69 | #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) | ||
70 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) | ||
71 | |||
69 | extern void *dma_alloc_coherent(struct device *dev, size_t size, | 72 | extern void *dma_alloc_coherent(struct device *dev, size_t size, |
70 | dma_addr_t *dma_handle, gfp_t gfp); | 73 | dma_addr_t *dma_handle, gfp_t gfp); |
71 | extern void dma_free_coherent(struct device *dev, size_t size, void *vaddr, | 74 | extern void dma_free_coherent(struct device *dev, size_t size, void *vaddr, |
diff --git a/include/asm-x86_64/e820.h b/include/asm-x86_64/e820.h index fa2086774105..6216fa3f2802 100644 --- a/include/asm-x86_64/e820.h +++ b/include/asm-x86_64/e820.h | |||
@@ -46,6 +46,7 @@ extern void e820_mark_nosave_regions(void); | |||
46 | extern void e820_print_map(char *who); | 46 | extern void e820_print_map(char *who); |
47 | extern int e820_any_mapped(unsigned long start, unsigned long end, unsigned type); | 47 | extern int e820_any_mapped(unsigned long start, unsigned long end, unsigned type); |
48 | extern int e820_all_mapped(unsigned long start, unsigned long end, unsigned type); | 48 | extern int e820_all_mapped(unsigned long start, unsigned long end, unsigned type); |
49 | extern unsigned long e820_hole_size(unsigned long start, unsigned long end); | ||
49 | 50 | ||
50 | extern void e820_setup_gap(void); | 51 | extern void e820_setup_gap(void); |
51 | extern void e820_register_active_regions(int nid, | 52 | extern void e820_register_active_regions(int nid, |
@@ -56,6 +57,7 @@ extern void finish_e820_parsing(void); | |||
56 | extern struct e820map e820; | 57 | extern struct e820map e820; |
57 | 58 | ||
58 | extern unsigned ebda_addr, ebda_size; | 59 | extern unsigned ebda_addr, ebda_size; |
60 | extern unsigned long nodemap_addr, nodemap_size; | ||
59 | #endif/*!__ASSEMBLY__*/ | 61 | #endif/*!__ASSEMBLY__*/ |
60 | 62 | ||
61 | #endif/*__E820_HEADER*/ | 63 | #endif/*__E820_HEADER*/ |
diff --git a/include/asm-x86_64/hpet.h b/include/asm-x86_64/hpet.h index b39098408b69..59a66f084611 100644 --- a/include/asm-x86_64/hpet.h +++ b/include/asm-x86_64/hpet.h | |||
@@ -56,8 +56,15 @@ | |||
56 | extern int is_hpet_enabled(void); | 56 | extern int is_hpet_enabled(void); |
57 | extern int hpet_rtc_timer_init(void); | 57 | extern int hpet_rtc_timer_init(void); |
58 | extern int apic_is_clustered_box(void); | 58 | extern int apic_is_clustered_box(void); |
59 | extern int hpet_arch_init(void); | ||
60 | extern int hpet_timer_stop_set_go(unsigned long tick); | ||
61 | extern int hpet_reenable(void); | ||
62 | extern unsigned int hpet_calibrate_tsc(void); | ||
59 | 63 | ||
60 | extern int hpet_use_timer; | 64 | extern int hpet_use_timer; |
65 | extern unsigned long hpet_address; | ||
66 | extern unsigned long hpet_period; | ||
67 | extern unsigned long hpet_tick; | ||
61 | 68 | ||
62 | #ifdef CONFIG_HPET_EMULATE_RTC | 69 | #ifdef CONFIG_HPET_EMULATE_RTC |
63 | extern int hpet_mask_rtc_irq_bit(unsigned long bit_mask); | 70 | extern int hpet_mask_rtc_irq_bit(unsigned long bit_mask); |
diff --git a/include/asm-x86_64/hw_irq.h b/include/asm-x86_64/hw_irq.h index 179cce755aa7..2e4b7a5ed1c4 100644 --- a/include/asm-x86_64/hw_irq.h +++ b/include/asm-x86_64/hw_irq.h | |||
@@ -32,9 +32,30 @@ | |||
32 | #define IA32_SYSCALL_VECTOR 0x80 | 32 | #define IA32_SYSCALL_VECTOR 0x80 |
33 | 33 | ||
34 | 34 | ||
35 | /* Reserve the lowest usable priority level 0x20 - 0x2f for triggering | ||
36 | * cleanup after irq migration. | ||
37 | */ | ||
38 | #define IRQ_MOVE_CLEANUP_VECTOR FIRST_EXTERNAL_VECTOR | ||
39 | |||
35 | /* | 40 | /* |
36 | * Vectors 0x20-0x2f are used for ISA interrupts. | 41 | * Vectors 0x20-0x2f are used for ISA interrupts. |
37 | */ | 42 | */ |
43 | #define IRQ0_VECTOR FIRST_EXTERNAL_VECTOR + 0x10 | ||
44 | #define IRQ1_VECTOR IRQ0_VECTOR + 1 | ||
45 | #define IRQ2_VECTOR IRQ0_VECTOR + 2 | ||
46 | #define IRQ3_VECTOR IRQ0_VECTOR + 3 | ||
47 | #define IRQ4_VECTOR IRQ0_VECTOR + 4 | ||
48 | #define IRQ5_VECTOR IRQ0_VECTOR + 5 | ||
49 | #define IRQ6_VECTOR IRQ0_VECTOR + 6 | ||
50 | #define IRQ7_VECTOR IRQ0_VECTOR + 7 | ||
51 | #define IRQ8_VECTOR IRQ0_VECTOR + 8 | ||
52 | #define IRQ9_VECTOR IRQ0_VECTOR + 9 | ||
53 | #define IRQ10_VECTOR IRQ0_VECTOR + 10 | ||
54 | #define IRQ11_VECTOR IRQ0_VECTOR + 11 | ||
55 | #define IRQ12_VECTOR IRQ0_VECTOR + 12 | ||
56 | #define IRQ13_VECTOR IRQ0_VECTOR + 13 | ||
57 | #define IRQ14_VECTOR IRQ0_VECTOR + 14 | ||
58 | #define IRQ15_VECTOR IRQ0_VECTOR + 15 | ||
38 | 59 | ||
39 | /* | 60 | /* |
40 | * Special IRQ vectors used by the SMP architecture, 0xf0-0xff | 61 | * Special IRQ vectors used by the SMP architecture, 0xf0-0xff |
@@ -66,10 +87,10 @@ | |||
66 | 87 | ||
67 | /* | 88 | /* |
68 | * First APIC vector available to drivers: (vectors 0x30-0xee) | 89 | * First APIC vector available to drivers: (vectors 0x30-0xee) |
69 | * we start at 0x31 to spread out vectors evenly between priority | 90 | * we start at 0x41 to spread out vectors evenly between priority |
70 | * levels. (0x80 is the syscall vector) | 91 | * levels. (0x80 is the syscall vector) |
71 | */ | 92 | */ |
72 | #define FIRST_DEVICE_VECTOR 0x31 | 93 | #define FIRST_DEVICE_VECTOR (IRQ15_VECTOR + 2) |
73 | #define FIRST_SYSTEM_VECTOR 0xef /* duplicated in irq.h */ | 94 | #define FIRST_SYSTEM_VECTOR 0xef /* duplicated in irq.h */ |
74 | 95 | ||
75 | 96 | ||
@@ -91,7 +112,7 @@ extern void enable_8259A_irq(unsigned int irq); | |||
91 | extern int i8259A_irq_pending(unsigned int irq); | 112 | extern int i8259A_irq_pending(unsigned int irq); |
92 | extern void make_8259A_irq(unsigned int irq); | 113 | extern void make_8259A_irq(unsigned int irq); |
93 | extern void init_8259A(int aeoi); | 114 | extern void init_8259A(int aeoi); |
94 | extern void FASTCALL(send_IPI_self(int vector)); | 115 | extern void send_IPI_self(int vector); |
95 | extern void init_VISWS_APIC_irqs(void); | 116 | extern void init_VISWS_APIC_irqs(void); |
96 | extern void setup_IO_APIC(void); | 117 | extern void setup_IO_APIC(void); |
97 | extern void disable_IO_APIC(void); | 118 | extern void disable_IO_APIC(void); |
diff --git a/include/asm-x86_64/io.h b/include/asm-x86_64/io.h index f5d84bb7c948..de2cd9a2303a 100644 --- a/include/asm-x86_64/io.h +++ b/include/asm-x86_64/io.h | |||
@@ -100,7 +100,7 @@ __OUTS(l) | |||
100 | 100 | ||
101 | #define IO_SPACE_LIMIT 0xffff | 101 | #define IO_SPACE_LIMIT 0xffff |
102 | 102 | ||
103 | #if defined(__KERNEL__) && __x86_64__ | 103 | #if defined(__KERNEL__) && defined(__x86_64__) |
104 | 104 | ||
105 | #include <linux/vmalloc.h> | 105 | #include <linux/vmalloc.h> |
106 | 106 | ||
diff --git a/include/asm-x86_64/io_apic.h b/include/asm-x86_64/io_apic.h index 561ecbfd4cb5..f4fb238c89f1 100644 --- a/include/asm-x86_64/io_apic.h +++ b/include/asm-x86_64/io_apic.h | |||
@@ -85,18 +85,8 @@ struct IO_APIC_route_entry { | |||
85 | mask : 1, /* 0: enabled, 1: disabled */ | 85 | mask : 1, /* 0: enabled, 1: disabled */ |
86 | __reserved_2 : 15; | 86 | __reserved_2 : 15; |
87 | 87 | ||
88 | union { struct { __u32 | 88 | __u32 __reserved_3 : 24, |
89 | __reserved_1 : 24, | 89 | dest : 8; |
90 | physical_dest : 4, | ||
91 | __reserved_2 : 4; | ||
92 | } physical; | ||
93 | |||
94 | struct { __u32 | ||
95 | __reserved_1 : 24, | ||
96 | logical_dest : 8; | ||
97 | } logical; | ||
98 | } dest; | ||
99 | |||
100 | } __attribute__ ((packed)); | 90 | } __attribute__ ((packed)); |
101 | 91 | ||
102 | /* | 92 | /* |
diff --git a/include/asm-x86_64/mce.h b/include/asm-x86_64/mce.h index 5a11146d6d9c..177e92b4019b 100644 --- a/include/asm-x86_64/mce.h +++ b/include/asm-x86_64/mce.h | |||
@@ -103,6 +103,8 @@ void mce_log_therm_throt_event(unsigned int cpu, __u64 status); | |||
103 | 103 | ||
104 | extern atomic_t mce_entry; | 104 | extern atomic_t mce_entry; |
105 | 105 | ||
106 | extern void do_machine_check(struct pt_regs *, long); | ||
107 | |||
106 | #endif | 108 | #endif |
107 | 109 | ||
108 | #endif | 110 | #endif |
diff --git a/include/asm-x86_64/mmzone.h b/include/asm-x86_64/mmzone.h index c38ebdf6f426..fb558fb1d211 100644 --- a/include/asm-x86_64/mmzone.h +++ b/include/asm-x86_64/mmzone.h | |||
@@ -11,24 +11,25 @@ | |||
11 | 11 | ||
12 | #include <asm/smp.h> | 12 | #include <asm/smp.h> |
13 | 13 | ||
14 | /* Should really switch to dynamic allocation at some point */ | ||
15 | #define NODEMAPSIZE 0x4fff | ||
16 | |||
17 | /* Simple perfect hash to map physical addresses to node numbers */ | 14 | /* Simple perfect hash to map physical addresses to node numbers */ |
18 | struct memnode { | 15 | struct memnode { |
19 | int shift; | 16 | int shift; |
20 | u8 map[NODEMAPSIZE]; | 17 | unsigned int mapsize; |
21 | } ____cacheline_aligned; | 18 | u8 *map; |
19 | u8 embedded_map[64-16]; | ||
20 | } ____cacheline_aligned; /* total size = 64 bytes */ | ||
22 | extern struct memnode memnode; | 21 | extern struct memnode memnode; |
23 | #define memnode_shift memnode.shift | 22 | #define memnode_shift memnode.shift |
24 | #define memnodemap memnode.map | 23 | #define memnodemap memnode.map |
24 | #define memnodemapsize memnode.mapsize | ||
25 | 25 | ||
26 | extern struct pglist_data *node_data[]; | 26 | extern struct pglist_data *node_data[]; |
27 | 27 | ||
28 | static inline __attribute__((pure)) int phys_to_nid(unsigned long addr) | 28 | static inline __attribute__((pure)) int phys_to_nid(unsigned long addr) |
29 | { | 29 | { |
30 | unsigned nid; | 30 | unsigned nid; |
31 | VIRTUAL_BUG_ON((addr >> memnode_shift) >= NODEMAPSIZE); | 31 | VIRTUAL_BUG_ON(!memnodemap); |
32 | VIRTUAL_BUG_ON((addr >> memnode_shift) >= memnodemapsize); | ||
32 | nid = memnodemap[addr >> memnode_shift]; | 33 | nid = memnodemap[addr >> memnode_shift]; |
33 | VIRTUAL_BUG_ON(nid >= MAX_NUMNODES || !node_data[nid]); | 34 | VIRTUAL_BUG_ON(nid >= MAX_NUMNODES || !node_data[nid]); |
34 | return nid; | 35 | return nid; |
@@ -46,5 +47,10 @@ static inline __attribute__((pure)) int phys_to_nid(unsigned long addr) | |||
46 | extern int pfn_valid(unsigned long pfn); | 47 | extern int pfn_valid(unsigned long pfn); |
47 | #endif | 48 | #endif |
48 | 49 | ||
50 | #ifdef CONFIG_NUMA_EMU | ||
51 | #define FAKE_NODE_MIN_SIZE (64*1024*1024) | ||
52 | #define FAKE_NODE_MIN_HASH_MASK (~(FAKE_NODE_MIN_SIZE - 1ul)) | ||
53 | #endif | ||
54 | |||
49 | #endif | 55 | #endif |
50 | #endif | 56 | #endif |
diff --git a/include/asm-x86_64/mutex.h b/include/asm-x86_64/mutex.h index 16396b1de3e4..6c2949a3c677 100644 --- a/include/asm-x86_64/mutex.h +++ b/include/asm-x86_64/mutex.h | |||
@@ -21,7 +21,7 @@ do { \ | |||
21 | unsigned long dummy; \ | 21 | unsigned long dummy; \ |
22 | \ | 22 | \ |
23 | typecheck(atomic_t *, v); \ | 23 | typecheck(atomic_t *, v); \ |
24 | typecheck_fn(fastcall void (*)(atomic_t *), fail_fn); \ | 24 | typecheck_fn(void (*)(atomic_t *), fail_fn); \ |
25 | \ | 25 | \ |
26 | __asm__ __volatile__( \ | 26 | __asm__ __volatile__( \ |
27 | LOCK_PREFIX " decl (%%rdi) \n" \ | 27 | LOCK_PREFIX " decl (%%rdi) \n" \ |
@@ -47,7 +47,7 @@ do { \ | |||
47 | */ | 47 | */ |
48 | static inline int | 48 | static inline int |
49 | __mutex_fastpath_lock_retval(atomic_t *count, | 49 | __mutex_fastpath_lock_retval(atomic_t *count, |
50 | int fastcall (*fail_fn)(atomic_t *)) | 50 | int (*fail_fn)(atomic_t *)) |
51 | { | 51 | { |
52 | if (unlikely(atomic_dec_return(count) < 0)) | 52 | if (unlikely(atomic_dec_return(count) < 0)) |
53 | return fail_fn(count); | 53 | return fail_fn(count); |
@@ -67,7 +67,7 @@ do { \ | |||
67 | unsigned long dummy; \ | 67 | unsigned long dummy; \ |
68 | \ | 68 | \ |
69 | typecheck(atomic_t *, v); \ | 69 | typecheck(atomic_t *, v); \ |
70 | typecheck_fn(fastcall void (*)(atomic_t *), fail_fn); \ | 70 | typecheck_fn(void (*)(atomic_t *), fail_fn); \ |
71 | \ | 71 | \ |
72 | __asm__ __volatile__( \ | 72 | __asm__ __volatile__( \ |
73 | LOCK_PREFIX " incl (%%rdi) \n" \ | 73 | LOCK_PREFIX " incl (%%rdi) \n" \ |
diff --git a/include/asm-x86_64/pgalloc.h b/include/asm-x86_64/pgalloc.h index 43d4c333a8b1..4e28b6060a5e 100644 --- a/include/asm-x86_64/pgalloc.h +++ b/include/asm-x86_64/pgalloc.h | |||
@@ -18,11 +18,6 @@ static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, struct page *p | |||
18 | set_pmd(pmd, __pmd(_PAGE_TABLE | (page_to_pfn(pte) << PAGE_SHIFT))); | 18 | set_pmd(pmd, __pmd(_PAGE_TABLE | (page_to_pfn(pte) << PAGE_SHIFT))); |
19 | } | 19 | } |
20 | 20 | ||
21 | static inline pmd_t *get_pmd(void) | ||
22 | { | ||
23 | return (pmd_t *)get_zeroed_page(GFP_KERNEL); | ||
24 | } | ||
25 | |||
26 | static inline void pmd_free(pmd_t *pmd) | 21 | static inline void pmd_free(pmd_t *pmd) |
27 | { | 22 | { |
28 | BUG_ON((unsigned long)pmd & (PAGE_SIZE-1)); | 23 | BUG_ON((unsigned long)pmd & (PAGE_SIZE-1)); |
diff --git a/include/asm-x86_64/pgtable.h b/include/asm-x86_64/pgtable.h index 59901c690a0d..730bd6028416 100644 --- a/include/asm-x86_64/pgtable.h +++ b/include/asm-x86_64/pgtable.h | |||
@@ -359,15 +359,6 @@ static inline int pmd_large(pmd_t pte) { | |||
359 | #define mk_pte(page, pgprot) pfn_pte(page_to_pfn(page), (pgprot)) | 359 | #define mk_pte(page, pgprot) pfn_pte(page_to_pfn(page), (pgprot)) |
360 | #define mk_pte_huge(entry) (pte_val(entry) |= _PAGE_PRESENT | _PAGE_PSE) | 360 | #define mk_pte_huge(entry) (pte_val(entry) |= _PAGE_PRESENT | _PAGE_PSE) |
361 | 361 | ||
362 | /* physical address -> PTE */ | ||
363 | static inline pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot) | ||
364 | { | ||
365 | pte_t pte; | ||
366 | pte_val(pte) = physpage | pgprot_val(pgprot); | ||
367 | pte_val(pte) &= __supported_pte_mask; | ||
368 | return pte; | ||
369 | } | ||
370 | |||
371 | /* Change flags of a PTE */ | 362 | /* Change flags of a PTE */ |
372 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | 363 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) |
373 | { | 364 | { |
diff --git a/include/asm-x86_64/proto.h b/include/asm-x86_64/proto.h index a6d2ff5c69b7..f54f3abf93ce 100644 --- a/include/asm-x86_64/proto.h +++ b/include/asm-x86_64/proto.h | |||
@@ -45,11 +45,7 @@ extern u32 pmtmr_ioport; | |||
45 | #else | 45 | #else |
46 | #define pmtmr_ioport 0 | 46 | #define pmtmr_ioport 0 |
47 | #endif | 47 | #endif |
48 | extern unsigned long long monotonic_base; | ||
49 | extern int sysctl_vsyscall; | ||
50 | extern int nohpet; | 48 | extern int nohpet; |
51 | extern unsigned long vxtime_hz; | ||
52 | extern void time_init_gtod(void); | ||
53 | 49 | ||
54 | extern void early_printk(const char *fmt, ...) __attribute__((format(printf,1,2))); | 50 | extern void early_printk(const char *fmt, ...) __attribute__((format(printf,1,2))); |
55 | 51 | ||
@@ -91,8 +87,6 @@ extern void check_efer(void); | |||
91 | 87 | ||
92 | extern int unhandled_signal(struct task_struct *tsk, int sig); | 88 | extern int unhandled_signal(struct task_struct *tsk, int sig); |
93 | 89 | ||
94 | extern int unsynchronized_tsc(void); | ||
95 | |||
96 | extern void select_idle_routine(const struct cpuinfo_x86 *c); | 90 | extern void select_idle_routine(const struct cpuinfo_x86 *c); |
97 | 91 | ||
98 | extern unsigned long table_start, table_end; | 92 | extern unsigned long table_start, table_end; |
diff --git a/include/asm-x86_64/setup.h b/include/asm-x86_64/setup.h index 985d4e3c79da..eaeff73d6c10 100644 --- a/include/asm-x86_64/setup.h +++ b/include/asm-x86_64/setup.h | |||
@@ -1,6 +1,6 @@ | |||
1 | #ifndef _x8664_SETUP_H | 1 | #ifndef _x8664_SETUP_H |
2 | #define _x8664_SETUP_H | 2 | #define _x8664_SETUP_H |
3 | 3 | ||
4 | #define COMMAND_LINE_SIZE 256 | 4 | #define COMMAND_LINE_SIZE 2048 |
5 | 5 | ||
6 | #endif | 6 | #endif |
diff --git a/include/asm-x86_64/termios.h b/include/asm-x86_64/termios.h index 443b225537f0..35ee59b78329 100644 --- a/include/asm-x86_64/termios.h +++ b/include/asm-x86_64/termios.h | |||
@@ -39,24 +39,6 @@ struct termio { | |||
39 | 39 | ||
40 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 40 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
41 | 41 | ||
42 | /* line disciplines */ | ||
43 | #define N_TTY 0 | ||
44 | #define N_SLIP 1 | ||
45 | #define N_MOUSE 2 | ||
46 | #define N_PPP 3 | ||
47 | #define N_STRIP 4 | ||
48 | #define N_AX25 5 | ||
49 | #define N_X25 6 /* X.25 async */ | ||
50 | #define N_6PACK 7 | ||
51 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
52 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
53 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
54 | #define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ | ||
55 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
56 | #define N_HDLC 13 /* synchronous HDLC */ | ||
57 | #define N_SYNC_PPP 14 /* synchronous PPP */ | ||
58 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
59 | |||
60 | #ifdef __KERNEL__ | 42 | #ifdef __KERNEL__ |
61 | 43 | ||
62 | /* intr=^C quit=^\ erase=del kill=^U | 44 | /* intr=^C quit=^\ erase=del kill=^U |
diff --git a/include/asm-x86_64/timex.h b/include/asm-x86_64/timex.h index b9e5320b7625..8c6808a3fba4 100644 --- a/include/asm-x86_64/timex.h +++ b/include/asm-x86_64/timex.h | |||
@@ -12,38 +12,21 @@ | |||
12 | #include <asm/hpet.h> | 12 | #include <asm/hpet.h> |
13 | #include <asm/system.h> | 13 | #include <asm/system.h> |
14 | #include <asm/processor.h> | 14 | #include <asm/processor.h> |
15 | #include <asm/tsc.h> | ||
15 | #include <linux/compiler.h> | 16 | #include <linux/compiler.h> |
16 | 17 | ||
17 | #define CLOCK_TICK_RATE PIT_TICK_RATE /* Underlying HZ */ | 18 | #define CLOCK_TICK_RATE PIT_TICK_RATE /* Underlying HZ */ |
18 | 19 | ||
19 | typedef unsigned long long cycles_t; | ||
20 | |||
21 | static inline cycles_t get_cycles (void) | ||
22 | { | ||
23 | unsigned long long ret; | ||
24 | |||
25 | rdtscll(ret); | ||
26 | return ret; | ||
27 | } | ||
28 | |||
29 | /* Like get_cycles, but make sure the CPU is synchronized. */ | ||
30 | static __always_inline cycles_t get_cycles_sync(void) | ||
31 | { | ||
32 | unsigned long long ret; | ||
33 | unsigned eax; | ||
34 | /* Don't do an additional sync on CPUs where we know | ||
35 | RDTSC is already synchronous. */ | ||
36 | alternative_io("cpuid", ASM_NOP2, X86_FEATURE_SYNC_RDTSC, | ||
37 | "=a" (eax), "0" (1) : "ebx","ecx","edx","memory"); | ||
38 | rdtscll(ret); | ||
39 | return ret; | ||
40 | } | ||
41 | |||
42 | extern unsigned int cpu_khz; | ||
43 | |||
44 | extern int read_current_timer(unsigned long *timer_value); | 20 | extern int read_current_timer(unsigned long *timer_value); |
45 | #define ARCH_HAS_READ_CURRENT_TIMER 1 | 21 | #define ARCH_HAS_READ_CURRENT_TIMER 1 |
46 | 22 | ||
47 | extern struct vxtime_data vxtime; | 23 | #define USEC_PER_TICK (USEC_PER_SEC / HZ) |
24 | #define NSEC_PER_TICK (NSEC_PER_SEC / HZ) | ||
25 | #define FSEC_PER_TICK (FSEC_PER_SEC / HZ) | ||
26 | |||
27 | #define NS_SCALE 10 /* 2^10, carefully chosen */ | ||
28 | #define US_SCALE 32 /* 2^32, arbitralrily chosen */ | ||
48 | 29 | ||
30 | extern void mark_tsc_unstable(void); | ||
31 | extern void set_cyc2ns_scale(unsigned long khz); | ||
49 | #endif | 32 | #endif |
diff --git a/include/asm-x86_64/tsc.h b/include/asm-x86_64/tsc.h new file mode 100644 index 000000000000..9a0a368852c7 --- /dev/null +++ b/include/asm-x86_64/tsc.h | |||
@@ -0,0 +1,66 @@ | |||
1 | /* | ||
2 | * linux/include/asm-x86_64/tsc.h | ||
3 | * | ||
4 | * x86_64 TSC related functions | ||
5 | */ | ||
6 | #ifndef _ASM_x86_64_TSC_H | ||
7 | #define _ASM_x86_64_TSC_H | ||
8 | |||
9 | #include <asm/processor.h> | ||
10 | |||
11 | /* | ||
12 | * Standard way to access the cycle counter. | ||
13 | */ | ||
14 | typedef unsigned long long cycles_t; | ||
15 | |||
16 | extern unsigned int cpu_khz; | ||
17 | extern unsigned int tsc_khz; | ||
18 | |||
19 | static inline cycles_t get_cycles(void) | ||
20 | { | ||
21 | unsigned long long ret = 0; | ||
22 | |||
23 | #ifndef CONFIG_X86_TSC | ||
24 | if (!cpu_has_tsc) | ||
25 | return 0; | ||
26 | #endif | ||
27 | |||
28 | #if defined(CONFIG_X86_GENERIC) || defined(CONFIG_X86_TSC) | ||
29 | rdtscll(ret); | ||
30 | #endif | ||
31 | return ret; | ||
32 | } | ||
33 | |||
34 | /* Like get_cycles, but make sure the CPU is synchronized. */ | ||
35 | static __always_inline cycles_t get_cycles_sync(void) | ||
36 | { | ||
37 | unsigned long long ret; | ||
38 | #ifdef X86_FEATURE_SYNC_RDTSC | ||
39 | unsigned eax; | ||
40 | |||
41 | /* | ||
42 | * Don't do an additional sync on CPUs where we know | ||
43 | * RDTSC is already synchronous: | ||
44 | */ | ||
45 | alternative_io("cpuid", ASM_NOP2, X86_FEATURE_SYNC_RDTSC, | ||
46 | "=a" (eax), "0" (1) : "ebx","ecx","edx","memory"); | ||
47 | #else | ||
48 | sync_core(); | ||
49 | #endif | ||
50 | rdtscll(ret); | ||
51 | |||
52 | return ret; | ||
53 | } | ||
54 | |||
55 | extern void tsc_init(void); | ||
56 | extern void mark_tsc_unstable(void); | ||
57 | extern int unsynchronized_tsc(void); | ||
58 | |||
59 | /* | ||
60 | * Boot-time check whether the TSCs are synchronized across | ||
61 | * all CPUs/cores: | ||
62 | */ | ||
63 | extern void check_tsc_sync_source(int cpu); | ||
64 | extern void check_tsc_sync_target(void); | ||
65 | |||
66 | #endif | ||
diff --git a/include/asm-x86_64/uaccess.h b/include/asm-x86_64/uaccess.h index c0eac519840b..1981f70fcad1 100644 --- a/include/asm-x86_64/uaccess.h +++ b/include/asm-x86_64/uaccess.h | |||
@@ -37,11 +37,11 @@ | |||
37 | * Uhhuh, this needs 65-bit arithmetic. We have a carry.. | 37 | * Uhhuh, this needs 65-bit arithmetic. We have a carry.. |
38 | */ | 38 | */ |
39 | #define __range_not_ok(addr,size) ({ \ | 39 | #define __range_not_ok(addr,size) ({ \ |
40 | unsigned long flag,sum; \ | 40 | unsigned long flag,roksum; \ |
41 | __chk_user_ptr(addr); \ | 41 | __chk_user_ptr(addr); \ |
42 | asm("# range_ok\n\r" \ | 42 | asm("# range_ok\n\r" \ |
43 | "addq %3,%1 ; sbbq %0,%0 ; cmpq %1,%4 ; sbbq $0,%0" \ | 43 | "addq %3,%1 ; sbbq %0,%0 ; cmpq %1,%4 ; sbbq $0,%0" \ |
44 | :"=&r" (flag), "=r" (sum) \ | 44 | :"=&r" (flag), "=r" (roksum) \ |
45 | :"1" (addr),"g" ((long)(size)),"g" (current_thread_info()->addr_limit.seg)); \ | 45 | :"1" (addr),"g" ((long)(size)),"g" (current_thread_info()->addr_limit.seg)); \ |
46 | flag; }) | 46 | flag; }) |
47 | 47 | ||
@@ -367,4 +367,18 @@ __copy_to_user_inatomic(void __user *dst, const void *src, unsigned size) | |||
367 | return copy_user_generic((__force void *)dst, src, size); | 367 | return copy_user_generic((__force void *)dst, src, size); |
368 | } | 368 | } |
369 | 369 | ||
370 | #define ARCH_HAS_NOCACHE_UACCESS 1 | ||
371 | extern long __copy_user_nocache(void *dst, const void __user *src, unsigned size, int zerorest); | ||
372 | |||
373 | static inline int __copy_from_user_nocache(void *dst, const void __user *src, unsigned size) | ||
374 | { | ||
375 | might_sleep(); | ||
376 | return __copy_user_nocache(dst, (__force void *)src, size, 1); | ||
377 | } | ||
378 | |||
379 | static inline int __copy_from_user_inatomic_nocache(void *dst, const void __user *src, unsigned size) | ||
380 | { | ||
381 | return __copy_user_nocache(dst, (__force void *)src, size, 0); | ||
382 | } | ||
383 | |||
370 | #endif /* __X86_64_UACCESS_H */ | 384 | #endif /* __X86_64_UACCESS_H */ |
diff --git a/include/asm-x86_64/vsyscall.h b/include/asm-x86_64/vsyscall.h index 05cb8dd200de..82b4afe65c91 100644 --- a/include/asm-x86_64/vsyscall.h +++ b/include/asm-x86_64/vsyscall.h | |||
@@ -16,51 +16,27 @@ enum vsyscall_num { | |||
16 | #ifdef __KERNEL__ | 16 | #ifdef __KERNEL__ |
17 | #include <linux/seqlock.h> | 17 | #include <linux/seqlock.h> |
18 | 18 | ||
19 | #define __section_vxtime __attribute__ ((unused, __section__ (".vxtime"), aligned(16))) | ||
20 | #define __section_vgetcpu_mode __attribute__ ((unused, __section__ (".vgetcpu_mode"), aligned(16))) | 19 | #define __section_vgetcpu_mode __attribute__ ((unused, __section__ (".vgetcpu_mode"), aligned(16))) |
21 | #define __section_jiffies __attribute__ ((unused, __section__ (".jiffies"), aligned(16))) | 20 | #define __section_jiffies __attribute__ ((unused, __section__ (".jiffies"), aligned(16))) |
22 | #define __section_sys_tz __attribute__ ((unused, __section__ (".sys_tz"), aligned(16))) | ||
23 | #define __section_sysctl_vsyscall __attribute__ ((unused, __section__ (".sysctl_vsyscall"), aligned(16))) | ||
24 | #define __section_xtime __attribute__ ((unused, __section__ (".xtime"), aligned(16))) | ||
25 | #define __section_xtime_lock __attribute__ ((unused, __section__ (".xtime_lock"), aligned(16))) | ||
26 | 21 | ||
27 | #define VXTIME_TSC 1 | 22 | /* Definitions for CONFIG_GENERIC_TIME definitions */ |
28 | #define VXTIME_HPET 2 | 23 | #define __section_vsyscall_gtod_data __attribute__ \ |
29 | #define VXTIME_PMTMR 3 | 24 | ((unused, __section__ (".vsyscall_gtod_data"),aligned(16))) |
25 | #define __vsyscall_fn __attribute__ ((unused,__section__(".vsyscall_fn"))) | ||
30 | 26 | ||
31 | #define VGETCPU_RDTSCP 1 | 27 | #define VGETCPU_RDTSCP 1 |
32 | #define VGETCPU_LSL 2 | 28 | #define VGETCPU_LSL 2 |
33 | 29 | ||
34 | struct vxtime_data { | ||
35 | long hpet_address; /* HPET base address */ | ||
36 | int last; | ||
37 | unsigned long last_tsc; | ||
38 | long quot; | ||
39 | long tsc_quot; | ||
40 | int mode; | ||
41 | }; | ||
42 | |||
43 | #define hpet_readl(a) readl((const void __iomem *)fix_to_virt(FIX_HPET_BASE) + a) | 30 | #define hpet_readl(a) readl((const void __iomem *)fix_to_virt(FIX_HPET_BASE) + a) |
44 | #define hpet_writel(d,a) writel(d, (void __iomem *)fix_to_virt(FIX_HPET_BASE) + a) | 31 | #define hpet_writel(d,a) writel(d, (void __iomem *)fix_to_virt(FIX_HPET_BASE) + a) |
45 | 32 | ||
46 | /* vsyscall space (readonly) */ | ||
47 | extern struct vxtime_data __vxtime; | ||
48 | extern int __vgetcpu_mode; | 33 | extern int __vgetcpu_mode; |
49 | extern struct timespec __xtime; | ||
50 | extern volatile unsigned long __jiffies; | 34 | extern volatile unsigned long __jiffies; |
51 | extern struct timezone __sys_tz; | ||
52 | extern seqlock_t __xtime_lock; | ||
53 | 35 | ||
54 | /* kernel space (writeable) */ | 36 | /* kernel space (writeable) */ |
55 | extern struct vxtime_data vxtime; | ||
56 | extern int vgetcpu_mode; | 37 | extern int vgetcpu_mode; |
57 | extern struct timezone sys_tz; | 38 | extern struct timezone sys_tz; |
58 | extern int sysctl_vsyscall; | 39 | extern struct vsyscall_gtod_data_t vsyscall_gtod_data; |
59 | extern seqlock_t xtime_lock; | ||
60 | |||
61 | extern int sysctl_vsyscall; | ||
62 | |||
63 | #define ARCH_HAVE_XTIME_LOCK 1 | ||
64 | 40 | ||
65 | #endif /* __KERNEL__ */ | 41 | #endif /* __KERNEL__ */ |
66 | 42 | ||
diff --git a/include/asm-xtensa/mman.h b/include/asm-xtensa/mman.h index ba394cbb4807..9b92620c8a1e 100644 --- a/include/asm-xtensa/mman.h +++ b/include/asm-xtensa/mman.h | |||
@@ -79,7 +79,6 @@ | |||
79 | #define MADV_DOFORK 11 /* do inherit across fork */ | 79 | #define MADV_DOFORK 11 /* do inherit across fork */ |
80 | 80 | ||
81 | /* compatibility flags */ | 81 | /* compatibility flags */ |
82 | #define MAP_ANON MAP_ANONYMOUS | ||
83 | #define MAP_FILE 0 | 82 | #define MAP_FILE 0 |
84 | 83 | ||
85 | #endif /* _XTENSA_MMAN_H */ | 84 | #endif /* _XTENSA_MMAN_H */ |
diff --git a/include/asm-xtensa/termios.h b/include/asm-xtensa/termios.h index 83c6aed1d115..f14b42c8dac0 100644 --- a/include/asm-xtensa/termios.h +++ b/include/asm-xtensa/termios.h | |||
@@ -52,25 +52,6 @@ struct termio { | |||
52 | 52 | ||
53 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | 53 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ |
54 | 54 | ||
55 | /* Line disciplines */ | ||
56 | |||
57 | #define N_TTY 0 | ||
58 | #define N_SLIP 1 | ||
59 | #define N_MOUSE 2 | ||
60 | #define N_PPP 3 | ||
61 | #define N_STRIP 4 | ||
62 | #define N_AX25 5 | ||
63 | #define N_X25 6 /* X.25 async */ | ||
64 | #define N_6PACK 7 | ||
65 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
66 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
67 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
68 | #define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */ | ||
69 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */ | ||
70 | #define N_HDLC 13 /* synchronous HDLC */ | ||
71 | #define N_SYNC_PPP 14 | ||
72 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
73 | |||
74 | #ifdef __KERNEL__ | 55 | #ifdef __KERNEL__ |
75 | 56 | ||
76 | /* intr=^C quit=^\ erase=del kill=^U | 57 | /* intr=^C quit=^\ erase=del kill=^U |
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 683513e310de..e81e301a4d71 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -156,7 +156,6 @@ header-y += video_encoder.h | |||
156 | header-y += videotext.h | 156 | header-y += videotext.h |
157 | header-y += vt.h | 157 | header-y += vt.h |
158 | header-y += wireless.h | 158 | header-y += wireless.h |
159 | header-y += xattr.h | ||
160 | header-y += x25.h | 159 | header-y += x25.h |
161 | 160 | ||
162 | unifdef-y += acct.h | 161 | unifdef-y += acct.h |
@@ -324,6 +323,7 @@ unifdef-y += tty.h | |||
324 | unifdef-y += types.h | 323 | unifdef-y += types.h |
325 | unifdef-y += udf_fs_i.h | 324 | unifdef-y += udf_fs_i.h |
326 | unifdef-y += udp.h | 325 | unifdef-y += udp.h |
326 | unifdef-y += ufs_fs.h | ||
327 | unifdef-y += uinput.h | 327 | unifdef-y += uinput.h |
328 | unifdef-y += uio.h | 328 | unifdef-y += uio.h |
329 | unifdef-y += unistd.h | 329 | unifdef-y += unistd.h |
@@ -336,6 +336,7 @@ unifdef-y += wait.h | |||
336 | unifdef-y += wanrouter.h | 336 | unifdef-y += wanrouter.h |
337 | unifdef-y += watchdog.h | 337 | unifdef-y += watchdog.h |
338 | unifdef-y += wireless.h | 338 | unifdef-y += wireless.h |
339 | unifdef-y += xattr.h | ||
339 | unifdef-y += xfrm.h | 340 | unifdef-y += xfrm.h |
340 | 341 | ||
341 | objhdr-y += version.h | 342 | objhdr-y += version.h |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 815f1fb4ce21..8bcfaa4c66ae 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -75,7 +75,7 @@ enum acpi_address_range_id { | |||
75 | 75 | ||
76 | typedef int (*acpi_table_handler) (struct acpi_table_header *table); | 76 | typedef int (*acpi_table_handler) (struct acpi_table_header *table); |
77 | 77 | ||
78 | typedef int (*acpi_madt_entry_handler) (struct acpi_subtable_header *header, const unsigned long end); | 78 | typedef int (*acpi_table_entry_handler) (struct acpi_subtable_header *header, const unsigned long end); |
79 | 79 | ||
80 | char * __acpi_map_table (unsigned long phys_addr, unsigned long size); | 80 | char * __acpi_map_table (unsigned long phys_addr, unsigned long size); |
81 | unsigned long acpi_find_rsdp (void); | 81 | unsigned long acpi_find_rsdp (void); |
@@ -85,8 +85,10 @@ int acpi_numa_init (void); | |||
85 | 85 | ||
86 | int acpi_table_init (void); | 86 | int acpi_table_init (void); |
87 | int acpi_table_parse (char *id, acpi_table_handler handler); | 87 | int acpi_table_parse (char *id, acpi_table_handler handler); |
88 | int acpi_table_parse_madt (enum acpi_madt_type id, acpi_madt_entry_handler handler, unsigned int max_entries); | 88 | int __init acpi_table_parse_entries(char *id, unsigned long table_size, |
89 | int acpi_table_parse_srat (enum acpi_srat_type id, acpi_madt_entry_handler handler, unsigned int max_entries); | 89 | int entry_id, acpi_table_entry_handler handler, unsigned int max_entries); |
90 | int acpi_table_parse_madt (enum acpi_madt_type id, acpi_table_entry_handler handler, unsigned int max_entries); | ||
91 | int acpi_table_parse_srat (enum acpi_srat_type id, acpi_table_entry_handler handler, unsigned int max_entries); | ||
90 | int acpi_parse_mcfg (struct acpi_table_header *header); | 92 | int acpi_parse_mcfg (struct acpi_table_header *header); |
91 | void acpi_table_print_madt_entry (struct acpi_subtable_header *madt); | 93 | void acpi_table_print_madt_entry (struct acpi_subtable_header *madt); |
92 | void acpi_table_print_srat_entry (struct acpi_subtable_header *srat); | 94 | void acpi_table_print_srat_entry (struct acpi_subtable_header *srat); |
diff --git a/include/linux/acpi_pmtmr.h b/include/linux/acpi_pmtmr.h new file mode 100644 index 000000000000..1d0ef1ae8036 --- /dev/null +++ b/include/linux/acpi_pmtmr.h | |||
@@ -0,0 +1,38 @@ | |||
1 | #ifndef _ACPI_PMTMR_H_ | ||
2 | #define _ACPI_PMTMR_H_ | ||
3 | |||
4 | #include <linux/clocksource.h> | ||
5 | |||
6 | /* Number of PMTMR ticks expected during calibration run */ | ||
7 | #define PMTMR_TICKS_PER_SEC 3579545 | ||
8 | |||
9 | /* limit it to 24 bits */ | ||
10 | #define ACPI_PM_MASK CLOCKSOURCE_MASK(24) | ||
11 | |||
12 | /* Overrun value */ | ||
13 | #define ACPI_PM_OVRRUN (1<<24) | ||
14 | |||
15 | #ifdef CONFIG_X86_PM_TIMER | ||
16 | |||
17 | extern u32 acpi_pm_read_verified(void); | ||
18 | extern u32 pmtmr_ioport; | ||
19 | |||
20 | static inline u32 acpi_pm_read_early(void) | ||
21 | { | ||
22 | if (!pmtmr_ioport) | ||
23 | return 0; | ||
24 | /* mask the output to 24 bits */ | ||
25 | return acpi_pm_read_verified() & ACPI_PM_MASK; | ||
26 | } | ||
27 | |||
28 | #else | ||
29 | |||
30 | static inline u32 acpi_pm_read_early(void) | ||
31 | { | ||
32 | return 0; | ||
33 | } | ||
34 | |||
35 | #endif | ||
36 | |||
37 | #endif | ||
38 | |||
diff --git a/include/linux/agp_backend.h b/include/linux/agp_backend.h index a5c8bb5d80ba..abc521cfb084 100644 --- a/include/linux/agp_backend.h +++ b/include/linux/agp_backend.h | |||
@@ -87,10 +87,15 @@ struct agp_memory { | |||
87 | u32 physical; | 87 | u32 physical; |
88 | u8 is_bound; | 88 | u8 is_bound; |
89 | u8 is_flushed; | 89 | u8 is_flushed; |
90 | u8 vmalloc_flag; | ||
90 | }; | 91 | }; |
91 | 92 | ||
92 | #define AGP_NORMAL_MEMORY 0 | 93 | #define AGP_NORMAL_MEMORY 0 |
93 | 94 | ||
95 | #define AGP_USER_TYPES (1 << 16) | ||
96 | #define AGP_USER_MEMORY (AGP_USER_TYPES) | ||
97 | #define AGP_USER_CACHED_MEMORY (AGP_USER_TYPES + 1) | ||
98 | |||
94 | extern struct agp_bridge_data *agp_bridge; | 99 | extern struct agp_bridge_data *agp_bridge; |
95 | extern struct list_head agp_bridges; | 100 | extern struct list_head agp_bridges; |
96 | 101 | ||
diff --git a/include/linux/ata.h b/include/linux/ata.h index 18e401ff7eaf..272736e37990 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -352,7 +352,7 @@ static inline int ata_drive_40wire(const u16 *dev_id) | |||
352 | { | 352 | { |
353 | if (ata_id_major_version(dev_id) >= 5 && ata_id_is_sata(dev_id)) | 353 | if (ata_id_major_version(dev_id) >= 5 && ata_id_is_sata(dev_id)) |
354 | return 0; /* SATA */ | 354 | return 0; /* SATA */ |
355 | if (dev_id[93] & 0x4000) | 355 | if ((dev_id[93] & 0xE000) == 0x6000) |
356 | return 0; /* 80 wire */ | 356 | return 0; /* 80 wire */ |
357 | return 1; | 357 | return 1; |
358 | } | 358 | } |
diff --git a/include/linux/atalk.h b/include/linux/atalk.h index 75b8baca08f3..d12984ddaa9f 100644 --- a/include/linux/atalk.h +++ b/include/linux/atalk.h | |||
@@ -182,7 +182,7 @@ extern rwlock_t atalk_interfaces_lock; | |||
182 | 182 | ||
183 | extern struct atalk_route atrtr_default; | 183 | extern struct atalk_route atrtr_default; |
184 | 184 | ||
185 | extern struct file_operations atalk_seq_arp_fops; | 185 | extern const struct file_operations atalk_seq_arp_fops; |
186 | 186 | ||
187 | extern int sysctl_aarp_expiry_time; | 187 | extern int sysctl_aarp_expiry_time; |
188 | extern int sysctl_aarp_tick_time; | 188 | extern int sysctl_aarp_tick_time; |
diff --git a/include/linux/atmel_pdc.h b/include/linux/atmel_pdc.h new file mode 100644 index 000000000000..5058a31d2ce8 --- /dev/null +++ b/include/linux/atmel_pdc.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * include/linux/atmel_pdc.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Ivan Kokshaysky | ||
5 | * Copyright (C) SAN People | ||
6 | * | ||
7 | * Peripheral Data Controller (PDC) registers. | ||
8 | * Based on AT91RM9200 datasheet revision E. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or | ||
13 | * (at your option) any later version. | ||
14 | */ | ||
15 | |||
16 | #ifndef ATMEL_PDC_H | ||
17 | #define ATMEL_PDC_H | ||
18 | |||
19 | #define ATMEL_PDC_RPR 0x100 /* Receive Pointer Register */ | ||
20 | #define ATMEL_PDC_RCR 0x104 /* Receive Counter Register */ | ||
21 | #define ATMEL_PDC_TPR 0x108 /* Transmit Pointer Register */ | ||
22 | #define ATMEL_PDC_TCR 0x10c /* Transmit Counter Register */ | ||
23 | #define ATMEL_PDC_RNPR 0x110 /* Receive Next Pointer Register */ | ||
24 | #define ATMEL_PDC_RNCR 0x114 /* Receive Next Counter Register */ | ||
25 | #define ATMEL_PDC_TNPR 0x118 /* Transmit Next Pointer Register */ | ||
26 | #define ATMEL_PDC_TNCR 0x11c /* Transmit Next Counter Register */ | ||
27 | |||
28 | #define ATMEL_PDC_PTCR 0x120 /* Transfer Control Register */ | ||
29 | #define ATMEL_PDC_RXTEN (1 << 0) /* Receiver Transfer Enable */ | ||
30 | #define ATMEL_PDC_RXTDIS (1 << 1) /* Receiver Transfer Disable */ | ||
31 | #define ATMEL_PDC_TXTEN (1 << 8) /* Transmitter Transfer Enable */ | ||
32 | #define ATMEL_PDC_TXTDIS (1 << 9) /* Transmitter Transfer Disable */ | ||
33 | |||
34 | #define ATMEL_PDC_PTSR 0x124 /* Transfer Status Register */ | ||
35 | |||
36 | #endif | ||
diff --git a/include/linux/audit.h b/include/linux/audit.h index 0e07db6cc0d0..229fa012c893 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -89,6 +89,7 @@ | |||
89 | #define AUDIT_MQ_NOTIFY 1314 /* POSIX MQ notify record type */ | 89 | #define AUDIT_MQ_NOTIFY 1314 /* POSIX MQ notify record type */ |
90 | #define AUDIT_MQ_GETSETATTR 1315 /* POSIX MQ get/set attribute record type */ | 90 | #define AUDIT_MQ_GETSETATTR 1315 /* POSIX MQ get/set attribute record type */ |
91 | #define AUDIT_KERNEL_OTHER 1316 /* For use by 3rd party modules */ | 91 | #define AUDIT_KERNEL_OTHER 1316 /* For use by 3rd party modules */ |
92 | #define AUDIT_FD_PAIR 1317 /* audit record for pipe/socketpair */ | ||
92 | 93 | ||
93 | #define AUDIT_AVC 1400 /* SE Linux avc denial or grant */ | 94 | #define AUDIT_AVC 1400 /* SE Linux avc denial or grant */ |
94 | #define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */ | 95 | #define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */ |
@@ -387,6 +388,7 @@ extern int __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode | |||
387 | extern int audit_bprm(struct linux_binprm *bprm); | 388 | extern int audit_bprm(struct linux_binprm *bprm); |
388 | extern int audit_socketcall(int nargs, unsigned long *args); | 389 | extern int audit_socketcall(int nargs, unsigned long *args); |
389 | extern int audit_sockaddr(int len, void *addr); | 390 | extern int audit_sockaddr(int len, void *addr); |
391 | extern int __audit_fd_pair(int fd1, int fd2); | ||
390 | extern int audit_avc_path(struct dentry *dentry, struct vfsmount *mnt); | 392 | extern int audit_avc_path(struct dentry *dentry, struct vfsmount *mnt); |
391 | extern int audit_set_macxattr(const char *name); | 393 | extern int audit_set_macxattr(const char *name); |
392 | extern int __audit_mq_open(int oflag, mode_t mode, struct mq_attr __user *u_attr); | 394 | extern int __audit_mq_open(int oflag, mode_t mode, struct mq_attr __user *u_attr); |
@@ -401,6 +403,12 @@ static inline int audit_ipc_obj(struct kern_ipc_perm *ipcp) | |||
401 | return __audit_ipc_obj(ipcp); | 403 | return __audit_ipc_obj(ipcp); |
402 | return 0; | 404 | return 0; |
403 | } | 405 | } |
406 | static inline int audit_fd_pair(int fd1, int fd2) | ||
407 | { | ||
408 | if (unlikely(!audit_dummy_context())) | ||
409 | return __audit_fd_pair(fd1, fd2); | ||
410 | return 0; | ||
411 | } | ||
404 | static inline int audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode) | 412 | static inline int audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode) |
405 | { | 413 | { |
406 | if (unlikely(!audit_dummy_context())) | 414 | if (unlikely(!audit_dummy_context())) |
@@ -459,6 +467,7 @@ extern int audit_n_rules; | |||
459 | #define audit_ipc_set_perm(q,u,g,m) ({ 0; }) | 467 | #define audit_ipc_set_perm(q,u,g,m) ({ 0; }) |
460 | #define audit_bprm(p) ({ 0; }) | 468 | #define audit_bprm(p) ({ 0; }) |
461 | #define audit_socketcall(n,a) ({ 0; }) | 469 | #define audit_socketcall(n,a) ({ 0; }) |
470 | #define audit_fd_pair(n,a) ({ 0; }) | ||
462 | #define audit_sockaddr(len, addr) ({ 0; }) | 471 | #define audit_sockaddr(len, addr) ({ 0; }) |
463 | #define audit_avc_path(dentry, mnt) ({ 0; }) | 472 | #define audit_avc_path(dentry, mnt) ({ 0; }) |
464 | #define audit_set_macxattr(n) do { ; } while (0) | 473 | #define audit_set_macxattr(n) do { ; } while (0) |
diff --git a/include/linux/auto_fs4.h b/include/linux/auto_fs4.h index 0a6bc52ffe88..31a29541b504 100644 --- a/include/linux/auto_fs4.h +++ b/include/linux/auto_fs4.h | |||
@@ -59,6 +59,13 @@ struct autofs_packet_expire_multi { | |||
59 | char name[NAME_MAX+1]; | 59 | char name[NAME_MAX+1]; |
60 | }; | 60 | }; |
61 | 61 | ||
62 | union autofs_packet_union { | ||
63 | struct autofs_packet_hdr hdr; | ||
64 | struct autofs_packet_missing missing; | ||
65 | struct autofs_packet_expire expire; | ||
66 | struct autofs_packet_expire_multi expire_multi; | ||
67 | }; | ||
68 | |||
62 | /* autofs v5 common packet struct */ | 69 | /* autofs v5 common packet struct */ |
63 | struct autofs_v5_packet { | 70 | struct autofs_v5_packet { |
64 | struct autofs_packet_hdr hdr; | 71 | struct autofs_packet_hdr hdr; |
@@ -78,12 +85,13 @@ typedef struct autofs_v5_packet autofs_packet_expire_indirect_t; | |||
78 | typedef struct autofs_v5_packet autofs_packet_missing_direct_t; | 85 | typedef struct autofs_v5_packet autofs_packet_missing_direct_t; |
79 | typedef struct autofs_v5_packet autofs_packet_expire_direct_t; | 86 | typedef struct autofs_v5_packet autofs_packet_expire_direct_t; |
80 | 87 | ||
81 | union autofs_packet_union { | 88 | union autofs_v5_packet_union { |
82 | struct autofs_packet_hdr hdr; | 89 | struct autofs_packet_hdr hdr; |
83 | struct autofs_packet_missing missing; | ||
84 | struct autofs_packet_expire expire; | ||
85 | struct autofs_packet_expire_multi expire_multi; | ||
86 | struct autofs_v5_packet v5_packet; | 90 | struct autofs_v5_packet v5_packet; |
91 | autofs_packet_missing_indirect_t missing_indirect; | ||
92 | autofs_packet_expire_indirect_t expire_indirect; | ||
93 | autofs_packet_missing_direct_t missing_direct; | ||
94 | autofs_packet_expire_direct_t expire_direct; | ||
87 | }; | 95 | }; |
88 | 96 | ||
89 | #define AUTOFS_IOC_EXPIRE_MULTI _IOW(0x93,0x66,int) | 97 | #define AUTOFS_IOC_EXPIRE_MULTI _IOW(0x93,0x66,int) |
diff --git a/include/linux/backlight.h b/include/linux/backlight.h index a5cf1beacb44..1023ba0d6e55 100644 --- a/include/linux/backlight.h +++ b/include/linux/backlight.h | |||
@@ -9,17 +9,28 @@ | |||
9 | #define _LINUX_BACKLIGHT_H | 9 | #define _LINUX_BACKLIGHT_H |
10 | 10 | ||
11 | #include <linux/device.h> | 11 | #include <linux/device.h> |
12 | #include <linux/mutex.h> | ||
12 | #include <linux/notifier.h> | 13 | #include <linux/notifier.h> |
13 | 14 | ||
15 | /* Notes on locking: | ||
16 | * | ||
17 | * backlight_device->ops_lock is an internal backlight lock protecting the | ||
18 | * ops pointer and no code outside the core should need to touch it. | ||
19 | * | ||
20 | * Access to update_status() is serialised by the update_lock mutex since | ||
21 | * most drivers seem to need this and historically get it wrong. | ||
22 | * | ||
23 | * Most drivers don't need locking on their get_brightness() method. | ||
24 | * If yours does, you need to implement it in the driver. You can use the | ||
25 | * update_lock mutex if appropriate. | ||
26 | * | ||
27 | * Any other use of the locks below is probably wrong. | ||
28 | */ | ||
29 | |||
14 | struct backlight_device; | 30 | struct backlight_device; |
15 | struct fb_info; | 31 | struct fb_info; |
16 | 32 | ||
17 | /* This structure defines all the properties of a backlight | 33 | struct backlight_ops { |
18 | (usually attached to a LCD). */ | ||
19 | struct backlight_properties { | ||
20 | /* Owner module */ | ||
21 | struct module *owner; | ||
22 | |||
23 | /* Notify the backlight driver some property has changed */ | 34 | /* Notify the backlight driver some property has changed */ |
24 | int (*update_status)(struct backlight_device *); | 35 | int (*update_status)(struct backlight_device *); |
25 | /* Return the current backlight brightness (accounting for power, | 36 | /* Return the current backlight brightness (accounting for power, |
@@ -28,7 +39,10 @@ struct backlight_properties { | |||
28 | /* Check if given framebuffer device is the one bound to this backlight; | 39 | /* Check if given framebuffer device is the one bound to this backlight; |
29 | return 0 if not, !=0 if it is. If NULL, backlight always matches the fb. */ | 40 | return 0 if not, !=0 if it is. If NULL, backlight always matches the fb. */ |
30 | int (*check_fb)(struct fb_info *); | 41 | int (*check_fb)(struct fb_info *); |
42 | }; | ||
31 | 43 | ||
44 | /* This structure defines all the properties of a backlight */ | ||
45 | struct backlight_properties { | ||
32 | /* Current User requested brightness (0 - max_brightness) */ | 46 | /* Current User requested brightness (0 - max_brightness) */ |
33 | int brightness; | 47 | int brightness; |
34 | /* Maximal value for brightness (read-only) */ | 48 | /* Maximal value for brightness (read-only) */ |
@@ -41,20 +55,34 @@ struct backlight_properties { | |||
41 | }; | 55 | }; |
42 | 56 | ||
43 | struct backlight_device { | 57 | struct backlight_device { |
44 | /* This protects the 'props' field. If 'props' is NULL, the driver that | 58 | /* Backlight properties */ |
59 | struct backlight_properties props; | ||
60 | |||
61 | /* Serialise access to update_status method */ | ||
62 | struct mutex update_lock; | ||
63 | |||
64 | /* This protects the 'ops' field. If 'ops' is NULL, the driver that | ||
45 | registered this device has been unloaded, and if class_get_devdata() | 65 | registered this device has been unloaded, and if class_get_devdata() |
46 | points to something in the body of that driver, it is also invalid. */ | 66 | points to something in the body of that driver, it is also invalid. */ |
47 | struct semaphore sem; | 67 | struct mutex ops_lock; |
48 | /* If this is NULL, the backing module is unloaded */ | 68 | struct backlight_ops *ops; |
49 | struct backlight_properties *props; | 69 | |
50 | /* The framebuffer notifier block */ | 70 | /* The framebuffer notifier block */ |
51 | struct notifier_block fb_notif; | 71 | struct notifier_block fb_notif; |
52 | /* The class device structure */ | 72 | /* The class device structure */ |
53 | struct class_device class_dev; | 73 | struct class_device class_dev; |
54 | }; | 74 | }; |
55 | 75 | ||
76 | static inline void backlight_update_status(struct backlight_device *bd) | ||
77 | { | ||
78 | mutex_lock(&bd->update_lock); | ||
79 | if (bd->ops && bd->ops->update_status) | ||
80 | bd->ops->update_status(bd); | ||
81 | mutex_unlock(&bd->update_lock); | ||
82 | } | ||
83 | |||
56 | extern struct backlight_device *backlight_device_register(const char *name, | 84 | extern struct backlight_device *backlight_device_register(const char *name, |
57 | struct device *dev,void *devdata,struct backlight_properties *bp); | 85 | struct device *dev, void *devdata, struct backlight_ops *ops); |
58 | extern void backlight_device_unregister(struct backlight_device *bd); | 86 | extern void backlight_device_unregister(struct backlight_device *bd); |
59 | 87 | ||
60 | #define to_backlight_device(obj) container_of(obj, struct backlight_device, class_dev) | 88 | #define to_backlight_device(obj) container_of(obj, struct backlight_device, class_dev) |
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index c1e82c514443..2d956cd566ae 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h | |||
@@ -59,6 +59,7 @@ struct linux_binfmt { | |||
59 | int (*load_shlib)(struct file *); | 59 | int (*load_shlib)(struct file *); |
60 | int (*core_dump)(long signr, struct pt_regs * regs, struct file * file); | 60 | int (*core_dump)(long signr, struct pt_regs * regs, struct file * file); |
61 | unsigned long min_coredump; /* minimal dump size */ | 61 | unsigned long min_coredump; /* minimal dump size */ |
62 | int hasvdso; | ||
62 | }; | 63 | }; |
63 | 64 | ||
64 | extern int register_binfmt(struct linux_binfmt *); | 65 | extern int register_binfmt(struct linux_binfmt *); |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 36a6eacefe20..83dcd8c0e974 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -82,7 +82,6 @@ struct cfq_io_context { | |||
82 | 82 | ||
83 | unsigned long last_end_request; | 83 | unsigned long last_end_request; |
84 | sector_t last_request_pos; | 84 | sector_t last_request_pos; |
85 | unsigned long last_queue; | ||
86 | 85 | ||
87 | unsigned long ttime_total; | 86 | unsigned long ttime_total; |
88 | unsigned long ttime_samples; | 87 | unsigned long ttime_samples; |
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index 5d9fb0e94156..dd27b1c7227f 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
@@ -34,6 +34,7 @@ enum bh_state_bits { | |||
34 | BH_Write_EIO, /* I/O error on write */ | 34 | BH_Write_EIO, /* I/O error on write */ |
35 | BH_Ordered, /* ordered write */ | 35 | BH_Ordered, /* ordered write */ |
36 | BH_Eopnotsupp, /* operation not supported (barrier) */ | 36 | BH_Eopnotsupp, /* operation not supported (barrier) */ |
37 | BH_Unwritten, /* Buffer is allocated on disk but not written */ | ||
37 | 38 | ||
38 | BH_PrivateStart,/* not a state bit, but the first bit available | 39 | BH_PrivateStart,/* not a state bit, but the first bit available |
39 | * for private allocation by other entities | 40 | * for private allocation by other entities |
@@ -126,6 +127,7 @@ BUFFER_FNS(Boundary, boundary) | |||
126 | BUFFER_FNS(Write_EIO, write_io_error) | 127 | BUFFER_FNS(Write_EIO, write_io_error) |
127 | BUFFER_FNS(Ordered, ordered) | 128 | BUFFER_FNS(Ordered, ordered) |
128 | BUFFER_FNS(Eopnotsupp, eopnotsupp) | 129 | BUFFER_FNS(Eopnotsupp, eopnotsupp) |
130 | BUFFER_FNS(Unwritten, unwritten) | ||
129 | 131 | ||
130 | #define bh_offset(bh) ((unsigned long)(bh)->b_data & ~PAGE_MASK) | 132 | #define bh_offset(bh) ((unsigned long)(bh)->b_data & ~PAGE_MASK) |
131 | #define touch_buffer(bh) mark_page_accessed(bh->b_page) | 133 | #define touch_buffer(bh) mark_page_accessed(bh->b_page) |
@@ -172,12 +174,14 @@ struct super_block *freeze_bdev(struct block_device *); | |||
172 | void thaw_bdev(struct block_device *, struct super_block *); | 174 | void thaw_bdev(struct block_device *, struct super_block *); |
173 | int fsync_super(struct super_block *); | 175 | int fsync_super(struct super_block *); |
174 | int fsync_no_super(struct block_device *); | 176 | int fsync_no_super(struct block_device *); |
175 | struct buffer_head *__find_get_block(struct block_device *, sector_t, int); | 177 | struct buffer_head *__find_get_block(struct block_device *bdev, sector_t block, |
176 | struct buffer_head * __getblk(struct block_device *, sector_t, int); | 178 | unsigned size); |
179 | struct buffer_head *__getblk(struct block_device *bdev, sector_t block, | ||
180 | unsigned size); | ||
177 | void __brelse(struct buffer_head *); | 181 | void __brelse(struct buffer_head *); |
178 | void __bforget(struct buffer_head *); | 182 | void __bforget(struct buffer_head *); |
179 | void __breadahead(struct block_device *, sector_t block, int size); | 183 | void __breadahead(struct block_device *, sector_t block, unsigned int size); |
180 | struct buffer_head *__bread(struct block_device *, sector_t block, int size); | 184 | struct buffer_head *__bread(struct block_device *, sector_t block, unsigned size); |
181 | struct buffer_head *alloc_buffer_head(gfp_t gfp_flags); | 185 | struct buffer_head *alloc_buffer_head(gfp_t gfp_flags); |
182 | void free_buffer_head(struct buffer_head * bh); | 186 | void free_buffer_head(struct buffer_head * bh); |
183 | void FASTCALL(unlock_buffer(struct buffer_head *bh)); | 187 | void FASTCALL(unlock_buffer(struct buffer_head *bh)); |
diff --git a/include/linux/byteorder/Kbuild b/include/linux/byteorder/Kbuild index 56499ab9e32e..79bedddfd9ca 100644 --- a/include/linux/byteorder/Kbuild +++ b/include/linux/byteorder/Kbuild | |||
@@ -1,7 +1,5 @@ | |||
1 | header-y += big_endian.h | 1 | header-y += big_endian.h |
2 | header-y += little_endian.h | 2 | header-y += little_endian.h |
3 | header-y += pdp_endian.h | ||
4 | 3 | ||
5 | unifdef-y += generic.h | 4 | unifdef-y += generic.h |
6 | unifdef-y += swabb.h | ||
7 | unifdef-y += swab.h | 5 | unifdef-y += swab.h |
diff --git a/include/linux/byteorder/pdp_endian.h b/include/linux/byteorder/pdp_endian.h deleted file mode 100644 index 618631cbc6e3..000000000000 --- a/include/linux/byteorder/pdp_endian.h +++ /dev/null | |||
@@ -1,88 +0,0 @@ | |||
1 | #ifndef _LINUX_BYTEORDER_PDP_ENDIAN_H | ||
2 | #define _LINUX_BYTEORDER_PDP_ENDIAN_H | ||
3 | |||
4 | /* | ||
5 | * Could have been named NUXI-endian, but we use the same name as in glibc. | ||
6 | * hopefully only the PDP and its evolutions (old VAXen in compatibility mode) | ||
7 | * should ever use this braindead byteorder. | ||
8 | * This file *should* work, but has not been tested. | ||
9 | * | ||
10 | * little-endian is 1234; big-endian is 4321; nuxi/pdp-endian is 3412 | ||
11 | * | ||
12 | * I thought vaxen were NUXI-endian, but was told they were correct-endian | ||
13 | * (little-endian), though indeed there existed NUXI-endian machines | ||
14 | * (DEC PDP-11 and old VAXen in compatibility mode). | ||
15 | * This makes this file a bit useless, but as a proof-of-concept. | ||
16 | * | ||
17 | * But what does a __u64 look like: is it 34127856 or 78563412 ??? | ||
18 | * I don't dare imagine! Hence, no 64-bit byteorder support yet. | ||
19 | * Hopefully, there 64-bit pdp-endian support shouldn't ever be required. | ||
20 | * | ||
21 | */ | ||
22 | |||
23 | #ifndef __PDP_ENDIAN | ||
24 | #define __PDP_ENDIAN 3412 | ||
25 | #endif | ||
26 | #ifndef __PDP_ENDIAN_BITFIELD | ||
27 | #define __PDP_ENDIAN_BITFIELD | ||
28 | #endif | ||
29 | |||
30 | #include <linux/byteorder/swab.h> | ||
31 | #include <linux/byteorder/swabb.h> | ||
32 | |||
33 | #define __constant_htonl(x) ___constant_swahb32((x)) | ||
34 | #define __constant_ntohl(x) ___constant_swahb32((x)) | ||
35 | #define __constant_htons(x) ___constant_swab16((x)) | ||
36 | #define __constant_ntohs(x) ___constant_swab16((x)) | ||
37 | #define __constant_cpu_to_le64(x) I DON'T KNOW | ||
38 | #define __constant_le64_to_cpu(x) I DON'T KNOW | ||
39 | #define __constant_cpu_to_le32(x) ___constant_swahw32((x)) | ||
40 | #define __constant_le32_to_cpu(x) ___constant_swahw32((x)) | ||
41 | #define __constant_cpu_to_le16(x) ((__u16)(x) | ||
42 | #define __constant_le16_to_cpu(x) ((__u16)(x) | ||
43 | #define __constant_cpu_to_be64(x) I DON'T KNOW | ||
44 | #define __constant_be64_to_cpu(x) I DON'T KNOW | ||
45 | #define __constant_cpu_to_be32(x) ___constant_swahb32((x)) | ||
46 | #define __constant_be32_to_cpu(x) ___constant_swahb32((x)) | ||
47 | #define __constant_cpu_to_be16(x) ___constant_swab16((x)) | ||
48 | #define __constant_be16_to_cpu(x) ___constant_swab16((x)) | ||
49 | #define __cpu_to_le64(x) I DON'T KNOW | ||
50 | #define __le64_to_cpu(x) I DON'T KNOW | ||
51 | #define __cpu_to_le32(x) ___swahw32((x)) | ||
52 | #define __le32_to_cpu(x) ___swahw32((x)) | ||
53 | #define __cpu_to_le16(x) ((__u16)(x) | ||
54 | #define __le16_to_cpu(x) ((__u16)(x) | ||
55 | #define __cpu_to_be64(x) I DON'T KNOW | ||
56 | #define __be64_to_cpu(x) I DON'T KNOW | ||
57 | #define __cpu_to_be32(x) __swahb32((x)) | ||
58 | #define __be32_to_cpu(x) __swahb32((x)) | ||
59 | #define __cpu_to_be16(x) __swab16((x)) | ||
60 | #define __be16_to_cpu(x) __swab16((x)) | ||
61 | #define __cpu_to_le64p(x) I DON'T KNOW | ||
62 | #define __le64_to_cpup(x) I DON'T KNOW | ||
63 | #define __cpu_to_le32p(x) ___swahw32p((x)) | ||
64 | #define __le32_to_cpup(x) ___swahw32p((x)) | ||
65 | #define __cpu_to_le16p(x) (*(__u16*)(x)) | ||
66 | #define __le16_to_cpup(x) (*(__u16*)(x)) | ||
67 | #define __cpu_to_be64p(x) I DON'T KNOW | ||
68 | #define __be64_to_cpup(x) I DON'T KNOW | ||
69 | #define __cpu_to_be32p(x) __swahb32p((x)) | ||
70 | #define __be32_to_cpup(x) __swahb32p((x)) | ||
71 | #define __cpu_to_be16p(x) __swab16p((x)) | ||
72 | #define __be16_to_cpup(x) __swab16p((x)) | ||
73 | #define __cpu_to_le64s(x) I DON'T KNOW | ||
74 | #define __le64_to_cpus(x) I DON'T KNOW | ||
75 | #define __cpu_to_le32s(x) ___swahw32s((x)) | ||
76 | #define __le32_to_cpus(x) ___swahw32s((x)) | ||
77 | #define __cpu_to_le16s(x) do {} while (0) | ||
78 | #define __le16_to_cpus(x) do {} while (0) | ||
79 | #define __cpu_to_be64s(x) I DON'T KNOW | ||
80 | #define __be64_to_cpus(x) I DON'T KNOW | ||
81 | #define __cpu_to_be32s(x) __swahb32s((x)) | ||
82 | #define __be32_to_cpus(x) __swahb32s((x)) | ||
83 | #define __cpu_to_be16s(x) __swab16s((x)) | ||
84 | #define __be16_to_cpus(x) __swab16s((x)) | ||
85 | |||
86 | #include <linux/byteorder/generic.h> | ||
87 | |||
88 | #endif /* _LINUX_BYTEORDER_PDP_ENDIAN_H */ | ||
diff --git a/include/linux/byteorder/swabb.h b/include/linux/byteorder/swabb.h index ae5e5f914bf4..8c780c7d779e 100644 --- a/include/linux/byteorder/swabb.h +++ b/include/linux/byteorder/swabb.h | |||
@@ -25,6 +25,8 @@ | |||
25 | * | 25 | * |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <linux/types.h> | ||
29 | |||
28 | #define ___swahw32(x) \ | 30 | #define ___swahw32(x) \ |
29 | ({ \ | 31 | ({ \ |
30 | __u32 __x = (x); \ | 32 | __u32 __x = (x); \ |
@@ -77,19 +79,14 @@ | |||
77 | /* | 79 | /* |
78 | * Allow constant folding | 80 | * Allow constant folding |
79 | */ | 81 | */ |
80 | #if defined(__GNUC__) && defined(__OPTIMIZE__) | 82 | #define __swahw32(x) \ |
81 | # define __swahw32(x) \ | ||
82 | (__builtin_constant_p((__u32)(x)) ? \ | 83 | (__builtin_constant_p((__u32)(x)) ? \ |
83 | ___swahw32((x)) : \ | 84 | ___swahw32((x)) : \ |
84 | __fswahw32((x))) | 85 | __fswahw32((x))) |
85 | # define __swahb32(x) \ | 86 | #define __swahb32(x) \ |
86 | (__builtin_constant_p((__u32)(x)) ? \ | 87 | (__builtin_constant_p((__u32)(x)) ? \ |
87 | ___swahb32((x)) : \ | 88 | ___swahb32((x)) : \ |
88 | __fswahb32((x))) | 89 | __fswahb32((x))) |
89 | #else | ||
90 | # define __swahw32(x) __fswahw32(x) | ||
91 | # define __swahb32(x) __fswahb32(x) | ||
92 | #endif /* OPTIMIZE */ | ||
93 | 90 | ||
94 | 91 | ||
95 | static inline __u32 __fswahw32(__u32 x) | 92 | static inline __u32 __fswahw32(__u32 x) |
@@ -128,13 +125,11 @@ static inline void __swahb32s(__u32 *addr) | |||
128 | */ | 125 | */ |
129 | #endif /* __BYTEORDER_HAS_U64__ */ | 126 | #endif /* __BYTEORDER_HAS_U64__ */ |
130 | 127 | ||
131 | #if defined(__KERNEL__) | ||
132 | #define swahw32 __swahw32 | 128 | #define swahw32 __swahw32 |
133 | #define swahb32 __swahb32 | 129 | #define swahb32 __swahb32 |
134 | #define swahw32p __swahw32p | 130 | #define swahw32p __swahw32p |
135 | #define swahb32p __swahb32p | 131 | #define swahb32p __swahb32p |
136 | #define swahw32s __swahw32s | 132 | #define swahw32s __swahw32s |
137 | #define swahb32s __swahb32s | 133 | #define swahb32s __swahb32s |
138 | #endif | ||
139 | 134 | ||
140 | #endif /* _LINUX_BYTEORDER_SWABB_H */ | 135 | #endif /* _LINUX_BYTEORDER_SWABB_H */ |
diff --git a/include/linux/cdrom.h b/include/linux/cdrom.h index bbbe7b4da0bb..f50f04bdbc16 100644 --- a/include/linux/cdrom.h +++ b/include/linux/cdrom.h | |||
@@ -939,7 +939,7 @@ struct cdrom_device_info { | |||
939 | int speed; /* maximum speed for reading data */ | 939 | int speed; /* maximum speed for reading data */ |
940 | int capacity; /* number of discs in jukebox */ | 940 | int capacity; /* number of discs in jukebox */ |
941 | /* device-related storage */ | 941 | /* device-related storage */ |
942 | int options : 30; /* options flags */ | 942 | unsigned int options : 30; /* options flags */ |
943 | unsigned mc_flags : 2; /* media change buffer flags */ | 943 | unsigned mc_flags : 2; /* media change buffer flags */ |
944 | int use_count; /* number of times device opened */ | 944 | int use_count; /* number of times device opened */ |
945 | char name[20]; /* name of the device type */ | 945 | char name[20]; /* name of the device type */ |
diff --git a/include/linux/cfag12864b.h b/include/linux/cfag12864b.h new file mode 100644 index 000000000000..1605dd8aa646 --- /dev/null +++ b/include/linux/cfag12864b.h | |||
@@ -0,0 +1,82 @@ | |||
1 | /* | ||
2 | * Filename: cfag12864b.h | ||
3 | * Version: 0.1.0 | ||
4 | * Description: cfag12864b LCD driver header | ||
5 | * License: GPLv2 | ||
6 | * | ||
7 | * Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com> | ||
8 | * Date: 2006-10-12 | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, | ||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | * GNU General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
22 | * | ||
23 | */ | ||
24 | |||
25 | #ifndef _CFAG12864B_H_ | ||
26 | #define _CFAG12864B_H_ | ||
27 | |||
28 | #define CFAG12864B_WIDTH (128) | ||
29 | #define CFAG12864B_HEIGHT (64) | ||
30 | #define CFAG12864B_CONTROLLERS (2) | ||
31 | #define CFAG12864B_PAGES (8) | ||
32 | #define CFAG12864B_ADDRESSES (64) | ||
33 | #define CFAG12864B_SIZE ((CFAG12864B_CONTROLLERS) * \ | ||
34 | (CFAG12864B_PAGES) * \ | ||
35 | (CFAG12864B_ADDRESSES)) | ||
36 | |||
37 | /* | ||
38 | * The driver will blit this buffer to the LCD | ||
39 | * | ||
40 | * Its size is CFAG12864B_SIZE. | ||
41 | */ | ||
42 | extern unsigned char * cfag12864b_buffer; | ||
43 | |||
44 | /* | ||
45 | * Get the refresh rate of the LCD | ||
46 | * | ||
47 | * Returns the refresh rate (hertzs). | ||
48 | */ | ||
49 | extern unsigned int cfag12864b_getrate(void); | ||
50 | |||
51 | /* | ||
52 | * Enable refreshing | ||
53 | * | ||
54 | * Returns 0 if successful (anyone was using it), | ||
55 | * or != 0 if failed (someone is using it). | ||
56 | */ | ||
57 | extern unsigned char cfag12864b_enable(void); | ||
58 | |||
59 | /* | ||
60 | * Disable refreshing | ||
61 | * | ||
62 | * You should call this only when you finish using the LCD. | ||
63 | */ | ||
64 | extern void cfag12864b_disable(void); | ||
65 | |||
66 | /* | ||
67 | * Is enabled refreshing? (is anyone using the module?) | ||
68 | * | ||
69 | * Returns 0 if refreshing is not enabled (anyone is using it), | ||
70 | * or != 0 if refreshing is enabled (someone is using it). | ||
71 | * | ||
72 | * Useful for buffer read-only modules. | ||
73 | */ | ||
74 | extern unsigned char cfag12864b_isenabled(void); | ||
75 | |||
76 | /* | ||
77 | * Is the module inited? | ||
78 | */ | ||
79 | extern unsigned char cfag12864b_isinited(void); | ||
80 | |||
81 | #endif /* _CFAG12864B_H_ */ | ||
82 | |||
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h new file mode 100644 index 000000000000..4ea7e7bcfafe --- /dev/null +++ b/include/linux/clockchips.h | |||
@@ -0,0 +1,142 @@ | |||
1 | /* linux/include/linux/clockchips.h | ||
2 | * | ||
3 | * This file contains the structure definitions for clockchips. | ||
4 | * | ||
5 | * If you are not a clockchip, or the time of day code, you should | ||
6 | * not be including this file! | ||
7 | */ | ||
8 | #ifndef _LINUX_CLOCKCHIPS_H | ||
9 | #define _LINUX_CLOCKCHIPS_H | ||
10 | |||
11 | #ifdef CONFIG_GENERIC_CLOCKEVENTS | ||
12 | |||
13 | #include <linux/clocksource.h> | ||
14 | #include <linux/cpumask.h> | ||
15 | #include <linux/ktime.h> | ||
16 | #include <linux/notifier.h> | ||
17 | |||
18 | struct clock_event_device; | ||
19 | |||
20 | /* Clock event mode commands */ | ||
21 | enum clock_event_mode { | ||
22 | CLOCK_EVT_MODE_UNUSED = 0, | ||
23 | CLOCK_EVT_MODE_SHUTDOWN, | ||
24 | CLOCK_EVT_MODE_PERIODIC, | ||
25 | CLOCK_EVT_MODE_ONESHOT, | ||
26 | }; | ||
27 | |||
28 | /* Clock event notification values */ | ||
29 | enum clock_event_nofitiers { | ||
30 | CLOCK_EVT_NOTIFY_ADD, | ||
31 | CLOCK_EVT_NOTIFY_BROADCAST_ON, | ||
32 | CLOCK_EVT_NOTIFY_BROADCAST_OFF, | ||
33 | CLOCK_EVT_NOTIFY_BROADCAST_ENTER, | ||
34 | CLOCK_EVT_NOTIFY_BROADCAST_EXIT, | ||
35 | CLOCK_EVT_NOTIFY_SUSPEND, | ||
36 | CLOCK_EVT_NOTIFY_RESUME, | ||
37 | CLOCK_EVT_NOTIFY_CPU_DEAD, | ||
38 | }; | ||
39 | |||
40 | /* | ||
41 | * Clock event features | ||
42 | */ | ||
43 | #define CLOCK_EVT_FEAT_PERIODIC 0x000001 | ||
44 | #define CLOCK_EVT_FEAT_ONESHOT 0x000002 | ||
45 | /* | ||
46 | * x86(64) specific misfeatures: | ||
47 | * | ||
48 | * - Clockevent source stops in C3 State and needs broadcast support. | ||
49 | * - Local APIC timer is used as a dummy device. | ||
50 | */ | ||
51 | #define CLOCK_EVT_FEAT_C3STOP 0x000004 | ||
52 | #define CLOCK_EVT_FEAT_DUMMY 0x000008 | ||
53 | |||
54 | /** | ||
55 | * struct clock_event_device - clock event device descriptor | ||
56 | * @name: ptr to clock event name | ||
57 | * @hints: usage hints | ||
58 | * @max_delta_ns: maximum delta value in ns | ||
59 | * @min_delta_ns: minimum delta value in ns | ||
60 | * @mult: nanosecond to cycles multiplier | ||
61 | * @shift: nanoseconds to cycles divisor (power of two) | ||
62 | * @rating: variable to rate clock event devices | ||
63 | * @irq: irq number (only for non cpu local devices) | ||
64 | * @cpumask: cpumask to indicate for which cpus this device works | ||
65 | * @set_next_event: set next event | ||
66 | * @set_mode: set mode function | ||
67 | * @evthandler: Assigned by the framework to be called by the low | ||
68 | * level handler of the event source | ||
69 | * @broadcast: function to broadcast events | ||
70 | * @list: list head for the management code | ||
71 | * @mode: operating mode assigned by the management code | ||
72 | * @next_event: local storage for the next event in oneshot mode | ||
73 | */ | ||
74 | struct clock_event_device { | ||
75 | const char *name; | ||
76 | unsigned int features; | ||
77 | unsigned long max_delta_ns; | ||
78 | unsigned long min_delta_ns; | ||
79 | unsigned long mult; | ||
80 | int shift; | ||
81 | int rating; | ||
82 | int irq; | ||
83 | cpumask_t cpumask; | ||
84 | int (*set_next_event)(unsigned long evt, | ||
85 | struct clock_event_device *); | ||
86 | void (*set_mode)(enum clock_event_mode mode, | ||
87 | struct clock_event_device *); | ||
88 | void (*event_handler)(struct clock_event_device *); | ||
89 | void (*broadcast)(cpumask_t mask); | ||
90 | struct list_head list; | ||
91 | enum clock_event_mode mode; | ||
92 | ktime_t next_event; | ||
93 | }; | ||
94 | |||
95 | /* | ||
96 | * Calculate a multiplication factor for scaled math, which is used to convert | ||
97 | * nanoseconds based values to clock ticks: | ||
98 | * | ||
99 | * clock_ticks = (nanoseconds * factor) >> shift. | ||
100 | * | ||
101 | * div_sc is the rearranged equation to calculate a factor from a given clock | ||
102 | * ticks / nanoseconds ratio: | ||
103 | * | ||
104 | * factor = (clock_ticks << shift) / nanoseconds | ||
105 | */ | ||
106 | static inline unsigned long div_sc(unsigned long ticks, unsigned long nsec, | ||
107 | int shift) | ||
108 | { | ||
109 | uint64_t tmp = ((uint64_t)ticks) << shift; | ||
110 | |||
111 | do_div(tmp, nsec); | ||
112 | return (unsigned long) tmp; | ||
113 | } | ||
114 | |||
115 | /* Clock event layer functions */ | ||
116 | extern unsigned long clockevent_delta2ns(unsigned long latch, | ||
117 | struct clock_event_device *evt); | ||
118 | extern void clockevents_register_device(struct clock_event_device *dev); | ||
119 | |||
120 | extern void clockevents_exchange_device(struct clock_event_device *old, | ||
121 | struct clock_event_device *new); | ||
122 | extern | ||
123 | struct clock_event_device *clockevents_request_device(unsigned int features, | ||
124 | cpumask_t cpumask); | ||
125 | extern void clockevents_release_device(struct clock_event_device *dev); | ||
126 | extern void clockevents_set_mode(struct clock_event_device *dev, | ||
127 | enum clock_event_mode mode); | ||
128 | extern int clockevents_register_notifier(struct notifier_block *nb); | ||
129 | extern void clockevents_unregister_notifier(struct notifier_block *nb); | ||
130 | extern int clockevents_program_event(struct clock_event_device *dev, | ||
131 | ktime_t expires, ktime_t now); | ||
132 | |||
133 | extern void clockevents_notify(unsigned long reason, void *arg); | ||
134 | |||
135 | #else | ||
136 | |||
137 | static inline void clockevents_resume_events(void) { } | ||
138 | #define clockevents_notify(reason, arg) do { } while (0) | ||
139 | |||
140 | #endif | ||
141 | |||
142 | #endif | ||
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index 1622d23a8dc3..daa4940cc0f1 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h | |||
@@ -12,11 +12,13 @@ | |||
12 | #include <linux/timex.h> | 12 | #include <linux/timex.h> |
13 | #include <linux/time.h> | 13 | #include <linux/time.h> |
14 | #include <linux/list.h> | 14 | #include <linux/list.h> |
15 | #include <linux/timer.h> | ||
15 | #include <asm/div64.h> | 16 | #include <asm/div64.h> |
16 | #include <asm/io.h> | 17 | #include <asm/io.h> |
17 | 18 | ||
18 | /* clocksource cycle base type */ | 19 | /* clocksource cycle base type */ |
19 | typedef u64 cycle_t; | 20 | typedef u64 cycle_t; |
21 | struct clocksource; | ||
20 | 22 | ||
21 | /** | 23 | /** |
22 | * struct clocksource - hardware abstraction for a free running counter | 24 | * struct clocksource - hardware abstraction for a free running counter |
@@ -44,8 +46,8 @@ typedef u64 cycle_t; | |||
44 | * subtraction of non 64 bit counters | 46 | * subtraction of non 64 bit counters |
45 | * @mult: cycle to nanosecond multiplier | 47 | * @mult: cycle to nanosecond multiplier |
46 | * @shift: cycle to nanosecond divisor (power of two) | 48 | * @shift: cycle to nanosecond divisor (power of two) |
47 | * @update_callback: called when safe to alter clocksource values | 49 | * @flags: flags describing special properties |
48 | * @is_continuous: defines if clocksource is free-running. | 50 | * @vread: vsyscall based read |
49 | * @cycle_interval: Used internally by timekeeping core, please ignore. | 51 | * @cycle_interval: Used internally by timekeeping core, please ignore. |
50 | * @xtime_interval: Used internally by timekeeping core, please ignore. | 52 | * @xtime_interval: Used internally by timekeeping core, please ignore. |
51 | */ | 53 | */ |
@@ -57,15 +59,30 @@ struct clocksource { | |||
57 | cycle_t mask; | 59 | cycle_t mask; |
58 | u32 mult; | 60 | u32 mult; |
59 | u32 shift; | 61 | u32 shift; |
60 | int (*update_callback)(void); | 62 | unsigned long flags; |
61 | int is_continuous; | 63 | cycle_t (*vread)(void); |
62 | 64 | ||
63 | /* timekeeping specific data, ignore */ | 65 | /* timekeeping specific data, ignore */ |
64 | cycle_t cycle_last, cycle_interval; | 66 | cycle_t cycle_last, cycle_interval; |
65 | u64 xtime_nsec, xtime_interval; | 67 | u64 xtime_nsec, xtime_interval; |
66 | s64 error; | 68 | s64 error; |
69 | |||
70 | #ifdef CONFIG_CLOCKSOURCE_WATCHDOG | ||
71 | /* Watchdog related data, used by the framework */ | ||
72 | struct list_head wd_list; | ||
73 | cycle_t wd_last; | ||
74 | #endif | ||
67 | }; | 75 | }; |
68 | 76 | ||
77 | /* | ||
78 | * Clock source flags bits:: | ||
79 | */ | ||
80 | #define CLOCK_SOURCE_IS_CONTINUOUS 0x01 | ||
81 | #define CLOCK_SOURCE_MUST_VERIFY 0x02 | ||
82 | |||
83 | #define CLOCK_SOURCE_WATCHDOG 0x10 | ||
84 | #define CLOCK_SOURCE_VALID_FOR_HRES 0x20 | ||
85 | |||
69 | /* simplify initialization of mask field */ | 86 | /* simplify initialization of mask field */ |
70 | #define CLOCKSOURCE_MASK(bits) (cycle_t)(bits<64 ? ((1ULL<<bits)-1) : -1) | 87 | #define CLOCKSOURCE_MASK(bits) (cycle_t)(bits<64 ? ((1ULL<<bits)-1) : -1) |
71 | 88 | ||
@@ -178,8 +195,16 @@ static inline void clocksource_calculate_interval(struct clocksource *c, | |||
178 | 195 | ||
179 | 196 | ||
180 | /* used to install a new clocksource */ | 197 | /* used to install a new clocksource */ |
181 | int clocksource_register(struct clocksource*); | 198 | extern int clocksource_register(struct clocksource*); |
182 | void clocksource_reselect(void); | 199 | extern struct clocksource* clocksource_get_next(void); |
183 | struct clocksource* clocksource_get_next(void); | 200 | extern void clocksource_change_rating(struct clocksource *cs, int rating); |
201 | |||
202 | #ifdef CONFIG_GENERIC_TIME_VSYSCALL | ||
203 | extern void update_vsyscall(struct timespec *ts, struct clocksource *c); | ||
204 | #else | ||
205 | static inline void update_vsyscall(struct timespec *ts, struct clocksource *c) | ||
206 | { | ||
207 | } | ||
208 | #endif | ||
184 | 209 | ||
185 | #endif /* _LINUX_CLOCKSOURCE_H */ | 210 | #endif /* _LINUX_CLOCKSOURCE_H */ |
diff --git a/include/linux/coda_linux.h b/include/linux/coda_linux.h index 4c2632a8d31b..e4ac016ad272 100644 --- a/include/linux/coda_linux.h +++ b/include/linux/coda_linux.h | |||
@@ -23,9 +23,9 @@ | |||
23 | #include <linux/coda_fs_i.h> | 23 | #include <linux/coda_fs_i.h> |
24 | 24 | ||
25 | /* operations */ | 25 | /* operations */ |
26 | extern struct inode_operations coda_dir_inode_operations; | 26 | extern const struct inode_operations coda_dir_inode_operations; |
27 | extern struct inode_operations coda_file_inode_operations; | 27 | extern const struct inode_operations coda_file_inode_operations; |
28 | extern struct inode_operations coda_ioctl_inode_operations; | 28 | extern const struct inode_operations coda_ioctl_inode_operations; |
29 | 29 | ||
30 | extern const struct address_space_operations coda_file_aops; | 30 | extern const struct address_space_operations coda_file_aops; |
31 | extern const struct address_space_operations coda_symlink_aops; | 31 | extern const struct address_space_operations coda_symlink_aops; |
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index 6e1c44a935d4..9008eabb9c3d 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h | |||
@@ -27,6 +27,13 @@ | |||
27 | #define __inline__ __inline__ __attribute__((always_inline)) | 27 | #define __inline__ __inline__ __attribute__((always_inline)) |
28 | #define __inline __inline __attribute__((always_inline)) | 28 | #define __inline __inline __attribute__((always_inline)) |
29 | #define __deprecated __attribute__((deprecated)) | 29 | #define __deprecated __attribute__((deprecated)) |
30 | #define __packed __attribute__((packed)) | ||
31 | #define __weak __attribute__((weak)) | ||
32 | #define __naked __attribute__((naked)) | ||
33 | #define __noreturn __attribute__((noreturn)) | ||
34 | #define __pure __attribute__((pure)) | ||
35 | #define __aligned(x) __attribute__((aligned(x))) | ||
36 | #define __printf(a,b) __attribute__((format(printf,a,b))) | ||
30 | #define noinline __attribute__((noinline)) | 37 | #define noinline __attribute__((noinline)) |
31 | #define __attribute_pure__ __attribute__((pure)) | 38 | #define __attribute_pure__ __attribute__((pure)) |
32 | #define __attribute_const__ __attribute__((__const__)) | 39 | #define __attribute_const__ __attribute__((__const__)) |
diff --git a/include/linux/console.h b/include/linux/console.h index 7d0420274de0..de25ee3b7919 100644 --- a/include/linux/console.h +++ b/include/linux/console.h | |||
@@ -21,6 +21,7 @@ struct vc_data; | |||
21 | struct console_font_op; | 21 | struct console_font_op; |
22 | struct console_font; | 22 | struct console_font; |
23 | struct module; | 23 | struct module; |
24 | struct tty_struct; | ||
24 | 25 | ||
25 | /* | 26 | /* |
26 | * this is what the terminal answers to a ESC-Z or csi0c query. | 27 | * this is what the terminal answers to a ESC-Z or csi0c query. |
@@ -132,6 +133,9 @@ static inline void resume_console(void) {} | |||
132 | int mda_console_init(void); | 133 | int mda_console_init(void); |
133 | void prom_con_init(void); | 134 | void prom_con_init(void); |
134 | 135 | ||
136 | void vcs_make_sysfs(struct tty_struct *tty); | ||
137 | void vcs_remove_sysfs(struct tty_struct *tty); | ||
138 | |||
135 | /* Some debug stub to catch some of the obvious races in the VT code */ | 139 | /* Some debug stub to catch some of the obvious races in the VT code */ |
136 | #if 1 | 140 | #if 1 |
137 | #define WARN_CONSOLE_UNLOCKED() WARN_ON(!is_console_locked() && !oops_in_progress) | 141 | #define WARN_CONSOLE_UNLOCKED() WARN_ON(!is_console_locked() && !oops_in_progress) |
diff --git a/include/linux/console_struct.h b/include/linux/console_struct.h index ed6c0fee1ac7..a86162b26c0d 100644 --- a/include/linux/console_struct.h +++ b/include/linux/console_struct.h | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/wait.h> | 12 | #include <linux/wait.h> |
13 | #include <linux/vt.h> | 13 | #include <linux/vt.h> |
14 | #include <linux/workqueue.h> | ||
14 | 15 | ||
15 | struct vt_struct; | 16 | struct vt_struct; |
16 | 17 | ||
@@ -103,6 +104,7 @@ struct vc_data { | |||
103 | 104 | ||
104 | struct vc { | 105 | struct vc { |
105 | struct vc_data *d; | 106 | struct vc_data *d; |
107 | struct work_struct SAK_work; | ||
106 | 108 | ||
107 | /* might add scrmem, vt_struct, kbd at some time, | 109 | /* might add scrmem, vt_struct, kbd at some time, |
108 | to have everything in one place - the disadvantage | 110 | to have everything in one place - the disadvantage |
@@ -110,6 +112,7 @@ struct vc { | |||
110 | }; | 112 | }; |
111 | 113 | ||
112 | extern struct vc vc_cons [MAX_NR_CONSOLES]; | 114 | extern struct vc vc_cons [MAX_NR_CONSOLES]; |
115 | extern void vc_SAK(struct work_struct *work); | ||
113 | 116 | ||
114 | #define CUR_DEF 0 | 117 | #define CUR_DEF 0 |
115 | #define CUR_NONE 1 | 118 | #define CUR_NONE 1 |
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index bfb520212d71..769ddc6df492 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
@@ -49,10 +49,20 @@ struct notifier_block; | |||
49 | 49 | ||
50 | #ifdef CONFIG_SMP | 50 | #ifdef CONFIG_SMP |
51 | /* Need to know about CPUs going up/down? */ | 51 | /* Need to know about CPUs going up/down? */ |
52 | extern int register_cpu_notifier(struct notifier_block *nb); | ||
53 | #ifdef CONFIG_HOTPLUG_CPU | 52 | #ifdef CONFIG_HOTPLUG_CPU |
53 | extern int register_cpu_notifier(struct notifier_block *nb); | ||
54 | extern void unregister_cpu_notifier(struct notifier_block *nb); | 54 | extern void unregister_cpu_notifier(struct notifier_block *nb); |
55 | #else | 55 | #else |
56 | |||
57 | #ifndef MODULE | ||
58 | extern int register_cpu_notifier(struct notifier_block *nb); | ||
59 | #else | ||
60 | static inline int register_cpu_notifier(struct notifier_block *nb) | ||
61 | { | ||
62 | return 0; | ||
63 | } | ||
64 | #endif | ||
65 | |||
56 | static inline void unregister_cpu_notifier(struct notifier_block *nb) | 66 | static inline void unregister_cpu_notifier(struct notifier_block *nb) |
57 | { | 67 | { |
58 | } | 68 | } |
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index d0e8c8b0e34d..23f55140ccd5 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
@@ -398,11 +398,11 @@ extern cpumask_t cpu_present_map; | |||
398 | #endif | 398 | #endif |
399 | 399 | ||
400 | #ifdef CONFIG_SMP | 400 | #ifdef CONFIG_SMP |
401 | int highest_possible_processor_id(void); | 401 | extern int nr_cpu_ids; |
402 | #define any_online_cpu(mask) __any_online_cpu(&(mask)) | 402 | #define any_online_cpu(mask) __any_online_cpu(&(mask)) |
403 | int __any_online_cpu(const cpumask_t *mask); | 403 | int __any_online_cpu(const cpumask_t *mask); |
404 | #else | 404 | #else |
405 | #define highest_possible_processor_id() 0 | 405 | #define nr_cpu_ids 1 |
406 | #define any_online_cpu(mask) 0 | 406 | #define any_online_cpu(mask) 0 |
407 | #endif | 407 | #endif |
408 | 408 | ||
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index fd404416f31c..826b15e914e2 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h | |||
@@ -55,7 +55,7 @@ extern int cpuset_excl_nodes_overlap(const struct task_struct *p); | |||
55 | extern int cpuset_memory_pressure_enabled; | 55 | extern int cpuset_memory_pressure_enabled; |
56 | extern void __cpuset_memory_pressure_bump(void); | 56 | extern void __cpuset_memory_pressure_bump(void); |
57 | 57 | ||
58 | extern struct file_operations proc_cpuset_operations; | 58 | extern const struct file_operations proc_cpuset_operations; |
59 | extern char *cpuset_task_status_allowed(struct task_struct *task, char *buffer); | 59 | extern char *cpuset_task_status_allowed(struct task_struct *task, char *buffer); |
60 | 60 | ||
61 | extern void cpuset_lock(void); | 61 | extern void cpuset_lock(void); |
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h index 047567d34ca7..9fa0983d1aa8 100644 --- a/include/linux/debugfs.h +++ b/include/linux/debugfs.h | |||
@@ -33,6 +33,9 @@ struct dentry *debugfs_create_file(const char *name, mode_t mode, | |||
33 | 33 | ||
34 | struct dentry *debugfs_create_dir(const char *name, struct dentry *parent); | 34 | struct dentry *debugfs_create_dir(const char *name, struct dentry *parent); |
35 | 35 | ||
36 | struct dentry *debugfs_create_symlink(const char *name, struct dentry *parent, | ||
37 | const char *dest); | ||
38 | |||
36 | void debugfs_remove(struct dentry *dentry); | 39 | void debugfs_remove(struct dentry *dentry); |
37 | 40 | ||
38 | struct dentry *debugfs_create_u8(const char *name, mode_t mode, | 41 | struct dentry *debugfs_create_u8(const char *name, mode_t mode, |
@@ -70,6 +73,13 @@ static inline struct dentry *debugfs_create_dir(const char *name, | |||
70 | return ERR_PTR(-ENODEV); | 73 | return ERR_PTR(-ENODEV); |
71 | } | 74 | } |
72 | 75 | ||
76 | static inline struct dentry *debugfs_create_symlink(const char *name, | ||
77 | struct dentry *parent, | ||
78 | const char *dest) | ||
79 | { | ||
80 | return ERR_PTR(-ENODEV); | ||
81 | } | ||
82 | |||
73 | static inline void debugfs_remove(struct dentry *dentry) | 83 | static inline void debugfs_remove(struct dentry *dentry) |
74 | { } | 84 | { } |
75 | 85 | ||
diff --git a/include/linux/device.h b/include/linux/device.h index 26e4692f2d1a..39a3199a826d 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -2,6 +2,7 @@ | |||
2 | * device.h - generic, centralized driver model | 2 | * device.h - generic, centralized driver model |
3 | * | 3 | * |
4 | * Copyright (c) 2001-2003 Patrick Mochel <mochel@osdl.org> | 4 | * Copyright (c) 2001-2003 Patrick Mochel <mochel@osdl.org> |
5 | * Copyright (c) 2004-2007 Greg Kroah-Hartman <gregkh@suse.de> | ||
5 | * | 6 | * |
6 | * This file is released under the GPLv2 | 7 | * This file is released under the GPLv2 |
7 | * | 8 | * |
@@ -101,7 +102,7 @@ extern int bus_unregister_notifier(struct bus_type *bus, | |||
101 | #define BUS_NOTIFY_UNBIND_DRIVER 0x00000004 /* driver about to be | 102 | #define BUS_NOTIFY_UNBIND_DRIVER 0x00000004 /* driver about to be |
102 | unbound */ | 103 | unbound */ |
103 | 104 | ||
104 | /* driverfs interface for exporting bus attributes */ | 105 | /* sysfs interface for exporting bus attributes */ |
105 | 106 | ||
106 | struct bus_attribute { | 107 | struct bus_attribute { |
107 | struct attribute attr; | 108 | struct attribute attr; |
@@ -146,7 +147,7 @@ extern void put_driver(struct device_driver * drv); | |||
146 | extern struct device_driver *driver_find(const char *name, struct bus_type *bus); | 147 | extern struct device_driver *driver_find(const char *name, struct bus_type *bus); |
147 | extern int driver_probe_done(void); | 148 | extern int driver_probe_done(void); |
148 | 149 | ||
149 | /* driverfs interface for exporting driver attributes */ | 150 | /* sysfs interface for exporting driver attributes */ |
150 | 151 | ||
151 | struct driver_attribute { | 152 | struct driver_attribute { |
152 | struct attribute attr; | 153 | struct attribute attr; |
@@ -293,8 +294,6 @@ extern void class_device_initialize(struct class_device *); | |||
293 | extern int __must_check class_device_add(struct class_device *); | 294 | extern int __must_check class_device_add(struct class_device *); |
294 | extern void class_device_del(struct class_device *); | 295 | extern void class_device_del(struct class_device *); |
295 | 296 | ||
296 | extern int class_device_rename(struct class_device *, char *); | ||
297 | |||
298 | extern struct class_device * class_device_get(struct class_device *); | 297 | extern struct class_device * class_device_get(struct class_device *); |
299 | extern void class_device_put(struct class_device *); | 298 | extern void class_device_put(struct class_device *); |
300 | 299 | ||
diff --git a/include/linux/dn.h b/include/linux/dn.h index 10b6a6fd5837..02bba040fcfb 100644 --- a/include/linux/dn.h +++ b/include/linux/dn.h | |||
@@ -113,7 +113,7 @@ struct accessdata_dn | |||
113 | * DECnet logical link information structure | 113 | * DECnet logical link information structure |
114 | */ | 114 | */ |
115 | struct linkinfo_dn { | 115 | struct linkinfo_dn { |
116 | __le16 idn_segsize; /* Segment size for link */ | 116 | __u16 idn_segsize; /* Segment size for link */ |
117 | __u8 idn_linkstate; /* Logical link state */ | 117 | __u8 idn_linkstate; /* Logical link state */ |
118 | }; | 118 | }; |
119 | 119 | ||
diff --git a/include/linux/efs_fs.h b/include/linux/efs_fs.h index 278ef4495819..dfed8009ebff 100644 --- a/include/linux/efs_fs.h +++ b/include/linux/efs_fs.h | |||
@@ -36,7 +36,7 @@ static inline struct efs_sb_info *SUPER_INFO(struct super_block *sb) | |||
36 | 36 | ||
37 | struct statfs; | 37 | struct statfs; |
38 | 38 | ||
39 | extern struct inode_operations efs_dir_inode_operations; | 39 | extern const struct inode_operations efs_dir_inode_operations; |
40 | extern const struct file_operations efs_dir_operations; | 40 | extern const struct file_operations efs_dir_operations; |
41 | extern const struct address_space_operations efs_symlink_aops; | 41 | extern const struct address_space_operations efs_symlink_aops; |
42 | 42 | ||
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index 11cca1bdc0c7..4eb18ac510ae 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h | |||
@@ -868,16 +868,16 @@ do { \ | |||
868 | extern const struct file_operations ext3_dir_operations; | 868 | extern const struct file_operations ext3_dir_operations; |
869 | 869 | ||
870 | /* file.c */ | 870 | /* file.c */ |
871 | extern struct inode_operations ext3_file_inode_operations; | 871 | extern const struct inode_operations ext3_file_inode_operations; |
872 | extern const struct file_operations ext3_file_operations; | 872 | extern const struct file_operations ext3_file_operations; |
873 | 873 | ||
874 | /* namei.c */ | 874 | /* namei.c */ |
875 | extern struct inode_operations ext3_dir_inode_operations; | 875 | extern const struct inode_operations ext3_dir_inode_operations; |
876 | extern struct inode_operations ext3_special_inode_operations; | 876 | extern const struct inode_operations ext3_special_inode_operations; |
877 | 877 | ||
878 | /* symlink.c */ | 878 | /* symlink.c */ |
879 | extern struct inode_operations ext3_symlink_inode_operations; | 879 | extern const struct inode_operations ext3_symlink_inode_operations; |
880 | extern struct inode_operations ext3_fast_symlink_inode_operations; | 880 | extern const struct inode_operations ext3_fast_symlink_inode_operations; |
881 | 881 | ||
882 | 882 | ||
883 | #endif /* __KERNEL__ */ | 883 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/ext4_fs.h b/include/linux/ext4_fs.h index 498503ee613d..54c576d414c3 100644 --- a/include/linux/ext4_fs.h +++ b/include/linux/ext4_fs.h | |||
@@ -955,16 +955,16 @@ do { \ | |||
955 | extern const struct file_operations ext4_dir_operations; | 955 | extern const struct file_operations ext4_dir_operations; |
956 | 956 | ||
957 | /* file.c */ | 957 | /* file.c */ |
958 | extern struct inode_operations ext4_file_inode_operations; | 958 | extern const struct inode_operations ext4_file_inode_operations; |
959 | extern const struct file_operations ext4_file_operations; | 959 | extern const struct file_operations ext4_file_operations; |
960 | 960 | ||
961 | /* namei.c */ | 961 | /* namei.c */ |
962 | extern struct inode_operations ext4_dir_inode_operations; | 962 | extern const struct inode_operations ext4_dir_inode_operations; |
963 | extern struct inode_operations ext4_special_inode_operations; | 963 | extern const struct inode_operations ext4_special_inode_operations; |
964 | 964 | ||
965 | /* symlink.c */ | 965 | /* symlink.c */ |
966 | extern struct inode_operations ext4_symlink_inode_operations; | 966 | extern const struct inode_operations ext4_symlink_inode_operations; |
967 | extern struct inode_operations ext4_fast_symlink_inode_operations; | 967 | extern const struct inode_operations ext4_fast_symlink_inode_operations; |
968 | 968 | ||
969 | /* extents.c */ | 969 | /* extents.c */ |
970 | extern int ext4_ext_tree_init(handle_t *handle, struct inode *); | 970 | extern int ext4_ext_tree_init(handle_t *handle, struct inode *); |
diff --git a/include/linux/ext4_fs_extents.h b/include/linux/ext4_fs_extents.h index a41cc24568ca..7eb1d73fc5d1 100644 --- a/include/linux/ext4_fs_extents.h +++ b/include/linux/ext4_fs_extents.h | |||
@@ -22,12 +22,12 @@ | |||
22 | #include <linux/ext4_fs.h> | 22 | #include <linux/ext4_fs.h> |
23 | 23 | ||
24 | /* | 24 | /* |
25 | * With AGRESSIVE_TEST defined, the capacity of index/leaf blocks | 25 | * With AGGRESSIVE_TEST defined, the capacity of index/leaf blocks |
26 | * becomes very small, so index split, in-depth growing and | 26 | * becomes very small, so index split, in-depth growing and |
27 | * other hard changes happen much more often. | 27 | * other hard changes happen much more often. |
28 | * This is for debug purposes only. | 28 | * This is for debug purposes only. |
29 | */ | 29 | */ |
30 | #define AGRESSIVE_TEST_ | 30 | #define AGGRESSIVE_TEST_ |
31 | 31 | ||
32 | /* | 32 | /* |
33 | * With EXTENTS_STATS defined, the number of blocks and extents | 33 | * With EXTENTS_STATS defined, the number of blocks and extents |
diff --git a/include/linux/fb.h b/include/linux/fb.h index 64177ec9a019..be913ec87169 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -49,6 +49,13 @@ | |||
49 | #define FB_AUX_TEXT_S3_MMIO 2 /* S3 MMIO fasttext */ | 49 | #define FB_AUX_TEXT_S3_MMIO 2 /* S3 MMIO fasttext */ |
50 | #define FB_AUX_TEXT_MGA_STEP16 3 /* MGA Millenium I: text, attr, 14 reserved bytes */ | 50 | #define FB_AUX_TEXT_MGA_STEP16 3 /* MGA Millenium I: text, attr, 14 reserved bytes */ |
51 | #define FB_AUX_TEXT_MGA_STEP8 4 /* other MGAs: text, attr, 6 reserved bytes */ | 51 | #define FB_AUX_TEXT_MGA_STEP8 4 /* other MGAs: text, attr, 6 reserved bytes */ |
52 | #define FB_AUX_TEXT_SVGA_GROUP 8 /* 8-15: SVGA tileblit compatible modes */ | ||
53 | #define FB_AUX_TEXT_SVGA_MASK 7 /* lower three bits says step */ | ||
54 | #define FB_AUX_TEXT_SVGA_STEP2 8 /* SVGA text mode: text, attr */ | ||
55 | #define FB_AUX_TEXT_SVGA_STEP4 9 /* SVGA text mode: text, attr, 2 reserved bytes */ | ||
56 | #define FB_AUX_TEXT_SVGA_STEP8 10 /* SVGA text mode: text, attr, 6 reserved bytes */ | ||
57 | #define FB_AUX_TEXT_SVGA_STEP16 11 /* SVGA text mode: text, attr, 14 reserved bytes */ | ||
58 | #define FB_AUX_TEXT_SVGA_LAST 15 /* reserved up to 15 */ | ||
52 | 59 | ||
53 | #define FB_AUX_VGA_PLANES_VGA4 0 /* 16 color planes (EGA/VGA) */ | 60 | #define FB_AUX_VGA_PLANES_VGA4 0 /* 16 color planes (EGA/VGA) */ |
54 | #define FB_AUX_VGA_PLANES_CFB4 1 /* CFB4 in planes (VGA) */ | 61 | #define FB_AUX_VGA_PLANES_CFB4 1 /* CFB4 in planes (VGA) */ |
@@ -509,13 +516,15 @@ struct fb_cursor_user { | |||
509 | #define FB_EVENT_GET_CONSOLE_MAP 0x07 | 516 | #define FB_EVENT_GET_CONSOLE_MAP 0x07 |
510 | /* CONSOLE-SPECIFIC: set console to framebuffer mapping */ | 517 | /* CONSOLE-SPECIFIC: set console to framebuffer mapping */ |
511 | #define FB_EVENT_SET_CONSOLE_MAP 0x08 | 518 | #define FB_EVENT_SET_CONSOLE_MAP 0x08 |
512 | /* A display blank is requested */ | 519 | /* A hardware display blank change occured */ |
513 | #define FB_EVENT_BLANK 0x09 | 520 | #define FB_EVENT_BLANK 0x09 |
514 | /* Private modelist is to be replaced */ | 521 | /* Private modelist is to be replaced */ |
515 | #define FB_EVENT_NEW_MODELIST 0x0A | 522 | #define FB_EVENT_NEW_MODELIST 0x0A |
516 | /* The resolution of the passed in fb_info about to change and | 523 | /* The resolution of the passed in fb_info about to change and |
517 | all vc's should be changed */ | 524 | all vc's should be changed */ |
518 | #define FB_EVENT_MODE_CHANGE_ALL 0x0B | 525 | #define FB_EVENT_MODE_CHANGE_ALL 0x0B |
526 | /* A software display blank change occured */ | ||
527 | #define FB_EVENT_CONBLANK 0x0C | ||
519 | 528 | ||
520 | struct fb_event { | 529 | struct fb_event { |
521 | struct fb_info *info; | 530 | struct fb_info *info; |
@@ -760,16 +769,13 @@ struct fb_info { | |||
760 | struct fb_videomode *mode; /* current mode */ | 769 | struct fb_videomode *mode; /* current mode */ |
761 | 770 | ||
762 | #ifdef CONFIG_FB_BACKLIGHT | 771 | #ifdef CONFIG_FB_BACKLIGHT |
763 | /* Lock ordering: | ||
764 | * bl_mutex (protects bl_dev and bl_curve) | ||
765 | * bl_dev->sem (backlight class) | ||
766 | */ | ||
767 | struct mutex bl_mutex; | ||
768 | |||
769 | /* assigned backlight device */ | 772 | /* assigned backlight device */ |
773 | /* set before framebuffer registration, | ||
774 | remove after unregister */ | ||
770 | struct backlight_device *bl_dev; | 775 | struct backlight_device *bl_dev; |
771 | 776 | ||
772 | /* Backlight level curve */ | 777 | /* Backlight level curve */ |
778 | struct mutex bl_curve_mutex; | ||
773 | u8 bl_curve[FB_BACKLIGHT_LEVELS]; | 779 | u8 bl_curve[FB_BACKLIGHT_LEVELS]; |
774 | #endif | 780 | #endif |
775 | 781 | ||
@@ -945,25 +951,26 @@ extern unsigned char *fb_ddc_read(struct i2c_adapter *adapter); | |||
945 | /* drivers/video/modedb.c */ | 951 | /* drivers/video/modedb.c */ |
946 | #define VESA_MODEDB_SIZE 34 | 952 | #define VESA_MODEDB_SIZE 34 |
947 | extern void fb_var_to_videomode(struct fb_videomode *mode, | 953 | extern void fb_var_to_videomode(struct fb_videomode *mode, |
948 | struct fb_var_screeninfo *var); | 954 | const struct fb_var_screeninfo *var); |
949 | extern void fb_videomode_to_var(struct fb_var_screeninfo *var, | 955 | extern void fb_videomode_to_var(struct fb_var_screeninfo *var, |
950 | struct fb_videomode *mode); | 956 | const struct fb_videomode *mode); |
951 | extern int fb_mode_is_equal(struct fb_videomode *mode1, | 957 | extern int fb_mode_is_equal(const struct fb_videomode *mode1, |
952 | struct fb_videomode *mode2); | 958 | const struct fb_videomode *mode2); |
953 | extern int fb_add_videomode(struct fb_videomode *mode, struct list_head *head); | 959 | extern int fb_add_videomode(const struct fb_videomode *mode, |
954 | extern void fb_delete_videomode(struct fb_videomode *mode, | 960 | struct list_head *head); |
961 | extern void fb_delete_videomode(const struct fb_videomode *mode, | ||
955 | struct list_head *head); | 962 | struct list_head *head); |
956 | extern struct fb_videomode *fb_match_mode(struct fb_var_screeninfo *var, | 963 | extern const struct fb_videomode *fb_match_mode(const struct fb_var_screeninfo *var, |
957 | struct list_head *head); | 964 | struct list_head *head); |
958 | extern struct fb_videomode *fb_find_best_mode(struct fb_var_screeninfo *var, | 965 | extern const struct fb_videomode *fb_find_best_mode(const struct fb_var_screeninfo *var, |
959 | struct list_head *head); | 966 | struct list_head *head); |
960 | extern struct fb_videomode *fb_find_nearest_mode(struct fb_videomode *mode, | 967 | extern const struct fb_videomode *fb_find_nearest_mode(const struct fb_videomode *mode, |
961 | struct list_head *head); | 968 | struct list_head *head); |
962 | extern void fb_destroy_modelist(struct list_head *head); | 969 | extern void fb_destroy_modelist(struct list_head *head); |
963 | extern void fb_videomode_to_modelist(struct fb_videomode *modedb, int num, | 970 | extern void fb_videomode_to_modelist(const struct fb_videomode *modedb, int num, |
964 | struct list_head *head); | 971 | struct list_head *head); |
965 | extern struct fb_videomode *fb_find_best_display(struct fb_monspecs *specs, | 972 | extern const struct fb_videomode *fb_find_best_display(const struct fb_monspecs *specs, |
966 | struct list_head *head); | 973 | struct list_head *head); |
967 | 974 | ||
968 | /* drivers/video/fbcmap.c */ | 975 | /* drivers/video/fbcmap.c */ |
969 | extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp); | 976 | extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp); |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 1410e5330c8d..86ec3f4a7da6 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -169,6 +169,7 @@ extern int dir_notify_enable; | |||
169 | #define IS_DIRSYNC(inode) (__IS_FLG(inode, MS_SYNCHRONOUS|MS_DIRSYNC) || \ | 169 | #define IS_DIRSYNC(inode) (__IS_FLG(inode, MS_SYNCHRONOUS|MS_DIRSYNC) || \ |
170 | ((inode)->i_flags & (S_SYNC|S_DIRSYNC))) | 170 | ((inode)->i_flags & (S_SYNC|S_DIRSYNC))) |
171 | #define IS_MANDLOCK(inode) __IS_FLG(inode, MS_MANDLOCK) | 171 | #define IS_MANDLOCK(inode) __IS_FLG(inode, MS_MANDLOCK) |
172 | #define IS_NOATIME(inode) __IS_FLG(inode, MS_RDONLY|MS_NOATIME) | ||
172 | 173 | ||
173 | #define IS_NOQUOTA(inode) ((inode)->i_flags & S_NOQUOTA) | 174 | #define IS_NOQUOTA(inode) ((inode)->i_flags & S_NOQUOTA) |
174 | #define IS_APPEND(inode) ((inode)->i_flags & S_APPEND) | 175 | #define IS_APPEND(inode) ((inode)->i_flags & S_APPEND) |
@@ -550,7 +551,7 @@ struct inode { | |||
550 | spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */ | 551 | spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */ |
551 | struct mutex i_mutex; | 552 | struct mutex i_mutex; |
552 | struct rw_semaphore i_alloc_sem; | 553 | struct rw_semaphore i_alloc_sem; |
553 | struct inode_operations *i_op; | 554 | const struct inode_operations *i_op; |
554 | const struct file_operations *i_fop; /* former ->i_op->default_file_ops */ | 555 | const struct file_operations *i_fop; /* former ->i_op->default_file_ops */ |
555 | struct super_block *i_sb; | 556 | struct super_block *i_sb; |
556 | struct file_lock *i_flock; | 557 | struct file_lock *i_flock; |
@@ -906,7 +907,7 @@ struct super_block { | |||
906 | unsigned char s_dirt; | 907 | unsigned char s_dirt; |
907 | unsigned long long s_maxbytes; /* Max file size */ | 908 | unsigned long long s_maxbytes; /* Max file size */ |
908 | struct file_system_type *s_type; | 909 | struct file_system_type *s_type; |
909 | struct super_operations *s_op; | 910 | const struct super_operations *s_op; |
910 | struct dquot_operations *dq_op; | 911 | struct dquot_operations *dq_op; |
911 | struct quotactl_ops *s_qcop; | 912 | struct quotactl_ops *s_qcop; |
912 | struct export_operations *s_export_op; | 913 | struct export_operations *s_export_op; |
@@ -1382,7 +1383,7 @@ struct super_block *sget(struct file_system_type *type, | |||
1382 | int (*set)(struct super_block *,void *), | 1383 | int (*set)(struct super_block *,void *), |
1383 | void *data); | 1384 | void *data); |
1384 | extern int get_sb_pseudo(struct file_system_type *, char *, | 1385 | extern int get_sb_pseudo(struct file_system_type *, char *, |
1385 | struct super_operations *ops, unsigned long, | 1386 | const struct super_operations *ops, unsigned long, |
1386 | struct vfsmount *mnt); | 1387 | struct vfsmount *mnt); |
1387 | extern int simple_set_mnt(struct vfsmount *mnt, struct super_block *sb); | 1388 | extern int simple_set_mnt(struct vfsmount *mnt, struct super_block *sb); |
1388 | int __put_super(struct super_block *sb); | 1389 | int __put_super(struct super_block *sb); |
@@ -1572,12 +1573,18 @@ extern int invalidate_partition(struct gendisk *, int); | |||
1572 | extern int invalidate_inodes(struct super_block *); | 1573 | extern int invalidate_inodes(struct super_block *); |
1573 | unsigned long invalidate_mapping_pages(struct address_space *mapping, | 1574 | unsigned long invalidate_mapping_pages(struct address_space *mapping, |
1574 | pgoff_t start, pgoff_t end); | 1575 | pgoff_t start, pgoff_t end); |
1575 | unsigned long invalidate_inode_pages(struct address_space *mapping); | 1576 | |
1577 | static inline unsigned long __deprecated | ||
1578 | invalidate_inode_pages(struct address_space *mapping) | ||
1579 | { | ||
1580 | return invalidate_mapping_pages(mapping, 0, ~0UL); | ||
1581 | } | ||
1582 | |||
1576 | static inline void invalidate_remote_inode(struct inode *inode) | 1583 | static inline void invalidate_remote_inode(struct inode *inode) |
1577 | { | 1584 | { |
1578 | if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || | 1585 | if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || |
1579 | S_ISLNK(inode->i_mode)) | 1586 | S_ISLNK(inode->i_mode)) |
1580 | invalidate_inode_pages(inode->i_mapping); | 1587 | invalidate_mapping_pages(inode->i_mapping, 0, -1); |
1581 | } | 1588 | } |
1582 | extern int invalidate_inode_pages2(struct address_space *mapping); | 1589 | extern int invalidate_inode_pages2(struct address_space *mapping); |
1583 | extern int invalidate_inode_pages2_range(struct address_space *mapping, | 1590 | extern int invalidate_inode_pages2_range(struct address_space *mapping, |
@@ -1681,7 +1688,6 @@ extern struct inode *new_inode(struct super_block *); | |||
1681 | extern int __remove_suid(struct dentry *, int); | 1688 | extern int __remove_suid(struct dentry *, int); |
1682 | extern int should_remove_suid(struct dentry *); | 1689 | extern int should_remove_suid(struct dentry *); |
1683 | extern int remove_suid(struct dentry *); | 1690 | extern int remove_suid(struct dentry *); |
1684 | extern void remove_dquot_ref(struct super_block *, int, struct list_head *); | ||
1685 | 1691 | ||
1686 | extern void __insert_inode_hash(struct inode *, unsigned long hashval); | 1692 | extern void __insert_inode_hash(struct inode *, unsigned long hashval); |
1687 | extern void remove_inode_hash(struct inode *); | 1693 | extern void remove_inode_hash(struct inode *); |
@@ -1822,7 +1828,7 @@ extern void page_put_link(struct dentry *, struct nameidata *, void *); | |||
1822 | extern int __page_symlink(struct inode *inode, const char *symname, int len, | 1828 | extern int __page_symlink(struct inode *inode, const char *symname, int len, |
1823 | gfp_t gfp_mask); | 1829 | gfp_t gfp_mask); |
1824 | extern int page_symlink(struct inode *inode, const char *symname, int len); | 1830 | extern int page_symlink(struct inode *inode, const char *symname, int len); |
1825 | extern struct inode_operations page_symlink_inode_operations; | 1831 | extern const struct inode_operations page_symlink_inode_operations; |
1826 | extern int generic_readlink(struct dentry *, char __user *, int); | 1832 | extern int generic_readlink(struct dentry *, char __user *, int); |
1827 | extern void generic_fillattr(struct inode *, struct kstat *); | 1833 | extern void generic_fillattr(struct inode *, struct kstat *); |
1828 | extern int vfs_getattr(struct vfsmount *, struct dentry *, struct kstat *); | 1834 | extern int vfs_getattr(struct vfsmount *, struct dentry *, struct kstat *); |
@@ -1867,7 +1873,7 @@ extern int simple_commit_write(struct file *file, struct page *page, | |||
1867 | extern struct dentry *simple_lookup(struct inode *, struct dentry *, struct nameidata *); | 1873 | extern struct dentry *simple_lookup(struct inode *, struct dentry *, struct nameidata *); |
1868 | extern ssize_t generic_read_dir(struct file *, char __user *, size_t, loff_t *); | 1874 | extern ssize_t generic_read_dir(struct file *, char __user *, size_t, loff_t *); |
1869 | extern const struct file_operations simple_dir_operations; | 1875 | extern const struct file_operations simple_dir_operations; |
1870 | extern struct inode_operations simple_dir_inode_operations; | 1876 | extern const struct inode_operations simple_dir_inode_operations; |
1871 | struct tree_descr { char *name; const struct file_operations *ops; int mode; }; | 1877 | struct tree_descr { char *name; const struct file_operations *ops; int mode; }; |
1872 | struct dentry *d_alloc_name(struct dentry *, const char *); | 1878 | struct dentry *d_alloc_name(struct dentry *, const char *); |
1873 | extern int simple_fill_super(struct super_block *, int, struct tree_descr *); | 1879 | extern int simple_fill_super(struct super_block *, int, struct tree_descr *); |
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 0a022b2f63fc..2c65da7cabb2 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -20,7 +20,11 @@ enum { | |||
20 | LINUX_EXTENDED_PARTITION = 0x85, | 20 | LINUX_EXTENDED_PARTITION = 0x85, |
21 | WIN98_EXTENDED_PARTITION = 0x0f, | 21 | WIN98_EXTENDED_PARTITION = 0x0f, |
22 | 22 | ||
23 | SUN_WHOLE_DISK = DOS_EXTENDED_PARTITION, | ||
24 | |||
23 | LINUX_SWAP_PARTITION = 0x82, | 25 | LINUX_SWAP_PARTITION = 0x82, |
26 | LINUX_DATA_PARTITION = 0x83, | ||
27 | LINUX_LVM_PARTITION = 0x8e, | ||
24 | LINUX_RAID_PARTITION = 0xfd, /* autodetect RAID partition */ | 28 | LINUX_RAID_PARTITION = 0xfd, /* autodetect RAID partition */ |
25 | 29 | ||
26 | SOLARIS_X86_PARTITION = LINUX_SWAP_PARTITION, | 30 | SOLARIS_X86_PARTITION = LINUX_SWAP_PARTITION, |
@@ -400,10 +404,14 @@ struct unixware_disklabel { | |||
400 | 404 | ||
401 | #ifdef __KERNEL__ | 405 | #ifdef __KERNEL__ |
402 | 406 | ||
407 | #define ADDPART_FLAG_NONE 0 | ||
408 | #define ADDPART_FLAG_RAID 1 | ||
409 | #define ADDPART_FLAG_WHOLEDISK 2 | ||
410 | |||
403 | char *disk_name (struct gendisk *hd, int part, char *buf); | 411 | char *disk_name (struct gendisk *hd, int part, char *buf); |
404 | 412 | ||
405 | extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev); | 413 | extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev); |
406 | extern void add_partition(struct gendisk *, int, sector_t, sector_t); | 414 | extern void add_partition(struct gendisk *, int, sector_t, sector_t, int); |
407 | extern void delete_partition(struct gendisk *, int); | 415 | extern void delete_partition(struct gendisk *, int); |
408 | 416 | ||
409 | extern struct gendisk *alloc_disk_node(int minors, int node_id); | 417 | extern struct gendisk *alloc_disk_node(int minors, int node_id); |
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 063799ea6be0..2a7d15bcde46 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -85,8 +85,10 @@ struct vm_area_struct; | |||
85 | 85 | ||
86 | static inline enum zone_type gfp_zone(gfp_t flags) | 86 | static inline enum zone_type gfp_zone(gfp_t flags) |
87 | { | 87 | { |
88 | #ifdef CONFIG_ZONE_DMA | ||
88 | if (flags & __GFP_DMA) | 89 | if (flags & __GFP_DMA) |
89 | return ZONE_DMA; | 90 | return ZONE_DMA; |
91 | #endif | ||
90 | #ifdef CONFIG_ZONE_DMA32 | 92 | #ifdef CONFIG_ZONE_DMA32 |
91 | if (flags & __GFP_DMA32) | 93 | if (flags & __GFP_DMA32) |
92 | return ZONE_DMA32; | 94 | return ZONE_DMA32; |
diff --git a/include/linux/gigaset_dev.h b/include/linux/gigaset_dev.h index 70ad09c8ad1e..5dc4a316ca37 100644 --- a/include/linux/gigaset_dev.h +++ b/include/linux/gigaset_dev.h | |||
@@ -9,8 +9,6 @@ | |||
9 | * published by the Free Software Foundation; either version 2 of | 9 | * published by the Free Software Foundation; either version 2 of |
10 | * the License, or (at your option) any later version. | 10 | * the License, or (at your option) any later version. |
11 | * ===================================================================== | 11 | * ===================================================================== |
12 | * Version: $Id: gigaset_dev.h,v 1.4.4.4 2005/11/21 22:28:09 hjlipp Exp $ | ||
13 | * ===================================================================== | ||
14 | */ | 12 | */ |
15 | 13 | ||
16 | #ifndef GIGASET_INTERFACE_H | 14 | #ifndef GIGASET_INTERFACE_H |
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index 612472aaa79c..7803014f3a11 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h | |||
@@ -106,7 +106,7 @@ static inline void account_system_vtime(struct task_struct *tsk) | |||
106 | * always balanced, so the interrupted value of ->hardirq_context | 106 | * always balanced, so the interrupted value of ->hardirq_context |
107 | * will always be restored. | 107 | * will always be restored. |
108 | */ | 108 | */ |
109 | #define irq_enter() \ | 109 | #define __irq_enter() \ |
110 | do { \ | 110 | do { \ |
111 | account_system_vtime(current); \ | 111 | account_system_vtime(current); \ |
112 | add_preempt_count(HARDIRQ_OFFSET); \ | 112 | add_preempt_count(HARDIRQ_OFFSET); \ |
@@ -114,6 +114,11 @@ static inline void account_system_vtime(struct task_struct *tsk) | |||
114 | } while (0) | 114 | } while (0) |
115 | 115 | ||
116 | /* | 116 | /* |
117 | * Enter irq context (on NO_HZ, update jiffies): | ||
118 | */ | ||
119 | extern void irq_enter(void); | ||
120 | |||
121 | /* | ||
117 | * Exit irq context without processing softirqs: | 122 | * Exit irq context without processing softirqs: |
118 | */ | 123 | */ |
119 | #define __irq_exit() \ | 124 | #define __irq_exit() \ |
@@ -128,7 +133,7 @@ static inline void account_system_vtime(struct task_struct *tsk) | |||
128 | */ | 133 | */ |
129 | extern void irq_exit(void); | 134 | extern void irq_exit(void); |
130 | 135 | ||
131 | #define nmi_enter() do { lockdep_off(); irq_enter(); } while (0) | 136 | #define nmi_enter() do { lockdep_off(); __irq_enter(); } while (0) |
132 | #define nmi_exit() do { __irq_exit(); lockdep_on(); } while (0) | 137 | #define nmi_exit() do { __irq_exit(); lockdep_on(); } while (0) |
133 | 138 | ||
134 | #endif /* LINUX_HARDIRQ_H */ | 139 | #endif /* LINUX_HARDIRQ_H */ |
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index fca93025ab51..37f9279192a9 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -21,22 +21,72 @@ | |||
21 | #include <linux/list.h> | 21 | #include <linux/list.h> |
22 | #include <linux/wait.h> | 22 | #include <linux/wait.h> |
23 | 23 | ||
24 | struct hrtimer_clock_base; | ||
25 | struct hrtimer_cpu_base; | ||
26 | |||
24 | /* | 27 | /* |
25 | * Mode arguments of xxx_hrtimer functions: | 28 | * Mode arguments of xxx_hrtimer functions: |
26 | */ | 29 | */ |
27 | enum hrtimer_mode { | 30 | enum hrtimer_mode { |
28 | HRTIMER_ABS, /* Time value is absolute */ | 31 | HRTIMER_MODE_ABS, /* Time value is absolute */ |
29 | HRTIMER_REL, /* Time value is relative to now */ | 32 | HRTIMER_MODE_REL, /* Time value is relative to now */ |
30 | }; | 33 | }; |
31 | 34 | ||
35 | /* | ||
36 | * Return values for the callback function | ||
37 | */ | ||
32 | enum hrtimer_restart { | 38 | enum hrtimer_restart { |
33 | HRTIMER_NORESTART, | 39 | HRTIMER_NORESTART, /* Timer is not restarted */ |
34 | HRTIMER_RESTART, | 40 | HRTIMER_RESTART, /* Timer must be restarted */ |
35 | }; | 41 | }; |
36 | 42 | ||
37 | #define HRTIMER_INACTIVE ((void *)1UL) | 43 | /* |
44 | * hrtimer callback modes: | ||
45 | * | ||
46 | * HRTIMER_CB_SOFTIRQ: Callback must run in softirq context | ||
47 | * HRTIMER_CB_IRQSAFE: Callback may run in hardirq context | ||
48 | * HRTIMER_CB_IRQSAFE_NO_RESTART: Callback may run in hardirq context and | ||
49 | * does not restart the timer | ||
50 | * HRTIMER_CB_IRQSAFE_NO_SOFTIRQ: Callback must run in softirq context | ||
51 | * Special mode for tick emultation | ||
52 | */ | ||
53 | enum hrtimer_cb_mode { | ||
54 | HRTIMER_CB_SOFTIRQ, | ||
55 | HRTIMER_CB_IRQSAFE, | ||
56 | HRTIMER_CB_IRQSAFE_NO_RESTART, | ||
57 | HRTIMER_CB_IRQSAFE_NO_SOFTIRQ, | ||
58 | }; | ||
38 | 59 | ||
39 | struct hrtimer_base; | 60 | /* |
61 | * Values to track state of the timer | ||
62 | * | ||
63 | * Possible states: | ||
64 | * | ||
65 | * 0x00 inactive | ||
66 | * 0x01 enqueued into rbtree | ||
67 | * 0x02 callback function running | ||
68 | * 0x04 callback pending (high resolution mode) | ||
69 | * | ||
70 | * Special case: | ||
71 | * 0x03 callback function running and enqueued | ||
72 | * (was requeued on another CPU) | ||
73 | * The "callback function running and enqueued" status is only possible on | ||
74 | * SMP. It happens for example when a posix timer expired and the callback | ||
75 | * queued a signal. Between dropping the lock which protects the posix timer | ||
76 | * and reacquiring the base lock of the hrtimer, another CPU can deliver the | ||
77 | * signal and rearm the timer. We have to preserve the callback running state, | ||
78 | * as otherwise the timer could be removed before the softirq code finishes the | ||
79 | * the handling of the timer. | ||
80 | * | ||
81 | * The HRTIMER_STATE_ENQUEUE bit is always or'ed to the current state to | ||
82 | * preserve the HRTIMER_STATE_CALLBACK bit in the above scenario. | ||
83 | * | ||
84 | * All state transitions are protected by cpu_base->lock. | ||
85 | */ | ||
86 | #define HRTIMER_STATE_INACTIVE 0x00 | ||
87 | #define HRTIMER_STATE_ENQUEUED 0x01 | ||
88 | #define HRTIMER_STATE_CALLBACK 0x02 | ||
89 | #define HRTIMER_STATE_PENDING 0x04 | ||
40 | 90 | ||
41 | /** | 91 | /** |
42 | * struct hrtimer - the basic hrtimer structure | 92 | * struct hrtimer - the basic hrtimer structure |
@@ -46,14 +96,34 @@ struct hrtimer_base; | |||
46 | * which the timer is based. | 96 | * which the timer is based. |
47 | * @function: timer expiry callback function | 97 | * @function: timer expiry callback function |
48 | * @base: pointer to the timer base (per cpu and per clock) | 98 | * @base: pointer to the timer base (per cpu and per clock) |
99 | * @state: state information (See bit values above) | ||
100 | * @cb_mode: high resolution timer feature to select the callback execution | ||
101 | * mode | ||
102 | * @cb_entry: list head to enqueue an expired timer into the callback list | ||
103 | * @start_site: timer statistics field to store the site where the timer | ||
104 | * was started | ||
105 | * @start_comm: timer statistics field to store the name of the process which | ||
106 | * started the timer | ||
107 | * @start_pid: timer statistics field to store the pid of the task which | ||
108 | * started the timer | ||
49 | * | 109 | * |
50 | * The hrtimer structure must be initialized by init_hrtimer_#CLOCKTYPE() | 110 | * The hrtimer structure must be initialized by hrtimer_init() |
51 | */ | 111 | */ |
52 | struct hrtimer { | 112 | struct hrtimer { |
53 | struct rb_node node; | 113 | struct rb_node node; |
54 | ktime_t expires; | 114 | ktime_t expires; |
55 | int (*function)(struct hrtimer *); | 115 | enum hrtimer_restart (*function)(struct hrtimer *); |
56 | struct hrtimer_base *base; | 116 | struct hrtimer_clock_base *base; |
117 | unsigned long state; | ||
118 | #ifdef CONFIG_HIGH_RES_TIMERS | ||
119 | enum hrtimer_cb_mode cb_mode; | ||
120 | struct list_head cb_entry; | ||
121 | #endif | ||
122 | #ifdef CONFIG_TIMER_STATS | ||
123 | void *start_site; | ||
124 | char start_comm[16]; | ||
125 | int start_pid; | ||
126 | #endif | ||
57 | }; | 127 | }; |
58 | 128 | ||
59 | /** | 129 | /** |
@@ -70,37 +140,114 @@ struct hrtimer_sleeper { | |||
70 | 140 | ||
71 | /** | 141 | /** |
72 | * struct hrtimer_base - the timer base for a specific clock | 142 | * struct hrtimer_base - the timer base for a specific clock |
73 | * @index: clock type index for per_cpu support when moving a timer | 143 | * @index: clock type index for per_cpu support when moving a |
74 | * to a base on another cpu. | 144 | * timer to a base on another cpu. |
75 | * @lock: lock protecting the base and associated timers | ||
76 | * @active: red black tree root node for the active timers | 145 | * @active: red black tree root node for the active timers |
77 | * @first: pointer to the timer node which expires first | 146 | * @first: pointer to the timer node which expires first |
78 | * @resolution: the resolution of the clock, in nanoseconds | 147 | * @resolution: the resolution of the clock, in nanoseconds |
79 | * @get_time: function to retrieve the current time of the clock | 148 | * @get_time: function to retrieve the current time of the clock |
80 | * @get_softirq_time: function to retrieve the current time from the softirq | 149 | * @get_softirq_time: function to retrieve the current time from the softirq |
81 | * @curr_timer: the timer which is executing a callback right now | ||
82 | * @softirq_time: the time when running the hrtimer queue in the softirq | 150 | * @softirq_time: the time when running the hrtimer queue in the softirq |
83 | * @lock_key: the lock_class_key for use with lockdep | 151 | * @cb_pending: list of timers where the callback is pending |
152 | * @offset: offset of this clock to the monotonic base | ||
153 | * @reprogram: function to reprogram the timer event | ||
84 | */ | 154 | */ |
85 | struct hrtimer_base { | 155 | struct hrtimer_clock_base { |
156 | struct hrtimer_cpu_base *cpu_base; | ||
86 | clockid_t index; | 157 | clockid_t index; |
87 | spinlock_t lock; | ||
88 | struct rb_root active; | 158 | struct rb_root active; |
89 | struct rb_node *first; | 159 | struct rb_node *first; |
90 | ktime_t resolution; | 160 | ktime_t resolution; |
91 | ktime_t (*get_time)(void); | 161 | ktime_t (*get_time)(void); |
92 | ktime_t (*get_softirq_time)(void); | 162 | ktime_t (*get_softirq_time)(void); |
93 | struct hrtimer *curr_timer; | ||
94 | ktime_t softirq_time; | 163 | ktime_t softirq_time; |
95 | struct lock_class_key lock_key; | 164 | #ifdef CONFIG_HIGH_RES_TIMERS |
165 | ktime_t offset; | ||
166 | int (*reprogram)(struct hrtimer *t, | ||
167 | struct hrtimer_clock_base *b, | ||
168 | ktime_t n); | ||
169 | #endif | ||
170 | }; | ||
171 | |||
172 | #define HRTIMER_MAX_CLOCK_BASES 2 | ||
173 | |||
174 | /* | ||
175 | * struct hrtimer_cpu_base - the per cpu clock bases | ||
176 | * @lock: lock protecting the base and associated clock bases | ||
177 | * and timers | ||
178 | * @lock_key: the lock_class_key for use with lockdep | ||
179 | * @clock_base: array of clock bases for this cpu | ||
180 | * @curr_timer: the timer which is executing a callback right now | ||
181 | * @expires_next: absolute time of the next event which was scheduled | ||
182 | * via clock_set_next_event() | ||
183 | * @hres_active: State of high resolution mode | ||
184 | * @check_clocks: Indictator, when set evaluate time source and clock | ||
185 | * event devices whether high resolution mode can be | ||
186 | * activated. | ||
187 | * @cb_pending: Expired timers are moved from the rbtree to this | ||
188 | * list in the timer interrupt. The list is processed | ||
189 | * in the softirq. | ||
190 | * @nr_events: Total number of timer interrupt events | ||
191 | */ | ||
192 | struct hrtimer_cpu_base { | ||
193 | spinlock_t lock; | ||
194 | struct lock_class_key lock_key; | ||
195 | struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES]; | ||
196 | #ifdef CONFIG_HIGH_RES_TIMERS | ||
197 | ktime_t expires_next; | ||
198 | int hres_active; | ||
199 | struct list_head cb_pending; | ||
200 | unsigned long nr_events; | ||
201 | #endif | ||
96 | }; | 202 | }; |
97 | 203 | ||
204 | #ifdef CONFIG_HIGH_RES_TIMERS | ||
205 | struct clock_event_device; | ||
206 | |||
207 | extern void clock_was_set(void); | ||
208 | extern void hrtimer_interrupt(struct clock_event_device *dev); | ||
209 | |||
210 | /* | ||
211 | * In high resolution mode the time reference must be read accurate | ||
212 | */ | ||
213 | static inline ktime_t hrtimer_cb_get_time(struct hrtimer *timer) | ||
214 | { | ||
215 | return timer->base->get_time(); | ||
216 | } | ||
217 | |||
218 | /* | ||
219 | * The resolution of the clocks. The resolution value is returned in | ||
220 | * the clock_getres() system call to give application programmers an | ||
221 | * idea of the (in)accuracy of timers. Timer values are rounded up to | ||
222 | * this resolution values. | ||
223 | */ | ||
224 | # define KTIME_HIGH_RES (ktime_t) { .tv64 = 1 } | ||
225 | # define KTIME_MONOTONIC_RES KTIME_HIGH_RES | ||
226 | |||
227 | #else | ||
228 | |||
229 | # define KTIME_MONOTONIC_RES KTIME_LOW_RES | ||
230 | |||
98 | /* | 231 | /* |
99 | * clock_was_set() is a NOP for non- high-resolution systems. The | 232 | * clock_was_set() is a NOP for non- high-resolution systems. The |
100 | * time-sorted order guarantees that a timer does not expire early and | 233 | * time-sorted order guarantees that a timer does not expire early and |
101 | * is expired in the next softirq when the clock was advanced. | 234 | * is expired in the next softirq when the clock was advanced. |
102 | */ | 235 | */ |
103 | #define clock_was_set() do { } while (0) | 236 | static inline void clock_was_set(void) { } |
237 | |||
238 | /* | ||
239 | * In non high resolution mode the time reference is taken from | ||
240 | * the base softirq time variable. | ||
241 | */ | ||
242 | static inline ktime_t hrtimer_cb_get_time(struct hrtimer *timer) | ||
243 | { | ||
244 | return timer->base->softirq_time; | ||
245 | } | ||
246 | |||
247 | #endif | ||
248 | |||
249 | extern ktime_t ktime_get(void); | ||
250 | extern ktime_t ktime_get_real(void); | ||
104 | 251 | ||
105 | /* Exported timer functions: */ | 252 | /* Exported timer functions: */ |
106 | 253 | ||
@@ -114,19 +261,33 @@ extern int hrtimer_start(struct hrtimer *timer, ktime_t tim, | |||
114 | extern int hrtimer_cancel(struct hrtimer *timer); | 261 | extern int hrtimer_cancel(struct hrtimer *timer); |
115 | extern int hrtimer_try_to_cancel(struct hrtimer *timer); | 262 | extern int hrtimer_try_to_cancel(struct hrtimer *timer); |
116 | 263 | ||
117 | #define hrtimer_restart(timer) hrtimer_start((timer), (timer)->expires, HRTIMER_ABS) | 264 | static inline int hrtimer_restart(struct hrtimer *timer) |
265 | { | ||
266 | return hrtimer_start(timer, timer->expires, HRTIMER_MODE_ABS); | ||
267 | } | ||
118 | 268 | ||
119 | /* Query timers: */ | 269 | /* Query timers: */ |
120 | extern ktime_t hrtimer_get_remaining(const struct hrtimer *timer); | 270 | extern ktime_t hrtimer_get_remaining(const struct hrtimer *timer); |
121 | extern int hrtimer_get_res(const clockid_t which_clock, struct timespec *tp); | 271 | extern int hrtimer_get_res(const clockid_t which_clock, struct timespec *tp); |
122 | 272 | ||
123 | #ifdef CONFIG_NO_IDLE_HZ | ||
124 | extern ktime_t hrtimer_get_next_event(void); | 273 | extern ktime_t hrtimer_get_next_event(void); |
125 | #endif | ||
126 | 274 | ||
275 | /* | ||
276 | * A timer is active, when it is enqueued into the rbtree or the callback | ||
277 | * function is running. | ||
278 | */ | ||
127 | static inline int hrtimer_active(const struct hrtimer *timer) | 279 | static inline int hrtimer_active(const struct hrtimer *timer) |
128 | { | 280 | { |
129 | return rb_parent(&timer->node) != &timer->node; | 281 | return timer->state != HRTIMER_STATE_INACTIVE; |
282 | } | ||
283 | |||
284 | /* | ||
285 | * Helper function to check, whether the timer is on one of the queues | ||
286 | */ | ||
287 | static inline int hrtimer_is_queued(struct hrtimer *timer) | ||
288 | { | ||
289 | return timer->state & | ||
290 | (HRTIMER_STATE_ENQUEUED | HRTIMER_STATE_PENDING); | ||
130 | } | 291 | } |
131 | 292 | ||
132 | /* Forward a hrtimer so it expires after now: */ | 293 | /* Forward a hrtimer so it expires after now: */ |
@@ -149,4 +310,53 @@ extern void hrtimer_run_queues(void); | |||
149 | /* Bootup initialization: */ | 310 | /* Bootup initialization: */ |
150 | extern void __init hrtimers_init(void); | 311 | extern void __init hrtimers_init(void); |
151 | 312 | ||
313 | #if BITS_PER_LONG < 64 | ||
314 | extern unsigned long ktime_divns(const ktime_t kt, s64 div); | ||
315 | #else /* BITS_PER_LONG < 64 */ | ||
316 | # define ktime_divns(kt, div) (unsigned long)((kt).tv64 / (div)) | ||
317 | #endif | ||
318 | |||
319 | /* Show pending timers: */ | ||
320 | extern void sysrq_timer_list_show(void); | ||
321 | |||
322 | /* | ||
323 | * Timer-statistics info: | ||
324 | */ | ||
325 | #ifdef CONFIG_TIMER_STATS | ||
326 | |||
327 | extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf, | ||
328 | void *timerf, char * comm); | ||
329 | |||
330 | static inline void timer_stats_account_hrtimer(struct hrtimer *timer) | ||
331 | { | ||
332 | timer_stats_update_stats(timer, timer->start_pid, timer->start_site, | ||
333 | timer->function, timer->start_comm); | ||
334 | } | ||
335 | |||
336 | extern void __timer_stats_hrtimer_set_start_info(struct hrtimer *timer, | ||
337 | void *addr); | ||
338 | |||
339 | static inline void timer_stats_hrtimer_set_start_info(struct hrtimer *timer) | ||
340 | { | ||
341 | __timer_stats_hrtimer_set_start_info(timer, __builtin_return_address(0)); | ||
342 | } | ||
343 | |||
344 | static inline void timer_stats_hrtimer_clear_start_info(struct hrtimer *timer) | ||
345 | { | ||
346 | timer->start_site = NULL; | ||
347 | } | ||
348 | #else | ||
349 | static inline void timer_stats_account_hrtimer(struct hrtimer *timer) | ||
350 | { | ||
351 | } | ||
352 | |||
353 | static inline void timer_stats_hrtimer_set_start_info(struct hrtimer *timer) | ||
354 | { | ||
355 | } | ||
356 | |||
357 | static inline void timer_stats_hrtimer_clear_start_info(struct hrtimer *timer) | ||
358 | { | ||
359 | } | ||
360 | #endif | ||
361 | |||
152 | #endif | 362 | #endif |
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h index 6e7ec4c76178..9c21dc793d7b 100644 --- a/include/linux/i2c-id.h +++ b/include/linux/i2c-id.h | |||
@@ -232,7 +232,6 @@ | |||
232 | #define I2C_HW_SMBUS_PIIX4 0x040000 | 232 | #define I2C_HW_SMBUS_PIIX4 0x040000 |
233 | #define I2C_HW_SMBUS_ALI15X3 0x040001 | 233 | #define I2C_HW_SMBUS_ALI15X3 0x040001 |
234 | #define I2C_HW_SMBUS_VIA2 0x040002 | 234 | #define I2C_HW_SMBUS_VIA2 0x040002 |
235 | #define I2C_HW_SMBUS_VOODOO3 0x040003 | ||
236 | #define I2C_HW_SMBUS_I801 0x040004 | 235 | #define I2C_HW_SMBUS_I801 0x040004 |
237 | #define I2C_HW_SMBUS_AMD756 0x040005 | 236 | #define I2C_HW_SMBUS_AMD756 0x040005 |
238 | #define I2C_HW_SMBUS_SIS5595 0x040006 | 237 | #define I2C_HW_SMBUS_SIS5595 0x040006 |
@@ -248,13 +247,11 @@ | |||
248 | #define I2C_HW_SMBUS_OV519 0x040010 /* OV519 USB 1.1 webcam IC */ | 247 | #define I2C_HW_SMBUS_OV519 0x040010 /* OV519 USB 1.1 webcam IC */ |
249 | #define I2C_HW_SMBUS_OVFX2 0x040011 /* Cypress/OmniVision FX2 webcam */ | 248 | #define I2C_HW_SMBUS_OVFX2 0x040011 /* Cypress/OmniVision FX2 webcam */ |
250 | #define I2C_HW_SMBUS_CAFE 0x040012 /* Marvell 88ALP01 "CAFE" cam */ | 249 | #define I2C_HW_SMBUS_CAFE 0x040012 /* Marvell 88ALP01 "CAFE" cam */ |
250 | #define I2C_HW_SMBUS_ALI1563 0x040013 | ||
251 | 251 | ||
252 | /* --- ISA pseudo-adapter */ | 252 | /* --- ISA pseudo-adapter */ |
253 | #define I2C_HW_ISA 0x050000 | 253 | #define I2C_HW_ISA 0x050000 |
254 | 254 | ||
255 | /* --- IPMI pseudo-adapter */ | ||
256 | #define I2C_HW_IPMI 0x0b0000 | ||
257 | |||
258 | /* --- IPMB adapter */ | 255 | /* --- IPMB adapter */ |
259 | #define I2C_HW_IPMB 0x0c0000 | 256 | #define I2C_HW_IPMB 0x0c0000 |
260 | 257 | ||
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 71e50d3e492f..9428092017e3 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -125,7 +125,12 @@ struct i2c_driver { | |||
125 | * it must be freed here. | 125 | * it must be freed here. |
126 | */ | 126 | */ |
127 | int (*detach_client)(struct i2c_client *); | 127 | int (*detach_client)(struct i2c_client *); |
128 | 128 | ||
129 | /* driver model interfaces that don't relate to enumeration */ | ||
130 | void (*shutdown)(struct i2c_client *); | ||
131 | int (*suspend)(struct i2c_client *, pm_message_t mesg); | ||
132 | int (*resume)(struct i2c_client *); | ||
133 | |||
129 | /* a ioctl like command that can be used to perform specific functions | 134 | /* a ioctl like command that can be used to perform specific functions |
130 | * with the device. | 135 | * with the device. |
131 | */ | 136 | */ |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 04e0fa97ac99..79c028251c70 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -636,7 +636,6 @@ typedef struct ide_drive_s { | |||
636 | unsigned int bios_cyl; /* BIOS/fdisk/LILO number of cyls */ | 636 | unsigned int bios_cyl; /* BIOS/fdisk/LILO number of cyls */ |
637 | unsigned int cyl; /* "real" number of cyls */ | 637 | unsigned int cyl; /* "real" number of cyls */ |
638 | unsigned int drive_data; /* use by tuneproc/selectproc */ | 638 | unsigned int drive_data; /* use by tuneproc/selectproc */ |
639 | unsigned int usage; /* current "open()" count for drive */ | ||
640 | unsigned int failures; /* current failure count */ | 639 | unsigned int failures; /* current failure count */ |
641 | unsigned int max_failures; /* maximum allowed failure count */ | 640 | unsigned int max_failures; /* maximum allowed failure count */ |
642 | u64 probed_capacity;/* initial reported media capacity (ide-cd only currently) */ | 641 | u64 probed_capacity;/* initial reported media capacity (ide-cd only currently) */ |
@@ -736,23 +735,22 @@ typedef struct hwif_s { | |||
736 | int (*ide_dma_end)(ide_drive_t *drive); | 735 | int (*ide_dma_end)(ide_drive_t *drive); |
737 | int (*ide_dma_check)(ide_drive_t *drive); | 736 | int (*ide_dma_check)(ide_drive_t *drive); |
738 | int (*ide_dma_on)(ide_drive_t *drive); | 737 | int (*ide_dma_on)(ide_drive_t *drive); |
739 | int (*ide_dma_off_quietly)(ide_drive_t *drive); | 738 | void (*dma_off_quietly)(ide_drive_t *drive); |
740 | int (*ide_dma_test_irq)(ide_drive_t *drive); | 739 | int (*ide_dma_test_irq)(ide_drive_t *drive); |
741 | int (*ide_dma_host_on)(ide_drive_t *drive); | 740 | void (*ide_dma_clear_irq)(ide_drive_t *drive); |
742 | int (*ide_dma_host_off)(ide_drive_t *drive); | 741 | void (*dma_host_on)(ide_drive_t *drive); |
742 | void (*dma_host_off)(ide_drive_t *drive); | ||
743 | int (*ide_dma_lostirq)(ide_drive_t *drive); | 743 | int (*ide_dma_lostirq)(ide_drive_t *drive); |
744 | int (*ide_dma_timeout)(ide_drive_t *drive); | 744 | int (*ide_dma_timeout)(ide_drive_t *drive); |
745 | 745 | ||
746 | void (*OUTB)(u8 addr, unsigned long port); | 746 | void (*OUTB)(u8 addr, unsigned long port); |
747 | void (*OUTBSYNC)(ide_drive_t *drive, u8 addr, unsigned long port); | 747 | void (*OUTBSYNC)(ide_drive_t *drive, u8 addr, unsigned long port); |
748 | void (*OUTW)(u16 addr, unsigned long port); | 748 | void (*OUTW)(u16 addr, unsigned long port); |
749 | void (*OUTL)(u32 addr, unsigned long port); | ||
750 | void (*OUTSW)(unsigned long port, void *addr, u32 count); | 749 | void (*OUTSW)(unsigned long port, void *addr, u32 count); |
751 | void (*OUTSL)(unsigned long port, void *addr, u32 count); | 750 | void (*OUTSL)(unsigned long port, void *addr, u32 count); |
752 | 751 | ||
753 | u8 (*INB)(unsigned long port); | 752 | u8 (*INB)(unsigned long port); |
754 | u16 (*INW)(unsigned long port); | 753 | u16 (*INW)(unsigned long port); |
755 | u32 (*INL)(unsigned long port); | ||
756 | void (*INSW)(unsigned long port, void *addr, u32 count); | 754 | void (*INSW)(unsigned long port, void *addr, u32 count); |
757 | void (*INSL)(unsigned long port, void *addr, u32 count); | 755 | void (*INSL)(unsigned long port, void *addr, u32 count); |
758 | 756 | ||
@@ -774,7 +772,6 @@ typedef struct hwif_s { | |||
774 | unsigned int cursg; | 772 | unsigned int cursg; |
775 | unsigned int cursg_ofs; | 773 | unsigned int cursg_ofs; |
776 | 774 | ||
777 | int mmio; /* hosts iomio (0) or custom (2) select */ | ||
778 | int rqsize; /* max sectors per request */ | 775 | int rqsize; /* max sectors per request */ |
779 | int irq; /* our irq number */ | 776 | int irq; /* our irq number */ |
780 | 777 | ||
@@ -802,12 +799,11 @@ typedef struct hwif_s { | |||
802 | unsigned udma_four : 1; /* 1=ATA-66 capable, 0=default */ | 799 | unsigned udma_four : 1; /* 1=ATA-66 capable, 0=default */ |
803 | unsigned no_lba48 : 1; /* 1 = cannot do LBA48 */ | 800 | unsigned no_lba48 : 1; /* 1 = cannot do LBA48 */ |
804 | unsigned no_lba48_dma : 1; /* 1 = cannot do LBA48 DMA */ | 801 | unsigned no_lba48_dma : 1; /* 1 = cannot do LBA48 DMA */ |
805 | unsigned no_dsc : 1; /* 0 default, 1 dsc_overlap disabled */ | ||
806 | unsigned auto_poll : 1; /* supports nop auto-poll */ | 802 | unsigned auto_poll : 1; /* supports nop auto-poll */ |
807 | unsigned sg_mapped : 1; /* sg_table and sg_nents are ready */ | 803 | unsigned sg_mapped : 1; /* sg_table and sg_nents are ready */ |
808 | unsigned no_io_32bit : 1; /* 1 = can not do 32-bit IO ops */ | 804 | unsigned no_io_32bit : 1; /* 1 = can not do 32-bit IO ops */ |
809 | unsigned err_stops_fifo : 1; /* 1=data FIFO is cleared by an error */ | 805 | unsigned err_stops_fifo : 1; /* 1=data FIFO is cleared by an error */ |
810 | unsigned atapi_irq_bogon : 1; /* Generates spurious DMA interrupts in PIO mode */ | 806 | unsigned mmio : 1; /* host uses MMIO */ |
811 | 807 | ||
812 | struct device gendev; | 808 | struct device gendev; |
813 | struct completion gendev_rel_comp; /* To deal with device release() */ | 809 | struct completion gendev_rel_comp; /* To deal with device release() */ |
@@ -1280,8 +1276,9 @@ int ide_in_drive_list(struct hd_driveid *, const struct drive_list_entry *); | |||
1280 | int __ide_dma_bad_drive(ide_drive_t *); | 1276 | int __ide_dma_bad_drive(ide_drive_t *); |
1281 | int __ide_dma_good_drive(ide_drive_t *); | 1277 | int __ide_dma_good_drive(ide_drive_t *); |
1282 | int ide_use_dma(ide_drive_t *); | 1278 | int ide_use_dma(ide_drive_t *); |
1283 | int __ide_dma_off(ide_drive_t *); | 1279 | void ide_dma_off(ide_drive_t *); |
1284 | void ide_dma_verbose(ide_drive_t *); | 1280 | void ide_dma_verbose(ide_drive_t *); |
1281 | int ide_set_dma(ide_drive_t *); | ||
1285 | ide_startstop_t ide_dma_intr(ide_drive_t *); | 1282 | ide_startstop_t ide_dma_intr(ide_drive_t *); |
1286 | 1283 | ||
1287 | #ifdef CONFIG_BLK_DEV_IDEDMA_PCI | 1284 | #ifdef CONFIG_BLK_DEV_IDEDMA_PCI |
@@ -1291,9 +1288,9 @@ extern void ide_destroy_dmatable(ide_drive_t *); | |||
1291 | extern int ide_release_dma(ide_hwif_t *); | 1288 | extern int ide_release_dma(ide_hwif_t *); |
1292 | extern void ide_setup_dma(ide_hwif_t *, unsigned long, unsigned int); | 1289 | extern void ide_setup_dma(ide_hwif_t *, unsigned long, unsigned int); |
1293 | 1290 | ||
1294 | extern int __ide_dma_host_off(ide_drive_t *); | 1291 | void ide_dma_host_off(ide_drive_t *); |
1295 | extern int __ide_dma_off_quietly(ide_drive_t *); | 1292 | void ide_dma_off_quietly(ide_drive_t *); |
1296 | extern int __ide_dma_host_on(ide_drive_t *); | 1293 | void ide_dma_host_on(ide_drive_t *); |
1297 | extern int __ide_dma_on(ide_drive_t *); | 1294 | extern int __ide_dma_on(ide_drive_t *); |
1298 | extern int __ide_dma_check(ide_drive_t *); | 1295 | extern int __ide_dma_check(ide_drive_t *); |
1299 | extern int ide_dma_setup(ide_drive_t *); | 1296 | extern int ide_dma_setup(ide_drive_t *); |
@@ -1305,8 +1302,9 @@ extern int __ide_dma_timeout(ide_drive_t *); | |||
1305 | 1302 | ||
1306 | #else | 1303 | #else |
1307 | static inline int ide_use_dma(ide_drive_t *drive) { return 0; } | 1304 | static inline int ide_use_dma(ide_drive_t *drive) { return 0; } |
1308 | static inline int __ide_dma_off(ide_drive_t *drive) { return 0; } | 1305 | static inline void ide_dma_off(ide_drive_t *drive) { ; } |
1309 | static inline void ide_dma_verbose(ide_drive_t *drive) { ; } | 1306 | static inline void ide_dma_verbose(ide_drive_t *drive) { ; } |
1307 | static inline int ide_set_dma(ide_drive_t *drive) { return 1; } | ||
1310 | #endif /* CONFIG_BLK_DEV_IDEDMA */ | 1308 | #endif /* CONFIG_BLK_DEV_IDEDMA */ |
1311 | 1309 | ||
1312 | #ifndef CONFIG_BLK_DEV_IDEDMA_PCI | 1310 | #ifndef CONFIG_BLK_DEV_IDEDMA_PCI |
@@ -1354,6 +1352,7 @@ extern int ide_dma_enable(ide_drive_t *drive); | |||
1354 | extern char *ide_xfer_verbose(u8 xfer_rate); | 1352 | extern char *ide_xfer_verbose(u8 xfer_rate); |
1355 | extern void ide_toggle_bounce(ide_drive_t *drive, int on); | 1353 | extern void ide_toggle_bounce(ide_drive_t *drive, int on); |
1356 | extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate); | 1354 | extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate); |
1355 | int ide_use_fast_pio(ide_drive_t *); | ||
1357 | 1356 | ||
1358 | u8 ide_dump_status(ide_drive_t *, const char *, u8); | 1357 | u8 ide_dump_status(ide_drive_t *, const char *, u8); |
1359 | 1358 | ||
@@ -1367,7 +1366,6 @@ typedef struct ide_pio_data_s { | |||
1367 | u8 pio_mode; | 1366 | u8 pio_mode; |
1368 | u8 use_iordy; | 1367 | u8 use_iordy; |
1369 | u8 overridden; | 1368 | u8 overridden; |
1370 | u8 blacklisted; | ||
1371 | unsigned int cycle_time; | 1369 | unsigned int cycle_time; |
1372 | } ide_pio_data_t; | 1370 | } ide_pio_data_t; |
1373 | 1371 | ||
diff --git a/include/linux/init.h b/include/linux/init.h index 5a593a1dec1e..e290a010e3f2 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
@@ -67,7 +67,8 @@ extern initcall_t __con_initcall_start[], __con_initcall_end[]; | |||
67 | extern initcall_t __security_initcall_start[], __security_initcall_end[]; | 67 | extern initcall_t __security_initcall_start[], __security_initcall_end[]; |
68 | 68 | ||
69 | /* Defined in init/main.c */ | 69 | /* Defined in init/main.c */ |
70 | extern char saved_command_line[]; | 70 | extern char __initdata boot_command_line[]; |
71 | extern char *saved_command_line; | ||
71 | extern unsigned int reset_devices; | 72 | extern unsigned int reset_devices; |
72 | 73 | ||
73 | /* used by init/main.c */ | 74 | /* used by init/main.c */ |
@@ -164,7 +165,7 @@ struct obs_kernel_param { | |||
164 | #define early_param(str, fn) \ | 165 | #define early_param(str, fn) \ |
165 | __setup_param(str, fn, fn, 1) | 166 | __setup_param(str, fn, fn, 1) |
166 | 167 | ||
167 | /* Relies on saved_command_line being set */ | 168 | /* Relies on boot_command_line being set */ |
168 | void __init parse_early_param(void); | 169 | void __init parse_early_param(void); |
169 | #endif /* __ASSEMBLY__ */ | 170 | #endif /* __ASSEMBLY__ */ |
170 | 171 | ||
@@ -172,7 +173,7 @@ void __init parse_early_param(void); | |||
172 | * module_init() - driver initialization entry point | 173 | * module_init() - driver initialization entry point |
173 | * @x: function to be run at kernel boot time or module insertion | 174 | * @x: function to be run at kernel boot time or module insertion |
174 | * | 175 | * |
175 | * module_init() will either be called during do_initcalls (if | 176 | * module_init() will either be called during do_initcalls() (if |
176 | * builtin) or at module insertion time (if a module). There can only | 177 | * builtin) or at module insertion time (if a module). There can only |
177 | * be one per module. | 178 | * be one per module. |
178 | */ | 179 | */ |
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 6383d2d83bb0..a2d95ff50e9b 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -66,7 +66,7 @@ | |||
66 | .cpu_timers = INIT_CPU_TIMERS(sig.cpu_timers), \ | 66 | .cpu_timers = INIT_CPU_TIMERS(sig.cpu_timers), \ |
67 | .rlim = INIT_RLIMITS, \ | 67 | .rlim = INIT_RLIMITS, \ |
68 | .pgrp = 1, \ | 68 | .pgrp = 1, \ |
69 | .tty_old_pgrp = 0, \ | 69 | .tty_old_pgrp = NULL, \ |
70 | { .__session = 1}, \ | 70 | { .__session = 1}, \ |
71 | } | 71 | } |
72 | 72 | ||
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 5a8ba0b8ccba..838cf5a5bd7f 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
@@ -42,6 +42,8 @@ | |||
42 | * IRQF_SHARED - allow sharing the irq among several devices | 42 | * IRQF_SHARED - allow sharing the irq among several devices |
43 | * IRQF_PROBE_SHARED - set by callers when they expect sharing mismatches to occur | 43 | * IRQF_PROBE_SHARED - set by callers when they expect sharing mismatches to occur |
44 | * IRQF_TIMER - Flag to mark this interrupt as timer interrupt | 44 | * IRQF_TIMER - Flag to mark this interrupt as timer interrupt |
45 | * IRQF_PERCPU - Interrupt is per cpu | ||
46 | * IRQF_NOBALANCING - Flag to exclude this interrupt from irq balancing | ||
45 | */ | 47 | */ |
46 | #define IRQF_DISABLED 0x00000020 | 48 | #define IRQF_DISABLED 0x00000020 |
47 | #define IRQF_SAMPLE_RANDOM 0x00000040 | 49 | #define IRQF_SAMPLE_RANDOM 0x00000040 |
@@ -49,6 +51,7 @@ | |||
49 | #define IRQF_PROBE_SHARED 0x00000100 | 51 | #define IRQF_PROBE_SHARED 0x00000100 |
50 | #define IRQF_TIMER 0x00000200 | 52 | #define IRQF_TIMER 0x00000200 |
51 | #define IRQF_PERCPU 0x00000400 | 53 | #define IRQF_PERCPU 0x00000400 |
54 | #define IRQF_NOBALANCING 0x00000800 | ||
52 | 55 | ||
53 | /* | 56 | /* |
54 | * Migration helpers. Scheduled for removal in 1/2007 | 57 | * Migration helpers. Scheduled for removal in 1/2007 |
@@ -239,6 +242,9 @@ enum | |||
239 | BLOCK_SOFTIRQ, | 242 | BLOCK_SOFTIRQ, |
240 | TASKLET_SOFTIRQ, | 243 | TASKLET_SOFTIRQ, |
241 | SCHED_SOFTIRQ, | 244 | SCHED_SOFTIRQ, |
245 | #ifdef CONFIG_HIGH_RES_TIMERS | ||
246 | HRTIMER_SOFTIRQ, | ||
247 | #endif | ||
242 | }; | 248 | }; |
243 | 249 | ||
244 | /* softirq mask and active fields moved to irq_cpustat_t in | 250 | /* softirq mask and active fields moved to irq_cpustat_t in |
@@ -417,4 +423,13 @@ extern int probe_irq_off(unsigned long); /* returns 0 or negative on failure */ | |||
417 | extern unsigned int probe_irq_mask(unsigned long); /* returns mask of ISA interrupts */ | 423 | extern unsigned int probe_irq_mask(unsigned long); /* returns mask of ISA interrupts */ |
418 | #endif | 424 | #endif |
419 | 425 | ||
426 | #ifdef CONFIG_PROC_FS | ||
427 | /* Initialize /proc/irq/ */ | ||
428 | extern void init_irq_proc(void); | ||
429 | #else | ||
430 | static inline void init_irq_proc(void) | ||
431 | { | ||
432 | } | ||
433 | #endif | ||
434 | |||
420 | #endif | 435 | #endif |
diff --git a/include/linux/io.h b/include/linux/io.h index 9e419ebfc98b..c244a0cc9319 100644 --- a/include/linux/io.h +++ b/include/linux/io.h | |||
@@ -43,12 +43,6 @@ void __iomem * devm_ioremap_nocache(struct device *dev, unsigned long offset, | |||
43 | unsigned long size); | 43 | unsigned long size); |
44 | void devm_iounmap(struct device *dev, void __iomem *addr); | 44 | void devm_iounmap(struct device *dev, void __iomem *addr); |
45 | 45 | ||
46 | void __iomem * pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen); | ||
47 | void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr); | ||
48 | void __iomem * const * pcim_iomap_table(struct pci_dev *pdev); | ||
49 | |||
50 | int pcim_iomap_regions(struct pci_dev *pdev, u16 mask, const char *name); | ||
51 | |||
52 | /** | 46 | /** |
53 | * check_signature - find BIOS signatures | 47 | * check_signature - find BIOS signatures |
54 | * @io_addr: mmio address to check | 48 | * @io_addr: mmio address to check |
diff --git a/include/linux/irq.h b/include/linux/irq.h index 5504b671357f..b0a44b8e0281 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -31,7 +31,7 @@ typedef void fastcall (*irq_flow_handler_t)(unsigned int irq, | |||
31 | /* | 31 | /* |
32 | * IRQ line status. | 32 | * IRQ line status. |
33 | * | 33 | * |
34 | * Bits 0-16 are reserved for the IRQF_* bits in linux/interrupt.h | 34 | * Bits 0-7 are reserved for the IRQF_* bits in linux/interrupt.h |
35 | * | 35 | * |
36 | * IRQ types | 36 | * IRQ types |
37 | */ | 37 | */ |
@@ -45,28 +45,30 @@ typedef void fastcall (*irq_flow_handler_t)(unsigned int irq, | |||
45 | #define IRQ_TYPE_PROBE 0x00000010 /* Probing in progress */ | 45 | #define IRQ_TYPE_PROBE 0x00000010 /* Probing in progress */ |
46 | 46 | ||
47 | /* Internal flags */ | 47 | /* Internal flags */ |
48 | #define IRQ_INPROGRESS 0x00010000 /* IRQ handler active - do not enter! */ | 48 | #define IRQ_INPROGRESS 0x00000100 /* IRQ handler active - do not enter! */ |
49 | #define IRQ_DISABLED 0x00020000 /* IRQ disabled - do not enter! */ | 49 | #define IRQ_DISABLED 0x00000200 /* IRQ disabled - do not enter! */ |
50 | #define IRQ_PENDING 0x00040000 /* IRQ pending - replay on enable */ | 50 | #define IRQ_PENDING 0x00000400 /* IRQ pending - replay on enable */ |
51 | #define IRQ_REPLAY 0x00080000 /* IRQ has been replayed but not acked yet */ | 51 | #define IRQ_REPLAY 0x00000800 /* IRQ has been replayed but not acked yet */ |
52 | #define IRQ_AUTODETECT 0x00100000 /* IRQ is being autodetected */ | 52 | #define IRQ_AUTODETECT 0x00001000 /* IRQ is being autodetected */ |
53 | #define IRQ_WAITING 0x00200000 /* IRQ not yet seen - for autodetection */ | 53 | #define IRQ_WAITING 0x00002000 /* IRQ not yet seen - for autodetection */ |
54 | #define IRQ_LEVEL 0x00400000 /* IRQ level triggered */ | 54 | #define IRQ_LEVEL 0x00004000 /* IRQ level triggered */ |
55 | #define IRQ_MASKED 0x00800000 /* IRQ masked - shouldn't be seen again */ | 55 | #define IRQ_MASKED 0x00008000 /* IRQ masked - shouldn't be seen again */ |
56 | #define IRQ_PER_CPU 0x01000000 /* IRQ is per CPU */ | 56 | #define IRQ_PER_CPU 0x00010000 /* IRQ is per CPU */ |
57 | #define IRQ_NOPROBE 0x00020000 /* IRQ is not valid for probing */ | ||
58 | #define IRQ_NOREQUEST 0x00040000 /* IRQ cannot be requested */ | ||
59 | #define IRQ_NOAUTOEN 0x00080000 /* IRQ will not be enabled on request irq */ | ||
60 | #define IRQ_WAKEUP 0x00100000 /* IRQ triggers system wakeup */ | ||
61 | #define IRQ_MOVE_PENDING 0x00200000 /* need to re-target IRQ destination */ | ||
62 | #define IRQ_NO_BALANCING 0x00400000 /* IRQ is excluded from balancing */ | ||
63 | |||
57 | #ifdef CONFIG_IRQ_PER_CPU | 64 | #ifdef CONFIG_IRQ_PER_CPU |
58 | # define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) | 65 | # define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) |
66 | # define IRQ_NO_BALANCING_MASK (IRQ_PER_CPU | IRQ_NO_BALANCING) | ||
59 | #else | 67 | #else |
60 | # define CHECK_IRQ_PER_CPU(var) 0 | 68 | # define CHECK_IRQ_PER_CPU(var) 0 |
69 | # define IRQ_NO_BALANCING_MASK IRQ_NO_BALANCING | ||
61 | #endif | 70 | #endif |
62 | 71 | ||
63 | #define IRQ_NOPROBE 0x02000000 /* IRQ is not valid for probing */ | ||
64 | #define IRQ_NOREQUEST 0x04000000 /* IRQ cannot be requested */ | ||
65 | #define IRQ_NOAUTOEN 0x08000000 /* IRQ will not be enabled on request irq */ | ||
66 | #define IRQ_DELAYED_DISABLE 0x10000000 /* IRQ disable (masking) happens delayed. */ | ||
67 | #define IRQ_WAKEUP 0x20000000 /* IRQ triggers system wakeup */ | ||
68 | #define IRQ_MOVE_PENDING 0x40000000 /* need to re-target IRQ destination */ | ||
69 | |||
70 | struct proc_dir_entry; | 72 | struct proc_dir_entry; |
71 | struct msi_desc; | 73 | struct msi_desc; |
72 | 74 | ||
@@ -127,6 +129,7 @@ struct irq_chip { | |||
127 | * | 129 | * |
128 | * @handle_irq: highlevel irq-events handler [if NULL, __do_IRQ()] | 130 | * @handle_irq: highlevel irq-events handler [if NULL, __do_IRQ()] |
129 | * @chip: low level interrupt hardware access | 131 | * @chip: low level interrupt hardware access |
132 | * @msi_desc: MSI descriptor | ||
130 | * @handler_data: per-IRQ data for the irq_chip methods | 133 | * @handler_data: per-IRQ data for the irq_chip methods |
131 | * @chip_data: platform-specific per-chip private data for the chip | 134 | * @chip_data: platform-specific per-chip private data for the chip |
132 | * methods, to allow shared chip implementations | 135 | * methods, to allow shared chip implementations |
@@ -197,17 +200,6 @@ extern int setup_irq(unsigned int irq, struct irqaction *new); | |||
197 | #endif | 200 | #endif |
198 | 201 | ||
199 | #ifdef CONFIG_SMP | 202 | #ifdef CONFIG_SMP |
200 | static inline void set_native_irq_info(int irq, cpumask_t mask) | ||
201 | { | ||
202 | irq_desc[irq].affinity = mask; | ||
203 | } | ||
204 | #else | ||
205 | static inline void set_native_irq_info(int irq, cpumask_t mask) | ||
206 | { | ||
207 | } | ||
208 | #endif | ||
209 | |||
210 | #ifdef CONFIG_SMP | ||
211 | 203 | ||
212 | #if defined(CONFIG_GENERIC_PENDING_IRQ) || defined(CONFIG_IRQBALANCE) | 204 | #if defined(CONFIG_GENERIC_PENDING_IRQ) || defined(CONFIG_IRQBALANCE) |
213 | 205 | ||
@@ -235,11 +227,21 @@ static inline void set_pending_irq(unsigned int irq, cpumask_t mask) | |||
235 | 227 | ||
236 | #endif /* CONFIG_GENERIC_PENDING_IRQ */ | 228 | #endif /* CONFIG_GENERIC_PENDING_IRQ */ |
237 | 229 | ||
230 | extern int irq_set_affinity(unsigned int irq, cpumask_t cpumask); | ||
231 | extern int irq_can_set_affinity(unsigned int irq); | ||
232 | |||
238 | #else /* CONFIG_SMP */ | 233 | #else /* CONFIG_SMP */ |
239 | 234 | ||
240 | #define move_native_irq(x) | 235 | #define move_native_irq(x) |
241 | #define move_masked_irq(x) | 236 | #define move_masked_irq(x) |
242 | 237 | ||
238 | static inline int irq_set_affinity(unsigned int irq, cpumask_t cpumask) | ||
239 | { | ||
240 | return -EINVAL; | ||
241 | } | ||
242 | |||
243 | static inline int irq_can_set_affinity(unsigned int irq) { return 0; } | ||
244 | |||
243 | #endif /* CONFIG_SMP */ | 245 | #endif /* CONFIG_SMP */ |
244 | 246 | ||
245 | #ifdef CONFIG_IRQBALANCE | 247 | #ifdef CONFIG_IRQBALANCE |
@@ -261,6 +263,11 @@ static inline int select_smp_affinity(unsigned int irq) | |||
261 | 263 | ||
262 | extern int no_irq_affinity; | 264 | extern int no_irq_affinity; |
263 | 265 | ||
266 | static inline int irq_balancing_disabled(unsigned int irq) | ||
267 | { | ||
268 | return irq_desc[irq].status & IRQ_NO_BALANCING_MASK; | ||
269 | } | ||
270 | |||
264 | /* Handle irq action chains: */ | 271 | /* Handle irq action chains: */ |
265 | extern int handle_IRQ_event(unsigned int irq, struct irqaction *action); | 272 | extern int handle_IRQ_event(unsigned int irq, struct irqaction *action); |
266 | 273 | ||
@@ -310,9 +317,6 @@ extern void note_interrupt(unsigned int irq, struct irq_desc *desc, | |||
310 | /* Resending of interrupts :*/ | 317 | /* Resending of interrupts :*/ |
311 | void check_irq_resend(struct irq_desc *desc, unsigned int irq); | 318 | void check_irq_resend(struct irq_desc *desc, unsigned int irq); |
312 | 319 | ||
313 | /* Initialize /proc/irq/ */ | ||
314 | extern void init_irq_proc(void); | ||
315 | |||
316 | /* Enable/disable irq debugging output: */ | 320 | /* Enable/disable irq debugging output: */ |
317 | extern int noirqdebug_setup(char *str); | 321 | extern int noirqdebug_setup(char *str); |
318 | 322 | ||
diff --git a/include/linux/jffs.h b/include/linux/jffs.h deleted file mode 100644 index 92213215277f..000000000000 --- a/include/linux/jffs.h +++ /dev/null | |||
@@ -1,224 +0,0 @@ | |||
1 | /* | ||
2 | * JFFS -- Journalling Flash File System, Linux implementation. | ||
3 | * | ||
4 | * Copyright (C) 1999, 2000 Axis Communications AB. | ||
5 | * | ||
6 | * Created by Finn Hakansson <finn@axis.com>. | ||
7 | * | ||
8 | * This is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * $Id: jffs.h,v 1.20 2001/09/18 21:33:37 dwmw2 Exp $ | ||
14 | * | ||
15 | * Ported to Linux 2.3.x and MTD: | ||
16 | * Copyright (C) 2000 Alexander Larsson (alex@cendio.se), Cendio Systems AB | ||
17 | * | ||
18 | */ | ||
19 | |||
20 | #ifndef __LINUX_JFFS_H__ | ||
21 | #define __LINUX_JFFS_H__ | ||
22 | |||
23 | #include <linux/types.h> | ||
24 | #include <linux/completion.h> | ||
25 | |||
26 | #define JFFS_VERSION_STRING "1.0" | ||
27 | |||
28 | /* This is a magic number that is used as an identification number for | ||
29 | this file system. It is written to the super_block structure. */ | ||
30 | #define JFFS_MAGIC_SB_BITMASK 0x07c0 /* 1984 */ | ||
31 | |||
32 | /* This is a magic number that every on-flash raw inode begins with. */ | ||
33 | #define JFFS_MAGIC_BITMASK 0x34383931 /* "1984" */ | ||
34 | |||
35 | /* These two bitmasks are the valid ones for the flash memories we have | ||
36 | for the moment. */ | ||
37 | #define JFFS_EMPTY_BITMASK 0xffffffff | ||
38 | #define JFFS_DIRTY_BITMASK 0x00000000 | ||
39 | |||
40 | /* This is the inode number of the root node. */ | ||
41 | #define JFFS_MIN_INO 1 | ||
42 | |||
43 | /* How many slots in the file hash table should we have? */ | ||
44 | #define JFFS_HASH_SIZE 40 | ||
45 | |||
46 | /* Don't use more than 254 bytes as the maximum allowed length of a file's | ||
47 | name due to errors that could occur during the scanning of the flash | ||
48 | memory. In fact, a name length of 255 or 0xff, could be the result of | ||
49 | an uncompleted write. For instance, if a raw inode is written to the | ||
50 | flash memory and there is a power lossage just before the length of | ||
51 | the name is written, the length 255 would be interpreted as an illegal | ||
52 | value. */ | ||
53 | #define JFFS_MAX_NAME_LEN 254 | ||
54 | |||
55 | /* Commands for ioctl(). */ | ||
56 | #define JFFS_IOCTL_MAGIC 't' | ||
57 | #define JFFS_PRINT_HASH _IO(JFFS_IOCTL_MAGIC, 90) | ||
58 | #define JFFS_PRINT_TREE _IO(JFFS_IOCTL_MAGIC, 91) | ||
59 | #define JFFS_GET_STATUS _IO(JFFS_IOCTL_MAGIC, 92) | ||
60 | |||
61 | /* XXX: This is something that we should try to get rid of in the future. */ | ||
62 | #define JFFS_MODIFY_INODE 0x01 | ||
63 | #define JFFS_MODIFY_NAME 0x02 | ||
64 | #define JFFS_MODIFY_DATA 0x04 | ||
65 | #define JFFS_MODIFY_EXIST 0x08 | ||
66 | |||
67 | struct jffs_control; | ||
68 | |||
69 | /* The JFFS raw inode structure: Used for storage on physical media. */ | ||
70 | /* Perhaps the uid, gid, atime, mtime and ctime members should have | ||
71 | more space due to future changes in the Linux kernel. Anyhow, since | ||
72 | a user of this filesystem probably have to fix a large number of | ||
73 | other things, we have decided to not be forward compatible. */ | ||
74 | struct jffs_raw_inode | ||
75 | { | ||
76 | __u32 magic; /* A constant magic number. */ | ||
77 | __u32 ino; /* Inode number. */ | ||
78 | __u32 pino; /* Parent's inode number. */ | ||
79 | __u32 version; /* Version number. */ | ||
80 | __u32 mode; /* The file's type or mode. */ | ||
81 | __u16 uid; /* The file's owner. */ | ||
82 | __u16 gid; /* The file's group. */ | ||
83 | __u32 atime; /* Last access time. */ | ||
84 | __u32 mtime; /* Last modification time. */ | ||
85 | __u32 ctime; /* Creation time. */ | ||
86 | __u32 offset; /* Where to begin to write. */ | ||
87 | __u32 dsize; /* Size of the node's data. */ | ||
88 | __u32 rsize; /* How much are going to be replaced? */ | ||
89 | __u8 nsize; /* Name length. */ | ||
90 | __u8 nlink; /* Number of links. */ | ||
91 | __u8 spare : 6; /* For future use. */ | ||
92 | __u8 rename : 1; /* Rename to a name of an already existing file? */ | ||
93 | __u8 deleted : 1; /* Has this file been deleted? */ | ||
94 | __u8 accurate; /* The inode is obsolete if accurate == 0. */ | ||
95 | __u32 dchksum; /* Checksum for the data. */ | ||
96 | __u16 nchksum; /* Checksum for the name. */ | ||
97 | __u16 chksum; /* Checksum for the raw inode. */ | ||
98 | }; | ||
99 | |||
100 | /* Define the offset of the accurate byte in struct jffs_raw_inode. */ | ||
101 | #define JFFS_RAW_INODE_ACCURATE_OFFSET (sizeof(struct jffs_raw_inode) \ | ||
102 | - 2 * sizeof(__u32) - sizeof(__u8)) | ||
103 | |||
104 | /* Define the offset of the chksum member in struct jffs_raw_inode. */ | ||
105 | #define JFFS_RAW_INODE_CHKSUM_OFFSET (sizeof(struct jffs_raw_inode) \ | ||
106 | - sizeof(__u16)) | ||
107 | |||
108 | /* Define the offset of the dchksum member in struct jffs_raw_inode. */ | ||
109 | #define JFFS_RAW_INODE_DCHKSUM_OFFSET (sizeof(struct jffs_raw_inode) \ | ||
110 | - sizeof(__u16) - sizeof(__u16) \ | ||
111 | - sizeof(__u32)) | ||
112 | |||
113 | |||
114 | /* The RAM representation of the node. The names of pointers to | ||
115 | jffs_nodes are very often just called `n' in the source code. */ | ||
116 | struct jffs_node | ||
117 | { | ||
118 | __u32 ino; /* Inode number. */ | ||
119 | __u32 version; /* Version number. */ | ||
120 | __u32 data_offset; /* Logic location of the data to insert. */ | ||
121 | __u32 data_size; /* The amount of data this node inserts. */ | ||
122 | __u32 removed_size; /* The amount of data that this node removes. */ | ||
123 | __u32 fm_offset; /* Physical location of the data in the actual | ||
124 | flash memory data chunk. */ | ||
125 | __u8 name_size; /* Size of the name. */ | ||
126 | struct jffs_fm *fm; /* Physical memory information. */ | ||
127 | struct jffs_node *version_prev; | ||
128 | struct jffs_node *version_next; | ||
129 | struct jffs_node *range_prev; | ||
130 | struct jffs_node *range_next; | ||
131 | }; | ||
132 | |||
133 | |||
134 | /* The RAM representation of a file (plain files, directories, | ||
135 | links, etc.). Pointers to jffs_files are normally named `f' | ||
136 | in the JFFS source code. */ | ||
137 | struct jffs_file | ||
138 | { | ||
139 | __u32 ino; /* Inode number. */ | ||
140 | __u32 pino; /* Parent's inode number. */ | ||
141 | __u32 mode; /* file_type, mode */ | ||
142 | __u16 uid; /* owner */ | ||
143 | __u16 gid; /* group */ | ||
144 | __u32 atime; /* Last access time. */ | ||
145 | __u32 mtime; /* Last modification time. */ | ||
146 | __u32 ctime; /* Creation time. */ | ||
147 | __u8 nsize; /* Name length. */ | ||
148 | __u8 nlink; /* Number of links. */ | ||
149 | __u8 deleted; /* Has this file been deleted? */ | ||
150 | char *name; /* The name of this file; NULL-terminated. */ | ||
151 | __u32 size; /* The total size of the file's data. */ | ||
152 | __u32 highest_version; /* The highest version number of this file. */ | ||
153 | struct jffs_control *c; | ||
154 | struct jffs_file *parent; /* Reference to the parent directory. */ | ||
155 | struct jffs_file *children; /* Always NULL for plain files. */ | ||
156 | struct jffs_file *sibling_prev; /* Siblings in the same directory. */ | ||
157 | struct jffs_file *sibling_next; | ||
158 | struct list_head hash; /* hash list. */ | ||
159 | struct jffs_node *range_head; /* The final data. */ | ||
160 | struct jffs_node *range_tail; /* The first data. */ | ||
161 | struct jffs_node *version_head; /* The youngest node. */ | ||
162 | struct jffs_node *version_tail; /* The oldest node. */ | ||
163 | }; | ||
164 | |||
165 | |||
166 | /* This is just a definition of a simple list used for keeping track of | ||
167 | files deleted due to a rename. This list is only used during the | ||
168 | mounting of the file system and only if there have been rename operations | ||
169 | earlier. */ | ||
170 | struct jffs_delete_list | ||
171 | { | ||
172 | __u32 ino; | ||
173 | struct jffs_delete_list *next; | ||
174 | }; | ||
175 | |||
176 | |||
177 | /* A struct for the overall file system control. Pointers to | ||
178 | jffs_control structs are named `c' in the source code. */ | ||
179 | struct jffs_control | ||
180 | { | ||
181 | struct super_block *sb; /* Reference to the VFS super block. */ | ||
182 | struct jffs_file *root; /* The root directory file. */ | ||
183 | struct list_head *hash; /* Hash table for finding files by ino. */ | ||
184 | struct jffs_fmcontrol *fmc; /* Flash memory control structure. */ | ||
185 | __u32 hash_len; /* The size of the hash table. */ | ||
186 | __u32 next_ino; /* Next inode number to use for new files. */ | ||
187 | __u16 building_fs; /* Is the file system being built right now? */ | ||
188 | struct jffs_delete_list *delete_list; /* Track deleted files. */ | ||
189 | pid_t thread_pid; /* GC thread's PID */ | ||
190 | struct task_struct *gc_task; /* GC task struct */ | ||
191 | struct completion gc_thread_comp; /* GC thread exit mutex */ | ||
192 | __u32 gc_minfree_threshold; /* GC trigger thresholds */ | ||
193 | __u32 gc_maxdirty_threshold; | ||
194 | }; | ||
195 | |||
196 | |||
197 | /* Used to inform about flash status. */ | ||
198 | struct jffs_flash_status | ||
199 | { | ||
200 | __u32 size; | ||
201 | __u32 used; | ||
202 | __u32 dirty; | ||
203 | __u32 begin; | ||
204 | __u32 end; | ||
205 | }; | ||
206 | |||
207 | /* This stuff could be used for finding memory leaks. */ | ||
208 | #define JFFS_MEMORY_DEBUG 0 | ||
209 | |||
210 | extern long no_jffs_node; | ||
211 | #if defined(JFFS_MEMORY_DEBUG) && JFFS_MEMORY_DEBUG | ||
212 | extern long no_jffs_control; | ||
213 | extern long no_jffs_raw_inode; | ||
214 | extern long no_jffs_node_ref; | ||
215 | extern long no_jffs_fm; | ||
216 | extern long no_jffs_fmcontrol; | ||
217 | extern long no_hash; | ||
218 | extern long no_name; | ||
219 | #define DJM(x) x | ||
220 | #else | ||
221 | #define DJM(x) | ||
222 | #endif | ||
223 | |||
224 | #endif /* __LINUX_JFFS_H__ */ | ||
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index 0ec6e28bccd2..c080f61fb024 100644 --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h | |||
@@ -142,13 +142,13 @@ static inline u64 get_jiffies_64(void) | |||
142 | * | 142 | * |
143 | * And some not so obvious. | 143 | * And some not so obvious. |
144 | * | 144 | * |
145 | * Note that we don't want to return MAX_LONG, because | 145 | * Note that we don't want to return LONG_MAX, because |
146 | * for various timeout reasons we often end up having | 146 | * for various timeout reasons we often end up having |
147 | * to wait "jiffies+1" in order to guarantee that we wait | 147 | * to wait "jiffies+1" in order to guarantee that we wait |
148 | * at _least_ "jiffies" - so "jiffies+1" had better still | 148 | * at _least_ "jiffies" - so "jiffies+1" had better still |
149 | * be positive. | 149 | * be positive. |
150 | */ | 150 | */ |
151 | #define MAX_JIFFY_OFFSET ((~0UL >> 1)-1) | 151 | #define MAX_JIFFY_OFFSET ((LONG_MAX >> 1)-1) |
152 | 152 | ||
153 | /* | 153 | /* |
154 | * We want to do realistic conversions of time so we need to use the same | 154 | * We want to do realistic conversions of time so we need to use the same |
@@ -259,207 +259,23 @@ static inline u64 get_jiffies_64(void) | |||
259 | #endif | 259 | #endif |
260 | 260 | ||
261 | /* | 261 | /* |
262 | * Convert jiffies to milliseconds and back. | 262 | * Convert various time units to each other: |
263 | * | ||
264 | * Avoid unnecessary multiplications/divisions in the | ||
265 | * two most common HZ cases: | ||
266 | */ | ||
267 | static inline unsigned int jiffies_to_msecs(const unsigned long j) | ||
268 | { | ||
269 | #if HZ <= MSEC_PER_SEC && !(MSEC_PER_SEC % HZ) | ||
270 | return (MSEC_PER_SEC / HZ) * j; | ||
271 | #elif HZ > MSEC_PER_SEC && !(HZ % MSEC_PER_SEC) | ||
272 | return (j + (HZ / MSEC_PER_SEC) - 1)/(HZ / MSEC_PER_SEC); | ||
273 | #else | ||
274 | return (j * MSEC_PER_SEC) / HZ; | ||
275 | #endif | ||
276 | } | ||
277 | |||
278 | static inline unsigned int jiffies_to_usecs(const unsigned long j) | ||
279 | { | ||
280 | #if HZ <= USEC_PER_SEC && !(USEC_PER_SEC % HZ) | ||
281 | return (USEC_PER_SEC / HZ) * j; | ||
282 | #elif HZ > USEC_PER_SEC && !(HZ % USEC_PER_SEC) | ||
283 | return (j + (HZ / USEC_PER_SEC) - 1)/(HZ / USEC_PER_SEC); | ||
284 | #else | ||
285 | return (j * USEC_PER_SEC) / HZ; | ||
286 | #endif | ||
287 | } | ||
288 | |||
289 | static inline unsigned long msecs_to_jiffies(const unsigned int m) | ||
290 | { | ||
291 | if (m > jiffies_to_msecs(MAX_JIFFY_OFFSET)) | ||
292 | return MAX_JIFFY_OFFSET; | ||
293 | #if HZ <= MSEC_PER_SEC && !(MSEC_PER_SEC % HZ) | ||
294 | return (m + (MSEC_PER_SEC / HZ) - 1) / (MSEC_PER_SEC / HZ); | ||
295 | #elif HZ > MSEC_PER_SEC && !(HZ % MSEC_PER_SEC) | ||
296 | return m * (HZ / MSEC_PER_SEC); | ||
297 | #else | ||
298 | return (m * HZ + MSEC_PER_SEC - 1) / MSEC_PER_SEC; | ||
299 | #endif | ||
300 | } | ||
301 | |||
302 | static inline unsigned long usecs_to_jiffies(const unsigned int u) | ||
303 | { | ||
304 | if (u > jiffies_to_usecs(MAX_JIFFY_OFFSET)) | ||
305 | return MAX_JIFFY_OFFSET; | ||
306 | #if HZ <= USEC_PER_SEC && !(USEC_PER_SEC % HZ) | ||
307 | return (u + (USEC_PER_SEC / HZ) - 1) / (USEC_PER_SEC / HZ); | ||
308 | #elif HZ > USEC_PER_SEC && !(HZ % USEC_PER_SEC) | ||
309 | return u * (HZ / USEC_PER_SEC); | ||
310 | #else | ||
311 | return (u * HZ + USEC_PER_SEC - 1) / USEC_PER_SEC; | ||
312 | #endif | ||
313 | } | ||
314 | |||
315 | /* | ||
316 | * The TICK_NSEC - 1 rounds up the value to the next resolution. Note | ||
317 | * that a remainder subtract here would not do the right thing as the | ||
318 | * resolution values don't fall on second boundries. I.e. the line: | ||
319 | * nsec -= nsec % TICK_NSEC; is NOT a correct resolution rounding. | ||
320 | * | ||
321 | * Rather, we just shift the bits off the right. | ||
322 | * | ||
323 | * The >> (NSEC_JIFFIE_SC - SEC_JIFFIE_SC) converts the scaled nsec | ||
324 | * value to a scaled second value. | ||
325 | */ | ||
326 | static __inline__ unsigned long | ||
327 | timespec_to_jiffies(const struct timespec *value) | ||
328 | { | ||
329 | unsigned long sec = value->tv_sec; | ||
330 | long nsec = value->tv_nsec + TICK_NSEC - 1; | ||
331 | |||
332 | if (sec >= MAX_SEC_IN_JIFFIES){ | ||
333 | sec = MAX_SEC_IN_JIFFIES; | ||
334 | nsec = 0; | ||
335 | } | ||
336 | return (((u64)sec * SEC_CONVERSION) + | ||
337 | (((u64)nsec * NSEC_CONVERSION) >> | ||
338 | (NSEC_JIFFIE_SC - SEC_JIFFIE_SC))) >> SEC_JIFFIE_SC; | ||
339 | |||
340 | } | ||
341 | |||
342 | static __inline__ void | ||
343 | jiffies_to_timespec(const unsigned long jiffies, struct timespec *value) | ||
344 | { | ||
345 | /* | ||
346 | * Convert jiffies to nanoseconds and separate with | ||
347 | * one divide. | ||
348 | */ | ||
349 | u64 nsec = (u64)jiffies * TICK_NSEC; | ||
350 | value->tv_sec = div_long_long_rem(nsec, NSEC_PER_SEC, &value->tv_nsec); | ||
351 | } | ||
352 | |||
353 | /* Same for "timeval" | ||
354 | * | ||
355 | * Well, almost. The problem here is that the real system resolution is | ||
356 | * in nanoseconds and the value being converted is in micro seconds. | ||
357 | * Also for some machines (those that use HZ = 1024, in-particular), | ||
358 | * there is a LARGE error in the tick size in microseconds. | ||
359 | |||
360 | * The solution we use is to do the rounding AFTER we convert the | ||
361 | * microsecond part. Thus the USEC_ROUND, the bits to be shifted off. | ||
362 | * Instruction wise, this should cost only an additional add with carry | ||
363 | * instruction above the way it was done above. | ||
364 | */ | ||
365 | static __inline__ unsigned long | ||
366 | timeval_to_jiffies(const struct timeval *value) | ||
367 | { | ||
368 | unsigned long sec = value->tv_sec; | ||
369 | long usec = value->tv_usec; | ||
370 | |||
371 | if (sec >= MAX_SEC_IN_JIFFIES){ | ||
372 | sec = MAX_SEC_IN_JIFFIES; | ||
373 | usec = 0; | ||
374 | } | ||
375 | return (((u64)sec * SEC_CONVERSION) + | ||
376 | (((u64)usec * USEC_CONVERSION + USEC_ROUND) >> | ||
377 | (USEC_JIFFIE_SC - SEC_JIFFIE_SC))) >> SEC_JIFFIE_SC; | ||
378 | } | ||
379 | |||
380 | static __inline__ void | ||
381 | jiffies_to_timeval(const unsigned long jiffies, struct timeval *value) | ||
382 | { | ||
383 | /* | ||
384 | * Convert jiffies to nanoseconds and separate with | ||
385 | * one divide. | ||
386 | */ | ||
387 | u64 nsec = (u64)jiffies * TICK_NSEC; | ||
388 | long tv_usec; | ||
389 | |||
390 | value->tv_sec = div_long_long_rem(nsec, NSEC_PER_SEC, &tv_usec); | ||
391 | tv_usec /= NSEC_PER_USEC; | ||
392 | value->tv_usec = tv_usec; | ||
393 | } | ||
394 | |||
395 | /* | ||
396 | * Convert jiffies/jiffies_64 to clock_t and back. | ||
397 | */ | 263 | */ |
398 | static inline clock_t jiffies_to_clock_t(long x) | 264 | extern unsigned int jiffies_to_msecs(const unsigned long j); |
399 | { | 265 | extern unsigned int jiffies_to_usecs(const unsigned long j); |
400 | #if (TICK_NSEC % (NSEC_PER_SEC / USER_HZ)) == 0 | 266 | extern unsigned long msecs_to_jiffies(const unsigned int m); |
401 | return x / (HZ / USER_HZ); | 267 | extern unsigned long usecs_to_jiffies(const unsigned int u); |
402 | #else | 268 | extern unsigned long timespec_to_jiffies(const struct timespec *value); |
403 | u64 tmp = (u64)x * TICK_NSEC; | 269 | extern void jiffies_to_timespec(const unsigned long jiffies, |
404 | do_div(tmp, (NSEC_PER_SEC / USER_HZ)); | 270 | struct timespec *value); |
405 | return (long)tmp; | 271 | extern unsigned long timeval_to_jiffies(const struct timeval *value); |
406 | #endif | 272 | extern void jiffies_to_timeval(const unsigned long jiffies, |
407 | } | 273 | struct timeval *value); |
408 | 274 | extern clock_t jiffies_to_clock_t(long x); | |
409 | static inline unsigned long clock_t_to_jiffies(unsigned long x) | 275 | extern unsigned long clock_t_to_jiffies(unsigned long x); |
410 | { | 276 | extern u64 jiffies_64_to_clock_t(u64 x); |
411 | #if (HZ % USER_HZ)==0 | 277 | extern u64 nsec_to_clock_t(u64 x); |
412 | if (x >= ~0UL / (HZ / USER_HZ)) | 278 | |
413 | return ~0UL; | 279 | #define TIMESTAMP_SIZE 30 |
414 | return x * (HZ / USER_HZ); | ||
415 | #else | ||
416 | u64 jif; | ||
417 | |||
418 | /* Don't worry about loss of precision here .. */ | ||
419 | if (x >= ~0UL / HZ * USER_HZ) | ||
420 | return ~0UL; | ||
421 | |||
422 | /* .. but do try to contain it here */ | ||
423 | jif = x * (u64) HZ; | ||
424 | do_div(jif, USER_HZ); | ||
425 | return jif; | ||
426 | #endif | ||
427 | } | ||
428 | |||
429 | static inline u64 jiffies_64_to_clock_t(u64 x) | ||
430 | { | ||
431 | #if (TICK_NSEC % (NSEC_PER_SEC / USER_HZ)) == 0 | ||
432 | do_div(x, HZ / USER_HZ); | ||
433 | #else | ||
434 | /* | ||
435 | * There are better ways that don't overflow early, | ||
436 | * but even this doesn't overflow in hundreds of years | ||
437 | * in 64 bits, so.. | ||
438 | */ | ||
439 | x *= TICK_NSEC; | ||
440 | do_div(x, (NSEC_PER_SEC / USER_HZ)); | ||
441 | #endif | ||
442 | return x; | ||
443 | } | ||
444 | |||
445 | static inline u64 nsec_to_clock_t(u64 x) | ||
446 | { | ||
447 | #if (NSEC_PER_SEC % USER_HZ) == 0 | ||
448 | do_div(x, (NSEC_PER_SEC / USER_HZ)); | ||
449 | #elif (USER_HZ % 512) == 0 | ||
450 | x *= USER_HZ/512; | ||
451 | do_div(x, (NSEC_PER_SEC / 512)); | ||
452 | #else | ||
453 | /* | ||
454 | * max relative error 5.7e-8 (1.8s per year) for USER_HZ <= 1024, | ||
455 | * overflow after 64.99 years. | ||
456 | * exact for HZ=60, 72, 90, 120, 144, 180, 300, 600, 900, ... | ||
457 | */ | ||
458 | x *= 9; | ||
459 | do_div(x, (unsigned long)((9ull * NSEC_PER_SEC + (USER_HZ/2)) | ||
460 | / USER_HZ)); | ||
461 | #endif | ||
462 | return x; | ||
463 | } | ||
464 | 280 | ||
465 | #endif | 281 | #endif |
diff --git a/include/linux/kdev_t.h b/include/linux/kdev_t.h index bceea527dd37..4c2c3737e415 100644 --- a/include/linux/kdev_t.h +++ b/include/linux/kdev_t.h | |||
@@ -87,6 +87,7 @@ static inline unsigned sysv_minor(u32 dev) | |||
87 | return dev & 0x3ffff; | 87 | return dev & 0x3ffff; |
88 | } | 88 | } |
89 | 89 | ||
90 | bool is_lanana_major(unsigned int major); | ||
90 | 91 | ||
91 | #else /* __KERNEL__ */ | 92 | #else /* __KERNEL__ */ |
92 | 93 | ||
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 63fb18dcac30..9ddf25c21538 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -92,11 +92,6 @@ extern int cond_resched(void); | |||
92 | (__x < 0) ? -__x : __x; \ | 92 | (__x < 0) ? -__x : __x; \ |
93 | }) | 93 | }) |
94 | 94 | ||
95 | #define labs(x) ({ \ | ||
96 | long __x = (x); \ | ||
97 | (__x < 0) ? -__x : __x; \ | ||
98 | }) | ||
99 | |||
100 | extern struct atomic_notifier_head panic_notifier_list; | 95 | extern struct atomic_notifier_head panic_notifier_list; |
101 | extern long (*panic_blink)(long time); | 96 | extern long (*panic_blink)(long time); |
102 | NORET_TYPE void panic(const char * fmt, ...) | 97 | NORET_TYPE void panic(const char * fmt, ...) |
@@ -139,7 +134,8 @@ extern unsigned long long memparse(char *ptr, char **retptr); | |||
139 | extern int core_kernel_text(unsigned long addr); | 134 | extern int core_kernel_text(unsigned long addr); |
140 | extern int __kernel_text_address(unsigned long addr); | 135 | extern int __kernel_text_address(unsigned long addr); |
141 | extern int kernel_text_address(unsigned long addr); | 136 | extern int kernel_text_address(unsigned long addr); |
142 | extern int session_of_pgrp(int pgrp); | 137 | struct pid; |
138 | extern struct pid *session_of_pgrp(struct pid *pgrp); | ||
143 | 139 | ||
144 | extern void dump_thread(struct pt_regs *regs, struct user *dump); | 140 | extern void dump_thread(struct pt_regs *regs, struct user *dump); |
145 | 141 | ||
@@ -176,6 +172,7 @@ static inline void console_verbose(void) | |||
176 | } | 172 | } |
177 | 173 | ||
178 | extern void bust_spinlocks(int yes); | 174 | extern void bust_spinlocks(int yes); |
175 | extern void wake_up_klogd(void); | ||
179 | extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in progress */ | 176 | extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in progress */ |
180 | extern int panic_timeout; | 177 | extern int panic_timeout; |
181 | extern int panic_on_oops; | 178 | extern int panic_on_oops; |
@@ -200,6 +197,7 @@ extern enum system_states { | |||
200 | #define TAINT_FORCED_RMMOD (1<<3) | 197 | #define TAINT_FORCED_RMMOD (1<<3) |
201 | #define TAINT_MACHINE_CHECK (1<<4) | 198 | #define TAINT_MACHINE_CHECK (1<<4) |
202 | #define TAINT_BAD_PAGE (1<<5) | 199 | #define TAINT_BAD_PAGE (1<<5) |
200 | #define TAINT_USER (1<<6) | ||
203 | 201 | ||
204 | extern void dump_stack(void); | 202 | extern void dump_stack(void); |
205 | 203 | ||
@@ -312,6 +310,9 @@ static inline int __attribute__ ((format (printf, 1, 2))) pr_debug(const char * | |||
312 | (void)__tmp; \ | 310 | (void)__tmp; \ |
313 | }) | 311 | }) |
314 | 312 | ||
313 | struct sysinfo; | ||
314 | extern int do_sysinfo(struct sysinfo *info); | ||
315 | |||
315 | #endif /* __KERNEL__ */ | 316 | #endif /* __KERNEL__ */ |
316 | 317 | ||
317 | #define SI_LOAD_SHIFT 16 | 318 | #define SI_LOAD_SHIFT 16 |
diff --git a/include/linux/kexec.h b/include/linux/kexec.h index d02425cdd801..696e5ec63f77 100644 --- a/include/linux/kexec.h +++ b/include/linux/kexec.h | |||
@@ -125,6 +125,7 @@ extern struct kimage *kexec_crash_image; | |||
125 | #define KEXEC_ARCH_PPC (20 << 16) | 125 | #define KEXEC_ARCH_PPC (20 << 16) |
126 | #define KEXEC_ARCH_PPC64 (21 << 16) | 126 | #define KEXEC_ARCH_PPC64 (21 << 16) |
127 | #define KEXEC_ARCH_IA_64 (50 << 16) | 127 | #define KEXEC_ARCH_IA_64 (50 << 16) |
128 | #define KEXEC_ARCH_ARM (40 << 16) | ||
128 | #define KEXEC_ARCH_S390 (22 << 16) | 129 | #define KEXEC_ARCH_S390 (22 << 16) |
129 | #define KEXEC_ARCH_SH (42 << 16) | 130 | #define KEXEC_ARCH_SH (42 << 16) |
130 | #define KEXEC_ARCH_MIPS_LE (10 << 16) | 131 | #define KEXEC_ARCH_MIPS_LE (10 << 16) |
diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h index 48eccd865bd8..404f4464cb1a 100644 --- a/include/linux/kfifo.h +++ b/include/linux/kfifo.h | |||
@@ -74,7 +74,7 @@ static inline void kfifo_reset(struct kfifo *fifo) | |||
74 | * @buffer: the data to be added. | 74 | * @buffer: the data to be added. |
75 | * @len: the length of the data to be added. | 75 | * @len: the length of the data to be added. |
76 | * | 76 | * |
77 | * This function copies at most 'len' bytes from the 'buffer' into | 77 | * This function copies at most @len bytes from the @buffer into |
78 | * the FIFO depending on the free space, and returns the number of | 78 | * the FIFO depending on the free space, and returns the number of |
79 | * bytes copied. | 79 | * bytes copied. |
80 | */ | 80 | */ |
@@ -99,8 +99,8 @@ static inline unsigned int kfifo_put(struct kfifo *fifo, | |||
99 | * @buffer: where the data must be copied. | 99 | * @buffer: where the data must be copied. |
100 | * @len: the size of the destination buffer. | 100 | * @len: the size of the destination buffer. |
101 | * | 101 | * |
102 | * This function copies at most 'len' bytes from the FIFO into the | 102 | * This function copies at most @len bytes from the FIFO into the |
103 | * 'buffer' and returns the number of copied bytes. | 103 | * @buffer and returns the number of copied bytes. |
104 | */ | 104 | */ |
105 | static inline unsigned int kfifo_get(struct kfifo *fifo, | 105 | static inline unsigned int kfifo_get(struct kfifo *fifo, |
106 | unsigned char *buffer, unsigned int len) | 106 | unsigned char *buffer, unsigned int len) |
diff --git a/include/linux/ks0108.h b/include/linux/ks0108.h new file mode 100644 index 000000000000..a2c54acceb4e --- /dev/null +++ b/include/linux/ks0108.h | |||
@@ -0,0 +1,49 @@ | |||
1 | /* | ||
2 | * Filename: ks0108.h | ||
3 | * Version: 0.1.0 | ||
4 | * Description: ks0108 LCD Controller driver header | ||
5 | * License: GPLv2 | ||
6 | * | ||
7 | * Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com> | ||
8 | * Date: 2006-10-31 | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, | ||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | * GNU General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
22 | * | ||
23 | */ | ||
24 | |||
25 | #ifndef _KS0108_H_ | ||
26 | #define _KS0108_H_ | ||
27 | |||
28 | /* Write a byte to the data port */ | ||
29 | extern void ks0108_writedata(unsigned char byte); | ||
30 | |||
31 | /* Write a byte to the control port */ | ||
32 | extern void ks0108_writecontrol(unsigned char byte); | ||
33 | |||
34 | /* Set the controller's current display state (0..1) */ | ||
35 | extern void ks0108_displaystate(unsigned char state); | ||
36 | |||
37 | /* Set the controller's current startline (0..63) */ | ||
38 | extern void ks0108_startline(unsigned char startline); | ||
39 | |||
40 | /* Set the controller's current address (0..63) */ | ||
41 | extern void ks0108_address(unsigned char address); | ||
42 | |||
43 | /* Set the controller's current page (0..7) */ | ||
44 | extern void ks0108_page(unsigned char page); | ||
45 | |||
46 | /* Is the module inited? */ | ||
47 | extern unsigned char ks0108_isinited(void); | ||
48 | |||
49 | #endif /* _KS0108_H_ */ | ||
diff --git a/include/linux/ktime.h b/include/linux/ktime.h index 611f17f79eef..c68c7ac6b232 100644 --- a/include/linux/ktime.h +++ b/include/linux/ktime.h | |||
@@ -163,7 +163,7 @@ static inline ktime_t ktime_sub(const ktime_t lhs, const ktime_t rhs) | |||
163 | * @add1: addend1 | 163 | * @add1: addend1 |
164 | * @add2: addend2 | 164 | * @add2: addend2 |
165 | * | 165 | * |
166 | * Returns the sum of addend1 and addend2 | 166 | * Returns the sum of @add1 and @add2. |
167 | */ | 167 | */ |
168 | static inline ktime_t ktime_add(const ktime_t add1, const ktime_t add2) | 168 | static inline ktime_t ktime_add(const ktime_t add1, const ktime_t add2) |
169 | { | 169 | { |
@@ -189,7 +189,7 @@ static inline ktime_t ktime_add(const ktime_t add1, const ktime_t add2) | |||
189 | * @kt: addend | 189 | * @kt: addend |
190 | * @nsec: the scalar nsec value to add | 190 | * @nsec: the scalar nsec value to add |
191 | * | 191 | * |
192 | * Returns the sum of kt and nsec in ktime_t format | 192 | * Returns the sum of @kt and @nsec in ktime_t format |
193 | */ | 193 | */ |
194 | extern ktime_t ktime_add_ns(const ktime_t kt, u64 nsec); | 194 | extern ktime_t ktime_add_ns(const ktime_t kt, u64 nsec); |
195 | 195 | ||
@@ -246,7 +246,7 @@ static inline struct timeval ktime_to_timeval(const ktime_t kt) | |||
246 | * ktime_to_ns - convert a ktime_t variable to scalar nanoseconds | 246 | * ktime_to_ns - convert a ktime_t variable to scalar nanoseconds |
247 | * @kt: the ktime_t variable to convert | 247 | * @kt: the ktime_t variable to convert |
248 | * | 248 | * |
249 | * Returns the scalar nanoseconds representation of kt | 249 | * Returns the scalar nanoseconds representation of @kt |
250 | */ | 250 | */ |
251 | static inline s64 ktime_to_ns(const ktime_t kt) | 251 | static inline s64 ktime_to_ns(const ktime_t kt) |
252 | { | 252 | { |
@@ -261,8 +261,7 @@ static inline s64 ktime_to_ns(const ktime_t kt) | |||
261 | * idea of the (in)accuracy of timers. Timer values are rounded up to | 261 | * idea of the (in)accuracy of timers. Timer values are rounded up to |
262 | * this resolution values. | 262 | * this resolution values. |
263 | */ | 263 | */ |
264 | #define KTIME_REALTIME_RES (ktime_t){ .tv64 = TICK_NSEC } | 264 | #define KTIME_LOW_RES (ktime_t){ .tv64 = TICK_NSEC } |
265 | #define KTIME_MONOTONIC_RES (ktime_t){ .tv64 = TICK_NSEC } | ||
266 | 265 | ||
267 | /* Get the monotonic time in timespec format: */ | 266 | /* Get the monotonic time in timespec format: */ |
268 | extern void ktime_get_ts(struct timespec *ts); | 267 | extern void ktime_get_ts(struct timespec *ts); |
diff --git a/include/linux/kvm.h b/include/linux/kvm.h index 1be148f0fce4..f3604593fb76 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #include <asm/types.h> | 11 | #include <asm/types.h> |
12 | #include <linux/ioctl.h> | 12 | #include <linux/ioctl.h> |
13 | 13 | ||
14 | #define KVM_API_VERSION 2 | 14 | #define KVM_API_VERSION 3 |
15 | 15 | ||
16 | /* | 16 | /* |
17 | * Architectural interrupt line count, and the size of the bitmap needed | 17 | * Architectural interrupt line count, and the size of the bitmap needed |
@@ -65,6 +65,8 @@ struct kvm_run { | |||
65 | __u8 ready_for_interrupt_injection; | 65 | __u8 ready_for_interrupt_injection; |
66 | __u8 if_flag; | 66 | __u8 if_flag; |
67 | __u16 padding2; | 67 | __u16 padding2; |
68 | |||
69 | /* in (pre_kvm_run), out (post_kvm_run) */ | ||
68 | __u64 cr8; | 70 | __u64 cr8; |
69 | __u64 apic_base; | 71 | __u64 apic_base; |
70 | 72 | ||
@@ -185,6 +187,7 @@ struct kvm_translation { | |||
185 | __u8 valid; | 187 | __u8 valid; |
186 | __u8 writeable; | 188 | __u8 writeable; |
187 | __u8 usermode; | 189 | __u8 usermode; |
190 | __u8 pad[5]; | ||
188 | }; | 191 | }; |
189 | 192 | ||
190 | /* for KVM_INTERRUPT */ | 193 | /* for KVM_INTERRUPT */ |
diff --git a/include/linux/lcd.h b/include/linux/lcd.h index d739b2e7eac2..598793c0745b 100644 --- a/include/linux/lcd.h +++ b/include/linux/lcd.h | |||
@@ -9,22 +9,38 @@ | |||
9 | #define _LINUX_LCD_H | 9 | #define _LINUX_LCD_H |
10 | 10 | ||
11 | #include <linux/device.h> | 11 | #include <linux/device.h> |
12 | #include <linux/mutex.h> | ||
12 | #include <linux/notifier.h> | 13 | #include <linux/notifier.h> |
13 | 14 | ||
15 | /* Notes on locking: | ||
16 | * | ||
17 | * lcd_device->ops_lock is an internal backlight lock protecting the ops | ||
18 | * field and no code outside the core should need to touch it. | ||
19 | * | ||
20 | * Access to set_power() is serialised by the update_lock mutex since | ||
21 | * most drivers seem to need this and historically get it wrong. | ||
22 | * | ||
23 | * Most drivers don't need locking on their get_power() method. | ||
24 | * If yours does, you need to implement it in the driver. You can use the | ||
25 | * update_lock mutex if appropriate. | ||
26 | * | ||
27 | * Any other use of the locks below is probably wrong. | ||
28 | */ | ||
29 | |||
14 | struct lcd_device; | 30 | struct lcd_device; |
15 | struct fb_info; | 31 | struct fb_info; |
16 | 32 | ||
17 | /* This structure defines all the properties of a LCD flat panel. */ | ||
18 | struct lcd_properties { | 33 | struct lcd_properties { |
19 | /* Owner module */ | 34 | /* The maximum value for contrast (read-only) */ |
20 | struct module *owner; | 35 | int max_contrast; |
36 | }; | ||
37 | |||
38 | struct lcd_ops { | ||
21 | /* Get the LCD panel power status (0: full on, 1..3: controller | 39 | /* Get the LCD panel power status (0: full on, 1..3: controller |
22 | power on, flat panel power off, 4: full off), see FB_BLANK_XXX */ | 40 | power on, flat panel power off, 4: full off), see FB_BLANK_XXX */ |
23 | int (*get_power)(struct lcd_device *); | 41 | int (*get_power)(struct lcd_device *); |
24 | /* Enable or disable power to the LCD (0: on; 4: off, see FB_BLANK_XXX) */ | 42 | /* Enable or disable power to the LCD (0: on; 4: off, see FB_BLANK_XXX) */ |
25 | int (*set_power)(struct lcd_device *, int power); | 43 | int (*set_power)(struct lcd_device *, int power); |
26 | /* The maximum value for contrast (read-only) */ | ||
27 | int max_contrast; | ||
28 | /* Get the current contrast setting (0-max_contrast) */ | 44 | /* Get the current contrast setting (0-max_contrast) */ |
29 | int (*get_contrast)(struct lcd_device *); | 45 | int (*get_contrast)(struct lcd_device *); |
30 | /* Set LCD panel contrast */ | 46 | /* Set LCD panel contrast */ |
@@ -35,20 +51,31 @@ struct lcd_properties { | |||
35 | }; | 51 | }; |
36 | 52 | ||
37 | struct lcd_device { | 53 | struct lcd_device { |
38 | /* This protects the 'props' field. If 'props' is NULL, the driver that | 54 | struct lcd_properties props; |
55 | /* This protects the 'ops' field. If 'ops' is NULL, the driver that | ||
39 | registered this device has been unloaded, and if class_get_devdata() | 56 | registered this device has been unloaded, and if class_get_devdata() |
40 | points to something in the body of that driver, it is also invalid. */ | 57 | points to something in the body of that driver, it is also invalid. */ |
41 | struct semaphore sem; | 58 | struct mutex ops_lock; |
42 | /* If this is NULL, the backing module is unloaded */ | 59 | /* If this is NULL, the backing module is unloaded */ |
43 | struct lcd_properties *props; | 60 | struct lcd_ops *ops; |
61 | /* Serialise access to set_power method */ | ||
62 | struct mutex update_lock; | ||
44 | /* The framebuffer notifier block */ | 63 | /* The framebuffer notifier block */ |
45 | struct notifier_block fb_notif; | 64 | struct notifier_block fb_notif; |
46 | /* The class device structure */ | 65 | /* The class device structure */ |
47 | struct class_device class_dev; | 66 | struct class_device class_dev; |
48 | }; | 67 | }; |
49 | 68 | ||
69 | static inline void lcd_set_power(struct lcd_device *ld, int power) | ||
70 | { | ||
71 | mutex_lock(&ld->update_lock); | ||
72 | if (ld->ops && ld->ops->set_power) | ||
73 | ld->ops->set_power(ld, power); | ||
74 | mutex_unlock(&ld->update_lock); | ||
75 | } | ||
76 | |||
50 | extern struct lcd_device *lcd_device_register(const char *name, | 77 | extern struct lcd_device *lcd_device_register(const char *name, |
51 | void *devdata, struct lcd_properties *lp); | 78 | void *devdata, struct lcd_ops *ops); |
52 | extern void lcd_device_unregister(struct lcd_device *ld); | 79 | extern void lcd_device_unregister(struct lcd_device *ld); |
53 | 80 | ||
54 | #define to_lcd_device(obj) container_of(obj, struct lcd_device, class_dev) | 81 | #define to_lcd_device(obj) container_of(obj, struct lcd_device, class_dev) |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 596e0c18887d..86762a9f52ba 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/ata.h> | 35 | #include <linux/ata.h> |
36 | #include <linux/workqueue.h> | 36 | #include <linux/workqueue.h> |
37 | #include <scsi/scsi_host.h> | 37 | #include <scsi/scsi_host.h> |
38 | #include <linux/acpi.h> | ||
38 | 39 | ||
39 | /* | 40 | /* |
40 | * Define if arch has non-standard setup. This is a _PCI_ standard | 41 | * Define if arch has non-standard setup. This is a _PCI_ standard |
@@ -172,6 +173,7 @@ enum { | |||
172 | ATA_FLAG_DEBUGMSG = (1 << 13), | 173 | ATA_FLAG_DEBUGMSG = (1 << 13), |
173 | ATA_FLAG_SETXFER_POLLING= (1 << 14), /* use polling for SETXFER */ | 174 | ATA_FLAG_SETXFER_POLLING= (1 << 14), /* use polling for SETXFER */ |
174 | ATA_FLAG_IGN_SIMPLEX = (1 << 15), /* ignore SIMPLEX */ | 175 | ATA_FLAG_IGN_SIMPLEX = (1 << 15), /* ignore SIMPLEX */ |
176 | ATA_FLAG_NO_IORDY = (1 << 16), /* controller lacks iordy */ | ||
175 | 177 | ||
176 | /* The following flag belongs to ap->pflags but is kept in | 178 | /* The following flag belongs to ap->pflags but is kept in |
177 | * ap->flags because it's referenced in many LLDs and will be | 179 | * ap->flags because it's referenced in many LLDs and will be |
@@ -494,6 +496,10 @@ struct ata_device { | |||
494 | /* error history */ | 496 | /* error history */ |
495 | struct ata_ering ering; | 497 | struct ata_ering ering; |
496 | unsigned int horkage; /* List of broken features */ | 498 | unsigned int horkage; /* List of broken features */ |
499 | #ifdef CONFIG_SATA_ACPI | ||
500 | /* ACPI objects info */ | ||
501 | acpi_handle obj_handle; | ||
502 | #endif | ||
497 | }; | 503 | }; |
498 | 504 | ||
499 | /* Offset into struct ata_device. Fields above it are maintained | 505 | /* Offset into struct ata_device. Fields above it are maintained |
diff --git a/include/linux/list.h b/include/linux/list.h index 611059d633f4..f9d71eab05ee 100644 --- a/include/linux/list.h +++ b/include/linux/list.h | |||
@@ -161,7 +161,7 @@ static inline void __list_del(struct list_head * prev, struct list_head * next) | |||
161 | /** | 161 | /** |
162 | * list_del - deletes entry from list. | 162 | * list_del - deletes entry from list. |
163 | * @entry: the element to delete from the list. | 163 | * @entry: the element to delete from the list. |
164 | * Note: list_empty on entry does not return true after this, the entry is | 164 | * Note: list_empty() on entry does not return true after this, the entry is |
165 | * in an undefined state. | 165 | * in an undefined state. |
166 | */ | 166 | */ |
167 | #ifndef CONFIG_DEBUG_LIST | 167 | #ifndef CONFIG_DEBUG_LIST |
@@ -179,7 +179,7 @@ extern void list_del(struct list_head *entry); | |||
179 | * list_del_rcu - deletes entry from list without re-initialization | 179 | * list_del_rcu - deletes entry from list without re-initialization |
180 | * @entry: the element to delete from the list. | 180 | * @entry: the element to delete from the list. |
181 | * | 181 | * |
182 | * Note: list_empty on entry does not return true after this, | 182 | * Note: list_empty() on entry does not return true after this, |
183 | * the entry is in an undefined state. It is useful for RCU based | 183 | * the entry is in an undefined state. It is useful for RCU based |
184 | * lockfree traversal. | 184 | * lockfree traversal. |
185 | * | 185 | * |
@@ -209,7 +209,8 @@ static inline void list_del_rcu(struct list_head *entry) | |||
209 | * list_replace - replace old entry by new one | 209 | * list_replace - replace old entry by new one |
210 | * @old : the element to be replaced | 210 | * @old : the element to be replaced |
211 | * @new : the new element to insert | 211 | * @new : the new element to insert |
212 | * Note: if 'old' was empty, it will be overwritten. | 212 | * |
213 | * If @old was empty, it will be overwritten. | ||
213 | */ | 214 | */ |
214 | static inline void list_replace(struct list_head *old, | 215 | static inline void list_replace(struct list_head *old, |
215 | struct list_head *new) | 216 | struct list_head *new) |
@@ -360,6 +361,62 @@ static inline void list_splice_init(struct list_head *list, | |||
360 | } | 361 | } |
361 | 362 | ||
362 | /** | 363 | /** |
364 | * list_splice_init_rcu - splice an RCU-protected list into an existing list. | ||
365 | * @list: the RCU-protected list to splice | ||
366 | * @head: the place in the list to splice the first list into | ||
367 | * @sync: function to sync: synchronize_rcu(), synchronize_sched(), ... | ||
368 | * | ||
369 | * @head can be RCU-read traversed concurrently with this function. | ||
370 | * | ||
371 | * Note that this function blocks. | ||
372 | * | ||
373 | * Important note: the caller must take whatever action is necessary to | ||
374 | * prevent any other updates to @head. In principle, it is possible | ||
375 | * to modify the list as soon as sync() begins execution. | ||
376 | * If this sort of thing becomes necessary, an alternative version | ||
377 | * based on call_rcu() could be created. But only if -really- | ||
378 | * needed -- there is no shortage of RCU API members. | ||
379 | */ | ||
380 | static inline void list_splice_init_rcu(struct list_head *list, | ||
381 | struct list_head *head, | ||
382 | void (*sync)(void)) | ||
383 | { | ||
384 | struct list_head *first = list->next; | ||
385 | struct list_head *last = list->prev; | ||
386 | struct list_head *at = head->next; | ||
387 | |||
388 | if (list_empty(head)) | ||
389 | return; | ||
390 | |||
391 | /* "first" and "last" tracking list, so initialize it. */ | ||
392 | |||
393 | INIT_LIST_HEAD(list); | ||
394 | |||
395 | /* | ||
396 | * At this point, the list body still points to the source list. | ||
397 | * Wait for any readers to finish using the list before splicing | ||
398 | * the list body into the new list. Any new readers will see | ||
399 | * an empty list. | ||
400 | */ | ||
401 | |||
402 | sync(); | ||
403 | |||
404 | /* | ||
405 | * Readers are finished with the source list, so perform splice. | ||
406 | * The order is important if the new list is global and accessible | ||
407 | * to concurrent RCU readers. Note that RCU readers are not | ||
408 | * permitted to traverse the prev pointers without excluding | ||
409 | * this function. | ||
410 | */ | ||
411 | |||
412 | last->next = at; | ||
413 | smp_wmb(); | ||
414 | head->next = first; | ||
415 | first->prev = head; | ||
416 | at->prev = last; | ||
417 | } | ||
418 | |||
419 | /** | ||
363 | * list_entry - get the struct for this entry | 420 | * list_entry - get the struct for this entry |
364 | * @ptr: the &struct list_head pointer. | 421 | * @ptr: the &struct list_head pointer. |
365 | * @type: the type of the struct this is embedded in. | 422 | * @type: the type of the struct this is embedded in. |
@@ -432,12 +489,12 @@ static inline void list_splice_init(struct list_head *list, | |||
432 | pos = list_entry(pos->member.prev, typeof(*pos), member)) | 489 | pos = list_entry(pos->member.prev, typeof(*pos), member)) |
433 | 490 | ||
434 | /** | 491 | /** |
435 | * list_prepare_entry - prepare a pos entry for use in list_for_each_entry_continue | 492 | * list_prepare_entry - prepare a pos entry for use in list_for_each_entry_continue() |
436 | * @pos: the type * to use as a start point | 493 | * @pos: the type * to use as a start point |
437 | * @head: the head of the list | 494 | * @head: the head of the list |
438 | * @member: the name of the list_struct within the struct. | 495 | * @member: the name of the list_struct within the struct. |
439 | * | 496 | * |
440 | * Prepares a pos entry for use as a start point in list_for_each_entry_continue. | 497 | * Prepares a pos entry for use as a start point in list_for_each_entry_continue(). |
441 | */ | 498 | */ |
442 | #define list_prepare_entry(pos, head, member) \ | 499 | #define list_prepare_entry(pos, head, member) \ |
443 | ((pos) ? : list_entry(head, typeof(*pos), member)) | 500 | ((pos) ? : list_entry(head, typeof(*pos), member)) |
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index ea097dddc44f..06fe93a3e916 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h | |||
@@ -8,6 +8,8 @@ | |||
8 | #ifndef __LINUX_LOCKDEP_H | 8 | #ifndef __LINUX_LOCKDEP_H |
9 | #define __LINUX_LOCKDEP_H | 9 | #define __LINUX_LOCKDEP_H |
10 | 10 | ||
11 | struct task_struct; | ||
12 | |||
11 | #ifdef CONFIG_LOCKDEP | 13 | #ifdef CONFIG_LOCKDEP |
12 | 14 | ||
13 | #include <linux/linkage.h> | 15 | #include <linux/linkage.h> |
@@ -132,6 +134,7 @@ struct lock_list { | |||
132 | struct list_head entry; | 134 | struct list_head entry; |
133 | struct lock_class *class; | 135 | struct lock_class *class; |
134 | struct stack_trace trace; | 136 | struct stack_trace trace; |
137 | int distance; | ||
135 | }; | 138 | }; |
136 | 139 | ||
137 | /* | 140 | /* |
diff --git a/include/linux/log2.h b/include/linux/log2.h index 99922bedfcc9..57e641e19a81 100644 --- a/include/linux/log2.h +++ b/include/linux/log2.h | |||
@@ -152,7 +152,7 @@ unsigned long __roundup_pow_of_two(unsigned long n) | |||
152 | * roundup_pow_of_two - round the given value up to nearest power of two | 152 | * roundup_pow_of_two - round the given value up to nearest power of two |
153 | * @n - parameter | 153 | * @n - parameter |
154 | * | 154 | * |
155 | * round the given balue up to the nearest power of two | 155 | * round the given value up to the nearest power of two |
156 | * - the result is undefined when n == 0 | 156 | * - the result is undefined when n == 0 |
157 | * - this can be used to initialise global variables from constant data | 157 | * - this can be used to initialise global variables from constant data |
158 | */ | 158 | */ |
diff --git a/include/linux/magic.h b/include/linux/magic.h index b78bbf42135a..b32c8a97fcec 100644 --- a/include/linux/magic.h +++ b/include/linux/magic.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #define MINIX_SUPER_MAGIC2 0x138F /* minix fs, 30 char names */ | 18 | #define MINIX_SUPER_MAGIC2 0x138F /* minix fs, 30 char names */ |
19 | #define MINIX2_SUPER_MAGIC 0x2468 /* minix V2 fs */ | 19 | #define MINIX2_SUPER_MAGIC 0x2468 /* minix V2 fs */ |
20 | #define MINIX2_SUPER_MAGIC2 0x2478 /* minix V2 fs, 30 char names */ | 20 | #define MINIX2_SUPER_MAGIC2 0x2478 /* minix V2 fs, 30 char names */ |
21 | #define MINIX3_SUPER_MAGIC 0x4d5a /* minix V3 fs */ | ||
21 | 22 | ||
22 | #define MSDOS_SUPER_MAGIC 0x4d44 /* MD */ | 23 | #define MSDOS_SUPER_MAGIC 0x4d44 /* MD */ |
23 | #define NCP_SUPER_MAGIC 0x564c /* Guess, what 0x564c is :-) */ | 24 | #define NCP_SUPER_MAGIC 0x564c /* Guess, what 0x564c is :-) */ |
diff --git a/include/linux/mc146818rtc.h b/include/linux/mc146818rtc.h index 432b2fa24929..bdc01127dced 100644 --- a/include/linux/mc146818rtc.h +++ b/include/linux/mc146818rtc.h | |||
@@ -18,6 +18,16 @@ | |||
18 | #ifdef __KERNEL__ | 18 | #ifdef __KERNEL__ |
19 | #include <linux/spinlock.h> /* spinlock_t */ | 19 | #include <linux/spinlock.h> /* spinlock_t */ |
20 | extern spinlock_t rtc_lock; /* serialize CMOS RAM access */ | 20 | extern spinlock_t rtc_lock; /* serialize CMOS RAM access */ |
21 | |||
22 | /* Some RTCs extend the mc146818 register set to support alarms of more | ||
23 | * than 24 hours in the future; or dates that include a century code. | ||
24 | * This platform_data structure can pass this information to the driver. | ||
25 | */ | ||
26 | struct cmos_rtc_board_info { | ||
27 | u8 rtc_day_alarm; /* zero, or register index */ | ||
28 | u8 rtc_mon_alarm; /* zero, or register index */ | ||
29 | u8 rtc_century; /* zero, or register index */ | ||
30 | }; | ||
21 | #endif | 31 | #endif |
22 | 32 | ||
23 | /********************************************************************** | 33 | /********************************************************************** |
diff --git a/include/linux/minix_fs.h b/include/linux/minix_fs.h index 916e8f72c63d..0e39745f5111 100644 --- a/include/linux/minix_fs.h +++ b/include/linux/minix_fs.h | |||
@@ -25,7 +25,6 @@ | |||
25 | #define MINIX_ERROR_FS 0x0002 /* fs has errors. */ | 25 | #define MINIX_ERROR_FS 0x0002 /* fs has errors. */ |
26 | 26 | ||
27 | #define MINIX_INODES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct minix_inode))) | 27 | #define MINIX_INODES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct minix_inode))) |
28 | #define MINIX2_INODES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct minix2_inode))) | ||
29 | 28 | ||
30 | /* | 29 | /* |
31 | * This is the original minix inode layout on disk. | 30 | * This is the original minix inode layout on disk. |
@@ -75,9 +74,32 @@ struct minix_super_block { | |||
75 | __u32 s_zones; | 74 | __u32 s_zones; |
76 | }; | 75 | }; |
77 | 76 | ||
77 | /* | ||
78 | * V3 minix super-block data on disk | ||
79 | */ | ||
80 | struct minix3_super_block { | ||
81 | __u32 s_ninodes; | ||
82 | __u16 s_pad0; | ||
83 | __u16 s_imap_blocks; | ||
84 | __u16 s_zmap_blocks; | ||
85 | __u16 s_firstdatazone; | ||
86 | __u16 s_log_zone_size; | ||
87 | __u16 s_pad1; | ||
88 | __u32 s_max_size; | ||
89 | __u32 s_zones; | ||
90 | __u16 s_magic; | ||
91 | __u16 s_pad2; | ||
92 | __u16 s_blocksize; | ||
93 | __u8 s_disk_version; | ||
94 | }; | ||
95 | |||
78 | struct minix_dir_entry { | 96 | struct minix_dir_entry { |
79 | __u16 inode; | 97 | __u16 inode; |
80 | char name[0]; | 98 | char name[0]; |
81 | }; | 99 | }; |
82 | 100 | ||
101 | struct minix3_dir_entry { | ||
102 | __u32 inode; | ||
103 | char name[0]; | ||
104 | }; | ||
83 | #endif | 105 | #endif |
diff --git a/include/linux/mm.h b/include/linux/mm.h index bb793a4c8e9e..a0eec16eb0bd 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -437,15 +437,15 @@ static inline compound_page_dtor *get_compound_page_dtor(struct page *page) | |||
437 | /* NODE:ZONE or SECTION:ZONE is used to ID a zone for the buddy allcator */ | 437 | /* NODE:ZONE or SECTION:ZONE is used to ID a zone for the buddy allcator */ |
438 | #ifdef NODE_NOT_IN_PAGEFLAGS | 438 | #ifdef NODE_NOT_IN_PAGEFLAGS |
439 | #define ZONEID_SHIFT (SECTIONS_SHIFT + ZONES_SHIFT) | 439 | #define ZONEID_SHIFT (SECTIONS_SHIFT + ZONES_SHIFT) |
440 | #define ZONEID_PGOFF ((SECTIONS_PGOFF < ZONES_PGOFF)? \ | ||
441 | SECTIONS_PGOFF : ZONES_PGOFF) | ||
440 | #else | 442 | #else |
441 | #define ZONEID_SHIFT (NODES_SHIFT + ZONES_SHIFT) | 443 | #define ZONEID_SHIFT (NODES_SHIFT + ZONES_SHIFT) |
444 | #define ZONEID_PGOFF ((NODES_PGOFF < ZONES_PGOFF)? \ | ||
445 | NODES_PGOFF : ZONES_PGOFF) | ||
442 | #endif | 446 | #endif |
443 | 447 | ||
444 | #if ZONES_WIDTH > 0 | 448 | #define ZONEID_PGSHIFT (ZONEID_PGOFF * (ZONEID_SHIFT != 0)) |
445 | #define ZONEID_PGSHIFT ZONES_PGSHIFT | ||
446 | #else | ||
447 | #define ZONEID_PGSHIFT NODES_PGOFF | ||
448 | #endif | ||
449 | 449 | ||
450 | #if SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED | 450 | #if SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED |
451 | #error SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED | 451 | #error SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED |
@@ -471,7 +471,6 @@ static inline enum zone_type page_zonenum(struct page *page) | |||
471 | */ | 471 | */ |
472 | static inline int page_zone_id(struct page *page) | 472 | static inline int page_zone_id(struct page *page) |
473 | { | 473 | { |
474 | BUILD_BUG_ON(ZONEID_PGSHIFT == 0 && ZONEID_MASK); | ||
475 | return (page->flags >> ZONEID_PGSHIFT) & ZONEID_MASK; | 474 | return (page->flags >> ZONEID_PGSHIFT) & ZONEID_MASK; |
476 | } | 475 | } |
477 | 476 | ||
@@ -638,6 +637,7 @@ static inline int page_mapped(struct page *page) | |||
638 | */ | 637 | */ |
639 | #define NOPFN_SIGBUS ((unsigned long) -1) | 638 | #define NOPFN_SIGBUS ((unsigned long) -1) |
640 | #define NOPFN_OOM ((unsigned long) -2) | 639 | #define NOPFN_OOM ((unsigned long) -2) |
640 | #define NOPFN_REFAULT ((unsigned long) -3) | ||
641 | 641 | ||
642 | /* | 642 | /* |
643 | * Different kinds of faults, as returned by handle_mm_fault(). | 643 | * Different kinds of faults, as returned by handle_mm_fault(). |
@@ -786,6 +786,7 @@ extern int try_to_release_page(struct page * page, gfp_t gfp_mask); | |||
786 | extern void do_invalidatepage(struct page *page, unsigned long offset); | 786 | extern void do_invalidatepage(struct page *page, unsigned long offset); |
787 | 787 | ||
788 | int __set_page_dirty_nobuffers(struct page *page); | 788 | int __set_page_dirty_nobuffers(struct page *page); |
789 | int __set_page_dirty_no_writeback(struct page *page); | ||
789 | int redirty_page_for_writepage(struct writeback_control *wbc, | 790 | int redirty_page_for_writepage(struct writeback_control *wbc, |
790 | struct page *page); | 791 | struct page *page); |
791 | int FASTCALL(set_page_dirty(struct page *page)); | 792 | int FASTCALL(set_page_dirty(struct page *page)); |
@@ -1124,6 +1125,8 @@ unsigned long vmalloc_to_pfn(void *addr); | |||
1124 | int remap_pfn_range(struct vm_area_struct *, unsigned long addr, | 1125 | int remap_pfn_range(struct vm_area_struct *, unsigned long addr, |
1125 | unsigned long pfn, unsigned long size, pgprot_t); | 1126 | unsigned long pfn, unsigned long size, pgprot_t); |
1126 | int vm_insert_page(struct vm_area_struct *, unsigned long addr, struct page *); | 1127 | int vm_insert_page(struct vm_area_struct *, unsigned long addr, struct page *); |
1128 | int vm_insert_pfn(struct vm_area_struct *vma, unsigned long addr, | ||
1129 | unsigned long pfn); | ||
1127 | 1130 | ||
1128 | struct page *follow_page(struct vm_area_struct *, unsigned long address, | 1131 | struct page *follow_page(struct vm_area_struct *, unsigned long address, |
1129 | unsigned int foll_flags); | 1132 | unsigned int foll_flags); |
diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h index 3b6723dfaff3..895bc4e93039 100644 --- a/include/linux/mm_inline.h +++ b/include/linux/mm_inline.h | |||
@@ -1,30 +1,29 @@ | |||
1 | |||
2 | static inline void | 1 | static inline void |
3 | add_page_to_active_list(struct zone *zone, struct page *page) | 2 | add_page_to_active_list(struct zone *zone, struct page *page) |
4 | { | 3 | { |
5 | list_add(&page->lru, &zone->active_list); | 4 | list_add(&page->lru, &zone->active_list); |
6 | zone->nr_active++; | 5 | __inc_zone_state(zone, NR_ACTIVE); |
7 | } | 6 | } |
8 | 7 | ||
9 | static inline void | 8 | static inline void |
10 | add_page_to_inactive_list(struct zone *zone, struct page *page) | 9 | add_page_to_inactive_list(struct zone *zone, struct page *page) |
11 | { | 10 | { |
12 | list_add(&page->lru, &zone->inactive_list); | 11 | list_add(&page->lru, &zone->inactive_list); |
13 | zone->nr_inactive++; | 12 | __inc_zone_state(zone, NR_INACTIVE); |
14 | } | 13 | } |
15 | 14 | ||
16 | static inline void | 15 | static inline void |
17 | del_page_from_active_list(struct zone *zone, struct page *page) | 16 | del_page_from_active_list(struct zone *zone, struct page *page) |
18 | { | 17 | { |
19 | list_del(&page->lru); | 18 | list_del(&page->lru); |
20 | zone->nr_active--; | 19 | __dec_zone_state(zone, NR_ACTIVE); |
21 | } | 20 | } |
22 | 21 | ||
23 | static inline void | 22 | static inline void |
24 | del_page_from_inactive_list(struct zone *zone, struct page *page) | 23 | del_page_from_inactive_list(struct zone *zone, struct page *page) |
25 | { | 24 | { |
26 | list_del(&page->lru); | 25 | list_del(&page->lru); |
27 | zone->nr_inactive--; | 26 | __dec_zone_state(zone, NR_INACTIVE); |
28 | } | 27 | } |
29 | 28 | ||
30 | static inline void | 29 | static inline void |
@@ -33,9 +32,9 @@ del_page_from_lru(struct zone *zone, struct page *page) | |||
33 | list_del(&page->lru); | 32 | list_del(&page->lru); |
34 | if (PageActive(page)) { | 33 | if (PageActive(page)) { |
35 | __ClearPageActive(page); | 34 | __ClearPageActive(page); |
36 | zone->nr_active--; | 35 | __dec_zone_state(zone, NR_ACTIVE); |
37 | } else { | 36 | } else { |
38 | zone->nr_inactive--; | 37 | __dec_zone_state(zone, NR_INACTIVE); |
39 | } | 38 | } |
40 | } | 39 | } |
41 | 40 | ||
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index b262f47961fb..ee9e3143df4f 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -47,15 +47,20 @@ struct zone_padding { | |||
47 | #endif | 47 | #endif |
48 | 48 | ||
49 | enum zone_stat_item { | 49 | enum zone_stat_item { |
50 | /* First 128 byte cacheline (assuming 64 bit words) */ | ||
51 | NR_FREE_PAGES, | ||
52 | NR_INACTIVE, | ||
53 | NR_ACTIVE, | ||
50 | NR_ANON_PAGES, /* Mapped anonymous pages */ | 54 | NR_ANON_PAGES, /* Mapped anonymous pages */ |
51 | NR_FILE_MAPPED, /* pagecache pages mapped into pagetables. | 55 | NR_FILE_MAPPED, /* pagecache pages mapped into pagetables. |
52 | only modified from process context */ | 56 | only modified from process context */ |
53 | NR_FILE_PAGES, | 57 | NR_FILE_PAGES, |
54 | NR_SLAB_RECLAIMABLE, | ||
55 | NR_SLAB_UNRECLAIMABLE, | ||
56 | NR_PAGETABLE, /* used for pagetables */ | ||
57 | NR_FILE_DIRTY, | 58 | NR_FILE_DIRTY, |
58 | NR_WRITEBACK, | 59 | NR_WRITEBACK, |
60 | /* Second 128 byte cacheline */ | ||
61 | NR_SLAB_RECLAIMABLE, | ||
62 | NR_SLAB_UNRECLAIMABLE, | ||
63 | NR_PAGETABLE, /* used for pagetables */ | ||
59 | NR_UNSTABLE_NFS, /* NFS unstable pages */ | 64 | NR_UNSTABLE_NFS, /* NFS unstable pages */ |
60 | NR_BOUNCE, | 65 | NR_BOUNCE, |
61 | NR_VMSCAN_WRITE, | 66 | NR_VMSCAN_WRITE, |
@@ -91,6 +96,7 @@ struct per_cpu_pageset { | |||
91 | #endif | 96 | #endif |
92 | 97 | ||
93 | enum zone_type { | 98 | enum zone_type { |
99 | #ifdef CONFIG_ZONE_DMA | ||
94 | /* | 100 | /* |
95 | * ZONE_DMA is used when there are devices that are not able | 101 | * ZONE_DMA is used when there are devices that are not able |
96 | * to do DMA to all of addressable memory (ZONE_NORMAL). Then we | 102 | * to do DMA to all of addressable memory (ZONE_NORMAL). Then we |
@@ -111,6 +117,7 @@ enum zone_type { | |||
111 | * <16M. | 117 | * <16M. |
112 | */ | 118 | */ |
113 | ZONE_DMA, | 119 | ZONE_DMA, |
120 | #endif | ||
114 | #ifdef CONFIG_ZONE_DMA32 | 121 | #ifdef CONFIG_ZONE_DMA32 |
115 | /* | 122 | /* |
116 | * x86_64 needs two ZONE_DMAs because it supports devices that are | 123 | * x86_64 needs two ZONE_DMAs because it supports devices that are |
@@ -147,15 +154,30 @@ enum zone_type { | |||
147 | * match the requested limits. See gfp_zone() in include/linux/gfp.h | 154 | * match the requested limits. See gfp_zone() in include/linux/gfp.h |
148 | */ | 155 | */ |
149 | 156 | ||
150 | #if !defined(CONFIG_ZONE_DMA32) && !defined(CONFIG_HIGHMEM) | 157 | /* |
158 | * Count the active zones. Note that the use of defined(X) outside | ||
159 | * #if and family is not necessarily defined so ensure we cannot use | ||
160 | * it later. Use __ZONE_COUNT to work out how many shift bits we need. | ||
161 | */ | ||
162 | #define __ZONE_COUNT ( \ | ||
163 | defined(CONFIG_ZONE_DMA) \ | ||
164 | + defined(CONFIG_ZONE_DMA32) \ | ||
165 | + 1 \ | ||
166 | + defined(CONFIG_HIGHMEM) \ | ||
167 | ) | ||
168 | #if __ZONE_COUNT < 2 | ||
169 | #define ZONES_SHIFT 0 | ||
170 | #elif __ZONE_COUNT <= 2 | ||
151 | #define ZONES_SHIFT 1 | 171 | #define ZONES_SHIFT 1 |
152 | #else | 172 | #elif __ZONE_COUNT <= 4 |
153 | #define ZONES_SHIFT 2 | 173 | #define ZONES_SHIFT 2 |
174 | #else | ||
175 | #error ZONES_SHIFT -- too many zones configured adjust calculation | ||
154 | #endif | 176 | #endif |
177 | #undef __ZONE_COUNT | ||
155 | 178 | ||
156 | struct zone { | 179 | struct zone { |
157 | /* Fields commonly accessed by the page allocator */ | 180 | /* Fields commonly accessed by the page allocator */ |
158 | unsigned long free_pages; | ||
159 | unsigned long pages_min, pages_low, pages_high; | 181 | unsigned long pages_min, pages_low, pages_high; |
160 | /* | 182 | /* |
161 | * We don't know if the memory that we're going to allocate will be freeable | 183 | * We don't know if the memory that we're going to allocate will be freeable |
@@ -197,8 +219,6 @@ struct zone { | |||
197 | struct list_head inactive_list; | 219 | struct list_head inactive_list; |
198 | unsigned long nr_scan_active; | 220 | unsigned long nr_scan_active; |
199 | unsigned long nr_scan_inactive; | 221 | unsigned long nr_scan_inactive; |
200 | unsigned long nr_active; | ||
201 | unsigned long nr_inactive; | ||
202 | unsigned long pages_scanned; /* since last reclaim */ | 222 | unsigned long pages_scanned; /* since last reclaim */ |
203 | int all_unreclaimable; /* All pages pinned */ | 223 | int all_unreclaimable; /* All pages pinned */ |
204 | 224 | ||
@@ -442,8 +462,6 @@ typedef struct pglist_data { | |||
442 | 462 | ||
443 | #include <linux/memory_hotplug.h> | 463 | #include <linux/memory_hotplug.h> |
444 | 464 | ||
445 | void __get_zone_counts(unsigned long *active, unsigned long *inactive, | ||
446 | unsigned long *free, struct pglist_data *pgdat); | ||
447 | void get_zone_counts(unsigned long *active, unsigned long *inactive, | 465 | void get_zone_counts(unsigned long *active, unsigned long *inactive, |
448 | unsigned long *free); | 466 | unsigned long *free); |
449 | void build_all_zonelists(void); | 467 | void build_all_zonelists(void); |
@@ -523,7 +541,11 @@ static inline int is_dma32(struct zone *zone) | |||
523 | 541 | ||
524 | static inline int is_dma(struct zone *zone) | 542 | static inline int is_dma(struct zone *zone) |
525 | { | 543 | { |
544 | #ifdef CONFIG_ZONE_DMA | ||
526 | return zone == zone->zone_pgdat->node_zones + ZONE_DMA; | 545 | return zone == zone->zone_pgdat->node_zones + ZONE_DMA; |
546 | #else | ||
547 | return 0; | ||
548 | #endif | ||
527 | } | 549 | } |
528 | 550 | ||
529 | /* These two functions are used to setup the per zone pages min values */ | 551 | /* These two functions are used to setup the per zone pages min values */ |
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index e0c393cc7240..e96b2dee10bb 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
@@ -320,4 +320,16 @@ struct eisa_device_id { | |||
320 | 320 | ||
321 | #define EISA_DEVICE_MODALIAS_FMT "eisa:s%s" | 321 | #define EISA_DEVICE_MODALIAS_FMT "eisa:s%s" |
322 | 322 | ||
323 | struct parisc_device_id { | ||
324 | __u8 hw_type; /* 5 bits used */ | ||
325 | __u8 hversion_rev; /* 4 bits */ | ||
326 | __u16 hversion; /* 12 bits */ | ||
327 | __u32 sversion; /* 20 bits */ | ||
328 | }; | ||
329 | |||
330 | #define PA_HWTYPE_ANY_ID 0xff | ||
331 | #define PA_HVERSION_REV_ANY_ID 0xff | ||
332 | #define PA_HVERSION_ANY_ID 0xffff | ||
333 | #define PA_SVERSION_ANY_ID 0xffffffff | ||
334 | |||
323 | #endif /* LINUX_MOD_DEVICETABLE_H */ | 335 | #endif /* LINUX_MOD_DEVICETABLE_H */ |
diff --git a/include/linux/module.h b/include/linux/module.h index 419d3ef293dd..95679eb8571e 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -76,8 +76,6 @@ void sort_extable(struct exception_table_entry *start, | |||
76 | struct exception_table_entry *finish); | 76 | struct exception_table_entry *finish); |
77 | void sort_main_extable(void); | 77 | void sort_main_extable(void); |
78 | 78 | ||
79 | extern struct subsystem module_subsys; | ||
80 | |||
81 | #ifdef MODULE | 79 | #ifdef MODULE |
82 | #define MODULE_GENERIC_TABLE(gtype,name) \ | 80 | #define MODULE_GENERIC_TABLE(gtype,name) \ |
83 | extern const struct gtype##_id __mod_##gtype##_table \ | 81 | extern const struct gtype##_id __mod_##gtype##_table \ |
@@ -467,10 +465,6 @@ int unregister_module_notifier(struct notifier_block * nb); | |||
467 | 465 | ||
468 | extern void print_modules(void); | 466 | extern void print_modules(void); |
469 | 467 | ||
470 | struct device_driver; | ||
471 | void module_add_driver(struct module *, struct device_driver *); | ||
472 | void module_remove_driver(struct device_driver *); | ||
473 | |||
474 | #else /* !CONFIG_MODULES... */ | 468 | #else /* !CONFIG_MODULES... */ |
475 | #define EXPORT_SYMBOL(sym) | 469 | #define EXPORT_SYMBOL(sym) |
476 | #define EXPORT_SYMBOL_GPL(sym) | 470 | #define EXPORT_SYMBOL_GPL(sym) |
@@ -568,18 +562,59 @@ static inline void print_modules(void) | |||
568 | { | 562 | { |
569 | } | 563 | } |
570 | 564 | ||
565 | #endif /* CONFIG_MODULES */ | ||
566 | |||
571 | struct device_driver; | 567 | struct device_driver; |
568 | #ifdef CONFIG_SYSFS | ||
572 | struct module; | 569 | struct module; |
573 | 570 | ||
574 | static inline void module_add_driver(struct module *module, struct device_driver *driver) | 571 | extern struct subsystem module_subsys; |
572 | |||
573 | int mod_sysfs_init(struct module *mod); | ||
574 | int mod_sysfs_setup(struct module *mod, | ||
575 | struct kernel_param *kparam, | ||
576 | unsigned int num_params); | ||
577 | int module_add_modinfo_attrs(struct module *mod); | ||
578 | void module_remove_modinfo_attrs(struct module *mod); | ||
579 | |||
580 | #else /* !CONFIG_SYSFS */ | ||
581 | |||
582 | static inline int mod_sysfs_init(struct module *mod) | ||
575 | { | 583 | { |
584 | return 0; | ||
576 | } | 585 | } |
577 | 586 | ||
578 | static inline void module_remove_driver(struct device_driver *driver) | 587 | static inline int mod_sysfs_setup(struct module *mod, |
588 | struct kernel_param *kparam, | ||
589 | unsigned int num_params) | ||
579 | { | 590 | { |
591 | return 0; | ||
580 | } | 592 | } |
581 | 593 | ||
582 | #endif /* CONFIG_MODULES */ | 594 | static inline int module_add_modinfo_attrs(struct module *mod) |
595 | { | ||
596 | return 0; | ||
597 | } | ||
598 | |||
599 | static inline void module_remove_modinfo_attrs(struct module *mod) | ||
600 | { } | ||
601 | |||
602 | #endif /* CONFIG_SYSFS */ | ||
603 | |||
604 | #if defined(CONFIG_SYSFS) && defined(CONFIG_MODULES) | ||
605 | |||
606 | void module_add_driver(struct module *mod, struct device_driver *drv); | ||
607 | void module_remove_driver(struct device_driver *drv); | ||
608 | |||
609 | #else /* not both CONFIG_SYSFS && CONFIG_MODULES */ | ||
610 | |||
611 | static inline void module_add_driver(struct module *mod, struct device_driver *drv) | ||
612 | { } | ||
613 | |||
614 | static inline void module_remove_driver(struct device_driver *drv) | ||
615 | { } | ||
616 | |||
617 | #endif | ||
583 | 618 | ||
584 | #define symbol_request(x) try_then_request_module(symbol_get(x), "symbol:" #x) | 619 | #define symbol_request(x) try_then_request_module(symbol_get(x), "symbol:" #x) |
585 | 620 | ||
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index 4a189dadb160..c83588c8d08b 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h | |||
@@ -59,7 +59,7 @@ struct kparam_array | |||
59 | }; | 59 | }; |
60 | 60 | ||
61 | /* This is the fundamental function for registering boot/module | 61 | /* This is the fundamental function for registering boot/module |
62 | parameters. perm sets the visibility in driverfs: 000 means it's | 62 | parameters. perm sets the visibility in sysfs: 000 means it's |
63 | not there, read bits mean it's readable, write bits mean it's | 63 | not there, read bits mean it's readable, write bits mean it's |
64 | writable. */ | 64 | writable. */ |
65 | #define __module_param_call(prefix, name, set, get, arg, perm) \ | 65 | #define __module_param_call(prefix, name, set, get, arg, perm) \ |
@@ -169,10 +169,22 @@ extern int param_get_string(char *buffer, struct kernel_param *kp); | |||
169 | 169 | ||
170 | struct module; | 170 | struct module; |
171 | 171 | ||
172 | #if defined(CONFIG_SYSFS) && defined(CONFIG_MODULES) | ||
172 | extern int module_param_sysfs_setup(struct module *mod, | 173 | extern int module_param_sysfs_setup(struct module *mod, |
173 | struct kernel_param *kparam, | 174 | struct kernel_param *kparam, |
174 | unsigned int num_params); | 175 | unsigned int num_params); |
175 | 176 | ||
176 | extern void module_param_sysfs_remove(struct module *mod); | 177 | extern void module_param_sysfs_remove(struct module *mod); |
178 | #else | ||
179 | static inline int module_param_sysfs_setup(struct module *mod, | ||
180 | struct kernel_param *kparam, | ||
181 | unsigned int num_params) | ||
182 | { | ||
183 | return 0; | ||
184 | } | ||
185 | |||
186 | static inline void module_param_sysfs_remove(struct module *mod) | ||
187 | { } | ||
188 | #endif | ||
177 | 189 | ||
178 | #endif /* _LINUX_MODULE_PARAMS_H */ | 190 | #endif /* _LINUX_MODULE_PARAMS_H */ |
diff --git a/include/linux/mount.h b/include/linux/mount.h index 1b7e178b0d84..dab69afee2fa 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h | |||
@@ -43,9 +43,8 @@ struct vfsmount { | |||
43 | struct super_block *mnt_sb; /* pointer to superblock */ | 43 | struct super_block *mnt_sb; /* pointer to superblock */ |
44 | struct list_head mnt_mounts; /* list of children, anchored here */ | 44 | struct list_head mnt_mounts; /* list of children, anchored here */ |
45 | struct list_head mnt_child; /* and going through their mnt_child */ | 45 | struct list_head mnt_child; /* and going through their mnt_child */ |
46 | atomic_t mnt_count; | ||
47 | int mnt_flags; | 46 | int mnt_flags; |
48 | int mnt_expiry_mark; /* true if marked for expiry */ | 47 | /* 4 bytes hole on 64bits arches */ |
49 | char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */ | 48 | char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */ |
50 | struct list_head mnt_list; | 49 | struct list_head mnt_list; |
51 | struct list_head mnt_expire; /* link in fs-specific expiry list */ | 50 | struct list_head mnt_expire; /* link in fs-specific expiry list */ |
@@ -54,6 +53,13 @@ struct vfsmount { | |||
54 | struct list_head mnt_slave; /* slave list entry */ | 53 | struct list_head mnt_slave; /* slave list entry */ |
55 | struct vfsmount *mnt_master; /* slave is on master->mnt_slave_list */ | 54 | struct vfsmount *mnt_master; /* slave is on master->mnt_slave_list */ |
56 | struct mnt_namespace *mnt_ns; /* containing namespace */ | 55 | struct mnt_namespace *mnt_ns; /* containing namespace */ |
56 | /* | ||
57 | * We put mnt_count & mnt_expiry_mark at the end of struct vfsmount | ||
58 | * to let these frequently modified fields in a separate cache line | ||
59 | * (so that reads of mnt_flags wont ping-pong on SMP machines) | ||
60 | */ | ||
61 | atomic_t mnt_count; | ||
62 | int mnt_expiry_mark; /* true if marked for expiry */ | ||
57 | int mnt_pinned; | 63 | int mnt_pinned; |
58 | }; | 64 | }; |
59 | 65 | ||
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h index 24a9ef1506b6..fa253fa73aa3 100644 --- a/include/linux/msdos_fs.h +++ b/include/linux/msdos_fs.h | |||
@@ -234,7 +234,7 @@ struct msdos_sb_info { | |||
234 | struct fat_mount_options options; | 234 | struct fat_mount_options options; |
235 | struct nls_table *nls_disk; /* Codepage used on disk */ | 235 | struct nls_table *nls_disk; /* Codepage used on disk */ |
236 | struct nls_table *nls_io; /* Charset used for input and display */ | 236 | struct nls_table *nls_io; /* Charset used for input and display */ |
237 | void *dir_ops; /* Opaque; default directory operations */ | 237 | const void *dir_ops; /* Opaque; default directory operations */ |
238 | int dir_per_block; /* dir entries per block */ | 238 | int dir_per_block; /* dir entries per block */ |
239 | int dir_per_block_bits; /* log2(dir_per_block) */ | 239 | int dir_per_block_bits; /* log2(dir_per_block) */ |
240 | 240 | ||
@@ -399,7 +399,7 @@ extern int fat_count_free_clusters(struct super_block *sb); | |||
399 | extern int fat_generic_ioctl(struct inode *inode, struct file *filp, | 399 | extern int fat_generic_ioctl(struct inode *inode, struct file *filp, |
400 | unsigned int cmd, unsigned long arg); | 400 | unsigned int cmd, unsigned long arg); |
401 | extern const struct file_operations fat_file_operations; | 401 | extern const struct file_operations fat_file_operations; |
402 | extern struct inode_operations fat_file_inode_operations; | 402 | extern const struct inode_operations fat_file_inode_operations; |
403 | extern int fat_notify_change(struct dentry * dentry, struct iattr * attr); | 403 | extern int fat_notify_change(struct dentry * dentry, struct iattr * attr); |
404 | extern void fat_truncate(struct inode *inode); | 404 | extern void fat_truncate(struct inode *inode); |
405 | extern int fat_getattr(struct vfsmount *mnt, struct dentry *dentry, | 405 | extern int fat_getattr(struct vfsmount *mnt, struct dentry *dentry, |
@@ -413,7 +413,7 @@ extern struct inode *fat_build_inode(struct super_block *sb, | |||
413 | struct msdos_dir_entry *de, loff_t i_pos); | 413 | struct msdos_dir_entry *de, loff_t i_pos); |
414 | extern int fat_sync_inode(struct inode *inode); | 414 | extern int fat_sync_inode(struct inode *inode); |
415 | extern int fat_fill_super(struct super_block *sb, void *data, int silent, | 415 | extern int fat_fill_super(struct super_block *sb, void *data, int silent, |
416 | struct inode_operations *fs_dir_inode_ops, int isvfat); | 416 | const struct inode_operations *fs_dir_inode_ops, int isvfat); |
417 | 417 | ||
418 | extern int fat_flush_inodes(struct super_block *sb, struct inode *i1, | 418 | extern int fat_flush_inodes(struct super_block *sb, struct inode *i1, |
419 | struct inode *i2); | 419 | struct inode *i2); |
diff --git a/include/linux/mtd/bbm.h b/include/linux/mtd/bbm.h index 1221b7c44158..fff8c53e5434 100644 --- a/include/linux/mtd/bbm.h +++ b/include/linux/mtd/bbm.h | |||
@@ -92,6 +92,13 @@ struct nand_bbt_descr { | |||
92 | */ | 92 | */ |
93 | #define ONENAND_BADBLOCK_POS 0 | 93 | #define ONENAND_BADBLOCK_POS 0 |
94 | 94 | ||
95 | /* | ||
96 | * Bad block scanning errors | ||
97 | */ | ||
98 | #define ONENAND_BBT_READ_ERROR 1 | ||
99 | #define ONENAND_BBT_READ_ECC_ERROR 2 | ||
100 | #define ONENAND_BBT_READ_FATAL_ERROR 4 | ||
101 | |||
95 | /** | 102 | /** |
96 | * struct bbm_info - [GENERIC] Bad Block Table data structure | 103 | * struct bbm_info - [GENERIC] Bad Block Table data structure |
97 | * @bbt_erase_shift: [INTERN] number of address bits in a bbt entry | 104 | * @bbt_erase_shift: [INTERN] number of address bits in a bbt entry |
diff --git a/include/linux/mtd/map.h b/include/linux/mtd/map.h index 28d461d862bd..81f3a314dd76 100644 --- a/include/linux/mtd/map.h +++ b/include/linux/mtd/map.h | |||
@@ -183,7 +183,7 @@ typedef union { | |||
183 | struct map_info { | 183 | struct map_info { |
184 | char *name; | 184 | char *name; |
185 | unsigned long size; | 185 | unsigned long size; |
186 | unsigned long phys; | 186 | resource_size_t phys; |
187 | #define NO_XIP (-1UL) | 187 | #define NO_XIP (-1UL) |
188 | 188 | ||
189 | void __iomem *virt; | 189 | void __iomem *virt; |
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index d644e57703ad..6a8570be331b 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h | |||
@@ -85,6 +85,10 @@ typedef enum { | |||
85 | * mode = MTD_OOB_PLACE) | 85 | * mode = MTD_OOB_PLACE) |
86 | * @datbuf: data buffer - if NULL only oob data are read/written | 86 | * @datbuf: data buffer - if NULL only oob data are read/written |
87 | * @oobbuf: oob data buffer | 87 | * @oobbuf: oob data buffer |
88 | * | ||
89 | * Note, it is allowed to read more then one OOB area at one go, but not write. | ||
90 | * The interface assumes that the OOB write requests program only one page's | ||
91 | * OOB area. | ||
88 | */ | 92 | */ |
89 | struct mtd_oob_ops { | 93 | struct mtd_oob_ops { |
90 | mtd_oob_mode_t mode; | 94 | mtd_oob_mode_t mode; |
@@ -117,18 +121,6 @@ struct mtd_info { | |||
117 | u_int32_t writesize; | 121 | u_int32_t writesize; |
118 | 122 | ||
119 | u_int32_t oobsize; // Amount of OOB data per block (e.g. 16) | 123 | u_int32_t oobsize; // Amount of OOB data per block (e.g. 16) |
120 | u_int32_t ecctype; | ||
121 | u_int32_t eccsize; | ||
122 | |||
123 | /* | ||
124 | * Reuse some of the above unused fields in the case of NOR flash | ||
125 | * with configurable programming regions to avoid modifying the | ||
126 | * user visible structure layout/size. Only valid when the | ||
127 | * MTD_PROGRAM_REGIONS flag is set. | ||
128 | * (Maybe we should have an union for those?) | ||
129 | */ | ||
130 | #define MTD_PROGREGION_CTRLMODE_VALID(mtd) (mtd)->oobsize | ||
131 | #define MTD_PROGREGION_CTRLMODE_INVALID(mtd) (mtd)->ecctype | ||
132 | 124 | ||
133 | // Kernel-only stuff starts here. | 125 | // Kernel-only stuff starts here. |
134 | char *name; | 126 | char *name; |
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 2071b02f0526..97523887fe5d 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h | |||
@@ -343,6 +343,7 @@ struct nand_buffers { | |||
343 | * @options: [BOARDSPECIFIC] various chip options. They can partly be set to inform nand_scan about | 343 | * @options: [BOARDSPECIFIC] various chip options. They can partly be set to inform nand_scan about |
344 | * special functionality. See the defines for further explanation | 344 | * special functionality. See the defines for further explanation |
345 | * @badblockpos: [INTERN] position of the bad block marker in the oob area | 345 | * @badblockpos: [INTERN] position of the bad block marker in the oob area |
346 | * @cellinfo: [INTERN] MLC/multichip data from chip ident | ||
346 | * @numchips: [INTERN] number of physical chips | 347 | * @numchips: [INTERN] number of physical chips |
347 | * @chipsize: [INTERN] the size of one chip for multichip arrays | 348 | * @chipsize: [INTERN] the size of one chip for multichip arrays |
348 | * @pagemask: [INTERN] page number mask = number of (pages / chip) - 1 | 349 | * @pagemask: [INTERN] page number mask = number of (pages / chip) - 1 |
diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h index f775a7af3890..d8af8a95e58d 100644 --- a/include/linux/mtd/onenand.h +++ b/include/linux/mtd/onenand.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/linux/mtd/onenand.h | 2 | * linux/include/linux/mtd/onenand.h |
3 | * | 3 | * |
4 | * Copyright (C) 2005-2006 Samsung Electronics | 4 | * Copyright (C) 2005-2007 Samsung Electronics |
5 | * Kyungmin Park <kyungmin.park@samsung.com> | 5 | * Kyungmin Park <kyungmin.park@samsung.com> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
@@ -42,14 +42,10 @@ typedef enum { | |||
42 | 42 | ||
43 | /** | 43 | /** |
44 | * struct onenand_bufferram - OneNAND BufferRAM Data | 44 | * struct onenand_bufferram - OneNAND BufferRAM Data |
45 | * @block: block address in BufferRAM | 45 | * @blockpage: block & page address in BufferRAM |
46 | * @page: page address in BufferRAM | ||
47 | * @valid: valid flag | ||
48 | */ | 46 | */ |
49 | struct onenand_bufferram { | 47 | struct onenand_bufferram { |
50 | int block; | 48 | int blockpage; |
51 | int page; | ||
52 | int valid; | ||
53 | }; | 49 | }; |
54 | 50 | ||
55 | /** | 51 | /** |
@@ -63,7 +59,6 @@ struct onenand_bufferram { | |||
63 | * partly be set to inform onenand_scan about | 59 | * partly be set to inform onenand_scan about |
64 | * @erase_shift: [INTERN] number of address bits in a block | 60 | * @erase_shift: [INTERN] number of address bits in a block |
65 | * @page_shift: [INTERN] number of address bits in a page | 61 | * @page_shift: [INTERN] number of address bits in a page |
66 | * @ppb_shift: [INTERN] number of address bits in a pages per block | ||
67 | * @page_mask: [INTERN] a page per block mask | 62 | * @page_mask: [INTERN] a page per block mask |
68 | * @bufferram_index: [INTERN] BufferRAM index | 63 | * @bufferram_index: [INTERN] BufferRAM index |
69 | * @bufferram: [INTERN] BufferRAM info | 64 | * @bufferram: [INTERN] BufferRAM info |
@@ -103,7 +98,6 @@ struct onenand_chip { | |||
103 | 98 | ||
104 | unsigned int erase_shift; | 99 | unsigned int erase_shift; |
105 | unsigned int page_shift; | 100 | unsigned int page_shift; |
106 | unsigned int ppb_shift; /* Pages per block shift */ | ||
107 | unsigned int page_mask; | 101 | unsigned int page_mask; |
108 | 102 | ||
109 | unsigned int bufferram_index; | 103 | unsigned int bufferram_index; |
@@ -150,6 +144,9 @@ struct onenand_chip { | |||
150 | #define ONENAND_SET_SYS_CFG1(v, this) \ | 144 | #define ONENAND_SET_SYS_CFG1(v, this) \ |
151 | (this->write_word(v, this->base + ONENAND_REG_SYS_CFG1)) | 145 | (this->write_word(v, this->base + ONENAND_REG_SYS_CFG1)) |
152 | 146 | ||
147 | #define ONENAND_IS_DDP(this) \ | ||
148 | (this->device_id & ONENAND_DEVICE_IS_DDP) | ||
149 | |||
153 | /* Check byte access in OneNAND */ | 150 | /* Check byte access in OneNAND */ |
154 | #define ONENAND_CHECK_BYTE_ACCESS(addr) (addr & 0x1) | 151 | #define ONENAND_CHECK_BYTE_ACCESS(addr) (addr & 0x1) |
155 | 152 | ||
diff --git a/include/linux/mtd/onenand_regs.h b/include/linux/mtd/onenand_regs.h index e31c8f5d4271..af94719890e7 100644 --- a/include/linux/mtd/onenand_regs.h +++ b/include/linux/mtd/onenand_regs.h | |||
@@ -3,7 +3,8 @@ | |||
3 | * | 3 | * |
4 | * OneNAND Register header file | 4 | * OneNAND Register header file |
5 | * | 5 | * |
6 | * Copyright (C) 2005-2006 Samsung Electronics | 6 | * Copyright (C) 2005-2007 Samsung Electronics |
7 | * Kyungmin Park <kyungmin.park@samsung.com> | ||
7 | * | 8 | * |
8 | * This program is free software; you can redistribute it and/or modify | 9 | * 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 | * it under the terms of the GNU General Public License version 2 as |
@@ -80,9 +81,11 @@ | |||
80 | #define ONENAND_VERSION_PROCESS_SHIFT (8) | 81 | #define ONENAND_VERSION_PROCESS_SHIFT (8) |
81 | 82 | ||
82 | /* | 83 | /* |
83 | * Start Address 1 F100h (R/W) | 84 | * Start Address 1 F100h (R/W) & Start Address 2 F101h (R/W) |
84 | */ | 85 | */ |
85 | #define ONENAND_DDP_SHIFT (15) | 86 | #define ONENAND_DDP_SHIFT (15) |
87 | #define ONENAND_DDP_CHIP0 (0) | ||
88 | #define ONENAND_DDP_CHIP1 (1 << ONENAND_DDP_SHIFT) | ||
86 | 89 | ||
87 | /* | 90 | /* |
88 | * Start Address 8 F107h (R/W) | 91 | * Start Address 8 F107h (R/W) |
diff --git a/include/linux/mtd/physmap.h b/include/linux/mtd/physmap.h index 86831e3594f6..0dc07d5f3354 100644 --- a/include/linux/mtd/physmap.h +++ b/include/linux/mtd/physmap.h | |||
@@ -18,9 +18,10 @@ | |||
18 | #define __LINUX_MTD_PHYSMAP__ | 18 | #define __LINUX_MTD_PHYSMAP__ |
19 | 19 | ||
20 | #include <linux/mtd/mtd.h> | 20 | #include <linux/mtd/mtd.h> |
21 | #include <linux/mtd/map.h> | ||
22 | #include <linux/mtd/partitions.h> | 21 | #include <linux/mtd/partitions.h> |
23 | 22 | ||
23 | struct map_info; | ||
24 | |||
24 | struct physmap_flash_data { | 25 | struct physmap_flash_data { |
25 | unsigned int width; | 26 | unsigned int width; |
26 | void (*set_vpp)(struct map_info *, int); | 27 | void (*set_vpp)(struct map_info *, int); |
diff --git a/include/linux/ncp_fs.h b/include/linux/ncp_fs.h index 0ea7f89e613c..83e39eb054d3 100644 --- a/include/linux/ncp_fs.h +++ b/include/linux/ncp_fs.h | |||
@@ -204,7 +204,7 @@ void ncp_update_inode(struct inode *, struct ncp_entry_info *); | |||
204 | void ncp_update_inode2(struct inode *, struct ncp_entry_info *); | 204 | void ncp_update_inode2(struct inode *, struct ncp_entry_info *); |
205 | 205 | ||
206 | /* linux/fs/ncpfs/dir.c */ | 206 | /* linux/fs/ncpfs/dir.c */ |
207 | extern struct inode_operations ncp_dir_inode_operations; | 207 | extern const struct inode_operations ncp_dir_inode_operations; |
208 | extern const struct file_operations ncp_dir_operations; | 208 | extern const struct file_operations ncp_dir_operations; |
209 | int ncp_conn_logged_in(struct super_block *); | 209 | int ncp_conn_logged_in(struct super_block *); |
210 | int ncp_date_dos2unix(__le16 time, __le16 date); | 210 | int ncp_date_dos2unix(__le16 time, __le16 date); |
@@ -226,7 +226,7 @@ void ncp_lock_server(struct ncp_server *server); | |||
226 | void ncp_unlock_server(struct ncp_server *server); | 226 | void ncp_unlock_server(struct ncp_server *server); |
227 | 227 | ||
228 | /* linux/fs/ncpfs/file.c */ | 228 | /* linux/fs/ncpfs/file.c */ |
229 | extern struct inode_operations ncp_file_inode_operations; | 229 | extern const struct inode_operations ncp_file_inode_operations; |
230 | extern const struct file_operations ncp_file_operations; | 230 | extern const struct file_operations ncp_file_operations; |
231 | int ncp_make_open(struct inode *, int); | 231 | int ncp_make_open(struct inode *, int); |
232 | 232 | ||
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index d4c4c5120bc0..70d3b4f1e48d 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
@@ -172,8 +172,8 @@ struct nf_logger { | |||
172 | 172 | ||
173 | /* Function to register/unregister log function. */ | 173 | /* Function to register/unregister log function. */ |
174 | int nf_log_register(int pf, struct nf_logger *logger); | 174 | int nf_log_register(int pf, struct nf_logger *logger); |
175 | int nf_log_unregister_pf(int pf); | 175 | void nf_log_unregister(struct nf_logger *logger); |
176 | void nf_log_unregister_logger(struct nf_logger *logger); | 176 | void nf_log_unregister_pf(int pf); |
177 | 177 | ||
178 | /* Calls the registered backend logging function */ | 178 | /* Calls the registered backend logging function */ |
179 | void nf_log_packet(int pf, | 179 | void nf_log_packet(int pf, |
diff --git a/include/linux/netfilter_ipv4/ip_conntrack.h b/include/linux/netfilter_ipv4/ip_conntrack.h index 33581c13d947..da9274e6bf12 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack.h +++ b/include/linux/netfilter_ipv4/ip_conntrack.h | |||
@@ -301,6 +301,12 @@ extern unsigned int ip_conntrack_htable_size; | |||
301 | extern int ip_conntrack_checksum; | 301 | extern int ip_conntrack_checksum; |
302 | 302 | ||
303 | #define CONNTRACK_STAT_INC(count) (__get_cpu_var(ip_conntrack_stat).count++) | 303 | #define CONNTRACK_STAT_INC(count) (__get_cpu_var(ip_conntrack_stat).count++) |
304 | #define CONNTRACK_STAT_INC_ATOMIC(count) \ | ||
305 | do { \ | ||
306 | local_bh_disable(); \ | ||
307 | __get_cpu_var(ip_conntrack_stat).count++; \ | ||
308 | local_bh_enable(); \ | ||
309 | } while (0) | ||
304 | 310 | ||
305 | #ifdef CONFIG_IP_NF_CONNTRACK_EVENTS | 311 | #ifdef CONFIG_IP_NF_CONNTRACK_EVENTS |
306 | #include <linux/notifier.h> | 312 | #include <linux/notifier.h> |
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index b3b9b609ee89..2a20f488ac1b 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
@@ -23,6 +23,7 @@ | |||
23 | #define NETLINK_GENERIC 16 | 23 | #define NETLINK_GENERIC 16 |
24 | /* leave room for NETLINK_DM (DM Events) */ | 24 | /* leave room for NETLINK_DM (DM Events) */ |
25 | #define NETLINK_SCSITRANSPORT 18 /* SCSI Transports */ | 25 | #define NETLINK_SCSITRANSPORT 18 /* SCSI Transports */ |
26 | #define NETLINK_ECRYPTFS 19 | ||
26 | 27 | ||
27 | #define MAX_LINKS 32 | 28 | #define MAX_LINKS 32 |
28 | 29 | ||
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h index db05182ca0e8..1be5be88debe 100644 --- a/include/linux/nfs4.h +++ b/include/linux/nfs4.h | |||
@@ -105,12 +105,11 @@ struct nfs4_ace { | |||
105 | uint32_t access_mask; | 105 | uint32_t access_mask; |
106 | int whotype; | 106 | int whotype; |
107 | uid_t who; | 107 | uid_t who; |
108 | struct list_head l_ace; | ||
109 | }; | 108 | }; |
110 | 109 | ||
111 | struct nfs4_acl { | 110 | struct nfs4_acl { |
112 | uint32_t naces; | 111 | uint32_t naces; |
113 | struct list_head ace_head; | 112 | struct nfs4_ace aces[0]; |
114 | }; | 113 | }; |
115 | 114 | ||
116 | typedef struct { char data[NFS4_VERIFIER_SIZE]; } nfs4_verifier; | 115 | typedef struct { char data[NFS4_VERIFIER_SIZE]; } nfs4_verifier; |
diff --git a/include/linux/nfs4_acl.h b/include/linux/nfs4_acl.h index 22aff4d01f20..409b6e02f337 100644 --- a/include/linux/nfs4_acl.h +++ b/include/linux/nfs4_acl.h | |||
@@ -39,9 +39,12 @@ | |||
39 | 39 | ||
40 | #include <linux/posix_acl.h> | 40 | #include <linux/posix_acl.h> |
41 | 41 | ||
42 | struct nfs4_acl *nfs4_acl_new(void); | 42 | /* Maximum ACL we'll accept from client; chosen (somewhat arbitrarily) to |
43 | void nfs4_acl_free(struct nfs4_acl *); | 43 | * fit in a page: */ |
44 | int nfs4_acl_add_ace(struct nfs4_acl *, u32, u32, u32, int, uid_t); | 44 | #define NFS4_ACL_MAX 170 |
45 | |||
46 | struct nfs4_acl *nfs4_acl_new(int); | ||
47 | void nfs4_acl_add_ace(struct nfs4_acl *, u32, u32, u32, int, uid_t); | ||
45 | int nfs4_acl_get_whotype(char *, u32); | 48 | int nfs4_acl_get_whotype(char *, u32); |
46 | int nfs4_acl_write_who(int who, char *p); | 49 | int nfs4_acl_write_who(int who, char *p); |
47 | int nfs4_acl_permission(struct nfs4_acl *acl, uid_t owner, gid_t group, | 50 | int nfs4_acl_permission(struct nfs4_acl *acl, uid_t owner, gid_t group, |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index c5d4084773e8..47aaa2c66738 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -11,14 +11,6 @@ | |||
11 | 11 | ||
12 | #include <linux/magic.h> | 12 | #include <linux/magic.h> |
13 | 13 | ||
14 | /* | ||
15 | * Enable debugging support for nfs client. | ||
16 | * Requires RPC_DEBUG. | ||
17 | */ | ||
18 | #ifdef RPC_DEBUG | ||
19 | # define NFS_DEBUG | ||
20 | #endif | ||
21 | |||
22 | /* Default timeout values */ | 14 | /* Default timeout values */ |
23 | #define NFS_MAX_UDP_TIMEOUT (60*HZ) | 15 | #define NFS_MAX_UDP_TIMEOUT (60*HZ) |
24 | #define NFS_MAX_TCP_TIMEOUT (600*HZ) | 16 | #define NFS_MAX_TCP_TIMEOUT (600*HZ) |
@@ -331,9 +323,9 @@ static inline void nfs_fattr_init(struct nfs_fattr *fattr) | |||
331 | /* | 323 | /* |
332 | * linux/fs/nfs/file.c | 324 | * linux/fs/nfs/file.c |
333 | */ | 325 | */ |
334 | extern struct inode_operations nfs_file_inode_operations; | 326 | extern const struct inode_operations nfs_file_inode_operations; |
335 | #ifdef CONFIG_NFS_V3 | 327 | #ifdef CONFIG_NFS_V3 |
336 | extern struct inode_operations nfs3_file_inode_operations; | 328 | extern const struct inode_operations nfs3_file_inode_operations; |
337 | #endif /* CONFIG_NFS_V3 */ | 329 | #endif /* CONFIG_NFS_V3 */ |
338 | extern const struct file_operations nfs_file_operations; | 330 | extern const struct file_operations nfs_file_operations; |
339 | extern const struct address_space_operations nfs_file_aops; | 331 | extern const struct address_space_operations nfs_file_aops; |
@@ -380,9 +372,9 @@ extern ssize_t nfs_file_direct_write(struct kiocb *iocb, | |||
380 | /* | 372 | /* |
381 | * linux/fs/nfs/dir.c | 373 | * linux/fs/nfs/dir.c |
382 | */ | 374 | */ |
383 | extern struct inode_operations nfs_dir_inode_operations; | 375 | extern const struct inode_operations nfs_dir_inode_operations; |
384 | #ifdef CONFIG_NFS_V3 | 376 | #ifdef CONFIG_NFS_V3 |
385 | extern struct inode_operations nfs3_dir_inode_operations; | 377 | extern const struct inode_operations nfs3_dir_inode_operations; |
386 | #endif /* CONFIG_NFS_V3 */ | 378 | #endif /* CONFIG_NFS_V3 */ |
387 | extern const struct file_operations nfs_dir_operations; | 379 | extern const struct file_operations nfs_dir_operations; |
388 | extern struct dentry_operations nfs_dentry_operations; | 380 | extern struct dentry_operations nfs_dentry_operations; |
@@ -392,7 +384,7 @@ extern int nfs_instantiate(struct dentry *dentry, struct nfs_fh *fh, struct nfs_ | |||
392 | /* | 384 | /* |
393 | * linux/fs/nfs/symlink.c | 385 | * linux/fs/nfs/symlink.c |
394 | */ | 386 | */ |
395 | extern struct inode_operations nfs_symlink_inode_operations; | 387 | extern const struct inode_operations nfs_symlink_inode_operations; |
396 | 388 | ||
397 | /* | 389 | /* |
398 | * linux/fs/nfs/sysctl.c | 390 | * linux/fs/nfs/sysctl.c |
@@ -409,8 +401,8 @@ extern void nfs_unregister_sysctl(void); | |||
409 | * linux/fs/nfs/namespace.c | 401 | * linux/fs/nfs/namespace.c |
410 | */ | 402 | */ |
411 | extern struct list_head nfs_automount_list; | 403 | extern struct list_head nfs_automount_list; |
412 | extern struct inode_operations nfs_mountpoint_inode_operations; | 404 | extern const struct inode_operations nfs_mountpoint_inode_operations; |
413 | extern struct inode_operations nfs_referral_inode_operations; | 405 | extern const struct inode_operations nfs_referral_inode_operations; |
414 | extern int nfs_mountpoint_expiry_timeout; | 406 | extern int nfs_mountpoint_expiry_timeout; |
415 | extern void nfs_release_automount_timer(void); | 407 | extern void nfs_release_automount_timer(void); |
416 | 408 | ||
@@ -567,6 +559,15 @@ extern void * nfs_root_data(void); | |||
567 | #define NFSDBG_ALL 0xFFFF | 559 | #define NFSDBG_ALL 0xFFFF |
568 | 560 | ||
569 | #ifdef __KERNEL__ | 561 | #ifdef __KERNEL__ |
562 | |||
563 | /* | ||
564 | * Enable debugging support for nfs client. | ||
565 | * Requires RPC_DEBUG. | ||
566 | */ | ||
567 | #ifdef RPC_DEBUG | ||
568 | # define NFS_DEBUG | ||
569 | #endif | ||
570 | |||
570 | # undef ifdebug | 571 | # undef ifdebug |
571 | # ifdef NFS_DEBUG | 572 | # ifdef NFS_DEBUG |
572 | # define ifdebug(fac) if (unlikely(nfs_debug & NFSDBG_##fac)) | 573 | # define ifdebug(fac) if (unlikely(nfs_debug & NFSDBG_##fac)) |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 9ee9da5e1cc9..10c26ed0db71 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
@@ -767,8 +767,8 @@ struct nfs_access_entry; | |||
767 | struct nfs_rpc_ops { | 767 | struct nfs_rpc_ops { |
768 | int version; /* Protocol version */ | 768 | int version; /* Protocol version */ |
769 | struct dentry_operations *dentry_ops; | 769 | struct dentry_operations *dentry_ops; |
770 | struct inode_operations *dir_inode_ops; | 770 | const struct inode_operations *dir_inode_ops; |
771 | struct inode_operations *file_inode_ops; | 771 | const struct inode_operations *file_inode_ops; |
772 | 772 | ||
773 | int (*getroot) (struct nfs_server *, struct nfs_fh *, | 773 | int (*getroot) (struct nfs_server *, struct nfs_fh *, |
774 | struct nfs_fsinfo *); | 774 | struct nfs_fsinfo *); |
@@ -784,7 +784,6 @@ struct nfs_rpc_ops { | |||
784 | int (*access) (struct inode *, struct nfs_access_entry *); | 784 | int (*access) (struct inode *, struct nfs_access_entry *); |
785 | int (*readlink)(struct inode *, struct page *, unsigned int, | 785 | int (*readlink)(struct inode *, struct page *, unsigned int, |
786 | unsigned int); | 786 | unsigned int); |
787 | int (*read) (struct nfs_read_data *); | ||
788 | int (*create) (struct inode *, struct dentry *, | 787 | int (*create) (struct inode *, struct dentry *, |
789 | struct iattr *, int, struct nameidata *); | 788 | struct iattr *, int, struct nameidata *); |
790 | int (*remove) (struct inode *, struct qstr *); | 789 | int (*remove) (struct inode *, struct qstr *); |
diff --git a/include/linux/nfsd/const.h b/include/linux/nfsd/const.h index f0cc77790527..323f8cfa060a 100644 --- a/include/linux/nfsd/const.h +++ b/include/linux/nfsd/const.h | |||
@@ -30,10 +30,6 @@ | |||
30 | 30 | ||
31 | #include <linux/sunrpc/msg_prot.h> | 31 | #include <linux/sunrpc/msg_prot.h> |
32 | 32 | ||
33 | #ifndef NFS_SUPER_MAGIC | ||
34 | # define NFS_SUPER_MAGIC 0x6969 | ||
35 | #endif | ||
36 | |||
37 | /* | 33 | /* |
38 | * Largest number of bytes we need to allocate for an NFS | 34 | * Largest number of bytes we need to allocate for an NFS |
39 | * call or reply. Used to control buffer sizes. We use | 35 | * call or reply. Used to control buffer sizes. We use |
diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h index 045e38cdbe64..9f62d6182d32 100644 --- a/include/linux/nfsd/export.h +++ b/include/linux/nfsd/export.h | |||
@@ -74,19 +74,20 @@ struct svc_export { | |||
74 | uid_t ex_anon_uid; | 74 | uid_t ex_anon_uid; |
75 | gid_t ex_anon_gid; | 75 | gid_t ex_anon_gid; |
76 | int ex_fsid; | 76 | int ex_fsid; |
77 | unsigned char * ex_uuid; /* 16 byte fsid */ | ||
77 | struct nfsd4_fs_locations ex_fslocs; | 78 | struct nfsd4_fs_locations ex_fslocs; |
78 | }; | 79 | }; |
79 | 80 | ||
80 | /* an "export key" (expkey) maps a filehandlefragement to an | 81 | /* an "export key" (expkey) maps a filehandlefragement to an |
81 | * svc_export for a given client. There can be two per export, one | 82 | * svc_export for a given client. There can be several per export, |
82 | * for type 0 (dev/ino), one for type 1 (fsid) | 83 | * for the different fsid types. |
83 | */ | 84 | */ |
84 | struct svc_expkey { | 85 | struct svc_expkey { |
85 | struct cache_head h; | 86 | struct cache_head h; |
86 | 87 | ||
87 | struct auth_domain * ek_client; | 88 | struct auth_domain * ek_client; |
88 | int ek_fsidtype; | 89 | int ek_fsidtype; |
89 | u32 ek_fsid[3]; | 90 | u32 ek_fsid[6]; |
90 | 91 | ||
91 | struct vfsmount * ek_mnt; | 92 | struct vfsmount * ek_mnt; |
92 | struct dentry * ek_dentry; | 93 | struct dentry * ek_dentry; |
diff --git a/include/linux/nfsd/nfsd.h b/include/linux/nfsd/nfsd.h index 4b7c4b568f6d..72feac581aa3 100644 --- a/include/linux/nfsd/nfsd.h +++ b/include/linux/nfsd/nfsd.h | |||
@@ -254,18 +254,6 @@ void nfsd_lockd_shutdown(void); | |||
254 | */ | 254 | */ |
255 | extern struct timeval nfssvc_boot; | 255 | extern struct timeval nfssvc_boot; |
256 | 256 | ||
257 | static inline int is_fsid(struct svc_fh *fh, struct knfsd_fh *reffh) | ||
258 | { | ||
259 | if (fh->fh_export->ex_flags & NFSEXP_FSID) { | ||
260 | struct vfsmount *mnt = fh->fh_export->ex_mnt; | ||
261 | if (!old_valid_dev(mnt->mnt_sb->s_dev) || | ||
262 | (reffh->fh_version == 1 && reffh->fh_fsid_type == 1)) | ||
263 | return 1; | ||
264 | } | ||
265 | return 0; | ||
266 | } | ||
267 | |||
268 | |||
269 | #ifdef CONFIG_NFSD_V4 | 257 | #ifdef CONFIG_NFSD_V4 |
270 | 258 | ||
271 | /* before processing a COMPOUND operation, we have to check that there | 259 | /* before processing a COMPOUND operation, we have to check that there |
diff --git a/include/linux/nfsd/nfsfh.h b/include/linux/nfsd/nfsfh.h index d9c6c382165d..11e568ee0eeb 100644 --- a/include/linux/nfsd/nfsfh.h +++ b/include/linux/nfsd/nfsfh.h | |||
@@ -165,38 +165,91 @@ typedef struct svc_fh { | |||
165 | 165 | ||
166 | } svc_fh; | 166 | } svc_fh; |
167 | 167 | ||
168 | static inline void mk_fsid_v0(u32 *fsidv, dev_t dev, ino_t ino) | 168 | enum nfsd_fsid { |
169 | { | 169 | FSID_DEV = 0, |
170 | fsidv[0] = htonl((MAJOR(dev)<<16) | | 170 | FSID_NUM, |
171 | MINOR(dev)); | 171 | FSID_MAJOR_MINOR, |
172 | fsidv[1] = ino_t_to_u32(ino); | 172 | FSID_ENCODE_DEV, |
173 | } | 173 | FSID_UUID4_INUM, |
174 | FSID_UUID8, | ||
175 | FSID_UUID16, | ||
176 | FSID_UUID16_INUM, | ||
177 | }; | ||
174 | 178 | ||
175 | static inline void mk_fsid_v1(u32 *fsidv, u32 fsid) | 179 | enum fsid_source { |
176 | { | 180 | FSIDSOURCE_DEV, |
177 | fsidv[0] = fsid; | 181 | FSIDSOURCE_FSID, |
178 | } | 182 | FSIDSOURCE_UUID, |
183 | }; | ||
184 | extern enum fsid_source fsid_source(struct svc_fh *fhp); | ||
179 | 185 | ||
180 | static inline void mk_fsid_v2(u32 *fsidv, dev_t dev, ino_t ino) | ||
181 | { | ||
182 | fsidv[0] = htonl(MAJOR(dev)); | ||
183 | fsidv[1] = htonl(MINOR(dev)); | ||
184 | fsidv[2] = ino_t_to_u32(ino); | ||
185 | } | ||
186 | 186 | ||
187 | static inline void mk_fsid_v3(u32 *fsidv, dev_t dev, ino_t ino) | 187 | /* This might look a little large to "inline" but in all calls except |
188 | * one, 'vers' is constant so moste of the function disappears. | ||
189 | */ | ||
190 | static inline void mk_fsid(int vers, u32 *fsidv, dev_t dev, ino_t ino, | ||
191 | u32 fsid, unsigned char *uuid) | ||
188 | { | 192 | { |
189 | fsidv[0] = new_encode_dev(dev); | 193 | u32 *up; |
190 | fsidv[1] = ino_t_to_u32(ino); | 194 | switch(vers) { |
195 | case FSID_DEV: | ||
196 | fsidv[0] = htonl((MAJOR(dev)<<16) | | ||
197 | MINOR(dev)); | ||
198 | fsidv[1] = ino_t_to_u32(ino); | ||
199 | break; | ||
200 | case FSID_NUM: | ||
201 | fsidv[0] = fsid; | ||
202 | break; | ||
203 | case FSID_MAJOR_MINOR: | ||
204 | fsidv[0] = htonl(MAJOR(dev)); | ||
205 | fsidv[1] = htonl(MINOR(dev)); | ||
206 | fsidv[2] = ino_t_to_u32(ino); | ||
207 | break; | ||
208 | |||
209 | case FSID_ENCODE_DEV: | ||
210 | fsidv[0] = new_encode_dev(dev); | ||
211 | fsidv[1] = ino_t_to_u32(ino); | ||
212 | break; | ||
213 | |||
214 | case FSID_UUID4_INUM: | ||
215 | /* 4 byte fsid and inode number */ | ||
216 | up = (u32*)uuid; | ||
217 | fsidv[0] = ino_t_to_u32(ino); | ||
218 | fsidv[1] = up[0] ^ up[1] ^ up[2] ^ up[3]; | ||
219 | break; | ||
220 | |||
221 | case FSID_UUID8: | ||
222 | /* 8 byte fsid */ | ||
223 | up = (u32*)uuid; | ||
224 | fsidv[0] = up[0] ^ up[2]; | ||
225 | fsidv[1] = up[1] ^ up[3]; | ||
226 | break; | ||
227 | |||
228 | case FSID_UUID16: | ||
229 | /* 16 byte fsid - NFSv3+ only */ | ||
230 | memcpy(fsidv, uuid, 16); | ||
231 | break; | ||
232 | |||
233 | case FSID_UUID16_INUM: | ||
234 | /* 8 byte inode and 16 byte fsid */ | ||
235 | *(u64*)fsidv = (u64)ino; | ||
236 | memcpy(fsidv+2, uuid, 16); | ||
237 | break; | ||
238 | default: BUG(); | ||
239 | } | ||
191 | } | 240 | } |
192 | 241 | ||
193 | static inline int key_len(int type) | 242 | static inline int key_len(int type) |
194 | { | 243 | { |
195 | switch(type) { | 244 | switch(type) { |
196 | case 0: return 8; | 245 | case FSID_DEV: return 8; |
197 | case 1: return 4; | 246 | case FSID_NUM: return 4; |
198 | case 2: return 12; | 247 | case FSID_MAJOR_MINOR: return 12; |
199 | case 3: return 8; | 248 | case FSID_ENCODE_DEV: return 8; |
249 | case FSID_UUID4_INUM: return 8; | ||
250 | case FSID_UUID8: return 8; | ||
251 | case FSID_UUID16: return 16; | ||
252 | case FSID_UUID16_INUM: return 24; | ||
200 | default: return 0; | 253 | default: return 0; |
201 | } | 254 | } |
202 | } | 255 | } |
diff --git a/include/linux/nmi.h b/include/linux/nmi.h index acb4ed130247..29af2d5df097 100644 --- a/include/linux/nmi.h +++ b/include/linux/nmi.h | |||
@@ -17,8 +17,15 @@ | |||
17 | #ifdef ARCH_HAS_NMI_WATCHDOG | 17 | #ifdef ARCH_HAS_NMI_WATCHDOG |
18 | #include <asm/nmi.h> | 18 | #include <asm/nmi.h> |
19 | extern void touch_nmi_watchdog(void); | 19 | extern void touch_nmi_watchdog(void); |
20 | extern void acpi_nmi_disable(void); | ||
21 | extern void acpi_nmi_enable(void); | ||
20 | #else | 22 | #else |
21 | # define touch_nmi_watchdog() touch_softlockup_watchdog() | 23 | static inline void touch_nmi_watchdog(void) |
24 | { | ||
25 | touch_softlockup_watchdog(); | ||
26 | } | ||
27 | static inline void acpi_nmi_disable(void) { } | ||
28 | static inline void acpi_nmi_enable(void) { } | ||
22 | #endif | 29 | #endif |
23 | 30 | ||
24 | #ifndef trigger_all_cpu_backtrace | 31 | #ifndef trigger_all_cpu_backtrace |
diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h index b1063e9cdb1b..52c54a5720f3 100644 --- a/include/linux/nodemask.h +++ b/include/linux/nodemask.h | |||
@@ -352,7 +352,7 @@ extern nodemask_t node_possible_map; | |||
352 | #define node_possible(node) node_isset((node), node_possible_map) | 352 | #define node_possible(node) node_isset((node), node_possible_map) |
353 | #define first_online_node first_node(node_online_map) | 353 | #define first_online_node first_node(node_online_map) |
354 | #define next_online_node(nid) next_node((nid), node_online_map) | 354 | #define next_online_node(nid) next_node((nid), node_online_map) |
355 | int highest_possible_node_id(void); | 355 | extern int nr_node_ids; |
356 | #else | 356 | #else |
357 | #define num_online_nodes() 1 | 357 | #define num_online_nodes() 1 |
358 | #define num_possible_nodes() 1 | 358 | #define num_possible_nodes() 1 |
@@ -360,7 +360,7 @@ int highest_possible_node_id(void); | |||
360 | #define node_possible(node) ((node) == 0) | 360 | #define node_possible(node) ((node) == 0) |
361 | #define first_online_node 0 | 361 | #define first_online_node 0 |
362 | #define next_online_node(nid) (MAX_NUMNODES) | 362 | #define next_online_node(nid) (MAX_NUMNODES) |
363 | #define highest_possible_node_id() 0 | 363 | #define nr_node_ids 1 |
364 | #endif | 364 | #endif |
365 | 365 | ||
366 | #define any_online_node(mask) \ | 366 | #define any_online_node(mask) \ |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 9e3042e7e1cc..2c4b6842dfb9 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -840,6 +840,11 @@ enum pci_fixup_pass { | |||
840 | 840 | ||
841 | void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev); | 841 | void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev); |
842 | 842 | ||
843 | void __iomem * pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen); | ||
844 | void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr); | ||
845 | void __iomem * const * pcim_iomap_table(struct pci_dev *pdev); | ||
846 | int pcim_iomap_regions(struct pci_dev *pdev, u16 mask, const char *name); | ||
847 | |||
843 | extern int pci_pci_problems; | 848 | extern int pci_pci_problems; |
844 | #define PCIPCI_FAIL 1 /* No PCI PCI DMA */ | 849 | #define PCIPCI_FAIL 1 /* No PCI PCI DMA */ |
845 | #define PCIPCI_TRITON 2 | 850 | #define PCIPCI_TRITON 2 |
@@ -849,5 +854,8 @@ extern int pci_pci_problems; | |||
849 | #define PCIPCI_ALIMAGIK 32 /* Need low latency setting */ | 854 | #define PCIPCI_ALIMAGIK 32 /* Need low latency setting */ |
850 | #define PCIAGP_FAIL 64 /* No PCI to AGP DMA */ | 855 | #define PCIAGP_FAIL 64 /* No PCI to AGP DMA */ |
851 | 856 | ||
857 | extern unsigned long pci_cardbus_io_size; | ||
858 | extern unsigned long pci_cardbus_mem_size; | ||
859 | |||
852 | #endif /* __KERNEL__ */ | 860 | #endif /* __KERNEL__ */ |
853 | #endif /* LINUX_PCI_H */ | 861 | #endif /* LINUX_PCI_H */ |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index e67b68ca235a..600308fdf9ce 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -369,6 +369,7 @@ | |||
369 | #define PCI_DEVICE_ID_ATI_IXP400_SATA2 0x437a | 369 | #define PCI_DEVICE_ID_ATI_IXP400_SATA2 0x437a |
370 | #define PCI_DEVICE_ID_ATI_IXP600_SATA 0x4380 | 370 | #define PCI_DEVICE_ID_ATI_IXP600_SATA 0x4380 |
371 | #define PCI_DEVICE_ID_ATI_IXP600_SRAID 0x4381 | 371 | #define PCI_DEVICE_ID_ATI_IXP600_SRAID 0x4381 |
372 | #define PCI_DEVICE_ID_ATI_IXP600_SMBUS 0x4385 | ||
372 | #define PCI_DEVICE_ID_ATI_IXP600_IDE 0x438c | 373 | #define PCI_DEVICE_ID_ATI_IXP600_IDE 0x438c |
373 | 374 | ||
374 | #define PCI_VENDOR_ID_VLSI 0x1004 | 375 | #define PCI_VENDOR_ID_VLSI 0x1004 |
@@ -959,6 +960,7 @@ | |||
959 | #define PCI_DEVICE_ID_PLX_R753 0x1152 | 960 | #define PCI_DEVICE_ID_PLX_R753 0x1152 |
960 | #define PCI_DEVICE_ID_PLX_OLITEC 0x1187 | 961 | #define PCI_DEVICE_ID_PLX_OLITEC 0x1187 |
961 | #define PCI_DEVICE_ID_PLX_PCI200SYN 0x3196 | 962 | #define PCI_DEVICE_ID_PLX_PCI200SYN 0x3196 |
963 | #define PCI_DEVICE_ID_PLX_9030 0x9030 | ||
962 | #define PCI_DEVICE_ID_PLX_9050 0x9050 | 964 | #define PCI_DEVICE_ID_PLX_9050 0x9050 |
963 | #define PCI_DEVICE_ID_PLX_9080 0x9080 | 965 | #define PCI_DEVICE_ID_PLX_9080 0x9080 |
964 | #define PCI_DEVICE_ID_PLX_GTEK_SERIAL2 0xa001 | 966 | #define PCI_DEVICE_ID_PLX_GTEK_SERIAL2 0xa001 |
@@ -1696,6 +1698,8 @@ | |||
1696 | #define PCI_VENDOR_ID_ELECTRONICDESIGNGMBH 0x12f8 | 1698 | #define PCI_VENDOR_ID_ELECTRONICDESIGNGMBH 0x12f8 |
1697 | #define PCI_DEVICE_ID_LML_33R10 0x8a02 | 1699 | #define PCI_DEVICE_ID_LML_33R10 0x8a02 |
1698 | 1700 | ||
1701 | #define PCI_VENDOR_ID_ESDGMBH 0x12fe | ||
1702 | #define PCI_DEVICE_ID_ESDGMBH_CPCIASIO4 0x0111 | ||
1699 | 1703 | ||
1700 | #define PCI_VENDOR_ID_SIIG 0x131f | 1704 | #define PCI_VENDOR_ID_SIIG 0x131f |
1701 | #define PCI_SUBVENDOR_ID_SIIG 0x131f | 1705 | #define PCI_SUBVENDOR_ID_SIIG 0x131f |
@@ -1811,6 +1815,9 @@ | |||
1811 | #define PCI_DEVICE_ID_MOXA_C168 0x1680 | 1815 | #define PCI_DEVICE_ID_MOXA_C168 0x1680 |
1812 | #define PCI_DEVICE_ID_MOXA_CP168U 0x1681 | 1816 | #define PCI_DEVICE_ID_MOXA_CP168U 0x1681 |
1813 | #define PCI_DEVICE_ID_MOXA_CP168EL 0x1682 | 1817 | #define PCI_DEVICE_ID_MOXA_CP168EL 0x1682 |
1818 | #define PCI_DEVICE_ID_MOXA_CP204J 0x2040 | ||
1819 | #define PCI_DEVICE_ID_MOXA_C218 0x2180 | ||
1820 | #define PCI_DEVICE_ID_MOXA_C320 0x3200 | ||
1814 | 1821 | ||
1815 | #define PCI_VENDOR_ID_CCD 0x1397 | 1822 | #define PCI_VENDOR_ID_CCD 0x1397 |
1816 | #define PCI_DEVICE_ID_CCD_2BD0 0x2bd0 | 1823 | #define PCI_DEVICE_ID_CCD_2BD0 0x2bd0 |
@@ -1991,6 +1998,10 @@ | |||
1991 | 1998 | ||
1992 | #define PCI_VENDOR_ID_CHELSIO 0x1425 | 1999 | #define PCI_VENDOR_ID_CHELSIO 0x1425 |
1993 | 2000 | ||
2001 | #define PCI_SUBVENDOR_ID_PERLE 0x155f | ||
2002 | #define PCI_SUBDEVICE_ID_PCI_RAS4 0xf001 | ||
2003 | #define PCI_SUBDEVICE_ID_PCI_RAS8 0xf010 | ||
2004 | |||
1994 | 2005 | ||
1995 | #define PCI_VENDOR_ID_SYBA 0x1592 | 2006 | #define PCI_VENDOR_ID_SYBA 0x1592 |
1996 | #define PCI_DEVICE_ID_SYBA_2P_EPP 0x0782 | 2007 | #define PCI_DEVICE_ID_SYBA_2P_EPP 0x0782 |
@@ -2078,6 +2089,7 @@ | |||
2078 | #define PCI_VENDOR_ID_PASEMI 0x1959 | 2089 | #define PCI_VENDOR_ID_PASEMI 0x1959 |
2079 | 2090 | ||
2080 | #define PCI_VENDOR_ID_ATTANSIC 0x1969 | 2091 | #define PCI_VENDOR_ID_ATTANSIC 0x1969 |
2092 | #define PCI_DEVICE_ID_ATTANSIC_L1 0x1048 | ||
2081 | 2093 | ||
2082 | #define PCI_VENDOR_ID_JMICRON 0x197B | 2094 | #define PCI_VENDOR_ID_JMICRON 0x197B |
2083 | #define PCI_DEVICE_ID_JMICRON_JMB360 0x2360 | 2095 | #define PCI_DEVICE_ID_JMICRON_JMB360 0x2360 |
diff --git a/include/linux/phonedev.h b/include/linux/phonedev.h index a0e31adf3abe..4269de99e320 100644 --- a/include/linux/phonedev.h +++ b/include/linux/phonedev.h | |||
@@ -9,7 +9,7 @@ | |||
9 | 9 | ||
10 | struct phone_device { | 10 | struct phone_device { |
11 | struct phone_device *next; | 11 | struct phone_device *next; |
12 | struct file_operations *f_op; | 12 | const struct file_operations *f_op; |
13 | int (*open) (struct phone_device *, struct file *); | 13 | int (*open) (struct phone_device *, struct file *); |
14 | int board; /* Device private index */ | 14 | int board; /* Device private index */ |
15 | int minor; | 15 | int minor; |
diff --git a/include/linux/pid.h b/include/linux/pid.h index 4dec047b1837..2ac27f9997dd 100644 --- a/include/linux/pid.h +++ b/include/linux/pid.h | |||
@@ -105,20 +105,6 @@ static inline pid_t pid_nr(struct pid *pid) | |||
105 | return nr; | 105 | return nr; |
106 | } | 106 | } |
107 | 107 | ||
108 | |||
109 | #define do_each_task_pid(who, type, task) \ | ||
110 | do { \ | ||
111 | struct hlist_node *pos___; \ | ||
112 | struct pid *pid___ = find_pid(who); \ | ||
113 | if (pid___ != NULL) \ | ||
114 | hlist_for_each_entry_rcu((task), pos___, \ | ||
115 | &pid___->tasks[type], pids[type].node) { | ||
116 | |||
117 | #define while_each_task_pid(who, type, task) \ | ||
118 | } \ | ||
119 | } while (0) | ||
120 | |||
121 | |||
122 | #define do_each_pid_task(pid, type, task) \ | 108 | #define do_each_pid_task(pid, type, task) \ |
123 | do { \ | 109 | do { \ |
124 | struct hlist_node *pos___; \ | 110 | struct hlist_node *pos___; \ |
diff --git a/include/linux/pm.h b/include/linux/pm.h index 070394e846d0..21db05ac7c0b 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -120,15 +120,48 @@ typedef int __bitwise suspend_disk_method_t; | |||
120 | #define PM_DISK_TESTPROC ((__force suspend_disk_method_t) 6) | 120 | #define PM_DISK_TESTPROC ((__force suspend_disk_method_t) 6) |
121 | #define PM_DISK_MAX ((__force suspend_disk_method_t) 7) | 121 | #define PM_DISK_MAX ((__force suspend_disk_method_t) 7) |
122 | 122 | ||
123 | /** | ||
124 | * struct pm_ops - Callbacks for managing platform dependent suspend states. | ||
125 | * @valid: Callback to determine whether the given state can be entered. | ||
126 | * If %CONFIG_SOFTWARE_SUSPEND is set then %PM_SUSPEND_DISK is | ||
127 | * always valid and never passed to this call. | ||
128 | * If not assigned, all suspend states are advertised as valid | ||
129 | * in /sys/power/state (but can still be rejected by prepare or enter.) | ||
130 | * | ||
131 | * @prepare: Prepare the platform for the given suspend state. Can return a | ||
132 | * negative error code if necessary. | ||
133 | * | ||
134 | * @enter: Enter the given suspend state, must be assigned. Can return a | ||
135 | * negative error code if necessary. | ||
136 | * | ||
137 | * @finish: Called when the system has left the given state and all devices | ||
138 | * are resumed. The return value is ignored. | ||
139 | * | ||
140 | * @pm_disk_mode: Set to the disk method that the user should be able to | ||
141 | * configure for suspend-to-disk. Since %PM_DISK_SHUTDOWN, | ||
142 | * %PM_DISK_REBOOT, %PM_DISK_TEST and %PM_DISK_TESTPROC | ||
143 | * are always allowed, currently only %PM_DISK_PLATFORM | ||
144 | * makes sense. If the user then choses %PM_DISK_PLATFORM, | ||
145 | * the @prepare call will be called before suspending to disk | ||
146 | * (if present), the @enter call should be present and will | ||
147 | * be called after all state has been saved and the machine | ||
148 | * is ready to be shut down/suspended/..., and the @finish | ||
149 | * callback is called after state has been restored. All | ||
150 | * these calls are called with %PM_SUSPEND_DISK as the state. | ||
151 | */ | ||
123 | struct pm_ops { | 152 | struct pm_ops { |
124 | suspend_disk_method_t pm_disk_mode; | ||
125 | int (*valid)(suspend_state_t state); | 153 | int (*valid)(suspend_state_t state); |
126 | int (*prepare)(suspend_state_t state); | 154 | int (*prepare)(suspend_state_t state); |
127 | int (*enter)(suspend_state_t state); | 155 | int (*enter)(suspend_state_t state); |
128 | int (*finish)(suspend_state_t state); | 156 | int (*finish)(suspend_state_t state); |
157 | suspend_disk_method_t pm_disk_mode; | ||
129 | }; | 158 | }; |
130 | 159 | ||
131 | extern void pm_set_ops(struct pm_ops *); | 160 | /** |
161 | * pm_set_ops - set platform dependent power management ops | ||
162 | * @pm_ops: The new power management operations to set. | ||
163 | */ | ||
164 | extern void pm_set_ops(struct pm_ops *pm_ops); | ||
132 | extern struct pm_ops *pm_ops; | 165 | extern struct pm_ops *pm_ops; |
133 | extern int pm_suspend(suspend_state_t state); | 166 | extern int pm_suspend(suspend_state_t state); |
134 | 167 | ||
diff --git a/include/linux/pnp.h b/include/linux/pnp.h index ab8a8dd8d64c..9a5226f0f169 100644 --- a/include/linux/pnp.h +++ b/include/linux/pnp.h | |||
@@ -352,6 +352,8 @@ struct pnp_protocol { | |||
352 | (dev) = protocol_to_pnp_dev((dev)->protocol_list.next)) | 352 | (dev) = protocol_to_pnp_dev((dev)->protocol_list.next)) |
353 | 353 | ||
354 | 354 | ||
355 | extern struct bus_type pnp_bus_type; | ||
356 | |||
355 | #if defined(CONFIG_PNP) | 357 | #if defined(CONFIG_PNP) |
356 | 358 | ||
357 | /* device management */ | 359 | /* device management */ |
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 87dec8fe6de9..be4652a0545a 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -55,8 +55,8 @@ struct proc_dir_entry { | |||
55 | uid_t uid; | 55 | uid_t uid; |
56 | gid_t gid; | 56 | gid_t gid; |
57 | loff_t size; | 57 | loff_t size; |
58 | struct inode_operations * proc_iops; | 58 | const struct inode_operations *proc_iops; |
59 | const struct file_operations * proc_fops; | 59 | const struct file_operations *proc_fops; |
60 | get_info_t *get_info; | 60 | get_info_t *get_info; |
61 | struct module *owner; | 61 | struct module *owner; |
62 | struct proc_dir_entry *next, *parent, *subdir; | 62 | struct proc_dir_entry *next, *parent, *subdir; |
@@ -113,8 +113,6 @@ extern struct vfsmount *proc_mnt; | |||
113 | extern int proc_fill_super(struct super_block *,void *,int); | 113 | extern int proc_fill_super(struct super_block *,void *,int); |
114 | extern struct inode *proc_get_inode(struct super_block *, unsigned int, struct proc_dir_entry *); | 114 | extern struct inode *proc_get_inode(struct super_block *, unsigned int, struct proc_dir_entry *); |
115 | 115 | ||
116 | extern int proc_match(int, const char *,struct proc_dir_entry *); | ||
117 | |||
118 | /* | 116 | /* |
119 | * These are generic /proc routines that use the internal | 117 | * These are generic /proc routines that use the internal |
120 | * "struct proc_dir_entry" tree to traverse the filesystem. | 118 | * "struct proc_dir_entry" tree to traverse the filesystem. |
diff --git a/include/linux/qnx4_fs.h b/include/linux/qnx4_fs.h index 0c7ac444fd35..19bc9b8b6191 100644 --- a/include/linux/qnx4_fs.h +++ b/include/linux/qnx4_fs.h | |||
@@ -116,8 +116,8 @@ extern unsigned long qnx4_block_map(struct inode *inode, long iblock); | |||
116 | 116 | ||
117 | extern struct buffer_head *qnx4_bread(struct inode *, int, int); | 117 | extern struct buffer_head *qnx4_bread(struct inode *, int, int); |
118 | 118 | ||
119 | extern struct inode_operations qnx4_file_inode_operations; | 119 | extern const struct inode_operations qnx4_file_inode_operations; |
120 | extern struct inode_operations qnx4_dir_inode_operations; | 120 | extern const struct inode_operations qnx4_dir_inode_operations; |
121 | extern const struct file_operations qnx4_file_operations; | 121 | extern const struct file_operations qnx4_file_operations; |
122 | extern const struct file_operations qnx4_dir_operations; | 122 | extern const struct file_operations qnx4_dir_operations; |
123 | extern int qnx4_is_free(struct super_block *sb, long block); | 123 | extern int qnx4_is_free(struct super_block *sb, long block); |
diff --git a/include/linux/quota.h b/include/linux/quota.h index b8fbf26eb885..77db80a953d6 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h | |||
@@ -132,6 +132,7 @@ struct if_dqinfo { | |||
132 | 132 | ||
133 | #ifdef __KERNEL__ | 133 | #ifdef __KERNEL__ |
134 | #include <linux/spinlock.h> | 134 | #include <linux/spinlock.h> |
135 | #include <linux/rwsem.h> | ||
135 | #include <linux/mutex.h> | 136 | #include <linux/mutex.h> |
136 | 137 | ||
137 | #include <linux/dqblk_xfs.h> | 138 | #include <linux/dqblk_xfs.h> |
diff --git a/include/linux/random.h b/include/linux/random.h index 01ad71033d65..36f125c0c603 100644 --- a/include/linux/random.h +++ b/include/linux/random.h | |||
@@ -63,7 +63,7 @@ extern u64 secure_dccp_sequence_number(__be32 saddr, __be32 daddr, | |||
63 | __be16 sport, __be16 dport); | 63 | __be16 sport, __be16 dport); |
64 | 64 | ||
65 | #ifndef MODULE | 65 | #ifndef MODULE |
66 | extern struct file_operations random_fops, urandom_fops; | 66 | extern const struct file_operations random_fops, urandom_fops; |
67 | #endif | 67 | #endif |
68 | 68 | ||
69 | unsigned int get_random_int(void); | 69 | unsigned int get_random_int(void); |
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index c3fc6caaad3f..965d5b3ea9eb 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
@@ -1949,9 +1949,9 @@ int reiserfs_global_version_in_proc(char *buffer, char **start, off_t offset, | |||
1949 | #endif | 1949 | #endif |
1950 | 1950 | ||
1951 | /* dir.c */ | 1951 | /* dir.c */ |
1952 | extern struct inode_operations reiserfs_dir_inode_operations; | 1952 | extern const struct inode_operations reiserfs_dir_inode_operations; |
1953 | extern struct inode_operations reiserfs_symlink_inode_operations; | 1953 | extern const struct inode_operations reiserfs_symlink_inode_operations; |
1954 | extern struct inode_operations reiserfs_special_inode_operations; | 1954 | extern const struct inode_operations reiserfs_special_inode_operations; |
1955 | extern const struct file_operations reiserfs_dir_operations; | 1955 | extern const struct file_operations reiserfs_dir_operations; |
1956 | 1956 | ||
1957 | /* tail_conversion.c */ | 1957 | /* tail_conversion.c */ |
@@ -1963,7 +1963,7 @@ int indirect2direct(struct reiserfs_transaction_handle *, struct inode *, | |||
1963 | void reiserfs_unmap_buffer(struct buffer_head *); | 1963 | void reiserfs_unmap_buffer(struct buffer_head *); |
1964 | 1964 | ||
1965 | /* file.c */ | 1965 | /* file.c */ |
1966 | extern struct inode_operations reiserfs_file_inode_operations; | 1966 | extern const struct inode_operations reiserfs_file_inode_operations; |
1967 | extern const struct file_operations reiserfs_file_operations; | 1967 | extern const struct file_operations reiserfs_file_operations; |
1968 | extern const struct address_space_operations reiserfs_address_space_operations; | 1968 | extern const struct address_space_operations reiserfs_address_space_operations; |
1969 | 1969 | ||
diff --git a/include/linux/reiserfs_xattr.h b/include/linux/reiserfs_xattr.h index 966c35851b2e..66a96814d614 100644 --- a/include/linux/reiserfs_xattr.h +++ b/include/linux/reiserfs_xattr.h | |||
@@ -2,7 +2,10 @@ | |||
2 | File: linux/reiserfs_xattr.h | 2 | File: linux/reiserfs_xattr.h |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #include <linux/xattr.h> | 5 | #ifndef _LINUX_REISERFS_XATTR_H |
6 | #define _LINUX_REISERFS_XATTR_H | ||
7 | |||
8 | #include <linux/types.h> | ||
6 | 9 | ||
7 | /* Magic value in header */ | 10 | /* Magic value in header */ |
8 | #define REISERFS_XATTR_MAGIC 0x52465841 /* "RFXA" */ | 11 | #define REISERFS_XATTR_MAGIC 0x52465841 /* "RFXA" */ |
@@ -13,7 +16,18 @@ struct reiserfs_xattr_header { | |||
13 | }; | 16 | }; |
14 | 17 | ||
15 | #ifdef __KERNEL__ | 18 | #ifdef __KERNEL__ |
19 | |||
16 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/list.h> | ||
22 | #include <linux/rwsem.h> | ||
23 | #include <linux/reiserfs_fs_i.h> | ||
24 | #include <linux/reiserfs_fs.h> | ||
25 | |||
26 | struct inode; | ||
27 | struct dentry; | ||
28 | struct iattr; | ||
29 | struct super_block; | ||
30 | struct nameidata; | ||
17 | 31 | ||
18 | struct reiserfs_xattr_handler { | 32 | struct reiserfs_xattr_handler { |
19 | char *prefix; | 33 | char *prefix; |
@@ -49,9 +63,7 @@ int reiserfs_xattr_set(struct inode *, const char *, const void *, size_t, int); | |||
49 | 63 | ||
50 | extern struct reiserfs_xattr_handler user_handler; | 64 | extern struct reiserfs_xattr_handler user_handler; |
51 | extern struct reiserfs_xattr_handler trusted_handler; | 65 | extern struct reiserfs_xattr_handler trusted_handler; |
52 | #ifdef CONFIG_REISERFS_FS_SECURITY | ||
53 | extern struct reiserfs_xattr_handler security_handler; | 66 | extern struct reiserfs_xattr_handler security_handler; |
54 | #endif | ||
55 | 67 | ||
56 | int reiserfs_xattr_register_handlers(void) __init; | 68 | int reiserfs_xattr_register_handlers(void) __init; |
57 | void reiserfs_xattr_unregister_handlers(void); | 69 | void reiserfs_xattr_unregister_handlers(void); |
@@ -137,6 +149,8 @@ static inline int reiserfs_xattr_init(struct super_block *sb, int mount_flags) | |||
137 | static inline void reiserfs_init_xattr_rwsem(struct inode *inode) | 149 | static inline void reiserfs_init_xattr_rwsem(struct inode *inode) |
138 | { | 150 | { |
139 | } | 151 | } |
140 | #endif | 152 | #endif /* CONFIG_REISERFS_FS_XATTR */ |
153 | |||
154 | #endif /* __KERNEL__ */ | ||
141 | 155 | ||
142 | #endif /* __KERNEL__ */ | 156 | #endif /* _LINUX_REISERFS_XATTR_H */ |
diff --git a/include/linux/relay.h b/include/linux/relay.h index c6a48bfc8b14..759a0f97bec2 100644 --- a/include/linux/relay.h +++ b/include/linux/relay.h | |||
@@ -24,7 +24,7 @@ | |||
24 | /* | 24 | /* |
25 | * Tracks changes to rchan/rchan_buf structs | 25 | * Tracks changes to rchan/rchan_buf structs |
26 | */ | 26 | */ |
27 | #define RELAYFS_CHANNEL_VERSION 6 | 27 | #define RELAYFS_CHANNEL_VERSION 7 |
28 | 28 | ||
29 | /* | 29 | /* |
30 | * Per-cpu relay channel buffer | 30 | * Per-cpu relay channel buffer |
@@ -64,6 +64,10 @@ struct rchan | |||
64 | void *private_data; /* for user-defined data */ | 64 | void *private_data; /* for user-defined data */ |
65 | size_t last_toobig; /* tried to log event > subbuf size */ | 65 | size_t last_toobig; /* tried to log event > subbuf size */ |
66 | struct rchan_buf *buf[NR_CPUS]; /* per-cpu channel buffers */ | 66 | struct rchan_buf *buf[NR_CPUS]; /* per-cpu channel buffers */ |
67 | int is_global; /* One global buffer ? */ | ||
68 | struct list_head list; /* for channel list */ | ||
69 | struct dentry *parent; /* parent dentry passed to open */ | ||
70 | char base_filename[NAME_MAX]; /* saved base filename */ | ||
67 | }; | 71 | }; |
68 | 72 | ||
69 | /* | 73 | /* |
@@ -162,7 +166,8 @@ struct rchan *relay_open(const char *base_filename, | |||
162 | struct dentry *parent, | 166 | struct dentry *parent, |
163 | size_t subbuf_size, | 167 | size_t subbuf_size, |
164 | size_t n_subbufs, | 168 | size_t n_subbufs, |
165 | struct rchan_callbacks *cb); | 169 | struct rchan_callbacks *cb, |
170 | void *private_data); | ||
166 | extern void relay_close(struct rchan *chan); | 171 | extern void relay_close(struct rchan *chan); |
167 | extern void relay_flush(struct rchan *chan); | 172 | extern void relay_flush(struct rchan *chan); |
168 | extern void relay_subbufs_consumed(struct rchan *chan, | 173 | extern void relay_subbufs_consumed(struct rchan *chan, |
diff --git a/include/linux/rio.h b/include/linux/rio.h index d93857056cb9..68e3f6853fa6 100644 --- a/include/linux/rio.h +++ b/include/linux/rio.h | |||
@@ -25,6 +25,7 @@ | |||
25 | 25 | ||
26 | #define RIO_ANY_DESTID 0xff | 26 | #define RIO_ANY_DESTID 0xff |
27 | #define RIO_NO_HOPCOUNT -1 | 27 | #define RIO_NO_HOPCOUNT -1 |
28 | #define RIO_INVALID_DESTID 0xffff | ||
28 | 29 | ||
29 | #define RIO_MAX_MPORT_RESOURCES 16 | 30 | #define RIO_MAX_MPORT_RESOURCES 16 |
30 | #define RIO_MAX_DEV_RESOURCES 16 | 31 | #define RIO_MAX_DEV_RESOURCES 16 |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 446373535190..6f7c9a4d80e5 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -436,7 +436,7 @@ struct signal_struct { | |||
436 | 436 | ||
437 | /* job control IDs */ | 437 | /* job control IDs */ |
438 | pid_t pgrp; | 438 | pid_t pgrp; |
439 | pid_t tty_old_pgrp; | 439 | struct pid *tty_old_pgrp; |
440 | 440 | ||
441 | union { | 441 | union { |
442 | pid_t session __deprecated; | 442 | pid_t session __deprecated; |
@@ -1013,8 +1013,10 @@ struct task_struct { | |||
1013 | * to a stack based synchronous wait) if its doing sync IO. | 1013 | * to a stack based synchronous wait) if its doing sync IO. |
1014 | */ | 1014 | */ |
1015 | wait_queue_t *io_wait; | 1015 | wait_queue_t *io_wait; |
1016 | #ifdef CONFIG_TASK_XACCT | ||
1016 | /* i/o counters(bytes read/written, #syscalls */ | 1017 | /* i/o counters(bytes read/written, #syscalls */ |
1017 | u64 rchar, wchar, syscr, syscw; | 1018 | u64 rchar, wchar, syscr, syscw; |
1019 | #endif | ||
1018 | struct task_io_accounting ioac; | 1020 | struct task_io_accounting ioac; |
1019 | #if defined(CONFIG_TASK_XACCT) | 1021 | #if defined(CONFIG_TASK_XACCT) |
1020 | u64 acct_rss_mem1; /* accumulated rss usage */ | 1022 | u64 acct_rss_mem1; /* accumulated rss usage */ |
@@ -1327,14 +1329,12 @@ extern int kill_pid_info(int sig, struct siginfo *info, struct pid *pid); | |||
1327 | extern int kill_pid_info_as_uid(int, struct siginfo *, struct pid *, uid_t, uid_t, u32); | 1329 | extern int kill_pid_info_as_uid(int, struct siginfo *, struct pid *, uid_t, uid_t, u32); |
1328 | extern int kill_pgrp(struct pid *pid, int sig, int priv); | 1330 | extern int kill_pgrp(struct pid *pid, int sig, int priv); |
1329 | extern int kill_pid(struct pid *pid, int sig, int priv); | 1331 | extern int kill_pid(struct pid *pid, int sig, int priv); |
1330 | extern int __kill_pg_info(int sig, struct siginfo *info, pid_t pgrp); | 1332 | extern int kill_proc_info(int, struct siginfo *, pid_t); |
1331 | extern int kill_pg_info(int, struct siginfo *, pid_t); | ||
1332 | extern void do_notify_parent(struct task_struct *, int); | 1333 | extern void do_notify_parent(struct task_struct *, int); |
1333 | extern void force_sig(int, struct task_struct *); | 1334 | extern void force_sig(int, struct task_struct *); |
1334 | extern void force_sig_specific(int, struct task_struct *); | 1335 | extern void force_sig_specific(int, struct task_struct *); |
1335 | extern int send_sig(int, struct task_struct *, int); | 1336 | extern int send_sig(int, struct task_struct *, int); |
1336 | extern void zap_other_threads(struct task_struct *p); | 1337 | extern void zap_other_threads(struct task_struct *p); |
1337 | extern int kill_pg(pid_t, int, int); | ||
1338 | extern int kill_proc(pid_t, int, int); | 1338 | extern int kill_proc(pid_t, int, int); |
1339 | extern struct sigqueue *sigqueue_alloc(void); | 1339 | extern struct sigqueue *sigqueue_alloc(void); |
1340 | extern void sigqueue_free(struct sigqueue *); | 1340 | extern void sigqueue_free(struct sigqueue *); |
@@ -1649,6 +1649,44 @@ extern int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls); | |||
1649 | 1649 | ||
1650 | extern void normalize_rt_tasks(void); | 1650 | extern void normalize_rt_tasks(void); |
1651 | 1651 | ||
1652 | #ifdef CONFIG_TASK_XACCT | ||
1653 | static inline void add_rchar(struct task_struct *tsk, ssize_t amt) | ||
1654 | { | ||
1655 | tsk->rchar += amt; | ||
1656 | } | ||
1657 | |||
1658 | static inline void add_wchar(struct task_struct *tsk, ssize_t amt) | ||
1659 | { | ||
1660 | tsk->wchar += amt; | ||
1661 | } | ||
1662 | |||
1663 | static inline void inc_syscr(struct task_struct *tsk) | ||
1664 | { | ||
1665 | tsk->syscr++; | ||
1666 | } | ||
1667 | |||
1668 | static inline void inc_syscw(struct task_struct *tsk) | ||
1669 | { | ||
1670 | tsk->syscw++; | ||
1671 | } | ||
1672 | #else | ||
1673 | static inline void add_rchar(struct task_struct *tsk, ssize_t amt) | ||
1674 | { | ||
1675 | } | ||
1676 | |||
1677 | static inline void add_wchar(struct task_struct *tsk, ssize_t amt) | ||
1678 | { | ||
1679 | } | ||
1680 | |||
1681 | static inline void inc_syscr(struct task_struct *tsk) | ||
1682 | { | ||
1683 | } | ||
1684 | |||
1685 | static inline void inc_syscw(struct task_struct *tsk) | ||
1686 | { | ||
1687 | } | ||
1688 | #endif | ||
1689 | |||
1652 | #endif /* __KERNEL__ */ | 1690 | #endif /* __KERNEL__ */ |
1653 | 1691 | ||
1654 | #endif | 1692 | #endif |
diff --git a/include/linux/security.h b/include/linux/security.h index 83cdefae9931..7f88d97575fd 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -492,7 +492,7 @@ struct request_sock; | |||
492 | * Note that the fown_struct, @fown, is never outside the context of a | 492 | * Note that the fown_struct, @fown, is never outside the context of a |
493 | * struct file, so the file structure (and associated security information) | 493 | * struct file, so the file structure (and associated security information) |
494 | * can always be obtained: | 494 | * can always be obtained: |
495 | * (struct file *)((long)fown - offsetof(struct file,f_owner)); | 495 | * container_of(fown, struct file, f_owner) |
496 | * @tsk contains the structure of task receiving signal. | 496 | * @tsk contains the structure of task receiving signal. |
497 | * @fown contains the file owner information. | 497 | * @fown contains the file owner information. |
498 | * @sig is the signal that will be sent. When 0, kernel sends SIGIO. | 498 | * @sig is the signal that will be sent. When 0, kernel sends SIGIO. |
@@ -2130,7 +2130,7 @@ extern int mod_reg_security (const char *name, struct security_operations *ops); | |||
2130 | extern int mod_unreg_security (const char *name, struct security_operations *ops); | 2130 | extern int mod_unreg_security (const char *name, struct security_operations *ops); |
2131 | extern struct dentry *securityfs_create_file(const char *name, mode_t mode, | 2131 | extern struct dentry *securityfs_create_file(const char *name, mode_t mode, |
2132 | struct dentry *parent, void *data, | 2132 | struct dentry *parent, void *data, |
2133 | struct file_operations *fops); | 2133 | const struct file_operations *fops); |
2134 | extern struct dentry *securityfs_create_dir(const char *name, struct dentry *parent); | 2134 | extern struct dentry *securityfs_create_dir(const char *name, struct dentry *parent); |
2135 | extern void securityfs_remove(struct dentry *dentry); | 2135 | extern void securityfs_remove(struct dentry *dentry); |
2136 | 2136 | ||
diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h index 6b0648cfdffc..52c9eb9b6df2 100644 --- a/include/linux/seqlock.h +++ b/include/linux/seqlock.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #define __LINUX_SEQLOCK_H | 2 | #define __LINUX_SEQLOCK_H |
3 | /* | 3 | /* |
4 | * Reader/writer consistent mechanism without starving writers. This type of | 4 | * Reader/writer consistent mechanism without starving writers. This type of |
5 | * lock for data where the reader wants a consitent set of information | 5 | * lock for data where the reader wants a consistent set of information |
6 | * and is willing to retry if the information changes. Readers never | 6 | * and is willing to retry if the information changes. Readers never |
7 | * block but they may have to retry if a writer is in | 7 | * block but they may have to retry if a writer is in |
8 | * progress. Writers do not wait for readers. | 8 | * progress. Writers do not wait for readers. |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index cf23813cbec2..586aaba91720 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -122,7 +122,7 @@ | |||
122 | /*Digi jsm */ | 122 | /*Digi jsm */ |
123 | #define PORT_JSM 69 | 123 | #define PORT_JSM 69 |
124 | 124 | ||
125 | #define PORT_IP3106 70 | 125 | #define PORT_PNX8XXX 70 |
126 | 126 | ||
127 | /* Hilscher netx */ | 127 | /* Hilscher netx */ |
128 | #define PORT_NETX 71 | 128 | #define PORT_NETX 71 |
diff --git a/include/linux/serial_ip3106.h b/include/linux/serial_ip3106.h deleted file mode 100644 index f500ac602c5c..000000000000 --- a/include/linux/serial_ip3106.h +++ /dev/null | |||
@@ -1,81 +0,0 @@ | |||
1 | /* | ||
2 | * Embedded Alley Solutions, source@embeddedalley.com. | ||
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 as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | ||
18 | |||
19 | #ifndef _LINUX_SERIAL_IP3106_H | ||
20 | #define _LINUX_SERIAL_IP3106_H | ||
21 | |||
22 | #include <linux/serial_core.h> | ||
23 | #include <linux/device.h> | ||
24 | |||
25 | #define IP3106_NR_PORTS 2 | ||
26 | |||
27 | struct ip3106_port { | ||
28 | struct uart_port port; | ||
29 | struct timer_list timer; | ||
30 | unsigned int old_status; | ||
31 | }; | ||
32 | |||
33 | /* register offsets */ | ||
34 | #define IP3106_LCR 0 | ||
35 | #define IP3106_MCR 0x004 | ||
36 | #define IP3106_BAUD 0x008 | ||
37 | #define IP3106_CFG 0x00c | ||
38 | #define IP3106_FIFO 0x028 | ||
39 | #define IP3106_ISTAT 0xfe0 | ||
40 | #define IP3106_IEN 0xfe4 | ||
41 | #define IP3106_ICLR 0xfe8 | ||
42 | #define IP3106_ISET 0xfec | ||
43 | #define IP3106_PD 0xff4 | ||
44 | #define IP3106_MID 0xffc | ||
45 | |||
46 | #define IP3106_UART_LCR_TXBREAK (1<<30) | ||
47 | #define IP3106_UART_LCR_PAREVN 0x10000000 | ||
48 | #define IP3106_UART_LCR_PAREN 0x08000000 | ||
49 | #define IP3106_UART_LCR_2STOPB 0x04000000 | ||
50 | #define IP3106_UART_LCR_8BIT 0x01000000 | ||
51 | #define IP3106_UART_LCR_TX_RST 0x00040000 | ||
52 | #define IP3106_UART_LCR_RX_RST 0x00020000 | ||
53 | #define IP3106_UART_LCR_RX_NEXT 0x00010000 | ||
54 | |||
55 | #define IP3106_UART_MCR_SCR 0xFF000000 | ||
56 | #define IP3106_UART_MCR_DCD 0x00800000 | ||
57 | #define IP3106_UART_MCR_CTS 0x00100000 | ||
58 | #define IP3106_UART_MCR_LOOP 0x00000010 | ||
59 | #define IP3106_UART_MCR_RTS 0x00000002 | ||
60 | #define IP3106_UART_MCR_DTR 0x00000001 | ||
61 | |||
62 | #define IP3106_UART_INT_TX 0x00000080 | ||
63 | #define IP3106_UART_INT_EMPTY 0x00000040 | ||
64 | #define IP3106_UART_INT_RCVTO 0x00000020 | ||
65 | #define IP3106_UART_INT_RX 0x00000010 | ||
66 | #define IP3106_UART_INT_RXOVRN 0x00000008 | ||
67 | #define IP3106_UART_INT_FRERR 0x00000004 | ||
68 | #define IP3106_UART_INT_BREAK 0x00000002 | ||
69 | #define IP3106_UART_INT_PARITY 0x00000001 | ||
70 | #define IP3106_UART_INT_ALLRX 0x0000003F | ||
71 | #define IP3106_UART_INT_ALLTX 0x000000C0 | ||
72 | |||
73 | #define IP3106_UART_FIFO_TXFIFO 0x001F0000 | ||
74 | #define IP3106_UART_FIFO_TXFIFO_STA (0x1f<<16) | ||
75 | #define IP3106_UART_FIFO_RXBRK 0x00008000 | ||
76 | #define IP3106_UART_FIFO_RXFE 0x00004000 | ||
77 | #define IP3106_UART_FIFO_RXPAR 0x00002000 | ||
78 | #define IP3106_UART_FIFO_RXFIFO 0x00001F00 | ||
79 | #define IP3106_UART_FIFO_RBRTHR 0x000000FF | ||
80 | |||
81 | #endif | ||
diff --git a/include/linux/serial_pnx8xxx.h b/include/linux/serial_pnx8xxx.h new file mode 100644 index 000000000000..de6c19c7f340 --- /dev/null +++ b/include/linux/serial_pnx8xxx.h | |||
@@ -0,0 +1,81 @@ | |||
1 | /* | ||
2 | * Embedded Alley Solutions, source@embeddedalley.com. | ||
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 as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | ||
18 | |||
19 | #ifndef _LINUX_SERIAL_PNX8XXX_H | ||
20 | #define _LINUX_SERIAL_PNX8XXX_H | ||
21 | |||
22 | #include <linux/serial_core.h> | ||
23 | #include <linux/device.h> | ||
24 | |||
25 | #define PNX8XXX_NR_PORTS 2 | ||
26 | |||
27 | struct pnx8xxx_port { | ||
28 | struct uart_port port; | ||
29 | struct timer_list timer; | ||
30 | unsigned int old_status; | ||
31 | }; | ||
32 | |||
33 | /* register offsets */ | ||
34 | #define PNX8XXX_LCR 0 | ||
35 | #define PNX8XXX_MCR 0x004 | ||
36 | #define PNX8XXX_BAUD 0x008 | ||
37 | #define PNX8XXX_CFG 0x00c | ||
38 | #define PNX8XXX_FIFO 0x028 | ||
39 | #define PNX8XXX_ISTAT 0xfe0 | ||
40 | #define PNX8XXX_IEN 0xfe4 | ||
41 | #define PNX8XXX_ICLR 0xfe8 | ||
42 | #define PNX8XXX_ISET 0xfec | ||
43 | #define PNX8XXX_PD 0xff4 | ||
44 | #define PNX8XXX_MID 0xffc | ||
45 | |||
46 | #define PNX8XXX_UART_LCR_TXBREAK (1<<30) | ||
47 | #define PNX8XXX_UART_LCR_PAREVN 0x10000000 | ||
48 | #define PNX8XXX_UART_LCR_PAREN 0x08000000 | ||
49 | #define PNX8XXX_UART_LCR_2STOPB 0x04000000 | ||
50 | #define PNX8XXX_UART_LCR_8BIT 0x01000000 | ||
51 | #define PNX8XXX_UART_LCR_TX_RST 0x00040000 | ||
52 | #define PNX8XXX_UART_LCR_RX_RST 0x00020000 | ||
53 | #define PNX8XXX_UART_LCR_RX_NEXT 0x00010000 | ||
54 | |||
55 | #define PNX8XXX_UART_MCR_SCR 0xFF000000 | ||
56 | #define PNX8XXX_UART_MCR_DCD 0x00800000 | ||
57 | #define PNX8XXX_UART_MCR_CTS 0x00100000 | ||
58 | #define PNX8XXX_UART_MCR_LOOP 0x00000010 | ||
59 | #define PNX8XXX_UART_MCR_RTS 0x00000002 | ||
60 | #define PNX8XXX_UART_MCR_DTR 0x00000001 | ||
61 | |||
62 | #define PNX8XXX_UART_INT_TX 0x00000080 | ||
63 | #define PNX8XXX_UART_INT_EMPTY 0x00000040 | ||
64 | #define PNX8XXX_UART_INT_RCVTO 0x00000020 | ||
65 | #define PNX8XXX_UART_INT_RX 0x00000010 | ||
66 | #define PNX8XXX_UART_INT_RXOVRN 0x00000008 | ||
67 | #define PNX8XXX_UART_INT_FRERR 0x00000004 | ||
68 | #define PNX8XXX_UART_INT_BREAK 0x00000002 | ||
69 | #define PNX8XXX_UART_INT_PARITY 0x00000001 | ||
70 | #define PNX8XXX_UART_INT_ALLRX 0x0000003F | ||
71 | #define PNX8XXX_UART_INT_ALLTX 0x000000C0 | ||
72 | |||
73 | #define PNX8XXX_UART_FIFO_TXFIFO 0x001F0000 | ||
74 | #define PNX8XXX_UART_FIFO_TXFIFO_STA (0x1f<<16) | ||
75 | #define PNX8XXX_UART_FIFO_RXBRK 0x00008000 | ||
76 | #define PNX8XXX_UART_FIFO_RXFE 0x00004000 | ||
77 | #define PNX8XXX_UART_FIFO_RXPAR 0x00002000 | ||
78 | #define PNX8XXX_UART_FIFO_RXFIFO 0x00001F00 | ||
79 | #define PNX8XXX_UART_FIFO_RBRTHR 0x000000FF | ||
80 | |||
81 | #endif | ||
diff --git a/include/linux/serio.h b/include/linux/serio.h index ac2c70e7f760..1ebf0455e224 100644 --- a/include/linux/serio.h +++ b/include/linux/serio.h | |||
@@ -108,12 +108,6 @@ static inline void serio_drv_write_wakeup(struct serio *serio) | |||
108 | serio->drv->write_wakeup(serio); | 108 | serio->drv->write_wakeup(serio); |
109 | } | 109 | } |
110 | 110 | ||
111 | static inline void serio_cleanup(struct serio *serio) | ||
112 | { | ||
113 | if (serio->drv && serio->drv->cleanup) | ||
114 | serio->drv->cleanup(serio); | ||
115 | } | ||
116 | |||
117 | /* | 111 | /* |
118 | * Use the following functions to manipulate serio's per-port | 112 | * Use the following functions to manipulate serio's per-port |
119 | * driver-specific data. | 113 | * driver-specific data. |
diff --git a/include/linux/slab_def.h b/include/linux/slab_def.h index 4b463e66ddea..5e4364644ed1 100644 --- a/include/linux/slab_def.h +++ b/include/linux/slab_def.h | |||
@@ -19,7 +19,9 @@ | |||
19 | struct cache_sizes { | 19 | struct cache_sizes { |
20 | size_t cs_size; | 20 | size_t cs_size; |
21 | struct kmem_cache *cs_cachep; | 21 | struct kmem_cache *cs_cachep; |
22 | #ifdef CONFIG_ZONE_DMA | ||
22 | struct kmem_cache *cs_dmacachep; | 23 | struct kmem_cache *cs_dmacachep; |
24 | #endif | ||
23 | }; | 25 | }; |
24 | extern struct cache_sizes malloc_sizes[]; | 26 | extern struct cache_sizes malloc_sizes[]; |
25 | 27 | ||
@@ -39,9 +41,12 @@ static inline void *kmalloc(size_t size, gfp_t flags) | |||
39 | __you_cannot_kmalloc_that_much(); | 41 | __you_cannot_kmalloc_that_much(); |
40 | } | 42 | } |
41 | found: | 43 | found: |
42 | return kmem_cache_alloc((flags & GFP_DMA) ? | 44 | #ifdef CONFIG_ZONE_DMA |
43 | malloc_sizes[i].cs_dmacachep : | 45 | if (flags & GFP_DMA) |
44 | malloc_sizes[i].cs_cachep, flags); | 46 | return kmem_cache_alloc(malloc_sizes[i].cs_dmacachep, |
47 | flags); | ||
48 | #endif | ||
49 | return kmem_cache_alloc(malloc_sizes[i].cs_cachep, flags); | ||
45 | } | 50 | } |
46 | return __kmalloc(size, flags); | 51 | return __kmalloc(size, flags); |
47 | } | 52 | } |
@@ -62,9 +67,12 @@ static inline void *kzalloc(size_t size, gfp_t flags) | |||
62 | __you_cannot_kzalloc_that_much(); | 67 | __you_cannot_kzalloc_that_much(); |
63 | } | 68 | } |
64 | found: | 69 | found: |
65 | return kmem_cache_zalloc((flags & GFP_DMA) ? | 70 | #ifdef CONFIG_ZONE_DMA |
66 | malloc_sizes[i].cs_dmacachep : | 71 | if (flags & GFP_DMA) |
67 | malloc_sizes[i].cs_cachep, flags); | 72 | return kmem_cache_zalloc(malloc_sizes[i].cs_dmacachep, |
73 | flags); | ||
74 | #endif | ||
75 | return kmem_cache_zalloc(malloc_sizes[i].cs_cachep, flags); | ||
68 | } | 76 | } |
69 | return __kzalloc(size, flags); | 77 | return __kzalloc(size, flags); |
70 | } | 78 | } |
@@ -88,9 +96,13 @@ static inline void *kmalloc_node(size_t size, gfp_t flags, int node) | |||
88 | __you_cannot_kmalloc_that_much(); | 96 | __you_cannot_kmalloc_that_much(); |
89 | } | 97 | } |
90 | found: | 98 | found: |
91 | return kmem_cache_alloc_node((flags & GFP_DMA) ? | 99 | #ifdef CONFIG_ZONE_DMA |
92 | malloc_sizes[i].cs_dmacachep : | 100 | if (flags & GFP_DMA) |
93 | malloc_sizes[i].cs_cachep, flags, node); | 101 | return kmem_cache_alloc_node(malloc_sizes[i].cs_dmacachep, |
102 | flags, node); | ||
103 | #endif | ||
104 | return kmem_cache_alloc_node(malloc_sizes[i].cs_cachep, | ||
105 | flags, node); | ||
94 | } | 106 | } |
95 | return __kmalloc_node(size, flags, node); | 107 | return __kmalloc_node(size, flags, node); |
96 | } | 108 | } |
diff --git a/include/linux/sm501-regs.h b/include/linux/sm501-regs.h new file mode 100644 index 000000000000..cc9be4a11861 --- /dev/null +++ b/include/linux/sm501-regs.h | |||
@@ -0,0 +1,357 @@ | |||
1 | /* sm501-regs.h | ||
2 | * | ||
3 | * Copyright 2006 Simtec Electronics | ||
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 | * Silicon Motion SM501 register definitions | ||
10 | */ | ||
11 | |||
12 | /* System Configuration area */ | ||
13 | /* System config base */ | ||
14 | #define SM501_SYS_CONFIG (0x000000) | ||
15 | |||
16 | /* config 1 */ | ||
17 | #define SM501_SYSTEM_CONTROL (0x000000) | ||
18 | #define SM501_MISC_CONTROL (0x000004) | ||
19 | |||
20 | #define SM501_MISC_BUS_SH (0x0) | ||
21 | #define SM501_MISC_BUS_PCI (0x1) | ||
22 | #define SM501_MISC_BUS_XSCALE (0x2) | ||
23 | #define SM501_MISC_BUS_NEC (0x6) | ||
24 | #define SM501_MISC_BUS_MASK (0x7) | ||
25 | |||
26 | #define SM501_MISC_VR_62MB (1<<3) | ||
27 | #define SM501_MISC_CDR_RESET (1<<7) | ||
28 | #define SM501_MISC_USB_LB (1<<8) | ||
29 | #define SM501_MISC_USB_SLAVE (1<<9) | ||
30 | #define SM501_MISC_BL_1 (1<<10) | ||
31 | #define SM501_MISC_MC (1<<11) | ||
32 | #define SM501_MISC_DAC_POWER (1<<12) | ||
33 | #define SM501_MISC_IRQ_INVERT (1<<16) | ||
34 | #define SM501_MISC_SH (1<<17) | ||
35 | |||
36 | #define SM501_MISC_HOLD_EMPTY (0<<18) | ||
37 | #define SM501_MISC_HOLD_8 (1<<18) | ||
38 | #define SM501_MISC_HOLD_16 (2<<18) | ||
39 | #define SM501_MISC_HOLD_24 (3<<18) | ||
40 | #define SM501_MISC_HOLD_32 (4<<18) | ||
41 | #define SM501_MISC_HOLD_MASK (7<<18) | ||
42 | |||
43 | #define SM501_MISC_FREQ_12 (1<<24) | ||
44 | #define SM501_MISC_PNL_24BIT (1<<25) | ||
45 | #define SM501_MISC_8051_LE (1<<26) | ||
46 | |||
47 | |||
48 | |||
49 | #define SM501_GPIO31_0_CONTROL (0x000008) | ||
50 | #define SM501_GPIO63_32_CONTROL (0x00000C) | ||
51 | #define SM501_DRAM_CONTROL (0x000010) | ||
52 | |||
53 | /* command list */ | ||
54 | #define SM501_ARBTRTN_CONTROL (0x000014) | ||
55 | |||
56 | /* command list */ | ||
57 | #define SM501_COMMAND_LIST_STATUS (0x000024) | ||
58 | |||
59 | /* interrupt debug */ | ||
60 | #define SM501_RAW_IRQ_STATUS (0x000028) | ||
61 | #define SM501_RAW_IRQ_CLEAR (0x000028) | ||
62 | #define SM501_IRQ_STATUS (0x00002C) | ||
63 | #define SM501_IRQ_MASK (0x000030) | ||
64 | #define SM501_DEBUG_CONTROL (0x000034) | ||
65 | |||
66 | /* power management */ | ||
67 | #define SM501_CURRENT_GATE (0x000038) | ||
68 | #define SM501_CURRENT_CLOCK (0x00003C) | ||
69 | #define SM501_POWER_MODE_0_GATE (0x000040) | ||
70 | #define SM501_POWER_MODE_0_CLOCK (0x000044) | ||
71 | #define SM501_POWER_MODE_1_GATE (0x000048) | ||
72 | #define SM501_POWER_MODE_1_CLOCK (0x00004C) | ||
73 | #define SM501_SLEEP_MODE_GATE (0x000050) | ||
74 | #define SM501_POWER_MODE_CONTROL (0x000054) | ||
75 | |||
76 | /* power gates for units within the 501 */ | ||
77 | #define SM501_GATE_HOST (0) | ||
78 | #define SM501_GATE_MEMORY (1) | ||
79 | #define SM501_GATE_DISPLAY (2) | ||
80 | #define SM501_GATE_2D_ENGINE (3) | ||
81 | #define SM501_GATE_CSC (4) | ||
82 | #define SM501_GATE_ZVPORT (5) | ||
83 | #define SM501_GATE_GPIO (6) | ||
84 | #define SM501_GATE_UART0 (7) | ||
85 | #define SM501_GATE_UART1 (8) | ||
86 | #define SM501_GATE_SSP (10) | ||
87 | #define SM501_GATE_USB_HOST (11) | ||
88 | #define SM501_GATE_USB_GADGET (12) | ||
89 | #define SM501_GATE_UCONTROLLER (17) | ||
90 | #define SM501_GATE_AC97 (18) | ||
91 | |||
92 | /* panel clock */ | ||
93 | #define SM501_CLOCK_P2XCLK (24) | ||
94 | /* crt clock */ | ||
95 | #define SM501_CLOCK_V2XCLK (16) | ||
96 | /* main clock */ | ||
97 | #define SM501_CLOCK_MCLK (8) | ||
98 | /* SDRAM controller clock */ | ||
99 | #define SM501_CLOCK_M1XCLK (0) | ||
100 | |||
101 | /* config 2 */ | ||
102 | #define SM501_PCI_MASTER_BASE (0x000058) | ||
103 | #define SM501_ENDIAN_CONTROL (0x00005C) | ||
104 | #define SM501_DEVICEID (0x000060) | ||
105 | /* 0x050100A0 */ | ||
106 | |||
107 | #define SM501_PLLCLOCK_COUNT (0x000064) | ||
108 | #define SM501_MISC_TIMING (0x000068) | ||
109 | #define SM501_CURRENT_SDRAM_CLOCK (0x00006C) | ||
110 | |||
111 | /* GPIO base */ | ||
112 | #define SM501_GPIO (0x010000) | ||
113 | #define SM501_GPIO_DATA_LOW (0x00) | ||
114 | #define SM501_GPIO_DATA_HIGH (0x04) | ||
115 | #define SM501_GPIO_DDR_LOW (0x08) | ||
116 | #define SM501_GPIO_DDR_HIGH (0x0C) | ||
117 | #define SM501_GPIO_IRQ_SETUP (0x10) | ||
118 | #define SM501_GPIO_IRQ_STATUS (0x14) | ||
119 | #define SM501_GPIO_IRQ_RESET (0x14) | ||
120 | |||
121 | /* I2C controller base */ | ||
122 | #define SM501_I2C (0x010040) | ||
123 | #define SM501_I2C_BYTE_COUNT (0x00) | ||
124 | #define SM501_I2C_CONTROL (0x01) | ||
125 | #define SM501_I2C_STATUS (0x02) | ||
126 | #define SM501_I2C_RESET (0x02) | ||
127 | #define SM501_I2C_SLAVE_ADDRESS (0x03) | ||
128 | #define SM501_I2C_DATA (0x04) | ||
129 | |||
130 | /* SSP base */ | ||
131 | #define SM501_SSP (0x020000) | ||
132 | |||
133 | /* Uart 0 base */ | ||
134 | #define SM501_UART0 (0x030000) | ||
135 | |||
136 | /* Uart 1 base */ | ||
137 | #define SM501_UART1 (0x030020) | ||
138 | |||
139 | /* USB host port base */ | ||
140 | #define SM501_USB_HOST (0x040000) | ||
141 | |||
142 | /* USB slave/gadget base */ | ||
143 | #define SM501_USB_GADGET (0x060000) | ||
144 | |||
145 | /* USB slave/gadget data port base */ | ||
146 | #define SM501_USB_GADGET_DATA (0x070000) | ||
147 | |||
148 | /* Display contoller/video engine base */ | ||
149 | #define SM501_DC (0x080000) | ||
150 | |||
151 | /* common defines for the SM501 address registers */ | ||
152 | #define SM501_ADDR_FLIP (1<<31) | ||
153 | #define SM501_ADDR_EXT (1<<27) | ||
154 | #define SM501_ADDR_CS1 (1<<26) | ||
155 | #define SM501_ADDR_MASK (0x3f << 26) | ||
156 | |||
157 | #define SM501_FIFO_MASK (0x3 << 16) | ||
158 | #define SM501_FIFO_1 (0x0 << 16) | ||
159 | #define SM501_FIFO_3 (0x1 << 16) | ||
160 | #define SM501_FIFO_7 (0x2 << 16) | ||
161 | #define SM501_FIFO_11 (0x3 << 16) | ||
162 | |||
163 | /* common registers for panel and the crt */ | ||
164 | #define SM501_OFF_DC_H_TOT (0x000) | ||
165 | #define SM501_OFF_DC_V_TOT (0x008) | ||
166 | #define SM501_OFF_DC_H_SYNC (0x004) | ||
167 | #define SM501_OFF_DC_V_SYNC (0x00C) | ||
168 | |||
169 | #define SM501_DC_PANEL_CONTROL (0x000) | ||
170 | |||
171 | #define SM501_DC_PANEL_CONTROL_FPEN (1<<27) | ||
172 | #define SM501_DC_PANEL_CONTROL_BIAS (1<<26) | ||
173 | #define SM501_DC_PANEL_CONTROL_DATA (1<<25) | ||
174 | #define SM501_DC_PANEL_CONTROL_VDD (1<<24) | ||
175 | #define SM501_DC_PANEL_CONTROL_DP (1<<23) | ||
176 | |||
177 | #define SM501_DC_PANEL_CONTROL_TFT_888 (0<<21) | ||
178 | #define SM501_DC_PANEL_CONTROL_TFT_333 (1<<21) | ||
179 | #define SM501_DC_PANEL_CONTROL_TFT_444 (2<<21) | ||
180 | |||
181 | #define SM501_DC_PANEL_CONTROL_DE (1<<20) | ||
182 | |||
183 | #define SM501_DC_PANEL_CONTROL_LCD_TFT (0<<18) | ||
184 | #define SM501_DC_PANEL_CONTROL_LCD_STN8 (1<<18) | ||
185 | #define SM501_DC_PANEL_CONTROL_LCD_STN12 (2<<18) | ||
186 | |||
187 | #define SM501_DC_PANEL_CONTROL_CP (1<<14) | ||
188 | #define SM501_DC_PANEL_CONTROL_VSP (1<<13) | ||
189 | #define SM501_DC_PANEL_CONTROL_HSP (1<<12) | ||
190 | #define SM501_DC_PANEL_CONTROL_CK (1<<9) | ||
191 | #define SM501_DC_PANEL_CONTROL_TE (1<<8) | ||
192 | #define SM501_DC_PANEL_CONTROL_VPD (1<<7) | ||
193 | #define SM501_DC_PANEL_CONTROL_VP (1<<6) | ||
194 | #define SM501_DC_PANEL_CONTROL_HPD (1<<5) | ||
195 | #define SM501_DC_PANEL_CONTROL_HP (1<<4) | ||
196 | #define SM501_DC_PANEL_CONTROL_GAMMA (1<<3) | ||
197 | #define SM501_DC_PANEL_CONTROL_EN (1<<2) | ||
198 | |||
199 | #define SM501_DC_PANEL_CONTROL_8BPP (0<<0) | ||
200 | #define SM501_DC_PANEL_CONTROL_16BPP (1<<0) | ||
201 | #define SM501_DC_PANEL_CONTROL_32BPP (2<<0) | ||
202 | |||
203 | |||
204 | #define SM501_DC_PANEL_PANNING_CONTROL (0x004) | ||
205 | #define SM501_DC_PANEL_COLOR_KEY (0x008) | ||
206 | #define SM501_DC_PANEL_FB_ADDR (0x00C) | ||
207 | #define SM501_DC_PANEL_FB_OFFSET (0x010) | ||
208 | #define SM501_DC_PANEL_FB_WIDTH (0x014) | ||
209 | #define SM501_DC_PANEL_FB_HEIGHT (0x018) | ||
210 | #define SM501_DC_PANEL_TL_LOC (0x01C) | ||
211 | #define SM501_DC_PANEL_BR_LOC (0x020) | ||
212 | #define SM501_DC_PANEL_H_TOT (0x024) | ||
213 | #define SM501_DC_PANEL_H_SYNC (0x028) | ||
214 | #define SM501_DC_PANEL_V_TOT (0x02C) | ||
215 | #define SM501_DC_PANEL_V_SYNC (0x030) | ||
216 | #define SM501_DC_PANEL_CUR_LINE (0x034) | ||
217 | |||
218 | #define SM501_DC_VIDEO_CONTROL (0x040) | ||
219 | #define SM501_DC_VIDEO_FB0_ADDR (0x044) | ||
220 | #define SM501_DC_VIDEO_FB_WIDTH (0x048) | ||
221 | #define SM501_DC_VIDEO_FB0_LAST_ADDR (0x04C) | ||
222 | #define SM501_DC_VIDEO_TL_LOC (0x050) | ||
223 | #define SM501_DC_VIDEO_BR_LOC (0x054) | ||
224 | #define SM501_DC_VIDEO_SCALE (0x058) | ||
225 | #define SM501_DC_VIDEO_INIT_SCALE (0x05C) | ||
226 | #define SM501_DC_VIDEO_YUV_CONSTANTS (0x060) | ||
227 | #define SM501_DC_VIDEO_FB1_ADDR (0x064) | ||
228 | #define SM501_DC_VIDEO_FB1_LAST_ADDR (0x068) | ||
229 | |||
230 | #define SM501_DC_VIDEO_ALPHA_CONTROL (0x080) | ||
231 | #define SM501_DC_VIDEO_ALPHA_FB_ADDR (0x084) | ||
232 | #define SM501_DC_VIDEO_ALPHA_FB_OFFSET (0x088) | ||
233 | #define SM501_DC_VIDEO_ALPHA_FB_LAST_ADDR (0x08C) | ||
234 | #define SM501_DC_VIDEO_ALPHA_TL_LOC (0x090) | ||
235 | #define SM501_DC_VIDEO_ALPHA_BR_LOC (0x094) | ||
236 | #define SM501_DC_VIDEO_ALPHA_SCALE (0x098) | ||
237 | #define SM501_DC_VIDEO_ALPHA_INIT_SCALE (0x09C) | ||
238 | #define SM501_DC_VIDEO_ALPHA_CHROMA_KEY (0x0A0) | ||
239 | #define SM501_DC_VIDEO_ALPHA_COLOR_LOOKUP (0x0A4) | ||
240 | |||
241 | #define SM501_DC_PANEL_HWC_BASE (0x0F0) | ||
242 | #define SM501_DC_PANEL_HWC_ADDR (0x0F0) | ||
243 | #define SM501_DC_PANEL_HWC_LOC (0x0F4) | ||
244 | #define SM501_DC_PANEL_HWC_COLOR_1_2 (0x0F8) | ||
245 | #define SM501_DC_PANEL_HWC_COLOR_3 (0x0FC) | ||
246 | |||
247 | #define SM501_HWC_EN (1<<31) | ||
248 | |||
249 | #define SM501_OFF_HWC_ADDR (0x00) | ||
250 | #define SM501_OFF_HWC_LOC (0x04) | ||
251 | #define SM501_OFF_HWC_COLOR_1_2 (0x08) | ||
252 | #define SM501_OFF_HWC_COLOR_3 (0x0C) | ||
253 | |||
254 | #define SM501_DC_ALPHA_CONTROL (0x100) | ||
255 | #define SM501_DC_ALPHA_FB_ADDR (0x104) | ||
256 | #define SM501_DC_ALPHA_FB_OFFSET (0x108) | ||
257 | #define SM501_DC_ALPHA_TL_LOC (0x10C) | ||
258 | #define SM501_DC_ALPHA_BR_LOC (0x110) | ||
259 | #define SM501_DC_ALPHA_CHROMA_KEY (0x114) | ||
260 | #define SM501_DC_ALPHA_COLOR_LOOKUP (0x118) | ||
261 | |||
262 | #define SM501_DC_CRT_CONTROL (0x200) | ||
263 | |||
264 | #define SM501_DC_CRT_CONTROL_TVP (1<<15) | ||
265 | #define SM501_DC_CRT_CONTROL_CP (1<<14) | ||
266 | #define SM501_DC_CRT_CONTROL_VSP (1<<13) | ||
267 | #define SM501_DC_CRT_CONTROL_HSP (1<<12) | ||
268 | #define SM501_DC_CRT_CONTROL_VS (1<<11) | ||
269 | #define SM501_DC_CRT_CONTROL_BLANK (1<<10) | ||
270 | #define SM501_DC_CRT_CONTROL_SEL (1<<9) | ||
271 | #define SM501_DC_CRT_CONTROL_TE (1<<8) | ||
272 | #define SM501_DC_CRT_CONTROL_PIXEL_MASK (0xF << 4) | ||
273 | #define SM501_DC_CRT_CONTROL_GAMMA (1<<3) | ||
274 | #define SM501_DC_CRT_CONTROL_ENABLE (1<<2) | ||
275 | |||
276 | #define SM501_DC_CRT_CONTROL_8BPP (0<<0) | ||
277 | #define SM501_DC_CRT_CONTROL_16BPP (1<<0) | ||
278 | #define SM501_DC_CRT_CONTROL_32BPP (2<<0) | ||
279 | |||
280 | #define SM501_DC_CRT_FB_ADDR (0x204) | ||
281 | #define SM501_DC_CRT_FB_OFFSET (0x208) | ||
282 | #define SM501_DC_CRT_H_TOT (0x20C) | ||
283 | #define SM501_DC_CRT_H_SYNC (0x210) | ||
284 | #define SM501_DC_CRT_V_TOT (0x214) | ||
285 | #define SM501_DC_CRT_V_SYNC (0x218) | ||
286 | #define SM501_DC_CRT_SIGNATURE_ANALYZER (0x21C) | ||
287 | #define SM501_DC_CRT_CUR_LINE (0x220) | ||
288 | #define SM501_DC_CRT_MONITOR_DETECT (0x224) | ||
289 | |||
290 | #define SM501_DC_CRT_HWC_BASE (0x230) | ||
291 | #define SM501_DC_CRT_HWC_ADDR (0x230) | ||
292 | #define SM501_DC_CRT_HWC_LOC (0x234) | ||
293 | #define SM501_DC_CRT_HWC_COLOR_1_2 (0x238) | ||
294 | #define SM501_DC_CRT_HWC_COLOR_3 (0x23C) | ||
295 | |||
296 | #define SM501_DC_PANEL_PALETTE (0x400) | ||
297 | |||
298 | #define SM501_DC_VIDEO_PALETTE (0x800) | ||
299 | |||
300 | #define SM501_DC_CRT_PALETTE (0xC00) | ||
301 | |||
302 | /* Zoom Video port base */ | ||
303 | #define SM501_ZVPORT (0x090000) | ||
304 | |||
305 | /* AC97/I2S base */ | ||
306 | #define SM501_AC97 (0x0A0000) | ||
307 | |||
308 | /* 8051 micro controller base */ | ||
309 | #define SM501_UCONTROLLER (0x0B0000) | ||
310 | |||
311 | /* 8051 micro controller SRAM base */ | ||
312 | #define SM501_UCONTROLLER_SRAM (0x0C0000) | ||
313 | |||
314 | /* DMA base */ | ||
315 | #define SM501_DMA (0x0D0000) | ||
316 | |||
317 | /* 2d engine base */ | ||
318 | #define SM501_2D_ENGINE (0x100000) | ||
319 | #define SM501_2D_SOURCE (0x00) | ||
320 | #define SM501_2D_DESTINATION (0x04) | ||
321 | #define SM501_2D_DIMENSION (0x08) | ||
322 | #define SM501_2D_CONTROL (0x0C) | ||
323 | #define SM501_2D_PITCH (0x10) | ||
324 | #define SM501_2D_FOREGROUND (0x14) | ||
325 | #define SM501_2D_BACKGROUND (0x18) | ||
326 | #define SM501_2D_STRETCH (0x1C) | ||
327 | #define SM501_2D_COLOR_COMPARE (0x20) | ||
328 | #define SM501_2D_COLOR_COMPARE_MASK (0x24) | ||
329 | #define SM501_2D_MASK (0x28) | ||
330 | #define SM501_2D_CLIP_TL (0x2C) | ||
331 | #define SM501_2D_CLIP_BR (0x30) | ||
332 | #define SM501_2D_MONO_PATTERN_LOW (0x34) | ||
333 | #define SM501_2D_MONO_PATTERN_HIGH (0x38) | ||
334 | #define SM501_2D_WINDOW_WIDTH (0x3C) | ||
335 | #define SM501_2D_SOURCE_BASE (0x40) | ||
336 | #define SM501_2D_DESTINATION_BASE (0x44) | ||
337 | #define SM501_2D_ALPHA (0x48) | ||
338 | #define SM501_2D_WRAP (0x4C) | ||
339 | #define SM501_2D_STATUS (0x50) | ||
340 | |||
341 | #define SM501_CSC_Y_SOURCE_BASE (0xC8) | ||
342 | #define SM501_CSC_CONSTANTS (0xCC) | ||
343 | #define SM501_CSC_Y_SOURCE_X (0xD0) | ||
344 | #define SM501_CSC_Y_SOURCE_Y (0xD4) | ||
345 | #define SM501_CSC_U_SOURCE_BASE (0xD8) | ||
346 | #define SM501_CSC_V_SOURCE_BASE (0xDC) | ||
347 | #define SM501_CSC_SOURCE_DIMENSION (0xE0) | ||
348 | #define SM501_CSC_SOURCE_PITCH (0xE4) | ||
349 | #define SM501_CSC_DESTINATION (0xE8) | ||
350 | #define SM501_CSC_DESTINATION_DIMENSION (0xEC) | ||
351 | #define SM501_CSC_DESTINATION_PITCH (0xF0) | ||
352 | #define SM501_CSC_SCALE_FACTOR (0xF4) | ||
353 | #define SM501_CSC_DESTINATION_BASE (0xF8) | ||
354 | #define SM501_CSC_CONTROL (0xFC) | ||
355 | |||
356 | /* 2d engine data port base */ | ||
357 | #define SM501_2D_ENGINE_DATA (0x110000) | ||
diff --git a/include/linux/sm501.h b/include/linux/sm501.h new file mode 100644 index 000000000000..9e3aaad6fe4d --- /dev/null +++ b/include/linux/sm501.h | |||
@@ -0,0 +1,170 @@ | |||
1 | /* include/linux/sm501.h | ||
2 | * | ||
3 | * Copyright (c) 2006 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * Vincent Sanders <vince@simtec.co.uk> | ||
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 as published by | ||
9 | * the Free Software Foundation; either version 2 of the License | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | |||
21 | extern int sm501_unit_power(struct device *dev, | ||
22 | unsigned int unit, unsigned int to); | ||
23 | |||
24 | extern unsigned long sm501_set_clock(struct device *dev, | ||
25 | int clksrc, unsigned long freq); | ||
26 | |||
27 | extern unsigned long sm501_find_clock(int clksrc, unsigned long req_freq); | ||
28 | |||
29 | /* sm501_misc_control | ||
30 | * | ||
31 | * Modify the SM501's MISC_CONTROL register | ||
32 | */ | ||
33 | |||
34 | extern int sm501_misc_control(struct device *dev, | ||
35 | unsigned long set, unsigned long clear); | ||
36 | |||
37 | /* sm501_modify_reg | ||
38 | * | ||
39 | * Modify a register in the SM501 which may be shared with other | ||
40 | * drivers. | ||
41 | */ | ||
42 | |||
43 | extern unsigned long sm501_modify_reg(struct device *dev, | ||
44 | unsigned long reg, | ||
45 | unsigned long set, | ||
46 | unsigned long clear); | ||
47 | |||
48 | /* sm501_gpio_set | ||
49 | * | ||
50 | * set the state of the given GPIO line | ||
51 | */ | ||
52 | |||
53 | extern void sm501_gpio_set(struct device *dev, | ||
54 | unsigned long gpio, | ||
55 | unsigned int to, | ||
56 | unsigned int dir); | ||
57 | |||
58 | /* sm501_gpio_get | ||
59 | * | ||
60 | * get the state of the given GPIO line | ||
61 | */ | ||
62 | |||
63 | extern unsigned long sm501_gpio_get(struct device *dev, | ||
64 | unsigned long gpio); | ||
65 | |||
66 | |||
67 | /* Platform data definitions */ | ||
68 | |||
69 | #define SM501FB_FLAG_USE_INIT_MODE (1<<0) | ||
70 | #define SM501FB_FLAG_DISABLE_AT_EXIT (1<<1) | ||
71 | #define SM501FB_FLAG_USE_HWCURSOR (1<<2) | ||
72 | #define SM501FB_FLAG_USE_HWACCEL (1<<3) | ||
73 | |||
74 | struct sm501_platdata_fbsub { | ||
75 | struct fb_videomode *def_mode; | ||
76 | unsigned int def_bpp; | ||
77 | unsigned long max_mem; | ||
78 | unsigned int flags; | ||
79 | }; | ||
80 | |||
81 | enum sm501_fb_routing { | ||
82 | SM501_FB_OWN = 0, /* CRT=>CRT, Panel=>Panel */ | ||
83 | SM501_FB_CRT_PANEL = 1, /* Panel=>CRT, Panel=>Panel */ | ||
84 | }; | ||
85 | |||
86 | /* sm501_platdata_fb flag field bit definitions */ | ||
87 | |||
88 | #define SM501_FBPD_SWAP_FB_ENDIAN (1<<0) /* need to endian swap */ | ||
89 | |||
90 | /* sm501_platdata_fb | ||
91 | * | ||
92 | * configuration data for the framebuffer driver | ||
93 | */ | ||
94 | |||
95 | struct sm501_platdata_fb { | ||
96 | enum sm501_fb_routing fb_route; | ||
97 | unsigned int flags; | ||
98 | struct sm501_platdata_fbsub *fb_crt; | ||
99 | struct sm501_platdata_fbsub *fb_pnl; | ||
100 | }; | ||
101 | |||
102 | /* gpio i2c */ | ||
103 | |||
104 | struct sm501_platdata_gpio_i2c { | ||
105 | unsigned int pin_sda; | ||
106 | unsigned int pin_scl; | ||
107 | }; | ||
108 | |||
109 | /* sm501_initdata | ||
110 | * | ||
111 | * use for initialising values that may not have been setup | ||
112 | * before the driver is loaded. | ||
113 | */ | ||
114 | |||
115 | struct sm501_reg_init { | ||
116 | unsigned long set; | ||
117 | unsigned long mask; | ||
118 | }; | ||
119 | |||
120 | #define SM501_USE_USB_HOST (1<<0) | ||
121 | #define SM501_USE_USB_SLAVE (1<<1) | ||
122 | #define SM501_USE_SSP0 (1<<2) | ||
123 | #define SM501_USE_SSP1 (1<<3) | ||
124 | #define SM501_USE_UART0 (1<<4) | ||
125 | #define SM501_USE_UART1 (1<<5) | ||
126 | #define SM501_USE_FBACCEL (1<<6) | ||
127 | #define SM501_USE_AC97 (1<<7) | ||
128 | #define SM501_USE_I2S (1<<8) | ||
129 | |||
130 | #define SM501_USE_ALL (0xffffffff) | ||
131 | |||
132 | struct sm501_initdata { | ||
133 | struct sm501_reg_init gpio_low; | ||
134 | struct sm501_reg_init gpio_high; | ||
135 | struct sm501_reg_init misc_timing; | ||
136 | struct sm501_reg_init misc_control; | ||
137 | |||
138 | unsigned long devices; | ||
139 | unsigned long mclk; /* non-zero to modify */ | ||
140 | unsigned long m1xclk; /* non-zero to modify */ | ||
141 | }; | ||
142 | |||
143 | /* sm501_init_gpio | ||
144 | * | ||
145 | * default gpio settings | ||
146 | */ | ||
147 | |||
148 | struct sm501_init_gpio { | ||
149 | struct sm501_reg_init gpio_data_low; | ||
150 | struct sm501_reg_init gpio_data_high; | ||
151 | struct sm501_reg_init gpio_ddr_low; | ||
152 | struct sm501_reg_init gpio_ddr_high; | ||
153 | }; | ||
154 | |||
155 | /* sm501_platdata | ||
156 | * | ||
157 | * This is passed with the platform device to allow the board | ||
158 | * to control the behaviour of the SM501 driver(s) which attach | ||
159 | * to the device. | ||
160 | * | ||
161 | */ | ||
162 | |||
163 | struct sm501_platdata { | ||
164 | struct sm501_initdata *init; | ||
165 | struct sm501_init_gpio *init_gpiop; | ||
166 | struct sm501_platdata_fb *fb; | ||
167 | |||
168 | struct sm501_platdata_gpio_i2c *gpio_i2c; | ||
169 | unsigned int gpio_i2c_nr; | ||
170 | }; | ||
diff --git a/include/linux/socket.h b/include/linux/socket.h index fcd35a210e7f..28157a36e6cc 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
@@ -16,7 +16,7 @@ struct __kernel_sockaddr_storage { | |||
16 | /* _SS_MAXSIZE value minus size of ss_family */ | 16 | /* _SS_MAXSIZE value minus size of ss_family */ |
17 | } __attribute__ ((aligned(_K_SS_ALIGNSIZE))); /* force desired alignment */ | 17 | } __attribute__ ((aligned(_K_SS_ALIGNSIZE))); /* force desired alignment */ |
18 | 18 | ||
19 | #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) | 19 | #ifdef __KERNEL__ |
20 | 20 | ||
21 | #include <asm/socket.h> /* arch-dependent defines */ | 21 | #include <asm/socket.h> /* arch-dependent defines */ |
22 | #include <linux/sockios.h> /* the SIOCxxx I/O controls */ | 22 | #include <linux/sockios.h> /* the SIOCxxx I/O controls */ |
diff --git a/include/linux/spi/ads7846.h b/include/linux/spi/ads7846.h index adb3dafd33e9..3387e44dfd13 100644 --- a/include/linux/spi/ads7846.h +++ b/include/linux/spi/ads7846.h | |||
@@ -5,9 +5,17 @@ | |||
5 | * | 5 | * |
6 | * It's OK if the min/max values are zero. | 6 | * It's OK if the min/max values are zero. |
7 | */ | 7 | */ |
8 | enum ads7846_filter { | ||
9 | ADS7846_FILTER_OK, | ||
10 | ADS7846_FILTER_REPEAT, | ||
11 | ADS7846_FILTER_IGNORE, | ||
12 | }; | ||
13 | |||
8 | struct ads7846_platform_data { | 14 | struct ads7846_platform_data { |
9 | u16 model; /* 7843, 7845, 7846. */ | 15 | u16 model; /* 7843, 7845, 7846. */ |
10 | u16 vref_delay_usecs; /* 0 for external vref; etc */ | 16 | u16 vref_delay_usecs; /* 0 for external vref; etc */ |
17 | int keep_vref_on:1; /* set to keep vref on for differential | ||
18 | * measurements as well */ | ||
11 | u16 x_plate_ohms; | 19 | u16 x_plate_ohms; |
12 | u16 y_plate_ohms; | 20 | u16 y_plate_ohms; |
13 | 21 | ||
@@ -21,5 +29,9 @@ struct ads7846_platform_data { | |||
21 | u16 debounce_rep; /* additional consecutive good readings | 29 | u16 debounce_rep; /* additional consecutive good readings |
22 | * required after the first two */ | 30 | * required after the first two */ |
23 | int (*get_pendown_state)(void); | 31 | int (*get_pendown_state)(void); |
32 | int (*filter_init) (struct ads7846_platform_data *pdata, | ||
33 | void **filter_data); | ||
34 | int (*filter) (void *filter_data, int data_idx, int *val); | ||
35 | void (*filter_cleanup)(void *filter_data); | ||
24 | }; | 36 | }; |
25 | 37 | ||
diff --git a/include/linux/spi/eeprom.h b/include/linux/spi/eeprom.h new file mode 100644 index 000000000000..1085212c446e --- /dev/null +++ b/include/linux/spi/eeprom.h | |||
@@ -0,0 +1,22 @@ | |||
1 | #ifndef __LINUX_SPI_EEPROM_H | ||
2 | #define __LINUX_SPI_EEPROM_H | ||
3 | |||
4 | /* | ||
5 | * Put one of these structures in platform_data for SPI EEPROMS handled | ||
6 | * by the "at25" driver. On SPI, most EEPROMS understand the same core | ||
7 | * command set. If you need to support EEPROMs that don't yet fit, add | ||
8 | * flags to support those protocol options. These values all come from | ||
9 | * the chip datasheets. | ||
10 | */ | ||
11 | struct spi_eeprom { | ||
12 | u32 byte_len; | ||
13 | char name[10]; | ||
14 | u16 page_size; /* for writes */ | ||
15 | u16 flags; | ||
16 | #define EE_ADDR1 0x0001 /* 8 bit addrs */ | ||
17 | #define EE_ADDR2 0x0002 /* 16 bit addrs */ | ||
18 | #define EE_ADDR3 0x0004 /* 24 bit addrs */ | ||
19 | #define EE_READONLY 0x0008 /* disallow writes */ | ||
20 | }; | ||
21 | |||
22 | #endif /* __LINUX_SPI_EEPROM_H */ | ||
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 176f6e36dbfa..4f0f8c2e58a5 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
@@ -114,6 +114,17 @@ static inline void spi_set_ctldata(struct spi_device *spi, void *state) | |||
114 | spi->controller_state = state; | 114 | spi->controller_state = state; |
115 | } | 115 | } |
116 | 116 | ||
117 | /* device driver data */ | ||
118 | |||
119 | static inline void spi_set_drvdata(struct spi_device *spi, void *data) | ||
120 | { | ||
121 | dev_set_drvdata(&spi->dev, data); | ||
122 | } | ||
123 | |||
124 | static inline void *spi_get_drvdata(struct spi_device *spi) | ||
125 | { | ||
126 | return dev_get_drvdata(&spi->dev); | ||
127 | } | ||
117 | 128 | ||
118 | struct spi_message; | 129 | struct spi_message; |
119 | 130 | ||
@@ -137,13 +148,11 @@ extern int spi_register_driver(struct spi_driver *sdrv); | |||
137 | 148 | ||
138 | static inline void spi_unregister_driver(struct spi_driver *sdrv) | 149 | static inline void spi_unregister_driver(struct spi_driver *sdrv) |
139 | { | 150 | { |
140 | if (!sdrv) | 151 | if (sdrv) |
141 | return; | 152 | driver_unregister(&sdrv->driver); |
142 | driver_unregister(&sdrv->driver); | ||
143 | } | 153 | } |
144 | 154 | ||
145 | 155 | ||
146 | |||
147 | /** | 156 | /** |
148 | * struct spi_master - interface to SPI master controller | 157 | * struct spi_master - interface to SPI master controller |
149 | * @cdev: class interface to this driver | 158 | * @cdev: class interface to this driver |
@@ -154,7 +163,8 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv) | |||
154 | * each slave has a chipselect signal, but it's common that not | 163 | * each slave has a chipselect signal, but it's common that not |
155 | * every chipselect is connected to a slave. | 164 | * every chipselect is connected to a slave. |
156 | * @setup: updates the device mode and clocking records used by a | 165 | * @setup: updates the device mode and clocking records used by a |
157 | * device's SPI controller; protocol code may call this. | 166 | * device's SPI controller; protocol code may call this. This |
167 | * must fail if an unrecognized or unsupported mode is requested. | ||
158 | * @transfer: adds a message to the controller's transfer queue. | 168 | * @transfer: adds a message to the controller's transfer queue. |
159 | * @cleanup: frees controller-specific state | 169 | * @cleanup: frees controller-specific state |
160 | * | 170 | * |
@@ -211,7 +221,7 @@ struct spi_master { | |||
211 | struct spi_message *mesg); | 221 | struct spi_message *mesg); |
212 | 222 | ||
213 | /* called on release() to free memory provided by spi_master */ | 223 | /* called on release() to free memory provided by spi_master */ |
214 | void (*cleanup)(const struct spi_device *spi); | 224 | void (*cleanup)(struct spi_device *spi); |
215 | }; | 225 | }; |
216 | 226 | ||
217 | static inline void *spi_master_get_devdata(struct spi_master *master) | 227 | static inline void *spi_master_get_devdata(struct spi_master *master) |
@@ -296,6 +306,16 @@ extern struct spi_master *spi_busnum_to_master(u16 busnum); | |||
296 | * shifting out three bytes with word size of sixteen or twenty bits; | 306 | * shifting out three bytes with word size of sixteen or twenty bits; |
297 | * the former uses two bytes per word, the latter uses four bytes.) | 307 | * the former uses two bytes per word, the latter uses four bytes.) |
298 | * | 308 | * |
309 | * In-memory data values are always in native CPU byte order, translated | ||
310 | * from the wire byte order (big-endian except with SPI_LSB_FIRST). So | ||
311 | * for example when bits_per_word is sixteen, buffers are 2N bytes long | ||
312 | * and hold N sixteen bit words in CPU byte order. | ||
313 | * | ||
314 | * When the word size of the SPI transfer is not a power-of-two multiple | ||
315 | * of eight bits, those in-memory words include extra bits. In-memory | ||
316 | * words are always seen by protocol drivers as right-justified, so the | ||
317 | * undefined (rx) or unused (tx) bits are always the most significant bits. | ||
318 | * | ||
299 | * All SPI transfers start with the relevant chipselect active. Normally | 319 | * All SPI transfers start with the relevant chipselect active. Normally |
300 | * it stays selected until after the last transfer in a message. Drivers | 320 | * it stays selected until after the last transfer in a message. Drivers |
301 | * can affect the chipselect signal using cs_change: | 321 | * can affect the chipselect signal using cs_change: |
@@ -453,6 +473,11 @@ static inline void spi_message_free(struct spi_message *m) | |||
453 | * changes those settings, and must be called from a context that can sleep. | 473 | * changes those settings, and must be called from a context that can sleep. |
454 | * The changes take effect the next time the device is selected and data | 474 | * The changes take effect the next time the device is selected and data |
455 | * is transferred to or from it. | 475 | * is transferred to or from it. |
476 | * | ||
477 | * Note that this call wil fail if the protocol driver specifies an option | ||
478 | * that the underlying controller or its driver does not support. For | ||
479 | * example, not all hardware supports wire transfers using nine bit words, | ||
480 | * LSB-first wire encoding, or active-high chipselects. | ||
456 | */ | 481 | */ |
457 | static inline int | 482 | static inline int |
458 | spi_setup(struct spi_device *spi) | 483 | spi_setup(struct spi_device *spi) |
diff --git a/include/linux/spi/spi_bitbang.h b/include/linux/spi/spi_bitbang.h index 16ce178f54d7..2e8c048b9b80 100644 --- a/include/linux/spi/spi_bitbang.h +++ b/include/linux/spi/spi_bitbang.h | |||
@@ -55,7 +55,7 @@ struct spi_bitbang { | |||
55 | * methods, if you like. | 55 | * methods, if you like. |
56 | */ | 56 | */ |
57 | extern int spi_bitbang_setup(struct spi_device *spi); | 57 | extern int spi_bitbang_setup(struct spi_device *spi); |
58 | extern void spi_bitbang_cleanup(const struct spi_device *spi); | 58 | extern void spi_bitbang_cleanup(struct spi_device *spi); |
59 | extern int spi_bitbang_transfer(struct spi_device *spi, struct spi_message *m); | 59 | extern int spi_bitbang_transfer(struct spi_device *spi, struct spi_message *m); |
60 | extern int spi_bitbang_setup_transfer(struct spi_device *spi, | 60 | extern int spi_bitbang_setup_transfer(struct spi_device *spi, |
61 | struct spi_transfer *t); | 61 | struct spi_transfer *t); |
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index 94b767d64275..61fef376ed2e 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h | |||
@@ -228,15 +228,30 @@ do { \ | |||
228 | # define read_unlock_irq(lock) _read_unlock_irq(lock) | 228 | # define read_unlock_irq(lock) _read_unlock_irq(lock) |
229 | # define write_unlock_irq(lock) _write_unlock_irq(lock) | 229 | # define write_unlock_irq(lock) _write_unlock_irq(lock) |
230 | #else | 230 | #else |
231 | # define spin_unlock(lock) __raw_spin_unlock(&(lock)->raw_lock) | 231 | # define spin_unlock(lock) \ |
232 | # define read_unlock(lock) __raw_read_unlock(&(lock)->raw_lock) | 232 | do {__raw_spin_unlock(&(lock)->raw_lock); __release(lock); } while (0) |
233 | # define write_unlock(lock) __raw_write_unlock(&(lock)->raw_lock) | 233 | # define read_unlock(lock) \ |
234 | # define spin_unlock_irq(lock) \ | 234 | do {__raw_read_unlock(&(lock)->raw_lock); __release(lock); } while (0) |
235 | do { __raw_spin_unlock(&(lock)->raw_lock); local_irq_enable(); } while (0) | 235 | # define write_unlock(lock) \ |
236 | # define read_unlock_irq(lock) \ | 236 | do {__raw_write_unlock(&(lock)->raw_lock); __release(lock); } while (0) |
237 | do { __raw_read_unlock(&(lock)->raw_lock); local_irq_enable(); } while (0) | 237 | # define spin_unlock_irq(lock) \ |
238 | # define write_unlock_irq(lock) \ | 238 | do { \ |
239 | do { __raw_write_unlock(&(lock)->raw_lock); local_irq_enable(); } while (0) | 239 | __raw_spin_unlock(&(lock)->raw_lock); \ |
240 | __release(lock); \ | ||
241 | local_irq_enable(); \ | ||
242 | } while (0) | ||
243 | # define read_unlock_irq(lock) \ | ||
244 | do { \ | ||
245 | __raw_read_unlock(&(lock)->raw_lock); \ | ||
246 | __release(lock); \ | ||
247 | local_irq_enable(); \ | ||
248 | } while (0) | ||
249 | # define write_unlock_irq(lock) \ | ||
250 | do { \ | ||
251 | __raw_write_unlock(&(lock)->raw_lock); \ | ||
252 | __release(lock); \ | ||
253 | local_irq_enable(); \ | ||
254 | } while (0) | ||
240 | #endif | 255 | #endif |
241 | 256 | ||
242 | #define spin_unlock_irqrestore(lock, flags) \ | 257 | #define spin_unlock_irqrestore(lock, flags) \ |
diff --git a/include/linux/stat.h b/include/linux/stat.h index 679ef0d70b6b..4f8539ccff6c 100644 --- a/include/linux/stat.h +++ b/include/linux/stat.h | |||
@@ -7,7 +7,7 @@ | |||
7 | 7 | ||
8 | #endif | 8 | #endif |
9 | 9 | ||
10 | #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) | 10 | #ifdef __KERNEL__ |
11 | 11 | ||
12 | #define S_IFMT 00170000 | 12 | #define S_IFMT 00170000 |
13 | #define S_IFSOCK 0140000 | 13 | #define S_IFSOCK 0140000 |
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index a1be89deb3af..c7a78eef2b4f 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h | |||
@@ -40,6 +40,7 @@ struct rpc_clnt { | |||
40 | 40 | ||
41 | unsigned int cl_softrtry : 1,/* soft timeouts */ | 41 | unsigned int cl_softrtry : 1,/* soft timeouts */ |
42 | cl_intr : 1,/* interruptible */ | 42 | cl_intr : 1,/* interruptible */ |
43 | cl_discrtry : 1,/* disconnect before retry */ | ||
43 | cl_autobind : 1,/* use getport() */ | 44 | cl_autobind : 1,/* use getport() */ |
44 | cl_oneshot : 1,/* dispose after use */ | 45 | cl_oneshot : 1,/* dispose after use */ |
45 | cl_dead : 1;/* abandoned */ | 46 | cl_dead : 1;/* abandoned */ |
@@ -111,6 +112,7 @@ struct rpc_create_args { | |||
111 | #define RPC_CLNT_CREATE_ONESHOT (1UL << 3) | 112 | #define RPC_CLNT_CREATE_ONESHOT (1UL << 3) |
112 | #define RPC_CLNT_CREATE_NONPRIVPORT (1UL << 4) | 113 | #define RPC_CLNT_CREATE_NONPRIVPORT (1UL << 4) |
113 | #define RPC_CLNT_CREATE_NOPING (1UL << 5) | 114 | #define RPC_CLNT_CREATE_NOPING (1UL << 5) |
115 | #define RPC_CLNT_CREATE_DISCRTRY (1UL << 6) | ||
114 | 116 | ||
115 | struct rpc_clnt *rpc_create(struct rpc_create_args *args); | 117 | struct rpc_clnt *rpc_create(struct rpc_create_args *args); |
116 | struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *, | 118 | struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *, |
diff --git a/include/linux/sunrpc/debug.h b/include/linux/sunrpc/debug.h index 60fce3c92857..b7c7307ceec6 100644 --- a/include/linux/sunrpc/debug.h +++ b/include/linux/sunrpc/debug.h | |||
@@ -78,7 +78,6 @@ void rpc_unregister_sysctl(void); | |||
78 | * module currently registers its sysctl table dynamically, the sysctl path | 78 | * module currently registers its sysctl table dynamically, the sysctl path |
79 | * for module FOO is <CTL_SUNRPC, CTL_FOODEBUG>. | 79 | * for module FOO is <CTL_SUNRPC, CTL_FOODEBUG>. |
80 | */ | 80 | */ |
81 | #define CTL_SUNRPC 7249 /* arbitrary and hopefully unused */ | ||
82 | 81 | ||
83 | enum { | 82 | enum { |
84 | CTL_RPCDEBUG = 1, | 83 | CTL_RPCDEBUG = 1, |
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index 8b6ce60ea057..3069ecca0129 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h | |||
@@ -150,10 +150,10 @@ struct rpc_call_ops { | |||
150 | #define RPC_TASK_HAS_TIMER 3 | 150 | #define RPC_TASK_HAS_TIMER 3 |
151 | #define RPC_TASK_ACTIVE 4 | 151 | #define RPC_TASK_ACTIVE 4 |
152 | 152 | ||
153 | #define RPC_IS_RUNNING(t) (test_bit(RPC_TASK_RUNNING, &(t)->tk_runstate)) | 153 | #define RPC_IS_RUNNING(t) test_bit(RPC_TASK_RUNNING, &(t)->tk_runstate) |
154 | #define rpc_set_running(t) (set_bit(RPC_TASK_RUNNING, &(t)->tk_runstate)) | 154 | #define rpc_set_running(t) set_bit(RPC_TASK_RUNNING, &(t)->tk_runstate) |
155 | #define rpc_test_and_set_running(t) \ | 155 | #define rpc_test_and_set_running(t) \ |
156 | (test_and_set_bit(RPC_TASK_RUNNING, &(t)->tk_runstate)) | 156 | test_and_set_bit(RPC_TASK_RUNNING, &(t)->tk_runstate) |
157 | #define rpc_clear_running(t) \ | 157 | #define rpc_clear_running(t) \ |
158 | do { \ | 158 | do { \ |
159 | smp_mb__before_clear_bit(); \ | 159 | smp_mb__before_clear_bit(); \ |
@@ -161,8 +161,8 @@ struct rpc_call_ops { | |||
161 | smp_mb__after_clear_bit(); \ | 161 | smp_mb__after_clear_bit(); \ |
162 | } while (0) | 162 | } while (0) |
163 | 163 | ||
164 | #define RPC_IS_QUEUED(t) (test_bit(RPC_TASK_QUEUED, &(t)->tk_runstate)) | 164 | #define RPC_IS_QUEUED(t) test_bit(RPC_TASK_QUEUED, &(t)->tk_runstate) |
165 | #define rpc_set_queued(t) (set_bit(RPC_TASK_QUEUED, &(t)->tk_runstate)) | 165 | #define rpc_set_queued(t) set_bit(RPC_TASK_QUEUED, &(t)->tk_runstate) |
166 | #define rpc_clear_queued(t) \ | 166 | #define rpc_clear_queued(t) \ |
167 | do { \ | 167 | do { \ |
168 | smp_mb__before_clear_bit(); \ | 168 | smp_mb__before_clear_bit(); \ |
@@ -179,7 +179,7 @@ struct rpc_call_ops { | |||
179 | smp_mb__after_clear_bit(); \ | 179 | smp_mb__after_clear_bit(); \ |
180 | } while (0) | 180 | } while (0) |
181 | 181 | ||
182 | #define RPC_IS_ACTIVATED(t) (test_bit(RPC_TASK_ACTIVE, &(t)->tk_runstate)) | 182 | #define RPC_IS_ACTIVATED(t) test_bit(RPC_TASK_ACTIVE, &(t)->tk_runstate) |
183 | 183 | ||
184 | /* | 184 | /* |
185 | * Task priorities. | 185 | * Task priorities. |
@@ -253,7 +253,7 @@ void rpc_put_task(struct rpc_task *); | |||
253 | void rpc_exit_task(struct rpc_task *); | 253 | void rpc_exit_task(struct rpc_task *); |
254 | void rpc_release_calldata(const struct rpc_call_ops *, void *); | 254 | void rpc_release_calldata(const struct rpc_call_ops *, void *); |
255 | void rpc_killall_tasks(struct rpc_clnt *); | 255 | void rpc_killall_tasks(struct rpc_clnt *); |
256 | int rpc_execute(struct rpc_task *); | 256 | void rpc_execute(struct rpc_task *); |
257 | void rpc_init_priority_wait_queue(struct rpc_wait_queue *, const char *); | 257 | void rpc_init_priority_wait_queue(struct rpc_wait_queue *, const char *); |
258 | void rpc_init_wait_queue(struct rpc_wait_queue *, const char *); | 258 | void rpc_init_wait_queue(struct rpc_wait_queue *, const char *); |
259 | void rpc_sleep_on(struct rpc_wait_queue *, struct rpc_task *, | 259 | void rpc_sleep_on(struct rpc_wait_queue *, struct rpc_task *, |
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 64f3d60c72af..83b3c7b433aa 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #define SUNRPC_SVC_H | 11 | #define SUNRPC_SVC_H |
12 | 12 | ||
13 | #include <linux/in.h> | 13 | #include <linux/in.h> |
14 | #include <linux/in6.h> | ||
14 | #include <linux/sunrpc/types.h> | 15 | #include <linux/sunrpc/types.h> |
15 | #include <linux/sunrpc/xdr.h> | 16 | #include <linux/sunrpc/xdr.h> |
16 | #include <linux/sunrpc/auth.h> | 17 | #include <linux/sunrpc/auth.h> |
@@ -191,7 +192,13 @@ static inline void svc_putu32(struct kvec *iov, __be32 val) | |||
191 | iov->iov_len += sizeof(__be32); | 192 | iov->iov_len += sizeof(__be32); |
192 | } | 193 | } |
193 | 194 | ||
194 | 195 | union svc_addr_u { | |
196 | struct in_addr addr; | ||
197 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | ||
198 | struct in6_addr addr6; | ||
199 | #endif | ||
200 | }; | ||
201 | |||
195 | /* | 202 | /* |
196 | * The context of a single thread, including the request currently being | 203 | * The context of a single thread, including the request currently being |
197 | * processed. | 204 | * processed. |
@@ -200,8 +207,8 @@ struct svc_rqst { | |||
200 | struct list_head rq_list; /* idle list */ | 207 | struct list_head rq_list; /* idle list */ |
201 | struct list_head rq_all; /* all threads list */ | 208 | struct list_head rq_all; /* all threads list */ |
202 | struct svc_sock * rq_sock; /* socket */ | 209 | struct svc_sock * rq_sock; /* socket */ |
203 | struct sockaddr_in rq_addr; /* peer address */ | 210 | struct sockaddr_storage rq_addr; /* peer address */ |
204 | int rq_addrlen; | 211 | size_t rq_addrlen; |
205 | 212 | ||
206 | struct svc_serv * rq_server; /* RPC service definition */ | 213 | struct svc_serv * rq_server; /* RPC service definition */ |
207 | struct svc_pool * rq_pool; /* thread pool */ | 214 | struct svc_pool * rq_pool; /* thread pool */ |
@@ -227,8 +234,8 @@ struct svc_rqst { | |||
227 | unsigned short | 234 | unsigned short |
228 | rq_secure : 1; /* secure port */ | 235 | rq_secure : 1; /* secure port */ |
229 | 236 | ||
230 | 237 | union svc_addr_u rq_daddr; /* dest addr of request | |
231 | __be32 rq_daddr; /* dest addr of request - reply from here */ | 238 | * - reply from here */ |
232 | 239 | ||
233 | void * rq_argp; /* decoded arguments */ | 240 | void * rq_argp; /* decoded arguments */ |
234 | void * rq_resp; /* xdr'd results */ | 241 | void * rq_resp; /* xdr'd results */ |
@@ -256,6 +263,24 @@ struct svc_rqst { | |||
256 | }; | 263 | }; |
257 | 264 | ||
258 | /* | 265 | /* |
266 | * Rigorous type checking on sockaddr type conversions | ||
267 | */ | ||
268 | static inline struct sockaddr_in *svc_addr_in(struct svc_rqst *rqst) | ||
269 | { | ||
270 | return (struct sockaddr_in *) &rqst->rq_addr; | ||
271 | } | ||
272 | |||
273 | static inline struct sockaddr_in6 *svc_addr_in6(struct svc_rqst *rqst) | ||
274 | { | ||
275 | return (struct sockaddr_in6 *) &rqst->rq_addr; | ||
276 | } | ||
277 | |||
278 | static inline struct sockaddr *svc_addr(struct svc_rqst *rqst) | ||
279 | { | ||
280 | return (struct sockaddr *) &rqst->rq_addr; | ||
281 | } | ||
282 | |||
283 | /* | ||
259 | * Check buffer bounds after decoding arguments | 284 | * Check buffer bounds after decoding arguments |
260 | */ | 285 | */ |
261 | static inline int | 286 | static inline int |
@@ -292,9 +317,10 @@ static inline void svc_free_res_pages(struct svc_rqst *rqstp) | |||
292 | 317 | ||
293 | struct svc_deferred_req { | 318 | struct svc_deferred_req { |
294 | u32 prot; /* protocol (UDP or TCP) */ | 319 | u32 prot; /* protocol (UDP or TCP) */ |
295 | struct sockaddr_in addr; | 320 | struct svc_sock *svsk; |
296 | struct svc_sock *svsk; /* where reply must go */ | 321 | struct sockaddr_storage addr; /* where reply must go */ |
297 | __be32 daddr; /* where reply must come from */ | 322 | size_t addrlen; |
323 | union svc_addr_u daddr; /* where reply must come from */ | ||
298 | struct cache_deferred_req handle; | 324 | struct cache_deferred_req handle; |
299 | int argslen; | 325 | int argslen; |
300 | __be32 args[0]; | 326 | __be32 args[0]; |
@@ -368,5 +394,8 @@ int svc_register(struct svc_serv *, int, unsigned short); | |||
368 | void svc_wake_up(struct svc_serv *); | 394 | void svc_wake_up(struct svc_serv *); |
369 | void svc_reserve(struct svc_rqst *rqstp, int space); | 395 | void svc_reserve(struct svc_rqst *rqstp, int space); |
370 | struct svc_pool * svc_pool_for_cpu(struct svc_serv *serv, int cpu); | 396 | struct svc_pool * svc_pool_for_cpu(struct svc_serv *serv, int cpu); |
397 | char * svc_print_addr(struct svc_rqst *, char *, size_t); | ||
398 | |||
399 | #define RPC_MAX_ADDRBUFLEN (63U) | ||
371 | 400 | ||
372 | #endif /* SUNRPC_SVC_H */ | 401 | #endif /* SUNRPC_SVC_H */ |
diff --git a/include/linux/sunrpc/svcsock.h b/include/linux/sunrpc/svcsock.h index db312a1e2eeb..cccea0a0feb4 100644 --- a/include/linux/sunrpc/svcsock.h +++ b/include/linux/sunrpc/svcsock.h | |||
@@ -57,12 +57,15 @@ struct svc_sock { | |||
57 | 57 | ||
58 | /* cache of various info for TCP sockets */ | 58 | /* cache of various info for TCP sockets */ |
59 | void *sk_info_authunix; | 59 | void *sk_info_authunix; |
60 | |||
61 | struct sockaddr_storage sk_remote; /* remote peer's address */ | ||
62 | int sk_remotelen; /* length of address */ | ||
60 | }; | 63 | }; |
61 | 64 | ||
62 | /* | 65 | /* |
63 | * Function prototypes. | 66 | * Function prototypes. |
64 | */ | 67 | */ |
65 | int svc_makesock(struct svc_serv *, int, unsigned short); | 68 | int svc_makesock(struct svc_serv *, int, unsigned short, int flags); |
66 | void svc_close_socket(struct svc_sock *); | 69 | void svc_close_socket(struct svc_sock *); |
67 | int svc_recv(struct svc_rqst *, long); | 70 | int svc_recv(struct svc_rqst *, long); |
68 | int svc_send(struct svc_rqst *); | 71 | int svc_send(struct svc_rqst *); |
@@ -74,4 +77,11 @@ int svc_addsock(struct svc_serv *serv, | |||
74 | char *name_return, | 77 | char *name_return, |
75 | int *proto); | 78 | int *proto); |
76 | 79 | ||
80 | /* | ||
81 | * svc_makesock socket characteristics | ||
82 | */ | ||
83 | #define SVC_SOCK_DEFAULTS (0U) | ||
84 | #define SVC_SOCK_ANONYMOUS (1U << 0) /* don't register with pmap */ | ||
85 | #define SVC_SOCK_TEMPORARY (1U << 1) /* flag socket as temporary */ | ||
86 | |||
77 | #endif /* SUNRPC_SVCSOCK_H */ | 87 | #endif /* SUNRPC_SVCSOCK_H */ |
diff --git a/include/linux/svga.h b/include/linux/svga.h new file mode 100644 index 000000000000..eadb981bb37c --- /dev/null +++ b/include/linux/svga.h | |||
@@ -0,0 +1,124 @@ | |||
1 | #ifndef _LINUX_SVGA_H | ||
2 | #define _LINUX_SVGA_H | ||
3 | |||
4 | #ifdef __KERNEL__ | ||
5 | |||
6 | #include <linux/pci.h> | ||
7 | #include <video/vga.h> | ||
8 | |||
9 | /* Terminator for register set */ | ||
10 | |||
11 | #define VGA_REGSET_END_VAL 0xFF | ||
12 | #define VGA_REGSET_END {VGA_REGSET_END_VAL, 0, 0} | ||
13 | |||
14 | struct vga_regset { | ||
15 | u8 regnum; | ||
16 | u8 lowbit; | ||
17 | u8 highbit; | ||
18 | }; | ||
19 | |||
20 | /* ------------------------------------------------------------------------- */ | ||
21 | |||
22 | #define SVGA_FORMAT_END_VAL 0xFFFF | ||
23 | #define SVGA_FORMAT_END {SVGA_FORMAT_END_VAL, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, 0, 0, 0, 0, 0, 0} | ||
24 | |||
25 | struct svga_fb_format { | ||
26 | /* var part */ | ||
27 | u32 bits_per_pixel; | ||
28 | struct fb_bitfield red; | ||
29 | struct fb_bitfield green; | ||
30 | struct fb_bitfield blue; | ||
31 | struct fb_bitfield transp; | ||
32 | u32 nonstd; | ||
33 | /* fix part */ | ||
34 | u32 type; | ||
35 | u32 type_aux; | ||
36 | u32 visual; | ||
37 | u32 xpanstep; | ||
38 | u32 xresstep; | ||
39 | }; | ||
40 | |||
41 | struct svga_timing_regs { | ||
42 | const struct vga_regset *h_total_regs; | ||
43 | const struct vga_regset *h_display_regs; | ||
44 | const struct vga_regset *h_blank_start_regs; | ||
45 | const struct vga_regset *h_blank_end_regs; | ||
46 | const struct vga_regset *h_sync_start_regs; | ||
47 | const struct vga_regset *h_sync_end_regs; | ||
48 | |||
49 | const struct vga_regset *v_total_regs; | ||
50 | const struct vga_regset *v_display_regs; | ||
51 | const struct vga_regset *v_blank_start_regs; | ||
52 | const struct vga_regset *v_blank_end_regs; | ||
53 | const struct vga_regset *v_sync_start_regs; | ||
54 | const struct vga_regset *v_sync_end_regs; | ||
55 | }; | ||
56 | |||
57 | struct svga_pll { | ||
58 | u16 m_min; | ||
59 | u16 m_max; | ||
60 | u16 n_min; | ||
61 | u16 n_max; | ||
62 | u16 r_min; | ||
63 | u16 r_max; /* r_max < 32 */ | ||
64 | u32 f_vco_min; | ||
65 | u32 f_vco_max; | ||
66 | u32 f_base; | ||
67 | }; | ||
68 | |||
69 | |||
70 | /* Write a value to the attribute register */ | ||
71 | |||
72 | static inline void svga_wattr(u8 index, u8 data) | ||
73 | { | ||
74 | inb(0x3DA); | ||
75 | outb(index, 0x3C0); | ||
76 | outb(data, 0x3C0); | ||
77 | } | ||
78 | |||
79 | /* Write a value to a sequence register with a mask */ | ||
80 | |||
81 | static inline void svga_wseq_mask(u8 index, u8 data, u8 mask) | ||
82 | { | ||
83 | vga_wseq(NULL, index, (data & mask) | (vga_rseq(NULL, index) & ~mask)); | ||
84 | } | ||
85 | |||
86 | /* Write a value to a CRT register with a mask */ | ||
87 | |||
88 | static inline void svga_wcrt_mask(u8 index, u8 data, u8 mask) | ||
89 | { | ||
90 | vga_wcrt(NULL, index, (data & mask) | (vga_rcrt(NULL, index) & ~mask)); | ||
91 | } | ||
92 | |||
93 | static inline int svga_primary_device(struct pci_dev *dev) | ||
94 | { | ||
95 | u16 flags; | ||
96 | pci_read_config_word(dev, PCI_COMMAND, &flags); | ||
97 | return (flags & PCI_COMMAND_IO); | ||
98 | } | ||
99 | |||
100 | |||
101 | void svga_wcrt_multi(const struct vga_regset *regset, u32 value); | ||
102 | void svga_wseq_multi(const struct vga_regset *regset, u32 value); | ||
103 | |||
104 | void svga_set_default_gfx_regs(void); | ||
105 | void svga_set_default_atc_regs(void); | ||
106 | void svga_set_default_seq_regs(void); | ||
107 | void svga_set_default_crt_regs(void); | ||
108 | void svga_set_textmode_vga_regs(void); | ||
109 | |||
110 | void svga_settile(struct fb_info *info, struct fb_tilemap *map); | ||
111 | void svga_tilecopy(struct fb_info *info, struct fb_tilearea *area); | ||
112 | void svga_tilefill(struct fb_info *info, struct fb_tilerect *rect); | ||
113 | void svga_tileblit(struct fb_info *info, struct fb_tileblit *blit); | ||
114 | void svga_tilecursor(struct fb_info *info, struct fb_tilecursor *cursor); | ||
115 | |||
116 | int svga_compute_pll(const struct svga_pll *pll, u32 f_wanted, u16 *m, u16 *n, u16 *r, int node); | ||
117 | int svga_check_timings(const struct svga_timing_regs *tm, struct fb_var_screeninfo *var, int node); | ||
118 | void svga_set_timings(const struct svga_timing_regs *tm, struct fb_var_screeninfo *var, u32 hmul, u32 hdiv, u32 vmul, u32 vdiv, u32 hborder, int node); | ||
119 | |||
120 | int svga_match_format(const struct svga_fb_format *frm, struct fb_var_screeninfo *var, struct fb_fix_screeninfo *fix); | ||
121 | |||
122 | #endif /* __KERNEL__ */ | ||
123 | #endif /* _LINUX_SVGA_H */ | ||
124 | |||
diff --git a/include/linux/swap.h b/include/linux/swap.h index 5423559a44a6..006868881346 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -170,11 +170,13 @@ extern void swapin_readahead(swp_entry_t, unsigned long, struct vm_area_struct * | |||
170 | extern unsigned long totalram_pages; | 170 | extern unsigned long totalram_pages; |
171 | extern unsigned long totalreserve_pages; | 171 | extern unsigned long totalreserve_pages; |
172 | extern long nr_swap_pages; | 172 | extern long nr_swap_pages; |
173 | extern unsigned int nr_free_pages(void); | ||
174 | extern unsigned int nr_free_pages_pgdat(pg_data_t *pgdat); | ||
175 | extern unsigned int nr_free_buffer_pages(void); | 173 | extern unsigned int nr_free_buffer_pages(void); |
176 | extern unsigned int nr_free_pagecache_pages(void); | 174 | extern unsigned int nr_free_pagecache_pages(void); |
177 | 175 | ||
176 | /* Definition of global_page_state not available yet */ | ||
177 | #define nr_free_pages() global_page_state(NR_FREE_PAGES) | ||
178 | |||
179 | |||
178 | /* linux/mm/swap.c */ | 180 | /* linux/mm/swap.c */ |
179 | extern void FASTCALL(lru_cache_add(struct page *)); | 181 | extern void FASTCALL(lru_cache_add(struct page *)); |
180 | extern void FASTCALL(lru_cache_add_active(struct page *)); | 182 | extern void FASTCALL(lru_cache_add_active(struct page *)); |
diff --git a/include/linux/swapops.h b/include/linux/swapops.h index ec639aa3a1d3..ceb6cc5ceebb 100644 --- a/include/linux/swapops.h +++ b/include/linux/swapops.h | |||
@@ -108,7 +108,10 @@ extern void migration_entry_wait(struct mm_struct *mm, pmd_t *pmd, | |||
108 | #else | 108 | #else |
109 | 109 | ||
110 | #define make_migration_entry(page, write) swp_entry(0, 0) | 110 | #define make_migration_entry(page, write) swp_entry(0, 0) |
111 | #define is_migration_entry(swp) 0 | 111 | static inline int is_migration_entry(swp_entry_t swp) |
112 | { | ||
113 | return 0; | ||
114 | } | ||
112 | #define migration_entry_to_page(swp) NULL | 115 | #define migration_entry_to_page(swp) NULL |
113 | static inline void make_migration_entry_read(swp_entry_t *entryp) { } | 116 | static inline void make_migration_entry_read(swp_entry_t *entryp) { } |
114 | static inline void migration_entry_wait(struct mm_struct *mm, pmd_t *pmd, | 117 | static inline void migration_entry_wait(struct mm_struct *mm, pmd_t *pmd, |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 665412c4f4b9..2c5fb38d9392 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -53,7 +53,6 @@ struct __sysctl_args { | |||
53 | 53 | ||
54 | /* For internal pattern-matching use only: */ | 54 | /* For internal pattern-matching use only: */ |
55 | #ifdef __KERNEL__ | 55 | #ifdef __KERNEL__ |
56 | #define CTL_ANY -1 /* Matches any name */ | ||
57 | #define CTL_NONE 0 | 56 | #define CTL_NONE 0 |
58 | #define CTL_UNNUMBERED CTL_NONE /* sysctl without a binary number */ | 57 | #define CTL_UNNUMBERED CTL_NONE /* sysctl without a binary number */ |
59 | #endif | 58 | #endif |
@@ -69,7 +68,13 @@ enum | |||
69 | CTL_DEV=7, /* Devices */ | 68 | CTL_DEV=7, /* Devices */ |
70 | CTL_BUS=8, /* Busses */ | 69 | CTL_BUS=8, /* Busses */ |
71 | CTL_ABI=9, /* Binary emulation */ | 70 | CTL_ABI=9, /* Binary emulation */ |
72 | CTL_CPU=10 /* CPU stuff (speed scaling, etc) */ | 71 | CTL_CPU=10, /* CPU stuff (speed scaling, etc) */ |
72 | CTL_ARLAN=254, /* arlan wireless driver */ | ||
73 | CTL_APPLDATA=2120, /* s390 appldata */ | ||
74 | CTL_S390DBF=5677, /* s390 debug */ | ||
75 | CTL_SUNRPC=7249, /* sunrpc debug */ | ||
76 | CTL_PM=9899, /* frv power management */ | ||
77 | CTL_FRV=9898, /* frv specific sysctls */ | ||
73 | }; | 78 | }; |
74 | 79 | ||
75 | /* CTL_BUS names: */ | 80 | /* CTL_BUS names: */ |
@@ -202,6 +207,11 @@ enum | |||
202 | VM_PANIC_ON_OOM=33, /* panic at out-of-memory */ | 207 | VM_PANIC_ON_OOM=33, /* panic at out-of-memory */ |
203 | VM_VDSO_ENABLED=34, /* map VDSO into new processes? */ | 208 | VM_VDSO_ENABLED=34, /* map VDSO into new processes? */ |
204 | VM_MIN_SLAB=35, /* Percent pages ignored by zone reclaim */ | 209 | VM_MIN_SLAB=35, /* Percent pages ignored by zone reclaim */ |
210 | |||
211 | /* s390 vm cmm sysctls */ | ||
212 | VM_CMM_PAGES=1111, | ||
213 | VM_CMM_TIMED_PAGES=1112, | ||
214 | VM_CMM_TIMEOUT=1113, | ||
205 | }; | 215 | }; |
206 | 216 | ||
207 | 217 | ||
@@ -803,6 +813,7 @@ enum | |||
803 | FS_AIO_NR=18, /* current system-wide number of aio requests */ | 813 | FS_AIO_NR=18, /* current system-wide number of aio requests */ |
804 | FS_AIO_MAX_NR=19, /* system-wide maximum number of aio requests */ | 814 | FS_AIO_MAX_NR=19, /* system-wide maximum number of aio requests */ |
805 | FS_INOTIFY=20, /* inotify submenu */ | 815 | FS_INOTIFY=20, /* inotify submenu */ |
816 | FS_OCFS2=988, /* ocfs2 */ | ||
806 | }; | 817 | }; |
807 | 818 | ||
808 | /* /proc/sys/fs/quota/ */ | 819 | /* /proc/sys/fs/quota/ */ |
@@ -913,7 +924,11 @@ enum | |||
913 | #ifdef __KERNEL__ | 924 | #ifdef __KERNEL__ |
914 | #include <linux/list.h> | 925 | #include <linux/list.h> |
915 | 926 | ||
916 | extern void sysctl_init(void); | 927 | /* For the /proc/sys support */ |
928 | struct ctl_table; | ||
929 | extern struct ctl_table_header *sysctl_head_next(struct ctl_table_header *prev); | ||
930 | extern void sysctl_head_finish(struct ctl_table_header *prev); | ||
931 | extern int sysctl_perm(struct ctl_table *table, int op); | ||
917 | 932 | ||
918 | typedef struct ctl_table ctl_table; | 933 | typedef struct ctl_table ctl_table; |
919 | 934 | ||
@@ -1007,9 +1022,9 @@ struct ctl_table | |||
1007 | int maxlen; | 1022 | int maxlen; |
1008 | mode_t mode; | 1023 | mode_t mode; |
1009 | ctl_table *child; | 1024 | ctl_table *child; |
1025 | ctl_table *parent; /* Automatically set */ | ||
1010 | proc_handler *proc_handler; /* Callback for text formatting */ | 1026 | proc_handler *proc_handler; /* Callback for text formatting */ |
1011 | ctl_handler *strategy; /* Callback function for all r/w */ | 1027 | ctl_handler *strategy; /* Callback function for all r/w */ |
1012 | struct proc_dir_entry *de; /* /proc control block */ | ||
1013 | void *extra1; | 1028 | void *extra1; |
1014 | void *extra2; | 1029 | void *extra2; |
1015 | }; | 1030 | }; |
@@ -1024,8 +1039,8 @@ struct ctl_table_header | |||
1024 | struct completion *unregistering; | 1039 | struct completion *unregistering; |
1025 | }; | 1040 | }; |
1026 | 1041 | ||
1027 | struct ctl_table_header * register_sysctl_table(ctl_table * table, | 1042 | struct ctl_table_header * register_sysctl_table(ctl_table * table); |
1028 | int insert_at_head); | 1043 | |
1029 | void unregister_sysctl_table(struct ctl_table_header * table); | 1044 | void unregister_sysctl_table(struct ctl_table_header * table); |
1030 | 1045 | ||
1031 | #else /* __KERNEL__ */ | 1046 | #else /* __KERNEL__ */ |
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 192de3afa96b..21805b500aa2 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
@@ -17,6 +17,7 @@ | |||
17 | struct kobject; | 17 | struct kobject; |
18 | struct module; | 18 | struct module; |
19 | struct nameidata; | 19 | struct nameidata; |
20 | struct dentry; | ||
20 | 21 | ||
21 | struct attribute { | 22 | struct attribute { |
22 | const char * name; | 23 | const char * name; |
@@ -68,18 +69,6 @@ struct sysfs_ops { | |||
68 | ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t); | 69 | ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t); |
69 | }; | 70 | }; |
70 | 71 | ||
71 | struct sysfs_dirent { | ||
72 | atomic_t s_count; | ||
73 | struct list_head s_sibling; | ||
74 | struct list_head s_children; | ||
75 | void * s_element; | ||
76 | int s_type; | ||
77 | umode_t s_mode; | ||
78 | struct dentry * s_dentry; | ||
79 | struct iattr * s_iattr; | ||
80 | atomic_t s_event; | ||
81 | }; | ||
82 | |||
83 | #define SYSFS_ROOT 0x0001 | 72 | #define SYSFS_ROOT 0x0001 |
84 | #define SYSFS_DIR 0x0002 | 73 | #define SYSFS_DIR 0x0002 |
85 | #define SYSFS_KOBJ_ATTR 0x0004 | 74 | #define SYSFS_KOBJ_ATTR 0x0004 |
@@ -126,6 +115,11 @@ void sysfs_remove_bin_file(struct kobject *kobj, struct bin_attribute *attr); | |||
126 | int __must_check sysfs_create_group(struct kobject *, | 115 | int __must_check sysfs_create_group(struct kobject *, |
127 | const struct attribute_group *); | 116 | const struct attribute_group *); |
128 | void sysfs_remove_group(struct kobject *, const struct attribute_group *); | 117 | void sysfs_remove_group(struct kobject *, const struct attribute_group *); |
118 | int sysfs_add_file_to_group(struct kobject *kobj, | ||
119 | const struct attribute *attr, const char *group); | ||
120 | void sysfs_remove_file_from_group(struct kobject *kobj, | ||
121 | const struct attribute *attr, const char *group); | ||
122 | |||
129 | void sysfs_notify(struct kobject * k, char *dir, char *attr); | 123 | void sysfs_notify(struct kobject * k, char *dir, char *attr); |
130 | 124 | ||
131 | 125 | ||
@@ -210,6 +204,18 @@ static inline void sysfs_remove_group(struct kobject * k, const struct attribute | |||
210 | ; | 204 | ; |
211 | } | 205 | } |
212 | 206 | ||
207 | static inline int sysfs_add_file_to_group(struct kobject *kobj, | ||
208 | const struct attribute *attr, const char *group) | ||
209 | { | ||
210 | return 0; | ||
211 | } | ||
212 | |||
213 | static inline void sysfs_remove_file_from_group(struct kobject *kobj, | ||
214 | const struct attribute *attr, const char *group); | ||
215 | { | ||
216 | ; | ||
217 | } | ||
218 | |||
213 | static inline void sysfs_notify(struct kobject * k, char *dir, char *attr) | 219 | static inline void sysfs_notify(struct kobject * k, char *dir, char *attr) |
214 | { | 220 | { |
215 | } | 221 | } |
diff --git a/include/linux/tick.h b/include/linux/tick.h new file mode 100644 index 000000000000..9a7252e089b9 --- /dev/null +++ b/include/linux/tick.h | |||
@@ -0,0 +1,109 @@ | |||
1 | /* linux/include/linux/tick.h | ||
2 | * | ||
3 | * This file contains the structure definitions for tick related functions | ||
4 | * | ||
5 | */ | ||
6 | #ifndef _LINUX_TICK_H | ||
7 | #define _LINUX_TICK_H | ||
8 | |||
9 | #include <linux/clockchips.h> | ||
10 | |||
11 | #ifdef CONFIG_GENERIC_CLOCKEVENTS | ||
12 | |||
13 | enum tick_device_mode { | ||
14 | TICKDEV_MODE_PERIODIC, | ||
15 | TICKDEV_MODE_ONESHOT, | ||
16 | }; | ||
17 | |||
18 | struct tick_device { | ||
19 | struct clock_event_device *evtdev; | ||
20 | enum tick_device_mode mode; | ||
21 | }; | ||
22 | |||
23 | enum tick_nohz_mode { | ||
24 | NOHZ_MODE_INACTIVE, | ||
25 | NOHZ_MODE_LOWRES, | ||
26 | NOHZ_MODE_HIGHRES, | ||
27 | }; | ||
28 | |||
29 | /** | ||
30 | * struct tick_sched - sched tick emulation and no idle tick control/stats | ||
31 | * @sched_timer: hrtimer to schedule the periodic tick in high | ||
32 | * resolution mode | ||
33 | * @idle_tick: Store the last idle tick expiry time when the tick | ||
34 | * timer is modified for idle sleeps. This is necessary | ||
35 | * to resume the tick timer operation in the timeline | ||
36 | * when the CPU returns from idle | ||
37 | * @tick_stopped: Indicator that the idle tick has been stopped | ||
38 | * @idle_jiffies: jiffies at the entry to idle for idle time accounting | ||
39 | * @idle_calls: Total number of idle calls | ||
40 | * @idle_sleeps: Number of idle calls, where the sched tick was stopped | ||
41 | * @idle_entrytime: Time when the idle call was entered | ||
42 | * @idle_sleeptime: Sum of the time slept in idle with sched tick stopped | ||
43 | */ | ||
44 | struct tick_sched { | ||
45 | struct hrtimer sched_timer; | ||
46 | unsigned long check_clocks; | ||
47 | enum tick_nohz_mode nohz_mode; | ||
48 | ktime_t idle_tick; | ||
49 | int tick_stopped; | ||
50 | unsigned long idle_jiffies; | ||
51 | unsigned long idle_calls; | ||
52 | unsigned long idle_sleeps; | ||
53 | ktime_t idle_entrytime; | ||
54 | ktime_t idle_sleeptime; | ||
55 | unsigned long last_jiffies; | ||
56 | unsigned long next_jiffies; | ||
57 | ktime_t idle_expires; | ||
58 | }; | ||
59 | |||
60 | extern void __init tick_init(void); | ||
61 | extern int tick_is_oneshot_available(void); | ||
62 | extern struct tick_device *tick_get_device(int cpu); | ||
63 | |||
64 | # ifdef CONFIG_HIGH_RES_TIMERS | ||
65 | extern int tick_init_highres(void); | ||
66 | extern int tick_program_event(ktime_t expires, int force); | ||
67 | extern void tick_setup_sched_timer(void); | ||
68 | extern void tick_cancel_sched_timer(int cpu); | ||
69 | # else | ||
70 | static inline void tick_cancel_sched_timer(int cpu) { } | ||
71 | # endif /* HIGHRES */ | ||
72 | |||
73 | # ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST | ||
74 | extern struct tick_device *tick_get_broadcast_device(void); | ||
75 | extern cpumask_t *tick_get_broadcast_mask(void); | ||
76 | |||
77 | # ifdef CONFIG_TICK_ONESHOT | ||
78 | extern cpumask_t *tick_get_broadcast_oneshot_mask(void); | ||
79 | # endif | ||
80 | |||
81 | # endif /* BROADCAST */ | ||
82 | |||
83 | # ifdef CONFIG_TICK_ONESHOT | ||
84 | extern void tick_clock_notify(void); | ||
85 | extern int tick_check_oneshot_change(int allow_nohz); | ||
86 | extern struct tick_sched *tick_get_tick_sched(int cpu); | ||
87 | # else | ||
88 | static inline void tick_clock_notify(void) { } | ||
89 | static inline int tick_check_oneshot_change(int allow_nohz) { return 0; } | ||
90 | # endif | ||
91 | |||
92 | #else /* CONFIG_GENERIC_CLOCKEVENTS */ | ||
93 | static inline void tick_init(void) { } | ||
94 | static inline void tick_cancel_sched_timer(int cpu) { } | ||
95 | static inline void tick_clock_notify(void) { } | ||
96 | static inline int tick_check_oneshot_change(int allow_nohz) { return 0; } | ||
97 | #endif /* !CONFIG_GENERIC_CLOCKEVENTS */ | ||
98 | |||
99 | # ifdef CONFIG_NO_HZ | ||
100 | extern void tick_nohz_stop_sched_tick(void); | ||
101 | extern void tick_nohz_restart_sched_tick(void); | ||
102 | extern void tick_nohz_update_jiffies(void); | ||
103 | # else | ||
104 | static inline void tick_nohz_stop_sched_tick(void) { } | ||
105 | static inline void tick_nohz_restart_sched_tick(void) { } | ||
106 | static inline void tick_nohz_update_jiffies(void) { } | ||
107 | # endif /* !NO_HZ */ | ||
108 | |||
109 | #endif | ||
diff --git a/include/linux/time.h b/include/linux/time.h index a5b739967b74..8ea8dea713c7 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
@@ -46,7 +46,7 @@ static inline int timespec_equal(struct timespec *a, struct timespec *b) | |||
46 | * lhs == rhs: return 0 | 46 | * lhs == rhs: return 0 |
47 | * lhs > rhs: return >0 | 47 | * lhs > rhs: return >0 |
48 | */ | 48 | */ |
49 | static inline int timespec_compare(struct timespec *lhs, struct timespec *rhs) | 49 | static inline int timespec_compare(const struct timespec *lhs, const struct timespec *rhs) |
50 | { | 50 | { |
51 | if (lhs->tv_sec < rhs->tv_sec) | 51 | if (lhs->tv_sec < rhs->tv_sec) |
52 | return -1; | 52 | return -1; |
@@ -55,7 +55,7 @@ static inline int timespec_compare(struct timespec *lhs, struct timespec *rhs) | |||
55 | return lhs->tv_nsec - rhs->tv_nsec; | 55 | return lhs->tv_nsec - rhs->tv_nsec; |
56 | } | 56 | } |
57 | 57 | ||
58 | static inline int timeval_compare(struct timeval *lhs, struct timeval *rhs) | 58 | static inline int timeval_compare(const struct timeval *lhs, const struct timeval *rhs) |
59 | { | 59 | { |
60 | if (lhs->tv_sec < rhs->tv_sec) | 60 | if (lhs->tv_sec < rhs->tv_sec) |
61 | return -1; | 61 | return -1; |
@@ -90,8 +90,9 @@ static inline struct timespec timespec_sub(struct timespec lhs, | |||
90 | 90 | ||
91 | extern struct timespec xtime; | 91 | extern struct timespec xtime; |
92 | extern struct timespec wall_to_monotonic; | 92 | extern struct timespec wall_to_monotonic; |
93 | extern seqlock_t xtime_lock; | 93 | extern seqlock_t xtime_lock __attribute__((weak)); |
94 | 94 | ||
95 | extern unsigned long read_persistent_clock(void); | ||
95 | void timekeeping_init(void); | 96 | void timekeeping_init(void); |
96 | 97 | ||
97 | static inline unsigned long get_seconds(void) | 98 | static inline unsigned long get_seconds(void) |
diff --git a/include/linux/timer.h b/include/linux/timer.h index fb5edaaf0ebd..719113b652dd 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _LINUX_TIMER_H | 2 | #define _LINUX_TIMER_H |
3 | 3 | ||
4 | #include <linux/list.h> | 4 | #include <linux/list.h> |
5 | #include <linux/ktime.h> | ||
5 | #include <linux/spinlock.h> | 6 | #include <linux/spinlock.h> |
6 | #include <linux/stddef.h> | 7 | #include <linux/stddef.h> |
7 | 8 | ||
@@ -15,6 +16,11 @@ struct timer_list { | |||
15 | unsigned long data; | 16 | unsigned long data; |
16 | 17 | ||
17 | struct tvec_t_base_s *base; | 18 | struct tvec_t_base_s *base; |
19 | #ifdef CONFIG_TIMER_STATS | ||
20 | void *start_site; | ||
21 | char start_comm[16]; | ||
22 | int start_pid; | ||
23 | #endif | ||
18 | }; | 24 | }; |
19 | 25 | ||
20 | extern struct tvec_t_base_s boot_tvec_bases; | 26 | extern struct tvec_t_base_s boot_tvec_bases; |
@@ -61,7 +67,65 @@ extern int del_timer(struct timer_list * timer); | |||
61 | extern int __mod_timer(struct timer_list *timer, unsigned long expires); | 67 | extern int __mod_timer(struct timer_list *timer, unsigned long expires); |
62 | extern int mod_timer(struct timer_list *timer, unsigned long expires); | 68 | extern int mod_timer(struct timer_list *timer, unsigned long expires); |
63 | 69 | ||
70 | /* | ||
71 | * Return when the next timer-wheel timeout occurs (in absolute jiffies), | ||
72 | * locks the timer base: | ||
73 | */ | ||
64 | extern unsigned long next_timer_interrupt(void); | 74 | extern unsigned long next_timer_interrupt(void); |
75 | /* | ||
76 | * Return when the next timer-wheel timeout occurs (in absolute jiffies), | ||
77 | * locks the timer base and does the comparison against the given | ||
78 | * jiffie. | ||
79 | */ | ||
80 | extern unsigned long get_next_timer_interrupt(unsigned long now); | ||
81 | |||
82 | /* | ||
83 | * Timer-statistics info: | ||
84 | */ | ||
85 | #ifdef CONFIG_TIMER_STATS | ||
86 | |||
87 | extern void init_timer_stats(void); | ||
88 | |||
89 | extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf, | ||
90 | void *timerf, char * comm); | ||
91 | |||
92 | static inline void timer_stats_account_timer(struct timer_list *timer) | ||
93 | { | ||
94 | timer_stats_update_stats(timer, timer->start_pid, timer->start_site, | ||
95 | timer->function, timer->start_comm); | ||
96 | } | ||
97 | |||
98 | extern void __timer_stats_timer_set_start_info(struct timer_list *timer, | ||
99 | void *addr); | ||
100 | |||
101 | static inline void timer_stats_timer_set_start_info(struct timer_list *timer) | ||
102 | { | ||
103 | __timer_stats_timer_set_start_info(timer, __builtin_return_address(0)); | ||
104 | } | ||
105 | |||
106 | static inline void timer_stats_timer_clear_start_info(struct timer_list *timer) | ||
107 | { | ||
108 | timer->start_site = NULL; | ||
109 | } | ||
110 | #else | ||
111 | static inline void init_timer_stats(void) | ||
112 | { | ||
113 | } | ||
114 | |||
115 | static inline void timer_stats_account_timer(struct timer_list *timer) | ||
116 | { | ||
117 | } | ||
118 | |||
119 | static inline void timer_stats_timer_set_start_info(struct timer_list *timer) | ||
120 | { | ||
121 | } | ||
122 | |||
123 | static inline void timer_stats_timer_clear_start_info(struct timer_list *timer) | ||
124 | { | ||
125 | } | ||
126 | #endif | ||
127 | |||
128 | extern void delayed_work_timer_fn(unsigned long __data); | ||
65 | 129 | ||
66 | /** | 130 | /** |
67 | * add_timer - start a timer | 131 | * add_timer - start a timer |
@@ -96,7 +160,7 @@ static inline void add_timer(struct timer_list *timer) | |||
96 | extern void init_timers(void); | 160 | extern void init_timers(void); |
97 | extern void run_local_timers(void); | 161 | extern void run_local_timers(void); |
98 | struct hrtimer; | 162 | struct hrtimer; |
99 | extern int it_real_fn(struct hrtimer *); | 163 | extern enum hrtimer_restart it_real_fn(struct hrtimer *); |
100 | 164 | ||
101 | unsigned long __round_jiffies(unsigned long j, int cpu); | 165 | unsigned long __round_jiffies(unsigned long j, int cpu); |
102 | unsigned long __round_jiffies_relative(unsigned long j, int cpu); | 166 | unsigned long __round_jiffies_relative(unsigned long j, int cpu); |
diff --git a/include/linux/timex.h b/include/linux/timex.h index db501dc23c29..da929dbbea2a 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h | |||
@@ -255,10 +255,10 @@ struct time_interpolator { | |||
255 | u8 jitter; /* if set compensate for fluctuations */ | 255 | u8 jitter; /* if set compensate for fluctuations */ |
256 | u32 nsec_per_cyc; /* set by register_time_interpolator() */ | 256 | u32 nsec_per_cyc; /* set by register_time_interpolator() */ |
257 | void *addr; /* address of counter or function */ | 257 | void *addr; /* address of counter or function */ |
258 | u64 mask; /* mask the valid bits of the counter */ | 258 | cycles_t mask; /* mask the valid bits of the counter */ |
259 | unsigned long offset; /* nsec offset at last update of interpolator */ | 259 | unsigned long offset; /* nsec offset at last update of interpolator */ |
260 | u64 last_counter; /* counter value in units of the counter at last update */ | 260 | u64 last_counter; /* counter value in units of the counter at last update */ |
261 | u64 last_cycle; /* Last timer value if TIME_SOURCE_JITTER is set */ | 261 | cycles_t last_cycle; /* Last timer value if TIME_SOURCE_JITTER is set */ |
262 | u64 frequency; /* frequency in counts/second */ | 262 | u64 frequency; /* frequency in counts/second */ |
263 | long drift; /* drift in parts-per-million (or -1) */ | 263 | long drift; /* drift in parts-per-million (or -1) */ |
264 | unsigned long skips; /* skips forward */ | 264 | unsigned long skips; /* skips forward */ |
@@ -286,6 +286,13 @@ static inline void time_interpolator_update(long delta_nsec) | |||
286 | 286 | ||
287 | #define TICK_LENGTH_SHIFT 32 | 287 | #define TICK_LENGTH_SHIFT 32 |
288 | 288 | ||
289 | #ifdef CONFIG_NO_HZ | ||
290 | #define NTP_INTERVAL_FREQ (2) | ||
291 | #else | ||
292 | #define NTP_INTERVAL_FREQ (HZ) | ||
293 | #endif | ||
294 | #define NTP_INTERVAL_LENGTH (NSEC_PER_SEC/NTP_INTERVAL_FREQ) | ||
295 | |||
289 | /* Returns how long ticks are at present, in ns / 2^(SHIFT_SCALE-10). */ | 296 | /* Returns how long ticks are at present, in ns / 2^(SHIFT_SCALE-10). */ |
290 | extern u64 current_tick_length(void); | 297 | extern u64 current_tick_length(void); |
291 | 298 | ||
diff --git a/include/linux/toshiba.h b/include/linux/toshiba.h index 916e5e3a699b..6a7c4edf0e13 100644 --- a/include/linux/toshiba.h +++ b/include/linux/toshiba.h | |||
@@ -33,4 +33,6 @@ typedef struct { | |||
33 | unsigned int edi __attribute__ ((packed)); | 33 | unsigned int edi __attribute__ ((packed)); |
34 | } SMMRegisters; | 34 | } SMMRegisters; |
35 | 35 | ||
36 | int tosh_smm(SMMRegisters *regs); | ||
37 | |||
36 | #endif | 38 | #endif |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 65cbcf22c31e..dee72b9a20fb 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -24,7 +24,27 @@ | |||
24 | #define NR_PTYS CONFIG_LEGACY_PTY_COUNT /* Number of legacy ptys */ | 24 | #define NR_PTYS CONFIG_LEGACY_PTY_COUNT /* Number of legacy ptys */ |
25 | #define NR_UNIX98_PTY_DEFAULT 4096 /* Default maximum for Unix98 ptys */ | 25 | #define NR_UNIX98_PTY_DEFAULT 4096 /* Default maximum for Unix98 ptys */ |
26 | #define NR_UNIX98_PTY_MAX (1 << MINORBITS) /* Absolute limit */ | 26 | #define NR_UNIX98_PTY_MAX (1 << MINORBITS) /* Absolute limit */ |
27 | #define NR_LDISCS 16 | 27 | #define NR_LDISCS 17 |
28 | |||
29 | /* line disciplines */ | ||
30 | #define N_TTY 0 | ||
31 | #define N_SLIP 1 | ||
32 | #define N_MOUSE 2 | ||
33 | #define N_PPP 3 | ||
34 | #define N_STRIP 4 | ||
35 | #define N_AX25 5 | ||
36 | #define N_X25 6 /* X.25 async */ | ||
37 | #define N_6PACK 7 | ||
38 | #define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */ | ||
39 | #define N_R3964 9 /* Reserved for Simatic R3964 module */ | ||
40 | #define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */ | ||
41 | #define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */ | ||
42 | #define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data */ | ||
43 | /* cards about SMS messages */ | ||
44 | #define N_HDLC 13 /* synchronous HDLC */ | ||
45 | #define N_SYNC_PPP 14 /* synchronous PPP */ | ||
46 | #define N_HCI 15 /* Bluetooth HCI UART */ | ||
47 | #define N_GIGASET_M101 16 /* Siemens Gigaset M101 serial DECT adapter */ | ||
28 | 48 | ||
29 | /* | 49 | /* |
30 | * This character is the same as _POSIX_VDISABLE: it cannot be used as | 50 | * This character is the same as _POSIX_VDISABLE: it cannot be used as |
@@ -177,8 +197,8 @@ struct tty_struct { | |||
177 | struct mutex termios_mutex; | 197 | struct mutex termios_mutex; |
178 | struct ktermios *termios, *termios_locked; | 198 | struct ktermios *termios, *termios_locked; |
179 | char name[64]; | 199 | char name[64]; |
180 | int pgrp; | 200 | struct pid *pgrp; |
181 | int session; | 201 | struct pid *session; |
182 | unsigned long flags; | 202 | unsigned long flags; |
183 | int count; | 203 | int count; |
184 | struct winsize winsize; | 204 | struct winsize winsize; |
@@ -283,7 +303,7 @@ extern int tty_read_raw_data(struct tty_struct *tty, unsigned char *bufp, | |||
283 | int buflen); | 303 | int buflen); |
284 | extern void tty_write_message(struct tty_struct *tty, char *msg); | 304 | extern void tty_write_message(struct tty_struct *tty, char *msg); |
285 | 305 | ||
286 | extern int is_orphaned_pgrp(int pgrp); | 306 | extern int is_current_pgrp_orphaned(void); |
287 | extern int is_ignored(int sig); | 307 | extern int is_ignored(int sig); |
288 | extern int tty_signal(int sig, struct tty_struct *tty); | 308 | extern int tty_signal(int sig, struct tty_struct *tty); |
289 | extern void tty_hangup(struct tty_struct * tty); | 309 | extern void tty_hangup(struct tty_struct * tty); |
@@ -291,6 +311,7 @@ extern void tty_vhangup(struct tty_struct * tty); | |||
291 | extern void tty_unhangup(struct file *filp); | 311 | extern void tty_unhangup(struct file *filp); |
292 | extern int tty_hung_up_p(struct file * filp); | 312 | extern int tty_hung_up_p(struct file * filp); |
293 | extern void do_SAK(struct tty_struct *tty); | 313 | extern void do_SAK(struct tty_struct *tty); |
314 | extern void __do_SAK(struct tty_struct *tty); | ||
294 | extern void disassociate_ctty(int priv); | 315 | extern void disassociate_ctty(int priv); |
295 | extern void tty_flip_buffer_push(struct tty_struct *tty); | 316 | extern void tty_flip_buffer_push(struct tty_struct *tty); |
296 | extern speed_t tty_get_baud_rate(struct tty_struct *tty); | 317 | extern speed_t tty_get_baud_rate(struct tty_struct *tty); |
@@ -312,7 +333,6 @@ extern int tty_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | |||
312 | 333 | ||
313 | extern dev_t tty_devnum(struct tty_struct *tty); | 334 | extern dev_t tty_devnum(struct tty_struct *tty); |
314 | extern void proc_clear_tty(struct task_struct *p); | 335 | extern void proc_clear_tty(struct task_struct *p); |
315 | extern void __proc_set_tty(struct task_struct *tsk, struct tty_struct *tty); | ||
316 | extern void proc_set_tty(struct task_struct *tsk, struct tty_struct *tty); | 336 | extern void proc_set_tty(struct task_struct *tsk, struct tty_struct *tty); |
317 | extern struct tty_struct *get_current_tty(void); | 337 | extern struct tty_struct *get_current_tty(void); |
318 | 338 | ||
diff --git a/include/linux/ufs_fs.h b/include/linux/ufs_fs.h index d3a4f994a5dc..dc2e9fe69418 100644 --- a/include/linux/ufs_fs.h +++ b/include/linux/ufs_fs.h | |||
@@ -40,13 +40,16 @@ typedef __u64 __fs64; | |||
40 | typedef __u32 __fs32; | 40 | typedef __u32 __fs32; |
41 | typedef __u16 __fs16; | 41 | typedef __u16 __fs16; |
42 | #else | 42 | #else |
43 | #include <asm/div64.h> | ||
43 | typedef __u64 __bitwise __fs64; | 44 | typedef __u64 __bitwise __fs64; |
44 | typedef __u32 __bitwise __fs32; | 45 | typedef __u32 __bitwise __fs32; |
45 | typedef __u16 __bitwise __fs16; | 46 | typedef __u16 __bitwise __fs16; |
46 | #endif | 47 | #endif |
47 | 48 | ||
49 | #ifdef __KERNEL__ | ||
48 | #include <linux/ufs_fs_i.h> | 50 | #include <linux/ufs_fs_i.h> |
49 | #include <linux/ufs_fs_sb.h> | 51 | #include <linux/ufs_fs_sb.h> |
52 | #endif | ||
50 | 53 | ||
51 | #define UFS_BBLOCK 0 | 54 | #define UFS_BBLOCK 0 |
52 | #define UFS_BBSIZE 8192 | 55 | #define UFS_BBSIZE 8192 |
@@ -261,17 +264,10 @@ typedef __u16 __bitwise __fs16; | |||
261 | */ | 264 | */ |
262 | #define ufs_inotocg(x) ((x) / uspi->s_ipg) | 265 | #define ufs_inotocg(x) ((x) / uspi->s_ipg) |
263 | #define ufs_inotocgoff(x) ((x) % uspi->s_ipg) | 266 | #define ufs_inotocgoff(x) ((x) % uspi->s_ipg) |
264 | #define ufs_inotofsba(x) (ufs_cgimin(ufs_inotocg(x)) + ufs_inotocgoff(x) / uspi->s_inopf) | 267 | #define ufs_inotofsba(x) (((u64)ufs_cgimin(ufs_inotocg(x))) + ufs_inotocgoff(x) / uspi->s_inopf) |
265 | #define ufs_inotofsbo(x) ((x) % uspi->s_inopf) | 268 | #define ufs_inotofsbo(x) ((x) % uspi->s_inopf) |
266 | 269 | ||
267 | /* | 270 | /* |
268 | * Give cylinder group number for a file system block. | ||
269 | * Give cylinder group block number for a file system block. | ||
270 | */ | ||
271 | #define ufs_dtog(d) ((d) / uspi->s_fpg) | ||
272 | #define ufs_dtogd(d) ((d) % uspi->s_fpg) | ||
273 | |||
274 | /* | ||
275 | * Compute the cylinder and rotational position of a cyl block addr. | 271 | * Compute the cylinder and rotational position of a cyl block addr. |
276 | */ | 272 | */ |
277 | #define ufs_cbtocylno(bno) \ | 273 | #define ufs_cbtocylno(bno) \ |
@@ -303,7 +299,7 @@ typedef __u16 __bitwise __fs16; | |||
303 | #define UFS_MAXMNTLEN 512 | 299 | #define UFS_MAXMNTLEN 512 |
304 | #define UFS2_MAXMNTLEN 468 | 300 | #define UFS2_MAXMNTLEN 468 |
305 | #define UFS2_MAXVOLLEN 32 | 301 | #define UFS2_MAXVOLLEN 32 |
306 | /* #define UFS_MAXCSBUFS 31 */ | 302 | #define UFS_MAXCSBUFS 31 |
307 | #define UFS_LINK_MAX 32000 | 303 | #define UFS_LINK_MAX 32000 |
308 | /* | 304 | /* |
309 | #define UFS2_NOCSPTRS ((128 / sizeof(void *)) - 4) | 305 | #define UFS2_NOCSPTRS ((128 / sizeof(void *)) - 4) |
@@ -721,6 +717,7 @@ struct ufs_cg_private_info { | |||
721 | __u32 c_nclusterblks; /* number of clusters this cg */ | 717 | __u32 c_nclusterblks; /* number of clusters this cg */ |
722 | }; | 718 | }; |
723 | 719 | ||
720 | |||
724 | struct ufs_sb_private_info { | 721 | struct ufs_sb_private_info { |
725 | struct ufs_buffer_head s_ubh; /* buffer containing super block */ | 722 | struct ufs_buffer_head s_ubh; /* buffer containing super block */ |
726 | struct ufs_csum_core cs_total; | 723 | struct ufs_csum_core cs_total; |
@@ -754,7 +751,7 @@ struct ufs_sb_private_info { | |||
754 | __u32 s_npsect; /* # sectors/track including spares */ | 751 | __u32 s_npsect; /* # sectors/track including spares */ |
755 | __u32 s_interleave; /* hardware sector interleave */ | 752 | __u32 s_interleave; /* hardware sector interleave */ |
756 | __u32 s_trackskew; /* sector 0 skew, per track */ | 753 | __u32 s_trackskew; /* sector 0 skew, per track */ |
757 | __u32 s_csaddr; /* blk addr of cyl grp summary area */ | 754 | __u64 s_csaddr; /* blk addr of cyl grp summary area */ |
758 | __u32 s_cssize; /* size of cyl grp summary area */ | 755 | __u32 s_cssize; /* size of cyl grp summary area */ |
759 | __u32 s_cgsize; /* cylinder group size */ | 756 | __u32 s_cgsize; /* cylinder group size */ |
760 | __u32 s_ntrak; /* tracks per cylinder */ | 757 | __u32 s_ntrak; /* tracks per cylinder */ |
@@ -950,17 +947,17 @@ struct ufs_super_block_third { | |||
950 | #ifdef __KERNEL__ | 947 | #ifdef __KERNEL__ |
951 | 948 | ||
952 | /* balloc.c */ | 949 | /* balloc.c */ |
953 | extern void ufs_free_fragments (struct inode *, unsigned, unsigned); | 950 | extern void ufs_free_fragments (struct inode *, u64, unsigned); |
954 | extern void ufs_free_blocks (struct inode *, unsigned, unsigned); | 951 | extern void ufs_free_blocks (struct inode *, u64, unsigned); |
955 | extern unsigned ufs_new_fragments(struct inode *, __fs32 *, unsigned, unsigned, | 952 | extern u64 ufs_new_fragments(struct inode *, void *, u64, u64, |
956 | unsigned, int *, struct page *); | 953 | unsigned, int *, struct page *); |
957 | 954 | ||
958 | /* cylinder.c */ | 955 | /* cylinder.c */ |
959 | extern struct ufs_cg_private_info * ufs_load_cylinder (struct super_block *, unsigned); | 956 | extern struct ufs_cg_private_info * ufs_load_cylinder (struct super_block *, unsigned); |
960 | extern void ufs_put_cylinder (struct super_block *, unsigned); | 957 | extern void ufs_put_cylinder (struct super_block *, unsigned); |
961 | 958 | ||
962 | /* dir.c */ | 959 | /* dir.c */ |
963 | extern struct inode_operations ufs_dir_inode_operations; | 960 | extern const struct inode_operations ufs_dir_inode_operations; |
964 | extern int ufs_add_link (struct dentry *, struct inode *); | 961 | extern int ufs_add_link (struct dentry *, struct inode *); |
965 | extern ino_t ufs_inode_by_name(struct inode *, struct dentry *); | 962 | extern ino_t ufs_inode_by_name(struct inode *, struct dentry *); |
966 | extern int ufs_make_empty(struct inode *, struct inode *); | 963 | extern int ufs_make_empty(struct inode *, struct inode *); |
@@ -972,7 +969,7 @@ extern void ufs_set_link(struct inode *dir, struct ufs_dir_entry *de, | |||
972 | struct page *page, struct inode *inode); | 969 | struct page *page, struct inode *inode); |
973 | 970 | ||
974 | /* file.c */ | 971 | /* file.c */ |
975 | extern struct inode_operations ufs_file_inode_operations; | 972 | extern const struct inode_operations ufs_file_inode_operations; |
976 | extern const struct file_operations ufs_file_operations; | 973 | extern const struct file_operations ufs_file_operations; |
977 | 974 | ||
978 | extern const struct address_space_operations ufs_aops; | 975 | extern const struct address_space_operations ufs_aops; |
@@ -999,7 +996,7 @@ extern void ufs_error (struct super_block *, const char *, const char *, ...) __ | |||
999 | extern void ufs_panic (struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4))); | 996 | extern void ufs_panic (struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4))); |
1000 | 997 | ||
1001 | /* symlink.c */ | 998 | /* symlink.c */ |
1002 | extern struct inode_operations ufs_fast_symlink_inode_operations; | 999 | extern const struct inode_operations ufs_fast_symlink_inode_operations; |
1003 | 1000 | ||
1004 | /* truncate.c */ | 1001 | /* truncate.c */ |
1005 | extern int ufs_truncate (struct inode *, loff_t); | 1002 | extern int ufs_truncate (struct inode *, loff_t); |
@@ -1014,6 +1011,22 @@ static inline struct ufs_inode_info *UFS_I(struct inode *inode) | |||
1014 | return container_of(inode, struct ufs_inode_info, vfs_inode); | 1011 | return container_of(inode, struct ufs_inode_info, vfs_inode); |
1015 | } | 1012 | } |
1016 | 1013 | ||
1014 | /* | ||
1015 | * Give cylinder group number for a file system block. | ||
1016 | * Give cylinder group block number for a file system block. | ||
1017 | */ | ||
1018 | /* #define ufs_dtog(d) ((d) / uspi->s_fpg) */ | ||
1019 | static inline u64 ufs_dtog(struct ufs_sb_private_info * uspi, u64 b) | ||
1020 | { | ||
1021 | do_div(b, uspi->s_fpg); | ||
1022 | return b; | ||
1023 | } | ||
1024 | /* #define ufs_dtogd(d) ((d) % uspi->s_fpg) */ | ||
1025 | static inline u32 ufs_dtogd(struct ufs_sb_private_info * uspi, u64 b) | ||
1026 | { | ||
1027 | return do_div(b, uspi->s_fpg); | ||
1028 | } | ||
1029 | |||
1017 | #endif /* __KERNEL__ */ | 1030 | #endif /* __KERNEL__ */ |
1018 | 1031 | ||
1019 | #endif /* __LINUX_UFS_FS_H */ | 1032 | #endif /* __LINUX_UFS_FS_H */ |
diff --git a/include/linux/ufs_fs_i.h b/include/linux/ufs_fs_i.h index f50ce3b0cd52..6496caa82f9e 100644 --- a/include/linux/ufs_fs_i.h +++ b/include/linux/ufs_fs_i.h | |||
@@ -20,13 +20,12 @@ struct ufs_inode_info { | |||
20 | __fs64 u2_i_data[15]; | 20 | __fs64 u2_i_data[15]; |
21 | } i_u1; | 21 | } i_u1; |
22 | __u32 i_flags; | 22 | __u32 i_flags; |
23 | __u32 i_gen; | ||
24 | __u32 i_shadow; | 23 | __u32 i_shadow; |
25 | __u32 i_unused1; | 24 | __u32 i_unused1; |
26 | __u32 i_unused2; | 25 | __u32 i_unused2; |
27 | __u32 i_oeftflag; | 26 | __u32 i_oeftflag; |
28 | __u16 i_osync; | 27 | __u16 i_osync; |
29 | __u32 i_lastfrag; | 28 | __u64 i_lastfrag; |
30 | __u32 i_dir_start_lookup; | 29 | __u32 i_dir_start_lookup; |
31 | struct inode vfs_inode; | 30 | struct inode vfs_inode; |
32 | }; | 31 | }; |
diff --git a/include/linux/ufs_fs_sb.h b/include/linux/ufs_fs_sb.h index 8ff13c160f3d..e114c93fc578 100644 --- a/include/linux/ufs_fs_sb.h +++ b/include/linux/ufs_fs_sb.h | |||
@@ -21,7 +21,6 @@ | |||
21 | struct ufs_sb_private_info; | 21 | struct ufs_sb_private_info; |
22 | struct ufs_cg_private_info; | 22 | struct ufs_cg_private_info; |
23 | struct ufs_csum; | 23 | struct ufs_csum; |
24 | #define UFS_MAXCSBUFS 31 | ||
25 | 24 | ||
26 | struct ufs_sb_info { | 25 | struct ufs_sb_info { |
27 | struct ufs_sb_private_info * s_uspi; | 26 | struct ufs_sb_private_info * s_uspi; |
diff --git a/include/linux/usb.h b/include/linux/usb.h index b5c226a87ed8..87dc75a6cee1 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -388,10 +388,14 @@ struct usb_device { | |||
388 | struct usb_device *children[USB_MAXCHILDREN]; | 388 | struct usb_device *children[USB_MAXCHILDREN]; |
389 | 389 | ||
390 | int pm_usage_cnt; /* usage counter for autosuspend */ | 390 | int pm_usage_cnt; /* usage counter for autosuspend */ |
391 | u32 quirks; /* quirks of the whole device */ | ||
392 | |||
391 | #ifdef CONFIG_PM | 393 | #ifdef CONFIG_PM |
392 | struct delayed_work autosuspend; /* for delayed autosuspends */ | 394 | struct delayed_work autosuspend; /* for delayed autosuspends */ |
393 | struct mutex pm_mutex; /* protects PM operations */ | 395 | struct mutex pm_mutex; /* protects PM operations */ |
394 | 396 | ||
397 | unsigned autosuspend_delay; /* in jiffies */ | ||
398 | |||
395 | unsigned auto_pm:1; /* autosuspend/resume in progress */ | 399 | unsigned auto_pm:1; /* autosuspend/resume in progress */ |
396 | unsigned do_remote_wakeup:1; /* remote wakeup should be enabled */ | 400 | unsigned do_remote_wakeup:1; /* remote wakeup should be enabled */ |
397 | #endif | 401 | #endif |
@@ -935,7 +939,7 @@ struct usb_iso_packet_descriptor { | |||
935 | unsigned int offset; | 939 | unsigned int offset; |
936 | unsigned int length; /* expected length */ | 940 | unsigned int length; /* expected length */ |
937 | unsigned int actual_length; | 941 | unsigned int actual_length; |
938 | unsigned int status; | 942 | int status; |
939 | }; | 943 | }; |
940 | 944 | ||
941 | struct urb; | 945 | struct urb; |
diff --git a/include/linux/usb/cdc.h b/include/linux/usb/cdc.h index ba617c372455..956edf3bbecb 100644 --- a/include/linux/usb/cdc.h +++ b/include/linux/usb/cdc.h | |||
@@ -73,6 +73,13 @@ struct usb_cdc_acm_descriptor { | |||
73 | __u8 bmCapabilities; | 73 | __u8 bmCapabilities; |
74 | } __attribute__ ((packed)); | 74 | } __attribute__ ((packed)); |
75 | 75 | ||
76 | /* capabilities from 5.2.3.3 */ | ||
77 | |||
78 | #define USB_CDC_COMM_FEATURE 0x01 | ||
79 | #define USB_CDC_CAP_LINE 0x02 | ||
80 | #define USB_CDC_CAP_BRK 0x04 | ||
81 | #define USB_CDC_CAP_NOTIFY 0x08 | ||
82 | |||
76 | /* "Union Functional Descriptor" from CDC spec 5.2.3.8 */ | 83 | /* "Union Functional Descriptor" from CDC spec 5.2.3.8 */ |
77 | struct usb_cdc_union_desc { | 84 | struct usb_cdc_union_desc { |
78 | __u8 bLength; | 85 | __u8 bLength; |
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h index ae7833749fa2..1122a6c2c1a3 100644 --- a/include/linux/usb/ch9.h +++ b/include/linux/usb/ch9.h | |||
@@ -1,8 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * This file holds USB constants and structures that are needed for USB | 2 | * This file holds USB constants and structures that are needed for |
3 | * device APIs. These are used by the USB device model, which is defined | 3 | * USB device APIs. These are used by the USB device model, which is |
4 | * in chapter 9 of the USB 2.0 specification. Linux has several APIs in C | 4 | * defined in chapter 9 of the USB 2.0 specification and in the |
5 | * that need these: | 5 | * Wireless USB 1.0 (spread around). Linux has several APIs in C that |
6 | * need these: | ||
6 | * | 7 | * |
7 | * - the master/host side Linux-USB kernel driver API; | 8 | * - the master/host side Linux-USB kernel driver API; |
8 | * - the "usbfs" user space API; and | 9 | * - the "usbfs" user space API; and |
@@ -14,6 +15,19 @@ | |||
14 | * | 15 | * |
15 | * There's also "Wireless USB", using low power short range radios for | 16 | * There's also "Wireless USB", using low power short range radios for |
16 | * peripheral interconnection but otherwise building on the USB framework. | 17 | * peripheral interconnection but otherwise building on the USB framework. |
18 | * | ||
19 | * Note all descriptors are declared '__attribute__((packed))' so that: | ||
20 | * | ||
21 | * [a] they never get padded, either internally (USB spec writers | ||
22 | * probably handled that) or externally; | ||
23 | * | ||
24 | * [b] so that accessing bigger-than-a-bytes fields will never | ||
25 | * generate bus errors on any platform, even when the location of | ||
26 | * its descriptor inside a bundle isn't "naturally aligned", and | ||
27 | * | ||
28 | * [c] for consistency, removing all doubt even when it appears to | ||
29 | * someone that the two other points are non-issues for that | ||
30 | * particular descriptor type. | ||
17 | */ | 31 | */ |
18 | 32 | ||
19 | #ifndef __LINUX_USB_CH9_H | 33 | #ifndef __LINUX_USB_CH9_H |
@@ -367,7 +381,7 @@ struct usb_debug_descriptor { | |||
367 | /* bulk endpoints with 8 byte maxpacket */ | 381 | /* bulk endpoints with 8 byte maxpacket */ |
368 | __u8 bDebugInEndpoint; | 382 | __u8 bDebugInEndpoint; |
369 | __u8 bDebugOutEndpoint; | 383 | __u8 bDebugOutEndpoint; |
370 | }; | 384 | } __attribute__((packed)); |
371 | 385 | ||
372 | /*-------------------------------------------------------------------------*/ | 386 | /*-------------------------------------------------------------------------*/ |
373 | 387 | ||
@@ -396,7 +410,7 @@ struct usb_security_descriptor { | |||
396 | 410 | ||
397 | __le16 wTotalLength; | 411 | __le16 wTotalLength; |
398 | __u8 bNumEncryptionTypes; | 412 | __u8 bNumEncryptionTypes; |
399 | }; | 413 | } __attribute__((packed)); |
400 | 414 | ||
401 | /*-------------------------------------------------------------------------*/ | 415 | /*-------------------------------------------------------------------------*/ |
402 | 416 | ||
@@ -410,7 +424,7 @@ struct usb_key_descriptor { | |||
410 | __u8 tTKID[3]; | 424 | __u8 tTKID[3]; |
411 | __u8 bReserved; | 425 | __u8 bReserved; |
412 | __u8 bKeyData[0]; | 426 | __u8 bKeyData[0]; |
413 | }; | 427 | } __attribute__((packed)); |
414 | 428 | ||
415 | /*-------------------------------------------------------------------------*/ | 429 | /*-------------------------------------------------------------------------*/ |
416 | 430 | ||
@@ -426,7 +440,7 @@ struct usb_encryption_descriptor { | |||
426 | #define USB_ENC_TYPE_RSA_1 3 /* rsa3072/sha1 auth */ | 440 | #define USB_ENC_TYPE_RSA_1 3 /* rsa3072/sha1 auth */ |
427 | __u8 bEncryptionValue; /* use in SET_ENCRYPTION */ | 441 | __u8 bEncryptionValue; /* use in SET_ENCRYPTION */ |
428 | __u8 bAuthKeyIndex; | 442 | __u8 bAuthKeyIndex; |
429 | }; | 443 | } __attribute__((packed)); |
430 | 444 | ||
431 | 445 | ||
432 | /*-------------------------------------------------------------------------*/ | 446 | /*-------------------------------------------------------------------------*/ |
@@ -438,7 +452,7 @@ struct usb_bos_descriptor { | |||
438 | 452 | ||
439 | __le16 wTotalLength; | 453 | __le16 wTotalLength; |
440 | __u8 bNumDeviceCaps; | 454 | __u8 bNumDeviceCaps; |
441 | }; | 455 | } __attribute__((packed)); |
442 | 456 | ||
443 | /*-------------------------------------------------------------------------*/ | 457 | /*-------------------------------------------------------------------------*/ |
444 | 458 | ||
@@ -447,7 +461,7 @@ struct usb_dev_cap_header { | |||
447 | __u8 bLength; | 461 | __u8 bLength; |
448 | __u8 bDescriptorType; | 462 | __u8 bDescriptorType; |
449 | __u8 bDevCapabilityType; | 463 | __u8 bDevCapabilityType; |
450 | }; | 464 | } __attribute__((packed)); |
451 | 465 | ||
452 | #define USB_CAP_TYPE_WIRELESS_USB 1 | 466 | #define USB_CAP_TYPE_WIRELESS_USB 1 |
453 | 467 | ||
@@ -475,7 +489,7 @@ struct usb_wireless_cap_descriptor { /* Ultra Wide Band */ | |||
475 | __u8 bmFFITXPowerInfo; /* FFI power levels */ | 489 | __u8 bmFFITXPowerInfo; /* FFI power levels */ |
476 | __le16 bmBandGroup; | 490 | __le16 bmBandGroup; |
477 | __u8 bReserved; | 491 | __u8 bReserved; |
478 | }; | 492 | } __attribute__((packed)); |
479 | 493 | ||
480 | /*-------------------------------------------------------------------------*/ | 494 | /*-------------------------------------------------------------------------*/ |
481 | 495 | ||
@@ -496,7 +510,7 @@ struct usb_wireless_ep_comp_descriptor { | |||
496 | #define USB_ENDPOINT_SWITCH_NO 0 | 510 | #define USB_ENDPOINT_SWITCH_NO 0 |
497 | #define USB_ENDPOINT_SWITCH_SWITCH 1 | 511 | #define USB_ENDPOINT_SWITCH_SWITCH 1 |
498 | #define USB_ENDPOINT_SWITCH_SCALE 2 | 512 | #define USB_ENDPOINT_SWITCH_SCALE 2 |
499 | }; | 513 | } __attribute__((packed)); |
500 | 514 | ||
501 | /*-------------------------------------------------------------------------*/ | 515 | /*-------------------------------------------------------------------------*/ |
502 | 516 | ||
@@ -512,7 +526,7 @@ struct usb_handshake { | |||
512 | __u8 CDID[16]; | 526 | __u8 CDID[16]; |
513 | __u8 nonce[16]; | 527 | __u8 nonce[16]; |
514 | __u8 MIC[8]; | 528 | __u8 MIC[8]; |
515 | }; | 529 | } __attribute__((packed)); |
516 | 530 | ||
517 | /*-------------------------------------------------------------------------*/ | 531 | /*-------------------------------------------------------------------------*/ |
518 | 532 | ||
@@ -524,7 +538,7 @@ struct usb_connection_context { | |||
524 | __u8 CHID[16]; /* persistent host id */ | 538 | __u8 CHID[16]; /* persistent host id */ |
525 | __u8 CDID[16]; /* device id (unique w/in host context) */ | 539 | __u8 CDID[16]; /* device id (unique w/in host context) */ |
526 | __u8 CK[16]; /* connection key */ | 540 | __u8 CK[16]; /* connection key */ |
527 | }; | 541 | } __attribute__((packed)); |
528 | 542 | ||
529 | /*-------------------------------------------------------------------------*/ | 543 | /*-------------------------------------------------------------------------*/ |
530 | 544 | ||
diff --git a/include/linux/usb/iowarrior.h b/include/linux/usb/iowarrior.h new file mode 100644 index 000000000000..cbbe020a4f5c --- /dev/null +++ b/include/linux/usb/iowarrior.h | |||
@@ -0,0 +1,33 @@ | |||
1 | #ifndef _IOWARRIOR_H_ | ||
2 | #define _IOWARRIOR_H_ | ||
3 | |||
4 | #define CODEMERCS_MAGIC_NUMBER 0xC0 /* like COde Mercenaries */ | ||
5 | |||
6 | /* Define the ioctl commands for reading and writing data */ | ||
7 | #define IOW_WRITE _IOW(CODEMERCS_MAGIC_NUMBER, 1, __u8 *) | ||
8 | #define IOW_READ _IOW(CODEMERCS_MAGIC_NUMBER, 2, __u8 *) | ||
9 | |||
10 | /* | ||
11 | A struct for available device info which is read | ||
12 | with the ioctl IOW_GETINFO. | ||
13 | To be compatible with 2.4 userspace which didn't have an easy way to get | ||
14 | this information. | ||
15 | */ | ||
16 | struct iowarrior_info { | ||
17 | __u32 vendor; /* vendor id : supposed to be USB_VENDOR_ID_CODEMERCS in all cases */ | ||
18 | __u32 product; /* product id : depends on type of chip (USB_DEVICE_ID_CODEMERCS_XXXXX) */ | ||
19 | __u8 serial[9]; /* the serial number of our chip (if a serial-number is not available this is empty string) */ | ||
20 | __u32 revision; /* revision number of the chip */ | ||
21 | __u32 speed; /* USB-speed of the device (0=UNKNOWN, 1=LOW, 2=FULL 3=HIGH) */ | ||
22 | __u32 power; /* power consumption of the device in mA */ | ||
23 | __u32 if_num; /* the number of the endpoint */ | ||
24 | __u32 report_size; /* size of the data-packets on this interface */ | ||
25 | }; | ||
26 | |||
27 | /* | ||
28 | Get some device-information (product-id , serial-number etc.) | ||
29 | in order to identify a chip. | ||
30 | */ | ||
31 | #define IOW_GETINFO _IOR(CODEMERCS_MAGIC_NUMBER, 3, struct iowarrior_info) | ||
32 | |||
33 | #endif /* _IOWARRIOR_H_ */ | ||
diff --git a/include/linux/usb/quirks.h b/include/linux/usb/quirks.h new file mode 100644 index 000000000000..6bac8faacbc6 --- /dev/null +++ b/include/linux/usb/quirks.h | |||
@@ -0,0 +1,11 @@ | |||
1 | /* | ||
2 | * This file holds the definitions of quirks found in USB devices. | ||
3 | * Only quirks that affect the whole device, not an interface, | ||
4 | * belong here. | ||
5 | */ | ||
6 | |||
7 | /* device must not be autosuspended */ | ||
8 | #define USB_QUIRK_NO_AUTOSUSPEND 0x00000001 | ||
9 | |||
10 | /* string descriptors must not be fetched using a 255-byte read */ | ||
11 | #define USB_QUIRK_STRING_FETCH_255 0x00000002 | ||
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index 33dcd8576696..32acbae28d24 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
@@ -54,6 +54,8 @@ | |||
54 | * @write_wait: a wait_queue_head_t used by the port. | 54 | * @write_wait: a wait_queue_head_t used by the port. |
55 | * @work: work queue entry for the line discipline waking up. | 55 | * @work: work queue entry for the line discipline waking up. |
56 | * @open_count: number of times this port has been opened. | 56 | * @open_count: number of times this port has been opened. |
57 | * @throttled: nonzero if the read urb is inactive to throttle the device | ||
58 | * @throttle_req: nonzero if the tty wants to throttle us | ||
57 | * | 59 | * |
58 | * This structure is used by the usb-serial core and drivers for the specific | 60 | * This structure is used by the usb-serial core and drivers for the specific |
59 | * ports of a device. | 61 | * ports of a device. |
@@ -88,6 +90,8 @@ struct usb_serial_port { | |||
88 | wait_queue_head_t write_wait; | 90 | wait_queue_head_t write_wait; |
89 | struct work_struct work; | 91 | struct work_struct work; |
90 | int open_count; | 92 | int open_count; |
93 | char throttled; | ||
94 | char throttle_req; | ||
91 | struct device dev; | 95 | struct device dev; |
92 | }; | 96 | }; |
93 | #define to_usb_serial_port(d) container_of(d, struct usb_serial_port, dev) | 97 | #define to_usb_serial_port(d) container_of(d, struct usb_serial_port, dev) |
@@ -269,6 +273,8 @@ extern int usb_serial_generic_write_room (struct usb_serial_port *port); | |||
269 | extern int usb_serial_generic_chars_in_buffer (struct usb_serial_port *port); | 273 | extern int usb_serial_generic_chars_in_buffer (struct usb_serial_port *port); |
270 | extern void usb_serial_generic_read_bulk_callback (struct urb *urb); | 274 | extern void usb_serial_generic_read_bulk_callback (struct urb *urb); |
271 | extern void usb_serial_generic_write_bulk_callback (struct urb *urb); | 275 | extern void usb_serial_generic_write_bulk_callback (struct urb *urb); |
276 | extern void usb_serial_generic_throttle (struct usb_serial_port *port); | ||
277 | extern void usb_serial_generic_unthrottle (struct usb_serial_port *port); | ||
272 | extern void usb_serial_generic_shutdown (struct usb_serial *serial); | 278 | extern void usb_serial_generic_shutdown (struct usb_serial *serial); |
273 | extern int usb_serial_generic_register (int debug); | 279 | extern int usb_serial_generic_register (int debug); |
274 | extern void usb_serial_generic_deregister (void); | 280 | extern void usb_serial_generic_deregister (void); |
diff --git a/include/linux/usb_usual.h b/include/linux/usb_usual.h index 2ae76fe52ff7..1b792b9286ba 100644 --- a/include/linux/usb_usual.h +++ b/include/linux/usb_usual.h | |||
@@ -46,7 +46,9 @@ | |||
46 | US_FLAG(MAX_SECTORS_64, 0x00000400) \ | 46 | US_FLAG(MAX_SECTORS_64, 0x00000400) \ |
47 | /* Sets max_sectors to 64 */ \ | 47 | /* Sets max_sectors to 64 */ \ |
48 | US_FLAG(IGNORE_DEVICE, 0x00000800) \ | 48 | US_FLAG(IGNORE_DEVICE, 0x00000800) \ |
49 | /* Don't claim device */ | 49 | /* Don't claim device */ \ |
50 | US_FLAG(CAPACITY_HEURISTICS, 0x00001000) \ | ||
51 | /* sometimes sizes is too big */ | ||
50 | 52 | ||
51 | #define US_FLAG(name, value) US_FL_##name = value , | 53 | #define US_FLAG(name, value) US_FL_##name = value , |
52 | enum { US_DO_ALL_FLAGS }; | 54 | enum { US_DO_ALL_FLAGS }; |
diff --git a/include/linux/usbdevice_fs.h b/include/linux/usbdevice_fs.h index 617d8a1c59ae..342dd5a7e8bb 100644 --- a/include/linux/usbdevice_fs.h +++ b/include/linux/usbdevice_fs.h | |||
@@ -159,9 +159,9 @@ struct usbdevfs_ioctl32 { | |||
159 | #define USBDEVFS_SUBMITURB32 _IOR('U', 10, struct usbdevfs_urb32) | 159 | #define USBDEVFS_SUBMITURB32 _IOR('U', 10, struct usbdevfs_urb32) |
160 | #define USBDEVFS_DISCARDURB _IO('U', 11) | 160 | #define USBDEVFS_DISCARDURB _IO('U', 11) |
161 | #define USBDEVFS_REAPURB _IOW('U', 12, void *) | 161 | #define USBDEVFS_REAPURB _IOW('U', 12, void *) |
162 | #define USBDEVFS_REAPURB32 _IOW('U', 12, u32) | 162 | #define USBDEVFS_REAPURB32 _IOW('U', 12, __u32) |
163 | #define USBDEVFS_REAPURBNDELAY _IOW('U', 13, void *) | 163 | #define USBDEVFS_REAPURBNDELAY _IOW('U', 13, void *) |
164 | #define USBDEVFS_REAPURBNDELAY32 _IOW('U', 13, u32) | 164 | #define USBDEVFS_REAPURBNDELAY32 _IOW('U', 13, __u32) |
165 | #define USBDEVFS_DISCSIGNAL _IOR('U', 14, struct usbdevfs_disconnectsignal) | 165 | #define USBDEVFS_DISCSIGNAL _IOR('U', 14, struct usbdevfs_disconnectsignal) |
166 | #define USBDEVFS_CLAIMINTERFACE _IOR('U', 15, unsigned int) | 166 | #define USBDEVFS_CLAIMINTERFACE _IOR('U', 15, unsigned int) |
167 | #define USBDEVFS_RELEASEINTERFACE _IOR('U', 16, unsigned int) | 167 | #define USBDEVFS_RELEASEINTERFACE _IOR('U', 16, unsigned int) |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index d94e2683be52..65a165f918c9 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -1,5 +1,45 @@ | |||
1 | /* | 1 | /* |
2 | * Video for Linux Two | 2 | * Video for Linux Two header file |
3 | * | ||
4 | * Copyright (C) 1999-2007 the contributors | ||
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 as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * Alternatively you can redistribute this file under the terms of the | ||
17 | * BSD license as stated below: | ||
18 | * | ||
19 | * Redistribution and use in source and binary forms, with or without | ||
20 | * modification, are permitted provided that the following conditions | ||
21 | * are met: | ||
22 | * 1. Redistributions of source code must retain the above copyright | ||
23 | * notice, this list of conditions and the following disclaimer. | ||
24 | * 2. Redistributions in binary form must reproduce the above copyright | ||
25 | * notice, this list of conditions and the following disclaimer in | ||
26 | * the documentation and/or other materials provided with the | ||
27 | * distribution. | ||
28 | * 3. The names of its contributors may not be used to endorse or promote | ||
29 | * products derived from this software without specific prior written | ||
30 | * permission. | ||
31 | * | ||
32 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
33 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
34 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
35 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
36 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
37 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED | ||
38 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | ||
39 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
40 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
41 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
42 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
3 | * | 43 | * |
4 | * Header file for v4l or V4L2 drivers and applications | 44 | * Header file for v4l or V4L2 drivers and applications |
5 | * with public API. | 45 | * with public API. |
@@ -8,8 +48,9 @@ | |||
8 | * | 48 | * |
9 | * See http://linuxtv.org for more info | 49 | * See http://linuxtv.org for more info |
10 | * | 50 | * |
11 | * Author: Bill Dirks <bdirks@pacbell.net> | 51 | * Author: Bill Dirks <bill@thedirks.org> |
12 | * Justin Schoeman | 52 | * Justin Schoeman |
53 | * Hans Verkuil <hverkuil@xs4all.nl> | ||
13 | * et al. | 54 | * et al. |
14 | */ | 55 | */ |
15 | #ifndef __LINUX_VIDEODEV2_H | 56 | #ifndef __LINUX_VIDEODEV2_H |
@@ -90,11 +131,8 @@ enum v4l2_buf_type { | |||
90 | V4L2_BUF_TYPE_VIDEO_OVERLAY = 3, | 131 | V4L2_BUF_TYPE_VIDEO_OVERLAY = 3, |
91 | V4L2_BUF_TYPE_VBI_CAPTURE = 4, | 132 | V4L2_BUF_TYPE_VBI_CAPTURE = 4, |
92 | V4L2_BUF_TYPE_VBI_OUTPUT = 5, | 133 | V4L2_BUF_TYPE_VBI_OUTPUT = 5, |
93 | #if 1 | ||
94 | /* Experimental Sliced VBI */ | ||
95 | V4L2_BUF_TYPE_SLICED_VBI_CAPTURE = 6, | 134 | V4L2_BUF_TYPE_SLICED_VBI_CAPTURE = 6, |
96 | V4L2_BUF_TYPE_SLICED_VBI_OUTPUT = 7, | 135 | V4L2_BUF_TYPE_SLICED_VBI_OUTPUT = 7, |
97 | #endif | ||
98 | V4L2_BUF_TYPE_PRIVATE = 0x80, | 136 | V4L2_BUF_TYPE_PRIVATE = 0x80, |
99 | }; | 137 | }; |
100 | 138 | ||
@@ -186,10 +224,8 @@ struct v4l2_capability | |||
186 | #define V4L2_CAP_VIDEO_OVERLAY 0x00000004 /* Can do video overlay */ | 224 | #define V4L2_CAP_VIDEO_OVERLAY 0x00000004 /* Can do video overlay */ |
187 | #define V4L2_CAP_VBI_CAPTURE 0x00000010 /* Is a raw VBI capture device */ | 225 | #define V4L2_CAP_VBI_CAPTURE 0x00000010 /* Is a raw VBI capture device */ |
188 | #define V4L2_CAP_VBI_OUTPUT 0x00000020 /* Is a raw VBI output device */ | 226 | #define V4L2_CAP_VBI_OUTPUT 0x00000020 /* Is a raw VBI output device */ |
189 | #if 1 | ||
190 | #define V4L2_CAP_SLICED_VBI_CAPTURE 0x00000040 /* Is a sliced VBI capture device */ | 227 | #define V4L2_CAP_SLICED_VBI_CAPTURE 0x00000040 /* Is a sliced VBI capture device */ |
191 | #define V4L2_CAP_SLICED_VBI_OUTPUT 0x00000080 /* Is a sliced VBI output device */ | 228 | #define V4L2_CAP_SLICED_VBI_OUTPUT 0x00000080 /* Is a sliced VBI output device */ |
192 | #endif | ||
193 | #define V4L2_CAP_RDS_CAPTURE 0x00000100 /* RDS data capture */ | 229 | #define V4L2_CAP_RDS_CAPTURE 0x00000100 /* RDS data capture */ |
194 | 230 | ||
195 | #define V4L2_CAP_TUNER 0x00010000 /* has a tuner */ | 231 | #define V4L2_CAP_TUNER 0x00010000 /* has a tuner */ |
@@ -1179,7 +1215,6 @@ struct v4l2_vbi_format | |||
1179 | #define V4L2_VBI_UNSYNC (1<< 0) | 1215 | #define V4L2_VBI_UNSYNC (1<< 0) |
1180 | #define V4L2_VBI_INTERLACED (1<< 1) | 1216 | #define V4L2_VBI_INTERLACED (1<< 1) |
1181 | 1217 | ||
1182 | #if 1 | ||
1183 | /* Sliced VBI | 1218 | /* Sliced VBI |
1184 | * | 1219 | * |
1185 | * This implements is a proposal V4L2 API to allow SLICED VBI | 1220 | * This implements is a proposal V4L2 API to allow SLICED VBI |
@@ -1212,7 +1247,6 @@ struct v4l2_sliced_vbi_format | |||
1212 | #define V4L2_SLICED_VBI_525 (V4L2_SLICED_CAPTION_525) | 1247 | #define V4L2_SLICED_VBI_525 (V4L2_SLICED_CAPTION_525) |
1213 | #define V4L2_SLICED_VBI_625 (V4L2_SLICED_TELETEXT_B | V4L2_SLICED_VPS | V4L2_SLICED_WSS_625) | 1248 | #define V4L2_SLICED_VBI_625 (V4L2_SLICED_TELETEXT_B | V4L2_SLICED_VPS | V4L2_SLICED_WSS_625) |
1214 | 1249 | ||
1215 | |||
1216 | struct v4l2_sliced_vbi_cap | 1250 | struct v4l2_sliced_vbi_cap |
1217 | { | 1251 | { |
1218 | __u16 service_set; | 1252 | __u16 service_set; |
@@ -1233,7 +1267,6 @@ struct v4l2_sliced_vbi_data | |||
1233 | __u32 reserved; /* must be 0 */ | 1267 | __u32 reserved; /* must be 0 */ |
1234 | __u8 data[48]; | 1268 | __u8 data[48]; |
1235 | }; | 1269 | }; |
1236 | #endif | ||
1237 | 1270 | ||
1238 | /* | 1271 | /* |
1239 | * A G G R E G A T E S T R U C T U R E S | 1272 | * A G G R E G A T E S T R U C T U R E S |
@@ -1249,9 +1282,7 @@ struct v4l2_format | |||
1249 | struct v4l2_pix_format pix; // V4L2_BUF_TYPE_VIDEO_CAPTURE | 1282 | struct v4l2_pix_format pix; // V4L2_BUF_TYPE_VIDEO_CAPTURE |
1250 | struct v4l2_window win; // V4L2_BUF_TYPE_VIDEO_OVERLAY | 1283 | struct v4l2_window win; // V4L2_BUF_TYPE_VIDEO_OVERLAY |
1251 | struct v4l2_vbi_format vbi; // V4L2_BUF_TYPE_VBI_CAPTURE | 1284 | struct v4l2_vbi_format vbi; // V4L2_BUF_TYPE_VBI_CAPTURE |
1252 | #if 1 | ||
1253 | struct v4l2_sliced_vbi_format sliced; // V4L2_BUF_TYPE_SLICED_VBI_CAPTURE | 1285 | struct v4l2_sliced_vbi_format sliced; // V4L2_BUF_TYPE_SLICED_VBI_CAPTURE |
1254 | #endif | ||
1255 | __u8 raw_data[200]; // user-defined | 1286 | __u8 raw_data[200]; // user-defined |
1256 | } fmt; | 1287 | } fmt; |
1257 | }; | 1288 | }; |
@@ -1271,6 +1302,17 @@ struct v4l2_streamparm | |||
1271 | }; | 1302 | }; |
1272 | 1303 | ||
1273 | /* | 1304 | /* |
1305 | * A D V A N C E D D E B U G G I N G | ||
1306 | */ | ||
1307 | |||
1308 | /* VIDIOC_DBG_G_REGISTER and VIDIOC_DBG_S_REGISTER */ | ||
1309 | struct v4l2_register { | ||
1310 | __u64 reg; | ||
1311 | __u32 i2c_id; /* I2C driver ID of the I2C chip, or 0 for the host */ | ||
1312 | __u32 val; | ||
1313 | }; | ||
1314 | |||
1315 | /* | ||
1274 | * I O C T L C O D E S F O R V I D E O D E V I C E S | 1316 | * I O C T L C O D E S F O R V I D E O D E V I C E S |
1275 | * | 1317 | * |
1276 | */ | 1318 | */ |
@@ -1328,9 +1370,7 @@ struct v4l2_streamparm | |||
1328 | #define VIDIOC_ENUMAUDOUT _IOWR ('V', 66, struct v4l2_audioout) | 1370 | #define VIDIOC_ENUMAUDOUT _IOWR ('V', 66, struct v4l2_audioout) |
1329 | #define VIDIOC_G_PRIORITY _IOR ('V', 67, enum v4l2_priority) | 1371 | #define VIDIOC_G_PRIORITY _IOR ('V', 67, enum v4l2_priority) |
1330 | #define VIDIOC_S_PRIORITY _IOW ('V', 68, enum v4l2_priority) | 1372 | #define VIDIOC_S_PRIORITY _IOW ('V', 68, enum v4l2_priority) |
1331 | #if 1 | ||
1332 | #define VIDIOC_G_SLICED_VBI_CAP _IOWR ('V', 69, struct v4l2_sliced_vbi_cap) | 1373 | #define VIDIOC_G_SLICED_VBI_CAP _IOWR ('V', 69, struct v4l2_sliced_vbi_cap) |
1333 | #endif | ||
1334 | #define VIDIOC_LOG_STATUS _IO ('V', 70) | 1374 | #define VIDIOC_LOG_STATUS _IO ('V', 70) |
1335 | #define VIDIOC_G_EXT_CTRLS _IOWR ('V', 71, struct v4l2_ext_controls) | 1375 | #define VIDIOC_G_EXT_CTRLS _IOWR ('V', 71, struct v4l2_ext_controls) |
1336 | #define VIDIOC_S_EXT_CTRLS _IOWR ('V', 72, struct v4l2_ext_controls) | 1376 | #define VIDIOC_S_EXT_CTRLS _IOWR ('V', 72, struct v4l2_ext_controls) |
@@ -1339,6 +1379,9 @@ struct v4l2_streamparm | |||
1339 | #define VIDIOC_ENUM_FRAMESIZES _IOWR ('V', 74, struct v4l2_frmsizeenum) | 1379 | #define VIDIOC_ENUM_FRAMESIZES _IOWR ('V', 74, struct v4l2_frmsizeenum) |
1340 | #define VIDIOC_ENUM_FRAMEINTERVALS _IOWR ('V', 75, struct v4l2_frmivalenum) | 1380 | #define VIDIOC_ENUM_FRAMEINTERVALS _IOWR ('V', 75, struct v4l2_frmivalenum) |
1341 | #endif | 1381 | #endif |
1382 | /* only implemented if CONFIG_VIDEO_ADV_DEBUG is defined */ | ||
1383 | #define VIDIOC_DBG_S_REGISTER _IOW ('d', 100, struct v4l2_register) | ||
1384 | #define VIDIOC_DBG_G_REGISTER _IOWR('d', 101, struct v4l2_register) | ||
1342 | 1385 | ||
1343 | #ifdef __OLD_VIDIOC_ | 1386 | #ifdef __OLD_VIDIOC_ |
1344 | /* for compatibility, will go away some day */ | 1387 | /* for compatibility, will go away some day */ |
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index 5e9803ed17fc..acb1f105870c 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h | |||
@@ -3,20 +3,15 @@ | |||
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/percpu.h> | 5 | #include <linux/percpu.h> |
6 | #include <linux/mm.h> | ||
6 | #include <linux/mmzone.h> | 7 | #include <linux/mmzone.h> |
7 | #include <asm/atomic.h> | 8 | #include <asm/atomic.h> |
8 | 9 | ||
9 | #ifdef CONFIG_VM_EVENT_COUNTERS | 10 | #ifdef CONFIG_ZONE_DMA |
10 | /* | 11 | #define DMA_ZONE(xx) xx##_DMA, |
11 | * Light weight per cpu counter implementation. | 12 | #else |
12 | * | 13 | #define DMA_ZONE(xx) |
13 | * Counters should only be incremented. You need to set EMBEDDED | 14 | #endif |
14 | * to disable VM_EVENT_COUNTERS. Things like procps (vmstat, | ||
15 | * top, etc) use /proc/vmstat and depend on these counters. | ||
16 | * | ||
17 | * Counters are handled completely inline. On many platforms the code | ||
18 | * generated will simply be the increment of a global address. | ||
19 | */ | ||
20 | 15 | ||
21 | #ifdef CONFIG_ZONE_DMA32 | 16 | #ifdef CONFIG_ZONE_DMA32 |
22 | #define DMA32_ZONE(xx) xx##_DMA32, | 17 | #define DMA32_ZONE(xx) xx##_DMA32, |
@@ -30,7 +25,7 @@ | |||
30 | #define HIGHMEM_ZONE(xx) | 25 | #define HIGHMEM_ZONE(xx) |
31 | #endif | 26 | #endif |
32 | 27 | ||
33 | #define FOR_ALL_ZONES(xx) xx##_DMA, DMA32_ZONE(xx) xx##_NORMAL HIGHMEM_ZONE(xx) | 28 | #define FOR_ALL_ZONES(xx) DMA_ZONE(xx) DMA32_ZONE(xx) xx##_NORMAL HIGHMEM_ZONE(xx) |
34 | 29 | ||
35 | enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, | 30 | enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, |
36 | FOR_ALL_ZONES(PGALLOC), | 31 | FOR_ALL_ZONES(PGALLOC), |
@@ -45,6 +40,17 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, | |||
45 | NR_VM_EVENT_ITEMS | 40 | NR_VM_EVENT_ITEMS |
46 | }; | 41 | }; |
47 | 42 | ||
43 | #ifdef CONFIG_VM_EVENT_COUNTERS | ||
44 | /* | ||
45 | * Light weight per cpu counter implementation. | ||
46 | * | ||
47 | * Counters should only be incremented and no critical kernel component | ||
48 | * should rely on the counter values. | ||
49 | * | ||
50 | * Counters are handled completely inline. On many platforms the code | ||
51 | * generated will simply be the increment of a global address. | ||
52 | */ | ||
53 | |||
48 | struct vm_event_state { | 54 | struct vm_event_state { |
49 | unsigned long event[NR_VM_EVENT_ITEMS]; | 55 | unsigned long event[NR_VM_EVENT_ITEMS]; |
50 | }; | 56 | }; |
@@ -85,17 +91,30 @@ static inline void vm_events_fold_cpu(int cpu) | |||
85 | #else | 91 | #else |
86 | 92 | ||
87 | /* Disable counters */ | 93 | /* Disable counters */ |
88 | #define get_cpu_vm_events(e) 0L | 94 | static inline void count_vm_event(enum vm_event_item item) |
89 | #define count_vm_event(e) do { } while (0) | 95 | { |
90 | #define count_vm_events(e,d) do { } while (0) | 96 | } |
91 | #define __count_vm_event(e) do { } while (0) | 97 | static inline void count_vm_events(enum vm_event_item item, long delta) |
92 | #define __count_vm_events(e,d) do { } while (0) | 98 | { |
93 | #define vm_events_fold_cpu(x) do { } while (0) | 99 | } |
100 | static inline void __count_vm_event(enum vm_event_item item) | ||
101 | { | ||
102 | } | ||
103 | static inline void __count_vm_events(enum vm_event_item item, long delta) | ||
104 | { | ||
105 | } | ||
106 | static inline void all_vm_events(unsigned long *ret) | ||
107 | { | ||
108 | } | ||
109 | static inline void vm_events_fold_cpu(int cpu) | ||
110 | { | ||
111 | } | ||
94 | 112 | ||
95 | #endif /* CONFIG_VM_EVENT_COUNTERS */ | 113 | #endif /* CONFIG_VM_EVENT_COUNTERS */ |
96 | 114 | ||
97 | #define __count_zone_vm_events(item, zone, delta) \ | 115 | #define __count_zone_vm_events(item, zone, delta) \ |
98 | __count_vm_events(item##_DMA + zone_idx(zone), delta) | 116 | __count_vm_events(item##_NORMAL - ZONE_NORMAL + \ |
117 | zone_idx(zone), delta) | ||
99 | 118 | ||
100 | /* | 119 | /* |
101 | * Zone based page accounting with per cpu differentials. | 120 | * Zone based page accounting with per cpu differentials. |
@@ -142,14 +161,16 @@ static inline unsigned long node_page_state(int node, | |||
142 | struct zone *zones = NODE_DATA(node)->node_zones; | 161 | struct zone *zones = NODE_DATA(node)->node_zones; |
143 | 162 | ||
144 | return | 163 | return |
164 | #ifdef CONFIG_ZONE_DMA | ||
165 | zone_page_state(&zones[ZONE_DMA], item) + | ||
166 | #endif | ||
145 | #ifdef CONFIG_ZONE_DMA32 | 167 | #ifdef CONFIG_ZONE_DMA32 |
146 | zone_page_state(&zones[ZONE_DMA32], item) + | 168 | zone_page_state(&zones[ZONE_DMA32], item) + |
147 | #endif | 169 | #endif |
148 | zone_page_state(&zones[ZONE_NORMAL], item) + | ||
149 | #ifdef CONFIG_HIGHMEM | 170 | #ifdef CONFIG_HIGHMEM |
150 | zone_page_state(&zones[ZONE_HIGHMEM], item) + | 171 | zone_page_state(&zones[ZONE_HIGHMEM], item) + |
151 | #endif | 172 | #endif |
152 | zone_page_state(&zones[ZONE_DMA], item); | 173 | zone_page_state(&zones[ZONE_NORMAL], item); |
153 | } | 174 | } |
154 | 175 | ||
155 | extern void zone_statistics(struct zonelist *, struct zone *); | 176 | extern void zone_statistics(struct zonelist *, struct zone *); |
@@ -186,6 +207,9 @@ void inc_zone_page_state(struct page *, enum zone_stat_item); | |||
186 | void dec_zone_page_state(struct page *, enum zone_stat_item); | 207 | void dec_zone_page_state(struct page *, enum zone_stat_item); |
187 | 208 | ||
188 | extern void inc_zone_state(struct zone *, enum zone_stat_item); | 209 | extern void inc_zone_state(struct zone *, enum zone_stat_item); |
210 | extern void __inc_zone_state(struct zone *, enum zone_stat_item); | ||
211 | extern void dec_zone_state(struct zone *, enum zone_stat_item); | ||
212 | extern void __dec_zone_state(struct zone *, enum zone_stat_item); | ||
189 | 213 | ||
190 | void refresh_cpu_vm_stats(int); | 214 | void refresh_cpu_vm_stats(int); |
191 | void refresh_vm_stats(void); | 215 | void refresh_vm_stats(void); |
@@ -214,6 +238,12 @@ static inline void __inc_zone_page_state(struct page *page, | |||
214 | __inc_zone_state(page_zone(page), item); | 238 | __inc_zone_state(page_zone(page), item); |
215 | } | 239 | } |
216 | 240 | ||
241 | static inline void __dec_zone_state(struct zone *zone, enum zone_stat_item item) | ||
242 | { | ||
243 | atomic_long_dec(&zone->vm_stat[item]); | ||
244 | atomic_long_dec(&vm_stat[item]); | ||
245 | } | ||
246 | |||
217 | static inline void __dec_zone_page_state(struct page *page, | 247 | static inline void __dec_zone_page_state(struct page *page, |
218 | enum zone_stat_item item) | 248 | enum zone_stat_item item) |
219 | { | 249 | { |
diff --git a/include/linux/wireless.h b/include/linux/wireless.h index 7c269f4992eb..447c52beb691 100644 --- a/include/linux/wireless.h +++ b/include/linux/wireless.h | |||
@@ -334,7 +334,7 @@ | |||
334 | * separate range because of collisions with other tools such as | 334 | * separate range because of collisions with other tools such as |
335 | * 'mii-tool'. | 335 | * 'mii-tool'. |
336 | * We now have 32 commands, so a bit more space ;-). | 336 | * We now have 32 commands, so a bit more space ;-). |
337 | * Also, all 'odd' commands are only usable by root and don't return the | 337 | * Also, all 'even' commands are only usable by root and don't return the |
338 | * content of ifr/iwr to user (but you are not obliged to use the set/get | 338 | * content of ifr/iwr to user (but you are not obliged to use the set/get |
339 | * convention, just use every other two command). More details in iwpriv.c. | 339 | * convention, just use every other two command). More details in iwpriv.c. |
340 | * And I repeat : you are not forced to use them with iwpriv, but you | 340 | * And I repeat : you are not forced to use them with iwpriv, but you |
@@ -348,7 +348,7 @@ | |||
348 | #define SIOCIWLAST SIOCIWLASTPRIV /* 0x8BFF */ | 348 | #define SIOCIWLAST SIOCIWLASTPRIV /* 0x8BFF */ |
349 | #define IW_IOCTL_IDX(cmd) ((cmd) - SIOCIWFIRST) | 349 | #define IW_IOCTL_IDX(cmd) ((cmd) - SIOCIWFIRST) |
350 | 350 | ||
351 | /* Even : get (world access), odd : set (root access) */ | 351 | /* Odd : get (world access), even : set (root access) */ |
352 | #define IW_IS_SET(cmd) (!((cmd) & 0x1)) | 352 | #define IW_IS_SET(cmd) (!((cmd) & 0x1)) |
353 | #define IW_IS_GET(cmd) ((cmd) & 0x1) | 353 | #define IW_IS_GET(cmd) ((cmd) & 0x1) |
354 | 354 | ||
diff --git a/include/linux/xattr.h b/include/linux/xattr.h index 0e7f1e20ea45..def131a5ac70 100644 --- a/include/linux/xattr.h +++ b/include/linux/xattr.h | |||
@@ -13,6 +13,10 @@ | |||
13 | #define XATTR_CREATE 0x1 /* set value, fail if attr already exists */ | 13 | #define XATTR_CREATE 0x1 /* set value, fail if attr already exists */ |
14 | #define XATTR_REPLACE 0x2 /* set value, fail if attr does not exist */ | 14 | #define XATTR_REPLACE 0x2 /* set value, fail if attr does not exist */ |
15 | 15 | ||
16 | #ifdef __KERNEL__ | ||
17 | |||
18 | #include <linux/types.h> | ||
19 | |||
16 | /* Namespaces */ | 20 | /* Namespaces */ |
17 | #define XATTR_OS2_PREFIX "os2." | 21 | #define XATTR_OS2_PREFIX "os2." |
18 | #define XATTR_OS2_PREFIX_LEN (sizeof (XATTR_OS2_PREFIX) - 1) | 22 | #define XATTR_OS2_PREFIX_LEN (sizeof (XATTR_OS2_PREFIX) - 1) |
@@ -29,6 +33,8 @@ | |||
29 | #define XATTR_USER_PREFIX "user." | 33 | #define XATTR_USER_PREFIX "user." |
30 | #define XATTR_USER_PREFIX_LEN (sizeof (XATTR_USER_PREFIX) - 1) | 34 | #define XATTR_USER_PREFIX_LEN (sizeof (XATTR_USER_PREFIX) - 1) |
31 | 35 | ||
36 | struct inode; | ||
37 | struct dentry; | ||
32 | 38 | ||
33 | struct xattr_handler { | 39 | struct xattr_handler { |
34 | char *prefix; | 40 | char *prefix; |
@@ -50,4 +56,6 @@ ssize_t generic_listxattr(struct dentry *dentry, char *buffer, size_t buffer_siz | |||
50 | int generic_setxattr(struct dentry *dentry, const char *name, const void *value, size_t size, int flags); | 56 | int generic_setxattr(struct dentry *dentry, const char *name, const void *value, size_t size, int flags); |
51 | int generic_removexattr(struct dentry *dentry, const char *name); | 57 | int generic_removexattr(struct dentry *dentry, const char *name); |
52 | 58 | ||
59 | #endif /* __KERNEL__ */ | ||
60 | |||
53 | #endif /* _LINUX_XATTR_H */ | 61 | #endif /* _LINUX_XATTR_H */ |
diff --git a/include/media/cx2341x.h b/include/media/cx2341x.h index ecad55bf0162..d758a52cf556 100644 --- a/include/media/cx2341x.h +++ b/include/media/cx2341x.h | |||
@@ -57,7 +57,6 @@ struct cx2341x_mpeg_params { | |||
57 | u16 video_b_frames; | 57 | u16 video_b_frames; |
58 | u16 video_gop_size; | 58 | u16 video_gop_size; |
59 | u16 video_gop_closure; | 59 | u16 video_gop_closure; |
60 | u16 video_pulldown; | ||
61 | enum v4l2_mpeg_video_bitrate_mode video_bitrate_mode; | 60 | enum v4l2_mpeg_video_bitrate_mode video_bitrate_mode; |
62 | u32 video_bitrate; | 61 | u32 video_bitrate; |
63 | u32 video_bitrate_peak; | 62 | u32 video_bitrate_peak; |
@@ -121,8 +120,6 @@ void cx2341x_log_status(struct cx2341x_mpeg_params *p, const char *prefix); | |||
121 | #define CX2341X_DEC_SET_DISPLAY_BUFFERS 0x18 | 120 | #define CX2341X_DEC_SET_DISPLAY_BUFFERS 0x18 |
122 | #define CX2341X_DEC_EXTRACT_VBI 0x19 | 121 | #define CX2341X_DEC_EXTRACT_VBI 0x19 |
123 | #define CX2341X_DEC_SET_DECODER_SOURCE 0x1a | 122 | #define CX2341X_DEC_SET_DECODER_SOURCE 0x1a |
124 | #define CX2341X_DEC_SET_AUDIO_OUTPUT 0x1b | ||
125 | #define CX2341X_DEC_SET_AV_DELAY 0x1c | ||
126 | #define CX2341X_DEC_SET_PREBUFFERING 0x1e | 123 | #define CX2341X_DEC_SET_PREBUFFERING 0x1e |
127 | 124 | ||
128 | /* MPEG encoder API */ | 125 | /* MPEG encoder API */ |
@@ -141,7 +138,6 @@ void cx2341x_log_status(struct cx2341x_mpeg_params *p, const char *prefix); | |||
141 | #define CX2341X_ENC_SET_DNR_FILTER_PROPS 0x9d | 138 | #define CX2341X_ENC_SET_DNR_FILTER_PROPS 0x9d |
142 | #define CX2341X_ENC_SET_CORING_LEVELS 0x9f | 139 | #define CX2341X_ENC_SET_CORING_LEVELS 0x9f |
143 | #define CX2341X_ENC_SET_SPATIAL_FILTER_TYPE 0xa1 | 140 | #define CX2341X_ENC_SET_SPATIAL_FILTER_TYPE 0xa1 |
144 | #define CX2341X_ENC_SET_3_2_PULLDOWN 0xb1 | ||
145 | #define CX2341X_ENC_SET_VBI_LINE 0xb7 | 141 | #define CX2341X_ENC_SET_VBI_LINE 0xb7 |
146 | #define CX2341X_ENC_SET_STREAM_TYPE 0xb9 | 142 | #define CX2341X_ENC_SET_STREAM_TYPE 0xb9 |
147 | #define CX2341X_ENC_SET_OUTPUT_PORT 0xbb | 143 | #define CX2341X_ENC_SET_OUTPUT_PORT 0xbb |
diff --git a/include/media/ir-common.h b/include/media/ir-common.h index 4bb0ad810179..9807a7c15830 100644 --- a/include/media/ir-common.h +++ b/include/media/ir-common.h | |||
@@ -36,6 +36,11 @@ | |||
36 | #define IR_KEYCODE(tab,code) (((unsigned)code < IR_KEYTAB_SIZE) \ | 36 | #define IR_KEYCODE(tab,code) (((unsigned)code < IR_KEYTAB_SIZE) \ |
37 | ? tab[code] : KEY_RESERVED) | 37 | ? tab[code] : KEY_RESERVED) |
38 | 38 | ||
39 | #define RC5_START(x) (((x)>>12)&3) | ||
40 | #define RC5_TOGGLE(x) (((x)>>11)&1) | ||
41 | #define RC5_ADDR(x) (((x)>>6)&31) | ||
42 | #define RC5_INSTR(x) ((x)&63) | ||
43 | |||
39 | struct ir_input_state { | 44 | struct ir_input_state { |
40 | /* configuration */ | 45 | /* configuration */ |
41 | int ir_type; | 46 | int ir_type; |
@@ -48,6 +53,40 @@ struct ir_input_state { | |||
48 | int keypressed; /* current state */ | 53 | int keypressed; /* current state */ |
49 | }; | 54 | }; |
50 | 55 | ||
56 | /* this was saa7134_ir and bttv_ir, moved here for | ||
57 | * rc5 decoding. */ | ||
58 | struct card_ir { | ||
59 | struct input_dev *dev; | ||
60 | struct ir_input_state ir; | ||
61 | char name[32]; | ||
62 | char phys[32]; | ||
63 | |||
64 | /* Usual gpio signalling */ | ||
65 | |||
66 | u32 mask_keycode; | ||
67 | u32 mask_keydown; | ||
68 | u32 mask_keyup; | ||
69 | u32 polling; | ||
70 | u32 last_gpio; | ||
71 | int shift_by; | ||
72 | int start; // What should RC5_START() be | ||
73 | int addr; // What RC5_ADDR() should be. | ||
74 | int rc5_key_timeout; | ||
75 | int rc5_remote_gap; | ||
76 | struct work_struct work; | ||
77 | struct timer_list timer; | ||
78 | |||
79 | /* RC5 gpio */ | ||
80 | u32 rc5_gpio; | ||
81 | struct timer_list timer_end; /* timer_end for code completion */ | ||
82 | struct timer_list timer_keyup; /* timer_end for key release */ | ||
83 | u32 last_rc5; /* last good rc5 code */ | ||
84 | u32 last_bit; /* last raw bit seen */ | ||
85 | u32 code; /* raw code under construction */ | ||
86 | struct timeval base_time; /* time of last seen code */ | ||
87 | int active; /* building raw code */ | ||
88 | }; | ||
89 | |||
51 | void ir_input_init(struct input_dev *dev, struct ir_input_state *ir, | 90 | void ir_input_init(struct input_dev *dev, struct ir_input_state *ir, |
52 | int ir_type, IR_KEYTAB_TYPE *ir_codes); | 91 | int ir_type, IR_KEYTAB_TYPE *ir_codes); |
53 | void ir_input_nokey(struct input_dev *dev, struct ir_input_state *ir); | 92 | void ir_input_nokey(struct input_dev *dev, struct ir_input_state *ir); |
@@ -58,6 +97,10 @@ int ir_dump_samples(u32 *samples, int count); | |||
58 | int ir_decode_biphase(u32 *samples, int count, int low, int high); | 97 | int ir_decode_biphase(u32 *samples, int count, int low, int high); |
59 | int ir_decode_pulsedistance(u32 *samples, int count, int low, int high); | 98 | int ir_decode_pulsedistance(u32 *samples, int count, int low, int high); |
60 | 99 | ||
100 | u32 ir_rc5_decode(unsigned int code); | ||
101 | void ir_rc5_timer_end(unsigned long data); | ||
102 | void ir_rc5_timer_keyup(unsigned long data); | ||
103 | |||
61 | /* Keymaps to be used by other modules */ | 104 | /* Keymaps to be used by other modules */ |
62 | 105 | ||
63 | extern IR_KEYTAB_TYPE ir_codes_empty[IR_KEYTAB_SIZE]; | 106 | extern IR_KEYTAB_TYPE ir_codes_empty[IR_KEYTAB_SIZE]; |
@@ -94,6 +137,9 @@ extern IR_KEYTAB_TYPE ir_codes_npgtech[IR_KEYTAB_SIZE]; | |||
94 | extern IR_KEYTAB_TYPE ir_codes_norwood[IR_KEYTAB_SIZE]; | 137 | extern IR_KEYTAB_TYPE ir_codes_norwood[IR_KEYTAB_SIZE]; |
95 | extern IR_KEYTAB_TYPE ir_codes_proteus_2309[IR_KEYTAB_SIZE]; | 138 | extern IR_KEYTAB_TYPE ir_codes_proteus_2309[IR_KEYTAB_SIZE]; |
96 | extern IR_KEYTAB_TYPE ir_codes_budget_ci_old[IR_KEYTAB_SIZE]; | 139 | extern IR_KEYTAB_TYPE ir_codes_budget_ci_old[IR_KEYTAB_SIZE]; |
140 | extern IR_KEYTAB_TYPE ir_codes_asus_pc39[IR_KEYTAB_SIZE]; | ||
141 | extern IR_KEYTAB_TYPE ir_codes_encore_enltv[IR_KEYTAB_SIZE]; | ||
142 | extern IR_KEYTAB_TYPE ir_codes_tt_1500[IR_KEYTAB_SIZE]; | ||
97 | 143 | ||
98 | #endif | 144 | #endif |
99 | 145 | ||
diff --git a/include/media/saa7115.h b/include/media/saa7115.h index 9f0e2285a099..f677dfb9d373 100644 --- a/include/media/saa7115.h +++ b/include/media/saa7115.h | |||
@@ -42,5 +42,8 @@ | |||
42 | #define SAA7115_FREQ_FL_CGCDIV (1 << 1) /* SA 3A[6], CGCDIV, SAA7115 only */ | 42 | #define SAA7115_FREQ_FL_CGCDIV (1 << 1) /* SA 3A[6], CGCDIV, SAA7115 only */ |
43 | #define SAA7115_FREQ_FL_APLL (1 << 2) /* SA 3A[3], APLL, SAA7114/5 only */ | 43 | #define SAA7115_FREQ_FL_APLL (1 << 2) /* SA 3A[3], APLL, SAA7114/5 only */ |
44 | 44 | ||
45 | #define SAA7115_IPORT_ON 1 | ||
46 | #define SAA7115_IPORT_OFF 0 | ||
47 | |||
45 | #endif | 48 | #endif |
46 | 49 | ||
diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h index 91b19921f958..244e440edb53 100644 --- a/include/media/v4l2-common.h +++ b/include/media/v4l2-common.h | |||
@@ -64,9 +64,6 @@ | |||
64 | /* Prints the ioctl in a human-readable format */ | 64 | /* Prints the ioctl in a human-readable format */ |
65 | extern void v4l_printk_ioctl(unsigned int cmd); | 65 | extern void v4l_printk_ioctl(unsigned int cmd); |
66 | 66 | ||
67 | /* Prints the ioctl and arg in a human-readable format */ | ||
68 | extern void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg); | ||
69 | |||
70 | /* Use this macro for non-I2C drivers. Pass the driver name as the first arg. */ | 67 | /* Use this macro for non-I2C drivers. Pass the driver name as the first arg. */ |
71 | #define v4l_print_ioctl(name, cmd) \ | 68 | #define v4l_print_ioctl(name, cmd) \ |
72 | do { \ | 69 | do { \ |
@@ -99,13 +96,6 @@ u32 v4l2_ctrl_next(const u32 * const *ctrl_classes, u32 id); | |||
99 | 96 | ||
100 | /* Internal ioctls */ | 97 | /* Internal ioctls */ |
101 | 98 | ||
102 | /* VIDIOC_INT_G_REGISTER and VIDIOC_INT_S_REGISTER */ | ||
103 | struct v4l2_register { | ||
104 | u32 i2c_id; /* I2C driver ID of the I2C chip. 0 for the I2C adapter. */ | ||
105 | unsigned long reg; | ||
106 | u32 val; | ||
107 | }; | ||
108 | |||
109 | /* VIDIOC_INT_DECODE_VBI_LINE */ | 99 | /* VIDIOC_INT_DECODE_VBI_LINE */ |
110 | struct v4l2_decode_vbi_line { | 100 | struct v4l2_decode_vbi_line { |
111 | u32 is_second_field; /* Set to 0 for the first (odd) field, | 101 | u32 is_second_field; /* Set to 0 for the first (odd) field, |
@@ -175,9 +165,7 @@ enum v4l2_chip_ident { | |||
175 | Replacement of TUNER_SET_STANDBY. */ | 165 | Replacement of TUNER_SET_STANDBY. */ |
176 | #define VIDIOC_INT_S_STANDBY _IOW('d', 94, u32) | 166 | #define VIDIOC_INT_S_STANDBY _IOW('d', 94, u32) |
177 | 167 | ||
178 | /* only implemented if CONFIG_VIDEO_ADV_DEBUG is defined */ | 168 | /* 100, 101 used by VIDIOC_DBG_[SG]_REGISTER */ |
179 | #define VIDIOC_INT_S_REGISTER _IOW ('d', 100, struct v4l2_register) | ||
180 | #define VIDIOC_INT_G_REGISTER _IOWR('d', 101, struct v4l2_register) | ||
181 | 169 | ||
182 | /* Generic reset command. The argument selects which subsystems to reset. | 170 | /* Generic reset command. The argument selects which subsystems to reset. |
183 | Passing 0 will always reset the whole chip. */ | 171 | Passing 0 will always reset the whole chip. */ |
diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h index fb96472a1bd3..aeec56992ef5 100644 --- a/include/media/v4l2-dev.h +++ b/include/media/v4l2-dev.h | |||
@@ -296,6 +296,15 @@ struct video_device | |||
296 | int (*vidioc_log_status) (struct file *file, void *fh); | 296 | int (*vidioc_log_status) (struct file *file, void *fh); |
297 | 297 | ||
298 | 298 | ||
299 | /* Debugging ioctls */ | ||
300 | #ifdef CONFIG_VIDEO_ADV_DEBUG | ||
301 | int (*vidioc_g_register) (struct file *file, void *fh, | ||
302 | struct v4l2_register *reg); | ||
303 | int (*vidioc_s_register) (struct file *file, void *fh, | ||
304 | struct v4l2_register *reg); | ||
305 | #endif | ||
306 | |||
307 | |||
299 | #ifdef OBSOLETE_OWNER /* to be removed soon */ | 308 | #ifdef OBSOLETE_OWNER /* to be removed soon */ |
300 | /* obsolete -- fops->owner is used instead */ | 309 | /* obsolete -- fops->owner is used instead */ |
301 | struct module *owner; | 310 | struct module *owner; |
diff --git a/include/media/video-buf.h b/include/media/video-buf.h index 1115a256969f..d6f079476db3 100644 --- a/include/media/video-buf.h +++ b/include/media/video-buf.h | |||
@@ -78,6 +78,9 @@ struct videobuf_dmabuf { | |||
78 | /* for kernel buffers */ | 78 | /* for kernel buffers */ |
79 | void *vmalloc; | 79 | void *vmalloc; |
80 | 80 | ||
81 | /* Stores the userspace pointer to vmalloc area */ | ||
82 | void *varea; | ||
83 | |||
81 | /* for overlay buffers (pci-pci dma) */ | 84 | /* for overlay buffers (pci-pci dma) */ |
82 | dma_addr_t bus_addr; | 85 | dma_addr_t bus_addr; |
83 | 86 | ||
diff --git a/include/mtd/mtd-abi.h b/include/mtd/mtd-abi.h index f913c30d7b89..8e501a75a764 100644 --- a/include/mtd/mtd-abi.h +++ b/include/mtd/mtd-abi.h | |||
@@ -36,12 +36,6 @@ struct mtd_oob_buf { | |||
36 | #define MTD_CAP_NORFLASH (MTD_WRITEABLE | MTD_BIT_WRITEABLE) | 36 | #define MTD_CAP_NORFLASH (MTD_WRITEABLE | MTD_BIT_WRITEABLE) |
37 | #define MTD_CAP_NANDFLASH (MTD_WRITEABLE) | 37 | #define MTD_CAP_NANDFLASH (MTD_WRITEABLE) |
38 | 38 | ||
39 | |||
40 | // Types of automatic ECC/Checksum available | ||
41 | #define MTD_ECC_NONE 0 // No automatic ECC available | ||
42 | #define MTD_ECC_RS_DiskOnChip 1 // Automatic ECC on DiskOnChip | ||
43 | #define MTD_ECC_SW 2 // SW ECC for Toshiba & Samsung devices | ||
44 | |||
45 | /* ECC byte placement */ | 39 | /* ECC byte placement */ |
46 | #define MTD_NANDECC_OFF 0 // Switch off ECC (Not recommended) | 40 | #define MTD_NANDECC_OFF 0 // Switch off ECC (Not recommended) |
47 | #define MTD_NANDECC_PLACE 1 // Use the given placement in the structure (YAFFS1 legacy mode) | 41 | #define MTD_NANDECC_PLACE 1 // Use the given placement in the structure (YAFFS1 legacy mode) |
@@ -61,6 +55,8 @@ struct mtd_info_user { | |||
61 | uint32_t erasesize; | 55 | uint32_t erasesize; |
62 | uint32_t writesize; | 56 | uint32_t writesize; |
63 | uint32_t oobsize; // Amount of OOB data per block (e.g. 16) | 57 | uint32_t oobsize; // Amount of OOB data per block (e.g. 16) |
58 | /* The below two fields are obsolete and broken, do not use them | ||
59 | * (TODO: remove at some point) */ | ||
64 | uint32_t ecctype; | 60 | uint32_t ecctype; |
65 | uint32_t eccsize; | 61 | uint32_t eccsize; |
66 | }; | 62 | }; |
diff --git a/include/net/ax25.h b/include/net/ax25.h index 5ae10dd2e32e..47ff2f46e908 100644 --- a/include/net/ax25.h +++ b/include/net/ax25.h | |||
@@ -377,7 +377,7 @@ extern int ax25_check_iframes_acked(ax25_cb *, unsigned short); | |||
377 | /* ax25_route.c */ | 377 | /* ax25_route.c */ |
378 | extern void ax25_rt_device_down(struct net_device *); | 378 | extern void ax25_rt_device_down(struct net_device *); |
379 | extern int ax25_rt_ioctl(unsigned int, void __user *); | 379 | extern int ax25_rt_ioctl(unsigned int, void __user *); |
380 | extern struct file_operations ax25_route_fops; | 380 | extern const struct file_operations ax25_route_fops; |
381 | extern ax25_route *ax25_get_route(ax25_address *addr, struct net_device *dev); | 381 | extern ax25_route *ax25_get_route(ax25_address *addr, struct net_device *dev); |
382 | extern int ax25_rt_autobind(ax25_cb *, ax25_address *); | 382 | extern int ax25_rt_autobind(ax25_cb *, ax25_address *); |
383 | extern struct sk_buff *ax25_rt_build_path(struct sk_buff *, ax25_address *, ax25_address *, ax25_digi *); | 383 | extern struct sk_buff *ax25_rt_build_path(struct sk_buff *, ax25_address *, ax25_address *, ax25_digi *); |
@@ -430,7 +430,7 @@ extern unsigned long ax25_display_timer(struct timer_list *); | |||
430 | extern int ax25_uid_policy; | 430 | extern int ax25_uid_policy; |
431 | extern ax25_uid_assoc *ax25_findbyuid(uid_t); | 431 | extern ax25_uid_assoc *ax25_findbyuid(uid_t); |
432 | extern int __must_check ax25_uid_ioctl(int, struct sockaddr_ax25 *); | 432 | extern int __must_check ax25_uid_ioctl(int, struct sockaddr_ax25 *); |
433 | extern struct file_operations ax25_uid_fops; | 433 | extern const struct file_operations ax25_uid_fops; |
434 | extern void ax25_uid_free(void); | 434 | extern void ax25_uid_free(void); |
435 | 435 | ||
436 | /* sysctl_net_ax25.c */ | 436 | /* sysctl_net_ax25.c */ |
diff --git a/include/net/dn_route.h b/include/net/dn_route.h index 76f957e258b0..a566944c4962 100644 --- a/include/net/dn_route.h +++ b/include/net/dn_route.h | |||
@@ -68,9 +68,10 @@ extern void dn_rt_cache_flush(int delay); | |||
68 | struct dn_route { | 68 | struct dn_route { |
69 | union { | 69 | union { |
70 | struct dst_entry dst; | 70 | struct dst_entry dst; |
71 | struct dn_route *rt_next; | ||
72 | } u; | 71 | } u; |
73 | 72 | ||
73 | struct flowi fl; | ||
74 | |||
74 | __le16 rt_saddr; | 75 | __le16 rt_saddr; |
75 | __le16 rt_daddr; | 76 | __le16 rt_daddr; |
76 | __le16 rt_gateway; | 77 | __le16 rt_gateway; |
@@ -80,8 +81,6 @@ struct dn_route { | |||
80 | 81 | ||
81 | unsigned rt_flags; | 82 | unsigned rt_flags; |
82 | unsigned rt_type; | 83 | unsigned rt_type; |
83 | |||
84 | struct flowi fl; | ||
85 | }; | 84 | }; |
86 | 85 | ||
87 | extern void dn_route_init(void); | 86 | extern void dn_route_init(void); |
diff --git a/include/net/dst.h b/include/net/dst.h index 62b7e7598e9a..e12a8ce0b9b3 100644 --- a/include/net/dst.h +++ b/include/net/dst.h | |||
@@ -37,9 +37,7 @@ struct sk_buff; | |||
37 | 37 | ||
38 | struct dst_entry | 38 | struct dst_entry |
39 | { | 39 | { |
40 | struct dst_entry *next; | 40 | struct rcu_head rcu_head; |
41 | atomic_t __refcnt; /* client references */ | ||
42 | int __use; | ||
43 | struct dst_entry *child; | 41 | struct dst_entry *child; |
44 | struct net_device *dev; | 42 | struct net_device *dev; |
45 | short error; | 43 | short error; |
@@ -50,7 +48,6 @@ struct dst_entry | |||
50 | #define DST_NOPOLICY 4 | 48 | #define DST_NOPOLICY 4 |
51 | #define DST_NOHASH 8 | 49 | #define DST_NOHASH 8 |
52 | #define DST_BALANCED 0x10 | 50 | #define DST_BALANCED 0x10 |
53 | unsigned long lastuse; | ||
54 | unsigned long expires; | 51 | unsigned long expires; |
55 | 52 | ||
56 | unsigned short header_len; /* more space at head required */ | 53 | unsigned short header_len; /* more space at head required */ |
@@ -75,8 +72,16 @@ struct dst_entry | |||
75 | #endif | 72 | #endif |
76 | 73 | ||
77 | struct dst_ops *ops; | 74 | struct dst_ops *ops; |
78 | struct rcu_head rcu_head; | ||
79 | 75 | ||
76 | unsigned long lastuse; | ||
77 | atomic_t __refcnt; /* client references */ | ||
78 | int __use; | ||
79 | union { | ||
80 | struct dst_entry *next; | ||
81 | struct rtable *rt_next; | ||
82 | struct rt6_info *rt6_next; | ||
83 | struct dn_route *dn_next; | ||
84 | }; | ||
80 | char info[0]; | 85 | char info[0]; |
81 | }; | 86 | }; |
82 | 87 | ||
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h index 7be4f4e3a0f2..9eda572a2a65 100644 --- a/include/net/ip6_fib.h +++ b/include/net/ip6_fib.h | |||
@@ -83,7 +83,6 @@ struct rt6_info | |||
83 | { | 83 | { |
84 | union { | 84 | union { |
85 | struct dst_entry dst; | 85 | struct dst_entry dst; |
86 | struct rt6_info *next; | ||
87 | } u; | 86 | } u; |
88 | 87 | ||
89 | struct inet6_dev *rt6i_idev; | 88 | struct inet6_dev *rt6i_idev; |
diff --git a/include/net/irda/irda.h b/include/net/irda/irda.h index 1cb0607fcbb9..89fe534045f1 100644 --- a/include/net/irda/irda.h +++ b/include/net/irda/irda.h | |||
@@ -113,4 +113,20 @@ do { if(!(expr)) { \ | |||
113 | #define IAS_IRCOMM_ID 0x2343 | 113 | #define IAS_IRCOMM_ID 0x2343 |
114 | #define IAS_IRLPT_ID 0x9876 | 114 | #define IAS_IRLPT_ID 0x9876 |
115 | 115 | ||
116 | struct net_device; | ||
117 | struct packet_type; | ||
118 | |||
119 | extern void irda_proc_register(void); | ||
120 | extern void irda_proc_unregister(void); | ||
121 | |||
122 | extern int irda_sysctl_register(void); | ||
123 | extern void irda_sysctl_unregister(void); | ||
124 | |||
125 | extern int irsock_init(void); | ||
126 | extern void irsock_cleanup(void); | ||
127 | |||
128 | extern int irlap_driver_rcv(struct sk_buff *skb, struct net_device *dev, | ||
129 | struct packet_type *ptype, | ||
130 | struct net_device *orig_dev); | ||
131 | |||
116 | #endif /* NET_IRDA_H */ | 132 | #endif /* NET_IRDA_H */ |
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h index 68ec27490c20..0e690e34c00b 100644 --- a/include/net/netfilter/nf_conntrack.h +++ b/include/net/netfilter/nf_conntrack.h | |||
@@ -257,6 +257,12 @@ extern int nf_conntrack_max; | |||
257 | 257 | ||
258 | DECLARE_PER_CPU(struct ip_conntrack_stat, nf_conntrack_stat); | 258 | DECLARE_PER_CPU(struct ip_conntrack_stat, nf_conntrack_stat); |
259 | #define NF_CT_STAT_INC(count) (__get_cpu_var(nf_conntrack_stat).count++) | 259 | #define NF_CT_STAT_INC(count) (__get_cpu_var(nf_conntrack_stat).count++) |
260 | #define NF_CT_STAT_INC_ATOMIC(count) \ | ||
261 | do { \ | ||
262 | local_bh_disable(); \ | ||
263 | __get_cpu_var(nf_conntrack_stat).count++; \ | ||
264 | local_bh_enable(); \ | ||
265 | } while (0) | ||
260 | 266 | ||
261 | /* no helper, no nat */ | 267 | /* no helper, no nat */ |
262 | #define NF_CT_F_BASIC 0 | 268 | #define NF_CT_F_BASIC 0 |
diff --git a/include/net/netfilter/nf_conntrack_expect.h b/include/net/netfilter/nf_conntrack_expect.h index 41bcc9eb4206..173c7c1eff23 100644 --- a/include/net/netfilter/nf_conntrack_expect.h +++ b/include/net/netfilter/nf_conntrack_expect.h | |||
@@ -8,7 +8,7 @@ | |||
8 | 8 | ||
9 | extern struct list_head nf_conntrack_expect_list; | 9 | extern struct list_head nf_conntrack_expect_list; |
10 | extern struct kmem_cache *nf_conntrack_expect_cachep; | 10 | extern struct kmem_cache *nf_conntrack_expect_cachep; |
11 | extern struct file_operations exp_file_ops; | 11 | extern const struct file_operations exp_file_ops; |
12 | 12 | ||
13 | struct nf_conntrack_expect | 13 | struct nf_conntrack_expect |
14 | { | 14 | { |
diff --git a/include/net/netfilter/nf_conntrack_l3proto.h b/include/net/netfilter/nf_conntrack_l3proto.h index 664ddcffe00d..eb575cbd4c95 100644 --- a/include/net/netfilter/nf_conntrack_l3proto.h +++ b/include/net/netfilter/nf_conntrack_l3proto.h | |||
@@ -89,7 +89,7 @@ extern struct nf_conntrack_l3proto *nf_ct_l3protos[AF_MAX]; | |||
89 | 89 | ||
90 | /* Protocol registration. */ | 90 | /* Protocol registration. */ |
91 | extern int nf_conntrack_l3proto_register(struct nf_conntrack_l3proto *proto); | 91 | extern int nf_conntrack_l3proto_register(struct nf_conntrack_l3proto *proto); |
92 | extern int nf_conntrack_l3proto_unregister(struct nf_conntrack_l3proto *proto); | 92 | extern void nf_conntrack_l3proto_unregister(struct nf_conntrack_l3proto *proto); |
93 | 93 | ||
94 | extern struct nf_conntrack_l3proto * | 94 | extern struct nf_conntrack_l3proto * |
95 | nf_ct_l3proto_find_get(u_int16_t l3proto); | 95 | nf_ct_l3proto_find_get(u_int16_t l3proto); |
@@ -106,7 +106,7 @@ __nf_ct_l3proto_find(u_int16_t l3proto) | |||
106 | { | 106 | { |
107 | if (unlikely(l3proto >= AF_MAX)) | 107 | if (unlikely(l3proto >= AF_MAX)) |
108 | return &nf_conntrack_l3proto_generic; | 108 | return &nf_conntrack_l3proto_generic; |
109 | return nf_ct_l3protos[l3proto]; | 109 | return rcu_dereference(nf_ct_l3protos[l3proto]); |
110 | } | 110 | } |
111 | 111 | ||
112 | #endif /*_NF_CONNTRACK_L3PROTO_H*/ | 112 | #endif /*_NF_CONNTRACK_L3PROTO_H*/ |
diff --git a/include/net/netfilter/nf_conntrack_l4proto.h b/include/net/netfilter/nf_conntrack_l4proto.h index fc8af08ff542..8415182ec126 100644 --- a/include/net/netfilter/nf_conntrack_l4proto.h +++ b/include/net/netfilter/nf_conntrack_l4proto.h | |||
@@ -109,7 +109,7 @@ extern void nf_ct_l4proto_put(struct nf_conntrack_l4proto *p); | |||
109 | 109 | ||
110 | /* Protocol registration. */ | 110 | /* Protocol registration. */ |
111 | extern int nf_conntrack_l4proto_register(struct nf_conntrack_l4proto *proto); | 111 | extern int nf_conntrack_l4proto_register(struct nf_conntrack_l4proto *proto); |
112 | extern int nf_conntrack_l4proto_unregister(struct nf_conntrack_l4proto *proto); | 112 | extern void nf_conntrack_l4proto_unregister(struct nf_conntrack_l4proto *proto); |
113 | 113 | ||
114 | /* Generic netlink helpers */ | 114 | /* Generic netlink helpers */ |
115 | extern int nf_ct_port_tuple_to_nfattr(struct sk_buff *skb, | 115 | extern int nf_ct_port_tuple_to_nfattr(struct sk_buff *skb, |
diff --git a/include/net/netrom.h b/include/net/netrom.h index e0ca112024a3..f06852bba62a 100644 --- a/include/net/netrom.h +++ b/include/net/netrom.h | |||
@@ -215,8 +215,8 @@ extern struct net_device *nr_dev_get(ax25_address *); | |||
215 | extern int nr_rt_ioctl(unsigned int, void __user *); | 215 | extern int nr_rt_ioctl(unsigned int, void __user *); |
216 | extern void nr_link_failed(ax25_cb *, int); | 216 | extern void nr_link_failed(ax25_cb *, int); |
217 | extern int nr_route_frame(struct sk_buff *, ax25_cb *); | 217 | extern int nr_route_frame(struct sk_buff *, ax25_cb *); |
218 | extern struct file_operations nr_nodes_fops; | 218 | extern const struct file_operations nr_nodes_fops; |
219 | extern struct file_operations nr_neigh_fops; | 219 | extern const struct file_operations nr_neigh_fops; |
220 | extern void nr_rt_free(void); | 220 | extern void nr_rt_free(void); |
221 | 221 | ||
222 | /* nr_subr.c */ | 222 | /* nr_subr.c */ |
diff --git a/include/net/rose.h b/include/net/rose.h index 4c05a88b921b..a4047d3cf5dd 100644 --- a/include/net/rose.h +++ b/include/net/rose.h | |||
@@ -189,9 +189,9 @@ extern void rose_enquiry_response(struct sock *); | |||
189 | 189 | ||
190 | /* rose_route.c */ | 190 | /* rose_route.c */ |
191 | extern struct rose_neigh rose_loopback_neigh; | 191 | extern struct rose_neigh rose_loopback_neigh; |
192 | extern struct file_operations rose_neigh_fops; | 192 | extern const struct file_operations rose_neigh_fops; |
193 | extern struct file_operations rose_nodes_fops; | 193 | extern const struct file_operations rose_nodes_fops; |
194 | extern struct file_operations rose_routes_fops; | 194 | extern const struct file_operations rose_routes_fops; |
195 | 195 | ||
196 | extern void rose_add_loopback_neigh(void); | 196 | extern void rose_add_loopback_neigh(void); |
197 | extern int __must_check rose_add_loopback_node(rose_address *); | 197 | extern int __must_check rose_add_loopback_node(rose_address *); |
diff --git a/include/net/route.h b/include/net/route.h index 1440bdb5a27d..749e4dfe5ff3 100644 --- a/include/net/route.h +++ b/include/net/route.h | |||
@@ -53,9 +53,11 @@ struct rtable | |||
53 | union | 53 | union |
54 | { | 54 | { |
55 | struct dst_entry dst; | 55 | struct dst_entry dst; |
56 | struct rtable *rt_next; | ||
57 | } u; | 56 | } u; |
58 | 57 | ||
58 | /* Cache lookup keys */ | ||
59 | struct flowi fl; | ||
60 | |||
59 | struct in_device *idev; | 61 | struct in_device *idev; |
60 | 62 | ||
61 | unsigned rt_flags; | 63 | unsigned rt_flags; |
@@ -69,9 +71,6 @@ struct rtable | |||
69 | /* Info on neighbour */ | 71 | /* Info on neighbour */ |
70 | __be32 rt_gateway; | 72 | __be32 rt_gateway; |
71 | 73 | ||
72 | /* Cache lookup keys */ | ||
73 | struct flowi fl; | ||
74 | |||
75 | /* Miscellaneous cached information */ | 74 | /* Miscellaneous cached information */ |
76 | __be32 rt_spec_dst; /* RFC1122 specific destination */ | 75 | __be32 rt_spec_dst; /* RFC1122 specific destination */ |
77 | struct inet_peer *peer; /* long-living peer info */ | 76 | struct inet_peer *peer; /* long-living peer info */ |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 16924cb772c9..92a1fc46ea59 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -946,14 +946,14 @@ extern int xfrm_state_mtu(struct xfrm_state *x, int mtu); | |||
946 | extern int xfrm_init_state(struct xfrm_state *x); | 946 | extern int xfrm_init_state(struct xfrm_state *x); |
947 | extern int xfrm4_rcv(struct sk_buff *skb); | 947 | extern int xfrm4_rcv(struct sk_buff *skb); |
948 | extern int xfrm4_output(struct sk_buff *skb); | 948 | extern int xfrm4_output(struct sk_buff *skb); |
949 | extern int xfrm4_tunnel_register(struct xfrm_tunnel *handler); | 949 | extern int xfrm4_tunnel_register(struct xfrm_tunnel *handler, unsigned short family); |
950 | extern int xfrm4_tunnel_deregister(struct xfrm_tunnel *handler); | 950 | extern int xfrm4_tunnel_deregister(struct xfrm_tunnel *handler, unsigned short family); |
951 | extern int xfrm6_rcv_spi(struct sk_buff *skb, __be32 spi); | 951 | extern int xfrm6_rcv_spi(struct sk_buff *skb, __be32 spi); |
952 | extern int xfrm6_rcv(struct sk_buff **pskb); | 952 | extern int xfrm6_rcv(struct sk_buff **pskb); |
953 | extern int xfrm6_input_addr(struct sk_buff *skb, xfrm_address_t *daddr, | 953 | extern int xfrm6_input_addr(struct sk_buff *skb, xfrm_address_t *daddr, |
954 | xfrm_address_t *saddr, u8 proto); | 954 | xfrm_address_t *saddr, u8 proto); |
955 | extern int xfrm6_tunnel_register(struct xfrm6_tunnel *handler); | 955 | extern int xfrm6_tunnel_register(struct xfrm6_tunnel *handler, unsigned short family); |
956 | extern int xfrm6_tunnel_deregister(struct xfrm6_tunnel *handler); | 956 | extern int xfrm6_tunnel_deregister(struct xfrm6_tunnel *handler, unsigned short family); |
957 | extern __be32 xfrm6_tunnel_alloc_spi(xfrm_address_t *saddr); | 957 | extern __be32 xfrm6_tunnel_alloc_spi(xfrm_address_t *saddr); |
958 | extern void xfrm6_tunnel_free_spi(xfrm_address_t *saddr); | 958 | extern void xfrm6_tunnel_free_spi(xfrm_address_t *saddr); |
959 | extern __be32 xfrm6_tunnel_spi_lookup(xfrm_address_t *saddr); | 959 | extern __be32 xfrm6_tunnel_spi_lookup(xfrm_address_t *saddr); |
diff --git a/include/pcmcia/ciscode.h b/include/pcmcia/ciscode.h index c1da8558339a..eae7e2e84497 100644 --- a/include/pcmcia/ciscode.h +++ b/include/pcmcia/ciscode.h | |||
@@ -95,6 +95,7 @@ | |||
95 | #define PRODID_QUATECH_DUAL_RS232 0x0012 | 95 | #define PRODID_QUATECH_DUAL_RS232 0x0012 |
96 | #define PRODID_QUATECH_DUAL_RS232_D1 0x0007 | 96 | #define PRODID_QUATECH_DUAL_RS232_D1 0x0007 |
97 | #define PRODID_QUATECH_DUAL_RS232_D2 0x0052 | 97 | #define PRODID_QUATECH_DUAL_RS232_D2 0x0052 |
98 | #define PRODID_QUATECH_DUAL_RS232_G 0x004d | ||
98 | #define PRODID_QUATECH_QUAD_RS232 0x001b | 99 | #define PRODID_QUATECH_QUAD_RS232 0x001b |
99 | #define PRODID_QUATECH_DUAL_RS422 0x000e | 100 | #define PRODID_QUATECH_DUAL_RS422 0x000e |
100 | #define PRODID_QUATECH_QUAD_RS422 0x0045 | 101 | #define PRODID_QUATECH_QUAD_RS422 0x0045 |
diff --git a/include/rdma/ib_addr.h b/include/rdma/ib_addr.h index c094e5012862..c36750ff6ae8 100644 --- a/include/rdma/ib_addr.h +++ b/include/rdma/ib_addr.h | |||
@@ -110,6 +110,12 @@ static inline void ib_addr_set_pkey(struct rdma_dev_addr *dev_addr, u16 pkey) | |||
110 | dev_addr->broadcast[9] = (unsigned char) pkey; | 110 | dev_addr->broadcast[9] = (unsigned char) pkey; |
111 | } | 111 | } |
112 | 112 | ||
113 | static inline void ib_addr_get_mgid(struct rdma_dev_addr *dev_addr, | ||
114 | union ib_gid *gid) | ||
115 | { | ||
116 | memcpy(gid, dev_addr->broadcast + 4, sizeof *gid); | ||
117 | } | ||
118 | |||
113 | static inline void ib_addr_get_sgid(struct rdma_dev_addr *dev_addr, | 119 | static inline void ib_addr_get_sgid(struct rdma_dev_addr *dev_addr, |
114 | union ib_gid *gid) | 120 | union ib_gid *gid) |
115 | { | 121 | { |
diff --git a/include/rdma/ib_sa.h b/include/rdma/ib_sa.h index 97715b0c20b6..5e26b2f53f86 100644 --- a/include/rdma/ib_sa.h +++ b/include/rdma/ib_sa.h | |||
@@ -285,18 +285,6 @@ int ib_sa_path_rec_get(struct ib_sa_client *client, | |||
285 | void *context, | 285 | void *context, |
286 | struct ib_sa_query **query); | 286 | struct ib_sa_query **query); |
287 | 287 | ||
288 | int ib_sa_mcmember_rec_query(struct ib_sa_client *client, | ||
289 | struct ib_device *device, u8 port_num, | ||
290 | u8 method, | ||
291 | struct ib_sa_mcmember_rec *rec, | ||
292 | ib_sa_comp_mask comp_mask, | ||
293 | int timeout_ms, gfp_t gfp_mask, | ||
294 | void (*callback)(int status, | ||
295 | struct ib_sa_mcmember_rec *resp, | ||
296 | void *context), | ||
297 | void *context, | ||
298 | struct ib_sa_query **query); | ||
299 | |||
300 | int ib_sa_service_rec_query(struct ib_sa_client *client, | 288 | int ib_sa_service_rec_query(struct ib_sa_client *client, |
301 | struct ib_device *device, u8 port_num, | 289 | struct ib_device *device, u8 port_num, |
302 | u8 method, | 290 | u8 method, |
@@ -309,93 +297,82 @@ int ib_sa_service_rec_query(struct ib_sa_client *client, | |||
309 | void *context, | 297 | void *context, |
310 | struct ib_sa_query **sa_query); | 298 | struct ib_sa_query **sa_query); |
311 | 299 | ||
300 | struct ib_sa_multicast { | ||
301 | struct ib_sa_mcmember_rec rec; | ||
302 | ib_sa_comp_mask comp_mask; | ||
303 | int (*callback)(int status, | ||
304 | struct ib_sa_multicast *multicast); | ||
305 | void *context; | ||
306 | }; | ||
307 | |||
312 | /** | 308 | /** |
313 | * ib_sa_mcmember_rec_set - Start an MCMember set query | 309 | * ib_sa_join_multicast - Initiates a join request to the specified multicast |
314 | * @client:SA client | 310 | * group. |
315 | * @device:device to send query on | 311 | * @client: SA client |
316 | * @port_num: port number to send query on | 312 | * @device: Device associated with the multicast group. |
317 | * @rec:MCMember Record to send in query | 313 | * @port_num: Port on the specified device to associate with the multicast |
318 | * @comp_mask:component mask to send in query | 314 | * group. |
319 | * @timeout_ms:time to wait for response | 315 | * @rec: SA multicast member record specifying group attributes. |
320 | * @gfp_mask:GFP mask to use for internal allocations | 316 | * @comp_mask: Component mask indicating which group attributes of %rec are |
321 | * @callback:function called when query completes, times out or is | 317 | * valid. |
322 | * canceled | 318 | * @gfp_mask: GFP mask for memory allocations. |
323 | * @context:opaque user context passed to callback | 319 | * @callback: User callback invoked once the join operation completes. |
324 | * @sa_query:query context, used to cancel query | 320 | * @context: User specified context stored with the ib_sa_multicast structure. |
325 | * | 321 | * |
326 | * Send an MCMember Set query to the SA (eg to join a multicast | 322 | * This call initiates a multicast join request with the SA for the specified |
327 | * group). The callback function will be called when the query | 323 | * multicast group. If the join operation is started successfully, it returns |
328 | * completes (or fails); status is 0 for a successful response, -EINTR | 324 | * an ib_sa_multicast structure that is used to track the multicast operation. |
329 | * if the query is canceled, -ETIMEDOUT is the query timed out, or | 325 | * Users must free this structure by calling ib_free_multicast, even if the |
330 | * -EIO if an error occurred sending the query. The resp parameter of | 326 | * join operation later fails. (The callback status is non-zero.) |
331 | * the callback is only valid if status is 0. | ||
332 | * | 327 | * |
333 | * If the return value of ib_sa_mcmember_rec_set() is negative, it is | 328 | * If the join operation fails; status will be non-zero, with the following |
334 | * an error code. Otherwise it is a query ID that can be used to | 329 | * failures possible: |
335 | * cancel the query. | 330 | * -ETIMEDOUT: The request timed out. |
331 | * -EIO: An error occurred sending the query. | ||
332 | * -EINVAL: The MCMemberRecord values differed from the existing group's. | ||
333 | * -ENETRESET: Indicates that an fatal error has occurred on the multicast | ||
334 | * group, and the user must rejoin the group to continue using it. | ||
336 | */ | 335 | */ |
337 | static inline int | 336 | struct ib_sa_multicast *ib_sa_join_multicast(struct ib_sa_client *client, |
338 | ib_sa_mcmember_rec_set(struct ib_sa_client *client, | 337 | struct ib_device *device, u8 port_num, |
339 | struct ib_device *device, u8 port_num, | 338 | struct ib_sa_mcmember_rec *rec, |
340 | struct ib_sa_mcmember_rec *rec, | 339 | ib_sa_comp_mask comp_mask, gfp_t gfp_mask, |
341 | ib_sa_comp_mask comp_mask, | 340 | int (*callback)(int status, |
342 | int timeout_ms, gfp_t gfp_mask, | 341 | struct ib_sa_multicast |
343 | void (*callback)(int status, | 342 | *multicast), |
344 | struct ib_sa_mcmember_rec *resp, | 343 | void *context); |
345 | void *context), | ||
346 | void *context, | ||
347 | struct ib_sa_query **query) | ||
348 | { | ||
349 | return ib_sa_mcmember_rec_query(client, device, port_num, | ||
350 | IB_MGMT_METHOD_SET, | ||
351 | rec, comp_mask, | ||
352 | timeout_ms, gfp_mask, callback, | ||
353 | context, query); | ||
354 | } | ||
355 | 344 | ||
356 | /** | 345 | /** |
357 | * ib_sa_mcmember_rec_delete - Start an MCMember delete query | 346 | * ib_free_multicast - Frees the multicast tracking structure, and releases |
358 | * @client:SA client | 347 | * any reference on the multicast group. |
359 | * @device:device to send query on | 348 | * @multicast: Multicast tracking structure allocated by ib_join_multicast. |
360 | * @port_num: port number to send query on | ||
361 | * @rec:MCMember Record to send in query | ||
362 | * @comp_mask:component mask to send in query | ||
363 | * @timeout_ms:time to wait for response | ||
364 | * @gfp_mask:GFP mask to use for internal allocations | ||
365 | * @callback:function called when query completes, times out or is | ||
366 | * canceled | ||
367 | * @context:opaque user context passed to callback | ||
368 | * @sa_query:query context, used to cancel query | ||
369 | * | ||
370 | * Send an MCMember Delete query to the SA (eg to leave a multicast | ||
371 | * group). The callback function will be called when the query | ||
372 | * completes (or fails); status is 0 for a successful response, -EINTR | ||
373 | * if the query is canceled, -ETIMEDOUT is the query timed out, or | ||
374 | * -EIO if an error occurred sending the query. The resp parameter of | ||
375 | * the callback is only valid if status is 0. | ||
376 | * | 349 | * |
377 | * If the return value of ib_sa_mcmember_rec_delete() is negative, it | 350 | * This call blocks until the multicast identifier is destroyed. It may |
378 | * is an error code. Otherwise it is a query ID that can be used to | 351 | * not be called from within the multicast callback; however, returning a non- |
379 | * cancel the query. | 352 | * zero value from the callback will result in destroying the multicast |
353 | * tracking structure. | ||
354 | */ | ||
355 | void ib_sa_free_multicast(struct ib_sa_multicast *multicast); | ||
356 | |||
357 | /** | ||
358 | * ib_get_mcmember_rec - Looks up a multicast member record by its MGID and | ||
359 | * returns it if found. | ||
360 | * @device: Device associated with the multicast group. | ||
361 | * @port_num: Port on the specified device to associate with the multicast | ||
362 | * group. | ||
363 | * @mgid: MGID of multicast group. | ||
364 | * @rec: Location to copy SA multicast member record. | ||
380 | */ | 365 | */ |
381 | static inline int | 366 | int ib_sa_get_mcmember_rec(struct ib_device *device, u8 port_num, |
382 | ib_sa_mcmember_rec_delete(struct ib_sa_client *client, | 367 | union ib_gid *mgid, struct ib_sa_mcmember_rec *rec); |
383 | struct ib_device *device, u8 port_num, | 368 | |
384 | struct ib_sa_mcmember_rec *rec, | 369 | /** |
385 | ib_sa_comp_mask comp_mask, | 370 | * ib_init_ah_from_mcmember - Initialize address handle attributes based on |
386 | int timeout_ms, gfp_t gfp_mask, | 371 | * an SA multicast member record. |
387 | void (*callback)(int status, | 372 | */ |
388 | struct ib_sa_mcmember_rec *resp, | 373 | int ib_init_ah_from_mcmember(struct ib_device *device, u8 port_num, |
389 | void *context), | 374 | struct ib_sa_mcmember_rec *rec, |
390 | void *context, | 375 | struct ib_ah_attr *ah_attr); |
391 | struct ib_sa_query **query) | ||
392 | { | ||
393 | return ib_sa_mcmember_rec_query(client, device, port_num, | ||
394 | IB_SA_METHOD_DELETE, | ||
395 | rec, comp_mask, | ||
396 | timeout_ms, gfp_mask, callback, | ||
397 | context, query); | ||
398 | } | ||
399 | 376 | ||
400 | /** | 377 | /** |
401 | * ib_init_ah_from_path - Initialize address handle attributes based on an SA | 378 | * ib_init_ah_from_path - Initialize address handle attributes based on an SA |
diff --git a/include/rdma/rdma_cm.h b/include/rdma/rdma_cm.h index 36cd8a8526a0..2d6a7705eae7 100644 --- a/include/rdma/rdma_cm.h +++ b/include/rdma/rdma_cm.h | |||
@@ -52,10 +52,13 @@ enum rdma_cm_event_type { | |||
52 | RDMA_CM_EVENT_ESTABLISHED, | 52 | RDMA_CM_EVENT_ESTABLISHED, |
53 | RDMA_CM_EVENT_DISCONNECTED, | 53 | RDMA_CM_EVENT_DISCONNECTED, |
54 | RDMA_CM_EVENT_DEVICE_REMOVAL, | 54 | RDMA_CM_EVENT_DEVICE_REMOVAL, |
55 | RDMA_CM_EVENT_MULTICAST_JOIN, | ||
56 | RDMA_CM_EVENT_MULTICAST_ERROR | ||
55 | }; | 57 | }; |
56 | 58 | ||
57 | enum rdma_port_space { | 59 | enum rdma_port_space { |
58 | RDMA_PS_SDP = 0x0001, | 60 | RDMA_PS_SDP = 0x0001, |
61 | RDMA_PS_IPOIB= 0x0002, | ||
59 | RDMA_PS_TCP = 0x0106, | 62 | RDMA_PS_TCP = 0x0106, |
60 | RDMA_PS_UDP = 0x0111, | 63 | RDMA_PS_UDP = 0x0111, |
61 | RDMA_PS_SCTP = 0x0183 | 64 | RDMA_PS_SCTP = 0x0183 |
@@ -294,5 +297,21 @@ int rdma_reject(struct rdma_cm_id *id, const void *private_data, | |||
294 | */ | 297 | */ |
295 | int rdma_disconnect(struct rdma_cm_id *id); | 298 | int rdma_disconnect(struct rdma_cm_id *id); |
296 | 299 | ||
297 | #endif /* RDMA_CM_H */ | 300 | /** |
301 | * rdma_join_multicast - Join the multicast group specified by the given | ||
302 | * address. | ||
303 | * @id: Communication identifier associated with the request. | ||
304 | * @addr: Multicast address identifying the group to join. | ||
305 | * @context: User-defined context associated with the join request, returned | ||
306 | * to the user through the private_data pointer in multicast events. | ||
307 | */ | ||
308 | int rdma_join_multicast(struct rdma_cm_id *id, struct sockaddr *addr, | ||
309 | void *context); | ||
298 | 310 | ||
311 | /** | ||
312 | * rdma_leave_multicast - Leave the multicast group specified by the given | ||
313 | * address. | ||
314 | */ | ||
315 | void rdma_leave_multicast(struct rdma_cm_id *id, struct sockaddr *addr); | ||
316 | |||
317 | #endif /* RDMA_CM_H */ | ||
diff --git a/include/rdma/rdma_cm_ib.h b/include/rdma/rdma_cm_ib.h index 9b176df1d667..950424b38f16 100644 --- a/include/rdma/rdma_cm_ib.h +++ b/include/rdma/rdma_cm_ib.h | |||
@@ -44,7 +44,7 @@ | |||
44 | int rdma_set_ib_paths(struct rdma_cm_id *id, | 44 | int rdma_set_ib_paths(struct rdma_cm_id *id, |
45 | struct ib_sa_path_rec *path_rec, int num_paths); | 45 | struct ib_sa_path_rec *path_rec, int num_paths); |
46 | 46 | ||
47 | /* Global qkey for UD QPs and multicast groups. */ | 47 | /* Global qkey for UDP QPs and multicast groups. */ |
48 | #define RDMA_UD_QKEY 0x01234567 | 48 | #define RDMA_UDP_QKEY 0x01234567 |
49 | 49 | ||
50 | #endif /* RDMA_CM_IB_H */ | 50 | #endif /* RDMA_CM_IB_H */ |
diff --git a/include/rdma/rdma_user_cm.h b/include/rdma/rdma_user_cm.h index 9572ab8eeac1..f632b0c007c9 100644 --- a/include/rdma/rdma_user_cm.h +++ b/include/rdma/rdma_user_cm.h | |||
@@ -38,7 +38,7 @@ | |||
38 | #include <rdma/ib_user_verbs.h> | 38 | #include <rdma/ib_user_verbs.h> |
39 | #include <rdma/ib_user_sa.h> | 39 | #include <rdma/ib_user_sa.h> |
40 | 40 | ||
41 | #define RDMA_USER_CM_ABI_VERSION 3 | 41 | #define RDMA_USER_CM_ABI_VERSION 4 |
42 | 42 | ||
43 | #define RDMA_MAX_PRIVATE_DATA 256 | 43 | #define RDMA_MAX_PRIVATE_DATA 256 |
44 | 44 | ||
@@ -58,7 +58,9 @@ enum { | |||
58 | RDMA_USER_CM_CMD_GET_EVENT, | 58 | RDMA_USER_CM_CMD_GET_EVENT, |
59 | RDMA_USER_CM_CMD_GET_OPTION, | 59 | RDMA_USER_CM_CMD_GET_OPTION, |
60 | RDMA_USER_CM_CMD_SET_OPTION, | 60 | RDMA_USER_CM_CMD_SET_OPTION, |
61 | RDMA_USER_CM_CMD_NOTIFY | 61 | RDMA_USER_CM_CMD_NOTIFY, |
62 | RDMA_USER_CM_CMD_JOIN_MCAST, | ||
63 | RDMA_USER_CM_CMD_LEAVE_MCAST | ||
62 | }; | 64 | }; |
63 | 65 | ||
64 | /* | 66 | /* |
@@ -188,6 +190,13 @@ struct rdma_ucm_notify { | |||
188 | __u32 event; | 190 | __u32 event; |
189 | }; | 191 | }; |
190 | 192 | ||
193 | struct rdma_ucm_join_mcast { | ||
194 | __u64 response; /* rdma_ucm_create_id_resp */ | ||
195 | __u64 uid; | ||
196 | struct sockaddr_in6 addr; | ||
197 | __u32 id; | ||
198 | }; | ||
199 | |||
191 | struct rdma_ucm_get_event { | 200 | struct rdma_ucm_get_event { |
192 | __u64 response; | 201 | __u64 response; |
193 | }; | 202 | }; |
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index 0c775fceb675..ad0182ef7809 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h | |||
@@ -323,12 +323,20 @@ struct sas_ha_event { | |||
323 | struct sas_ha_struct *ha; | 323 | struct sas_ha_struct *ha; |
324 | }; | 324 | }; |
325 | 325 | ||
326 | enum sas_ha_state { | ||
327 | SAS_HA_REGISTERED, | ||
328 | SAS_HA_UNREGISTERED | ||
329 | }; | ||
330 | |||
326 | struct sas_ha_struct { | 331 | struct sas_ha_struct { |
327 | /* private: */ | 332 | /* private: */ |
328 | spinlock_t event_lock; | 333 | spinlock_t event_lock; |
329 | struct sas_ha_event ha_events[HA_NUM_EVENTS]; | 334 | struct sas_ha_event ha_events[HA_NUM_EVENTS]; |
330 | unsigned long pending; | 335 | unsigned long pending; |
331 | 336 | ||
337 | enum sas_ha_state state; | ||
338 | spinlock_t state_lock; | ||
339 | |||
332 | struct scsi_core core; | 340 | struct scsi_core core; |
333 | 341 | ||
334 | /* public: */ | 342 | /* public: */ |
@@ -553,15 +561,15 @@ struct sas_task { | |||
553 | #define SAS_TASK_STATE_PENDING 1 | 561 | #define SAS_TASK_STATE_PENDING 1 |
554 | #define SAS_TASK_STATE_DONE 2 | 562 | #define SAS_TASK_STATE_DONE 2 |
555 | #define SAS_TASK_STATE_ABORTED 4 | 563 | #define SAS_TASK_STATE_ABORTED 4 |
556 | #define SAS_TASK_INITIATOR_ABORTED 8 | 564 | #define SAS_TASK_NEED_DEV_RESET 8 |
565 | #define SAS_TASK_AT_INITIATOR 16 | ||
557 | 566 | ||
558 | static inline struct sas_task *sas_alloc_task(gfp_t flags) | 567 | static inline struct sas_task *sas_alloc_task(gfp_t flags) |
559 | { | 568 | { |
560 | extern struct kmem_cache *sas_task_cache; | 569 | extern struct kmem_cache *sas_task_cache; |
561 | struct sas_task *task = kmem_cache_alloc(sas_task_cache, flags); | 570 | struct sas_task *task = kmem_cache_zalloc(sas_task_cache, flags); |
562 | 571 | ||
563 | if (task) { | 572 | if (task) { |
564 | memset(task, 0, sizeof(*task)); | ||
565 | INIT_LIST_HEAD(&task->list); | 573 | INIT_LIST_HEAD(&task->list); |
566 | spin_lock_init(&task->task_state_lock); | 574 | spin_lock_init(&task->task_state_lock); |
567 | task->task_state_flags = SAS_TASK_STATE_PENDING; | 575 | task->task_state_flags = SAS_TASK_STATE_PENDING; |
@@ -613,6 +621,9 @@ struct sas_domain_function_template { | |||
613 | extern int sas_register_ha(struct sas_ha_struct *); | 621 | extern int sas_register_ha(struct sas_ha_struct *); |
614 | extern int sas_unregister_ha(struct sas_ha_struct *); | 622 | extern int sas_unregister_ha(struct sas_ha_struct *); |
615 | 623 | ||
624 | int sas_set_phy_speed(struct sas_phy *phy, | ||
625 | struct sas_phy_linkrates *rates); | ||
626 | int sas_phy_enable(struct sas_phy *phy, int enabled); | ||
616 | int sas_phy_reset(struct sas_phy *phy, int hard_reset); | 627 | int sas_phy_reset(struct sas_phy *phy, int hard_reset); |
617 | extern int sas_queuecommand(struct scsi_cmnd *, | 628 | extern int sas_queuecommand(struct scsi_cmnd *, |
618 | void (*scsi_done)(struct scsi_cmnd *)); | 629 | void (*scsi_done)(struct scsi_cmnd *)); |
@@ -646,6 +657,9 @@ void sas_unregister_dev(struct domain_device *); | |||
646 | 657 | ||
647 | void sas_init_dev(struct domain_device *); | 658 | void sas_init_dev(struct domain_device *); |
648 | 659 | ||
649 | void sas_task_abort(struct work_struct *); | 660 | void sas_task_abort(struct sas_task *); |
661 | int __sas_task_abort(struct sas_task *); | ||
662 | int sas_eh_device_reset_handler(struct scsi_cmnd *cmd); | ||
663 | int sas_eh_bus_reset_handler(struct scsi_cmnd *cmd); | ||
650 | 664 | ||
651 | #endif /* _SASLIB_H_ */ | 665 | #endif /* _SASLIB_H_ */ |
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index ebf31b16dc49..9dd37e2f5a84 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
@@ -122,6 +122,7 @@ struct scsi_device { | |||
122 | unsigned no_uld_attach:1; /* disable connecting to upper level drivers */ | 122 | unsigned no_uld_attach:1; /* disable connecting to upper level drivers */ |
123 | unsigned select_no_atn:1; | 123 | unsigned select_no_atn:1; |
124 | unsigned fix_capacity:1; /* READ_CAPACITY is too high by 1 */ | 124 | unsigned fix_capacity:1; /* READ_CAPACITY is too high by 1 */ |
125 | unsigned guess_capacity:1; /* READ_CAPACITY might be too high by 1 */ | ||
125 | unsigned retry_hwerror:1; /* Retry HARDWARE_ERROR */ | 126 | unsigned retry_hwerror:1; /* Retry HARDWARE_ERROR */ |
126 | 127 | ||
127 | unsigned int device_blocked; /* Device returned QUEUE_FULL. */ | 128 | unsigned int device_blocked; /* Device returned QUEUE_FULL. */ |
diff --git a/include/scsi/scsi_tgt_if.h b/include/scsi/scsi_tgt_if.h index 46d5e70d7215..07d6e77ae895 100644 --- a/include/scsi/scsi_tgt_if.h +++ b/include/scsi/scsi_tgt_if.h | |||
@@ -83,8 +83,5 @@ struct tgt_event { | |||
83 | } __attribute__ ((aligned (sizeof(uint64_t)))); | 83 | } __attribute__ ((aligned (sizeof(uint64_t)))); |
84 | 84 | ||
85 | #define TGT_RING_SIZE (1UL << 16) | 85 | #define TGT_RING_SIZE (1UL << 16) |
86 | #define TGT_RING_PAGES (TGT_RING_SIZE >> PAGE_SHIFT) | ||
87 | #define TGT_EVENT_PER_PAGE (PAGE_SIZE / sizeof(struct tgt_event)) | ||
88 | #define TGT_MAX_EVENTS (TGT_EVENT_PER_PAGE * TGT_RING_PAGES) | ||
89 | 86 | ||
90 | #endif | 87 | #endif |
diff --git a/include/scsi/scsi_transport.h b/include/scsi/scsi_transport.h index cca1d4926d2a..3c18baa65a72 100644 --- a/include/scsi/scsi_transport.h +++ b/include/scsi/scsi_transport.h | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <linux/transport_class.h> | 23 | #include <linux/transport_class.h> |
24 | #include <scsi/scsi_host.h> | 24 | #include <scsi/scsi_host.h> |
25 | #include <scsi/scsi_device.h> | ||
25 | 26 | ||
26 | struct scsi_transport_template { | 27 | struct scsi_transport_template { |
27 | /* the attribute containers */ | 28 | /* the attribute containers */ |
diff --git a/include/scsi/scsi_transport_sas.h b/include/scsi/scsi_transport_sas.h index 59633a82de47..9aedc19820b0 100644 --- a/include/scsi/scsi_transport_sas.h +++ b/include/scsi/scsi_transport_sas.h | |||
@@ -54,6 +54,7 @@ struct sas_identify { | |||
54 | struct sas_phy { | 54 | struct sas_phy { |
55 | struct device dev; | 55 | struct device dev; |
56 | int number; | 56 | int number; |
57 | int enabled; | ||
57 | 58 | ||
58 | /* phy identification */ | 59 | /* phy identification */ |
59 | struct sas_identify identify; | 60 | struct sas_identify identify; |
@@ -163,6 +164,7 @@ struct sas_function_template { | |||
163 | int (*get_enclosure_identifier)(struct sas_rphy *, u64 *); | 164 | int (*get_enclosure_identifier)(struct sas_rphy *, u64 *); |
164 | int (*get_bay_identifier)(struct sas_rphy *); | 165 | int (*get_bay_identifier)(struct sas_rphy *); |
165 | int (*phy_reset)(struct sas_phy *, int); | 166 | int (*phy_reset)(struct sas_phy *, int); |
167 | int (*phy_enable)(struct sas_phy *, int); | ||
166 | int (*set_phy_speed)(struct sas_phy *, struct sas_phy_linkrates *); | 168 | int (*set_phy_speed)(struct sas_phy *, struct sas_phy_linkrates *); |
167 | }; | 169 | }; |
168 | 170 | ||
@@ -180,6 +182,7 @@ extern struct sas_rphy *sas_end_device_alloc(struct sas_port *); | |||
180 | extern struct sas_rphy *sas_expander_alloc(struct sas_port *, enum sas_device_type); | 182 | extern struct sas_rphy *sas_expander_alloc(struct sas_port *, enum sas_device_type); |
181 | void sas_rphy_free(struct sas_rphy *); | 183 | void sas_rphy_free(struct sas_rphy *); |
182 | extern int sas_rphy_add(struct sas_rphy *); | 184 | extern int sas_rphy_add(struct sas_rphy *); |
185 | extern void sas_rphy_remove(struct sas_rphy *); | ||
183 | extern void sas_rphy_delete(struct sas_rphy *); | 186 | extern void sas_rphy_delete(struct sas_rphy *); |
184 | extern int scsi_is_sas_rphy(const struct device *); | 187 | extern int scsi_is_sas_rphy(const struct device *); |
185 | 188 | ||
diff --git a/include/scsi/scsi_transport_spi.h b/include/scsi/scsi_transport_spi.h index da180f738477..286e9628ed8b 100644 --- a/include/scsi/scsi_transport_spi.h +++ b/include/scsi/scsi_transport_spi.h | |||
@@ -85,6 +85,7 @@ struct spi_host_attrs { | |||
85 | #define spi_pcomp_en(x) (((struct spi_transport_attrs *)&(x)->starget_data)->pcomp_en) | 85 | #define spi_pcomp_en(x) (((struct spi_transport_attrs *)&(x)->starget_data)->pcomp_en) |
86 | #define spi_hold_mcs(x) (((struct spi_transport_attrs *)&(x)->starget_data)->hold_mcs) | 86 | #define spi_hold_mcs(x) (((struct spi_transport_attrs *)&(x)->starget_data)->hold_mcs) |
87 | #define spi_initial_dv(x) (((struct spi_transport_attrs *)&(x)->starget_data)->initial_dv) | 87 | #define spi_initial_dv(x) (((struct spi_transport_attrs *)&(x)->starget_data)->initial_dv) |
88 | #define spi_dv_pending(x) (((struct spi_transport_attrs *)&(x)->starget_data)->dv_pending) | ||
88 | 89 | ||
89 | #define spi_support_sync(x) (((struct spi_transport_attrs *)&(x)->starget_data)->support_sync) | 90 | #define spi_support_sync(x) (((struct spi_transport_attrs *)&(x)->starget_data)->support_sync) |
90 | #define spi_support_wide(x) (((struct spi_transport_attrs *)&(x)->starget_data)->support_wide) | 91 | #define spi_support_wide(x) (((struct spi_transport_attrs *)&(x)->starget_data)->support_wide) |
diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h index eb7ce96ddf3a..23e45a4cf0e4 100644 --- a/include/sound/emu10k1.h +++ b/include/sound/emu10k1.h | |||
@@ -628,7 +628,7 @@ | |||
628 | #define FXWC_SPDIFLEFT (1<<22) /* 0x00400000 */ | 628 | #define FXWC_SPDIFLEFT (1<<22) /* 0x00400000 */ |
629 | #define FXWC_SPDIFRIGHT (1<<23) /* 0x00800000 */ | 629 | #define FXWC_SPDIFRIGHT (1<<23) /* 0x00800000 */ |
630 | 630 | ||
631 | #define A_TBLSZ ` 0x43 /* Effects Tank Internal Table Size. Only low byte or register used */ | 631 | #define A_TBLSZ 0x43 /* Effects Tank Internal Table Size. Only low byte or register used */ |
632 | 632 | ||
633 | #define TCBS 0x44 /* Tank cache buffer size register */ | 633 | #define TCBS 0x44 /* Tank cache buffer size register */ |
634 | #define TCBS_MASK 0x00000007 /* Tank cache buffer size field */ | 634 | #define TCBS_MASK 0x00000007 /* Tank cache buffer size field */ |
diff --git a/include/sound/pcm.h b/include/sound/pcm.h index ee6bc2d06803..deff5a92efa6 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h | |||
@@ -447,7 +447,7 @@ struct snd_pcm_notify { | |||
447 | * Registering | 447 | * Registering |
448 | */ | 448 | */ |
449 | 449 | ||
450 | extern struct file_operations snd_pcm_f_ops[2]; | 450 | extern const struct file_operations snd_pcm_f_ops[2]; |
451 | 451 | ||
452 | int snd_pcm_new(struct snd_card *card, char *id, int device, | 452 | int snd_pcm_new(struct snd_card *card, char *id, int device, |
453 | int playback_count, int capture_count, | 453 | int playback_count, int capture_count, |
diff --git a/include/sound/version.h b/include/sound/version.h index c39b3802cf18..a9ba7ee69939 100644 --- a/include/sound/version.h +++ b/include/sound/version.h | |||
@@ -1,3 +1,3 @@ | |||
1 | /* include/version.h. Generated by alsa/ksync script. */ | 1 | /* include/version.h. Generated by alsa/ksync script. */ |
2 | #define CONFIG_SND_VERSION "1.0.14rc2" | 2 | #define CONFIG_SND_VERSION "1.0.14rc2" |
3 | #define CONFIG_SND_DATE " (Fri Feb 09 13:50:10 2007 UTC)" | 3 | #define CONFIG_SND_DATE " (Wed Feb 14 07:42:13 2007 UTC)" |
diff --git a/include/video/neomagic.h b/include/video/neomagic.h index 78b1f15a538f..a9e118a1cd16 100644 --- a/include/video/neomagic.h +++ b/include/video/neomagic.h | |||
@@ -140,7 +140,8 @@ typedef volatile struct { | |||
140 | 140 | ||
141 | struct neofb_par { | 141 | struct neofb_par { |
142 | struct vgastate state; | 142 | struct vgastate state; |
143 | atomic_t ref_count; | 143 | struct mutex open_lock; |
144 | unsigned int ref_count; | ||
144 | 145 | ||
145 | unsigned char MiscOutReg; /* Misc */ | 146 | unsigned char MiscOutReg; /* Misc */ |
146 | unsigned char CRTC[25]; /* Crtc Controller */ | 147 | unsigned char CRTC[25]; /* Crtc Controller */ |
diff --git a/include/video/s3blit.h b/include/video/s3blit.h deleted file mode 100644 index b1db63187b4e..000000000000 --- a/include/video/s3blit.h +++ /dev/null | |||
@@ -1,79 +0,0 @@ | |||
1 | #ifndef _VIDEO_S3BLIT_H | ||
2 | #define _VIDEO_S3BLIT_H | ||
3 | |||
4 | /* s3 commands */ | ||
5 | #define S3_BITBLT 0xc011 | ||
6 | #define S3_TWOPOINTLINE 0x2811 | ||
7 | #define S3_FILLEDRECT 0x40b1 | ||
8 | |||
9 | #define S3_FIFO_EMPTY 0x0400 | ||
10 | #define S3_HDW_BUSY 0x0200 | ||
11 | |||
12 | /* Enhanced register mapping (MMIO mode) */ | ||
13 | |||
14 | #define S3_READ_SEL 0xbee8 /* offset f */ | ||
15 | #define S3_MULT_MISC 0xbee8 /* offset e */ | ||
16 | #define S3_ERR_TERM 0x92e8 | ||
17 | #define S3_FRGD_COLOR 0xa6e8 | ||
18 | #define S3_BKGD_COLOR 0xa2e8 | ||
19 | #define S3_PIXEL_CNTL 0xbee8 /* offset a */ | ||
20 | #define S3_FRGD_MIX 0xbae8 | ||
21 | #define S3_BKGD_MIX 0xb6e8 | ||
22 | #define S3_CUR_Y 0x82e8 | ||
23 | #define S3_CUR_X 0x86e8 | ||
24 | #define S3_DESTY_AXSTP 0x8ae8 | ||
25 | #define S3_DESTX_DIASTP 0x8ee8 | ||
26 | #define S3_MIN_AXIS_PCNT 0xbee8 /* offset 0 */ | ||
27 | #define S3_MAJ_AXIS_PCNT 0x96e8 | ||
28 | #define S3_CMD 0x9ae8 | ||
29 | #define S3_GP_STAT 0x9ae8 | ||
30 | #define S3_ADVFUNC_CNTL 0x4ae8 | ||
31 | #define S3_WRT_MASK 0xaae8 | ||
32 | #define S3_RD_MASK 0xaee8 | ||
33 | |||
34 | /* Enhanced register mapping (Packed MMIO mode, write only) */ | ||
35 | #define S3_ALT_CURXY 0x8100 | ||
36 | #define S3_ALT_CURXY2 0x8104 | ||
37 | #define S3_ALT_STEP 0x8108 | ||
38 | #define S3_ALT_STEP2 0x810c | ||
39 | #define S3_ALT_ERR 0x8110 | ||
40 | #define S3_ALT_CMD 0x8118 | ||
41 | #define S3_ALT_MIX 0x8134 | ||
42 | #define S3_ALT_PCNT 0x8148 | ||
43 | #define S3_ALT_PAT 0x8168 | ||
44 | |||
45 | /* Drawing modes */ | ||
46 | #define S3_NOTCUR 0x0000 | ||
47 | #define S3_LOGICALZERO 0x0001 | ||
48 | #define S3_LOGICALONE 0x0002 | ||
49 | #define S3_LEAVEASIS 0x0003 | ||
50 | #define S3_NOTNEW 0x0004 | ||
51 | #define S3_CURXORNEW 0x0005 | ||
52 | #define S3_NOT_CURXORNEW 0x0006 | ||
53 | #define S3_NEW 0x0007 | ||
54 | #define S3_NOTCURORNOTNEW 0x0008 | ||
55 | #define S3_CURORNOTNEW 0x0009 | ||
56 | #define S3_NOTCURORNEW 0x000a | ||
57 | #define S3_CURORNEW 0x000b | ||
58 | #define S3_CURANDNEW 0x000c | ||
59 | #define S3_NOTCURANDNEW 0x000d | ||
60 | #define S3_CURANDNOTNEW 0x000e | ||
61 | #define S3_NOTCURANDNOTNEW 0x000f | ||
62 | |||
63 | #define S3_CRTC_ADR 0x03d4 | ||
64 | #define S3_CRTC_DATA 0x03d5 | ||
65 | |||
66 | #define S3_REG_LOCK2 0x39 | ||
67 | #define S3_HGC_MODE 0x45 | ||
68 | |||
69 | #define S3_HWGC_ORGX_H 0x46 | ||
70 | #define S3_HWGC_ORGX_L 0x47 | ||
71 | #define S3_HWGC_ORGY_H 0x48 | ||
72 | #define S3_HWGC_ORGY_L 0x49 | ||
73 | #define S3_HWGC_DX 0x4e | ||
74 | #define S3_HWGC_DY 0x4f | ||
75 | |||
76 | |||
77 | #define S3_LAW_CTL 0x58 | ||
78 | |||
79 | #endif /* _VIDEO_S3BLIT_H */ | ||