diff options
Diffstat (limited to 'drivers/acpi/acpica/evgpeblk.c')
-rw-r--r-- | drivers/acpi/acpica/evgpeblk.c | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/drivers/acpi/acpica/evgpeblk.c b/drivers/acpi/acpica/evgpeblk.c index caaed3c673fd..d86699eea33c 100644 --- a/drivers/acpi/acpica/evgpeblk.c +++ b/drivers/acpi/acpica/evgpeblk.c | |||
@@ -252,21 +252,17 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block) | |||
252 | 252 | ||
253 | /* Init the register_info for this GPE register (8 GPEs) */ | 253 | /* Init the register_info for this GPE register (8 GPEs) */ |
254 | 254 | ||
255 | this_register->base_gpe_number = | 255 | this_register->base_gpe_number = (u16) |
256 | (u8) (gpe_block->block_base_number + | 256 | (gpe_block->block_base_number + |
257 | (i * ACPI_GPE_REGISTER_WIDTH)); | 257 | (i * ACPI_GPE_REGISTER_WIDTH)); |
258 | 258 | ||
259 | this_register->status_address.address = | 259 | this_register->status_address.address = gpe_block->address + i; |
260 | gpe_block->block_address.address + i; | ||
261 | 260 | ||
262 | this_register->enable_address.address = | 261 | this_register->enable_address.address = |
263 | gpe_block->block_address.address + i + | 262 | gpe_block->address + i + gpe_block->register_count; |
264 | gpe_block->register_count; | ||
265 | 263 | ||
266 | this_register->status_address.space_id = | 264 | this_register->status_address.space_id = gpe_block->space_id; |
267 | gpe_block->block_address.space_id; | 265 | this_register->enable_address.space_id = gpe_block->space_id; |
268 | this_register->enable_address.space_id = | ||
269 | gpe_block->block_address.space_id; | ||
270 | this_register->status_address.bit_width = | 266 | this_register->status_address.bit_width = |
271 | ACPI_GPE_REGISTER_WIDTH; | 267 | ACPI_GPE_REGISTER_WIDTH; |
272 | this_register->enable_address.bit_width = | 268 | this_register->enable_address.bit_width = |
@@ -334,9 +330,10 @@ error_exit: | |||
334 | 330 | ||
335 | acpi_status | 331 | acpi_status |
336 | acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device, | 332 | acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device, |
337 | struct acpi_generic_address *gpe_block_address, | 333 | u64 address, |
334 | u8 space_id, | ||
338 | u32 register_count, | 335 | u32 register_count, |
339 | u8 gpe_block_base_number, | 336 | u16 gpe_block_base_number, |
340 | u32 interrupt_number, | 337 | u32 interrupt_number, |
341 | struct acpi_gpe_block_info **return_gpe_block) | 338 | struct acpi_gpe_block_info **return_gpe_block) |
342 | { | 339 | { |
@@ -359,15 +356,14 @@ acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device, | |||
359 | 356 | ||
360 | /* Initialize the new GPE block */ | 357 | /* Initialize the new GPE block */ |
361 | 358 | ||
359 | gpe_block->address = address; | ||
360 | gpe_block->space_id = space_id; | ||
362 | gpe_block->node = gpe_device; | 361 | gpe_block->node = gpe_device; |
363 | gpe_block->gpe_count = (u16)(register_count * ACPI_GPE_REGISTER_WIDTH); | 362 | gpe_block->gpe_count = (u16)(register_count * ACPI_GPE_REGISTER_WIDTH); |
364 | gpe_block->initialized = FALSE; | 363 | gpe_block->initialized = FALSE; |
365 | gpe_block->register_count = register_count; | 364 | gpe_block->register_count = register_count; |
366 | gpe_block->block_base_number = gpe_block_base_number; | 365 | gpe_block->block_base_number = gpe_block_base_number; |
367 | 366 | ||
368 | ACPI_MEMCPY(&gpe_block->block_address, gpe_block_address, | ||
369 | sizeof(struct acpi_generic_address)); | ||
370 | |||
371 | /* | 367 | /* |
372 | * Create the register_info and event_info sub-structures | 368 | * Create the register_info and event_info sub-structures |
373 | * Note: disables and clears all GPEs in the block | 369 | * Note: disables and clears all GPEs in the block |
@@ -408,12 +404,14 @@ acpi_ev_create_gpe_block(struct acpi_namespace_node *gpe_device, | |||
408 | } | 404 | } |
409 | 405 | ||
410 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, | 406 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, |
411 | " Initialized GPE %02X to %02X [%4.4s] %u regs on interrupt 0x%X\n", | 407 | " Initialized GPE %02X to %02X [%4.4s] %u regs on interrupt 0x%X%s\n", |
412 | (u32)gpe_block->block_base_number, | 408 | (u32)gpe_block->block_base_number, |
413 | (u32)(gpe_block->block_base_number + | 409 | (u32)(gpe_block->block_base_number + |
414 | (gpe_block->gpe_count - 1)), | 410 | (gpe_block->gpe_count - 1)), |
415 | gpe_device->name.ascii, gpe_block->register_count, | 411 | gpe_device->name.ascii, gpe_block->register_count, |
416 | interrupt_number)); | 412 | interrupt_number, |
413 | interrupt_number == | ||
414 | acpi_gbl_FADT.sci_interrupt ? " (SCI)" : "")); | ||
417 | 415 | ||
418 | /* Update global count of currently available GPEs */ | 416 | /* Update global count of currently available GPEs */ |
419 | 417 | ||