Bug #1187

function declaration fix in acpi_cpu

Added by aunoor over 5 years ago. Updated over 5 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

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;

History

#1 Updated by swildner over 5 years ago

Sorry, 'dev' -> 'bus'

Sascha

#2 Updated by swildner over 5 years ago

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

Sascha

#3 Updated by swildner over 5 years ago

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

Also available in: Atom PDF