diff options
| author | Bernard Xiong <[email protected]> | 2021-05-28 16:17:33 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-05-28 16:17:33 +0800 |
| commit | 844b4e024cef3f43deb8c060966bdb1d691ab8c5 (patch) | |
| tree | ce3596da838fe5266664b9988dbd431a98a930b3 /libcpu | |
| parent | 59bec273644d49f9da4c78ae9d0ccc1162e0088a (diff) | |
| parent | 3350b0ba4e091f21537c89ecc727a05d56d112be (diff) | |
Merge pull request #4725 from zhouji92/master
kconfig配置菜单整理
Diffstat (limited to 'libcpu')
| -rw-r--r-- | libcpu/Kconfig | 21 | ||||
| -rw-r--r-- | libcpu/arm/cortex-a/cpu.c | 17 |
2 files changed, 27 insertions, 11 deletions
diff --git a/libcpu/Kconfig b/libcpu/Kconfig index bb54b487c7..d0fa40d1bd 100644 --- a/libcpu/Kconfig +++ b/libcpu/Kconfig @@ -57,25 +57,24 @@ config ARCH_ARM_ARM11 config ARCH_ARM_CORTEX_A bool select ARCH_ARM + select RT_USING_CPU_FFS if ARCH_ARM_CORTEX_A config RT_SMP_AUTO_BOOT bool default n - choice - prompt "GIC controller selection" - default RT_USING_GIC_V2 - - config RT_USING_GIC_V2 - bool " Gic version 2 " + config RT_USING_GIC_V2 + bool + default n - config RT_USING_GIC_V3 - bool " Gic version 3 " + config RT_USING_GIC_V3 + bool + default n - config RT_NO_USING_GIC - bool " GIC controller is not used " - endchoice + config RT_NO_USING_GIC + bool + default y if !RT_USING_GIC_V2 && !RT_USING_GIC_V3 endif config ARCH_ARM_CORTEX_A5 diff --git a/libcpu/arm/cortex-a/cpu.c b/libcpu/arm/cortex-a/cpu.c index 7367bddd9f..c95c58a13c 100644 --- a/libcpu/arm/cortex-a/cpu.c +++ b/libcpu/arm/cortex-a/cpu.c @@ -75,4 +75,21 @@ RT_WEAK void rt_hw_cpu_shutdown() } } +#ifdef RT_USING_CPU_FFS +/** + * This function finds the first bit set (beginning with the least significant bit) + * in value and return the index of that bit. + * + * Bits are numbered starting at 1 (the least significant bit). A return value of + * zero from any of these functions means that the argument was zero. + * + * @return return the index of the first bit set. If value is 0, then this function + * shall return 0. + */ +int __rt_ffs(int value) +{ + return __builtin_ffs(value); +} +#endif + /*@}*/ |
