diff options
author | Jennifer Averett <jennifer.averett@oarcorp.com> | 2012-06-01 13:56:20 -0500 |
---|---|---|
committer | Jennifer Averett <jennifer.averett@oarcorp.com> | 2012-06-01 13:56:20 -0500 |
commit | 1e88db132190674e7bbb12f4b1874b33df4f5de7 (patch) | |
tree | 2f8960269c5c49ea60a6bb80714122266ef11080 | |
parent | Restored debug off state for uma_core.c (diff) | |
download | rtems-libbsd-1e88db132190674e7bbb12f4b1874b33df4f5de7.tar.bz2 |
Added initialization needed for Nics back in.
-rw-r--r-- | freebsd/kern/subr_pcpu.c | 8 | ||||
-rw-r--r-- | freebsd/net/netisr.c | 6 |
2 files changed, 8 insertions, 6 deletions
diff --git a/freebsd/kern/subr_pcpu.c b/freebsd/kern/subr_pcpu.c index b400562b..6e18094a 100644 --- a/freebsd/kern/subr_pcpu.c +++ b/freebsd/kern/subr_pcpu.c @@ -64,6 +64,10 @@ __FBSDID("$FreeBSD$"); #include <freebsd/sys/sx.h> #include <freebsd/ddb/ddb.h> +#ifdef __rtems__ +#include <freebsd/sys/kernel.h> +#endif + MALLOC_DEFINE(M_PCPU, "Per-cpu", "Per-cpu resource accouting."); struct dpcpu_free { @@ -79,7 +83,6 @@ uintptr_t dpcpu_off[MAXCPU]; struct pcpu *cpuid_to_pcpu[MAXCPU]; struct cpuhead cpuhead = SLIST_HEAD_INITIALIZER(cpuhead); -#ifndef __rtems__ /* * Initialize the MI portions of a struct pcpu. */ @@ -94,7 +97,9 @@ pcpu_init(struct pcpu *pcpu, int cpuid, size_t size) pcpu->pc_cpumask = 1 << cpuid; cpuid_to_pcpu[cpuid] = pcpu; SLIST_INSERT_HEAD(&cpuhead, pcpu, pc_allcpu); +#ifndef __rtems__ cpu_pcpu_init(pcpu, cpuid, size); +#endif pcpu->pc_rm_queue.rmq_next = &pcpu->pc_rm_queue; pcpu->pc_rm_queue.rmq_prev = &pcpu->pc_rm_queue; #ifdef KTR @@ -402,4 +407,3 @@ DB_SHOW_ALL_COMMAND(pcpu, db_show_cpu_all) } DB_SHOW_ALIAS(allpcpu, db_show_cpu_all); #endif -#endif /* __rtems__ */ diff --git a/freebsd/net/netisr.c b/freebsd/net/netisr.c index 6aced370..aea825f4 100644 --- a/freebsd/net/netisr.c +++ b/freebsd/net/netisr.c @@ -669,7 +669,6 @@ netisr_select_cpuid(struct netisr_proto *npp, uintptr_t source, } } -#ifndef __rtems__ /* * Process packets associated with a workstream and protocol. For reasons of * fairness, we process up to one complete netisr queue at a time, moving the @@ -780,7 +779,6 @@ out: netisr_pollmore(); #endif } -#endif /* __rtems__ */ static int netisr_queue_workstream(struct netisr_workstream *nwsp, u_int proto, @@ -1016,7 +1014,6 @@ netisr_dispatch(u_int proto, struct mbuf *m) return (netisr_dispatch_src(proto, 0, m)); } -#ifndef __rtems__ #ifdef DEVICE_POLLING /* * Kernel polling borrows a netisr thread to run interface polling in; this @@ -1051,12 +1048,14 @@ netisr_start_swi(u_int cpuid, struct pcpu *pc) if (error) panic("%s: swi_add %d", __func__, error); pc->pc_netisr = nwsp->nws_intr_event; +#ifndef __rtems__ if (netisr_bindthreads) { error = intr_event_bind(nwsp->nws_intr_event, cpuid); if (error != 0) printf("%s: cpu %u: intr_event_bind: %d", __func__, cpuid, error); } +#endif NETISR_WLOCK(); nws_array[nws_count] = nwsp->nws_cpu; nws_count++; @@ -1167,4 +1166,3 @@ DB_SHOW_COMMAND(netisr, db_show_netisr) } } #endif -#endif /* __rtems__ */ |