public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Yicong Yang <yangyicong@huawei.com>
To: Mark Rutland <mark.rutland@arm.com>
Cc: Leo Yan <leo.yan@arm.com>, Leo Yan <leo.yan@linux.dev>,
	<yangyicong@hisilicon.com>, <acme@kernel.org>,
	<james.clark@linaro.org>, <namhyung@kernel.org>,
	<shameerali.kolothum.thodi@huawei.com>, <will@kernel.org>,
	<catalin.marinas@arm.com>, <jolsa@kernel.org>,
	<irogers@google.com>, <peterz@infradead.org>, <mingo@redhat.com>,
	<linux-perf-users@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<jonathan.cameron@huawei.com>, <linuxarm@huawei.com>,
	<prime.zeng@hisilicon.com>
Subject: Re: [PATCH] tools/headers: Workaround the copy coherency issue of arm64's cputype.h
Date: Wed, 18 Jun 2025 19:22:26 +0800	[thread overview]
Message-ID: <2fe89c81-9613-eb01-2487-115b8ea27e8e@huawei.com> (raw)
In-Reply-To: <aFJ8bQh_30JMzF_-@J2N7QTR9R3>

On 2025/6/18 16:44, Mark Rutland wrote:
> On Wed, Jun 18, 2025 at 04:30:17PM +0800, Yicong Yang wrote:
>> From: Yicong Yang <yangyicong@hisilicon.com>
>>
>> arch/arm64/include/asm/cputype.h is copied from arch/arm64 and used
>> by perf to parsing vendor specific SPE packets according to the MIDR.
>> The header diverge after errata management handling for VM live
>> migration merged [1] so a direct copy will lead to the build failure
>> of perf [2]: is_midr_in_range_list() is used but the implementation
>> has been changed and moved out of the kernel header.
> 
> The build failure described above manifests *IF AND WHEN* we update the
> userspace header with a copy of the kernel header, and there's no need
> to do so.
> 
>> Workaround this issue by maintaining is_perf_midr_in_range_list()
>> in the userspace. Temporarily include the kernel headers for the
>> MIDR definitions, a later refactor will generate the MIDR header
>> dynamically similar to how we handle the sysreg-defs.h in userspace.
>> Remove cputype.h from check-headers.sh.
> 
> Sorry, but NAK to this. As-is, this means that any change to the
> kernel-internal asm/cputype.h is liable to break the userspace tool, and
> placing a burden on whoever modifies the kernel-internal headers.
> 
> The simple solution for now is to *NOT* update the userspace header, and
> to stop warning that this has diverged from the kernel header. If we
> want to improve matters, we should split things appropriately for
> sharing.
> 

ok then I think we just make it as is and wait for Leo's refactor.

thanks.


      reply	other threads:[~2025-06-18 13:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-18  8:30 [PATCH] tools/headers: Workaround the copy coherency issue of arm64's cputype.h Yicong Yang
2025-06-18  8:37 ` Yicong Yang
2025-06-18  8:44 ` Mark Rutland
2025-06-18 11:22   ` Yicong Yang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2fe89c81-9613-eb01-2487-115b8ea27e8e@huawei.com \
    --to=yangyicong@huawei.com \
    --cc=acme@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=irogers@google.com \
    --cc=james.clark@linaro.org \
    --cc=jolsa@kernel.org \
    --cc=jonathan.cameron@huawei.com \
    --cc=leo.yan@arm.com \
    --cc=leo.yan@linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=prime.zeng@hisilicon.com \
    --cc=shameerali.kolothum.thodi@huawei.com \
    --cc=will@kernel.org \
    --cc=yangyicong@hisilicon.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox