linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: WANG Xuerui <kernel@xen0n.name>
To: "Rafael J. Wysocki" <rafael@kernel.org>,
	Huacai Chen <chenhuacai@kernel.org>
Cc: Liupu Wang <wangliupu@loongson.cn>, Len Brown <lenb@kernel.org>,
	Jianmin Lv <lvjianmin@loongson.cn>, Marc Zyngier <maz@kernel.org>,
	Tiezhu Yang <yangtiezhu@loongson.cn>,
	Binbin Zhou <zhoubinbin@loongson.cn>,
	Bibo Mao <maobibo@loongson.cn>,
	Josh Poimboeuf <jpoimboe@kernel.org>,
	loongarch@lists.linux.dev, linux-acpi@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Huacai Chen <chenhuacai@loongson.cn>
Subject: Re: [PATCH] LoongArch: Add SMT (Simultaneous Multi-Threading) support
Date: Sat, 24 Jun 2023 01:34:11 +0800	[thread overview]
Message-ID: <ec964673-4dcd-df8d-9a90-15c84215080f@xen0n.name> (raw)
In-Reply-To: <CAJZ5v0jQD2ABKy3h9FXaKpvW9gcyTXngDAcVikZKQ5PxbyEH=g@mail.gmail.com>

Hi,

On 6/24/23 01:20, Rafael J. Wysocki wrote:
> On Thu, Jun 15, 2023 at 4:31 AM Huacai Chen <chenhuacai@kernel.org> wrote:
>> Hi, Rafael,
>>
>> On Thu, Jun 15, 2023 at 2:24 AM Rafael J. Wysocki <rafael@kernel.org> wrote:
>>> On Wed, Jun 14, 2023 at 11:38 AM Liupu Wang <wangliupu@loongson.cn> wrote:
>>>> [snip]
>>>> diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
>>>> index ccbeab9500ec..00dd309b6682 100644
>>>> --- a/drivers/acpi/Kconfig
>>>> +++ b/drivers/acpi/Kconfig
>>>> @@ -542,10 +542,10 @@ config ACPI_PFRUT
>>>>
>>>>   if ARM64
>>>>   source "drivers/acpi/arm64/Kconfig"
>>>> +endif
>>>>
>>>>   config ACPI_PPTT
>>>>          bool
>>>> -endif
>>> x86 doesn't use PPTT as of today.  Why do you enable it for them?
>> ACPI_PPTT is an invisible symbol, it cannot be enabled by explicitly
>> selecting and its default value is n, so I think it isn't enabled for
>> x86. On the other hand, moving it out of ARM64 can make other archs
>> don't need to modify this file any more if they need PPTT.
> AFAICS, setting ACPI_PPTT causes pptt.c to be compiled and if it is
> never going to be used by the given arch, it will just be dead code.
>
> Can't this be avoided?

FYI I've just tried a x86_64 defconfig build and ACPI_PPTT isn't being 
enabled, nor is there a pptt.o signifying the same thing.

 > drivers/acpi/Makefile
 > 109:obj-$(CONFIG_ACPI_PPTT)     += pptt.o

This should mean that, if nothing is selecting ACPI_PPTT then the file 
isn't going to be compiled? Right now it seems only arch/arm64 and 
arch/loongarch are doing so based on my cursory grep. Or do you mean we 
should be extra careful and keep the guard around the symbol to ensure 
it's nonexistent on other irrelevant arches?

-- 
WANG "xen0n" Xuerui

Linux/LoongArch mailing list: https://lore.kernel.org/loongarch/


      reply	other threads:[~2023-06-23 17:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-14  9:37 [PATCH] LoongArch: Add SMT (Simultaneous Multi-Threading) support Liupu Wang
2023-06-14 18:23 ` Rafael J. Wysocki
2023-06-15  2:31   ` Huacai Chen
2023-06-23 17:20     ` Rafael J. Wysocki
2023-06-23 17:34       ` WANG Xuerui [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=ec964673-4dcd-df8d-9a90-15c84215080f@xen0n.name \
    --to=kernel@xen0n.name \
    --cc=chenhuacai@kernel.org \
    --cc=chenhuacai@loongson.cn \
    --cc=jpoimboe@kernel.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loongarch@lists.linux.dev \
    --cc=lvjianmin@loongson.cn \
    --cc=maobibo@loongson.cn \
    --cc=maz@kernel.org \
    --cc=rafael@kernel.org \
    --cc=wangliupu@loongson.cn \
    --cc=yangtiezhu@loongson.cn \
    --cc=zhoubinbin@loongson.cn \
    /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;
as well as URLs for NNTP newsgroup(s).