Hi, On 2015/08/24 16:18, Nick Hudson wrote: > On 08/17/15 07:16, Kengo NAKAHARA wrote: >> Module Name: src >> Committed By: knakahara >> Date: Mon Aug 17 06:16:03 UTC 2015 >> >> > > Hi, > > Unfortunately, the following doesn't work for platforms that don't define > interrupt_construct_intrids. Should a new stub that returns NULL be created? > Maybe RUN_ONCE is required here? > >> Index: src/sys/kern/subr_interrupt.c >> diff -u /dev/null src/sys/kern/subr_interrupt.c:1.1 >> --- /dev/null Mon Aug 17 06:16:03 2015 >> +++ src/sys/kern/subr_interrupt.c Mon Aug 17 06:16:03 2015 > ... > >> +/* >> + * Return the size of interrupts list data on success. >> + * Reterun 0 on failed. >> + */ >> +static size_t >> +interrupt_intrio_list_size(void) >> +{ > ... >> + /* il_line body */ >> + ii_handler = interrupt_construct_intrids(kcpuset_running); >> + if (ii_handler == NULL) >> + return 0; > > ... >> Index: src/sys/kern/kern_stub.c >> diff -u src/sys/kern/kern_stub.c:1.39 src/sys/kern/kern_stub.c:1.40 >> --- src/sys/kern/kern_stub.c:1.39 Mon Apr 27 06:42:53 2015 >> +++ src/sys/kern/kern_stub.c Mon Aug 17 06:16:03 2015 > ... >> +__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? ==================== diff --git a/sys/kern/kern_stub.c b/sys/kern/kern_stub.c index da6377f..f7f638c 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, enomem); +__weak_alias(interrupt_destruct_intrids, voidop); __weak_alias(interrupt_distribute, eopnotsupp); __weak_alias(interrupt_distribute_handler, eopnotsupp); @@ -267,6 +267,17 @@ eopnotsupp(void) } /* + * Return error for operation not supported + * on a specific allocate operation. + */ +void * +enomem(void) +{ + + return (NULL); +} + +/* * Generic null operation, void return value. */ void diff --git a/sys/sys/systm.h b/sys/sys/systm.h index 1778af6..d4b16ce 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -169,6 +169,7 @@ int enosys(void); int enoioctl(void); int enxio(void); int eopnotsupp(void); +void* enomem(void); enum hashtype { HASH_LIST, ==================== Thanks, -- ////////////////////////////////////////////////////////////////////// Internet Initiative Japan Inc. Device Engineering Section, Core Product Development Department, Product Division, Technology Unit Kengo NAKAHARA <k-nakah...@iij.ad.jp>