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
This commit is contained in:
Andrew Turner 2018-10-31 09:25:17 +00:00
parent 2c288c95d9
commit 63bf2d735c

View File

@ -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
@ -146,78 +144,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, &reg_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)
{