diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-21 11:52:18 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-21 11:52:18 -0500 |
commit | b05005772f34497eb2b7415a651fe785cbe70e16 (patch) | |
tree | b176aeb7fa9baf69e77ddd83e844727490bfcf28 /include | |
parent | 044f324f6ea5d55391db62fca6a295b2651cb946 (diff) | |
parent | 7705a8792b0fc82fd7d4dd923724606bbfd9fb20 (diff) |
Merge branch 'origin'
Conflicts:
Documentation/video4linux/CARDLIST.cx88
drivers/media/video/cx88/Kconfig
drivers/media/video/em28xx/em28xx-video.c
drivers/media/video/saa7134/saa7134-dvb.c
Resolved as in the original merge by Mauro Carvalho Chehab
Diffstat (limited to 'include')
334 files changed, 3505 insertions, 2826 deletions
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h index 427cff1a3f83..e27dc8f29972 100644 --- a/include/acpi/acconfig.h +++ b/include/acpi/acconfig.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -61,9 +61,9 @@ | |||
61 | * | 61 | * |
62 | */ | 62 | */ |
63 | 63 | ||
64 | /* Version string */ | 64 | /* Current ACPICA subsystem version in YYYYMMDD format */ |
65 | 65 | ||
66 | #define ACPI_CA_VERSION 0x20050902 | 66 | #define ACPI_CA_VERSION 0x20060127 |
67 | 67 | ||
68 | /* | 68 | /* |
69 | * OS name, used for the _OS object. The _OS object is essentially obsolete, | 69 | * OS name, used for the _OS object. The _OS object is essentially obsolete, |
@@ -83,7 +83,7 @@ | |||
83 | #define ACPI_MAX_OBJECT_CACHE_DEPTH 96 /* Interpreter operand objects */ | 83 | #define ACPI_MAX_OBJECT_CACHE_DEPTH 96 /* Interpreter operand objects */ |
84 | 84 | ||
85 | /* | 85 | /* |
86 | * Should the subystem abort the loading of an ACPI table if the | 86 | * Should the subsystem abort the loading of an ACPI table if the |
87 | * table checksum is incorrect? | 87 | * table checksum is incorrect? |
88 | */ | 88 | */ |
89 | #define ACPI_CHECKSUM_ABORT FALSE | 89 | #define ACPI_CHECKSUM_ABORT FALSE |
@@ -98,11 +98,6 @@ | |||
98 | 98 | ||
99 | #define ACPI_CA_SUPPORT_LEVEL 3 | 99 | #define ACPI_CA_SUPPORT_LEVEL 3 |
100 | 100 | ||
101 | /* String size constants */ | ||
102 | |||
103 | #define ACPI_MAX_STRING_LENGTH 512 | ||
104 | #define ACPI_PATHNAME_MAX 256 /* A full namespace pathname */ | ||
105 | |||
106 | /* Maximum count for a semaphore object */ | 101 | /* Maximum count for a semaphore object */ |
107 | 102 | ||
108 | #define ACPI_MAX_SEMAPHORE_COUNT 256 | 103 | #define ACPI_MAX_SEMAPHORE_COUNT 256 |
@@ -115,6 +110,10 @@ | |||
115 | 110 | ||
116 | #define ACPI_SYSMEM_REGION_WINDOW_SIZE 4096 | 111 | #define ACPI_SYSMEM_REGION_WINDOW_SIZE 4096 |
117 | 112 | ||
113 | /* owner_id tracking. 8 entries allows for 255 owner_ids */ | ||
114 | |||
115 | #define ACPI_NUM_OWNERID_MASKS 8 | ||
116 | |||
118 | /****************************************************************************** | 117 | /****************************************************************************** |
119 | * | 118 | * |
120 | * ACPI Specification constants (Do not change unless the specification changes) | 119 | * ACPI Specification constants (Do not change unless the specification changes) |
@@ -134,14 +133,11 @@ | |||
134 | #define ACPI_METHOD_NUM_ARGS 7 | 133 | #define ACPI_METHOD_NUM_ARGS 7 |
135 | #define ACPI_METHOD_MAX_ARG 6 | 134 | #define ACPI_METHOD_MAX_ARG 6 |
136 | 135 | ||
137 | /* Maximum length of resulting string when converting from a buffer */ | 136 | /* Length of _HID, _UID, _CID, and UUID values */ |
138 | |||
139 | #define ACPI_MAX_STRING_CONVERSION 200 | ||
140 | |||
141 | /* Length of _HID, _UID, and _CID values */ | ||
142 | 137 | ||
143 | #define ACPI_DEVICE_ID_LENGTH 0x09 | 138 | #define ACPI_DEVICE_ID_LENGTH 0x09 |
144 | #define ACPI_MAX_CID_LENGTH 48 | 139 | #define ACPI_MAX_CID_LENGTH 48 |
140 | #define ACPI_UUID_LENGTH 16 | ||
145 | 141 | ||
146 | /* | 142 | /* |
147 | * Operand Stack (in WALK_STATE), Must be large enough to contain METHOD_MAX_ARG | 143 | * Operand Stack (in WALK_STATE), Must be large enough to contain METHOD_MAX_ARG |
diff --git a/include/acpi/acdebug.h b/include/acpi/acdebug.h index 70ce3b4d006e..d8167095caf3 100644 --- a/include/acpi/acdebug.h +++ b/include/acpi/acdebug.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/acdisasm.h b/include/acpi/acdisasm.h index 3d96dcb1bb4b..11a8fe39cb04 100644 --- a/include/acpi/acdisasm.h +++ b/include/acpi/acdisasm.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -57,26 +57,11 @@ struct acpi_external_list { | |||
57 | }; | 57 | }; |
58 | 58 | ||
59 | extern struct acpi_external_list *acpi_gbl_external_list; | 59 | extern struct acpi_external_list *acpi_gbl_external_list; |
60 | extern const char *acpi_gbl_io_decode[2]; | 60 | |
61 | /* Strings used for decoding flags to ASL keywords */ | ||
62 | |||
61 | extern const char *acpi_gbl_word_decode[4]; | 63 | extern const char *acpi_gbl_word_decode[4]; |
62 | extern const char *acpi_gbl_consume_decode[2]; | ||
63 | extern const char *acpi_gbl_min_decode[2]; | ||
64 | extern const char *acpi_gbl_max_decode[2]; | ||
65 | extern const char *acpi_gbl_DECdecode[2]; | ||
66 | extern const char *acpi_gbl_RNGdecode[4]; | ||
67 | extern const char *acpi_gbl_MEMdecode[4]; | ||
68 | extern const char *acpi_gbl_RWdecode[2]; | ||
69 | extern const char *acpi_gbl_irq_decode[2]; | 64 | extern const char *acpi_gbl_irq_decode[2]; |
70 | extern const char *acpi_gbl_HEdecode[2]; | ||
71 | extern const char *acpi_gbl_LLdecode[2]; | ||
72 | extern const char *acpi_gbl_SHRdecode[2]; | ||
73 | extern const char *acpi_gbl_TYPdecode[4]; | ||
74 | extern const char *acpi_gbl_BMdecode[2]; | ||
75 | extern const char *acpi_gbl_SIZdecode[4]; | ||
76 | extern const char *acpi_gbl_TTPdecode[2]; | ||
77 | extern const char *acpi_gbl_MTPdecode[4]; | ||
78 | extern const char *acpi_gbl_TRSdecode[2]; | ||
79 | |||
80 | extern const char *acpi_gbl_lock_rule[ACPI_NUM_LOCK_RULES]; | 65 | extern const char *acpi_gbl_lock_rule[ACPI_NUM_LOCK_RULES]; |
81 | extern const char *acpi_gbl_access_types[ACPI_NUM_ACCESS_TYPES]; | 66 | extern const char *acpi_gbl_access_types[ACPI_NUM_ACCESS_TYPES]; |
82 | extern const char *acpi_gbl_update_rules[ACPI_NUM_UPDATE_RULES]; | 67 | extern const char *acpi_gbl_update_rules[ACPI_NUM_UPDATE_RULES]; |
@@ -171,11 +156,19 @@ u8 acpi_dm_is_string_buffer(union acpi_parse_object *op); | |||
171 | /* | 156 | /* |
172 | * dmresrc | 157 | * dmresrc |
173 | */ | 158 | */ |
159 | void acpi_dm_dump_integer8(u8 value, char *name); | ||
160 | |||
161 | void acpi_dm_dump_integer16(u16 value, char *name); | ||
162 | |||
163 | void acpi_dm_dump_integer32(u32 value, char *name); | ||
164 | |||
165 | void acpi_dm_dump_integer64(u64 value, char *name); | ||
166 | |||
174 | void | 167 | void |
175 | acpi_dm_resource_descriptor(struct acpi_op_walk_info *info, | 168 | acpi_dm_resource_template(struct acpi_op_walk_info *info, |
176 | u8 * byte_data, u32 byte_count); | 169 | u8 * byte_data, u32 byte_count); |
177 | 170 | ||
178 | u8 acpi_dm_is_resource_descriptor(union acpi_parse_object *op); | 171 | u8 acpi_dm_is_resource_template(union acpi_parse_object *op); |
179 | 172 | ||
180 | void acpi_dm_indent(u32 level); | 173 | void acpi_dm_indent(u32 level); |
181 | 174 | ||
@@ -187,73 +180,69 @@ void acpi_dm_decode_attribute(u8 attribute); | |||
187 | * dmresrcl | 180 | * dmresrcl |
188 | */ | 181 | */ |
189 | void | 182 | void |
190 | acpi_dm_word_descriptor(struct asl_word_address_desc *resource, | 183 | acpi_dm_word_descriptor(union aml_resource *resource, u32 length, u32 level); |
191 | u32 length, u32 level); | ||
192 | 184 | ||
193 | void | 185 | void |
194 | acpi_dm_dword_descriptor(struct asl_dword_address_desc *resource, | 186 | acpi_dm_dword_descriptor(union aml_resource *resource, u32 length, u32 level); |
195 | u32 length, u32 level); | ||
196 | 187 | ||
197 | void | 188 | void |
198 | acpi_dm_extended_descriptor(struct asl_extended_address_desc *resource, | 189 | acpi_dm_extended_descriptor(union aml_resource *resource, |
199 | u32 length, u32 level); | 190 | u32 length, u32 level); |
200 | 191 | ||
201 | void | 192 | void |
202 | acpi_dm_qword_descriptor(struct asl_qword_address_desc *resource, | 193 | acpi_dm_qword_descriptor(union aml_resource *resource, u32 length, u32 level); |
203 | u32 length, u32 level); | ||
204 | 194 | ||
205 | void | 195 | void |
206 | acpi_dm_memory24_descriptor(struct asl_memory_24_desc *resource, | 196 | acpi_dm_memory24_descriptor(union aml_resource *resource, |
207 | u32 length, u32 level); | 197 | u32 length, u32 level); |
208 | 198 | ||
209 | void | 199 | void |
210 | acpi_dm_memory32_descriptor(struct asl_memory_32_desc *resource, | 200 | acpi_dm_memory32_descriptor(union aml_resource *resource, |
211 | u32 length, u32 level); | 201 | u32 length, u32 level); |
212 | 202 | ||
213 | void | 203 | void |
214 | acpi_dm_fixed_mem32_descriptor(struct asl_fixed_memory_32_desc *resource, | 204 | acpi_dm_fixed_memory32_descriptor(union aml_resource *resource, |
215 | u32 length, u32 level); | 205 | u32 length, u32 level); |
216 | 206 | ||
217 | void | 207 | void |
218 | acpi_dm_generic_register_descriptor(struct asl_general_register_desc *resource, | 208 | acpi_dm_generic_register_descriptor(union aml_resource *resource, |
219 | u32 length, u32 level); | 209 | u32 length, u32 level); |
220 | 210 | ||
221 | void | 211 | void |
222 | acpi_dm_interrupt_descriptor(struct asl_extended_xrupt_desc *resource, | 212 | acpi_dm_interrupt_descriptor(union aml_resource *resource, |
223 | u32 length, u32 level); | 213 | u32 length, u32 level); |
224 | 214 | ||
225 | void | 215 | void |
226 | acpi_dm_vendor_large_descriptor(struct asl_large_vendor_desc *resource, | 216 | acpi_dm_vendor_large_descriptor(union aml_resource *resource, |
227 | u32 length, u32 level); | 217 | u32 length, u32 level); |
228 | 218 | ||
219 | void acpi_dm_vendor_common(char *name, u8 * byte_data, u32 length, u32 level); | ||
220 | |||
229 | /* | 221 | /* |
230 | * dmresrcs | 222 | * dmresrcs |
231 | */ | 223 | */ |
232 | void | 224 | void |
233 | acpi_dm_irq_descriptor(struct asl_irq_format_desc *resource, | 225 | acpi_dm_irq_descriptor(union aml_resource *resource, u32 length, u32 level); |
234 | u32 length, u32 level); | ||
235 | 226 | ||
236 | void | 227 | void |
237 | acpi_dm_dma_descriptor(struct asl_dma_format_desc *resource, | 228 | acpi_dm_dma_descriptor(union aml_resource *resource, u32 length, u32 level); |
238 | u32 length, u32 level); | ||
239 | 229 | ||
240 | void | 230 | void acpi_dm_io_descriptor(union aml_resource *resource, u32 length, u32 level); |
241 | acpi_dm_io_descriptor(struct asl_io_port_desc *resource, u32 length, u32 level); | ||
242 | 231 | ||
243 | void | 232 | void |
244 | acpi_dm_fixed_io_descriptor(struct asl_fixed_io_port_desc *resource, | 233 | acpi_dm_fixed_io_descriptor(union aml_resource *resource, |
245 | u32 length, u32 level); | 234 | u32 length, u32 level); |
246 | 235 | ||
247 | void | 236 | void |
248 | acpi_dm_start_dependent_descriptor(struct asl_start_dependent_desc *resource, | 237 | acpi_dm_start_dependent_descriptor(union aml_resource *resource, |
249 | u32 length, u32 level); | 238 | u32 length, u32 level); |
250 | 239 | ||
251 | void | 240 | void |
252 | acpi_dm_end_dependent_descriptor(struct asl_start_dependent_desc *resource, | 241 | acpi_dm_end_dependent_descriptor(union aml_resource *resource, |
253 | u32 length, u32 level); | 242 | u32 length, u32 level); |
254 | 243 | ||
255 | void | 244 | void |
256 | acpi_dm_vendor_small_descriptor(struct asl_small_vendor_desc *resource, | 245 | acpi_dm_vendor_small_descriptor(union aml_resource *resource, |
257 | u32 length, u32 level); | 246 | u32 length, u32 level); |
258 | 247 | ||
259 | /* | 248 | /* |
diff --git a/include/acpi/acdispat.h b/include/acpi/acdispat.h index 065f24a77cfc..c41a926ff317 100644 --- a/include/acpi/acdispat.h +++ b/include/acpi/acdispat.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -201,6 +201,9 @@ acpi_ds_begin_method_execution(struct acpi_namespace_node *method_node, | |||
201 | union acpi_operand_object *obj_desc, | 201 | union acpi_operand_object *obj_desc, |
202 | struct acpi_namespace_node *calling_method_node); | 202 | struct acpi_namespace_node *calling_method_node); |
203 | 203 | ||
204 | acpi_status | ||
205 | acpi_ds_method_error(acpi_status status, struct acpi_walk_state *walk_state); | ||
206 | |||
204 | /* | 207 | /* |
205 | * dsinit | 208 | * dsinit |
206 | */ | 209 | */ |
diff --git a/include/acpi/acevents.h b/include/acpi/acevents.h index bfa54600ecd9..f2717be4fe0d 100644 --- a/include/acpi/acevents.h +++ b/include/acpi/acevents.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -51,6 +51,8 @@ acpi_status acpi_ev_initialize_events(void); | |||
51 | 51 | ||
52 | acpi_status acpi_ev_install_xrupt_handlers(void); | 52 | acpi_status acpi_ev_install_xrupt_handlers(void); |
53 | 53 | ||
54 | acpi_status acpi_ev_install_fadt_gpes(void); | ||
55 | |||
54 | u32 acpi_ev_fixed_event_detect(void); | 56 | u32 acpi_ev_fixed_event_detect(void); |
55 | 57 | ||
56 | /* | 58 | /* |
@@ -105,6 +107,10 @@ acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device, | |||
105 | u32 interrupt_number, | 107 | u32 interrupt_number, |
106 | struct acpi_gpe_block_info **return_gpe_block); | 108 | struct acpi_gpe_block_info **return_gpe_block); |
107 | 109 | ||
110 | acpi_status | ||
111 | acpi_ev_initialize_gpe_block(struct acpi_namespace_node *gpe_device, | ||
112 | struct acpi_gpe_block_info *gpe_block); | ||
113 | |||
108 | acpi_status acpi_ev_delete_gpe_block(struct acpi_gpe_block_info *gpe_block); | 114 | acpi_status acpi_ev_delete_gpe_block(struct acpi_gpe_block_info *gpe_block); |
109 | 115 | ||
110 | u32 | 116 | u32 |
diff --git a/include/acpi/acexcep.h b/include/acpi/acexcep.h index 4f005eb65928..dc768aa580e4 100644 --- a/include/acpi/acexcep.h +++ b/include/acpi/acexcep.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/acglobal.h b/include/acpi/acglobal.h index 4ab2ca18b8df..734cc77bf2c7 100644 --- a/include/acpi/acglobal.h +++ b/include/acpi/acglobal.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -80,6 +80,15 @@ extern u32 acpi_dbg_layer; | |||
80 | 80 | ||
81 | extern u32 acpi_gbl_nesting_level; | 81 | extern u32 acpi_gbl_nesting_level; |
82 | 82 | ||
83 | /* Support for dynamic control method tracing mechanism */ | ||
84 | |||
85 | ACPI_EXTERN u32 acpi_gbl_original_dbg_level; | ||
86 | ACPI_EXTERN u32 acpi_gbl_original_dbg_layer; | ||
87 | ACPI_EXTERN acpi_name acpi_gbl_trace_method_name; | ||
88 | ACPI_EXTERN u32 acpi_gbl_trace_dbg_level; | ||
89 | ACPI_EXTERN u32 acpi_gbl_trace_dbg_layer; | ||
90 | ACPI_EXTERN u32 acpi_gbl_trace_flags; | ||
91 | |||
83 | /***************************************************************************** | 92 | /***************************************************************************** |
84 | * | 93 | * |
85 | * Runtime configuration (static defaults that can be overriden at runtime) | 94 | * Runtime configuration (static defaults that can be overriden at runtime) |
@@ -89,11 +98,15 @@ extern u32 acpi_gbl_nesting_level; | |||
89 | /* | 98 | /* |
90 | * Enable "slack" in the AML interpreter? Default is FALSE, and the | 99 | * Enable "slack" in the AML interpreter? Default is FALSE, and the |
91 | * interpreter strictly follows the ACPI specification. Setting to TRUE | 100 | * interpreter strictly follows the ACPI specification. Setting to TRUE |
92 | * allows the interpreter to forgive certain bad AML constructs. Currently: | 101 | * allows the interpreter to ignore certain errors and/or bad AML constructs. |
102 | * | ||
103 | * Currently, these features are enabled by this flag: | ||
104 | * | ||
93 | * 1) Allow "implicit return" of last value in a control method | 105 | * 1) Allow "implicit return" of last value in a control method |
94 | * 2) Allow access beyond end of operation region | 106 | * 2) Allow access beyond the end of an operation region |
95 | * 3) Allow access to uninitialized locals/args (auto-init to integer 0) | 107 | * 3) Allow access to uninitialized locals/args (auto-init to integer 0) |
96 | * 4) Allow ANY object type to be a source operand for the Store() operator | 108 | * 4) Allow ANY object type to be a source operand for the Store() operator |
109 | * 5) Allow unresolved references (invalid target name) in package objects | ||
97 | */ | 110 | */ |
98 | ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_enable_interpreter_slack, FALSE); | 111 | ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_enable_interpreter_slack, FALSE); |
99 | 112 | ||
@@ -211,9 +224,11 @@ ACPI_EXTERN u32 acpi_gbl_original_mode; | |||
211 | ACPI_EXTERN u32 acpi_gbl_rsdp_original_location; | 224 | ACPI_EXTERN u32 acpi_gbl_rsdp_original_location; |
212 | ACPI_EXTERN u32 acpi_gbl_ns_lookup_count; | 225 | ACPI_EXTERN u32 acpi_gbl_ns_lookup_count; |
213 | ACPI_EXTERN u32 acpi_gbl_ps_find_count; | 226 | ACPI_EXTERN u32 acpi_gbl_ps_find_count; |
214 | ACPI_EXTERN u64 acpi_gbl_owner_id_mask; | 227 | ACPI_EXTERN u32 acpi_gbl_owner_id_mask[ACPI_NUM_OWNERID_MASKS]; |
215 | ACPI_EXTERN u16 acpi_gbl_pm1_enable_register_save; | 228 | ACPI_EXTERN u16 acpi_gbl_pm1_enable_register_save; |
216 | ACPI_EXTERN u16 acpi_gbl_global_lock_handle; | 229 | ACPI_EXTERN u16 acpi_gbl_global_lock_handle; |
230 | ACPI_EXTERN u8 acpi_gbl_last_owner_id_index; | ||
231 | ACPI_EXTERN u8 acpi_gbl_next_owner_id_offset; | ||
217 | ACPI_EXTERN u8 acpi_gbl_debugger_configuration; | 232 | ACPI_EXTERN u8 acpi_gbl_debugger_configuration; |
218 | ACPI_EXTERN u8 acpi_gbl_global_lock_acquired; | 233 | ACPI_EXTERN u8 acpi_gbl_global_lock_acquired; |
219 | ACPI_EXTERN u8 acpi_gbl_step_to_next_call; | 234 | ACPI_EXTERN u8 acpi_gbl_step_to_next_call; |
diff --git a/include/acpi/achware.h b/include/acpi/achware.h index 3644d7248e7e..29b60a8c0593 100644 --- a/include/acpi/achware.h +++ b/include/acpi/achware.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/acinterp.h b/include/acpi/acinterp.h index 2c9c1a1d1b7f..9f22cfcb624b 100644 --- a/include/acpi/acinterp.h +++ b/include/acpi/acinterp.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -44,7 +44,49 @@ | |||
44 | #ifndef __ACINTERP_H__ | 44 | #ifndef __ACINTERP_H__ |
45 | #define __ACINTERP_H__ | 45 | #define __ACINTERP_H__ |
46 | 46 | ||
47 | #define ACPI_WALK_OPERANDS (&(walk_state->operands [walk_state->num_operands -1])) | 47 | #define ACPI_WALK_OPERANDS (&(walk_state->operands [walk_state->num_operands -1])) |
48 | |||
49 | /* Macros for tables used for debug output */ | ||
50 | |||
51 | #define ACPI_EXD_OFFSET(f) (u8) ACPI_OFFSET (union acpi_operand_object,f) | ||
52 | #define ACPI_EXD_NSOFFSET(f) (u8) ACPI_OFFSET (struct acpi_namespace_node,f) | ||
53 | #define ACPI_EXD_TABLE_SIZE(name) (sizeof(name) / sizeof (struct acpi_exdump_info)) | ||
54 | |||
55 | /* | ||
56 | * If possible, pack the following structure to byte alignment, since we | ||
57 | * don't care about performance for debug output | ||
58 | */ | ||
59 | #ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED | ||
60 | #pragma pack(1) | ||
61 | #endif | ||
62 | |||
63 | typedef const struct acpi_exdump_info { | ||
64 | u8 opcode; | ||
65 | u8 offset; | ||
66 | char *name; | ||
67 | |||
68 | } acpi_exdump_info; | ||
69 | |||
70 | /* Values for the Opcode field above */ | ||
71 | |||
72 | #define ACPI_EXD_INIT 0 | ||
73 | #define ACPI_EXD_TYPE 1 | ||
74 | #define ACPI_EXD_UINT8 2 | ||
75 | #define ACPI_EXD_UINT16 3 | ||
76 | #define ACPI_EXD_UINT32 4 | ||
77 | #define ACPI_EXD_UINT64 5 | ||
78 | #define ACPI_EXD_LITERAL 6 | ||
79 | #define ACPI_EXD_POINTER 7 | ||
80 | #define ACPI_EXD_ADDRESS 8 | ||
81 | #define ACPI_EXD_STRING 9 | ||
82 | #define ACPI_EXD_BUFFER 10 | ||
83 | #define ACPI_EXD_PACKAGE 11 | ||
84 | #define ACPI_EXD_FIELD 12 | ||
85 | #define ACPI_EXD_REFERENCE 13 | ||
86 | |||
87 | /* restore default alignment */ | ||
88 | |||
89 | #pragma pack() | ||
48 | 90 | ||
49 | /* | 91 | /* |
50 | * exconvrt - object conversion | 92 | * exconvrt - object conversion |
@@ -327,7 +369,7 @@ acpi_ex_dump_operands(union acpi_operand_object **operands, | |||
327 | void | 369 | void |
328 | acpi_ex_dump_object_descriptor(union acpi_operand_object *object, u32 flags); | 370 | acpi_ex_dump_object_descriptor(union acpi_operand_object *object, u32 flags); |
329 | 371 | ||
330 | void acpi_ex_dump_node(struct acpi_namespace_node *node, u32 flags); | 372 | void acpi_ex_dump_namespace_node(struct acpi_namespace_node *node, u32 flags); |
331 | #endif /* ACPI_FUTURE_USAGE */ | 373 | #endif /* ACPI_FUTURE_USAGE */ |
332 | 374 | ||
333 | /* | 375 | /* |
diff --git a/include/acpi/aclocal.h b/include/acpi/aclocal.h index 9fba0fddda90..8361820d2970 100644 --- a/include/acpi/aclocal.h +++ b/include/acpi/aclocal.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -276,6 +276,37 @@ struct acpi_create_field_info { | |||
276 | u8 field_type; | 276 | u8 field_type; |
277 | }; | 277 | }; |
278 | 278 | ||
279 | /* | ||
280 | * Bitmapped ACPI types. Used internally only | ||
281 | */ | ||
282 | #define ACPI_BTYPE_ANY 0x00000000 | ||
283 | #define ACPI_BTYPE_INTEGER 0x00000001 | ||
284 | #define ACPI_BTYPE_STRING 0x00000002 | ||
285 | #define ACPI_BTYPE_BUFFER 0x00000004 | ||
286 | #define ACPI_BTYPE_PACKAGE 0x00000008 | ||
287 | #define ACPI_BTYPE_FIELD_UNIT 0x00000010 | ||
288 | #define ACPI_BTYPE_DEVICE 0x00000020 | ||
289 | #define ACPI_BTYPE_EVENT 0x00000040 | ||
290 | #define ACPI_BTYPE_METHOD 0x00000080 | ||
291 | #define ACPI_BTYPE_MUTEX 0x00000100 | ||
292 | #define ACPI_BTYPE_REGION 0x00000200 | ||
293 | #define ACPI_BTYPE_POWER 0x00000400 | ||
294 | #define ACPI_BTYPE_PROCESSOR 0x00000800 | ||
295 | #define ACPI_BTYPE_THERMAL 0x00001000 | ||
296 | #define ACPI_BTYPE_BUFFER_FIELD 0x00002000 | ||
297 | #define ACPI_BTYPE_DDB_HANDLE 0x00004000 | ||
298 | #define ACPI_BTYPE_DEBUG_OBJECT 0x00008000 | ||
299 | #define ACPI_BTYPE_REFERENCE 0x00010000 | ||
300 | #define ACPI_BTYPE_RESOURCE 0x00020000 | ||
301 | |||
302 | #define ACPI_BTYPE_COMPUTE_DATA (ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING | ACPI_BTYPE_BUFFER) | ||
303 | |||
304 | #define ACPI_BTYPE_DATA (ACPI_BTYPE_COMPUTE_DATA | ACPI_BTYPE_PACKAGE) | ||
305 | #define ACPI_BTYPE_DATA_REFERENCE (ACPI_BTYPE_DATA | ACPI_BTYPE_REFERENCE | ACPI_BTYPE_DDB_HANDLE) | ||
306 | #define ACPI_BTYPE_DEVICE_OBJECTS (ACPI_BTYPE_DEVICE | ACPI_BTYPE_THERMAL | ACPI_BTYPE_PROCESSOR) | ||
307 | #define ACPI_BTYPE_OBJECTS_AND_REFS 0x0001FFFF /* ARG or LOCAL */ | ||
308 | #define ACPI_BTYPE_ALL_OBJECTS 0x0000FFFF | ||
309 | |||
279 | /***************************************************************************** | 310 | /***************************************************************************** |
280 | * | 311 | * |
281 | * Event typedefs and structs | 312 | * Event typedefs and structs |
@@ -385,13 +416,13 @@ struct acpi_field_info { | |||
385 | #define ACPI_CONTROL_PREDICATE_FALSE 0xC3 | 416 | #define ACPI_CONTROL_PREDICATE_FALSE 0xC3 |
386 | #define ACPI_CONTROL_PREDICATE_TRUE 0xC4 | 417 | #define ACPI_CONTROL_PREDICATE_TRUE 0xC4 |
387 | 418 | ||
388 | #define ACPI_STATE_COMMON /* Two 32-bit fields and a pointer */\ | 419 | #define ACPI_STATE_COMMON /* Two 32-bit fields and a pointer */\ |
389 | u8 data_type; /* To differentiate various internal objs */\ | 420 | u8 data_type; /* To differentiate various internal objs */\ |
390 | u8 flags; \ | 421 | u8 flags; \ |
391 | u16 value; \ | 422 | u16 value; \ |
392 | u16 state; \ | 423 | u16 state; \ |
393 | u16 reserved; \ | 424 | u16 reserved; \ |
394 | void *next; \ | 425 | void *next; |
395 | 426 | ||
396 | struct acpi_common_state { | 427 | struct acpi_common_state { |
397 | ACPI_STATE_COMMON}; | 428 | ACPI_STATE_COMMON}; |
@@ -544,8 +575,7 @@ union acpi_parse_value { | |||
544 | char aml_op_name[16]) /* Op name (debug only) */\ | 575 | char aml_op_name[16]) /* Op name (debug only) */\ |
545 | /* NON-DEBUG members below: */\ | 576 | /* NON-DEBUG members below: */\ |
546 | struct acpi_namespace_node *node; /* For use by interpreter */\ | 577 | struct acpi_namespace_node *node; /* For use by interpreter */\ |
547 | union acpi_parse_value value; /* Value or args associated with the opcode */\ | 578 | union acpi_parse_value value; /* Value or args associated with the opcode */ |
548 | |||
549 | 579 | ||
550 | #define ACPI_DASM_BUFFER 0x00 | 580 | #define ACPI_DASM_BUFFER 0x00 |
551 | #define ACPI_DASM_RESOURCE 0x01 | 581 | #define ACPI_DASM_RESOURCE 0x01 |
@@ -573,6 +603,8 @@ struct acpi_parse_obj_named { | |||
573 | 603 | ||
574 | /* The parse node is the fundamental element of the parse tree */ | 604 | /* The parse node is the fundamental element of the parse tree */ |
575 | 605 | ||
606 | #define ACPI_MAX_PARSEOP_NAME 20 | ||
607 | |||
576 | struct acpi_parse_obj_asl { | 608 | struct acpi_parse_obj_asl { |
577 | ACPI_PARSE_COMMON union acpi_parse_object *child; | 609 | ACPI_PARSE_COMMON union acpi_parse_object *child; |
578 | union acpi_parse_object *parent_method; | 610 | union acpi_parse_object *parent_method; |
@@ -597,7 +629,7 @@ struct acpi_parse_obj_asl { | |||
597 | u8 aml_opcode_length; | 629 | u8 aml_opcode_length; |
598 | u8 aml_pkg_len_bytes; | 630 | u8 aml_pkg_len_bytes; |
599 | u8 extra; | 631 | u8 extra; |
600 | char parse_op_name[12]; | 632 | char parse_op_name[ACPI_MAX_PARSEOP_NAME]; |
601 | }; | 633 | }; |
602 | 634 | ||
603 | union acpi_parse_object { | 635 | union acpi_parse_object { |
@@ -735,44 +767,52 @@ struct acpi_bit_register_info { | |||
735 | 767 | ||
736 | /* resource_type values */ | 768 | /* resource_type values */ |
737 | 769 | ||
738 | #define ACPI_RESOURCE_TYPE_MEMORY_RANGE 0 | 770 | #define ACPI_ADDRESS_TYPE_MEMORY_RANGE 0 |
739 | #define ACPI_RESOURCE_TYPE_IO_RANGE 1 | 771 | #define ACPI_ADDRESS_TYPE_IO_RANGE 1 |
740 | #define ACPI_RESOURCE_TYPE_BUS_NUMBER_RANGE 2 | 772 | #define ACPI_ADDRESS_TYPE_BUS_NUMBER_RANGE 2 |
741 | 773 | ||
742 | /* Resource descriptor types and masks */ | 774 | /* Resource descriptor types and masks */ |
743 | 775 | ||
744 | #define ACPI_RDESC_TYPE_LARGE 0x80 | 776 | #define ACPI_RESOURCE_NAME_LARGE 0x80 |
745 | #define ACPI_RDESC_TYPE_SMALL 0x00 | 777 | #define ACPI_RESOURCE_NAME_SMALL 0x00 |
746 | 778 | ||
747 | #define ACPI_RDESC_TYPE_MASK 0x80 | 779 | #define ACPI_RESOURCE_NAME_SMALL_MASK 0x78 /* Bits 6:3 contain the type */ |
748 | #define ACPI_RDESC_SMALL_MASK 0x78 /* Only bits 6:3 contain the type */ | 780 | #define ACPI_RESOURCE_NAME_SMALL_LENGTH_MASK 0x07 /* Bits 2:0 contain the length */ |
781 | #define ACPI_RESOURCE_NAME_LARGE_MASK 0x7F /* Bits 6:0 contain the type */ | ||
749 | 782 | ||
750 | /* | 783 | /* |
751 | * Small resource descriptor types | 784 | * Small resource descriptor "names" as defined by the ACPI specification. |
752 | * Note: The 3 length bits (2:0) must be zero | 785 | * Note: Bits 2:0 are used for the descriptor length |
753 | */ | 786 | */ |
754 | #define ACPI_RDESC_TYPE_IRQ_FORMAT 0x20 | 787 | #define ACPI_RESOURCE_NAME_IRQ 0x20 |
755 | #define ACPI_RDESC_TYPE_DMA_FORMAT 0x28 | 788 | #define ACPI_RESOURCE_NAME_DMA 0x28 |
756 | #define ACPI_RDESC_TYPE_START_DEPENDENT 0x30 | 789 | #define ACPI_RESOURCE_NAME_START_DEPENDENT 0x30 |
757 | #define ACPI_RDESC_TYPE_END_DEPENDENT 0x38 | 790 | #define ACPI_RESOURCE_NAME_END_DEPENDENT 0x38 |
758 | #define ACPI_RDESC_TYPE_IO_PORT 0x40 | 791 | #define ACPI_RESOURCE_NAME_IO 0x40 |
759 | #define ACPI_RDESC_TYPE_FIXED_IO_PORT 0x48 | 792 | #define ACPI_RESOURCE_NAME_FIXED_IO 0x48 |
760 | #define ACPI_RDESC_TYPE_SMALL_VENDOR 0x70 | 793 | #define ACPI_RESOURCE_NAME_RESERVED_S1 0x50 |
761 | #define ACPI_RDESC_TYPE_END_TAG 0x78 | 794 | #define ACPI_RESOURCE_NAME_RESERVED_S2 0x58 |
795 | #define ACPI_RESOURCE_NAME_RESERVED_S3 0x60 | ||
796 | #define ACPI_RESOURCE_NAME_RESERVED_S4 0x68 | ||
797 | #define ACPI_RESOURCE_NAME_VENDOR_SMALL 0x70 | ||
798 | #define ACPI_RESOURCE_NAME_END_TAG 0x78 | ||
762 | 799 | ||
763 | /* | 800 | /* |
764 | * Large resource descriptor types | 801 | * Large resource descriptor "names" as defined by the ACPI specification. |
802 | * Note: includes the Large Descriptor bit in bit[7] | ||
765 | */ | 803 | */ |
766 | #define ACPI_RDESC_TYPE_MEMORY_24 0x81 | 804 | #define ACPI_RESOURCE_NAME_MEMORY24 0x81 |
767 | #define ACPI_RDESC_TYPE_GENERAL_REGISTER 0x82 | 805 | #define ACPI_RESOURCE_NAME_GENERIC_REGISTER 0x82 |
768 | #define ACPI_RDESC_TYPE_LARGE_VENDOR 0x84 | 806 | #define ACPI_RESOURCE_NAME_RESERVED_L1 0x83 |
769 | #define ACPI_RDESC_TYPE_MEMORY_32 0x85 | 807 | #define ACPI_RESOURCE_NAME_VENDOR_LARGE 0x84 |
770 | #define ACPI_RDESC_TYPE_FIXED_MEMORY_32 0x86 | 808 | #define ACPI_RESOURCE_NAME_MEMORY32 0x85 |
771 | #define ACPI_RDESC_TYPE_DWORD_ADDRESS_SPACE 0x87 | 809 | #define ACPI_RESOURCE_NAME_FIXED_MEMORY32 0x86 |
772 | #define ACPI_RDESC_TYPE_WORD_ADDRESS_SPACE 0x88 | 810 | #define ACPI_RESOURCE_NAME_ADDRESS32 0x87 |
773 | #define ACPI_RDESC_TYPE_EXTENDED_XRUPT 0x89 | 811 | #define ACPI_RESOURCE_NAME_ADDRESS16 0x88 |
774 | #define ACPI_RDESC_TYPE_QWORD_ADDRESS_SPACE 0x8A | 812 | #define ACPI_RESOURCE_NAME_EXTENDED_IRQ 0x89 |
775 | #define ACPI_RDESC_TYPE_EXTENDED_ADDRESS_SPACE 0x8B | 813 | #define ACPI_RESOURCE_NAME_ADDRESS64 0x8A |
814 | #define ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64 0x8B | ||
815 | #define ACPI_RESOURCE_NAME_LARGE_MAX 0x8B | ||
776 | 816 | ||
777 | /***************************************************************************** | 817 | /***************************************************************************** |
778 | * | 818 | * |
@@ -780,7 +820,7 @@ struct acpi_bit_register_info { | |||
780 | * | 820 | * |
781 | ****************************************************************************/ | 821 | ****************************************************************************/ |
782 | 822 | ||
783 | #define ACPI_ASCII_ZERO 0x30 | 823 | #define ACPI_ASCII_ZERO 0x30 |
784 | 824 | ||
785 | /***************************************************************************** | 825 | /***************************************************************************** |
786 | * | 826 | * |
diff --git a/include/acpi/acmacros.h b/include/acpi/acmacros.h index 702cc4e57f5f..f2be2a881730 100644 --- a/include/acpi/acmacros.h +++ b/include/acpi/acmacros.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -60,7 +60,7 @@ | |||
60 | 60 | ||
61 | /* | 61 | /* |
62 | * For 16-bit addresses, we have to assume that the upper 32 bits | 62 | * For 16-bit addresses, we have to assume that the upper 32 bits |
63 | * are zero. | 63 | * (out of 64) are zero. |
64 | */ | 64 | */ |
65 | #define ACPI_LODWORD(l) ((u32)(l)) | 65 | #define ACPI_LODWORD(l) ((u32)(l)) |
66 | #define ACPI_HIDWORD(l) ((u32)(0)) | 66 | #define ACPI_HIDWORD(l) ((u32)(0)) |
@@ -104,30 +104,38 @@ | |||
104 | #define ACPI_FORMAT_UINT64(i) ACPI_HIDWORD(i),ACPI_LODWORD(i) | 104 | #define ACPI_FORMAT_UINT64(i) ACPI_HIDWORD(i),ACPI_LODWORD(i) |
105 | 105 | ||
106 | /* | 106 | /* |
107 | * Extract a byte of data using a pointer. Any more than a byte and we | 107 | * Extract data using a pointer. Any more than a byte and we |
108 | * get into potential aligment issues -- see the STORE macros below | 108 | * get into potential aligment issues -- see the STORE macros below. |
109 | * Use with care. | ||
109 | */ | 110 | */ |
110 | #define ACPI_GET8(addr) (*(u8*)(addr)) | 111 | #define ACPI_GET8(ptr) *ACPI_CAST_PTR (u8, ptr) |
112 | #define ACPI_GET16(ptr) *ACPI_CAST_PTR (u16, ptr) | ||
113 | #define ACPI_GET32(ptr) *ACPI_CAST_PTR (u32, ptr) | ||
114 | #define ACPI_GET64(ptr) *ACPI_CAST_PTR (u64, ptr) | ||
115 | #define ACPI_SET8(ptr) *ACPI_CAST_PTR (u8, ptr) | ||
116 | #define ACPI_SET16(ptr) *ACPI_CAST_PTR (u16, ptr) | ||
117 | #define ACPI_SET32(ptr) *ACPI_CAST_PTR (u32, ptr) | ||
118 | #define ACPI_SET64(ptr) *ACPI_CAST_PTR (u64, ptr) | ||
111 | 119 | ||
112 | /* Pointer arithmetic */ | 120 | /* |
113 | 121 | * Pointer manipulation | |
114 | #define ACPI_PTR_ADD(t,a,b) (t *) (void *)((char *)(a) + (acpi_native_uint)(b)) | 122 | */ |
115 | #define ACPI_PTR_DIFF(a,b) (acpi_native_uint) ((char *)(a) - (char *)(b)) | 123 | #define ACPI_CAST_PTR(t, p) ((t *) (acpi_uintptr_t) (p)) |
124 | #define ACPI_CAST_INDIRECT_PTR(t, p) ((t **) (acpi_uintptr_t) (p)) | ||
125 | #define ACPI_ADD_PTR(t,a,b) ACPI_CAST_PTR (t, (ACPI_CAST_PTR (u8,(a)) + (acpi_native_uint)(b))) | ||
126 | #define ACPI_PTR_DIFF(a,b) (acpi_native_uint) (ACPI_CAST_PTR (u8,(a)) - ACPI_CAST_PTR (u8,(b))) | ||
116 | 127 | ||
117 | /* Pointer/Integer type conversions */ | 128 | /* Pointer/Integer type conversions */ |
118 | 129 | ||
119 | #define ACPI_TO_POINTER(i) ACPI_PTR_ADD (void, (void *) NULL,(acpi_native_uint)i) | 130 | #define ACPI_TO_POINTER(i) ACPI_ADD_PTR (void,(void *) NULL,(acpi_native_uint) i) |
120 | #define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p,(void *) NULL) | 131 | #define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p,(void *) NULL) |
121 | #define ACPI_OFFSET(d,f) (acpi_size) ACPI_PTR_DIFF (&(((d *)0)->f),(void *) NULL) | 132 | #define ACPI_OFFSET(d,f) (acpi_size) ACPI_PTR_DIFF (&(((d *)0)->f),(void *) NULL) |
122 | #define ACPI_FADT_OFFSET(f) ACPI_OFFSET (FADT_DESCRIPTOR, f) | 133 | #define ACPI_FADT_OFFSET(f) ACPI_OFFSET (FADT_DESCRIPTOR, f) |
123 | 134 | ||
124 | #define ACPI_CAST_PTR(t, p) ((t *)(void *)(p)) | ||
125 | #define ACPI_CAST_INDIRECT_PTR(t, p) ((t **)(void *)(p)) | ||
126 | |||
127 | #if ACPI_MACHINE_WIDTH == 16 | 135 | #if ACPI_MACHINE_WIDTH == 16 |
128 | #define ACPI_STORE_POINTER(d,s) ACPI_MOVE_32_TO_32(d,s) | 136 | #define ACPI_STORE_POINTER(d,s) ACPI_MOVE_32_TO_32(d,s) |
129 | #define ACPI_PHYSADDR_TO_PTR(i) (void *)(i) | 137 | #define ACPI_PHYSADDR_TO_PTR(i) (void *)(i) |
130 | #define ACPI_PTR_TO_PHYSADDR(i) (u32) (char *)(i) | 138 | #define ACPI_PTR_TO_PHYSADDR(i) (u32) ACPI_CAST_PTR (u8,(i)) |
131 | #else | 139 | #else |
132 | #define ACPI_PHYSADDR_TO_PTR(i) ACPI_TO_POINTER(i) | 140 | #define ACPI_PHYSADDR_TO_PTR(i) ACPI_TO_POINTER(i) |
133 | #define ACPI_PTR_TO_PHYSADDR(i) ACPI_TO_INTEGER(i) | 141 | #define ACPI_PTR_TO_PHYSADDR(i) ACPI_TO_INTEGER(i) |
@@ -202,7 +210,7 @@ | |||
202 | 210 | ||
203 | #define ACPI_BUFFER_INDEX(buf_len,buf_offset,byte_gran) (buf_offset) | 211 | #define ACPI_BUFFER_INDEX(buf_len,buf_offset,byte_gran) (buf_offset) |
204 | 212 | ||
205 | #ifdef ACPI_MISALIGNED_TRANSFERS | 213 | #ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED |
206 | 214 | ||
207 | /* The hardware supports unaligned transfers, just do the little-endian move */ | 215 | /* The hardware supports unaligned transfers, just do the little-endian move */ |
208 | 216 | ||
@@ -326,11 +334,19 @@ | |||
326 | #define ACPI_MUL_16(a) _ACPI_MUL(a,4) | 334 | #define ACPI_MUL_16(a) _ACPI_MUL(a,4) |
327 | #define ACPI_MOD_16(a) _ACPI_MOD(a,16) | 335 | #define ACPI_MOD_16(a) _ACPI_MOD(a,16) |
328 | 336 | ||
337 | #define ACPI_DIV_32(a) _ACPI_DIV(a,5) | ||
338 | #define ACPI_MUL_32(a) _ACPI_MUL(a,5) | ||
339 | #define ACPI_MOD_32(a) _ACPI_MOD(a,32) | ||
340 | |||
329 | /* | 341 | /* |
330 | * Rounding macros (Power of two boundaries only) | 342 | * Rounding macros (Power of two boundaries only) |
331 | */ | 343 | */ |
332 | #define ACPI_ROUND_DOWN(value,boundary) (((acpi_native_uint)(value)) & (~(((acpi_native_uint) boundary)-1))) | 344 | #define ACPI_ROUND_DOWN(value,boundary) (((acpi_native_uint)(value)) & \ |
333 | #define ACPI_ROUND_UP(value,boundary) ((((acpi_native_uint)(value)) + (((acpi_native_uint) boundary)-1)) & (~(((acpi_native_uint) boundary)-1))) | 345 | (~(((acpi_native_uint) boundary)-1))) |
346 | |||
347 | #define ACPI_ROUND_UP(value,boundary) ((((acpi_native_uint)(value)) + \ | ||
348 | (((acpi_native_uint) boundary)-1)) & \ | ||
349 | (~(((acpi_native_uint) boundary)-1))) | ||
334 | 350 | ||
335 | #define ACPI_ROUND_DOWN_TO_32_BITS(a) ACPI_ROUND_DOWN(a,4) | 351 | #define ACPI_ROUND_DOWN_TO_32_BITS(a) ACPI_ROUND_DOWN(a,4) |
336 | #define ACPI_ROUND_DOWN_TO_64_BITS(a) ACPI_ROUND_DOWN(a,8) | 352 | #define ACPI_ROUND_DOWN_TO_64_BITS(a) ACPI_ROUND_DOWN(a,8) |
@@ -365,6 +381,14 @@ | |||
365 | #define ACPI_REGISTER_PREPARE_BITS(val, pos, mask) ((val << pos) & mask) | 381 | #define ACPI_REGISTER_PREPARE_BITS(val, pos, mask) ((val << pos) & mask) |
366 | #define ACPI_REGISTER_INSERT_VALUE(reg, pos, mask, val) reg = (reg & (~(mask))) | ACPI_REGISTER_PREPARE_BITS(val, pos, mask) | 382 | #define ACPI_REGISTER_INSERT_VALUE(reg, pos, mask, val) reg = (reg & (~(mask))) | ACPI_REGISTER_PREPARE_BITS(val, pos, mask) |
367 | 383 | ||
384 | /* Generate a UUID */ | ||
385 | |||
386 | #define ACPI_INIT_UUID(a,b,c,d0,d1,d2,d3,d4,d5,d6,d7) \ | ||
387 | (a) & 0xFF, ((a) >> 8) & 0xFF, ((a) >> 16) & 0xFF, ((a) >> 24) & 0xFF, \ | ||
388 | (b) & 0xFF, ((b) >> 8) & 0xFF, \ | ||
389 | (c) & 0xFF, ((c) >> 8) & 0xFF, \ | ||
390 | (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) | ||
391 | |||
368 | /* | 392 | /* |
369 | * An struct acpi_namespace_node * can appear in some contexts, | 393 | * An struct acpi_namespace_node * can appear in some contexts, |
370 | * where a pointer to an union acpi_operand_object can also | 394 | * where a pointer to an union acpi_operand_object can also |
@@ -423,57 +447,52 @@ | |||
423 | #define GET_CURRENT_ARG_TYPE(list) (list & ((u32) 0x1F)) | 447 | #define GET_CURRENT_ARG_TYPE(list) (list & ((u32) 0x1F)) |
424 | #define INCREMENT_ARG_LIST(list) (list >>= ((u32) ARG_TYPE_WIDTH)) | 448 | #define INCREMENT_ARG_LIST(list) (list >>= ((u32) ARG_TYPE_WIDTH)) |
425 | 449 | ||
450 | #if defined (ACPI_DEBUG_OUTPUT) || !defined (ACPI_NO_ERROR_MESSAGES) | ||
426 | /* | 451 | /* |
427 | * Reporting macros that are never compiled out | 452 | * Module name is include in both debug and non-debug versions primarily for |
453 | * error messages. The __FILE__ macro is not very useful for this, because it | ||
454 | * often includes the entire pathname to the module | ||
428 | */ | 455 | */ |
429 | #define ACPI_PARAM_LIST(pl) pl | 456 | #define ACPI_MODULE_NAME(name) static char ACPI_UNUSED_VAR *_acpi_module_name = name; |
457 | #else | ||
458 | #define ACPI_MODULE_NAME(name) | ||
459 | #endif | ||
430 | 460 | ||
431 | /* | 461 | /* |
432 | * Error reporting. These versions add callers module and line#. | 462 | * Ascii error messages can be configured out |
433 | * | ||
434 | * Since _acpi_module_name gets compiled out when ACPI_DEBUG_OUTPUT | ||
435 | * isn't defined, only use it in debug mode. | ||
436 | */ | 463 | */ |
437 | #ifdef ACPI_DEBUG_OUTPUT | 464 | #ifndef ACPI_NO_ERROR_MESSAGES |
465 | #define AE_INFO _acpi_module_name, __LINE__ | ||
438 | 466 | ||
439 | #define ACPI_REPORT_INFO(fp) {acpi_ut_report_info(_acpi_module_name,__LINE__,_COMPONENT); \ | 467 | /* |
440 | acpi_os_printf ACPI_PARAM_LIST(fp);} | 468 | * Error reporting. Callers module and line number are inserted by AE_INFO, |
441 | #define ACPI_REPORT_ERROR(fp) {acpi_ut_report_error(_acpi_module_name,__LINE__,_COMPONENT); \ | 469 | * the plist contains a set of parens to allow variable-length lists. |
442 | acpi_os_printf ACPI_PARAM_LIST(fp);} | 470 | * These macros are used for both the debug and non-debug versions of the code. |
443 | #define ACPI_REPORT_WARNING(fp) {acpi_ut_report_warning(_acpi_module_name,__LINE__,_COMPONENT); \ | 471 | */ |
444 | acpi_os_printf ACPI_PARAM_LIST(fp);} | 472 | #define ACPI_INFO(plist) acpi_ut_info plist |
445 | #define ACPI_REPORT_NSERROR(s,e) acpi_ns_report_error(_acpi_module_name,__LINE__,_COMPONENT, s, e); | 473 | #define ACPI_WARNING(plist) acpi_ut_warning plist |
446 | 474 | #define ACPI_EXCEPTION(plist) acpi_ut_exception plist | |
447 | #define ACPI_REPORT_METHOD_ERROR(s,n,p,e) acpi_ns_report_method_error(_acpi_module_name,__LINE__,_COMPONENT, s, n, p, e); | 475 | #define ACPI_ERROR(plist) acpi_ut_error plist |
476 | #define ACPI_ERROR_NAMESPACE(s,e) acpi_ns_report_error (AE_INFO, s, e); | ||
477 | #define ACPI_ERROR_METHOD(s,n,p,e) acpi_ns_report_method_error (AE_INFO, s, n, p, e); | ||
448 | 478 | ||
449 | #else | 479 | #else |
450 | 480 | ||
451 | #define ACPI_REPORT_INFO(fp) {acpi_ut_report_info("ACPI",__LINE__,_COMPONENT); \ | 481 | /* No error messages */ |
452 | acpi_os_printf ACPI_PARAM_LIST(fp);} | ||
453 | #define ACPI_REPORT_ERROR(fp) {acpi_ut_report_error("ACPI",__LINE__,_COMPONENT); \ | ||
454 | acpi_os_printf ACPI_PARAM_LIST(fp);} | ||
455 | #define ACPI_REPORT_WARNING(fp) {acpi_ut_report_warning("ACPI",__LINE__,_COMPONENT); \ | ||
456 | acpi_os_printf ACPI_PARAM_LIST(fp);} | ||
457 | #define ACPI_REPORT_NSERROR(s,e) acpi_ns_report_error("ACPI",__LINE__,_COMPONENT, s, e); | ||
458 | 482 | ||
459 | #define ACPI_REPORT_METHOD_ERROR(s,n,p,e) acpi_ns_report_method_error("ACPI",__LINE__,_COMPONENT, s, n, p, e); | 483 | #define ACPI_INFO(plist) |
484 | #define ACPI_WARNING(plist) | ||
485 | #define ACPI_EXCEPTION(plist) | ||
486 | #define ACPI_ERROR(plist) | ||
487 | #define ACPI_ERROR_NAMESPACE(s,e) | ||
488 | #define ACPI_ERROR_METHOD(s,n,p,e) | ||
460 | 489 | ||
461 | #endif | 490 | #endif |
462 | 491 | ||
463 | /* Error reporting. These versions pass thru the module and line# */ | ||
464 | |||
465 | #define _ACPI_REPORT_INFO(a,b,c,fp) {acpi_ut_report_info(a,b,c); \ | ||
466 | acpi_os_printf ACPI_PARAM_LIST(fp);} | ||
467 | #define _ACPI_REPORT_ERROR(a,b,c,fp) {acpi_ut_report_error(a,b,c); \ | ||
468 | acpi_os_printf ACPI_PARAM_LIST(fp);} | ||
469 | #define _ACPI_REPORT_WARNING(a,b,c,fp) {acpi_ut_report_warning(a,b,c); \ | ||
470 | acpi_os_printf ACPI_PARAM_LIST(fp);} | ||
471 | |||
472 | /* | 492 | /* |
473 | * Debug macros that are conditionally compiled | 493 | * Debug macros that are conditionally compiled |
474 | */ | 494 | */ |
475 | #ifdef ACPI_DEBUG_OUTPUT | 495 | #ifdef ACPI_DEBUG_OUTPUT |
476 | #define ACPI_MODULE_NAME(name) static char ACPI_UNUSED_VAR *_acpi_module_name = name; | ||
477 | 496 | ||
478 | /* | 497 | /* |
479 | * Common parameters used for debug output functions: | 498 | * Common parameters used for debug output functions: |
@@ -509,7 +528,7 @@ | |||
509 | #endif | 528 | #endif |
510 | 529 | ||
511 | #define ACPI_FUNCTION_TRACE(a) ACPI_FUNCTION_NAME(a) \ | 530 | #define ACPI_FUNCTION_TRACE(a) ACPI_FUNCTION_NAME(a) \ |
512 | acpi_ut_trace(ACPI_DEBUG_PARAMETERS) | 531 | acpi_ut_trace(ACPI_DEBUG_PARAMETERS) |
513 | #define ACPI_FUNCTION_TRACE_PTR(a,b) ACPI_FUNCTION_NAME(a) \ | 532 | #define ACPI_FUNCTION_TRACE_PTR(a,b) ACPI_FUNCTION_NAME(a) \ |
514 | acpi_ut_trace_ptr(ACPI_DEBUG_PARAMETERS,(void *)b) | 533 | acpi_ut_trace_ptr(ACPI_DEBUG_PARAMETERS,(void *)b) |
515 | #define ACPI_FUNCTION_TRACE_U32(a,b) ACPI_FUNCTION_NAME(a) \ | 534 | #define ACPI_FUNCTION_TRACE_U32(a,b) ACPI_FUNCTION_NAME(a) \ |
@@ -525,6 +544,9 @@ | |||
525 | * bad form, but having a separate exit macro is very ugly and difficult to maintain. | 544 | * bad form, but having a separate exit macro is very ugly and difficult to maintain. |
526 | * One of the FUNCTION_TRACE macros above must be used in conjunction with these macros | 545 | * One of the FUNCTION_TRACE macros above must be used in conjunction with these macros |
527 | * so that "_acpi_function_name" is defined. | 546 | * so that "_acpi_function_name" is defined. |
547 | * | ||
548 | * Note: the DO_WHILE0 macro is used to prevent some compilers from complaining | ||
549 | * about these constructs. | ||
528 | */ | 550 | */ |
529 | #ifdef ACPI_USE_DO_WHILE_0 | 551 | #ifdef ACPI_USE_DO_WHILE_0 |
530 | #define ACPI_DO_WHILE0(a) do a while(0) | 552 | #define ACPI_DO_WHILE0(a) do a while(0) |
@@ -532,10 +554,55 @@ | |||
532 | #define ACPI_DO_WHILE0(a) a | 554 | #define ACPI_DO_WHILE0(a) a |
533 | #endif | 555 | #endif |
534 | 556 | ||
535 | #define return_VOID ACPI_DO_WHILE0 ({acpi_ut_exit(ACPI_DEBUG_PARAMETERS);return;}) | 557 | #define return_VOID ACPI_DO_WHILE0 ({ \ |
536 | #define return_ACPI_STATUS(s) ACPI_DO_WHILE0 ({acpi_ut_status_exit(ACPI_DEBUG_PARAMETERS,(s));return((s));}) | 558 | acpi_ut_exit (ACPI_DEBUG_PARAMETERS); \ |
537 | #define return_VALUE(s) ACPI_DO_WHILE0 ({acpi_ut_value_exit(ACPI_DEBUG_PARAMETERS,(acpi_integer)(s));return((s));}) | 559 | return;}) |
538 | #define return_PTR(s) ACPI_DO_WHILE0 ({acpi_ut_ptr_exit(ACPI_DEBUG_PARAMETERS,(u8 *)(s));return((s));}) | 560 | /* |
561 | * There are two versions of most of the return macros. The default version is | ||
562 | * safer, since it avoids side-effects by guaranteeing that the argument will | ||
563 | * not be evaluated twice. | ||
564 | * | ||
565 | * A less-safe version of the macros is provided for optional use if the | ||
566 | * compiler uses excessive CPU stack (for example, this may happen in the | ||
567 | * debug case if code optimzation is disabled.) | ||
568 | */ | ||
569 | #ifndef ACPI_SIMPLE_RETURN_MACROS | ||
570 | |||
571 | #define return_ACPI_STATUS(s) ACPI_DO_WHILE0 ({ \ | ||
572 | register acpi_status _s = (s); \ | ||
573 | acpi_ut_status_exit (ACPI_DEBUG_PARAMETERS, _s); \ | ||
574 | return (_s); }) | ||
575 | #define return_PTR(s) ACPI_DO_WHILE0 ({ \ | ||
576 | register void *_s = (void *) (s); \ | ||
577 | acpi_ut_ptr_exit (ACPI_DEBUG_PARAMETERS, (u8 *) _s); \ | ||
578 | return (_s); }) | ||
579 | #define return_VALUE(s) ACPI_DO_WHILE0 ({ \ | ||
580 | register acpi_integer _s = (s); \ | ||
581 | acpi_ut_value_exit (ACPI_DEBUG_PARAMETERS, _s); \ | ||
582 | return (_s); }) | ||
583 | #define return_UINT8(s) ACPI_DO_WHILE0 ({ \ | ||
584 | register u8 _s = (u8) (s); \ | ||
585 | acpi_ut_value_exit (ACPI_DEBUG_PARAMETERS, (acpi_integer) _s); \ | ||
586 | return (_s); }) | ||
587 | #define return_UINT32(s) ACPI_DO_WHILE0 ({ \ | ||
588 | register u32 _s = (u32) (s); \ | ||
589 | acpi_ut_value_exit (ACPI_DEBUG_PARAMETERS, (acpi_integer) _s); \ | ||
590 | return (_s); }) | ||
591 | #else /* Use original less-safe macros */ | ||
592 | |||
593 | #define return_ACPI_STATUS(s) ACPI_DO_WHILE0 ({ \ | ||
594 | acpi_ut_status_exit (ACPI_DEBUG_PARAMETERS, (s)); \ | ||
595 | return((s)); }) | ||
596 | #define return_PTR(s) ACPI_DO_WHILE0 ({ \ | ||
597 | acpi_ut_ptr_exit (ACPI_DEBUG_PARAMETERS, (u8 *) (s)); \ | ||
598 | return((s)); }) | ||
599 | #define return_VALUE(s) ACPI_DO_WHILE0 ({ \ | ||
600 | acpi_ut_value_exit (ACPI_DEBUG_PARAMETERS, (acpi_integer) (s)); \ | ||
601 | return((s)); }) | ||
602 | #define return_UINT8(s) return_VALUE(s) | ||
603 | #define return_UINT32(s) return_VALUE(s) | ||
604 | |||
605 | #endif /* ACPI_SIMPLE_RETURN_MACROS */ | ||
539 | 606 | ||
540 | /* Conditional execution */ | 607 | /* Conditional execution */ |
541 | 608 | ||
@@ -555,18 +622,6 @@ | |||
555 | #define ACPI_DUMP_PATHNAME(a,b,c,d) acpi_ns_dump_pathname(a,b,c,d) | 622 | #define ACPI_DUMP_PATHNAME(a,b,c,d) acpi_ns_dump_pathname(a,b,c,d) |
556 | #define ACPI_DUMP_RESOURCE_LIST(a) acpi_rs_dump_resource_list(a) | 623 | #define ACPI_DUMP_RESOURCE_LIST(a) acpi_rs_dump_resource_list(a) |
557 | #define ACPI_DUMP_BUFFER(a,b) acpi_ut_dump_buffer((u8 *)a,b,DB_BYTE_DISPLAY,_COMPONENT) | 624 | #define ACPI_DUMP_BUFFER(a,b) acpi_ut_dump_buffer((u8 *)a,b,DB_BYTE_DISPLAY,_COMPONENT) |
558 | #define ACPI_BREAK_MSG(a) acpi_os_signal (ACPI_SIGNAL_BREAKPOINT,(a)) | ||
559 | |||
560 | /* | ||
561 | * Generate INT3 on ACPI_ERROR (Debug only!) | ||
562 | */ | ||
563 | #define ACPI_ERROR_BREAK | ||
564 | #ifdef ACPI_ERROR_BREAK | ||
565 | #define ACPI_BREAK_ON_ERROR(lvl) if ((lvl)&ACPI_ERROR) \ | ||
566 | acpi_os_signal(ACPI_SIGNAL_BREAKPOINT,"Fatal error encountered\n") | ||
567 | #else | ||
568 | #define ACPI_BREAK_ON_ERROR(lvl) | ||
569 | #endif | ||
570 | 625 | ||
571 | /* | 626 | /* |
572 | * Master debug print macros | 627 | * Master debug print macros |
@@ -574,17 +629,14 @@ | |||
574 | * 1) Debug print for the current component is enabled | 629 | * 1) Debug print for the current component is enabled |
575 | * 2) Debug error level or trace level for the print statement is enabled | 630 | * 2) Debug error level or trace level for the print statement is enabled |
576 | */ | 631 | */ |
577 | #define ACPI_DEBUG_PRINT(pl) acpi_ut_debug_print ACPI_PARAM_LIST(pl) | 632 | #define ACPI_DEBUG_PRINT(plist) acpi_ut_debug_print plist |
578 | #define ACPI_DEBUG_PRINT_RAW(pl) acpi_ut_debug_print_raw ACPI_PARAM_LIST(pl) | 633 | #define ACPI_DEBUG_PRINT_RAW(plist) acpi_ut_debug_print_raw plist |
579 | 634 | ||
580 | #else | 635 | #else |
581 | /* | 636 | /* |
582 | * This is the non-debug case -- make everything go away, | 637 | * This is the non-debug case -- make everything go away, |
583 | * leaving no executable debug code! | 638 | * leaving no executable debug code! |
584 | */ | 639 | */ |
585 | #define ACPI_MODULE_NAME(name) | ||
586 | #define _acpi_module_name "" | ||
587 | |||
588 | #define ACPI_DEBUG_EXEC(a) | 640 | #define ACPI_DEBUG_EXEC(a) |
589 | #define ACPI_NORMAL_EXEC(a) a; | 641 | #define ACPI_NORMAL_EXEC(a) a; |
590 | 642 | ||
@@ -607,11 +659,12 @@ | |||
607 | #define ACPI_DUMP_BUFFER(a,b) | 659 | #define ACPI_DUMP_BUFFER(a,b) |
608 | #define ACPI_DEBUG_PRINT(pl) | 660 | #define ACPI_DEBUG_PRINT(pl) |
609 | #define ACPI_DEBUG_PRINT_RAW(pl) | 661 | #define ACPI_DEBUG_PRINT_RAW(pl) |
610 | #define ACPI_BREAK_MSG(a) | ||
611 | 662 | ||
612 | #define return_VOID return | 663 | #define return_VOID return |
613 | #define return_ACPI_STATUS(s) return(s) | 664 | #define return_ACPI_STATUS(s) return(s) |
614 | #define return_VALUE(s) return(s) | 665 | #define return_VALUE(s) return(s) |
666 | #define return_UINT8(s) return(s) | ||
667 | #define return_UINT32(s) return(s) | ||
615 | #define return_PTR(s) return(s) | 668 | #define return_PTR(s) return(s) |
616 | 669 | ||
617 | #endif | 670 | #endif |
diff --git a/include/acpi/acnames.h b/include/acpi/acnames.h index 4f9063f3e951..b67da3636899 100644 --- a/include/acpi/acnames.h +++ b/include/acpi/acnames.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/acnamesp.h b/include/acpi/acnamesp.h index dd3501f7e5d6..b667a804fc8a 100644 --- a/include/acpi/acnamesp.h +++ b/include/acpi/acnamesp.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -263,13 +263,11 @@ u32 acpi_ns_local(acpi_object_type type); | |||
263 | void | 263 | void |
264 | acpi_ns_report_error(char *module_name, | 264 | acpi_ns_report_error(char *module_name, |
265 | u32 line_number, | 265 | u32 line_number, |
266 | u32 component_id, | ||
267 | char *internal_name, acpi_status lookup_status); | 266 | char *internal_name, acpi_status lookup_status); |
268 | 267 | ||
269 | void | 268 | void |
270 | acpi_ns_report_method_error(char *module_name, | 269 | acpi_ns_report_method_error(char *module_name, |
271 | u32 line_number, | 270 | u32 line_number, |
272 | u32 component_id, | ||
273 | char *message, | 271 | char *message, |
274 | struct acpi_namespace_node *node, | 272 | struct acpi_namespace_node *node, |
275 | char *path, acpi_status lookup_status); | 273 | char *path, acpi_status lookup_status); |
diff --git a/include/acpi/acobject.h b/include/acpi/acobject.h index 4a326ba6d482..d130cfed8d55 100644 --- a/include/acpi/acobject.h +++ b/include/acpi/acobject.h | |||
@@ -6,7 +6,7 @@ | |||
6 | *****************************************************************************/ | 6 | *****************************************************************************/ |
7 | 7 | ||
8 | /* | 8 | /* |
9 | * Copyright (C) 2000 - 2005, R. Byron Moore | 9 | * Copyright (C) 2000 - 2006, R. Byron Moore |
10 | * All rights reserved. | 10 | * All rights reserved. |
11 | * | 11 | * |
12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without |
@@ -69,7 +69,7 @@ | |||
69 | u8 type; /* acpi_object_type */\ | 69 | u8 type; /* acpi_object_type */\ |
70 | u16 reference_count; /* For object deletion management */\ | 70 | u16 reference_count; /* For object deletion management */\ |
71 | union acpi_operand_object *next_object; /* Objects linked to parent NS node */\ | 71 | union acpi_operand_object *next_object; /* Objects linked to parent NS node */\ |
72 | u8 flags; \ | 72 | u8 flags; |
73 | 73 | ||
74 | /* Values for flag byte above */ | 74 | /* Values for flag byte above */ |
75 | 75 | ||
diff --git a/include/acpi/acopcode.h b/include/acpi/acopcode.h index 64da42992199..e6d78bd9e90a 100644 --- a/include/acpi/acopcode.h +++ b/include/acpi/acopcode.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/acoutput.h b/include/acpi/acoutput.h index 68d7edf0f697..7785d481dc3e 100644 --- a/include/acpi/acoutput.h +++ b/include/acpi/acoutput.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -137,13 +137,19 @@ | |||
137 | 137 | ||
138 | /* Exception level -- used in the global "debug_level" */ | 138 | /* Exception level -- used in the global "debug_level" */ |
139 | 139 | ||
140 | #define ACPI_DB_ERROR ACPI_DEBUG_LEVEL (ACPI_LV_ERROR) | ||
141 | #define ACPI_DB_WARN ACPI_DEBUG_LEVEL (ACPI_LV_WARN) | ||
142 | #define ACPI_DB_INIT ACPI_DEBUG_LEVEL (ACPI_LV_INIT) | 140 | #define ACPI_DB_INIT ACPI_DEBUG_LEVEL (ACPI_LV_INIT) |
143 | #define ACPI_DB_DEBUG_OBJECT ACPI_DEBUG_LEVEL (ACPI_LV_DEBUG_OBJECT) | 141 | #define ACPI_DB_DEBUG_OBJECT ACPI_DEBUG_LEVEL (ACPI_LV_DEBUG_OBJECT) |
144 | #define ACPI_DB_INFO ACPI_DEBUG_LEVEL (ACPI_LV_INFO) | 142 | #define ACPI_DB_INFO ACPI_DEBUG_LEVEL (ACPI_LV_INFO) |
145 | #define ACPI_DB_ALL_EXCEPTIONS ACPI_DEBUG_LEVEL (ACPI_LV_ALL_EXCEPTIONS) | 143 | #define ACPI_DB_ALL_EXCEPTIONS ACPI_DEBUG_LEVEL (ACPI_LV_ALL_EXCEPTIONS) |
146 | 144 | ||
145 | /* | ||
146 | * These two levels are essentially obsolete, all instances in the | ||
147 | * ACPICA core code have been replaced by REPORT_ERROR and REPORT_WARNING | ||
148 | * (Kept here because some drivers may still use them) | ||
149 | */ | ||
150 | #define ACPI_DB_ERROR ACPI_DEBUG_LEVEL (ACPI_LV_ERROR) | ||
151 | #define ACPI_DB_WARN ACPI_DEBUG_LEVEL (ACPI_LV_WARN) | ||
152 | |||
147 | /* Trace level -- also used in the global "debug_level" */ | 153 | /* Trace level -- also used in the global "debug_level" */ |
148 | 154 | ||
149 | #define ACPI_DB_INIT_NAMES ACPI_DEBUG_LEVEL (ACPI_LV_INIT_NAMES) | 155 | #define ACPI_DB_INIT_NAMES ACPI_DEBUG_LEVEL (ACPI_LV_INIT_NAMES) |
diff --git a/include/acpi/acparser.h b/include/acpi/acparser.h index d352d40de1f3..5a1ff484af33 100644 --- a/include/acpi/acparser.h +++ b/include/acpi/acparser.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/acpi.h b/include/acpi/acpi.h index ccf34f9dac64..b9a39d1009bd 100644 --- a/include/acpi/acpi.h +++ b/include/acpi/acpi.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h index c1b4e1f882e4..b425f9bb6d43 100644 --- a/include/acpi/acpi_drivers.h +++ b/include/acpi/acpi_drivers.h | |||
@@ -52,8 +52,8 @@ | |||
52 | /* ACPI PCI Interrupt Link (pci_link.c) */ | 52 | /* ACPI PCI Interrupt Link (pci_link.c) */ |
53 | 53 | ||
54 | int acpi_irq_penalty_init(void); | 54 | int acpi_irq_penalty_init(void); |
55 | int acpi_pci_link_allocate_irq(acpi_handle handle, int index, int *edge_level, | 55 | int acpi_pci_link_allocate_irq(acpi_handle handle, int index, int *triggering, |
56 | int *active_high_low, char **name); | 56 | int *polarity, char **name); |
57 | int acpi_pci_link_free_irq(acpi_handle handle); | 57 | int acpi_pci_link_free_irq(acpi_handle handle); |
58 | 58 | ||
59 | /* ACPI PCI Interrupt Routing (pci_irq.c) */ | 59 | /* ACPI PCI Interrupt Routing (pci_irq.c) */ |
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h index 98e0b8cd14ed..970e9a6372c3 100644 --- a/include/acpi/acpiosxf.h +++ b/include/acpi/acpiosxf.h | |||
@@ -8,7 +8,7 @@ | |||
8 | *****************************************************************************/ | 8 | *****************************************************************************/ |
9 | 9 | ||
10 | /* | 10 | /* |
11 | * Copyright (C) 2000 - 2005, R. Byron Moore | 11 | * Copyright (C) 2000 - 2006, R. Byron Moore |
12 | * All rights reserved. | 12 | * All rights reserved. |
13 | * | 13 | * |
14 | * Redistribution and use in source and binary forms, with or without | 14 | * Redistribution and use in source and binary forms, with or without |
@@ -108,9 +108,9 @@ acpi_status acpi_os_create_lock(acpi_handle * out_handle); | |||
108 | 108 | ||
109 | void acpi_os_delete_lock(acpi_handle handle); | 109 | void acpi_os_delete_lock(acpi_handle handle); |
110 | 110 | ||
111 | unsigned long acpi_os_acquire_lock(acpi_handle handle); | 111 | acpi_cpu_flags acpi_os_acquire_lock(acpi_handle handle); |
112 | 112 | ||
113 | void acpi_os_release_lock(acpi_handle handle, unsigned long flags); | 113 | void acpi_os_release_lock(acpi_handle handle, acpi_cpu_flags flags); |
114 | 114 | ||
115 | /* | 115 | /* |
116 | * Memory allocation and mapping | 116 | * Memory allocation and mapping |
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 2a9dbc13b0f2..66cf2ecef57a 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h | |||
@@ -6,7 +6,7 @@ | |||
6 | *****************************************************************************/ | 6 | *****************************************************************************/ |
7 | 7 | ||
8 | /* | 8 | /* |
9 | * Copyright (C) 2000 - 2005, R. Byron Moore | 9 | * Copyright (C) 2000 - 2006, R. Byron Moore |
10 | * All rights reserved. | 10 | * All rights reserved. |
11 | * | 11 | * |
12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without |
@@ -149,6 +149,9 @@ acpi_detach_data(acpi_handle obj_handle, acpi_object_handler handler); | |||
149 | acpi_status | 149 | acpi_status |
150 | acpi_get_data(acpi_handle obj_handle, acpi_object_handler handler, void **data); | 150 | acpi_get_data(acpi_handle obj_handle, acpi_object_handler handler, void **data); |
151 | 151 | ||
152 | acpi_status | ||
153 | acpi_debug_trace(char *name, u32 debug_level, u32 debug_layer, u32 flags); | ||
154 | |||
152 | /* | 155 | /* |
153 | * Object manipulation and enumeration | 156 | * Object manipulation and enumeration |
154 | */ | 157 | */ |
@@ -269,6 +272,12 @@ acpi_status(*ACPI_WALK_RESOURCE_CALLBACK) (struct acpi_resource * resource, | |||
269 | void *context); | 272 | void *context); |
270 | 273 | ||
271 | acpi_status | 274 | acpi_status |
275 | acpi_get_vendor_resource(acpi_handle device_handle, | ||
276 | char *name, | ||
277 | struct acpi_vendor_uuid *uuid, | ||
278 | struct acpi_buffer *ret_buffer); | ||
279 | |||
280 | acpi_status | ||
272 | acpi_get_current_resources(acpi_handle device_handle, | 281 | acpi_get_current_resources(acpi_handle device_handle, |
273 | struct acpi_buffer *ret_buffer); | 282 | struct acpi_buffer *ret_buffer); |
274 | 283 | ||
@@ -280,7 +289,7 @@ acpi_get_possible_resources(acpi_handle device_handle, | |||
280 | 289 | ||
281 | acpi_status | 290 | acpi_status |
282 | acpi_walk_resources(acpi_handle device_handle, | 291 | acpi_walk_resources(acpi_handle device_handle, |
283 | char *path, | 292 | char *name, |
284 | ACPI_WALK_RESOURCE_CALLBACK user_function, void *context); | 293 | ACPI_WALK_RESOURCE_CALLBACK user_function, void *context); |
285 | 294 | ||
286 | acpi_status | 295 | acpi_status |
diff --git a/include/acpi/acresrc.h b/include/acpi/acresrc.h index 38e798b05d08..fa02e8083381 100644 --- a/include/acpi/acresrc.h +++ b/include/acpi/acresrc.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -44,216 +44,284 @@ | |||
44 | #ifndef __ACRESRC_H__ | 44 | #ifndef __ACRESRC_H__ |
45 | #define __ACRESRC_H__ | 45 | #define __ACRESRC_H__ |
46 | 46 | ||
47 | /* | 47 | /* Need the AML resource descriptor structs */ |
48 | * Function prototypes called from Acpi* APIs | ||
49 | */ | ||
50 | acpi_status | ||
51 | acpi_rs_get_prt_method_data(acpi_handle handle, struct acpi_buffer *ret_buffer); | ||
52 | 48 | ||
53 | acpi_status | 49 | #include "amlresrc.h" |
54 | acpi_rs_get_crs_method_data(acpi_handle handle, struct acpi_buffer *ret_buffer); | ||
55 | 50 | ||
56 | #ifdef ACPI_FUTURE_USAGE | 51 | /* |
57 | acpi_status | 52 | * If possible, pack the following structures to byte alignment, since we |
58 | acpi_rs_get_prs_method_data(acpi_handle handle, struct acpi_buffer *ret_buffer); | 53 | * don't care about performance for debug output |
59 | #endif /* ACPI_FUTURE_USAGE */ | 54 | */ |
60 | 55 | #ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED | |
61 | acpi_status | 56 | #pragma pack(1) |
62 | acpi_rs_get_method_data(acpi_handle handle, | 57 | #endif |
63 | char *path, struct acpi_buffer *ret_buffer); | ||
64 | 58 | ||
65 | acpi_status | 59 | /* |
66 | acpi_rs_set_srs_method_data(acpi_handle handle, struct acpi_buffer *ret_buffer); | 60 | * Individual entry for the resource conversion tables |
61 | */ | ||
62 | typedef const struct acpi_rsconvert_info { | ||
63 | u8 opcode; | ||
64 | u8 resource_offset; | ||
65 | u8 aml_offset; | ||
66 | u8 value; | ||
67 | |||
68 | } acpi_rsconvert_info; | ||
69 | |||
70 | /* Resource conversion opcodes */ | ||
71 | |||
72 | #define ACPI_RSC_INITGET 0 | ||
73 | #define ACPI_RSC_INITSET 1 | ||
74 | #define ACPI_RSC_FLAGINIT 2 | ||
75 | #define ACPI_RSC_1BITFLAG 3 | ||
76 | #define ACPI_RSC_2BITFLAG 4 | ||
77 | #define ACPI_RSC_COUNT 5 | ||
78 | #define ACPI_RSC_COUNT16 6 | ||
79 | #define ACPI_RSC_LENGTH 7 | ||
80 | #define ACPI_RSC_MOVE8 8 | ||
81 | #define ACPI_RSC_MOVE16 9 | ||
82 | #define ACPI_RSC_MOVE32 10 | ||
83 | #define ACPI_RSC_MOVE64 11 | ||
84 | #define ACPI_RSC_SET8 12 | ||
85 | #define ACPI_RSC_DATA8 13 | ||
86 | #define ACPI_RSC_ADDRESS 14 | ||
87 | #define ACPI_RSC_SOURCE 15 | ||
88 | #define ACPI_RSC_SOURCEX 16 | ||
89 | #define ACPI_RSC_BITMASK 17 | ||
90 | #define ACPI_RSC_BITMASK16 18 | ||
91 | #define ACPI_RSC_EXIT_NE 19 | ||
92 | #define ACPI_RSC_EXIT_LE 20 | ||
93 | |||
94 | /* Resource Conversion sub-opcodes */ | ||
95 | |||
96 | #define ACPI_RSC_COMPARE_AML_LENGTH 0 | ||
97 | #define ACPI_RSC_COMPARE_VALUE 1 | ||
98 | |||
99 | #define ACPI_RSC_TABLE_SIZE(d) (sizeof (d) / sizeof (struct acpi_rsconvert_info)) | ||
100 | |||
101 | #define ACPI_RS_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_resource,f) | ||
102 | #define AML_OFFSET(f) (u8) ACPI_OFFSET (union aml_resource,f) | ||
103 | |||
104 | typedef const struct acpi_rsdump_info { | ||
105 | u8 opcode; | ||
106 | u8 offset; | ||
107 | char *name; | ||
108 | const char **pointer; | ||
109 | |||
110 | } acpi_rsdump_info; | ||
111 | |||
112 | /* Values for the Opcode field above */ | ||
113 | |||
114 | #define ACPI_RSD_TITLE 0 | ||
115 | #define ACPI_RSD_LITERAL 1 | ||
116 | #define ACPI_RSD_STRING 2 | ||
117 | #define ACPI_RSD_UINT8 3 | ||
118 | #define ACPI_RSD_UINT16 4 | ||
119 | #define ACPI_RSD_UINT32 5 | ||
120 | #define ACPI_RSD_UINT64 6 | ||
121 | #define ACPI_RSD_1BITFLAG 7 | ||
122 | #define ACPI_RSD_2BITFLAG 8 | ||
123 | #define ACPI_RSD_SHORTLIST 9 | ||
124 | #define ACPI_RSD_LONGLIST 10 | ||
125 | #define ACPI_RSD_DWORDLIST 11 | ||
126 | #define ACPI_RSD_ADDRESS 12 | ||
127 | #define ACPI_RSD_SOURCE 13 | ||
128 | |||
129 | /* restore default alignment */ | ||
130 | |||
131 | #pragma pack() | ||
132 | |||
133 | /* Resource tables indexed by internal resource type */ | ||
134 | |||
135 | extern const u8 acpi_gbl_aml_resource_sizes[]; | ||
136 | extern struct acpi_rsconvert_info *acpi_gbl_set_resource_dispatch[]; | ||
137 | |||
138 | /* Resource tables indexed by raw AML resource descriptor type */ | ||
139 | |||
140 | extern const u8 acpi_gbl_resource_struct_sizes[]; | ||
141 | extern struct acpi_rsconvert_info *acpi_gbl_get_resource_dispatch[]; | ||
142 | |||
143 | struct acpi_vendor_walk_info { | ||
144 | struct acpi_vendor_uuid *uuid; | ||
145 | struct acpi_buffer *buffer; | ||
146 | acpi_status status; | ||
147 | }; | ||
67 | 148 | ||
149 | /* | ||
150 | * rscreate | ||
151 | */ | ||
68 | acpi_status | 152 | acpi_status |
69 | acpi_rs_create_resource_list(union acpi_operand_object *byte_stream_buffer, | 153 | acpi_rs_create_resource_list(union acpi_operand_object *aml_buffer, |
70 | struct acpi_buffer *output_buffer); | 154 | struct acpi_buffer *output_buffer); |
71 | 155 | ||
72 | acpi_status | 156 | acpi_status |
73 | acpi_rs_create_byte_stream(struct acpi_resource *linked_list_buffer, | 157 | acpi_rs_create_aml_resources(struct acpi_resource *linked_list_buffer, |
74 | struct acpi_buffer *output_buffer); | 158 | struct acpi_buffer *output_buffer); |
75 | 159 | ||
76 | acpi_status | 160 | acpi_status |
77 | acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object, | 161 | acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object, |
78 | struct acpi_buffer *output_buffer); | 162 | struct acpi_buffer *output_buffer); |
79 | 163 | ||
80 | /* | 164 | /* |
81 | * rsdump | 165 | * rsutils |
82 | */ | 166 | */ |
83 | #ifdef ACPI_FUTURE_USAGE | ||
84 | void acpi_rs_dump_resource_list(struct acpi_resource *resource); | ||
85 | |||
86 | void acpi_rs_dump_irq_list(u8 * route_table); | ||
87 | #endif /* ACPI_FUTURE_USAGE */ | ||
88 | |||
89 | /* | ||
90 | * rscalc | ||
91 | */ | ||
92 | acpi_status | ||
93 | acpi_rs_get_byte_stream_start(u8 * byte_stream_buffer, | ||
94 | u8 ** byte_stream_start, u32 * size); | ||
95 | |||
96 | acpi_status | ||
97 | acpi_rs_get_list_length(u8 * byte_stream_buffer, | ||
98 | u32 byte_stream_buffer_length, acpi_size * size_needed); | ||
99 | |||
100 | acpi_status | ||
101 | acpi_rs_get_byte_stream_length(struct acpi_resource *linked_list_buffer, | ||
102 | acpi_size * size_needed); | ||
103 | |||
104 | acpi_status | ||
105 | acpi_rs_get_pci_routing_table_length(union acpi_operand_object *package_object, | ||
106 | acpi_size * buffer_size_needed); | ||
107 | |||
108 | acpi_status | ||
109 | acpi_rs_byte_stream_to_list(u8 * byte_stream_buffer, | ||
110 | u32 byte_stream_buffer_length, u8 * output_buffer); | ||
111 | |||
112 | acpi_status | ||
113 | acpi_rs_list_to_byte_stream(struct acpi_resource *linked_list, | ||
114 | acpi_size byte_stream_size_needed, | ||
115 | u8 * output_buffer); | ||
116 | |||
117 | acpi_status | ||
118 | acpi_rs_io_resource(u8 * byte_stream_buffer, | ||
119 | acpi_size * bytes_consumed, | ||
120 | u8 ** output_buffer, acpi_size * structure_size); | ||
121 | |||
122 | acpi_status | ||
123 | acpi_rs_fixed_io_resource(u8 * byte_stream_buffer, | ||
124 | acpi_size * bytes_consumed, | ||
125 | u8 ** output_buffer, acpi_size * structure_size); | ||
126 | |||
127 | acpi_status | 167 | acpi_status |
128 | acpi_rs_io_stream(struct acpi_resource *linked_list, | 168 | acpi_rs_get_prt_method_data(acpi_handle handle, struct acpi_buffer *ret_buffer); |
129 | u8 ** output_buffer, acpi_size * bytes_consumed); | ||
130 | |||
131 | acpi_status | ||
132 | acpi_rs_fixed_io_stream(struct acpi_resource *linked_list, | ||
133 | u8 ** output_buffer, acpi_size * bytes_consumed); | ||
134 | |||
135 | acpi_status | ||
136 | acpi_rs_irq_resource(u8 * byte_stream_buffer, | ||
137 | acpi_size * bytes_consumed, | ||
138 | u8 ** output_buffer, acpi_size * structure_size); | ||
139 | |||
140 | acpi_status | ||
141 | acpi_rs_irq_stream(struct acpi_resource *linked_list, | ||
142 | u8 ** output_buffer, acpi_size * bytes_consumed); | ||
143 | |||
144 | acpi_status | ||
145 | acpi_rs_dma_resource(u8 * byte_stream_buffer, | ||
146 | acpi_size * bytes_consumed, | ||
147 | u8 ** output_buffer, acpi_size * structure_size); | ||
148 | 169 | ||
149 | acpi_status | 170 | acpi_status |
150 | acpi_rs_dma_stream(struct acpi_resource *linked_list, | 171 | acpi_rs_get_crs_method_data(acpi_handle handle, struct acpi_buffer *ret_buffer); |
151 | u8 ** output_buffer, acpi_size * bytes_consumed); | ||
152 | 172 | ||
173 | #ifdef ACPI_FUTURE_USAGE | ||
153 | acpi_status | 174 | acpi_status |
154 | acpi_rs_address16_resource(u8 * byte_stream_buffer, | 175 | acpi_rs_get_prs_method_data(acpi_handle handle, struct acpi_buffer *ret_buffer); |
155 | acpi_size * bytes_consumed, | 176 | #endif /* ACPI_FUTURE_USAGE */ |
156 | u8 ** output_buffer, acpi_size * structure_size); | ||
157 | 177 | ||
158 | acpi_status | 178 | acpi_status |
159 | acpi_rs_address16_stream(struct acpi_resource *linked_list, | 179 | acpi_rs_get_method_data(acpi_handle handle, |
160 | u8 ** output_buffer, acpi_size * bytes_consumed); | 180 | char *path, struct acpi_buffer *ret_buffer); |
161 | 181 | ||
162 | acpi_status | 182 | acpi_status |
163 | acpi_rs_address32_resource(u8 * byte_stream_buffer, | 183 | acpi_rs_set_srs_method_data(acpi_handle handle, struct acpi_buffer *ret_buffer); |
164 | acpi_size * bytes_consumed, | ||
165 | u8 ** output_buffer, acpi_size * structure_size); | ||
166 | 184 | ||
185 | /* | ||
186 | * rscalc | ||
187 | */ | ||
167 | acpi_status | 188 | acpi_status |
168 | acpi_rs_address32_stream(struct acpi_resource *linked_list, | 189 | acpi_rs_get_list_length(u8 * aml_buffer, |
169 | u8 ** output_buffer, acpi_size * bytes_consumed); | 190 | u32 aml_buffer_length, acpi_size * size_needed); |
170 | 191 | ||
171 | acpi_status | 192 | acpi_status |
172 | acpi_rs_address64_resource(u8 * byte_stream_buffer, | 193 | acpi_rs_get_aml_length(struct acpi_resource *linked_list_buffer, |
173 | acpi_size * bytes_consumed, | 194 | acpi_size * size_needed); |
174 | u8 ** output_buffer, acpi_size * structure_size); | ||
175 | 195 | ||
176 | acpi_status | 196 | acpi_status |
177 | acpi_rs_address64_stream(struct acpi_resource *linked_list, | 197 | acpi_rs_get_pci_routing_table_length(union acpi_operand_object *package_object, |
178 | u8 ** output_buffer, acpi_size * bytes_consumed); | 198 | acpi_size * buffer_size_needed); |
179 | 199 | ||
180 | acpi_status | 200 | acpi_status |
181 | acpi_rs_start_depend_fns_resource(u8 * byte_stream_buffer, | 201 | acpi_rs_convert_aml_to_resources(u8 * aml_buffer, |
182 | acpi_size * bytes_consumed, | 202 | u32 aml_buffer_length, u8 * output_buffer); |
183 | u8 ** output_buffer, | ||
184 | acpi_size * structure_size); | ||
185 | 203 | ||
186 | acpi_status | 204 | acpi_status |
187 | acpi_rs_end_depend_fns_resource(u8 * byte_stream_buffer, | 205 | acpi_rs_convert_resources_to_aml(struct acpi_resource *resource, |
188 | acpi_size * bytes_consumed, | 206 | acpi_size aml_size_needed, u8 * output_buffer); |
189 | u8 ** output_buffer, | ||
190 | acpi_size * structure_size); | ||
191 | 207 | ||
192 | acpi_status | 208 | /* |
193 | acpi_rs_start_depend_fns_stream(struct acpi_resource *linked_list, | 209 | * rsaddr |
194 | u8 ** output_buffer, | 210 | */ |
195 | acpi_size * bytes_consumed); | 211 | void |
212 | acpi_rs_set_address_common(union aml_resource *aml, | ||
213 | struct acpi_resource *resource); | ||
196 | 214 | ||
197 | acpi_status | 215 | u8 |
198 | acpi_rs_end_depend_fns_stream(struct acpi_resource *linked_list, | 216 | acpi_rs_get_address_common(struct acpi_resource *resource, |
199 | u8 ** output_buffer, acpi_size * bytes_consumed); | 217 | union aml_resource *aml); |
200 | 218 | ||
219 | /* | ||
220 | * rsmisc | ||
221 | */ | ||
201 | acpi_status | 222 | acpi_status |
202 | acpi_rs_memory24_resource(u8 * byte_stream_buffer, | 223 | acpi_rs_convert_aml_to_resource(struct acpi_resource *resource, |
203 | acpi_size * bytes_consumed, | 224 | union aml_resource *aml, |
204 | u8 ** output_buffer, acpi_size * structure_size); | 225 | struct acpi_rsconvert_info *info); |
205 | 226 | ||
206 | acpi_status | 227 | acpi_status |
207 | acpi_rs_memory24_stream(struct acpi_resource *linked_list, | 228 | acpi_rs_convert_resource_to_aml(struct acpi_resource *resource, |
208 | u8 ** output_buffer, acpi_size * bytes_consumed); | 229 | union aml_resource *aml, |
230 | struct acpi_rsconvert_info *info); | ||
209 | 231 | ||
210 | acpi_status | 232 | /* |
211 | acpi_rs_memory32_range_resource(u8 * byte_stream_buffer, | 233 | * rsutils |
212 | acpi_size * bytes_consumed, | 234 | */ |
213 | u8 ** output_buffer, | 235 | void |
214 | acpi_size * structure_size); | 236 | acpi_rs_move_data(void *destination, |
237 | void *source, u16 item_count, u8 move_type); | ||
215 | 238 | ||
216 | acpi_status | 239 | u8 acpi_rs_decode_bitmask(u16 mask, u8 * list); |
217 | acpi_rs_fixed_memory32_resource(u8 * byte_stream_buffer, | ||
218 | acpi_size * bytes_consumed, | ||
219 | u8 ** output_buffer, | ||
220 | acpi_size * structure_size); | ||
221 | 240 | ||
222 | acpi_status | 241 | u16 acpi_rs_encode_bitmask(u8 * list, u8 count); |
223 | acpi_rs_memory32_range_stream(struct acpi_resource *linked_list, | ||
224 | u8 ** output_buffer, acpi_size * bytes_consumed); | ||
225 | 242 | ||
226 | acpi_status | 243 | acpi_rs_length |
227 | acpi_rs_fixed_memory32_stream(struct acpi_resource *linked_list, | 244 | acpi_rs_get_resource_source(acpi_rs_length resource_length, |
228 | u8 ** output_buffer, acpi_size * bytes_consumed); | 245 | acpi_rs_length minimum_length, |
246 | struct acpi_resource_source *resource_source, | ||
247 | union aml_resource *aml, char *string_ptr); | ||
229 | 248 | ||
230 | acpi_status | 249 | acpi_rsdesc_size |
231 | acpi_rs_extended_irq_resource(u8 * byte_stream_buffer, | 250 | acpi_rs_set_resource_source(union aml_resource *aml, |
232 | acpi_size * bytes_consumed, | 251 | acpi_rs_length minimum_length, |
233 | u8 ** output_buffer, acpi_size * structure_size); | 252 | struct acpi_resource_source *resource_source); |
234 | 253 | ||
235 | acpi_status | 254 | void |
236 | acpi_rs_extended_irq_stream(struct acpi_resource *linked_list, | 255 | acpi_rs_set_resource_header(u8 descriptor_type, |
237 | u8 ** output_buffer, acpi_size * bytes_consumed); | 256 | acpi_rsdesc_size total_length, |
257 | union aml_resource *aml); | ||
238 | 258 | ||
239 | acpi_status | 259 | void |
240 | acpi_rs_end_tag_resource(u8 * byte_stream_buffer, | 260 | acpi_rs_set_resource_length(acpi_rsdesc_size total_length, |
241 | acpi_size * bytes_consumed, | 261 | union aml_resource *aml); |
242 | u8 ** output_buffer, acpi_size * structure_size); | ||
243 | 262 | ||
244 | acpi_status | 263 | /* |
245 | acpi_rs_end_tag_stream(struct acpi_resource *linked_list, | 264 | * rsdump |
246 | u8 ** output_buffer, acpi_size * bytes_consumed); | 265 | */ |
266 | void acpi_rs_dump_resource_list(struct acpi_resource *resource); | ||
247 | 267 | ||
248 | acpi_status | 268 | void acpi_rs_dump_irq_list(u8 * route_table); |
249 | acpi_rs_vendor_resource(u8 * byte_stream_buffer, | ||
250 | acpi_size * bytes_consumed, | ||
251 | u8 ** output_buffer, acpi_size * structure_size); | ||
252 | 269 | ||
253 | acpi_status | 270 | /* |
254 | acpi_rs_vendor_stream(struct acpi_resource *linked_list, | 271 | * Resource conversion tables |
255 | u8 ** output_buffer, acpi_size * bytes_consumed); | 272 | */ |
273 | extern struct acpi_rsconvert_info acpi_rs_convert_dma[]; | ||
274 | extern struct acpi_rsconvert_info acpi_rs_convert_end_dpf[]; | ||
275 | extern struct acpi_rsconvert_info acpi_rs_convert_io[]; | ||
276 | extern struct acpi_rsconvert_info acpi_rs_convert_fixed_io[]; | ||
277 | extern struct acpi_rsconvert_info acpi_rs_convert_end_tag[]; | ||
278 | extern struct acpi_rsconvert_info acpi_rs_convert_memory24[]; | ||
279 | extern struct acpi_rsconvert_info acpi_rs_convert_generic_reg[]; | ||
280 | extern struct acpi_rsconvert_info acpi_rs_convert_memory32[]; | ||
281 | extern struct acpi_rsconvert_info acpi_rs_convert_fixed_memory32[]; | ||
282 | extern struct acpi_rsconvert_info acpi_rs_convert_address32[]; | ||
283 | extern struct acpi_rsconvert_info acpi_rs_convert_address16[]; | ||
284 | extern struct acpi_rsconvert_info acpi_rs_convert_ext_irq[]; | ||
285 | extern struct acpi_rsconvert_info acpi_rs_convert_address64[]; | ||
286 | extern struct acpi_rsconvert_info acpi_rs_convert_ext_address64[]; | ||
287 | |||
288 | /* These resources require separate get/set tables */ | ||
289 | |||
290 | extern struct acpi_rsconvert_info acpi_rs_get_irq[]; | ||
291 | extern struct acpi_rsconvert_info acpi_rs_get_start_dpf[]; | ||
292 | extern struct acpi_rsconvert_info acpi_rs_get_vendor_small[]; | ||
293 | extern struct acpi_rsconvert_info acpi_rs_get_vendor_large[]; | ||
294 | |||
295 | extern struct acpi_rsconvert_info acpi_rs_set_irq[]; | ||
296 | extern struct acpi_rsconvert_info acpi_rs_set_start_dpf[]; | ||
297 | extern struct acpi_rsconvert_info acpi_rs_set_vendor[]; | ||
298 | |||
299 | #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) | ||
300 | /* | ||
301 | * rsinfo | ||
302 | */ | ||
303 | extern struct acpi_rsdump_info *acpi_gbl_dump_resource_dispatch[]; | ||
256 | 304 | ||
257 | u8 acpi_rs_get_resource_type(u8 resource_start_byte); | 305 | /* |
306 | * rsdump | ||
307 | */ | ||
308 | extern struct acpi_rsdump_info acpi_rs_dump_irq[]; | ||
309 | extern struct acpi_rsdump_info acpi_rs_dump_dma[]; | ||
310 | extern struct acpi_rsdump_info acpi_rs_dump_start_dpf[]; | ||
311 | extern struct acpi_rsdump_info acpi_rs_dump_end_dpf[]; | ||
312 | extern struct acpi_rsdump_info acpi_rs_dump_io[]; | ||
313 | extern struct acpi_rsdump_info acpi_rs_dump_fixed_io[]; | ||
314 | extern struct acpi_rsdump_info acpi_rs_dump_vendor[]; | ||
315 | extern struct acpi_rsdump_info acpi_rs_dump_end_tag[]; | ||
316 | extern struct acpi_rsdump_info acpi_rs_dump_memory24[]; | ||
317 | extern struct acpi_rsdump_info acpi_rs_dump_memory32[]; | ||
318 | extern struct acpi_rsdump_info acpi_rs_dump_fixed_memory32[]; | ||
319 | extern struct acpi_rsdump_info acpi_rs_dump_address16[]; | ||
320 | extern struct acpi_rsdump_info acpi_rs_dump_address32[]; | ||
321 | extern struct acpi_rsdump_info acpi_rs_dump_address64[]; | ||
322 | extern struct acpi_rsdump_info acpi_rs_dump_ext_address64[]; | ||
323 | extern struct acpi_rsdump_info acpi_rs_dump_ext_irq[]; | ||
324 | extern struct acpi_rsdump_info acpi_rs_dump_generic_reg[]; | ||
325 | #endif | ||
258 | 326 | ||
259 | #endif /* __ACRESRC_H__ */ | 327 | #endif /* __ACRESRC_H__ */ |
diff --git a/include/acpi/acstruct.h b/include/acpi/acstruct.h index 99d235339801..d8c1c2cdac0c 100644 --- a/include/acpi/acstruct.h +++ b/include/acpi/acstruct.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/actables.h b/include/acpi/actables.h index f92c1858b808..30a47542e1c8 100644 --- a/include/acpi/actables.h +++ b/include/acpi/actables.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h index a46f406e1c94..ed53f842dad4 100644 --- a/include/acpi/actbl.h +++ b/include/acpi/actbl.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -45,6 +45,12 @@ | |||
45 | #define __ACTBL_H__ | 45 | #define __ACTBL_H__ |
46 | 46 | ||
47 | /* | 47 | /* |
48 | * Note about bitfields: The u8 type is used for bitfields in ACPI tables. | ||
49 | * This is the only type that is even remotely portable. Anything else is not | ||
50 | * portable, so do not use any other bitfield types. | ||
51 | */ | ||
52 | |||
53 | /* | ||
48 | * Values for description table header signatures | 54 | * Values for description table header signatures |
49 | */ | 55 | */ |
50 | #define RSDP_NAME "RSDP" | 56 | #define RSDP_NAME "RSDP" |
diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h index 67312c3a915a..cd428d57add0 100644 --- a/include/acpi/actbl1.h +++ b/include/acpi/actbl1.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index 50305ce2681a..dfc7ac1094bb 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 6213b27516e8..7ca89cde706e 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -44,7 +44,15 @@ | |||
44 | #ifndef __ACTYPES_H__ | 44 | #ifndef __ACTYPES_H__ |
45 | #define __ACTYPES_H__ | 45 | #define __ACTYPES_H__ |
46 | 46 | ||
47 | /*! [Begin] no source code translation (keep the typedefs) */ | 47 | /* |
48 | * ACPI_MACHINE_WIDTH must be specified in an OS- or compiler-dependent header | ||
49 | * and must be either 16, 32, or 64 | ||
50 | */ | ||
51 | #ifndef ACPI_MACHINE_WIDTH | ||
52 | #error ACPI_MACHINE_WIDTH not defined | ||
53 | #endif | ||
54 | |||
55 | /*! [Begin] no source code translation */ | ||
48 | 56 | ||
49 | /* | 57 | /* |
50 | * Data type ranges | 58 | * Data type ranges |
@@ -58,87 +66,150 @@ | |||
58 | #define ACPI_UINT64_MAX (UINT64)(~((UINT64) 0)) /* 0xFFFFFFFFFFFFFFFF */ | 66 | #define ACPI_UINT64_MAX (UINT64)(~((UINT64) 0)) /* 0xFFFFFFFFFFFFFFFF */ |
59 | #define ACPI_ASCII_MAX 0x7F | 67 | #define ACPI_ASCII_MAX 0x7F |
60 | 68 | ||
61 | #ifdef DEFINE_ALTERNATE_TYPES | ||
62 | /* | 69 | /* |
63 | * Types used only in translated source, defined here to enable | 70 | * Architecture-specific ACPICA Subsystem Data Types |
64 | * cross-platform compilation only. | 71 | * |
72 | * The goal of these types is to provide source code portability across | ||
73 | * 16-bit, 32-bit, and 64-bit targets. | ||
74 | * | ||
75 | * 1) The following types are of fixed size for all targets (16/32/64): | ||
76 | * | ||
77 | * BOOLEAN Logical boolean | ||
78 | * | ||
79 | * UINT8 8-bit (1 byte) unsigned value | ||
80 | * UINT16 16-bit (2 byte) unsigned value | ||
81 | * UINT32 32-bit (4 byte) unsigned value | ||
82 | * UINT64 64-bit (8 byte) unsigned value | ||
83 | * | ||
84 | * INT16 16-bit (2 byte) signed value | ||
85 | * INT32 32-bit (4 byte) signed value | ||
86 | * INT64 64-bit (8 byte) signed value | ||
87 | * | ||
88 | * COMPILER_DEPENDENT_UINT64/INT64 - These types are defined in the | ||
89 | * compiler-dependent header(s) and were introduced because there is no common | ||
90 | * 64-bit integer type across the various compilation models, as shown in | ||
91 | * the table below. | ||
92 | * | ||
93 | * Datatype LP64 ILP64 LLP64 ILP32 LP32 16bit | ||
94 | * char 8 8 8 8 8 8 | ||
95 | * short 16 16 16 16 16 16 | ||
96 | * _int32 32 | ||
97 | * int 32 64 32 32 16 16 | ||
98 | * long 64 64 32 32 32 32 | ||
99 | * long long 64 64 | ||
100 | * pointer 64 64 64 32 32 32 | ||
101 | * | ||
102 | * Note: ILP64 and LP32 are currently not supported. | ||
103 | * | ||
104 | * | ||
105 | * 2) These types represent the native word size of the target mode of the | ||
106 | * processor, and may be 16-bit, 32-bit, or 64-bit as required. They are | ||
107 | * usually used for memory allocation, efficient loop counters, and array | ||
108 | * indexes. The types are similar to the size_t type in the C library and are | ||
109 | * required because there is no C type that consistently represents the native | ||
110 | * data width. | ||
111 | * | ||
112 | * ACPI_SIZE 16/32/64-bit unsigned value | ||
113 | * ACPI_NATIVE_UINT 16/32/64-bit unsigned value | ||
114 | * ACPI_NATIVE_INT 16/32/64-bit signed value | ||
115 | * | ||
65 | */ | 116 | */ |
66 | typedef int s32; | ||
67 | typedef unsigned char u8; | ||
68 | typedef unsigned short u16; | ||
69 | typedef unsigned int u32; | ||
70 | typedef COMPILER_DEPENDENT_UINT64 u64; | ||
71 | |||
72 | #endif | ||
73 | 117 | ||
74 | /* | 118 | /******************************************************************************* |
75 | * Data types - Fixed across all compilation models (16/32/64) | ||
76 | * | 119 | * |
77 | * BOOLEAN Logical Boolean. | 120 | * Common types for all compilers, all targets |
78 | * INT8 8-bit (1 byte) signed value | 121 | * |
79 | * UINT8 8-bit (1 byte) unsigned value | 122 | ******************************************************************************/ |
80 | * INT16 16-bit (2 byte) signed value | ||
81 | * UINT16 16-bit (2 byte) unsigned value | ||
82 | * INT32 32-bit (4 byte) signed value | ||
83 | * UINT32 32-bit (4 byte) unsigned value | ||
84 | * INT64 64-bit (8 byte) signed value | ||
85 | * UINT64 64-bit (8 byte) unsigned value | ||
86 | * ACPI_NATIVE_INT 32-bit on IA-32, 64-bit on IA-64 signed value | ||
87 | * ACPI_NATIVE_UINT 32-bit on IA-32, 64-bit on IA-64 unsigned value | ||
88 | */ | ||
89 | 123 | ||
90 | #ifndef ACPI_MACHINE_WIDTH | 124 | typedef unsigned char BOOLEAN; |
91 | #error ACPI_MACHINE_WIDTH not defined | 125 | typedef unsigned char UINT8; |
92 | #endif | 126 | typedef unsigned short UINT16; |
127 | typedef COMPILER_DEPENDENT_UINT64 UINT64; | ||
128 | typedef COMPILER_DEPENDENT_INT64 INT64; | ||
129 | |||
130 | /*! [End] no source code translation !*/ | ||
131 | |||
132 | /******************************************************************************* | ||
133 | * | ||
134 | * Types specific to 64-bit targets | ||
135 | * | ||
136 | ******************************************************************************/ | ||
93 | 137 | ||
94 | #if ACPI_MACHINE_WIDTH == 64 | 138 | #if ACPI_MACHINE_WIDTH == 64 |
95 | 139 | ||
96 | /*! [Begin] no source code translation (keep the typedefs) */ | 140 | /*! [Begin] no source code translation (keep the typedefs as-is) */ |
97 | 141 | ||
98 | /* | ||
99 | * 64-bit type definitions | ||
100 | */ | ||
101 | typedef unsigned char UINT8; | ||
102 | typedef unsigned char BOOLEAN; | ||
103 | typedef unsigned short UINT16; | ||
104 | typedef int INT32; | ||
105 | typedef unsigned int UINT32; | 142 | typedef unsigned int UINT32; |
106 | typedef COMPILER_DEPENDENT_INT64 INT64; | 143 | typedef int INT32; |
107 | typedef COMPILER_DEPENDENT_UINT64 UINT64; | ||
108 | 144 | ||
109 | /*! [End] no source code translation !*/ | 145 | /*! [End] no source code translation !*/ |
110 | 146 | ||
111 | typedef s64 acpi_native_int; | ||
112 | typedef u64 acpi_native_uint; | 147 | typedef u64 acpi_native_uint; |
148 | typedef s64 acpi_native_int; | ||
113 | 149 | ||
114 | typedef u64 acpi_table_ptr; | 150 | typedef u64 acpi_table_ptr; |
115 | typedef u64 acpi_io_address; | 151 | typedef u64 acpi_io_address; |
116 | typedef u64 acpi_physical_address; | 152 | typedef u64 acpi_physical_address; |
117 | typedef u64 acpi_size; | ||
118 | 153 | ||
119 | #define ALIGNED_ADDRESS_BOUNDARY 0x00000008 /* No hardware alignment support in IA64 */ | ||
120 | #define ACPI_USE_NATIVE_DIVIDE /* Native 64-bit integer support */ | ||
121 | #define ACPI_MAX_PTR ACPI_UINT64_MAX | 154 | #define ACPI_MAX_PTR ACPI_UINT64_MAX |
122 | #define ACPI_SIZE_MAX ACPI_UINT64_MAX | 155 | #define ACPI_SIZE_MAX ACPI_UINT64_MAX |
123 | 156 | ||
124 | #elif ACPI_MACHINE_WIDTH == 16 | 157 | #define ALIGNED_ADDRESS_BOUNDARY 0x00000008 |
125 | 158 | #define ACPI_USE_NATIVE_DIVIDE /* Has native 64-bit integer support */ | |
126 | /*! [Begin] no source code translation (keep the typedefs) */ | ||
127 | 159 | ||
128 | /* | 160 | /* |
129 | * 16-bit type definitions | 161 | * In the case of the Itanium Processor Family (IPF), the hardware does not |
162 | * support misaligned memory transfers. Set the MISALIGNMENT_NOT_SUPPORTED flag | ||
163 | * to indicate that special precautions must be taken to avoid alignment faults. | ||
164 | * (IA64 or ia64 is currently used by existing compilers to indicate IPF.) | ||
165 | * | ||
166 | * Note: Em64_t and other X86-64 processors support misaligned transfers, | ||
167 | * so there is no need to define this flag. | ||
130 | */ | 168 | */ |
131 | typedef unsigned char UINT8; | 169 | #if defined (__IA64__) || defined (__ia64__) |
132 | typedef unsigned char BOOLEAN; | 170 | #define ACPI_MISALIGNMENT_NOT_SUPPORTED |
133 | typedef unsigned int UINT16; | 171 | #endif |
134 | typedef long INT32; | ||
135 | typedef int INT16; | ||
136 | typedef unsigned long UINT32; | ||
137 | 172 | ||
138 | struct { | 173 | /******************************************************************************* |
139 | UINT32 Lo; | 174 | * |
140 | UINT32 Hi; | 175 | * Types specific to 32-bit targets |
141 | }; | 176 | * |
177 | ******************************************************************************/ | ||
178 | |||
179 | #elif ACPI_MACHINE_WIDTH == 32 | ||
180 | |||
181 | /*! [Begin] no source code translation (keep the typedefs as-is) */ | ||
182 | |||
183 | typedef unsigned int UINT32; | ||
184 | typedef int INT32; | ||
185 | |||
186 | /*! [End] no source code translation !*/ | ||
187 | |||
188 | typedef u32 acpi_native_uint; | ||
189 | typedef s32 acpi_native_int; | ||
190 | |||
191 | typedef u64 acpi_table_ptr; | ||
192 | typedef u32 acpi_io_address; | ||
193 | typedef u64 acpi_physical_address; | ||
194 | |||
195 | #define ACPI_MAX_PTR ACPI_UINT32_MAX | ||
196 | #define ACPI_SIZE_MAX ACPI_UINT32_MAX | ||
197 | |||
198 | #define ALIGNED_ADDRESS_BOUNDARY 0x00000004 | ||
199 | |||
200 | /******************************************************************************* | ||
201 | * | ||
202 | * Types specific to 16-bit targets | ||
203 | * | ||
204 | ******************************************************************************/ | ||
205 | |||
206 | #elif ACPI_MACHINE_WIDTH == 16 | ||
207 | |||
208 | /*! [Begin] no source code translation (keep the typedefs as-is) */ | ||
209 | |||
210 | typedef unsigned long UINT32; | ||
211 | typedef short INT16; | ||
212 | typedef long INT32; | ||
142 | 213 | ||
143 | /*! [End] no source code translation !*/ | 214 | /*! [End] no source code translation !*/ |
144 | 215 | ||
@@ -148,61 +219,84 @@ typedef s16 acpi_native_int; | |||
148 | typedef u32 acpi_table_ptr; | 219 | typedef u32 acpi_table_ptr; |
149 | typedef u32 acpi_io_address; | 220 | typedef u32 acpi_io_address; |
150 | typedef char *acpi_physical_address; | 221 | typedef char *acpi_physical_address; |
151 | typedef u16 acpi_size; | ||
152 | 222 | ||
153 | #define ALIGNED_ADDRESS_BOUNDARY 0x00000002 | ||
154 | #define ACPI_MISALIGNED_TRANSFERS | ||
155 | #define ACPI_USE_NATIVE_DIVIDE /* No 64-bit integers, ok to use native divide */ | ||
156 | #define ACPI_MAX_PTR ACPI_UINT16_MAX | 223 | #define ACPI_MAX_PTR ACPI_UINT16_MAX |
157 | #define ACPI_SIZE_MAX ACPI_UINT16_MAX | 224 | #define ACPI_SIZE_MAX ACPI_UINT16_MAX |
158 | 225 | ||
159 | /* | 226 | #define ALIGNED_ADDRESS_BOUNDARY 0x00000002 |
160 | * (16-bit only) internal integers must be 32-bits, so | 227 | #define ACPI_USE_NATIVE_DIVIDE /* No 64-bit integers, ok to use native divide */ |
161 | * 64-bit integers cannot be supported | 228 | |
162 | */ | 229 | /* 64-bit integers cannot be supported */ |
230 | |||
163 | #define ACPI_NO_INTEGER64_SUPPORT | 231 | #define ACPI_NO_INTEGER64_SUPPORT |
164 | 232 | ||
165 | #elif ACPI_MACHINE_WIDTH == 32 | 233 | #else |
166 | 234 | ||
167 | /*! [Begin] no source code translation (keep the typedefs) */ | 235 | /* ACPI_MACHINE_WIDTH must be either 64, 32, or 16 */ |
168 | 236 | ||
169 | /* | 237 | #error unknown ACPI_MACHINE_WIDTH |
170 | * 32-bit type definitions (default) | 238 | #endif |
171 | */ | ||
172 | typedef unsigned char UINT8; | ||
173 | typedef unsigned char BOOLEAN; | ||
174 | typedef unsigned short UINT16; | ||
175 | typedef int INT32; | ||
176 | typedef unsigned int UINT32; | ||
177 | typedef COMPILER_DEPENDENT_INT64 INT64; | ||
178 | typedef COMPILER_DEPENDENT_UINT64 UINT64; | ||
179 | 239 | ||
180 | /*! [End] no source code translation !*/ | 240 | /* Variable-width type, used instead of clib size_t */ |
181 | 241 | ||
182 | typedef s32 acpi_native_int; | 242 | typedef acpi_native_uint acpi_size; |
183 | typedef u32 acpi_native_uint; | ||
184 | 243 | ||
185 | typedef u64 acpi_table_ptr; | 244 | /******************************************************************************* |
186 | typedef u32 acpi_io_address; | 245 | * |
187 | typedef u64 acpi_physical_address; | 246 | * OS- or compiler-dependent types |
188 | typedef u32 acpi_size; | 247 | * |
248 | * If the defaults below are not appropriate for the host system, they can | ||
249 | * be defined in the compiler-specific or OS-specific header, and this will | ||
250 | * take precedence. | ||
251 | * | ||
252 | ******************************************************************************/ | ||
189 | 253 | ||
190 | #define ALIGNED_ADDRESS_BOUNDARY 0x00000004 | 254 | /* Use C99 uintptr_t for pointer casting if available, "void *" otherwise */ |
191 | #define ACPI_MISALIGNED_TRANSFERS | ||
192 | #define ACPI_MAX_PTR ACPI_UINT32_MAX | ||
193 | #define ACPI_SIZE_MAX ACPI_UINT32_MAX | ||
194 | 255 | ||
195 | #else | 256 | #ifndef acpi_uintptr_t |
196 | #error unknown ACPI_MACHINE_WIDTH | 257 | #define acpi_uintptr_t void * |
197 | #endif | 258 | #endif |
198 | 259 | ||
199 | /* | 260 | /* |
200 | * This type is used for bitfields in ACPI tables. The only type that is | 261 | * If acpi_cache_t was not defined in the OS-dependent header, |
201 | * even remotely portable is u8. Anything else is not portable, so | 262 | * define it now. This is typically the case where the local cache |
202 | * do not add any more bitfield types. | 263 | * manager implementation is to be used (ACPI_USE_LOCAL_CACHE) |
264 | */ | ||
265 | #ifndef acpi_cache_t | ||
266 | #define acpi_cache_t struct acpi_memory_list | ||
267 | #endif | ||
268 | |||
269 | /* | ||
270 | * Allow the CPU flags word to be defined per-OS to simplify the use of the | ||
271 | * lock and unlock OSL interfaces. | ||
272 | */ | ||
273 | #ifndef acpi_cpu_flags | ||
274 | #define acpi_cpu_flags acpi_native_uint | ||
275 | #endif | ||
276 | |||
277 | /* | ||
278 | * ACPI_PRINTF_LIKE is used to tag functions as "printf-like" because | ||
279 | * some compilers can catch printf format string problems | ||
203 | */ | 280 | */ |
204 | typedef u8 UINT8_BIT; | 281 | #ifndef ACPI_PRINTF_LIKE |
205 | typedef acpi_native_uint ACPI_PTRDIFF; | 282 | #define ACPI_PRINTF_LIKE(c) |
283 | #endif | ||
284 | |||
285 | /* | ||
286 | * Some compilers complain about unused variables. Sometimes we don't want to | ||
287 | * use all the variables (for example, _acpi_module_name). This allows us | ||
288 | * to to tell the compiler in a per-variable manner that a variable | ||
289 | * is unused | ||
290 | */ | ||
291 | #ifndef ACPI_UNUSED_VAR | ||
292 | #define ACPI_UNUSED_VAR | ||
293 | #endif | ||
294 | |||
295 | /******************************************************************************* | ||
296 | * | ||
297 | * Independent types | ||
298 | * | ||
299 | ******************************************************************************/ | ||
206 | 300 | ||
207 | /* | 301 | /* |
208 | * Pointer overlays to avoid lots of typecasting for | 302 | * Pointer overlays to avoid lots of typecasting for |
@@ -234,18 +328,8 @@ struct acpi_pointer { | |||
234 | #define ACPI_LOGMODE_PHYSPTR ACPI_LOGICAL_ADDRESSING | ACPI_PHYSICAL_POINTER | 328 | #define ACPI_LOGMODE_PHYSPTR ACPI_LOGICAL_ADDRESSING | ACPI_PHYSICAL_POINTER |
235 | #define ACPI_LOGMODE_LOGPTR ACPI_LOGICAL_ADDRESSING | ACPI_LOGICAL_POINTER | 329 | #define ACPI_LOGMODE_LOGPTR ACPI_LOGICAL_ADDRESSING | ACPI_LOGICAL_POINTER |
236 | 330 | ||
237 | /* | 331 | /* Logical defines and NULL */ |
238 | * If acpi_cache_t was not defined in the OS-dependent header, | ||
239 | * define it now. This is typically the case where the local cache | ||
240 | * manager implementation is to be used (ACPI_USE_LOCAL_CACHE) | ||
241 | */ | ||
242 | #ifndef acpi_cache_t | ||
243 | #define acpi_cache_t struct acpi_memory_list | ||
244 | #endif | ||
245 | 332 | ||
246 | /* | ||
247 | * Useful defines | ||
248 | */ | ||
249 | #ifdef FALSE | 333 | #ifdef FALSE |
250 | #undef FALSE | 334 | #undef FALSE |
251 | #endif | 335 | #endif |
@@ -261,12 +345,12 @@ struct acpi_pointer { | |||
261 | #endif | 345 | #endif |
262 | 346 | ||
263 | /* | 347 | /* |
264 | * Local datatypes | 348 | * Mescellaneous types |
265 | */ | 349 | */ |
266 | typedef u32 acpi_status; /* All ACPI Exceptions */ | 350 | typedef u32 acpi_status; /* All ACPI Exceptions */ |
267 | typedef u32 acpi_name; /* 4-byte ACPI name */ | 351 | typedef u32 acpi_name; /* 4-byte ACPI name */ |
268 | typedef char *acpi_string; /* Null terminated ASCII string */ | 352 | typedef char *acpi_string; /* Null terminated ASCII string */ |
269 | typedef void *acpi_handle; /* Actually a ptr to an Node */ | 353 | typedef void *acpi_handle; /* Actually a ptr to a NS Node */ |
270 | 354 | ||
271 | struct uint64_struct { | 355 | struct uint64_struct { |
272 | u32 lo; | 356 | u32 lo; |
@@ -323,7 +407,7 @@ typedef u64 acpi_integer; | |||
323 | /* | 407 | /* |
324 | * Constants with special meanings | 408 | * Constants with special meanings |
325 | */ | 409 | */ |
326 | #define ACPI_ROOT_OBJECT (acpi_handle) ACPI_PTR_ADD (char, NULL, ACPI_MAX_PTR) | 410 | #define ACPI_ROOT_OBJECT ACPI_ADD_PTR (acpi_handle, NULL, ACPI_MAX_PTR) |
327 | 411 | ||
328 | /* | 412 | /* |
329 | * Initialization sequence | 413 | * Initialization sequence |
@@ -470,37 +554,6 @@ typedef u32 acpi_object_type; | |||
470 | #define ACPI_TYPE_NOT_FOUND 0xFF | 554 | #define ACPI_TYPE_NOT_FOUND 0xFF |
471 | 555 | ||
472 | /* | 556 | /* |
473 | * Bitmapped ACPI types. Used internally only | ||
474 | */ | ||
475 | #define ACPI_BTYPE_ANY 0x00000000 | ||
476 | #define ACPI_BTYPE_INTEGER 0x00000001 | ||
477 | #define ACPI_BTYPE_STRING 0x00000002 | ||
478 | #define ACPI_BTYPE_BUFFER 0x00000004 | ||
479 | #define ACPI_BTYPE_PACKAGE 0x00000008 | ||
480 | #define ACPI_BTYPE_FIELD_UNIT 0x00000010 | ||
481 | #define ACPI_BTYPE_DEVICE 0x00000020 | ||
482 | #define ACPI_BTYPE_EVENT 0x00000040 | ||
483 | #define ACPI_BTYPE_METHOD 0x00000080 | ||
484 | #define ACPI_BTYPE_MUTEX 0x00000100 | ||
485 | #define ACPI_BTYPE_REGION 0x00000200 | ||
486 | #define ACPI_BTYPE_POWER 0x00000400 | ||
487 | #define ACPI_BTYPE_PROCESSOR 0x00000800 | ||
488 | #define ACPI_BTYPE_THERMAL 0x00001000 | ||
489 | #define ACPI_BTYPE_BUFFER_FIELD 0x00002000 | ||
490 | #define ACPI_BTYPE_DDB_HANDLE 0x00004000 | ||
491 | #define ACPI_BTYPE_DEBUG_OBJECT 0x00008000 | ||
492 | #define ACPI_BTYPE_REFERENCE 0x00010000 | ||
493 | #define ACPI_BTYPE_RESOURCE 0x00020000 | ||
494 | |||
495 | #define ACPI_BTYPE_COMPUTE_DATA (ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING | ACPI_BTYPE_BUFFER) | ||
496 | |||
497 | #define ACPI_BTYPE_DATA (ACPI_BTYPE_COMPUTE_DATA | ACPI_BTYPE_PACKAGE) | ||
498 | #define ACPI_BTYPE_DATA_REFERENCE (ACPI_BTYPE_DATA | ACPI_BTYPE_REFERENCE | ACPI_BTYPE_DDB_HANDLE) | ||
499 | #define ACPI_BTYPE_DEVICE_OBJECTS (ACPI_BTYPE_DEVICE | ACPI_BTYPE_THERMAL | ACPI_BTYPE_PROCESSOR) | ||
500 | #define ACPI_BTYPE_OBJECTS_AND_REFS 0x0001FFFF /* ARG or LOCAL */ | ||
501 | #define ACPI_BTYPE_ALL_OBJECTS 0x0000FFFF | ||
502 | |||
503 | /* | ||
504 | * All I/O | 557 | * All I/O |
505 | */ | 558 | */ |
506 | #define ACPI_READ 0 | 559 | #define ACPI_READ 0 |
@@ -853,6 +906,14 @@ struct acpi_compatible_id_list { | |||
853 | #define ACPI_VALID_CID 0x0010 | 906 | #define ACPI_VALID_CID 0x0010 |
854 | #define ACPI_VALID_SXDS 0x0020 | 907 | #define ACPI_VALID_SXDS 0x0020 |
855 | 908 | ||
909 | /* Flags for _STA method */ | ||
910 | |||
911 | #define ACPI_STA_DEVICE_PRESENT 0x01 | ||
912 | #define ACPI_STA_DEVICE_ENABLED 0x02 | ||
913 | #define ACPI_STA_DEVICE_UI 0x04 | ||
914 | #define ACPI_STA_DEVICE_OK 0x08 | ||
915 | #define ACPI_STA_BATTERY_PRESENT 0x10 | ||
916 | |||
856 | #define ACPI_COMMON_OBJ_INFO \ | 917 | #define ACPI_COMMON_OBJ_INFO \ |
857 | acpi_object_type type; /* ACPI object type */ \ | 918 | acpi_object_type type; /* ACPI object type */ \ |
858 | acpi_name name /* ACPI object Name */ | 919 | acpi_name name /* ACPI object Name */ |
@@ -895,6 +956,8 @@ struct acpi_mem_space_context { | |||
895 | /* | 956 | /* |
896 | * Definitions for Resource Attributes | 957 | * Definitions for Resource Attributes |
897 | */ | 958 | */ |
959 | typedef u16 acpi_rs_length; /* Resource Length field is fixed at 16 bits */ | ||
960 | typedef u32 acpi_rsdesc_size; /* Max Resource Descriptor size is (length+3) = (64_k-1)+3 */ | ||
898 | 961 | ||
899 | /* | 962 | /* |
900 | * Memory Attributes | 963 | * Memory Attributes |
@@ -916,7 +979,9 @@ struct acpi_mem_space_context { | |||
916 | #define ACPI_ISA_ONLY_RANGES (u8) 0x02 | 979 | #define ACPI_ISA_ONLY_RANGES (u8) 0x02 |
917 | #define ACPI_ENTIRE_RANGE (ACPI_NON_ISA_ONLY_RANGES | ACPI_ISA_ONLY_RANGES) | 980 | #define ACPI_ENTIRE_RANGE (ACPI_NON_ISA_ONLY_RANGES | ACPI_ISA_ONLY_RANGES) |
918 | 981 | ||
919 | #define ACPI_SPARSE_TRANSLATION (u8) 0x03 | 982 | /* Type of translation - 1=Sparse, 0=Dense */ |
983 | |||
984 | #define ACPI_SPARSE_TRANSLATION (u8) 0x01 | ||
920 | 985 | ||
921 | /* | 986 | /* |
922 | * IO Port Descriptor Decode | 987 | * IO Port Descriptor Decode |
@@ -927,8 +992,8 @@ struct acpi_mem_space_context { | |||
927 | /* | 992 | /* |
928 | * IRQ Attributes | 993 | * IRQ Attributes |
929 | */ | 994 | */ |
930 | #define ACPI_EDGE_SENSITIVE (u8) 0x00 | 995 | #define ACPI_LEVEL_SENSITIVE (u8) 0x00 |
931 | #define ACPI_LEVEL_SENSITIVE (u8) 0x01 | 996 | #define ACPI_EDGE_SENSITIVE (u8) 0x01 |
932 | 997 | ||
933 | #define ACPI_ACTIVE_HIGH (u8) 0x00 | 998 | #define ACPI_ACTIVE_HIGH (u8) 0x00 |
934 | #define ACPI_ACTIVE_LOW (u8) 0x01 | 999 | #define ACPI_ACTIVE_LOW (u8) 0x01 |
@@ -975,27 +1040,45 @@ struct acpi_mem_space_context { | |||
975 | #define ACPI_CONSUMER (u8) 0x01 | 1040 | #define ACPI_CONSUMER (u8) 0x01 |
976 | 1041 | ||
977 | /* | 1042 | /* |
1043 | * If possible, pack the following structures to byte alignment | ||
1044 | */ | ||
1045 | #ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED | ||
1046 | #pragma pack(1) | ||
1047 | #endif | ||
1048 | |||
1049 | /* UUID data structures for use in vendor-defined resource descriptors */ | ||
1050 | |||
1051 | struct acpi_uuid { | ||
1052 | u8 data[ACPI_UUID_LENGTH]; | ||
1053 | }; | ||
1054 | |||
1055 | struct acpi_vendor_uuid { | ||
1056 | u8 subtype; | ||
1057 | u8 data[ACPI_UUID_LENGTH]; | ||
1058 | }; | ||
1059 | |||
1060 | /* | ||
978 | * Structures used to describe device resources | 1061 | * Structures used to describe device resources |
979 | */ | 1062 | */ |
980 | struct acpi_resource_irq { | 1063 | struct acpi_resource_irq { |
981 | u32 edge_level; | 1064 | u8 triggering; |
982 | u32 active_high_low; | 1065 | u8 polarity; |
983 | u32 shared_exclusive; | 1066 | u8 sharable; |
984 | u32 number_of_interrupts; | 1067 | u8 interrupt_count; |
985 | u32 interrupts[1]; | 1068 | u8 interrupts[1]; |
986 | }; | 1069 | }; |
987 | 1070 | ||
988 | struct acpi_resource_dma { | 1071 | struct acpi_resource_dma { |
989 | u32 type; | 1072 | u8 type; |
990 | u32 bus_master; | 1073 | u8 bus_master; |
991 | u32 transfer; | 1074 | u8 transfer; |
992 | u32 number_of_channels; | 1075 | u8 channel_count; |
993 | u32 channels[1]; | 1076 | u8 channels[1]; |
994 | }; | 1077 | }; |
995 | 1078 | ||
996 | struct acpi_resource_start_dpf { | 1079 | struct acpi_resource_start_dependent { |
997 | u32 compatibility_priority; | 1080 | u8 compatibility_priority; |
998 | u32 performance_robustness; | 1081 | u8 performance_robustness; |
999 | }; | 1082 | }; |
1000 | 1083 | ||
1001 | /* | 1084 | /* |
@@ -1004,179 +1087,217 @@ struct acpi_resource_start_dpf { | |||
1004 | */ | 1087 | */ |
1005 | 1088 | ||
1006 | struct acpi_resource_io { | 1089 | struct acpi_resource_io { |
1007 | u32 io_decode; | 1090 | u8 io_decode; |
1008 | u32 min_base_address; | 1091 | u8 alignment; |
1009 | u32 max_base_address; | 1092 | u8 address_length; |
1010 | u32 alignment; | 1093 | u16 minimum; |
1011 | u32 range_length; | 1094 | u16 maximum; |
1012 | }; | 1095 | }; |
1013 | 1096 | ||
1014 | struct acpi_resource_fixed_io { | 1097 | struct acpi_resource_fixed_io { |
1015 | u32 base_address; | 1098 | u16 address; |
1016 | u32 range_length; | 1099 | u8 address_length; |
1017 | }; | 1100 | }; |
1018 | 1101 | ||
1019 | struct acpi_resource_vendor { | 1102 | struct acpi_resource_vendor { |
1020 | u32 length; | 1103 | u16 byte_length; |
1021 | u8 reserved[1]; | 1104 | u8 byte_data[1]; |
1105 | }; | ||
1106 | |||
1107 | /* Vendor resource with UUID info (introduced in ACPI 3.0) */ | ||
1108 | |||
1109 | struct acpi_resource_vendor_typed { | ||
1110 | u16 byte_length; | ||
1111 | u8 uuid_subtype; | ||
1112 | u8 uuid[ACPI_UUID_LENGTH]; | ||
1113 | u8 byte_data[1]; | ||
1022 | }; | 1114 | }; |
1023 | 1115 | ||
1024 | struct acpi_resource_end_tag { | 1116 | struct acpi_resource_end_tag { |
1025 | u8 checksum; | 1117 | u8 checksum; |
1026 | }; | 1118 | }; |
1027 | 1119 | ||
1028 | struct acpi_resource_mem24 { | 1120 | struct acpi_resource_memory24 { |
1029 | u32 read_write_attribute; | 1121 | u8 write_protect; |
1030 | u32 min_base_address; | 1122 | u16 minimum; |
1031 | u32 max_base_address; | 1123 | u16 maximum; |
1032 | u32 alignment; | 1124 | u16 alignment; |
1033 | u32 range_length; | 1125 | u16 address_length; |
1034 | }; | 1126 | }; |
1035 | 1127 | ||
1036 | struct acpi_resource_mem32 { | 1128 | struct acpi_resource_memory32 { |
1037 | u32 read_write_attribute; | 1129 | u8 write_protect; |
1038 | u32 min_base_address; | 1130 | u32 minimum; |
1039 | u32 max_base_address; | 1131 | u32 maximum; |
1040 | u32 alignment; | 1132 | u32 alignment; |
1041 | u32 range_length; | 1133 | u32 address_length; |
1042 | }; | 1134 | }; |
1043 | 1135 | ||
1044 | struct acpi_resource_fixed_mem32 { | 1136 | struct acpi_resource_fixed_memory32 { |
1045 | u32 read_write_attribute; | 1137 | u8 write_protect; |
1046 | u32 range_base_address; | 1138 | u32 address; |
1047 | u32 range_length; | 1139 | u32 address_length; |
1048 | }; | 1140 | }; |
1049 | 1141 | ||
1050 | struct acpi_memory_attribute { | 1142 | struct acpi_memory_attribute { |
1051 | u16 cache_attribute; | 1143 | u8 write_protect; |
1052 | u16 read_write_attribute; | 1144 | u8 caching; |
1145 | u8 range_type; | ||
1146 | u8 translation; | ||
1053 | }; | 1147 | }; |
1054 | 1148 | ||
1055 | struct acpi_io_attribute { | 1149 | struct acpi_io_attribute { |
1056 | u16 range_attribute; | 1150 | u8 range_type; |
1057 | u16 translation_attribute; | 1151 | u8 translation; |
1058 | }; | 1152 | u8 translation_type; |
1059 | 1153 | u8 reserved1; | |
1060 | struct acpi_bus_attribute { | ||
1061 | u16 reserved1; | ||
1062 | u16 reserved2; | ||
1063 | }; | 1154 | }; |
1064 | 1155 | ||
1065 | union acpi_resource_attribute { | 1156 | union acpi_resource_attribute { |
1066 | struct acpi_memory_attribute memory; | 1157 | struct acpi_memory_attribute mem; |
1067 | struct acpi_io_attribute io; | 1158 | struct acpi_io_attribute io; |
1068 | struct acpi_bus_attribute bus; | 1159 | |
1160 | /* Used for the *word_space macros */ | ||
1161 | |||
1162 | u8 type_specific; | ||
1069 | }; | 1163 | }; |
1070 | 1164 | ||
1071 | struct acpi_resource_source { | 1165 | struct acpi_resource_source { |
1072 | u32 index; | 1166 | u8 index; |
1073 | u32 string_length; | 1167 | u16 string_length; |
1074 | char *string_ptr; | 1168 | char *string_ptr; |
1075 | }; | 1169 | }; |
1076 | 1170 | ||
1077 | /* Fields common to all address descriptors, 16/32/64 bit */ | 1171 | /* Fields common to all address descriptors, 16/32/64 bit */ |
1078 | 1172 | ||
1079 | #define ACPI_RESOURCE_ADDRESS_COMMON \ | 1173 | #define ACPI_RESOURCE_ADDRESS_COMMON \ |
1080 | u32 resource_type; \ | 1174 | u8 resource_type; \ |
1081 | u32 producer_consumer; \ | 1175 | u8 producer_consumer; \ |
1082 | u32 decode; \ | 1176 | u8 decode; \ |
1083 | u32 min_address_fixed; \ | 1177 | u8 min_address_fixed; \ |
1084 | u32 max_address_fixed; \ | 1178 | u8 max_address_fixed; \ |
1085 | union acpi_resource_attribute attribute; | 1179 | union acpi_resource_attribute info; |
1086 | 1180 | ||
1087 | struct acpi_resource_address { | 1181 | struct acpi_resource_address { |
1088 | ACPI_RESOURCE_ADDRESS_COMMON}; | 1182 | ACPI_RESOURCE_ADDRESS_COMMON}; |
1089 | 1183 | ||
1090 | struct acpi_resource_address16 { | 1184 | struct acpi_resource_address16 { |
1091 | ACPI_RESOURCE_ADDRESS_COMMON u32 granularity; | 1185 | ACPI_RESOURCE_ADDRESS_COMMON u16 granularity; |
1092 | u32 min_address_range; | 1186 | u16 minimum; |
1093 | u32 max_address_range; | 1187 | u16 maximum; |
1094 | u32 address_translation_offset; | 1188 | u16 translation_offset; |
1095 | u32 address_length; | 1189 | u16 address_length; |
1096 | struct acpi_resource_source resource_source; | 1190 | struct acpi_resource_source resource_source; |
1097 | }; | 1191 | }; |
1098 | 1192 | ||
1099 | struct acpi_resource_address32 { | 1193 | struct acpi_resource_address32 { |
1100 | ACPI_RESOURCE_ADDRESS_COMMON u32 granularity; | 1194 | ACPI_RESOURCE_ADDRESS_COMMON u32 granularity; |
1101 | u32 min_address_range; | 1195 | u32 minimum; |
1102 | u32 max_address_range; | 1196 | u32 maximum; |
1103 | u32 address_translation_offset; | 1197 | u32 translation_offset; |
1104 | u32 address_length; | 1198 | u32 address_length; |
1105 | struct acpi_resource_source resource_source; | 1199 | struct acpi_resource_source resource_source; |
1106 | }; | 1200 | }; |
1107 | 1201 | ||
1108 | struct acpi_resource_address64 { | 1202 | struct acpi_resource_address64 { |
1109 | ACPI_RESOURCE_ADDRESS_COMMON u64 granularity; | 1203 | ACPI_RESOURCE_ADDRESS_COMMON u64 granularity; |
1110 | u64 min_address_range; | 1204 | u64 minimum; |
1111 | u64 max_address_range; | 1205 | u64 maximum; |
1112 | u64 address_translation_offset; | 1206 | u64 translation_offset; |
1113 | u64 address_length; | 1207 | u64 address_length; |
1114 | u64 type_specific_attributes; | ||
1115 | struct acpi_resource_source resource_source; | 1208 | struct acpi_resource_source resource_source; |
1116 | }; | 1209 | }; |
1117 | 1210 | ||
1118 | struct acpi_resource_ext_irq { | 1211 | struct acpi_resource_extended_address64 { |
1119 | u32 producer_consumer; | 1212 | ACPI_RESOURCE_ADDRESS_COMMON u8 revision_iD; |
1120 | u32 edge_level; | 1213 | u64 granularity; |
1121 | u32 active_high_low; | 1214 | u64 minimum; |
1122 | u32 shared_exclusive; | 1215 | u64 maximum; |
1123 | u32 number_of_interrupts; | 1216 | u64 translation_offset; |
1217 | u64 address_length; | ||
1218 | u64 type_specific; | ||
1219 | }; | ||
1220 | |||
1221 | struct acpi_resource_extended_irq { | ||
1222 | u8 producer_consumer; | ||
1223 | u8 triggering; | ||
1224 | u8 polarity; | ||
1225 | u8 sharable; | ||
1226 | u8 interrupt_count; | ||
1124 | struct acpi_resource_source resource_source; | 1227 | struct acpi_resource_source resource_source; |
1125 | u32 interrupts[1]; | 1228 | u32 interrupts[1]; |
1126 | }; | 1229 | }; |
1127 | 1230 | ||
1231 | struct acpi_resource_generic_register { | ||
1232 | u8 space_id; | ||
1233 | u8 bit_width; | ||
1234 | u8 bit_offset; | ||
1235 | u8 access_size; | ||
1236 | u64 address; | ||
1237 | }; | ||
1238 | |||
1128 | /* ACPI_RESOURCE_TYPEs */ | 1239 | /* ACPI_RESOURCE_TYPEs */ |
1129 | 1240 | ||
1130 | #define ACPI_RSTYPE_IRQ 0 | 1241 | #define ACPI_RESOURCE_TYPE_IRQ 0 |
1131 | #define ACPI_RSTYPE_DMA 1 | 1242 | #define ACPI_RESOURCE_TYPE_DMA 1 |
1132 | #define ACPI_RSTYPE_START_DPF 2 | 1243 | #define ACPI_RESOURCE_TYPE_START_DEPENDENT 2 |
1133 | #define ACPI_RSTYPE_END_DPF 3 | 1244 | #define ACPI_RESOURCE_TYPE_END_DEPENDENT 3 |
1134 | #define ACPI_RSTYPE_IO 4 | 1245 | #define ACPI_RESOURCE_TYPE_IO 4 |
1135 | #define ACPI_RSTYPE_FIXED_IO 5 | 1246 | #define ACPI_RESOURCE_TYPE_FIXED_IO 5 |
1136 | #define ACPI_RSTYPE_VENDOR 6 | 1247 | #define ACPI_RESOURCE_TYPE_VENDOR 6 |
1137 | #define ACPI_RSTYPE_END_TAG 7 | 1248 | #define ACPI_RESOURCE_TYPE_END_TAG 7 |
1138 | #define ACPI_RSTYPE_MEM24 8 | 1249 | #define ACPI_RESOURCE_TYPE_MEMORY24 8 |
1139 | #define ACPI_RSTYPE_MEM32 9 | 1250 | #define ACPI_RESOURCE_TYPE_MEMORY32 9 |
1140 | #define ACPI_RSTYPE_FIXED_MEM32 10 | 1251 | #define ACPI_RESOURCE_TYPE_FIXED_MEMORY32 10 |
1141 | #define ACPI_RSTYPE_ADDRESS16 11 | 1252 | #define ACPI_RESOURCE_TYPE_ADDRESS16 11 |
1142 | #define ACPI_RSTYPE_ADDRESS32 12 | 1253 | #define ACPI_RESOURCE_TYPE_ADDRESS32 12 |
1143 | #define ACPI_RSTYPE_ADDRESS64 13 | 1254 | #define ACPI_RESOURCE_TYPE_ADDRESS64 13 |
1144 | #define ACPI_RSTYPE_EXT_IRQ 14 | 1255 | #define ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64 14 /* ACPI 3.0 */ |
1145 | 1256 | #define ACPI_RESOURCE_TYPE_EXTENDED_IRQ 15 | |
1146 | typedef u32 acpi_resource_type; | 1257 | #define ACPI_RESOURCE_TYPE_GENERIC_REGISTER 16 |
1258 | #define ACPI_RESOURCE_TYPE_MAX 16 | ||
1147 | 1259 | ||
1148 | union acpi_resource_data { | 1260 | union acpi_resource_data { |
1149 | struct acpi_resource_irq irq; | 1261 | struct acpi_resource_irq irq; |
1150 | struct acpi_resource_dma dma; | 1262 | struct acpi_resource_dma dma; |
1151 | struct acpi_resource_start_dpf start_dpf; | 1263 | struct acpi_resource_start_dependent start_dpf; |
1152 | struct acpi_resource_io io; | 1264 | struct acpi_resource_io io; |
1153 | struct acpi_resource_fixed_io fixed_io; | 1265 | struct acpi_resource_fixed_io fixed_io; |
1154 | struct acpi_resource_vendor vendor_specific; | 1266 | struct acpi_resource_vendor vendor; |
1267 | struct acpi_resource_vendor_typed vendor_typed; | ||
1155 | struct acpi_resource_end_tag end_tag; | 1268 | struct acpi_resource_end_tag end_tag; |
1156 | struct acpi_resource_mem24 memory24; | 1269 | struct acpi_resource_memory24 memory24; |
1157 | struct acpi_resource_mem32 memory32; | 1270 | struct acpi_resource_memory32 memory32; |
1158 | struct acpi_resource_fixed_mem32 fixed_memory32; | 1271 | struct acpi_resource_fixed_memory32 fixed_memory32; |
1159 | struct acpi_resource_address address; /* Common 16/32/64 address fields */ | ||
1160 | struct acpi_resource_address16 address16; | 1272 | struct acpi_resource_address16 address16; |
1161 | struct acpi_resource_address32 address32; | 1273 | struct acpi_resource_address32 address32; |
1162 | struct acpi_resource_address64 address64; | 1274 | struct acpi_resource_address64 address64; |
1163 | struct acpi_resource_ext_irq extended_irq; | 1275 | struct acpi_resource_extended_address64 ext_address64; |
1276 | struct acpi_resource_extended_irq extended_irq; | ||
1277 | struct acpi_resource_generic_register generic_reg; | ||
1278 | |||
1279 | /* Common fields */ | ||
1280 | |||
1281 | struct acpi_resource_address address; /* Common 16/32/64 address fields */ | ||
1164 | }; | 1282 | }; |
1165 | 1283 | ||
1166 | struct acpi_resource { | 1284 | struct acpi_resource { |
1167 | acpi_resource_type id; | 1285 | u32 type; |
1168 | u32 length; | 1286 | u32 length; |
1169 | union acpi_resource_data data; | 1287 | union acpi_resource_data data; |
1170 | }; | 1288 | }; |
1171 | 1289 | ||
1172 | #define ACPI_RESOURCE_LENGTH 12 | 1290 | /* restore default alignment */ |
1173 | #define ACPI_RESOURCE_LENGTH_NO_DATA 8 /* Id + Length fields */ | 1291 | |
1292 | #pragma pack() | ||
1174 | 1293 | ||
1175 | #define ACPI_SIZEOF_RESOURCE(type) (ACPI_RESOURCE_LENGTH_NO_DATA + sizeof (type)) | 1294 | #define ACPI_RS_SIZE_MIN 12 |
1295 | #define ACPI_RS_SIZE_NO_DATA 8 /* Id + Length fields */ | ||
1296 | #define ACPI_RS_SIZE(type) (u32) (ACPI_RS_SIZE_NO_DATA + sizeof (type)) | ||
1176 | 1297 | ||
1177 | #define ACPI_NEXT_RESOURCE(res) (struct acpi_resource *)((u8 *) res + res->length) | 1298 | #define ACPI_NEXT_RESOURCE(res) (struct acpi_resource *)((u8 *) res + res->length) |
1178 | 1299 | ||
1179 | #ifdef ACPI_MISALIGNED_TRANSFERS | 1300 | #ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED |
1180 | #define ACPI_ALIGN_RESOURCE_SIZE(length) (length) | 1301 | #define ACPI_ALIGN_RESOURCE_SIZE(length) (length) |
1181 | #else | 1302 | #else |
1182 | #define ACPI_ALIGN_RESOURCE_SIZE(length) ACPI_ROUND_UP_TO_NATIVE_WORD(length) | 1303 | #define ACPI_ALIGN_RESOURCE_SIZE(length) ACPI_ROUND_UP_TO_NATIVE_WORD(length) |
diff --git a/include/acpi/acutils.h b/include/acpi/acutils.h index c1086452696e..0927765df6aa 100644 --- a/include/acpi/acutils.h +++ b/include/acpi/acutils.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -44,6 +44,39 @@ | |||
44 | #ifndef _ACUTILS_H | 44 | #ifndef _ACUTILS_H |
45 | #define _ACUTILS_H | 45 | #define _ACUTILS_H |
46 | 46 | ||
47 | extern const u8 acpi_gbl_resource_aml_sizes[]; | ||
48 | |||
49 | /* Strings used by the disassembler and debugger resource dump routines */ | ||
50 | |||
51 | #if defined(ACPI_DISASSEMBLER) || defined (ACPI_DEBUGGER) | ||
52 | |||
53 | extern const char *acpi_gbl_BMdecode[2]; | ||
54 | extern const char *acpi_gbl_config_decode[4]; | ||
55 | extern const char *acpi_gbl_consume_decode[2]; | ||
56 | extern const char *acpi_gbl_DECdecode[2]; | ||
57 | extern const char *acpi_gbl_HEdecode[2]; | ||
58 | extern const char *acpi_gbl_io_decode[2]; | ||
59 | extern const char *acpi_gbl_LLdecode[2]; | ||
60 | extern const char *acpi_gbl_max_decode[2]; | ||
61 | extern const char *acpi_gbl_MEMdecode[4]; | ||
62 | extern const char *acpi_gbl_min_decode[2]; | ||
63 | extern const char *acpi_gbl_MTPdecode[4]; | ||
64 | extern const char *acpi_gbl_RNGdecode[4]; | ||
65 | extern const char *acpi_gbl_RWdecode[2]; | ||
66 | extern const char *acpi_gbl_SHRdecode[2]; | ||
67 | extern const char *acpi_gbl_SIZdecode[4]; | ||
68 | extern const char *acpi_gbl_TRSdecode[2]; | ||
69 | extern const char *acpi_gbl_TTPdecode[2]; | ||
70 | extern const char *acpi_gbl_TYPdecode[4]; | ||
71 | #endif | ||
72 | |||
73 | /* Types for Resource descriptor entries */ | ||
74 | |||
75 | #define ACPI_INVALID_RESOURCE 0 | ||
76 | #define ACPI_FIXED_LENGTH 1 | ||
77 | #define ACPI_VARIABLE_LENGTH 2 | ||
78 | #define ACPI_SMALL_VARIABLE_LENGTH 3 | ||
79 | |||
47 | typedef | 80 | typedef |
48 | acpi_status(*acpi_pkg_callback) (u8 object_type, | 81 | acpi_status(*acpi_pkg_callback) (u8 object_type, |
49 | union acpi_operand_object * source_object, | 82 | union acpi_operand_object * source_object, |
@@ -159,7 +192,6 @@ extern const u8 _acpi_ctype[]; | |||
159 | #define ACPI_IS_LOWER(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO)) | 192 | #define ACPI_IS_LOWER(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO)) |
160 | #define ACPI_IS_PRINT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP | _ACPI_DI | _ACPI_SP | _ACPI_PU)) | 193 | #define ACPI_IS_PRINT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP | _ACPI_DI | _ACPI_SP | _ACPI_PU)) |
161 | #define ACPI_IS_ALPHA(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP)) | 194 | #define ACPI_IS_ALPHA(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP)) |
162 | #define ACPI_IS_ASCII(c) ((c) < 0x80) | ||
163 | 195 | ||
164 | #endif /* ACPI_USE_SYSTEM_CLIBRARY */ | 196 | #endif /* ACPI_USE_SYSTEM_CLIBRARY */ |
165 | 197 | ||
@@ -243,21 +275,22 @@ acpi_ut_ptr_exit(u32 line_number, | |||
243 | const char *function_name, | 275 | const char *function_name, |
244 | char *module_name, u32 component_id, u8 * ptr); | 276 | char *module_name, u32 component_id, u8 * ptr); |
245 | 277 | ||
246 | void acpi_ut_report_info(char *module_name, u32 line_number, u32 component_id); | 278 | void acpi_ut_dump_buffer(u8 * buffer, u32 count, u32 display, u32 component_id); |
247 | 279 | ||
248 | void acpi_ut_report_error(char *module_name, u32 line_number, u32 component_id); | 280 | void acpi_ut_report_error(char *module_name, u32 line_number); |
249 | 281 | ||
250 | void | 282 | void acpi_ut_report_info(char *module_name, u32 line_number); |
251 | acpi_ut_report_warning(char *module_name, u32 line_number, u32 component_id); | ||
252 | 283 | ||
253 | void acpi_ut_dump_buffer(u8 * buffer, u32 count, u32 display, u32 component_id); | 284 | void acpi_ut_report_warning(char *module_name, u32 line_number); |
285 | |||
286 | /* Error and message reporting interfaces */ | ||
254 | 287 | ||
255 | void ACPI_INTERNAL_VAR_XFACE | 288 | void ACPI_INTERNAL_VAR_XFACE |
256 | acpi_ut_debug_print(u32 requested_debug_level, | 289 | acpi_ut_debug_print(u32 requested_debug_level, |
257 | u32 line_number, | 290 | u32 line_number, |
258 | const char *function_name, | 291 | const char *function_name, |
259 | char *module_name, | 292 | char *module_name, |
260 | u32 component_id, char *format, ...) ACPI_PRINTF_LIKE_FUNC; | 293 | u32 component_id, char *format, ...) ACPI_PRINTF_LIKE(6); |
261 | 294 | ||
262 | void ACPI_INTERNAL_VAR_XFACE | 295 | void ACPI_INTERNAL_VAR_XFACE |
263 | acpi_ut_debug_print_raw(u32 requested_debug_level, | 296 | acpi_ut_debug_print_raw(u32 requested_debug_level, |
@@ -265,7 +298,24 @@ acpi_ut_debug_print_raw(u32 requested_debug_level, | |||
265 | const char *function_name, | 298 | const char *function_name, |
266 | char *module_name, | 299 | char *module_name, |
267 | u32 component_id, | 300 | u32 component_id, |
268 | char *format, ...) ACPI_PRINTF_LIKE_FUNC; | 301 | char *format, ...) ACPI_PRINTF_LIKE(6); |
302 | |||
303 | void ACPI_INTERNAL_VAR_XFACE | ||
304 | acpi_ut_error(char *module_name, | ||
305 | u32 line_number, char *format, ...) ACPI_PRINTF_LIKE(3); | ||
306 | |||
307 | void ACPI_INTERNAL_VAR_XFACE | ||
308 | acpi_ut_exception(char *module_name, | ||
309 | u32 line_number, | ||
310 | acpi_status status, char *format, ...) ACPI_PRINTF_LIKE(4); | ||
311 | |||
312 | void ACPI_INTERNAL_VAR_XFACE | ||
313 | acpi_ut_warning(char *module_name, | ||
314 | u32 line_number, char *format, ...) ACPI_PRINTF_LIKE(3); | ||
315 | |||
316 | void ACPI_INTERNAL_VAR_XFACE | ||
317 | acpi_ut_info(char *module_name, | ||
318 | u32 line_number, char *format, ...) ACPI_PRINTF_LIKE(3); | ||
269 | 319 | ||
270 | /* | 320 | /* |
271 | * utdelete - Object deletion and reference counts | 321 | * utdelete - Object deletion and reference counts |
@@ -419,7 +469,19 @@ acpi_ut_strtoul64(char *string, u32 base, acpi_integer * ret_integer); | |||
419 | 469 | ||
420 | #define ACPI_ANY_BASE 0 | 470 | #define ACPI_ANY_BASE 0 |
421 | 471 | ||
422 | u8 *acpi_ut_get_resource_end_tag(union acpi_operand_object *obj_desc); | 472 | acpi_status acpi_ut_validate_resource(void *aml, u8 * return_index); |
473 | |||
474 | u32 acpi_ut_get_descriptor_length(void *aml); | ||
475 | |||
476 | u16 acpi_ut_get_resource_length(void *aml); | ||
477 | |||
478 | u8 acpi_ut_get_resource_header_length(void *aml); | ||
479 | |||
480 | u8 acpi_ut_get_resource_type(void *aml); | ||
481 | |||
482 | acpi_status | ||
483 | acpi_ut_get_resource_end_tag(union acpi_operand_object *obj_desc, | ||
484 | u8 ** end_tag); | ||
423 | 485 | ||
424 | u8 acpi_ut_generate_checksum(u8 * buffer, u32 length); | 486 | u8 acpi_ut_generate_checksum(u8 * buffer, u32 length); |
425 | 487 | ||
diff --git a/include/acpi/amlcode.h b/include/acpi/amlcode.h index 7fdf5299f501..37964a59aef8 100644 --- a/include/acpi/amlcode.h +++ b/include/acpi/amlcode.h | |||
@@ -7,7 +7,7 @@ | |||
7 | *****************************************************************************/ | 7 | *****************************************************************************/ |
8 | 8 | ||
9 | /* | 9 | /* |
10 | * Copyright (C) 2000 - 2005, R. Byron Moore | 10 | * Copyright (C) 2000 - 2006, R. Byron Moore |
11 | * All rights reserved. | 11 | * All rights reserved. |
12 | * | 12 | * |
13 | * Redistribution and use in source and binary forms, with or without | 13 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/amlresrc.h b/include/acpi/amlresrc.h index 051786e4b210..fb4735315ad3 100644 --- a/include/acpi/amlresrc.h +++ b/include/acpi/amlresrc.h | |||
@@ -6,7 +6,7 @@ | |||
6 | *****************************************************************************/ | 6 | *****************************************************************************/ |
7 | 7 | ||
8 | /* | 8 | /* |
9 | * Copyright (C) 2000 - 2005, R. Byron Moore | 9 | * Copyright (C) 2000 - 2006, R. Byron Moore |
10 | * All rights reserved. | 10 | * All rights reserved. |
11 | * | 11 | * |
12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without |
@@ -92,182 +92,168 @@ struct asl_resource_node { | |||
92 | struct asl_resource_node *next; | 92 | struct asl_resource_node *next; |
93 | }; | 93 | }; |
94 | 94 | ||
95 | /* Macros used to generate AML resource length fields */ | ||
96 | |||
97 | #define ACPI_AML_SIZE_LARGE(r) (sizeof (r) - sizeof (struct aml_resource_large_header)) | ||
98 | #define ACPI_AML_SIZE_SMALL(r) (sizeof (r) - sizeof (struct aml_resource_small_header)) | ||
99 | |||
95 | /* | 100 | /* |
96 | * Resource descriptors defined in the ACPI specification. | 101 | * Resource descriptors defined in the ACPI specification. |
97 | * | 102 | * |
98 | * Packing/alignment must be BYTE because these descriptors | 103 | * Packing/alignment must be BYTE because these descriptors |
99 | * are used to overlay the AML byte stream. | 104 | * are used to overlay the raw AML byte stream. |
100 | */ | 105 | */ |
101 | #pragma pack(1) | 106 | #pragma pack(1) |
102 | 107 | ||
103 | struct asl_irq_format_desc { | 108 | /* |
104 | u8 descriptor_type; | 109 | * SMALL descriptors |
105 | u16 irq_mask; | 110 | */ |
111 | #define AML_RESOURCE_SMALL_HEADER_COMMON \ | ||
112 | u8 descriptor_type; | ||
113 | |||
114 | struct aml_resource_small_header { | ||
115 | AML_RESOURCE_SMALL_HEADER_COMMON}; | ||
116 | |||
117 | struct aml_resource_irq { | ||
118 | AML_RESOURCE_SMALL_HEADER_COMMON u16 irq_mask; | ||
106 | u8 flags; | 119 | u8 flags; |
107 | }; | 120 | }; |
108 | 121 | ||
109 | struct asl_irq_noflags_desc { | 122 | struct aml_resource_irq_noflags { |
110 | u8 descriptor_type; | 123 | AML_RESOURCE_SMALL_HEADER_COMMON u16 irq_mask; |
111 | u16 irq_mask; | ||
112 | }; | 124 | }; |
113 | 125 | ||
114 | struct asl_dma_format_desc { | 126 | struct aml_resource_dma { |
115 | u8 descriptor_type; | 127 | AML_RESOURCE_SMALL_HEADER_COMMON u8 dma_channel_mask; |
116 | u8 dma_channel_mask; | ||
117 | u8 flags; | 128 | u8 flags; |
118 | }; | 129 | }; |
119 | 130 | ||
120 | struct asl_start_dependent_desc { | 131 | struct aml_resource_start_dependent { |
121 | u8 descriptor_type; | 132 | AML_RESOURCE_SMALL_HEADER_COMMON u8 flags; |
122 | u8 flags; | ||
123 | }; | 133 | }; |
124 | 134 | ||
125 | struct asl_start_dependent_noprio_desc { | 135 | struct aml_resource_start_dependent_noprio { |
126 | u8 descriptor_type; | 136 | AML_RESOURCE_SMALL_HEADER_COMMON}; |
127 | }; | ||
128 | 137 | ||
129 | struct asl_end_dependent_desc { | 138 | struct aml_resource_end_dependent { |
130 | u8 descriptor_type; | 139 | AML_RESOURCE_SMALL_HEADER_COMMON}; |
131 | }; | ||
132 | 140 | ||
133 | struct asl_io_port_desc { | 141 | struct aml_resource_io { |
134 | u8 descriptor_type; | 142 | AML_RESOURCE_SMALL_HEADER_COMMON u8 flags; |
135 | u8 information; | 143 | u16 minimum; |
136 | u16 address_min; | 144 | u16 maximum; |
137 | u16 address_max; | ||
138 | u8 alignment; | 145 | u8 alignment; |
139 | u8 length; | 146 | u8 address_length; |
140 | }; | 147 | }; |
141 | 148 | ||
142 | struct asl_fixed_io_port_desc { | 149 | struct aml_resource_fixed_io { |
143 | u8 descriptor_type; | 150 | AML_RESOURCE_SMALL_HEADER_COMMON u16 address; |
144 | u16 base_address; | 151 | u8 address_length; |
145 | u8 length; | ||
146 | }; | 152 | }; |
147 | 153 | ||
148 | struct asl_small_vendor_desc { | 154 | struct aml_resource_vendor_small { |
149 | u8 descriptor_type; | 155 | AML_RESOURCE_SMALL_HEADER_COMMON}; |
150 | u8 vendor_defined[7]; | ||
151 | }; | ||
152 | 156 | ||
153 | struct asl_end_tag_desc { | 157 | struct aml_resource_end_tag { |
154 | u8 descriptor_type; | 158 | AML_RESOURCE_SMALL_HEADER_COMMON u8 checksum; |
155 | u8 checksum; | ||
156 | }; | 159 | }; |
157 | 160 | ||
158 | /* LARGE descriptors */ | 161 | /* |
162 | * LARGE descriptors | ||
163 | */ | ||
164 | #define AML_RESOURCE_LARGE_HEADER_COMMON \ | ||
165 | u8 descriptor_type;\ | ||
166 | u16 resource_length; | ||
167 | |||
168 | struct aml_resource_large_header { | ||
169 | AML_RESOURCE_LARGE_HEADER_COMMON}; | ||
159 | 170 | ||
160 | struct asl_memory_24_desc { | 171 | struct aml_resource_memory24 { |
161 | u8 descriptor_type; | 172 | AML_RESOURCE_LARGE_HEADER_COMMON u8 flags; |
162 | u16 length; | 173 | u16 minimum; |
163 | u8 information; | 174 | u16 maximum; |
164 | u16 address_min; | ||
165 | u16 address_max; | ||
166 | u16 alignment; | 175 | u16 alignment; |
167 | u16 range_length; | 176 | u16 address_length; |
168 | }; | 177 | }; |
169 | 178 | ||
170 | struct asl_large_vendor_desc { | 179 | struct aml_resource_vendor_large { |
171 | u8 descriptor_type; | 180 | AML_RESOURCE_LARGE_HEADER_COMMON}; |
172 | u16 length; | ||
173 | u8 vendor_defined[1]; | ||
174 | }; | ||
175 | 181 | ||
176 | struct asl_memory_32_desc { | 182 | struct aml_resource_memory32 { |
177 | u8 descriptor_type; | 183 | AML_RESOURCE_LARGE_HEADER_COMMON u8 flags; |
178 | u16 length; | 184 | u32 minimum; |
179 | u8 information; | 185 | u32 maximum; |
180 | u32 address_min; | ||
181 | u32 address_max; | ||
182 | u32 alignment; | 186 | u32 alignment; |
183 | u32 range_length; | 187 | u32 address_length; |
184 | }; | 188 | }; |
185 | 189 | ||
186 | struct asl_fixed_memory_32_desc { | 190 | struct aml_resource_fixed_memory32 { |
187 | u8 descriptor_type; | 191 | AML_RESOURCE_LARGE_HEADER_COMMON u8 flags; |
188 | u16 length; | 192 | u32 address; |
189 | u8 information; | 193 | u32 address_length; |
190 | u32 base_address; | ||
191 | u32 range_length; | ||
192 | }; | 194 | }; |
193 | 195 | ||
194 | struct asl_extended_address_desc { | 196 | #define AML_RESOURCE_ADDRESS_COMMON \ |
195 | u8 descriptor_type; | 197 | u8 resource_type; \ |
196 | u16 length; | 198 | u8 flags; \ |
197 | u8 resource_type; | 199 | u8 specific_flags; |
198 | u8 flags; | 200 | |
199 | u8 specific_flags; | 201 | struct aml_resource_address { |
200 | u8 revision_iD; | 202 | AML_RESOURCE_LARGE_HEADER_COMMON AML_RESOURCE_ADDRESS_COMMON}; |
203 | |||
204 | struct aml_resource_extended_address64 { | ||
205 | AML_RESOURCE_LARGE_HEADER_COMMON | ||
206 | AML_RESOURCE_ADDRESS_COMMON u8 revision_iD; | ||
201 | u8 reserved; | 207 | u8 reserved; |
202 | u64 granularity; | 208 | u64 granularity; |
203 | u64 address_min; | 209 | u64 minimum; |
204 | u64 address_max; | 210 | u64 maximum; |
205 | u64 translation_offset; | 211 | u64 translation_offset; |
206 | u64 address_length; | 212 | u64 address_length; |
207 | u64 type_specific_attributes; | 213 | u64 type_specific; |
208 | u8 optional_fields[2]; /* Used for length calculation only */ | ||
209 | }; | 214 | }; |
210 | 215 | ||
211 | #define ASL_EXTENDED_ADDRESS_DESC_REVISION 1 /* ACPI 3.0 */ | 216 | #define AML_RESOURCE_EXTENDED_ADDRESS_REVISION 1 /* ACPI 3.0 */ |
212 | 217 | ||
213 | struct asl_qword_address_desc { | 218 | struct aml_resource_address64 { |
214 | u8 descriptor_type; | 219 | AML_RESOURCE_LARGE_HEADER_COMMON |
215 | u16 length; | 220 | AML_RESOURCE_ADDRESS_COMMON u64 granularity; |
216 | u8 resource_type; | 221 | u64 minimum; |
217 | u8 flags; | 222 | u64 maximum; |
218 | u8 specific_flags; | ||
219 | u64 granularity; | ||
220 | u64 address_min; | ||
221 | u64 address_max; | ||
222 | u64 translation_offset; | 223 | u64 translation_offset; |
223 | u64 address_length; | 224 | u64 address_length; |
224 | u8 optional_fields[2]; | ||
225 | }; | 225 | }; |
226 | 226 | ||
227 | struct asl_dword_address_desc { | 227 | struct aml_resource_address32 { |
228 | u8 descriptor_type; | 228 | AML_RESOURCE_LARGE_HEADER_COMMON |
229 | u16 length; | 229 | AML_RESOURCE_ADDRESS_COMMON u32 granularity; |
230 | u8 resource_type; | 230 | u32 minimum; |
231 | u8 flags; | 231 | u32 maximum; |
232 | u8 specific_flags; | ||
233 | u32 granularity; | ||
234 | u32 address_min; | ||
235 | u32 address_max; | ||
236 | u32 translation_offset; | 232 | u32 translation_offset; |
237 | u32 address_length; | 233 | u32 address_length; |
238 | u8 optional_fields[2]; | ||
239 | }; | 234 | }; |
240 | 235 | ||
241 | struct asl_word_address_desc { | 236 | struct aml_resource_address16 { |
242 | u8 descriptor_type; | 237 | AML_RESOURCE_LARGE_HEADER_COMMON |
243 | u16 length; | 238 | AML_RESOURCE_ADDRESS_COMMON u16 granularity; |
244 | u8 resource_type; | 239 | u16 minimum; |
245 | u8 flags; | 240 | u16 maximum; |
246 | u8 specific_flags; | ||
247 | u16 granularity; | ||
248 | u16 address_min; | ||
249 | u16 address_max; | ||
250 | u16 translation_offset; | 241 | u16 translation_offset; |
251 | u16 address_length; | 242 | u16 address_length; |
252 | u8 optional_fields[2]; | ||
253 | }; | 243 | }; |
254 | 244 | ||
255 | struct asl_extended_xrupt_desc { | 245 | struct aml_resource_extended_irq { |
256 | u8 descriptor_type; | 246 | AML_RESOURCE_LARGE_HEADER_COMMON u8 flags; |
257 | u16 length; | 247 | u8 interrupt_count; |
258 | u8 flags; | 248 | u32 interrupts[1]; |
259 | u8 table_length; | ||
260 | u32 interrupt_number[1]; | ||
261 | /* res_source_index, res_source optional fields follow */ | 249 | /* res_source_index, res_source optional fields follow */ |
262 | }; | 250 | }; |
263 | 251 | ||
264 | struct asl_general_register_desc { | 252 | struct aml_resource_generic_register { |
265 | u8 descriptor_type; | 253 | AML_RESOURCE_LARGE_HEADER_COMMON u8 address_space_id; |
266 | u16 length; | ||
267 | u8 address_space_id; | ||
268 | u8 bit_width; | 254 | u8 bit_width; |
269 | u8 bit_offset; | 255 | u8 bit_offset; |
270 | u8 access_size; /* ACPI 3.0, was Reserved */ | 256 | u8 access_size; /* ACPI 3.0, was previously Reserved */ |
271 | u64 address; | 257 | u64 address; |
272 | }; | 258 | }; |
273 | 259 | ||
@@ -277,26 +263,39 @@ struct asl_general_register_desc { | |||
277 | 263 | ||
278 | /* Union of all resource descriptors, so we can allocate the worst case */ | 264 | /* Union of all resource descriptors, so we can allocate the worst case */ |
279 | 265 | ||
280 | union asl_resource_desc { | 266 | union aml_resource { |
281 | struct asl_irq_format_desc irq; | 267 | /* Descriptor headers */ |
282 | struct asl_dma_format_desc dma; | 268 | |
283 | struct asl_start_dependent_desc std; | 269 | struct aml_resource_small_header small_header; |
284 | struct asl_end_dependent_desc end; | 270 | struct aml_resource_large_header large_header; |
285 | struct asl_io_port_desc iop; | 271 | |
286 | struct asl_fixed_io_port_desc fio; | 272 | /* Small resource descriptors */ |
287 | struct asl_small_vendor_desc smv; | 273 | |
288 | struct asl_end_tag_desc et; | 274 | struct aml_resource_irq irq; |
289 | 275 | struct aml_resource_dma dma; | |
290 | struct asl_memory_24_desc M24; | 276 | struct aml_resource_start_dependent start_dpf; |
291 | struct asl_large_vendor_desc lgv; | 277 | struct aml_resource_end_dependent end_dpf; |
292 | struct asl_memory_32_desc M32; | 278 | struct aml_resource_io io; |
293 | struct asl_fixed_memory_32_desc F32; | 279 | struct aml_resource_fixed_io fixed_io; |
294 | struct asl_qword_address_desc qas; | 280 | struct aml_resource_vendor_small vendor_small; |
295 | struct asl_dword_address_desc das; | 281 | struct aml_resource_end_tag end_tag; |
296 | struct asl_word_address_desc was; | 282 | |
297 | struct asl_extended_address_desc eas; | 283 | /* Large resource descriptors */ |
298 | struct asl_extended_xrupt_desc exx; | 284 | |
299 | struct asl_general_register_desc grg; | 285 | struct aml_resource_memory24 memory24; |
286 | struct aml_resource_generic_register generic_reg; | ||
287 | struct aml_resource_vendor_large vendor_large; | ||
288 | struct aml_resource_memory32 memory32; | ||
289 | struct aml_resource_fixed_memory32 fixed_memory32; | ||
290 | struct aml_resource_address16 address16; | ||
291 | struct aml_resource_address32 address32; | ||
292 | struct aml_resource_address64 address64; | ||
293 | struct aml_resource_extended_address64 ext_address64; | ||
294 | struct aml_resource_extended_irq extended_irq; | ||
295 | |||
296 | /* Utility overlays */ | ||
297 | |||
298 | struct aml_resource_address address; | ||
300 | u32 u32_item; | 299 | u32 u32_item; |
301 | u16 u16_item; | 300 | u16 u16_item; |
302 | u8 U8item; | 301 | u8 U8item; |
diff --git a/include/acpi/pdc_intel.h b/include/acpi/pdc_intel.h index 91f4a12a99a1..3fa81d55cd0c 100644 --- a/include/acpi/pdc_intel.h +++ b/include/acpi/pdc_intel.h | |||
@@ -15,9 +15,7 @@ | |||
15 | #define ACPI_PDC_C_C1_FFH (0x0100) | 15 | #define ACPI_PDC_C_C1_FFH (0x0100) |
16 | 16 | ||
17 | #define ACPI_PDC_EST_CAPABILITY_SMP (ACPI_PDC_SMP_C1PT | \ | 17 | #define ACPI_PDC_EST_CAPABILITY_SMP (ACPI_PDC_SMP_C1PT | \ |
18 | ACPI_PDC_C_C1_HALT) | 18 | ACPI_PDC_C_C1_HALT | \ |
19 | |||
20 | #define ACPI_PDC_EST_CAPABILITY_SMP_MSR (ACPI_PDC_EST_CAPABILITY_SMP | \ | ||
21 | ACPI_PDC_P_FFH) | 19 | ACPI_PDC_P_FFH) |
22 | 20 | ||
23 | #define ACPI_PDC_C_CAPABILITY_SMP (ACPI_PDC_SMP_C2C3 | \ | 21 | #define ACPI_PDC_C_CAPABILITY_SMP (ACPI_PDC_SMP_C2C3 | \ |
diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h index 16609c1ab2eb..223ec6467108 100644 --- a/include/acpi/platform/acenv.h +++ b/include/acpi/platform/acenv.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -68,6 +68,7 @@ | |||
68 | #define ACPI_APPLICATION | 68 | #define ACPI_APPLICATION |
69 | #define ACPI_DEBUGGER | 69 | #define ACPI_DEBUGGER |
70 | #define ACPI_DISASSEMBLER | 70 | #define ACPI_DISASSEMBLER |
71 | #define ACPI_MUTEX_DEBUG | ||
71 | #endif | 72 | #endif |
72 | 73 | ||
73 | #ifdef ACPI_ASL_COMPILER | 74 | #ifdef ACPI_ASL_COMPILER |
@@ -148,6 +149,9 @@ | |||
148 | #elif defined(NETWARE) | 149 | #elif defined(NETWARE) |
149 | #include "acnetware.h" | 150 | #include "acnetware.h" |
150 | 151 | ||
152 | #elif defined(__sun) | ||
153 | #include "acsolaris.h" | ||
154 | |||
151 | #else | 155 | #else |
152 | 156 | ||
153 | /* All other environments */ | 157 | /* All other environments */ |
@@ -157,13 +161,6 @@ | |||
157 | #define COMPILER_DEPENDENT_INT64 long long | 161 | #define COMPILER_DEPENDENT_INT64 long long |
158 | #define COMPILER_DEPENDENT_UINT64 unsigned long long | 162 | #define COMPILER_DEPENDENT_UINT64 unsigned long long |
159 | 163 | ||
160 | /* | ||
161 | * This macro is used to tag functions as "printf-like" because | ||
162 | * some compilers can catch printf format string problems. MSVC | ||
163 | * doesn't, so this is proprocessed away. | ||
164 | */ | ||
165 | #define ACPI_PRINTF_LIKE_FUNC | ||
166 | |||
167 | #endif | 164 | #endif |
168 | 165 | ||
169 | /* | 166 | /* |
@@ -205,6 +202,8 @@ | |||
205 | * | 202 | * |
206 | *****************************************************************************/ | 203 | *****************************************************************************/ |
207 | 204 | ||
205 | #define ACPI_IS_ASCII(c) ((c) < 0x80) | ||
206 | |||
208 | #ifdef ACPI_USE_SYSTEM_CLIBRARY | 207 | #ifdef ACPI_USE_SYSTEM_CLIBRARY |
209 | /* | 208 | /* |
210 | * Use the standard C library headers. | 209 | * Use the standard C library headers. |
@@ -234,7 +233,7 @@ | |||
234 | #define ACPI_STRCAT(d,s) (void) strcat((d), (s)) | 233 | #define ACPI_STRCAT(d,s) (void) strcat((d), (s)) |
235 | #define ACPI_STRNCAT(d,s,n) strncat((d), (s), (acpi_size)(n)) | 234 | #define ACPI_STRNCAT(d,s,n) strncat((d), (s), (acpi_size)(n)) |
236 | #define ACPI_STRTOUL(d,s,n) strtoul((d), (s), (acpi_size)(n)) | 235 | #define ACPI_STRTOUL(d,s,n) strtoul((d), (s), (acpi_size)(n)) |
237 | #define ACPI_MEMCMP(s1,s2,n) memcmp((s1), (s2), (acpi_size)(n)) | 236 | #define ACPI_MEMCMP(s1,s2,n) memcmp((const char *)(s1), (const char *)(s2), (acpi_size)(n)) |
238 | #define ACPI_MEMCPY(d,s,n) (void) memcpy((d), (s), (acpi_size)(n)) | 237 | #define ACPI_MEMCPY(d,s,n) (void) memcpy((d), (s), (acpi_size)(n)) |
239 | #define ACPI_MEMSET(d,s,n) (void) memset((d), (s), (acpi_size)(n)) | 238 | #define ACPI_MEMSET(d,s,n) (void) memset((d), (s), (acpi_size)(n)) |
240 | 239 | ||
@@ -246,7 +245,6 @@ | |||
246 | #define ACPI_IS_UPPER(i) isupper((int) (i)) | 245 | #define ACPI_IS_UPPER(i) isupper((int) (i)) |
247 | #define ACPI_IS_PRINT(i) isprint((int) (i)) | 246 | #define ACPI_IS_PRINT(i) isprint((int) (i)) |
248 | #define ACPI_IS_ALPHA(i) isalpha((int) (i)) | 247 | #define ACPI_IS_ALPHA(i) isalpha((int) (i)) |
249 | #define ACPI_IS_ASCII(i) isascii((int) (i)) | ||
250 | 248 | ||
251 | #else | 249 | #else |
252 | 250 | ||
@@ -273,8 +271,8 @@ typedef char *va_list; | |||
273 | /* | 271 | /* |
274 | * Storage alignment properties | 272 | * Storage alignment properties |
275 | */ | 273 | */ |
276 | #define _AUPBND (sizeof (acpi_native_int) - 1) | 274 | #define _AUPBND (sizeof (acpi_native_uint) - 1) |
277 | #define _ADNBND (sizeof (acpi_native_int) - 1) | 275 | #define _ADNBND (sizeof (acpi_native_uint) - 1) |
278 | 276 | ||
279 | /* | 277 | /* |
280 | * Variable argument list macro definitions | 278 | * Variable argument list macro definitions |
@@ -296,7 +294,7 @@ typedef char *va_list; | |||
296 | #define ACPI_STRCAT(d,s) (void) acpi_ut_strcat ((d), (s)) | 294 | #define ACPI_STRCAT(d,s) (void) acpi_ut_strcat ((d), (s)) |
297 | #define ACPI_STRNCAT(d,s,n) acpi_ut_strncat ((d), (s), (acpi_size)(n)) | 295 | #define ACPI_STRNCAT(d,s,n) acpi_ut_strncat ((d), (s), (acpi_size)(n)) |
298 | #define ACPI_STRTOUL(d,s,n) acpi_ut_strtoul ((d), (s), (acpi_size)(n)) | 296 | #define ACPI_STRTOUL(d,s,n) acpi_ut_strtoul ((d), (s), (acpi_size)(n)) |
299 | #define ACPI_MEMCMP(s1,s2,n) acpi_ut_memcmp((s1), (s2), (acpi_size)(n)) | 297 | #define ACPI_MEMCMP(s1,s2,n) acpi_ut_memcmp((const char *)(s1), (const char *)(s2), (acpi_size)(n)) |
300 | #define ACPI_MEMCPY(d,s,n) (void) acpi_ut_memcpy ((d), (s), (acpi_size)(n)) | 298 | #define ACPI_MEMCPY(d,s,n) (void) acpi_ut_memcpy ((d), (s), (acpi_size)(n)) |
301 | #define ACPI_MEMSET(d,v,n) (void) acpi_ut_memset ((d), (v), (acpi_size)(n)) | 299 | #define ACPI_MEMSET(d,v,n) (void) acpi_ut_memset ((d), (v), (acpi_size)(n)) |
302 | #define ACPI_TOUPPER acpi_ut_to_upper | 300 | #define ACPI_TOUPPER acpi_ut_to_upper |
diff --git a/include/acpi/platform/acgcc.h b/include/acpi/platform/acgcc.h index 4c0e0ba09ba0..da80933963db 100644 --- a/include/acpi/platform/acgcc.h +++ b/include/acpi/platform/acgcc.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -48,12 +48,14 @@ | |||
48 | 48 | ||
49 | #define ACPI_GET_FUNCTION_NAME __FUNCTION__ | 49 | #define ACPI_GET_FUNCTION_NAME __FUNCTION__ |
50 | 50 | ||
51 | /* This macro is used to tag functions as "printf-like" because | 51 | /* |
52 | * This macro is used to tag functions as "printf-like" because | ||
52 | * some compilers (like GCC) can catch printf format string problems. | 53 | * some compilers (like GCC) can catch printf format string problems. |
53 | */ | 54 | */ |
54 | #define ACPI_PRINTF_LIKE_FUNC __attribute__ ((__format__ (__printf__, 6, 7))) | 55 | #define ACPI_PRINTF_LIKE(c) __attribute__ ((__format__ (__printf__, c, c+1))) |
55 | 56 | ||
56 | /* Some compilers complain about unused variables. Sometimes we don't want to | 57 | /* |
58 | * Some compilers complain about unused variables. Sometimes we don't want to | ||
57 | * use all the variables (for example, _acpi_module_name). This allows us | 59 | * use all the variables (for example, _acpi_module_name). This allows us |
58 | * to to tell the compiler warning in a per-variable manner that a variable | 60 | * to to tell the compiler warning in a per-variable manner that a variable |
59 | * is unused. | 61 | * is unused. |
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index c93e6562f0e1..2e6d54569ee8 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -71,6 +71,10 @@ | |||
71 | #define acpi_cache_t kmem_cache_t | 71 | #define acpi_cache_t kmem_cache_t |
72 | #endif | 72 | #endif |
73 | 73 | ||
74 | /* Full namespace pathname length limit - arbitrary */ | ||
75 | |||
76 | #define ACPI_PATHNAME_MAX 256 | ||
77 | |||
74 | #else /* !__KERNEL__ */ | 78 | #else /* !__KERNEL__ */ |
75 | 79 | ||
76 | #include <stdarg.h> | 80 | #include <stdarg.h> |
@@ -98,4 +102,6 @@ | |||
98 | 102 | ||
99 | #include "acgcc.h" | 103 | #include "acgcc.h" |
100 | 104 | ||
105 | #define acpi_cpu_flags unsigned long | ||
106 | |||
101 | #endif /* __ACLINUX_H__ */ | 107 | #endif /* __ACLINUX_H__ */ |
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index 7a00d5089de9..badf0277b1be 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
@@ -62,9 +62,6 @@ struct acpi_processor_power { | |||
62 | u32 bm_activity; | 62 | u32 bm_activity; |
63 | int count; | 63 | int count; |
64 | struct acpi_processor_cx states[ACPI_PROCESSOR_MAX_POWER]; | 64 | struct acpi_processor_cx states[ACPI_PROCESSOR_MAX_POWER]; |
65 | |||
66 | /* the _PDC objects passed by the driver, if any */ | ||
67 | struct acpi_object_list *pdc; | ||
68 | }; | 65 | }; |
69 | 66 | ||
70 | /* Performance Management */ | 67 | /* Performance Management */ |
@@ -96,8 +93,6 @@ struct acpi_processor_performance { | |||
96 | unsigned int state_count; | 93 | unsigned int state_count; |
97 | struct acpi_processor_px *states; | 94 | struct acpi_processor_px *states; |
98 | 95 | ||
99 | /* the _PDC objects passed by the driver, if any */ | ||
100 | struct acpi_object_list *pdc; | ||
101 | }; | 96 | }; |
102 | 97 | ||
103 | /* Throttling Control */ | 98 | /* Throttling Control */ |
@@ -151,6 +146,9 @@ struct acpi_processor { | |||
151 | struct acpi_processor_performance *performance; | 146 | struct acpi_processor_performance *performance; |
152 | struct acpi_processor_throttling throttling; | 147 | struct acpi_processor_throttling throttling; |
153 | struct acpi_processor_limit limit; | 148 | struct acpi_processor_limit limit; |
149 | |||
150 | /* the _PDC objects for this processor, if any */ | ||
151 | struct acpi_object_list *pdc; | ||
154 | }; | 152 | }; |
155 | 153 | ||
156 | struct acpi_processor_errata { | 154 | struct acpi_processor_errata { |
@@ -178,22 +176,12 @@ int acpi_processor_notify_smm(struct module *calling_module); | |||
178 | extern struct acpi_processor *processors[NR_CPUS]; | 176 | extern struct acpi_processor *processors[NR_CPUS]; |
179 | extern struct acpi_processor_errata errata; | 177 | extern struct acpi_processor_errata errata; |
180 | 178 | ||
181 | int acpi_processor_set_pdc(struct acpi_processor *pr, | 179 | void arch_acpi_processor_init_pdc(struct acpi_processor *pr); |
182 | struct acpi_object_list *pdc_in); | ||
183 | 180 | ||
184 | #ifdef ARCH_HAS_POWER_PDC_INIT | 181 | #ifdef ARCH_HAS_POWER_INIT |
185 | void acpi_processor_power_init_pdc(struct acpi_processor_power *pow, | ||
186 | unsigned int cpu); | ||
187 | void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags, | 182 | void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags, |
188 | unsigned int cpu); | 183 | unsigned int cpu); |
189 | #else | 184 | #else |
190 | static inline void acpi_processor_power_init_pdc(struct acpi_processor_power | ||
191 | *pow, unsigned int cpu) | ||
192 | { | ||
193 | pow->pdc = NULL; | ||
194 | return; | ||
195 | } | ||
196 | |||
197 | static inline void acpi_processor_power_init_bm_check(struct | 185 | static inline void acpi_processor_power_init_bm_check(struct |
198 | acpi_processor_flags | 186 | acpi_processor_flags |
199 | *flags, unsigned int cpu) | 187 | *flags, unsigned int cpu) |
@@ -235,9 +223,6 @@ static inline int acpi_processor_ppc_has_changed(struct acpi_processor *pr) | |||
235 | /* in processor_throttling.c */ | 223 | /* in processor_throttling.c */ |
236 | int acpi_processor_get_throttling_info(struct acpi_processor *pr); | 224 | int acpi_processor_get_throttling_info(struct acpi_processor *pr); |
237 | int acpi_processor_set_throttling(struct acpi_processor *pr, int state); | 225 | int acpi_processor_set_throttling(struct acpi_processor *pr, int state); |
238 | ssize_t acpi_processor_write_throttling(struct file *file, | ||
239 | const char __user * buffer, | ||
240 | size_t count, loff_t * data); | ||
241 | extern struct file_operations acpi_processor_throttling_fops; | 226 | extern struct file_operations acpi_processor_throttling_fops; |
242 | 227 | ||
243 | /* in processor_idle.c */ | 228 | /* in processor_idle.c */ |
@@ -249,9 +234,6 @@ int acpi_processor_power_exit(struct acpi_processor *pr, | |||
249 | 234 | ||
250 | /* in processor_thermal.c */ | 235 | /* in processor_thermal.c */ |
251 | int acpi_processor_get_limit_info(struct acpi_processor *pr); | 236 | int acpi_processor_get_limit_info(struct acpi_processor *pr); |
252 | ssize_t acpi_processor_write_limit(struct file *file, | ||
253 | const char __user * buffer, | ||
254 | size_t count, loff_t * data); | ||
255 | extern struct file_operations acpi_processor_limit_fops; | 237 | extern struct file_operations acpi_processor_limit_fops; |
256 | 238 | ||
257 | #ifdef CONFIG_CPU_FREQ | 239 | #ifdef CONFIG_CPU_FREQ |
diff --git a/include/asm-alpha/dma-mapping.h b/include/asm-alpha/dma-mapping.h index 9dc7256cf979..62d0d6681aa9 100644 --- a/include/asm-alpha/dma-mapping.h +++ b/include/asm-alpha/dma-mapping.h | |||
@@ -30,6 +30,7 @@ | |||
30 | 30 | ||
31 | #else /* no PCI - no IOMMU. */ | 31 | #else /* no PCI - no IOMMU. */ |
32 | 32 | ||
33 | struct scatterlist; | ||
33 | void *dma_alloc_coherent(struct device *dev, size_t size, | 34 | void *dma_alloc_coherent(struct device *dev, size_t size, |
34 | dma_addr_t *dma_handle, gfp_t gfp); | 35 | dma_addr_t *dma_handle, gfp_t gfp); |
35 | int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | 36 | int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, |
diff --git a/include/asm-alpha/mman.h b/include/asm-alpha/mman.h index f6439532a262..5f24c755f577 100644 --- a/include/asm-alpha/mman.h +++ b/include/asm-alpha/mman.h | |||
@@ -42,7 +42,11 @@ | |||
42 | #define MADV_WILLNEED 3 /* will need these pages */ | 42 | #define MADV_WILLNEED 3 /* will need these pages */ |
43 | #define MADV_SPACEAVAIL 5 /* ensure resources are available */ | 43 | #define MADV_SPACEAVAIL 5 /* ensure resources are available */ |
44 | #define MADV_DONTNEED 6 /* don't need these pages */ | 44 | #define MADV_DONTNEED 6 /* don't need these pages */ |
45 | #define MADV_REMOVE 7 /* remove these pages & resources */ | 45 | |
46 | /* common/generic parameters */ | ||
47 | #define MADV_REMOVE 9 /* remove these pages & resources */ | ||
48 | #define MADV_DONTFORK 10 /* don't inherit across fork */ | ||
49 | #define MADV_DOFORK 11 /* do inherit across fork */ | ||
46 | 50 | ||
47 | /* compatibility flags */ | 51 | /* compatibility flags */ |
48 | #define MAP_ANON MAP_ANONYMOUS | 52 | #define MAP_ANON MAP_ANONYMOUS |
diff --git a/include/asm-alpha/system.h b/include/asm-alpha/system.h index cc9c7e8cced5..f3b7b1a59c56 100644 --- a/include/asm-alpha/system.h +++ b/include/asm-alpha/system.h | |||
@@ -572,7 +572,7 @@ __cmpxchg_u64(volatile long *m, unsigned long old, unsigned long new) | |||
572 | if something tries to do an invalid cmpxchg(). */ | 572 | if something tries to do an invalid cmpxchg(). */ |
573 | extern void __cmpxchg_called_with_bad_pointer(void); | 573 | extern void __cmpxchg_called_with_bad_pointer(void); |
574 | 574 | ||
575 | static inline unsigned long | 575 | static __always_inline unsigned long |
576 | __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) | 576 | __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) |
577 | { | 577 | { |
578 | switch (size) { | 578 | switch (size) { |
diff --git a/include/asm-arm/arch-at91rm9200/gpio.h b/include/asm-arm/arch-at91rm9200/gpio.h index 0f0a61e2f129..6176ab2dc417 100644 --- a/include/asm-arm/arch-at91rm9200/gpio.h +++ b/include/asm-arm/arch-at91rm9200/gpio.h | |||
@@ -183,6 +183,7 @@ extern int at91_set_B_periph(unsigned pin, int use_pullup); | |||
183 | extern int at91_set_gpio_input(unsigned pin, int use_pullup); | 183 | extern int at91_set_gpio_input(unsigned pin, int use_pullup); |
184 | extern int at91_set_gpio_output(unsigned pin, int value); | 184 | extern int at91_set_gpio_output(unsigned pin, int value); |
185 | extern int at91_set_deglitch(unsigned pin, int is_on); | 185 | extern int at91_set_deglitch(unsigned pin, int is_on); |
186 | extern int at91_set_multi_drive(unsigned pin, int is_on); | ||
186 | 187 | ||
187 | /* callable at any time */ | 188 | /* callable at any time */ |
188 | extern int at91_set_gpio_value(unsigned pin, int value); | 189 | extern int at91_set_gpio_value(unsigned pin, int value); |
diff --git a/include/asm-arm/arch-ixp4xx/nas100d.h b/include/asm-arm/arch-ixp4xx/nas100d.h index 51ac0180427c..84467a5190d0 100644 --- a/include/asm-arm/arch-ixp4xx/nas100d.h +++ b/include/asm-arm/arch-ixp4xx/nas100d.h | |||
@@ -19,8 +19,8 @@ | |||
19 | #error "Do not include this directly, instead #include <asm/hardware.h>" | 19 | #error "Do not include this directly, instead #include <asm/hardware.h>" |
20 | #endif | 20 | #endif |
21 | 21 | ||
22 | #define NAS100D_SDA_PIN 6 | 22 | #define NAS100D_SDA_PIN 5 |
23 | #define NAS100D_SCL_PIN 5 | 23 | #define NAS100D_SCL_PIN 6 |
24 | 24 | ||
25 | /* | 25 | /* |
26 | * NAS100D PCI IRQs | 26 | * NAS100D PCI IRQs |
diff --git a/include/asm-arm/arch-omap/io.h b/include/asm-arm/arch-omap/io.h index f5bcc9a1aed6..b726acfcab14 100644 --- a/include/asm-arm/arch-omap/io.h +++ b/include/asm-arm/arch-omap/io.h | |||
@@ -116,7 +116,11 @@ typedef struct { volatile u32 offset[4096]; } __regbase32; | |||
116 | ->offset[((vaddr)&4095)>>2] | 116 | ->offset[((vaddr)&4095)>>2] |
117 | #define __REG32(paddr) __REGV32(io_p2v(paddr)) | 117 | #define __REG32(paddr) __REGV32(io_p2v(paddr)) |
118 | 118 | ||
119 | extern void omap_map_common_io(void); | 119 | extern void omap1_map_common_io(void); |
120 | extern void omap1_init_common_hw(void); | ||
121 | |||
122 | extern void omap2_map_common_io(void); | ||
123 | extern void omap2_init_common_hw(void); | ||
120 | 124 | ||
121 | #else | 125 | #else |
122 | 126 | ||
diff --git a/include/asm-arm/arch-s3c2410/debug-macro.S b/include/asm-arm/arch-s3c2410/debug-macro.S index abfbe45cd17c..5f8223e700d3 100644 --- a/include/asm-arm/arch-s3c2410/debug-macro.S +++ b/include/asm-arm/arch-s3c2410/debug-macro.S | |||
@@ -25,7 +25,7 @@ | |||
25 | .macro addruart, rx | 25 | .macro addruart, rx |
26 | mrc p15, 0, \rx, c1, c0 | 26 | mrc p15, 0, \rx, c1, c0 |
27 | tst \rx, #1 | 27 | tst \rx, #1 |
28 | ldreq \rx, = S3C2410_PA_UART | 28 | ldreq \rx, = S3C24XX_PA_UART |
29 | ldrne \rx, = S3C24XX_VA_UART | 29 | ldrne \rx, = S3C24XX_VA_UART |
30 | #if CONFIG_DEBUG_S3C2410_UART != 0 | 30 | #if CONFIG_DEBUG_S3C2410_UART != 0 |
31 | add \rx, \rx, #(S3C2410_UART1_OFF * CONFIG_DEBUG_S3C2410_UART) | 31 | add \rx, \rx, #(S3C2410_UART1_OFF * CONFIG_DEBUG_S3C2410_UART) |
@@ -44,7 +44,7 @@ | |||
44 | 1003: | 44 | 1003: |
45 | mrc p15, 0, \rd, c1, c0 | 45 | mrc p15, 0, \rd, c1, c0 |
46 | tst \rd, #1 | 46 | tst \rd, #1 |
47 | addeq \rd, \rx, #(S3C2410_PA_GPIO - S3C2410_PA_UART) | 47 | addeq \rd, \rx, #(S3C24XX_PA_GPIO - S3C24XX_PA_UART) |
48 | addne \rd, \rx, #(S3C24XX_VA_GPIO - S3C24XX_VA_UART) | 48 | addne \rd, \rx, #(S3C24XX_VA_GPIO - S3C24XX_VA_UART) |
49 | bic \rd, \rd, #0xff000 | 49 | bic \rd, \rd, #0xff000 |
50 | ldr \rd, [ \rd, # S3C2410_GSTATUS1 - S3C2410_GPIOREG(0) ] | 50 | ldr \rd, [ \rd, # S3C2410_GSTATUS1 - S3C2410_GPIOREG(0) ] |
@@ -75,7 +75,7 @@ | |||
75 | 1003: | 75 | 1003: |
76 | mrc p15, 0, \rd, c1, c0 | 76 | mrc p15, 0, \rd, c1, c0 |
77 | tst \rd, #1 | 77 | tst \rd, #1 |
78 | addeq \rd, \rx, #(S3C2410_PA_GPIO - S3C2410_PA_UART) | 78 | addeq \rd, \rx, #(S3C24XX_PA_GPIO - S3C24XX_PA_UART) |
79 | addne \rd, \rx, #(S3C24XX_VA_GPIO - S3C24XX_VA_UART) | 79 | addne \rd, \rx, #(S3C24XX_VA_GPIO - S3C24XX_VA_UART) |
80 | bic \rd, \rd, #0xff000 | 80 | bic \rd, \rd, #0xff000 |
81 | ldr \rd, [ \rd, # S3C2410_GSTATUS1 - S3C2410_GPIOREG(0) ] | 81 | ldr \rd, [ \rd, # S3C2410_GSTATUS1 - S3C2410_GPIOREG(0) ] |
diff --git a/include/asm-arm/arch-s3c2410/h1940-latch.h b/include/asm-arm/arch-s3c2410/h1940-latch.h new file mode 100644 index 000000000000..c5802411f43d --- /dev/null +++ b/include/asm-arm/arch-s3c2410/h1940-latch.h | |||
@@ -0,0 +1,64 @@ | |||
1 | /* linux/include/asm-arm/arch-s3c2410/h1940-latch.h | ||
2 | * | ||
3 | * (c) 2005 Simtec Electronics | ||
4 | * http://armlinux.simtec.co.uk/ | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * | ||
7 | * iPAQ H1940 series - latch definitions | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASM_ARCH_H1940_LATCH_H | ||
15 | #define __ASM_ARCH_H1940_LATCH_H | ||
16 | |||
17 | |||
18 | #ifndef __ASSEMBLY__ | ||
19 | #define H1940_LATCH ((void __iomem *)0xF8000000) | ||
20 | #else | ||
21 | #define H1940_LATCH 0xF8000000 | ||
22 | #endif | ||
23 | |||
24 | #define H1940_PA_LATCH (S3C2410_CS2) | ||
25 | |||
26 | /* SD layer latch */ | ||
27 | |||
28 | #define H1940_LATCH_SDQ1 (1<<16) | ||
29 | #define H1940_LATCH_LCD_P1 (1<<17) | ||
30 | #define H1940_LATCH_LCD_P2 (1<<18) | ||
31 | #define H1940_LATCH_LCD_P3 (1<<19) | ||
32 | #define H1940_LATCH_MAX1698_nSHUTDOWN (1<<20) /* LCD backlight */ | ||
33 | #define H1940_LATCH_LED_RED (1<<21) | ||
34 | #define H1940_LATCH_SDQ7 (1<<22) | ||
35 | #define H1940_LATCH_USB_DP (1<<23) | ||
36 | |||
37 | /* CPU layer latch */ | ||
38 | |||
39 | #define H1940_LATCH_UDA_POWER (1<<24) | ||
40 | #define H1940_LATCH_AUDIO_POWER (1<<25) | ||
41 | #define H1940_LATCH_SM803_ENABLE (1<<26) | ||
42 | #define H1940_LATCH_LCD_P4 (1<<27) | ||
43 | #define H1940_LATCH_CPUQ5 (1<<28) /* untraced */ | ||
44 | #define H1940_LATCH_BLUETOOTH_POWER (1<<29) /* active high */ | ||
45 | #define H1940_LATCH_LED_GREEN (1<<30) | ||
46 | #define H1940_LATCH_LED_FLASH (1<<31) | ||
47 | |||
48 | /* default settings */ | ||
49 | |||
50 | #define H1940_LATCH_DEFAULT \ | ||
51 | H1940_LATCH_LCD_P4 | \ | ||
52 | H1940_LATCH_SM803_ENABLE | \ | ||
53 | H1940_LATCH_SDQ1 | \ | ||
54 | H1940_LATCH_LCD_P1 | \ | ||
55 | H1940_LATCH_LCD_P2 | \ | ||
56 | H1940_LATCH_LCD_P3 | \ | ||
57 | H1940_LATCH_MAX1698_nSHUTDOWN | \ | ||
58 | H1940_LATCH_CPUQ5 | ||
59 | |||
60 | /* control functions */ | ||
61 | |||
62 | extern void h1940_latch_control(unsigned int clear, unsigned int set); | ||
63 | |||
64 | #endif /* __ASM_ARCH_H1940_LATCH_H */ | ||
diff --git a/include/asm-arm/arch-s3c2410/hardware.h b/include/asm-arm/arch-s3c2410/hardware.h index 1c9de29cafef..a2330bf83695 100644 --- a/include/asm-arm/arch-s3c2410/hardware.h +++ b/include/asm-arm/arch-s3c2410/hardware.h | |||
@@ -17,6 +17,7 @@ | |||
17 | * 14-Sep-2004 BJD Added misccr and getpin to gpio | 17 | * 14-Sep-2004 BJD Added misccr and getpin to gpio |
18 | * 01-Oct-2004 BJD Added the new gpio functions | 18 | * 01-Oct-2004 BJD Added the new gpio functions |
19 | * 16-Oct-2004 BJD Removed the clock variables | 19 | * 16-Oct-2004 BJD Removed the clock variables |
20 | * 15-Jan-2006 LCVR Added s3c2400_gpio_getirq() | ||
20 | */ | 21 | */ |
21 | 22 | ||
22 | #ifndef __ASM_ARCH_HARDWARE_H | 23 | #ifndef __ASM_ARCH_HARDWARE_H |
@@ -55,6 +56,12 @@ extern unsigned int s3c2410_gpio_getcfg(unsigned int pin); | |||
55 | 56 | ||
56 | extern int s3c2410_gpio_getirq(unsigned int pin); | 57 | extern int s3c2410_gpio_getirq(unsigned int pin); |
57 | 58 | ||
59 | #ifdef CONFIG_CPU_S3C2400 | ||
60 | |||
61 | extern int s3c2400_gpio_getirq(unsigned int pin); | ||
62 | |||
63 | #endif /* CONFIG_CPU_S3C2400 */ | ||
64 | |||
58 | /* s3c2410_gpio_irqfilter | 65 | /* s3c2410_gpio_irqfilter |
59 | * | 66 | * |
60 | * set the irq filtering on the given pin | 67 | * set the irq filtering on the given pin |
diff --git a/include/asm-arm/arch-s3c2410/map.h b/include/asm-arm/arch-s3c2410/map.h index 1833ea5c4220..c380d264a847 100644 --- a/include/asm-arm/arch-s3c2410/map.h +++ b/include/asm-arm/arch-s3c2410/map.h | |||
@@ -14,6 +14,7 @@ | |||
14 | * 06-Jan-2003 BJD Linux 2.6.0 version, moved bast specifics out | 14 | * 06-Jan-2003 BJD Linux 2.6.0 version, moved bast specifics out |
15 | * 10-Feb-2005 BJD Added CAMIF definition from guillaume.gourat@nexvision.tv | 15 | * 10-Feb-2005 BJD Added CAMIF definition from guillaume.gourat@nexvision.tv |
16 | * 10-Mar-2005 LCVR Added support to S3C2400, changed {VA,SZ} names | 16 | * 10-Mar-2005 LCVR Added support to S3C2400, changed {VA,SZ} names |
17 | * 15-Jan-2006 LCVR Added S3C24XX_PA macros for common S3C24XX resources | ||
17 | */ | 18 | */ |
18 | 19 | ||
19 | #ifndef __ASM_ARCH_MAP_H | 20 | #ifndef __ASM_ARCH_MAP_H |
@@ -188,5 +189,42 @@ | |||
188 | 189 | ||
189 | #define S3C2400_SDRAM_PA (S3C2400_CS6) | 190 | #define S3C2400_SDRAM_PA (S3C2400_CS6) |
190 | 191 | ||
192 | /* Use a single interface for common resources between S3C24XX cpus */ | ||
193 | |||
194 | #ifdef CONFIG_CPU_S3C2400 | ||
195 | #define S3C24XX_PA_IRQ S3C2400_PA_IRQ | ||
196 | #define S3C24XX_PA_MEMCTRL S3C2400_PA_MEMCTRL | ||
197 | #define S3C24XX_PA_USBHOST S3C2400_PA_USBHOST | ||
198 | #define S3C24XX_PA_DMA S3C2400_PA_DMA | ||
199 | #define S3C24XX_PA_CLKPWR S3C2400_PA_CLKPWR | ||
200 | #define S3C24XX_PA_LCD S3C2400_PA_LCD | ||
201 | #define S3C24XX_PA_UART S3C2400_PA_UART | ||
202 | #define S3C24XX_PA_TIMER S3C2400_PA_TIMER | ||
203 | #define S3C24XX_PA_USBDEV S3C2400_PA_USBDEV | ||
204 | #define S3C24XX_PA_WATCHDOG S3C2400_PA_WATCHDOG | ||
205 | #define S3C24XX_PA_IIC S3C2400_PA_IIC | ||
206 | #define S3C24XX_PA_IIS S3C2400_PA_IIS | ||
207 | #define S3C24XX_PA_GPIO S3C2400_PA_GPIO | ||
208 | #define S3C24XX_PA_RTC S3C2400_PA_RTC | ||
209 | #define S3C24XX_PA_ADC S3C2400_PA_ADC | ||
210 | #define S3C24XX_PA_SPI S3C2400_PA_SPI | ||
211 | #else | ||
212 | #define S3C24XX_PA_IRQ S3C2410_PA_IRQ | ||
213 | #define S3C24XX_PA_MEMCTRL S3C2410_PA_MEMCTRL | ||
214 | #define S3C24XX_PA_USBHOST S3C2410_PA_USBHOST | ||
215 | #define S3C24XX_PA_DMA S3C2410_PA_DMA | ||
216 | #define S3C24XX_PA_CLKPWR S3C2410_PA_CLKPWR | ||
217 | #define S3C24XX_PA_LCD S3C2410_PA_LCD | ||
218 | #define S3C24XX_PA_UART S3C2410_PA_UART | ||
219 | #define S3C24XX_PA_TIMER S3C2410_PA_TIMER | ||
220 | #define S3C24XX_PA_USBDEV S3C2410_PA_USBDEV | ||
221 | #define S3C24XX_PA_WATCHDOG S3C2410_PA_WATCHDOG | ||
222 | #define S3C24XX_PA_IIC S3C2410_PA_IIC | ||
223 | #define S3C24XX_PA_IIS S3C2410_PA_IIS | ||
224 | #define S3C24XX_PA_GPIO S3C2410_PA_GPIO | ||
225 | #define S3C24XX_PA_RTC S3C2410_PA_RTC | ||
226 | #define S3C24XX_PA_ADC S3C2410_PA_ADC | ||
227 | #define S3C24XX_PA_SPI S3C2410_PA_SPI | ||
228 | #endif | ||
191 | 229 | ||
192 | #endif /* __ASM_ARCH_MAP_H */ | 230 | #endif /* __ASM_ARCH_MAP_H */ |
diff --git a/include/asm-arm/arch-s3c2410/regs-gpio.h b/include/asm-arm/arch-s3c2410/regs-gpio.h index 7f1be48ad67e..9697f93afe74 100644 --- a/include/asm-arm/arch-s3c2410/regs-gpio.h +++ b/include/asm-arm/arch-s3c2410/regs-gpio.h | |||
@@ -22,6 +22,7 @@ | |||
22 | * 28-Mar-2005 LCVR Fixed definition of GPB10 | 22 | * 28-Mar-2005 LCVR Fixed definition of GPB10 |
23 | * 26-Oct-2005 BJD Added generic configuration types | 23 | * 26-Oct-2005 BJD Added generic configuration types |
24 | * 27-Nov-2005 LCVR Added definitions to S3C2400 registers | 24 | * 27-Nov-2005 LCVR Added definitions to S3C2400 registers |
25 | * 15-Jan-2006 LCVR Written S3C24XX_GPIO_BASE() macro | ||
25 | */ | 26 | */ |
26 | 27 | ||
27 | 28 | ||
@@ -39,6 +40,27 @@ | |||
39 | #define S3C2410_GPIO_BANKG (32*6) | 40 | #define S3C2410_GPIO_BANKG (32*6) |
40 | #define S3C2410_GPIO_BANKH (32*7) | 41 | #define S3C2410_GPIO_BANKH (32*7) |
41 | 42 | ||
43 | #ifdef CONFIG_CPU_S3C2400 | ||
44 | #define S3C24XX_GPIO_BASE(x) S3C2400_GPIO_BASE(x) | ||
45 | #define S3C24XX_MISCCR S3C2400_MISCCR | ||
46 | #else | ||
47 | #define S3C24XX_GPIO_BASE(x) S3C2410_GPIO_BASE(x) | ||
48 | #define S3C24XX_MISCCR S3C2410_MISCCR | ||
49 | #endif /* CONFIG_CPU_S3C2400 */ | ||
50 | |||
51 | |||
52 | /* S3C2400 doesn't have a 1:1 mapping to S3C2410 gpio base pins */ | ||
53 | |||
54 | #define S3C2400_BANKNUM(pin) (((pin) & ~31) / 32) | ||
55 | #define S3C2400_BASEA2B(pin) ((((pin) & ~31) >> 2)) | ||
56 | #define S3C2400_BASEC2H(pin) ((S3C2400_BANKNUM(pin) * 10) + \ | ||
57 | (2 * (S3C2400_BANKNUM(pin)-2))) | ||
58 | |||
59 | #define S3C2400_GPIO_BASE(pin) (pin < S3C2410_GPIO_BANKC ? \ | ||
60 | S3C2400_BASEA2B(pin)+S3C24XX_VA_GPIO : \ | ||
61 | S3C2400_BASEC2H(pin)+S3C24XX_VA_GPIO) | ||
62 | |||
63 | |||
42 | #define S3C2410_GPIO_BASE(pin) ((((pin) & ~31) >> 1) + S3C24XX_VA_GPIO) | 64 | #define S3C2410_GPIO_BASE(pin) ((((pin) & ~31) >> 1) + S3C24XX_VA_GPIO) |
43 | #define S3C2410_GPIO_OFFSET(pin) ((pin) & 31) | 65 | #define S3C2410_GPIO_OFFSET(pin) ((pin) & 31) |
44 | 66 | ||
diff --git a/include/asm-arm/arch-s3c2410/regs-serial.h b/include/asm-arm/arch-s3c2410/regs-serial.h index ce1bbbaad6d3..83b01254c4ac 100644 --- a/include/asm-arm/arch-s3c2410/regs-serial.h +++ b/include/asm-arm/arch-s3c2410/regs-serial.h | |||
@@ -39,9 +39,9 @@ | |||
39 | #define S3C24XX_VA_UART1 (S3C24XX_VA_UART + 0x4000 ) | 39 | #define S3C24XX_VA_UART1 (S3C24XX_VA_UART + 0x4000 ) |
40 | #define S3C24XX_VA_UART2 (S3C24XX_VA_UART + 0x8000 ) | 40 | #define S3C24XX_VA_UART2 (S3C24XX_VA_UART + 0x8000 ) |
41 | 41 | ||
42 | #define S3C2410_PA_UART0 (S3C2410_PA_UART) | 42 | #define S3C2410_PA_UART0 (S3C24XX_PA_UART) |
43 | #define S3C2410_PA_UART1 (S3C2410_PA_UART + 0x4000 ) | 43 | #define S3C2410_PA_UART1 (S3C24XX_PA_UART + 0x4000 ) |
44 | #define S3C2410_PA_UART2 (S3C2410_PA_UART + 0x8000 ) | 44 | #define S3C2410_PA_UART2 (S3C24XX_PA_UART + 0x8000 ) |
45 | 45 | ||
46 | #define S3C2410_URXH (0x24) | 46 | #define S3C2410_URXH (0x24) |
47 | #define S3C2410_UTXH (0x20) | 47 | #define S3C2410_UTXH (0x20) |
diff --git a/include/asm-arm/arch-s3c2410/uncompress.h b/include/asm-arm/arch-s3c2410/uncompress.h index ddd1578a7ee0..4367ec054b51 100644 --- a/include/asm-arm/arch-s3c2410/uncompress.h +++ b/include/asm-arm/arch-s3c2410/uncompress.h | |||
@@ -35,13 +35,13 @@ | |||
35 | #undef S3C2410_GPIOREG | 35 | #undef S3C2410_GPIOREG |
36 | #undef S3C2410_WDOGREG | 36 | #undef S3C2410_WDOGREG |
37 | 37 | ||
38 | #define S3C2410_GPIOREG(x) ((S3C2410_PA_GPIO + (x))) | 38 | #define S3C2410_GPIOREG(x) ((S3C24XX_PA_GPIO + (x))) |
39 | #define S3C2410_WDOGREG(x) ((S3C2410_PA_WATCHDOG + (x))) | 39 | #define S3C2410_WDOGREG(x) ((S3C24XX_PA_WATCHDOG + (x))) |
40 | 40 | ||
41 | /* how many bytes we allow into the FIFO at a time in FIFO mode */ | 41 | /* how many bytes we allow into the FIFO at a time in FIFO mode */ |
42 | #define FIFO_MAX (14) | 42 | #define FIFO_MAX (14) |
43 | 43 | ||
44 | #define uart_base S3C2410_PA_UART + (0x4000*CONFIG_S3C2410_LOWLEVEL_UART_PORT) | 44 | #define uart_base S3C24XX_PA_UART + (0x4000*CONFIG_S3C2410_LOWLEVEL_UART_PORT) |
45 | 45 | ||
46 | static __inline__ void | 46 | static __inline__ void |
47 | uart_wr(unsigned int reg, unsigned int val) | 47 | uart_wr(unsigned int reg, unsigned int val) |
diff --git a/include/asm-arm/checksum.h b/include/asm-arm/checksum.h index d4256d5f3a7c..747bdd31a74b 100644 --- a/include/asm-arm/checksum.h +++ b/include/asm-arm/checksum.h | |||
@@ -77,7 +77,7 @@ ip_fast_csum(unsigned char * iph, unsigned int ihl) | |||
77 | mov %0, %0, lsr #16" | 77 | mov %0, %0, lsr #16" |
78 | : "=r" (sum), "=r" (iph), "=r" (ihl), "=r" (tmp1) | 78 | : "=r" (sum), "=r" (iph), "=r" (ihl), "=r" (tmp1) |
79 | : "1" (iph), "2" (ihl) | 79 | : "1" (iph), "2" (ihl) |
80 | : "cc"); | 80 | : "cc", "memory"); |
81 | return sum; | 81 | return sum; |
82 | } | 82 | } |
83 | 83 | ||
diff --git a/include/asm-arm/fpstate.h b/include/asm-arm/fpstate.h index f7430e3aa55d..6246bf83627d 100644 --- a/include/asm-arm/fpstate.h +++ b/include/asm-arm/fpstate.h | |||
@@ -55,8 +55,10 @@ struct fp_soft_struct { | |||
55 | unsigned int save[FP_SOFT_SIZE]; /* undefined information */ | 55 | unsigned int save[FP_SOFT_SIZE]; /* undefined information */ |
56 | }; | 56 | }; |
57 | 57 | ||
58 | #define IWMMXT_SIZE 0x98 | ||
59 | |||
58 | struct iwmmxt_struct { | 60 | struct iwmmxt_struct { |
59 | unsigned int save[0x98/sizeof(int) + 1]; | 61 | unsigned int save[IWMMXT_SIZE / sizeof(unsigned int)]; |
60 | }; | 62 | }; |
61 | 63 | ||
62 | union fp_state { | 64 | union fp_state { |
diff --git a/include/asm-arm/mach/map.h b/include/asm-arm/mach/map.h index 3351b77fab36..e8ea67c97c73 100644 --- a/include/asm-arm/mach/map.h +++ b/include/asm-arm/mach/map.h | |||
@@ -26,6 +26,7 @@ struct meminfo; | |||
26 | #define MT_MEMORY 5 | 26 | #define MT_MEMORY 5 |
27 | #define MT_ROM 6 | 27 | #define MT_ROM 6 |
28 | #define MT_IXP2000_DEVICE 7 | 28 | #define MT_IXP2000_DEVICE 7 |
29 | #define MT_NONSHARED_DEVICE 8 | ||
29 | 30 | ||
30 | extern void create_memmap_holes(struct meminfo *); | 31 | extern void create_memmap_holes(struct meminfo *); |
31 | extern void memtable_init(struct meminfo *); | 32 | extern void memtable_init(struct meminfo *); |
diff --git a/include/asm-arm/mman.h b/include/asm-arm/mman.h index f0bebca2ac21..54570d2e95b7 100644 --- a/include/asm-arm/mman.h +++ b/include/asm-arm/mman.h | |||
@@ -1,19 +1,7 @@ | |||
1 | #ifndef __ARM_MMAN_H__ | 1 | #ifndef __ARM_MMAN_H__ |
2 | #define __ARM_MMAN_H__ | 2 | #define __ARM_MMAN_H__ |
3 | 3 | ||
4 | #define PROT_READ 0x1 /* page can be read */ | 4 | #include <asm-generic/mman.h> |
5 | #define PROT_WRITE 0x2 /* page can be written */ | ||
6 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
7 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
8 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
9 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
10 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
11 | |||
12 | #define MAP_SHARED 0x01 /* Share changes */ | ||
13 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
14 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
15 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
16 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
17 | 5 | ||
18 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 6 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
19 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 7 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
@@ -23,22 +11,7 @@ | |||
23 | #define MAP_POPULATE 0x8000 /* populate (prefault) page tables */ | 11 | #define MAP_POPULATE 0x8000 /* populate (prefault) page tables */ |
24 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 12 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
25 | 13 | ||
26 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
27 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
28 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
29 | |||
30 | #define MCL_CURRENT 1 /* lock all current mappings */ | 14 | #define MCL_CURRENT 1 /* lock all current mappings */ |
31 | #define MCL_FUTURE 2 /* lock all future mappings */ | 15 | #define MCL_FUTURE 2 /* lock all future mappings */ |
32 | 16 | ||
33 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
34 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
35 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
36 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
37 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
38 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
39 | |||
40 | /* compatibility flags */ | ||
41 | #define MAP_ANON MAP_ANONYMOUS | ||
42 | #define MAP_FILE 0 | ||
43 | |||
44 | #endif /* __ARM_MMAN_H__ */ | 17 | #endif /* __ARM_MMAN_H__ */ |
diff --git a/include/asm-arm/mutex.h b/include/asm-arm/mutex.h index 6caa59f1f595..cb29d84e690d 100644 --- a/include/asm-arm/mutex.h +++ b/include/asm-arm/mutex.h | |||
@@ -23,72 +23,71 @@ | |||
23 | * simply bail out immediately through the slow path where the lock will be | 23 | * simply bail out immediately through the slow path where the lock will be |
24 | * reattempted until it succeeds. | 24 | * reattempted until it succeeds. |
25 | */ | 25 | */ |
26 | #define __mutex_fastpath_lock(count, fail_fn) \ | 26 | static inline void |
27 | do { \ | 27 | __mutex_fastpath_lock(atomic_t *count, fastcall void (*fail_fn)(atomic_t *)) |
28 | int __ex_flag, __res; \ | 28 | { |
29 | \ | 29 | int __ex_flag, __res; |
30 | typecheck(atomic_t *, count); \ | 30 | |
31 | typecheck_fn(fastcall void (*)(atomic_t *), fail_fn); \ | 31 | __asm__ ( |
32 | \ | 32 | |
33 | __asm__ ( \ | 33 | "ldrex %0, [%2] \n\t" |
34 | "ldrex %0, [%2] \n" \ | 34 | "sub %0, %0, #1 \n\t" |
35 | "sub %0, %0, #1 \n" \ | 35 | "strex %1, %0, [%2] " |
36 | "strex %1, %0, [%2] \n" \ | 36 | |
37 | \ | 37 | : "=&r" (__res), "=&r" (__ex_flag) |
38 | : "=&r" (__res), "=&r" (__ex_flag) \ | 38 | : "r" (&(count)->counter) |
39 | : "r" (&(count)->counter) \ | 39 | : "cc","memory" ); |
40 | : "cc","memory" ); \ | 40 | |
41 | \ | 41 | __res |= __ex_flag; |
42 | if (unlikely(__res || __ex_flag)) \ | 42 | if (unlikely(__res != 0)) |
43 | fail_fn(count); \ | 43 | fail_fn(count); |
44 | } while (0) | 44 | } |
45 | 45 | ||
46 | #define __mutex_fastpath_lock_retval(count, fail_fn) \ | 46 | static inline int |
47 | ({ \ | 47 | __mutex_fastpath_lock_retval(atomic_t *count, fastcall int (*fail_fn)(atomic_t *)) |
48 | int __ex_flag, __res; \ | 48 | { |
49 | \ | 49 | int __ex_flag, __res; |
50 | typecheck(atomic_t *, count); \ | 50 | |
51 | typecheck_fn(fastcall int (*)(atomic_t *), fail_fn); \ | 51 | __asm__ ( |
52 | \ | 52 | |
53 | __asm__ ( \ | 53 | "ldrex %0, [%2] \n\t" |
54 | "ldrex %0, [%2] \n" \ | 54 | "sub %0, %0, #1 \n\t" |
55 | "sub %0, %0, #1 \n" \ | 55 | "strex %1, %0, [%2] " |
56 | "strex %1, %0, [%2] \n" \ | 56 | |
57 | \ | 57 | : "=&r" (__res), "=&r" (__ex_flag) |
58 | : "=&r" (__res), "=&r" (__ex_flag) \ | 58 | : "r" (&(count)->counter) |
59 | : "r" (&(count)->counter) \ | 59 | : "cc","memory" ); |
60 | : "cc","memory" ); \ | 60 | |
61 | \ | 61 | __res |= __ex_flag; |
62 | __res |= __ex_flag; \ | 62 | if (unlikely(__res != 0)) |
63 | if (unlikely(__res != 0)) \ | 63 | __res = fail_fn(count); |
64 | __res = fail_fn(count); \ | 64 | return __res; |
65 | __res; \ | 65 | } |
66 | }) | ||
67 | 66 | ||
68 | /* | 67 | /* |
69 | * Same trick is used for the unlock fast path. However the original value, | 68 | * Same trick is used for the unlock fast path. However the original value, |
70 | * rather than the result, is used to test for success in order to have | 69 | * rather than the result, is used to test for success in order to have |
71 | * better generated assembly. | 70 | * better generated assembly. |
72 | */ | 71 | */ |
73 | #define __mutex_fastpath_unlock(count, fail_fn) \ | 72 | static inline void |
74 | do { \ | 73 | __mutex_fastpath_unlock(atomic_t *count, fastcall void (*fail_fn)(atomic_t *)) |
75 | int __ex_flag, __res, __orig; \ | 74 | { |
76 | \ | 75 | int __ex_flag, __res, __orig; |
77 | typecheck(atomic_t *, count); \ | 76 | |
78 | typecheck_fn(fastcall void (*)(atomic_t *), fail_fn); \ | 77 | __asm__ ( |
79 | \ | 78 | |
80 | __asm__ ( \ | 79 | "ldrex %0, [%3] \n\t" |
81 | "ldrex %0, [%3] \n" \ | 80 | "add %1, %0, #1 \n\t" |
82 | "add %1, %0, #1 \n" \ | 81 | "strex %2, %1, [%3] " |
83 | "strex %2, %1, [%3] \n" \ | 82 | |
84 | \ | 83 | : "=&r" (__orig), "=&r" (__res), "=&r" (__ex_flag) |
85 | : "=&r" (__orig), "=&r" (__res), "=&r" (__ex_flag) \ | 84 | : "r" (&(count)->counter) |
86 | : "r" (&(count)->counter) \ | 85 | : "cc","memory" ); |
87 | : "cc","memory" ); \ | 86 | |
88 | \ | 87 | __orig |= __ex_flag; |
89 | if (unlikely(__orig || __ex_flag)) \ | 88 | if (unlikely(__orig != 0)) |
90 | fail_fn(count); \ | 89 | fail_fn(count); |
91 | } while (0) | 90 | } |
92 | 91 | ||
93 | /* | 92 | /* |
94 | * If the unlock was done on a contended lock, or if the unlock simply fails | 93 | * If the unlock was done on a contended lock, or if the unlock simply fails |
@@ -110,12 +109,12 @@ __mutex_fastpath_trylock(atomic_t *count, int (*fail_fn)(atomic_t *)) | |||
110 | 109 | ||
111 | __asm__ ( | 110 | __asm__ ( |
112 | 111 | ||
113 | "1: ldrex %0, [%3] \n" | 112 | "1: ldrex %0, [%3] \n\t" |
114 | "subs %1, %0, #1 \n" | 113 | "subs %1, %0, #1 \n\t" |
115 | "strexeq %2, %1, [%3] \n" | 114 | "strexeq %2, %1, [%3] \n\t" |
116 | "movlt %0, #0 \n" | 115 | "movlt %0, #0 \n\t" |
117 | "cmpeq %2, #0 \n" | 116 | "cmpeq %2, #0 \n\t" |
118 | "bgt 1b \n" | 117 | "bgt 1b " |
119 | 118 | ||
120 | : "=&r" (__orig), "=&r" (__res), "=&r" (__ex_flag) | 119 | : "=&r" (__orig), "=&r" (__res), "=&r" (__ex_flag) |
121 | : "r" (&count->counter) | 120 | : "r" (&count->counter) |
diff --git a/include/asm-arm/pgtable.h b/include/asm-arm/pgtable.h index 5a0d19b466b0..70e00d08345e 100644 --- a/include/asm-arm/pgtable.h +++ b/include/asm-arm/pgtable.h | |||
@@ -168,6 +168,7 @@ extern void __pgd_error(const char *file, int line, unsigned long val); | |||
168 | #define PMD_SECT_WB (PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE) | 168 | #define PMD_SECT_WB (PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE) |
169 | #define PMD_SECT_MINICACHE (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE) | 169 | #define PMD_SECT_MINICACHE (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE) |
170 | #define PMD_SECT_WBWA (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE) | 170 | #define PMD_SECT_WBWA (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE) |
171 | #define PMD_SECT_NONSHARED_DEV (PMD_SECT_TEX(2)) | ||
171 | 172 | ||
172 | /* | 173 | /* |
173 | * - coarse table (not used) | 174 | * - coarse table (not used) |
diff --git a/include/asm-arm/smp.h b/include/asm-arm/smp.h index 5a72e50ca9fc..fe45f7f61223 100644 --- a/include/asm-arm/smp.h +++ b/include/asm-arm/smp.h | |||
@@ -42,6 +42,11 @@ extern void show_ipi_list(struct seq_file *p); | |||
42 | asmlinkage void do_IPI(struct pt_regs *regs); | 42 | asmlinkage void do_IPI(struct pt_regs *regs); |
43 | 43 | ||
44 | /* | 44 | /* |
45 | * Setup the SMP cpu_possible_map | ||
46 | */ | ||
47 | extern void smp_init_cpus(void); | ||
48 | |||
49 | /* | ||
45 | * Move global data into per-processor storage. | 50 | * Move global data into per-processor storage. |
46 | */ | 51 | */ |
47 | extern void smp_store_cpu_info(unsigned int cpuid); | 52 | extern void smp_store_cpu_info(unsigned int cpuid); |
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h index eb2de8c10515..ec91d1ff032a 100644 --- a/include/asm-arm/system.h +++ b/include/asm-arm/system.h | |||
@@ -415,6 +415,9 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size | |||
415 | return ret; | 415 | return ret; |
416 | } | 416 | } |
417 | 417 | ||
418 | extern void disable_hlt(void); | ||
419 | extern void enable_hlt(void); | ||
420 | |||
418 | #endif /* __ASSEMBLY__ */ | 421 | #endif /* __ASSEMBLY__ */ |
419 | 422 | ||
420 | #define arch_align_stack(x) (x) | 423 | #define arch_align_stack(x) (x) |
diff --git a/include/asm-arm/thread_info.h b/include/asm-arm/thread_info.h index 33a33cbb6329..cfbccb63c67b 100644 --- a/include/asm-arm/thread_info.h +++ b/include/asm-arm/thread_info.h | |||
@@ -59,7 +59,7 @@ struct thread_info { | |||
59 | struct cpu_context_save cpu_context; /* cpu context */ | 59 | struct cpu_context_save cpu_context; /* cpu context */ |
60 | __u8 used_cp[16]; /* thread used copro */ | 60 | __u8 used_cp[16]; /* thread used copro */ |
61 | unsigned long tp_value; | 61 | unsigned long tp_value; |
62 | union fp_state fpstate; | 62 | union fp_state fpstate __attribute__((aligned(8))); |
63 | union vfp_state vfpstate; | 63 | union vfp_state vfpstate; |
64 | struct restart_block restart_block; | 64 | struct restart_block restart_block; |
65 | }; | 65 | }; |
diff --git a/include/asm-arm/tlbflush.h b/include/asm-arm/tlbflush.h index 9387a5e1ffe0..0c2acc944a0a 100644 --- a/include/asm-arm/tlbflush.h +++ b/include/asm-arm/tlbflush.h | |||
@@ -340,6 +340,12 @@ static inline void local_flush_tlb_kernel_page(unsigned long kaddr) | |||
340 | asm("mcr%? p15, 0, %0, c8, c6, 1" : : "r" (kaddr)); | 340 | asm("mcr%? p15, 0, %0, c8, c6, 1" : : "r" (kaddr)); |
341 | if (tlb_flag(TLB_V6_I_PAGE)) | 341 | if (tlb_flag(TLB_V6_I_PAGE)) |
342 | asm("mcr%? p15, 0, %0, c8, c5, 1" : : "r" (kaddr)); | 342 | asm("mcr%? p15, 0, %0, c8, c5, 1" : : "r" (kaddr)); |
343 | |||
344 | /* The ARM ARM states that the completion of a TLB maintenance | ||
345 | * operation is only guaranteed by a DSB instruction | ||
346 | */ | ||
347 | if (tlb_flag(TLB_V6_U_PAGE | TLB_V6_D_PAGE | TLB_V6_I_PAGE)) | ||
348 | asm("mcr%? p15, 0, %0, c7, c10, 4" : : "r" (zero)); | ||
343 | } | 349 | } |
344 | 350 | ||
345 | /* | 351 | /* |
diff --git a/include/asm-arm/unistd.h b/include/asm-arm/unistd.h index 77430d6178ae..8f331bbd39a8 100644 --- a/include/asm-arm/unistd.h +++ b/include/asm-arm/unistd.h | |||
@@ -309,7 +309,7 @@ | |||
309 | #define __NR_mq_getsetattr (__NR_SYSCALL_BASE+279) | 309 | #define __NR_mq_getsetattr (__NR_SYSCALL_BASE+279) |
310 | #define __NR_waitid (__NR_SYSCALL_BASE+280) | 310 | #define __NR_waitid (__NR_SYSCALL_BASE+280) |
311 | 311 | ||
312 | #if 0 /* reserve these for un-muxing socketcall */ | 312 | #if defined(__ARM_EABI__) /* reserve these for un-muxing socketcall */ |
313 | #define __NR_socket (__NR_SYSCALL_BASE+281) | 313 | #define __NR_socket (__NR_SYSCALL_BASE+281) |
314 | #define __NR_bind (__NR_SYSCALL_BASE+282) | 314 | #define __NR_bind (__NR_SYSCALL_BASE+282) |
315 | #define __NR_connect (__NR_SYSCALL_BASE+283) | 315 | #define __NR_connect (__NR_SYSCALL_BASE+283) |
@@ -329,7 +329,7 @@ | |||
329 | #define __NR_recvmsg (__NR_SYSCALL_BASE+297) | 329 | #define __NR_recvmsg (__NR_SYSCALL_BASE+297) |
330 | #endif | 330 | #endif |
331 | 331 | ||
332 | #if 0 /* reserve these for un-muxing ipc */ | 332 | #if defined(__ARM_EABI__) /* reserve these for un-muxing ipc */ |
333 | #define __NR_semop (__NR_SYSCALL_BASE+298) | 333 | #define __NR_semop (__NR_SYSCALL_BASE+298) |
334 | #define __NR_semget (__NR_SYSCALL_BASE+299) | 334 | #define __NR_semget (__NR_SYSCALL_BASE+299) |
335 | #define __NR_semctl (__NR_SYSCALL_BASE+300) | 335 | #define __NR_semctl (__NR_SYSCALL_BASE+300) |
@@ -347,7 +347,7 @@ | |||
347 | #define __NR_request_key (__NR_SYSCALL_BASE+310) | 347 | #define __NR_request_key (__NR_SYSCALL_BASE+310) |
348 | #define __NR_keyctl (__NR_SYSCALL_BASE+311) | 348 | #define __NR_keyctl (__NR_SYSCALL_BASE+311) |
349 | 349 | ||
350 | #if 0 /* reserved for un-muxing ipc */ | 350 | #if defined(__ARM_EABI__) /* reserved for un-muxing ipc */ |
351 | #define __NR_semtimedop (__NR_SYSCALL_BASE+312) | 351 | #define __NR_semtimedop (__NR_SYSCALL_BASE+312) |
352 | #endif | 352 | #endif |
353 | 353 | ||
diff --git a/include/asm-arm26/bitops.h b/include/asm-arm26/bitops.h index 15cc6f2da792..d87f8634e625 100644 --- a/include/asm-arm26/bitops.h +++ b/include/asm-arm26/bitops.h | |||
@@ -186,7 +186,7 @@ extern void _change_bit_le(int nr, volatile unsigned long * p); | |||
186 | extern int _test_and_set_bit_le(int nr, volatile unsigned long * p); | 186 | extern int _test_and_set_bit_le(int nr, volatile unsigned long * p); |
187 | extern int _test_and_clear_bit_le(int nr, volatile unsigned long * p); | 187 | extern int _test_and_clear_bit_le(int nr, volatile unsigned long * p); |
188 | extern int _test_and_change_bit_le(int nr, volatile unsigned long * p); | 188 | extern int _test_and_change_bit_le(int nr, volatile unsigned long * p); |
189 | extern int _find_first_zero_bit_le(void * p, unsigned size); | 189 | extern int _find_first_zero_bit_le(const unsigned long * p, unsigned size); |
190 | extern int _find_next_zero_bit_le(void * p, int size, int offset); | 190 | extern int _find_next_zero_bit_le(void * p, int size, int offset); |
191 | extern int _find_first_bit_le(const unsigned long *p, unsigned size); | 191 | extern int _find_first_bit_le(const unsigned long *p, unsigned size); |
192 | extern int _find_next_bit_le(const unsigned long *p, int size, int offset); | 192 | extern int _find_next_bit_le(const unsigned long *p, int size, int offset); |
@@ -326,7 +326,7 @@ static inline int sched_find_first_bit(unsigned long *b) | |||
326 | #define minix_test_and_clear_bit(nr,p) \ | 326 | #define minix_test_and_clear_bit(nr,p) \ |
327 | __test_and_clear_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p)) | 327 | __test_and_clear_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p)) |
328 | #define minix_find_first_zero_bit(p,sz) \ | 328 | #define minix_find_first_zero_bit(p,sz) \ |
329 | _find_first_zero_bit_le(p,sz) | 329 | _find_first_zero_bit_le((unsigned long *)(p),sz) |
330 | 330 | ||
331 | #endif /* __KERNEL__ */ | 331 | #endif /* __KERNEL__ */ |
332 | 332 | ||
diff --git a/include/asm-arm26/hardirq.h b/include/asm-arm26/hardirq.h index dc28daab8aa8..87c19d2bb6a8 100644 --- a/include/asm-arm26/hardirq.h +++ b/include/asm-arm26/hardirq.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/config.h> | 4 | #include <linux/config.h> |
5 | #include <linux/cache.h> | 5 | #include <linux/cache.h> |
6 | #include <linux/threads.h> | 6 | #include <linux/threads.h> |
7 | #include <asm/irq.h> | ||
7 | 8 | ||
8 | typedef struct { | 9 | typedef struct { |
9 | unsigned int __softirq_pending; | 10 | unsigned int __softirq_pending; |
@@ -26,13 +27,6 @@ typedef struct { | |||
26 | 27 | ||
27 | extern asmlinkage void __do_softirq(void); | 28 | extern asmlinkage void __do_softirq(void); |
28 | 29 | ||
29 | #define irq_exit() \ | ||
30 | do { \ | ||
31 | preempt_count() -= IRQ_EXIT_OFFSET; \ | ||
32 | if (!in_interrupt() && local_softirq_pending()) \ | ||
33 | __do_softirq(); \ | ||
34 | preempt_enable_no_resched(); \ | ||
35 | } while (0) | ||
36 | #endif | 30 | #endif |
37 | 31 | ||
38 | 32 | ||
diff --git a/include/asm-arm26/mman.h b/include/asm-arm26/mman.h index 0ed7780541fa..4000a6c1b76b 100644 --- a/include/asm-arm26/mman.h +++ b/include/asm-arm26/mman.h | |||
@@ -1,19 +1,7 @@ | |||
1 | #ifndef __ARM_MMAN_H__ | 1 | #ifndef __ARM_MMAN_H__ |
2 | #define __ARM_MMAN_H__ | 2 | #define __ARM_MMAN_H__ |
3 | 3 | ||
4 | #define PROT_READ 0x1 /* page can be read */ | 4 | #include <asm-generic/mman.h> |
5 | #define PROT_WRITE 0x2 /* page can be written */ | ||
6 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
7 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
8 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
9 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
10 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
11 | |||
12 | #define MAP_SHARED 0x01 /* Share changes */ | ||
13 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
14 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
15 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
16 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
17 | 5 | ||
18 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 6 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
19 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 7 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
@@ -23,22 +11,7 @@ | |||
23 | #define MAP_POPULATE 0x8000 /* populate (prefault) page tables */ | 11 | #define MAP_POPULATE 0x8000 /* populate (prefault) page tables */ |
24 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 12 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
25 | 13 | ||
26 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
27 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
28 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
29 | |||
30 | #define MCL_CURRENT 1 /* lock all current mappings */ | 14 | #define MCL_CURRENT 1 /* lock all current mappings */ |
31 | #define MCL_FUTURE 2 /* lock all future mappings */ | 15 | #define MCL_FUTURE 2 /* lock all future mappings */ |
32 | 16 | ||
33 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
34 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
35 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
36 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
37 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
38 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
39 | |||
40 | /* compatibility flags */ | ||
41 | #define MAP_ANON MAP_ANONYMOUS | ||
42 | #define MAP_FILE 0 | ||
43 | |||
44 | #endif /* __ARM_MMAN_H__ */ | 17 | #endif /* __ARM_MMAN_H__ */ |
diff --git a/include/asm-arm26/posix_types.h b/include/asm-arm26/posix_types.h index b88344ad390c..f8d1eb4f4cb1 100644 --- a/include/asm-arm26/posix_types.h +++ b/include/asm-arm26/posix_types.h | |||
@@ -44,6 +44,7 @@ typedef unsigned int __kernel_gid32_t; | |||
44 | 44 | ||
45 | typedef unsigned short __kernel_old_uid_t; | 45 | typedef unsigned short __kernel_old_uid_t; |
46 | typedef unsigned short __kernel_old_gid_t; | 46 | typedef unsigned short __kernel_old_gid_t; |
47 | typedef unsigned short __kernel_old_dev_t; | ||
47 | 48 | ||
48 | #ifdef __GNUC__ | 49 | #ifdef __GNUC__ |
49 | typedef long long __kernel_loff_t; | 50 | typedef long long __kernel_loff_t; |
diff --git a/include/asm-arm26/system.h b/include/asm-arm26/system.h index ca4ccfc4b578..702884926a55 100644 --- a/include/asm-arm26/system.h +++ b/include/asm-arm26/system.h | |||
@@ -98,9 +98,8 @@ extern unsigned int user_debug; | |||
98 | * spin_unlock_irq() and friends are implemented. This avoids | 98 | * spin_unlock_irq() and friends are implemented. This avoids |
99 | * us needlessly decrementing and incrementing the preempt count. | 99 | * us needlessly decrementing and incrementing the preempt count. |
100 | */ | 100 | */ |
101 | #define prepare_arch_switch(rq,next) local_irq_enable() | 101 | #define prepare_arch_switch(next) local_irq_enable() |
102 | #define finish_arch_switch(rq,prev) spin_unlock(&(rq)->lock) | 102 | #define finish_arch_switch(prev) spin_unlock(&(rq)->lock) |
103 | #define task_running(rq,p) ((rq)->curr == (p)) | ||
104 | 103 | ||
105 | /* | 104 | /* |
106 | * switch_to(prev, next) should switch from task `prev' to `next' | 105 | * switch_to(prev, next) should switch from task `prev' to `next' |
diff --git a/include/asm-cris/bitops.h b/include/asm-cris/bitops.h index d3eb0f1e4208..b7fef1572dc0 100644 --- a/include/asm-cris/bitops.h +++ b/include/asm-cris/bitops.h | |||
@@ -290,7 +290,7 @@ static inline int find_next_zero_bit (const unsigned long * addr, int size, int | |||
290 | tmp = *p; | 290 | tmp = *p; |
291 | 291 | ||
292 | found_first: | 292 | found_first: |
293 | tmp |= ~0UL >> size; | 293 | tmp |= ~0UL << size; |
294 | found_middle: | 294 | found_middle: |
295 | return result + ffz(tmp); | 295 | return result + ffz(tmp); |
296 | } | 296 | } |
diff --git a/include/asm-cris/mman.h b/include/asm-cris/mman.h index 5a382b8bf3f7..1c35e1b66b46 100644 --- a/include/asm-cris/mman.h +++ b/include/asm-cris/mman.h | |||
@@ -3,19 +3,7 @@ | |||
3 | 3 | ||
4 | /* verbatim copy of asm-i386/ version */ | 4 | /* verbatim copy of asm-i386/ version */ |
5 | 5 | ||
6 | #define PROT_READ 0x1 /* page can be read */ | 6 | #include <asm-generic/mman.h> |
7 | #define PROT_WRITE 0x2 /* page can be written */ | ||
8 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
9 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
10 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
11 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
12 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
13 | |||
14 | #define MAP_SHARED 0x01 /* Share changes */ | ||
15 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
16 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
17 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
18 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
19 | 7 | ||
20 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 8 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
21 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 9 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
@@ -25,22 +13,7 @@ | |||
25 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | 13 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ |
26 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 14 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
27 | 15 | ||
28 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
29 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
30 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
31 | |||
32 | #define MCL_CURRENT 1 /* lock all current mappings */ | 16 | #define MCL_CURRENT 1 /* lock all current mappings */ |
33 | #define MCL_FUTURE 2 /* lock all future mappings */ | 17 | #define MCL_FUTURE 2 /* lock all future mappings */ |
34 | 18 | ||
35 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
36 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
37 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
38 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
39 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
40 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
41 | |||
42 | /* compatibility flags */ | ||
43 | #define MAP_ANON MAP_ANONYMOUS | ||
44 | #define MAP_FILE 0 | ||
45 | |||
46 | #endif /* __CRIS_MMAN_H__ */ | 19 | #endif /* __CRIS_MMAN_H__ */ |
diff --git a/include/asm-frv/atomic.h b/include/asm-frv/atomic.h index a59f684b4f33..5d9f84bfdcad 100644 --- a/include/asm-frv/atomic.h +++ b/include/asm-frv/atomic.h | |||
@@ -220,9 +220,9 @@ extern unsigned long atomic_test_and_XOR_mask(unsigned long mask, volatile unsig | |||
220 | switch (sizeof(__xg_orig)) { \ | 220 | switch (sizeof(__xg_orig)) { \ |
221 | case 4: \ | 221 | case 4: \ |
222 | asm volatile( \ | 222 | asm volatile( \ |
223 | "swap%I0 %2,%M0" \ | 223 | "swap%I0 %M0,%1" \ |
224 | : "+m"(*__xg_ptr), "=&r"(__xg_orig) \ | 224 | : "+m"(*__xg_ptr), "=r"(__xg_orig) \ |
225 | : "r"(x) \ | 225 | : "1"(x) \ |
226 | : "memory" \ | 226 | : "memory" \ |
227 | ); \ | 227 | ); \ |
228 | break; \ | 228 | break; \ |
diff --git a/include/asm-frv/bitops.h b/include/asm-frv/bitops.h index 02be7b3a8a83..f686b519878e 100644 --- a/include/asm-frv/bitops.h +++ b/include/asm-frv/bitops.h | |||
@@ -209,7 +209,7 @@ static inline int find_next_zero_bit(const void *addr, int size, int offset) | |||
209 | tmp = *p; | 209 | tmp = *p; |
210 | 210 | ||
211 | found_first: | 211 | found_first: |
212 | tmp |= ~0UL >> size; | 212 | tmp |= ~0UL << size; |
213 | found_middle: | 213 | found_middle: |
214 | return result + ffz(tmp); | 214 | return result + ffz(tmp); |
215 | } | 215 | } |
diff --git a/include/asm-frv/cacheflush.h b/include/asm-frv/cacheflush.h index 3007deccb490..eaa5826bc1c8 100644 --- a/include/asm-frv/cacheflush.h +++ b/include/asm-frv/cacheflush.h | |||
@@ -87,5 +87,17 @@ static inline void flush_icache_page(struct vm_area_struct *vma, struct page *pa | |||
87 | flush_icache_user_range(vma, page, page_to_phys(page), PAGE_SIZE); | 87 | flush_icache_user_range(vma, page, page_to_phys(page), PAGE_SIZE); |
88 | } | 88 | } |
89 | 89 | ||
90 | /* | ||
91 | * permit ptrace to access another process's address space through the icache | ||
92 | * and the dcache | ||
93 | */ | ||
94 | #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ | ||
95 | do { \ | ||
96 | memcpy((dst), (src), (len)); \ | ||
97 | flush_icache_user_range((vma), (page), (vaddr), (len)); \ | ||
98 | } while(0) | ||
99 | |||
100 | #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ | ||
101 | memcpy((dst), (src), (len)) | ||
90 | 102 | ||
91 | #endif /* _ASM_CACHEFLUSH_H */ | 103 | #endif /* _ASM_CACHEFLUSH_H */ |
diff --git a/include/asm-frv/io.h b/include/asm-frv/io.h index 075369b1a34b..01247cb2bc39 100644 --- a/include/asm-frv/io.h +++ b/include/asm-frv/io.h | |||
@@ -251,7 +251,6 @@ static inline void writel(uint32_t datum, volatile void __iomem *addr) | |||
251 | #define IOMAP_WRITETHROUGH 3 | 251 | #define IOMAP_WRITETHROUGH 3 |
252 | 252 | ||
253 | extern void __iomem *__ioremap(unsigned long physaddr, unsigned long size, int cacheflag); | 253 | extern void __iomem *__ioremap(unsigned long physaddr, unsigned long size, int cacheflag); |
254 | extern void __iounmap(void __iomem *addr, unsigned long size); | ||
255 | 254 | ||
256 | static inline void __iomem *ioremap(unsigned long physaddr, unsigned long size) | 255 | static inline void __iomem *ioremap(unsigned long physaddr, unsigned long size) |
257 | { | 256 | { |
diff --git a/include/asm-frv/mman.h b/include/asm-frv/mman.h index 8af4a41c255e..b4371e928683 100644 --- a/include/asm-frv/mman.h +++ b/include/asm-frv/mman.h | |||
@@ -1,19 +1,7 @@ | |||
1 | #ifndef __ASM_MMAN_H__ | 1 | #ifndef __ASM_MMAN_H__ |
2 | #define __ASM_MMAN_H__ | 2 | #define __ASM_MMAN_H__ |
3 | 3 | ||
4 | #define PROT_READ 0x1 /* page can be read */ | 4 | #include <asm-generic/mman.h> |
5 | #define PROT_WRITE 0x2 /* page can be written */ | ||
6 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
7 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
8 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
9 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
10 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
11 | |||
12 | #define MAP_SHARED 0x01 /* Share changes */ | ||
13 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
14 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
15 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
16 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
17 | 5 | ||
18 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 6 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
19 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 7 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
@@ -23,23 +11,8 @@ | |||
23 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | 11 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ |
24 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 12 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
25 | 13 | ||
26 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
27 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
28 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
29 | |||
30 | #define MCL_CURRENT 1 /* lock all current mappings */ | 14 | #define MCL_CURRENT 1 /* lock all current mappings */ |
31 | #define MCL_FUTURE 2 /* lock all future mappings */ | 15 | #define MCL_FUTURE 2 /* lock all future mappings */ |
32 | 16 | ||
33 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
34 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
35 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
36 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
37 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
38 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
39 | |||
40 | /* compatibility flags */ | ||
41 | #define MAP_ANON MAP_ANONYMOUS | ||
42 | #define MAP_FILE 0 | ||
43 | |||
44 | #endif /* __ASM_MMAN_H__ */ | 17 | #endif /* __ASM_MMAN_H__ */ |
45 | 18 | ||
diff --git a/include/asm-frv/spr-regs.h b/include/asm-frv/spr-regs.h index ef472f058d9c..c2a541ef828d 100644 --- a/include/asm-frv/spr-regs.h +++ b/include/asm-frv/spr-regs.h | |||
@@ -98,6 +98,7 @@ | |||
98 | #define TBR_TT_TRAP0 (0x80 << 4) | 98 | #define TBR_TT_TRAP0 (0x80 << 4) |
99 | #define TBR_TT_TRAP1 (0x81 << 4) | 99 | #define TBR_TT_TRAP1 (0x81 << 4) |
100 | #define TBR_TT_TRAP2 (0x82 << 4) | 100 | #define TBR_TT_TRAP2 (0x82 << 4) |
101 | #define TBR_TT_TRAP3 (0x83 << 4) | ||
101 | #define TBR_TT_TRAP126 (0xfe << 4) | 102 | #define TBR_TT_TRAP126 (0xfe << 4) |
102 | #define TBR_TT_BREAK (0xff << 4) | 103 | #define TBR_TT_BREAK (0xff << 4) |
103 | 104 | ||
diff --git a/include/asm-frv/system.h b/include/asm-frv/system.h index d2aea70a5f64..f72ff0c4dc0b 100644 --- a/include/asm-frv/system.h +++ b/include/asm-frv/system.h | |||
@@ -40,8 +40,84 @@ do { \ | |||
40 | 40 | ||
41 | /* | 41 | /* |
42 | * interrupt flag manipulation | 42 | * interrupt flag manipulation |
43 | * - use virtual interrupt management since touching the PSR is slow | ||
44 | * - ICC2.Z: T if interrupts virtually disabled | ||
45 | * - ICC2.C: F if interrupts really disabled | ||
46 | * - if Z==1 upon interrupt: | ||
47 | * - C is set to 0 | ||
48 | * - interrupts are really disabled | ||
49 | * - entry.S returns immediately | ||
50 | * - uses TIHI (TRAP if Z==0 && C==0) #2 to really reenable interrupts | ||
51 | * - if taken, the trap: | ||
52 | * - sets ICC2.C | ||
53 | * - enables interrupts | ||
43 | */ | 54 | */ |
44 | #define local_irq_disable() \ | 55 | #define local_irq_disable() \ |
56 | do { \ | ||
57 | /* set Z flag, but don't change the C flag */ \ | ||
58 | asm volatile(" andcc gr0,gr0,gr0,icc2 \n" \ | ||
59 | : \ | ||
60 | : \ | ||
61 | : "memory", "icc2" \ | ||
62 | ); \ | ||
63 | } while(0) | ||
64 | |||
65 | #define local_irq_enable() \ | ||
66 | do { \ | ||
67 | /* clear Z flag and then test the C flag */ \ | ||
68 | asm volatile(" oricc gr0,#1,gr0,icc2 \n" \ | ||
69 | " tihi icc2,gr0,#2 \n" \ | ||
70 | : \ | ||
71 | : \ | ||
72 | : "memory", "icc2" \ | ||
73 | ); \ | ||
74 | } while(0) | ||
75 | |||
76 | #define local_save_flags(flags) \ | ||
77 | do { \ | ||
78 | typecheck(unsigned long, flags); \ | ||
79 | asm volatile("movsg ccr,%0" \ | ||
80 | : "=r"(flags) \ | ||
81 | : \ | ||
82 | : "memory"); \ | ||
83 | \ | ||
84 | /* shift ICC2.Z to bit 0 */ \ | ||
85 | flags >>= 26; \ | ||
86 | \ | ||
87 | /* make flags 1 if interrupts disabled, 0 otherwise */ \ | ||
88 | flags &= 1UL; \ | ||
89 | } while(0) | ||
90 | |||
91 | #define irqs_disabled() \ | ||
92 | ({unsigned long flags; local_save_flags(flags); flags; }) | ||
93 | |||
94 | #define local_irq_save(flags) \ | ||
95 | do { \ | ||
96 | typecheck(unsigned long, flags); \ | ||
97 | local_save_flags(flags); \ | ||
98 | local_irq_disable(); \ | ||
99 | } while(0) | ||
100 | |||
101 | #define local_irq_restore(flags) \ | ||
102 | do { \ | ||
103 | typecheck(unsigned long, flags); \ | ||
104 | \ | ||
105 | /* load the Z flag by turning 1 if disabled into 0 if disabled \ | ||
106 | * and thus setting the Z flag but not the C flag */ \ | ||
107 | asm volatile(" xoricc %0,#1,gr0,icc2 \n" \ | ||
108 | /* then test Z=0 and C=0 */ \ | ||
109 | " tihi icc2,gr0,#2 \n" \ | ||
110 | : \ | ||
111 | : "r"(flags) \ | ||
112 | : "memory", "icc2" \ | ||
113 | ); \ | ||
114 | \ | ||
115 | } while(0) | ||
116 | |||
117 | /* | ||
118 | * real interrupt flag manipulation | ||
119 | */ | ||
120 | #define __local_irq_disable() \ | ||
45 | do { \ | 121 | do { \ |
46 | unsigned long psr; \ | 122 | unsigned long psr; \ |
47 | asm volatile(" movsg psr,%0 \n" \ | 123 | asm volatile(" movsg psr,%0 \n" \ |
@@ -53,7 +129,7 @@ do { \ | |||
53 | : "memory"); \ | 129 | : "memory"); \ |
54 | } while(0) | 130 | } while(0) |
55 | 131 | ||
56 | #define local_irq_enable() \ | 132 | #define __local_irq_enable() \ |
57 | do { \ | 133 | do { \ |
58 | unsigned long psr; \ | 134 | unsigned long psr; \ |
59 | asm volatile(" movsg psr,%0 \n" \ | 135 | asm volatile(" movsg psr,%0 \n" \ |
@@ -64,7 +140,7 @@ do { \ | |||
64 | : "memory"); \ | 140 | : "memory"); \ |
65 | } while(0) | 141 | } while(0) |
66 | 142 | ||
67 | #define local_save_flags(flags) \ | 143 | #define __local_save_flags(flags) \ |
68 | do { \ | 144 | do { \ |
69 | typecheck(unsigned long, flags); \ | 145 | typecheck(unsigned long, flags); \ |
70 | asm("movsg psr,%0" \ | 146 | asm("movsg psr,%0" \ |
@@ -73,7 +149,7 @@ do { \ | |||
73 | : "memory"); \ | 149 | : "memory"); \ |
74 | } while(0) | 150 | } while(0) |
75 | 151 | ||
76 | #define local_irq_save(flags) \ | 152 | #define __local_irq_save(flags) \ |
77 | do { \ | 153 | do { \ |
78 | unsigned long npsr; \ | 154 | unsigned long npsr; \ |
79 | typecheck(unsigned long, flags); \ | 155 | typecheck(unsigned long, flags); \ |
@@ -86,7 +162,7 @@ do { \ | |||
86 | : "memory"); \ | 162 | : "memory"); \ |
87 | } while(0) | 163 | } while(0) |
88 | 164 | ||
89 | #define local_irq_restore(flags) \ | 165 | #define __local_irq_restore(flags) \ |
90 | do { \ | 166 | do { \ |
91 | typecheck(unsigned long, flags); \ | 167 | typecheck(unsigned long, flags); \ |
92 | asm volatile(" movgs %0,psr \n" \ | 168 | asm volatile(" movgs %0,psr \n" \ |
@@ -95,7 +171,7 @@ do { \ | |||
95 | : "memory"); \ | 171 | : "memory"); \ |
96 | } while(0) | 172 | } while(0) |
97 | 173 | ||
98 | #define irqs_disabled() \ | 174 | #define __irqs_disabled() \ |
99 | ((__get_PSR() & PSR_PIL) >= PSR_PIL_14) | 175 | ((__get_PSR() & PSR_PIL) >= PSR_PIL_14) |
100 | 176 | ||
101 | /* | 177 | /* |
diff --git a/include/asm-frv/uaccess.h b/include/asm-frv/uaccess.h index b6bcbe01f6ee..a1d140438863 100644 --- a/include/asm-frv/uaccess.h +++ b/include/asm-frv/uaccess.h | |||
@@ -306,7 +306,4 @@ extern long strnlen_user(const char *src, long count); | |||
306 | 306 | ||
307 | extern unsigned long search_exception_table(unsigned long addr); | 307 | extern unsigned long search_exception_table(unsigned long addr); |
308 | 308 | ||
309 | #define copy_to_user_page(vma, page, vaddr, dst, src, len) memcpy(dst, src, len) | ||
310 | #define copy_from_user_page(vma, page, vaddr, dst, src, len) memcpy(dst, src, len) | ||
311 | |||
312 | #endif /* _ASM_UACCESS_H */ | 309 | #endif /* _ASM_UACCESS_H */ |
diff --git a/include/asm-frv/unistd.h b/include/asm-frv/unistd.h index 4d994d2e99e3..322531caa484 100644 --- a/include/asm-frv/unistd.h +++ b/include/asm-frv/unistd.h | |||
@@ -295,13 +295,29 @@ | |||
295 | #define __NR_add_key 286 | 295 | #define __NR_add_key 286 |
296 | #define __NR_request_key 287 | 296 | #define __NR_request_key 287 |
297 | #define __NR_keyctl 288 | 297 | #define __NR_keyctl 288 |
298 | #define __NR_vperfctr_open 289 | 298 | #define __NR_ioprio_set 289 |
299 | #define __NR_vperfctr_control (__NR_perfctr_info+1) | 299 | #define __NR_ioprio_get 290 |
300 | #define __NR_vperfctr_unlink (__NR_perfctr_info+2) | 300 | #define __NR_inotify_init 291 |
301 | #define __NR_vperfctr_iresume (__NR_perfctr_info+3) | 301 | #define __NR_inotify_add_watch 292 |
302 | #define __NR_vperfctr_read (__NR_perfctr_info+4) | 302 | #define __NR_inotify_rm_watch 293 |
303 | #define __NR_migrate_pages 294 | ||
304 | #define __NR_openat 295 | ||
305 | #define __NR_mkdirat 296 | ||
306 | #define __NR_mknodat 297 | ||
307 | #define __NR_fchownat 298 | ||
308 | #define __NR_futimesat 299 | ||
309 | #define __NR_newfstatat 300 | ||
310 | #define __NR_unlinkat 301 | ||
311 | #define __NR_renameat 302 | ||
312 | #define __NR_linkat 303 | ||
313 | #define __NR_symlinkat 304 | ||
314 | #define __NR_readlinkat 305 | ||
315 | #define __NR_fchmodat 306 | ||
316 | #define __NR_faccessat 307 | ||
317 | #define __NR_pselect6 308 | ||
318 | #define __NR_ppoll 309 | ||
303 | 319 | ||
304 | #define NR_syscalls 294 | 320 | #define NR_syscalls 310 |
305 | 321 | ||
306 | /* | 322 | /* |
307 | * process the return value of a syscall, consigning it to one of two possible fates | 323 | * process the return value of a syscall, consigning it to one of two possible fates |
diff --git a/include/asm-generic/mman.h b/include/asm-generic/mman.h new file mode 100644 index 000000000000..3b41d2bb70da --- /dev/null +++ b/include/asm-generic/mman.h | |||
@@ -0,0 +1,42 @@ | |||
1 | #ifndef _ASM_GENERIC_MMAN_H | ||
2 | #define _ASM_GENERIC_MMAN_H | ||
3 | |||
4 | /* | ||
5 | Author: Michael S. Tsirkin <mst@mellanox.co.il>, Mellanox Technologies Ltd. | ||
6 | Based on: asm-xxx/mman.h | ||
7 | */ | ||
8 | |||
9 | #define PROT_READ 0x1 /* page can be read */ | ||
10 | #define PROT_WRITE 0x2 /* page can be written */ | ||
11 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
12 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
13 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
14 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
15 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
16 | |||
17 | #define MAP_SHARED 0x01 /* Share changes */ | ||
18 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
19 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
20 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
21 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
22 | |||
23 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
24 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
25 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
26 | |||
27 | #define MADV_NORMAL 0 /* no further special treatment */ | ||
28 | #define MADV_RANDOM 1 /* expect random page references */ | ||
29 | #define MADV_SEQUENTIAL 2 /* expect sequential page references */ | ||
30 | #define MADV_WILLNEED 3 /* will need these pages */ | ||
31 | #define MADV_DONTNEED 4 /* don't need these pages */ | ||
32 | |||
33 | /* common parameters: try to keep these consistent across architectures */ | ||
34 | #define MADV_REMOVE 9 /* remove these pages & resources */ | ||
35 | #define MADV_DONTFORK 10 /* don't inherit across fork */ | ||
36 | #define MADV_DOFORK 11 /* do inherit across fork */ | ||
37 | |||
38 | /* compatibility flags */ | ||
39 | #define MAP_ANON MAP_ANONYMOUS | ||
40 | #define MAP_FILE 0 | ||
41 | |||
42 | #endif | ||
diff --git a/include/asm-generic/unaligned.h b/include/asm-generic/unaligned.h index 4dc8ddb401c1..09ec447fe2af 100644 --- a/include/asm-generic/unaligned.h +++ b/include/asm-generic/unaligned.h | |||
@@ -78,7 +78,7 @@ static inline void __ustw(__u16 val, __u16 *addr) | |||
78 | 78 | ||
79 | #define __get_unaligned(ptr, size) ({ \ | 79 | #define __get_unaligned(ptr, size) ({ \ |
80 | const void *__gu_p = ptr; \ | 80 | const void *__gu_p = ptr; \ |
81 | __typeof__(*(ptr)) val; \ | 81 | __u64 val; \ |
82 | switch (size) { \ | 82 | switch (size) { \ |
83 | case 1: \ | 83 | case 1: \ |
84 | val = *(const __u8 *)__gu_p; \ | 84 | val = *(const __u8 *)__gu_p; \ |
@@ -95,7 +95,7 @@ static inline void __ustw(__u16 val, __u16 *addr) | |||
95 | default: \ | 95 | default: \ |
96 | bad_unaligned_access_length(); \ | 96 | bad_unaligned_access_length(); \ |
97 | }; \ | 97 | }; \ |
98 | val; \ | 98 | (__typeof__(*(ptr)))val; \ |
99 | }) | 99 | }) |
100 | 100 | ||
101 | #define __put_unaligned(val, ptr, size) \ | 101 | #define __put_unaligned(val, ptr, size) \ |
diff --git a/include/asm-h8300/bitops.h b/include/asm-h8300/bitops.h index c0411ec9d651..ff7c2b721594 100644 --- a/include/asm-h8300/bitops.h +++ b/include/asm-h8300/bitops.h | |||
@@ -227,7 +227,7 @@ static __inline__ int find_next_zero_bit (const unsigned long * addr, int size, | |||
227 | tmp = *p; | 227 | tmp = *p; |
228 | 228 | ||
229 | found_first: | 229 | found_first: |
230 | tmp |= ~0UL >> size; | 230 | tmp |= ~0UL << size; |
231 | found_middle: | 231 | found_middle: |
232 | return result + ffz(tmp); | 232 | return result + ffz(tmp); |
233 | } | 233 | } |
diff --git a/include/asm-h8300/mman.h b/include/asm-h8300/mman.h index 744a8fb485c2..b9f104f22a36 100644 --- a/include/asm-h8300/mman.h +++ b/include/asm-h8300/mman.h | |||
@@ -1,19 +1,7 @@ | |||
1 | #ifndef __H8300_MMAN_H__ | 1 | #ifndef __H8300_MMAN_H__ |
2 | #define __H8300_MMAN_H__ | 2 | #define __H8300_MMAN_H__ |
3 | 3 | ||
4 | #define PROT_READ 0x1 /* page can be read */ | 4 | #include <asm-generic/mman.h> |
5 | #define PROT_WRITE 0x2 /* page can be written */ | ||
6 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
7 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
8 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
9 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
10 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
11 | |||
12 | #define MAP_SHARED 0x01 /* Share changes */ | ||
13 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
14 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
15 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
16 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
17 | 5 | ||
18 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 6 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
19 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 7 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
@@ -23,22 +11,7 @@ | |||
23 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | 11 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ |
24 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 12 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
25 | 13 | ||
26 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
27 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
28 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
29 | |||
30 | #define MCL_CURRENT 1 /* lock all current mappings */ | 14 | #define MCL_CURRENT 1 /* lock all current mappings */ |
31 | #define MCL_FUTURE 2 /* lock all future mappings */ | 15 | #define MCL_FUTURE 2 /* lock all future mappings */ |
32 | 16 | ||
33 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
34 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
35 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
36 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
37 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
38 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
39 | |||
40 | /* compatibility flags */ | ||
41 | #define MAP_ANON MAP_ANONYMOUS | ||
42 | #define MAP_FILE 0 | ||
43 | |||
44 | #endif /* __H8300_MMAN_H__ */ | 17 | #endif /* __H8300_MMAN_H__ */ |
diff --git a/include/asm-i386/acpi.h b/include/asm-i386/acpi.h index df4ed323aa4d..55059abf9c95 100644 --- a/include/asm-i386/acpi.h +++ b/include/asm-i386/acpi.h | |||
@@ -179,7 +179,7 @@ extern void acpi_reserve_bootmem(void); | |||
179 | 179 | ||
180 | extern u8 x86_acpiid_to_apicid[]; | 180 | extern u8 x86_acpiid_to_apicid[]; |
181 | 181 | ||
182 | #define ARCH_HAS_POWER_PDC_INIT 1 | 182 | #define ARCH_HAS_POWER_INIT 1 |
183 | 183 | ||
184 | #endif /*__KERNEL__*/ | 184 | #endif /*__KERNEL__*/ |
185 | 185 | ||
diff --git a/include/asm-i386/apic.h b/include/asm-i386/apic.h index d30b8571573f..ff9ac8d19eb2 100644 --- a/include/asm-i386/apic.h +++ b/include/asm-i386/apic.h | |||
@@ -137,6 +137,8 @@ void switch_APIC_timer_to_ipi(void *cpumask); | |||
137 | void switch_ipi_to_APIC_timer(void *cpumask); | 137 | void switch_ipi_to_APIC_timer(void *cpumask); |
138 | #define ARCH_APICTIMER_STOPS_ON_C3 1 | 138 | #define ARCH_APICTIMER_STOPS_ON_C3 1 |
139 | 139 | ||
140 | extern int timer_over_8254; | ||
141 | |||
140 | #else /* !CONFIG_X86_LOCAL_APIC */ | 142 | #else /* !CONFIG_X86_LOCAL_APIC */ |
141 | static inline void lapic_shutdown(void) { } | 143 | static inline void lapic_shutdown(void) { } |
142 | 144 | ||
diff --git a/include/asm-i386/desc.h b/include/asm-i386/desc.h index 494e73bca095..89b8b82c82b3 100644 --- a/include/asm-i386/desc.h +++ b/include/asm-i386/desc.h | |||
@@ -24,11 +24,13 @@ struct Xgt_desc_struct { | |||
24 | unsigned short pad; | 24 | unsigned short pad; |
25 | } __attribute__ ((packed)); | 25 | } __attribute__ ((packed)); |
26 | 26 | ||
27 | extern struct Xgt_desc_struct idt_descr, cpu_gdt_descr[NR_CPUS]; | 27 | extern struct Xgt_desc_struct idt_descr; |
28 | DECLARE_PER_CPU(struct Xgt_desc_struct, cpu_gdt_descr); | ||
29 | |||
28 | 30 | ||
29 | static inline struct desc_struct *get_cpu_gdt_table(unsigned int cpu) | 31 | static inline struct desc_struct *get_cpu_gdt_table(unsigned int cpu) |
30 | { | 32 | { |
31 | return ((struct desc_struct *)cpu_gdt_descr[cpu].address); | 33 | return (struct desc_struct *)per_cpu(cpu_gdt_descr, cpu).address; |
32 | } | 34 | } |
33 | 35 | ||
34 | #define load_TR_desc() __asm__ __volatile__("ltr %w0"::"q" (GDT_ENTRY_TSS*8)) | 36 | #define load_TR_desc() __asm__ __volatile__("ltr %w0"::"q" (GDT_ENTRY_TSS*8)) |
diff --git a/include/asm-i386/kprobes.h b/include/asm-i386/kprobes.h index 27cac050a60e..a0d2d74a7dda 100644 --- a/include/asm-i386/kprobes.h +++ b/include/asm-i386/kprobes.h | |||
@@ -27,6 +27,9 @@ | |||
27 | #include <linux/types.h> | 27 | #include <linux/types.h> |
28 | #include <linux/ptrace.h> | 28 | #include <linux/ptrace.h> |
29 | 29 | ||
30 | #define __ARCH_WANT_KPROBES_INSN_SLOT | ||
31 | |||
32 | struct kprobe; | ||
30 | struct pt_regs; | 33 | struct pt_regs; |
31 | 34 | ||
32 | typedef u8 kprobe_opcode_t; | 35 | typedef u8 kprobe_opcode_t; |
@@ -40,14 +43,14 @@ typedef u8 kprobe_opcode_t; | |||
40 | 43 | ||
41 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry | 44 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry |
42 | #define ARCH_SUPPORTS_KRETPROBES | 45 | #define ARCH_SUPPORTS_KRETPROBES |
43 | #define arch_remove_kprobe(p) do {} while (0) | ||
44 | 46 | ||
47 | void arch_remove_kprobe(struct kprobe *p); | ||
45 | void kretprobe_trampoline(void); | 48 | void kretprobe_trampoline(void); |
46 | 49 | ||
47 | /* Architecture specific copy of original instruction*/ | 50 | /* Architecture specific copy of original instruction*/ |
48 | struct arch_specific_insn { | 51 | struct arch_specific_insn { |
49 | /* copy of the original instruction */ | 52 | /* copy of the original instruction */ |
50 | kprobe_opcode_t insn[MAX_INSN_SIZE]; | 53 | kprobe_opcode_t *insn; |
51 | }; | 54 | }; |
52 | 55 | ||
53 | struct prev_kprobe { | 56 | struct prev_kprobe { |
diff --git a/include/asm-i386/mman.h b/include/asm-i386/mman.h index ba4941e6f643..8fd9d7ab7faf 100644 --- a/include/asm-i386/mman.h +++ b/include/asm-i386/mman.h | |||
@@ -1,19 +1,7 @@ | |||
1 | #ifndef __I386_MMAN_H__ | 1 | #ifndef __I386_MMAN_H__ |
2 | #define __I386_MMAN_H__ | 2 | #define __I386_MMAN_H__ |
3 | 3 | ||
4 | #define PROT_READ 0x1 /* page can be read */ | 4 | #include <asm-generic/mman.h> |
5 | #define PROT_WRITE 0x2 /* page can be written */ | ||
6 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
7 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
8 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
9 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
10 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
11 | |||
12 | #define MAP_SHARED 0x01 /* Share changes */ | ||
13 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
14 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
15 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
16 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
17 | 5 | ||
18 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 6 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
19 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 7 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
@@ -23,22 +11,7 @@ | |||
23 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | 11 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ |
24 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 12 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
25 | 13 | ||
26 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
27 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
28 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
29 | |||
30 | #define MCL_CURRENT 1 /* lock all current mappings */ | 14 | #define MCL_CURRENT 1 /* lock all current mappings */ |
31 | #define MCL_FUTURE 2 /* lock all future mappings */ | 15 | #define MCL_FUTURE 2 /* lock all future mappings */ |
32 | 16 | ||
33 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
34 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
35 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
36 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
37 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
38 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
39 | |||
40 | /* compatibility flags */ | ||
41 | #define MAP_ANON MAP_ANONYMOUS | ||
42 | #define MAP_FILE 0 | ||
43 | |||
44 | #endif /* __I386_MMAN_H__ */ | 17 | #endif /* __I386_MMAN_H__ */ |
diff --git a/include/asm-i386/page.h b/include/asm-i386/page.h index 73296d9924fb..997ca5d17876 100644 --- a/include/asm-i386/page.h +++ b/include/asm-i386/page.h | |||
@@ -110,10 +110,10 @@ extern int page_is_ram(unsigned long pagenr); | |||
110 | #endif /* __ASSEMBLY__ */ | 110 | #endif /* __ASSEMBLY__ */ |
111 | 111 | ||
112 | #ifdef __ASSEMBLY__ | 112 | #ifdef __ASSEMBLY__ |
113 | #define __PAGE_OFFSET (0xC0000000) | 113 | #define __PAGE_OFFSET CONFIG_PAGE_OFFSET |
114 | #define __PHYSICAL_START CONFIG_PHYSICAL_START | 114 | #define __PHYSICAL_START CONFIG_PHYSICAL_START |
115 | #else | 115 | #else |
116 | #define __PAGE_OFFSET (0xC0000000UL) | 116 | #define __PAGE_OFFSET ((unsigned long)CONFIG_PAGE_OFFSET) |
117 | #define __PHYSICAL_START ((unsigned long)CONFIG_PHYSICAL_START) | 117 | #define __PHYSICAL_START ((unsigned long)CONFIG_PHYSICAL_START) |
118 | #endif | 118 | #endif |
119 | #define __KERNEL_START (__PAGE_OFFSET + __PHYSICAL_START) | 119 | #define __KERNEL_START (__PAGE_OFFSET + __PHYSICAL_START) |
diff --git a/include/asm-i386/system.h b/include/asm-i386/system.h index 36a92ed6a9d0..399145a247f2 100644 --- a/include/asm-i386/system.h +++ b/include/asm-i386/system.h | |||
@@ -507,7 +507,7 @@ struct alt_instr { | |||
507 | #define smp_rmb() rmb() | 507 | #define smp_rmb() rmb() |
508 | #define smp_wmb() wmb() | 508 | #define smp_wmb() wmb() |
509 | #define smp_read_barrier_depends() read_barrier_depends() | 509 | #define smp_read_barrier_depends() read_barrier_depends() |
510 | #define set_mb(var, value) do { xchg(&var, value); } while (0) | 510 | #define set_mb(var, value) do { (void) xchg(&var, value); } while (0) |
511 | #else | 511 | #else |
512 | #define smp_mb() barrier() | 512 | #define smp_mb() barrier() |
513 | #define smp_rmb() barrier() | 513 | #define smp_rmb() barrier() |
diff --git a/include/asm-i386/thread_info.h b/include/asm-i386/thread_info.h index e20e99551d71..1f7d48c9ba3f 100644 --- a/include/asm-i386/thread_info.h +++ b/include/asm-i386/thread_info.h | |||
@@ -158,8 +158,8 @@ register unsigned long current_stack_pointer asm("esp") __attribute_used__; | |||
158 | 158 | ||
159 | /* work to do on interrupt/exception return */ | 159 | /* work to do on interrupt/exception return */ |
160 | #define _TIF_WORK_MASK \ | 160 | #define _TIF_WORK_MASK \ |
161 | (0x0000FFFF & ~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGLESTEP|\ | 161 | (0x0000FFFF & ~(_TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT | \ |
162 | _TIF_SECCOMP|_TIF_SYSCALL_EMU)) | 162 | _TIF_SECCOMP | _TIF_SYSCALL_EMU)) |
163 | /* work to do on any return to u-space */ | 163 | /* work to do on any return to u-space */ |
164 | #define _TIF_ALLWORK_MASK (0x0000FFFF & ~_TIF_SECCOMP) | 164 | #define _TIF_ALLWORK_MASK (0x0000FFFF & ~_TIF_SECCOMP) |
165 | 165 | ||
diff --git a/include/asm-i386/topology.h b/include/asm-i386/topology.h index d7e19eb344b7..aa958c6ee83e 100644 --- a/include/asm-i386/topology.h +++ b/include/asm-i386/topology.h | |||
@@ -27,6 +27,15 @@ | |||
27 | #ifndef _ASM_I386_TOPOLOGY_H | 27 | #ifndef _ASM_I386_TOPOLOGY_H |
28 | #define _ASM_I386_TOPOLOGY_H | 28 | #define _ASM_I386_TOPOLOGY_H |
29 | 29 | ||
30 | #ifdef CONFIG_X86_HT | ||
31 | #define topology_physical_package_id(cpu) \ | ||
32 | (phys_proc_id[cpu] == BAD_APICID ? -1 : phys_proc_id[cpu]) | ||
33 | #define topology_core_id(cpu) \ | ||
34 | (cpu_core_id[cpu] == BAD_APICID ? 0 : cpu_core_id[cpu]) | ||
35 | #define topology_core_siblings(cpu) (cpu_core_map[cpu]) | ||
36 | #define topology_thread_siblings(cpu) (cpu_sibling_map[cpu]) | ||
37 | #endif | ||
38 | |||
30 | #ifdef CONFIG_NUMA | 39 | #ifdef CONFIG_NUMA |
31 | 40 | ||
32 | #include <asm/mpspec.h> | 41 | #include <asm/mpspec.h> |
diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h index 597496ed2aee..dc81a55dd94d 100644 --- a/include/asm-i386/unistd.h +++ b/include/asm-i386/unistd.h | |||
@@ -305,7 +305,7 @@ | |||
305 | #define __NR_mknodat 297 | 305 | #define __NR_mknodat 297 |
306 | #define __NR_fchownat 298 | 306 | #define __NR_fchownat 298 |
307 | #define __NR_futimesat 299 | 307 | #define __NR_futimesat 299 |
308 | #define __NR_newfstatat 300 | 308 | #define __NR_fstatat64 300 |
309 | #define __NR_unlinkat 301 | 309 | #define __NR_unlinkat 301 |
310 | #define __NR_renameat 302 | 310 | #define __NR_renameat 302 |
311 | #define __NR_linkat 303 | 311 | #define __NR_linkat 303 |
@@ -315,8 +315,9 @@ | |||
315 | #define __NR_faccessat 307 | 315 | #define __NR_faccessat 307 |
316 | #define __NR_pselect6 308 | 316 | #define __NR_pselect6 308 |
317 | #define __NR_ppoll 309 | 317 | #define __NR_ppoll 309 |
318 | #define __NR_unshare 310 | ||
318 | 319 | ||
319 | #define NR_syscalls 310 | 320 | #define NR_syscalls 311 |
320 | 321 | ||
321 | /* | 322 | /* |
322 | * user-visible error numbers are in the range -1 - -128: see | 323 | * user-visible error numbers are in the range -1 - -128: see |
diff --git a/include/asm-ia64/acpi.h b/include/asm-ia64/acpi.h index 3a544ffc5008..f7a517654308 100644 --- a/include/asm-ia64/acpi.h +++ b/include/asm-ia64/acpi.h | |||
@@ -106,6 +106,8 @@ extern unsigned int can_cpei_retarget(void); | |||
106 | extern unsigned int is_cpu_cpei_target(unsigned int cpu); | 106 | extern unsigned int is_cpu_cpei_target(unsigned int cpu); |
107 | extern void set_cpei_target_cpu(unsigned int cpu); | 107 | extern void set_cpei_target_cpu(unsigned int cpu); |
108 | extern unsigned int get_cpei_target_cpu(void); | 108 | extern unsigned int get_cpei_target_cpu(void); |
109 | extern void prefill_possible_map(void); | ||
110 | extern int additional_cpus; | ||
109 | 111 | ||
110 | #ifdef CONFIG_ACPI_NUMA | 112 | #ifdef CONFIG_ACPI_NUMA |
111 | /* Proximity bitmap length; _PXM is at most 255 (8 bit)*/ | 113 | /* Proximity bitmap length; _PXM is at most 255 (8 bit)*/ |
diff --git a/include/asm-ia64/ide.h b/include/asm-ia64/ide.h index e62b95301d51..93f45c5f189f 100644 --- a/include/asm-ia64/ide.h +++ b/include/asm-ia64/ide.h | |||
@@ -17,14 +17,6 @@ | |||
17 | 17 | ||
18 | #include <linux/irq.h> | 18 | #include <linux/irq.h> |
19 | 19 | ||
20 | #ifndef MAX_HWIFS | ||
21 | # ifdef CONFIG_PCI | ||
22 | #define MAX_HWIFS 10 | ||
23 | # else | ||
24 | #define MAX_HWIFS 6 | ||
25 | # endif | ||
26 | #endif | ||
27 | |||
28 | #define IDE_ARCH_OBSOLETE_DEFAULTS | 20 | #define IDE_ARCH_OBSOLETE_DEFAULTS |
29 | 21 | ||
30 | static inline int ide_default_irq(unsigned long base) | 22 | static inline int ide_default_irq(unsigned long base) |
diff --git a/include/asm-ia64/machvec_sn2.h b/include/asm-ia64/machvec_sn2.h index e1b6cd63f49e..03d00faf03b5 100644 --- a/include/asm-ia64/machvec_sn2.h +++ b/include/asm-ia64/machvec_sn2.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2002-2003 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2002-2003, 2006 Silicon Graphics, Inc. All Rights Reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms of version 2 of the GNU General Public License | 5 | * under the terms of version 2 of the GNU General Public License |
@@ -20,11 +20,6 @@ | |||
20 | * License along with this program; if not, write the Free Software | 20 | * License along with this program; if not, write the Free Software |
21 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. | 21 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. |
22 | * | 22 | * |
23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
24 | * Mountain View, CA 94043, or: | ||
25 | * | ||
26 | * http://www.sgi.com | ||
27 | * | ||
28 | * For further information regarding this notice, see: | 23 | * For further information regarding this notice, see: |
29 | * | 24 | * |
30 | * http://oss.sgi.com/projects/GenInfo/NoticeExplan | 25 | * http://oss.sgi.com/projects/GenInfo/NoticeExplan |
diff --git a/include/asm-ia64/mman.h b/include/asm-ia64/mman.h index 828beb24a20e..6ba179f12718 100644 --- a/include/asm-ia64/mman.h +++ b/include/asm-ia64/mman.h | |||
@@ -8,19 +8,7 @@ | |||
8 | * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co | 8 | * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #define PROT_READ 0x1 /* page can be read */ | 11 | #include <asm-generic/mman.h> |
12 | #define PROT_WRITE 0x2 /* page can be written */ | ||
13 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
14 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
15 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
16 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
17 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
18 | |||
19 | #define MAP_SHARED 0x01 /* Share changes */ | ||
20 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
21 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
22 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
23 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
24 | 12 | ||
25 | #define MAP_GROWSDOWN 0x00100 /* stack-like segment */ | 13 | #define MAP_GROWSDOWN 0x00100 /* stack-like segment */ |
26 | #define MAP_GROWSUP 0x00200 /* register stack-like segment */ | 14 | #define MAP_GROWSUP 0x00200 /* register stack-like segment */ |
@@ -31,22 +19,7 @@ | |||
31 | #define MAP_POPULATE 0x08000 /* populate (prefault) pagetables */ | 19 | #define MAP_POPULATE 0x08000 /* populate (prefault) pagetables */ |
32 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 20 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
33 | 21 | ||
34 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
35 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
36 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
37 | |||
38 | #define MCL_CURRENT 1 /* lock all current mappings */ | 22 | #define MCL_CURRENT 1 /* lock all current mappings */ |
39 | #define MCL_FUTURE 2 /* lock all future mappings */ | 23 | #define MCL_FUTURE 2 /* lock all future mappings */ |
40 | 24 | ||
41 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
42 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
43 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
44 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
45 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
46 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
47 | |||
48 | /* compatibility flags */ | ||
49 | #define MAP_ANON MAP_ANONYMOUS | ||
50 | #define MAP_FILE 0 | ||
51 | |||
52 | #endif /* _ASM_IA64_MMAN_H */ | 25 | #endif /* _ASM_IA64_MMAN_H */ |
diff --git a/include/asm-ia64/processor.h b/include/asm-ia64/processor.h index 09b99029ac1a..23c8e1be1911 100644 --- a/include/asm-ia64/processor.h +++ b/include/asm-ia64/processor.h | |||
@@ -559,6 +559,23 @@ ia64_eoi (void) | |||
559 | 559 | ||
560 | #define cpu_relax() ia64_hint(ia64_hint_pause) | 560 | #define cpu_relax() ia64_hint(ia64_hint_pause) |
561 | 561 | ||
562 | static inline int | ||
563 | ia64_get_irr(unsigned int vector) | ||
564 | { | ||
565 | unsigned int reg = vector / 64; | ||
566 | unsigned int bit = vector % 64; | ||
567 | u64 irr; | ||
568 | |||
569 | switch (reg) { | ||
570 | case 0: irr = ia64_getreg(_IA64_REG_CR_IRR0); break; | ||
571 | case 1: irr = ia64_getreg(_IA64_REG_CR_IRR1); break; | ||
572 | case 2: irr = ia64_getreg(_IA64_REG_CR_IRR2); break; | ||
573 | case 3: irr = ia64_getreg(_IA64_REG_CR_IRR3); break; | ||
574 | } | ||
575 | |||
576 | return test_bit(bit, &irr); | ||
577 | } | ||
578 | |||
562 | static inline void | 579 | static inline void |
563 | ia64_set_lrr0 (unsigned long val) | 580 | ia64_set_lrr0 (unsigned long val) |
564 | { | 581 | { |
diff --git a/include/asm-ia64/sal.h b/include/asm-ia64/sal.h index 313cad0628d0..0b210abbe003 100644 --- a/include/asm-ia64/sal.h +++ b/include/asm-ia64/sal.h | |||
@@ -658,15 +658,7 @@ ia64_sal_freq_base (unsigned long which, unsigned long *ticks_per_second, | |||
658 | return isrv.status; | 658 | return isrv.status; |
659 | } | 659 | } |
660 | 660 | ||
661 | /* Flush all the processor and platform level instruction and/or data caches */ | 661 | extern s64 ia64_sal_cache_flush (u64 cache_type); |
662 | static inline s64 | ||
663 | ia64_sal_cache_flush (u64 cache_type) | ||
664 | { | ||
665 | struct ia64_sal_retval isrv; | ||
666 | SAL_CALL(isrv, SAL_CACHE_FLUSH, cache_type, 0, 0, 0, 0, 0, 0); | ||
667 | return isrv.status; | ||
668 | } | ||
669 | |||
670 | 662 | ||
671 | /* Initialize all the processor and platform level instruction and data caches */ | 663 | /* Initialize all the processor and platform level instruction and data caches */ |
672 | static inline s64 | 664 | static inline s64 |
diff --git a/include/asm-ia64/sn/arch.h b/include/asm-ia64/sn/arch.h index 1a3831c04af6..16adc93d7a72 100644 --- a/include/asm-ia64/sn/arch.h +++ b/include/asm-ia64/sn/arch.h | |||
@@ -31,7 +31,8 @@ | |||
31 | * to ACPI3.0, this limit will be removed. The notion of "compact nodes" | 31 | * to ACPI3.0, this limit will be removed. The notion of "compact nodes" |
32 | * should be deleted and TIOs should be included in MAX_NUMNODES. | 32 | * should be deleted and TIOs should be included in MAX_NUMNODES. |
33 | */ | 33 | */ |
34 | #define MAX_COMPACT_NODES 512 | 34 | #define MAX_TIO_NODES MAX_NUMNODES |
35 | #define MAX_COMPACT_NODES (MAX_NUMNODES + MAX_TIO_NODES) | ||
35 | 36 | ||
36 | /* | 37 | /* |
37 | * Maximum number of nodes in all partitions and in all coherency domains. | 38 | * Maximum number of nodes in all partitions and in all coherency domains. |
@@ -70,7 +71,7 @@ DECLARE_PER_CPU(struct sn_hub_info_s, __sn_hub_info); | |||
70 | * Compact node ID to nasid mappings kept in the per-cpu data areas of each | 71 | * Compact node ID to nasid mappings kept in the per-cpu data areas of each |
71 | * cpu. | 72 | * cpu. |
72 | */ | 73 | */ |
73 | DECLARE_PER_CPU(short, __sn_cnodeid_to_nasid[MAX_NUMNODES]); | 74 | DECLARE_PER_CPU(short, __sn_cnodeid_to_nasid[MAX_COMPACT_NODES]); |
74 | #define sn_cnodeid_to_nasid (&__get_cpu_var(__sn_cnodeid_to_nasid[0])) | 75 | #define sn_cnodeid_to_nasid (&__get_cpu_var(__sn_cnodeid_to_nasid[0])) |
75 | 76 | ||
76 | 77 | ||
diff --git a/include/asm-ia64/sn/bte.h b/include/asm-ia64/sn/bte.h index f50da3d91d07..5335d87ca5f8 100644 --- a/include/asm-ia64/sn/bte.h +++ b/include/asm-ia64/sn/bte.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) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. | 6 | * Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | 9 | ||
@@ -46,7 +46,7 @@ | |||
46 | #define BTES_PER_NODE (is_shub2() ? 4 : 2) | 46 | #define BTES_PER_NODE (is_shub2() ? 4 : 2) |
47 | #define MAX_BTES_PER_NODE 4 | 47 | #define MAX_BTES_PER_NODE 4 |
48 | 48 | ||
49 | #define BTE2OFF_CTRL (0) | 49 | #define BTE2OFF_CTRL 0 |
50 | #define BTE2OFF_SRC (SH2_BT_ENG_SRC_ADDR_0 - SH2_BT_ENG_CSR_0) | 50 | #define BTE2OFF_SRC (SH2_BT_ENG_SRC_ADDR_0 - SH2_BT_ENG_CSR_0) |
51 | #define BTE2OFF_DEST (SH2_BT_ENG_DEST_ADDR_0 - SH2_BT_ENG_CSR_0) | 51 | #define BTE2OFF_DEST (SH2_BT_ENG_DEST_ADDR_0 - SH2_BT_ENG_CSR_0) |
52 | #define BTE2OFF_NOTIFY (SH2_BT_ENG_NOTIF_ADDR_0 - SH2_BT_ENG_CSR_0) | 52 | #define BTE2OFF_NOTIFY (SH2_BT_ENG_NOTIF_ADDR_0 - SH2_BT_ENG_CSR_0) |
@@ -75,11 +75,11 @@ | |||
75 | : base + (BTEOFF_NOTIFY/8)) | 75 | : base + (BTEOFF_NOTIFY/8)) |
76 | 76 | ||
77 | /* Define hardware modes */ | 77 | /* Define hardware modes */ |
78 | #define BTE_NOTIFY (IBCT_NOTIFY) | 78 | #define BTE_NOTIFY IBCT_NOTIFY |
79 | #define BTE_NORMAL BTE_NOTIFY | 79 | #define BTE_NORMAL BTE_NOTIFY |
80 | #define BTE_ZERO_FILL (BTE_NOTIFY | IBCT_ZFIL_MODE) | 80 | #define BTE_ZERO_FILL (BTE_NOTIFY | IBCT_ZFIL_MODE) |
81 | /* Use a reserved bit to let the caller specify a wait for any BTE */ | 81 | /* Use a reserved bit to let the caller specify a wait for any BTE */ |
82 | #define BTE_WACQUIRE (0x4000) | 82 | #define BTE_WACQUIRE 0x4000 |
83 | /* Use the BTE on the node with the destination memory */ | 83 | /* Use the BTE on the node with the destination memory */ |
84 | #define BTE_USE_DEST (BTE_WACQUIRE << 1) | 84 | #define BTE_USE_DEST (BTE_WACQUIRE << 1) |
85 | /* Use any available BTE interface on any node for the transfer */ | 85 | /* Use any available BTE interface on any node for the transfer */ |
@@ -100,13 +100,28 @@ | |||
100 | #define BTE_LNSTAT_STORE(_bte, _x) \ | 100 | #define BTE_LNSTAT_STORE(_bte, _x) \ |
101 | HUB_S(_bte->bte_base_addr, (_x)) | 101 | HUB_S(_bte->bte_base_addr, (_x)) |
102 | #define BTE_SRC_STORE(_bte, _x) \ | 102 | #define BTE_SRC_STORE(_bte, _x) \ |
103 | HUB_S(_bte->bte_source_addr, (_x)) | 103 | ({ \ |
104 | u64 __addr = ((_x) & ~AS_MASK); \ | ||
105 | if (is_shub2()) \ | ||
106 | __addr = SH2_TIO_PHYS_TO_DMA(__addr); \ | ||
107 | HUB_S(_bte->bte_source_addr, __addr); \ | ||
108 | }) | ||
104 | #define BTE_DEST_STORE(_bte, _x) \ | 109 | #define BTE_DEST_STORE(_bte, _x) \ |
105 | HUB_S(_bte->bte_destination_addr, (_x)) | 110 | ({ \ |
111 | u64 __addr = ((_x) & ~AS_MASK); \ | ||
112 | if (is_shub2()) \ | ||
113 | __addr = SH2_TIO_PHYS_TO_DMA(__addr); \ | ||
114 | HUB_S(_bte->bte_destination_addr, __addr); \ | ||
115 | }) | ||
106 | #define BTE_CTRL_STORE(_bte, _x) \ | 116 | #define BTE_CTRL_STORE(_bte, _x) \ |
107 | HUB_S(_bte->bte_control_addr, (_x)) | 117 | HUB_S(_bte->bte_control_addr, (_x)) |
108 | #define BTE_NOTIF_STORE(_bte, _x) \ | 118 | #define BTE_NOTIF_STORE(_bte, _x) \ |
109 | HUB_S(_bte->bte_notify_addr, (_x)) | 119 | ({ \ |
120 | u64 __addr = ia64_tpa((_x) & ~AS_MASK); \ | ||
121 | if (is_shub2()) \ | ||
122 | __addr = SH2_TIO_PHYS_TO_DMA(__addr); \ | ||
123 | HUB_S(_bte->bte_notify_addr, __addr); \ | ||
124 | }) | ||
110 | 125 | ||
111 | #define BTE_START_TRANSFER(_bte, _len, _mode) \ | 126 | #define BTE_START_TRANSFER(_bte, _len, _mode) \ |
112 | is_shub2() ? BTE_CTRL_STORE(_bte, IBLS_BUSY | (_mode << 24) | _len) \ | 127 | is_shub2() ? BTE_CTRL_STORE(_bte, IBLS_BUSY | (_mode << 24) | _len) \ |
diff --git a/include/asm-ia64/sn/intr.h b/include/asm-ia64/sn/intr.h index a3431372c6e7..60a51a406eec 100644 --- a/include/asm-ia64/sn/intr.h +++ b/include/asm-ia64/sn/intr.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) 1992 - 1997, 2000-2004 Silicon Graphics, Inc. All rights reserved. | 6 | * Copyright (C) 1992 - 1997, 2000-2006 Silicon Graphics, Inc. All rights reserved. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #ifndef _ASM_IA64_SN_INTR_H | 9 | #ifndef _ASM_IA64_SN_INTR_H |
@@ -11,26 +11,26 @@ | |||
11 | 11 | ||
12 | #include <linux/rcupdate.h> | 12 | #include <linux/rcupdate.h> |
13 | 13 | ||
14 | #define SGI_UART_VECTOR (0xe9) | 14 | #define SGI_UART_VECTOR 0xe9 |
15 | 15 | ||
16 | /* Reserved IRQs : Note, not to exceed IA64_SN2_FIRST_DEVICE_VECTOR */ | 16 | /* Reserved IRQs : Note, not to exceed IA64_SN2_FIRST_DEVICE_VECTOR */ |
17 | #define SGI_XPC_ACTIVATE (0x30) | 17 | #define SGI_XPC_ACTIVATE 0x30 |
18 | #define SGI_II_ERROR (0x31) | 18 | #define SGI_II_ERROR 0x31 |
19 | #define SGI_XBOW_ERROR (0x32) | 19 | #define SGI_XBOW_ERROR 0x32 |
20 | #define SGI_PCIASIC_ERROR (0x33) | 20 | #define SGI_PCIASIC_ERROR 0x33 |
21 | #define SGI_ACPI_SCI_INT (0x34) | 21 | #define SGI_ACPI_SCI_INT 0x34 |
22 | #define SGI_TIOCA_ERROR (0x35) | 22 | #define SGI_TIOCA_ERROR 0x35 |
23 | #define SGI_TIO_ERROR (0x36) | 23 | #define SGI_TIO_ERROR 0x36 |
24 | #define SGI_TIOCX_ERROR (0x37) | 24 | #define SGI_TIOCX_ERROR 0x37 |
25 | #define SGI_MMTIMER_VECTOR (0x38) | 25 | #define SGI_MMTIMER_VECTOR 0x38 |
26 | #define SGI_XPC_NOTIFY (0xe7) | 26 | #define SGI_XPC_NOTIFY 0xe7 |
27 | 27 | ||
28 | #define IA64_SN2_FIRST_DEVICE_VECTOR (0x3c) | 28 | #define IA64_SN2_FIRST_DEVICE_VECTOR 0x3c |
29 | #define IA64_SN2_LAST_DEVICE_VECTOR (0xe6) | 29 | #define IA64_SN2_LAST_DEVICE_VECTOR 0xe6 |
30 | 30 | ||
31 | #define SN2_IRQ_RESERVED (0x1) | 31 | #define SN2_IRQ_RESERVED 0x1 |
32 | #define SN2_IRQ_CONNECTED (0x2) | 32 | #define SN2_IRQ_CONNECTED 0x2 |
33 | #define SN2_IRQ_SHARED (0x4) | 33 | #define SN2_IRQ_SHARED 0x4 |
34 | 34 | ||
35 | // The SN PROM irq struct | 35 | // The SN PROM irq struct |
36 | struct sn_irq_info { | 36 | struct sn_irq_info { |
diff --git a/include/asm-ia64/sn/pcibr_provider.h b/include/asm-ia64/sn/pcibr_provider.h index 9334078b089a..a601d3af39b6 100644 --- a/include/asm-ia64/sn/pcibr_provider.h +++ b/include/asm-ia64/sn/pcibr_provider.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) 1992-1997,2000-2004 Silicon Graphics, Inc. All rights reserved. | 6 | * Copyright (C) 1992-1997,2000-2006 Silicon Graphics, Inc. All rights reserved. |
7 | */ | 7 | */ |
8 | #ifndef _ASM_IA64_SN_PCI_PCIBR_PROVIDER_H | 8 | #ifndef _ASM_IA64_SN_PCI_PCIBR_PROVIDER_H |
9 | #define _ASM_IA64_SN_PCI_PCIBR_PROVIDER_H | 9 | #define _ASM_IA64_SN_PCI_PCIBR_PROVIDER_H |
@@ -115,18 +115,6 @@ struct pcibus_info { | |||
115 | spinlock_t pbi_lock; | 115 | spinlock_t pbi_lock; |
116 | }; | 116 | }; |
117 | 117 | ||
118 | /* | ||
119 | * pcibus_info structure locking macros | ||
120 | */ | ||
121 | inline static unsigned long | ||
122 | pcibr_lock(struct pcibus_info *pcibus_info) | ||
123 | { | ||
124 | unsigned long flag; | ||
125 | spin_lock_irqsave(&pcibus_info->pbi_lock, flag); | ||
126 | return(flag); | ||
127 | } | ||
128 | #define pcibr_unlock(pcibus_info, flag) spin_unlock_irqrestore(&pcibus_info->pbi_lock, flag) | ||
129 | |||
130 | extern int pcibr_init_provider(void); | 118 | extern int pcibr_init_provider(void); |
131 | extern void *pcibr_bus_fixup(struct pcibus_bussoft *, struct pci_controller *); | 119 | extern void *pcibr_bus_fixup(struct pcibus_bussoft *, struct pci_controller *); |
132 | extern dma_addr_t pcibr_dma_map(struct pci_dev *, unsigned long, size_t); | 120 | extern dma_addr_t pcibr_dma_map(struct pci_dev *, unsigned long, size_t); |
diff --git a/include/asm-ia64/sn/sn_feature_sets.h b/include/asm-ia64/sn/sn_feature_sets.h index e68a80853d5d..ff33e3bd3f8e 100644 --- a/include/asm-ia64/sn/sn_feature_sets.h +++ b/include/asm-ia64/sn/sn_feature_sets.h | |||
@@ -8,13 +8,10 @@ | |||
8 | * License. See the file "COPYING" in the main directory of this archive | 8 | * License. See the file "COPYING" in the main directory of this archive |
9 | * for more details. | 9 | * for more details. |
10 | * | 10 | * |
11 | * Copyright (c) 2005 Silicon Graphics, Inc. All rights reserved. | 11 | * Copyright (c) 2005-2006 Silicon Graphics, Inc. All rights reserved. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | 14 | ||
15 | #include <asm/types.h> | ||
16 | #include <asm/bitops.h> | ||
17 | |||
18 | /* --------------------- PROM Features -----------------------------*/ | 15 | /* --------------------- PROM Features -----------------------------*/ |
19 | extern int sn_prom_feature_available(int id); | 16 | extern int sn_prom_feature_available(int id); |
20 | 17 | ||
@@ -27,14 +24,12 @@ extern int sn_prom_feature_available(int id); | |||
27 | * "false" for new features. | 24 | * "false" for new features. |
28 | * | 25 | * |
29 | * Use: | 26 | * Use: |
30 | * if (sn_prom_feature_available(PRF_FEATURE_XXX)) | 27 | * if (sn_prom_feature_available(PRF_XXX)) |
31 | * ... | 28 | * ... |
32 | */ | 29 | */ |
33 | 30 | ||
34 | /* | 31 | #define PRF_PAL_CACHE_FLUSH_SAFE 0 |
35 | * Example: feature XXX | 32 | #define PRF_DEVICE_FLUSH_LIST 1 |
36 | */ | ||
37 | #define PRF_FEATURE_XXX 0 | ||
38 | 33 | ||
39 | 34 | ||
40 | 35 | ||
@@ -51,7 +46,7 @@ extern int sn_prom_feature_available(int id); | |||
51 | * | 46 | * |
52 | * By default, features are disabled unless explicitly enabled. | 47 | * By default, features are disabled unless explicitly enabled. |
53 | */ | 48 | */ |
54 | #define OSF_MCA_SLV_TO_OS_INIT_SLV 0 | 49 | #define OSF_MCA_SLV_TO_OS_INIT_SLV 0 |
55 | #define OSF_FEAT_LOG_SBES 1 | 50 | #define OSF_FEAT_LOG_SBES 1 |
56 | 51 | ||
57 | #endif /* _ASM_IA64_SN_FEATURE_SETS_H */ | 52 | #endif /* _ASM_IA64_SN_FEATURE_SETS_H */ |
diff --git a/include/asm-ia64/sn/xpc.h b/include/asm-ia64/sn/xpc.h index 0c36928ffd8b..df7f5f4f3cde 100644 --- a/include/asm-ia64/sn/xpc.h +++ b/include/asm-ia64/sn/xpc.h | |||
@@ -508,19 +508,24 @@ struct xpc_channel { | |||
508 | #define XPC_C_OPENREQUEST 0x00000010 /* local open channel request */ | 508 | #define XPC_C_OPENREQUEST 0x00000010 /* local open channel request */ |
509 | 509 | ||
510 | #define XPC_C_SETUP 0x00000020 /* channel's msgqueues are alloc'd */ | 510 | #define XPC_C_SETUP 0x00000020 /* channel's msgqueues are alloc'd */ |
511 | #define XPC_C_CONNECTCALLOUT 0x00000040 /* channel connected callout made */ | 511 | #define XPC_C_CONNECTEDCALLOUT 0x00000040 /* connected callout initiated */ |
512 | #define XPC_C_CONNECTED 0x00000080 /* local channel is connected */ | 512 | #define XPC_C_CONNECTEDCALLOUT_MADE \ |
513 | #define XPC_C_CONNECTING 0x00000100 /* channel is being connected */ | 513 | 0x00000080 /* connected callout completed */ |
514 | 514 | #define XPC_C_CONNECTED 0x00000100 /* local channel is connected */ | |
515 | #define XPC_C_RCLOSEREPLY 0x00000200 /* remote close channel reply */ | 515 | #define XPC_C_CONNECTING 0x00000200 /* channel is being connected */ |
516 | #define XPC_C_CLOSEREPLY 0x00000400 /* local close channel reply */ | 516 | |
517 | #define XPC_C_RCLOSEREQUEST 0x00000800 /* remote close channel request */ | 517 | #define XPC_C_RCLOSEREPLY 0x00000400 /* remote close channel reply */ |
518 | #define XPC_C_CLOSEREQUEST 0x00001000 /* local close channel request */ | 518 | #define XPC_C_CLOSEREPLY 0x00000800 /* local close channel reply */ |
519 | 519 | #define XPC_C_RCLOSEREQUEST 0x00001000 /* remote close channel request */ | |
520 | #define XPC_C_DISCONNECTED 0x00002000 /* channel is disconnected */ | 520 | #define XPC_C_CLOSEREQUEST 0x00002000 /* local close channel request */ |
521 | #define XPC_C_DISCONNECTING 0x00004000 /* channel is being disconnected */ | 521 | |
522 | #define XPC_C_DISCONNECTCALLOUT 0x00008000 /* chan disconnected callout made */ | 522 | #define XPC_C_DISCONNECTED 0x00004000 /* channel is disconnected */ |
523 | #define XPC_C_WDISCONNECT 0x00010000 /* waiting for channel disconnect */ | 523 | #define XPC_C_DISCONNECTING 0x00008000 /* channel is being disconnected */ |
524 | #define XPC_C_DISCONNECTINGCALLOUT \ | ||
525 | 0x00010000 /* disconnecting callout initiated */ | ||
526 | #define XPC_C_DISCONNECTINGCALLOUT_MADE \ | ||
527 | 0x00020000 /* disconnecting callout completed */ | ||
528 | #define XPC_C_WDISCONNECT 0x00040000 /* waiting for channel disconnect */ | ||
524 | 529 | ||
525 | 530 | ||
526 | 531 | ||
diff --git a/include/asm-ia64/system.h b/include/asm-ia64/system.h index 80c5a234e259..062538715623 100644 --- a/include/asm-ia64/system.h +++ b/include/asm-ia64/system.h | |||
@@ -249,32 +249,7 @@ extern void ia64_load_extra (struct task_struct *task); | |||
249 | # define switch_to(prev,next,last) __switch_to(prev, next, last) | 249 | # define switch_to(prev,next,last) __switch_to(prev, next, last) |
250 | #endif | 250 | #endif |
251 | 251 | ||
252 | /* | ||
253 | * On IA-64, we don't want to hold the runqueue's lock during the low-level context-switch, | ||
254 | * because that could cause a deadlock. Here is an example by Erich Focht: | ||
255 | * | ||
256 | * Example: | ||
257 | * CPU#0: | ||
258 | * schedule() | ||
259 | * -> spin_lock_irq(&rq->lock) | ||
260 | * -> context_switch() | ||
261 | * -> wrap_mmu_context() | ||
262 | * -> read_lock(&tasklist_lock) | ||
263 | * | ||
264 | * CPU#1: | ||
265 | * sys_wait4() or release_task() or forget_original_parent() | ||
266 | * -> write_lock(&tasklist_lock) | ||
267 | * -> do_notify_parent() | ||
268 | * -> wake_up_parent() | ||
269 | * -> try_to_wake_up() | ||
270 | * -> spin_lock_irq(&parent_rq->lock) | ||
271 | * | ||
272 | * If the parent's rq happens to be on CPU#0, we'll wait for the rq->lock | ||
273 | * of that CPU which will not be released, because there we wait for the | ||
274 | * tasklist_lock to become available. | ||
275 | */ | ||
276 | #define __ARCH_WANT_UNLOCKED_CTXSW | 252 | #define __ARCH_WANT_UNLOCKED_CTXSW |
277 | |||
278 | #define ARCH_HAS_PREFETCH_SWITCH_STACK | 253 | #define ARCH_HAS_PREFETCH_SWITCH_STACK |
279 | #define ia64_platform_is(x) (strcmp(x, platform_name) == 0) | 254 | #define ia64_platform_is(x) (strcmp(x, platform_name) == 0) |
280 | 255 | ||
diff --git a/include/asm-ia64/timex.h b/include/asm-ia64/timex.h index 414aae060440..05a6baf8a472 100644 --- a/include/asm-ia64/timex.h +++ b/include/asm-ia64/timex.h | |||
@@ -15,6 +15,8 @@ | |||
15 | 15 | ||
16 | typedef unsigned long cycles_t; | 16 | typedef unsigned long cycles_t; |
17 | 17 | ||
18 | extern void (*ia64_udelay)(unsigned long usecs); | ||
19 | |||
18 | /* | 20 | /* |
19 | * For performance reasons, we don't want to define CLOCK_TICK_TRATE as | 21 | * For performance reasons, we don't want to define CLOCK_TICK_TRATE as |
20 | * local_cpu_data->itc_rate. Fortunately, we don't have to, either: according to George | 22 | * local_cpu_data->itc_rate. Fortunately, we don't have to, either: according to George |
diff --git a/include/asm-ia64/topology.h b/include/asm-ia64/topology.h index 412ef8e493a8..3ee19dfa46df 100644 --- a/include/asm-ia64/topology.h +++ b/include/asm-ia64/topology.h | |||
@@ -102,6 +102,13 @@ void build_cpu_to_node_map(void); | |||
102 | 102 | ||
103 | #endif /* CONFIG_NUMA */ | 103 | #endif /* CONFIG_NUMA */ |
104 | 104 | ||
105 | #ifdef CONFIG_SMP | ||
106 | #define topology_physical_package_id(cpu) (cpu_data(cpu)->socket_id) | ||
107 | #define topology_core_id(cpu) (cpu_data(cpu)->core_id) | ||
108 | #define topology_core_siblings(cpu) (cpu_core_map[cpu]) | ||
109 | #define topology_thread_siblings(cpu) (cpu_sibling_map[cpu]) | ||
110 | #endif | ||
111 | |||
105 | #include <asm-generic/topology.h> | 112 | #include <asm-generic/topology.h> |
106 | 113 | ||
107 | #endif /* _ASM_IA64_TOPOLOGY_H */ | 114 | #endif /* _ASM_IA64_TOPOLOGY_H */ |
diff --git a/include/asm-ia64/unistd.h b/include/asm-ia64/unistd.h index 962f9bd1bdff..019956c613e4 100644 --- a/include/asm-ia64/unistd.h +++ b/include/asm-ia64/unistd.h | |||
@@ -270,12 +270,27 @@ | |||
270 | #define __NR_inotify_add_watch 1278 | 270 | #define __NR_inotify_add_watch 1278 |
271 | #define __NR_inotify_rm_watch 1279 | 271 | #define __NR_inotify_rm_watch 1279 |
272 | #define __NR_migrate_pages 1280 | 272 | #define __NR_migrate_pages 1280 |
273 | #define __NR_openat 1281 | ||
274 | #define __NR_mkdirat 1282 | ||
275 | #define __NR_mknodat 1283 | ||
276 | #define __NR_fchownat 1284 | ||
277 | #define __NR_futimesat 1285 | ||
278 | #define __NR_newfstatat 1286 | ||
279 | #define __NR_unlinkat 1287 | ||
280 | #define __NR_renameat 1288 | ||
281 | #define __NR_linkat 1289 | ||
282 | #define __NR_symlinkat 1290 | ||
283 | #define __NR_readlinkat 1291 | ||
284 | #define __NR_fchmodat 1292 | ||
285 | #define __NR_faccessat 1293 | ||
286 | /* 1294, 1295 reserved for pselect/ppoll */ | ||
287 | #define __NR_unshare 1296 | ||
273 | 288 | ||
274 | #ifdef __KERNEL__ | 289 | #ifdef __KERNEL__ |
275 | 290 | ||
276 | #include <linux/config.h> | 291 | #include <linux/config.h> |
277 | 292 | ||
278 | #define NR_syscalls 270 /* length of syscall table */ | 293 | #define NR_syscalls 273 /* length of syscall table */ |
279 | 294 | ||
280 | #define __ARCH_WANT_SYS_RT_SIGACTION | 295 | #define __ARCH_WANT_SYS_RT_SIGACTION |
281 | 296 | ||
diff --git a/include/asm-m32r/mman.h b/include/asm-m32r/mman.h index 12e29747bc84..695a860c024f 100644 --- a/include/asm-m32r/mman.h +++ b/include/asm-m32r/mman.h | |||
@@ -1,21 +1,9 @@ | |||
1 | #ifndef __M32R_MMAN_H__ | 1 | #ifndef __M32R_MMAN_H__ |
2 | #define __M32R_MMAN_H__ | 2 | #define __M32R_MMAN_H__ |
3 | 3 | ||
4 | /* orig : i386 2.6.0-test6 */ | 4 | #include <asm-generic/mman.h> |
5 | |||
6 | #define PROT_READ 0x1 /* page can be read */ | ||
7 | #define PROT_WRITE 0x2 /* page can be written */ | ||
8 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
9 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
10 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
11 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
12 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
13 | 5 | ||
14 | #define MAP_SHARED 0x01 /* Share changes */ | 6 | /* orig : i386 2.6.0-test6 */ |
15 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
16 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
17 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
18 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
19 | 7 | ||
20 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 8 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
21 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 9 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
@@ -25,22 +13,7 @@ | |||
25 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | 13 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ |
26 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 14 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
27 | 15 | ||
28 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
29 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
30 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
31 | |||
32 | #define MCL_CURRENT 1 /* lock all current mappings */ | 16 | #define MCL_CURRENT 1 /* lock all current mappings */ |
33 | #define MCL_FUTURE 2 /* lock all future mappings */ | 17 | #define MCL_FUTURE 2 /* lock all future mappings */ |
34 | 18 | ||
35 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
36 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
37 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
38 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
39 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
40 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
41 | |||
42 | /* compatibility flags */ | ||
43 | #define MAP_ANON MAP_ANONYMOUS | ||
44 | #define MAP_FILE 0 | ||
45 | |||
46 | #endif /* __M32R_MMAN_H__ */ | 19 | #endif /* __M32R_MMAN_H__ */ |
diff --git a/include/asm-m32r/system.h b/include/asm-m32r/system.h index 06c12a037cba..d6a2c613be68 100644 --- a/include/asm-m32r/system.h +++ b/include/asm-m32r/system.h | |||
@@ -239,7 +239,7 @@ __cmpxchg_u32(volatile unsigned int *p, unsigned int old, unsigned int new) | |||
239 | " bra 2f; \n" | 239 | " bra 2f; \n" |
240 | " .fillinsn \n" | 240 | " .fillinsn \n" |
241 | "1:" | 241 | "1:" |
242 | M32R_UNLOCK" %2, @%1; \n" | 242 | M32R_UNLOCK" %0, @%1; \n" |
243 | " .fillinsn \n" | 243 | " .fillinsn \n" |
244 | "2:" | 244 | "2:" |
245 | : "=&r" (retval) | 245 | : "=&r" (retval) |
diff --git a/include/asm-m32r/uaccess.h b/include/asm-m32r/uaccess.h index 0da7c47d2f01..e8ae61956a51 100644 --- a/include/asm-m32r/uaccess.h +++ b/include/asm-m32r/uaccess.h | |||
@@ -328,7 +328,7 @@ extern void __put_user_bad(void); | |||
328 | " .long 1b,4b\n" \ | 328 | " .long 1b,4b\n" \ |
329 | " .long 2b,4b\n" \ | 329 | " .long 2b,4b\n" \ |
330 | ".previous" \ | 330 | ".previous" \ |
331 | : "=r"(err) \ | 331 | : "=&r"(err) \ |
332 | : "r"(x), "r"(addr), "i"(-EFAULT), "0"(err) \ | 332 | : "r"(x), "r"(addr), "i"(-EFAULT), "0"(err) \ |
333 | : "r14", "memory") | 333 | : "r14", "memory") |
334 | 334 | ||
@@ -353,7 +353,7 @@ extern void __put_user_bad(void); | |||
353 | " .long 1b,4b\n" \ | 353 | " .long 1b,4b\n" \ |
354 | " .long 2b,4b\n" \ | 354 | " .long 2b,4b\n" \ |
355 | ".previous" \ | 355 | ".previous" \ |
356 | : "=r"(err) \ | 356 | : "=&r"(err) \ |
357 | : "r"(x), "r"(addr), "i"(-EFAULT), "0"(err) \ | 357 | : "r"(x), "r"(addr), "i"(-EFAULT), "0"(err) \ |
358 | : "r14", "memory") | 358 | : "r14", "memory") |
359 | #else | 359 | #else |
@@ -398,7 +398,7 @@ struct __large_struct { unsigned long buf[100]; }; | |||
398 | " .balign 4\n" \ | 398 | " .balign 4\n" \ |
399 | " .long 1b,3b\n" \ | 399 | " .long 1b,3b\n" \ |
400 | ".previous" \ | 400 | ".previous" \ |
401 | : "=r"(err) \ | 401 | : "=&r"(err) \ |
402 | : "r"(x), "r"(addr), "i"(-EFAULT), "0"(err) \ | 402 | : "r"(x), "r"(addr), "i"(-EFAULT), "0"(err) \ |
403 | : "r14", "memory") | 403 | : "r14", "memory") |
404 | 404 | ||
@@ -442,7 +442,7 @@ do { \ | |||
442 | " .balign 4\n" \ | 442 | " .balign 4\n" \ |
443 | " .long 1b,3b\n" \ | 443 | " .long 1b,3b\n" \ |
444 | ".previous" \ | 444 | ".previous" \ |
445 | : "=r"(err), "=&r"(x) \ | 445 | : "=&r"(err), "=&r"(x) \ |
446 | : "r"(addr), "i"(-EFAULT), "0"(err) \ | 446 | : "r"(addr), "i"(-EFAULT), "0"(err) \ |
447 | : "r14", "memory") | 447 | : "r14", "memory") |
448 | 448 | ||
diff --git a/include/asm-m68k/atomic.h b/include/asm-m68k/atomic.h index a4a84d5c65d5..862e497c2645 100644 --- a/include/asm-m68k/atomic.h +++ b/include/asm-m68k/atomic.h | |||
@@ -55,6 +55,7 @@ static inline int atomic_inc_and_test(atomic_t *v) | |||
55 | } | 55 | } |
56 | 56 | ||
57 | #ifdef CONFIG_RMW_INSNS | 57 | #ifdef CONFIG_RMW_INSNS |
58 | |||
58 | static inline int atomic_add_return(int i, atomic_t *v) | 59 | static inline int atomic_add_return(int i, atomic_t *v) |
59 | { | 60 | { |
60 | int t, tmp; | 61 | int t, tmp; |
@@ -82,7 +83,12 @@ static inline int atomic_sub_return(int i, atomic_t *v) | |||
82 | : "g" (i), "2" (atomic_read(v))); | 83 | : "g" (i), "2" (atomic_read(v))); |
83 | return t; | 84 | return t; |
84 | } | 85 | } |
86 | |||
87 | #define atomic_cmpxchg(v, o, n) ((int)cmpxchg(&((v)->counter), (o), (n))) | ||
88 | #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) | ||
89 | |||
85 | #else /* !CONFIG_RMW_INSNS */ | 90 | #else /* !CONFIG_RMW_INSNS */ |
91 | |||
86 | static inline int atomic_add_return(int i, atomic_t * v) | 92 | static inline int atomic_add_return(int i, atomic_t * v) |
87 | { | 93 | { |
88 | unsigned long flags; | 94 | unsigned long flags; |
@@ -110,6 +116,32 @@ static inline int atomic_sub_return(int i, atomic_t * v) | |||
110 | 116 | ||
111 | return t; | 117 | return t; |
112 | } | 118 | } |
119 | |||
120 | static inline int atomic_cmpxchg(atomic_t *v, int old, int new) | ||
121 | { | ||
122 | unsigned long flags; | ||
123 | int prev; | ||
124 | |||
125 | local_irq_save(flags); | ||
126 | prev = atomic_read(v); | ||
127 | if (prev == old) | ||
128 | atomic_set(v, new); | ||
129 | local_irq_restore(flags); | ||
130 | return prev; | ||
131 | } | ||
132 | |||
133 | static inline int atomic_xchg(atomic_t *v, int new) | ||
134 | { | ||
135 | unsigned long flags; | ||
136 | int prev; | ||
137 | |||
138 | local_irq_save(flags); | ||
139 | prev = atomic_read(v); | ||
140 | atomic_set(v, new); | ||
141 | local_irq_restore(flags); | ||
142 | return prev; | ||
143 | } | ||
144 | |||
113 | #endif /* !CONFIG_RMW_INSNS */ | 145 | #endif /* !CONFIG_RMW_INSNS */ |
114 | 146 | ||
115 | #define atomic_dec_return(v) atomic_sub_return(1, (v)) | 147 | #define atomic_dec_return(v) atomic_sub_return(1, (v)) |
@@ -139,9 +171,6 @@ static inline void atomic_set_mask(unsigned long mask, unsigned long *v) | |||
139 | __asm__ __volatile__("orl %1,%0" : "+m" (*v) : "id" (mask)); | 171 | __asm__ __volatile__("orl %1,%0" : "+m" (*v) : "id" (mask)); |
140 | } | 172 | } |
141 | 173 | ||
142 | #define atomic_cmpxchg(v, o, n) ((int)cmpxchg(&((v)->counter), (o), (n))) | ||
143 | #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) | ||
144 | |||
145 | #define atomic_add_unless(v, a, u) \ | 174 | #define atomic_add_unless(v, a, u) \ |
146 | ({ \ | 175 | ({ \ |
147 | int c, old; \ | 176 | int c, old; \ |
diff --git a/include/asm-m68k/irq.h b/include/asm-m68k/irq.h index 325c86f8512d..9ac047c400c4 100644 --- a/include/asm-m68k/irq.h +++ b/include/asm-m68k/irq.h | |||
@@ -79,7 +79,7 @@ static __inline__ int irq_canonicalize(int irq) | |||
79 | 79 | ||
80 | extern void (*enable_irq)(unsigned int); | 80 | extern void (*enable_irq)(unsigned int); |
81 | extern void (*disable_irq)(unsigned int); | 81 | extern void (*disable_irq)(unsigned int); |
82 | #define enable_irq_nosync enable_irq | 82 | #define disable_irq_nosync disable_irq |
83 | 83 | ||
84 | struct pt_regs; | 84 | struct pt_regs; |
85 | 85 | ||
diff --git a/include/asm-m68k/mman.h b/include/asm-m68k/mman.h index ea262ab88b3b..1626d37f4898 100644 --- a/include/asm-m68k/mman.h +++ b/include/asm-m68k/mman.h | |||
@@ -1,19 +1,7 @@ | |||
1 | #ifndef __M68K_MMAN_H__ | 1 | #ifndef __M68K_MMAN_H__ |
2 | #define __M68K_MMAN_H__ | 2 | #define __M68K_MMAN_H__ |
3 | 3 | ||
4 | #define PROT_READ 0x1 /* page can be read */ | 4 | #include <asm-generic/mman.h> |
5 | #define PROT_WRITE 0x2 /* page can be written */ | ||
6 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
7 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
8 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
9 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
10 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
11 | |||
12 | #define MAP_SHARED 0x01 /* Share changes */ | ||
13 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
14 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
15 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
16 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
17 | 5 | ||
18 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 6 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
19 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 7 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
@@ -23,22 +11,7 @@ | |||
23 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | 11 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ |
24 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 12 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
25 | 13 | ||
26 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
27 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
28 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
29 | |||
30 | #define MCL_CURRENT 1 /* lock all current mappings */ | 14 | #define MCL_CURRENT 1 /* lock all current mappings */ |
31 | #define MCL_FUTURE 2 /* lock all future mappings */ | 15 | #define MCL_FUTURE 2 /* lock all future mappings */ |
32 | 16 | ||
33 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
34 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
35 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
36 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
37 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
38 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
39 | |||
40 | /* compatibility flags */ | ||
41 | #define MAP_ANON MAP_ANONYMOUS | ||
42 | #define MAP_FILE 0 | ||
43 | |||
44 | #endif /* __M68K_MMAN_H__ */ | 17 | #endif /* __M68K_MMAN_H__ */ |
diff --git a/include/asm-m68k/raw_io.h b/include/asm-m68k/raw_io.h index 5439bcaa57c6..811ccd25d4a6 100644 --- a/include/asm-m68k/raw_io.h +++ b/include/asm-m68k/raw_io.h | |||
@@ -336,6 +336,7 @@ static inline void raw_outsw_swapw(volatile u16 __iomem *port, const u16 *buf, | |||
336 | : "d0", "a0", "a1", "d6"); | 336 | : "d0", "a0", "a1", "d6"); |
337 | } | 337 | } |
338 | 338 | ||
339 | #define __raw_writel raw_outl | ||
339 | 340 | ||
340 | #endif /* __KERNEL__ */ | 341 | #endif /* __KERNEL__ */ |
341 | 342 | ||
diff --git a/include/asm-m68knommu/hardirq.h b/include/asm-m68knommu/hardirq.h index e8659e739a64..476180f4cba2 100644 --- a/include/asm-m68knommu/hardirq.h +++ b/include/asm-m68knommu/hardirq.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/config.h> | 4 | #include <linux/config.h> |
5 | #include <linux/cache.h> | 5 | #include <linux/cache.h> |
6 | #include <linux/threads.h> | 6 | #include <linux/threads.h> |
7 | #include <asm/irq.h> | ||
7 | 8 | ||
8 | typedef struct { | 9 | typedef struct { |
9 | unsigned int __softirq_pending; | 10 | unsigned int __softirq_pending; |
diff --git a/include/asm-mips/abi.h b/include/asm-mips/abi.h index 2e7e651c3e3f..1ce0518ace2e 100644 --- a/include/asm-mips/abi.h +++ b/include/asm-mips/abi.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) 2005 by Ralf Baechle | 6 | * Copyright (C) 2005, 06 by Ralf Baechle (ralf@linux-mips.org) |
7 | * Copyright (C) 2005 MIPS Technologies, Inc. | 7 | * Copyright (C) 2005 MIPS Technologies, Inc. |
8 | */ | 8 | */ |
9 | #ifndef _ASM_ABI_H | 9 | #ifndef _ASM_ABI_H |
@@ -13,7 +13,7 @@ | |||
13 | #include <asm/siginfo.h> | 13 | #include <asm/siginfo.h> |
14 | 14 | ||
15 | struct mips_abi { | 15 | struct mips_abi { |
16 | int (* const do_signal)(sigset_t *oldset, struct pt_regs *regs); | 16 | void (* const do_signal)(struct pt_regs *regs); |
17 | int (* const setup_frame)(struct k_sigaction * ka, | 17 | int (* const setup_frame)(struct k_sigaction * ka, |
18 | struct pt_regs *regs, int signr, | 18 | struct pt_regs *regs, int signr, |
19 | sigset_t *set); | 19 | sigset_t *set); |
diff --git a/include/asm-mips/atomic.h b/include/asm-mips/atomic.h index 654b97d3e13a..2c8b853376c9 100644 --- a/include/asm-mips/atomic.h +++ b/include/asm-mips/atomic.h | |||
@@ -250,7 +250,10 @@ static __inline__ int atomic_sub_if_positive(int i, atomic_t * v) | |||
250 | " subu %0, %1, %3 \n" | 250 | " subu %0, %1, %3 \n" |
251 | " bltz %0, 1f \n" | 251 | " bltz %0, 1f \n" |
252 | " sc %0, %2 \n" | 252 | " sc %0, %2 \n" |
253 | " .set noreorder \n" | ||
253 | " beqzl %0, 1b \n" | 254 | " beqzl %0, 1b \n" |
255 | " subu %0, %1, %3 \n" | ||
256 | " .set reorder \n" | ||
254 | " sync \n" | 257 | " sync \n" |
255 | "1: \n" | 258 | "1: \n" |
256 | " .set mips0 \n" | 259 | " .set mips0 \n" |
@@ -266,7 +269,10 @@ static __inline__ int atomic_sub_if_positive(int i, atomic_t * v) | |||
266 | " subu %0, %1, %3 \n" | 269 | " subu %0, %1, %3 \n" |
267 | " bltz %0, 1f \n" | 270 | " bltz %0, 1f \n" |
268 | " sc %0, %2 \n" | 271 | " sc %0, %2 \n" |
272 | " .set noreorder \n" | ||
269 | " beqz %0, 1b \n" | 273 | " beqz %0, 1b \n" |
274 | " subu %0, %1, %3 \n" | ||
275 | " .set reorder \n" | ||
270 | " sync \n" | 276 | " sync \n" |
271 | "1: \n" | 277 | "1: \n" |
272 | " .set mips0 \n" | 278 | " .set mips0 \n" |
@@ -598,7 +604,10 @@ static __inline__ long atomic64_sub_if_positive(long i, atomic64_t * v) | |||
598 | " dsubu %0, %1, %3 \n" | 604 | " dsubu %0, %1, %3 \n" |
599 | " bltz %0, 1f \n" | 605 | " bltz %0, 1f \n" |
600 | " scd %0, %2 \n" | 606 | " scd %0, %2 \n" |
607 | " .set noreorder \n" | ||
601 | " beqzl %0, 1b \n" | 608 | " beqzl %0, 1b \n" |
609 | " dsubu %0, %1, %3 \n" | ||
610 | " .set reorder \n" | ||
602 | " sync \n" | 611 | " sync \n" |
603 | "1: \n" | 612 | "1: \n" |
604 | " .set mips0 \n" | 613 | " .set mips0 \n" |
@@ -614,7 +623,10 @@ static __inline__ long atomic64_sub_if_positive(long i, atomic64_t * v) | |||
614 | " dsubu %0, %1, %3 \n" | 623 | " dsubu %0, %1, %3 \n" |
615 | " bltz %0, 1f \n" | 624 | " bltz %0, 1f \n" |
616 | " scd %0, %2 \n" | 625 | " scd %0, %2 \n" |
626 | " .set noreorder \n" | ||
617 | " beqz %0, 1b \n" | 627 | " beqz %0, 1b \n" |
628 | " dsubu %0, %1, %3 \n" | ||
629 | " .set reorder \n" | ||
618 | " sync \n" | 630 | " sync \n" |
619 | "1: \n" | 631 | "1: \n" |
620 | " .set mips0 \n" | 632 | " .set mips0 \n" |
diff --git a/include/asm-mips/bitops.h b/include/asm-mips/bitops.h index 3b0c8aaf6e8b..8e802059fe67 100644 --- a/include/asm-mips/bitops.h +++ b/include/asm-mips/bitops.h | |||
@@ -644,20 +644,26 @@ static inline unsigned long ffz(unsigned long word) | |||
644 | } | 644 | } |
645 | 645 | ||
646 | /* | 646 | /* |
647 | * flz - find last zero in word. | 647 | * fls - find last bit set. |
648 | * @word: The word to search | 648 | * @word: The word to search |
649 | * | 649 | * |
650 | * Returns 0..SZLONG-1 | 650 | * Returns 1..SZLONG |
651 | * Undefined if no zero exists, so code should check against ~0UL first. | 651 | * Returns 0 if no bit exists |
652 | */ | 652 | */ |
653 | static inline unsigned long flz(unsigned long word) | 653 | static inline unsigned long fls(unsigned long word) |
654 | { | 654 | { |
655 | #if defined(CONFIG_CPU_MIPS32) || defined(CONFIG_CPU_MIPS64) | ||
656 | return __ilog2(~word); | ||
657 | #else | ||
658 | #ifdef CONFIG_32BIT | 655 | #ifdef CONFIG_32BIT |
659 | int r = 31, s; | 656 | #ifdef CONFIG_CPU_MIPS32 |
660 | word = ~word; | 657 | __asm__ ("clz %0, %1" : "=r" (word) : "r" (word)); |
658 | |||
659 | return 32 - word; | ||
660 | #else | ||
661 | { | ||
662 | int r = 32, s; | ||
663 | |||
664 | if (word == 0) | ||
665 | return 0; | ||
666 | |||
661 | s = 16; if ((word & 0xffff0000)) s = 0; r -= s; word <<= s; | 667 | s = 16; if ((word & 0xffff0000)) s = 0; r -= s; word <<= s; |
662 | s = 8; if ((word & 0xff000000)) s = 0; r -= s; word <<= s; | 668 | s = 8; if ((word & 0xff000000)) s = 0; r -= s; word <<= s; |
663 | s = 4; if ((word & 0xf0000000)) s = 0; r -= s; word <<= s; | 669 | s = 4; if ((word & 0xf0000000)) s = 0; r -= s; word <<= s; |
@@ -665,10 +671,23 @@ static inline unsigned long flz(unsigned long word) | |||
665 | s = 1; if ((word & 0x80000000)) s = 0; r -= s; | 671 | s = 1; if ((word & 0x80000000)) s = 0; r -= s; |
666 | 672 | ||
667 | return r; | 673 | return r; |
674 | } | ||
668 | #endif | 675 | #endif |
676 | #endif /* CONFIG_32BIT */ | ||
677 | |||
669 | #ifdef CONFIG_64BIT | 678 | #ifdef CONFIG_64BIT |
670 | int r = 63, s; | 679 | #ifdef CONFIG_CPU_MIPS64 |
671 | word = ~word; | 680 | |
681 | __asm__ ("dclz %0, %1" : "=r" (word) : "r" (word)); | ||
682 | |||
683 | return 64 - word; | ||
684 | #else | ||
685 | { | ||
686 | int r = 64, s; | ||
687 | |||
688 | if (word == 0) | ||
689 | return 0; | ||
690 | |||
672 | s = 32; if ((word & 0xffffffff00000000UL)) s = 0; r -= s; word <<= s; | 691 | s = 32; if ((word & 0xffffffff00000000UL)) s = 0; r -= s; word <<= s; |
673 | s = 16; if ((word & 0xffff000000000000UL)) s = 0; r -= s; word <<= s; | 692 | s = 16; if ((word & 0xffff000000000000UL)) s = 0; r -= s; word <<= s; |
674 | s = 8; if ((word & 0xff00000000000000UL)) s = 0; r -= s; word <<= s; | 693 | s = 8; if ((word & 0xff00000000000000UL)) s = 0; r -= s; word <<= s; |
@@ -677,24 +696,11 @@ static inline unsigned long flz(unsigned long word) | |||
677 | s = 1; if ((word & 0x8000000000000000UL)) s = 0; r -= s; | 696 | s = 1; if ((word & 0x8000000000000000UL)) s = 0; r -= s; |
678 | 697 | ||
679 | return r; | 698 | return r; |
699 | } | ||
680 | #endif | 700 | #endif |
681 | #endif | 701 | #endif /* CONFIG_64BIT */ |
682 | } | 702 | } |
683 | 703 | ||
684 | /* | ||
685 | * fls - find last bit set. | ||
686 | * @word: The word to search | ||
687 | * | ||
688 | * Returns 1..SZLONG | ||
689 | * Returns 0 if no bit exists | ||
690 | */ | ||
691 | static inline unsigned long fls(unsigned long word) | ||
692 | { | ||
693 | if (word == 0) | ||
694 | return 0; | ||
695 | |||
696 | return flz(~word) + 1; | ||
697 | } | ||
698 | #define fls64(x) generic_fls64(x) | 704 | #define fls64(x) generic_fls64(x) |
699 | 705 | ||
700 | /* | 706 | /* |
diff --git a/include/asm-mips/byteorder.h b/include/asm-mips/byteorder.h index d1fe9e5c62e4..584f8128fffd 100644 --- a/include/asm-mips/byteorder.h +++ b/include/asm-mips/byteorder.h | |||
@@ -8,10 +8,39 @@ | |||
8 | #ifndef _ASM_BYTEORDER_H | 8 | #ifndef _ASM_BYTEORDER_H |
9 | #define _ASM_BYTEORDER_H | 9 | #define _ASM_BYTEORDER_H |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/compiler.h> | ||
11 | #include <asm/types.h> | 13 | #include <asm/types.h> |
12 | 14 | ||
13 | #ifdef __GNUC__ | 15 | #ifdef __GNUC__ |
14 | 16 | ||
17 | #ifdef CONFIG_CPU_MIPSR2 | ||
18 | |||
19 | static __inline__ __attribute_const__ __u16 ___arch__swab16(__u16 x) | ||
20 | { | ||
21 | __asm__( | ||
22 | " wsbh %0, %1 \n" | ||
23 | : "=r" (x) | ||
24 | : "r" (x)); | ||
25 | |||
26 | return x; | ||
27 | } | ||
28 | #define __arch__swab16(x) ___arch__swab16(x) | ||
29 | |||
30 | static __inline__ __attribute_const__ __u32 ___arch__swab32(__u32 x) | ||
31 | { | ||
32 | __asm__( | ||
33 | " wsbh %0, %1 \n" | ||
34 | " rotr %0, %0, 16 \n" | ||
35 | : "=r" (x) | ||
36 | : "r" (x)); | ||
37 | |||
38 | return x; | ||
39 | } | ||
40 | #define __arch__swab32(x) ___arch__swab32(x) | ||
41 | |||
42 | #endif /* CONFIG_CPU_MIPSR2 */ | ||
43 | |||
15 | #if !defined(__STRICT_ANSI__) || defined(__KERNEL__) | 44 | #if !defined(__STRICT_ANSI__) || defined(__KERNEL__) |
16 | # define __BYTEORDER_HAS_U64__ | 45 | # define __BYTEORDER_HAS_U64__ |
17 | # define __SWAB_64_THRU_32__ | 46 | # define __SWAB_64_THRU_32__ |
diff --git a/include/asm-mips/cacheflush.h b/include/asm-mips/cacheflush.h index a18ba2edc0b6..aeae9fabf4a9 100644 --- a/include/asm-mips/cacheflush.h +++ b/include/asm-mips/cacheflush.h | |||
@@ -49,8 +49,7 @@ static inline void flush_dcache_page(struct page *page) | |||
49 | 49 | ||
50 | extern void (*flush_icache_page)(struct vm_area_struct *vma, | 50 | extern void (*flush_icache_page)(struct vm_area_struct *vma, |
51 | struct page *page); | 51 | struct page *page); |
52 | extern void (*flush_icache_range)(unsigned long __user start, | 52 | extern void (*flush_icache_range)(unsigned long start, unsigned long end); |
53 | unsigned long __user end); | ||
54 | #define flush_cache_vmap(start, end) flush_cache_all() | 53 | #define flush_cache_vmap(start, end) flush_cache_all() |
55 | #define flush_cache_vunmap(start, end) flush_cache_all() | 54 | #define flush_cache_vunmap(start, end) flush_cache_all() |
56 | 55 | ||
diff --git a/include/asm-mips/cpu-features.h b/include/asm-mips/cpu-features.h index 78c9cc2735d5..3f2b6d9ac45e 100644 --- a/include/asm-mips/cpu-features.h +++ b/include/asm-mips/cpu-features.h | |||
@@ -96,6 +96,9 @@ | |||
96 | #ifndef cpu_has_ic_fills_f_dc | 96 | #ifndef cpu_has_ic_fills_f_dc |
97 | #define cpu_has_ic_fills_f_dc (cpu_data[0].icache.flags & MIPS_CACHE_IC_F_DC) | 97 | #define cpu_has_ic_fills_f_dc (cpu_data[0].icache.flags & MIPS_CACHE_IC_F_DC) |
98 | #endif | 98 | #endif |
99 | #ifndef cpu_has_pindexed_dcache | ||
100 | #define cpu_has_pindexed_dcache (cpu_data[0].dcache.flags & MIPS_CACHE_PINDEX) | ||
101 | #endif | ||
99 | 102 | ||
100 | /* | 103 | /* |
101 | * I-Cache snoops remote store. This only matters on SMP. Some multiprocessors | 104 | * I-Cache snoops remote store. This only matters on SMP. Some multiprocessors |
diff --git a/include/asm-mips/cpu-info.h b/include/asm-mips/cpu-info.h index d5cf519f8fcc..140be1c67da7 100644 --- a/include/asm-mips/cpu-info.h +++ b/include/asm-mips/cpu-info.h | |||
@@ -39,6 +39,7 @@ struct cache_desc { | |||
39 | #define MIPS_CACHE_ALIASES 0x00000004 /* Cache could have aliases */ | 39 | #define MIPS_CACHE_ALIASES 0x00000004 /* Cache could have aliases */ |
40 | #define MIPS_CACHE_IC_F_DC 0x00000008 /* Ic can refill from D-cache */ | 40 | #define MIPS_CACHE_IC_F_DC 0x00000008 /* Ic can refill from D-cache */ |
41 | #define MIPS_IC_SNOOPS_REMOTE 0x00000010 /* Ic snoops remote stores */ | 41 | #define MIPS_IC_SNOOPS_REMOTE 0x00000010 /* Ic snoops remote stores */ |
42 | #define MIPS_CACHE_PINDEX 0x00000020 /* Physically indexed cache */ | ||
42 | 43 | ||
43 | struct cpuinfo_mips { | 44 | struct cpuinfo_mips { |
44 | unsigned long udelay_val; | 45 | unsigned long udelay_val; |
diff --git a/include/asm-mips/cpu.h b/include/asm-mips/cpu.h index 934e063e79f1..818b9a97e214 100644 --- a/include/asm-mips/cpu.h +++ b/include/asm-mips/cpu.h | |||
@@ -204,9 +204,9 @@ | |||
204 | */ | 204 | */ |
205 | #define MIPS_CPU_ISA_I 0x00000001 | 205 | #define MIPS_CPU_ISA_I 0x00000001 |
206 | #define MIPS_CPU_ISA_II 0x00000002 | 206 | #define MIPS_CPU_ISA_II 0x00000002 |
207 | #define MIPS_CPU_ISA_III 0x00000003 | 207 | #define MIPS_CPU_ISA_III 0x00000004 |
208 | #define MIPS_CPU_ISA_IV 0x00000004 | 208 | #define MIPS_CPU_ISA_IV 0x00000008 |
209 | #define MIPS_CPU_ISA_V 0x00000005 | 209 | #define MIPS_CPU_ISA_V 0x00000010 |
210 | #define MIPS_CPU_ISA_M32R1 0x00000020 | 210 | #define MIPS_CPU_ISA_M32R1 0x00000020 |
211 | #define MIPS_CPU_ISA_M32R2 0x00000040 | 211 | #define MIPS_CPU_ISA_M32R2 0x00000040 |
212 | #define MIPS_CPU_ISA_M64R1 0x00000080 | 212 | #define MIPS_CPU_ISA_M64R1 0x00000080 |
diff --git a/include/asm-mips/gcc/sgidefs.h b/include/asm-mips/gcc/sgidefs.h deleted file mode 100644 index 05994371a2af..000000000000 --- a/include/asm-mips/gcc/sgidefs.h +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | /* | ||
2 | * include/sgidefs.h | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General Public | ||
5 | * License. See the file "COPYING" in the main directory of this archive | ||
6 | * for more details. | ||
7 | * | ||
8 | * Copyright (C) 1996 by Ralf Baechle | ||
9 | * | ||
10 | * This file is here to satisfy GCC's expectations. | ||
11 | */ | ||
12 | #ifndef __SGIDEFS_H | ||
13 | #define __SGIDEFS_H | ||
14 | |||
15 | #include <asm/sgidefs.h> | ||
16 | |||
17 | #endif /* __SGIDEFS_H */ | ||
diff --git a/include/asm-mips/hazards.h b/include/asm-mips/hazards.h index 2fc90632f88c..feb29a793888 100644 --- a/include/asm-mips/hazards.h +++ b/include/asm-mips/hazards.h | |||
@@ -3,7 +3,9 @@ | |||
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 | 6 | * Copyright (C) 2003, 2004 Ralf Baechle <ralf@linux-mips.org> |
7 | * Copyright (C) MIPS Technologies, Inc. | ||
8 | * written by Ralf Baechle <ralf@linux-mips.org> | ||
7 | */ | 9 | */ |
8 | #ifndef _ASM_HAZARDS_H | 10 | #ifndef _ASM_HAZARDS_H |
9 | #define _ASM_HAZARDS_H | 11 | #define _ASM_HAZARDS_H |
@@ -74,8 +76,7 @@ | |||
74 | #define irq_disable_hazard | 76 | #define irq_disable_hazard |
75 | _ehb | 77 | _ehb |
76 | 78 | ||
77 | #elif defined(CONFIG_CPU_R10000) || defined(CONFIG_CPU_RM9000) || \ | 79 | #elif defined(CONFIG_CPU_R10000) || defined(CONFIG_CPU_RM9000) |
78 | defined(CONFIG_CPU_SB1) | ||
79 | 80 | ||
80 | /* | 81 | /* |
81 | * R10000 rocks - all hazards handled in hardware, so this becomes a nobrainer. | 82 | * R10000 rocks - all hazards handled in hardware, so this becomes a nobrainer. |
@@ -99,13 +100,13 @@ | |||
99 | #else /* __ASSEMBLY__ */ | 100 | #else /* __ASSEMBLY__ */ |
100 | 101 | ||
101 | __asm__( | 102 | __asm__( |
102 | " .macro _ssnop \n\t" | 103 | " .macro _ssnop \n" |
103 | " sll $0, $2, 1 \n\t" | 104 | " sll $0, $0, 1 \n" |
104 | " .endm \n\t" | 105 | " .endm \n" |
105 | " \n\t" | 106 | " \n" |
106 | " .macro _ehb \n\t" | 107 | " .macro _ehb \n" |
107 | " sll $0, $0, 3 \n\t" | 108 | " sll $0, $0, 3 \n" |
108 | " .endm \n\t"); | 109 | " .endm \n"); |
109 | 110 | ||
110 | #ifdef CONFIG_CPU_RM9000 | 111 | #ifdef CONFIG_CPU_RM9000 |
111 | 112 | ||
@@ -117,17 +118,21 @@ __asm__( | |||
117 | 118 | ||
118 | #define mtc0_tlbw_hazard() \ | 119 | #define mtc0_tlbw_hazard() \ |
119 | __asm__ __volatile__( \ | 120 | __asm__ __volatile__( \ |
120 | ".set\tmips32\n\t" \ | 121 | " .set mips32 \n" \ |
121 | "_ssnop; _ssnop; _ssnop; _ssnop\n\t" \ | 122 | " _ssnop \n" \ |
122 | ".set\tmips0") | 123 | " _ssnop \n" \ |
124 | " _ssnop \n" \ | ||
125 | " _ssnop \n" \ | ||
126 | " .set mips0 \n") | ||
123 | 127 | ||
124 | #define tlbw_use_hazard() \ | 128 | #define tlbw_use_hazard() \ |
125 | __asm__ __volatile__( \ | 129 | __asm__ __volatile__( \ |
126 | ".set\tmips32\n\t" \ | 130 | " .set mips32 \n" \ |
127 | "_ssnop; _ssnop; _ssnop; _ssnop\n\t" \ | 131 | " _ssnop \n" \ |
128 | ".set\tmips0") | 132 | " _ssnop \n" \ |
129 | 133 | " _ssnop \n" \ | |
130 | #define back_to_back_c0_hazard() do { } while (0) | 134 | " _ssnop \n" \ |
135 | " .set mips0 \n") | ||
131 | 136 | ||
132 | #else | 137 | #else |
133 | 138 | ||
@@ -136,15 +141,25 @@ __asm__( | |||
136 | */ | 141 | */ |
137 | #define mtc0_tlbw_hazard() \ | 142 | #define mtc0_tlbw_hazard() \ |
138 | __asm__ __volatile__( \ | 143 | __asm__ __volatile__( \ |
139 | ".set noreorder\n\t" \ | 144 | " .set noreorder \n" \ |
140 | "nop; nop; nop; nop; nop; nop;\n\t" \ | 145 | " nop \n" \ |
141 | ".set reorder\n\t") | 146 | " nop \n" \ |
147 | " nop \n" \ | ||
148 | " nop \n" \ | ||
149 | " nop \n" \ | ||
150 | " nop \n" \ | ||
151 | " .set reorder \n") | ||
142 | 152 | ||
143 | #define tlbw_use_hazard() \ | 153 | #define tlbw_use_hazard() \ |
144 | __asm__ __volatile__( \ | 154 | __asm__ __volatile__( \ |
145 | ".set noreorder\n\t" \ | 155 | " .set noreorder \n" \ |
146 | "nop; nop; nop; nop; nop; nop;\n\t" \ | 156 | " nop \n" \ |
147 | ".set reorder\n\t") | 157 | " nop \n" \ |
158 | " nop \n" \ | ||
159 | " nop \n" \ | ||
160 | " nop \n" \ | ||
161 | " nop \n" \ | ||
162 | " .set reorder \n") | ||
148 | 163 | ||
149 | #endif | 164 | #endif |
150 | 165 | ||
@@ -156,49 +171,26 @@ __asm__( | |||
156 | 171 | ||
157 | #ifdef CONFIG_CPU_MIPSR2 | 172 | #ifdef CONFIG_CPU_MIPSR2 |
158 | 173 | ||
159 | __asm__( | 174 | __asm__(" .macro irq_enable_hazard \n" |
160 | " .macro\tirq_enable_hazard \n\t" | 175 | " _ehb \n" |
161 | " _ehb \n\t" | 176 | " .endm \n" |
162 | " .endm \n\t" | 177 | " \n" |
163 | " \n\t" | 178 | " .macro irq_disable_hazard \n" |
164 | " .macro\tirq_disable_hazard \n\t" | 179 | " _ehb \n" |
165 | " _ehb \n\t" | 180 | " .endm \n"); |
166 | " .endm \n\t" | ||
167 | " \n\t" | ||
168 | " .macro\tback_to_back_c0_hazard \n\t" | ||
169 | " _ehb \n\t" | ||
170 | " .endm"); | ||
171 | |||
172 | #define irq_enable_hazard() \ | ||
173 | __asm__ __volatile__( \ | ||
174 | "irq_enable_hazard") | ||
175 | 181 | ||
176 | #define irq_disable_hazard() \ | 182 | #elif defined(CONFIG_CPU_R10000) || defined(CONFIG_CPU_RM9000) |
177 | __asm__ __volatile__( \ | ||
178 | "irq_disable_hazard") | ||
179 | |||
180 | #define back_to_back_c0_hazard() \ | ||
181 | __asm__ __volatile__( \ | ||
182 | "back_to_back_c0_hazard") | ||
183 | |||
184 | #elif defined(CONFIG_CPU_R10000) || defined(CONFIG_CPU_RM9000) || \ | ||
185 | defined(CONFIG_CPU_SB1) | ||
186 | 183 | ||
187 | /* | 184 | /* |
188 | * R10000 rocks - all hazards handled in hardware, so this becomes a nobrainer. | 185 | * R10000 rocks - all hazards handled in hardware, so this becomes a nobrainer. |
189 | */ | 186 | */ |
190 | 187 | ||
191 | __asm__( | 188 | __asm__( |
192 | " .macro\tirq_enable_hazard \n\t" | 189 | " .macro irq_enable_hazard \n" |
193 | " .endm \n\t" | 190 | " .endm \n" |
194 | " \n\t" | 191 | " \n" |
195 | " .macro\tirq_disable_hazard \n\t" | 192 | " .macro irq_disable_hazard \n" |
196 | " .endm"); | 193 | " .endm \n"); |
197 | |||
198 | #define irq_enable_hazard() do { } while (0) | ||
199 | #define irq_disable_hazard() do { } while (0) | ||
200 | |||
201 | #define back_to_back_c0_hazard() do { } while (0) | ||
202 | 194 | ||
203 | #else | 195 | #else |
204 | 196 | ||
@@ -209,29 +201,63 @@ __asm__( | |||
209 | */ | 201 | */ |
210 | 202 | ||
211 | __asm__( | 203 | __asm__( |
212 | " # \n\t" | 204 | " # \n" |
213 | " # There is a hazard but we do not care \n\t" | 205 | " # There is a hazard but we do not care \n" |
214 | " # \n\t" | 206 | " # \n" |
215 | " .macro\tirq_enable_hazard \n\t" | 207 | " .macro\tirq_enable_hazard \n" |
216 | " .endm \n\t" | 208 | " .endm \n" |
217 | " \n\t" | 209 | " \n" |
218 | " .macro\tirq_disable_hazard \n\t" | 210 | " .macro\tirq_disable_hazard \n" |
219 | " _ssnop; _ssnop; _ssnop \n\t" | 211 | " _ssnop \n" |
220 | " .endm"); | 212 | " _ssnop \n" |
213 | " _ssnop \n" | ||
214 | " .endm \n"); | ||
221 | 215 | ||
222 | #define irq_enable_hazard() do { } while (0) | 216 | #endif |
217 | |||
218 | #define irq_enable_hazard() \ | ||
219 | __asm__ __volatile__("irq_enable_hazard") | ||
223 | #define irq_disable_hazard() \ | 220 | #define irq_disable_hazard() \ |
224 | __asm__ __volatile__( \ | 221 | __asm__ __volatile__("irq_disable_hazard") |
225 | "irq_disable_hazard") | ||
226 | 222 | ||
227 | #define back_to_back_c0_hazard() \ | 223 | |
228 | __asm__ __volatile__( \ | 224 | /* |
229 | " .set noreorder \n" \ | 225 | * Back-to-back hazards - |
230 | " nop; nop; nop \n" \ | 226 | * |
231 | " .set reorder \n") | 227 | * What is needed to separate a move to cp0 from a subsequent read from the |
228 | * same cp0 register? | ||
229 | */ | ||
230 | #ifdef CONFIG_CPU_MIPSR2 | ||
231 | |||
232 | __asm__(" .macro back_to_back_c0_hazard \n" | ||
233 | " _ehb \n" | ||
234 | " .endm \n"); | ||
235 | |||
236 | #elif defined(CONFIG_CPU_R10000) || defined(CONFIG_CPU_RM9000) || \ | ||
237 | defined(CONFIG_CPU_SB1) | ||
238 | |||
239 | __asm__(" .macro back_to_back_c0_hazard \n" | ||
240 | " .endm \n"); | ||
241 | |||
242 | #else | ||
243 | |||
244 | __asm__(" .macro back_to_back_c0_hazard \n" | ||
245 | " .set noreorder \n" | ||
246 | " _ssnop \n" | ||
247 | " _ssnop \n" | ||
248 | " _ssnop \n" | ||
249 | " .set reorder \n" | ||
250 | " .endm"); | ||
232 | 251 | ||
233 | #endif | 252 | #endif |
234 | 253 | ||
254 | #define back_to_back_c0_hazard() \ | ||
255 | __asm__ __volatile__("back_to_back_c0_hazard") | ||
256 | |||
257 | |||
258 | /* | ||
259 | * Instruction execution hazard | ||
260 | */ | ||
235 | #ifdef CONFIG_CPU_MIPSR2 | 261 | #ifdef CONFIG_CPU_MIPSR2 |
236 | /* | 262 | /* |
237 | * gcc has a tradition of misscompiling the previous construct using the | 263 | * gcc has a tradition of misscompiling the previous construct using the |
diff --git a/include/asm-mips/interrupt.h b/include/asm-mips/interrupt.h index abdf54ee64cf..774348734fa0 100644 --- a/include/asm-mips/interrupt.h +++ b/include/asm-mips/interrupt.h | |||
@@ -47,6 +47,17 @@ static inline void local_irq_enable(void) | |||
47 | * R4000/R4400 need three nops, the R4600 two nops and the R10000 needs | 47 | * R4000/R4400 need three nops, the R4600 two nops and the R10000 needs |
48 | * no nops at all. | 48 | * no nops at all. |
49 | */ | 49 | */ |
50 | /* | ||
51 | * For TX49, operating only IE bit is not enough. | ||
52 | * | ||
53 | * If mfc0 $12 follows store and the mfc0 is last instruction of a | ||
54 | * page and fetching the next instruction causes TLB miss, the result | ||
55 | * of the mfc0 might wrongly contain EXL bit. | ||
56 | * | ||
57 | * ERT-TX49H2-027, ERT-TX49H3-012, ERT-TX49HL3-006, ERT-TX49H4-008 | ||
58 | * | ||
59 | * Workaround: mask EXL bit of the result or place a nop before mfc0. | ||
60 | */ | ||
50 | __asm__ ( | 61 | __asm__ ( |
51 | " .macro local_irq_disable\n" | 62 | " .macro local_irq_disable\n" |
52 | " .set push \n" | 63 | " .set push \n" |
@@ -55,8 +66,8 @@ __asm__ ( | |||
55 | " di \n" | 66 | " di \n" |
56 | #else | 67 | #else |
57 | " mfc0 $1,$12 \n" | 68 | " mfc0 $1,$12 \n" |
58 | " ori $1,1 \n" | 69 | " ori $1,0x1f \n" |
59 | " xori $1,1 \n" | 70 | " xori $1,0x1f \n" |
60 | " .set noreorder \n" | 71 | " .set noreorder \n" |
61 | " mtc0 $1,$12 \n" | 72 | " mtc0 $1,$12 \n" |
62 | #endif | 73 | #endif |
@@ -96,8 +107,8 @@ __asm__ ( | |||
96 | " andi \\result, 1 \n" | 107 | " andi \\result, 1 \n" |
97 | #else | 108 | #else |
98 | " mfc0 \\result, $12 \n" | 109 | " mfc0 \\result, $12 \n" |
99 | " ori $1, \\result, 1 \n" | 110 | " ori $1, \\result, 0x1f \n" |
100 | " xori $1, 1 \n" | 111 | " xori $1, 0x1f \n" |
101 | " .set noreorder \n" | 112 | " .set noreorder \n" |
102 | " mtc0 $1, $12 \n" | 113 | " mtc0 $1, $12 \n" |
103 | #endif | 114 | #endif |
@@ -114,6 +125,7 @@ __asm__ __volatile__( \ | |||
114 | 125 | ||
115 | __asm__ ( | 126 | __asm__ ( |
116 | " .macro local_irq_restore flags \n" | 127 | " .macro local_irq_restore flags \n" |
128 | " .set push \n" | ||
117 | " .set noreorder \n" | 129 | " .set noreorder \n" |
118 | " .set noat \n" | 130 | " .set noat \n" |
119 | #if defined(CONFIG_CPU_MIPSR2) && defined(CONFIG_IRQ_CPU) | 131 | #if defined(CONFIG_CPU_MIPSR2) && defined(CONFIG_IRQ_CPU) |
@@ -135,14 +147,13 @@ __asm__ ( | |||
135 | #else | 147 | #else |
136 | " mfc0 $1, $12 \n" | 148 | " mfc0 $1, $12 \n" |
137 | " andi \\flags, 1 \n" | 149 | " andi \\flags, 1 \n" |
138 | " ori $1, 1 \n" | 150 | " ori $1, 0x1f \n" |
139 | " xori $1, 1 \n" | 151 | " xori $1, 0x1f \n" |
140 | " or \\flags, $1 \n" | 152 | " or \\flags, $1 \n" |
141 | " mtc0 \\flags, $12 \n" | 153 | " mtc0 \\flags, $12 \n" |
142 | #endif | 154 | #endif |
143 | " irq_disable_hazard \n" | 155 | " irq_disable_hazard \n" |
144 | " .set at \n" | 156 | " .set pop \n" |
145 | " .set reorder \n" | ||
146 | " .endm \n"); | 157 | " .endm \n"); |
147 | 158 | ||
148 | #define local_irq_restore(flags) \ | 159 | #define local_irq_restore(flags) \ |
diff --git a/include/asm-mips/io.h b/include/asm-mips/io.h index d42685747e7d..ba1d7bbc15d2 100644 --- a/include/asm-mips/io.h +++ b/include/asm-mips/io.h | |||
@@ -4,7 +4,7 @@ | |||
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 1994, 1995 Waldorf GmbH | 6 | * Copyright (C) 1994, 1995 Waldorf GmbH |
7 | * Copyright (C) 1994 - 2000 Ralf Baechle | 7 | * Copyright (C) 1994 - 2000, 06 Ralf Baechle |
8 | * Copyright (C) 1999, 2000 Silicon Graphics, Inc. | 8 | * Copyright (C) 1999, 2000 Silicon Graphics, Inc. |
9 | * Copyright (C) 2004, 2005 MIPS Technologies, Inc. All rights reserved. | 9 | * Copyright (C) 2004, 2005 MIPS Technologies, Inc. All rights reserved. |
10 | * Author: Maciej W. Rozycki <macro@mips.com> | 10 | * Author: Maciej W. Rozycki <macro@mips.com> |
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/types.h> | 18 | #include <linux/types.h> |
19 | 19 | ||
20 | #include <asm/addrspace.h> | 20 | #include <asm/addrspace.h> |
21 | #include <asm/bug.h> | ||
22 | #include <asm/byteorder.h> | 21 | #include <asm/byteorder.h> |
23 | #include <asm/cpu.h> | 22 | #include <asm/cpu.h> |
24 | #include <asm/cpu-features.h> | 23 | #include <asm/cpu-features.h> |
@@ -57,38 +56,38 @@ | |||
57 | * variations of functions: non-prefixed ones that preserve the value | 56 | * variations of functions: non-prefixed ones that preserve the value |
58 | * and prefixed ones that preserve byte addresses. The latters are | 57 | * and prefixed ones that preserve byte addresses. The latters are |
59 | * typically used for moving raw data between a peripheral and memory (cf. | 58 | * typically used for moving raw data between a peripheral and memory (cf. |
60 | * string I/O functions), hence the "mem_" prefix. | 59 | * string I/O functions), hence the "__mem_" prefix. |
61 | */ | 60 | */ |
62 | #if defined(CONFIG_SWAP_IO_SPACE) | 61 | #if defined(CONFIG_SWAP_IO_SPACE) |
63 | 62 | ||
64 | # define ioswabb(x) (x) | 63 | # define ioswabb(x) (x) |
65 | # define mem_ioswabb(x) (x) | 64 | # define __mem_ioswabb(x) (x) |
66 | # ifdef CONFIG_SGI_IP22 | 65 | # ifdef CONFIG_SGI_IP22 |
67 | /* | 66 | /* |
68 | * IP22 seems braindead enough to swap 16bits values in hardware, but | 67 | * IP22 seems braindead enough to swap 16bits values in hardware, but |
69 | * not 32bits. Go figure... Can't tell without documentation. | 68 | * not 32bits. Go figure... Can't tell without documentation. |
70 | */ | 69 | */ |
71 | # define ioswabw(x) (x) | 70 | # define ioswabw(x) (x) |
72 | # define mem_ioswabw(x) le16_to_cpu(x) | 71 | # define __mem_ioswabw(x) le16_to_cpu(x) |
73 | # else | 72 | # else |
74 | # define ioswabw(x) le16_to_cpu(x) | 73 | # define ioswabw(x) le16_to_cpu(x) |
75 | # define mem_ioswabw(x) (x) | 74 | # define __mem_ioswabw(x) (x) |
76 | # endif | 75 | # endif |
77 | # define ioswabl(x) le32_to_cpu(x) | 76 | # define ioswabl(x) le32_to_cpu(x) |
78 | # define mem_ioswabl(x) (x) | 77 | # define __mem_ioswabl(x) (x) |
79 | # define ioswabq(x) le64_to_cpu(x) | 78 | # define ioswabq(x) le64_to_cpu(x) |
80 | # define mem_ioswabq(x) (x) | 79 | # define __mem_ioswabq(x) (x) |
81 | 80 | ||
82 | #else | 81 | #else |
83 | 82 | ||
84 | # define ioswabb(x) (x) | 83 | # define ioswabb(x) (x) |
85 | # define mem_ioswabb(x) (x) | 84 | # define __mem_ioswabb(x) (x) |
86 | # define ioswabw(x) (x) | 85 | # define ioswabw(x) (x) |
87 | # define mem_ioswabw(x) cpu_to_le16(x) | 86 | # define __mem_ioswabw(x) cpu_to_le16(x) |
88 | # define ioswabl(x) (x) | 87 | # define ioswabl(x) (x) |
89 | # define mem_ioswabl(x) cpu_to_le32(x) | 88 | # define __mem_ioswabl(x) cpu_to_le32(x) |
90 | # define ioswabq(x) (x) | 89 | # define ioswabq(x) (x) |
91 | # define mem_ioswabq(x) cpu_to_le32(x) | 90 | # define __mem_ioswabq(x) cpu_to_le32(x) |
92 | 91 | ||
93 | #endif | 92 | #endif |
94 | 93 | ||
@@ -104,8 +103,20 @@ | |||
104 | */ | 103 | */ |
105 | extern const unsigned long mips_io_port_base; | 104 | extern const unsigned long mips_io_port_base; |
106 | 105 | ||
107 | #define set_io_port_base(base) \ | 106 | /* |
108 | do { * (unsigned long *) &mips_io_port_base = (base); } while (0) | 107 | * Gcc will generate code to load the value of mips_io_port_base after each |
108 | * function call which may be fairly wasteful in some cases. So we don't | ||
109 | * play quite by the book. We tell gcc mips_io_port_base is a long variable | ||
110 | * which solves the code generation issue. Now we need to violate the | ||
111 | * aliasing rules a little to make initialization possible and finally we | ||
112 | * will need the barrier() to fight side effects of the aliasing chat. | ||
113 | * This trickery will eventually collapse under gcc's optimizer. Oh well. | ||
114 | */ | ||
115 | static inline void set_io_port_base(unsigned long base) | ||
116 | { | ||
117 | * (unsigned long *) &mips_io_port_base = base; | ||
118 | barrier(); | ||
119 | } | ||
109 | 120 | ||
110 | /* | 121 | /* |
111 | * Thanks to James van Artsdalen for a better timing-fix than | 122 | * Thanks to James van Artsdalen for a better timing-fix than |
@@ -284,6 +295,24 @@ static inline void __iomem * __ioremap_mode(phys_t offset, unsigned long size, | |||
284 | __ioremap_mode((offset), (size), _CACHE_UNCACHED) | 295 | __ioremap_mode((offset), (size), _CACHE_UNCACHED) |
285 | 296 | ||
286 | /* | 297 | /* |
298 | * ioremap_cachable - map bus memory into CPU space | ||
299 | * @offset: bus address of the memory | ||
300 | * @size: size of the resource to map | ||
301 | * | ||
302 | * ioremap_nocache performs a platform specific sequence of operations to | ||
303 | * make bus memory CPU accessible via the readb/readw/readl/writeb/ | ||
304 | * writew/writel functions and the other mmio helpers. The returned | ||
305 | * address is not guaranteed to be usable directly as a virtual | ||
306 | * address. | ||
307 | * | ||
308 | * This version of ioremap ensures that the memory is marked cachable by | ||
309 | * the CPU. Also enables full write-combining. Useful for some | ||
310 | * memory-like regions on I/O busses. | ||
311 | */ | ||
312 | #define ioremap_cachable(offset, size) \ | ||
313 | __ioremap_mode((offset), (size), PAGE_CACHABLE_DEFAULT) | ||
314 | |||
315 | /* | ||
287 | * These two are MIPS specific ioremap variant. ioremap_cacheable_cow | 316 | * These two are MIPS specific ioremap variant. ioremap_cacheable_cow |
288 | * requests a cachable mapping, ioremap_uncached_accelerated requests a | 317 | * requests a cachable mapping, ioremap_uncached_accelerated requests a |
289 | * mapping using the uncached accelerated mode which isn't supported on | 318 | * mapping using the uncached accelerated mode which isn't supported on |
@@ -343,7 +372,7 @@ static inline void pfx##write##bwlq(type val, \ | |||
343 | BUG(); \ | 372 | BUG(); \ |
344 | } \ | 373 | } \ |
345 | \ | 374 | \ |
346 | static inline type pfx##read##bwlq(volatile void __iomem *mem) \ | 375 | static inline type pfx##read##bwlq(const volatile void __iomem *mem) \ |
347 | { \ | 376 | { \ |
348 | volatile type *__mem; \ | 377 | volatile type *__mem; \ |
349 | type __val; \ | 378 | type __val; \ |
@@ -418,7 +447,7 @@ __BUILD_MEMORY_SINGLE(bus, bwlq, type, 1) | |||
418 | \ | 447 | \ |
419 | __BUILD_MEMORY_PFX(__raw_, bwlq, type) \ | 448 | __BUILD_MEMORY_PFX(__raw_, bwlq, type) \ |
420 | __BUILD_MEMORY_PFX(, bwlq, type) \ | 449 | __BUILD_MEMORY_PFX(, bwlq, type) \ |
421 | __BUILD_MEMORY_PFX(mem_, bwlq, type) \ | 450 | __BUILD_MEMORY_PFX(__mem_, bwlq, type) \ |
422 | 451 | ||
423 | BUILDIO_MEM(b, u8) | 452 | BUILDIO_MEM(b, u8) |
424 | BUILDIO_MEM(w, u16) | 453 | BUILDIO_MEM(w, u16) |
@@ -431,7 +460,7 @@ BUILDIO_MEM(q, u64) | |||
431 | 460 | ||
432 | #define BUILDIO_IOPORT(bwlq, type) \ | 461 | #define BUILDIO_IOPORT(bwlq, type) \ |
433 | __BUILD_IOPORT_PFX(, bwlq, type) \ | 462 | __BUILD_IOPORT_PFX(, bwlq, type) \ |
434 | __BUILD_IOPORT_PFX(mem_, bwlq, type) | 463 | __BUILD_IOPORT_PFX(__mem_, bwlq, type) |
435 | 464 | ||
436 | BUILDIO_IOPORT(b, u8) | 465 | BUILDIO_IOPORT(b, u8) |
437 | BUILDIO_IOPORT(w, u16) | 466 | BUILDIO_IOPORT(w, u16) |
@@ -465,7 +494,7 @@ static inline void writes##bwlq(volatile void __iomem *mem, \ | |||
465 | const volatile type *__addr = addr; \ | 494 | const volatile type *__addr = addr; \ |
466 | \ | 495 | \ |
467 | while (count--) { \ | 496 | while (count--) { \ |
468 | mem_write##bwlq(*__addr, mem); \ | 497 | __mem_write##bwlq(*__addr, mem); \ |
469 | __addr++; \ | 498 | __addr++; \ |
470 | } \ | 499 | } \ |
471 | } \ | 500 | } \ |
@@ -476,7 +505,7 @@ static inline void reads##bwlq(volatile void __iomem *mem, void *addr, \ | |||
476 | volatile type *__addr = addr; \ | 505 | volatile type *__addr = addr; \ |
477 | \ | 506 | \ |
478 | while (count--) { \ | 507 | while (count--) { \ |
479 | *__addr = mem_read##bwlq(mem); \ | 508 | *__addr = __mem_read##bwlq(mem); \ |
480 | __addr++; \ | 509 | __addr++; \ |
481 | } \ | 510 | } \ |
482 | } | 511 | } |
@@ -489,7 +518,7 @@ static inline void outs##bwlq(unsigned long port, const void *addr, \ | |||
489 | const volatile type *__addr = addr; \ | 518 | const volatile type *__addr = addr; \ |
490 | \ | 519 | \ |
491 | while (count--) { \ | 520 | while (count--) { \ |
492 | mem_out##bwlq(*__addr, port); \ | 521 | __mem_out##bwlq(*__addr, port); \ |
493 | __addr++; \ | 522 | __addr++; \ |
494 | } \ | 523 | } \ |
495 | } \ | 524 | } \ |
@@ -500,7 +529,7 @@ static inline void ins##bwlq(unsigned long port, void *addr, \ | |||
500 | volatile type *__addr = addr; \ | 529 | volatile type *__addr = addr; \ |
501 | \ | 530 | \ |
502 | while (count--) { \ | 531 | while (count--) { \ |
503 | *__addr = mem_in##bwlq(port); \ | 532 | *__addr = __mem_in##bwlq(port); \ |
504 | __addr++; \ | 533 | __addr++; \ |
505 | } \ | 534 | } \ |
506 | } | 535 | } |
diff --git a/include/asm-mips/mach-au1x00/au1000.h b/include/asm-mips/mach-au1x00/au1000.h index 8e1d7ed7d8e3..4686e17c206c 100644 --- a/include/asm-mips/mach-au1x00/au1000.h +++ b/include/asm-mips/mach-au1x00/au1000.h | |||
@@ -1198,7 +1198,11 @@ extern au1xxx_irq_map_t au1xxx_irq_map[]; | |||
1198 | 1198 | ||
1199 | /* UARTS 0-3 */ | 1199 | /* UARTS 0-3 */ |
1200 | #define UART_BASE UART0_ADDR | 1200 | #define UART_BASE UART0_ADDR |
1201 | #ifdef CONFIG_SOC_AU1200 | ||
1202 | #define UART_DEBUG_BASE UART1_ADDR | ||
1203 | #else | ||
1201 | #define UART_DEBUG_BASE UART3_ADDR | 1204 | #define UART_DEBUG_BASE UART3_ADDR |
1205 | #endif | ||
1202 | 1206 | ||
1203 | #define UART_RX 0 /* Receive buffer */ | 1207 | #define UART_RX 0 /* Receive buffer */ |
1204 | #define UART_TX 4 /* Transmit buffer */ | 1208 | #define UART_TX 4 /* Transmit buffer */ |
diff --git a/include/asm-mips/cobalt/cobalt.h b/include/asm-mips/mach-cobalt/cobalt.h index 78e1df2095fb..78e1df2095fb 100644 --- a/include/asm-mips/cobalt/cobalt.h +++ b/include/asm-mips/mach-cobalt/cobalt.h | |||
diff --git a/include/asm-mips/mach-cobalt/cpu-feature-overrides.h b/include/asm-mips/mach-cobalt/cpu-feature-overrides.h new file mode 100644 index 000000000000..ace8c5ef9701 --- /dev/null +++ b/include/asm-mips/mach-cobalt/cpu-feature-overrides.h | |||
@@ -0,0 +1,56 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2006 Ralf Baechle (ralf@linux-mips.org) | ||
7 | */ | ||
8 | #ifndef __ASM_COBALT_CPU_FEATURE_OVERRIDES_H | ||
9 | #define __ASM_COBALT_CPU_FEATURE_OVERRIDES_H | ||
10 | |||
11 | #include <linux/config.h> | ||
12 | |||
13 | #define cpu_has_tlb 1 | ||
14 | #define cpu_has_4kex 1 | ||
15 | #define cpu_has_3k_cache 0 | ||
16 | #define cpu_has_4k_cache 1 | ||
17 | #define cpu_has_tx39_cache 0 | ||
18 | #define cpu_has_sb1_cache 0 | ||
19 | #define cpu_has_fpu 1 | ||
20 | #define cpu_has_32fpr 1 | ||
21 | #define cpu_has_counter 1 | ||
22 | #define cpu_has_watch 0 | ||
23 | #define cpu_has_divec 1 | ||
24 | #define cpu_has_vce 0 | ||
25 | #define cpu_has_cache_cdex_p 0 | ||
26 | #define cpu_has_cache_cdex_s 0 | ||
27 | #define cpu_has_prefetch 0 | ||
28 | #define cpu_has_mcheck 0 | ||
29 | #define cpu_has_ejtag 0 | ||
30 | |||
31 | #define cpu_has_subset_pcaches 0 | ||
32 | #define cpu_dcache_line_size() 32 | ||
33 | #define cpu_icache_line_size() 32 | ||
34 | #define cpu_scache_line_size() 0 | ||
35 | |||
36 | #ifdef CONFIG_64BIT | ||
37 | #define cpu_has_llsc 0 | ||
38 | #else | ||
39 | #define cpu_has_llsc 1 | ||
40 | #endif | ||
41 | |||
42 | #define cpu_has_mips16 0 | ||
43 | #define cpu_has_mdmx 0 | ||
44 | #define cpu_has_mips3d 0 | ||
45 | #define cpu_has_smartmips 0 | ||
46 | #define cpu_has_vtag_icache 0 | ||
47 | #define cpu_has_ic_fills_f_dc 0 | ||
48 | #define cpu_icache_snoops_remote_store 0 | ||
49 | #define cpu_has_dsp 0 | ||
50 | |||
51 | #define cpu_has_mips32r1 0 | ||
52 | #define cpu_has_mips32r2 0 | ||
53 | #define cpu_has_mips64r1 0 | ||
54 | #define cpu_has_mips64r2 0 | ||
55 | |||
56 | #endif /* __ASM_COBALT_CPU_FEATURE_OVERRIDES_H */ | ||
diff --git a/include/asm-mips/cobalt/mach-gt64120.h b/include/asm-mips/mach-cobalt/mach-gt64120.h index 587fc4378f44..587fc4378f44 100644 --- a/include/asm-mips/cobalt/mach-gt64120.h +++ b/include/asm-mips/mach-cobalt/mach-gt64120.h | |||
diff --git a/include/asm-mips/mach-generic/timex.h b/include/asm-mips/mach-generic/timex.h index c6a2e5f0574a..48b4cfaa0d50 100644 --- a/include/asm-mips/mach-generic/timex.h +++ b/include/asm-mips/mach-generic/timex.h | |||
@@ -3,20 +3,11 @@ | |||
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 by Ralf Baechle | 6 | * Copyright (C) 2003, 2005 by Ralf Baechle |
7 | */ | 7 | */ |
8 | #ifndef __ASM_MACH_GENERIC_TIMEX_H | 8 | #ifndef __ASM_MACH_GENERIC_TIMEX_H |
9 | #define __ASM_MACH_GENERIC_TIMEX_H | 9 | #define __ASM_MACH_GENERIC_TIMEX_H |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | |||
13 | /* | ||
14 | * Last remaining user of the i8254 PIC, will be converted, too ... | ||
15 | */ | ||
16 | #ifdef CONFIG_SNI_RM200_PCI | ||
17 | #define CLOCK_TICK_RATE 1193182 | ||
18 | #else | ||
19 | #define CLOCK_TICK_RATE 500000 | 11 | #define CLOCK_TICK_RATE 500000 |
20 | #endif | ||
21 | 12 | ||
22 | #endif /* __ASM_MACH_GENERIC_TIMEX_H */ | 13 | #endif /* __ASM_MACH_GENERIC_TIMEX_H */ |
diff --git a/include/asm-mips/mach-ip32/cpu-feature-overrides.h b/include/asm-mips/mach-ip32/cpu-feature-overrides.h index b80c30725cf6..36070b5654ab 100644 --- a/include/asm-mips/mach-ip32/cpu-feature-overrides.h +++ b/include/asm-mips/mach-ip32/cpu-feature-overrides.h | |||
@@ -18,7 +18,7 @@ | |||
18 | * so, for 64bit IP32 kernel we just don't use ll/sc. | 18 | * so, for 64bit IP32 kernel we just don't use ll/sc. |
19 | * This does not affect luserland. | 19 | * This does not affect luserland. |
20 | */ | 20 | */ |
21 | #if defined(CONFIG_CPU_R5000) && defined(CONFIG_64BIT) | 21 | #if (defined(CONFIG_CPU_R5000) || defined(CONFIG_CPU_NEVADA)) && defined(CONFIG_64BIT) |
22 | #define cpu_has_llsc 0 | 22 | #define cpu_has_llsc 0 |
23 | #else | 23 | #else |
24 | #define cpu_has_llsc 1 | 24 | #define cpu_has_llsc 1 |
diff --git a/include/asm-mips/mach-rm200/timex.h b/include/asm-mips/mach-rm200/timex.h new file mode 100644 index 000000000000..11ff6cb0f214 --- /dev/null +++ b/include/asm-mips/mach-rm200/timex.h | |||
@@ -0,0 +1,13 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2003, 2005 by Ralf Baechle | ||
7 | */ | ||
8 | #ifndef __ASM_MACH_RM200_TIMEX_H | ||
9 | #define __ASM_MACH_RM200_TIMEX_H | ||
10 | |||
11 | #define CLOCK_TICK_RATE 1193182 | ||
12 | |||
13 | #endif /* __ASM_MACH_RM200_TIMEX_H */ | ||
diff --git a/include/asm-mips/mman.h b/include/asm-mips/mman.h index dd17c8bd62a1..046cf686bee7 100644 --- a/include/asm-mips/mman.h +++ b/include/asm-mips/mman.h | |||
@@ -60,15 +60,19 @@ | |||
60 | #define MCL_CURRENT 1 /* lock all current mappings */ | 60 | #define MCL_CURRENT 1 /* lock all current mappings */ |
61 | #define MCL_FUTURE 2 /* lock all future mappings */ | 61 | #define MCL_FUTURE 2 /* lock all future mappings */ |
62 | 62 | ||
63 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | 63 | #define MADV_NORMAL 0 /* no further special treatment */ |
64 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | 64 | #define MADV_RANDOM 1 /* expect random page references */ |
65 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | 65 | #define MADV_SEQUENTIAL 2 /* expect sequential page references */ |
66 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | 66 | #define MADV_WILLNEED 3 /* will need these pages */ |
67 | #define MADV_DONTNEED 0x4 /* discard these pages */ | 67 | #define MADV_DONTNEED 4 /* don't need these pages */ |
68 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | 68 | |
69 | /* common parameters: try to keep these consistent across architectures */ | ||
70 | #define MADV_REMOVE 9 /* remove these pages & resources */ | ||
71 | #define MADV_DONTFORK 10 /* don't inherit across fork */ | ||
72 | #define MADV_DOFORK 11 /* do inherit across fork */ | ||
69 | 73 | ||
70 | /* compatibility flags */ | 74 | /* compatibility flags */ |
71 | #define MAP_ANON MAP_ANONYMOUS | 75 | #define MAP_ANON MAP_ANONYMOUS |
72 | #define MAP_FILE 0 | 76 | #define MAP_FILE 0 |
73 | 77 | ||
74 | #endif /* _ASM_MMAN_H */ | 78 | #endif /* _ASM_MMAN_H */ |
diff --git a/include/asm-mips/r4kcache.h b/include/asm-mips/r4kcache.h index a5ea9d828aee..0bcb79a58ee9 100644 --- a/include/asm-mips/r4kcache.h +++ b/include/asm-mips/r4kcache.h | |||
@@ -14,6 +14,7 @@ | |||
14 | 14 | ||
15 | #include <asm/asm.h> | 15 | #include <asm/asm.h> |
16 | #include <asm/cacheops.h> | 16 | #include <asm/cacheops.h> |
17 | #include <asm/cpu-features.h> | ||
17 | 18 | ||
18 | /* | 19 | /* |
19 | * This macro return a properly sign-extended address suitable as base address | 20 | * This macro return a properly sign-extended address suitable as base address |
@@ -78,22 +79,25 @@ static inline void flush_scache_line(unsigned long addr) | |||
78 | cache_op(Hit_Writeback_Inv_SD, addr); | 79 | cache_op(Hit_Writeback_Inv_SD, addr); |
79 | } | 80 | } |
80 | 81 | ||
82 | #define protected_cache_op(op,addr) \ | ||
83 | __asm__ __volatile__( \ | ||
84 | " .set push \n" \ | ||
85 | " .set noreorder \n" \ | ||
86 | " .set mips3 \n" \ | ||
87 | "1: cache %0, (%1) \n" \ | ||
88 | "2: .set pop \n" \ | ||
89 | " .section __ex_table,\"a\" \n" \ | ||
90 | " "STR(PTR)" 1b, 2b \n" \ | ||
91 | " .previous" \ | ||
92 | : \ | ||
93 | : "i" (op), "r" (addr)) | ||
94 | |||
81 | /* | 95 | /* |
82 | * The next two are for badland addresses like signal trampolines. | 96 | * The next two are for badland addresses like signal trampolines. |
83 | */ | 97 | */ |
84 | static inline void protected_flush_icache_line(unsigned long addr) | 98 | static inline void protected_flush_icache_line(unsigned long addr) |
85 | { | 99 | { |
86 | __asm__ __volatile__( | 100 | protected_cache_op(Hit_Invalidate_I, addr); |
87 | " .set push \n" | ||
88 | " .set noreorder \n" | ||
89 | " .set mips3 \n" | ||
90 | "1: cache %0, (%1) \n" | ||
91 | "2: .set pop \n" | ||
92 | " .section __ex_table,\"a\" \n" | ||
93 | " "STR(PTR)" 1b, 2b \n" | ||
94 | " .previous" | ||
95 | : | ||
96 | : "i" (Hit_Invalidate_I), "r" (addr)); | ||
97 | } | 101 | } |
98 | 102 | ||
99 | /* | 103 | /* |
@@ -104,32 +108,12 @@ static inline void protected_flush_icache_line(unsigned long addr) | |||
104 | */ | 108 | */ |
105 | static inline void protected_writeback_dcache_line(unsigned long addr) | 109 | static inline void protected_writeback_dcache_line(unsigned long addr) |
106 | { | 110 | { |
107 | __asm__ __volatile__( | 111 | protected_cache_op(Hit_Writeback_Inv_D, addr); |
108 | " .set push \n" | ||
109 | " .set noreorder \n" | ||
110 | " .set mips3 \n" | ||
111 | "1: cache %0, (%1) \n" | ||
112 | "2: .set pop \n" | ||
113 | " .section __ex_table,\"a\" \n" | ||
114 | " "STR(PTR)" 1b, 2b \n" | ||
115 | " .previous" | ||
116 | : | ||
117 | : "i" (Hit_Writeback_Inv_D), "r" (addr)); | ||
118 | } | 112 | } |
119 | 113 | ||
120 | static inline void protected_writeback_scache_line(unsigned long addr) | 114 | static inline void protected_writeback_scache_line(unsigned long addr) |
121 | { | 115 | { |
122 | __asm__ __volatile__( | 116 | protected_cache_op(Hit_Writeback_Inv_SD, addr); |
123 | " .set push \n" | ||
124 | " .set noreorder \n" | ||
125 | " .set mips3 \n" | ||
126 | "1: cache %0, (%1) \n" | ||
127 | "2: .set pop \n" | ||
128 | " .section __ex_table,\"a\" \n" | ||
129 | " "STR(PTR)" 1b, 2b \n" | ||
130 | " .previous" | ||
131 | : | ||
132 | : "i" (Hit_Writeback_Inv_SD), "r" (addr)); | ||
133 | } | 117 | } |
134 | 118 | ||
135 | /* | 119 | /* |
@@ -166,123 +150,6 @@ static inline void invalidate_tcache_page(unsigned long addr) | |||
166 | : "r" (base), \ | 150 | : "r" (base), \ |
167 | "i" (op)); | 151 | "i" (op)); |
168 | 152 | ||
169 | static inline void blast_dcache16(void) | ||
170 | { | ||
171 | unsigned long start = INDEX_BASE; | ||
172 | unsigned long end = start + current_cpu_data.dcache.waysize; | ||
173 | unsigned long ws_inc = 1UL << current_cpu_data.dcache.waybit; | ||
174 | unsigned long ws_end = current_cpu_data.dcache.ways << | ||
175 | current_cpu_data.dcache.waybit; | ||
176 | unsigned long ws, addr; | ||
177 | |||
178 | for (ws = 0; ws < ws_end; ws += ws_inc) | ||
179 | for (addr = start; addr < end; addr += 0x200) | ||
180 | cache16_unroll32(addr|ws,Index_Writeback_Inv_D); | ||
181 | } | ||
182 | |||
183 | static inline void blast_dcache16_page(unsigned long page) | ||
184 | { | ||
185 | unsigned long start = page; | ||
186 | unsigned long end = start + PAGE_SIZE; | ||
187 | |||
188 | do { | ||
189 | cache16_unroll32(start,Hit_Writeback_Inv_D); | ||
190 | start += 0x200; | ||
191 | } while (start < end); | ||
192 | } | ||
193 | |||
194 | static inline void blast_dcache16_page_indexed(unsigned long page) | ||
195 | { | ||
196 | unsigned long start = page; | ||
197 | unsigned long end = start + PAGE_SIZE; | ||
198 | unsigned long ws_inc = 1UL << current_cpu_data.dcache.waybit; | ||
199 | unsigned long ws_end = current_cpu_data.dcache.ways << | ||
200 | current_cpu_data.dcache.waybit; | ||
201 | unsigned long ws, addr; | ||
202 | |||
203 | for (ws = 0; ws < ws_end; ws += ws_inc) | ||
204 | for (addr = start; addr < end; addr += 0x200) | ||
205 | cache16_unroll32(addr|ws,Index_Writeback_Inv_D); | ||
206 | } | ||
207 | |||
208 | static inline void blast_icache16(void) | ||
209 | { | ||
210 | unsigned long start = INDEX_BASE; | ||
211 | unsigned long end = start + current_cpu_data.icache.waysize; | ||
212 | unsigned long ws_inc = 1UL << current_cpu_data.icache.waybit; | ||
213 | unsigned long ws_end = current_cpu_data.icache.ways << | ||
214 | current_cpu_data.icache.waybit; | ||
215 | unsigned long ws, addr; | ||
216 | |||
217 | for (ws = 0; ws < ws_end; ws += ws_inc) | ||
218 | for (addr = start; addr < end; addr += 0x200) | ||
219 | cache16_unroll32(addr|ws,Index_Invalidate_I); | ||
220 | } | ||
221 | |||
222 | static inline void blast_icache16_page(unsigned long page) | ||
223 | { | ||
224 | unsigned long start = page; | ||
225 | unsigned long end = start + PAGE_SIZE; | ||
226 | |||
227 | do { | ||
228 | cache16_unroll32(start,Hit_Invalidate_I); | ||
229 | start += 0x200; | ||
230 | } while (start < end); | ||
231 | } | ||
232 | |||
233 | static inline void blast_icache16_page_indexed(unsigned long page) | ||
234 | { | ||
235 | unsigned long start = page; | ||
236 | unsigned long end = start + PAGE_SIZE; | ||
237 | unsigned long ws_inc = 1UL << current_cpu_data.icache.waybit; | ||
238 | unsigned long ws_end = current_cpu_data.icache.ways << | ||
239 | current_cpu_data.icache.waybit; | ||
240 | unsigned long ws, addr; | ||
241 | |||
242 | for (ws = 0; ws < ws_end; ws += ws_inc) | ||
243 | for (addr = start; addr < end; addr += 0x200) | ||
244 | cache16_unroll32(addr|ws,Index_Invalidate_I); | ||
245 | } | ||
246 | |||
247 | static inline void blast_scache16(void) | ||
248 | { | ||
249 | unsigned long start = INDEX_BASE; | ||
250 | unsigned long end = start + current_cpu_data.scache.waysize; | ||
251 | unsigned long ws_inc = 1UL << current_cpu_data.scache.waybit; | ||
252 | unsigned long ws_end = current_cpu_data.scache.ways << | ||
253 | current_cpu_data.scache.waybit; | ||
254 | unsigned long ws, addr; | ||
255 | |||
256 | for (ws = 0; ws < ws_end; ws += ws_inc) | ||
257 | for (addr = start; addr < end; addr += 0x200) | ||
258 | cache16_unroll32(addr|ws,Index_Writeback_Inv_SD); | ||
259 | } | ||
260 | |||
261 | static inline void blast_scache16_page(unsigned long page) | ||
262 | { | ||
263 | unsigned long start = page; | ||
264 | unsigned long end = page + PAGE_SIZE; | ||
265 | |||
266 | do { | ||
267 | cache16_unroll32(start,Hit_Writeback_Inv_SD); | ||
268 | start += 0x200; | ||
269 | } while (start < end); | ||
270 | } | ||
271 | |||
272 | static inline void blast_scache16_page_indexed(unsigned long page) | ||
273 | { | ||
274 | unsigned long start = page; | ||
275 | unsigned long end = start + PAGE_SIZE; | ||
276 | unsigned long ws_inc = 1UL << current_cpu_data.scache.waybit; | ||
277 | unsigned long ws_end = current_cpu_data.scache.ways << | ||
278 | current_cpu_data.scache.waybit; | ||
279 | unsigned long ws, addr; | ||
280 | |||
281 | for (ws = 0; ws < ws_end; ws += ws_inc) | ||
282 | for (addr = start; addr < end; addr += 0x200) | ||
283 | cache16_unroll32(addr|ws,Index_Writeback_Inv_SD); | ||
284 | } | ||
285 | |||
286 | #define cache32_unroll32(base,op) \ | 153 | #define cache32_unroll32(base,op) \ |
287 | __asm__ __volatile__( \ | 154 | __asm__ __volatile__( \ |
288 | " .set push \n" \ | 155 | " .set push \n" \ |
@@ -309,123 +176,6 @@ static inline void blast_scache16_page_indexed(unsigned long page) | |||
309 | : "r" (base), \ | 176 | : "r" (base), \ |
310 | "i" (op)); | 177 | "i" (op)); |
311 | 178 | ||
312 | static inline void blast_dcache32(void) | ||
313 | { | ||
314 | unsigned long start = INDEX_BASE; | ||
315 | unsigned long end = start + current_cpu_data.dcache.waysize; | ||
316 | unsigned long ws_inc = 1UL << current_cpu_data.dcache.waybit; | ||
317 | unsigned long ws_end = current_cpu_data.dcache.ways << | ||
318 | current_cpu_data.dcache.waybit; | ||
319 | unsigned long ws, addr; | ||
320 | |||
321 | for (ws = 0; ws < ws_end; ws += ws_inc) | ||
322 | for (addr = start; addr < end; addr += 0x400) | ||
323 | cache32_unroll32(addr|ws,Index_Writeback_Inv_D); | ||
324 | } | ||
325 | |||
326 | static inline void blast_dcache32_page(unsigned long page) | ||
327 | { | ||
328 | unsigned long start = page; | ||
329 | unsigned long end = start + PAGE_SIZE; | ||
330 | |||
331 | do { | ||
332 | cache32_unroll32(start,Hit_Writeback_Inv_D); | ||
333 | start += 0x400; | ||
334 | } while (start < end); | ||
335 | } | ||
336 | |||
337 | static inline void blast_dcache32_page_indexed(unsigned long page) | ||
338 | { | ||
339 | unsigned long start = page; | ||
340 | unsigned long end = start + PAGE_SIZE; | ||
341 | unsigned long ws_inc = 1UL << current_cpu_data.dcache.waybit; | ||
342 | unsigned long ws_end = current_cpu_data.dcache.ways << | ||
343 | current_cpu_data.dcache.waybit; | ||
344 | unsigned long ws, addr; | ||
345 | |||
346 | for (ws = 0; ws < ws_end; ws += ws_inc) | ||
347 | for (addr = start; addr < end; addr += 0x400) | ||
348 | cache32_unroll32(addr|ws,Index_Writeback_Inv_D); | ||
349 | } | ||
350 | |||
351 | static inline void blast_icache32(void) | ||
352 | { | ||
353 | unsigned long start = INDEX_BASE; | ||
354 | unsigned long end = start + current_cpu_data.icache.waysize; | ||
355 | unsigned long ws_inc = 1UL << current_cpu_data.icache.waybit; | ||
356 | unsigned long ws_end = current_cpu_data.icache.ways << | ||
357 | current_cpu_data.icache.waybit; | ||
358 | unsigned long ws, addr; | ||
359 | |||
360 | for (ws = 0; ws < ws_end; ws += ws_inc) | ||
361 | for (addr = start; addr < end; addr += 0x400) | ||
362 | cache32_unroll32(addr|ws,Index_Invalidate_I); | ||
363 | } | ||
364 | |||
365 | static inline void blast_icache32_page(unsigned long page) | ||
366 | { | ||
367 | unsigned long start = page; | ||
368 | unsigned long end = start + PAGE_SIZE; | ||
369 | |||
370 | do { | ||
371 | cache32_unroll32(start,Hit_Invalidate_I); | ||
372 | start += 0x400; | ||
373 | } while (start < end); | ||
374 | } | ||
375 | |||
376 | static inline void blast_icache32_page_indexed(unsigned long page) | ||
377 | { | ||
378 | unsigned long start = page; | ||
379 | unsigned long end = start + PAGE_SIZE; | ||
380 | unsigned long ws_inc = 1UL << current_cpu_data.icache.waybit; | ||
381 | unsigned long ws_end = current_cpu_data.icache.ways << | ||
382 | current_cpu_data.icache.waybit; | ||
383 | unsigned long ws, addr; | ||
384 | |||
385 | for (ws = 0; ws < ws_end; ws += ws_inc) | ||
386 | for (addr = start; addr < end; addr += 0x400) | ||
387 | cache32_unroll32(addr|ws,Index_Invalidate_I); | ||
388 | } | ||
389 | |||
390 | static inline void blast_scache32(void) | ||
391 | { | ||
392 | unsigned long start = INDEX_BASE; | ||
393 | unsigned long end = start + current_cpu_data.scache.waysize; | ||
394 | unsigned long ws_inc = 1UL << current_cpu_data.scache.waybit; | ||
395 | unsigned long ws_end = current_cpu_data.scache.ways << | ||
396 | current_cpu_data.scache.waybit; | ||
397 | unsigned long ws, addr; | ||
398 | |||
399 | for (ws = 0; ws < ws_end; ws += ws_inc) | ||
400 | for (addr = start; addr < end; addr += 0x400) | ||
401 | cache32_unroll32(addr|ws,Index_Writeback_Inv_SD); | ||
402 | } | ||
403 | |||
404 | static inline void blast_scache32_page(unsigned long page) | ||
405 | { | ||
406 | unsigned long start = page; | ||
407 | unsigned long end = page + PAGE_SIZE; | ||
408 | |||
409 | do { | ||
410 | cache32_unroll32(start,Hit_Writeback_Inv_SD); | ||
411 | start += 0x400; | ||
412 | } while (start < end); | ||
413 | } | ||
414 | |||
415 | static inline void blast_scache32_page_indexed(unsigned long page) | ||
416 | { | ||
417 | unsigned long start = page; | ||
418 | unsigned long end = start + PAGE_SIZE; | ||
419 | unsigned long ws_inc = 1UL << current_cpu_data.scache.waybit; | ||
420 | unsigned long ws_end = current_cpu_data.scache.ways << | ||
421 | current_cpu_data.scache.waybit; | ||
422 | unsigned long ws, addr; | ||
423 | |||
424 | for (ws = 0; ws < ws_end; ws += ws_inc) | ||
425 | for (addr = start; addr < end; addr += 0x400) | ||
426 | cache32_unroll32(addr|ws,Index_Writeback_Inv_SD); | ||
427 | } | ||
428 | |||
429 | #define cache64_unroll32(base,op) \ | 179 | #define cache64_unroll32(base,op) \ |
430 | __asm__ __volatile__( \ | 180 | __asm__ __volatile__( \ |
431 | " .set push \n" \ | 181 | " .set push \n" \ |
@@ -452,84 +202,6 @@ static inline void blast_scache32_page_indexed(unsigned long page) | |||
452 | : "r" (base), \ | 202 | : "r" (base), \ |
453 | "i" (op)); | 203 | "i" (op)); |
454 | 204 | ||
455 | static inline void blast_icache64(void) | ||
456 | { | ||
457 | unsigned long start = INDEX_BASE; | ||
458 | unsigned long end = start + current_cpu_data.icache.waysize; | ||
459 | unsigned long ws_inc = 1UL << current_cpu_data.icache.waybit; | ||
460 | unsigned long ws_end = current_cpu_data.icache.ways << | ||
461 | current_cpu_data.icache.waybit; | ||
462 | unsigned long ws, addr; | ||
463 | |||
464 | for (ws = 0; ws < ws_end; ws += ws_inc) | ||
465 | for (addr = start; addr < end; addr += 0x800) | ||
466 | cache64_unroll32(addr|ws,Index_Invalidate_I); | ||
467 | } | ||
468 | |||
469 | static inline void blast_icache64_page(unsigned long page) | ||
470 | { | ||
471 | unsigned long start = page; | ||
472 | unsigned long end = start + PAGE_SIZE; | ||
473 | |||
474 | do { | ||
475 | cache64_unroll32(start,Hit_Invalidate_I); | ||
476 | start += 0x800; | ||
477 | } while (start < end); | ||
478 | } | ||
479 | |||
480 | static inline void blast_icache64_page_indexed(unsigned long page) | ||
481 | { | ||
482 | unsigned long start = page; | ||
483 | unsigned long end = start + PAGE_SIZE; | ||
484 | unsigned long ws_inc = 1UL << current_cpu_data.icache.waybit; | ||
485 | unsigned long ws_end = current_cpu_data.icache.ways << | ||
486 | current_cpu_data.icache.waybit; | ||
487 | unsigned long ws, addr; | ||
488 | |||
489 | for (ws = 0; ws < ws_end; ws += ws_inc) | ||
490 | for (addr = start; addr < end; addr += 0x800) | ||
491 | cache64_unroll32(addr|ws,Index_Invalidate_I); | ||
492 | } | ||
493 | |||
494 | static inline void blast_scache64(void) | ||
495 | { | ||
496 | unsigned long start = INDEX_BASE; | ||
497 | unsigned long end = start + current_cpu_data.scache.waysize; | ||
498 | unsigned long ws_inc = 1UL << current_cpu_data.scache.waybit; | ||
499 | unsigned long ws_end = current_cpu_data.scache.ways << | ||
500 | current_cpu_data.scache.waybit; | ||
501 | unsigned long ws, addr; | ||
502 | |||
503 | for (ws = 0; ws < ws_end; ws += ws_inc) | ||
504 | for (addr = start; addr < end; addr += 0x800) | ||
505 | cache64_unroll32(addr|ws,Index_Writeback_Inv_SD); | ||
506 | } | ||
507 | |||
508 | static inline void blast_scache64_page(unsigned long page) | ||
509 | { | ||
510 | unsigned long start = page; | ||
511 | unsigned long end = page + PAGE_SIZE; | ||
512 | |||
513 | do { | ||
514 | cache64_unroll32(start,Hit_Writeback_Inv_SD); | ||
515 | start += 0x800; | ||
516 | } while (start < end); | ||
517 | } | ||
518 | |||
519 | static inline void blast_scache64_page_indexed(unsigned long page) | ||
520 | { | ||
521 | unsigned long start = page; | ||
522 | unsigned long end = start + PAGE_SIZE; | ||
523 | unsigned long ws_inc = 1UL << current_cpu_data.scache.waybit; | ||
524 | unsigned long ws_end = current_cpu_data.scache.ways << | ||
525 | current_cpu_data.scache.waybit; | ||
526 | unsigned long ws, addr; | ||
527 | |||
528 | for (ws = 0; ws < ws_end; ws += ws_inc) | ||
529 | for (addr = start; addr < end; addr += 0x800) | ||
530 | cache64_unroll32(addr|ws,Index_Writeback_Inv_SD); | ||
531 | } | ||
532 | |||
533 | #define cache128_unroll32(base,op) \ | 205 | #define cache128_unroll32(base,op) \ |
534 | __asm__ __volatile__( \ | 206 | __asm__ __volatile__( \ |
535 | " .set push \n" \ | 207 | " .set push \n" \ |
@@ -556,43 +228,80 @@ static inline void blast_scache64_page_indexed(unsigned long page) | |||
556 | : "r" (base), \ | 228 | : "r" (base), \ |
557 | "i" (op)); | 229 | "i" (op)); |
558 | 230 | ||
559 | static inline void blast_scache128(void) | 231 | /* build blast_xxx, blast_xxx_page, blast_xxx_page_indexed */ |
560 | { | 232 | #define __BUILD_BLAST_CACHE(pfx, desc, indexop, hitop, lsize) \ |
561 | unsigned long start = INDEX_BASE; | 233 | static inline void blast_##pfx##cache##lsize(void) \ |
562 | unsigned long end = start + current_cpu_data.scache.waysize; | 234 | { \ |
563 | unsigned long ws_inc = 1UL << current_cpu_data.scache.waybit; | 235 | unsigned long start = INDEX_BASE; \ |
564 | unsigned long ws_end = current_cpu_data.scache.ways << | 236 | unsigned long end = start + current_cpu_data.desc.waysize; \ |
565 | current_cpu_data.scache.waybit; | 237 | unsigned long ws_inc = 1UL << current_cpu_data.desc.waybit; \ |
566 | unsigned long ws, addr; | 238 | unsigned long ws_end = current_cpu_data.desc.ways << \ |
567 | 239 | current_cpu_data.desc.waybit; \ | |
568 | for (ws = 0; ws < ws_end; ws += ws_inc) | 240 | unsigned long ws, addr; \ |
569 | for (addr = start; addr < end; addr += 0x1000) | 241 | \ |
570 | cache128_unroll32(addr|ws,Index_Writeback_Inv_SD); | 242 | for (ws = 0; ws < ws_end; ws += ws_inc) \ |
571 | } | 243 | for (addr = start; addr < end; addr += lsize * 32) \ |
572 | 244 | cache##lsize##_unroll32(addr|ws,indexop); \ | |
573 | static inline void blast_scache128_page(unsigned long page) | 245 | } \ |
574 | { | 246 | \ |
575 | unsigned long start = page; | 247 | static inline void blast_##pfx##cache##lsize##_page(unsigned long page) \ |
576 | unsigned long end = page + PAGE_SIZE; | 248 | { \ |
577 | 249 | unsigned long start = page; \ | |
578 | do { | 250 | unsigned long end = page + PAGE_SIZE; \ |
579 | cache128_unroll32(start,Hit_Writeback_Inv_SD); | 251 | \ |
580 | start += 0x1000; | 252 | do { \ |
581 | } while (start < end); | 253 | cache##lsize##_unroll32(start,hitop); \ |
582 | } | 254 | start += lsize * 32; \ |
583 | 255 | } while (start < end); \ | |
584 | static inline void blast_scache128_page_indexed(unsigned long page) | 256 | } \ |
585 | { | 257 | \ |
586 | unsigned long start = page; | 258 | static inline void blast_##pfx##cache##lsize##_page_indexed(unsigned long page) \ |
587 | unsigned long end = start + PAGE_SIZE; | 259 | { \ |
588 | unsigned long ws_inc = 1UL << current_cpu_data.scache.waybit; | 260 | unsigned long indexmask = current_cpu_data.desc.waysize - 1; \ |
589 | unsigned long ws_end = current_cpu_data.scache.ways << | 261 | unsigned long start = INDEX_BASE + (page & indexmask); \ |
590 | current_cpu_data.scache.waybit; | 262 | unsigned long end = start + PAGE_SIZE; \ |
591 | unsigned long ws, addr; | 263 | unsigned long ws_inc = 1UL << current_cpu_data.desc.waybit; \ |
592 | 264 | unsigned long ws_end = current_cpu_data.desc.ways << \ | |
593 | for (ws = 0; ws < ws_end; ws += ws_inc) | 265 | current_cpu_data.desc.waybit; \ |
594 | for (addr = start; addr < end; addr += 0x1000) | 266 | unsigned long ws, addr; \ |
595 | cache128_unroll32(addr|ws,Index_Writeback_Inv_SD); | 267 | \ |
596 | } | 268 | for (ws = 0; ws < ws_end; ws += ws_inc) \ |
269 | for (addr = start; addr < end; addr += lsize * 32) \ | ||
270 | cache##lsize##_unroll32(addr|ws,indexop); \ | ||
271 | } | ||
272 | |||
273 | __BUILD_BLAST_CACHE(d, dcache, Index_Writeback_Inv_D, Hit_Writeback_Inv_D, 16) | ||
274 | __BUILD_BLAST_CACHE(i, icache, Index_Invalidate_I, Hit_Invalidate_I, 16) | ||
275 | __BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 16) | ||
276 | __BUILD_BLAST_CACHE(d, dcache, Index_Writeback_Inv_D, Hit_Writeback_Inv_D, 32) | ||
277 | __BUILD_BLAST_CACHE(i, icache, Index_Invalidate_I, Hit_Invalidate_I, 32) | ||
278 | __BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 32) | ||
279 | __BUILD_BLAST_CACHE(i, icache, Index_Invalidate_I, Hit_Invalidate_I, 64) | ||
280 | __BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 64) | ||
281 | __BUILD_BLAST_CACHE(s, scache, Index_Writeback_Inv_SD, Hit_Writeback_Inv_SD, 128) | ||
282 | |||
283 | /* build blast_xxx_range, protected_blast_xxx_range */ | ||
284 | #define __BUILD_BLAST_CACHE_RANGE(pfx, desc, hitop, prot) \ | ||
285 | static inline void prot##blast_##pfx##cache##_range(unsigned long start, \ | ||
286 | unsigned long end) \ | ||
287 | { \ | ||
288 | unsigned long lsize = cpu_##desc##_line_size(); \ | ||
289 | unsigned long addr = start & ~(lsize - 1); \ | ||
290 | unsigned long aend = (end - 1) & ~(lsize - 1); \ | ||
291 | while (1) { \ | ||
292 | prot##cache_op(hitop, addr); \ | ||
293 | if (addr == aend) \ | ||
294 | break; \ | ||
295 | addr += lsize; \ | ||
296 | } \ | ||
297 | } | ||
298 | |||
299 | __BUILD_BLAST_CACHE_RANGE(d, dcache, Hit_Writeback_Inv_D, protected_) | ||
300 | __BUILD_BLAST_CACHE_RANGE(s, scache, Hit_Writeback_Inv_SD, protected_) | ||
301 | __BUILD_BLAST_CACHE_RANGE(i, icache, Hit_Invalidate_I, protected_) | ||
302 | __BUILD_BLAST_CACHE_RANGE(d, dcache, Hit_Writeback_Inv_D, ) | ||
303 | __BUILD_BLAST_CACHE_RANGE(s, scache, Hit_Writeback_Inv_SD, ) | ||
304 | /* blast_inv_dcache_range */ | ||
305 | __BUILD_BLAST_CACHE_RANGE(inv_d, dcache, Hit_Invalidate_D, ) | ||
597 | 306 | ||
598 | #endif /* _ASM_R4KCACHE_H */ | 307 | #endif /* _ASM_R4KCACHE_H */ |
diff --git a/include/asm-mips/reboot.h b/include/asm-mips/reboot.h index 2f10ebcbe141..e48c0bfab257 100644 --- a/include/asm-mips/reboot.h +++ b/include/asm-mips/reboot.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) 1997, 1999, 2001 by Ralf Baechle | 6 | * Copyright (C) 1997, 1999, 2001, 06 by Ralf Baechle |
7 | * Copyright (C) 2001 MIPS Technologies, Inc. | 7 | * Copyright (C) 2001 MIPS Technologies, Inc. |
8 | */ | 8 | */ |
9 | #ifndef _ASM_REBOOT_H | 9 | #ifndef _ASM_REBOOT_H |
@@ -11,6 +11,5 @@ | |||
11 | 11 | ||
12 | extern void (*_machine_restart)(char *command); | 12 | extern void (*_machine_restart)(char *command); |
13 | extern void (*_machine_halt)(void); | 13 | extern void (*_machine_halt)(void); |
14 | extern void (*_machine_power_off)(void); | ||
15 | 14 | ||
16 | #endif /* _ASM_REBOOT_H */ | 15 | #endif /* _ASM_REBOOT_H */ |
diff --git a/include/asm-mips/sibyte/sb1250.h b/include/asm-mips/sibyte/sb1250.h index a474c29cd701..b09e16c93ca0 100644 --- a/include/asm-mips/sibyte/sb1250.h +++ b/include/asm-mips/sibyte/sb1250.h | |||
@@ -45,8 +45,8 @@ extern unsigned int soc_type; | |||
45 | extern unsigned int periph_rev; | 45 | extern unsigned int periph_rev; |
46 | extern unsigned int zbbus_mhz; | 46 | extern unsigned int zbbus_mhz; |
47 | 47 | ||
48 | extern void sb1250_hpt_setup(void); | ||
48 | extern void sb1250_time_init(void); | 49 | extern void sb1250_time_init(void); |
49 | extern unsigned long sb1250_gettimeoffset(void); | ||
50 | extern void sb1250_mask_irq(int cpu, int irq); | 50 | extern void sb1250_mask_irq(int cpu, int irq); |
51 | extern void sb1250_unmask_irq(int cpu, int irq); | 51 | extern void sb1250_unmask_irq(int cpu, int irq); |
52 | extern void sb1250_smp_finish(void); | 52 | extern void sb1250_smp_finish(void); |
diff --git a/include/asm-mips/sibyte/sb1250_scd.h b/include/asm-mips/sibyte/sb1250_scd.h index a667bc14a7cd..f4178bdcfcb0 100644 --- a/include/asm-mips/sibyte/sb1250_scd.h +++ b/include/asm-mips/sibyte/sb1250_scd.h | |||
@@ -359,14 +359,15 @@ | |||
359 | */ | 359 | */ |
360 | 360 | ||
361 | #define V_SCD_TIMER_FREQ 1000000 | 361 | #define V_SCD_TIMER_FREQ 1000000 |
362 | #define V_SCD_TIMER_WIDTH 23 | ||
362 | 363 | ||
363 | #define S_SCD_TIMER_INIT 0 | 364 | #define S_SCD_TIMER_INIT 0 |
364 | #define M_SCD_TIMER_INIT _SB_MAKEMASK(20,S_SCD_TIMER_INIT) | 365 | #define M_SCD_TIMER_INIT _SB_MAKEMASK(V_SCD_TIMER_WIDTH,S_SCD_TIMER_INIT) |
365 | #define V_SCD_TIMER_INIT(x) _SB_MAKEVALUE(x,S_SCD_TIMER_INIT) | 366 | #define V_SCD_TIMER_INIT(x) _SB_MAKEVALUE(x,S_SCD_TIMER_INIT) |
366 | #define G_SCD_TIMER_INIT(x) _SB_GETVALUE(x,S_SCD_TIMER_INIT,M_SCD_TIMER_INIT) | 367 | #define G_SCD_TIMER_INIT(x) _SB_GETVALUE(x,S_SCD_TIMER_INIT,M_SCD_TIMER_INIT) |
367 | 368 | ||
368 | #define S_SCD_TIMER_CNT 0 | 369 | #define S_SCD_TIMER_CNT 0 |
369 | #define M_SCD_TIMER_CNT _SB_MAKEMASK(20,S_SCD_TIMER_CNT) | 370 | #define M_SCD_TIMER_CNT _SB_MAKEMASK(V_SCD_TIMER_WIDTH,S_SCD_TIMER_CNT) |
370 | #define V_SCD_TIMER_CNT(x) _SB_MAKEVALUE(x,S_SCD_TIMER_CNT) | 371 | #define V_SCD_TIMER_CNT(x) _SB_MAKEVALUE(x,S_SCD_TIMER_CNT) |
371 | #define G_SCD_TIMER_CNT(x) _SB_GETVALUE(x,S_SCD_TIMER_CNT,M_SCD_TIMER_CNT) | 372 | #define G_SCD_TIMER_CNT(x) _SB_GETVALUE(x,S_SCD_TIMER_CNT,M_SCD_TIMER_CNT) |
372 | 373 | ||
diff --git a/include/asm-mips/smp.h b/include/asm-mips/smp.h index 5618f1e12f40..75c6fe7c2126 100644 --- a/include/asm-mips/smp.h +++ b/include/asm-mips/smp.h | |||
@@ -58,7 +58,9 @@ static inline int num_booting_cpus(void) | |||
58 | return cpus_weight(cpu_callout_map); | 58 | return cpus_weight(cpu_callout_map); |
59 | } | 59 | } |
60 | 60 | ||
61 | /* These are defined by the board-specific code. */ | 61 | /* |
62 | * These are defined by the board-specific code. | ||
63 | */ | ||
62 | 64 | ||
63 | /* | 65 | /* |
64 | * Cause the function described by call_data to be executed on the passed | 66 | * Cause the function described by call_data to be executed on the passed |
@@ -79,7 +81,12 @@ extern void prom_boot_secondary(int cpu, struct task_struct *idle); | |||
79 | extern void prom_init_secondary(void); | 81 | extern void prom_init_secondary(void); |
80 | 82 | ||
81 | /* | 83 | /* |
82 | * Detect available CPUs, populate phys_cpu_present_map before smp_init | 84 | * Populate cpu_possible_map before smp_init, called from setup_arch. |
85 | */ | ||
86 | extern void plat_smp_setup(void); | ||
87 | |||
88 | /* | ||
89 | * Called after init_IRQ but before __cpu_up. | ||
83 | */ | 90 | */ |
84 | extern void prom_prepare_cpus(unsigned int max_cpus); | 91 | extern void prom_prepare_cpus(unsigned int max_cpus); |
85 | 92 | ||
diff --git a/include/asm-mips/string.h b/include/asm-mips/string.h index 5a06f6d13899..907da600fddd 100644 --- a/include/asm-mips/string.h +++ b/include/asm-mips/string.h | |||
@@ -141,26 +141,4 @@ extern void *memcpy(void *__to, __const__ void *__from, size_t __n); | |||
141 | #define __HAVE_ARCH_MEMMOVE | 141 | #define __HAVE_ARCH_MEMMOVE |
142 | extern void *memmove(void *__dest, __const__ void *__src, size_t __n); | 142 | extern void *memmove(void *__dest, __const__ void *__src, size_t __n); |
143 | 143 | ||
144 | #ifdef CONFIG_32BIT | ||
145 | #define __HAVE_ARCH_MEMSCAN | ||
146 | static __inline__ void *memscan(void *__addr, int __c, size_t __size) | ||
147 | { | ||
148 | char *__end = (char *)__addr + __size; | ||
149 | unsigned char __uc = (unsigned char) __c; | ||
150 | |||
151 | __asm__(".set\tpush\n\t" | ||
152 | ".set\tnoat\n\t" | ||
153 | ".set\treorder\n\t" | ||
154 | "1:\tbeq\t%0,%1,2f\n\t" | ||
155 | "addiu\t%0,1\n\t" | ||
156 | "lbu\t$1,-1(%0)\n\t" | ||
157 | "bne\t$1,%z4,1b\n" | ||
158 | "2:\t.set\tpop" | ||
159 | : "=r" (__addr), "=r" (__end) | ||
160 | : "0" (__addr), "1" (__end), "Jr" (__uc)); | ||
161 | |||
162 | return __addr; | ||
163 | } | ||
164 | #endif /* CONFIG_32BIT */ | ||
165 | |||
166 | #endif /* _ASM_STRING_H */ | 144 | #endif /* _ASM_STRING_H */ |
diff --git a/include/asm-mips/system.h b/include/asm-mips/system.h index e8e5d4143377..ddae9bae31af 100644 --- a/include/asm-mips/system.h +++ b/include/asm-mips/system.h | |||
@@ -322,7 +322,7 @@ static inline unsigned long __cmpxchg_u32(volatile int * m, unsigned long old, | |||
322 | #endif | 322 | #endif |
323 | "2: \n" | 323 | "2: \n" |
324 | " .set pop \n" | 324 | " .set pop \n" |
325 | : "=&r" (retval), "=m" (*m) | 325 | : "=&r" (retval), "=R" (*m) |
326 | : "R" (*m), "Jr" (old), "Jr" (new) | 326 | : "R" (*m), "Jr" (old), "Jr" (new) |
327 | : "memory"); | 327 | : "memory"); |
328 | } else if (cpu_has_llsc) { | 328 | } else if (cpu_has_llsc) { |
@@ -342,7 +342,7 @@ static inline unsigned long __cmpxchg_u32(volatile int * m, unsigned long old, | |||
342 | #endif | 342 | #endif |
343 | "2: \n" | 343 | "2: \n" |
344 | " .set pop \n" | 344 | " .set pop \n" |
345 | : "=&r" (retval), "=m" (*m) | 345 | : "=&r" (retval), "=R" (*m) |
346 | : "R" (*m), "Jr" (old), "Jr" (new) | 346 | : "R" (*m), "Jr" (old), "Jr" (new) |
347 | : "memory"); | 347 | : "memory"); |
348 | } else { | 348 | } else { |
@@ -379,7 +379,7 @@ static inline unsigned long __cmpxchg_u64(volatile int * m, unsigned long old, | |||
379 | #endif | 379 | #endif |
380 | "2: \n" | 380 | "2: \n" |
381 | " .set pop \n" | 381 | " .set pop \n" |
382 | : "=&r" (retval), "=m" (*m) | 382 | : "=&r" (retval), "=R" (*m) |
383 | : "R" (*m), "Jr" (old), "Jr" (new) | 383 | : "R" (*m), "Jr" (old), "Jr" (new) |
384 | : "memory"); | 384 | : "memory"); |
385 | } else if (cpu_has_llsc) { | 385 | } else if (cpu_has_llsc) { |
@@ -397,7 +397,7 @@ static inline unsigned long __cmpxchg_u64(volatile int * m, unsigned long old, | |||
397 | #endif | 397 | #endif |
398 | "2: \n" | 398 | "2: \n" |
399 | " .set pop \n" | 399 | " .set pop \n" |
400 | : "=&r" (retval), "=m" (*m) | 400 | : "=&r" (retval), "=R" (*m) |
401 | : "R" (*m), "Jr" (old), "Jr" (new) | 401 | : "R" (*m), "Jr" (old), "Jr" (new) |
402 | : "memory"); | 402 | : "memory"); |
403 | } else { | 403 | } else { |
diff --git a/include/asm-mips/thread_info.h b/include/asm-mips/thread_info.h index 1612b3fe1080..fa193f861e71 100644 --- a/include/asm-mips/thread_info.h +++ b/include/asm-mips/thread_info.h | |||
@@ -114,6 +114,7 @@ register struct thread_info *__current_thread_info __asm__("$28"); | |||
114 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ | 114 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ |
115 | #define TIF_SYSCALL_AUDIT 4 /* syscall auditing active */ | 115 | #define TIF_SYSCALL_AUDIT 4 /* syscall auditing active */ |
116 | #define TIF_SECCOMP 5 /* secure computing */ | 116 | #define TIF_SECCOMP 5 /* secure computing */ |
117 | #define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */ | ||
117 | #define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ | 118 | #define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ |
118 | #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | 119 | #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ |
119 | #define TIF_MEMDIE 18 | 120 | #define TIF_MEMDIE 18 |
@@ -125,6 +126,7 @@ register struct thread_info *__current_thread_info __asm__("$28"); | |||
125 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 126 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
126 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) | 127 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) |
127 | #define _TIF_SECCOMP (1<<TIF_SECCOMP) | 128 | #define _TIF_SECCOMP (1<<TIF_SECCOMP) |
129 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | ||
128 | #define _TIF_USEDFPU (1<<TIF_USEDFPU) | 130 | #define _TIF_USEDFPU (1<<TIF_USEDFPU) |
129 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 131 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
130 | 132 | ||
diff --git a/include/asm-mips/tx4927/tx4927.h b/include/asm-mips/tx4927/tx4927.h index 3bb7f0087d68..de85bd2245f7 100644 --- a/include/asm-mips/tx4927/tx4927.h +++ b/include/asm-mips/tx4927/tx4927.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * Author: MontaVista Software, Inc. | 2 | * Author: MontaVista Software, Inc. |
3 | * source@mvista.com | 3 | * source@mvista.com |
4 | * | 4 | * |
5 | * Copyright 2001-2002 MontaVista Software Inc. | 5 | * Copyright 2001-2006 MontaVista Software Inc. |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify it | 7 | * This program is free software; you can redistribute it and/or modify it |
8 | * under the terms of the GNU General Public License as published by the | 8 | * under the terms of the GNU General Public License as published by the |
@@ -30,10 +30,10 @@ | |||
30 | #include <asm/tx4927/tx4927_mips.h> | 30 | #include <asm/tx4927/tx4927_mips.h> |
31 | 31 | ||
32 | /* | 32 | /* |
33 | This register naming came from the intergrate cpu/controoler name TX4927 | 33 | This register naming came from the integrated CPU/controller name TX4927 |
34 | followed by the device name from table 4.2.2 on page 4-3 and then followed | 34 | followed by the device name from table 4.2.2 on page 4-3 and then followed |
35 | by the register name from table 4.2.3 on pages 4-4 to 4-8. The manaul | 35 | by the register name from table 4.2.3 on pages 4-4 to 4-8. The manaul |
36 | used is "TMPR4927BT Preliminary Rev 0.1 20.Jul.2001". | 36 | used was "TMPR4927BT Preliminary Rev 0.1 20.Jul.2001". |
37 | */ | 37 | */ |
38 | 38 | ||
39 | #define TX4927_SIO_0_BASE | 39 | #define TX4927_SIO_0_BASE |
@@ -251,8 +251,8 @@ | |||
251 | 251 | ||
252 | /* TX4927 Timer 0 (32-bit registers) */ | 252 | /* TX4927 Timer 0 (32-bit registers) */ |
253 | #define TX4927_TMR0_BASE 0xf000 | 253 | #define TX4927_TMR0_BASE 0xf000 |
254 | #define TX4927_TMR0_TMTCR0 0xf004 | 254 | #define TX4927_TMR0_TMTCR0 0xf000 |
255 | #define TX4927_TMR0_TMTISR0 0xf008 | 255 | #define TX4927_TMR0_TMTISR0 0xf004 |
256 | #define TX4927_TMR0_TMCPRA0 0xf008 | 256 | #define TX4927_TMR0_TMCPRA0 0xf008 |
257 | #define TX4927_TMR0_TMCPRB0 0xf00c | 257 | #define TX4927_TMR0_TMCPRB0 0xf00c |
258 | #define TX4927_TMR0_TMITMR0 0xf010 | 258 | #define TX4927_TMR0_TMITMR0 0xf010 |
@@ -264,8 +264,8 @@ | |||
264 | 264 | ||
265 | /* TX4927 Timer 1 (32-bit registers) */ | 265 | /* TX4927 Timer 1 (32-bit registers) */ |
266 | #define TX4927_TMR1_BASE 0xf100 | 266 | #define TX4927_TMR1_BASE 0xf100 |
267 | #define TX4927_TMR1_TMTCR1 0xf104 | 267 | #define TX4927_TMR1_TMTCR1 0xf100 |
268 | #define TX4927_TMR1_TMTISR1 0xf108 | 268 | #define TX4927_TMR1_TMTISR1 0xf104 |
269 | #define TX4927_TMR1_TMCPRA1 0xf108 | 269 | #define TX4927_TMR1_TMCPRA1 0xf108 |
270 | #define TX4927_TMR1_TMCPRB1 0xf10c | 270 | #define TX4927_TMR1_TMCPRB1 0xf10c |
271 | #define TX4927_TMR1_TMITMR1 0xf110 | 271 | #define TX4927_TMR1_TMITMR1 0xf110 |
@@ -277,13 +277,12 @@ | |||
277 | 277 | ||
278 | /* TX4927 Timer 2 (32-bit registers) */ | 278 | /* TX4927 Timer 2 (32-bit registers) */ |
279 | #define TX4927_TMR2_BASE 0xf200 | 279 | #define TX4927_TMR2_BASE 0xf200 |
280 | #define TX4927_TMR2_TMTCR2 0xf104 | 280 | #define TX4927_TMR2_TMTCR2 0xf200 |
281 | #define TX4927_TMR2_TMTISR2 0xf208 | 281 | #define TX4927_TMR2_TMTISR2 0xf204 |
282 | #define TX4927_TMR2_TMCPRA2 0xf208 | 282 | #define TX4927_TMR2_TMCPRA2 0xf208 |
283 | #define TX4927_TMR2_TMCPRB2 0xf20c | ||
284 | #define TX4927_TMR2_TMITMR2 0xf210 | 283 | #define TX4927_TMR2_TMITMR2 0xf210 |
285 | #define TX4927_TMR2_TMCCDR2 0xf220 | 284 | #define TX4927_TMR2_TMCCDR2 0xf220 |
286 | #define TX4927_TMR2_TMPGMR2 0xf230 | 285 | #define TX4927_TMR2_TMWTMR2 0xf240 |
287 | #define TX4927_TMR2_TMTRR2 0xf2f0 | 286 | #define TX4927_TMR2_TMTRR2 0xf2f0 |
288 | #define TX4927_TMR2_LIMIT 0xf2ff | 287 | #define TX4927_TMR2_LIMIT 0xf2ff |
289 | 288 | ||
diff --git a/include/asm-mips/tx4927/tx4927_pci.h b/include/asm-mips/tx4927/tx4927_pci.h index 165f6b8b217f..66c064690f41 100644 --- a/include/asm-mips/tx4927/tx4927_pci.h +++ b/include/asm-mips/tx4927/tx4927_pci.h | |||
@@ -253,6 +253,16 @@ struct tx4927_pcic_reg { | |||
253 | #define TX4927_CCFG_PCIDIVMODE_5 0x00001000 | 253 | #define TX4927_CCFG_PCIDIVMODE_5 0x00001000 |
254 | #define TX4927_CCFG_PCIDIVMODE_6 0x00001800 | 254 | #define TX4927_CCFG_PCIDIVMODE_6 0x00001800 |
255 | 255 | ||
256 | #define TX4937_CCFG_PCIDIVMODE_MASK 0x00001c00 | ||
257 | #define TX4937_CCFG_PCIDIVMODE_8 0x00000000 | ||
258 | #define TX4937_CCFG_PCIDIVMODE_4 0x00000400 | ||
259 | #define TX4937_CCFG_PCIDIVMODE_9 0x00000800 | ||
260 | #define TX4937_CCFG_PCIDIVMODE_4_5 0x00000c00 | ||
261 | #define TX4937_CCFG_PCIDIVMODE_10 0x00001000 | ||
262 | #define TX4937_CCFG_PCIDIVMODE_5 0x00001400 | ||
263 | #define TX4937_CCFG_PCIDIVMODE_11 0x00001800 | ||
264 | #define TX4937_CCFG_PCIDIVMODE_5_5 0x00001c00 | ||
265 | |||
256 | /* PCFG : Pin Configuration */ | 266 | /* PCFG : Pin Configuration */ |
257 | #define TX4927_PCFG_PCICLKEN_ALL 0x003f0000 | 267 | #define TX4927_PCFG_PCICLKEN_ALL 0x003f0000 |
258 | #define TX4927_PCFG_PCICLKEN(ch) (0x00010000<<(ch)) | 268 | #define TX4927_PCFG_PCICLKEN(ch) (0x00010000<<(ch)) |
diff --git a/include/asm-mips/uaccess.h b/include/asm-mips/uaccess.h index 41bb96bb2120..b96f3e0f3933 100644 --- a/include/asm-mips/uaccess.h +++ b/include/asm-mips/uaccess.h | |||
@@ -202,49 +202,49 @@ struct __large_struct { unsigned long buf[100]; }; | |||
202 | * Yuck. We need two variants, one for 64bit operation and one | 202 | * Yuck. We need two variants, one for 64bit operation and one |
203 | * for 32 bit mode and old iron. | 203 | * for 32 bit mode and old iron. |
204 | */ | 204 | */ |
205 | #ifdef __mips64 | 205 | #ifdef CONFIG_32BIT |
206 | #define __GET_USER_DW(ptr) __get_user_asm("ld", ptr) | 206 | #define __GET_USER_DW(val, ptr) __get_user_asm_ll32(val, ptr) |
207 | #else | 207 | #endif |
208 | #define __GET_USER_DW(ptr) __get_user_asm_ll32(ptr) | 208 | #ifdef CONFIG_64BIT |
209 | #define __GET_USER_DW(val, ptr) __get_user_asm(val, "ld", ptr) | ||
209 | #endif | 210 | #endif |
210 | 211 | ||
211 | #define __get_user_nocheck(x,ptr,size) \ | 212 | extern void __get_user_unknown(void); |
212 | ({ \ | 213 | |
213 | __typeof(*(ptr)) __gu_val = (__typeof(*(ptr))) 0; \ | 214 | #define __get_user_common(val, size, ptr) \ |
214 | long __gu_err = 0; \ | 215 | do { \ |
215 | \ | ||
216 | switch (size) { \ | 216 | switch (size) { \ |
217 | case 1: __get_user_asm("lb", ptr); break; \ | 217 | case 1: __get_user_asm(val, "lb", ptr); break; \ |
218 | case 2: __get_user_asm("lh", ptr); break; \ | 218 | case 2: __get_user_asm(val, "lh", ptr); break; \ |
219 | case 4: __get_user_asm("lw", ptr); break; \ | 219 | case 4: __get_user_asm(val, "lw", ptr); break; \ |
220 | case 8: __GET_USER_DW(ptr); break; \ | 220 | case 8: __GET_USER_DW(val, ptr); break; \ |
221 | default: __get_user_unknown(); break; \ | 221 | default: __get_user_unknown(); break; \ |
222 | } \ | 222 | } \ |
223 | (x) = (__typeof__(*(ptr))) __gu_val; \ | 223 | } while (0) |
224 | |||
225 | #define __get_user_nocheck(x,ptr,size) \ | ||
226 | ({ \ | ||
227 | long __gu_err; \ | ||
228 | \ | ||
229 | __get_user_common((x), size, ptr); \ | ||
224 | __gu_err; \ | 230 | __gu_err; \ |
225 | }) | 231 | }) |
226 | 232 | ||
227 | #define __get_user_check(x,ptr,size) \ | 233 | #define __get_user_check(x,ptr,size) \ |
228 | ({ \ | 234 | ({ \ |
229 | const __typeof__(*(ptr)) __user * __gu_addr = (ptr); \ | ||
230 | __typeof__(*(ptr)) __gu_val = 0; \ | ||
231 | long __gu_err = -EFAULT; \ | 235 | long __gu_err = -EFAULT; \ |
236 | const __typeof__(*(ptr)) __user * __gu_ptr = (ptr); \ | ||
237 | \ | ||
238 | if (likely(access_ok(VERIFY_READ, __gu_ptr, size))) \ | ||
239 | __get_user_common((x), size, __gu_ptr); \ | ||
232 | \ | 240 | \ |
233 | if (likely(access_ok(VERIFY_READ, __gu_addr, size))) { \ | ||
234 | switch (size) { \ | ||
235 | case 1: __get_user_asm("lb", __gu_addr); break; \ | ||
236 | case 2: __get_user_asm("lh", __gu_addr); break; \ | ||
237 | case 4: __get_user_asm("lw", __gu_addr); break; \ | ||
238 | case 8: __GET_USER_DW(__gu_addr); break; \ | ||
239 | default: __get_user_unknown(); break; \ | ||
240 | } \ | ||
241 | } \ | ||
242 | (x) = (__typeof__(*(ptr))) __gu_val; \ | ||
243 | __gu_err; \ | 241 | __gu_err; \ |
244 | }) | 242 | }) |
245 | 243 | ||
246 | #define __get_user_asm(insn, addr) \ | 244 | #define __get_user_asm(val, insn, addr) \ |
247 | { \ | 245 | { \ |
246 | long __gu_tmp; \ | ||
247 | \ | ||
248 | __asm__ __volatile__( \ | 248 | __asm__ __volatile__( \ |
249 | "1: " insn " %1, %3 \n" \ | 249 | "1: " insn " %1, %3 \n" \ |
250 | "2: \n" \ | 250 | "2: \n" \ |
@@ -255,15 +255,19 @@ struct __large_struct { unsigned long buf[100]; }; | |||
255 | " .section __ex_table,\"a\" \n" \ | 255 | " .section __ex_table,\"a\" \n" \ |
256 | " "__UA_ADDR "\t1b, 3b \n" \ | 256 | " "__UA_ADDR "\t1b, 3b \n" \ |
257 | " .previous \n" \ | 257 | " .previous \n" \ |
258 | : "=r" (__gu_err), "=r" (__gu_val) \ | 258 | : "=r" (__gu_err), "=r" (__gu_tmp) \ |
259 | : "0" (0), "o" (__m(addr)), "i" (-EFAULT)); \ | 259 | : "0" (0), "o" (__m(addr)), "i" (-EFAULT)); \ |
260 | \ | ||
261 | (val) = (__typeof__(*(addr))) __gu_tmp; \ | ||
260 | } | 262 | } |
261 | 263 | ||
262 | /* | 264 | /* |
263 | * Get a long long 64 using 32 bit registers. | 265 | * Get a long long 64 using 32 bit registers. |
264 | */ | 266 | */ |
265 | #define __get_user_asm_ll32(addr) \ | 267 | #define __get_user_asm_ll32(val, addr) \ |
266 | { \ | 268 | { \ |
269 | unsigned long long __gu_tmp; \ | ||
270 | \ | ||
267 | __asm__ __volatile__( \ | 271 | __asm__ __volatile__( \ |
268 | "1: lw %1, (%3) \n" \ | 272 | "1: lw %1, (%3) \n" \ |
269 | "2: lw %D1, 4(%3) \n" \ | 273 | "2: lw %D1, 4(%3) \n" \ |
@@ -278,21 +282,21 @@ struct __large_struct { unsigned long buf[100]; }; | |||
278 | " " __UA_ADDR " 1b, 4b \n" \ | 282 | " " __UA_ADDR " 1b, 4b \n" \ |
279 | " " __UA_ADDR " 2b, 4b \n" \ | 283 | " " __UA_ADDR " 2b, 4b \n" \ |
280 | " .previous \n" \ | 284 | " .previous \n" \ |
281 | : "=r" (__gu_err), "=&r" (__gu_val) \ | 285 | : "=r" (__gu_err), "=&r" (__gu_tmp) \ |
282 | : "0" (0), "r" (addr), "i" (-EFAULT)); \ | 286 | : "0" (0), "r" (addr), "i" (-EFAULT)); \ |
287 | (val) = (__typeof__(*(addr))) __gu_tmp; \ | ||
283 | } | 288 | } |
284 | 289 | ||
285 | extern void __get_user_unknown(void); | ||
286 | |||
287 | /* | 290 | /* |
288 | * Yuck. We need two variants, one for 64bit operation and one | 291 | * Yuck. We need two variants, one for 64bit operation and one |
289 | * for 32 bit mode and old iron. | 292 | * for 32 bit mode and old iron. |
290 | */ | 293 | */ |
291 | #ifdef __mips64 | 294 | #ifdef CONFIG_32BIT |
292 | #define __PUT_USER_DW(ptr) __put_user_asm("sd", ptr) | ||
293 | #else | ||
294 | #define __PUT_USER_DW(ptr) __put_user_asm_ll32(ptr) | 295 | #define __PUT_USER_DW(ptr) __put_user_asm_ll32(ptr) |
295 | #endif | 296 | #endif |
297 | #ifdef CONFIG_64BIT | ||
298 | #define __PUT_USER_DW(ptr) __put_user_asm("sd", ptr) | ||
299 | #endif | ||
296 | 300 | ||
297 | #define __put_user_nocheck(x,ptr,size) \ | 301 | #define __put_user_nocheck(x,ptr,size) \ |
298 | ({ \ | 302 | ({ \ |
diff --git a/include/asm-mips/unistd.h b/include/asm-mips/unistd.h index 89ea8b60e945..b5c78a4a0192 100644 --- a/include/asm-mips/unistd.h +++ b/include/asm-mips/unistd.h | |||
@@ -307,17 +307,33 @@ | |||
307 | #define __NR_inotify_init (__NR_Linux + 284) | 307 | #define __NR_inotify_init (__NR_Linux + 284) |
308 | #define __NR_inotify_add_watch (__NR_Linux + 285) | 308 | #define __NR_inotify_add_watch (__NR_Linux + 285) |
309 | #define __NR_inotify_rm_watch (__NR_Linux + 286) | 309 | #define __NR_inotify_rm_watch (__NR_Linux + 286) |
310 | 310 | #define __NR_migrate_pages (__NR_Linux + 287) | |
311 | #define __NR_openat (__NR_Linux + 288) | ||
312 | #define __NR_mkdirat (__NR_Linux + 289) | ||
313 | #define __NR_mknodat (__NR_Linux + 290) | ||
314 | #define __NR_fchownat (__NR_Linux + 291) | ||
315 | #define __NR_futimesat (__NR_Linux + 292) | ||
316 | #define __NR_fstatat (__NR_Linux + 293) | ||
317 | #define __NR_unlinkat (__NR_Linux + 294) | ||
318 | #define __NR_renameat (__NR_Linux + 295) | ||
319 | #define __NR_linkat (__NR_Linux + 296) | ||
320 | #define __NR_symlinkat (__NR_Linux + 297) | ||
321 | #define __NR_readlinkat (__NR_Linux + 298) | ||
322 | #define __NR_fchmodat (__NR_Linux + 299) | ||
323 | #define __NR_faccessat (__NR_Linux + 300) | ||
324 | #define __NR_pselect6 (__NR_Linux + 301) | ||
325 | #define __NR_ppoll (__NR_Linux + 302) | ||
326 | #define __NR_unshare (__NR_Linux + 303) | ||
311 | 327 | ||
312 | /* | 328 | /* |
313 | * Offset of the last Linux o32 flavoured syscall | 329 | * Offset of the last Linux o32 flavoured syscall |
314 | */ | 330 | */ |
315 | #define __NR_Linux_syscalls 286 | 331 | #define __NR_Linux_syscalls 303 |
316 | 332 | ||
317 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ | 333 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ |
318 | 334 | ||
319 | #define __NR_O32_Linux 4000 | 335 | #define __NR_O32_Linux 4000 |
320 | #define __NR_O32_Linux_syscalls 283 | 336 | #define __NR_O32_Linux_syscalls 303 |
321 | 337 | ||
322 | #if _MIPS_SIM == _MIPS_SIM_ABI64 | 338 | #if _MIPS_SIM == _MIPS_SIM_ABI64 |
323 | 339 | ||
@@ -571,16 +587,33 @@ | |||
571 | #define __NR_inotify_init (__NR_Linux + 243) | 587 | #define __NR_inotify_init (__NR_Linux + 243) |
572 | #define __NR_inotify_add_watch (__NR_Linux + 244) | 588 | #define __NR_inotify_add_watch (__NR_Linux + 244) |
573 | #define __NR_inotify_rm_watch (__NR_Linux + 245) | 589 | #define __NR_inotify_rm_watch (__NR_Linux + 245) |
590 | #define __NR_migrate_pages (__NR_Linux + 246) | ||
591 | #define __NR_openat (__NR_Linux + 247) | ||
592 | #define __NR_mkdirat (__NR_Linux + 248) | ||
593 | #define __NR_mknodat (__NR_Linux + 249) | ||
594 | #define __NR_fchownat (__NR_Linux + 250) | ||
595 | #define __NR_futimesat (__NR_Linux + 251) | ||
596 | #define __NR_fstatat (__NR_Linux + 252) | ||
597 | #define __NR_unlinkat (__NR_Linux + 253) | ||
598 | #define __NR_renameat (__NR_Linux + 254) | ||
599 | #define __NR_linkat (__NR_Linux + 255) | ||
600 | #define __NR_symlinkat (__NR_Linux + 256) | ||
601 | #define __NR_readlinkat (__NR_Linux + 257) | ||
602 | #define __NR_fchmodat (__NR_Linux + 258) | ||
603 | #define __NR_faccessat (__NR_Linux + 259) | ||
604 | #define __NR_pselect6 (__NR_Linux + 260) | ||
605 | #define __NR_ppoll (__NR_Linux + 261) | ||
606 | #define __NR_unshare (__NR_Linux + 262) | ||
574 | 607 | ||
575 | /* | 608 | /* |
576 | * Offset of the last Linux 64-bit flavoured syscall | 609 | * Offset of the last Linux 64-bit flavoured syscall |
577 | */ | 610 | */ |
578 | #define __NR_Linux_syscalls 245 | 611 | #define __NR_Linux_syscalls 262 |
579 | 612 | ||
580 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ | 613 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ |
581 | 614 | ||
582 | #define __NR_64_Linux 5000 | 615 | #define __NR_64_Linux 5000 |
583 | #define __NR_64_Linux_syscalls 242 | 616 | #define __NR_64_Linux_syscalls 262 |
584 | 617 | ||
585 | #if _MIPS_SIM == _MIPS_SIM_NABI32 | 618 | #if _MIPS_SIM == _MIPS_SIM_NABI32 |
586 | 619 | ||
@@ -838,16 +871,33 @@ | |||
838 | #define __NR_inotify_init (__NR_Linux + 247) | 871 | #define __NR_inotify_init (__NR_Linux + 247) |
839 | #define __NR_inotify_add_watch (__NR_Linux + 248) | 872 | #define __NR_inotify_add_watch (__NR_Linux + 248) |
840 | #define __NR_inotify_rm_watch (__NR_Linux + 249) | 873 | #define __NR_inotify_rm_watch (__NR_Linux + 249) |
874 | #define __NR_migrate_pages (__NR_Linux + 250) | ||
875 | #define __NR_openat (__NR_Linux + 251) | ||
876 | #define __NR_mkdirat (__NR_Linux + 252) | ||
877 | #define __NR_mknodat (__NR_Linux + 253) | ||
878 | #define __NR_fchownat (__NR_Linux + 254) | ||
879 | #define __NR_futimesat (__NR_Linux + 255) | ||
880 | #define __NR_fstatat (__NR_Linux + 256) | ||
881 | #define __NR_unlinkat (__NR_Linux + 257) | ||
882 | #define __NR_renameat (__NR_Linux + 258) | ||
883 | #define __NR_linkat (__NR_Linux + 259) | ||
884 | #define __NR_symlinkat (__NR_Linux + 260) | ||
885 | #define __NR_readlinkat (__NR_Linux + 261) | ||
886 | #define __NR_fchmodat (__NR_Linux + 262) | ||
887 | #define __NR_faccessat (__NR_Linux + 263) | ||
888 | #define __NR_pselect6 (__NR_Linux + 264) | ||
889 | #define __NR_ppoll (__NR_Linux + 265) | ||
890 | #define __NR_unshare (__NR_Linux + 266) | ||
841 | 891 | ||
842 | /* | 892 | /* |
843 | * Offset of the last N32 flavoured syscall | 893 | * Offset of the last N32 flavoured syscall |
844 | */ | 894 | */ |
845 | #define __NR_Linux_syscalls 249 | 895 | #define __NR_Linux_syscalls 266 |
846 | 896 | ||
847 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ | 897 | #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ |
848 | 898 | ||
849 | #define __NR_N32_Linux 6000 | 899 | #define __NR_N32_Linux 6000 |
850 | #define __NR_N32_Linux_syscalls 246 | 900 | #define __NR_N32_Linux_syscalls 266 |
851 | 901 | ||
852 | #ifndef __ASSEMBLY__ | 902 | #ifndef __ASSEMBLY__ |
853 | 903 | ||
@@ -1134,10 +1184,8 @@ type name (atype a,btype b,ctype c,dtype d,etype e,ftype f) \ | |||
1134 | #define __ARCH_WANT_SYS_SIGPENDING | 1184 | #define __ARCH_WANT_SYS_SIGPENDING |
1135 | #define __ARCH_WANT_SYS_SIGPROCMASK | 1185 | #define __ARCH_WANT_SYS_SIGPROCMASK |
1136 | #define __ARCH_WANT_SYS_RT_SIGACTION | 1186 | #define __ARCH_WANT_SYS_RT_SIGACTION |
1137 | # ifndef __mips64 | ||
1138 | # define __ARCH_WANT_STAT64 | ||
1139 | # endif | ||
1140 | # ifdef CONFIG_32BIT | 1187 | # ifdef CONFIG_32BIT |
1188 | # define __ARCH_WANT_STAT64 | ||
1141 | # define __ARCH_WANT_SYS_TIME | 1189 | # define __ARCH_WANT_SYS_TIME |
1142 | # endif | 1190 | # endif |
1143 | # ifdef CONFIG_MIPS32_O32 | 1191 | # ifdef CONFIG_MIPS32_O32 |
diff --git a/include/asm-mips/vga.h b/include/asm-mips/vga.h index ca5cec97e167..34755c0a6398 100644 --- a/include/asm-mips/vga.h +++ b/include/asm-mips/vga.h | |||
@@ -26,6 +26,9 @@ | |||
26 | * <linux/vt_buffer.h> has already done the right job for us. | 26 | * <linux/vt_buffer.h> has already done the right job for us. |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #undef scr_writew | ||
30 | #undef scr_readw | ||
31 | |||
29 | static inline void scr_writew(u16 val, volatile u16 *addr) | 32 | static inline void scr_writew(u16 val, volatile u16 *addr) |
30 | { | 33 | { |
31 | *addr = cpu_to_le16(val); | 34 | *addr = cpu_to_le16(val); |
diff --git a/include/asm-parisc/atomic.h b/include/asm-parisc/atomic.h index 2ca56d34aaad..4dc7253ff5d0 100644 --- a/include/asm-parisc/atomic.h +++ b/include/asm-parisc/atomic.h | |||
@@ -1,9 +1,13 @@ | |||
1 | /* Copyright (C) 2000 Philipp Rumpf <prumpf@tux.org> | ||
2 | * Copyright (C) 2006 Kyle McMartin <kyle@parisc-linux.org> | ||
3 | */ | ||
4 | |||
1 | #ifndef _ASM_PARISC_ATOMIC_H_ | 5 | #ifndef _ASM_PARISC_ATOMIC_H_ |
2 | #define _ASM_PARISC_ATOMIC_H_ | 6 | #define _ASM_PARISC_ATOMIC_H_ |
3 | 7 | ||
4 | #include <linux/config.h> | 8 | #include <linux/config.h> |
9 | #include <linux/types.h> | ||
5 | #include <asm/system.h> | 10 | #include <asm/system.h> |
6 | /* Copyright (C) 2000 Philipp Rumpf <prumpf@tux.org>. */ | ||
7 | 11 | ||
8 | /* | 12 | /* |
9 | * Atomic operations that C can't guarantee us. Useful for | 13 | * Atomic operations that C can't guarantee us. Useful for |
@@ -46,15 +50,6 @@ extern raw_spinlock_t __atomic_hash[ATOMIC_HASH_SIZE] __lock_aligned; | |||
46 | # define _atomic_spin_unlock_irqrestore(l,f) do { local_irq_restore(f); } while (0) | 50 | # define _atomic_spin_unlock_irqrestore(l,f) do { local_irq_restore(f); } while (0) |
47 | #endif | 51 | #endif |
48 | 52 | ||
49 | /* Note that we need not lock read accesses - aligned word writes/reads | ||
50 | * are atomic, so a reader never sees unconsistent values. | ||
51 | * | ||
52 | * Cache-line alignment would conflict with, for example, linux/module.h | ||
53 | */ | ||
54 | |||
55 | typedef struct { volatile int counter; } atomic_t; | ||
56 | |||
57 | |||
58 | /* This should get optimized out since it's never called. | 53 | /* This should get optimized out since it's never called. |
59 | ** Or get a link error if xchg is used "wrong". | 54 | ** Or get a link error if xchg is used "wrong". |
60 | */ | 55 | */ |
@@ -69,10 +64,9 @@ extern unsigned long __xchg64(unsigned long, unsigned long *); | |||
69 | #endif | 64 | #endif |
70 | 65 | ||
71 | /* optimizer better get rid of switch since size is a constant */ | 66 | /* optimizer better get rid of switch since size is a constant */ |
72 | static __inline__ unsigned long __xchg(unsigned long x, __volatile__ void * ptr, | 67 | static __inline__ unsigned long |
73 | int size) | 68 | __xchg(unsigned long x, __volatile__ void * ptr, int size) |
74 | { | 69 | { |
75 | |||
76 | switch(size) { | 70 | switch(size) { |
77 | #ifdef __LP64__ | 71 | #ifdef __LP64__ |
78 | case 8: return __xchg64(x,(unsigned long *) ptr); | 72 | case 8: return __xchg64(x,(unsigned long *) ptr); |
@@ -129,7 +123,13 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new_, int size) | |||
129 | (unsigned long)_n_, sizeof(*(ptr))); \ | 123 | (unsigned long)_n_, sizeof(*(ptr))); \ |
130 | }) | 124 | }) |
131 | 125 | ||
126 | /* Note that we need not lock read accesses - aligned word writes/reads | ||
127 | * are atomic, so a reader never sees unconsistent values. | ||
128 | * | ||
129 | * Cache-line alignment would conflict with, for example, linux/module.h | ||
130 | */ | ||
132 | 131 | ||
132 | typedef struct { volatile int counter; } atomic_t; | ||
133 | 133 | ||
134 | /* It's possible to reduce all atomic operations to either | 134 | /* It's possible to reduce all atomic operations to either |
135 | * __atomic_add_return, atomic_set and atomic_read (the latter | 135 | * __atomic_add_return, atomic_set and atomic_read (the latter |
@@ -210,12 +210,66 @@ static __inline__ int atomic_read(const atomic_t *v) | |||
210 | 210 | ||
211 | #define atomic_dec_and_test(v) (atomic_dec_return(v) == 0) | 211 | #define atomic_dec_and_test(v) (atomic_dec_return(v) == 0) |
212 | 212 | ||
213 | #define ATOMIC_INIT(i) { (i) } | 213 | #define ATOMIC_INIT(i) ((atomic_t) { (i) }) |
214 | 214 | ||
215 | #define smp_mb__before_atomic_dec() smp_mb() | 215 | #define smp_mb__before_atomic_dec() smp_mb() |
216 | #define smp_mb__after_atomic_dec() smp_mb() | 216 | #define smp_mb__after_atomic_dec() smp_mb() |
217 | #define smp_mb__before_atomic_inc() smp_mb() | 217 | #define smp_mb__before_atomic_inc() smp_mb() |
218 | #define smp_mb__after_atomic_inc() smp_mb() | 218 | #define smp_mb__after_atomic_inc() smp_mb() |
219 | 219 | ||
220 | #ifdef __LP64__ | ||
221 | |||
222 | typedef struct { volatile s64 counter; } atomic64_t; | ||
223 | |||
224 | #define ATOMIC64_INIT(i) ((atomic64_t) { (i) }) | ||
225 | |||
226 | static __inline__ int | ||
227 | __atomic64_add_return(s64 i, atomic64_t *v) | ||
228 | { | ||
229 | int ret; | ||
230 | unsigned long flags; | ||
231 | _atomic_spin_lock_irqsave(v, flags); | ||
232 | |||
233 | ret = (v->counter += i); | ||
234 | |||
235 | _atomic_spin_unlock_irqrestore(v, flags); | ||
236 | return ret; | ||
237 | } | ||
238 | |||
239 | static __inline__ void | ||
240 | atomic64_set(atomic64_t *v, s64 i) | ||
241 | { | ||
242 | unsigned long flags; | ||
243 | _atomic_spin_lock_irqsave(v, flags); | ||
244 | |||
245 | v->counter = i; | ||
246 | |||
247 | _atomic_spin_unlock_irqrestore(v, flags); | ||
248 | } | ||
249 | |||
250 | static __inline__ s64 | ||
251 | atomic64_read(const atomic64_t *v) | ||
252 | { | ||
253 | return v->counter; | ||
254 | } | ||
255 | |||
256 | #define atomic64_add(i,v) ((void)(__atomic64_add_return( ((s64)i),(v)))) | ||
257 | #define atomic64_sub(i,v) ((void)(__atomic64_add_return(-((s64)i),(v)))) | ||
258 | #define atomic64_inc(v) ((void)(__atomic64_add_return( 1,(v)))) | ||
259 | #define atomic64_dec(v) ((void)(__atomic64_add_return( -1,(v)))) | ||
260 | |||
261 | #define atomic64_add_return(i,v) (__atomic64_add_return( ((s64)i),(v))) | ||
262 | #define atomic64_sub_return(i,v) (__atomic64_add_return(-((s64)i),(v))) | ||
263 | #define atomic64_inc_return(v) (__atomic64_add_return( 1,(v))) | ||
264 | #define atomic64_dec_return(v) (__atomic64_add_return( -1,(v))) | ||
265 | |||
266 | #define atomic64_add_negative(a, v) (atomic64_add_return((a), (v)) < 0) | ||
267 | |||
268 | #define atomic64_inc_and_test(v) (atomic64_inc_return(v) == 0) | ||
269 | #define atomic64_dec_and_test(v) (atomic64_dec_return(v) == 0) | ||
270 | |||
271 | #endif /* __LP64__ */ | ||
272 | |||
220 | #include <asm-generic/atomic.h> | 273 | #include <asm-generic/atomic.h> |
221 | #endif | 274 | |
275 | #endif /* _ASM_PARISC_ATOMIC_H_ */ | ||
diff --git a/include/asm-parisc/cacheflush.h b/include/asm-parisc/cacheflush.h index 1bc3c83ee74b..c53af9ff41b5 100644 --- a/include/asm-parisc/cacheflush.h +++ b/include/asm-parisc/cacheflush.h | |||
@@ -183,4 +183,10 @@ flush_cache_page(struct vm_area_struct *vma, unsigned long vmaddr, unsigned long | |||
183 | __flush_cache_page(vma, vmaddr); | 183 | __flush_cache_page(vma, vmaddr); |
184 | 184 | ||
185 | } | 185 | } |
186 | |||
187 | #ifdef CONFIG_DEBUG_RODATA | ||
188 | void mark_rodata_ro(void); | ||
186 | #endif | 189 | #endif |
190 | |||
191 | #endif /* _PARISC_CACHEFLUSH_H */ | ||
192 | |||
diff --git a/include/asm-parisc/compat_ucontext.h b/include/asm-parisc/compat_ucontext.h index a1228a3d2071..2f7292afde3c 100644 --- a/include/asm-parisc/compat_ucontext.h +++ b/include/asm-parisc/compat_ucontext.h | |||
@@ -1,8 +1,7 @@ | |||
1 | #ifndef _ASM_PARISC_COMPAT_UCONTEXT_H | 1 | #ifndef _ASM_PARISC_COMPAT_UCONTEXT_H |
2 | #define _ASM_PARISC_COMPAT_UCONTEXT_H | 2 | #define _ASM_PARISC_COMPAT_UCONTEXT_H |
3 | 3 | ||
4 | #include<linux/compat.h> | 4 | #include <linux/compat.h> |
5 | #include<asm/compat_signal.h> | ||
6 | 5 | ||
7 | /* 32-bit ucontext as seen from an 64-bit kernel */ | 6 | /* 32-bit ucontext as seen from an 64-bit kernel */ |
8 | struct compat_ucontext { | 7 | struct compat_ucontext { |
diff --git a/include/asm-parisc/grfioctl.h b/include/asm-parisc/grfioctl.h index 6a910311b56b..671e06042b40 100644 --- a/include/asm-parisc/grfioctl.h +++ b/include/asm-parisc/grfioctl.h | |||
@@ -58,7 +58,7 @@ | |||
58 | #define CRT_ID_ELK_1024DB 0x27849CA5 /* Elk 1024x768 double buffer */ | 58 | #define CRT_ID_ELK_1024DB 0x27849CA5 /* Elk 1024x768 double buffer */ |
59 | #define CRT_ID_ELK_GS S9000_ID_A1924A /* Elk 1280x1024 GreyScale */ | 59 | #define CRT_ID_ELK_GS S9000_ID_A1924A /* Elk 1280x1024 GreyScale */ |
60 | #define CRT_ID_CRX24 S9000_ID_A1439A /* Piranha */ | 60 | #define CRT_ID_CRX24 S9000_ID_A1439A /* Piranha */ |
61 | #define CRT_ID_VISUALIZE_EG 0x2D08C0A7 /* Graffiti (built-in B132+/B160L) */ | 61 | #define CRT_ID_VISUALIZE_EG 0x2D08C0A7 /* Graffiti, A4450A (built-in B132+/B160L) */ |
62 | #define CRT_ID_THUNDER 0x2F23E5FC /* Thunder 1 VISUALIZE 48*/ | 62 | #define CRT_ID_THUNDER 0x2F23E5FC /* Thunder 1 VISUALIZE 48*/ |
63 | #define CRT_ID_THUNDER2 0x2F8D570E /* Thunder 2 VISUALIZE 48 XP*/ | 63 | #define CRT_ID_THUNDER2 0x2F8D570E /* Thunder 2 VISUALIZE 48 XP*/ |
64 | #define CRT_ID_HCRX S9000_ID_HCRX /* Hyperdrive HCRX */ | 64 | #define CRT_ID_HCRX S9000_ID_HCRX /* Hyperdrive HCRX */ |
diff --git a/include/asm-parisc/mman.h b/include/asm-parisc/mman.h index 736b0abcac05..0ef15ee0f17e 100644 --- a/include/asm-parisc/mman.h +++ b/include/asm-parisc/mman.h | |||
@@ -38,7 +38,11 @@ | |||
38 | #define MADV_SPACEAVAIL 5 /* insure that resources are reserved */ | 38 | #define MADV_SPACEAVAIL 5 /* insure that resources are reserved */ |
39 | #define MADV_VPS_PURGE 6 /* Purge pages from VM page cache */ | 39 | #define MADV_VPS_PURGE 6 /* Purge pages from VM page cache */ |
40 | #define MADV_VPS_INHERIT 7 /* Inherit parents page size */ | 40 | #define MADV_VPS_INHERIT 7 /* Inherit parents page size */ |
41 | #define MADV_REMOVE 8 /* remove these pages & resources */ | 41 | |
42 | /* common/generic parameters */ | ||
43 | #define MADV_REMOVE 9 /* remove these pages & resources */ | ||
44 | #define MADV_DONTFORK 10 /* don't inherit across fork */ | ||
45 | #define MADV_DOFORK 11 /* do inherit across fork */ | ||
42 | 46 | ||
43 | /* The range 12-64 is reserved for page size specification. */ | 47 | /* The range 12-64 is reserved for page size specification. */ |
44 | #define MADV_4K_PAGES 12 /* Use 4K pages */ | 48 | #define MADV_4K_PAGES 12 /* Use 4K pages */ |
diff --git a/include/asm-parisc/pci.h b/include/asm-parisc/pci.h index f277254159b7..fe7f6a2f5aa7 100644 --- a/include/asm-parisc/pci.h +++ b/include/asm-parisc/pci.h | |||
@@ -18,6 +18,18 @@ | |||
18 | */ | 18 | */ |
19 | #define PCI_MAX_BUSSES 256 | 19 | #define PCI_MAX_BUSSES 256 |
20 | 20 | ||
21 | |||
22 | /* To be used as: mdelay(pci_post_reset_delay); | ||
23 | * | ||
24 | * post_reset is the time the kernel should stall to prevent anyone from | ||
25 | * accessing the PCI bus once #RESET is de-asserted. | ||
26 | * PCI spec somewhere says 1 second but with multi-PCI bus systems, | ||
27 | * this makes the boot time much longer than necessary. | ||
28 | * 20ms seems to work for all the HP PCI implementations to date. | ||
29 | */ | ||
30 | #define pci_post_reset_delay 50 | ||
31 | |||
32 | |||
21 | /* | 33 | /* |
22 | ** pci_hba_data (aka H2P_OBJECT in HP/UX) | 34 | ** pci_hba_data (aka H2P_OBJECT in HP/UX) |
23 | ** | 35 | ** |
@@ -83,7 +95,7 @@ static __inline__ int pci_is_lmmio(struct pci_hba_data *hba, unsigned long a) | |||
83 | 95 | ||
84 | /* | 96 | /* |
85 | ** Convert between PCI (IO_VIEW) addresses and processor (PA_VIEW) addresses. | 97 | ** Convert between PCI (IO_VIEW) addresses and processor (PA_VIEW) addresses. |
86 | ** See pcibios.c for more conversions used by Generic PCI code. | 98 | ** See pci.c for more conversions used by Generic PCI code. |
87 | ** | 99 | ** |
88 | ** Platform characteristics/firmware guarantee that | 100 | ** Platform characteristics/firmware guarantee that |
89 | ** (1) PA_VIEW - IO_VIEW = lmmio_offset for both LMMIO and ELMMIO | 101 | ** (1) PA_VIEW - IO_VIEW = lmmio_offset for both LMMIO and ELMMIO |
@@ -191,9 +203,6 @@ struct pci_bios_ops { | |||
191 | */ | 203 | */ |
192 | extern struct pci_port_ops *pci_port; | 204 | extern struct pci_port_ops *pci_port; |
193 | extern struct pci_bios_ops *pci_bios; | 205 | extern struct pci_bios_ops *pci_bios; |
194 | extern int pci_post_reset_delay; /* delay after de-asserting #RESET */ | ||
195 | extern int pci_hba_count; | ||
196 | extern struct pci_hba_data *parisc_pci_hba[]; | ||
197 | 206 | ||
198 | #ifdef CONFIG_PCI | 207 | #ifdef CONFIG_PCI |
199 | extern void pcibios_register_hba(struct pci_hba_data *); | 208 | extern void pcibios_register_hba(struct pci_hba_data *); |
diff --git a/include/asm-parisc/pgalloc.h b/include/asm-parisc/pgalloc.h index 6291d6692e5d..3122fad38a1b 100644 --- a/include/asm-parisc/pgalloc.h +++ b/include/asm-parisc/pgalloc.h | |||
@@ -137,7 +137,6 @@ static inline void pte_free_kernel(pte_t *pte) | |||
137 | 137 | ||
138 | #define pte_free(page) pte_free_kernel(page_address(page)) | 138 | #define pte_free(page) pte_free_kernel(page_address(page)) |
139 | 139 | ||
140 | extern int do_check_pgt_cache(int, int); | ||
141 | #define check_pgt_cache() do { } while (0) | 140 | #define check_pgt_cache() do { } while (0) |
142 | 141 | ||
143 | #endif | 142 | #endif |
diff --git a/include/asm-parisc/pgtable.h b/include/asm-parisc/pgtable.h index b4554711c3e7..4e34c6b44059 100644 --- a/include/asm-parisc/pgtable.h +++ b/include/asm-parisc/pgtable.h | |||
@@ -213,7 +213,7 @@ extern void *vmalloc_start; | |||
213 | #define PAGE_COPY PAGE_EXECREAD | 213 | #define PAGE_COPY PAGE_EXECREAD |
214 | #define PAGE_RWX __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_READ | _PAGE_WRITE | _PAGE_EXEC |_PAGE_ACCESSED) | 214 | #define PAGE_RWX __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_READ | _PAGE_WRITE | _PAGE_EXEC |_PAGE_ACCESSED) |
215 | #define PAGE_KERNEL __pgprot(_PAGE_KERNEL) | 215 | #define PAGE_KERNEL __pgprot(_PAGE_KERNEL) |
216 | #define PAGE_KERNEL_RO __pgprot(_PAGE_PRESENT | _PAGE_EXEC | _PAGE_READ | _PAGE_DIRTY | _PAGE_ACCESSED) | 216 | #define PAGE_KERNEL_RO __pgprot(_PAGE_KERNEL & ~_PAGE_WRITE) |
217 | #define PAGE_KERNEL_UNC __pgprot(_PAGE_KERNEL | _PAGE_NO_CACHE) | 217 | #define PAGE_KERNEL_UNC __pgprot(_PAGE_KERNEL | _PAGE_NO_CACHE) |
218 | #define PAGE_GATEWAY __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED | _PAGE_GATEWAY| _PAGE_READ) | 218 | #define PAGE_GATEWAY __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED | _PAGE_GATEWAY| _PAGE_READ) |
219 | #define PAGE_FLUSH __pgprot(_PAGE_FLUSH) | 219 | #define PAGE_FLUSH __pgprot(_PAGE_FLUSH) |
diff --git a/include/asm-parisc/rt_sigframe.h b/include/asm-parisc/rt_sigframe.h index 5623c032b64c..f0dd3b30f6c4 100644 --- a/include/asm-parisc/rt_sigframe.h +++ b/include/asm-parisc/rt_sigframe.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef _ASM_PARISC_RT_SIGFRAME_H | 1 | #ifndef _ASM_PARISC_RT_SIGFRAME_H |
2 | #define _ASM_PARISC_RT_SIGFRAME_H | 2 | #define _ASM_PARISC_RT_SIGFRAME_H |
3 | 3 | ||
4 | #ifdef CONFIG_COMPAT | ||
5 | #include <asm/compat_rt_sigframe.h> | ||
6 | #endif | ||
7 | |||
8 | #define SIGRETURN_TRAMP 4 | 4 | #define SIGRETURN_TRAMP 4 |
9 | #define SIGRESTARTBLOCK_TRAMP 5 | 5 | #define SIGRESTARTBLOCK_TRAMP 5 |
10 | #define TRAMP_SIZE (SIGRETURN_TRAMP + SIGRESTARTBLOCK_TRAMP) | 6 | #define TRAMP_SIZE (SIGRETURN_TRAMP + SIGRESTARTBLOCK_TRAMP) |
diff --git a/include/asm-parisc/unistd.h b/include/asm-parisc/unistd.h index 80b7b98c70a1..c56fccbf34ad 100644 --- a/include/asm-parisc/unistd.h +++ b/include/asm-parisc/unistd.h | |||
@@ -761,8 +761,27 @@ | |||
761 | #define __NR_keyctl (__NR_Linux + 266) | 761 | #define __NR_keyctl (__NR_Linux + 266) |
762 | #define __NR_ioprio_set (__NR_Linux + 267) | 762 | #define __NR_ioprio_set (__NR_Linux + 267) |
763 | #define __NR_ioprio_get (__NR_Linux + 268) | 763 | #define __NR_ioprio_get (__NR_Linux + 268) |
764 | #define __NR_inotify_init (__NR_Linux + 269) | ||
765 | #define __NR_inotify_add_watch (__NR_Linux + 270) | ||
766 | #define __NR_inotify_rm_watch (__NR_Linux + 271) | ||
767 | #define __NR_migrate_pages (__NR_Linux + 272) | ||
768 | #define __NR_pselect6 (__NR_Linux + 273) | ||
769 | #define __NR_ppoll (__NR_Linux + 274) | ||
770 | #define __NR_openat (__NR_Linux + 275) | ||
771 | #define __NR_mkdirat (__NR_Linux + 276) | ||
772 | #define __NR_mknodat (__NR_Linux + 277) | ||
773 | #define __NR_fchownat (__NR_Linux + 278) | ||
774 | #define __NR_futimesat (__NR_Linux + 279) | ||
775 | #define __NR_newfstatat (__NR_Linux + 280) | ||
776 | #define __NR_unlinkat (__NR_Linux + 281) | ||
777 | #define __NR_renameat (__NR_Linux + 282) | ||
778 | #define __NR_linkat (__NR_Linux + 283) | ||
779 | #define __NR_symlinkat (__NR_Linux + 284) | ||
780 | #define __NR_readlinkat (__NR_Linux + 285) | ||
781 | #define __NR_fchmodat (__NR_Linux + 286) | ||
782 | #define __NR_faccessat (__NR_Linux + 287) | ||
764 | 783 | ||
765 | #define __NR_Linux_syscalls 269 | 784 | #define __NR_Linux_syscalls 288 |
766 | 785 | ||
767 | #define HPUX_GATEWAY_ADDR 0xC0000004 | 786 | #define HPUX_GATEWAY_ADDR 0xC0000004 |
768 | #define LINUX_GATEWAY_ADDR 0x100 | 787 | #define LINUX_GATEWAY_ADDR 0x100 |
diff --git a/include/asm-powerpc/compat.h b/include/asm-powerpc/compat.h index accb80c9a339..aacaabd28ac1 100644 --- a/include/asm-powerpc/compat.h +++ b/include/asm-powerpc/compat.h | |||
@@ -126,6 +126,11 @@ static inline void __user *compat_ptr(compat_uptr_t uptr) | |||
126 | return (void __user *)(unsigned long)uptr; | 126 | return (void __user *)(unsigned long)uptr; |
127 | } | 127 | } |
128 | 128 | ||
129 | static inline compat_uptr_t ptr_to_compat(void __user *uptr) | ||
130 | { | ||
131 | return (u32)(unsigned long)uptr; | ||
132 | } | ||
133 | |||
129 | static inline void __user *compat_alloc_user_space(long len) | 134 | static inline void __user *compat_alloc_user_space(long len) |
130 | { | 135 | { |
131 | struct pt_regs *regs = current->thread.regs; | 136 | struct pt_regs *regs = current->thread.regs; |
diff --git a/include/asm-powerpc/cputable.h b/include/asm-powerpc/cputable.h index 64210549f56b..5638518968c3 100644 --- a/include/asm-powerpc/cputable.h +++ b/include/asm-powerpc/cputable.h | |||
@@ -20,6 +20,8 @@ | |||
20 | #define PPC_FEATURE_POWER5_PLUS 0x00020000 | 20 | #define PPC_FEATURE_POWER5_PLUS 0x00020000 |
21 | #define PPC_FEATURE_CELL 0x00010000 | 21 | #define PPC_FEATURE_CELL 0x00010000 |
22 | #define PPC_FEATURE_BOOKE 0x00008000 | 22 | #define PPC_FEATURE_BOOKE 0x00008000 |
23 | #define PPC_FEATURE_SMT 0x00004000 | ||
24 | #define PPC_FEATURE_ICACHE_SNOOP 0x00002000 | ||
23 | 25 | ||
24 | #ifdef __KERNEL__ | 26 | #ifdef __KERNEL__ |
25 | #ifndef __ASSEMBLY__ | 27 | #ifndef __ASSEMBLY__ |
@@ -159,9 +161,11 @@ extern void do_cpu_ftr_fixups(unsigned long offset); | |||
159 | #endif | 161 | #endif |
160 | 162 | ||
161 | /* We need to mark all pages as being coherent if we're SMP or we | 163 | /* We need to mark all pages as being coherent if we're SMP or we |
162 | * have a 74[45]x and an MPC107 host bridge. | 164 | * have a 74[45]x and an MPC107 host bridge. Also 83xx requires |
165 | * it for PCI "streaming/prefetch" to work properly. | ||
163 | */ | 166 | */ |
164 | #if defined(CONFIG_SMP) || defined(CONFIG_MPC10X_BRIDGE) | 167 | #if defined(CONFIG_SMP) || defined(CONFIG_MPC10X_BRIDGE) \ |
168 | || defined(CONFIG_PPC_83xx) | ||
165 | #define CPU_FTR_COMMON CPU_FTR_NEED_COHERENT | 169 | #define CPU_FTR_COMMON CPU_FTR_NEED_COHERENT |
166 | #else | 170 | #else |
167 | #define CPU_FTR_COMMON 0 | 171 | #define CPU_FTR_COMMON 0 |
@@ -277,7 +281,8 @@ enum { | |||
277 | CPU_FTRS_G2_LE = CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | | 281 | CPU_FTRS_G2_LE = CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | |
278 | CPU_FTR_USE_TB | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_HAS_HIGH_BATS, | 282 | CPU_FTR_USE_TB | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_HAS_HIGH_BATS, |
279 | CPU_FTRS_E300 = CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | | 283 | CPU_FTRS_E300 = CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | |
280 | CPU_FTR_USE_TB | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_HAS_HIGH_BATS, | 284 | CPU_FTR_USE_TB | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_HAS_HIGH_BATS | |
285 | CPU_FTR_COMMON, | ||
281 | CPU_FTRS_CLASSIC32 = CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | | 286 | CPU_FTRS_CLASSIC32 = CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | |
282 | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE, | 287 | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE, |
283 | CPU_FTRS_POWER3_32 = CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | | 288 | CPU_FTRS_POWER3_32 = CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | |
diff --git a/include/asm-powerpc/dma-mapping.h b/include/asm-powerpc/dma-mapping.h index 837756ab7dc7..2ac63f569592 100644 --- a/include/asm-powerpc/dma-mapping.h +++ b/include/asm-powerpc/dma-mapping.h | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/mm.h> | 15 | #include <linux/mm.h> |
16 | #include <asm/scatterlist.h> | 16 | #include <asm/scatterlist.h> |
17 | #include <asm/io.h> | 17 | #include <asm/io.h> |
18 | #include <asm/bug.h> | ||
19 | 18 | ||
20 | #define DMA_ERROR_CODE (~(dma_addr_t)0x0) | 19 | #define DMA_ERROR_CODE (~(dma_addr_t)0x0) |
21 | 20 | ||
diff --git a/include/asm-powerpc/eeh.h b/include/asm-powerpc/eeh.h index b263fb2fa6e4..5207758a6dd9 100644 --- a/include/asm-powerpc/eeh.h +++ b/include/asm-powerpc/eeh.h | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/string.h> | 27 | #include <linux/string.h> |
28 | 28 | ||
29 | struct pci_dev; | 29 | struct pci_dev; |
30 | struct pci_bus; | ||
30 | struct device_node; | 31 | struct device_node; |
31 | 32 | ||
32 | #ifdef CONFIG_EEH | 33 | #ifdef CONFIG_EEH |
@@ -60,8 +61,9 @@ void __init pci_addr_cache_build(void); | |||
60 | * to finish the eeh setup for this device. | 61 | * to finish the eeh setup for this device. |
61 | */ | 62 | */ |
62 | void eeh_add_device_early(struct device_node *); | 63 | void eeh_add_device_early(struct device_node *); |
64 | void eeh_add_device_late(struct pci_dev *dev); | ||
63 | void eeh_add_device_tree_early(struct device_node *); | 65 | void eeh_add_device_tree_early(struct device_node *); |
64 | void eeh_add_device_late(struct pci_dev *); | 66 | void eeh_add_device_tree_late(struct pci_bus *); |
65 | 67 | ||
66 | /** | 68 | /** |
67 | * eeh_remove_device - undo EEH setup for the indicated pci device | 69 | * eeh_remove_device - undo EEH setup for the indicated pci device |
@@ -122,6 +124,8 @@ static inline void eeh_remove_device(struct pci_dev *dev) { } | |||
122 | 124 | ||
123 | static inline void eeh_add_device_tree_early(struct device_node *dn) { } | 125 | static inline void eeh_add_device_tree_early(struct device_node *dn) { } |
124 | 126 | ||
127 | static inline void eeh_add_device_tree_late(struct pci_bus *bus) { } | ||
128 | |||
125 | static inline void eeh_remove_bus_device(struct pci_dev *dev) { } | 129 | static inline void eeh_remove_bus_device(struct pci_dev *dev) { } |
126 | #define EEH_POSSIBLE_ERROR(val, type) (0) | 130 | #define EEH_POSSIBLE_ERROR(val, type) (0) |
127 | #define EEH_IO_ERROR_VALUE(size) (-1UL) | 131 | #define EEH_IO_ERROR_VALUE(size) (-1UL) |
diff --git a/include/asm-powerpc/kexec.h b/include/asm-powerpc/kexec.h index 640a6459f2f4..6a2af2f6853b 100644 --- a/include/asm-powerpc/kexec.h +++ b/include/asm-powerpc/kexec.h | |||
@@ -33,6 +33,7 @@ | |||
33 | 33 | ||
34 | #ifdef CONFIG_KEXEC | 34 | #ifdef CONFIG_KEXEC |
35 | 35 | ||
36 | #ifndef __ASSEMBLY__ | ||
36 | #ifdef __powerpc64__ | 37 | #ifdef __powerpc64__ |
37 | /* | 38 | /* |
38 | * This function is responsible for capturing register states if coming | 39 | * This function is responsible for capturing register states if coming |
@@ -92,7 +93,8 @@ static inline void crash_setup_regs(struct pt_regs *newregs, | |||
92 | "mfxer %0\n" | 93 | "mfxer %0\n" |
93 | "std %0, 296(%2)\n" | 94 | "std %0, 296(%2)\n" |
94 | : "=&r" (tmp1), "=&r" (tmp2) | 95 | : "=&r" (tmp1), "=&r" (tmp2) |
95 | : "b" (newregs)); | 96 | : "b" (newregs) |
97 | : "memory"); | ||
96 | } | 98 | } |
97 | } | 99 | } |
98 | #else | 100 | #else |
@@ -104,7 +106,6 @@ static inline void crash_setup_regs(struct pt_regs *newregs, | |||
104 | struct pt_regs *oldregs) { } | 106 | struct pt_regs *oldregs) { } |
105 | #endif /* !__powerpc64 __ */ | 107 | #endif /* !__powerpc64 __ */ |
106 | 108 | ||
107 | #ifndef __ASSEMBLY__ | ||
108 | #define MAX_NOTE_BYTES 1024 | 109 | #define MAX_NOTE_BYTES 1024 |
109 | 110 | ||
110 | #ifdef __powerpc64__ | 111 | #ifdef __powerpc64__ |
@@ -121,6 +122,8 @@ extern void default_machine_kexec(struct kimage *image); | |||
121 | extern int default_machine_kexec_prepare(struct kimage *image); | 122 | extern int default_machine_kexec_prepare(struct kimage *image); |
122 | extern void default_machine_crash_shutdown(struct pt_regs *regs); | 123 | extern void default_machine_crash_shutdown(struct pt_regs *regs); |
123 | 124 | ||
125 | extern void machine_kexec_simple(struct kimage *image); | ||
126 | |||
124 | #endif /* ! __ASSEMBLY__ */ | 127 | #endif /* ! __ASSEMBLY__ */ |
125 | #endif /* CONFIG_KEXEC */ | 128 | #endif /* CONFIG_KEXEC */ |
126 | #endif /* __KERNEL__ */ | 129 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-powerpc/mman.h b/include/asm-powerpc/mman.h index a2e34c21b44f..24cf664a8295 100644 --- a/include/asm-powerpc/mman.h +++ b/include/asm-powerpc/mman.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _ASM_POWERPC_MMAN_H | 1 | #ifndef _ASM_POWERPC_MMAN_H |
2 | #define _ASM_POWERPC_MMAN_H | 2 | #define _ASM_POWERPC_MMAN_H |
3 | 3 | ||
4 | #include <asm-generic/mman.h> | ||
5 | |||
4 | /* | 6 | /* |
5 | * This program is free software; you can redistribute it and/or | 7 | * This program is free software; you can redistribute it and/or |
6 | * modify it under the terms of the GNU General Public License | 8 | * modify it under the terms of the GNU General Public License |
@@ -8,19 +10,6 @@ | |||
8 | * 2 of the License, or (at your option) any later version. | 10 | * 2 of the License, or (at your option) any later version. |
9 | */ | 11 | */ |
10 | 12 | ||
11 | #define PROT_READ 0x1 /* page can be read */ | ||
12 | #define PROT_WRITE 0x2 /* page can be written */ | ||
13 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
14 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
15 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
16 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
17 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
18 | |||
19 | #define MAP_SHARED 0x01 /* Share changes */ | ||
20 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
21 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
22 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
23 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
24 | #define MAP_RENAME MAP_ANONYMOUS /* In SunOS terminology */ | 13 | #define MAP_RENAME MAP_ANONYMOUS /* In SunOS terminology */ |
25 | #define MAP_NORESERVE 0x40 /* don't reserve swap pages */ | 14 | #define MAP_NORESERVE 0x40 /* don't reserve swap pages */ |
26 | #define MAP_LOCKED 0x80 | 15 | #define MAP_LOCKED 0x80 |
@@ -29,25 +18,10 @@ | |||
29 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 18 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
30 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ | 19 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ |
31 | 20 | ||
32 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
33 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
34 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
35 | |||
36 | #define MCL_CURRENT 0x2000 /* lock all currently mapped pages */ | 21 | #define MCL_CURRENT 0x2000 /* lock all currently mapped pages */ |
37 | #define MCL_FUTURE 0x4000 /* lock all additions to address space */ | 22 | #define MCL_FUTURE 0x4000 /* lock all additions to address space */ |
38 | 23 | ||
39 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | 24 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ |
40 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 25 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
41 | 26 | ||
42 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
43 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
44 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
45 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
46 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
47 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
48 | |||
49 | /* compatibility flags */ | ||
50 | #define MAP_ANON MAP_ANONYMOUS | ||
51 | #define MAP_FILE 0 | ||
52 | |||
53 | #endif /* _ASM_POWERPC_MMAN_H */ | 27 | #endif /* _ASM_POWERPC_MMAN_H */ |
diff --git a/include/asm-powerpc/mmu.h b/include/asm-powerpc/mmu.h index d096d9e76ad7..b0b9a3f8cdc2 100644 --- a/include/asm-powerpc/mmu.h +++ b/include/asm-powerpc/mmu.h | |||
@@ -112,6 +112,7 @@ typedef struct { | |||
112 | } hpte_t; | 112 | } hpte_t; |
113 | 113 | ||
114 | extern hpte_t *htab_address; | 114 | extern hpte_t *htab_address; |
115 | extern unsigned long htab_size_bytes; | ||
115 | extern unsigned long htab_hash_mask; | 116 | extern unsigned long htab_hash_mask; |
116 | 117 | ||
117 | /* | 118 | /* |
diff --git a/include/asm-powerpc/pgalloc.h b/include/asm-powerpc/pgalloc.h index 9f5b052784a5..a00ee002cd11 100644 --- a/include/asm-powerpc/pgalloc.h +++ b/include/asm-powerpc/pgalloc.h | |||
@@ -146,7 +146,7 @@ extern void pgtable_free_tlb(struct mmu_gather *tlb, pgtable_free_t pgf); | |||
146 | pgtable_free_tlb(tlb, pgtable_free_cache(pmd, \ | 146 | pgtable_free_tlb(tlb, pgtable_free_cache(pmd, \ |
147 | PMD_CACHE_NUM, PMD_TABLE_SIZE-1)) | 147 | PMD_CACHE_NUM, PMD_TABLE_SIZE-1)) |
148 | #ifndef CONFIG_PPC_64K_PAGES | 148 | #ifndef CONFIG_PPC_64K_PAGES |
149 | #define __pud_free_tlb(tlb, pmd) \ | 149 | #define __pud_free_tlb(tlb, pud) \ |
150 | pgtable_free_tlb(tlb, pgtable_free_cache(pud, \ | 150 | pgtable_free_tlb(tlb, pgtable_free_cache(pud, \ |
151 | PUD_CACHE_NUM, PUD_TABLE_SIZE-1)) | 151 | PUD_CACHE_NUM, PUD_TABLE_SIZE-1)) |
152 | #endif /* CONFIG_PPC_64K_PAGES */ | 152 | #endif /* CONFIG_PPC_64K_PAGES */ |
diff --git a/include/asm-powerpc/pgtable-4k.h b/include/asm-powerpc/pgtable-4k.h index e9590c06ad92..80a7832d2721 100644 --- a/include/asm-powerpc/pgtable-4k.h +++ b/include/asm-powerpc/pgtable-4k.h | |||
@@ -88,4 +88,4 @@ | |||
88 | (((addr) >> PUD_SHIFT) & (PTRS_PER_PUD - 1))) | 88 | (((addr) >> PUD_SHIFT) & (PTRS_PER_PUD - 1))) |
89 | 89 | ||
90 | #define pud_ERROR(e) \ | 90 | #define pud_ERROR(e) \ |
91 | printk("%s:%d: bad pmd %08lx.\n", __FILE__, __LINE__, pud_val(e)) | 91 | printk("%s:%d: bad pud %08lx.\n", __FILE__, __LINE__, pud_val(e)) |
diff --git a/include/asm-powerpc/pmac_pfunc.h b/include/asm-powerpc/pmac_pfunc.h index d9728c80f86d..cef61304ffc2 100644 --- a/include/asm-powerpc/pmac_pfunc.h +++ b/include/asm-powerpc/pmac_pfunc.h | |||
@@ -167,6 +167,7 @@ struct pmf_irq_client { | |||
167 | void *data; | 167 | void *data; |
168 | struct module *owner; | 168 | struct module *owner; |
169 | struct list_head link; | 169 | struct list_head link; |
170 | struct pmf_function *func; | ||
170 | }; | 171 | }; |
171 | 172 | ||
172 | 173 | ||
@@ -187,9 +188,7 @@ extern int pmf_register_irq_client(struct device_node *np, | |||
187 | const char *name, | 188 | const char *name, |
188 | struct pmf_irq_client *client); | 189 | struct pmf_irq_client *client); |
189 | 190 | ||
190 | extern void pmf_unregister_irq_client(struct device_node *np, | 191 | extern void pmf_unregister_irq_client(struct pmf_irq_client *client); |
191 | const char *name, | ||
192 | struct pmf_irq_client *client); | ||
193 | 192 | ||
194 | /* | 193 | /* |
195 | * Called by the handlers when an irq happens | 194 | * Called by the handlers when an irq happens |
diff --git a/include/asm-powerpc/ppc-pci.h b/include/asm-powerpc/ppc-pci.h index f80482c7231f..cf79bc7ebb55 100644 --- a/include/asm-powerpc/ppc-pci.h +++ b/include/asm-powerpc/ppc-pci.h | |||
@@ -38,6 +38,7 @@ void *traverse_pci_devices(struct device_node *start, traverse_func pre, | |||
38 | 38 | ||
39 | void pci_devs_phb_init(void); | 39 | void pci_devs_phb_init(void); |
40 | void pci_devs_phb_init_dynamic(struct pci_controller *phb); | 40 | void pci_devs_phb_init_dynamic(struct pci_controller *phb); |
41 | int setup_phb(struct device_node *dev, struct pci_controller *phb); | ||
41 | void __devinit scan_phb(struct pci_controller *hose); | 42 | void __devinit scan_phb(struct pci_controller *hose); |
42 | 43 | ||
43 | /* From rtas_pci.h */ | 44 | /* From rtas_pci.h */ |
diff --git a/include/asm-powerpc/prom.h b/include/asm-powerpc/prom.h index 5b2bd4eefb01..cbd297f44cce 100644 --- a/include/asm-powerpc/prom.h +++ b/include/asm-powerpc/prom.h | |||
@@ -222,5 +222,7 @@ extern int of_address_to_resource(struct device_node *dev, int index, | |||
222 | extern int of_pci_address_to_resource(struct device_node *dev, int bar, | 222 | extern int of_pci_address_to_resource(struct device_node *dev, int bar, |
223 | struct resource *r); | 223 | struct resource *r); |
224 | 224 | ||
225 | extern void kdump_move_device_tree(void); | ||
226 | |||
225 | #endif /* __KERNEL__ */ | 227 | #endif /* __KERNEL__ */ |
226 | #endif /* _POWERPC_PROM_H */ | 228 | #endif /* _POWERPC_PROM_H */ |
diff --git a/include/asm-powerpc/reg.h b/include/asm-powerpc/reg.h index 12ecc9b9f285..72bfe3af0460 100644 --- a/include/asm-powerpc/reg.h +++ b/include/asm-powerpc/reg.h | |||
@@ -615,27 +615,9 @@ | |||
615 | #define proc_trap() asm volatile("trap") | 615 | #define proc_trap() asm volatile("trap") |
616 | 616 | ||
617 | #ifdef CONFIG_PPC64 | 617 | #ifdef CONFIG_PPC64 |
618 | static inline void ppc64_runlatch_on(void) | 618 | |
619 | { | 619 | extern void ppc64_runlatch_on(void); |
620 | unsigned long ctrl; | 620 | extern void ppc64_runlatch_off(void); |
621 | |||
622 | if (cpu_has_feature(CPU_FTR_CTRL)) { | ||
623 | ctrl = mfspr(SPRN_CTRLF); | ||
624 | ctrl |= CTRL_RUNLATCH; | ||
625 | mtspr(SPRN_CTRLT, ctrl); | ||
626 | } | ||
627 | } | ||
628 | |||
629 | static inline void ppc64_runlatch_off(void) | ||
630 | { | ||
631 | unsigned long ctrl; | ||
632 | |||
633 | if (cpu_has_feature(CPU_FTR_CTRL)) { | ||
634 | ctrl = mfspr(SPRN_CTRLF); | ||
635 | ctrl &= ~CTRL_RUNLATCH; | ||
636 | mtspr(SPRN_CTRLT, ctrl); | ||
637 | } | ||
638 | } | ||
639 | 621 | ||
640 | extern unsigned long scom970_read(unsigned int address); | 622 | extern unsigned long scom970_read(unsigned int address); |
641 | extern void scom970_write(unsigned int address, unsigned long value); | 623 | extern void scom970_write(unsigned int address, unsigned long value); |
@@ -645,15 +627,6 @@ extern void scom970_write(unsigned int address, unsigned long value); | |||
645 | #define __get_SP() ({unsigned long sp; \ | 627 | #define __get_SP() ({unsigned long sp; \ |
646 | asm volatile("mr %0,1": "=r" (sp)); sp;}) | 628 | asm volatile("mr %0,1": "=r" (sp)); sp;}) |
647 | 629 | ||
648 | #else /* __ASSEMBLY__ */ | ||
649 | |||
650 | #define RUNLATCH_ON(REG) \ | ||
651 | BEGIN_FTR_SECTION \ | ||
652 | mfspr (REG),SPRN_CTRLF; \ | ||
653 | ori (REG),(REG),CTRL_RUNLATCH; \ | ||
654 | mtspr SPRN_CTRLT,(REG); \ | ||
655 | END_FTR_SECTION_IFSET(CPU_FTR_CTRL) | ||
656 | |||
657 | #endif /* __ASSEMBLY__ */ | 630 | #endif /* __ASSEMBLY__ */ |
658 | #endif /* __KERNEL__ */ | 631 | #endif /* __KERNEL__ */ |
659 | #endif /* _ASM_POWERPC_REG_H */ | 632 | #endif /* _ASM_POWERPC_REG_H */ |
diff --git a/include/asm-powerpc/smu.h b/include/asm-powerpc/smu.h index 82ce47607774..2dc93632f210 100644 --- a/include/asm-powerpc/smu.h +++ b/include/asm-powerpc/smu.h | |||
@@ -521,6 +521,11 @@ struct smu_sdbp_cpupiddata { | |||
521 | extern struct smu_sdbp_header *smu_get_sdb_partition(int id, | 521 | extern struct smu_sdbp_header *smu_get_sdb_partition(int id, |
522 | unsigned int *size); | 522 | unsigned int *size); |
523 | 523 | ||
524 | /* Get "sdb" partition data from an SMU satellite */ | ||
525 | extern struct smu_sdbp_header *smu_sat_get_sdb_partition(unsigned int sat_id, | ||
526 | int id, unsigned int *size); | ||
527 | |||
528 | |||
524 | #endif /* __KERNEL__ */ | 529 | #endif /* __KERNEL__ */ |
525 | 530 | ||
526 | 531 | ||
diff --git a/include/asm-powerpc/thread_info.h b/include/asm-powerpc/thread_info.h index 67cdaf3ae9fc..ffc7462d77ba 100644 --- a/include/asm-powerpc/thread_info.h +++ b/include/asm-powerpc/thread_info.h | |||
@@ -37,7 +37,6 @@ struct thread_info { | |||
37 | int preempt_count; /* 0 => preemptable, | 37 | int preempt_count; /* 0 => preemptable, |
38 | <0 => BUG */ | 38 | <0 => BUG */ |
39 | struct restart_block restart_block; | 39 | struct restart_block restart_block; |
40 | void *nvgprs_frame; | ||
41 | /* low level flags - has atomic operations done on it */ | 40 | /* low level flags - has atomic operations done on it */ |
42 | unsigned long flags ____cacheline_aligned_in_smp; | 41 | unsigned long flags ____cacheline_aligned_in_smp; |
43 | }; | 42 | }; |
@@ -113,14 +112,13 @@ static inline struct thread_info *current_thread_info(void) | |||
113 | #define TIF_POLLING_NRFLAG 4 /* true if poll_idle() is polling | 112 | #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 5 /* 32 bit binary */ |
116 | /* #define SPARE 6 */ | 115 | #define TIF_RUNLATCH 6 /* Is the runlatch enabled? */ |
117 | #define TIF_ABI_PENDING 7 /* 32/64 bit switch needed */ | 116 | #define TIF_ABI_PENDING 7 /* 32/64 bit switch needed */ |
118 | #define TIF_SYSCALL_AUDIT 8 /* syscall auditing active */ | 117 | #define TIF_SYSCALL_AUDIT 8 /* syscall auditing active */ |
119 | #define TIF_SINGLESTEP 9 /* singlestepping active */ | 118 | #define TIF_SINGLESTEP 9 /* singlestepping active */ |
120 | #define TIF_MEMDIE 10 | 119 | #define TIF_MEMDIE 10 |
121 | #define TIF_SECCOMP 11 /* secure computing */ | 120 | #define TIF_SECCOMP 11 /* secure computing */ |
122 | #define TIF_RESTOREALL 12 /* Restore all regs (implies NOERROR) */ | 121 | #define TIF_RESTOREALL 12 /* Restore all regs (implies NOERROR) */ |
123 | #define TIF_SAVE_NVGPRS 13 /* Save r14-r31 in signal frame */ | ||
124 | #define TIF_NOERROR 14 /* Force successful syscall return */ | 122 | #define TIF_NOERROR 14 /* Force successful syscall return */ |
125 | #define TIF_RESTORE_SIGMASK 15 /* Restore signal mask in do_signal */ | 123 | #define TIF_RESTORE_SIGMASK 15 /* Restore signal mask in do_signal */ |
126 | 124 | ||
@@ -131,21 +129,19 @@ static inline struct thread_info *current_thread_info(void) | |||
131 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 129 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
132 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 130 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
133 | #define _TIF_32BIT (1<<TIF_32BIT) | 131 | #define _TIF_32BIT (1<<TIF_32BIT) |
134 | /* #define _SPARE (1<<SPARE) */ | 132 | #define _TIF_RUNLATCH (1<<TIF_RUNLATCH) |
135 | #define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING) | 133 | #define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING) |
136 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) | 134 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) |
137 | #define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) | 135 | #define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) |
138 | #define _TIF_SECCOMP (1<<TIF_SECCOMP) | 136 | #define _TIF_SECCOMP (1<<TIF_SECCOMP) |
139 | #define _TIF_RESTOREALL (1<<TIF_RESTOREALL) | 137 | #define _TIF_RESTOREALL (1<<TIF_RESTOREALL) |
140 | #define _TIF_SAVE_NVGPRS (1<<TIF_SAVE_NVGPRS) | ||
141 | #define _TIF_NOERROR (1<<TIF_NOERROR) | 138 | #define _TIF_NOERROR (1<<TIF_NOERROR) |
142 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | 139 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) |
143 | #define _TIF_SYSCALL_T_OR_A (_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP) | 140 | #define _TIF_SYSCALL_T_OR_A (_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP) |
144 | 141 | ||
145 | #define _TIF_USER_WORK_MASK (_TIF_NOTIFY_RESUME | _TIF_SIGPENDING | \ | 142 | #define _TIF_USER_WORK_MASK (_TIF_NOTIFY_RESUME | _TIF_SIGPENDING | \ |
146 | _TIF_NEED_RESCHED | _TIF_RESTOREALL | \ | 143 | _TIF_NEED_RESCHED | _TIF_RESTORE_SIGMASK) |
147 | _TIF_RESTORE_SIGMASK) | 144 | #define _TIF_PERSYSCALL_MASK (_TIF_RESTOREALL|_TIF_NOERROR) |
148 | #define _TIF_PERSYSCALL_MASK (_TIF_RESTOREALL|_TIF_NOERROR|_TIF_SAVE_NVGPRS) | ||
149 | 145 | ||
150 | #endif /* __KERNEL__ */ | 146 | #endif /* __KERNEL__ */ |
151 | 147 | ||
diff --git a/include/asm-powerpc/unistd.h b/include/asm-powerpc/unistd.h index a40cdff21a88..35556993f066 100644 --- a/include/asm-powerpc/unistd.h +++ b/include/asm-powerpc/unistd.h | |||
@@ -300,8 +300,9 @@ | |||
300 | #define __NR_spu_create 279 | 300 | #define __NR_spu_create 279 |
301 | #define __NR_pselect6 280 | 301 | #define __NR_pselect6 280 |
302 | #define __NR_ppoll 281 | 302 | #define __NR_ppoll 281 |
303 | #define __NR_unshare 282 | ||
303 | 304 | ||
304 | #define __NR_syscalls 282 | 305 | #define __NR_syscalls 283 |
305 | 306 | ||
306 | #ifdef __KERNEL__ | 307 | #ifdef __KERNEL__ |
307 | #define __NR__exit __NR_exit | 308 | #define __NR__exit __NR_exit |
diff --git a/include/asm-ppc/machdep.h b/include/asm-ppc/machdep.h index 39200def8d11..a3e8a45e45a9 100644 --- a/include/asm-ppc/machdep.h +++ b/include/asm-ppc/machdep.h | |||
@@ -154,19 +154,6 @@ extern char cmd_line[COMMAND_LINE_SIZE]; | |||
154 | 154 | ||
155 | extern void setup_pci_ptrs(void); | 155 | extern void setup_pci_ptrs(void); |
156 | 156 | ||
157 | /* | ||
158 | * Power macintoshes have either a CUDA or a PMU controlling | ||
159 | * system reset, power, NVRAM, RTC. | ||
160 | */ | ||
161 | typedef enum sys_ctrler_kind { | ||
162 | SYS_CTRLER_UNKNOWN = 0, | ||
163 | SYS_CTRLER_CUDA = 1, | ||
164 | SYS_CTRLER_PMU = 2, | ||
165 | SYS_CTRLER_SMU = 3, | ||
166 | } sys_ctrler_t; | ||
167 | |||
168 | extern sys_ctrler_t sys_ctrler; | ||
169 | |||
170 | #ifdef CONFIG_SMP | 157 | #ifdef CONFIG_SMP |
171 | struct smp_ops_t { | 158 | struct smp_ops_t { |
172 | void (*message_pass)(int target, int msg); | 159 | void (*message_pass)(int target, int msg); |
diff --git a/include/asm-s390/bitops.h b/include/asm-s390/bitops.h index 61232760cc3b..3628899f48bb 100644 --- a/include/asm-s390/bitops.h +++ b/include/asm-s390/bitops.h | |||
@@ -518,8 +518,8 @@ static inline int __test_bit(unsigned long nr, const volatile unsigned long *ptr | |||
518 | 518 | ||
519 | static inline int | 519 | static inline int |
520 | __constant_test_bit(unsigned long nr, const volatile unsigned long *addr) { | 520 | __constant_test_bit(unsigned long nr, const volatile unsigned long *addr) { |
521 | return ((((volatile char *) addr) | 521 | return (((volatile char *) addr) |
522 | [(nr^(__BITOPS_WORDSIZE-8))>>3] & (1<<(nr&7)))) != 0; | 522 | [(nr^(__BITOPS_WORDSIZE-8))>>3] & (1<<(nr&7))) != 0; |
523 | } | 523 | } |
524 | 524 | ||
525 | #define test_bit(nr,addr) \ | 525 | #define test_bit(nr,addr) \ |
diff --git a/include/asm-s390/dasd.h b/include/asm-s390/dasd.h index 77b10d6adabd..1630c26e8f45 100644 --- a/include/asm-s390/dasd.h +++ b/include/asm-s390/dasd.h | |||
@@ -8,8 +8,6 @@ | |||
8 | * any future changes wrt the API will result in a change of the APIVERSION reported | 8 | * any future changes wrt the API will result in a change of the APIVERSION reported |
9 | * to userspace by the DASDAPIVER-ioctl | 9 | * to userspace by the DASDAPIVER-ioctl |
10 | * | 10 | * |
11 | * $Revision: 1.6 $ | ||
12 | * | ||
13 | */ | 11 | */ |
14 | 12 | ||
15 | #ifndef DASD_H | 13 | #ifndef DASD_H |
diff --git a/include/asm-s390/io.h b/include/asm-s390/io.h index 71f55eb2350a..b05825dd16d7 100644 --- a/include/asm-s390/io.h +++ b/include/asm-s390/io.h | |||
@@ -90,10 +90,16 @@ extern void iounmap(void *addr); | |||
90 | #define readb_relaxed(addr) readb(addr) | 90 | #define readb_relaxed(addr) readb(addr) |
91 | #define readw_relaxed(addr) readw(addr) | 91 | #define readw_relaxed(addr) readw(addr) |
92 | #define readl_relaxed(addr) readl(addr) | 92 | #define readl_relaxed(addr) readl(addr) |
93 | #define __raw_readb readb | ||
94 | #define __raw_readw readw | ||
95 | #define __raw_readl readl | ||
93 | 96 | ||
94 | #define writeb(b,addr) (*(volatile unsigned char *) __io_virt(addr) = (b)) | 97 | #define writeb(b,addr) (*(volatile unsigned char *) __io_virt(addr) = (b)) |
95 | #define writew(b,addr) (*(volatile unsigned short *) __io_virt(addr) = (b)) | 98 | #define writew(b,addr) (*(volatile unsigned short *) __io_virt(addr) = (b)) |
96 | #define writel(b,addr) (*(volatile unsigned int *) __io_virt(addr) = (b)) | 99 | #define writel(b,addr) (*(volatile unsigned int *) __io_virt(addr) = (b)) |
100 | #define __raw_writeb writeb | ||
101 | #define __raw_writew writew | ||
102 | #define __raw_writel writel | ||
97 | 103 | ||
98 | #define memset_io(a,b,c) memset(__io_virt(a),(b),(c)) | 104 | #define memset_io(a,b,c) memset(__io_virt(a),(b),(c)) |
99 | #define memcpy_fromio(a,b,c) memcpy((a),__io_virt(b),(c)) | 105 | #define memcpy_fromio(a,b,c) memcpy((a),__io_virt(b),(c)) |
diff --git a/include/asm-s390/mman.h b/include/asm-s390/mman.h index c8d5409b5d56..7839767d837e 100644 --- a/include/asm-s390/mman.h +++ b/include/asm-s390/mman.h | |||
@@ -9,19 +9,7 @@ | |||
9 | #ifndef __S390_MMAN_H__ | 9 | #ifndef __S390_MMAN_H__ |
10 | #define __S390_MMAN_H__ | 10 | #define __S390_MMAN_H__ |
11 | 11 | ||
12 | #define PROT_READ 0x1 /* page can be read */ | 12 | #include <asm-generic/mman.h> |
13 | #define PROT_WRITE 0x2 /* page can be written */ | ||
14 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
15 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
16 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
17 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
18 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
19 | |||
20 | #define MAP_SHARED 0x01 /* Share changes */ | ||
21 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
22 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
23 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
24 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
25 | 13 | ||
26 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 14 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
27 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 15 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
@@ -31,22 +19,7 @@ | |||
31 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | 19 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ |
32 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 20 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
33 | 21 | ||
34 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
35 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
36 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
37 | |||
38 | #define MCL_CURRENT 1 /* lock all current mappings */ | 22 | #define MCL_CURRENT 1 /* lock all current mappings */ |
39 | #define MCL_FUTURE 2 /* lock all future mappings */ | 23 | #define MCL_FUTURE 2 /* lock all future mappings */ |
40 | 24 | ||
41 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
42 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
43 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
44 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
45 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
46 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
47 | |||
48 | /* compatibility flags */ | ||
49 | #define MAP_ANON MAP_ANONYMOUS | ||
50 | #define MAP_FILE 0 | ||
51 | |||
52 | #endif /* __S390_MMAN_H__ */ | 25 | #endif /* __S390_MMAN_H__ */ |
diff --git a/include/asm-s390/qdio.h b/include/asm-s390/qdio.h index 7bc15f0231db..a2f37a9353d3 100644 --- a/include/asm-s390/qdio.h +++ b/include/asm-s390/qdio.h | |||
@@ -11,8 +11,6 @@ | |||
11 | #ifndef __QDIO_H__ | 11 | #ifndef __QDIO_H__ |
12 | #define __QDIO_H__ | 12 | #define __QDIO_H__ |
13 | 13 | ||
14 | #define VERSION_QDIO_H "$Revision: 1.57 $" | ||
15 | |||
16 | /* note, that most of the typedef's are from ingo. */ | 14 | /* note, that most of the typedef's are from ingo. */ |
17 | 15 | ||
18 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
diff --git a/include/asm-s390/setup.h b/include/asm-s390/setup.h index 348a88137445..da3fd4a7bb32 100644 --- a/include/asm-s390/setup.h +++ b/include/asm-s390/setup.h | |||
@@ -8,6 +8,8 @@ | |||
8 | #ifndef _ASM_S390_SETUP_H | 8 | #ifndef _ASM_S390_SETUP_H |
9 | #define _ASM_S390_SETUP_H | 9 | #define _ASM_S390_SETUP_H |
10 | 10 | ||
11 | #ifdef __KERNEL__ | ||
12 | |||
11 | #include <asm/types.h> | 13 | #include <asm/types.h> |
12 | 14 | ||
13 | #define PARMAREA 0x10400 | 15 | #define PARMAREA 0x10400 |
@@ -114,7 +116,7 @@ extern u16 ipl_devno; | |||
114 | IPL_PARMBLOCK_ORIGIN) | 116 | IPL_PARMBLOCK_ORIGIN) |
115 | #define IPL_PARMBLOCK_SIZE (IPL_PARMBLOCK_START->hdr.length) | 117 | #define IPL_PARMBLOCK_SIZE (IPL_PARMBLOCK_START->hdr.length) |
116 | 118 | ||
117 | #else | 119 | #else /* __ASSEMBLY__ */ |
118 | 120 | ||
119 | #ifndef __s390x__ | 121 | #ifndef __s390x__ |
120 | #define IPL_DEVICE 0x10404 | 122 | #define IPL_DEVICE 0x10404 |
@@ -127,6 +129,6 @@ extern u16 ipl_devno; | |||
127 | #endif /* __s390x__ */ | 129 | #endif /* __s390x__ */ |
128 | #define COMMAND_LINE 0x10480 | 130 | #define COMMAND_LINE 0x10480 |
129 | 131 | ||
130 | #endif | 132 | #endif /* __ASSEMBLY__ */ |
131 | 133 | #endif /* __KERNEL__ */ | |
132 | #endif | 134 | #endif /* _ASM_S390_SETUP_H */ |
diff --git a/include/asm-s390/smp.h b/include/asm-s390/smp.h index a2ae7628bbaa..444dae5912e6 100644 --- a/include/asm-s390/smp.h +++ b/include/asm-s390/smp.h | |||
@@ -31,6 +31,7 @@ typedef struct | |||
31 | __u16 cpu; | 31 | __u16 cpu; |
32 | } sigp_info; | 32 | } sigp_info; |
33 | 33 | ||
34 | extern void smp_setup_cpu_possible_map(void); | ||
34 | extern int smp_call_function_on(void (*func) (void *info), void *info, | 35 | extern int smp_call_function_on(void (*func) (void *info), void *info, |
35 | int nonatomic, int wait, int cpu); | 36 | int nonatomic, int wait, int cpu); |
36 | #define NO_PROC_ID 0xFF /* No processor magic marker */ | 37 | #define NO_PROC_ID 0xFF /* No processor magic marker */ |
@@ -101,8 +102,10 @@ smp_call_function_on(void (*func) (void *info), void *info, | |||
101 | func(info); | 102 | func(info); |
102 | return 0; | 103 | return 0; |
103 | } | 104 | } |
105 | #define smp_cpu_not_running(cpu) 1 | ||
104 | #define smp_get_cpu(cpu) ({ 0; }) | 106 | #define smp_get_cpu(cpu) ({ 0; }) |
105 | #define smp_put_cpu(cpu) ({ 0; }) | 107 | #define smp_put_cpu(cpu) ({ 0; }) |
108 | #define smp_setup_cpu_possible_map() | ||
106 | #endif | 109 | #endif |
107 | 110 | ||
108 | #endif | 111 | #endif |
diff --git a/include/asm-s390/system.h b/include/asm-s390/system.h index b2e65e8bf812..6a89dbb03c1e 100644 --- a/include/asm-s390/system.h +++ b/include/asm-s390/system.h | |||
@@ -118,6 +118,8 @@ static inline void sched_cacheflush(void) | |||
118 | extern void account_vtime(struct task_struct *); | 118 | extern void account_vtime(struct task_struct *); |
119 | extern void account_tick_vtime(struct task_struct *); | 119 | extern void account_tick_vtime(struct task_struct *); |
120 | extern void account_system_vtime(struct task_struct *); | 120 | extern void account_system_vtime(struct task_struct *); |
121 | #else | ||
122 | #define account_vtime(x) do { /* empty */ } while (0) | ||
121 | #endif | 123 | #endif |
122 | 124 | ||
123 | #define finish_arch_switch(prev) do { \ | 125 | #define finish_arch_switch(prev) do { \ |
diff --git a/include/asm-s390/thread_info.h b/include/asm-s390/thread_info.h index f3797a52c4ea..8e0c7ed73d03 100644 --- a/include/asm-s390/thread_info.h +++ b/include/asm-s390/thread_info.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * include/asm-s390/thread_info.h | 2 | * include/asm-s390/thread_info.h |
3 | * | 3 | * |
4 | * S390 version | 4 | * S390 version |
5 | * Copyright (C) 2002 IBM Deutschland Entwicklung GmbH, IBM Corporation | 5 | * Copyright (C) IBM Corp. 2002,2006 |
6 | * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com) | 6 | * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com) |
7 | */ | 7 | */ |
8 | 8 | ||
@@ -88,7 +88,7 @@ static inline struct thread_info *current_thread_info(void) | |||
88 | * thread information flags bit numbers | 88 | * thread information flags bit numbers |
89 | */ | 89 | */ |
90 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ | 90 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ |
91 | #define TIF_NOTIFY_RESUME 1 /* resumption notification requested */ | 91 | #define TIF_RESTORE_SIGMASK 1 /* restore signal mask in do_signal() */ |
92 | #define TIF_SIGPENDING 2 /* signal pending */ | 92 | #define TIF_SIGPENDING 2 /* signal pending */ |
93 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ | 93 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ |
94 | #define TIF_RESTART_SVC 4 /* restart svc with new svc number */ | 94 | #define TIF_RESTART_SVC 4 /* restart svc with new svc number */ |
@@ -102,7 +102,7 @@ static inline struct thread_info *current_thread_info(void) | |||
102 | #define TIF_MEMDIE 19 | 102 | #define TIF_MEMDIE 19 |
103 | 103 | ||
104 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 104 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
105 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | 105 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) |
106 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) | 106 | #define _TIF_SIGPENDING (1<<TIF_SIGPENDING) |
107 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 107 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
108 | #define _TIF_RESTART_SVC (1<<TIF_RESTART_SVC) | 108 | #define _TIF_RESTART_SVC (1<<TIF_RESTART_SVC) |
diff --git a/include/asm-s390/timer.h b/include/asm-s390/timer.h index ea0788967c51..fcd6c256a2d1 100644 --- a/include/asm-s390/timer.h +++ b/include/asm-s390/timer.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-s390/timer.h | 2 | * include/asm-s390/timer.h |
3 | * | 3 | * |
4 | * (C) Copyright IBM Corp. 2003 | 4 | * (C) Copyright IBM Corp. 2003,2006 |
5 | * Virtual CPU timer | 5 | * Virtual CPU timer |
6 | * | 6 | * |
7 | * Author: Jan Glauber (jang@de.ibm.com) | 7 | * Author: Jan Glauber (jang@de.ibm.com) |
@@ -10,6 +10,8 @@ | |||
10 | #ifndef _ASM_S390_TIMER_H | 10 | #ifndef _ASM_S390_TIMER_H |
11 | #define _ASM_S390_TIMER_H | 11 | #define _ASM_S390_TIMER_H |
12 | 12 | ||
13 | #ifdef __KERNEL__ | ||
14 | |||
13 | #include <linux/timer.h> | 15 | #include <linux/timer.h> |
14 | 16 | ||
15 | #define VTIMER_MAX_SLICE (0x7ffffffffffff000LL) | 17 | #define VTIMER_MAX_SLICE (0x7ffffffffffff000LL) |
@@ -43,4 +45,6 @@ extern void add_virt_timer_periodic(void *new); | |||
43 | extern int mod_virt_timer(struct vtimer_list *timer, __u64 expires); | 45 | extern int mod_virt_timer(struct vtimer_list *timer, __u64 expires); |
44 | extern int del_virt_timer(struct vtimer_list *timer); | 46 | extern int del_virt_timer(struct vtimer_list *timer); |
45 | 47 | ||
46 | #endif | 48 | #endif /* __KERNEL__ */ |
49 | |||
50 | #endif /* _ASM_S390_TIMER_H */ | ||
diff --git a/include/asm-s390/uaccess.h b/include/asm-s390/uaccess.h index be104f21c70a..0b7c0ca4c3d7 100644 --- a/include/asm-s390/uaccess.h +++ b/include/asm-s390/uaccess.h | |||
@@ -61,7 +61,7 @@ | |||
61 | #define segment_eq(a,b) ((a).ar4 == (b).ar4) | 61 | #define segment_eq(a,b) ((a).ar4 == (b).ar4) |
62 | 62 | ||
63 | 63 | ||
64 | static inline int __access_ok(const void *addr, unsigned long size) | 64 | static inline int __access_ok(const void __user *addr, unsigned long size) |
65 | { | 65 | { |
66 | return 1; | 66 | return 1; |
67 | } | 67 | } |
@@ -208,25 +208,25 @@ extern int __put_user_bad(void) __attribute__((noreturn)); | |||
208 | case 1: { \ | 208 | case 1: { \ |
209 | unsigned char __x; \ | 209 | unsigned char __x; \ |
210 | __get_user_asm(__x, ptr, __gu_err); \ | 210 | __get_user_asm(__x, ptr, __gu_err); \ |
211 | (x) = *(__typeof__(*(ptr)) *) &__x; \ | 211 | (x) = *(__force __typeof__(*(ptr)) *) &__x; \ |
212 | break; \ | 212 | break; \ |
213 | }; \ | 213 | }; \ |
214 | case 2: { \ | 214 | case 2: { \ |
215 | unsigned short __x; \ | 215 | unsigned short __x; \ |
216 | __get_user_asm(__x, ptr, __gu_err); \ | 216 | __get_user_asm(__x, ptr, __gu_err); \ |
217 | (x) = *(__typeof__(*(ptr)) *) &__x; \ | 217 | (x) = *(__force __typeof__(*(ptr)) *) &__x; \ |
218 | break; \ | 218 | break; \ |
219 | }; \ | 219 | }; \ |
220 | case 4: { \ | 220 | case 4: { \ |
221 | unsigned int __x; \ | 221 | unsigned int __x; \ |
222 | __get_user_asm(__x, ptr, __gu_err); \ | 222 | __get_user_asm(__x, ptr, __gu_err); \ |
223 | (x) = *(__typeof__(*(ptr)) *) &__x; \ | 223 | (x) = *(__force __typeof__(*(ptr)) *) &__x; \ |
224 | break; \ | 224 | break; \ |
225 | }; \ | 225 | }; \ |
226 | case 8: { \ | 226 | case 8: { \ |
227 | unsigned long long __x; \ | 227 | unsigned long long __x; \ |
228 | __get_user_asm(__x, ptr, __gu_err); \ | 228 | __get_user_asm(__x, ptr, __gu_err); \ |
229 | (x) = *(__typeof__(*(ptr)) *) &__x; \ | 229 | (x) = *(__force __typeof__(*(ptr)) *) &__x; \ |
230 | break; \ | 230 | break; \ |
231 | }; \ | 231 | }; \ |
232 | default: \ | 232 | default: \ |
diff --git a/include/asm-s390/unistd.h b/include/asm-s390/unistd.h index 2861cdc243ad..657d582e8149 100644 --- a/include/asm-s390/unistd.h +++ b/include/asm-s390/unistd.h | |||
@@ -279,8 +279,25 @@ | |||
279 | #define __NR_inotify_init 284 | 279 | #define __NR_inotify_init 284 |
280 | #define __NR_inotify_add_watch 285 | 280 | #define __NR_inotify_add_watch 285 |
281 | #define __NR_inotify_rm_watch 286 | 281 | #define __NR_inotify_rm_watch 286 |
282 | /* Number 287 is reserved for new sys_migrate_pages */ | ||
283 | #define __NR_openat 288 | ||
284 | #define __NR_mkdirat 289 | ||
285 | #define __NR_mknodat 290 | ||
286 | #define __NR_fchownat 291 | ||
287 | #define __NR_futimesat 292 | ||
288 | #define __NR_fstatat64 293 | ||
289 | #define __NR_unlinkat 294 | ||
290 | #define __NR_renameat 295 | ||
291 | #define __NR_linkat 296 | ||
292 | #define __NR_symlinkat 297 | ||
293 | #define __NR_readlinkat 298 | ||
294 | #define __NR_fchmodat 299 | ||
295 | #define __NR_faccessat 300 | ||
296 | #define __NR_pselect6 301 | ||
297 | #define __NR_ppoll 302 | ||
298 | #define __NR_unshare 303 | ||
282 | 299 | ||
283 | #define NR_syscalls 287 | 300 | #define NR_syscalls 304 |
284 | 301 | ||
285 | /* | 302 | /* |
286 | * There are some system calls that are not present on 64 bit, some | 303 | * There are some system calls that are not present on 64 bit, some |
@@ -342,6 +359,7 @@ | |||
342 | #undef __NR_fcntl64 | 359 | #undef __NR_fcntl64 |
343 | #undef __NR_sendfile64 | 360 | #undef __NR_sendfile64 |
344 | #undef __NR_fadvise64_64 | 361 | #undef __NR_fadvise64_64 |
362 | #undef __NR_fstatat64 | ||
345 | 363 | ||
346 | #define __NR_select 142 | 364 | #define __NR_select 142 |
347 | #define __NR_getrlimit 191 /* SuS compliant getrlimit */ | 365 | #define __NR_getrlimit 191 /* SuS compliant getrlimit */ |
@@ -364,6 +382,7 @@ | |||
364 | #define __NR_setgid 214 | 382 | #define __NR_setgid 214 |
365 | #define __NR_setfsuid 215 | 383 | #define __NR_setfsuid 215 |
366 | #define __NR_setfsgid 216 | 384 | #define __NR_setfsgid 216 |
385 | #define __NR_newfstatat 293 | ||
367 | 386 | ||
368 | #endif | 387 | #endif |
369 | 388 | ||
@@ -539,11 +558,15 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, \ | |||
539 | #define __ARCH_WANT_SYS_SIGPENDING | 558 | #define __ARCH_WANT_SYS_SIGPENDING |
540 | #define __ARCH_WANT_SYS_SIGPROCMASK | 559 | #define __ARCH_WANT_SYS_SIGPROCMASK |
541 | #define __ARCH_WANT_SYS_RT_SIGACTION | 560 | #define __ARCH_WANT_SYS_RT_SIGACTION |
561 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND | ||
542 | # ifndef CONFIG_64BIT | 562 | # ifndef CONFIG_64BIT |
543 | # define __ARCH_WANT_STAT64 | 563 | # define __ARCH_WANT_STAT64 |
544 | # define __ARCH_WANT_SYS_TIME | 564 | # define __ARCH_WANT_SYS_TIME |
545 | # endif | 565 | # endif |
546 | # define __ARCH_WANT_COMPAT_SYS_TIME | 566 | # ifdef CONFIG_COMPAT |
567 | # define __ARCH_WANT_COMPAT_SYS_TIME | ||
568 | # define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND | ||
569 | # endif | ||
547 | #endif | 570 | #endif |
548 | 571 | ||
549 | #ifdef __KERNEL_SYSCALLS__ | 572 | #ifdef __KERNEL_SYSCALLS__ |
diff --git a/include/asm-sh/bus-sh.h b/include/asm-sh/bus-sh.h deleted file mode 100644 index e42d63b65cb5..000000000000 --- a/include/asm-sh/bus-sh.h +++ /dev/null | |||
@@ -1,66 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-sh/bus-sh.h | ||
3 | * | ||
4 | * Copyright (C) 2004 Paul Mundt | ||
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 | ||
8 | * for more details. | ||
9 | */ | ||
10 | #ifndef __ASM_SH_BUS_SH_H | ||
11 | #define __ASM_SH_BUS_SH_H | ||
12 | |||
13 | extern struct bus_type sh_bus_types[]; | ||
14 | |||
15 | struct sh_dev { | ||
16 | struct device dev; | ||
17 | char *name; | ||
18 | unsigned int dev_id; | ||
19 | unsigned int bus_id; | ||
20 | struct resource res; | ||
21 | void *mapbase; | ||
22 | unsigned int irq[6]; | ||
23 | u64 *dma_mask; | ||
24 | u64 coherent_dma_mask; | ||
25 | }; | ||
26 | |||
27 | #define to_sh_dev(d) container_of((d), struct sh_dev, dev) | ||
28 | |||
29 | #define sh_get_drvdata(d) dev_get_drvdata(&(d)->dev) | ||
30 | #define sh_set_drvdata(d,p) dev_set_drvdata(&(d)->dev, (p)) | ||
31 | |||
32 | struct sh_driver { | ||
33 | struct device_driver drv; | ||
34 | unsigned int dev_id; | ||
35 | unsigned int bus_id; | ||
36 | int (*probe)(struct sh_dev *); | ||
37 | int (*remove)(struct sh_dev *); | ||
38 | int (*suspend)(struct sh_dev *, pm_message_t); | ||
39 | int (*resume)(struct sh_dev *); | ||
40 | }; | ||
41 | |||
42 | #define to_sh_driver(d) container_of((d), struct sh_driver, drv) | ||
43 | #define sh_name(d) ((d)->dev.driver->name) | ||
44 | |||
45 | /* | ||
46 | * Device ID numbers for bus types | ||
47 | */ | ||
48 | enum { | ||
49 | SH_DEV_ID_USB_OHCI, | ||
50 | }; | ||
51 | |||
52 | #define SH_NR_BUSES 1 | ||
53 | #define SH_BUS_NAME_VIRT "shbus" | ||
54 | |||
55 | enum { | ||
56 | SH_BUS_VIRT, | ||
57 | }; | ||
58 | |||
59 | /* arch/sh/kernel/cpu/bus.c */ | ||
60 | extern int sh_device_register(struct sh_dev *dev); | ||
61 | extern void sh_device_unregister(struct sh_dev *dev); | ||
62 | extern int sh_driver_register(struct sh_driver *drv); | ||
63 | extern void sh_driver_unregister(struct sh_driver *drv); | ||
64 | |||
65 | #endif /* __ASM_SH_BUS_SH_H */ | ||
66 | |||
diff --git a/include/asm-sh/cpu-sh3/mmu_context.h b/include/asm-sh/cpu-sh3/mmu_context.h index 5cfaa6bcf1ed..a844ea0965b6 100644 --- a/include/asm-sh/cpu-sh3/mmu_context.h +++ b/include/asm-sh/cpu-sh3/mmu_context.h | |||
@@ -24,5 +24,15 @@ | |||
24 | #define MMU_NTLB_WAYS 4 | 24 | #define MMU_NTLB_WAYS 4 |
25 | #define MMU_CONTROL_INIT 0x007 /* SV=0, TF=1, IX=1, AT=1 */ | 25 | #define MMU_CONTROL_INIT 0x007 /* SV=0, TF=1, IX=1, AT=1 */ |
26 | 26 | ||
27 | #define TRA 0xffffffd0 | ||
28 | #define EXPEVT 0xffffffd4 | ||
29 | |||
30 | #if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709) || \ | ||
31 | defined(CONFIG_CPU_SUBTYPE_SH7300) || defined(CONFIG_CPU_SUBTYPE_SH7705) | ||
32 | #define INTEVT 0xa4000000 /* INTEVTE2(0xa4000000) */ | ||
33 | #else | ||
34 | #define INTEVT 0xffffffd8 | ||
35 | #endif | ||
36 | |||
27 | #endif /* __ASM_CPU_SH3_MMU_CONTEXT_H */ | 37 | #endif /* __ASM_CPU_SH3_MMU_CONTEXT_H */ |
28 | 38 | ||
diff --git a/include/asm-sh/cpu-sh4/mmu_context.h b/include/asm-sh/cpu-sh4/mmu_context.h index 5b64d041f0b9..ff4c5fbbfaf0 100644 --- a/include/asm-sh/cpu-sh4/mmu_context.h +++ b/include/asm-sh/cpu-sh4/mmu_context.h | |||
@@ -23,7 +23,11 @@ | |||
23 | #define MMU_PAGE_ASSOC_BIT 0x80 | 23 | #define MMU_PAGE_ASSOC_BIT 0x80 |
24 | 24 | ||
25 | #define MMU_NTLB_ENTRIES 64 /* for 7750 */ | 25 | #define MMU_NTLB_ENTRIES 64 /* for 7750 */ |
26 | #ifdef CONFIG_SH_STORE_QUEUES | ||
27 | #define MMU_CONTROL_INIT 0x05 /* SQMD=0, SV=0, TI=1, AT=1 */ | ||
28 | #else | ||
26 | #define MMU_CONTROL_INIT 0x205 /* SQMD=1, SV=0, TI=1, AT=1 */ | 29 | #define MMU_CONTROL_INIT 0x205 /* SQMD=1, SV=0, TI=1, AT=1 */ |
30 | #endif | ||
27 | 31 | ||
28 | #define MMU_ITLB_DATA_ARRAY 0xF3000000 | 32 | #define MMU_ITLB_DATA_ARRAY 0xF3000000 |
29 | #define MMU_UTLB_DATA_ARRAY 0xF7000000 | 33 | #define MMU_UTLB_DATA_ARRAY 0xF7000000 |
@@ -35,5 +39,9 @@ | |||
35 | #define MMU_I_ENTRY_SHIFT 8 | 39 | #define MMU_I_ENTRY_SHIFT 8 |
36 | #define MMU_ITLB_VALID 0x100 | 40 | #define MMU_ITLB_VALID 0x100 |
37 | 41 | ||
42 | #define TRA 0xff000020 | ||
43 | #define EXPEVT 0xff000024 | ||
44 | #define INTEVT 0xff000028 | ||
45 | |||
38 | #endif /* __ASM_CPU_SH4_MMU_CONTEXT_H */ | 46 | #endif /* __ASM_CPU_SH4_MMU_CONTEXT_H */ |
39 | 47 | ||
diff --git a/include/asm-sh/ioctls.h b/include/asm-sh/ioctls.h index 1866f3f90028..9d84a2d445a2 100644 --- a/include/asm-sh/ioctls.h +++ b/include/asm-sh/ioctls.h | |||
@@ -94,6 +94,6 @@ | |||
94 | #define TIOCSERSETMULTI _IOW('T', 91, struct serial_multiport_struct) /* 0x545B */ /* Set multiport config */ | 94 | #define TIOCSERSETMULTI _IOW('T', 91, struct serial_multiport_struct) /* 0x545B */ /* Set multiport config */ |
95 | 95 | ||
96 | #define TIOCMIWAIT _IO('T', 92) /* 0x545C */ /* wait for a change on serial input line(s) */ | 96 | #define TIOCMIWAIT _IO('T', 92) /* 0x545C */ /* wait for a change on serial input line(s) */ |
97 | #define TIOCGICOUNT _IOR('T', 93, struct async_icount) /* 0x545D */ /* read serial port inline interrupt counts */ | 97 | #define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ |
98 | 98 | ||
99 | #endif /* __ASM_SH_IOCTLS_H */ | 99 | #endif /* __ASM_SH_IOCTLS_H */ |
diff --git a/include/asm-sh/irq-sh73180.h b/include/asm-sh/irq-sh73180.h index bf2e4310ffac..d705252be260 100644 --- a/include/asm-sh/irq-sh73180.h +++ b/include/asm-sh/irq-sh73180.h | |||
@@ -25,11 +25,6 @@ | |||
25 | #undef DMA_IPR_POS | 25 | #undef DMA_IPR_POS |
26 | #undef DMA_PRIORITY | 26 | #undef DMA_PRIORITY |
27 | 27 | ||
28 | #undef NR_IRQS | ||
29 | |||
30 | #undef __irq_demux | ||
31 | #undef irq_demux | ||
32 | |||
33 | #undef INTC_IMCR0 | 28 | #undef INTC_IMCR0 |
34 | #undef INTC_IMCR1 | 29 | #undef INTC_IMCR1 |
35 | #undef INTC_IMCR2 | 30 | #undef INTC_IMCR2 |
@@ -229,33 +224,6 @@ | |||
229 | #define SIU_IPR_POS 1 | 224 | #define SIU_IPR_POS 1 |
230 | #define SIU_PRIORITY 3 | 225 | #define SIU_PRIORITY 3 |
231 | 226 | ||
232 | |||
233 | /* ONCHIP_NR_IRQS */ | ||
234 | #define NR_IRQS 109 | ||
235 | |||
236 | /* In a generic kernel, NR_IRQS is an upper bound, and we should use | ||
237 | * ACTUAL_NR_IRQS (which uses the machine vector) to get the correct value. | ||
238 | */ | ||
239 | #define ACTUAL_NR_IRQS NR_IRQS | ||
240 | |||
241 | |||
242 | extern void disable_irq(unsigned int); | ||
243 | extern void disable_irq_nosync(unsigned int); | ||
244 | extern void enable_irq(unsigned int); | ||
245 | |||
246 | /* | ||
247 | * Simple Mask Register Support | ||
248 | */ | ||
249 | extern void make_maskreg_irq(unsigned int irq); | ||
250 | extern unsigned short *irq_mask_register; | ||
251 | |||
252 | /* | ||
253 | * Function for "on chip support modules". | ||
254 | */ | ||
255 | extern void make_ipr_irq(unsigned int irq, unsigned int addr, | ||
256 | int pos, int priority); | ||
257 | extern void make_imask_irq(unsigned int irq); | ||
258 | |||
259 | #define PORT_PACR 0xA4050100UL | 227 | #define PORT_PACR 0xA4050100UL |
260 | #define PORT_PBCR 0xA4050102UL | 228 | #define PORT_PBCR 0xA4050102UL |
261 | #define PORT_PCCR 0xA4050104UL | 229 | #define PORT_PCCR 0xA4050104UL |
@@ -343,8 +311,6 @@ extern void make_imask_irq(unsigned int irq); | |||
343 | #define IRQ6_PRIORITY 1 | 311 | #define IRQ6_PRIORITY 1 |
344 | #define IRQ7_PRIORITY 1 | 312 | #define IRQ7_PRIORITY 1 |
345 | 313 | ||
346 | extern int shmse_irq_demux(int irq); | 314 | int shmse_irq_demux(int irq); |
347 | #define __irq_demux(irq) shmse_irq_demux(irq) | ||
348 | #define irq_demux(irq) __irq_demux(irq) | ||
349 | 315 | ||
350 | #endif /* __ASM_SH_IRQ_SH73180_H */ | 316 | #endif /* __ASM_SH_IRQ_SH73180_H */ |
diff --git a/include/asm-sh/irq-sh7780.h b/include/asm-sh/irq-sh7780.h index 8c8ca1281084..7f90315cd830 100644 --- a/include/asm-sh/irq-sh7780.h +++ b/include/asm-sh/irq-sh7780.h | |||
@@ -299,29 +299,6 @@ | |||
299 | #define GPIO_IPR_POS 2 | 299 | #define GPIO_IPR_POS 2 |
300 | #define GPIO_PRIORITY 3 | 300 | #define GPIO_PRIORITY 3 |
301 | 301 | ||
302 | /* ONCHIP_NR_IRQS */ | ||
303 | #define NR_IRQS 150 /* 111 + 16 */ | ||
304 | |||
305 | /* In a generic kernel, NR_IRQS is an upper bound, and we should use | ||
306 | * ACTUAL_NR_IRQS (which uses the machine vector) to get the correct value. | ||
307 | */ | ||
308 | #define ACTUAL_NR_IRQS NR_IRQS | ||
309 | |||
310 | extern void disable_irq(unsigned int); | ||
311 | extern void disable_irq_nosync(unsigned int); | ||
312 | extern void enable_irq(unsigned int); | ||
313 | |||
314 | /* | ||
315 | * Simple Mask Register Support | ||
316 | */ | ||
317 | extern void make_maskreg_irq(unsigned int irq); | ||
318 | extern unsigned short *irq_mask_register; | ||
319 | |||
320 | /* | ||
321 | * Function for "on chip support modules". | ||
322 | */ | ||
323 | extern void make_imask_irq(unsigned int irq); | ||
324 | |||
325 | #define INTC_TMU0_MSK 0 | 302 | #define INTC_TMU0_MSK 0 |
326 | #define INTC_TMU3_MSK 1 | 303 | #define INTC_TMU3_MSK 1 |
327 | #define INTC_RTC_MSK 2 | 304 | #define INTC_RTC_MSK 2 |
diff --git a/include/asm-sh/irq.h b/include/asm-sh/irq.h index 060ec3c27207..42b8394c04ed 100644 --- a/include/asm-sh/irq.h +++ b/include/asm-sh/irq.h | |||
@@ -245,6 +245,7 @@ | |||
245 | #endif /* ST40STB1 */ | 245 | #endif /* ST40STB1 */ |
246 | 246 | ||
247 | #endif /* 775x / SH4-202 / ST40STB1 */ | 247 | #endif /* 775x / SH4-202 / ST40STB1 */ |
248 | #endif /* 7780 */ | ||
248 | 249 | ||
249 | /* NR_IRQS is made from three components: | 250 | /* NR_IRQS is made from three components: |
250 | * 1. ONCHIP_NR_IRQS - number of IRLS + on-chip peripherial modules | 251 | * 1. ONCHIP_NR_IRQS - number of IRLS + on-chip peripherial modules |
@@ -274,8 +275,11 @@ | |||
274 | # define ONCHIP_NR_IRQS 72 | 275 | # define ONCHIP_NR_IRQS 72 |
275 | #elif defined(CONFIG_CPU_SUBTYPE_ST40STB1) | 276 | #elif defined(CONFIG_CPU_SUBTYPE_ST40STB1) |
276 | # define ONCHIP_NR_IRQS 144 | 277 | # define ONCHIP_NR_IRQS 144 |
277 | #elif defined(CONFIG_CPU_SUBTYPE_SH7300) | 278 | #elif defined(CONFIG_CPU_SUBTYPE_SH7300) || \ |
279 | defined(CONFIG_CPU_SUBTYPE_SH73180) | ||
278 | # define ONCHIP_NR_IRQS 109 | 280 | # define ONCHIP_NR_IRQS 109 |
281 | #elif defined(CONFIG_CPU_SUBTYPE_SH7780) | ||
282 | # define ONCHIP_NR_IRQS 111 | ||
279 | #elif defined(CONFIG_SH_UNKNOWN) /* Most be last */ | 283 | #elif defined(CONFIG_SH_UNKNOWN) /* Most be last */ |
280 | # define ONCHIP_NR_IRQS 144 | 284 | # define ONCHIP_NR_IRQS 144 |
281 | #endif | 285 | #endif |
@@ -306,6 +310,8 @@ | |||
306 | # define OFFCHIP_NR_IRQS 96 | 310 | # define OFFCHIP_NR_IRQS 96 |
307 | #elif defined (CONFIG_SH_TITAN) | 311 | #elif defined (CONFIG_SH_TITAN) |
308 | # define OFFCHIP_NR_IRQS 4 | 312 | # define OFFCHIP_NR_IRQS 4 |
313 | #elif defined(CONFIG_SH_R7780RP) | ||
314 | # define OFFCHIP_NR_IRQS 16 | ||
309 | #elif defined(CONFIG_SH_UNKNOWN) | 315 | #elif defined(CONFIG_SH_UNKNOWN) |
310 | # define OFFCHIP_NR_IRQS 16 /* Must also be last */ | 316 | # define OFFCHIP_NR_IRQS 16 /* Must also be last */ |
311 | #else | 317 | #else |
@@ -550,7 +556,7 @@ extern int ipr_irq_demux(int irq); | |||
550 | #define INTC_ICR_IRLM (1<<7) | 556 | #define INTC_ICR_IRLM (1<<7) |
551 | #endif | 557 | #endif |
552 | 558 | ||
553 | #else | 559 | #ifdef CONFIG_CPU_SUBTYPE_SH7780 |
554 | #include <asm/irq-sh7780.h> | 560 | #include <asm/irq-sh7780.h> |
555 | #endif | 561 | #endif |
556 | 562 | ||
diff --git a/include/asm-sh/microdev/irq.h b/include/asm-sh/microdev.h index 47f6f77a65f0..018332a9e590 100644 --- a/include/asm-sh/microdev/irq.h +++ b/include/asm-sh/microdev.h | |||
@@ -1,32 +1,27 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-sh/irq_microdev.h | 2 | * linux/include/asm-sh/microdev.h |
3 | * | 3 | * |
4 | * Copyright (C) 2003 Sean McGoogan (Sean.McGoogan@superh.com) | 4 | * Copyright (C) 2003 Sean McGoogan (Sean.McGoogan@superh.com) |
5 | * | 5 | * |
6 | * IRQ functions for the SuperH SH4-202 MicroDev board. | 6 | * Definitions for the SuperH SH4-202 MicroDev board. |
7 | * | 7 | * |
8 | * May be copied or modified under the terms of the GNU General Public | 8 | * May be copied or modified under the terms of the GNU General Public |
9 | * License. See linux/COPYING for more information. | 9 | * License. See linux/COPYING for more information. |
10 | * | ||
11 | */ | 10 | */ |
12 | 11 | #ifndef __ASM_SH_MICRODEV_H | |
13 | 12 | #define __ASM_SH_MICRODEV_H | |
14 | #ifndef _ASM_SH_IRQ_MICRODEV_H | ||
15 | #define _ASM_SH_IRQ_MICRODEV_H | ||
16 | 13 | ||
17 | extern void init_microdev_irq(void); | 14 | extern void init_microdev_irq(void); |
18 | extern void microdev_print_fpga_intc_status(void); | 15 | extern void microdev_print_fpga_intc_status(void); |
19 | 16 | ||
20 | 17 | /* | |
21 | /* | 18 | * The following are useful macros for manipulating the interrupt |
22 | * The following are useful macros for manipulating the | 19 | * controller (INTC) on the CPU-board FPGA. should be noted that there |
23 | * interrupt controller (INTC) on the CPU-board FPGA. | 20 | * is an INTC on the FPGA, and a seperate INTC on the SH4-202 core - |
24 | * It should be noted that there is an INTC on the FPGA, | 21 | * these are two different things, both of which need to be prorammed to |
25 | * and a seperate INTC on the SH4-202 core - these are | 22 | * correctly route - unfortunately, they have the same name and |
26 | * two different things, both of which need to be prorammed | 23 | * abbreviations! |
27 | * to correctly route - unfortunately, they have the | 24 | */ |
28 | * same name and abbreviations! | ||
29 | */ | ||
30 | #define MICRODEV_FPGA_INTC_BASE 0xa6110000ul /* INTC base address on CPU-board FPGA */ | 25 | #define MICRODEV_FPGA_INTC_BASE 0xa6110000ul /* INTC base address on CPU-board FPGA */ |
31 | #define MICRODEV_FPGA_INTENB_REG (MICRODEV_FPGA_INTC_BASE+0ul) /* Interrupt Enable Register on INTC on CPU-board FPGA */ | 26 | #define MICRODEV_FPGA_INTENB_REG (MICRODEV_FPGA_INTC_BASE+0ul) /* Interrupt Enable Register on INTC on CPU-board FPGA */ |
32 | #define MICRODEV_FPGA_INTDSB_REG (MICRODEV_FPGA_INTC_BASE+8ul) /* Interrupt Disable Register on INTC on CPU-board FPGA */ | 27 | #define MICRODEV_FPGA_INTDSB_REG (MICRODEV_FPGA_INTC_BASE+8ul) /* Interrupt Disable Register on INTC on CPU-board FPGA */ |
@@ -38,10 +33,10 @@ extern void microdev_print_fpga_intc_status(void); | |||
38 | #define MICRODEV_FPGA_INTREQ_REG (MICRODEV_FPGA_INTC_BASE+0x38ul) /* Interrupt Request Register on INTC on CPU-board FPGA */ | 33 | #define MICRODEV_FPGA_INTREQ_REG (MICRODEV_FPGA_INTC_BASE+0x38ul) /* Interrupt Request Register on INTC on CPU-board FPGA */ |
39 | 34 | ||
40 | 35 | ||
41 | /* | 36 | /* |
42 | * The following are the IRQ numbers for the Linux Kernel for external interrupts. | 37 | * The following are the IRQ numbers for the Linux Kernel for external |
43 | * i.e. the numbers seen by 'cat /proc/interrupt'. | 38 | * interrupts. i.e. the numbers seen by 'cat /proc/interrupt'. |
44 | */ | 39 | */ |
45 | #define MICRODEV_LINUX_IRQ_KEYBOARD 1 /* SuperIO Keyboard */ | 40 | #define MICRODEV_LINUX_IRQ_KEYBOARD 1 /* SuperIO Keyboard */ |
46 | #define MICRODEV_LINUX_IRQ_SERIAL1 2 /* SuperIO Serial #1 */ | 41 | #define MICRODEV_LINUX_IRQ_SERIAL1 2 /* SuperIO Serial #1 */ |
47 | #define MICRODEV_LINUX_IRQ_ETHERNET 3 /* on-board Ethnernet */ | 42 | #define MICRODEV_LINUX_IRQ_ETHERNET 3 /* on-board Ethnernet */ |
@@ -51,10 +46,11 @@ extern void microdev_print_fpga_intc_status(void); | |||
51 | #define MICRODEV_LINUX_IRQ_IDE2 13 /* SuperIO IDE #2 */ | 46 | #define MICRODEV_LINUX_IRQ_IDE2 13 /* SuperIO IDE #2 */ |
52 | #define MICRODEV_LINUX_IRQ_IDE1 14 /* SuperIO IDE #1 */ | 47 | #define MICRODEV_LINUX_IRQ_IDE1 14 /* SuperIO IDE #1 */ |
53 | 48 | ||
54 | /* | 49 | /* |
55 | * The following are the IRQ numbers for the INTC on the FPGA for external interrupts. | 50 | * The following are the IRQ numbers for the INTC on the FPGA for |
56 | * i.e. the bits in the INTC registers in the FPGA. | 51 | * external interrupts. i.e. the bits in the INTC registers in the |
57 | */ | 52 | * FPGA. |
53 | */ | ||
58 | #define MICRODEV_FPGA_IRQ_KEYBOARD 1 /* SuperIO Keyboard */ | 54 | #define MICRODEV_FPGA_IRQ_KEYBOARD 1 /* SuperIO Keyboard */ |
59 | #define MICRODEV_FPGA_IRQ_SERIAL1 3 /* SuperIO Serial #1 */ | 55 | #define MICRODEV_FPGA_IRQ_SERIAL1 3 /* SuperIO Serial #1 */ |
60 | #define MICRODEV_FPGA_IRQ_SERIAL2 4 /* SuperIO Serial #2 */ | 56 | #define MICRODEV_FPGA_IRQ_SERIAL2 4 /* SuperIO Serial #2 */ |
@@ -69,4 +65,16 @@ extern void microdev_print_fpga_intc_status(void); | |||
69 | #define MICRODEV_IRQ_PCI_INTC 10 | 65 | #define MICRODEV_IRQ_PCI_INTC 10 |
70 | #define MICRODEV_IRQ_PCI_INTD 11 | 66 | #define MICRODEV_IRQ_PCI_INTD 11 |
71 | 67 | ||
72 | #endif /* _ASM_SH_IRQ_MICRODEV_H */ | 68 | #define __IO_PREFIX microdev |
69 | #include <asm/io_generic.h> | ||
70 | |||
71 | #if defined(CONFIG_PCI) | ||
72 | unsigned char microdev_pci_inb(unsigned long port); | ||
73 | unsigned short microdev_pci_inw(unsigned long port); | ||
74 | unsigned long microdev_pci_inl(unsigned long port); | ||
75 | void microdev_pci_outb(unsigned char data, unsigned long port); | ||
76 | void microdev_pci_outw(unsigned short data, unsigned long port); | ||
77 | void microdev_pci_outl(unsigned long data, unsigned long port); | ||
78 | #endif | ||
79 | |||
80 | #endif /* __ASM_SH_MICRODEV_H */ | ||
diff --git a/include/asm-sh/microdev/io.h b/include/asm-sh/microdev/io.h deleted file mode 100644 index f2ca4ac8c88a..000000000000 --- a/include/asm-sh/microdev/io.h +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-sh/io_microdev.h | ||
3 | * | ||
4 | * Copyright (C) 2003 Sean McGoogan (Sean.McGoogan@superh.com) | ||
5 | * | ||
6 | * IO functions for the SuperH SH4-202 MicroDev board. | ||
7 | * | ||
8 | * May be copied or modified under the terms of the GNU General Public | ||
9 | * License. See linux/COPYING for more information. | ||
10 | * | ||
11 | */ | ||
12 | |||
13 | |||
14 | #ifndef _ASM_SH_IO_MICRODEV_H | ||
15 | #define _ASM_SH_IO_MICRODEV_H | ||
16 | |||
17 | extern unsigned long microdev_isa_port2addr(unsigned long offset); | ||
18 | |||
19 | extern unsigned char microdev_inb(unsigned long port); | ||
20 | extern unsigned short microdev_inw(unsigned long port); | ||
21 | extern unsigned int microdev_inl(unsigned long port); | ||
22 | |||
23 | extern void microdev_outb(unsigned char value, unsigned long port); | ||
24 | extern void microdev_outw(unsigned short value, unsigned long port); | ||
25 | extern void microdev_outl(unsigned int value, unsigned long port); | ||
26 | |||
27 | extern unsigned char microdev_inb_p(unsigned long port); | ||
28 | extern unsigned short microdev_inw_p(unsigned long port); | ||
29 | extern unsigned int microdev_inl_p(unsigned long port); | ||
30 | |||
31 | extern void microdev_outb_p(unsigned char value, unsigned long port); | ||
32 | extern void microdev_outw_p(unsigned short value, unsigned long port); | ||
33 | extern void microdev_outl_p(unsigned int value, unsigned long port); | ||
34 | |||
35 | extern void microdev_insb(unsigned long port, void *addr, unsigned long count); | ||
36 | extern void microdev_insw(unsigned long port, void *addr, unsigned long count); | ||
37 | extern void microdev_insl(unsigned long port, void *addr, unsigned long count); | ||
38 | |||
39 | extern void microdev_outsb(unsigned long port, const void *addr, unsigned long count); | ||
40 | extern void microdev_outsw(unsigned long port, const void *addr, unsigned long count); | ||
41 | extern void microdev_outsl(unsigned long port, const void *addr, unsigned long count); | ||
42 | |||
43 | #if defined(CONFIG_PCI) | ||
44 | extern unsigned char microdev_pci_inb(unsigned long port); | ||
45 | extern unsigned short microdev_pci_inw(unsigned long port); | ||
46 | extern unsigned long microdev_pci_inl(unsigned long port); | ||
47 | extern void microdev_pci_outb(unsigned char data, unsigned long port); | ||
48 | extern void microdev_pci_outw(unsigned short data, unsigned long port); | ||
49 | extern void microdev_pci_outl(unsigned long data, unsigned long port); | ||
50 | #endif | ||
51 | |||
52 | #endif /* _ASM_SH_IO_MICRODEV_H */ | ||
53 | |||
diff --git a/include/asm-sh/mman.h b/include/asm-sh/mman.h index 693bd55a3710..156eb0225cf6 100644 --- a/include/asm-sh/mman.h +++ b/include/asm-sh/mman.h | |||
@@ -1,19 +1,7 @@ | |||
1 | #ifndef __ASM_SH_MMAN_H | 1 | #ifndef __ASM_SH_MMAN_H |
2 | #define __ASM_SH_MMAN_H | 2 | #define __ASM_SH_MMAN_H |
3 | 3 | ||
4 | #define PROT_READ 0x1 /* page can be read */ | 4 | #include <asm-generic/mman.h> |
5 | #define PROT_WRITE 0x2 /* page can be written */ | ||
6 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
7 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
8 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
9 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
10 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
11 | |||
12 | #define MAP_SHARED 0x01 /* Share changes */ | ||
13 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
14 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
15 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
16 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
17 | 5 | ||
18 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 6 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
19 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 7 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
@@ -23,22 +11,7 @@ | |||
23 | #define MAP_POPULATE 0x8000 /* populate (prefault) page tables */ | 11 | #define MAP_POPULATE 0x8000 /* populate (prefault) page tables */ |
24 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 12 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
25 | 13 | ||
26 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
27 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
28 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
29 | |||
30 | #define MCL_CURRENT 1 /* lock all current mappings */ | 14 | #define MCL_CURRENT 1 /* lock all current mappings */ |
31 | #define MCL_FUTURE 2 /* lock all future mappings */ | 15 | #define MCL_FUTURE 2 /* lock all future mappings */ |
32 | 16 | ||
33 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
34 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
35 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
36 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
37 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
38 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
39 | |||
40 | /* compatibility flags */ | ||
41 | #define MAP_ANON MAP_ANONYMOUS | ||
42 | #define MAP_FILE 0 | ||
43 | |||
44 | #endif /* __ASM_SH_MMAN_H */ | 17 | #endif /* __ASM_SH_MMAN_H */ |
diff --git a/include/asm-sh/processor.h b/include/asm-sh/processor.h index c4904797d6df..fa5bd2d8803e 100644 --- a/include/asm-sh/processor.h +++ b/include/asm-sh/processor.h | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <asm/page.h> | 12 | #include <asm/page.h> |
13 | #include <asm/types.h> | 13 | #include <asm/types.h> |
14 | #include <asm/cache.h> | 14 | #include <asm/cache.h> |
15 | #include <linux/threads.h> | ||
16 | #include <asm/ptrace.h> | 15 | #include <asm/ptrace.h> |
17 | 16 | ||
18 | /* | 17 | /* |
@@ -30,7 +29,7 @@ | |||
30 | * CPU type and hardware bug flags. Kept separately for each CPU. | 29 | * CPU type and hardware bug flags. Kept separately for each CPU. |
31 | * | 30 | * |
32 | * Each one of these also needs a CONFIG_CPU_SUBTYPE_xxx entry | 31 | * Each one of these also needs a CONFIG_CPU_SUBTYPE_xxx entry |
33 | * in arch/sh/Kconfig, as well as an entry in arch/sh/kernel/setup.c | 32 | * in arch/sh/mm/Kconfig, as well as an entry in arch/sh/kernel/setup.c |
34 | * for parsing the subtype in get_cpu_subtype(). | 33 | * for parsing the subtype in get_cpu_subtype(). |
35 | */ | 34 | */ |
36 | enum cpu_type { | 35 | enum cpu_type { |
@@ -44,7 +43,7 @@ enum cpu_type { | |||
44 | /* SH-4 types */ | 43 | /* SH-4 types */ |
45 | CPU_SH7750, CPU_SH7750S, CPU_SH7750R, CPU_SH7751, CPU_SH7751R, | 44 | CPU_SH7750, CPU_SH7750S, CPU_SH7750R, CPU_SH7751, CPU_SH7751R, |
46 | CPU_SH7760, CPU_ST40RA, CPU_ST40GX1, CPU_SH4_202, CPU_SH4_501, | 45 | CPU_SH7760, CPU_ST40RA, CPU_ST40GX1, CPU_SH4_202, CPU_SH4_501, |
47 | CPU_SH73180, | 46 | CPU_SH73180, CPU_SH7770, CPU_SH7780, CPU_SH7781, |
48 | 47 | ||
49 | /* Unknown subtype */ | 48 | /* Unknown subtype */ |
50 | CPU_SH_NONE | 49 | CPU_SH_NONE |
@@ -52,14 +51,8 @@ enum cpu_type { | |||
52 | 51 | ||
53 | struct sh_cpuinfo { | 52 | struct sh_cpuinfo { |
54 | enum cpu_type type; | 53 | enum cpu_type type; |
55 | char hard_math; | ||
56 | unsigned long loops_per_jiffy; | 54 | unsigned long loops_per_jiffy; |
57 | 55 | ||
58 | unsigned int cpu_clock, master_clock, bus_clock, module_clock; | ||
59 | #ifdef CONFIG_CPU_SUBTYPE_ST40STB1 | ||
60 | unsigned int memory_clock; | ||
61 | #endif | ||
62 | |||
63 | struct cache_info icache; | 56 | struct cache_info icache; |
64 | struct cache_info dcache; | 57 | struct cache_info dcache; |
65 | 58 | ||
@@ -131,7 +124,7 @@ union sh_fpu_union { | |||
131 | struct sh_fpu_soft_struct soft; | 124 | struct sh_fpu_soft_struct soft; |
132 | }; | 125 | }; |
133 | 126 | ||
134 | /* | 127 | /* |
135 | * Processor flags | 128 | * Processor flags |
136 | */ | 129 | */ |
137 | 130 | ||
@@ -140,6 +133,7 @@ union sh_fpu_union { | |||
140 | #define CPU_HAS_MMU_PAGE_ASSOC 0x0004 /* SH3: TLB way selection bit support */ | 133 | #define CPU_HAS_MMU_PAGE_ASSOC 0x0004 /* SH3: TLB way selection bit support */ |
141 | #define CPU_HAS_DSP 0x0008 /* SH-DSP: DSP support */ | 134 | #define CPU_HAS_DSP 0x0008 /* SH-DSP: DSP support */ |
142 | #define CPU_HAS_PERF_COUNTER 0x0010 /* Hardware performance counters */ | 135 | #define CPU_HAS_PERF_COUNTER 0x0010 /* Hardware performance counters */ |
136 | #define CPU_HAS_PTEA 0x0020 /* PTEA register */ | ||
143 | 137 | ||
144 | struct thread_struct { | 138 | struct thread_struct { |
145 | unsigned long sp; | 139 | unsigned long sp; |
@@ -160,10 +154,10 @@ extern int ubc_usercnt; | |||
160 | #define INIT_THREAD { \ | 154 | #define INIT_THREAD { \ |
161 | sizeof(init_stack) + (long) &init_stack, /* sp */ \ | 155 | sizeof(init_stack) + (long) &init_stack, /* sp */ \ |
162 | 0, /* pc */ \ | 156 | 0, /* pc */ \ |
163 | 0, 0, \ | 157 | 0, 0, \ |
164 | 0, \ | 158 | 0, \ |
165 | 0, \ | 159 | 0, \ |
166 | {{{0,}},} /* fpu state */ \ | 160 | {{{0,}},} /* fpu state */ \ |
167 | } | 161 | } |
168 | 162 | ||
169 | /* | 163 | /* |
@@ -171,7 +165,7 @@ extern int ubc_usercnt; | |||
171 | */ | 165 | */ |
172 | #define start_thread(regs, new_pc, new_sp) \ | 166 | #define start_thread(regs, new_pc, new_sp) \ |
173 | set_fs(USER_DS); \ | 167 | set_fs(USER_DS); \ |
174 | regs->pr = 0; \ | 168 | regs->pr = 0; \ |
175 | regs->sr = SR_FD; /* User mode. */ \ | 169 | regs->sr = SR_FD; /* User mode. */ \ |
176 | regs->pc = new_pc; \ | 170 | regs->pc = new_pc; \ |
177 | regs->regs[15] = new_sp | 171 | regs->regs[15] = new_sp |
@@ -239,16 +233,16 @@ extern void save_fpu(struct task_struct *__tsk, struct pt_regs *regs); | |||
239 | #define save_fpu(tsk) do { } while (0) | 233 | #define save_fpu(tsk) do { } while (0) |
240 | #endif | 234 | #endif |
241 | 235 | ||
242 | #define unlazy_fpu(tsk, regs) do { \ | 236 | #define unlazy_fpu(tsk, regs) do { \ |
243 | if (test_tsk_thread_flag(tsk, TIF_USEDFPU)) { \ | 237 | if (test_tsk_thread_flag(tsk, TIF_USEDFPU)) { \ |
244 | save_fpu(tsk, regs); \ | 238 | save_fpu(tsk, regs); \ |
245 | } \ | 239 | } \ |
246 | } while (0) | 240 | } while (0) |
247 | 241 | ||
248 | #define clear_fpu(tsk, regs) do { \ | 242 | #define clear_fpu(tsk, regs) do { \ |
249 | if (test_tsk_thread_flag(tsk, TIF_USEDFPU)) { \ | 243 | if (test_tsk_thread_flag(tsk, TIF_USEDFPU)) { \ |
250 | clear_tsk_thread_flag(tsk, TIF_USEDFPU); \ | 244 | clear_tsk_thread_flag(tsk, TIF_USEDFPU); \ |
251 | release_fpu(regs); \ | 245 | release_fpu(regs); \ |
252 | } \ | 246 | } \ |
253 | } while (0) | 247 | } while (0) |
254 | 248 | ||
diff --git a/include/asm-sh64/ioctls.h b/include/asm-sh64/ioctls.h index 08f3c1f2e419..6b0c04f63c57 100644 --- a/include/asm-sh64/ioctls.h +++ b/include/asm-sh64/ioctls.h | |||
@@ -111,6 +111,6 @@ | |||
111 | #define TIOCSERSETMULTI 0x40a8545b /* _IOW('T', 91, struct serial_multiport_struct) 0x545B */ /* Set multiport config */ | 111 | #define TIOCSERSETMULTI 0x40a8545b /* _IOW('T', 91, struct serial_multiport_struct) 0x545B */ /* Set multiport config */ |
112 | 112 | ||
113 | #define TIOCMIWAIT 0x545c /* _IO('T', 92) wait for a change on serial input line(s) */ | 113 | #define TIOCMIWAIT 0x545c /* _IO('T', 92) wait for a change on serial input line(s) */ |
114 | #define TIOCGICOUNT 0x802c545d /* _IOR('T', 93, struct async_icount) 0x545D */ /* read serial port inline interrupt counts */ | 114 | #define TIOCGICOUNT 0x545d /* read serial port inline interrupt counts */ |
115 | 115 | ||
116 | #endif /* __ASM_SH64_IOCTLS_H */ | 116 | #endif /* __ASM_SH64_IOCTLS_H */ |
diff --git a/include/asm-sparc/mman.h b/include/asm-sparc/mman.h index 98435ad8619e..88d1886abf3b 100644 --- a/include/asm-sparc/mman.h +++ b/include/asm-sparc/mman.h | |||
@@ -2,21 +2,10 @@ | |||
2 | #ifndef __SPARC_MMAN_H__ | 2 | #ifndef __SPARC_MMAN_H__ |
3 | #define __SPARC_MMAN_H__ | 3 | #define __SPARC_MMAN_H__ |
4 | 4 | ||
5 | #include <asm-generic/mman.h> | ||
6 | |||
5 | /* SunOS'ified... */ | 7 | /* SunOS'ified... */ |
6 | 8 | ||
7 | #define PROT_READ 0x1 /* page can be read */ | ||
8 | #define PROT_WRITE 0x2 /* page can be written */ | ||
9 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
10 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
11 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
12 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
13 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
14 | |||
15 | #define MAP_SHARED 0x01 /* Share changes */ | ||
16 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
17 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
18 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
19 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
20 | #define MAP_RENAME MAP_ANONYMOUS /* In SunOS terminology */ | 9 | #define MAP_RENAME MAP_ANONYMOUS /* In SunOS terminology */ |
21 | #define MAP_NORESERVE 0x40 /* don't reserve swap pages */ | 10 | #define MAP_NORESERVE 0x40 /* don't reserve swap pages */ |
22 | #define MAP_INHERIT 0x80 /* SunOS doesn't do this, but... */ | 11 | #define MAP_INHERIT 0x80 /* SunOS doesn't do this, but... */ |
@@ -27,10 +16,6 @@ | |||
27 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 16 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
28 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ | 17 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ |
29 | 18 | ||
30 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
31 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
32 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
33 | |||
34 | #define MCL_CURRENT 0x2000 /* lock all currently mapped pages */ | 19 | #define MCL_CURRENT 0x2000 /* lock all currently mapped pages */ |
35 | #define MCL_FUTURE 0x4000 /* lock all additions to address space */ | 20 | #define MCL_FUTURE 0x4000 /* lock all additions to address space */ |
36 | 21 | ||
@@ -48,16 +33,6 @@ | |||
48 | #define MC_LOCKAS 5 /* Lock an entire address space of the calling process */ | 33 | #define MC_LOCKAS 5 /* Lock an entire address space of the calling process */ |
49 | #define MC_UNLOCKAS 6 /* Unlock entire address space of calling process */ | 34 | #define MC_UNLOCKAS 6 /* Unlock entire address space of calling process */ |
50 | 35 | ||
51 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
52 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
53 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
54 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
55 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
56 | #define MADV_FREE 0x5 /* (Solaris) contents can be freed */ | 36 | #define MADV_FREE 0x5 /* (Solaris) contents can be freed */ |
57 | #define MADV_REMOVE 0x6 /* remove these pages & resources */ | ||
58 | |||
59 | /* compatibility flags */ | ||
60 | #define MAP_ANON MAP_ANONYMOUS | ||
61 | #define MAP_FILE 0 | ||
62 | 37 | ||
63 | #endif /* __SPARC_MMAN_H__ */ | 38 | #endif /* __SPARC_MMAN_H__ */ |
diff --git a/include/asm-sparc/unistd.h b/include/asm-sparc/unistd.h index 2ac64e65e336..64ec640a40ee 100644 --- a/include/asm-sparc/unistd.h +++ b/include/asm-sparc/unistd.h | |||
@@ -305,7 +305,7 @@ | |||
305 | #define __NR_mknodat 286 | 305 | #define __NR_mknodat 286 |
306 | #define __NR_fchownat 287 | 306 | #define __NR_fchownat 287 |
307 | #define __NR_futimesat 288 | 307 | #define __NR_futimesat 288 |
308 | #define __NR_newfstatat 289 | 308 | #define __NR_fstatat64 289 |
309 | #define __NR_unlinkat 290 | 309 | #define __NR_unlinkat 290 |
310 | #define __NR_renameat 291 | 310 | #define __NR_renameat 291 |
311 | #define __NR_linkat 292 | 311 | #define __NR_linkat 292 |
@@ -315,11 +315,12 @@ | |||
315 | #define __NR_faccessat 296 | 315 | #define __NR_faccessat 296 |
316 | #define __NR_pselect6 297 | 316 | #define __NR_pselect6 297 |
317 | #define __NR_ppoll 298 | 317 | #define __NR_ppoll 298 |
318 | #define __NR_unshare 299 | ||
318 | 319 | ||
319 | /* WARNING: You MAY NOT add syscall numbers larger than 298, since | 320 | /* WARNING: You MAY NOT add syscall numbers larger than 299, since |
320 | * all of the syscall tables in the Sparc kernel are | 321 | * all of the syscall tables in the Sparc kernel are |
321 | * sized to have 298 entries (starting at zero). Therefore | 322 | * sized to have 299 entries (starting at zero). Therefore |
322 | * find a free slot in the 0-298 range. | 323 | * find a free slot in the 0-299 range. |
323 | */ | 324 | */ |
324 | 325 | ||
325 | #define _syscall0(type,name) \ | 326 | #define _syscall0(type,name) \ |
diff --git a/include/asm-sparc64/futex.h b/include/asm-sparc64/futex.h index 6a332a9f099c..34c4b43d3f98 100644 --- a/include/asm-sparc64/futex.h +++ b/include/asm-sparc64/futex.h | |||
@@ -1,6 +1,86 @@ | |||
1 | #ifndef _ASM_FUTEX_H | 1 | #ifndef _SPARC64_FUTEX_H |
2 | #define _ASM_FUTEX_H | 2 | #define _SPARC64_FUTEX_H |
3 | 3 | ||
4 | #include <asm-generic/futex.h> | 4 | #include <linux/futex.h> |
5 | #include <asm/errno.h> | ||
6 | #include <asm/system.h> | ||
7 | #include <asm/uaccess.h> | ||
5 | 8 | ||
6 | #endif | 9 | #define __futex_cas_op(insn, ret, oldval, uaddr, oparg) \ |
10 | __asm__ __volatile__( \ | ||
11 | "\n1: lduwa [%3] %%asi, %2\n" \ | ||
12 | " " insn "\n" \ | ||
13 | "2: casa [%3] %%asi, %2, %1\n" \ | ||
14 | " cmp %2, %1\n" \ | ||
15 | " bne,pn %%icc, 1b\n" \ | ||
16 | " mov 0, %0\n" \ | ||
17 | "3:\n" \ | ||
18 | " .section .fixup,#alloc,#execinstr\n" \ | ||
19 | " .align 4\n" \ | ||
20 | "4: ba 3b\n" \ | ||
21 | " mov %5, %0\n" \ | ||
22 | " .previous\n" \ | ||
23 | " .section __ex_table,\"a\"\n" \ | ||
24 | " .align 4\n" \ | ||
25 | " .word 1b, 4b\n" \ | ||
26 | " .word 2b, 4b\n" \ | ||
27 | " .previous\n" \ | ||
28 | : "=&r" (ret), "=&r" (oldval), "=&r" (tem) \ | ||
29 | : "r" (uaddr), "r" (oparg), "i" (-EFAULT) \ | ||
30 | : "memory") | ||
31 | |||
32 | static inline int futex_atomic_op_inuser(int encoded_op, int __user *uaddr) | ||
33 | { | ||
34 | int op = (encoded_op >> 28) & 7; | ||
35 | int cmp = (encoded_op >> 24) & 15; | ||
36 | int oparg = (encoded_op << 8) >> 20; | ||
37 | int cmparg = (encoded_op << 20) >> 20; | ||
38 | int oldval = 0, ret, tem; | ||
39 | |||
40 | if (unlikely(!access_ok(VERIFY_WRITE, uaddr, sizeof(int)))) | ||
41 | return -EFAULT; | ||
42 | if (unlikely((((unsigned long) uaddr) & 0x3UL))) | ||
43 | return -EINVAL; | ||
44 | |||
45 | if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) | ||
46 | oparg = 1 << oparg; | ||
47 | |||
48 | inc_preempt_count(); | ||
49 | |||
50 | switch (op) { | ||
51 | case FUTEX_OP_SET: | ||
52 | __futex_cas_op("mov\t%4, %1", ret, oldval, uaddr, oparg); | ||
53 | break; | ||
54 | case FUTEX_OP_ADD: | ||
55 | __futex_cas_op("add\t%2, %4, %1", ret, oldval, uaddr, oparg); | ||
56 | break; | ||
57 | case FUTEX_OP_OR: | ||
58 | __futex_cas_op("or\t%2, %4, %1", ret, oldval, uaddr, oparg); | ||
59 | break; | ||
60 | case FUTEX_OP_ANDN: | ||
61 | __futex_cas_op("and\t%2, %4, %1", ret, oldval, uaddr, oparg); | ||
62 | break; | ||
63 | case FUTEX_OP_XOR: | ||
64 | __futex_cas_op("xor\t%2, %4, %1", ret, oldval, uaddr, oparg); | ||
65 | break; | ||
66 | default: | ||
67 | ret = -ENOSYS; | ||
68 | } | ||
69 | |||
70 | dec_preempt_count(); | ||
71 | |||
72 | if (!ret) { | ||
73 | switch (cmp) { | ||
74 | case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break; | ||
75 | case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break; | ||
76 | case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break; | ||
77 | case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break; | ||
78 | case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break; | ||
79 | case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break; | ||
80 | default: ret = -ENOSYS; | ||
81 | } | ||
82 | } | ||
83 | return ret; | ||
84 | } | ||
85 | |||
86 | #endif /* !(_SPARC64_FUTEX_H) */ | ||
diff --git a/include/asm-sparc64/mman.h b/include/asm-sparc64/mman.h index cb4b6156194d..6fd878e61435 100644 --- a/include/asm-sparc64/mman.h +++ b/include/asm-sparc64/mman.h | |||
@@ -2,21 +2,10 @@ | |||
2 | #ifndef __SPARC64_MMAN_H__ | 2 | #ifndef __SPARC64_MMAN_H__ |
3 | #define __SPARC64_MMAN_H__ | 3 | #define __SPARC64_MMAN_H__ |
4 | 4 | ||
5 | #include <asm-generic/mman.h> | ||
6 | |||
5 | /* SunOS'ified... */ | 7 | /* SunOS'ified... */ |
6 | 8 | ||
7 | #define PROT_READ 0x1 /* page can be read */ | ||
8 | #define PROT_WRITE 0x2 /* page can be written */ | ||
9 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
10 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
11 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
12 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
13 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
14 | |||
15 | #define MAP_SHARED 0x01 /* Share changes */ | ||
16 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
17 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
18 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
19 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
20 | #define MAP_RENAME MAP_ANONYMOUS /* In SunOS terminology */ | 9 | #define MAP_RENAME MAP_ANONYMOUS /* In SunOS terminology */ |
21 | #define MAP_NORESERVE 0x40 /* don't reserve swap pages */ | 10 | #define MAP_NORESERVE 0x40 /* don't reserve swap pages */ |
22 | #define MAP_INHERIT 0x80 /* SunOS doesn't do this, but... */ | 11 | #define MAP_INHERIT 0x80 /* SunOS doesn't do this, but... */ |
@@ -27,10 +16,6 @@ | |||
27 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 16 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
28 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ | 17 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ |
29 | 18 | ||
30 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
31 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
32 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
33 | |||
34 | #define MCL_CURRENT 0x2000 /* lock all currently mapped pages */ | 19 | #define MCL_CURRENT 0x2000 /* lock all currently mapped pages */ |
35 | #define MCL_FUTURE 0x4000 /* lock all additions to address space */ | 20 | #define MCL_FUTURE 0x4000 /* lock all additions to address space */ |
36 | 21 | ||
@@ -48,16 +33,6 @@ | |||
48 | #define MC_LOCKAS 5 /* Lock an entire address space of the calling process */ | 33 | #define MC_LOCKAS 5 /* Lock an entire address space of the calling process */ |
49 | #define MC_UNLOCKAS 6 /* Unlock entire address space of calling process */ | 34 | #define MC_UNLOCKAS 6 /* Unlock entire address space of calling process */ |
50 | 35 | ||
51 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
52 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
53 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
54 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
55 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
56 | #define MADV_FREE 0x5 /* (Solaris) contents can be freed */ | 36 | #define MADV_FREE 0x5 /* (Solaris) contents can be freed */ |
57 | #define MADV_REMOVE 0x6 /* remove these pages & resources */ | ||
58 | |||
59 | /* compatibility flags */ | ||
60 | #define MAP_ANON MAP_ANONYMOUS | ||
61 | #define MAP_FILE 0 | ||
62 | 37 | ||
63 | #endif /* __SPARC64_MMAN_H__ */ | 38 | #endif /* __SPARC64_MMAN_H__ */ |
diff --git a/include/asm-sparc64/smp.h b/include/asm-sparc64/smp.h index 110a2de89123..473edb2603ec 100644 --- a/include/asm-sparc64/smp.h +++ b/include/asm-sparc64/smp.h | |||
@@ -66,8 +66,14 @@ static __inline__ int hard_smp_processor_id(void) | |||
66 | 66 | ||
67 | #define raw_smp_processor_id() (current_thread_info()->cpu) | 67 | #define raw_smp_processor_id() (current_thread_info()->cpu) |
68 | 68 | ||
69 | extern void smp_setup_cpu_possible_map(void); | ||
70 | |||
69 | #endif /* !(__ASSEMBLY__) */ | 71 | #endif /* !(__ASSEMBLY__) */ |
70 | 72 | ||
73 | #else | ||
74 | |||
75 | #define smp_setup_cpu_possible_map() do { } while (0) | ||
76 | |||
71 | #endif /* !(CONFIG_SMP) */ | 77 | #endif /* !(CONFIG_SMP) */ |
72 | 78 | ||
73 | #define NO_PROC_ID 0xFF | 79 | #define NO_PROC_ID 0xFF |
diff --git a/include/asm-sparc64/spinlock.h b/include/asm-sparc64/spinlock.h index ec85d12d73b9..508c416e9d6a 100644 --- a/include/asm-sparc64/spinlock.h +++ b/include/asm-sparc64/spinlock.h | |||
@@ -131,6 +131,28 @@ static void inline __read_lock(raw_rwlock_t *lock) | |||
131 | : "memory"); | 131 | : "memory"); |
132 | } | 132 | } |
133 | 133 | ||
134 | static int inline __read_trylock(raw_rwlock_t *lock) | ||
135 | { | ||
136 | int tmp1, tmp2; | ||
137 | |||
138 | __asm__ __volatile__ ( | ||
139 | "1: ldsw [%2], %0\n" | ||
140 | " brlz,a,pn %0, 2f\n" | ||
141 | " mov 0, %0\n" | ||
142 | " add %0, 1, %1\n" | ||
143 | " cas [%2], %0, %1\n" | ||
144 | " cmp %0, %1\n" | ||
145 | " membar #StoreLoad | #StoreStore\n" | ||
146 | " bne,pn %%icc, 1b\n" | ||
147 | " mov 1, %0\n" | ||
148 | "2:" | ||
149 | : "=&r" (tmp1), "=&r" (tmp2) | ||
150 | : "r" (lock) | ||
151 | : "memory"); | ||
152 | |||
153 | return tmp1; | ||
154 | } | ||
155 | |||
134 | static void inline __read_unlock(raw_rwlock_t *lock) | 156 | static void inline __read_unlock(raw_rwlock_t *lock) |
135 | { | 157 | { |
136 | unsigned long tmp1, tmp2; | 158 | unsigned long tmp1, tmp2; |
@@ -211,12 +233,12 @@ static int inline __write_trylock(raw_rwlock_t *lock) | |||
211 | } | 233 | } |
212 | 234 | ||
213 | #define __raw_read_lock(p) __read_lock(p) | 235 | #define __raw_read_lock(p) __read_lock(p) |
236 | #define __raw_read_trylock(p) __read_trylock(p) | ||
214 | #define __raw_read_unlock(p) __read_unlock(p) | 237 | #define __raw_read_unlock(p) __read_unlock(p) |
215 | #define __raw_write_lock(p) __write_lock(p) | 238 | #define __raw_write_lock(p) __write_lock(p) |
216 | #define __raw_write_unlock(p) __write_unlock(p) | 239 | #define __raw_write_unlock(p) __write_unlock(p) |
217 | #define __raw_write_trylock(p) __write_trylock(p) | 240 | #define __raw_write_trylock(p) __write_trylock(p) |
218 | 241 | ||
219 | #define __raw_read_trylock(lock) generic__raw_read_trylock(lock) | ||
220 | #define __raw_read_can_lock(rw) (!((rw)->lock & 0x80000000UL)) | 242 | #define __raw_read_can_lock(rw) (!((rw)->lock & 0x80000000UL)) |
221 | #define __raw_write_can_lock(rw) (!(rw)->lock) | 243 | #define __raw_write_can_lock(rw) (!(rw)->lock) |
222 | 244 | ||
diff --git a/include/asm-sparc64/uaccess.h b/include/asm-sparc64/uaccess.h index 203e8eee6351..c91d1e38eac6 100644 --- a/include/asm-sparc64/uaccess.h +++ b/include/asm-sparc64/uaccess.h | |||
@@ -136,7 +136,7 @@ __asm__ __volatile__( \ | |||
136 | "b 2b\n\t" \ | 136 | "b 2b\n\t" \ |
137 | " mov %3, %0\n\n\t" \ | 137 | " mov %3, %0\n\n\t" \ |
138 | ".previous\n\t" \ | 138 | ".previous\n\t" \ |
139 | ".section __ex_table,#alloc\n\t" \ | 139 | ".section __ex_table,\"a\"\n\t" \ |
140 | ".align 4\n\t" \ | 140 | ".align 4\n\t" \ |
141 | ".word 1b, 3b\n\t" \ | 141 | ".word 1b, 3b\n\t" \ |
142 | ".previous\n\n\t" \ | 142 | ".previous\n\n\t" \ |
@@ -148,7 +148,7 @@ if (__builtin_constant_p(ret) && ret == -EFAULT) \ | |||
148 | __asm__ __volatile__( \ | 148 | __asm__ __volatile__( \ |
149 | "/* Put user asm ret, inline. */\n" \ | 149 | "/* Put user asm ret, inline. */\n" \ |
150 | "1:\t" "st"#size "a %1, [%2] %%asi\n\n\t" \ | 150 | "1:\t" "st"#size "a %1, [%2] %%asi\n\n\t" \ |
151 | ".section __ex_table,#alloc\n\t" \ | 151 | ".section __ex_table,\"a\"\n\t" \ |
152 | ".align 4\n\t" \ | 152 | ".align 4\n\t" \ |
153 | ".word 1b, __ret_efault\n\n\t" \ | 153 | ".word 1b, __ret_efault\n\n\t" \ |
154 | ".previous\n\n\t" \ | 154 | ".previous\n\n\t" \ |
@@ -163,7 +163,7 @@ __asm__ __volatile__( \ | |||
163 | "ret\n\t" \ | 163 | "ret\n\t" \ |
164 | " restore %%g0, %3, %%o0\n\n\t" \ | 164 | " restore %%g0, %3, %%o0\n\n\t" \ |
165 | ".previous\n\t" \ | 165 | ".previous\n\t" \ |
166 | ".section __ex_table,#alloc\n\t" \ | 166 | ".section __ex_table,\"a\"\n\t" \ |
167 | ".align 4\n\t" \ | 167 | ".align 4\n\t" \ |
168 | ".word 1b, 3b\n\n\t" \ | 168 | ".word 1b, 3b\n\n\t" \ |
169 | ".previous\n\n\t" \ | 169 | ".previous\n\n\t" \ |
@@ -206,7 +206,7 @@ __asm__ __volatile__( \ | |||
206 | "b 2b\n\t" \ | 206 | "b 2b\n\t" \ |
207 | " mov %3, %0\n\n\t" \ | 207 | " mov %3, %0\n\n\t" \ |
208 | ".previous\n\t" \ | 208 | ".previous\n\t" \ |
209 | ".section __ex_table,#alloc\n\t" \ | 209 | ".section __ex_table,\"a\"\n\t" \ |
210 | ".align 4\n\t" \ | 210 | ".align 4\n\t" \ |
211 | ".word 1b, 3b\n\n\t" \ | 211 | ".word 1b, 3b\n\n\t" \ |
212 | ".previous\n\t" \ | 212 | ".previous\n\t" \ |
@@ -218,7 +218,7 @@ if (__builtin_constant_p(retval) && retval == -EFAULT) \ | |||
218 | __asm__ __volatile__( \ | 218 | __asm__ __volatile__( \ |
219 | "/* Get user asm ret, inline. */\n" \ | 219 | "/* Get user asm ret, inline. */\n" \ |
220 | "1:\t" "ld"#size "a [%1] %%asi, %0\n\n\t" \ | 220 | "1:\t" "ld"#size "a [%1] %%asi, %0\n\n\t" \ |
221 | ".section __ex_table,#alloc\n\t" \ | 221 | ".section __ex_table,\"a\"\n\t" \ |
222 | ".align 4\n\t" \ | 222 | ".align 4\n\t" \ |
223 | ".word 1b,__ret_efault\n\n\t" \ | 223 | ".word 1b,__ret_efault\n\n\t" \ |
224 | ".previous\n\t" \ | 224 | ".previous\n\t" \ |
@@ -233,7 +233,7 @@ __asm__ __volatile__( \ | |||
233 | "ret\n\t" \ | 233 | "ret\n\t" \ |
234 | " restore %%g0, %2, %%o0\n\n\t" \ | 234 | " restore %%g0, %2, %%o0\n\n\t" \ |
235 | ".previous\n\t" \ | 235 | ".previous\n\t" \ |
236 | ".section __ex_table,#alloc\n\t" \ | 236 | ".section __ex_table,\"a\"\n\t" \ |
237 | ".align 4\n\t" \ | 237 | ".align 4\n\t" \ |
238 | ".word 1b, 3b\n\n\t" \ | 238 | ".word 1b, 3b\n\n\t" \ |
239 | ".previous\n\t" \ | 239 | ".previous\n\t" \ |
diff --git a/include/asm-sparc64/unistd.h b/include/asm-sparc64/unistd.h index 84ac2bdb0902..a284986b1541 100644 --- a/include/asm-sparc64/unistd.h +++ b/include/asm-sparc64/unistd.h | |||
@@ -307,7 +307,7 @@ | |||
307 | #define __NR_mknodat 286 | 307 | #define __NR_mknodat 286 |
308 | #define __NR_fchownat 287 | 308 | #define __NR_fchownat 287 |
309 | #define __NR_futimesat 288 | 309 | #define __NR_futimesat 288 |
310 | #define __NR_newfstatat 289 | 310 | #define __NR_fstatat64 289 |
311 | #define __NR_unlinkat 290 | 311 | #define __NR_unlinkat 290 |
312 | #define __NR_renameat 291 | 312 | #define __NR_renameat 291 |
313 | #define __NR_linkat 292 | 313 | #define __NR_linkat 292 |
@@ -317,11 +317,12 @@ | |||
317 | #define __NR_faccessat 296 | 317 | #define __NR_faccessat 296 |
318 | #define __NR_pselect6 297 | 318 | #define __NR_pselect6 297 |
319 | #define __NR_ppoll 298 | 319 | #define __NR_ppoll 298 |
320 | #define __NR_unshare 299 | ||
320 | 321 | ||
321 | /* WARNING: You MAY NOT add syscall numbers larger than 298, since | 322 | /* WARNING: You MAY NOT add syscall numbers larger than 299, since |
322 | * all of the syscall tables in the Sparc kernel are | 323 | * all of the syscall tables in the Sparc kernel are |
323 | * sized to have 298 entries (starting at zero). Therefore | 324 | * sized to have 299 entries (starting at zero). Therefore |
324 | * find a free slot in the 0-298 range. | 325 | * find a free slot in the 0-299 range. |
325 | */ | 326 | */ |
326 | 327 | ||
327 | #define _syscall0(type,name) \ | 328 | #define _syscall0(type,name) \ |
diff --git a/include/asm-um/ldt-x86_64.h b/include/asm-um/ldt-x86_64.h index 175722a91164..96b35aada79a 100644 --- a/include/asm-um/ldt-x86_64.h +++ b/include/asm-um/ldt-x86_64.h | |||
@@ -5,8 +5,8 @@ | |||
5 | * Author: Bodo Stroesser <bstroesser@fujitsu-siemens.com> | 5 | * Author: Bodo Stroesser <bstroesser@fujitsu-siemens.com> |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #ifndef __ASM_LDT_I386_H | 8 | #ifndef __ASM_LDT_X86_64_H |
9 | #define __ASM_LDT_I386_H | 9 | #define __ASM_LDT_X86_64_H |
10 | 10 | ||
11 | #include "asm/semaphore.h" | 11 | #include "asm/semaphore.h" |
12 | #include "asm/arch/ldt.h" | 12 | #include "asm/arch/ldt.h" |
@@ -39,11 +39,13 @@ typedef struct uml_ldt { | |||
39 | } uml_ldt_t; | 39 | } uml_ldt_t; |
40 | 40 | ||
41 | /* | 41 | /* |
42 | * macros stolen from include/asm-i386/desc.h | 42 | * macros stolen from include/asm-x86_64/desc.h |
43 | */ | 43 | */ |
44 | #define LDT_entry_a(info) \ | 44 | #define LDT_entry_a(info) \ |
45 | ((((info)->base_addr & 0x0000ffff) << 16) | ((info)->limit & 0x0ffff)) | 45 | ((((info)->base_addr & 0x0000ffff) << 16) | ((info)->limit & 0x0ffff)) |
46 | 46 | ||
47 | /* Don't allow setting of the lm bit. It is useless anyways because | ||
48 | * 64bit system calls require __USER_CS. */ | ||
47 | #define LDT_entry_b(info) \ | 49 | #define LDT_entry_b(info) \ |
48 | (((info)->base_addr & 0xff000000) | \ | 50 | (((info)->base_addr & 0xff000000) | \ |
49 | (((info)->base_addr & 0x00ff0000) >> 16) | \ | 51 | (((info)->base_addr & 0x00ff0000) >> 16) | \ |
@@ -54,6 +56,7 @@ typedef struct uml_ldt { | |||
54 | ((info)->seg_32bit << 22) | \ | 56 | ((info)->seg_32bit << 22) | \ |
55 | ((info)->limit_in_pages << 23) | \ | 57 | ((info)->limit_in_pages << 23) | \ |
56 | ((info)->useable << 20) | \ | 58 | ((info)->useable << 20) | \ |
59 | /* ((info)->lm << 21) | */ \ | ||
57 | 0x7000) | 60 | 0x7000) |
58 | 61 | ||
59 | #define LDT_empty(info) (\ | 62 | #define LDT_empty(info) (\ |
@@ -64,6 +67,7 @@ typedef struct uml_ldt { | |||
64 | (info)->seg_32bit == 0 && \ | 67 | (info)->seg_32bit == 0 && \ |
65 | (info)->limit_in_pages == 0 && \ | 68 | (info)->limit_in_pages == 0 && \ |
66 | (info)->seg_not_present == 1 && \ | 69 | (info)->seg_not_present == 1 && \ |
67 | (info)->useable == 0 ) | 70 | (info)->useable == 0 && \ |
71 | (info)->lm == 0) | ||
68 | 72 | ||
69 | #endif | 73 | #endif |
diff --git a/include/asm-um/smp.h b/include/asm-um/smp.h index d879eba2b52c..aeda6657f366 100644 --- a/include/asm-um/smp.h +++ b/include/asm-um/smp.h | |||
@@ -23,6 +23,8 @@ extern inline void smp_cpus_done(unsigned int maxcpus) | |||
23 | { | 23 | { |
24 | } | 24 | } |
25 | 25 | ||
26 | extern struct task_struct *idle_threads[NR_CPUS]; | ||
27 | |||
26 | #endif | 28 | #endif |
27 | 29 | ||
28 | #endif | 30 | #endif |
diff --git a/include/asm-v850/bitops.h b/include/asm-v850/bitops.h index 8955d2376ac8..609b9e87222a 100644 --- a/include/asm-v850/bitops.h +++ b/include/asm-v850/bitops.h | |||
@@ -188,7 +188,7 @@ static inline int find_next_zero_bit(const void *addr, int size, int offset) | |||
188 | tmp = *p; | 188 | tmp = *p; |
189 | 189 | ||
190 | found_first: | 190 | found_first: |
191 | tmp |= ~0UL >> size; | 191 | tmp |= ~0UL << size; |
192 | found_middle: | 192 | found_middle: |
193 | return result + ffz (tmp); | 193 | return result + ffz (tmp); |
194 | } | 194 | } |
diff --git a/include/asm-v850/mman.h b/include/asm-v850/mman.h index edc79965193a..edbf6edbfb37 100644 --- a/include/asm-v850/mman.h +++ b/include/asm-v850/mman.h | |||
@@ -1,18 +1,7 @@ | |||
1 | #ifndef __V850_MMAN_H__ | 1 | #ifndef __V850_MMAN_H__ |
2 | #define __V850_MMAN_H__ | 2 | #define __V850_MMAN_H__ |
3 | 3 | ||
4 | #define PROT_READ 0x1 /* page can be read */ | 4 | #include <asm-generic/mman.h> |
5 | #define PROT_WRITE 0x2 /* page can be written */ | ||
6 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
7 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
8 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
9 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
10 | |||
11 | #define MAP_SHARED 0x01 /* Share changes */ | ||
12 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
13 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
14 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
15 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
16 | 5 | ||
17 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 6 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
18 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 7 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
@@ -20,22 +9,7 @@ | |||
20 | #define MAP_LOCKED 0x2000 /* pages are locked */ | 9 | #define MAP_LOCKED 0x2000 /* pages are locked */ |
21 | #define MAP_NORESERVE 0x4000 /* don't check for reservations */ | 10 | #define MAP_NORESERVE 0x4000 /* don't check for reservations */ |
22 | 11 | ||
23 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
24 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
25 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
26 | |||
27 | #define MCL_CURRENT 1 /* lock all current mappings */ | 12 | #define MCL_CURRENT 1 /* lock all current mappings */ |
28 | #define MCL_FUTURE 2 /* lock all future mappings */ | 13 | #define MCL_FUTURE 2 /* lock all future mappings */ |
29 | 14 | ||
30 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
31 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
32 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
33 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
34 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
35 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
36 | |||
37 | /* compatibility flags */ | ||
38 | #define MAP_ANON MAP_ANONYMOUS | ||
39 | #define MAP_FILE 0 | ||
40 | |||
41 | #endif /* __V850_MMAN_H__ */ | 15 | #endif /* __V850_MMAN_H__ */ |
diff --git a/include/asm-x86_64/apic.h b/include/asm-x86_64/apic.h index 4f6a4dc455bb..bdbd8935612a 100644 --- a/include/asm-x86_64/apic.h +++ b/include/asm-x86_64/apic.h | |||
@@ -17,6 +17,7 @@ | |||
17 | #define APIC_DEBUG 2 | 17 | #define APIC_DEBUG 2 |
18 | 18 | ||
19 | extern int apic_verbosity; | 19 | extern int apic_verbosity; |
20 | extern int apic_runs_main_timer; | ||
20 | 21 | ||
21 | /* | 22 | /* |
22 | * Define the default level of output to be very little | 23 | * Define the default level of output to be very little |
diff --git a/include/asm-x86_64/cpufeature.h b/include/asm-x86_64/cpufeature.h index 41c0ac8559be..76bb6193ae91 100644 --- a/include/asm-x86_64/cpufeature.h +++ b/include/asm-x86_64/cpufeature.h | |||
@@ -61,7 +61,7 @@ | |||
61 | #define X86_FEATURE_K6_MTRR (3*32+ 1) /* AMD K6 nonstandard MTRRs */ | 61 | #define X86_FEATURE_K6_MTRR (3*32+ 1) /* AMD K6 nonstandard MTRRs */ |
62 | #define X86_FEATURE_CYRIX_ARR (3*32+ 2) /* Cyrix ARRs (= MTRRs) */ | 62 | #define X86_FEATURE_CYRIX_ARR (3*32+ 2) /* Cyrix ARRs (= MTRRs) */ |
63 | #define X86_FEATURE_CENTAUR_MCR (3*32+ 3) /* Centaur MCRs (= MTRRs) */ | 63 | #define X86_FEATURE_CENTAUR_MCR (3*32+ 3) /* Centaur MCRs (= MTRRs) */ |
64 | /* 4 free */ | 64 | #define X86_FEATURE_REP_GOOD (3*32+ 4) /* rep microcode works well on this CPU */ |
65 | #define X86_FEATURE_CONSTANT_TSC (3*32+5) /* TSC runs at constant rate */ | 65 | #define X86_FEATURE_CONSTANT_TSC (3*32+5) /* TSC runs at constant rate */ |
66 | #define X86_FEATURE_SYNC_RDTSC (3*32+6) /* RDTSC syncs CPU core */ | 66 | #define X86_FEATURE_SYNC_RDTSC (3*32+6) /* RDTSC syncs CPU core */ |
67 | 67 | ||
diff --git a/include/asm-x86_64/hardirq.h b/include/asm-x86_64/hardirq.h index 8661b476fb40..8689951e3503 100644 --- a/include/asm-x86_64/hardirq.h +++ b/include/asm-x86_64/hardirq.h | |||
@@ -16,23 +16,6 @@ | |||
16 | #define set_softirq_pending(x) write_pda(__softirq_pending, (x)) | 16 | #define set_softirq_pending(x) write_pda(__softirq_pending, (x)) |
17 | #define or_softirq_pending(x) or_pda(__softirq_pending, (x)) | 17 | #define or_softirq_pending(x) or_pda(__softirq_pending, (x)) |
18 | 18 | ||
19 | /* | 19 | extern void ack_bad_irq(unsigned int irq); |
20 | * 'what should we do if we get a hw irq event on an illegal vector'. | 20 | |
21 | * each architecture has to answer this themselves. | ||
22 | */ | ||
23 | static inline void ack_bad_irq(unsigned int irq) | ||
24 | { | ||
25 | printk("unexpected IRQ trap at vector %02x\n", irq); | ||
26 | #ifdef CONFIG_X86_LOCAL_APIC | ||
27 | /* | ||
28 | * Currently unexpected vectors happen only on SMP and APIC. | ||
29 | * We _must_ ack these because every local APIC has only N | ||
30 | * irq slots per priority level, and a 'hanging, unacked' IRQ | ||
31 | * holds up an irq slot - in excessive cases (when multiple | ||
32 | * unexpected vectors occur) that might lock up the APIC | ||
33 | * completely. | ||
34 | */ | ||
35 | ack_APIC_irq(); | ||
36 | #endif | ||
37 | } | ||
38 | #endif /* __ASM_HARDIRQ_H */ | 21 | #endif /* __ASM_HARDIRQ_H */ |
diff --git a/include/asm-x86_64/hpet.h b/include/asm-x86_64/hpet.h index c20c28f5c7a0..08b75c15269a 100644 --- a/include/asm-x86_64/hpet.h +++ b/include/asm-x86_64/hpet.h | |||
@@ -55,6 +55,8 @@ extern int is_hpet_enabled(void); | |||
55 | extern int hpet_rtc_timer_init(void); | 55 | extern int hpet_rtc_timer_init(void); |
56 | extern int oem_force_hpet_timer(void); | 56 | extern int oem_force_hpet_timer(void); |
57 | 57 | ||
58 | extern int hpet_use_timer; | ||
59 | |||
58 | #ifdef CONFIG_HPET_EMULATE_RTC | 60 | #ifdef CONFIG_HPET_EMULATE_RTC |
59 | extern int hpet_mask_rtc_irq_bit(unsigned long bit_mask); | 61 | extern int hpet_mask_rtc_irq_bit(unsigned long bit_mask); |
60 | extern int hpet_set_rtc_irq_bit(unsigned long bit_mask); | 62 | extern int hpet_set_rtc_irq_bit(unsigned long bit_mask); |
diff --git a/include/asm-x86_64/ia32_unistd.h b/include/asm-x86_64/ia32_unistd.h index e87cd83a0e86..eeb2bcd635de 100644 --- a/include/asm-x86_64/ia32_unistd.h +++ b/include/asm-x86_64/ia32_unistd.h | |||
@@ -300,12 +300,12 @@ | |||
300 | #define __NR_ia32_inotify_add_watch 292 | 300 | #define __NR_ia32_inotify_add_watch 292 |
301 | #define __NR_ia32_inotify_rm_watch 293 | 301 | #define __NR_ia32_inotify_rm_watch 293 |
302 | #define __NR_ia32_migrate_pages 294 | 302 | #define __NR_ia32_migrate_pages 294 |
303 | #define __NR_ia32_opanat 295 | 303 | #define __NR_ia32_openat 295 |
304 | #define __NR_ia32_mkdirat 296 | 304 | #define __NR_ia32_mkdirat 296 |
305 | #define __NR_ia32_mknodat 297 | 305 | #define __NR_ia32_mknodat 297 |
306 | #define __NR_ia32_fchownat 298 | 306 | #define __NR_ia32_fchownat 298 |
307 | #define __NR_ia32_futimesat 299 | 307 | #define __NR_ia32_futimesat 299 |
308 | #define __NR_ia32_newfstatat 300 | 308 | #define __NR_ia32_fstatat64 300 |
309 | #define __NR_ia32_unlinkat 301 | 309 | #define __NR_ia32_unlinkat 301 |
310 | #define __NR_ia32_renameat 302 | 310 | #define __NR_ia32_renameat 302 |
311 | #define __NR_ia32_linkat 303 | 311 | #define __NR_ia32_linkat 303 |
@@ -313,7 +313,10 @@ | |||
313 | #define __NR_ia32_readlinkat 305 | 313 | #define __NR_ia32_readlinkat 305 |
314 | #define __NR_ia32_fchmodat 306 | 314 | #define __NR_ia32_fchmodat 306 |
315 | #define __NR_ia32_faccessat 307 | 315 | #define __NR_ia32_faccessat 307 |
316 | #define __NR_ia32_pselect6 308 | ||
317 | #define __NR_ia32_ppoll 309 | ||
318 | #define __NR_ia32_unshare 310 | ||
316 | 319 | ||
317 | #define IA32_NR_syscalls 308 /* must be > than biggest syscall! */ | 320 | #define IA32_NR_syscalls 315 /* must be > than biggest syscall! */ |
318 | 321 | ||
319 | #endif /* _ASM_X86_64_IA32_UNISTD_H_ */ | 322 | #endif /* _ASM_X86_64_IA32_UNISTD_H_ */ |
diff --git a/include/asm-x86_64/kexec.h b/include/asm-x86_64/kexec.h index ae28cd44bcd3..c564bae03433 100644 --- a/include/asm-x86_64/kexec.h +++ b/include/asm-x86_64/kexec.h | |||
@@ -1,8 +1,9 @@ | |||
1 | #ifndef _X86_64_KEXEC_H | 1 | #ifndef _X86_64_KEXEC_H |
2 | #define _X86_64_KEXEC_H | 2 | #define _X86_64_KEXEC_H |
3 | 3 | ||
4 | #include <linux/string.h> | ||
5 | |||
4 | #include <asm/page.h> | 6 | #include <asm/page.h> |
5 | #include <asm/proto.h> | ||
6 | #include <asm/ptrace.h> | 7 | #include <asm/ptrace.h> |
7 | 8 | ||
8 | /* | 9 | /* |
diff --git a/include/asm-x86_64/mman.h b/include/asm-x86_64/mman.h index d0e97b74f735..dd5cb0534d37 100644 --- a/include/asm-x86_64/mman.h +++ b/include/asm-x86_64/mman.h | |||
@@ -1,19 +1,8 @@ | |||
1 | #ifndef __X8664_MMAN_H__ | 1 | #ifndef __X8664_MMAN_H__ |
2 | #define __X8664_MMAN_H__ | 2 | #define __X8664_MMAN_H__ |
3 | 3 | ||
4 | #define PROT_READ 0x1 /* page can be read */ | 4 | #include <asm-generic/mman.h> |
5 | #define PROT_WRITE 0x2 /* page can be written */ | ||
6 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
7 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
8 | #define PROT_SEM 0x8 | ||
9 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
10 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
11 | 5 | ||
12 | #define MAP_SHARED 0x01 /* Share changes */ | ||
13 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
14 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
15 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
16 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
17 | #define MAP_32BIT 0x40 /* only give out 32bit addresses */ | 6 | #define MAP_32BIT 0x40 /* only give out 32bit addresses */ |
18 | 7 | ||
19 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 8 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
@@ -24,22 +13,7 @@ | |||
24 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | 13 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ |
25 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | 14 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ |
26 | 15 | ||
27 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
28 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
29 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
30 | |||
31 | #define MCL_CURRENT 1 /* lock all current mappings */ | 16 | #define MCL_CURRENT 1 /* lock all current mappings */ |
32 | #define MCL_FUTURE 2 /* lock all future mappings */ | 17 | #define MCL_FUTURE 2 /* lock all future mappings */ |
33 | 18 | ||
34 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | ||
35 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | ||
36 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | ||
37 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | ||
38 | #define MADV_DONTNEED 0x4 /* discard these pages */ | ||
39 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | ||
40 | |||
41 | /* compatibility flags */ | ||
42 | #define MAP_ANON MAP_ANONYMOUS | ||
43 | #define MAP_FILE 0 | ||
44 | |||
45 | #endif | 19 | #endif |
diff --git a/include/asm-x86_64/mpspec.h b/include/asm-x86_64/mpspec.h index 10248a9a0582..14fc3ddd9031 100644 --- a/include/asm-x86_64/mpspec.h +++ b/include/asm-x86_64/mpspec.h | |||
@@ -188,7 +188,7 @@ extern void mp_register_lapic_address (u64 address); | |||
188 | extern void mp_register_ioapic (u8 id, u32 address, u32 gsi_base); | 188 | extern void mp_register_ioapic (u8 id, u32 address, u32 gsi_base); |
189 | extern void mp_override_legacy_irq (u8 bus_irq, u8 polarity, u8 trigger, u32 gsi); | 189 | extern void mp_override_legacy_irq (u8 bus_irq, u8 polarity, u8 trigger, u32 gsi); |
190 | extern void mp_config_acpi_legacy_irqs (void); | 190 | extern void mp_config_acpi_legacy_irqs (void); |
191 | extern int mp_register_gsi (u32 gsi, int edge_level, int active_high_low); | 191 | extern int mp_register_gsi (u32 gsi, int triggering, int polarity); |
192 | #endif /*CONFIG_X86_IO_APIC*/ | 192 | #endif /*CONFIG_X86_IO_APIC*/ |
193 | #endif | 193 | #endif |
194 | 194 | ||
diff --git a/include/asm-x86_64/numa.h b/include/asm-x86_64/numa.h index 34e434ce3268..dffe276ca2df 100644 --- a/include/asm-x86_64/numa.h +++ b/include/asm-x86_64/numa.h | |||
@@ -22,8 +22,15 @@ extern void numa_set_node(int cpu, int node); | |||
22 | extern unsigned char apicid_to_node[256]; | 22 | extern unsigned char apicid_to_node[256]; |
23 | #ifdef CONFIG_NUMA | 23 | #ifdef CONFIG_NUMA |
24 | extern void __init init_cpu_to_node(void); | 24 | extern void __init init_cpu_to_node(void); |
25 | |||
26 | static inline void clear_node_cpumask(int cpu) | ||
27 | { | ||
28 | clear_bit(cpu, &node_to_cpumask[cpu_to_node(cpu)]); | ||
29 | } | ||
30 | |||
25 | #else | 31 | #else |
26 | #define init_cpu_to_node() do {} while (0) | 32 | #define init_cpu_to_node() do {} while (0) |
33 | #define clear_node_cpumask(cpu) do {} while (0) | ||
27 | #endif | 34 | #endif |
28 | 35 | ||
29 | #define NUMA_NO_NODE 0xff | 36 | #define NUMA_NO_NODE 0xff |
diff --git a/include/asm-x86_64/pci.h b/include/asm-x86_64/pci.h index fd03e15d7ea6..8a05af264d18 100644 --- a/include/asm-x86_64/pci.h +++ b/include/asm-x86_64/pci.h | |||
@@ -19,8 +19,6 @@ extern unsigned int pcibios_assign_all_busses(void); | |||
19 | #endif | 19 | #endif |
20 | #define pcibios_scan_all_fns(a, b) 0 | 20 | #define pcibios_scan_all_fns(a, b) 0 |
21 | 21 | ||
22 | extern int no_iommu, force_iommu; | ||
23 | |||
24 | extern unsigned long pci_mem_start; | 22 | extern unsigned long pci_mem_start; |
25 | #define PCIBIOS_MIN_IO 0x1000 | 23 | #define PCIBIOS_MIN_IO 0x1000 |
26 | #define PCIBIOS_MIN_MEM (pci_mem_start) | 24 | #define PCIBIOS_MIN_MEM (pci_mem_start) |
diff --git a/include/asm-x86_64/pgtable.h b/include/asm-x86_64/pgtable.h index 8fbf4dd72115..715fd94cf577 100644 --- a/include/asm-x86_64/pgtable.h +++ b/include/asm-x86_64/pgtable.h | |||
@@ -131,7 +131,7 @@ static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm, unsigned long | |||
131 | #define PGDIR_SIZE (1UL << PGDIR_SHIFT) | 131 | #define PGDIR_SIZE (1UL << PGDIR_SHIFT) |
132 | #define PGDIR_MASK (~(PGDIR_SIZE-1)) | 132 | #define PGDIR_MASK (~(PGDIR_SIZE-1)) |
133 | 133 | ||
134 | #define USER_PTRS_PER_PGD (TASK_SIZE/PGDIR_SIZE) | 134 | #define USER_PTRS_PER_PGD ((TASK_SIZE-1)/PGDIR_SIZE+1) |
135 | #define FIRST_USER_ADDRESS 0 | 135 | #define FIRST_USER_ADDRESS 0 |
136 | 136 | ||
137 | #ifndef __ASSEMBLY__ | 137 | #ifndef __ASSEMBLY__ |
diff --git a/include/asm-x86_64/proto.h b/include/asm-x86_64/proto.h index 115e496c6139..3ba8fd45fcb3 100644 --- a/include/asm-x86_64/proto.h +++ b/include/asm-x86_64/proto.h | |||
@@ -39,12 +39,19 @@ extern void config_acpi_tables(void); | |||
39 | extern void ia32_syscall(void); | 39 | extern void ia32_syscall(void); |
40 | extern void iommu_hole_init(void); | 40 | extern void iommu_hole_init(void); |
41 | 41 | ||
42 | extern void time_init_gtod(void); | ||
43 | extern int pmtimer_mark_offset(void); | 42 | extern int pmtimer_mark_offset(void); |
43 | extern void pmtimer_resume(void); | ||
44 | extern void pmtimer_wait(unsigned); | ||
44 | extern unsigned int do_gettimeoffset_pm(void); | 45 | extern unsigned int do_gettimeoffset_pm(void); |
46 | #ifdef CONFIG_X86_PM_TIMER | ||
45 | extern u32 pmtmr_ioport; | 47 | extern u32 pmtmr_ioport; |
48 | #else | ||
49 | #define pmtmr_ioport 0 | ||
50 | #endif | ||
46 | extern unsigned long long monotonic_base; | 51 | extern unsigned long long monotonic_base; |
47 | extern int sysctl_vsyscall; | 52 | extern int sysctl_vsyscall; |
53 | extern int nohpet; | ||
54 | extern unsigned long vxtime_hz; | ||
48 | 55 | ||
49 | extern void do_softirq_thunk(void); | 56 | extern void do_softirq_thunk(void); |
50 | 57 | ||
@@ -65,6 +72,9 @@ extern void free_bootmem_generic(unsigned long phys, unsigned len); | |||
65 | 72 | ||
66 | extern void load_gs_index(unsigned gs); | 73 | extern void load_gs_index(unsigned gs); |
67 | 74 | ||
75 | extern void stop_timer_interrupt(void); | ||
76 | extern void main_timer_handler(struct pt_regs *regs); | ||
77 | |||
68 | extern unsigned long end_pfn_map; | 78 | extern unsigned long end_pfn_map; |
69 | 79 | ||
70 | extern void show_trace(unsigned long * rsp); | 80 | extern void show_trace(unsigned long * rsp); |
@@ -122,6 +132,8 @@ extern int fix_aperture; | |||
122 | extern int force_iommu; | 132 | extern int force_iommu; |
123 | 133 | ||
124 | extern int reboot_force; | 134 | extern int reboot_force; |
135 | extern int notsc_setup(char *); | ||
136 | extern int setup_additional_cpus(char *); | ||
125 | 137 | ||
126 | extern void smp_local_timer_interrupt(struct pt_regs * regs); | 138 | extern void smp_local_timer_interrupt(struct pt_regs * regs); |
127 | 139 | ||
diff --git a/include/asm-x86_64/system.h b/include/asm-x86_64/system.h index a73f0c789d8b..b7f66034ae7a 100644 --- a/include/asm-x86_64/system.h +++ b/include/asm-x86_64/system.h | |||
@@ -327,7 +327,7 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, | |||
327 | #define wmb() asm volatile("" ::: "memory") | 327 | #define wmb() asm volatile("" ::: "memory") |
328 | #endif | 328 | #endif |
329 | #define read_barrier_depends() do {} while(0) | 329 | #define read_barrier_depends() do {} while(0) |
330 | #define set_mb(var, value) do { xchg(&var, value); } while (0) | 330 | #define set_mb(var, value) do { (void) xchg(&var, value); } while (0) |
331 | #define set_wmb(var, value) do { var = value; wmb(); } while (0) | 331 | #define set_wmb(var, value) do { var = value; wmb(); } while (0) |
332 | 332 | ||
333 | #define warn_if_not_ulong(x) do { unsigned long foo; (void) (&(x) == &foo); } while (0) | 333 | #define warn_if_not_ulong(x) do { unsigned long foo; (void) (&(x) == &foo); } while (0) |
diff --git a/include/asm-x86_64/topology.h b/include/asm-x86_64/topology.h index 2fa7f27381b4..c642f5d9882d 100644 --- a/include/asm-x86_64/topology.h +++ b/include/asm-x86_64/topology.h | |||
@@ -57,6 +57,15 @@ extern int __node_distance(int, int); | |||
57 | 57 | ||
58 | #endif | 58 | #endif |
59 | 59 | ||
60 | #ifdef CONFIG_SMP | ||
61 | #define topology_physical_package_id(cpu) \ | ||
62 | (phys_proc_id[cpu] == BAD_APICID ? -1 : phys_proc_id[cpu]) | ||
63 | #define topology_core_id(cpu) \ | ||
64 | (cpu_core_id[cpu] == BAD_APICID ? 0 : cpu_core_id[cpu]) | ||
65 | #define topology_core_siblings(cpu) (cpu_core_map[cpu]) | ||
66 | #define topology_thread_siblings(cpu) (cpu_sibling_map[cpu]) | ||
67 | #endif | ||
68 | |||
60 | #include <asm-generic/topology.h> | 69 | #include <asm-generic/topology.h> |
61 | 70 | ||
62 | #endif | 71 | #endif |
diff --git a/include/asm-x86_64/unistd.h b/include/asm-x86_64/unistd.h index 436d099b5b6b..da0341c57949 100644 --- a/include/asm-x86_64/unistd.h +++ b/include/asm-x86_64/unistd.h | |||
@@ -599,8 +599,14 @@ __SYSCALL(__NR_readlinkat, sys_readlinkat) | |||
599 | __SYSCALL(__NR_fchmodat, sys_fchmodat) | 599 | __SYSCALL(__NR_fchmodat, sys_fchmodat) |
600 | #define __NR_faccessat 269 | 600 | #define __NR_faccessat 269 |
601 | __SYSCALL(__NR_faccessat, sys_faccessat) | 601 | __SYSCALL(__NR_faccessat, sys_faccessat) |
602 | 602 | #define __NR_pselect6 270 | |
603 | #define __NR_syscall_max __NR_faccessat | 603 | __SYSCALL(__NR_pselect6, sys_ni_syscall) /* for now */ |
604 | #define __NR_ppoll 271 | ||
605 | __SYSCALL(__NR_ppoll, sys_ni_syscall) /* for now */ | ||
606 | #define __NR_unshare 272 | ||
607 | __SYSCALL(__NR_unshare, sys_unshare) | ||
608 | |||
609 | #define __NR_syscall_max __NR_unshare | ||
604 | 610 | ||
605 | #ifndef __NO_STUBS | 611 | #ifndef __NO_STUBS |
606 | 612 | ||
diff --git a/include/asm-xtensa/futex.h b/include/asm-xtensa/futex.h new file mode 100644 index 000000000000..0b745828f42b --- /dev/null +++ b/include/asm-xtensa/futex.h | |||
@@ -0,0 +1 @@ | |||
#include <asm-generic/futex.h> | |||
diff --git a/include/asm-xtensa/mman.h b/include/asm-xtensa/mman.h index 082a7504925e..ba394cbb4807 100644 --- a/include/asm-xtensa/mman.h +++ b/include/asm-xtensa/mman.h | |||
@@ -67,15 +67,19 @@ | |||
67 | #define MCL_CURRENT 1 /* lock all current mappings */ | 67 | #define MCL_CURRENT 1 /* lock all current mappings */ |
68 | #define MCL_FUTURE 2 /* lock all future mappings */ | 68 | #define MCL_FUTURE 2 /* lock all future mappings */ |
69 | 69 | ||
70 | #define MADV_NORMAL 0x0 /* default page-in behavior */ | 70 | #define MADV_NORMAL 0 /* no further special treatment */ |
71 | #define MADV_RANDOM 0x1 /* page-in minimum required */ | 71 | #define MADV_RANDOM 1 /* expect random page references */ |
72 | #define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */ | 72 | #define MADV_SEQUENTIAL 2 /* expect sequential page references */ |
73 | #define MADV_WILLNEED 0x3 /* pre-fault pages */ | 73 | #define MADV_WILLNEED 3 /* will need these pages */ |
74 | #define MADV_DONTNEED 0x4 /* discard these pages */ | 74 | #define MADV_DONTNEED 4 /* don't need these pages */ |
75 | #define MADV_REMOVE 0x5 /* remove these pages & resources */ | 75 | |
76 | /* common parameters: try to keep these consistent across architectures */ | ||
77 | #define MADV_REMOVE 9 /* remove these pages & resources */ | ||
78 | #define MADV_DONTFORK 10 /* don't inherit across fork */ | ||
79 | #define MADV_DOFORK 11 /* do inherit across fork */ | ||
76 | 80 | ||
77 | /* compatibility flags */ | 81 | /* compatibility flags */ |
78 | #define MAP_ANON MAP_ANONYMOUS | 82 | #define MAP_ANON MAP_ANONYMOUS |
79 | #define MAP_FILE 0 | 83 | #define MAP_FILE 0 |
80 | 84 | ||
81 | #endif /* _XTENSA_MMAN_H */ | 85 | #endif /* _XTENSA_MMAN_H */ |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 026c3c011dc0..d3bc25e6d27d 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -427,7 +427,8 @@ extern int acpi_mp_config; | |||
427 | extern struct acpi_table_mcfg_config *pci_mmcfg_config; | 427 | extern struct acpi_table_mcfg_config *pci_mmcfg_config; |
428 | extern int pci_mmcfg_config_num; | 428 | extern int pci_mmcfg_config_num; |
429 | 429 | ||
430 | extern int sbf_port ; | 430 | extern int sbf_port; |
431 | extern unsigned long acpi_video_flags; | ||
431 | 432 | ||
432 | #else /* !CONFIG_ACPI */ | 433 | #else /* !CONFIG_ACPI */ |
433 | 434 | ||
@@ -435,7 +436,7 @@ extern int sbf_port ; | |||
435 | 436 | ||
436 | #endif /* !CONFIG_ACPI */ | 437 | #endif /* !CONFIG_ACPI */ |
437 | 438 | ||
438 | int acpi_register_gsi (u32 gsi, int edge_level, int active_high_low); | 439 | int acpi_register_gsi (u32 gsi, int triggering, int polarity); |
439 | int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); | 440 | int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); |
440 | 441 | ||
441 | /* | 442 | /* |
diff --git a/include/linux/agpgart.h b/include/linux/agpgart.h index 17a17c55a17f..6d59c8efe3be 100644 --- a/include/linux/agpgart.h +++ b/include/linux/agpgart.h | |||
@@ -111,6 +111,7 @@ typedef struct _agp_unbind { | |||
111 | } agp_unbind; | 111 | } agp_unbind; |
112 | 112 | ||
113 | #else /* __KERNEL__ */ | 113 | #else /* __KERNEL__ */ |
114 | #include <linux/mutex.h> | ||
114 | 115 | ||
115 | #define AGPGART_MINOR 175 | 116 | #define AGPGART_MINOR 175 |
116 | 117 | ||
@@ -201,7 +202,7 @@ struct agp_file_private { | |||
201 | }; | 202 | }; |
202 | 203 | ||
203 | struct agp_front_data { | 204 | struct agp_front_data { |
204 | struct semaphore agp_mutex; | 205 | struct mutex agp_mutex; |
205 | struct agp_controller *current_controller; | 206 | struct agp_controller *current_controller; |
206 | struct agp_controller *controllers; | 207 | struct agp_controller *controllers; |
207 | struct agp_file_private *file_priv_list; | 208 | struct agp_file_private *file_priv_list; |
diff --git a/include/linux/bitops.h b/include/linux/bitops.h index 6a2a19f14bb2..208650b1ad3a 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h | |||
@@ -81,7 +81,7 @@ static inline int generic_fls64(__u64 x) | |||
81 | { | 81 | { |
82 | __u32 h = x >> 32; | 82 | __u32 h = x >> 32; |
83 | if (h) | 83 | if (h) |
84 | return fls(x) + 32; | 84 | return fls(h) + 32; |
85 | return fls(x); | 85 | return fls(x); |
86 | } | 86 | } |
87 | 87 | ||
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 02a585faa62c..860e7a485a5f 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -392,8 +392,8 @@ struct request_queue | |||
392 | unsigned int nr_congestion_off; | 392 | unsigned int nr_congestion_off; |
393 | unsigned int nr_batching; | 393 | unsigned int nr_batching; |
394 | 394 | ||
395 | unsigned short max_sectors; | 395 | unsigned int max_sectors; |
396 | unsigned short max_hw_sectors; | 396 | unsigned int max_hw_sectors; |
397 | unsigned short max_phys_segments; | 397 | unsigned short max_phys_segments; |
398 | unsigned short max_hw_segments; | 398 | unsigned short max_hw_segments; |
399 | unsigned short hardsect_size; | 399 | unsigned short hardsect_size; |
@@ -697,7 +697,7 @@ extern request_queue_t *blk_init_queue(request_fn_proc *, spinlock_t *); | |||
697 | extern void blk_cleanup_queue(request_queue_t *); | 697 | extern void blk_cleanup_queue(request_queue_t *); |
698 | extern void blk_queue_make_request(request_queue_t *, make_request_fn *); | 698 | extern void blk_queue_make_request(request_queue_t *, make_request_fn *); |
699 | extern void blk_queue_bounce_limit(request_queue_t *, u64); | 699 | extern void blk_queue_bounce_limit(request_queue_t *, u64); |
700 | extern void blk_queue_max_sectors(request_queue_t *, unsigned short); | 700 | extern void blk_queue_max_sectors(request_queue_t *, unsigned int); |
701 | extern void blk_queue_max_phys_segments(request_queue_t *, unsigned short); | 701 | extern void blk_queue_max_phys_segments(request_queue_t *, unsigned short); |
702 | extern void blk_queue_max_hw_segments(request_queue_t *, unsigned short); | 702 | extern void blk_queue_max_hw_segments(request_queue_t *, unsigned short); |
703 | extern void blk_queue_max_segment_size(request_queue_t *, unsigned int); | 703 | extern void blk_queue_max_segment_size(request_queue_t *, unsigned int); |
diff --git a/include/linux/compat.h b/include/linux/compat.h index f9ca534787e2..c9ab2a26348c 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
@@ -161,5 +161,25 @@ int copy_siginfo_to_user32(struct compat_siginfo __user *to, siginfo_t *from); | |||
161 | int get_compat_sigevent(struct sigevent *event, | 161 | int get_compat_sigevent(struct sigevent *event, |
162 | const struct compat_sigevent __user *u_event); | 162 | const struct compat_sigevent __user *u_event); |
163 | 163 | ||
164 | static inline int compat_timeval_compare(struct compat_timeval *lhs, | ||
165 | struct compat_timeval *rhs) | ||
166 | { | ||
167 | if (lhs->tv_sec < rhs->tv_sec) | ||
168 | return -1; | ||
169 | if (lhs->tv_sec > rhs->tv_sec) | ||
170 | return 1; | ||
171 | return lhs->tv_usec - rhs->tv_usec; | ||
172 | } | ||
173 | |||
174 | static inline int compat_timespec_compare(struct compat_timespec *lhs, | ||
175 | struct compat_timespec *rhs) | ||
176 | { | ||
177 | if (lhs->tv_sec < rhs->tv_sec) | ||
178 | return -1; | ||
179 | if (lhs->tv_sec > rhs->tv_sec) | ||
180 | return 1; | ||
181 | return lhs->tv_nsec - rhs->tv_nsec; | ||
182 | } | ||
183 | |||
164 | #endif /* CONFIG_COMPAT */ | 184 | #endif /* CONFIG_COMPAT */ |
165 | #endif /* _LINUX_COMPAT_H */ | 185 | #endif /* _LINUX_COMPAT_H */ |
diff --git a/include/linux/compat_ioctl.h b/include/linux/compat_ioctl.h index 8fad50f8e389..ae7dfb790df3 100644 --- a/include/linux/compat_ioctl.h +++ b/include/linux/compat_ioctl.h | |||
@@ -696,6 +696,8 @@ COMPATIBLE_IOCTL(MEMLOCK) | |||
696 | COMPATIBLE_IOCTL(MEMUNLOCK) | 696 | COMPATIBLE_IOCTL(MEMUNLOCK) |
697 | COMPATIBLE_IOCTL(MEMGETREGIONCOUNT) | 697 | COMPATIBLE_IOCTL(MEMGETREGIONCOUNT) |
698 | COMPATIBLE_IOCTL(MEMGETREGIONINFO) | 698 | COMPATIBLE_IOCTL(MEMGETREGIONINFO) |
699 | COMPATIBLE_IOCTL(MEMGETBADBLOCK) | ||
700 | COMPATIBLE_IOCTL(MEMSETBADBLOCK) | ||
699 | /* NBD */ | 701 | /* NBD */ |
700 | ULONG_IOCTL(NBD_SET_SOCK) | 702 | ULONG_IOCTL(NBD_SET_SOCK) |
701 | ULONG_IOCTL(NBD_SET_BLKSIZE) | 703 | ULONG_IOCTL(NBD_SET_BLKSIZE) |
diff --git a/include/linux/configfs.h b/include/linux/configfs.h index acffb8c9073a..a7f015027535 100644 --- a/include/linux/configfs.h +++ b/include/linux/configfs.h | |||
@@ -126,7 +126,7 @@ extern struct config_item *config_group_find_obj(struct config_group *, const ch | |||
126 | 126 | ||
127 | 127 | ||
128 | struct configfs_attribute { | 128 | struct configfs_attribute { |
129 | char *ca_name; | 129 | const char *ca_name; |
130 | struct module *ca_owner; | 130 | struct module *ca_owner; |
131 | mode_t ca_mode; | 131 | mode_t ca_mode; |
132 | }; | 132 | }; |
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index c31650df9241..17866d7e2b71 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
@@ -14,6 +14,7 @@ | |||
14 | #ifndef _LINUX_CPUFREQ_H | 14 | #ifndef _LINUX_CPUFREQ_H |
15 | #define _LINUX_CPUFREQ_H | 15 | #define _LINUX_CPUFREQ_H |
16 | 16 | ||
17 | #include <linux/mutex.h> | ||
17 | #include <linux/config.h> | 18 | #include <linux/config.h> |
18 | #include <linux/notifier.h> | 19 | #include <linux/notifier.h> |
19 | #include <linux/threads.h> | 20 | #include <linux/threads.h> |
@@ -82,7 +83,7 @@ struct cpufreq_policy { | |||
82 | unsigned int policy; /* see above */ | 83 | unsigned int policy; /* see above */ |
83 | struct cpufreq_governor *governor; /* see below */ | 84 | struct cpufreq_governor *governor; /* see below */ |
84 | 85 | ||
85 | struct semaphore lock; /* CPU ->setpolicy or ->target may | 86 | struct mutex lock; /* CPU ->setpolicy or ->target may |
86 | only be called once a time */ | 87 | only be called once a time */ |
87 | 88 | ||
88 | struct work_struct update; /* if update_policy() needs to be | 89 | struct work_struct update; /* if update_policy() needs to be |
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 13e9f4a3ab26..60e56c6e03dd 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
@@ -84,7 +84,6 @@ | |||
84 | #include <linux/kernel.h> | 84 | #include <linux/kernel.h> |
85 | #include <linux/threads.h> | 85 | #include <linux/threads.h> |
86 | #include <linux/bitmap.h> | 86 | #include <linux/bitmap.h> |
87 | #include <asm/bug.h> | ||
88 | 87 | ||
89 | typedef struct { DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t; | 88 | typedef struct { DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t; |
90 | extern cpumask_t _unused_cpumask_arg_; | 89 | extern cpumask_t _unused_cpumask_arg_; |
@@ -329,7 +328,7 @@ static inline void __cpus_remap(cpumask_t *dstp, const cpumask_t *srcp, | |||
329 | * bitmap of size NR_CPUS. | 328 | * bitmap of size NR_CPUS. |
330 | * | 329 | * |
331 | * #ifdef CONFIG_HOTPLUG_CPU | 330 | * #ifdef CONFIG_HOTPLUG_CPU |
332 | * cpu_possible_map - all NR_CPUS bits set | 331 | * cpu_possible_map - has bit 'cpu' set iff cpu is populatable |
333 | * cpu_present_map - has bit 'cpu' set iff cpu is populated | 332 | * cpu_present_map - has bit 'cpu' set iff cpu is populated |
334 | * cpu_online_map - has bit 'cpu' set iff cpu available to scheduler | 333 | * cpu_online_map - has bit 'cpu' set iff cpu available to scheduler |
335 | * #else | 334 | * #else |
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index a3ed5e059d47..4361f3789975 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -8,7 +8,6 @@ | |||
8 | #include <linux/spinlock.h> | 8 | #include <linux/spinlock.h> |
9 | #include <linux/cache.h> | 9 | #include <linux/cache.h> |
10 | #include <linux/rcupdate.h> | 10 | #include <linux/rcupdate.h> |
11 | #include <asm/bug.h> | ||
12 | 11 | ||
13 | struct nameidata; | 12 | struct nameidata; |
14 | struct vfsmount; | 13 | struct vfsmount; |
@@ -108,7 +107,9 @@ struct dentry { | |||
108 | struct dentry_operations *d_op; | 107 | struct dentry_operations *d_op; |
109 | struct super_block *d_sb; /* The root of the dentry tree */ | 108 | struct super_block *d_sb; /* The root of the dentry tree */ |
110 | void *d_fsdata; /* fs-specific data */ | 109 | void *d_fsdata; /* fs-specific data */ |
110 | #ifdef CONFIG_PROFILING | ||
111 | struct dcookie_struct *d_cookie; /* cookie, if any */ | 111 | struct dcookie_struct *d_cookie; /* cookie, if any */ |
112 | #endif | ||
112 | int d_mounted; | 113 | int d_mounted; |
113 | unsigned char d_iname[DNAME_INLINE_LEN_MIN]; /* small names */ | 114 | unsigned char d_iname[DNAME_INLINE_LEN_MIN]; /* small names */ |
114 | }; | 115 | }; |
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index 83c7d207b80e..51e0e95a421a 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h | |||
@@ -91,7 +91,7 @@ struct target_type { | |||
91 | }; | 91 | }; |
92 | 92 | ||
93 | struct io_restrictions { | 93 | struct io_restrictions { |
94 | unsigned short max_sectors; | 94 | unsigned int max_sectors; |
95 | unsigned short max_phys_segments; | 95 | unsigned short max_phys_segments; |
96 | unsigned short max_hw_segments; | 96 | unsigned short max_hw_segments; |
97 | unsigned short hardsect_size; | 97 | unsigned short hardsect_size; |
diff --git a/include/linux/dvb/video.h b/include/linux/dvb/video.h index 1f7fa0351daf..faebfda397ff 100644 --- a/include/linux/dvb/video.h +++ b/include/linux/dvb/video.h | |||
@@ -135,7 +135,7 @@ typedef struct video_spu { | |||
135 | 135 | ||
136 | typedef struct video_spu_palette { /* SPU Palette information */ | 136 | typedef struct video_spu_palette { /* SPU Palette information */ |
137 | int length; | 137 | int length; |
138 | uint8_t *palette; | 138 | uint8_t __user *palette; |
139 | } video_spu_palette_t; | 139 | } video_spu_palette_t; |
140 | 140 | ||
141 | 141 | ||
diff --git a/include/linux/elevator.h b/include/linux/elevator.h index 23fe746a1d51..18cf1f3e1184 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h | |||
@@ -82,6 +82,7 @@ struct elevator_queue | |||
82 | extern void elv_dispatch_sort(request_queue_t *, struct request *); | 82 | extern void elv_dispatch_sort(request_queue_t *, struct request *); |
83 | extern void elv_add_request(request_queue_t *, struct request *, int, int); | 83 | extern void elv_add_request(request_queue_t *, struct request *, int, int); |
84 | extern void __elv_add_request(request_queue_t *, struct request *, int, int); | 84 | extern void __elv_add_request(request_queue_t *, struct request *, int, int); |
85 | extern void elv_insert(request_queue_t *, struct request *, int); | ||
85 | extern int elv_merge(request_queue_t *, struct request **, struct bio *); | 86 | extern int elv_merge(request_queue_t *, struct request **, struct bio *); |
86 | extern void elv_merge_requests(request_queue_t *, struct request *, | 87 | extern void elv_merge_requests(request_queue_t *, struct request *, |
87 | struct request *); | 88 | struct request *); |
diff --git a/include/linux/elfcore.h b/include/linux/elfcore.h index dbd7bb4a33b7..0cf0bea010fe 100644 --- a/include/linux/elfcore.h +++ b/include/linux/elfcore.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/signal.h> | 5 | #include <linux/signal.h> |
6 | #include <linux/time.h> | 6 | #include <linux/time.h> |
7 | #include <linux/user.h> | 7 | #include <linux/user.h> |
8 | #include <linux/ptrace.h> | ||
8 | 9 | ||
9 | struct elf_siginfo | 10 | struct elf_siginfo |
10 | { | 11 | { |
diff --git a/include/linux/file.h b/include/linux/file.h index 418b6101b59a..9901b850f2e4 100644 --- a/include/linux/file.h +++ b/include/linux/file.h | |||
@@ -60,8 +60,6 @@ extern void put_filp(struct file *); | |||
60 | extern int get_unused_fd(void); | 60 | extern int get_unused_fd(void); |
61 | extern void FASTCALL(put_unused_fd(unsigned int fd)); | 61 | extern void FASTCALL(put_unused_fd(unsigned int fd)); |
62 | struct kmem_cache; | 62 | struct kmem_cache; |
63 | extern void filp_ctor(void * objp, struct kmem_cache *cachep, unsigned long cflags); | ||
64 | extern void filp_dtor(void * objp, struct kmem_cache *cachep, unsigned long dflags); | ||
65 | 63 | ||
66 | extern struct file ** alloc_fd_array(int); | 64 | extern struct file ** alloc_fd_array(int); |
67 | extern void free_fd_array(struct file **, int); | 65 | extern void free_fd_array(struct file **, int); |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 84bb449b9b01..128d0082522c 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -35,6 +35,7 @@ struct files_stat_struct { | |||
35 | int max_files; /* tunable */ | 35 | int max_files; /* tunable */ |
36 | }; | 36 | }; |
37 | extern struct files_stat_struct files_stat; | 37 | extern struct files_stat_struct files_stat; |
38 | extern int get_max_files(void); | ||
38 | 39 | ||
39 | struct inodes_stat_t { | 40 | struct inodes_stat_t { |
40 | int nr_inodes; | 41 | int nr_inodes; |
@@ -363,6 +364,8 @@ struct address_space_operations { | |||
363 | loff_t offset, unsigned long nr_segs); | 364 | loff_t offset, unsigned long nr_segs); |
364 | struct page* (*get_xip_page)(struct address_space *, sector_t, | 365 | struct page* (*get_xip_page)(struct address_space *, sector_t, |
365 | int); | 366 | int); |
367 | /* migrate the contents of a page to the specified target */ | ||
368 | int (*migratepage) (struct page *, struct page *); | ||
366 | }; | 369 | }; |
367 | 370 | ||
368 | struct backing_dev_info; | 371 | struct backing_dev_info; |
@@ -1416,9 +1419,6 @@ extern int is_bad_inode(struct inode *); | |||
1416 | extern struct file_operations read_fifo_fops; | 1419 | extern struct file_operations read_fifo_fops; |
1417 | extern struct file_operations write_fifo_fops; | 1420 | extern struct file_operations write_fifo_fops; |
1418 | extern struct file_operations rdwr_fifo_fops; | 1421 | extern struct file_operations rdwr_fifo_fops; |
1419 | extern struct file_operations read_pipe_fops; | ||
1420 | extern struct file_operations write_pipe_fops; | ||
1421 | extern struct file_operations rdwr_pipe_fops; | ||
1422 | 1422 | ||
1423 | extern int fs_may_remount_ro(struct super_block *); | 1423 | extern int fs_may_remount_ro(struct super_block *); |
1424 | 1424 | ||
@@ -1664,6 +1664,8 @@ extern int vfs_follow_link(struct nameidata *, const char *); | |||
1664 | extern int page_readlink(struct dentry *, char __user *, int); | 1664 | extern int page_readlink(struct dentry *, char __user *, int); |
1665 | extern void *page_follow_link_light(struct dentry *, struct nameidata *); | 1665 | extern void *page_follow_link_light(struct dentry *, struct nameidata *); |
1666 | extern void page_put_link(struct dentry *, struct nameidata *, void *); | 1666 | extern void page_put_link(struct dentry *, struct nameidata *, void *); |
1667 | extern int __page_symlink(struct inode *inode, const char *symname, int len, | ||
1668 | gfp_t gfp_mask); | ||
1667 | extern int page_symlink(struct inode *inode, const char *symname, int len); | 1669 | extern int page_symlink(struct inode *inode, const char *symname, int len); |
1668 | extern struct inode_operations page_symlink_inode_operations; | 1670 | extern struct inode_operations page_symlink_inode_operations; |
1669 | extern int generic_readlink(struct dentry *, char __user *, int); | 1671 | extern int generic_readlink(struct dentry *, char __user *, int); |
@@ -1719,6 +1721,12 @@ extern void simple_release_fs(struct vfsmount **mount, int *count); | |||
1719 | 1721 | ||
1720 | extern ssize_t simple_read_from_buffer(void __user *, size_t, loff_t *, const void *, size_t); | 1722 | extern ssize_t simple_read_from_buffer(void __user *, size_t, loff_t *, const void *, size_t); |
1721 | 1723 | ||
1724 | #ifdef CONFIG_MIGRATION | ||
1725 | extern int buffer_migrate_page(struct page *, struct page *); | ||
1726 | #else | ||
1727 | #define buffer_migrate_page NULL | ||
1728 | #endif | ||
1729 | |||
1722 | extern int inode_change_ok(struct inode *, struct iattr *); | 1730 | extern int inode_change_ok(struct inode *, struct iattr *); |
1723 | extern int __must_check inode_setattr(struct inode *, struct iattr *); | 1731 | extern int __must_check inode_setattr(struct inode *, struct iattr *); |
1724 | 1732 | ||
diff --git a/include/linux/fuse.h b/include/linux/fuse.h index 528959c52f1b..5425b60021e3 100644 --- a/include/linux/fuse.h +++ b/include/linux/fuse.h | |||
@@ -14,7 +14,7 @@ | |||
14 | #define FUSE_KERNEL_VERSION 7 | 14 | #define FUSE_KERNEL_VERSION 7 |
15 | 15 | ||
16 | /** Minor version number of this interface */ | 16 | /** Minor version number of this interface */ |
17 | #define FUSE_KERNEL_MINOR_VERSION 5 | 17 | #define FUSE_KERNEL_MINOR_VERSION 6 |
18 | 18 | ||
19 | /** The node ID of the root inode */ | 19 | /** The node ID of the root inode */ |
20 | #define FUSE_ROOT_ID 1 | 20 | #define FUSE_ROOT_ID 1 |
@@ -58,6 +58,9 @@ struct fuse_kstatfs { | |||
58 | __u32 spare[6]; | 58 | __u32 spare[6]; |
59 | }; | 59 | }; |
60 | 60 | ||
61 | /** | ||
62 | * Bitmasks for fuse_setattr_in.valid | ||
63 | */ | ||
61 | #define FATTR_MODE (1 << 0) | 64 | #define FATTR_MODE (1 << 0) |
62 | #define FATTR_UID (1 << 1) | 65 | #define FATTR_UID (1 << 1) |
63 | #define FATTR_GID (1 << 2) | 66 | #define FATTR_GID (1 << 2) |
@@ -75,6 +78,11 @@ struct fuse_kstatfs { | |||
75 | #define FOPEN_DIRECT_IO (1 << 0) | 78 | #define FOPEN_DIRECT_IO (1 << 0) |
76 | #define FOPEN_KEEP_CACHE (1 << 1) | 79 | #define FOPEN_KEEP_CACHE (1 << 1) |
77 | 80 | ||
81 | /** | ||
82 | * INIT request/reply flags | ||
83 | */ | ||
84 | #define FUSE_ASYNC_READ (1 << 0) | ||
85 | |||
78 | enum fuse_opcode { | 86 | enum fuse_opcode { |
79 | FUSE_LOOKUP = 1, | 87 | FUSE_LOOKUP = 1, |
80 | FUSE_FORGET = 2, /* no reply */ | 88 | FUSE_FORGET = 2, /* no reply */ |
@@ -247,12 +255,16 @@ struct fuse_access_in { | |||
247 | struct fuse_init_in { | 255 | struct fuse_init_in { |
248 | __u32 major; | 256 | __u32 major; |
249 | __u32 minor; | 257 | __u32 minor; |
258 | __u32 max_readahead; | ||
259 | __u32 flags; | ||
250 | }; | 260 | }; |
251 | 261 | ||
252 | struct fuse_init_out { | 262 | struct fuse_init_out { |
253 | __u32 major; | 263 | __u32 major; |
254 | __u32 minor; | 264 | __u32 minor; |
255 | __u32 unused[3]; | 265 | __u32 max_readahead; |
266 | __u32 flags; | ||
267 | __u32 unused; | ||
256 | __u32 max_write; | 268 | __u32 max_write; |
257 | }; | 269 | }; |
258 | 270 | ||
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 20f9148e38d9..7851e6b520cf 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -157,9 +157,9 @@ extern void FASTCALL(free_cold_page(struct page *page)); | |||
157 | 157 | ||
158 | void page_alloc_init(void); | 158 | void page_alloc_init(void); |
159 | #ifdef CONFIG_NUMA | 159 | #ifdef CONFIG_NUMA |
160 | void drain_remote_pages(void); | 160 | void drain_node_pages(int node); |
161 | #else | 161 | #else |
162 | static inline void drain_remote_pages(void) { }; | 162 | static inline void drain_node_pages(int node) { }; |
163 | #endif | 163 | #endif |
164 | 164 | ||
165 | #endif /* __LINUX_GFP_H */ | 165 | #endif /* __LINUX_GFP_H */ |
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 089bfb1fa01a..6401c31d6add 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -40,6 +40,7 @@ enum hrtimer_restart { | |||
40 | enum hrtimer_state { | 40 | enum hrtimer_state { |
41 | HRTIMER_INACTIVE, /* Timer is inactive */ | 41 | HRTIMER_INACTIVE, /* Timer is inactive */ |
42 | HRTIMER_EXPIRED, /* Timer is expired */ | 42 | HRTIMER_EXPIRED, /* Timer is expired */ |
43 | HRTIMER_RUNNING, /* Timer is running the callback function */ | ||
43 | HRTIMER_PENDING, /* Timer is pending */ | 44 | HRTIMER_PENDING, /* Timer is pending */ |
44 | }; | 45 | }; |
45 | 46 | ||
@@ -100,9 +101,8 @@ struct hrtimer_base { | |||
100 | /* Exported timer functions: */ | 101 | /* Exported timer functions: */ |
101 | 102 | ||
102 | /* Initialize timers: */ | 103 | /* Initialize timers: */ |
103 | extern void hrtimer_init(struct hrtimer *timer, const clockid_t which_clock); | 104 | extern void hrtimer_init(struct hrtimer *timer, clockid_t which_clock, |
104 | extern void hrtimer_rebase(struct hrtimer *timer, const clockid_t which_clock); | 105 | enum hrtimer_mode mode); |
105 | |||
106 | 106 | ||
107 | /* Basic timer operations: */ | 107 | /* Basic timer operations: */ |
108 | extern int hrtimer_start(struct hrtimer *timer, ktime_t tim, | 108 | extern int hrtimer_start(struct hrtimer *timer, ktime_t tim, |
@@ -116,6 +116,10 @@ extern int hrtimer_try_to_cancel(struct hrtimer *timer); | |||
116 | extern ktime_t hrtimer_get_remaining(const struct hrtimer *timer); | 116 | extern ktime_t hrtimer_get_remaining(const struct hrtimer *timer); |
117 | extern int hrtimer_get_res(const clockid_t which_clock, struct timespec *tp); | 117 | extern int hrtimer_get_res(const clockid_t which_clock, struct timespec *tp); |
118 | 118 | ||
119 | #ifdef CONFIG_NO_IDLE_HZ | ||
120 | extern ktime_t hrtimer_get_next_event(void); | ||
121 | #endif | ||
122 | |||
119 | static inline int hrtimer_active(const struct hrtimer *timer) | 123 | static inline int hrtimer_active(const struct hrtimer *timer) |
120 | { | 124 | { |
121 | return timer->state == HRTIMER_PENDING; | 125 | return timer->state == HRTIMER_PENDING; |
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 7863a59bd598..63f1d63cc1d8 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -100,6 +100,9 @@ extern s32 i2c_smbus_write_block_data(struct i2c_client * client, | |||
100 | /* Returns the number of read bytes */ | 100 | /* Returns the number of read bytes */ |
101 | extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client * client, | 101 | extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client * client, |
102 | u8 command, u8 *values); | 102 | u8 command, u8 *values); |
103 | extern s32 i2c_smbus_write_i2c_block_data(struct i2c_client * client, | ||
104 | u8 command, u8 length, | ||
105 | u8 *values); | ||
103 | 106 | ||
104 | /* | 107 | /* |
105 | * A driver is capable of handling one or more physical devices present on | 108 | * A driver is capable of handling one or more physical devices present on |
diff --git a/include/linux/i2o.h b/include/linux/i2o.h index 9ba806796667..5a9d8c599171 100644 --- a/include/linux/i2o.h +++ b/include/linux/i2o.h | |||
@@ -1115,9 +1115,11 @@ static inline struct i2o_message *i2o_msg_get(struct i2o_controller *c) | |||
1115 | return ERR_PTR(-ENOMEM); | 1115 | return ERR_PTR(-ENOMEM); |
1116 | 1116 | ||
1117 | mmsg->mfa = readl(c->in_port); | 1117 | mmsg->mfa = readl(c->in_port); |
1118 | if (mmsg->mfa == I2O_QUEUE_EMPTY) { | 1118 | if (unlikely(mmsg->mfa >= c->in_queue.len)) { |
1119 | mempool_free(mmsg, c->in_msg.mempool); | 1119 | mempool_free(mmsg, c->in_msg.mempool); |
1120 | return ERR_PTR(-EBUSY); | 1120 | if(mmsg->mfa == I2O_QUEUE_EMPTY) |
1121 | return ERR_PTR(-EBUSY); | ||
1122 | return ERR_PTR(-EFAULT); | ||
1121 | } | 1123 | } |
1122 | 1124 | ||
1123 | return &mmsg->msg; | 1125 | return &mmsg->msg; |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 110b3cfac021..a7fc4cc79b23 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -582,7 +582,6 @@ typedef struct ide_drive_s { | |||
582 | unsigned noprobe : 1; /* from: hdx=noprobe */ | 582 | unsigned noprobe : 1; /* from: hdx=noprobe */ |
583 | unsigned removable : 1; /* 1 if need to do check_media_change */ | 583 | unsigned removable : 1; /* 1 if need to do check_media_change */ |
584 | unsigned attach : 1; /* needed for removable devices */ | 584 | unsigned attach : 1; /* needed for removable devices */ |
585 | unsigned is_flash : 1; /* 1 if probed as flash */ | ||
586 | unsigned forced_geom : 1; /* 1 if hdx=c,h,s was given at boot */ | 585 | unsigned forced_geom : 1; /* 1 if hdx=c,h,s was given at boot */ |
587 | unsigned no_unmask : 1; /* disallow setting unmask bit */ | 586 | unsigned no_unmask : 1; /* disallow setting unmask bit */ |
588 | unsigned no_io_32bit : 1; /* disallow enabling 32bit I/O */ | 587 | unsigned no_io_32bit : 1; /* disallow enabling 32bit I/O */ |
@@ -1006,7 +1005,6 @@ extern ide_hwif_t ide_hwifs[]; /* master data repository */ | |||
1006 | extern int noautodma; | 1005 | extern int noautodma; |
1007 | 1006 | ||
1008 | extern int ide_end_request (ide_drive_t *drive, int uptodate, int nrsecs); | 1007 | extern int ide_end_request (ide_drive_t *drive, int uptodate, int nrsecs); |
1009 | extern int __ide_end_request (ide_drive_t *drive, struct request *rq, int uptodate, int nrsecs); | ||
1010 | 1008 | ||
1011 | /* | 1009 | /* |
1012 | * This is used on exit from the driver to designate the next irq handler | 1010 | * This is used on exit from the driver to designate the next irq handler |
diff --git a/include/linux/io.h b/include/linux/io.h new file mode 100644 index 000000000000..85533ec5aaa1 --- /dev/null +++ b/include/linux/io.h | |||
@@ -0,0 +1,25 @@ | |||
1 | /* | ||
2 | * Copyright 2006 PathScale, Inc. All Rights Reserved. | ||
3 | * | ||
4 | * This file is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of version 2 of the GNU General Public License | ||
6 | * as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program; if not, write to the Free Software Foundation, | ||
15 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. | ||
16 | */ | ||
17 | |||
18 | #ifndef _LINUX_IO_H | ||
19 | #define _LINUX_IO_H | ||
20 | |||
21 | #include <asm/io.h> | ||
22 | |||
23 | void __iowrite32_copy(void __iomem *to, const void *from, size_t count); | ||
24 | |||
25 | #endif /* _LINUX_IO_H */ | ||
diff --git a/include/linux/ioc3.h b/include/linux/ioc3.h index e7906a72a4f1..da7c09e4ede6 100644 --- a/include/linux/ioc3.h +++ b/include/linux/ioc3.h | |||
@@ -27,7 +27,7 @@ struct ioc3_driver_data { | |||
27 | int id; /* IOC3 sequence number */ | 27 | int id; /* IOC3 sequence number */ |
28 | /* PCI mapping */ | 28 | /* PCI mapping */ |
29 | unsigned long pma; /* physical address */ | 29 | unsigned long pma; /* physical address */ |
30 | struct __iomem ioc3 *vma; /* pointer to registers */ | 30 | struct ioc3 __iomem *vma; /* pointer to registers */ |
31 | struct pci_dev *pdev; /* PCI device */ | 31 | struct pci_dev *pdev; /* PCI device */ |
32 | /* IRQ stuff */ | 32 | /* IRQ stuff */ |
33 | int dual_irq; /* set if separate IRQs are used */ | 33 | int dual_irq; /* set if separate IRQs are used */ |
diff --git a/include/linux/jbd.h b/include/linux/jbd.h index 558cb4c26ec9..41ee79962bb2 100644 --- a/include/linux/jbd.h +++ b/include/linux/jbd.h | |||
@@ -23,6 +23,7 @@ | |||
23 | #define jfs_debug jbd_debug | 23 | #define jfs_debug jbd_debug |
24 | #else | 24 | #else |
25 | 25 | ||
26 | #include <linux/types.h> | ||
26 | #include <linux/buffer_head.h> | 27 | #include <linux/buffer_head.h> |
27 | #include <linux/journal-head.h> | 28 | #include <linux/journal-head.h> |
28 | #include <linux/stddef.h> | 29 | #include <linux/stddef.h> |
@@ -238,7 +239,6 @@ typedef struct journal_superblock_s | |||
238 | 239 | ||
239 | #include <linux/fs.h> | 240 | #include <linux/fs.h> |
240 | #include <linux/sched.h> | 241 | #include <linux/sched.h> |
241 | #include <asm/bug.h> | ||
242 | 242 | ||
243 | #define JBD_ASSERTIONS | 243 | #define JBD_ASSERTIONS |
244 | #ifdef JBD_ASSERTIONS | 244 | #ifdef JBD_ASSERTIONS |
@@ -498,12 +498,6 @@ struct transaction_s | |||
498 | struct journal_head *t_checkpoint_list; | 498 | struct journal_head *t_checkpoint_list; |
499 | 499 | ||
500 | /* | 500 | /* |
501 | * Doubly-linked circular list of all buffers submitted for IO while | ||
502 | * checkpointing. [j_list_lock] | ||
503 | */ | ||
504 | struct journal_head *t_checkpoint_io_list; | ||
505 | |||
506 | /* | ||
507 | * Doubly-linked circular list of temporary buffers currently undergoing | 501 | * Doubly-linked circular list of temporary buffers currently undergoing |
508 | * IO in the log [j_list_lock] | 502 | * IO in the log [j_list_lock] |
509 | */ | 503 | */ |
@@ -618,6 +612,7 @@ struct transaction_s | |||
618 | * @j_wbuf: array of buffer_heads for journal_commit_transaction | 612 | * @j_wbuf: array of buffer_heads for journal_commit_transaction |
619 | * @j_wbufsize: maximum number of buffer_heads allowed in j_wbuf, the | 613 | * @j_wbufsize: maximum number of buffer_heads allowed in j_wbuf, the |
620 | * number that will fit in j_blocksize | 614 | * number that will fit in j_blocksize |
615 | * @j_last_sync_writer: most recent pid which did a synchronous write | ||
621 | * @j_private: An opaque pointer to fs-private information. | 616 | * @j_private: An opaque pointer to fs-private information. |
622 | */ | 617 | */ |
623 | 618 | ||
@@ -807,6 +802,8 @@ struct journal_s | |||
807 | struct buffer_head **j_wbuf; | 802 | struct buffer_head **j_wbuf; |
808 | int j_wbufsize; | 803 | int j_wbufsize; |
809 | 804 | ||
805 | pid_t j_last_sync_writer; | ||
806 | |||
810 | /* | 807 | /* |
811 | * An opaque pointer to fs-private information. ext3 puts its | 808 | * An opaque pointer to fs-private information. ext3 puts its |
812 | * superblock pointer here | 809 | * superblock pointer here |
@@ -849,7 +846,7 @@ extern void journal_commit_transaction(journal_t *); | |||
849 | 846 | ||
850 | /* Checkpoint list management */ | 847 | /* Checkpoint list management */ |
851 | int __journal_clean_checkpoint_list(journal_t *journal); | 848 | int __journal_clean_checkpoint_list(journal_t *journal); |
852 | int __journal_remove_checkpoint(struct journal_head *); | 849 | void __journal_remove_checkpoint(struct journal_head *); |
853 | void __journal_insert_checkpoint(struct journal_head *, transaction_t *); | 850 | void __journal_insert_checkpoint(struct journal_head *, transaction_t *); |
854 | 851 | ||
855 | /* Buffer IO */ | 852 | /* Buffer IO */ |
diff --git a/include/linux/kbd_kern.h b/include/linux/kbd_kern.h index 45f625d7d0b2..e87c32a5c86a 100644 --- a/include/linux/kbd_kern.h +++ b/include/linux/kbd_kern.h | |||
@@ -151,6 +151,13 @@ extern unsigned int keymap_count; | |||
151 | 151 | ||
152 | static inline void con_schedule_flip(struct tty_struct *t) | 152 | static inline void con_schedule_flip(struct tty_struct *t) |
153 | { | 153 | { |
154 | unsigned long flags; | ||
155 | spin_lock_irqsave(&t->buf.lock, flags); | ||
156 | if (t->buf.tail != NULL) { | ||
157 | t->buf.tail->active = 0; | ||
158 | t->buf.tail->commit = t->buf.tail->used; | ||
159 | } | ||
160 | spin_unlock_irqrestore(&t->buf.lock, flags); | ||
154 | schedule_work(&t->buf.work); | 161 | schedule_work(&t->buf.work); |
155 | } | 162 | } |
156 | 163 | ||
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index a5363324cf95..3b507bf05d09 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -185,6 +185,7 @@ extern enum system_states { | |||
185 | SYSTEM_HALT, | 185 | SYSTEM_HALT, |
186 | SYSTEM_POWER_OFF, | 186 | SYSTEM_POWER_OFF, |
187 | SYSTEM_RESTART, | 187 | SYSTEM_RESTART, |
188 | SYSTEM_SUSPEND_DISK, | ||
188 | } system_state; | 189 | } system_state; |
189 | 190 | ||
190 | #define TAINT_PROPRIETARY_MODULE (1<<0) | 191 | #define TAINT_PROPRIETARY_MODULE (1<<0) |
@@ -325,12 +326,6 @@ struct sysinfo { | |||
325 | /* Force a compilation error if condition is true */ | 326 | /* Force a compilation error if condition is true */ |
326 | #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) | 327 | #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) |
327 | 328 | ||
328 | #ifdef CONFIG_SYSCTL | ||
329 | extern int randomize_va_space; | ||
330 | #else | ||
331 | #define randomize_va_space 1 | ||
332 | #endif | ||
333 | |||
334 | /* Trap pasters of __FUNCTION__ at compile-time */ | 329 | /* Trap pasters of __FUNCTION__ at compile-time */ |
335 | #define __FUNCTION__ (__func__) | 330 | #define __FUNCTION__ (__func__) |
336 | 331 | ||
diff --git a/include/linux/kexec.h b/include/linux/kexec.h index a311f58c8a7c..cfb3410e32b1 100644 --- a/include/linux/kexec.h +++ b/include/linux/kexec.h | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <linux/list.h> | 6 | #include <linux/list.h> |
7 | #include <linux/linkage.h> | 7 | #include <linux/linkage.h> |
8 | #include <linux/compat.h> | 8 | #include <linux/compat.h> |
9 | #include <linux/ioport.h> | ||
9 | #include <asm/kexec.h> | 10 | #include <asm/kexec.h> |
10 | 11 | ||
11 | /* Verify architecture specific macros are defined */ | 12 | /* Verify architecture specific macros are defined */ |
diff --git a/include/linux/kmalloc_sizes.h b/include/linux/kmalloc_sizes.h index d82d4c05c12d..bda23e00ed71 100644 --- a/include/linux/kmalloc_sizes.h +++ b/include/linux/kmalloc_sizes.h | |||
@@ -19,8 +19,10 @@ | |||
19 | CACHE(32768) | 19 | CACHE(32768) |
20 | CACHE(65536) | 20 | CACHE(65536) |
21 | CACHE(131072) | 21 | CACHE(131072) |
22 | #ifndef CONFIG_MMU | 22 | #if (NR_CPUS > 512) || (MAX_NUMNODES > 256) || !defined(CONFIG_MMU) |
23 | CACHE(262144) | 23 | CACHE(262144) |
24 | #endif | ||
25 | #ifndef CONFIG_MMU | ||
24 | CACHE(524288) | 26 | CACHE(524288) |
25 | CACHE(1048576) | 27 | CACHE(1048576) |
26 | #ifdef CONFIG_LARGE_ALLOCS | 28 | #ifdef CONFIG_LARGE_ALLOCS |
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index 2a8d8da70961..c374b5fa8d3b 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
@@ -41,8 +41,10 @@ enum kobject_action { | |||
41 | KOBJ_ADD = (__force kobject_action_t) 0x01, /* exclusive to core */ | 41 | KOBJ_ADD = (__force kobject_action_t) 0x01, /* exclusive to core */ |
42 | KOBJ_REMOVE = (__force kobject_action_t) 0x02, /* exclusive to core */ | 42 | KOBJ_REMOVE = (__force kobject_action_t) 0x02, /* exclusive to core */ |
43 | KOBJ_CHANGE = (__force kobject_action_t) 0x03, /* device state change */ | 43 | KOBJ_CHANGE = (__force kobject_action_t) 0x03, /* device state change */ |
44 | KOBJ_OFFLINE = (__force kobject_action_t) 0x04, /* device offline */ | 44 | KOBJ_MOUNT = (__force kobject_action_t) 0x04, /* mount event for block devices (broken) */ |
45 | KOBJ_ONLINE = (__force kobject_action_t) 0x05, /* device online */ | 45 | KOBJ_UMOUNT = (__force kobject_action_t) 0x05, /* umount event for block devices (broken) */ |
46 | KOBJ_OFFLINE = (__force kobject_action_t) 0x06, /* device offline */ | ||
47 | KOBJ_ONLINE = (__force kobject_action_t) 0x07, /* device online */ | ||
46 | }; | 48 | }; |
47 | 49 | ||
48 | struct kobject { | 50 | struct kobject { |
diff --git a/include/linux/ktime.h b/include/linux/ktime.h index 1bd6552cc341..f3dec45ef874 100644 --- a/include/linux/ktime.h +++ b/include/linux/ktime.h | |||
@@ -10,6 +10,12 @@ | |||
10 | * | 10 | * |
11 | * Started by: Thomas Gleixner and Ingo Molnar | 11 | * Started by: Thomas Gleixner and Ingo Molnar |
12 | * | 12 | * |
13 | * Credits: | ||
14 | * | ||
15 | * Roman Zippel provided the ideas and primary code snippets of | ||
16 | * the ktime_t union and further simplifications of the original | ||
17 | * code. | ||
18 | * | ||
13 | * For licencing details see kernel-base/COPYING | 19 | * For licencing details see kernel-base/COPYING |
14 | */ | 20 | */ |
15 | #ifndef _LINUX_KTIME_H | 21 | #ifndef _LINUX_KTIME_H |
@@ -90,10 +96,16 @@ static inline ktime_t ktime_set(const long secs, const unsigned long nsecs) | |||
90 | ({ (ktime_t){ .tv64 = (kt).tv64 + (nsval) }; }) | 96 | ({ (ktime_t){ .tv64 = (kt).tv64 + (nsval) }; }) |
91 | 97 | ||
92 | /* convert a timespec to ktime_t format: */ | 98 | /* convert a timespec to ktime_t format: */ |
93 | #define timespec_to_ktime(ts) ktime_set((ts).tv_sec, (ts).tv_nsec) | 99 | static inline ktime_t timespec_to_ktime(struct timespec ts) |
100 | { | ||
101 | return ktime_set(ts.tv_sec, ts.tv_nsec); | ||
102 | } | ||
94 | 103 | ||
95 | /* convert a timeval to ktime_t format: */ | 104 | /* convert a timeval to ktime_t format: */ |
96 | #define timeval_to_ktime(tv) ktime_set((tv).tv_sec, (tv).tv_usec * 1000) | 105 | static inline ktime_t timeval_to_ktime(struct timeval tv) |
106 | { | ||
107 | return ktime_set(tv.tv_sec, tv.tv_usec * NSEC_PER_USEC); | ||
108 | } | ||
97 | 109 | ||
98 | /* Map the ktime_t to timespec conversion to ns_to_timespec function */ | 110 | /* Map the ktime_t to timespec conversion to ns_to_timespec function */ |
99 | #define ktime_to_timespec(kt) ns_to_timespec((kt).tv64) | 111 | #define ktime_to_timespec(kt) ns_to_timespec((kt).tv64) |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 9e5db2949c58..c91be5e64ede 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -557,17 +557,29 @@ ata_sg_is_last(struct scatterlist *sg, struct ata_queued_cmd *qc) | |||
557 | } | 557 | } |
558 | 558 | ||
559 | static inline struct scatterlist * | 559 | static inline struct scatterlist * |
560 | ata_qc_first_sg(struct ata_queued_cmd *qc) | ||
561 | { | ||
562 | if (qc->n_elem) | ||
563 | return qc->__sg; | ||
564 | if (qc->pad_len) | ||
565 | return &qc->pad_sgent; | ||
566 | return NULL; | ||
567 | } | ||
568 | |||
569 | static inline struct scatterlist * | ||
560 | ata_qc_next_sg(struct scatterlist *sg, struct ata_queued_cmd *qc) | 570 | ata_qc_next_sg(struct scatterlist *sg, struct ata_queued_cmd *qc) |
561 | { | 571 | { |
562 | if (sg == &qc->pad_sgent) | 572 | if (sg == &qc->pad_sgent) |
563 | return NULL; | 573 | return NULL; |
564 | if (++sg - qc->__sg < qc->n_elem) | 574 | if (++sg - qc->__sg < qc->n_elem) |
565 | return sg; | 575 | return sg; |
566 | return qc->pad_len ? &qc->pad_sgent : NULL; | 576 | if (qc->pad_len) |
577 | return &qc->pad_sgent; | ||
578 | return NULL; | ||
567 | } | 579 | } |
568 | 580 | ||
569 | #define ata_for_each_sg(sg, qc) \ | 581 | #define ata_for_each_sg(sg, qc) \ |
570 | for (sg = qc->__sg; sg; sg = ata_qc_next_sg(sg, qc)) | 582 | for (sg = ata_qc_first_sg(qc); sg; sg = ata_qc_next_sg(sg, qc)) |
571 | 583 | ||
572 | static inline unsigned int ata_tag_valid(unsigned int tag) | 584 | static inline unsigned int ata_tag_valid(unsigned int tag) |
573 | { | 585 | { |
diff --git a/include/linux/list.h b/include/linux/list.h index 945daa1f13dd..47208bd99f9e 100644 --- a/include/linux/list.h +++ b/include/linux/list.h | |||
@@ -34,9 +34,11 @@ struct list_head { | |||
34 | #define LIST_HEAD(name) \ | 34 | #define LIST_HEAD(name) \ |
35 | struct list_head name = LIST_HEAD_INIT(name) | 35 | struct list_head name = LIST_HEAD_INIT(name) |
36 | 36 | ||
37 | #define INIT_LIST_HEAD(ptr) do { \ | 37 | static inline void INIT_LIST_HEAD(struct list_head *list) |
38 | (ptr)->next = (ptr); (ptr)->prev = (ptr); \ | 38 | { |
39 | } while (0) | 39 | list->next = list; |
40 | list->prev = list; | ||
41 | } | ||
40 | 42 | ||
41 | /* | 43 | /* |
42 | * Insert a new entry between two known consecutive entries. | 44 | * Insert a new entry between two known consecutive entries. |
@@ -534,7 +536,11 @@ struct hlist_node { | |||
534 | #define HLIST_HEAD_INIT { .first = NULL } | 536 | #define HLIST_HEAD_INIT { .first = NULL } |
535 | #define HLIST_HEAD(name) struct hlist_head name = { .first = NULL } | 537 | #define HLIST_HEAD(name) struct hlist_head name = { .first = NULL } |
536 | #define INIT_HLIST_HEAD(ptr) ((ptr)->first = NULL) | 538 | #define INIT_HLIST_HEAD(ptr) ((ptr)->first = NULL) |
537 | #define INIT_HLIST_NODE(ptr) ((ptr)->next = NULL, (ptr)->pprev = NULL) | 539 | static inline void INIT_HLIST_NODE(struct hlist_node *h) |
540 | { | ||
541 | h->next = NULL; | ||
542 | h->pprev = NULL; | ||
543 | } | ||
538 | 544 | ||
539 | static inline int hlist_unhashed(const struct hlist_node *h) | 545 | static inline int hlist_unhashed(const struct hlist_node *h) |
540 | { | 546 | { |
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index 95c8fea293ba..ef21ed296039 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h | |||
@@ -84,6 +84,7 @@ struct nlm_rqst { | |||
84 | struct nlm_args a_args; /* arguments */ | 84 | struct nlm_args a_args; /* arguments */ |
85 | struct nlm_res a_res; /* result */ | 85 | struct nlm_res a_res; /* result */ |
86 | struct nlm_wait * a_block; | 86 | struct nlm_wait * a_block; |
87 | unsigned int a_retries; /* Retry count */ | ||
87 | char a_owner[NLMCLNT_OHSIZE]; | 88 | char a_owner[NLMCLNT_OHSIZE]; |
88 | }; | 89 | }; |
89 | 90 | ||
@@ -148,8 +149,7 @@ struct nlm_rqst * nlmclnt_alloc_call(void); | |||
148 | int nlmclnt_prepare_block(struct nlm_rqst *req, struct nlm_host *host, struct file_lock *fl); | 149 | int nlmclnt_prepare_block(struct nlm_rqst *req, struct nlm_host *host, struct file_lock *fl); |
149 | void nlmclnt_finish_block(struct nlm_rqst *req); | 150 | void nlmclnt_finish_block(struct nlm_rqst *req); |
150 | long nlmclnt_block(struct nlm_rqst *req, long timeout); | 151 | long nlmclnt_block(struct nlm_rqst *req, long timeout); |
151 | int nlmclnt_cancel(struct nlm_host *, struct file_lock *); | 152 | u32 nlmclnt_grant(const struct sockaddr_in *addr, const struct nlm_lock *); |
152 | u32 nlmclnt_grant(struct nlm_lock *); | ||
153 | void nlmclnt_recovery(struct nlm_host *, u32); | 153 | void nlmclnt_recovery(struct nlm_host *, u32); |
154 | int nlmclnt_reclaim(struct nlm_host *, struct file_lock *); | 154 | int nlmclnt_reclaim(struct nlm_host *, struct file_lock *); |
155 | int nlmclnt_setgrantargs(struct nlm_rqst *, struct nlm_lock *); | 155 | int nlmclnt_setgrantargs(struct nlm_rqst *, struct nlm_lock *); |
@@ -204,7 +204,7 @@ nlmsvc_file_inode(struct nlm_file *file) | |||
204 | * Compare two host addresses (needs modifying for ipv6) | 204 | * Compare two host addresses (needs modifying for ipv6) |
205 | */ | 205 | */ |
206 | static __inline__ int | 206 | static __inline__ int |
207 | nlm_cmp_addr(struct sockaddr_in *sin1, struct sockaddr_in *sin2) | 207 | nlm_cmp_addr(const struct sockaddr_in *sin1, const struct sockaddr_in *sin2) |
208 | { | 208 | { |
209 | return sin1->sin_addr.s_addr == sin2->sin_addr.s_addr; | 209 | return sin1->sin_addr.s_addr == sin2->sin_addr.s_addr; |
210 | } | 210 | } |
@@ -214,7 +214,7 @@ nlm_cmp_addr(struct sockaddr_in *sin1, struct sockaddr_in *sin2) | |||
214 | * When the second lock is of type F_UNLCK, this acts like a wildcard. | 214 | * When the second lock is of type F_UNLCK, this acts like a wildcard. |
215 | */ | 215 | */ |
216 | static __inline__ int | 216 | static __inline__ int |
217 | nlm_compare_locks(struct file_lock *fl1, struct file_lock *fl2) | 217 | nlm_compare_locks(const struct file_lock *fl1, const struct file_lock *fl2) |
218 | { | 218 | { |
219 | return fl1->fl_pid == fl2->fl_pid | 219 | return fl1->fl_pid == fl2->fl_pid |
220 | && fl1->fl_start == fl2->fl_start | 220 | && fl1->fl_start == fl2->fl_start |
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index 01f03bc06eff..968b1aa3732c 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h | |||
@@ -6,6 +6,10 @@ | |||
6 | #include <linux/mmzone.h> | 6 | #include <linux/mmzone.h> |
7 | #include <linux/notifier.h> | 7 | #include <linux/notifier.h> |
8 | 8 | ||
9 | struct page; | ||
10 | struct zone; | ||
11 | struct pglist_data; | ||
12 | |||
9 | #ifdef CONFIG_MEMORY_HOTPLUG | 13 | #ifdef CONFIG_MEMORY_HOTPLUG |
10 | /* | 14 | /* |
11 | * pgdat resizing functions | 15 | * pgdat resizing functions |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 85854b867463..498ff8778fb6 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -303,7 +303,7 @@ struct page { | |||
303 | */ | 303 | */ |
304 | #define put_page_testzero(p) \ | 304 | #define put_page_testzero(p) \ |
305 | ({ \ | 305 | ({ \ |
306 | BUG_ON(page_count(p) == 0); \ | 306 | BUG_ON(atomic_read(&(p)->_count) == -1);\ |
307 | atomic_add_negative(-1, &(p)->_count); \ | 307 | atomic_add_negative(-1, &(p)->_count); \ |
308 | }) | 308 | }) |
309 | 309 | ||
@@ -1051,5 +1051,11 @@ int shrink_slab(unsigned long scanned, gfp_t gfp_mask, | |||
1051 | void drop_pagecache(void); | 1051 | void drop_pagecache(void); |
1052 | void drop_slab(void); | 1052 | void drop_slab(void); |
1053 | 1053 | ||
1054 | #ifndef CONFIG_MMU | ||
1055 | #define randomize_va_space 0 | ||
1056 | #else | ||
1057 | extern int randomize_va_space; | ||
1058 | #endif | ||
1059 | |||
1054 | #endif /* __KERNEL__ */ | 1060 | #endif /* __KERNEL__ */ |
1055 | #endif /* _LINUX_MM_H */ | 1061 | #endif /* _LINUX_MM_H */ |
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index ccd3e13de1e8..bdc556d88498 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h | |||
@@ -21,24 +21,35 @@ struct mmc_command { | |||
21 | u32 arg; | 21 | u32 arg; |
22 | u32 resp[4]; | 22 | u32 resp[4]; |
23 | unsigned int flags; /* expected response type */ | 23 | unsigned int flags; /* expected response type */ |
24 | #define MMC_RSP_NONE (0 << 0) | 24 | #define MMC_RSP_PRESENT (1 << 0) |
25 | #define MMC_RSP_SHORT (1 << 0) | 25 | #define MMC_RSP_136 (1 << 1) /* 136 bit response */ |
26 | #define MMC_RSP_LONG (2 << 0) | 26 | #define MMC_RSP_CRC (1 << 2) /* expect valid crc */ |
27 | #define MMC_RSP_MASK (3 << 0) | 27 | #define MMC_RSP_BUSY (1 << 3) /* card may send busy */ |
28 | #define MMC_RSP_CRC (1 << 3) /* expect valid crc */ | 28 | #define MMC_RSP_OPCODE (1 << 4) /* response contains opcode */ |
29 | #define MMC_RSP_BUSY (1 << 4) /* card may send busy */ | 29 | #define MMC_CMD_MASK (3 << 5) /* command type */ |
30 | #define MMC_RSP_OPCODE (1 << 5) /* response contains opcode */ | 30 | #define MMC_CMD_AC (0 << 5) |
31 | #define MMC_CMD_ADTC (1 << 5) | ||
32 | #define MMC_CMD_BC (2 << 5) | ||
33 | #define MMC_CMD_BCR (3 << 5) | ||
31 | 34 | ||
32 | /* | 35 | /* |
33 | * These are the response types, and correspond to valid bit | 36 | * These are the response types, and correspond to valid bit |
34 | * patterns of the above flags. One additional valid pattern | 37 | * patterns of the above flags. One additional valid pattern |
35 | * is all zeros, which means we don't expect a response. | 38 | * is all zeros, which means we don't expect a response. |
36 | */ | 39 | */ |
37 | #define MMC_RSP_R1 (MMC_RSP_SHORT|MMC_RSP_CRC|MMC_RSP_OPCODE) | 40 | #define MMC_RSP_NONE (0) |
38 | #define MMC_RSP_R1B (MMC_RSP_SHORT|MMC_RSP_CRC|MMC_RSP_OPCODE|MMC_RSP_BUSY) | 41 | #define MMC_RSP_R1 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE) |
39 | #define MMC_RSP_R2 (MMC_RSP_LONG|MMC_RSP_CRC) | 42 | #define MMC_RSP_R1B (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE|MMC_RSP_BUSY) |
40 | #define MMC_RSP_R3 (MMC_RSP_SHORT) | 43 | #define MMC_RSP_R2 (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC) |
41 | #define MMC_RSP_R6 (MMC_RSP_SHORT|MMC_RSP_CRC) | 44 | #define MMC_RSP_R3 (MMC_RSP_PRESENT) |
45 | #define MMC_RSP_R6 (MMC_RSP_PRESENT|MMC_RSP_CRC) | ||
46 | |||
47 | #define mmc_resp_type(cmd) ((cmd)->flags & (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC|MMC_RSP_BUSY|MMC_RSP_OPCODE)) | ||
48 | |||
49 | /* | ||
50 | * These are the command types. | ||
51 | */ | ||
52 | #define mmc_cmd_type(cmd) ((cmd)->flags & MMC_CMD_MASK) | ||
42 | 53 | ||
43 | unsigned int retries; /* max number of retries */ | 54 | unsigned int retries; /* max number of retries */ |
44 | unsigned int error; /* command error */ | 55 | unsigned int error; /* command error */ |
diff --git a/include/linux/mmc/protocol.h b/include/linux/mmc/protocol.h index a14dc306545b..81c3f77f652c 100644 --- a/include/linux/mmc/protocol.h +++ b/include/linux/mmc/protocol.h | |||
@@ -79,7 +79,7 @@ | |||
79 | /* SD commands type argument response */ | 79 | /* SD commands type argument response */ |
80 | /* class 8 */ | 80 | /* class 8 */ |
81 | /* This is basically the same command as for MMC with some quirks. */ | 81 | /* This is basically the same command as for MMC with some quirks. */ |
82 | #define SD_SEND_RELATIVE_ADDR 3 /* ac R6 */ | 82 | #define SD_SEND_RELATIVE_ADDR 3 /* bcr R6 */ |
83 | 83 | ||
84 | /* Application commands */ | 84 | /* Application commands */ |
85 | #define SD_APP_SET_BUS_WIDTH 6 /* ac [1:0] bus width R1 */ | 85 | #define SD_APP_SET_BUS_WIDTH 6 /* ac [1:0] bus width R1 */ |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 93a849f742db..ebfc238cc243 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -91,10 +91,21 @@ struct per_cpu_pageset { | |||
91 | * be 8 (2 ** 3) zonelists. GFP_ZONETYPES defines the number of possible | 91 | * be 8 (2 ** 3) zonelists. GFP_ZONETYPES defines the number of possible |
92 | * combinations of zone modifiers in "zone modifier space". | 92 | * combinations of zone modifiers in "zone modifier space". |
93 | * | 93 | * |
94 | * As an optimisation any zone modifier bits which are only valid when | ||
95 | * no other zone modifier bits are set (loners) should be placed in | ||
96 | * the highest order bits of this field. This allows us to reduce the | ||
97 | * extent of the zonelists thus saving space. For example in the case | ||
98 | * of three zone modifier bits, we could require up to eight zonelists. | ||
99 | * If the left most zone modifier is a "loner" then the highest valid | ||
100 | * zonelist would be four allowing us to allocate only five zonelists. | ||
101 | * Use the first form for GFP_ZONETYPES when the left most bit is not | ||
102 | * a "loner", otherwise use the second. | ||
103 | * | ||
94 | * NOTE! Make sure this matches the zones in <linux/gfp.h> | 104 | * NOTE! Make sure this matches the zones in <linux/gfp.h> |
95 | */ | 105 | */ |
96 | #define GFP_ZONEMASK 0x07 | 106 | #define GFP_ZONEMASK 0x07 |
97 | #define GFP_ZONETYPES 5 | 107 | /* #define GFP_ZONETYPES (GFP_ZONEMASK + 1) */ /* Non-loner */ |
108 | #define GFP_ZONETYPES ((GFP_ZONEMASK + 1) / 2 + 1) /* Loner */ | ||
98 | 109 | ||
99 | /* | 110 | /* |
100 | * On machines where it is needed (eg PCs) we divide physical memory | 111 | * On machines where it is needed (eg PCs) we divide physical memory |
diff --git a/include/linux/mtd/map.h b/include/linux/mtd/map.h index fedfbc8a287f..7dfd6e1fcde7 100644 --- a/include/linux/mtd/map.h +++ b/include/linux/mtd/map.h | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <asm/unaligned.h> | 15 | #include <asm/unaligned.h> |
16 | #include <asm/system.h> | 16 | #include <asm/system.h> |
17 | #include <asm/io.h> | 17 | #include <asm/io.h> |
18 | #include <asm/bug.h> | ||
19 | 18 | ||
20 | #ifdef CONFIG_MTD_MAP_BANK_WIDTH_1 | 19 | #ifdef CONFIG_MTD_MAP_BANK_WIDTH_1 |
21 | #define map_bankwidth(map) 1 | 20 | #define map_bankwidth(map) 1 |
diff --git a/include/linux/namespace.h b/include/linux/namespace.h index 6731977c4c13..3abc8e3b4879 100644 --- a/include/linux/namespace.h +++ b/include/linux/namespace.h | |||
@@ -15,6 +15,7 @@ struct namespace { | |||
15 | 15 | ||
16 | extern int copy_namespace(int, struct task_struct *); | 16 | extern int copy_namespace(int, struct task_struct *); |
17 | extern void __put_namespace(struct namespace *namespace); | 17 | extern void __put_namespace(struct namespace *namespace); |
18 | extern struct namespace *dup_namespace(struct task_struct *, struct fs_struct *); | ||
18 | 19 | ||
19 | static inline void put_namespace(struct namespace *namespace) | 20 | static inline void put_namespace(struct namespace *namespace) |
20 | { | 21 | { |
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index 4cf6088625c1..468896939843 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
@@ -184,8 +184,11 @@ static inline int nf_hook_thresh(int pf, unsigned int hook, | |||
184 | struct sk_buff **pskb, | 184 | struct sk_buff **pskb, |
185 | struct net_device *indev, | 185 | struct net_device *indev, |
186 | struct net_device *outdev, | 186 | struct net_device *outdev, |
187 | int (*okfn)(struct sk_buff *), int thresh) | 187 | int (*okfn)(struct sk_buff *), int thresh, |
188 | int cond) | ||
188 | { | 189 | { |
190 | if (!cond) | ||
191 | return 1; | ||
189 | #ifndef CONFIG_NETFILTER_DEBUG | 192 | #ifndef CONFIG_NETFILTER_DEBUG |
190 | if (list_empty(&nf_hooks[pf][hook])) | 193 | if (list_empty(&nf_hooks[pf][hook])) |
191 | return 1; | 194 | return 1; |
@@ -197,7 +200,7 @@ static inline int nf_hook(int pf, unsigned int hook, struct sk_buff **pskb, | |||
197 | struct net_device *indev, struct net_device *outdev, | 200 | struct net_device *indev, struct net_device *outdev, |
198 | int (*okfn)(struct sk_buff *)) | 201 | int (*okfn)(struct sk_buff *)) |
199 | { | 202 | { |
200 | return nf_hook_thresh(pf, hook, pskb, indev, outdev, okfn, INT_MIN); | 203 | return nf_hook_thresh(pf, hook, pskb, indev, outdev, okfn, INT_MIN, 1); |
201 | } | 204 | } |
202 | 205 | ||
203 | /* Activate hook; either okfn or kfree_skb called, unless a hook | 206 | /* Activate hook; either okfn or kfree_skb called, unless a hook |
@@ -224,7 +227,13 @@ static inline int nf_hook(int pf, unsigned int hook, struct sk_buff **pskb, | |||
224 | 227 | ||
225 | #define NF_HOOK_THRESH(pf, hook, skb, indev, outdev, okfn, thresh) \ | 228 | #define NF_HOOK_THRESH(pf, hook, skb, indev, outdev, okfn, thresh) \ |
226 | ({int __ret; \ | 229 | ({int __ret; \ |
227 | if ((__ret=nf_hook_thresh(pf, hook, &(skb), indev, outdev, okfn, thresh)) == 1)\ | 230 | if ((__ret=nf_hook_thresh(pf, hook, &(skb), indev, outdev, okfn, thresh, 1)) == 1)\ |
231 | __ret = (okfn)(skb); \ | ||
232 | __ret;}) | ||
233 | |||
234 | #define NF_HOOK_COND(pf, hook, skb, indev, outdev, okfn, cond) \ | ||
235 | ({int __ret; \ | ||
236 | if ((__ret=nf_hook_thresh(pf, hook, &(skb), indev, outdev, okfn, INT_MIN, cond)) == 1)\ | ||
228 | __ret = (okfn)(skb); \ | 237 | __ret = (okfn)(skb); \ |
229 | __ret;}) | 238 | __ret;}) |
230 | 239 | ||
@@ -295,11 +304,13 @@ extern struct proc_dir_entry *proc_net_netfilter; | |||
295 | 304 | ||
296 | #else /* !CONFIG_NETFILTER */ | 305 | #else /* !CONFIG_NETFILTER */ |
297 | #define NF_HOOK(pf, hook, skb, indev, outdev, okfn) (okfn)(skb) | 306 | #define NF_HOOK(pf, hook, skb, indev, outdev, okfn) (okfn)(skb) |
307 | #define NF_HOOK_COND(pf, hook, skb, indev, outdev, okfn, cond) (okfn)(skb) | ||
298 | static inline int nf_hook_thresh(int pf, unsigned int hook, | 308 | static inline int nf_hook_thresh(int pf, unsigned int hook, |
299 | struct sk_buff **pskb, | 309 | struct sk_buff **pskb, |
300 | struct net_device *indev, | 310 | struct net_device *indev, |
301 | struct net_device *outdev, | 311 | struct net_device *outdev, |
302 | int (*okfn)(struct sk_buff *), int thresh) | 312 | int (*okfn)(struct sk_buff *), int thresh, |
313 | int cond) | ||
303 | { | 314 | { |
304 | return okfn(*pskb); | 315 | return okfn(*pskb); |
305 | } | 316 | } |
@@ -307,7 +318,7 @@ static inline int nf_hook(int pf, unsigned int hook, struct sk_buff **pskb, | |||
307 | struct net_device *indev, struct net_device *outdev, | 318 | struct net_device *indev, struct net_device *outdev, |
308 | int (*okfn)(struct sk_buff *)) | 319 | int (*okfn)(struct sk_buff *)) |
309 | { | 320 | { |
310 | return okfn(*pskb); | 321 | return 1; |
311 | } | 322 | } |
312 | static inline void nf_ct_attach(struct sk_buff *new, struct sk_buff *skb) {} | 323 | static inline void nf_ct_attach(struct sk_buff *new, struct sk_buff *skb) {} |
313 | struct flowi; | 324 | struct flowi; |
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index 59ff6c430cf6..6500d4e59d46 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
@@ -19,7 +19,21 @@ struct xt_get_revision | |||
19 | /* For standard target */ | 19 | /* For standard target */ |
20 | #define XT_RETURN (-NF_REPEAT - 1) | 20 | #define XT_RETURN (-NF_REPEAT - 1) |
21 | 21 | ||
22 | #define XT_ALIGN(s) (((s) + (__alignof__(u_int64_t)-1)) & ~(__alignof__(u_int64_t)-1)) | 22 | /* this is a dummy structure to find out the alignment requirement for a struct |
23 | * containing all the fundamental data types that are used in ipt_entry, | ||
24 | * ip6t_entry and arpt_entry. This sucks, and it is a hack. It will be my | ||
25 | * personal pleasure to remove it -HW | ||
26 | */ | ||
27 | struct _xt_align | ||
28 | { | ||
29 | u_int8_t u8; | ||
30 | u_int16_t u16; | ||
31 | u_int32_t u32; | ||
32 | u_int64_t u64; | ||
33 | }; | ||
34 | |||
35 | #define XT_ALIGN(s) (((s) + (__alignof__(struct _xt_align)-1)) \ | ||
36 | & ~(__alignof__(struct _xt_align)-1)) | ||
23 | 37 | ||
24 | /* Standard return verdict, or do jump. */ | 38 | /* Standard return verdict, or do jump. */ |
25 | #define XT_STANDARD_TARGET "" | 39 | #define XT_STANDARD_TARGET "" |
diff --git a/include/linux/netfilter_bridge/ebt_log.h b/include/linux/netfilter_bridge/ebt_log.h index 358fbc84fb59..96e231ae7554 100644 --- a/include/linux/netfilter_bridge/ebt_log.h +++ b/include/linux/netfilter_bridge/ebt_log.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #define EBT_LOG_IP 0x01 /* if the frame is made by ip, log the ip information */ | 4 | #define EBT_LOG_IP 0x01 /* if the frame is made by ip, log the ip information */ |
5 | #define EBT_LOG_ARP 0x02 | 5 | #define EBT_LOG_ARP 0x02 |
6 | #define EBT_LOG_NFLOG 0x04 | ||
6 | #define EBT_LOG_MASK (EBT_LOG_IP | EBT_LOG_ARP) | 7 | #define EBT_LOG_MASK (EBT_LOG_IP | EBT_LOG_ARP) |
7 | #define EBT_LOG_PREFIX_SIZE 30 | 8 | #define EBT_LOG_PREFIX_SIZE 30 |
8 | #define EBT_LOG_WATCHER "log" | 9 | #define EBT_LOG_WATCHER "log" |
diff --git a/include/linux/netfilter_ipv4.h b/include/linux/netfilter_ipv4.h index fdc4a9527343..43c09d790b83 100644 --- a/include/linux/netfilter_ipv4.h +++ b/include/linux/netfilter_ipv4.h | |||
@@ -79,7 +79,7 @@ enum nf_ip_hook_priorities { | |||
79 | 79 | ||
80 | #ifdef __KERNEL__ | 80 | #ifdef __KERNEL__ |
81 | extern int ip_route_me_harder(struct sk_buff **pskb); | 81 | extern int ip_route_me_harder(struct sk_buff **pskb); |
82 | 82 | extern int ip_xfrm_me_harder(struct sk_buff **pskb); | |
83 | #endif /*__KERNEL__*/ | 83 | #endif /*__KERNEL__*/ |
84 | 84 | ||
85 | #endif /*__LINUX_IP_NETFILTER_H*/ | 85 | #endif /*__LINUX_IP_NETFILTER_H*/ |
diff --git a/include/linux/netfilter_ipv4/ipt_LOG.h b/include/linux/netfilter_ipv4/ipt_LOG.h index 22d16177319b..892f9a33fea8 100644 --- a/include/linux/netfilter_ipv4/ipt_LOG.h +++ b/include/linux/netfilter_ipv4/ipt_LOG.h | |||
@@ -6,7 +6,8 @@ | |||
6 | #define IPT_LOG_TCPOPT 0x02 /* Log TCP options */ | 6 | #define IPT_LOG_TCPOPT 0x02 /* Log TCP options */ |
7 | #define IPT_LOG_IPOPT 0x04 /* Log IP options */ | 7 | #define IPT_LOG_IPOPT 0x04 /* Log IP options */ |
8 | #define IPT_LOG_UID 0x08 /* Log UID owning local socket */ | 8 | #define IPT_LOG_UID 0x08 /* Log UID owning local socket */ |
9 | #define IPT_LOG_MASK 0x0f | 9 | #define IPT_LOG_NFLOG 0x10 /* Log using nf_log backend */ |
10 | #define IPT_LOG_MASK 0x1f | ||
10 | 11 | ||
11 | struct ipt_log_info { | 12 | struct ipt_log_info { |
12 | unsigned char level; | 13 | unsigned char level; |
diff --git a/include/linux/netfilter_ipv4/ipt_connbytes.h b/include/linux/netfilter_ipv4/ipt_connbytes.h index b04dfa3083c9..f63e6ee91113 100644 --- a/include/linux/netfilter_ipv4/ipt_connbytes.h +++ b/include/linux/netfilter_ipv4/ipt_connbytes.h | |||
@@ -1,10 +1,10 @@ | |||
1 | #ifndef _IPT_CONNBYTES_H | 1 | #ifndef _IPT_CONNBYTES_H |
2 | #define _IPT_CONNBYTES_H | 2 | #define _IPT_CONNBYTES_H |
3 | 3 | ||
4 | #include <net/netfilter/xt_connbytes.h> | 4 | #include <linux/netfilter/xt_connbytes.h> |
5 | #define ipt_connbytes_what xt_connbytes_what | 5 | #define ipt_connbytes_what xt_connbytes_what |
6 | 6 | ||
7 | #define IPT_CONNBYTES_PKTS XT_CONNBYTES_PACKETS | 7 | #define IPT_CONNBYTES_PKTS XT_CONNBYTES_PKTS |
8 | #define IPT_CONNBYTES_BYTES XT_CONNBYTES_BYTES | 8 | #define IPT_CONNBYTES_BYTES XT_CONNBYTES_BYTES |
9 | #define IPT_CONNBYTES_AVGPKT XT_CONNBYTES_AVGPKT | 9 | #define IPT_CONNBYTES_AVGPKT XT_CONNBYTES_AVGPKT |
10 | 10 | ||
diff --git a/include/linux/netfilter_ipv4/ipt_policy.h b/include/linux/netfilter_ipv4/ipt_policy.h index 7fd1bec453f1..a3f6eff39d33 100644 --- a/include/linux/netfilter_ipv4/ipt_policy.h +++ b/include/linux/netfilter_ipv4/ipt_policy.h | |||
@@ -27,16 +27,22 @@ struct ipt_policy_spec | |||
27 | reqid:1; | 27 | reqid:1; |
28 | }; | 28 | }; |
29 | 29 | ||
30 | union ipt_policy_addr | ||
31 | { | ||
32 | struct in_addr a4; | ||
33 | struct in6_addr a6; | ||
34 | }; | ||
35 | |||
30 | struct ipt_policy_elem | 36 | struct ipt_policy_elem |
31 | { | 37 | { |
32 | u_int32_t saddr; | 38 | union ipt_policy_addr saddr; |
33 | u_int32_t smask; | 39 | union ipt_policy_addr smask; |
34 | u_int32_t daddr; | 40 | union ipt_policy_addr daddr; |
35 | u_int32_t dmask; | 41 | union ipt_policy_addr dmask; |
36 | u_int32_t spi; | 42 | u_int32_t spi; |
37 | u_int32_t reqid; | 43 | u_int32_t reqid; |
38 | u_int8_t proto; | 44 | u_int8_t proto; |
39 | u_int8_t mode; | 45 | u_int8_t mode; |
40 | 46 | ||
41 | struct ipt_policy_spec match; | 47 | struct ipt_policy_spec match; |
42 | struct ipt_policy_spec invert; | 48 | struct ipt_policy_spec invert; |
diff --git a/include/linux/netfilter_ipv6/ip6t_LOG.h b/include/linux/netfilter_ipv6/ip6t_LOG.h index 9008ff5c40ae..060c1a1c6c60 100644 --- a/include/linux/netfilter_ipv6/ip6t_LOG.h +++ b/include/linux/netfilter_ipv6/ip6t_LOG.h | |||
@@ -6,7 +6,8 @@ | |||
6 | #define IP6T_LOG_TCPOPT 0x02 /* Log TCP options */ | 6 | #define IP6T_LOG_TCPOPT 0x02 /* Log TCP options */ |
7 | #define IP6T_LOG_IPOPT 0x04 /* Log IP options */ | 7 | #define IP6T_LOG_IPOPT 0x04 /* Log IP options */ |
8 | #define IP6T_LOG_UID 0x08 /* Log UID owning local socket */ | 8 | #define IP6T_LOG_UID 0x08 /* Log UID owning local socket */ |
9 | #define IP6T_LOG_MASK 0x0f | 9 | #define IP6T_LOG_NFLOG 0x10 /* Log using nf_log backend */ |
10 | #define IP6T_LOG_MASK 0x1f | ||
10 | 11 | ||
11 | struct ip6t_log_info { | 12 | struct ip6t_log_info { |
12 | unsigned char level; | 13 | unsigned char level; |
diff --git a/include/linux/netfilter_ipv6/ip6t_policy.h b/include/linux/netfilter_ipv6/ip6t_policy.h index 5a93afcd2ff1..671bd818300f 100644 --- a/include/linux/netfilter_ipv6/ip6t_policy.h +++ b/include/linux/netfilter_ipv6/ip6t_policy.h | |||
@@ -27,16 +27,22 @@ struct ip6t_policy_spec | |||
27 | reqid:1; | 27 | reqid:1; |
28 | }; | 28 | }; |
29 | 29 | ||
30 | union ip6t_policy_addr | ||
31 | { | ||
32 | struct in_addr a4; | ||
33 | struct in6_addr a6; | ||
34 | }; | ||
35 | |||
30 | struct ip6t_policy_elem | 36 | struct ip6t_policy_elem |
31 | { | 37 | { |
32 | struct in6_addr saddr; | 38 | union ip6t_policy_addr saddr; |
33 | struct in6_addr smask; | 39 | union ip6t_policy_addr smask; |
34 | struct in6_addr daddr; | 40 | union ip6t_policy_addr daddr; |
35 | struct in6_addr dmask; | 41 | union ip6t_policy_addr dmask; |
36 | u_int32_t spi; | 42 | u_int32_t spi; |
37 | u_int32_t reqid; | 43 | u_int32_t reqid; |
38 | u_int8_t proto; | 44 | u_int8_t proto; |
39 | u_int8_t mode; | 45 | u_int8_t mode; |
40 | 46 | ||
41 | struct ip6t_policy_spec match; | 47 | struct ip6t_policy_spec match; |
42 | struct ip6t_policy_spec invert; | 48 | struct ip6t_policy_spec invert; |
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 6a2ccf78a356..c256ebe2a7b4 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
@@ -160,7 +160,8 @@ extern int netlink_unregister_notifier(struct notifier_block *nb); | |||
160 | 160 | ||
161 | /* finegrained unicast helpers: */ | 161 | /* finegrained unicast helpers: */ |
162 | struct sock *netlink_getsockbyfilp(struct file *filp); | 162 | struct sock *netlink_getsockbyfilp(struct file *filp); |
163 | int netlink_attachskb(struct sock *sk, struct sk_buff *skb, int nonblock, long timeo); | 163 | int netlink_attachskb(struct sock *sk, struct sk_buff *skb, int nonblock, |
164 | long timeo, struct sock *ssk); | ||
164 | void netlink_detachskb(struct sock *sk, struct sk_buff *skb); | 165 | void netlink_detachskb(struct sock *sk, struct sk_buff *skb); |
165 | int netlink_sendskb(struct sock *sk, struct sk_buff *skb, int protocol); | 166 | int netlink_sendskb(struct sock *sk, struct sk_buff *skb, int protocol); |
166 | 167 | ||
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 547d649b274e..b4dc6e2e10c9 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -398,7 +398,7 @@ extern struct inode_operations nfs_symlink_inode_operations; | |||
398 | extern int nfs_register_sysctl(void); | 398 | extern int nfs_register_sysctl(void); |
399 | extern void nfs_unregister_sysctl(void); | 399 | extern void nfs_unregister_sysctl(void); |
400 | #else | 400 | #else |
401 | #define nfs_register_sysctl() do { } while(0) | 401 | #define nfs_register_sysctl() 0 |
402 | #define nfs_unregister_sysctl() do { } while(0) | 402 | #define nfs_unregister_sysctl() do { } while(0) |
403 | #endif | 403 | #endif |
404 | 404 | ||
diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h index 4726ef7ba8e8..b959a4525cbd 100644 --- a/include/linux/nodemask.h +++ b/include/linux/nodemask.h | |||
@@ -84,7 +84,6 @@ | |||
84 | #include <linux/threads.h> | 84 | #include <linux/threads.h> |
85 | #include <linux/bitmap.h> | 85 | #include <linux/bitmap.h> |
86 | #include <linux/numa.h> | 86 | #include <linux/numa.h> |
87 | #include <asm/bug.h> | ||
88 | 87 | ||
89 | typedef struct { DECLARE_BITMAP(bits, MAX_NUMNODES); } nodemask_t; | 88 | typedef struct { DECLARE_BITMAP(bits, MAX_NUMNODES); } nodemask_t; |
90 | extern nodemask_t _unused_nodemask_arg_; | 89 | extern nodemask_t _unused_nodemask_arg_; |
diff --git a/include/linux/parport.h b/include/linux/parport.h index f67f838a3a1f..008d736a6c9a 100644 --- a/include/linux/parport.h +++ b/include/linux/parport.h | |||
@@ -128,6 +128,11 @@ struct amiga_parport_state { | |||
128 | unsigned char statusdir;/* ciab.ddrb & 7 */ | 128 | unsigned char statusdir;/* ciab.ddrb & 7 */ |
129 | }; | 129 | }; |
130 | 130 | ||
131 | struct ip32_parport_state { | ||
132 | unsigned int dcr; | ||
133 | unsigned int ecr; | ||
134 | }; | ||
135 | |||
131 | struct parport_state { | 136 | struct parport_state { |
132 | union { | 137 | union { |
133 | struct pc_parport_state pc; | 138 | struct pc_parport_state pc; |
@@ -135,6 +140,7 @@ struct parport_state { | |||
135 | struct ax_parport_state ax; | 140 | struct ax_parport_state ax; |
136 | struct amiga_parport_state amiga; | 141 | struct amiga_parport_state amiga; |
137 | /* Atari has not state. */ | 142 | /* Atari has not state. */ |
143 | struct ip32_parport_state ip32; | ||
138 | void *misc; | 144 | void *misc; |
139 | } u; | 145 | } u; |
140 | }; | 146 | }; |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 0a44072383ec..fe1a2b02fc55 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -406,7 +406,6 @@ struct pci_dev *pci_find_device_reverse (unsigned int vendor, unsigned int devic | |||
406 | struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn); | 406 | struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn); |
407 | int pci_find_capability (struct pci_dev *dev, int cap); | 407 | int pci_find_capability (struct pci_dev *dev, int cap); |
408 | int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap); | 408 | int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap); |
409 | int pci_find_ext_capability (struct pci_dev *dev, int cap); | ||
410 | struct pci_bus * pci_find_next_bus(const struct pci_bus *from); | 409 | struct pci_bus * pci_find_next_bus(const struct pci_bus *from); |
411 | 410 | ||
412 | struct pci_dev *pci_get_device (unsigned int vendor, unsigned int device, struct pci_dev *from); | 411 | struct pci_dev *pci_get_device (unsigned int vendor, unsigned int device, struct pci_dev *from); |
@@ -626,7 +625,6 @@ static inline int pci_register_driver(struct pci_driver *drv) { return 0;} | |||
626 | static inline void pci_unregister_driver(struct pci_driver *drv) { } | 625 | static inline void pci_unregister_driver(struct pci_driver *drv) { } |
627 | static inline int pci_find_capability (struct pci_dev *dev, int cap) {return 0; } | 626 | static inline int pci_find_capability (struct pci_dev *dev, int cap) {return 0; } |
628 | static inline int pci_find_next_capability (struct pci_dev *dev, u8 post, int cap) { return 0; } | 627 | static inline int pci_find_next_capability (struct pci_dev *dev, u8 post, int cap) { return 0; } |
629 | static inline int pci_find_ext_capability (struct pci_dev *dev, int cap) {return 0; } | ||
630 | static inline const struct pci_device_id *pci_match_device(const struct pci_device_id *ids, const struct pci_dev *dev) { return NULL; } | 628 | static inline const struct pci_device_id *pci_match_device(const struct pci_device_id *ids, const struct pci_dev *dev) { return NULL; } |
631 | 629 | ||
632 | /* Power management related routines */ | 630 | /* Power management related routines */ |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index ecc1fc1f0f04..751eea58bde8 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -394,14 +394,9 @@ | |||
394 | #define PCI_DEVICE_ID_NS_SC1100_SMI 0x0511 | 394 | #define PCI_DEVICE_ID_NS_SC1100_SMI 0x0511 |
395 | #define PCI_DEVICE_ID_NS_SC1100_XBUS 0x0515 | 395 | #define PCI_DEVICE_ID_NS_SC1100_XBUS 0x0515 |
396 | #define PCI_DEVICE_ID_NS_87410 0xd001 | 396 | #define PCI_DEVICE_ID_NS_87410 0xd001 |
397 | #define PCI_DEVICE_ID_NS_CS5535_IDE 0x002d | ||
398 | 397 | ||
399 | #define PCI_DEVICE_ID_NS_CS5535_HOST_BRIDGE 0x0028 | 398 | #define PCI_DEVICE_ID_NS_CS5535_HOST_BRIDGE 0x0028 |
400 | #define PCI_DEVICE_ID_NS_CS5535_ISA_BRIDGE 0x002b | 399 | #define PCI_DEVICE_ID_NS_CS5535_ISA_BRIDGE 0x002b |
401 | #define PCI_DEVICE_ID_NS_CS5535_IDE 0x002d | ||
402 | #define PCI_DEVICE_ID_NS_CS5535_AUDIO 0x002e | ||
403 | #define PCI_DEVICE_ID_NS_CS5535_USB 0x002f | ||
404 | #define PCI_DEVICE_ID_NS_CS5535_VIDEO 0x0030 | ||
405 | 400 | ||
406 | #define PCI_VENDOR_ID_TSENG 0x100c | 401 | #define PCI_VENDOR_ID_TSENG 0x100c |
407 | #define PCI_DEVICE_ID_TSENG_W32P_2 0x3202 | 402 | #define PCI_DEVICE_ID_TSENG_W32P_2 0x3202 |
@@ -511,8 +506,6 @@ | |||
511 | #define PCI_DEVICE_ID_AMD_CS5536_UOC 0x2097 | 506 | #define PCI_DEVICE_ID_AMD_CS5536_UOC 0x2097 |
512 | #define PCI_DEVICE_ID_AMD_CS5536_IDE 0x209A | 507 | #define PCI_DEVICE_ID_AMD_CS5536_IDE 0x209A |
513 | 508 | ||
514 | #define PCI_DEVICE_ID_AMD_CS5536_IDE 0x209A | ||
515 | |||
516 | #define PCI_DEVICE_ID_AMD_LX_VIDEO 0x2081 | 509 | #define PCI_DEVICE_ID_AMD_LX_VIDEO 0x2081 |
517 | #define PCI_DEVICE_ID_AMD_LX_AES 0x2082 | 510 | #define PCI_DEVICE_ID_AMD_LX_AES 0x2082 |
518 | 511 | ||
@@ -1094,6 +1087,7 @@ | |||
1094 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_440_8X 0x0181 | 1087 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_440_8X 0x0181 |
1095 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_440SE_8X 0x0182 | 1088 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_440SE_8X 0x0182 |
1096 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_420_8X 0x0183 | 1089 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_420_8X 0x0183 |
1090 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_MX_4000 0x0185 | ||
1097 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_448_GO 0x0186 | 1091 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_448_GO 0x0186 |
1098 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_488_GO 0x0187 | 1092 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_488_GO 0x0187 |
1099 | #define PCI_DEVICE_ID_NVIDIA_QUADRO4_580_XGL 0x0188 | 1093 | #define PCI_DEVICE_ID_NVIDIA_QUADRO4_580_XGL 0x0188 |
@@ -1371,6 +1365,7 @@ | |||
1371 | #define PCI_DEVICE_ID_SERVERWORKS_HE 0x0008 | 1365 | #define PCI_DEVICE_ID_SERVERWORKS_HE 0x0008 |
1372 | #define PCI_DEVICE_ID_SERVERWORKS_LE 0x0009 | 1366 | #define PCI_DEVICE_ID_SERVERWORKS_LE 0x0009 |
1373 | #define PCI_DEVICE_ID_SERVERWORKS_GCNB_LE 0x0017 | 1367 | #define PCI_DEVICE_ID_SERVERWORKS_GCNB_LE 0x0017 |
1368 | #define PCI_DEVICE_ID_SERVERWORKS_EPB 0x0103 | ||
1374 | #define PCI_DEVICE_ID_SERVERWORKS_OSB4 0x0200 | 1369 | #define PCI_DEVICE_ID_SERVERWORKS_OSB4 0x0200 |
1375 | #define PCI_DEVICE_ID_SERVERWORKS_CSB5 0x0201 | 1370 | #define PCI_DEVICE_ID_SERVERWORKS_CSB5 0x0201 |
1376 | #define PCI_DEVICE_ID_SERVERWORKS_CSB6 0x0203 | 1371 | #define PCI_DEVICE_ID_SERVERWORKS_CSB6 0x0203 |
@@ -1677,6 +1672,9 @@ | |||
1677 | #define PCI_DEVICE_ID_SIIG_2S1P_20x_550 0x2060 | 1672 | #define PCI_DEVICE_ID_SIIG_2S1P_20x_550 0x2060 |
1678 | #define PCI_DEVICE_ID_SIIG_2S1P_20x_650 0x2061 | 1673 | #define PCI_DEVICE_ID_SIIG_2S1P_20x_650 0x2061 |
1679 | #define PCI_DEVICE_ID_SIIG_2S1P_20x_850 0x2062 | 1674 | #define PCI_DEVICE_ID_SIIG_2S1P_20x_850 0x2062 |
1675 | #define PCI_DEVICE_ID_SIIG_8S_20x_550 0x2080 | ||
1676 | #define PCI_DEVICE_ID_SIIG_8S_20x_650 0x2081 | ||
1677 | #define PCI_DEVICE_ID_SIIG_8S_20x_850 0x2082 | ||
1680 | #define PCI_SUBDEVICE_ID_SIIG_QUARTET_SERIAL 0x2050 | 1678 | #define PCI_SUBDEVICE_ID_SIIG_QUARTET_SERIAL 0x2050 |
1681 | 1679 | ||
1682 | #define PCI_VENDOR_ID_RADISYS 0x1331 | 1680 | #define PCI_VENDOR_ID_RADISYS 0x1331 |
@@ -1755,6 +1753,8 @@ | |||
1755 | #define PCI_DEVICE_ID_CCD_B00B 0xb00b | 1753 | #define PCI_DEVICE_ID_CCD_B00B 0xb00b |
1756 | #define PCI_DEVICE_ID_CCD_B00C 0xb00c | 1754 | #define PCI_DEVICE_ID_CCD_B00C 0xb00c |
1757 | #define PCI_DEVICE_ID_CCD_B100 0xb100 | 1755 | #define PCI_DEVICE_ID_CCD_B100 0xb100 |
1756 | #define PCI_DEVICE_ID_CCD_B700 0xb700 | ||
1757 | #define PCI_DEVICE_ID_CCD_B701 0xb701 | ||
1758 | 1758 | ||
1759 | #define PCI_VENDOR_ID_EXAR 0x13a8 | 1759 | #define PCI_VENDOR_ID_EXAR 0x13a8 |
1760 | #define PCI_DEVICE_ID_EXAR_XR17C152 0x0152 | 1760 | #define PCI_DEVICE_ID_EXAR_XR17C152 0x0152 |
@@ -1836,6 +1836,7 @@ | |||
1836 | #define PCI_VENDOR_ID_AFAVLAB 0x14db | 1836 | #define PCI_VENDOR_ID_AFAVLAB 0x14db |
1837 | #define PCI_DEVICE_ID_AFAVLAB_P028 0x2180 | 1837 | #define PCI_DEVICE_ID_AFAVLAB_P028 0x2180 |
1838 | #define PCI_DEVICE_ID_AFAVLAB_P030 0x2182 | 1838 | #define PCI_DEVICE_ID_AFAVLAB_P030 0x2182 |
1839 | #define PCI_SUBDEVICE_ID_AFAVLAB_P061 0x2150 | ||
1839 | 1840 | ||
1840 | #define PCI_VENDOR_ID_BROADCOM 0x14e4 | 1841 | #define PCI_VENDOR_ID_BROADCOM 0x14e4 |
1841 | #define PCI_DEVICE_ID_TIGON3_5752 0x1600 | 1842 | #define PCI_DEVICE_ID_TIGON3_5752 0x1600 |
@@ -2065,6 +2066,7 @@ | |||
2065 | #define PCI_DEVICE_ID_INTEL_82801EB_5 0x24d5 | 2066 | #define PCI_DEVICE_ID_INTEL_82801EB_5 0x24d5 |
2066 | #define PCI_DEVICE_ID_INTEL_82801EB_6 0x24d6 | 2067 | #define PCI_DEVICE_ID_INTEL_82801EB_6 0x24d6 |
2067 | #define PCI_DEVICE_ID_INTEL_82801EB_11 0x24db | 2068 | #define PCI_DEVICE_ID_INTEL_82801EB_11 0x24db |
2069 | #define PCI_DEVICE_ID_INTEL_82801EB_13 0x24dd | ||
2068 | #define PCI_DEVICE_ID_INTEL_ESB_1 0x25a1 | 2070 | #define PCI_DEVICE_ID_INTEL_ESB_1 0x25a1 |
2069 | #define PCI_DEVICE_ID_INTEL_ESB_2 0x25a2 | 2071 | #define PCI_DEVICE_ID_INTEL_ESB_2 0x25a2 |
2070 | #define PCI_DEVICE_ID_INTEL_ESB_4 0x25a4 | 2072 | #define PCI_DEVICE_ID_INTEL_ESB_4 0x25a4 |
@@ -2085,6 +2087,8 @@ | |||
2085 | #define PCI_DEVICE_ID_INTEL_82915GM_IG 0x2592 | 2087 | #define PCI_DEVICE_ID_INTEL_82915GM_IG 0x2592 |
2086 | #define PCI_DEVICE_ID_INTEL_82945G_HB 0x2770 | 2088 | #define PCI_DEVICE_ID_INTEL_82945G_HB 0x2770 |
2087 | #define PCI_DEVICE_ID_INTEL_82945G_IG 0x2772 | 2089 | #define PCI_DEVICE_ID_INTEL_82945G_IG 0x2772 |
2090 | #define PCI_DEVICE_ID_INTEL_82945GM_HB 0x27A0 | ||
2091 | #define PCI_DEVICE_ID_INTEL_82945GM_IG 0x27A2 | ||
2088 | #define PCI_DEVICE_ID_INTEL_ICH6_0 0x2640 | 2092 | #define PCI_DEVICE_ID_INTEL_ICH6_0 0x2640 |
2089 | #define PCI_DEVICE_ID_INTEL_ICH6_1 0x2641 | 2093 | #define PCI_DEVICE_ID_INTEL_ICH6_1 0x2641 |
2090 | #define PCI_DEVICE_ID_INTEL_ICH6_2 0x2642 | 2094 | #define PCI_DEVICE_ID_INTEL_ICH6_2 0x2642 |
@@ -2104,6 +2108,13 @@ | |||
2104 | #define PCI_DEVICE_ID_INTEL_ICH7_19 0x27dd | 2108 | #define PCI_DEVICE_ID_INTEL_ICH7_19 0x27dd |
2105 | #define PCI_DEVICE_ID_INTEL_ICH7_20 0x27de | 2109 | #define PCI_DEVICE_ID_INTEL_ICH7_20 0x27de |
2106 | #define PCI_DEVICE_ID_INTEL_ICH7_21 0x27df | 2110 | #define PCI_DEVICE_ID_INTEL_ICH7_21 0x27df |
2111 | #define PCI_DEVICE_ID_INTEL_ICH8_0 0x2810 | ||
2112 | #define PCI_DEVICE_ID_INTEL_ICH8_1 0x2811 | ||
2113 | #define PCI_DEVICE_ID_INTEL_ICH8_2 0x2812 | ||
2114 | #define PCI_DEVICE_ID_INTEL_ICH8_3 0x2814 | ||
2115 | #define PCI_DEVICE_ID_INTEL_ICH8_4 0x2815 | ||
2116 | #define PCI_DEVICE_ID_INTEL_ICH8_5 0x283e | ||
2117 | #define PCI_DEVICE_ID_INTEL_ICH8_6 0x2850 | ||
2107 | #define PCI_DEVICE_ID_INTEL_82855PM_HB 0x3340 | 2118 | #define PCI_DEVICE_ID_INTEL_82855PM_HB 0x3340 |
2108 | #define PCI_DEVICE_ID_INTEL_82830_HB 0x3575 | 2119 | #define PCI_DEVICE_ID_INTEL_82830_HB 0x3575 |
2109 | #define PCI_DEVICE_ID_INTEL_82830_CGC 0x3577 | 2120 | #define PCI_DEVICE_ID_INTEL_82830_CGC 0x3577 |
@@ -2147,6 +2158,7 @@ | |||
2147 | #define PCI_DEVICE_ID_INTEL_82443GX_2 0x71a2 | 2158 | #define PCI_DEVICE_ID_INTEL_82443GX_2 0x71a2 |
2148 | #define PCI_DEVICE_ID_INTEL_82372FB_1 0x7601 | 2159 | #define PCI_DEVICE_ID_INTEL_82372FB_1 0x7601 |
2149 | #define PCI_DEVICE_ID_INTEL_82454GX 0x84c4 | 2160 | #define PCI_DEVICE_ID_INTEL_82454GX 0x84c4 |
2161 | #define PCI_DEVICE_ID_INTEL_82450GX 0x84c5 | ||
2150 | #define PCI_DEVICE_ID_INTEL_82451NX 0x84ca | 2162 | #define PCI_DEVICE_ID_INTEL_82451NX 0x84ca |
2151 | #define PCI_DEVICE_ID_INTEL_82454NX 0x84cb | 2163 | #define PCI_DEVICE_ID_INTEL_82454NX 0x84cb |
2152 | #define PCI_DEVICE_ID_INTEL_84460GX 0x84ea | 2164 | #define PCI_DEVICE_ID_INTEL_84460GX 0x84ea |
diff --git a/include/linux/percpu_counter.h b/include/linux/percpu_counter.h index bd6708e2c027..682525511c9e 100644 --- a/include/linux/percpu_counter.h +++ b/include/linux/percpu_counter.h | |||
@@ -39,6 +39,7 @@ static inline void percpu_counter_destroy(struct percpu_counter *fbc) | |||
39 | } | 39 | } |
40 | 40 | ||
41 | void percpu_counter_mod(struct percpu_counter *fbc, long amount); | 41 | void percpu_counter_mod(struct percpu_counter *fbc, long amount); |
42 | long percpu_counter_sum(struct percpu_counter *fbc); | ||
42 | 43 | ||
43 | static inline long percpu_counter_read(struct percpu_counter *fbc) | 44 | static inline long percpu_counter_read(struct percpu_counter *fbc) |
44 | { | 45 | { |
@@ -92,6 +93,11 @@ static inline long percpu_counter_read_positive(struct percpu_counter *fbc) | |||
92 | return fbc->count; | 93 | return fbc->count; |
93 | } | 94 | } |
94 | 95 | ||
96 | static inline long percpu_counter_sum(struct percpu_counter *fbc) | ||
97 | { | ||
98 | return percpu_counter_read_positive(fbc); | ||
99 | } | ||
100 | |||
95 | #endif /* CONFIG_SMP */ | 101 | #endif /* CONFIG_SMP */ |
96 | 102 | ||
97 | static inline void percpu_counter_inc(struct percpu_counter *fbc) | 103 | static inline void percpu_counter_inc(struct percpu_counter *fbc) |
diff --git a/include/linux/pktcdvd.h b/include/linux/pktcdvd.h index 2c177e4c8f22..8a94c717c266 100644 --- a/include/linux/pktcdvd.h +++ b/include/linux/pktcdvd.h | |||
@@ -114,7 +114,7 @@ struct pkt_ctrl_command { | |||
114 | 114 | ||
115 | struct packet_settings | 115 | struct packet_settings |
116 | { | 116 | { |
117 | __u8 size; /* packet size in (512 byte) sectors */ | 117 | __u32 size; /* packet size in (512 byte) sectors */ |
118 | __u8 fp; /* fixed packets */ | 118 | __u8 fp; /* fixed packets */ |
119 | __u8 link_loss; /* the rest is specified | 119 | __u8 link_loss; /* the rest is specified |
120 | * as per Mt Fuji */ | 120 | * as per Mt Fuji */ |
@@ -169,8 +169,8 @@ struct packet_iosched | |||
169 | #if (PAGE_SIZE % CD_FRAMESIZE) != 0 | 169 | #if (PAGE_SIZE % CD_FRAMESIZE) != 0 |
170 | #error "PAGE_SIZE must be a multiple of CD_FRAMESIZE" | 170 | #error "PAGE_SIZE must be a multiple of CD_FRAMESIZE" |
171 | #endif | 171 | #endif |
172 | #define PACKET_MAX_SIZE 32 | 172 | #define PACKET_MAX_SIZE 128 |
173 | #define PAGES_PER_PACKET (PACKET_MAX_SIZE * CD_FRAMESIZE / PAGE_SIZE) | 173 | #define FRAMES_PER_PAGE (PAGE_SIZE / CD_FRAMESIZE) |
174 | #define PACKET_MAX_SECTORS (PACKET_MAX_SIZE * CD_FRAMESIZE >> 9) | 174 | #define PACKET_MAX_SECTORS (PACKET_MAX_SIZE * CD_FRAMESIZE >> 9) |
175 | 175 | ||
176 | enum packet_data_state { | 176 | enum packet_data_state { |
@@ -219,7 +219,7 @@ struct packet_data | |||
219 | atomic_t io_errors; /* Number of read/write errors during IO */ | 219 | atomic_t io_errors; /* Number of read/write errors during IO */ |
220 | 220 | ||
221 | struct bio *r_bios[PACKET_MAX_SIZE]; /* bios to use during data gathering */ | 221 | struct bio *r_bios[PACKET_MAX_SIZE]; /* bios to use during data gathering */ |
222 | struct page *pages[PAGES_PER_PACKET]; | 222 | struct page *pages[PACKET_MAX_SIZE / FRAMES_PER_PAGE]; |
223 | 223 | ||
224 | int cache_valid; /* If non-zero, the data for the zone defined */ | 224 | int cache_valid; /* If non-zero, the data for the zone defined */ |
225 | /* by the sector variable is completely cached */ | 225 | /* by the sector variable is completely cached */ |
diff --git a/include/linux/posix-timers.h b/include/linux/posix-timers.h index 54faf5236da0..95572c434bc9 100644 --- a/include/linux/posix-timers.h +++ b/include/linux/posix-timers.h | |||
@@ -84,7 +84,6 @@ struct k_clock { | |||
84 | void register_posix_clock(const clockid_t clock_id, struct k_clock *new_clock); | 84 | void register_posix_clock(const clockid_t clock_id, struct k_clock *new_clock); |
85 | 85 | ||
86 | /* error handlers for timer_create, nanosleep and settime */ | 86 | /* error handlers for timer_create, nanosleep and settime */ |
87 | int do_posix_clock_notimer_create(struct k_itimer *timer); | ||
88 | int do_posix_clock_nonanosleep(const clockid_t, int flags, struct timespec *, | 87 | int do_posix_clock_nonanosleep(const clockid_t, int flags, struct timespec *, |
89 | struct timespec __user *); | 88 | struct timespec __user *); |
90 | int do_posix_clock_nosettime(const clockid_t, struct timespec *tp); | 89 | int do_posix_clock_nosettime(const clockid_t, struct timespec *tp); |
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index 9d5cd106b344..0d36750fc0f1 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h | |||
@@ -84,6 +84,7 @@ extern int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __us | |||
84 | extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len); | 84 | extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len); |
85 | extern int ptrace_attach(struct task_struct *tsk); | 85 | extern int ptrace_attach(struct task_struct *tsk); |
86 | extern int ptrace_detach(struct task_struct *, unsigned int); | 86 | extern int ptrace_detach(struct task_struct *, unsigned int); |
87 | extern void __ptrace_detach(struct task_struct *, unsigned int); | ||
87 | extern void ptrace_disable(struct task_struct *); | 88 | extern void ptrace_disable(struct task_struct *); |
88 | extern int ptrace_check_attach(struct task_struct *task, int kill); | 89 | extern int ptrace_check_attach(struct task_struct *task, int kill); |
89 | extern int ptrace_request(struct task_struct *child, long request, long addr, long data); | 90 | extern int ptrace_request(struct task_struct *child, long request, long addr, long data); |
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h index 4f34d3d60f2e..21e5a9124856 100644 --- a/include/linux/quotaops.h +++ b/include/linux/quotaops.h | |||
@@ -190,7 +190,6 @@ static __inline__ int DQUOT_OFF(struct super_block *sb) | |||
190 | */ | 190 | */ |
191 | #define sb_dquot_ops (NULL) | 191 | #define sb_dquot_ops (NULL) |
192 | #define sb_quotactl_ops (NULL) | 192 | #define sb_quotactl_ops (NULL) |
193 | #define sync_dquots_dev(dev,type) (NULL) | ||
194 | #define DQUOT_INIT(inode) do { } while(0) | 193 | #define DQUOT_INIT(inode) do { } while(0) |
195 | #define DQUOT_DROP(inode) do { } while(0) | 194 | #define DQUOT_DROP(inode) do { } while(0) |
196 | #define DQUOT_ALLOC_INODE(inode) (0) | 195 | #define DQUOT_ALLOC_INODE(inode) (0) |
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 981f9aa43353..c2ec6c77874e 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -98,13 +98,17 @@ struct rcu_data { | |||
98 | long batch; /* Batch # for current RCU batch */ | 98 | long batch; /* Batch # for current RCU batch */ |
99 | struct rcu_head *nxtlist; | 99 | struct rcu_head *nxtlist; |
100 | struct rcu_head **nxttail; | 100 | struct rcu_head **nxttail; |
101 | long count; /* # of queued items */ | 101 | long qlen; /* # of queued callbacks */ |
102 | struct rcu_head *curlist; | 102 | struct rcu_head *curlist; |
103 | struct rcu_head **curtail; | 103 | struct rcu_head **curtail; |
104 | struct rcu_head *donelist; | 104 | struct rcu_head *donelist; |
105 | struct rcu_head **donetail; | 105 | struct rcu_head **donetail; |
106 | long blimit; /* Upper limit on a processed batch */ | ||
106 | int cpu; | 107 | int cpu; |
107 | struct rcu_head barrier; | 108 | struct rcu_head barrier; |
109 | #ifdef CONFIG_SMP | ||
110 | long last_rs_qlen; /* qlen during the last resched */ | ||
111 | #endif | ||
108 | }; | 112 | }; |
109 | 113 | ||
110 | DECLARE_PER_CPU(struct rcu_data, rcu_data); | 114 | DECLARE_PER_CPU(struct rcu_data, rcu_data); |
@@ -240,11 +244,14 @@ extern int rcu_pending(int cpu); | |||
240 | * This means that all preempt_disable code sequences, including NMI and | 244 | * This means that all preempt_disable code sequences, including NMI and |
241 | * hardware-interrupt handlers, in progress on entry will have completed | 245 | * hardware-interrupt handlers, in progress on entry will have completed |
242 | * before this primitive returns. However, this does not guarantee that | 246 | * before this primitive returns. However, this does not guarantee that |
243 | * softirq handlers will have completed, since in some kernels | 247 | * softirq handlers will have completed, since in some kernels, these |
248 | * handlers can run in process context, and can block. | ||
244 | * | 249 | * |
245 | * This primitive provides the guarantees made by the (deprecated) | 250 | * This primitive provides the guarantees made by the (deprecated) |
246 | * synchronize_kernel() API. In contrast, synchronize_rcu() only | 251 | * synchronize_kernel() API. In contrast, synchronize_rcu() only |
247 | * guarantees that rcu_read_lock() sections will have completed. | 252 | * guarantees that rcu_read_lock() sections will have completed. |
253 | * In "classic RCU", these two guarantees happen to be one and | ||
254 | * the same, but can differ in realtime RCU implementations. | ||
248 | */ | 255 | */ |
249 | #define synchronize_sched() synchronize_rcu() | 256 | #define synchronize_sched() synchronize_rcu() |
250 | 257 | ||
diff --git a/include/linux/reboot.h b/include/linux/reboot.h index 7ab2cdb83ef0..015297ff73fa 100644 --- a/include/linux/reboot.h +++ b/include/linux/reboot.h | |||
@@ -60,8 +60,7 @@ extern void machine_crash_shutdown(struct pt_regs *); | |||
60 | */ | 60 | */ |
61 | 61 | ||
62 | extern void kernel_restart_prepare(char *cmd); | 62 | extern void kernel_restart_prepare(char *cmd); |
63 | extern void kernel_halt_prepare(void); | 63 | extern void kernel_shutdown_prepare(enum system_states state); |
64 | extern void kernel_power_off_prepare(void); | ||
65 | 64 | ||
66 | extern void kernel_restart(char *cmd); | 65 | extern void kernel_restart(char *cmd); |
67 | extern void kernel_halt(void); | 66 | extern void kernel_halt(void); |
diff --git a/include/linux/reiserfs_acl.h b/include/linux/reiserfs_acl.h index 0a3605099c44..806ec5b06707 100644 --- a/include/linux/reiserfs_acl.h +++ b/include/linux/reiserfs_acl.h | |||
@@ -58,9 +58,13 @@ extern struct reiserfs_xattr_handler posix_acl_default_handler; | |||
58 | extern struct reiserfs_xattr_handler posix_acl_access_handler; | 58 | extern struct reiserfs_xattr_handler posix_acl_access_handler; |
59 | #else | 59 | #else |
60 | 60 | ||
61 | #define reiserfs_get_acl NULL | ||
62 | #define reiserfs_cache_default_acl(inode) 0 | 61 | #define reiserfs_cache_default_acl(inode) 0 |
63 | 62 | ||
63 | static inline struct posix_acl *reiserfs_get_acl(struct inode *inode, int type) | ||
64 | { | ||
65 | return NULL; | ||
66 | } | ||
67 | |||
64 | static inline int reiserfs_xattr_posix_acl_init(void) | 68 | static inline int reiserfs_xattr_posix_acl_init(void) |
65 | { | 69 | { |
66 | return 0; | 70 | return 0; |
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index e276c5ba2bb7..dad78cecfd20 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
@@ -1052,7 +1052,7 @@ struct reiserfs_dir_entry { | |||
1052 | int de_entrylen; | 1052 | int de_entrylen; |
1053 | int de_namelen; | 1053 | int de_namelen; |
1054 | char *de_name; | 1054 | char *de_name; |
1055 | char *de_gen_number_bit_string; | 1055 | unsigned long *de_gen_number_bit_string; |
1056 | 1056 | ||
1057 | __u32 de_dir_id; | 1057 | __u32 de_dir_id; |
1058 | __u32 de_objectid; | 1058 | __u32 de_objectid; |
@@ -1971,22 +1971,6 @@ extern struct file_operations reiserfs_file_operations; | |||
1971 | extern struct address_space_operations reiserfs_address_space_operations; | 1971 | extern struct address_space_operations reiserfs_address_space_operations; |
1972 | 1972 | ||
1973 | /* fix_nodes.c */ | 1973 | /* fix_nodes.c */ |
1974 | #ifdef CONFIG_REISERFS_CHECK | ||
1975 | void *reiserfs_kmalloc(size_t size, gfp_t flags, struct super_block *s); | ||
1976 | void reiserfs_kfree(const void *vp, size_t size, struct super_block *s); | ||
1977 | #else | ||
1978 | static inline void *reiserfs_kmalloc(size_t size, int flags, | ||
1979 | struct super_block *s) | ||
1980 | { | ||
1981 | return kmalloc(size, flags); | ||
1982 | } | ||
1983 | |||
1984 | static inline void reiserfs_kfree(const void *vp, size_t size, | ||
1985 | struct super_block *s) | ||
1986 | { | ||
1987 | kfree(vp); | ||
1988 | } | ||
1989 | #endif | ||
1990 | 1974 | ||
1991 | int fix_nodes(int n_op_mode, struct tree_balance *p_s_tb, | 1975 | int fix_nodes(int n_op_mode, struct tree_balance *p_s_tb, |
1992 | struct item_head *p_s_ins_ih, const void *); | 1976 | struct item_head *p_s_ins_ih, const void *); |
diff --git a/include/linux/reiserfs_fs_sb.h b/include/linux/reiserfs_fs_sb.h index 3e68592e52e9..31b4c0bd4fa0 100644 --- a/include/linux/reiserfs_fs_sb.h +++ b/include/linux/reiserfs_fs_sb.h | |||
@@ -382,7 +382,6 @@ struct reiserfs_sb_info { | |||
382 | on-disk FS format */ | 382 | on-disk FS format */ |
383 | 383 | ||
384 | /* session statistics */ | 384 | /* session statistics */ |
385 | int s_kmallocs; | ||
386 | int s_disk_reads; | 385 | int s_disk_reads; |
387 | int s_disk_writes; | 386 | int s_disk_writes; |
388 | int s_fix_nodes; | 387 | int s_fix_nodes; |
diff --git a/include/linux/reiserfs_xattr.h b/include/linux/reiserfs_xattr.h index c84354e8374c..87280eb6083d 100644 --- a/include/linux/reiserfs_xattr.h +++ b/include/linux/reiserfs_xattr.h | |||
@@ -43,8 +43,6 @@ int reiserfs_delete_xattrs(struct inode *inode); | |||
43 | int reiserfs_chown_xattrs(struct inode *inode, struct iattr *attrs); | 43 | int reiserfs_chown_xattrs(struct inode *inode, struct iattr *attrs); |
44 | int reiserfs_xattr_init(struct super_block *sb, int mount_flags); | 44 | int reiserfs_xattr_init(struct super_block *sb, int mount_flags); |
45 | int reiserfs_permission(struct inode *inode, int mask, struct nameidata *nd); | 45 | int reiserfs_permission(struct inode *inode, int mask, struct nameidata *nd); |
46 | int reiserfs_permission_locked(struct inode *inode, int mask, | ||
47 | struct nameidata *nd); | ||
48 | 46 | ||
49 | int reiserfs_xattr_del(struct inode *, const char *); | 47 | int reiserfs_xattr_del(struct inode *, const char *); |
50 | int reiserfs_xattr_get(const struct inode *, const char *, void *, size_t); | 48 | int reiserfs_xattr_get(const struct inode *, const char *, void *, size_t); |
diff --git a/include/linux/rmap.h b/include/linux/rmap.h index 9d6fbeef2104..d6b9bcd1384c 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h | |||
@@ -91,7 +91,8 @@ static inline void page_dup_rmap(struct page *page) | |||
91 | * Called from mm/vmscan.c to handle paging out | 91 | * Called from mm/vmscan.c to handle paging out |
92 | */ | 92 | */ |
93 | int page_referenced(struct page *, int is_locked); | 93 | int page_referenced(struct page *, int is_locked); |
94 | int try_to_unmap(struct page *); | 94 | int try_to_unmap(struct page *, int ignore_refs); |
95 | void remove_from_swap(struct page *page); | ||
95 | 96 | ||
96 | /* | 97 | /* |
97 | * Called from mm/filemap_xip.c to unmap empty zero page | 98 | * Called from mm/filemap_xip.c to unmap empty zero page |
@@ -111,7 +112,7 @@ unsigned long page_address_in_vma(struct page *, struct vm_area_struct *); | |||
111 | #define anon_vma_link(vma) do {} while (0) | 112 | #define anon_vma_link(vma) do {} while (0) |
112 | 113 | ||
113 | #define page_referenced(page,l) TestClearPageReferenced(page) | 114 | #define page_referenced(page,l) TestClearPageReferenced(page) |
114 | #define try_to_unmap(page) SWAP_FAIL | 115 | #define try_to_unmap(page, refs) SWAP_FAIL |
115 | 116 | ||
116 | #endif /* CONFIG_MMU */ | 117 | #endif /* CONFIG_MMU */ |
117 | 118 | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index 0cfcd1c7865e..62e6314382f0 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -298,8 +298,9 @@ struct mm_struct { | |||
298 | unsigned long addr, unsigned long len, | 298 | unsigned long addr, unsigned long len, |
299 | unsigned long pgoff, unsigned long flags); | 299 | unsigned long pgoff, unsigned long flags); |
300 | void (*unmap_area) (struct mm_struct *mm, unsigned long addr); | 300 | void (*unmap_area) (struct mm_struct *mm, unsigned long addr); |
301 | unsigned long mmap_base; /* base of mmap area */ | 301 | unsigned long mmap_base; /* base of mmap area */ |
302 | unsigned long cached_hole_size; /* if non-zero, the largest hole below free_area_cache */ | 302 | unsigned long task_size; /* size of task vm space */ |
303 | unsigned long cached_hole_size; /* if non-zero, the largest hole below free_area_cache */ | ||
303 | unsigned long free_area_cache; /* first hole of size cached_hole_size or larger */ | 304 | unsigned long free_area_cache; /* first hole of size cached_hole_size or larger */ |
304 | pgd_t * pgd; | 305 | pgd_t * pgd; |
305 | atomic_t mm_users; /* How many users with user space? */ | 306 | atomic_t mm_users; /* How many users with user space? */ |
@@ -697,12 +698,9 @@ struct task_struct { | |||
697 | 698 | ||
698 | int lock_depth; /* BKL lock depth */ | 699 | int lock_depth; /* BKL lock depth */ |
699 | 700 | ||
700 | #if defined(CONFIG_SMP) | 701 | #if defined(CONFIG_SMP) && defined(__ARCH_WANT_UNLOCKED_CTXSW) |
701 | int last_waker_cpu; /* CPU that last woke this task up */ | ||
702 | #if defined(__ARCH_WANT_UNLOCKED_CTXSW) | ||
703 | int oncpu; | 702 | int oncpu; |
704 | #endif | 703 | #endif |
705 | #endif | ||
706 | int prio, static_prio; | 704 | int prio, static_prio; |
707 | struct list_head run_list; | 705 | struct list_head run_list; |
708 | prio_array_t *array; | 706 | prio_array_t *array; |
@@ -894,7 +892,6 @@ static inline int pid_alive(struct task_struct *p) | |||
894 | } | 892 | } |
895 | 893 | ||
896 | extern void free_task(struct task_struct *tsk); | 894 | extern void free_task(struct task_struct *tsk); |
897 | extern void __put_task_struct(struct task_struct *tsk); | ||
898 | #define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0) | 895 | #define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0) |
899 | 896 | ||
900 | extern void __put_task_struct_cb(struct rcu_head *rhp); | 897 | extern void __put_task_struct_cb(struct rcu_head *rhp); |
@@ -1098,7 +1095,7 @@ extern struct sigqueue *sigqueue_alloc(void); | |||
1098 | extern void sigqueue_free(struct sigqueue *); | 1095 | extern void sigqueue_free(struct sigqueue *); |
1099 | extern int send_sigqueue(int, struct sigqueue *, struct task_struct *); | 1096 | extern int send_sigqueue(int, struct sigqueue *, struct task_struct *); |
1100 | extern int send_group_sigqueue(int, struct sigqueue *, struct task_struct *); | 1097 | extern int send_group_sigqueue(int, struct sigqueue *, struct task_struct *); |
1101 | extern int do_sigaction(int, const struct k_sigaction *, struct k_sigaction *); | 1098 | extern int do_sigaction(int, struct k_sigaction *, struct k_sigaction *); |
1102 | extern int do_sigaltstack(const stack_t __user *, stack_t __user *, unsigned long); | 1099 | extern int do_sigaltstack(const stack_t __user *, stack_t __user *, unsigned long); |
1103 | 1100 | ||
1104 | /* These can be the second arg to send_sig_info/send_group_sig_info. */ | 1101 | /* These can be the second arg to send_sig_info/send_group_sig_info. */ |
diff --git a/include/linux/security.h b/include/linux/security.h index ef753654daa5..7cbef482e13a 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -1499,15 +1499,11 @@ static inline void security_sb_post_pivotroot (struct nameidata *old_nd, | |||
1499 | 1499 | ||
1500 | static inline int security_inode_alloc (struct inode *inode) | 1500 | static inline int security_inode_alloc (struct inode *inode) |
1501 | { | 1501 | { |
1502 | if (unlikely (IS_PRIVATE (inode))) | ||
1503 | return 0; | ||
1504 | return security_ops->inode_alloc_security (inode); | 1502 | return security_ops->inode_alloc_security (inode); |
1505 | } | 1503 | } |
1506 | 1504 | ||
1507 | static inline void security_inode_free (struct inode *inode) | 1505 | static inline void security_inode_free (struct inode *inode) |
1508 | { | 1506 | { |
1509 | if (unlikely (IS_PRIVATE (inode))) | ||
1510 | return; | ||
1511 | security_ops->inode_free_security (inode); | 1507 | security_ops->inode_free_security (inode); |
1512 | } | 1508 | } |
1513 | 1509 | ||
@@ -2617,6 +2613,25 @@ static inline int security_netlink_recv (struct sk_buff *skb) | |||
2617 | return cap_netlink_recv (skb); | 2613 | return cap_netlink_recv (skb); |
2618 | } | 2614 | } |
2619 | 2615 | ||
2616 | static inline struct dentry *securityfs_create_dir(const char *name, | ||
2617 | struct dentry *parent) | ||
2618 | { | ||
2619 | return ERR_PTR(-ENODEV); | ||
2620 | } | ||
2621 | |||
2622 | static inline struct dentry *securityfs_create_file(const char *name, | ||
2623 | mode_t mode, | ||
2624 | struct dentry *parent, | ||
2625 | void *data, | ||
2626 | struct file_operations *fops) | ||
2627 | { | ||
2628 | return ERR_PTR(-ENODEV); | ||
2629 | } | ||
2630 | |||
2631 | static inline void securityfs_remove(struct dentry *dentry) | ||
2632 | { | ||
2633 | } | ||
2634 | |||
2620 | #endif /* CONFIG_SECURITY */ | 2635 | #endif /* CONFIG_SECURITY */ |
2621 | 2636 | ||
2622 | #ifdef CONFIG_SECURITY_NETWORK | 2637 | #ifdef CONFIG_SECURITY_NETWORK |
diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h index cee302aefdb7..73b464f0926a 100644 --- a/include/linux/serial_8250.h +++ b/include/linux/serial_8250.h | |||
@@ -26,7 +26,7 @@ struct plat_serial8250_port { | |||
26 | unsigned char regshift; /* register shift */ | 26 | unsigned char regshift; /* register shift */ |
27 | unsigned char iotype; /* UPIO_* */ | 27 | unsigned char iotype; /* UPIO_* */ |
28 | unsigned char hub6; | 28 | unsigned char hub6; |
29 | unsigned int flags; /* UPF_* flags */ | 29 | upf_t flags; /* UPF_* flags */ |
30 | }; | 30 | }; |
31 | 31 | ||
32 | /* | 32 | /* |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index ec351005bf9d..4041122dabfc 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -203,6 +203,8 @@ struct uart_icount { | |||
203 | __u32 buf_overrun; | 203 | __u32 buf_overrun; |
204 | }; | 204 | }; |
205 | 205 | ||
206 | typedef unsigned int __bitwise__ upf_t; | ||
207 | |||
206 | struct uart_port { | 208 | struct uart_port { |
207 | spinlock_t lock; /* port lock */ | 209 | spinlock_t lock; /* port lock */ |
208 | unsigned int iobase; /* in/out[bwl] */ | 210 | unsigned int iobase; /* in/out[bwl] */ |
@@ -230,36 +232,34 @@ struct uart_port { | |||
230 | unsigned long sysrq; /* sysrq timeout */ | 232 | unsigned long sysrq; /* sysrq timeout */ |
231 | #endif | 233 | #endif |
232 | 234 | ||
233 | unsigned int flags; | 235 | upf_t flags; |
234 | 236 | ||
235 | #define UPF_FOURPORT (1 << 1) | 237 | #define UPF_FOURPORT ((__force upf_t) (1 << 1)) |
236 | #define UPF_SAK (1 << 2) | 238 | #define UPF_SAK ((__force upf_t) (1 << 2)) |
237 | #define UPF_SPD_MASK (0x1030) | 239 | #define UPF_SPD_MASK ((__force upf_t) (0x1030)) |
238 | #define UPF_SPD_HI (0x0010) | 240 | #define UPF_SPD_HI ((__force upf_t) (0x0010)) |
239 | #define UPF_SPD_VHI (0x0020) | 241 | #define UPF_SPD_VHI ((__force upf_t) (0x0020)) |
240 | #define UPF_SPD_CUST (0x0030) | 242 | #define UPF_SPD_CUST ((__force upf_t) (0x0030)) |
241 | #define UPF_SPD_SHI (0x1000) | 243 | #define UPF_SPD_SHI ((__force upf_t) (0x1000)) |
242 | #define UPF_SPD_WARP (0x1010) | 244 | #define UPF_SPD_WARP ((__force upf_t) (0x1010)) |
243 | #define UPF_SKIP_TEST (1 << 6) | 245 | #define UPF_SKIP_TEST ((__force upf_t) (1 << 6)) |
244 | #define UPF_AUTO_IRQ (1 << 7) | 246 | #define UPF_AUTO_IRQ ((__force upf_t) (1 << 7)) |
245 | #define UPF_HARDPPS_CD (1 << 11) | 247 | #define UPF_HARDPPS_CD ((__force upf_t) (1 << 11)) |
246 | #define UPF_LOW_LATENCY (1 << 13) | 248 | #define UPF_LOW_LATENCY ((__force upf_t) (1 << 13)) |
247 | #define UPF_BUGGY_UART (1 << 14) | 249 | #define UPF_BUGGY_UART ((__force upf_t) (1 << 14)) |
248 | #define UPF_AUTOPROBE (1 << 15) | 250 | #define UPF_MAGIC_MULTIPLIER ((__force upf_t) (1 << 16)) |
249 | #define UPF_MAGIC_MULTIPLIER (1 << 16) | 251 | #define UPF_CONS_FLOW ((__force upf_t) (1 << 23)) |
250 | #define UPF_BOOT_ONLYMCA (1 << 22) | 252 | #define UPF_SHARE_IRQ ((__force upf_t) (1 << 24)) |
251 | #define UPF_CONS_FLOW (1 << 23) | 253 | #define UPF_BOOT_AUTOCONF ((__force upf_t) (1 << 28)) |
252 | #define UPF_SHARE_IRQ (1 << 24) | 254 | #define UPF_IOREMAP ((__force upf_t) (1 << 31)) |
253 | #define UPF_BOOT_AUTOCONF (1 << 28) | 255 | |
254 | #define UPF_IOREMAP (1 << 31) | 256 | #define UPF_CHANGE_MASK ((__force upf_t) (0x17fff)) |
255 | 257 | #define UPF_USR_MASK ((__force upf_t) (UPF_SPD_MASK|UPF_LOW_LATENCY)) | |
256 | #define UPF_CHANGE_MASK (0x17fff) | ||
257 | #define UPF_USR_MASK (UPF_SPD_MASK|UPF_LOW_LATENCY) | ||
258 | 258 | ||
259 | unsigned int mctrl; /* current modem ctrl settings */ | 259 | unsigned int mctrl; /* current modem ctrl settings */ |
260 | unsigned int timeout; /* character-based timeout */ | 260 | unsigned int timeout; /* character-based timeout */ |
261 | unsigned int type; /* port type */ | 261 | unsigned int type; /* port type */ |
262 | struct uart_ops *ops; | 262 | const struct uart_ops *ops; |
263 | unsigned int custom_divisor; | 263 | unsigned int custom_divisor; |
264 | unsigned int line; /* port index */ | 264 | unsigned int line; /* port index */ |
265 | unsigned long mapbase; /* for ioremap */ | 265 | unsigned long mapbase; /* for ioremap */ |
@@ -289,6 +289,9 @@ struct uart_state { | |||
289 | }; | 289 | }; |
290 | 290 | ||
291 | #define UART_XMIT_SIZE PAGE_SIZE | 291 | #define UART_XMIT_SIZE PAGE_SIZE |
292 | |||
293 | typedef unsigned int __bitwise__ uif_t; | ||
294 | |||
292 | /* | 295 | /* |
293 | * This is the state information which is only valid when the port | 296 | * This is the state information which is only valid when the port |
294 | * is open; it may be freed by the core driver once the device has | 297 | * is open; it may be freed by the core driver once the device has |
@@ -298,17 +301,16 @@ struct uart_state { | |||
298 | struct uart_info { | 301 | struct uart_info { |
299 | struct tty_struct *tty; | 302 | struct tty_struct *tty; |
300 | struct circ_buf xmit; | 303 | struct circ_buf xmit; |
301 | unsigned int flags; | 304 | uif_t flags; |
302 | 305 | ||
303 | /* | 306 | /* |
304 | * These are the flags that specific to info->flags, and reflect our | 307 | * Definitions for info->flags. These are _private_ to serial_core, and |
305 | * internal state. They can not be accessed via port->flags. Low | 308 | * are specific to this structure. They may be queried by low level drivers. |
306 | * level drivers must not change these, but may query them instead. | ||
307 | */ | 309 | */ |
308 | #define UIF_CHECK_CD (1 << 25) | 310 | #define UIF_CHECK_CD ((__force uif_t) (1 << 25)) |
309 | #define UIF_CTS_FLOW (1 << 26) | 311 | #define UIF_CTS_FLOW ((__force uif_t) (1 << 26)) |
310 | #define UIF_NORMAL_ACTIVE (1 << 29) | 312 | #define UIF_NORMAL_ACTIVE ((__force uif_t) (1 << 29)) |
311 | #define UIF_INITIALIZED (1 << 31) | 313 | #define UIF_INITIALIZED ((__force uif_t) (1 << 31)) |
312 | 314 | ||
313 | int blocked_open; | 315 | int blocked_open; |
314 | 316 | ||
@@ -430,7 +432,7 @@ static inline int uart_handle_break(struct uart_port *port) | |||
430 | port->sysrq = 0; | 432 | port->sysrq = 0; |
431 | } | 433 | } |
432 | #endif | 434 | #endif |
433 | if (info->flags & UPF_SAK) | 435 | if (port->flags & UPF_SAK) |
434 | do_SAK(info->tty); | 436 | do_SAK(info->tty); |
435 | return 0; | 437 | return 0; |
436 | } | 438 | } |
diff --git a/include/linux/serial_reg.h b/include/linux/serial_reg.h index 6a2bb955844b..3c8a6aa77415 100644 --- a/include/linux/serial_reg.h +++ b/include/linux/serial_reg.h | |||
@@ -247,10 +247,10 @@ | |||
247 | #define UART_CTR 0xFF | 247 | #define UART_CTR 0xFF |
248 | 248 | ||
249 | /* | 249 | /* |
250 | * The 16C950 Additional Control Reigster | 250 | * The 16C950 Additional Control Register |
251 | */ | 251 | */ |
252 | #define UART_ACR_RXDIS 0x01 /* Receiver disable */ | 252 | #define UART_ACR_RXDIS 0x01 /* Receiver disable */ |
253 | #define UART_ACR_TXDIS 0x02 /* Receiver disable */ | 253 | #define UART_ACR_TXDIS 0x02 /* Transmitter disable */ |
254 | #define UART_ACR_DSRFC 0x04 /* DSR Flow Control */ | 254 | #define UART_ACR_DSRFC 0x04 /* DSR Flow Control */ |
255 | #define UART_ACR_TLENB 0x20 /* 950 trigger levels enable */ | 255 | #define UART_ACR_TLENB 0x20 /* 950 trigger levels enable */ |
256 | #define UART_ACR_ICRRD 0x40 /* ICR Read enable */ | 256 | #define UART_ACR_ICRRD 0x40 /* ICR Read enable */ |
diff --git a/include/linux/slab.h b/include/linux/slab.h index 1fb77a9cc148..8cf52939d0ab 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -76,7 +76,14 @@ struct cache_sizes { | |||
76 | kmem_cache_t *cs_dmacachep; | 76 | kmem_cache_t *cs_dmacachep; |
77 | }; | 77 | }; |
78 | extern struct cache_sizes malloc_sizes[]; | 78 | extern struct cache_sizes malloc_sizes[]; |
79 | |||
80 | #ifndef CONFIG_DEBUG_SLAB | ||
79 | extern void *__kmalloc(size_t, gfp_t); | 81 | extern void *__kmalloc(size_t, gfp_t); |
82 | #else | ||
83 | extern void *__kmalloc_track_caller(size_t, gfp_t, void*); | ||
84 | #define __kmalloc(size, flags) \ | ||
85 | __kmalloc_track_caller(size, flags, __builtin_return_address(0)) | ||
86 | #endif | ||
80 | 87 | ||
81 | static inline void *kmalloc(size_t size, gfp_t flags) | 88 | static inline void *kmalloc(size_t size, gfp_t flags) |
82 | { | 89 | { |
diff --git a/include/linux/smp.h b/include/linux/smp.h index 9dfa3ee769ae..44153fdf73fc 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h | |||
@@ -17,7 +17,6 @@ extern void cpu_idle(void); | |||
17 | #include <linux/compiler.h> | 17 | #include <linux/compiler.h> |
18 | #include <linux/thread_info.h> | 18 | #include <linux/thread_info.h> |
19 | #include <asm/smp.h> | 19 | #include <asm/smp.h> |
20 | #include <asm/bug.h> | ||
21 | 20 | ||
22 | /* | 21 | /* |
23 | * main cross-CPU interfaces, handles INIT, TLB flush, STOP, etc. | 22 | * main cross-CPU interfaces, handles INIT, TLB flush, STOP, etc. |
diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h index b68c11a2d6dd..be4772ed43c0 100644 --- a/include/linux/sunrpc/auth.h +++ b/include/linux/sunrpc/auth.h | |||
@@ -48,7 +48,7 @@ struct rpc_cred { | |||
48 | 48 | ||
49 | /* per-flavor data */ | 49 | /* per-flavor data */ |
50 | }; | 50 | }; |
51 | #define RPCAUTH_CRED_LOCKED 0x0001 | 51 | #define RPCAUTH_CRED_NEW 0x0001 |
52 | #define RPCAUTH_CRED_UPTODATE 0x0002 | 52 | #define RPCAUTH_CRED_UPTODATE 0x0002 |
53 | 53 | ||
54 | #define RPCAUTH_CRED_MAGIC 0x0f4aa4f0 | 54 | #define RPCAUTH_CRED_MAGIC 0x0f4aa4f0 |
@@ -83,9 +83,10 @@ struct rpc_auth { | |||
83 | struct rpc_cred_cache * au_credcache; | 83 | struct rpc_cred_cache * au_credcache; |
84 | /* per-flavor data */ | 84 | /* per-flavor data */ |
85 | }; | 85 | }; |
86 | #define RPC_AUTH_PROC_CREDS 0x0010 /* process creds (including | 86 | |
87 | * uid/gid, fs[ug]id, gids) | 87 | /* Flags for rpcauth_lookupcred() */ |
88 | */ | 88 | #define RPCAUTH_LOOKUP_NEW 0x01 /* Accept an uninitialised cred */ |
89 | #define RPCAUTH_LOOKUP_ROOTCREDS 0x02 /* This really ought to go! */ | ||
89 | 90 | ||
90 | /* | 91 | /* |
91 | * Client authentication ops | 92 | * Client authentication ops |
@@ -105,6 +106,7 @@ struct rpc_authops { | |||
105 | 106 | ||
106 | struct rpc_credops { | 107 | struct rpc_credops { |
107 | const char * cr_name; /* Name of the auth flavour */ | 108 | const char * cr_name; /* Name of the auth flavour */ |
109 | int (*cr_init)(struct rpc_auth *, struct rpc_cred *); | ||
108 | void (*crdestroy)(struct rpc_cred *); | 110 | void (*crdestroy)(struct rpc_cred *); |
109 | 111 | ||
110 | int (*crmatch)(struct auth_cred *, struct rpc_cred *, int); | 112 | int (*crmatch)(struct auth_cred *, struct rpc_cred *, int); |
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 5dc94e777fab..37c1c76fd547 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
@@ -43,16 +43,20 @@ extern void mark_free_pages(struct zone *zone); | |||
43 | /* kernel/power/swsusp.c */ | 43 | /* kernel/power/swsusp.c */ |
44 | extern int software_suspend(void); | 44 | extern int software_suspend(void); |
45 | 45 | ||
46 | #if defined(CONFIG_VT) && defined(CONFIG_VT_CONSOLE) | ||
46 | extern int pm_prepare_console(void); | 47 | extern int pm_prepare_console(void); |
47 | extern void pm_restore_console(void); | 48 | extern void pm_restore_console(void); |
48 | 49 | #else | |
50 | static inline int pm_prepare_console(void) { return 0; } | ||
51 | static inline void pm_restore_console(void) {} | ||
52 | #endif /* defined(CONFIG_VT) && defined(CONFIG_VT_CONSOLE) */ | ||
49 | #else | 53 | #else |
50 | static inline int software_suspend(void) | 54 | static inline int software_suspend(void) |
51 | { | 55 | { |
52 | printk("Warning: fake suspend called\n"); | 56 | printk("Warning: fake suspend called\n"); |
53 | return -EPERM; | 57 | return -EPERM; |
54 | } | 58 | } |
55 | #endif | 59 | #endif /* CONFIG_PM */ |
56 | 60 | ||
57 | #ifdef CONFIG_SUSPEND_SMP | 61 | #ifdef CONFIG_SUSPEND_SMP |
58 | extern void disable_nonboot_cpus(void); | 62 | extern void disable_nonboot_cpus(void); |
diff --git a/include/linux/swap.h b/include/linux/swap.h index 4a99e4a7fbf3..d572b19afb7d 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -147,7 +147,7 @@ struct swap_list_t { | |||
147 | #define vm_swap_full() (nr_swap_pages*2 < total_swap_pages) | 147 | #define vm_swap_full() (nr_swap_pages*2 < total_swap_pages) |
148 | 148 | ||
149 | /* linux/mm/oom_kill.c */ | 149 | /* linux/mm/oom_kill.c */ |
150 | extern void out_of_memory(gfp_t gfp_mask, int order); | 150 | extern void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order); |
151 | 151 | ||
152 | /* linux/mm/memory.c */ | 152 | /* linux/mm/memory.c */ |
153 | extern void swapin_readahead(swp_entry_t, unsigned long, struct vm_area_struct *); | 153 | extern void swapin_readahead(swp_entry_t, unsigned long, struct vm_area_struct *); |
@@ -178,6 +178,7 @@ extern int vm_swappiness; | |||
178 | 178 | ||
179 | #ifdef CONFIG_NUMA | 179 | #ifdef CONFIG_NUMA |
180 | extern int zone_reclaim_mode; | 180 | extern int zone_reclaim_mode; |
181 | extern int zone_reclaim_interval; | ||
181 | extern int zone_reclaim(struct zone *, gfp_t, unsigned int); | 182 | extern int zone_reclaim(struct zone *, gfp_t, unsigned int); |
182 | #else | 183 | #else |
183 | #define zone_reclaim_mode 0 | 184 | #define zone_reclaim_mode 0 |
@@ -190,13 +191,20 @@ static inline int zone_reclaim(struct zone *z, gfp_t mask, unsigned int order) | |||
190 | #ifdef CONFIG_MIGRATION | 191 | #ifdef CONFIG_MIGRATION |
191 | extern int isolate_lru_page(struct page *p); | 192 | extern int isolate_lru_page(struct page *p); |
192 | extern int putback_lru_pages(struct list_head *l); | 193 | extern int putback_lru_pages(struct list_head *l); |
194 | extern int migrate_page(struct page *, struct page *); | ||
195 | extern void migrate_page_copy(struct page *, struct page *); | ||
196 | extern int migrate_page_remove_references(struct page *, struct page *, int); | ||
193 | extern int migrate_pages(struct list_head *l, struct list_head *t, | 197 | extern int migrate_pages(struct list_head *l, struct list_head *t, |
194 | struct list_head *moved, struct list_head *failed); | 198 | struct list_head *moved, struct list_head *failed); |
199 | extern int fail_migrate_page(struct page *, struct page *); | ||
195 | #else | 200 | #else |
196 | static inline int isolate_lru_page(struct page *p) { return -ENOSYS; } | 201 | static inline int isolate_lru_page(struct page *p) { return -ENOSYS; } |
197 | static inline int putback_lru_pages(struct list_head *l) { return 0; } | 202 | static inline int putback_lru_pages(struct list_head *l) { return 0; } |
198 | static inline int migrate_pages(struct list_head *l, struct list_head *t, | 203 | static inline int migrate_pages(struct list_head *l, struct list_head *t, |
199 | struct list_head *moved, struct list_head *failed) { return -ENOSYS; } | 204 | struct list_head *moved, struct list_head *failed) { return -ENOSYS; } |
205 | /* Possible settings for the migrate_page() method in address_operations */ | ||
206 | #define migrate_page NULL | ||
207 | #define fail_migrate_page NULL | ||
200 | #endif | 208 | #endif |
201 | 209 | ||
202 | #ifdef CONFIG_MMU | 210 | #ifdef CONFIG_MMU |
@@ -245,6 +253,7 @@ extern int remove_exclusive_swap_page(struct page *); | |||
245 | struct backing_dev_info; | 253 | struct backing_dev_info; |
246 | 254 | ||
247 | extern spinlock_t swap_lock; | 255 | extern spinlock_t swap_lock; |
256 | extern int remove_vma_swap(struct vm_area_struct *vma, struct page *page); | ||
248 | 257 | ||
249 | /* linux/mm/thrash.c */ | 258 | /* linux/mm/thrash.c */ |
250 | extern struct mm_struct * swap_token_mm; | 259 | extern struct mm_struct * swap_token_mm; |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index e666d6070569..b9ea44ac0ddb 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -50,6 +50,8 @@ struct timezone; | |||
50 | struct tms; | 50 | struct tms; |
51 | struct utimbuf; | 51 | struct utimbuf; |
52 | struct mq_attr; | 52 | struct mq_attr; |
53 | struct compat_stat; | ||
54 | struct compat_timeval; | ||
53 | 55 | ||
54 | #include <linux/config.h> | 56 | #include <linux/config.h> |
55 | #include <linux/types.h> | 57 | #include <linux/types.h> |
@@ -534,4 +536,37 @@ asmlinkage long sys_spu_run(int fd, __u32 __user *unpc, | |||
534 | asmlinkage long sys_spu_create(const char __user *name, | 536 | asmlinkage long sys_spu_create(const char __user *name, |
535 | unsigned int flags, mode_t mode); | 537 | unsigned int flags, mode_t mode); |
536 | 538 | ||
539 | asmlinkage long sys_mknodat(int dfd, const char __user * filename, int mode, | ||
540 | unsigned dev); | ||
541 | asmlinkage long sys_mkdirat(int dfd, const char __user * pathname, int mode); | ||
542 | asmlinkage long sys_unlinkat(int dfd, const char __user * pathname, int flag); | ||
543 | asmlinkage long sys_symlinkat(const char __user * oldname, | ||
544 | int newdfd, const char __user * newname); | ||
545 | asmlinkage long sys_linkat(int olddfd, const char __user *oldname, | ||
546 | int newdfd, const char __user *newname, int flags); | ||
547 | asmlinkage long sys_renameat(int olddfd, const char __user * oldname, | ||
548 | int newdfd, const char __user * newname); | ||
549 | asmlinkage long sys_futimesat(int dfd, char __user *filename, | ||
550 | struct timeval __user *utimes); | ||
551 | asmlinkage long sys_faccessat(int dfd, const char __user *filename, int mode); | ||
552 | asmlinkage long sys_fchmodat(int dfd, const char __user * filename, | ||
553 | mode_t mode); | ||
554 | asmlinkage long sys_fchownat(int dfd, const char __user *filename, uid_t user, | ||
555 | gid_t group, int flag); | ||
556 | asmlinkage long sys_openat(int dfd, const char __user *filename, int flags, | ||
557 | int mode); | ||
558 | asmlinkage long sys_newfstatat(int dfd, char __user *filename, | ||
559 | struct stat __user *statbuf, int flag); | ||
560 | asmlinkage long sys_fstatat64(int dfd, char __user *filename, | ||
561 | struct stat64 __user *statbuf, int flag); | ||
562 | asmlinkage long sys_readlinkat(int dfd, const char __user *path, char __user *buf, | ||
563 | int bufsiz); | ||
564 | asmlinkage long compat_sys_futimesat(unsigned int dfd, char __user *filename, | ||
565 | struct compat_timeval __user *t); | ||
566 | asmlinkage long compat_sys_newfstatat(unsigned int dfd, char __user * filename, | ||
567 | struct compat_stat __user *statbuf, | ||
568 | int flag); | ||
569 | asmlinkage long compat_sys_openat(unsigned int dfd, const char __user *filename, | ||
570 | int flags, int mode); | ||
571 | |||
537 | #endif | 572 | #endif |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 8352a7ce5895..bac61db26456 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -146,6 +146,8 @@ enum | |||
146 | KERN_RANDOMIZE=68, /* int: randomize virtual address space */ | 146 | KERN_RANDOMIZE=68, /* int: randomize virtual address space */ |
147 | KERN_SETUID_DUMPABLE=69, /* int: behaviour of dumps for setuid core */ | 147 | KERN_SETUID_DUMPABLE=69, /* int: behaviour of dumps for setuid core */ |
148 | KERN_SPIN_RETRY=70, /* int: number of spinlock retries */ | 148 | KERN_SPIN_RETRY=70, /* int: number of spinlock retries */ |
149 | KERN_ACPI_VIDEO_FLAGS=71, /* int: flags for setting up video after ACPI sleep */ | ||
150 | KERN_IA64_UNALIGNED=72, /* int: ia64 unaligned userland trap enable */ | ||
149 | }; | 151 | }; |
150 | 152 | ||
151 | 153 | ||
@@ -182,7 +184,8 @@ enum | |||
182 | VM_SWAP_TOKEN_TIMEOUT=28, /* default time for token time out */ | 184 | VM_SWAP_TOKEN_TIMEOUT=28, /* default time for token time out */ |
183 | VM_DROP_PAGECACHE=29, /* int: nuke lots of pagecache */ | 185 | VM_DROP_PAGECACHE=29, /* int: nuke lots of pagecache */ |
184 | VM_PERCPU_PAGELIST_FRACTION=30,/* int: fraction of pages in each percpu_pagelist */ | 186 | VM_PERCPU_PAGELIST_FRACTION=30,/* int: fraction of pages in each percpu_pagelist */ |
185 | VM_ZONE_RECLAIM_MODE=31,/* reclaim local zone memory before going off node */ | 187 | VM_ZONE_RECLAIM_MODE=31, /* reclaim local zone memory before going off node */ |
188 | VM_ZONE_RECLAIM_INTERVAL=32, /* time period to wait after reclaim failure */ | ||
186 | }; | 189 | }; |
187 | 190 | ||
188 | 191 | ||
diff --git a/include/linux/time.h b/include/linux/time.h index 614dd8465839..d9cdba54b789 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
@@ -33,11 +33,34 @@ struct timezone { | |||
33 | #define NSEC_PER_SEC 1000000000L | 33 | #define NSEC_PER_SEC 1000000000L |
34 | #define NSEC_PER_USEC 1000L | 34 | #define NSEC_PER_USEC 1000L |
35 | 35 | ||
36 | static __inline__ int timespec_equal(struct timespec *a, struct timespec *b) | 36 | static inline int timespec_equal(struct timespec *a, struct timespec *b) |
37 | { | 37 | { |
38 | return (a->tv_sec == b->tv_sec) && (a->tv_nsec == b->tv_nsec); | 38 | return (a->tv_sec == b->tv_sec) && (a->tv_nsec == b->tv_nsec); |
39 | } | 39 | } |
40 | 40 | ||
41 | /* | ||
42 | * lhs < rhs: return <0 | ||
43 | * lhs == rhs: return 0 | ||
44 | * lhs > rhs: return >0 | ||
45 | */ | ||
46 | static inline int timespec_compare(struct timespec *lhs, struct timespec *rhs) | ||
47 | { | ||
48 | if (lhs->tv_sec < rhs->tv_sec) | ||
49 | return -1; | ||
50 | if (lhs->tv_sec > rhs->tv_sec) | ||
51 | return 1; | ||
52 | return lhs->tv_nsec - rhs->tv_nsec; | ||
53 | } | ||
54 | |||
55 | static inline int timeval_compare(struct timeval *lhs, struct timeval *rhs) | ||
56 | { | ||
57 | if (lhs->tv_sec < rhs->tv_sec) | ||
58 | return -1; | ||
59 | if (lhs->tv_sec > rhs->tv_sec) | ||
60 | return 1; | ||
61 | return lhs->tv_usec - rhs->tv_usec; | ||
62 | } | ||
63 | |||
41 | extern unsigned long mktime(const unsigned int year, const unsigned int mon, | 64 | extern unsigned long mktime(const unsigned int year, const unsigned int mon, |
42 | const unsigned int day, const unsigned int hour, | 65 | const unsigned int day, const unsigned int hour, |
43 | const unsigned int min, const unsigned int sec); | 66 | const unsigned int min, const unsigned int sec); |
@@ -48,7 +71,7 @@ extern void set_normalized_timespec(struct timespec *ts, time_t sec, long nsec); | |||
48 | * Returns true if the timespec is norm, false if denorm: | 71 | * Returns true if the timespec is norm, false if denorm: |
49 | */ | 72 | */ |
50 | #define timespec_valid(ts) \ | 73 | #define timespec_valid(ts) \ |
51 | (((ts)->tv_sec >= 0) && (((unsigned) (ts)->tv_nsec) < NSEC_PER_SEC)) | 74 | (((ts)->tv_sec >= 0) && (((unsigned long) (ts)->tv_nsec) < NSEC_PER_SEC)) |
52 | 75 | ||
53 | /* | 76 | /* |
54 | * 64-bit nanosec type. Large enough to span 292+ years in nanosecond | 77 | * 64-bit nanosec type. Large enough to span 292+ years in nanosecond |
diff --git a/include/linux/timex.h b/include/linux/timex.h index 04a4a8cb4ed3..b7ca1204e42a 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h | |||
@@ -345,6 +345,9 @@ time_interpolator_reset(void) | |||
345 | 345 | ||
346 | #endif /* !CONFIG_TIME_INTERPOLATION */ | 346 | #endif /* !CONFIG_TIME_INTERPOLATION */ |
347 | 347 | ||
348 | /* Returns how long ticks are at present, in ns / 2^(SHIFT_SCALE-10). */ | ||
349 | extern u64 current_tick_length(void); | ||
350 | |||
348 | #endif /* KERNEL */ | 351 | #endif /* KERNEL */ |
349 | 352 | ||
350 | #endif /* LINUX_TIMEX_H */ | 353 | #endif /* LINUX_TIMEX_H */ |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 3787102e4b12..f45cd74e6f24 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -57,6 +57,9 @@ struct tty_buffer { | |||
57 | unsigned char *flag_buf_ptr; | 57 | unsigned char *flag_buf_ptr; |
58 | int used; | 58 | int used; |
59 | int size; | 59 | int size; |
60 | int active; | ||
61 | int commit; | ||
62 | int read; | ||
60 | /* Data points here */ | 63 | /* Data points here */ |
61 | unsigned long data[0]; | 64 | unsigned long data[0]; |
62 | }; | 65 | }; |
@@ -64,6 +67,7 @@ struct tty_buffer { | |||
64 | struct tty_bufhead { | 67 | struct tty_bufhead { |
65 | struct work_struct work; | 68 | struct work_struct work; |
66 | struct semaphore pty_sem; | 69 | struct semaphore pty_sem; |
70 | spinlock_t lock; | ||
67 | struct tty_buffer *head; /* Queue head */ | 71 | struct tty_buffer *head; /* Queue head */ |
68 | struct tty_buffer *tail; /* Active buffer */ | 72 | struct tty_buffer *tail; /* Active buffer */ |
69 | struct tty_buffer *free; /* Free queue head */ | 73 | struct tty_buffer *free; /* Free queue head */ |
diff --git a/include/linux/tty_flip.h b/include/linux/tty_flip.h index be1400e82482..222faf97d5f9 100644 --- a/include/linux/tty_flip.h +++ b/include/linux/tty_flip.h | |||
@@ -17,7 +17,7 @@ _INLINE_ int tty_insert_flip_char(struct tty_struct *tty, | |||
17 | unsigned char ch, char flag) | 17 | unsigned char ch, char flag) |
18 | { | 18 | { |
19 | struct tty_buffer *tb = tty->buf.tail; | 19 | struct tty_buffer *tb = tty->buf.tail; |
20 | if (tb && tb->used < tb->size) { | 20 | if (tb && tb->active && tb->used < tb->size) { |
21 | tb->flag_buf_ptr[tb->used] = flag; | 21 | tb->flag_buf_ptr[tb->used] = flag; |
22 | tb->char_buf_ptr[tb->used++] = ch; | 22 | tb->char_buf_ptr[tb->used++] = ch; |
23 | return 1; | 23 | return 1; |
@@ -27,6 +27,13 @@ _INLINE_ int tty_insert_flip_char(struct tty_struct *tty, | |||
27 | 27 | ||
28 | _INLINE_ void tty_schedule_flip(struct tty_struct *tty) | 28 | _INLINE_ void tty_schedule_flip(struct tty_struct *tty) |
29 | { | 29 | { |
30 | unsigned long flags; | ||
31 | spin_lock_irqsave(&tty->buf.lock, flags); | ||
32 | if (tty->buf.tail != NULL) { | ||
33 | tty->buf.tail->active = 0; | ||
34 | tty->buf.tail->commit = tty->buf.tail->used; | ||
35 | } | ||
36 | spin_unlock_irqrestore(&tty->buf.lock, flags); | ||
30 | schedule_delayed_work(&tty->buf.work, 1); | 37 | schedule_delayed_work(&tty->buf.work, 1); |
31 | } | 38 | } |
32 | 39 | ||
diff --git a/include/linux/types.h b/include/linux/types.h index 21b9ce803644..54ae2d59e71b 100644 --- a/include/linux/types.h +++ b/include/linux/types.h | |||
@@ -8,6 +8,8 @@ | |||
8 | (((bits)+BITS_PER_LONG-1)/BITS_PER_LONG) | 8 | (((bits)+BITS_PER_LONG-1)/BITS_PER_LONG) |
9 | #define DECLARE_BITMAP(name,bits) \ | 9 | #define DECLARE_BITMAP(name,bits) \ |
10 | unsigned long name[BITS_TO_LONGS(bits)] | 10 | unsigned long name[BITS_TO_LONGS(bits)] |
11 | |||
12 | #define BITS_PER_BYTE 8 | ||
11 | #endif | 13 | #endif |
12 | 14 | ||
13 | #include <linux/posix_types.h> | 15 | #include <linux/posix_types.h> |
diff --git a/include/linux/ufs_fs.h b/include/linux/ufs_fs.h index 7a6babeca256..b0ffe4356e5a 100644 --- a/include/linux/ufs_fs.h +++ b/include/linux/ufs_fs.h | |||
@@ -148,11 +148,11 @@ typedef __u16 __bitwise __fs16; | |||
148 | #define UFS_USEEFT ((__u16)65535) | 148 | #define UFS_USEEFT ((__u16)65535) |
149 | 149 | ||
150 | #define UFS_FSOK 0x7c269d38 | 150 | #define UFS_FSOK 0x7c269d38 |
151 | #define UFS_FSACTIVE ((char)0x00) | 151 | #define UFS_FSACTIVE ((__s8)0x00) |
152 | #define UFS_FSCLEAN ((char)0x01) | 152 | #define UFS_FSCLEAN ((__s8)0x01) |
153 | #define UFS_FSSTABLE ((char)0x02) | 153 | #define UFS_FSSTABLE ((__s8)0x02) |
154 | #define UFS_FSOSF1 ((char)0x03) /* is this correct for DEC OSF/1? */ | 154 | #define UFS_FSOSF1 ((__s8)0x03) /* is this correct for DEC OSF/1? */ |
155 | #define UFS_FSBAD ((char)0xff) | 155 | #define UFS_FSBAD ((__s8)0xff) |
156 | 156 | ||
157 | /* From here to next blank line, s_flags for ufs_sb_info */ | 157 | /* From here to next blank line, s_flags for ufs_sb_info */ |
158 | /* directory entry encoding */ | 158 | /* directory entry encoding */ |
@@ -502,8 +502,7 @@ struct ufs_super_block { | |||
502 | /* | 502 | /* |
503 | * Convert cylinder group to base address of its global summary info. | 503 | * Convert cylinder group to base address of its global summary info. |
504 | */ | 504 | */ |
505 | #define fs_cs(indx) \ | 505 | #define fs_cs(indx) s_csp[(indx)] |
506 | s_csp[(indx) >> uspi->s_csshift][(indx) & ~uspi->s_csmask] | ||
507 | 506 | ||
508 | /* | 507 | /* |
509 | * Cylinder group block for a file system. | 508 | * Cylinder group block for a file system. |
@@ -913,6 +912,7 @@ extern int ufs_sync_inode (struct inode *); | |||
913 | extern void ufs_delete_inode (struct inode *); | 912 | extern void ufs_delete_inode (struct inode *); |
914 | extern struct buffer_head * ufs_getfrag (struct inode *, unsigned, int, int *); | 913 | extern struct buffer_head * ufs_getfrag (struct inode *, unsigned, int, int *); |
915 | extern struct buffer_head * ufs_bread (struct inode *, unsigned, int, int *); | 914 | extern struct buffer_head * ufs_bread (struct inode *, unsigned, int, int *); |
915 | extern int ufs_getfrag_block (struct inode *inode, sector_t fragment, struct buffer_head *bh_result, int create); | ||
916 | 916 | ||
917 | /* namei.c */ | 917 | /* namei.c */ |
918 | extern struct file_operations ufs_dir_operations; | 918 | extern struct file_operations ufs_dir_operations; |
diff --git a/include/linux/ufs_fs_sb.h b/include/linux/ufs_fs_sb.h index c1be4c226486..8ff13c160f3d 100644 --- a/include/linux/ufs_fs_sb.h +++ b/include/linux/ufs_fs_sb.h | |||
@@ -25,7 +25,7 @@ struct ufs_csum; | |||
25 | 25 | ||
26 | struct ufs_sb_info { | 26 | struct ufs_sb_info { |
27 | struct ufs_sb_private_info * s_uspi; | 27 | struct ufs_sb_private_info * s_uspi; |
28 | struct ufs_csum * s_csp[UFS_MAXCSBUFS]; | 28 | struct ufs_csum * s_csp; |
29 | unsigned s_bytesex; | 29 | unsigned s_bytesex; |
30 | unsigned s_flags; | 30 | unsigned s_flags; |
31 | struct buffer_head ** s_ucg; | 31 | struct buffer_head ** s_ucg; |
diff --git a/include/linux/usb_ch9.h b/include/linux/usb_ch9.h index ee21e6bf3867..a2aacfc7af2f 100644 --- a/include/linux/usb_ch9.h +++ b/include/linux/usb_ch9.h | |||
@@ -535,9 +535,11 @@ enum usb_device_state { | |||
535 | */ | 535 | */ |
536 | USB_STATE_NOTATTACHED = 0, | 536 | USB_STATE_NOTATTACHED = 0, |
537 | 537 | ||
538 | /* the chapter 9 device states */ | 538 | /* chapter 9 and authentication (wireless) device states */ |
539 | USB_STATE_ATTACHED, | 539 | USB_STATE_ATTACHED, |
540 | USB_STATE_POWERED, | 540 | USB_STATE_POWERED, /* wired */ |
541 | USB_STATE_UNAUTHENTICATED, /* auth */ | ||
542 | USB_STATE_RECONNECTING, /* auth */ | ||
541 | USB_STATE_DEFAULT, /* limited function */ | 543 | USB_STATE_DEFAULT, /* limited function */ |
542 | USB_STATE_ADDRESS, | 544 | USB_STATE_ADDRESS, |
543 | USB_STATE_CONFIGURED, /* most functions */ | 545 | USB_STATE_CONFIGURED, /* most functions */ |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 3f1504353472..724cfbf54b8a 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -560,7 +560,7 @@ struct v4l2_framebuffer | |||
560 | struct v4l2_clip | 560 | struct v4l2_clip |
561 | { | 561 | { |
562 | struct v4l2_rect c; | 562 | struct v4l2_rect c; |
563 | struct v4l2_clip *next; | 563 | struct v4l2_clip __user *next; |
564 | }; | 564 | }; |
565 | 565 | ||
566 | struct v4l2_window | 566 | struct v4l2_window |
diff --git a/include/net/ax25.h b/include/net/ax25.h index 2250a18b0cbb..d052b221dbcd 100644 --- a/include/net/ax25.h +++ b/include/net/ax25.h | |||
@@ -110,8 +110,15 @@ enum { | |||
110 | enum { | 110 | enum { |
111 | AX25_PROTO_STD_SIMPLEX, | 111 | AX25_PROTO_STD_SIMPLEX, |
112 | AX25_PROTO_STD_DUPLEX, | 112 | AX25_PROTO_STD_DUPLEX, |
113 | #ifdef CONFIG_AX25_DAMA_SLAVE | ||
113 | AX25_PROTO_DAMA_SLAVE, | 114 | AX25_PROTO_DAMA_SLAVE, |
114 | AX25_PROTO_DAMA_MASTER | 115 | #ifdef CONFIG_AX25_DAMA_MASTER |
116 | AX25_PROTO_DAMA_MASTER, | ||
117 | #define AX25_PROTO_MAX AX25_PROTO_DAMA_MASTER | ||
118 | #endif | ||
119 | #endif | ||
120 | __AX25_PROTO_MAX, | ||
121 | AX25_PROTO_MAX = __AX25_PROTO_MAX -1 | ||
115 | }; | 122 | }; |
116 | 123 | ||
117 | enum { | 124 | enum { |
diff --git a/include/net/bluetooth/rfcomm.h b/include/net/bluetooth/rfcomm.h index bbfac86734ec..89d743cfdfdf 100644 --- a/include/net/bluetooth/rfcomm.h +++ b/include/net/bluetooth/rfcomm.h | |||
@@ -33,7 +33,7 @@ | |||
33 | #define RFCOMM_DEFAULT_MTU 127 | 33 | #define RFCOMM_DEFAULT_MTU 127 |
34 | #define RFCOMM_DEFAULT_CREDITS 7 | 34 | #define RFCOMM_DEFAULT_CREDITS 7 |
35 | 35 | ||
36 | #define RFCOMM_MAX_L2CAP_MTU 1024 | 36 | #define RFCOMM_MAX_L2CAP_MTU 1013 |
37 | #define RFCOMM_MAX_CREDITS 40 | 37 | #define RFCOMM_MAX_CREDITS 40 |
38 | 38 | ||
39 | #define RFCOMM_SKB_HEAD_RESERVE 8 | 39 | #define RFCOMM_SKB_HEAD_RESERVE 8 |
diff --git a/include/net/ieee80211.h b/include/net/ieee80211.h index df05f468fa5c..9a92aef8b0b2 100644 --- a/include/net/ieee80211.h +++ b/include/net/ieee80211.h | |||
@@ -803,9 +803,9 @@ enum ieee80211_state { | |||
803 | #define IEEE80211_24GHZ_MAX_CHANNEL 14 | 803 | #define IEEE80211_24GHZ_MAX_CHANNEL 14 |
804 | #define IEEE80211_24GHZ_CHANNELS 14 | 804 | #define IEEE80211_24GHZ_CHANNELS 14 |
805 | 805 | ||
806 | #define IEEE80211_52GHZ_MIN_CHANNEL 36 | 806 | #define IEEE80211_52GHZ_MIN_CHANNEL 34 |
807 | #define IEEE80211_52GHZ_MAX_CHANNEL 165 | 807 | #define IEEE80211_52GHZ_MAX_CHANNEL 165 |
808 | #define IEEE80211_52GHZ_CHANNELS 32 | 808 | #define IEEE80211_52GHZ_CHANNELS 131 |
809 | 809 | ||
810 | enum { | 810 | enum { |
811 | IEEE80211_CH_PASSIVE_ONLY = (1 << 0), | 811 | IEEE80211_CH_PASSIVE_ONLY = (1 << 0), |
diff --git a/include/net/ip.h b/include/net/ip.h index 8de0697b364c..fab3d5b3ab1c 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
@@ -41,6 +41,7 @@ struct inet_skb_parm | |||
41 | #define IPSKB_XFRM_TUNNEL_SIZE 2 | 41 | #define IPSKB_XFRM_TUNNEL_SIZE 2 |
42 | #define IPSKB_XFRM_TRANSFORMED 4 | 42 | #define IPSKB_XFRM_TRANSFORMED 4 |
43 | #define IPSKB_FRAG_COMPLETE 8 | 43 | #define IPSKB_FRAG_COMPLETE 8 |
44 | #define IPSKB_REROUTED 16 | ||
44 | }; | 45 | }; |
45 | 46 | ||
46 | struct ipcm_cookie | 47 | struct ipcm_cookie |
diff --git a/include/net/irda/irda.h b/include/net/irda/irda.h index 05a840837fe7..1880e46ecc9b 100644 --- a/include/net/irda/irda.h +++ b/include/net/irda/irda.h | |||
@@ -82,9 +82,9 @@ do { if(!(expr)) { \ | |||
82 | #define IRDA_ASSERT_LABEL(label) | 82 | #define IRDA_ASSERT_LABEL(label) |
83 | #endif /* CONFIG_IRDA_DEBUG */ | 83 | #endif /* CONFIG_IRDA_DEBUG */ |
84 | 84 | ||
85 | #define IRDA_WARNING(args...) printk(KERN_WARNING args) | 85 | #define IRDA_WARNING(args...) do { if (net_ratelimit()) printk(KERN_WARNING args); } while (0) |
86 | #define IRDA_MESSAGE(args...) printk(KERN_INFO args) | 86 | #define IRDA_MESSAGE(args...) do { if (net_ratelimit()) printk(KERN_INFO args); } while (0) |
87 | #define IRDA_ERROR(args...) printk(KERN_ERR args) | 87 | #define IRDA_ERROR(args...) do { if (net_ratelimit()) printk(KERN_ERR args); } while (0) |
88 | 88 | ||
89 | /* | 89 | /* |
90 | * Magic numbers used by Linux-IrDA. Random numbers which must be unique to | 90 | * Magic numbers used by Linux-IrDA. Random numbers which must be unique to |
diff --git a/include/net/irda/irlap.h b/include/net/irda/irlap.h index f55e86e75030..2127cae1e0a6 100644 --- a/include/net/irda/irlap.h +++ b/include/net/irda/irlap.h | |||
@@ -50,6 +50,9 @@ | |||
50 | /* May be different when we get VFIR */ | 50 | /* May be different when we get VFIR */ |
51 | #define LAP_MAX_HEADER (LAP_ADDR_HEADER + LAP_CTRL_HEADER) | 51 | #define LAP_MAX_HEADER (LAP_ADDR_HEADER + LAP_CTRL_HEADER) |
52 | 52 | ||
53 | /* Each IrDA device gets a random 32 bits IRLAP device address */ | ||
54 | #define LAP_ALEN 4 | ||
55 | |||
53 | #define BROADCAST 0xffffffff /* Broadcast device address */ | 56 | #define BROADCAST 0xffffffff /* Broadcast device address */ |
54 | #define CBROADCAST 0xfe /* Connection broadcast address */ | 57 | #define CBROADCAST 0xfe /* Connection broadcast address */ |
55 | #define XID_FORMAT 0x01 /* Discovery XID format */ | 58 | #define XID_FORMAT 0x01 /* Discovery XID format */ |
diff --git a/include/net/netfilter/nf_conntrack_l3proto.h b/include/net/netfilter/nf_conntrack_l3proto.h index 67856eb93b43..dac43b15a5b0 100644 --- a/include/net/netfilter/nf_conntrack_l3proto.h +++ b/include/net/netfilter/nf_conntrack_l3proto.h | |||
@@ -88,12 +88,6 @@ extern struct nf_conntrack_l3proto *nf_ct_l3protos[AF_MAX]; | |||
88 | extern int nf_conntrack_l3proto_register(struct nf_conntrack_l3proto *proto); | 88 | extern int nf_conntrack_l3proto_register(struct nf_conntrack_l3proto *proto); |
89 | extern void nf_conntrack_l3proto_unregister(struct nf_conntrack_l3proto *proto); | 89 | extern void nf_conntrack_l3proto_unregister(struct nf_conntrack_l3proto *proto); |
90 | 90 | ||
91 | static inline struct nf_conntrack_l3proto * | ||
92 | __nf_ct_l3proto_find(u_int16_t l3proto) | ||
93 | { | ||
94 | return nf_ct_l3protos[l3proto]; | ||
95 | } | ||
96 | |||
97 | extern struct nf_conntrack_l3proto * | 91 | extern struct nf_conntrack_l3proto * |
98 | nf_ct_l3proto_find_get(u_int16_t l3proto); | 92 | nf_ct_l3proto_find_get(u_int16_t l3proto); |
99 | 93 | ||
@@ -103,4 +97,13 @@ extern void nf_ct_l3proto_put(struct nf_conntrack_l3proto *p); | |||
103 | extern struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv4; | 97 | extern struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv4; |
104 | extern struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv6; | 98 | extern struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv6; |
105 | extern struct nf_conntrack_l3proto nf_conntrack_generic_l3proto; | 99 | extern struct nf_conntrack_l3proto nf_conntrack_generic_l3proto; |
100 | |||
101 | static inline struct nf_conntrack_l3proto * | ||
102 | __nf_ct_l3proto_find(u_int16_t l3proto) | ||
103 | { | ||
104 | if (unlikely(l3proto >= AF_MAX)) | ||
105 | return &nf_conntrack_generic_l3proto; | ||
106 | return nf_ct_l3protos[l3proto]; | ||
107 | } | ||
108 | |||
106 | #endif /*_NF_CONNTRACK_L3PROTO_H*/ | 109 | #endif /*_NF_CONNTRACK_L3PROTO_H*/ |
diff --git a/include/net/route.h b/include/net/route.h index e3e5436f8017..9c04f15090d2 100644 --- a/include/net/route.h +++ b/include/net/route.h | |||
@@ -170,8 +170,8 @@ static inline int ip_route_connect(struct rtable **rp, u32 dst, | |||
170 | return ip_route_output_flow(rp, &fl, sk, 0); | 170 | return ip_route_output_flow(rp, &fl, sk, 0); |
171 | } | 171 | } |
172 | 172 | ||
173 | static inline int ip_route_newports(struct rtable **rp, u16 sport, u16 dport, | 173 | static inline int ip_route_newports(struct rtable **rp, u8 protocol, |
174 | struct sock *sk) | 174 | u16 sport, u16 dport, struct sock *sk) |
175 | { | 175 | { |
176 | if (sport != (*rp)->fl.fl_ip_sport || | 176 | if (sport != (*rp)->fl.fl_ip_sport || |
177 | dport != (*rp)->fl.fl_ip_dport) { | 177 | dport != (*rp)->fl.fl_ip_dport) { |
@@ -180,6 +180,7 @@ static inline int ip_route_newports(struct rtable **rp, u16 sport, u16 dport, | |||
180 | memcpy(&fl, &(*rp)->fl, sizeof(fl)); | 180 | memcpy(&fl, &(*rp)->fl, sizeof(fl)); |
181 | fl.fl_ip_sport = sport; | 181 | fl.fl_ip_sport = sport; |
182 | fl.fl_ip_dport = dport; | 182 | fl.fl_ip_dport = dport; |
183 | fl.proto = protocol; | ||
183 | ip_rt_put(*rp); | 184 | ip_rt_put(*rp); |
184 | *rp = NULL; | 185 | *rp = NULL; |
185 | return ip_route_output_flow(rp, &fl, sk, 0); | 186 | return ip_route_output_flow(rp, &fl, sk, 0); |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 8c522ae031bb..072f407848a6 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -700,7 +700,7 @@ struct sctp_chunk { | |||
700 | __u8 ecn_ce_done; /* Have we processed the ECN CE bit? */ | 700 | __u8 ecn_ce_done; /* Have we processed the ECN CE bit? */ |
701 | __u8 pdiscard; /* Discard the whole packet now? */ | 701 | __u8 pdiscard; /* Discard the whole packet now? */ |
702 | __u8 tsn_gap_acked; /* Is this chunk acked by a GAP ACK? */ | 702 | __u8 tsn_gap_acked; /* Is this chunk acked by a GAP ACK? */ |
703 | __u8 fast_retransmit; /* Is this chunk fast retransmitted? */ | 703 | __s8 fast_retransmit; /* Is this chunk fast retransmitted? */ |
704 | __u8 tsn_missing_report; /* Data chunk missing counter. */ | 704 | __u8 tsn_missing_report; /* Data chunk missing counter. */ |
705 | }; | 705 | }; |
706 | 706 | ||
diff --git a/include/net/sock.h b/include/net/sock.h index 1806e5b61419..f63d0d56712c 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -478,9 +478,9 @@ static inline void sk_add_backlog(struct sock *sk, struct sk_buff *skb) | |||
478 | rc = __condition; \ | 478 | rc = __condition; \ |
479 | if (!rc) { \ | 479 | if (!rc) { \ |
480 | *(__timeo) = schedule_timeout(*(__timeo)); \ | 480 | *(__timeo) = schedule_timeout(*(__timeo)); \ |
481 | rc = __condition; \ | ||
482 | } \ | 481 | } \ |
483 | lock_sock(__sk); \ | 482 | lock_sock(__sk); \ |
483 | rc = __condition; \ | ||
484 | rc; \ | 484 | rc; \ |
485 | }) | 485 | }) |
486 | 486 | ||
@@ -1354,12 +1354,12 @@ extern int sock_get_timestamp(struct sock *, struct timeval __user *); | |||
1354 | * Enable debug/info messages | 1354 | * Enable debug/info messages |
1355 | */ | 1355 | */ |
1356 | 1356 | ||
1357 | #if 0 | 1357 | #ifdef CONFIG_NETDEBUG |
1358 | #define NETDEBUG(fmt, args...) do { } while (0) | ||
1359 | #define LIMIT_NETDEBUG(fmt, args...) do { } while(0) | ||
1360 | #else | ||
1361 | #define NETDEBUG(fmt, args...) printk(fmt,##args) | 1358 | #define NETDEBUG(fmt, args...) printk(fmt,##args) |
1362 | #define LIMIT_NETDEBUG(fmt, args...) do { if (net_ratelimit()) printk(fmt,##args); } while(0) | 1359 | #define LIMIT_NETDEBUG(fmt, args...) do { if (net_ratelimit()) printk(fmt,##args); } while(0) |
1360 | #else | ||
1361 | #define NETDEBUG(fmt, args...) do { } while (0) | ||
1362 | #define LIMIT_NETDEBUG(fmt, args...) do { } while(0) | ||
1363 | #endif | 1363 | #endif |
1364 | 1364 | ||
1365 | /* | 1365 | /* |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index d09ca0e7d139..8d362c49b8a9 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -233,7 +233,6 @@ struct xfrm_type | |||
233 | int (*init_state)(struct xfrm_state *x); | 233 | int (*init_state)(struct xfrm_state *x); |
234 | void (*destructor)(struct xfrm_state *); | 234 | void (*destructor)(struct xfrm_state *); |
235 | int (*input)(struct xfrm_state *, struct xfrm_decap_state *, struct sk_buff *skb); | 235 | int (*input)(struct xfrm_state *, struct xfrm_decap_state *, struct sk_buff *skb); |
236 | int (*post_input)(struct xfrm_state *, struct xfrm_decap_state *, struct sk_buff *skb); | ||
237 | int (*output)(struct xfrm_state *, struct sk_buff *pskb); | 236 | int (*output)(struct xfrm_state *, struct sk_buff *pskb); |
238 | /* Estimate maximal size of result of transformation of a dgram */ | 237 | /* Estimate maximal size of result of transformation of a dgram */ |
239 | u32 (*get_max_size)(struct xfrm_state *, int size); | 238 | u32 (*get_max_size)(struct xfrm_state *, int size); |
@@ -403,6 +402,11 @@ unsigned xfrm_spi_hash(xfrm_address_t *addr, u32 spi, u8 proto, unsigned short f | |||
403 | 402 | ||
404 | extern void __xfrm_state_destroy(struct xfrm_state *); | 403 | extern void __xfrm_state_destroy(struct xfrm_state *); |
405 | 404 | ||
405 | static inline void __xfrm_state_put(struct xfrm_state *x) | ||
406 | { | ||
407 | atomic_dec(&x->refcnt); | ||
408 | } | ||
409 | |||
406 | static inline void xfrm_state_put(struct xfrm_state *x) | 410 | static inline void xfrm_state_put(struct xfrm_state *x) |
407 | { | 411 | { |
408 | if (atomic_dec_and_test(&x->refcnt)) | 412 | if (atomic_dec_and_test(&x->refcnt)) |
@@ -866,7 +870,6 @@ extern int xfrm_state_mtu(struct xfrm_state *x, int mtu); | |||
866 | extern int xfrm_init_state(struct xfrm_state *x); | 870 | extern int xfrm_init_state(struct xfrm_state *x); |
867 | extern int xfrm4_rcv(struct sk_buff *skb); | 871 | extern int xfrm4_rcv(struct sk_buff *skb); |
868 | extern int xfrm4_output(struct sk_buff *skb); | 872 | extern int xfrm4_output(struct sk_buff *skb); |
869 | extern int xfrm4_output_finish(struct sk_buff *skb); | ||
870 | extern int xfrm4_tunnel_register(struct xfrm_tunnel *handler); | 873 | extern int xfrm4_tunnel_register(struct xfrm_tunnel *handler); |
871 | extern int xfrm4_tunnel_deregister(struct xfrm_tunnel *handler); | 874 | extern int xfrm4_tunnel_deregister(struct xfrm_tunnel *handler); |
872 | extern int xfrm6_rcv_spi(struct sk_buff **pskb, u32 spi); | 875 | extern int xfrm6_rcv_spi(struct sk_buff **pskb, u32 spi); |
diff --git a/include/pcmcia/device_id.h b/include/pcmcia/device_id.h index 346d81ece287..e04e0b0d9a25 100644 --- a/include/pcmcia/device_id.h +++ b/include/pcmcia/device_id.h | |||
@@ -72,6 +72,15 @@ | |||
72 | .prod_id = { (v1), (v2), (v3), (v4) }, \ | 72 | .prod_id = { (v1), (v2), (v3), (v4) }, \ |
73 | .prod_id_hash = { (vh1), (vh2), (vh3), (vh4) }, } | 73 | .prod_id_hash = { (vh1), (vh2), (vh3), (vh4) }, } |
74 | 74 | ||
75 | #define PCMCIA_DEVICE_MANF_CARD_PROD_ID1(manf, card, v1, vh1) { \ | ||
76 | .match_flags = PCMCIA_DEV_ID_MATCH_MANF_ID| \ | ||
77 | PCMCIA_DEV_ID_MATCH_CARD_ID| \ | ||
78 | PCMCIA_DEV_ID_MATCH_PROD_ID1, \ | ||
79 | .manf_id = (manf), \ | ||
80 | .card_id = (card), \ | ||
81 | .prod_id = { (v1), NULL, NULL, NULL }, \ | ||
82 | .prod_id_hash = { (vh1), 0, 0, 0 }, } | ||
83 | |||
75 | 84 | ||
76 | /* multi-function devices */ | 85 | /* multi-function devices */ |
77 | 86 | ||
diff --git a/include/scsi/iscsi_if.h b/include/scsi/iscsi_if.h index 3e5cb5ab2d34..e5618b90996e 100644 --- a/include/scsi/iscsi_if.h +++ b/include/scsi/iscsi_if.h | |||
@@ -163,9 +163,6 @@ enum iscsi_param { | |||
163 | }; | 163 | }; |
164 | #define ISCSI_PARAM_MAX 14 | 164 | #define ISCSI_PARAM_MAX 14 |
165 | 165 | ||
166 | typedef uint64_t iscsi_sessionh_t; /* iSCSI Data-Path session handle */ | ||
167 | typedef uint64_t iscsi_connh_t; /* iSCSI Data-Path connection handle */ | ||
168 | |||
169 | #define iscsi_ptr(_handle) ((void*)(unsigned long)_handle) | 166 | #define iscsi_ptr(_handle) ((void*)(unsigned long)_handle) |
170 | #define iscsi_handle(_ptr) ((uint64_t)(unsigned long)_ptr) | 167 | #define iscsi_handle(_ptr) ((uint64_t)(unsigned long)_ptr) |
171 | #define hostdata_session(_hostdata) (iscsi_ptr(*(unsigned long *)_hostdata)) | 168 | #define hostdata_session(_hostdata) (iscsi_ptr(*(unsigned long *)_hostdata)) |
diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h index c60b8ff2f5e4..9c331258bc27 100644 --- a/include/scsi/scsi.h +++ b/include/scsi/scsi.h | |||
@@ -433,4 +433,6 @@ struct scsi_lun { | |||
433 | /* Used to obtain the PCI location of a device */ | 433 | /* Used to obtain the PCI location of a device */ |
434 | #define SCSI_IOCTL_GET_PCI 0x5387 | 434 | #define SCSI_IOCTL_GET_PCI 0x5387 |
435 | 435 | ||
436 | int scsi_execute_in_process_context(void (*fn)(void *data), void *data); | ||
437 | |||
436 | #endif /* _SCSI_SCSI_H */ | 438 | #endif /* _SCSI_SCSI_H */ |
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index e94ca4d36035..290e3b4d2aec 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
@@ -275,7 +275,7 @@ extern int scsi_execute_req(struct scsi_device *sdev, const unsigned char *cmd, | |||
275 | int data_direction, void *buffer, unsigned bufflen, | 275 | int data_direction, void *buffer, unsigned bufflen, |
276 | struct scsi_sense_hdr *, int timeout, int retries); | 276 | struct scsi_sense_hdr *, int timeout, int retries); |
277 | extern int scsi_execute_async(struct scsi_device *sdev, | 277 | extern int scsi_execute_async(struct scsi_device *sdev, |
278 | const unsigned char *cmd, int data_direction, | 278 | const unsigned char *cmd, int cmd_len, int data_direction, |
279 | void *buffer, unsigned bufflen, int use_sg, | 279 | void *buffer, unsigned bufflen, int use_sg, |
280 | int timeout, int retries, void *privdata, | 280 | int timeout, int retries, void *privdata, |
281 | void (*done)(void *, char *, int, int), | 281 | void (*done)(void *, char *, int, int), |
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index 467274a764d1..827992949c4b 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h | |||
@@ -554,7 +554,6 @@ struct Scsi_Host { | |||
554 | /* | 554 | /* |
555 | * ordered write support | 555 | * ordered write support |
556 | */ | 556 | */ |
557 | unsigned ordered_flush:1; | ||
558 | unsigned ordered_tag:1; | 557 | unsigned ordered_tag:1; |
559 | 558 | ||
560 | /* | 559 | /* |
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h index 16602a547a63..b41cf077e54b 100644 --- a/include/scsi/scsi_transport_iscsi.h +++ b/include/scsi/scsi_transport_iscsi.h | |||
@@ -63,25 +63,28 @@ struct iscsi_transport { | |||
63 | int max_lun; | 63 | int max_lun; |
64 | unsigned int max_conn; | 64 | unsigned int max_conn; |
65 | unsigned int max_cmd_len; | 65 | unsigned int max_cmd_len; |
66 | struct Scsi_Host *(*create_session) (struct scsi_transport_template *t, | 66 | struct iscsi_cls_session *(*create_session) |
67 | uint32_t initial_cmdsn); | 67 | (struct scsi_transport_template *t, uint32_t sn, uint32_t *sid); |
68 | void (*destroy_session) (struct Scsi_Host *shost); | 68 | void (*destroy_session) (struct iscsi_cls_session *session); |
69 | struct iscsi_cls_conn *(*create_conn) (struct Scsi_Host *shost, | 69 | struct iscsi_cls_conn *(*create_conn) (struct iscsi_cls_session *sess, |
70 | uint32_t cid); | 70 | uint32_t cid); |
71 | int (*bind_conn) (iscsi_sessionh_t session, iscsi_connh_t conn, | 71 | int (*bind_conn) (struct iscsi_cls_session *session, |
72 | struct iscsi_cls_conn *cls_conn, | ||
72 | uint32_t transport_fd, int is_leading); | 73 | uint32_t transport_fd, int is_leading); |
73 | int (*start_conn) (iscsi_connh_t conn); | 74 | int (*start_conn) (struct iscsi_cls_conn *conn); |
74 | void (*stop_conn) (iscsi_connh_t conn, int flag); | 75 | void (*stop_conn) (struct iscsi_cls_conn *conn, int flag); |
75 | void (*destroy_conn) (struct iscsi_cls_conn *conn); | 76 | void (*destroy_conn) (struct iscsi_cls_conn *conn); |
76 | int (*set_param) (iscsi_connh_t conn, enum iscsi_param param, | 77 | int (*set_param) (struct iscsi_cls_conn *conn, enum iscsi_param param, |
77 | uint32_t value); | 78 | uint32_t value); |
78 | int (*get_conn_param) (void *conndata, enum iscsi_param param, | 79 | int (*get_conn_param) (struct iscsi_cls_conn *conn, |
80 | enum iscsi_param param, | ||
79 | uint32_t *value); | 81 | uint32_t *value); |
80 | int (*get_session_param) (struct Scsi_Host *shost, | 82 | int (*get_session_param) (struct iscsi_cls_session *session, |
81 | enum iscsi_param param, uint32_t *value); | 83 | enum iscsi_param param, uint32_t *value); |
82 | int (*send_pdu) (iscsi_connh_t conn, struct iscsi_hdr *hdr, | 84 | int (*send_pdu) (struct iscsi_cls_conn *conn, struct iscsi_hdr *hdr, |
83 | char *data, uint32_t data_size); | 85 | char *data, uint32_t data_size); |
84 | void (*get_stats) (iscsi_connh_t conn, struct iscsi_stats *stats); | 86 | void (*get_stats) (struct iscsi_cls_conn *conn, |
87 | struct iscsi_stats *stats); | ||
85 | }; | 88 | }; |
86 | 89 | ||
87 | /* | 90 | /* |
@@ -93,15 +96,14 @@ extern int iscsi_unregister_transport(struct iscsi_transport *tt); | |||
93 | /* | 96 | /* |
94 | * control plane upcalls | 97 | * control plane upcalls |
95 | */ | 98 | */ |
96 | extern void iscsi_conn_error(iscsi_connh_t conn, enum iscsi_err error); | 99 | extern void iscsi_conn_error(struct iscsi_cls_conn *conn, enum iscsi_err error); |
97 | extern int iscsi_recv_pdu(iscsi_connh_t conn, struct iscsi_hdr *hdr, | 100 | extern int iscsi_recv_pdu(struct iscsi_cls_conn *conn, struct iscsi_hdr *hdr, |
98 | char *data, uint32_t data_size); | 101 | char *data, uint32_t data_size); |
99 | 102 | ||
100 | struct iscsi_cls_conn { | 103 | struct iscsi_cls_conn { |
101 | struct list_head conn_list; /* item in connlist */ | 104 | struct list_head conn_list; /* item in connlist */ |
102 | void *dd_data; /* LLD private data */ | 105 | void *dd_data; /* LLD private data */ |
103 | struct iscsi_transport *transport; | 106 | struct iscsi_transport *transport; |
104 | iscsi_connh_t connh; | ||
105 | int active; /* must be accessed with the connlock */ | 107 | int active; /* must be accessed with the connlock */ |
106 | struct device dev; /* sysfs transport/container device */ | 108 | struct device dev; /* sysfs transport/container device */ |
107 | struct mempool_zone *z_error; | 109 | struct mempool_zone *z_error; |
@@ -113,7 +115,7 @@ struct iscsi_cls_conn { | |||
113 | container_of(_dev, struct iscsi_cls_conn, dev) | 115 | container_of(_dev, struct iscsi_cls_conn, dev) |
114 | 116 | ||
115 | struct iscsi_cls_session { | 117 | struct iscsi_cls_session { |
116 | struct list_head list; /* item in session_list */ | 118 | struct list_head sess_list; /* item in session_list */ |
117 | struct iscsi_transport *transport; | 119 | struct iscsi_transport *transport; |
118 | struct device dev; /* sysfs transport/container device */ | 120 | struct device dev; /* sysfs transport/container device */ |
119 | }; | 121 | }; |
diff --git a/include/video/neomagic.h b/include/video/neomagic.h index 1d69049bd4c1..78b1f15a538f 100644 --- a/include/video/neomagic.h +++ b/include/video/neomagic.h | |||
@@ -159,6 +159,7 @@ struct neofb_par { | |||
159 | unsigned char PanelDispCntlReg1; | 159 | unsigned char PanelDispCntlReg1; |
160 | unsigned char PanelDispCntlReg2; | 160 | unsigned char PanelDispCntlReg2; |
161 | unsigned char PanelDispCntlReg3; | 161 | unsigned char PanelDispCntlReg3; |
162 | unsigned char PanelDispCntlRegRead; | ||
162 | unsigned char PanelVertCenterReg1; | 163 | unsigned char PanelVertCenterReg1; |
163 | unsigned char PanelVertCenterReg2; | 164 | unsigned char PanelVertCenterReg2; |
164 | unsigned char PanelVertCenterReg3; | 165 | unsigned char PanelVertCenterReg3; |