Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3330878imu; Sun, 11 Nov 2018 12:31:58 -0800 (PST) X-Google-Smtp-Source: AJdET5dCDZTD7vVziE1LAgavZPb8G7lGN2BgA6MXR9UpMhQVsTHmEH3es/us21qxpz9OIpPHNaQF X-Received: by 2002:a63:295:: with SMTP id 143mr14744770pgc.362.1541968317938; Sun, 11 Nov 2018 12:31:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541968317; cv=none; d=google.com; s=arc-20160816; b=KO4QJWVwB3+cpCcRFIwQxr+Jgp/DKIkFaKgC6hzhD6v1CwCUI3+47hlluNJ5s+TJVo DqmtZptrVnjrqXss9mnnT0iQ1DwNjxiMCW9KUEEtk8vodQaYZuNCLuTlvqzJATr+x6oE yMQTq0XgqRwCcbDAoO02ggSwGY6XzKiBMyCkywIwXMNc0s4s9nCsxtim93DuLsNdZh3O J9R7WHTeKm5q0ZgdBdXEkVgHKKl945TgNhbPhZTPvWfFbRVnjyiNcSuIAygHcp15JXlx IfR02epp5a6j0ELAcGG9zKTEYqzXR8mkEYjCcTjL1wPVSHmRAJoRFpj6Mf3uB26nw2+m rFAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=ABjFOAz2et8TuTSZvYsI2EYMzFgnH5sB8pIxiofQBNY=; b=jC+a0wxdghGli2mOTYrrSrPpKHf2QAKnDX+N3lpX3FEB5BbVyv0zxWHIYJaamKYs6K cK6xKOiVXgJrJgTGH2uk+QGSDzEJuwUThGkQYu6oaYQup4GE+D43ao/iFwdgcKjF9mTR vvr1tdkB0dD+zcJb+7Fg7M6KiOiZQwv27i3kTZXcCXZ3jRsJuMnyahne9QTi7ywO9yk2 0DEzk9AuANuKYyi8VZ81vKt51lLO2e1ico4Z+5H+aGmMqHT52XXMT9uCY5WTWrEzWHbK PT6VNJCWRKYsul8U/iGNmEZ+cA5OjsxKLard/L00nADbqJrs7XOWJhk9T3TDW4s4yvFg i+fw== 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 g7-v6si15977159plb.426.2018.11.11.12.31.43; Sun, 11 Nov 2018 12:31:57 -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 S1730676AbeKLGU3 (ORCPT + 99 others); Mon, 12 Nov 2018 01:20:29 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:50412 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730408AbeKLFsU (ORCPT ); Mon, 12 Nov 2018 00:48:20 -0500 Received: from [192.168.4.242] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gLvsf-0000lG-F4; Sun, 11 Nov 2018 19:58:49 +0000 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1gLvsa-0001sn-Jm; Sun, 11 Nov 2018 19:58:44 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Wang Nan" , "Adrian Hunter" , "Jiri Olsa" , "Arnaldo Carvalho de Melo" , "David Ahern" , "Namhyung Kim" Date: Sun, 11 Nov 2018 19:49:05 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 352/366] perf tools: Move syscall number fallbacks from perf-sys.h to tools/arch/x86/include/asm/ In-Reply-To: X-SA-Exim-Connect-IP: 192.168.4.242 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.61-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Arnaldo Carvalho de Melo commit cec07f53c398f22576df77052c4777dc13f14962 upstream. And remove the empty tools/arch/x86/include/asm/unistd_{32,64}.h files introduced by eae7a755ee81 ("perf tools, x86: Build perf on older user-space as well"). This way we get closer to mirroring the kernel for cases where __NR_ can't be found for some include path/_GNU_SOURCE/whatever scenario. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-kpj6m3mbjw82kg6krk2z529e@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo [bwh: Backported to 3.16: - Also remove the deleted headers from LIB_H in Makefile.perf - Adjust context] Signed-off-by: Ben Hutchings --- --- /dev/null +++ b/tools/arch/x86/include/asm/unistd_32.h @@ -0,0 +1,9 @@ +#ifndef __NR_perf_event_open +# define __NR_perf_event_open 336 +#endif +#ifndef __NR_futex +# define __NR_futex 240 +#endif +#ifndef __NR_gettid +# define __NR_gettid 224 +#endif --- /dev/null +++ b/tools/arch/x86/include/asm/unistd_64.h @@ -0,0 +1,9 @@ +#ifndef __NR_perf_event_open +# define __NR_perf_event_open 298 +#endif +#ifndef __NR_futex +# define __NR_futex 202 +#endif +#ifndef __NR_gettid +# define __NR_gettid 186 +#endif --- a/tools/perf/config/Makefile +++ b/tools/perf/config/Makefile @@ -252,6 +252,7 @@ CFLAGS += -I$(src-perf)/arch/$(ARCH)/inc CFLAGS += -I$(srctree)/tools/include/ CFLAGS += -I$(srctree)/arch/$(ARCH)/include/uapi CFLAGS += -I$(srctree)/arch/$(ARCH)/include +CFLAGS += -I$(srctree)/tools/arch/$(ARCH)/include CFLAGS += -I$(srctree)/include/uapi CFLAGS += -I$(srctree)/include --- a/tools/perf/perf-sys.h +++ b/tools/perf/perf-sys.h @@ -14,15 +14,6 @@ #define rmb() asm volatile("lock; addl $0,0(%%esp)" ::: "memory") #define cpu_relax() asm volatile("rep; nop" ::: "memory"); #define CPUINFO_PROC "model name" -#ifndef __NR_perf_event_open -# define __NR_perf_event_open 336 -#endif -#ifndef __NR_futex -# define __NR_futex 240 -#endif -#ifndef __NR_gettid -# define __NR_gettid 224 -#endif #endif #if defined(__x86_64__) @@ -31,15 +22,6 @@ #define rmb() asm volatile("lfence" ::: "memory") #define cpu_relax() asm volatile("rep; nop" ::: "memory"); #define CPUINFO_PROC "model name" -#ifndef __NR_perf_event_open -# define __NR_perf_event_open 298 -#endif -#ifndef __NR_futex -# define __NR_futex 202 -#endif -#ifndef __NR_gettid -# define __NR_gettid 186 -#endif #endif #ifdef __powerpc__ --- a/tools/perf/util/include/asm/unistd_32.h +++ /dev/null @@ -1 +0,0 @@ - --- a/tools/perf/util/include/asm/unistd_64.h +++ /dev/null @@ -1 +0,0 @@ - --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -239,8 +239,6 @@ LIB_H += util/include/asm/uaccess.h LIB_H += util/include/dwarf-regs.h LIB_H += util/include/asm/dwarf2.h LIB_H += util/include/asm/cpufeature.h -LIB_H += util/include/asm/unistd_32.h -LIB_H += util/include/asm/unistd_64.h LIB_H += perf.h LIB_H += util/annotate.h LIB_H += util/cache.h