1# Multilevel interrupt configuration 2 3# Copyright (c) 2017 Intel Corporation 4# Copyright (c) 2018 Foundries.io 5# SPDX-License-Identifier: Apache-2.0 6 7config MULTI_LEVEL_INTERRUPTS 8 bool "Multi-level interrupt support" 9 depends on GEN_SW_ISR_TABLE 10 help 11 Multiple levels of interrupts are normally used to increase the 12 number of addressable interrupts in a system. For example, if two 13 levels are used, a second level interrupt aggregator would combine 14 all interrupts routed to it into one IRQ line in the first level 15 interrupt controller. If three levels are used, a third level 16 aggregator combines its input interrupts into one IRQ line at the 17 second level. The number of interrupt levels is usually determined 18 by the hardware. (The term "aggregator" here means "interrupt 19 controller".) 20 21config MAX_IRQ_PER_AGGREGATOR 22 int "Max IRQs per interrupt aggregator" 23 default 0 24 depends on MULTI_LEVEL_INTERRUPTS 25 help 26 The maximum number of interrupt inputs to any aggregator in the 27 system. 28 29config 2ND_LEVEL_INTERRUPTS 30 bool "Second-level interrupt support" 31 depends on MULTI_LEVEL_INTERRUPTS 32 help 33 Second level interrupts are used to increase the number of 34 addressable interrupts in a system. 35 36config 2ND_LVL_ISR_TBL_OFFSET 37 int "Offset in _sw_isr_table for level 2 interrupts" 38 default 0 39 depends on 2ND_LEVEL_INTERRUPTS 40 help 41 This is the offset in _sw_isr_table, the generated ISR handler table, 42 where storage for 2nd level interrupt ISRs begins. This is 43 typically allocated after ISRs for level 1 interrupts. 44 45config NUM_2ND_LEVEL_AGGREGATORS 46 int "Total number of second level interrupt aggregators" 47 range 1 8 48 default 1 49 depends on 2ND_LEVEL_INTERRUPTS 50 help 51 The number of level 2 interrupt aggregators to support. Each 52 aggregator can manage at most MAX_IRQ_PER_AGGREGATOR level 2 53 interrupts. 54 55prev-level-num = 1 56cur-level-num = 2 57cur-level = 2ND 58aggregator = 0 59rsource "Kconfig.multilevel.aggregator_template" 60aggregator = 1 61rsource "Kconfig.multilevel.aggregator_template" 62aggregator = 2 63rsource "Kconfig.multilevel.aggregator_template" 64aggregator = 3 65rsource "Kconfig.multilevel.aggregator_template" 66aggregator = 4 67rsource "Kconfig.multilevel.aggregator_template" 68aggregator = 5 69rsource "Kconfig.multilevel.aggregator_template" 70aggregator = 6 71rsource "Kconfig.multilevel.aggregator_template" 72aggregator = 7 73rsource "Kconfig.multilevel.aggregator_template" 74 75config 3RD_LEVEL_INTERRUPTS 76 bool "Third-level interrupt support" 77 depends on 2ND_LEVEL_INTERRUPTS 78 help 79 Third level interrupts are used to increase the number of 80 addressable interrupts in a system. 81 82config NUM_3RD_LEVEL_AGGREGATORS 83 int "Total number of third level interrupt aggregators" 84 range 1 8 85 default 1 86 depends on 3RD_LEVEL_INTERRUPTS 87 help 88 The number of level 3 interrupt aggregators to support. Each 89 aggregator can manage at most MAX_IRQ_PER_AGGREGATOR level 3 90 interrupts. 91 92config 3RD_LVL_ISR_TBL_OFFSET 93 int "Offset in _sw_isr_table for level 3 interrupts" 94 default 0 95 depends on 3RD_LEVEL_INTERRUPTS 96 help 97 This is the offset in _sw_isr_table, the generated ISR handler table, 98 where storage for 3rd level interrupt ISRs begins. This is 99 typically allocated after ISRs for level 2 interrupts. 100 101prev-level-num = 2 102cur-level-num = 3 103cur-level = 3RD 104aggregator = 0 105rsource "Kconfig.multilevel.aggregator_template" 106aggregator = 1 107rsource "Kconfig.multilevel.aggregator_template" 108aggregator = 2 109rsource "Kconfig.multilevel.aggregator_template" 110aggregator = 3 111rsource "Kconfig.multilevel.aggregator_template" 112aggregator = 4 113rsource "Kconfig.multilevel.aggregator_template" 114aggregator = 5 115rsource "Kconfig.multilevel.aggregator_template" 116aggregator = 6 117rsource "Kconfig.multilevel.aggregator_template" 118aggregator = 7 119rsource "Kconfig.multilevel.aggregator_template" 120