Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp7066708ybl; Mon, 23 Dec 2019 17:37:19 -0800 (PST) X-Google-Smtp-Source: APXvYqzZJPAwf0NmGE+yOwASTVEmQR/EIBkNGkHauibrH2kt8g9ZfjIv/kP+rHbM3yHEEtzNGAGV X-Received: by 2002:a9d:7dc9:: with SMTP id k9mr35718969otn.117.1577151439838; Mon, 23 Dec 2019 17:37:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577151439; cv=none; d=google.com; s=arc-20160816; b=YyqmCHp3UtJ3ExxjZeXqcHoKvyl2P8Z9ZbATaW+aqtWoAew80Z+O2EFv6q3Xgv5XXj 5Is83FFC8CxtZBbCbKobAzHlGfOnon0fXJZ97OSFA3z+nV+sm4xxck69Bl/eD+xNK+O9 bTChuzFR6RxqPUUGC6CW/AjsH+wzlmovHEqgMGYIbLvVzMiPmryASqZ9L60DfnpQCiHn DNNv1BTVSBqxcQ93H9VHsdPwSeGoaM5cFBmAzCooVn9WawFpDkf0CkXK5HcKh8jVoCuU MAT/DnwGsHdr+2zMbXss+AAy6gnyXURF9W8e+hzz9fGrdjTEIowo/96wOSXOiJ/mcOjz WSLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=9lmC0cEb7NijnFrwroELGHeSVAX59tyGYC7C4mWEi2k=; b=GdZkhfk1uld+21pjIgHOW6XL+o6cn1Qg71dseEKfJUjuF7J5adsGfnkPe5cpQG2BAa ozg+BnWcq/6DXSAWqKtBJuZEkcoM9qPi3/kC1SfdBC5ytUBMvzYQFu2X15PzFltj416U v12D2IEAeAMf8eeCPppp1YbHcCMyqs1slzab5io5rwMPFRSORIz59KAHvwydAtna5veU BlLSt9Z6C6Bbfgoqf7hD3r3LOxwiBysv2qkDIoJOFhQEHoXCw1mymfXlVvKPHqIwrd79 3hRcuHObOVt5zgOgGExWwF09T+OefztHh4ZjdYRTEr8Q0DIrHLzwFaysBr93KUbapeMn LA6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=B1UuMupM; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h138si10113176oib.6.2019.12.23.17.37.07; Mon, 23 Dec 2019 17:37:19 -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=@gmail.com header.s=20161025 header.b=B1UuMupM; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727071AbfLXBf2 (ORCPT + 99 others); Mon, 23 Dec 2019 20:35:28 -0500 Received: from mail-io1-f65.google.com ([209.85.166.65]:35156 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726995AbfLXBf2 (ORCPT ); Mon, 23 Dec 2019 20:35:28 -0500 Received: by mail-io1-f65.google.com with SMTP id v18so17870748iol.2 for ; Mon, 23 Dec 2019 17:35:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9lmC0cEb7NijnFrwroELGHeSVAX59tyGYC7C4mWEi2k=; b=B1UuMupMzU6CvsK1M8U19051nfyVhd1G/xTieA9RShOJcjMhmLMUZIfe6A42Cdauwe twErhsT6BCAnhKC5dqqhfxBw3UA+c0i9F7mMX9w2odxxx7vC/onGDursDbiXi23r+zgz hzTBTPHIZTvO1/7BR9JjbMLag7xt/kR4L3q4+Om+9WarzYjTejq8Z4YgrBjzd6KRxYst gFqaeZIaIEyY/gblrioTxzia0VRRLVg5PBX7pHVwiOgE3tj+Owk24iMDyj2hjHXoUueW h7ayQf3MSpnF5O8VTmXeypm/GGN68OwpnMic09yKrVzwGbCSGy3h4V6NZaviJbRsh9Zz gebw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9lmC0cEb7NijnFrwroELGHeSVAX59tyGYC7C4mWEi2k=; b=hz2/3I420F4lrByX4aGNzZY72lF3N8xuieddQ/FR8Zlt6bBFOWltY1URkUm1Uw0bYV hHBOk1g0OchC2/vOgM7mvO/OPPg0DcZ4EEElEqdegJ4b2ksgsRPTMIcIPfX+uyCdaAGQ fWOcIxgCxpZmUBCAxxrvEB9gZ8AXq91hm/3leUdMHU2J/dFCz+0meu7d2+bBO+Tswf8l wEgo0ZTWc/bl3m3Ed1UVnvysH5lhU+zyff9Dur6L5o817LqZwY8l68VPhzB0yBceN8Mk 7mCzpgk5TcNwC9nbwQN9DZ4JxBk7ztow/1gPPAtV+TlZBKF3qBmvlcBt5x1V2JDWGmOs Qk5g== X-Gm-Message-State: APjAAAXMRKYK6/w7xHE5x6zXRWoqpMs64t3VjFDVzaGCKHPwSHYuzC8q XvdslB7C9CSDVfynwop8zkXjUmgoRvthTL8CpqE= X-Received: by 2002:a5d:9f4f:: with SMTP id u15mr6520488iot.129.1577151327920; Mon, 23 Dec 2019 17:35:27 -0800 (PST) MIME-Version: 1.0 References: <1574694943-7883-1-git-send-email-yingjie_bai@126.com> <87pngglmxg.fsf@mpe.ellerman.id.au> In-Reply-To: <87pngglmxg.fsf@mpe.ellerman.id.au> From: Yingjie Bai Date: Tue, 24 Dec 2019 09:35:16 +0800 Message-ID: Subject: Re: [PATCH] powerpc/mpc85xx: also write addr_h to spin table for 64bit boot entry To: Michael Ellerman Cc: yingjie_bai@126.com, Scott Wood , Kumar Gala , Benjamin Herrenschmidt , Paul Mackerras , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Michael, Thanks for pointing out the issue. My mistake... This patch should indeed make sense only when CONFIG_PHYS_64BIT=y I could not find corenet32_smp_defconfig, but I guess in your config, CONFIG_PHYS_64BIT=n ? I will update the patch later today On Sun, Dec 22, 2019 at 5:38 PM Michael Ellerman wrote: > > 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