Changeset dc5c303 in mainline for kernel/generic/src/cpu/cpu.c


Ignore:
Timestamp:
2023-12-28T13:59:23Z (2 years ago)
Author:
GitHub <noreply@…>
Children:
6b66de6b
Parents:
42c2e65 (diff), f87ff8e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
boba-buba <120932204+boba-buba@…> (2023-12-28 13:59:23)
git-committer:
GitHub <noreply@…> (2023-12-28 13:59:23)
Message:

Merge branch 'master' into topic/packet-capture

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/cpu/cpu.c

    r42c2e65 rdc5c303  
    4545#include <config.h>
    4646#include <panic.h>
    47 #include <mem.h>
     47#include <memw.h>
    4848#include <adt/list.h>
    4949#include <stdio.h>
     
    8484                        cpus[i].id = i;
    8585
    86                         irq_spinlock_initialize(&cpus[i].lock, "cpus[].lock");
     86#ifdef CONFIG_FPU_LAZY
     87                        irq_spinlock_initialize(&cpus[i].fpu_lock, "cpus[].fpu_lock");
     88#endif
     89                        irq_spinlock_initialize(&cpus[i].tlb_lock, "cpus[].tlb_lock");
    8790
    8891                        for (unsigned int j = 0; j < RQ_COUNT; j++) {
     
    103106        CPU->idle = false;
    104107        CPU->last_cycle = get_cycle();
    105         CPU->idle_cycles = 0;
    106         CPU->busy_cycles = 0;
     108        CPU->idle_cycles = ATOMIC_TIME_INITIALIZER();
     109        CPU->busy_cycles = ATOMIC_TIME_INITIALIZER();
    107110
    108111        cpu_identify();
Note: See TracChangeset for help on using the changeset viewer.