Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /****************************************************************************** |
| 2 | * |
| 3 | * Module Name: dsfield - Dispatcher field routines |
| 4 | * |
| 5 | *****************************************************************************/ |
| 6 | |
| 7 | /* |
Bob Moore | 6c9deb7 | 2007-02-02 19:48:24 +0300 | [diff] [blame] | 8 | * Copyright (C) 2000 - 2007, R. Byron Moore |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 9 | * All rights reserved. |
| 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without |
| 12 | * modification, are permitted provided that the following conditions |
| 13 | * are met: |
| 14 | * 1. Redistributions of source code must retain the above copyright |
| 15 | * notice, this list of conditions, and the following disclaimer, |
| 16 | * without modification. |
| 17 | * 2. Redistributions in binary form must reproduce at minimum a disclaimer |
| 18 | * substantially similar to the "NO WARRANTY" disclaimer below |
| 19 | * ("Disclaimer") and any redistribution must be conditioned upon |
| 20 | * including a substantially similar Disclaimer requirement for further |
| 21 | * binary redistribution. |
| 22 | * 3. Neither the names of the above-listed copyright holders nor the names |
| 23 | * of any contributors may be used to endorse or promote products derived |
| 24 | * from this software without specific prior written permission. |
| 25 | * |
| 26 | * Alternatively, this software may be distributed under the terms of the |
| 27 | * GNU General Public License ("GPL") version 2 as published by the Free |
| 28 | * Software Foundation. |
| 29 | * |
| 30 | * NO WARRANTY |
| 31 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 32 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 33 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR |
| 34 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 35 | * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 36 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
| 37 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 38 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
| 39 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING |
| 40 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 41 | * POSSIBILITY OF SUCH DAMAGES. |
| 42 | */ |
| 43 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 44 | #include <acpi/acpi.h> |
| 45 | #include <acpi/amlcode.h> |
| 46 | #include <acpi/acdispat.h> |
| 47 | #include <acpi/acinterp.h> |
| 48 | #include <acpi/acnamesp.h> |
| 49 | #include <acpi/acparser.h> |
| 50 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 51 | #define _COMPONENT ACPI_DISPATCHER |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 52 | ACPI_MODULE_NAME("dsfield") |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 53 | |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 54 | /* Local prototypes */ |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 55 | static acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 56 | acpi_ds_get_field_names(struct acpi_create_field_info *info, |
| 57 | struct acpi_walk_state *walk_state, |
| 58 | union acpi_parse_object *arg); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 59 | |
| 60 | /******************************************************************************* |
| 61 | * |
| 62 | * FUNCTION: acpi_ds_create_buffer_field |
| 63 | * |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 64 | * PARAMETERS: Op - Current parse op (create_xXField) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 65 | * walk_state - Current state |
| 66 | * |
| 67 | * RETURN: Status |
| 68 | * |
| 69 | * DESCRIPTION: Execute the create_field operators: |
| 70 | * create_bit_field_op, |
| 71 | * create_byte_field_op, |
| 72 | * create_word_field_op, |
| 73 | * create_dword_field_op, |
| 74 | * create_qword_field_op, |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 75 | * create_field_op (all of which define a field in a buffer) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 76 | * |
| 77 | ******************************************************************************/ |
| 78 | |
| 79 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 80 | acpi_ds_create_buffer_field(union acpi_parse_object *op, |
| 81 | struct acpi_walk_state *walk_state) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 82 | { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 83 | union acpi_parse_object *arg; |
| 84 | struct acpi_namespace_node *node; |
| 85 | acpi_status status; |
| 86 | union acpi_operand_object *obj_desc; |
| 87 | union acpi_operand_object *second_desc = NULL; |
| 88 | u32 flags; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 89 | |
Bob Moore | b229cf9 | 2006-04-21 17:15:00 -0400 | [diff] [blame] | 90 | ACPI_FUNCTION_TRACE(ds_create_buffer_field); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 91 | |
Bob Moore | cca97b8 | 2008-04-10 19:06:44 +0400 | [diff] [blame^] | 92 | /* |
| 93 | * Get the name_string argument (name of the new buffer_field) |
| 94 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 95 | if (op->common.aml_opcode == AML_CREATE_FIELD_OP) { |
Bob Moore | cca97b8 | 2008-04-10 19:06:44 +0400 | [diff] [blame^] | 96 | |
| 97 | /* For create_field, name is the 4th argument */ |
| 98 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 99 | arg = acpi_ps_get_arg(op, 3); |
| 100 | } else { |
Bob Moore | cca97b8 | 2008-04-10 19:06:44 +0400 | [diff] [blame^] | 101 | /* For all other create_xXXField operators, name is the 3rd argument */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 102 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 103 | arg = acpi_ps_get_arg(op, 2); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 104 | } |
| 105 | |
| 106 | if (!arg) { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 107 | return_ACPI_STATUS(AE_AML_NO_OPERAND); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 108 | } |
| 109 | |
| 110 | if (walk_state->deferred_node) { |
| 111 | node = walk_state->deferred_node; |
| 112 | status = AE_OK; |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 113 | } else { |
Bob Moore | cca97b8 | 2008-04-10 19:06:44 +0400 | [diff] [blame^] | 114 | /* Execute flag should always be set when this function is entered */ |
| 115 | |
| 116 | if (!(walk_state->parse_flags & ACPI_PARSE_EXECUTE)) { |
| 117 | return_ACPI_STATUS(AE_AML_INTERNAL); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 118 | } |
| 119 | |
Bob Moore | cca97b8 | 2008-04-10 19:06:44 +0400 | [diff] [blame^] | 120 | /* Creating new namespace node, should not already exist */ |
| 121 | |
| 122 | flags = ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE | |
| 123 | ACPI_NS_ERROR_IF_FOUND; |
| 124 | |
| 125 | /* Mark node temporary if we are executing a method */ |
| 126 | |
| 127 | if (walk_state->method_node) { |
| 128 | flags |= ACPI_NS_TEMPORARY; |
| 129 | } |
| 130 | |
| 131 | /* Enter the name_string into the namespace */ |
| 132 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 133 | status = |
| 134 | acpi_ns_lookup(walk_state->scope_info, |
| 135 | arg->common.value.string, ACPI_TYPE_ANY, |
| 136 | ACPI_IMODE_LOAD_PASS1, flags, walk_state, |
Bob Moore | cca97b8 | 2008-04-10 19:06:44 +0400 | [diff] [blame^] | 137 | &node); |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 138 | if (ACPI_FAILURE(status)) { |
Bob Moore | b8e4d89 | 2006-01-27 16:43:00 -0500 | [diff] [blame] | 139 | ACPI_ERROR_NAMESPACE(arg->common.value.string, status); |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 140 | return_ACPI_STATUS(status); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 141 | } |
| 142 | } |
| 143 | |
Bob Moore | 9c52657 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 144 | /* |
| 145 | * We could put the returned object (Node) on the object stack for later, |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 146 | * but for now, we will put it in the "op" object that the parser uses, |
Bob Moore | cca97b8 | 2008-04-10 19:06:44 +0400 | [diff] [blame^] | 147 | * so we can get it again at the end of this scope. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 148 | */ |
| 149 | op->common.node = node; |
| 150 | |
| 151 | /* |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 152 | * If there is no object attached to the node, this node was just created |
Bob Moore | cca97b8 | 2008-04-10 19:06:44 +0400 | [diff] [blame^] | 153 | * and we need to create the field object. Otherwise, this was a lookup |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 154 | * of an existing node and we don't want to create the field object again. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 155 | */ |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 156 | obj_desc = acpi_ns_get_attached_object(node); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 157 | if (obj_desc) { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 158 | return_ACPI_STATUS(AE_OK); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 159 | } |
| 160 | |
| 161 | /* |
| 162 | * The Field definition is not fully parsed at this time. |
| 163 | * (We must save the address of the AML for the buffer and index operands) |
| 164 | */ |
| 165 | |
| 166 | /* Create the buffer field object */ |
| 167 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 168 | obj_desc = acpi_ut_create_internal_object(ACPI_TYPE_BUFFER_FIELD); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 169 | if (!obj_desc) { |
| 170 | status = AE_NO_MEMORY; |
| 171 | goto cleanup; |
| 172 | } |
| 173 | |
| 174 | /* |
Bob Moore | cca97b8 | 2008-04-10 19:06:44 +0400 | [diff] [blame^] | 175 | * Remember location in AML stream of the field unit opcode and operands -- |
| 176 | * since the buffer and index operands must be evaluated. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 177 | */ |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 178 | second_desc = obj_desc->common.next_object; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 179 | second_desc->extra.aml_start = op->named.data; |
| 180 | second_desc->extra.aml_length = op->named.length; |
| 181 | obj_desc->buffer_field.node = node; |
| 182 | |
| 183 | /* Attach constructed field descriptors to parent node */ |
| 184 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 185 | status = acpi_ns_attach_object(node, obj_desc, ACPI_TYPE_BUFFER_FIELD); |
| 186 | if (ACPI_FAILURE(status)) { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 187 | goto cleanup; |
| 188 | } |
| 189 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 190 | cleanup: |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 191 | |
| 192 | /* Remove local reference to the object */ |
| 193 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 194 | acpi_ut_remove_reference(obj_desc); |
| 195 | return_ACPI_STATUS(status); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 196 | } |
| 197 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 198 | /******************************************************************************* |
| 199 | * |
| 200 | * FUNCTION: acpi_ds_get_field_names |
| 201 | * |
| 202 | * PARAMETERS: Info - create_field info structure |
| 203 | * ` walk_state - Current method state |
| 204 | * Arg - First parser arg for the field name list |
| 205 | * |
| 206 | * RETURN: Status |
| 207 | * |
| 208 | * DESCRIPTION: Process all named fields in a field declaration. Names are |
| 209 | * entered into the namespace. |
| 210 | * |
| 211 | ******************************************************************************/ |
| 212 | |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 213 | static acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 214 | acpi_ds_get_field_names(struct acpi_create_field_info *info, |
| 215 | struct acpi_walk_state *walk_state, |
| 216 | union acpi_parse_object *arg) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 217 | { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 218 | acpi_status status; |
| 219 | acpi_integer position; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 220 | |
Bob Moore | b229cf9 | 2006-04-21 17:15:00 -0400 | [diff] [blame] | 221 | ACPI_FUNCTION_TRACE_PTR(ds_get_field_names, info); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 222 | |
| 223 | /* First field starts at bit zero */ |
| 224 | |
| 225 | info->field_bit_position = 0; |
| 226 | |
| 227 | /* Process all elements in the field list (of parse nodes) */ |
| 228 | |
| 229 | while (arg) { |
| 230 | /* |
| 231 | * Three types of field elements are handled: |
| 232 | * 1) Offset - specifies a bit offset |
| 233 | * 2) access_as - changes the access mode |
| 234 | * 3) Name - Enters a new named field into the namespace |
| 235 | */ |
| 236 | switch (arg->common.aml_opcode) { |
| 237 | case AML_INT_RESERVEDFIELD_OP: |
| 238 | |
| 239 | position = (acpi_integer) info->field_bit_position |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 240 | + (acpi_integer) arg->common.value.size; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 241 | |
| 242 | if (position > ACPI_UINT32_MAX) { |
Bob Moore | b8e4d89 | 2006-01-27 16:43:00 -0500 | [diff] [blame] | 243 | ACPI_ERROR((AE_INFO, |
| 244 | "Bit offset within field too large (> 0xFFFFFFFF)")); |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 245 | return_ACPI_STATUS(AE_SUPPORT); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 246 | } |
| 247 | |
| 248 | info->field_bit_position = (u32) position; |
| 249 | break; |
| 250 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 251 | case AML_INT_ACCESSFIELD_OP: |
| 252 | |
| 253 | /* |
| 254 | * Get a new access_type and access_attribute -- to be used for all |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 255 | * field units that follow, until field end or another access_as |
| 256 | * keyword. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 257 | * |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 258 | * In field_flags, preserve the flag bits other than the |
| 259 | * ACCESS_TYPE bits |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 260 | */ |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 261 | info->field_flags = (u8) |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 262 | ((info-> |
| 263 | field_flags & ~(AML_FIELD_ACCESS_TYPE_MASK)) | |
| 264 | ((u8) ((u32) arg->common.value.integer >> 8))); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 265 | |
| 266 | info->attribute = (u8) (arg->common.value.integer); |
| 267 | break; |
| 268 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 269 | case AML_INT_NAMEDFIELD_OP: |
| 270 | |
Bob Moore | cca97b8 | 2008-04-10 19:06:44 +0400 | [diff] [blame^] | 271 | /* Lookup the name, it should already exist */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 272 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 273 | status = acpi_ns_lookup(walk_state->scope_info, |
| 274 | (char *)&arg->named.name, |
| 275 | info->field_type, |
| 276 | ACPI_IMODE_EXECUTE, |
| 277 | ACPI_NS_DONT_OPEN_SCOPE, |
| 278 | walk_state, &info->field_node); |
| 279 | if (ACPI_FAILURE(status)) { |
Bob Moore | b8e4d89 | 2006-01-27 16:43:00 -0500 | [diff] [blame] | 280 | ACPI_ERROR_NAMESPACE((char *)&arg->named.name, |
| 281 | status); |
Bob Moore | cca97b8 | 2008-04-10 19:06:44 +0400 | [diff] [blame^] | 282 | return_ACPI_STATUS(status); |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 283 | } else { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 284 | arg->common.node = info->field_node; |
| 285 | info->field_bit_length = arg->common.value.size; |
| 286 | |
Lin Ming | ef805d9 | 2008-04-10 19:06:41 +0400 | [diff] [blame] | 287 | /* |
Bob Moore | cca97b8 | 2008-04-10 19:06:44 +0400 | [diff] [blame^] | 288 | * If there is no object attached to the node, this node was |
| 289 | * just created and we need to create the field object. |
| 290 | * Otherwise, this was a lookup of an existing node and we |
| 291 | * don't want to create the field object again. |
Lin Ming | ef805d9 | 2008-04-10 19:06:41 +0400 | [diff] [blame] | 292 | */ |
| 293 | if (!acpi_ns_get_attached_object |
| 294 | (info->field_node)) { |
| 295 | status = acpi_ex_prep_field_value(info); |
| 296 | if (ACPI_FAILURE(status)) { |
| 297 | return_ACPI_STATUS(status); |
| 298 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 299 | } |
| 300 | } |
| 301 | |
| 302 | /* Keep track of bit position for the next field */ |
| 303 | |
| 304 | position = (acpi_integer) info->field_bit_position |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 305 | + (acpi_integer) arg->common.value.size; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 306 | |
| 307 | if (position > ACPI_UINT32_MAX) { |
Bob Moore | b8e4d89 | 2006-01-27 16:43:00 -0500 | [diff] [blame] | 308 | ACPI_ERROR((AE_INFO, |
| 309 | "Field [%4.4s] bit offset too large (> 0xFFFFFFFF)", |
| 310 | ACPI_CAST_PTR(char, |
| 311 | &info->field_node-> |
| 312 | name))); |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 313 | return_ACPI_STATUS(AE_SUPPORT); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 314 | } |
| 315 | |
| 316 | info->field_bit_position += info->field_bit_length; |
| 317 | break; |
| 318 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 319 | default: |
| 320 | |
Bob Moore | b8e4d89 | 2006-01-27 16:43:00 -0500 | [diff] [blame] | 321 | ACPI_ERROR((AE_INFO, |
| 322 | "Invalid opcode in field list: %X", |
| 323 | arg->common.aml_opcode)); |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 324 | return_ACPI_STATUS(AE_AML_BAD_OPCODE); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 325 | } |
| 326 | |
| 327 | arg = arg->common.next; |
| 328 | } |
| 329 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 330 | return_ACPI_STATUS(AE_OK); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 331 | } |
| 332 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 333 | /******************************************************************************* |
| 334 | * |
| 335 | * FUNCTION: acpi_ds_create_field |
| 336 | * |
| 337 | * PARAMETERS: Op - Op containing the Field definition and args |
| 338 | * region_node - Object for the containing Operation Region |
| 339 | * ` walk_state - Current method state |
| 340 | * |
| 341 | * RETURN: Status |
| 342 | * |
| 343 | * DESCRIPTION: Create a new field in the specified operation region |
| 344 | * |
| 345 | ******************************************************************************/ |
| 346 | |
| 347 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 348 | acpi_ds_create_field(union acpi_parse_object *op, |
| 349 | struct acpi_namespace_node *region_node, |
| 350 | struct acpi_walk_state *walk_state) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 351 | { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 352 | acpi_status status; |
| 353 | union acpi_parse_object *arg; |
| 354 | struct acpi_create_field_info info; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 355 | |
Bob Moore | b229cf9 | 2006-04-21 17:15:00 -0400 | [diff] [blame] | 356 | ACPI_FUNCTION_TRACE_PTR(ds_create_field, op); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 357 | |
| 358 | /* First arg is the name of the parent op_region (must already exist) */ |
| 359 | |
| 360 | arg = op->common.value.arg; |
| 361 | if (!region_node) { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 362 | status = |
| 363 | acpi_ns_lookup(walk_state->scope_info, |
| 364 | arg->common.value.name, ACPI_TYPE_REGION, |
| 365 | ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT, |
| 366 | walk_state, ®ion_node); |
| 367 | if (ACPI_FAILURE(status)) { |
Bob Moore | b8e4d89 | 2006-01-27 16:43:00 -0500 | [diff] [blame] | 368 | ACPI_ERROR_NAMESPACE(arg->common.value.name, status); |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 369 | return_ACPI_STATUS(status); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 370 | } |
| 371 | } |
| 372 | |
| 373 | /* Second arg is the field flags */ |
| 374 | |
| 375 | arg = arg->common.next; |
| 376 | info.field_flags = (u8) arg->common.value.integer; |
| 377 | info.attribute = 0; |
| 378 | |
| 379 | /* Each remaining arg is a Named Field */ |
| 380 | |
| 381 | info.field_type = ACPI_TYPE_LOCAL_REGION_FIELD; |
| 382 | info.region_node = region_node; |
| 383 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 384 | status = acpi_ds_get_field_names(&info, walk_state, arg->common.next); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 385 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 386 | return_ACPI_STATUS(status); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 387 | } |
| 388 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 389 | /******************************************************************************* |
| 390 | * |
| 391 | * FUNCTION: acpi_ds_init_field_objects |
| 392 | * |
| 393 | * PARAMETERS: Op - Op containing the Field definition and args |
| 394 | * ` walk_state - Current method state |
| 395 | * |
| 396 | * RETURN: Status |
| 397 | * |
| 398 | * DESCRIPTION: For each "Field Unit" name in the argument list that is |
| 399 | * part of the field declaration, enter the name into the |
| 400 | * namespace. |
| 401 | * |
| 402 | ******************************************************************************/ |
| 403 | |
| 404 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 405 | acpi_ds_init_field_objects(union acpi_parse_object *op, |
| 406 | struct acpi_walk_state *walk_state) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 407 | { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 408 | acpi_status status; |
| 409 | union acpi_parse_object *arg = NULL; |
| 410 | struct acpi_namespace_node *node; |
| 411 | u8 type = 0; |
Lin Ming | ef805d9 | 2008-04-10 19:06:41 +0400 | [diff] [blame] | 412 | u32 flags; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 413 | |
Bob Moore | b229cf9 | 2006-04-21 17:15:00 -0400 | [diff] [blame] | 414 | ACPI_FUNCTION_TRACE_PTR(ds_init_field_objects, op); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 415 | |
Bob Moore | cca97b8 | 2008-04-10 19:06:44 +0400 | [diff] [blame^] | 416 | /* Execute flag should always be set when this function is entered */ |
| 417 | |
| 418 | if (!(walk_state->parse_flags & ACPI_PARSE_EXECUTE)) { |
| 419 | if (walk_state->parse_flags & ACPI_PARSE_DEFERRED_OP) { |
| 420 | |
| 421 | /* bank_field Op is deferred, just return OK */ |
| 422 | |
| 423 | return_ACPI_STATUS(AE_OK); |
| 424 | } |
| 425 | |
| 426 | return_ACPI_STATUS(AE_AML_INTERNAL); |
Lin Ming | ef805d9 | 2008-04-10 19:06:41 +0400 | [diff] [blame] | 427 | } |
| 428 | |
Bob Moore | cca97b8 | 2008-04-10 19:06:44 +0400 | [diff] [blame^] | 429 | /* |
| 430 | * Get the field_list argument for this opcode. This is the start of the |
| 431 | * list of field elements. |
| 432 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 433 | switch (walk_state->opcode) { |
| 434 | case AML_FIELD_OP: |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 435 | arg = acpi_ps_get_arg(op, 2); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 436 | type = ACPI_TYPE_LOCAL_REGION_FIELD; |
| 437 | break; |
| 438 | |
| 439 | case AML_BANK_FIELD_OP: |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 440 | arg = acpi_ps_get_arg(op, 4); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 441 | type = ACPI_TYPE_LOCAL_BANK_FIELD; |
| 442 | break; |
| 443 | |
| 444 | case AML_INDEX_FIELD_OP: |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 445 | arg = acpi_ps_get_arg(op, 3); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 446 | type = ACPI_TYPE_LOCAL_INDEX_FIELD; |
| 447 | break; |
| 448 | |
| 449 | default: |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 450 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 451 | } |
| 452 | |
Bob Moore | cca97b8 | 2008-04-10 19:06:44 +0400 | [diff] [blame^] | 453 | if (!arg) { |
| 454 | return_ACPI_STATUS(AE_AML_NO_OPERAND); |
| 455 | } |
| 456 | |
| 457 | /* Creating new namespace node(s), should not already exist */ |
| 458 | |
| 459 | flags = ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE | |
| 460 | ACPI_NS_ERROR_IF_FOUND; |
| 461 | |
| 462 | /* Mark node(s) temporary if we are executing a method */ |
| 463 | |
| 464 | if (walk_state->method_node) { |
| 465 | flags |= ACPI_NS_TEMPORARY; |
| 466 | } |
| 467 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 468 | /* |
| 469 | * Walk the list of entries in the field_list |
| 470 | */ |
| 471 | while (arg) { |
Bob Moore | cca97b8 | 2008-04-10 19:06:44 +0400 | [diff] [blame^] | 472 | /* |
| 473 | * Ignore OFFSET and ACCESSAS terms here; we are only interested in the |
| 474 | * field names in order to enter them into the namespace. |
| 475 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 476 | if (arg->common.aml_opcode == AML_INT_NAMEDFIELD_OP) { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 477 | status = acpi_ns_lookup(walk_state->scope_info, |
Bob Moore | cca97b8 | 2008-04-10 19:06:44 +0400 | [diff] [blame^] | 478 | (char *)&arg->named.name, type, |
| 479 | ACPI_IMODE_LOAD_PASS1, flags, |
| 480 | walk_state, &node); |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 481 | if (ACPI_FAILURE(status)) { |
Bob Moore | b8e4d89 | 2006-01-27 16:43:00 -0500 | [diff] [blame] | 482 | ACPI_ERROR_NAMESPACE((char *)&arg->named.name, |
| 483 | status); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 484 | if (status != AE_ALREADY_EXISTS) { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 485 | return_ACPI_STATUS(status); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 486 | } |
| 487 | |
| 488 | /* Name already exists, just ignore this error */ |
| 489 | |
| 490 | status = AE_OK; |
| 491 | } |
| 492 | |
| 493 | arg->common.node = node; |
| 494 | } |
| 495 | |
Bob Moore | cca97b8 | 2008-04-10 19:06:44 +0400 | [diff] [blame^] | 496 | /* Get the next field element in the list */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 497 | |
| 498 | arg = arg->common.next; |
| 499 | } |
| 500 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 501 | return_ACPI_STATUS(AE_OK); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 502 | } |
| 503 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 504 | /******************************************************************************* |
| 505 | * |
| 506 | * FUNCTION: acpi_ds_create_bank_field |
| 507 | * |
| 508 | * PARAMETERS: Op - Op containing the Field definition and args |
| 509 | * region_node - Object for the containing Operation Region |
Lin Ming | ef805d9 | 2008-04-10 19:06:41 +0400 | [diff] [blame] | 510 | * walk_state - Current method state |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 511 | * |
| 512 | * RETURN: Status |
| 513 | * |
| 514 | * DESCRIPTION: Create a new bank field in the specified operation region |
| 515 | * |
| 516 | ******************************************************************************/ |
| 517 | |
| 518 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 519 | acpi_ds_create_bank_field(union acpi_parse_object *op, |
| 520 | struct acpi_namespace_node *region_node, |
| 521 | struct acpi_walk_state *walk_state) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 522 | { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 523 | acpi_status status; |
| 524 | union acpi_parse_object *arg; |
| 525 | struct acpi_create_field_info info; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 526 | |
Bob Moore | b229cf9 | 2006-04-21 17:15:00 -0400 | [diff] [blame] | 527 | ACPI_FUNCTION_TRACE_PTR(ds_create_bank_field, op); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 528 | |
| 529 | /* First arg is the name of the parent op_region (must already exist) */ |
| 530 | |
| 531 | arg = op->common.value.arg; |
| 532 | if (!region_node) { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 533 | status = |
| 534 | acpi_ns_lookup(walk_state->scope_info, |
| 535 | arg->common.value.name, ACPI_TYPE_REGION, |
| 536 | ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT, |
| 537 | walk_state, ®ion_node); |
| 538 | if (ACPI_FAILURE(status)) { |
Bob Moore | b8e4d89 | 2006-01-27 16:43:00 -0500 | [diff] [blame] | 539 | ACPI_ERROR_NAMESPACE(arg->common.value.name, status); |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 540 | return_ACPI_STATUS(status); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 541 | } |
| 542 | } |
| 543 | |
| 544 | /* Second arg is the Bank Register (Field) (must already exist) */ |
| 545 | |
| 546 | arg = arg->common.next; |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 547 | status = |
| 548 | acpi_ns_lookup(walk_state->scope_info, arg->common.value.string, |
| 549 | ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE, |
| 550 | ACPI_NS_SEARCH_PARENT, walk_state, |
| 551 | &info.register_node); |
| 552 | if (ACPI_FAILURE(status)) { |
Bob Moore | b8e4d89 | 2006-01-27 16:43:00 -0500 | [diff] [blame] | 553 | ACPI_ERROR_NAMESPACE(arg->common.value.string, status); |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 554 | return_ACPI_STATUS(status); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 555 | } |
| 556 | |
Lin Ming | ef805d9 | 2008-04-10 19:06:41 +0400 | [diff] [blame] | 557 | /* |
| 558 | * Third arg is the bank_value |
| 559 | * This arg is a term_arg, not a constant |
| 560 | * It will be evaluated later, by acpi_ds_eval_bank_field_operands |
| 561 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 562 | arg = arg->common.next; |
Bob Moore | 9c52657 | 2007-02-02 19:48:18 +0300 | [diff] [blame] | 563 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 564 | /* Fourth arg is the field flags */ |
| 565 | |
| 566 | arg = arg->common.next; |
| 567 | info.field_flags = (u8) arg->common.value.integer; |
| 568 | |
| 569 | /* Each remaining arg is a Named Field */ |
| 570 | |
| 571 | info.field_type = ACPI_TYPE_LOCAL_BANK_FIELD; |
| 572 | info.region_node = region_node; |
| 573 | |
Lin Ming | ef805d9 | 2008-04-10 19:06:41 +0400 | [diff] [blame] | 574 | /* |
| 575 | * Use Info.data_register_node to store bank_field Op |
| 576 | * It's safe because data_register_node will never be used when create bank field |
| 577 | * We store aml_start and aml_length in the bank_field Op for late evaluation |
| 578 | * Used in acpi_ex_prep_field_value(Info) |
| 579 | * |
| 580 | * TBD: Or, should we add a field in struct acpi_create_field_info, like "void *ParentOp"? |
| 581 | */ |
| 582 | info.data_register_node = (struct acpi_namespace_node *)op; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 583 | |
Lin Ming | ef805d9 | 2008-04-10 19:06:41 +0400 | [diff] [blame] | 584 | status = acpi_ds_get_field_names(&info, walk_state, arg->common.next); |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 585 | return_ACPI_STATUS(status); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 586 | } |
| 587 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 588 | /******************************************************************************* |
| 589 | * |
| 590 | * FUNCTION: acpi_ds_create_index_field |
| 591 | * |
| 592 | * PARAMETERS: Op - Op containing the Field definition and args |
| 593 | * region_node - Object for the containing Operation Region |
| 594 | * ` walk_state - Current method state |
| 595 | * |
| 596 | * RETURN: Status |
| 597 | * |
| 598 | * DESCRIPTION: Create a new index field in the specified operation region |
| 599 | * |
| 600 | ******************************************************************************/ |
| 601 | |
| 602 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 603 | acpi_ds_create_index_field(union acpi_parse_object *op, |
| 604 | struct acpi_namespace_node *region_node, |
| 605 | struct acpi_walk_state *walk_state) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 606 | { |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 607 | acpi_status status; |
| 608 | union acpi_parse_object *arg; |
| 609 | struct acpi_create_field_info info; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 610 | |
Bob Moore | b229cf9 | 2006-04-21 17:15:00 -0400 | [diff] [blame] | 611 | ACPI_FUNCTION_TRACE_PTR(ds_create_index_field, op); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 612 | |
| 613 | /* First arg is the name of the Index register (must already exist) */ |
| 614 | |
| 615 | arg = op->common.value.arg; |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 616 | status = |
| 617 | acpi_ns_lookup(walk_state->scope_info, arg->common.value.string, |
| 618 | ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE, |
| 619 | ACPI_NS_SEARCH_PARENT, walk_state, |
| 620 | &info.register_node); |
| 621 | if (ACPI_FAILURE(status)) { |
Bob Moore | b8e4d89 | 2006-01-27 16:43:00 -0500 | [diff] [blame] | 622 | ACPI_ERROR_NAMESPACE(arg->common.value.string, status); |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 623 | return_ACPI_STATUS(status); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 624 | } |
| 625 | |
| 626 | /* Second arg is the data register (must already exist) */ |
| 627 | |
| 628 | arg = arg->common.next; |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 629 | status = |
| 630 | acpi_ns_lookup(walk_state->scope_info, arg->common.value.string, |
| 631 | ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE, |
| 632 | ACPI_NS_SEARCH_PARENT, walk_state, |
| 633 | &info.data_register_node); |
| 634 | if (ACPI_FAILURE(status)) { |
Bob Moore | b8e4d89 | 2006-01-27 16:43:00 -0500 | [diff] [blame] | 635 | ACPI_ERROR_NAMESPACE(arg->common.value.string, status); |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 636 | return_ACPI_STATUS(status); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 637 | } |
| 638 | |
| 639 | /* Next arg is the field flags */ |
| 640 | |
| 641 | arg = arg->common.next; |
| 642 | info.field_flags = (u8) arg->common.value.integer; |
| 643 | |
| 644 | /* Each remaining arg is a Named Field */ |
| 645 | |
| 646 | info.field_type = ACPI_TYPE_LOCAL_INDEX_FIELD; |
| 647 | info.region_node = region_node; |
| 648 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 649 | status = acpi_ds_get_field_names(&info, walk_state, arg->common.next); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 650 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame] | 651 | return_ACPI_STATUS(status); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 652 | } |