blob: c28c41b3180bc585dd182aa983cda8abc46ba419 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001
2/******************************************************************************
3 *
4 * Module Name: hwgpe - Low level GPE enable/disable/clear functions
5 *
6 *****************************************************************************/
7
8/*
Len Brown75a44ce2008-04-23 23:00:13 -04009 * Copyright (C) 2000 - 2008, Intel Corp.
Linus Torvalds1da177e2005-04-16 15:20:36 -070010 * All rights reserved.
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 * 1. Redistributions of source code must retain the above copyright
16 * notice, this list of conditions, and the following disclaimer,
17 * without modification.
18 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
19 * substantially similar to the "NO WARRANTY" disclaimer below
20 * ("Disclaimer") and any redistribution must be conditioned upon
21 * including a substantially similar Disclaimer requirement for further
22 * binary redistribution.
23 * 3. Neither the names of the above-listed copyright holders nor the names
24 * of any contributors may be used to endorse or promote products derived
25 * from this software without specific prior written permission.
26 *
27 * Alternatively, this software may be distributed under the terms of the
28 * GNU General Public License ("GPL") version 2 as published by the Free
29 * Software Foundation.
30 *
31 * NO WARRANTY
32 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
33 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
34 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
35 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
36 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
37 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
38 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
39 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
40 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
41 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
42 * POSSIBILITY OF SUCH DAMAGES.
43 */
44
45#include <acpi/acpi.h>
Len Browne2f7a772009-01-09 00:30:03 -050046#include "accommon.h"
47#include "acevents.h"
Linus Torvalds1da177e2005-04-16 15:20:36 -070048
49#define _COMPONENT ACPI_HARDWARE
Len Brown4be44fc2005-08-05 00:44:28 -040050ACPI_MODULE_NAME("hwgpe")
Linus Torvalds1da177e2005-04-16 15:20:36 -070051
Robert Moore44f6c012005-04-18 22:49:35 -040052/* Local prototypes */
Robert Moore44f6c012005-04-18 22:49:35 -040053static acpi_status
Len Brown4be44fc2005-08-05 00:44:28 -040054acpi_hw_enable_wakeup_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
Bob Mooree97d6bf2008-12-30 09:45:17 +080055 struct acpi_gpe_block_info *gpe_block,
56 void *context);
Linus Torvalds1da177e2005-04-16 15:20:36 -070057
58/******************************************************************************
59 *
Bob Mooree38e8a02008-06-13 08:28:55 +080060 * FUNCTION: acpi_hw_low_disable_gpe
61 *
62 * PARAMETERS: gpe_event_info - Info block for the GPE to be disabled
63 *
64 * RETURN: Status
65 *
66 * DESCRIPTION: Disable a single GPE in the enable register.
67 *
68 ******************************************************************************/
69
70acpi_status acpi_hw_low_disable_gpe(struct acpi_gpe_event_info *gpe_event_info)
71{
72 struct acpi_gpe_register_info *gpe_register_info;
73 acpi_status status;
74 u32 enable_mask;
75
76 /* Get the info block for the entire GPE register */
77
78 gpe_register_info = gpe_event_info->register_info;
79 if (!gpe_register_info) {
80 return (AE_NOT_EXIST);
81 }
82
83 /* Get current value of the enable register that contains this GPE */
84
Bob Moorec6b57742009-06-24 09:44:06 +080085 status = acpi_hw_read(&enable_mask, &gpe_register_info->enable_address);
Bob Mooree38e8a02008-06-13 08:28:55 +080086 if (ACPI_FAILURE(status)) {
87 return (status);
88 }
89
90 /* Clear just the bit that corresponds to this GPE */
91
Bob Moored4913dc2009-03-06 10:05:18 +080092 ACPI_CLEAR_BIT(enable_mask, ((u32)1 <<
93 (gpe_event_info->gpe_number -
94 gpe_register_info->base_gpe_number)));
Bob Mooree38e8a02008-06-13 08:28:55 +080095
96 /* Write the updated enable mask */
97
Bob Moorec6b57742009-06-24 09:44:06 +080098 status = acpi_hw_write(enable_mask, &gpe_register_info->enable_address);
Bob Mooree38e8a02008-06-13 08:28:55 +080099 return (status);
100}
101
102/******************************************************************************
103 *
Linus Torvalds1da177e2005-04-16 15:20:36 -0700104 * FUNCTION: acpi_hw_write_gpe_enable_reg
105 *
106 * PARAMETERS: gpe_event_info - Info block for the GPE to be enabled
107 *
108 * RETURN: Status
109 *
110 * DESCRIPTION: Write a GPE enable register. Note: The bit for this GPE must
111 * already be cleared or set in the parent register
112 * enable_for_run mask.
113 *
114 ******************************************************************************/
115
116acpi_status
Bob Mooree38e8a02008-06-13 08:28:55 +0800117acpi_hw_write_gpe_enable_reg(struct acpi_gpe_event_info * gpe_event_info)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700118{
Len Brown4be44fc2005-08-05 00:44:28 -0400119 struct acpi_gpe_register_info *gpe_register_info;
120 acpi_status status;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700121
Len Brown4be44fc2005-08-05 00:44:28 -0400122 ACPI_FUNCTION_ENTRY();
Linus Torvalds1da177e2005-04-16 15:20:36 -0700123
124 /* Get the info block for the entire GPE register */
125
126 gpe_register_info = gpe_event_info->register_info;
127 if (!gpe_register_info) {
128 return (AE_NOT_EXIST);
129 }
130
131 /* Write the entire GPE (runtime) enable register */
132
Bob Moorec6b57742009-06-24 09:44:06 +0800133 status = acpi_hw_write(gpe_register_info->enable_for_run,
134 &gpe_register_info->enable_address);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700135
136 return (status);
137}
138
Linus Torvalds1da177e2005-04-16 15:20:36 -0700139/******************************************************************************
140 *
141 * FUNCTION: acpi_hw_clear_gpe
142 *
143 * PARAMETERS: gpe_event_info - Info block for the GPE to be cleared
144 *
145 * RETURN: Status
146 *
147 * DESCRIPTION: Clear the status bit for a single GPE.
148 *
149 ******************************************************************************/
150
Len Brown4be44fc2005-08-05 00:44:28 -0400151acpi_status acpi_hw_clear_gpe(struct acpi_gpe_event_info * gpe_event_info)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700152{
Len Brown4be44fc2005-08-05 00:44:28 -0400153 acpi_status status;
Alexey Starikovskiy69874162007-02-02 19:48:19 +0300154 u8 register_bit;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700155
Len Brown4be44fc2005-08-05 00:44:28 -0400156 ACPI_FUNCTION_ENTRY();
Linus Torvalds1da177e2005-04-16 15:20:36 -0700157
Bob Moored4913dc2009-03-06 10:05:18 +0800158 register_bit = (u8)(1 <<
159 (gpe_event_info->gpe_number -
160 gpe_event_info->register_info->base_gpe_number));
Alexey Starikovskiy69874162007-02-02 19:48:19 +0300161
Linus Torvalds1da177e2005-04-16 15:20:36 -0700162 /*
163 * Write a one to the appropriate bit in the status register to
164 * clear this GPE.
165 */
Bob Moorec6b57742009-06-24 09:44:06 +0800166 status = acpi_hw_write(register_bit,
167 &gpe_event_info->register_info->status_address);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700168
169 return (status);
170}
171
Linus Torvalds1da177e2005-04-16 15:20:36 -0700172/******************************************************************************
173 *
174 * FUNCTION: acpi_hw_get_gpe_status
175 *
176 * PARAMETERS: gpe_event_info - Info block for the GPE to queried
177 * event_status - Where the GPE status is returned
178 *
179 * RETURN: Status
180 *
181 * DESCRIPTION: Return the status of a single GPE.
182 *
183 ******************************************************************************/
Robert Moore44f6c012005-04-18 22:49:35 -0400184
Linus Torvalds1da177e2005-04-16 15:20:36 -0700185acpi_status
Len Brown4be44fc2005-08-05 00:44:28 -0400186acpi_hw_get_gpe_status(struct acpi_gpe_event_info * gpe_event_info,
187 acpi_event_status * event_status)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700188{
Len Brown4be44fc2005-08-05 00:44:28 -0400189 u32 in_byte;
190 u8 register_bit;
191 struct acpi_gpe_register_info *gpe_register_info;
192 acpi_status status;
193 acpi_event_status local_event_status = 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700194
Len Brown4be44fc2005-08-05 00:44:28 -0400195 ACPI_FUNCTION_ENTRY();
Linus Torvalds1da177e2005-04-16 15:20:36 -0700196
197 if (!event_status) {
198 return (AE_BAD_PARAMETER);
199 }
200
201 /* Get the info block for the entire GPE register */
202
203 gpe_register_info = gpe_event_info->register_info;
204
205 /* Get the register bitmask for this GPE */
206
Bob Moored4913dc2009-03-06 10:05:18 +0800207 register_bit = (u8)(1 <<
208 (gpe_event_info->gpe_number -
209 gpe_event_info->register_info->base_gpe_number));
Linus Torvalds1da177e2005-04-16 15:20:36 -0700210
211 /* GPE currently enabled? (enabled for runtime?) */
212
213 if (register_bit & gpe_register_info->enable_for_run) {
214 local_event_status |= ACPI_EVENT_FLAG_ENABLED;
215 }
216
217 /* GPE enabled for wake? */
218
219 if (register_bit & gpe_register_info->enable_for_wake) {
220 local_event_status |= ACPI_EVENT_FLAG_WAKE_ENABLED;
221 }
222
223 /* GPE currently active (status bit == 1)? */
224
Bob Moorec6b57742009-06-24 09:44:06 +0800225 status = acpi_hw_read(&in_byte, &gpe_register_info->status_address);
Len Brown4be44fc2005-08-05 00:44:28 -0400226 if (ACPI_FAILURE(status)) {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700227 goto unlock_and_exit;
228 }
229
230 if (register_bit & in_byte) {
231 local_event_status |= ACPI_EVENT_FLAG_SET;
232 }
233
234 /* Set return value */
235
236 (*event_status) = local_event_status;
237
Len Brown4be44fc2005-08-05 00:44:28 -0400238 unlock_and_exit:
Linus Torvalds1da177e2005-04-16 15:20:36 -0700239 return (status);
240}
Linus Torvalds1da177e2005-04-16 15:20:36 -0700241
242/******************************************************************************
243 *
244 * FUNCTION: acpi_hw_disable_gpe_block
245 *
246 * PARAMETERS: gpe_xrupt_info - GPE Interrupt info
247 * gpe_block - Gpe Block info
248 *
249 * RETURN: Status
250 *
Robert Moore44f6c012005-04-18 22:49:35 -0400251 * DESCRIPTION: Disable all GPEs within a single GPE block
Linus Torvalds1da177e2005-04-16 15:20:36 -0700252 *
253 ******************************************************************************/
254
255acpi_status
Bob Mooree97d6bf2008-12-30 09:45:17 +0800256acpi_hw_disable_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
257 struct acpi_gpe_block_info *gpe_block, void *context)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700258{
Len Brown4be44fc2005-08-05 00:44:28 -0400259 u32 i;
260 acpi_status status;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700261
262 /* Examine each GPE Register within the block */
263
264 for (i = 0; i < gpe_block->register_count; i++) {
Bob Moore52fc0b02006-10-02 00:00:00 -0400265
Linus Torvalds1da177e2005-04-16 15:20:36 -0700266 /* Disable all GPEs in this register */
267
Bob Mooreecfbbc72008-12-31 02:55:32 +0800268 status =
Bob Moorec6b57742009-06-24 09:44:06 +0800269 acpi_hw_write(0x00,
270 &gpe_block->register_info[i].enable_address);
Len Brown4be44fc2005-08-05 00:44:28 -0400271 if (ACPI_FAILURE(status)) {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700272 return (status);
273 }
274 }
275
276 return (AE_OK);
277}
278
Linus Torvalds1da177e2005-04-16 15:20:36 -0700279/******************************************************************************
280 *
281 * FUNCTION: acpi_hw_clear_gpe_block
282 *
283 * PARAMETERS: gpe_xrupt_info - GPE Interrupt info
284 * gpe_block - Gpe Block info
285 *
286 * RETURN: Status
287 *
Robert Moore44f6c012005-04-18 22:49:35 -0400288 * DESCRIPTION: Clear status bits for all GPEs within a single GPE block
Linus Torvalds1da177e2005-04-16 15:20:36 -0700289 *
290 ******************************************************************************/
291
292acpi_status
Bob Mooree97d6bf2008-12-30 09:45:17 +0800293acpi_hw_clear_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
294 struct acpi_gpe_block_info *gpe_block, void *context)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700295{
Len Brown4be44fc2005-08-05 00:44:28 -0400296 u32 i;
297 acpi_status status;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700298
299 /* Examine each GPE Register within the block */
300
301 for (i = 0; i < gpe_block->register_count; i++) {
Bob Moore52fc0b02006-10-02 00:00:00 -0400302
Linus Torvalds1da177e2005-04-16 15:20:36 -0700303 /* Clear status on all GPEs in this register */
304
Bob Mooreecfbbc72008-12-31 02:55:32 +0800305 status =
Bob Moorec6b57742009-06-24 09:44:06 +0800306 acpi_hw_write(0xFF,
307 &gpe_block->register_info[i].status_address);
Len Brown4be44fc2005-08-05 00:44:28 -0400308 if (ACPI_FAILURE(status)) {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700309 return (status);
310 }
311 }
312
313 return (AE_OK);
314}
315
Linus Torvalds1da177e2005-04-16 15:20:36 -0700316/******************************************************************************
317 *
318 * FUNCTION: acpi_hw_enable_runtime_gpe_block
319 *
320 * PARAMETERS: gpe_xrupt_info - GPE Interrupt info
321 * gpe_block - Gpe Block info
322 *
323 * RETURN: Status
324 *
Robert Moore44f6c012005-04-18 22:49:35 -0400325 * DESCRIPTION: Enable all "runtime" GPEs within a single GPE block. Includes
326 * combination wake/run GPEs.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700327 *
328 ******************************************************************************/
329
330acpi_status
Bob Mooree97d6bf2008-12-30 09:45:17 +0800331acpi_hw_enable_runtime_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
332 struct acpi_gpe_block_info *gpe_block, void *context)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700333{
Len Brown4be44fc2005-08-05 00:44:28 -0400334 u32 i;
335 acpi_status status;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700336
337 /* NOTE: assumes that all GPEs are currently disabled */
338
339 /* Examine each GPE Register within the block */
340
341 for (i = 0; i < gpe_block->register_count; i++) {
342 if (!gpe_block->register_info[i].enable_for_run) {
343 continue;
344 }
345
346 /* Enable all "runtime" GPEs in this register */
347
Bob Moorec6b57742009-06-24 09:44:06 +0800348 status =
349 acpi_hw_write(gpe_block->register_info[i].enable_for_run,
350 &gpe_block->register_info[i].enable_address);
Len Brown4be44fc2005-08-05 00:44:28 -0400351 if (ACPI_FAILURE(status)) {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700352 return (status);
353 }
354 }
355
356 return (AE_OK);
357}
358
Linus Torvalds1da177e2005-04-16 15:20:36 -0700359/******************************************************************************
360 *
361 * FUNCTION: acpi_hw_enable_wakeup_gpe_block
362 *
363 * PARAMETERS: gpe_xrupt_info - GPE Interrupt info
364 * gpe_block - Gpe Block info
365 *
366 * RETURN: Status
367 *
Robert Moore44f6c012005-04-18 22:49:35 -0400368 * DESCRIPTION: Enable all "wake" GPEs within a single GPE block. Includes
369 * combination wake/run GPEs.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700370 *
371 ******************************************************************************/
372
Robert Moore44f6c012005-04-18 22:49:35 -0400373static acpi_status
Len Brown4be44fc2005-08-05 00:44:28 -0400374acpi_hw_enable_wakeup_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
Bob Mooree97d6bf2008-12-30 09:45:17 +0800375 struct acpi_gpe_block_info *gpe_block,
376 void *context)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700377{
Len Brown4be44fc2005-08-05 00:44:28 -0400378 u32 i;
379 acpi_status status;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700380
381 /* Examine each GPE Register within the block */
382
383 for (i = 0; i < gpe_block->register_count; i++) {
384 if (!gpe_block->register_info[i].enable_for_wake) {
385 continue;
386 }
387
388 /* Enable all "wake" GPEs in this register */
389
Bob Moorec6b57742009-06-24 09:44:06 +0800390 status =
391 acpi_hw_write(gpe_block->register_info[i].enable_for_wake,
392 &gpe_block->register_info[i].enable_address);
Len Brown4be44fc2005-08-05 00:44:28 -0400393 if (ACPI_FAILURE(status)) {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700394 return (status);
395 }
396 }
397
398 return (AE_OK);
399}
400
Linus Torvalds1da177e2005-04-16 15:20:36 -0700401/******************************************************************************
402 *
403 * FUNCTION: acpi_hw_disable_all_gpes
404 *
Robert Moore73459f72005-06-24 00:00:00 -0400405 * PARAMETERS: None
Linus Torvalds1da177e2005-04-16 15:20:36 -0700406 *
407 * RETURN: Status
408 *
Robert Moore44f6c012005-04-18 22:49:35 -0400409 * DESCRIPTION: Disable and clear all GPEs in all GPE blocks
Linus Torvalds1da177e2005-04-16 15:20:36 -0700410 *
411 ******************************************************************************/
412
Len Brown4be44fc2005-08-05 00:44:28 -0400413acpi_status acpi_hw_disable_all_gpes(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700414{
Len Brown4be44fc2005-08-05 00:44:28 -0400415 acpi_status status;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700416
Bob Mooreb229cf92006-04-21 17:15:00 -0400417 ACPI_FUNCTION_TRACE(hw_disable_all_gpes);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700418
Bob Mooree97d6bf2008-12-30 09:45:17 +0800419 status = acpi_ev_walk_gpe_list(acpi_hw_disable_gpe_block, NULL);
420 status = acpi_ev_walk_gpe_list(acpi_hw_clear_gpe_block, NULL);
Len Brown4be44fc2005-08-05 00:44:28 -0400421 return_ACPI_STATUS(status);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700422}
423
Linus Torvalds1da177e2005-04-16 15:20:36 -0700424/******************************************************************************
425 *
426 * FUNCTION: acpi_hw_enable_all_runtime_gpes
427 *
Robert Moore73459f72005-06-24 00:00:00 -0400428 * PARAMETERS: None
Linus Torvalds1da177e2005-04-16 15:20:36 -0700429 *
430 * RETURN: Status
431 *
Robert Moore44f6c012005-04-18 22:49:35 -0400432 * DESCRIPTION: Enable all "runtime" GPEs, in all GPE blocks
Linus Torvalds1da177e2005-04-16 15:20:36 -0700433 *
434 ******************************************************************************/
435
Len Brown4be44fc2005-08-05 00:44:28 -0400436acpi_status acpi_hw_enable_all_runtime_gpes(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700437{
Len Brown4be44fc2005-08-05 00:44:28 -0400438 acpi_status status;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700439
Bob Mooreb229cf92006-04-21 17:15:00 -0400440 ACPI_FUNCTION_TRACE(hw_enable_all_runtime_gpes);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700441
Bob Mooree97d6bf2008-12-30 09:45:17 +0800442 status = acpi_ev_walk_gpe_list(acpi_hw_enable_runtime_gpe_block, NULL);
Len Brown4be44fc2005-08-05 00:44:28 -0400443 return_ACPI_STATUS(status);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700444}
445
Linus Torvalds1da177e2005-04-16 15:20:36 -0700446/******************************************************************************
447 *
448 * FUNCTION: acpi_hw_enable_all_wakeup_gpes
449 *
Robert Moore73459f72005-06-24 00:00:00 -0400450 * PARAMETERS: None
Linus Torvalds1da177e2005-04-16 15:20:36 -0700451 *
452 * RETURN: Status
453 *
Robert Moore44f6c012005-04-18 22:49:35 -0400454 * DESCRIPTION: Enable all "wakeup" GPEs, in all GPE blocks
Linus Torvalds1da177e2005-04-16 15:20:36 -0700455 *
456 ******************************************************************************/
457
Len Brown4be44fc2005-08-05 00:44:28 -0400458acpi_status acpi_hw_enable_all_wakeup_gpes(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700459{
Len Brown4be44fc2005-08-05 00:44:28 -0400460 acpi_status status;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700461
Bob Mooreb229cf92006-04-21 17:15:00 -0400462 ACPI_FUNCTION_TRACE(hw_enable_all_wakeup_gpes);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700463
Bob Mooree97d6bf2008-12-30 09:45:17 +0800464 status = acpi_ev_walk_gpe_list(acpi_hw_enable_wakeup_gpe_block, NULL);
Len Brown4be44fc2005-08-05 00:44:28 -0400465 return_ACPI_STATUS(status);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700466}