From patchwork Tue Oct 5 14:14:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Liebler X-Patchwork-Id: 45895 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D7DD5385AC29 for ; Tue, 5 Oct 2021 14:14:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D7DD5385AC29 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1633443282; bh=UJlOhzrHcUGx76ygh/IrRSDmXKxsaTXfgr1oUb6LQPs=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=d5NqgJIGDZK3o47FToyxzJvEo97fVwJTD3wDUw8DVFYHeMlIUA8FtUdeT8s0KEFoy CLX9a6JD02Kmy9p0bzBYNm7qsU/HuqeWefl0ljKKVFGzedYTgNjPxwXeHeVQvlrpb3 bwA0qYTJkE4EgBtebBLYtfQwJFlk0iuf1tnRR/ak= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 28A2D385840B for ; Tue, 5 Oct 2021 14:14:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 28A2D385840B Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 195D2UuN022539 for ; Tue, 5 Oct 2021 10:14:20 -0400 Received: from ppma05fra.de.ibm.com (6c.4a.5195.ip4.static.sl-reverse.com [149.81.74.108]) by mx0a-001b2d01.pphosted.com with ESMTP id 3bgq7u27gn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 05 Oct 2021 10:14:19 -0400 Received: from pps.filterd (ppma05fra.de.ibm.com [127.0.0.1]) by ppma05fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 195EC7uW014360 for ; Tue, 5 Oct 2021 14:14:17 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma05fra.de.ibm.com with ESMTP id 3bef29s655-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 05 Oct 2021 14:14:17 +0000 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 195E8qkw53543292 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 5 Oct 2021 14:08:52 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 529C742049; Tue, 5 Oct 2021 14:14:12 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 249F742054; Tue, 5 Oct 2021 14:14:12 +0000 (GMT) Received: from t35lp57.lnxne.boe (unknown [9.152.108.100]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 5 Oct 2021 14:14:12 +0000 (GMT) To: libc-alpha@sourceware.org Subject: [PATCH] S390: Add PCI_MIO and SIE HWCAPs Date: Tue, 5 Oct 2021 16:14:10 +0200 Message-Id: <20211005141410.694135-1-stli@linux.ibm.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: e0oVls0VUGwlTosQrWBuVDDFEfwq9o20 X-Proofpoint-ORIG-GUID: e0oVls0VUGwlTosQrWBuVDDFEfwq9o20 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-10-05_02,2021-10-04_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 priorityscore=1501 mlxlogscore=707 spamscore=0 malwarescore=0 lowpriorityscore=0 bulkscore=0 clxscore=1011 mlxscore=0 suspectscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110050084 X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Stefan Liebler via Libc-alpha From: Stefan Liebler Reply-To: Stefan Liebler Cc: Stefan Liebler Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" Both new HWCAPs were introduced in these kernel commits: - 7e8403ecaf884f307b627f3c371475913dd29292 "s390: add HWCAP_S390_PCI_MIO to ELF hwcaps" - 7e82523f2583e9813e4109df3656707162541297 "s390/hwcaps: make sie capability regular hwcap" Also note that the kernel commit 511ad531afd4090625def4d9aba1f5227bd44b8e "s390/hwcaps: shorten HWCAP defines" has shortened the prefix of the macros from "HWCAP_S390_" to "HWCAP_". For compatibility reasons, we do not change the prefix in public glibc header file. --- sysdeps/s390/dl-procinfo.c | 4 ++-- sysdeps/s390/dl-procinfo.h | 4 +++- sysdeps/unix/sysv/linux/s390/bits/hwcap.h | 7 +++++++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/sysdeps/s390/dl-procinfo.c b/sysdeps/s390/dl-procinfo.c index 7314c31b15..97be34fe9d 100644 --- a/sysdeps/s390/dl-procinfo.c +++ b/sysdeps/s390/dl-procinfo.c @@ -45,13 +45,13 @@ #if !defined PROCINFO_DECL && defined SHARED ._dl_s390_cap_flags #else -PROCINFO_CLASS const char _dl_s390_cap_flags[21][9] +PROCINFO_CLASS const char _dl_s390_cap_flags[23][9] #endif #ifndef PROCINFO_DECL = { "esan3", "zarch", "stfle", "msa", "ldisp", "eimm", "dfp", "edat", "etf3eh", "highgprs", "te", "vx", "vxd", "vxe", "gs", "vxe2", "vxp", "sort", "dflt", - "vxp2", "nnpa" + "vxp2", "nnpa", "pcimio", "sie" } #endif #if !defined SHARED || defined PROCINFO_DECL diff --git a/sysdeps/s390/dl-procinfo.h b/sysdeps/s390/dl-procinfo.h index 2502dd2604..d9a3b264ff 100644 --- a/sysdeps/s390/dl-procinfo.h +++ b/sysdeps/s390/dl-procinfo.h @@ -20,7 +20,7 @@ #define _DL_PROCINFO_H 1 #include -#define _DL_HWCAP_COUNT 21 +#define _DL_HWCAP_COUNT 23 #define _DL_PLATFORMS_COUNT 10 @@ -62,6 +62,8 @@ enum HWCAP_S390_DFLT = 1 << 18, HWCAP_S390_VXRS_PDE2 = 1 << 19, HWCAP_S390_NNPA = 1 << 20, + HWCAP_S390_PCI_MIO = 1 << 21, + HWCAP_S390_SIE = 1 << 22, }; #define HWCAP_IMPORTANT (HWCAP_S390_ZARCH | HWCAP_S390_LDISP \ diff --git a/sysdeps/unix/sysv/linux/s390/bits/hwcap.h b/sysdeps/unix/sysv/linux/s390/bits/hwcap.h index e9bd3684db..00e73a3e3b 100644 --- a/sysdeps/unix/sysv/linux/s390/bits/hwcap.h +++ b/sysdeps/unix/sysv/linux/s390/bits/hwcap.h @@ -22,6 +22,11 @@ /* * The following must match the kernels asm/elf.h. + * Note: The kernel commit 511ad531afd4090625def4d9aba1f5227bd44b8e + * "s390/hwcaps: shorten HWCAP defines" has shortened the prefix of the macros + * from "HWCAP_S390_" to "HWCAP_". For compatibility reasons, we do not + * change the prefix in public glibc header file. + * * Note that these are *not* the same as the STORE FACILITY LIST bits. */ #define HWCAP_S390_ESAN3 1 @@ -48,3 +53,5 @@ #define HWCAP_S390_DFLT 262144 #define HWCAP_S390_VXRS_PDE2 524288 #define HWCAP_S390_NNPA 1048576 +#define HWCAP_S390_PCI_MIO 2097152 +#define HWCAP_S390_SIE 4194304