[arch][ops.h] force all of the fast routines to be inline
Also make sure each arch_ops.h always includes arch/ops.h at the top, to make sure the declaration always appears in front of the definition.
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
|
||||
#ifndef ASSEMBLY
|
||||
|
||||
#include <arch/ops.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <lk/compiler.h>
|
||||
#include <lk/reg.h>
|
||||
|
||||
@@ -9,11 +9,13 @@
|
||||
|
||||
#ifndef ASSEMBLY
|
||||
|
||||
#include <arch/ops.h>
|
||||
#include <stdbool.h>
|
||||
#include <lk/compiler.h>
|
||||
#include <lk/reg.h>
|
||||
#include <arch/arm64.h>
|
||||
|
||||
|
||||
__BEGIN_CDECLS
|
||||
|
||||
#define ENABLE_CYCLE_COUNTER 1
|
||||
|
||||
@@ -16,15 +16,13 @@
|
||||
|
||||
__BEGIN_CDECLS
|
||||
|
||||
/* fast routines that most arches will implement inline */
|
||||
static void arch_enable_ints(void);
|
||||
static void arch_disable_ints(void);
|
||||
static bool arch_ints_disabled(void);
|
||||
static bool arch_in_int_handler(void);
|
||||
|
||||
static ulong arch_cycle_count(void);
|
||||
|
||||
static uint arch_curr_cpu_num(void);
|
||||
/* Fast routines that all arches must implement inline in arch_ops.h. */
|
||||
static inline void arch_enable_ints(void);
|
||||
static inline void arch_disable_ints(void);
|
||||
static inline bool arch_ints_disabled(void);
|
||||
static inline bool arch_in_int_handler(void);
|
||||
static inline ulong arch_cycle_count(void);
|
||||
static inline uint arch_curr_cpu_num(void);
|
||||
|
||||
/* Use to align structures on cache lines to avoid cpu aliasing. */
|
||||
#define __CPU_ALIGN __ALIGNED(CACHE_LINE)
|
||||
@@ -48,5 +46,6 @@ __END_CDECLS
|
||||
#define ARCH_CACHE_FLAG_DCACHE 2
|
||||
#define ARCH_CACHE_FLAG_UCACHE (ARCH_CACHE_FLAG_ICACHE|ARCH_CACHE_FLAG_DCACHE)
|
||||
|
||||
/* include the arch specific implementations */
|
||||
#include <arch/arch_ops.h>
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <arch/ops.h>
|
||||
#include <lk/compiler.h>
|
||||
#include <lk/debug.h>
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <arch/ops.h>
|
||||
|
||||
#include <lk/compiler.h>
|
||||
|
||||
#define USE_MSRSET 1
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <arch/ops.h>
|
||||
#include <lk/compiler.h>
|
||||
#include <arch/mips.h>
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <arch/ops.h>
|
||||
#include <lk/compiler.h>
|
||||
#include <arch/or1k.h>
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <arch/ops.h>
|
||||
#include <lk/compiler.h>
|
||||
#include <lk/debug.h>
|
||||
#include <arch/riscv.h>
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <lk/compiler.h>
|
||||
|
||||
#ifndef ASSEMBLY
|
||||
|
||||
#include <arch/ops.h>
|
||||
#include <lk/compiler.h>
|
||||
#include <arch/x86.h>
|
||||
|
||||
/* override of some routines */
|
||||
|
||||
Reference in New Issue
Block a user