Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RISCV] Bump hwprobe support to Linux 6.11 #108578

Merged
merged 1 commit into from
Oct 5, 2024
Merged

Conversation

dtcxzyw
Copy link
Member

@dtcxzyw dtcxzyw commented Sep 13, 2024

This patch is the follow-up of #94352 with some updates:

  1. Add support for more extensions for zve*, zimop, zc*, zcmop and zawrs.
  2. Use RISCV_HWPROBE_KEY_MISALIGNED_SCALAR_PERF to check whether the processor supports fast misaligned scalar memory access. [RISCV] Make Zicclsm imply unaligned scalar and vector access #108551 reminds me that the patch https://lore.kernel.org/all/[email protected]/T/ has been merged. Address comment [RISCV] Add support for getHostCPUFeatures using hwprobe #94352 (comment).

References:

  1. constants: https://github.com/torvalds/linux/blame/v6.11-rc7/arch/riscv/include/uapi/asm/hwprobe.h
  2. https://docs.kernel.org/arch/riscv/hwprobe.html
  3. Related commits:
    1. zve* support: torvalds/linux@de8f828
    2. zimop support: torvalds/linux@36f8960
    3. zc* support: torvalds/linux@0ad70db
    4. zcmop support: torvalds/linux@fc078ea
    5. zawrs support: torvalds/linux@244c18f
    6. scalar misaligned perf: torvalds/linux@c42e2f0 and torvalds/linux@1f52888

@dtcxzyw
Copy link
Member Author

dtcxzyw commented Sep 13, 2024

cc @cyyself

Copy link
Collaborator

@preames preames left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - I've gone through and made sure all the constants match.

A quick note on structuring reviews like this in the future. The details for the individual commits are helpful, but the primary thing the reviewer needs is the state of the released tree. You did include that in the references, but it would have been better to include that in the original description, and move the individual commits down to an appendix like structure. I did loose some time figuring out whether the commits linked were actually released before I noticed the reference link at the bottom.

Copy link
Member

@kito-cheng kito-cheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :)

@dtcxzyw
Copy link
Member Author

dtcxzyw commented Sep 25, 2024

Rebased over 614aeda.

@preames
Copy link
Collaborator

preames commented Sep 27, 2024

Reverse ping, anything preventing this from landing?

@dtcxzyw
Copy link
Member Author

dtcxzyw commented Sep 27, 2024

Reverse ping, anything preventing this from landing?

Sorry, I don't have enough bandwidth to test this patch on my spacemit k1 board with Linux 6.11. Can someone test it for me? cc @cyyself @dramforever

@dtcxzyw dtcxzyw merged commit bf895c7 into llvm:main Oct 5, 2024
8 checks passed
@dtcxzyw dtcxzyw deleted the riscv-hwprobe-v2 branch October 5, 2024 03:00
@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 5, 2024

LLVM Buildbot has detected a new failure on builder lldb-arm-ubuntu running on linaro-lldb-arm-ubuntu while building llvm at step 6 "test".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/18/builds/4961

Here is the relevant piece of the build log for the reference
Step 6 (test) failure: build (failure)
...
PASS: lldb-api :: lang/cpp/const_static_integral_member/TestConstStaticIntegralMember.py (767 of 2809)
PASS: lldb-api :: lang/cpp/diamond/TestCppDiamond.py (768 of 2809)
PASS: lldb-api :: lang/cpp/elaborated-types/TestElaboratedTypes.py (769 of 2809)
PASS: lldb-api :: lang/cpp/dynamic-value/TestCppValueCast.py (770 of 2809)
PASS: lldb-api :: lang/cpp/enum_types/TestCPP11EnumTypes.py (771 of 2809)
PASS: lldb-api :: lang/cpp/exceptions/TestCPPExceptionBreakpoints.py (772 of 2809)
PASS: lldb-api :: lang/cpp/extern_c/TestExternCSymbols.py (773 of 2809)
PASS: lldb-api :: lang/cpp/dynamic-value/TestDynamicValue.py (774 of 2809)
PASS: lldb-api :: lang/cpp/fixits/TestCppFixIts.py (775 of 2809)
PASS: lldb-api :: lang/cpp/forward-declared-template-specialization/TestCppForwardDeclaredTemplateSpecialization.py (776 of 2809)
FAIL: lldb-api :: lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py (777 of 2809)
******************** TEST 'lldb-api :: lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py' FAILED ********************
Script:
--
/usr/bin/python3.10 /home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/lldb/test/API/dotest.py -u CXXFLAGS -u CFLAGS --env ARCHIVER=/usr/local/bin/llvm-ar --env OBJCOPY=/usr/bin/llvm-objcopy --env LLVM_LIBS_DIR=/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./lib --env LLVM_INCLUDE_DIR=/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/include --env LLVM_TOOLS_DIR=/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin --arch armv8l --build-dir /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex --lldb-module-cache-dir /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/module-cache-lldb/lldb-api --clang-module-cache-dir /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/module-cache-clang/lldb-api --executable /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin/lldb --compiler /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin/clang --dsymutil /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin/dsymutil --llvm-tools-dir /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin --lldb-obj-root /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/tools/lldb --lldb-libs-dir /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./lib /home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/lldb/test/API/lang/c/shared_lib_stripped_symbols -p TestSharedLibStrippedSymbols.py
--
Exit Code: 1

Command Output (stdout):
--
lldb version 20.0.0git (https://github.com/llvm/llvm-project.git revision bf895c714e1f8a51c1e565a75acf60bf7197be51)
  clang revision bf895c714e1f8a51c1e565a75acf60bf7197be51
  llvm revision bf895c714e1f8a51c1e565a75acf60bf7197be51
Skipping the following test categories: ['libc++', 'dsym', 'gmodules', 'debugserver', 'objc']

--
Command Output (stderr):
--
UNSUPPORTED: LLDB (/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/bin/clang-arm) :: test_expr_dsym (TestSharedLibStrippedSymbols.SharedLibStrippedTestCase) (test case does not fall in any category of interest for this run) 
FAIL: LLDB (/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/bin/clang-arm) :: test_expr_dwarf (TestSharedLibStrippedSymbols.SharedLibStrippedTestCase)
PASS: LLDB (/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/bin/clang-arm) :: test_expr_dwo (TestSharedLibStrippedSymbols.SharedLibStrippedTestCase)
UNSUPPORTED: LLDB (/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/bin/clang-arm) :: test_frame_variable_dsym (TestSharedLibStrippedSymbols.SharedLibStrippedTestCase) (test case does not fall in any category of interest for this run) 
XFAIL: LLDB (/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/bin/clang-arm) :: test_frame_variable_dwarf (TestSharedLibStrippedSymbols.SharedLibStrippedTestCase)
XFAIL: LLDB (/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/bin/clang-arm) :: test_frame_variable_dwo (TestSharedLibStrippedSymbols.SharedLibStrippedTestCase)
======================================================================
FAIL: test_expr_dwarf (TestSharedLibStrippedSymbols.SharedLibStrippedTestCase)
   Test that types work when defined in a shared library and forwa/d-declared in the main executable
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py", line 1769, in test_method
    return attrvalue(self)
  File "/home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/lldb/test/API/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py", line 24, in test_expr
    self.expect(
  File "/home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py", line 2370, in expect
    self.runCmd(
  File "/home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py", line 1000, in runCmd
    self.assertTrue(self.res.Succeeded(), msg + output)
AssertionError: False is not true : Variable(s) displayed correctly
Error output:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants