Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1298984imu; Thu, 22 Nov 2018 13:48:54 -0800 (PST) X-Google-Smtp-Source: AFSGD/WiqL1RXzPpCAh69U//fG/fGWVp9AQoZNLF+n0nePpKrTJGy2Gwo4Z9k3s/xgvudm+r2vsn X-Received: by 2002:a63:6150:: with SMTP id v77mr11309960pgb.266.1542923334653; Thu, 22 Nov 2018 13:48:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542923334; cv=none; d=google.com; s=arc-20160816; b=ALKYpYzrqZVr7d6E8AcjRXlz/OPKTTWBWKtTXKQZPFIbhs1BBcZAph9WqWOFXXlKji +47K3iYWVc+ZtxvASh19/Uuhxz0CY8/boLroPNUzL5NtzWTNhLnt0WPvOTF/mtcjguPI I1YxJHcoLjUB7UoXVv+v3JA+RAJd/5HXN4fbj4mCjUfpmX3NG1m6eaqV8+E+scuHCy/7 7hbZwx+plG2lUnFZKPTHroTYlpPB3Ysf2Jw7iXbRrgCgtozFkNrguL2O7O2bzwiQ5JNc XJh3vmcbH+2JOviQTTvk4H5kqNTQzOx/yCbJb+WJ+io4WD7+v2jzr6x51Yh6jE/X57Qk doSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date; bh=4Jl4mr9S5BX2eG8cAP0PtwiH4ZaXX9HrU8erTQikb4w=; b=MiWXChgACQqIJXXGoanxnBZSTSS7yljNaBRbfG4+hTDlHRaKERQgPduSMnvYv3ym7K NwH/i0nr+V0weAdVx5NWPA38HxfGDIUOrJVnoOdw391OokEcS+xk4JvjCANNHcqngeyy 3aY44X8byalqUHPPWq9aSF3Wm06Zv0Z8CtbM2S/aTDd2zjiZ+7c4458WV5Y6Zcjwj80o cEyIXXQZnnTyVRYU+4xgUtfTj7sf8Z2maKnhQKJ7iNiTW2WfTKFqBDaoEGcuZeqX8MXg FkZJX4pRtMop3ZwGQ7PFRXyt9kDaatemCCsfogn0ZGSFAOH7w3OVFNogV7zGXhC6voVi VaPQ== 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 f32-v6si29114696plf.65.2018.11.22.13.48.39; Thu, 22 Nov 2018 13:48:54 -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 S2392427AbeKVRsa (ORCPT + 99 others); Thu, 22 Nov 2018 12:48:30 -0500 Received: from terminus.zytor.com ([198.137.202.136]:38485 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733195AbeKVRs3 (ORCPT ); Thu, 22 Nov 2018 12:48:29 -0500 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id wAM7A2KS3691855 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 21 Nov 2018 23:10:02 -0800 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id wAM7A1EU3691837; Wed, 21 Nov 2018 23:10:01 -0800 Date: Wed, 21 Nov 2018 23:10:01 -0800 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Davidlohr Bueso Message-ID: Cc: jbaron@akamai.com, akpm@linux-foundation.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, mingo@kernel.org, dbueso@suse.de, acme@redhat.com, dave@stgolabs.net, hpa@zytor.com Reply-To: akpm@linux-foundation.org, tglx@linutronix.de, jbaron@akamai.com, dbueso@suse.de, mingo@kernel.org, linux-kernel@vger.kernel.org, dave@stgolabs.net, acme@redhat.com, hpa@zytor.com In-Reply-To: <20181109210719.pr7ohayuwqmfp2wl@linux-r8p5> References: <20181109210719.pr7ohayuwqmfp2wl@linux-r8p5> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf bench: Move HAVE_PTHREAD_ATTR_SETAFFINITY_NP into bench.h Git-Commit-ID: d47d77c3f008d3cf02c6ce92ef4f6e32ca270351 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=0.1 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_96_Q autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: d47d77c3f008d3cf02c6ce92ef4f6e32ca270351 Gitweb: https://git.kernel.org/tip/d47d77c3f008d3cf02c6ce92ef4f6e32ca270351 Author: Davidlohr Bueso AuthorDate: Fri, 9 Nov 2018 13:07:19 -0800 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 21 Nov 2018 12:00:32 -0300 perf bench: Move HAVE_PTHREAD_ATTR_SETAFFINITY_NP into bench.h Both futex and epoll need this call, and can cause build failure on systems that don't have it pthread_attr_setaffinity_np(). Signed-off-by: Davidlohr Bueso Reported-by: Arnaldo Carvalho de Melo Cc: Andrew Morton Cc: Davidlohr Bueso Cc: Jason Baron Link: http://lkml.kernel.org/r/20181109210719.pr7ohayuwqmfp2wl@linux-r8p5 Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/bench/bench.h | 11 +++++++++++ tools/perf/bench/futex.h | 12 ------------ 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/tools/perf/bench/bench.h b/tools/perf/bench/bench.h index 6c9fcd757f31..8299c76046cd 100644 --- a/tools/perf/bench/bench.h +++ b/tools/perf/bench/bench.h @@ -48,4 +48,15 @@ int bench_futex_lock_pi(int argc, const char **argv); extern int bench_format; extern unsigned int bench_repeat; +#ifndef HAVE_PTHREAD_ATTR_SETAFFINITY_NP +#include +#include +static inline int pthread_attr_setaffinity_np(pthread_attr_t *attr __maybe_unused, + size_t cpusetsize __maybe_unused, + cpu_set_t *cpuset __maybe_unused) +{ + return 0; +} +#endif + #endif diff --git a/tools/perf/bench/futex.h b/tools/perf/bench/futex.h index db4853f209c7..31b53cc7d5bc 100644 --- a/tools/perf/bench/futex.h +++ b/tools/perf/bench/futex.h @@ -86,16 +86,4 @@ futex_cmp_requeue(u_int32_t *uaddr, u_int32_t val, u_int32_t *uaddr2, int nr_wak return futex(uaddr, FUTEX_CMP_REQUEUE, nr_wake, nr_requeue, uaddr2, val, opflags); } - -#ifndef HAVE_PTHREAD_ATTR_SETAFFINITY_NP -#include -#include -static inline int pthread_attr_setaffinity_np(pthread_attr_t *attr __maybe_unused, - size_t cpusetsize __maybe_unused, - cpu_set_t *cpuset __maybe_unused) -{ - return 0; -} -#endif - #endif /* _FUTEX_H */