function declaration fix in acpi_cpu

Dmitry Komissaroff aunoor at gmail.com
Wed Dec 24 01:09:03 PST 2008


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;







More information about the Submit mailing list