From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8153156770 for ; Wed, 1 May 2024 11:15:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714562104; cv=none; b=MLC8IqrETbQ2VhjNGZJIKzGzlcsczL1FoGAukfi0lhNGWhlqQrS29ybbo/paXGlRUHYsr9SuGETfukMCUD0oWVd/EbRB01NGCa63an8Jb/jVgHJKFBNzWwn1hvgwJCqj7M1CpRytl57huT3a+JUkzKZyY84ResEQVjtPzIiRkpw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714562104; c=relaxed/simple; bh=FQodAUfD1JkLmt1uTy5qfN1UspuJsm4imcTHYIOZ1zM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=nxnwI9g6k1cfIiwCQmKJKSk7SKP3oLw0A1rPtUOHp8+WrCokgBTruJ14latkaClStlf1pRYWpz2cCFL9vCdEaPyNmQm0dez+qsdo+/3iVGUvqlZG7X03JjPeUE26MYNJFBn+erBRvD2Bx2rIfoXjtf6rSSpxf60RVmPNZ8Pytc0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=QGRzVFwM; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="QGRzVFwM" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1714562102; 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=m4zwGvBc/1zudle3Fu3mxvomgwnAp7EzJRWK4hmMCrY=; b=QGRzVFwM4PeI30rFlRkRFuZq6UB3Z4zYRNIcS2thKyTFmGdbjiEqDPFrroi6KN2bo7V+3D N4xNmBi8cBFgecv6LEnhRhKyLupXOaArDxIuQMREqwsMCtXhZMOdDhMxh/6t8YxRDesXQc RZlEsMJbCgdu8r7mfF+LQWsW8vv9uFw= Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-393--rW9U7f1MCGNchFieXD_sA-1; Wed, 01 May 2024 07:15:01 -0400 X-MC-Unique: -rW9U7f1MCGNchFieXD_sA-1 Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-2acf6bce4cfso656905a91.0 for ; Wed, 01 May 2024 04:15:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714562100; x=1715166900; 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=m4zwGvBc/1zudle3Fu3mxvomgwnAp7EzJRWK4hmMCrY=; b=Z58GqZrGXk/XxlHfHx59oFeNQpRaA1Vu7OGUhyZK1ykL4b6ohAcEjqOzMvwqehKudB a6sSpW1XhLZdgTHe91jrIocJUYlNzKyH5uuhv1Y7zrFi18p2E10yW+ri5NkxbzAGPkdm 3h9xavnHx2Zrm671bZlW3aca54TxliFzZhZ9B/M/G7pOXKDYQXMBIV+yBqH8Ovki/hOF YN6rsTCnLMIWzlPhb++dX65mZfnRwF9mcSGxfoJUQpe+cGa/ljAofnOHnx51Ok+sf0ty Mu78Q+Mug+jwa+UcI6CwwOj30QIt9y54eCk69rMcp/MsCYtvCsGr6j+MP9flolt+dGdB TkHQ== X-Forwarded-Encrypted: i=1; AJvYcCWcm2/ymIQPSwHe7qnmoJ+nHfBB57ZvMoftbbgAdeKp/1Eq+484OyaGR9SrbW6xrAg9ayUfwDgIz6oPOT83JkL9ys6giqhO X-Gm-Message-State: AOJu0YxEQnL6cEFyojpmSKIW+fWyjsQuTkfGxP/IXpIgAP09Dhsux8jI 7UiKXnd/yfPTnx5qHzAlKyEJYtRcHMurt2KfPmr5OyBQUQQ/vSQJVXb+KzLaCzgKTldIQB2wgI5 dpdBjUROtHQGkVPLq89LwDnFWXKgXLOoPcn8VEoIEYegiSQZJ+JQdqw== X-Received: by 2002:a17:90b:3749:b0:2b3:6898:d025 with SMTP id ne9-20020a17090b374900b002b36898d025mr189467pjb.9.1714562100020; Wed, 01 May 2024 04:15:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEgkwe4UKKc3WldVwMV2boi6I+r208XEIsyNzplTWK4MFoORCuavWHQA0/i+SiniS3enNZ28Q== X-Received: by 2002:a17:90b:3749:b0:2b3:6898:d025 with SMTP id ne9-20020a17090b374900b002b36898d025mr189419pjb.9.1714562099556; Wed, 01 May 2024 04:14:59 -0700 (PDT) Received: from [192.168.68.50] ([43.252.112.88]) by smtp.gmail.com with ESMTPSA id h9-20020a17090a050900b002a55198259fsm3245338pjh.0.2024.05.01.04.14.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 May 2024 04:14:59 -0700 (PDT) Message-ID: <27e48da5-e1d0-4e4b-978e-954f1766c350@redhat.com> Date: Wed, 1 May 2024 21:14:50 +1000 Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v9 19/19] cpumask: Add enabled cpumask for present CPUs that can be brought online To: Jonathan Cameron , Thomas Gleixner , Peter Zijlstra , 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, kvmarm@lists.linux.dev, x86@kernel.org, Russell King , "Rafael J . Wysocki" , Miguel Luis , James Morse , Salil Mehta , Jean-Philippe Brucker , Catalin Marinas , Will Deacon , Marc Zyngier , Hanjun Guo Cc: Ingo Molnar , Borislav Petkov , Dave Hansen , linuxarm@huawei.com, justin.he@arm.com, jianyong.wu@arm.com References: <20240430142434.10471-1-Jonathan.Cameron@huawei.com> <20240430142434.10471-20-Jonathan.Cameron@huawei.com> From: Gavin Shan In-Reply-To: <20240430142434.10471-20-Jonathan.Cameron@huawei.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 5/1/24 00:24, Jonathan Cameron wrote: > From: James Morse > > The 'offline' file in sysfs shows all offline CPUs, including those > that aren't present. User-space is expected to remove not-present CPUs > from this list to learn which CPUs could be brought online. > > CPUs can be present but not-enabled. These CPUs can't be brought online > until the firmware policy changes, which comes with an ACPI notification > that will register the CPUs. > > With only the offline and present files, user-space is unable to > determine which CPUs it can try to bring online. Add a new CPU mask > that shows this based on all the registered CPUs. > > Signed-off-by: James Morse > Tested-by: Miguel Luis > Tested-by: Vishnu Pajjuri > Tested-by: Jianyong Wu > Acked-by: Thomas Gleixner > Signed-off-by: Russell King (Oracle) > Signed-off-by: Jonathan Cameron > > --- > v9: No change > --- > .../ABI/testing/sysfs-devices-system-cpu | 6 +++++ > drivers/base/cpu.c | 10 ++++++++ > include/linux/cpumask.h | 25 +++++++++++++++++++ > kernel/cpu.c | 3 +++ > 4 files changed, 44 insertions(+) > Reviewed-by: Gavin Shan