ARC updates
cover ARC updates
Hi,
PFA assorted ARC changes. Main being a hw config for -mcpu=hs4x which schedules code for HS48x dual issue pipeline.
Thx,
-Vineet
Vineet Gupta (4):
ARC: Add support for generic HS48 processor configs/snps_archs38_hsdk_defconfig: refresh defconfig configs/snps_archs38_hsdk_defconfig: switch to glibc hard-float configs/snps_archs38_hsdk_defconfig: update for better out-of-box
experience
arch/Config.in.arc | 16 +++++++++---- configs/snps_archs38_hsdk_defconfig | 36 +++++++++++++++-------------- 2 files changed, 30 insertions(+), 22 deletions(-)
Signature · 1 line
2.25.1
PATCH 1/4 ARC: Add support for generic HS48 processor
For the HS48 processor, BR currently builds with -mcpu=hs4x_rel31 which generates suboptimal code as it inhibits delay slot and back-back ST and so on.
Enable a new variant to build with -mcpu=hs4x for normal codegen.
--- arch/Config.in.arc | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
arch/Config.in.arc +11 -5
@@ -39,9 +39,14 @@ config BR2_archs38_full config BR2_archs4x_rel31 bool "ARC HS48 rel 31" + help + Build for HS48 release 3.1 + +config BR2_archs4x + bool "ARC HS48" help Latest release of HS48 processor - - Dual- and quad multiply and MC oprations + - Dual and Quad multiply and MAC operations - Double-precision FPU endchoice
@@ -49,7 +54,7 @@ endchoice # Choice of atomic instructions presence config BR2_ARC_ATOMIC_EXT bool "Atomic extension (LLOCK/SCOND instructions)" - default y if BR2_arc770d || BR2_archs38 || BR2_archs38_64mpy || BR2_archs38_full || BR2_archs4x_rel31 + default y if BR2_arc770d || BR2_archs38 || BR2_archs38_64mpy || BR2_archs38_full || BR2_archs4x_rel31 || BR2_archs4x config BR2_ARCH default "arc" if BR2_arcle
@@ -70,10 +75,11 @@ config BR2_GCC_TARGET_CPU default "hs38" if BR2_archs38_64mpy default "hs38_linux" if BR2_archs38_full default "hs4x_rel31" if BR2_archs4x_rel31 + default "hs4x" if BR2_archs4x config BR2_READELF_ARCH_NAME default "ARCompact" if BR2_arc750d || BR2_arc770d - default "ARCv2" if BR2_archs38 || BR2_archs38_64mpy || BR2_archs38_full || BR2_archs4x_rel31 + default "ARCv2" if BR2_archs38 || BR2_archs38_64mpy || BR2_archs38_full || BR2_archs4x_rel31 || BR2_archs4x choice prompt "MMU Page Size"
@@ -93,7 +99,7 @@ choice config BR2_ARC_PAGE_SIZE_4K bool "4KB" - depends on BR2_arc770d || BR2_archs38 || BR2_archs38_64mpy || BR2_archs38_full || BR2_archs4x_rel31 + depends on BR2_arc770d || BR2_archs38 || BR2_archs38_64mpy || BR2_archs38_full || BR2_archs4x_rel31 || BR2_archs4x config BR2_ARC_PAGE_SIZE_8K bool "8KB"
@@ -103,7 +109,7 @@ config BR2_ARC_PAGE_SIZE_8K config BR2_ARC_PAGE_SIZE_16K bool "16KB" - depends on BR2_arc770d || BR2_archs38 || BR2_archs38_64mpy || BR2_archs38_full || BR2_archs4x_rel31 + depends on BR2_arc770d || BR2_archs38 || BR2_archs38_64mpy || BR2_archs38_full || BR2_archs4x_rel31 || BR2_archs4x endchoice
Signature · 1 line
2.25.1
PATCH 1/4 ARC: Add support for generic HS48 processor
Vineet, All,
On 2021-01-15 12:03 -0800, Vineet Gupta spake thusly:
Quoted 31 lines
For the HS48 processor, BR currently builds with -mcpu=hs4x_rel31 which generates suboptimal code as it inhibits delay slot and back-back ST and so on.
Enable a new variant to build with -mcpu=hs4x for normal codegen.
Signed-off-by Vineet Gupta <[email protected]>--- arch/Config.in.arc | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)arch/Config.in.arc +6
-1@@ -39,9 +39,14 @@ config BR2_archs38_full config BR2_archs4x_rel31 bool "ARC HS48 rel 31" + help + Build for HS48 release 3.1 + +config BR2_archs4x + bool "ARC HS48" help Latest release of HS48 processor - - Dual- and quad multiply and MC oprations + - Dual and Quad multiply and MAC operations - Double-precision FPU endchoice
arch/Config.in.arc endchoice · line 57
Quoted 5 lines
arch/Config.in.arc +1
-1@@ -49,7 +54,7 @@ endchoice # Choice of atomic instructions presence config BR2_ARC_ATOMIC_EXT bool "Atomic extension (LLOCK/SCOND instructions)" - default y if BR2_arc770d || BR2_archs38 || BR2_archs38_64mpy || BR2_archs38_full || BR2_archs4x_rel31 + default y if BR2_arc770d || BR2_archs38 || BR2_archs38_64mpy || BR2_archs38_full || BR2_archs4x_rel31 || BR2_archs4x
Those started to be rather long lines, so I split them.
arch/Config.in.arc config BR2_GCC_TARGET_CPU · line 82
Quoted 12 lines
arch/Config.in.arc +2
-1config BR2_ARCH default "arc" if BR2_arcle@@ -70,10 +75,11 @@ config BR2_GCC_TARGET_CPU default "hs38" if BR2_archs38_64mpy default "hs38_linux" if BR2_archs38_full default "hs4x_rel31" if BR2_archs4x_rel31 + default "hs4x" if BR2_archs4x config BR2_READELF_ARCH_NAME default "ARCompact" if BR2_arc750d || BR2_arc770d - default "ARCv2" if BR2_archs38 || BR2_archs38_64mpy || BR2_archs38_full || BR2_archs4x_rel31 + default "ARCv2" if BR2_archs38 || BR2_archs38_64mpy || BR2_archs38_full || BR2_archs4x_rel31 || BR2_archs4x
Ditto.
arch/Config.in.arc choice · line 102
Quoted 8 lines
arch/Config.in.arc +1
-1choice prompt "MMU Page Size"@@ -93,7 +99,7 @@ choice config BR2_ARC_PAGE_SIZE_4K bool "4KB" - depends on BR2_arc770d || BR2_archs38 || BR2_archs38_64mpy || BR2_archs38_full || BR2_archs4x_rel31 + depends on BR2_arc770d || BR2_archs38 || BR2_archs38_64mpy || BR2_archs38_full || BR2_archs4x_rel31 || BR2_archs4x
In fact, the only variant that does not have 4K pages is 750d, so I inverted the logic to:
depends on !BR2_arc750d
So the lines are not too long anymore.
If the situation becones more complex than that, then we could introduce intermediate symbols, like;
config BR2_ARC_HAS_4K_PAGES
bool
which could then be selected by the variants that do have it, e.g.:
config BR2_archs4x
bool "ARC HS48"
select BR2_ARC_HAS_4K_PAGESand then the 4K choice would depend on it;
config BR2_ARC_PAGE_SIZE_4K
bool "4KB"
depends on BR2_ARC_HAS_4K_PAGES
I was about to do that, but if 750d is definitely the only variant to not support those 4K or 16K pages, this would be overkill...
arch/Config.in.arc config BR2_ARC_PAGE_SIZE_8K · line 112
Quoted 8 lines
arch/Config.in.arc +1
-1config BR2_ARC_PAGE_SIZE_8K bool "8KB"@@ -103,7 +109,7 @@ config BR2_ARC_PAGE_SIZE_8K config BR2_ARC_PAGE_SIZE_16K bool "16KB" - depends on BR2_arc770d || BR2_archs38 || BR2_archs38_64mpy || BR2_archs38_full || BR2_archs4x_rel31 + depends on BR2_arc770d || BR2_archs38 || BR2_archs38_64mpy || BR2_archs38_full || BR2_archs4x_rel31 || BR2_archs4x
Ditto.
Regards,
Yann E. MORIN.
Quoted 9 lines
arch/Config.in.arc +0
-0endchoiceSignature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 2/4 configs/snps_archs38_hsdk_defconfig: refresh defconfig
In reply to Vineet GuptaNo config changes done
| make snps_archs38_hsdk_defconfig
| make savedefconfig
--- configs/snps_archs38_hsdk_defconfig | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-)
configs/snps_archs38_hsdk_defconfig +5 -17
@@ -1,33 +1,19 @@ -# Architecture BR2_arcle=y BR2_archs38_full=y - -# Linux headers same as kernel, a 5.6 series BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_6=y - -# System BR2_TARGET_GENERIC_HOSTNAME="hsdk" BR2_TARGET_GENERIC_ISSUE="Welcome to the HSDK Platform" BR2_SYSTEM_DHCP="eth0" - -# Kernel +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/synopsys/hsdk/genimage.cfg" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.6.3" BR2_LINUX_KERNEL_DEFCONFIG="hsdk" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/synopsys/hsdk/linux.fragment" - -# Filesystem / image BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y # BR2_TARGET_ROOTFS_TAR is not set -BR2_PACKAGE_HOST_DOSFSTOOLS=y -BR2_PACKAGE_HOST_GENIMAGE=y -BR2_PACKAGE_HOST_MTOOLS=y -BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" -BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/synopsys/hsdk/genimage.cfg" - -# Bootloader BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y BR2_TARGET_UBOOT_CUSTOM_VERSION=y
@@ -35,7 +21,9 @@ BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2018.05" BR2_TARGET_UBOOT_BOARD_DEFCONFIG="hsdk" BR2_TARGET_UBOOT_NEEDS_DTC=y BR2_TARGET_UBOOT_FORMAT_ELF=y -BR2_PACKAGE_HOST_UBOOT_TOOLS=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE=y BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SOURCE="board/synopsys/hsdk/uboot.env.txt" BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE_SIZE="0x4000"
Signature · 1 line
2.25.1
PATCH 3/4 configs/snps_archs38_hsdk_defconfig: switch to glibc hard-float
In reply to Vineet GuptaWe are no longer actively working on uClibc and hard-float support is pretty stable, so make that default for HSDK boards
The hard-float setting is a bit convulated since current ARC gcc lacks --with-fpu - so this is done with BR2_TARGET_OPTIMIZATION
--- configs/snps_archs38_hsdk_defconfig | 3 +++ 1 file changed, 3 insertions(+)
configs/snps_archs38_hsdk_defconfig +3 -0
@@ -1,6 +1,9 @@ BR2_arcle=y BR2_archs38_full=y +BR2_TOOLCHAIN_BUILDROOT_GLIBC=y BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_6=y +BR2_PACKAGE_GLIBC_UTILS=y +BR2_TARGET_OPTIMIZATION="-mfpu=fpud_all" BR2_TARGET_GENERIC_HOSTNAME="hsdk" BR2_TARGET_GENERIC_ISSUE="Welcome to the HSDK Platform" BR2_SYSTEM_DHCP="eth0"
Signature · 1 line
2.25.1
PATCH 3/4 configs/snps_archs38_hsdk_defconfig: switch to glibc hard-float
Vineet, All,
On 2021-01-15 12:03 -0800, Vineet Gupta spake thusly:
Quoted 7 lines
We are no longer actively working on uClibc and hard-float support is pretty stable, so make that default for HSDK boards
The hard-float setting is a bit convulated since current ARC gcc lacks --with-fpu - so this is done with
BR2_TARGET_OPTIMIZATIONSigned-off-by Vineet Gupta <[email protected]>
I split that patch in two:
- one commit to switch to glibc,
- one commit to enable hard-float
Since the hard-float, as you noticed, is using a non-conventional way to passit, so if it truns out to be causing issues, it is easier to revert if it is in a commit of its own.
Regards,
Yann E. MORIN.
Quoted 25 lines
--- configs/snps_archs38_hsdk_defconfig | 3 +++ 1 file changed, 3 insertions(+)configs/snps_archs38_hsdk_defconfig +3
-0@@ -1,6 +1,9 @@ BR2_arcle=y BR2_archs38_full=y +BR2_TOOLCHAIN_BUILDROOT_GLIBC=y BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_6=y +BR2_PACKAGE_GLIBC_UTILS=y +BR2_TARGET_OPTIMIZATION="-mfpu=fpud_all" BR2_TARGET_GENERIC_HOSTNAME="hsdk" BR2_TARGET_GENERIC_ISSUE="Welcome to the HSDK Platform" BR2_SYSTEM_DHCP="eth0"Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 4/4 configs/snps_archs38_hsdk_defconfig: update for better out-of-box experience
In reply to Vineet Gupta - Enable C++ support
- Don't strip executables
- Add minimal debug symbols
- Enable strace and openssh
- Enable perf (and elfutils)
--- configs/snps_archs38_hsdk_defconfig | 11 +++++++++++ 1 file changed, 11 insertions(+)
configs/snps_archs38_hsdk_defconfig +11 -0
@@ -1,8 +1,12 @@ BR2_arcle=y BR2_archs38_full=y +BR2_ENABLE_DEBUG=y +BR2_DEBUG_1=y +# BR2_STRIP_strip is not set BR2_TOOLCHAIN_BUILDROOT_GLIBC=y BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_6=y BR2_PACKAGE_GLIBC_UTILS=y +BR2_TOOLCHAIN_BUILDROOT_CXX=y BR2_TARGET_OPTIMIZATION="-mfpu=fpud_all" BR2_TARGET_GENERIC_HOSTNAME="hsdk" BR2_TARGET_GENERIC_ISSUE="Welcome to the HSDK Platform"
@@ -14,8 +18,15 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.6.3" BR2_LINUX_KERNEL_DEFCONFIG="hsdk" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/synopsys/hsdk/linux.fragment" +BR2_PACKAGE_LINUX_TOOLS_PERF=y +BR2_PACKAGE_STRACE=y +BR2_PACKAGE_MAKE=y +BR2_PACKAGE_ELFUTILS=y +BR2_PACKAGE_ELFUTILS_PROGS=y +BR2_PACKAGE_OPENSSH=y BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="200M" # BR2_TARGET_ROOTFS_TAR is not set BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
Signature · 1 line
2.25.1
PATCH 4/4 configs/snps_archs38_hsdk_defconfig: update for better out-of-box experience
Vineet, All,
On 2021-01-15 12:03 -0800, Vineet Gupta spake thusly:
Quoted 5 lines
- Enable C++ support
- Don't strip executables
- Add minimal debug symbols
- Enable strace and openssh
- Enable perf (and elfutils)
Of all those, I only kept adding C++.
None of the other defconfigs enable debug, or disable stripping.
Also, we like our defconfigs to truly be minimal. We could however accept an additional defconfig with more packages, as a "demo" of sorts, though. But the selection of packages you added is not kind of "demoing" that specific board...
So, I just kept C++.
Thanks!
Regards,
Yann E. MORIN.
Quoted 45 lines
Signed-off-by Vineet Gupta <[email protected]>--- configs/snps_archs38_hsdk_defconfig | 11 +++++++++++ 1 file changed, 11 insertions(+)configs/snps_archs38_hsdk_defconfig +11
-0@@ -1,8 +1,12 @@ BR2_arcle=y BR2_archs38_full=y +BR2_ENABLE_DEBUG=y +BR2_DEBUG_1=y +# BR2_STRIP_strip is not set BR2_TOOLCHAIN_BUILDROOT_GLIBC=y BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_6=y BR2_PACKAGE_GLIBC_UTILS=y +BR2_TOOLCHAIN_BUILDROOT_CXX=y BR2_TARGET_OPTIMIZATION="-mfpu=fpud_all" BR2_TARGET_GENERIC_HOSTNAME="hsdk" BR2_TARGET_GENERIC_ISSUE="Welcome to the HSDK Platform"@@ -14,8 +18,15 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.6.3" BR2_LINUX_KERNEL_DEFCONFIG="hsdk" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/synopsys/hsdk/linux.fragment" +BR2_PACKAGE_LINUX_TOOLS_PERF=y +BR2_PACKAGE_STRACE=y +BR2_PACKAGE_MAKE=y +BR2_PACKAGE_ELFUTILS=y +BR2_PACKAGE_ELFUTILS_PROGS=y +BR2_PACKAGE_OPENSSH=y BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="200M" # BR2_TARGET_ROOTFS_TAR is not set BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=ySignature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
cover ARC updates
In reply to Vineet GuptaVineet, All,
On 2021-01-15 12:03 -0800, Vineet Gupta spake thusly:
Quoted 2 lines
PFA assorted ARC changes. Main being a hw config for -mcpu=hs4x which schedules code for HS48x dual issue pipeline.
Series applied to master, thanks!
I have however done a bit of changes, so I will reply individually to affected patches.
Regards,
Yann E. MORIN.
Quoted 21 lines
Thx,
-VineetVineet Gupta (4):
ARC: Add support for generic HS48 processor configs/snps_archs38_hsdk_defconfig: refresh defconfig configs/snps_archs38_hsdk_defconfig: switch to glibc hard-float configs/snps_archs38_hsdk_defconfig: update for better out-of-box
experiencearch/Config.in.arc | 16 +++++++++---- configs/snps_archs38_hsdk_defconfig | 36 +++++++++++++++-------------- 2 files changed, 30 insertions(+), 22 deletions(-)Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'