From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 08672CD342F for ; Tue, 19 Sep 2023 00:50:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230246AbjISAug (ORCPT ); Mon, 18 Sep 2023 20:50:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229508AbjISAuf (ORCPT ); Mon, 18 Sep 2023 20:50:35 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 742F310E for ; Mon, 18 Sep 2023 17:49:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695084583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bIURaVhU/G5DJJinyquD0ptYbPAZ38yx5KNcjiMal4E=; b=Olsi4HMiDMbMZfRtpexuh2tpD6p6DeT5sTnqJ3NbrMZlwR4kHEFHuF0kEbDXe6K7VRTgBv MQqaa+rJf1P8OCViioKRyYB7Iw2p/yXj+Ttv6Tv25eMLyQOIPqlAwATEPYSz5c6np/yxE1 Adb15i3H7Aj+tmQD9fyltt1plE7MoJg= Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-342-2mzA6fH-MI2IX8qKVF9VMQ-1; Mon, 18 Sep 2023 20:49:41 -0400 X-MC-Unique: 2mzA6fH-MI2IX8qKVF9VMQ-1 Received: by mail-pf1-f199.google.com with SMTP id d2e1a72fcca58-690a0eedb24so868864b3a.1 for ; Mon, 18 Sep 2023 17:49:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695084581; x=1695689381; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=bIURaVhU/G5DJJinyquD0ptYbPAZ38yx5KNcjiMal4E=; b=vyH3OB9gXAIMlMxwe3bWCDlXAk4ZoPU1GYv8TpyltQeOyi6ZjNnSPAowDFwXt9w99/ L0kxMg+b4QUJTqLSgr6X+N9mAVuXE6TsatBkERmsbfnkZiCgx2w8kBFFbjQpmKUbtVEN rpClWaLdZK9W1UQqtWAATmnTrhqH+7iDaKdrVEpKps6Y48eoLiVXhm8a/rDLmzRWJn0U h9A98IIbtyoYc7PfHKpHlFVMyaP7USUhJY6H4B1RtI7rhwZCqzs6lx1y2Nz5idwOLa8F AOapuN08SQpd5duFtPCNsZ+054RMvxYET3Q4epsZCQendGpQissUoY8D3soNipoM3Siy 2a6A== X-Gm-Message-State: AOJu0Yyc8Ocb1G2CFIUJF80YHqnAnXthjzK/Eypv8hu58SLJObWdmhrL Gd6c2lS4VuujSKlxZl+ZtnHEPdZ1irpymcIYgIHC9qGWUghw7rj85UYUHpb8iWSZaF6IvX1sFdp yeD1iu4VvqrPjzrAgJnUhHw== X-Received: by 2002:a05:6a00:13a9:b0:68a:6173:295b with SMTP id t41-20020a056a0013a900b0068a6173295bmr11687175pfg.2.1695084580789; Mon, 18 Sep 2023 17:49:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF3oVg5VMiqyNQpSBftI/mkgS1m694rJEONxMKwBMkdMp9Ry/rErZrzBJO2CPP2aN+mnlKKqg== X-Received: by 2002:a05:6a00:13a9:b0:68a:6173:295b with SMTP id t41-20020a056a0013a900b0068a6173295bmr11687156pfg.2.1695084580437; Mon, 18 Sep 2023 17:49:40 -0700 (PDT) Received: from ?IPV6:2001:8003:e5b0:9f00:dbbc:1945:6e65:ec5? ([2001:8003:e5b0:9f00:dbbc:1945:6e65:ec5]) by smtp.gmail.com with ESMTPSA id i13-20020aa787cd000000b0068fe76cdc62sm70310pfo.93.2023.09.18.17.49.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 Sep 2023 17:49:39 -0700 (PDT) Message-ID: <54c91de8-f0d2-787f-5710-2da1dfc80937@redhat.com> Date: Tue, 19 Sep 2023 10:49:32 +1000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [RFC PATCH v2 23/35] ACPI: Warn when the present bit changes but the feature is not enabled Content-Language: en-US To: James Morse , linux-pm@vger.kernel.org, loongarch@lists.linux.dev, linux-acpi@vger.kernel.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, kvmarm@lists.linux.dev Cc: x86@kernel.org, Salil Mehta , Russell King , Jean-Philippe Brucker , jianyong.wu@arm.com, justin.he@arm.com References: <20230913163823.7880-1-james.morse@arm.com> <20230913163823.7880-24-james.morse@arm.com> From: Gavin Shan In-Reply-To: <20230913163823.7880-24-james.morse@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org On 9/14/23 02:38, James Morse wrote: > ACPI firmware can trigger the events to add and remove CPUs, but the > OS may not support this. > > Print a warning when this happens. ^^^^^^^ error message > > This gives early warning on arm64 systems that don't support > CONFIG_ACPI_HOTPLUG_PRESENT_CPU, as making CPUs not present has > side effects for other parts of the system. > > Signed-off-by: James Morse > --- > drivers/acpi/acpi_processor.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > Maybe a warning message is enough, but a error message is also fine, I think. Reviewed-by: Gavin Shan > diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi/acpi_processor.c > index 2cafea1edc24..b67616079751 100644 > --- a/drivers/acpi/acpi_processor.c > +++ b/drivers/acpi/acpi_processor.c > @@ -188,8 +188,10 @@ static int acpi_processor_make_present(struct acpi_processor *pr) > acpi_status status; > int ret; > > - if (!IS_ENABLED(CONFIG_ACPI_HOTPLUG_PRESENT_CPU)) > + if (!IS_ENABLED(CONFIG_ACPI_HOTPLUG_PRESENT_CPU)) { > + pr_err_once("Changing CPU present bit is not supported\n"); > return -ENODEV; > + } > > if (invalid_phys_cpuid(pr->phys_id)) > return -ENODEV; > @@ -462,8 +464,10 @@ static void acpi_processor_make_not_present(struct acpi_device *device) > { > struct acpi_processor *pr; > > - if (!IS_ENABLED(CONFIG_ACPI_HOTPLUG_PRESENT_CPU)) > + if (!IS_ENABLED(CONFIG_ACPI_HOTPLUG_PRESENT_CPU)) { > + pr_err_once("Changing CPU present bit is not supported"); > return; > + } > > pr = acpi_driver_data(device); > if (pr->id >= nr_cpu_ids) Thanks, Gavin