Back out mistaken local change that sneaked in on the last commit.

This commit is contained in:
Garrett Wollman 1996-08-12 20:03:16 +00:00
parent 0b5b0f16a9
commit 9f0a4b33d9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=17559
2 changed files with 80 additions and 0 deletions

View File

@ -185,10 +185,12 @@ vm_offset_t phys_avail[10];
#define PHYS_AVAIL_ARRAY_END ((sizeof(phys_avail) / sizeof(vm_offset_t)) - 2)
static void dumpsys __P((void));
static void setup_netisrs __P((struct linker_set *)); /* XXX declare elsewhere */
static vm_offset_t buffer_sva, buffer_eva;
vm_offset_t clean_sva, clean_eva;
static vm_offset_t pager_sva, pager_eva;
extern struct linker_set netisr_set;
#define offsetof(type, member) ((size_t)(&((type *)0)->member))
@ -249,6 +251,17 @@ cpu_startup(dummy)
}
}
/*
* Quickly wire in netisrs.
*/
setup_netisrs(&netisr_set);
/*
#ifdef ISDN
DONET(isdnintr, NETISR_ISDN);
#endif
*/
/*
* Allocate space for system data structures.
* The first available kernel virtual address is in "v".
@ -427,6 +440,33 @@ cpu_startup(dummy)
}
}
int
register_netisr(num, handler)
int num;
netisr_t *handler;
{
if (num < 0 || num >= (sizeof(netisrs)/sizeof(*netisrs)) ) {
printf("register_netisr: bad isr number: %d\n", num);
return (EINVAL);
}
netisrs[num] = handler;
return (0);
}
static void
setup_netisrs(ls)
struct linker_set *ls;
{
int i;
const struct netisrtab *nit;
for(i = 0; ls->ls_items[i]; i++) {
nit = (const struct netisrtab *)ls->ls_items[i];
register_netisr(nit->nit_num, nit->nit_isr);
}
}
/*
* Send an interrupt to process.
*

View File

@ -185,10 +185,12 @@ vm_offset_t phys_avail[10];
#define PHYS_AVAIL_ARRAY_END ((sizeof(phys_avail) / sizeof(vm_offset_t)) - 2)
static void dumpsys __P((void));
static void setup_netisrs __P((struct linker_set *)); /* XXX declare elsewhere */
static vm_offset_t buffer_sva, buffer_eva;
vm_offset_t clean_sva, clean_eva;
static vm_offset_t pager_sva, pager_eva;
extern struct linker_set netisr_set;
#define offsetof(type, member) ((size_t)(&((type *)0)->member))
@ -249,6 +251,17 @@ cpu_startup(dummy)
}
}
/*
* Quickly wire in netisrs.
*/
setup_netisrs(&netisr_set);
/*
#ifdef ISDN
DONET(isdnintr, NETISR_ISDN);
#endif
*/
/*
* Allocate space for system data structures.
* The first available kernel virtual address is in "v".
@ -427,6 +440,33 @@ cpu_startup(dummy)
}
}
int
register_netisr(num, handler)
int num;
netisr_t *handler;
{
if (num < 0 || num >= (sizeof(netisrs)/sizeof(*netisrs)) ) {
printf("register_netisr: bad isr number: %d\n", num);
return (EINVAL);
}
netisrs[num] = handler;
return (0);
}
static void
setup_netisrs(ls)
struct linker_set *ls;
{
int i;
const struct netisrtab *nit;
for(i = 0; ls->ls_items[i]; i++) {
nit = (const struct netisrtab *)ls->ls_items[i];
register_netisr(nit->nit_num, nit->nit_isr);
}
}
/*
* Send an interrupt to process.
*