Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp440721ybl; Fri, 23 Aug 2019 03:14:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqweHvxDtvhE9agA7YoMRg97LMyWyzyN8upRt7l/xjKrne/hhbduhPPzGNoB3FPUFLhK+csL X-Received: by 2002:a62:ce0e:: with SMTP id y14mr4356882pfg.73.1566555299872; Fri, 23 Aug 2019 03:14:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566555299; cv=none; d=google.com; s=arc-20160816; b=dZ3HL0SvR/nMGJiJMVmH+8NjVTwnuBPxYhqqBJUs01Dwd0fgFgubfl0YzHAQ8AlxnU Q7ZjUVKYZYgiBOVcJi6f5fmhZ7rXVQ5tR2Qc3zMHv7OJBOw2nPMktcNOP1EEtS15fDJg VZpNR8v3SHrCrs53mHzw9CFVQLcE++6KcKaT3alUPWS162uR6+mH4xsadeeontzwWwbt gSm3BRrXRtnAk2dpdtUNI7ZwglXRbvV/h4IAKumNLFxqki4cHKkLY4ccdwsJQzTezVzO q8cD/w2vww+zVNbfOhKVLwN9BaK/PhAGuEofQp0RRKtvVPhnPFkwA2kCNJ3ti0v8poo+ kiFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=Z9Dx6Owt4ZtmplV/kxEHYa92+Shi9+S1zJG/IrA9YwI=; b=cCMi7y8H8U3khMZGlRhm2gypJAwytQzvUMBqzNR7xw95tBVmePK93el9Vj/4/FTOF2 IqAdRXbVjkUKIf7rrhgiaaQs0a5IR9q3YFAcQ468+GVDLb+L08lniNwuHAgdcw2x2TUT 9vGYiar1bbJZCgvu3+nIucae6Se4UVVZxHOmmSeDbwRNXnE3NiaALwkfLOA9PoZDpFBa PX6pWIP8QOmiy1xpJ1GUVa5kKHwkAxrZAqsqkBNDZkD0H08P7tu1MenkghI8oxTf6ZFO op/sHiQBOYf822DWKsllCDWDFR1FaxfHoYFIl/H48VepUyQ/wcC6RfFTvMhNTGQjOVNe m8LA== ARC-Authentication-Results: i=1; mx.google.com; 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 t18si1891214pjr.102.2019.08.23.03.14.44; Fri, 23 Aug 2019 03:14:59 -0700 (PDT) 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; 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 S2388397AbfHWHNo (ORCPT + 99 others); Fri, 23 Aug 2019 03:13:44 -0400 Received: from shell.v3.sk ([90.176.6.54]:40112 "EHLO shell.v3.sk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731093AbfHWHNn (ORCPT ); Fri, 23 Aug 2019 03:13:43 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id F065CD7697; Fri, 23 Aug 2019 09:13:39 +0200 (CEST) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id yGh66jtHXRfw; Fri, 23 Aug 2019 09:13:36 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 46C8AD7698; Fri, 23 Aug 2019 09:13:36 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.v3.sk Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 9QtK_aypLOFJ; Fri, 23 Aug 2019 09:13:35 +0200 (CEST) Received: from belphegor (nat-pool-brq-t.redhat.com [213.175.37.10]) by zimbra.v3.sk (Postfix) with ESMTPSA id D11F1D7697; Fri, 23 Aug 2019 09:13:34 +0200 (CEST) Message-ID: <0897fa54f487f481bf8770ed516578b6f4f53380.camel@v3.sk> Subject: Re: [PATCH v2 16/20] ARM: mmp: add SMP support From: Lubomir Rintel To: Florian Fainelli , Olof Johansson Cc: Mark Rutland , devicetree@vger.kernel.org, Jason Cooper , Stephen Boyd , Marc Zyngier , Michael Turquette , Russell King , Kishon Vijay Abraham I , Rob Herring , linux-arm-kernel@lists.infradead.org, Thomas Gleixner , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Date: Fri, 23 Aug 2019 09:13:33 +0200 In-Reply-To: <6f9d2285-5ca4-a63a-610e-890b49a4f816@gmail.com> References: <20190822092643.593488-1-lkundrak@v3.sk> <20190822092643.593488-17-lkundrak@v3.sk> <6f9d2285-5ca4-a63a-610e-890b49a4f816@gmail.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.32.4 (3.32.4-1.fc30) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2019-08-22 at 09:36 -0700, Florian Fainelli wrote: > On 8/22/19 2:26 AM, Lubomir Rintel wrote: > > Used to bring up the second core on MMP3. > > > > Signed-off-by: Lubomir Rintel > > > > --- > > Changes since v1: > > - Wrap SW_BRANCH_VIRT_ADDR with __pa_symbol() > > > > arch/arm/mach-mmp/Makefile | 3 +++ > > arch/arm/mach-mmp/platsmp.c | 33 +++++++++++++++++++++++++++++++++ > > 2 files changed, 36 insertions(+) > > create mode 100644 arch/arm/mach-mmp/platsmp.c > > > > diff --git a/arch/arm/mach-mmp/Makefile b/arch/arm/mach-mmp/Makefile > > index 322c1c97dc900..7b3a7f979eece 100644 > > --- a/arch/arm/mach-mmp/Makefile > > +++ b/arch/arm/mach-mmp/Makefile > > @@ -22,6 +22,9 @@ ifeq ($(CONFIG_PM),y) > > obj-$(CONFIG_CPU_PXA910) += pm-pxa910.o > > obj-$(CONFIG_CPU_MMP2) += pm-mmp2.o > > endif > > +ifeq ($(CONFIG_SMP),y) > > +obj-$(CONFIG_MACH_MMP3_DT) += platsmp.o > > +endif > > > > # board support > > obj-$(CONFIG_MACH_ASPENITE) += aspenite.o > > diff --git a/arch/arm/mach-mmp/platsmp.c b/arch/arm/mach-mmp/platsmp.c > > new file mode 100644 > > index 0000000000000..98d5ef23623cb > > --- /dev/null > > +++ b/arch/arm/mach-mmp/platsmp.c > > @@ -0,0 +1,33 @@ > > +// SPDX-License-Identifier: GPL-2.0-or-later > > +/* > > + * Copyright (C) 2019 Lubomir Rintel > > + */ > > +#include > > +#include > > +#include > > +#include "addr-map.h" > > + > > +#define SW_BRANCH_VIRT_ADDR CIU_REG(0x24) > > + > > +static int mmp3_boot_secondary(unsigned int cpu, struct task_struct *idle) > > +{ > > + /* > > + * Apparently, the boot ROM on the second core spins on this > > + * register becoming non-zero and then jumps to the address written > > + * there. No IPIs involved. > > + */ > > + __raw_writel(virt_to_phys(secondary_startup), > > + __pa_symbol(SW_BRANCH_VIRT_ADDR)); > > That looks wrong, the __pa_symbol() is applicable to secondary_startup, > while SW_BRANCH_VIRT_ADDR does not need that. Whoops, sorry for that. Will fix in the next patch version in a few days. Thanks Lubo