diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-07-31 12:53:37 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-07-31 12:53:37 +0200 |
commit | 3fc15fde79178053a73ee07628d72a748cbd0411 (patch) | |
tree | 43d4c9716b2b30a31098d98f8a9ab93c9e189555 | |
parent | waf_generator.py: Move arch header includes (diff) | |
download | rtems-libbsd-3fc15fde79178053a73ee07628d72a748cbd0411.tar.bz2 |
i386/legacy.c: Disable per CPU stuff
-rw-r--r-- | freebsd/sys/i386/i386/legacy.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/freebsd/sys/i386/i386/legacy.c b/freebsd/sys/i386/i386/legacy.c index 3a2fab02..b3298d9a 100644 --- a/freebsd/sys/i386/i386/legacy.c +++ b/freebsd/sys/i386/i386/legacy.c @@ -260,7 +260,9 @@ static struct resource_list *cpu_get_rlist(device_t dev, device_t child); struct cpu_device { struct resource_list cd_rl; +#ifndef __rtems__ struct pcpu *cd_pcpu; +#endif /* __rtems__ */ }; static device_method_t cpu_methods[] = { @@ -320,18 +322,24 @@ cpu_add_child(device_t bus, u_int order, const char *name, int unit) { struct cpu_device *cd; device_t child; +#ifndef __rtems__ struct pcpu *pc; +#endif /* __rtems__ */ if ((cd = malloc(sizeof(*cd), M_DEVBUF, M_NOWAIT | M_ZERO)) == NULL) return (NULL); resource_list_init(&cd->cd_rl); +#ifndef __rtems__ pc = pcpu_find(device_get_unit(bus)); cd->cd_pcpu = pc; +#endif /* __rtems__ */ child = device_add_child_ordered(bus, order, name, unit); if (child != NULL) { +#ifndef __rtems__ pc->pc_device = child; +#endif /* __rtems__ */ device_set_ivars(child, cd); } else free(cd, M_DEVBUF); @@ -353,11 +361,11 @@ cpu_read_ivar(device_t dev, device_t child, int index, uintptr_t *result) struct cpu_device *cpdev; switch (index) { +#ifndef __rtems__ case CPU_IVAR_PCPU: cpdev = device_get_ivars(child); *result = (uintptr_t)cpdev->cd_pcpu; break; -#ifndef __rtems__ case CPU_IVAR_NOMINAL_MHZ: if (tsc_is_invariant) { *result = (uintptr_t)(atomic_load_acq_64(&tsc_freq) / |