From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752588AbbJMKMp (ORCPT ); Tue, 13 Oct 2015 06:12:45 -0400 Received: from eu-smtp-delivery-143.mimecast.com ([207.82.80.143]:50373 "EHLO eu-smtp-delivery-143.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751839AbbJMKMo convert rfc822-to-8bit (ORCPT ); Tue, 13 Oct 2015 06:12:44 -0400 Subject: Re: [PATCH v2 12/22] arm64: Delay cpu feature checks To: Catalin Marinas References: <1444064531-25607-1-git-send-email-suzuki.poulose@arm.com> <1444064531-25607-13-git-send-email-suzuki.poulose@arm.com> <20151008110840.GF17192@e104818-lin.cambridge.arm.com> Cc: linux-arm-kernel@lists.infradead.org, mark.rutland@arm.com, Vladimir.Murzin@arm.com, steve.capper@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 From: "Suzuki K. Poulose" Message-ID: <561CD918.7000107@arm.com> Date: Tue, 13 Oct 2015 11:12:40 +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: <20151008110840.GF17192@e104818-lin.cambridge.arm.com> X-OriginalArrivalTime: 13 Oct 2015 10:12:40.0906 (UTC) FILETIME=[B1A95AA0:01D1059F] X-MC-Unique: FgO4G91pQRG_TsWrj4jDnQ-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 08/10/15 12:08, Catalin Marinas wrote: > On Mon, Oct 05, 2015 at 06:02:01PM +0100, Suzuki K. Poulose wrote: >> + /* >> + * second pass allows enable() invoked on active each CPU >> + * to consider interacting capabilities. >> + */ > > This comment doesn't read properly. > Fixed locally >> + /*XXX: Are we really safe to call printk here ? */ >> + pr_crit("FATAL: CPU%d is missing %s : %s \n", >> + smp_processor_id(), cap_type, cap->desc); > > I'm not sure it's safe either, basically we haven't fully brought the > CPU into the system. Btw, we already print "Booted secondary cpu" from secondary_start_kernel() before we trigger the notifiers. So I think it should be safe to call it at the moment. > >> + asm volatile( >> + " 1: wfe \n\t" >> + " b 1b\n" >> + ); >> +} > > We could add a wfi as well in the mix. > > However, if we have PSCI, we should use it to park the CPUs back into > firmware (via cpu_operations.cpu_die), and only use the above loop if > that fails. Added cpu_die() and falls back to the trap as above. > >> +/* >> + * Run through the enabled system capabilities and enable() it on this CPU. > > s/it/them/ > Fixed. Thanks Suzuki