Project

General

Profile

Actions

Bug #1187

closed

function declaration fix in acpi_cpu

Added by aunoor almost 13 years ago. Updated almost 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Hi.

Working on acpi I found, what declaration of acpi_cpu_add_child
function in acpi_cpu.c not correspond description of bus method and it
lead to kernel panic under some circumstances.

There a path, that fix that problem:

=== modified file 'dev/acpica5/acpi_cpu.c'
--- dev/acpica5/acpi_cpu.c 2008-12-15 12:57:21 0000
++ dev/acpica5/acpi_cpu.c 2008-12-24 08:48:23 0000
@ -148,8 +148,8 @
static int acpi_pcpu_get_id(uint32_t idx, uint32_t *acpi_id,
uint32_t *cpu_id);
static struct resource_list *acpi_cpu_get_rlist(device_t dev, device_t child);
static device_t acpi_cpu_add_child(device_t dev, int order, const char *name,
int unit);
+static device_t acpi_cpu_add_child(device_t bus, device_t parent, int order,
const char *name, int unit);
static int acpi_cpu_read_ivar(device_t dev, device_t child, int index,
uintptr_t *result);
static int acpi_cpu_shutdown(device_t dev);
@ -468,9 +468,9 @
return (NULL);
return (&ad->ad_rl);
}
-
-static device_t
-acpi_cpu_add_child(device_t dev, int order, const char *name, int unit)
static device_t
+acpi_cpu_add_child(device_t bus, device_t parent, int order,
const char *name, int unit); {
struct acpi_cpu_device *ad;
device_t child;

Actions #1

Updated by swildner almost 13 years ago

Sorry, 'dev' -> 'bus'

Sascha

Actions #2

Updated by swildner almost 13 years ago

I think you also want to rename device_add_child_ordered()'s arg from
'bus' to 'dev', right?

Sascha

Actions #3

Updated by swildner almost 13 years ago

Thanks, I've committed the corrected version you emailed me.

Actions

Also available in: Atom PDF