diff options
author | Remy Noel <mocramis@gmail.com> | 2018-04-18 21:11:16 +0200 |
---|---|---|
committer | Remy Noel <mocramis@gmail.com> | 2018-04-18 21:11:16 +0200 |
commit | 6b3df26a8822b08f87a2aab5085d4e51c5168583 (patch) | |
tree | 66a15c26244ed0cdaee173ae931b899761cb69cd /arch/x86/machine | |
parent | 7f1d6dcb4317647a3fc06f7d95f751142d7c6f16 (diff) | |
parent | 3640f94ee392b19de48360d2d026a7f581447049 (diff) |
Merge branch 'master' into perfmon
Diffstat (limited to 'arch/x86/machine')
-rw-r--r-- | arch/x86/machine/acpi.h | 6 | ||||
-rw-r--r-- | arch/x86/machine/asm.h | 6 | ||||
-rw-r--r-- | arch/x86/machine/atcons.h | 6 | ||||
-rw-r--r-- | arch/x86/machine/atkbd.h | 6 | ||||
-rw-r--r-- | arch/x86/machine/atomic.h | 62 | ||||
-rw-r--r-- | arch/x86/machine/biosmem.h | 6 | ||||
-rw-r--r-- | arch/x86/machine/boot.h | 6 | ||||
-rw-r--r-- | arch/x86/machine/cga.h | 6 | ||||
-rw-r--r-- | arch/x86/machine/cpu.h | 18 | ||||
-rw-r--r-- | arch/x86/machine/elf.h | 6 | ||||
-rw-r--r-- | arch/x86/machine/io.h | 6 | ||||
-rw-r--r-- | arch/x86/machine/lapic.h | 6 | ||||
-rw-r--r-- | arch/x86/machine/multiboot.h | 6 | ||||
-rw-r--r-- | arch/x86/machine/page.h | 6 | ||||
-rw-r--r-- | arch/x86/machine/pic.h | 6 | ||||
-rw-r--r-- | arch/x86/machine/pit.h | 6 | ||||
-rw-r--r-- | arch/x86/machine/pmap.h | 6 | ||||
-rw-r--r-- | arch/x86/machine/pmem.h | 6 | ||||
-rw-r--r-- | arch/x86/machine/ssp.h | 6 | ||||
-rw-r--r-- | arch/x86/machine/strace.h | 6 | ||||
-rw-r--r-- | arch/x86/machine/string.h | 6 | ||||
-rw-r--r-- | arch/x86/machine/tcb.h | 6 | ||||
-rw-r--r-- | arch/x86/machine/trap.h | 6 | ||||
-rw-r--r-- | arch/x86/machine/types.h | 6 | ||||
-rw-r--r-- | arch/x86/machine/uart.h | 6 |
25 files changed, 109 insertions, 109 deletions
diff --git a/arch/x86/machine/acpi.h b/arch/x86/machine/acpi.h index 1f65fd6..cf46660 100644 --- a/arch/x86/machine/acpi.h +++ b/arch/x86/machine/acpi.h @@ -19,8 +19,8 @@ * specification v1.0. */ -#ifndef _X86_ACPI_H -#define _X86_ACPI_H +#ifndef X86_ACPI_H +#define X86_ACPI_H #include <kern/init.h> @@ -32,4 +32,4 @@ */ INIT_OP_DECLARE(acpi_setup); -#endif /* _X86_ACPI_H */ +#endif /* X86_ACPI_H */ diff --git a/arch/x86/machine/asm.h b/arch/x86/machine/asm.h index 204d6fe..44a0c6e 100644 --- a/arch/x86/machine/asm.h +++ b/arch/x86/machine/asm.h @@ -15,8 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _X86_ASM_H -#define _X86_ASM_H +#ifndef X86_ASM_H +#define X86_ASM_H #ifndef __ASSEMBLER__ #warning "asm.h included from a C file" @@ -39,4 +39,4 @@ x: #define ASM_END(x) \ .size x, . - x -#endif /* _X86_ASM_H */ +#endif /* X86_ASM_H */ diff --git a/arch/x86/machine/atcons.h b/arch/x86/machine/atcons.h index 0d4893a..1b4fb68 100644 --- a/arch/x86/machine/atcons.h +++ b/arch/x86/machine/atcons.h @@ -18,8 +18,8 @@ * AT console driver. */ -#ifndef _X86_ATCONS_H -#define _X86_ATCONS_H +#ifndef X86_ATCONS_H +#define X86_ATCONS_H #include <kern/init.h> @@ -52,4 +52,4 @@ INIT_OP_DECLARE(atcons_bootstrap); */ INIT_OP_DECLARE(atcons_setup); -#endif /* _X86_ATCONS_H */ +#endif /* X86_ATCONS_H */ diff --git a/arch/x86/machine/atkbd.h b/arch/x86/machine/atkbd.h index 9efeefb..646b2e2 100644 --- a/arch/x86/machine/atkbd.h +++ b/arch/x86/machine/atkbd.h @@ -18,8 +18,8 @@ * Tiny AT keyboard driver. */ -#ifndef _X86_ATKBD_H -#define _X86_ATKBD_H +#ifndef X86_ATKBD_H +#define X86_ATKBD_H #include <kern/init.h> @@ -29,4 +29,4 @@ */ INIT_OP_DECLARE(atkbd_setup); -#endif /* _X86_ATKBD_H */ +#endif /* X86_ATKBD_H */ diff --git a/arch/x86/machine/atomic.h b/arch/x86/machine/atomic.h index ce41358..36f0067 100644 --- a/arch/x86/machine/atomic.h +++ b/arch/x86/machine/atomic.h @@ -19,8 +19,8 @@ * Architecture-specific definitions for atomic operations. */ -#ifndef _X86_ATOMIC_H -#define _X86_ATOMIC_H +#ifndef X86_ATOMIC_H +#define X86_ATOMIC_H #ifndef KERN_ATOMIC_H #error "don't include <machine/atomic.h> directly, use <kern/atomic.h> instead" @@ -46,38 +46,38 @@ * Temporarily discard qualifiers when loading 64-bits values with a * compare-and-swap operation. */ -#define atomic_load_64(ptr, mo) \ -MACRO_BEGIN \ - uint64_t ret___ = 0; \ - \ - __atomic_compare_exchange_n((uint64_t *)(ptr), &ret___, 0, \ - false, mo, __ATOMIC_RELAXED); \ - ret___; \ +#define atomic_load_64(ptr, mo) \ +MACRO_BEGIN \ + uint64_t ret_ = 0; \ + \ + __atomic_compare_exchange_n((uint64_t *)(ptr), &ret_, 0, \ + false, mo, __ATOMIC_RELAXED); \ + ret_; \ MACRO_END -#define atomic_load(ptr, mo) \ - (typeof(*(ptr)))__builtin_choose_expr(sizeof(*(ptr)) == 8, \ - atomic_load_64(ptr, mo), \ +#define atomic_load(ptr, mo) \ + (typeof(*(ptr)))__builtin_choose_expr(sizeof(*(ptr)) == 8, \ + atomic_load_64(ptr, mo), \ __atomic_load_n(ptr, mo)) -#define atomic_store(ptr, val, mo) \ -MACRO_BEGIN \ - if (sizeof(*(ptr)) != 8) { \ - __atomic_store_n(ptr, val, mo); \ - } else { \ - typeof(*(ptr)) oval___, nval___; \ - bool done___; \ - \ - oval___ = *(ptr); \ - nval___ = (val); \ - \ - do { \ - done___ = __atomic_compare_exchange_n(ptr, &oval___, nval___, \ - false, mo, \ - __ATOMIC_RELAXED); \ - } while (!done___); \ - \ - } \ +#define atomic_store(ptr, val, mo) \ +MACRO_BEGIN \ + if (sizeof(*(ptr)) != 8) { \ + __atomic_store_n(ptr, val, mo); \ + } else { \ + typeof(*(ptr)) oval_, nval_; \ + bool done_; \ + \ + oval_ = *(ptr); \ + nval_ = (val); \ + \ + do { \ + done_ = __atomic_compare_exchange_n(ptr, &oval_, nval_, \ + false, mo, \ + __ATOMIC_RELAXED); \ + } while (!done_); \ + \ + } \ MACRO_END /* @@ -101,4 +101,4 @@ MACRO_END #endif /* __clang__ */ -#endif /* _X86_ATOMIC_H */ +#endif /* X86_ATOMIC_H */ diff --git a/arch/x86/machine/biosmem.h b/arch/x86/machine/biosmem.h index 2a701de..cff698d 100644 --- a/arch/x86/machine/biosmem.h +++ b/arch/x86/machine/biosmem.h @@ -15,8 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _X86_BIOSMEM_H -#define _X86_BIOSMEM_H +#ifndef X86_BIOSMEM_H +#define X86_BIOSMEM_H #include <stdbool.h> @@ -108,4 +108,4 @@ phys_addr_t biosmem_directmap_end(void); */ INIT_OP_DECLARE(biosmem_setup); -#endif /* _X86_BIOSMEM_H */ +#endif /* X86_BIOSMEM_H */ diff --git a/arch/x86/machine/boot.h b/arch/x86/machine/boot.h index c85c264..d30b3be 100644 --- a/arch/x86/machine/boot.h +++ b/arch/x86/machine/boot.h @@ -15,8 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _X86_BOOT_H -#define _X86_BOOT_H +#ifndef X86_BOOT_H +#define X86_BOOT_H #include <stdnoreturn.h> @@ -166,4 +166,4 @@ INIT_OP_DECLARE(boot_setup_shutdown); #endif /* __ASSEMBLER__ */ -#endif /* _X86_BOOT_H */ +#endif /* X86_BOOT_H */ diff --git a/arch/x86/machine/cga.h b/arch/x86/machine/cga.h index 2708ec4..f7ad539 100644 --- a/arch/x86/machine/cga.h +++ b/arch/x86/machine/cga.h @@ -18,8 +18,8 @@ * Tiny CGA driver. */ -#ifndef _X86_CGA_H -#define _X86_CGA_H +#ifndef X86_CGA_H +#define X86_CGA_H #include <kern/init.h> @@ -40,4 +40,4 @@ void cga_cursor_right(void); */ INIT_OP_DECLARE(cga_setup); -#endif /* _X86_CGA_H */ +#endif /* X86_CGA_H */ diff --git a/arch/x86/machine/cpu.h b/arch/x86/machine/cpu.h index 3b7db61..98c363f 100644 --- a/arch/x86/machine/cpu.h +++ b/arch/x86/machine/cpu.h @@ -15,8 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _X86_CPU_H -#define _X86_CPU_H +#ifndef X86_CPU_H +#define X86_CPU_H #include <limits.h> @@ -442,13 +442,13 @@ extern void *cpu_local_area; #define cpu_local_ptr(var) \ MACRO_BEGIN \ - typeof(var) *ptr___ = &(var); \ + typeof(var) *ptr_ = &(var); \ \ asm("add %%fs:%1, %0" \ - : "+r" (ptr___) \ + : "+r" (ptr_) \ : "m" (cpu_local_area)); \ \ - ptr___; \ + ptr_; \ MACRO_END #define cpu_local_var(var) (*cpu_local_ptr(var)) @@ -461,13 +461,13 @@ MACRO_END #define cpu_local_read(var) \ MACRO_BEGIN \ - typeof(var) val___; \ + typeof(var) val_; \ \ asm("mov %%fs:%1, %0" \ - : "=r" (val___) \ + : "=r" (val_) \ : "m" (var)); \ \ - val___; \ + val_; \ MACRO_END static inline struct cpu * @@ -721,4 +721,4 @@ INIT_OP_DECLARE(cpu_setup_shutdown); #endif /* __ASSEMBLER__ */ -#endif /* _X86_CPU_H */ +#endif /* X86_CPU_H */ diff --git a/arch/x86/machine/elf.h b/arch/x86/machine/elf.h index e0ea260..04df7e0 100644 --- a/arch/x86/machine/elf.h +++ b/arch/x86/machine/elf.h @@ -15,8 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _X86_ELF_H -#define _X86_ELF_H +#ifndef X86_ELF_H +#define X86_ELF_H #define ELF_SHT_SYMTAB 2 #define ELF_SHT_STRTAB 3 @@ -58,4 +58,4 @@ struct elf_sym { #endif /* __LP64__ */ -#endif /* _X86_ELF_H */ +#endif /* X86_ELF_H */ diff --git a/arch/x86/machine/io.h b/arch/x86/machine/io.h index fb566b9..8c48332 100644 --- a/arch/x86/machine/io.h +++ b/arch/x86/machine/io.h @@ -15,8 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _X86_IO_H -#define _X86_IO_H +#ifndef X86_IO_H +#define X86_IO_H #include <stdint.h> @@ -41,4 +41,4 @@ io_write_byte(uint16_t port, uint8_t value) asm volatile("outb %%al, %%dx" : : "d" (port), "a" (value)); } -#endif /* _X86_IO_H */ +#endif /* X86_IO_H */ diff --git a/arch/x86/machine/lapic.h b/arch/x86/machine/lapic.h index ae7abfe..6355da4 100644 --- a/arch/x86/machine/lapic.h +++ b/arch/x86/machine/lapic.h @@ -15,8 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _X86_LAPIC_H -#define _X86_LAPIC_H +#ifndef X86_LAPIC_H +#define X86_LAPIC_H #include <stdbool.h> #include <stdint.h> @@ -58,4 +58,4 @@ void lapic_timer_intr(struct trap_frame *frame); void lapic_error_intr(struct trap_frame *frame); void lapic_spurious_intr(struct trap_frame *frame); -#endif /* _X86_LAPIC_H */ +#endif /* X86_LAPIC_H */ diff --git a/arch/x86/machine/multiboot.h b/arch/x86/machine/multiboot.h index 80d793f..826ea2d 100644 --- a/arch/x86/machine/multiboot.h +++ b/arch/x86/machine/multiboot.h @@ -15,8 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _X86_MULTIBOOT_H -#define _X86_MULTIBOOT_H +#ifndef X86_MULTIBOOT_H +#define X86_MULTIBOOT_H /* * Magic number provided by the OS to the boot loader. @@ -108,4 +108,4 @@ struct multiboot_info { #endif /* __ASSEMBLER__ */ -#endif /* _X86_MULTIBOOT_H */ +#endif /* X86_MULTIBOOT_H */ diff --git a/arch/x86/machine/page.h b/arch/x86/machine/page.h index 43ab237..19ef7b5 100644 --- a/arch/x86/machine/page.h +++ b/arch/x86/machine/page.h @@ -19,11 +19,11 @@ * other headers that may cause circular dependencies. */ -#ifndef _X86_PAGE_H -#define _X86_PAGE_H +#ifndef X86_PAGE_H +#define X86_PAGE_H #define PAGE_SHIFT 12 #define PAGE_SIZE (1 << PAGE_SHIFT) #define PAGE_MASK (PAGE_SIZE - 1) -#endif /* _X86_PAGE_H */ +#endif /* X86_PAGE_H */ diff --git a/arch/x86/machine/pic.h b/arch/x86/machine/pic.h index 89833d0..4796cff 100644 --- a/arch/x86/machine/pic.h +++ b/arch/x86/machine/pic.h @@ -15,8 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _X86_PIC_H -#define _X86_PIC_H +#ifndef X86_PIC_H +#define X86_PIC_H /* * Interrupts per PIC. @@ -44,4 +44,4 @@ void pic_setup(void); */ void pic_setup_disabled(void); -#endif /* _X86_PIC_H */ +#endif /* X86_PIC_H */ diff --git a/arch/x86/machine/pit.h b/arch/x86/machine/pit.h index 7bf7a7b..a2caf0b 100644 --- a/arch/x86/machine/pit.h +++ b/arch/x86/machine/pit.h @@ -15,8 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _X86_PIT_H -#define _X86_PIT_H +#ifndef X86_PIT_H +#define X86_PIT_H /* * Initialize the PIT as a free running counter. @@ -37,4 +37,4 @@ void pit_setup(void); */ void pit_delay(unsigned long usecs); -#endif /* _X86_PIT_H */ +#endif /* X86_PIT_H */ diff --git a/arch/x86/machine/pmap.h b/arch/x86/machine/pmap.h index 369679f..3a6a120 100644 --- a/arch/x86/machine/pmap.h +++ b/arch/x86/machine/pmap.h @@ -18,8 +18,8 @@ * TODO Comment. */ -#ifndef _X86_PMAP_H -#define _X86_PMAP_H +#ifndef X86_PMAP_H +#define X86_PMAP_H #include <kern/macros.h> @@ -336,4 +336,4 @@ INIT_OP_DECLARE(pmap_setup); #endif /* __ASSEMBLER__ */ -#endif /* _X86_PMAP_H */ +#endif /* X86_PMAP_H */ diff --git a/arch/x86/machine/pmem.h b/arch/x86/machine/pmem.h index 33006a7..98b448d 100644 --- a/arch/x86/machine/pmem.h +++ b/arch/x86/machine/pmem.h @@ -21,8 +21,8 @@ * other headers that may cause circular dependencies. */ -#ifndef _X86_PMEM_H -#define _X86_PMEM_H +#ifndef X86_PMEM_H +#define X86_PMEM_H #include <kern/macros.h> @@ -64,4 +64,4 @@ #define PMEM_ZONE_HIGHMEM 2 #endif /* __LP64__ */ -#endif /* _X86_PMEM_H */ +#endif /* X86_PMEM_H */ diff --git a/arch/x86/machine/ssp.h b/arch/x86/machine/ssp.h index f278361..832e409 100644 --- a/arch/x86/machine/ssp.h +++ b/arch/x86/machine/ssp.h @@ -15,8 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _X86_SSP_H -#define _X86_SSP_H +#ifndef X86_SSP_H +#define X86_SSP_H #ifdef __LP64__ #define SSP_GUARD_WORD 0xdeadd00ddeadd00d @@ -29,4 +29,4 @@ */ #define SSP_WORD_TLS_OFFSET 5 -#endif /* _X86_SSP_H */ +#endif /* X86_SSP_H */ diff --git a/arch/x86/machine/strace.h b/arch/x86/machine/strace.h index b55f6b8..482768b 100644 --- a/arch/x86/machine/strace.h +++ b/arch/x86/machine/strace.h @@ -20,8 +20,8 @@ * TODO Make it possible to debug without the frame pointer. */ -#ifndef _X86_STRACE_H -#define _X86_STRACE_H +#ifndef X86_STRACE_H +#define X86_STRACE_H #include <kern/init.h> #include <kern/macros.h> @@ -61,4 +61,4 @@ void strace_set_mbi(const struct multiboot_raw_info *mbi); */ INIT_OP_DECLARE(strace_setup); -#endif /* _X86_STRACE_H */ +#endif /* X86_STRACE_H */ diff --git a/arch/x86/machine/string.h b/arch/x86/machine/string.h index 6111ba1..a64e2fc 100644 --- a/arch/x86/machine/string.h +++ b/arch/x86/machine/string.h @@ -15,8 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _X86_STRING_H -#define _X86_STRING_H +#ifndef X86_STRING_H +#define X86_STRING_H /* * Provide architecture-specific string functions. @@ -31,4 +31,4 @@ #define STRING_ARCH_STRNCMP #define STRING_ARCH_STRCHR -#endif /* _X86_STRING_H */ +#endif /* X86_STRING_H */ diff --git a/arch/x86/machine/tcb.h b/arch/x86/machine/tcb.h index 2e9493d..fb782ab 100644 --- a/arch/x86/machine/tcb.h +++ b/arch/x86/machine/tcb.h @@ -18,8 +18,8 @@ * Thread control block. */ -#ifndef _X86_TCB_H -#define _X86_TCB_H +#ifndef X86_TCB_H +#define X86_TCB_H #include <assert.h> #include <stdint.h> @@ -125,4 +125,4 @@ void tcb_trace(const struct tcb *tcb); */ INIT_OP_DECLARE(tcb_setup); -#endif /* _X86_TCB_H */ +#endif /* X86_TCB_H */ diff --git a/arch/x86/machine/trap.h b/arch/x86/machine/trap.h index 699f19e..af6fd6b 100644 --- a/arch/x86/machine/trap.h +++ b/arch/x86/machine/trap.h @@ -21,8 +21,8 @@ * other headers that may cause circular dependencies. */ -#ifndef _X86_TRAP_H -#define _X86_TRAP_H +#ifndef X86_TRAP_H +#define X86_TRAP_H #include <machine/page.h> @@ -182,4 +182,4 @@ INIT_OP_DECLARE(trap_setup); #endif /* __ASSEMBLER__ */ -#endif /* _X86_TRAP_H */ +#endif /* X86_TRAP_H */ diff --git a/arch/x86/machine/types.h b/arch/x86/machine/types.h index cd82515..6067454 100644 --- a/arch/x86/machine/types.h +++ b/arch/x86/machine/types.h @@ -15,8 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef _X86_TYPES_H -#define _X86_TYPES_H +#ifndef X86_TYPES_H +#define X86_TYPES_H #ifdef CONFIG_X86_PAE typedef unsigned long long phys_addr_t; @@ -24,4 +24,4 @@ typedef unsigned long long phys_addr_t; typedef unsigned long phys_addr_t; #endif /* CONFIG_X86_PAE */ -#endif /* _X86_TYPES_H */ +#endif /* X86_TYPES_H */ diff --git a/arch/x86/machine/uart.h b/arch/x86/machine/uart.h index 0054da8..aaba261 100644 --- a/arch/x86/machine/uart.h +++ b/arch/x86/machine/uart.h @@ -18,8 +18,8 @@ * Tiny 8250 UART driver. */ -#ifndef _X86_UART_H -#define _X86_UART_H +#ifndef X86_UART_H +#define X86_UART_H #include <kern/init.h> @@ -36,4 +36,4 @@ INIT_OP_DECLARE(uart_bootstrap); */ INIT_OP_DECLARE(uart_setup); -#endif /* _X86_UART_H */ +#endif /* X86_UART_H */ |