From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751990AbcF0SNU (ORCPT ); Mon, 27 Jun 2016 14:13:20 -0400 Received: from mail.kernel.org ([198.145.29.136]:33980 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751638AbcF0SNT (ORCPT ); Mon, 27 Jun 2016 14:13:19 -0400 Date: Mon, 27 Jun 2016 15:13:10 -0300 From: Arnaldo Carvalho de Melo To: Hekuang Cc: Nilay Vaish , peterz@infradead.org, mingo@redhat.com, jolsa@redhat.com, brendan.d.gregg@gmail.com, ast@kernel.org, alexander.shishkin@linux.intel.com, wangnan0@huawei.com, Linux Kernel list Subject: Re: [RFC PATCH v2 05/26] tools include: Sync math64.h and div64.h Message-ID: <20160627181310.GD27027@kernel.org> References: <1466940078-65581-1-git-send-email-hekuang@huawei.com> <1466940078-65581-6-git-send-email-hekuang@huawei.com> <57708D96.5000907@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <57708D96.5000907@huawei.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Mon, Jun 27, 2016 at 10:21:10AM +0800, Hekuang escreveu: > 在 2016/6/27 5:08, Nilay Vaish 写道: > > On 26 June 2016 at 06:20, He Kuang wrote: > > > From: Wang Nan > > > This patch copies "include/linux/math64.h" into > > > "tools/include/linux/math64.h" and copies > > > "include/asm-generic/div64.h" into > > > "tools/include/asm-generic/div64.h", to enable other libraries use > > > arithmetic operation defined in them. > > This probably is a newbie question. What prevents us from using the > > header files directly? > For not being influenced by kernel headers update too much, perf adopts > the header files in its own folder. yeah, we used to include them directly, but then, changes in the kernel sometimes broke the tools/ build, so we instead copy it and check for changes using diff as part of the build process, flagging changes, like the one I'm investigating now: [acme@jouet linux]$ diff -u tools/perf/arch/x86/entry/syscalls/syscall_64.tbl arch/x86/entry/syscalls/syscall_64.tbl --- tools/perf/arch/x86/entry/syscalls/syscall_64.tbl 2016-06-06 11:06:31.423335774 -0300 +++ arch/x86/entry/syscalls/syscall_64.tbl 2016-06-06 11:06:30.511345336 -0300 @@ -374,3 +374,5 @@ 543 x32 io_setup compat_sys_io_setup 544 x32 io_submit compat_sys_io_submit 545 x32 execveat compat_sys_execveat/ptregs +534 x32 preadv2 compat_sys_preadv2 +535 x32 pwritev2 compat_sys_pwritev2 [acme@jouet linux]$ Flagged in the build process: ... get_cpuid: [ on ] ... bpf: [ on ] GEN /tmp/build/perf/common-cmds.h Warning: x86_64's syscall_64.tbl differs from kernel CC /tmp/build/perf/fixdep.o LD /tmp/build/perf/fixdep-in - Arnaldo