From patchwork Thu Dec 5 10:08:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 22054 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f199.google.com (mail-ve0-f199.google.com [209.85.128.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 34FEB202E0 for ; Thu, 5 Dec 2013 10:08:49 +0000 (UTC) Received: by mail-ve0-f199.google.com with SMTP id c14sf39959442vea.6 for ; Thu, 05 Dec 2013 02:08:49 -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=pPlX9qwB4s+cux0AzS6cYc3uqe6MraCN5WDALO62pmA=; b=QVA6nIrblOXDh7TrDLwo+9aQO+rdRutV9BoJruscrLJH5u/4Uaw2OvYFc0FA7zJBTR /IIcqAWwdHZILWV3Cg0e8c9D1/dJ6u//jM2ResxQ2wUfrpRMwMnpYDOijYyVNnvv0k2k knD0pPz9jq4y90yGfy6vCfDgvxhBewaYEH7mfDT6AaI5TxUwLtwsHDnR1GF+QM5cqWVx 0LLo6LGee6uLgRQotr1ASNYTXgF1YmVOKTc0bxkbJW/85ZwdQUk/uO9RdDAALaR0rmDG HlYv/Gyio45CqvWyDhkdQn0vKt3C4grRy3OYvTCZicOc6BdjaHi8z4E5XDJEFqyOe4Ru cAWg== X-Gm-Message-State: ALoCoQn6yVtJ6N/K80B5cesc2gMF3qXboiuSmKW9cfGm2t+1xKTNinwtEA+WMk3Yzzh+R5e2SxRm X-Received: by 10.236.145.34 with SMTP id o22mr36435567yhj.22.1386238128996; Thu, 05 Dec 2013 02:08:48 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.73.69 with SMTP id j5ls757368qev.48.gmail; Thu, 05 Dec 2013 02:08:48 -0800 (PST) X-Received: by 10.58.255.233 with SMTP id at9mr12487448ved.20.1386238128886; Thu, 05 Dec 2013 02:08:48 -0800 (PST) Received: from mail-ve0-f172.google.com (mail-ve0-f172.google.com [209.85.128.172]) by mx.google.com with ESMTPS id ov5si34183945vcb.97.2013.12.05.02.08.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 05 Dec 2013 02:08:48 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.172; Received: by mail-ve0-f172.google.com with SMTP id jw12so13583839veb.31 for ; Thu, 05 Dec 2013 02:08:48 -0800 (PST) X-Received: by 10.58.46.18 with SMTP id r18mr62936554vem.4.1386238128684; Thu, 05 Dec 2013 02:08:48 -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 u4csp2681vcz; Thu, 5 Dec 2013 02:08:48 -0800 (PST) X-Received: by 10.204.96.203 with SMTP id i11mr835183bkn.56.1386238127762; Thu, 05 Dec 2013 02:08:47 -0800 (PST) Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com [209.85.214.53]) by mx.google.com with ESMTPS id b2si4881760bko.253.2013.12.05.02.08.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 05 Dec 2013 02:08:47 -0800 (PST) Received-SPF: neutral (google.com: 209.85.214.53 is neither permitted nor denied by best guess record for domain of andre.przywara@linaro.org) client-ip=209.85.214.53; Received: by mail-bk0-f53.google.com with SMTP id na10so6985382bkb.26 for ; Thu, 05 Dec 2013 02:08:47 -0800 (PST) X-Received: by 10.205.64.209 with SMTP id xj17mr133419bkb.76.1386238127185; Thu, 05 Dec 2013 02:08:47 -0800 (PST) Received: from slackpad.drs.calxeda.com (g224192075.adsl.alicedsl.de. [92.224.192.75]) by mx.google.com with ESMTPSA id xm9sm28206859bkb.1.2013.12.05.02.08.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Dec 2013 02:08:46 -0800 (PST) From: Andre Przywara To: Ian.Campbell@citrix.com, stefano.stabellini@eu.citrix.com Cc: julien.grall@linaro.org, George.Dunlap@eu.citrix.com, xen-devel@lists.xenproject.org, patches@linaro.org, Andre Przywara Subject: [PATCH v3 5/6] arm32: enable PSCI secondary CPU bringup Date: Thu, 5 Dec 2013 11:08:11 +0100 Message-Id: <1386238092-22216-6-git-send-email-andre.przywara@linaro.org> X-Mailer: git-send-email 1.7.12.1 In-Reply-To: <1386238092-22216-1-git-send-email-andre.przywara@linaro.org> References: <1386238092-22216-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.128.172 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 --- 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 e13a354..1122bbd 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); + if ( platform && platform->cpu_up ) return platform->cpu_up(cpu);