From patchwork Thu Nov 23 18:58:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christoph_M=C3=BCllner?= X-Patchwork-Id: 13466613 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EA386C636D0 for ; Thu, 23 Nov 2023 18:58:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QwcCVA3Tti0bjZWEQTj/b4q1YaJHHkcaon4lWJrRSlw=; b=vVRcPVIsPIAYr0 uGg7Gq/Nb75DMiTo8W0rzht445QRq5BkvDjcE6fYFNwH++NCcZaOlOSeHXPEUSf8817wqhTfA3tQS Njq879zj1fnQvo8l57fqlTUBaDDhmPT07v52CQOS5Fs5P+hcfJzP7NH2ViOyrbUUw2rj73p26FKeY GBlzmUZY/Xy3FfloZ01Fwi7r2HyWigc1l3jjTV2FoNOqgDSSrKJ+T5jgDvT2yaS/JP/mrUaXkOvnN 6oxN7+YPRGs93qaS5WqtOsRNhFm8WjpmhpemX8ZE3UdqNRAmOeAyFSdeLF/wU8lnfB1d+j6P2SAQw dnjsuX/dJm8eyvYK4OmA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r6EuK-005YHu-10; Thu, 23 Nov 2023 18:58:36 +0000 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r6EuF-005YG1-1x for linux-riscv@lists.infradead.org; Thu, 23 Nov 2023 18:58:32 +0000 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-548f0b7ab11so1680480a12.1 for ; Thu, 23 Nov 2023 10:58:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vrull.eu; s=google; t=1700765908; x=1701370708; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dhz1HO1TFrn+esU2JyrDQXLuWyA0tprcaBHDYdqjcxQ=; b=f1a8ZVdtTwngh6l92e5xA2vTSlu2MY6m8y6a3Vm4LgZrmbpJzObmts4Hr84t1ygVfP com1a+UnW216hnfa2Ro4k020a7xkNqhoUbqiXWG5f09e8/8fUpz9NCj+tzav1x5phN6P Y+yifwGG8bz9iOvJfFPUKl8byXyRUJdGyuPtpqOHVAr+SHlj2/IxZ5ncKPOxqHN+XQ/N TsclMFNywYW+cw8m2z+O+Tm53NXFZ/AHCiindXC+Gq7ECxL0PYBhy4cJsLMwLZHN+j6b SWpmjukVA6m9Abu3st+929NspSZ2bnmZ7CEEgVqwWwtpPnROPi11+k38lggKrZzIxZtH 7G9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700765908; x=1701370708; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dhz1HO1TFrn+esU2JyrDQXLuWyA0tprcaBHDYdqjcxQ=; b=vYS0NNAhtfhwbYwSdo5YiJUMMlXbuGnZ41lyDraYRJqhPY2Z8srMhehMGI5vYatFDp Mrze5DIOiFRQl4D+6j1Q9q+P5lltgQhdjkde+C1jT3iy194LY6jXcIqn/oiaSE+PHleB I/jzStmqaATocOs/KfPmtoC7YXO87ycnmLJEZJLRW2vFD7fR4UTFFirzGtZc74sSbX29 QWZPd8RQRI6fqobesd8xTvskKCQmt5NlRITHSiZnbfYO6QsC0uoZwEUziR/jLh6nI8yk FXaqhhok99+MX9fOjJWRk/ENc2fueI1WT0RmP2Dzv/8Eh1UMsZ4jXxm732LEaLhRr7au I4Sw== X-Gm-Message-State: AOJu0YxmrAkilnouKICVpA8EG8BYmaWNzAXFlPY1VDfvvVJF32/HyJz3 Nt3FsXqy92Y3gwlho9GhCuqGBbLyamjRcrLVtBnqRTzn X-Google-Smtp-Source: AGHT+IHuV5dXf2Er0VwPFonFK4Fp1h+h+XsSB+7tO9pY2bovS/v0cFYLhOuYH9heihq0E1lWqqNMWw== X-Received: by 2002:a17:906:d4:b0:a01:8ef2:849 with SMTP id 20-20020a17090600d400b00a018ef20849mr177665eji.4.1700765908104; Thu, 23 Nov 2023 10:58:28 -0800 (PST) Received: from beast.fritz.box (62-178-148-172.cable.dynamic.surfer.at. [62.178.148.172]) by smtp.gmail.com with ESMTPSA id l23-20020a170906231700b009ff1997ce86sm1115944eja.149.2023.11.23.10.58.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 10:58:27 -0800 (PST) From: Christoph Muellner To: linux-riscv@lists.infradead.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Palmer Dabbelt , Paul Walmsley , Albert Ou , Shuah Khan Cc: Philipp Tomsich , Andrew Jones , Evan Green , Xiao Wang , Alexandre Ghiti , Andy Chiu , =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= , Charlie Jenkins , =?utf-8?q?Christoph_M=C3=BCllner?= Subject: [PATCH 1/5] tools: selftests: riscv: Fix compile warnings in hwprobe Date: Thu, 23 Nov 2023 19:58:17 +0100 Message-ID: <20231123185821.2272504-2-christoph.muellner@vrull.eu> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231123185821.2272504-1-christoph.muellner@vrull.eu> References: <20231123185821.2272504-1-christoph.muellner@vrull.eu> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231123_105831_646799_5F361860 X-CRM114-Status: GOOD ( 10.21 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Christoph Müllner GCC prints a couple of format string warnings when compiling the hwprobe test. Let's follow the recommendation in Documentation/printk-formats.txt to fix these warnings. Signed-off-by: Christoph Müllner Reviewed-by: Alexandre Ghiti Reviewed-by: Alexandre Ghiti --- tools/testing/selftests/riscv/hwprobe/hwprobe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/riscv/hwprobe/hwprobe.c b/tools/testing/selftests/riscv/hwprobe/hwprobe.c index c474891df307..abb825811c70 100644 --- a/tools/testing/selftests/riscv/hwprobe/hwprobe.c +++ b/tools/testing/selftests/riscv/hwprobe/hwprobe.c @@ -29,7 +29,7 @@ int main(int argc, char **argv) /* Fail if the kernel claims not to recognize a base key. */ if ((i < 4) && (pairs[i].key != i)) ksft_exit_fail_msg("Failed to recognize base key: key != i, " - "key=%ld, i=%ld\n", pairs[i].key, i); + "key=%lld, i=%ld\n", pairs[i].key, i); if (pairs[i].key != RISCV_HWPROBE_KEY_BASE_BEHAVIOR) continue; @@ -37,7 +37,7 @@ int main(int argc, char **argv) if (pairs[i].value & RISCV_HWPROBE_BASE_BEHAVIOR_IMA) continue; - ksft_exit_fail_msg("Unexpected pair: (%ld, %ld)\n", pairs[i].key, pairs[i].value); + ksft_exit_fail_msg("Unexpected pair: (%lld, %llu)\n", pairs[i].key, pairs[i].value); } out = riscv_hwprobe(pairs, 8, 0, 0, 0); From patchwork Thu Nov 23 18:58:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christoph_M=C3=BCllner?= X-Patchwork-Id: 13466611 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 13494C636D3 for ; Thu, 23 Nov 2023 18:58:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2FkC0AcdZ55EBbqEoVuJu5no0TK8mrBabjaIlONz9Ow=; b=M1DA/BgmVk6uVK h+secEy853WcTdpv73q+aiIUfQlSeYIGqybXxcjGck0iNJN/rpc7bbyI7upm1m65XLfcTck6k+H8r zd3DvgbseaG1trfZOMjKGoA8o3xdK4TLJhPs1xGp882Bh/swoLVsa1puuPVpRmyU3SsaOHWnvtuSb a6EQHVO508x4RCvJpASVPPgYv+T8QKTKd4WsMSQv0/EdqMEE4HFNd7zaQ5vJAPLSX9BD+rdcB32+A Fvbrwp36EEV/f5Q2T3BGRCldBSyp5OMyIwOyConsLKge92MYS3aXXuhE14R6AOOejOEd5WFpScq3j HJeK/K0r1gkHJH6gva9A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r6EuL-005YIz-0V; Thu, 23 Nov 2023 18:58:37 +0000 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r6EuF-005YGH-1x for linux-riscv@lists.infradead.org; Thu, 23 Nov 2023 18:58:32 +0000 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-548f6f3cdc9so1774162a12.2 for ; Thu, 23 Nov 2023 10:58:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vrull.eu; s=google; t=1700765910; x=1701370710; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=D52mho4bbVBLhO1MqSHLzeH5mafSEJrrR5dOy4gDBr8=; b=PmHuRPfq2cz9/E3USBWR1xv0+3wjMi+iEiihnUIvHI8FdsI3iyJrbZAhhwlIyYdL3Z efULM2dm//7fz92KTJUtT1iwXIw7cDC6kJdszkM8aJpqOKcUR7LCj5MGuN5bmcbkSZGa h0GlxPJ9JDJH9DGo/kE+65Sg3N6HCioMPdyv31zgkjrPQQMLg4ISIwdZLMVbSSY/MfUn YPGJ3iZHZ6Bw5K0lsPEJy++1o/u+5YkFmUtL4+ZchdybK6+Fw+rtM8gyKhd7Fa+Qe+jd 8rSlyxPVWJxbOyn5YO5SbMRWLUMcNWg16r5TTipT1kpbk8BhJEt5ilB8GBiK1prP57GD W2rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700765910; x=1701370710; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=D52mho4bbVBLhO1MqSHLzeH5mafSEJrrR5dOy4gDBr8=; b=hpT9v0LMcVi+/iQUC/vZ3p8mXwIldE8XiT/SxfB0XcuOsS6o5ueNtsfrkuyOKtNSj/ Xr1t2wRq+lMjrbUa+Y5DhbA8JIzezSwfpwRdUuB+OnqgcK+b3xvz0ZUYqhuN4VdI9Glm 6TWZTumXdy4e5/rF1Aau9On8el7AslfCQpGcToNvoNJbGHGzeNumyUh5juPgJSeHjL6j vj8VdUt69SAz+FZe0dbYVMHM9hQ1oQr6wOYhTHnSol3GgIuPD4Gfid02OsGEJmPe1w+D Z1VB62GXXWHkfSANzILdHsRR9qKjy6/D5HMiNVeWc+NotaiBcqkJ3RwuWhlw7x0vB7xt UMaQ== X-Gm-Message-State: AOJu0Yw6B9jaZi2+gDZnCfBd3HfRsrKCxpML33rkw/6mw11avht+I0TP wxidiWjN4AqESURY0hghzNeRkquinzcUdjwIk9+b3A7K X-Google-Smtp-Source: AGHT+IFVVpG1Z6gxPdaL7IaaTFJinrPmrgoX6cwu9dsiRja9dZsbaJhr6jSoHE3EsEV83YZM2drU6A== X-Received: by 2002:a17:906:738b:b0:9f8:2f30:d74f with SMTP id f11-20020a170906738b00b009f82f30d74fmr185134ejl.7.1700765909911; Thu, 23 Nov 2023 10:58:29 -0800 (PST) Received: from beast.fritz.box (62-178-148-172.cable.dynamic.surfer.at. [62.178.148.172]) by smtp.gmail.com with ESMTPSA id l23-20020a170906231700b009ff1997ce86sm1115944eja.149.2023.11.23.10.58.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 10:58:29 -0800 (PST) From: Christoph Muellner To: linux-riscv@lists.infradead.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Palmer Dabbelt , Paul Walmsley , Albert Ou , Shuah Khan Cc: Philipp Tomsich , Andrew Jones , Evan Green , Xiao Wang , Alexandre Ghiti , Andy Chiu , =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= , Charlie Jenkins , =?utf-8?q?Christoph_M=C3=BCllner?= Subject: [PATCH 2/5] tools: selftests: riscv: Fix compile warnings in cbo Date: Thu, 23 Nov 2023 19:58:18 +0100 Message-ID: <20231123185821.2272504-3-christoph.muellner@vrull.eu> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231123185821.2272504-1-christoph.muellner@vrull.eu> References: <20231123185821.2272504-1-christoph.muellner@vrull.eu> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231123_105831_647004_25F759B3 X-CRM114-Status: GOOD ( 10.70 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Christoph Müllner GCC prints a couple of format string warnings when compiling the cbo test. Let's follow the recommendation in Documentation/printk-formats.txt to fix these warnings. Signed-off-by: Christoph Müllner Reviewed-by: Alexandre Ghiti --- tools/testing/selftests/riscv/hwprobe/cbo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/riscv/hwprobe/cbo.c b/tools/testing/selftests/riscv/hwprobe/cbo.c index 50a2cc8aef38..c6a83ab11e22 100644 --- a/tools/testing/selftests/riscv/hwprobe/cbo.c +++ b/tools/testing/selftests/riscv/hwprobe/cbo.c @@ -97,7 +97,7 @@ static void test_zicboz(void *arg) block_size = pair.value; ksft_test_result(rc == 0 && pair.key == RISCV_HWPROBE_KEY_ZICBOZ_BLOCK_SIZE && is_power_of_2(block_size), "Zicboz block size\n"); - ksft_print_msg("Zicboz block size: %ld\n", block_size); + ksft_print_msg("Zicboz block size: %llu\n", block_size); illegal_insn = false; cbo_zero(&mem[block_size]); @@ -121,7 +121,7 @@ static void test_zicboz(void *arg) for (j = 0; j < block_size; ++j) { if (mem[i * block_size + j] != expected) { ksft_test_result_fail("cbo.zero check\n"); - ksft_print_msg("cbo.zero check: mem[%d] != 0x%x\n", + ksft_print_msg("cbo.zero check: mem[%llu] != 0x%x\n", i * block_size + j, expected); return; } @@ -201,7 +201,7 @@ int main(int argc, char **argv) pair.key = RISCV_HWPROBE_KEY_IMA_EXT_0; rc = riscv_hwprobe(&pair, 1, sizeof(cpu_set_t), (unsigned long *)&cpus, 0); if (rc < 0) - ksft_exit_fail_msg("hwprobe() failed with %d\n", rc); + ksft_exit_fail_msg("hwprobe() failed with %ld\n", rc); assert(rc == 0 && pair.key == RISCV_HWPROBE_KEY_IMA_EXT_0); if (pair.value & RISCV_HWPROBE_EXT_ZICBOZ) { From patchwork Thu Nov 23 18:58:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christoph_M=C3=BCllner?= X-Patchwork-Id: 13466609 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0E9D5C636BD for ; Thu, 23 Nov 2023 18:58:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=U5PiqgmdJnV8WMS/NguAZB5GnJcASuyMy2jEo/k1FyE=; b=qVm9HY0V3yId+C xraHDzEKqBsqUIyupHeqWYB+LklcTNWNiQ/bbgMysOHR2EW94kEt8DlIdIkrU6KV9shOnNiaeaPca iteMzbUVi5XaSh75bnBT+U0C+2WeV/ngVdf84UTosPUIWw49hg63Vee/vO5V3qNXFgiogpTVZfGh4 dMicBtsSlqKK8NJ8DVtCAV1yl/BnZpGEIHveWuuvXtoPvd7E6vhE1YfQPEfk4eg5QPskC0uWUD9xJ B1NIB7plh3rhS1/y2LfrdH5jxpz0pt7/vimlpWQzAHLINLURAA0EYa/d7pZp0CT88EAoOJFx0A/xe Avne8Wx3fZqUuFkknCMg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r6EuO-005YLB-0E; Thu, 23 Nov 2023 18:58:40 +0000 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r6EuJ-005YGv-0l for linux-riscv@lists.infradead.org; Thu, 23 Nov 2023 18:58:36 +0000 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-a00c200782dso168480966b.1 for ; Thu, 23 Nov 2023 10:58:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vrull.eu; s=google; t=1700765911; x=1701370711; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+gBMT1D8EIh0bBWoj7ImRklCKaan3pldMceeCzs+vUQ=; b=k1r9+LIYQ2XaM/GWomTyGQoo+vhtZFIhiIg5HjNP5VAon4SS2ykX0FBQUVDysN2H8Q ZqwAUixw0fbEhtQ86V9aLnbS75gKn0sji0wepYyVfKRLaMBgZv/qjHcW+mq5cNV2AMYm hKS2AIvPUh3/rqbtKnsp+ZYbdR/TmB1oZuxi/tidCD6bsqg9AEJ+9U9T9tC+thteybhR vPzKgmxSLk5afsTNioT7G2tFdG50GPmX9bG5kIQp6OX1mznpDValEMSKPsRhqgNCwYPM 1GwlgKshNfNauJjVFORxLEFKUe5FgE0782+YbyMm82nsD27g5esv2L+58SBcK8UT/R1r 1f/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700765911; x=1701370711; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+gBMT1D8EIh0bBWoj7ImRklCKaan3pldMceeCzs+vUQ=; b=uxxeLtzGBnc33IC+ev7uVFVOLY0gFzv/sQewOa9DtDRB9+c7hQwwkzccugIcclj29X ZerlP1XMB/pGEF0xbYMU/aBZfeQT582Lm33D8nefcC1c3y7plKI9iKmQIKo/d4xjraYq 2PcsLkgRkxX8+KMyU6z3Ckfl8hPrYFIj1ntuqMMHy2p59PfTrlu7rWzhyDhV5sM7LWYC Br7YJokqL/VTkX2P0rQAi7W33aR1h5+OMNkwmTe6IntvMTiGRlewiQZtAYMYzoNwLa7L O8UZhOqFlXxW3leFlB5ckEiuZWkPslmz2sOs67MbNnSin/ry6j6UTDSQI0K0n+Hf/V45 foPQ== X-Gm-Message-State: AOJu0YxYHJi6SucPpOfZ5QE/pEmjamCGzrucF69gMkf/Au9goiyke9oW 0GksoL1EKGZM8KALM/mvYSQrnbP/RY83CVEXDHND4jnd X-Google-Smtp-Source: AGHT+IHM33vf1NCGDtR+L8oDLbeP6Km4LXuLVeIqB8PR1IIY6cQtOKQe4/t/v35w1zVrGzfmN4G2PA== X-Received: by 2002:a17:907:d30c:b0:9bf:d65d:dc0f with SMTP id vg12-20020a170907d30c00b009bfd65ddc0fmr232442ejc.4.1700765911728; Thu, 23 Nov 2023 10:58:31 -0800 (PST) Received: from beast.fritz.box (62-178-148-172.cable.dynamic.surfer.at. [62.178.148.172]) by smtp.gmail.com with ESMTPSA id l23-20020a170906231700b009ff1997ce86sm1115944eja.149.2023.11.23.10.58.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 10:58:31 -0800 (PST) From: Christoph Muellner To: linux-riscv@lists.infradead.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Palmer Dabbelt , Paul Walmsley , Albert Ou , Shuah Khan Cc: Philipp Tomsich , Andrew Jones , Evan Green , Xiao Wang , Alexandre Ghiti , Andy Chiu , =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= , Charlie Jenkins , =?utf-8?q?Christoph_M=C3=BCllner?= Subject: [PATCH 3/5] tools: selftests: riscv: Add missing include for vector test Date: Thu, 23 Nov 2023 19:58:19 +0100 Message-ID: <20231123185821.2272504-4-christoph.muellner@vrull.eu> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231123185821.2272504-1-christoph.muellner@vrull.eu> References: <20231123185821.2272504-1-christoph.muellner@vrull.eu> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231123_105835_276137_7B1628AB X-CRM114-Status: UNSURE ( 9.06 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Christoph Müllner GCC raises the following warning: warning: 'status' may be used uninitialized The warning comes from the fact, that the signature of waitpid() is unknown and therefore the initialization of GCC cannot be guessed. Let's add the relevant header to address this warning. Signed-off-by: Christoph Müllner Reviewed-by: Alexandre Ghiti Reviewed-by: Andy Chiu --- tools/testing/selftests/riscv/vector/vstate_exec_nolibc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/testing/selftests/riscv/vector/vstate_exec_nolibc.c b/tools/testing/selftests/riscv/vector/vstate_exec_nolibc.c index 2c0d2b1126c1..1f9969bed235 100644 --- a/tools/testing/selftests/riscv/vector/vstate_exec_nolibc.c +++ b/tools/testing/selftests/riscv/vector/vstate_exec_nolibc.c @@ -1,4 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-only + +#include + #define THIS_PROGRAM "./vstate_exec_nolibc" int main(int argc, char **argv) From patchwork Thu Nov 23 18:58:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christoph_M=C3=BCllner?= X-Patchwork-Id: 13466610 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9F1F8C624B4 for ; Thu, 23 Nov 2023 18:58:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NDTlhWN8YzuscW9LMc+iLonUnYryHGmjmgeUX/jpe48=; b=2djJfJITLPQyMv ETUJj2QbHmXC+p9FJiUjVjvMt2Bg3b9MHLe4xccClsDOMRo6pNB+ZfKF2GxmmNyXU1ll01OlVc2bG CumjkOKrvocKjfvWUU22NUrrKzx3Bff6NSvDrWKbuoijSTyEucJPG2MW44lPhfTN86DZmDWnrFou5 fOs7uvMyUY3FK4dM71q8OI9KrZWAQzbd+vP1JuZ0COs0rSLWEAqULVUnZY/J4UNS/jPAUsUCoa3fh zyjqMbP698yWlt9UerbIXgFm0bP+pCC0lvDBG/3I7qGvXUd+Q6BiIn1NqOyFSpKPqCSlB8OnD6HoT KToEFPkNmU1/5fZR4cJw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r6EuO-005YMS-2x; Thu, 23 Nov 2023 18:58:40 +0000 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r6EuK-005YHL-34 for linux-riscv@lists.infradead.org; Thu, 23 Nov 2023 18:58:38 +0000 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a00c200782dso168483866b.1 for ; Thu, 23 Nov 2023 10:58:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vrull.eu; s=google; t=1700765913; x=1701370713; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=r701pvo9PbgE9h16+HzDZMKOHNQtZ1R5aBMPWWKprHM=; b=Ne9S8jdD/Ewhn4/3wHWatsIhy01zlZl0kjbZ09IwLKi9RtJOBxW4dk2JTrCCOvHm+U XICaVmmHf2y344NJlLwDI4WfqzaVu06gWr0JD/5QIW5aHld9j1MIIB9lQfAFeshIjItQ qZ8SJUpV3GKnNJTp/U/34kKUjTv9uZ9JmQF9fy1RfSqrwwALyItkSM2MsqTDisJY93c5 xAzZPPZAYysENcP0YcoDUOkXgo1EXp5Vja6z9/H4nTyZumAvpmtPTkMiwEx5vs+IUPb/ IB6OX1vOV/7WJDAc1D6SB33I0ca1y+3zdkY6BuVj6YDlsu/o7VSX4tL6BERsOCOr5AbF GpqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700765913; x=1701370713; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=r701pvo9PbgE9h16+HzDZMKOHNQtZ1R5aBMPWWKprHM=; b=TSB1j90zXn9f+KiQ32eoU2fJtrups1CAX7QVAk22W1LavSt2sfJhqRwfNkX9bJeaiD GCgnoP86fCvECsDZFxbVyEgVC1mc/JH9BGBkua/Wxf6QL/UNT47CqG+qGvbQXB5ZqsXJ 65t7/QdK47Doq4E7kDBVW9ao82ngcZvNp1q3cpY0Q3E1YR86l41zdtOaR8PEzPuBscJt ZP3GSn8+/S9HVJQQ66EQuw/NcsGzCJUAwQWiT26oCiBQe4Qj45duq6hLZ2o0cj0AG8Rb hfHETdg5ajmzn6CDjQkTvKdoHF6qxlxzvDjHp2+hVyjm/vKyj0EN2ytNSaCzgISMyyiI gnhw== X-Gm-Message-State: AOJu0YxnIlr4XfEBV6ahP0o0VfRRwcXY/3CqiGOxC6e0H1bOndYVm1Mi a+luIidcbSuLDIHffCfLmCfDpiBDRN9K80XXltPNarNG X-Google-Smtp-Source: AGHT+IGo/4pGiY2CzvH24z/qYlIQMvNju8tGcNRKHAO+YNqcSuXvNbr1QJbcmN9PcnnekmGYewrQBw== X-Received: by 2002:a17:906:b188:b0:9e6:f7c6:792f with SMTP id w8-20020a170906b18800b009e6f7c6792fmr159047ejy.17.1700765913533; Thu, 23 Nov 2023 10:58:33 -0800 (PST) Received: from beast.fritz.box (62-178-148-172.cable.dynamic.surfer.at. [62.178.148.172]) by smtp.gmail.com with ESMTPSA id l23-20020a170906231700b009ff1997ce86sm1115944eja.149.2023.11.23.10.58.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 10:58:32 -0800 (PST) From: Christoph Muellner To: linux-riscv@lists.infradead.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Palmer Dabbelt , Paul Walmsley , Albert Ou , Shuah Khan Cc: Philipp Tomsich , Andrew Jones , Evan Green , Xiao Wang , Alexandre Ghiti , Andy Chiu , =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= , Charlie Jenkins , =?utf-8?q?Christoph_M=C3=BCllner?= Subject: [PATCH 4/5] tools: selftests: riscv: Fix compile warnings in vector tests Date: Thu, 23 Nov 2023 19:58:20 +0100 Message-ID: <20231123185821.2272504-5-christoph.muellner@vrull.eu> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231123185821.2272504-1-christoph.muellner@vrull.eu> References: <20231123185821.2272504-1-christoph.muellner@vrull.eu> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231123_105837_005932_E6D5E07A X-CRM114-Status: GOOD ( 11.61 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Christoph Müllner GCC prints a couple of format string warnings when compiling the vector tests. Let's follow the recommendation in Documentation/printk-formats.txt to fix these warnings. Signed-off-by: Christoph Müllner Reviewed-by: Alexandre Ghiti --- tools/testing/selftests/riscv/vector/v_initval_nolibc.c | 2 +- tools/testing/selftests/riscv/vector/vstate_prctl.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/riscv/vector/v_initval_nolibc.c b/tools/testing/selftests/riscv/vector/v_initval_nolibc.c index 66764edb0d52..1dd94197da30 100644 --- a/tools/testing/selftests/riscv/vector/v_initval_nolibc.c +++ b/tools/testing/selftests/riscv/vector/v_initval_nolibc.c @@ -27,7 +27,7 @@ int main(void) datap = malloc(MAX_VSIZE); if (!datap) { - ksft_test_result_fail("fail to allocate memory for size = %lu\n", MAX_VSIZE); + ksft_test_result_fail("fail to allocate memory for size = %d\n", MAX_VSIZE); exit(-1); } diff --git a/tools/testing/selftests/riscv/vector/vstate_prctl.c b/tools/testing/selftests/riscv/vector/vstate_prctl.c index b348b475be57..8ad94e08ff4d 100644 --- a/tools/testing/selftests/riscv/vector/vstate_prctl.c +++ b/tools/testing/selftests/riscv/vector/vstate_prctl.c @@ -68,7 +68,7 @@ int test_and_compare_child(long provided, long expected, int inherit) } rc = launch_test(inherit); if (rc != expected) { - ksft_test_result_fail("Test failed, check %d != %d\n", rc, + ksft_test_result_fail("Test failed, check %d != %ld\n", rc, expected); return -2; } @@ -87,7 +87,7 @@ int main(void) pair.key = RISCV_HWPROBE_KEY_IMA_EXT_0; rc = riscv_hwprobe(&pair, 1, 0, NULL, 0); if (rc < 0) { - ksft_test_result_fail("hwprobe() failed with %d\n", rc); + ksft_test_result_fail("hwprobe() failed with %ld\n", rc); return -1; } From patchwork Thu Nov 23 18:58:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Christoph_M=C3=BCllner?= X-Patchwork-Id: 13466612 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C6179C636F2 for ; Thu, 23 Nov 2023 18:58:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=G5ET7cZUyAEsxstLC64IxCs/Q4XLcNWwmGf3dcIYF5Q=; b=03PrNeT2ariTbV RsGieEAAbDXxang9lPxo1bYiGzxhYmsm/wtOYpABELj+QdhcoLTTG+2rFOoAFWuE+ajRpEBS63ZP1 +cP9oHv+MWfGCyLsWbTIbSrqVSL5B1JgLC9QTzXn3lde18XJREhLD7stN47/nyTeIDG58lvyRg7yh cyXDuqe/zOcLeT/tuA8pyOYynftstR7NTNWfdkXRr4IWoyD2hJNYyoMD93NBsf81QvpqB5wjKksa+ vz812tcwq+HmF7S6zZVSGrYiGSxYYUCqKSw9RbXcs00yOIgq/fPQ2u68iDoAJ1oGaxaOqdZVtCTK4 F0gcxL1oo6Z7Fv2aUiqA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r6EuS-005YOI-2S; Thu, 23 Nov 2023 18:58:44 +0000 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r6EuN-005YHt-0j for linux-riscv@lists.infradead.org; Thu, 23 Nov 2023 18:58:40 +0000 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-991c786369cso166411166b.1 for ; Thu, 23 Nov 2023 10:58:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vrull.eu; s=google; t=1700765915; x=1701370715; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=vE4taij5q3MAjmiPUZKHE8qoF6TdBc6iBW1aIWJ4LYw=; b=jA4ViEfSWgtAn2FIYVv1n6e4cs889aCaP7gFN99i5udio9tp0Ki+1crro9uzZOIbJP dDOEH3EkRVYY7ohGB0JwI+U5rFmivIkVZdrWaFrKol1bGxHP6pA2GZgw3eg/V58U/6Wy XTfvQU9PoLV93kW+MEUSUmDJc0lNN+LHnxahKzsfcOjK5qy9QhspO99Bp2SS/yoJh8oP B3AX5lrV+2QmY3DhZ1zeW/3E3Lw4lKt1E3ujBiyl4asvtezoT83umSV+b4KpsNv8iFSb Z4xMcQU6Eg9QI5lH64RpFqUkIFzX5oyjOjKHPuSAC7OyFMsTabMBjBycWiJr306iVC0W ntdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700765915; x=1701370715; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vE4taij5q3MAjmiPUZKHE8qoF6TdBc6iBW1aIWJ4LYw=; b=dydnu2rzFrMJquw92CL9qG8AT49ORZ8BNSknuzW7BZmSpE/3vkIW8SZPnOHfiUSlSl x2O02KYNksCmqaTVrNDbQWito3H81M9WrsW+tX8nIJugvRFBkQL5d/tVZqKdzzdroIM2 xh858APU5gHCza4Z8bgkhwBFvIR58KDi0Iwf7rJjYkh+OptAWOchXC03bwHTR7Ui3eSa EdhEWHDdIzUKWYB8telCT4lOs5BZFA1B0AzGYQvFiNO61pZ+Xjgy4lnfWe9qcs8JAEy7 8t14v3qFaUAdTpgboiOGHjFPTJs73eaOF9o8NFgj27W2C888F44Q36obcVTOZuzTYPfe t6Cg== X-Gm-Message-State: AOJu0YxQxzoI9d2SP0XnWsbcHdAJznR9VbqHoyd6O3zHNBdZsjFObBks JQ7BKNnC33l3FmHIqNogdA2QiIToZPvW1tihD1dHvzhy X-Google-Smtp-Source: AGHT+IGq6dOMJJMtU5Up+yGiMT76gDi7Z83Zw3jt75JpsMbNdpOYO4U2mN9YDUlYYRNjg8nPchbdWA== X-Received: by 2002:a17:906:1ccd:b0:a00:a591:929 with SMTP id i13-20020a1709061ccd00b00a00a5910929mr195955ejh.24.1700765915300; Thu, 23 Nov 2023 10:58:35 -0800 (PST) Received: from beast.fritz.box (62-178-148-172.cable.dynamic.surfer.at. [62.178.148.172]) by smtp.gmail.com with ESMTPSA id l23-20020a170906231700b009ff1997ce86sm1115944eja.149.2023.11.23.10.58.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 10:58:34 -0800 (PST) From: Christoph Muellner To: linux-riscv@lists.infradead.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Palmer Dabbelt , Paul Walmsley , Albert Ou , Shuah Khan Cc: Philipp Tomsich , Andrew Jones , Evan Green , Xiao Wang , Alexandre Ghiti , Andy Chiu , =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= , Charlie Jenkins , =?utf-8?q?Christoph_M=C3=BCllner?= Subject: [PATCH 5/5] tools: selftests: riscv: Fix compile warnings in mm tests Date: Thu, 23 Nov 2023 19:58:21 +0100 Message-ID: <20231123185821.2272504-6-christoph.muellner@vrull.eu> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231123185821.2272504-1-christoph.muellner@vrull.eu> References: <20231123185821.2272504-1-christoph.muellner@vrull.eu> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231123_105839_262170_F4362260 X-CRM114-Status: GOOD ( 10.28 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Christoph Müllner When building the mm tests with a riscv32 compiler, we see a range of shift-count-overflow errors from shifting 1UL by more than 32 bits in do_mmaps(). Since, the relevant code is only called from code that is gated by `__riscv_xlen == 64`, we can just apply the same gating to do_mmaps(). Signed-off-by: Christoph Müllner Reviewed-by: Alexandre Ghiti --- tools/testing/selftests/riscv/mm/mmap_test.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/testing/selftests/riscv/mm/mmap_test.h b/tools/testing/selftests/riscv/mm/mmap_test.h index 9b8434f62f57..2e0db9c5be6c 100644 --- a/tools/testing/selftests/riscv/mm/mmap_test.h +++ b/tools/testing/selftests/riscv/mm/mmap_test.h @@ -18,6 +18,8 @@ struct addresses { int *on_56_addr; }; +// Only works on 64 bit +#if __riscv_xlen == 64 static inline void do_mmaps(struct addresses *mmap_addresses) { /* @@ -50,6 +52,7 @@ static inline void do_mmaps(struct addresses *mmap_addresses) mmap_addresses->on_56_addr = mmap(on_56_bits, 5 * sizeof(int), prot, flags, 0, 0); } +#endif /* __riscv_xlen == 64 */ static inline int memory_layout(void) {