From patchwork Fri Oct 6 11:48:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 9989047 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 EE51C60247 for ; Fri, 6 Oct 2017 11:50:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E322528D7B for ; Fri, 6 Oct 2017 11:50:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D7DD028D8D; Fri, 6 Oct 2017 11:50:54 +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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 426E728D7B for ; Fri, 6 Oct 2017 11:50:54 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e0R7Q-0002QD-7I; Fri, 06 Oct 2017 11:48:40 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e0R7P-0002Q7-0k for xen-devel@lists.xenproject.org; Fri, 06 Oct 2017 11:48:39 +0000 Received: from [85.158.143.35] by server-7.bemta-6.messagelabs.com id DE/74-03618-69D67D95; Fri, 06 Oct 2017 11:48:38 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrPLMWRWlGSWpSXmKPExsXitHSDve6k3Ou RBucPm1h83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBmrJ59iLjglXrG1aydrA+NFkS5GTg4JAX+J Cz9ns4HYbALKEj87e8FsEQE9iaYDzxm7GLk4mAWmMEtsun2NGSQhLOAjsaK/hxHEZhFQkbjy7 jgLiM0rYC7RMms6I8RQeYldbRdZQWwhAQWJjunHmCBqBCVOznwCVs8sICFx8MUL5gmM3LOQpG YhSS1gZFrFqF6cWlSWWqRrqZdUlJmeUZKbmJmja2hgppebWlycmJ6ak5hUrJecn7uJERgMDEC wg/HupoBDjJIcTEqivBbp1yOF+JLyUyozEosz4otKc1KLDzHKcHAoSfA25wDlBItS01Mr0jJz gGEJk5bg4FES4d0AkuYtLkjMLc5Mh0idYjTmODDhyh8mjo6bd/8wCbHk5eelSonzHgIpFQApz SjNgxsEi5dLjLJSwryMQKcJ8RSkFuVmlqDKv2IU52BUEuZ1A5nCk5lXArfvFdApTECnzGm6An JKSSJCSqqBUczygu/Lx8sn5ovNObFoX0xI0/Stqqe1baZlff1yZNOX9UaN7dplCvN+Z3+W+V5 92S02Qnlyj5zL4jruXXefGMvNqTP6fK8qnnufukTN/IcrJp0t91q2PMM9++CLxMbf07fGfZnT N2+5io339MlnFky3+ZVXNOth0qM7f8Nnrwu9u9m9+1IW1x8lluKMREMt5qLiRADg66h3kgIAA A== X-Env-Sender: prvs=4459bb304=wei.liu2@citrix.com X-Msg-Ref: server-14.tower-21.messagelabs.com!1507290513!70005139!1 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 26639 invoked from network); 6 Oct 2017 11:48:34 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-14.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 6 Oct 2017 11:48:34 -0000 X-IronPort-AV: E=Sophos;i="5.42,483,1500940800"; d="scan'208";a="450721594" From: Wei Liu To: Xen-devel Date: Fri, 6 Oct 2017 12:48:29 +0100 Message-ID: <20171006114829.1718-1-wei.liu2@citrix.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Cc: Stefano Stabellini , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Tim Deegan , Julien Grall , Jan Beulich , Bhupinder Thakur Subject: [Xen-devel] [PATCH] xen, tools: console.h shouldn't require string.h by default X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Unilaterally making string.h a prerequisite for console.h is going to break build for a lot of consumers of console.h. Define a macro for the new flex ring. Consumers which want to use it should define the macro. Partially revert af8d9356417cb617b635c5ace782388ebfe86e3a. Signed-off-by: Wei Liu --- Cc: Julien Grall Cc: Bhupinder Thakur Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan Cc: Wei Liu --- tools/console/daemon/io.c | 2 +- xen/arch/arm/vpl011.c | 2 ++ xen/include/Makefile | 1 - xen/include/public/io/console.h | 6 +++--- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/console/daemon/io.c b/tools/console/daemon/io.c index afe162e9c2..e22009aa39 100644 --- a/tools/console/daemon/io.c +++ b/tools/console/daemon/io.c @@ -21,7 +21,6 @@ #include "utils.h" #include "io.h" -#include #include #include #include @@ -30,6 +29,7 @@ #include #include +#include #include #include #include diff --git a/xen/arch/arm/vpl011.c b/xen/arch/arm/vpl011.c index 56d9cbe09e..f7ddccb42a 100644 --- a/xen/arch/arm/vpl011.c +++ b/xen/arch/arm/vpl011.c @@ -16,6 +16,8 @@ * this program; If not, see . */ +#define XEN_WANT_FLEX_CONSOLE_RING 1 + #include #include #include diff --git a/xen/include/Makefile b/xen/include/Makefile index c90fdeee75..1299b1962f 100644 --- a/xen/include/Makefile +++ b/xen/include/Makefile @@ -98,7 +98,6 @@ PUBLIC_C99_HEADERS := public/io/9pfs.h public/io/pvcalls.h PUBLIC_ANSI_HEADERS := $(filter-out public/%ctl.h public/xsm/% public/%hvm/save.h $(PUBLIC_C99_HEADERS), $(PUBLIC_HEADERS)) public/io/9pfs.h-prereq := string -public/io/console.h-prereq := string public/io/pvcalls.h-prereq := string headers.chk: $(PUBLIC_ANSI_HEADERS) Makefile diff --git a/xen/include/public/io/console.h b/xen/include/public/io/console.h index 0f0711fbdb..cdbdcd273b 100644 --- a/xen/include/public/io/console.h +++ b/xen/include/public/io/console.h @@ -27,8 +27,6 @@ #ifndef __XEN_PUBLIC_IO_CONSOLE_H__ #define __XEN_PUBLIC_IO_CONSOLE_H__ -#include "ring.h" - typedef uint32_t XENCONS_RING_IDX; #define MASK_XENCONS_IDX(idx, ring) ((idx) & (sizeof(ring)-1)) @@ -40,7 +38,9 @@ struct xencons_interface { XENCONS_RING_IDX out_cons, out_prod; }; -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) +#if defined(__GNUC__) && !defined(__STRICT_ANSI__) && \ + defined(XEN_WANT_FLEX_CONSOLE_RING) +#include "ring.h" DEFINE_XEN_FLEX_RING(xencons); #endif