Print this page
7127 remove -Wno-missing-braces from Makefile.uts
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/xen/io/xpv_autoconfig.c
+++ new/usr/src/uts/common/xen/io/xpv_autoconfig.c
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21
22 22 /*
23 23 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
24 24 * Use is subject to license terms.
25 25 */
26 26
27 27 #include <sys/types.h>
28 28 #include <sys/hypervisor.h>
29 29 #include <sys/sunndi.h>
30 30 #include <sys/sunddi.h>
31 31 #include <sys/ddi_subrdefs.h>
32 32 #include <sys/bootconf.h>
33 33 #include <sys/psw.h>
34 34 #include <sys/modctl.h>
35 35 #include <sys/errno.h>
36 36 #include <sys/reboot.h>
37 37 #include <sys/hypervisor.h>
38 38 #include <xen/sys/xenbus_comms.h>
39 39 #include <xen/sys/xenbus_impl.h>
40 40 #include <xen/sys/xendev.h>
41 41
42 42 extern int xen_boot_debug;
43 43
44 44 /*
45 45 * Internal structures and functions
46 46 */
47 47 int xendev_nounload = 0;
48 48 void xendev_enumerate(int);
↓ open down ↓ |
48 lines elided |
↑ open up ↑ |
49 49
50 50 /*
51 51 * Interface routines
52 52 */
53 53
54 54 static struct modlmisc modlmisc = {
55 55 &mod_miscops, "virtual device probe"
56 56 };
57 57
58 58 static struct modlinkage modlinkage = {
59 - MODREV_1, (void *)&modlmisc, NULL
59 + MODREV_1, { (void *)&modlmisc, NULL }
60 60 };
61 61
62 62 int
63 63 _init(void)
64 64 {
65 65 int err;
66 66
67 67 if ((err = mod_install(&modlinkage)) != 0)
68 68 return (err);
69 69
70 70 impl_bus_add_probe(xendev_enumerate);
71 71 return (0);
72 72 }
73 73
74 74 int
75 75 _fini(void)
76 76 {
77 77 int err;
78 78
79 79 if (xendev_nounload)
80 80 return (EBUSY);
81 81
82 82 if ((err = mod_remove(&modlinkage)) != 0)
83 83 return (err);
84 84
85 85 impl_bus_delete_probe(xendev_enumerate);
86 86 return (0);
87 87 }
88 88
89 89 int
90 90 _info(struct modinfo *modinfop)
91 91 {
92 92 return (mod_info(&modlinkage, modinfop));
93 93 }
94 94
95 95
96 96 /*
97 97 * This functions is invoked twice, first time with reprogram=0 to
98 98 * set up the xpvd portion of the device tree. The second time is
99 99 * ignored.
100 100 */
101 101 void
102 102 xendev_enumerate(int reprogram)
103 103 {
104 104 dev_info_t *dip;
105 105
106 106 if (reprogram != 0)
107 107 return;
108 108
109 109 ndi_devi_alloc_sleep(ddi_root_node(), "xpvd",
110 110 (pnode_t)DEVI_SID_NODEID, &dip);
111 111
112 112 (void) ndi_devi_bind_driver(dip, 0);
113 113
114 114 /*
115 115 * Too early to enumerate split device drivers in domU
116 116 * since we need to create taskq thread during enumeration.
117 117 * So, we only enumerate softdevs and console here.
118 118 */
119 119 xendev_enum_all(dip, B_TRUE);
120 120 }
↓ open down ↓ |
51 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX