Skip to content

Commit

Permalink
kern/intr: remove support for passing trap frame as argument
Browse files Browse the repository at this point in the history
While otherwise a handy potential approach, getting the trap frame via
the argument isn't documented and isn't supposed to be used.  With all
uses removed, now remove support to end the mixed calling conventions.

Differential Revision: https://reviews.freebsd.org/D37688

Reviewed by: imp, mhorne
Pull Request: freebsd/freebsd-src#1225
  • Loading branch information
ehem authored and bsdjhb committed Aug 26, 2024
2 parents 4f467cb + 38c3524 commit 90ec168
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions sys/kern/kern_intr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1363,8 +1363,8 @@ ithread_loop(void *arg)
*
* Input:
* o ie: the event connected to this interrupt.
* o frame: some archs (i.e. i386) pass a frame to some.
* handlers as their main argument.
* o frame: the current trap frame.
*
* Return value:
* o 0: everything ok.
* o EINVAL: stray interrupt.
Expand All @@ -1391,9 +1391,6 @@ intr_event_handle(struct intr_event *ie, struct trapframe *frame)

/*
* Execute fast interrupt handlers directly.
* To support clock handlers, if a handler registers
* with a NULL argument, then we pass it a pointer to
* a trapframe as its argument.
*/
td->td_intr_nesting_level++;
filter = false;
Expand Down Expand Up @@ -1422,12 +1419,8 @@ intr_event_handle(struct intr_event *ie, struct trapframe *frame)
continue;
}
CTR4(KTR_INTR, "%s: exec %p(%p) for %s", __func__,
ih->ih_filter, ih->ih_argument == NULL ? frame :
ih->ih_argument, ih->ih_name);
if (ih->ih_argument == NULL)
ret = ih->ih_filter(frame);
else
ret = ih->ih_filter(ih->ih_argument);
ih->ih_filter, ih->ih_argument, ih->ih_name);
ret = ih->ih_filter(ih->ih_argument);
#ifdef HWPMC_HOOKS
PMC_SOFT_CALL_TF( , , intr, all, frame);
#endif
Expand Down

0 comments on commit 90ec168

Please sign in to comment.