[haiku-commits] r36189 - in haiku/trunk: headers/private/kernel/arch/x86 src/system/boot/platform/bios_ia32

  • From: mmlr@xxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 12 Apr 2010 17:59:41 +0200 (CEST)

Author: mmlr
Date: 2010-04-12 17:59:40 +0200 (Mon, 12 Apr 2010)
New Revision: 36189
Changeset: http://dev.haiku-os.org/changeset/36189/haiku

Modified:
   haiku/trunk/headers/private/kernel/arch/x86/apic.h
   haiku/trunk/src/system/boot/platform/bios_ia32/smp.cpp
Log:
* Fix build, the APIC definitions are used in the bootloader too.
* Automatic whitespace cleanup.


Modified: haiku/trunk/headers/private/kernel/arch/x86/apic.h
===================================================================
--- haiku/trunk/headers/private/kernel/arch/x86/apic.h  2010-04-12 15:25:08 UTC 
(rev 36188)
+++ haiku/trunk/headers/private/kernel/arch/x86/apic.h  2010-04-12 15:59:40 UTC 
(rev 36189)
@@ -107,6 +107,8 @@
 #define IOAPIC_REDIR_TABLE             0x10
 */
 
+#if !_BOOT_MODE
+
 bool           apic_available();
 uint32         apic_read(uint32 offset);
 void           apic_write(uint32 offset, uint32 data);
@@ -116,4 +118,6 @@
 status_t       apic_init(kernel_args *args);
 status_t       apic_per_cpu_init(kernel_args *args, int32 cpu);
 
+#endif // !_BOOT_MODE
+
 #endif /* _KERNEL_ARCH_x86_APIC_H */

Modified: haiku/trunk/src/system/boot/platform/bios_ia32/smp.cpp
===================================================================
--- haiku/trunk/src/system/boot/platform/bios_ia32/smp.cpp      2010-04-12 
15:25:08 UTC (rev 36188)
+++ haiku/trunk/src/system/boot/platform/bios_ia32/smp.cpp      2010-04-12 
15:59:40 UTC (rev 36189)
@@ -18,8 +18,9 @@
 #include <safemode.h>
 #include <boot/stage2.h>
 #include <boot/menu.h>
+#include <arch/x86/apic.h>
 #include <arch/x86/arch_acpi.h>
-#include <arch/x86/arch_apic.h>
+#include <arch/x86/arch_smp.h>
 #include <arch/x86/arch_system_info.h>
 
 #include "mmu.h"
@@ -393,12 +394,12 @@
                TRACE(("smp disabled per safemode setting\n"));
                gKernelArgs.num_cpus = 1;
        }
-       
+
        if (get_safemode_boolean(B_SAFEMODE_DISABLE_APIC, false)) {
                TRACE(("local apic disabled per safemode setting\n"));
                gKernelArgs.arch_args.apic_phys = 0;
        }
-       
+
        if (gKernelArgs.arch_args.apic_phys == 0)
                return;
 
@@ -585,14 +586,14 @@
                item->SetHelpText("Disables using the IO APIC for interrupt 
handling, "
                        "forcing instead the use of the PIC.");
        }
-#endif                 
+#endif
        if (gKernelArgs.arch_args.apic_phys != 0) {
                menu->AddItem(item = new(nothrow) MenuItem("Disable LOCAL 
APIC"));
                item->SetType(MENU_ITEM_MARKABLE);
                item->SetData(B_SAFEMODE_DISABLE_APIC);
                item->SetHelpText("Disables using the LOCAL APIC for 
timekeeping.");
        }
-       
+
        if (gKernelArgs.num_cpus < 2)
                return;
 


Other related posts:

  • » [haiku-commits] r36189 - in haiku/trunk: headers/private/kernel/arch/x86 src/system/boot/platform/bios_ia32 - mmlr