From mboxrd@z Thu Jan 1 00:00:00 1970 From: mark.rutland@arm.com (Mark Rutland) Date: Wed, 16 Dec 2015 11:36:17 +0000 Subject: [RFC PATCH v3 4/8] arm64: Handle early CPU boot failures In-Reply-To: <20151216112914.GF4308@arm.com> References: <1449655039-22022-1-git-send-email-suzuki.poulose@arm.com> <1449655039-22022-5-git-send-email-suzuki.poulose@arm.com> <20151215115518.GE9452@arm.com> <56713F76.8080907@arm.com> <20151216112914.GF4308@arm.com> Message-ID: <20151216113617.GC6412@leverpostej> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Wed, Dec 16, 2015 at 11:29:15AM +0000, Will Deacon wrote: > On Wed, Dec 16, 2015 at 10:39:50AM +0000, Suzuki K. Poulose wrote: > > On 15/12/15 11:55, Will Deacon wrote: > > >On Wed, Dec 09, 2015 at 09:57:15AM +0000, Suzuki K. Poulose wrote: > > > > >> /* > > >> * Initial data for bringing up a secondary CPU. > > >>+ * @stack - sp for the secondary CPU > > >>+ * @status - Result passed back from the secondary CPU to > > >>+ * indicate failure. > > >> */ > > >> struct secondary_data { > > >> void *stack; > > >>-}; > > >>+ unsigned long status; > > >>+} ____cacheline_aligned; > > > > > >Why is this necessary? > > > > That was based on a suggestion from Mark Rutland here: > > > > https://lkml.org/lkml/2015/12/1/580 > > That thread is talking about the CWG, which is not the same thing as > ____cacheline_aligned. Given that the architectural maximum for the CWG > is 2K, we can probably get away with allocating the status field amongst > the head.S text instead (which we know will be clean). > > Since SMP boot is serialised, that should be sufficient, right? Assuming you mean in .head.text (rather than .text), that should work given that we don't currently free .head.text. Mark. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752989AbbLPLgd (ORCPT ); Wed, 16 Dec 2015 06:36:33 -0500 Received: from foss.arm.com ([217.140.101.70]:54889 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752036AbbLPLgc (ORCPT ); Wed, 16 Dec 2015 06:36:32 -0500 Date: Wed, 16 Dec 2015 11:36:17 +0000 From: Mark Rutland To: Will Deacon Cc: "Suzuki K. Poulose" , catalin.marinas@arm.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, marc.zyngier@arm.com Subject: Re: [RFC PATCH v3 4/8] arm64: Handle early CPU boot failures Message-ID: <20151216113617.GC6412@leverpostej> References: <1449655039-22022-1-git-send-email-suzuki.poulose@arm.com> <1449655039-22022-5-git-send-email-suzuki.poulose@arm.com> <20151215115518.GE9452@arm.com> <56713F76.8080907@arm.com> <20151216112914.GF4308@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151216112914.GF4308@arm.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 16, 2015 at 11:29:15AM +0000, Will Deacon wrote: > On Wed, Dec 16, 2015 at 10:39:50AM +0000, Suzuki K. Poulose wrote: > > On 15/12/15 11:55, Will Deacon wrote: > > >On Wed, Dec 09, 2015 at 09:57:15AM +0000, Suzuki K. Poulose wrote: > > > > >> /* > > >> * Initial data for bringing up a secondary CPU. > > >>+ * @stack - sp for the secondary CPU > > >>+ * @status - Result passed back from the secondary CPU to > > >>+ * indicate failure. > > >> */ > > >> struct secondary_data { > > >> void *stack; > > >>-}; > > >>+ unsigned long status; > > >>+} ____cacheline_aligned; > > > > > >Why is this necessary? > > > > That was based on a suggestion from Mark Rutland here: > > > > https://lkml.org/lkml/2015/12/1/580 > > That thread is talking about the CWG, which is not the same thing as > ____cacheline_aligned. Given that the architectural maximum for the CWG > is 2K, we can probably get away with allocating the status field amongst > the head.S text instead (which we know will be clean). > > Since SMP boot is serialised, that should be sufficient, right? Assuming you mean in .head.text (rather than .text), that should work given that we don't currently free .head.text. Mark.