From patchwork Fri Dec 9 14:19:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Schnelle X-Patchwork-Id: 31776 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp805764wrr; Fri, 9 Dec 2022 06:23:54 -0800 (PST) X-Google-Smtp-Source: AA0mqf60ZLV9Np7OTcxC34bOZN9ho90DjVOWIcfu65e4UUOJ20GBCH7tqFPhavl8cFwtdhdu/phM X-Received: by 2002:a17:906:480b:b0:7c0:aabd:fef0 with SMTP id w11-20020a170906480b00b007c0aabdfef0mr4978407ejq.17.1670595833993; Fri, 09 Dec 2022 06:23:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670595833; cv=none; d=google.com; s=arc-20160816; b=KBgKRSsqHQIzr9INrMekP6bA3CM+PYVI9GO32vjE6IlZIvXUcNVLZQB/RMg8g/7krC RHaUPetT4qZdxMY9zZIEk98T603kH8csajXvr7mwQA9p9Vy7Pry/AUtpIKXAC9HSeyf5 BcFxmBIkPEQFGW1kwTI8mCmotWv35qhdaC/9s1hIEgCkeZPPiC7l34XH633Bqf0JOgnD 3txenXIehWBvk03haZiXC0G/Y2NVuPwgaNrWACkRDARGAlAszrJY1qzKEXSrkhvAG3Zy hlj6ci3wqA7PHz9xJipn6IGJsVIzl7LI8C7yEpshcCn4tI0ocGbk1A0yDK42nCaI5igK z9Vg== 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=yCFZK9RTtTQgmElEHhuuT1bqVaXCwmXYYXArdLpSKgJJpUFF6cJJpatHObLLsw7hCS M2wB5kXGvFaiEdLtWFTP8JNzLtujNQL7h7RFiIz3/A21UmtRqtGu/bj/vHkzOT8LlPOV Wis81COMQx1QV1OYGY8TMZxptea9egoieMhuiRvjWLaYN0eOmr/oCTwU6hdD7zHSkEK3 k4mCcZMijfiMG/JbCz74awz0TqWFrHtxypkBdOa7XvYB+kJCbAfluvPIFaBV0iK6tQdl htV0at8TsxmgBVIolOH0KEq9ITCo9mDLkwKZ98pFb5StXOrLAtJrpIEUKUSv7fliKuZL +nfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=rKnCob3A; 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 go38-20020a1709070da600b007acc6769292si1466583ejc.365.2022.12.09.06.23.29; Fri, 09 Dec 2022 06:23: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=rKnCob3A; 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 S229556AbiLIOVH (ORCPT + 99 others); Fri, 9 Dec 2022 09:21:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229809AbiLIOUe (ORCPT ); Fri, 9 Dec 2022 09:20:34 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A885877229 for ; Fri, 9 Dec 2022 06:20:28 -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 2B9DSfuA015203; Fri, 9 Dec 2022 14:19:59 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=rKnCob3AcYA4VWcr0jMEFhZBjo3GQX05PPSy1fDDAzVXXym1+aCCQFpHkVZZaRoJlfXn N5HMBfeBsMRJuCO2BrRDyGLi4jvrj0S0rhVIs9Ta9qNtp2VBZviZ+KGAq9gqd1/mBFYK GE1blpLWGTUQHCl0nzxTFf90CYC8TyLTvmV7OamtTM1Zry2eiqyMpKl8CoeSBRInTEg+ Zd4QsHFDgBLFh9LvGnTqbQDvwaIVHBz43HKIUL5HuaVFSNRY9RzISJMb78k9NGLKK5Fa o0MZWUPsqQ3JucQHaeba/45KFrFvxRLk1veXCDtLpLeCXiJQCW0miLxPhuhUfwEL6j1j cw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3mc10qrfmr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 09 Dec 2022 14:19:59 +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 2B9E8jqQ007139; Fri, 9 Dec 2022 14:19:58 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 3mc10qrfm0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 09 Dec 2022 14:19:58 +0000 Received: from pps.filterd (ppma01fra.de.ibm.com [127.0.0.1]) by ppma01fra.de.ibm.com (8.17.1.19/8.16.1.2) with ESMTP id 2B98fPHI012203; Fri, 9 Dec 2022 14:19:56 GMT Received: from smtprelay03.fra02v.mail.ibm.com ([9.218.2.224]) by ppma01fra.de.ibm.com (PPS) with ESMTPS id 3m9pv9va2g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 09 Dec 2022 14:19:56 +0000 Received: from smtpav03.fra02v.mail.ibm.com (smtpav03.fra02v.mail.ibm.com [10.20.54.102]) by smtprelay03.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2B9EJrRc35520970 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 9 Dec 2022 14:19:53 GMT Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9395320049; Fri, 9 Dec 2022 14:19:53 +0000 (GMT) Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 802F820043; Fri, 9 Dec 2022 14:19:53 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by smtpav03.fra02v.mail.ibm.com (Postfix) with ESMTPS; Fri, 9 Dec 2022 14:19:53 +0000 (GMT) Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 55390) id 20AEEE04E0; Fri, 9 Dec 2022 15:19:53 +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 Subject: [PATCH 1/5] nolibc: fix fd_set type Date: Fri, 9 Dec 2022 15:19:35 +0100 Message-Id: <20221209141939.3634586-2-svens@linux.ibm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221209141939.3634586-1-svens@linux.ibm.com> References: <20221209141939.3634586-1-svens@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 7Qyq2cx7bpOHLmLwr-KKXQehAwLiAXyF X-Proofpoint-ORIG-GUID: sH1rVFEgkYaza_Lyurx13okq7KQ7_Z39 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=2022-12-09_08,2022-12-08_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 mlxlogscore=815 spamscore=0 bulkscore=0 phishscore=0 priorityscore=1501 impostorscore=0 adultscore=0 lowpriorityscore=0 malwarescore=0 clxscore=1015 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2212090108 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?1751746697199611668?= X-GMAIL-MSGID: =?utf-8?q?1751746697199611668?= 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 Acked-by: Willy Tarreau --- 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 Fri Dec 9 14:19:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Schnelle X-Patchwork-Id: 31778 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp806111wrr; Fri, 9 Dec 2022 06:24:38 -0800 (PST) X-Google-Smtp-Source: AA0mqf50W706FhPxicoFCzqT6JDA5+EOOsBgyJWiRRkH4hToiwd7sWxRD/KfdWzbQnyIZjGXnBir X-Received: by 2002:a17:906:2493:b0:7c0:a49a:1 with SMTP id e19-20020a170906249300b007c0a49a0001mr4854030ejb.71.1670595877983; Fri, 09 Dec 2022 06:24:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670595877; cv=none; d=google.com; s=arc-20160816; b=VCmBCfEx2I8XE8M8dKcB+NgOSg4M7xE8ZEgDQdL0QdNxcOEcYq39RImly3gTVcniZN VIoceSo/BxHLWEmHRPBxFrgfqOKr6oVMOcajDBdtO/ojaH6Z4aCAGuKka8ykZMGHyrRw itMp4VsvO33OzdoA4LD3m3n1ZhKxDI5NpLFwgDI6VGGdE2UmXYBowBN2ibSPULYZCX+/ bObEVIcEQssizLrxRXzgKYoB2k4O4RAzTR2E9oFxFOYwaU6FUvwuGCB/HMa3x3N9oSnj YPIiXzF2rPGGl4BG9WDzRef7a0zi6GDiygCzcArpvaeaqYAxeBNBsUhiJXbC29W7dDcG Yb1Q== 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=LkykSfD2VAhiIUO67DT4ELhWwncf8pBJcJay0JhVkzM=; b=jRnsHX1KKq3r9UakueYdpZVCv8i8DlL0GFLGPaQjUfWEw9CDrG+juzXl6D/Ef3c00e Oful3NdB/NDuztUeiOt0WxGnMCy05lCUP+5svy/qfMRyPrlN0rA5fnHsGlFghvRdzaRD MTmPoKo0w6xZYpqv30QA8PGkg+3Txr3GeLv3o9lt8lu0kpsQ8EP6GikGeeLl7UJTFvP2 OKK7qpOn3AkMHloUOr0mYbpSjtJcqtuGOkMbxTXecvseihSQizEkb9uBeC5BoWAgOVY2 uJNRTU1Oh18NdHWpz4WpxKB+JzeJXL/xogHrgUIr+IKMlv6ygJV3Dw+1PrMhRTHhGip1 ul0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=UN1JhaK9; 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 y7-20020a50e607000000b00469e7011949si737807edm.508.2022.12.09.06.24.14; Fri, 09 Dec 2022 06:24:37 -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=UN1JhaK9; 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 S229960AbiLIOVC (ORCPT + 99 others); Fri, 9 Dec 2022 09:21:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229746AbiLIOUd (ORCPT ); Fri, 9 Dec 2022 09:20:33 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E193413D06 for ; Fri, 9 Dec 2022 06:20:27 -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 2B9BmKiE018181; Fri, 9 Dec 2022 14:19:59 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=LkykSfD2VAhiIUO67DT4ELhWwncf8pBJcJay0JhVkzM=; b=UN1JhaK9C2YBTKT0afQu1Gx5uZBlrKd62HLiplyGUudgeeOUTguO5l+pX0wFX3zYvfKd OZYf9+eqt29E7FHxjhF4Z9CIaYZdo2j9ziMumHwDfnwv64ZWEjV998f6wZ5NDd5qoM5Y wPBZPTgDNmxjdmCv/C0SCOhgzcferJVMMxQaoEhLDEOvhFYlT2/YUAzkYBedYJpyV0yS wvFQBocN3uNWFU72BmCXHZRhcz/+qzXLnLuXItN2PZ+6UA9EvFXacbyqgNdo+tt54seb xXyKA5Ge9TsT2JFg9oV5DSj+9w34BlHXTvnXgf5PobXagJDidOz011hGUbUXucQ9PipB oQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3mbuw96q7a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 09 Dec 2022 14:19:58 +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 2B9DBsNI016517; Fri, 9 Dec 2022 14:19:58 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 3mbuw96q6t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 09 Dec 2022 14:19:57 +0000 Received: from pps.filterd (ppma06fra.de.ibm.com [127.0.0.1]) by ppma06fra.de.ibm.com (8.17.1.19/8.16.1.2) with ESMTP id 2B98drpe003168; Fri, 9 Dec 2022 14:19:56 GMT Received: from smtprelay03.fra02v.mail.ibm.com ([9.218.2.224]) by ppma06fra.de.ibm.com (PPS) with ESMTPS id 3m9m6y4f9j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 09 Dec 2022 14:19:56 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay03.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2B9EJre246989728 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 9 Dec 2022 14:19:53 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8E38C20040; Fri, 9 Dec 2022 14:19:53 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6D1C62004B; Fri, 9 Dec 2022 14:19:53 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTPS; Fri, 9 Dec 2022 14:19:53 +0000 (GMT) Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 55390) id 236F2E05A5; Fri, 9 Dec 2022 15:19:53 +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 Subject: [PATCH 2/5] nolibc: add support for s390 Date: Fri, 9 Dec 2022 15:19:36 +0100 Message-Id: <20221209141939.3634586-3-svens@linux.ibm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221209141939.3634586-1-svens@linux.ibm.com> References: <20221209141939.3634586-1-svens@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-GUID: mXMdv1i3nXVagTk67ABuzMgADFzC5BH8 X-Proofpoint-ORIG-GUID: r-8Usf_-yPH-rmYZPzkkzlQ3pOCrATWq 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=2022-12-09_07,2022-12-08_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 impostorscore=0 suspectscore=0 bulkscore=0 mlxscore=0 clxscore=1011 lowpriorityscore=0 adultscore=0 spamscore=0 mlxlogscore=428 phishscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2212090108 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?1751746743619166568?= X-GMAIL-MSGID: =?utf-8?q?1751746743619166568?= 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 Acked-by: Willy Tarreau --- 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..34b744e2f7d6 --- /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 */ + "lay %r15,-160(%r15)\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 __maybe_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 Fri Dec 9 14:19:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Schnelle X-Patchwork-Id: 31775 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp805402wrr; Fri, 9 Dec 2022 06:23:15 -0800 (PST) X-Google-Smtp-Source: AA0mqf7xkjpzDd0en2ecmngWe0+IyyzkmbU7W4FxNEy6LbmUgCLF3btVddMv2E6nKK/LfCOJ7Hht X-Received: by 2002:a17:906:6809:b0:7c0:e80e:5aed with SMTP id k9-20020a170906680900b007c0e80e5aedmr4837700ejr.16.1670595795409; Fri, 09 Dec 2022 06:23:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670595795; cv=none; d=google.com; s=arc-20160816; b=aniSIADXTqXbF8dGJdKCqrhak7hNhQI/zZBaAUjrowGV+18+zIPdJctiQAlcMQvy0Q s0IB9MtRBXsFR5mOe1CqNNoCVvVJ1eIUXMZYEyS8XgpuvowUuHPQ2ULqhRvEMWvjQazx GpUQKofbN1CremS/CXADUMLCumfhqUgbvcZlREvhJ+uGVcvfMZyJoycbXSbXqbik0gK0 umTzOyZObRWiYuoyiGHav8Pg+1e+0UP45F04KeSlgohYxjadHiFvNMQ3AHucUDOc786d ydp2/WPSCFPhmoZOjkc+LuVV3CfV4Qobjb+g6Ym7be/OlkTF+FojU5GlysT7tdvvZbOI VEqw== 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=NLY2nk/RTgGLXwvWYxIyqfEOsN9qmXgBPV44+fr+u84=; b=KF6slVTNDhgNDaRrLrpipMUpQMxHkoeA+hAyFE1St1FH0/dlhp4w58wiQj57kThMeh 51mCY6KajmFnN6alueO1HL2HVta4FquUXLUEBQgBq7ukw1nNjShLxsmH5rN1GrB4+rta s9DD3iCBMCcQcW2YCmsQh5jiLnlZR6FY6R0zyoi9RgmIuADRG6C+IIPH8Dhq4t5QGZsv 0/acW/+TsVyF0z7J0xqEK3BTS0/NqzeUtJzMDcRlNEMRl83YgkrpAQ2CJtA1e+Y3gSrp uJdahURibYCGUl8z3JFr29UKOyhOpwkJZ0p0rUpfjjO3BEfJRSCIfHjV58pVU4GQGj58 FyFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=UO+rIbBR; 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 du16-20020a17090772d000b00730aa841c5bsi1529797ejc.964.2022.12.09.06.22.49; Fri, 09 Dec 2022 06:23:15 -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=UO+rIbBR; 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 S230153AbiLIOU6 (ORCPT + 99 others); Fri, 9 Dec 2022 09:20:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229776AbiLIOUd (ORCPT ); Fri, 9 Dec 2022 09:20:33 -0500 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8D4C64D0 for ; Fri, 9 Dec 2022 06:20:27 -0800 (PST) Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2B9CFHoG013025; Fri, 9 Dec 2022 14:19:59 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=NLY2nk/RTgGLXwvWYxIyqfEOsN9qmXgBPV44+fr+u84=; b=UO+rIbBRFCOXdDPGYAWjz/40ZNYRnk51boKZ0xs5uiAlDee6oOZtbL8kQA+IyDGvQrIp m4x5kd6wWr5bd4Km9jQ/2OoeL4Cm0eg6+HNYm5pVv60CLzFY5Fa1kuT8o4uCsMOs1gAT PC0BqNJXK49sBT2PUbWcSaeAWZGtr6CbcRr++mn4j6XAQWb0E2WVAG5N+FwCOH8S123M cIxfVCZS2ojG5uyuJYPfNE00wayswj53h7pueKTMFjwkx/Gfya669yZVhEOjaHoYY1Mg nzR7vR0AYRVHQuG3cJhBt2tf4BiRjG/x3a9Yxwcdie+0XQHByPRKi6gTre1ivpQRRX7t gg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3mbh9cpjvx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 09 Dec 2022 14:19:59 +0000 Received: from m0098421.ppops.net (m0098421.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 2B9E717C029129; Fri, 9 Dec 2022 14:19:58 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 3mbh9cpjv8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 09 Dec 2022 14:19:58 +0000 Received: from pps.filterd (ppma06fra.de.ibm.com [127.0.0.1]) by ppma06fra.de.ibm.com (8.17.1.19/8.16.1.2) with ESMTP id 2B98nSr2004304; Fri, 9 Dec 2022 14:19:56 GMT Received: from smtprelay03.fra02v.mail.ibm.com ([9.218.2.224]) by ppma06fra.de.ibm.com (PPS) with ESMTPS id 3m9m6y4f9h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 09 Dec 2022 14:19:56 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay03.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2B9EJrFv35520968 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 9 Dec 2022 14:19:53 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 70E7E2004D; Fri, 9 Dec 2022 14:19:53 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 602E920040; Fri, 9 Dec 2022 14:19:53 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTPS; Fri, 9 Dec 2022 14:19:53 +0000 (GMT) Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 55390) id 25F7DE0614; Fri, 9 Dec 2022 15:19:53 +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 Subject: [PATCH 3/5] selftests/nolibc: add s390 support Date: Fri, 9 Dec 2022 15:19:37 +0100 Message-Id: <20221209141939.3634586-4-svens@linux.ibm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221209141939.3634586-1-svens@linux.ibm.com> References: <20221209141939.3634586-1-svens@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: afVARQSgN9iijJur3VT0nw-G8teCnm7p X-Proofpoint-GUID: 0mHqzOLAkqv3ut9rNcvLu1BR2vNxeBdZ 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=2022-12-09_08,2022-12-08_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 malwarescore=0 mlxscore=0 lowpriorityscore=0 priorityscore=1501 phishscore=0 mlxlogscore=999 adultscore=0 impostorscore=0 clxscore=1015 spamscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2212090108 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?1751746656504211302?= X-GMAIL-MSGID: =?utf-8?q?1751746656504211302?= Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Acked-by: Willy Tarreau --- tools/testing/selftests/nolibc/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile index 69ea659caca9..92d8276bc226 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 From patchwork Fri Dec 9 14:19:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Schnelle X-Patchwork-Id: 31780 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp813306wrr; Fri, 9 Dec 2022 06:38:20 -0800 (PST) X-Google-Smtp-Source: AA0mqf6SiSXFr1xCN7J7XSZzzFEvcWb87aRHi4mSKY9PbYvQhqFn+u+ArJ07pAPk7RIhoUN3b+uH X-Received: by 2002:a05:6a20:d807:b0:9d:efbf:7851 with SMTP id iv7-20020a056a20d80700b0009defbf7851mr8161984pzb.6.1670596700474; Fri, 09 Dec 2022 06:38:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670596700; cv=none; d=google.com; s=arc-20160816; b=YgT7hzzb0DVd9+A+9+cuUE53MLEWTrRJvH+JIbdfUoGU75X5LtPWfRUcECHlu2Zo8D boyUljqq6AqOEtw4YwIGD4h9KXbfzxvYJCpGXQr18bkNrUQxOEAQjI++QPAQoUgEyKkf 9ouSFA4bRDpzl/WRA/NK9p3ZwdArYyBp36gcLKer/OKl3Vo09HZ/b09mh6/QIO6mFnNU lA40H7/E8Ugi9/p42J6gW5OeKf/WeuKv+8gtvPPtStHirVxKWGjO/l7lNphG4q1tc9UD rySpxfSEBhEFo5VtZAVRIqLSTQGmwhda/wI4Tp8rQDjBtQZChELfjmS0CxyFUYuK0PI8 rN8g== 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=vLTw9BPKSmUX0eLEKpZCzU/Se16Pvq2OyCNNBIXAXt8uqpZ1qUNDHiKWpSdsPWUJx3 79wWsIFxPpDwUxS26LVvFshsBBcMmTp/DF/hMsExxQL5CxzOmoQT7di3RasT8uJfw+5g kUiEC8P2Ms1H81bX9SONHPexYTAUUGDTi93c5J8lqqCuSdEHF+0Cl41y387ePRzESahX A7sVnR+Qi1HAADrOQE0VF3plQpL147fUgGEGAv4GFYJcJbSPfeOLlpQ3wEaqj4L1puKq yytuXMqMLoJI9vqtvWsQd2aMsh93erKxZGc5MoIrnWABtLZjk1pRFy3hv9d++bMadcll j9kQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=Q9HOSLtF; 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 s24-20020a656918000000b004770d61d2a9si1711259pgq.120.2022.12.09.06.38.04; Fri, 09 Dec 2022 06:38:20 -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=Q9HOSLtF; 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 S230171AbiLIOVP (ORCPT + 99 others); Fri, 9 Dec 2022 09:21:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229918AbiLIOUf (ORCPT ); Fri, 9 Dec 2022 09:20:35 -0500 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2894712090 for ; Fri, 9 Dec 2022 06:20:29 -0800 (PST) Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2B9Dn4N4023341; Fri, 9 Dec 2022 14:19:58 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=Q9HOSLtFbNDYquy2ZvKgtZ/KGRAo2DL6e+28Gf/QCEHEk1SvfVf1ozKNf+OunLWcgr+P sxCxAaKvO1QKV99n4NoV1SWkCKV9SnG34n3vxHa9ufxgwwXAlQy7jDRjVWY9lTSb5Tgh ocz8r8q0dWVDRg/IBjFZSyRKnv++cFMbCO6qafiAiLlaCZYch/6yXXheGHuG4UzOEUpY t8BucLMl0vQK8PXYTmD07B2QQGtnk1AQsFc6noVCnCEH2VLMTJIz27gmeidljJn6LJKx OQ2ufxThWuckozsorQvayiIvHyL1BOmWtIOb7MBW7cuZ5f54pRn6mTPgnlP23Y+sMcJH Ag== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3mbxfdktd1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 09 Dec 2022 14:19:58 +0000 Received: from m0127361.ppops.net (m0127361.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 2B9EAXCS009266; Fri, 9 Dec 2022 14:19:58 GMT Received: from ppma04fra.de.ibm.com (6a.4a.5195.ip4.static.sl-reverse.com [149.81.74.106]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3mbxfdktcq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 09 Dec 2022 14:19:58 +0000 Received: from pps.filterd (ppma04fra.de.ibm.com [127.0.0.1]) by ppma04fra.de.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 2B99Ii9Q022504; Fri, 9 Dec 2022 14:19:56 GMT Received: from smtprelay03.fra02v.mail.ibm.com ([9.218.2.224]) by ppma04fra.de.ibm.com (PPS) with ESMTPS id 3m9kur4eq7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 09 Dec 2022 14:19:56 +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 2B9EJrbU44302816 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 9 Dec 2022 14:19:53 GMT Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7DB7F20049; Fri, 9 Dec 2022 14:19:53 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6CDAA2004B; Fri, 9 Dec 2022 14:19:53 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by smtpav02.fra02v.mail.ibm.com (Postfix) with ESMTPS; Fri, 9 Dec 2022 14:19:53 +0000 (GMT) Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 55390) id 288E9E06EB; Fri, 9 Dec 2022 15:19:53 +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 Subject: [PATCH 4/5] rcutorture: add support for s390 Date: Fri, 9 Dec 2022 15:19:38 +0100 Message-Id: <20221209141939.3634586-5-svens@linux.ibm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221209141939.3634586-1-svens@linux.ibm.com> References: <20221209141939.3634586-1-svens@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: PtbRnuS8AgHSLKLf5mbL2hH7IpliXBVV X-Proofpoint-ORIG-GUID: d7YUM2uHTWIJsyuWehRxjNhNj4r9-zIj 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=2022-12-09_07,2022-12-08_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 phishscore=0 spamscore=0 lowpriorityscore=0 adultscore=0 bulkscore=0 malwarescore=0 priorityscore=1501 clxscore=1015 impostorscore=0 suspectscore=0 mlxlogscore=798 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2212090108 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?1751747605620447841?= X-GMAIL-MSGID: =?utf-8?q?1751747605620447841?= 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 Fri Dec 9 14:19:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Schnelle X-Patchwork-Id: 31777 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp806099wrr; Fri, 9 Dec 2022 06:24:36 -0800 (PST) X-Google-Smtp-Source: AA0mqf62XFwLqPvaz+UwV4LhKARoYXfod7BcVDe7vAllnPcUehrNamFsNgrnNP2P6Lt+l+xcM90y X-Received: by 2002:a17:906:144f:b0:7c1:28a9:c277 with SMTP id q15-20020a170906144f00b007c128a9c277mr5221606ejc.6.1670595876291; Fri, 09 Dec 2022 06:24:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670595876; cv=none; d=google.com; s=arc-20160816; b=ghqRXfZErYHKfybXgBF6AOTrezJV3X2+3qxXe6cbXT4VaWP1L5z5sN6bM1dxvRk1nm 60aFnIiPIthdf27hfhQI0AkannqXTT6//yCIuBLPpF6WyVVM8oCrdqy8txcwIwakOcot r7Du3F24W2qpBx5jvkmJaDcPf+PXBNRTdpXuAavlMZ6Pm3YuAoEAa4oEUDEOW1rvC+V4 3tLgPaUVmSzUGh1JWDw+jPtwqrA/GgXgr323tUdCDekgcHCUCGdytltwbVJZXEJTqzQF gabXKNFDdpw70KENIkkieauY8iXHARjJYVBSXYo2It/B7F4ATwUYs2KJ09ABxbb2CRV6 pyQg== 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=X+GE+jv0KahKNKbILwtDuHIxeq0qRl8eXPKd6GphmNwWAS5mwsy53nssJomaoY5kFD NQWQ5296TZgbXL6hjUYQLD2+AKFG3bM0ajkYWHWu8WAL43BN9mAzGKgMBbSOHfBA3ZFN h/lcV9o7SKBNNM2PUpmHraqR5GhaR+wz+SN6v0GvMPUDmDzxu1lGero4hroAATLoFdTU O+UmZrb8jeNbAZ9P4vlChYSNHW8KH4CIJagsG3VKdc+eG+wPY7nJFq2pXpZnlGdoSGrW wut7rpHEY0U0ptMyMws63PJ2IZOtxyRL/yuNCL8N329ySHUFZ/PLsYaf0LGOusSTuj2U OxzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b="Li/HoyK/"; 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 he10-20020a1709073d8a00b0078a3ef9f092si1393313ejc.998.2022.12.09.06.23.58; Fri, 09 Dec 2022 06:24: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="Li/HoyK/"; 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 S230166AbiLIOVM (ORCPT + 99 others); Fri, 9 Dec 2022 09:21:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229854AbiLIOUe (ORCPT ); Fri, 9 Dec 2022 09:20:34 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 773FF6274 for ; Fri, 9 Dec 2022 06:20:28 -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 2B9DdSLD003705; Fri, 9 Dec 2022 14:20:00 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=Li/HoyK/JLvLLAhtavsDzOtlrr2MZqLRAiM2ORUMNZc2egwH0dk9rhSvv+i94vWDTCXW 4zzpvBAl3C2UNZHQNn/xtLJmjR/9Px4NfJzdJXdb11ytwWG3JobenutWUsHXCJ4ZnWhM yPnnF3NuaCJynvqgzeKamGf/ZyCXgjQhVJ8fV/XXj7btLImLZ+WUX/f+xAtC+kE4wzC4 k9u8dBTFZRNR7StVX4cb6/nG+iwrYlqZgsxBxnbC0Yse8HhqxtMDrfI2HvfN+D6jiEUv sBB7RyFnsY5L470caJ6hmBbF37Gzap4C81QdnhIvevPRLHLFkDwwAwtUgskkcGIR/OJC CA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3mbxakkw48-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 09 Dec 2022 14:19:59 +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 2B9EBeFq029267; Fri, 9 Dec 2022 14:19:58 GMT Received: from ppma04fra.de.ibm.com (6a.4a.5195.ip4.static.sl-reverse.com [149.81.74.106]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3mbxakkw3k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 09 Dec 2022 14:19:58 +0000 Received: from pps.filterd (ppma04fra.de.ibm.com [127.0.0.1]) by ppma04fra.de.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 2B99Ii9R022504; Fri, 9 Dec 2022 14:19:56 GMT Received: from smtprelay03.fra02v.mail.ibm.com ([9.218.2.224]) by ppma04fra.de.ibm.com (PPS) with ESMTPS id 3m9kur4eq8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 09 Dec 2022 14:19:56 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay03.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2B9EJrKU45482412 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 9 Dec 2022 14:19:53 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B0A192004B; Fri, 9 Dec 2022 14:19:53 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9FA622004E; Fri, 9 Dec 2022 14:19:53 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTPS; Fri, 9 Dec 2022 14:19:53 +0000 (GMT) Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 55390) id 2B29EE0732; Fri, 9 Dec 2022 15:19:53 +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 Subject: [PATCH 5/5] rcutorture: build initrd for rcutorture with nolibc Date: Fri, 9 Dec 2022 15:19:39 +0100 Message-Id: <20221209141939.3634586-6-svens@linux.ibm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221209141939.3634586-1-svens@linux.ibm.com> References: <20221209141939.3634586-1-svens@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: Dx3uCqbfEn9HPhla7508HsCkyytWbnGE X-Proofpoint-ORIG-GUID: npxYvDsgI4Y4SwcBGnM_2_uEo9Jsq2oL 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=2022-12-09_07,2022-12-08_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 clxscore=1015 mlxlogscore=999 impostorscore=0 mlxscore=0 lowpriorityscore=0 phishscore=0 priorityscore=1501 adultscore=0 suspectscore=0 spamscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2212090108 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?1751746741419546735?= X-GMAIL-MSGID: =?utf-8?q?1751746741419546735?= 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