search for: __volatile

Displaying 20 results from an estimated 54 matches for "__volatile".

2007 Apr 18
0
[PATCH 5/12] desc-cleanup
...================== --- linux-2.6.13.orig/include/asm-i386/desc.h 2005-08-08 17:10:49.000000000 -0700 +++ linux-2.6.13/include/asm-i386/desc.h 2005-08-08 17:15:46.000000000 -0700 @@ -31,18 +31,18 @@ extern struct Xgt_desc_struct idt_descr, cpu_gdt_descr[NR_CPUS]; -#define load_TR_desc() __asm__ __volatile__("ltr %w0"::"q" (GDT_ENTRY_TSS*8)) -#define load_LDT_desc() __asm__ __volatile__("lldt %w0"::"q" (GDT_ENTRY_LDT*8)) +#define load_TR_desc() asm volatile("ltr %w0"::"q" (GDT_ENTRY_TSS*8)) +#define load_LDT_desc() asm volatile("lldt %w...
2007 Apr 18
0
[PATCH 5/12] desc-cleanup
...================== --- linux-2.6.13.orig/include/asm-i386/desc.h 2005-08-08 17:10:49.000000000 -0700 +++ linux-2.6.13/include/asm-i386/desc.h 2005-08-08 17:15:46.000000000 -0700 @@ -31,18 +31,18 @@ extern struct Xgt_desc_struct idt_descr, cpu_gdt_descr[NR_CPUS]; -#define load_TR_desc() __asm__ __volatile__("ltr %w0"::"q" (GDT_ENTRY_TSS*8)) -#define load_LDT_desc() __asm__ __volatile__("lldt %w0"::"q" (GDT_ENTRY_LDT*8)) +#define load_TR_desc() asm volatile("ltr %w0"::"q" (GDT_ENTRY_TSS*8)) +#define load_LDT_desc() asm volatile("lldt %w...
2007 Apr 18
1
[PATCH 4/14] i386 / Clean up asm and volatile keywords in desc
...==== --- linux-2.6.13.orig/include/asm-i386/mach-default/mach_desc.h 2005-08-09 18:38:14.000000000 -0700 +++ linux-2.6.13/include/asm-i386/mach-default/mach_desc.h 2005-08-10 20:42:03.000000000 -0700 @@ -24,30 +24,30 @@ #ifndef __MACH_DESC_H #define __MACH_DESC_H -#define load_TR_desc() __asm__ __volatile__("ltr %w0"::"q" (GDT_ENTRY_TSS*8)) -#define load_LDT_desc() __asm__ __volatile__("lldt %w0"::"q" (GDT_ENTRY_LDT*8)) +#define load_TR_desc() asm volatile("ltr %w0"::"q" (GDT_ENTRY_TSS*8)) +#define load_LDT_desc() asm volatile("lldt %w...
2007 Apr 18
1
[PATCH 4/14] i386 / Clean up asm and volatile keywords in desc
...==== --- linux-2.6.13.orig/include/asm-i386/mach-default/mach_desc.h 2005-08-09 18:38:14.000000000 -0700 +++ linux-2.6.13/include/asm-i386/mach-default/mach_desc.h 2005-08-10 20:42:03.000000000 -0700 @@ -24,30 +24,30 @@ #ifndef __MACH_DESC_H #define __MACH_DESC_H -#define load_TR_desc() __asm__ __volatile__("ltr %w0"::"q" (GDT_ENTRY_TSS*8)) -#define load_LDT_desc() __asm__ __volatile__("lldt %w0"::"q" (GDT_ENTRY_LDT*8)) +#define load_TR_desc() asm volatile("ltr %w0"::"q" (GDT_ENTRY_TSS*8)) +#define load_LDT_desc() asm volatile("lldt %w...
2007 Apr 18
3
[RFC, PATCH 10/24] i386 Vmi descriptor changes
...386/kernel/traps.c 2006-03-10 12:55:09.000000000 -0800 +++ linux-2.6.16-rc5/arch/i386/kernel/traps.c 2006-03-10 16:01:06.000000000 -0800 @@ -1043,20 +1043,6 @@ void __init trap_init_f00f_bug(void) } #endif -#define _set_gate(gate_addr,type,dpl,addr,seg) \ -do { \ - int __d0, __d1; \ - __asm__ __volatile__ ("movw %%dx,%%ax\n\t" \ - "movw %4,%%dx\n\t" \ - "movl %%eax,%0\n\t" \ - "movl %%edx,%1" \ - :"=m" (*((long *) (gate_addr))), \ - "=m" (*(1+(long *) (gate_addr))), "=&a" (__d0), "=&d" (__d1) \ - :"i&quot...
2007 Apr 18
3
[RFC, PATCH 10/24] i386 Vmi descriptor changes
...386/kernel/traps.c 2006-03-10 12:55:09.000000000 -0800 +++ linux-2.6.16-rc5/arch/i386/kernel/traps.c 2006-03-10 16:01:06.000000000 -0800 @@ -1043,20 +1043,6 @@ void __init trap_init_f00f_bug(void) } #endif -#define _set_gate(gate_addr,type,dpl,addr,seg) \ -do { \ - int __d0, __d1; \ - __asm__ __volatile__ ("movw %%dx,%%ax\n\t" \ - "movw %4,%%dx\n\t" \ - "movl %%eax,%0\n\t" \ - "movl %%edx,%1" \ - :"=m" (*((long *) (gate_addr))), \ - "=m" (*(1+(long *) (gate_addr))), "=&a" (__d0), "=&d" (__d1) \ - :"i&quot...
2020 Jul 28
2
_mm_lfence in both pathes of an if/else are hoisted by SimplfyCFG potentially breaking use as a speculation barrier
...mm_lfence(); bar(); } else { _mm_lfence(); baz(); } } Alternatively, I also tried replacing the intrinsics with inline assembly. SimplifyCFG still merged those. But gcc did not. https://godbolt.org/z/acnPxY void bar(); void baz(); void foo(int c) { if (c) { __asm__ __volatile ("lfence"); bar(); } else { __asm__ __volatile ("lfence"); baz(); } } I believe the [[clang::nomerge]] attribute was recently extended to inline assembly which can be used to prevent the inline assembly from being hoisted by SimplifyCFG https://reviews.llv...
2007 Apr 18
3
[PATCH 1/4] x86 paravirt_ops: create no_paravirt.h for native ops
...=== --- a/include/asm-i386/irqflags.h +++ b/include/asm-i386/irqflags.h @@ -9,62 +9,12 @@ */ #ifndef _ASM_IRQFLAGS_H #define _ASM_IRQFLAGS_H +#include <asm/paravirt.h> #ifndef __ASSEMBLY__ -static inline unsigned long __raw_local_save_flags(void) -{ - unsigned long flags; - - __asm__ __volatile__( - "pushfl ; popl %0" - : "=g" (flags) - : /* no input */ - ); - - return flags; -} - #define raw_local_save_flags(flags) \ do { (flags) = __raw_local_save_flags(); } while (0) - -static inline void raw_local_irq_restore(unsigned long flags) -{ - __asm__ __volatile__( -...
2007 Apr 18
3
[PATCH 1/4] x86 paravirt_ops: create no_paravirt.h for native ops
...=== --- a/include/asm-i386/irqflags.h +++ b/include/asm-i386/irqflags.h @@ -9,62 +9,12 @@ */ #ifndef _ASM_IRQFLAGS_H #define _ASM_IRQFLAGS_H +#include <asm/paravirt.h> #ifndef __ASSEMBLY__ -static inline unsigned long __raw_local_save_flags(void) -{ - unsigned long flags; - - __asm__ __volatile__( - "pushfl ; popl %0" - : "=g" (flags) - : /* no input */ - ); - - return flags; -} - #define raw_local_save_flags(flags) \ do { (flags) = __raw_local_save_flags(); } while (0) - -static inline void raw_local_irq_restore(unsigned long flags) -{ - __asm__ __volatile__( -...
2012 Nov 05
2
[LLVMdev] Unable to Run Inline Asm with MCJIT
...un a C program containing inline assembly using MCJIT but I am not able to. I have cloned and build LLVM-3.1. Below are more details. Arch : x86 OS : Linux ubuntu 2.6.35-22-generic Sample program : test_inline_asm.c ------------------- #include <stdio.h> int main(){ int a=0; __asm __volatile("movl $5,%%eax\t" "\n movl %%eax,%0":"=r"(a)::"cc","memory" ); printf("a= %d\n",a); } Commands ------------- clang -emit-llvm -S test_inline_asm.c lli -use-mcjit test_inline_asm.s throws, LLVM ERROR: Inline asm not supported...
2006 Jun 26
0
[klibc 25/43] ia64 support for klibc
...ter long _r8 asm ("r8"); \ + register long _r10 asm ("r10"); \ + register long _r15 asm ("r15") = __NR_##name; \ + long _retval; \ + __asm __volatile (__IA64_BREAK \ + : "=r" (_r8), "=r" (_r10), "=r" (_r15) \ + : "2" (_r15) ASM_ARGS_0 \ + : "memory" ASM_CLOBBERS...
2007 Apr 18
3
[PATCH] abstract out bits of ldt.c
Chris Wright wrote: >* Zachary Amsden (zach@vmware.com) wrote: > > >>Does Xen assume page aligned descriptor tables? I assume from this >> >> > >Yes. > > > >>patch and snippets I have gathered from others, that is a yes, and other >>things here imply that DT pages are not shadowed. If so, Xen itself >>must have live segments
2007 Apr 18
3
[PATCH] abstract out bits of ldt.c
Chris Wright wrote: >* Zachary Amsden (zach@vmware.com) wrote: > > >>Does Xen assume page aligned descriptor tables? I assume from this >> >> > >Yes. > > > >>patch and snippets I have gathered from others, that is a yes, and other >>things here imply that DT pages are not shadowed. If so, Xen itself >>must have live segments
2020 Aug 09
2
_mm_lfence in both pathes of an if/else are hoisted by SimplfyCFG potentially breaking use as a speculation barrier
...> > Alternatively, I also tried replacing the intrinsics with inline assembly. SimplifyCFG still merged those. But gcc did not. https://godbolt.org/z/acnPxY > > > > void bar(); > > void baz(); > > > > void foo(int c) { > > if (c) { > > __asm__ __volatile ("lfence"); > > bar(); > > } else { > > __asm__ __volatile ("lfence"); > > baz(); > > } > > } > > > > I believe the [[clang::nomerge]] attribute was recently extended to inline assembly which can be used to pr...
2012 Nov 05
0
[LLVMdev] Unable to Run Inline Asm with MCJIT
...m not able to. > > I have cloned and build LLVM-3.1. Below are more details. > > Arch : x86 > OS : Linux ubuntu 2.6.35-22-generic > > Sample program : test_inline_asm.c > ------------------- > #include <stdio.h> > int main(){ > int a=0; > __asm __volatile("movl $5,%%eax\t" > "\n movl %%eax,%0":"=r"(a)::"cc","memory" > ); > printf("a= %d\n",a); > } > > Commands > ------------- > clang -emit-llvm -S test_inline_asm.c > lli -use-mcjit test_inline_asm.s...
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
2008 Nov 24
1
RELENG_7 panic under load: vm_page_unwire: invalid wire count: 0
...fea28fd30, rbp = 0 --- Uptime: 36m47s Physical memory: 4087 MB Dumping 708 MB: 693 677 661 645 629 613 597 581 565 549 533 517 501 485 469 453 437 421 405 389 373 357 341 325 309 293 277 261 245 229 213 197 181 165 149 133 117 101 85 69 53 37 21 5 #0 doadump () at pcpu.h:195 195 __asm __volatile("movq %%gs:0,%0" : "=r" (td)); (kgdb) bt #0 doadump () at pcpu.h:195 #1 0xffffffff8031adf8 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:418 #2 0xffffffff8031b25c in panic (fmt=Variable "fmt" is not available. ) at /usr/src/sys/kern/kern_shutdown.c:574 #3...
2012 Nov 05
1
[LLVMdev] Unable to Run Inline Asm with MCJIT
...un a C program containing inline assembly using MCJIT but I am not able to. I have cloned and build LLVM-3.1. Below are more details. Arch : x86 OS : Linux ubuntu 2.6.35-22-generic Sample program : test_inline_asm.c ------------------- #include <stdio.h> int main(){ int a=0; __asm __volatile("movl $5,%%eax\t" "\n movl %%eax,%0":"=r"(a)::"cc","memory" ); printf("a= %d\n",a); } Commands ------------- clang -emit-llvm -S test_inline_asm.c lli -use-mcjit test_inline_asm.s throws, LLVM ERROR: Inline asm not supported...
2008 Oct 11
3
6.4-PRELEASE sporadically panicking with fatal trap 12
...fs.ko...done. Loaded symbols for /boot/kernel/smbfs.ko Reading symbols from /boot/kernel/libiconv.ko...done. Loaded symbols for /boot/kernel/libiconv.ko Reading symbols from /boot/kernel/libmchain.ko...done. Loaded symbols for /boot/kernel/libmchain.ko #0 doadump () at pcpu.h:165 165 __asm __volatile("movl %%fs:0,%0" : "=r" (td)); (kgdb) list *0xc05419e5 0xc05419e5 is in _mtx_lock_sleep (/usr/src/sys/kern/kern_mutex.c:548). 543 * If the current owner of the lock is executing on another 544 * CPU, spin instead of blocking. 545 */ 546 owner = (struct thread *)...