linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scripts: get_feat.pl: substitute s390x with s390
@ 2025-03-12 15:52 Heiko Carstens
  2025-03-12 22:26 ` Jonathan Corbet
  0 siblings, 1 reply; 2+ messages in thread
From: Heiko Carstens @ 2025-03-12 15:52 UTC (permalink / raw)
  To: Jonathan Corbet, Mauro Carvalho Chehab
  Cc: Alexander Gordeev, Sven Schnelle, Vasily Gorbik,
	Christian Borntraeger, linux-kernel, linux-doc

Both get_feat.pl and list-arch.sh use uname -m to get the machine hardware
name to figure out the current architecture if no architecture is specified
with a command line option.

This doesn't work for s390, since for 64 bit kernels the hardware name is
s390x, while the architecture name within the kernel, as well as in all
feature files is s390.

Therefore substitute s390x with s390 similar to what is already done for
x86_64 and i386.

Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
---
 Documentation/features/list-arch.sh | 2 +-
 scripts/get_feat.pl                 | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Documentation/features/list-arch.sh b/Documentation/features/list-arch.sh
index e73aa35848f0..ac8ff7f6f859 100755
--- a/Documentation/features/list-arch.sh
+++ b/Documentation/features/list-arch.sh
@@ -6,6 +6,6 @@
 # (If no arguments are given then it will print the host architecture's status.)
 #
 
-ARCH=${1:-$(uname -m | sed 's/x86_64/x86/' | sed 's/i386/x86/')}
+ARCH=${1:-$(uname -m | sed 's/x86_64/x86/' | sed 's/i386/x86/' | sed 's/s390x/s390/')}
 
 $(dirname $0)/../../scripts/get_feat.pl list --arch $ARCH
diff --git a/scripts/get_feat.pl b/scripts/get_feat.pl
index 5c5397eeb237..40fb28c8424e 100755
--- a/scripts/get_feat.pl
+++ b/scripts/get_feat.pl
@@ -512,13 +512,13 @@ print STDERR Data::Dumper->Dump([\%data], [qw(*data)]) if ($debug);
 # Handles the command
 #
 if ($cmd eq "current") {
-	$arch = qx(uname -m | sed 's/x86_64/x86/' | sed 's/i386/x86/');
+	$arch = qx(uname -m | sed 's/x86_64/x86/' | sed 's/i386/x86/' | sed 's/s390x/s390/');
 	$arch =~s/\s+$//;
 }
 
 if ($cmd eq "ls" or $cmd eq "list") {
 	if (!$arch) {
-		$arch = qx(uname -m | sed 's/x86_64/x86/' | sed 's/i386/x86/');
+		$arch = qx(uname -m | sed 's/x86_64/x86/' | sed 's/i386/x86/' | sed 's/s390x/s390/');
 		$arch =~s/\s+$//;
 	}
 
-- 
2.45.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] scripts: get_feat.pl: substitute s390x with s390
  2025-03-12 15:52 [PATCH] scripts: get_feat.pl: substitute s390x with s390 Heiko Carstens
@ 2025-03-12 22:26 ` Jonathan Corbet
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Corbet @ 2025-03-12 22:26 UTC (permalink / raw)
  To: Heiko Carstens, Mauro Carvalho Chehab
  Cc: Alexander Gordeev, Sven Schnelle, Vasily Gorbik,
	Christian Borntraeger, linux-kernel, linux-doc

Heiko Carstens <hca@linux.ibm.com> writes:

> Both get_feat.pl and list-arch.sh use uname -m to get the machine hardware
> name to figure out the current architecture if no architecture is specified
> with a command line option.
>
> This doesn't work for s390, since for 64 bit kernels the hardware name is
> s390x, while the architecture name within the kernel, as well as in all
> feature files is s390.
>
> Therefore substitute s390x with s390 similar to what is already done for
> x86_64 and i386.
>
> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
> ---
>  Documentation/features/list-arch.sh | 2 +-
>  scripts/get_feat.pl                 | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)

Applied, thanks.

jon

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-03-12 22:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-12 15:52 [PATCH] scripts: get_feat.pl: substitute s390x with s390 Heiko Carstens
2025-03-12 22:26 ` Jonathan Corbet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).