From patchwork Sun May 17 20:03:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Parth Dixit X-Patchwork-Id: 48627 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5610721411 for ; Sun, 17 May 2015 20:05:45 +0000 (UTC) Received: by wizk4 with SMTP id k4sf15342564wiz.2 for ; Sun, 17 May 2015 13:05:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:cc:subject:precedence:list-id:list-unsubscribe:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:list-archive; bh=dV7bPwsRJvbnP1kyY7Zqsajio5Gp1H0g/NAIFTO9+AU=; b=WoDaONiIboOKbUa90mzdgpaWlBl/EOKFwqMADzOoakSj4UZj3rrSilaHHFBPIP5fk0 IVMEnb5XArWIrYC8F3dPyQMU2L3OcQBexI+fV5wHwX17rlLrH1Q0N9QR3+6CIfUYqa/1 eJzB4aTVGHg/9kepQz5SqnuDSBGWKsP6AfnxBvNG6qb0ZIOC1oeeGFipy3hNEEs9pkrU 3X9quD/v9b1LoGAF3a7GQs6Adv/dFh6NnVMszGrEYpiJUR/rXzyAjoHknIaC/gKmx0QU qsmH/bwu4jqO1k1K7Z9NxN99MHsb3iKswzD0w3o2mUZB57RGRWKg2EGBlPJxmtB3wKh4 kxVw== X-Gm-Message-State: ALoCoQl1QbtdExXwkSoce1EPdCQivKu5E2EvWcrgJXXJaxYE+b03HbcuQBOXecSulUkCVo6z3u09 X-Received: by 10.152.2.169 with SMTP id 9mr8420594lav.1.1431893143293; Sun, 17 May 2015 13:05:43 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.204.39 with SMTP id kv7ls700084lac.63.gmail; Sun, 17 May 2015 13:05:43 -0700 (PDT) X-Received: by 10.112.156.97 with SMTP id wd1mr14554330lbb.30.1431893143144; Sun, 17 May 2015 13:05:43 -0700 (PDT) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com. [209.85.215.50]) by mx.google.com with ESMTPS id th3si5317665lbb.146.2015.05.17.13.05.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 17 May 2015 13:05:42 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) client-ip=209.85.215.50; Received: by labbd9 with SMTP id bd9so191509912lab.2 for ; Sun, 17 May 2015 13:05:42 -0700 (PDT) X-Received: by 10.152.29.161 with SMTP id l1mr14672771lah.76.1431893142393; Sun, 17 May 2015 13:05:42 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp3507589lbb; Sun, 17 May 2015 13:05:41 -0700 (PDT) X-Received: by 10.55.18.139 with SMTP id 11mr41456899qks.5.1431893139902; Sun, 17 May 2015 13:05:39 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id g31si8281506qkh.66.2015.05.17.13.05.39 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 17 May 2015 13:05:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xen.org designates 50.57.142.19 as permitted sender) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Yu4nd-0001KS-RH; Sun, 17 May 2015 20:04:37 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Yu4nc-0001KB-AC for xen-devel@lists.xen.org; Sun, 17 May 2015 20:04:36 +0000 Received: from [85.158.139.211] by server-12.bemta-5.messagelabs.com id 10/B6-02782-354F8555; Sun, 17 May 2015 20:04:35 +0000 X-Env-Sender: parth.dixit@linaro.org X-Msg-Ref: server-16.tower-206.messagelabs.com!1431893073!8251214!1 X-Originating-IP: [209.85.192.175] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.13.15; banners=-,-,- X-VirusChecked: Checked Received: (qmail 10922 invoked from network); 17 May 2015 20:04:34 -0000 Received: from mail-pd0-f175.google.com (HELO mail-pd0-f175.google.com) (209.85.192.175) by server-16.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 17 May 2015 20:04:34 -0000 Received: by pdea3 with SMTP id a3so116229969pde.2 for ; Sun, 17 May 2015 13:04:33 -0700 (PDT) X-Received: by 10.68.57.131 with SMTP id i3mr23322417pbq.130.1431893072969; Sun, 17 May 2015 13:04:32 -0700 (PDT) Received: from localhost.localdomain ([117.247.24.139]) by mx.google.com with ESMTPSA id j9sm7838401pdm.53.2015.05.17.13.04.29 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 17 May 2015 13:04:32 -0700 (PDT) From: Parth Dixit To: xen-devel@lists.xen.org Date: Mon, 18 May 2015 01:33:30 +0530 Message-Id: <1431893048-5214-4-git-send-email-parth.dixit@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1431893048-5214-1-git-send-email-parth.dixit@linaro.org> References: <1431893048-5214-1-git-send-email-parth.dixit@linaro.org> Cc: keir@xen.org, ian.campbell@citrix.com, andrew.cooper3@citrix.com, tim@xen.org, julien.grall@citrix.com, stefano.stabellini@citrix.com, jbeulich@suse.com, parth.dixit@linaro.org, christoffer.dall@linaro.org Subject: [Xen-devel] [PATCH v2 03/41] arm/acpi : emulate io ports for arm X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: parth.dixit@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: add macros to emulate x86 style ports for arm. This avoids modification in common code for acpi. Signed-off-by: Parth Dixit --- xen/include/asm-arm/arm64/io.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/xen/include/asm-arm/arm64/io.h b/xen/include/asm-arm/arm64/io.h index 37abc47..7ad9b65 100644 --- a/xen/include/asm-arm/arm64/io.h +++ b/xen/include/asm-arm/arm64/io.h @@ -20,6 +20,7 @@ #ifndef _ARM_ARM64_IO_H #define _ARM_ARM64_IO_H +#include #include /* @@ -109,4 +110,17 @@ static inline u64 __raw_readq(const volatile void __iomem *addr) #define writel(v,c) ({ __iowmb(); writel_relaxed((v),(c)); }) #define writeq(v,c) ({ __iowmb(); writeq_relaxed((v),(c)); }) +/* + * Emulate x86 io ports for arm. + */ +#define __armio(addr) ( (void __iomem *)addr ) + +#define inb(c) ( readb( __armio(c) ) ) +#define inw(c) ( readw( __armio(c) ) ) +#define inl(c) ( readl( __armio(c) ) ) + +#define outb(v, c) ( writeb(v, __armio(c) ) ) +#define outw(v, c) ( writew(v, __armio(c) ) ) +#define outl(v, c) ( writel(v, __armio(c) ) ) + #endif /* _ARM_ARM64_IO_H */