From patchwork Tue Jan 3 07:19:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Schnelle X-Patchwork-Id: 38309 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp4484491wrt; Mon, 2 Jan 2023 23:25:29 -0800 (PST) X-Google-Smtp-Source: AMrXdXuxkZdvqa7XFXK6C0PUv8T+JdAAXhukURq6UOGUvgXk4rK6APsQ+xB51e9ubyXsNd1Oal1T X-Received: by 2002:a17:903:3287:b0:192:e0ab:a4a2 with SMTP id jh7-20020a170903328700b00192e0aba4a2mr233289plb.51.1672730729302; Mon, 02 Jan 2023 23:25:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672730729; cv=none; d=google.com; s=arc-20160816; b=NUb5I4U+ZTSy9leQ3ynk72o3RoZtkYDar0ZbuAX1zATakrwP+k4NNPA+Ur3hm4oV0u /XqWTXd4Y+HhHgFScjuFx0gs0Kn0rjCVrFuN856YNwRekalkvEQEDIGkmUx+zJu87TFX FEaapgQjwRy38JO0jo6RJhOUH1ZAqyjlDhLIABlQGDLfU8NM/8I1OXwaG9Rc3fMOgiwr tUz/pR00UnwNIQgv/8aEjk0RD4D86VjnOeyGFmhVn2SgdyTHNc6WhvEap3HXcFwOIQ9V 9Kq+BXAE66Mbg/OzUTeX42hJiZo7hdKIn1Ol9qYaOeIbSSDtAsTNaryHPxMIz7qxPmxu CVBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=KbtA/QSegqSd00MHD8ogZ8QdkXrcydGR1GzD64HyzoA=; b=GdrocDbEL6EmiQ/nWdoFhn9jyW170Z7Cj20tCNBmywFVp8H5048/laSmmS5CQ67K/a vRgz2eR6FuKT4oXL1dUdP6msvVymXeNMIVCvBtTRwP+Hnvr4/zrKP2NauyAfapbvp0FC Xxm18bxcVVdBy2jHPQQL2ydd+U8gCJ5CnHQUBO49r5koaoUOE1/XtSl1YmPTavpgtfMJ l1D0As8BR2ehyGjT+dy7go03EpC19rlHLVgbS7haSYxsN3JN2BzNPvQNORi0ZepPRVM0 O8y4ZH0kMW41i4LLZ8BZjU5dvaIsuN/YS8DB4TNwdI92HbjN+36CPF90SEwGDMvzCx25 ScNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=XTaQDZ9H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ik24-20020a170902ab1800b001925398170esi30728838plb.81.2023.01.02.23.25.17; Mon, 02 Jan 2023 23:25:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=XTaQDZ9H; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236839AbjACHUt (ORCPT + 99 others); Tue, 3 Jan 2023 02:20:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231184AbjACHUi (ORCPT ); Tue, 3 Jan 2023 02:20:38 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07A709FEF; Mon, 2 Jan 2023 23:20:38 -0800 (PST) Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3036fnb1002423; Tue, 3 Jan 2023 07:20:08 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=KbtA/QSegqSd00MHD8ogZ8QdkXrcydGR1GzD64HyzoA=; b=XTaQDZ9HLIsdt6Qr9zQpBsepNCAt5bDUuIk7nHbBhpaRhQyqYQoTPh4cqPsWzYVSJZ0r ydYToArZEwXyNXeQH0N0x2pcaa/YBPHx1ecGonK27cKi35tcLWz+oWYpW3WBHv8Q4N9a 1CpDQhbDTU+p/wydXaKdFoUgchhS2kTcQGnLqo7yfuEq9ZDUSRZUus+c9E/b89h1Z1Jp uGIj24/qjApEkk+sOmz+sU0s6HEjjRnkWrbnx4FrqmsTGKCxeXJ+xnPi8LN+kSNomNsJ 8EsKXk+BRD44gv+ydRSbOtipoOTAOQz1rOdXvkd20y+3U1mdq7c88NZR3Sd70iLdPf7s 4w== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3mvfaprk23-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 03 Jan 2023 07:20:08 +0000 Received: from m0098410.ppops.net (m0098410.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 303713Du000623; Tue, 3 Jan 2023 07:20:07 GMT Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3mvfaprk1a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 03 Jan 2023 07:20:07 +0000 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 302GYlZH001543; Tue, 3 Jan 2023 07:20:05 GMT Received: from smtprelay03.fra02v.mail.ibm.com ([9.218.2.224]) by ppma06ams.nl.ibm.com (PPS) with ESMTPS id 3mtcbfbeek-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 03 Jan 2023 07:20:05 +0000 Received: from smtpav02.fra02v.mail.ibm.com (smtpav02.fra02v.mail.ibm.com [10.20.54.101]) by smtprelay03.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3037K25U41025888 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 3 Jan 2023 07:20:02 GMT Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 965FF20040; Tue, 3 Jan 2023 07:20:02 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 83E522004E; Tue, 3 Jan 2023 07:20:02 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by smtpav02.fra02v.mail.ibm.com (Postfix) with ESMTPS; Tue, 3 Jan 2023 07:20:02 +0000 (GMT) Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 55390) id 30AF6E0945; Tue, 3 Jan 2023 08:20:02 +0100 (CET) From: Sven Schnelle To: Willy Tarreau , "Paul E . McKenney" , Josh Triplett Cc: Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org Subject: [PATCH v3 1/5] nolibc: fix fd_set type Date: Tue, 3 Jan 2023 08:19:53 +0100 Message-Id: <20230103071957.222360-2-svens@linux.ibm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230103071957.222360-1-svens@linux.ibm.com> References: <20230103071957.222360-1-svens@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: MT0mnFE2kQK2MDzTDpHFU6lzRTb97_xZ X-Proofpoint-ORIG-GUID: 3I_WCHPinxNIZ8plKOF3_IkYTXG4sDhJ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2023-01-02_14,2022-12-30_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 phishscore=0 priorityscore=1501 bulkscore=0 lowpriorityscore=0 spamscore=0 mlxscore=0 mlxlogscore=818 malwarescore=0 impostorscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301030062 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753985297212245558?= X-GMAIL-MSGID: =?utf-8?q?1753985297212245558?= The kernel uses unsigned long for the fd_set bitmap, but nolibc use u32. This works fine on little endian machines, but fails on big endian. Convert to unsigned long to fix this. Signed-off-by: Sven Schnelle --- tools/include/nolibc/types.h | 53 ++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 23 deletions(-) diff --git a/tools/include/nolibc/types.h b/tools/include/nolibc/types.h index 959997034e55..300e0ff1cd58 100644 --- a/tools/include/nolibc/types.h +++ b/tools/include/nolibc/types.h @@ -89,39 +89,46 @@ #define EXIT_SUCCESS 0 #define EXIT_FAILURE 1 +#define FD_SETIDXMASK (8 * sizeof(unsigned long)) +#define FD_SETBITMASK (8 * sizeof(unsigned long)-1) + /* for select() */ typedef struct { - uint32_t fd32[(FD_SETSIZE + 31) / 32]; + unsigned long fds[(FD_SETSIZE + FD_SETBITMASK) / FD_SETIDXMASK]; } fd_set; -#define FD_CLR(fd, set) do { \ - fd_set *__set = (set); \ - int __fd = (fd); \ - if (__fd >= 0) \ - __set->fd32[__fd / 32] &= ~(1U << (__fd & 31)); \ +#define FD_CLR(fd, set) do { \ + fd_set *__set = (set); \ + int __fd = (fd); \ + if (__fd >= 0) \ + __set->fds[__fd / FD_SETIDXMASK] &= \ + ~(1U << (__fd & FX_SETBITMASK)); \ } while (0) -#define FD_SET(fd, set) do { \ - fd_set *__set = (set); \ - int __fd = (fd); \ - if (__fd >= 0) \ - __set->fd32[__fd / 32] |= 1U << (__fd & 31); \ +#define FD_SET(fd, set) do { \ + fd_set *__set = (set); \ + int __fd = (fd); \ + if (__fd >= 0) \ + __set->fds[__fd / FD_SETIDXMASK] |= \ + 1 << (__fd & FD_SETBITMASK); \ } while (0) -#define FD_ISSET(fd, set) ({ \ - fd_set *__set = (set); \ - int __fd = (fd); \ - int __r = 0; \ - if (__fd >= 0) \ - __r = !!(__set->fd32[__fd / 32] & 1U << (__fd & 31)); \ - __r; \ +#define FD_ISSET(fd, set) ({ \ + fd_set *__set = (set); \ + int __fd = (fd); \ + int __r = 0; \ + if (__fd >= 0) \ + __r = !!(__set->fds[__fd / FD_SETIDXMASK] & \ +1U << (__fd & FD_SET_BITMASK)); \ + __r; \ }) -#define FD_ZERO(set) do { \ - fd_set *__set = (set); \ - int __idx; \ - for (__idx = 0; __idx < (FD_SETSIZE+31) / 32; __idx ++) \ - __set->fd32[__idx] = 0; \ +#define FD_ZERO(set) do { \ + fd_set *__set = (set); \ + int __idx; \ + int __size = (FD_SETSIZE+FD_SETBITMASK) / FD_SETIDXMASK;\ + for (__idx = 0; __idx < __size; __idx++) \ + __set->fds[__idx] = 0; \ } while (0) /* for poll() */ From patchwork Tue Jan 3 07:19:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Schnelle X-Patchwork-Id: 38306 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp4484043wrt; Mon, 2 Jan 2023 23:23:36 -0800 (PST) X-Google-Smtp-Source: AMrXdXtew8hKhW7NclFbbu0QnLUMNTvt0e0NZVUGg/qdWTkOAcGzHnlUYAl1xxWDUJEvQyYTR7YP X-Received: by 2002:a17:902:c115:b0:192:6e91:7daf with SMTP id 21-20020a170902c11500b001926e917dafmr41618956pli.53.1672730616473; Mon, 02 Jan 2023 23:23:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672730616; cv=none; d=google.com; s=arc-20160816; b=aDzHtEo/QmV7iEPAWt6JjuhqbISpyrN5DhyvMVuE3cBGgp2Fx3KDSri0eg07ryMM+H nX+2LjT+oPbH1R3aQiOk3bpp36avNMxkTGFiJJ2BaFQLwsyq5oj3dQ1WX8QEsjcvWVGX 3czJUzyvHgJqDD51gUjLG9YLA+8SwqOovgE6SxU113iNHUrHQ1aeCzZr1VbrONd80g4a jUIM6fQdfIjGXWZ1xKd7J/labjMQk5x3PaL0wT0DUI27kEfqX4W3kiUpEJ5cOYiornft tkIoqpaNmI3y2mTmQuFVeIe60xjddCH/8K9rzAp31uqu53Rmlnp7gNHQ0+68D+qPCT0N W+Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=SQsouSM8kwP5TXUBQIgPFymUISLUahmOsRKAzyzbrD0=; b=s0PA9pUXO3iDk17WBd0SiaZHFSrSam3FQy1jKVcpJC6ic++mTUnCAM8uBD84CobZ4r zRBK47pHkVQ2M6jyK3HSPXSU7tBrzd5RtNxA/rb719lrZFrwkpVxFIRzCsOHzyy9f4q5 QSwEQO8ztcqemGitdrbkBRDsNpDNVYWJTT/LtmK8twXSgbKaKZA4OKY1Vlm94ur7bBK/ FjaWJ+ePDrBjg+mFIPgo4AbHhrm5WyyF1HpHOZ9Jg0IkDFgEBBiB2rSIGyjf8UqOriUi ZHGENhXkgBu60eyT7T4H0FMMNTME226EFhC6nmkTNnUMUOThoJxhnXt2jr000llZDB5t /09g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b="mE2Vf/Vi"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f20-20020a170902ab9400b0019143677fd3si29135339plr.461.2023.01.02.23.23.24; Mon, 02 Jan 2023 23:23:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b="mE2Vf/Vi"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230211AbjACHU4 (ORCPT + 99 others); Tue, 3 Jan 2023 02:20:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231635AbjACHUk (ORCPT ); Tue, 3 Jan 2023 02:20:40 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7E6095BE; Mon, 2 Jan 2023 23:20:38 -0800 (PST) Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3033MbJe003092; Tue, 3 Jan 2023 07:20:08 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : mime-version; s=pp1; bh=SQsouSM8kwP5TXUBQIgPFymUISLUahmOsRKAzyzbrD0=; b=mE2Vf/ViVjWD7L05vK3nMI+um/kwk9YwWnJiztQRQByy/LPy1gwarwjG5M/0+gxGkKk0 wrHx1bbnY64jYuSHSkLNhB0gzClOOM+crCNDLcyyVrHZCpwi61HWPpzoaJwoJgXhow9D XlprGh5jfCPBgtV3DnwXDQsLCY7I6nmiQzG1xeTiGtdzuUFL2SLQOfijoto6a16hFm2p IdArqC6qDA4HsY9taPORp0ZUFbf/1VJZjPAdE3VK6BVXGpEfJtbYpnQWaSz/8cY314ER ST1u/AHfQQLnYm3Hc5T38+OhOo+ga5jGglkpi7RXfQHa5/6ivEA5eN83v/L0FTiDOg0Z Ew== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3mvcde3a44-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 03 Jan 2023 07:20:08 +0000 Received: from m0098396.ppops.net (m0098396.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3037I7Vp008267; Tue, 3 Jan 2023 07:20:07 GMT Received: from ppma02fra.de.ibm.com (47.49.7a9f.ip4.static.sl-reverse.com [159.122.73.71]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3mvcde3a3c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 03 Jan 2023 07:20:07 +0000 Received: from pps.filterd (ppma02fra.de.ibm.com [127.0.0.1]) by ppma02fra.de.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 302CGkBN017352; Tue, 3 Jan 2023 07:20:05 GMT Received: from smtprelay01.fra02v.mail.ibm.com ([9.218.2.227]) by ppma02fra.de.ibm.com (PPS) with ESMTPS id 3mtcq6tgat-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 03 Jan 2023 07:20:05 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay01.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3037K22446137730 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 3 Jan 2023 07:20:02 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8CF1B2004B; Tue, 3 Jan 2023 07:20:02 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6EFE920043; Tue, 3 Jan 2023 07:20:02 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTPS; Tue, 3 Jan 2023 07:20:02 +0000 (GMT) Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 55390) id 33B04E0950; Tue, 3 Jan 2023 08:20:02 +0100 (CET) From: Sven Schnelle To: Willy Tarreau , "Paul E . McKenney" , Josh Triplett Cc: Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org Subject: [PATCH v3 2/5] nolibc: add support for s390 Date: Tue, 3 Jan 2023 08:19:54 +0100 Message-Id: <20230103071957.222360-3-svens@linux.ibm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230103071957.222360-1-svens@linux.ibm.com> References: <20230103071957.222360-1-svens@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: OeKXrZPcuqovHfQ6VR9J1BNP_qTKRAPr X-Proofpoint-GUID: 91mT-OVaOjgo0E3wbjwOSjNp6WlMXNT_ X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2023-01-02_14,2022-12-30_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 malwarescore=0 suspectscore=0 phishscore=0 mlxscore=0 bulkscore=0 priorityscore=1501 impostorscore=0 mlxlogscore=382 lowpriorityscore=0 clxscore=1015 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301030062 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753985178782979087?= X-GMAIL-MSGID: =?utf-8?q?1753985178782979087?= Use arch-x86_64 as a template. Not really different, but we have our own mmap syscall which takes a structure instead of discrete arguments. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens --- tools/include/nolibc/arch-s390.h | 222 +++++++++++++++++++++++++++++++ tools/include/nolibc/arch.h | 2 + tools/include/nolibc/sys.h | 2 + 3 files changed, 226 insertions(+) create mode 100644 tools/include/nolibc/arch-s390.h diff --git a/tools/include/nolibc/arch-s390.h b/tools/include/nolibc/arch-s390.h new file mode 100644 index 000000000000..76bc8fdaf922 --- /dev/null +++ b/tools/include/nolibc/arch-s390.h @@ -0,0 +1,222 @@ +/* SPDX-License-Identifier: LGPL-2.1 OR MIT */ +/* + * s390 specific definitions for NOLIBC + */ + +#ifndef _NOLIBC_ARCH_S390_H +#define _NOLIBC_ARCH_S390_H +#include + +/* O_* macros for fcntl/open are architecture-specific */ +#define O_RDONLY 0 +#define O_WRONLY 1 +#define O_RDWR 2 +#define O_CREAT 0x40 +#define O_EXCL 0x80 +#define O_NOCTTY 0x100 +#define O_TRUNC 0x200 +#define O_APPEND 0x400 +#define O_NONBLOCK 0x800 +#define O_DIRECTORY 0x10000 + +/* The struct returned by the stat() syscall, equivalent to stat64(). The + * syscall returns 116 bytes and stops in the middle of __unused. + */ + +struct sys_stat_struct { + unsigned long st_dev; + unsigned long st_ino; + unsigned long st_nlink; + unsigned int st_mode; + unsigned int st_uid; + unsigned int st_gid; + unsigned int __pad1; + unsigned long st_rdev; + unsigned long st_size; + unsigned long st_atime; + unsigned long st_atime_nsec; + unsigned long st_mtime; + unsigned long st_mtime_nsec; + unsigned long st_ctime; + unsigned long st_ctime_nsec; + unsigned long st_blksize; + long st_blocks; + unsigned long __unused[3]; +}; + +/* Syscalls for s390: + * - registers are 64-bit + * - syscall number is passed in r1 + * - arguments are in r2-r7 + * - the system call is performed by calling the svc instruction + * - syscall return value is in r2 + * - r1 and r2 are clobbered, others are preserved. + * + * Link s390 ABI: https://github.com/IBM/s390x-abi + * + */ + +#define my_syscall0(num) \ +({ \ + register long _num __asm__ ("1") = (num); \ + register long _rc __asm__ ("2"); \ + \ + __asm__ volatile ( \ + "svc 0\n" \ + : "=d"(_rc) \ + : "d"(_num) \ + : "memory", "cc" \ + ); \ + _rc; \ +}) + +#define my_syscall1(num, arg1) \ +({ \ + register long _num __asm__ ("1") = (num); \ + register long _arg1 __asm__ ("2") = (long)(arg1); \ + \ + __asm__ volatile ( \ + "svc 0\n" \ + : "+d"(_arg1) \ + : "d"(_num) \ + : "memory", "cc" \ + ); \ + _arg1; \ +}) + +#define my_syscall2(num, arg1, arg2) \ +({ \ + register long _num __asm__ ("1") = (num); \ + register long _arg1 __asm__ ("2") = (long)(arg1); \ + register long _arg2 __asm__ ("3") = (long)(arg2); \ + \ + __asm__ volatile ( \ + "svc 0\n" \ + : "+d"(_arg1) \ + : "d"(_arg2), "d"(_num) \ + : "memory", "cc" \ + ); \ + _arg1; \ +}) + +#define my_syscall3(num, arg1, arg2, arg3) \ +({ \ + register long _num __asm__ ("1") = (num); \ + register long _arg1 __asm__ ("2") = (long)(arg1); \ + register long _arg2 __asm__ ("3") = (long)(arg2); \ + register long _arg3 __asm__ ("4") = (long)(arg3); \ + \ + __asm__ volatile ( \ + "svc 0\n" \ + : "+d"(_arg1) \ + : "d"(_arg2), "d"(_arg3), "d"(_num) \ + : "memory", "cc" \ + ); \ + _arg1; \ +}) + +#define my_syscall4(num, arg1, arg2, arg3, arg4) \ +({ \ + register long _num __asm__ ("1") = (num); \ + register long _arg1 __asm__ ("2") = (long)(arg1); \ + register long _arg2 __asm__ ("3") = (long)(arg2); \ + register long _arg3 __asm__ ("4") = (long)(arg3); \ + register long _arg4 __asm__ ("5") = (long)(arg4); \ + \ + __asm__ volatile ( \ + "svc 0\n" \ + : "+d"(_arg1) \ + : "d"(_arg2), "d"(_arg3), "d"(_arg4), "d"(_num) \ + : "memory", "cc" \ + ); \ + _arg1; \ +}) + +#define my_syscall5(num, arg1, arg2, arg3, arg4, arg5) \ +({ \ + register long _num __asm__ ("1") = (num); \ + register long _arg1 __asm__ ("2") = (long)(arg1); \ + register long _arg2 __asm__ ("3") = (long)(arg2); \ + register long _arg3 __asm__ ("4") = (long)(arg3); \ + register long _arg4 __asm__ ("5") = (long)(arg4); \ + register long _arg5 __asm__ ("6") = (long)(arg5); \ + \ + __asm__ volatile ( \ + "svc 0\n" \ + : "+d"(_arg1) \ + : "d"(_arg2), "d"(_arg3), "d"(_arg4), "d"(_arg5), \ + "d"(_num) \ + : "memory", "cc" \ + ); \ + _arg1; \ +}) + +#define my_syscall6(num, arg1, arg2, arg3, arg4, arg5, arg6) \ +({ \ + register long _num __asm__ ("1") = (num); \ + register long _arg1 __asm__ ("2") = (long)(arg1); \ + register long _arg2 __asm__ ("3") = (long)(arg2); \ + register long _arg3 __asm__ ("4") = (long)(arg3); \ + register long _arg4 __asm__ ("5") = (long)(arg4); \ + register long _arg5 __asm__ ("6") = (long)(arg5); \ + register long _arg6 __asm__ ("7") = (long)(arg6); \ + \ + __asm__ volatile ( \ + "svc 0\n" \ + : "+d"(_arg1) \ + : "d"(_arg2), "d"(_arg3), "d"(_arg4), "d"(_arg5), \ + "d"(_arg6), "d"(_num) \ + : "memory", "cc" \ + ); \ + _arg1; \ +}) + +/* startup code */ +__asm__ (".section .text\n" + ".weak _start\n" + "_start:\n" + "lg %r2,0(%r15)\n" /* argument count */ + "la %r3,8(%r15)\n" /* argument pointers */ + + "xgr %r0,%r0\n" /* r0 will be our NULL value */ + /* search for envp */ + "lgr %r4,%r3\n" /* start at argv */ + "0:\n" + "clg %r0,0(%r4)\n" /* entry zero? */ + "la %r4,8(%r4)\n" /* advance pointer */ + "jnz 0b\n" /* no -> test next pointer */ + /* yes -> r4 now contains start of envp */ + + "aghi %r15,-160\n" /* allocate new stackframe */ + "xc 0(8,%r15),0(%r15)\n" /* clear backchain */ + "brasl %r14,main\n" /* ret value of main is arg to exit */ + "lghi %r1,1\n" /* __NR_exit */ + "svc 0\n" + ""); + +struct s390_mmap_arg_struct { + unsigned long addr; + unsigned long len; + unsigned long prot; + unsigned long flags; + unsigned long fd; + unsigned long offset; +}; + +static __attribute__((unused)) +void *sys_mmap(void *addr, size_t length, int prot, int flags, int fd, + off_t offset) +{ + struct s390_mmap_arg_struct args = { + .addr = (unsigned long)addr, + .len = (unsigned long)length, + .prot = prot, + .flags = flags, + .fd = fd, + .offset = (unsigned long)offset + }; + + return (void *)my_syscall1(__NR_mmap, &args); +} +#define sys_mmap sys_mmap +#endif // _NOLIBC_ARCH_S390_H diff --git a/tools/include/nolibc/arch.h b/tools/include/nolibc/arch.h index 4c6992321b0d..78b067a4fa47 100644 --- a/tools/include/nolibc/arch.h +++ b/tools/include/nolibc/arch.h @@ -27,6 +27,8 @@ #include "arch-mips.h" #elif defined(__riscv) #include "arch-riscv.h" +#elif defined(__s390x__) +#include "arch-s390.h" #endif #endif /* _NOLIBC_ARCH_H */ diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h index ce3ee03aa679..3db1dd8c74ee 100644 --- a/tools/include/nolibc/sys.h +++ b/tools/include/nolibc/sys.h @@ -686,6 +686,7 @@ int mknod(const char *path, mode_t mode, dev_t dev) #define MAP_FAILED ((void *)-1) #endif +#ifndef sys_mmap static __attribute__((unused)) void *sys_mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset) @@ -707,6 +708,7 @@ void *sys_mmap(void *addr, size_t length, int prot, int flags, int fd, return (void *)my_syscall6(n, addr, length, prot, flags, fd, offset); #endif } +#endif static __attribute__((unused)) void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset) From patchwork Tue Jan 3 07:19:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Schnelle X-Patchwork-Id: 38305 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp4483685wrt; Mon, 2 Jan 2023 23:22:12 -0800 (PST) X-Google-Smtp-Source: AMrXdXumcnsQpyEhUrezi3Nw09VZpNoHfD4YZmaPtyRoRwV0qh9gTWi8LjY4K3z69QzUkfuhVjnB X-Received: by 2002:a17:902:d50a:b0:192:d5cf:ab7e with SMTP id b10-20020a170902d50a00b00192d5cfab7emr4387195plg.32.1672730532622; Mon, 02 Jan 2023 23:22:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672730532; cv=none; d=google.com; s=arc-20160816; b=p+KdFRrSkiWKpEwG3IM443dtufLBz/ACdpAtCehxsuh2suRH5whLgZ+s5U+fhqfYKN UI0soWQSDnx81ltmHpaJjiDw15rcgnkKShRKscSurFNftxzv6gUw3MeQzOHsU+2ga9L4 F4aKuHy+xUHyzTXTK0NHEnJS2j+wre2JTWBDdJ2Ksak47CntsnhntbzYpwHrbPAUsjH5 Benn2WrHrQtEi2qSg4THAsNrvaCOSMUXh6NPRQs7/eAJYcHi/JRZuO2FIBDhTlkG1oVR LQ0d07uzYbYWl5jce1yxYepw86tBgQFcJzUlkExVLD0QTT7RgYrQQsbdlen0FtG2RCLp 4sfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0WI9esVpndro8n3pvm3y/FeUtSxwl2+r+I4pJj3DJ9U=; b=Dszjzn6hNNQ8soKS737WRsDiQaTueo+LnjyAibqmOShySQk+yxB7FnWrGULx/PjMCW tMkLrLKUoRdIEcNnaSSvjw8yAgM4ajXImdcwVLzXWC5PMZpdU2yCZaM6pH7PQED0X8Aj amFGq2SRYHI0oeV4pyJv4sv4uPIgkBikdJJNdgHITn6qUC18lep0xSUtJhM/nc/FqQA2 IG/4TJQEiHdll+8eoQWPBy7Gy1sTfYA/FpupOZTc7wsDRR1rfPUCo+rDVllAvl2khexo IZvFJ+C0czS2V74vzezRWHZdkoHSh9jiV+tZvXMJIj7TNP1po9dnMJ3SUkuDdB5+eGIB roAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=I5GCGanL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t14-20020a1709027fce00b00188e9ec511dsi31401359plb.397.2023.01.02.23.22.00; Mon, 02 Jan 2023 23:22:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=I5GCGanL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236821AbjACHUr (ORCPT + 99 others); Tue, 3 Jan 2023 02:20:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230474AbjACHUi (ORCPT ); Tue, 3 Jan 2023 02:20:38 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32A3EA47C; Mon, 2 Jan 2023 23:20:38 -0800 (PST) Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3032ftfb015083; Tue, 3 Jan 2023 07:20:08 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=0WI9esVpndro8n3pvm3y/FeUtSxwl2+r+I4pJj3DJ9U=; b=I5GCGanL7C1q9vLCPD2vIXYzBysKkZ9RcJyoH3ZCFnOabGLK6JavXnwDwJnMjJ8G/4He xtLa4aH+gQHkN89WRblCzi4BkXXQZuboGHDHFxxxTv5krv+9xkhX0gwBUnlaVH1u0y6+ KHGP3nkQa1+I0uj/BxT06COUoioOBUm+NhJ3Mo/QlqtLqiJKBRZbqB25Edp1v6ghK2vp 87LB39MONflhrUWbrPR6iQX5JFtW+7/SEpBmu5XtZ6iXb/xEmluSe5hq/eR/TGQ7nKp5 a10pawy9iDmcYGnsPTwC5ruThHqmycnMunu4I9E6WudqlbJ04AoSMvfYFOERbyAYano+ hQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3mvbt6utey-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 03 Jan 2023 07:20:08 +0000 Received: from m0098404.ppops.net (m0098404.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3037ARwD016089; Tue, 3 Jan 2023 07:20:07 GMT Received: from ppma01fra.de.ibm.com (46.49.7a9f.ip4.static.sl-reverse.com [159.122.73.70]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3mvbt6ute9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 03 Jan 2023 07:20:07 +0000 Received: from pps.filterd (ppma01fra.de.ibm.com [127.0.0.1]) by ppma01fra.de.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 302La9fB012120; Tue, 3 Jan 2023 07:20:05 GMT Received: from smtprelay02.fra02v.mail.ibm.com ([9.218.2.226]) by ppma01fra.de.ibm.com (PPS) with ESMTPS id 3mtcq6aggf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 03 Jan 2023 07:20:04 +0000 Received: from smtpav06.fra02v.mail.ibm.com (smtpav06.fra02v.mail.ibm.com [10.20.54.105]) by smtprelay02.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3037K2vI45285644 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 3 Jan 2023 07:20:02 GMT Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 759F22004D; Tue, 3 Jan 2023 07:20:02 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6669A20040; Tue, 3 Jan 2023 07:20:02 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by smtpav06.fra02v.mail.ibm.com (Postfix) with ESMTPS; Tue, 3 Jan 2023 07:20:02 +0000 (GMT) Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 55390) id 36533E0959; Tue, 3 Jan 2023 08:20:02 +0100 (CET) From: Sven Schnelle To: Willy Tarreau , "Paul E . McKenney" , Josh Triplett Cc: Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org Subject: [PATCH v3 3/5] selftests/nolibc: add s390 support Date: Tue, 3 Jan 2023 08:19:55 +0100 Message-Id: <20230103071957.222360-4-svens@linux.ibm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230103071957.222360-1-svens@linux.ibm.com> References: <20230103071957.222360-1-svens@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: Tfo8WX7ZY92X5D8TbsiUw4Y_5a98V869 X-Proofpoint-GUID: AS9_LeugtFfdSvXZSAV3QP8RK9_5Z3YH X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2023-01-02_14,2022-12-30_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 clxscore=1015 lowpriorityscore=0 mlxlogscore=999 priorityscore=1501 bulkscore=0 spamscore=0 adultscore=0 phishscore=0 suspectscore=0 mlxscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301030062 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753985091093104427?= X-GMAIL-MSGID: =?utf-8?q?1753985091093104427?= Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens --- tools/testing/selftests/nolibc/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index 22f1e1d73fa8..2bf613ee363d 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -19,6 +19,7 @@ IMAGE_arm64 = arch/arm64/boot/Image IMAGE_arm = arch/arm/boot/zImage IMAGE_mips = vmlinuz IMAGE_riscv = arch/riscv/boot/Image +IMAGE_s390 = arch/s390/boot/bzImage IMAGE = $(IMAGE_$(ARCH)) IMAGE_NAME = $(notdir $(IMAGE)) @@ -29,6 +30,7 @@ DEFCONFIG_arm64 = defconfig DEFCONFIG_arm = multi_v7_defconfig DEFCONFIG_mips = malta_defconfig DEFCONFIG_riscv = defconfig +DEFCONFIG_s390 = defconfig DEFCONFIG = $(DEFCONFIG_$(ARCH)) # optional tests to run (default = all) @@ -41,6 +43,7 @@ QEMU_ARCH_arm64 = aarch64 QEMU_ARCH_arm = arm QEMU_ARCH_mips = mipsel # works with malta_defconfig QEMU_ARCH_riscv = riscv64 +QEMU_ARCH_s390 = s390x QEMU_ARCH = $(QEMU_ARCH_$(ARCH)) # QEMU_ARGS : some arch-specific args to pass to qemu @@ -50,6 +53,7 @@ QEMU_ARGS_arm64 = -M virt -cpu cortex-a53 -append "panic=-1 $(TEST:%=NOLIBC_TE QEMU_ARGS_arm = -M virt -append "panic=-1 $(TEST:%=NOLIBC_TEST=%)" QEMU_ARGS_mips = -M malta -append "panic=-1 $(TEST:%=NOLIBC_TEST=%)" QEMU_ARGS_riscv = -M virt -append "console=ttyS0 panic=-1 $(TEST:%=NOLIBC_TEST=%)" +QEMU_ARGS_s390 = -M s390-ccw-virtio -m 1G -append "console=ttyS0 panic=-1 $(TEST:%=NOLIBC_TEST=%)" QEMU_ARGS = $(QEMU_ARGS_$(ARCH)) # OUTPUT is only set when run from the main makefile, otherwise @@ -62,7 +66,8 @@ else Q=@ endif -CFLAGS ?= -Os -fno-ident -fno-asynchronous-unwind-tables +CFLAGS_s390 = -m64 +CFLAGS ?= -Os -fno-ident -fno-asynchronous-unwind-tables $(CFLAGS_$(ARCH)) LDFLAGS := -s help: From patchwork Tue Jan 3 07:19:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Schnelle X-Patchwork-Id: 38307 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp4484046wrt; Mon, 2 Jan 2023 23:23:36 -0800 (PST) X-Google-Smtp-Source: AMrXdXs6hvZrcWIvjZLd/VBfr/ukrZVpl2lOqSsYUkH1OpfVtwJVOlRh+RVlFA9fWFQCsF7Fj8Pz X-Received: by 2002:a17:902:7409:b0:192:6019:a3d7 with SMTP id g9-20020a170902740900b001926019a3d7mr35956317pll.41.1672730616584; Mon, 02 Jan 2023 23:23:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672730616; cv=none; d=google.com; s=arc-20160816; b=vRGa60yoQX5GPsFDncM/LMog3D1+zKUGVRHElcXMJJJGCD9kRnUkYZOL+nOGflWtFg eCCbXH8MXyXMFtQDhh1uAkrgM132O17RB25LJZpRgLMLuIsAllN+/oWKxqybcR6djRJm O8u6OEGrRMREvvG/ihIY48Kz18iMD+/jMeOKxBfQj5RFSUbuAjem1gVbF6eYDfCflpQV pgSE27SgjFHD+I4tM7t+PZ/+2KtehcsoI1NalMrqUpb/fpr/z0pHE9glNyR/xwqN6m4P GBfXshY9ejGFM8x4/114Zbxz74N2ke/reuZxaJfNxj7Wd+DnNon/wpeyHld9fGt+E5bP dTJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3s0sKuYQYSrxGa9epdS6MVxcS8fJENNzbKxhMU2MFhk=; b=VZg/qZt1NBRwo/+4V6RhQlDAtxrxON0JCQYGADEcT88SR083y6hih/kaAt8yHxdcNk CbWWDwPjbXq5uTrMrs49W84GvCX5LlY2muCmlsXXYlNujhqgRcptXtr2+D3fObqQhMJA mfHLpgCVbyQKvuTJoZ8NIqRHkWohOdbe1CUR51TidnEoQYRt1elj/0vmQW4n4l7Mm+Jn LO9tIdo2L9TGGyPmEYq30IRfM7Fof51Wwfu96S8H1uo1k1dA1dumcOYSY8fv8OGr7/Pt /gnq4Tho78ucNk9xK0SRhWNkZzIQ+zz99XiwFAuwqrPdwrtuR4UcKdmP+L/9pwNf0L4Y NUZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b="NdxERQ/8"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w70-20020a638249000000b00478dfd40ef6si4907007pgd.768.2023.01.02.23.23.24; Mon, 02 Jan 2023 23:23:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b="NdxERQ/8"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236876AbjACHUy (ORCPT + 99 others); Tue, 3 Jan 2023 02:20:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230421AbjACHUi (ORCPT ); Tue, 3 Jan 2023 02:20:38 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2AFC295BE; Mon, 2 Jan 2023 23:20:37 -0800 (PST) Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3033Bm0r006888; Tue, 3 Jan 2023 07:20:08 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=3s0sKuYQYSrxGa9epdS6MVxcS8fJENNzbKxhMU2MFhk=; b=NdxERQ/85qbZ5MrkI4x8wsFLfD7tHjnsJb7BjCD5KUf1/lXl75Hx4Cd5N7Ab8pq+eJH8 TUocs+xvYNg9nrAiyus96P8PstLjpCFEQ4tw8Ft91JBxF4AktypFOrsFgCLvEpGsJR/6 viXiqstPFvUUXquD6fF8HlGrW6kmCvCqMIyBqarLvFeqB4quGM0p6aAw6uflEZ5WmctH LblD+3fWnskBiGJnARdvLs5v09BnBr7NdloR4Dnh8rGYUyWAZD1JaCTWw++jtCQGlyeE VKD2NyYEzPI3tbCv+sFu95vHhZnDUl1Uwb0lZK+85TxWrtm0gaLeQo7Q9PpSgh3q5DIk +w== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3mvc84kg45-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 03 Jan 2023 07:20:07 +0000 Received: from m0098399.ppops.net (m0098399.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3037K7ek025094; Tue, 3 Jan 2023 07:20:07 GMT Received: from ppma06fra.de.ibm.com (48.49.7a9f.ip4.static.sl-reverse.com [159.122.73.72]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3mvc84kg3m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 03 Jan 2023 07:20:07 +0000 Received: from pps.filterd (ppma06fra.de.ibm.com [127.0.0.1]) by ppma06fra.de.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 302L7nPH015003; Tue, 3 Jan 2023 07:20:05 GMT Received: from smtprelay01.fra02v.mail.ibm.com ([9.218.2.227]) by ppma06fra.de.ibm.com (PPS) with ESMTPS id 3mtcbfjh0g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 03 Jan 2023 07:20:04 +0000 Received: from smtpav03.fra02v.mail.ibm.com (smtpav03.fra02v.mail.ibm.com [10.20.54.102]) by smtprelay01.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3037K2XK46137728 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 3 Jan 2023 07:20:02 GMT Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 765AD20043; Tue, 3 Jan 2023 07:20:02 +0000 (GMT) Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 66CD020040; Tue, 3 Jan 2023 07:20:02 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by smtpav03.fra02v.mail.ibm.com (Postfix) with ESMTPS; Tue, 3 Jan 2023 07:20:02 +0000 (GMT) Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 55390) id 38F9BE095B; Tue, 3 Jan 2023 08:20:02 +0100 (CET) From: Sven Schnelle To: Willy Tarreau , "Paul E . McKenney" , Josh Triplett Cc: Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org Subject: [PATCH v3 4/5] rcutorture: add support for s390 Date: Tue, 3 Jan 2023 08:19:56 +0100 Message-Id: <20230103071957.222360-5-svens@linux.ibm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230103071957.222360-1-svens@linux.ibm.com> References: <20230103071957.222360-1-svens@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: CRvVxD9EVo0RwlGMdKp8HWLF8EMX08eA X-Proofpoint-ORIG-GUID: xOejIyzv6eQFJ1tCsULSX4utJAbErDDt X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2023-01-02_14,2022-12-30_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 bulkscore=0 priorityscore=1501 mlxscore=0 clxscore=1015 malwarescore=0 adultscore=0 impostorscore=0 mlxlogscore=797 phishscore=0 spamscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301030062 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753985178889316706?= X-GMAIL-MSGID: =?utf-8?q?1753985178889316706?= Add the required values to identify_qemu() and identify_bootimage(). Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens --- tools/testing/selftests/rcutorture/bin/functions.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/testing/selftests/rcutorture/bin/functions.sh b/tools/testing/selftests/rcutorture/bin/functions.sh index 66d0414d8e4b..b52d5069563c 100644 --- a/tools/testing/selftests/rcutorture/bin/functions.sh +++ b/tools/testing/selftests/rcutorture/bin/functions.sh @@ -159,6 +159,9 @@ identify_boot_image () { qemu-system-aarch64) echo arch/arm64/boot/Image ;; + qemu-system-s390x) + echo arch/s390/boot/bzImage + ;; *) echo vmlinux ;; @@ -184,6 +187,9 @@ identify_qemu () { elif echo $u | grep -q aarch64 then echo qemu-system-aarch64 + elif echo $u | grep -q 'IBM S/390' + then + echo qemu-system-s390x elif uname -a | grep -q ppc64 then echo qemu-system-ppc64 From patchwork Tue Jan 3 07:19:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Schnelle X-Patchwork-Id: 38304 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp4483585wrt; Mon, 2 Jan 2023 23:21:53 -0800 (PST) X-Google-Smtp-Source: AMrXdXv/ceAePjxlOWP6iZriz51JpnH2SHfuLQNrMmnFG0ycOBxRkfWZ4PANGtmE/fO7h1d3Q7PP X-Received: by 2002:a17:902:ccc4:b0:186:e434:6265 with SMTP id z4-20020a170902ccc400b00186e4346265mr54134254ple.2.1672730513107; Mon, 02 Jan 2023 23:21:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672730513; cv=none; d=google.com; s=arc-20160816; b=aQ9G90ik5pVVIXbhoF7CjsWaQrvraOzDFEAGmyOI5/y7Oj5U3awBYUAb7Yad2sFyPc VEexNL4fvm96+auLI7BLGLTGj0NWptZeHlUsWCEsX2OThclNfSDncCfMt9MV5ac/ioce IIlFWgiBr5RieIVdiibAwpcxbnNQKN0gj84Y0OABBC2RfTzLw93CBOxqa3d5tIVZ71Bg ZP4wnY3krBkE21ipQQopSVeAGYp30MlzRWfeKoCb+WWPyPfG0ysmXY8+pJB/yXV6+wEJ ehgLi9BGjLoU4A3M4UH7BQJ4IlGE7lYRzm55wKABTNj/0gw4AcHMzl3IcBdvB7syvL3w vUmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=BIIiIarhrMjfZ53epwzctaykif7mltHYkilT75A5OPY=; b=Pr1XN4QkpDXEB1jDErE+QWkKCap+f2f5fnXbEAgs7xrdvyjKztCcddC9YQuvhry1e0 Hg0Sz6r6oRMDkWeG3qjR5JGQ5U73lOUsTTQH1VD+soRiUlEkPMxDJp54XlN9AEOBWpnG sqsfEey9WGn4Che0/Dicf+/APnw6jsxo3BrV3cfLng74raKqcO7AGgUCpt2FcbSYoC5H YyLtxudkszPRtsfbk0kXvNlE1WI4Bwq8zL6ttKK+JIgaskdFGhB6gfV/6Lj/iZayTM0G bqEkqFaT00eBKB0FOUecnAlIJz9aY3cKyz48SLVS5nIuewrDL7yv/EQHsApckTQHqTEZ M8vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=KizFdBnl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q18-20020a17090311d200b001853ad3944dsi34823334plh.480.2023.01.02.23.21.41; Mon, 02 Jan 2023 23:21:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=KizFdBnl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236786AbjACHUo (ORCPT + 99 others); Tue, 3 Jan 2023 02:20:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231415AbjACHUj (ORCPT ); Tue, 3 Jan 2023 02:20:39 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A6C4B1E8; Mon, 2 Jan 2023 23:20:38 -0800 (PST) Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3036CGGr032696; Tue, 3 Jan 2023 07:20:08 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=BIIiIarhrMjfZ53epwzctaykif7mltHYkilT75A5OPY=; b=KizFdBnlOLpd9/LevRENWKUnt6tz9UI+RVlkfAKECJXG0+AJq8JVCUyMH3uBpfNSIv1N aHPgTEyQFLw48Hjwhdou0fBoykM09eCapOFk74wYAudadsh2Rd5CsTDCQ4iHvbqGixar OaaGDSc7EaFZvf8cJzJ81EpqtIXO74uM/Fxa1JC5/MgJncksz6wdSZfikkUsB+6IKO0L JmFRJ+krjc79KggR4xga/2HFqiQnTqL5Z9UiJo6Wx2LQpjuFi4rD7lApX861HEWqTK9F asg3grv4H4SZxcV4NEOWZL9T+D0qFhAN0hHmqtJPeLawp0auAtPwKSVUFoT88jXqCtR+ iQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3mvevns0su-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 03 Jan 2023 07:20:08 +0000 Received: from m0187473.ppops.net (m0187473.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 30378iA1040828; Tue, 3 Jan 2023 07:20:07 GMT Received: from ppma06fra.de.ibm.com (48.49.7a9f.ip4.static.sl-reverse.com [159.122.73.72]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3mvevns0s7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 03 Jan 2023 07:20:07 +0000 Received: from pps.filterd (ppma06fra.de.ibm.com [127.0.0.1]) by ppma06fra.de.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 302BoFlL008404; Tue, 3 Jan 2023 07:20:05 GMT Received: from smtprelay01.fra02v.mail.ibm.com ([9.218.2.227]) by ppma06fra.de.ibm.com (PPS) with ESMTPS id 3mtcbfjh0h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 03 Jan 2023 07:20:05 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay01.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3037K2sw46137732 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 3 Jan 2023 07:20:02 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B27BA20040; Tue, 3 Jan 2023 07:20:02 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A1F5A2004E; Tue, 3 Jan 2023 07:20:02 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTPS; Tue, 3 Jan 2023 07:20:02 +0000 (GMT) Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 55390) id 3B9AEE095C; Tue, 3 Jan 2023 08:20:02 +0100 (CET) From: Sven Schnelle To: Willy Tarreau , "Paul E . McKenney" , Josh Triplett Cc: Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org Subject: [PATCH v3 5/5] rcutorture: build initrd for rcutorture with nolibc Date: Tue, 3 Jan 2023 08:19:57 +0100 Message-Id: <20230103071957.222360-6-svens@linux.ibm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230103071957.222360-1-svens@linux.ibm.com> References: <20230103071957.222360-1-svens@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: dVNGR_Aw9M95AwyOFs1Lc5kuM-qS7uPg X-Proofpoint-GUID: ZB1-E_5NVP3HV5W2wiWC1YX4QVzIqMq_ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2023-01-02_14,2022-12-30_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 mlxlogscore=999 suspectscore=0 priorityscore=1501 mlxscore=0 lowpriorityscore=0 bulkscore=0 adultscore=0 spamscore=0 phishscore=0 impostorscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301030062 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753985070383046001?= X-GMAIL-MSGID: =?utf-8?q?1753985070383046001?= This reduces the size of init from ~600KB to ~1KB. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens --- tools/testing/selftests/rcutorture/bin/mkinitrd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/rcutorture/bin/mkinitrd.sh b/tools/testing/selftests/rcutorture/bin/mkinitrd.sh index 70d62fd0d31d..71f0dfbb2a6d 100755 --- a/tools/testing/selftests/rcutorture/bin/mkinitrd.sh +++ b/tools/testing/selftests/rcutorture/bin/mkinitrd.sh @@ -64,7 +64,7 @@ ___EOF___ # build using nolibc on supported archs (smaller executable) and fall # back to regular glibc on other ones. if echo -e "#if __x86_64__||__i386__||__i486__||__i586__||__i686__" \ - "||__ARM_EABI__||__aarch64__\nyes\n#endif" \ + "||__ARM_EABI__||__aarch64__||__s390x__\nyes\n#endif" \ | ${CROSS_COMPILE}gcc -E -nostdlib -xc - \ | grep -q '^yes'; then # architecture supported by nolibc