From patchwork Mon Jan 2 10:51:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Schnelle X-Patchwork-Id: 38085 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp4106892wrt; Mon, 2 Jan 2023 02:53:50 -0800 (PST) X-Google-Smtp-Source: AMrXdXsb6nDdcKlBuFScmdgHqPj/4+U4FcoMU6JmeXxWuHRcF7aH0zOwT4+pzFxsANvEObWqd3rl X-Received: by 2002:a17:902:82c4:b0:192:622a:ff9c with SMTP id u4-20020a17090282c400b00192622aff9cmr37486406plz.39.1672656830299; Mon, 02 Jan 2023 02:53:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672656830; cv=none; d=google.com; s=arc-20160816; b=iMcMeJ7sdDM5KUFya0bO6x5jI5nvTwxwQc3vMUO9YfNQv6KZylOmh8ZcmDr0rE9+r2 e7dk81KGJQXe2AO2pmpB7J5hqLggrHy+w8QqYy3gz/xb+pZ96D7Shp7Hpfkv18SmHqXB eafsxjrpIwThJJx3evUtYPpxrIIrGOy3OtFKprnVYmuJBHmTQ2U4zV1Ry5iGAtpnmC4K KDIL19DgBnwtRe+Yp6k04a7v3AX4X/Rxfgg4s+MmBumptE9PfIfszrRXiO1yAzaHQhzz y4XNdwY1tWyCcgBoH4PMKqASiu+Hf/tElsT7ZnywWajuB47CXJAMUX4ansBjcagrhYcL D1UA== 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=nXQClNo9BBzHtZjJdlJYysTX2QDzN0vb4cneS69AhjENQS9k5s2djccq63CpLpBBQB 5713jfzfb/uI0/jrQc1S2+5YCDkimLHKKuB2EBKPjaZwpU+XvWi1l2GIf9LobYKncKPs QRBH0CUp5838sYyRBaUHyy7rcitJA1d4EHxL2/84KFu1qH1WwhIift5Z3tNaIOeheQP3 y83gJ/Quatf/e0GmyUURhHHTZGfTiyw/ZkGLVG9iI+y1lVrjKglg8uLm3cQIm5rU35pL fWB0Kzo9oODa/pwan3qwsUs4gwP8+jlS0Q73J2qjcflKDddrgA4rgZz3zxQ86IC90T8q ZBLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=WdfxpVAD; 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 x20-20020a170902821400b0016d2e8c2233si27515302pln.333.2023.01.02.02.53.37; Mon, 02 Jan 2023 02:53:50 -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=WdfxpVAD; 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 S235980AbjABKwq (ORCPT + 99 others); Mon, 2 Jan 2023 05:52:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232592AbjABKwH (ORCPT ); Mon, 2 Jan 2023 05:52:07 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 478B760F8; Mon, 2 Jan 2023 02:52:06 -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 3029h56C021097; Mon, 2 Jan 2023 10:51:36 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=WdfxpVADB5wOqszCTbaBPAxYrRpMe/NuhHR8uzy9guk8dtplCjMNMKoMCsCoRp13JGeF IJSKrO7a0jsYgyw4DVHOXRjp8nTe0tRYmtEwg6sEonshj9MRPU3lWIbEHuU3PUbM0SIz ULgRD34w3ss+pDRRNJOmC1k+zpw5L88uRPwhuIqa62wtlOfg9XzX1wXyWJ864sOrllUC DBeEPZ2tcNiA/0SxmDzpgiezdiyiHq0t2Nldyb+bMA76L2YZECQDY1nxxPLf+2AbwOWx ag5weTGDpGrAqZVt5+kQMSjVPo+moN4RLvCKjFbMOz066fTmj/9IpDZlyoo81O8VBRWH Hw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3mtxhhewcq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 02 Jan 2023 10:51:36 +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 302Ai8w9020833; Mon, 2 Jan 2023 10:51:36 GMT Received: from ppma03fra.de.ibm.com (6b.4a.5195.ip4.static.sl-reverse.com [149.81.74.107]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3mtxhhewc2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 02 Jan 2023 10:51:35 +0000 Received: from pps.filterd (ppma03fra.de.ibm.com [127.0.0.1]) by ppma03fra.de.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 3018xKEB023584; Mon, 2 Jan 2023 10:51:33 GMT Received: from smtprelay06.fra02v.mail.ibm.com ([9.218.2.230]) by ppma03fra.de.ibm.com (PPS) with ESMTPS id 3mtcq6hp9w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 02 Jan 2023 10:51:33 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay06.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 302ApUrK18743610 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 2 Jan 2023 10:51:31 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CD34620043; Mon, 2 Jan 2023 10:51:30 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BC58C20040; Mon, 2 Jan 2023 10:51:30 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTPS; Mon, 2 Jan 2023 10:51:30 +0000 (GMT) Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 55390) id 85F19E08FE; Mon, 2 Jan 2023 11:51:30 +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 v2 1/5] nolibc: fix fd_set type Date: Mon, 2 Jan 2023 11:51:08 +0100 Message-Id: <20230102105112.1661651-2-svens@linux.ibm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230102105112.1661651-1-svens@linux.ibm.com> References: <20230102105112.1661651-1-svens@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: zBRoqc5Ry0zBxrkn3BIC6xCGNdU7U9fa X-Proofpoint-GUID: zx343A3Dwe0xR0F3I-Ihc-GjkGigbHHp 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_05,2022-12-30_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 lowpriorityscore=0 spamscore=0 phishscore=0 priorityscore=1501 suspectscore=0 bulkscore=0 mlxscore=0 clxscore=1015 malwarescore=0 adultscore=0 mlxlogscore=818 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301020096 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?1753907808213896273?= X-GMAIL-MSGID: =?utf-8?q?1753907808213896273?= 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 Mon Jan 2 10:51:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Schnelle X-Patchwork-Id: 38086 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp4107122wrt; Mon, 2 Jan 2023 02:54:49 -0800 (PST) X-Google-Smtp-Source: AMrXdXuv26s43uhHxxpqN4AeQO5s3ZLb9EPW4jxrYW/yzjs5nAfW7b1ftq7vua/w4xSp2CmU1v4X X-Received: by 2002:a17:902:6a81:b0:191:3808:14b0 with SMTP id n1-20020a1709026a8100b00191380814b0mr43311150plk.4.1672656889212; Mon, 02 Jan 2023 02:54:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672656889; cv=none; d=google.com; s=arc-20160816; b=RzMWGutXzZ68go8b+HLmSSGZd/0LBqgPJWiqCB7AcpMUpbvd2RMTf8AO8H4DW/mycQ 6Sbl8YBow7gXi2pOeOAi+0gXM/mN1K2khmuSnzvUZb0J7hW6/4JUA0tzyXYlLC/xjrQc kJKtq1NwjksceAj7dykpCVVSjZXNxWtuPizs5fNppeLarZbSsWcTPVZi4OvzVIhw3Y9R LJVsHJ3HyH7OXAgi5HO5A5IuzENFAZfcMLvPumvqKEfRJfPgTGlmn6Xxno7ZvXpkkeR4 0JEUqBAZ2KQpqzDEJCJ0HijttvkzFgI4TBxz/IZv6rEk4ppqAyYZ/7i1+yMXJVfzqKCD L85Q== 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=nAKMIu0WKzF2mKkWHHuX95QPtvqwcG7iKmnBAv6vac4=; b=gJX1t/Qk8kRd+1t46enQ4XzT7fI3dlgZsGcDsX8iprEX2HjTkr5FJNA6mw4d0PgNY0 Oex32OCyeejhl9UrUbJld92IKgYheVYwvmx/1PLFgSGUq63SLVZf10V2spBih68xXM75 LMWMwVnP/Ey2jjurqljNOF2Sqfl/KJ+dEUhAj0sY4omgkcGomruhJXJAekSr8qBmsO1l 2gU+rz1uOHjSvEIkmkWnLEskwfU9mO7NLSAAQJJwDZuUJx6QyBNlVUz+bynuH/HLUsRi TbxMh94RVIudf4QIwHlvKH4i8QKHHEEbQFVXQg8Hz2VFhMyDI7sM2KmoCUQImFhTBP6e acwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=F93nyTyv; 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 n7-20020a170902f60700b00179cf094dccsi16344161plg.526.2023.01.02.02.54.37; Mon, 02 Jan 2023 02:54:49 -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=F93nyTyv; 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 S232903AbjABKwc (ORCPT + 99 others); Mon, 2 Jan 2023 05:52:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231730AbjABKwH (ORCPT ); Mon, 2 Jan 2023 05:52:07 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3DD625F4; Mon, 2 Jan 2023 02:52:05 -0800 (PST) Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3028CtLP011323; Mon, 2 Jan 2023 10:51:36 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=nAKMIu0WKzF2mKkWHHuX95QPtvqwcG7iKmnBAv6vac4=; b=F93nyTyvP53JYy3jXVj+1iwpzBCQP692uPcmKm8uv8E8GDmITo/UyBnz+UNr9wDTLa9B xYJaZTmeias3bM810ypMe664AgGYThkqsgT4TCNFwL+aLwfeSX+R0cA5ENzD5hQwDc4M uAXO5Oucrr9Qyvpjq/ubH4AErn4J8AKX7rhE0Kb46V5R6BGuEuoiiqeyuAYOI54HiIGR mj9/C/B8pBO+7b90k/dxjGyv0kTycwy00QoG1QbuPhQEVeb6ISgMsQg0RPmZCQHqaqJa Eqh9XlOXaaF5ltKVMGWOTp1uoRdy9j7Vfq5TiNVBOWQ1kfqmv5rOdmIxI3woOCdEnJ1l Cg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3mty836cb8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 02 Jan 2023 10:51:36 +0000 Received: from m0098416.ppops.net (m0098416.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 302AkGFS017701; Mon, 2 Jan 2023 10:51:35 GMT Received: from ppma06fra.de.ibm.com (48.49.7a9f.ip4.static.sl-reverse.com [159.122.73.72]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3mty836cas-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 02 Jan 2023 10:51:35 +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 3017rFwg008371; Mon, 2 Jan 2023 10:51:33 GMT Received: from smtprelay06.fra02v.mail.ibm.com ([9.218.2.230]) by ppma06fra.de.ibm.com (PPS) with ESMTPS id 3mtcbfhpu3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 02 Jan 2023 10:51:33 +0000 Received: from smtpav06.fra02v.mail.ibm.com (smtpav06.fra02v.mail.ibm.com [10.20.54.105]) by smtprelay06.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 302ApUnB24248798 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 2 Jan 2023 10:51:31 GMT Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D019B20040; Mon, 2 Jan 2023 10:51:30 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B497B20043; Mon, 2 Jan 2023 10:51:30 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by smtpav06.fra02v.mail.ibm.com (Postfix) with ESMTPS; Mon, 2 Jan 2023 10:51:30 +0000 (GMT) Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 55390) id 88D4BE0914; Mon, 2 Jan 2023 11:51:30 +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 v2 2/5] nolibc: add support for s390 Date: Mon, 2 Jan 2023 11:51:09 +0100 Message-Id: <20230102105112.1661651-3-svens@linux.ibm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230102105112.1661651-1-svens@linux.ibm.com> References: <20230102105112.1661651-1-svens@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-GUID: KbhZ5tljGJ1BLWA30PQFGa7SzYpYME9h X-Proofpoint-ORIG-GUID: ISzJ9NWfRaGnCLHiLwfQabSSFar6Q0JN 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_06,2022-12-30_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 suspectscore=0 lowpriorityscore=0 clxscore=1015 mlxscore=0 bulkscore=0 adultscore=0 spamscore=0 mlxlogscore=416 phishscore=0 priorityscore=1501 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301020096 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,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?1753907870165454334?= X-GMAIL-MSGID: =?utf-8?q?1753907870165454334?= 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 | 213 +++++++++++++++++++++++++++++++ tools/include/nolibc/arch.h | 2 + tools/include/nolibc/sys.h | 2 + 3 files changed, 217 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..df96d8f830a7 --- /dev/null +++ b/tools/include/nolibc/arch-s390.h @@ -0,0 +1,213 @@ +/* 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 */ + "la %r4,24(%r15)\n" /* environment pointers */ + "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..fcded65b98d7 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-s390x.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 Mon Jan 2 10:51:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Schnelle X-Patchwork-Id: 38082 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp4106722wrt; Mon, 2 Jan 2023 02:53:07 -0800 (PST) X-Google-Smtp-Source: AMrXdXt9wUELGJq4QCs+yKEtDq+h5SX0bvDgDGLFP2e5+87RpTCVDUmOpUQUlXinURp7gA4xoNk6 X-Received: by 2002:a05:6a20:499d:b0:a3:2244:1d2d with SMTP id fs29-20020a056a20499d00b000a322441d2dmr44624501pzb.52.1672656787089; Mon, 02 Jan 2023 02:53:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672656787; cv=none; d=google.com; s=arc-20160816; b=i1ysw5Hl/49wfMEGI8vnGZs//ZWKW9U0rTOIb+PL9HZPN5UVAZj8+9STjHYZUFzm1D O5qbclBtg8fHUXKD/kkaFasfTpdbpiW86HmqIl5u90qY6D+LfevihgP+8tK7QuT1aa/W qrN45GV+86aXHG1e6xhREULz6XpncVE1tneLS9GpD9s/aF/QZ7N0Nqu2mqHDi/KsCDVx y5YTBdDAly4g5YJxbSOzP2pbzubWPUMDxvPC9FhcS3ooL/aUq4nS+57Vkl2ZQ8tU+QIy ql1/7woaxLYj/B/BY8s/ckIm5Om/Y0uXuXwVHMZnrQ/ydfMNEuTVGZU9n5Yiya0JJiZQ LLHQ== 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=oBBJYXpx6bifIYA3okPivgA9Uco6qcNHDixWQhndEwXqRv2nm/5EhNDqKxgln4g9R9 X6dA7OGDQBEpMr94amgRTsnJ8c78h0LqD2v9GrMzGyLRVInp19GzIoZXOyFQ+N5psntK tz5k2b+kQX5Z0LgmIuRvjGhrE2aTKczdRWBN1MfEAQIFsx2ImO3qioS/Hn3NuX+P/zlG beXuqP1Dj3ZkvIAj45kldm8ATVnp/fbwWlhqJ3kLkYrqrIuTfrloC0SarR5NiFAC+NZF e/MCk2qN1iXtJIbi6x7HWi97lFRmOAR0IbWcOaORmY5BQpG8ehT7yHk7IdWYJGBeEPiC xhMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=dNbgR148; 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 v29-20020a63b95d000000b0049d55f8b9fbsi14189385pgo.12.2023.01.02.02.52.55; Mon, 02 Jan 2023 02:53:07 -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=dNbgR148; 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 S232884AbjABKw2 (ORCPT + 99 others); Mon, 2 Jan 2023 05:52:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232859AbjABKwH (ORCPT ); Mon, 2 Jan 2023 05:52:07 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFA29F34; Mon, 2 Jan 2023 02:52:05 -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 3026milS025196; Mon, 2 Jan 2023 10:51:36 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=dNbgR148MzviHmY/ntaFnuoMlY95OMUATD7plfbM4QUDmsgY2mErqL80KFpn2vzewG09 XxoRwqImM2LeBjqWNaMpBVWwOTbFwfpNXWoMQqNZxuc9PPSWU1Yc2TsUax1vxmKdYdnN wF/mvh3pMBpCIjUD3mnhswliZX8/mIo1pPJ7EggooibVXAKUnux6k1BB+Pz3JDWo6fY6 fp5pUROW9q4D4YABRmzWpV6yzUF1GLx70pEKCrjSR2DTAnhdk2QFSYWqnHzU8H/Xm2T+ 3q6t6HXJmhpfLIlgFk/W3AipjUn7sdZNTufoA5Xo1jGIdocxldFE/DpVLzmzZOzJ6RiQ FA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3mtxwr6tx9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 02 Jan 2023 10:51:36 +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 302ANcM0010021; Mon, 2 Jan 2023 10:51:35 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 3mtxwr6twj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 02 Jan 2023 10:51:35 +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 301NsPHu001030; Mon, 2 Jan 2023 10:51:33 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma06ams.nl.ibm.com (PPS) with ESMTPS id 3mtcbfaa5w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 02 Jan 2023 10:51:33 +0000 Received: from smtpav01.fra02v.mail.ibm.com (smtpav01.fra02v.mail.ibm.com [10.20.54.100]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 302ApVtI52887818 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 2 Jan 2023 10:51:31 GMT Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EA43320043; Mon, 2 Jan 2023 10:51:30 +0000 (GMT) Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D6A192004E; Mon, 2 Jan 2023 10:51:30 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by smtpav01.fra02v.mail.ibm.com (Postfix) with ESMTPS; Mon, 2 Jan 2023 10:51:30 +0000 (GMT) Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 55390) id 8B7DCE091C; Mon, 2 Jan 2023 11:51:30 +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 v2 3/5] selftests/nolibc: add s390 support Date: Mon, 2 Jan 2023 11:51:10 +0100 Message-Id: <20230102105112.1661651-4-svens@linux.ibm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230102105112.1661651-1-svens@linux.ibm.com> References: <20230102105112.1661651-1-svens@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: ZCButfgBNVqrpVsgIbAPLw4fwDSkngHP X-Proofpoint-ORIG-GUID: BcUpe2GXEWwX7vGXnztMn02sBscJZQaT 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_06,2022-12-30_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 malwarescore=0 mlxscore=0 lowpriorityscore=0 mlxlogscore=999 suspectscore=0 priorityscore=1501 phishscore=0 impostorscore=0 clxscore=1015 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301020096 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?1753907763433538689?= X-GMAIL-MSGID: =?utf-8?q?1753907763433538689?= 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 Mon Jan 2 10:51:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Schnelle X-Patchwork-Id: 38083 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp4106832wrt; Mon, 2 Jan 2023 02:53:33 -0800 (PST) X-Google-Smtp-Source: AMrXdXtvyrb6tJhUYb6UVr67Fzj7s5p/Tc31FtRBJWFmX607acWfVHBGn6sRBfLIDjV1AWI2MSui X-Received: by 2002:a05:6a20:1455:b0:ae:661c:5553 with SMTP id a21-20020a056a20145500b000ae661c5553mr61216741pzi.4.1672656813156; Mon, 02 Jan 2023 02:53:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672656813; cv=none; d=google.com; s=arc-20160816; b=qyC8LD8G0u31SaOKi8iwqeYDi269F/QpzlwyMJRkRI2PVuPBYTulSNZqogFDN//x05 qJ4JuMXeDLYbnBm/vuBsGReUlhaOoa7dPXcx8Vtdq1SLNgZJPbKf4dJJkqTIA8dUaZQ3 E9QLa7GvSYghPepBH1Sil8VdLxI02bHoV55P5HwPWnk5d9z1gTuC8Iriher6SGiRv9BD CggozV5GNxvFrwa7D/TliBjXAaXSLvPR7dKsSCDW5Ig5KThRON8QQcHks4c162c+K47Q 0Mc8TIKPOTd6QKv0iecrl0DcD1xsabxh22WCsogH1B6XmKN/r8wgCgAyNJ4wSGGJom5d TtZg== 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=VVhyw+rIyMdhPGJ4FO7WupxB+lKmFu9kSWL73PvzimH3KuTIj/cLDX+W/7n/O8FbKS rFOFi1vkqTwXZzedEH00APP3V80q4VS7p/+PrFntklghpYw3n6mIfUBFbi6VC0+Q6zXK Cl/RWCVZL8WSNoRj6X+Nj7H/PKu4hyNNtl3OSlRDD7wQFKPyJ4w42o8obPlMk9uyVC5Z ggCnLqXHcelOuxKoTkMaXERQaJ+cNAyxj6kdnBcn7+/UQvvwOCoPkD0AKWzfhZXl2Ojd Z5IOrEo62DmlOTUTivfjdcUz5tL25ZiKo5f5TWple0MWtaSa81o0MQTtRgF0BYbtkqXv ttAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=U7C+x5CF; 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 s7-20020a639247000000b00477be505f98si28316143pgn.867.2023.01.02.02.53.21; Mon, 02 Jan 2023 02:53:33 -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=U7C+x5CF; 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 S235711AbjABKwh (ORCPT + 99 others); Mon, 2 Jan 2023 05:52:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232277AbjABKwH (ORCPT ); Mon, 2 Jan 2023 05:52:07 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E137260EE; Mon, 2 Jan 2023 02:52:05 -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 3028wM5E021196; Mon, 2 Jan 2023 10:51:36 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=U7C+x5CFg69duxkXvi6yXSsP9vA8KzMDbbzvigHY5glWVOKQ895p7uGlrGsnyBeMAVMo fFgWtgMPcr6STMKjn8nfzHzOqHJSBkURidO1ulYWoY9fqsYsdNQM1TOWQmL7B4kHkgAI xuCSbWxQnYaiUwpPiJME03DDB2vzqto29gVR/EYkXbkNtYDKGYHIdALEnokHVIFibcTA B5zU2/LDPhE0TPF3zB0DJXWabRK23D2uCWdsQIUdzISWN8cfTnTjG/CRA5XVLLfjfg8p sdbDwKYZIClfnmcd6p5B5TYAHLtAytvoaWY+nkL6VLBxtEU25EUTKVS/yZfjYlwDTslH Tw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3mtxhhewcm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 02 Jan 2023 10:51:36 +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 302ApZRJ008694; Mon, 2 Jan 2023 10:51:35 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 3mtxhhewc1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 02 Jan 2023 10:51:35 +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 301Klw1W017430; Mon, 2 Jan 2023 10:51:33 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma02fra.de.ibm.com (PPS) with ESMTPS id 3mtcq6spay-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 02 Jan 2023 10:51:33 +0000 Received: from smtpav03.fra02v.mail.ibm.com (smtpav03.fra02v.mail.ibm.com [10.20.54.102]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 302ApUJ148562562 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 2 Jan 2023 10:51:30 GMT Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CBCDC20049; Mon, 2 Jan 2023 10:51:30 +0000 (GMT) Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BC35B20040; Mon, 2 Jan 2023 10:51:30 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by smtpav03.fra02v.mail.ibm.com (Postfix) with ESMTPS; Mon, 2 Jan 2023 10:51:30 +0000 (GMT) Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 55390) id 8E382E0959; Mon, 2 Jan 2023 11:51:30 +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 v2 4/5] rcutorture: add support for s390 Date: Mon, 2 Jan 2023 11:51:11 +0100 Message-Id: <20230102105112.1661651-5-svens@linux.ibm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230102105112.1661651-1-svens@linux.ibm.com> References: <20230102105112.1661651-1-svens@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: HzOfUN5fhcP2wwM7GxomgBUxearBffqr X-Proofpoint-GUID: DgcUssCjql7x5Wpk9pzy_pRbLpGSo-1T 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_05,2022-12-30_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 lowpriorityscore=0 spamscore=0 phishscore=0 priorityscore=1501 suspectscore=0 bulkscore=0 mlxscore=0 clxscore=1015 malwarescore=0 adultscore=0 mlxlogscore=797 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301020096 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?1753907790905412454?= X-GMAIL-MSGID: =?utf-8?q?1753907790905412454?= 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 Mon Jan 2 10:51:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Schnelle X-Patchwork-Id: 38084 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp4106882wrt; Mon, 2 Jan 2023 02:53:49 -0800 (PST) X-Google-Smtp-Source: AMrXdXv4xuaxLnunMnbb1zs0VgUeKX016Ho1PqJx1n0kTogz1GsUlLjL0vxSfKR9/ODOsJ3p2PqJ X-Received: by 2002:a17:907:8b11:b0:81b:fbff:a7cc with SMTP id sz17-20020a1709078b1100b0081bfbffa7ccmr34686751ejc.18.1672656828845; Mon, 02 Jan 2023 02:53:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672656828; cv=none; d=google.com; s=arc-20160816; b=zf7/Q5QTk6Yiwj+2p+eb61wTkdqlyRkelgNcjQ6wLLshhqVJM4/mF0fseRZyOUHppT M0M9diSFvk62u9hGYseMQmawutXmf3T/itCorFA4NIOgfTtgw6XDEL0Mnfvqaa445m2k DM3vFJLoe5UYSTTz5AI118Gku3hqOrsHUc8NJ48f5OTpEvi8NcDd9oNGL+gm287PKw6h moLVIkEJJY/7oyZG3IMqQhCarP6Sp+TPg2cnogeWCWhkdv4CBaMzS7BMTkQj5RtfnlUa L9ny1gaVYuN/TIcGxHhYDdxyUPhjsInauYJareqf6O5EGvBdI86o6WqIeEnntr6aXiO2 hWDw== 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=A3YGYAgFHF9xhWIVyIs5aV92TB2ADQxqyWRHpULIHbQPfYnnzaZDHdjefPYaah21OE Zwnk9xPM/wXvG9FvymrSoesgCgXoey98svD3XuyyC5OWKA9YzA97ubU3Cq6PEtVxDu1Y GbqBZj6awSUeLaaby+DzZ8H6unAudwd6G5Vn1gAvWjQ/i7Lq397onXf28TYCgSx+ey14 C3XeKeq0j0IWD1EhcyaotEAFg/7XvKTdvROrQWezWhiXQmSiEtenklUwLrp0fLf8Iiyo GTunCXlsHk2n3h35sFUwQI1AqumId5N6v+cf85TPHviOcruJVCTMJH6XCdwV5zMXCR2e Y22g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=o8kl92Ae; 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 sg7-20020a170907a40700b0078da42195c2si26118715ejc.547.2023.01.02.02.53.24; Mon, 02 Jan 2023 02:53:48 -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=o8kl92Ae; 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 S235956AbjABKwj (ORCPT + 99 others); Mon, 2 Jan 2023 05:52:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232568AbjABKwH (ORCPT ); Mon, 2 Jan 2023 05:52:07 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1177760F1; Mon, 2 Jan 2023 02:52:06 -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 3028X8kX024950; Mon, 2 Jan 2023 10:51:36 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=o8kl92AeLFzyrZmYuQhK/lsvk6c/CEtIfJpBd8zPzzhyGrdHy47QS5gl7DOP5Q06s/uQ GLQShNfxbk/Aa9RxlGAiScd1rpnHswHnSR16QSQXonu4aKQOLPWAAU/jftpwQvfzSiYQ +9RYTNbpKt7p4t1n2KYrxAeI3otIQD17X7qFBpsf2aeDzWWAMz1ssc0rLaHPgk+orRSq 28QtvhMIX7hCbalquE41yhvfCIrU3S1YM30o8z62KaiMinxVOaIky/4oFzyDbcML0pFF kxeA306XRYmSEA+rnZgHxcPINHX6VBoR6FAXRsHdp9eM79f61/ik1cmS4muFHlblwYPi RA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3mtxwr6txc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 02 Jan 2023 10:51:36 +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 302Ai70I012196; Mon, 2 Jan 2023 10:51:35 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 3mtxwr6twp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 02 Jan 2023 10:51:35 +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 301NsPHv001030; Mon, 2 Jan 2023 10:51:33 GMT Received: from smtprelay01.fra02v.mail.ibm.com ([9.218.2.227]) by ppma06ams.nl.ibm.com (PPS) with ESMTPS id 3mtcbfaa5x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 02 Jan 2023 10:51:33 +0000 Received: from smtpav02.fra02v.mail.ibm.com (smtpav02.fra02v.mail.ibm.com [10.20.54.101]) by smtprelay01.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 302ApVDr51184098 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 2 Jan 2023 10:51:31 GMT Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2C11C20043; Mon, 2 Jan 2023 10:51:31 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 181612004E; Mon, 2 Jan 2023 10:51:31 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by smtpav02.fra02v.mail.ibm.com (Postfix) with ESMTPS; Mon, 2 Jan 2023 10:51:31 +0000 (GMT) Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 55390) id 90D5BE095B; Mon, 2 Jan 2023 11:51:30 +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 v2 5/5] rcutorture: build initrd for rcutorture with nolibc Date: Mon, 2 Jan 2023 11:51:12 +0100 Message-Id: <20230102105112.1661651-6-svens@linux.ibm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230102105112.1661651-1-svens@linux.ibm.com> References: <20230102105112.1661651-1-svens@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: taqdwwMzuu-Bm8tIOuLH-ijhHv4fAxRk X-Proofpoint-ORIG-GUID: ETrvameOf56_uOZXMaJz-Pchzz4PuPMl 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_06,2022-12-30_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 malwarescore=0 mlxscore=0 lowpriorityscore=0 mlxlogscore=999 suspectscore=0 priorityscore=1501 phishscore=0 impostorscore=0 clxscore=1015 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301020096 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?1753907806982150237?= X-GMAIL-MSGID: =?utf-8?q?1753907806982150237?= 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