Date: Wed, 31 Oct 2018 09:25:17 +0000 (UTC) From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r339943 - head/sys/arm64/arm64 Message-ID: <201810310925.w9V9PHbp071792@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: andrew Date: Wed Oct 31 09:25:17 2018 New Revision: 339943 URL: https://svnweb.freebsd.org/changeset/base/339943 Log: Remove the unused arm64_cpu driver. This was previously used for CPU initilisation, however this hasn't been the case in a long time. Sponsored by: DARPA, AFRL Modified: head/sys/arm64/arm64/mp_machdep.c Modified: head/sys/arm64/arm64/mp_machdep.c ============================================================================== --- head/sys/arm64/arm64/mp_machdep.c Wed Oct 31 06:24:07 2018 (r339942) +++ head/sys/arm64/arm64/mp_machdep.c Wed Oct 31 09:25:17 2018 (r339943) @@ -126,8 +126,6 @@ static void ipi_stop(void *); struct mtx ap_boot_mtx; struct pcb stoppcbs[MAXCPU]; -static device_t cpu_list[MAXCPU]; - /* * Not all systems boot from the first CPU in the device tree. To work around * this we need to find which CPU we have booted from so when we later @@ -145,78 +143,6 @@ volatile int aps_ready = 0; /* Temporary variables for init_secondary() */ void *dpcpu[MAXCPU - 1]; - -static device_method_t arm64_cpu_methods[] = { - /* Device interface */ - DEVMETHOD(device_identify, arm64_cpu_identify), - DEVMETHOD(device_probe, arm64_cpu_probe), - DEVMETHOD(device_attach, arm64_cpu_attach), - - DEVMETHOD_END -}; - -static devclass_t arm64_cpu_devclass; -static driver_t arm64_cpu_driver = { - "arm64_cpu", - arm64_cpu_methods, - 0 -}; - -DRIVER_MODULE(arm64_cpu, cpu, arm64_cpu_driver, arm64_cpu_devclass, 0, 0); - -static void -arm64_cpu_identify(driver_t *driver, device_t parent) -{ - - if (device_find_child(parent, "arm64_cpu", -1) != NULL) - return; - if (BUS_ADD_CHILD(parent, 0, "arm64_cpu", -1) == NULL) - device_printf(parent, "add child failed\n"); -} - -static int -arm64_cpu_probe(device_t dev) -{ - u_int cpuid; - - cpuid = device_get_unit(dev); - if (cpuid >= MAXCPU || cpuid > mp_maxid) - return (EINVAL); - - device_quiet(dev); - return (0); -} - -static int -arm64_cpu_attach(device_t dev) -{ - const uint32_t *reg; - size_t reg_size; - u_int cpuid; - int i; - - cpuid = device_get_unit(dev); - - if (cpuid >= MAXCPU || cpuid > mp_maxid) - return (EINVAL); - KASSERT(cpu_list[cpuid] == NULL, ("Already have cpu %u", cpuid)); - - reg = cpu_get_cpuid(dev, ®_size); - if (reg == NULL) - return (EINVAL); - - if (bootverbose) { - device_printf(dev, "register <"); - for (i = 0; i < reg_size; i++) - printf("%s%x", (i == 0) ? "" : " ", reg[i]); - printf(">\n"); - } - - /* Set the device to start it later */ - cpu_list[cpuid] = dev; - - return (0); -} static void release_aps(void *dummy __unused)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810310925.w9V9PHbp071792>