From patchwork Tue Nov 19 17:55:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 21632 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 DE52723A4E for ; Tue, 19 Nov 2013 17:55:51 +0000 (UTC) Received: by mail-qe0-f69.google.com with SMTP id 1sf4430909qee.0 for ; Tue, 19 Nov 2013 09:55:51 -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=VwyZTYCAguG4pyCV3ZqgmxF6dGJc8VaEfhi8kwQ1nh8=; b=CbtlUkVfnBILR1EkeCXur42Tdk9NDtgYhV39yotWAXmiLgHPDDJbInRzMkXBEkhwVk juVazxooMrrHHof/lG7U6x5QFJVVn7f/LOOoFF8c3lv852K2p8sEVUtmIVesB7do3ENR LgelZmMy8V8VczPVHIHC9oFGD4RyCBVpmQZWE/MXJ1vhFhiNOCigfH3y8lg/bMaXL+cP ZdYsDyu+APkkek24QZFKYUR8Y243PsAwf3bjSSwl4DqaiTqpKQaYLMqcMH2Lsp4VtKLC OFhi7CzzSqjojQzdNdU4fKQFgIjtJYQiBLdNGt3yrwjybmJzPtRbAL6xUtvguy2/NHkJ NTYA== X-Gm-Message-State: ALoCoQl89Bo+AuP9VKKIvbSlqHOdTo63eKXcnsNhHDZaIdBZoEtYuxD34D+zf/q5ZPpGLQhMt6ss X-Received: by 10.58.46.36 with SMTP id s4mr9416653vem.18.1384883751202; Tue, 19 Nov 2013 09:55:51 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.83.198 with SMTP id s6ls3206383qey.46.gmail; Tue, 19 Nov 2013 09:55:51 -0800 (PST) X-Received: by 10.58.136.231 with SMTP id qd7mr21926252veb.1.1384883751133; Tue, 19 Nov 2013 09:55:51 -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 gw7si8298019veb.0.2013.11.19.09.55.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 19 Nov 2013 09:55: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 q12so2434866vbe.16 for ; Tue, 19 Nov 2013 09:55:50 -0800 (PST) X-Received: by 10.58.143.17 with SMTP id sa17mr22560280veb.14.1384883750835; Tue, 19 Nov 2013 09:55:50 -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 u4csp296238vcz; Tue, 19 Nov 2013 09:55:50 -0800 (PST) X-Received: by 10.180.185.101 with SMTP id fb5mr22079286wic.11.1384883749849; Tue, 19 Nov 2013 09:55: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 jr6si8088384wjc.99.2013.11.19.09.55.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 19 Nov 2013 09:55: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 k14so8030432wgh.17 for ; Tue, 19 Nov 2013 09:55:49 -0800 (PST) X-Received: by 10.195.13.164 with SMTP id ez4mr22541707wjd.11.1384883749289; Tue, 19 Nov 2013 09:55:49 -0800 (PST) Received: from belegaer.uk.xensource.com. ([185.25.64.249]) by mx.google.com with ESMTPSA id hv5sm7841290wib.2.2013.11.19.09.55.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Nov 2013 09:55:48 -0800 (PST) From: Julien Grall To: xen-devel@lists.xenproject.org Cc: patches@linaro.org, ian.campbell@citrix.com, time@xen.org, stefano.stabellini@citrix.com, Julien Grall Subject: [PATCH] xen/arm: gic: don't use dom0 variable in gicv_setup Date: Tue, 19 Nov 2013 17:55:45 +0000 Message-Id: <1384883745-28844-1-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 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: , The commit 99bf30a "xen: arm: define guest virtual platform in API headers" modifies gicv_setup to either use harcoded addresses for guest or hardware addresses for dom0. In the latter case, the variable dom0 is not yet initialized. dom0 receives assignment by the return of domain_create which calls gicv_setup. Use the ID to know whether the domain is dom0 or not. Signed-off-by: Julien Grall --- xen/arch/arm/gic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c index 3b1ef3a..d5ac770 100644 --- a/xen/arch/arm/gic.c +++ b/xen/arch/arm/gic.c @@ -881,7 +881,7 @@ int gicv_setup(struct domain *d) * Domain 0 gets the hardware address. * Guests get the virtual platform layout. */ - if ( d == dom0 ) + if ( d->domain_id == 0 ) { d->arch.vgic.dbase = gic.dbase; d->arch.vgic.cbase = gic.cbase;