Linux Perf Users
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Chengwen Feng" <fengchengwen@huawei.com>
Cc: linux-pci@vger.kernel.org, linux-perf-users@vger.kernel.org
Subject: Re: [PATCH RESEND v10 5/8] ACPI: Centralize acpi_get_cpu_uid() declaration in include/linux/acpi.h
Date: Thu, 13 Aug 2026 23:26:26 +0000	[thread overview]
Message-ID: <20260813232631.89F001F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260401081640.26875-6-fengchengwen@huawei.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Build breakage when CONFIG_ACPI is disabled due to missing acpi_get_cpu_uid() stub.
--

--- Patch [5]: [PATCH RESEND v10 5/8] ACPI: Centralize acpi_get_cpu_uid() declaration in include/linux/acpi.h ---
commit f99931b839a856d11d22796fd0c23424af139915
Author: Chengwen Feng <fengchengwen@huawei.com>

ACPI: Centralize acpi_get_cpu_uid() declaration in include/linux/acpi.h

This commit centralizes the acpi_get_cpu_uid() declaration into the global
scope in include/linux/acpi.h and removes the architecture-specific
declarations. This unifies the interface and eliminates duplicate prototypes.

> diff --git a/include/linux/acpi.h b/include/linux/acpi.h
> index fbf0c3a65f598..f7e50e9cfb224 100644
> --- a/include/linux/acpi.h
> +++ b/include/linux/acpi.h
[ ... ]
> @@ -323,6 +323,17 @@ int acpi_unmap_cpu(int cpu);
>  
>  acpi_handle acpi_get_processor_handle(int cpu);
>  
> +/**
> + * acpi_get_cpu_uid() - Get ACPI Processor UID of from MADT table
> + * @cpu: Logical CPU number (0-based)
> + * @uid: Pointer to store ACPI Processor UID
> + *
> + * Return: 0 on success (ACPI Processor ID stored in *uid);
> + *         -EINVAL if CPU number is invalid or out of range;
> + *         -ENODEV if ACPI Processor UID for the CPU is not found.
> + */
> +int acpi_get_cpu_uid(unsigned int cpu, u32 *uid);
> +

[Severity: Low]
Does this cause a build failure when CONFIG_ACPI is disabled? The declaration
is added here, but it appears there is no static inline stub provided in the
!CONFIG_ACPI section of the header.

Callers outside of ACPI-specific code seem to use this function
unconditionally. For example, in arch/x86/xen/enlighten_hvm.c within
xen_cpu_up_prepare_hvm():

    if (acpi_get_cpu_uid(cpu, &cpu_uid) == 0)

Without a static inline stub returning an error code (like -ENODEV) when
CONFIG_ACPI is not set, does compiling x86 with CONFIG_XEN_PVHVM enabled and
CONFIG_ACPI disabled result in an implicit function declaration and undefined
reference linker error?

>  #ifdef CONFIG_ACPI_HOTPLUG_IOAPIC
>  int acpi_get_ioapic_id(acpi_handle handle, u32 gsi_base, u64 *phys_addr);
>  #endif

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260401081640.26875-1-fengchengwen@huawei.com?part=5

  reply	other threads:[~2026-08-13 23:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-01  8:16 [PATCH RESEND v10 0/8] ACPI: Unify CPU UID interface and fix ARM64 TPH steer-tag issue Chengwen Feng
2026-04-01  8:16 ` [PATCH RESEND v10 1/8] arm64: acpi: Add acpi_get_cpu_uid() for unified ACPI CPU UID retrieval Chengwen Feng
2026-04-01  8:16 ` [PATCH RESEND v10 2/8] LoongArch: " Chengwen Feng
2026-04-01  8:16 ` [PATCH RESEND v10 3/8] RISC-V: ACPI: " Chengwen Feng
2026-04-01  8:16 ` [PATCH RESEND v10 4/8] x86/acpi: " Chengwen Feng
2026-04-01  8:16 ` [PATCH RESEND v10 5/8] ACPI: Centralize acpi_get_cpu_uid() declaration in include/linux/acpi.h Chengwen Feng
2026-08-13 23:26   ` sashiko-bot [this message]
2026-04-01  8:16 ` [PATCH RESEND v10 6/8] perf: arm_cspmu: Switch to acpi_get_cpu_uid() from get_acpi_id_for_cpu() Chengwen Feng
2026-04-01  8:16 ` [PATCH RESEND v10 7/8] ACPI: PPTT: Use acpi_get_cpu_uid() and remove get_acpi_id_for_cpu() Chengwen Feng
2026-04-01  8:16 ` [PATCH RESEND v10 8/8] PCI/TPH: Pass ACPI Processor UID to Cache Locality _DSM Chengwen Feng
2026-04-06 14:58 ` [PATCH RESEND v10 0/8] ACPI: Unify CPU UID interface and fix ARM64 TPH steer-tag issue Rafael J. Wysocki
2026-04-30  3:25 ` patchwork-bot+linux-riscv

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=20260813232631.89F001F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=fengchengwen@huawei.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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