Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5229819ybl; Sun, 22 Dec 2019 01:40:37 -0800 (PST) X-Google-Smtp-Source: APXvYqwwIKU5kfpz4OcCOPasWrFM/qYMhSb7hADSD4NyUjqF/Ci1lnjz1YmUqLYF3A2K0G2SrR1L X-Received: by 2002:a05:6830:2057:: with SMTP id f23mr22281479otp.110.1577007637096; Sun, 22 Dec 2019 01:40:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577007637; cv=none; d=google.com; s=arc-20160816; b=ncJt1K3GWCiSEbXWgdq0O66lq4mDU7G/0B029ErkPaj00F8cfeA4tOHhu+7ui4/Mbw q3ERmL3URtMB9GMxfn9Z0moKey3Oi64O6aRjsDMhEPW+weNwmGwk7Gp3tLE/mljQsQro ugTVK+5EgZ4x7ZJSknJ/xONe2VddGRQOGzGWmh7WtUdI1fI+JaSAgM9DLpDZCLPseJsy 52dk+A/Dip/nVh/qzmLXY2ERVzPi45LFUmfFivxNbyhbtS/wkfchX48NjNKyuI/X36N7 i605DeGWj3bocnRI+pVqXfKOLm62NR4M7NJBx0EG3dfPBvNNs7gJWTEbCKRn6t6Z7kkg NMXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=JzFkvRltTulbv0PRX0nZG3Ud2t2Uo7U7YeOMvAUCUKQ=; b=BImAEm3PwHvzEsrvsv8QfOqenSMFSO4FeI2AJNSbTA6c5GohISh7yMNoJrVYx18O2f 4b6+FRPXF9O3dDL2+Cua2JeT/74FZZ5Wp/6JmFRfvR/frCRjaVdEOG/nO0WCelJWrCIf eMFQJOlM6zZp6zanhYXgCneTy5i5xm+wnO8JsFh86XJDbjvupdj4IBx05WCSAS7QOyP/ AdOUNZFhwJUlxw/G+9usoxrNVDPQjjMe+hrc7PddLJieK482NelozG7vp/4JWYC0ZdEK UXtAPHe2RHKLRTOwmfE17RLHDnjM7cNSkLB/WeISnkQJXGoquPvZGJ+NfMyYAwQrVXPU Txag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=n85fiOsG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e3si8702505otp.286.2019.12.22.01.40.24; Sun, 22 Dec 2019 01:40:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=n85fiOsG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726162AbfLVJi6 (ORCPT + 99 others); Sun, 22 Dec 2019 04:38:58 -0500 Received: from bilbo.ozlabs.org ([203.11.71.1]:55611 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725899AbfLVJi6 (ORCPT ); Sun, 22 Dec 2019 04:38:58 -0500 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 47gcqy2GwPz9sP3; Sun, 22 Dec 2019 20:38:54 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1577007536; bh=RBJy1kWVsZo+T0mOhiHBES+O0CcNsNgVcU5WlbLQWmM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=n85fiOsGjyE40GQx5qgQMAjJ72/x75ab6jJ4DhMaAzrWUnyr+knviOsVQYWWvUeMl bHn/UM5iga7H2xrW3isgGyzFJ2kDrWl4hl9PpK6hAi1i30QEclv9W/83h+/ikyYGcN /LZipv2d1vGWY1pd5WAPdJPrTpO5SDp0C/RgEs7x2GBRQQ+IJLrg42vyvIT9Gp5QC/ 4Ev2BmWmHQDvhkJJUmOssgg/0djtJzZ8lZz7+JHSXf1miWf2ktntHvctMvDWmNPai8 MVZmetUU6J3dVXmvG6yAudqAtEpnYzIX+oC1oWl7dSLpfSS24vFo10AZzhJzyWksXU n8W/qByHIWFkQ== From: Michael Ellerman To: yingjie_bai@126.com, Scott Wood , Kumar Gala Cc: Benjamin Herrenschmidt , Paul Mackerras , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Bai Yingjie Subject: Re: [PATCH] powerpc/mpc85xx: also write addr_h to spin table for 64bit boot entry In-Reply-To: <1574694943-7883-1-git-send-email-yingjie_bai@126.com> References: <1574694943-7883-1-git-send-email-yingjie_bai@126.com> Date: Sun, 22 Dec 2019 20:38:51 +1100 Message-ID: <87pngglmxg.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org yingjie_bai@126.com writes: > From: Bai Yingjie > > CPU like P4080 has 36bit physical address, its DDR physical > start address can be configured above 4G by LAW registers. > > For such systems in which their physical memory start address was > configured higher than 4G, we need also to write addr_h into the spin > table of the target secondary CPU, so that addr_h and addr_l together > represent a 64bit physical address. > Otherwise the secondary core can not get correct entry to start from. > > This should do no harm for normal case where addr_h is all 0. > > Signed-off-by: Bai Yingjie > --- > arch/powerpc/platforms/85xx/smp.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/arch/powerpc/platforms/85xx/smp.c b/arch/powerpc/platforms/85xx/smp.c > index 8c7ea2486bc0..f12cdd1e80ff 100644 > --- a/arch/powerpc/platforms/85xx/smp.c > +++ b/arch/powerpc/platforms/85xx/smp.c > @@ -252,6 +252,14 @@ static int smp_85xx_start_cpu(int cpu) > out_be64((u64 *)(&spin_table->addr_h), > __pa(ppc_function_entry(generic_secondary_smp_init))); > #else > + /* > + * We need also to write addr_h to spin table for systems > + * in which their physical memory start address was configured > + * to above 4G, otherwise the secondary core can not get > + * correct entry to start from. > + * This does no harm for normal case where addr_h is all 0. > + */ > + out_be32(&spin_table->addr_h, __pa(__early_start) >> 32); > out_be32(&spin_table->addr_l, __pa(__early_start)); This breaks the corenet32_smp_defconfig build: /linux/arch/powerpc/platforms/85xx/smp.c: In function 'smp_85xx_start_cpu': /linux/arch/powerpc/platforms/85xx/smp.c:262:52: error: right shift count >= width of type [-Werror=shift-count-overflow] 262 | out_be32(&spin_table->addr_h, __pa(__early_start) >> 32); | ^~ cc1: all warnings being treated as errors cheers