Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp25828975rwd; Mon, 3 Jul 2023 01:23:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6RwCbIGlzRzaC2XO+MXLsM4Eu/cxomz9flLsZdkLV93DMkEfnPnDU71lPNCMEaeD1WNuXR X-Received: by 2002:a05:6808:994:b0:39c:475e:d78a with SMTP id a20-20020a056808099400b0039c475ed78amr10101522oic.17.1688372597369; Mon, 03 Jul 2023 01:23:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688372597; cv=none; d=google.com; s=arc-20160816; b=yE7zE8Lc2lweJo6dUeY0cj8FJ4Z4rRAjSKGf8h6FnFCQYQg5XwdHfcCghaRd0UqtaM WmlLUgQ/qFfhQlPJnJZG/3Q2CJbG6suUSEIhz/t0HCo2mW3NetzmhhNhjyENtaFS9U/3 YEHpYT64duJuV+hgde7oAfMYCai8URJQuuvkvHqiOQlJ4+QHfxZOrBiKTfOJuL0Y7aZu hlMwgt5iM9oNWhvj0dFW7+lpxLkeqp4cHp11A0+5mucN8YobdH58ndmaINmgaw4c4b6N zqPkDs4W5olLJjsznSOdOrFtaFX5oylf5mNiWXXMT3mgPORMKlrzNSGr47HVP5gaNxSX CNcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:message-id:content-transfer-encoding :mime-version:subject:date:dkim-signature:from; bh=g/HugkAN+o01vx1wZ7O4l4+5FPs0yS/DCilRDYVRsGM=; fh=LSCTQ4F1po2H1C5K3f0AvA2wcu5UV8v0TQunqkKXj3M=; b=BI5B0VFLVy5ewfyvOHCAQ+/cmt5rm4fBWUlZ9Lm7NzluJnfnKCWnbM0HCJ6w+/yh0A w6gEoKoaeJMs1PvcKFmHhD78WKl214bESLntq3PKw7VynEISnNF7WjtnOG8MgfcziYUt KlF+TN3ppf4qbGC2LfI4YRYqMmAokevTNWlrjieZ/f0WVV89b5QQ3/y3PhAc5dRyfQC6 RUSCbR4mDGIUV7UFmtQA0WTvJT3IhC59BQIljUKDFBjTs7wb9eiFGMceodpbgQHO5tcj vos6ysTtSKR/nf6haFLNV7W/Mry875cvNoh8HGPXHMW1GAJ+0TK0PhBjzPYIa6sOZJh1 VU3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=haqhEw2c; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i2-20020a17090a974200b002633e362fc8si10249401pjw.104.2023.07.03.01.23.03; Mon, 03 Jul 2023 01:23:17 -0700 (PDT) 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=@weissschuh.net header.s=mail header.b=haqhEw2c; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231259AbjGCILU (ORCPT + 99 others); Mon, 3 Jul 2023 04:11:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231298AbjGCILQ (ORCPT ); Mon, 3 Jul 2023 04:11:16 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E87B6E56; Mon, 3 Jul 2023 01:11:13 -0700 (PDT) From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1688371871; bh=kJhOWrHT19lxlXbxpDms6ePeadAyakSraqg81a3AWM4=; h=From:Date:Subject:To:Cc:From; b=haqhEw2cv08hpnQ0MnDu82+CPHCatTfbpexHrd8fjyzYBsGbIR8lCZV2FMIA4bLDZ 6DA+/oBKuuhyWd/yQCo0lzMwipNP3gREr9zXeWH1I2QVgfjTA5gpjszfaqAZbwOpPC UOmlFF8lpiWTDVjJXkDML9eRseRuY3n24br3bNsw= Date: Mon, 03 Jul 2023 10:11:08 +0200 Subject: [PATCH] selftests/nolibc: simplify call to ioperm MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20230703-nolibc-ioperm-v1-1-abf9ebe98a80@weissschuh.net> X-B4-Tracking: v=1; b=H4sIAJuComQC/x3MQQqAIBBA0avIrBNMKa2rRIvKqQZKRSEC8e5Jy 7f4P0PCSJhgZBkiPpTIu4q2YbCdizuQk60GKaQSWiju/EXrxskHjDc3xhq9YG87HKA2IeJO7/+ b5lI+8GhPCl8AAAA= To: Willy Tarreau , Shuah Khan Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Zhangjin Wu , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1688371870; l=1268; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=kJhOWrHT19lxlXbxpDms6ePeadAyakSraqg81a3AWM4=; b=S+s/IO9qf076DYNW/+GGq2bcAJOviujQOot28YeutmosgS+tbApKaXBDWI9HiY9BruZ+Mv32f QFTEPNUXlUWCqHxl651aZoxNEnGa5HRMhWCCBJ/L+G8PXxAel5dgiWF X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 Since commit 53fcfafa8c5c ("tools/nolibc/unistd: add syscall()") nolibc has support for syscall(2). Use it to get rid of some ifdef-ery. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/nolibc/nolibc-test.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c index 486334981e60..c02d89953679 100644 --- a/tools/testing/selftests/nolibc/nolibc-test.c +++ b/tools/testing/selftests/nolibc/nolibc-test.c @@ -1051,11 +1051,7 @@ int main(int argc, char **argv, char **envp) * exit with status code 2N+1 when N is written to 0x501. We * hard-code the syscall here as it's arch-dependent. */ -#if defined(_NOLIBC_SYS_H) - else if (my_syscall3(__NR_ioperm, 0x501, 1, 1) == 0) -#else - else if (ioperm(0x501, 1, 1) == 0) -#endif + else if (syscall(__NR_ioperm, 0x501, 1, 1) == 0) __asm__ volatile ("outb %%al, %%dx" :: "d"(0x501), "a"(0)); /* if it does nothing, fall back to the regular panic */ #endif --- base-commit: a901a3568fd26ca9c4a82d8bc5ed5b3ed844d451 change-id: 20230703-nolibc-ioperm-88d87ae6d5e9 Best regards, -- Thomas Weißschuh