From patchwork Tue Nov 17 09:40:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 7634381 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 91BB49F1C2 for ; Tue, 17 Nov 2015 09:44:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AD86B204EB for ; Tue, 17 Nov 2015 09:44:42 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C4B042047C for ; Tue, 17 Nov 2015 09:44:41 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zycmk-0005jS-Ew; Tue, 17 Nov 2015 09:42:46 +0000 Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zycm6-0005Aa-E0 for linux-arm-kernel@lists.infradead.org; Tue, 17 Nov 2015 09:42:08 +0000 Received: by wmww144 with SMTP id w144so17134574wmw.0 for ; Tue, 17 Nov 2015 01:41:44 -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=s938n6NT/j6Q5VwlR9mBBQnVvr0ncR6uAIbZ5ooggVU=; b=Vj7Ifm/PxcDrycTVteZ4lp8aRgMPDSGilY1tHnwg/DYZyT7/CwSO2kbgDPJLvyaBWo OnwA524rn4ABx13nM5pV5UuxLJ7Sbwhb7VLmQuTAMNdiiEptv85tIU8yH3fzOvI5nWqK t1r5sdFa3ZViV3eEd20XVbpNknpMKOyjDyammrJqCWlzvhJ72lBc6H5fCJPOIO2f1Xpp hnLukoHvqB+ccULxY3iWJeP7j/oC/I1MATlx8Lz/+mxmQGflRTxse/iTKco47FGpxCgS UAFmxBmCMi2orEUCg9f7FFUvSQ6SscKvRAtNk96nmNJFFhwZ+K2wOuOnwJDZoa3ne5wd 2YsA== 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=s938n6NT/j6Q5VwlR9mBBQnVvr0ncR6uAIbZ5ooggVU=; b=jO+C1Cd6anK9VQ39rFCsC/AzD3MDFmdIUylSAvGA00Iw5nQInjqhjZJl+VZkGr/0yF qwvBcSgifNteRHw9EaCc9YtVQssxNuWmPVJRO5/VDwbKddnibU6IxkzQ88+on3/FD4+H 87G0Ar6Zef/txeVEbjAvZ6cKntT0YsUdee5Nt2uQpe3ixZ3VxlPQ6Wv0eQqqnSfmGp3g d9vJS+YBT4fZMhD6E/3wpKTF93q72H/z6uz97g5TfVC4ZIIr5F/V29NWATSv+PtoUr/o La/bLgqb8GUlQSURur01E0fhPuNbaCnl6TAMJKYtwbYx+tOQ9hLP6uJoBTLd9rwFU4Mt BMxg== X-Gm-Message-State: ALoCoQlomDh9gFnmA4pEYvSCkVH3VUCQ4GLtHbhpIevdb2fPpy+XLkU7a7H0ffxQJ+oN92/xWkrL X-Received: by 10.28.21.196 with SMTP id 187mr1515342wmv.82.1447753304701; Tue, 17 Nov 2015 01:41:44 -0800 (PST) Received: from localhost ([78.129.251.54]) by smtp.gmail.com with ESMTPSA id gl4sm31905093wjd.17.2015.11.17.01.41.42 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 17 Nov 2015 01:41:44 -0800 (PST) From: shannon.zhao@linaro.org To: ian.campbell@citrix.com, stefano.stabellini@citrix.com, keir@xen.org, jbeulich@suse.com, andrew.cooper3@citrix.com, julien.grall@citrix.com, xen-devel@lists.xen.org Subject: [PATCH v3 04/62] arm/acpi: Emulate io ports for arm Date: Tue, 17 Nov 2015 17:40:03 +0800 Message-Id: <1447753261-7552-5-git-send-email-shannon.zhao@linaro.org> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1447753261-7552-1-git-send-email-shannon.zhao@linaro.org> References: <1447753261-7552-1-git-send-email-shannon.zhao@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151117_014206_854401_64E56810 X-CRM114-Status: UNSURE ( 9.07 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, hangaohuai@huawei.com, ard.biesheuvel@linaro.org, shannon.zhao@linaro.org, christoffer.dall@linaro.org, peter.huangpeng@huawei.com, david.vrabel@citrix.com, zhaoshenglong@huawei.com, linux-arm-kernel@lists.infradead.org, roger.pau@citrix.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Parth Dixit Add macros to emulate x86 style ports for arm. This avoids modification in common code for acpi. Signed-off-by: Parth Dixit Signed-off-by: Shannon Zhao --- 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 */