Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1551961lqe; Mon, 8 Apr 2024 12:13:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVJeYkFD4Ze8TYyLkq2jgnQSzDmeqSUjqygZWpt4RHq4p1S8pTanaAbUjSTOvG2xRA1shaPrYYjy7FbmwqYwQ4Hu3Cij/gtQ9IAGEsBow== X-Google-Smtp-Source: AGHT+IGlsxfmDuk63u2piKICa/MPhxb9rVw9gIFOIw682HY6E2Cbt1uuTcJcHcjpbIjOsshV6kGZ X-Received: by 2002:a05:6a21:8181:b0:1a7:727f:1b24 with SMTP id pd1-20020a056a21818100b001a7727f1b24mr2840720pzb.55.1712603626967; Mon, 08 Apr 2024 12:13:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712603626; cv=pass; d=google.com; s=arc-20160816; b=Ve43puuSjJqlwclmDC10jo3HTZQDrGYmM9n4QUHLL6qNek/VXUJzGZUs3SBdsxawRa 8JJ446HX5NJW30o1dwJvoz5lBKuHqmO++hBlz03ESRfSqxyh3vyai7g+i9AftQcoGuZL pOvhQgADiC6UqaHa/0gEk7p+x5c38QYAkgMoMaNO+Dk6Q5PjsukKUtLEIPICmn/T2K0v 2DkAQ9kB0YVDkY2B2cs0X4pkNbRUUJUzvBKgaNe3gBgy++4QpK98IvBp/cUtXhCSpN0o TqHphP3FqMEffDkJbwJPUVeH6LJ2t3nNEj35aY1PFCiKQdjY56hd9/OWuHO+vOd3MZkP 4B1g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=TSz6KD33b1cptvD0HabqeMsX31zlol9FdwdGVkqigFk=; fh=49GrrO/H3LiGmymuFnNd59pBYHHWBS2xk/6Ejg0rn8E=; b=hydvwkv+4vs19F4RIfy6+J86Mjnb35qB4R273mDcuqkwTyz0ME7m0jNXHZTZOmndpl Gato3mCNijycvDZOw69eFvglBjfxwnvPGgDpHDE/8SQjxrfHJ3xtWN2PKn31l5+ZZTL0 9RkTMg7qMNRernNbQmEJALcaNzOTOzWpXfc5qpetLwsHWGk02a/gX53MnQT+nNmqohbs jLBPYfc2cBuu/noPNPGlT5BslQMWT0iufXutQXyTAIP+d96vBUPgJPXU37z+hM8L9+ND biX87A0SLWHHPZAGQ3QhgB+D9u5ReibOLwKzV6eeQ4cvvqscCcN8GDxZRTks/j9cXM0w sHWw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ngdI8VkP; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-135865-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-135865-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id u8-20020a170903124800b001e014db7dafsi6978328plh.163.2024.04.08.12.13.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 12:13:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-135865-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ngdI8VkP; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-135865-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-135865-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 9F43D286167 for ; Mon, 8 Apr 2024 19:13:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8ECEE14533A; Mon, 8 Apr 2024 19:13:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ngdI8VkP" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A2F821DDD6; Mon, 8 Apr 2024 19:13:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712603620; cv=none; b=sm5enWCcCdzta01B5aC5WrTfAKLMBor2tdQfoNKPr4XmaEkBr4l5MPlWglSGRRjVcCRVSYjxkq/ci3r7JBkvNXCTXvBUcWZH2/XNAR5BSfEYjYVmcva+Yiz/4rteps3r1FA7xSXLYkExiviLdXpF7stzC4pQONb3Oct9vjmYa4s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712603620; c=relaxed/simple; bh=ZQYtPEJCpxwgy71jYr4Xt0wKLHqXYR73lblW6olRIfE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GMFzUotZgCX2GePb8mQ1EcyvCwYEYqDXMZ9/ofpSciCaKkPAAYxaFWFs3hfbwFEgOoAyeIcm2ZeWK9QcSWlqTlRuCoeHeu42BTrx5ImuNH6xsh/I/BdynYnmM4JxDWOHCVRMwBIdoxK8akBLGzHizoIa4FH/gTZ3YukoGMNRGSs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ngdI8VkP; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D18CAC433C7; Mon, 8 Apr 2024 19:13:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712603620; bh=ZQYtPEJCpxwgy71jYr4Xt0wKLHqXYR73lblW6olRIfE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ngdI8VkPGjQyywirngIsUWF1u+GWVSlbMXTxfuLCGGZyDPUmr63zbWDxBMBOWviFL 9VLQhh0EazNUwXEUijaXrOxlp5Ux2/aieECbqvhv4mJZ22hw49NmhCPhHPaqcA2rEW 8L/YnGEDsRH0dkOaliG2zcIan3Qi375Q6srDu5HkwwLgF5j/n6Z/tpqxBqsu8fwbMS 7pfDfDTEqdo7afpO/K4XW1gA15Q8qJg4kDq5pkCZdJOP1dKoXiTdEmYLOaGmBAquZe zGq9A5g2qb0IH53KIzeeFk7pcOdh5oxTOuSpvQl1mjvYtqjB2FEHn9Sg74z/qp47Kr Yh2uYpEmcsGhQ== Date: Mon, 8 Apr 2024 16:13:36 -0300 From: Arnaldo Carvalho de Melo To: Namhyung Kim Cc: Ian Rogers , Kan Liang , Jiri Olsa , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org Subject: Re: [PATCHSET 0/9] Sync tools headers with the kernel source Message-ID: References: <20240408185520.1550865-1-namhyung@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240408185520.1550865-1-namhyung@kernel.org> On Mon, Apr 08, 2024 at 11:55:11AM -0700, Namhyung Kim wrote: > Hello, > > I'm gonna carry these changes on the perf tools tree. I'll update the > vhost.h once it lands on the mainline. Humm, maybe its not a good idea to do that this cycle? I mean some of these were moved from tools/{include,arch} to tools/perf/trace/beauty/{include,arch}, like tools/perf/trace/beauty/arch/x86/include/asm/irq_vectors.h. But having said that, probably isn't a problem, when you get this pulled upstream I'll do a merge with perf-tools-next and this should be trivially resolved, I think. Using the above example: ⬢[acme@toolbox perf-tools-next]$ git log tools/perf/trace/beauty/arch/x86/include/asm/irq_vectors.h commit c8bfe3fad4f86a029da7157bae9699c816f0c309 Author: Arnaldo Carvalho de Melo Date: Mon Mar 11 17:07:33 2024 -0300 perf beauty: Move arch/x86/include/asm/irq_vectors.h copy out of the directory used to build perf It is used only to generate string tables, not to build perf, so move it to the tools/perf/trace/beauty/include/ hierarchy, that is used just for scraping. This is a something that should've have happened, as happened with the linux/socket.h scrapper, do it now as Ian suggested while doing an audit/refactor session in the headers used by perf. No other tools/ living code uses it. Suggested-by: Ian Rogers Reviewed-by: Ian Rogers Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/lkml/CAP-5=fWZVrpRufO4w-S4EcSi9STXcTAN2ERLwTSN7yrSSA-otQ@mail.gmail.com Signed-off-by: Arnaldo Carvalho de Melo - Arnaldo > This is the full explanation from Arnaldo: > > There used to be no copies, with tools/ code using kernel headers > directly. From time to time tools/perf/ broke due to legitimate kernel > hacking. At some point Linus complained about such direct usage. Then we > adopted the current model. > > The way these headers are used in perf are not restricted to just > including them to compile something. > > There are sometimes used in scripts that convert defines into string > tables, etc, so some change may break one of these scripts, or new MSRs > may use some different #define pattern, etc. > > E.g.: > > $ ls -1 tools/perf/trace/beauty/*.sh | head -5 > tools/perf/trace/beauty/arch_errno_names.sh > tools/perf/trace/beauty/drm_ioctl.sh > tools/perf/trace/beauty/fadvise.sh > tools/perf/trace/beauty/fsconfig.sh > tools/perf/trace/beauty/fsmount.sh > $ > $ tools/perf/trace/beauty/fadvise.sh > static const char *fadvise_advices[] = { > [0] = "NORMAL", > [1] = "RANDOM", > [2] = "SEQUENTIAL", > [3] = "WILLNEED", > [4] = "DONTNEED", > [5] = "NOREUSE", > }; > $ > > The tools/perf/check-headers.sh script, part of the tools/ build > process, points out changes in the original files. > > So its important not to touch the copies in tools/ when doing changes in > the original kernel headers, that will be done later, when > check-headers.sh inform about the change to the perf tools hackers. > > > Thanks, > Namhyung > > > Namhyung Kim (9): > tools/include: Sync uapi/drm/i915_drm.h with the kernel sources > tools/include: Sync uapi/linux/fs.h with the kernel sources > tools/include: Sync uapi/linux/kvm.h and asm/kvm.h with the kernel > sources > tools/include: Sync uapi/sound/asound.h with the kernel sources > tools/include: Sync x86 CPU feature headers with the kernel sources > tools/include: Sync x86 asm/irq_vectors.h with the kernel sources > tools/include: Sync x86 asm/msr-index.h with the kernel sources > tools/include: Sync asm-generic/bitops/fls.h with the kernel sources > tools/include: Sync arm64 asm/cputype.h with the kernel sources > > tools/arch/arm64/include/asm/cputype.h | 4 + > tools/arch/arm64/include/uapi/asm/kvm.h | 15 +- > tools/arch/powerpc/include/uapi/asm/kvm.h | 45 +- > tools/arch/s390/include/uapi/asm/kvm.h | 315 +++++++- > tools/arch/x86/include/asm/cpufeatures.h | 17 +- > .../arch/x86/include/asm/disabled-features.h | 11 +- > tools/arch/x86/include/asm/irq_vectors.h | 2 - > tools/arch/x86/include/asm/msr-index.h | 74 +- > .../arch/x86/include/asm/required-features.h | 3 +- > tools/arch/x86/include/uapi/asm/kvm.h | 308 +++++++- > tools/include/asm-generic/bitops/__fls.h | 8 +- > tools/include/asm-generic/bitops/fls.h | 8 +- > tools/include/uapi/drm/i915_drm.h | 16 + > tools/include/uapi/linux/fs.h | 30 +- > tools/include/uapi/linux/kvm.h | 689 +----------------- > tools/include/uapi/sound/asound.h | 4 +- > 16 files changed, 809 insertions(+), 740 deletions(-) > > > base-commit: 25e973a0e077da585e472b4cadb1d2f4c1113285 > -- > 2.44.0.478.gd926399ef9-goog