Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp499794rdb; Tue, 19 Sep 2023 01:35:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IERREP3YzoLJ1Y/AGnnY4Ejh42+3K/Kh6RTcEQkYg3ly0D3eBnUPVK8DpWJcoXFeNzFrbUl X-Received: by 2002:a05:6870:e305:b0:1b0:2f63:4ff6 with SMTP id z5-20020a056870e30500b001b02f634ff6mr13621726oad.1.1695112544762; Tue, 19 Sep 2023 01:35:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695112544; cv=none; d=google.com; s=arc-20160816; b=GHHTp6EUvOnA5rpvva4bnMaQFhLEkKLXJUf8HuogK9jBTRpkx9PUg3smRGrfSnAh+G ugYlisVesC3B50VH2tE3TL2shLVoMgGrL5JczEjkTazoWIJ6kE4kvO0xn/+l+wp8M1wk XsD3ac6IlQGcsXrpI4/8/FKHlsZ7KACC7YtJQZJJS/7WXE7Po7wGIgMAYxo0w/H5E/54 xcr2lfuh0siQBroAOYsLC33P+OjFJDHp03U8dOTBp5/s3Ka5MVc2TgdntlDk3lxzNk0T ZK0qDGlHpjyiGSWcuCMHC6T96R2b7TcrgL5SwKLQyHuHd/xJbFXjBL7uf901JWmkjUA6 J+mA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=bIURaVhU/G5DJJinyquD0ptYbPAZ38yx5KNcjiMal4E=; fh=PXJ1nrAkwnzNPHtj0xILXFW28d5sEdNuBWEBRL0T4wA=; b=WUuqxg1l3hkX4XaWSsMxqbdifkFZPHc3OE8VSB0WHvg788LYQ6dtd+VjfwjyGBkEIQ jav3Pief1eSWdwWWxgKU582mTMblAPvoc+gdw0deF6KMUUoQAkHRJ+2eTfeKmSFY/+Tw OtUyaBmRONLx2r1HPnVMWH7Ekc0Ct3VZ8nqxG1GPqx5Uva3cXt7r2/0tQ3/rchDpE3oA oIJuNwBYmRoQHnjPJc+xvgLOSHxX2tQlfRE5R0QZZpxPtZYI43ut0rThBDeY3sRrVQhT ER9eWUvA/LF56qJe1LqH/tz8ryjuUGG5nZS4T0tQ+4fAhkvIqmYRvceerXatH+c8iVIz m68w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Olsi4HMi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id s1-20020a63dc01000000b005775a4a2960si8780511pgg.261.2023.09.19.01.35.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 01:35:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Olsi4HMi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 930958122296; Mon, 18 Sep 2023 17:50:55 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229508AbjISAug (ORCPT + 99 others); Mon, 18 Sep 2023 20:50:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230224AbjISAuf (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.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC0298E for ; Mon, 18 Sep 2023 17:49:43 -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-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-83-r0EGRmLnNYG1Kj0SWZbEKQ-1; Mon, 18 Sep 2023 20:49:41 -0400 X-MC-Unique: r0EGRmLnNYG1Kj0SWZbEKQ-1 Received: by mail-pf1-f200.google.com with SMTP id d2e1a72fcca58-690c2fec489so207929b3a.2 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=sbu817N76kd3BIUIEjBrdvxv+C5vUF6B1Mr7vbRzB6HtMy1yG4d1jm42MrtqdjC3oq HiJynwlHLz6iEY8Kzjj7CG3QOcwWUxq8K0OEibyKJ3+3N/o+AsKe9zNgLwHyV7XEcEyZ jAtPkLijuMnU+wzrHdwoFX4FV9KWZqht8/OK1tlufiVsi5zVHIii0Vmyeo8n367V4v2o nrqYpNO2nC9MwCJ8tVWOkftAP1d6ACZC75ubbcyq/rW/ExPELb0S34LYmokHY5SocOni HD/7Na7SPpnpIT8lbgdi1Vh4hWZTy2AQ2Eh5vhs9Mh2xwPSpG8V+ErklR70thDFmYl/k GKzw== X-Gm-Message-State: AOJu0Yw6KUAxeIxzyD+4EBSdBp64nhpH4sjgcpEOQZqtYuqHVs5r13uA ootzeM7uPTy5paGlnLEgRo7r6JV2mG5Zkg5SQnjqv+aQ1Vzdk2035DUNVZsI7JCDH871SDMmBWj 2l0oFC9cPxtgcYx1dzSupDbsz X-Received: by 2002:a05:6a00:13a9:b0:68a:6173:295b with SMTP id t41-20020a056a0013a900b0068a6173295bmr11687177pfg.2.1695084580789; Mon, 18 Sep 2023 17:49:40 -0700 (PDT) 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 X-Spam-Status: No, score=-2.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 18 Sep 2023 17:50:55 -0700 (PDT) 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