Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5517501ybi; Tue, 28 May 2019 14:33:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqwDQYYE1hO+2CSH/W7ZGhwMaRImcu6+BycTjiYWFIrtdD3msE9si4UCV1PqiId9Al9b4x55 X-Received: by 2002:a63:1421:: with SMTP id u33mr10812068pgl.218.1559079194327; Tue, 28 May 2019 14:33:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559079194; cv=none; d=google.com; s=arc-20160816; b=h1w4V7VilLvdieWzkF2tdxSThVq7KoXkk3YG77Om3w9i7r609cjMTAQDQy4+wP0l3D r42QqIzS1EHvpG5QR41kvLPw91eIhlDBgmfz0ybViOOPILrzazDgGUl9yAevhRLLjls9 f0ez3yZOunq/r0oIdjIF1oYAhm0w4Pv4EhNi2UVt9tGeaYMOq1pZRl3Yn9xvoW6KAIhd 7zXugiE2AwvruPVvYp1c3LIyhTVaVPTc0UOgzQqtb2EiCOvwMLH/RyY9YqeZyAJ1gSlp /ECVL4Hkzo5KNQkixLYFe0XVymmdFY70SEgFm5ndsKGPP4B4iWJe2vHKv7lUbadzPCJF 1ojA== 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:dkim-signature:dkim-filter; bh=5kIVYq0t2CD5KdWGvolWWxDmy8CX0bGgpVx+8sYQbck=; b=0C0z/03GiUlkS6CFU3B9bkYRKV5A+orAOYdyg50hNgqtaqfW/Shj5I4bHSs28ceqA6 WAfw+MrGD2pk0vHYmU4v+B7nt5XWIsWkKi43bjZ3filGwdcTsf0f1NtSOb6RkkBms1hJ fh94/DkzAzHtJ0eMbDJUel+uBNa21dIzNkyvLniroafkYpqP2TpRF4sJ89ziNIsUK9Gb cWKvtaiG2/W/q/aJ7X5MXG00933s3Kd3qiIQRs/HyYbAoKC7f+qaPLdWkOO0kzXYU+Sj 0MRHOKLCRbxAY0Rkfo8Hp10iePrzLhNwUbtjrdEYvK2jaNByKfDkQtcxTdhqrgOoMaKB W1nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zytor.com header.s=2019051801 header.b=BLc30wDw; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k8si24822500pgm.36.2019.05.28.14.32.57; Tue, 28 May 2019 14:33:14 -0700 (PDT) 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; dkim=pass header.i=@zytor.com header.s=2019051801 header.b=BLc30wDw; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727859AbfE1VXS (ORCPT + 99 others); Tue, 28 May 2019 17:23:18 -0400 Received: from terminus.zytor.com ([198.137.202.136]:36963 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726706AbfE1VXR (ORCPT ); Tue, 28 May 2019 17:23:17 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id x4SLMgfI2238034 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 28 May 2019 14:22:42 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 terminus.zytor.com x4SLMgfI2238034 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2019051801; t=1559078563; bh=5kIVYq0t2CD5KdWGvolWWxDmy8CX0bGgpVx+8sYQbck=; h=Date:From:Cc:Reply-To:In-Reply-To:References:To:Subject:From; b=BLc30wDwUdrHtl64TEJWmOZfZPSQdij44/gxiqEy/B1TvZb2rtUMmgwRzCa6X4AfX CR1uejlIhkAkmbZDy6tOAAnWCQRUlJF3ZmKbc9eu9Pt6Ye79m4tpwyoqiGgmbbVhks 0jSV4jA3UIbvaOWP9eg1KfvwqwP3EgW0b1evxSOqZZxRDVzYNBUhdeV9rIHOHfRi0m WP+3L7yAL3t30zR78u46xKvJIRxsipSM7BasbSz/2YrMkEFkaN7bo9XacV3/Q9nXyL vYyFr750CiZg++TaejN9941yKRNGnzwIMpyrcY2B4AdYLY8FczDBg7xKVb2vEt+AOe WbeimgTtDie+Q== Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id x4SLMftb2238031; Tue, 28 May 2019 14:22:41 -0700 Date: Tue, 28 May 2019 14:22:41 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Vitaly Chikunov Message-ID: Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, kim.phillips@arm.com, tglx@linutronix.de, mpetlan@redhat.com, peterz@infradead.org, acme@redhat.com, jolsa@redhat.com, namhyung@kernel.org, alexander.shishkin@linux.intel.com, ravi.bangoria@linux.vnet.ibm.com, brueckner@linux.ibm.com, mingo@kernel.org, vt@altlinux.org Reply-To: brueckner@linux.ibm.com, ravi.bangoria@linux.vnet.ibm.com, alexander.shishkin@linux.intel.com, mingo@kernel.org, vt@altlinux.org, mpetlan@redhat.com, kim.phillips@arm.com, tglx@linutronix.de, hpa@zytor.com, linux-kernel@vger.kernel.org, namhyung@kernel.org, jolsa@redhat.com, acme@redhat.com, peterz@infradead.org In-Reply-To: <20190521030203.1447-1-vt@altlinux.org> References: <20190521030203.1447-1-vt@altlinux.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/urgent] perf arm64: Fix mksyscalltbl when system kernel headers are ahead of the kernel Git-Commit-ID: f95d050cdc5d34f9a4417e06c392ccbf146037bb 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=-3.1 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, T_DATE_IN_FUTURE_96_Q autolearn=ham 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: f95d050cdc5d34f9a4417e06c392ccbf146037bb Gitweb: https://git.kernel.org/tip/f95d050cdc5d34f9a4417e06c392ccbf146037bb Author: Vitaly Chikunov AuthorDate: Tue, 21 May 2019 06:02:03 +0300 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 28 May 2019 09:49:03 -0300 perf arm64: Fix mksyscalltbl when system kernel headers are ahead of the kernel When a host system has kernel headers that are newer than a compiling kernel, mksyscalltbl fails with errors such as: : In function 'main': :271:44: error: '__NR_kexec_file_load' undeclared (first use in this function) :271:44: note: each undeclared identifier is reported only once for each function it appears in :272:46: error: '__NR_pidfd_send_signal' undeclared (first use in this function) :273:43: error: '__NR_io_uring_setup' undeclared (first use in this function) :274:43: error: '__NR_io_uring_enter' undeclared (first use in this function) :275:46: error: '__NR_io_uring_register' undeclared (first use in this function) tools/perf/arch/arm64/entry/syscalls//mksyscalltbl: line 48: /tmp/create-table-xvUQdD: Permission denied mksyscalltbl is compiled with default host includes, but run with compiling kernel tree includes, causing some syscall numbers to being undeclared. Committer testing: Before this patch, in my cross build environment, no build problems, but these new syscalls were not in the syscalls.c generated from the unistd.h file, which is a bug, this patch fixes it: perfbuilder@6e20056ed532:/git/perf$ tail /tmp/build/perf/arch/arm64/include/generated/asm/syscalls.c [292] = "io_pgetevents", [293] = "rseq", [294] = "kexec_file_load", [424] = "pidfd_send_signal", [425] = "io_uring_setup", [426] = "io_uring_enter", [427] = "io_uring_register", [428] = "syscalls", }; perfbuilder@6e20056ed532:/git/perf$ strings /tmp/build/perf/perf | egrep '^(io_uring_|pidfd_|kexec_file)' kexec_file_load pidfd_send_signal io_uring_setup io_uring_enter io_uring_register perfbuilder@6e20056ed532:/git/perf$ $ Well, there is that last "syscalls" thing, but that looks like some other bug. Signed-off-by: Vitaly Chikunov Tested-by: Arnaldo Carvalho de Melo Tested-by: Michael Petlan Cc: Alexander Shishkin Cc: Hendrik Brueckner Cc: Jiri Olsa Cc: Kim Phillips Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Link: http://lkml.kernel.org/r/20190521030203.1447-1-vt@altlinux.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/arch/arm64/entry/syscalls/mksyscalltbl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl b/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl index c88fd32563eb..459469b7222c 100755 --- a/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl +++ b/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl @@ -56,7 +56,7 @@ create_table() echo "};" } -$gcc -E -dM -x c $input \ +$gcc -E -dM -x c -I $incpath/include/uapi $input \ |sed -ne 's/^#define __NR_//p' \ |sort -t' ' -k2 -nu \ |create_table