Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp448021ybv; Thu, 13 Feb 2020 03:35:59 -0800 (PST) X-Google-Smtp-Source: APXvYqy4bbqraTd32JNdx6HsYk5Uhv232I3H7ACvqZcjNH3r6RLxne0XQ+nQh2HEddXvhG60v3ib X-Received: by 2002:a9d:51ca:: with SMTP id d10mr12874178oth.76.1581593759418; Thu, 13 Feb 2020 03:35:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581593759; cv=none; d=google.com; s=arc-20160816; b=hx5iwfTi5FMFOEdNBqwHYlGVIERdO/f+/eB0cOxxd1daKUl7BrNxbeUoexO1fPLnUw GVeVZZmIFKeqgeikwYEYVjROd1jaDiTRH0y8YQHF4VrFxM9y6etkGsIuxzosun7TqYjY z6hHeHVp2XmiPBC5zzNOwMz8eUvn4rXxIeNzxvxdIuC3xlt6lRmhiwr5zzJT6wcjHMt2 hpW6GQceAPBxUhxg0RtTYVM+C0QwbnL3IqNWapUslLzRMtwT56eAaOEFM0pf/zeaD0Ht o/lhWn2ndGIObsnaVl7BCm2kMn5CApgGIwqx4xPrdbAPW2uS2KQJrs1eBbIRnNRyjNfn 2JEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=Ptl2+Pqk+fU0r//WSnE37MVOp8Bs+BpX+po+m2gxIIs=; b=suGS/rIkq+9L0iQ1HftqGIaeahU1xk1wRolZkpWzh6tsMp6uCCu+wcDtSFaBrMDmJL oXbVqVJ9XXOaJs7gBQExyShhhHqej+N0cXCmM3TPjuN9qiYaF9SF3nDJatRLlH8RKpil On9fA1WumW0CKhlDldD6Z8P7q1l60KMT19wbxsVBLrZUnJjVA3SJyGYTlyBlo8UeO26i Wx4AQ6PIVGQQ4nHj0xtuVblRywzKhME8zennmrM3knCH0NMkZfKWIQX10jXtvDw1qRiS aO9bGXub3RwdcheNe4ySr8j5kxZm1hdgS8Z37op8EFaGj2C8R2uGkEw4aoo51kR20GBq FZyw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t70si1073557oif.99.2020.02.13.03.35.47; Thu, 13 Feb 2020 03:35:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729916AbgBMLfZ (ORCPT + 99 others); Thu, 13 Feb 2020 06:35:25 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:10618 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726232AbgBMLfY (ORCPT ); Thu, 13 Feb 2020 06:35:24 -0500 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 339FAE8E5905136164A6; Thu, 13 Feb 2020 19:35:19 +0800 (CST) Received: from euler.huawei.com (10.175.104.193) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.439.0; Thu, 13 Feb 2020 19:35:09 +0800 From: Hongbo Yao To: CC: , , , , Subject: [PATCH -next] torture: avoid build error without CONFIG_RCU_TORTURE_TEST Date: Thu, 13 Feb 2020 19:49:52 +0800 Message-ID: <20200213114952.4638-1-yaohongbo@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.104.193] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If TORTURE_TEST=y(selected by TORTURE_LOCK_TEST) and RCU_TORTURE_TEST=n, the following error is seen while building kernel/torture.c kernel/torture.c: In function torture_onoff: kernel/torture.c:239:3: error: implicit declaration of function rcutorture_sched_setaffinity; did you mean __NR_ia32_sched_setaffinity? [-Werror=implicit-function-declaration] rcutorture_sched_setaffinity(current->pid, cpumask_of(0)); Using sched_setaffnity() instead of rcutorture_sched_setaffinity() to avoid the error. Reported-by: Hulk Robot Fixes: bc3db9afb849 ("EXP: rcutorture hack to force CPU hotplug onto CPU 0") Signed-off-by: Hongbo Yao --- kernel/torture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/torture.c b/kernel/torture.c index b29adec50e01..834214cbd1cd 100644 --- a/kernel/torture.c +++ b/kernel/torture.c @@ -236,7 +236,7 @@ torture_onoff(void *arg) schedule_timeout_interruptible(HZ / 10); continue; } - rcutorture_sched_setaffinity(current->pid, cpumask_of(0)); + sched_setaffinity(current->pid, cpumask_of(0)); cpu = (torture_random(&rand) >> 4) % (maxcpu + 1); if (!torture_offline(cpu, &n_offline_attempts, &n_offline_successes, -- 2.17.1