search for: local_save_flag

Displaying 20 results from an estimated 51 matches for "local_save_flag".

Did you mean: local_save_flags
2008 Apr 22
3
[PATCH 0/3] ia64/pv_ops preparation
Hi. This patchset is preparation patches for ia64/pv_ops support. They are almost trivial and mainly make kernel paravirtualization friendly. thanks, Diffstat: arch/ia64/kernel/irq_ia64.c | 1 - include/asm-ia64/intrinsics.h | 11 +++++++++++ include/asm-ia64/mmu_context.h | 6 +----- include/asm-ia64/smp.h | 2 ++ include/asm-ia64/system.h | 10 ++++++++-- 5 files
2007 Apr 18
0
[RFC, PATCH 13/24] i386 Vmi system header
...__ __volatile__ ("wbinvd": : :"memory"); - static inline unsigned long get_limit(unsigned long segment) { unsigned long __limit; @@ -518,16 +459,7 @@ struct alt_instr { #define set_wmb(var, value) do { var = value; wmb(); } while (0) -/* interrupt control.. */ -#define local_save_flags(x) do { typecheck(unsigned long,x); __asm__ __volatile__("pushfl ; popl %0":"=g" (x): /* no input */); } while (0) -#define local_irq_restore(x) do { typecheck(unsigned long,x); __asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"g" (x):"memory&...
2007 Apr 18
0
[RFC, PATCH 13/24] i386 Vmi system header
...__ __volatile__ ("wbinvd": : :"memory"); - static inline unsigned long get_limit(unsigned long segment) { unsigned long __limit; @@ -518,16 +459,7 @@ struct alt_instr { #define set_wmb(var, value) do { var = value; wmb(); } while (0) -/* interrupt control.. */ -#define local_save_flags(x) do { typecheck(unsigned long,x); __asm__ __volatile__("pushfl ; popl %0":"=g" (x): /* no input */); } while (0) -#define local_irq_restore(x) do { typecheck(unsigned long,x); __asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"g" (x):"memory&...
2012 Dec 06
1
Question on local_irq_save/local_irq_retore
Hi, I have some confusion on local_irq_save() and local_irq_restore(). From the definitions, you can see that local_irq_save() calls local_irq_disable(). But why there is no local_irq_enable() in local_irq_restore? #define local_irq_save(x) ({ local_save_flags(x); local_irq_disable(); }) #define local_irq_restore(x) ({ BUILD_BUG_ON(sizeof(x) != sizeof(long)); asm volatile ( "push" __OS " %0 ; popf" __OS : : "g" (x) : "memory", "cc" ); }) -- Xinxin ___________________...
2007 Apr 18
0
[PATCH 7/12] gdt-accessor
...desc_struct *gdt; cpus = apm_save_cpus(); cpu = get_cpu(); - save_desc_40 = per_cpu(cpu_gdt_table, cpu)[0x40 / 8]; - per_cpu(cpu_gdt_table, cpu)[0x40 / 8] = bad_bios_desc; + gdt = get_cpu_gdt_table(cpu); + save_desc_40 = gdt[desc_number(0x40)]; + gdt[desc_number(0x40)] = bad_bios_desc; local_save_flags(flags); APM_DO_CLI; @@ -610,7 +612,7 @@ apm_bios_call_asm(func, ebx_in, ecx_in, eax, ebx, ecx, edx, esi); APM_DO_RESTORE_SEGS; local_irq_restore(flags); - per_cpu(cpu_gdt_table, cpu)[0x40 / 8] = save_desc_40; + gdt[desc_number(0x40)] = save_desc_40; put_cpu(); apm_restore_cpus(cpus);...
2007 Apr 18
0
[PATCH 7/12] gdt-accessor
...desc_struct *gdt; cpus = apm_save_cpus(); cpu = get_cpu(); - save_desc_40 = per_cpu(cpu_gdt_table, cpu)[0x40 / 8]; - per_cpu(cpu_gdt_table, cpu)[0x40 / 8] = bad_bios_desc; + gdt = get_cpu_gdt_table(cpu); + save_desc_40 = gdt[desc_number(0x40)]; + gdt[desc_number(0x40)] = bad_bios_desc; local_save_flags(flags); APM_DO_CLI; @@ -610,7 +612,7 @@ apm_bios_call_asm(func, ebx_in, ecx_in, eax, ebx, ecx, edx, esi); APM_DO_RESTORE_SEGS; local_irq_restore(flags); - per_cpu(cpu_gdt_table, cpu)[0x40 / 8] = save_desc_40; + gdt[desc_number(0x40)] = save_desc_40; put_cpu(); apm_restore_cpus(cpus);...
2007 Apr 18
1
[PATCH 2/3] Gdt_accessor
...desc_40; + struct desc_struct *gdt; cpus = apm_save_cpus(); cpu = get_cpu(); - save_desc_40 = per_cpu(cpu_gdt_table, cpu)[0x40 / 8]; - per_cpu(cpu_gdt_table, cpu)[0x40 / 8] = bad_bios_desc; + gdt = get_cpu_gdt_table(cpu); + save_desc_40 = gdt[0x40 / 8]; + gdt[0x40 / 8] = bad_bios_desc; local_save_flags(flags); APM_DO_CLI; @@ -610,7 +612,7 @@ static u8 apm_bios_call(u32 func, u32 eb apm_bios_call_asm(func, ebx_in, ecx_in, eax, ebx, ecx, edx, esi); APM_DO_RESTORE_SEGS; local_irq_restore(flags); - per_cpu(cpu_gdt_table, cpu)[0x40 / 8] = save_desc_40; + gdt[0x40 / 8] = save_desc_40; put_cp...
2007 Apr 18
1
[PATCH 2/3] Gdt_accessor
...desc_40; + struct desc_struct *gdt; cpus = apm_save_cpus(); cpu = get_cpu(); - save_desc_40 = per_cpu(cpu_gdt_table, cpu)[0x40 / 8]; - per_cpu(cpu_gdt_table, cpu)[0x40 / 8] = bad_bios_desc; + gdt = get_cpu_gdt_table(cpu); + save_desc_40 = gdt[0x40 / 8]; + gdt[0x40 / 8] = bad_bios_desc; local_save_flags(flags); APM_DO_CLI; @@ -610,7 +612,7 @@ static u8 apm_bios_call(u32 func, u32 eb apm_bios_call_asm(func, ebx_in, ecx_in, eax, ebx, ecx, edx, esi); APM_DO_RESTORE_SEGS; local_irq_restore(flags); - per_cpu(cpu_gdt_table, cpu)[0x40 / 8] = save_desc_40; + gdt[0x40 / 8] = save_desc_40; put_cp...
2007 Apr 18
2
[PATCH 4/21] i386 Broken bios common
...tatic char driver_version[] = "1.16ac"; /* no spaces */ @@ -593,7 +592,7 @@ static u8 apm_bios_call(u32 func, u32 eb cpu = get_cpu(); gdt = get_cpu_gdt_table(cpu); save_desc_40 = gdt[0x40 / 8]; - gdt[0x40 / 8] = bad_bios_desc; + gdt[0x40 / 8] = gdt[GDT_ENTRY_BAD_BIOS_CACHE]; local_save_flags(flags); APM_DO_CLI; @@ -637,7 +636,7 @@ static u8 apm_bios_call_simple(u32 func, cpu = get_cpu(); gdt = get_cpu_gdt_table(cpu); save_desc_40 = gdt[0x40 / 8]; - gdt[0x40 / 8] = bad_bios_desc; + gdt[0x40 / 8] = gdt[GDT_ENTRY_BAD_BIOS_CACHE]; local_save_flags(flags); APM_DO_CLI; @@ -227...
2007 Apr 18
2
[PATCH 4/21] i386 Broken bios common
...tatic char driver_version[] = "1.16ac"; /* no spaces */ @@ -593,7 +592,7 @@ static u8 apm_bios_call(u32 func, u32 eb cpu = get_cpu(); gdt = get_cpu_gdt_table(cpu); save_desc_40 = gdt[0x40 / 8]; - gdt[0x40 / 8] = bad_bios_desc; + gdt[0x40 / 8] = gdt[GDT_ENTRY_BAD_BIOS_CACHE]; local_save_flags(flags); APM_DO_CLI; @@ -637,7 +636,7 @@ static u8 apm_bios_call_simple(u32 func, cpu = get_cpu(); gdt = get_cpu_gdt_table(cpu); save_desc_40 = gdt[0x40 / 8]; - gdt[0x40 / 8] = bad_bios_desc; + gdt[0x40 / 8] = gdt[GDT_ENTRY_BAD_BIOS_CACHE]; local_save_flags(flags); APM_DO_CLI; @@ -227...
2007 Apr 18
2
[PATCH 8/14] i386 / Add a per cpu gdt accessor
..._struct *gdt; cpus = apm_save_cpus(); cpu = get_cpu(); - save_desc_40 = per_cpu(cpu_gdt_table, cpu)[0x40 / 8]; - per_cpu(cpu_gdt_table, cpu)[0x40 / 8] = bad_bios_desc; + gdt = get_cpu_gdt_table(cpu); + save_desc_40 = gdt[segment_index(0x40)]; + gdt[segment_index(0x40)] = bad_bios_desc; local_save_flags(flags); APM_DO_CLI; @@ -610,7 +612,7 @@ apm_bios_call_asm(func, ebx_in, ecx_in, eax, ebx, ecx, edx, esi); APM_DO_RESTORE_SEGS; local_irq_restore(flags); - per_cpu(cpu_gdt_table, cpu)[0x40 / 8] = save_desc_40; + gdt[segment_index(0x40)] = save_desc_40; put_cpu(); apm_restore_cpus(cpus);...
2007 Apr 18
2
[PATCH 8/14] i386 / Add a per cpu gdt accessor
..._struct *gdt; cpus = apm_save_cpus(); cpu = get_cpu(); - save_desc_40 = per_cpu(cpu_gdt_table, cpu)[0x40 / 8]; - per_cpu(cpu_gdt_table, cpu)[0x40 / 8] = bad_bios_desc; + gdt = get_cpu_gdt_table(cpu); + save_desc_40 = gdt[segment_index(0x40)]; + gdt[segment_index(0x40)] = bad_bios_desc; local_save_flags(flags); APM_DO_CLI; @@ -610,7 +612,7 @@ apm_bios_call_asm(func, ebx_in, ecx_in, eax, ebx, ecx, edx, esi); APM_DO_RESTORE_SEGS; local_irq_restore(flags); - per_cpu(cpu_gdt_table, cpu)[0x40 / 8] = save_desc_40; + gdt[segment_index(0x40)] = save_desc_40; put_cpu(); apm_restore_cpus(cpus);...
2007 Apr 18
1
[PATCH 7/21] i386 Losing fs gs to bios
...ct *gdt; + unsigned long flags; + cpumask_t cpus; + struct bios_segment_save save_area; cpus = apm_save_cpus(); - cpu = get_cpu(); - gdt = get_cpu_gdt_table(cpu); - save_desc_40 = gdt[0x40 / 8]; - gdt[0x40 / 8] = gdt[GDT_ENTRY_BAD_BIOS_CACHE]; - + prepare_bios_segments(&save_area); local_save_flags(flags); APM_DO_CLI; - APM_DO_SAVE_SEGS; apm_bios_call_asm(func, ebx_in, ecx_in, eax, ebx, ecx, edx, esi); - APM_DO_RESTORE_SEGS; local_irq_restore(flags); - gdt[0x40 / 8] = save_desc_40; - put_cpu(); + restore_bios_segments(&save_area); apm_restore_cpus(cpus); return *eax & 0x...
2007 Apr 18
1
[PATCH 7/21] i386 Losing fs gs to bios
...ct *gdt; + unsigned long flags; + cpumask_t cpus; + struct bios_segment_save save_area; cpus = apm_save_cpus(); - cpu = get_cpu(); - gdt = get_cpu_gdt_table(cpu); - save_desc_40 = gdt[0x40 / 8]; - gdt[0x40 / 8] = gdt[GDT_ENTRY_BAD_BIOS_CACHE]; - + prepare_bios_segments(&save_area); local_save_flags(flags); APM_DO_CLI; - APM_DO_SAVE_SEGS; apm_bios_call_asm(func, ebx_in, ecx_in, eax, ebx, ecx, edx, esi); - APM_DO_RESTORE_SEGS; local_irq_restore(flags); - gdt[0x40 / 8] = save_desc_40; - put_cpu(); + restore_bios_segments(&save_area); apm_restore_cpus(cpus); return *eax & 0x...
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 16/17] paravirt_ops - touch ups
...+74,11 @@ #endif /* CONFIG_TRACE_IRQFLAGS_SUPPORT */ #ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT -static inline void safe_halt(void) -{ - trace_hardirqs_on(); - raw_safe_halt(); -} +#define safe_halt() \ + do { \ + trace_hardirqs_on(); \ + raw_safe_halt(); \ + } while (0) #define local_save_flags(flags) raw_local_save_flags(flags) --
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 16/17] paravirt_ops - touch ups
...+74,11 @@ #endif /* CONFIG_TRACE_IRQFLAGS_SUPPORT */ #ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT -static inline void safe_halt(void) -{ - trace_hardirqs_on(); - raw_safe_halt(); -} +#define safe_halt() \ + do { \ + trace_hardirqs_on(); \ + raw_safe_halt(); \ + } while (0) #define local_save_flags(flags) raw_local_save_flags(flags) --
2020 Jul 06
0
[PATCH v3 3/6] powerpc: move spinlock implementation to simple_spinlock
...sor()) + splpar_spin_yield(lock); + } while (unlikely(lock->slock != 0)); + HMT_medium(); + } +} + +static inline +void arch_spin_lock_flags(arch_spinlock_t *lock, unsigned long flags) +{ + unsigned long flags_dis; + + while (1) { + if (likely(__arch_spin_trylock(lock) == 0)) + break; + local_save_flags(flags_dis); + local_irq_restore(flags); + do { + HMT_low(); + if (is_shared_processor()) + splpar_spin_yield(lock); + } while (unlikely(lock->slock != 0)); + HMT_medium(); + local_irq_restore(flags_dis); + } +} +#define arch_spin_lock_flags arch_spin_lock_flags + +static inline void...
2007 Apr 18
2
[PATCH 1/3] Paravirtualization: Kernel Ring Cleanups
Hi all, I've been looking at finding common ground between the VMI, Xen and other paravirtualization approaches, and after some discussion, we're getting somewhere. These first two patches are the fundamentals, stolen mainly from the VMI patches: removing assumptions about the kernel running in ring 0, and macro-izing all the obvious para-virtualize-needing insns. The third patch is
2007 Apr 18
2
[PATCH 1/3] Paravirtualization: Kernel Ring Cleanups
Hi all, I've been looking at finding common ground between the VMI, Xen and other paravirtualization approaches, and after some discussion, we're getting somewhere. These first two patches are the fundamentals, stolen mainly from the VMI patches: removing assumptions about the kernel running in ring 0, and macro-izing all the obvious para-virtualize-needing insns. The third patch is
2013 Feb 22
48
[PATCH v3 00/46] initial arm v8 (64-bit) support
This round implements all of the review comments from V2 and all patches are now acked. Unless there are any objections I intend to apply later this morning. Ian.