Added initialization needed for Nics back in.

This commit is contained in:
Jennifer Averett 2012-06-01 13:56:20 -05:00
parent 19955e7c29
commit 1e88db1321
2 changed files with 8 additions and 6 deletions

View File

@ -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__ */

View File

@ -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__ */