Hi, On 2015/08/24 18:24, Nick Hudson wrote: > On 08/24/15 09:36, Kengo NAKAHARA wrote: >> Hi, >> >> On 2015/08/24 16:18, Nick Hudson wrote: >> > >>>> +__weak_alias(interrupt_construct_intrids, eopnotsupp); >>> I found this by running sysctl -A on an evbarm platform > >> Sorry, some interrupt_* stub functions are incorrect. >> Could you try below patch? >> > ... > > It works, but I don't think enomem is the function name here. nullret?
As you indicated, I also think enomem() is not suitable for this function. It does not return ENOMEM different from enodev(), enxio(), enoioctl() and so on. The improved patch is here. ==================== diff --git a/sys/kern/kern_stub.c b/sys/kern/kern_stub.c index da6377f..9bd79a8 100644 --- a/sys/kern/kern_stub.c +++ b/sys/kern/kern_stub.c @@ -147,12 +147,12 @@ __weak_alias(userconf_prompt, voidop); __weak_alias(kobj_renamespace, nullop); -__weak_alias(interrupt_get_count, eopnotsupp); -__weak_alias(interrupt_get_assigned, eopnotsupp); -__weak_alias(interrupt_get_available, eopnotsupp); -__weak_alias(interrupt_get_devname, eopnotsupp); -__weak_alias(interrupt_construct_intrids, eopnotsupp); -__weak_alias(interrupt_destruct_intrids, eopnotsupp); +__weak_alias(interrupt_get_count, nullop); +__weak_alias(interrupt_get_assigned, voidop); +__weak_alias(interrupt_get_available, voidop); +__weak_alias(interrupt_get_devname, voidop); +__weak_alias(interrupt_construct_intrids, nullret); +__weak_alias(interrupt_destruct_intrids, voidop); __weak_alias(interrupt_distribute, eopnotsupp); __weak_alias(interrupt_distribute_handler, eopnotsupp); @@ -284,6 +284,16 @@ nullop(void *v) return (0); } +/* + * Generic null operation, always returns null. + */ +void * +nullret(void) +{ + + return (NULL); +} + bool default_bus_space_handle_is_equal(bus_space_tag_t t, bus_space_handle_t h1, bus_space_handle_t h2) diff --git a/sys/sys/systm.h b/sys/sys/systm.h index 1778af6..ac65c8b 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -164,6 +164,7 @@ extern void (*v_putc)(int); /* Virtual console putc routine */ */ void voidop(void); int nullop(void *); +void* nullret(void); int enodev(void); int enosys(void); int enoioctl(void); ==================== If there is no issue, should I commit above patch? Thanks, -- ////////////////////////////////////////////////////////////////////// Internet Initiative Japan Inc. Device Engineering Section, Core Product Development Department, Product Division, Technology Unit Kengo NAKAHARA <k-nakah...@iij.ad.jp>