From patchwork Mon Aug 22 18:33:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikko Rapeli X-Patchwork-Id: 9294257 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5E89660574 for ; Mon, 22 Aug 2016 19:16:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5130928A5E for ; Mon, 22 Aug 2016 19:16:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 45EBF28A69; Mon, 22 Aug 2016 19:16:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 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.wl.linuxfoundation.org (Postfix) with ESMTPS id DCE3E28A5E for ; Mon, 22 Aug 2016 19:16:29 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bbugQ-00007a-TI; Mon, 22 Aug 2016 19:14:54 +0000 Received: from mx1.kapsi.fi ([2001:1bc8:1004::1:25] helo=mail.kapsi.fi) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bbugM-0008U0-HK for linux-arm-kernel@lists.infradead.org; Mon, 22 Aug 2016 19:14:52 +0000 Received: from [2a02:8070:d18f:5c00:bc6b:5a80:6b8d:855c] (helo=localhost.localdomain) by mail.kapsi.fi with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1bbu6u-0004Ss-0g; Mon, 22 Aug 2016 21:38:12 +0300 From: Mikko Rapeli To: linux-kernel@vger.kernel.org Subject: [PATCH v05 54/72] include/uapi/xen/privcmd.h: fix compilation in userspace Date: Mon, 22 Aug 2016 20:33:11 +0200 Message-Id: <1471890809-4383-55-git-send-email-mikko.rapeli@iki.fi> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1471890809-4383-1-git-send-email-mikko.rapeli@iki.fi> References: <1471890809-4383-1-git-send-email-mikko.rapeli@iki.fi> X-SA-Exim-Connect-IP: 2a02:8070:d18f:5c00:bc6b:5a80:6b8d:855c X-SA-Exim-Mail-From: mikko.rapeli@iki.fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160822_121450_826419_80EBD817 X-CRM114-Status: GOOD ( 11.61 ) 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: Juergen Gross , Stefano Stabellini , Mikko Rapeli , Russell King , David Vrabel , xen-devel@lists.xenproject.org, Boris Ostrovsky , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP xen/interface/xen.h is not exported from kernel headers so remove the dependency and provide needed defines for domid_t and xen_pfn_t if they are not already defined by some other e.g. Xen specific headers. Suggested by Andrew Cooper on lkml message <5569F9C9.8000607@citrix.com>. The ifdef for ARM is ugly but did not find better solutions for it. Fixes userspace compilation error: xen/privcmd.h:38:31: fatal error: xen/interface/xen.h: No such file or directory Signed-off-by: Mikko Rapeli Cc: David Vrabel --- arch/arm/include/asm/xen/interface.h | 2 +- include/uapi/xen/privcmd.h | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/xen/interface.h b/arch/arm/include/asm/xen/interface.h index 75d5968..6898ee1 100644 --- a/arch/arm/include/asm/xen/interface.h +++ b/arch/arm/include/asm/xen/interface.h @@ -38,7 +38,7 @@ * fine since it simply wouldn't be able to create any sure pfns in * the first place. */ -typedef uint64_t xen_pfn_t; +typedef __u64 xen_pfn_t; #define PRI_xen_pfn "llx" typedef uint64_t xen_ulong_t; #define PRI_xen_ulong "llx" diff --git a/include/uapi/xen/privcmd.h b/include/uapi/xen/privcmd.h index 7ddeeda..16c11f9 100644 --- a/include/uapi/xen/privcmd.h +++ b/include/uapi/xen/privcmd.h @@ -35,7 +35,17 @@ #include #include -#include + +/* Defined by include/xen/interface/xen.h, but it is not part of Linux uapi */ +#ifndef __XEN_PUBLIC_XEN_H__ +typedef __u16 domid_t; + +#if (defined __ARMEL__ || defined __ARMEB__) +typedef __u64 xen_pfn_t; +#else +typedef unsigned long xen_pfn_t; +#endif /* (defined __ARMEL__ || defined __ARMEB__) */ +#endif /* __XEN_PUBLIC_XEN_H__ */ struct privcmd_hypercall { __u64 op;