diff mbox

xen: remove struct domain and vcpu declarations from types.h

Message ID 20170810132404.23831-1-wei.liu2@citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Wei Liu Aug. 10, 2017, 1:24 p.m. UTC
They don't belong there. Removing them causes build error in compat.h.
Add a struct domain declaration there because including sched.h
doesn't work.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Tim Deegan <tim@xen.org>
Cc: Wei Liu <wei.liu2@citrix.com>
---
 xen/include/xen/compat.h | 1 +
 xen/include/xen/types.h  | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)

Comments

Jan Beulich Aug. 10, 2017, 1:34 p.m. UTC | #1
>>> On 10.08.17 at 15:24, <wei.liu2@citrix.com> wrote:
> They don't belong there. Removing them causes build error in compat.h.
> Add a struct domain declaration there because including sched.h
> doesn't work.
> 
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>

Acked-by: Jan Beulich <jbeulich@suse.com>
Wei Liu Aug. 10, 2017, 4:41 p.m. UTC | #2
On Thu, Aug 10, 2017 at 02:24:04PM +0100, Wei Liu wrote:
> They don't belong there. Removing them causes build error in compat.h.
> Add a struct domain declaration there because including sched.h
> doesn't work.
> 
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>

Unfortunately this version is broken on ARM. I will send v2 later.
diff mbox

Patch

diff --git a/xen/include/xen/compat.h b/xen/include/xen/compat.h
index ce6245c10f..895e2ff68d 100644
--- a/xen/include/xen/compat.h
+++ b/xen/include/xen/compat.h
@@ -227,6 +227,7 @@  void xlat_start_info(struct start_info *, enum XLAT_start_info_console);
 struct vcpu_runstate_info;
 void xlat_vcpu_runstate_info(struct vcpu_runstate_info *);
 
+struct domain;
 int switch_compat(struct domain *);
 
 #else
diff --git a/xen/include/xen/types.h b/xen/include/xen/types.h
index 170e993558..b1dbb8720a 100644
--- a/xen/include/xen/types.h
+++ b/xen/include/xen/types.h
@@ -42,9 +42,6 @@  typedef         __s32           int32_t;
 typedef         __u64           uint64_t;
 typedef         __s64           int64_t;
 
-struct domain;
-struct vcpu;
-
 typedef __u16 __le16;
 typedef __u16 __be16;
 typedef __u32 __le32;