Skip to content

Commit 35fae10

Browse files
sardokjmberg-intel
authored andcommitted
um: Support SPARSE_IRQ
Motivation: IRQ KUnit tests are going to require CONFIG_SPARSE_IRQ [1] in order to: (a) reliably allocate additional (fake) IRQs and (b) ensure we can test managed affinity, which is only supported with SPARSE_IRQ. It seems that the only thing necessary for ARCH=um is to tell the genirq core to skip over our preallocated NR_IRQS. Tested with: $ ./tools/testing/kunit/kunit.py run [...] [13:55:58] Testing complete. Ran 676 tests: passed: 646, skipped: 30 [...] This compares with pre-patch results: Ran 672 tests: passed: 644, skipped: 28 i.e., we no longer skip tests that 'depend on SPARSE_IRQ', and existing tests all pass. [1] [PATCH v2 4/6] genirq/test: Depend on SPARSE_IRQ https://lore.kernel.org/all/CABVgOSngoD0fh1WEkUCEwSdk0Joypo3dA_Y_SjW+K=nVDnZs3Q@mail.gmail.com/ Signed-off-by: Sinan Nalkaya <sardok@gmail.com> [Brian: Adapted Sinan's patch; rewrote commit message] Signed-off-by: Brian Norris <briannorris@chromium.org> Tested-by: David Gow <davidgow@google.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent 76eeb9b commit 35fae10

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

arch/um/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ config UML
3838
select HAVE_ARCH_TRACEHOOK
3939
select HAVE_SYSCALL_TRACEPOINTS
4040
select THREAD_INFO_IN_TASK
41+
select SPARSE_IRQ
4142

4243
config MMU
4344
bool

arch/um/kernel/irq.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -691,6 +691,11 @@ void __init init_IRQ(void)
691691
os_setup_epoll();
692692
}
693693

694+
int __init arch_probe_nr_irqs(void)
695+
{
696+
return NR_IRQS;
697+
}
698+
694699
void sigchld_handler(int sig, struct siginfo *unused_si,
695700
struct uml_pt_regs *regs, void *mc)
696701
{

0 commit comments

Comments
 (0)