Add support for s390x architecture#447
Merged
jaypipes merged 6 commits intojaypipes:mainfrom Feb 9, 2026
Merged
Conversation
jaypipes
reviewed
Feb 9, 2026
Signed-off-by: Adarsh Kumar Yadav <adarsh.kumar.yadav1@ibm.com>
Signed-off-by: ibm-adarsh <adarsh.kumar.yadav1@ibm.com>
Signed-off-by: Adarsh Kumar Yadav <adarsh.kumar.yadav1@ibm.com>
jaypipes
requested changes
Feb 9, 2026
Signed-off-by: Adarsh Kumar Yadav <adarsh.kumar.yadav1@ibm.com>
jaypipes
approved these changes
Feb 9, 2026
Owner
jaypipes
left a comment
There was a problem hiding this comment.
Looking good @ibm-adarsh thank you! :)
Owner
|
@ibm-adarsh welcome to the ghw contributors club :) thanks again for your efforts here! |
|
@jaypipes Could we please create a release tag including this change whenever possible? |
Owner
|
@ashokpariya0 you're all set :) release v0.23.0 includes this patch. |
thanks a lot 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR introduces support for IBM Z (s390x) architecture in the CPU collector as asked part of #437. Unlike x86 or ARM, s390x provides CPU metadata in a hierarchical format where certain system-wide attributes (like
vendor_idandmachine) are listed in a header, while individual logical processors are identified by thecpu numberkey.Key Changes:
logicalProcessorsFromProcCPUInfoto recognizecpu numberas a valid logical processor identifier (mapping toprocessoron other architectures)./proc/cpuinfoheader. This ensures thatvendor_idandmachine(Model) metadata are correctly associated with the processor entries rather than being discarded when the parser hits a blank line.featureskey to populate CPU capabilities on s390x.Testing Performed
TestS390xCPUinpkg/cpu/cpu_linux_test.go.Verified that
Vendorreports asIBM/S390andModelreports the machine type (e.g.,3931).Confirmed
Capabilitiesare correctly parsed from thefeaturesline.Regression Testing:
Ran existing
TestArmCPUandTestCheckCPUTopologyFilesForOfflineCPUon x86/ARM snapshots to ensure no regressions in the standard parsing logic.All tests passed:
go test -v ./pkg/cpu/...Impact
Users running
ghwon s390x will now see populatedVendor,Model, andCapabilitiesfields in theCPUInfostruct, which previously returned empty strings.