From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752978AbbJONXz (ORCPT ); Thu, 15 Oct 2015 09:23:55 -0400 Received: from eu-smtp-delivery-143.mimecast.com ([146.101.78.143]:46701 "EHLO eu-smtp-delivery-143.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751771AbbJONXy convert rfc822-to-8bit (ORCPT ); Thu, 15 Oct 2015 09:23:54 -0400 Subject: Re: [PATCH v3 13/24] arm64: Populate cpuinfo after notify_cpu_starting To: Catalin Marinas References: <1444756952-31145-1-git-send-email-suzuki.poulose@arm.com> <1444756952-31145-14-git-send-email-suzuki.poulose@arm.com> <20151015105438.GL4239@e104818-lin.cambridge.arm.com> Cc: linux-arm-kernel@lists.infradead.org, mark.rutland@arm.com, Vladimir.Murzin@arm.com, steve.capper@linaro.org, ryan.arnold@linaro.org, ard.biesheuvel@linaro.org, marc.zyngier@arm.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, edward.nevill@linaro.org, aph@redhat.com, james.morse@arm.com, andre.przywara@arm.com, dave.martin@arm.com, christoffer.dall@linaro.org From: "Suzuki K. Poulose" Message-ID: <561FA8E7.5020504@arm.com> Date: Thu, 15 Oct 2015 14:23:51 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20151015105438.GL4239@e104818-lin.cambridge.arm.com> X-OriginalArrivalTime: 15 Oct 2015 13:23:51.0475 (UTC) FILETIME=[BB7AC830:01D1074C] X-MC-Unique: k_h2KWy-RkOiIFXzn95PJw-1 Content-Type: text/plain; charset=WINDOWS-1252; format=flowed Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15/10/15 11:54, Catalin Marinas wrote: > On Tue, Oct 13, 2015 at 06:22:21PM +0100, Suzuki K. Poulose wrote: >> This patch delays populating the cpuinfo for a new (hotplugged) >> CPU until the notifiers have executed. This will enable us to verify >> if the new (hotplugged) CPU has all the capabilities which the system >> already has. If it doesn't, we could prevent it from turning online and >> also modifying the system wide feature register status. > > Just a question here: do we expect the notifiers to enable certain > features that we check later? AFAICT, the checking is done on the > feature registers which don't change after notifiers, No. The notifiers are registered only after we compute the cpu capabilities (at which point all the boot time activated CPUs are turned on and has updated their cpuinfo). The features won't change after this point throughout the lifetime of the system. So we don't want to run the capability check for the 'CPUs' during the normal boot up. It is only for the hotplug case. We compute the capability based on the booted CPUs from smp_cpus_done() and then apply the alternatives based on what we have in common. So the system can function properly with mismatched features from the CPUs. But if a new CPU is brought online with at least one missing established capability, we should fail the bring up. so we could as > well block the booting before any notifier is run. > Thanks Suzuki