From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1431629AbdDYONs (ORCPT ); Tue, 25 Apr 2017 10:13:48 -0400 Received: from mail.kernel.org ([198.145.29.136]:55340 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1431619AbdDYON0 (ORCPT ); Tue, 25 Apr 2017 10:13:26 -0400 Date: Tue, 25 Apr 2017 11:13:14 -0300 From: Arnaldo Carvalho de Melo To: "Luck, Tony" Cc: Andy Whitcroft , Joe Perches , Ingo Molnar , linux-kernel@vger.kernel.org, Arnaldo Carvalho de Melo Subject: Re: [PATCH 20/22] tools arch: Sync arch/x86/lib/memcpy_64.S with the kernel Message-ID: <20170425141314.GB3517@kernel.org> References: <20170424195439.29875-1-acme@kernel.org> <20170424195439.29875-21-acme@kernel.org> <20170424203630.GA18000@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170424203630.GA18000@intel.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Mon, Apr 24, 2017 at 01:36:30PM -0700, Luck, Tony escreveu: > On Mon, Apr 24, 2017 at 04:54:37PM -0300, Arnaldo Carvalho de Melo wrote: > > From: Arnaldo Carvalho de Melo > > Just a minor fix done in: > > Fixes: 26a37ab319a2 ("x86/mce: Fix copy/paste error in exception table entries") > If we are going to have all these copies of kernel files below > "tools/...", perhaps checkpatch could warn people touching one > that the other needs the same update? So, we have tools/perf/check-headers.sh that will warn, when building tools/perf/, if some of the files we get from the kernel is out of synch. When we see this, we should look to see if the change will entail changes in tools/, if it will drag some other header we don't need, etc. Sometimes, like in this case, we don't want to pull extra headers, like asm/export.h, so we have this in that check-headers.sh script: [acme@jouet linux]$ tail -5 tools/perf/check-headers.sh # diff with extra ignore lines check arch/x86/lib/memcpy_64.S -B -I "^EXPORT_SYMBOL" -I "^#include " check arch/x86/lib/memset_64.S -B -I "^EXPORT_SYMBOL" -I "^#include " check include/uapi/asm-generic/mman.h -B -I "^#include <\(uapi/\)*asm-generic/mman-common.h>" check include/uapi/linux/mman.h -B -I "^#include <\(uapi/\)*asm/mman.h>" [acme@jouet linux]$ I.e. we want to get as close to what is in the kernel as possible, but with some exceptions. And we don't want to add more work to the kernel developers, who can continue working as if there is no tools/ in the tree. For those who want to help tools/, then its just a matter of building perf when doing changes to kernel headers. We also want these copies because with: [acme@jouet linux]$ make help | grep perf perf-tar-src-pkg - Build perf-4.11.0-rc6.tar source tarball perf-targz-src-pkg - Build perf-4.11.0-rc6.tar.gz source tarball perf-tarbz2-src-pkg - Build perf-4.11.0-rc6.tar.bz2 source tarball perf-tarxz-src-pkg - Build perf-4.11.0-rc6.tar.xz source tarball [acme@jouet linux]$ We can create tarball with just what is needed to build perf, then get that tarball and move to some other system and build a newer perf to run in some older environment, older kernel, etc. - Arnaldo