From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: [PATCH v3 07/11] xen: arm: implement smp initialisation callbacks for exynos5 Date: Fri, 27 Sep 2013 11:20:36 +0100 Message-ID: <1380277240-27900-7-git-send-email-ian.campbell@citrix.com> References: <1380276965.29483.178.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1380276965.29483.178.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: julien.grall@linaro.org, tim@xen.org, Ian Campbell , stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org These were removed in "xen: arm: rewrite start of day page table and cpu bring up". This code is based on that assembly code but is compile tested only. Signed-off-by: Ian Campbell --- xen/arch/arm/platforms/exynos5.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/xen/arch/arm/platforms/exynos5.c b/xen/arch/arm/platforms/exynos5.c index 36d2325..08dc12d 100644 --- a/xen/arch/arm/platforms/exynos5.c +++ b/xen/arch/arm/platforms/exynos5.c @@ -65,6 +65,35 @@ static int exynos5_specific_mapping(struct domain *d) return 0; } +static int exynos5_smp_init(void) +{ + void __iomem *sysram; + + sysram = ioremap_nocache(S5P_PA_SYSRAM, PAGE_SIZE); + if ( !sysram ) + { + dprintk(XENLOG_ERR, "Unable to map exynos5 MMIO\n"); + return -EFAULT; + } + + printk("Set SYSRAM to %"PRIpaddr" (%p)\n", + __pa(init_secondary), init_secondary); + writel(__pa(init_secondary), sysram); + + iounmap(sysram); + + return 0; +} + +static int exynos5_cpu_up(int cpu) +{ + /* Nothing to do here, the generic sev() will suffice to kick CPUs + * out of either the firmware or our own smp_up_cpu gate, + * depending on where they have ended up. */ + + return 0; +} + static void exynos5_reset(void) { void __iomem *pmu; @@ -107,6 +136,8 @@ PLATFORM_START(exynos5, "SAMSUNG EXYNOS5") .compatible = exynos5_dt_compat, .init_time = exynos5_init_time, .specific_mapping = exynos5_specific_mapping, + .smp_init = exynos5_smp_init, + .cpu_up = exynos5_cpu_up, .reset = exynos5_reset, .quirks = exynos5_quirks, .blacklist_dev = exynos5_blacklist_dev, -- 1.7.10.4