From patchwork Mon Nov 18 13:27:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 21581 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f197.google.com (mail-ie0-f197.google.com [209.85.223.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 73E45202DA for ; Mon, 18 Nov 2013 13:27:51 +0000 (UTC) Received: by mail-ie0-f197.google.com with SMTP id e14sf2439247iej.0 for ; Mon, 18 Nov 2013 05:27:50 -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:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=iN/sbdWCL9B66ebO3Lar34djHNnhIvxWAoF12lW0qEk=; b=U0ezKRuTbZKTarUyJrw1MBoxjNxYvZP32hTDi0eTMai5k/ZDVM6Ss0Eq6QpMH4sBAm qhv/e+FnY0YEvX8LPg8eC8Kofo1elari/dV/vf4u4PaHW4QxZt6UUwd5QIDSsiyfGYJF 5RiGYDuMCI4GQTaEqivOhWyyV61X+wP9rP1YNMYZuMGbdyOPOsYLsUIC3xf+BKZH9QRH hn5YIK8kthWmtFns+DoPw/n7RMl9KJ5DvVvjZ8bW4jvPnqZoz7PHFNWNkMecpnbh/It9 rF2tAq5EJ4DY2YGmz7RUOzY+NVHnOfDRwW+OAaHx480zuofJM5x6swVgYGtneHGvNeek aJzA== X-Gm-Message-State: ALoCoQntP9UytglkMABFtZW425Wh7OBMDjMB38jDij2masbXJHK/0zXpn3Q+uaRgcrUFjBN/5Bnk X-Received: by 10.182.22.73 with SMTP id b9mr7717552obf.17.1384781270582; Mon, 18 Nov 2013 05:27:50 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.4.228 with SMTP id n4ls2564313qen.71.gmail; Mon, 18 Nov 2013 05:27:50 -0800 (PST) X-Received: by 10.58.208.130 with SMTP id me2mr15615572vec.13.1384781270467; Mon, 18 Nov 2013 05:27:50 -0800 (PST) Received: from mail-vb0-f43.google.com (mail-vb0-f43.google.com [209.85.212.43]) by mx.google.com with ESMTPS id wp10si7202851vdb.84.2013.11.18.05.27.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 18 Nov 2013 05:27:50 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.43 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.43; Received: by mail-vb0-f43.google.com with SMTP id q12so1077034vbe.2 for ; Mon, 18 Nov 2013 05:27:50 -0800 (PST) X-Received: by 10.220.123.6 with SMTP id n6mr740326vcr.28.1384781269971; Mon, 18 Nov 2013 05:27:49 -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 u4csp201585vcz; Mon, 18 Nov 2013 05:27:49 -0800 (PST) X-Received: by 10.180.221.38 with SMTP id qb6mr16708546wic.8.1384781269096; Mon, 18 Nov 2013 05:27:49 -0800 (PST) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by mx.google.com with ESMTPS id pr7si6143582wjc.164.2013.11.18.05.27.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 18 Nov 2013 05:27:49 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.50 is neither permitted nor denied by best guess record for domain of julien.grall@linaro.org) client-ip=74.125.82.50; Received: by mail-wg0-f50.google.com with SMTP id k14so6238863wgh.29 for ; Mon, 18 Nov 2013 05:27:48 -0800 (PST) X-Received: by 10.194.219.1 with SMTP id pk1mr2294285wjc.36.1384781268604; Mon, 18 Nov 2013 05:27:48 -0800 (PST) Received: from localhost.localdomain (cpc8-cmbg15-2-0-cust169.5-4.cable.virginm.net. [86.30.140.170]) by mx.google.com with ESMTPSA id bs15sm24112492wib.10.2013.11.18.05.27.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Nov 2013 05:27:47 -0800 (PST) From: Julien Grall To: xen-devel@lists.xenproject.org Cc: ian.campbell@citrix.com, tim@xen.org, patches@linaro.org, stefano.stabellini@eu.citrix.com, andre.przywara@linaro.org, Julien Grall Subject: [PATCH] xen/arm: midway: implement SMP Date: Mon, 18 Nov 2013 13:27:40 +0000 Message-Id: <1384781260-10429-1-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.8.3.1 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.43 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: , Signed-off-by: Julien Grall Acked-by: Stefano Stabellini Acked-by: Ian Campbell --- xen/arch/arm/platforms/midway.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/xen/arch/arm/platforms/midway.c b/xen/arch/arm/platforms/midway.c index 399056b..3b9fcfc 100644 --- a/xen/arch/arm/platforms/midway.c +++ b/xen/arch/arm/platforms/midway.c @@ -47,6 +47,27 @@ static uint32_t midway_quirks(void) return PLATFORM_QUIRK_DOM0_MAPPING_11; } +static int __init midway_cpu_up(int cpu) +{ + void __iomem *pens; + + pens = ioremap_nocache(0, PAGE_SIZE); + if ( !pens ) + { + dprintk(XENLOG_ERR, "Unable to map midway pens MMIO\n"); + return -EFAULT; + } + + printk("Set cpu pen %u to %"PRIpaddr" (%p)\n", + cpu, __pa(init_secondary), init_secondary); + + writel(__pa(init_secondary), pens + 0x40 + cpu * 0x10); + + iounmap(pens); + + return 0; +} + static const char * const midway_dt_compat[] __initconst = { "calxeda,ecx-2000", @@ -57,6 +78,7 @@ PLATFORM_START(midway, "CALXEDA MIDWAY") .compatible = midway_dt_compat, .reset = midway_reset, .quirks = midway_quirks, + .cpu_up = midway_cpu_up, PLATFORM_END /*