aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/summit_32.c
diff options
context:
space:
mode:
authorPaolo Ciarrocchi <paolo.ciarrocchi@gmail.com>2008-02-22 17:09:34 -0500
committerIngo Molnar <mingo@elte.hu>2008-04-17 11:40:49 -0400
commit60e11746d97c099b305e25e587731148387d02eb (patch)
tree1fc2af5f7241a511b62a6fbe5a54227c5a47cc7b /arch/x86/kernel/summit_32.c
parent023196a3be708657d828bb139343bceb2c1c9649 (diff)
x86: coding style fixes to arch/x86/kernel/summit_32.c
Before: total: 20 errors, 17 warnings, 180 lines checked After: total: 0 errors, 17 warnings, 183 lines checked No code changed: arch/x86/kernel/summit_32.o: text data bss dec hex filename 932 192 0 1124 464 summit_32.o.before 932 192 0 1124 464 summit_32.o.after md5: 217aa5f002f217e56ef9d8e5c74b60e0 summit_32.o.before.asm 217aa5f002f217e56ef9d8e5c74b60e0 summit_32.o.after.asm Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/summit_32.c')
-rw-r--r--arch/x86/kernel/summit_32.c43
1 files changed, 23 insertions, 20 deletions
diff --git a/arch/x86/kernel/summit_32.c b/arch/x86/kernel/summit_32.c
index 72f463401592..c7b579db843d 100644
--- a/arch/x86/kernel/summit_32.c
+++ b/arch/x86/kernel/summit_32.c
@@ -40,38 +40,40 @@ static int __init setup_pci_node_map_for_wpeg(int wpeg_num, int last_bus)
40 int twister = 0, node = 0; 40 int twister = 0, node = 0;
41 int i, bus, num_buses; 41 int i, bus, num_buses;
42 42
43 for(i = 0; i < rio_table_hdr->num_rio_dev; i++){ 43 for (i = 0; i < rio_table_hdr->num_rio_dev; i++) {
44 if (rio_devs[i]->node_id == rio_devs[wpeg_num]->owner_id){ 44 if (rio_devs[i]->node_id == rio_devs[wpeg_num]->owner_id) {
45 twister = rio_devs[i]->owner_id; 45 twister = rio_devs[i]->owner_id;
46 break; 46 break;
47 } 47 }
48 } 48 }
49 if (i == rio_table_hdr->num_rio_dev){ 49 if (i == rio_table_hdr->num_rio_dev) {
50 printk(KERN_ERR "%s: Couldn't find owner Cyclone for Winnipeg!\n", __FUNCTION__); 50 printk(KERN_ERR "%s: Couldn't find owner Cyclone for Winnipeg!\n", __FUNCTION__);
51 return last_bus; 51 return last_bus;
52 } 52 }
53 53
54 for(i = 0; i < rio_table_hdr->num_scal_dev; i++){ 54 for (i = 0; i < rio_table_hdr->num_scal_dev; i++) {
55 if (scal_devs[i]->node_id == twister){ 55 if (scal_devs[i]->node_id == twister) {
56 node = scal_devs[i]->node_id; 56 node = scal_devs[i]->node_id;
57 break; 57 break;
58 } 58 }
59 } 59 }
60 if (i == rio_table_hdr->num_scal_dev){ 60 if (i == rio_table_hdr->num_scal_dev) {
61 printk(KERN_ERR "%s: Couldn't find owner Twister for Cyclone!\n", __FUNCTION__); 61 printk(KERN_ERR "%s: Couldn't find owner Twister for Cyclone!\n", __FUNCTION__);
62 return last_bus; 62 return last_bus;
63 } 63 }
64 64
65 switch (rio_devs[wpeg_num]->type){ 65 switch (rio_devs[wpeg_num]->type) {
66 case CompatWPEG: 66 case CompatWPEG:
67 /* The Compatibility Winnipeg controls the 2 legacy buses, 67 /*
68 * The Compatibility Winnipeg controls the 2 legacy buses,
68 * the 66MHz PCI bus [2 slots] and the 2 "extra" buses in case 69 * the 66MHz PCI bus [2 slots] and the 2 "extra" buses in case
69 * a PCI-PCI bridge card is used in either slot: total 5 buses. 70 * a PCI-PCI bridge card is used in either slot: total 5 buses.
70 */ 71 */
71 num_buses = 5; 72 num_buses = 5;
72 break; 73 break;
73 case AltWPEG: 74 case AltWPEG:
74 /* The Alternate Winnipeg controls the 2 133MHz buses [1 slot 75 /*
76 * The Alternate Winnipeg controls the 2 133MHz buses [1 slot
75 * each], their 2 "extra" buses, the 100MHz bus [2 slots] and 77 * each], their 2 "extra" buses, the 100MHz bus [2 slots] and
76 * the "extra" buses for each of those slots: total 7 buses. 78 * the "extra" buses for each of those slots: total 7 buses.
77 */ 79 */
@@ -79,7 +81,8 @@ static int __init setup_pci_node_map_for_wpeg(int wpeg_num, int last_bus)
79 break; 81 break;
80 case LookOutAWPEG: 82 case LookOutAWPEG:
81 case LookOutBWPEG: 83 case LookOutBWPEG:
82 /* A Lookout Winnipeg controls 3 100MHz buses [2 slots each] 84 /*
85 * A Lookout Winnipeg controls 3 100MHz buses [2 slots each]
83 * & the "extra" buses for each of those slots: total 9 buses. 86 * & the "extra" buses for each of those slots: total 9 buses.
84 */ 87 */
85 num_buses = 9; 88 num_buses = 9;
@@ -89,7 +92,7 @@ static int __init setup_pci_node_map_for_wpeg(int wpeg_num, int last_bus)
89 return last_bus; 92 return last_bus;
90 } 93 }
91 94
92 for(bus = last_bus; bus < last_bus + num_buses; bus++) 95 for (bus = last_bus; bus < last_bus + num_buses; bus++)
93 mp_bus_id_to_node[bus] = node; 96 mp_bus_id_to_node[bus] = node;
94 return bus; 97 return bus;
95} 98}
@@ -99,12 +102,12 @@ static int __init build_detail_arrays(void)
99 unsigned long ptr; 102 unsigned long ptr;
100 int i, scal_detail_size, rio_detail_size; 103 int i, scal_detail_size, rio_detail_size;
101 104
102 if (rio_table_hdr->num_scal_dev > MAX_NUMNODES){ 105 if (rio_table_hdr->num_scal_dev > MAX_NUMNODES) {
103 printk(KERN_WARNING "%s: MAX_NUMNODES too low! Defined as %d, but system has %d nodes.\n", __FUNCTION__, MAX_NUMNODES, rio_table_hdr->num_scal_dev); 106 printk(KERN_WARNING "%s: MAX_NUMNODES too low! Defined as %d, but system has %d nodes.\n", __FUNCTION__, MAX_NUMNODES, rio_table_hdr->num_scal_dev);
104 return 0; 107 return 0;
105 } 108 }
106 109
107 switch (rio_table_hdr->version){ 110 switch (rio_table_hdr->version) {
108 default: 111 default:
109 printk(KERN_WARNING "%s: Invalid Rio Grande Table Version: %d\n", __FUNCTION__, rio_table_hdr->version); 112 printk(KERN_WARNING "%s: Invalid Rio Grande Table Version: %d\n", __FUNCTION__, rio_table_hdr->version);
110 return 0; 113 return 0;
@@ -119,10 +122,10 @@ static int __init build_detail_arrays(void)
119 } 122 }
120 123
121 ptr = (unsigned long)rio_table_hdr + 3; 124 ptr = (unsigned long)rio_table_hdr + 3;
122 for(i = 0; i < rio_table_hdr->num_scal_dev; i++, ptr += scal_detail_size) 125 for (i = 0; i < rio_table_hdr->num_scal_dev; i++, ptr += scal_detail_size)
123 scal_devs[i] = (struct scal_detail *)ptr; 126 scal_devs[i] = (struct scal_detail *)ptr;
124 127
125 for(i = 0; i < rio_table_hdr->num_rio_dev; i++, ptr += rio_detail_size) 128 for (i = 0; i < rio_table_hdr->num_rio_dev; i++, ptr += rio_detail_size)
126 rio_devs[i] = (struct rio_detail *)ptr; 129 rio_devs[i] = (struct rio_detail *)ptr;
127 130
128 return 1; 131 return 1;
@@ -140,9 +143,9 @@ void __init setup_summit(void)
140 143
141 rio_table_hdr = NULL; 144 rio_table_hdr = NULL;
142 offset = 0x180; 145 offset = 0x180;
143 while (offset){ 146 while (offset) {
144 /* The block id is stored in the 2nd word */ 147 /* The block id is stored in the 2nd word */
145 if (*((unsigned short *)(ptr + offset + 2)) == 0x4752){ 148 if (*((unsigned short *)(ptr + offset + 2)) == 0x4752) {
146 /* set the pointer past the offset & block id */ 149 /* set the pointer past the offset & block id */
147 rio_table_hdr = (struct rio_table_hdr *)(ptr + offset + 4); 150 rio_table_hdr = (struct rio_table_hdr *)(ptr + offset + 4);
148 break; 151 break;
@@ -150,7 +153,7 @@ void __init setup_summit(void)
150 /* The next offset is stored in the 1st word. 0 means no more */ 153 /* The next offset is stored in the 1st word. 0 means no more */
151 offset = *((unsigned short *)(ptr + offset)); 154 offset = *((unsigned short *)(ptr + offset));
152 } 155 }
153 if (!rio_table_hdr){ 156 if (!rio_table_hdr) {
154 printk(KERN_ERR "%s: Unable to locate Rio Grande Table in EBDA - bailing!\n", __FUNCTION__); 157 printk(KERN_ERR "%s: Unable to locate Rio Grande Table in EBDA - bailing!\n", __FUNCTION__);
155 return; 158 return;
156 } 159 }
@@ -161,8 +164,8 @@ void __init setup_summit(void)
161 /* The first Winnipeg we're looking for has an index of 0 */ 164 /* The first Winnipeg we're looking for has an index of 0 */
162 next_wpeg = 0; 165 next_wpeg = 0;
163 do { 166 do {
164 for(i = 0; i < rio_table_hdr->num_rio_dev; i++){ 167 for (i = 0; i < rio_table_hdr->num_rio_dev; i++) {
165 if (is_WPEG(rio_devs[i]) && rio_devs[i]->WP_index == next_wpeg){ 168 if (is_WPEG(rio_devs[i]) && rio_devs[i]->WP_index == next_wpeg) {
166 /* It's the Winnipeg we're looking for! */ 169 /* It's the Winnipeg we're looking for! */
167 next_bus = setup_pci_node_map_for_wpeg(i, next_bus); 170 next_bus = setup_pci_node_map_for_wpeg(i, next_bus);
168 next_wpeg++; 171 next_wpeg++;