Remove functions that just call another one.
Inline a function used at only one place.
This commit is contained in:
parent
c17413ff3e
commit
4de6ba366b
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hypervisor.h,v 1.11 2005/04/16 22:49:37 bouyer Exp $ */
|
||||
/* $NetBSD: hypervisor.h,v 1.12 2005/04/16 23:33:17 bouyer Exp $ */
|
||||
|
||||
/*
|
||||
*
|
||||
|
@ -87,16 +87,14 @@ struct intrframe;
|
|||
void do_hypervisor_callback(struct intrframe *regs);
|
||||
void hypervisor_notify_via_evtchn(unsigned int);
|
||||
void hypervisor_enable_event(unsigned int);
|
||||
void hypervisor_disable_event(unsigned int);
|
||||
void hypervisor_acknowledge_event(unsigned int);
|
||||
void hypervisor_enable_ipl(unsigned int);
|
||||
void hypervisor_set_ipending(int, int, int);
|
||||
|
||||
/* hypervisor_machdep.c */
|
||||
void hypervisor_unmask_event(unsigned int);
|
||||
void hypervisor_mask_event(unsigned int);
|
||||
void hypervisor_clear_event(unsigned int);
|
||||
void hypervisor_force_callback(void);
|
||||
void hypervisor_enable_ipl(unsigned int);
|
||||
void hypervisor_set_ipending(int, int, int);
|
||||
|
||||
/*
|
||||
* Assembler stubs for hyper-calls.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: evtchn.c,v 1.5 2005/04/16 22:49:38 bouyer Exp $ */
|
||||
/* $NetBSD: evtchn.c,v 1.6 2005/04/16 23:33:18 bouyer Exp $ */
|
||||
|
||||
/*
|
||||
*
|
||||
|
@ -34,7 +34,7 @@
|
|||
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: evtchn.c,v 1.5 2005/04/16 22:49:38 bouyer Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: evtchn.c,v 1.6 2005/04/16 23:33:18 bouyer Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
|
@ -77,7 +77,6 @@ static int pirq_to_evtch[NR_PIRQS];
|
|||
/* PIRQ needing notify */
|
||||
static u_int32_t pirq_needs_unmask_notify[NR_EVENT_CHANNELS / 32];
|
||||
int pirq_interrupt(void *);
|
||||
void pirq_notify(int);
|
||||
physdev_op_t physdev_op_notify = {
|
||||
.cmd = PHYSDEVOP_IRQ_UNMASK_NOTIFY,
|
||||
};
|
||||
|
@ -164,7 +163,8 @@ do_event(int evtch, struct intrframe *regs)
|
|||
#endif
|
||||
ci = &cpu_info_primary;
|
||||
|
||||
hypervisor_acknowledge_event(evtch);
|
||||
hypervisor_mask_event(evtch);
|
||||
hypervisor_clear_event(evtch);
|
||||
|
||||
/*
|
||||
* Shortcut for the debug handler, we want it to always run,
|
||||
|
@ -397,19 +397,6 @@ pirq_interrupt(void *arg)
|
|||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
pirq_notify(int evtch)
|
||||
{
|
||||
|
||||
if (pirq_needs_unmask_notify[evtch >> 5] & (1 << (evtch & 0x1f))) {
|
||||
#ifdef IRQ_DEBUG
|
||||
if (irq == IRQ_DEBUG)
|
||||
printf("pirq_notify(%d)\n", evtch);
|
||||
#endif
|
||||
(void)HYPERVISOR_physdev_op(&physdev_op_notify);
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* DOM0OPS */
|
||||
|
||||
int
|
||||
|
@ -541,30 +528,14 @@ hypervisor_enable_event(unsigned int evtch)
|
|||
|
||||
hypervisor_unmask_event(evtch);
|
||||
#ifdef DOM0OPS
|
||||
pirq_notify(evtch);
|
||||
if (pirq_needs_unmask_notify[evtch >> 5] & (1 << (evtch & 0x1f))) {
|
||||
#ifdef IRQ_DEBUG
|
||||
if (irq == IRQ_DEBUG)
|
||||
printf("pirq_notify(%d)\n", evtch);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
hypervisor_disable_event(unsigned int evtch)
|
||||
{
|
||||
#ifdef IRQ_DEBUG
|
||||
if (evtch == IRQ_DEBUG)
|
||||
printf("hypervisor_disable_evtch: evtch %d\n", evtch);
|
||||
#endif
|
||||
|
||||
hypervisor_mask_event(evtch);
|
||||
}
|
||||
|
||||
void
|
||||
hypervisor_acknowledge_event(unsigned int evtch)
|
||||
{
|
||||
#ifdef IRQ_DEBUG
|
||||
if (evtch == IRQ_DEBUG)
|
||||
printf("hypervisor_acknowledge_evtch: evtch %d\n", evtch);
|
||||
#endif
|
||||
hypervisor_mask_event(evtch);
|
||||
hypervisor_clear_event(evtch);
|
||||
(void)HYPERVISOR_physdev_op(&physdev_op_notify);
|
||||
}
|
||||
#endif /* DOM0OPS */
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: xbdback.c,v 1.8 2005/04/16 22:49:38 bouyer Exp $ */
|
||||
/* $NetBSD: xbdback.c,v 1.9 2005/04/16 23:33:18 bouyer Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2005 Manuel Bouyer.
|
||||
|
@ -283,7 +283,7 @@ xbdback_ctrlif_rx(ctrl_msg_t *msg, unsigned long id)
|
|||
req->status = BLKIF_BE_STATUS_INTERFACE_NOT_FOUND;
|
||||
goto end;
|
||||
}
|
||||
hypervisor_disable_event(xbdi->evtchn);
|
||||
hypervisor_mask_event(xbdi->evtchn);
|
||||
event_remove_handler(xbdi->evtchn, xbdback_evthandler, xbdi);
|
||||
ring_addr = (vaddr_t)xbdi->blk_ring;
|
||||
pmap_remove(pmap_kernel(), ring_addr, ring_addr + PAGE_SIZE);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: xennetback.c,v 1.7 2005/04/16 22:49:38 bouyer Exp $ */
|
||||
/* $NetBSD: xennetback.c,v 1.8 2005/04/16 23:33:18 bouyer Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2005 Manuel Bouyer.
|
||||
|
@ -374,7 +374,7 @@ fail_1:
|
|||
}
|
||||
xneti->status = DISCONNECTED;
|
||||
xneti->xni_if.if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
|
||||
hypervisor_disable_event(xneti->xni_evtchn);
|
||||
hypervisor_mask_event(xneti->xni_evtchn);
|
||||
event_remove_handler(xneti->xni_evtchn,
|
||||
xennetback_evthandler, xneti);
|
||||
ring_addr = (vaddr_t)xneti->xni_rxring;
|
||||
|
|
Loading…
Reference in New Issue