diff options
author | Damien Zammit <damien@zamaudio.com> | 2023-02-14 00:06:54 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-02-14 00:06:54 +0100 |
commit | 544071f200124fafd4fe7628c54f124e8577ca82 (patch) | |
tree | f0e0ef8a706126c3d6a65e21ee3f5dcd40759e26 /linux | |
parent | f9ebee5589f8056ef52c6ecfdf7d6e10f4d34d1c (diff) | |
download | gnumach-544071f200124fafd4fe7628c54f124e8577ca82.tar.gz gnumach-544071f200124fafd4fe7628c54f124e8577ca82.tar.bz2 gnumach-544071f200124fafd4fe7628c54f124e8577ca82.zip |
Make curr_ipl[] per cpu
Diffstat (limited to 'linux')
-rw-r--r-- | linux/dev/arch/i386/kernel/irq.c | 4 | ||||
-rw-r--r-- | linux/dev/include/asm-i386/system.h | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/linux/dev/arch/i386/kernel/irq.c b/linux/dev/arch/i386/kernel/irq.c index c10888e3..73802c45 100644 --- a/linux/dev/arch/i386/kernel/irq.c +++ b/linux/dev/arch/i386/kernel/irq.c @@ -343,7 +343,7 @@ probe_irq_on (void) unsigned i, irqs = 0; unsigned long delay; - assert (curr_ipl == 0); + assert (curr_ipl[cpu_number()] == 0); /* * Allocate all available IRQs. @@ -374,7 +374,7 @@ probe_irq_off (unsigned long irqs) { unsigned int i; - assert (curr_ipl == 0); + assert (curr_ipl[cpu_number()] == 0); irqs &= linux_pic_mask; diff --git a/linux/dev/include/asm-i386/system.h b/linux/dev/include/asm-i386/system.h index 41eb65a4..ac091e27 100644 --- a/linux/dev/include/asm-i386/system.h +++ b/linux/dev/include/asm-i386/system.h @@ -1,7 +1,8 @@ #ifndef __ASM_SYSTEM_H #define __ASM_SYSTEM_H -#include <i386/ipl.h> /* curr_ipl, splx */ +#include <i386/ipl.h> /* curr_ipl[], splx */ +#include <i386/cpu_number.h> #include <asm/segment.h> @@ -225,7 +226,7 @@ static inline unsigned long __xchg(unsigned long x, void * ptr, int size) #define mb() __asm__ __volatile__ ("" : : :"memory") #define __sti() __asm__ __volatile__ ("sti": : :"memory") #define __cli() __asm__ __volatile__ ("cli": : :"memory") -#define __save_flags(x) (x = ((curr_ipl > 0) ? 0 : (1 << 9))) +#define __save_flags(x) (x = ((curr_ipl[cpu_number()] > 0) ? 0 : (1 << 9))) #define __restore_flags(x) splx((x & (1 << 9)) ? 0 : 7) #ifdef __SMP__ |