Skip to content

Commit 2608699

Browse files
authored
Merge pull request #5344 from Guozhanxin/v4.0.x
[bsp][qemu-vexpress-gemini] fix build error.
2 parents 77bcf46 + dc9e8df commit 2608699

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

bsp/qemu-vexpress-gemini/.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ CONFIG_RT_VER_NUM=0x40004
8181
CONFIG_ARCH_ARM=y
8282
CONFIG_RT_USING_CPU_FFS=y
8383
CONFIG_ARCH_ARM_CORTEX_A=y
84-
CONFIG_RT_NO_USING_GIC=y
84+
CONFIG_RT_USING_GIC_V2=y
8585
CONFIG_ARCH_ARM_CORTEX_A9=y
8686

8787
#

bsp/qemu-vexpress-gemini/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ config SOC_VEXPRESS_GEMINI
2323
select ARCH_ARM_CORTEX_A9
2424
select RT_USING_COMPONENTS_INIT
2525
# select RT_USING_USER_MAIN
26+
select RT_USING_GIC_V2
2627
default y
2728

2829
source "$BSP_DIR/drivers/Kconfig"

bsp/qemu-vexpress-gemini/cpu/cpu.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,21 @@ void rt_hw_cpu_shutdown()
3030
}
3131
}
3232

33+
#ifdef RT_USING_CPU_FFS
34+
/**
35+
* This function finds the first bit set (beginning with the least significant bit)
36+
* in value and return the index of that bit.
37+
*
38+
* Bits are numbered starting at 1 (the least significant bit). A return value of
39+
* zero from any of these functions means that the argument was zero.
40+
*
41+
* @return return the index of the first bit set. If value is 0, then this function
42+
* shall return 0.
43+
*/
44+
int __rt_ffs(int value)
45+
{
46+
return __builtin_ffs(value);
47+
}
48+
#endif
49+
3350
/*@}*/

bsp/qemu-vexpress-gemini/rtconfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
#define ARCH_ARM
5252
#define RT_USING_CPU_FFS
5353
#define ARCH_ARM_CORTEX_A
54-
#define RT_NO_USING_GIC
54+
#define RT_USING_GIC_V2
5555
#define ARCH_ARM_CORTEX_A9
5656

5757
/* RT-Thread Components */

0 commit comments

Comments
 (0)