asm: Replace "__asm__ __volatile__" with "asm volatile"
In order to maintain the coding style consistency, it was requested to replace the methods that use "__asm__ __volatile__" with "asm volatile". Signed-off-by: Jesús Diéguez Fernández <jesusdf@gmail.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
parent
9a0703b559
commit
3611c4f42e
8 changed files with 17 additions and 17 deletions
|
@ -174,17 +174,17 @@ efiemu_memset (grub_uint8_t *a, grub_uint8_t b, grub_size_t n)
|
|||
static inline void
|
||||
write_cmos (grub_uint8_t addr, grub_uint8_t val)
|
||||
{
|
||||
__asm__ __volatile__ ("outb %%al,$0x70\n"
|
||||
"mov %%cl, %%al\n"
|
||||
"outb %%al,$0x71": :"a" (addr), "c" (val));
|
||||
asm volatile ("outb %%al,$0x70\n"
|
||||
"mov %%cl, %%al\n"
|
||||
"outb %%al,$0x71": :"a" (addr), "c" (val));
|
||||
}
|
||||
|
||||
static inline grub_uint8_t
|
||||
read_cmos (grub_uint8_t addr)
|
||||
{
|
||||
grub_uint8_t ret;
|
||||
__asm__ __volatile__ ("outb %%al, $0x70\n"
|
||||
"inb $0x71, %%al": "=a"(ret) :"a" (addr));
|
||||
asm volatile ("outb %%al, $0x70\n"
|
||||
"inb $0x71, %%al": "=a"(ret) :"a" (addr));
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ grub_halt (void)
|
|||
#endif
|
||||
|
||||
/* Disable interrupts. */
|
||||
__asm__ __volatile__ ("cli");
|
||||
asm volatile ("cli");
|
||||
|
||||
/* Bochs, QEMU, etc. Removed in newer QEMU releases. */
|
||||
for (i = 0; i < sizeof (bochs_shutdown) - 1; i++)
|
||||
|
|
|
@ -23,7 +23,7 @@ static __inline void
|
|||
grub_cpu_idle (void)
|
||||
{
|
||||
/* FIXME: this can't work until we handle interrupts. */
|
||||
/* __asm__ __volatile__ ("wfi"); */
|
||||
/* asm volatile ("wfi"); */
|
||||
}
|
||||
|
||||
#endif /* ! KERNEL_CPU_TIME_HEADER */
|
||||
|
|
|
@ -23,7 +23,7 @@ static __inline void
|
|||
grub_cpu_idle (void)
|
||||
{
|
||||
/* FIXME: this can't work until we handle interrupts. */
|
||||
/* __asm__ __volatile__ ("wfi"); */
|
||||
/* asm volatile ("wfi"); */
|
||||
}
|
||||
|
||||
#endif /* ! KERNEL_CPU_TIME_HEADER */
|
||||
|
|
|
@ -28,7 +28,7 @@ grub_inb (unsigned short int port)
|
|||
{
|
||||
unsigned char _v;
|
||||
|
||||
__asm__ __volatile__ ("inb %w1,%0":"=a" (_v):"Nd" (port));
|
||||
asm volatile ("inb %w1,%0":"=a" (_v):"Nd" (port));
|
||||
return _v;
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ grub_inw (unsigned short int port)
|
|||
{
|
||||
unsigned short _v;
|
||||
|
||||
__asm__ __volatile__ ("inw %w1,%0":"=a" (_v):"Nd" (port));
|
||||
asm volatile ("inw %w1,%0":"=a" (_v):"Nd" (port));
|
||||
return _v;
|
||||
}
|
||||
|
||||
|
@ -46,27 +46,27 @@ grub_inl (unsigned short int port)
|
|||
{
|
||||
unsigned int _v;
|
||||
|
||||
__asm__ __volatile__ ("inl %w1,%0":"=a" (_v):"Nd" (port));
|
||||
asm volatile ("inl %w1,%0":"=a" (_v):"Nd" (port));
|
||||
return _v;
|
||||
}
|
||||
|
||||
static __inline void
|
||||
grub_outb (unsigned char value, unsigned short int port)
|
||||
{
|
||||
__asm__ __volatile__ ("outb %b0,%w1": :"a" (value), "Nd" (port));
|
||||
asm volatile ("outb %b0,%w1": :"a" (value), "Nd" (port));
|
||||
}
|
||||
|
||||
static __inline void
|
||||
grub_outw (unsigned short int value, unsigned short int port)
|
||||
{
|
||||
__asm__ __volatile__ ("outw %w0,%w1": :"a" (value), "Nd" (port));
|
||||
asm volatile ("outw %w0,%w1": :"a" (value), "Nd" (port));
|
||||
|
||||
}
|
||||
|
||||
static __inline void
|
||||
grub_outl (unsigned int value, unsigned short int port)
|
||||
{
|
||||
__asm__ __volatile__ ("outl %0,%w1": :"a" (value), "Nd" (port));
|
||||
asm volatile ("outl %0,%w1": :"a" (value), "Nd" (port));
|
||||
}
|
||||
|
||||
#endif /* _SYS_IO_H */
|
||||
|
|
|
@ -23,7 +23,7 @@ static __inline void
|
|||
grub_cpu_idle (void)
|
||||
{
|
||||
/* FIXME: this can't work until we handle interrupts. */
|
||||
/* __asm__ __volatile__ ("hlt"); */
|
||||
/* asm volatile ("hlt"); */
|
||||
}
|
||||
|
||||
#endif /* ! KERNEL_CPU_TIME_HEADER */
|
||||
|
|
|
@ -46,7 +46,7 @@ grub_get_tsc (void)
|
|||
grub_cpuid (0,a,b,c,d);
|
||||
/* Read TSC value. We cannot use "=A", since this would use
|
||||
%rax on x86_64. */
|
||||
__asm__ __volatile__ ("rdtsc":"=a" (lo), "=d" (hi));
|
||||
asm volatile ("rdtsc":"=a" (lo), "=d" (hi));
|
||||
|
||||
return (((grub_uint64_t) hi) << 32) | lo;
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ static __inline void
|
|||
grub_cpu_idle (void)
|
||||
{
|
||||
/* FIXME: this can't work until we handle interrupts. */
|
||||
/* __asm__ __volatile__ ("hlt"); */
|
||||
/* asm volatile ("hlt"); */
|
||||
}
|
||||
|
||||
#endif /* ! KERNEL_CPU_TIME_HEADER */
|
||||
|
|
Loading…
Reference in a new issue