kernel: Use SMP_MAX_CPUS instead of B_MAX_CPU_COUNT

This commit is contained in:
Pawel Dziepak
2013-12-06 19:53:56 +01:00
parent 3e0e3be760
commit e6ea745e81
9 changed files with 15 additions and 15 deletions
@@ -28,7 +28,7 @@
#include "interrupts.h"
static interrupt_descriptor* sIDTs[B_MAX_CPU_COUNT];
static interrupt_descriptor* sIDTs[SMP_MAX_CPUS];
// table with functions handling respective interrupts
typedef void interrupt_handler_function(struct iframe* frame);
+2 -2
View File
@@ -34,8 +34,8 @@
#endif
static uint32 sCPUAPICIds[B_MAX_CPU_COUNT];
static uint32 sAPICVersions[B_MAX_CPU_COUNT];
static uint32 sCPUAPICIds[SMP_MAX_CPUS];
static uint32 sAPICVersions[SMP_MAX_CPUS];
static int32
@@ -168,7 +168,7 @@ private:
PhysicalPageSlot* fDebugSlot;
PhysicalPageSlotPool* fInitialPool;
LargeMemoryTranslationMapPhysicalPageMapper fKernelMapper;
PhysicalPageOpsCPUData fPerCPUData[B_MAX_CPU_COUNT];
PhysicalPageOpsCPUData fPerCPUData[SMP_MAX_CPUS];
};
static LargeMemoryPhysicalPageMapper sPhysicalPageMapper;
+2 -2
View File
@@ -81,7 +81,7 @@ void call_modules_hook(bool enter);
static void syslog_write(const char* text, int32 length, bool notify);
static arch_debug_registers sDebugRegisters[B_MAX_CPU_COUNT];
static arch_debug_registers sDebugRegisters[SMP_MAX_CPUS];
static debug_page_fault_info sPageFaultInfo;
@@ -143,7 +143,7 @@ static int32 sInDebugger = 0;
static bool sPreviousDprintfState;
static volatile bool sHandOverKDL = false;
static int32 sHandOverKDLToCPU = -1;
static bool sCPUTrapped[B_MAX_CPU_COUNT];
static bool sCPUTrapped[SMP_MAX_CPUS];
#define distance(a, b) ((a) < (b) ? (b) - (a) : (a) - (b))
+2 -2
View File
@@ -199,8 +199,8 @@ private:
bool fWaitObjectNotificationsRequested;
Thread* volatile fWaitingProfilerThread;
bool fProfilingActive;
bool fReentered[B_MAX_CPU_COUNT];
CPUProfileData fCPUData[B_MAX_CPU_COUNT];
bool fReentered[SMP_MAX_CPUS];
CPUProfileData fCPUData[SMP_MAX_CPUS];
WaitObject* fWaitObjectBuffer;
int32 fWaitObjectCount;
WaitObjectList fUsedWaitObjects;
+1 -1
View File
@@ -53,7 +53,7 @@
static port_id sDefaultDebuggerPort = -1;
// accessed atomically
static timer sProfilingTimers[B_MAX_CPU_COUNT];
static timer sProfilingTimers[SMP_MAX_CPUS];
// a profiling timer for each CPU -- used when a profiled thread is running
// on that CPU
+3 -3
View File
@@ -187,9 +187,9 @@ static const heap_class sHeapClasses[HEAP_CLASS_COUNT] = {
static uint32 sHeapCount;
static heap_allocator *sHeaps[HEAP_CLASS_COUNT * B_MAX_CPU_COUNT];
static uint32 *sLastGrowRequest[HEAP_CLASS_COUNT * B_MAX_CPU_COUNT];
static uint32 *sLastHandledGrowRequest[HEAP_CLASS_COUNT * B_MAX_CPU_COUNT];
static heap_allocator *sHeaps[HEAP_CLASS_COUNT * SMP_MAX_CPUS];
static uint32 *sLastGrowRequest[HEAP_CLASS_COUNT * SMP_MAX_CPUS];
static uint32 *sLastHandledGrowRequest[HEAP_CLASS_COUNT * SMP_MAX_CPUS];
static heap_allocator *sVIPHeap;
static heap_allocator *sGrowHeap = NULL;
+1 -1
View File
@@ -70,7 +70,7 @@ typedef BKernel::TeamThreadTable<Thread> ThreadHashTable;
// thread list
static Thread sIdleThreads[B_MAX_CPU_COUNT];
static Thread sIdleThreads[SMP_MAX_CPUS];
static ThreadHashTable sThreadHash;
static spinlock sThreadHashLock = B_SPINLOCK_INITIALIZER;
static thread_id sNextThreadID = 2;
+2 -2
View File
@@ -33,7 +33,7 @@ struct per_cpu_timer_data {
bigtime_t real_time_offset;
};
static per_cpu_timer_data sPerCPU[B_MAX_CPU_COUNT];
static per_cpu_timer_data sPerCPU[SMP_MAX_CPUS];
//#define TRACE_TIMER
@@ -383,7 +383,7 @@ cancel_timer(timer* event)
int cpu = event->cpu;
SpinLocker spinLocker;
while (true) {
if (cpu >= B_MAX_CPU_COUNT)
if (cpu >= SMP_MAX_CPUS)
return false;
spinLocker.SetTo(sPerCPU[cpu].lock, false);