[PATCH v3 3/3] tools headers: Don't check arm64's unistd.h

Leo Yan posted 3 patches 1 month, 2 weeks ago
There is a newer version of this series
[PATCH v3 3/3] tools headers: Don't check arm64's unistd.h
Posted by Leo Yan 1 month, 2 weeks ago
The arm64 unistd.h in tools now diverges from the kernel header.
Comparing the two headers is pointless, remove the check.

Signed-off-by: Leo Yan <leo.yan@arm.com>
---
 tools/perf/check-headers.sh | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tools/perf/check-headers.sh b/tools/perf/check-headers.sh
index e0537f275da2f79ea9e05b91300aa1e2f996e9f1..da3aca87457fdc56c96d4184f2dee88dab026d98 100755
--- a/tools/perf/check-headers.sh
+++ b/tools/perf/check-headers.sh
@@ -54,7 +54,6 @@ declare -a FILES=(
   "arch/s390/include/uapi/asm/kvm.h"
   "arch/s390/include/uapi/asm/sie.h"
   "arch/arm64/include/uapi/asm/kvm.h"
-  "arch/arm64/include/uapi/asm/unistd.h"
   "arch/alpha/include/uapi/asm/errno.h"
   "arch/mips/include/asm/errno.h"
   "arch/mips/include/uapi/asm/errno.h"

-- 
2.34.1
Re: [PATCH v3 3/3] tools headers: Don't check arm64's unistd.h
Posted by James Clark 1 month, 2 weeks ago

On 22/12/2025 6:06 pm, Leo Yan wrote:
> The arm64 unistd.h in tools now diverges from the kernel header.
> Comparing the two headers is pointless, remove the check.
> 
> Signed-off-by: Leo Yan <leo.yan@arm.com>
> ---
>   tools/perf/check-headers.sh | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/tools/perf/check-headers.sh b/tools/perf/check-headers.sh
> index e0537f275da2f79ea9e05b91300aa1e2f996e9f1..da3aca87457fdc56c96d4184f2dee88dab026d98 100755
> --- a/tools/perf/check-headers.sh
> +++ b/tools/perf/check-headers.sh
> @@ -54,7 +54,6 @@ declare -a FILES=(
>     "arch/s390/include/uapi/asm/kvm.h"
>     "arch/s390/include/uapi/asm/sie.h"
>     "arch/arm64/include/uapi/asm/kvm.h"
> -  "arch/arm64/include/uapi/asm/unistd.h"

Isn't this _more_ of a special case for arm64 than continuing to do the 
consistency check like in v2? It seems like the desire for consistency 
isn't taking the whole tools/ picture into account and we end up adding 
more inconsistencies than just the regular static copy + diff check that 
we have for all the other headers.

>     "arch/alpha/include/uapi/asm/errno.h"
>     "arch/mips/include/asm/errno.h"
>     "arch/mips/include/uapi/asm/errno.h"
>
Re: [PATCH v3 3/3] tools headers: Don't check arm64's unistd.h
Posted by Leo Yan 1 month ago
On Wed, Dec 24, 2025 at 01:51:33PM +0000, James Clark wrote:
> On 22/12/2025 6:06 pm, Leo Yan wrote:
> > The arm64 unistd.h in tools now diverges from the kernel header.
> > Comparing the two headers is pointless, remove the check.
> > 
> > Signed-off-by: Leo Yan <leo.yan@arm.com>
> > ---
> >   tools/perf/check-headers.sh | 1 -
> >   1 file changed, 1 deletion(-)
> > 
> > diff --git a/tools/perf/check-headers.sh b/tools/perf/check-headers.sh
> > index e0537f275da2f79ea9e05b91300aa1e2f996e9f1..da3aca87457fdc56c96d4184f2dee88dab026d98 100755
> > --- a/tools/perf/check-headers.sh
> > +++ b/tools/perf/check-headers.sh
> > @@ -54,7 +54,6 @@ declare -a FILES=(
> >     "arch/s390/include/uapi/asm/kvm.h"
> >     "arch/s390/include/uapi/asm/sie.h"
> >     "arch/arm64/include/uapi/asm/kvm.h"
> > -  "arch/arm64/include/uapi/asm/unistd.h"
> 
> Isn't this _more_ of a special case for arm64 than continuing to do the
> consistency check like in v2? It seems like the desire for consistency isn't
> taking the whole tools/ picture into account and we end up adding more
> inconsistencies than just the regular static copy + diff check that we have
> for all the other headers.

Ideally, the perf tool should not maintain UAPI headers. These headers
should be provided by the toolchain or generated dynamically.  From
this perspective, this patch is on the right way, as it avoids
maintaining special uAPI copies.

To be clear, I do not suggest removing all synced headers — only the
UAPI headers.

Thanks,
Leo