diff options
Diffstat (limited to 'include')
286 files changed, 1536 insertions, 9819 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 5e3dcf3299bf..3d0fea235bf3 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
@@ -131,7 +131,7 @@ struct acpi_device_ops { | |||
131 | struct acpi_driver { | 131 | struct acpi_driver { |
132 | char name[80]; | 132 | char name[80]; |
133 | char class[80]; | 133 | char class[80]; |
134 | char *ids; /* Supported Hardware IDs */ | 134 | const struct acpi_device_id *ids; /* Supported Hardware IDs */ |
135 | struct acpi_device_ops ops; | 135 | struct acpi_device_ops ops; |
136 | struct device_driver drv; | 136 | struct device_driver drv; |
137 | struct module *owner; | 137 | struct module *owner; |
@@ -341,7 +341,8 @@ int acpi_bus_add(struct acpi_device **child, struct acpi_device *parent, | |||
341 | int acpi_bus_trim(struct acpi_device *start, int rmdevice); | 341 | int acpi_bus_trim(struct acpi_device *start, int rmdevice); |
342 | int acpi_bus_start(struct acpi_device *device); | 342 | int acpi_bus_start(struct acpi_device *device); |
343 | acpi_status acpi_bus_get_ejd(acpi_handle handle, acpi_handle * ejd); | 343 | acpi_status acpi_bus_get_ejd(acpi_handle handle, acpi_handle * ejd); |
344 | int acpi_match_ids(struct acpi_device *device, char *ids); | 344 | int acpi_match_device_ids(struct acpi_device *device, |
345 | const struct acpi_device_id *ids); | ||
345 | int acpi_create_dir(struct acpi_device *); | 346 | int acpi_create_dir(struct acpi_device *); |
346 | void acpi_remove_dir(struct acpi_device *); | 347 | void acpi_remove_dir(struct acpi_device *); |
347 | 348 | ||
@@ -365,6 +366,17 @@ acpi_handle acpi_get_child(acpi_handle, acpi_integer); | |||
365 | acpi_handle acpi_get_pci_rootbridge_handle(unsigned int, unsigned int); | 366 | acpi_handle acpi_get_pci_rootbridge_handle(unsigned int, unsigned int); |
366 | #define DEVICE_ACPI_HANDLE(dev) ((acpi_handle)((dev)->archdata.acpi_handle)) | 367 | #define DEVICE_ACPI_HANDLE(dev) ((acpi_handle)((dev)->archdata.acpi_handle)) |
367 | 368 | ||
369 | #ifdef CONFIG_PM_SLEEP | ||
370 | int acpi_pm_device_sleep_state(struct device *, int, int *); | ||
371 | #else /* !CONFIG_PM_SLEEP */ | ||
372 | static inline int acpi_pm_device_sleep_state(struct device *d, int w, int *p) | ||
373 | { | ||
374 | if (p) | ||
375 | *p = ACPI_STATE_D0; | ||
376 | return ACPI_STATE_D3; | ||
377 | } | ||
378 | #endif /* !CONFIG_PM_SLEEP */ | ||
379 | |||
368 | #endif /* CONFIG_ACPI */ | 380 | #endif /* CONFIG_ACPI */ |
369 | 381 | ||
370 | #endif /*__ACPI_BUS_H__*/ | 382 | #endif /*__ACPI_BUS_H__*/ |
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h index 553515912c0b..202acb9ff4d0 100644 --- a/include/acpi/acpi_drivers.h +++ b/include/acpi/acpi_drivers.h | |||
@@ -34,16 +34,21 @@ | |||
34 | #define ACPI_BUS_COMPONENT 0x00010000 | 34 | #define ACPI_BUS_COMPONENT 0x00010000 |
35 | #define ACPI_SYSTEM_COMPONENT 0x02000000 | 35 | #define ACPI_SYSTEM_COMPONENT 0x02000000 |
36 | 36 | ||
37 | /* _HID definitions */ | 37 | /* |
38 | * _HID definitions | ||
39 | * HIDs must conform to ACPI spec(6.1.4) | ||
40 | * Linux specific HIDs do not apply to this and begin with LNX: | ||
41 | */ | ||
38 | 42 | ||
39 | #define ACPI_POWER_HID "power_resource" | 43 | #define ACPI_POWER_HID "LNXPOWER" |
40 | #define ACPI_PROCESSOR_HID "ACPI0007" | 44 | #define ACPI_PROCESSOR_HID "ACPI0007" |
41 | #define ACPI_SYSTEM_HID "acpi_system" | 45 | #define ACPI_SYSTEM_HID "LNXSYSTM" |
42 | #define ACPI_THERMAL_HID "thermal" | 46 | #define ACPI_THERMAL_HID "LNXTHERM" |
43 | #define ACPI_BUTTON_HID_POWERF "button_power" | 47 | #define ACPI_BUTTON_HID_POWERF "LNXPWRBN" |
44 | #define ACPI_BUTTON_HID_SLEEPF "button_sleep" | 48 | #define ACPI_BUTTON_HID_SLEEPF "LNXSLPBN" |
45 | #define ACPI_VIDEO_HID "video" | 49 | #define ACPI_VIDEO_HID "LNXVIDEO" |
46 | #define ACPI_BAY_HID "bay" | 50 | #define ACPI_BAY_HID "LNXIOBAY" |
51 | |||
47 | /* -------------------------------------------------------------------------- | 52 | /* -------------------------------------------------------------------------- |
48 | PCI | 53 | PCI |
49 | -------------------------------------------------------------------------- */ | 54 | -------------------------------------------------------------------------- */ |
@@ -145,7 +150,7 @@ static inline void unregister_hotplug_dock_device(acpi_handle handle) | |||
145 | #ifdef CONFIG_ACPI_SLEEP | 150 | #ifdef CONFIG_ACPI_SLEEP |
146 | extern int acpi_sleep_init(void); | 151 | extern int acpi_sleep_init(void); |
147 | #else | 152 | #else |
148 | #define acpi_sleep_init() do {} while (0) | 153 | static inline int acpi_sleep_init(void) { return 0; } |
149 | #endif | 154 | #endif |
150 | 155 | ||
151 | #endif /*__ACPI_DRIVERS_H__*/ | 156 | #endif /*__ACPI_DRIVERS_H__*/ |
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index fe8abc276437..e73a38939120 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h | |||
@@ -809,7 +809,7 @@ acpi_status(*acpi_walk_callback) (acpi_handle obj_handle, | |||
809 | 809 | ||
810 | /* Common string version of device HIDs and UIDs */ | 810 | /* Common string version of device HIDs and UIDs */ |
811 | 811 | ||
812 | struct acpi_device_id { | 812 | struct acpica_device_id { |
813 | char value[ACPI_DEVICE_ID_LENGTH]; | 813 | char value[ACPI_DEVICE_ID_LENGTH]; |
814 | }; | 814 | }; |
815 | 815 | ||
@@ -859,8 +859,8 @@ struct acpi_device_info { | |||
859 | u32 valid; /* Indicates which fields below are valid */ | 859 | u32 valid; /* Indicates which fields below are valid */ |
860 | u32 current_status; /* _STA value */ | 860 | u32 current_status; /* _STA value */ |
861 | acpi_integer address; /* _ADR value if any */ | 861 | acpi_integer address; /* _ADR value if any */ |
862 | struct acpi_device_id hardware_id; /* _HID value if any */ | 862 | struct acpica_device_id hardware_id; /* _HID value if any */ |
863 | struct acpi_device_id unique_id; /* _UID value if any */ | 863 | struct acpica_device_id unique_id; /* _UID value if any */ |
864 | u8 highest_dstates[4]; /* _sx_d values: 0xFF indicates not valid */ | 864 | u8 highest_dstates[4]; /* _sx_d values: 0xFF indicates not valid */ |
865 | struct acpi_compatible_id_list compatibility_id; /* List of _CIDs if any */ | 865 | struct acpi_compatible_id_list compatibility_id; /* List of _CIDs if any */ |
866 | }; | 866 | }; |
diff --git a/include/acpi/acutils.h b/include/acpi/acutils.h index a87ef1c8d46b..a2918547c73f 100644 --- a/include/acpi/acutils.h +++ b/include/acpi/acutils.h | |||
@@ -354,7 +354,7 @@ acpi_ut_evaluate_numeric_object(char *object_name, | |||
354 | 354 | ||
355 | acpi_status | 355 | acpi_status |
356 | acpi_ut_execute_HID(struct acpi_namespace_node *device_node, | 356 | acpi_ut_execute_HID(struct acpi_namespace_node *device_node, |
357 | struct acpi_device_id *hid); | 357 | struct acpica_device_id *hid); |
358 | 358 | ||
359 | acpi_status | 359 | acpi_status |
360 | acpi_ut_execute_CID(struct acpi_namespace_node *device_node, | 360 | acpi_ut_execute_CID(struct acpi_namespace_node *device_node, |
@@ -366,7 +366,7 @@ acpi_ut_execute_STA(struct acpi_namespace_node *device_node, | |||
366 | 366 | ||
367 | acpi_status | 367 | acpi_status |
368 | acpi_ut_execute_UID(struct acpi_namespace_node *device_node, | 368 | acpi_ut_execute_UID(struct acpi_namespace_node *device_node, |
369 | struct acpi_device_id *uid); | 369 | struct acpica_device_id *uid); |
370 | 370 | ||
371 | acpi_status | 371 | acpi_status |
372 | acpi_ut_execute_sxds(struct acpi_namespace_node *device_node, u8 * highest); | 372 | acpi_ut_execute_sxds(struct acpi_namespace_node *device_node, u8 * highest); |
diff --git a/include/asm-alpha/bitops.h b/include/asm-alpha/bitops.h index 3a0cbeb03fa1..9e71201000d5 100644 --- a/include/asm-alpha/bitops.h +++ b/include/asm-alpha/bitops.h | |||
@@ -324,7 +324,7 @@ static inline int fls64(unsigned long x) | |||
324 | { | 324 | { |
325 | unsigned long t, a, r; | 325 | unsigned long t, a, r; |
326 | 326 | ||
327 | t = __kernel_cmpbge (x, 0x0101010101010101); | 327 | t = __kernel_cmpbge (x, 0x0101010101010101UL); |
328 | a = __flsm1_tab[t]; | 328 | a = __flsm1_tab[t]; |
329 | t = __kernel_extbl (x, a); | 329 | t = __kernel_extbl (x, a); |
330 | r = a*8 + __flsm1_tab[t] + (x != 0); | 330 | r = a*8 + __flsm1_tab[t] + (x != 0); |
diff --git a/include/asm-alpha/thread_info.h b/include/asm-alpha/thread_info.h index 48a22e3e6f32..fb3185196298 100644 --- a/include/asm-alpha/thread_info.h +++ b/include/asm-alpha/thread_info.h | |||
@@ -67,28 +67,24 @@ register struct thread_info *__current_thread_info __asm__("$8"); | |||
67 | * TIF_SYSCALL_TRACE is known to be 0 via blbs. | 67 | * TIF_SYSCALL_TRACE is known to be 0 via blbs. |
68 | */ | 68 | */ |
69 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ | 69 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ |
70 | #define TIF_NOTIFY_RESUME 1 /* resumption notification requested */ | 70 | #define TIF_SIGPENDING 1 /* signal pending */ |
71 | #define TIF_SIGPENDING 2 /* signal pending */ | 71 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ |
72 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ | 72 | #define TIF_POLLING_NRFLAG 3 /* poll_idle is polling NEED_RESCHED */ |
73 | #define TIF_POLLING_NRFLAG 4 /* poll_idle is polling NEED_RESCHED */ | 73 | #define TIF_DIE_IF_KERNEL 4 /* dik recursion lock */ |
74 | #define TIF_DIE_IF_KERNEL 5 /* dik recursion lock */ | 74 | #define TIF_UAC_NOPRINT 5 /* see sysinfo.h */ |
75 | #define TIF_UAC_NOPRINT 6 /* see sysinfo.h */ | 75 | #define TIF_UAC_NOFIX 6 |
76 | #define TIF_UAC_NOFIX 7 | 76 | #define TIF_UAC_SIGBUS 7 |
77 | #define TIF_UAC_SIGBUS 8 | 77 | #define TIF_MEMDIE 8 |
78 | #define TIF_MEMDIE 9 | 78 | #define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal */ |
79 | #define TIF_RESTORE_SIGMASK 10 /* restore signal mask in do_signal */ | ||
80 | 79 | ||
81 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 80 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
82 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | ||
83 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | 81 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) |
84 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 82 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
85 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 83 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
86 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | 84 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) |
87 | 85 | ||
88 | /* Work to do on interrupt/exception return. */ | 86 | /* Work to do on interrupt/exception return. */ |
89 | #define _TIF_WORK_MASK (_TIF_NOTIFY_RESUME \ | 87 | #define _TIF_WORK_MASK (_TIF_SIGPENDING | _TIF_NEED_RESCHED) |
90 | | _TIF_SIGPENDING \ | ||
91 | | _TIF_NEED_RESCHED) | ||
92 | 88 | ||
93 | /* Work to do on any return to userspace. */ | 89 | /* Work to do on any return to userspace. */ |
94 | #define _TIF_ALLWORK_MASK (_TIF_WORK_MASK \ | 90 | #define _TIF_ALLWORK_MASK (_TIF_WORK_MASK \ |
diff --git a/include/asm-arm/arch-mxc/uncompress.h b/include/asm-arm/arch-mxc/uncompress.h index ec5787d0e78c..42cc0cb3fefd 100644 --- a/include/asm-arm/arch-mxc/uncompress.h +++ b/include/asm-arm/arch-mxc/uncompress.h | |||
@@ -26,7 +26,6 @@ | |||
26 | #define __MXC_BOOT_UNCOMPRESS | 26 | #define __MXC_BOOT_UNCOMPRESS |
27 | 27 | ||
28 | #include <asm/hardware.h> | 28 | #include <asm/hardware.h> |
29 | #include <asm/processor.h> | ||
30 | 29 | ||
31 | #define UART(x) (*(volatile unsigned long *)(serial_port + (x))) | 30 | #define UART(x) (*(volatile unsigned long *)(serial_port + (x))) |
32 | 31 | ||
@@ -62,7 +61,7 @@ static void putc(int ch) | |||
62 | } | 61 | } |
63 | 62 | ||
64 | while (!(UART(USR2) & USR2_TXFE)) | 63 | while (!(UART(USR2) & USR2_TXFE)) |
65 | cpu_relax(); | 64 | barrier(); |
66 | 65 | ||
67 | UART(TXR) = ch; | 66 | UART(TXR) = ch; |
68 | } | 67 | } |
diff --git a/include/asm-arm/arch-omap/mailbox.h b/include/asm-arm/arch-omap/mailbox.h index 4bf0909461f2..7cbed9332e16 100644 --- a/include/asm-arm/arch-omap/mailbox.h +++ b/include/asm-arm/arch-omap/mailbox.h | |||
@@ -37,7 +37,7 @@ struct omap_mbox_ops { | |||
37 | 37 | ||
38 | struct omap_mbox_queue { | 38 | struct omap_mbox_queue { |
39 | spinlock_t lock; | 39 | spinlock_t lock; |
40 | request_queue_t *queue; | 40 | struct request_queue *queue; |
41 | struct work_struct work; | 41 | struct work_struct work; |
42 | int (*callback)(void *); | 42 | int (*callback)(void *); |
43 | struct omap_mbox *mbox; | 43 | struct omap_mbox *mbox; |
diff --git a/include/asm-arm/thread_info.h b/include/asm-arm/thread_info.h index 69c65d56a6ac..41784357a204 100644 --- a/include/asm-arm/thread_info.h +++ b/include/asm-arm/thread_info.h | |||
@@ -134,22 +134,19 @@ extern void iwmmxt_task_switch(struct thread_info *); | |||
134 | /* | 134 | /* |
135 | * thread information flags: | 135 | * thread information flags: |
136 | * TIF_SYSCALL_TRACE - syscall trace active | 136 | * TIF_SYSCALL_TRACE - syscall trace active |
137 | * TIF_NOTIFY_RESUME - resumption notification requested | ||
138 | * TIF_SIGPENDING - signal pending | 137 | * TIF_SIGPENDING - signal pending |
139 | * TIF_NEED_RESCHED - rescheduling necessary | 138 | * TIF_NEED_RESCHED - rescheduling necessary |
140 | * TIF_USEDFPU - FPU was used by this task this quantum (SMP) | 139 | * TIF_USEDFPU - FPU was used by this task this quantum (SMP) |
141 | * TIF_POLLING_NRFLAG - true if poll_idle() is polling TIF_NEED_RESCHED | 140 | * TIF_POLLING_NRFLAG - true if poll_idle() is polling TIF_NEED_RESCHED |
142 | */ | 141 | */ |
143 | #define TIF_NOTIFY_RESUME 0 | 142 | #define TIF_SIGPENDING 0 |
144 | #define TIF_SIGPENDING 1 | 143 | #define TIF_NEED_RESCHED 1 |
145 | #define TIF_NEED_RESCHED 2 | ||
146 | #define TIF_SYSCALL_TRACE 8 | 144 | #define TIF_SYSCALL_TRACE 8 |
147 | #define TIF_POLLING_NRFLAG 16 | 145 | #define TIF_POLLING_NRFLAG 16 |
148 | #define TIF_USING_IWMMXT 17 | 146 | #define TIF_USING_IWMMXT 17 |
149 | #define TIF_MEMDIE 18 | 147 | #define TIF_MEMDIE 18 |
150 | #define TIF_FREEZE 19 | 148 | #define TIF_FREEZE 19 |
151 | 149 | ||
152 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) | ||
153 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) | 150 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) |
154 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) | 151 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) |
155 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) | 152 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) |
diff --git a/include/asm-arm/unaligned.h b/include/asm-arm/unaligned.h index 795b9e5b9e6a..8431f6eed5c6 100644 --- a/include/asm-arm/unaligned.h +++ b/include/asm-arm/unaligned.h | |||
@@ -60,24 +60,24 @@ extern int __bug_unaligned_x(const void *ptr); | |||
60 | __get_unaligned_4_be((__p+4))) | 60 | __get_unaligned_4_be((__p+4))) |
61 | 61 | ||
62 | #define __get_unaligned_le(ptr) \ | 62 | #define __get_unaligned_le(ptr) \ |
63 | ({ \ | 63 | ((__force typeof(*(ptr)))({ \ |
64 | const __u8 *__p = (const __u8 *)(ptr); \ | 64 | const __u8 *__p = (const __u8 *)(ptr); \ |
65 | __builtin_choose_expr(sizeof(*(ptr)) == 1, *__p, \ | 65 | __builtin_choose_expr(sizeof(*(ptr)) == 1, *__p, \ |
66 | __builtin_choose_expr(sizeof(*(ptr)) == 2, __get_unaligned_2_le(__p), \ | 66 | __builtin_choose_expr(sizeof(*(ptr)) == 2, __get_unaligned_2_le(__p), \ |
67 | __builtin_choose_expr(sizeof(*(ptr)) == 4, __get_unaligned_4_le(__p), \ | 67 | __builtin_choose_expr(sizeof(*(ptr)) == 4, __get_unaligned_4_le(__p), \ |
68 | __builtin_choose_expr(sizeof(*(ptr)) == 8, __get_unaligned_8_le(__p), \ | 68 | __builtin_choose_expr(sizeof(*(ptr)) == 8, __get_unaligned_8_le(__p), \ |
69 | (void)__bug_unaligned_x(__p))))); \ | 69 | (void)__bug_unaligned_x(__p))))); \ |
70 | }) | 70 | })) |
71 | 71 | ||
72 | #define __get_unaligned_be(ptr) \ | 72 | #define __get_unaligned_be(ptr) \ |
73 | ({ \ | 73 | ((__force typeof(*(ptr)))({ \ |
74 | const __u8 *__p = (const __u8 *)(ptr); \ | 74 | const __u8 *__p = (const __u8 *)(ptr); \ |
75 | __builtin_choose_expr(sizeof(*(ptr)) == 1, *__p, \ | 75 | __builtin_choose_expr(sizeof(*(ptr)) == 1, *__p, \ |
76 | __builtin_choose_expr(sizeof(*(ptr)) == 2, __get_unaligned_2_be(__p), \ | 76 | __builtin_choose_expr(sizeof(*(ptr)) == 2, __get_unaligned_2_be(__p), \ |
77 | __builtin_choose_expr(sizeof(*(ptr)) == 4, __get_unaligned_4_be(__p), \ | 77 | __builtin_choose_expr(sizeof(*(ptr)) == 4, __get_unaligned_4_be(__p), \ |
78 | __builtin_choose_expr(sizeof(*(ptr)) == 8, __get_unaligned_8_be(__p), \ | 78 | __builtin_choose_expr(sizeof(*(ptr)) == 8, __get_unaligned_8_be(__p), \ |
79 | (void)__bug_unaligned_x(__p))))); \ | 79 | (void)__bug_unaligned_x(__p))))); \ |
80 | }) | 80 | })) |
81 | 81 | ||
82 | 82 | ||
83 | static inline void __put_unaligned_2_le(__u32 __v, register __u8 *__p) | 83 | static inline void __put_unaligned_2_le(__u32 __v, register __u8 *__p) |
@@ -131,15 +131,16 @@ static inline void __put_unaligned_8_be(const unsigned long long __v, register _ | |||
131 | */ | 131 | */ |
132 | #define __put_unaligned_le(val,ptr) \ | 132 | #define __put_unaligned_le(val,ptr) \ |
133 | ({ \ | 133 | ({ \ |
134 | (void)sizeof(*(ptr) = (val)); \ | ||
134 | switch (sizeof(*(ptr))) { \ | 135 | switch (sizeof(*(ptr))) { \ |
135 | case 1: \ | 136 | case 1: \ |
136 | *(ptr) = (val); \ | 137 | *(ptr) = (val); \ |
137 | break; \ | 138 | break; \ |
138 | case 2: __put_unaligned_2_le((val),(__u8 *)(ptr)); \ | 139 | case 2: __put_unaligned_2_le((__force u16)(val),(__u8 *)(ptr)); \ |
139 | break; \ | 140 | break; \ |
140 | case 4: __put_unaligned_4_le((val),(__u8 *)(ptr)); \ | 141 | case 4: __put_unaligned_4_le((__force u32)(val),(__u8 *)(ptr)); \ |
141 | break; \ | 142 | break; \ |
142 | case 8: __put_unaligned_8_le((val),(__u8 *)(ptr)); \ | 143 | case 8: __put_unaligned_8_le((__force u64)(val),(__u8 *)(ptr)); \ |
143 | break; \ | 144 | break; \ |
144 | default: __bug_unaligned_x(ptr); \ | 145 | default: __bug_unaligned_x(ptr); \ |
145 | break; \ | 146 | break; \ |
@@ -149,15 +150,16 @@ static inline void __put_unaligned_8_be(const unsigned long long __v, register _ | |||
149 | 150 | ||
150 | #define __put_unaligned_be(val,ptr) \ | 151 | #define __put_unaligned_be(val,ptr) \ |
151 | ({ \ | 152 | ({ \ |
153 | (void)sizeof(*(ptr) = (val)); \ | ||
152 | switch (sizeof(*(ptr))) { \ | 154 | switch (sizeof(*(ptr))) { \ |
153 | case 1: \ | 155 | case 1: \ |
154 | *(ptr) = (val); \ | 156 | *(ptr) = (val); \ |
155 | break; \ | 157 | break; \ |
156 | case 2: __put_unaligned_2_be((val),(__u8 *)(ptr)); \ | 158 | case 2: __put_unaligned_2_be((__force u16)(val),(__u8 *)(ptr)); \ |
157 | break; \ | 159 | break; \ |
158 | case 4: __put_unaligned_4_be((val),(__u8 *)(ptr)); \ | 160 | case 4: __put_unaligned_4_be((__force u32)(val),(__u8 *)(ptr)); \ |
159 | break; \ | 161 | break; \ |
160 | case 8: __put_unaligned_8_be((val),(__u8 *)(ptr)); \ | 162 | case 8: __put_unaligned_8_be((__force u64)(val),(__u8 *)(ptr)); \ |
161 | break; \ | 163 | break; \ |
162 | default: __bug_unaligned_x(ptr); \ | 164 | default: __bug_unaligned_x(ptr); \ |
163 | break; \ | 165 | break; \ |
diff --git a/include/asm-arm26/a.out.h b/include/asm-arm26/a.out.h deleted file mode 100644 index 7167f54ae3fc..000000000000 --- a/include/asm-arm26/a.out.h +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | #ifndef __ARM_A_OUT_H__ | ||
2 | #define __ARM_A_OUT_H__ | ||
3 | |||
4 | #include <linux/personality.h> | ||
5 | #include <asm/types.h> | ||
6 | |||
7 | struct exec | ||
8 | { | ||
9 | __u32 a_info; /* Use macros N_MAGIC, etc for access */ | ||
10 | __u32 a_text; /* length of text, in bytes */ | ||
11 | __u32 a_data; /* length of data, in bytes */ | ||
12 | __u32 a_bss; /* length of uninitialized data area for file, in bytes */ | ||
13 | __u32 a_syms; /* length of symbol table data in file, in bytes */ | ||
14 | __u32 a_entry; /* start address */ | ||
15 | __u32 a_trsize; /* length of relocation info for text, in bytes */ | ||
16 | __u32 a_drsize; /* length of relocation info for data, in bytes */ | ||
17 | }; | ||
18 | |||
19 | /* | ||
20 | * This is always the same | ||
21 | */ | ||
22 | #define N_TXTADDR(a) (0x00008000) | ||
23 | |||
24 | #define N_TRSIZE(a) ((a).a_trsize) | ||
25 | #define N_DRSIZE(a) ((a).a_drsize) | ||
26 | #define N_SYMSIZE(a) ((a).a_syms) | ||
27 | |||
28 | #define M_ARM 103 | ||
29 | |||
30 | #ifdef __KERNEL__ | ||
31 | #define STACK_TOP TASK_SIZE | ||
32 | #define STACK_TOP_MAX STACK_TOP | ||
33 | #endif | ||
34 | |||
35 | #ifndef LIBRARY_START_TEXT | ||
36 | #define LIBRARY_START_TEXT (0x00c00000) | ||
37 | #endif | ||
38 | |||
39 | #endif /* __A_OUT_GNU_H__ */ | ||
diff --git a/include/asm-arm26/assembler.h b/include/asm-arm26/assembler.h deleted file mode 100644 index bb507a9a4a55..000000000000 --- a/include/asm-arm26/assembler.h +++ /dev/null | |||
@@ -1,106 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm26/assembler.h | ||
3 | * | ||
4 | * This file contains arm architecture specific defines | ||
5 | * for the different processors. | ||
6 | * | ||
7 | * Do not include any C declarations in this file - it is included by | ||
8 | * assembler source. | ||
9 | */ | ||
10 | #ifndef __ASSEMBLY__ | ||
11 | #error "Only include this from assembly code" | ||
12 | #endif | ||
13 | |||
14 | /* | ||
15 | * Endian independent macros for shifting bytes within registers. | ||
16 | */ | ||
17 | #define pull lsr | ||
18 | #define push lsl | ||
19 | #define byte(x) (x*8) | ||
20 | |||
21 | #ifdef __STDC__ | ||
22 | #define LOADREGS(cond, base, reglist...)\ | ||
23 | ldm##cond base,reglist^ | ||
24 | |||
25 | #define RETINSTR(instr, regs...)\ | ||
26 | instr##s regs | ||
27 | #else | ||
28 | #define LOADREGS(cond, base, reglist...)\ | ||
29 | ldm/**/cond base,reglist^ | ||
30 | |||
31 | #define RETINSTR(instr, regs...)\ | ||
32 | instr/**/s regs | ||
33 | #endif | ||
34 | |||
35 | #define MODENOP\ | ||
36 | mov r0, r0 | ||
37 | |||
38 | #define MODE(savereg,tmpreg,mode) \ | ||
39 | mov savereg, pc; \ | ||
40 | bic tmpreg, savereg, $0x0c000003; \ | ||
41 | orr tmpreg, tmpreg, $mode; \ | ||
42 | teqp tmpreg, $0 | ||
43 | |||
44 | #define RESTOREMODE(savereg) \ | ||
45 | teqp savereg, $0 | ||
46 | |||
47 | #define SAVEIRQS(tmpreg) | ||
48 | |||
49 | #define RESTOREIRQS(tmpreg) | ||
50 | |||
51 | #define DISABLEIRQS(tmpreg)\ | ||
52 | teqp pc, $0x08000003 | ||
53 | |||
54 | #define ENABLEIRQS(tmpreg)\ | ||
55 | teqp pc, $0x00000003 | ||
56 | |||
57 | #define USERMODE(tmpreg)\ | ||
58 | teqp pc, $0x00000000;\ | ||
59 | mov r0, r0 | ||
60 | |||
61 | #define SVCMODE(tmpreg)\ | ||
62 | teqp pc, $0x00000003;\ | ||
63 | mov r0, r0 | ||
64 | |||
65 | |||
66 | /* | ||
67 | * Save the current IRQ state and disable IRQs | ||
68 | * Note that this macro assumes FIQs are enabled, and | ||
69 | * that the processor is in SVC mode. | ||
70 | */ | ||
71 | .macro save_and_disable_irqs, oldcpsr, temp | ||
72 | mov \oldcpsr, pc | ||
73 | orr \temp, \oldcpsr, #0x08000000 | ||
74 | teqp \temp, #0 | ||
75 | .endm | ||
76 | |||
77 | /* | ||
78 | * Restore interrupt state previously stored in | ||
79 | * a register | ||
80 | * ** Actually do nothing on Arc - hope that the caller uses a MOVS PC soon | ||
81 | * after! | ||
82 | */ | ||
83 | .macro restore_irqs, oldcpsr | ||
84 | @ This be restore_irqs | ||
85 | .endm | ||
86 | |||
87 | /* | ||
88 | * These two are used to save LR/restore PC over a user-based access. | ||
89 | * The old 26-bit architecture requires that we save lr (R14) | ||
90 | */ | ||
91 | .macro save_lr | ||
92 | str lr, [sp, #-4]! | ||
93 | .endm | ||
94 | |||
95 | .macro restore_pc | ||
96 | ldmfd sp!, {pc}^ | ||
97 | .endm | ||
98 | |||
99 | #define USER(x...) \ | ||
100 | 9999: x; \ | ||
101 | .section __ex_table,"a"; \ | ||
102 | .align 3; \ | ||
103 | .long 9999b,9001f; \ | ||
104 | .previous | ||
105 | |||
106 | |||
diff --git a/include/asm-arm26/atomic.h b/include/asm-arm26/atomic.h deleted file mode 100644 index d6dd42374cf3..000000000000 --- a/include/asm-arm26/atomic.h +++ /dev/null | |||
@@ -1,123 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm26/atomic.h | ||
3 | * | ||
4 | * Copyright (c) 1996 Russell King. | ||
5 | * Modified for arm26 by Ian Molton | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | * Changelog: | ||
12 | * 25-11-2004 IM Updated for 2.6.9 | ||
13 | * 27-06-1996 RMK Created | ||
14 | * 13-04-1997 RMK Made functions atomic! | ||
15 | * 07-12-1997 RMK Upgraded for v2.1. | ||
16 | * 26-08-1998 PJB Added #ifdef __KERNEL__ | ||
17 | * | ||
18 | * FIXME - its probably worth seeing what these compile into... | ||
19 | */ | ||
20 | #ifndef __ASM_ARM_ATOMIC_H | ||
21 | #define __ASM_ARM_ATOMIC_H | ||
22 | |||
23 | #ifdef CONFIG_SMP | ||
24 | #error SMP is NOT supported | ||
25 | #endif | ||
26 | |||
27 | typedef struct { volatile int counter; } atomic_t; | ||
28 | |||
29 | #define ATOMIC_INIT(i) { (i) } | ||
30 | |||
31 | #ifdef __KERNEL__ | ||
32 | #include <asm/system.h> | ||
33 | |||
34 | #define atomic_read(v) ((v)->counter) | ||
35 | #define atomic_set(v,i) (((v)->counter) = (i)) | ||
36 | |||
37 | static inline int atomic_add_return(int i, atomic_t *v) | ||
38 | { | ||
39 | unsigned long flags; | ||
40 | int val; | ||
41 | |||
42 | local_irq_save(flags); | ||
43 | val = v->counter; | ||
44 | v->counter = val += i; | ||
45 | local_irq_restore(flags); | ||
46 | |||
47 | return val; | ||
48 | } | ||
49 | |||
50 | static inline int atomic_sub_return(int i, atomic_t *v) | ||
51 | { | ||
52 | unsigned long flags; | ||
53 | int val; | ||
54 | |||
55 | local_irq_save(flags); | ||
56 | val = v->counter; | ||
57 | v->counter = val -= i; | ||
58 | local_irq_restore(flags); | ||
59 | |||
60 | return val; | ||
61 | } | ||
62 | |||
63 | static inline int atomic_cmpxchg(atomic_t *v, int old, int new) | ||
64 | { | ||
65 | int ret; | ||
66 | unsigned long flags; | ||
67 | |||
68 | local_irq_save(flags); | ||
69 | ret = v->counter; | ||
70 | if (likely(ret == old)) | ||
71 | v->counter = new; | ||
72 | local_irq_restore(flags); | ||
73 | |||
74 | return ret; | ||
75 | } | ||
76 | |||
77 | #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) | ||
78 | |||
79 | static inline int atomic_add_unless(atomic_t *v, int a, int u) | ||
80 | { | ||
81 | int ret; | ||
82 | unsigned long flags; | ||
83 | |||
84 | local_irq_save(flags); | ||
85 | ret = v->counter; | ||
86 | if (ret != u) | ||
87 | v->counter += a; | ||
88 | local_irq_restore(flags); | ||
89 | |||
90 | return ret != u; | ||
91 | } | ||
92 | #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) | ||
93 | |||
94 | static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr) | ||
95 | { | ||
96 | unsigned long flags; | ||
97 | |||
98 | local_irq_save(flags); | ||
99 | *addr &= ~mask; | ||
100 | local_irq_restore(flags); | ||
101 | } | ||
102 | |||
103 | #define atomic_add(i, v) (void) atomic_add_return(i, v) | ||
104 | #define atomic_inc(v) (void) atomic_add_return(1, v) | ||
105 | #define atomic_sub(i, v) (void) atomic_sub_return(i, v) | ||
106 | #define atomic_dec(v) (void) atomic_sub_return(1, v) | ||
107 | |||
108 | #define atomic_inc_and_test(v) (atomic_add_return(1, v) == 0) | ||
109 | #define atomic_dec_and_test(v) (atomic_sub_return(1, v) == 0) | ||
110 | #define atomic_inc_return(v) (atomic_add_return(1, v)) | ||
111 | #define atomic_dec_return(v) (atomic_sub_return(1, v)) | ||
112 | |||
113 | #define atomic_add_negative(i,v) (atomic_add_return(i, v) < 0) | ||
114 | |||
115 | /* Atomic operations are already serializing on ARM26 */ | ||
116 | #define smp_mb__before_atomic_dec() barrier() | ||
117 | #define smp_mb__after_atomic_dec() barrier() | ||
118 | #define smp_mb__before_atomic_inc() barrier() | ||
119 | #define smp_mb__after_atomic_inc() barrier() | ||
120 | |||
121 | #include <asm-generic/atomic.h> | ||
122 | #endif | ||
123 | #endif | ||
diff --git a/include/asm-arm26/auxvec.h b/include/asm-arm26/auxvec.h deleted file mode 100644 index c0536f6b29a7..000000000000 --- a/include/asm-arm26/auxvec.h +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | #ifndef __ASMARM_AUXVEC_H | ||
2 | #define __ASMARM_AUXVEC_H | ||
3 | |||
4 | #endif | ||
diff --git a/include/asm-arm26/bitops.h b/include/asm-arm26/bitops.h deleted file mode 100644 index 19a69573a654..000000000000 --- a/include/asm-arm26/bitops.h +++ /dev/null | |||
@@ -1,207 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 1995, Russell King. | ||
3 | * | ||
4 | * Based on the arm32 version by RMK (and others). Their copyrights apply to | ||
5 | * Those parts. | ||
6 | * Modified for arm26 by Ian Molton on 25/11/04 | ||
7 | * | ||
8 | * bit 0 is the LSB of an "unsigned long" quantity. | ||
9 | * | ||
10 | * Please note that the code in this file should never be included | ||
11 | * from user space. Many of these are not implemented in assembler | ||
12 | * since they would be too costly. Also, they require privileged | ||
13 | * instructions (which are not available from user mode) to ensure | ||
14 | * that they are atomic. | ||
15 | */ | ||
16 | |||
17 | #ifndef __ASM_ARM_BITOPS_H | ||
18 | #define __ASM_ARM_BITOPS_H | ||
19 | |||
20 | #ifdef __KERNEL__ | ||
21 | |||
22 | #include <linux/compiler.h> | ||
23 | #include <asm/system.h> | ||
24 | |||
25 | #define smp_mb__before_clear_bit() do { } while (0) | ||
26 | #define smp_mb__after_clear_bit() do { } while (0) | ||
27 | |||
28 | /* | ||
29 | * These functions are the basis of our bit ops. | ||
30 | * | ||
31 | * First, the atomic bitops. These use native endian. | ||
32 | */ | ||
33 | static inline void ____atomic_set_bit(unsigned int bit, volatile unsigned long *p) | ||
34 | { | ||
35 | unsigned long flags; | ||
36 | unsigned long mask = 1UL << (bit & 31); | ||
37 | |||
38 | p += bit >> 5; | ||
39 | |||
40 | local_irq_save(flags); | ||
41 | *p |= mask; | ||
42 | local_irq_restore(flags); | ||
43 | } | ||
44 | |||
45 | static inline void ____atomic_clear_bit(unsigned int bit, volatile unsigned long *p) | ||
46 | { | ||
47 | unsigned long flags; | ||
48 | unsigned long mask = 1UL << (bit & 31); | ||
49 | |||
50 | p += bit >> 5; | ||
51 | |||
52 | local_irq_save(flags); | ||
53 | *p &= ~mask; | ||
54 | local_irq_restore(flags); | ||
55 | } | ||
56 | |||
57 | static inline void ____atomic_change_bit(unsigned int bit, volatile unsigned long *p) | ||
58 | { | ||
59 | unsigned long flags; | ||
60 | unsigned long mask = 1UL << (bit & 31); | ||
61 | |||
62 | p += bit >> 5; | ||
63 | |||
64 | local_irq_save(flags); | ||
65 | *p ^= mask; | ||
66 | local_irq_restore(flags); | ||
67 | } | ||
68 | |||
69 | static inline int | ||
70 | ____atomic_test_and_set_bit(unsigned int bit, volatile unsigned long *p) | ||
71 | { | ||
72 | unsigned long flags; | ||
73 | unsigned int res; | ||
74 | unsigned long mask = 1UL << (bit & 31); | ||
75 | |||
76 | p += bit >> 5; | ||
77 | |||
78 | local_irq_save(flags); | ||
79 | res = *p; | ||
80 | *p = res | mask; | ||
81 | local_irq_restore(flags); | ||
82 | |||
83 | return res & mask; | ||
84 | } | ||
85 | |||
86 | static inline int | ||
87 | ____atomic_test_and_clear_bit(unsigned int bit, volatile unsigned long *p) | ||
88 | { | ||
89 | unsigned long flags; | ||
90 | unsigned int res; | ||
91 | unsigned long mask = 1UL << (bit & 31); | ||
92 | |||
93 | p += bit >> 5; | ||
94 | |||
95 | local_irq_save(flags); | ||
96 | res = *p; | ||
97 | *p = res & ~mask; | ||
98 | local_irq_restore(flags); | ||
99 | |||
100 | return res & mask; | ||
101 | } | ||
102 | |||
103 | static inline int | ||
104 | ____atomic_test_and_change_bit(unsigned int bit, volatile unsigned long *p) | ||
105 | { | ||
106 | unsigned long flags; | ||
107 | unsigned int res; | ||
108 | unsigned long mask = 1UL << (bit & 31); | ||
109 | |||
110 | p += bit >> 5; | ||
111 | |||
112 | local_irq_save(flags); | ||
113 | res = *p; | ||
114 | *p = res ^ mask; | ||
115 | local_irq_restore(flags); | ||
116 | |||
117 | return res & mask; | ||
118 | } | ||
119 | |||
120 | #include <asm-generic/bitops/non-atomic.h> | ||
121 | |||
122 | /* | ||
123 | * Little endian assembly bitops. nr = 0 -> byte 0 bit 0. | ||
124 | */ | ||
125 | extern void _set_bit_le(int nr, volatile unsigned long * p); | ||
126 | extern void _clear_bit_le(int nr, volatile unsigned long * p); | ||
127 | extern void _change_bit_le(int nr, volatile unsigned long * p); | ||
128 | extern int _test_and_set_bit_le(int nr, volatile unsigned long * p); | ||
129 | extern int _test_and_clear_bit_le(int nr, volatile unsigned long * p); | ||
130 | extern int _test_and_change_bit_le(int nr, volatile unsigned long * p); | ||
131 | extern int _find_first_zero_bit_le(const unsigned long * p, unsigned size); | ||
132 | extern int _find_next_zero_bit_le(void * p, int size, int offset); | ||
133 | extern int _find_first_bit_le(const unsigned long *p, unsigned size); | ||
134 | extern int _find_next_bit_le(const unsigned long *p, int size, int offset); | ||
135 | |||
136 | /* | ||
137 | * The __* form of bitops are non-atomic and may be reordered. | ||
138 | */ | ||
139 | #define ATOMIC_BITOP_LE(name,nr,p) \ | ||
140 | (__builtin_constant_p(nr) ? \ | ||
141 | ____atomic_##name(nr, p) : \ | ||
142 | _##name##_le(nr,p)) | ||
143 | |||
144 | #define NONATOMIC_BITOP(name,nr,p) \ | ||
145 | (____nonatomic_##name(nr, p)) | ||
146 | |||
147 | /* | ||
148 | * These are the little endian, atomic definitions. | ||
149 | */ | ||
150 | #define set_bit(nr,p) ATOMIC_BITOP_LE(set_bit,nr,p) | ||
151 | #define clear_bit(nr,p) ATOMIC_BITOP_LE(clear_bit,nr,p) | ||
152 | #define change_bit(nr,p) ATOMIC_BITOP_LE(change_bit,nr,p) | ||
153 | #define test_and_set_bit(nr,p) ATOMIC_BITOP_LE(test_and_set_bit,nr,p) | ||
154 | #define test_and_clear_bit(nr,p) ATOMIC_BITOP_LE(test_and_clear_bit,nr,p) | ||
155 | #define test_and_change_bit(nr,p) ATOMIC_BITOP_LE(test_and_change_bit,nr,p) | ||
156 | #define find_first_zero_bit(p,sz) _find_first_zero_bit_le(p,sz) | ||
157 | #define find_next_zero_bit(p,sz,off) _find_next_zero_bit_le(p,sz,off) | ||
158 | #define find_first_bit(p,sz) _find_first_bit_le(p,sz) | ||
159 | #define find_next_bit(p,sz,off) _find_next_bit_le(p,sz,off) | ||
160 | |||
161 | #define WORD_BITOFF_TO_LE(x) ((x)) | ||
162 | |||
163 | #include <asm-generic/bitops/ffz.h> | ||
164 | #include <asm-generic/bitops/__ffs.h> | ||
165 | #include <asm-generic/bitops/fls.h> | ||
166 | #include <asm-generic/bitops/fls64.h> | ||
167 | #include <asm-generic/bitops/ffs.h> | ||
168 | #include <asm-generic/bitops/sched.h> | ||
169 | #include <asm-generic/bitops/hweight.h> | ||
170 | |||
171 | /* | ||
172 | * Ext2 is defined to use little-endian byte ordering. | ||
173 | * These do not need to be atomic. | ||
174 | */ | ||
175 | #define ext2_set_bit(nr,p) \ | ||
176 | __test_and_set_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p)) | ||
177 | #define ext2_set_bit_atomic(lock,nr,p) \ | ||
178 | test_and_set_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p)) | ||
179 | #define ext2_clear_bit(nr,p) \ | ||
180 | __test_and_clear_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p)) | ||
181 | #define ext2_clear_bit_atomic(lock,nr,p) \ | ||
182 | test_and_clear_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p)) | ||
183 | #define ext2_test_bit(nr,p) \ | ||
184 | test_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p)) | ||
185 | #define ext2_find_first_zero_bit(p,sz) \ | ||
186 | _find_first_zero_bit_le(p,sz) | ||
187 | #define ext2_find_next_zero_bit(p,sz,off) \ | ||
188 | _find_next_zero_bit_le(p,sz,off) | ||
189 | |||
190 | /* | ||
191 | * Minix is defined to use little-endian byte ordering. | ||
192 | * These do not need to be atomic. | ||
193 | */ | ||
194 | #define minix_set_bit(nr,p) \ | ||
195 | __set_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p)) | ||
196 | #define minix_test_bit(nr,p) \ | ||
197 | test_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p)) | ||
198 | #define minix_test_and_set_bit(nr,p) \ | ||
199 | __test_and_set_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p)) | ||
200 | #define minix_test_and_clear_bit(nr,p) \ | ||
201 | __test_and_clear_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p)) | ||
202 | #define minix_find_first_zero_bit(p,sz) \ | ||
203 | _find_first_zero_bit_le((unsigned long *)(p),sz) | ||
204 | |||
205 | #endif /* __KERNEL__ */ | ||
206 | |||
207 | #endif /* _ARM_BITOPS_H */ | ||
diff --git a/include/asm-arm26/bug.h b/include/asm-arm26/bug.h deleted file mode 100644 index 8545d58b0475..000000000000 --- a/include/asm-arm26/bug.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | #ifndef _ASMARM_BUG_H | ||
2 | #define _ASMARM_BUG_H | ||
3 | |||
4 | |||
5 | #ifdef CONFIG_BUG | ||
6 | #ifdef CONFIG_DEBUG_BUGVERBOSE | ||
7 | extern volatile void __bug(const char *file, int line, void *data); | ||
8 | /* give file/line information */ | ||
9 | #define BUG() __bug(__FILE__, __LINE__, NULL) | ||
10 | #else | ||
11 | #define BUG() (*(int *)0 = 0) | ||
12 | #endif | ||
13 | |||
14 | #define HAVE_ARCH_BUG | ||
15 | #endif | ||
16 | |||
17 | #include <asm-generic/bug.h> | ||
18 | |||
19 | #endif | ||
diff --git a/include/asm-arm26/bugs.h b/include/asm-arm26/bugs.h deleted file mode 100644 index e99ac2e46d7f..000000000000 --- a/include/asm-arm26/bugs.h +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm26/bugs.h | ||
3 | * | ||
4 | * Copyright (C) 1995 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #ifndef __ASM_BUGS_H | ||
11 | #define __ASM_BUGS_H | ||
12 | |||
13 | #define check_bugs() cpu_check_bugs() | ||
14 | |||
15 | #endif | ||
diff --git a/include/asm-arm26/byteorder.h b/include/asm-arm26/byteorder.h deleted file mode 100644 index 0b4af9ac76e9..000000000000 --- a/include/asm-arm26/byteorder.h +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/byteorder.h | ||
3 | * | ||
4 | * ARM Endian-ness. In little endian mode, the data bus is connected such | ||
5 | * that byte accesses appear as: | ||
6 | * 0 = d0...d7, 1 = d8...d15, 2 = d16...d23, 3 = d24...d31 | ||
7 | * and word accesses (data or instruction) appear as: | ||
8 | * d0...d31 | ||
9 | * | ||
10 | */ | ||
11 | #ifndef __ASM_ARM_BYTEORDER_H | ||
12 | #define __ASM_ARM_BYTEORDER_H | ||
13 | |||
14 | #include <asm/types.h> | ||
15 | |||
16 | #if !defined(__STRICT_ANSI__) || defined(__KERNEL__) | ||
17 | # define __BYTEORDER_HAS_U64__ | ||
18 | # define __SWAB_64_THRU_32__ | ||
19 | #endif | ||
20 | |||
21 | #include <linux/byteorder/little_endian.h> | ||
22 | |||
23 | #endif | ||
24 | |||
diff --git a/include/asm-arm26/cache.h b/include/asm-arm26/cache.h deleted file mode 100644 index 8c3abcf728fe..000000000000 --- a/include/asm-arm26/cache.h +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm26/cache.h | ||
3 | */ | ||
4 | #ifndef __ASMARM_CACHE_H | ||
5 | #define __ASMARM_CACHE_H | ||
6 | |||
7 | #define L1_CACHE_SHIFT 5 | ||
8 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) | ||
9 | #define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) | ||
10 | #define SMP_CACHE_BYTES L1_CACHE_BYTES | ||
11 | |||
12 | #endif | ||
diff --git a/include/asm-arm26/cacheflush.h b/include/asm-arm26/cacheflush.h deleted file mode 100644 index 14ae15b6faab..000000000000 --- a/include/asm-arm26/cacheflush.h +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/cacheflush.h | ||
3 | * | ||
4 | * Copyright (C) 2000-2002 Russell King | ||
5 | * Copyright (C) 2003 Ian Molton | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | * ARM26 cache 'functions' | ||
12 | * | ||
13 | */ | ||
14 | |||
15 | #ifndef _ASMARM_CACHEFLUSH_H | ||
16 | #define _ASMARM_CACHEFLUSH_H | ||
17 | |||
18 | #if 1 //FIXME - BAD INCLUDES!!! | ||
19 | #include <linux/sched.h> | ||
20 | #include <linux/mm.h> | ||
21 | #endif | ||
22 | |||
23 | #define flush_cache_all() do { } while (0) | ||
24 | #define flush_cache_mm(mm) do { } while (0) | ||
25 | #define flush_cache_dup_mm(mm) do { } while (0) | ||
26 | #define flush_cache_range(vma,start,end) do { } while (0) | ||
27 | #define flush_cache_page(vma,vmaddr,pfn) do { } while (0) | ||
28 | #define flush_cache_vmap(start, end) do { } while (0) | ||
29 | #define flush_cache_vunmap(start, end) do { } while (0) | ||
30 | |||
31 | #define invalidate_dcache_range(start,end) do { } while (0) | ||
32 | #define clean_dcache_range(start,end) do { } while (0) | ||
33 | #define flush_dcache_range(start,end) do { } while (0) | ||
34 | #define flush_dcache_page(page) do { } while (0) | ||
35 | #define flush_dcache_mmap_lock(mapping) do { } while (0) | ||
36 | #define flush_dcache_mmap_unlock(mapping) do { } while (0) | ||
37 | #define clean_dcache_entry(_s) do { } while (0) | ||
38 | #define clean_cache_entry(_start) do { } while (0) | ||
39 | |||
40 | #define flush_icache_user_range(start,end, bob, fred) do { } while (0) | ||
41 | #define flush_icache_range(start,end) do { } while (0) | ||
42 | #define flush_icache_page(vma,page) do { } while (0) | ||
43 | |||
44 | #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ | ||
45 | memcpy(dst, src, len) | ||
46 | #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ | ||
47 | memcpy(dst, src, len) | ||
48 | |||
49 | /* DAG: ARM3 will flush cache on MEMC updates anyway? so don't bother */ | ||
50 | /* IM : Yes, it will, but only if setup to do so (we do this). */ | ||
51 | #define clean_cache_area(_start,_size) do { } while (0) | ||
52 | |||
53 | #endif | ||
diff --git a/include/asm-arm26/checksum.h b/include/asm-arm26/checksum.h deleted file mode 100644 index f2b4b0a403bd..000000000000 --- a/include/asm-arm26/checksum.h +++ /dev/null | |||
@@ -1,151 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/checksum.h | ||
3 | * | ||
4 | * IP checksum routines | ||
5 | * | ||
6 | * Copyright (C) Original authors of ../asm-i386/checksum.h | ||
7 | * Copyright (C) 1996-1999 Russell King | ||
8 | */ | ||
9 | #ifndef __ASM_ARM_CHECKSUM_H | ||
10 | #define __ASM_ARM_CHECKSUM_H | ||
11 | |||
12 | #include <linux/in6.h> | ||
13 | |||
14 | /* | ||
15 | * computes the checksum of a memory block at buff, length len, | ||
16 | * and adds in "sum" (32-bit) | ||
17 | * | ||
18 | * returns a 32-bit number suitable for feeding into itself | ||
19 | * or csum_tcpudp_magic | ||
20 | * | ||
21 | * this function must be called with even lengths, except | ||
22 | * for the last fragment, which may be odd | ||
23 | * | ||
24 | * it's best to have buff aligned on a 32-bit boundary | ||
25 | */ | ||
26 | __wsum csum_partial(const void *buff, int len, __wsum sum); | ||
27 | |||
28 | /* | ||
29 | * the same as csum_partial, but copies from src while it | ||
30 | * checksums, and handles user-space pointer exceptions correctly, when needed. | ||
31 | * | ||
32 | * here even more important to align src and dst on a 32-bit (or even | ||
33 | * better 64-bit) boundary | ||
34 | */ | ||
35 | |||
36 | __wsum | ||
37 | csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum); | ||
38 | |||
39 | __wsum | ||
40 | csum_partial_copy_from_user(const void __user *src, void *dst, int len, __wsum sum, int *err_ptr); | ||
41 | |||
42 | /* | ||
43 | * This is a version of ip_compute_csum() optimized for IP headers, | ||
44 | * which always checksum on 4 octet boundaries. | ||
45 | */ | ||
46 | static inline __sum16 | ||
47 | ip_fast_csum(const void *iph, unsigned int ihl) | ||
48 | { | ||
49 | unsigned int sum, tmp1; | ||
50 | |||
51 | __asm__ __volatile__( | ||
52 | "ldr %0, [%1], #4 @ ip_fast_csum \n\ | ||
53 | ldr %3, [%1], #4 \n\ | ||
54 | sub %2, %2, #5 \n\ | ||
55 | adds %0, %0, %3 \n\ | ||
56 | ldr %3, [%1], #4 \n\ | ||
57 | adcs %0, %0, %3 \n\ | ||
58 | ldr %3, [%1], #4 \n\ | ||
59 | 1: adcs %0, %0, %3 \n\ | ||
60 | ldr %3, [%1], #4 \n\ | ||
61 | tst %2, #15 @ do this carefully \n\ | ||
62 | subne %2, %2, #1 @ without destroying \n\ | ||
63 | bne 1b @ the carry flag \n\ | ||
64 | adcs %0, %0, %3 \n\ | ||
65 | adc %0, %0, #0 \n\ | ||
66 | adds %0, %0, %0, lsl #16 \n\ | ||
67 | addcs %0, %0, #0x10000 \n\ | ||
68 | mvn %0, %0 \n\ | ||
69 | mov %0, %0, lsr #16" | ||
70 | : "=r" (sum), "=r" (iph), "=r" (ihl), "=r" (tmp1) | ||
71 | : "1" (iph), "2" (ihl) | ||
72 | : "cc"); | ||
73 | return (__force __sum16)sum; | ||
74 | } | ||
75 | |||
76 | /* | ||
77 | * Fold a partial checksum without adding pseudo headers | ||
78 | */ | ||
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 | } | ||
89 | |||
90 | static inline __wsum | ||
91 | csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, | ||
92 | unsigned short proto, __wsum sum) | ||
93 | { | ||
94 | __asm__( | ||
95 | "adds %0, %1, %2 @ csum_tcpudp_nofold \n\ | ||
96 | adcs %0, %0, %3 \n\ | ||
97 | adcs %0, %0, %4 \n\ | ||
98 | adcs %0, %0, %5 \n\ | ||
99 | adc %0, %0, #0" | ||
100 | : "=&r"(sum) | ||
101 | : "r" (sum), "r" (daddr), "r" (saddr), "r" (htons(len)), "Ir" (htons(proto)) | ||
102 | : "cc"); | ||
103 | return sum; | ||
104 | } | ||
105 | /* | ||
106 | * computes the checksum of the TCP/UDP pseudo-header | ||
107 | * returns a 16-bit checksum, already complemented | ||
108 | */ | ||
109 | static inline __sum16 | ||
110 | csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len, | ||
111 | unsigned short proto, __wsum sum) | ||
112 | { | ||
113 | __asm__( | ||
114 | "adds %0, %1, %2 @ csum_tcpudp_magic \n\ | ||
115 | adcs %0, %0, %3 \n\ | ||
116 | adcs %0, %0, %4 \n\ | ||
117 | adcs %0, %0, %5 \n\ | ||
118 | adc %0, %0, #0 \n\ | ||
119 | adds %0, %0, %0, lsl #16 \n\ | ||
120 | addcs %0, %0, #0x10000 \n\ | ||
121 | mvn %0, %0" | ||
122 | : "=&r"(sum) | ||
123 | : "r" (sum), "r" (daddr), "r" (saddr), "r" (htons(len)), "Ir" (htons(proto)) | ||
124 | : "cc"); | ||
125 | return (__force __sum16)((__force u32)sum >> 16); | ||
126 | } | ||
127 | |||
128 | |||
129 | /* | ||
130 | * this routine is used for miscellaneous IP-like checksums, mainly | ||
131 | * in icmp.c | ||
132 | */ | ||
133 | static inline __sum16 | ||
134 | ip_compute_csum(const void *buff, int len) | ||
135 | { | ||
136 | return csum_fold(csum_partial(buff, len, 0)); | ||
137 | } | ||
138 | |||
139 | #define _HAVE_ARCH_IPV6_CSUM | ||
140 | extern __wsum | ||
141 | __csum_ipv6_magic(const struct in6_addr *saddr, const struct in6_addr *daddr, __be32 len, | ||
142 | __be32 proto, __wsum sum); | ||
143 | |||
144 | static inline __sum16 | ||
145 | csum_ipv6_magic(const struct in6_addr *saddr, const struct in6_addr *daddr, __u32 len, | ||
146 | unsigned short proto, __wsum sum) | ||
147 | { | ||
148 | return csum_fold(__csum_ipv6_magic(saddr, daddr, htonl(len), | ||
149 | htonl(proto), sum)); | ||
150 | } | ||
151 | #endif | ||
diff --git a/include/asm-arm26/constants.h b/include/asm-arm26/constants.h deleted file mode 100644 index 0d0b14415563..000000000000 --- a/include/asm-arm26/constants.h +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | #ifndef __ASM_OFFSETS_H__ | ||
2 | #define __ASM_OFFSETS_H__ | ||
3 | /* | ||
4 | * DO NOT MODIFY. | ||
5 | * | ||
6 | * This file was generated by arch/arm26/Makefile | ||
7 | * | ||
8 | */ | ||
9 | |||
10 | #define TSK_ACTIVE_MM 96 /* offsetof(struct task_struct, active_mm) */ | ||
11 | |||
12 | #define VMA_VM_MM 0 /* offsetof(struct vm_area_struct, vm_mm) */ | ||
13 | #define VMA_VM_FLAGS 20 /* offsetof(struct vm_area_struct, vm_flags) */ | ||
14 | |||
15 | #define VM_EXEC 4 /* VM_EXEC */ | ||
16 | |||
17 | |||
18 | #define PAGE_PRESENT 1 /* L_PTE_PRESENT */ | ||
19 | #define PAGE_READONLY 95 /* PAGE_READONLY */ | ||
20 | #define PAGE_NOT_USER 3 /* PAGE_NONE */ | ||
21 | #define PAGE_OLD 3 /* PAGE_NONE */ | ||
22 | #define PAGE_CLEAN 128 /* L_PTE_DIRTY */ | ||
23 | |||
24 | #define PAGE_SZ 32768 /* PAGE_SIZE */ | ||
25 | |||
26 | #define SYS_ERROR0 10420224 /* 0x9f0000 */ | ||
27 | |||
28 | #endif | ||
diff --git a/include/asm-arm26/cputime.h b/include/asm-arm26/cputime.h deleted file mode 100644 index d2783a9e47b3..000000000000 --- a/include/asm-arm26/cputime.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __ARM26_CPUTIME_H | ||
2 | #define __ARM26_CPUTIME_H | ||
3 | |||
4 | #include <asm-generic/cputime.h> | ||
5 | |||
6 | #endif /* __ARM26_CPUTIME_H */ | ||
diff --git a/include/asm-arm26/current.h b/include/asm-arm26/current.h deleted file mode 100644 index 75d21e2a3ff7..000000000000 --- a/include/asm-arm26/current.h +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | #ifndef _ASMARM_CURRENT_H | ||
2 | #define _ASMARM_CURRENT_H | ||
3 | |||
4 | #include <linux/thread_info.h> | ||
5 | |||
6 | static inline struct task_struct *get_current(void) __attribute_const__; | ||
7 | |||
8 | static inline struct task_struct *get_current(void) | ||
9 | { | ||
10 | return current_thread_info()->task; | ||
11 | } | ||
12 | |||
13 | #define current (get_current()) | ||
14 | |||
15 | #endif /* _ASMARM_CURRENT_H */ | ||
diff --git a/include/asm-arm26/delay.h b/include/asm-arm26/delay.h deleted file mode 100644 index 40fbf7bbe6c2..000000000000 --- a/include/asm-arm26/delay.h +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | #ifndef __ASM_ARM_DELAY_H | ||
2 | #define __ASM_ARM_DELAY_H | ||
3 | |||
4 | /* | ||
5 | * Copyright (C) 1995 Russell King | ||
6 | * | ||
7 | * Delay routines, using a pre-computed "loops_per_second" value. | ||
8 | */ | ||
9 | |||
10 | extern void __delay(int loops); | ||
11 | |||
12 | /* | ||
13 | * division by multiplication: you don't have to worry about | ||
14 | * loss of precision. | ||
15 | * | ||
16 | * Use only for very small delays ( < 1 msec). Should probably use a | ||
17 | * lookup table, really, as the multiplications take much too long with | ||
18 | * short delays. This is a "reasonable" implementation, though (and the | ||
19 | * first constant multiplications gets optimized away if the delay is | ||
20 | * a constant) | ||
21 | * | ||
22 | * FIXME - lets improve it then... | ||
23 | */ | ||
24 | extern void udelay(unsigned long usecs); | ||
25 | |||
26 | static inline unsigned long muldiv(unsigned long a, unsigned long b, unsigned long c) | ||
27 | { | ||
28 | return a * b / c; | ||
29 | } | ||
30 | |||
31 | |||
32 | |||
33 | #endif /* defined(_ARM_DELAY_H) */ | ||
34 | |||
diff --git a/include/asm-arm26/device.h b/include/asm-arm26/device.h deleted file mode 100644 index d8f9872b0e2d..000000000000 --- a/include/asm-arm26/device.h +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | /* | ||
2 | * Arch specific extensions to struct device | ||
3 | * | ||
4 | * This file is released under the GPLv2 | ||
5 | */ | ||
6 | #include <asm-generic/device.h> | ||
7 | |||
diff --git a/include/asm-arm26/div64.h b/include/asm-arm26/div64.h deleted file mode 100644 index 6cd978cefb28..000000000000 --- a/include/asm-arm26/div64.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/div64.h> | ||
diff --git a/include/asm-arm26/dma.h b/include/asm-arm26/dma.h deleted file mode 100644 index 4326ba85eb72..000000000000 --- a/include/asm-arm26/dma.h +++ /dev/null | |||
@@ -1,183 +0,0 @@ | |||
1 | #ifndef __ASM_ARM_DMA_H | ||
2 | #define __ASM_ARM_DMA_H | ||
3 | |||
4 | typedef unsigned int dmach_t; | ||
5 | |||
6 | #include <linux/spinlock.h> | ||
7 | #include <asm/system.h> | ||
8 | #include <asm/memory.h> | ||
9 | #include <asm/scatterlist.h> | ||
10 | |||
11 | // FIXME - do we really need this? arm26 cant do 'proper' DMA | ||
12 | |||
13 | typedef struct dma_struct dma_t; | ||
14 | typedef unsigned int dmamode_t; | ||
15 | |||
16 | struct dma_ops { | ||
17 | int (*request)(dmach_t, dma_t *); /* optional */ | ||
18 | void (*free)(dmach_t, dma_t *); /* optional */ | ||
19 | void (*enable)(dmach_t, dma_t *); /* mandatory */ | ||
20 | void (*disable)(dmach_t, dma_t *); /* mandatory */ | ||
21 | int (*residue)(dmach_t, dma_t *); /* optional */ | ||
22 | int (*setspeed)(dmach_t, dma_t *, int); /* optional */ | ||
23 | char *type; | ||
24 | }; | ||
25 | |||
26 | struct dma_struct { | ||
27 | struct scatterlist buf; /* single DMA */ | ||
28 | int sgcount; /* number of DMA SG */ | ||
29 | struct scatterlist *sg; /* DMA Scatter-Gather List */ | ||
30 | |||
31 | unsigned int active:1; /* Transfer active */ | ||
32 | unsigned int invalid:1; /* Address/Count changed */ | ||
33 | unsigned int using_sg:1; /* using scatter list? */ | ||
34 | dmamode_t dma_mode; /* DMA mode */ | ||
35 | int speed; /* DMA speed */ | ||
36 | |||
37 | unsigned int lock; /* Device is allocated */ | ||
38 | const char *device_id; /* Device name */ | ||
39 | |||
40 | unsigned int dma_base; /* Controller base address */ | ||
41 | int dma_irq; /* Controller IRQ */ | ||
42 | int state; /* Controller state */ | ||
43 | struct scatterlist cur_sg; /* Current controller buffer */ | ||
44 | |||
45 | struct dma_ops *d_ops; | ||
46 | }; | ||
47 | |||
48 | /* Prototype: void arch_dma_init(dma) | ||
49 | * Purpose : Initialise architecture specific DMA | ||
50 | * Params : dma - pointer to array of DMA structures | ||
51 | */ | ||
52 | extern void arch_dma_init(dma_t *dma); | ||
53 | |||
54 | extern void isa_init_dma(dma_t *dma); | ||
55 | |||
56 | |||
57 | #define MAX_DMA_ADDRESS 0x03000000 | ||
58 | #define MAX_DMA_CHANNELS 3 | ||
59 | |||
60 | /* ARC */ | ||
61 | #define DMA_VIRTUAL_FLOPPY0 0 | ||
62 | #define DMA_VIRTUAL_FLOPPY1 1 | ||
63 | #define DMA_VIRTUAL_SOUND 2 | ||
64 | |||
65 | /* A5K */ | ||
66 | #define DMA_FLOPPY 0 | ||
67 | |||
68 | /* | ||
69 | * DMA modes | ||
70 | */ | ||
71 | #define DMA_MODE_MASK 3 | ||
72 | |||
73 | #define DMA_MODE_READ 0 | ||
74 | #define DMA_MODE_WRITE 1 | ||
75 | #define DMA_MODE_CASCADE 2 | ||
76 | #define DMA_AUTOINIT 4 | ||
77 | |||
78 | extern spinlock_t dma_spin_lock; | ||
79 | |||
80 | static inline unsigned long claim_dma_lock(void) | ||
81 | { | ||
82 | unsigned long flags; | ||
83 | spin_lock_irqsave(&dma_spin_lock, flags); | ||
84 | return flags; | ||
85 | } | ||
86 | |||
87 | static inline void release_dma_lock(unsigned long flags) | ||
88 | { | ||
89 | spin_unlock_irqrestore(&dma_spin_lock, flags); | ||
90 | } | ||
91 | |||
92 | /* Clear the 'DMA Pointer Flip Flop'. | ||
93 | * Write 0 for LSB/MSB, 1 for MSB/LSB access. | ||
94 | */ | ||
95 | #define clear_dma_ff(channel) | ||
96 | |||
97 | /* Set only the page register bits of the transfer address. | ||
98 | * | ||
99 | * NOTE: This is an architecture specific function, and should | ||
100 | * be hidden from the drivers | ||
101 | */ | ||
102 | extern void set_dma_page(dmach_t channel, char pagenr); | ||
103 | |||
104 | /* Request a DMA channel | ||
105 | * | ||
106 | * Some architectures may need to do allocate an interrupt | ||
107 | */ | ||
108 | extern int request_dma(dmach_t channel, const char * device_id); | ||
109 | |||
110 | /* Free a DMA channel | ||
111 | * | ||
112 | * Some architectures may need to do free an interrupt | ||
113 | */ | ||
114 | extern void free_dma(dmach_t channel); | ||
115 | |||
116 | /* Enable DMA for this channel | ||
117 | * | ||
118 | * On some architectures, this may have other side effects like | ||
119 | * enabling an interrupt and setting the DMA registers. | ||
120 | */ | ||
121 | extern void enable_dma(dmach_t channel); | ||
122 | |||
123 | /* Disable DMA for this channel | ||
124 | * | ||
125 | * On some architectures, this may have other side effects like | ||
126 | * disabling an interrupt or whatever. | ||
127 | */ | ||
128 | extern void disable_dma(dmach_t channel); | ||
129 | |||
130 | /* Test whether the specified channel has an active DMA transfer | ||
131 | */ | ||
132 | extern int dma_channel_active(dmach_t channel); | ||
133 | |||
134 | /* Set the DMA scatter gather list for this channel | ||
135 | * | ||
136 | * This should not be called if a DMA channel is enabled, | ||
137 | * especially since some DMA architectures don't update the | ||
138 | * DMA address immediately, but defer it to the enable_dma(). | ||
139 | */ | ||
140 | extern void set_dma_sg(dmach_t channel, struct scatterlist *sg, int nr_sg); | ||
141 | |||
142 | /* Set the DMA address for this channel | ||
143 | * | ||
144 | * This should not be called if a DMA channel is enabled, | ||
145 | * especially since some DMA architectures don't update the | ||
146 | * DMA address immediately, but defer it to the enable_dma(). | ||
147 | */ | ||
148 | extern void set_dma_addr(dmach_t channel, unsigned long physaddr); | ||
149 | |||
150 | /* Set the DMA byte count for this channel | ||
151 | * | ||
152 | * This should not be called if a DMA channel is enabled, | ||
153 | * especially since some DMA architectures don't update the | ||
154 | * DMA count immediately, but defer it to the enable_dma(). | ||
155 | */ | ||
156 | extern void set_dma_count(dmach_t channel, unsigned long count); | ||
157 | |||
158 | /* Set the transfer direction for this channel | ||
159 | * | ||
160 | * This should not be called if a DMA channel is enabled, | ||
161 | * especially since some DMA architectures don't update the | ||
162 | * DMA transfer direction immediately, but defer it to the | ||
163 | * enable_dma(). | ||
164 | */ | ||
165 | extern void set_dma_mode(dmach_t channel, dmamode_t mode); | ||
166 | |||
167 | /* Set the transfer speed for this channel | ||
168 | */ | ||
169 | extern void set_dma_speed(dmach_t channel, int cycle_ns); | ||
170 | |||
171 | /* Get DMA residue count. After a DMA transfer, this | ||
172 | * should return zero. Reading this while a DMA transfer is | ||
173 | * still in progress will return unpredictable results. | ||
174 | * If called before the channel has been used, it may return 1. | ||
175 | * Otherwise, it returns the number of _bytes_ left to transfer. | ||
176 | */ | ||
177 | extern int get_dma_residue(dmach_t channel); | ||
178 | |||
179 | #ifndef NO_DMA | ||
180 | #define NO_DMA 255 | ||
181 | #endif | ||
182 | |||
183 | #endif /* _ARM_DMA_H */ | ||
diff --git a/include/asm-arm26/ecard.h b/include/asm-arm26/ecard.h deleted file mode 100644 index 66691939c3c1..000000000000 --- a/include/asm-arm26/ecard.h +++ /dev/null | |||
@@ -1,294 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm26/ecard.h | ||
3 | * | ||
4 | * definitions for expansion cards | ||
5 | * | ||
6 | * This is a new system as from Linux 1.2.3 | ||
7 | * | ||
8 | * Changelog: | ||
9 | * 11-12-1996 RMK Further minor improvements | ||
10 | * 12-09-1997 RMK Added interrupt enable/disable for card level | ||
11 | * 18-05-2003 IM Adjusted for ARM26 | ||
12 | * | ||
13 | * Reference: Acorns Risc OS 3 Programmers Reference Manuals. | ||
14 | */ | ||
15 | |||
16 | #ifndef __ASM_ECARD_H | ||
17 | #define __ASM_ECARD_H | ||
18 | |||
19 | /* | ||
20 | * Currently understood cards (but not necessarily | ||
21 | * supported): | ||
22 | * Manufacturer Product ID | ||
23 | */ | ||
24 | #define MANU_ACORN 0x0000 | ||
25 | #define PROD_ACORN_SCSI 0x0002 | ||
26 | #define PROD_ACORN_ETHER1 0x0003 | ||
27 | #define PROD_ACORN_MFM 0x000b | ||
28 | |||
29 | #define MANU_CCONCEPTS 0x0009 | ||
30 | #define PROD_CCONCEPTS_COLOURCARD 0x0050 | ||
31 | |||
32 | #define MANU_ANT2 0x0011 | ||
33 | #define PROD_ANT_ETHER3 0x00a4 | ||
34 | |||
35 | #define MANU_ATOMWIDE 0x0017 | ||
36 | #define PROD_ATOMWIDE_3PSERIAL 0x0090 | ||
37 | |||
38 | #define MANU_IRLAM_INSTRUMENTS 0x001f | ||
39 | #define MANU_IRLAM_INSTRUMENTS_ETHERN 0x5678 | ||
40 | |||
41 | #define MANU_OAK 0x0021 | ||
42 | #define PROD_OAK_SCSI 0x0058 | ||
43 | |||
44 | #define MANU_MORLEY 0x002b | ||
45 | #define PROD_MORLEY_SCSI_UNCACHED 0x0067 | ||
46 | |||
47 | #define MANU_CUMANA 0x003a | ||
48 | #define PROD_CUMANA_SCSI_2 0x003a | ||
49 | #define PROD_CUMANA_SCSI_1 0x00a0 | ||
50 | |||
51 | #define MANU_ICS 0x003c | ||
52 | #define PROD_ICS_IDE 0x00ae | ||
53 | |||
54 | #define MANU_ICS2 0x003d | ||
55 | #define PROD_ICS2_IDE 0x00ae | ||
56 | |||
57 | #define MANU_SERPORT 0x003f | ||
58 | #define PROD_SERPORT_DSPORT 0x00b9 | ||
59 | |||
60 | #define MANU_ARXE 0x0041 | ||
61 | #define PROD_ARXE_SCSI 0x00be | ||
62 | |||
63 | #define MANU_I3 0x0046 | ||
64 | #define PROD_I3_ETHERLAN500 0x00d4 | ||
65 | #define PROD_I3_ETHERLAN600 0x00ec | ||
66 | #define PROD_I3_ETHERLAN600A 0x011e | ||
67 | |||
68 | #define MANU_ANT 0x0053 | ||
69 | #define PROD_ANT_ETHERM 0x00d8 | ||
70 | #define PROD_ANT_ETHERB 0x00e4 | ||
71 | |||
72 | #define MANU_ALSYSTEMS 0x005b | ||
73 | #define PROD_ALSYS_SCSIATAPI 0x0107 | ||
74 | |||
75 | #define MANU_MCS 0x0063 | ||
76 | #define PROD_MCS_CONNECT32 0x0125 | ||
77 | |||
78 | #define MANU_EESOX 0x0064 | ||
79 | #define PROD_EESOX_SCSI2 0x008c | ||
80 | |||
81 | #define MANU_YELLOWSTONE 0x0096 | ||
82 | #define PROD_YELLOWSTONE_RAPIDE32 0x0120 | ||
83 | |||
84 | #define MANU_SIMTEC 0x005f | ||
85 | #define PROD_SIMTEC_IDE8 0x0130 | ||
86 | #define PROD_SIMTEC_IDE16 0x0131 | ||
87 | |||
88 | |||
89 | #ifdef ECARD_C | ||
90 | #define CONST | ||
91 | #else | ||
92 | #define CONST const | ||
93 | #endif | ||
94 | |||
95 | #define MAX_ECARDS 4 | ||
96 | |||
97 | typedef enum { /* Cards address space */ | ||
98 | ECARD_IOC, | ||
99 | ECARD_MEMC, | ||
100 | ECARD_EASI | ||
101 | } card_type_t; | ||
102 | |||
103 | typedef enum { /* Speed for ECARD_IOC space */ | ||
104 | ECARD_SLOW = 0, | ||
105 | ECARD_MEDIUM = 1, | ||
106 | ECARD_FAST = 2, | ||
107 | ECARD_SYNC = 3 | ||
108 | } card_speed_t; | ||
109 | |||
110 | struct ecard_id { /* Card ID structure */ | ||
111 | unsigned short manufacturer; | ||
112 | unsigned short product; | ||
113 | void *data; | ||
114 | }; | ||
115 | |||
116 | struct in_ecid { /* Packed card ID information */ | ||
117 | unsigned short product; /* Product code */ | ||
118 | unsigned short manufacturer; /* Manufacturer code */ | ||
119 | unsigned char id:4; /* Simple ID */ | ||
120 | unsigned char cd:1; /* Chunk dir present */ | ||
121 | unsigned char is:1; /* Interrupt status pointers */ | ||
122 | unsigned char w:2; /* Width */ | ||
123 | unsigned char country; /* Country */ | ||
124 | unsigned char irqmask; /* IRQ mask */ | ||
125 | unsigned char fiqmask; /* FIQ mask */ | ||
126 | unsigned long irqoff; /* IRQ offset */ | ||
127 | unsigned long fiqoff; /* FIQ offset */ | ||
128 | }; | ||
129 | |||
130 | typedef struct expansion_card ecard_t; | ||
131 | typedef unsigned long *loader_t; | ||
132 | |||
133 | typedef struct { /* Card handler routines */ | ||
134 | void (*irqenable)(ecard_t *ec, int irqnr); | ||
135 | void (*irqdisable)(ecard_t *ec, int irqnr); | ||
136 | int (*irqpending)(ecard_t *ec); | ||
137 | void (*fiqenable)(ecard_t *ec, int fiqnr); | ||
138 | void (*fiqdisable)(ecard_t *ec, int fiqnr); | ||
139 | int (*fiqpending)(ecard_t *ec); | ||
140 | } expansioncard_ops_t; | ||
141 | |||
142 | #define ECARD_NUM_RESOURCES (6) | ||
143 | |||
144 | #define ECARD_RES_IOCSLOW (0) | ||
145 | #define ECARD_RES_IOCMEDIUM (1) | ||
146 | #define ECARD_RES_IOCFAST (2) | ||
147 | #define ECARD_RES_IOCSYNC (3) | ||
148 | #define ECARD_RES_MEMC (4) | ||
149 | #define ECARD_RES_EASI (5) | ||
150 | |||
151 | #define ecard_resource_start(ec,nr) ((ec)->resource[nr].start) | ||
152 | #define ecard_resource_end(ec,nr) ((ec)->resource[nr].end) | ||
153 | #define ecard_resource_len(ec,nr) ((ec)->resource[nr].end - \ | ||
154 | (ec)->resource[nr].start + 1) | ||
155 | |||
156 | /* | ||
157 | * This contains all the info needed on an expansion card | ||
158 | */ | ||
159 | struct expansion_card { | ||
160 | struct expansion_card *next; | ||
161 | |||
162 | struct device dev; | ||
163 | struct resource resource[ECARD_NUM_RESOURCES]; | ||
164 | |||
165 | /* Public data */ | ||
166 | volatile unsigned char *irqaddr; /* address of IRQ register */ | ||
167 | volatile unsigned char *fiqaddr; /* address of FIQ register */ | ||
168 | unsigned char irqmask; /* IRQ mask */ | ||
169 | unsigned char fiqmask; /* FIQ mask */ | ||
170 | unsigned char claimed; /* Card claimed? */ | ||
171 | |||
172 | void *irq_data; /* Data for use for IRQ by card */ | ||
173 | void *fiq_data; /* Data for use for FIQ by card */ | ||
174 | const expansioncard_ops_t *ops; /* Enable/Disable Ops for card */ | ||
175 | |||
176 | CONST unsigned int slot_no; /* Slot number */ | ||
177 | CONST unsigned int dma; /* DMA number (for request_dma) */ | ||
178 | CONST unsigned int irq; /* IRQ number (for request_irq) */ | ||
179 | CONST unsigned int fiq; /* FIQ number (for request_irq) */ | ||
180 | CONST card_type_t type; /* Type of card */ | ||
181 | CONST struct in_ecid cid; /* Card Identification */ | ||
182 | |||
183 | /* Private internal data */ | ||
184 | const char *card_desc; /* Card description */ | ||
185 | CONST unsigned int podaddr; /* Base Linux address for card */ | ||
186 | CONST loader_t loader; /* loader program */ | ||
187 | u64 dma_mask; | ||
188 | }; | ||
189 | |||
190 | struct in_chunk_dir { | ||
191 | unsigned int start_offset; | ||
192 | union { | ||
193 | unsigned char string[256]; | ||
194 | unsigned char data[1]; | ||
195 | } d; | ||
196 | }; | ||
197 | |||
198 | /* | ||
199 | * ecard_claim: claim an expansion card entry | ||
200 | * FIXME - are these atomic / called with interrupts off ? | ||
201 | */ | ||
202 | #define ecard_claim(ec) ((ec)->claimed = 1) | ||
203 | |||
204 | /* | ||
205 | * ecard_release: release an expansion card entry | ||
206 | */ | ||
207 | #define ecard_release(ec) ((ec)->claimed = 0) | ||
208 | |||
209 | /* | ||
210 | * Read a chunk from an expansion card | ||
211 | * cd : where to put read data | ||
212 | * ec : expansion card info struct | ||
213 | * id : id number to find | ||
214 | * num: (n+1)'th id to find. | ||
215 | */ | ||
216 | extern int ecard_readchunk (struct in_chunk_dir *cd, struct expansion_card *ec, int id, int num); | ||
217 | |||
218 | /* | ||
219 | * Obtain the address of a card | ||
220 | */ | ||
221 | extern unsigned int ecard_address (struct expansion_card *ec, card_type_t card_type, card_speed_t speed); | ||
222 | |||
223 | #ifdef ECARD_C | ||
224 | /* Definitions internal to ecard.c - for it's use only!! | ||
225 | * | ||
226 | * External expansion card header as read from the card | ||
227 | */ | ||
228 | struct ex_ecid { | ||
229 | unsigned char r_irq:1; | ||
230 | unsigned char r_zero:1; | ||
231 | unsigned char r_fiq:1; | ||
232 | unsigned char r_id:4; | ||
233 | unsigned char r_a:1; | ||
234 | |||
235 | unsigned char r_cd:1; | ||
236 | unsigned char r_is:1; | ||
237 | unsigned char r_w:2; | ||
238 | unsigned char r_r1:4; | ||
239 | |||
240 | unsigned char r_r2:8; | ||
241 | |||
242 | unsigned char r_prod[2]; | ||
243 | |||
244 | unsigned char r_manu[2]; | ||
245 | |||
246 | unsigned char r_country; | ||
247 | |||
248 | unsigned char r_irqmask; | ||
249 | unsigned char r_irqoff[3]; | ||
250 | |||
251 | unsigned char r_fiqmask; | ||
252 | unsigned char r_fiqoff[3]; | ||
253 | }; | ||
254 | |||
255 | /* | ||
256 | * Chunk directory entry as read from the card | ||
257 | */ | ||
258 | struct ex_chunk_dir { | ||
259 | unsigned char r_id; | ||
260 | unsigned char r_len[3]; | ||
261 | unsigned long r_start; | ||
262 | union { | ||
263 | char string[256]; | ||
264 | char data[1]; | ||
265 | } d; | ||
266 | #define c_id(x) ((x)->r_id) | ||
267 | #define c_len(x) ((x)->r_len[0]|((x)->r_len[1]<<8)|((x)->r_len[2]<<16)) | ||
268 | #define c_start(x) ((x)->r_start) | ||
269 | }; | ||
270 | |||
271 | #endif | ||
272 | |||
273 | extern struct bus_type ecard_bus_type; | ||
274 | |||
275 | #define ECARD_DEV(_d) container_of((_d), struct expansion_card, dev) | ||
276 | |||
277 | struct ecard_driver { | ||
278 | int (*probe)(struct expansion_card *, const struct ecard_id *id); | ||
279 | void (*remove)(struct expansion_card *); | ||
280 | void (*shutdown)(struct expansion_card *); | ||
281 | const struct ecard_id *id_table; | ||
282 | unsigned int id; | ||
283 | struct device_driver drv; | ||
284 | }; | ||
285 | |||
286 | #define ECARD_DRV(_d) container_of((_d), struct ecard_driver, drv) | ||
287 | |||
288 | #define ecard_set_drvdata(ec,data) dev_set_drvdata(&(ec)->dev, (data)) | ||
289 | #define ecard_get_drvdata(ec) dev_get_drvdata(&(ec)->dev) | ||
290 | |||
291 | int ecard_register_driver(struct ecard_driver *); | ||
292 | void ecard_remove_driver(struct ecard_driver *); | ||
293 | |||
294 | #endif | ||
diff --git a/include/asm-arm26/elf.h b/include/asm-arm26/elf.h deleted file mode 100644 index 5a47fdb3015d..000000000000 --- a/include/asm-arm26/elf.h +++ /dev/null | |||
@@ -1,77 +0,0 @@ | |||
1 | #ifndef __ASMARM_ELF_H | ||
2 | #define __ASMARM_ELF_H | ||
3 | |||
4 | /* | ||
5 | * ELF register definitions.. | ||
6 | */ | ||
7 | |||
8 | #include <asm/ptrace.h> | ||
9 | #include <asm/procinfo.h> | ||
10 | |||
11 | //FIXME - is it always 32K ? | ||
12 | |||
13 | #define ELF_EXEC_PAGESIZE 32768 | ||
14 | #define SET_PERSONALITY(ex,ibcs2) set_personality(PER_LINUX) | ||
15 | |||
16 | typedef unsigned long elf_greg_t; | ||
17 | typedef unsigned long elf_freg_t[3]; | ||
18 | |||
19 | #define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t)) | ||
20 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | ||
21 | |||
22 | typedef struct { void *null; } elf_fpregset_t; | ||
23 | |||
24 | /* | ||
25 | * This is used to ensure we don't load something for the wrong architecture. | ||
26 | * We can only execute 26-bit code. | ||
27 | */ | ||
28 | |||
29 | #define EM_ARM 40 | ||
30 | #define EF_ARM_APCS26 0x08 | ||
31 | |||
32 | //#define elf_check_arch(x) ( ((x)->e_machine == EM_ARM) && ((x)->e_flags & EF_ARM_APCS26) ) FIXME!!!!! - this looks OK, but the flags seem to be wrong. | ||
33 | #define elf_check_arch(x) (1) | ||
34 | |||
35 | /* | ||
36 | * These are used to set parameters in the core dumps. | ||
37 | */ | ||
38 | #define ELF_CLASS ELFCLASS32 | ||
39 | #define ELF_DATA ELFDATA2LSB | ||
40 | #define ELF_ARCH EM_ARM | ||
41 | |||
42 | #define USE_ELF_CORE_DUMP | ||
43 | |||
44 | /* This is the location that an ET_DYN program is loaded if exec'ed. Typical | ||
45 | use of this is to invoke "./ld.so someprog" to test out a new version of | ||
46 | the loader. We need to make sure that it is out of the way of the program | ||
47 | that it will "exec", and that there is sufficient room for the brk. */ | ||
48 | |||
49 | #define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3) | ||
50 | |||
51 | /* When the program starts, a1 contains a pointer to a function to be | ||
52 | registered with atexit, as per the SVR4 ABI. A value of 0 means we | ||
53 | have no such handler. */ | ||
54 | #define ELF_PLAT_INIT(_r, load_addr) (_r)->ARM_r0 = 0 | ||
55 | |||
56 | /* This yields a mask that user programs can use to figure out what | ||
57 | instruction set this cpu supports. */ | ||
58 | |||
59 | extern unsigned int elf_hwcap; | ||
60 | #define ELF_HWCAP (elf_hwcap) | ||
61 | |||
62 | /* This yields a string that ld.so will use to load implementation | ||
63 | specific libraries for optimization. This is more specific in | ||
64 | intent than poking at uname or /proc/cpuinfo. */ | ||
65 | |||
66 | /* For now we just provide a fairly general string that describes the | ||
67 | processor family. This could be made more specific later if someone | ||
68 | implemented optimisations that require it. 26-bit CPUs give you | ||
69 | "v1l" for ARM2 (no SWP) and "v2l" for anything else (ARM1 isn't | ||
70 | supported). | ||
71 | */ | ||
72 | |||
73 | #define ELF_PLATFORM_SIZE 8 | ||
74 | extern char elf_platform[]; | ||
75 | #define ELF_PLATFORM (elf_platform) | ||
76 | |||
77 | #endif | ||
diff --git a/include/asm-arm26/emergency-restart.h b/include/asm-arm26/emergency-restart.h deleted file mode 100644 index 108d8c48e42e..000000000000 --- a/include/asm-arm26/emergency-restart.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _ASM_EMERGENCY_RESTART_H | ||
2 | #define _ASM_EMERGENCY_RESTART_H | ||
3 | |||
4 | #include <asm-generic/emergency-restart.h> | ||
5 | |||
6 | #endif /* _ASM_EMERGENCY_RESTART_H */ | ||
diff --git a/include/asm-arm26/errno.h b/include/asm-arm26/errno.h deleted file mode 100644 index 6e60f0612bb6..000000000000 --- a/include/asm-arm26/errno.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _ARM_ERRNO_H | ||
2 | #define _ARM_ERRNO_H | ||
3 | |||
4 | #include <asm-generic/errno.h> | ||
5 | |||
6 | #endif | ||
diff --git a/include/asm-arm26/fb.h b/include/asm-arm26/fb.h deleted file mode 100644 index c7df38030992..000000000000 --- a/include/asm-arm26/fb.h +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | #ifndef _ASM_FB_H_ | ||
2 | #define _ASM_FB_H_ | ||
3 | #include <linux/fb.h> | ||
4 | |||
5 | #define fb_pgprotect(...) do {} while (0) | ||
6 | |||
7 | static inline int fb_is_primary_device(struct fb_info *info) | ||
8 | { | ||
9 | return 0; | ||
10 | } | ||
11 | |||
12 | #endif /* _ASM_FB_H_ */ | ||
diff --git a/include/asm-arm26/fcntl.h b/include/asm-arm26/fcntl.h deleted file mode 100644 index d85995e7459e..000000000000 --- a/include/asm-arm26/fcntl.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | #ifndef _ARM_FCNTL_H | ||
2 | #define _ARM_FCNTL_H | ||
3 | |||
4 | /* open/fcntl - O_SYNC is only implemented on blocks devices and on files | ||
5 | located on an ext2 file system */ | ||
6 | #define O_DIRECTORY 040000 /* must be a directory */ | ||
7 | #define O_NOFOLLOW 0100000 /* don't follow links */ | ||
8 | #define O_DIRECT 0200000 /* direct disk access hint - currently ignored */ | ||
9 | #define O_LARGEFILE 0400000 | ||
10 | |||
11 | #include <asm-generic/fcntl.h> | ||
12 | |||
13 | #endif | ||
diff --git a/include/asm-arm26/fiq.h b/include/asm-arm26/fiq.h deleted file mode 100644 index a3bad09e825c..000000000000 --- a/include/asm-arm26/fiq.h +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/fiq.h | ||
3 | * | ||
4 | * Support for FIQ on ARM architectures. | ||
5 | * Written by Philip Blundell <philb@gnu.org>, 1998 | ||
6 | * Re-written by Russell King | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASM_FIQ_H | ||
10 | #define __ASM_FIQ_H | ||
11 | |||
12 | #include <asm/ptrace.h> | ||
13 | |||
14 | struct fiq_handler { | ||
15 | struct fiq_handler *next; | ||
16 | /* Name | ||
17 | */ | ||
18 | const char *name; | ||
19 | /* Called to ask driver to relinquish/ | ||
20 | * reacquire FIQ | ||
21 | * return zero to accept, or -<errno> | ||
22 | */ | ||
23 | int (*fiq_op)(void *, int relinquish); | ||
24 | /* data for the relinquish/reacquire functions | ||
25 | */ | ||
26 | void *dev_id; | ||
27 | }; | ||
28 | |||
29 | extern int claim_fiq(struct fiq_handler *f); | ||
30 | extern void release_fiq(struct fiq_handler *f); | ||
31 | extern void set_fiq_handler(void *start, unsigned int length); | ||
32 | extern void set_fiq_regs(struct pt_regs *regs); | ||
33 | extern void get_fiq_regs(struct pt_regs *regs); | ||
34 | extern void enable_fiq(int fiq); | ||
35 | extern void disable_fiq(int fiq); | ||
36 | |||
37 | #endif | ||
diff --git a/include/asm-arm26/floppy.h b/include/asm-arm26/floppy.h deleted file mode 100644 index efb732165a4f..000000000000 --- a/include/asm-arm26/floppy.h +++ /dev/null | |||
@@ -1,141 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/floppy.h | ||
3 | * | ||
4 | * Copyright (C) 1996-2000 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * Note that we don't touch FLOPPY_DMA nor FLOPPY_IRQ here | ||
11 | */ | ||
12 | #ifndef __ASM_ARM_FLOPPY_H | ||
13 | #define __ASM_ARM_FLOPPY_H | ||
14 | |||
15 | #define fd_outb(val,port) \ | ||
16 | do { \ | ||
17 | if ((port) == FD_DOR) \ | ||
18 | fd_setdor((val)); \ | ||
19 | else \ | ||
20 | outb((val),(port)); \ | ||
21 | } while(0) | ||
22 | |||
23 | #define fd_inb(port) inb((port)) | ||
24 | #define fd_request_irq() request_irq(IRQ_FLOPPYDISK,floppy_interrupt,\ | ||
25 | IRQF_DISABLED,"floppy",NULL) | ||
26 | #define fd_free_irq() free_irq(IRQ_FLOPPYDISK,NULL) | ||
27 | #define fd_disable_irq() disable_irq(IRQ_FLOPPYDISK) | ||
28 | #define fd_enable_irq() enable_irq(IRQ_FLOPPYDISK) | ||
29 | |||
30 | #define fd_request_dma() request_dma(DMA_FLOPPY,"floppy") | ||
31 | #define fd_free_dma() free_dma(DMA_FLOPPY) | ||
32 | #define fd_disable_dma() disable_dma(DMA_FLOPPY) | ||
33 | #define fd_enable_dma() enable_dma(DMA_FLOPPY) | ||
34 | #define fd_clear_dma_ff() clear_dma_ff(DMA_FLOPPY) | ||
35 | #define fd_set_dma_mode(mode) set_dma_mode(DMA_FLOPPY, (mode)) | ||
36 | #define fd_set_dma_addr(addr) set_dma_addr(DMA_FLOPPY, virt_to_bus((addr))) | ||
37 | #define fd_set_dma_count(len) set_dma_count(DMA_FLOPPY, (len)) | ||
38 | #define fd_cacheflush(addr,sz) | ||
39 | |||
40 | /* need to clean up dma.h */ | ||
41 | #define DMA_FLOPPYDISK DMA_FLOPPY | ||
42 | |||
43 | /* Floppy_selects is the list of DOR's to select drive fd | ||
44 | * | ||
45 | * On initialisation, the floppy list is scanned, and the drives allocated | ||
46 | * in the order that they are found. This is done by seeking the drive | ||
47 | * to a non-zero track, and then restoring it to track 0. If an error occurs, | ||
48 | * then there is no floppy drive present. [to be put back in again] | ||
49 | */ | ||
50 | static unsigned char floppy_selects[2][4] = | ||
51 | { | ||
52 | { 0x10, 0x21, 0x23, 0x33 }, | ||
53 | { 0x10, 0x21, 0x23, 0x33 } | ||
54 | }; | ||
55 | |||
56 | #define fd_setdor(dor) \ | ||
57 | do { \ | ||
58 | int new_dor = (dor); \ | ||
59 | if (new_dor & 0xf0) \ | ||
60 | new_dor = (new_dor & 0x0c) | floppy_selects[fdc][new_dor & 3]; \ | ||
61 | else \ | ||
62 | new_dor &= 0x0c; \ | ||
63 | outb(new_dor, FD_DOR); \ | ||
64 | } while (0) | ||
65 | |||
66 | /* | ||
67 | * Someday, we'll automatically detect which drives are present... | ||
68 | */ | ||
69 | static inline void fd_scandrives (void) | ||
70 | { | ||
71 | #if 0 | ||
72 | int floppy, drive_count; | ||
73 | |||
74 | fd_disable_irq(); | ||
75 | raw_cmd = &default_raw_cmd; | ||
76 | raw_cmd->flags = FD_RAW_SPIN | FD_RAW_NEED_SEEK; | ||
77 | raw_cmd->track = 0; | ||
78 | raw_cmd->rate = ?; | ||
79 | drive_count = 0; | ||
80 | for (floppy = 0; floppy < 4; floppy ++) { | ||
81 | current_drive = drive_count; | ||
82 | /* | ||
83 | * Turn on floppy motor | ||
84 | */ | ||
85 | if (start_motor(redo_fd_request)) | ||
86 | continue; | ||
87 | /* | ||
88 | * Set up FDC | ||
89 | */ | ||
90 | fdc_specify(); | ||
91 | /* | ||
92 | * Tell FDC to recalibrate | ||
93 | */ | ||
94 | output_byte(FD_RECALIBRATE); | ||
95 | LAST_OUT(UNIT(floppy)); | ||
96 | /* wait for command to complete */ | ||
97 | if (!successful) { | ||
98 | int i; | ||
99 | for (i = drive_count; i < 3; i--) | ||
100 | floppy_selects[fdc][i] = floppy_selects[fdc][i + 1]; | ||
101 | floppy_selects[fdc][3] = 0; | ||
102 | floppy -= 1; | ||
103 | } else | ||
104 | drive_count++; | ||
105 | } | ||
106 | #else | ||
107 | floppy_selects[0][0] = 0x10; | ||
108 | floppy_selects[0][1] = 0x21; | ||
109 | floppy_selects[0][2] = 0x23; | ||
110 | floppy_selects[0][3] = 0x33; | ||
111 | #endif | ||
112 | } | ||
113 | |||
114 | #define FDC1 (0x3f0) | ||
115 | |||
116 | #define FLOPPY0_TYPE 4 | ||
117 | #define FLOPPY1_TYPE 4 | ||
118 | |||
119 | #define N_FDC 1 | ||
120 | #define N_DRIVE 4 | ||
121 | |||
122 | #define FLOPPY_MOTOR_MASK 0xf0 | ||
123 | |||
124 | #define CROSS_64KB(a,s) (0) | ||
125 | |||
126 | /* | ||
127 | * This allows people to reverse the order of | ||
128 | * fd0 and fd1, in case their hardware is | ||
129 | * strangely connected (as some RiscPCs | ||
130 | * and A5000s seem to be). | ||
131 | */ | ||
132 | static void driveswap(int *ints, int dummy, int dummy2) | ||
133 | { | ||
134 | floppy_selects[0][0] ^= floppy_selects[0][1]; | ||
135 | floppy_selects[0][1] ^= floppy_selects[0][0]; | ||
136 | floppy_selects[0][0] ^= floppy_selects[0][1]; | ||
137 | } | ||
138 | |||
139 | #define EXTRA_FLOPPY_PARAMS ,{ "driveswap", &driveswap, NULL, 0, 0 } | ||
140 | |||
141 | #endif | ||
diff --git a/include/asm-arm26/fpstate.h b/include/asm-arm26/fpstate.h deleted file mode 100644 index 785749b3c5ab..000000000000 --- a/include/asm-arm26/fpstate.h +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/fpstate.h | ||
3 | * | ||
4 | * Copyright (C) 1995 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #ifndef __ASM_ARM_FPSTATE_H | ||
12 | #define __ASM_ARM_FPSTATE_H | ||
13 | |||
14 | #define FP_SIZE 35 | ||
15 | |||
16 | struct fp_hard_struct { | ||
17 | unsigned int save[FP_SIZE]; /* as yet undefined */ | ||
18 | }; | ||
19 | |||
20 | struct fp_soft_struct { | ||
21 | unsigned int save[FP_SIZE]; /* undefined information */ | ||
22 | }; | ||
23 | |||
24 | union fp_state { | ||
25 | struct fp_hard_struct hard; | ||
26 | struct fp_soft_struct soft; | ||
27 | }; | ||
28 | |||
29 | #endif | ||
diff --git a/include/asm-arm26/futex.h b/include/asm-arm26/futex.h deleted file mode 100644 index 6a332a9f099c..000000000000 --- a/include/asm-arm26/futex.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _ASM_FUTEX_H | ||
2 | #define _ASM_FUTEX_H | ||
3 | |||
4 | #include <asm-generic/futex.h> | ||
5 | |||
6 | #endif | ||
diff --git a/include/asm-arm26/hardirq.h b/include/asm-arm26/hardirq.h deleted file mode 100644 index e717742ffce0..000000000000 --- a/include/asm-arm26/hardirq.h +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | #ifndef __ASM_HARDIRQ_H | ||
2 | #define __ASM_HARDIRQ_H | ||
3 | |||
4 | #include <linux/cache.h> | ||
5 | #include <linux/threads.h> | ||
6 | #include <asm/irq.h> | ||
7 | |||
8 | typedef struct { | ||
9 | unsigned int __softirq_pending; | ||
10 | } ____cacheline_aligned irq_cpustat_t; | ||
11 | |||
12 | #include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ | ||
13 | |||
14 | #define HARDIRQ_BITS 8 | ||
15 | |||
16 | /* | ||
17 | * The hardirq mask has to be large enough to have space | ||
18 | * for potentially all IRQ sources in the system nesting | ||
19 | * on a single CPU: | ||
20 | */ | ||
21 | #if (1 << HARDIRQ_BITS) < NR_IRQS | ||
22 | # error HARDIRQ_BITS is too low! | ||
23 | #endif | ||
24 | |||
25 | #ifndef CONFIG_SMP | ||
26 | |||
27 | extern asmlinkage void __do_softirq(void); | ||
28 | |||
29 | #endif | ||
30 | |||
31 | |||
32 | #endif /* __ASM_HARDIRQ_H */ | ||
diff --git a/include/asm-arm26/hardware.h b/include/asm-arm26/hardware.h deleted file mode 100644 index 801df0bde8b7..000000000000 --- a/include/asm-arm26/hardware.h +++ /dev/null | |||
@@ -1,109 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-arc/hardware.h | ||
3 | * | ||
4 | * Copyright (C) 1996-1999 Russell King. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * This file contains the hardware definitions of the | ||
11 | * Acorn Archimedes/A5000 machines. | ||
12 | * | ||
13 | * Modifications: | ||
14 | * 04-04-1998 PJB/RMK Merged arc and a5k versions | ||
15 | */ | ||
16 | #ifndef __ASM_HARDWARE_H | ||
17 | #define __ASM_HARDWARE_H | ||
18 | |||
19 | |||
20 | |||
21 | /* | ||
22 | * What hardware must be present - these can be tested by the kernel | ||
23 | * source. | ||
24 | */ | ||
25 | #define HAS_IOC | ||
26 | #define HAS_MEMC | ||
27 | #define HAS_VIDC | ||
28 | |||
29 | #define VDMA_ALIGNMENT PAGE_SIZE | ||
30 | #define VDMA_XFERSIZE 16 | ||
31 | #define VDMA_INIT 0 | ||
32 | #define VDMA_START 1 | ||
33 | #define VDMA_END 2 | ||
34 | |||
35 | #ifndef __ASSEMBLY__ | ||
36 | extern void memc_write(unsigned int reg, unsigned long val); | ||
37 | |||
38 | #define video_set_dma(start,end,offset) \ | ||
39 | do { \ | ||
40 | memc_write (VDMA_START, (start >> 2)); \ | ||
41 | memc_write (VDMA_END, (end - VDMA_XFERSIZE) >> 2); \ | ||
42 | memc_write (VDMA_INIT, (offset >> 2)); \ | ||
43 | } while (0) | ||
44 | #endif | ||
45 | |||
46 | |||
47 | /* Hardware addresses of major areas. | ||
48 | * *_START is the physical address | ||
49 | * *_SIZE is the size of the region | ||
50 | * *_BASE is the virtual address | ||
51 | */ | ||
52 | #define IO_START 0x03000000 | ||
53 | #define IO_SIZE 0x01000000 | ||
54 | #define IO_BASE 0x03000000 | ||
55 | |||
56 | /* | ||
57 | * Screen mapping information | ||
58 | */ | ||
59 | #define SCREEN_START 0x02000000 | ||
60 | #define SCREEN_END 0x02078000 | ||
61 | #define SCREEN_SIZE 0x00078000 | ||
62 | #define SCREEN_BASE 0x02000000 | ||
63 | |||
64 | |||
65 | #define EXPMASK_BASE 0x03360000 | ||
66 | #define IOEB_BASE 0x03350000 | ||
67 | #define VIDC_BASE 0x03400000 | ||
68 | #define LATCHA_BASE 0x03250040 | ||
69 | #define LATCHB_BASE 0x03250018 | ||
70 | #define IOC_BASE 0x03200000 | ||
71 | #define FLOPPYDMA_BASE 0x0302a000 | ||
72 | #define PCIO_BASE 0x03010000 | ||
73 | |||
74 | // FIXME - are the below correct? | ||
75 | #define PODSLOT_IOC0_BASE 0x03240000 | ||
76 | #define PODSLOT_IOC_SIZE (1 << 14) | ||
77 | #define PODSLOT_MEMC_BASE 0x03000000 | ||
78 | #define PODSLOT_MEMC_SIZE (1 << 14) | ||
79 | |||
80 | #define vidc_writel(val) __raw_writel(val, VIDC_BASE) | ||
81 | |||
82 | #ifndef __ASSEMBLY__ | ||
83 | |||
84 | /* | ||
85 | * for use with inb/outb | ||
86 | */ | ||
87 | #define IOEB_VID_CTL (IOEB_BASE + 0x48) | ||
88 | #define IOEB_PRESENT (IOEB_BASE + 0x50) | ||
89 | #define IOEB_PSCLR (IOEB_BASE + 0x58) | ||
90 | #define IOEB_MONTYPE (IOEB_BASE + 0x70) | ||
91 | |||
92 | //FIXME - These adresses are weird - ISTR some weirdo address shifting stuff was going on here... | ||
93 | #define IO_EC_IOC_BASE 0x80090000 | ||
94 | #define IO_EC_MEMC_BASE 0x80000000 | ||
95 | |||
96 | #ifdef CONFIG_ARCH_ARC | ||
97 | /* A680 hardware */ | ||
98 | #define WD1973_BASE 0x03290000 | ||
99 | #define WD1973_LATCH 0x03350000 | ||
100 | #define Z8530_BASE 0x032b0008 | ||
101 | #define SCSI_BASE 0x03100000 | ||
102 | #endif | ||
103 | |||
104 | #endif | ||
105 | |||
106 | #define EXPMASK_STATUS (EXPMASK_BASE + 0x00) | ||
107 | #define EXPMASK_ENABLE (EXPMASK_BASE + 0x04) | ||
108 | |||
109 | #endif | ||
diff --git a/include/asm-arm26/ide.h b/include/asm-arm26/ide.h deleted file mode 100644 index db804d751df9..000000000000 --- a/include/asm-arm26/ide.h +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/ide.h | ||
3 | * | ||
4 | * Copyright (C) 1994-1996 Linus Torvalds & authors | ||
5 | */ | ||
6 | |||
7 | /* | ||
8 | * This file contains the i386 architecture specific IDE code. | ||
9 | */ | ||
10 | |||
11 | #ifndef __ASMARM_IDE_H | ||
12 | #define __ASMARM_IDE_H | ||
13 | |||
14 | #ifdef __KERNEL__ | ||
15 | |||
16 | #ifndef MAX_HWIFS | ||
17 | #define MAX_HWIFS 4 | ||
18 | #endif | ||
19 | |||
20 | #include <asm/irq.h> | ||
21 | #include <asm/mach-types.h> | ||
22 | |||
23 | /* JMA 18.05.03 these will never be needed, but the kernel needs them to compile */ | ||
24 | #define __ide_mm_insw(port,addr,len) readsw(port,addr,len) | ||
25 | #define __ide_mm_insl(port,addr,len) readsl(port,addr,len) | ||
26 | #define __ide_mm_outsw(port,addr,len) writesw(port,addr,len) | ||
27 | #define __ide_mm_outsl(port,addr,len) writesl(port,addr,len) | ||
28 | |||
29 | #define IDE_ARCH_OBSOLETE_INIT | ||
30 | #define ide_default_io_ctl(base) (0) | ||
31 | |||
32 | #endif /* __KERNEL__ */ | ||
33 | |||
34 | #endif /* __ASMARM_IDE_H */ | ||
diff --git a/include/asm-arm26/io.h b/include/asm-arm26/io.h deleted file mode 100644 index a5a7a4d5e09c..000000000000 --- a/include/asm-arm26/io.h +++ /dev/null | |||
@@ -1,434 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/io.h | ||
3 | * | ||
4 | * Copyright (C) 1996-2000 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * Modifications: | ||
11 | * 16-Sep-1996 RMK Inlined the inx/outx functions & optimised for both | ||
12 | * constant addresses and variable addresses. | ||
13 | * 04-Dec-1997 RMK Moved a lot of this stuff to the new architecture | ||
14 | * specific IO header files. | ||
15 | * 27-Mar-1999 PJB Second parameter of memcpy_toio is const.. | ||
16 | * 04-Apr-1999 PJB Added check_signature. | ||
17 | * 12-Dec-1999 RMK More cleanups | ||
18 | * 18-Jun-2000 RMK Removed virt_to_* and friends definitions | ||
19 | */ | ||
20 | #ifndef __ASM_ARM_IO_H | ||
21 | #define __ASM_ARM_IO_H | ||
22 | |||
23 | #ifdef __KERNEL__ | ||
24 | |||
25 | #include <linux/types.h> | ||
26 | #include <asm/byteorder.h> | ||
27 | #include <asm/memory.h> | ||
28 | #include <asm/hardware.h> | ||
29 | |||
30 | /* | ||
31 | * Generic IO read/write. These perform native-endian accesses. Note | ||
32 | * that some architectures will want to re-define __raw_{read,write}w. | ||
33 | */ | ||
34 | extern void __raw_writesb(unsigned int addr, const void *data, int bytelen); | ||
35 | extern void __raw_writesw(unsigned int addr, const void *data, int wordlen); | ||
36 | extern void __raw_writesl(unsigned int addr, const void *data, int longlen); | ||
37 | |||
38 | extern void __raw_readsb(unsigned int addr, void *data, int bytelen); | ||
39 | extern void __raw_readsw(unsigned int addr, void *data, int wordlen); | ||
40 | extern void __raw_readsl(unsigned int addr, void *data, int longlen); | ||
41 | |||
42 | #define __raw_writeb(v,a) (*(volatile unsigned char *)(a) = (v)) | ||
43 | #define __raw_writew(v,a) (*(volatile unsigned short *)(a) = (v)) | ||
44 | #define __raw_writel(v,a) (*(volatile unsigned int *)(a) = (v)) | ||
45 | |||
46 | #define __raw_readb(a) (*(volatile unsigned char *)(a)) | ||
47 | #define __raw_readw(a) (*(volatile unsigned short *)(a)) | ||
48 | #define __raw_readl(a) (*(volatile unsigned int *)(a)) | ||
49 | |||
50 | |||
51 | /* | ||
52 | * Bad read/write accesses... | ||
53 | */ | ||
54 | extern void __readwrite_bug(const char *fn); | ||
55 | |||
56 | /* | ||
57 | * Now, pick up the machine-defined IO definitions | ||
58 | */ | ||
59 | |||
60 | #define IO_SPACE_LIMIT 0xffffffff | ||
61 | |||
62 | /* | ||
63 | * GCC is totally crap at loading/storing data. We try to persuade it | ||
64 | * to do the right thing by using these whereever possible instead of | ||
65 | * the above. | ||
66 | */ | ||
67 | #define __arch_base_getb(b,o) \ | ||
68 | ({ \ | ||
69 | unsigned int v, r = (b); \ | ||
70 | __asm__ __volatile__( \ | ||
71 | "ldrb %0, [%1, %2]" \ | ||
72 | : "=r" (v) \ | ||
73 | : "r" (r), "Ir" (o)); \ | ||
74 | v; \ | ||
75 | }) | ||
76 | |||
77 | #define __arch_base_getl(b,o) \ | ||
78 | ({ \ | ||
79 | unsigned int v, r = (b); \ | ||
80 | __asm__ __volatile__( \ | ||
81 | "ldr %0, [%1, %2]" \ | ||
82 | : "=r" (v) \ | ||
83 | : "r" (r), "Ir" (o)); \ | ||
84 | v; \ | ||
85 | }) | ||
86 | |||
87 | #define __arch_base_putb(v,b,o) \ | ||
88 | ({ \ | ||
89 | unsigned int r = (b); \ | ||
90 | __asm__ __volatile__( \ | ||
91 | "strb %0, [%1, %2]" \ | ||
92 | : \ | ||
93 | : "r" (v), "r" (r), "Ir" (o)); \ | ||
94 | }) | ||
95 | |||
96 | #define __arch_base_putl(v,b,o) \ | ||
97 | ({ \ | ||
98 | unsigned int r = (b); \ | ||
99 | __asm__ __volatile__( \ | ||
100 | "str %0, [%1, %2]" \ | ||
101 | : \ | ||
102 | : "r" (v), "r" (r), "Ir" (o)); \ | ||
103 | }) | ||
104 | |||
105 | /* | ||
106 | * We use two different types of addressing - PC style addresses, and ARM | ||
107 | * addresses. PC style accesses the PC hardware with the normal PC IO | ||
108 | * addresses, eg 0x3f8 for serial#1. ARM addresses are 0x80000000+ | ||
109 | * and are translated to the start of IO. Note that all addresses are | ||
110 | * shifted left! | ||
111 | */ | ||
112 | #define __PORT_PCIO(x) (!((x) & 0x80000000)) | ||
113 | |||
114 | /* | ||
115 | * Dynamic IO functions - let the compiler | ||
116 | * optimize the expressions | ||
117 | */ | ||
118 | static inline void __outb (unsigned int value, unsigned int port) | ||
119 | { | ||
120 | unsigned long temp; | ||
121 | __asm__ __volatile__( | ||
122 | "tst %2, #0x80000000\n\t" | ||
123 | "mov %0, %4\n\t" | ||
124 | "addeq %0, %0, %3\n\t" | ||
125 | "strb %1, [%0, %2, lsl #2] @ outb" | ||
126 | : "=&r" (temp) | ||
127 | : "r" (value), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE) | ||
128 | : "cc"); | ||
129 | } | ||
130 | |||
131 | static inline void __outw (unsigned int value, unsigned int port) | ||
132 | { | ||
133 | unsigned long temp; | ||
134 | __asm__ __volatile__( | ||
135 | "tst %2, #0x80000000\n\t" | ||
136 | "mov %0, %4\n\t" | ||
137 | "addeq %0, %0, %3\n\t" | ||
138 | "str %1, [%0, %2, lsl #2] @ outw" | ||
139 | : "=&r" (temp) | ||
140 | : "r" (value|value<<16), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE) | ||
141 | : "cc"); | ||
142 | } | ||
143 | |||
144 | static inline void __outl (unsigned int value, unsigned int port) | ||
145 | { | ||
146 | unsigned long temp; | ||
147 | __asm__ __volatile__( | ||
148 | "tst %2, #0x80000000\n\t" | ||
149 | "mov %0, %4\n\t" | ||
150 | "addeq %0, %0, %3\n\t" | ||
151 | "str %1, [%0, %2, lsl #2] @ outl" | ||
152 | : "=&r" (temp) | ||
153 | : "r" (value), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE) | ||
154 | : "cc"); | ||
155 | } | ||
156 | |||
157 | #define DECLARE_DYN_IN(sz,fnsuffix,instr) \ | ||
158 | static inline unsigned sz __in##fnsuffix (unsigned int port) \ | ||
159 | { \ | ||
160 | unsigned long temp, value; \ | ||
161 | __asm__ __volatile__( \ | ||
162 | "tst %2, #0x80000000\n\t" \ | ||
163 | "mov %0, %4\n\t" \ | ||
164 | "addeq %0, %0, %3\n\t" \ | ||
165 | "ldr" instr " %1, [%0, %2, lsl #2] @ in" #fnsuffix \ | ||
166 | : "=&r" (temp), "=r" (value) \ | ||
167 | : "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE) \ | ||
168 | : "cc"); \ | ||
169 | return (unsigned sz)value; \ | ||
170 | } | ||
171 | |||
172 | static inline unsigned int __ioaddr (unsigned int port) \ | ||
173 | { \ | ||
174 | if (__PORT_PCIO(port)) \ | ||
175 | return (unsigned int)(PCIO_BASE + (port << 2)); \ | ||
176 | else \ | ||
177 | return (unsigned int)(IO_BASE + (port << 2)); \ | ||
178 | } | ||
179 | |||
180 | #define DECLARE_IO(sz,fnsuffix,instr) \ | ||
181 | DECLARE_DYN_IN(sz,fnsuffix,instr) | ||
182 | |||
183 | DECLARE_IO(char,b,"b") | ||
184 | DECLARE_IO(short,w,"") | ||
185 | DECLARE_IO(int,l,"") | ||
186 | |||
187 | #undef DECLARE_IO | ||
188 | #undef DECLARE_DYN_IN | ||
189 | |||
190 | /* | ||
191 | * Constant address IO functions | ||
192 | * | ||
193 | * These have to be macros for the 'J' constraint to work - | ||
194 | * +/-4096 immediate operand. | ||
195 | */ | ||
196 | #define __outbc(value,port) \ | ||
197 | ({ \ | ||
198 | if (__PORT_PCIO((port))) \ | ||
199 | __asm__ __volatile__( \ | ||
200 | "strb %0, [%1, %2] @ outbc" \ | ||
201 | : : "r" (value), "r" (PCIO_BASE), "Jr" ((port) << 2)); \ | ||
202 | else \ | ||
203 | __asm__ __volatile__( \ | ||
204 | "strb %0, [%1, %2] @ outbc" \ | ||
205 | : : "r" (value), "r" (IO_BASE), "r" ((port) << 2)); \ | ||
206 | }) | ||
207 | |||
208 | #define __inbc(port) \ | ||
209 | ({ \ | ||
210 | unsigned char result; \ | ||
211 | if (__PORT_PCIO((port))) \ | ||
212 | __asm__ __volatile__( \ | ||
213 | "ldrb %0, [%1, %2] @ inbc" \ | ||
214 | : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port) << 2)); \ | ||
215 | else \ | ||
216 | __asm__ __volatile__( \ | ||
217 | "ldrb %0, [%1, %2] @ inbc" \ | ||
218 | : "=r" (result) : "r" (IO_BASE), "r" ((port) << 2)); \ | ||
219 | result; \ | ||
220 | }) | ||
221 | |||
222 | #define __outwc(value,port) \ | ||
223 | ({ \ | ||
224 | unsigned long v = value; \ | ||
225 | if (__PORT_PCIO((port))) \ | ||
226 | __asm__ __volatile__( \ | ||
227 | "str %0, [%1, %2] @ outwc" \ | ||
228 | : : "r" (v|v<<16), "r" (PCIO_BASE), "Jr" ((port) << 2)); \ | ||
229 | else \ | ||
230 | __asm__ __volatile__( \ | ||
231 | "str %0, [%1, %2] @ outwc" \ | ||
232 | : : "r" (v|v<<16), "r" (IO_BASE), "r" ((port) << 2)); \ | ||
233 | }) | ||
234 | |||
235 | #define __inwc(port) \ | ||
236 | ({ \ | ||
237 | unsigned short result; \ | ||
238 | if (__PORT_PCIO((port))) \ | ||
239 | __asm__ __volatile__( \ | ||
240 | "ldr %0, [%1, %2] @ inwc" \ | ||
241 | : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port) << 2)); \ | ||
242 | else \ | ||
243 | __asm__ __volatile__( \ | ||
244 | "ldr %0, [%1, %2] @ inwc" \ | ||
245 | : "=r" (result) : "r" (IO_BASE), "r" ((port) << 2)); \ | ||
246 | result & 0xffff; \ | ||
247 | }) | ||
248 | |||
249 | #define __outlc(value,port) \ | ||
250 | ({ \ | ||
251 | unsigned long v = value; \ | ||
252 | if (__PORT_PCIO((port))) \ | ||
253 | __asm__ __volatile__( \ | ||
254 | "str %0, [%1, %2] @ outlc" \ | ||
255 | : : "r" (v), "r" (PCIO_BASE), "Jr" ((port) << 2)); \ | ||
256 | else \ | ||
257 | __asm__ __volatile__( \ | ||
258 | "str %0, [%1, %2] @ outlc" \ | ||
259 | : : "r" (v), "r" (IO_BASE), "r" ((port) << 2)); \ | ||
260 | }) | ||
261 | |||
262 | #define __inlc(port) \ | ||
263 | ({ \ | ||
264 | unsigned long result; \ | ||
265 | if (__PORT_PCIO((port))) \ | ||
266 | __asm__ __volatile__( \ | ||
267 | "ldr %0, [%1, %2] @ inlc" \ | ||
268 | : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port) << 2)); \ | ||
269 | else \ | ||
270 | __asm__ __volatile__( \ | ||
271 | "ldr %0, [%1, %2] @ inlc" \ | ||
272 | : "=r" (result) : "r" (IO_BASE), "r" ((port) << 2)); \ | ||
273 | result; \ | ||
274 | }) | ||
275 | |||
276 | #define __ioaddrc(port) \ | ||
277 | ({ \ | ||
278 | unsigned long addr; \ | ||
279 | if (__PORT_PCIO((port))) \ | ||
280 | addr = PCIO_BASE + ((port) << 2); \ | ||
281 | else \ | ||
282 | addr = IO_BASE + ((port) << 2); \ | ||
283 | addr; \ | ||
284 | }) | ||
285 | |||
286 | #define inb(p) (__builtin_constant_p((p)) ? __inbc(p) : __inb(p)) | ||
287 | #define inw(p) (__builtin_constant_p((p)) ? __inwc(p) : __inw(p)) | ||
288 | #define inl(p) (__builtin_constant_p((p)) ? __inlc(p) : __inl(p)) | ||
289 | #define outb(v,p) (__builtin_constant_p((p)) ? __outbc(v,p) : __outb(v,p)) | ||
290 | #define outw(v,p) (__builtin_constant_p((p)) ? __outwc(v,p) : __outw(v,p)) | ||
291 | #define outl(v,p) (__builtin_constant_p((p)) ? __outlc(v,p) : __outl(v,p)) | ||
292 | #define __ioaddr(p) (__builtin_constant_p((p)) ? __ioaddr(p) : __ioaddrc(p)) | ||
293 | |||
294 | /* JMA 18.02.03 added sb,sl from arm/io.h, changing io to ioaddr */ | ||
295 | |||
296 | #define outsb(p,d,l) __raw_writesb(__ioaddr(p),d,l) | ||
297 | #define outsw(p,d,l) __raw_writesw(__ioaddr(p),d,l) | ||
298 | #define outsl(p,d,l) __raw_writesl(__ioaddr(p),d,l) | ||
299 | |||
300 | #define insb(p,d,l) __raw_readsb(__ioaddr(p),d,l) | ||
301 | #define insw(p,d,l) __raw_readsw(__ioaddr(p),d,l) | ||
302 | #define insl(p,d,l) __raw_readsl(__ioaddr(p),d,l) | ||
303 | |||
304 | #define insw(p,d,l) __raw_readsw(__ioaddr(p),d,l) | ||
305 | #define outsw(p,d,l) __raw_writesw(__ioaddr(p),d,l) | ||
306 | |||
307 | #define readb(c) (__readwrite_bug("readb"),0) | ||
308 | #define readw(c) (__readwrite_bug("readw"),0) | ||
309 | #define readl(c) (__readwrite_bug("readl"),0) | ||
310 | #define readb_relaxed(addr) readb(addr) | ||
311 | #define readw_relaxed(addr) readw(addr) | ||
312 | #define readl_relaxed(addr) readl(addr) | ||
313 | #define writeb(v,c) __readwrite_bug("writeb") | ||
314 | #define writew(v,c) __readwrite_bug("writew") | ||
315 | #define writel(v,c) __readwrite_bug("writel") | ||
316 | |||
317 | #define readsw(p,d,l) (__readwrite_bug("readsw"),0) | ||
318 | #define readsl(p,d,l) (__readwrite_bug("readsl"),0) | ||
319 | #define writesw(p,d,l) __readwrite_bug("writesw") | ||
320 | #define writesl(p,d,l) __readwrite_bug("writesl") | ||
321 | |||
322 | #define mmiowb() | ||
323 | |||
324 | /* the following macro is deprecated */ | ||
325 | #define ioaddr(port) __ioaddr((port)) | ||
326 | |||
327 | /* | ||
328 | * No ioremap support here. | ||
329 | */ | ||
330 | #define __arch_ioremap(c,s,f,a) ((void *)(c)) | ||
331 | #define __arch_iounmap(c) do { } while (0) | ||
332 | |||
333 | |||
334 | #if defined(__arch_putb) || defined(__arch_putw) || defined(__arch_putl) || \ | ||
335 | defined(__arch_getb) || defined(__arch_getw) || defined(__arch_getl) | ||
336 | #warning machine class uses old __arch_putw or __arch_getw | ||
337 | #endif | ||
338 | |||
339 | /* | ||
340 | * IO port access primitives | ||
341 | * ------------------------- | ||
342 | * | ||
343 | * The ARM doesn't have special IO access instructions; all IO is memory | ||
344 | * mapped. Note that these are defined to perform little endian accesses | ||
345 | * only. Their primary purpose is to access PCI and ISA peripherals. | ||
346 | * | ||
347 | * Note that for a big endian machine, this implies that the following | ||
348 | * big endian mode connectivity is in place, as described by numerious | ||
349 | * ARM documents: | ||
350 | * | ||
351 | * PCI: D0-D7 D8-D15 D16-D23 D24-D31 | ||
352 | * ARM: D24-D31 D16-D23 D8-D15 D0-D7 | ||
353 | * | ||
354 | * The machine specific io.h include defines __io to translate an "IO" | ||
355 | * address to a memory address. | ||
356 | * | ||
357 | * Note that we prevent GCC re-ordering or caching values in expressions | ||
358 | * by introducing sequence points into the in*() definitions. Note that | ||
359 | * __raw_* do not guarantee this behaviour. | ||
360 | */ | ||
361 | /* | ||
362 | #define outsb(p,d,l) __raw_writesb(__io(p),d,l) | ||
363 | #define outsw(p,d,l) __raw_writesw(__io(p),d,l) | ||
364 | |||
365 | #define insb(p,d,l) __raw_readsb(__io(p),d,l) | ||
366 | #define insw(p,d,l) __raw_readsw(__io(p),d,l) | ||
367 | */ | ||
368 | #define outb_p(val,port) outb((val),(port)) | ||
369 | #define outw_p(val,port) outw((val),(port)) | ||
370 | #define inb_p(port) inb((port)) | ||
371 | #define inw_p(port) inw((port)) | ||
372 | #define inl_p(port) inl((port)) | ||
373 | |||
374 | #define outsb_p(port,from,len) outsb(port,from,len) | ||
375 | #define outsw_p(port,from,len) outsw(port,from,len) | ||
376 | #define insb_p(port,to,len) insb(port,to,len) | ||
377 | #define insw_p(port,to,len) insw(port,to,len) | ||
378 | |||
379 | /* | ||
380 | * String version of IO memory access ops: | ||
381 | */ | ||
382 | extern void _memcpy_fromio(void *, unsigned long, size_t); | ||
383 | extern void _memcpy_toio(unsigned long, const void *, size_t); | ||
384 | extern void _memset_io(unsigned long, int, size_t); | ||
385 | |||
386 | /* | ||
387 | * ioremap and friends. | ||
388 | * | ||
389 | * ioremap takes a PCI memory address, as specified in | ||
390 | * Documentation/IO-mapping.txt. | ||
391 | */ | ||
392 | extern void * __ioremap(unsigned long, size_t, unsigned long, unsigned long); | ||
393 | extern void __iounmap(void *addr); | ||
394 | |||
395 | #ifndef __arch_ioremap | ||
396 | #define ioremap(cookie,size) __ioremap(cookie,size,0,1) | ||
397 | #define ioremap_nocache(cookie,size) __ioremap(cookie,size,0,1) | ||
398 | #define iounmap(cookie) __iounmap(cookie) | ||
399 | #else | ||
400 | #define ioremap(cookie,size) __arch_ioremap((cookie),(size),0,1) | ||
401 | #define ioremap_nocache(cookie,size) __arch_ioremap((cookie),(size),0,1) | ||
402 | #define iounmap(cookie) __arch_iounmap(cookie) | ||
403 | #endif | ||
404 | |||
405 | /* | ||
406 | * DMA-consistent mapping functions. These allocate/free a region of | ||
407 | * uncached, unwrite-buffered mapped memory space for use with DMA | ||
408 | * devices. This is the "generic" version. The PCI specific version | ||
409 | * is in pci.h | ||
410 | */ | ||
411 | extern void *consistent_alloc(int gfp, size_t size, dma_addr_t *handle); | ||
412 | extern void consistent_free(void *vaddr, size_t size, dma_addr_t handle); | ||
413 | extern void consistent_sync(void *vaddr, size_t size, int rw); | ||
414 | |||
415 | /* | ||
416 | * can the hardware map this into one segment or not, given no other | ||
417 | * constraints. | ||
418 | */ | ||
419 | #define BIOVEC_MERGEABLE(vec1, vec2) \ | ||
420 | ((bvec_to_phys((vec1)) + (vec1)->bv_len) == bvec_to_phys((vec2))) | ||
421 | |||
422 | /* | ||
423 | * Convert a physical pointer to a virtual kernel pointer for /dev/mem | ||
424 | * access | ||
425 | */ | ||
426 | #define xlate_dev_mem_ptr(p) __va(p) | ||
427 | |||
428 | /* | ||
429 | * Convert a virtual cached pointer to an uncached pointer | ||
430 | */ | ||
431 | #define xlate_dev_kmem_ptr(p) p | ||
432 | |||
433 | #endif /* __KERNEL__ */ | ||
434 | #endif /* __ASM_ARM_IO_H */ | ||
diff --git a/include/asm-arm26/ioc.h b/include/asm-arm26/ioc.h deleted file mode 100644 index b3b46ef65943..000000000000 --- a/include/asm-arm26/ioc.h +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/hardware/ioc.h | ||
3 | * | ||
4 | * Copyright (C) Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * Use these macros to read/write the IOC. All it does is perform the actual | ||
11 | * read/write. | ||
12 | */ | ||
13 | #ifndef __ASMARM_HARDWARE_IOC_H | ||
14 | #define __ASMARM_HARDWARE_IOC_H | ||
15 | |||
16 | #ifndef __ASSEMBLY__ | ||
17 | |||
18 | /* | ||
19 | * We use __raw_base variants here so that we give the compiler the | ||
20 | * chance to keep IOC_BASE in a register. | ||
21 | */ | ||
22 | #define ioc_readb(off) __raw_readb(IOC_BASE + (off)) | ||
23 | #define ioc_writeb(val,off) __raw_writeb(val, IOC_BASE + (off)) | ||
24 | |||
25 | #endif | ||
26 | |||
27 | #define IOC_CONTROL (0x00) | ||
28 | #define IOC_KARTTX (0x04) | ||
29 | #define IOC_KARTRX (0x04) | ||
30 | |||
31 | #define IOC_IRQSTATA (0x10) | ||
32 | #define IOC_IRQREQA (0x14) | ||
33 | #define IOC_IRQCLRA (0x14) | ||
34 | #define IOC_IRQMASKA (0x18) | ||
35 | |||
36 | #define IOC_IRQSTATB (0x20) | ||
37 | #define IOC_IRQREQB (0x24) | ||
38 | #define IOC_IRQMASKB (0x28) | ||
39 | |||
40 | #define IOC_FIQSTAT (0x30) | ||
41 | #define IOC_FIQREQ (0x34) | ||
42 | #define IOC_FIQMASK (0x38) | ||
43 | |||
44 | #define IOC_T0CNTL (0x40) | ||
45 | #define IOC_T0LTCHL (0x40) | ||
46 | #define IOC_T0CNTH (0x44) | ||
47 | #define IOC_T0LTCHH (0x44) | ||
48 | #define IOC_T0GO (0x48) | ||
49 | #define IOC_T0LATCH (0x4c) | ||
50 | |||
51 | #define IOC_T1CNTL (0x50) | ||
52 | #define IOC_T1LTCHL (0x50) | ||
53 | #define IOC_T1CNTH (0x54) | ||
54 | #define IOC_T1LTCHH (0x54) | ||
55 | #define IOC_T1GO (0x58) | ||
56 | #define IOC_T1LATCH (0x5c) | ||
57 | |||
58 | #define IOC_T2CNTL (0x60) | ||
59 | #define IOC_T2LTCHL (0x60) | ||
60 | #define IOC_T2CNTH (0x64) | ||
61 | #define IOC_T2LTCHH (0x64) | ||
62 | #define IOC_T2GO (0x68) | ||
63 | #define IOC_T2LATCH (0x6c) | ||
64 | |||
65 | #define IOC_T3CNTL (0x70) | ||
66 | #define IOC_T3LTCHL (0x70) | ||
67 | #define IOC_T3CNTH (0x74) | ||
68 | #define IOC_T3LTCHH (0x74) | ||
69 | #define IOC_T3GO (0x78) | ||
70 | #define IOC_T3LATCH (0x7c) | ||
71 | |||
72 | #endif | ||
diff --git a/include/asm-arm26/ioctl.h b/include/asm-arm26/ioctl.h deleted file mode 100644 index b279fe06dfe5..000000000000 --- a/include/asm-arm26/ioctl.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/ioctl.h> | ||
diff --git a/include/asm-arm26/ioctls.h b/include/asm-arm26/ioctls.h deleted file mode 100644 index 8a3296200be1..000000000000 --- a/include/asm-arm26/ioctls.h +++ /dev/null | |||
@@ -1,85 +0,0 @@ | |||
1 | #ifndef __ASM_ARM_IOCTLS_H | ||
2 | #define __ASM_ARM_IOCTLS_H | ||
3 | |||
4 | #include <asm/ioctl.h> | ||
5 | |||
6 | /* 0x54 is just a magic number to make these relatively unique ('T') */ | ||
7 | |||
8 | #define TCGETS 0x5401 | ||
9 | #define TCSETS 0x5402 | ||
10 | #define TCSETSW 0x5403 | ||
11 | #define TCSETSF 0x5404 | ||
12 | #define TCGETA 0x5405 | ||
13 | #define TCSETA 0x5406 | ||
14 | #define TCSETAW 0x5407 | ||
15 | #define TCSETAF 0x5408 | ||
16 | #define TCSBRK 0x5409 | ||
17 | #define TCXONC 0x540A | ||
18 | #define TCFLSH 0x540B | ||
19 | #define TIOCEXCL 0x540C | ||
20 | #define TIOCNXCL 0x540D | ||
21 | #define TIOCSCTTY 0x540E | ||
22 | #define TIOCGPGRP 0x540F | ||
23 | #define TIOCSPGRP 0x5410 | ||
24 | #define TIOCOUTQ 0x5411 | ||
25 | #define TIOCSTI 0x5412 | ||
26 | #define TIOCGWINSZ 0x5413 | ||
27 | #define TIOCSWINSZ 0x5414 | ||
28 | #define TIOCMGET 0x5415 | ||
29 | #define TIOCMBIS 0x5416 | ||
30 | #define TIOCMBIC 0x5417 | ||
31 | #define TIOCMSET 0x5418 | ||
32 | #define TIOCGSOFTCAR 0x5419 | ||
33 | #define TIOCSSOFTCAR 0x541A | ||
34 | #define FIONREAD 0x541B | ||
35 | #define TIOCINQ FIONREAD | ||
36 | #define TIOCLINUX 0x541C | ||
37 | #define TIOCCONS 0x541D | ||
38 | #define TIOCGSERIAL 0x541E | ||
39 | #define TIOCSSERIAL 0x541F | ||
40 | #define TIOCPKT 0x5420 | ||
41 | #define FIONBIO 0x5421 | ||
42 | #define TIOCNOTTY 0x5422 | ||
43 | #define TIOCSETD 0x5423 | ||
44 | #define TIOCGETD 0x5424 | ||
45 | #define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ | ||
46 | #define TIOCTTYGSTRUCT 0x5426 /* For debugging only */ | ||
47 | #define TIOCSBRK 0x5427 /* BSD compatibility */ | ||
48 | #define TIOCCBRK 0x5428 /* BSD compatibility */ | ||
49 | #define TIOCGSID 0x5429 /* Return the session ID of FD */ | ||
50 | #define TCGETS2 _IOR('T',0x2A, struct termios2) | ||
51 | #define TCSETS2 _IOW('T',0x2B, struct termios2) | ||
52 | #define TCSETSW2 _IOW('T',0x2C, struct termios2) | ||
53 | #define TCSETSF2 _IOW('T',0x2D, struct termios2) | ||
54 | #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | ||
55 | #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ | ||
56 | |||
57 | #define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ | ||
58 | #define FIOCLEX 0x5451 | ||
59 | #define FIOASYNC 0x5452 | ||
60 | #define TIOCSERCONFIG 0x5453 | ||
61 | #define TIOCSERGWILD 0x5454 | ||
62 | #define TIOCSERSWILD 0x5455 | ||
63 | #define TIOCGLCKTRMIOS 0x5456 | ||
64 | #define TIOCSLCKTRMIOS 0x5457 | ||
65 | #define TIOCSERGSTRUCT 0x5458 /* For debugging only */ | ||
66 | #define TIOCSERGETLSR 0x5459 /* Get line status register */ | ||
67 | #define TIOCSERGETMULTI 0x545A /* Get multiport config */ | ||
68 | #define TIOCSERSETMULTI 0x545B /* Set multiport config */ | ||
69 | |||
70 | #define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */ | ||
71 | #define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ | ||
72 | #define FIOQSIZE 0x545E | ||
73 | |||
74 | /* Used for packet mode */ | ||
75 | #define TIOCPKT_DATA 0 | ||
76 | #define TIOCPKT_FLUSHREAD 1 | ||
77 | #define TIOCPKT_FLUSHWRITE 2 | ||
78 | #define TIOCPKT_STOP 4 | ||
79 | #define TIOCPKT_START 8 | ||
80 | #define TIOCPKT_NOSTOP 16 | ||
81 | #define TIOCPKT_DOSTOP 32 | ||
82 | |||
83 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ | ||
84 | |||
85 | #endif | ||
diff --git a/include/asm-arm26/ipc.h b/include/asm-arm26/ipc.h deleted file mode 100644 index a46e3d9c2a3f..000000000000 --- a/include/asm-arm26/ipc.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/ipc.h> | ||
diff --git a/include/asm-arm26/ipcbuf.h b/include/asm-arm26/ipcbuf.h deleted file mode 100644 index 97683975f7df..000000000000 --- a/include/asm-arm26/ipcbuf.h +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | #ifndef __ASMARM_IPCBUF_H | ||
2 | #define __ASMARM_IPCBUF_H | ||
3 | |||
4 | /* | ||
5 | * The ipc64_perm structure for arm architecture. | ||
6 | * Note extra padding because this structure is passed back and forth | ||
7 | * between kernel and user space. | ||
8 | * | ||
9 | * Pad space is left for: | ||
10 | * - 32-bit mode_t and seq | ||
11 | * - 2 miscellaneous 32-bit values | ||
12 | */ | ||
13 | |||
14 | struct ipc64_perm | ||
15 | { | ||
16 | __kernel_key_t key; | ||
17 | __kernel_uid32_t uid; | ||
18 | __kernel_gid32_t gid; | ||
19 | __kernel_uid32_t cuid; | ||
20 | __kernel_gid32_t cgid; | ||
21 | __kernel_mode_t mode; | ||
22 | unsigned short __pad1; | ||
23 | unsigned short seq; | ||
24 | unsigned short __pad2; | ||
25 | unsigned long __unused1; | ||
26 | unsigned long __unused2; | ||
27 | }; | ||
28 | |||
29 | #endif /* __ASMARM_IPCBUF_H */ | ||
diff --git a/include/asm-arm26/irq.h b/include/asm-arm26/irq.h deleted file mode 100644 index 52971b49ed3b..000000000000 --- a/include/asm-arm26/irq.h +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | #ifndef __ASM_ARM_IRQ_H | ||
2 | #define __ASM_ARM_IRQ_H | ||
3 | |||
4 | #include <asm/sysirq.h> | ||
5 | |||
6 | #ifndef NR_IRQS | ||
7 | #define NR_IRQS 128 | ||
8 | #endif | ||
9 | |||
10 | |||
11 | /* JMA 18.05.02 Copied off arch/arm/irq.h */ | ||
12 | #ifndef irq_canonicalize | ||
13 | #define irq_canonicalize(i) (i) | ||
14 | #endif | ||
15 | |||
16 | |||
17 | /* | ||
18 | * Use this value to indicate lack of interrupt | ||
19 | * capability | ||
20 | */ | ||
21 | #ifndef NO_IRQ | ||
22 | #define NO_IRQ ((unsigned int)(-1)) | ||
23 | #endif | ||
24 | |||
25 | struct irqaction; | ||
26 | |||
27 | #define __IRQT_FALEDGE (1 << 0) | ||
28 | #define __IRQT_RISEDGE (1 << 1) | ||
29 | #define __IRQT_LOWLVL (1 << 2) | ||
30 | #define __IRQT_HIGHLVL (1 << 3) | ||
31 | |||
32 | #define IRQT_NOEDGE (0) | ||
33 | #define IRQT_RISING (__IRQT_RISEDGE) | ||
34 | #define IRQT_FALLING (__IRQT_FALEDGE) | ||
35 | #define IRQT_BOTHEDGE (__IRQT_RISEDGE|__IRQT_FALEDGE) | ||
36 | #define IRQT_LOW (__IRQT_LOWLVL) | ||
37 | #define IRQT_HIGH (__IRQT_HIGHLVL) | ||
38 | #define IRQT_PROBE (1 << 4) | ||
39 | |||
40 | int set_irq_type(unsigned int irq, unsigned int type); | ||
41 | |||
42 | #endif | ||
43 | |||
diff --git a/include/asm-arm26/irqchip.h b/include/asm-arm26/irqchip.h deleted file mode 100644 index 6a007a954098..000000000000 --- a/include/asm-arm26/irqchip.h +++ /dev/null | |||
@@ -1,101 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/mach/irq.h | ||
3 | * | ||
4 | * Copyright (C) 1995-2000 Russell King. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #ifndef __ASM_ARM_MACH_IRQ_H | ||
11 | #define __ASM_ARM_MACH_IRQ_H | ||
12 | |||
13 | struct irqdesc; | ||
14 | struct pt_regs; | ||
15 | struct seq_file; | ||
16 | |||
17 | typedef void (*irq_handler_t)(unsigned int, struct irqdesc *, struct pt_regs *); | ||
18 | typedef void (*irq_control_t)(unsigned int); | ||
19 | |||
20 | struct irqchip { | ||
21 | /* | ||
22 | * Acknowledge the IRQ. | ||
23 | * If this is a level-based IRQ, then it is expected to mask the IRQ | ||
24 | * as well. | ||
25 | */ | ||
26 | void (*ack)(unsigned int); | ||
27 | /* | ||
28 | * Mask the IRQ in hardware. | ||
29 | */ | ||
30 | void (*mask)(unsigned int); | ||
31 | /* | ||
32 | * Unmask the IRQ in hardware. | ||
33 | */ | ||
34 | void (*unmask)(unsigned int); | ||
35 | /* | ||
36 | * Re-run the IRQ | ||
37 | */ | ||
38 | void (*rerun)(unsigned int); | ||
39 | /* | ||
40 | * Set the type of the IRQ. | ||
41 | */ | ||
42 | int (*type)(unsigned int, unsigned int); | ||
43 | }; | ||
44 | |||
45 | struct irqdesc { | ||
46 | irq_handler_t handle; | ||
47 | struct irqchip *chip; | ||
48 | struct irqaction *action; | ||
49 | |||
50 | unsigned int enabled : 1; /* IRQ is currently enabled */ | ||
51 | unsigned int triggered: 1; /* IRQ has occurred */ | ||
52 | unsigned int running : 1; /* IRQ is running */ | ||
53 | unsigned int pending : 1; /* IRQ is pending */ | ||
54 | unsigned int probing : 1; /* IRQ in use for a probe */ | ||
55 | unsigned int probe_ok : 1; /* IRQ can be used for probe */ | ||
56 | unsigned int valid : 1; /* IRQ claimable */ | ||
57 | unsigned int noautoenable : 1; /* don't automatically enable IRQ */ | ||
58 | unsigned int unused :23; | ||
59 | unsigned int depth; /* disable depth */ | ||
60 | |||
61 | /* | ||
62 | * IRQ lock detection | ||
63 | */ | ||
64 | unsigned int lck_cnt; | ||
65 | unsigned int lck_pc; | ||
66 | unsigned int lck_jif; | ||
67 | }; | ||
68 | |||
69 | extern struct irqdesc irq_desc[]; | ||
70 | |||
71 | /* | ||
72 | * This is internal. Do not use it. | ||
73 | */ | ||
74 | extern void (*init_arch_irq)(void); | ||
75 | extern void init_FIQ(void); | ||
76 | extern int show_fiq_list(struct seq_file *, void *); | ||
77 | void __set_irq_handler(unsigned int irq, irq_handler_t, int); | ||
78 | |||
79 | /* | ||
80 | * External stuff. | ||
81 | */ | ||
82 | #define set_irq_handler(irq,handler) __set_irq_handler(irq,handler,0) | ||
83 | #define set_irq_chained_handler(irq,handler) __set_irq_handler(irq,handler,1) | ||
84 | |||
85 | void set_irq_chip(unsigned int irq, struct irqchip *); | ||
86 | void set_irq_flags(unsigned int irq, unsigned int flags); | ||
87 | |||
88 | #define IRQF_VALID (1 << 0) | ||
89 | #define IRQF_PROBE (1 << 1) | ||
90 | #define IRQF_NOAUTOEN (1 << 2) | ||
91 | |||
92 | /* | ||
93 | * Built-in IRQ handlers. | ||
94 | */ | ||
95 | void do_level_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs); | ||
96 | void do_edge_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs); | ||
97 | void do_simple_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs); | ||
98 | void do_bad_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs); | ||
99 | void dummy_mask_unmask_irq(unsigned int irq); | ||
100 | |||
101 | #endif | ||
diff --git a/include/asm-arm26/kdebug.h b/include/asm-arm26/kdebug.h deleted file mode 100644 index 6ece1b037665..000000000000 --- a/include/asm-arm26/kdebug.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-generic/kdebug.h> | ||
diff --git a/include/asm-arm26/kmap_types.h b/include/asm-arm26/kmap_types.h deleted file mode 100644 index d5da712b723c..000000000000 --- a/include/asm-arm26/kmap_types.h +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | #ifndef __ARM_KMAP_TYPES_H | ||
2 | #define __ARM_KMAP_TYPES_H | ||
3 | |||
4 | /* | ||
5 | * This is the "bare minimum". AIO seems to require this. | ||
6 | */ | ||
7 | enum km_type { | ||
8 | KM_IRQ0, | ||
9 | KM_USER1 | ||
10 | }; | ||
11 | |||
12 | #endif | ||
diff --git a/include/asm-arm26/leds.h b/include/asm-arm26/leds.h deleted file mode 100644 index 12290ea55801..000000000000 --- a/include/asm-arm26/leds.h +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/leds.h | ||
3 | * | ||
4 | * Copyright (C) 1998 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * Event-driven interface for LEDs on machines | ||
11 | * Added led_start and led_stop- Alex Holden, 28th Dec 1998. | ||
12 | */ | ||
13 | #ifndef ASM_ARM_LEDS_H | ||
14 | #define ASM_ARM_LEDS_H | ||
15 | |||
16 | |||
17 | typedef enum { | ||
18 | led_idle_start, | ||
19 | led_idle_end, | ||
20 | led_timer, | ||
21 | led_start, | ||
22 | led_stop, | ||
23 | led_claim, /* override idle & timer leds */ | ||
24 | led_release, /* restore idle & timer leds */ | ||
25 | led_start_timer_mode, | ||
26 | led_stop_timer_mode, | ||
27 | led_green_on, | ||
28 | led_green_off, | ||
29 | led_amber_on, | ||
30 | led_amber_off, | ||
31 | led_red_on, | ||
32 | led_red_off, | ||
33 | led_blue_on, | ||
34 | led_blue_off, | ||
35 | /* | ||
36 | * I want this between led_timer and led_start, but | ||
37 | * someone has decided to export this to user space | ||
38 | */ | ||
39 | led_halted | ||
40 | } led_event_t; | ||
41 | |||
42 | /* Use this routine to handle LEDs */ | ||
43 | |||
44 | #ifdef CONFIG_LEDS | ||
45 | extern void (*leds_event)(led_event_t); | ||
46 | #else | ||
47 | #define leds_event(e) | ||
48 | #endif | ||
49 | |||
50 | #endif | ||
diff --git a/include/asm-arm26/limits.h b/include/asm-arm26/limits.h deleted file mode 100644 index 08d8c6600804..000000000000 --- a/include/asm-arm26/limits.h +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | #ifndef __ASM_PIPE_H | ||
2 | #define __ASM_PIPE_H | ||
3 | |||
4 | #ifndef PAGE_SIZE | ||
5 | #include <asm/page.h> | ||
6 | #endif | ||
7 | |||
8 | #define PIPE_BUF PAGE_SIZE | ||
9 | |||
10 | #endif | ||
11 | |||
diff --git a/include/asm-arm26/linkage.h b/include/asm-arm26/linkage.h deleted file mode 100644 index dbe4b4e31a5b..000000000000 --- a/include/asm-arm26/linkage.h +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | #ifndef __ASM_LINKAGE_H | ||
2 | #define __ASM_LINKAGE_H | ||
3 | |||
4 | #define __ALIGN .align 0 | ||
5 | #define __ALIGN_STR ".align 0" | ||
6 | |||
7 | #endif | ||
diff --git a/include/asm-arm26/local.h b/include/asm-arm26/local.h deleted file mode 100644 index 6759e9183cef..000000000000 --- a/include/asm-arm26/local.h +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | //FIXME - nicked from arm32 - check it is correct... | ||
2 | #include <asm-generic/local.h> | ||
diff --git a/include/asm-arm26/locks.h b/include/asm-arm26/locks.h deleted file mode 100644 index 81b3bda2ed00..000000000000 --- a/include/asm-arm26/locks.h +++ /dev/null | |||
@@ -1,161 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/proc-armo/locks.h | ||
3 | * | ||
4 | * Copyright (C) 2000 Russell King | ||
5 | * Fixes for 26 bit machines, (C) 2000 Dave Gilbert | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | * Interrupt safe locking assembler. | ||
12 | */ | ||
13 | #ifndef __ASM_PROC_LOCKS_H | ||
14 | #define __ASM_PROC_LOCKS_H | ||
15 | |||
16 | /* Decrements by 1, fails if value < 0 */ | ||
17 | #define __down_op(ptr,fail) \ | ||
18 | ({ \ | ||
19 | __asm__ __volatile__ ( \ | ||
20 | "@ atomic down operation\n" \ | ||
21 | " mov ip, pc\n" \ | ||
22 | " orr lr, ip, #0x08000000\n" \ | ||
23 | " teqp lr, #0\n" \ | ||
24 | " ldr lr, [%0]\n" \ | ||
25 | " and ip, ip, #0x0c000003\n" \ | ||
26 | " subs lr, lr, #1\n" \ | ||
27 | " str lr, [%0]\n" \ | ||
28 | " orrmi ip, ip, #0x80000000 @ set N\n" \ | ||
29 | " teqp ip, #0\n" \ | ||
30 | " movmi ip, %0\n" \ | ||
31 | " blmi " #fail \ | ||
32 | : \ | ||
33 | : "r" (ptr) \ | ||
34 | : "ip", "lr", "cc"); \ | ||
35 | }) | ||
36 | |||
37 | #define __down_op_ret(ptr,fail) \ | ||
38 | ({ \ | ||
39 | unsigned int result; \ | ||
40 | __asm__ __volatile__ ( \ | ||
41 | " @ down_op_ret\n" \ | ||
42 | " mov ip, pc\n" \ | ||
43 | " orr lr, ip, #0x08000000\n" \ | ||
44 | " teqp lr, #0\n" \ | ||
45 | " ldr lr, [%1]\n" \ | ||
46 | " and ip, ip, #0x0c000003\n" \ | ||
47 | " subs lr, lr, #1\n" \ | ||
48 | " str lr, [%1]\n" \ | ||
49 | " orrmi ip, ip, #0x80000000 @ set N\n" \ | ||
50 | " teqp ip, #0\n" \ | ||
51 | " movmi ip, %1\n" \ | ||
52 | " movpl ip, #0\n" \ | ||
53 | " blmi " #fail "\n" \ | ||
54 | " mov %0, ip" \ | ||
55 | : "=&r" (result) \ | ||
56 | : "r" (ptr) \ | ||
57 | : "ip", "lr", "cc"); \ | ||
58 | result; \ | ||
59 | }) | ||
60 | |||
61 | #define __up_op(ptr,wake) \ | ||
62 | ({ \ | ||
63 | __asm__ __volatile__ ( \ | ||
64 | "@ up_op\n" \ | ||
65 | " mov ip, pc\n" \ | ||
66 | " orr lr, ip, #0x08000000\n" \ | ||
67 | " teqp lr, #0\n" \ | ||
68 | " ldr lr, [%0]\n" \ | ||
69 | " and ip, ip, #0x0c000003\n" \ | ||
70 | " adds lr, lr, #1\n" \ | ||
71 | " str lr, [%0]\n" \ | ||
72 | " orrle ip, ip, #0x80000000 @ set N - should this be mi ??? DAG ! \n" \ | ||
73 | " teqp ip, #0\n" \ | ||
74 | " movmi ip, %0\n" \ | ||
75 | " blmi " #wake \ | ||
76 | : \ | ||
77 | : "r" (ptr) \ | ||
78 | : "ip", "lr", "cc"); \ | ||
79 | }) | ||
80 | |||
81 | /* | ||
82 | * The value 0x01000000 supports up to 128 processors and | ||
83 | * lots of processes. BIAS must be chosen such that sub'ing | ||
84 | * BIAS once per CPU will result in the long remaining | ||
85 | * negative. | ||
86 | */ | ||
87 | #define RW_LOCK_BIAS 0x01000000 | ||
88 | #define RW_LOCK_BIAS_STR "0x01000000" | ||
89 | |||
90 | /* Decrements by RW_LOCK_BIAS rather than 1, fails if value != 0 */ | ||
91 | #define __down_op_write(ptr,fail) \ | ||
92 | ({ \ | ||
93 | __asm__ __volatile__( \ | ||
94 | "@ down_op_write\n" \ | ||
95 | " mov ip, pc\n" \ | ||
96 | " orr lr, ip, #0x08000000\n" \ | ||
97 | " teqp lr, #0\n" \ | ||
98 | " and ip, ip, #0x0c000003\n" \ | ||
99 | \ | ||
100 | " ldr lr, [%0]\n" \ | ||
101 | " subs lr, lr, %1\n" \ | ||
102 | " str lr, [%0]\n" \ | ||
103 | \ | ||
104 | " orreq ip, ip, #0x40000000 @ set Z \n"\ | ||
105 | " teqp ip, #0\n" \ | ||
106 | " movne ip, %0\n" \ | ||
107 | " blne " #fail \ | ||
108 | : \ | ||
109 | : "r" (ptr), "I" (RW_LOCK_BIAS) \ | ||
110 | : "ip", "lr", "cc"); \ | ||
111 | }) | ||
112 | |||
113 | /* Increments by RW_LOCK_BIAS, wakes if value >= 0 */ | ||
114 | #define __up_op_write(ptr,wake) \ | ||
115 | ({ \ | ||
116 | __asm__ __volatile__( \ | ||
117 | "@ up_op_read\n" \ | ||
118 | " mov ip, pc\n" \ | ||
119 | " orr lr, ip, #0x08000000\n" \ | ||
120 | " teqp lr, #0\n" \ | ||
121 | \ | ||
122 | " ldr lr, [%0]\n" \ | ||
123 | " and ip, ip, #0x0c000003\n" \ | ||
124 | " adds lr, lr, %1\n" \ | ||
125 | " str lr, [%0]\n" \ | ||
126 | \ | ||
127 | " orrcs ip, ip, #0x20000000 @ set C\n" \ | ||
128 | " teqp ip, #0\n" \ | ||
129 | " movcs ip, %0\n" \ | ||
130 | " blcs " #wake \ | ||
131 | : \ | ||
132 | : "r" (ptr), "I" (RW_LOCK_BIAS) \ | ||
133 | : "ip", "lr", "cc"); \ | ||
134 | }) | ||
135 | |||
136 | #define __down_op_read(ptr,fail) \ | ||
137 | __down_op(ptr, fail) | ||
138 | |||
139 | #define __up_op_read(ptr,wake) \ | ||
140 | ({ \ | ||
141 | __asm__ __volatile__( \ | ||
142 | "@ up_op_read\n" \ | ||
143 | " mov ip, pc\n" \ | ||
144 | " orr lr, ip, #0x08000000\n" \ | ||
145 | " teqp lr, #0\n" \ | ||
146 | \ | ||
147 | " ldr lr, [%0]\n" \ | ||
148 | " and ip, ip, #0x0c000003\n" \ | ||
149 | " adds lr, lr, %1\n" \ | ||
150 | " str lr, [%0]\n" \ | ||
151 | \ | ||
152 | " orreq ip, ip, #0x40000000 @ Set Z \n" \ | ||
153 | " teqp ip, #0\n" \ | ||
154 | " moveq ip, %0\n" \ | ||
155 | " bleq " #wake \ | ||
156 | : \ | ||
157 | : "r" (ptr), "I" (1) \ | ||
158 | : "ip", "lr", "cc"); \ | ||
159 | }) | ||
160 | |||
161 | #endif | ||
diff --git a/include/asm-arm26/mach-types.h b/include/asm-arm26/mach-types.h deleted file mode 100644 index 0aeaedcbac96..000000000000 --- a/include/asm-arm26/mach-types.h +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | /* | ||
2 | * Unlike ARM32 this is NOT automatically generated. DONT delete it | ||
3 | * Instead, consider FIXME-ing it so its auto-detected. | ||
4 | */ | ||
5 | |||
6 | #ifndef __ASM_ARM_MACH_TYPE_H | ||
7 | #define __ASM_ARM_MACH_TYPE_H | ||
8 | |||
9 | |||
10 | #ifndef __ASSEMBLY__ | ||
11 | extern unsigned int __machine_arch_type; | ||
12 | #endif | ||
13 | |||
14 | #define MACH_TYPE_ARCHIMEDES 10 | ||
15 | #define MACH_TYPE_A5K 11 | ||
16 | |||
17 | #ifdef CONFIG_ARCH_ARC | ||
18 | # define machine_arch_type MACH_TYPE_ARCHIMEDES | ||
19 | # define machine_is_archimedes() (machine_arch_type == MACH_TYPE_ARCHIMEDES) | ||
20 | #else | ||
21 | # define machine_is_archimedes() (0) | ||
22 | #endif | ||
23 | |||
24 | #ifdef CONFIG_ARCH_A5K | ||
25 | # define machine_arch_type MACH_TYPE_A5K | ||
26 | # define machine_is_a5k() (machine_arch_type == MACH_TYPE_A5K) | ||
27 | #else | ||
28 | # define machine_is_a5k() (0) | ||
29 | #endif | ||
30 | |||
31 | #ifndef machine_arch_type | ||
32 | #error Unknown machine type | ||
33 | #define machine_arch_type __machine_arch_type | ||
34 | #endif | ||
35 | |||
36 | #endif | ||
diff --git a/include/asm-arm26/map.h b/include/asm-arm26/map.h deleted file mode 100644 index 6e12a7fa5c5d..000000000000 --- a/include/asm-arm26/map.h +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/map.h | ||
3 | * | ||
4 | * Copyright (C) 1999-2000 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * Page table mapping constructs and function prototypes | ||
11 | */ | ||
12 | struct map_desc { | ||
13 | unsigned long virtual; | ||
14 | unsigned long physical; | ||
15 | unsigned long length; | ||
16 | unsigned int type; | ||
17 | }; | ||
18 | |||
19 | struct meminfo; | ||
20 | |||
21 | extern void create_memmap_holes(struct meminfo *); | ||
22 | extern void memtable_init(struct meminfo *); | ||
23 | extern void iotable_init(struct map_desc *); | ||
24 | extern void setup_io_desc(void); | ||
diff --git a/include/asm-arm26/mc146818rtc.h b/include/asm-arm26/mc146818rtc.h deleted file mode 100644 index a234130db8f1..000000000000 --- a/include/asm-arm26/mc146818rtc.h +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | /* | ||
2 | * Machine dependent access functions for RTC registers. | ||
3 | */ | ||
4 | #ifndef _ASM_MC146818RTC_H | ||
5 | #define _ASM_MC146818RTC_H | ||
6 | |||
7 | #include <asm/irq.h> | ||
8 | #include <asm/io.h> | ||
9 | |||
10 | #ifndef RTC_PORT | ||
11 | #define RTC_PORT(x) (0x70 + (x)) | ||
12 | #define RTC_ALWAYS_BCD 1 /* RTC operates in binary mode */ | ||
13 | #endif | ||
14 | |||
15 | /* | ||
16 | * The yet supported machines all access the RTC index register via | ||
17 | * an ISA port access but the way to access the date register differs ... | ||
18 | */ | ||
19 | #define CMOS_READ(addr) ({ \ | ||
20 | outb_p((addr),RTC_PORT(0)); \ | ||
21 | inb_p(RTC_PORT(1)); \ | ||
22 | }) | ||
23 | #define CMOS_WRITE(val, addr) ({ \ | ||
24 | outb_p((addr),RTC_PORT(0)); \ | ||
25 | outb_p((val),RTC_PORT(1)); \ | ||
26 | }) | ||
27 | |||
28 | #endif /* _ASM_MC146818RTC_H */ | ||
diff --git a/include/asm-arm26/memory.h b/include/asm-arm26/memory.h deleted file mode 100644 index 7c1e5be39060..000000000000 --- a/include/asm-arm26/memory.h +++ /dev/null | |||
@@ -1,101 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm26/memory.h | ||
3 | * | ||
4 | * Copyright (C) 2000-2002 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * Note: this file should not be included by non-asm/.h files | ||
11 | */ | ||
12 | #ifndef __ASM_ARM_MEMORY_H | ||
13 | #define __ASM_ARM_MEMORY_H | ||
14 | |||
15 | /* | ||
16 | * User space: 26MB | ||
17 | */ | ||
18 | #define TASK_SIZE (0x01a00000UL) | ||
19 | |||
20 | /* | ||
21 | * This decides where the kernel will search for a free chunk of vm | ||
22 | * space during mmap's. | ||
23 | */ | ||
24 | #define TASK_UNMAPPED_BASE (TASK_SIZE / 3) | ||
25 | |||
26 | /* | ||
27 | * Page offset: 32MB | ||
28 | */ | ||
29 | #define PAGE_OFFSET (0x02000000UL) | ||
30 | #define PHYS_OFFSET (0x02000000UL) | ||
31 | |||
32 | #define PHYS_TO_NID(addr) (0) | ||
33 | |||
34 | /* | ||
35 | * PFNs are used to describe any physical page; this means | ||
36 | * PFN 0 == physical address 0. | ||
37 | * | ||
38 | * This is the PFN of the first RAM page in the kernel | ||
39 | * direct-mapped view. We assume this is the first page | ||
40 | * of RAM in the mem_map as well. | ||
41 | */ | ||
42 | #define PHYS_PFN_OFFSET (PHYS_OFFSET >> PAGE_SHIFT) | ||
43 | |||
44 | /* | ||
45 | * These are *only* valid on the kernel direct mapped RAM memory. | ||
46 | */ | ||
47 | static inline unsigned long virt_to_phys(void *x) | ||
48 | { | ||
49 | return (unsigned long)x; | ||
50 | } | ||
51 | |||
52 | static inline void *phys_to_virt(unsigned long x) | ||
53 | { | ||
54 | return (void *)((unsigned long)x); | ||
55 | } | ||
56 | |||
57 | #define __pa(x) (unsigned long)(x) | ||
58 | #define __va(x) ((void *)(unsigned long)(x)) | ||
59 | |||
60 | /* | ||
61 | * Virtual <-> DMA view memory address translations | ||
62 | * Again, these are *only* valid on the kernel direct mapped RAM | ||
63 | * memory. Use of these is *deprecated*. | ||
64 | */ | ||
65 | #define virt_to_bus(x) ((unsigned long)(x)) | ||
66 | #define bus_to_virt(x) ((void *)((unsigned long)(x))) | ||
67 | |||
68 | /* | ||
69 | * Conversion between a struct page and a physical address. | ||
70 | * | ||
71 | * Note: when converting an unknown physical address to a | ||
72 | * struct page, the resulting pointer must be validated | ||
73 | * using VALID_PAGE(). It must return an invalid struct page | ||
74 | * for any physical address not corresponding to a system | ||
75 | * RAM address. | ||
76 | * | ||
77 | * page_to_pfn(page) convert a struct page * to a PFN number | ||
78 | * pfn_to_page(pfn) convert a _valid_ PFN number to struct page * | ||
79 | * pfn_valid(pfn) indicates whether a PFN number is valid | ||
80 | * | ||
81 | * virt_to_page(k) convert a _valid_ virtual address to struct page * | ||
82 | * virt_addr_valid(k) indicates whether a virtual address is valid | ||
83 | */ | ||
84 | #define ARCH_PFN_OFFSET (PHYS_PFN_OFFSET) | ||
85 | #define pfn_valid(pfn) ((pfn) >= PHYS_PFN_OFFSET && (pfn) < (PHYS_PFN_OFFSET + max_mapnr)) | ||
86 | |||
87 | #define virt_to_page(kaddr) (pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)) | ||
88 | #define virt_addr_valid(kaddr) ((int)(kaddr) >= PAGE_OFFSET && (int)(kaddr) < (unsigned long)high_memory) | ||
89 | |||
90 | /* | ||
91 | * For BIO. "will die". Kill me when bio_to_phys() and bvec_to_phys() die. | ||
92 | */ | ||
93 | #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) | ||
94 | |||
95 | /* | ||
96 | * We should really eliminate virt_to_bus() here - it's deprecated. | ||
97 | */ | ||
98 | #define page_to_bus(page) (page_address(page)) | ||
99 | |||
100 | #include <asm-generic/memory_model.h> | ||
101 | #endif | ||
diff --git a/include/asm-arm26/mman.h b/include/asm-arm26/mman.h deleted file mode 100644 index 4000a6c1b76b..000000000000 --- a/include/asm-arm26/mman.h +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | #ifndef __ARM_MMAN_H__ | ||
2 | #define __ARM_MMAN_H__ | ||
3 | |||
4 | #include <asm-generic/mman.h> | ||
5 | |||
6 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | ||
7 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | ||
8 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ | ||
9 | #define MAP_LOCKED 0x2000 /* pages are locked */ | ||
10 | #define MAP_NORESERVE 0x4000 /* don't check for reservations */ | ||
11 | #define MAP_POPULATE 0x8000 /* populate (prefault) page tables */ | ||
12 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | ||
13 | |||
14 | #define MCL_CURRENT 1 /* lock all current mappings */ | ||
15 | #define MCL_FUTURE 2 /* lock all future mappings */ | ||
16 | |||
17 | #endif /* __ARM_MMAN_H__ */ | ||
diff --git a/include/asm-arm26/mmu.h b/include/asm-arm26/mmu.h deleted file mode 100644 index 9b8d3d781a1e..000000000000 --- a/include/asm-arm26/mmu.h +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | #ifndef __ARM_MMU_H | ||
2 | #define __ARM_MMU_H | ||
3 | |||
4 | /* | ||
5 | * The ARM doesn't have a mmu context | ||
6 | */ | ||
7 | typedef struct { } mm_context_t; | ||
8 | |||
9 | #endif | ||
diff --git a/include/asm-arm26/mmu_context.h b/include/asm-arm26/mmu_context.h deleted file mode 100644 index 16c821f81b8d..000000000000 --- a/include/asm-arm26/mmu_context.h +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/mmu_context.h | ||
3 | * | ||
4 | * Copyright (C) 1996 Russell King. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * Changelog: | ||
11 | * 27-06-1996 RMK Created | ||
12 | */ | ||
13 | #ifndef __ASM_ARM_MMU_CONTEXT_H | ||
14 | #define __ASM_ARM_MMU_CONTEXT_H | ||
15 | |||
16 | #include <asm-generic/mm_hooks.h> | ||
17 | |||
18 | #define init_new_context(tsk,mm) 0 | ||
19 | #define destroy_context(mm) do { } while(0) | ||
20 | |||
21 | /* | ||
22 | * This is called when "tsk" is about to enter lazy TLB mode. | ||
23 | * | ||
24 | * mm: describes the currently active mm context | ||
25 | * tsk: task which is entering lazy tlb | ||
26 | * cpu: cpu number which is entering lazy tlb | ||
27 | * | ||
28 | * tsk->mm will be NULL | ||
29 | */ | ||
30 | static inline void | ||
31 | enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk) | ||
32 | { | ||
33 | } | ||
34 | |||
35 | /* | ||
36 | * This is the actual mm switch as far as the scheduler | ||
37 | * is concerned. No registers are touched. | ||
38 | */ | ||
39 | static inline void | ||
40 | switch_mm(struct mm_struct *prev, struct mm_struct *next, | ||
41 | struct task_struct *tsk) | ||
42 | { | ||
43 | cpu_switch_mm(next->pgd, next); | ||
44 | } | ||
45 | |||
46 | #define deactivate_mm(tsk,mm) do { } while (0) | ||
47 | |||
48 | static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next) | ||
49 | { | ||
50 | cpu_switch_mm(next->pgd, next); | ||
51 | } | ||
52 | |||
53 | #endif | ||
diff --git a/include/asm-arm26/module.h b/include/asm-arm26/module.h deleted file mode 100644 index 1157f178daec..000000000000 --- a/include/asm-arm26/module.h +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | #ifndef _ASM_ARM_MODULE_H | ||
2 | #define _ASM_ARM_MODULE_H | ||
3 | /* | ||
4 | * This file contains the arm architecture specific module code. | ||
5 | */ | ||
6 | |||
7 | #endif /* _ASM_ARM_MODULE_H */ | ||
diff --git a/include/asm-arm26/msgbuf.h b/include/asm-arm26/msgbuf.h deleted file mode 100644 index 33b35b946eaa..000000000000 --- a/include/asm-arm26/msgbuf.h +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | #ifndef _ASMARM_MSGBUF_H | ||
2 | #define _ASMARM_MSGBUF_H | ||
3 | |||
4 | /* | ||
5 | * The msqid64_ds structure for arm architecture. | ||
6 | * Note extra padding because this structure is passed back and forth | ||
7 | * between kernel and user space. | ||
8 | * | ||
9 | * Pad space is left for: | ||
10 | * - 64-bit time_t to solve y2038 problem | ||
11 | * - 2 miscellaneous 32-bit values | ||
12 | */ | ||
13 | |||
14 | struct msqid64_ds { | ||
15 | struct ipc64_perm msg_perm; | ||
16 | __kernel_time_t msg_stime; /* last msgsnd time */ | ||
17 | unsigned long __unused1; | ||
18 | __kernel_time_t msg_rtime; /* last msgrcv time */ | ||
19 | unsigned long __unused2; | ||
20 | __kernel_time_t msg_ctime; /* last change time */ | ||
21 | unsigned long __unused3; | ||
22 | unsigned long msg_cbytes; /* current number of bytes on queue */ | ||
23 | unsigned long msg_qnum; /* number of messages in queue */ | ||
24 | unsigned long msg_qbytes; /* max number of bytes on queue */ | ||
25 | __kernel_pid_t msg_lspid; /* pid of last msgsnd */ | ||
26 | __kernel_pid_t msg_lrpid; /* last receive pid */ | ||
27 | unsigned long __unused4; | ||
28 | unsigned long __unused5; | ||
29 | }; | ||
30 | |||
31 | #endif /* _ASMARM_MSGBUF_H */ | ||
diff --git a/include/asm-arm26/namei.h b/include/asm-arm26/namei.h deleted file mode 100644 index 3f5d340110eb..000000000000 --- a/include/asm-arm26/namei.h +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm26/namei.h | ||
3 | * | ||
4 | * Routines to handle famous /usr/gnemul | ||
5 | * Derived from the Sparc version of this file | ||
6 | * | ||
7 | * Included from linux/fs/namei.c | ||
8 | */ | ||
9 | |||
10 | #ifndef __ASMARM_NAMEI_H | ||
11 | #define __ASMARM_NAMEI_H | ||
12 | |||
13 | #define ARM_BSD_EMUL "usr/gnemul/bsd/" | ||
14 | |||
15 | static inline char *__emul_prefix(void) | ||
16 | { | ||
17 | switch (current->personality) { | ||
18 | case PER_BSD: | ||
19 | return ARM_BSD_EMUL; | ||
20 | default: | ||
21 | return NULL; | ||
22 | } | ||
23 | } | ||
24 | |||
25 | #endif /* __ASMARM_NAMEI_H */ | ||
diff --git a/include/asm-arm26/oldlatches.h b/include/asm-arm26/oldlatches.h deleted file mode 100644 index bc87089b2152..000000000000 --- a/include/asm-arm26/oldlatches.h +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-arc/oldlatches.h | ||
3 | * | ||
4 | * Copyright (C) 1996 Russell King, Dave Gilbert | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * Modifications: | ||
11 | * 04-04-1998 PJB/RMK Merged arc and a5k versions | ||
12 | */ | ||
13 | #ifndef _ASM_ARCH_OLDLATCH_H | ||
14 | #define _ASM_ARCH_OLDLATCH_H | ||
15 | |||
16 | #define LATCHA_FDSEL0 (1<<0) | ||
17 | #define LATCHA_FDSEL1 (1<<1) | ||
18 | #define LATCHA_FDSEL2 (1<<2) | ||
19 | #define LATCHA_FDSEL3 (1<<3) | ||
20 | #define LATCHA_FDSELALL (0xf) | ||
21 | #define LATCHA_SIDESEL (1<<4) | ||
22 | #define LATCHA_MOTOR (1<<5) | ||
23 | #define LATCHA_INUSE (1<<6) | ||
24 | #define LATCHA_CHANGERST (1<<7) | ||
25 | |||
26 | #define LATCHB_FDCDENSITY (1<<1) | ||
27 | #define LATCHB_FDCRESET (1<<3) | ||
28 | #define LATCHB_PRINTSTROBE (1<<4) | ||
29 | |||
30 | /* newval=(oldval & mask)|newdata */ | ||
31 | void oldlatch_bupdate(unsigned char mask,unsigned char newdata); | ||
32 | |||
33 | /* newval=(oldval & mask)|newdata */ | ||
34 | void oldlatch_aupdate(unsigned char mask,unsigned char newdata); | ||
35 | |||
36 | #endif | ||
37 | |||
diff --git a/include/asm-arm26/page.h b/include/asm-arm26/page.h deleted file mode 100644 index fa19de28fda0..000000000000 --- a/include/asm-arm26/page.h +++ /dev/null | |||
@@ -1,102 +0,0 @@ | |||
1 | #ifndef _ASMARM_PAGE_H | ||
2 | #define _ASMARM_PAGE_H | ||
3 | |||
4 | |||
5 | #ifdef __KERNEL__ | ||
6 | #ifndef __ASSEMBLY__ | ||
7 | |||
8 | extern void __clear_user_page(void *p, unsigned long user); | ||
9 | extern void __copy_user_page(void *to, const void *from, unsigned long user); | ||
10 | extern void copy_page(void *to, const void *from); | ||
11 | |||
12 | //FIXME these may be wrong on ARM26 | ||
13 | #define clear_user_page(addr,vaddr,pg) \ | ||
14 | do { \ | ||
15 | preempt_disable(); \ | ||
16 | __clear_user_page(addr, vaddr); \ | ||
17 | preempt_enable(); \ | ||
18 | } while (0) | ||
19 | |||
20 | #define copy_user_page(to,from,vaddr,pg) \ | ||
21 | do { \ | ||
22 | preempt_disable(); \ | ||
23 | __copy_user_page(to, from, vaddr); \ | ||
24 | preempt_enable(); \ | ||
25 | } while (0) | ||
26 | |||
27 | #define clear_page(page) memzero((void *)(page), PAGE_SIZE) | ||
28 | #define copy_page(to, from) __copy_user_page(to, from, 0); | ||
29 | |||
30 | #undef STRICT_MM_TYPECHECKS | ||
31 | |||
32 | #ifdef STRICT_MM_TYPECHECKS | ||
33 | /* | ||
34 | * These are used to make use of C type-checking.. | ||
35 | */ | ||
36 | typedef struct { unsigned long pgd; } pgd_t; | ||
37 | typedef struct { unsigned long pte; } pte_t; | ||
38 | typedef struct { unsigned long pmd; } pmd_t; | ||
39 | typedef struct { unsigned long pgprot; } pgprot_t; | ||
40 | |||
41 | #define pgd_val(x) ((x).pgd) | ||
42 | #define pte_val(x) ((x).pte) | ||
43 | #define pmd_val(x) ((x).pmd) | ||
44 | #define pgprot_val(x) ((x).pgprot) | ||
45 | |||
46 | #define __pte(x) ((pte_t) { (x) } ) | ||
47 | #define __pmd(x) ((pmd_t) { (x) } ) | ||
48 | #define __pgprot(x) ((pgprot_t) { (x) } ) | ||
49 | |||
50 | #else | ||
51 | /* | ||
52 | * .. while these make it easier on the compiler | ||
53 | */ | ||
54 | typedef unsigned long pgd_t; | ||
55 | typedef unsigned long pte_t; | ||
56 | typedef unsigned long pmd_t; | ||
57 | typedef unsigned long pgprot_t; | ||
58 | |||
59 | //FIXME - should these cast to unsigned long? | ||
60 | #define pgd_val(x) (x) | ||
61 | #define pte_val(x) (x) | ||
62 | #define pmd_val(x) (x) | ||
63 | #define pgprot_val(x) (x) | ||
64 | |||
65 | #define __pte(x) (x) | ||
66 | #define __pmd(x) (x) | ||
67 | #define __pgprot(x) (x) | ||
68 | |||
69 | #endif /* STRICT_MM_TYPECHECKS */ | ||
70 | #endif /* !__ASSEMBLY__ */ | ||
71 | #endif /* __KERNEL__ */ | ||
72 | |||
73 | /* PAGE_SHIFT determines the page size. This is configurable. */ | ||
74 | #if defined(CONFIG_PAGESIZE_16) | ||
75 | #define PAGE_SHIFT 14 /* 16K */ | ||
76 | #else /* default */ | ||
77 | #define PAGE_SHIFT 15 /* 32K */ | ||
78 | #endif | ||
79 | |||
80 | #define EXEC_PAGESIZE 32768 | ||
81 | |||
82 | #define PAGE_SIZE (1UL << PAGE_SHIFT) | ||
83 | #define PAGE_MASK (~(PAGE_SIZE-1)) | ||
84 | |||
85 | /* to align the pointer to the (next) page boundary */ | ||
86 | #define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) | ||
87 | |||
88 | #ifdef __KERNEL__ | ||
89 | #ifndef __ASSEMBLY__ | ||
90 | |||
91 | #include <asm/memory.h> | ||
92 | |||
93 | #endif /* !__ASSEMBLY__ */ | ||
94 | |||
95 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ | ||
96 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) | ||
97 | |||
98 | #endif /* __KERNEL__ */ | ||
99 | |||
100 | #include <asm-generic/page.h> | ||
101 | |||
102 | #endif | ||
diff --git a/include/asm-arm26/param.h b/include/asm-arm26/param.h deleted file mode 100644 index 6b1e52df542e..000000000000 --- a/include/asm-arm26/param.h +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/param.h | ||
3 | * | ||
4 | * Copyright (C) 1995-1999 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #ifndef __ASM_PARAM_H | ||
11 | #define __ASM_PARAM_H | ||
12 | |||
13 | #ifndef __KERNEL_HZ | ||
14 | #define __KERNEL_HZ 100 | ||
15 | #endif | ||
16 | |||
17 | #ifdef __KERNEL__ | ||
18 | # define HZ __KERNEL_HZ /* Internal kernel timer frequency */ | ||
19 | # define USER_HZ 100 /* User interfaces are in "ticks" */ | ||
20 | # define CLOCKS_PER_SEC (USER_HZ) /* like times() */ | ||
21 | #else | ||
22 | # define HZ 100 | ||
23 | #endif | ||
24 | |||
25 | #ifndef NOGROUP | ||
26 | #define NOGROUP (-1) | ||
27 | #endif | ||
28 | |||
29 | /* max length of hostname */ | ||
30 | #define MAXHOSTNAMELEN 64 | ||
31 | |||
32 | #endif | ||
33 | |||
diff --git a/include/asm-arm26/parport.h b/include/asm-arm26/parport.h deleted file mode 100644 index f2f90c76ddd1..000000000000 --- a/include/asm-arm26/parport.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/parport.h: ARM-specific parport initialisation | ||
3 | * | ||
4 | * Copyright (C) 1999, 2000 Tim Waugh <tim@cyberelk.demon.co.uk> | ||
5 | * | ||
6 | * This file should only be included by drivers/parport/parport_pc.c. | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASMARM_PARPORT_H | ||
10 | #define __ASMARM_PARPORT_H | ||
11 | |||
12 | static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma); | ||
13 | static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma) | ||
14 | { | ||
15 | return parport_pc_find_isa_ports (autoirq, autodma); | ||
16 | } | ||
17 | |||
18 | #endif /* !(_ASMARM_PARPORT_H) */ | ||
diff --git a/include/asm-arm26/pci.h b/include/asm-arm26/pci.h deleted file mode 100644 index 6ac67ed7718c..000000000000 --- a/include/asm-arm26/pci.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | /* Should not be needed. IDE stupidity */ | ||
2 | /* JMA 18.05.03 - is kinda needed, if only to tell it we don't have a PCI bus */ | ||
3 | |||
4 | #define PCI_DMA_BUS_IS_PHYS 0 | ||
5 | #define pcibios_scan_all_fns(a, b) 0 | ||
6 | |||
diff --git a/include/asm-arm26/percpu.h b/include/asm-arm26/percpu.h deleted file mode 100644 index b4e32d8ec072..000000000000 --- a/include/asm-arm26/percpu.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __ARM_PERCPU | ||
2 | #define __ARM_PERCPU | ||
3 | |||
4 | #include <asm-generic/percpu.h> | ||
5 | |||
6 | #endif | ||
diff --git a/include/asm-arm26/pgalloc.h b/include/asm-arm26/pgalloc.h deleted file mode 100644 index 7725af3ddb4d..000000000000 --- a/include/asm-arm26/pgalloc.h +++ /dev/null | |||
@@ -1,70 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/pgalloc.h | ||
3 | * | ||
4 | * Copyright (C) 2000-2001 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #ifndef _ASMARM_PGALLOC_H | ||
11 | #define _ASMARM_PGALLOC_H | ||
12 | |||
13 | #include <asm/processor.h> | ||
14 | #include <asm/cacheflush.h> | ||
15 | #include <asm/tlbflush.h> | ||
16 | #include <linux/slab.h> | ||
17 | |||
18 | extern struct kmem_cache *pte_cache; | ||
19 | |||
20 | static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long addr){ | ||
21 | return kmem_cache_alloc(pte_cache, GFP_KERNEL); | ||
22 | } | ||
23 | |||
24 | static inline void pte_free_kernel(pte_t *pte){ | ||
25 | if (pte) | ||
26 | kmem_cache_free(pte_cache, pte); | ||
27 | } | ||
28 | |||
29 | /* | ||
30 | * Populate the pmdp entry with a pointer to the pte. This pmd is part | ||
31 | * of the mm address space. | ||
32 | * | ||
33 | * If 'mm' is the init tasks mm, then we are doing a vmalloc, and we | ||
34 | * need to set stuff up correctly for it. | ||
35 | */ | ||
36 | static inline void | ||
37 | pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmdp, pte_t *ptep) | ||
38 | { | ||
39 | //FIXME - is this doing the right thing? | ||
40 | set_pmd(pmdp, (unsigned long)ptep | 1/*FIXME _PMD_PRESENT*/); | ||
41 | } | ||
42 | |||
43 | /* | ||
44 | * FIXME - We use the old 2.5.5-rmk1 hack for this. | ||
45 | * This is not truly correct, but should be functional. | ||
46 | */ | ||
47 | #define pte_alloc_one(mm,addr) ((struct page *)pte_alloc_one_kernel(mm,addr)) | ||
48 | #define pte_free(pte) pte_free_kernel((pte_t *)pte) | ||
49 | #define pmd_populate(mm,pmdp,ptep) pmd_populate_kernel(mm,pmdp,(pte_t *)ptep) | ||
50 | |||
51 | /* | ||
52 | * Since we have only two-level page tables, these are trivial | ||
53 | * | ||
54 | * trick __pmd_alloc into optimising away. The actual value is irrelevant though as it | ||
55 | * is thrown away. It just cant be zero. -IM | ||
56 | */ | ||
57 | |||
58 | #define pmd_alloc_one(mm,addr) ({ BUG(); ((pmd_t *)2); }) | ||
59 | #define pmd_free(pmd) do { } while (0) | ||
60 | #define pgd_populate(mm,pmd,pte) BUG() | ||
61 | |||
62 | extern pgd_t *get_pgd_slow(struct mm_struct *mm); | ||
63 | extern void free_pgd_slow(pgd_t *pgd); | ||
64 | |||
65 | #define pgd_alloc(mm) get_pgd_slow(mm) | ||
66 | #define pgd_free(pgd) free_pgd_slow(pgd) | ||
67 | |||
68 | #define check_pgt_cache() do { } while (0) | ||
69 | |||
70 | #endif | ||
diff --git a/include/asm-arm26/pgtable.h b/include/asm-arm26/pgtable.h deleted file mode 100644 index 55a1a697d12b..000000000000 --- a/include/asm-arm26/pgtable.h +++ /dev/null | |||
@@ -1,298 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm26/pgtable.h | ||
3 | * | ||
4 | * Copyright (C) 2000-2002 Russell King | ||
5 | * Copyright (C) 2003 Ian Molton | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef _ASMARM_PGTABLE_H | ||
12 | #define _ASMARM_PGTABLE_H | ||
13 | |||
14 | #include <asm-generic/4level-fixup.h> | ||
15 | |||
16 | #include <asm/memory.h> | ||
17 | |||
18 | /* | ||
19 | * The table below defines the page protection levels that we insert into our | ||
20 | * Linux page table version. These get translated into the best that the | ||
21 | * architecture can perform. Note that on most ARM hardware: | ||
22 | * 1) We cannot do execute protection | ||
23 | * 2) If we could do execute protection, then read is implied | ||
24 | * 3) write implies read permissions | ||
25 | */ | ||
26 | #define __P000 PAGE_NONE | ||
27 | #define __P001 PAGE_READONLY | ||
28 | #define __P010 PAGE_COPY | ||
29 | #define __P011 PAGE_COPY | ||
30 | #define __P100 PAGE_READONLY | ||
31 | #define __P101 PAGE_READONLY | ||
32 | #define __P110 PAGE_COPY | ||
33 | #define __P111 PAGE_COPY | ||
34 | |||
35 | #define __S000 PAGE_NONE | ||
36 | #define __S001 PAGE_READONLY | ||
37 | #define __S010 PAGE_SHARED | ||
38 | #define __S011 PAGE_SHARED | ||
39 | #define __S100 PAGE_READONLY | ||
40 | #define __S101 PAGE_READONLY | ||
41 | #define __S110 PAGE_SHARED | ||
42 | #define __S111 PAGE_SHARED | ||
43 | |||
44 | /* | ||
45 | * PMD_SHIFT determines the size of the area a second-level page table can map | ||
46 | * PGDIR_SHIFT determines what a third-level page table entry can map | ||
47 | */ | ||
48 | #define PGD_SHIFT 25 | ||
49 | #define PMD_SHIFT 20 | ||
50 | |||
51 | #define PGD_SIZE (1UL << PGD_SHIFT) | ||
52 | #define PGD_MASK (~(PGD_SIZE-1)) | ||
53 | #define PMD_SIZE (1UL << PMD_SHIFT) | ||
54 | #define PMD_MASK (~(PMD_SIZE-1)) | ||
55 | |||
56 | /* The kernel likes to use these names for the above (ick) */ | ||
57 | #define PGDIR_SIZE PGD_SIZE | ||
58 | #define PGDIR_MASK PGD_MASK | ||
59 | |||
60 | #define PTRS_PER_PGD 32 | ||
61 | #define PTRS_PER_PMD 1 | ||
62 | #define PTRS_PER_PTE 32 | ||
63 | |||
64 | /* | ||
65 | * This is the lowest virtual address we can permit any user space | ||
66 | * mapping to be mapped at. This is particularly important for | ||
67 | * non-high vector CPUs. | ||
68 | */ | ||
69 | #define FIRST_USER_ADDRESS PAGE_SIZE | ||
70 | |||
71 | #define FIRST_USER_PGD_NR 1 | ||
72 | #define USER_PTRS_PER_PGD ((TASK_SIZE/PGD_SIZE) - FIRST_USER_PGD_NR) | ||
73 | |||
74 | // FIXME - WTF? | ||
75 | #define LIBRARY_TEXT_START 0x0c000000 | ||
76 | |||
77 | |||
78 | |||
79 | #ifndef __ASSEMBLY__ | ||
80 | extern void __pte_error(const char *file, int line, unsigned long val); | ||
81 | extern void __pmd_error(const char *file, int line, unsigned long val); | ||
82 | extern void __pgd_error(const char *file, int line, unsigned long val); | ||
83 | |||
84 | #define pte_ERROR(pte) __pte_error(__FILE__, __LINE__, pte_val(pte)) | ||
85 | #define pmd_ERROR(pmd) __pmd_error(__FILE__, __LINE__, pmd_val(pmd)) | ||
86 | #define pgd_ERROR(pgd) __pgd_error(__FILE__, __LINE__, pgd_val(pgd)) | ||
87 | |||
88 | /* | ||
89 | * ZERO_PAGE is a global shared page that is always zero: used | ||
90 | * for zero-mapped memory areas etc.. | ||
91 | */ | ||
92 | extern struct page *empty_zero_page; | ||
93 | #define ZERO_PAGE(vaddr) (empty_zero_page) | ||
94 | |||
95 | #define pte_pfn(pte) (pte_val(pte) >> PAGE_SHIFT) | ||
96 | #define pte_page(pte) (pfn_to_page(pte_pfn(pte))) | ||
97 | #define pfn_pte(pfn,prot) (__pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))) | ||
98 | #define pages_to_mb(x) ((x) >> (20 - PAGE_SHIFT)) | ||
99 | #define mk_pte(page,prot) pfn_pte(page_to_pfn(page),prot) | ||
100 | |||
101 | /* | ||
102 | * Terminology: PGD = Page Directory, PMD = Page Middle Directory, | ||
103 | * PTE = Page Table Entry | ||
104 | * | ||
105 | * on arm26 we have no 2nd level page table. we simulate this by removing the | ||
106 | * PMD. | ||
107 | * | ||
108 | * pgd_none is 0 to prevernt pmd_alloc() calling __pmd_alloc(). This causes it | ||
109 | * to return pmd_offset(pgd,addr) which is a pointer to the pgd (IOW, a no-op). | ||
110 | * | ||
111 | * however, to work this way, whilst we are allocating 32 pgds, containing 32 | ||
112 | * PTEs, the actual work is done on the PMDs, thus: | ||
113 | * | ||
114 | * instead of mm->pgd->pmd->pte | ||
115 | * we have mm->pgdpmd->pte | ||
116 | * | ||
117 | * IOW, think of PGD operations and PMD ones as being the same thing, just | ||
118 | * that PGD stuff deals with the mm_struct side of things, wheras PMD stuff | ||
119 | * deals with the pte side of things. | ||
120 | * | ||
121 | * additionally, we store some bits in the PGD and PTE pointers: | ||
122 | * PGDs: | ||
123 | * o The lowest (1) bit of the PGD is to determine if it is present or swap. | ||
124 | * o The 2nd bit of the PGD is unused and must be zero. | ||
125 | * o The top 6 bits of the PGD must be zero. | ||
126 | * PTEs: | ||
127 | * o The lower 5 bits of a pte are flags. bit 1 is the 'present' flag. The | ||
128 | * others determine the pages attributes. | ||
129 | * | ||
130 | * the pgd_val, pmd_val, and pte_val macros seem to be private to our code. | ||
131 | * They get the RAW value of the PGD/PMD/PTE entry, including our flags | ||
132 | * encoded into the pointers. | ||
133 | * | ||
134 | * The pgd_offset, pmd_offset, and pte_offset macros are used by the kernel, | ||
135 | * so they shouldnt have our flags attached. | ||
136 | * | ||
137 | * If you understood that, feel free to explain it to me... | ||
138 | * | ||
139 | */ | ||
140 | |||
141 | #define _PMD_PRESENT (0x01) | ||
142 | |||
143 | /* These definitions allow us to optimise out stuff like pmd_alloc() */ | ||
144 | #define pgd_none(pgd) (0) | ||
145 | #define pgd_bad(pgd) (0) | ||
146 | #define pgd_present(pgd) (1) | ||
147 | #define pgd_clear(pgdp) do { } while (0) | ||
148 | |||
149 | /* Whilst these handle our actual 'page directory' (the agglomeration of pgd and pmd) | ||
150 | */ | ||
151 | #define pmd_none(pmd) (!pmd_val(pmd)) | ||
152 | #define pmd_bad(pmd) ((pmd_val(pmd) & 0xfc000002)) | ||
153 | #define pmd_present(pmd) (pmd_val(pmd) & _PMD_PRESENT) | ||
154 | #define set_pmd(pmd_ptr, pmd) ((*(pmd_ptr)) = (pmd)) | ||
155 | #define pmd_clear(pmdp) set_pmd(pmdp, __pmd(0)) | ||
156 | |||
157 | /* and these handle our pte tables */ | ||
158 | #define pte_none(pte) (!pte_val(pte)) | ||
159 | #define pte_present(pte) (pte_val(pte) & _PAGE_PRESENT) | ||
160 | #define set_pte(pte_ptr, pte) ((*(pte_ptr)) = (pte)) | ||
161 | #define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) | ||
162 | #define pte_clear(mm,addr,ptep) set_pte_at((mm),(addr),(ptep), __pte(0)) | ||
163 | |||
164 | /* macros to ease the getting of pointers to stuff... */ | ||
165 | #define pgd_offset(mm, addr) ((pgd_t *)(mm)->pgd + __pgd_index(addr)) | ||
166 | #define pmd_offset(pgd, addr) ((pmd_t *)(pgd)) | ||
167 | #define pte_offset(pmd, addr) ((pte_t *)pmd_page(*(pmd)) + __pte_index(addr)) | ||
168 | |||
169 | /* there is no __pmd_index as we dont use pmds */ | ||
170 | #define __pgd_index(addr) ((addr) >> PGD_SHIFT) | ||
171 | #define __pte_index(addr) (((addr) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)) | ||
172 | |||
173 | |||
174 | /* Keep the kernel happy */ | ||
175 | #define pgd_index(addr) __pgd_index(addr) | ||
176 | #define pgd_offset_k(addr) (pgd_offset(&init_mm, addr)) | ||
177 | |||
178 | /* | ||
179 | * The vmalloc() routines leaves a hole of 4kB between each vmalloced | ||
180 | * area for the same reason. ;) FIXME: surely 1 page not 4k ? | ||
181 | */ | ||
182 | #define VMALLOC_START 0x01a00000 | ||
183 | #define VMALLOC_END 0x01c00000 | ||
184 | |||
185 | /* Is pmd_page supposed to return a pointer to a page in some arches? ours seems to | ||
186 | * return a pointer to memory (no special alignment) | ||
187 | */ | ||
188 | #define pmd_page(pmd) ((struct page *)(pmd_val((pmd)) & ~_PMD_PRESENT)) | ||
189 | #define pmd_page_vaddr(pmd) ((pte_t *)(pmd_val((pmd)) & ~_PMD_PRESENT)) | ||
190 | |||
191 | #define pte_offset_kernel(dir,addr) (pmd_page_vaddr(*(dir)) + __pte_index(addr)) | ||
192 | |||
193 | #define pte_offset_map(dir,addr) (pmd_page_vaddr(*(dir)) + __pte_index(addr)) | ||
194 | #define pte_offset_map_nested(dir,addr) (pmd_page_vaddr(*(dir)) + __pte_index(addr)) | ||
195 | #define pte_unmap(pte) do { } while (0) | ||
196 | #define pte_unmap_nested(pte) do { } while (0) | ||
197 | |||
198 | |||
199 | #define _PAGE_PRESENT 0x01 | ||
200 | #define _PAGE_READONLY 0x02 | ||
201 | #define _PAGE_NOT_USER 0x04 | ||
202 | #define _PAGE_OLD 0x08 | ||
203 | #define _PAGE_CLEAN 0x10 | ||
204 | |||
205 | // an old page has never been read. | ||
206 | // a clean page has never been written. | ||
207 | |||
208 | /* -- present -- -- !dirty -- --- !write --- ---- !user --- */ | ||
209 | #define PAGE_NONE __pgprot(_PAGE_PRESENT | _PAGE_CLEAN | _PAGE_READONLY | _PAGE_NOT_USER) | ||
210 | #define PAGE_SHARED __pgprot(_PAGE_PRESENT | _PAGE_CLEAN ) | ||
211 | #define PAGE_COPY __pgprot(_PAGE_PRESENT | _PAGE_CLEAN | _PAGE_READONLY ) | ||
212 | #define PAGE_READONLY __pgprot(_PAGE_PRESENT | _PAGE_CLEAN | _PAGE_READONLY ) | ||
213 | #define PAGE_KERNEL __pgprot(_PAGE_PRESENT | _PAGE_NOT_USER) | ||
214 | |||
215 | #define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_OLD | _PAGE_CLEAN) | ||
216 | |||
217 | /* | ||
218 | * The following only work if pte_present() is true. | ||
219 | * Undefined behaviour if not.. | ||
220 | */ | ||
221 | #define pte_write(pte) (!(pte_val(pte) & _PAGE_READONLY)) | ||
222 | #define pte_dirty(pte) (!(pte_val(pte) & _PAGE_CLEAN)) | ||
223 | #define pte_young(pte) (!(pte_val(pte) & _PAGE_OLD)) | ||
224 | //ONLY when !pte_present() I think. nicked from arm32 (FIXME!) | ||
225 | #define pte_file(pte) (!(pte_val(pte) & _PAGE_OLD)) | ||
226 | |||
227 | #define PTE_BIT_FUNC(fn,op) \ | ||
228 | static inline pte_t pte_##fn(pte_t pte) { pte_val(pte) op; return pte; } | ||
229 | |||
230 | PTE_BIT_FUNC(wrprotect, |= _PAGE_READONLY); | ||
231 | PTE_BIT_FUNC(mkwrite, &= ~_PAGE_READONLY); | ||
232 | PTE_BIT_FUNC(mkclean, |= _PAGE_CLEAN); | ||
233 | PTE_BIT_FUNC(mkdirty, &= ~_PAGE_CLEAN); | ||
234 | PTE_BIT_FUNC(mkold, |= _PAGE_OLD); | ||
235 | PTE_BIT_FUNC(mkyoung, &= ~_PAGE_OLD); | ||
236 | |||
237 | /* | ||
238 | * We don't store cache state bits in the page table here. FIXME - or do we? | ||
239 | */ | ||
240 | #define pgprot_noncached(prot) (prot) | ||
241 | #define pgprot_writecombine(prot) (prot) //FIXME - is a no-op? | ||
242 | |||
243 | extern void pgtable_cache_init(void); | ||
244 | |||
245 | //FIXME - nicked from arm32 and brutally hacked. probably wrong. | ||
246 | #define pte_to_pgoff(x) (pte_val(x) >> 2) | ||
247 | #define pgoff_to_pte(x) __pte(((x) << 2) & ~_PAGE_OLD) | ||
248 | |||
249 | //FIXME - next line borrowed from arm32. is it right? | ||
250 | #define PTE_FILE_MAX_BITS 30 | ||
251 | |||
252 | |||
253 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | ||
254 | { | ||
255 | pte_val(pte) = (pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot); | ||
256 | return pte; | ||
257 | } | ||
258 | |||
259 | extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; | ||
260 | |||
261 | /* Encode and decode a swap entry. | ||
262 | * | ||
263 | * We support up to 32GB of swap on 4k machines | ||
264 | */ | ||
265 | #define __swp_type(x) (((x).val >> 2) & 0x7f) | ||
266 | #define __swp_offset(x) ((x).val >> 9) | ||
267 | #define __swp_entry(type,offset) ((swp_entry_t) { ((type) << 2) | ((offset) << 9) }) | ||
268 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) | ||
269 | #define __swp_entry_to_pte(swp) ((pte_t) { (swp).val }) | ||
270 | |||
271 | /* Needs to be defined here and not in linux/mm.h, as it is arch dependent */ | ||
272 | /* FIXME: this is not correct */ | ||
273 | #define kern_addr_valid(addr) (1) | ||
274 | |||
275 | /* | ||
276 | * Conversion functions: convert a page and protection to a page entry, | ||
277 | * and a page entry and page directory to the page they refer to. | ||
278 | */ | ||
279 | static inline pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot) | ||
280 | { | ||
281 | pte_t pte; | ||
282 | pte_val(pte) = physpage | pgprot_val(pgprot); | ||
283 | return pte; | ||
284 | } | ||
285 | |||
286 | |||
287 | #include <asm-generic/pgtable.h> | ||
288 | |||
289 | /* | ||
290 | * remap a physical page `pfn' of size `size' with page protection `prot' | ||
291 | * into virtual address `from' | ||
292 | */ | ||
293 | #define io_remap_pfn_range(vma,from,pfn,size,prot) \ | ||
294 | remap_pfn_range(vma, from, pfn, size, prot) | ||
295 | |||
296 | #endif /* !__ASSEMBLY__ */ | ||
297 | |||
298 | #endif /* _ASMARM_PGTABLE_H */ | ||
diff --git a/include/asm-arm26/poll.h b/include/asm-arm26/poll.h deleted file mode 100644 index 1170e7065f6a..000000000000 --- a/include/asm-arm26/poll.h +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | #ifndef __ASMARM_POLL_H | ||
2 | #define __ASMARM_POLL_H | ||
3 | |||
4 | #include <asm-generic/poll.h> | ||
5 | |||
6 | #undef POLLREMOVE | ||
7 | |||
8 | #endif | ||
diff --git a/include/asm-arm26/posix_types.h b/include/asm-arm26/posix_types.h deleted file mode 100644 index f8d1eb4f4cb1..000000000000 --- a/include/asm-arm26/posix_types.h +++ /dev/null | |||
@@ -1,81 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/posix_types.h | ||
3 | * | ||
4 | * Copyright (C) 1996-1998 Russell King. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * Changelog: | ||
11 | * 27-06-1996 RMK Created | ||
12 | */ | ||
13 | #ifndef __ARCH_ARM_POSIX_TYPES_H | ||
14 | #define __ARCH_ARM_POSIX_TYPES_H | ||
15 | |||
16 | /* | ||
17 | * This file is generally used by user-level software, so you need to | ||
18 | * be a little careful about namespace pollution etc. Also, we cannot | ||
19 | * assume GCC is being used. | ||
20 | */ | ||
21 | |||
22 | typedef unsigned long __kernel_ino_t; | ||
23 | typedef unsigned short __kernel_mode_t; | ||
24 | typedef unsigned short __kernel_nlink_t; | ||
25 | typedef long __kernel_off_t; | ||
26 | typedef int __kernel_pid_t; | ||
27 | typedef unsigned short __kernel_ipc_pid_t; | ||
28 | typedef unsigned short __kernel_uid_t; | ||
29 | typedef unsigned short __kernel_gid_t; | ||
30 | typedef unsigned int __kernel_size_t; | ||
31 | typedef int __kernel_ssize_t; | ||
32 | typedef int __kernel_ptrdiff_t; | ||
33 | typedef long __kernel_time_t; | ||
34 | typedef long __kernel_suseconds_t; | ||
35 | typedef long __kernel_clock_t; | ||
36 | typedef int __kernel_timer_t; | ||
37 | typedef int __kernel_clockid_t; | ||
38 | typedef int __kernel_daddr_t; | ||
39 | typedef char * __kernel_caddr_t; | ||
40 | typedef unsigned short __kernel_uid16_t; | ||
41 | typedef unsigned short __kernel_gid16_t; | ||
42 | typedef unsigned int __kernel_uid32_t; | ||
43 | typedef unsigned int __kernel_gid32_t; | ||
44 | |||
45 | typedef unsigned short __kernel_old_uid_t; | ||
46 | typedef unsigned short __kernel_old_gid_t; | ||
47 | typedef unsigned short __kernel_old_dev_t; | ||
48 | |||
49 | #ifdef __GNUC__ | ||
50 | typedef long long __kernel_loff_t; | ||
51 | #endif | ||
52 | |||
53 | typedef struct { | ||
54 | #if defined(__KERNEL__) || defined(__USE_ALL) | ||
55 | int val[2]; | ||
56 | #else /* !defined(__KERNEL__) && !defined(__USE_ALL) */ | ||
57 | int __val[2]; | ||
58 | #endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */ | ||
59 | } __kernel_fsid_t; | ||
60 | |||
61 | #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) | ||
62 | |||
63 | #undef __FD_SET | ||
64 | #define __FD_SET(fd, fdsetp) \ | ||
65 | (((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] |= (1<<((fd) & 31))) | ||
66 | |||
67 | #undef __FD_CLR | ||
68 | #define __FD_CLR(fd, fdsetp) \ | ||
69 | (((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] &= ~(1<<((fd) & 31))) | ||
70 | |||
71 | #undef __FD_ISSET | ||
72 | #define __FD_ISSET(fd, fdsetp) \ | ||
73 | ((((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] & (1<<((fd) & 31))) != 0) | ||
74 | |||
75 | #undef __FD_ZERO | ||
76 | #define __FD_ZERO(fdsetp) \ | ||
77 | (memset ((fdsetp), 0, sizeof (*(fd_set *)(fdsetp)))) | ||
78 | |||
79 | #endif | ||
80 | |||
81 | #endif | ||
diff --git a/include/asm-arm26/proc-fns.h b/include/asm-arm26/proc-fns.h deleted file mode 100644 index a83100454055..000000000000 --- a/include/asm-arm26/proc-fns.h +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm26/proc-fns.h | ||
3 | * | ||
4 | * Copyright (C) 2000 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #ifndef __ASSEMBLY__ | ||
11 | |||
12 | #include <asm/page.h> | ||
13 | |||
14 | /* | ||
15 | * Don't change this structure - ASM code | ||
16 | * relies on it. | ||
17 | */ | ||
18 | extern struct processor { | ||
19 | /* check for any bugs */ | ||
20 | void (*_check_bugs)(void); | ||
21 | /* Set up any processor specifics */ | ||
22 | void (*_proc_init)(void); | ||
23 | /* Disable any processor specifics */ | ||
24 | void (*_proc_fin)(void); | ||
25 | /* set the MEMC hardware mappings */ | ||
26 | void (*_set_pgd)(pgd_t *pgd); | ||
27 | /* XCHG */ | ||
28 | unsigned long (*_xchg_1)(unsigned long x, volatile void *ptr); | ||
29 | unsigned long (*_xchg_4)(unsigned long x, volatile void *ptr); | ||
30 | } processor; | ||
31 | |||
32 | extern const struct processor arm2_processor_functions; | ||
33 | extern const struct processor arm250_processor_functions; | ||
34 | extern const struct processor arm3_processor_functions; | ||
35 | |||
36 | #define cpu_check_bugs() processor._check_bugs() | ||
37 | #define cpu_proc_init() processor._proc_init() | ||
38 | #define cpu_proc_fin() processor._proc_fin() | ||
39 | #define cpu_do_idle() do { } while (0) | ||
40 | #define cpu_switch_mm(pgd,mm) processor._set_pgd(pgd) | ||
41 | #define cpu_xchg_1(x,ptr) processor._xchg_1(x,ptr) | ||
42 | #define cpu_xchg_4(x,ptr) processor._xchg_4(x,ptr) | ||
43 | |||
44 | |||
45 | //FIXME - these shouldnt be in proc-fn.h | ||
46 | extern void cpu_memc_update_all(pgd_t *pgd); | ||
47 | extern void cpu_memc_update_entry(pgd_t *pgd, unsigned long phys_pte, unsigned long log_addr); | ||
48 | |||
49 | #endif | ||
diff --git a/include/asm-arm26/processor.h b/include/asm-arm26/processor.h deleted file mode 100644 index 1d2d5f7b467b..000000000000 --- a/include/asm-arm26/processor.h +++ /dev/null | |||
@@ -1,113 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm26/processor.h | ||
3 | * | ||
4 | * Copyright (C) 1995 Russell King | ||
5 | * Copyright (C) 2003 Ian Molton | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #ifndef __ASM_ARM_PROCESSOR_H | ||
13 | #define __ASM_ARM_PROCESSOR_H | ||
14 | |||
15 | /* | ||
16 | * Default implementation of macro that returns current | ||
17 | * instruction pointer ("program counter"). | ||
18 | */ | ||
19 | #define current_text_addr() ({ __label__ _l; _l: &&_l;}) | ||
20 | |||
21 | #ifdef __KERNEL__ | ||
22 | |||
23 | #include <asm/atomic.h> | ||
24 | #include <asm/ptrace.h> | ||
25 | #include <linux/string.h> | ||
26 | |||
27 | #define KERNEL_STACK_SIZE 4096 | ||
28 | |||
29 | typedef struct { | ||
30 | void (*put_byte)(void); /* Special calling convention */ | ||
31 | void (*get_byte)(void); /* Special calling convention */ | ||
32 | void (*put_half)(void); /* Special calling convention */ | ||
33 | void (*get_half)(void); /* Special calling convention */ | ||
34 | void (*put_word)(void); /* Special calling convention */ | ||
35 | void (*get_word)(void); /* Special calling convention */ | ||
36 | void (*put_dword)(void); /* Special calling convention */ | ||
37 | unsigned long (*copy_from_user)(void *to, const void *from, unsigned long sz); | ||
38 | unsigned long (*copy_to_user)(void *to, const void *from, unsigned long sz); | ||
39 | unsigned long (*clear_user)(void *addr, unsigned long sz); | ||
40 | unsigned long (*strncpy_from_user)(char *to, const char *from, unsigned long sz); | ||
41 | unsigned long (*strnlen_user)(const char *s, long n); | ||
42 | } uaccess_t; | ||
43 | |||
44 | extern uaccess_t uaccess_user, uaccess_kernel; | ||
45 | |||
46 | #define EXTRA_THREAD_STRUCT \ | ||
47 | uaccess_t *uaccess; /* User access functions*/ | ||
48 | |||
49 | #define EXTRA_THREAD_STRUCT_INIT \ | ||
50 | .uaccess = &uaccess_kernel, | ||
51 | |||
52 | // FIXME?!! | ||
53 | |||
54 | #define start_thread(regs,pc,sp) \ | ||
55 | ({ \ | ||
56 | unsigned long *stack = (unsigned long *)sp; \ | ||
57 | set_fs(USER_DS); \ | ||
58 | memzero(regs->uregs, sizeof (regs->uregs)); \ | ||
59 | regs->ARM_pc = pc | ~0xfc000003; /* pc */ \ | ||
60 | regs->ARM_sp = sp; /* sp */ \ | ||
61 | regs->ARM_r2 = stack[2]; /* r2 (envp) */ \ | ||
62 | regs->ARM_r1 = stack[1]; /* r1 (argv) */ \ | ||
63 | regs->ARM_r0 = stack[0]; /* r0 (argc) */ \ | ||
64 | }) | ||
65 | |||
66 | #define KSTK_EIP(tsk) (((unsigned long *)(4096+(unsigned long)(tsk)))[1020]) | ||
67 | #define KSTK_ESP(tsk) (((unsigned long *)(4096+(unsigned long)(tsk)))[1018]) | ||
68 | |||
69 | struct debug_entry { | ||
70 | u32 address; | ||
71 | u32 insn; | ||
72 | }; | ||
73 | |||
74 | struct debug_info { | ||
75 | int nsaved; | ||
76 | struct debug_entry bp[2]; | ||
77 | }; | ||
78 | |||
79 | struct thread_struct { | ||
80 | /* fault info */ | ||
81 | unsigned long address; | ||
82 | unsigned long trap_no; | ||
83 | unsigned long error_code; | ||
84 | /* debugging */ | ||
85 | struct debug_info debug; | ||
86 | EXTRA_THREAD_STRUCT | ||
87 | }; | ||
88 | |||
89 | #define INIT_THREAD { \ | ||
90 | EXTRA_THREAD_STRUCT_INIT \ | ||
91 | } | ||
92 | |||
93 | /* Forward declaration, a strange C thing */ | ||
94 | struct task_struct; | ||
95 | |||
96 | /* Free all resources held by a thread. */ | ||
97 | extern void release_thread(struct task_struct *); | ||
98 | |||
99 | unsigned long get_wchan(struct task_struct *p); | ||
100 | |||
101 | #define cpu_relax() barrier() | ||
102 | |||
103 | /* Prepare to copy thread state - unlazy all lazy status */ | ||
104 | #define prepare_to_copy(tsk) do { } while (0) | ||
105 | |||
106 | /* | ||
107 | * Create a new kernel thread | ||
108 | */ | ||
109 | extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); | ||
110 | |||
111 | #endif | ||
112 | |||
113 | #endif /* __ASM_ARM_PROCESSOR_H */ | ||
diff --git a/include/asm-arm26/procinfo.h b/include/asm-arm26/procinfo.h deleted file mode 100644 index b28624db69ff..000000000000 --- a/include/asm-arm26/procinfo.h +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/procinfo.h | ||
3 | * | ||
4 | * Copyright (C) 1996-1999 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #ifndef __ASM_PROCINFO_H | ||
11 | #define __ASM_PROCINFO_H | ||
12 | |||
13 | #ifndef __ASSEMBLY__ | ||
14 | |||
15 | //struct processor; | ||
16 | //struct cpu_user_fns; | ||
17 | |||
18 | struct proc_info_item { | ||
19 | const char *manufacturer; | ||
20 | const char *cpu_name; | ||
21 | }; | ||
22 | |||
23 | /* | ||
24 | * Note! struct processor is always defined if we're | ||
25 | * using MULTI_CPU, otherwise this entry is unused, | ||
26 | * but still exists. | ||
27 | * | ||
28 | * NOTE! The following structure is defined by assembly | ||
29 | * language, NOT C code. For more information, check: | ||
30 | * arch/arm/mm/proc-*.S and arch/arm/kernel/head-armv.S | ||
31 | */ | ||
32 | struct proc_info_list { | ||
33 | unsigned int cpu_val; | ||
34 | unsigned int cpu_mask; | ||
35 | const char *arch_name; | ||
36 | const char *elf_name; | ||
37 | unsigned int elf_hwcap; | ||
38 | struct proc_info_item *info; | ||
39 | struct processor *proc; | ||
40 | }; | ||
41 | |||
42 | #endif /* __ASSEMBLY__ */ | ||
43 | |||
44 | #define PROC_INFO_SZ 48 | ||
45 | |||
46 | #define HWCAP_SWP 1 | ||
47 | #define HWCAP_HALF 2 | ||
48 | #define HWCAP_THUMB 4 | ||
49 | #define HWCAP_26BIT 8 /* Play it safe */ | ||
50 | #define HWCAP_FAST_MULT 16 | ||
51 | #define HWCAP_FPA 32 | ||
52 | #define HWCAP_VFP 64 | ||
53 | #define HWCAP_EDSP 128 | ||
54 | #define HWCAP_JAVA 256 | ||
55 | |||
56 | #endif | ||
diff --git a/include/asm-arm26/ptrace.h b/include/asm-arm26/ptrace.h deleted file mode 100644 index 6a46b5ae1156..000000000000 --- a/include/asm-arm26/ptrace.h +++ /dev/null | |||
@@ -1,104 +0,0 @@ | |||
1 | #ifndef __ASM_ARM_PTRACE_H | ||
2 | #define __ASM_ARM_PTRACE_H | ||
3 | |||
4 | #define PTRACE_GETREGS 12 | ||
5 | #define PTRACE_SETREGS 13 | ||
6 | #define PTRACE_GETFPREGS 14 | ||
7 | #define PTRACE_SETFPREGS 15 | ||
8 | #define PTRACE_OLDSETOPTIONS 21 | ||
9 | |||
10 | /* options set using PTRACE_SETOPTIONS */ | ||
11 | #define PTRACE_O_TRACESYSGOOD 0x00000001 | ||
12 | |||
13 | #define MODE_USR26 0x00000000 | ||
14 | #define MODE_FIQ26 0x00000001 | ||
15 | #define MODE_IRQ26 0x00000002 | ||
16 | #define MODE_SVC26 0x00000003 | ||
17 | #define MODE_MASK 0x00000003 | ||
18 | |||
19 | #define PSR_F_BIT 0x04000000 | ||
20 | #define PSR_I_BIT 0x08000000 | ||
21 | #define PSR_V_BIT 0x10000000 | ||
22 | #define PSR_C_BIT 0x20000000 | ||
23 | #define PSR_Z_BIT 0x40000000 | ||
24 | #define PSR_N_BIT 0x80000000 | ||
25 | |||
26 | #define PCMASK 0xfc000003 | ||
27 | |||
28 | |||
29 | #ifndef __ASSEMBLY__ | ||
30 | |||
31 | #define pc_pointer(v) ((v) & ~PCMASK) /* convert v to pc type address */ | ||
32 | #define instruction_pointer(regs) (pc_pointer((regs)->ARM_pc)) /* get pc */ | ||
33 | #define profile_pc(regs) instruction_pointer(regs) | ||
34 | |||
35 | /* this struct defines the way the registers are stored on the | ||
36 | stack during a system call. */ | ||
37 | |||
38 | struct pt_regs { | ||
39 | long uregs[17]; | ||
40 | }; | ||
41 | |||
42 | #define ARM_pc uregs[15] | ||
43 | #define ARM_lr uregs[14] | ||
44 | #define ARM_sp uregs[13] | ||
45 | #define ARM_ip uregs[12] | ||
46 | #define ARM_fp uregs[11] | ||
47 | #define ARM_r10 uregs[10] | ||
48 | #define ARM_r9 uregs[9] | ||
49 | #define ARM_r8 uregs[8] | ||
50 | #define ARM_r7 uregs[7] | ||
51 | #define ARM_r6 uregs[6] | ||
52 | #define ARM_r5 uregs[5] | ||
53 | #define ARM_r4 uregs[4] | ||
54 | #define ARM_r3 uregs[3] | ||
55 | #define ARM_r2 uregs[2] | ||
56 | #define ARM_r1 uregs[1] | ||
57 | #define ARM_r0 uregs[0] | ||
58 | #define ARM_ORIG_r0 uregs[16] | ||
59 | |||
60 | #ifdef __KERNEL__ | ||
61 | |||
62 | #define processor_mode(regs) \ | ||
63 | ((regs)->ARM_pc & MODE_MASK) | ||
64 | |||
65 | #define user_mode(regs) \ | ||
66 | (processor_mode(regs) == MODE_USR26) | ||
67 | |||
68 | #define interrupts_enabled(regs) \ | ||
69 | (!((regs)->ARM_pc & PSR_I_BIT)) | ||
70 | |||
71 | #define fast_interrupts_enabled(regs) \ | ||
72 | (!((regs)->ARM_pc & PSR_F_BIT)) | ||
73 | |||
74 | #define condition_codes(regs) \ | ||
75 | ((regs)->ARM_pc & (PSR_V_BIT|PSR_C_BIT|PSR_Z_BIT|PSR_N_BIT)) | ||
76 | |||
77 | /* Are the current registers suitable for user mode? | ||
78 | * (used to maintain security in signal handlers) | ||
79 | */ | ||
80 | static inline int valid_user_regs(struct pt_regs *regs) | ||
81 | { | ||
82 | if (user_mode(regs) && | ||
83 | (regs->ARM_pc & (PSR_F_BIT | PSR_I_BIT)) == 0) | ||
84 | return 1; | ||
85 | |||
86 | /* | ||
87 | * force it to be something sensible | ||
88 | */ | ||
89 | regs->ARM_pc &= ~(MODE_MASK | PSR_F_BIT | PSR_I_BIT); | ||
90 | |||
91 | return 0; | ||
92 | } | ||
93 | |||
94 | extern void show_regs(struct pt_regs *); | ||
95 | |||
96 | #define predicate(x) (x & 0xf0000000) | ||
97 | #define PREDICATE_ALWAYS 0xe0000000 | ||
98 | |||
99 | #endif /* __KERNEL__ */ | ||
100 | |||
101 | #endif /* __ASSEMBLY__ */ | ||
102 | |||
103 | #endif | ||
104 | |||
diff --git a/include/asm-arm26/resource.h b/include/asm-arm26/resource.h deleted file mode 100644 index 734b581b5b6a..000000000000 --- a/include/asm-arm26/resource.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _ARM_RESOURCE_H | ||
2 | #define _ARM_RESOURCE_H | ||
3 | |||
4 | #include <asm-generic/resource.h> | ||
5 | |||
6 | #endif | ||
diff --git a/include/asm-arm26/scatterlist.h b/include/asm-arm26/scatterlist.h deleted file mode 100644 index d9c056c7784e..000000000000 --- a/include/asm-arm26/scatterlist.h +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | #ifndef _ASMARM_SCATTERLIST_H | ||
2 | #define _ASMARM_SCATTERLIST_H | ||
3 | |||
4 | #include <asm/types.h> | ||
5 | |||
6 | struct scatterlist { | ||
7 | struct page *page; /* buffer page */ | ||
8 | unsigned int offset; /* buffer offset */ | ||
9 | dma_addr_t dma_address; /* dma address */ | ||
10 | unsigned int length; /* length */ | ||
11 | char *__address; /* for set_dma_addr */ | ||
12 | }; | ||
13 | |||
14 | /* | ||
15 | * These macros should be used after a pci_map_sg call has been done | ||
16 | * to get bus addresses of each of the SG entries and their lengths. | ||
17 | * You should only work with the number of sg entries pci_map_sg | ||
18 | * returns, or alternatively stop on the first sg_dma_len(sg) which | ||
19 | * is 0. | ||
20 | */ | ||
21 | #define sg_dma_address(sg) ((sg)->dma_address) | ||
22 | #define sg_dma_len(sg) ((sg)->length) | ||
23 | |||
24 | #define ISA_DMA_THRESHOLD (0xffffffff) | ||
25 | |||
26 | #endif /* _ASMARM_SCATTERLIST_H */ | ||
diff --git a/include/asm-arm26/sections.h b/include/asm-arm26/sections.h deleted file mode 100644 index 10b6370efad0..000000000000 --- a/include/asm-arm26/sections.h +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | //FIXME - nicked from arm32 - check its correct. | ||
2 | #include <asm-generic/sections.h> | ||
diff --git a/include/asm-arm26/segment.h b/include/asm-arm26/segment.h deleted file mode 100644 index 9e24c21f6304..000000000000 --- a/include/asm-arm26/segment.h +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | #ifndef __ASM_ARM_SEGMENT_H | ||
2 | #define __ASM_ARM_SEGMENT_H | ||
3 | |||
4 | #define __KERNEL_CS 0x0 | ||
5 | #define __KERNEL_DS 0x0 | ||
6 | |||
7 | #define __USER_CS 0x1 | ||
8 | #define __USER_DS 0x1 | ||
9 | |||
10 | #endif /* __ASM_ARM_SEGMENT_H */ | ||
11 | |||
diff --git a/include/asm-arm26/semaphore-helper.h b/include/asm-arm26/semaphore-helper.h deleted file mode 100644 index 1d7f1987edb9..000000000000 --- a/include/asm-arm26/semaphore-helper.h +++ /dev/null | |||
@@ -1,84 +0,0 @@ | |||
1 | #ifndef ASMARM_SEMAPHORE_HELPER_H | ||
2 | #define ASMARM_SEMAPHORE_HELPER_H | ||
3 | |||
4 | /* | ||
5 | * These two _must_ execute atomically wrt each other. | ||
6 | */ | ||
7 | static inline void wake_one_more(struct semaphore * sem) | ||
8 | { | ||
9 | unsigned long flags; | ||
10 | |||
11 | spin_lock_irqsave(&semaphore_wake_lock, flags); | ||
12 | if (atomic_read(&sem->count) <= 0) | ||
13 | sem->waking++; | ||
14 | spin_unlock_irqrestore(&semaphore_wake_lock, flags); | ||
15 | } | ||
16 | |||
17 | static inline int waking_non_zero(struct semaphore *sem) | ||
18 | { | ||
19 | unsigned long flags; | ||
20 | int ret = 0; | ||
21 | |||
22 | spin_lock_irqsave(&semaphore_wake_lock, flags); | ||
23 | if (sem->waking > 0) { | ||
24 | sem->waking--; | ||
25 | ret = 1; | ||
26 | } | ||
27 | spin_unlock_irqrestore(&semaphore_wake_lock, flags); | ||
28 | return ret; | ||
29 | } | ||
30 | |||
31 | /* | ||
32 | * waking non zero interruptible | ||
33 | * 1 got the lock | ||
34 | * 0 go to sleep | ||
35 | * -EINTR interrupted | ||
36 | * | ||
37 | * We must undo the sem->count down_interruptible() increment while we are | ||
38 | * protected by the spinlock in order to make this atomic_inc() with the | ||
39 | * atomic_read() in wake_one_more(), otherwise we can race. -arca | ||
40 | */ | ||
41 | static inline int waking_non_zero_interruptible(struct semaphore *sem, | ||
42 | struct task_struct *tsk) | ||
43 | { | ||
44 | unsigned long flags; | ||
45 | int ret = 0; | ||
46 | |||
47 | spin_lock_irqsave(&semaphore_wake_lock, flags); | ||
48 | if (sem->waking > 0) { | ||
49 | sem->waking--; | ||
50 | ret = 1; | ||
51 | } else if (signal_pending(tsk)) { | ||
52 | atomic_inc(&sem->count); | ||
53 | ret = -EINTR; | ||
54 | } | ||
55 | spin_unlock_irqrestore(&semaphore_wake_lock, flags); | ||
56 | return ret; | ||
57 | } | ||
58 | |||
59 | /* | ||
60 | * waking_non_zero_try_lock: | ||
61 | * 1 failed to lock | ||
62 | * 0 got the lock | ||
63 | * | ||
64 | * We must undo the sem->count down_interruptible() increment while we are | ||
65 | * protected by the spinlock in order to make this atomic_inc() with the | ||
66 | * atomic_read() in wake_one_more(), otherwise we can race. -arca | ||
67 | */ | ||
68 | static inline int waking_non_zero_trylock(struct semaphore *sem) | ||
69 | { | ||
70 | unsigned long flags; | ||
71 | int ret = 1; | ||
72 | |||
73 | spin_lock_irqsave(&semaphore_wake_lock, flags); | ||
74 | if (sem->waking <= 0) | ||
75 | atomic_inc(&sem->count); | ||
76 | else { | ||
77 | sem->waking--; | ||
78 | ret = 0; | ||
79 | } | ||
80 | spin_unlock_irqrestore(&semaphore_wake_lock, flags); | ||
81 | return ret; | ||
82 | } | ||
83 | |||
84 | #endif | ||
diff --git a/include/asm-arm26/semaphore.h b/include/asm-arm26/semaphore.h deleted file mode 100644 index 1fda54375ed8..000000000000 --- a/include/asm-arm26/semaphore.h +++ /dev/null | |||
@@ -1,100 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm26/semaphore.h | ||
3 | */ | ||
4 | #ifndef __ASM_ARM_SEMAPHORE_H | ||
5 | #define __ASM_ARM_SEMAPHORE_H | ||
6 | |||
7 | #include <linux/linkage.h> | ||
8 | #include <linux/spinlock.h> | ||
9 | #include <linux/wait.h> | ||
10 | #include <linux/rwsem.h> | ||
11 | |||
12 | #include <asm/atomic.h> | ||
13 | #include <asm/locks.h> | ||
14 | |||
15 | struct semaphore { | ||
16 | atomic_t count; | ||
17 | int sleepers; | ||
18 | wait_queue_head_t wait; | ||
19 | }; | ||
20 | |||
21 | #define __SEMAPHORE_INIT(name, n) \ | ||
22 | { \ | ||
23 | .count = ATOMIC_INIT(n), \ | ||
24 | .sleepers = 0, \ | ||
25 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait), \ | ||
26 | } | ||
27 | |||
28 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ | ||
29 | struct semaphore name = __SEMAPHORE_INIT(name,count) | ||
30 | |||
31 | #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1) | ||
32 | #define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0) | ||
33 | |||
34 | static inline void sema_init(struct semaphore *sem, int val) | ||
35 | { | ||
36 | atomic_set(&sem->count, val); | ||
37 | sem->sleepers = 0; | ||
38 | init_waitqueue_head(&sem->wait); | ||
39 | } | ||
40 | |||
41 | static inline void init_MUTEX(struct semaphore *sem) | ||
42 | { | ||
43 | sema_init(sem, 1); | ||
44 | } | ||
45 | |||
46 | static inline void init_MUTEX_LOCKED(struct semaphore *sem) | ||
47 | { | ||
48 | sema_init(sem, 0); | ||
49 | } | ||
50 | |||
51 | /* | ||
52 | * special register calling convention | ||
53 | */ | ||
54 | asmlinkage void __down_failed(void); | ||
55 | asmlinkage int __down_interruptible_failed(void); | ||
56 | asmlinkage int __down_trylock_failed(void); | ||
57 | asmlinkage void __up_wakeup(void); | ||
58 | |||
59 | extern void __down(struct semaphore * sem); | ||
60 | extern int __down_interruptible(struct semaphore * sem); | ||
61 | extern int __down_trylock(struct semaphore * sem); | ||
62 | extern void __up(struct semaphore * sem); | ||
63 | |||
64 | /* | ||
65 | * This is ugly, but we want the default case to fall through. | ||
66 | * "__down" is the actual routine that waits... | ||
67 | */ | ||
68 | static inline void down(struct semaphore * sem) | ||
69 | { | ||
70 | might_sleep(); | ||
71 | __down_op(sem, __down_failed); | ||
72 | } | ||
73 | |||
74 | /* | ||
75 | * This is ugly, but we want the default case to fall through. | ||
76 | * "__down_interruptible" is the actual routine that waits... | ||
77 | */ | ||
78 | static inline int down_interruptible (struct semaphore * sem) | ||
79 | { | ||
80 | might_sleep(); | ||
81 | return __down_op_ret(sem, __down_interruptible_failed); | ||
82 | } | ||
83 | |||
84 | static inline int down_trylock(struct semaphore *sem) | ||
85 | { | ||
86 | return __down_op_ret(sem, __down_trylock_failed); | ||
87 | } | ||
88 | |||
89 | /* | ||
90 | * Note! This is subtle. We jump to wake people up only if | ||
91 | * the semaphore was negative (== somebody was waiting on it). | ||
92 | * The default case (no contention) will result in NO | ||
93 | * jumps for both down() and up(). | ||
94 | */ | ||
95 | static inline void up(struct semaphore * sem) | ||
96 | { | ||
97 | __up_op(sem, __up_wakeup); | ||
98 | } | ||
99 | |||
100 | #endif | ||
diff --git a/include/asm-arm26/sembuf.h b/include/asm-arm26/sembuf.h deleted file mode 100644 index 1c0283954289..000000000000 --- a/include/asm-arm26/sembuf.h +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | #ifndef _ASMARM_SEMBUF_H | ||
2 | #define _ASMARM_SEMBUF_H | ||
3 | |||
4 | /* | ||
5 | * The semid64_ds structure for arm architecture. | ||
6 | * Note extra padding because this structure is passed back and forth | ||
7 | * between kernel and user space. | ||
8 | * | ||
9 | * Pad space is left for: | ||
10 | * - 64-bit time_t to solve y2038 problem | ||
11 | * - 2 miscellaneous 32-bit values | ||
12 | */ | ||
13 | |||
14 | struct semid64_ds { | ||
15 | struct ipc64_perm sem_perm; /* permissions .. see ipc.h */ | ||
16 | __kernel_time_t sem_otime; /* last semop time */ | ||
17 | unsigned long __unused1; | ||
18 | __kernel_time_t sem_ctime; /* last change time */ | ||
19 | unsigned long __unused2; | ||
20 | unsigned long sem_nsems; /* no. of semaphores in array */ | ||
21 | unsigned long __unused3; | ||
22 | unsigned long __unused4; | ||
23 | }; | ||
24 | |||
25 | #endif /* _ASMARM_SEMBUF_H */ | ||
diff --git a/include/asm-arm26/serial.h b/include/asm-arm26/serial.h deleted file mode 100644 index dd86a716cb0b..000000000000 --- a/include/asm-arm26/serial.h +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/serial.h | ||
3 | * | ||
4 | * Copyright (C) 1996 Russell King. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * Changelog: | ||
11 | * 15-10-1996 RMK Created | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASM_SERIAL_H | ||
15 | #define __ASM_SERIAL_H | ||
16 | |||
17 | |||
18 | /* | ||
19 | * This assumes you have a 1.8432 MHz clock for your UART. | ||
20 | * | ||
21 | * It'd be nice if someone built a serial card with a 24.576 MHz | ||
22 | * clock, since the 16550A is capable of handling a top speed of 1.5 | ||
23 | * megabits/second; but this requires the faster clock. | ||
24 | */ | ||
25 | #define BASE_BAUD (1843200 / 16) | ||
26 | |||
27 | #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) | ||
28 | |||
29 | #if defined(CONFIG_ARCH_A5K) | ||
30 | /* UART CLK PORT IRQ FLAGS */ | ||
31 | |||
32 | #define SERIAL_PORT_DFNS \ | ||
33 | { 0, BASE_BAUD, 0x3F8, 10, STD_COM_FLAGS }, /* ttyS0 */ \ | ||
34 | { 0, BASE_BAUD, 0x2F8, 10, STD_COM_FLAGS }, /* ttyS1 */ | ||
35 | |||
36 | #else | ||
37 | |||
38 | #define SERIAL_PORT_DFNS \ | ||
39 | { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS0 */ \ | ||
40 | { 0, BASE_BAUD, 0 , 0, STD_COM_FLAGS }, /* ttyS1 */ | ||
41 | |||
42 | #endif | ||
43 | |||
44 | #endif | ||
diff --git a/include/asm-arm26/setup.h b/include/asm-arm26/setup.h deleted file mode 100644 index e82562306475..000000000000 --- a/include/asm-arm26/setup.h +++ /dev/null | |||
@@ -1,209 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm/setup.h | ||
3 | * | ||
4 | * Copyright (C) 1997-1999 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * Structure passed to kernel to tell it about the | ||
11 | * hardware it's running on. See Documentation/arm/Setup | ||
12 | * for more info. | ||
13 | */ | ||
14 | #ifndef __ASMARM_SETUP_H | ||
15 | #define __ASMARM_SETUP_H | ||
16 | |||
17 | #define COMMAND_LINE_SIZE 1024 | ||
18 | |||
19 | #ifdef __KERNEL__ | ||
20 | |||
21 | /* The list ends with an ATAG_NONE node. */ | ||
22 | #define ATAG_NONE 0x00000000 | ||
23 | |||
24 | struct tag_header { | ||
25 | u32 size; | ||
26 | u32 tag; | ||
27 | }; | ||
28 | |||
29 | /* The list must start with an ATAG_CORE node */ | ||
30 | #define ATAG_CORE 0x54410001 | ||
31 | |||
32 | struct tag_core { | ||
33 | u32 flags; /* bit 0 = read-only */ | ||
34 | u32 pagesize; | ||
35 | u32 rootdev; | ||
36 | }; | ||
37 | |||
38 | /* it is allowed to have multiple ATAG_MEM nodes */ | ||
39 | #define ATAG_MEM 0x54410002 | ||
40 | |||
41 | struct tag_mem32 { | ||
42 | u32 size; | ||
43 | u32 start; /* physical start address */ | ||
44 | }; | ||
45 | |||
46 | /* VGA text type displays */ | ||
47 | #define ATAG_VIDEOTEXT 0x54410003 | ||
48 | |||
49 | struct tag_videotext { | ||
50 | u8 x; | ||
51 | u8 y; | ||
52 | u16 video_page; | ||
53 | u8 video_mode; | ||
54 | u8 video_cols; | ||
55 | u16 video_ega_bx; | ||
56 | u8 video_lines; | ||
57 | u8 video_isvga; | ||
58 | u16 video_points; | ||
59 | }; | ||
60 | |||
61 | /* describes how the ramdisk will be used in kernel */ | ||
62 | #define ATAG_RAMDISK 0x54410004 | ||
63 | |||
64 | struct tag_ramdisk { | ||
65 | u32 flags; /* bit 0 = load, bit 1 = prompt */ | ||
66 | u32 size; /* decompressed ramdisk size in _kilo_ bytes */ | ||
67 | u32 start; /* starting block of floppy-based RAM disk image */ | ||
68 | }; | ||
69 | |||
70 | /* describes where the compressed ramdisk image lives */ | ||
71 | /* | ||
72 | * this one accidentally used virtual addresses - as such, | ||
73 | * it's deprecated. | ||
74 | */ | ||
75 | #define ATAG_INITRD 0x54410005 | ||
76 | |||
77 | /* describes where the compressed ramdisk image lives */ | ||
78 | #define ATAG_INITRD2 0x54420005 | ||
79 | |||
80 | struct tag_initrd { | ||
81 | u32 start; /* physical start address */ | ||
82 | u32 size; /* size of compressed ramdisk image in bytes */ | ||
83 | }; | ||
84 | |||
85 | /* board serial number. "64 bits should be enough for everybody" */ | ||
86 | #define ATAG_SERIAL 0x54410006 | ||
87 | |||
88 | struct tag_serialnr { | ||
89 | u32 low; | ||
90 | u32 high; | ||
91 | }; | ||
92 | |||
93 | /* board revision */ | ||
94 | #define ATAG_REVISION 0x54410007 | ||
95 | |||
96 | struct tag_revision { | ||
97 | u32 rev; | ||
98 | }; | ||
99 | |||
100 | /* initial values for vesafb-type framebuffers. see struct screen_info | ||
101 | * in include/linux/tty.h | ||
102 | */ | ||
103 | #define ATAG_VIDEOLFB 0x54410008 | ||
104 | |||
105 | struct tag_videolfb { | ||
106 | u16 lfb_width; | ||
107 | u16 lfb_height; | ||
108 | u16 lfb_depth; | ||
109 | u16 lfb_linelength; | ||
110 | u32 lfb_base; | ||
111 | u32 lfb_size; | ||
112 | u8 red_size; | ||
113 | u8 red_pos; | ||
114 | u8 green_size; | ||
115 | u8 green_pos; | ||
116 | u8 blue_size; | ||
117 | u8 blue_pos; | ||
118 | u8 rsvd_size; | ||
119 | u8 rsvd_pos; | ||
120 | }; | ||
121 | |||
122 | /* command line: \0 terminated string */ | ||
123 | #define ATAG_CMDLINE 0x54410009 | ||
124 | |||
125 | struct tag_cmdline { | ||
126 | char cmdline[1]; /* this is the minimum size */ | ||
127 | }; | ||
128 | |||
129 | /* acorn RiscPC specific information */ | ||
130 | #define ATAG_ACORN 0x41000101 | ||
131 | |||
132 | struct tag_acorn { | ||
133 | u32 memc_control_reg; | ||
134 | u32 vram_pages; | ||
135 | u8 sounddefault; | ||
136 | u8 adfsdrives; | ||
137 | }; | ||
138 | |||
139 | /* footbridge memory clock, see arch/arm/mach-footbridge/arch.c */ | ||
140 | #define ATAG_MEMCLK 0x41000402 | ||
141 | |||
142 | struct tag_memclk { | ||
143 | u32 fmemclk; | ||
144 | }; | ||
145 | |||
146 | struct tag { | ||
147 | struct tag_header hdr; | ||
148 | union { | ||
149 | struct tag_core core; | ||
150 | struct tag_mem32 mem; | ||
151 | struct tag_videotext videotext; | ||
152 | struct tag_ramdisk ramdisk; | ||
153 | struct tag_initrd initrd; | ||
154 | struct tag_serialnr serialnr; | ||
155 | struct tag_revision revision; | ||
156 | struct tag_videolfb videolfb; | ||
157 | struct tag_cmdline cmdline; | ||
158 | |||
159 | /* | ||
160 | * Acorn specific | ||
161 | */ | ||
162 | struct tag_acorn acorn; | ||
163 | |||
164 | /* | ||
165 | * DC21285 specific | ||
166 | */ | ||
167 | struct tag_memclk memclk; | ||
168 | } u; | ||
169 | }; | ||
170 | |||
171 | struct tagtable { | ||
172 | u32 tag; | ||
173 | int (*parse)(const struct tag *); | ||
174 | }; | ||
175 | |||
176 | #define __tag __used __attribute__((__section__(".taglist"))) | ||
177 | #define __tagtable(tag, fn) \ | ||
178 | static struct tagtable __tagtable_##fn __tag = { tag, fn } | ||
179 | |||
180 | #define tag_member_present(tag,member) \ | ||
181 | ((unsigned long)(&((struct tag *)0L)->member + 1) \ | ||
182 | <= (tag)->hdr.size * 4) | ||
183 | |||
184 | #define tag_next(t) ((struct tag *)((u32 *)(t) + (t)->hdr.size)) | ||
185 | #define tag_size(type) ((sizeof(struct tag_header) + sizeof(struct type)) >> 2) | ||
186 | |||
187 | #define for_each_tag(t,base) \ | ||
188 | for (t = base; t->hdr.size; t = tag_next(t)) | ||
189 | |||
190 | /* | ||
191 | * Memory map description | ||
192 | */ | ||
193 | #define NR_BANKS 8 | ||
194 | |||
195 | struct meminfo { | ||
196 | int nr_banks; | ||
197 | unsigned long end; | ||
198 | struct { | ||
199 | unsigned long start; | ||
200 | unsigned long size; | ||
201 | int node; | ||
202 | } bank[NR_BANKS]; | ||
203 | }; | ||
204 | |||
205 | extern struct meminfo meminfo; | ||
206 | |||
207 | #endif /* __KERNEL__ */ | ||
208 | |||
209 | #endif | ||
diff --git a/include/asm-arm26/shmbuf.h b/include/asm-arm26/shmbuf.h deleted file mode 100644 index 2e5c67ba1c97..000000000000 --- a/include/asm-arm26/shmbuf.h +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | #ifndef _ASMARM_SHMBUF_H | ||
2 | #define _ASMARM_SHMBUF_H | ||
3 | |||
4 | /* | ||
5 | * The shmid64_ds structure for arm architecture. | ||
6 | * Note extra padding because this structure is passed back and forth | ||
7 | * between kernel and user space. | ||
8 | * | ||
9 | * Pad space is left for: | ||
10 | * - 64-bit time_t to solve y2038 problem | ||
11 | * - 2 miscellaneous 32-bit values | ||
12 | */ | ||
13 | |||
14 | struct shmid64_ds { | ||
15 | struct ipc64_perm shm_perm; /* operation perms */ | ||
16 | size_t shm_segsz; /* size of segment (bytes) */ | ||
17 | __kernel_time_t shm_atime; /* last attach time */ | ||
18 | unsigned long __unused1; | ||
19 | __kernel_time_t shm_dtime; /* last detach time */ | ||
20 | unsigned long __unused2; | ||
21 | __kernel_time_t shm_ctime; /* last change time */ | ||
22 | unsigned long __unused3; | ||
23 | __kernel_pid_t shm_cpid; /* pid of creator */ | ||
24 | __kernel_pid_t shm_lpid; /* pid of last operator */ | ||
25 | unsigned long shm_nattch; /* no. of current attaches */ | ||
26 | unsigned long __unused4; | ||
27 | unsigned long __unused5; | ||
28 | }; | ||
29 | |||
30 | struct shminfo64 { | ||
31 | unsigned long shmmax; | ||
32 | unsigned long shmmin; | ||
33 | unsigned long shmmni; | ||
34 | unsigned long shmseg; | ||
35 | unsigned long shmall; | ||
36 | unsigned long __unused1; | ||
37 | unsigned long __unused2; | ||
38 | unsigned long __unused3; | ||
39 | unsigned long __unused4; | ||
40 | }; | ||
41 | |||
42 | #endif /* _ASMARM_SHMBUF_H */ | ||
diff --git a/include/asm-arm26/shmparam.h b/include/asm-arm26/shmparam.h deleted file mode 100644 index d3748686631e..000000000000 --- a/include/asm-arm26/shmparam.h +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | #ifndef _ASMARM_SHMPARAM_H | ||
2 | #define _ASMARM_SHMPARAM_H | ||
3 | |||
4 | #ifndef SHMMAX | ||
5 | #define SHMMAX 0x003fa000 | ||
6 | #endif | ||
7 | |||
8 | /* | ||
9 | * This should be the size of the virtually indexed cache/ways, | ||
10 | * or page size, whichever is greater since the cache aliases | ||
11 | * every size/ways bytes. | ||
12 | */ | ||
13 | #define SHMLBA PAGE_SIZE /* attach addr a multiple of this */ | ||
14 | |||
15 | #endif /* _ASMARM_SHMPARAM_H */ | ||
diff --git a/include/asm-arm26/sigcontext.h b/include/asm-arm26/sigcontext.h deleted file mode 100644 index 013ad2074fc7..000000000000 --- a/include/asm-arm26/sigcontext.h +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | #ifndef _ASMARM_SIGCONTEXT_H | ||
2 | #define _ASMARM_SIGCONTEXT_H | ||
3 | |||
4 | /* | ||
5 | * Signal context structure - contains all info to do with the state | ||
6 | * before the signal handler was invoked. Note: only add new entries | ||
7 | * to the end of the structure. | ||
8 | */ | ||
9 | struct sigcontext { | ||
10 | unsigned long trap_no; | ||
11 | unsigned long error_code; | ||
12 | unsigned long oldmask; | ||
13 | unsigned long arm_r0; | ||
14 | unsigned long arm_r1; | ||
15 | unsigned long arm_r2; | ||
16 | unsigned long arm_r3; | ||
17 | unsigned long arm_r4; | ||
18 | unsigned long arm_r5; | ||
19 | unsigned long arm_r6; | ||
20 | unsigned long arm_r7; | ||
21 | unsigned long arm_r8; | ||
22 | unsigned long arm_r9; | ||
23 | unsigned long arm_r10; | ||
24 | unsigned long arm_fp; | ||
25 | unsigned long arm_ip; | ||
26 | unsigned long arm_sp; | ||
27 | unsigned long arm_lr; | ||
28 | unsigned long arm_pc; | ||
29 | unsigned long fault_address; | ||
30 | }; | ||
31 | |||
32 | |||
33 | #endif | ||
diff --git a/include/asm-arm26/siginfo.h b/include/asm-arm26/siginfo.h deleted file mode 100644 index 5e21852e6039..000000000000 --- a/include/asm-arm26/siginfo.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _ASMARM_SIGINFO_H | ||
2 | #define _ASMARM_SIGINFO_H | ||
3 | |||
4 | #include <asm-generic/siginfo.h> | ||
5 | |||
6 | #endif | ||
diff --git a/include/asm-arm26/signal.h b/include/asm-arm26/signal.h deleted file mode 100644 index 967ba4947e40..000000000000 --- a/include/asm-arm26/signal.h +++ /dev/null | |||
@@ -1,176 +0,0 @@ | |||
1 | #ifndef _ASMARM_SIGNAL_H | ||
2 | #define _ASMARM_SIGNAL_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | /* Avoid too many header ordering problems. */ | ||
7 | struct siginfo; | ||
8 | |||
9 | #ifdef __KERNEL__ | ||
10 | /* Most things should be clean enough to redefine this at will, if care | ||
11 | is taken to make libc match. */ | ||
12 | |||
13 | #define _NSIG 64 | ||
14 | #define _NSIG_BPW 32 | ||
15 | #define _NSIG_WORDS (_NSIG / _NSIG_BPW) | ||
16 | |||
17 | typedef unsigned long old_sigset_t; /* at least 32 bits */ | ||
18 | |||
19 | typedef struct { | ||
20 | unsigned long sig[_NSIG_WORDS]; | ||
21 | } sigset_t; | ||
22 | |||
23 | #else | ||
24 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
25 | |||
26 | #define NSIG 32 | ||
27 | typedef unsigned long sigset_t; | ||
28 | |||
29 | #endif /* __KERNEL__ */ | ||
30 | |||
31 | #define SIGHUP 1 | ||
32 | #define SIGINT 2 | ||
33 | #define SIGQUIT 3 | ||
34 | #define SIGILL 4 | ||
35 | #define SIGTRAP 5 | ||
36 | #define SIGABRT 6 | ||
37 | #define SIGIOT 6 | ||
38 | #define SIGBUS 7 | ||
39 | #define SIGFPE 8 | ||
40 | #define SIGKILL 9 | ||
41 | #define SIGUSR1 10 | ||
42 | #define SIGSEGV 11 | ||
43 | #define SIGUSR2 12 | ||
44 | #define SIGPIPE 13 | ||
45 | #define SIGALRM 14 | ||
46 | #define SIGTERM 15 | ||
47 | #define SIGSTKFLT 16 | ||
48 | #define SIGCHLD 17 | ||
49 | #define SIGCONT 18 | ||
50 | #define SIGSTOP 19 | ||
51 | #define SIGTSTP 20 | ||
52 | #define SIGTTIN 21 | ||
53 | #define SIGTTOU 22 | ||
54 | #define SIGURG 23 | ||
55 | #define SIGXCPU 24 | ||
56 | #define SIGXFSZ 25 | ||
57 | #define SIGVTALRM 26 | ||
58 | #define SIGPROF 27 | ||
59 | #define SIGWINCH 28 | ||
60 | #define SIGIO 29 | ||
61 | #define SIGPOLL SIGIO | ||
62 | /* | ||
63 | #define SIGLOST 29 | ||
64 | */ | ||
65 | #define SIGPWR 30 | ||
66 | #define SIGSYS 31 | ||
67 | #define SIGUNUSED 31 | ||
68 | |||
69 | /* These should not be considered constants from userland. */ | ||
70 | #define SIGRTMIN 32 | ||
71 | #define SIGRTMAX _NSIG | ||
72 | |||
73 | #define SIGSWI 32 | ||
74 | |||
75 | /* | ||
76 | * SA_FLAGS values: | ||
77 | * | ||
78 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | ||
79 | * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. | ||
80 | * SA_SIGINFO deliver the signal with SIGINFO structs | ||
81 | * SA_THIRTYTWO delivers the signal in 32-bit mode, even if the task | ||
82 | * is running in 26-bit. | ||
83 | * SA_ONSTACK allows alternate signal stacks (see sigaltstack(2)). | ||
84 | * SA_RESTART flag to get restarting signals (which were the default long ago) | ||
85 | * SA_NODEFER prevents the current signal from being masked in the handler. | ||
86 | * SA_RESETHAND clears the handler when the signal is delivered. | ||
87 | * | ||
88 | * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single | ||
89 | * Unix names RESETHAND and NODEFER respectively. | ||
90 | */ | ||
91 | #define SA_NOCLDSTOP 0x00000001 | ||
92 | #define SA_NOCLDWAIT 0x00000002 /* not supported yet */ | ||
93 | #define SA_SIGINFO 0x00000004 | ||
94 | #define SA_THIRTYTWO 0x02000000 | ||
95 | #define SA_RESTORER 0x04000000 | ||
96 | #define SA_ONSTACK 0x08000000 | ||
97 | #define SA_RESTART 0x10000000 | ||
98 | #define SA_NODEFER 0x40000000 | ||
99 | #define SA_RESETHAND 0x80000000 | ||
100 | |||
101 | #define SA_NOMASK SA_NODEFER | ||
102 | #define SA_ONESHOT SA_RESETHAND | ||
103 | |||
104 | |||
105 | /* | ||
106 | * sigaltstack controls | ||
107 | */ | ||
108 | #define SS_ONSTACK 1 | ||
109 | #define SS_DISABLE 2 | ||
110 | |||
111 | #define MINSIGSTKSZ 2048 | ||
112 | #define SIGSTKSZ 8192 | ||
113 | |||
114 | #ifdef __KERNEL__ | ||
115 | #define SA_IRQNOMASK 0x08000000 | ||
116 | #endif | ||
117 | |||
118 | #include <asm-generic/signal.h> | ||
119 | |||
120 | #ifdef __KERNEL__ | ||
121 | struct old_sigaction { | ||
122 | __sighandler_t sa_handler; | ||
123 | old_sigset_t sa_mask; | ||
124 | unsigned long sa_flags; | ||
125 | void (*sa_restorer)(void); | ||
126 | }; | ||
127 | |||
128 | struct sigaction { | ||
129 | __sighandler_t sa_handler; | ||
130 | unsigned long sa_flags; | ||
131 | void (*sa_restorer)(void); | ||
132 | sigset_t sa_mask; /* mask last for extensibility */ | ||
133 | }; | ||
134 | |||
135 | struct k_sigaction { | ||
136 | struct sigaction sa; | ||
137 | }; | ||
138 | |||
139 | #else | ||
140 | /* Here we must cater to libcs that poke about in kernel headers. */ | ||
141 | |||
142 | struct sigaction { | ||
143 | union { | ||
144 | __sighandler_t _sa_handler; | ||
145 | void (*_sa_sigaction)(int, struct siginfo *, void *); | ||
146 | } _u; | ||
147 | sigset_t sa_mask; | ||
148 | unsigned long sa_flags; | ||
149 | void (*sa_restorer)(void); | ||
150 | }; | ||
151 | |||
152 | #define sa_handler _u._sa_handler | ||
153 | #define sa_sigaction _u._sa_sigaction | ||
154 | |||
155 | #endif /* __KERNEL__ */ | ||
156 | |||
157 | typedef struct sigaltstack { | ||
158 | void *ss_sp; | ||
159 | int ss_flags; | ||
160 | size_t ss_size; | ||
161 | } stack_t; | ||
162 | |||
163 | #ifdef __KERNEL__ | ||
164 | #include <asm/sigcontext.h> | ||
165 | |||
166 | #define sigmask(sig) (1UL << ((sig) - 1)) | ||
167 | #endif | ||
168 | |||
169 | |||
170 | #ifdef __KERNEL__ | ||
171 | #include <asm/sigcontext.h> | ||
172 | #define ptrace_signal_deliver(regs, cookie) do { } while (0) | ||
173 | #endif | ||
174 | |||
175 | |||
176 | #endif | ||
diff --git a/include/asm-arm26/sizes.h b/include/asm-arm26/sizes.h deleted file mode 100644 index f8d92ca12040..000000000000 --- a/include/asm-arm26/sizes.h +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | /* | ||
2 | * This program is free software; you can redistribute it and/or modify | ||
3 | * it under the terms of the GNU General Public License as published by | ||
4 | * the Free Software Foundation; either version 2 of the License, or | ||
5 | * (at your option) any later version. | ||
6 | * | ||
7 | * This program is distributed in the hope that it will be useful, | ||
8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
10 | * GNU General Public License for more details. | ||
11 | * | ||
12 | * You should have received a copy of the GNU General Public License | ||
13 | * along with this program; if not, write to the Free Software | ||
14 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
15 | */ | ||
16 | /* DO NOT EDIT!! - this file automatically generated | ||
17 | * from .s file by awk -f s2h.awk | ||
18 | */ | ||
19 | /* Size defintions | ||
20 | * Copyright (C) ARM Limited 1998. All rights reserved. | ||
21 | */ | ||
22 | |||
23 | #ifndef __sizes_h | ||
24 | #define __sizes_h 1 | ||
25 | |||
26 | /* handy sizes */ | ||
27 | #define SZ_1K 0x00000400 | ||
28 | #define SZ_4K 0x00001000 | ||
29 | #define SZ_8K 0x00002000 | ||
30 | #define SZ_16K 0x00004000 | ||
31 | #define SZ_64K 0x00010000 | ||
32 | #define SZ_128K 0x00020000 | ||
33 | #define SZ_256K 0x00040000 | ||
34 | #define SZ_512K 0x00080000 | ||
35 | |||
36 | #define SZ_1M 0x00100000 | ||
37 | #define SZ_2M 0x00200000 | ||
38 | #define SZ_4M 0x00400000 | ||
39 | #define SZ_8M 0x00800000 | ||
40 | #define SZ_16M 0x01000000 | ||
41 | #define SZ_32M 0x02000000 | ||
42 | #define SZ_64M 0x04000000 | ||
43 | #define SZ_128M 0x08000000 | ||
44 | #define SZ_256M 0x10000000 | ||
45 | #define SZ_512M 0x20000000 | ||
46 | |||
47 | #define SZ_1G 0x40000000 | ||
48 | #define SZ_2G 0x80000000 | ||
49 | |||
50 | #endif | ||
51 | |||
52 | /* END */ | ||
diff --git a/include/asm-arm26/smp.h b/include/asm-arm26/smp.h deleted file mode 100644 index 38349ec8b61b..000000000000 --- a/include/asm-arm26/smp.h +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | #ifndef __ASM_SMP_H | ||
2 | #define __ASM_SMP_H | ||
3 | |||
4 | |||
5 | #ifdef CONFIG_SMP | ||
6 | #error SMP not supported | ||
7 | #endif | ||
8 | |||
9 | #endif | ||
diff --git a/include/asm-arm26/socket.h b/include/asm-arm26/socket.h deleted file mode 100644 index 65a1a64bf934..000000000000 --- a/include/asm-arm26/socket.h +++ /dev/null | |||
@@ -1,55 +0,0 @@ | |||
1 | #ifndef _ASMARM_SOCKET_H | ||
2 | #define _ASMARM_SOCKET_H | ||
3 | |||
4 | #include <asm/sockios.h> | ||
5 | |||
6 | /* For setsockopt(2) */ | ||
7 | #define SOL_SOCKET 1 | ||
8 | |||
9 | #define SO_DEBUG 1 | ||
10 | #define SO_REUSEADDR 2 | ||
11 | #define SO_TYPE 3 | ||
12 | #define SO_ERROR 4 | ||
13 | #define SO_DONTROUTE 5 | ||
14 | #define SO_BROADCAST 6 | ||
15 | #define SO_SNDBUF 7 | ||
16 | #define SO_RCVBUF 8 | ||
17 | #define SO_SNDBUFFORCE 32 | ||
18 | #define SO_RCVBUFFORCE 33 | ||
19 | #define SO_KEEPALIVE 9 | ||
20 | #define SO_OOBINLINE 10 | ||
21 | #define SO_NO_CHECK 11 | ||
22 | #define SO_PRIORITY 12 | ||
23 | #define SO_LINGER 13 | ||
24 | #define SO_BSDCOMPAT 14 | ||
25 | /* To add :#define SO_REUSEPORT 15 */ | ||
26 | #define SO_PASSCRED 16 | ||
27 | #define SO_PEERCRED 17 | ||
28 | #define SO_RCVLOWAT 18 | ||
29 | #define SO_SNDLOWAT 19 | ||
30 | #define SO_RCVTIMEO 20 | ||
31 | #define SO_SNDTIMEO 21 | ||
32 | |||
33 | /* Security levels - as per NRL IPv6 - don't actually do anything */ | ||
34 | #define SO_SECURITY_AUTHENTICATION 22 | ||
35 | #define SO_SECURITY_ENCRYPTION_TRANSPORT 23 | ||
36 | #define SO_SECURITY_ENCRYPTION_NETWORK 24 | ||
37 | |||
38 | #define SO_BINDTODEVICE 25 | ||
39 | |||
40 | /* Socket filtering */ | ||
41 | #define SO_ATTACH_FILTER 26 | ||
42 | #define SO_DETACH_FILTER 27 | ||
43 | |||
44 | #define SO_PEERNAME 28 | ||
45 | #define SO_TIMESTAMP 29 | ||
46 | #define SCM_TIMESTAMP SO_TIMESTAMP | ||
47 | |||
48 | #define SO_ACCEPTCONN 30 | ||
49 | |||
50 | #define SO_PEERSEC 31 | ||
51 | #define SO_PASSSEC 34 | ||
52 | #define SO_TIMESTAMPNS 35 | ||
53 | #define SCM_TIMESTAMPNS SO_TIMESTAMPNS | ||
54 | |||
55 | #endif /* _ASM_SOCKET_H */ | ||
diff --git a/include/asm-arm26/sockios.h b/include/asm-arm26/sockios.h deleted file mode 100644 index a2588a2512df..000000000000 --- a/include/asm-arm26/sockios.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | #ifndef __ARCH_ARM_SOCKIOS_H | ||
2 | #define __ARCH_ARM_SOCKIOS_H | ||
3 | |||
4 | /* Socket-level I/O control calls. */ | ||
5 | #define FIOSETOWN 0x8901 | ||
6 | #define SIOCSPGRP 0x8902 | ||
7 | #define FIOGETOWN 0x8903 | ||
8 | #define SIOCGPGRP 0x8904 | ||
9 | #define SIOCATMARK 0x8905 | ||
10 | #define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */ | ||
11 | #define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */ | ||
12 | |||
13 | #endif | ||
diff --git a/include/asm-arm26/spinlock.h b/include/asm-arm26/spinlock.h deleted file mode 100644 index e92e81deb4fd..000000000000 --- a/include/asm-arm26/spinlock.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __ASM_SPINLOCK_H | ||
2 | #define __ASM_SPINLOCK_H | ||
3 | |||
4 | #error ARM architecture does not support SMP spin locks | ||
5 | |||
6 | #endif /* __ASM_SPINLOCK_H */ | ||
diff --git a/include/asm-arm26/stat.h b/include/asm-arm26/stat.h deleted file mode 100644 index e4abc4fa0850..000000000000 --- a/include/asm-arm26/stat.h +++ /dev/null | |||
@@ -1,77 +0,0 @@ | |||
1 | #ifndef _ASMARM_STAT_H | ||
2 | #define _ASMARM_STAT_H | ||
3 | |||
4 | struct __old_kernel_stat { | ||
5 | unsigned short st_dev; | ||
6 | unsigned short st_ino; | ||
7 | unsigned short st_mode; | ||
8 | unsigned short st_nlink; | ||
9 | unsigned short st_uid; | ||
10 | unsigned short st_gid; | ||
11 | unsigned short st_rdev; | ||
12 | unsigned long st_size; | ||
13 | unsigned long st_atime; | ||
14 | unsigned long st_mtime; | ||
15 | unsigned long st_ctime; | ||
16 | }; | ||
17 | |||
18 | struct stat { | ||
19 | unsigned short st_dev; | ||
20 | unsigned short __pad1; | ||
21 | unsigned long st_ino; | ||
22 | unsigned short st_mode; | ||
23 | unsigned short st_nlink; | ||
24 | unsigned short st_uid; | ||
25 | unsigned short st_gid; | ||
26 | unsigned short st_rdev; | ||
27 | unsigned short __pad2; | ||
28 | unsigned long st_size; | ||
29 | unsigned long st_blksize; | ||
30 | unsigned long st_blocks; | ||
31 | unsigned long st_atime; | ||
32 | unsigned long st_atime_nsec; | ||
33 | unsigned long st_mtime; | ||
34 | unsigned long st_mtime_nsec; | ||
35 | unsigned long st_ctime; | ||
36 | unsigned long st_ctime_nsec; | ||
37 | unsigned long __unused4; | ||
38 | unsigned long __unused5; | ||
39 | }; | ||
40 | |||
41 | /* This matches struct stat64 in glibc2.1, hence the absolutely | ||
42 | * insane amounts of padding around dev_t's. | ||
43 | */ | ||
44 | struct stat64 { | ||
45 | unsigned long long st_dev; | ||
46 | unsigned char __pad0[4]; | ||
47 | |||
48 | #define STAT64_HAS_BROKEN_ST_INO 1 | ||
49 | unsigned long __st_ino; | ||
50 | unsigned int st_mode; | ||
51 | unsigned int st_nlink; | ||
52 | |||
53 | unsigned long st_uid; | ||
54 | unsigned long st_gid; | ||
55 | |||
56 | unsigned long long st_rdev; | ||
57 | unsigned char __pad3[4]; | ||
58 | |||
59 | long long st_size; | ||
60 | unsigned long st_blksize; | ||
61 | |||
62 | unsigned long st_blocks; /* Number 512-byte blocks allocated. */ | ||
63 | unsigned long __pad4; /* Future possible st_blocks hi bits */ | ||
64 | |||
65 | unsigned long st_atime; | ||
66 | unsigned long st_atime_nsec; | ||
67 | |||
68 | unsigned long st_mtime; | ||
69 | unsigned long st_mtime_nsec; | ||
70 | |||
71 | unsigned long st_ctime; | ||
72 | unsigned long st_ctime_nsec; | ||
73 | |||
74 | unsigned long long st_ino; | ||
75 | }; | ||
76 | |||
77 | #endif | ||
diff --git a/include/asm-arm26/statfs.h b/include/asm-arm26/statfs.h deleted file mode 100644 index 776dbc8f7623..000000000000 --- a/include/asm-arm26/statfs.h +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | #ifndef _ASMARM_STATFS_H | ||
2 | #define _ASMARM_STATFS_H | ||
3 | |||
4 | //FIXME - this may not be appropriate for arm26. check it out. | ||
5 | |||
6 | #include <asm-generic/statfs.h> | ||
7 | |||
8 | #endif | ||
diff --git a/include/asm-arm26/string.h b/include/asm-arm26/string.h deleted file mode 100644 index 2a8ab162412f..000000000000 --- a/include/asm-arm26/string.h +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | #ifndef __ASM_ARM_STRING_H | ||
2 | #define __ASM_ARM_STRING_H | ||
3 | |||
4 | /* | ||
5 | * We don't do inline string functions, since the | ||
6 | * optimised inline asm versions are not small. | ||
7 | */ | ||
8 | |||
9 | #define __HAVE_ARCH_STRRCHR | ||
10 | extern char * strrchr(const char * s, int c); | ||
11 | |||
12 | #define __HAVE_ARCH_STRCHR | ||
13 | extern char * strchr(const char * s, int c); | ||
14 | |||
15 | #define __HAVE_ARCH_MEMCPY | ||
16 | extern void * memcpy(void *, const void *, __kernel_size_t); | ||
17 | |||
18 | #define __HAVE_ARCH_MEMMOVE | ||
19 | extern void * memmove(void *, const void *, __kernel_size_t); | ||
20 | |||
21 | #define __HAVE_ARCH_MEMCHR | ||
22 | extern void * memchr(const void *, int, __kernel_size_t); | ||
23 | |||
24 | #define __HAVE_ARCH_MEMZERO | ||
25 | #define __HAVE_ARCH_MEMSET | ||
26 | extern void * memset(void *, int, __kernel_size_t); | ||
27 | |||
28 | extern void __memzero(void *ptr, __kernel_size_t n); | ||
29 | |||
30 | #define memset(p,v,n) \ | ||
31 | ({ \ | ||
32 | if ((n) != 0) { \ | ||
33 | if (__builtin_constant_p((v)) && (v) == 0) \ | ||
34 | __memzero((p),(n)); \ | ||
35 | else \ | ||
36 | memset((p),(v),(n)); \ | ||
37 | } \ | ||
38 | (p); \ | ||
39 | }) | ||
40 | |||
41 | #define memzero(p,n) ({ if ((n) != 0) __memzero((p),(n)); (p); }) | ||
42 | |||
43 | #endif | ||
diff --git a/include/asm-arm26/suspend.h b/include/asm-arm26/suspend.h deleted file mode 100644 index 5e4c1cc0c19d..000000000000 --- a/include/asm-arm26/suspend.h +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | #ifdef _ASMARM_SUSPEND_H | ||
2 | #define _ASMARM_SUSPEND_H | ||
3 | |||
4 | #endif | ||
diff --git a/include/asm-arm26/sysirq.h b/include/asm-arm26/sysirq.h deleted file mode 100644 index 81dca90d9a3f..000000000000 --- a/include/asm-arm26/sysirq.h +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-arc/irqs.h | ||
3 | * | ||
4 | * Copyright (C) 1996 Russell King, Dave Gilbert | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * Modifications: | ||
11 | * 04-04-1998 PJB Merged arc and a5k versions | ||
12 | */ | ||
13 | |||
14 | |||
15 | #if defined(CONFIG_ARCH_A5K) | ||
16 | #define IRQ_PRINTER 0 | ||
17 | #define IRQ_BATLOW 1 | ||
18 | #define IRQ_FLOPPYINDEX 2 | ||
19 | #define IRQ_FLOPPYDISK 12 | ||
20 | #elif defined(CONFIG_ARCH_ARC) | ||
21 | #define IRQ_PRINTERBUSY 0 | ||
22 | #define IRQ_SERIALRING 1 | ||
23 | #define IRQ_PRINTERACK 2 | ||
24 | #define IRQ_FLOPPYCHANGED 12 | ||
25 | #endif | ||
26 | |||
27 | #define IRQ_VSYNCPULSE 3 | ||
28 | #define IRQ_POWERON 4 | ||
29 | #define IRQ_TIMER0 5 | ||
30 | #define IRQ_TIMER1 6 | ||
31 | #define IRQ_IMMEDIATE 7 | ||
32 | #define IRQ_EXPCARDFIQ 8 | ||
33 | #define IRQ_SOUNDCHANGE 9 | ||
34 | #define IRQ_SERIALPORT 10 | ||
35 | #define IRQ_HARDDISK 11 | ||
36 | #define IRQ_EXPANSIONCARD 13 | ||
37 | #define IRQ_KEYBOARDTX 14 | ||
38 | #define IRQ_KEYBOARDRX 15 | ||
39 | |||
40 | #if defined(CONFIG_ARCH_A5K) | ||
41 | #define FIQ_SERIALPORT 4 | ||
42 | #elif defined(CONFIG_ARCH_ARC) | ||
43 | #define FIQ_FLOPPYIRQ 1 | ||
44 | #define FIQ_FD1772 FIQ_FLOPPYIRQ | ||
45 | #endif | ||
46 | |||
47 | #define FIQ_FLOPPYDATA 0 | ||
48 | #define FIQ_ECONET 2 | ||
49 | #define FIQ_EXPANSIONCARD 6 | ||
50 | #define FIQ_FORCE 7 | ||
51 | |||
52 | #define IRQ_TIMER IRQ_TIMER0 | ||
53 | |||
54 | /* | ||
55 | * This is the offset of the FIQ "IRQ" numbers | ||
56 | */ | ||
57 | #define FIQ_START 64 | ||
58 | |||
59 | #define irq_cannonicalize(i) (i) | ||
60 | |||
diff --git a/include/asm-arm26/system.h b/include/asm-arm26/system.h deleted file mode 100644 index e09da5ff1f54..000000000000 --- a/include/asm-arm26/system.h +++ /dev/null | |||
@@ -1,247 +0,0 @@ | |||
1 | #ifndef __ASM_ARM_SYSTEM_H | ||
2 | #define __ASM_ARM_SYSTEM_H | ||
3 | |||
4 | #ifdef __KERNEL__ | ||
5 | |||
6 | |||
7 | /* | ||
8 | * This is used to ensure the compiler did actually allocate the register we | ||
9 | * asked it for some inline assembly sequences. Apparently we can't trust | ||
10 | * the compiler from one version to another so a bit of paranoia won't hurt. | ||
11 | * This string is meant to be concatenated with the inline asm string and | ||
12 | * will cause compilation to stop on mismatch. (From ARM32 - may come in handy) | ||
13 | */ | ||
14 | #define __asmeq(x, y) ".ifnc " x "," y " ; .err ; .endif\n\t" | ||
15 | |||
16 | #ifndef __ASSEMBLY__ | ||
17 | |||
18 | #include <linux/linkage.h> | ||
19 | |||
20 | struct thread_info; | ||
21 | struct task_struct; | ||
22 | |||
23 | #if 0 | ||
24 | /* information about the system we're running on */ | ||
25 | extern unsigned int system_rev; | ||
26 | extern unsigned int system_serial_low; | ||
27 | extern unsigned int system_serial_high; | ||
28 | extern unsigned int mem_fclk_21285; | ||
29 | |||
30 | FIXME - sort this | ||
31 | /* | ||
32 | * We need to turn the caches off before calling the reset vector - RiscOS | ||
33 | * messes up if we don't | ||
34 | */ | ||
35 | #define proc_hard_reset() cpu_proc_fin() | ||
36 | |||
37 | #endif | ||
38 | |||
39 | struct pt_regs; | ||
40 | |||
41 | void die(const char *msg, struct pt_regs *regs, int err) | ||
42 | __attribute__((noreturn)); | ||
43 | |||
44 | void die_if_kernel(const char *str, struct pt_regs *regs, int err); | ||
45 | |||
46 | void hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int, | ||
47 | struct pt_regs *), | ||
48 | int sig, const char *name); | ||
49 | |||
50 | #include <asm/proc-fns.h> | ||
51 | |||
52 | #define xchg(ptr,x) \ | ||
53 | ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) | ||
54 | |||
55 | extern asmlinkage void __backtrace(void); | ||
56 | |||
57 | #define set_cr(x) \ | ||
58 | __asm__ __volatile__( \ | ||
59 | "mcr p15, 0, %0, c1, c0, 0 @ set CR" \ | ||
60 | : : "r" (x) : "cc") | ||
61 | |||
62 | #define get_cr() \ | ||
63 | ({ \ | ||
64 | unsigned int __val; \ | ||
65 | __asm__ __volatile__( \ | ||
66 | "mrc p15, 0, %0, c1, c0, 0 @ get CR" \ | ||
67 | : "=r" (__val) : : "cc"); \ | ||
68 | __val; \ | ||
69 | }) | ||
70 | |||
71 | extern unsigned long cr_no_alignment; /* defined in entry-armv.S */ | ||
72 | extern unsigned long cr_alignment; /* defined in entry-armv.S */ | ||
73 | |||
74 | #define UDBG_UNDEFINED (1 << 0) | ||
75 | #define UDBG_SYSCALL (1 << 1) | ||
76 | #define UDBG_BADABORT (1 << 2) | ||
77 | #define UDBG_SEGV (1 << 3) | ||
78 | #define UDBG_BUS (1 << 4) | ||
79 | |||
80 | extern unsigned int user_debug; | ||
81 | |||
82 | #define vectors_base() (0) | ||
83 | |||
84 | #define mb() __asm__ __volatile__ ("" : : : "memory") | ||
85 | #define rmb() mb() | ||
86 | #define wmb() mb() | ||
87 | #define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t"); | ||
88 | |||
89 | #define read_barrier_depends() do { } while(0) | ||
90 | #define set_mb(var, value) do { var = value; mb(); } while (0) | ||
91 | |||
92 | /* | ||
93 | * We assume knowledge of how | ||
94 | * spin_unlock_irq() and friends are implemented. This avoids | ||
95 | * us needlessly decrementing and incrementing the preempt count. | ||
96 | */ | ||
97 | #define prepare_arch_switch(next) local_irq_enable() | ||
98 | #define finish_arch_switch(prev) spin_unlock(&(rq)->lock) | ||
99 | |||
100 | /* | ||
101 | * switch_to(prev, next) should switch from task `prev' to `next' | ||
102 | * `prev' will never be the same as `next'. schedule() itself | ||
103 | * contains the memory barrier to tell GCC not to cache `current'. | ||
104 | */ | ||
105 | extern struct task_struct *__switch_to(struct task_struct *, struct thread_info *, struct thread_info *); | ||
106 | |||
107 | #define switch_to(prev,next,last) \ | ||
108 | do { \ | ||
109 | last = __switch_to(prev,task_thread_info(prev),task_thread_info(next)); \ | ||
110 | } while (0) | ||
111 | |||
112 | /* | ||
113 | * Save the current interrupt enable state & disable IRQs | ||
114 | */ | ||
115 | #define local_irq_save(x) \ | ||
116 | do { \ | ||
117 | unsigned long temp; \ | ||
118 | __asm__ __volatile__( \ | ||
119 | " mov %0, pc @ save_flags_cli\n" \ | ||
120 | " orr %1, %0, #0x08000000\n" \ | ||
121 | " and %0, %0, #0x0c000000\n" \ | ||
122 | " teqp %1, #0\n" \ | ||
123 | : "=r" (x), "=r" (temp) \ | ||
124 | : \ | ||
125 | : "memory"); \ | ||
126 | } while (0) | ||
127 | |||
128 | /* | ||
129 | * Enable IRQs (sti) | ||
130 | */ | ||
131 | #define local_irq_enable() \ | ||
132 | do { \ | ||
133 | unsigned long temp; \ | ||
134 | __asm__ __volatile__( \ | ||
135 | " mov %0, pc @ sti\n" \ | ||
136 | " bic %0, %0, #0x08000000\n" \ | ||
137 | " teqp %0, #0\n" \ | ||
138 | : "=r" (temp) \ | ||
139 | : \ | ||
140 | : "memory"); \ | ||
141 | } while(0) | ||
142 | |||
143 | /* | ||
144 | * Disable IRQs (cli) | ||
145 | */ | ||
146 | #define local_irq_disable() \ | ||
147 | do { \ | ||
148 | unsigned long temp; \ | ||
149 | __asm__ __volatile__( \ | ||
150 | " mov %0, pc @ cli\n" \ | ||
151 | " orr %0, %0, #0x08000000\n" \ | ||
152 | " teqp %0, #0\n" \ | ||
153 | : "=r" (temp) \ | ||
154 | : \ | ||
155 | : "memory"); \ | ||
156 | } while(0) | ||
157 | |||
158 | /* Enable FIQs (stf) */ | ||
159 | |||
160 | #define __stf() do { \ | ||
161 | unsigned long temp; \ | ||
162 | __asm__ __volatile__( \ | ||
163 | " mov %0, pc @ stf\n" \ | ||
164 | " bic %0, %0, #0x04000000\n" \ | ||
165 | " teqp %0, #0\n" \ | ||
166 | : "=r" (temp)); \ | ||
167 | } while(0) | ||
168 | |||
169 | /* Disable FIQs (clf) */ | ||
170 | |||
171 | #define __clf() do { \ | ||
172 | unsigned long temp; \ | ||
173 | __asm__ __volatile__( \ | ||
174 | " mov %0, pc @ clf\n" \ | ||
175 | " orr %0, %0, #0x04000000\n" \ | ||
176 | " teqp %0, #0\n" \ | ||
177 | : "=r" (temp)); \ | ||
178 | } while(0) | ||
179 | |||
180 | |||
181 | /* | ||
182 | * Save the current interrupt enable state. | ||
183 | */ | ||
184 | #define local_save_flags(x) \ | ||
185 | do { \ | ||
186 | __asm__ __volatile__( \ | ||
187 | " mov %0, pc @ save_flags\n" \ | ||
188 | " and %0, %0, #0x0c000000\n" \ | ||
189 | : "=r" (x)); \ | ||
190 | } while (0) | ||
191 | |||
192 | |||
193 | /* | ||
194 | * restore saved IRQ & FIQ state | ||
195 | */ | ||
196 | #define local_irq_restore(x) \ | ||
197 | do { \ | ||
198 | unsigned long temp; \ | ||
199 | __asm__ __volatile__( \ | ||
200 | " mov %0, pc @ restore_flags\n" \ | ||
201 | " bic %0, %0, #0x0c000000\n" \ | ||
202 | " orr %0, %0, %1\n" \ | ||
203 | " teqp %0, #0\n" \ | ||
204 | : "=&r" (temp) \ | ||
205 | : "r" (x) \ | ||
206 | : "memory"); \ | ||
207 | } while (0) | ||
208 | |||
209 | |||
210 | #ifdef CONFIG_SMP | ||
211 | #error SMP not supported | ||
212 | #endif | ||
213 | |||
214 | #define smp_mb() barrier() | ||
215 | #define smp_rmb() barrier() | ||
216 | #define smp_wmb() barrier() | ||
217 | #define smp_read_barrier_depends() do { } while(0) | ||
218 | |||
219 | #define clf() __clf() | ||
220 | #define stf() __stf() | ||
221 | |||
222 | #define irqs_disabled() \ | ||
223 | ({ \ | ||
224 | unsigned long flags; \ | ||
225 | local_save_flags(flags); \ | ||
226 | flags & PSR_I_BIT; \ | ||
227 | }) | ||
228 | |||
229 | static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size) | ||
230 | { | ||
231 | extern void __bad_xchg(volatile void *, int); | ||
232 | |||
233 | switch (size) { | ||
234 | case 1: return cpu_xchg_1(x, ptr); | ||
235 | case 4: return cpu_xchg_4(x, ptr); | ||
236 | default: __bad_xchg(ptr, size); | ||
237 | } | ||
238 | return 0; | ||
239 | } | ||
240 | |||
241 | #endif /* __ASSEMBLY__ */ | ||
242 | |||
243 | #define arch_align_stack(x) (x) | ||
244 | |||
245 | #endif /* __KERNEL__ */ | ||
246 | |||
247 | #endif | ||
diff --git a/include/asm-arm26/termbits.h b/include/asm-arm26/termbits.h deleted file mode 100644 index 48d2f5c7bcb8..000000000000 --- a/include/asm-arm26/termbits.h +++ /dev/null | |||
@@ -1,196 +0,0 @@ | |||
1 | #ifndef __ASM_ARM_TERMBITS_H | ||
2 | #define __ASM_ARM_TERMBITS_H | ||
3 | |||
4 | typedef unsigned char cc_t; | ||
5 | typedef unsigned int speed_t; | ||
6 | typedef unsigned int tcflag_t; | ||
7 | |||
8 | #define NCCS 19 | ||
9 | struct termios { | ||
10 | tcflag_t c_iflag; /* input mode flags */ | ||
11 | tcflag_t c_oflag; /* output mode flags */ | ||
12 | tcflag_t c_cflag; /* control mode flags */ | ||
13 | tcflag_t c_lflag; /* local mode flags */ | ||
14 | cc_t c_line; /* line discipline */ | ||
15 | cc_t c_cc[NCCS]; /* control characters */ | ||
16 | }; | ||
17 | |||
18 | struct termios2 { | ||
19 | tcflag_t c_iflag; /* input mode flags */ | ||
20 | tcflag_t c_oflag; /* output mode flags */ | ||
21 | tcflag_t c_cflag; /* control mode flags */ | ||
22 | tcflag_t c_lflag; /* local mode flags */ | ||
23 | cc_t c_line; /* line discipline */ | ||
24 | cc_t c_cc[NCCS]; /* control characters */ | ||
25 | speed_t c_ispeed; /* input speed */ | ||
26 | speed_t c_ospeed; /* output speed */ | ||
27 | }; | ||
28 | |||
29 | struct ktermios { | ||
30 | tcflag_t c_iflag; /* input mode flags */ | ||
31 | tcflag_t c_oflag; /* output mode flags */ | ||
32 | tcflag_t c_cflag; /* control mode flags */ | ||
33 | tcflag_t c_lflag; /* local mode flags */ | ||
34 | cc_t c_line; /* line discipline */ | ||
35 | cc_t c_cc[NCCS]; /* control characters */ | ||
36 | speed_t c_ispeed; /* input speed */ | ||
37 | speed_t c_ospeed; /* output speed */ | ||
38 | }; | ||
39 | |||
40 | /* c_cc characters */ | ||
41 | #define VINTR 0 | ||
42 | #define VQUIT 1 | ||
43 | #define VERASE 2 | ||
44 | #define VKILL 3 | ||
45 | #define VEOF 4 | ||
46 | #define VTIME 5 | ||
47 | #define VMIN 6 | ||
48 | #define VSWTC 7 | ||
49 | #define VSTART 8 | ||
50 | #define VSTOP 9 | ||
51 | #define VSUSP 10 | ||
52 | #define VEOL 11 | ||
53 | #define VREPRINT 12 | ||
54 | #define VDISCARD 13 | ||
55 | #define VWERASE 14 | ||
56 | #define VLNEXT 15 | ||
57 | #define VEOL2 16 | ||
58 | |||
59 | /* c_iflag bits */ | ||
60 | #define IGNBRK 0000001 | ||
61 | #define BRKINT 0000002 | ||
62 | #define IGNPAR 0000004 | ||
63 | #define PARMRK 0000010 | ||
64 | #define INPCK 0000020 | ||
65 | #define ISTRIP 0000040 | ||
66 | #define INLCR 0000100 | ||
67 | #define IGNCR 0000200 | ||
68 | #define ICRNL 0000400 | ||
69 | #define IUCLC 0001000 | ||
70 | #define IXON 0002000 | ||
71 | #define IXANY 0004000 | ||
72 | #define IXOFF 0010000 | ||
73 | #define IMAXBEL 0020000 | ||
74 | #define IUTF8 0040000 | ||
75 | |||
76 | /* c_oflag bits */ | ||
77 | #define OPOST 0000001 | ||
78 | #define OLCUC 0000002 | ||
79 | #define ONLCR 0000004 | ||
80 | #define OCRNL 0000010 | ||
81 | #define ONOCR 0000020 | ||
82 | #define ONLRET 0000040 | ||
83 | #define OFILL 0000100 | ||
84 | #define OFDEL 0000200 | ||
85 | #define NLDLY 0000400 | ||
86 | #define NL0 0000000 | ||
87 | #define NL1 0000400 | ||
88 | #define CRDLY 0003000 | ||
89 | #define CR0 0000000 | ||
90 | #define CR1 0001000 | ||
91 | #define CR2 0002000 | ||
92 | #define CR3 0003000 | ||
93 | #define TABDLY 0014000 | ||
94 | #define TAB0 0000000 | ||
95 | #define TAB1 0004000 | ||
96 | #define TAB2 0010000 | ||
97 | #define TAB3 0014000 | ||
98 | #define XTABS 0014000 | ||
99 | #define BSDLY 0020000 | ||
100 | #define BS0 0000000 | ||
101 | #define BS1 0020000 | ||
102 | #define VTDLY 0040000 | ||
103 | #define VT0 0000000 | ||
104 | #define VT1 0040000 | ||
105 | #define FFDLY 0100000 | ||
106 | #define FF0 0000000 | ||
107 | #define FF1 0100000 | ||
108 | |||
109 | /* c_cflag bit meaning */ | ||
110 | #define CBAUD 0010017 | ||
111 | #define B0 0000000 /* hang up */ | ||
112 | #define B50 0000001 | ||
113 | #define B75 0000002 | ||
114 | #define B110 0000003 | ||
115 | #define B134 0000004 | ||
116 | #define B150 0000005 | ||
117 | #define B200 0000006 | ||
118 | #define B300 0000007 | ||
119 | #define B600 0000010 | ||
120 | #define B1200 0000011 | ||
121 | #define B1800 0000012 | ||
122 | #define B2400 0000013 | ||
123 | #define B4800 0000014 | ||
124 | #define B9600 0000015 | ||
125 | #define B19200 0000016 | ||
126 | #define B38400 0000017 | ||
127 | #define EXTA B19200 | ||
128 | #define EXTB B38400 | ||
129 | #define CSIZE 0000060 | ||
130 | #define CS5 0000000 | ||
131 | #define CS6 0000020 | ||
132 | #define CS7 0000040 | ||
133 | #define CS8 0000060 | ||
134 | #define CSTOPB 0000100 | ||
135 | #define CREAD 0000200 | ||
136 | #define PARENB 0000400 | ||
137 | #define PARODD 0001000 | ||
138 | #define HUPCL 0002000 | ||
139 | #define CLOCAL 0004000 | ||
140 | #define CBAUDEX 0010000 | ||
141 | #define BOTHER 0010000 | ||
142 | #define B57600 0010001 | ||
143 | #define B115200 0010002 | ||
144 | #define B230400 0010003 | ||
145 | #define B460800 0010004 | ||
146 | #define B500000 0010005 | ||
147 | #define B576000 0010006 | ||
148 | #define B921600 0010007 | ||
149 | #define B1000000 0010010 | ||
150 | #define B1152000 0010011 | ||
151 | #define B1500000 0010012 | ||
152 | #define B2000000 0010013 | ||
153 | #define B2500000 0010014 | ||
154 | #define B3000000 0010015 | ||
155 | #define B3500000 0010016 | ||
156 | #define B4000000 0010017 | ||
157 | #define CIBAUD 002003600000 /* input baud rate */ | ||
158 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ | ||
159 | #define CRTSCTS 020000000000 /* flow control */ | ||
160 | |||
161 | #define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */ | ||
162 | |||
163 | /* c_lflag bits */ | ||
164 | #define ISIG 0000001 | ||
165 | #define ICANON 0000002 | ||
166 | #define XCASE 0000004 | ||
167 | #define ECHO 0000010 | ||
168 | #define ECHOE 0000020 | ||
169 | #define ECHOK 0000040 | ||
170 | #define ECHONL 0000100 | ||
171 | #define NOFLSH 0000200 | ||
172 | #define TOSTOP 0000400 | ||
173 | #define ECHOCTL 0001000 | ||
174 | #define ECHOPRT 0002000 | ||
175 | #define ECHOKE 0004000 | ||
176 | #define FLUSHO 0010000 | ||
177 | #define PENDIN 0040000 | ||
178 | #define IEXTEN 0100000 | ||
179 | |||
180 | /* tcflow() and TCXONC use these */ | ||
181 | #define TCOOFF 0 | ||
182 | #define TCOON 1 | ||
183 | #define TCIOFF 2 | ||
184 | #define TCION 3 | ||
185 | |||
186 | /* tcflush() and TCFLSH use these */ | ||
187 | #define TCIFLUSH 0 | ||
188 | #define TCOFLUSH 1 | ||
189 | #define TCIOFLUSH 2 | ||
190 | |||
191 | /* tcsetattr uses these */ | ||
192 | #define TCSANOW 0 | ||
193 | #define TCSADRAIN 1 | ||
194 | #define TCSAFLUSH 2 | ||
195 | |||
196 | #endif /* __ASM_ARM_TERMBITS_H */ | ||
diff --git a/include/asm-arm26/termios.h b/include/asm-arm26/termios.h deleted file mode 100644 index 293e3f1bc3f2..000000000000 --- a/include/asm-arm26/termios.h +++ /dev/null | |||
@@ -1,92 +0,0 @@ | |||
1 | #ifndef __ASM_ARM_TERMIOS_H | ||
2 | #define __ASM_ARM_TERMIOS_H | ||
3 | |||
4 | #include <asm/termbits.h> | ||
5 | #include <asm/ioctls.h> | ||
6 | |||
7 | struct winsize { | ||
8 | unsigned short ws_row; | ||
9 | unsigned short ws_col; | ||
10 | unsigned short ws_xpixel; | ||
11 | unsigned short ws_ypixel; | ||
12 | }; | ||
13 | |||
14 | #define NCC 8 | ||
15 | struct termio { | ||
16 | unsigned short c_iflag; /* input mode flags */ | ||
17 | unsigned short c_oflag; /* output mode flags */ | ||
18 | unsigned short c_cflag; /* control mode flags */ | ||
19 | unsigned short c_lflag; /* local mode flags */ | ||
20 | unsigned char c_line; /* line discipline */ | ||
21 | unsigned char c_cc[NCC]; /* control characters */ | ||
22 | }; | ||
23 | |||
24 | #ifdef __KERNEL__ | ||
25 | /* intr=^C quit=^| erase=del kill=^U | ||
26 | eof=^D vtime=\0 vmin=\1 sxtc=\0 | ||
27 | start=^Q stop=^S susp=^Z eol=\0 | ||
28 | reprint=^R discard=^U werase=^W lnext=^V | ||
29 | eol2=\0 | ||
30 | */ | ||
31 | #define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0" | ||
32 | #endif | ||
33 | |||
34 | /* modem lines */ | ||
35 | #define TIOCM_LE 0x001 | ||
36 | #define TIOCM_DTR 0x002 | ||
37 | #define TIOCM_RTS 0x004 | ||
38 | #define TIOCM_ST 0x008 | ||
39 | #define TIOCM_SR 0x010 | ||
40 | #define TIOCM_CTS 0x020 | ||
41 | #define TIOCM_CAR 0x040 | ||
42 | #define TIOCM_RNG 0x080 | ||
43 | #define TIOCM_DSR 0x100 | ||
44 | #define TIOCM_CD TIOCM_CAR | ||
45 | #define TIOCM_RI TIOCM_RNG | ||
46 | #define TIOCM_OUT1 0x2000 | ||
47 | #define TIOCM_OUT2 0x4000 | ||
48 | #define TIOCM_LOOP 0x8000 | ||
49 | |||
50 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | ||
51 | |||
52 | #ifdef __KERNEL__ | ||
53 | |||
54 | /* | ||
55 | * Translate a "termio" structure into a "termios". Ugh. | ||
56 | */ | ||
57 | #define SET_LOW_TERMIOS_BITS(termios, termio, x) { \ | ||
58 | unsigned short __tmp; \ | ||
59 | get_user(__tmp,&(termio)->x); \ | ||
60 | *(unsigned short *) &(termios)->x = __tmp; \ | ||
61 | } | ||
62 | |||
63 | #define user_termio_to_kernel_termios(termios, termio) \ | ||
64 | ({ \ | ||
65 | SET_LOW_TERMIOS_BITS(termios, termio, c_iflag); \ | ||
66 | SET_LOW_TERMIOS_BITS(termios, termio, c_oflag); \ | ||
67 | SET_LOW_TERMIOS_BITS(termios, termio, c_cflag); \ | ||
68 | SET_LOW_TERMIOS_BITS(termios, termio, c_lflag); \ | ||
69 | copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \ | ||
70 | }) | ||
71 | |||
72 | /* | ||
73 | * Translate a "termios" structure into a "termio". Ugh. | ||
74 | */ | ||
75 | #define kernel_termios_to_user_termio(termio, termios) \ | ||
76 | ({ \ | ||
77 | put_user((termios)->c_iflag, &(termio)->c_iflag); \ | ||
78 | put_user((termios)->c_oflag, &(termio)->c_oflag); \ | ||
79 | put_user((termios)->c_cflag, &(termio)->c_cflag); \ | ||
80 | put_user((termios)->c_lflag, &(termio)->c_lflag); \ | ||
81 | put_user((termios)->c_line, &(termio)->c_line); \ | ||
82 | copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ | ||
83 | }) | ||
84 | |||
85 | #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2)) | ||
86 | #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2)) | ||
87 | #define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios)) | ||
88 | #define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios)) | ||
89 | |||
90 | #endif /* __KERNEL__ */ | ||
91 | |||
92 | #endif /* __ASM_ARM_TERMIOS_H */ | ||
diff --git a/include/asm-arm26/thread_info.h b/include/asm-arm26/thread_info.h deleted file mode 100644 index 9b367ebe515d..000000000000 --- a/include/asm-arm26/thread_info.h +++ /dev/null | |||
@@ -1,140 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm26/thread_info.h | ||
3 | * | ||
4 | * Copyright (C) 2002 Russell King. | ||
5 | * Copyright (C) 2003 Ian Molton. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef __ASM_ARM_THREAD_INFO_H | ||
12 | #define __ASM_ARM_THREAD_INFO_H | ||
13 | |||
14 | #ifdef __KERNEL__ | ||
15 | |||
16 | #ifndef __ASSEMBLY__ | ||
17 | |||
18 | struct task_struct; | ||
19 | struct exec_domain; | ||
20 | |||
21 | #include <linux/compiler.h> | ||
22 | #include <asm/fpstate.h> | ||
23 | #include <asm/ptrace.h> | ||
24 | #include <asm/types.h> | ||
25 | |||
26 | typedef unsigned long mm_segment_t; | ||
27 | |||
28 | struct cpu_context_save { | ||
29 | __u32 r4; | ||
30 | __u32 r5; | ||
31 | __u32 r6; | ||
32 | __u32 r7; | ||
33 | __u32 r8; | ||
34 | __u32 r9; | ||
35 | __u32 sl; | ||
36 | __u32 fp; | ||
37 | __u32 sp; | ||
38 | __u32 pc; | ||
39 | }; | ||
40 | |||
41 | /* | ||
42 | * low level task data that entry.S needs immediate access to. | ||
43 | * We assume cpu_context follows immedately after cpu_domain. | ||
44 | */ | ||
45 | struct thread_info { | ||
46 | unsigned long flags; /* low level flags */ | ||
47 | int preempt_count; /* 0 => preemptable, <0 => bug */ | ||
48 | mm_segment_t addr_limit; /* address limit */ | ||
49 | struct task_struct *task; /* main task structure */ | ||
50 | struct exec_domain *exec_domain; /* execution domain */ | ||
51 | __u32 cpu; /* cpu */ | ||
52 | struct cpu_context_save cpu_context; /* cpu context */ | ||
53 | struct restart_block restart_block; | ||
54 | union fp_state fpstate; | ||
55 | }; | ||
56 | |||
57 | #define INIT_THREAD_INFO(tsk) \ | ||
58 | { \ | ||
59 | .task &tsk, \ | ||
60 | .exec_domain &default_exec_domain, \ | ||
61 | .flags 0, \ | ||
62 | .preempt_count 0, \ | ||
63 | .addr_limit KERNEL_DS, \ | ||
64 | .restart_block = { \ | ||
65 | .fn = do_no_restart_syscall, \ | ||
66 | }, \ | ||
67 | } | ||
68 | |||
69 | #define init_thread_info (init_thread_union.thread_info) | ||
70 | #define init_stack (init_thread_union.stack) | ||
71 | |||
72 | /* | ||
73 | * how to get the thread information struct from C | ||
74 | */ | ||
75 | static inline struct thread_info *current_thread_info(void) __attribute_const__; | ||
76 | |||
77 | static inline struct thread_info *current_thread_info(void) | ||
78 | { | ||
79 | register unsigned long sp asm ("sp"); | ||
80 | return (struct thread_info *)(sp & ~0x1fff); | ||
81 | } | ||
82 | |||
83 | #define THREAD_SIZE PAGE_SIZE | ||
84 | #define task_pt_regs(task) ((struct pt_regs *)(task_stack_page(task) + THREAD_SIZE - 8) - 1) | ||
85 | |||
86 | extern struct thread_info *alloc_thread_info(struct task_struct *task); | ||
87 | extern void free_thread_info(struct thread_info *); | ||
88 | |||
89 | #define thread_saved_pc(tsk) \ | ||
90 | ((unsigned long)(pc_pointer(task_thread_info(tsk)->cpu_context.pc))) | ||
91 | #define thread_saved_fp(tsk) \ | ||
92 | ((unsigned long)(task_thread_info(tsk)->cpu_context.fp)) | ||
93 | |||
94 | #else /* !__ASSEMBLY__ */ | ||
95 | |||
96 | #define TI_FLAGS 0 | ||
97 | #define TI_PREEMPT 4 | ||
98 | #define TI_ADDR_LIMIT 8 | ||
99 | #define TI_TASK 12 | ||
100 | #define TI_EXEC_DOMAIN 16 | ||
101 | #define TI_CPU 20 | ||
102 | #define TI_CPU_SAVE 24 | ||
103 | #define TI_RESTART_BLOCK 28 | ||
104 | #define TI_FPSTATE 68 | ||
105 | |||
106 | #endif | ||
107 | |||
108 | #define PREEMPT_ACTIVE 0x04000000 | ||
109 | |||
110 | /* | ||
111 | * thread information flags: | ||
112 | * TIF_SYSCALL_TRACE - syscall trace active | ||
113 | * TIF_NOTIFY_RESUME - resumption notification requested | ||
114 | * TIF_SIGPENDING - signal pending | ||
115 | * TIF_NEED_RESCHED - rescheduling necessary | ||
116 | * TIF_USEDFPU - FPU was used by this task this quantum (SMP) | ||
117 | * TIF_POLLING_NRFLAG - true if poll_idle() is polling TIF_NEED_RESCHED | ||
118 | */ | ||
119 | #define TIF_NOTIFY_RESUME 0 | ||
120 | #define TIF_SIGPENDING 1 | ||
121 | #define TIF_NEED_RESCHED 2 | ||
122 | #define TIF_SYSCALL_TRACE 8 | ||
123 | #define TIF_USED_FPU 16 | ||
124 | #define TIF_POLLING_NRFLAG 17 | ||
125 | #define TIF_MEMDIE 18 | ||
126 | |||
127 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) | ||
128 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) | ||
129 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) | ||
130 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) | ||
131 | #define _TIF_USED_FPU (1 << TIF_USED_FPU) | ||
132 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) | ||
133 | |||
134 | /* | ||
135 | * Change these and you break ASM code in entry-common.S | ||
136 | */ | ||
137 | #define _TIF_WORK_MASK 0x000000ff | ||
138 | |||
139 | #endif /* __KERNEL__ */ | ||
140 | #endif /* __ASM_ARM_THREAD_INFO_H */ | ||
diff --git a/include/asm-arm26/timex.h b/include/asm-arm26/timex.h deleted file mode 100644 index 68322fbc1aed..000000000000 --- a/include/asm-arm26/timex.h +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/timex.h | ||
3 | * | ||
4 | * Copyright (C) 1997,1998 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * Architecture Specific TIME specifications | ||
11 | */ | ||
12 | #ifndef _ASMARM_TIMEX_H | ||
13 | #define _ASMARM_TIMEX_H | ||
14 | |||
15 | /* | ||
16 | * On the RiscPC, the clock ticks at 2MHz. | ||
17 | */ | ||
18 | #define CLOCK_TICK_RATE 2000000 | ||
19 | |||
20 | /* IS THAT RIGHT ON A5000? FIXME */ | ||
21 | |||
22 | typedef unsigned long cycles_t; | ||
23 | |||
24 | static inline cycles_t get_cycles (void) | ||
25 | { | ||
26 | return 0; | ||
27 | } | ||
28 | |||
29 | #endif | ||
diff --git a/include/asm-arm26/tlb.h b/include/asm-arm26/tlb.h deleted file mode 100644 index 08ddd85b8d35..000000000000 --- a/include/asm-arm26/tlb.h +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | #ifndef __ASMARM_TLB_H | ||
2 | #define __ASMARM_TLB_H | ||
3 | |||
4 | #include <asm/pgalloc.h> | ||
5 | #include <asm/tlbflush.h> | ||
6 | |||
7 | /* | ||
8 | * TLB handling. This allows us to remove pages from the page | ||
9 | * tables, and efficiently handle the TLB issues. | ||
10 | */ | ||
11 | struct mmu_gather { | ||
12 | struct mm_struct *mm; | ||
13 | unsigned int need_flush; | ||
14 | unsigned int fullmm; | ||
15 | }; | ||
16 | |||
17 | DECLARE_PER_CPU(struct mmu_gather, mmu_gathers); | ||
18 | |||
19 | static inline struct mmu_gather * | ||
20 | tlb_gather_mmu(struct mm_struct *mm, unsigned int full_mm_flush) | ||
21 | { | ||
22 | struct mmu_gather *tlb = &get_cpu_var(mmu_gathers); | ||
23 | |||
24 | tlb->mm = mm; | ||
25 | tlb->need_flush = 0; | ||
26 | tlb->fullmm = full_mm_flush; | ||
27 | |||
28 | return tlb; | ||
29 | } | ||
30 | |||
31 | static inline void | ||
32 | tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end) | ||
33 | { | ||
34 | if (tlb->need_flush) | ||
35 | flush_tlb_mm(tlb->mm); | ||
36 | |||
37 | /* keep the page table cache within bounds */ | ||
38 | check_pgt_cache(); | ||
39 | |||
40 | put_cpu_var(mmu_gathers); | ||
41 | } | ||
42 | |||
43 | #define tlb_remove_tlb_entry(tlb,ptep,address) do { } while (0) | ||
44 | //#define tlb_start_vma(tlb,vma) do { } while (0) | ||
45 | //FIXME - ARM32 uses this now that things changed in the kernel. seems like it may be pointless on arm26, however to get things compiling... | ||
46 | #define tlb_start_vma(tlb,vma) \ | ||
47 | do { \ | ||
48 | if (!tlb->fullmm) \ | ||
49 | flush_cache_range(vma, vma->vm_start, vma->vm_end); \ | ||
50 | } while (0) | ||
51 | #define tlb_end_vma(tlb,vma) do { } while (0) | ||
52 | |||
53 | static inline void | ||
54 | tlb_remove_page(struct mmu_gather *tlb, struct page *page) | ||
55 | { | ||
56 | tlb->need_flush = 1; | ||
57 | free_page_and_swap_cache(page); | ||
58 | } | ||
59 | |||
60 | #define pte_free_tlb(tlb,ptep) pte_free(ptep) | ||
61 | #define pmd_free_tlb(tlb,pmdp) pmd_free(pmdp) | ||
62 | |||
63 | #endif | ||
diff --git a/include/asm-arm26/tlbflush.h b/include/asm-arm26/tlbflush.h deleted file mode 100644 index f79c1cbf4f69..000000000000 --- a/include/asm-arm26/tlbflush.h +++ /dev/null | |||
@@ -1,70 +0,0 @@ | |||
1 | #ifndef __ASMARM_TLBFLUSH_H | ||
2 | #define __ASMARM_TLBFLUSH_H | ||
3 | |||
4 | /* | ||
5 | * TLB flushing: | ||
6 | * | ||
7 | * - flush_tlb_all() flushes all processes TLBs | ||
8 | * - flush_tlb_mm(mm) flushes the specified mm context TLB's | ||
9 | * - flush_tlb_page(vma, vmaddr) flushes one page | ||
10 | * - flush_tlb_range(vma, start, end) flushes a range of pages | ||
11 | */ | ||
12 | |||
13 | #define flush_tlb_all() memc_update_all() | ||
14 | #define flush_tlb_mm(mm) memc_update_mm(mm) | ||
15 | #define flush_tlb_page(vma, vmaddr) do { printk("flush_tlb_page\n");} while (0) // IS THIS RIGHT? | ||
16 | #define flush_tlb_range(vma,start,end) \ | ||
17 | do { memc_update_mm(vma->vm_mm); (void)(start); (void)(end); } while (0) | ||
18 | #define flush_tlb_pgtables(mm,start,end) do { printk("flush_tlb_pgtables\n");} while (0) | ||
19 | #define flush_tlb_kernel_range(s,e) do { printk("flush_tlb_range\n");} while (0) | ||
20 | |||
21 | /* | ||
22 | * The following handle the weird MEMC chip | ||
23 | */ | ||
24 | static inline void memc_update_all(void) | ||
25 | { | ||
26 | struct task_struct *p; | ||
27 | cpu_memc_update_all(init_mm.pgd); | ||
28 | for_each_process(p) { | ||
29 | if (!p->mm) | ||
30 | continue; | ||
31 | cpu_memc_update_all(p->mm->pgd); | ||
32 | } | ||
33 | processor._set_pgd(current->active_mm->pgd); | ||
34 | } | ||
35 | |||
36 | static inline void memc_update_mm(struct mm_struct *mm) | ||
37 | { | ||
38 | cpu_memc_update_all(mm->pgd); | ||
39 | |||
40 | if (mm == current->active_mm) | ||
41 | processor._set_pgd(mm->pgd); | ||
42 | } | ||
43 | |||
44 | static inline void | ||
45 | memc_clear(struct mm_struct *mm, struct page *page) | ||
46 | { | ||
47 | cpu_memc_update_entry(mm->pgd, (unsigned long) page_address(page), 0); | ||
48 | |||
49 | if (mm == current->active_mm) | ||
50 | processor._set_pgd(mm->pgd); | ||
51 | } | ||
52 | |||
53 | static inline void | ||
54 | memc_update_addr(struct mm_struct *mm, pte_t pte, unsigned long vaddr) | ||
55 | { | ||
56 | cpu_memc_update_entry(mm->pgd, pte_val(pte), vaddr); | ||
57 | |||
58 | if (mm == current->active_mm) | ||
59 | processor._set_pgd(mm->pgd); | ||
60 | } | ||
61 | |||
62 | static inline void | ||
63 | update_mmu_cache(struct vm_area_struct *vma, unsigned long addr, pte_t pte) | ||
64 | { | ||
65 | struct mm_struct *mm = vma->vm_mm; | ||
66 | printk("update_mmu_cache\n"); | ||
67 | memc_update_addr(mm, pte, addr); | ||
68 | } | ||
69 | |||
70 | #endif | ||
diff --git a/include/asm-arm26/topology.h b/include/asm-arm26/topology.h deleted file mode 100644 index accbd7cad9b5..000000000000 --- a/include/asm-arm26/topology.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef _ASM_ARM_TOPOLOGY_H | ||
2 | #define _ASM_ARM_TOPOLOGY_H | ||
3 | |||
4 | #include <asm-generic/topology.h> | ||
5 | |||
6 | #endif /* _ASM_ARM_TOPOLOGY_H */ | ||
diff --git a/include/asm-arm26/types.h b/include/asm-arm26/types.h deleted file mode 100644 index 81bd357ada02..000000000000 --- a/include/asm-arm26/types.h +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | #ifndef __ASM_ARM_TYPES_H | ||
2 | #define __ASM_ARM_TYPES_H | ||
3 | |||
4 | #ifndef __ASSEMBLY__ | ||
5 | |||
6 | typedef unsigned short umode_t; | ||
7 | |||
8 | /* | ||
9 | * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the | ||
10 | * header files exported to user space | ||
11 | */ | ||
12 | |||
13 | typedef __signed__ char __s8; | ||
14 | typedef unsigned char __u8; | ||
15 | |||
16 | typedef __signed__ short __s16; | ||
17 | typedef unsigned short __u16; | ||
18 | |||
19 | typedef __signed__ int __s32; | ||
20 | typedef unsigned int __u32; | ||
21 | |||
22 | #if defined(__GNUC__) && !defined(__STRICT_ANSI__) | ||
23 | typedef __signed__ long long __s64; | ||
24 | typedef unsigned long long __u64; | ||
25 | #endif | ||
26 | |||
27 | #endif /* __ASSEMBLY__ */ | ||
28 | |||
29 | /* | ||
30 | * These aren't exported outside the kernel to avoid name space clashes | ||
31 | */ | ||
32 | #ifdef __KERNEL__ | ||
33 | |||
34 | #define BITS_PER_LONG 32 | ||
35 | |||
36 | #ifndef __ASSEMBLY__ | ||
37 | |||
38 | typedef signed char s8; | ||
39 | typedef unsigned char u8; | ||
40 | |||
41 | typedef signed short s16; | ||
42 | typedef unsigned short u16; | ||
43 | |||
44 | typedef signed int s32; | ||
45 | typedef unsigned int u32; | ||
46 | |||
47 | typedef signed long long s64; | ||
48 | typedef unsigned long long u64; | ||
49 | |||
50 | /* Dma addresses are 32-bits wide. */ | ||
51 | |||
52 | typedef u32 dma_addr_t; | ||
53 | typedef u32 dma64_addr_t; | ||
54 | |||
55 | #endif /* __ASSEMBLY__ */ | ||
56 | |||
57 | #endif /* __KERNEL__ */ | ||
58 | |||
59 | #endif | ||
diff --git a/include/asm-arm26/uaccess-asm.h b/include/asm-arm26/uaccess-asm.h deleted file mode 100644 index ade76ec02995..000000000000 --- a/include/asm-arm26/uaccess-asm.h +++ /dev/null | |||
@@ -1,153 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/proc-armo/uaccess.h | ||
3 | * | ||
4 | * Copyright (C) 1996 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | /* | ||
12 | * The fs functions are implemented on the ARM2 and ARM3 architectures | ||
13 | * manually. | ||
14 | * Use *_user functions to access user memory with faulting behaving | ||
15 | * as though the user is accessing the memory. | ||
16 | * Use set_fs(get_ds()) and then the *_user functions to allow them to | ||
17 | * access kernel memory. | ||
18 | */ | ||
19 | |||
20 | /* | ||
21 | * These are the values used to represent the user `fs' and the kernel `ds' | ||
22 | * FIXME - the KERNEL_DS should end at 0x03000000 but we want to access ROM at | ||
23 | * 0x03400000. ideally we want to forbid access to the IO space inbetween. | ||
24 | */ | ||
25 | #define KERNEL_DS 0x03FFFFFF | ||
26 | #define USER_DS 0x02000000 | ||
27 | |||
28 | extern uaccess_t uaccess_user, uaccess_kernel; | ||
29 | |||
30 | static inline void set_fs (mm_segment_t fs) | ||
31 | { | ||
32 | current_thread_info()->addr_limit = fs; | ||
33 | current->thread.uaccess = (fs == USER_DS ? &uaccess_user : &uaccess_kernel); | ||
34 | } | ||
35 | |||
36 | #define __range_ok(addr,size) ({ \ | ||
37 | unsigned long flag, roksum; \ | ||
38 | __asm__ __volatile__("subs %1, %0, %3; cmpcs %1, %2; movcs %0, #0" \ | ||
39 | : "=&r" (flag), "=&r" (roksum) \ | ||
40 | : "r" (addr), "Ir" (size), "0" (current_thread_info()->addr_limit) \ | ||
41 | : "cc"); \ | ||
42 | flag; }) | ||
43 | |||
44 | #define __addr_ok(addr) ({ \ | ||
45 | unsigned long flag; \ | ||
46 | __asm__ __volatile__("cmp %2, %0; movlo %0, #0" \ | ||
47 | : "=&r" (flag) \ | ||
48 | : "0" (current_thread_info()->addr_limit), "r" (addr) \ | ||
49 | : "cc"); \ | ||
50 | (flag == 0); }) | ||
51 | |||
52 | #define __put_user_asm_byte(x,addr,err) \ | ||
53 | __asm__ __volatile__( \ | ||
54 | " mov r0, %1\n" \ | ||
55 | " mov r1, %2\n" \ | ||
56 | " mov r2, %0\n" \ | ||
57 | " mov lr, pc\n" \ | ||
58 | " mov pc, %3\n" \ | ||
59 | " mov %0, r2\n" \ | ||
60 | : "=r" (err) \ | ||
61 | : "r" (x), "r" (addr), "r" (current->thread.uaccess->put_byte), \ | ||
62 | "0" (err) \ | ||
63 | : "r0", "r1", "r2", "lr") | ||
64 | |||
65 | #define __put_user_asm_half(x,addr,err) \ | ||
66 | __asm__ __volatile__( \ | ||
67 | " mov r0, %1\n" \ | ||
68 | " mov r1, %2\n" \ | ||
69 | " mov r2, %0\n" \ | ||
70 | " mov lr, pc\n" \ | ||
71 | " mov pc, %3\n" \ | ||
72 | " mov %0, r2\n" \ | ||
73 | : "=r" (err) \ | ||
74 | : "r" (x), "r" (addr), "r" (current->thread.uaccess->put_half), \ | ||
75 | "0" (err) \ | ||
76 | : "r0", "r1", "r2", "lr") | ||
77 | |||
78 | #define __put_user_asm_word(x,addr,err) \ | ||
79 | __asm__ __volatile__( \ | ||
80 | " mov r0, %1\n" \ | ||
81 | " mov r1, %2\n" \ | ||
82 | " mov r2, %0\n" \ | ||
83 | " mov lr, pc\n" \ | ||
84 | " mov pc, %3\n" \ | ||
85 | " mov %0, r2\n" \ | ||
86 | : "=r" (err) \ | ||
87 | : "r" (x), "r" (addr), "r" (current->thread.uaccess->put_word), \ | ||
88 | "0" (err) \ | ||
89 | : "r0", "r1", "r2", "lr") | ||
90 | |||
91 | #define __put_user_asm_dword(x,addr,err) \ | ||
92 | __asm__ __volatile__( \ | ||
93 | " mov r0, %1\n" \ | ||
94 | " mov r1, %2\n" \ | ||
95 | " mov r2, %0\n" \ | ||
96 | " mov lr, pc\n" \ | ||
97 | " mov pc, %3\n" \ | ||
98 | " mov %0, r2\n" \ | ||
99 | : "=r" (err) \ | ||
100 | : "r" (x), "r" (addr), "r" (current->thread.uaccess->put_dword), \ | ||
101 | "0" (err) \ | ||
102 | : "r0", "r1", "r2", "lr") | ||
103 | |||
104 | #define __get_user_asm_byte(x,addr,err) \ | ||
105 | __asm__ __volatile__( \ | ||
106 | " mov r0, %2\n" \ | ||
107 | " mov r1, %0\n" \ | ||
108 | " mov lr, pc\n" \ | ||
109 | " mov pc, %3\n" \ | ||
110 | " mov %0, r1\n" \ | ||
111 | " mov %1, r0\n" \ | ||
112 | : "=r" (err), "=r" (x) \ | ||
113 | : "r" (addr), "r" (current->thread.uaccess->get_byte), "0" (err) \ | ||
114 | : "r0", "r1", "r2", "lr") | ||
115 | |||
116 | #define __get_user_asm_half(x,addr,err) \ | ||
117 | __asm__ __volatile__( \ | ||
118 | " mov r0, %2\n" \ | ||
119 | " mov r1, %0\n" \ | ||
120 | " mov lr, pc\n" \ | ||
121 | " mov pc, %3\n" \ | ||
122 | " mov %0, r1\n" \ | ||
123 | " mov %1, r0\n" \ | ||
124 | : "=r" (err), "=r" (x) \ | ||
125 | : "r" (addr), "r" (current->thread.uaccess->get_half), "0" (err) \ | ||
126 | : "r0", "r1", "r2", "lr") | ||
127 | |||
128 | #define __get_user_asm_word(x,addr,err) \ | ||
129 | __asm__ __volatile__( \ | ||
130 | " mov r0, %2\n" \ | ||
131 | " mov r1, %0\n" \ | ||
132 | " mov lr, pc\n" \ | ||
133 | " mov pc, %3\n" \ | ||
134 | " mov %0, r1\n" \ | ||
135 | " mov %1, r0\n" \ | ||
136 | : "=r" (err), "=r" (x) \ | ||
137 | : "r" (addr), "r" (current->thread.uaccess->get_word), "0" (err) \ | ||
138 | : "r0", "r1", "r2", "lr") | ||
139 | |||
140 | #define __do_copy_from_user(to,from,n) \ | ||
141 | (n) = current->thread.uaccess->copy_from_user((to),(from),(n)) | ||
142 | |||
143 | #define __do_copy_to_user(to,from,n) \ | ||
144 | (n) = current->thread.uaccess->copy_to_user((to),(from),(n)) | ||
145 | |||
146 | #define __do_clear_user(addr,sz) \ | ||
147 | (sz) = current->thread.uaccess->clear_user((addr),(sz)) | ||
148 | |||
149 | #define __do_strncpy_from_user(dst,src,count,res) \ | ||
150 | (res) = current->thread.uaccess->strncpy_from_user(dst,src,count) | ||
151 | |||
152 | #define __do_strnlen_user(s,n,res) \ | ||
153 | (res) = current->thread.uaccess->strnlen_user(s,n) | ||
diff --git a/include/asm-arm26/uaccess.h b/include/asm-arm26/uaccess.h deleted file mode 100644 index d64ed84cb2d3..000000000000 --- a/include/asm-arm26/uaccess.h +++ /dev/null | |||
@@ -1,293 +0,0 @@ | |||
1 | #ifndef _ASMARM_UACCESS_H | ||
2 | #define _ASMARM_UACCESS_H | ||
3 | |||
4 | /* | ||
5 | * User space memory access functions | ||
6 | */ | ||
7 | #include <linux/sched.h> | ||
8 | #include <asm/errno.h> | ||
9 | |||
10 | #define VERIFY_READ 0 | ||
11 | #define VERIFY_WRITE 1 | ||
12 | |||
13 | /* | ||
14 | * The exception table consists of pairs of addresses: the first is the | ||
15 | * address of an instruction that is allowed to fault, and the second is | ||
16 | * the address at which the program should continue. No registers are | ||
17 | * modified, so it is entirely up to the continuation code to figure out | ||
18 | * what to do. | ||
19 | * | ||
20 | * All the routines below use bits of fixup code that are out of line | ||
21 | * with the main instruction path. This means when everything is well, | ||
22 | * we don't even have to jump over them. Further, they do not intrude | ||
23 | * on our cache or tlb entries. | ||
24 | */ | ||
25 | |||
26 | struct exception_table_entry | ||
27 | { | ||
28 | unsigned long insn, fixup; | ||
29 | }; | ||
30 | |||
31 | /* Returns 0 if exception not found and fixup otherwise. */ | ||
32 | extern unsigned long search_exception_table(unsigned long); | ||
33 | extern int fixup_exception(struct pt_regs *regs); | ||
34 | |||
35 | #define get_ds() (KERNEL_DS) | ||
36 | #define get_fs() (current_thread_info()->addr_limit) | ||
37 | #define segment_eq(a,b) ((a) == (b)) | ||
38 | |||
39 | #include <asm/uaccess-asm.h> | ||
40 | |||
41 | #define access_ok(type,addr,size) (__range_ok(addr,size) == 0) | ||
42 | |||
43 | /* | ||
44 | * Single-value transfer routines. They automatically use the right | ||
45 | * size if we just have the right pointer type. Note that the functions | ||
46 | * which read from user space (*get_*) need to take care not to leak | ||
47 | * kernel data even if the calling code is buggy and fails to check | ||
48 | * the return value. This means zeroing out the destination variable | ||
49 | * or buffer on error. Normally this is done out of line by the | ||
50 | * fixup code, but there are a few places where it intrudes on the | ||
51 | * main code path. When we only write to user space, there is no | ||
52 | * problem. | ||
53 | * | ||
54 | * The "__xxx" versions of the user access functions do not verify the | ||
55 | * address space - it must have been done previously with a separate | ||
56 | * "access_ok()" call. | ||
57 | * | ||
58 | * The "xxx_error" versions set the third argument to EFAULT if an | ||
59 | * error occurs, and leave it unchanged on success. Note that these | ||
60 | * versions are void (ie, don't return a value as such). | ||
61 | */ | ||
62 | |||
63 | extern int __get_user_1(void *); | ||
64 | extern int __get_user_2(void *); | ||
65 | extern int __get_user_4(void *); | ||
66 | extern int __get_user_8(void *); | ||
67 | extern int __get_user_bad(void); | ||
68 | |||
69 | #define __get_user_x(__r1,__p,__e,__s,__i...) \ | ||
70 | __asm__ __volatile__ ("bl __get_user_" #__s \ | ||
71 | : "=&r" (__e), "=r" (__r1) \ | ||
72 | : "0" (__p) \ | ||
73 | : __i) | ||
74 | |||
75 | #define get_user(x,p) \ | ||
76 | ({ \ | ||
77 | register const typeof(*(p)) *__p asm("r0") = (p); \ | ||
78 | register typeof(*(p)) __r1 asm("r1"); \ | ||
79 | register int __e asm("r0"); \ | ||
80 | switch (sizeof(*(p))) { \ | ||
81 | case 1: \ | ||
82 | __get_user_x(__r1, __p, __e, 1, "lr"); \ | ||
83 | break; \ | ||
84 | case 2: \ | ||
85 | __get_user_x(__r1, __p, __e, 2, "r2", "lr"); \ | ||
86 | break; \ | ||
87 | case 4: \ | ||
88 | __get_user_x(__r1, __p, __e, 4, "lr"); \ | ||
89 | break; \ | ||
90 | case 8: \ | ||
91 | __get_user_x(__r1, __p, __e, 8, "lr"); \ | ||
92 | break; \ | ||
93 | default: __e = __get_user_bad(); break; \ | ||
94 | } \ | ||
95 | x = __r1; \ | ||
96 | __e; \ | ||
97 | }) | ||
98 | |||
99 | |||
100 | #define __get_user(x,ptr) \ | ||
101 | ({ \ | ||
102 | long __gu_err = 0; \ | ||
103 | __get_user_err((x),(ptr),__gu_err); \ | ||
104 | __gu_err; \ | ||
105 | }) | ||
106 | |||
107 | #define __get_user_error(x,ptr,err) \ | ||
108 | ({ \ | ||
109 | __get_user_err((x),(ptr),err); \ | ||
110 | (void) 0; \ | ||
111 | }) | ||
112 | |||
113 | #define __get_user_err(x,ptr,err) \ | ||
114 | do { \ | ||
115 | unsigned long __gu_addr = (unsigned long)(ptr); \ | ||
116 | unsigned long __gu_val; \ | ||
117 | switch (sizeof(*(ptr))) { \ | ||
118 | case 1: __get_user_asm_byte(__gu_val,__gu_addr,err); break; \ | ||
119 | case 2: __get_user_asm_half(__gu_val,__gu_addr,err); break; \ | ||
120 | case 4: __get_user_asm_word(__gu_val,__gu_addr,err); break; \ | ||
121 | default: (__gu_val) = __get_user_bad(); \ | ||
122 | } \ | ||
123 | (x) = (__typeof__(*(ptr)))__gu_val; \ | ||
124 | } while (0) | ||
125 | |||
126 | extern int __put_user_1(void *, unsigned int); | ||
127 | extern int __put_user_2(void *, unsigned int); | ||
128 | extern int __put_user_4(void *, unsigned int); | ||
129 | extern int __put_user_8(void *, unsigned long long); | ||
130 | extern int __put_user_bad(void); | ||
131 | |||
132 | #define __put_user_x(__r1,__p,__e,__s) \ | ||
133 | __asm__ __volatile__ ( \ | ||
134 | __asmeq("%0", "r0") __asmeq("%2", "r1") \ | ||
135 | "bl __put_user_" #__s \ | ||
136 | : "=&r" (__e) \ | ||
137 | : "0" (__p), "r" (__r1) \ | ||
138 | : "ip", "lr", "cc") | ||
139 | |||
140 | #define put_user(x,p) \ | ||
141 | ({ \ | ||
142 | register const typeof(*(p)) __r1 asm("r1") = (x); \ | ||
143 | register const typeof(*(p)) *__p asm("r0") = (p); \ | ||
144 | register int __e asm("r0"); \ | ||
145 | switch (sizeof(*(__p))) { \ | ||
146 | case 1: \ | ||
147 | __put_user_x(__r1, __p, __e, 1); \ | ||
148 | break; \ | ||
149 | case 2: \ | ||
150 | __put_user_x(__r1, __p, __e, 2); \ | ||
151 | break; \ | ||
152 | case 4: \ | ||
153 | __put_user_x(__r1, __p, __e, 4); \ | ||
154 | break; \ | ||
155 | case 8: \ | ||
156 | __put_user_x(__r1, __p, __e, 8); \ | ||
157 | break; \ | ||
158 | default: __e = __put_user_bad(); break; \ | ||
159 | } \ | ||
160 | __e; \ | ||
161 | }) | ||
162 | |||
163 | #if 0 | ||
164 | /********************* OLD METHOD *******************/ | ||
165 | #define __put_user_x(__r1,__p,__e,__s,__i...) \ | ||
166 | __asm__ __volatile__ ("bl __put_user_" #__s \ | ||
167 | : "=&r" (__e) \ | ||
168 | : "0" (__p), "r" (__r1) \ | ||
169 | : __i) | ||
170 | |||
171 | #define put_user(x,p) \ | ||
172 | ({ \ | ||
173 | register const typeof(*(p)) __r1 asm("r1") = (x); \ | ||
174 | register const typeof(*(p)) *__p asm("r0") = (p); \ | ||
175 | register int __e asm("r0"); \ | ||
176 | switch (sizeof(*(p))) { \ | ||
177 | case 1: \ | ||
178 | __put_user_x(__r1, __p, __e, 1, "r2", "lr"); \ | ||
179 | break; \ | ||
180 | case 2: \ | ||
181 | __put_user_x(__r1, __p, __e, 2, "r2", "lr"); \ | ||
182 | break; \ | ||
183 | case 4: \ | ||
184 | __put_user_x(__r1, __p, __e, 4, "r2", "lr"); \ | ||
185 | break; \ | ||
186 | case 8: \ | ||
187 | __put_user_x(__r1, __p, __e, 8, "r2", "ip", "lr"); \ | ||
188 | break; \ | ||
189 | default: __e = __put_user_bad(); break; \ | ||
190 | } \ | ||
191 | __e; \ | ||
192 | }) | ||
193 | /*************************************************/ | ||
194 | #endif | ||
195 | |||
196 | #define __put_user(x,ptr) \ | ||
197 | ({ \ | ||
198 | long __pu_err = 0; \ | ||
199 | __put_user_err((x),(ptr),__pu_err); \ | ||
200 | __pu_err; \ | ||
201 | }) | ||
202 | |||
203 | #define __put_user_error(x,ptr,err) \ | ||
204 | ({ \ | ||
205 | __put_user_err((x),(ptr),err); \ | ||
206 | (void) 0; \ | ||
207 | }) | ||
208 | |||
209 | #define __put_user_err(x,ptr,err) \ | ||
210 | do { \ | ||
211 | unsigned long __pu_addr = (unsigned long)(ptr); \ | ||
212 | __typeof__(*(ptr)) __pu_val = (x); \ | ||
213 | switch (sizeof(*(ptr))) { \ | ||
214 | case 1: __put_user_asm_byte(__pu_val,__pu_addr,err); break; \ | ||
215 | case 2: __put_user_asm_half(__pu_val,__pu_addr,err); break; \ | ||
216 | case 4: __put_user_asm_word(__pu_val,__pu_addr,err); break; \ | ||
217 | case 8: __put_user_asm_dword(__pu_val,__pu_addr,err); break; \ | ||
218 | default: __put_user_bad(); \ | ||
219 | } \ | ||
220 | } while (0) | ||
221 | |||
222 | static __inline__ unsigned long copy_from_user(void *to, const void *from, unsigned long n) | ||
223 | { | ||
224 | if (access_ok(VERIFY_READ, from, n)) | ||
225 | __do_copy_from_user(to, from, n); | ||
226 | else /* security hole - plug it */ | ||
227 | memzero(to, n); | ||
228 | return n; | ||
229 | } | ||
230 | |||
231 | static __inline__ unsigned long __copy_from_user(void *to, const void *from, unsigned long n) | ||
232 | { | ||
233 | __do_copy_from_user(to, from, n); | ||
234 | return n; | ||
235 | } | ||
236 | |||
237 | static __inline__ unsigned long copy_to_user(void *to, const void *from, unsigned long n) | ||
238 | { | ||
239 | if (access_ok(VERIFY_WRITE, to, n)) | ||
240 | __do_copy_to_user(to, from, n); | ||
241 | return n; | ||
242 | } | ||
243 | |||
244 | static __inline__ unsigned long __copy_to_user(void *to, const void *from, unsigned long n) | ||
245 | { | ||
246 | __do_copy_to_user(to, from, n); | ||
247 | return n; | ||
248 | } | ||
249 | |||
250 | #define __copy_to_user_inatomic __copy_to_user | ||
251 | #define __copy_from_user_inatomic __copy_from_user | ||
252 | |||
253 | static __inline__ unsigned long clear_user (void *to, unsigned long n) | ||
254 | { | ||
255 | if (access_ok(VERIFY_WRITE, to, n)) | ||
256 | __do_clear_user(to, n); | ||
257 | return n; | ||
258 | } | ||
259 | |||
260 | static __inline__ unsigned long __clear_user (void *to, unsigned long n) | ||
261 | { | ||
262 | __do_clear_user(to, n); | ||
263 | return n; | ||
264 | } | ||
265 | |||
266 | static __inline__ long strncpy_from_user (char *dst, const char *src, long count) | ||
267 | { | ||
268 | long res = -EFAULT; | ||
269 | if (access_ok(VERIFY_READ, src, 1)) | ||
270 | __do_strncpy_from_user(dst, src, count, res); | ||
271 | return res; | ||
272 | } | ||
273 | |||
274 | static __inline__ long __strncpy_from_user (char *dst, const char *src, long count) | ||
275 | { | ||
276 | long res; | ||
277 | __do_strncpy_from_user(dst, src, count, res); | ||
278 | return res; | ||
279 | } | ||
280 | |||
281 | #define strlen_user(s) strnlen_user(s, ~0UL >> 1) | ||
282 | |||
283 | static inline long strnlen_user(const char *s, long n) | ||
284 | { | ||
285 | unsigned long res = 0; | ||
286 | |||
287 | if (__addr_ok(s)) | ||
288 | __do_strnlen_user(s, n, res); | ||
289 | |||
290 | return res; | ||
291 | } | ||
292 | |||
293 | #endif /* _ASMARM_UACCESS_H */ | ||
diff --git a/include/asm-arm26/ucontext.h b/include/asm-arm26/ucontext.h deleted file mode 100644 index f853130137cc..000000000000 --- a/include/asm-arm26/ucontext.h +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | #ifndef _ASMARM_UCONTEXT_H | ||
2 | #define _ASMARM_UCONTEXT_H | ||
3 | |||
4 | struct ucontext { | ||
5 | unsigned long uc_flags; | ||
6 | struct ucontext *uc_link; | ||
7 | stack_t uc_stack; | ||
8 | struct sigcontext uc_mcontext; | ||
9 | sigset_t uc_sigmask; /* mask last for extensibility */ | ||
10 | }; | ||
11 | |||
12 | #endif /* !_ASMARM_UCONTEXT_H */ | ||
diff --git a/include/asm-arm26/unaligned.h b/include/asm-arm26/unaligned.h deleted file mode 100644 index d992782089fd..000000000000 --- a/include/asm-arm26/unaligned.h +++ /dev/null | |||
@@ -1,118 +0,0 @@ | |||
1 | #ifndef __ASM_ARM_UNALIGNED_H | ||
2 | #define __ASM_ARM_UNALIGNED_H | ||
3 | |||
4 | #include <asm/types.h> | ||
5 | |||
6 | extern int __bug_unaligned_x(void *ptr); | ||
7 | |||
8 | /* | ||
9 | * What is the most efficient way of loading/storing an unaligned value? | ||
10 | * | ||
11 | * That is the subject of this file. Efficiency here is defined as | ||
12 | * minimum code size with minimum register usage for the common cases. | ||
13 | * It is currently not believed that long longs are common, so we | ||
14 | * trade efficiency for the chars, shorts and longs against the long | ||
15 | * longs. | ||
16 | * | ||
17 | * Current stats with gcc 2.7.2.2 for these functions: | ||
18 | * | ||
19 | * ptrsize get: code regs put: code regs | ||
20 | * 1 1 1 1 2 | ||
21 | * 2 3 2 3 2 | ||
22 | * 4 7 3 7 3 | ||
23 | * 8 20 6 16 6 | ||
24 | * | ||
25 | * gcc 2.95.1 seems to code differently: | ||
26 | * | ||
27 | * ptrsize get: code regs put: code regs | ||
28 | * 1 1 1 1 2 | ||
29 | * 2 3 2 3 2 | ||
30 | * 4 7 4 7 4 | ||
31 | * 8 19 8 15 6 | ||
32 | * | ||
33 | * which may or may not be more efficient (depending upon whether | ||
34 | * you can afford the extra registers). Hopefully the gcc 2.95 | ||
35 | * is inteligent enough to decide if it is better to use the | ||
36 | * extra register, but evidence so far seems to suggest otherwise. | ||
37 | * | ||
38 | * Unfortunately, gcc is not able to optimise the high word | ||
39 | * out of long long >> 32, or the low word from long long << 32 | ||
40 | */ | ||
41 | |||
42 | #define __get_unaligned_2_le(__p) \ | ||
43 | (__p[0] | __p[1] << 8) | ||
44 | |||
45 | #define __get_unaligned_4_le(__p) \ | ||
46 | (__p[0] | __p[1] << 8 | __p[2] << 16 | __p[3] << 24) | ||
47 | |||
48 | #define __get_unaligned_le(ptr) \ | ||
49 | ({ \ | ||
50 | __typeof__(*(ptr)) __v; \ | ||
51 | __u8 *__p = (__u8 *)(ptr); \ | ||
52 | switch (sizeof(*(ptr))) { \ | ||
53 | case 1: __v = *(ptr); break; \ | ||
54 | case 2: __v = __get_unaligned_2_le(__p); break; \ | ||
55 | case 4: __v = __get_unaligned_4_le(__p); break; \ | ||
56 | case 8: { \ | ||
57 | unsigned int __v1, __v2; \ | ||
58 | __v2 = __get_unaligned_4_le((__p+4)); \ | ||
59 | __v1 = __get_unaligned_4_le(__p); \ | ||
60 | __v = ((unsigned long long)__v2 << 32 | __v1); \ | ||
61 | } \ | ||
62 | break; \ | ||
63 | default: __v = __bug_unaligned_x(__p); break; \ | ||
64 | } \ | ||
65 | __v; \ | ||
66 | }) | ||
67 | |||
68 | static inline void __put_unaligned_2_le(__u32 __v, register __u8 *__p) | ||
69 | { | ||
70 | *__p++ = __v; | ||
71 | *__p++ = __v >> 8; | ||
72 | } | ||
73 | |||
74 | static inline void __put_unaligned_4_le(__u32 __v, register __u8 *__p) | ||
75 | { | ||
76 | __put_unaligned_2_le(__v >> 16, __p + 2); | ||
77 | __put_unaligned_2_le(__v, __p); | ||
78 | } | ||
79 | |||
80 | static inline void __put_unaligned_8_le(const unsigned long long __v, register __u8 *__p) | ||
81 | { | ||
82 | /* | ||
83 | * tradeoff: 8 bytes of stack for all unaligned puts (2 | ||
84 | * instructions), or an extra register in the long long | ||
85 | * case - go for the extra register. | ||
86 | */ | ||
87 | __put_unaligned_4_le(__v >> 32, __p+4); | ||
88 | __put_unaligned_4_le(__v, __p); | ||
89 | } | ||
90 | |||
91 | /* | ||
92 | * Try to store an unaligned value as efficiently as possible. | ||
93 | */ | ||
94 | #define __put_unaligned_le(val,ptr) \ | ||
95 | ({ \ | ||
96 | switch (sizeof(*(ptr))) { \ | ||
97 | case 1: \ | ||
98 | *(ptr) = (val); \ | ||
99 | break; \ | ||
100 | case 2: __put_unaligned_2_le((val),(__u8 *)(ptr)); \ | ||
101 | break; \ | ||
102 | case 4: __put_unaligned_4_le((val),(__u8 *)(ptr)); \ | ||
103 | break; \ | ||
104 | case 8: __put_unaligned_8_le((val),(__u8 *)(ptr)); \ | ||
105 | break; \ | ||
106 | default: __bug_unaligned_x(ptr); \ | ||
107 | break; \ | ||
108 | } \ | ||
109 | (void) 0; \ | ||
110 | }) | ||
111 | |||
112 | /* | ||
113 | * Select endianness | ||
114 | */ | ||
115 | #define get_unaligned __get_unaligned_le | ||
116 | #define put_unaligned __put_unaligned_le | ||
117 | |||
118 | #endif | ||
diff --git a/include/asm-arm26/uncompress.h b/include/asm-arm26/uncompress.h deleted file mode 100644 index df2cba816a4e..000000000000 --- a/include/asm-arm26/uncompress.h +++ /dev/null | |||
@@ -1,111 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-arc/uncompress.h | ||
3 | * | ||
4 | * Copyright (C) 1996 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #define VIDMEM ((char *)0x02000000) | ||
11 | |||
12 | int video_num_columns, video_num_lines, video_size_row; | ||
13 | int white, bytes_per_char_h; | ||
14 | extern unsigned long con_charconvtable[256]; | ||
15 | |||
16 | struct param_struct { | ||
17 | unsigned long page_size; | ||
18 | unsigned long nr_pages; | ||
19 | unsigned long ramdisk_size; | ||
20 | unsigned long mountrootrdonly; | ||
21 | unsigned long rootdev; | ||
22 | unsigned long video_num_cols; | ||
23 | unsigned long video_num_rows; | ||
24 | unsigned long video_x; | ||
25 | unsigned long video_y; | ||
26 | unsigned long memc_control_reg; | ||
27 | unsigned char sounddefault; | ||
28 | unsigned char adfsdrives; | ||
29 | unsigned char bytes_per_char_h; | ||
30 | unsigned char bytes_per_char_v; | ||
31 | unsigned long unused[256/4-11]; | ||
32 | }; | ||
33 | |||
34 | static struct param_struct *params = (struct param_struct *)0x0207c000; | ||
35 | |||
36 | /* | ||
37 | * This does not append a newline | ||
38 | */ | ||
39 | static void puts(const char *s) | ||
40 | { | ||
41 | extern void ll_write_char(char *, unsigned long); | ||
42 | int x,y; | ||
43 | unsigned char c; | ||
44 | char *ptr; | ||
45 | |||
46 | x = params->video_x; | ||
47 | y = params->video_y; | ||
48 | |||
49 | while ( ( c = *(unsigned char *)s++ ) != '\0' ) { | ||
50 | if ( c == '\n' ) { | ||
51 | x = 0; | ||
52 | if ( ++y >= video_num_lines ) { | ||
53 | y--; | ||
54 | } | ||
55 | } else { | ||
56 | ptr = VIDMEM + ((y*video_num_columns*params->bytes_per_char_v+x)*bytes_per_char_h); | ||
57 | ll_write_char(ptr, c|(white<<16)); | ||
58 | if ( ++x >= video_num_columns ) { | ||
59 | x = 0; | ||
60 | if ( ++y >= video_num_lines ) { | ||
61 | y--; | ||
62 | } | ||
63 | } | ||
64 | } | ||
65 | } | ||
66 | |||
67 | params->video_x = x; | ||
68 | params->video_y = y; | ||
69 | } | ||
70 | |||
71 | static void error(char *x); | ||
72 | |||
73 | /* | ||
74 | * Setup for decompression | ||
75 | */ | ||
76 | static void arch_decomp_setup(void) | ||
77 | { | ||
78 | int i; | ||
79 | |||
80 | video_num_lines = params->video_num_rows; | ||
81 | video_num_columns = params->video_num_cols; | ||
82 | bytes_per_char_h = params->bytes_per_char_h; | ||
83 | video_size_row = video_num_columns * bytes_per_char_h; | ||
84 | if (bytes_per_char_h == 4) | ||
85 | for (i = 0; i < 256; i++) | ||
86 | con_charconvtable[i] = | ||
87 | (i & 128 ? 1 << 0 : 0) | | ||
88 | (i & 64 ? 1 << 4 : 0) | | ||
89 | (i & 32 ? 1 << 8 : 0) | | ||
90 | (i & 16 ? 1 << 12 : 0) | | ||
91 | (i & 8 ? 1 << 16 : 0) | | ||
92 | (i & 4 ? 1 << 20 : 0) | | ||
93 | (i & 2 ? 1 << 24 : 0) | | ||
94 | (i & 1 ? 1 << 28 : 0); | ||
95 | else | ||
96 | for (i = 0; i < 16; i++) | ||
97 | con_charconvtable[i] = | ||
98 | (i & 8 ? 1 << 0 : 0) | | ||
99 | (i & 4 ? 1 << 8 : 0) | | ||
100 | (i & 2 ? 1 << 16 : 0) | | ||
101 | (i & 1 ? 1 << 24 : 0); | ||
102 | |||
103 | white = bytes_per_char_h == 8 ? 0xfc : 7; | ||
104 | |||
105 | if (params->nr_pages * params->page_size < 4096*1024) error("<4M of mem\n"); | ||
106 | } | ||
107 | |||
108 | /* | ||
109 | * nothing to do | ||
110 | */ | ||
111 | #define arch_decomp_wdog() | ||
diff --git a/include/asm-arm26/unistd.h b/include/asm-arm26/unistd.h deleted file mode 100644 index 4c3b919177e5..000000000000 --- a/include/asm-arm26/unistd.h +++ /dev/null | |||
@@ -1,343 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/unistd.h | ||
3 | * | ||
4 | * Copyright (C) 2001-2003 Russell King | ||
5 | * Modified 25/11/04 Ian Molton for arm26. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | * Please forward _all_ changes to this file to spyro@f2s.com | ||
12 | * no matter what the change is. Thanks! | ||
13 | */ | ||
14 | #ifndef __ASM_ARM_UNISTD_H | ||
15 | #define __ASM_ARM_UNISTD_H | ||
16 | |||
17 | #define __NR_SYSCALL_BASE 0x900000 | ||
18 | |||
19 | /* | ||
20 | * This file contains the system call numbers. | ||
21 | */ | ||
22 | |||
23 | #define __NR_restart_syscall (__NR_SYSCALL_BASE+ 0) | ||
24 | #define __NR_exit (__NR_SYSCALL_BASE+ 1) | ||
25 | #define __NR_fork (__NR_SYSCALL_BASE+ 2) | ||
26 | #define __NR_read (__NR_SYSCALL_BASE+ 3) | ||
27 | #define __NR_write (__NR_SYSCALL_BASE+ 4) | ||
28 | #define __NR_open (__NR_SYSCALL_BASE+ 5) | ||
29 | #define __NR_close (__NR_SYSCALL_BASE+ 6) | ||
30 | /* 7 was sys_waitpid */ | ||
31 | #define __NR_creat (__NR_SYSCALL_BASE+ 8) | ||
32 | #define __NR_link (__NR_SYSCALL_BASE+ 9) | ||
33 | #define __NR_unlink (__NR_SYSCALL_BASE+ 10) | ||
34 | #define __NR_execve (__NR_SYSCALL_BASE+ 11) | ||
35 | #define __NR_chdir (__NR_SYSCALL_BASE+ 12) | ||
36 | #define __NR_time (__NR_SYSCALL_BASE+ 13) | ||
37 | #define __NR_mknod (__NR_SYSCALL_BASE+ 14) | ||
38 | #define __NR_chmod (__NR_SYSCALL_BASE+ 15) | ||
39 | #define __NR_lchown (__NR_SYSCALL_BASE+ 16) | ||
40 | /* 17 was sys_break */ | ||
41 | /* 18 was sys_stat */ | ||
42 | #define __NR_lseek (__NR_SYSCALL_BASE+ 19) | ||
43 | #define __NR_getpid (__NR_SYSCALL_BASE+ 20) | ||
44 | #define __NR_mount (__NR_SYSCALL_BASE+ 21) | ||
45 | #define __NR_umount (__NR_SYSCALL_BASE+ 22) | ||
46 | #define __NR_setuid (__NR_SYSCALL_BASE+ 23) | ||
47 | #define __NR_getuid (__NR_SYSCALL_BASE+ 24) | ||
48 | #define __NR_stime (__NR_SYSCALL_BASE+ 25) | ||
49 | #define __NR_ptrace (__NR_SYSCALL_BASE+ 26) | ||
50 | #define __NR_alarm (__NR_SYSCALL_BASE+ 27) | ||
51 | /* 28 was sys_fstat */ | ||
52 | #define __NR_pause (__NR_SYSCALL_BASE+ 29) | ||
53 | #define __NR_utime (__NR_SYSCALL_BASE+ 30) | ||
54 | /* 31 was sys_stty */ | ||
55 | /* 32 was sys_gtty */ | ||
56 | #define __NR_access (__NR_SYSCALL_BASE+ 33) | ||
57 | #define __NR_nice (__NR_SYSCALL_BASE+ 34) | ||
58 | /* 35 was sys_ftime */ | ||
59 | #define __NR_sync (__NR_SYSCALL_BASE+ 36) | ||
60 | #define __NR_kill (__NR_SYSCALL_BASE+ 37) | ||
61 | #define __NR_rename (__NR_SYSCALL_BASE+ 38) | ||
62 | #define __NR_mkdir (__NR_SYSCALL_BASE+ 39) | ||
63 | #define __NR_rmdir (__NR_SYSCALL_BASE+ 40) | ||
64 | #define __NR_dup (__NR_SYSCALL_BASE+ 41) | ||
65 | #define __NR_pipe (__NR_SYSCALL_BASE+ 42) | ||
66 | #define __NR_times (__NR_SYSCALL_BASE+ 43) | ||
67 | /* 44 was sys_prof */ | ||
68 | #define __NR_brk (__NR_SYSCALL_BASE+ 45) | ||
69 | #define __NR_setgid (__NR_SYSCALL_BASE+ 46) | ||
70 | #define __NR_getgid (__NR_SYSCALL_BASE+ 47) | ||
71 | /* 48 was sys_signal */ | ||
72 | #define __NR_geteuid (__NR_SYSCALL_BASE+ 49) | ||
73 | #define __NR_getegid (__NR_SYSCALL_BASE+ 50) | ||
74 | #define __NR_acct (__NR_SYSCALL_BASE+ 51) | ||
75 | #define __NR_umount2 (__NR_SYSCALL_BASE+ 52) | ||
76 | /* 53 was sys_lock */ | ||
77 | #define __NR_ioctl (__NR_SYSCALL_BASE+ 54) | ||
78 | #define __NR_fcntl (__NR_SYSCALL_BASE+ 55) | ||
79 | /* 56 was sys_mpx */ | ||
80 | #define __NR_setpgid (__NR_SYSCALL_BASE+ 57) | ||
81 | /* 58 was sys_ulimit */ | ||
82 | /* 59 was sys_olduname */ | ||
83 | #define __NR_umask (__NR_SYSCALL_BASE+ 60) | ||
84 | #define __NR_chroot (__NR_SYSCALL_BASE+ 61) | ||
85 | #define __NR_ustat (__NR_SYSCALL_BASE+ 62) | ||
86 | #define __NR_dup2 (__NR_SYSCALL_BASE+ 63) | ||
87 | #define __NR_getppid (__NR_SYSCALL_BASE+ 64) | ||
88 | #define __NR_getpgrp (__NR_SYSCALL_BASE+ 65) | ||
89 | #define __NR_setsid (__NR_SYSCALL_BASE+ 66) | ||
90 | #define __NR_sigaction (__NR_SYSCALL_BASE+ 67) | ||
91 | /* 68 was sys_sgetmask */ | ||
92 | /* 69 was sys_ssetmask */ | ||
93 | #define __NR_setreuid (__NR_SYSCALL_BASE+ 70) | ||
94 | #define __NR_setregid (__NR_SYSCALL_BASE+ 71) | ||
95 | #define __NR_sigsuspend (__NR_SYSCALL_BASE+ 72) | ||
96 | #define __NR_sigpending (__NR_SYSCALL_BASE+ 73) | ||
97 | #define __NR_sethostname (__NR_SYSCALL_BASE+ 74) | ||
98 | #define __NR_setrlimit (__NR_SYSCALL_BASE+ 75) | ||
99 | #define __NR_getrlimit (__NR_SYSCALL_BASE+ 76) /* Back compat 2GB limited rlimit */ | ||
100 | #define __NR_getrusage (__NR_SYSCALL_BASE+ 77) | ||
101 | #define __NR_gettimeofday (__NR_SYSCALL_BASE+ 78) | ||
102 | #define __NR_settimeofday (__NR_SYSCALL_BASE+ 79) | ||
103 | #define __NR_getgroups (__NR_SYSCALL_BASE+ 80) | ||
104 | #define __NR_setgroups (__NR_SYSCALL_BASE+ 81) | ||
105 | #define __NR_select (__NR_SYSCALL_BASE+ 82) | ||
106 | #define __NR_symlink (__NR_SYSCALL_BASE+ 83) | ||
107 | /* 84 was sys_lstat */ | ||
108 | #define __NR_readlink (__NR_SYSCALL_BASE+ 85) | ||
109 | #define __NR_uselib (__NR_SYSCALL_BASE+ 86) | ||
110 | #define __NR_swapon (__NR_SYSCALL_BASE+ 87) | ||
111 | #define __NR_reboot (__NR_SYSCALL_BASE+ 88) | ||
112 | #define __NR_readdir (__NR_SYSCALL_BASE+ 89) | ||
113 | #define __NR_mmap (__NR_SYSCALL_BASE+ 90) | ||
114 | #define __NR_munmap (__NR_SYSCALL_BASE+ 91) | ||
115 | #define __NR_truncate (__NR_SYSCALL_BASE+ 92) | ||
116 | #define __NR_ftruncate (__NR_SYSCALL_BASE+ 93) | ||
117 | #define __NR_fchmod (__NR_SYSCALL_BASE+ 94) | ||
118 | #define __NR_fchown (__NR_SYSCALL_BASE+ 95) | ||
119 | #define __NR_getpriority (__NR_SYSCALL_BASE+ 96) | ||
120 | #define __NR_setpriority (__NR_SYSCALL_BASE+ 97) | ||
121 | /* 98 was sys_profil */ | ||
122 | #define __NR_statfs (__NR_SYSCALL_BASE+ 99) | ||
123 | #define __NR_fstatfs (__NR_SYSCALL_BASE+100) | ||
124 | /* 101 was sys_ioperm */ | ||
125 | #define __NR_socketcall (__NR_SYSCALL_BASE+102) | ||
126 | #define __NR_syslog (__NR_SYSCALL_BASE+103) | ||
127 | #define __NR_setitimer (__NR_SYSCALL_BASE+104) | ||
128 | #define __NR_getitimer (__NR_SYSCALL_BASE+105) | ||
129 | #define __NR_stat (__NR_SYSCALL_BASE+106) | ||
130 | #define __NR_lstat (__NR_SYSCALL_BASE+107) | ||
131 | #define __NR_fstat (__NR_SYSCALL_BASE+108) | ||
132 | /* 109 was sys_uname */ | ||
133 | /* 110 was sys_iopl */ | ||
134 | #define __NR_vhangup (__NR_SYSCALL_BASE+111) | ||
135 | /* 112 was sys_idle */ | ||
136 | #define __NR_syscall (__NR_SYSCALL_BASE+113) /* syscall to call a syscall! */ | ||
137 | #define __NR_wait4 (__NR_SYSCALL_BASE+114) | ||
138 | #define __NR_swapoff (__NR_SYSCALL_BASE+115) | ||
139 | #define __NR_sysinfo (__NR_SYSCALL_BASE+116) | ||
140 | #define __NR_ipc (__NR_SYSCALL_BASE+117) | ||
141 | #define __NR_fsync (__NR_SYSCALL_BASE+118) | ||
142 | #define __NR_sigreturn (__NR_SYSCALL_BASE+119) | ||
143 | #define __NR_clone (__NR_SYSCALL_BASE+120) | ||
144 | #define __NR_setdomainname (__NR_SYSCALL_BASE+121) | ||
145 | #define __NR_uname (__NR_SYSCALL_BASE+122) | ||
146 | /* 123 was sys_modify_ldt */ | ||
147 | #define __NR_adjtimex (__NR_SYSCALL_BASE+124) | ||
148 | #define __NR_mprotect (__NR_SYSCALL_BASE+125) | ||
149 | #define __NR_sigprocmask (__NR_SYSCALL_BASE+126) | ||
150 | /* 127 was sys_create_module */ | ||
151 | #define __NR_init_module (__NR_SYSCALL_BASE+128) | ||
152 | #define __NR_delete_module (__NR_SYSCALL_BASE+129) | ||
153 | /* 130 was sys_get_kernel_syms */ | ||
154 | #define __NR_quotactl (__NR_SYSCALL_BASE+131) | ||
155 | #define __NR_getpgid (__NR_SYSCALL_BASE+132) | ||
156 | #define __NR_fchdir (__NR_SYSCALL_BASE+133) | ||
157 | #define __NR_bdflush (__NR_SYSCALL_BASE+134) | ||
158 | #define __NR_sysfs (__NR_SYSCALL_BASE+135) | ||
159 | #define __NR_personality (__NR_SYSCALL_BASE+136) | ||
160 | /* 137 was sys_afs_syscall */ | ||
161 | #define __NR_setfsuid (__NR_SYSCALL_BASE+138) | ||
162 | #define __NR_setfsgid (__NR_SYSCALL_BASE+139) | ||
163 | #define __NR__llseek (__NR_SYSCALL_BASE+140) | ||
164 | #define __NR_getdents (__NR_SYSCALL_BASE+141) | ||
165 | #define __NR__newselect (__NR_SYSCALL_BASE+142) | ||
166 | #define __NR_flock (__NR_SYSCALL_BASE+143) | ||
167 | #define __NR_msync (__NR_SYSCALL_BASE+144) | ||
168 | #define __NR_readv (__NR_SYSCALL_BASE+145) | ||
169 | #define __NR_writev (__NR_SYSCALL_BASE+146) | ||
170 | #define __NR_getsid (__NR_SYSCALL_BASE+147) | ||
171 | #define __NR_fdatasync (__NR_SYSCALL_BASE+148) | ||
172 | #define __NR__sysctl (__NR_SYSCALL_BASE+149) | ||
173 | #define __NR_mlock (__NR_SYSCALL_BASE+150) | ||
174 | #define __NR_munlock (__NR_SYSCALL_BASE+151) | ||
175 | #define __NR_mlockall (__NR_SYSCALL_BASE+152) | ||
176 | #define __NR_munlockall (__NR_SYSCALL_BASE+153) | ||
177 | #define __NR_sched_setparam (__NR_SYSCALL_BASE+154) | ||
178 | #define __NR_sched_getparam (__NR_SYSCALL_BASE+155) | ||
179 | #define __NR_sched_setscheduler (__NR_SYSCALL_BASE+156) | ||
180 | #define __NR_sched_getscheduler (__NR_SYSCALL_BASE+157) | ||
181 | #define __NR_sched_yield (__NR_SYSCALL_BASE+158) | ||
182 | #define __NR_sched_get_priority_max (__NR_SYSCALL_BASE+159) | ||
183 | #define __NR_sched_get_priority_min (__NR_SYSCALL_BASE+160) | ||
184 | #define __NR_sched_rr_get_interval (__NR_SYSCALL_BASE+161) | ||
185 | #define __NR_nanosleep (__NR_SYSCALL_BASE+162) | ||
186 | #define __NR_mremap (__NR_SYSCALL_BASE+163) | ||
187 | #define __NR_setresuid (__NR_SYSCALL_BASE+164) | ||
188 | #define __NR_getresuid (__NR_SYSCALL_BASE+165) | ||
189 | /* 166 was sys_vm86 */ | ||
190 | /* 167 was sys_query_module */ | ||
191 | #define __NR_poll (__NR_SYSCALL_BASE+168) | ||
192 | #define __NR_nfsservctl (__NR_SYSCALL_BASE+169) | ||
193 | #define __NR_setresgid (__NR_SYSCALL_BASE+170) | ||
194 | #define __NR_getresgid (__NR_SYSCALL_BASE+171) | ||
195 | #define __NR_prctl (__NR_SYSCALL_BASE+172) | ||
196 | #define __NR_rt_sigreturn (__NR_SYSCALL_BASE+173) | ||
197 | #define __NR_rt_sigaction (__NR_SYSCALL_BASE+174) | ||
198 | #define __NR_rt_sigprocmask (__NR_SYSCALL_BASE+175) | ||
199 | #define __NR_rt_sigpending (__NR_SYSCALL_BASE+176) | ||
200 | #define __NR_rt_sigtimedwait (__NR_SYSCALL_BASE+177) | ||
201 | #define __NR_rt_sigqueueinfo (__NR_SYSCALL_BASE+178) | ||
202 | #define __NR_rt_sigsuspend (__NR_SYSCALL_BASE+179) | ||
203 | #define __NR_pread64 (__NR_SYSCALL_BASE+180) | ||
204 | #define __NR_pwrite64 (__NR_SYSCALL_BASE+181) | ||
205 | #define __NR_chown (__NR_SYSCALL_BASE+182) | ||
206 | #define __NR_getcwd (__NR_SYSCALL_BASE+183) | ||
207 | #define __NR_capget (__NR_SYSCALL_BASE+184) | ||
208 | #define __NR_capset (__NR_SYSCALL_BASE+185) | ||
209 | #define __NR_sigaltstack (__NR_SYSCALL_BASE+186) | ||
210 | #define __NR_sendfile (__NR_SYSCALL_BASE+187) | ||
211 | /* 188 reserved */ | ||
212 | /* 189 reserved */ | ||
213 | #define __NR_vfork (__NR_SYSCALL_BASE+190) | ||
214 | #define __NR_ugetrlimit (__NR_SYSCALL_BASE+191) /* SuS compliant getrlimit */ | ||
215 | #define __NR_mmap2 (__NR_SYSCALL_BASE+192) | ||
216 | #define __NR_truncate64 (__NR_SYSCALL_BASE+193) | ||
217 | #define __NR_ftruncate64 (__NR_SYSCALL_BASE+194) | ||
218 | #define __NR_stat64 (__NR_SYSCALL_BASE+195) | ||
219 | #define __NR_lstat64 (__NR_SYSCALL_BASE+196) | ||
220 | #define __NR_fstat64 (__NR_SYSCALL_BASE+197) | ||
221 | #define __NR_lchown32 (__NR_SYSCALL_BASE+198) | ||
222 | #define __NR_getuid32 (__NR_SYSCALL_BASE+199) | ||
223 | #define __NR_getgid32 (__NR_SYSCALL_BASE+200) | ||
224 | #define __NR_geteuid32 (__NR_SYSCALL_BASE+201) | ||
225 | #define __NR_getegid32 (__NR_SYSCALL_BASE+202) | ||
226 | #define __NR_setreuid32 (__NR_SYSCALL_BASE+203) | ||
227 | #define __NR_setregid32 (__NR_SYSCALL_BASE+204) | ||
228 | #define __NR_getgroups32 (__NR_SYSCALL_BASE+205) | ||
229 | #define __NR_setgroups32 (__NR_SYSCALL_BASE+206) | ||
230 | #define __NR_fchown32 (__NR_SYSCALL_BASE+207) | ||
231 | #define __NR_setresuid32 (__NR_SYSCALL_BASE+208) | ||
232 | #define __NR_getresuid32 (__NR_SYSCALL_BASE+209) | ||
233 | #define __NR_setresgid32 (__NR_SYSCALL_BASE+210) | ||
234 | #define __NR_getresgid32 (__NR_SYSCALL_BASE+211) | ||
235 | #define __NR_chown32 (__NR_SYSCALL_BASE+212) | ||
236 | #define __NR_setuid32 (__NR_SYSCALL_BASE+213) | ||
237 | #define __NR_setgid32 (__NR_SYSCALL_BASE+214) | ||
238 | #define __NR_setfsuid32 (__NR_SYSCALL_BASE+215) | ||
239 | #define __NR_setfsgid32 (__NR_SYSCALL_BASE+216) | ||
240 | #define __NR_getdents64 (__NR_SYSCALL_BASE+217) | ||
241 | #define __NR_pivot_root (__NR_SYSCALL_BASE+218) | ||
242 | #define __NR_mincore (__NR_SYSCALL_BASE+219) | ||
243 | #define __NR_madvise (__NR_SYSCALL_BASE+220) | ||
244 | #define __NR_fcntl64 (__NR_SYSCALL_BASE+221) | ||
245 | /* 222 for tux */ | ||
246 | /* 223 is unused */ | ||
247 | #define __NR_gettid (__NR_SYSCALL_BASE+224) | ||
248 | #define __NR_readahead (__NR_SYSCALL_BASE+225) | ||
249 | #define __NR_setxattr (__NR_SYSCALL_BASE+226) | ||
250 | #define __NR_lsetxattr (__NR_SYSCALL_BASE+227) | ||
251 | #define __NR_fsetxattr (__NR_SYSCALL_BASE+228) | ||
252 | #define __NR_getxattr (__NR_SYSCALL_BASE+229) | ||
253 | #define __NR_lgetxattr (__NR_SYSCALL_BASE+230) | ||
254 | #define __NR_fgetxattr (__NR_SYSCALL_BASE+231) | ||
255 | #define __NR_listxattr (__NR_SYSCALL_BASE+232) | ||
256 | #define __NR_llistxattr (__NR_SYSCALL_BASE+233) | ||
257 | #define __NR_flistxattr (__NR_SYSCALL_BASE+234) | ||
258 | #define __NR_removexattr (__NR_SYSCALL_BASE+235) | ||
259 | #define __NR_lremovexattr (__NR_SYSCALL_BASE+236) | ||
260 | #define __NR_fremovexattr (__NR_SYSCALL_BASE+237) | ||
261 | #define __NR_tkill (__NR_SYSCALL_BASE+238) | ||
262 | #define __NR_sendfile64 (__NR_SYSCALL_BASE+239) | ||
263 | #define __NR_futex (__NR_SYSCALL_BASE+240) | ||
264 | #define __NR_sched_setaffinity (__NR_SYSCALL_BASE+241) | ||
265 | #define __NR_sched_getaffinity (__NR_SYSCALL_BASE+242) | ||
266 | #define __NR_io_setup (__NR_SYSCALL_BASE+243) | ||
267 | #define __NR_io_destroy (__NR_SYSCALL_BASE+244) | ||
268 | #define __NR_io_getevents (__NR_SYSCALL_BASE+245) | ||
269 | #define __NR_io_submit (__NR_SYSCALL_BASE+246) | ||
270 | #define __NR_io_cancel (__NR_SYSCALL_BASE+247) | ||
271 | #define __NR_exit_group (__NR_SYSCALL_BASE+248) | ||
272 | #define __NR_lookup_dcookie (__NR_SYSCALL_BASE+249) | ||
273 | #define __NR_epoll_create (__NR_SYSCALL_BASE+250) | ||
274 | #define __NR_epoll_ctl (__NR_SYSCALL_BASE+251) | ||
275 | #define __NR_epoll_wait (__NR_SYSCALL_BASE+252) | ||
276 | #define __NR_remap_file_pages (__NR_SYSCALL_BASE+253) | ||
277 | /* 254 for set_thread_area */ | ||
278 | /* 255 for get_thread_area */ | ||
279 | /* 256 for set_tid_address */ | ||
280 | #define __NR_timer_create (__NR_SYSCALL_BASE+257) | ||
281 | #define __NR_timer_settime (__NR_SYSCALL_BASE+258) | ||
282 | #define __NR_timer_gettime (__NR_SYSCALL_BASE+259) | ||
283 | #define __NR_timer_getoverrun (__NR_SYSCALL_BASE+260) | ||
284 | #define __NR_timer_delete (__NR_SYSCALL_BASE+261) | ||
285 | #define __NR_clock_settime (__NR_SYSCALL_BASE+262) | ||
286 | #define __NR_clock_gettime (__NR_SYSCALL_BASE+263) | ||
287 | #define __NR_clock_getres (__NR_SYSCALL_BASE+264) | ||
288 | #define __NR_clock_nanosleep (__NR_SYSCALL_BASE+265) | ||
289 | #define __NR_statfs64 (__NR_SYSCALL_BASE+266) | ||
290 | #define __NR_fstatfs64 (__NR_SYSCALL_BASE+267) | ||
291 | #define __NR_tgkill (__NR_SYSCALL_BASE+268) | ||
292 | #define __NR_utimes (__NR_SYSCALL_BASE+269) | ||
293 | #define __NR_fadvise64_64 (__NR_SYSCALL_BASE+270) | ||
294 | #define __NR_pciconfig_iobase (__NR_SYSCALL_BASE+271) | ||
295 | #define __NR_pciconfig_read (__NR_SYSCALL_BASE+272) | ||
296 | #define __NR_pciconfig_write (__NR_SYSCALL_BASE+273) | ||
297 | #define __NR_mq_open (__NR_SYSCALL_BASE+274) | ||
298 | #define __NR_mq_unlink (__NR_SYSCALL_BASE+275) | ||
299 | #define __NR_mq_timedsend (__NR_SYSCALL_BASE+276) | ||
300 | #define __NR_mq_timedreceive (__NR_SYSCALL_BASE+277) | ||
301 | #define __NR_mq_notify (__NR_SYSCALL_BASE+278) | ||
302 | #define __NR_mq_getsetattr (__NR_SYSCALL_BASE+279) | ||
303 | #define __NR_waitid (__NR_SYSCALL_BASE+280) | ||
304 | |||
305 | /* | ||
306 | * The following SWIs are ARM private. FIXME - make appropriate for arm26 | ||
307 | */ | ||
308 | #define __ARM_NR_BASE (__NR_SYSCALL_BASE+0x0f0000) | ||
309 | #define __ARM_NR_breakpoint (__ARM_NR_BASE+1) | ||
310 | #define __ARM_NR_cacheflush (__ARM_NR_BASE+2) | ||
311 | #define __ARM_NR_usr26 (__ARM_NR_BASE+3) | ||
312 | |||
313 | #ifdef __KERNEL__ | ||
314 | |||
315 | #define __ARCH_WANT_IPC_PARSE_VERSION | ||
316 | #define __ARCH_WANT_OLD_READDIR | ||
317 | #define __ARCH_WANT_STAT64 | ||
318 | #define __ARCH_WANT_SYS_ALARM | ||
319 | #define __ARCH_WANT_SYS_GETHOSTNAME | ||
320 | #define __ARCH_WANT_SYS_PAUSE | ||
321 | #define __ARCH_WANT_SYS_TIME | ||
322 | #define __ARCH_WANT_SYS_UTIME | ||
323 | #define __ARCH_WANT_SYS_SOCKETCALL | ||
324 | #define __ARCH_WANT_SYS_FADVISE64 | ||
325 | #define __ARCH_WANT_SYS_GETPGRP | ||
326 | #define __ARCH_WANT_SYS_LLSEEK | ||
327 | #define __ARCH_WANT_SYS_NICE | ||
328 | #define __ARCH_WANT_SYS_OLD_GETRLIMIT | ||
329 | #define __ARCH_WANT_SYS_OLDUMOUNT | ||
330 | #define __ARCH_WANT_SYS_SIGPENDING | ||
331 | #define __ARCH_WANT_SYS_SIGPROCMASK | ||
332 | #define __ARCH_WANT_SYS_RT_SIGACTION | ||
333 | |||
334 | /* | ||
335 | * "Conditional" syscalls | ||
336 | * | ||
337 | * What we want is __attribute__((weak,alias("sys_ni_syscall"))), | ||
338 | * but it doesn't work on all toolchains, so we just do it by hand | ||
339 | */ | ||
340 | #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") | ||
341 | |||
342 | #endif /* __KERNEL__ */ | ||
343 | #endif /* __ASM_ARM_UNISTD_H */ | ||
diff --git a/include/asm-arm26/user.h b/include/asm-arm26/user.h deleted file mode 100644 index 3e8b0f879159..000000000000 --- a/include/asm-arm26/user.h +++ /dev/null | |||
@@ -1,84 +0,0 @@ | |||
1 | #ifndef _ARM_USER_H | ||
2 | #define _ARM_USER_H | ||
3 | |||
4 | #include <asm/page.h> | ||
5 | #include <asm/ptrace.h> | ||
6 | /* Core file format: The core file is written in such a way that gdb | ||
7 | can understand it and provide useful information to the user (under | ||
8 | linux we use the 'trad-core' bfd). There are quite a number of | ||
9 | obstacles to being able to view the contents of the floating point | ||
10 | registers, and until these are solved you will not be able to view the | ||
11 | contents of them. Actually, you can read in the core file and look at | ||
12 | the contents of the user struct to find out what the floating point | ||
13 | registers contain. | ||
14 | The actual file contents are as follows: | ||
15 | UPAGE: 1 page consisting of a user struct that tells gdb what is present | ||
16 | in the file. Directly after this is a copy of the task_struct, which | ||
17 | is currently not used by gdb, but it may come in useful at some point. | ||
18 | All of the registers are stored as part of the upage. The upage should | ||
19 | always be only one page. | ||
20 | DATA: The data area is stored. We use current->end_text to | ||
21 | current->brk to pick up all of the user variables, plus any memory | ||
22 | that may have been malloced. No attempt is made to determine if a page | ||
23 | is demand-zero or if a page is totally unused, we just cover the entire | ||
24 | range. All of the addresses are rounded in such a way that an integral | ||
25 | number of pages is written. | ||
26 | STACK: We need the stack information in order to get a meaningful | ||
27 | backtrace. We need to write the data from (esp) to | ||
28 | current->start_stack, so we round each of these off in order to be able | ||
29 | to write an integer number of pages. | ||
30 | The minimum core file size is 3 pages, or 12288 bytes. | ||
31 | */ | ||
32 | |||
33 | struct user_fp { | ||
34 | struct fp_reg { | ||
35 | unsigned int sign1:1; | ||
36 | unsigned int unused:15; | ||
37 | unsigned int sign2:1; | ||
38 | unsigned int exponent:14; | ||
39 | unsigned int j:1; | ||
40 | unsigned int mantissa1:31; | ||
41 | unsigned int mantissa0:32; | ||
42 | } fpregs[8]; | ||
43 | unsigned int fpsr:32; | ||
44 | unsigned int fpcr:32; | ||
45 | unsigned char ftype[8]; | ||
46 | unsigned int init_flag; | ||
47 | }; | ||
48 | |||
49 | /* When the kernel dumps core, it starts by dumping the user struct - | ||
50 | this will be used by gdb to figure out where the data and stack segments | ||
51 | are within the file, and what virtual addresses to use. */ | ||
52 | struct user{ | ||
53 | /* We start with the registers, to mimic the way that "memory" is returned | ||
54 | from the ptrace(3,...) function. */ | ||
55 | struct pt_regs regs; /* Where the registers are actually stored */ | ||
56 | /* ptrace does not yet supply these. Someday.... */ | ||
57 | int u_fpvalid; /* True if math co-processor being used. */ | ||
58 | /* for this mess. Not yet used. */ | ||
59 | /* The rest of this junk is to help gdb figure out what goes where */ | ||
60 | unsigned long int u_tsize; /* Text segment size (pages). */ | ||
61 | unsigned long int u_dsize; /* Data segment size (pages). */ | ||
62 | unsigned long int u_ssize; /* Stack segment size (pages). */ | ||
63 | unsigned long start_code; /* Starting virtual address of text. */ | ||
64 | unsigned long start_stack; /* Starting virtual address of stack area. | ||
65 | This is actually the bottom of the stack, | ||
66 | the top of the stack is always found in the | ||
67 | esp register. */ | ||
68 | long int signal; /* Signal that caused the core dump. */ | ||
69 | int reserved; /* No longer used */ | ||
70 | struct pt_regs * u_ar0; /* Used by gdb to help find the values for */ | ||
71 | /* the registers. */ | ||
72 | unsigned long magic; /* To uniquely identify a core file */ | ||
73 | char u_comm[32]; /* User command that was responsible */ | ||
74 | int u_debugreg[8]; | ||
75 | struct user_fp u_fp; /* FP state */ | ||
76 | struct user_fp_struct * u_fp0;/* Used by gdb to help find the values for */ | ||
77 | /* the FP registers. */ | ||
78 | }; | ||
79 | #define NBPG PAGE_SIZE | ||
80 | #define UPAGES 1 | ||
81 | #define HOST_TEXT_START_ADDR (u.start_code) | ||
82 | #define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) | ||
83 | |||
84 | #endif /* _ARM_USER_H */ | ||
diff --git a/include/asm-arm26/xor.h b/include/asm-arm26/xor.h deleted file mode 100644 index e7c4cf58bed1..000000000000 --- a/include/asm-arm26/xor.h +++ /dev/null | |||
@@ -1,141 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/xor.h | ||
3 | * | ||
4 | * Copyright (C) 2001 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #include <asm-generic/xor.h> | ||
11 | |||
12 | #define __XOR(a1, a2) a1 ^= a2 | ||
13 | |||
14 | #define GET_BLOCK_2(dst) \ | ||
15 | __asm__("ldmia %0, {%1, %2}" \ | ||
16 | : "=r" (dst), "=r" (a1), "=r" (a2) \ | ||
17 | : "0" (dst)) | ||
18 | |||
19 | #define GET_BLOCK_4(dst) \ | ||
20 | __asm__("ldmia %0, {%1, %2, %3, %4}" \ | ||
21 | : "=r" (dst), "=r" (a1), "=r" (a2), "=r" (a3), "=r" (a4) \ | ||
22 | : "0" (dst)) | ||
23 | |||
24 | #define XOR_BLOCK_2(src) \ | ||
25 | __asm__("ldmia %0!, {%1, %2}" \ | ||
26 | : "=r" (src), "=r" (b1), "=r" (b2) \ | ||
27 | : "0" (src)); \ | ||
28 | __XOR(a1, b1); __XOR(a2, b2); | ||
29 | |||
30 | #define XOR_BLOCK_4(src) \ | ||
31 | __asm__("ldmia %0!, {%1, %2, %3, %4}" \ | ||
32 | : "=r" (src), "=r" (b1), "=r" (b2), "=r" (b3), "=r" (b4) \ | ||
33 | : "0" (src)); \ | ||
34 | __XOR(a1, b1); __XOR(a2, b2); __XOR(a3, b3); __XOR(a4, b4) | ||
35 | |||
36 | #define PUT_BLOCK_2(dst) \ | ||
37 | __asm__ __volatile__("stmia %0!, {%2, %3}" \ | ||
38 | : "=r" (dst) \ | ||
39 | : "0" (dst), "r" (a1), "r" (a2)) | ||
40 | |||
41 | #define PUT_BLOCK_4(dst) \ | ||
42 | __asm__ __volatile__("stmia %0!, {%2, %3, %4, %5}" \ | ||
43 | : "=r" (dst) \ | ||
44 | : "0" (dst), "r" (a1), "r" (a2), "r" (a3), "r" (a4)) | ||
45 | |||
46 | static void | ||
47 | xor_arm4regs_2(unsigned long bytes, unsigned long *p1, unsigned long *p2) | ||
48 | { | ||
49 | unsigned int lines = bytes / sizeof(unsigned long) / 4; | ||
50 | register unsigned int a1 __asm__("r4"); | ||
51 | register unsigned int a2 __asm__("r5"); | ||
52 | register unsigned int a3 __asm__("r6"); | ||
53 | register unsigned int a4 __asm__("r7"); | ||
54 | register unsigned int b1 __asm__("r8"); | ||
55 | register unsigned int b2 __asm__("r9"); | ||
56 | register unsigned int b3 __asm__("ip"); | ||
57 | register unsigned int b4 __asm__("lr"); | ||
58 | |||
59 | do { | ||
60 | GET_BLOCK_4(p1); | ||
61 | XOR_BLOCK_4(p2); | ||
62 | PUT_BLOCK_4(p1); | ||
63 | } while (--lines); | ||
64 | } | ||
65 | |||
66 | static void | ||
67 | xor_arm4regs_3(unsigned long bytes, unsigned long *p1, unsigned long *p2, | ||
68 | unsigned long *p3) | ||
69 | { | ||
70 | unsigned int lines = bytes / sizeof(unsigned long) / 4; | ||
71 | register unsigned int a1 __asm__("r4"); | ||
72 | register unsigned int a2 __asm__("r5"); | ||
73 | register unsigned int a3 __asm__("r6"); | ||
74 | register unsigned int a4 __asm__("r7"); | ||
75 | register unsigned int b1 __asm__("r8"); | ||
76 | register unsigned int b2 __asm__("r9"); | ||
77 | register unsigned int b3 __asm__("ip"); | ||
78 | register unsigned int b4 __asm__("lr"); | ||
79 | |||
80 | do { | ||
81 | GET_BLOCK_4(p1); | ||
82 | XOR_BLOCK_4(p2); | ||
83 | XOR_BLOCK_4(p3); | ||
84 | PUT_BLOCK_4(p1); | ||
85 | } while (--lines); | ||
86 | } | ||
87 | |||
88 | static void | ||
89 | xor_arm4regs_4(unsigned long bytes, unsigned long *p1, unsigned long *p2, | ||
90 | unsigned long *p3, unsigned long *p4) | ||
91 | { | ||
92 | unsigned int lines = bytes / sizeof(unsigned long) / 2; | ||
93 | register unsigned int a1 __asm__("r8"); | ||
94 | register unsigned int a2 __asm__("r9"); | ||
95 | register unsigned int b1 __asm__("ip"); | ||
96 | register unsigned int b2 __asm__("lr"); | ||
97 | |||
98 | do { | ||
99 | GET_BLOCK_2(p1); | ||
100 | XOR_BLOCK_2(p2); | ||
101 | XOR_BLOCK_2(p3); | ||
102 | XOR_BLOCK_2(p4); | ||
103 | PUT_BLOCK_2(p1); | ||
104 | } while (--lines); | ||
105 | } | ||
106 | |||
107 | static void | ||
108 | xor_arm4regs_5(unsigned long bytes, unsigned long *p1, unsigned long *p2, | ||
109 | unsigned long *p3, unsigned long *p4, unsigned long *p5) | ||
110 | { | ||
111 | unsigned int lines = bytes / sizeof(unsigned long) / 2; | ||
112 | register unsigned int a1 __asm__("r8"); | ||
113 | register unsigned int a2 __asm__("r9"); | ||
114 | register unsigned int b1 __asm__("ip"); | ||
115 | register unsigned int b2 __asm__("lr"); | ||
116 | |||
117 | do { | ||
118 | GET_BLOCK_2(p1); | ||
119 | XOR_BLOCK_2(p2); | ||
120 | XOR_BLOCK_2(p3); | ||
121 | XOR_BLOCK_2(p4); | ||
122 | XOR_BLOCK_2(p5); | ||
123 | PUT_BLOCK_2(p1); | ||
124 | } while (--lines); | ||
125 | } | ||
126 | |||
127 | static struct xor_block_template xor_block_arm4regs = { | ||
128 | .name = "arm4regs", | ||
129 | .do_2 = xor_arm4regs_2, | ||
130 | .do_3 = xor_arm4regs_3, | ||
131 | .do_4 = xor_arm4regs_4, | ||
132 | .do_5 = xor_arm4regs_5, | ||
133 | }; | ||
134 | |||
135 | #undef XOR_TRY_TEMPLATES | ||
136 | #define XOR_TRY_TEMPLATES \ | ||
137 | do { \ | ||
138 | xor_speed(&xor_block_arm4regs); \ | ||
139 | xor_speed(&xor_block_8regs); \ | ||
140 | xor_speed(&xor_block_32regs); \ | ||
141 | } while (0) | ||
diff --git a/include/asm-avr32/thread_info.h b/include/asm-avr32/thread_info.h index a2e606dd4f4a..17dacf3f36d3 100644 --- a/include/asm-avr32/thread_info.h +++ b/include/asm-avr32/thread_info.h | |||
@@ -74,20 +74,18 @@ static inline struct thread_info *current_thread_info(void) | |||
74 | * - other flags in MSW | 74 | * - other flags in MSW |
75 | */ | 75 | */ |
76 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ | 76 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ |
77 | #define TIF_NOTIFY_RESUME 1 /* resumption notification requested */ | 77 | #define TIF_SIGPENDING 1 /* signal pending */ |
78 | #define TIF_SIGPENDING 2 /* signal pending */ | 78 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ |
79 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ | 79 | #define TIF_POLLING_NRFLAG 3 /* true if poll_idle() is polling |
80 | #define TIF_POLLING_NRFLAG 4 /* true if poll_idle() is polling | ||
81 | TIF_NEED_RESCHED */ | 80 | TIF_NEED_RESCHED */ |
82 | #define TIF_BREAKPOINT 5 /* true if we should break after return */ | 81 | #define TIF_BREAKPOINT 4 /* true if we should break after return */ |
83 | #define TIF_SINGLE_STEP 6 /* single step after next break */ | 82 | #define TIF_SINGLE_STEP 5 /* single step after next break */ |
84 | #define TIF_MEMDIE 7 | 83 | #define TIF_MEMDIE 6 |
85 | #define TIF_RESTORE_SIGMASK 8 /* restore signal mask in do_signal */ | 84 | #define TIF_RESTORE_SIGMASK 7 /* restore signal mask in do_signal */ |
86 | #define TIF_CPU_GOING_TO_SLEEP 9 /* CPU is entering sleep 0 mode */ | 85 | #define TIF_CPU_GOING_TO_SLEEP 8 /* CPU is entering sleep 0 mode */ |
87 | #define TIF_USERSPACE 31 /* true if FS sets userspace */ | 86 | #define TIF_USERSPACE 31 /* true if FS sets userspace */ |
88 | 87 | ||
89 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) | 88 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) |
90 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) | ||
91 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) | 89 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) |
92 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) | 90 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) |
93 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) | 91 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) |
diff --git a/include/asm-blackfin/bfin-global.h b/include/asm-blackfin/bfin-global.h index c4d6cbbf96d4..a970781a0f98 100644 --- a/include/asm-blackfin/bfin-global.h +++ b/include/asm-blackfin/bfin-global.h | |||
@@ -61,6 +61,7 @@ extern void bfin_dcache_init(void); | |||
61 | extern int read_iloc(void); | 61 | extern int read_iloc(void); |
62 | extern int bfin_console_init(void); | 62 | extern int bfin_console_init(void); |
63 | extern asmlinkage void lower_to_irq14(void); | 63 | extern asmlinkage void lower_to_irq14(void); |
64 | extern void init_exception_vectors(void); | ||
64 | extern void init_dma(void); | 65 | extern void init_dma(void); |
65 | extern void program_IAR(void); | 66 | extern void program_IAR(void); |
66 | extern void evt14_softirq(void); | 67 | extern void evt14_softirq(void); |
diff --git a/include/asm-blackfin/mach-bf548/cdefBF54x_base.h b/include/asm-blackfin/mach-bf548/cdefBF54x_base.h index 98d35a929116..cdf29e75ea59 100644 --- a/include/asm-blackfin/mach-bf548/cdefBF54x_base.h +++ b/include/asm-blackfin/mach-bf548/cdefBF54x_base.h | |||
@@ -242,6 +242,39 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
242 | #define bfin_read_TWI0_RCV_DATA16() bfin_read16(TWI0_RCV_DATA16) | 242 | #define bfin_read_TWI0_RCV_DATA16() bfin_read16(TWI0_RCV_DATA16) |
243 | #define bfin_write_TWI0_RCV_DATA16(val) bfin_write16(TWI0_RCV_DATA16, val) | 243 | #define bfin_write_TWI0_RCV_DATA16(val) bfin_write16(TWI0_RCV_DATA16, val) |
244 | 244 | ||
245 | #define bfin_read_TWI_CLKDIV() bfin_read16(TWI0_CLKDIV) | ||
246 | #define bfin_write_TWI_CLKDIV(val) bfin_write16(TWI0_CLKDIV, val) | ||
247 | #define bfin_read_TWI_CONTROL() bfin_read16(TWI0_CONTROL) | ||
248 | #define bfin_write_TWI_CONTROL(val) bfin_write16(TWI0_CONTROL, val) | ||
249 | #define bfin_read_TWI_SLAVE_CTRL() bfin_read16(TWI0_SLAVE_CTRL) | ||
250 | #define bfin_write_TWI_SLAVE_CTRL(val) bfin_write16(TWI0_SLAVE_CTRL, val) | ||
251 | #define bfin_read_TWI_SLAVE_STAT() bfin_read16(TWI0_SLAVE_STAT) | ||
252 | #define bfin_write_TWI_SLAVE_STAT(val) bfin_write16(TWI0_SLAVE_STAT, val) | ||
253 | #define bfin_read_TWI_SLAVE_ADDR() bfin_read16(TWI0_SLAVE_ADDR) | ||
254 | #define bfin_write_TWI_SLAVE_ADDR(val) bfin_write16(TWI0_SLAVE_ADDR, val) | ||
255 | #define bfin_read_TWI_MASTER_CTL() bfin_read16(TWI0_MASTER_CTRL) | ||
256 | #define bfin_write_TWI_MASTER_CTL(val) bfin_write16(TWI0_MASTER_CTRL, val) | ||
257 | #define bfin_read_TWI_MASTER_STAT() bfin_read16(TWI0_MASTER_STAT) | ||
258 | #define bfin_write_TWI_MASTER_STAT(val) bfin_write16(TWI0_MASTER_STAT, val) | ||
259 | #define bfin_read_TWI_MASTER_ADDR() bfin_read16(TWI0_MASTER_ADDR) | ||
260 | #define bfin_write_TWI_MASTER_ADDR(val) bfin_write16(TWI0_MASTER_ADDR, val) | ||
261 | #define bfin_read_TWI_INT_STAT() bfin_read16(TWI0_INT_STAT) | ||
262 | #define bfin_write_TWI_INT_STAT(val) bfin_write16(TWI0_INT_STAT, val) | ||
263 | #define bfin_read_TWI_INT_MASK() bfin_read16(TWI0_INT_MASK) | ||
264 | #define bfin_write_TWI_INT_MASK(val) bfin_write16(TWI0_INT_MASK, val) | ||
265 | #define bfin_read_TWI_FIFO_CTL() bfin_read16(TWI0_FIFO_CTRL) | ||
266 | #define bfin_write_TWI_FIFO_CTL(val) bfin_write16(TWI0_FIFO_CTRL, val) | ||
267 | #define bfin_read_TWI_FIFO_STAT() bfin_read16(TWI0_FIFO_STAT) | ||
268 | #define bfin_write_TWI_FIFO_STAT(val) bfin_write16(TWI0_FIFO_STAT, val) | ||
269 | #define bfin_read_TWI_XMT_DATA8() bfin_read16(TWI0_XMT_DATA8) | ||
270 | #define bfin_write_TWI_XMT_DATA8(val) bfin_write16(TWI0_XMT_DATA8, val) | ||
271 | #define bfin_read_TWI_XMT_DATA16() bfin_read16(TWI0_XMT_DATA16) | ||
272 | #define bfin_write_TWI_XMT_DATA16(val) bfin_write16(TWI0_XMT_DATA16, val) | ||
273 | #define bfin_read_TWI_RCV_DATA8() bfin_read16(TWI0_RCV_DATA8) | ||
274 | #define bfin_write_TWI_RCV_DATA8(val) bfin_write16(TWI0_RCV_DATA8, val) | ||
275 | #define bfin_read_TWI_RCV_DATA16() bfin_read16(TWI0_RCV_DATA16) | ||
276 | #define bfin_write_TWI_RCV_DATA16(val) bfin_write16(TWI0_RCV_DATA16, val) | ||
277 | |||
245 | /* SPORT0 is not defined in the shared file because it is not available on the ADSP-BF542 and ADSP-BF544 bfin_read_()rocessors */ | 278 | /* SPORT0 is not defined in the shared file because it is not available on the ADSP-BF542 and ADSP-BF544 bfin_read_()rocessors */ |
246 | 279 | ||
247 | /* SPORT1 Registers */ | 280 | /* SPORT1 Registers */ |
diff --git a/include/asm-blackfin/mach-bf548/irq.h b/include/asm-blackfin/mach-bf548/irq.h index 0b3325bb1fff..e548d3cd81e3 100644 --- a/include/asm-blackfin/mach-bf548/irq.h +++ b/include/asm-blackfin/mach-bf548/irq.h | |||
@@ -112,6 +112,7 @@ Events (highest priority) EMU 0 | |||
112 | #define IRQ_ATAPI_TX BFIN_IRQ(44) /* ATAPI TX (DMA11) Interrupt */ | 112 | #define IRQ_ATAPI_TX BFIN_IRQ(44) /* ATAPI TX (DMA11) Interrupt */ |
113 | #define IRQ_TWI0 BFIN_IRQ(45) /* TWI0 Interrupt */ | 113 | #define IRQ_TWI0 BFIN_IRQ(45) /* TWI0 Interrupt */ |
114 | #define IRQ_TWI1 BFIN_IRQ(46) /* TWI1 Interrupt */ | 114 | #define IRQ_TWI1 BFIN_IRQ(46) /* TWI1 Interrupt */ |
115 | #define IRQ_TWI IRQ_TWI0 /* TWI Interrupt */ | ||
115 | #define IRQ_CAN0_RX BFIN_IRQ(47) /* CAN0 Receive Interrupt */ | 116 | #define IRQ_CAN0_RX BFIN_IRQ(47) /* CAN0 Receive Interrupt */ |
116 | #define IRQ_CAN0_TX BFIN_IRQ(48) /* CAN0 Transmit Interrupt */ | 117 | #define IRQ_CAN0_TX BFIN_IRQ(48) /* CAN0 Transmit Interrupt */ |
117 | #define IRQ_MDMAS2 BFIN_IRQ(49) /* MDMA Stream 2 Interrupt */ | 118 | #define IRQ_MDMAS2 BFIN_IRQ(49) /* MDMA Stream 2 Interrupt */ |
diff --git a/include/asm-blackfin/mach-bf561/cdefBF561.h b/include/asm-blackfin/mach-bf561/cdefBF561.h index 1a8ec9e46922..6e87ab269ffe 100644 --- a/include/asm-blackfin/mach-bf561/cdefBF561.h +++ b/include/asm-blackfin/mach-bf561/cdefBF561.h | |||
@@ -81,6 +81,12 @@ static __inline__ void bfin_write_VR_CTL(unsigned int val) | |||
81 | #define bfin_write_PLL_LOCKCNT(val) bfin_write16(PLL_LOCKCNT,val) | 81 | #define bfin_write_PLL_LOCKCNT(val) bfin_write16(PLL_LOCKCNT,val) |
82 | #define bfin_read_CHIPID() bfin_read32(CHIPID) | 82 | #define bfin_read_CHIPID() bfin_read32(CHIPID) |
83 | 83 | ||
84 | /* For MMR's that are reserved on Core B, set up defines to better integrate with other ports */ | ||
85 | #define bfin_read_SWRST() bfin_read_SICA_SWRST() | ||
86 | #define bfin_write_SWRST() bfin_write_SICA_SWRST() | ||
87 | #define bfin_read_SYSCR() bfin_read_SICA_SYSCR() | ||
88 | #define bfin_write_SYSCR() bfin_write_SICA_SYSCR() | ||
89 | |||
84 | /* System Reset and Interrupt Controller registers for core A (0xFFC0 0100-0xFFC0 01FF) */ | 90 | /* System Reset and Interrupt Controller registers for core A (0xFFC0 0100-0xFFC0 01FF) */ |
85 | #define bfin_read_SICA_SWRST() bfin_read16(SICA_SWRST) | 91 | #define bfin_read_SICA_SWRST() bfin_read16(SICA_SWRST) |
86 | #define bfin_write_SICA_SWRST(val) bfin_write16(SICA_SWRST,val) | 92 | #define bfin_write_SICA_SWRST(val) bfin_write16(SICA_SWRST,val) |
diff --git a/include/asm-blackfin/mach-bf561/defBF561.h b/include/asm-blackfin/mach-bf561/defBF561.h index 89150ecb909d..0f2dc6e6335b 100644 --- a/include/asm-blackfin/mach-bf561/defBF561.h +++ b/include/asm-blackfin/mach-bf561/defBF561.h | |||
@@ -52,6 +52,10 @@ | |||
52 | #define PLL_LOCKCNT 0xFFC00010 /* PLL Lock Count register (16-bit) */ | 52 | #define PLL_LOCKCNT 0xFFC00010 /* PLL Lock Count register (16-bit) */ |
53 | #define CHIPID 0xFFC00014 /* Chip ID Register */ | 53 | #define CHIPID 0xFFC00014 /* Chip ID Register */ |
54 | 54 | ||
55 | /* For MMR's that are reserved on Core B, set up defines to better integrate with other ports */ | ||
56 | #define SWRST SICA_SWRST | ||
57 | #define SYSCR SICA_SYSCR | ||
58 | |||
55 | /* System Reset and Interrupt Controller registers for core A (0xFFC0 0100-0xFFC0 01FF) */ | 59 | /* System Reset and Interrupt Controller registers for core A (0xFFC0 0100-0xFFC0 01FF) */ |
56 | #define SICA_SWRST 0xFFC00100 /* Software Reset register */ | 60 | #define SICA_SWRST 0xFFC00100 /* Software Reset register */ |
57 | #define SICA_SYSCR 0xFFC00104 /* System Reset Configuration register */ | 61 | #define SICA_SYSCR 0xFFC00104 /* System Reset Configuration register */ |
diff --git a/include/asm-blackfin/thread_info.h b/include/asm-blackfin/thread_info.h index fa8f08cf283e..15b99cf4f50b 100644 --- a/include/asm-blackfin/thread_info.h +++ b/include/asm-blackfin/thread_info.h | |||
@@ -39,6 +39,11 @@ | |||
39 | */ | 39 | */ |
40 | #define ALIGN_PAGE_MASK 0xffffe000 | 40 | #define ALIGN_PAGE_MASK 0xffffe000 |
41 | 41 | ||
42 | /* | ||
43 | * Size of kernel stack for each process. This must be a power of 2... | ||
44 | */ | ||
45 | #define THREAD_SIZE 8192 /* 2 pages */ | ||
46 | |||
42 | #ifndef __ASSEMBLY__ | 47 | #ifndef __ASSEMBLY__ |
43 | 48 | ||
44 | typedef unsigned long mm_segment_t; | 49 | typedef unsigned long mm_segment_t; |
@@ -76,11 +81,6 @@ struct thread_info { | |||
76 | #define init_thread_info (init_thread_union.thread_info) | 81 | #define init_thread_info (init_thread_union.thread_info) |
77 | #define init_stack (init_thread_union.stack) | 82 | #define init_stack (init_thread_union.stack) |
78 | 83 | ||
79 | /* | ||
80 | * Size of kernel stack for each process. This must be a power of 2... | ||
81 | */ | ||
82 | #define THREAD_SIZE 8192 /* 2 pages */ | ||
83 | |||
84 | /* How to get the thread information struct from C */ | 84 | /* How to get the thread information struct from C */ |
85 | 85 | ||
86 | static inline struct thread_info *current_thread_info(void) | 86 | static inline struct thread_info *current_thread_info(void) |
@@ -94,7 +94,7 @@ static inline struct thread_info *current_thread_info(void) | |||
94 | struct thread_info *ti; | 94 | struct thread_info *ti; |
95 | __asm__("%0 = sp;": "=&d"(ti): | 95 | __asm__("%0 = sp;": "=&d"(ti): |
96 | ); | 96 | ); |
97 | return (struct thread_info *)((long)ti & ~8191UL); | 97 | return (struct thread_info *)((long)ti & ~((long)THREAD_SIZE-1)); |
98 | } | 98 | } |
99 | 99 | ||
100 | /* thread information allocation */ | 100 | /* thread information allocation */ |
@@ -118,18 +118,16 @@ static inline struct thread_info *current_thread_info(void) | |||
118 | * thread information flag bit numbers | 118 | * thread information flag bit numbers |
119 | */ | 119 | */ |
120 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ | 120 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ |
121 | #define TIF_NOTIFY_RESUME 1 /* resumption notification requested */ | 121 | #define TIF_SIGPENDING 1 /* signal pending */ |
122 | #define TIF_SIGPENDING 2 /* signal pending */ | 122 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ |
123 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ | 123 | #define TIF_POLLING_NRFLAG 3 /* true if poll_idle() is polling |
124 | #define TIF_POLLING_NRFLAG 4 /* true if poll_idle() is polling | ||
125 | TIF_NEED_RESCHED */ | 124 | TIF_NEED_RESCHED */ |
126 | #define TIF_MEMDIE 5 | 125 | #define TIF_MEMDIE 4 |
127 | #define TIF_RESTORE_SIGMASK 6 /* restore signal mask in do_signal() */ | 126 | #define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */ |
128 | #define TIF_FREEZE 7 /* is freezing for suspend */ | 127 | #define TIF_FREEZE 6 /* is freezing for suspend */ |
129 | 128 | ||
130 | /* as above, but as bit values */ | 129 | /* as above, but as bit values */ |
131 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 130 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
132 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | ||
133 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | 131 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) |
134 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 132 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
135 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 133 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
diff --git a/include/asm-cris/thread_info.h b/include/asm-cris/thread_info.h index 7ad853c3f74e..fde39f6c49c7 100644 --- a/include/asm-cris/thread_info.h +++ b/include/asm-cris/thread_info.h | |||
@@ -79,14 +79,12 @@ struct thread_info { | |||
79 | * - other flags in MSW | 79 | * - other flags in MSW |
80 | */ | 80 | */ |
81 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ | 81 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ |
82 | #define TIF_NOTIFY_RESUME 1 /* resumption notification requested */ | 82 | #define TIF_SIGPENDING 1 /* signal pending */ |
83 | #define TIF_SIGPENDING 2 /* signal pending */ | 83 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ |
84 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ | ||
85 | #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | 84 | #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ |
86 | #define TIF_MEMDIE 17 | 85 | #define TIF_MEMDIE 17 |
87 | 86 | ||
88 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 87 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
89 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | ||
90 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | 88 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) |
91 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 89 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
92 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 90 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
diff --git a/include/asm-frv/thread_info.h b/include/asm-frv/thread_info.h index d881f518e6a9..cc5433e78b52 100644 --- a/include/asm-frv/thread_info.h +++ b/include/asm-frv/thread_info.h | |||
@@ -108,18 +108,16 @@ register struct thread_info *__current_thread_info asm("gr15"); | |||
108 | * - other flags in MSW | 108 | * - other flags in MSW |
109 | */ | 109 | */ |
110 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ | 110 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ |
111 | #define TIF_NOTIFY_RESUME 1 /* resumption notification requested */ | 111 | #define TIF_SIGPENDING 1 /* signal pending */ |
112 | #define TIF_SIGPENDING 2 /* signal pending */ | 112 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ |
113 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ | 113 | #define TIF_SINGLESTEP 3 /* restore singlestep on return to user mode */ |
114 | #define TIF_SINGLESTEP 4 /* restore singlestep on return to user mode */ | 114 | #define TIF_IRET 4 /* return with iret */ |
115 | #define TIF_IRET 5 /* return with iret */ | 115 | #define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */ |
116 | #define TIF_RESTORE_SIGMASK 6 /* restore signal mask in do_signal() */ | ||
117 | #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | 116 | #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ |
118 | #define TIF_MEMDIE 17 /* OOM killer killed process */ | 117 | #define TIF_MEMDIE 17 /* OOM killer killed process */ |
119 | #define TIF_FREEZE 18 /* freezing for suspend */ | 118 | #define TIF_FREEZE 18 /* freezing for suspend */ |
120 | 119 | ||
121 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) | 120 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) |
122 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) | ||
123 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) | 121 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) |
124 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) | 122 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) |
125 | #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) | 123 | #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) |
diff --git a/include/asm-generic/unaligned.h b/include/asm-generic/unaligned.h index 16a466e50681..2fe1b2e67f01 100644 --- a/include/asm-generic/unaligned.h +++ b/include/asm-generic/unaligned.h | |||
@@ -79,24 +79,24 @@ static inline void __ustw(__u16 val, __u16 *addr) | |||
79 | 79 | ||
80 | #define __get_unaligned(ptr, size) ({ \ | 80 | #define __get_unaligned(ptr, size) ({ \ |
81 | const void *__gu_p = ptr; \ | 81 | const void *__gu_p = ptr; \ |
82 | __u64 val; \ | 82 | __u64 __val; \ |
83 | switch (size) { \ | 83 | switch (size) { \ |
84 | case 1: \ | 84 | case 1: \ |
85 | val = *(const __u8 *)__gu_p; \ | 85 | __val = *(const __u8 *)__gu_p; \ |
86 | break; \ | 86 | break; \ |
87 | case 2: \ | 87 | case 2: \ |
88 | val = __uldw(__gu_p); \ | 88 | __val = __uldw(__gu_p); \ |
89 | break; \ | 89 | break; \ |
90 | case 4: \ | 90 | case 4: \ |
91 | val = __uldl(__gu_p); \ | 91 | __val = __uldl(__gu_p); \ |
92 | break; \ | 92 | break; \ |
93 | case 8: \ | 93 | case 8: \ |
94 | val = __uldq(__gu_p); \ | 94 | __val = __uldq(__gu_p); \ |
95 | break; \ | 95 | break; \ |
96 | default: \ | 96 | default: \ |
97 | bad_unaligned_access_length(); \ | 97 | bad_unaligned_access_length(); \ |
98 | }; \ | 98 | }; \ |
99 | (__force __typeof__(*(ptr)))val; \ | 99 | (__force __typeof__(*(ptr)))__val; \ |
100 | }) | 100 | }) |
101 | 101 | ||
102 | #define __put_unaligned(val, ptr, size) \ | 102 | #define __put_unaligned(val, ptr, size) \ |
diff --git a/include/asm-h8300/thread_info.h b/include/asm-h8300/thread_info.h index aee4009a498e..27bb95e2944c 100644 --- a/include/asm-h8300/thread_info.h +++ b/include/asm-h8300/thread_info.h | |||
@@ -86,17 +86,15 @@ static inline struct thread_info *current_thread_info(void) | |||
86 | * thread information flag bit numbers | 86 | * thread information flag bit numbers |
87 | */ | 87 | */ |
88 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ | 88 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ |
89 | #define TIF_NOTIFY_RESUME 1 /* resumption notification requested */ | 89 | #define TIF_SIGPENDING 1 /* signal pending */ |
90 | #define TIF_SIGPENDING 2 /* signal pending */ | 90 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ |
91 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ | 91 | #define TIF_POLLING_NRFLAG 3 /* true if poll_idle() is polling |
92 | #define TIF_POLLING_NRFLAG 4 /* true if poll_idle() is polling | ||
93 | TIF_NEED_RESCHED */ | 92 | TIF_NEED_RESCHED */ |
94 | #define TIF_MEMDIE 5 | 93 | #define TIF_MEMDIE 4 |
95 | #define TIF_RESTORE_SIGMASK 6 /* restore signal mask in do_signal() */ | 94 | #define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */ |
96 | 95 | ||
97 | /* as above, but as bit values */ | 96 | /* as above, but as bit values */ |
98 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 97 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
99 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | ||
100 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | 98 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) |
101 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 99 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
102 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 100 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
diff --git a/include/asm-i386/acpi.h b/include/asm-i386/acpi.h index 449f3f272e07..125179adf044 100644 --- a/include/asm-i386/acpi.h +++ b/include/asm-i386/acpi.h | |||
@@ -121,19 +121,6 @@ static inline void acpi_disable_pci(void) | |||
121 | } | 121 | } |
122 | extern int acpi_irq_balance_set(char *str); | 122 | extern int acpi_irq_balance_set(char *str); |
123 | 123 | ||
124 | #else /* !CONFIG_ACPI */ | ||
125 | |||
126 | #define acpi_lapic 0 | ||
127 | #define acpi_ioapic 0 | ||
128 | static inline void acpi_noirq_set(void) { } | ||
129 | static inline void acpi_disable_pci(void) { } | ||
130 | static inline void disable_acpi(void) { } | ||
131 | |||
132 | #endif /* !CONFIG_ACPI */ | ||
133 | |||
134 | |||
135 | #ifdef CONFIG_ACPI_SLEEP | ||
136 | |||
137 | /* routines for saving/restoring kernel state */ | 124 | /* routines for saving/restoring kernel state */ |
138 | extern int acpi_save_state_mem(void); | 125 | extern int acpi_save_state_mem(void); |
139 | extern void acpi_restore_state_mem(void); | 126 | extern void acpi_restore_state_mem(void); |
@@ -143,7 +130,15 @@ extern unsigned long acpi_wakeup_address; | |||
143 | /* early initialization routine */ | 130 | /* early initialization routine */ |
144 | extern void acpi_reserve_bootmem(void); | 131 | extern void acpi_reserve_bootmem(void); |
145 | 132 | ||
146 | #endif /*CONFIG_ACPI_SLEEP*/ | 133 | #else /* !CONFIG_ACPI */ |
134 | |||
135 | #define acpi_lapic 0 | ||
136 | #define acpi_ioapic 0 | ||
137 | static inline void acpi_noirq_set(void) { } | ||
138 | static inline void acpi_disable_pci(void) { } | ||
139 | static inline void disable_acpi(void) { } | ||
140 | |||
141 | #endif /* !CONFIG_ACPI */ | ||
147 | 142 | ||
148 | #define ARCH_HAS_POWER_INIT 1 | 143 | #define ARCH_HAS_POWER_INIT 1 |
149 | 144 | ||
diff --git a/include/asm-i386/bootparam.h b/include/asm-i386/bootparam.h index 427d8652bfde..b91b01783e4b 100644 --- a/include/asm-i386/bootparam.h +++ b/include/asm-i386/bootparam.h | |||
@@ -4,8 +4,9 @@ | |||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/screen_info.h> | 5 | #include <linux/screen_info.h> |
6 | #include <linux/apm_bios.h> | 6 | #include <linux/apm_bios.h> |
7 | #include <asm/e820.h> | ||
8 | #include <linux/edd.h> | 7 | #include <linux/edd.h> |
8 | #include <asm/e820.h> | ||
9 | #include <asm/ist.h> | ||
9 | #include <video/edid.h> | 10 | #include <video/edid.h> |
10 | 11 | ||
11 | struct setup_header { | 12 | struct setup_header { |
@@ -48,9 +49,9 @@ struct efi_info { | |||
48 | u32 _pad1; | 49 | u32 _pad1; |
49 | u32 efi_systab; | 50 | u32 efi_systab; |
50 | u32 efi_memdesc_size; | 51 | u32 efi_memdesc_size; |
51 | u32 efi_memdec_version; | 52 | u32 efi_memdesc_version; |
52 | u32 efi_memmap; | 53 | u32 efi_memmap; |
53 | u32 fi_memmap_size; | 54 | u32 efi_memmap_size; |
54 | u32 _pad2[2]; | 55 | u32 _pad2[2]; |
55 | }; | 56 | }; |
56 | 57 | ||
@@ -59,7 +60,7 @@ struct boot_params { | |||
59 | struct screen_info screen_info; /* 0x000 */ | 60 | struct screen_info screen_info; /* 0x000 */ |
60 | struct apm_bios_info apm_bios_info; /* 0x040 */ | 61 | struct apm_bios_info apm_bios_info; /* 0x040 */ |
61 | u8 _pad2[12]; /* 0x054 */ | 62 | u8 _pad2[12]; /* 0x054 */ |
62 | u32 speedstep_info[4]; /* 0x060 */ | 63 | struct ist_info ist_info; /* 0x060 */ |
63 | u8 _pad3[16]; /* 0x070 */ | 64 | u8 _pad3[16]; /* 0x070 */ |
64 | u8 hd0_info[16]; /* obsolete! */ /* 0x080 */ | 65 | u8 hd0_info[16]; /* obsolete! */ /* 0x080 */ |
65 | u8 hd1_info[16]; /* obsolete! */ /* 0x090 */ | 66 | u8 hd1_info[16]; /* obsolete! */ /* 0x090 */ |
diff --git a/include/asm-i386/e820.h b/include/asm-i386/e820.h index 43114c824608..cf67dbb1db79 100644 --- a/include/asm-i386/e820.h +++ b/include/asm-i386/e820.h | |||
@@ -47,7 +47,7 @@ extern void e820_register_memory(void); | |||
47 | extern void limit_regions(unsigned long long size); | 47 | extern void limit_regions(unsigned long long size); |
48 | extern void print_memory_map(char *who); | 48 | extern void print_memory_map(char *who); |
49 | 49 | ||
50 | #if defined(CONFIG_PM) && defined(CONFIG_SOFTWARE_SUSPEND) | 50 | #if defined(CONFIG_PM) && defined(CONFIG_HIBERNATION) |
51 | extern void e820_mark_nosave_regions(void); | 51 | extern void e820_mark_nosave_regions(void); |
52 | #else | 52 | #else |
53 | static inline void e820_mark_nosave_regions(void) | 53 | static inline void e820_mark_nosave_regions(void) |
diff --git a/include/asm-i386/ist.h b/include/asm-i386/ist.h index d13d1e68afa9..ef2003ebc6f9 100644 --- a/include/asm-i386/ist.h +++ b/include/asm-i386/ist.h | |||
@@ -19,11 +19,13 @@ | |||
19 | 19 | ||
20 | #ifdef __KERNEL__ | 20 | #ifdef __KERNEL__ |
21 | 21 | ||
22 | #include <linux/types.h> | ||
23 | |||
22 | struct ist_info { | 24 | struct ist_info { |
23 | unsigned long signature; | 25 | u32 signature; |
24 | unsigned long command; | 26 | u32 command; |
25 | unsigned long event; | 27 | u32 event; |
26 | unsigned long perf_level; | 28 | u32 perf_level; |
27 | }; | 29 | }; |
28 | 30 | ||
29 | extern struct ist_info ist_info; | 31 | extern struct ist_info ist_info; |
diff --git a/include/asm-i386/serial.h b/include/asm-i386/serial.h index 57a4306cdf63..bd67480ca109 100644 --- a/include/asm-i386/serial.h +++ b/include/asm-i386/serial.h | |||
@@ -11,3 +11,19 @@ | |||
11 | * megabits/second; but this requires the faster clock. | 11 | * megabits/second; but this requires the faster clock. |
12 | */ | 12 | */ |
13 | #define BASE_BAUD ( 1843200 / 16 ) | 13 | #define BASE_BAUD ( 1843200 / 16 ) |
14 | |||
15 | /* Standard COM flags (except for COM4, because of the 8514 problem) */ | ||
16 | #ifdef CONFIG_SERIAL_DETECT_IRQ | ||
17 | #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ) | ||
18 | #define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_AUTO_IRQ) | ||
19 | #else | ||
20 | #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) | ||
21 | #define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF | ||
22 | #endif | ||
23 | |||
24 | #define SERIAL_PORT_DFNS \ | ||
25 | /* UART CLK PORT IRQ FLAGS */ \ | ||
26 | { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \ | ||
27 | { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \ | ||
28 | { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \ | ||
29 | { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */ | ||
diff --git a/include/asm-i386/suspend.h b/include/asm-i386/suspend.h index 8dbaafe611ff..a2520732ffd6 100644 --- a/include/asm-i386/suspend.h +++ b/include/asm-i386/suspend.h | |||
@@ -21,7 +21,7 @@ struct saved_context { | |||
21 | unsigned long return_address; | 21 | unsigned long return_address; |
22 | } __attribute__((packed)); | 22 | } __attribute__((packed)); |
23 | 23 | ||
24 | #ifdef CONFIG_ACPI_SLEEP | 24 | #ifdef CONFIG_ACPI |
25 | extern unsigned long saved_eip; | 25 | extern unsigned long saved_eip; |
26 | extern unsigned long saved_esp; | 26 | extern unsigned long saved_esp; |
27 | extern unsigned long saved_ebp; | 27 | extern unsigned long saved_ebp; |
diff --git a/include/asm-i386/thread_info.h b/include/asm-i386/thread_info.h index 54424e045e01..22a8cbcd35e2 100644 --- a/include/asm-i386/thread_info.h +++ b/include/asm-i386/thread_info.h | |||
@@ -124,15 +124,14 @@ static inline struct thread_info *current_thread_info(void) | |||
124 | * - other flags in MSW | 124 | * - other flags in MSW |
125 | */ | 125 | */ |
126 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ | 126 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ |
127 | #define TIF_NOTIFY_RESUME 1 /* resumption notification requested */ | 127 | #define TIF_SIGPENDING 1 /* signal pending */ |
128 | #define TIF_SIGPENDING 2 /* signal pending */ | 128 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ |
129 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ | 129 | #define TIF_SINGLESTEP 3 /* restore singlestep on return to user mode */ |
130 | #define TIF_SINGLESTEP 4 /* restore singlestep on return to user mode */ | 130 | #define TIF_IRET 4 /* return with iret */ |
131 | #define TIF_IRET 5 /* return with iret */ | 131 | #define TIF_SYSCALL_EMU 5 /* syscall emulation active */ |
132 | #define TIF_SYSCALL_EMU 6 /* syscall emulation active */ | 132 | #define TIF_SYSCALL_AUDIT 6 /* syscall auditing active */ |
133 | #define TIF_SYSCALL_AUDIT 7 /* syscall auditing active */ | 133 | #define TIF_SECCOMP 7 /* secure computing */ |
134 | #define TIF_SECCOMP 8 /* secure computing */ | 134 | #define TIF_RESTORE_SIGMASK 8 /* restore signal mask in do_signal() */ |
135 | #define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */ | ||
136 | #define TIF_MEMDIE 16 | 135 | #define TIF_MEMDIE 16 |
137 | #define TIF_DEBUG 17 /* uses debug registers */ | 136 | #define TIF_DEBUG 17 /* uses debug registers */ |
138 | #define TIF_IO_BITMAP 18 /* uses I/O bitmap */ | 137 | #define TIF_IO_BITMAP 18 /* uses I/O bitmap */ |
@@ -140,7 +139,6 @@ static inline struct thread_info *current_thread_info(void) | |||
140 | #define TIF_NOTSC 20 /* TSC is not accessible in userland */ | 139 | #define TIF_NOTSC 20 /* TSC is not accessible in userland */ |
141 | 140 | ||
142 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 141 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
143 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | ||
144 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | 142 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) |
145 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 143 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
146 | #define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) | 144 | #define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) |
diff --git a/include/asm-ia64/acpi.h b/include/asm-ia64/acpi.h index 5b526357d178..49730ffbbae4 100644 --- a/include/asm-ia64/acpi.h +++ b/include/asm-ia64/acpi.h | |||
@@ -100,6 +100,11 @@ const char *acpi_get_sysname (void); | |||
100 | int acpi_request_vector (u32 int_type); | 100 | int acpi_request_vector (u32 int_type); |
101 | int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); | 101 | int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); |
102 | 102 | ||
103 | /* routines for saving/restoring kernel state */ | ||
104 | extern int acpi_save_state_mem(void); | ||
105 | extern void acpi_restore_state_mem(void); | ||
106 | extern unsigned long acpi_wakeup_address; | ||
107 | |||
103 | /* | 108 | /* |
104 | * Record the cpei override flag and current logical cpu. This is | 109 | * Record the cpei override flag and current logical cpu. This is |
105 | * useful for CPU removal. | 110 | * useful for CPU removal. |
diff --git a/include/asm-ia64/ia32.h b/include/asm-ia64/ia32.h index 5ff8d74c3e00..2390ee145aa1 100644 --- a/include/asm-ia64/ia32.h +++ b/include/asm-ia64/ia32.h | |||
@@ -27,11 +27,12 @@ extern int ia32_clone_tls (struct task_struct *child, struct pt_regs *childregs) | |||
27 | extern int ia32_setup_frame1 (int sig, struct k_sigaction *ka, siginfo_t *info, | 27 | extern int ia32_setup_frame1 (int sig, struct k_sigaction *ka, siginfo_t *info, |
28 | sigset_t *set, struct pt_regs *regs); | 28 | sigset_t *set, struct pt_regs *regs); |
29 | #if PAGE_SHIFT > IA32_PAGE_SHIFT | 29 | #if PAGE_SHIFT > IA32_PAGE_SHIFT |
30 | extern int ia32_copy_partial_page_list (struct task_struct *, unsigned long); | 30 | extern int ia32_copy_ia64_partial_page_list(struct task_struct *, |
31 | extern void ia32_drop_partial_page_list (struct task_struct *); | 31 | unsigned long); |
32 | extern void ia32_drop_ia64_partial_page_list(struct task_struct *); | ||
32 | #else | 33 | #else |
33 | # define ia32_copy_partial_page_list(a1, a2) 0 | 34 | # define ia32_copy_ia64_partial_page_list(a1, a2) 0 |
34 | # define ia32_drop_partial_page_list(a1) do { ; } while (0) | 35 | # define ia32_drop_ia64_partial_page_list(a1) do { ; } while (0) |
35 | #endif | 36 | #endif |
36 | 37 | ||
37 | #endif /* !__ASSEMBLY__ */ | 38 | #endif /* !__ASSEMBLY__ */ |
diff --git a/include/asm-ia64/machvec.h b/include/asm-ia64/machvec.h index ca33eb181ff2..5cf8bf1e805e 100644 --- a/include/asm-ia64/machvec.h +++ b/include/asm-ia64/machvec.h | |||
@@ -275,6 +275,7 @@ struct ia64_machine_vector { | |||
275 | 275 | ||
276 | extern struct ia64_machine_vector ia64_mv; | 276 | extern struct ia64_machine_vector ia64_mv; |
277 | extern void machvec_init (const char *name); | 277 | extern void machvec_init (const char *name); |
278 | extern void machvec_init_from_cmdline(const char *cmdline); | ||
278 | 279 | ||
279 | # else | 280 | # else |
280 | # error Unknown configuration. Update asm-ia64/machvec.h. | 281 | # error Unknown configuration. Update asm-ia64/machvec.h. |
diff --git a/include/asm-ia64/processor.h b/include/asm-ia64/processor.h index 6251c76437d2..be3b0ae43270 100644 --- a/include/asm-ia64/processor.h +++ b/include/asm-ia64/processor.h | |||
@@ -220,7 +220,7 @@ struct desc_struct { | |||
220 | 220 | ||
221 | #define TLS_SIZE (GDT_ENTRY_TLS_ENTRIES * 8) | 221 | #define TLS_SIZE (GDT_ENTRY_TLS_ENTRIES * 8) |
222 | 222 | ||
223 | struct partial_page_list; | 223 | struct ia64_partial_page_list; |
224 | #endif | 224 | #endif |
225 | 225 | ||
226 | struct thread_struct { | 226 | struct thread_struct { |
@@ -242,7 +242,7 @@ struct thread_struct { | |||
242 | __u64 fdr; /* IA32 fp except. data reg */ | 242 | __u64 fdr; /* IA32 fp except. data reg */ |
243 | __u64 old_k1; /* old value of ar.k1 */ | 243 | __u64 old_k1; /* old value of ar.k1 */ |
244 | __u64 old_iob; /* old IOBase value */ | 244 | __u64 old_iob; /* old IOBase value */ |
245 | struct partial_page_list *ppl; /* partial page list for 4K page size issue */ | 245 | struct ia64_partial_page_list *ppl; /* partial page list for 4K page size issue */ |
246 | /* cached TLS descriptors. */ | 246 | /* cached TLS descriptors. */ |
247 | struct desc_struct tls_array[GDT_ENTRY_TLS_ENTRIES]; | 247 | struct desc_struct tls_array[GDT_ENTRY_TLS_ENTRIES]; |
248 | 248 | ||
diff --git a/include/asm-ia64/smp.h b/include/asm-ia64/smp.h index c60024989ebd..6314b29e8c4d 100644 --- a/include/asm-ia64/smp.h +++ b/include/asm-ia64/smp.h | |||
@@ -116,7 +116,6 @@ max_xtp (void) | |||
116 | extern int __cpu_disable (void); | 116 | extern int __cpu_disable (void); |
117 | extern void __cpu_die (unsigned int cpu); | 117 | extern void __cpu_die (unsigned int cpu); |
118 | extern void cpu_die (void) __attribute__ ((noreturn)); | 118 | extern void cpu_die (void) __attribute__ ((noreturn)); |
119 | extern int __cpu_up (unsigned int cpu); | ||
120 | extern void __init smp_build_cpu_map(void); | 119 | extern void __init smp_build_cpu_map(void); |
121 | 120 | ||
122 | extern void __init init_smp_config (void); | 121 | extern void __init init_smp_config (void); |
diff --git a/include/asm-ia64/thread_info.h b/include/asm-ia64/thread_info.h index 7d0241db622b..d16031e72efa 100644 --- a/include/asm-ia64/thread_info.h +++ b/include/asm-ia64/thread_info.h | |||
@@ -79,13 +79,13 @@ struct thread_info { | |||
79 | * - pending work-to-be-done flags are in least-significant 16 bits, other flags | 79 | * - pending work-to-be-done flags are in least-significant 16 bits, other flags |
80 | * in top 16 bits | 80 | * in top 16 bits |
81 | */ | 81 | */ |
82 | #define TIF_NOTIFY_RESUME 0 /* resumption notification requested */ | 82 | #define TIF_SIGPENDING 0 /* signal pending */ |
83 | #define TIF_SIGPENDING 1 /* signal pending */ | 83 | #define TIF_NEED_RESCHED 1 /* rescheduling necessary */ |
84 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ | 84 | #define TIF_SYSCALL_TRACE 2 /* syscall trace active */ |
85 | #define TIF_SYSCALL_TRACE 3 /* syscall trace active */ | 85 | #define TIF_SYSCALL_AUDIT 3 /* syscall auditing active */ |
86 | #define TIF_SYSCALL_AUDIT 4 /* syscall auditing active */ | 86 | #define TIF_SINGLESTEP 4 /* restore singlestep on return to user mode */ |
87 | #define TIF_SINGLESTEP 5 /* restore singlestep on return to user mode */ | 87 | #define TIF_RESTORE_SIGMASK 5 /* restore signal mask in do_signal() */ |
88 | #define TIF_RESTORE_SIGMASK 6 /* restore signal mask in do_signal() */ | 88 | #define TIF_PERFMON_WORK 6 /* work for pfm_handle_work() */ |
89 | #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | 89 | #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ |
90 | #define TIF_MEMDIE 17 | 90 | #define TIF_MEMDIE 17 |
91 | #define TIF_MCA_INIT 18 /* this task is processing MCA or INIT */ | 91 | #define TIF_MCA_INIT 18 /* this task is processing MCA or INIT */ |
@@ -96,8 +96,8 @@ struct thread_info { | |||
96 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) | 96 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) |
97 | #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) | 97 | #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) |
98 | #define _TIF_SYSCALL_TRACEAUDIT (_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGLESTEP) | 98 | #define _TIF_SYSCALL_TRACEAUDIT (_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGLESTEP) |
99 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) | ||
100 | #define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK) | 99 | #define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK) |
100 | #define _TIF_PERFMON_WORK (1 << TIF_PERFMON_WORK) | ||
101 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) | 101 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) |
102 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) | 102 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) |
103 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) | 103 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) |
@@ -106,7 +106,9 @@ struct thread_info { | |||
106 | #define _TIF_FREEZE (1 << TIF_FREEZE) | 106 | #define _TIF_FREEZE (1 << TIF_FREEZE) |
107 | 107 | ||
108 | /* "work to do on user-return" bits */ | 108 | /* "work to do on user-return" bits */ |
109 | #define TIF_ALLWORK_MASK (_TIF_NOTIFY_RESUME|_TIF_SIGPENDING|_TIF_NEED_RESCHED|_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_RESTORE_SIGMASK) | 109 | #define TIF_ALLWORK_MASK (_TIF_SIGPENDING|_TIF_PERFMON_WORK|_TIF_SYSCALL_AUDIT|\ |
110 | _TIF_NEED_RESCHED| _TIF_SYSCALL_TRACE|\ | ||
111 | _TIF_RESTORE_SIGMASK) | ||
110 | /* like TIF_ALLWORK_BITS but sans TIF_SYSCALL_TRACE or TIF_SYSCALL_AUDIT */ | 112 | /* like TIF_ALLWORK_BITS but sans TIF_SYSCALL_TRACE or TIF_SYSCALL_AUDIT */ |
111 | #define TIF_WORK_MASK (TIF_ALLWORK_MASK&~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT)) | 113 | #define TIF_WORK_MASK (TIF_ALLWORK_MASK&~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT)) |
112 | 114 | ||
diff --git a/include/asm-m32r/thread_info.h b/include/asm-m32r/thread_info.h index 22aff3222d22..b7ccc3e68604 100644 --- a/include/asm-m32r/thread_info.h +++ b/include/asm-m32r/thread_info.h | |||
@@ -146,17 +146,15 @@ static inline unsigned int get_thread_fault_code(void) | |||
146 | * - other flags in MSW | 146 | * - other flags in MSW |
147 | */ | 147 | */ |
148 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ | 148 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ |
149 | #define TIF_NOTIFY_RESUME 1 /* resumption notification requested */ | 149 | #define TIF_SIGPENDING 1 /* signal pending */ |
150 | #define TIF_SIGPENDING 2 /* signal pending */ | 150 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ |
151 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ | 151 | #define TIF_SINGLESTEP 3 /* restore singlestep on return to user mode */ |
152 | #define TIF_SINGLESTEP 4 /* restore singlestep on return to user mode */ | 152 | #define TIF_IRET 4 /* return with iret */ |
153 | #define TIF_IRET 5 /* return with iret */ | ||
154 | #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | 153 | #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ |
155 | /* 31..28 fault code */ | 154 | /* 31..28 fault code */ |
156 | #define TIF_MEMDIE 17 | 155 | #define TIF_MEMDIE 17 |
157 | 156 | ||
158 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 157 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
159 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | ||
160 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | 158 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) |
161 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 159 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
162 | #define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) | 160 | #define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) |
diff --git a/include/asm-m68k/raw_io.h b/include/asm-m68k/raw_io.h index 91c623f0994c..d9eb9834ccc8 100644 --- a/include/asm-m68k/raw_io.h +++ b/include/asm-m68k/raw_io.h | |||
@@ -36,15 +36,15 @@ extern void __iounmap(void *addr, unsigned long size); | |||
36 | #define in_be32(addr) \ | 36 | #define in_be32(addr) \ |
37 | ({ u32 __v = (*(__force volatile u32 *) (addr)); __v; }) | 37 | ({ u32 __v = (*(__force volatile u32 *) (addr)); __v; }) |
38 | #define in_le16(addr) \ | 38 | #define in_le16(addr) \ |
39 | ({ u16 __v = le16_to_cpu(*(__force volatile u16 *) (addr)); __v; }) | 39 | ({ u16 __v = le16_to_cpu(*(__force volatile __le16 *) (addr)); __v; }) |
40 | #define in_le32(addr) \ | 40 | #define in_le32(addr) \ |
41 | ({ u32 __v = le32_to_cpu(*(__force volatile u32 *) (addr)); __v; }) | 41 | ({ u32 __v = le32_to_cpu(*(__force volatile __le32 *) (addr)); __v; }) |
42 | 42 | ||
43 | #define out_8(addr,b) (void)((*(__force volatile u8 *) (addr)) = (b)) | 43 | #define out_8(addr,b) (void)((*(__force volatile u8 *) (addr)) = (b)) |
44 | #define out_be16(addr,w) (void)((*(__force volatile u16 *) (addr)) = (w)) | 44 | #define out_be16(addr,w) (void)((*(__force volatile u16 *) (addr)) = (w)) |
45 | #define out_be32(addr,l) (void)((*(__force volatile u32 *) (addr)) = (l)) | 45 | #define out_be32(addr,l) (void)((*(__force volatile u32 *) (addr)) = (l)) |
46 | #define out_le16(addr,w) (void)((*(__force volatile u16 *) (addr)) = cpu_to_le16(w)) | 46 | #define out_le16(addr,w) (void)((*(__force volatile __le16 *) (addr)) = cpu_to_le16(w)) |
47 | #define out_le32(addr,l) (void)((*(__force volatile u32 *) (addr)) = cpu_to_le32(l)) | 47 | #define out_le32(addr,l) (void)((*(__force volatile __le32 *) (addr)) = cpu_to_le32(l)) |
48 | 48 | ||
49 | #define raw_inb in_8 | 49 | #define raw_inb in_8 |
50 | #define raw_inw in_be16 | 50 | #define raw_inw in_be16 |
diff --git a/include/asm-m68k/system.h b/include/asm-m68k/system.h index 198878b53a61..caa9b1663e45 100644 --- a/include/asm-m68k/system.h +++ b/include/asm-m68k/system.h | |||
@@ -46,6 +46,22 @@ asmlinkage void resume(void); | |||
46 | } while (0) | 46 | } while (0) |
47 | 47 | ||
48 | 48 | ||
49 | /* | ||
50 | * Force strict CPU ordering. | ||
51 | * Not really required on m68k... | ||
52 | */ | ||
53 | #define nop() do { asm volatile ("nop"); barrier(); } while (0) | ||
54 | #define mb() barrier() | ||
55 | #define rmb() barrier() | ||
56 | #define wmb() barrier() | ||
57 | #define read_barrier_depends() ((void)0) | ||
58 | #define set_mb(var, value) ({ (var) = (value); wmb(); }) | ||
59 | |||
60 | #define smp_mb() barrier() | ||
61 | #define smp_rmb() barrier() | ||
62 | #define smp_wmb() barrier() | ||
63 | #define smp_read_barrier_depends() ((void)0) | ||
64 | |||
49 | /* interrupt control.. */ | 65 | /* interrupt control.. */ |
50 | #if 0 | 66 | #if 0 |
51 | #define local_irq_enable() asm volatile ("andiw %0,%%sr": : "i" (ALLOWINT) : "memory") | 67 | #define local_irq_enable() asm volatile ("andiw %0,%%sr": : "i" (ALLOWINT) : "memory") |
@@ -70,23 +86,6 @@ static inline int irqs_disabled(void) | |||
70 | /* For spinlocks etc */ | 86 | /* For spinlocks etc */ |
71 | #define local_irq_save(x) ({ local_save_flags(x); local_irq_disable(); }) | 87 | #define local_irq_save(x) ({ local_save_flags(x); local_irq_disable(); }) |
72 | 88 | ||
73 | /* | ||
74 | * Force strict CPU ordering. | ||
75 | * Not really required on m68k... | ||
76 | */ | ||
77 | #define nop() do { asm volatile ("nop"); barrier(); } while (0) | ||
78 | #define mb() barrier() | ||
79 | #define rmb() barrier() | ||
80 | #define wmb() barrier() | ||
81 | #define read_barrier_depends() ((void)0) | ||
82 | #define set_mb(var, value) ({ (var) = (value); wmb(); }) | ||
83 | |||
84 | #define smp_mb() barrier() | ||
85 | #define smp_rmb() barrier() | ||
86 | #define smp_wmb() barrier() | ||
87 | #define smp_read_barrier_depends() ((void)0) | ||
88 | |||
89 | |||
90 | #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) | 89 | #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) |
91 | 90 | ||
92 | struct __xchg_dummy { unsigned long a[100]; }; | 91 | struct __xchg_dummy { unsigned long a[100]; }; |
diff --git a/include/asm-m68knommu/hardirq.h b/include/asm-m68knommu/hardirq.h index 980075bab792..bfad28149a49 100644 --- a/include/asm-m68knommu/hardirq.h +++ b/include/asm-m68knommu/hardirq.h | |||
@@ -22,4 +22,6 @@ typedef struct { | |||
22 | # error HARDIRQ_BITS is too low! | 22 | # error HARDIRQ_BITS is too low! |
23 | #endif | 23 | #endif |
24 | 24 | ||
25 | void ack_bad_irq(unsigned int irq); | ||
26 | |||
25 | #endif /* __M68K_HARDIRQ_H */ | 27 | #endif /* __M68K_HARDIRQ_H */ |
diff --git a/include/asm-m68knommu/hw_irq.h b/include/asm-m68knommu/hw_irq.h new file mode 100644 index 000000000000..f3ec9e5ae049 --- /dev/null +++ b/include/asm-m68knommu/hw_irq.h | |||
@@ -0,0 +1,4 @@ | |||
1 | #ifndef __M68KNOMMU_HW_IRQ_H__ | ||
2 | #define __M68KNOMMU_HW_IRQ_H__ | ||
3 | |||
4 | #endif /* __M68KNOMMU_HW_IRQ_H__ */ | ||
diff --git a/include/asm-m68knommu/machdep.h b/include/asm-m68knommu/machdep.h index 6ce28f8e0ead..708d7863ba68 100644 --- a/include/asm-m68knommu/machdep.h +++ b/include/asm-m68knommu/machdep.h | |||
@@ -1,53 +1,21 @@ | |||
1 | #ifndef _M68KNOMMU_MACHDEP_H | 1 | #ifndef _M68KNOMMU_MACHDEP_H |
2 | #define _M68KNOMMU_MACHDEP_H | 2 | #define _M68KNOMMU_MACHDEP_H |
3 | 3 | ||
4 | #include <linux/seq_file.h> | ||
5 | #include <linux/interrupt.h> | 4 | #include <linux/interrupt.h> |
6 | 5 | ||
7 | struct pt_regs; | 6 | extern void (*mach_sched_init) (irq_handler_t handler); |
8 | struct kbd_repeat; | ||
9 | struct mktime; | ||
10 | struct hwclk_time; | ||
11 | struct gendisk; | ||
12 | struct buffer_head; | ||
13 | |||
14 | extern void (*mach_sched_init) (irqreturn_t (*handler)(int, void *, struct pt_regs *)); | ||
15 | /* machine dependent keyboard functions */ | ||
16 | extern int (*mach_keyb_init) (void); | ||
17 | extern int (*mach_kbdrate) (struct kbd_repeat *); | ||
18 | extern void (*mach_kbd_leds) (unsigned int); | ||
19 | /* machine dependent irq functions */ | ||
20 | extern void (*mach_init_IRQ) (void); | ||
21 | extern irq_handler_t mach_default_handler; | ||
22 | extern int (*mach_request_irq) (unsigned int irq, void (*handler)(int, void *, struct pt_regs *), | ||
23 | unsigned long flags, const char *devname, void *dev_id); | ||
24 | extern void (*mach_free_irq) (unsigned int irq, void *dev_id); | ||
25 | extern void (*mach_get_model) (char *model); | ||
26 | extern int (*mach_get_hardware_list) (char *buffer); | ||
27 | extern int (*mach_get_irq_list) (struct seq_file *p, void *v); | ||
28 | extern void (*mach_process_int) (int irq, struct pt_regs *fp); | ||
29 | /* machine dependent timer functions */ | 7 | /* machine dependent timer functions */ |
30 | extern unsigned long (*mach_gettimeoffset)(void); | 8 | extern unsigned long (*mach_gettimeoffset)(void); |
31 | extern void (*mach_gettod)(int *year, int *mon, int *day, int *hour, | 9 | extern void (*mach_gettod)(int *year, int *mon, int *day, int *hour, |
32 | int *min, int *sec); | 10 | int *min, int *sec); |
33 | extern int (*mach_hwclk)(int, struct hwclk_time*); | ||
34 | extern int (*mach_set_clock_mmss)(unsigned long); | 11 | extern int (*mach_set_clock_mmss)(unsigned long); |
12 | |||
13 | /* machine dependent power off functions */ | ||
35 | extern void (*mach_reset)( void ); | 14 | extern void (*mach_reset)( void ); |
36 | extern void (*mach_halt)( void ); | 15 | extern void (*mach_halt)( void ); |
37 | extern void (*mach_power_off)( void ); | 16 | extern void (*mach_power_off)( void ); |
38 | extern unsigned long (*mach_hd_init) (unsigned long, unsigned long); | ||
39 | extern void (*mach_hd_setup)(char *, int *); | ||
40 | extern long mach_max_dma_address; | ||
41 | extern void (*mach_floppy_eject)(void); | ||
42 | extern void (*mach_heartbeat) (int); | ||
43 | extern void (*mach_l2_flush) (int); | ||
44 | extern int mach_sysrq_key; | ||
45 | extern int mach_sysrq_shift_state; | ||
46 | extern int mach_sysrq_shift_mask; | ||
47 | extern char *mach_sysrq_xlate; | ||
48 | 17 | ||
49 | extern void config_BSP(char *command, int len); | 18 | extern void config_BSP(char *command, int len); |
50 | extern void (*mach_tick)(void); | 19 | extern void (*mach_tick)(void); |
51 | extern void (*mach_trap_init)(void); | ||
52 | 20 | ||
53 | #endif /* _M68KNOMMU_MACHDEP_H */ | 21 | #endif /* _M68KNOMMU_MACHDEP_H */ |
diff --git a/include/asm-m68knommu/mcfdma.h b/include/asm-m68knommu/mcfdma.h index ea729e81a6be..705c52c79cd8 100644 --- a/include/asm-m68knommu/mcfdma.h +++ b/include/asm-m68knommu/mcfdma.h | |||
@@ -133,7 +133,7 @@ | |||
133 | #define MCFDMA_DIR_ASCEN 0x0800 /* Address Sequence Complete (Completion) interrupt enable */ | 133 | #define MCFDMA_DIR_ASCEN 0x0800 /* Address Sequence Complete (Completion) interrupt enable */ |
134 | #define MCFDMA_DIR_TEEN 0x0200 /* Transfer Error interrupt enable */ | 134 | #define MCFDMA_DIR_TEEN 0x0200 /* Transfer Error interrupt enable */ |
135 | #define MCFDMA_DIR_TCEN 0x0100 /* Transfer Complete (a bus transfer, that is) interrupt enable */ | 135 | #define MCFDMA_DIR_TCEN 0x0100 /* Transfer Complete (a bus transfer, that is) interrupt enable */ |
136 | #define MCFDMA_DIR_INV 0x1000 /* Invalid Combination */ | 136 | #define MCFDMA_DIR_INV 0x0010 /* Invalid Combination */ |
137 | #define MCFDMA_DIR_ASC 0x0008 /* Address Sequence Complete (DMA Completion) */ | 137 | #define MCFDMA_DIR_ASC 0x0008 /* Address Sequence Complete (DMA Completion) */ |
138 | #define MCFDMA_DIR_TE 0x0002 /* Transfer Error */ | 138 | #define MCFDMA_DIR_TE 0x0002 /* Transfer Error */ |
139 | #define MCFDMA_DIR_TC 0x0001 /* Transfer Complete */ | 139 | #define MCFDMA_DIR_TC 0x0001 /* Transfer Complete */ |
diff --git a/include/asm-m68knommu/system.h b/include/asm-m68knommu/system.h index 5e5ed18bb78f..5da43a5d12a3 100644 --- a/include/asm-m68knommu/system.h +++ b/include/asm-m68knommu/system.h | |||
@@ -296,7 +296,7 @@ cmpxchg(volatile int *p, int old, int new) | |||
296 | ({ \ | 296 | ({ \ |
297 | unsigned char volatile *reset; \ | 297 | unsigned char volatile *reset; \ |
298 | asm("move.w #0x2700, %sr"); \ | 298 | asm("move.w #0x2700, %sr"); \ |
299 | reset = ((volatile unsigned short *)(MCF_IPSBAR + 0x110000)); \ | 299 | reset = ((volatile unsigned char *)(MCF_IPSBAR + 0x110000)); \ |
300 | while(1) \ | 300 | while(1) \ |
301 | *reset |= (0x01 << 7);\ | 301 | *reset |= (0x01 << 7);\ |
302 | }) | 302 | }) |
@@ -318,7 +318,7 @@ cmpxchg(volatile int *p, int old, int new) | |||
318 | ({ \ | 318 | ({ \ |
319 | unsigned char volatile *reset; \ | 319 | unsigned char volatile *reset; \ |
320 | asm("move.w #0x2700, %sr"); \ | 320 | asm("move.w #0x2700, %sr"); \ |
321 | reset = ((volatile unsigned short *)(MCF_IPSBAR + 0xA0000)); \ | 321 | reset = ((volatile unsigned char *)(MCF_IPSBAR + 0xA0000)); \ |
322 | while(1) \ | 322 | while(1) \ |
323 | *reset |= 0x80; \ | 323 | *reset |= 0x80; \ |
324 | }) | 324 | }) |
diff --git a/include/asm-m68knommu/thread_info.h b/include/asm-m68knommu/thread_info.h index b8f009edf2b2..95996d978bed 100644 --- a/include/asm-m68knommu/thread_info.h +++ b/include/asm-m68knommu/thread_info.h | |||
@@ -83,16 +83,14 @@ static inline struct thread_info *current_thread_info(void) | |||
83 | * thread information flag bit numbers | 83 | * thread information flag bit numbers |
84 | */ | 84 | */ |
85 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ | 85 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ |
86 | #define TIF_NOTIFY_RESUME 1 /* resumption notification requested */ | 86 | #define TIF_SIGPENDING 1 /* signal pending */ |
87 | #define TIF_SIGPENDING 2 /* signal pending */ | 87 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ |
88 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ | 88 | #define TIF_POLLING_NRFLAG 3 /* true if poll_idle() is polling |
89 | #define TIF_POLLING_NRFLAG 4 /* true if poll_idle() is polling | ||
90 | TIF_NEED_RESCHED */ | 89 | TIF_NEED_RESCHED */ |
91 | #define TIF_MEMDIE 5 | 90 | #define TIF_MEMDIE 4 |
92 | 91 | ||
93 | /* as above, but as bit values */ | 92 | /* as above, but as bit values */ |
94 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 93 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
95 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | ||
96 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | 94 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) |
97 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 95 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
98 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 96 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
diff --git a/include/asm-m68knommu/timex.h b/include/asm-m68knommu/timex.h index 85069998db52..109050f3fe91 100644 --- a/include/asm-m68knommu/timex.h +++ b/include/asm-m68knommu/timex.h | |||
@@ -1 +1,23 @@ | |||
1 | #include <asm-m68k/timex.h> | 1 | /* |
2 | * linux/include/asm-m68knommu/timex.h | ||
3 | * | ||
4 | * m68knommu architecture timex specifications | ||
5 | */ | ||
6 | #ifndef _ASM_M68KNOMMU_TIMEX_H | ||
7 | #define _ASM_M68KNOMMU_TIMEX_H | ||
8 | |||
9 | #ifdef CONFIG_COLDFIRE | ||
10 | #include <asm/coldfire.h> | ||
11 | #define CLOCK_TICK_RATE MCF_CLK | ||
12 | #else | ||
13 | #define CLOCK_TICK_RATE 1193180 /* Underlying HZ */ | ||
14 | #endif | ||
15 | |||
16 | typedef unsigned long cycles_t; | ||
17 | |||
18 | static inline cycles_t get_cycles(void) | ||
19 | { | ||
20 | return 0; | ||
21 | } | ||
22 | |||
23 | #endif | ||
diff --git a/include/asm-mips/a.out.h b/include/asm-mips/a.out.h index 1ad60ba186d0..bf55a5b34bef 100644 --- a/include/asm-mips/a.out.h +++ b/include/asm-mips/a.out.h | |||
@@ -38,7 +38,8 @@ struct exec | |||
38 | #define STACK_TOP TASK_SIZE | 38 | #define STACK_TOP TASK_SIZE |
39 | #endif | 39 | #endif |
40 | #ifdef CONFIG_64BIT | 40 | #ifdef CONFIG_64BIT |
41 | #define STACK_TOP (current->thread.mflags & MF_32BIT_ADDR ? TASK_SIZE32 : TASK_SIZE) | 41 | #define STACK_TOP \ |
42 | (test_thread_flag(TIF_32BIT_ADDR) ? TASK_SIZE32 : TASK_SIZE) | ||
42 | #endif | 43 | #endif |
43 | #define STACK_TOP_MAX TASK_SIZE | 44 | #define STACK_TOP_MAX TASK_SIZE |
44 | 45 | ||
diff --git a/include/asm-mips/bootinfo.h b/include/asm-mips/bootinfo.h index 087126a5faf9..c0f052b37b9e 100644 --- a/include/asm-mips/bootinfo.h +++ b/include/asm-mips/bootinfo.h | |||
@@ -86,16 +86,6 @@ | |||
86 | #define MACH_COBALT_27 0 /* Proto "27" hardware */ | 86 | #define MACH_COBALT_27 0 /* Proto "27" hardware */ |
87 | 87 | ||
88 | /* | 88 | /* |
89 | * Valid machtype for group NEC DDB | ||
90 | */ | ||
91 | #define MACH_GROUP_NEC_DDB 8 /* NEC DDB */ | ||
92 | #define MACH_NEC_DDB5074 0 /* NEC DDB Vrc-5074 */ | ||
93 | #define MACH_NEC_DDB5476 1 /* NEC DDB Vrc-5476 */ | ||
94 | #define MACH_NEC_DDB5477 2 /* NEC DDB Vrc-5477 */ | ||
95 | #define MACH_NEC_ROCKHOPPER 3 /* Rockhopper base board */ | ||
96 | #define MACH_NEC_ROCKHOPPERII 4 /* Rockhopper II base board */ | ||
97 | |||
98 | /* | ||
99 | * Valid machtype for group BAGET | 89 | * Valid machtype for group BAGET |
100 | */ | 90 | */ |
101 | #define MACH_GROUP_BAGET 9 /* Baget */ | 91 | #define MACH_GROUP_BAGET 9 /* Baget */ |
@@ -145,9 +135,6 @@ | |||
145 | #define MACH_TOSHIBA_RBTX4937 5 | 135 | #define MACH_TOSHIBA_RBTX4937 5 |
146 | #define MACH_TOSHIBA_RBTX4938 6 | 136 | #define MACH_TOSHIBA_RBTX4938 6 |
147 | 137 | ||
148 | #define GROUP_TOSHIBA_NAMES { "Pallas", "TopasCE", "JMR", "JMR TX3927", \ | ||
149 | "RBTX4927", "RBTX4937" } | ||
150 | |||
151 | /* | 138 | /* |
152 | * Valid machtype for group Alchemy | 139 | * Valid machtype for group Alchemy |
153 | */ | 140 | */ |
diff --git a/include/asm-mips/ddb5xxx/ddb5477.h b/include/asm-mips/ddb5xxx/ddb5477.h deleted file mode 100644 index 6cf177caf6d5..000000000000 --- a/include/asm-mips/ddb5xxx/ddb5477.h +++ /dev/null | |||
@@ -1,342 +0,0 @@ | |||
1 | /*********************************************************************** | ||
2 | * | ||
3 | * Copyright 2001 MontaVista Software Inc. | ||
4 | * Author: jsun@mvista.com or jsun@junsun.net | ||
5 | * | ||
6 | * include/asm-mips/ddb5xxx/ddb5477.h | ||
7 | * DDB 5477 specific definitions and macros. | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify it | ||
10 | * under the terms of the GNU General Public License as published by the | ||
11 | * Free Software Foundation; either version 2 of the License, or (at your | ||
12 | * option) any later version. | ||
13 | * | ||
14 | *********************************************************************** | ||
15 | */ | ||
16 | |||
17 | #ifndef __ASM_DDB5XXX_DDB5477_H | ||
18 | #define __ASM_DDB5XXX_DDB5477_H | ||
19 | |||
20 | #include <irq.h> | ||
21 | |||
22 | /* | ||
23 | * This contains macros that are specific to DDB5477 or renamed from | ||
24 | * DDB5476. | ||
25 | */ | ||
26 | |||
27 | /* | ||
28 | * renamed PADRs | ||
29 | */ | ||
30 | #define DDB_LCS0 DDB_DCS2 | ||
31 | #define DDB_LCS1 DDB_DCS3 | ||
32 | #define DDB_LCS2 DDB_DCS4 | ||
33 | #define DDB_VRC5477 DDB_INTCS | ||
34 | |||
35 | /* | ||
36 | * New CPU interface registers | ||
37 | */ | ||
38 | #define DDB_INTCTRL0 0x0400 /* Interrupt Control 0 */ | ||
39 | #define DDB_INTCTRL1 0x0404 /* Interrupt Control 1 */ | ||
40 | #define DDB_INTCTRL2 0x0408 /* Interrupt Control 2 */ | ||
41 | #define DDB_INTCTRL3 0x040c /* Interrupt Control 3 */ | ||
42 | |||
43 | #define DDB_INT0STAT 0x0420 /* INT0 Status [R] */ | ||
44 | #define DDB_INT1STAT 0x0428 /* INT1 Status [R] */ | ||
45 | #define DDB_INT2STAT 0x0430 /* INT2 Status [R] */ | ||
46 | #define DDB_INT3STAT 0x0438 /* INT3 Status [R] */ | ||
47 | #define DDB_INT4STAT 0x0440 /* INT4 Status [R] */ | ||
48 | #define DDB_NMISTAT 0x0450 /* NMI Status [R] */ | ||
49 | |||
50 | #define DDB_INTCLR32 0x0468 /* Interrupt Clear */ | ||
51 | |||
52 | #define DDB_INTPPES0 0x0470 /* PCI0 Interrupt Control */ | ||
53 | #define DDB_INTPPES1 0x0478 /* PCI1 Interrupt Control */ | ||
54 | |||
55 | #undef DDB_CPUSTAT /* duplicate in Vrc-5477 */ | ||
56 | #define DDB_CPUSTAT 0x0480 /* CPU Status [R] */ | ||
57 | #define DDB_BUSCTRL 0x0488 /* Internal Bus Control */ | ||
58 | |||
59 | |||
60 | /* | ||
61 | * Timer registers | ||
62 | */ | ||
63 | #define DDB_REFCTRL_L DDB_T0CTRL | ||
64 | #define DDB_REFCTRL_H (DDB_T0CTRL+4) | ||
65 | #define DDB_REFCNTR DDB_T0CNTR | ||
66 | #define DDB_SPT0CTRL_L DDB_T1CTRL | ||
67 | #define DDB_SPT0CTRL_H (DDB_T1CTRL+4) | ||
68 | #define DDB_SPT1CTRL_L DDB_T2CTRL | ||
69 | #define DDB_SPT1CTRL_H (DDB_T2CTRL+4) | ||
70 | #define DDB_SPT1CNTR DDB_T1CTRL | ||
71 | #define DDB_WDTCTRL_L DDB_T3CTRL | ||
72 | #define DDB_WDTCTRL_H (DDB_T3CTRL+4) | ||
73 | #define DDB_WDTCNTR DDB_T3CNTR | ||
74 | |||
75 | /* | ||
76 | * DMA registers are moved. We don't care about it for now. TODO. | ||
77 | */ | ||
78 | |||
79 | /* | ||
80 | * BARs for ext PCI (PCI0) | ||
81 | */ | ||
82 | #undef DDB_BARC | ||
83 | #undef DDB_BARB | ||
84 | |||
85 | #define DDB_BARC0 0x0210 /* PCI0 Control */ | ||
86 | #define DDB_BARM010 0x0218 /* PCI0 SDRAM bank01 */ | ||
87 | #define DDB_BARM230 0x0220 /* PCI0 SDRAM bank23 */ | ||
88 | #define DDB_BAR00 0x0240 /* PCI0 LDCS0 */ | ||
89 | #define DDB_BAR10 0x0248 /* PCI0 LDCS1 */ | ||
90 | #define DDB_BAR20 0x0250 /* PCI0 LDCS2 */ | ||
91 | #define DDB_BAR30 0x0258 /* PCI0 LDCS3 */ | ||
92 | #define DDB_BAR40 0x0260 /* PCI0 LDCS4 */ | ||
93 | #define DDB_BAR50 0x0268 /* PCI0 LDCS5 */ | ||
94 | #define DDB_BARB0 0x0280 /* PCI0 BOOT */ | ||
95 | #define DDB_BARP00 0x0290 /* PCI0 for IOPCI Window0 */ | ||
96 | #define DDB_BARP10 0x0298 /* PCI0 for IOPCI Window1 */ | ||
97 | |||
98 | /* | ||
99 | * BARs for IOPIC (PCI1) | ||
100 | */ | ||
101 | #define DDB_BARC1 0x0610 /* PCI1 Control */ | ||
102 | #define DDB_BARM011 0x0618 /* PCI1 SDRAM bank01 */ | ||
103 | #define DDB_BARM231 0x0620 /* PCI1 SDRAM bank23 */ | ||
104 | #define DDB_BAR01 0x0640 /* PCI1 LDCS0 */ | ||
105 | #define DDB_BAR11 0x0648 /* PCI1 LDCS1 */ | ||
106 | #define DDB_BAR21 0x0650 /* PCI1 LDCS2 */ | ||
107 | #define DDB_BAR31 0x0658 /* PCI1 LDCS3 */ | ||
108 | #define DDB_BAR41 0x0660 /* PCI1 LDCS4 */ | ||
109 | #define DDB_BAR51 0x0668 /* PCI1 LDCS5 */ | ||
110 | #define DDB_BARB1 0x0680 /* PCI1 BOOT */ | ||
111 | #define DDB_BARP01 0x0690 /* PCI1 for ext PCI Window0 */ | ||
112 | #define DDB_BARP11 0x0698 /* PCI1 for ext PCI Window1 */ | ||
113 | |||
114 | /* | ||
115 | * Other registers for ext PCI (PCI0) | ||
116 | */ | ||
117 | #define DDB_PCIINIT00 0x02f0 /* PCI0 Initiator 0 */ | ||
118 | #define DDB_PCIINIT10 0x02f8 /* PCI0 Initiator 1 */ | ||
119 | |||
120 | #define DDB_PCISWP0 0x02b0 /* PCI0 Swap */ | ||
121 | #define DDB_PCIERR0 0x02b8 /* PCI0 Error */ | ||
122 | |||
123 | #define DDB_PCICTL0_L 0x02e0 /* PCI0 Control-L */ | ||
124 | #define DDB_PCICTL0_H 0x02e4 /* PCI0 Control-H */ | ||
125 | #define DDB_PCIARB0_L 0x02e8 /* PCI0 Arbitration-L */ | ||
126 | #define DDB_PCIARB0_H 0x02ec /* PCI0 Arbitration-H */ | ||
127 | |||
128 | /* | ||
129 | * Other registers for IOPCI (PCI1) | ||
130 | */ | ||
131 | #define DDB_IOPCIW0 0x00d0 /* PCI Address Window 0 [R/W] */ | ||
132 | #define DDB_IOPCIW1 0x00d8 /* PCI Address Window 1 [R/W] */ | ||
133 | |||
134 | #define DDB_PCIINIT01 0x06f0 /* PCI1 Initiator 0 */ | ||
135 | #define DDB_PCIINIT11 0x06f8 /* PCI1 Initiator 1 */ | ||
136 | |||
137 | #define DDB_PCISWP1 0x06b0 /* PCI1 Swap */ | ||
138 | #define DDB_PCIERR1 0x06b8 /* PCI1 Error */ | ||
139 | |||
140 | #define DDB_PCICTL1_L 0x06e0 /* PCI1 Control-L */ | ||
141 | #define DDB_PCICTL1_H 0x06e4 /* PCI1 Control-H */ | ||
142 | #define DDB_PCIARB1_L 0x06e8 /* PCI1 Arbitration-L */ | ||
143 | #define DDB_PCIARB1_H 0x06ec /* PCI1 Arbitration-H */ | ||
144 | |||
145 | /* | ||
146 | * Local Bus | ||
147 | */ | ||
148 | #define DDB_LCST0 0x0110 /* LB Chip Select Timing 0 */ | ||
149 | #define DDB_LCST1 0x0118 /* LB Chip Select Timing 1 */ | ||
150 | #undef DDB_LCST2 | ||
151 | #define DDB_LCST2 0x0120 /* LB Chip Select Timing 2 */ | ||
152 | #undef DDB_LCST3 | ||
153 | #undef DDB_LCST4 | ||
154 | #undef DDB_LCST5 | ||
155 | #undef DDB_LCST6 | ||
156 | #undef DDB_LCST7 | ||
157 | #undef DDB_LCST8 | ||
158 | #define DDB_ERRADR 0x0150 /* Error Address Register */ | ||
159 | #define DDB_ERRCS 0x0160 | ||
160 | #define DDB_BTM 0x0170 /* Boot Time Mode value */ | ||
161 | |||
162 | /* | ||
163 | * MISC registers | ||
164 | */ | ||
165 | #define DDB_GIUFUNSEL 0x4040 /* select dual-func pins */ | ||
166 | #define DDB_PIBMISC 0x0750 /* USB buffer enable / power saving */ | ||
167 | |||
168 | /* | ||
169 | * Memory map (physical address) | ||
170 | * | ||
171 | * Note most of the following address must be properly aligned by the | ||
172 | * corresponding size. For example, if PCI_IO_SIZE is 16MB, then | ||
173 | * PCI_IO_BASE must be aligned along 16MB boundary. | ||
174 | */ | ||
175 | |||
176 | /* the actual ram size is detected at run-time */ | ||
177 | #define DDB_SDRAM_BASE 0x00000000 | ||
178 | #define DDB_MAX_SDRAM_SIZE 0x08000000 /* less than 128MB */ | ||
179 | |||
180 | #define DDB_PCI0_MEM_BASE 0x08000000 | ||
181 | #define DDB_PCI0_MEM_SIZE 0x08000000 /* 128 MB */ | ||
182 | |||
183 | #define DDB_PCI1_MEM_BASE 0x10000000 | ||
184 | #define DDB_PCI1_MEM_SIZE 0x08000000 /* 128 MB */ | ||
185 | |||
186 | #define DDB_PCI0_CONFIG_BASE 0x18000000 | ||
187 | #define DDB_PCI0_CONFIG_SIZE 0x01000000 /* 16 MB */ | ||
188 | |||
189 | #define DDB_PCI1_CONFIG_BASE 0x19000000 | ||
190 | #define DDB_PCI1_CONFIG_SIZE 0x01000000 /* 16 MB */ | ||
191 | |||
192 | #define DDB_PCI_IO_BASE 0x1a000000 /* we concatenate two IOs */ | ||
193 | #define DDB_PCI0_IO_BASE 0x1a000000 | ||
194 | #define DDB_PCI0_IO_SIZE 0x01000000 /* 16 MB */ | ||
195 | #define DDB_PCI1_IO_BASE 0x1b000000 | ||
196 | #define DDB_PCI1_IO_SIZE 0x01000000 /* 16 MB */ | ||
197 | |||
198 | #define DDB_LCS0_BASE 0x1c000000 /* flash memory */ | ||
199 | #define DDB_LCS0_SIZE 0x01000000 /* 16 MB */ | ||
200 | |||
201 | #define DDB_LCS1_BASE 0x1d000000 /* misc */ | ||
202 | #define DDB_LCS1_SIZE 0x01000000 /* 16 MB */ | ||
203 | |||
204 | #define DDB_LCS2_BASE 0x1e000000 /* Mezzanine */ | ||
205 | #define DDB_LCS2_SIZE 0x01000000 /* 16 MB */ | ||
206 | |||
207 | #define DDB_VRC5477_BASE 0x1fa00000 /* VRC5477 control regs */ | ||
208 | #define DDB_VRC5477_SIZE 0x00200000 /* 2MB */ | ||
209 | |||
210 | #define DDB_BOOTCS_BASE 0x1fc00000 /* Boot ROM / EPROM /Flash */ | ||
211 | #define DDB_BOOTCS_SIZE 0x00200000 /* 2 MB - doc says 4MB */ | ||
212 | |||
213 | #define DDB_LED DDB_LCS1_BASE + 0x10000 | ||
214 | |||
215 | |||
216 | /* | ||
217 | * DDB5477 specific functions | ||
218 | */ | ||
219 | #ifndef __ASSEMBLY__ | ||
220 | extern void ddb5477_irq_setup(void); | ||
221 | |||
222 | /* route irq to cpu int pin */ | ||
223 | extern void ll_vrc5477_irq_route(int vrc5477_irq, int ip); | ||
224 | |||
225 | /* low-level routine for enabling vrc5477 irq, bypassing high-level */ | ||
226 | extern void ll_vrc5477_irq_enable(int vrc5477_irq); | ||
227 | extern void ll_vrc5477_irq_disable(int vrc5477_irq); | ||
228 | #endif /* !__ASSEMBLY__ */ | ||
229 | |||
230 | /* PCI intr ack share PCIW0 with PCI IO */ | ||
231 | #define DDB_PCI_IACK_BASE DDB_PCI_IO_BASE | ||
232 | |||
233 | /* | ||
234 | * Interrupt mapping | ||
235 | * | ||
236 | * We have three interrupt controllers: | ||
237 | * | ||
238 | * . CPU itself - 8 sources | ||
239 | * . i8259 - 16 sources | ||
240 | * . vrc5477 - 32 sources | ||
241 | * | ||
242 | * They connected as follows: | ||
243 | * all vrc5477 interrupts are routed to cpu IP2 (by software setting) | ||
244 | * all i8359 are routed to INTC in vrc5477 (by hardware connection) | ||
245 | * | ||
246 | * All VRC5477 PCI interrupts are level-triggered (no ack needed). | ||
247 | * All PCI irq but INTC are active low. | ||
248 | */ | ||
249 | |||
250 | /* | ||
251 | * irq number block assignment | ||
252 | */ | ||
253 | |||
254 | #define NUM_CPU_IRQ 8 | ||
255 | #define NUM_VRC5477_IRQ 32 | ||
256 | |||
257 | #define CPU_IRQ_BASE MIPS_CPU_IRQ_BASE | ||
258 | #define VRC5477_IRQ_BASE (CPU_IRQ_BASE + NUM_CPU_IRQ) | ||
259 | |||
260 | /* | ||
261 | * vrc5477 irq defs | ||
262 | */ | ||
263 | |||
264 | #define VRC5477_IRQ_CPCE (0 + VRC5477_IRQ_BASE) /* cpu parity error */ | ||
265 | #define VRC5477_IRQ_CNTD (1 + VRC5477_IRQ_BASE) /* cpu no target */ | ||
266 | #define VRC5477_IRQ_I2C (2 + VRC5477_IRQ_BASE) /* I2C */ | ||
267 | #define VRC5477_IRQ_DMA (3 + VRC5477_IRQ_BASE) /* DMA */ | ||
268 | #define VRC5477_IRQ_UART0 (4 + VRC5477_IRQ_BASE) | ||
269 | #define VRC5477_IRQ_WDOG (5 + VRC5477_IRQ_BASE) /* watchdog timer */ | ||
270 | #define VRC5477_IRQ_SPT1 (6 + VRC5477_IRQ_BASE) /* special purpose timer 1 */ | ||
271 | #define VRC5477_IRQ_LBRT (7 + VRC5477_IRQ_BASE) /* local bus read timeout */ | ||
272 | #define VRC5477_IRQ_INTA (8 + VRC5477_IRQ_BASE) /* PCI INT #A */ | ||
273 | #define VRC5477_IRQ_INTB (9 + VRC5477_IRQ_BASE) /* PCI INT #B */ | ||
274 | #define VRC5477_IRQ_INTC (10 + VRC5477_IRQ_BASE) /* PCI INT #C */ | ||
275 | #define VRC5477_IRQ_INTD (11 + VRC5477_IRQ_BASE) /* PCI INT #D */ | ||
276 | #define VRC5477_IRQ_INTE (12 + VRC5477_IRQ_BASE) /* PCI INT #E */ | ||
277 | #define VRC5477_IRQ_RESERVED_13 (13 + VRC5477_IRQ_BASE) /* reserved */ | ||
278 | #define VRC5477_IRQ_PCIS (14 + VRC5477_IRQ_BASE) /* PCI SERR # */ | ||
279 | #define VRC5477_IRQ_PCI (15 + VRC5477_IRQ_BASE) /* PCI internal error */ | ||
280 | #define VRC5477_IRQ_IOPCI_INTA (16 + VRC5477_IRQ_BASE) /* USB-H */ | ||
281 | #define VRC5477_IRQ_IOPCI_INTB (17 + VRC5477_IRQ_BASE) /* USB-P */ | ||
282 | #define VRC5477_IRQ_IOPCI_INTC (18 + VRC5477_IRQ_BASE) /* AC97 */ | ||
283 | #define VRC5477_IRQ_IOPCI_INTD (19 + VRC5477_IRQ_BASE) /* Reserved */ | ||
284 | #define VRC5477_IRQ_UART1 (20 + VRC5477_IRQ_BASE) | ||
285 | #define VRC5477_IRQ_SPT0 (21 + VRC5477_IRQ_BASE) /* special purpose timer 0 */ | ||
286 | #define VRC5477_IRQ_GPT0 (22 + VRC5477_IRQ_BASE) /* general purpose timer 0 */ | ||
287 | #define VRC5477_IRQ_GPT1 (23 + VRC5477_IRQ_BASE) /* general purpose timer 1 */ | ||
288 | #define VRC5477_IRQ_GPT2 (24 + VRC5477_IRQ_BASE) /* general purpose timer 2 */ | ||
289 | #define VRC5477_IRQ_GPT3 (25 + VRC5477_IRQ_BASE) /* general purpose timer 3 */ | ||
290 | #define VRC5477_IRQ_GPIO (26 + VRC5477_IRQ_BASE) | ||
291 | #define VRC5477_IRQ_SIO0 (27 + VRC5477_IRQ_BASE) | ||
292 | #define VRC5477_IRQ_SIO1 (28 + VRC5477_IRQ_BASE) | ||
293 | #define VRC5477_IRQ_RESERVED_29 (29 + VRC5477_IRQ_BASE) /* reserved */ | ||
294 | #define VRC5477_IRQ_IOPCISERR (30 + VRC5477_IRQ_BASE) /* IO PCI SERR # */ | ||
295 | #define VRC5477_IRQ_IOPCI (31 + VRC5477_IRQ_BASE) | ||
296 | |||
297 | /* | ||
298 | * i2859 irq assignment | ||
299 | */ | ||
300 | #define I8259_IRQ_RESERVED_0 (0 + I8259A_IRQ_BASE) | ||
301 | #define I8259_IRQ_KEYBOARD (1 + I8259A_IRQ_BASE) /* M1543 default */ | ||
302 | #define I8259_IRQ_CASCADE (2 + I8259A_IRQ_BASE) | ||
303 | #define I8259_IRQ_UART_B (3 + I8259A_IRQ_BASE) /* M1543 default, may conflict with RTC according to schematic diagram */ | ||
304 | #define I8259_IRQ_UART_A (4 + I8259A_IRQ_BASE) /* M1543 default */ | ||
305 | #define I8259_IRQ_PARALLEL (5 + I8259A_IRQ_BASE) /* M1543 default */ | ||
306 | #define I8259_IRQ_RESERVED_6 (6 + I8259A_IRQ_BASE) | ||
307 | #define I8259_IRQ_RESERVED_7 (7 + I8259A_IRQ_BASE) | ||
308 | #define I8259_IRQ_RTC (8 + I8259A_IRQ_BASE) /* who set this? */ | ||
309 | #define I8259_IRQ_USB (9 + I8259A_IRQ_BASE) /* ddb_setup */ | ||
310 | #define I8259_IRQ_PMU (10 + I8259A_IRQ_BASE) /* ddb_setup */ | ||
311 | #define I8259_IRQ_RESERVED_11 (11 + I8259A_IRQ_BASE) | ||
312 | #define I8259_IRQ_RESERVED_12 (12 + I8259A_IRQ_BASE) /* m1543_irq_setup */ | ||
313 | #define I8259_IRQ_RESERVED_13 (13 + I8259A_IRQ_BASE) | ||
314 | #define I8259_IRQ_HDC1 (14 + I8259A_IRQ_BASE) /* default and ddb_setup */ | ||
315 | #define I8259_IRQ_HDC2 (15 + I8259A_IRQ_BASE) /* default */ | ||
316 | |||
317 | |||
318 | /* | ||
319 | * misc | ||
320 | */ | ||
321 | #define VRC5477_I8259_CASCADE (VRC5477_IRQ_INTC - VRC5477_IRQ_BASE) | ||
322 | #define CPU_VRC5477_CASCADE 2 | ||
323 | |||
324 | /* | ||
325 | * debug routines | ||
326 | */ | ||
327 | #ifndef __ASSEMBLY__ | ||
328 | #if defined(CONFIG_RUNTIME_DEBUG) | ||
329 | extern void vrc5477_show_pdar_regs(void); | ||
330 | extern void vrc5477_show_pci_regs(void); | ||
331 | extern void vrc5477_show_bar_regs(void); | ||
332 | extern void vrc5477_show_int_regs(void); | ||
333 | extern void vrc5477_show_all_regs(void); | ||
334 | #endif | ||
335 | |||
336 | /* | ||
337 | * RAM size | ||
338 | */ | ||
339 | extern int board_ram_size; | ||
340 | #endif /* !__ASSEMBLY__ */ | ||
341 | |||
342 | #endif /* __ASM_DDB5XXX_DDB5477_H */ | ||
diff --git a/include/asm-mips/ddb5xxx/ddb5xxx.h b/include/asm-mips/ddb5xxx/ddb5xxx.h deleted file mode 100644 index e97fcc8d548b..000000000000 --- a/include/asm-mips/ddb5xxx/ddb5xxx.h +++ /dev/null | |||
@@ -1,263 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2001 MontaVista Software Inc. | ||
3 | * Author: jsun@mvista.com or jsun@junsun.net | ||
4 | * | ||
5 | * Copyright (C) 2000 Geert Uytterhoeven <geert@sonycom.com> | ||
6 | * Sony Software Development Center Europe (SDCE), Brussels | ||
7 | * | ||
8 | * include/asm-mips/ddb5xxx/ddb5xxx.h | ||
9 | * Common header for all NEC DDB 5xxx boards, including 5074, 5476, 5477. | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify it | ||
12 | * under the terms of the GNU General Public License as published by the | ||
13 | * Free Software Foundation; either version 2 of the License, or (at your | ||
14 | * option) any later version. | ||
15 | * | ||
16 | */ | ||
17 | |||
18 | #ifndef __ASM_DDB5XXX_DDB5XXX_H | ||
19 | #define __ASM_DDB5XXX_DDB5XXX_H | ||
20 | |||
21 | #include <linux/types.h> | ||
22 | |||
23 | /* | ||
24 | * This file is based on the following documentation: | ||
25 | * | ||
26 | * NEC Vrc 5074 System Controller Data Sheet, June 1998 | ||
27 | * | ||
28 | * [jsun] It is modified so that this file only contains the macros | ||
29 | * that are true for all DDB 5xxx boards. The modification is based on | ||
30 | * | ||
31 | * uPD31577(VRC5477) VR5432-SDRAM/PCI Bridge (Luke) | ||
32 | * Preliminary Specification Decoment, Rev 1.1, 27 Dec, 2000 | ||
33 | * | ||
34 | */ | ||
35 | |||
36 | |||
37 | #define DDB_BASE 0xbfa00000 | ||
38 | #define DDB_SIZE 0x00200000 /* 2 MB */ | ||
39 | |||
40 | |||
41 | /* | ||
42 | * Physical Device Address Registers (PDARs) | ||
43 | */ | ||
44 | |||
45 | #define DDB_SDRAM0 0x0000 /* SDRAM Bank 0 [R/W] */ | ||
46 | #define DDB_SDRAM1 0x0008 /* SDRAM Bank 1 [R/W] */ | ||
47 | #define DDB_DCS2 0x0010 /* Device Chip-Select 2 [R/W] */ | ||
48 | #define DDB_DCS3 0x0018 /* Device Chip-Select 3 [R/W] */ | ||
49 | #define DDB_DCS4 0x0020 /* Device Chip-Select 4 [R/W] */ | ||
50 | #define DDB_DCS5 0x0028 /* Device Chip-Select 5 [R/W] */ | ||
51 | #define DDB_DCS6 0x0030 /* Device Chip-Select 6 [R/W] */ | ||
52 | #define DDB_DCS7 0x0038 /* Device Chip-Select 7 [R/W] */ | ||
53 | #define DDB_DCS8 0x0040 /* Device Chip-Select 8 [R/W] */ | ||
54 | #define DDB_PCIW0 0x0060 /* PCI Address Window 0 [R/W] */ | ||
55 | #define DDB_PCIW1 0x0068 /* PCI Address Window 1 [R/W] */ | ||
56 | #define DDB_INTCS 0x0070 /* Controller Internal Registers and Devices */ | ||
57 | /* [R/W] */ | ||
58 | #define DDB_BOOTCS 0x0078 /* Boot ROM Chip-Select [R/W] */ | ||
59 | /* Vrc5477 has two more, IOPCIW0, IOPCIW1 */ | ||
60 | |||
61 | /* | ||
62 | * CPU Interface Registers | ||
63 | */ | ||
64 | #define DDB_CPUSTAT 0x0080 /* CPU Status [R/W] */ | ||
65 | #define DDB_INTCTRL 0x0088 /* Interrupt Control [R/W] */ | ||
66 | #define DDB_INTSTAT0 0x0090 /* Interrupt Status 0 [R] */ | ||
67 | #define DDB_INTSTAT1 0x0098 /* Interrupt Status 1 and CPU Interrupt */ | ||
68 | /* Enable [R/W] */ | ||
69 | #define DDB_INTCLR 0x00A0 /* Interrupt Clear [R/W] */ | ||
70 | #define DDB_INTPPES 0x00A8 /* PCI Interrupt Control [R/W] */ | ||
71 | |||
72 | |||
73 | /* | ||
74 | * Memory-Interface Registers | ||
75 | */ | ||
76 | #define DDB_MEMCTRL 0x00C0 /* Memory Control */ | ||
77 | #define DDB_ACSTIME 0x00C8 /* Memory Access Timing [R/W] */ | ||
78 | #define DDB_CHKERR 0x00D0 /* Memory Check Error Status [R] */ | ||
79 | |||
80 | |||
81 | /* | ||
82 | * PCI-Bus Registers | ||
83 | */ | ||
84 | #define DDB_PCICTRL 0x00E0 /* PCI Control [R/W] */ | ||
85 | #define DDB_PCIARB 0x00E8 /* PCI Arbiter [R/W] */ | ||
86 | #define DDB_PCIINIT0 0x00F0 /* PCI Master (Initiator) 0 [R/W] */ | ||
87 | #define DDB_PCIINIT1 0x00F8 /* PCI Master (Initiator) 1 [R/W] */ | ||
88 | #define DDB_PCIERR 0x00B8 /* PCI Error [R/W] */ | ||
89 | |||
90 | |||
91 | /* | ||
92 | * Local-Bus Registers | ||
93 | */ | ||
94 | #define DDB_LCNFG 0x0100 /* Local Bus Configuration [R/W] */ | ||
95 | #define DDB_LCST2 0x0110 /* Local Bus Chip-Select Timing 2 [R/W] */ | ||
96 | #define DDB_LCST3 0x0118 /* Local Bus Chip-Select Timing 3 [R/W] */ | ||
97 | #define DDB_LCST4 0x0120 /* Local Bus Chip-Select Timing 4 [R/W] */ | ||
98 | #define DDB_LCST5 0x0128 /* Local Bus Chip-Select Timing 5 [R/W] */ | ||
99 | #define DDB_LCST6 0x0130 /* Local Bus Chip-Select Timing 6 [R/W] */ | ||
100 | #define DDB_LCST7 0x0138 /* Local Bus Chip-Select Timing 7 [R/W] */ | ||
101 | #define DDB_LCST8 0x0140 /* Local Bus Chip-Select Timing 8 [R/W] */ | ||
102 | #define DDB_DCSFN 0x0150 /* Device Chip-Select Muxing and Output */ | ||
103 | /* Enables [R/W] */ | ||
104 | #define DDB_DCSIO 0x0158 /* Device Chip-Selects As I/O Bits [R/W] */ | ||
105 | #define DDB_BCST 0x0178 /* Local Boot Chip-Select Timing [R/W] */ | ||
106 | |||
107 | |||
108 | /* | ||
109 | * DMA Registers | ||
110 | */ | ||
111 | #define DDB_DMACTRL0 0x0180 /* DMA Control 0 [R/W] */ | ||
112 | #define DDB_DMASRCA0 0x0188 /* DMA Source Address 0 [R/W] */ | ||
113 | #define DDB_DMADESA0 0x0190 /* DMA Destination Address 0 [R/W] */ | ||
114 | #define DDB_DMACTRL1 0x0198 /* DMA Control 1 [R/W] */ | ||
115 | #define DDB_DMASRCA1 0x01A0 /* DMA Source Address 1 [R/W] */ | ||
116 | #define DDB_DMADESA1 0x01A8 /* DMA Destination Address 1 [R/W] */ | ||
117 | |||
118 | |||
119 | /* | ||
120 | * Timer Registers | ||
121 | */ | ||
122 | #define DDB_T0CTRL 0x01C0 /* SDRAM Refresh Control [R/W] */ | ||
123 | #define DDB_T0CNTR 0x01C8 /* SDRAM Refresh Counter [R/W] */ | ||
124 | #define DDB_T1CTRL 0x01D0 /* CPU-Bus Read Time-Out Control [R/W] */ | ||
125 | #define DDB_T1CNTR 0x01D8 /* CPU-Bus Read Time-Out Counter [R/W] */ | ||
126 | #define DDB_T2CTRL 0x01E0 /* General-Purpose Timer Control [R/W] */ | ||
127 | #define DDB_T2CNTR 0x01E8 /* General-Purpose Timer Counter [R/W] */ | ||
128 | #define DDB_T3CTRL 0x01F0 /* Watchdog Timer Control [R/W] */ | ||
129 | #define DDB_T3CNTR 0x01F8 /* Watchdog Timer Counter [R/W] */ | ||
130 | |||
131 | |||
132 | /* | ||
133 | * PCI Configuration Space Registers | ||
134 | */ | ||
135 | #define DDB_PCI_BASE 0x0200 | ||
136 | |||
137 | #define DDB_VID 0x0200 /* PCI Vendor ID [R] */ | ||
138 | #define DDB_DID 0x0202 /* PCI Device ID [R] */ | ||
139 | #define DDB_PCICMD 0x0204 /* PCI Command [R/W] */ | ||
140 | #define DDB_PCISTS 0x0206 /* PCI Status [R/W] */ | ||
141 | #define DDB_REVID 0x0208 /* PCI Revision ID [R] */ | ||
142 | #define DDB_CLASS 0x0209 /* PCI Class Code [R] */ | ||
143 | #define DDB_CLSIZ 0x020C /* PCI Cache Line Size [R/W] */ | ||
144 | #define DDB_MLTIM 0x020D /* PCI Latency Timer [R/W] */ | ||
145 | #define DDB_HTYPE 0x020E /* PCI Header Type [R] */ | ||
146 | #define DDB_BIST 0x020F /* BIST [R] (unimplemented) */ | ||
147 | #define DDB_BARC 0x0210 /* PCI Base Address Register Control [R/W] */ | ||
148 | #define DDB_BAR0 0x0218 /* PCI Base Address Register 0 [R/W] */ | ||
149 | #define DDB_BAR1 0x0220 /* PCI Base Address Register 1 [R/W] */ | ||
150 | #define DDB_CIS 0x0228 /* PCI Cardbus CIS Pointer [R] */ | ||
151 | /* (unimplemented) */ | ||
152 | #define DDB_SSVID 0x022C /* PCI Sub-System Vendor ID [R/W] */ | ||
153 | #define DDB_SSID 0x022E /* PCI Sub-System ID [R/W] */ | ||
154 | #define DDB_ROM 0x0230 /* Expansion ROM Base Address [R] */ | ||
155 | /* (unimplemented) */ | ||
156 | #define DDB_INTLIN 0x023C /* PCI Interrupt Line [R/W] */ | ||
157 | #define DDB_INTPIN 0x023D /* PCI Interrupt Pin [R] */ | ||
158 | #define DDB_MINGNT 0x023E /* PCI Min_Gnt [R] (unimplemented) */ | ||
159 | #define DDB_MAXLAT 0x023F /* PCI Max_Lat [R] (unimplemented) */ | ||
160 | #define DDB_BAR2 0x0240 /* PCI Base Address Register 2 [R/W] */ | ||
161 | #define DDB_BAR3 0x0248 /* PCI Base Address Register 3 [R/W] */ | ||
162 | #define DDB_BAR4 0x0250 /* PCI Base Address Register 4 [R/W] */ | ||
163 | #define DDB_BAR5 0x0258 /* PCI Base Address Register 5 [R/W] */ | ||
164 | #define DDB_BAR6 0x0260 /* PCI Base Address Register 6 [R/W] */ | ||
165 | #define DDB_BAR7 0x0268 /* PCI Base Address Register 7 [R/W] */ | ||
166 | #define DDB_BAR8 0x0270 /* PCI Base Address Register 8 [R/W] */ | ||
167 | #define DDB_BARB 0x0278 /* PCI Base Address Register BOOT [R/W] */ | ||
168 | |||
169 | |||
170 | /* | ||
171 | * Nile 4 Register Access | ||
172 | */ | ||
173 | |||
174 | static inline void ddb_sync(void) | ||
175 | { | ||
176 | volatile u32 *p = (volatile u32 *)0xbfc00000; | ||
177 | (void)(*p); | ||
178 | } | ||
179 | |||
180 | static inline void ddb_out32(u32 offset, u32 val) | ||
181 | { | ||
182 | *(volatile u32 *)(DDB_BASE+offset) = val; | ||
183 | ddb_sync(); | ||
184 | } | ||
185 | |||
186 | static inline u32 ddb_in32(u32 offset) | ||
187 | { | ||
188 | u32 val = *(volatile u32 *)(DDB_BASE+offset); | ||
189 | ddb_sync(); | ||
190 | return val; | ||
191 | } | ||
192 | |||
193 | static inline void ddb_out16(u32 offset, u16 val) | ||
194 | { | ||
195 | *(volatile u16 *)(DDB_BASE+offset) = val; | ||
196 | ddb_sync(); | ||
197 | } | ||
198 | |||
199 | static inline u16 ddb_in16(u32 offset) | ||
200 | { | ||
201 | u16 val = *(volatile u16 *)(DDB_BASE+offset); | ||
202 | ddb_sync(); | ||
203 | return val; | ||
204 | } | ||
205 | |||
206 | static inline void ddb_out8(u32 offset, u8 val) | ||
207 | { | ||
208 | *(volatile u8 *)(DDB_BASE+offset) = val; | ||
209 | ddb_sync(); | ||
210 | } | ||
211 | |||
212 | static inline u8 ddb_in8(u32 offset) | ||
213 | { | ||
214 | u8 val = *(volatile u8 *)(DDB_BASE+offset); | ||
215 | ddb_sync(); | ||
216 | return val; | ||
217 | } | ||
218 | |||
219 | |||
220 | /* | ||
221 | * Physical Device Address Registers | ||
222 | */ | ||
223 | |||
224 | extern u32 | ||
225 | ddb_calc_pdar(u32 phys, u32 size, int width, int on_memory_bus, int pci_visible); | ||
226 | extern void | ||
227 | ddb_set_pdar(u32 pdar, u32 phys, u32 size, int width, | ||
228 | int on_memory_bus, int pci_visible); | ||
229 | |||
230 | /* | ||
231 | * PCI Master Registers | ||
232 | */ | ||
233 | |||
234 | #define DDB_PCICMD_IACK 0 /* PCI Interrupt Acknowledge */ | ||
235 | #define DDB_PCICMD_IO 1 /* PCI I/O Space */ | ||
236 | #define DDB_PCICMD_MEM 3 /* PCI Memory Space */ | ||
237 | #define DDB_PCICMD_CFG 5 /* PCI Configuration Space */ | ||
238 | |||
239 | /* | ||
240 | * additional options for pci init reg (no shifting needed) | ||
241 | */ | ||
242 | #define DDB_PCI_CFGTYPE1 0x200 /* for pci init0/1 regs */ | ||
243 | #define DDB_PCI_ACCESS_32 0x10 /* for pci init0/1 regs */ | ||
244 | |||
245 | |||
246 | extern void ddb_set_pmr(u32 pmr, u32 type, u32 addr, u32 options); | ||
247 | |||
248 | /* | ||
249 | * we need to reset pci bus when we start up and shutdown | ||
250 | */ | ||
251 | extern void ddb_pci_reset_bus(void); | ||
252 | |||
253 | |||
254 | /* | ||
255 | * include the board dependent part | ||
256 | */ | ||
257 | #if defined(CONFIG_DDB5477) | ||
258 | #include <asm/ddb5xxx/ddb5477.h> | ||
259 | #else | ||
260 | #error "Unknown DDB board!" | ||
261 | #endif | ||
262 | |||
263 | #endif /* __ASM_DDB5XXX_DDB5XXX_H */ | ||
diff --git a/include/asm-mips/edac.h b/include/asm-mips/edac.h new file mode 100644 index 000000000000..83719eee2d13 --- /dev/null +++ b/include/asm-mips/edac.h | |||
@@ -0,0 +1,35 @@ | |||
1 | #ifndef ASM_EDAC_H | ||
2 | #define ASM_EDAC_H | ||
3 | |||
4 | /* ECC atomic, DMA, SMP and interrupt safe scrub function */ | ||
5 | |||
6 | static inline void atomic_scrub(void *va, u32 size) | ||
7 | { | ||
8 | unsigned long *virt_addr = va; | ||
9 | unsigned long temp; | ||
10 | u32 i; | ||
11 | |||
12 | for (i = 0; i < size / sizeof(unsigned long); i++, virt_addr++) { | ||
13 | |||
14 | /* | ||
15 | * Very carefully read and write to memory atomically | ||
16 | * so we are interrupt, DMA and SMP safe. | ||
17 | * | ||
18 | * Intel: asm("lock; addl $0, %0"::"m"(*virt_addr)); | ||
19 | */ | ||
20 | |||
21 | __asm__ __volatile__ ( | ||
22 | " .set mips3 \n" | ||
23 | "1: ll %0, %1 # atomic_add \n" | ||
24 | " ll %0, %1 # atomic_add \n" | ||
25 | " addu %0, $0 \n" | ||
26 | " sc %0, %1 \n" | ||
27 | " beqz %0, 1b \n" | ||
28 | " .set mips0 \n" | ||
29 | : "=&r" (temp), "=m" (*virt_addr) | ||
30 | : "m" (*virt_addr)); | ||
31 | |||
32 | } | ||
33 | } | ||
34 | |||
35 | #endif | ||
diff --git a/include/asm-mips/elf.h b/include/asm-mips/elf.h index ebd6bfb19d66..e7d95d48177d 100644 --- a/include/asm-mips/elf.h +++ b/include/asm-mips/elf.h | |||
@@ -265,7 +265,7 @@ do { \ | |||
265 | #ifdef CONFIG_MIPS32_N32 | 265 | #ifdef CONFIG_MIPS32_N32 |
266 | #define __SET_PERSONALITY32_N32() \ | 266 | #define __SET_PERSONALITY32_N32() \ |
267 | do { \ | 267 | do { \ |
268 | current->thread.mflags |= MF_N32; \ | 268 | set_thread_flag(TIF_32BIT_ADDR); \ |
269 | current->thread.abi = &mips_abi_n32; \ | 269 | current->thread.abi = &mips_abi_n32; \ |
270 | } while (0) | 270 | } while (0) |
271 | #else | 271 | #else |
@@ -276,7 +276,8 @@ do { \ | |||
276 | #ifdef CONFIG_MIPS32_O32 | 276 | #ifdef CONFIG_MIPS32_O32 |
277 | #define __SET_PERSONALITY32_O32() \ | 277 | #define __SET_PERSONALITY32_O32() \ |
278 | do { \ | 278 | do { \ |
279 | current->thread.mflags |= MF_O32; \ | 279 | set_thread_flag(TIF_32BIT_REGS); \ |
280 | set_thread_flag(TIF_32BIT_ADDR); \ | ||
280 | current->thread.abi = &mips_abi_32; \ | 281 | current->thread.abi = &mips_abi_32; \ |
281 | } while (0) | 282 | } while (0) |
282 | #else | 283 | #else |
@@ -299,13 +300,13 @@ do { \ | |||
299 | 300 | ||
300 | #define SET_PERSONALITY(ex, ibcs2) \ | 301 | #define SET_PERSONALITY(ex, ibcs2) \ |
301 | do { \ | 302 | do { \ |
302 | current->thread.mflags &= ~MF_ABI_MASK; \ | 303 | clear_thread_flag(TIF_32BIT_REGS); \ |
304 | clear_thread_flag(TIF_32BIT_ADDR); \ | ||
305 | \ | ||
303 | if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \ | 306 | if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \ |
304 | __SET_PERSONALITY32(ex); \ | 307 | __SET_PERSONALITY32(ex); \ |
305 | else { \ | 308 | else \ |
306 | current->thread.mflags |= MF_N64; \ | ||
307 | current->thread.abi = &mips_abi; \ | 309 | current->thread.abi = &mips_abi; \ |
308 | } \ | ||
309 | \ | 310 | \ |
310 | if (ibcs2) \ | 311 | if (ibcs2) \ |
311 | set_personality(PER_SVR4); \ | 312 | set_personality(PER_SVR4); \ |
diff --git a/include/asm-mips/hazards.h b/include/asm-mips/hazards.h index d9119f43f9aa..918a4894b587 100644 --- a/include/asm-mips/hazards.h +++ b/include/asm-mips/hazards.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) 2003, 2004 Ralf Baechle <ralf@linux-mips.org> | 6 | * Copyright (C) 2003, 04, 07 Ralf Baechle <ralf@linux-mips.org> |
7 | * Copyright (C) MIPS Technologies, Inc. | 7 | * Copyright (C) MIPS Technologies, Inc. |
8 | * written by Ralf Baechle <ralf@linux-mips.org> | 8 | * written by Ralf Baechle <ralf@linux-mips.org> |
9 | */ | 9 | */ |
@@ -23,6 +23,11 @@ static inline void name(void) \ | |||
23 | __asm__ __volatile__ (#name); \ | 23 | __asm__ __volatile__ (#name); \ |
24 | } | 24 | } |
25 | 25 | ||
26 | /* | ||
27 | * MIPS R2 instruction hazard barrier. Needs to be called as a subroutine. | ||
28 | */ | ||
29 | extern void mips_ihb(void); | ||
30 | |||
26 | #endif | 31 | #endif |
27 | 32 | ||
28 | ASMMACRO(_ssnop, | 33 | ASMMACRO(_ssnop, |
diff --git a/include/asm-mips/mach-tx49xx/cpu-feature-overrides.h b/include/asm-mips/mach-tx49xx/cpu-feature-overrides.h new file mode 100644 index 000000000000..275eaf92c748 --- /dev/null +++ b/include/asm-mips/mach-tx49xx/cpu-feature-overrides.h | |||
@@ -0,0 +1,23 @@ | |||
1 | #ifndef __ASM_MACH_TX49XX_CPU_FEATURE_OVERRIDES_H | ||
2 | #define __ASM_MACH_TX49XX_CPU_FEATURE_OVERRIDES_H | ||
3 | |||
4 | #define cpu_has_llsc 1 | ||
5 | #define cpu_has_64bits 1 | ||
6 | #define cpu_has_inclusive_pcaches 0 | ||
7 | |||
8 | #define cpu_has_mips16 0 | ||
9 | #define cpu_has_mdmx 0 | ||
10 | #define cpu_has_mips3d 0 | ||
11 | #define cpu_has_smartmips 0 | ||
12 | #define cpu_has_vtag_icache 0 | ||
13 | #define cpu_has_ic_fills_f_dc 0 | ||
14 | #define cpu_has_dsp 0 | ||
15 | #define cpu_has_mipsmt 0 | ||
16 | #define cpu_has_userlocal 0 | ||
17 | |||
18 | #define cpu_has_mips32r1 0 | ||
19 | #define cpu_has_mips32r2 0 | ||
20 | #define cpu_has_mips64r1 0 | ||
21 | #define cpu_has_mips64r2 0 | ||
22 | |||
23 | #endif /* __ASM_MACH_TX49XX_CPU_FEATURE_OVERRIDES_H */ | ||
diff --git a/include/asm-mips/mach-tx49xx/kmalloc.h b/include/asm-mips/mach-tx49xx/kmalloc.h new file mode 100644 index 000000000000..913ff196259d --- /dev/null +++ b/include/asm-mips/mach-tx49xx/kmalloc.h | |||
@@ -0,0 +1,8 @@ | |||
1 | #ifndef __ASM_MACH_TX49XX_KMALLOC_H | ||
2 | #define __ASM_MACH_TX49XX_KMALLOC_H | ||
3 | |||
4 | /* | ||
5 | * All happy, no need to define ARCH_KMALLOC_MINALIGN | ||
6 | */ | ||
7 | |||
8 | #endif /* __ASM_MACH_TX49XX_KMALLOC_H */ | ||
diff --git a/include/asm-mips/mips-boards/generic.h b/include/asm-mips/mips-boards/generic.h index c8ebcc3e1267..d58977483534 100644 --- a/include/asm-mips/mips-boards/generic.h +++ b/include/asm-mips/mips-boards/generic.h | |||
@@ -67,6 +67,7 @@ | |||
67 | #define MIPS_REVISION_CORID_CORE_FPGAR2 8 | 67 | #define MIPS_REVISION_CORID_CORE_FPGAR2 8 |
68 | #define MIPS_REVISION_CORID_CORE_FPGA3 9 | 68 | #define MIPS_REVISION_CORID_CORE_FPGA3 9 |
69 | #define MIPS_REVISION_CORID_CORE_24K 10 | 69 | #define MIPS_REVISION_CORID_CORE_24K 10 |
70 | #define MIPS_REVISION_CORID_CORE_FPGA4 11 | ||
70 | 71 | ||
71 | /**** Artificial corid defines ****/ | 72 | /**** Artificial corid defines ****/ |
72 | /* | 73 | /* |
diff --git a/include/asm-mips/mips_mt.h b/include/asm-mips/mips_mt.h index 8045abc78d0f..ac7935203f89 100644 --- a/include/asm-mips/mips_mt.h +++ b/include/asm-mips/mips_mt.h | |||
@@ -8,6 +8,12 @@ | |||
8 | 8 | ||
9 | #include <linux/cpumask.h> | 9 | #include <linux/cpumask.h> |
10 | 10 | ||
11 | /* | ||
12 | * How many VPEs and TCs is Linux allowed to use? 0 means no limit. | ||
13 | */ | ||
14 | extern int tclimit; | ||
15 | extern int vpelimit; | ||
16 | |||
11 | extern cpumask_t mt_fpu_cpumask; | 17 | extern cpumask_t mt_fpu_cpumask; |
12 | extern unsigned long mt_fpemul_threshold; | 18 | extern unsigned long mt_fpemul_threshold; |
13 | 19 | ||
diff --git a/include/asm-mips/pmon.h b/include/asm-mips/pmon.h index 260f3448ccf1..6ad519189ce2 100644 --- a/include/asm-mips/pmon.h +++ b/include/asm-mips/pmon.h | |||
@@ -22,7 +22,7 @@ struct callvectors { | |||
22 | char* (*gets) (char*); | 22 | char* (*gets) (char*); |
23 | union { | 23 | union { |
24 | int (*smpfork) (unsigned long cp, char *sp); | 24 | int (*smpfork) (unsigned long cp, char *sp); |
25 | int (*cpustart) (long, long, long, long); | 25 | int (*cpustart) (long, void (*)(void), void *, long); |
26 | } _s; | 26 | } _s; |
27 | int (*semlock) (int sem); | 27 | int (*semlock) (int sem); |
28 | void (*semunlock) (int sem); | 28 | void (*semunlock) (int sem); |
diff --git a/include/asm-mips/processor.h b/include/asm-mips/processor.h index 1d8b9a8ae324..83bc94534084 100644 --- a/include/asm-mips/processor.h +++ b/include/asm-mips/processor.h | |||
@@ -62,8 +62,9 @@ extern unsigned int vced_count, vcei_count; | |||
62 | * This decides where the kernel will search for a free chunk of vm | 62 | * This decides where the kernel will search for a free chunk of vm |
63 | * space during mmap's. | 63 | * space during mmap's. |
64 | */ | 64 | */ |
65 | #define TASK_UNMAPPED_BASE ((current->thread.mflags & MF_32BIT_ADDR) ? \ | 65 | #define TASK_UNMAPPED_BASE \ |
66 | PAGE_ALIGN(TASK_SIZE32 / 3) : PAGE_ALIGN(TASK_SIZE / 3)) | 66 | (test_thread_flag(TIF_32BIT_ADDR) ? \ |
67 | PAGE_ALIGN(TASK_SIZE32 / 3) : PAGE_ALIGN(TASK_SIZE / 3)) | ||
67 | #endif | 68 | #endif |
68 | 69 | ||
69 | #define NUM_FPU_REGS 32 | 70 | #define NUM_FPU_REGS 32 |
@@ -132,22 +133,11 @@ struct thread_struct { | |||
132 | unsigned long cp0_baduaddr; /* Last kernel fault accessing USEG */ | 133 | unsigned long cp0_baduaddr; /* Last kernel fault accessing USEG */ |
133 | unsigned long error_code; | 134 | unsigned long error_code; |
134 | unsigned long trap_no; | 135 | unsigned long trap_no; |
135 | #define MF_FIXADE 1 /* Fix address errors in software */ | ||
136 | #define MF_LOGADE 2 /* Log address errors to syslog */ | ||
137 | #define MF_32BIT_REGS 4 /* also implies 16/32 fprs */ | ||
138 | #define MF_32BIT_ADDR 8 /* 32-bit address space (o32/n32) */ | ||
139 | #define MF_FPUBOUND 0x10 /* thread bound to FPU-full CPU set */ | ||
140 | unsigned long mflags; | ||
141 | unsigned long irix_trampoline; /* Wheee... */ | 136 | unsigned long irix_trampoline; /* Wheee... */ |
142 | unsigned long irix_oldctx; | 137 | unsigned long irix_oldctx; |
143 | struct mips_abi *abi; | 138 | struct mips_abi *abi; |
144 | }; | 139 | }; |
145 | 140 | ||
146 | #define MF_ABI_MASK (MF_32BIT_REGS | MF_32BIT_ADDR) | ||
147 | #define MF_O32 (MF_32BIT_REGS | MF_32BIT_ADDR) | ||
148 | #define MF_N32 MF_32BIT_ADDR | ||
149 | #define MF_N64 0 | ||
150 | |||
151 | #ifdef CONFIG_MIPS_MT_FPAFF | 141 | #ifdef CONFIG_MIPS_MT_FPAFF |
152 | #define FPAFF_INIT \ | 142 | #define FPAFF_INIT \ |
153 | .emulated_fp = 0, \ | 143 | .emulated_fp = 0, \ |
@@ -200,10 +190,6 @@ struct thread_struct { | |||
200 | .cp0_baduaddr = 0, \ | 190 | .cp0_baduaddr = 0, \ |
201 | .error_code = 0, \ | 191 | .error_code = 0, \ |
202 | .trap_no = 0, \ | 192 | .trap_no = 0, \ |
203 | /* \ | ||
204 | * For now the default is to fix address errors \ | ||
205 | */ \ | ||
206 | .mflags = MF_FIXADE, \ | ||
207 | .irix_trampoline = 0, \ | 193 | .irix_trampoline = 0, \ |
208 | .irix_oldctx = 0, \ | 194 | .irix_oldctx = 0, \ |
209 | } | 195 | } |
diff --git a/include/asm-mips/seccomp.h b/include/asm-mips/seccomp.h new file mode 100644 index 000000000000..36ed44070256 --- /dev/null +++ b/include/asm-mips/seccomp.h | |||
@@ -0,0 +1,37 @@ | |||
1 | #ifndef __ASM_SECCOMP_H | ||
2 | |||
3 | #include <linux/thread_info.h> | ||
4 | #include <linux/unistd.h> | ||
5 | |||
6 | #define __NR_seccomp_read __NR_read | ||
7 | #define __NR_seccomp_write __NR_write | ||
8 | #define __NR_seccomp_exit __NR_exit | ||
9 | #define __NR_seccomp_sigreturn __NR_rt_sigreturn | ||
10 | |||
11 | /* | ||
12 | * Kludge alert: | ||
13 | * | ||
14 | * The generic seccomp code currently allows only a single compat ABI. Until | ||
15 | * this is fixed we priorize O32 as the compat ABI over N32. | ||
16 | */ | ||
17 | #ifdef CONFIG_MIPS32_O32 | ||
18 | |||
19 | #define TIF_32BIT TIF_32BIT_REGS | ||
20 | |||
21 | #define __NR_seccomp_read_32 4003 | ||
22 | #define __NR_seccomp_write_32 4004 | ||
23 | #define __NR_seccomp_exit_32 4001 | ||
24 | #define __NR_seccomp_sigreturn_32 4193 /* rt_sigreturn */ | ||
25 | |||
26 | #elif defined(CONFIG_MIPS32_N32) | ||
27 | |||
28 | #define TIF_32BIT _TIF_32BIT_ADDR | ||
29 | |||
30 | #define __NR_seccomp_read_32 6000 | ||
31 | #define __NR_seccomp_write_32 6001 | ||
32 | #define __NR_seccomp_exit_32 6058 | ||
33 | #define __NR_seccomp_sigreturn_32 6211 /* rt_sigreturn */ | ||
34 | |||
35 | #endif /* CONFIG_MIPS32_O32 */ | ||
36 | |||
37 | #endif /* __ASM_SECCOMP_H */ | ||
diff --git a/include/asm-mips/system.h b/include/asm-mips/system.h index 8d0b1cd4a45e..357251f42518 100644 --- a/include/asm-mips/system.h +++ b/include/asm-mips/system.h | |||
@@ -46,10 +46,12 @@ struct task_struct; | |||
46 | 46 | ||
47 | #define __mips_mt_fpaff_switch_to(prev) \ | 47 | #define __mips_mt_fpaff_switch_to(prev) \ |
48 | do { \ | 48 | do { \ |
49 | struct thread_info *__prev_ti = task_thread_info(prev); \ | ||
50 | \ | ||
49 | if (cpu_has_fpu && \ | 51 | if (cpu_has_fpu && \ |
50 | (prev->thread.mflags & MF_FPUBOUND) && \ | 52 | test_ti_thread_flag(__prev_ti, TIF_FPUBOUND) && \ |
51 | (!(KSTK_STATUS(prev) & ST0_CU1))) { \ | 53 | (!(KSTK_STATUS(prev) & ST0_CU1))) { \ |
52 | prev->thread.mflags &= ~MF_FPUBOUND; \ | 54 | clear_ti_thread_flag(__prev_ti, TIF_FPUBOUND); \ |
53 | prev->cpus_allowed = prev->thread.user_cpus_allowed; \ | 55 | prev->cpus_allowed = prev->thread.user_cpus_allowed; \ |
54 | } \ | 56 | } \ |
55 | next->thread.emulated_fp = 0; \ | 57 | next->thread.emulated_fp = 0; \ |
diff --git a/include/asm-mips/thread_info.h b/include/asm-mips/thread_info.h index fbcda8204473..b2772df1a1bd 100644 --- a/include/asm-mips/thread_info.h +++ b/include/asm-mips/thread_info.h | |||
@@ -46,7 +46,7 @@ struct thread_info { | |||
46 | { \ | 46 | { \ |
47 | .task = &tsk, \ | 47 | .task = &tsk, \ |
48 | .exec_domain = &default_exec_domain, \ | 48 | .exec_domain = &default_exec_domain, \ |
49 | .flags = 0, \ | 49 | .flags = _TIF_FIXADE, \ |
50 | .cpu = 0, \ | 50 | .cpu = 0, \ |
51 | .preempt_count = 1, \ | 51 | .preempt_count = 1, \ |
52 | .addr_limit = KERNEL_DS, \ | 52 | .addr_limit = KERNEL_DS, \ |
@@ -87,9 +87,8 @@ register struct thread_info *__current_thread_info __asm__("$28"); | |||
87 | ({ \ | 87 | ({ \ |
88 | struct thread_info *ret; \ | 88 | struct thread_info *ret; \ |
89 | \ | 89 | \ |
90 | ret = kmalloc(THREAD_SIZE, GFP_KERNEL); \ | 90 | ret = kzalloc(THREAD_SIZE, GFP_KERNEL); \ |
91 | if (ret) \ | 91 | \ |
92 | memset(ret, 0, THREAD_SIZE); \ | ||
93 | ret; \ | 92 | ret; \ |
94 | }) | 93 | }) |
95 | #else | 94 | #else |
@@ -109,20 +108,23 @@ register struct thread_info *__current_thread_info __asm__("$28"); | |||
109 | * - pending work-to-be-done flags are in LSW | 108 | * - pending work-to-be-done flags are in LSW |
110 | * - other flags in MSW | 109 | * - other flags in MSW |
111 | */ | 110 | */ |
112 | #define TIF_NOTIFY_RESUME 1 /* resumption notification requested */ | 111 | #define TIF_SIGPENDING 1 /* signal pending */ |
113 | #define TIF_SIGPENDING 2 /* signal pending */ | 112 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ |
114 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ | 113 | #define TIF_SYSCALL_AUDIT 3 /* syscall auditing active */ |
115 | #define TIF_SYSCALL_AUDIT 4 /* syscall auditing active */ | 114 | #define TIF_SECCOMP 4 /* secure computing */ |
116 | #define TIF_SECCOMP 5 /* secure computing */ | ||
117 | #define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */ | 115 | #define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */ |
118 | #define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ | 116 | #define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ |
119 | #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | 117 | #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ |
120 | #define TIF_MEMDIE 18 | 118 | #define TIF_MEMDIE 18 |
121 | #define TIF_FREEZE 19 | 119 | #define TIF_FREEZE 19 |
120 | #define TIF_FIXADE 20 /* Fix address errors in software */ | ||
121 | #define TIF_LOGADE 21 /* Log address errors to syslog */ | ||
122 | #define TIF_32BIT_REGS 22 /* also implies 16/32 fprs */ | ||
123 | #define TIF_32BIT_ADDR 23 /* 32-bit address space (o32/n32) */ | ||
124 | #define TIF_FPUBOUND 24 /* thread bound to FPU-full CPU set */ | ||
122 | #define TIF_SYSCALL_TRACE 31 /* syscall trace active */ | 125 | #define TIF_SYSCALL_TRACE 31 /* syscall trace active */ |
123 | 126 | ||
124 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 127 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
125 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | ||
126 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | 128 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) |
127 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 129 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
128 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) | 130 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) |
@@ -131,6 +133,11 @@ register struct thread_info *__current_thread_info __asm__("$28"); | |||
131 | #define _TIF_USEDFPU (1<<TIF_USEDFPU) | 133 | #define _TIF_USEDFPU (1<<TIF_USEDFPU) |
132 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 134 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
133 | #define _TIF_FREEZE (1<<TIF_FREEZE) | 135 | #define _TIF_FREEZE (1<<TIF_FREEZE) |
136 | #define _TIF_FIXADE (1<<TIF_FIXADE) | ||
137 | #define _TIF_LOGADE (1<<TIF_LOGADE) | ||
138 | #define _TIF_32BIT_REGS (1<<TIF_32BIT_REGS) | ||
139 | #define _TIF_32BIT_ADDR (1<<TIF_32BIT_ADDR) | ||
140 | #define _TIF_FPUBOUND (1<<TIF_FPUBOUND) | ||
134 | 141 | ||
135 | /* work to do on interrupt/exception return */ | 142 | /* work to do on interrupt/exception return */ |
136 | #define _TIF_WORK_MASK (0x0000ffef & ~_TIF_SECCOMP) | 143 | #define _TIF_WORK_MASK (0x0000ffef & ~_TIF_SECCOMP) |
diff --git a/include/asm-mips/tx3912.h b/include/asm-mips/tx3912.h deleted file mode 100644 index d709d87363d0..000000000000 --- a/include/asm-mips/tx3912.h +++ /dev/null | |||
@@ -1,361 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-mips/tx3912.h | ||
3 | * | ||
4 | * Copyright (C) 2001 Steven J. Hill (sjhill@realitydiluted.com) | ||
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 | * Registers for TMPR3912/05 and PR31700 processors | ||
11 | */ | ||
12 | #ifndef _TX3912_H_ | ||
13 | #define _TX3912_H_ | ||
14 | |||
15 | /***************************************************************************** | ||
16 | * Clock Subsystem * | ||
17 | * --------------- * | ||
18 | * Chapter 6 in Philips PR31700 and Toshiba TMPR3905/12 User Manuals * | ||
19 | *****************************************************************************/ | ||
20 | #define TX3912_CLK_CTRL 0x01c0 | ||
21 | |||
22 | /* | ||
23 | * Clock control register values | ||
24 | */ | ||
25 | #define TX3912_CLK_CTRL_CHICLKDIV_MASK 0xff000000 | ||
26 | #define TX3912_CLK_CTRL_ENCLKTEST 0x00800000 | ||
27 | #define TX3912_CLK_CTRL_CLKTESTSELSIB 0x00400000 | ||
28 | #define TX3912_CLK_CTRL_CHIMCLKSEL 0x00200000 | ||
29 | #define TX3912_CLK_CTRL_CHICLKDIR 0x00100000 | ||
30 | #define TX3912_CLK_CTRL_ENCHIMCLK 0x00080000 | ||
31 | #define TX3912_CLK_CTRL_ENVIDCLK 0x00040000 | ||
32 | #define TX3912_CLK_CTRL_ENMBUSCLK 0x00020000 | ||
33 | #define TX3912_CLK_CTRL_ENSPICLK 0x00010000 | ||
34 | #define TX3912_CLK_CTRL_ENTIMERCLK 0x00008000 | ||
35 | #define TX3912_CLK_CTRL_ENFASTTIMERCLK 0x00004000 | ||
36 | #define TX3912_CLK_CTRL_SIBMCLKDIR 0x00002000 | ||
37 | #define TX3912_CLK_CTRL_reserved1 0x00001000 | ||
38 | #define TX3912_CLK_CTRL_ENSIBMCLK 0x00000800 | ||
39 | #define TX3912_CLK_CTRL_SIBMCLKDIV_6 0x00000600 | ||
40 | #define TX3912_CLK_CTRL_SIBMCLKDIV_5 0x00000500 | ||
41 | #define TX3912_CLK_CTRL_SIBMCLKDIV_4 0x00000400 | ||
42 | #define TX3912_CLK_CTRL_SIBMCLKDIV_3 0x00000300 | ||
43 | #define TX3912_CLK_CTRL_SIBMCLKDIV_2 0x00000200 | ||
44 | #define TX3912_CLK_CTRL_SIBMCLKDIV_1 0x00000100 | ||
45 | #define TX3912_CLK_CTRL_CSERSEL 0x00000080 | ||
46 | #define TX3912_CLK_CTRL_CSERDIV_6 0x00000060 | ||
47 | #define TX3912_CLK_CTRL_CSERDIV_5 0x00000050 | ||
48 | #define TX3912_CLK_CTRL_CSERDIV_4 0x00000040 | ||
49 | #define TX3912_CLK_CTRL_CSERDIV_3 0x00000030 | ||
50 | #define TX3912_CLK_CTRL_CSERDIV_2 0x00000020 | ||
51 | #define TX3912_CLK_CTRL_CSERDIV_1 0x00000010 | ||
52 | #define TX3912_CLK_CTRL_ENCSERCLK 0x00000008 | ||
53 | #define TX3912_CLK_CTRL_ENIRCLK 0x00000004 | ||
54 | #define TX3912_CLK_CTRL_ENUARTACLK 0x00000002 | ||
55 | #define TX3912_CLK_CTRL_ENUARTBCLK 0x00000001 | ||
56 | |||
57 | |||
58 | /***************************************************************************** | ||
59 | * Interrupt Subsystem * | ||
60 | * ------------------- * | ||
61 | * Chapter 8 in Philips PR31700 and Toshiba TMPR3905/12 User Manuals * | ||
62 | *****************************************************************************/ | ||
63 | #define TX3912_INT1_CLEAR 0x0100 | ||
64 | #define TX3912_INT2_CLEAR 0x0104 | ||
65 | #define TX3912_INT3_CLEAR 0x0108 | ||
66 | #define TX3912_INT4_CLEAR 0x010c | ||
67 | #define TX3912_INT5_CLEAR 0x0110 | ||
68 | #define TX3912_INT1_ENABLE 0x0118 | ||
69 | #define TX3912_INT2_ENABLE 0x011c | ||
70 | #define TX3912_INT3_ENABLE 0x0120 | ||
71 | #define TX3912_INT4_ENABLE 0x0124 | ||
72 | #define TX3912_INT5_ENABLE 0x0128 | ||
73 | #define TX3912_INT6_ENABLE 0x012c | ||
74 | #define TX3912_INT1_STATUS 0x0100 | ||
75 | #define TX3912_INT2_STATUS 0x0104 | ||
76 | #define TX3912_INT3_STATUS 0x0108 | ||
77 | #define TX3912_INT4_STATUS 0x010c | ||
78 | #define TX3912_INT5_STATUS 0x0110 | ||
79 | #define TX3912_INT6_STATUS 0x0114 | ||
80 | |||
81 | /* | ||
82 | * Interrupt 2 register values | ||
83 | */ | ||
84 | #define TX3912_INT2_UARTARXINT 0x80000000 | ||
85 | #define TX3912_INT2_UARTARXOVERRUNINT 0x40000000 | ||
86 | #define TX3912_INT2_UARTAFRAMEERRINT 0x20000000 | ||
87 | #define TX3912_INT2_UARTABREAKINT 0x10000000 | ||
88 | #define TX3912_INT2_UARTAPARITYINT 0x08000000 | ||
89 | #define TX3912_INT2_UARTATXINT 0x04000000 | ||
90 | #define TX3912_INT2_UARTATXOVERRUNINT 0x02000000 | ||
91 | #define TX3912_INT2_UARTAEMPTYINT 0x01000000 | ||
92 | #define TX3912_INT2_UARTADMAFULLINT 0x00800000 | ||
93 | #define TX3912_INT2_UARTADMAHALFINT 0x00400000 | ||
94 | #define TX3912_INT2_UARTBRXINT 0x00200000 | ||
95 | #define TX3912_INT2_UARTBRXOVERRUNINT 0x00100000 | ||
96 | #define TX3912_INT2_UARTBFRAMEERRINT 0x00080000 | ||
97 | #define TX3912_INT2_UARTBBREAKINT 0x00040000 | ||
98 | #define TX3912_INT2_UARTBPARITYINT 0x00020000 | ||
99 | #define TX3912_INT2_UARTBTXINT 0x00010000 | ||
100 | #define TX3912_INT2_UARTBTXOVERRUNINT 0x00008000 | ||
101 | #define TX3912_INT2_UARTBEMPTYINT 0x00004000 | ||
102 | #define TX3912_INT2_UARTBDMAFULLINT 0x00002000 | ||
103 | #define TX3912_INT2_UARTBDMAHALFINT 0x00001000 | ||
104 | #define TX3912_INT2_UARTA_RX_BITS 0xf8000000 | ||
105 | #define TX3912_INT2_UARTA_TX_BITS 0x07c00000 | ||
106 | #define TX3912_INT2_UARTB_RX_BITS 0x003e0000 | ||
107 | #define TX3912_INT2_UARTB_TX_BITS 0x0001f000 | ||
108 | |||
109 | /* | ||
110 | * Interrupt 5 register values | ||
111 | */ | ||
112 | #define TX3912_INT5_RTCINT 0x80000000 | ||
113 | #define TX3912_INT5_ALARMINT 0x40000000 | ||
114 | #define TX3912_INT5_PERINT 0x20000000 | ||
115 | #define TX3912_INT5_STPTIMERINT 0x10000000 | ||
116 | #define TX3912_INT5_POSPWRINT 0x08000000 | ||
117 | #define TX3912_INT5_NEGPWRINT 0x04000000 | ||
118 | #define TX3912_INT5_POSPWROKINT 0x02000000 | ||
119 | #define TX3912_INT5_NEGPWROKINT 0x01000000 | ||
120 | #define TX3912_INT5_POSONBUTINT 0x00800000 | ||
121 | #define TX3912_INT5_NEGONBUTINT 0x00400000 | ||
122 | #define TX3912_INT5_SPIBUFAVAILINT 0x00200000 | ||
123 | #define TX3912_INT5_SPIERRINT 0x00100000 | ||
124 | #define TX3912_INT5_SPIRCVINT 0x00080000 | ||
125 | #define TX3912_INT5_SPIEMPTYINT 0x00040000 | ||
126 | #define TX3912_INT5_IRCONSMINT 0x00020000 | ||
127 | #define TX3912_INT5_CARSTINT 0x00010000 | ||
128 | #define TX3912_INT5_POSCARINT 0x00008000 | ||
129 | #define TX3912_INT5_NEGCARINT 0x00004000 | ||
130 | #define TX3912_INT5_IOPOSINT6 0x00002000 | ||
131 | #define TX3912_INT5_IOPOSINT5 0x00001000 | ||
132 | #define TX3912_INT5_IOPOSINT4 0x00000800 | ||
133 | #define TX3912_INT5_IOPOSINT3 0x00000400 | ||
134 | #define TX3912_INT5_IOPOSINT2 0x00000200 | ||
135 | #define TX3912_INT5_IOPOSINT1 0x00000100 | ||
136 | #define TX3912_INT5_IOPOSINT0 0x00000080 | ||
137 | #define TX3912_INT5_IONEGINT6 0x00000040 | ||
138 | #define TX3912_INT5_IONEGINT5 0x00000020 | ||
139 | #define TX3912_INT5_IONEGINT4 0x00000010 | ||
140 | #define TX3912_INT5_IONEGINT3 0x00000008 | ||
141 | #define TX3912_INT5_IONEGINT2 0x00000004 | ||
142 | #define TX3912_INT5_IONEGINT1 0x00000002 | ||
143 | #define TX3912_INT5_IONEGINT0 0x00000001 | ||
144 | |||
145 | /* | ||
146 | * Interrupt 6 status register values | ||
147 | */ | ||
148 | #define TX3912_INT6_STATUS_IRQHIGH 0x80000000 | ||
149 | #define TX3912_INT6_STATUS_IRQLOW 0x40000000 | ||
150 | #define TX3912_INT6_STATUS_reserved6 0x3fffffc0 | ||
151 | #define TX3912_INT6_STATUS_INTVEC_POSNEGPWROKINT 0x0000003c | ||
152 | #define TX3912_INT6_STATUS_INTVEC_ALARMINT 0x00000038 | ||
153 | #define TX3912_INT6_STATUS_INTVEC_PERINT 0x00000034 | ||
154 | #define TX3912_INT6_STATUS_INTVEC_reserved5 0x00000030 | ||
155 | #define TX3912_INT6_STATUS_INTVEC_UARTARXINT 0x0000002c | ||
156 | #define TX3912_INT6_STATUS_INTVEC_UARTBRXINT 0x00000028 | ||
157 | #define TX3912_INT6_STATUS_INTVEC_reserved4 0x00000024 | ||
158 | #define TX3912_INT6_STATUS_INTVEC_IOPOSINT65 0x00000020 | ||
159 | #define TX3912_INT6_STATUS_INTVEC_reserved3 0x0000001c | ||
160 | #define TX3912_INT6_STATUS_INTVEC_IONEGINT65 0x00000018 | ||
161 | #define TX3912_INT6_STATUS_INTVEC_reserved2 0x00000014 | ||
162 | #define TX3912_INT6_STATUS_INTVEC_SNDDMACNTINT 0x00000010 | ||
163 | #define TX3912_INT6_STATUS_INTVEC_TELDMACNTINT 0x0000000c | ||
164 | #define TX3912_INT6_STATUS_INTVEC_CHIDMACNTINT 0x00000008 | ||
165 | #define TX3912_INT6_STATUS_INTVEC_IOPOSNEGINT0 0x00000004 | ||
166 | #define TX3912_INT6_STATUS_INTVEC_STDHANDLER 0x00000000 | ||
167 | #define TX3912_INT6_STATUS_reserved1 0x00000003 | ||
168 | |||
169 | /* | ||
170 | * Interrupt 6 enable register values | ||
171 | */ | ||
172 | #define TX3912_INT6_ENABLE_reserved5 0xfff80000 | ||
173 | #define TX3912_INT6_ENABLE_GLOBALEN 0x00040000 | ||
174 | #define TX3912_INT6_ENABLE_IRQPRITEST 0x00020000 | ||
175 | #define TX3912_INT6_ENABLE_IRQTEST 0x00010000 | ||
176 | #define TX3912_INT6_ENABLE_PRIORITYMASK_POSNEGPWROKINT 0x00008000 | ||
177 | #define TX3912_INT6_ENABLE_PRIORITYMASK_ALARMINT 0x00004000 | ||
178 | #define TX3912_INT6_ENABLE_PRIORITYMASK_PERINT 0x00002000 | ||
179 | #define TX3912_INT6_ENABLE_PRIORITYMASK_reserved4 0x00001000 | ||
180 | #define TX3912_INT6_ENABLE_PRIORITYMASK_UARTARXINT 0x00000800 | ||
181 | #define TX3912_INT6_ENABLE_PRIORITYMASK_UARTBRXINT 0x00000400 | ||
182 | #define TX3912_INT6_ENABLE_PRIORITYMASK_reserved3 0x00000200 | ||
183 | #define TX3912_INT6_ENABLE_PRIORITYMASK_IOPOSINT65 0x00000100 | ||
184 | #define TX3912_INT6_ENABLE_PRIORITYMASK_reserved2 0x00000080 | ||
185 | #define TX3912_INT6_ENABLE_PRIORITYMASK_IONEGINT65 0x00000040 | ||
186 | #define TX3912_INT6_ENABLE_PRIORITYMASK_reserved1 0x00000020 | ||
187 | #define TX3912_INT6_ENABLE_PRIORITYMASK_SNDDMACNTINT 0x00000010 | ||
188 | #define TX3912_INT6_ENABLE_PRIORITYMASK_TELDMACNTINT 0x00000008 | ||
189 | #define TX3912_INT6_ENABLE_PRIORITYMASK_CHIDMACNTINT 0x00000004 | ||
190 | #define TX3912_INT6_ENABLE_PRIORITYMASK_IOPOSNEGINT0 0x00000002 | ||
191 | #define TX3912_INT6_ENABLE_PRIORITYMASK_STDHANDLER 0x00000001 | ||
192 | #define TX3912_INT6_ENABLE_HIGH_PRIORITY 0x0000ffff | ||
193 | |||
194 | |||
195 | /***************************************************************************** | ||
196 | * Power Subsystem * | ||
197 | * --------------- * | ||
198 | * Chapter 11 in Philips PR31700 User Manual * | ||
199 | * Chapter 12 in Toshiba TMPR3905/12 User Manual * | ||
200 | *****************************************************************************/ | ||
201 | #define TX3912_POWER_CTRL 0x01c4 | ||
202 | |||
203 | /* | ||
204 | * Power control register values | ||
205 | */ | ||
206 | #define TX3912_POWER_CTRL_ONBUTN 0x80000000 | ||
207 | #define TX3912_POWER_CTRL_PWRINT 0x40000000 | ||
208 | #define TX3912_POWER_CTRL_PWROK 0x20000000 | ||
209 | #define TX3912_POWER_CTRL_VIDRF_MASK 0x18000000 | ||
210 | #define TX3912_POWER_CTRL_SLOWBUS 0x04000000 | ||
211 | #define TX3912_POWER_CTRL_DIVMOD 0x02000000 | ||
212 | #define TX3912_POWER_CTRL_reserved2 0x01ff0000 | ||
213 | #define TX3912_POWER_CTRL_STPTIMERVAL_MASK 0x0000f000 | ||
214 | #define TX3912_POWER_CTRL_ENSTPTIMER 0x00000800 | ||
215 | #define TX3912_POWER_CTRL_ENFORCESHUTDWN 0x00000400 | ||
216 | #define TX3912_POWER_CTRL_FORCESHUTDWN 0x00000200 | ||
217 | #define TX3912_POWER_CTRL_FORCESHUTDWNOCC 0x00000100 | ||
218 | #define TX3912_POWER_CTRL_SELC2MS 0x00000080 | ||
219 | #define TX3912_POWER_CTRL_reserved1 0x00000040 | ||
220 | #define TX3912_POWER_CTRL_BPDBVCC3 0x00000020 | ||
221 | #define TX3912_POWER_CTRL_STOPCPU 0x00000010 | ||
222 | #define TX3912_POWER_CTRL_DBNCONBUTN 0x00000008 | ||
223 | #define TX3912_POWER_CTRL_COLDSTART 0x00000004 | ||
224 | #define TX3912_POWER_CTRL_PWRCS 0x00000002 | ||
225 | #define TX3912_POWER_CTRL_VCCON 0x00000001 | ||
226 | |||
227 | |||
228 | /***************************************************************************** | ||
229 | * Timer Subsystem * | ||
230 | * --------------- * | ||
231 | * Chapter 14 in Philips PR31700 User Manual * | ||
232 | * Chapter 15 in Toshiba TMPR3905/12 User Manual * | ||
233 | *****************************************************************************/ | ||
234 | #define TX3912_RTC_HIGH 0x0140 | ||
235 | #define TX3912_RTC_LOW 0x0144 | ||
236 | #define TX3912_RTC_ALARM_HIGH 0x0148 | ||
237 | #define TX3912_RTC_ALARM_LOW 0x014c | ||
238 | #define TX3912_TIMER_CTRL 0x0150 | ||
239 | #define TX3912_TIMER_PERIOD 0x0154 | ||
240 | |||
241 | /* | ||
242 | * Timer control register values | ||
243 | */ | ||
244 | #define TX3912_TIMER_CTRL_FREEZEPRE 0x00000080 | ||
245 | #define TX3912_TIMER_CTRL_FREEZERTC 0x00000040 | ||
246 | #define TX3912_TIMER_CTRL_FREEZETIMER 0x00000020 | ||
247 | #define TX3912_TIMER_CTRL_ENPERTIMER 0x00000010 | ||
248 | #define TX3912_TIMER_CTRL_RTCCLEAR 0x00000008 | ||
249 | #define TX3912_TIMER_CTRL_TESTC8MS 0x00000004 | ||
250 | #define TX3912_TIMER_CTRL_ENTESTCLK 0x00000002 | ||
251 | #define TX3912_TIMER_CTRL_ENRTCTST 0x00000001 | ||
252 | |||
253 | /* | ||
254 | * The periodic timer has granularity of 868 nanoseconds which | ||
255 | * results in a count of (1.152 x 10^6 / 100) in order to achieve | ||
256 | * a 10 millisecond periodic system clock. | ||
257 | */ | ||
258 | #define TX3912_SYS_TIMER_VALUE (1152000/HZ) | ||
259 | |||
260 | |||
261 | /***************************************************************************** | ||
262 | * UART Subsystem * | ||
263 | * -------------- * | ||
264 | * Chapter 15 in Philips PR31700 User Manual * | ||
265 | * Chapter 16 in Toshiba TMPR3905/12 User Manual * | ||
266 | *****************************************************************************/ | ||
267 | #define TX3912_UARTA_CTRL1 0x00b0 | ||
268 | #define TX3912_UARTA_CTRL2 0x00b4 | ||
269 | #define TX3912_UARTA_DMA_CTRL1 0x00b8 | ||
270 | #define TX3912_UARTA_DMA_CTRL2 0x00bc | ||
271 | #define TX3912_UARTA_DMA_CNT 0x00c0 | ||
272 | #define TX3912_UARTA_DATA 0x00c4 | ||
273 | #define TX3912_UARTB_CTRL1 0x00c8 | ||
274 | #define TX3912_UARTB_CTRL2 0x00cc | ||
275 | #define TX3912_UARTB_DMA_CTRL1 0x00d0 | ||
276 | #define TX3912_UARTB_DMA_CTRL2 0x00d4 | ||
277 | #define TX3912_UARTB_DMA_CNT 0x00d8 | ||
278 | #define TX3912_UARTB_DATA 0x00dc | ||
279 | |||
280 | /* | ||
281 | * UART Control Register 1 values | ||
282 | */ | ||
283 | #define TX3912_UART_CTRL1_UARTON 0x80000000 | ||
284 | #define TX3912_UART_CTRL1_EMPTY 0x40000000 | ||
285 | #define TX3912_UART_CTRL1_PRXHOLDFULL 0x20000000 | ||
286 | #define TX3912_UART_CTRL1_RXHOLDFULL 0x10000000 | ||
287 | #define TX3912_UART_CTRL1_reserved1 0x0fff0000 | ||
288 | #define TX3912_UART_CTRL1_ENDMARX 0x00008000 | ||
289 | #define TX3912_UART_CTRL1_ENDMATX 0x00004000 | ||
290 | #define TX3912_UART_CTRL1_TESTMODE 0x00002000 | ||
291 | #define TX3912_UART_CTRL1_ENBREAKHALT 0x00001000 | ||
292 | #define TX3912_UART_CTRL1_ENDMATEST 0x00000800 | ||
293 | #define TX3912_UART_CTRL1_ENDMALOOP 0x00000400 | ||
294 | #define TX3912_UART_CTRL1_PULSEOPT1 0x00000200 | ||
295 | #define TX3912_UART_CTRL1_PULSEOPT1 0x00000100 | ||
296 | #define TX3912_UART_CTRL1_DTINVERT 0x00000080 | ||
297 | #define TX3912_UART_CTRL1_DISTXD 0x00000040 | ||
298 | #define TX3912_UART_CTRL1_TWOSTOP 0x00000020 | ||
299 | #define TX3912_UART_CTRL1_LOOPBACK 0x00000010 | ||
300 | #define TX3912_UART_CTRL1_BIT_7 0x00000008 | ||
301 | #define TX3912_UART_CTRL1_EVENPARITY 0x00000004 | ||
302 | #define TX3912_UART_CTRL1_ENPARITY 0x00000002 | ||
303 | #define TX3912_UART_CTRL1_ENUART 0x00000001 | ||
304 | |||
305 | /* | ||
306 | * UART Control Register 2 values | ||
307 | */ | ||
308 | #define TX3912_UART_CTRL2_B230400 0x0000 /* 0 */ | ||
309 | #define TX3912_UART_CTRL2_B115200 0x0001 /* 1 */ | ||
310 | #define TX3912_UART_CTRL2_B76800 0x0002 /* 2 */ | ||
311 | #define TX3912_UART_CTRL2_B57600 0x0003 /* 3 */ | ||
312 | #define TX3912_UART_CTRL2_B38400 0x0005 /* 5 */ | ||
313 | #define TX3912_UART_CTRL2_B19200 0x000b /* 11 */ | ||
314 | #define TX3912_UART_CTRL2_B9600 0x0016 /* 22 */ | ||
315 | #define TX3912_UART_CTRL2_B4800 0x002f /* 47 */ | ||
316 | #define TX3912_UART_CTRL2_B2400 0x005f /* 95 */ | ||
317 | #define TX3912_UART_CTRL2_B1200 0x00bf /* 191 */ | ||
318 | #define TX3912_UART_CTRL2_B600 0x017f /* 383 */ | ||
319 | #define TX3912_UART_CTRL2_B300 0x02ff /* 767 */ | ||
320 | |||
321 | /***************************************************************************** | ||
322 | * Video Subsystem * | ||
323 | * --------------- * | ||
324 | * Chapter 16 in Philips PR31700 User Manual * | ||
325 | * Chapter 17 in Toshiba TMPR3905/12 User Manual * | ||
326 | *****************************************************************************/ | ||
327 | #define TX3912_VIDEO_CTRL1 0x0028 | ||
328 | #define TX3912_VIDEO_CTRL2 0x002c | ||
329 | #define TX3912_VIDEO_CTRL3 0x0030 | ||
330 | #define TX3912_VIDEO_CTRL4 0x0034 | ||
331 | #define TX3912_VIDEO_CTRL5 0x0038 | ||
332 | #define TX3912_VIDEO_CTRL6 0x003c | ||
333 | #define TX3912_VIDEO_CTRL7 0x0040 | ||
334 | #define TX3912_VIDEO_CTRL8 0x0044 | ||
335 | #define TX3912_VIDEO_CTRL9 0x0048 | ||
336 | #define TX3912_VIDEO_CTRL10 0x004c | ||
337 | #define TX3912_VIDEO_CTRL11 0x0050 | ||
338 | #define TX3912_VIDEO_CTRL12 0x0054 | ||
339 | #define TX3912_VIDEO_CTRL13 0x0058 | ||
340 | #define TX3912_VIDEO_CTRL14 0x005c | ||
341 | |||
342 | /* | ||
343 | * Video Control Register 1 values | ||
344 | */ | ||
345 | #define TX3912_VIDEO_CTRL1_LINECNT 0xffc00000 | ||
346 | #define TX3912_VIDEO_CTRL1_LOADDLY 0x00200000 | ||
347 | #define TX3912_VIDEO_CTRL1_BAUDVAL 0x001f0000 | ||
348 | #define TX3912_VIDEO_CTRL1_VIDDONEVAL 0x0000fe00 | ||
349 | #define TX3912_VIDEO_CTRL1_ENFREEZEFRAME 0x00000100 | ||
350 | #define TX3912_VIDEO_CTRL1_BITSEL_MASK 0x000000c0 | ||
351 | #define TX3912_VIDEO_CTRL1_BITSEL_8BIT_COLOR 0x000000c0 | ||
352 | #define TX3912_VIDEO_CTRL1_BITSEL_4BIT_GRAY 0x00000080 | ||
353 | #define TX3912_VIDEO_CTRL1_BITSEL_2BIT_GRAY 0x00000040 | ||
354 | #define TX3912_VIDEO_CTRL1_DISPSPLIT 0x00000020 | ||
355 | #define TX3912_VIDEO_CTRL1_DISP8 0x00000010 | ||
356 | #define TX3912_VIDEO_CTRL1_DFMODE 0x00000008 | ||
357 | #define TX3912_VIDEO_CTRL1_INVVID 0x00000004 | ||
358 | #define TX3912_VIDEO_CTRL1_DISPON 0x00000002 | ||
359 | #define TX3912_VIDEO_CTRL1_ENVID 0x00000001 | ||
360 | |||
361 | #endif /* _TX3912_H_ */ | ||
diff --git a/include/asm-mips/tx4927/toshiba_rbtx4927.h b/include/asm-mips/tx4927/toshiba_rbtx4927.h index 94bef03d9635..5dc40a867774 100644 --- a/include/asm-mips/tx4927/toshiba_rbtx4927.h +++ b/include/asm-mips/tx4927/toshiba_rbtx4927.h | |||
@@ -52,4 +52,6 @@ | |||
52 | #define RBTX4927_RTL_8019_BASE (0x1c020280-TBTX4927_ISA_IO_OFFSET) | 52 | #define RBTX4927_RTL_8019_BASE (0x1c020280-TBTX4927_ISA_IO_OFFSET) |
53 | #define RBTX4927_RTL_8019_IRQ (29) | 53 | #define RBTX4927_RTL_8019_IRQ (29) |
54 | 54 | ||
55 | int toshiba_rbtx4927_irq_nested(int sw_irq); | ||
56 | |||
55 | #endif /* __ASM_TX4927_TOSHIBA_RBTX4927_H */ | 57 | #endif /* __ASM_TX4927_TOSHIBA_RBTX4927_H */ |
diff --git a/include/asm-mips/unistd.h b/include/asm-mips/unistd.h index ed16de0a6398..fa9a587b3bf1 100644 --- a/include/asm-mips/unistd.h +++ b/include/asm-mips/unistd.h | |||
@@ -340,16 +340,17 @@ | |||
340 | #define __NR_signalfd (__NR_Linux + 317) | 340 | #define __NR_signalfd (__NR_Linux + 317) |
341 | #define __NR_timerfd (__NR_Linux + 318) | 341 | #define __NR_timerfd (__NR_Linux + 318) |
342 | #define __NR_eventfd (__NR_Linux + 319) | 342 | #define __NR_eventfd (__NR_Linux + 319) |
343 | #define __NR_fallocate (__NR_Linux + 320) | ||
343 | 344 | ||
344 | /* | 345 | /* |
345 | * Offset of the last Linux o32 flavoured syscall | 346 | * Offset of the last Linux o32 flavoured syscall |
346 | */ | 347 | */ |
347 | #define __NR_Linux_syscalls 319 | 348 | #define __NR_Linux_syscalls 320 |
348 | 349 | ||
349 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ | 350 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ |
350 | 351 | ||
351 | #define __NR_O32_Linux 4000 | 352 | #define __NR_O32_Linux 4000 |
352 | #define __NR_O32_Linux_syscalls 319 | 353 | #define __NR_O32_Linux_syscalls 320 |
353 | 354 | ||
354 | #if _MIPS_SIM == _MIPS_SIM_ABI64 | 355 | #if _MIPS_SIM == _MIPS_SIM_ABI64 |
355 | 356 | ||
@@ -636,16 +637,17 @@ | |||
636 | #define __NR_signalfd (__NR_Linux + 276) | 637 | #define __NR_signalfd (__NR_Linux + 276) |
637 | #define __NR_timerfd (__NR_Linux + 277) | 638 | #define __NR_timerfd (__NR_Linux + 277) |
638 | #define __NR_eventfd (__NR_Linux + 278) | 639 | #define __NR_eventfd (__NR_Linux + 278) |
640 | #define __NR_fallocate (__NR_Linux + 279) | ||
639 | 641 | ||
640 | /* | 642 | /* |
641 | * Offset of the last Linux 64-bit flavoured syscall | 643 | * Offset of the last Linux 64-bit flavoured syscall |
642 | */ | 644 | */ |
643 | #define __NR_Linux_syscalls 278 | 645 | #define __NR_Linux_syscalls 279 |
644 | 646 | ||
645 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ | 647 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ |
646 | 648 | ||
647 | #define __NR_64_Linux 5000 | 649 | #define __NR_64_Linux 5000 |
648 | #define __NR_64_Linux_syscalls 278 | 650 | #define __NR_64_Linux_syscalls 279 |
649 | 651 | ||
650 | #if _MIPS_SIM == _MIPS_SIM_NABI32 | 652 | #if _MIPS_SIM == _MIPS_SIM_NABI32 |
651 | 653 | ||
@@ -936,16 +938,17 @@ | |||
936 | #define __NR_signalfd (__NR_Linux + 280) | 938 | #define __NR_signalfd (__NR_Linux + 280) |
937 | #define __NR_timerfd (__NR_Linux + 281) | 939 | #define __NR_timerfd (__NR_Linux + 281) |
938 | #define __NR_eventfd (__NR_Linux + 282) | 940 | #define __NR_eventfd (__NR_Linux + 282) |
941 | #define __NR_fallocate (__NR_Linux + 283) | ||
939 | 942 | ||
940 | /* | 943 | /* |
941 | * Offset of the last N32 flavoured syscall | 944 | * Offset of the last N32 flavoured syscall |
942 | */ | 945 | */ |
943 | #define __NR_Linux_syscalls 282 | 946 | #define __NR_Linux_syscalls 283 |
944 | 947 | ||
945 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ | 948 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ |
946 | 949 | ||
947 | #define __NR_N32_Linux 6000 | 950 | #define __NR_N32_Linux 6000 |
948 | #define __NR_N32_Linux_syscalls 282 | 951 | #define __NR_N32_Linux_syscalls 283 |
949 | 952 | ||
950 | #ifdef __KERNEL__ | 953 | #ifdef __KERNEL__ |
951 | 954 | ||
diff --git a/include/asm-mips/war.h b/include/asm-mips/war.h index 9de52a5b0f3d..c0715d0a6b28 100644 --- a/include/asm-mips/war.h +++ b/include/asm-mips/war.h | |||
@@ -182,13 +182,11 @@ | |||
182 | * exceptions. | 182 | * exceptions. |
183 | */ | 183 | */ |
184 | #if defined(CONFIG_BASLER_EXCITE) || defined(CONFIG_MIPS_ATLAS) || \ | 184 | #if defined(CONFIG_BASLER_EXCITE) || defined(CONFIG_MIPS_ATLAS) || \ |
185 | defined(CONFIG_MIPS_MALTA) || defined(CONFIG_MOMENCO_OCELOT) || \ | 185 | defined(CONFIG_MIPS_MALTA) || defined(CONFIG_PMC_YOSEMITE) || \ |
186 | defined(CONFIG_PMC_YOSEMITE) || defined(CONFIG_SGI_IP32) || \ | 186 | defined(CONFIG_SGI_IP32) || defined(CONFIG_WR_PPMC) |
187 | defined(CONFIG_WR_PPMC) | ||
188 | #define ICACHE_REFILLS_WORKAROUND_WAR 1 | 187 | #define ICACHE_REFILLS_WORKAROUND_WAR 1 |
189 | #endif | 188 | #endif |
190 | 189 | ||
191 | |||
192 | /* | 190 | /* |
193 | * On the R10000 upto version 2.6 (not sure about 2.7) there is a bug that | 191 | * On the R10000 upto version 2.6 (not sure about 2.7) there is a bug that |
194 | * may cause ll / sc and lld / scd sequences to execute non-atomically. | 192 | * may cause ll / sc and lld / scd sequences to execute non-atomically. |
diff --git a/include/asm-parisc/thread_info.h b/include/asm-parisc/thread_info.h index 949314cf6188..2d9c7500867b 100644 --- a/include/asm-parisc/thread_info.h +++ b/include/asm-parisc/thread_info.h | |||
@@ -56,23 +56,21 @@ struct thread_info { | |||
56 | * thread information flags | 56 | * thread information flags |
57 | */ | 57 | */ |
58 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ | 58 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ |
59 | #define TIF_NOTIFY_RESUME 1 /* resumption notification requested */ | 59 | #define TIF_SIGPENDING 1 /* signal pending */ |
60 | #define TIF_SIGPENDING 2 /* signal pending */ | 60 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ |
61 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ | 61 | #define TIF_POLLING_NRFLAG 3 /* true if poll_idle() is polling TIF_NEED_RESCHED */ |
62 | #define TIF_POLLING_NRFLAG 4 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | 62 | #define TIF_32BIT 4 /* 32 bit binary */ |
63 | #define TIF_32BIT 5 /* 32 bit binary */ | 63 | #define TIF_MEMDIE 5 |
64 | #define TIF_MEMDIE 6 | 64 | #define TIF_RESTORE_SIGMASK 6 /* restore saved signal mask */ |
65 | #define TIF_RESTORE_SIGMASK 7 /* restore saved signal mask */ | ||
66 | 65 | ||
67 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) | 66 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) |
68 | #define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) | ||
69 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) | 67 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) |
70 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) | 68 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) |
71 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) | 69 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) |
72 | #define _TIF_32BIT (1 << TIF_32BIT) | 70 | #define _TIF_32BIT (1 << TIF_32BIT) |
73 | #define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK) | 71 | #define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK) |
74 | 72 | ||
75 | #define _TIF_USER_WORK_MASK (_TIF_NOTIFY_RESUME | _TIF_SIGPENDING | \ | 73 | #define _TIF_USER_WORK_MASK (_TIF_SIGPENDING | \ |
76 | _TIF_NEED_RESCHED | _TIF_RESTORE_SIGMASK) | 74 | _TIF_NEED_RESCHED | _TIF_RESTORE_SIGMASK) |
77 | 75 | ||
78 | #endif /* __KERNEL__ */ | 76 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-powerpc/bug.h b/include/asm-powerpc/bug.h index f6fa39474846..a248b8bd4d7c 100644 --- a/include/asm-powerpc/bug.h +++ b/include/asm-powerpc/bug.h | |||
@@ -79,7 +79,7 @@ | |||
79 | _EMIT_BUG_ENTRY \ | 79 | _EMIT_BUG_ENTRY \ |
80 | : : "i" (__FILE__), "i" (__LINE__), "i" (0), \ | 80 | : : "i" (__FILE__), "i" (__LINE__), "i" (0), \ |
81 | "i" (sizeof(struct bug_entry)), \ | 81 | "i" (sizeof(struct bug_entry)), \ |
82 | "r" ((long)(x))); \ | 82 | "r" ((__force long)(x))); \ |
83 | } \ | 83 | } \ |
84 | } while (0) | 84 | } while (0) |
85 | 85 | ||
diff --git a/include/asm-powerpc/page.h b/include/asm-powerpc/page.h index 10c51f457d48..236a9210e5fc 100644 --- a/include/asm-powerpc/page.h +++ b/include/asm-powerpc/page.h | |||
@@ -190,7 +190,6 @@ extern void copy_user_page(void *to, void *from, unsigned long vaddr, | |||
190 | extern int page_is_ram(unsigned long pfn); | 190 | extern int page_is_ram(unsigned long pfn); |
191 | 191 | ||
192 | struct vm_area_struct; | 192 | struct vm_area_struct; |
193 | extern const char *arch_vma_name(struct vm_area_struct *vma); | ||
194 | 193 | ||
195 | #include <asm-generic/memory_model.h> | 194 | #include <asm-generic/memory_model.h> |
196 | #endif /* __ASSEMBLY__ */ | 195 | #endif /* __ASSEMBLY__ */ |
diff --git a/include/asm-powerpc/pci-bridge.h b/include/asm-powerpc/pci-bridge.h index e72c2a60853c..e909769b6410 100644 --- a/include/asm-powerpc/pci-bridge.h +++ b/include/asm-powerpc/pci-bridge.h | |||
@@ -45,10 +45,17 @@ struct pci_controller { | |||
45 | * on Freescale PCI-e controllers since they used the PCI_PRIMARY_BUS | 45 | * on Freescale PCI-e controllers since they used the PCI_PRIMARY_BUS |
46 | * to determine which bus number to match on when generating type0 | 46 | * to determine which bus number to match on when generating type0 |
47 | * config cycles | 47 | * config cycles |
48 | * NO_PCIE_LINK - the Freescale PCI-e controllers have issues with | ||
49 | * hanging if we don't have link and try to do config cycles to | ||
50 | * anything but the PHB. Only allow talking to the PHB if this is | ||
51 | * set. | ||
52 | * BIG_ENDIAN - cfg_addr is a big endian register | ||
48 | */ | 53 | */ |
49 | #define PPC_INDIRECT_TYPE_SET_CFG_TYPE (0x00000001) | 54 | #define PPC_INDIRECT_TYPE_SET_CFG_TYPE (0x00000001) |
50 | #define PPC_INDIRECT_TYPE_EXT_REG (0x00000002) | 55 | #define PPC_INDIRECT_TYPE_EXT_REG (0x00000002) |
51 | #define PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS (0x00000004) | 56 | #define PPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS (0x00000004) |
57 | #define PPC_INDIRECT_TYPE_NO_PCIE_LINK (0x00000008) | ||
58 | #define PPC_INDIRECT_TYPE_BIG_ENDIAN (0x00000010) | ||
52 | u32 indirect_type; | 59 | u32 indirect_type; |
53 | 60 | ||
54 | /* Currently, we limit ourselves to 1 IO range and 3 mem | 61 | /* Currently, we limit ourselves to 1 IO range and 3 mem |
@@ -64,6 +71,14 @@ static inline struct pci_controller *pci_bus_to_host(struct pci_bus *bus) | |||
64 | return bus->sysdata; | 71 | return bus->sysdata; |
65 | } | 72 | } |
66 | 73 | ||
74 | static inline int isa_vaddr_is_ioport(void __iomem *address) | ||
75 | { | ||
76 | /* No specific ISA handling on ppc32 at this stage, it | ||
77 | * all goes through PCI | ||
78 | */ | ||
79 | return 0; | ||
80 | } | ||
81 | |||
67 | /* These are used for config access before all the PCI probing | 82 | /* These are used for config access before all the PCI probing |
68 | has been done. */ | 83 | has been done. */ |
69 | int early_read_config_byte(struct pci_controller *hose, int bus, int dev_fn, | 84 | int early_read_config_byte(struct pci_controller *hose, int bus, int dev_fn, |
@@ -79,11 +94,14 @@ int early_write_config_word(struct pci_controller *hose, int bus, int dev_fn, | |||
79 | int early_write_config_dword(struct pci_controller *hose, int bus, int dev_fn, | 94 | int early_write_config_dword(struct pci_controller *hose, int bus, int dev_fn, |
80 | int where, u32 val); | 95 | int where, u32 val); |
81 | 96 | ||
82 | extern void setup_indirect_pci_nomap(struct pci_controller* hose, | 97 | extern int early_find_capability(struct pci_controller *hose, int bus, |
83 | void __iomem *cfg_addr, void __iomem *cfg_data); | 98 | int dev_fn, int cap); |
99 | |||
84 | extern void setup_indirect_pci(struct pci_controller* hose, | 100 | extern void setup_indirect_pci(struct pci_controller* hose, |
85 | u32 cfg_addr, u32 cfg_data); | 101 | u32 cfg_addr, u32 cfg_data, u32 flags); |
86 | extern void setup_grackle(struct pci_controller *hose); | 102 | extern void setup_grackle(struct pci_controller *hose); |
103 | extern void __init update_bridge_resource(struct pci_dev *dev, | ||
104 | struct resource *res); | ||
87 | 105 | ||
88 | #else | 106 | #else |
89 | 107 | ||
@@ -231,6 +249,13 @@ extern void pcibios_free_controller(struct pci_controller *phb); | |||
231 | 249 | ||
232 | extern void isa_bridge_find_early(struct pci_controller *hose); | 250 | extern void isa_bridge_find_early(struct pci_controller *hose); |
233 | 251 | ||
252 | static inline int isa_vaddr_is_ioport(void __iomem *address) | ||
253 | { | ||
254 | /* Check if address hits the reserved legacy IO range */ | ||
255 | unsigned long ea = (unsigned long)address; | ||
256 | return ea >= ISA_IO_BASE && ea < ISA_IO_END; | ||
257 | } | ||
258 | |||
234 | extern int pcibios_unmap_io_space(struct pci_bus *bus); | 259 | extern int pcibios_unmap_io_space(struct pci_bus *bus); |
235 | extern int pcibios_map_io_space(struct pci_bus *bus); | 260 | extern int pcibios_map_io_space(struct pci_bus *bus); |
236 | 261 | ||
@@ -261,11 +286,16 @@ extern struct pci_controller * | |||
261 | pcibios_alloc_controller(struct device_node *dev); | 286 | pcibios_alloc_controller(struct device_node *dev); |
262 | #ifdef CONFIG_PCI | 287 | #ifdef CONFIG_PCI |
263 | extern unsigned long pci_address_to_pio(phys_addr_t address); | 288 | extern unsigned long pci_address_to_pio(phys_addr_t address); |
289 | extern int pcibios_vaddr_is_ioport(void __iomem *address); | ||
264 | #else | 290 | #else |
265 | static inline unsigned long pci_address_to_pio(phys_addr_t address) | 291 | static inline unsigned long pci_address_to_pio(phys_addr_t address) |
266 | { | 292 | { |
267 | return (unsigned long)-1; | 293 | return (unsigned long)-1; |
268 | } | 294 | } |
295 | static inline int pcibios_vaddr_is_ioport(void __iomem *address) | ||
296 | { | ||
297 | return 0; | ||
298 | } | ||
269 | #endif | 299 | #endif |
270 | 300 | ||
271 | 301 | ||
diff --git a/include/asm-powerpc/ppc_asm.h b/include/asm-powerpc/ppc_asm.h index fa083d8e4663..65325721446d 100644 --- a/include/asm-powerpc/ppc_asm.h +++ b/include/asm-powerpc/ppc_asm.h | |||
@@ -181,6 +181,18 @@ name: \ | |||
181 | .type GLUE(.,name),@function; \ | 181 | .type GLUE(.,name),@function; \ |
182 | GLUE(.,name): | 182 | GLUE(.,name): |
183 | 183 | ||
184 | #define _INIT_STATIC(name) \ | ||
185 | .section ".text.init.refok"; \ | ||
186 | .align 2 ; \ | ||
187 | .section ".opd","aw"; \ | ||
188 | name: \ | ||
189 | .quad GLUE(.,name); \ | ||
190 | .quad .TOC.@tocbase; \ | ||
191 | .quad 0; \ | ||
192 | .previous; \ | ||
193 | .type GLUE(.,name),@function; \ | ||
194 | GLUE(.,name): | ||
195 | |||
184 | #else /* 32-bit */ | 196 | #else /* 32-bit */ |
185 | 197 | ||
186 | #define _GLOBAL(n) \ | 198 | #define _GLOBAL(n) \ |
diff --git a/include/asm-powerpc/thread_info.h b/include/asm-powerpc/thread_info.h index 9d9aeca8ad22..40d5f98c44fc 100644 --- a/include/asm-powerpc/thread_info.h +++ b/include/asm-powerpc/thread_info.h | |||
@@ -107,28 +107,26 @@ static inline struct thread_info *current_thread_info(void) | |||
107 | * thread information flag bit numbers | 107 | * thread information flag bit numbers |
108 | */ | 108 | */ |
109 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ | 109 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ |
110 | #define TIF_NOTIFY_RESUME 1 /* resumption notification requested */ | 110 | #define TIF_SIGPENDING 1 /* signal pending */ |
111 | #define TIF_SIGPENDING 2 /* signal pending */ | 111 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ |
112 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ | 112 | #define TIF_POLLING_NRFLAG 3 /* true if poll_idle() is polling |
113 | #define TIF_POLLING_NRFLAG 4 /* true if poll_idle() is polling | ||
114 | TIF_NEED_RESCHED */ | 113 | TIF_NEED_RESCHED */ |
115 | #define TIF_32BIT 5 /* 32 bit binary */ | 114 | #define TIF_32BIT 4 /* 32 bit binary */ |
116 | #define TIF_PERFMON_WORK 6 /* work for pfm_handle_work() */ | 115 | #define TIF_PERFMON_WORK 5 /* work for pfm_handle_work() */ |
117 | #define TIF_PERFMON_CTXSW 7 /* perfmon needs ctxsw calls */ | 116 | #define TIF_PERFMON_CTXSW 6 /* perfmon needs ctxsw calls */ |
118 | #define TIF_SYSCALL_AUDIT 8 /* syscall auditing active */ | 117 | #define TIF_SYSCALL_AUDIT 7 /* syscall auditing active */ |
119 | #define TIF_SINGLESTEP 9 /* singlestepping active */ | 118 | #define TIF_SINGLESTEP 8 /* singlestepping active */ |
120 | #define TIF_MEMDIE 10 | 119 | #define TIF_MEMDIE 9 |
121 | #define TIF_SECCOMP 11 /* secure computing */ | 120 | #define TIF_SECCOMP 10 /* secure computing */ |
122 | #define TIF_RESTOREALL 12 /* Restore all regs (implies NOERROR) */ | 121 | #define TIF_RESTOREALL 11 /* Restore all regs (implies NOERROR) */ |
123 | #define TIF_NOERROR 14 /* Force successful syscall return */ | 122 | #define TIF_NOERROR 12 /* Force successful syscall return */ |
124 | #define TIF_RESTORE_SIGMASK 15 /* Restore signal mask in do_signal */ | 123 | #define TIF_RESTORE_SIGMASK 13 /* Restore signal mask in do_signal */ |
125 | #define TIF_FREEZE 16 /* Freezing for suspend */ | 124 | #define TIF_FREEZE 14 /* Freezing for suspend */ |
126 | #define TIF_RUNLATCH 17 /* Is the runlatch enabled? */ | 125 | #define TIF_RUNLATCH 15 /* Is the runlatch enabled? */ |
127 | #define TIF_ABI_PENDING 18 /* 32/64 bit switch needed */ | 126 | #define TIF_ABI_PENDING 16 /* 32/64 bit switch needed */ |
128 | 127 | ||
129 | /* as above, but as bit values */ | 128 | /* as above, but as bit values */ |
130 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 129 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
131 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | ||
132 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | 130 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) |
133 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 131 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
134 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 132 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
@@ -146,7 +144,7 @@ static inline struct thread_info *current_thread_info(void) | |||
146 | #define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING) | 144 | #define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING) |
147 | #define _TIF_SYSCALL_T_OR_A (_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP) | 145 | #define _TIF_SYSCALL_T_OR_A (_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP) |
148 | 146 | ||
149 | #define _TIF_USER_WORK_MASK (_TIF_NOTIFY_RESUME | _TIF_SIGPENDING | \ | 147 | #define _TIF_USER_WORK_MASK ( _TIF_SIGPENDING | \ |
150 | _TIF_NEED_RESCHED | _TIF_RESTORE_SIGMASK) | 148 | _TIF_NEED_RESCHED | _TIF_RESTORE_SIGMASK) |
151 | #define _TIF_PERSYSCALL_MASK (_TIF_RESTOREALL|_TIF_NOERROR) | 149 | #define _TIF_PERSYSCALL_MASK (_TIF_RESTOREALL|_TIF_NOERROR) |
152 | 150 | ||
diff --git a/include/asm-powerpc/vio.h b/include/asm-powerpc/vio.h index 0117b544ecbc..3a0975e2adad 100644 --- a/include/asm-powerpc/vio.h +++ b/include/asm-powerpc/vio.h | |||
@@ -80,6 +80,11 @@ extern const void *vio_get_attribute(struct vio_dev *vdev, char *which, | |||
80 | extern struct vio_dev *vio_find_node(struct device_node *vnode); | 80 | extern struct vio_dev *vio_find_node(struct device_node *vnode); |
81 | extern int vio_enable_interrupts(struct vio_dev *dev); | 81 | extern int vio_enable_interrupts(struct vio_dev *dev); |
82 | extern int vio_disable_interrupts(struct vio_dev *dev); | 82 | extern int vio_disable_interrupts(struct vio_dev *dev); |
83 | #else | ||
84 | static inline int vio_enable_interrupts(struct vio_dev *dev) | ||
85 | { | ||
86 | return 0; | ||
87 | } | ||
83 | #endif | 88 | #endif |
84 | 89 | ||
85 | static inline struct vio_driver *to_vio_driver(struct device_driver *drv) | 90 | static inline struct vio_driver *to_vio_driver(struct device_driver *drv) |
diff --git a/include/asm-s390/ccwdev.h b/include/asm-s390/ccwdev.h index 4c2e1710f157..1aeda27d5a8b 100644 --- a/include/asm-s390/ccwdev.h +++ b/include/asm-s390/ccwdev.h | |||
@@ -165,11 +165,6 @@ extern int ccw_device_resume(struct ccw_device *); | |||
165 | extern int ccw_device_halt(struct ccw_device *, unsigned long); | 165 | extern int ccw_device_halt(struct ccw_device *, unsigned long); |
166 | extern int ccw_device_clear(struct ccw_device *, unsigned long); | 166 | extern int ccw_device_clear(struct ccw_device *, unsigned long); |
167 | 167 | ||
168 | extern int __deprecated read_dev_chars(struct ccw_device *cdev, void **buffer, int length); | ||
169 | extern int __deprecated read_conf_data(struct ccw_device *cdev, void **buffer, int *length); | ||
170 | extern int __deprecated read_conf_data_lpm(struct ccw_device *cdev, void **buffer, | ||
171 | int *length, __u8 lpm); | ||
172 | |||
173 | extern int ccw_device_set_online(struct ccw_device *cdev); | 168 | extern int ccw_device_set_online(struct ccw_device *cdev); |
174 | extern int ccw_device_set_offline(struct ccw_device *cdev); | 169 | extern int ccw_device_set_offline(struct ccw_device *cdev); |
175 | 170 | ||
diff --git a/include/asm-s390/s390_ext.h b/include/asm-s390/s390_ext.h index df9b1017b703..1e72362cad78 100644 --- a/include/asm-s390/s390_ext.h +++ b/include/asm-s390/s390_ext.h | |||
@@ -10,6 +10,8 @@ | |||
10 | * Martin Schwidefsky (schwidefsky@de.ibm.com) | 10 | * Martin Schwidefsky (schwidefsky@de.ibm.com) |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/types.h> | ||
14 | |||
13 | typedef void (*ext_int_handler_t)(__u16 code); | 15 | typedef void (*ext_int_handler_t)(__u16 code); |
14 | 16 | ||
15 | /* | 17 | /* |
diff --git a/include/asm-s390/smp.h b/include/asm-s390/smp.h index 76e424f718c6..07708c07701e 100644 --- a/include/asm-s390/smp.h +++ b/include/asm-s390/smp.h | |||
@@ -36,8 +36,7 @@ extern void machine_halt_smp(void); | |||
36 | extern void machine_power_off_smp(void); | 36 | extern void machine_power_off_smp(void); |
37 | 37 | ||
38 | extern void smp_setup_cpu_possible_map(void); | 38 | extern void smp_setup_cpu_possible_map(void); |
39 | extern int smp_call_function_on(void (*func) (void *info), void *info, | 39 | |
40 | int nonatomic, int wait, int cpu); | ||
41 | #define NO_PROC_ID 0xFF /* No processor magic marker */ | 40 | #define NO_PROC_ID 0xFF /* No processor magic marker */ |
42 | 41 | ||
43 | /* | 42 | /* |
@@ -96,14 +95,6 @@ extern int __cpu_up (unsigned int cpu); | |||
96 | #endif | 95 | #endif |
97 | 96 | ||
98 | #ifndef CONFIG_SMP | 97 | #ifndef CONFIG_SMP |
99 | static inline int | ||
100 | smp_call_function_on(void (*func) (void *info), void *info, | ||
101 | int nonatomic, int wait, int cpu) | ||
102 | { | ||
103 | func(info); | ||
104 | return 0; | ||
105 | } | ||
106 | |||
107 | static inline void smp_send_stop(void) | 98 | static inline void smp_send_stop(void) |
108 | { | 99 | { |
109 | /* Disable all interrupts/machine checks */ | 100 | /* Disable all interrupts/machine checks */ |
diff --git a/include/asm-s390/unistd.h b/include/asm-s390/unistd.h index 790c1c557417..f04acb2670a8 100644 --- a/include/asm-s390/unistd.h +++ b/include/asm-s390/unistd.h | |||
@@ -251,7 +251,7 @@ | |||
251 | #define __NR_getcpu 311 | 251 | #define __NR_getcpu 311 |
252 | #define __NR_epoll_pwait 312 | 252 | #define __NR_epoll_pwait 312 |
253 | #define __NR_utimes 313 | 253 | #define __NR_utimes 313 |
254 | /* Number 314 is reserved for new sys_fallocate */ | 254 | #define __NR_fallocate 314 |
255 | #define __NR_utimensat 315 | 255 | #define __NR_utimensat 315 |
256 | #define __NR_signalfd 316 | 256 | #define __NR_signalfd 316 |
257 | #define __NR_timerfd 317 | 257 | #define __NR_timerfd 317 |
diff --git a/include/asm-sh/bugs.h b/include/asm-sh/bugs.h index aeee8da9c54f..b66139ff73fc 100644 --- a/include/asm-sh/bugs.h +++ b/include/asm-sh/bugs.h | |||
@@ -29,7 +29,7 @@ static void __init check_bugs(void) | |||
29 | *p++ = '2'; | 29 | *p++ = '2'; |
30 | *p++ = 'a'; | 30 | *p++ = 'a'; |
31 | break; | 31 | break; |
32 | case CPU_SH7705 ... CPU_SH7300: | 32 | case CPU_SH7705 ... CPU_SH7729: |
33 | *p++ = '3'; | 33 | *p++ = '3'; |
34 | break; | 34 | break; |
35 | case CPU_SH7750 ... CPU_SH4_501: | 35 | case CPU_SH7750 ... CPU_SH4_501: |
@@ -39,7 +39,7 @@ static void __init check_bugs(void) | |||
39 | *p++ = '4'; | 39 | *p++ = '4'; |
40 | *p++ = 'a'; | 40 | *p++ = 'a'; |
41 | break; | 41 | break; |
42 | case CPU_SH73180 ... CPU_SH7722: | 42 | case CPU_SH7343 ... CPU_SH7722: |
43 | *p++ = '4'; | 43 | *p++ = '4'; |
44 | *p++ = 'a'; | 44 | *p++ = 'a'; |
45 | *p++ = 'l'; | 45 | *p++ = 'l'; |
diff --git a/include/asm-sh/cpu-sh3/freq.h b/include/asm-sh/cpu-sh3/freq.h index 273f3229785c..0a054b53b9de 100644 --- a/include/asm-sh/cpu-sh3/freq.h +++ b/include/asm-sh/cpu-sh3/freq.h | |||
@@ -10,11 +10,7 @@ | |||
10 | #ifndef __ASM_CPU_SH3_FREQ_H | 10 | #ifndef __ASM_CPU_SH3_FREQ_H |
11 | #define __ASM_CPU_SH3_FREQ_H | 11 | #define __ASM_CPU_SH3_FREQ_H |
12 | 12 | ||
13 | #if defined(CONFIG_CPU_SUBTYPE_SH7300) | ||
14 | #define FRQCR 0xa415ff80 | ||
15 | #else | ||
16 | #define FRQCR 0xffffff80 | 13 | #define FRQCR 0xffffff80 |
17 | #endif | ||
18 | #define MIN_DIVISOR_NR 0 | 14 | #define MIN_DIVISOR_NR 0 |
19 | #define MAX_DIVISOR_NR 4 | 15 | #define MAX_DIVISOR_NR 4 |
20 | 16 | ||
diff --git a/include/asm-sh/cpu-sh3/mmu_context.h b/include/asm-sh/cpu-sh3/mmu_context.h index 4704e86dff5b..b20786d42d09 100644 --- a/include/asm-sh/cpu-sh3/mmu_context.h +++ b/include/asm-sh/cpu-sh3/mmu_context.h | |||
@@ -30,7 +30,6 @@ | |||
30 | #if defined(CONFIG_CPU_SUBTYPE_SH7707) || \ | 30 | #if defined(CONFIG_CPU_SUBTYPE_SH7707) || \ |
31 | defined(CONFIG_CPU_SUBTYPE_SH7709) || \ | 31 | defined(CONFIG_CPU_SUBTYPE_SH7709) || \ |
32 | defined(CONFIG_CPU_SUBTYPE_SH7706) || \ | 32 | defined(CONFIG_CPU_SUBTYPE_SH7706) || \ |
33 | defined(CONFIG_CPU_SUBTYPE_SH7300) || \ | ||
34 | defined(CONFIG_CPU_SUBTYPE_SH7705) || \ | 33 | defined(CONFIG_CPU_SUBTYPE_SH7705) || \ |
35 | defined(CONFIG_CPU_SUBTYPE_SH7712) || \ | 34 | defined(CONFIG_CPU_SUBTYPE_SH7712) || \ |
36 | defined(CONFIG_CPU_SUBTYPE_SH7710) | 35 | defined(CONFIG_CPU_SUBTYPE_SH7710) |
diff --git a/include/asm-sh/cpu-sh3/timer.h b/include/asm-sh/cpu-sh3/timer.h index 4928b08f9d19..b6c2020a2ad3 100644 --- a/include/asm-sh/cpu-sh3/timer.h +++ b/include/asm-sh/cpu-sh3/timer.h | |||
@@ -19,7 +19,6 @@ | |||
19 | * SH7729R | 19 | * SH7729R |
20 | * SH7710 | 20 | * SH7710 |
21 | * SH7720 | 21 | * SH7720 |
22 | * SH7300 | ||
23 | * SH7710 | 22 | * SH7710 |
24 | * --------------------------------------------------------------------------- | 23 | * --------------------------------------------------------------------------- |
25 | */ | 24 | */ |
@@ -28,7 +27,7 @@ | |||
28 | #define TMU_TOCR 0xfffffe90 /* Byte access */ | 27 | #define TMU_TOCR 0xfffffe90 /* Byte access */ |
29 | #endif | 28 | #endif |
30 | 29 | ||
31 | #if defined(CONFIG_CPU_SUBTYPE_SH7300) || defined(CONFIG_CPU_SUBTYPE_SH7710) | 30 | #if defined(CONFIG_CPU_SUBTYPE_SH7710) |
32 | #define TMU_012_TSTR 0xa412fe92 /* Byte access */ | 31 | #define TMU_012_TSTR 0xa412fe92 /* Byte access */ |
33 | 32 | ||
34 | #define TMU0_TCOR 0xa412fe94 /* Long access */ | 33 | #define TMU0_TCOR 0xa412fe94 /* Long access */ |
diff --git a/include/asm-sh/cpu-sh4/freq.h b/include/asm-sh/cpu-sh4/freq.h index 026025b51cea..dc1d32a86374 100644 --- a/include/asm-sh/cpu-sh4/freq.h +++ b/include/asm-sh/cpu-sh4/freq.h | |||
@@ -10,7 +10,7 @@ | |||
10 | #ifndef __ASM_CPU_SH4_FREQ_H | 10 | #ifndef __ASM_CPU_SH4_FREQ_H |
11 | #define __ASM_CPU_SH4_FREQ_H | 11 | #define __ASM_CPU_SH4_FREQ_H |
12 | 12 | ||
13 | #if defined(CONFIG_CPU_SUBTYPE_SH73180) || defined(CONFIG_CPU_SUBTYPE_SH7722) | 13 | #if defined(CONFIG_CPU_SUBTYPE_SH7722) |
14 | #define FRQCR 0xa4150000 | 14 | #define FRQCR 0xa4150000 |
15 | #define VCLKCR 0xa4150004 | 15 | #define VCLKCR 0xa4150004 |
16 | #define SCLKACR 0xa4150008 | 16 | #define SCLKACR 0xa4150008 |
diff --git a/include/asm-sh/dma-mapping.h b/include/asm-sh/dma-mapping.h index d3bc7818bbbe..6f492ac3fa13 100644 --- a/include/asm-sh/dma-mapping.h +++ b/include/asm-sh/dma-mapping.h | |||
@@ -69,11 +69,11 @@ static inline dma_addr_t dma_map_single(struct device *dev, | |||
69 | { | 69 | { |
70 | #if defined(CONFIG_PCI) && !defined(CONFIG_SH_PCIDMA_NONCOHERENT) | 70 | #if defined(CONFIG_PCI) && !defined(CONFIG_SH_PCIDMA_NONCOHERENT) |
71 | if (dev->bus == &pci_bus_type) | 71 | if (dev->bus == &pci_bus_type) |
72 | return virt_to_bus(ptr); | 72 | return virt_to_phys(ptr); |
73 | #endif | 73 | #endif |
74 | dma_cache_sync(dev, ptr, size, dir); | 74 | dma_cache_sync(dev, ptr, size, dir); |
75 | 75 | ||
76 | return virt_to_bus(ptr); | 76 | return virt_to_phys(ptr); |
77 | } | 77 | } |
78 | 78 | ||
79 | #define dma_unmap_single(dev, addr, size, dir) do { } while (0) | 79 | #define dma_unmap_single(dev, addr, size, dir) do { } while (0) |
@@ -116,7 +116,7 @@ static inline void dma_sync_single(struct device *dev, dma_addr_t dma_handle, | |||
116 | if (dev->bus == &pci_bus_type) | 116 | if (dev->bus == &pci_bus_type) |
117 | return; | 117 | return; |
118 | #endif | 118 | #endif |
119 | dma_cache_sync(dev, bus_to_virt(dma_handle), size, dir); | 119 | dma_cache_sync(dev, phys_to_virt(dma_handle), size, dir); |
120 | } | 120 | } |
121 | 121 | ||
122 | static inline void dma_sync_single_range(struct device *dev, | 122 | static inline void dma_sync_single_range(struct device *dev, |
@@ -128,7 +128,7 @@ static inline void dma_sync_single_range(struct device *dev, | |||
128 | if (dev->bus == &pci_bus_type) | 128 | if (dev->bus == &pci_bus_type) |
129 | return; | 129 | return; |
130 | #endif | 130 | #endif |
131 | dma_cache_sync(dev, bus_to_virt(dma_handle) + offset, size, dir); | 131 | dma_cache_sync(dev, phys_to_virt(dma_handle) + offset, size, dir); |
132 | } | 132 | } |
133 | 133 | ||
134 | static inline void dma_sync_sg(struct device *dev, struct scatterlist *sg, | 134 | static inline void dma_sync_sg(struct device *dev, struct scatterlist *sg, |
diff --git a/include/asm-sh/dma.h b/include/asm-sh/dma.h index 6034d4a29e73..4c75b70b6414 100644 --- a/include/asm-sh/dma.h +++ b/include/asm-sh/dma.h | |||
@@ -111,6 +111,7 @@ struct dma_info { | |||
111 | 111 | ||
112 | struct list_head list; | 112 | struct list_head list; |
113 | int first_channel_nr; | 113 | int first_channel_nr; |
114 | int first_vchannel_nr; | ||
114 | }; | 115 | }; |
115 | 116 | ||
116 | struct dma_chan_caps { | 117 | struct dma_chan_caps { |
diff --git a/include/asm-sh/fixmap.h b/include/asm-sh/fixmap.h index 458e9fa59545..8a566177ad96 100644 --- a/include/asm-sh/fixmap.h +++ b/include/asm-sh/fixmap.h | |||
@@ -46,6 +46,9 @@ | |||
46 | * fix-mapped? | 46 | * fix-mapped? |
47 | */ | 47 | */ |
48 | enum fixed_addresses { | 48 | enum fixed_addresses { |
49 | #define FIX_N_COLOURS 16 | ||
50 | FIX_CMAP_BEGIN, | ||
51 | FIX_CMAP_END = FIX_CMAP_BEGIN + FIX_N_COLOURS, | ||
49 | #ifdef CONFIG_HIGHMEM | 52 | #ifdef CONFIG_HIGHMEM |
50 | FIX_KMAP_BEGIN, /* reserved pte's for temporary kernel mappings */ | 53 | FIX_KMAP_BEGIN, /* reserved pte's for temporary kernel mappings */ |
51 | FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*NR_CPUS)-1, | 54 | FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*NR_CPUS)-1, |
@@ -53,8 +56,8 @@ enum fixed_addresses { | |||
53 | __end_of_fixed_addresses | 56 | __end_of_fixed_addresses |
54 | }; | 57 | }; |
55 | 58 | ||
56 | extern void __set_fixmap (enum fixed_addresses idx, | 59 | extern void __set_fixmap(enum fixed_addresses idx, |
57 | unsigned long phys, pgprot_t flags); | 60 | unsigned long phys, pgprot_t flags); |
58 | 61 | ||
59 | #define set_fixmap(idx, phys) \ | 62 | #define set_fixmap(idx, phys) \ |
60 | __set_fixmap(idx, phys, PAGE_KERNEL) | 63 | __set_fixmap(idx, phys, PAGE_KERNEL) |
@@ -106,5 +109,4 @@ static inline unsigned long virt_to_fix(const unsigned long vaddr) | |||
106 | BUG_ON(vaddr >= FIXADDR_TOP || vaddr < FIXADDR_START); | 109 | BUG_ON(vaddr >= FIXADDR_TOP || vaddr < FIXADDR_START); |
107 | return __virt_to_fix(vaddr); | 110 | return __virt_to_fix(vaddr); |
108 | } | 111 | } |
109 | |||
110 | #endif | 112 | #endif |
diff --git a/include/asm-sh/floppy.h b/include/asm-sh/floppy.h index dc1ad464fa32..3b59b3af777b 100644 --- a/include/asm-sh/floppy.h +++ b/include/asm-sh/floppy.h | |||
@@ -181,7 +181,7 @@ static void _fd_chose_dma_mode(char *addr, unsigned long size) | |||
181 | { | 181 | { |
182 | if(can_use_virtual_dma == 2) { | 182 | if(can_use_virtual_dma == 2) { |
183 | if((unsigned int) addr >= (unsigned int) high_memory || | 183 | if((unsigned int) addr >= (unsigned int) high_memory || |
184 | virt_to_bus(addr) >= 0x10000000) | 184 | virt_to_phys(addr) >= 0x10000000) |
185 | use_virtual_dma = 1; | 185 | use_virtual_dma = 1; |
186 | else | 186 | else |
187 | use_virtual_dma = 0; | 187 | use_virtual_dma = 0; |
@@ -219,7 +219,7 @@ static int hard_dma_setup(char *addr, unsigned long size, int mode, int io) | |||
219 | doing_pdma = 0; | 219 | doing_pdma = 0; |
220 | clear_dma_ff(FLOPPY_DMA); | 220 | clear_dma_ff(FLOPPY_DMA); |
221 | set_dma_mode(FLOPPY_DMA,mode); | 221 | set_dma_mode(FLOPPY_DMA,mode); |
222 | set_dma_addr(FLOPPY_DMA,virt_to_bus(addr)); | 222 | set_dma_addr(FLOPPY_DMA,virt_to_phys(addr)); |
223 | set_dma_count(FLOPPY_DMA,size); | 223 | set_dma_count(FLOPPY_DMA,size); |
224 | enable_dma(FLOPPY_DMA); | 224 | enable_dma(FLOPPY_DMA); |
225 | return 0; | 225 | return 0; |
diff --git a/include/asm-sh/io.h b/include/asm-sh/io.h index aa80930ce8e4..e6a1877dcb20 100644 --- a/include/asm-sh/io.h +++ b/include/asm-sh/io.h | |||
@@ -241,10 +241,6 @@ static inline void *phys_to_virt(unsigned long address) | |||
241 | #define virt_to_phys(address) ((unsigned long)(address)) | 241 | #define virt_to_phys(address) ((unsigned long)(address)) |
242 | #endif | 242 | #endif |
243 | 243 | ||
244 | #define virt_to_bus virt_to_phys | ||
245 | #define bus_to_virt phys_to_virt | ||
246 | #define page_to_bus page_to_phys | ||
247 | |||
248 | /* | 244 | /* |
249 | * readX/writeX() are used to access memory mapped devices. On some | 245 | * readX/writeX() are used to access memory mapped devices. On some |
250 | * architectures the memory mapped IO stuff needs to be accessed | 246 | * architectures the memory mapped IO stuff needs to be accessed |
diff --git a/include/asm-sh/pgtable.h b/include/asm-sh/pgtable.h index 22efffe45019..e3fae12c0e49 100644 --- a/include/asm-sh/pgtable.h +++ b/include/asm-sh/pgtable.h | |||
@@ -55,11 +55,7 @@ extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)]; | |||
55 | 55 | ||
56 | #define PTE_PHYS_MASK (0x20000000 - PAGE_SIZE) | 56 | #define PTE_PHYS_MASK (0x20000000 - PAGE_SIZE) |
57 | 57 | ||
58 | /* | 58 | #define VMALLOC_START (P3SEG) |
59 | * First 1MB map is used by fixed purpose. | ||
60 | * Currently only 4-entry (16kB) is used (see arch/sh/mm/cache.c) | ||
61 | */ | ||
62 | #define VMALLOC_START (P3SEG+0x00100000) | ||
63 | #define VMALLOC_END (FIXADDR_START-2*PAGE_SIZE) | 59 | #define VMALLOC_END (FIXADDR_START-2*PAGE_SIZE) |
64 | 60 | ||
65 | /* | 61 | /* |
diff --git a/include/asm-sh/processor.h b/include/asm-sh/processor.h index 2252e75daa26..26d52174f4b4 100644 --- a/include/asm-sh/processor.h +++ b/include/asm-sh/processor.h | |||
@@ -45,7 +45,7 @@ enum cpu_type { | |||
45 | CPU_SH7705, CPU_SH7706, CPU_SH7707, | 45 | CPU_SH7705, CPU_SH7706, CPU_SH7707, |
46 | CPU_SH7708, CPU_SH7708S, CPU_SH7708R, | 46 | CPU_SH7708, CPU_SH7708S, CPU_SH7708R, |
47 | CPU_SH7709, CPU_SH7709A, CPU_SH7710, CPU_SH7712, | 47 | CPU_SH7709, CPU_SH7709A, CPU_SH7710, CPU_SH7712, |
48 | CPU_SH7729, CPU_SH7300, | 48 | CPU_SH7729, |
49 | 49 | ||
50 | /* SH-4 types */ | 50 | /* SH-4 types */ |
51 | CPU_SH7750, CPU_SH7750S, CPU_SH7750R, CPU_SH7751, CPU_SH7751R, | 51 | CPU_SH7750, CPU_SH7750S, CPU_SH7750R, CPU_SH7751, CPU_SH7751R, |
@@ -55,7 +55,7 @@ enum cpu_type { | |||
55 | CPU_SH7770, CPU_SH7780, CPU_SH7781, CPU_SH7785, CPU_SHX3, | 55 | CPU_SH7770, CPU_SH7780, CPU_SH7781, CPU_SH7785, CPU_SHX3, |
56 | 56 | ||
57 | /* SH4AL-DSP types */ | 57 | /* SH4AL-DSP types */ |
58 | CPU_SH73180, CPU_SH7343, CPU_SH7722, | 58 | CPU_SH7343, CPU_SH7722, |
59 | 59 | ||
60 | /* Unknown subtype */ | 60 | /* Unknown subtype */ |
61 | CPU_SH_NONE | 61 | CPU_SH_NONE |
diff --git a/include/asm-sh/se7300.h b/include/asm-sh/se7300.h deleted file mode 100644 index 4e24edccb30d..000000000000 --- a/include/asm-sh/se7300.h +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
1 | #ifndef __ASM_SH_HITACHI_SE7300_H | ||
2 | #define __ASM_SH_HITACHI_SE7300_H | ||
3 | |||
4 | /* | ||
5 | * linux/include/asm-sh/se/se7300.h | ||
6 | * | ||
7 | * Copyright (C) 2003 Takashi Kusuda <kusuda-takashi@hitachi-ul.co.jp> | ||
8 | * | ||
9 | * SH-Mobile SolutionEngine 7300 support | ||
10 | */ | ||
11 | |||
12 | /* Box specific addresses. */ | ||
13 | |||
14 | /* Area 0 */ | ||
15 | #define PA_ROM 0x00000000 /* EPROM */ | ||
16 | #define PA_ROM_SIZE 0x00400000 /* EPROM size 4M byte(Actually 2MB) */ | ||
17 | #define PA_FROM 0x00400000 /* Flash ROM */ | ||
18 | #define PA_FROM_SIZE 0x00400000 /* Flash size 4M byte */ | ||
19 | #define PA_SRAM 0x00800000 /* SRAM */ | ||
20 | #define PA_FROM_SIZE 0x00400000 /* SRAM size 4M byte */ | ||
21 | /* Area 1 */ | ||
22 | #define PA_EXT1 0x04000000 | ||
23 | #define PA_EXT1_SIZE 0x04000000 | ||
24 | /* Area 2 */ | ||
25 | #define PA_EXT2 0x08000000 | ||
26 | #define PA_EXT2_SIZE 0x04000000 | ||
27 | /* Area 3 */ | ||
28 | #define PA_SDRAM 0x0c000000 | ||
29 | #define PA_SDRAM_SIZE 0x04000000 | ||
30 | /* Area 4 */ | ||
31 | #define PA_PCIC 0x10000000 /* MR-SHPC-01 PCMCIA */ | ||
32 | #define PA_MRSHPC 0xb03fffe0 /* MR-SHPC-01 PCMCIA controller */ | ||
33 | #define PA_MRSHPC_MW1 0xb0400000 /* MR-SHPC-01 memory window base */ | ||
34 | #define PA_MRSHPC_MW2 0xb0500000 /* MR-SHPC-01 attribute window base */ | ||
35 | #define PA_MRSHPC_IO 0xb0600000 /* MR-SHPC-01 I/O window base */ | ||
36 | #define MRSHPC_OPTION (PA_MRSHPC + 6) | ||
37 | #define MRSHPC_CSR (PA_MRSHPC + 8) | ||
38 | #define MRSHPC_ISR (PA_MRSHPC + 10) | ||
39 | #define MRSHPC_ICR (PA_MRSHPC + 12) | ||
40 | #define MRSHPC_CPWCR (PA_MRSHPC + 14) | ||
41 | #define MRSHPC_MW0CR1 (PA_MRSHPC + 16) | ||
42 | #define MRSHPC_MW1CR1 (PA_MRSHPC + 18) | ||
43 | #define MRSHPC_IOWCR1 (PA_MRSHPC + 20) | ||
44 | #define MRSHPC_MW0CR2 (PA_MRSHPC + 22) | ||
45 | #define MRSHPC_MW1CR2 (PA_MRSHPC + 24) | ||
46 | #define MRSHPC_IOWCR2 (PA_MRSHPC + 26) | ||
47 | #define MRSHPC_CDCR (PA_MRSHPC + 28) | ||
48 | #define MRSHPC_PCIC_INFO (PA_MRSHPC + 30) | ||
49 | #define PA_LED 0xb0800000 /* LED */ | ||
50 | #define PA_DIPSW 0xb0900000 /* Dip switch 31 */ | ||
51 | #define PA_EPLD_MODESET 0xb0a00000 /* FPGA Mode set register */ | ||
52 | #define PA_EPLD_ST1 0xb0a80000 /* FPGA Interrupt status register1 */ | ||
53 | #define PA_EPLD_ST2 0xb0ac0000 /* FPGA Interrupt status register2 */ | ||
54 | /* Area 5 */ | ||
55 | #define PA_EXT5 0x14000000 | ||
56 | #define PA_EXT5_SIZE 0x04000000 | ||
57 | /* Area 6 */ | ||
58 | #define PA_LCD1 0xb8000000 | ||
59 | #define PA_LCD2 0xb8800000 | ||
60 | |||
61 | #define __IO_PREFIX sh7300se | ||
62 | #include <asm/io_generic.h> | ||
63 | |||
64 | #endif /* __ASM_SH_HITACHI_SE7300_H */ | ||
diff --git a/include/asm-sh/se73180.h b/include/asm-sh/se73180.h deleted file mode 100644 index 907c062b4c9a..000000000000 --- a/include/asm-sh/se73180.h +++ /dev/null | |||
@@ -1,66 +0,0 @@ | |||
1 | #ifndef __ASM_SH_SE73180_H | ||
2 | #define __ASM_SH_SE73180_H | ||
3 | |||
4 | /* | ||
5 | * Copyright (C) 2003 Takashi Kusuda <kusuda-takashi@hitachi-ul.co.jp> | ||
6 | * | ||
7 | * SH-Mobile SolutionEngine 73180 support | ||
8 | */ | ||
9 | |||
10 | /* Box specific addresses. */ | ||
11 | |||
12 | /* Area 0 */ | ||
13 | #define PA_ROM 0x00000000 /* EPROM */ | ||
14 | #define PA_ROM_SIZE 0x00400000 /* EPROM size 4M byte(Actually 2MB) */ | ||
15 | #define PA_FROM 0x00400000 /* Flash ROM */ | ||
16 | #define PA_FROM_SIZE 0x00400000 /* Flash size 4M byte */ | ||
17 | #define PA_SRAM 0x00800000 /* SRAM */ | ||
18 | #define PA_FROM_SIZE 0x00400000 /* SRAM size 4M byte */ | ||
19 | /* Area 1 */ | ||
20 | #define PA_EXT1 0x04000000 | ||
21 | #define PA_EXT1_SIZE 0x04000000 | ||
22 | /* Area 2 */ | ||
23 | #define PA_EXT2 0x08000000 | ||
24 | #define PA_EXT2_SIZE 0x04000000 | ||
25 | /* Area 3 */ | ||
26 | #define PA_SDRAM 0x0c000000 | ||
27 | #define PA_SDRAM_SIZE 0x04000000 | ||
28 | /* Area 4 */ | ||
29 | #define PA_PCIC 0x10000000 /* MR-SHPC-01 PCMCIA */ | ||
30 | #define PA_MRSHPC 0xb03fffe0 /* MR-SHPC-01 PCMCIA controller */ | ||
31 | #define PA_MRSHPC_MW1 0xb0400000 /* MR-SHPC-01 memory window base */ | ||
32 | #define PA_MRSHPC_MW2 0xb0500000 /* MR-SHPC-01 attribute window base */ | ||
33 | #define PA_MRSHPC_IO 0xb0600000 /* MR-SHPC-01 I/O window base */ | ||
34 | #define MRSHPC_OPTION (PA_MRSHPC + 6) | ||
35 | #define MRSHPC_CSR (PA_MRSHPC + 8) | ||
36 | #define MRSHPC_ISR (PA_MRSHPC + 10) | ||
37 | #define MRSHPC_ICR (PA_MRSHPC + 12) | ||
38 | #define MRSHPC_CPWCR (PA_MRSHPC + 14) | ||
39 | #define MRSHPC_MW0CR1 (PA_MRSHPC + 16) | ||
40 | #define MRSHPC_MW1CR1 (PA_MRSHPC + 18) | ||
41 | #define MRSHPC_IOWCR1 (PA_MRSHPC + 20) | ||
42 | #define MRSHPC_MW0CR2 (PA_MRSHPC + 22) | ||
43 | #define MRSHPC_MW1CR2 (PA_MRSHPC + 24) | ||
44 | #define MRSHPC_IOWCR2 (PA_MRSHPC + 26) | ||
45 | #define MRSHPC_CDCR (PA_MRSHPC + 28) | ||
46 | #define MRSHPC_PCIC_INFO (PA_MRSHPC + 30) | ||
47 | #define PA_LED 0xb0C00000 /* LED */ | ||
48 | #define LED_SHIFT 0 | ||
49 | #define PA_DIPSW 0xb0900000 /* Dip switch 31 */ | ||
50 | #define PA_EPLD_MODESET 0xb0a00000 /* FPGA Mode set register */ | ||
51 | #define PA_EPLD_ST1 0xb0a80000 /* FPGA Interrupt status register1 */ | ||
52 | #define PA_EPLD_ST2 0xb0ac0000 /* FPGA Interrupt status register2 */ | ||
53 | /* Area 5 */ | ||
54 | #define PA_EXT5 0x14000000 | ||
55 | #define PA_EXT5_SIZE 0x04000000 | ||
56 | /* Area 6 */ | ||
57 | #define PA_LCD1 0xb8000000 | ||
58 | #define PA_LCD2 0xb8800000 | ||
59 | |||
60 | #define __IO_PREFIX sh73180se | ||
61 | #include <asm/io_generic.h> | ||
62 | |||
63 | /* arch/sh/boards/se/73180/irq.c */ | ||
64 | int shmse_irq_demux(int irq); | ||
65 | |||
66 | #endif /* __ASM_SH_SE73180_H */ | ||
diff --git a/include/asm-sh/thread_info.h b/include/asm-sh/thread_info.h index 31d55e3782d5..1f7e1deb8d92 100644 --- a/include/asm-sh/thread_info.h +++ b/include/asm-sh/thread_info.h | |||
@@ -107,18 +107,16 @@ static inline struct thread_info *current_thread_info(void) | |||
107 | * - other flags in MSW | 107 | * - other flags in MSW |
108 | */ | 108 | */ |
109 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ | 109 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ |
110 | #define TIF_NOTIFY_RESUME 1 /* resumption notification requested */ | 110 | #define TIF_SIGPENDING 1 /* signal pending */ |
111 | #define TIF_SIGPENDING 2 /* signal pending */ | 111 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ |
112 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ | 112 | #define TIF_RESTORE_SIGMASK 3 /* restore signal mask in do_signal() */ |
113 | #define TIF_RESTORE_SIGMASK 4 /* restore signal mask in do_signal() */ | 113 | #define TIF_SINGLESTEP 4 /* singlestepping active */ |
114 | #define TIF_SINGLESTEP 5 /* singlestepping active */ | ||
115 | #define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ | 114 | #define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ |
116 | #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | 115 | #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ |
117 | #define TIF_MEMDIE 18 | 116 | #define TIF_MEMDIE 18 |
118 | #define TIF_FREEZE 19 | 117 | #define TIF_FREEZE 19 |
119 | 118 | ||
120 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 119 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
121 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | ||
122 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | 120 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) |
123 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 121 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
124 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | 122 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) |
diff --git a/include/asm-sh/ubc.h b/include/asm-sh/ubc.h index 38d46e01b846..56f4e30dc49c 100644 --- a/include/asm-sh/ubc.h +++ b/include/asm-sh/ubc.h | |||
@@ -15,8 +15,7 @@ | |||
15 | #include <asm/cpu/ubc.h> | 15 | #include <asm/cpu/ubc.h> |
16 | 16 | ||
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) | ||
20 | #define UBC_TYPE_SH7729 (current_cpu_data.type == CPU_SH7729) | 19 | #define UBC_TYPE_SH7729 (current_cpu_data.type == CPU_SH7729) |
21 | #else | 20 | #else |
22 | #define UBC_TYPE_SH7729 0 | 21 | #define UBC_TYPE_SH7729 0 |
diff --git a/include/asm-sh64/dma-mapping.h b/include/asm-sh64/dma-mapping.h index c7c0f059cdc4..d505f357f819 100644 --- a/include/asm-sh64/dma-mapping.h +++ b/include/asm-sh64/dma-mapping.h | |||
@@ -51,11 +51,11 @@ static inline dma_addr_t dma_map_single(struct device *dev, | |||
51 | { | 51 | { |
52 | #if defined(CONFIG_PCI) && !defined(CONFIG_SH_PCIDMA_NONCOHERENT) | 52 | #if defined(CONFIG_PCI) && !defined(CONFIG_SH_PCIDMA_NONCOHERENT) |
53 | if (dev->bus == &pci_bus_type) | 53 | if (dev->bus == &pci_bus_type) |
54 | return virt_to_bus(ptr); | 54 | return virt_to_phys(ptr); |
55 | #endif | 55 | #endif |
56 | dma_cache_sync(dev, ptr, size, dir); | 56 | dma_cache_sync(dev, ptr, size, dir); |
57 | 57 | ||
58 | return virt_to_bus(ptr); | 58 | return virt_to_phys(ptr); |
59 | } | 59 | } |
60 | 60 | ||
61 | #define dma_unmap_single(dev, addr, size, dir) do { } while (0) | 61 | #define dma_unmap_single(dev, addr, size, dir) do { } while (0) |
@@ -98,7 +98,7 @@ static inline void dma_sync_single(struct device *dev, dma_addr_t dma_handle, | |||
98 | if (dev->bus == &pci_bus_type) | 98 | if (dev->bus == &pci_bus_type) |
99 | return; | 99 | return; |
100 | #endif | 100 | #endif |
101 | dma_cache_sync(dev, bus_to_virt(dma_handle), size, dir); | 101 | dma_cache_sync(dev, phys_to_virt(dma_handle), size, dir); |
102 | } | 102 | } |
103 | 103 | ||
104 | static inline void dma_sync_single_range(struct device *dev, | 104 | static inline void dma_sync_single_range(struct device *dev, |
@@ -110,7 +110,7 @@ static inline void dma_sync_single_range(struct device *dev, | |||
110 | if (dev->bus == &pci_bus_type) | 110 | if (dev->bus == &pci_bus_type) |
111 | return; | 111 | return; |
112 | #endif | 112 | #endif |
113 | dma_cache_sync(dev, bus_to_virt(dma_handle) + offset, size, dir); | 113 | dma_cache_sync(dev, phys_to_virt(dma_handle) + offset, size, dir); |
114 | } | 114 | } |
115 | 115 | ||
116 | static inline void dma_sync_sg(struct device *dev, struct scatterlist *sg, | 116 | static inline void dma_sync_sg(struct device *dev, struct scatterlist *sg, |
diff --git a/include/asm-sh64/io.h b/include/asm-sh64/io.h index 14d8e7b4bf4b..1f37b6931922 100644 --- a/include/asm-sh64/io.h +++ b/include/asm-sh64/io.h | |||
@@ -31,10 +31,6 @@ | |||
31 | #include <asm/page.h> | 31 | #include <asm/page.h> |
32 | #include <asm-generic/iomap.h> | 32 | #include <asm-generic/iomap.h> |
33 | 33 | ||
34 | #define virt_to_bus virt_to_phys | ||
35 | #define bus_to_virt phys_to_virt | ||
36 | #define page_to_bus page_to_phys | ||
37 | |||
38 | /* | 34 | /* |
39 | * Nothing overly special here.. instead of doing the same thing | 35 | * Nothing overly special here.. instead of doing the same thing |
40 | * over and over again, we just define a set of sh64_in/out functions | 36 | * over and over again, we just define a set of sh64_in/out functions |
diff --git a/include/asm-sparc/device.h b/include/asm-sparc/device.h index 4a56d84d69c4..c0a7786d65f7 100644 --- a/include/asm-sparc/device.h +++ b/include/asm-sparc/device.h | |||
@@ -10,6 +10,10 @@ struct device_node; | |||
10 | struct of_device; | 10 | struct of_device; |
11 | 11 | ||
12 | struct dev_archdata { | 12 | struct dev_archdata { |
13 | void *iommu; | ||
14 | void *stc; | ||
15 | void *host_controller; | ||
16 | |||
13 | struct device_node *prom_node; | 17 | struct device_node *prom_node; |
14 | struct of_device *op; | 18 | struct of_device *op; |
15 | }; | 19 | }; |
diff --git a/include/asm-sparc/floppy.h b/include/asm-sparc/floppy.h index 9073c84218ce..28ce2b9c3da8 100644 --- a/include/asm-sparc/floppy.h +++ b/include/asm-sparc/floppy.h | |||
@@ -101,6 +101,29 @@ static struct sun_floppy_ops sun_fdops; | |||
101 | #define CROSS_64KB(a,s) (0) | 101 | #define CROSS_64KB(a,s) (0) |
102 | 102 | ||
103 | /* Routines unique to each controller type on a Sun. */ | 103 | /* Routines unique to each controller type on a Sun. */ |
104 | static void sun_set_dor(unsigned char value, int fdc_82077) | ||
105 | { | ||
106 | if (sparc_cpu_model == sun4c) { | ||
107 | unsigned int bits = 0; | ||
108 | if (value & 0x10) | ||
109 | bits |= AUXIO_FLPY_DSEL; | ||
110 | if ((value & 0x80) == 0) | ||
111 | bits |= AUXIO_FLPY_EJCT; | ||
112 | set_auxio(bits, (~bits) & (AUXIO_FLPY_DSEL|AUXIO_FLPY_EJCT)); | ||
113 | } | ||
114 | if (fdc_82077) { | ||
115 | sun_fdc->dor_82077 = value; | ||
116 | } | ||
117 | } | ||
118 | |||
119 | static unsigned char sun_read_dir(void) | ||
120 | { | ||
121 | if (sparc_cpu_model == sun4c) | ||
122 | return (get_auxio() & AUXIO_FLPY_DCHG) ? 0x80 : 0; | ||
123 | else | ||
124 | return sun_fdc->dir_82077; | ||
125 | } | ||
126 | |||
104 | static unsigned char sun_82072_fd_inb(int port) | 127 | static unsigned char sun_82072_fd_inb(int port) |
105 | { | 128 | { |
106 | udelay(5); | 129 | udelay(5); |
@@ -113,7 +136,7 @@ static unsigned char sun_82072_fd_inb(int port) | |||
113 | case 5: /* FD_DATA */ | 136 | case 5: /* FD_DATA */ |
114 | return sun_fdc->data_82072; | 137 | return sun_fdc->data_82072; |
115 | case 7: /* FD_DIR */ | 138 | case 7: /* FD_DIR */ |
116 | return (get_auxio() & AUXIO_FLPY_DCHG)? 0x80: 0; | 139 | return sun_read_dir(); |
117 | }; | 140 | }; |
118 | panic("sun_82072_fd_inb: How did I get here?"); | 141 | panic("sun_82072_fd_inb: How did I get here?"); |
119 | } | 142 | } |
@@ -126,20 +149,7 @@ static void sun_82072_fd_outb(unsigned char value, int port) | |||
126 | printk("floppy: Asked to write to unknown port %d\n", port); | 149 | printk("floppy: Asked to write to unknown port %d\n", port); |
127 | panic("floppy: Port bolixed."); | 150 | panic("floppy: Port bolixed."); |
128 | case 2: /* FD_DOR */ | 151 | case 2: /* FD_DOR */ |
129 | /* Oh geese, 82072 on the Sun has no DOR register, | 152 | sun_set_dor(value, 0); |
130 | * the functionality is implemented via the AUXIO | ||
131 | * I/O register. So we must emulate the behavior. | ||
132 | * | ||
133 | * ASSUMPTIONS: There will only ever be one floppy | ||
134 | * drive attached to a Sun controller | ||
135 | * and it will be at drive zero. | ||
136 | */ | ||
137 | { | ||
138 | unsigned bits = 0; | ||
139 | if (value & 0x10) bits |= AUXIO_FLPY_DSEL; | ||
140 | if ((value & 0x80) == 0) bits |= AUXIO_FLPY_EJCT; | ||
141 | set_auxio(bits, (~bits) & (AUXIO_FLPY_DSEL|AUXIO_FLPY_EJCT)); | ||
142 | } | ||
143 | break; | 153 | break; |
144 | case 5: /* FD_DATA */ | 154 | case 5: /* FD_DATA */ |
145 | sun_fdc->data_82072 = value; | 155 | sun_fdc->data_82072 = value; |
@@ -161,15 +171,22 @@ static unsigned char sun_82077_fd_inb(int port) | |||
161 | default: | 171 | default: |
162 | printk("floppy: Asked to read unknown port %d\n", port); | 172 | printk("floppy: Asked to read unknown port %d\n", port); |
163 | panic("floppy: Port bolixed."); | 173 | panic("floppy: Port bolixed."); |
174 | case 0: /* FD_STATUS_0 */ | ||
175 | return sun_fdc->status1_82077; | ||
176 | case 1: /* FD_STATUS_1 */ | ||
177 | return sun_fdc->status2_82077; | ||
178 | case 2: /* FD_DOR */ | ||
179 | return sun_fdc->dor_82077; | ||
180 | case 3: /* FD_TDR */ | ||
181 | return sun_fdc->tapectl_82077; | ||
164 | case 4: /* FD_STATUS */ | 182 | case 4: /* FD_STATUS */ |
165 | return sun_fdc->status_82077 & ~STATUS_DMA; | 183 | return sun_fdc->status_82077 & ~STATUS_DMA; |
166 | case 5: /* FD_DATA */ | 184 | case 5: /* FD_DATA */ |
167 | return sun_fdc->data_82077; | 185 | return sun_fdc->data_82077; |
168 | case 7: /* FD_DIR */ | 186 | case 7: /* FD_DIR */ |
169 | /* XXX: Is DCL on 0x80 in sun4m? */ | 187 | return sun_read_dir(); |
170 | return sun_fdc->dir_82077; | ||
171 | }; | 188 | }; |
172 | panic("sun_82072_fd_inb: How did I get here?"); | 189 | panic("sun_82077_fd_inb: How did I get here?"); |
173 | } | 190 | } |
174 | 191 | ||
175 | static void sun_82077_fd_outb(unsigned char value, int port) | 192 | static void sun_82077_fd_outb(unsigned char value, int port) |
@@ -180,8 +197,7 @@ static void sun_82077_fd_outb(unsigned char value, int port) | |||
180 | printk("floppy: Asked to write to unknown port %d\n", port); | 197 | printk("floppy: Asked to write to unknown port %d\n", port); |
181 | panic("floppy: Port bolixed."); | 198 | panic("floppy: Port bolixed."); |
182 | case 2: /* FD_DOR */ | 199 | case 2: /* FD_DOR */ |
183 | /* Happily, the 82077 has a real DOR register. */ | 200 | sun_set_dor(value, 1); |
184 | sun_fdc->dor_82077 = value; | ||
185 | break; | 201 | break; |
186 | case 5: /* FD_DATA */ | 202 | case 5: /* FD_DATA */ |
187 | sun_fdc->data_82077 = value; | 203 | sun_fdc->data_82077 = value; |
@@ -192,6 +208,9 @@ static void sun_82077_fd_outb(unsigned char value, int port) | |||
192 | case 4: /* FD_STATUS */ | 208 | case 4: /* FD_STATUS */ |
193 | sun_fdc->status_82077 = value; | 209 | sun_fdc->status_82077 = value; |
194 | break; | 210 | break; |
211 | case 3: /* FD_TDR */ | ||
212 | sun_fdc->tapectl_82077 = value; | ||
213 | break; | ||
195 | }; | 214 | }; |
196 | return; | 215 | return; |
197 | } | 216 | } |
@@ -332,16 +351,17 @@ static int sun_floppy_init(void) | |||
332 | goto no_sun_fdc; | 351 | goto no_sun_fdc; |
333 | } | 352 | } |
334 | 353 | ||
335 | if(sparc_cpu_model == sun4c) { | 354 | sun_fdops.fd_inb = sun_82077_fd_inb; |
336 | sun_fdops.fd_inb = sun_82072_fd_inb; | 355 | sun_fdops.fd_outb = sun_82077_fd_outb; |
337 | sun_fdops.fd_outb = sun_82072_fd_outb; | 356 | fdc_status = &sun_fdc->status_82077; |
338 | fdc_status = &sun_fdc->status_82072; | 357 | |
339 | /* printk("AUXIO @0x%lx\n", auxio_register); */ /* P3 */ | 358 | if (sun_fdc->dor_82077 == 0x80) { |
340 | } else { | 359 | sun_fdc->dor_82077 = 0x02; |
341 | sun_fdops.fd_inb = sun_82077_fd_inb; | 360 | if (sun_fdc->dor_82077 == 0x80) { |
342 | sun_fdops.fd_outb = sun_82077_fd_outb; | 361 | sun_fdops.fd_inb = sun_82072_fd_inb; |
343 | fdc_status = &sun_fdc->status_82077; | 362 | sun_fdops.fd_outb = sun_82072_fd_outb; |
344 | /* printk("DOR @0x%p\n", &sun_fdc->dor_82077); */ /* P3 */ | 363 | fdc_status = &sun_fdc->status_82072; |
364 | } | ||
345 | } | 365 | } |
346 | 366 | ||
347 | /* Success... */ | 367 | /* Success... */ |
diff --git a/include/asm-sparc64/dma-mapping.h b/include/asm-sparc64/dma-mapping.h index c58ec1661df8..a72a5f271f31 100644 --- a/include/asm-sparc64/dma-mapping.h +++ b/include/asm-sparc64/dma-mapping.h | |||
@@ -1,307 +1,141 @@ | |||
1 | #ifndef _ASM_SPARC64_DMA_MAPPING_H | 1 | #ifndef _ASM_SPARC64_DMA_MAPPING_H |
2 | #define _ASM_SPARC64_DMA_MAPPING_H | 2 | #define _ASM_SPARC64_DMA_MAPPING_H |
3 | 3 | ||
4 | 4 | #include <linux/scatterlist.h> | |
5 | #ifdef CONFIG_PCI | ||
6 | |||
7 | /* we implement the API below in terms of the existing PCI one, | ||
8 | * so include it */ | ||
9 | #include <linux/pci.h> | ||
10 | /* need struct page definitions */ | ||
11 | #include <linux/mm.h> | 5 | #include <linux/mm.h> |
12 | 6 | ||
13 | #include <asm/of_device.h> | 7 | #define DMA_ERROR_CODE (~(dma_addr_t)0x0) |
14 | 8 | ||
15 | static inline int | 9 | struct dma_ops { |
16 | dma_supported(struct device *dev, u64 mask) | 10 | void *(*alloc_coherent)(struct device *dev, size_t size, |
17 | { | 11 | dma_addr_t *dma_handle, gfp_t flag); |
18 | BUG_ON(dev->bus != &pci_bus_type); | 12 | void (*free_coherent)(struct device *dev, size_t size, |
19 | 13 | void *cpu_addr, dma_addr_t dma_handle); | |
20 | return pci_dma_supported(to_pci_dev(dev), mask); | 14 | dma_addr_t (*map_single)(struct device *dev, void *cpu_addr, |
21 | } | 15 | size_t size, |
22 | 16 | enum dma_data_direction direction); | |
23 | static inline int | 17 | void (*unmap_single)(struct device *dev, dma_addr_t dma_addr, |
24 | dma_set_mask(struct device *dev, u64 dma_mask) | 18 | size_t size, |
25 | { | 19 | enum dma_data_direction direction); |
26 | BUG_ON(dev->bus != &pci_bus_type); | 20 | int (*map_sg)(struct device *dev, struct scatterlist *sg, int nents, |
27 | 21 | enum dma_data_direction direction); | |
28 | return pci_set_dma_mask(to_pci_dev(dev), dma_mask); | 22 | void (*unmap_sg)(struct device *dev, struct scatterlist *sg, |
29 | } | 23 | int nhwentries, |
30 | 24 | enum dma_data_direction direction); | |
31 | static inline void * | 25 | void (*sync_single_for_cpu)(struct device *dev, |
32 | dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, | 26 | dma_addr_t dma_handle, size_t size, |
33 | gfp_t flag) | 27 | enum dma_data_direction direction); |
34 | { | 28 | void (*sync_single_for_device)(struct device *dev, |
35 | BUG_ON(dev->bus != &pci_bus_type); | 29 | dma_addr_t dma_handle, size_t size, |
36 | 30 | enum dma_data_direction direction); | |
37 | return pci_iommu_ops->alloc_consistent(to_pci_dev(dev), size, dma_handle, flag); | 31 | void (*sync_sg_for_cpu)(struct device *dev, struct scatterlist *sg, |
38 | } | 32 | int nelems, |
39 | 33 | enum dma_data_direction direction); | |
40 | static inline void | 34 | void (*sync_sg_for_device)(struct device *dev, struct scatterlist *sg, |
41 | dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, | 35 | int nelems, |
42 | dma_addr_t dma_handle) | 36 | enum dma_data_direction direction); |
43 | { | 37 | }; |
44 | BUG_ON(dev->bus != &pci_bus_type); | 38 | extern const struct dma_ops *dma_ops; |
45 | 39 | ||
46 | pci_free_consistent(to_pci_dev(dev), size, cpu_addr, dma_handle); | 40 | extern int dma_supported(struct device *dev, u64 mask); |
47 | } | 41 | extern int dma_set_mask(struct device *dev, u64 dma_mask); |
48 | |||
49 | static inline dma_addr_t | ||
50 | dma_map_single(struct device *dev, void *cpu_addr, size_t size, | ||
51 | enum dma_data_direction direction) | ||
52 | { | ||
53 | BUG_ON(dev->bus != &pci_bus_type); | ||
54 | |||
55 | return pci_map_single(to_pci_dev(dev), cpu_addr, size, (int)direction); | ||
56 | } | ||
57 | |||
58 | static inline void | ||
59 | dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, | ||
60 | enum dma_data_direction direction) | ||
61 | { | ||
62 | BUG_ON(dev->bus != &pci_bus_type); | ||
63 | |||
64 | pci_unmap_single(to_pci_dev(dev), dma_addr, size, (int)direction); | ||
65 | } | ||
66 | |||
67 | static inline dma_addr_t | ||
68 | dma_map_page(struct device *dev, struct page *page, | ||
69 | unsigned long offset, size_t size, | ||
70 | enum dma_data_direction direction) | ||
71 | { | ||
72 | BUG_ON(dev->bus != &pci_bus_type); | ||
73 | |||
74 | return pci_map_page(to_pci_dev(dev), page, offset, size, (int)direction); | ||
75 | } | ||
76 | |||
77 | static inline void | ||
78 | dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size, | ||
79 | enum dma_data_direction direction) | ||
80 | { | ||
81 | BUG_ON(dev->bus != &pci_bus_type); | ||
82 | |||
83 | pci_unmap_page(to_pci_dev(dev), dma_address, size, (int)direction); | ||
84 | } | ||
85 | |||
86 | static inline int | ||
87 | dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | ||
88 | enum dma_data_direction direction) | ||
89 | { | ||
90 | BUG_ON(dev->bus != &pci_bus_type); | ||
91 | |||
92 | return pci_map_sg(to_pci_dev(dev), sg, nents, (int)direction); | ||
93 | } | ||
94 | |||
95 | static inline void | ||
96 | dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries, | ||
97 | enum dma_data_direction direction) | ||
98 | { | ||
99 | BUG_ON(dev->bus != &pci_bus_type); | ||
100 | |||
101 | pci_unmap_sg(to_pci_dev(dev), sg, nhwentries, (int)direction); | ||
102 | } | ||
103 | |||
104 | static inline void | ||
105 | dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size, | ||
106 | enum dma_data_direction direction) | ||
107 | { | ||
108 | BUG_ON(dev->bus != &pci_bus_type); | ||
109 | |||
110 | pci_dma_sync_single_for_cpu(to_pci_dev(dev), dma_handle, | ||
111 | size, (int)direction); | ||
112 | } | ||
113 | |||
114 | static inline void | ||
115 | dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, size_t size, | ||
116 | enum dma_data_direction direction) | ||
117 | { | ||
118 | BUG_ON(dev->bus != &pci_bus_type); | ||
119 | |||
120 | pci_dma_sync_single_for_device(to_pci_dev(dev), dma_handle, | ||
121 | size, (int)direction); | ||
122 | } | ||
123 | |||
124 | static inline void | ||
125 | dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems, | ||
126 | enum dma_data_direction direction) | ||
127 | { | ||
128 | BUG_ON(dev->bus != &pci_bus_type); | ||
129 | |||
130 | pci_dma_sync_sg_for_cpu(to_pci_dev(dev), sg, nelems, (int)direction); | ||
131 | } | ||
132 | |||
133 | static inline void | ||
134 | dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems, | ||
135 | enum dma_data_direction direction) | ||
136 | { | ||
137 | BUG_ON(dev->bus != &pci_bus_type); | ||
138 | |||
139 | pci_dma_sync_sg_for_device(to_pci_dev(dev), sg, nelems, (int)direction); | ||
140 | } | ||
141 | |||
142 | static inline int | ||
143 | dma_mapping_error(dma_addr_t dma_addr) | ||
144 | { | ||
145 | return pci_dma_mapping_error(dma_addr); | ||
146 | } | ||
147 | |||
148 | #else | ||
149 | |||
150 | struct device; | ||
151 | struct page; | ||
152 | struct scatterlist; | ||
153 | |||
154 | static inline int | ||
155 | dma_supported(struct device *dev, u64 mask) | ||
156 | { | ||
157 | BUG(); | ||
158 | return 0; | ||
159 | } | ||
160 | |||
161 | static inline int | ||
162 | dma_set_mask(struct device *dev, u64 dma_mask) | ||
163 | { | ||
164 | BUG(); | ||
165 | return 0; | ||
166 | } | ||
167 | 42 | ||
168 | static inline void *dma_alloc_coherent(struct device *dev, size_t size, | 43 | static inline void *dma_alloc_coherent(struct device *dev, size_t size, |
169 | dma_addr_t *dma_handle, gfp_t flag) | 44 | dma_addr_t *dma_handle, gfp_t flag) |
170 | { | 45 | { |
171 | BUG(); | 46 | return dma_ops->alloc_coherent(dev, size, dma_handle, flag); |
172 | return NULL; | ||
173 | } | 47 | } |
174 | 48 | ||
175 | static inline void dma_free_coherent(struct device *dev, size_t size, | 49 | static inline void dma_free_coherent(struct device *dev, size_t size, |
176 | void *vaddr, dma_addr_t dma_handle) | 50 | void *cpu_addr, dma_addr_t dma_handle) |
177 | { | 51 | { |
178 | BUG(); | 52 | dma_ops->free_coherent(dev, size, cpu_addr, dma_handle); |
179 | } | 53 | } |
180 | 54 | ||
181 | static inline dma_addr_t | 55 | static inline dma_addr_t dma_map_single(struct device *dev, void *cpu_addr, |
182 | dma_map_single(struct device *dev, void *cpu_addr, size_t size, | 56 | size_t size, |
183 | enum dma_data_direction direction) | 57 | enum dma_data_direction direction) |
184 | { | 58 | { |
185 | BUG(); | 59 | return dma_ops->map_single(dev, cpu_addr, size, direction); |
186 | return 0; | ||
187 | } | 60 | } |
188 | 61 | ||
189 | static inline void | 62 | static inline void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, |
190 | dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, | 63 | size_t size, |
191 | enum dma_data_direction direction) | 64 | enum dma_data_direction direction) |
192 | { | 65 | { |
193 | BUG(); | 66 | dma_ops->unmap_single(dev, dma_addr, size, direction); |
194 | } | 67 | } |
195 | 68 | ||
196 | static inline dma_addr_t | 69 | static inline dma_addr_t dma_map_page(struct device *dev, struct page *page, |
197 | dma_map_page(struct device *dev, struct page *page, | 70 | unsigned long offset, size_t size, |
198 | unsigned long offset, size_t size, | 71 | enum dma_data_direction direction) |
199 | enum dma_data_direction direction) | ||
200 | { | 72 | { |
201 | BUG(); | 73 | return dma_ops->map_single(dev, page_address(page) + offset, |
202 | return 0; | 74 | size, direction); |
203 | } | 75 | } |
204 | 76 | ||
205 | static inline void | 77 | static inline void dma_unmap_page(struct device *dev, dma_addr_t dma_address, |
206 | dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size, | 78 | size_t size, |
207 | enum dma_data_direction direction) | 79 | enum dma_data_direction direction) |
208 | { | 80 | { |
209 | BUG(); | 81 | dma_ops->unmap_single(dev, dma_address, size, direction); |
210 | } | 82 | } |
211 | 83 | ||
212 | static inline int | 84 | static inline int dma_map_sg(struct device *dev, struct scatterlist *sg, |
213 | dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | 85 | int nents, enum dma_data_direction direction) |
214 | enum dma_data_direction direction) | ||
215 | { | 86 | { |
216 | BUG(); | 87 | return dma_ops->map_sg(dev, sg, nents, direction); |
217 | return 0; | ||
218 | } | 88 | } |
219 | 89 | ||
220 | static inline void | 90 | static inline void dma_unmap_sg(struct device *dev, struct scatterlist *sg, |
221 | dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries, | 91 | int nents, enum dma_data_direction direction) |
222 | enum dma_data_direction direction) | ||
223 | { | 92 | { |
224 | BUG(); | 93 | dma_ops->unmap_sg(dev, sg, nents, direction); |
225 | } | 94 | } |
226 | 95 | ||
227 | static inline void | 96 | static inline void dma_sync_single_for_cpu(struct device *dev, |
228 | dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size, | 97 | dma_addr_t dma_handle, size_t size, |
229 | enum dma_data_direction direction) | 98 | enum dma_data_direction direction) |
230 | { | 99 | { |
231 | BUG(); | 100 | dma_ops->sync_single_for_cpu(dev, dma_handle, size, direction); |
232 | } | 101 | } |
233 | 102 | ||
234 | static inline void | 103 | static inline void dma_sync_single_for_device(struct device *dev, |
235 | dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, size_t size, | 104 | dma_addr_t dma_handle, |
236 | enum dma_data_direction direction) | 105 | size_t size, |
106 | enum dma_data_direction direction) | ||
237 | { | 107 | { |
238 | BUG(); | 108 | dma_ops->sync_single_for_device(dev, dma_handle, size, direction); |
239 | } | 109 | } |
240 | 110 | ||
241 | static inline void | 111 | static inline void dma_sync_sg_for_cpu(struct device *dev, |
242 | dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems, | 112 | struct scatterlist *sg, int nelems, |
243 | enum dma_data_direction direction) | 113 | enum dma_data_direction direction) |
244 | { | 114 | { |
245 | BUG(); | 115 | dma_ops->sync_sg_for_cpu(dev, sg, nelems, direction); |
246 | } | 116 | } |
247 | 117 | ||
248 | static inline void | 118 | static inline void dma_sync_sg_for_device(struct device *dev, |
249 | dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems, | 119 | struct scatterlist *sg, int nelems, |
250 | enum dma_data_direction direction) | 120 | enum dma_data_direction direction) |
251 | { | 121 | { |
252 | BUG(); | 122 | dma_ops->sync_sg_for_device(dev, sg, nelems, direction); |
253 | } | 123 | } |
254 | 124 | ||
255 | static inline int | 125 | static inline int dma_mapping_error(dma_addr_t dma_addr) |
256 | dma_mapping_error(dma_addr_t dma_addr) | ||
257 | { | 126 | { |
258 | BUG(); | 127 | return (dma_addr == DMA_ERROR_CODE); |
259 | return 0; | ||
260 | } | 128 | } |
261 | 129 | ||
262 | #endif /* PCI */ | 130 | static inline int dma_get_cache_alignment(void) |
263 | |||
264 | |||
265 | /* Now for the API extensions over the pci_ one */ | ||
266 | |||
267 | #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) | ||
268 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) | ||
269 | #define dma_is_consistent(d, h) (1) | ||
270 | |||
271 | static inline int | ||
272 | dma_get_cache_alignment(void) | ||
273 | { | 131 | { |
274 | /* no easy way to get cache size on all processors, so return | 132 | /* no easy way to get cache size on all processors, so return |
275 | * the maximum possible, to be safe */ | 133 | * the maximum possible, to be safe */ |
276 | return (1 << INTERNODE_CACHE_SHIFT); | 134 | return (1 << INTERNODE_CACHE_SHIFT); |
277 | } | 135 | } |
278 | 136 | ||
279 | static inline void | 137 | #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) |
280 | dma_sync_single_range_for_cpu(struct device *dev, dma_addr_t dma_handle, | 138 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) |
281 | unsigned long offset, size_t size, | 139 | #define dma_is_consistent(d, h) (1) |
282 | enum dma_data_direction direction) | ||
283 | { | ||
284 | /* just sync everything, that's all the pci API can do */ | ||
285 | dma_sync_single_for_cpu(dev, dma_handle, offset+size, direction); | ||
286 | } | ||
287 | |||
288 | static inline void | ||
289 | dma_sync_single_range_for_device(struct device *dev, dma_addr_t dma_handle, | ||
290 | unsigned long offset, size_t size, | ||
291 | enum dma_data_direction direction) | ||
292 | { | ||
293 | /* just sync everything, that's all the pci API can do */ | ||
294 | dma_sync_single_for_device(dev, dma_handle, offset+size, direction); | ||
295 | } | ||
296 | |||
297 | static inline void | ||
298 | dma_cache_sync(struct device *dev, void *vaddr, size_t size, | ||
299 | enum dma_data_direction direction) | ||
300 | { | ||
301 | /* could define this in terms of the dma_cache ... operations, | ||
302 | * but if you get this on a platform, you should convert the platform | ||
303 | * to using the generic device DMA API */ | ||
304 | BUG(); | ||
305 | } | ||
306 | 140 | ||
307 | #endif /* _ASM_SPARC64_DMA_MAPPING_H */ | 141 | #endif /* _ASM_SPARC64_DMA_MAPPING_H */ |
diff --git a/include/asm-sparc64/fbio.h b/include/asm-sparc64/fbio.h index 500026d9f6e1..b9215a0907d3 100644 --- a/include/asm-sparc64/fbio.h +++ b/include/asm-sparc64/fbio.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define __LINUX_FBIO_H | 2 | #define __LINUX_FBIO_H |
3 | 3 | ||
4 | #include <linux/compiler.h> | 4 | #include <linux/compiler.h> |
5 | #include <linux/types.h> | ||
5 | 6 | ||
6 | /* Constants used for fbio SunOS compatibility */ | 7 | /* Constants used for fbio SunOS compatibility */ |
7 | /* (C) 1996 Miguel de Icaza */ | 8 | /* (C) 1996 Miguel de Icaza */ |
@@ -299,4 +300,31 @@ struct fb_clut32 { | |||
299 | #define LEO_LD_GBL_MAP 0x01009000 | 300 | #define LEO_LD_GBL_MAP 0x01009000 |
300 | #define LEO_UNK2_MAP 0x0100a000 | 301 | #define LEO_UNK2_MAP 0x0100a000 |
301 | 302 | ||
303 | #ifdef __KERNEL__ | ||
304 | struct fbcmap32 { | ||
305 | int index; /* first element (0 origin) */ | ||
306 | int count; | ||
307 | u32 red; | ||
308 | u32 green; | ||
309 | u32 blue; | ||
310 | }; | ||
311 | |||
312 | #define FBIOPUTCMAP32 _IOW('F', 3, struct fbcmap32) | ||
313 | #define FBIOGETCMAP32 _IOW('F', 4, struct fbcmap32) | ||
314 | |||
315 | struct fbcursor32 { | ||
316 | short set; /* what to set, choose from the list above */ | ||
317 | short enable; /* cursor on/off */ | ||
318 | struct fbcurpos pos; /* cursor position */ | ||
319 | struct fbcurpos hot; /* cursor hot spot */ | ||
320 | struct fbcmap32 cmap; /* color map info */ | ||
321 | struct fbcurpos size; /* cursor bit map size */ | ||
322 | u32 image; /* cursor image bits */ | ||
323 | u32 mask; /* cursor mask bits */ | ||
324 | }; | ||
325 | |||
326 | #define FBIOSCURSOR32 _IOW('F', 24, struct fbcursor32) | ||
327 | #define FBIOGCURSOR32 _IOW('F', 25, struct fbcursor32) | ||
328 | #endif | ||
329 | |||
302 | #endif /* __LINUX_FBIO_H */ | 330 | #endif /* __LINUX_FBIO_H */ |
diff --git a/include/asm-sparc64/floppy.h b/include/asm-sparc64/floppy.h index 4aa0925e1b1b..1783239c7b40 100644 --- a/include/asm-sparc64/floppy.h +++ b/include/asm-sparc64/floppy.h | |||
@@ -1,7 +1,6 @@ | |||
1 | /* $Id: floppy.h,v 1.32 2001/10/26 17:59:36 davem Exp $ | 1 | /* floppy.h: Sparc specific parts of the Floppy driver. |
2 | * asm-sparc64/floppy.h: Sparc specific parts of the Floppy driver. | ||
3 | * | 2 | * |
4 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) | 3 | * Copyright (C) 1996, 2007 David S. Miller (davem@davemloft.net) |
5 | * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) | 4 | * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) |
6 | * | 5 | * |
7 | * Ultra/PCI support added: Sep 1997 Eddie C. Dost (ecd@skynet.be) | 6 | * Ultra/PCI support added: Sep 1997 Eddie C. Dost (ecd@skynet.be) |
@@ -11,6 +10,7 @@ | |||
11 | #define __ASM_SPARC64_FLOPPY_H | 10 | #define __ASM_SPARC64_FLOPPY_H |
12 | 11 | ||
13 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/pci.h> | ||
14 | 14 | ||
15 | #include <asm/page.h> | 15 | #include <asm/page.h> |
16 | #include <asm/pgtable.h> | 16 | #include <asm/pgtable.h> |
diff --git a/include/asm-sparc64/iommu.h b/include/asm-sparc64/iommu.h index 0b1813f41045..9eac6676caf1 100644 --- a/include/asm-sparc64/iommu.h +++ b/include/asm-sparc64/iommu.h | |||
@@ -1,7 +1,6 @@ | |||
1 | /* $Id: iommu.h,v 1.10 2001/03/08 09:55:56 davem Exp $ | 1 | /* iommu.h: Definitions for the sun5 IOMMU. |
2 | * iommu.h: Definitions for the sun5 IOMMU. | ||
3 | * | 2 | * |
4 | * Copyright (C) 1996, 1999 David S. Miller (davem@caip.rutgers.edu) | 3 | * Copyright (C) 1996, 1999, 2007 David S. Miller (davem@davemloft.net) |
5 | */ | 4 | */ |
6 | #ifndef _SPARC64_IOMMU_H | 5 | #ifndef _SPARC64_IOMMU_H |
7 | #define _SPARC64_IOMMU_H | 6 | #define _SPARC64_IOMMU_H |
@@ -33,6 +32,7 @@ struct iommu { | |||
33 | unsigned long iommu_tsbbase; | 32 | unsigned long iommu_tsbbase; |
34 | unsigned long iommu_flush; | 33 | unsigned long iommu_flush; |
35 | unsigned long iommu_flushinv; | 34 | unsigned long iommu_flushinv; |
35 | unsigned long iommu_tags; | ||
36 | unsigned long iommu_ctxflush; | 36 | unsigned long iommu_ctxflush; |
37 | unsigned long write_complete_reg; | 37 | unsigned long write_complete_reg; |
38 | unsigned long dummy_page; | 38 | unsigned long dummy_page; |
@@ -54,4 +54,7 @@ struct strbuf { | |||
54 | volatile unsigned long __flushflag_buf[(64+(64-1)) / sizeof(long)]; | 54 | volatile unsigned long __flushflag_buf[(64+(64-1)) / sizeof(long)]; |
55 | }; | 55 | }; |
56 | 56 | ||
57 | #endif /* !(_SPARC_IOMMU_H) */ | 57 | extern int iommu_table_init(struct iommu *iommu, int tsbsize, |
58 | u32 dma_offset, u32 dma_addr_mask); | ||
59 | |||
60 | #endif /* !(_SPARC64_IOMMU_H) */ | ||
diff --git a/include/asm-sparc64/parport.h b/include/asm-sparc64/parport.h index 600afe5ae2e3..8116e8f6062c 100644 --- a/include/asm-sparc64/parport.h +++ b/include/asm-sparc64/parport.h | |||
@@ -117,7 +117,7 @@ static int __devinit ecpp_probe(struct of_device *op, const struct of_device_id | |||
117 | if (!strcmp(parent->name, "dma")) { | 117 | if (!strcmp(parent->name, "dma")) { |
118 | p = parport_pc_probe_port(base, base + 0x400, | 118 | p = parport_pc_probe_port(base, base + 0x400, |
119 | op->irqs[0], PARPORT_DMA_NOFIFO, | 119 | op->irqs[0], PARPORT_DMA_NOFIFO, |
120 | op->dev.parent); | 120 | op->dev.parent->parent); |
121 | if (!p) | 121 | if (!p) |
122 | return -ENOMEM; | 122 | return -ENOMEM; |
123 | dev_set_drvdata(&op->dev, p); | 123 | dev_set_drvdata(&op->dev, p); |
diff --git a/include/asm-sparc64/pci.h b/include/asm-sparc64/pci.h index e11ac100f043..1393e57d50fb 100644 --- a/include/asm-sparc64/pci.h +++ b/include/asm-sparc64/pci.h | |||
@@ -3,8 +3,7 @@ | |||
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | 5 | ||
6 | #include <linux/fs.h> | 6 | #include <linux/dma-mapping.h> |
7 | #include <linux/mm.h> | ||
8 | 7 | ||
9 | /* Can be used to override the logic in pci_scan_bus for skipping | 8 | /* Can be used to override the logic in pci_scan_bus for skipping |
10 | * already-configured bus numbers - to be used for buggy BIOSes | 9 | * already-configured bus numbers - to be used for buggy BIOSes |
@@ -30,80 +29,42 @@ static inline void pcibios_penalize_isa_irq(int irq, int active) | |||
30 | /* We don't do dynamic PCI IRQ allocation */ | 29 | /* We don't do dynamic PCI IRQ allocation */ |
31 | } | 30 | } |
32 | 31 | ||
33 | /* Dynamic DMA mapping stuff. | ||
34 | */ | ||
35 | |||
36 | /* The PCI address space does not equal the physical memory | 32 | /* The PCI address space does not equal the physical memory |
37 | * address space. The networking and block device layers use | 33 | * address space. The networking and block device layers use |
38 | * this boolean for bounce buffer decisions. | 34 | * this boolean for bounce buffer decisions. |
39 | */ | 35 | */ |
40 | #define PCI_DMA_BUS_IS_PHYS (0) | 36 | #define PCI_DMA_BUS_IS_PHYS (0) |
41 | 37 | ||
42 | #include <asm/scatterlist.h> | 38 | static inline void *pci_alloc_consistent(struct pci_dev *pdev, size_t size, |
43 | 39 | dma_addr_t *dma_handle) | |
44 | struct pci_dev; | ||
45 | |||
46 | struct pci_iommu_ops { | ||
47 | void *(*alloc_consistent)(struct pci_dev *, size_t, dma_addr_t *, gfp_t); | ||
48 | void (*free_consistent)(struct pci_dev *, size_t, void *, dma_addr_t); | ||
49 | dma_addr_t (*map_single)(struct pci_dev *, void *, size_t, int); | ||
50 | void (*unmap_single)(struct pci_dev *, dma_addr_t, size_t, int); | ||
51 | int (*map_sg)(struct pci_dev *, struct scatterlist *, int, int); | ||
52 | void (*unmap_sg)(struct pci_dev *, struct scatterlist *, int, int); | ||
53 | void (*dma_sync_single_for_cpu)(struct pci_dev *, dma_addr_t, size_t, int); | ||
54 | void (*dma_sync_sg_for_cpu)(struct pci_dev *, struct scatterlist *, int, int); | ||
55 | }; | ||
56 | |||
57 | extern const struct pci_iommu_ops *pci_iommu_ops; | ||
58 | |||
59 | /* Allocate and map kernel buffer using consistent mode DMA for a device. | ||
60 | * hwdev should be valid struct pci_dev pointer for PCI devices. | ||
61 | */ | ||
62 | static inline void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size, dma_addr_t *dma_handle) | ||
63 | { | 40 | { |
64 | return pci_iommu_ops->alloc_consistent(hwdev, size, dma_handle, GFP_ATOMIC); | 41 | return dma_alloc_coherent(&pdev->dev, size, dma_handle, GFP_ATOMIC); |
65 | } | 42 | } |
66 | 43 | ||
67 | /* Free and unmap a consistent DMA buffer. | 44 | static inline void pci_free_consistent(struct pci_dev *pdev, size_t size, |
68 | * cpu_addr is what was returned from pci_alloc_consistent, | 45 | void *vaddr, dma_addr_t dma_handle) |
69 | * size must be the same as what as passed into pci_alloc_consistent, | ||
70 | * and likewise dma_addr must be the same as what *dma_addrp was set to. | ||
71 | * | ||
72 | * References to the memory and mappings associated with cpu_addr/dma_addr | ||
73 | * past this call are illegal. | ||
74 | */ | ||
75 | static inline void pci_free_consistent(struct pci_dev *hwdev, size_t size, void *vaddr, dma_addr_t dma_handle) | ||
76 | { | 46 | { |
77 | return pci_iommu_ops->free_consistent(hwdev, size, vaddr, dma_handle); | 47 | return dma_free_coherent(&pdev->dev, size, vaddr, dma_handle); |
78 | } | 48 | } |
79 | 49 | ||
80 | /* Map a single buffer of the indicated size for DMA in streaming mode. | 50 | static inline dma_addr_t pci_map_single(struct pci_dev *pdev, void *ptr, |
81 | * The 32-bit bus address to use is returned. | 51 | size_t size, int direction) |
82 | * | ||
83 | * Once the device is given the dma address, the device owns this memory | ||
84 | * until either pci_unmap_single or pci_dma_sync_single_for_cpu is performed. | ||
85 | */ | ||
86 | static inline dma_addr_t pci_map_single(struct pci_dev *hwdev, void *ptr, size_t size, int direction) | ||
87 | { | 52 | { |
88 | return pci_iommu_ops->map_single(hwdev, ptr, size, direction); | 53 | return dma_map_single(&pdev->dev, ptr, size, |
54 | (enum dma_data_direction) direction); | ||
89 | } | 55 | } |
90 | 56 | ||
91 | /* Unmap a single streaming mode DMA translation. The dma_addr and size | 57 | static inline void pci_unmap_single(struct pci_dev *pdev, dma_addr_t dma_addr, |
92 | * must match what was provided for in a previous pci_map_single call. All | 58 | size_t size, int direction) |
93 | * other usages are undefined. | ||
94 | * | ||
95 | * After this call, reads by the cpu to the buffer are guaranteed to see | ||
96 | * whatever the device wrote there. | ||
97 | */ | ||
98 | static inline void pci_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr, size_t size, int direction) | ||
99 | { | 59 | { |
100 | pci_iommu_ops->unmap_single(hwdev, dma_addr, size, direction); | 60 | dma_unmap_single(&pdev->dev, dma_addr, size, |
61 | (enum dma_data_direction) direction); | ||
101 | } | 62 | } |
102 | 63 | ||
103 | /* No highmem on sparc64, plus we have an IOMMU, so mapping pages is easy. */ | ||
104 | #define pci_map_page(dev, page, off, size, dir) \ | 64 | #define pci_map_page(dev, page, off, size, dir) \ |
105 | pci_map_single(dev, (page_address(page) + (off)), size, dir) | 65 | pci_map_single(dev, (page_address(page) + (off)), size, dir) |
106 | #define pci_unmap_page(dev,addr,sz,dir) pci_unmap_single(dev,addr,sz,dir) | 66 | #define pci_unmap_page(dev,addr,sz,dir) \ |
67 | pci_unmap_single(dev,addr,sz,dir) | ||
107 | 68 | ||
108 | /* pci_unmap_{single,page} is not a nop, thus... */ | 69 | /* pci_unmap_{single,page} is not a nop, thus... */ |
109 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) \ | 70 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) \ |
@@ -119,75 +80,48 @@ static inline void pci_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr, | |||
119 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) \ | 80 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) \ |
120 | (((PTR)->LEN_NAME) = (VAL)) | 81 | (((PTR)->LEN_NAME) = (VAL)) |
121 | 82 | ||
122 | /* Map a set of buffers described by scatterlist in streaming | 83 | static inline int pci_map_sg(struct pci_dev *pdev, struct scatterlist *sg, |
123 | * mode for DMA. This is the scatter-gather version of the | 84 | int nents, int direction) |
124 | * above pci_map_single interface. Here the scatter gather list | ||
125 | * elements are each tagged with the appropriate dma address | ||
126 | * and length. They are obtained via sg_dma_{address,length}(SG). | ||
127 | * | ||
128 | * NOTE: An implementation may be able to use a smaller number of | ||
129 | * DMA address/length pairs than there are SG table elements. | ||
130 | * (for example via virtual mapping capabilities) | ||
131 | * The routine returns the number of addr/length pairs actually | ||
132 | * used, at most nents. | ||
133 | * | ||
134 | * Device ownership issues as mentioned above for pci_map_single are | ||
135 | * the same here. | ||
136 | */ | ||
137 | static inline int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nents, int direction) | ||
138 | { | 85 | { |
139 | return pci_iommu_ops->map_sg(hwdev, sg, nents, direction); | 86 | return dma_map_sg(&pdev->dev, sg, nents, |
87 | (enum dma_data_direction) direction); | ||
140 | } | 88 | } |
141 | 89 | ||
142 | /* Unmap a set of streaming mode DMA translations. | 90 | static inline void pci_unmap_sg(struct pci_dev *pdev, struct scatterlist *sg, |
143 | * Again, cpu read rules concerning calls here are the same as for | 91 | int nents, int direction) |
144 | * pci_unmap_single() above. | ||
145 | */ | ||
146 | static inline void pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg, int nhwents, int direction) | ||
147 | { | 92 | { |
148 | pci_iommu_ops->unmap_sg(hwdev, sg, nhwents, direction); | 93 | dma_unmap_sg(&pdev->dev, sg, nents, |
94 | (enum dma_data_direction) direction); | ||
149 | } | 95 | } |
150 | 96 | ||
151 | /* Make physical memory consistent for a single | 97 | static inline void pci_dma_sync_single_for_cpu(struct pci_dev *pdev, |
152 | * streaming mode DMA translation after a transfer. | 98 | dma_addr_t dma_handle, |
153 | * | 99 | size_t size, int direction) |
154 | * If you perform a pci_map_single() but wish to interrogate the | ||
155 | * buffer using the cpu, yet do not wish to teardown the PCI dma | ||
156 | * mapping, you must call this function before doing so. At the | ||
157 | * next point you give the PCI dma address back to the card, you | ||
158 | * must first perform a pci_dma_sync_for_device, and then the | ||
159 | * device again owns the buffer. | ||
160 | */ | ||
161 | static inline void pci_dma_sync_single_for_cpu(struct pci_dev *hwdev, dma_addr_t dma_handle, size_t size, int direction) | ||
162 | { | 100 | { |
163 | pci_iommu_ops->dma_sync_single_for_cpu(hwdev, dma_handle, size, direction); | 101 | dma_sync_single_for_cpu(&pdev->dev, dma_handle, size, |
102 | (enum dma_data_direction) direction); | ||
164 | } | 103 | } |
165 | 104 | ||
166 | static inline void | 105 | static inline void pci_dma_sync_single_for_device(struct pci_dev *pdev, |
167 | pci_dma_sync_single_for_device(struct pci_dev *hwdev, dma_addr_t dma_handle, | 106 | dma_addr_t dma_handle, |
168 | size_t size, int direction) | 107 | size_t size, int direction) |
169 | { | 108 | { |
170 | /* No flushing needed to sync cpu writes to the device. */ | 109 | /* No flushing needed to sync cpu writes to the device. */ |
171 | BUG_ON(direction == PCI_DMA_NONE); | ||
172 | } | 110 | } |
173 | 111 | ||
174 | /* Make physical memory consistent for a set of streaming | 112 | static inline void pci_dma_sync_sg_for_cpu(struct pci_dev *pdev, |
175 | * mode DMA translations after a transfer. | 113 | struct scatterlist *sg, |
176 | * | 114 | int nents, int direction) |
177 | * The same as pci_dma_sync_single_* but for a scatter-gather list, | ||
178 | * same rules and usage. | ||
179 | */ | ||
180 | static inline void pci_dma_sync_sg_for_cpu(struct pci_dev *hwdev, struct scatterlist *sg, int nelems, int direction) | ||
181 | { | 115 | { |
182 | pci_iommu_ops->dma_sync_sg_for_cpu(hwdev, sg, nelems, direction); | 116 | dma_sync_sg_for_cpu(&pdev->dev, sg, nents, |
117 | (enum dma_data_direction) direction); | ||
183 | } | 118 | } |
184 | 119 | ||
185 | static inline void | 120 | static inline void pci_dma_sync_sg_for_device(struct pci_dev *pdev, |
186 | pci_dma_sync_sg_for_device(struct pci_dev *hwdev, struct scatterlist *sg, | 121 | struct scatterlist *sg, |
187 | int nelems, int direction) | 122 | int nelems, int direction) |
188 | { | 123 | { |
189 | /* No flushing needed to sync cpu writes to the device. */ | 124 | /* No flushing needed to sync cpu writes to the device. */ |
190 | BUG_ON(direction == PCI_DMA_NONE); | ||
191 | } | 125 | } |
192 | 126 | ||
193 | /* Return whether the given PCI device DMA address mask can | 127 | /* Return whether the given PCI device DMA address mask can |
@@ -206,11 +140,9 @@ extern int pci_dma_supported(struct pci_dev *hwdev, u64 mask); | |||
206 | #define PCI64_REQUIRED_MASK (~(dma64_addr_t)0) | 140 | #define PCI64_REQUIRED_MASK (~(dma64_addr_t)0) |
207 | #define PCI64_ADDR_BASE 0xfffc000000000000UL | 141 | #define PCI64_ADDR_BASE 0xfffc000000000000UL |
208 | 142 | ||
209 | #define PCI_DMA_ERROR_CODE (~(dma_addr_t)0x0) | ||
210 | |||
211 | static inline int pci_dma_mapping_error(dma_addr_t dma_addr) | 143 | static inline int pci_dma_mapping_error(dma_addr_t dma_addr) |
212 | { | 144 | { |
213 | return (dma_addr == PCI_DMA_ERROR_CODE); | 145 | return dma_mapping_error(dma_addr); |
214 | } | 146 | } |
215 | 147 | ||
216 | #ifdef CONFIG_PCI | 148 | #ifdef CONFIG_PCI |
diff --git a/include/asm-sparc64/sbus.h b/include/asm-sparc64/sbus.h index 7efd49d31bb8..0151cad486f3 100644 --- a/include/asm-sparc64/sbus.h +++ b/include/asm-sparc64/sbus.h | |||
@@ -1,7 +1,6 @@ | |||
1 | /* $Id: sbus.h,v 1.14 2000/02/18 13:50:55 davem Exp $ | 1 | /* sbus.h: Defines for the Sun SBus. |
2 | * sbus.h: Defines for the Sun SBus. | ||
3 | * | 2 | * |
4 | * Copyright (C) 1996, 1999 David S. Miller (davem@redhat.com) | 3 | * Copyright (C) 1996, 1999, 2007 David S. Miller (davem@davemloft.net) |
5 | */ | 4 | */ |
6 | 5 | ||
7 | #ifndef _SPARC64_SBUS_H | 6 | #ifndef _SPARC64_SBUS_H |
@@ -69,7 +68,6 @@ struct sbus_dev { | |||
69 | /* This struct describes the SBus(s) found on this machine. */ | 68 | /* This struct describes the SBus(s) found on this machine. */ |
70 | struct sbus_bus { | 69 | struct sbus_bus { |
71 | struct of_device ofdev; | 70 | struct of_device ofdev; |
72 | void *iommu; /* Opaque IOMMU cookie */ | ||
73 | struct sbus_dev *devices; /* Tree of SBUS devices */ | 71 | struct sbus_dev *devices; /* Tree of SBUS devices */ |
74 | struct sbus_bus *next; /* Next SBUS in system */ | 72 | struct sbus_bus *next; /* Next SBUS in system */ |
75 | int prom_node; /* OBP node of SBUS */ | 73 | int prom_node; /* OBP node of SBUS */ |
@@ -102,9 +100,18 @@ extern struct sbus_bus *sbus_root; | |||
102 | extern void sbus_set_sbus64(struct sbus_dev *, int); | 100 | extern void sbus_set_sbus64(struct sbus_dev *, int); |
103 | extern void sbus_fill_device_irq(struct sbus_dev *); | 101 | extern void sbus_fill_device_irq(struct sbus_dev *); |
104 | 102 | ||
105 | /* These yield IOMMU mappings in consistent mode. */ | 103 | static inline void *sbus_alloc_consistent(struct sbus_dev *sdev , size_t size, |
106 | extern void *sbus_alloc_consistent(struct sbus_dev *, size_t, dma_addr_t *dma_addrp); | 104 | dma_addr_t *dma_handle) |
107 | extern void sbus_free_consistent(struct sbus_dev *, size_t, void *, dma_addr_t); | 105 | { |
106 | return dma_alloc_coherent(&sdev->ofdev.dev, size, | ||
107 | dma_handle, GFP_ATOMIC); | ||
108 | } | ||
109 | |||
110 | static inline void sbus_free_consistent(struct sbus_dev *sdev, size_t size, | ||
111 | void *vaddr, dma_addr_t dma_handle) | ||
112 | { | ||
113 | return dma_free_coherent(&sdev->ofdev.dev, size, vaddr, dma_handle); | ||
114 | } | ||
108 | 115 | ||
109 | #define SBUS_DMA_BIDIRECTIONAL DMA_BIDIRECTIONAL | 116 | #define SBUS_DMA_BIDIRECTIONAL DMA_BIDIRECTIONAL |
110 | #define SBUS_DMA_TODEVICE DMA_TO_DEVICE | 117 | #define SBUS_DMA_TODEVICE DMA_TO_DEVICE |
@@ -112,18 +119,67 @@ extern void sbus_free_consistent(struct sbus_dev *, size_t, void *, dma_addr_t); | |||
112 | #define SBUS_DMA_NONE DMA_NONE | 119 | #define SBUS_DMA_NONE DMA_NONE |
113 | 120 | ||
114 | /* All the rest use streaming mode mappings. */ | 121 | /* All the rest use streaming mode mappings. */ |
115 | extern dma_addr_t sbus_map_single(struct sbus_dev *, void *, size_t, int); | 122 | static inline dma_addr_t sbus_map_single(struct sbus_dev *sdev, void *ptr, |
116 | extern void sbus_unmap_single(struct sbus_dev *, dma_addr_t, size_t, int); | 123 | size_t size, int direction) |
117 | extern int sbus_map_sg(struct sbus_dev *, struct scatterlist *, int, int); | 124 | { |
118 | extern void sbus_unmap_sg(struct sbus_dev *, struct scatterlist *, int, int); | 125 | return dma_map_single(&sdev->ofdev.dev, ptr, size, |
126 | (enum dma_data_direction) direction); | ||
127 | } | ||
128 | |||
129 | static inline void sbus_unmap_single(struct sbus_dev *sdev, | ||
130 | dma_addr_t dma_addr, size_t size, | ||
131 | int direction) | ||
132 | { | ||
133 | dma_unmap_single(&sdev->ofdev.dev, dma_addr, size, | ||
134 | (enum dma_data_direction) direction); | ||
135 | } | ||
136 | |||
137 | static inline int sbus_map_sg(struct sbus_dev *sdev, struct scatterlist *sg, | ||
138 | int nents, int direction) | ||
139 | { | ||
140 | return dma_map_sg(&sdev->ofdev.dev, sg, nents, | ||
141 | (enum dma_data_direction) direction); | ||
142 | } | ||
143 | |||
144 | static inline void sbus_unmap_sg(struct sbus_dev *sdev, struct scatterlist *sg, | ||
145 | int nents, int direction) | ||
146 | { | ||
147 | dma_unmap_sg(&sdev->ofdev.dev, sg, nents, | ||
148 | (enum dma_data_direction) direction); | ||
149 | } | ||
119 | 150 | ||
120 | /* Finally, allow explicit synchronization of streamable mappings. */ | 151 | /* Finally, allow explicit synchronization of streamable mappings. */ |
121 | extern void sbus_dma_sync_single_for_cpu(struct sbus_dev *, dma_addr_t, size_t, int); | 152 | static inline void sbus_dma_sync_single_for_cpu(struct sbus_dev *sdev, |
153 | dma_addr_t dma_handle, | ||
154 | size_t size, int direction) | ||
155 | { | ||
156 | dma_sync_single_for_cpu(&sdev->ofdev.dev, dma_handle, size, | ||
157 | (enum dma_data_direction) direction); | ||
158 | } | ||
122 | #define sbus_dma_sync_single sbus_dma_sync_single_for_cpu | 159 | #define sbus_dma_sync_single sbus_dma_sync_single_for_cpu |
123 | extern void sbus_dma_sync_single_for_device(struct sbus_dev *, dma_addr_t, size_t, int); | 160 | |
124 | extern void sbus_dma_sync_sg_for_cpu(struct sbus_dev *, struct scatterlist *, int, int); | 161 | static inline void sbus_dma_sync_single_for_device(struct sbus_dev *sdev, |
162 | dma_addr_t dma_handle, | ||
163 | size_t size, int direction) | ||
164 | { | ||
165 | /* No flushing needed to sync cpu writes to the device. */ | ||
166 | } | ||
167 | |||
168 | static inline void sbus_dma_sync_sg_for_cpu(struct sbus_dev *sdev, | ||
169 | struct scatterlist *sg, | ||
170 | int nents, int direction) | ||
171 | { | ||
172 | dma_sync_sg_for_cpu(&sdev->ofdev.dev, sg, nents, | ||
173 | (enum dma_data_direction) direction); | ||
174 | } | ||
125 | #define sbus_dma_sync_sg sbus_dma_sync_sg_for_cpu | 175 | #define sbus_dma_sync_sg sbus_dma_sync_sg_for_cpu |
126 | extern void sbus_dma_sync_sg_for_device(struct sbus_dev *, struct scatterlist *, int, int); | 176 | |
177 | static inline void sbus_dma_sync_sg_for_device(struct sbus_dev *sdev, | ||
178 | struct scatterlist *sg, | ||
179 | int nents, int direction) | ||
180 | { | ||
181 | /* No flushing needed to sync cpu writes to the device. */ | ||
182 | } | ||
127 | 183 | ||
128 | extern void sbus_arch_bus_ranges_init(struct device_node *, struct sbus_bus *); | 184 | extern void sbus_arch_bus_ranges_init(struct device_node *, struct sbus_bus *); |
129 | extern void sbus_setup_iommu(struct sbus_bus *, struct device_node *); | 185 | extern void sbus_setup_iommu(struct sbus_bus *, struct device_node *); |
diff --git a/include/asm-v850/thread_info.h b/include/asm-v850/thread_info.h index 82b8f2846207..1a9e6ae0c5fd 100644 --- a/include/asm-v850/thread_info.h +++ b/include/asm-v850/thread_info.h | |||
@@ -77,16 +77,14 @@ struct thread_info { | |||
77 | * thread information flag bit numbers | 77 | * thread information flag bit numbers |
78 | */ | 78 | */ |
79 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ | 79 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ |
80 | #define TIF_NOTIFY_RESUME 1 /* resumption notification requested */ | 80 | #define TIF_SIGPENDING 1 /* signal pending */ |
81 | #define TIF_SIGPENDING 2 /* signal pending */ | 81 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ |
82 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ | 82 | #define TIF_POLLING_NRFLAG 3 /* true if poll_idle() is polling |
83 | #define TIF_POLLING_NRFLAG 4 /* true if poll_idle() is polling | ||
84 | TIF_NEED_RESCHED */ | 83 | TIF_NEED_RESCHED */ |
85 | #define TIF_MEMDIE 5 | 84 | #define TIF_MEMDIE 4 |
86 | 85 | ||
87 | /* as above, but as bit values */ | 86 | /* as above, but as bit values */ |
88 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 87 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
89 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | ||
90 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | 88 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) |
91 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 89 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
92 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 90 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
diff --git a/include/asm-x86_64/acpi.h b/include/asm-x86_64/acpi.h index 1da8f49c0fe2..98173357dd89 100644 --- a/include/asm-x86_64/acpi.h +++ b/include/asm-x86_64/acpi.h | |||
@@ -108,6 +108,15 @@ static inline void acpi_disable_pci(void) | |||
108 | } | 108 | } |
109 | extern int acpi_irq_balance_set(char *str); | 109 | extern int acpi_irq_balance_set(char *str); |
110 | 110 | ||
111 | /* routines for saving/restoring kernel state */ | ||
112 | extern int acpi_save_state_mem(void); | ||
113 | extern void acpi_restore_state_mem(void); | ||
114 | |||
115 | extern unsigned long acpi_wakeup_address; | ||
116 | |||
117 | /* early initialization routine */ | ||
118 | extern void acpi_reserve_bootmem(void); | ||
119 | |||
111 | #else /* !CONFIG_ACPI */ | 120 | #else /* !CONFIG_ACPI */ |
112 | 121 | ||
113 | #define acpi_lapic 0 | 122 | #define acpi_lapic 0 |
@@ -121,19 +130,6 @@ extern int acpi_numa; | |||
121 | extern int acpi_scan_nodes(unsigned long start, unsigned long end); | 130 | extern int acpi_scan_nodes(unsigned long start, unsigned long end); |
122 | #define NR_NODE_MEMBLKS (MAX_NUMNODES*2) | 131 | #define NR_NODE_MEMBLKS (MAX_NUMNODES*2) |
123 | 132 | ||
124 | #ifdef CONFIG_ACPI_SLEEP | ||
125 | |||
126 | /* routines for saving/restoring kernel state */ | ||
127 | extern int acpi_save_state_mem(void); | ||
128 | extern void acpi_restore_state_mem(void); | ||
129 | |||
130 | extern unsigned long acpi_wakeup_address; | ||
131 | |||
132 | /* early initialization routine */ | ||
133 | extern void acpi_reserve_bootmem(void); | ||
134 | |||
135 | #endif /*CONFIG_ACPI_SLEEP*/ | ||
136 | |||
137 | extern int acpi_disabled; | 133 | extern int acpi_disabled; |
138 | extern int acpi_pci_disabled; | 134 | extern int acpi_pci_disabled; |
139 | 135 | ||
diff --git a/include/asm-x86_64/ist.h b/include/asm-x86_64/ist.h new file mode 100644 index 000000000000..338857ecbc68 --- /dev/null +++ b/include/asm-x86_64/ist.h | |||
@@ -0,0 +1 @@ | |||
#include <asm-i386/ist.h> | |||
diff --git a/include/asm-x86_64/serial.h b/include/asm-x86_64/serial.h index 8ebd765c674a..b0496e0d72a6 100644 --- a/include/asm-x86_64/serial.h +++ b/include/asm-x86_64/serial.h | |||
@@ -11,3 +11,19 @@ | |||
11 | * megabits/second; but this requires the faster clock. | 11 | * megabits/second; but this requires the faster clock. |
12 | */ | 12 | */ |
13 | #define BASE_BAUD ( 1843200 / 16 ) | 13 | #define BASE_BAUD ( 1843200 / 16 ) |
14 | |||
15 | /* Standard COM flags (except for COM4, because of the 8514 problem) */ | ||
16 | #ifdef CONFIG_SERIAL_DETECT_IRQ | ||
17 | #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ) | ||
18 | #define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_AUTO_IRQ) | ||
19 | #else | ||
20 | #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) | ||
21 | #define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF | ||
22 | #endif | ||
23 | |||
24 | #define SERIAL_PORT_DFNS \ | ||
25 | /* UART CLK PORT IRQ FLAGS */ \ | ||
26 | { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \ | ||
27 | { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \ | ||
28 | { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \ | ||
29 | { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */ | ||
diff --git a/include/asm-x86_64/suspend.h b/include/asm-x86_64/suspend.h index 9c3f8de90d2d..b897e8cb55fb 100644 --- a/include/asm-x86_64/suspend.h +++ b/include/asm-x86_64/suspend.h | |||
@@ -44,7 +44,6 @@ extern unsigned long saved_context_eflags; | |||
44 | 44 | ||
45 | extern void fix_processor_context(void); | 45 | extern void fix_processor_context(void); |
46 | 46 | ||
47 | #ifdef CONFIG_ACPI_SLEEP | ||
48 | extern unsigned long saved_rip; | 47 | extern unsigned long saved_rip; |
49 | extern unsigned long saved_rsp; | 48 | extern unsigned long saved_rsp; |
50 | extern unsigned long saved_rbp; | 49 | extern unsigned long saved_rbp; |
@@ -54,4 +53,3 @@ extern unsigned long saved_rdi; | |||
54 | 53 | ||
55 | /* routines for saving/restoring kernel state */ | 54 | /* routines for saving/restoring kernel state */ |
56 | extern int acpi_save_state_mem(void); | 55 | extern int acpi_save_state_mem(void); |
57 | #endif | ||
diff --git a/include/asm-x86_64/tce.h b/include/asm-x86_64/tce.h index dbb047febc5e..cd955d3d112f 100644 --- a/include/asm-x86_64/tce.h +++ b/include/asm-x86_64/tce.h | |||
@@ -41,8 +41,8 @@ struct iommu_table; | |||
41 | extern void tce_build(struct iommu_table *tbl, unsigned long index, | 41 | extern void tce_build(struct iommu_table *tbl, unsigned long index, |
42 | unsigned int npages, unsigned long uaddr, int direction); | 42 | unsigned int npages, unsigned long uaddr, int direction); |
43 | extern void tce_free(struct iommu_table *tbl, long index, unsigned int npages); | 43 | extern void tce_free(struct iommu_table *tbl, long index, unsigned int npages); |
44 | extern void* alloc_tce_table(void); | 44 | extern void * __init alloc_tce_table(void); |
45 | extern void free_tce_table(void *tbl); | 45 | extern void __init free_tce_table(void *tbl); |
46 | extern int build_tce_table(struct pci_dev *dev, void __iomem *bbar); | 46 | extern int __init build_tce_table(struct pci_dev *dev, void __iomem *bbar); |
47 | 47 | ||
48 | #endif /* _ASM_X86_64_TCE_H */ | 48 | #endif /* _ASM_X86_64_TCE_H */ |
diff --git a/include/asm-x86_64/thread_info.h b/include/asm-x86_64/thread_info.h index 33c72ef15a0c..beae2bfb62ca 100644 --- a/include/asm-x86_64/thread_info.h +++ b/include/asm-x86_64/thread_info.h | |||
@@ -107,7 +107,6 @@ static inline struct thread_info *stack_thread_info(void) | |||
107 | * Warning: layout of LSW is hardcoded in entry.S | 107 | * Warning: layout of LSW is hardcoded in entry.S |
108 | */ | 108 | */ |
109 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ | 109 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ |
110 | #define TIF_NOTIFY_RESUME 1 /* resumption notification requested */ | ||
111 | #define TIF_SIGPENDING 2 /* signal pending */ | 110 | #define TIF_SIGPENDING 2 /* signal pending */ |
112 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ | 111 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ |
113 | #define TIF_SINGLESTEP 4 /* reenable singlestep on user return*/ | 112 | #define TIF_SINGLESTEP 4 /* reenable singlestep on user return*/ |
@@ -126,7 +125,6 @@ static inline struct thread_info *stack_thread_info(void) | |||
126 | #define TIF_FREEZE 23 /* is freezing for suspend */ | 125 | #define TIF_FREEZE 23 /* is freezing for suspend */ |
127 | 126 | ||
128 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 127 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
129 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | ||
130 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | 128 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) |
131 | #define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) | 129 | #define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) |
132 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 130 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
diff --git a/include/asm-x86_64/uaccess.h b/include/asm-x86_64/uaccess.h index 9df30b939c4e..f4ce8768ad44 100644 --- a/include/asm-x86_64/uaccess.h +++ b/include/asm-x86_64/uaccess.h | |||
@@ -100,7 +100,7 @@ struct exception_table_entry | |||
100 | case 8: __get_user_x(8,__ret_gu,__val_gu,ptr); break; \ | 100 | case 8: __get_user_x(8,__ret_gu,__val_gu,ptr); break; \ |
101 | default: __get_user_bad(); break; \ | 101 | default: __get_user_bad(); break; \ |
102 | } \ | 102 | } \ |
103 | (x) = (typeof(*(ptr)))__val_gu; \ | 103 | (x) = (__force typeof(*(ptr)))__val_gu; \ |
104 | __ret_gu; \ | 104 | __ret_gu; \ |
105 | }) | 105 | }) |
106 | 106 | ||
@@ -192,7 +192,7 @@ struct __large_struct { unsigned long buf[100]; }; | |||
192 | int __gu_err; \ | 192 | int __gu_err; \ |
193 | unsigned long __gu_val; \ | 193 | unsigned long __gu_val; \ |
194 | __get_user_size(__gu_val,(ptr),(size),__gu_err); \ | 194 | __get_user_size(__gu_val,(ptr),(size),__gu_err); \ |
195 | (x) = (typeof(*(ptr)))__gu_val; \ | 195 | (x) = (__force typeof(*(ptr)))__gu_val; \ |
196 | __gu_err; \ | 196 | __gu_err; \ |
197 | }) | 197 | }) |
198 | 198 | ||
diff --git a/include/asm-xtensa/io.h b/include/asm-xtensa/io.h index 31ffc3f119c1..0faa614d9696 100644 --- a/include/asm-xtensa/io.h +++ b/include/asm-xtensa/io.h | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #ifdef __KERNEL__ | 14 | #ifdef __KERNEL__ |
15 | #include <asm/byteorder.h> | 15 | #include <asm/byteorder.h> |
16 | #include <asm/page.h> | ||
16 | 17 | ||
17 | #include <linux/types.h> | 18 | #include <linux/types.h> |
18 | 19 | ||
diff --git a/include/asm-xtensa/thread_info.h b/include/asm-xtensa/thread_info.h index 3fa29799b435..52c958285bcb 100644 --- a/include/asm-xtensa/thread_info.h +++ b/include/asm-xtensa/thread_info.h | |||
@@ -110,17 +110,15 @@ static inline struct thread_info *current_thread_info(void) | |||
110 | * - other flags in MSW | 110 | * - other flags in MSW |
111 | */ | 111 | */ |
112 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ | 112 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ |
113 | #define TIF_NOTIFY_RESUME 1 /* resumption notification requested */ | 113 | #define TIF_SIGPENDING 1 /* signal pending */ |
114 | #define TIF_SIGPENDING 2 /* signal pending */ | 114 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ |
115 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ | 115 | #define TIF_SINGLESTEP 3 /* restore singlestep on return to user mode */ |
116 | #define TIF_SINGLESTEP 4 /* restore singlestep on return to user mode */ | 116 | #define TIF_IRET 4 /* return with iret */ |
117 | #define TIF_IRET 5 /* return with iret */ | 117 | #define TIF_MEMDIE 5 |
118 | #define TIF_MEMDIE 6 | 118 | #define TIF_RESTORE_SIGMASK 6 /* restore signal mask in do_signal() */ |
119 | #define TIF_RESTORE_SIGMASK 7 /* restore signal mask in do_signal() */ | ||
120 | #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | 119 | #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ |
121 | 120 | ||
122 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 121 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
123 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | ||
124 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | 122 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) |
125 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 123 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
126 | #define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) | 124 | #define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) |
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index bcf875e844fe..ad7f71a81b0a 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -137,6 +137,7 @@ header-y += radeonfb.h | |||
137 | header-y += raw.h | 137 | header-y += raw.h |
138 | header-y += resource.h | 138 | header-y += resource.h |
139 | header-y += rose.h | 139 | header-y += rose.h |
140 | header-y += serial_reg.h | ||
140 | header-y += smbno.h | 141 | header-y += smbno.h |
141 | header-y += snmp.h | 142 | header-y += snmp.h |
142 | header-y += sockios.h | 143 | header-y += sockios.h |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index d5680cd7746a..bf5e0009de75 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -33,6 +33,7 @@ | |||
33 | #endif | 33 | #endif |
34 | 34 | ||
35 | #include <linux/list.h> | 35 | #include <linux/list.h> |
36 | #include <linux/mod_devicetable.h> | ||
36 | 37 | ||
37 | #include <acpi/acpi.h> | 38 | #include <acpi/acpi.h> |
38 | #include <acpi/acpi_bus.h> | 39 | #include <acpi/acpi_bus.h> |
diff --git a/include/linux/apm_bios.h b/include/linux/apm_bios.h index 290aef326812..5f921c84827a 100644 --- a/include/linux/apm_bios.h +++ b/include/linux/apm_bios.h | |||
@@ -21,20 +21,22 @@ typedef unsigned short apm_eventinfo_t; | |||
21 | 21 | ||
22 | #ifdef __KERNEL__ | 22 | #ifdef __KERNEL__ |
23 | 23 | ||
24 | #include <linux/types.h> | ||
25 | |||
24 | #define APM_CS (GDT_ENTRY_APMBIOS_BASE * 8) | 26 | #define APM_CS (GDT_ENTRY_APMBIOS_BASE * 8) |
25 | #define APM_CS_16 (APM_CS + 8) | 27 | #define APM_CS_16 (APM_CS + 8) |
26 | #define APM_DS (APM_CS_16 + 8) | 28 | #define APM_DS (APM_CS_16 + 8) |
27 | 29 | ||
28 | struct apm_bios_info { | 30 | struct apm_bios_info { |
29 | unsigned short version; | 31 | u16 version; |
30 | unsigned short cseg; | 32 | u16 cseg; |
31 | unsigned long offset; | 33 | u32 offset; |
32 | unsigned short cseg_16; | 34 | u16 cseg_16; |
33 | unsigned short dseg; | 35 | u16 dseg; |
34 | unsigned short flags; | 36 | u16 flags; |
35 | unsigned short cseg_len; | 37 | u16 cseg_len; |
36 | unsigned short cseg_16_len; | 38 | u16 cseg_16_len; |
37 | unsigned short dseg_len; | 39 | u16 dseg_len; |
38 | }; | 40 | }; |
39 | 41 | ||
40 | /* Results of APM Installation Check */ | 42 | /* Results of APM Installation Check */ |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 695e34964cb7..b126c6f68e27 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -37,7 +37,7 @@ | |||
37 | struct scsi_ioctl_command; | 37 | struct scsi_ioctl_command; |
38 | 38 | ||
39 | struct request_queue; | 39 | struct request_queue; |
40 | typedef struct request_queue request_queue_t; | 40 | typedef struct request_queue request_queue_t __deprecated; |
41 | struct elevator_queue; | 41 | struct elevator_queue; |
42 | typedef struct elevator_queue elevator_t; | 42 | typedef struct elevator_queue elevator_t; |
43 | struct request_pm_state; | 43 | struct request_pm_state; |
@@ -233,7 +233,7 @@ struct request { | |||
233 | struct list_head queuelist; | 233 | struct list_head queuelist; |
234 | struct list_head donelist; | 234 | struct list_head donelist; |
235 | 235 | ||
236 | request_queue_t *q; | 236 | struct request_queue *q; |
237 | 237 | ||
238 | unsigned int cmd_flags; | 238 | unsigned int cmd_flags; |
239 | enum rq_cmd_type_bits cmd_type; | 239 | enum rq_cmd_type_bits cmd_type; |
@@ -337,15 +337,15 @@ struct request_pm_state | |||
337 | 337 | ||
338 | #include <linux/elevator.h> | 338 | #include <linux/elevator.h> |
339 | 339 | ||
340 | typedef void (request_fn_proc) (request_queue_t *q); | 340 | typedef void (request_fn_proc) (struct request_queue *q); |
341 | typedef int (make_request_fn) (request_queue_t *q, struct bio *bio); | 341 | typedef int (make_request_fn) (struct request_queue *q, struct bio *bio); |
342 | typedef int (prep_rq_fn) (request_queue_t *, struct request *); | 342 | typedef int (prep_rq_fn) (struct request_queue *, struct request *); |
343 | typedef void (unplug_fn) (request_queue_t *); | 343 | typedef void (unplug_fn) (struct request_queue *); |
344 | 344 | ||
345 | struct bio_vec; | 345 | struct bio_vec; |
346 | typedef int (merge_bvec_fn) (request_queue_t *, struct bio *, struct bio_vec *); | 346 | typedef int (merge_bvec_fn) (struct request_queue *, struct bio *, struct bio_vec *); |
347 | typedef int (issue_flush_fn) (request_queue_t *, struct gendisk *, sector_t *); | 347 | typedef int (issue_flush_fn) (struct request_queue *, struct gendisk *, sector_t *); |
348 | typedef void (prepare_flush_fn) (request_queue_t *, struct request *); | 348 | typedef void (prepare_flush_fn) (struct request_queue *, struct request *); |
349 | typedef void (softirq_done_fn)(struct request *); | 349 | typedef void (softirq_done_fn)(struct request *); |
350 | 350 | ||
351 | enum blk_queue_state { | 351 | enum blk_queue_state { |
@@ -483,8 +483,8 @@ struct request_queue | |||
483 | #define QUEUE_FLAG_CLUSTER 0 /* cluster several segments into 1 */ | 483 | #define QUEUE_FLAG_CLUSTER 0 /* cluster several segments into 1 */ |
484 | #define QUEUE_FLAG_QUEUED 1 /* uses generic tag queueing */ | 484 | #define QUEUE_FLAG_QUEUED 1 /* uses generic tag queueing */ |
485 | #define QUEUE_FLAG_STOPPED 2 /* queue is stopped */ | 485 | #define QUEUE_FLAG_STOPPED 2 /* queue is stopped */ |
486 | #define QUEUE_FLAG_READFULL 3 /* write queue has been filled */ | 486 | #define QUEUE_FLAG_READFULL 3 /* read queue has been filled */ |
487 | #define QUEUE_FLAG_WRITEFULL 4 /* read queue has been filled */ | 487 | #define QUEUE_FLAG_WRITEFULL 4 /* write queue has been filled */ |
488 | #define QUEUE_FLAG_DEAD 5 /* queue being torn down */ | 488 | #define QUEUE_FLAG_DEAD 5 /* queue being torn down */ |
489 | #define QUEUE_FLAG_REENTER 6 /* Re-entrancy avoidance */ | 489 | #define QUEUE_FLAG_REENTER 6 /* Re-entrancy avoidance */ |
490 | #define QUEUE_FLAG_PLUGGED 7 /* queue is plugged */ | 490 | #define QUEUE_FLAG_PLUGGED 7 /* queue is plugged */ |
@@ -626,13 +626,13 @@ extern unsigned long blk_max_low_pfn, blk_max_pfn; | |||
626 | 626 | ||
627 | #ifdef CONFIG_BOUNCE | 627 | #ifdef CONFIG_BOUNCE |
628 | extern int init_emergency_isa_pool(void); | 628 | extern int init_emergency_isa_pool(void); |
629 | extern void blk_queue_bounce(request_queue_t *q, struct bio **bio); | 629 | extern void blk_queue_bounce(struct request_queue *q, struct bio **bio); |
630 | #else | 630 | #else |
631 | static inline int init_emergency_isa_pool(void) | 631 | static inline int init_emergency_isa_pool(void) |
632 | { | 632 | { |
633 | return 0; | 633 | return 0; |
634 | } | 634 | } |
635 | static inline void blk_queue_bounce(request_queue_t *q, struct bio **bio) | 635 | static inline void blk_queue_bounce(struct request_queue *q, struct bio **bio) |
636 | { | 636 | { |
637 | } | 637 | } |
638 | #endif /* CONFIG_MMU */ | 638 | #endif /* CONFIG_MMU */ |
@@ -646,14 +646,14 @@ extern void blk_unregister_queue(struct gendisk *disk); | |||
646 | extern void register_disk(struct gendisk *dev); | 646 | extern void register_disk(struct gendisk *dev); |
647 | extern void generic_make_request(struct bio *bio); | 647 | extern void generic_make_request(struct bio *bio); |
648 | extern void blk_put_request(struct request *); | 648 | extern void blk_put_request(struct request *); |
649 | extern void __blk_put_request(request_queue_t *, struct request *); | 649 | extern void __blk_put_request(struct request_queue *, struct request *); |
650 | extern void blk_end_sync_rq(struct request *rq, int error); | 650 | extern void blk_end_sync_rq(struct request *rq, int error); |
651 | extern struct request *blk_get_request(request_queue_t *, int, gfp_t); | 651 | extern struct request *blk_get_request(struct request_queue *, int, gfp_t); |
652 | extern void blk_insert_request(request_queue_t *, struct request *, int, void *); | 652 | extern void blk_insert_request(struct request_queue *, struct request *, int, void *); |
653 | extern void blk_requeue_request(request_queue_t *, struct request *); | 653 | extern void blk_requeue_request(struct request_queue *, struct request *); |
654 | extern void blk_plug_device(request_queue_t *); | 654 | extern void blk_plug_device(struct request_queue *); |
655 | extern int blk_remove_plug(request_queue_t *); | 655 | extern int blk_remove_plug(struct request_queue *); |
656 | extern void blk_recount_segments(request_queue_t *, struct bio *); | 656 | extern void blk_recount_segments(struct request_queue *, struct bio *); |
657 | extern int scsi_cmd_ioctl(struct file *, struct request_queue *, | 657 | extern int scsi_cmd_ioctl(struct file *, struct request_queue *, |
658 | struct gendisk *, unsigned int, void __user *); | 658 | struct gendisk *, unsigned int, void __user *); |
659 | extern int sg_scsi_ioctl(struct file *, struct request_queue *, | 659 | extern int sg_scsi_ioctl(struct file *, struct request_queue *, |
@@ -662,14 +662,15 @@ extern int sg_scsi_ioctl(struct file *, struct request_queue *, | |||
662 | /* | 662 | /* |
663 | * Temporary export, until SCSI gets fixed up. | 663 | * Temporary export, until SCSI gets fixed up. |
664 | */ | 664 | */ |
665 | extern int ll_back_merge_fn(request_queue_t *, struct request *, struct bio *); | 665 | extern int ll_back_merge_fn(struct request_queue *, struct request *, |
666 | struct bio *); | ||
666 | 667 | ||
667 | /* | 668 | /* |
668 | * A queue has just exitted congestion. Note this in the global counter of | 669 | * A queue has just exitted congestion. Note this in the global counter of |
669 | * congested queues, and wake up anyone who was waiting for requests to be | 670 | * congested queues, and wake up anyone who was waiting for requests to be |
670 | * put back. | 671 | * put back. |
671 | */ | 672 | */ |
672 | static inline void blk_clear_queue_congested(request_queue_t *q, int rw) | 673 | static inline void blk_clear_queue_congested(struct request_queue *q, int rw) |
673 | { | 674 | { |
674 | clear_bdi_congested(&q->backing_dev_info, rw); | 675 | clear_bdi_congested(&q->backing_dev_info, rw); |
675 | } | 676 | } |
@@ -678,29 +679,29 @@ static inline void blk_clear_queue_congested(request_queue_t *q, int rw) | |||
678 | * A queue has just entered congestion. Flag that in the queue's VM-visible | 679 | * A queue has just entered congestion. Flag that in the queue's VM-visible |
679 | * state flags and increment the global gounter of congested queues. | 680 | * state flags and increment the global gounter of congested queues. |
680 | */ | 681 | */ |
681 | static inline void blk_set_queue_congested(request_queue_t *q, int rw) | 682 | static inline void blk_set_queue_congested(struct request_queue *q, int rw) |
682 | { | 683 | { |
683 | set_bdi_congested(&q->backing_dev_info, rw); | 684 | set_bdi_congested(&q->backing_dev_info, rw); |
684 | } | 685 | } |
685 | 686 | ||
686 | extern void blk_start_queue(request_queue_t *q); | 687 | extern void blk_start_queue(struct request_queue *q); |
687 | extern void blk_stop_queue(request_queue_t *q); | 688 | extern void blk_stop_queue(struct request_queue *q); |
688 | extern void blk_sync_queue(struct request_queue *q); | 689 | extern void blk_sync_queue(struct request_queue *q); |
689 | extern void __blk_stop_queue(request_queue_t *q); | 690 | extern void __blk_stop_queue(struct request_queue *q); |
690 | extern void blk_run_queue(request_queue_t *); | 691 | extern void blk_run_queue(struct request_queue *); |
691 | extern void blk_start_queueing(request_queue_t *); | 692 | extern void blk_start_queueing(struct request_queue *); |
692 | extern int blk_rq_map_user(request_queue_t *, struct request *, void __user *, unsigned long); | 693 | extern int blk_rq_map_user(struct request_queue *, struct request *, void __user *, unsigned long); |
693 | extern int blk_rq_unmap_user(struct bio *); | 694 | extern int blk_rq_unmap_user(struct bio *); |
694 | extern int blk_rq_map_kern(request_queue_t *, struct request *, void *, unsigned int, gfp_t); | 695 | extern int blk_rq_map_kern(struct request_queue *, struct request *, void *, unsigned int, gfp_t); |
695 | extern int blk_rq_map_user_iov(request_queue_t *, struct request *, | 696 | extern int blk_rq_map_user_iov(struct request_queue *, struct request *, |
696 | struct sg_iovec *, int, unsigned int); | 697 | struct sg_iovec *, int, unsigned int); |
697 | extern int blk_execute_rq(request_queue_t *, struct gendisk *, | 698 | extern int blk_execute_rq(struct request_queue *, struct gendisk *, |
698 | struct request *, int); | 699 | struct request *, int); |
699 | extern void blk_execute_rq_nowait(request_queue_t *, struct gendisk *, | 700 | extern void blk_execute_rq_nowait(struct request_queue *, struct gendisk *, |
700 | struct request *, int, rq_end_io_fn *); | 701 | struct request *, int, rq_end_io_fn *); |
701 | extern int blk_verify_command(unsigned char *, int); | 702 | extern int blk_verify_command(unsigned char *, int); |
702 | 703 | ||
703 | static inline request_queue_t *bdev_get_queue(struct block_device *bdev) | 704 | static inline struct request_queue *bdev_get_queue(struct block_device *bdev) |
704 | { | 705 | { |
705 | return bdev->bd_disk->queue; | 706 | return bdev->bd_disk->queue; |
706 | } | 707 | } |
@@ -749,41 +750,41 @@ static inline void blkdev_dequeue_request(struct request *req) | |||
749 | /* | 750 | /* |
750 | * Access functions for manipulating queue properties | 751 | * Access functions for manipulating queue properties |
751 | */ | 752 | */ |
752 | extern request_queue_t *blk_init_queue_node(request_fn_proc *rfn, | 753 | extern struct request_queue *blk_init_queue_node(request_fn_proc *rfn, |
753 | spinlock_t *lock, int node_id); | 754 | spinlock_t *lock, int node_id); |
754 | extern request_queue_t *blk_init_queue(request_fn_proc *, spinlock_t *); | 755 | extern struct request_queue *blk_init_queue(request_fn_proc *, spinlock_t *); |
755 | extern void blk_cleanup_queue(request_queue_t *); | 756 | extern void blk_cleanup_queue(struct request_queue *); |
756 | extern void blk_queue_make_request(request_queue_t *, make_request_fn *); | 757 | extern void blk_queue_make_request(struct request_queue *, make_request_fn *); |
757 | extern void blk_queue_bounce_limit(request_queue_t *, u64); | 758 | extern void blk_queue_bounce_limit(struct request_queue *, u64); |
758 | extern void blk_queue_max_sectors(request_queue_t *, unsigned int); | 759 | extern void blk_queue_max_sectors(struct request_queue *, unsigned int); |
759 | extern void blk_queue_max_phys_segments(request_queue_t *, unsigned short); | 760 | extern void blk_queue_max_phys_segments(struct request_queue *, unsigned short); |
760 | extern void blk_queue_max_hw_segments(request_queue_t *, unsigned short); | 761 | extern void blk_queue_max_hw_segments(struct request_queue *, unsigned short); |
761 | extern void blk_queue_max_segment_size(request_queue_t *, unsigned int); | 762 | extern void blk_queue_max_segment_size(struct request_queue *, unsigned int); |
762 | extern void blk_queue_hardsect_size(request_queue_t *, unsigned short); | 763 | extern void blk_queue_hardsect_size(struct request_queue *, unsigned short); |
763 | extern void blk_queue_stack_limits(request_queue_t *t, request_queue_t *b); | 764 | extern void blk_queue_stack_limits(struct request_queue *t, struct request_queue *b); |
764 | extern void blk_queue_segment_boundary(request_queue_t *, unsigned long); | 765 | extern void blk_queue_segment_boundary(struct request_queue *, unsigned long); |
765 | extern void blk_queue_prep_rq(request_queue_t *, prep_rq_fn *pfn); | 766 | extern void blk_queue_prep_rq(struct request_queue *, prep_rq_fn *pfn); |
766 | extern void blk_queue_merge_bvec(request_queue_t *, merge_bvec_fn *); | 767 | extern void blk_queue_merge_bvec(struct request_queue *, merge_bvec_fn *); |
767 | extern void blk_queue_dma_alignment(request_queue_t *, int); | 768 | extern void blk_queue_dma_alignment(struct request_queue *, int); |
768 | extern void blk_queue_softirq_done(request_queue_t *, softirq_done_fn *); | 769 | extern void blk_queue_softirq_done(struct request_queue *, softirq_done_fn *); |
769 | extern struct backing_dev_info *blk_get_backing_dev_info(struct block_device *bdev); | 770 | extern struct backing_dev_info *blk_get_backing_dev_info(struct block_device *bdev); |
770 | extern int blk_queue_ordered(request_queue_t *, unsigned, prepare_flush_fn *); | 771 | extern int blk_queue_ordered(struct request_queue *, unsigned, prepare_flush_fn *); |
771 | extern void blk_queue_issue_flush_fn(request_queue_t *, issue_flush_fn *); | 772 | extern void blk_queue_issue_flush_fn(struct request_queue *, issue_flush_fn *); |
772 | extern int blk_do_ordered(request_queue_t *, struct request **); | 773 | extern int blk_do_ordered(struct request_queue *, struct request **); |
773 | extern unsigned blk_ordered_cur_seq(request_queue_t *); | 774 | extern unsigned blk_ordered_cur_seq(struct request_queue *); |
774 | extern unsigned blk_ordered_req_seq(struct request *); | 775 | extern unsigned blk_ordered_req_seq(struct request *); |
775 | extern void blk_ordered_complete_seq(request_queue_t *, unsigned, int); | 776 | extern void blk_ordered_complete_seq(struct request_queue *, unsigned, int); |
776 | 777 | ||
777 | extern int blk_rq_map_sg(request_queue_t *, struct request *, struct scatterlist *); | 778 | extern int blk_rq_map_sg(struct request_queue *, struct request *, struct scatterlist *); |
778 | extern void blk_dump_rq_flags(struct request *, char *); | 779 | extern void blk_dump_rq_flags(struct request *, char *); |
779 | extern void generic_unplug_device(request_queue_t *); | 780 | extern void generic_unplug_device(struct request_queue *); |
780 | extern void __generic_unplug_device(request_queue_t *); | 781 | extern void __generic_unplug_device(struct request_queue *); |
781 | extern long nr_blockdev_pages(void); | 782 | extern long nr_blockdev_pages(void); |
782 | 783 | ||
783 | int blk_get_queue(request_queue_t *); | 784 | int blk_get_queue(struct request_queue *); |
784 | request_queue_t *blk_alloc_queue(gfp_t); | 785 | struct request_queue *blk_alloc_queue(gfp_t); |
785 | request_queue_t *blk_alloc_queue_node(gfp_t, int); | 786 | struct request_queue *blk_alloc_queue_node(gfp_t, int); |
786 | extern void blk_put_queue(request_queue_t *); | 787 | extern void blk_put_queue(struct request_queue *); |
787 | 788 | ||
788 | /* | 789 | /* |
789 | * tag stuff | 790 | * tag stuff |
@@ -791,13 +792,13 @@ extern void blk_put_queue(request_queue_t *); | |||
791 | #define blk_queue_tag_depth(q) ((q)->queue_tags->busy) | 792 | #define blk_queue_tag_depth(q) ((q)->queue_tags->busy) |
792 | #define blk_queue_tag_queue(q) ((q)->queue_tags->busy < (q)->queue_tags->max_depth) | 793 | #define blk_queue_tag_queue(q) ((q)->queue_tags->busy < (q)->queue_tags->max_depth) |
793 | #define blk_rq_tagged(rq) ((rq)->cmd_flags & REQ_QUEUED) | 794 | #define blk_rq_tagged(rq) ((rq)->cmd_flags & REQ_QUEUED) |
794 | extern int blk_queue_start_tag(request_queue_t *, struct request *); | 795 | extern int blk_queue_start_tag(struct request_queue *, struct request *); |
795 | extern struct request *blk_queue_find_tag(request_queue_t *, int); | 796 | extern struct request *blk_queue_find_tag(struct request_queue *, int); |
796 | extern void blk_queue_end_tag(request_queue_t *, struct request *); | 797 | extern void blk_queue_end_tag(struct request_queue *, struct request *); |
797 | extern int blk_queue_init_tags(request_queue_t *, int, struct blk_queue_tag *); | 798 | extern int blk_queue_init_tags(struct request_queue *, int, struct blk_queue_tag *); |
798 | extern void blk_queue_free_tags(request_queue_t *); | 799 | extern void blk_queue_free_tags(struct request_queue *); |
799 | extern int blk_queue_resize_tags(request_queue_t *, int); | 800 | extern int blk_queue_resize_tags(struct request_queue *, int); |
800 | extern void blk_queue_invalidate_tags(request_queue_t *); | 801 | extern void blk_queue_invalidate_tags(struct request_queue *); |
801 | extern struct blk_queue_tag *blk_init_tags(int); | 802 | extern struct blk_queue_tag *blk_init_tags(int); |
802 | extern void blk_free_tags(struct blk_queue_tag *); | 803 | extern void blk_free_tags(struct blk_queue_tag *); |
803 | 804 | ||
@@ -809,7 +810,7 @@ static inline struct request *blk_map_queue_find_tag(struct blk_queue_tag *bqt, | |||
809 | return bqt->tag_index[tag]; | 810 | return bqt->tag_index[tag]; |
810 | } | 811 | } |
811 | 812 | ||
812 | extern void blk_rq_bio_prep(request_queue_t *, struct request *, struct bio *); | 813 | extern void blk_rq_bio_prep(struct request_queue *, struct request *, struct bio *); |
813 | extern int blkdev_issue_flush(struct block_device *, sector_t *); | 814 | extern int blkdev_issue_flush(struct block_device *, sector_t *); |
814 | 815 | ||
815 | #define MAX_PHYS_SEGMENTS 128 | 816 | #define MAX_PHYS_SEGMENTS 128 |
@@ -821,7 +822,7 @@ extern int blkdev_issue_flush(struct block_device *, sector_t *); | |||
821 | 822 | ||
822 | #define blkdev_entry_to_request(entry) list_entry((entry), struct request, queuelist) | 823 | #define blkdev_entry_to_request(entry) list_entry((entry), struct request, queuelist) |
823 | 824 | ||
824 | static inline int queue_hardsect_size(request_queue_t *q) | 825 | static inline int queue_hardsect_size(struct request_queue *q) |
825 | { | 826 | { |
826 | int retval = 512; | 827 | int retval = 512; |
827 | 828 | ||
@@ -836,7 +837,7 @@ static inline int bdev_hardsect_size(struct block_device *bdev) | |||
836 | return queue_hardsect_size(bdev_get_queue(bdev)); | 837 | return queue_hardsect_size(bdev_get_queue(bdev)); |
837 | } | 838 | } |
838 | 839 | ||
839 | static inline int queue_dma_alignment(request_queue_t *q) | 840 | static inline int queue_dma_alignment(struct request_queue *q) |
840 | { | 841 | { |
841 | int retval = 511; | 842 | int retval = 511; |
842 | 843 | ||
diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h index 3680ff9a30ed..90874a5d7d78 100644 --- a/include/linux/blktrace_api.h +++ b/include/linux/blktrace_api.h | |||
@@ -144,7 +144,7 @@ struct blk_user_trace_setup { | |||
144 | 144 | ||
145 | #if defined(CONFIG_BLK_DEV_IO_TRACE) | 145 | #if defined(CONFIG_BLK_DEV_IO_TRACE) |
146 | extern int blk_trace_ioctl(struct block_device *, unsigned, char __user *); | 146 | extern int blk_trace_ioctl(struct block_device *, unsigned, char __user *); |
147 | extern void blk_trace_shutdown(request_queue_t *); | 147 | extern void blk_trace_shutdown(struct request_queue *); |
148 | extern void __blk_add_trace(struct blk_trace *, sector_t, int, int, u32, int, int, void *); | 148 | extern void __blk_add_trace(struct blk_trace *, sector_t, int, int, u32, int, int, void *); |
149 | 149 | ||
150 | /** | 150 | /** |
diff --git a/include/linux/bsg.h b/include/linux/bsg.h index f415f89e0ac8..102dc096e1cb 100644 --- a/include/linux/bsg.h +++ b/include/linux/bsg.h | |||
@@ -53,15 +53,19 @@ struct bsg_class_device { | |||
53 | struct class_device *class_dev; | 53 | struct class_device *class_dev; |
54 | struct device *dev; | 54 | struct device *dev; |
55 | int minor; | 55 | int minor; |
56 | struct list_head list; | ||
57 | struct request_queue *queue; | 56 | struct request_queue *queue; |
58 | }; | 57 | }; |
59 | 58 | ||
60 | extern int bsg_register_queue(struct request_queue *, struct device *, const char *); | 59 | extern int bsg_register_queue(struct request_queue *, struct device *, const char *); |
61 | extern void bsg_unregister_queue(struct request_queue *); | 60 | extern void bsg_unregister_queue(struct request_queue *); |
62 | #else | 61 | #else |
63 | #define bsg_register_queue(disk, dev, name) (0) | 62 | static inline int bsg_register_queue(struct request_queue * rq, struct device *dev, const char *name) |
64 | #define bsg_unregister_queue(disk) do { } while (0) | 63 | { |
64 | return 0; | ||
65 | } | ||
66 | static inline void bsg_unregister_queue(struct request_queue *rq) | ||
67 | { | ||
68 | } | ||
65 | #endif | 69 | #endif |
66 | 70 | ||
67 | #endif /* __KERNEL__ */ | 71 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 12a1291855e2..86f9a3a6137d 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h | |||
@@ -15,8 +15,8 @@ | |||
15 | # define __acquire(x) __context__(x,1) | 15 | # define __acquire(x) __context__(x,1) |
16 | # define __release(x) __context__(x,-1) | 16 | # define __release(x) __context__(x,-1) |
17 | # define __cond_lock(x,c) ((c) ? ({ __acquire(x); 1; }) : 0) | 17 | # define __cond_lock(x,c) ((c) ? ({ __acquire(x); 1; }) : 0) |
18 | extern void __chk_user_ptr(const void __user *); | 18 | extern void __chk_user_ptr(const volatile void __user *); |
19 | extern void __chk_io_ptr(const void __iomem *); | 19 | extern void __chk_io_ptr(const volatile void __iomem *); |
20 | #else | 20 | #else |
21 | # define __user | 21 | # define __user |
22 | # define __kernel | 22 | # define __kernel |
diff --git a/include/linux/device.h b/include/linux/device.h index d9f0a57f5a2f..3a38d1f70cb7 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -551,6 +551,9 @@ extern void put_device(struct device * dev); | |||
551 | /* drivers/base/power/shutdown.c */ | 551 | /* drivers/base/power/shutdown.c */ |
552 | extern void device_shutdown(void); | 552 | extern void device_shutdown(void); |
553 | 553 | ||
554 | /* drivers/base/sys.c */ | ||
555 | extern void sysdev_shutdown(void); | ||
556 | |||
554 | 557 | ||
555 | /* drivers/base/firmware.c */ | 558 | /* drivers/base/firmware.c */ |
556 | extern int __must_check firmware_register(struct kset *); | 559 | extern int __must_check firmware_register(struct kset *); |
diff --git a/include/linux/dvb/video.h b/include/linux/dvb/video.h index 93e4c3a6d190..50839fe9e39e 100644 --- a/include/linux/dvb/video.h +++ b/include/linux/dvb/video.h | |||
@@ -29,6 +29,7 @@ | |||
29 | #ifdef __KERNEL__ | 29 | #ifdef __KERNEL__ |
30 | #include <linux/types.h> | 30 | #include <linux/types.h> |
31 | #else | 31 | #else |
32 | #include <asm/types.h> | ||
32 | #include <stdint.h> | 33 | #include <stdint.h> |
33 | #include <time.h> | 34 | #include <time.h> |
34 | #endif | 35 | #endif |
diff --git a/include/linux/elevator.h b/include/linux/elevator.h index e88fcbc77f8f..e8f42133a616 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h | |||
@@ -5,29 +5,29 @@ | |||
5 | 5 | ||
6 | #ifdef CONFIG_BLOCK | 6 | #ifdef CONFIG_BLOCK |
7 | 7 | ||
8 | typedef int (elevator_merge_fn) (request_queue_t *, struct request **, | 8 | typedef int (elevator_merge_fn) (struct request_queue *, struct request **, |
9 | struct bio *); | 9 | struct bio *); |
10 | 10 | ||
11 | typedef void (elevator_merge_req_fn) (request_queue_t *, struct request *, struct request *); | 11 | typedef void (elevator_merge_req_fn) (struct request_queue *, struct request *, struct request *); |
12 | 12 | ||
13 | typedef void (elevator_merged_fn) (request_queue_t *, struct request *, int); | 13 | typedef void (elevator_merged_fn) (struct request_queue *, struct request *, int); |
14 | 14 | ||
15 | typedef int (elevator_allow_merge_fn) (request_queue_t *, struct request *, struct bio *); | 15 | typedef int (elevator_allow_merge_fn) (struct request_queue *, struct request *, struct bio *); |
16 | 16 | ||
17 | typedef int (elevator_dispatch_fn) (request_queue_t *, int); | 17 | typedef int (elevator_dispatch_fn) (struct request_queue *, int); |
18 | 18 | ||
19 | typedef void (elevator_add_req_fn) (request_queue_t *, struct request *); | 19 | typedef void (elevator_add_req_fn) (struct request_queue *, struct request *); |
20 | typedef int (elevator_queue_empty_fn) (request_queue_t *); | 20 | typedef int (elevator_queue_empty_fn) (struct request_queue *); |
21 | typedef struct request *(elevator_request_list_fn) (request_queue_t *, struct request *); | 21 | typedef struct request *(elevator_request_list_fn) (struct request_queue *, struct request *); |
22 | typedef void (elevator_completed_req_fn) (request_queue_t *, struct request *); | 22 | typedef void (elevator_completed_req_fn) (struct request_queue *, struct request *); |
23 | typedef int (elevator_may_queue_fn) (request_queue_t *, int); | 23 | typedef int (elevator_may_queue_fn) (struct request_queue *, int); |
24 | 24 | ||
25 | typedef int (elevator_set_req_fn) (request_queue_t *, struct request *, gfp_t); | 25 | typedef int (elevator_set_req_fn) (struct request_queue *, struct request *, gfp_t); |
26 | typedef void (elevator_put_req_fn) (struct request *); | 26 | typedef void (elevator_put_req_fn) (struct request *); |
27 | typedef void (elevator_activate_req_fn) (request_queue_t *, struct request *); | 27 | typedef void (elevator_activate_req_fn) (struct request_queue *, struct request *); |
28 | typedef void (elevator_deactivate_req_fn) (request_queue_t *, struct request *); | 28 | typedef void (elevator_deactivate_req_fn) (struct request_queue *, struct request *); |
29 | 29 | ||
30 | typedef void *(elevator_init_fn) (request_queue_t *); | 30 | typedef void *(elevator_init_fn) (struct request_queue *); |
31 | typedef void (elevator_exit_fn) (elevator_t *); | 31 | typedef void (elevator_exit_fn) (elevator_t *); |
32 | 32 | ||
33 | struct elevator_ops | 33 | struct elevator_ops |
@@ -94,27 +94,27 @@ struct elevator_queue | |||
94 | /* | 94 | /* |
95 | * block elevator interface | 95 | * block elevator interface |
96 | */ | 96 | */ |
97 | extern void elv_dispatch_sort(request_queue_t *, struct request *); | 97 | extern void elv_dispatch_sort(struct request_queue *, struct request *); |
98 | extern void elv_dispatch_add_tail(request_queue_t *, struct request *); | 98 | extern void elv_dispatch_add_tail(struct request_queue *, struct request *); |
99 | extern void elv_add_request(request_queue_t *, struct request *, int, int); | 99 | extern void elv_add_request(struct request_queue *, struct request *, int, int); |
100 | extern void __elv_add_request(request_queue_t *, struct request *, int, int); | 100 | extern void __elv_add_request(struct request_queue *, struct request *, int, int); |
101 | extern void elv_insert(request_queue_t *, struct request *, int); | 101 | extern void elv_insert(struct request_queue *, struct request *, int); |
102 | extern int elv_merge(request_queue_t *, struct request **, struct bio *); | 102 | extern int elv_merge(struct request_queue *, struct request **, struct bio *); |
103 | extern void elv_merge_requests(request_queue_t *, struct request *, | 103 | extern void elv_merge_requests(struct request_queue *, struct request *, |
104 | struct request *); | 104 | struct request *); |
105 | extern void elv_merged_request(request_queue_t *, struct request *, int); | 105 | extern void elv_merged_request(struct request_queue *, struct request *, int); |
106 | extern void elv_dequeue_request(request_queue_t *, struct request *); | 106 | extern void elv_dequeue_request(struct request_queue *, struct request *); |
107 | extern void elv_requeue_request(request_queue_t *, struct request *); | 107 | extern void elv_requeue_request(struct request_queue *, struct request *); |
108 | extern int elv_queue_empty(request_queue_t *); | 108 | extern int elv_queue_empty(struct request_queue *); |
109 | extern struct request *elv_next_request(struct request_queue *q); | 109 | extern struct request *elv_next_request(struct request_queue *q); |
110 | extern struct request *elv_former_request(request_queue_t *, struct request *); | 110 | extern struct request *elv_former_request(struct request_queue *, struct request *); |
111 | extern struct request *elv_latter_request(request_queue_t *, struct request *); | 111 | extern struct request *elv_latter_request(struct request_queue *, struct request *); |
112 | extern int elv_register_queue(request_queue_t *q); | 112 | extern int elv_register_queue(struct request_queue *q); |
113 | extern void elv_unregister_queue(request_queue_t *q); | 113 | extern void elv_unregister_queue(struct request_queue *q); |
114 | extern int elv_may_queue(request_queue_t *, int); | 114 | extern int elv_may_queue(struct request_queue *, int); |
115 | extern void elv_completed_request(request_queue_t *, struct request *); | 115 | extern void elv_completed_request(struct request_queue *, struct request *); |
116 | extern int elv_set_request(request_queue_t *, struct request *, gfp_t); | 116 | extern int elv_set_request(struct request_queue *, struct request *, gfp_t); |
117 | extern void elv_put_request(request_queue_t *, struct request *); | 117 | extern void elv_put_request(struct request_queue *, struct request *); |
118 | 118 | ||
119 | /* | 119 | /* |
120 | * io scheduler registration | 120 | * io scheduler registration |
@@ -125,18 +125,18 @@ extern void elv_unregister(struct elevator_type *); | |||
125 | /* | 125 | /* |
126 | * io scheduler sysfs switching | 126 | * io scheduler sysfs switching |
127 | */ | 127 | */ |
128 | extern ssize_t elv_iosched_show(request_queue_t *, char *); | 128 | extern ssize_t elv_iosched_show(struct request_queue *, char *); |
129 | extern ssize_t elv_iosched_store(request_queue_t *, const char *, size_t); | 129 | extern ssize_t elv_iosched_store(struct request_queue *, const char *, size_t); |
130 | 130 | ||
131 | extern int elevator_init(request_queue_t *, char *); | 131 | extern int elevator_init(struct request_queue *, char *); |
132 | extern void elevator_exit(elevator_t *); | 132 | extern void elevator_exit(elevator_t *); |
133 | extern int elv_rq_merge_ok(struct request *, struct bio *); | 133 | extern int elv_rq_merge_ok(struct request *, struct bio *); |
134 | 134 | ||
135 | /* | 135 | /* |
136 | * Helper functions. | 136 | * Helper functions. |
137 | */ | 137 | */ |
138 | extern struct request *elv_rb_former_request(request_queue_t *, struct request *); | 138 | extern struct request *elv_rb_former_request(struct request_queue *, struct request *); |
139 | extern struct request *elv_rb_latter_request(request_queue_t *, struct request *); | 139 | extern struct request *elv_rb_latter_request(struct request_queue *, struct request *); |
140 | 140 | ||
141 | /* | 141 | /* |
142 | * rb support functions. | 142 | * rb support functions. |
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index 3a632244f31b..23ccea811297 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h | |||
@@ -270,8 +270,6 @@ u32 ethtool_op_get_sg(struct net_device *dev); | |||
270 | int ethtool_op_set_sg(struct net_device *dev, u32 data); | 270 | int ethtool_op_set_sg(struct net_device *dev, u32 data); |
271 | u32 ethtool_op_get_tso(struct net_device *dev); | 271 | u32 ethtool_op_get_tso(struct net_device *dev); |
272 | int ethtool_op_set_tso(struct net_device *dev, u32 data); | 272 | int ethtool_op_set_tso(struct net_device *dev, u32 data); |
273 | int ethtool_op_get_perm_addr(struct net_device *dev, | ||
274 | struct ethtool_perm_addr *addr, u8 *data); | ||
275 | u32 ethtool_op_get_ufo(struct net_device *dev); | 273 | u32 ethtool_op_get_ufo(struct net_device *dev); |
276 | int ethtool_op_set_ufo(struct net_device *dev, u32 data); | 274 | int ethtool_op_set_ufo(struct net_device *dev, u32 data); |
277 | 275 | ||
@@ -309,7 +307,6 @@ int ethtool_op_set_ufo(struct net_device *dev, u32 data); | |||
309 | * get_strings: Return a set of strings that describe the requested objects | 307 | * get_strings: Return a set of strings that describe the requested objects |
310 | * phys_id: Identify the device | 308 | * phys_id: Identify the device |
311 | * get_stats: Return statistics about the device | 309 | * get_stats: Return statistics about the device |
312 | * get_perm_addr: Gets the permanent hardware address | ||
313 | * | 310 | * |
314 | * Description: | 311 | * Description: |
315 | * | 312 | * |
@@ -368,7 +365,6 @@ struct ethtool_ops { | |||
368 | int (*phys_id)(struct net_device *, u32); | 365 | int (*phys_id)(struct net_device *, u32); |
369 | int (*get_stats_count)(struct net_device *); | 366 | int (*get_stats_count)(struct net_device *); |
370 | void (*get_ethtool_stats)(struct net_device *, struct ethtool_stats *, u64 *); | 367 | void (*get_ethtool_stats)(struct net_device *, struct ethtool_stats *, u64 *); |
371 | int (*get_perm_addr)(struct net_device *, struct ethtool_perm_addr *, u8 *); | ||
372 | int (*begin)(struct net_device *); | 368 | int (*begin)(struct net_device *); |
373 | void (*complete)(struct net_device *); | 369 | void (*complete)(struct net_device *); |
374 | u32 (*get_ufo)(struct net_device *); | 370 | u32 (*get_ufo)(struct net_device *); |
diff --git a/include/linux/freezer.h b/include/linux/freezer.h index c8e02de737f6..efded00ad08c 100644 --- a/include/linux/freezer.h +++ b/include/linux/freezer.h | |||
@@ -5,7 +5,7 @@ | |||
5 | 5 | ||
6 | #include <linux/sched.h> | 6 | #include <linux/sched.h> |
7 | 7 | ||
8 | #ifdef CONFIG_PM | 8 | #ifdef CONFIG_PM_SLEEP |
9 | /* | 9 | /* |
10 | * Check if a process has been frozen | 10 | * Check if a process has been frozen |
11 | */ | 11 | */ |
@@ -126,7 +126,7 @@ static inline void set_freezable(void) | |||
126 | current->flags &= ~PF_NOFREEZE; | 126 | current->flags &= ~PF_NOFREEZE; |
127 | } | 127 | } |
128 | 128 | ||
129 | #else | 129 | #else /* !CONFIG_PM_SLEEP */ |
130 | static inline int frozen(struct task_struct *p) { return 0; } | 130 | static inline int frozen(struct task_struct *p) { return 0; } |
131 | static inline int freezing(struct task_struct *p) { return 0; } | 131 | static inline int freezing(struct task_struct *p) { return 0; } |
132 | static inline void set_freeze_flag(struct task_struct *p) {} | 132 | static inline void set_freeze_flag(struct task_struct *p) {} |
@@ -143,6 +143,6 @@ static inline void freezer_do_not_count(void) {} | |||
143 | static inline void freezer_count(void) {} | 143 | static inline void freezer_count(void) {} |
144 | static inline int freezer_should_skip(struct task_struct *p) { return 0; } | 144 | static inline int freezer_should_skip(struct task_struct *p) { return 0; } |
145 | static inline void set_freezable(void) {} | 145 | static inline void set_freezable(void) {} |
146 | #endif | 146 | #endif /* !CONFIG_PM_SLEEP */ |
147 | 147 | ||
148 | #endif /* FREEZER_H_INCLUDED */ | 148 | #endif /* FREEZER_H_INCLUDED */ |
diff --git a/include/linux/fs.h b/include/linux/fs.h index d33beadd9a43..6bf139562947 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -878,7 +878,7 @@ extern int vfs_cancel_lock(struct file *filp, struct file_lock *fl); | |||
878 | extern int flock_lock_file_wait(struct file *filp, struct file_lock *fl); | 878 | extern int flock_lock_file_wait(struct file *filp, struct file_lock *fl); |
879 | extern int __break_lease(struct inode *inode, unsigned int flags); | 879 | extern int __break_lease(struct inode *inode, unsigned int flags); |
880 | extern void lease_get_mtime(struct inode *, struct timespec *time); | 880 | extern void lease_get_mtime(struct inode *, struct timespec *time); |
881 | extern int setlease(struct file *, long, struct file_lock **); | 881 | extern int generic_setlease(struct file *, long, struct file_lock **); |
882 | extern int vfs_setlease(struct file *, long, struct file_lock **); | 882 | extern int vfs_setlease(struct file *, long, struct file_lock **); |
883 | extern int lease_modify(struct file_lock **, int); | 883 | extern int lease_modify(struct file_lock **, int); |
884 | extern int lock_may_read(struct inode *, loff_t start, unsigned long count); | 884 | extern int lock_may_read(struct inode *, loff_t start, unsigned long count); |
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 9756fc102a83..a47b8025d399 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -264,7 +264,7 @@ static inline void set_capacity(struct gendisk *disk, sector_t size) | |||
264 | 264 | ||
265 | #ifdef CONFIG_SOLARIS_X86_PARTITION | 265 | #ifdef CONFIG_SOLARIS_X86_PARTITION |
266 | 266 | ||
267 | #define SOLARIS_X86_NUMSLICE 8 | 267 | #define SOLARIS_X86_NUMSLICE 16 |
268 | #define SOLARIS_X86_VTOC_SANE (0x600DDEEEUL) | 268 | #define SOLARIS_X86_VTOC_SANE (0x600DDEEEUL) |
269 | 269 | ||
270 | struct solaris_x86_slice { | 270 | struct solaris_x86_slice { |
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 49b7053043ad..e6a71c82d204 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _LINUX_HUGETLB_H | 1 | #ifndef _LINUX_HUGETLB_H |
2 | #define _LINUX_HUGETLB_H | 2 | #define _LINUX_HUGETLB_H |
3 | 3 | ||
4 | #include <linux/fs.h> | ||
5 | |||
4 | #ifdef CONFIG_HUGETLB_PAGE | 6 | #ifdef CONFIG_HUGETLB_PAGE |
5 | 7 | ||
6 | #include <linux/mempolicy.h> | 8 | #include <linux/mempolicy.h> |
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 0c37a737a2b2..2a32f2fd940d 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -156,10 +156,14 @@ struct i2c_driver { | |||
156 | * @name: Indicates the type of the device, usually a chip name that's | 156 | * @name: Indicates the type of the device, usually a chip name that's |
157 | * generic enough to hide second-sourcing and compatible revisions. | 157 | * generic enough to hide second-sourcing and compatible revisions. |
158 | * @adapter: manages the bus segment hosting this I2C device | 158 | * @adapter: manages the bus segment hosting this I2C device |
159 | * @driver: device's driver, hence pointer to access routines | ||
160 | * @usage_count: counts current number of users of this client | ||
159 | * @dev: Driver model device node for the slave. | 161 | * @dev: Driver model device node for the slave. |
160 | * @irq: indicates the IRQ generated by this device (if any) | 162 | * @irq: indicates the IRQ generated by this device (if any) |
161 | * @driver_name: Identifies new-style driver used with this device; also | 163 | * @driver_name: Identifies new-style driver used with this device; also |
162 | * used as the module name for hotplug/coldplug modprobe support. | 164 | * used as the module name for hotplug/coldplug modprobe support. |
165 | * @list: list of active/busy clients | ||
166 | * @released: used to synchronize client releases & detaches and references | ||
163 | * | 167 | * |
164 | * An i2c_client identifies a single device (i.e. chip) connected to an | 168 | * An i2c_client identifies a single device (i.e. chip) connected to an |
165 | * i2c bus. The behaviour exposed to Linux is defined by the driver | 169 | * i2c bus. The behaviour exposed to Linux is defined by the driver |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 5f5daad8bc54..d71d0121b7f9 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -555,7 +555,7 @@ typedef struct ide_drive_s { | |||
555 | char name[4]; /* drive name, such as "hda" */ | 555 | char name[4]; /* drive name, such as "hda" */ |
556 | char driver_req[10]; /* requests specific driver */ | 556 | char driver_req[10]; /* requests specific driver */ |
557 | 557 | ||
558 | request_queue_t *queue; /* request queue */ | 558 | struct request_queue *queue; /* request queue */ |
559 | 559 | ||
560 | struct request *rq; /* current request */ | 560 | struct request *rq; /* current request */ |
561 | struct ide_drive_s *next; /* circular list of hwgroup drives */ | 561 | struct ide_drive_s *next; /* circular list of hwgroup drives */ |
@@ -1206,7 +1206,7 @@ extern void ide_stall_queue(ide_drive_t *drive, unsigned long timeout); | |||
1206 | extern int ide_spin_wait_hwgroup(ide_drive_t *); | 1206 | extern int ide_spin_wait_hwgroup(ide_drive_t *); |
1207 | extern void ide_timer_expiry(unsigned long); | 1207 | extern void ide_timer_expiry(unsigned long); |
1208 | extern irqreturn_t ide_intr(int irq, void *dev_id); | 1208 | extern irqreturn_t ide_intr(int irq, void *dev_id); |
1209 | extern void do_ide_request(request_queue_t *); | 1209 | extern void do_ide_request(struct request_queue *); |
1210 | 1210 | ||
1211 | void ide_init_disk(struct gendisk *, ide_drive_t *); | 1211 | void ide_init_disk(struct gendisk *, ide_drive_t *); |
1212 | 1212 | ||
diff --git a/include/linux/init.h b/include/linux/init.h index f0d0e3295a9b..1a4a283d19a9 100644 --- a/include/linux/init.h +++ b/include/linux/init.h | |||
@@ -114,7 +114,7 @@ void prepare_namespace(void); | |||
114 | * | 114 | * |
115 | * This only exists for built-in code, not for modules. | 115 | * This only exists for built-in code, not for modules. |
116 | */ | 116 | */ |
117 | #define pure_initcall(fn) __define_initcall("0",fn,1) | 117 | #define pure_initcall(fn) __define_initcall("0",fn,0) |
118 | 118 | ||
119 | #define core_initcall(fn) __define_initcall("1",fn,1) | 119 | #define core_initcall(fn) __define_initcall("1",fn,1) |
120 | #define core_initcall_sync(fn) __define_initcall("1s",fn,1s) | 120 | #define core_initcall_sync(fn) __define_initcall("1s",fn,1s) |
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 0a3c2ebf2008..5523f19d88d2 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
@@ -11,8 +11,6 @@ | |||
11 | #include <linux/hardirq.h> | 11 | #include <linux/hardirq.h> |
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/irqflags.h> | 13 | #include <linux/irqflags.h> |
14 | #include <linux/bottom_half.h> | ||
15 | #include <linux/device.h> | ||
16 | #include <asm/atomic.h> | 14 | #include <asm/atomic.h> |
17 | #include <asm/ptrace.h> | 15 | #include <asm/ptrace.h> |
18 | #include <asm/system.h> | 16 | #include <asm/system.h> |
@@ -97,6 +95,8 @@ extern int __must_check request_irq(unsigned int, irq_handler_t handler, | |||
97 | unsigned long, const char *, void *); | 95 | unsigned long, const char *, void *); |
98 | extern void free_irq(unsigned int, void *); | 96 | extern void free_irq(unsigned int, void *); |
99 | 97 | ||
98 | struct device; | ||
99 | |||
100 | extern int __must_check devm_request_irq(struct device *dev, unsigned int irq, | 100 | extern int __must_check devm_request_irq(struct device *dev, unsigned int irq, |
101 | irq_handler_t handler, unsigned long irqflags, | 101 | irq_handler_t handler, unsigned long irqflags, |
102 | const char *devname, void *dev_id); | 102 | const char *devname, void *dev_id); |
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 97983dc9df13..4ca60c3320fb 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
@@ -219,7 +219,6 @@ enum { | |||
219 | #include <linux/tcp.h> | 219 | #include <linux/tcp.h> |
220 | #include <linux/udp.h> | 220 | #include <linux/udp.h> |
221 | 221 | ||
222 | #include <net/if_inet6.h> /* struct ipv6_mc_socklist */ | ||
223 | #include <net/inet_sock.h> | 222 | #include <net/inet_sock.h> |
224 | 223 | ||
225 | static inline struct ipv6hdr *ipv6_hdr(const struct sk_buff *skb) | 224 | static inline struct ipv6hdr *ipv6_hdr(const struct sk_buff *skb) |
@@ -273,6 +272,10 @@ struct tcp6_request_sock { | |||
273 | struct inet6_request_sock tcp6rsk_inet6; | 272 | struct inet6_request_sock tcp6rsk_inet6; |
274 | }; | 273 | }; |
275 | 274 | ||
275 | struct ipv6_mc_socklist; | ||
276 | struct ipv6_ac_socklist; | ||
277 | struct ipv6_fl_socklist; | ||
278 | |||
276 | /** | 279 | /** |
277 | * struct ipv6_pinfo - ipv6 private area | 280 | * struct ipv6_pinfo - ipv6 private area |
278 | * | 281 | * |
diff --git a/include/linux/irq.h b/include/linux/irq.h index 44657197fcb0..efc88538b2ba 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -140,6 +140,7 @@ struct irq_chip { | |||
140 | * @wake_depth: enable depth, for multiple set_irq_wake() callers | 140 | * @wake_depth: enable depth, for multiple set_irq_wake() callers |
141 | * @irq_count: stats field to detect stalled irqs | 141 | * @irq_count: stats field to detect stalled irqs |
142 | * @irqs_unhandled: stats field for spurious unhandled interrupts | 142 | * @irqs_unhandled: stats field for spurious unhandled interrupts |
143 | * @last_unhandled: aging timer for unhandled count | ||
143 | * @lock: locking for SMP | 144 | * @lock: locking for SMP |
144 | * @affinity: IRQ affinity on SMP | 145 | * @affinity: IRQ affinity on SMP |
145 | * @cpu: cpu index useful for balancing | 146 | * @cpu: cpu index useful for balancing |
diff --git a/include/linux/kdebug.h b/include/linux/kdebug.h index 5db38d6d8b92..ed815090b3bc 100644 --- a/include/linux/kdebug.h +++ b/include/linux/kdebug.h | |||
@@ -3,6 +3,8 @@ | |||
3 | 3 | ||
4 | #include <asm/kdebug.h> | 4 | #include <asm/kdebug.h> |
5 | 5 | ||
6 | struct notifier_block; | ||
7 | |||
6 | struct die_args { | 8 | struct die_args { |
7 | struct pt_regs *regs; | 9 | struct pt_regs *regs; |
8 | const char *str; | 10 | const char *str; |
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index aa2fe22b1baa..949706c33622 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
@@ -56,6 +56,9 @@ enum kobject_action { | |||
56 | KOBJ_MAX | 56 | KOBJ_MAX |
57 | }; | 57 | }; |
58 | 58 | ||
59 | /* The list of strings defining the valid kobject actions as specified above */ | ||
60 | extern const char *kobject_actions[]; | ||
61 | |||
59 | struct kobject { | 62 | struct kobject { |
60 | const char * k_name; | 63 | const char * k_name; |
61 | char name[KOBJ_NAME_LEN]; | 64 | char name[KOBJ_NAME_LEN]; |
@@ -108,9 +111,15 @@ struct kobj_type { | |||
108 | struct attribute ** default_attrs; | 111 | struct attribute ** default_attrs; |
109 | }; | 112 | }; |
110 | 113 | ||
114 | struct kset_uevent_ops { | ||
115 | int (*filter)(struct kset *kset, struct kobject *kobj); | ||
116 | const char *(*name)(struct kset *kset, struct kobject *kobj); | ||
117 | int (*uevent)(struct kset *kset, struct kobject *kobj, char **envp, | ||
118 | int num_envp, char *buffer, int buffer_size); | ||
119 | }; | ||
111 | 120 | ||
112 | /** | 121 | /* |
113 | * kset - a set of kobjects of a specific type, belonging | 122 | * struct kset - a set of kobjects of a specific type, belonging |
114 | * to a specific subsystem. | 123 | * to a specific subsystem. |
115 | * | 124 | * |
116 | * All kobjects of a kset should be embedded in an identical | 125 | * All kobjects of a kset should be embedded in an identical |
@@ -126,13 +135,6 @@ struct kobj_type { | |||
126 | * supress the event generation or add subsystem specific | 135 | * supress the event generation or add subsystem specific |
127 | * variables carried with the event. | 136 | * variables carried with the event. |
128 | */ | 137 | */ |
129 | struct kset_uevent_ops { | ||
130 | int (*filter)(struct kset *kset, struct kobject *kobj); | ||
131 | const char *(*name)(struct kset *kset, struct kobject *kobj); | ||
132 | int (*uevent)(struct kset *kset, struct kobject *kobj, char **envp, | ||
133 | int num_envp, char *buffer, int buffer_size); | ||
134 | }; | ||
135 | |||
136 | struct kset { | 138 | struct kset { |
137 | struct kobj_type * ktype; | 139 | struct kobj_type * ktype; |
138 | struct list_head list; | 140 | struct list_head list; |
@@ -173,7 +175,7 @@ static inline struct kobj_type * get_ktype(struct kobject * k) | |||
173 | extern struct kobject * kset_find_obj(struct kset *, const char *); | 175 | extern struct kobject * kset_find_obj(struct kset *, const char *); |
174 | 176 | ||
175 | 177 | ||
176 | /** | 178 | /* |
177 | * Use this when initializing an embedded kset with no other | 179 | * Use this when initializing an embedded kset with no other |
178 | * fields to initialize. | 180 | * fields to initialize. |
179 | */ | 181 | */ |
@@ -198,7 +200,7 @@ extern struct kset kernel_subsys; | |||
198 | /* The global /sys/hypervisor/ subsystem */ | 200 | /* The global /sys/hypervisor/ subsystem */ |
199 | extern struct kset hypervisor_subsys; | 201 | extern struct kset hypervisor_subsys; |
200 | 202 | ||
201 | /** | 203 | /* |
202 | * Helpers for setting the kset of registered objects. | 204 | * Helpers for setting the kset of registered objects. |
203 | * Often, a registered object belongs to a kset embedded in a | 205 | * Often, a registered object belongs to a kset embedded in a |
204 | * subsystem. These do no magic, just make the resulting code | 206 | * subsystem. These do no magic, just make the resulting code |
@@ -233,7 +235,7 @@ extern struct kset hypervisor_subsys; | |||
233 | /** | 235 | /** |
234 | * subsys_set_kset(obj,subsys) - set kset for subsystem | 236 | * subsys_set_kset(obj,subsys) - set kset for subsystem |
235 | * @obj: ptr to some object type. | 237 | * @obj: ptr to some object type. |
236 | * @subsys: a subsystem object (not a ptr). | 238 | * @_subsys: a subsystem object (not a ptr). |
237 | * | 239 | * |
238 | * Can be used for any object type with an embedded ->subsys. | 240 | * Can be used for any object type with an embedded ->subsys. |
239 | * Sets the kset of @obj's kobject to @subsys.kset. This makes | 241 | * Sets the kset of @obj's kobject to @subsys.kset. This makes |
diff --git a/include/linux/lguest.h b/include/linux/lguest.h index 500aace21ca7..157ad64aa7ce 100644 --- a/include/linux/lguest.h +++ b/include/linux/lguest.h | |||
@@ -17,7 +17,6 @@ | |||
17 | #define LHCALL_TS 8 | 17 | #define LHCALL_TS 8 |
18 | #define LHCALL_SET_CLOCKEVENT 9 | 18 | #define LHCALL_SET_CLOCKEVENT 9 |
19 | #define LHCALL_HALT 10 | 19 | #define LHCALL_HALT 10 |
20 | #define LHCALL_GET_WALLCLOCK 11 | ||
21 | #define LHCALL_BIND_DMA 12 | 20 | #define LHCALL_BIND_DMA 12 |
22 | #define LHCALL_SEND_DMA 13 | 21 | #define LHCALL_SEND_DMA 13 |
23 | #define LHCALL_SET_PTE 14 | 22 | #define LHCALL_SET_PTE 14 |
@@ -27,18 +26,38 @@ | |||
27 | #define LG_CLOCK_MIN_DELTA 100UL | 26 | #define LG_CLOCK_MIN_DELTA 100UL |
28 | #define LG_CLOCK_MAX_DELTA ULONG_MAX | 27 | #define LG_CLOCK_MAX_DELTA ULONG_MAX |
29 | 28 | ||
29 | /*G:031 First, how does our Guest contact the Host to ask for privileged | ||
30 | * operations? There are two ways: the direct way is to make a "hypercall", | ||
31 | * to make requests of the Host Itself. | ||
32 | * | ||
33 | * Our hypercall mechanism uses the highest unused trap code (traps 32 and | ||
34 | * above are used by real hardware interrupts). Seventeen hypercalls are | ||
35 | * available: the hypercall number is put in the %eax register, and the | ||
36 | * arguments (when required) are placed in %edx, %ebx and %ecx. If a return | ||
37 | * value makes sense, it's returned in %eax. | ||
38 | * | ||
39 | * Grossly invalid calls result in Sudden Death at the hands of the vengeful | ||
40 | * Host, rather than returning failure. This reflects Winston Churchill's | ||
41 | * definition of a gentleman: "someone who is only rude intentionally". */ | ||
30 | #define LGUEST_TRAP_ENTRY 0x1F | 42 | #define LGUEST_TRAP_ENTRY 0x1F |
31 | 43 | ||
32 | static inline unsigned long | 44 | static inline unsigned long |
33 | hcall(unsigned long call, | 45 | hcall(unsigned long call, |
34 | unsigned long arg1, unsigned long arg2, unsigned long arg3) | 46 | unsigned long arg1, unsigned long arg2, unsigned long arg3) |
35 | { | 47 | { |
48 | /* "int" is the Intel instruction to trigger a trap. */ | ||
36 | asm volatile("int $" __stringify(LGUEST_TRAP_ENTRY) | 49 | asm volatile("int $" __stringify(LGUEST_TRAP_ENTRY) |
50 | /* The call is in %eax (aka "a"), and can be replaced */ | ||
37 | : "=a"(call) | 51 | : "=a"(call) |
52 | /* The other arguments are in %eax, %edx, %ebx & %ecx */ | ||
38 | : "a"(call), "d"(arg1), "b"(arg2), "c"(arg3) | 53 | : "a"(call), "d"(arg1), "b"(arg2), "c"(arg3) |
54 | /* "memory" means this might write somewhere in memory. | ||
55 | * This isn't true for all calls, but it's safe to tell | ||
56 | * gcc that it might happen so it doesn't get clever. */ | ||
39 | : "memory"); | 57 | : "memory"); |
40 | return call; | 58 | return call; |
41 | } | 59 | } |
60 | /*:*/ | ||
42 | 61 | ||
43 | void async_hcall(unsigned long call, | 62 | void async_hcall(unsigned long call, |
44 | unsigned long arg1, unsigned long arg2, unsigned long arg3); | 63 | unsigned long arg1, unsigned long arg2, unsigned long arg3); |
@@ -52,31 +71,43 @@ struct hcall_ring | |||
52 | u32 eax, edx, ebx, ecx; | 71 | u32 eax, edx, ebx, ecx; |
53 | }; | 72 | }; |
54 | 73 | ||
55 | /* All the good stuff happens here: guest registers it with LGUEST_INIT */ | 74 | /*G:032 The second method of communicating with the Host is to via "struct |
75 | * lguest_data". The Guest's very first hypercall is to tell the Host where | ||
76 | * this is, and then the Guest and Host both publish information in it. :*/ | ||
56 | struct lguest_data | 77 | struct lguest_data |
57 | { | 78 | { |
58 | /* Fields which change during running: */ | 79 | /* 512 == enabled (same as eflags in normal hardware). The Guest |
59 | /* 512 == enabled (same as eflags) */ | 80 | * changes interrupts so often that a hypercall is too slow. */ |
60 | unsigned int irq_enabled; | 81 | unsigned int irq_enabled; |
61 | /* Interrupts blocked by guest. */ | 82 | /* Fine-grained interrupt disabling by the Guest */ |
62 | DECLARE_BITMAP(blocked_interrupts, LGUEST_IRQS); | 83 | DECLARE_BITMAP(blocked_interrupts, LGUEST_IRQS); |
63 | 84 | ||
64 | /* Virtual address of page fault. */ | 85 | /* The Host writes the virtual address of the last page fault here, |
86 | * which saves the Guest a hypercall. CR2 is the native register where | ||
87 | * this address would normally be found. */ | ||
65 | unsigned long cr2; | 88 | unsigned long cr2; |
66 | 89 | ||
67 | /* Async hypercall ring. 0xFF == done, 0 == pending. */ | 90 | /* Wallclock time set by the Host. */ |
91 | struct timespec time; | ||
92 | |||
93 | /* Async hypercall ring. Instead of directly making hypercalls, we can | ||
94 | * place them in here for processing the next time the Host wants. | ||
95 | * This batching can be quite efficient. */ | ||
96 | |||
97 | /* 0xFF == done (set by Host), 0 == pending (set by Guest). */ | ||
68 | u8 hcall_status[LHCALL_RING_SIZE]; | 98 | u8 hcall_status[LHCALL_RING_SIZE]; |
99 | /* The actual registers for the hypercalls. */ | ||
69 | struct hcall_ring hcalls[LHCALL_RING_SIZE]; | 100 | struct hcall_ring hcalls[LHCALL_RING_SIZE]; |
70 | 101 | ||
71 | /* Fields initialized by the hypervisor at boot: */ | 102 | /* Fields initialized by the Host at boot: */ |
72 | /* Memory not to try to access */ | 103 | /* Memory not to try to access */ |
73 | unsigned long reserve_mem; | 104 | unsigned long reserve_mem; |
74 | /* ID of this guest (used by network driver to set ethernet address) */ | 105 | /* ID of this Guest (used by network driver to set ethernet address) */ |
75 | u16 guestid; | 106 | u16 guestid; |
76 | /* KHz for the TSC clock. */ | 107 | /* KHz for the TSC clock. */ |
77 | u32 tsc_khz; | 108 | u32 tsc_khz; |
78 | 109 | ||
79 | /* Fields initialized by the guest at boot: */ | 110 | /* Fields initialized by the Guest at boot: */ |
80 | /* Instruction range to suppress interrupts even if enabled */ | 111 | /* Instruction range to suppress interrupts even if enabled */ |
81 | unsigned long noirq_start, noirq_end; | 112 | unsigned long noirq_start, noirq_end; |
82 | }; | 113 | }; |
diff --git a/include/linux/lguest_bus.h b/include/linux/lguest_bus.h index c9b4e05fee49..d27853ddc644 100644 --- a/include/linux/lguest_bus.h +++ b/include/linux/lguest_bus.h | |||
@@ -15,11 +15,14 @@ struct lguest_device { | |||
15 | void *private; | 15 | void *private; |
16 | }; | 16 | }; |
17 | 17 | ||
18 | /* By convention, each device can use irq index+1 if it wants to. */ | 18 | /*D:380 Since interrupt numbers are arbitrary, we use a convention: each device |
19 | * can use the interrupt number corresponding to its index. The +1 is because | ||
20 | * interrupt 0 is not usable (it's actually the timer interrupt). */ | ||
19 | static inline int lgdev_irq(const struct lguest_device *dev) | 21 | static inline int lgdev_irq(const struct lguest_device *dev) |
20 | { | 22 | { |
21 | return dev->index + 1; | 23 | return dev->index + 1; |
22 | } | 24 | } |
25 | /*:*/ | ||
23 | 26 | ||
24 | /* dma args must not be vmalloced! */ | 27 | /* dma args must not be vmalloced! */ |
25 | void lguest_send_dma(unsigned long key, struct lguest_dma *dma); | 28 | void lguest_send_dma(unsigned long key, struct lguest_dma *dma); |
diff --git a/include/linux/lguest_launcher.h b/include/linux/lguest_launcher.h index 0ba414a40c80..641670579446 100644 --- a/include/linux/lguest_launcher.h +++ b/include/linux/lguest_launcher.h | |||
@@ -9,14 +9,45 @@ | |||
9 | /* How many devices? Assume each one wants up to two dma arrays per device. */ | 9 | /* How many devices? Assume each one wants up to two dma arrays per device. */ |
10 | #define LGUEST_MAX_DEVICES (LGUEST_MAX_DMA/2) | 10 | #define LGUEST_MAX_DEVICES (LGUEST_MAX_DMA/2) |
11 | 11 | ||
12 | /*D:200 | ||
13 | * Lguest I/O | ||
14 | * | ||
15 | * The lguest I/O mechanism is the only way Guests can talk to devices. There | ||
16 | * are two hypercalls involved: SEND_DMA for output and BIND_DMA for input. In | ||
17 | * each case, "struct lguest_dma" describes the buffer: this contains 16 | ||
18 | * addr/len pairs, and if there are fewer buffer elements the len array is | ||
19 | * terminated with a 0. | ||
20 | * | ||
21 | * I/O is organized by keys: BIND_DMA attaches buffers to a particular key, and | ||
22 | * SEND_DMA transfers to buffers bound to particular key. By convention, keys | ||
23 | * correspond to a physical address within the device's page. This means that | ||
24 | * devices will never accidentally end up with the same keys, and allows the | ||
25 | * Host use The Futex Trick (as we'll see later in our journey). | ||
26 | * | ||
27 | * SEND_DMA simply indicates a key to send to, and the physical address of the | ||
28 | * "struct lguest_dma" to send. The Host will write the number of bytes | ||
29 | * transferred into the "struct lguest_dma"'s used_len member. | ||
30 | * | ||
31 | * BIND_DMA indicates a key to bind to, a pointer to an array of "struct | ||
32 | * lguest_dma"s ready for receiving, the size of that array, and an interrupt | ||
33 | * to trigger when data is received. The Host will only allow transfers into | ||
34 | * buffers with a used_len of zero: it then sets used_len to the number of | ||
35 | * bytes transferred and triggers the interrupt for the Guest to process the | ||
36 | * new input. */ | ||
12 | struct lguest_dma | 37 | struct lguest_dma |
13 | { | 38 | { |
14 | /* 0 if free to be used, filled by hypervisor. */ | 39 | /* 0 if free to be used, filled by the Host. */ |
15 | u32 used_len; | 40 | u32 used_len; |
16 | unsigned long addr[LGUEST_MAX_DMA_SECTIONS]; | 41 | unsigned long addr[LGUEST_MAX_DMA_SECTIONS]; |
17 | u16 len[LGUEST_MAX_DMA_SECTIONS]; | 42 | u16 len[LGUEST_MAX_DMA_SECTIONS]; |
18 | }; | 43 | }; |
44 | /*:*/ | ||
19 | 45 | ||
46 | /*D:460 This is the layout of a block device memory page. The Launcher sets up | ||
47 | * the num_sectors initially to tell the Guest the size of the disk. The Guest | ||
48 | * puts the type, sector and length of the request in the first three fields, | ||
49 | * then DMAs to the Host. The Host processes the request, sets up the result, | ||
50 | * then DMAs back to the Guest. */ | ||
20 | struct lguest_block_page | 51 | struct lguest_block_page |
21 | { | 52 | { |
22 | /* 0 is a read, 1 is a write. */ | 53 | /* 0 is a read, 1 is a write. */ |
@@ -28,27 +59,47 @@ struct lguest_block_page | |||
28 | u32 num_sectors; /* Disk length = num_sectors * 512 */ | 59 | u32 num_sectors; /* Disk length = num_sectors * 512 */ |
29 | }; | 60 | }; |
30 | 61 | ||
31 | /* There is a shared page of these. */ | 62 | /*D:520 The network device is basically a memory page where all the Guests on |
63 | * the network publish their MAC (ethernet) addresses: it's an array of "struct | ||
64 | * lguest_net": */ | ||
32 | struct lguest_net | 65 | struct lguest_net |
33 | { | 66 | { |
34 | /* Simply the mac address (with multicast bit meaning promisc). */ | 67 | /* Simply the mac address (with multicast bit meaning promisc). */ |
35 | unsigned char mac[6]; | 68 | unsigned char mac[6]; |
36 | }; | 69 | }; |
70 | /*:*/ | ||
37 | 71 | ||
38 | /* Where the Host expects the Guest to SEND_DMA console output to. */ | 72 | /* Where the Host expects the Guest to SEND_DMA console output to. */ |
39 | #define LGUEST_CONSOLE_DMA_KEY 0 | 73 | #define LGUEST_CONSOLE_DMA_KEY 0 |
40 | 74 | ||
41 | /* We have a page of these descriptors in the lguest_device page. */ | 75 | /*D:010 |
76 | * Drivers | ||
77 | * | ||
78 | * The Guest needs devices to do anything useful. Since we don't let it touch | ||
79 | * real devices (think of the damage it could do!) we provide virtual devices. | ||
80 | * We could emulate a PCI bus with various devices on it, but that is a fairly | ||
81 | * complex burden for the Host and suboptimal for the Guest, so we have our own | ||
82 | * "lguest" bus and simple drivers. | ||
83 | * | ||
84 | * Devices are described by an array of LGUEST_MAX_DEVICES of these structs, | ||
85 | * placed by the Launcher just above the top of physical memory: | ||
86 | */ | ||
42 | struct lguest_device_desc { | 87 | struct lguest_device_desc { |
88 | /* The device type: console, network, disk etc. */ | ||
43 | u16 type; | 89 | u16 type; |
44 | #define LGUEST_DEVICE_T_CONSOLE 1 | 90 | #define LGUEST_DEVICE_T_CONSOLE 1 |
45 | #define LGUEST_DEVICE_T_NET 2 | 91 | #define LGUEST_DEVICE_T_NET 2 |
46 | #define LGUEST_DEVICE_T_BLOCK 3 | 92 | #define LGUEST_DEVICE_T_BLOCK 3 |
47 | 93 | ||
94 | /* The specific features of this device: these depends on device type | ||
95 | * except for LGUEST_DEVICE_F_RANDOMNESS. */ | ||
48 | u16 features; | 96 | u16 features; |
49 | #define LGUEST_NET_F_NOCSUM 0x4000 /* Don't bother checksumming */ | 97 | #define LGUEST_NET_F_NOCSUM 0x4000 /* Don't bother checksumming */ |
50 | #define LGUEST_DEVICE_F_RANDOMNESS 0x8000 /* IRQ is fairly random */ | 98 | #define LGUEST_DEVICE_F_RANDOMNESS 0x8000 /* IRQ is fairly random */ |
51 | 99 | ||
100 | /* This is how the Guest reports status of the device: the Host can set | ||
101 | * LGUEST_DEVICE_S_REMOVED to indicate removal, but the rest are only | ||
102 | * ever manipulated by the Guest, and only ever set. */ | ||
52 | u16 status; | 103 | u16 status; |
53 | /* 256 and above are device specific. */ | 104 | /* 256 and above are device specific. */ |
54 | #define LGUEST_DEVICE_S_ACKNOWLEDGE 1 /* We have seen device. */ | 105 | #define LGUEST_DEVICE_S_ACKNOWLEDGE 1 /* We have seen device. */ |
@@ -58,9 +109,12 @@ struct lguest_device_desc { | |||
58 | #define LGUEST_DEVICE_S_REMOVED_ACK 16 /* Driver has been told. */ | 109 | #define LGUEST_DEVICE_S_REMOVED_ACK 16 /* Driver has been told. */ |
59 | #define LGUEST_DEVICE_S_FAILED 128 /* Something actually failed */ | 110 | #define LGUEST_DEVICE_S_FAILED 128 /* Something actually failed */ |
60 | 111 | ||
112 | /* Each device exists somewhere in Guest physical memory, over some | ||
113 | * number of pages. */ | ||
61 | u16 num_pages; | 114 | u16 num_pages; |
62 | u32 pfn; | 115 | u32 pfn; |
63 | }; | 116 | }; |
117 | /*:*/ | ||
64 | 118 | ||
65 | /* Write command first word is a request. */ | 119 | /* Write command first word is a request. */ |
66 | enum lguest_req | 120 | enum lguest_req |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 9aa6c10f7bb1..41978a557318 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -216,6 +216,8 @@ enum { | |||
216 | ATA_HOST_SIMPLEX = (1 << 0), /* Host is simplex, one DMA channel per host only */ | 216 | ATA_HOST_SIMPLEX = (1 << 0), /* Host is simplex, one DMA channel per host only */ |
217 | ATA_HOST_STARTED = (1 << 1), /* Host started */ | 217 | ATA_HOST_STARTED = (1 << 1), /* Host started */ |
218 | 218 | ||
219 | /* bits 24:31 of host->flags are reserved for LLD specific flags */ | ||
220 | |||
219 | /* various lengths of time */ | 221 | /* various lengths of time */ |
220 | ATA_TMOUT_BOOT = 30 * HZ, /* heuristic */ | 222 | ATA_TMOUT_BOOT = 30 * HZ, /* heuristic */ |
221 | ATA_TMOUT_BOOT_QUICK = 7 * HZ, /* heuristic */ | 223 | ATA_TMOUT_BOOT_QUICK = 7 * HZ, /* heuristic */ |
diff --git a/include/linux/loop.h b/include/linux/loop.h index 0b99b31f017b..26a0a103898f 100644 --- a/include/linux/loop.h +++ b/include/linux/loop.h | |||
@@ -63,7 +63,7 @@ struct loop_device { | |||
63 | struct task_struct *lo_thread; | 63 | struct task_struct *lo_thread; |
64 | wait_queue_head_t lo_event; | 64 | wait_queue_head_t lo_event; |
65 | 65 | ||
66 | request_queue_t *lo_queue; | 66 | struct request_queue *lo_queue; |
67 | struct gendisk *lo_disk; | 67 | struct gendisk *lo_disk; |
68 | struct list_head lo_list; | 68 | struct list_head lo_list; |
69 | }; | 69 | }; |
diff --git a/include/linux/mm.h b/include/linux/mm.h index c456c3a1c28e..655094dc9440 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -10,7 +10,6 @@ | |||
10 | #include <linux/mmzone.h> | 10 | #include <linux/mmzone.h> |
11 | #include <linux/rbtree.h> | 11 | #include <linux/rbtree.h> |
12 | #include <linux/prio_tree.h> | 12 | #include <linux/prio_tree.h> |
13 | #include <linux/fs.h> | ||
14 | #include <linux/mutex.h> | 13 | #include <linux/mutex.h> |
15 | #include <linux/debug_locks.h> | 14 | #include <linux/debug_locks.h> |
16 | #include <linux/backing-dev.h> | 15 | #include <linux/backing-dev.h> |
@@ -18,7 +17,9 @@ | |||
18 | 17 | ||
19 | struct mempolicy; | 18 | struct mempolicy; |
20 | struct anon_vma; | 19 | struct anon_vma; |
20 | struct file_ra_state; | ||
21 | struct user_struct; | 21 | struct user_struct; |
22 | struct writeback_control; | ||
22 | 23 | ||
23 | #ifndef CONFIG_DISCONTIGMEM /* Don't use mapnrs, do it properly */ | 24 | #ifndef CONFIG_DISCONTIGMEM /* Don't use mapnrs, do it properly */ |
24 | extern unsigned long max_mapnr; | 25 | extern unsigned long max_mapnr; |
@@ -861,38 +862,7 @@ struct shrinker { | |||
861 | extern void register_shrinker(struct shrinker *); | 862 | extern void register_shrinker(struct shrinker *); |
862 | extern void unregister_shrinker(struct shrinker *); | 863 | extern void unregister_shrinker(struct shrinker *); |
863 | 864 | ||
864 | /* | 865 | int vma_wants_writenotify(struct vm_area_struct *vma); |
865 | * Some shared mappigns will want the pages marked read-only | ||
866 | * to track write events. If so, we'll downgrade vm_page_prot | ||
867 | * to the private version (using protection_map[] without the | ||
868 | * VM_SHARED bit). | ||
869 | */ | ||
870 | static inline int vma_wants_writenotify(struct vm_area_struct *vma) | ||
871 | { | ||
872 | unsigned int vm_flags = vma->vm_flags; | ||
873 | |||
874 | /* If it was private or non-writable, the write bit is already clear */ | ||
875 | if ((vm_flags & (VM_WRITE|VM_SHARED)) != ((VM_WRITE|VM_SHARED))) | ||
876 | return 0; | ||
877 | |||
878 | /* The backer wishes to know when pages are first written to? */ | ||
879 | if (vma->vm_ops && vma->vm_ops->page_mkwrite) | ||
880 | return 1; | ||
881 | |||
882 | /* The open routine did something to the protections already? */ | ||
883 | if (pgprot_val(vma->vm_page_prot) != | ||
884 | pgprot_val(protection_map[vm_flags & | ||
885 | (VM_READ|VM_WRITE|VM_EXEC|VM_SHARED)])) | ||
886 | return 0; | ||
887 | |||
888 | /* Specialty mapping? */ | ||
889 | if (vm_flags & (VM_PFNMAP|VM_INSERTPAGE)) | ||
890 | return 0; | ||
891 | |||
892 | /* Can the mapping track the dirty pages? */ | ||
893 | return vma->vm_file && vma->vm_file->f_mapping && | ||
894 | mapping_cap_account_dirty(vma->vm_file->f_mapping); | ||
895 | } | ||
896 | 866 | ||
897 | extern pte_t *FASTCALL(get_locked_pte(struct mm_struct *mm, unsigned long addr, spinlock_t **ptl)); | 867 | extern pte_t *FASTCALL(get_locked_pte(struct mm_struct *mm, unsigned long addr, spinlock_t **ptl)); |
898 | 868 | ||
@@ -1246,7 +1216,7 @@ void drop_slab(void); | |||
1246 | extern int randomize_va_space; | 1216 | extern int randomize_va_space; |
1247 | #endif | 1217 | #endif |
1248 | 1218 | ||
1249 | __attribute__((weak)) const char *arch_vma_name(struct vm_area_struct *vma); | 1219 | const char * arch_vma_name(struct vm_area_struct *vma); |
1250 | 1220 | ||
1251 | #endif /* __KERNEL__ */ | 1221 | #endif /* __KERNEL__ */ |
1252 | #endif /* _LINUX_MM_H */ | 1222 | #endif /* _LINUX_MM_H */ |
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h index 04bbe12fae8d..63a80ea61124 100644 --- a/include/linux/mmc/core.h +++ b/include/linux/mmc/core.h | |||
@@ -99,7 +99,7 @@ struct mmc_request { | |||
99 | struct mmc_host; | 99 | struct mmc_host; |
100 | struct mmc_card; | 100 | struct mmc_card; |
101 | 101 | ||
102 | extern int mmc_wait_for_req(struct mmc_host *, struct mmc_request *); | 102 | extern void mmc_wait_for_req(struct mmc_host *, struct mmc_request *); |
103 | extern int mmc_wait_for_cmd(struct mmc_host *, struct mmc_command *, int); | 103 | extern int mmc_wait_for_cmd(struct mmc_host *, struct mmc_command *, int); |
104 | extern int mmc_wait_for_app_cmd(struct mmc_host *, struct mmc_card *, | 104 | extern int mmc_wait_for_app_cmd(struct mmc_host *, struct mmc_card *, |
105 | struct mmc_command *, int); | 105 | struct mmc_command *, int); |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index da8eb8ad9e9b..3ea68cd3b61f 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -120,7 +120,6 @@ enum zone_type { | |||
120 | * --------------------------- | 120 | * --------------------------- |
121 | * parisc, ia64, sparc <4G | 121 | * parisc, ia64, sparc <4G |
122 | * s390 <2G | 122 | * s390 <2G |
123 | * arm26 <48M | ||
124 | * arm Various | 123 | * arm Various |
125 | * alpha Unlimited or 0-16MB. | 124 | * alpha Unlimited or 0-16MB. |
126 | * | 125 | * |
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index af04a555b52c..2ada8ee316b3 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
@@ -159,6 +159,12 @@ struct ap_device_id { | |||
159 | 159 | ||
160 | #define AP_DEVICE_ID_MATCH_DEVICE_TYPE 0x01 | 160 | #define AP_DEVICE_ID_MATCH_DEVICE_TYPE 0x01 |
161 | 161 | ||
162 | #define ACPI_ID_LEN 9 | ||
163 | |||
164 | struct acpi_device_id { | ||
165 | __u8 id[ACPI_ID_LEN]; | ||
166 | kernel_ulong_t driver_data; | ||
167 | }; | ||
162 | 168 | ||
163 | #define PNP_ID_LEN 8 | 169 | #define PNP_ID_LEN 8 |
164 | #define PNP_MAX_DEVICES 8 | 170 | #define PNP_MAX_DEVICES 8 |
diff --git a/include/linux/netfilter/xt_connlimit.h b/include/linux/netfilter/xt_connlimit.h index 90ae8b474cb8..37e933c9987d 100644 --- a/include/linux/netfilter/xt_connlimit.h +++ b/include/linux/netfilter/xt_connlimit.h | |||
@@ -5,8 +5,8 @@ struct xt_connlimit_data; | |||
5 | 5 | ||
6 | struct xt_connlimit_info { | 6 | struct xt_connlimit_info { |
7 | union { | 7 | union { |
8 | u_int32_t v4_mask; | 8 | __be32 v4_mask; |
9 | u_int32_t v6_mask[4]; | 9 | __be32 v6_mask[4]; |
10 | }; | 10 | }; |
11 | unsigned int limit, inverse; | 11 | unsigned int limit, inverse; |
12 | 12 | ||
diff --git a/include/linux/notifier.h b/include/linux/notifier.h index be3f2bb6fcf3..fad7ff17e468 100644 --- a/include/linux/notifier.h +++ b/include/linux/notifier.h | |||
@@ -157,6 +157,19 @@ extern int __srcu_notifier_call_chain(struct srcu_notifier_head *nh, | |||
157 | */ | 157 | */ |
158 | #define NOTIFY_STOP (NOTIFY_OK|NOTIFY_STOP_MASK) | 158 | #define NOTIFY_STOP (NOTIFY_OK|NOTIFY_STOP_MASK) |
159 | 159 | ||
160 | /* Encapsulate (negative) errno value (in particular, NOTIFY_BAD <=> EPERM). */ | ||
161 | static inline int notifier_from_errno(int err) | ||
162 | { | ||
163 | return NOTIFY_STOP_MASK | (NOTIFY_OK - err); | ||
164 | } | ||
165 | |||
166 | /* Restore (negative) errno value from notify return value. */ | ||
167 | static inline int notifier_to_errno(int ret) | ||
168 | { | ||
169 | ret &= ~NOTIFY_STOP_MASK; | ||
170 | return ret > NOTIFY_OK ? NOTIFY_OK - ret : 0; | ||
171 | } | ||
172 | |||
160 | /* | 173 | /* |
161 | * Declared notifiers so far. I can imagine quite a few more chains | 174 | * Declared notifiers so far. I can imagine quite a few more chains |
162 | * over time (eg laptop power reset chains, reboot chain (to clean | 175 | * over time (eg laptop power reset chains, reboot chain (to clean |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 5e84f2e8d54c..d8f8a3a96644 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -534,6 +534,7 @@ static inline int pci_write_config_dword(struct pci_dev *dev, int where, u32 val | |||
534 | 534 | ||
535 | int __must_check pci_enable_device(struct pci_dev *dev); | 535 | int __must_check pci_enable_device(struct pci_dev *dev); |
536 | int __must_check pci_enable_device_bars(struct pci_dev *dev, int mask); | 536 | int __must_check pci_enable_device_bars(struct pci_dev *dev, int mask); |
537 | int __must_check __pci_reenable_device(struct pci_dev *); | ||
537 | int __must_check pcim_enable_device(struct pci_dev *pdev); | 538 | int __must_check pcim_enable_device(struct pci_dev *pdev); |
538 | void pcim_pin_device(struct pci_dev *pdev); | 539 | void pcim_pin_device(struct pci_dev *pdev); |
539 | 540 | ||
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index cbabb9c675c9..07fc57429b58 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -611,7 +611,6 @@ | |||
611 | #define PCI_DEVICE_ID_NEC_CBUS_3 0x003b | 611 | #define PCI_DEVICE_ID_NEC_CBUS_3 0x003b |
612 | #define PCI_DEVICE_ID_NEC_NAPCCARD 0x003e | 612 | #define PCI_DEVICE_ID_NEC_NAPCCARD 0x003e |
613 | #define PCI_DEVICE_ID_NEC_PCX2 0x0046 /* PowerVR */ | 613 | #define PCI_DEVICE_ID_NEC_PCX2 0x0046 /* PowerVR */ |
614 | #define PCI_DEVICE_ID_NEC_NILE4 0x005a | ||
615 | #define PCI_DEVICE_ID_NEC_VRC5476 0x009b | 614 | #define PCI_DEVICE_ID_NEC_VRC5476 0x009b |
616 | #define PCI_DEVICE_ID_NEC_VRC4173 0x00a5 | 615 | #define PCI_DEVICE_ID_NEC_VRC4173 0x00a5 |
617 | #define PCI_DEVICE_ID_NEC_VRC5477_AC97 0x00a6 | 616 | #define PCI_DEVICE_ID_NEC_VRC5477_AC97 0x00a6 |
@@ -1225,6 +1224,10 @@ | |||
1225 | #define PCI_DEVICE_ID_NVIDIA_NVENET_25 0x054D | 1224 | #define PCI_DEVICE_ID_NVIDIA_NVENET_25 0x054D |
1226 | #define PCI_DEVICE_ID_NVIDIA_NVENET_26 0x054E | 1225 | #define PCI_DEVICE_ID_NVIDIA_NVENET_26 0x054E |
1227 | #define PCI_DEVICE_ID_NVIDIA_NVENET_27 0x054F | 1226 | #define PCI_DEVICE_ID_NVIDIA_NVENET_27 0x054F |
1227 | #define PCI_DEVICE_ID_NVIDIA_NVENET_28 0x07DC | ||
1228 | #define PCI_DEVICE_ID_NVIDIA_NVENET_29 0x07DD | ||
1229 | #define PCI_DEVICE_ID_NVIDIA_NVENET_30 0x07DE | ||
1230 | #define PCI_DEVICE_ID_NVIDIA_NVENET_31 0x07DF | ||
1228 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_IDE 0x0560 | 1231 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_IDE 0x0560 |
1229 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_IDE 0x056C | 1232 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_IDE 0x056C |
1230 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP77_IDE 0x0759 | 1233 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP77_IDE 0x0759 |
@@ -1972,6 +1975,8 @@ | |||
1972 | #define PCI_VENDOR_ID_ENE 0x1524 | 1975 | #define PCI_VENDOR_ID_ENE 0x1524 |
1973 | #define PCI_DEVICE_ID_ENE_CB712_SD 0x0550 | 1976 | #define PCI_DEVICE_ID_ENE_CB712_SD 0x0550 |
1974 | #define PCI_DEVICE_ID_ENE_CB712_SD_2 0x0551 | 1977 | #define PCI_DEVICE_ID_ENE_CB712_SD_2 0x0551 |
1978 | #define PCI_DEVICE_ID_ENE_CB714_SD 0x0750 | ||
1979 | #define PCI_DEVICE_ID_ENE_CB714_SD_2 0x0751 | ||
1975 | #define PCI_DEVICE_ID_ENE_1211 0x1211 | 1980 | #define PCI_DEVICE_ID_ENE_1211 0x1211 |
1976 | #define PCI_DEVICE_ID_ENE_1225 0x1225 | 1981 | #define PCI_DEVICE_ID_ENE_1225 0x1225 |
1977 | #define PCI_DEVICE_ID_ENE_1410 0x1410 | 1982 | #define PCI_DEVICE_ID_ENE_1410 0x1410 |
@@ -2075,6 +2080,23 @@ | |||
2075 | #define PCI_VENDOR_ID_TDI 0x192E | 2080 | #define PCI_VENDOR_ID_TDI 0x192E |
2076 | #define PCI_DEVICE_ID_TDI_EHCI 0x0101 | 2081 | #define PCI_DEVICE_ID_TDI_EHCI 0x0101 |
2077 | 2082 | ||
2083 | #define PCI_VENDOR_ID_FREESCALE 0x1957 | ||
2084 | #define PCI_DEVICE_ID_MPC8548E 0x0012 | ||
2085 | #define PCI_DEVICE_ID_MPC8548 0x0013 | ||
2086 | #define PCI_DEVICE_ID_MPC8543E 0x0014 | ||
2087 | #define PCI_DEVICE_ID_MPC8543 0x0015 | ||
2088 | #define PCI_DEVICE_ID_MPC8547E 0x0018 | ||
2089 | #define PCI_DEVICE_ID_MPC8545E 0x0019 | ||
2090 | #define PCI_DEVICE_ID_MPC8545 0x001a | ||
2091 | #define PCI_DEVICE_ID_MPC8568E 0x0020 | ||
2092 | #define PCI_DEVICE_ID_MPC8568 0x0021 | ||
2093 | #define PCI_DEVICE_ID_MPC8567E 0x0022 | ||
2094 | #define PCI_DEVICE_ID_MPC8567 0x0023 | ||
2095 | #define PCI_DEVICE_ID_MPC8544E 0x0030 | ||
2096 | #define PCI_DEVICE_ID_MPC8544 0x0031 | ||
2097 | #define PCI_DEVICE_ID_MPC8641 0x7010 | ||
2098 | #define PCI_DEVICE_ID_MPC8641D 0x7011 | ||
2099 | |||
2078 | #define PCI_VENDOR_ID_PASEMI 0x1959 | 2100 | #define PCI_VENDOR_ID_PASEMI 0x1959 |
2079 | 2101 | ||
2080 | #define PCI_VENDOR_ID_ATTANSIC 0x1969 | 2102 | #define PCI_VENDOR_ID_ATTANSIC 0x1969 |
diff --git a/include/linux/pm.h b/include/linux/pm.h index ad3cc2eb0d34..48b71badfb4c 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -25,6 +25,7 @@ | |||
25 | 25 | ||
26 | #include <linux/list.h> | 26 | #include <linux/list.h> |
27 | #include <asm/atomic.h> | 27 | #include <asm/atomic.h> |
28 | #include <asm/errno.h> | ||
28 | 29 | ||
29 | /* | 30 | /* |
30 | * Power management requests... these are passed to pm_send_all() and friends. | 31 | * Power management requests... these are passed to pm_send_all() and friends. |
@@ -165,6 +166,7 @@ struct pm_ops { | |||
165 | int (*finish)(suspend_state_t state); | 166 | int (*finish)(suspend_state_t state); |
166 | }; | 167 | }; |
167 | 168 | ||
169 | #ifdef CONFIG_SUSPEND | ||
168 | extern struct pm_ops *pm_ops; | 170 | extern struct pm_ops *pm_ops; |
169 | 171 | ||
170 | /** | 172 | /** |
@@ -193,6 +195,12 @@ extern void arch_suspend_disable_irqs(void); | |||
193 | extern void arch_suspend_enable_irqs(void); | 195 | extern void arch_suspend_enable_irqs(void); |
194 | 196 | ||
195 | extern int pm_suspend(suspend_state_t state); | 197 | extern int pm_suspend(suspend_state_t state); |
198 | #else /* !CONFIG_SUSPEND */ | ||
199 | #define suspend_valid_only_mem NULL | ||
200 | |||
201 | static inline void pm_set_ops(struct pm_ops *pm_ops) {} | ||
202 | static inline int pm_suspend(suspend_state_t state) { return -ENOSYS; } | ||
203 | #endif /* !CONFIG_SUSPEND */ | ||
196 | 204 | ||
197 | /* | 205 | /* |
198 | * Device power management | 206 | * Device power management |
@@ -266,7 +274,7 @@ typedef struct pm_message { | |||
266 | struct dev_pm_info { | 274 | struct dev_pm_info { |
267 | pm_message_t power_state; | 275 | pm_message_t power_state; |
268 | unsigned can_wakeup:1; | 276 | unsigned can_wakeup:1; |
269 | #ifdef CONFIG_PM | 277 | #ifdef CONFIG_PM_SLEEP |
270 | unsigned should_wakeup:1; | 278 | unsigned should_wakeup:1; |
271 | struct list_head entry; | 279 | struct list_head entry; |
272 | #endif | 280 | #endif |
@@ -276,7 +284,7 @@ extern int device_power_down(pm_message_t state); | |||
276 | extern void device_power_up(void); | 284 | extern void device_power_up(void); |
277 | extern void device_resume(void); | 285 | extern void device_resume(void); |
278 | 286 | ||
279 | #ifdef CONFIG_PM | 287 | #ifdef CONFIG_PM_SLEEP |
280 | extern int device_suspend(pm_message_t state); | 288 | extern int device_suspend(pm_message_t state); |
281 | extern int device_prepare_suspend(pm_message_t state); | 289 | extern int device_prepare_suspend(pm_message_t state); |
282 | 290 | ||
@@ -306,7 +314,7 @@ static inline int call_platform_enable_wakeup(struct device *dev, int is_on) | |||
306 | return 0; | 314 | return 0; |
307 | } | 315 | } |
308 | 316 | ||
309 | #else /* !CONFIG_PM */ | 317 | #else /* !CONFIG_PM_SLEEP */ |
310 | 318 | ||
311 | static inline int device_suspend(pm_message_t state) | 319 | static inline int device_suspend(pm_message_t state) |
312 | { | 320 | { |
@@ -323,7 +331,7 @@ static inline int call_platform_enable_wakeup(struct device *dev, int is_on) | |||
323 | return 0; | 331 | return 0; |
324 | } | 332 | } |
325 | 333 | ||
326 | #endif | 334 | #endif /* !CONFIG_PM_SLEEP */ |
327 | 335 | ||
328 | /* changes to device_may_wakeup take effect on the next pm state change. | 336 | /* changes to device_may_wakeup take effect on the next pm state change. |
329 | * by default, devices should wakeup if they can. | 337 | * by default, devices should wakeup if they can. |
diff --git a/include/linux/pnp.h b/include/linux/pnp.h index 2a1897e6f937..16b46aace349 100644 --- a/include/linux/pnp.h +++ b/include/linux/pnp.h | |||
@@ -1,7 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Linux Plug and Play Support | 2 | * Linux Plug and Play Support |
3 | * Copyright by Adam Belay <ambx1@neo.rr.com> | 3 | * Copyright by Adam Belay <ambx1@neo.rr.com> |
4 | * | ||
5 | */ | 4 | */ |
6 | 5 | ||
7 | #ifndef _LINUX_PNP_H | 6 | #ifndef _LINUX_PNP_H |
@@ -23,7 +22,6 @@ | |||
23 | struct pnp_protocol; | 22 | struct pnp_protocol; |
24 | struct pnp_dev; | 23 | struct pnp_dev; |
25 | 24 | ||
26 | |||
27 | /* | 25 | /* |
28 | * Resource Management | 26 | * Resource Management |
29 | */ | 27 | */ |
@@ -73,37 +71,37 @@ struct pnp_dev; | |||
73 | #define PNP_PORT_FLAG_FIXED (1<<1) | 71 | #define PNP_PORT_FLAG_FIXED (1<<1) |
74 | 72 | ||
75 | struct pnp_port { | 73 | struct pnp_port { |
76 | unsigned short min; /* min base number */ | 74 | unsigned short min; /* min base number */ |
77 | unsigned short max; /* max base number */ | 75 | unsigned short max; /* max base number */ |
78 | unsigned char align; /* align boundary */ | 76 | unsigned char align; /* align boundary */ |
79 | unsigned char size; /* size of range */ | 77 | unsigned char size; /* size of range */ |
80 | unsigned char flags; /* port flags */ | 78 | unsigned char flags; /* port flags */ |
81 | unsigned char pad; /* pad */ | 79 | unsigned char pad; /* pad */ |
82 | struct pnp_port *next; /* next port */ | 80 | struct pnp_port *next; /* next port */ |
83 | }; | 81 | }; |
84 | 82 | ||
85 | #define PNP_IRQ_NR 256 | 83 | #define PNP_IRQ_NR 256 |
86 | struct pnp_irq { | 84 | struct pnp_irq { |
87 | DECLARE_BITMAP(map, PNP_IRQ_NR); /* bitmaks for IRQ lines */ | 85 | DECLARE_BITMAP(map, PNP_IRQ_NR); /* bitmask for IRQ lines */ |
88 | unsigned char flags; /* IRQ flags */ | 86 | unsigned char flags; /* IRQ flags */ |
89 | unsigned char pad; /* pad */ | 87 | unsigned char pad; /* pad */ |
90 | struct pnp_irq *next; /* next IRQ */ | 88 | struct pnp_irq *next; /* next IRQ */ |
91 | }; | 89 | }; |
92 | 90 | ||
93 | struct pnp_dma { | 91 | struct pnp_dma { |
94 | unsigned char map; /* bitmask for DMA channels */ | 92 | unsigned char map; /* bitmask for DMA channels */ |
95 | unsigned char flags; /* DMA flags */ | 93 | unsigned char flags; /* DMA flags */ |
96 | struct pnp_dma *next; /* next port */ | 94 | struct pnp_dma *next; /* next port */ |
97 | }; | 95 | }; |
98 | 96 | ||
99 | struct pnp_mem { | 97 | struct pnp_mem { |
100 | unsigned int min; /* min base number */ | 98 | unsigned int min; /* min base number */ |
101 | unsigned int max; /* max base number */ | 99 | unsigned int max; /* max base number */ |
102 | unsigned int align; /* align boundary */ | 100 | unsigned int align; /* align boundary */ |
103 | unsigned int size; /* size of range */ | 101 | unsigned int size; /* size of range */ |
104 | unsigned char flags; /* memory flags */ | 102 | unsigned char flags; /* memory flags */ |
105 | unsigned char pad; /* pad */ | 103 | unsigned char pad; /* pad */ |
106 | struct pnp_mem *next; /* next memory resource */ | 104 | struct pnp_mem *next; /* next memory resource */ |
107 | }; | 105 | }; |
108 | 106 | ||
109 | #define PNP_RES_PRIORITY_PREFERRED 0 | 107 | #define PNP_RES_PRIORITY_PREFERRED 0 |
@@ -127,7 +125,6 @@ struct pnp_resource_table { | |||
127 | struct resource irq_resource[PNP_MAX_IRQ]; | 125 | struct resource irq_resource[PNP_MAX_IRQ]; |
128 | }; | 126 | }; |
129 | 127 | ||
130 | |||
131 | /* | 128 | /* |
132 | * Device Managemnt | 129 | * Device Managemnt |
133 | */ | 130 | */ |
@@ -139,14 +136,14 @@ struct pnp_card { | |||
139 | struct list_head protocol_list; /* node in protocol's list of cards */ | 136 | struct list_head protocol_list; /* node in protocol's list of cards */ |
140 | struct list_head devices; /* devices attached to the card */ | 137 | struct list_head devices; /* devices attached to the card */ |
141 | 138 | ||
142 | struct pnp_protocol * protocol; | 139 | struct pnp_protocol *protocol; |
143 | struct pnp_id * id; /* contains supported EISA IDs*/ | 140 | struct pnp_id *id; /* contains supported EISA IDs */ |
144 | 141 | ||
145 | char name[PNP_NAME_LEN]; /* contains a human-readable name */ | 142 | char name[PNP_NAME_LEN]; /* contains a human-readable name */ |
146 | unsigned char pnpver; /* Plug & Play version */ | 143 | unsigned char pnpver; /* Plug & Play version */ |
147 | unsigned char productver; /* product version */ | 144 | unsigned char productver; /* product version */ |
148 | unsigned int serial; /* serial number */ | 145 | unsigned int serial; /* serial number */ |
149 | unsigned char checksum; /* if zero - checksum passed */ | 146 | unsigned char checksum; /* if zero - checksum passed */ |
150 | struct proc_dir_entry *procdir; /* directory entry in /proc/bus/isapnp */ | 147 | struct proc_dir_entry *procdir; /* directory entry in /proc/bus/isapnp */ |
151 | }; | 148 | }; |
152 | 149 | ||
@@ -159,18 +156,18 @@ struct pnp_card { | |||
159 | (card) = global_to_pnp_card((card)->global_list.next)) | 156 | (card) = global_to_pnp_card((card)->global_list.next)) |
160 | 157 | ||
161 | struct pnp_card_link { | 158 | struct pnp_card_link { |
162 | struct pnp_card * card; | 159 | struct pnp_card *card; |
163 | struct pnp_card_driver * driver; | 160 | struct pnp_card_driver *driver; |
164 | void * driver_data; | 161 | void *driver_data; |
165 | pm_message_t pm_state; | 162 | pm_message_t pm_state; |
166 | }; | 163 | }; |
167 | 164 | ||
168 | static inline void *pnp_get_card_drvdata (struct pnp_card_link *pcard) | 165 | static inline void *pnp_get_card_drvdata(struct pnp_card_link *pcard) |
169 | { | 166 | { |
170 | return pcard->driver_data; | 167 | return pcard->driver_data; |
171 | } | 168 | } |
172 | 169 | ||
173 | static inline void pnp_set_card_drvdata (struct pnp_card_link *pcard, void *data) | 170 | static inline void pnp_set_card_drvdata(struct pnp_card_link *pcard, void *data) |
174 | { | 171 | { |
175 | pcard->driver_data = data; | 172 | pcard->driver_data = data; |
176 | } | 173 | } |
@@ -186,22 +183,22 @@ struct pnp_dev { | |||
186 | struct list_head card_list; /* node in card's list of devices */ | 183 | struct list_head card_list; /* node in card's list of devices */ |
187 | struct list_head rdev_list; /* node in cards list of requested devices */ | 184 | struct list_head rdev_list; /* node in cards list of requested devices */ |
188 | 185 | ||
189 | struct pnp_protocol * protocol; | 186 | struct pnp_protocol *protocol; |
190 | struct pnp_card * card; /* card the device is attached to, none if NULL */ | 187 | struct pnp_card *card; /* card the device is attached to, none if NULL */ |
191 | struct pnp_driver * driver; | 188 | struct pnp_driver *driver; |
192 | struct pnp_card_link * card_link; | 189 | struct pnp_card_link *card_link; |
193 | 190 | ||
194 | struct pnp_id * id; /* supported EISA IDs*/ | 191 | struct pnp_id *id; /* supported EISA IDs */ |
195 | 192 | ||
196 | int active; | 193 | int active; |
197 | int capabilities; | 194 | int capabilities; |
198 | struct pnp_option * independent; | 195 | struct pnp_option *independent; |
199 | struct pnp_option * dependent; | 196 | struct pnp_option *dependent; |
200 | struct pnp_resource_table res; | 197 | struct pnp_resource_table res; |
201 | 198 | ||
202 | char name[PNP_NAME_LEN]; /* contains a human-readable name */ | 199 | char name[PNP_NAME_LEN]; /* contains a human-readable name */ |
203 | unsigned short regs; /* ISAPnP: supported registers */ | 200 | unsigned short regs; /* ISAPnP: supported registers */ |
204 | int flags; /* used by protocols */ | 201 | int flags; /* used by protocols */ |
205 | struct proc_dir_entry *procent; /* device entry in /proc/bus/isapnp */ | 202 | struct proc_dir_entry *procent; /* device entry in /proc/bus/isapnp */ |
206 | void *data; | 203 | void *data; |
207 | }; | 204 | }; |
@@ -220,19 +217,19 @@ struct pnp_dev { | |||
220 | (dev) = card_to_pnp_dev((dev)->card_list.next)) | 217 | (dev) = card_to_pnp_dev((dev)->card_list.next)) |
221 | #define pnp_dev_name(dev) (dev)->name | 218 | #define pnp_dev_name(dev) (dev)->name |
222 | 219 | ||
223 | static inline void *pnp_get_drvdata (struct pnp_dev *pdev) | 220 | static inline void *pnp_get_drvdata(struct pnp_dev *pdev) |
224 | { | 221 | { |
225 | return dev_get_drvdata(&pdev->dev); | 222 | return dev_get_drvdata(&pdev->dev); |
226 | } | 223 | } |
227 | 224 | ||
228 | static inline void pnp_set_drvdata (struct pnp_dev *pdev, void *data) | 225 | static inline void pnp_set_drvdata(struct pnp_dev *pdev, void *data) |
229 | { | 226 | { |
230 | dev_set_drvdata(&pdev->dev, data); | 227 | dev_set_drvdata(&pdev->dev, data); |
231 | } | 228 | } |
232 | 229 | ||
233 | struct pnp_fixup { | 230 | struct pnp_fixup { |
234 | char id[7]; | 231 | char id[7]; |
235 | void (*quirk_function)(struct pnp_dev *dev); /* fixup function */ | 232 | void (*quirk_function) (struct pnp_dev * dev); /* fixup function */ |
236 | }; | 233 | }; |
237 | 234 | ||
238 | /* config parameters */ | 235 | /* config parameters */ |
@@ -269,7 +266,6 @@ extern struct pnp_protocol pnpbios_protocol; | |||
269 | #define pnp_device_is_pnpbios(dev) 0 | 266 | #define pnp_device_is_pnpbios(dev) 0 |
270 | #endif | 267 | #endif |
271 | 268 | ||
272 | |||
273 | /* status */ | 269 | /* status */ |
274 | #define PNP_READY 0x0000 | 270 | #define PNP_READY 0x0000 |
275 | #define PNP_ATTACHED 0x0001 | 271 | #define PNP_ATTACHED 0x0001 |
@@ -287,17 +283,17 @@ extern struct pnp_protocol pnpbios_protocol; | |||
287 | 283 | ||
288 | struct pnp_id { | 284 | struct pnp_id { |
289 | char id[PNP_ID_LEN]; | 285 | char id[PNP_ID_LEN]; |
290 | struct pnp_id * next; | 286 | struct pnp_id *next; |
291 | }; | 287 | }; |
292 | 288 | ||
293 | struct pnp_driver { | 289 | struct pnp_driver { |
294 | char * name; | 290 | char *name; |
295 | const struct pnp_device_id *id_table; | 291 | const struct pnp_device_id *id_table; |
296 | unsigned int flags; | 292 | unsigned int flags; |
297 | int (*probe) (struct pnp_dev *dev, const struct pnp_device_id *dev_id); | 293 | int (*probe) (struct pnp_dev *dev, const struct pnp_device_id *dev_id); |
298 | void (*remove) (struct pnp_dev *dev); | 294 | void (*remove) (struct pnp_dev *dev); |
299 | int (*suspend) (struct pnp_dev *dev, pm_message_t state); | 295 | int (*suspend) (struct pnp_dev *dev, pm_message_t state); |
300 | int (*resume) (struct pnp_dev *dev); | 296 | int (*resume) (struct pnp_dev *dev); |
301 | struct device_driver driver; | 297 | struct device_driver driver; |
302 | }; | 298 | }; |
303 | 299 | ||
@@ -305,13 +301,14 @@ struct pnp_driver { | |||
305 | 301 | ||
306 | struct pnp_card_driver { | 302 | struct pnp_card_driver { |
307 | struct list_head global_list; | 303 | struct list_head global_list; |
308 | char * name; | 304 | char *name; |
309 | const struct pnp_card_device_id *id_table; | 305 | const struct pnp_card_device_id *id_table; |
310 | unsigned int flags; | 306 | unsigned int flags; |
311 | int (*probe) (struct pnp_card_link *card, const struct pnp_card_device_id *card_id); | 307 | int (*probe) (struct pnp_card_link *card, |
308 | const struct pnp_card_device_id *card_id); | ||
312 | void (*remove) (struct pnp_card_link *card); | 309 | void (*remove) (struct pnp_card_link *card); |
313 | int (*suspend) (struct pnp_card_link *card, pm_message_t state); | 310 | int (*suspend) (struct pnp_card_link *card, pm_message_t state); |
314 | int (*resume) (struct pnp_card_link *card); | 311 | int (*resume) (struct pnp_card_link *card); |
315 | struct pnp_driver link; | 312 | struct pnp_driver link; |
316 | }; | 313 | }; |
317 | 314 | ||
@@ -321,25 +318,28 @@ struct pnp_card_driver { | |||
321 | #define PNP_DRIVER_RES_DO_NOT_CHANGE 0x0001 /* do not change the state of the device */ | 318 | #define PNP_DRIVER_RES_DO_NOT_CHANGE 0x0001 /* do not change the state of the device */ |
322 | #define PNP_DRIVER_RES_DISABLE 0x0003 /* ensure the device is disabled */ | 319 | #define PNP_DRIVER_RES_DISABLE 0x0003 /* ensure the device is disabled */ |
323 | 320 | ||
324 | |||
325 | /* | 321 | /* |
326 | * Protocol Management | 322 | * Protocol Management |
327 | */ | 323 | */ |
328 | 324 | ||
329 | struct pnp_protocol { | 325 | struct pnp_protocol { |
330 | struct list_head protocol_list; | 326 | struct list_head protocol_list; |
331 | char * name; | 327 | char *name; |
332 | 328 | ||
333 | /* resource control functions */ | 329 | /* resource control functions */ |
334 | int (*get)(struct pnp_dev *dev, struct pnp_resource_table *res); | 330 | int (*get) (struct pnp_dev *dev, struct pnp_resource_table *res); |
335 | int (*set)(struct pnp_dev *dev, struct pnp_resource_table *res); | 331 | int (*set) (struct pnp_dev *dev, struct pnp_resource_table *res); |
336 | int (*disable)(struct pnp_dev *dev); | 332 | int (*disable) (struct pnp_dev *dev); |
333 | |||
334 | /* protocol specific suspend/resume */ | ||
335 | int (*suspend) (struct pnp_dev * dev, pm_message_t state); | ||
336 | int (*resume) (struct pnp_dev * dev); | ||
337 | 337 | ||
338 | /* used by pnp layer only (look but don't touch) */ | 338 | /* used by pnp layer only (look but don't touch) */ |
339 | unsigned char number; /* protocol number*/ | 339 | unsigned char number; /* protocol number */ |
340 | struct device dev; /* link to driver model */ | 340 | struct device dev; /* link to driver model */ |
341 | struct list_head cards; | 341 | struct list_head cards; |
342 | struct list_head devices; | 342 | struct list_head devices; |
343 | }; | 343 | }; |
344 | 344 | ||
345 | #define to_pnp_protocol(n) list_entry(n, struct pnp_protocol, protocol_list) | 345 | #define to_pnp_protocol(n) list_entry(n, struct pnp_protocol, protocol_list) |
@@ -352,7 +352,6 @@ struct pnp_protocol { | |||
352 | (dev) != protocol_to_pnp_dev(&(protocol)->devices); \ | 352 | (dev) != protocol_to_pnp_dev(&(protocol)->devices); \ |
353 | (dev) = protocol_to_pnp_dev((dev)->protocol_list.next)) | 353 | (dev) = protocol_to_pnp_dev((dev)->protocol_list.next)) |
354 | 354 | ||
355 | |||
356 | extern struct bus_type pnp_bus_type; | 355 | extern struct bus_type pnp_bus_type; |
357 | 356 | ||
358 | #if defined(CONFIG_PNP) | 357 | #if defined(CONFIG_PNP) |
@@ -372,21 +371,25 @@ void pnp_remove_card(struct pnp_card *card); | |||
372 | int pnp_add_card_device(struct pnp_card *card, struct pnp_dev *dev); | 371 | int pnp_add_card_device(struct pnp_card *card, struct pnp_dev *dev); |
373 | void pnp_remove_card_device(struct pnp_dev *dev); | 372 | void pnp_remove_card_device(struct pnp_dev *dev); |
374 | int pnp_add_card_id(struct pnp_id *id, struct pnp_card *card); | 373 | int pnp_add_card_id(struct pnp_id *id, struct pnp_card *card); |
375 | struct pnp_dev * pnp_request_card_device(struct pnp_card_link *clink, const char * id, struct pnp_dev * from); | 374 | struct pnp_dev *pnp_request_card_device(struct pnp_card_link *clink, |
376 | void pnp_release_card_device(struct pnp_dev * dev); | 375 | const char *id, struct pnp_dev *from); |
377 | int pnp_register_card_driver(struct pnp_card_driver * drv); | 376 | void pnp_release_card_device(struct pnp_dev *dev); |
378 | void pnp_unregister_card_driver(struct pnp_card_driver * drv); | 377 | int pnp_register_card_driver(struct pnp_card_driver *drv); |
378 | void pnp_unregister_card_driver(struct pnp_card_driver *drv); | ||
379 | extern struct list_head pnp_cards; | 379 | extern struct list_head pnp_cards; |
380 | 380 | ||
381 | /* resource management */ | 381 | /* resource management */ |
382 | struct pnp_option * pnp_register_independent_option(struct pnp_dev *dev); | 382 | struct pnp_option *pnp_register_independent_option(struct pnp_dev *dev); |
383 | struct pnp_option * pnp_register_dependent_option(struct pnp_dev *dev, int priority); | 383 | struct pnp_option *pnp_register_dependent_option(struct pnp_dev *dev, |
384 | int priority); | ||
384 | int pnp_register_irq_resource(struct pnp_option *option, struct pnp_irq *data); | 385 | int pnp_register_irq_resource(struct pnp_option *option, struct pnp_irq *data); |
385 | int pnp_register_dma_resource(struct pnp_option *option, struct pnp_dma *data); | 386 | int pnp_register_dma_resource(struct pnp_option *option, struct pnp_dma *data); |
386 | int pnp_register_port_resource(struct pnp_option *option, struct pnp_port *data); | 387 | int pnp_register_port_resource(struct pnp_option *option, |
388 | struct pnp_port *data); | ||
387 | int pnp_register_mem_resource(struct pnp_option *option, struct pnp_mem *data); | 389 | int pnp_register_mem_resource(struct pnp_option *option, struct pnp_mem *data); |
388 | void pnp_init_resource_table(struct pnp_resource_table *table); | 390 | void pnp_init_resource_table(struct pnp_resource_table *table); |
389 | int pnp_manual_config_dev(struct pnp_dev *dev, struct pnp_resource_table *res, int mode); | 391 | int pnp_manual_config_dev(struct pnp_dev *dev, struct pnp_resource_table *res, |
392 | int mode); | ||
390 | int pnp_auto_config_dev(struct pnp_dev *dev); | 393 | int pnp_auto_config_dev(struct pnp_dev *dev); |
391 | int pnp_validate_config(struct pnp_dev *dev); | 394 | int pnp_validate_config(struct pnp_dev *dev); |
392 | int pnp_start_dev(struct pnp_dev *dev); | 395 | int pnp_start_dev(struct pnp_dev *dev); |
@@ -394,11 +397,11 @@ int pnp_stop_dev(struct pnp_dev *dev); | |||
394 | int pnp_activate_dev(struct pnp_dev *dev); | 397 | int pnp_activate_dev(struct pnp_dev *dev); |
395 | int pnp_disable_dev(struct pnp_dev *dev); | 398 | int pnp_disable_dev(struct pnp_dev *dev); |
396 | void pnp_resource_change(struct resource *resource, resource_size_t start, | 399 | void pnp_resource_change(struct resource *resource, resource_size_t start, |
397 | resource_size_t size); | 400 | resource_size_t size); |
398 | 401 | ||
399 | /* protocol helpers */ | 402 | /* protocol helpers */ |
400 | int pnp_is_active(struct pnp_dev * dev); | 403 | int pnp_is_active(struct pnp_dev *dev); |
401 | int compare_pnp_id(struct pnp_id * pos, const char * id); | 404 | int compare_pnp_id(struct pnp_id *pos, const char *id); |
402 | int pnp_add_id(struct pnp_id *id, struct pnp_dev *dev); | 405 | int pnp_add_id(struct pnp_id *id, struct pnp_dev *dev); |
403 | int pnp_register_driver(struct pnp_driver *drv); | 406 | int pnp_register_driver(struct pnp_driver *drv); |
404 | void pnp_unregister_driver(struct pnp_driver *drv); | 407 | void pnp_unregister_driver(struct pnp_driver *drv); |
@@ -411,23 +414,24 @@ static inline void pnp_unregister_protocol(struct pnp_protocol *protocol) { } | |||
411 | static inline int pnp_init_device(struct pnp_dev *dev) { return -ENODEV; } | 414 | static inline int pnp_init_device(struct pnp_dev *dev) { return -ENODEV; } |
412 | static inline int pnp_add_device(struct pnp_dev *dev) { return -ENODEV; } | 415 | static inline int pnp_add_device(struct pnp_dev *dev) { return -ENODEV; } |
413 | static inline int pnp_device_attach(struct pnp_dev *pnp_dev) { return -ENODEV; } | 416 | static inline int pnp_device_attach(struct pnp_dev *pnp_dev) { return -ENODEV; } |
414 | static inline void pnp_device_detach(struct pnp_dev *pnp_dev) { ; } | 417 | static inline void pnp_device_detach(struct pnp_dev *pnp_dev) { } |
418 | |||
415 | #define pnp_platform_devices 0 | 419 | #define pnp_platform_devices 0 |
416 | 420 | ||
417 | /* multidevice card support */ | 421 | /* multidevice card support */ |
418 | static inline int pnp_add_card(struct pnp_card *card) { return -ENODEV; } | 422 | static inline int pnp_add_card(struct pnp_card *card) { return -ENODEV; } |
419 | static inline void pnp_remove_card(struct pnp_card *card) { ; } | 423 | static inline void pnp_remove_card(struct pnp_card *card) { } |
420 | static inline int pnp_add_card_device(struct pnp_card *card, struct pnp_dev *dev) { return -ENODEV; } | 424 | static inline int pnp_add_card_device(struct pnp_card *card, struct pnp_dev *dev) { return -ENODEV; } |
421 | static inline void pnp_remove_card_device(struct pnp_dev *dev) { ; } | 425 | static inline void pnp_remove_card_device(struct pnp_dev *dev) { } |
422 | static inline int pnp_add_card_id(struct pnp_id *id, struct pnp_card *card) { return -ENODEV; } | 426 | static inline int pnp_add_card_id(struct pnp_id *id, struct pnp_card *card) { return -ENODEV; } |
423 | static inline struct pnp_dev * pnp_request_card_device(struct pnp_card_link *clink, const char * id, struct pnp_dev * from) { return NULL; } | 427 | static inline struct pnp_dev *pnp_request_card_device(struct pnp_card_link *clink, const char *id, struct pnp_dev *from) { return NULL; } |
424 | static inline void pnp_release_card_device(struct pnp_dev * dev) { ; } | 428 | static inline void pnp_release_card_device(struct pnp_dev *dev) { } |
425 | static inline int pnp_register_card_driver(struct pnp_card_driver * drv) { return -ENODEV; } | 429 | static inline int pnp_register_card_driver(struct pnp_card_driver *drv) { return -ENODEV; } |
426 | static inline void pnp_unregister_card_driver(struct pnp_card_driver * drv) { ; } | 430 | static inline void pnp_unregister_card_driver(struct pnp_card_driver *drv) { } |
427 | 431 | ||
428 | /* resource management */ | 432 | /* resource management */ |
429 | static inline struct pnp_option * pnp_register_independent_option(struct pnp_dev *dev) { return NULL; } | 433 | static inline struct pnp_option *pnp_register_independent_option(struct pnp_dev *dev) { return NULL; } |
430 | static inline struct pnp_option * pnp_register_dependent_option(struct pnp_dev *dev, int priority) { return NULL; } | 434 | static inline struct pnp_option *pnp_register_dependent_option(struct pnp_dev *dev, int priority) { return NULL; } |
431 | static inline int pnp_register_irq_resource(struct pnp_option *option, struct pnp_irq *data) { return -ENODEV; } | 435 | static inline int pnp_register_irq_resource(struct pnp_option *option, struct pnp_irq *data) { return -ENODEV; } |
432 | static inline int pnp_register_dma_resource(struct pnp_option *option, struct pnp_dma *data) { return -ENODEV; } | 436 | static inline int pnp_register_dma_resource(struct pnp_option *option, struct pnp_dma *data) { return -ENODEV; } |
433 | static inline int pnp_register_port_resource(struct pnp_option *option, struct pnp_port *data) { return -ENODEV; } | 437 | static inline int pnp_register_port_resource(struct pnp_option *option, struct pnp_port *data) { return -ENODEV; } |
@@ -440,20 +444,17 @@ static inline int pnp_start_dev(struct pnp_dev *dev) { return -ENODEV; } | |||
440 | static inline int pnp_stop_dev(struct pnp_dev *dev) { return -ENODEV; } | 444 | static inline int pnp_stop_dev(struct pnp_dev *dev) { return -ENODEV; } |
441 | static inline int pnp_activate_dev(struct pnp_dev *dev) { return -ENODEV; } | 445 | static inline int pnp_activate_dev(struct pnp_dev *dev) { return -ENODEV; } |
442 | static inline int pnp_disable_dev(struct pnp_dev *dev) { return -ENODEV; } | 446 | static inline int pnp_disable_dev(struct pnp_dev *dev) { return -ENODEV; } |
443 | static inline void pnp_resource_change(struct resource *resource, | 447 | static inline void pnp_resource_change(struct resource *resource, resource_size_t start, resource_size_t size) { } |
444 | resource_size_t start, | ||
445 | resource_size_t size) { } | ||
446 | 448 | ||
447 | /* protocol helpers */ | 449 | /* protocol helpers */ |
448 | static inline int pnp_is_active(struct pnp_dev * dev) { return 0; } | 450 | static inline int pnp_is_active(struct pnp_dev *dev) { return 0; } |
449 | static inline int compare_pnp_id(struct pnp_id * pos, const char * id) { return -ENODEV; } | 451 | static inline int compare_pnp_id(struct pnp_id *pos, const char *id) { return -ENODEV; } |
450 | static inline int pnp_add_id(struct pnp_id *id, struct pnp_dev *dev) { return -ENODEV; } | 452 | static inline int pnp_add_id(struct pnp_id *id, struct pnp_dev *dev) { return -ENODEV; } |
451 | static inline int pnp_register_driver(struct pnp_driver *drv) { return -ENODEV; } | 453 | static inline int pnp_register_driver(struct pnp_driver *drv) { return -ENODEV; } |
452 | static inline void pnp_unregister_driver(struct pnp_driver *drv) { ; } | 454 | static inline void pnp_unregister_driver(struct pnp_driver *drv) { } |
453 | 455 | ||
454 | #endif /* CONFIG_PNP */ | 456 | #endif /* CONFIG_PNP */ |
455 | 457 | ||
456 | |||
457 | #define pnp_err(format, arg...) printk(KERN_ERR "pnp: " format "\n" , ## arg) | 458 | #define pnp_err(format, arg...) printk(KERN_ERR "pnp: " format "\n" , ## arg) |
458 | #define pnp_info(format, arg...) printk(KERN_INFO "pnp: " format "\n" , ## arg) | 459 | #define pnp_info(format, arg...) printk(KERN_INFO "pnp: " format "\n" , ## arg) |
459 | #define pnp_warn(format, arg...) printk(KERN_WARNING "pnp: " format "\n" , ## arg) | 460 | #define pnp_warn(format, arg...) printk(KERN_WARNING "pnp: " format "\n" , ## arg) |
diff --git a/include/linux/pnpbios.h b/include/linux/pnpbios.h index 0a282ac1f6b2..329192adc9dd 100644 --- a/include/linux/pnpbios.h +++ b/include/linux/pnpbios.h | |||
@@ -99,32 +99,32 @@ | |||
99 | 99 | ||
100 | #pragma pack(1) | 100 | #pragma pack(1) |
101 | struct pnp_dev_node_info { | 101 | struct pnp_dev_node_info { |
102 | __u16 no_nodes; | 102 | __u16 no_nodes; |
103 | __u16 max_node_size; | 103 | __u16 max_node_size; |
104 | }; | 104 | }; |
105 | struct pnp_docking_station_info { | 105 | struct pnp_docking_station_info { |
106 | __u32 location_id; | 106 | __u32 location_id; |
107 | __u32 serial; | 107 | __u32 serial; |
108 | __u16 capabilities; | 108 | __u16 capabilities; |
109 | }; | 109 | }; |
110 | struct pnp_isa_config_struc { | 110 | struct pnp_isa_config_struc { |
111 | __u8 revision; | 111 | __u8 revision; |
112 | __u8 no_csns; | 112 | __u8 no_csns; |
113 | __u16 isa_rd_data_port; | 113 | __u16 isa_rd_data_port; |
114 | __u16 reserved; | 114 | __u16 reserved; |
115 | }; | 115 | }; |
116 | struct escd_info_struc { | 116 | struct escd_info_struc { |
117 | __u16 min_escd_write_size; | 117 | __u16 min_escd_write_size; |
118 | __u16 escd_size; | 118 | __u16 escd_size; |
119 | __u32 nv_storage_base; | 119 | __u32 nv_storage_base; |
120 | }; | 120 | }; |
121 | struct pnp_bios_node { | 121 | struct pnp_bios_node { |
122 | __u16 size; | 122 | __u16 size; |
123 | __u8 handle; | 123 | __u8 handle; |
124 | __u32 eisa_id; | 124 | __u32 eisa_id; |
125 | __u8 type_code[3]; | 125 | __u8 type_code[3]; |
126 | __u16 flags; | 126 | __u16 flags; |
127 | __u8 data[0]; | 127 | __u8 data[0]; |
128 | }; | 128 | }; |
129 | #pragma pack() | 129 | #pragma pack() |
130 | 130 | ||
@@ -133,22 +133,16 @@ struct pnp_bios_node { | |||
133 | /* non-exported */ | 133 | /* non-exported */ |
134 | extern struct pnp_dev_node_info node_info; | 134 | extern struct pnp_dev_node_info node_info; |
135 | 135 | ||
136 | extern int pnp_bios_dev_node_info (struct pnp_dev_node_info *data); | 136 | extern int pnp_bios_dev_node_info(struct pnp_dev_node_info *data); |
137 | extern int pnp_bios_get_dev_node (u8 *nodenum, char config, struct pnp_bios_node *data); | 137 | extern int pnp_bios_get_dev_node(u8 *nodenum, char config, |
138 | extern int pnp_bios_set_dev_node (u8 nodenum, char config, struct pnp_bios_node *data); | 138 | struct pnp_bios_node *data); |
139 | extern int pnp_bios_get_stat_res (char *info); | 139 | extern int pnp_bios_set_dev_node(u8 nodenum, char config, |
140 | extern int pnp_bios_isapnp_config (struct pnp_isa_config_struc *data); | 140 | struct pnp_bios_node *data); |
141 | extern int pnp_bios_escd_info (struct escd_info_struc *data); | 141 | extern int pnp_bios_get_stat_res(char *info); |
142 | extern int pnp_bios_read_escd (char *data, u32 nvram_base); | 142 | extern int pnp_bios_isapnp_config(struct pnp_isa_config_struc *data); |
143 | extern int pnp_bios_escd_info(struct escd_info_struc *data); | ||
144 | extern int pnp_bios_read_escd(char *data, u32 nvram_base); | ||
143 | extern int pnp_bios_dock_station_info(struct pnp_docking_station_info *data); | 145 | extern int pnp_bios_dock_station_info(struct pnp_docking_station_info *data); |
144 | #define needed 0 | ||
145 | #if needed | ||
146 | extern int pnp_bios_get_event (u16 *message); | ||
147 | extern int pnp_bios_send_message (u16 message); | ||
148 | extern int pnp_bios_set_stat_res (char *info); | ||
149 | extern int pnp_bios_apm_id_table (char *table, u16 *size); | ||
150 | extern int pnp_bios_write_escd (char *data, u32 nvram_base); | ||
151 | #endif | ||
152 | 146 | ||
153 | #endif /* CONFIG_PNPBIOS */ | 147 | #endif /* CONFIG_PNPBIOS */ |
154 | 148 | ||
diff --git a/include/linux/preempt.h b/include/linux/preempt.h index d0926d63406c..484988ed301e 100644 --- a/include/linux/preempt.h +++ b/include/linux/preempt.h | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/thread_info.h> | 9 | #include <linux/thread_info.h> |
10 | #include <linux/linkage.h> | 10 | #include <linux/linkage.h> |
11 | #include <linux/list.h> | ||
11 | 12 | ||
12 | #ifdef CONFIG_DEBUG_PREEMPT | 13 | #ifdef CONFIG_DEBUG_PREEMPT |
13 | extern void fastcall add_preempt_count(int val); | 14 | extern void fastcall add_preempt_count(int val); |
@@ -60,4 +61,47 @@ do { \ | |||
60 | 61 | ||
61 | #endif | 62 | #endif |
62 | 63 | ||
64 | #ifdef CONFIG_PREEMPT_NOTIFIERS | ||
65 | |||
66 | struct preempt_notifier; | ||
67 | |||
68 | /** | ||
69 | * preempt_ops - notifiers called when a task is preempted and rescheduled | ||
70 | * @sched_in: we're about to be rescheduled: | ||
71 | * notifier: struct preempt_notifier for the task being scheduled | ||
72 | * cpu: cpu we're scheduled on | ||
73 | * @sched_out: we've just been preempted | ||
74 | * notifier: struct preempt_notifier for the task being preempted | ||
75 | * next: the task that's kicking us out | ||
76 | */ | ||
77 | struct preempt_ops { | ||
78 | void (*sched_in)(struct preempt_notifier *notifier, int cpu); | ||
79 | void (*sched_out)(struct preempt_notifier *notifier, | ||
80 | struct task_struct *next); | ||
81 | }; | ||
82 | |||
83 | /** | ||
84 | * preempt_notifier - key for installing preemption notifiers | ||
85 | * @link: internal use | ||
86 | * @ops: defines the notifier functions to be called | ||
87 | * | ||
88 | * Usually used in conjunction with container_of(). | ||
89 | */ | ||
90 | struct preempt_notifier { | ||
91 | struct hlist_node link; | ||
92 | struct preempt_ops *ops; | ||
93 | }; | ||
94 | |||
95 | void preempt_notifier_register(struct preempt_notifier *notifier); | ||
96 | void preempt_notifier_unregister(struct preempt_notifier *notifier); | ||
97 | |||
98 | static inline void preempt_notifier_init(struct preempt_notifier *notifier, | ||
99 | struct preempt_ops *ops) | ||
100 | { | ||
101 | INIT_HLIST_NODE(¬ifier->link); | ||
102 | notifier->ops = ops; | ||
103 | } | ||
104 | |||
105 | #endif | ||
106 | |||
63 | #endif /* __LINUX_PREEMPT_H */ | 107 | #endif /* __LINUX_PREEMPT_H */ |
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h index 28ac632b42dd..dcb729244f47 100644 --- a/include/linux/raid/md_k.h +++ b/include/linux/raid/md_k.h | |||
@@ -227,7 +227,7 @@ struct mddev_s | |||
227 | unsigned int safemode_delay; | 227 | unsigned int safemode_delay; |
228 | struct timer_list safemode_timer; | 228 | struct timer_list safemode_timer; |
229 | atomic_t writes_pending; | 229 | atomic_t writes_pending; |
230 | request_queue_t *queue; /* for plugging ... */ | 230 | struct request_queue *queue; /* for plugging ... */ |
231 | 231 | ||
232 | atomic_t write_behind; /* outstanding async IO */ | 232 | atomic_t write_behind; /* outstanding async IO */ |
233 | unsigned int max_write_behind; /* 0 = sync */ | 233 | unsigned int max_write_behind; /* 0 = sync */ |
@@ -265,7 +265,7 @@ struct mdk_personality | |||
265 | int level; | 265 | int level; |
266 | struct list_head list; | 266 | struct list_head list; |
267 | struct module *owner; | 267 | struct module *owner; |
268 | int (*make_request)(request_queue_t *q, struct bio *bio); | 268 | int (*make_request)(struct request_queue *q, struct bio *bio); |
269 | int (*run)(mddev_t *mddev); | 269 | int (*run)(mddev_t *mddev); |
270 | int (*stop)(mddev_t *mddev); | 270 | int (*stop)(mddev_t *mddev); |
271 | void (*status)(struct seq_file *seq, mddev_t *mddev); | 271 | void (*status)(struct seq_file *seq, mddev_t *mddev); |
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index 965d5b3ea9eb..180a9d832dde 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
@@ -81,14 +81,16 @@ void reiserfs_warning(struct super_block *s, const char *fmt, ...); | |||
81 | /* assertions handling */ | 81 | /* assertions handling */ |
82 | 82 | ||
83 | /** always check a condition and panic if it's false. */ | 83 | /** always check a condition and panic if it's false. */ |
84 | #define RASSERT( cond, format, args... ) \ | 84 | #define __RASSERT( cond, scond, format, args... ) \ |
85 | if( !( cond ) ) \ | 85 | if( !( cond ) ) \ |
86 | reiserfs_panic( NULL, "reiserfs[%i]: assertion " #cond " failed at " \ | 86 | reiserfs_panic( NULL, "reiserfs[%i]: assertion " scond " failed at " \ |
87 | __FILE__ ":%i:%s: " format "\n", \ | 87 | __FILE__ ":%i:%s: " format "\n", \ |
88 | in_interrupt() ? -1 : current -> pid, __LINE__ , __FUNCTION__ , ##args ) | 88 | in_interrupt() ? -1 : current -> pid, __LINE__ , __FUNCTION__ , ##args ) |
89 | 89 | ||
90 | #define RASSERT(cond, format, args...) __RASSERT(cond, #cond, format, ##args) | ||
91 | |||
90 | #if defined( CONFIG_REISERFS_CHECK ) | 92 | #if defined( CONFIG_REISERFS_CHECK ) |
91 | #define RFALSE( cond, format, args... ) RASSERT( !( cond ), format, ##args ) | 93 | #define RFALSE(cond, format, args...) __RASSERT(!(cond), "!(" #cond ")", format, ##args) |
92 | #else | 94 | #else |
93 | #define RFALSE( cond, format, args... ) do {;} while( 0 ) | 95 | #define RFALSE( cond, format, args... ) do {;} while( 0 ) |
94 | #endif | 96 | #endif |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 33b9b4841ee7..2e490271acf6 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -681,7 +681,7 @@ enum cpu_idle_type { | |||
681 | #define SCHED_LOAD_SHIFT 10 | 681 | #define SCHED_LOAD_SHIFT 10 |
682 | #define SCHED_LOAD_SCALE (1L << SCHED_LOAD_SHIFT) | 682 | #define SCHED_LOAD_SCALE (1L << SCHED_LOAD_SHIFT) |
683 | 683 | ||
684 | #define SCHED_LOAD_SCALE_FUZZ (SCHED_LOAD_SCALE >> 5) | 684 | #define SCHED_LOAD_SCALE_FUZZ (SCHED_LOAD_SCALE >> 1) |
685 | 685 | ||
686 | #ifdef CONFIG_SMP | 686 | #ifdef CONFIG_SMP |
687 | #define SD_LOAD_BALANCE 1 /* Do load balancing on this domain. */ | 687 | #define SD_LOAD_BALANCE 1 /* Do load balancing on this domain. */ |
@@ -786,6 +786,22 @@ extern int partition_sched_domains(cpumask_t *partition1, | |||
786 | 786 | ||
787 | #endif /* CONFIG_SMP */ | 787 | #endif /* CONFIG_SMP */ |
788 | 788 | ||
789 | /* | ||
790 | * A runqueue laden with a single nice 0 task scores a weighted_cpuload of | ||
791 | * SCHED_LOAD_SCALE. This function returns 1 if any cpu is laden with a | ||
792 | * task of nice 0 or enough lower priority tasks to bring up the | ||
793 | * weighted_cpuload | ||
794 | */ | ||
795 | static inline int above_background_load(void) | ||
796 | { | ||
797 | unsigned long cpu; | ||
798 | |||
799 | for_each_online_cpu(cpu) { | ||
800 | if (weighted_cpuload(cpu) >= SCHED_LOAD_SCALE) | ||
801 | return 1; | ||
802 | } | ||
803 | return 0; | ||
804 | } | ||
789 | 805 | ||
790 | struct io_context; /* See blkdev.h */ | 806 | struct io_context; /* See blkdev.h */ |
791 | struct cpuset; | 807 | struct cpuset; |
@@ -935,6 +951,11 @@ struct task_struct { | |||
935 | struct sched_class *sched_class; | 951 | struct sched_class *sched_class; |
936 | struct sched_entity se; | 952 | struct sched_entity se; |
937 | 953 | ||
954 | #ifdef CONFIG_PREEMPT_NOTIFIERS | ||
955 | /* list of struct preempt_notifier: */ | ||
956 | struct hlist_head preempt_notifiers; | ||
957 | #endif | ||
958 | |||
938 | unsigned short ioprio; | 959 | unsigned short ioprio; |
939 | #ifdef CONFIG_BLK_DEV_IO_TRACE | 960 | #ifdef CONFIG_BLK_DEV_IO_TRACE |
940 | unsigned int btrace_seq; | 961 | unsigned int btrace_seq; |
diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h index 8518fa2a6f89..afe0f6d9b9bc 100644 --- a/include/linux/serial_8250.h +++ b/include/linux/serial_8250.h | |||
@@ -20,7 +20,7 @@ | |||
20 | struct plat_serial8250_port { | 20 | struct plat_serial8250_port { |
21 | unsigned long iobase; /* io base address */ | 21 | unsigned long iobase; /* io base address */ |
22 | void __iomem *membase; /* ioremap cookie or NULL */ | 22 | void __iomem *membase; /* ioremap cookie or NULL */ |
23 | unsigned long mapbase; /* resource base */ | 23 | resource_size_t mapbase; /* resource base */ |
24 | unsigned int irq; /* interrupt number */ | 24 | unsigned int irq; /* interrupt number */ |
25 | unsigned int uartclk; /* UART clock rate */ | 25 | unsigned int uartclk; /* UART clock rate */ |
26 | unsigned char regshift; /* register shift */ | 26 | unsigned char regshift; /* register shift */ |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 773d8d8828ad..09d17b06bf02 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -288,7 +288,7 @@ struct uart_port { | |||
288 | const struct uart_ops *ops; | 288 | const struct uart_ops *ops; |
289 | unsigned int custom_divisor; | 289 | unsigned int custom_divisor; |
290 | unsigned int line; /* port index */ | 290 | unsigned int line; /* port index */ |
291 | unsigned long mapbase; /* for ioremap */ | 291 | resource_size_t mapbase; /* for ioremap */ |
292 | struct device *dev; /* parent device */ | 292 | struct device *dev; /* parent device */ |
293 | unsigned char hub6; /* this should be in the 8250 driver */ | 293 | unsigned char hub6; /* this should be in the 8250 driver */ |
294 | unsigned char unused[3]; | 294 | unsigned char unused[3]; |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index ce256438e619..93c27f71122a 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -134,8 +134,8 @@ typedef struct skb_frag_struct skb_frag_t; | |||
134 | 134 | ||
135 | struct skb_frag_struct { | 135 | struct skb_frag_struct { |
136 | struct page *page; | 136 | struct page *page; |
137 | __u16 page_offset; | 137 | __u32 page_offset; |
138 | __u16 size; | 138 | __u32 size; |
139 | }; | 139 | }; |
140 | 140 | ||
141 | /* This data is invariant across clones and lives at | 141 | /* This data is invariant across clones and lives at |
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 302b81d1d117..002a3cddbdd5 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
@@ -77,6 +77,7 @@ struct spi_device { | |||
77 | #define SPI_CS_HIGH 0x04 /* chipselect active high? */ | 77 | #define SPI_CS_HIGH 0x04 /* chipselect active high? */ |
78 | #define SPI_LSB_FIRST 0x08 /* per-word bits-on-wire */ | 78 | #define SPI_LSB_FIRST 0x08 /* per-word bits-on-wire */ |
79 | #define SPI_3WIRE 0x10 /* SI/SO signals shared */ | 79 | #define SPI_3WIRE 0x10 /* SI/SO signals shared */ |
80 | #define SPI_LOOP 0x20 /* loopback mode */ | ||
80 | u8 bits_per_word; | 81 | u8 bits_per_word; |
81 | int irq; | 82 | int irq; |
82 | void *controller_state; | 83 | void *controller_state; |
@@ -138,6 +139,32 @@ struct spi_message; | |||
138 | 139 | ||
139 | 140 | ||
140 | 141 | ||
142 | /** | ||
143 | * struct spi_driver - Host side "protocol" driver | ||
144 | * @probe: Binds this driver to the spi device. Drivers can verify | ||
145 | * that the device is actually present, and may need to configure | ||
146 | * characteristics (such as bits_per_word) which weren't needed for | ||
147 | * the initial configuration done during system setup. | ||
148 | * @remove: Unbinds this driver from the spi device | ||
149 | * @shutdown: Standard shutdown callback used during system state | ||
150 | * transitions such as powerdown/halt and kexec | ||
151 | * @suspend: Standard suspend callback used during system state transitions | ||
152 | * @resume: Standard resume callback used during system state transitions | ||
153 | * @driver: SPI device drivers should initialize the name and owner | ||
154 | * field of this structure. | ||
155 | * | ||
156 | * This represents the kind of device driver that uses SPI messages to | ||
157 | * interact with the hardware at the other end of a SPI link. It's called | ||
158 | * a "protocol" driver because it works through messages rather than talking | ||
159 | * directly to SPI hardware (which is what the underlying SPI controller | ||
160 | * driver does to pass those messages). These protocols are defined in the | ||
161 | * specification for the device(s) supported by the driver. | ||
162 | * | ||
163 | * As a rule, those device protocols represent the lowest level interface | ||
164 | * supported by a driver, and it will support upper level interfaces too. | ||
165 | * Examples of such upper levels include frameworks like MTD, networking, | ||
166 | * MMC, RTC, filesystem character device nodes, and hardware monitoring. | ||
167 | */ | ||
141 | struct spi_driver { | 168 | struct spi_driver { |
142 | int (*probe)(struct spi_device *spi); | 169 | int (*probe)(struct spi_device *spi); |
143 | int (*remove)(struct spi_device *spi); | 170 | int (*remove)(struct spi_device *spi); |
@@ -667,7 +694,37 @@ static inline ssize_t spi_w8r16(struct spi_device *spi, u8 cmd) | |||
667 | * parport adapters, or microcontrollers acting as USB-to-SPI bridges. | 694 | * parport adapters, or microcontrollers acting as USB-to-SPI bridges. |
668 | */ | 695 | */ |
669 | 696 | ||
670 | /* board-specific information about each SPI device */ | 697 | /** |
698 | * struct spi_board_info - board-specific template for a SPI device | ||
699 | * @modalias: Initializes spi_device.modalias; identifies the driver. | ||
700 | * @platform_data: Initializes spi_device.platform_data; the particular | ||
701 | * data stored there is driver-specific. | ||
702 | * @controller_data: Initializes spi_device.controller_data; some | ||
703 | * controllers need hints about hardware setup, e.g. for DMA. | ||
704 | * @irq: Initializes spi_device.irq; depends on how the board is wired. | ||
705 | * @max_speed_hz: Initializes spi_device.max_speed_hz; based on limits | ||
706 | * from the chip datasheet and board-specific signal quality issues. | ||
707 | * @bus_num: Identifies which spi_master parents the spi_device; unused | ||
708 | * by spi_new_device(), and otherwise depends on board wiring. | ||
709 | * @chip_select: Initializes spi_device.chip_select; depends on how | ||
710 | * the board is wired. | ||
711 | * @mode: Initializes spi_device.mode; based on the chip datasheet, board | ||
712 | * wiring (some devices support both 3WIRE and standard modes), and | ||
713 | * possibly presence of an inverter in the chipselect path. | ||
714 | * | ||
715 | * When adding new SPI devices to the device tree, these structures serve | ||
716 | * as a partial device template. They hold information which can't always | ||
717 | * be determined by drivers. Information that probe() can establish (such | ||
718 | * as the default transfer wordsize) is not included here. | ||
719 | * | ||
720 | * These structures are used in two places. Their primary role is to | ||
721 | * be stored in tables of board-specific device descriptors, which are | ||
722 | * declared early in board initialization and then used (much later) to | ||
723 | * populate a controller's device tree after the that controller's driver | ||
724 | * initializes. A secondary (and atypical) role is as a parameter to | ||
725 | * spi_new_device() call, which happens after those controller drivers | ||
726 | * are active in some dynamic board configuration models. | ||
727 | */ | ||
671 | struct spi_board_info { | 728 | struct spi_board_info { |
672 | /* the device name and module name are coupled, like platform_bus; | 729 | /* the device name and module name are coupled, like platform_bus; |
673 | * "modalias" is normally the driver name. | 730 | * "modalias" is normally the driver name. |
diff --git a/include/linux/spi/spidev.h b/include/linux/spi/spidev.h index 7d700be57490..c93ef9d42a01 100644 --- a/include/linux/spi/spidev.h +++ b/include/linux/spi/spidev.h | |||
@@ -35,6 +35,10 @@ | |||
35 | #define SPI_MODE_2 (SPI_CPOL|0) | 35 | #define SPI_MODE_2 (SPI_CPOL|0) |
36 | #define SPI_MODE_3 (SPI_CPOL|SPI_CPHA) | 36 | #define SPI_MODE_3 (SPI_CPOL|SPI_CPHA) |
37 | 37 | ||
38 | #define SPI_CS_HIGH 0x04 | ||
39 | #define SPI_LSB_FIRST 0x08 | ||
40 | #define SPI_3WIRE 0x10 | ||
41 | #define SPI_LOOP 0x20 | ||
38 | 42 | ||
39 | /*---------------------------------------------------------------------------*/ | 43 | /*---------------------------------------------------------------------------*/ |
40 | 44 | ||
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index e8e6da394c92..388cace9751f 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
@@ -24,7 +24,7 @@ struct pbe { | |||
24 | extern void drain_local_pages(void); | 24 | extern void drain_local_pages(void); |
25 | extern void mark_free_pages(struct zone *zone); | 25 | extern void mark_free_pages(struct zone *zone); |
26 | 26 | ||
27 | #if defined(CONFIG_PM) && defined(CONFIG_VT) && defined(CONFIG_VT_CONSOLE) | 27 | #if defined(CONFIG_PM_SLEEP) && defined(CONFIG_VT) && defined(CONFIG_VT_CONSOLE) |
28 | extern int pm_prepare_console(void); | 28 | extern int pm_prepare_console(void); |
29 | extern void pm_restore_console(void); | 29 | extern void pm_restore_console(void); |
30 | #else | 30 | #else |
@@ -54,8 +54,7 @@ struct hibernation_ops { | |||
54 | void (*restore_cleanup)(void); | 54 | void (*restore_cleanup)(void); |
55 | }; | 55 | }; |
56 | 56 | ||
57 | #ifdef CONFIG_PM | 57 | #ifdef CONFIG_HIBERNATION |
58 | #ifdef CONFIG_SOFTWARE_SUSPEND | ||
59 | /* kernel/power/snapshot.c */ | 58 | /* kernel/power/snapshot.c */ |
60 | extern void __register_nosave_region(unsigned long b, unsigned long e, int km); | 59 | extern void __register_nosave_region(unsigned long b, unsigned long e, int km); |
61 | static inline void register_nosave_region(unsigned long b, unsigned long e) | 60 | static inline void register_nosave_region(unsigned long b, unsigned long e) |
@@ -73,15 +72,16 @@ extern unsigned long get_safe_page(gfp_t gfp_mask); | |||
73 | 72 | ||
74 | extern void hibernation_set_ops(struct hibernation_ops *ops); | 73 | extern void hibernation_set_ops(struct hibernation_ops *ops); |
75 | extern int hibernate(void); | 74 | extern int hibernate(void); |
76 | #else /* CONFIG_SOFTWARE_SUSPEND */ | 75 | #else /* CONFIG_HIBERNATION */ |
77 | static inline int swsusp_page_is_forbidden(struct page *p) { return 0; } | 76 | static inline int swsusp_page_is_forbidden(struct page *p) { return 0; } |
78 | static inline void swsusp_set_page_free(struct page *p) {} | 77 | static inline void swsusp_set_page_free(struct page *p) {} |
79 | static inline void swsusp_unset_page_free(struct page *p) {} | 78 | static inline void swsusp_unset_page_free(struct page *p) {} |
80 | 79 | ||
81 | static inline void hibernation_set_ops(struct hibernation_ops *ops) {} | 80 | static inline void hibernation_set_ops(struct hibernation_ops *ops) {} |
82 | static inline int hibernate(void) { return -ENOSYS; } | 81 | static inline int hibernate(void) { return -ENOSYS; } |
83 | #endif /* CONFIG_SOFTWARE_SUSPEND */ | 82 | #endif /* CONFIG_HIBERNATION */ |
84 | 83 | ||
84 | #ifdef CONFIG_PM_SLEEP | ||
85 | void save_processor_state(void); | 85 | void save_processor_state(void); |
86 | void restore_processor_state(void); | 86 | void restore_processor_state(void); |
87 | struct saved_context; | 87 | struct saved_context; |
@@ -106,7 +106,7 @@ static inline int unregister_pm_notifier(struct notifier_block *nb) | |||
106 | { .notifier_call = fn, .priority = pri }; \ | 106 | { .notifier_call = fn, .priority = pri }; \ |
107 | register_pm_notifier(&fn##_nb); \ | 107 | register_pm_notifier(&fn##_nb); \ |
108 | } | 108 | } |
109 | #else /* CONFIG_PM */ | 109 | #else /* !CONFIG_PM_SLEEP */ |
110 | 110 | ||
111 | static inline int register_pm_notifier(struct notifier_block *nb) | 111 | static inline int register_pm_notifier(struct notifier_block *nb) |
112 | { | 112 | { |
@@ -119,12 +119,15 @@ static inline int unregister_pm_notifier(struct notifier_block *nb) | |||
119 | } | 119 | } |
120 | 120 | ||
121 | #define pm_notifier(fn, pri) do { (void)(fn); } while (0) | 121 | #define pm_notifier(fn, pri) do { (void)(fn); } while (0) |
122 | #endif /* CONFIG_PM */ | 122 | #endif /* !CONFIG_PM_SLEEP */ |
123 | 123 | ||
124 | #if !defined CONFIG_SOFTWARE_SUSPEND || !defined(CONFIG_PM) | 124 | #ifndef CONFIG_HIBERNATION |
125 | static inline void register_nosave_region(unsigned long b, unsigned long e) | 125 | static inline void register_nosave_region(unsigned long b, unsigned long e) |
126 | { | 126 | { |
127 | } | 127 | } |
128 | static inline void register_nosave_region_late(unsigned long b, unsigned long e) | ||
129 | { | ||
130 | } | ||
128 | #endif | 131 | #endif |
129 | 132 | ||
130 | #endif /* _LINUX_SWSUSP_H */ | 133 | #endif /* _LINUX_SWSUSP_H */ |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 47f1c53332ce..483050c924c3 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -62,7 +62,7 @@ enum | |||
62 | CTL_KERN=1, /* General kernel info and control */ | 62 | CTL_KERN=1, /* General kernel info and control */ |
63 | CTL_VM=2, /* VM management */ | 63 | CTL_VM=2, /* VM management */ |
64 | CTL_NET=3, /* Networking */ | 64 | CTL_NET=3, /* Networking */ |
65 | /* was CTL_PROC */ | 65 | CTL_PROC=4, /* removal breaks strace(1) compilation */ |
66 | CTL_FS=5, /* Filesystems */ | 66 | CTL_FS=5, /* Filesystems */ |
67 | CTL_DEBUG=6, /* Debugging */ | 67 | CTL_DEBUG=6, /* Debugging */ |
68 | CTL_DEV=7, /* Devices */ | 68 | CTL_DEV=7, /* Devices */ |
diff --git a/include/linux/time.h b/include/linux/time.h index e6aea5146e5d..6a5f503b4f1d 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
@@ -99,15 +99,11 @@ extern int update_persistent_clock(struct timespec now); | |||
99 | extern int no_sync_cmos_clock __read_mostly; | 99 | extern int no_sync_cmos_clock __read_mostly; |
100 | void timekeeping_init(void); | 100 | void timekeeping_init(void); |
101 | 101 | ||
102 | static inline unsigned long get_seconds(void) | 102 | unsigned long get_seconds(void); |
103 | { | ||
104 | return xtime.tv_sec; | ||
105 | } | ||
106 | |||
107 | struct timespec current_kernel_time(void); | 103 | struct timespec current_kernel_time(void); |
108 | 104 | ||
109 | #define CURRENT_TIME (current_kernel_time()) | 105 | #define CURRENT_TIME (current_kernel_time()) |
110 | #define CURRENT_TIME_SEC ((struct timespec) { xtime.tv_sec, 0 }) | 106 | #define CURRENT_TIME_SEC ((struct timespec) { get_seconds(), 0 }) |
111 | 107 | ||
112 | extern void do_gettimeofday(struct timeval *tv); | 108 | extern void do_gettimeofday(struct timeval *tv); |
113 | extern int do_settimeofday(struct timespec *tv); | 109 | extern int do_settimeofday(struct timespec *tv); |
diff --git a/include/linux/usb.h b/include/linux/usb.h index 7a60946df3b6..4f33a58fa9d1 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -94,6 +94,7 @@ enum usb_interface_condition { | |||
94 | * endpoint configurations. They will be in no particular order. | 94 | * endpoint configurations. They will be in no particular order. |
95 | * @num_altsetting: number of altsettings defined. | 95 | * @num_altsetting: number of altsettings defined. |
96 | * @cur_altsetting: the current altsetting. | 96 | * @cur_altsetting: the current altsetting. |
97 | * @intf_assoc: interface association descriptor | ||
97 | * @driver: the USB driver that is bound to this interface. | 98 | * @driver: the USB driver that is bound to this interface. |
98 | * @minor: the minor number assigned to this interface, if this | 99 | * @minor: the minor number assigned to this interface, if this |
99 | * interface is bound to a driver that uses the USB major number. | 100 | * interface is bound to a driver that uses the USB major number. |
@@ -213,6 +214,7 @@ struct usb_interface_cache { | |||
213 | * @desc: the device's configuration descriptor. | 214 | * @desc: the device's configuration descriptor. |
214 | * @string: pointer to the cached version of the iConfiguration string, if | 215 | * @string: pointer to the cached version of the iConfiguration string, if |
215 | * present for this configuration. | 216 | * present for this configuration. |
217 | * @intf_assoc: list of any interface association descriptors in this config | ||
216 | * @interface: array of pointers to usb_interface structures, one for each | 218 | * @interface: array of pointers to usb_interface structures, one for each |
217 | * interface in the configuration. The number of interfaces is stored | 219 | * interface in the configuration. The number of interfaces is stored |
218 | * in desc.bNumInterfaces. These pointers are valid only while the | 220 | * in desc.bNumInterfaces. These pointers are valid only while the |
diff --git a/include/net/af_unix.h b/include/net/af_unix.h index 6de1e9e35c73..0864a775de24 100644 --- a/include/net/af_unix.h +++ b/include/net/af_unix.h | |||
@@ -12,37 +12,8 @@ extern void unix_gc(void); | |||
12 | 12 | ||
13 | #define UNIX_HASH_SIZE 256 | 13 | #define UNIX_HASH_SIZE 256 |
14 | 14 | ||
15 | extern struct hlist_head unix_socket_table[UNIX_HASH_SIZE + 1]; | ||
16 | extern spinlock_t unix_table_lock; | ||
17 | |||
18 | extern atomic_t unix_tot_inflight; | 15 | extern atomic_t unix_tot_inflight; |
19 | 16 | ||
20 | static inline struct sock *first_unix_socket(int *i) | ||
21 | { | ||
22 | for (*i = 0; *i <= UNIX_HASH_SIZE; (*i)++) { | ||
23 | if (!hlist_empty(&unix_socket_table[*i])) | ||
24 | return __sk_head(&unix_socket_table[*i]); | ||
25 | } | ||
26 | return NULL; | ||
27 | } | ||
28 | |||
29 | static inline struct sock *next_unix_socket(int *i, struct sock *s) | ||
30 | { | ||
31 | struct sock *next = sk_next(s); | ||
32 | /* More in this chain? */ | ||
33 | if (next) | ||
34 | return next; | ||
35 | /* Look for next non-empty chain. */ | ||
36 | for ((*i)++; *i <= UNIX_HASH_SIZE; (*i)++) { | ||
37 | if (!hlist_empty(&unix_socket_table[*i])) | ||
38 | return __sk_head(&unix_socket_table[*i]); | ||
39 | } | ||
40 | return NULL; | ||
41 | } | ||
42 | |||
43 | #define forall_unix_sockets(i, s) \ | ||
44 | for (s = first_unix_socket(&(i)); s; s = next_unix_socket(&(i),(s))) | ||
45 | |||
46 | struct unix_address { | 17 | struct unix_address { |
47 | atomic_t refcnt; | 18 | atomic_t refcnt; |
48 | int len; | 19 | int len; |
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h index 87df4e87622d..70e70f5d3dd6 100644 --- a/include/net/bluetooth/l2cap.h +++ b/include/net/bluetooth/l2cap.h | |||
@@ -34,7 +34,7 @@ | |||
34 | /* L2CAP socket address */ | 34 | /* L2CAP socket address */ |
35 | struct sockaddr_l2 { | 35 | struct sockaddr_l2 { |
36 | sa_family_t l2_family; | 36 | sa_family_t l2_family; |
37 | unsigned short l2_psm; | 37 | __le16 l2_psm; |
38 | bdaddr_t l2_bdaddr; | 38 | bdaddr_t l2_bdaddr; |
39 | }; | 39 | }; |
40 | 40 | ||
@@ -76,32 +76,32 @@ struct l2cap_conninfo { | |||
76 | 76 | ||
77 | /* L2CAP structures */ | 77 | /* L2CAP structures */ |
78 | struct l2cap_hdr { | 78 | struct l2cap_hdr { |
79 | __u16 len; | 79 | __le16 len; |
80 | __u16 cid; | 80 | __le16 cid; |
81 | } __attribute__ ((packed)); | 81 | } __attribute__ ((packed)); |
82 | #define L2CAP_HDR_SIZE 4 | 82 | #define L2CAP_HDR_SIZE 4 |
83 | 83 | ||
84 | struct l2cap_cmd_hdr { | 84 | struct l2cap_cmd_hdr { |
85 | __u8 code; | 85 | __u8 code; |
86 | __u8 ident; | 86 | __u8 ident; |
87 | __u16 len; | 87 | __le16 len; |
88 | } __attribute__ ((packed)); | 88 | } __attribute__ ((packed)); |
89 | #define L2CAP_CMD_HDR_SIZE 4 | 89 | #define L2CAP_CMD_HDR_SIZE 4 |
90 | 90 | ||
91 | struct l2cap_cmd_rej { | 91 | struct l2cap_cmd_rej { |
92 | __u16 reason; | 92 | __le16 reason; |
93 | } __attribute__ ((packed)); | 93 | } __attribute__ ((packed)); |
94 | 94 | ||
95 | struct l2cap_conn_req { | 95 | struct l2cap_conn_req { |
96 | __u16 psm; | 96 | __le16 psm; |
97 | __u16 scid; | 97 | __le16 scid; |
98 | } __attribute__ ((packed)); | 98 | } __attribute__ ((packed)); |
99 | 99 | ||
100 | struct l2cap_conn_rsp { | 100 | struct l2cap_conn_rsp { |
101 | __u16 dcid; | 101 | __le16 dcid; |
102 | __u16 scid; | 102 | __le16 scid; |
103 | __u16 result; | 103 | __le16 result; |
104 | __u16 status; | 104 | __le16 status; |
105 | } __attribute__ ((packed)); | 105 | } __attribute__ ((packed)); |
106 | 106 | ||
107 | /* connect result */ | 107 | /* connect result */ |
@@ -117,15 +117,15 @@ struct l2cap_conn_rsp { | |||
117 | #define L2CAP_CS_AUTHOR_PEND 0x0002 | 117 | #define L2CAP_CS_AUTHOR_PEND 0x0002 |
118 | 118 | ||
119 | struct l2cap_conf_req { | 119 | struct l2cap_conf_req { |
120 | __u16 dcid; | 120 | __le16 dcid; |
121 | __u16 flags; | 121 | __le16 flags; |
122 | __u8 data[0]; | 122 | __u8 data[0]; |
123 | } __attribute__ ((packed)); | 123 | } __attribute__ ((packed)); |
124 | 124 | ||
125 | struct l2cap_conf_rsp { | 125 | struct l2cap_conf_rsp { |
126 | __u16 scid; | 126 | __le16 scid; |
127 | __u16 flags; | 127 | __le16 flags; |
128 | __u16 result; | 128 | __le16 result; |
129 | __u8 data[0]; | 129 | __u8 data[0]; |
130 | } __attribute__ ((packed)); | 130 | } __attribute__ ((packed)); |
131 | 131 | ||
@@ -149,23 +149,23 @@ struct l2cap_conf_opt { | |||
149 | #define L2CAP_CONF_MAX_SIZE 22 | 149 | #define L2CAP_CONF_MAX_SIZE 22 |
150 | 150 | ||
151 | struct l2cap_disconn_req { | 151 | struct l2cap_disconn_req { |
152 | __u16 dcid; | 152 | __le16 dcid; |
153 | __u16 scid; | 153 | __le16 scid; |
154 | } __attribute__ ((packed)); | 154 | } __attribute__ ((packed)); |
155 | 155 | ||
156 | struct l2cap_disconn_rsp { | 156 | struct l2cap_disconn_rsp { |
157 | __u16 dcid; | 157 | __le16 dcid; |
158 | __u16 scid; | 158 | __le16 scid; |
159 | } __attribute__ ((packed)); | 159 | } __attribute__ ((packed)); |
160 | 160 | ||
161 | struct l2cap_info_req { | 161 | struct l2cap_info_req { |
162 | __u16 type; | 162 | __le16 type; |
163 | __u8 data[0]; | 163 | __u8 data[0]; |
164 | } __attribute__ ((packed)); | 164 | } __attribute__ ((packed)); |
165 | 165 | ||
166 | struct l2cap_info_rsp { | 166 | struct l2cap_info_rsp { |
167 | __u16 type; | 167 | __le16 type; |
168 | __u16 result; | 168 | __le16 result; |
169 | __u8 data[0]; | 169 | __u8 data[0]; |
170 | } __attribute__ ((packed)); | 170 | } __attribute__ ((packed)); |
171 | 171 | ||
@@ -207,7 +207,7 @@ struct l2cap_conn { | |||
207 | 207 | ||
208 | struct l2cap_pinfo { | 208 | struct l2cap_pinfo { |
209 | struct bt_sock bt; | 209 | struct bt_sock bt; |
210 | __u16 psm; | 210 | __le16 psm; |
211 | __u16 dcid; | 211 | __u16 dcid; |
212 | __u16 scid; | 212 | __u16 scid; |
213 | 213 | ||
@@ -225,7 +225,7 @@ struct l2cap_pinfo { | |||
225 | 225 | ||
226 | __u8 ident; | 226 | __u8 ident; |
227 | 227 | ||
228 | __u16 sport; | 228 | __le16 sport; |
229 | 229 | ||
230 | struct l2cap_conn *conn; | 230 | struct l2cap_conn *conn; |
231 | struct sock *next_c; | 231 | struct sock *next_c; |
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 46b9dce82f6e..9059e0ed7fe3 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -17,6 +17,7 @@ | |||
17 | 17 | ||
18 | #include <linux/ipv6.h> | 18 | #include <linux/ipv6.h> |
19 | #include <linux/hardirq.h> | 19 | #include <linux/hardirq.h> |
20 | #include <net/if_inet6.h> | ||
20 | #include <net/ndisc.h> | 21 | #include <net/ndisc.h> |
21 | #include <net/flow.h> | 22 | #include <net/flow.h> |
22 | #include <net/snmp.h> | 23 | #include <net/snmp.h> |
diff --git a/include/net/netfilter/ipv6/nf_conntrack_ipv6.h b/include/net/netfilter/ipv6/nf_conntrack_ipv6.h index 5a8965904377..070d12cb4634 100644 --- a/include/net/netfilter/ipv6/nf_conntrack_ipv6.h +++ b/include/net/netfilter/ipv6/nf_conntrack_ipv6.h | |||
@@ -7,9 +7,6 @@ extern struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp6; | |||
7 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_udp6; | 7 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_udp6; |
8 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_icmpv6; | 8 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_icmpv6; |
9 | 9 | ||
10 | extern int nf_ct_ipv6_skip_exthdr(const struct sk_buff *skb, int start, | ||
11 | u8 *nexthdrp, int len); | ||
12 | |||
13 | extern int nf_ct_frag6_init(void); | 10 | extern int nf_ct_frag6_init(void); |
14 | extern void nf_ct_frag6_cleanup(void); | 11 | extern void nf_ct_frag6_cleanup(void); |
15 | extern struct sk_buff *nf_ct_frag6_gather(struct sk_buff *skb); | 12 | extern struct sk_buff *nf_ct_frag6_gather(struct sk_buff *skb); |
diff --git a/include/net/netfilter/nf_conntrack_tuple.h b/include/net/netfilter/nf_conntrack_tuple.h index 040dae5f0c9e..c48e390f4b0f 100644 --- a/include/net/netfilter/nf_conntrack_tuple.h +++ b/include/net/netfilter/nf_conntrack_tuple.h | |||
@@ -35,7 +35,7 @@ union nf_conntrack_address { | |||
35 | union nf_conntrack_man_proto | 35 | union nf_conntrack_man_proto |
36 | { | 36 | { |
37 | /* Add other protocols here. */ | 37 | /* Add other protocols here. */ |
38 | u_int16_t all; | 38 | __be16 all; |
39 | 39 | ||
40 | struct { | 40 | struct { |
41 | __be16 port; | 41 | __be16 port; |
@@ -73,7 +73,7 @@ struct nf_conntrack_tuple | |||
73 | union nf_conntrack_address u3; | 73 | union nf_conntrack_address u3; |
74 | union { | 74 | union { |
75 | /* Add other protocols here. */ | 75 | /* Add other protocols here. */ |
76 | u_int16_t all; | 76 | __be16 all; |
77 | 77 | ||
78 | struct { | 78 | struct { |
79 | __be16 port; | 79 | __be16 port; |
diff --git a/include/net/tcp.h b/include/net/tcp.h index 8b404b1ef7c8..c209361ab74a 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -660,7 +660,7 @@ struct tcp_congestion_ops { | |||
660 | /* new value of cwnd after loss (optional) */ | 660 | /* new value of cwnd after loss (optional) */ |
661 | u32 (*undo_cwnd)(struct sock *sk); | 661 | u32 (*undo_cwnd)(struct sock *sk); |
662 | /* hook for packet ack accounting (optional) */ | 662 | /* hook for packet ack accounting (optional) */ |
663 | void (*pkts_acked)(struct sock *sk, u32 num_acked, ktime_t last); | 663 | void (*pkts_acked)(struct sock *sk, u32 num_acked, s32 rtt_us); |
664 | /* get info for inet_diag (optional) */ | 664 | /* get info for inet_diag (optional) */ |
665 | void (*get_info)(struct sock *sk, u32 ext, struct sk_buff *skb); | 665 | void (*get_info)(struct sock *sk, u32 ext, struct sk_buff *skb); |
666 | 666 | ||
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h index 3f631b08a1ab..007d442412e2 100644 --- a/include/scsi/libiscsi.h +++ b/include/scsi/libiscsi.h | |||
@@ -210,6 +210,9 @@ struct iscsi_session { | |||
210 | uint32_t exp_cmdsn; | 210 | uint32_t exp_cmdsn; |
211 | uint32_t max_cmdsn; | 211 | uint32_t max_cmdsn; |
212 | 212 | ||
213 | /* This tracks the reqs queued into the initiator */ | ||
214 | uint32_t queued_cmdsn; | ||
215 | |||
213 | /* configuration */ | 216 | /* configuration */ |
214 | int initial_r2t_en; | 217 | int initial_r2t_en; |
215 | unsigned max_r2t; | 218 | unsigned max_r2t; |
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index df36461fe881..8dda2d66b5b9 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h | |||
@@ -348,7 +348,7 @@ struct sas_ha_struct { | |||
348 | 348 | ||
349 | /* public: */ | 349 | /* public: */ |
350 | char *sas_ha_name; | 350 | char *sas_ha_name; |
351 | struct pci_dev *pcidev; /* should be set */ | 351 | struct device *dev; /* should be set */ |
352 | struct module *lldd_module; /* should be set */ | 352 | struct module *lldd_module; /* should be set */ |
353 | 353 | ||
354 | u8 *sas_addr; /* must be set */ | 354 | u8 *sas_addr; /* must be set */ |
diff --git a/include/scsi/sd.h b/include/scsi/sd.h index 5261488e1108..78583fee0ab2 100644 --- a/include/scsi/sd.h +++ b/include/scsi/sd.h | |||
@@ -57,7 +57,7 @@ static int sd_resume(struct device *dev); | |||
57 | static void sd_rescan(struct device *); | 57 | static void sd_rescan(struct device *); |
58 | static int sd_init_command(struct scsi_cmnd *); | 58 | static int sd_init_command(struct scsi_cmnd *); |
59 | static int sd_issue_flush(struct device *, sector_t *); | 59 | static int sd_issue_flush(struct device *, sector_t *); |
60 | static void sd_prepare_flush(request_queue_t *, struct request *); | 60 | static void sd_prepare_flush(struct request_queue *, struct request *); |
61 | static void sd_read_capacity(struct scsi_disk *sdkp, unsigned char *buffer); | 61 | static void sd_read_capacity(struct scsi_disk *sdkp, unsigned char *buffer); |
62 | static void scsi_disk_release(struct class_device *cdev); | 62 | static void scsi_disk_release(struct class_device *cdev); |
63 | static void sd_print_sense_hdr(struct scsi_disk *, struct scsi_sense_hdr *); | 63 | static void sd_print_sense_hdr(struct scsi_disk *, struct scsi_sense_hdr *); |
diff --git a/include/video/tx3912.h b/include/video/tx3912.h deleted file mode 100644 index 6b6d006038c2..000000000000 --- a/include/video/tx3912.h +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/video/tx3912.h | ||
3 | * | ||
4 | * Copyright (C) 2001 Steven Hill (sjhill@realitydiluted.com) | ||
5 | * | ||
6 | * This file is subject to the terms and conditions of the GNU General Public | ||
7 | * License. See the file COPYING in the main directory of this archive for | ||
8 | * more details. | ||
9 | * | ||
10 | * Includes for TMPR3912/05 and PR31700 LCD controller registers | ||
11 | */ | ||
12 | #include <asm/tx3912.h> | ||
13 | |||
14 | #define VidCtrl1 REG_AT(0x028) | ||
15 | #define VidCtrl2 REG_AT(0x02C) | ||
16 | #define VidCtrl3 REG_AT(0x030) | ||
17 | #define VidCtrl4 REG_AT(0x034) | ||
18 | #define VidCtrl5 REG_AT(0x038) | ||
19 | #define VidCtrl6 REG_AT(0x03C) | ||
20 | #define VidCtrl7 REG_AT(0x040) | ||
21 | #define VidCtrl8 REG_AT(0x044) | ||
22 | #define VidCtrl9 REG_AT(0x048) | ||
23 | #define VidCtrl10 REG_AT(0x04C) | ||
24 | #define VidCtrl11 REG_AT(0x050) | ||
25 | #define VidCtrl12 REG_AT(0x054) | ||
26 | #define VidCtrl13 REG_AT(0x058) | ||
27 | #define VidCtrl14 REG_AT(0x05C) | ||
28 | |||
29 | /* Video Control 1 Register */ | ||
30 | #define LINECNT 0xffc00000 | ||
31 | #define LINECNT_SHIFT 22 | ||
32 | #define LOADDLY BIT(21) | ||
33 | #define BAUDVAL (BIT(20) | BIT(19) | BIT(18) | BIT(17) | BIT(16)) | ||
34 | #define BAUDVAL_SHIFT 16 | ||
35 | #define VIDDONEVAL (BIT(15) | BIT(14) | BIT(13) | BIT(12) | BIT(11) | BIT(10) | BIT(9)) | ||
36 | #define VIDDONEVAL_SHIFT 9 | ||
37 | #define ENFREEZEFRAME BIT(8) | ||
38 | #define TX3912_VIDCTRL1_BITSEL_MASK 0x000000c0 | ||
39 | #define TX3912_VIDCTRL1_2BIT_GRAY 0x00000040 | ||
40 | #define TX3912_VIDCTRL1_4BIT_GRAY 0x00000080 | ||
41 | #define TX3912_VIDCTRL1_8BIT_COLOR 0x000000c0 | ||
42 | #define BITSEL_SHIFT 6 | ||
43 | #define DISPSPLIT BIT(5) | ||
44 | #define DISP8 BIT(4) | ||
45 | #define DFMODE BIT(3) | ||
46 | #define INVVID BIT(2) | ||
47 | #define DISPON BIT(1) | ||
48 | #define ENVID BIT(0) | ||
49 | |||
50 | /* Video Control 2 Register */ | ||
51 | #define VIDRATE_MASK 0xffc00000 | ||
52 | #define VIDRATE_SHIFT 22 | ||
53 | #define HORZVAL_MASK 0x001ff000 | ||
54 | #define HORZVAL_SHIFT 12 | ||
55 | #define LINEVAL_MASK 0x000001ff | ||
56 | |||
57 | /* Video Control 3 Register */ | ||
58 | #define TX3912_VIDCTRL3_VIDBANK_MASK 0xfff00000 | ||
59 | #define TX3912_VIDCTRL3_VIDBASEHI_MASK 0x000ffff0 | ||
60 | |||
61 | /* Video Control 4 Register */ | ||
62 | #define TX3912_VIDCTRL4_VIDBASELO_MASK 0x000ffff0 | ||
diff --git a/include/xen/page.h b/include/xen/page.h index 1df6c1930578..c0c8fcb27899 100644 --- a/include/xen/page.h +++ b/include/xen/page.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/pfn.h> | 4 | #include <linux/pfn.h> |
5 | 5 | ||
6 | #include <asm/uaccess.h> | 6 | #include <asm/uaccess.h> |
7 | #include <asm/pgtable.h> | ||
7 | 8 | ||
8 | #include <xen/features.h> | 9 | #include <xen/features.h> |
9 | 10 | ||