acpi_cpu.c (197105) | acpi_cpu.c (199016) |
---|---|
1/*- 2 * Copyright (c) 2003-2005 Nate Lawson (SDG) 3 * Copyright (c) 2001 Michael Smith 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2003-2005 Nate Lawson (SDG) 3 * Copyright (c) 2001 Michael Smith 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> |
29__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_cpu.c 197105 2009-09-11 22:49:34Z jkim $"); | 29__FBSDID("$FreeBSD: head/sys/dev/acpica/acpi_cpu.c 199016 2009-11-07 11:46:38Z avg $"); |
30 31#include "opt_acpi.h" 32#include <sys/param.h> 33#include <sys/bus.h> 34#include <sys/cpu.h> 35#include <sys/kernel.h> 36#include <sys/malloc.h> 37#include <sys/module.h> --- 212 unchanged lines hidden (view full) --- 250 * Check if we already probed this processor. We scan the bus twice 251 * so it's possible we've already seen this one. 252 */ 253 if (cpu_softc[cpu_id] != NULL) 254 return (ENXIO); 255 256 /* Mark this processor as in-use and save our derived id for attach. */ 257 cpu_softc[cpu_id] = (void *)1; | 30 31#include "opt_acpi.h" 32#include <sys/param.h> 33#include <sys/bus.h> 34#include <sys/cpu.h> 35#include <sys/kernel.h> 36#include <sys/malloc.h> 37#include <sys/module.h> --- 212 unchanged lines hidden (view full) --- 250 * Check if we already probed this processor. We scan the bus twice 251 * so it's possible we've already seen this one. 252 */ 253 if (cpu_softc[cpu_id] != NULL) 254 return (ENXIO); 255 256 /* Mark this processor as in-use and save our derived id for attach. */ 257 cpu_softc[cpu_id] = (void *)1; |
258 acpi_set_magic(dev, cpu_id); | 258 acpi_set_private(dev, (void*)(intptr_t)cpu_id); |
259 device_set_desc(dev, "ACPI CPU"); 260 261 return (0); 262} 263 264static int 265acpi_cpu_attach(device_t dev) 266{ --- 14 unchanged lines hidden (view full) --- 281 0xBE, 0x47, 0x9E, 0xBD, 0xD8, 0x70, 282 0x58, 0x71, 0x39, 0x53 }; 283 284 ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); 285 286 sc = device_get_softc(dev); 287 sc->cpu_dev = dev; 288 sc->cpu_handle = acpi_get_handle(dev); | 259 device_set_desc(dev, "ACPI CPU"); 260 261 return (0); 262} 263 264static int 265acpi_cpu_attach(device_t dev) 266{ --- 14 unchanged lines hidden (view full) --- 281 0xBE, 0x47, 0x9E, 0xBD, 0xD8, 0x70, 282 0x58, 0x71, 0x39, 0x53 }; 283 284 ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); 285 286 sc = device_get_softc(dev); 287 sc->cpu_dev = dev; 288 sc->cpu_handle = acpi_get_handle(dev); |
289 cpu_id = acpi_get_magic(dev); | 289 cpu_id = (int)(intptr_t)acpi_get_private(dev); |
290 cpu_softc[cpu_id] = sc; 291 pcpu_data = pcpu_find(cpu_id); 292 pcpu_data->pc_device = dev; 293 sc->cpu_pcpu = pcpu_data; 294 cpu_smi_cmd = AcpiGbl_FADT.SmiCommand; 295 cpu_cst_cnt = AcpiGbl_FADT.CstControl; 296 297 buf.Pointer = NULL; --- 898 unchanged lines hidden --- | 290 cpu_softc[cpu_id] = sc; 291 pcpu_data = pcpu_find(cpu_id); 292 pcpu_data->pc_device = dev; 293 sc->cpu_pcpu = pcpu_data; 294 cpu_smi_cmd = AcpiGbl_FADT.SmiCommand; 295 cpu_cst_cnt = AcpiGbl_FADT.CstControl; 296 297 buf.Pointer = NULL; --- 898 unchanged lines hidden --- |