diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2008-08-19 16:16:17 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-08-20 06:40:07 -0400 |
commit | 6e833587e11ed0dbf12e647127f2650e2f80b26d (patch) | |
tree | 7ba3d76705547ed1377f87694e0b0e4391fe0015 /drivers/char/hvc_xen.c | |
parent | 170465ee7f5a9a2d0ac71285507e52642e040353 (diff) |
xen: clean up domain mode predicates
There are four operating modes Xen code may find itself running in:
- native
- hvm domain
- pv dom0
- pv domU
Clean up predicates for testing for these states to make them more consistent.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Xen-devel <xen-devel@lists.xensource.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/char/hvc_xen.c')
-rw-r--r-- | drivers/char/hvc_xen.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/char/hvc_xen.c b/drivers/char/hvc_xen.c index 6b70aa66a587..538ceea5e7df 100644 --- a/drivers/char/hvc_xen.c +++ b/drivers/char/hvc_xen.c | |||
@@ -108,8 +108,8 @@ static int __init xen_init(void) | |||
108 | { | 108 | { |
109 | struct hvc_struct *hp; | 109 | struct hvc_struct *hp; |
110 | 110 | ||
111 | if (!is_running_on_xen() || | 111 | if (!xen_pv_domain() || |
112 | is_initial_xendomain() || | 112 | xen_initial_domain() || |
113 | !xen_start_info->console.domU.evtchn) | 113 | !xen_start_info->console.domU.evtchn) |
114 | return -ENODEV; | 114 | return -ENODEV; |
115 | 115 | ||
@@ -142,7 +142,7 @@ static void __exit xen_fini(void) | |||
142 | 142 | ||
143 | static int xen_cons_init(void) | 143 | static int xen_cons_init(void) |
144 | { | 144 | { |
145 | if (!is_running_on_xen()) | 145 | if (!xen_pv_domain()) |
146 | return 0; | 146 | return 0; |
147 | 147 | ||
148 | hvc_instantiate(HVC_COOKIE, 0, &hvc_ops); | 148 | hvc_instantiate(HVC_COOKIE, 0, &hvc_ops); |