Print this page
7127 remove -Wno-missing-braces from Makefile.uts
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/intel/io/pci/pci_autoconfig.c
+++ new/usr/src/uts/intel/io/pci/pci_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 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 23 * Use is subject to license terms.
24 24 */
25 25
26 26 /*
27 27 * Determine the PCI configuration mechanism recommended by the BIOS.
28 28 */
29 29
30 30 #include <sys/types.h>
31 31 #include <sys/sunddi.h>
32 32 #include <sys/pci_impl.h>
33 33 #include <sys/ddi_subrdefs.h>
34 34 #include <sys/bootconf.h>
35 35 #include <sys/psw.h>
36 36 #include <sys/modctl.h>
37 37 #include <sys/errno.h>
38 38 #include <sys/pci.h>
39 39 #include <sys/pci_cfgspace.h>
40 40 #include <sys/reboot.h>
41 41 #include <sys/pci_cfgspace_impl.h>
42 42 #include <sys/mutex.h>
43 43
44 44 extern int pci_boot_debug;
45 45
46 46 /*
47 47 * Interface routines
48 48 */
↓ open down ↓ |
48 lines elided |
↑ open up ↑ |
49 49 void pci_enumerate(int);
50 50 void pci_setup_tree(void);
51 51 void pci_reprogram(void);
52 52 void bus_res_fini(void);
53 53
54 54 static struct modlmisc modlmisc = {
55 55 &mod_miscops, "PCI BIOS interface"
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(pci_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 ((err = mod_remove(&modlinkage)) != 0)
80 80 return (err);
81 81
82 82 impl_bus_delete_probe(pci_enumerate);
83 83 bus_res_fini();
84 84 return (0);
85 85 }
86 86
87 87 int
88 88 _info(struct modinfo *modinfop)
89 89 {
90 90 return (mod_info(&modlinkage, modinfop));
91 91 }
92 92
93 93
94 94 /*
95 95 * This function is invoked twice: first time, with reprogram=0 to
96 96 * set up the PCI portion of the device tree. The second time is
97 97 * for reprogramming devices not set up by the BIOS.
98 98 */
99 99 void
100 100 pci_enumerate(int reprogram)
101 101 {
102 102 extern void add_pci_fixes(void);
103 103 extern void undo_pci_fixes(void);
104 104
105 105 add_pci_fixes();
106 106
107 107 if (reprogram) {
108 108 pci_reprogram();
109 109 undo_pci_fixes();
110 110 return;
111 111 }
112 112
113 113 /* setup device tree */
114 114 pci_setup_tree();
115 115 undo_pci_fixes();
116 116 }
↓ open down ↓ |
47 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX