You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
507f90c9f9
This patch moves _set_gate and its users to desc.h. We can now use common code for x86_64 and i386. [ mingo@elte.hu: set_system_gate() fixes for nasty crashes. ] Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
28 lines
596 B
C
28 lines
596 B
C
#ifndef __ARCH_DESC_H
|
|
#define __ARCH_DESC_H
|
|
|
|
#include <asm/ldt.h>
|
|
#include <asm/segment.h>
|
|
#include <asm/desc_defs.h>
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
#include <linux/preempt.h>
|
|
#include <linux/percpu.h>
|
|
|
|
static inline void __set_tss_desc(unsigned int cpu, unsigned int entry, const void *addr)
|
|
{
|
|
tss_desc tss;
|
|
pack_descriptor(&tss, (unsigned long)addr,
|
|
offsetof(struct tss_struct, __cacheline_filler) - 1,
|
|
DESC_TSS, 0);
|
|
write_gdt_entry(get_cpu_gdt_table(cpu), entry, &tss, DESC_TSS);
|
|
}
|
|
|
|
|
|
#define set_tss_desc(cpu,addr) __set_tss_desc(cpu, GDT_ENTRY_TSS, addr)
|
|
|
|
#endif /* !__ASSEMBLY__ */
|
|
|
|
#endif
|