DragonFly submit List (threaded) for 2008-12
DragonFly BSD
DragonFly submit List (threaded) for 2008-12
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: function declaration fix in acpi_cpu


To: Dmitry Komissaroff <aunoor@xxxxxxxxx>
From: Sascha Wildner <saw@xxxxxxxxx>
Date: Wed, 24 Dec 2008 10:36:42 +0100

Dmitry Komissaroff schrieb:
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);

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


Sascha

--
http://yoyodyne.ath.cx



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]