From ed569f525d3d9fa5d675194f86142d0bd6d0eeda Mon Sep 17 00:00:00 2001 From: Chuck Jordan Date: Fri, 7 Oct 2016 10:29:11 -0700 Subject: [PATCH] arc: RGF_NUM_BANKS is another configurable option for ARCs In order to add the EM7D SOC, I will be implementing a version of the FIRQ interrupt handler that saves and restores registers on the stack when RGF_NUM_BANKS==1. All other ARC SOCs at this time have RGF_NUM_BANKS==2, allowing for a faster handler that can use the registers in the 2nd register bank. But EM7D doesn't have this 2nd bank, hence the need for this new configurable choice. (See ZEP-966) Change-Id: Ie089f1f079902552cf279c2cda23ee0805b01eed Signed-off-by: Chuck Jordan --- arch/arc/Kconfig | 14 ++++++++++++++ arch/arc/soc/em11d/Kconfig.defconfig | 3 +++ arch/arc/soc/em9d/Kconfig.defconfig | 3 +++ arch/arc/soc/quark_se_c1000_ss/Kconfig.defconfig | 3 +++ 4 files changed, 23 insertions(+) diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig index 78031439c23..1e4676aa0db 100644 --- a/arch/arc/Kconfig +++ b/arch/arc/Kconfig @@ -112,6 +112,20 @@ config NUM_IRQS The BSP must provide a valid default. This drives the size of the vector table. +config RGF_NUM_BANKS + int + prompt "Number of General Purpose Register Banks" + depends on CPU_ARCV2 + range 1 2 + default 2 + help + The ARC CPU can be configured to have more than one register + bank. If fast interrupts are supported (FIRQ), the 2nd + register bank, in the set, will be used by FIRQ interrupts. + If fast interrupts are supported but there is only 1 + register bank, the fast interrupt handler must save + and restore general purpose regsiters. + config FIRQ_STACK_SIZE int prompt "Size of stack for FIRQs (in bytes)" diff --git a/arch/arc/soc/em11d/Kconfig.defconfig b/arch/arc/soc/em11d/Kconfig.defconfig index 768a09769b8..6fb38296b49 100644 --- a/arch/arc/soc/em11d/Kconfig.defconfig +++ b/arch/arc/soc/em11d/Kconfig.defconfig @@ -36,6 +36,9 @@ config NUM_IRQS # must be > the highest interrupt number used default 36 +config RGF_NUM_BANKS + default 2 + config SYS_CLOCK_HW_CYCLES_PER_SEC default 20000000 diff --git a/arch/arc/soc/em9d/Kconfig.defconfig b/arch/arc/soc/em9d/Kconfig.defconfig index c3a12829ad2..1614deff447 100644 --- a/arch/arc/soc/em9d/Kconfig.defconfig +++ b/arch/arc/soc/em9d/Kconfig.defconfig @@ -36,6 +36,9 @@ config NUM_IRQS # must be > the highest interrupt number used default 36 +config RGF_NUM_BANKS + default 2 + config SYS_CLOCK_HW_CYCLES_PER_SEC default 20000000 diff --git a/arch/arc/soc/quark_se_c1000_ss/Kconfig.defconfig b/arch/arc/soc/quark_se_c1000_ss/Kconfig.defconfig index 3f3c21787d9..d5b82da2bc3 100644 --- a/arch/arc/soc/quark_se_c1000_ss/Kconfig.defconfig +++ b/arch/arc/soc/quark_se_c1000_ss/Kconfig.defconfig @@ -33,6 +33,9 @@ config NUM_IRQS # must be > the highest interrupt number used default 68 +config RGF_NUM_BANKS + default 2 + config SYS_CLOCK_HW_CYCLES_PER_SEC default 32000000