Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 19512
b: refs/heads/master
c: 876c184
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Rosner authored and Len Brown committed Jan 7, 2006
1 parent cc1c684 commit b5ff5cf
Show file tree
Hide file tree
Showing 168 changed files with 7,701 additions and 7,280 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d4ec6c7cc9a15a7a529719bc3b84f46812f9842e
refs/heads/master: 876c184b31dc73cc3f38c5b86dee55d091a56769
6 changes: 3 additions & 3 deletions trunk/arch/i386/kernel/acpi/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ int acpi_gsi_to_irq(u32 gsi, unsigned int *irq)
* success: return IRQ number (>=0)
* failure: return < 0
*/
int acpi_register_gsi(u32 gsi, int triggering, int polarity)
int acpi_register_gsi(u32 gsi, int edge_level, int active_high_low)
{
unsigned int irq;
unsigned int plat_gsi = gsi;
Expand All @@ -476,14 +476,14 @@ int acpi_register_gsi(u32 gsi, int triggering, int polarity)
if (acpi_irq_model == ACPI_IRQ_MODEL_PIC) {
extern void eisa_set_level_irq(unsigned int irq);

if (triggering == ACPI_LEVEL_SENSITIVE)
if (edge_level == ACPI_LEVEL_SENSITIVE)
eisa_set_level_irq(gsi);
}
#endif

#ifdef CONFIG_X86_IO_APIC
if (acpi_irq_model == ACPI_IRQ_MODEL_IOAPIC) {
plat_gsi = mp_register_gsi(gsi, triggering, polarity);
plat_gsi = mp_register_gsi(gsi, edge_level, active_high_low);
}
#endif
acpi_gsi_to_irq(plat_gsi, &irq);
Expand Down
8 changes: 4 additions & 4 deletions trunk/arch/i386/kernel/mpparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,7 @@ void __init mp_config_acpi_legacy_irqs (void)

#define MAX_GSI_NUM 4096

int mp_register_gsi (u32 gsi, int triggering, int polarity)
int mp_register_gsi (u32 gsi, int edge_level, int active_high_low)
{
int ioapic = -1;
int ioapic_pin = 0;
Expand Down Expand Up @@ -1129,7 +1129,7 @@ int mp_register_gsi (u32 gsi, int triggering, int polarity)

mp_ioapic_routing[ioapic].pin_programmed[idx] |= (1<<bit);

if (triggering == ACPI_LEVEL_SENSITIVE) {
if (edge_level) {
/*
* For PCI devices assign IRQs in order, avoiding gaps
* due to unused I/O APIC pins.
Expand All @@ -1151,8 +1151,8 @@ int mp_register_gsi (u32 gsi, int triggering, int polarity)
}

io_apic_set_pci_routing(ioapic, ioapic_pin, gsi,
triggering == ACPI_EDGE_SENSITIVE ? 0 : 1,
polarity == ACPI_ACTIVE_HIGH ? 0 : 1);
edge_level == ACPI_EDGE_SENSITIVE ? 0 : 1,
active_high_low == ACPI_ACTIVE_HIGH ? 0 : 1);
return gsi;
}

Expand Down
22 changes: 11 additions & 11 deletions trunk/arch/ia64/kernel/acpi-ext.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,33 +33,33 @@ acpi_vendor_resource_match(struct acpi_resource *resource, void *context)
struct acpi_vendor_info *info = (struct acpi_vendor_info *)context;
struct acpi_resource_vendor *vendor;
struct acpi_vendor_descriptor *descriptor;
u32 byte_length;
u32 length;

if (resource->type != ACPI_RESOURCE_TYPE_VENDOR)
if (resource->id != ACPI_RSTYPE_VENDOR)
return AE_OK;

vendor = (struct acpi_resource_vendor *)&resource->data;
descriptor = (struct acpi_vendor_descriptor *)vendor->byte_data;
if (vendor->byte_length <= sizeof(*info->descriptor) ||
descriptor = (struct acpi_vendor_descriptor *)vendor->reserved;
if (vendor->length <= sizeof(*info->descriptor) ||
descriptor->guid_id != info->descriptor->guid_id ||
efi_guidcmp(descriptor->guid, info->descriptor->guid))
return AE_OK;

byte_length = vendor->byte_length - sizeof(struct acpi_vendor_descriptor);
info->data = acpi_os_allocate(byte_length);
length = vendor->length - sizeof(struct acpi_vendor_descriptor);
info->data = acpi_os_allocate(length);
if (!info->data)
return AE_NO_MEMORY;

memcpy(info->data,
vendor->byte_data + sizeof(struct acpi_vendor_descriptor),
byte_length);
info->length = byte_length;
vendor->reserved + sizeof(struct acpi_vendor_descriptor),
length);
info->length = length;
return AE_CTRL_TERMINATE;
}

acpi_status
acpi_find_vendor_resource(acpi_handle obj, struct acpi_vendor_descriptor * id,
u8 ** data, u32 * byte_length)
u8 ** data, u32 * length)
{
struct acpi_vendor_info info;

Expand All @@ -72,7 +72,7 @@ acpi_find_vendor_resource(acpi_handle obj, struct acpi_vendor_descriptor * id,
return AE_NOT_FOUND;

*data = info.data;
*byte_length = info.length;
*length = info.length;
return AE_OK;
}

Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/ia64/kernel/acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -567,16 +567,16 @@ void __init acpi_numa_arch_fixup(void)
* success: return IRQ number (>=0)
* failure: return < 0
*/
int acpi_register_gsi(u32 gsi, int triggering, int polarity)
int acpi_register_gsi(u32 gsi, int edge_level, int active_high_low)
{
if (has_8259 && gsi < 16)
return isa_irq_to_vector(gsi);

return iosapic_register_intr(gsi,
(polarity ==
(active_high_low ==
ACPI_ACTIVE_HIGH) ? IOSAPIC_POL_HIGH :
IOSAPIC_POL_LOW,
(triggering ==
(edge_level ==
ACPI_EDGE_SENSITIVE) ? IOSAPIC_EDGE :
IOSAPIC_LEVEL);
}
Expand Down
10 changes: 5 additions & 5 deletions trunk/arch/ia64/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,12 @@ add_io_space (struct pci_root_info *info, struct acpi_resource_address64 *addr)
goto free_resource;
}

min = addr->minimum;
min = addr->min_address_range;
max = min + addr->address_length - 1;
if (addr->info.io.translation_type == ACPI_SPARSE_TRANSLATION)
if (addr->attribute.io.translation_attribute == ACPI_SPARSE_TRANSLATION)
sparse = 1;

space_nr = new_space(addr->translation_offset, sparse);
space_nr = new_space(addr->address_translation_offset, sparse);
if (space_nr == ~0)
goto free_name;

Expand Down Expand Up @@ -285,7 +285,7 @@ static __devinit acpi_status add_window(struct acpi_resource *res, void *data)
if (addr.resource_type == ACPI_MEMORY_RANGE) {
flags = IORESOURCE_MEM;
root = &iomem_resource;
offset = addr.translation_offset;
offset = addr.address_translation_offset;
} else if (addr.resource_type == ACPI_IO_RANGE) {
flags = IORESOURCE_IO;
root = &ioport_resource;
Expand All @@ -298,7 +298,7 @@ static __devinit acpi_status add_window(struct acpi_resource *res, void *data)
window = &info->controller->window[info->controller->windows++];
window->resource.name = info->name;
window->resource.flags = flags;
window->resource.start = addr.minimum + offset;
window->resource.start = addr.min_address_range + offset;
window->resource.end = window->resource.start + addr.address_length - 1;
window->resource.child = NULL;
window->offset = offset;
Expand Down
10 changes: 5 additions & 5 deletions trunk/arch/x86_64/kernel/io_apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1956,7 +1956,7 @@ int __init io_apic_get_redir_entries (int ioapic)
}


int io_apic_set_pci_routing (int ioapic, int pin, int irq, int triggering, int polarity)
int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int active_high_low)
{
struct IO_APIC_route_entry entry;
unsigned long flags;
Expand All @@ -1978,8 +1978,8 @@ int io_apic_set_pci_routing (int ioapic, int pin, int irq, int triggering, int p
entry.delivery_mode = INT_DELIVERY_MODE;
entry.dest_mode = INT_DEST_MODE;
entry.dest.logical.logical_dest = cpu_mask_to_apicid(TARGET_CPUS);
entry.trigger = triggering;
entry.polarity = polarity;
entry.trigger = edge_level;
entry.polarity = active_high_low;
entry.mask = 1; /* Disabled (masked) */

irq = gsi_irq_sharing(irq);
Expand All @@ -1994,9 +1994,9 @@ int io_apic_set_pci_routing (int ioapic, int pin, int irq, int triggering, int p
apic_printk(APIC_VERBOSE,KERN_DEBUG "IOAPIC[%d]: Set PCI routing entry (%d-%d -> 0x%x -> "
"IRQ %d Mode:%i Active:%i)\n", ioapic,
mp_ioapics[ioapic].mpc_apicid, pin, entry.vector, irq,
triggering, polarity);
edge_level, active_high_low);

ioapic_register_intr(irq, entry.vector, triggering);
ioapic_register_intr(irq, entry.vector, edge_level);

if (!ioapic && (irq < 16))
disable_8259A_irq(irq);
Expand Down
8 changes: 4 additions & 4 deletions trunk/arch/x86_64/kernel/mpparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@ void __init mp_config_acpi_legacy_irqs (void)

#define MAX_GSI_NUM 4096

int mp_register_gsi(u32 gsi, int triggering, int polarity)
int mp_register_gsi(u32 gsi, int edge_level, int active_high_low)
{
int ioapic = -1;
int ioapic_pin = 0;
Expand Down Expand Up @@ -964,7 +964,7 @@ int mp_register_gsi(u32 gsi, int triggering, int polarity)

mp_ioapic_routing[ioapic].pin_programmed[idx] |= (1<<bit);

if (triggering == ACPI_LEVEL_SENSITIVE) {
if (edge_level) {
/*
* For PCI devices assign IRQs in order, avoiding gaps
* due to unused I/O APIC pins.
Expand All @@ -986,8 +986,8 @@ int mp_register_gsi(u32 gsi, int triggering, int polarity)
}

io_apic_set_pci_routing(ioapic, ioapic_pin, gsi,
triggering == ACPI_EDGE_SENSITIVE ? 0 : 1,
polarity == ACPI_ACTIVE_HIGH ? 0 : 1);
edge_level == ACPI_EDGE_SENSITIVE ? 0 : 1,
active_high_low == ACPI_ACTIVE_HIGH ? 0 : 1);
return gsi;
}

Expand Down
17 changes: 9 additions & 8 deletions trunk/drivers/acpi/acpi_memhotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ static struct acpi_driver acpi_memory_device_driver = {
struct acpi_memory_device {
acpi_handle handle;
unsigned int state; /* State of the memory device */
unsigned short caching; /* memory cache attribute */
unsigned short write_protect; /* memory read/write attribute */
unsigned short cache_attribute; /* memory cache attribute */
unsigned short read_write_attribute; /* memory read/write attribute */
u64 start_addr; /* Memory Range start physical addr */
u64 end_addr; /* Memory Range end physical addr */
};
Expand All @@ -97,12 +97,12 @@ acpi_memory_get_device_resources(struct acpi_memory_device *mem_device)
if (ACPI_SUCCESS(status)) {
if (address64.resource_type == ACPI_MEMORY_RANGE) {
/* Populate the structure */
mem_device->caching =
address64.info.mem.caching;
mem_device->write_protect =
address64.info.mem.write_protect;
mem_device->start_addr = address64.minimum;
mem_device->end_addr = address64.maximum;
mem_device->cache_attribute =
address64.attribute.memory.cache_attribute;
mem_device->read_write_attribute =
address64.attribute.memory.read_write_attribute;
mem_device->start_addr = address64.min_address_range;
mem_device->end_addr = address64.max_address_range;
}
}

Expand Down Expand Up @@ -250,6 +250,7 @@ static int acpi_memory_disable_device(struct acpi_memory_device *mem_device)
int result;
u64 start = mem_device->start_addr;
u64 len = mem_device->end_addr - start + 1;
unsigned long attr = mem_device->read_write_attribute;

ACPI_FUNCTION_TRACE("acpi_memory_disable_device");

Expand Down
9 changes: 5 additions & 4 deletions trunk/drivers/acpi/dispatcher/dsfield.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*****************************************************************************/

/*
* Copyright (C) 2000 - 2006, R. Byron Moore
* Copyright (C) 2000 - 2005, R. Byron Moore
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -293,7 +293,7 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info,
+ (acpi_integer) arg->common.value.size;

if (position > ACPI_UINT32_MAX) {
ACPI_REPORT_ERROR(("Field [%4.4s] bit offset too large (> 0xFFFFFFFF)\n", ACPI_CAST_PTR(char, &info->field_node->name)));
ACPI_REPORT_ERROR(("Field [%4.4s] bit offset too large (> 0xFFFFFFFF)\n", (char *)&info->field_node->name));
return_ACPI_STATUS(AE_SUPPORT);
}

Expand All @@ -302,8 +302,9 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info,

default:

ACPI_REPORT_ERROR(("Invalid opcode in field list: %X\n",
arg->common.aml_opcode));
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"Invalid opcode in field list: %X\n",
arg->common.aml_opcode));
return_ACPI_STATUS(AE_AML_BAD_OPCODE);
}

Expand Down
45 changes: 23 additions & 22 deletions trunk/drivers/acpi/dispatcher/dsinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*****************************************************************************/

/*
* Copyright (C) 2000 - 2006, R. Byron Moore
* Copyright (C) 2000 - 2005, R. Byron Moore
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -84,7 +84,7 @@ acpi_ds_init_one_object(acpi_handle obj_handle,
acpi_object_type type;
acpi_status status;

ACPI_FUNCTION_ENTRY();
ACPI_FUNCTION_NAME("ds_init_one_object");

/*
* We are only interested in NS nodes owned by the table that
Expand All @@ -105,14 +105,26 @@ acpi_ds_init_one_object(acpi_handle obj_handle,

status = acpi_ds_initialize_region(obj_handle);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("Region %p [%4.4s] - Init failure, %s\n", obj_handle, acpi_ut_get_node_name(obj_handle), acpi_format_exception(status)));
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"Region %p [%4.4s] - Init failure, %s\n",
obj_handle,
acpi_ut_get_node_name(obj_handle),
acpi_format_exception(status)));
}

info->op_region_count++;
break;

case ACPI_TYPE_METHOD:

/*
* Print a dot for each method unless we are going to print
* the entire pathname
*/
if (!(acpi_dbg_level & ACPI_LV_INIT_NAMES)) {
ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, "."));
}

/*
* Set the execution data width (32 or 64) based upon the
* revision number of the parent ACPI table.
Expand All @@ -122,33 +134,22 @@ acpi_ds_init_one_object(acpi_handle obj_handle,
if (info->table_desc->pointer->revision == 1) {
node->flags |= ANOBJ_DATA_WIDTH_32;
}
#ifdef ACPI_INIT_PARSE_METHODS
/*
* Note 11/2005: Removed this code to parse all methods during table
* load because it causes problems if there are any errors during the
* parse. Also, it seems like overkill and we probably don't want to
* abort a table load because of an issue with a single method.
*/

/*
* Print a dot for each method unless we are going to print
* the entire pathname
*/
if (!(acpi_dbg_level & ACPI_LV_INIT_NAMES)) {
ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, "."));
}

/*
* Always parse methods to detect errors, we will delete
* the parse tree below
*/
status = acpi_ds_parse_method(obj_handle);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("\n+Method %p [%4.4s] - parse failure, %s\n", obj_handle, acpi_ut_get_node_name(obj_handle), acpi_format_exception(status)));
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"\n+Method %p [%4.4s] - parse failure, %s\n",
obj_handle,
acpi_ut_get_node_name(obj_handle),
acpi_format_exception(status)));

/* This parse failed, but we will continue parsing more methods */
}
#endif

info->method_count++;
break;

Expand Down Expand Up @@ -206,8 +207,8 @@ acpi_ds_initialize_objects(struct acpi_table_desc * table_desc,
status = acpi_walk_namespace(ACPI_TYPE_ANY, start_node, ACPI_UINT32_MAX,
acpi_ds_init_one_object, &info, NULL);
if (ACPI_FAILURE(status)) {
ACPI_REPORT_ERROR(("walk_namespace failed, %s\n",
acpi_format_exception(status)));
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "walk_namespace failed, %s\n",
acpi_format_exception(status)));
}

ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT,
Expand Down
Loading

0 comments on commit b5ff5cf

Please sign in to comment.