summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/mp_machdep.c10
-rw-r--r--sys/amd64/amd64/mptable.c10
-rw-r--r--sys/amd64/include/mptable.h10
3 files changed, 12 insertions, 18 deletions
diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c
index f8e77a1..50d1ce7 100644
--- a/sys/amd64/amd64/mp_machdep.c
+++ b/sys/amd64/amd64/mp_machdep.c
@@ -1155,12 +1155,10 @@ fix_mp_table(void)
*/
/* check the 1 PCI bus case for sanity */
- if (num_pci_bus == 1) {
-
- /* if it is number 0 all is well */
- if (bus_data[bus_pci].bus_id == 0)
- return;
-
+ /* if it is number 0 all is well */
+ if (num_pci_bus == 1 &&
+ bus_data[bus_pci].bus_id != 0) {
+
/* mis-numbered, swap with whichever bus uses slot 0 */
/* swap the bus entry types */
diff --git a/sys/amd64/amd64/mptable.c b/sys/amd64/amd64/mptable.c
index f8e77a1..50d1ce7 100644
--- a/sys/amd64/amd64/mptable.c
+++ b/sys/amd64/amd64/mptable.c
@@ -1155,12 +1155,10 @@ fix_mp_table(void)
*/
/* check the 1 PCI bus case for sanity */
- if (num_pci_bus == 1) {
-
- /* if it is number 0 all is well */
- if (bus_data[bus_pci].bus_id == 0)
- return;
-
+ /* if it is number 0 all is well */
+ if (num_pci_bus == 1 &&
+ bus_data[bus_pci].bus_id != 0) {
+
/* mis-numbered, swap with whichever bus uses slot 0 */
/* swap the bus entry types */
diff --git a/sys/amd64/include/mptable.h b/sys/amd64/include/mptable.h
index f8e77a1..50d1ce7 100644
--- a/sys/amd64/include/mptable.h
+++ b/sys/amd64/include/mptable.h
@@ -1155,12 +1155,10 @@ fix_mp_table(void)
*/
/* check the 1 PCI bus case for sanity */
- if (num_pci_bus == 1) {
-
- /* if it is number 0 all is well */
- if (bus_data[bus_pci].bus_id == 0)
- return;
-
+ /* if it is number 0 all is well */
+ if (num_pci_bus == 1 &&
+ bus_data[bus_pci].bus_id != 0) {
+
/* mis-numbered, swap with whichever bus uses slot 0 */
/* swap the bus entry types */
OpenPOWER on IntegriCloud