From patchwork Tue Nov 17 09:57:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 56770 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp1831050lbb; Tue, 17 Nov 2015 01:57:57 -0800 (PST) X-Received: by 10.66.236.201 with SMTP id uw9mr61358095pac.76.1447754271489; Tue, 17 Nov 2015 01:57:51 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qh12si56570759pab.145.2015.11.17.01.57.51; Tue, 17 Nov 2015 01:57:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dkim=neutral (body hash did not verify) header.i=@linaro_org.20150623.gappssmtp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753605AbbKQJ5r (ORCPT + 6 others); Tue, 17 Nov 2015 04:57:47 -0500 Received: from mail-wm0-f53.google.com ([74.125.82.53]:35153 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753546AbbKQJ5o (ORCPT ); Tue, 17 Nov 2015 04:57:44 -0500 Received: by wmdw130 with SMTP id w130so147169396wmd.0 for ; Tue, 17 Nov 2015 01:57:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro_org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Oaq3QEPKERPPfe5r4Xw9Wp7ZH0F2zl4aCywH6jd16zA=; b=guaNAirLQTxottLs7TMWm5zCLyGX4zp6u1BeAK/FKNE9g63oa8akyWG4jyo3StFiO0 4m4aQuYbn3h5VbJuMhCg1TLJNsGYS8hn1jyhSDHVDrhv9JZ8/c7f66Wvb1TsLewiejkr ZLGzFES/OkDCUONJYvZ7oBAIkzVzmvZiIAkraZ1m9yYPPv+n7bp6XhacHgbRRdncZcMO t30IzQd+GYwDCti7XR7FI+hST9F5d5pD+9s7WTQwKf7eXggGHTTEoH9Fvo3bekU3Mzq4 67bEVnt+TYBnUD+9YV/Vpg+zdd0pnwEZ/vSgpLxTda4tI7gbMIy9aiHMuh+sRsS+V8Sc wvzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Oaq3QEPKERPPfe5r4Xw9Wp7ZH0F2zl4aCywH6jd16zA=; b=UdLQBIglBD4RWLzSejeJrFtKyyZ25wUj+KF4kQqW2X7PDTM5tBhhFUjUqQVg0S0CPZ Nk5Ri7sq5msvm0VLpJQrweZ/Jv/tftDNIYqLrbGwMn9x+BFDHw2rIe/5mWrjpZTfHFfR wZX/vnldtq9VNcAxMoIkrqY8C4qRzGowRJb1EPNXieOAm4hT0weDFQWKUQmAjmcQGy80 CvJgbf4+dApL3jmVexl1cOJDSmQ7WSeMOebsXWtCv4gtmI/cDKBW9mf+yjnr8PiXlqAG ZH2dRmTYO30p/VNYMiBf+nXNxfdjng9wQDnT/8BdDBTogU7MJys7TpsPJ116g6raDJBB J7Cg== X-Gm-Message-State: ALoCoQmDBW/d/VgQ8V3q87QLVJNjyANLlzolvuz9hw4xIcoSNATDT3iQZ/kjx6dI7ZiaAw9T0OeQ X-Received: by 10.194.250.39 with SMTP id yz7mr6699251wjc.92.1447754263362; Tue, 17 Nov 2015 01:57:43 -0800 (PST) Received: from localhost ([78.129.251.54]) by smtp.gmail.com with ESMTPSA id it4sm39091210wjb.0.2015.11.17.01.57.41 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 17 Nov 2015 01:57:42 -0800 (PST) From: shannon.zhao@linaro.org To: ian.campbell@citrix.com, stefano.stabellini@citrix.com, catalin.marinas@arm.com, will.deacon@arm.com, julien.grall@citrix.com, ard.biesheuvel@linaro.org, mark.rutland@arm.com, linux-arm-kernel@lists.infradead.org Cc: xen-devel@lists.xen.org, christoffer.dall@linaro.org, devicetree@vger.kernel.org, linux-efi@vger.kernel.org, peter.huangpeng@huawei.com, shannon.zhao@linaro.org, zhaoshenglong@huawei.com, hangaohuai@huawei.com Subject: [PATCH 03/13] arm/xen: Use xlated_setup_gnttab_pages to setup grant table Date: Tue, 17 Nov 2015 17:57:01 +0800 Message-Id: <1447754231-7772-4-git-send-email-shannon.zhao@linaro.org> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1447754231-7772-1-git-send-email-shannon.zhao@linaro.org> References: <1447754231-7772-1-git-send-email-shannon.zhao@linaro.org> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Shannon Zhao Use xlated_setup_gnttab_pages to setup grant table. Then it doesn't rely on DT or ACPI to pass the start address and size of grant table. Signed-off-by: Shannon Zhao --- arch/arm/xen/enlighten.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c index eeeab07..7cb82f7 100644 --- a/arch/arm/xen/enlighten.c +++ b/arch/arm/xen/enlighten.c @@ -186,18 +186,10 @@ static int __init xen_guest_init(void) { struct xen_add_to_physmap xatp; struct shared_info *shared_info_page = NULL; - struct resource res; - phys_addr_t grant_frames; if (!xen_domain()) return 0; - if (of_address_to_resource(xen_node, GRANT_TABLE_PHYSADDR, &res)) { - pr_err("Xen grant table base address not found\n"); - return -ENODEV; - } - grant_frames = res.start; - xen_events_irq = irq_of_parse_and_map(xen_node, 0); if (!xen_events_irq) { pr_err("Xen event channel interrupt not found\n"); @@ -232,7 +224,7 @@ static int __init xen_guest_init(void) if (xen_vcpu_info == NULL) return -ENOMEM; - if (gnttab_setup_auto_xlat_frames(grant_frames)) { + if (xlated_setup_gnttab_pages()) { free_percpu(xen_vcpu_info); return -ENOMEM; }