From patchwork Fri May 10 02:17:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 16824 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f71.google.com (mail-yh0-f71.google.com [209.85.213.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 650F1238F7 for ; Fri, 10 May 2013 02:19:46 +0000 (UTC) Received: by mail-yh0-f71.google.com with SMTP id a41sf4552601yho.10 for ; Thu, 09 May 2013 19:19:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=NXRdR2U0njpIZQufvKny0BcAsyuwq1TISGP4wfqrVgM=; b=atDTbFZu0+rVz0KYus1ryJLgUtudBkwcu7lyBxBTzn37qW+o1QrVAq6yPVdFFmtV8S L9saX+VFCnJM8HEcS+RyWEzjmA8bMFu6vbXgEqP8MKId6yoWHBFMS3oyjoBOtXunu3vT RenlOAHgJ6VAJsvt2PAzZLb1diY6nvmh3qHPKzDdBULe1yww7RbOPBR5z2QYmCfTS2w6 mdmmLjlt7zeR+m+CNbchSwcHfXh0LKw0lH50KpehODWde2VyYOmFC+AyUBCiERoSCy8y 1tqz561GM2joli5CqXFLzl2FIF0LKLy4GD2XrOEqGeDgpgGwOw9wjXLE76PHl+6PCO6U 6DfQ== X-Received: by 10.236.135.65 with SMTP id t41mr7292077yhi.42.1368152361880; Thu, 09 May 2013 19:19:21 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.25.162 with SMTP id d2ls1740517qeg.24.gmail; Thu, 09 May 2013 19:19:21 -0700 (PDT) X-Received: by 10.58.220.129 with SMTP id pw1mr9844481vec.32.1368152361639; Thu, 09 May 2013 19:19:21 -0700 (PDT) Received: from mail-ve0-x22f.google.com (mail-ve0-x22f.google.com [2607:f8b0:400c:c01::22f]) by mx.google.com with ESMTPS id se7si359956vec.0.2013.05.09.19.19.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 09 May 2013 19:19:21 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c01::22f is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c01::22f; Received: by mail-ve0-f175.google.com with SMTP id cz11so833168veb.20 for ; Thu, 09 May 2013 19:19:21 -0700 (PDT) X-Received: by 10.58.227.104 with SMTP id rz8mr9686095vec.22.1368152361550; Thu, 09 May 2013 19:19:21 -0700 (PDT) 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.217.15 with SMTP id hk15csp36215vcb; Thu, 9 May 2013 19:19:21 -0700 (PDT) X-Received: by 10.180.189.68 with SMTP id gg4mr681386wic.27.1368152360479; Thu, 09 May 2013 19:19:20 -0700 (PDT) Received: from mail-wg0-x233.google.com (mail-wg0-x233.google.com [2a00:1450:400c:c00::233]) by mx.google.com with ESMTPS id et4si183636wic.25.2013.05.09.19.19.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 09 May 2013 19:19:20 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c00::233 is neither permitted nor denied by best guess record for domain of julien.grall@linaro.org) client-ip=2a00:1450:400c:c00::233; Received: by mail-wg0-f51.google.com with SMTP id b13so3511572wgh.6 for ; Thu, 09 May 2013 19:19:20 -0700 (PDT) X-Received: by 10.194.59.132 with SMTP id z4mr21468874wjq.57.1368152360107; Thu, 09 May 2013 19:19:20 -0700 (PDT) Received: from belegaer.uk.xensource.com. (firewall.ctxuk.citrix.com. [46.33.159.2]) by mx.google.com with ESMTPSA id dj7sm597075wib.6.2013.05.09.19.19.18 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 09 May 2013 19:19:19 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Cc: Stefano.Stabellini@eu.citrix.com, ian.campbell@citrix.com, patches@linaro.org, Julien Grall Subject: [PATCH V3 12/41] xen/arm: Add helpers ioreadl/iowritel Date: Fri, 10 May 2013 03:17:58 +0100 Message-Id: <1368152307-598-13-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1368152307-598-1-git-send-email-julien.grall@linaro.org> References: <1368152307-598-1-git-send-email-julien.grall@linaro.org> X-Gm-Message-State: ALoCoQnaLLCDA3iN+ltuqqDcRF36xwIVjxzLwG+rBzhIlS93tUMGaR+FBOd+oBkDKoowZM0z+T9F X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c01::22f 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 --- xen/include/asm-arm/mm.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/xen/include/asm-arm/mm.h b/xen/include/asm-arm/mm.h index 4ac8fab..b5ea2d1 100644 --- a/xen/include/asm-arm/mm.h +++ b/xen/include/asm-arm/mm.h @@ -156,7 +156,17 @@ extern void clear_fixmap(unsigned map); /* map a 2MB aligned physical range in virtual memory. */ void* early_ioremap(paddr_t start, size_t len, unsigned attributes); /* map a physical range in virtual memory */ -void *ioremap_attr(paddr_t start, size_t len, unsigned attributes); +void __iomem *ioremap_attr(paddr_t start, size_t len, unsigned attributes); + +static inline uint32_t ioreadl(const volatile void __iomem *addr) +{ + return (*(volatile uint32_t *)addr); +} + +static inline void iowritel(const volatile void __iomem *addr, uint32_t val) +{ + *(volatile uint32_t *)addr = val; +} #define mfn_valid(mfn) ({ \ unsigned long __m_f_n = (mfn); \