From patchwork Mon Dec 2 11:08:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 21925 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f69.google.com (mail-qe0-f69.google.com [209.85.128.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 14D5423FCF for ; Mon, 2 Dec 2013 11:09:38 +0000 (UTC) Received: by mail-qe0-f69.google.com with SMTP id 1sf24383521qec.4 for ; Mon, 02 Dec 2013 03:09:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=QrO5SE1fV4W4YTXPBBUtqwTzwqoBIHF35MMDM/vqQHA=; b=KGpQqBCNj4ZC+KRu6Wnh1pHHOrRbFfSaqwOy/7Hq2egWVeUOzUwq5vL7f3g+v6Qbj3 2clCvWubqmG3FtiZtx7qzwYSXhVp5qOXt5n3VqxAWVi8cdipwOe736xUs2xX3sCm36OG 36JwevC/t4/H+KZqkUJf54zlfV+so+XOAMutwvaY/kGxc7WzAKfHhkICFPXTT1otDUax f/dAJ1RM7s7Nmu1ojkMfh0ipRSvcLi7aiSrR6GqVxtlwf1JbpaB8qInXC+/OB2t3NE67 1jP4D1+2RFeV07gon/YvTWvDihuIeGZam3WzT41Xx9DLtp8kHic/FEeBdpkZmNFLZgWw MFng== X-Gm-Message-State: ALoCoQn+Ax11Nz4S+0bsTgWZVKL+f+FfkPu/NmT8vL5oGecUpOaII25n/LpKEZnINxqhfUH4Y1Hb X-Received: by 10.58.237.102 with SMTP id vb6mr11360133vec.31.1385982577570; Mon, 02 Dec 2013 03:09:37 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.17.103 with SMTP id n7ls837509qed.52.gmail; Mon, 02 Dec 2013 03:09:37 -0800 (PST) X-Received: by 10.59.1.41 with SMTP id bd9mr7622ved.63.1385982577417; Mon, 02 Dec 2013 03:09:37 -0800 (PST) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id f10si29433682vck.95.2013.12.02.03.09.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 02 Dec 2013 03:09:37 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.171; Received: by mail-vc0-f171.google.com with SMTP id ik5so8315168vcb.16 for ; Mon, 02 Dec 2013 03:09:37 -0800 (PST) X-Received: by 10.58.22.33 with SMTP id a1mr13170vef.55.1385982577338; Mon, 02 Dec 2013 03:09:37 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp110800vcz; Mon, 2 Dec 2013 03:09:37 -0800 (PST) X-Received: by 10.205.68.69 with SMTP id xx5mr147839bkb.143.1385982576495; Mon, 02 Dec 2013 03:09:36 -0800 (PST) Received: from mail-bk0-f51.google.com (mail-bk0-f51.google.com [209.85.214.51]) by mx.google.com with ESMTPS id j5si19067324bko.223.2013.12.02.03.09.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 02 Dec 2013 03:09:36 -0800 (PST) Received-SPF: neutral (google.com: 209.85.214.51 is neither permitted nor denied by best guess record for domain of andre.przywara@linaro.org) client-ip=209.85.214.51; Received: by mail-bk0-f51.google.com with SMTP id 6so5290308bkj.38 for ; Mon, 02 Dec 2013 03:09:35 -0800 (PST) X-Received: by 10.205.10.132 with SMTP id pa4mr47775764bkb.15.1385982575645; Mon, 02 Dec 2013 03:09:35 -0800 (PST) Received: from slackpad.drs.calxeda.com (f053082149.adsl.alicedsl.de. [78.53.82.149]) by mx.google.com with ESMTPSA id z6sm74390807bkn.8.2013.12.02.03.09.34 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Dec 2013 03:09:35 -0800 (PST) From: Andre Przywara To: Ian.Campbell@citrix.com, stefano.stabellini@eu.citrix.com Cc: julien.grall@linaro.org, xen-devel@lists.xenproject.org, patches@linaro.org, Andre Przywara Subject: [PATCH v2 5/6] arm32: enable PSCI secondary CPU bringup Date: Mon, 2 Dec 2013 12:08:57 +0100 Message-Id: <1385982538-17855-6-git-send-email-andre.przywara@linaro.org> X-Mailer: git-send-email 1.7.12.1 In-Reply-To: <1385982538-17855-1-git-send-email-andre.przywara@linaro.org> References: <1385982538-17855-1-git-send-email-andre.przywara@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: andre.przywara@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , If the device tree contains a PSCI node, we bring up secondary CPUs by invoking the appropriate PSCI handler. This will take priority over platform specific functions (which could call the PSCI wrapper themselves if needed), so any PSCI enablement of a platform will automatically be used (as on Linux). Signed-off-by: Andre Przywara Acked-by: Ian Campbell --- xen/arch/arm/arm32/smpboot.c | 4 +++- xen/arch/arm/platform.c | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/arm32/smpboot.c b/xen/arch/arm/arm32/smpboot.c index 88fe8fb..2a77f29 100644 --- a/xen/arch/arm/arm32/smpboot.c +++ b/xen/arch/arm/arm32/smpboot.c @@ -10,7 +10,9 @@ int __init arch_smp_init(void) int __init arch_cpu_init(int cpu, struct dt_device_node *dn) { - /* TODO handle PSCI init */ + /* Not needed on ARM32, as there is no relevant information in + * the CPU device tree node for ARMv7 CPUs. + */ return 0; } diff --git a/xen/arch/arm/platform.c b/xen/arch/arm/platform.c index 056d462..608e689 100644 --- a/xen/arch/arm/platform.c +++ b/xen/arch/arm/platform.c @@ -20,6 +20,7 @@ #include #include #include +#include extern const struct platform_desc _splatform[], _eplatform[]; @@ -109,6 +110,9 @@ int __init platform_specific_mapping(struct domain *d) #ifdef CONFIG_ARM_32 int __init platform_cpu_up(int cpu) { + if ( psci_available ) + return call_psci_cpu_on(cpu, init_secondary); + if ( platform && platform->cpu_up ) return platform->cpu_up(cpu);