replacing all ifndef with pargma once

All the kernel header files now use pargma once rather than the ifndef,
as the pre-processed C files do not change while header files
are protected with pargma once. This will also solve any naming issues
caused by ifndef.
This commit is contained in:
Qian Ge 2020-03-20 13:59:33 +11:00
parent 73924ef0dc
commit 512a0200de
403 changed files with 494 additions and 1312 deletions

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __IPC_BUFFER_H
#define __IPC_BUFFER_H
#pragma once
#include <types.h>
#include <api/syscall.h>
@ -21,4 +20,4 @@ static inline word_t mode_setTimeArg(word_t i, time_t time, word_t *buffer, tcb_
setMR(thread, buffer, i, (uint32_t) time);
return setMR(thread, buffer, i + 1, (uint32_t)(time >> 32llu));
}
#endif /* __IPC_BUFFER_H */

View file

@ -3,10 +3,7 @@
*
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __MODE_STDINT_H
#define __MODE_STDINT_H
#pragma once
#define UINTPTR_MAX UINT32_MAX
#endif

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __MODE_UTIL_H
#define __MODE_UTIL_H
#pragma once
#include <config.h>
#include <types.h>
@ -40,4 +39,3 @@ static inline CONST uint64_t div64(uint64_t numerator, uint32_t denominator)
return quotient;
}
#endif /* __MODE_UTIL_H */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __IPC_BUFFER_H
#define __IPC_BUFFER_H
#pragma once
#include <types.h>
#include <api/syscall.h>
@ -19,5 +18,3 @@ static inline word_t mode_setTimeArg(word_t i, time_t time, word_t *buffer, tcb_
{
return setMR(thread, buffer, i, time);
}
#endif /* __IPC_BUFFER_H */

View file

@ -4,9 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __MODE_STDINT_H
#define __MODE_STDINT_H
#pragma once
#define UINTPTR_MAX UINT64_MAX
#endif

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __MODE_UTIL_H
#define __MODE_UTIL_H
#pragma once
#include <config.h>
#include <types.h>
@ -16,4 +15,3 @@ static inline CONST uint64_t div64(uint64_t numerator, uint32_t denominator)
return numerator / denominator;
}
#endif /* __MODE_UTIL_H */

View file

@ -4,11 +4,8 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __API_H
#define __API_H
#pragma once
#include <api/types.h>
#include <api/failures.h>
#include <api/syscall.h>
#endif

View file

@ -7,8 +7,7 @@
#include <config.h>
#ifdef CONFIG_DEBUG_BUILD
#ifndef __API_DEBUG_H
#define __API_DEBUG_H
#pragma once
#include <benchmark/benchmark_track.h>
#include <arch/api/syscall.h>
@ -133,6 +132,5 @@ static inline void debug_dumpScheduler(void)
}
}
#endif /* CONFIG_PRINTING */
#endif /* __API_DEBUG_H */
#endif /* CONFIG_DEBUG_BUILD */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __FAILURES_H
#define __FAILURES_H
#pragma once
#include <types.h>
#include <sel4/errors.h>
@ -40,4 +39,3 @@ extern lookup_fault_t current_lookup_fault;
extern seL4_Fault_t current_fault;
extern syscall_error_t current_syscall_error;
#endif

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __API_FAULTS_H
#define __API_FAULTS_H
#pragma once
#include <object/structures.h>
#include <types.h>
@ -16,4 +15,3 @@ word_t Arch_setMRs_fault(tcb_t *sender, tcb_t *receiver, word_t *receiveIPCBuffe
bool_t handleFaultReply(tcb_t *receiver, tcb_t *sender);
bool_t Arch_handleFaultReply(tcb_t *receiver, tcb_t *sender, word_t faultType);
#endif /* __API_FAULTS_H */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __API_SYSCALL_H
#define __API_SYSCALL_H
#pragma once
#include <config.h> // for arch/api/syscall.h
#include <machine.h>
@ -48,4 +47,3 @@ static inline word_t PURE getSyscallArg(word_t i, word_t *ipc_buffer)
extern extra_caps_t current_extra_caps;
#endif

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __API_TYPES_H
#define __API_TYPES_H
#pragma once
#include <config.h>
#include <stdint.h>
@ -130,4 +129,3 @@ static inline word_t CONST wordFromMessageInfo(seL4_MessageInfo_t mi)
#define userError(...)
#endif
#endif

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_FASTPATH_32_H
#define __ARCH_FASTPATH_32_H
#pragma once
#include <config.h>
#include <util.h>
@ -172,4 +171,3 @@ static inline void NORETURN FORCE_INLINE fastpath_restore(word_t badge, word_t m
UNREACHABLE();
}
#endif /* __ARCH_FASTPATH_32_H */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_HARDWARE_32_H
#define __ARCH_HARDWARE_32_H
#pragma once
#include <config.h>
#ifndef __ASSEMBLER__
@ -37,4 +36,3 @@
#include <plat/machine/hardware.h>
#endif
#endif /* __ARCH_HARDWARE_32_H */

View file

@ -4,12 +4,10 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __KERNEL_MODE_STACK_H
#define __KERNEL_MODE_STACK_H
#pragma once
#include <config.h>
#include <util.h>
#define KERNEL_STACK_ALIGNMENT 16
#endif /* __KERNEL_MODE_STACK_H */

View file

@ -3,9 +3,7 @@
*
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __MODE_KERNEL_THREAD_H
#define __MODE_KERNEL_THREAD_H
#pragma once
static inline word_t sanitiseRegister(register_t reg, word_t v, bool_t archInfo)
{
@ -46,4 +44,3 @@ static inline bool_t PURE Arch_getSanitiseRegisterInfo(tcb_t *thread)
}
#endif

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_MODE_KERNEL_VSPACE_H
#define __ARCH_MODE_KERNEL_VSPACE_H
#pragma once
#include <config.h>
#include <types.h>
@ -71,4 +70,3 @@ static const region_t BOOT_RODATA mode_reserved_region[] = {
};
#define MODE_RESERVED ARRAY_SIZE(mode_reserved_region)
#endif /* __ARCH_MODE_KERNEL_VSPACE_H */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_MACHINE_32_H
#define __ARCH_MACHINE_32_H
#pragma once
#include <config.h>
#include <stdint.h>
@ -572,5 +571,3 @@ static inline void setACTLR(word_t actlr)
void arch_clean_invalidate_caches(void);
void arch_clean_invalidate_L1_caches(word_t type);
#endif /* __ARCH_MACHINE_32_H */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_MODE_MACHINE_DEBUG_H_
#define __ARCH_MODE_MACHINE_DEBUG_H_
#pragma once
#include <config.h>
@ -193,4 +192,3 @@ static inline void unsetBreakpointUsedFlag(tcb_t *t, uint16_t bp_num)
#endif /* !__ASSEMBLER__ */
#endif /* defined(CONFIG_DEBUG_BUILD) || defined (CONFIG_HARDWARE_DEBUG_API) */
#endif /* __ARCH_MODE_MACHINE_DEBUG_H_ */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __MODE_MACHINE_FPU_H
#define __MODE_MACHINE_FPU_H
#pragma once
#include <config.h>
#include <mode/machine/registerset.h>
@ -227,4 +226,3 @@ static inline void disableFpu(void)
isFPUEnabledCached[SMP_TERNARY(getCurrentCPUIndex(), 0)] = false;
}
#endif /* __MODE_MACHINE_FPU_H */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_MACHINE_HARDWARE_32_H
#define __ARCH_MACHINE_HARDWARE_32_H
#pragma once
#include <config.h>
#include <sel4/sel4_arch/constants.h>
@ -135,4 +134,3 @@ static inline word_t CONST pageBitsForSize(vm_page_size_t pagesize)
#endif /* __ASSEMBLER__ */
#endif /* !__ARCH_MACHINE_HARDWARE_32_H */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_MACHINE_REGISTERSET_32_H
#define __ARCH_MACHINE_REGISTERSET_32_H
#pragma once
#include <config.h>
@ -254,4 +253,3 @@ static inline void Arch_initContext(user_context_t *context)
#endif /* !__ASSEMBLER__ */
#endif /* !__ARCH_MACHINE_REGISTERSET_32_H */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_MODE_MACHINE_TIMER_H_
#define __ARCH_MODE_MACHINE_TIMER_H_
#pragma once
#include <config.h>
#include <stdint.h>
@ -38,4 +37,3 @@ static inline CONST time_t ticksToUs(ticks_t ticks)
}
#endif /* CONFIG_KERNEL_MCS */
#endif /* __ARCH_MODE_MACHINE_TIMER_H_ */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_MACHINE_PL2_32_H
#define __ARCH_MACHINE_PL2_32_H
#pragma once
#include <config.h>
#include <arch/object/vcpu.h>
@ -211,4 +210,3 @@ static inline paddr_t addressTranslateS1CPR(vptr_t vaddr)
}
#endif /* !CONFIG_ARM_HYPERVISOR_SUPPORT */
#endif /* __ARCH_MACHINE_PL2_32_H */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_MODEL_STATEDATA_32_H
#define __ARCH_MODEL_STATEDATA_32_H
#pragma once
#include <config.h>
#include <types.h>
@ -38,4 +37,3 @@ extern pde_t armUSGlobalPD[BIT(PD_INDEX_BITS)] VISIBLE;
extern pte_t armUSGlobalPT[BIT(PT_INDEX_BITS)] VISIBLE;
#endif /* CONFIG_ARM_HYPERVISOR_SUPPORT */
#endif /* __ARCH_MODEL_STATEDATA_32_H */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_OBJECT_STRUCTURES_32_H
#define __ARCH_OBJECT_STRUCTURES_32_H
#pragma once
#include <config.h>
#include <assert.h>
@ -423,4 +422,3 @@ static inline word_t PURE pte_ptr_get_pteType(pte_t *pte_ptr)
}
#endif /* CONFIG_ARM_HYPERVISOR_SUPPORT */
#endif /* __ARCH_OBJECT_STRUCTURES_32_H */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __MODE_SMP_IPI_H
#define __MODE_SMP_IPI_H
#pragma once
#include <config.h>
#include <types.h>
@ -20,4 +19,4 @@ typedef enum {
} IpiModeRemoteCall_t;
#endif /* ENABLE_SMP_SUPPORT */
#endif /* __MODE_SMP_IPI_H */

View file

@ -4,9 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __MODE_SMP_H_
#define __MODE_SMP_H_
#pragma once
#include <config.h>
#ifdef ENABLE_SMP_SUPPORT
@ -36,4 +34,4 @@ static inline CONST cpu_id_t getCurrentCPUIndex(void)
}
#endif /* ENABLE_SMP_SUPPORT */
#endif /* __MODE_SMP_H_ */

View file

@ -4,12 +4,10 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_MODE_TYPES_H_
#define __ARCH_MODE_TYPES_H_
#pragma once
#define wordRadix 5
#define wordBits (1 << wordRadix)
typedef uint32_t timestamp_t;
#endif /* __ARCH_MODE_TYPES_H_ */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_FASTPATH_64_H
#define __ARCH_FASTPATH_64_H
#pragma once
#include <config.h>
#include <util.h>
@ -152,4 +151,3 @@ static inline void NORETURN FORCE_INLINE fastpath_restore(word_t badge, word_t m
UNREACHABLE();
}
#endif /* __ARCH_FASTPATH_64_H */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_MODE_HARDWARE_H
#define __ARCH_MODE_HARDWARE_H
#pragma once
#include <config.h>
#include <arch/machine/hardware.h>
@ -80,4 +79,4 @@
#define PADDR_TOP (PPTR_TOP - BASE_OFFSET)
#endif /* __ARCH_MODE_HARDWARE_H */

View file

@ -4,12 +4,11 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __KERNEL_MODE_STACK_H
#define __KERNEL_MODE_STACK_H
#pragma once
#include <config.h>
#include <util.h>
#define KERNEL_STACK_ALIGNMENT 4096
#endif /* __KERNEL_MODE_STACK_H */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __MODE_KERNEL_THREAD_H
#define __MODE_KERNEL_THREAD_H
#pragma once
static inline word_t CONST sanitiseRegister(register_t reg, word_t v, bool_t archInfo)
{
@ -35,4 +34,3 @@ static inline bool_t CONST Arch_getSanitiseRegisterInfo(tcb_t *thread)
#endif /* CONFIG_ARM_HYPERVISOR_SUPPORT */
}
#endif

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_MODE_KERNEL_VSPACE_H_
#define __ARCH_MODE_KERNEL_VSPACE_H_
#pragma once
#include <config.h>
#include <types.h>
@ -89,5 +88,4 @@ static inline exception_t performASIDPoolInvocation(asid_t asid, asid_pool_t *po
return EXCEPTION_NONE;
}
#endif
#endif /* __ARCH_MODE_KERNEL_VSPACE_H_ */
#endif

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_MODE_MACHINE_H
#define __ARCH_MODE_MACHINE_H
#pragma once
#include <config.h>
#include <stdint.h>
@ -371,4 +370,4 @@ static inline word_t ats2e0r(word_t va)
void arch_clean_invalidate_caches(void);
void arch_clean_invalidate_L1_caches(word_t type);
#endif /* __ARCH_MODE_MACHINE_H */

View file

@ -4,8 +4,6 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_MODE_MACHINE_DEBUG_H_
#define __ARCH_MODE_MACHINE_DEBUG_H_
#pragma once
#endif /* __ARCH_MODE_MACHINE_DEBUG_H_ */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __MODE_MACHINE_FPU_H
#define __MODE_MACHINE_FPU_H
#pragma once
#include <mode/machine/registerset.h>
@ -148,4 +147,3 @@ static inline void disableFpu(void)
isFPUEnabledCached[SMP_TERNARY(getCurrentCPUIndex(), 0)] = false;
}
#endif /* __MODE_MACHINE_FPU_H */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_MACHINE_HARDWARE_64_H
#define __ARCH_MACHINE_HARDWARE_64_H
#pragma once
#include <config.h>
#include <sel4/sel4_arch/constants.h>
@ -58,4 +57,3 @@ static inline word_t CONST pageBitsForSize(vm_page_size_t pagesize)
#endif /* __ASSEMBLER__ */
#endif /* __ARCH_MACHINE_HARDWARE_64_H */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_MACHINE_REGISTERSET_64_H
#define __ARCH_MACHINE_REGISTERSET_64_H
#pragma once
#include <config.h>
@ -268,4 +267,3 @@ static inline void Arch_initContext(user_context_t *context)
#endif /* !__ASSEMBLER__ */
#endif /* __ARCH_MACHINE_REGISTERSET_64_H */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_MODE_MACHINE_TIMER_H_
#define __ARCH_MODE_MACHINE_TIMER_H_
#pragma once
#include <config.h>
#ifdef CONFIG_KERNEL_MCS
@ -31,4 +30,4 @@ static inline CONST time_t ticksToUs(ticks_t ticks)
#endif
}
#endif /* CONFIG_KERNEL_MCS */
#endif /* __ARCH_MODE_MACHINE_TIMER_H_ */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_MODE_MACHINE_PL2_H
#define __ARCH_MODE_MACHINE_PL2_H
#pragma once
#ifdef CONFIG_ARM_HYPERVISOR_SUPPORT
@ -41,4 +40,3 @@ static inline paddr_t addressTranslateS1CPR(vptr_t vaddr)
return vaddr;
}
#endif /* __ARCH_MODE_MACHINE_H */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_MODEL_STATEDATA_64_H
#define __ARCH_MODEL_STATEDATA_64_H
#pragma once
#include <config.h>
#include <types.h>
@ -35,4 +34,3 @@ extern hw_asid_t armKSNextASID VISIBLE;
pde_t *armKSGlobalLogPDE;
#endif
#endif /* __ARCH_MODEL_STATEDATA_64_H */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_OBJECT_STRUCTURES_64_H
#define __ARCH_OBJECT_STRUCTURES_64_H
#pragma once
#include <config.h>
#include <assert.h>
@ -280,4 +279,3 @@ static inline pte_t pte_invalid_new(void)
};
}
#endif /* __ARCH_OBJECT_STRUCTURES_64_H */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __MODE_SMP_IPI_H
#define __MODE_SMP_IPI_H
#pragma once
#include <config.h>
#include <arch/smp/ipi.h>
@ -19,4 +18,3 @@ typedef enum {
} IpiModeRemoteCall_t;
#endif /* ENABLE_SMP_SUPPORT */
#endif /* __MODE_SMP_IPI_H */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __MODE_SMP_H_
#define __MODE_SMP_H_
#pragma once
#include <config.h>
#include <util.h>
@ -35,4 +34,3 @@ getCurrentCPUIndex(void)
}
#endif /* ENABLE_SMP_SUPPORT */
#endif /* __MODE_SMP_H_ */

View file

@ -4,12 +4,11 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_MODE_TYPES_H_
#define __ARCH_MODE_TYPES_H_
#pragma once
#define wordRadix 6
#define wordBits (1 << wordRadix)
typedef uint64_t timestamp_t;
#endif /* __ARCH_MODE_TYPES_H_ */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_API_TYPES_H
#define __ARCH_API_TYPES_H
#pragma once
#include <sel4/objecttype.h>
#include <sel4/sel4_arch/objecttype.h>
@ -21,4 +20,4 @@ enum asidConstants {
typedef word_t asid_t;
#endif

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef ARCH_BENCHMARK_H
#define ARCH_BENCHMARK_H
#pragma once
#include <config.h>
#ifdef CONFIG_ENABLE_BENCHMARKS
@ -48,4 +47,3 @@ static inline void benchmark_arch_utilisation_reset(void)
#endif /* CONFIG_ARM_ENABLE_PMU_OVERFLOW_INTERRUPT */
#endif /* CONFIG_ENABLE_BENCHMARKS */
#endif /* ARCH_BENCHMARK_H */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_BOOTINFO_H
#define __ARCH_BOOTINFO_H
#pragma once
/* Modifiers:
* + 1: allow the kernel to release its own boot data region
@ -21,4 +20,4 @@
*/
#define MAX_NUM_RESV_REG (MAX_NUM_FREEMEM_REG + ARRAY_SIZE(kernel_devices) + MODE_RESERVED + 3)
#endif

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_FASTPATH_H
#define __ARCH_FASTPATH_H
#pragma once
#include <linker.h>
#include <mode/fastpath/fastpath.h>
@ -27,5 +26,4 @@ void fastpath_reply_recv(word_t cptr, word_t r_msgInfo)
#endif
NORETURN;
#endif /* __ARCH_FASTPATH_H */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_KERNEL_BOOT_H
#define __ARCH_KERNEL_BOOT_H
#pragma once
#include <types.h>
@ -22,4 +21,3 @@ void init_kernel(
uint32_t dtb_size
);
#endif

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_KERNEL_THREAD_H
#define __ARCH_KERNEL_THREAD_H
#pragma once
#include <object.h>
#include <mode/kernel/thread.h>
@ -15,4 +14,3 @@ void Arch_switchToIdleThread(void);
void Arch_configureIdleThread(tcb_t *tcb);
void Arch_activateIdleThread(tcb_t *tcb);
#endif

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __KERNEL_ARM_TRAPS_H
#define __KERNEL_ARM_TRAPS_H
#pragma once
#include <config.h>
#include <machine.h>
@ -60,4 +59,3 @@ void c_handle_enfp(void)
VISIBLE SECTION(".vectors.text");
#endif /* CONFIG_HAVE_FPU */
#endif /* __KERNEL_ARM_TRAPS_H */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_KERNEL_VSPACE_H
#define __ARCH_KERNEL_VSPACE_H
#pragma once
#include <config.h>
#include <types.h>
@ -52,4 +51,3 @@ exception_t decodeARMMMUInvocation(word_t invLabel, word_t length, cptr_t cptr,
void Arch_userStackTrace(tcb_t *tptr);
#endif
#endif /* __ARCH_KERNEL_VSPACE_H */

View file

@ -4,9 +4,6 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#ifndef __ARCH_LINKER_H
#define __ARCH_LINKER_H
#pragma once
/* Place-holder for ARM-related linker definitions */
#endif /* __ARCH_LINKER_H */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_MACHINE_H
#define __ARCH_MACHINE_H
#pragma once
#include <machine.h>
#include <plat/machine/hardware.h>
@ -84,4 +83,3 @@ static inline exception_t Arch_setTLSRegister(word_t tls_base)
#endif /* __ASSEMBLER__ */
#endif /* __ARCH_MACHINE_H */

View file

@ -4,9 +4,6 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_MACHINE_CAPDL_H
#define __ARCH_MACHINE_CAPDL_H
#pragma once
void capDL(void);
#endif

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_MACHINE_DEBUG_H
#define __ARCH_MACHINE_DEBUG_H
#pragma once
#include <util.h>
#include <api/types.h>
@ -270,4 +269,3 @@ static inline syscall_error_t Arch_decodeUnsetBreakpoint(tcb_t *t, uint16_t bp_n
#endif /* CONFIG_HARDWARE_DEBUG_API */
#endif /* !__ARCH_MACHINE_DEBUG_H */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef ARCH_MACHINE_DEBUG_CONF_H
#define ARCH_MACHINE_DEBUG_CONF_H
#pragma once
#include <config.h>
@ -46,4 +45,3 @@
#define ARM_HYP_TRAP_CP14
#endif
#endif /* ARCH_MACHINE_DEBUG_CONF_H */

View file

@ -4,12 +4,10 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_MACHINE_FPU_H
#define __ARCH_MACHINE_FPU_H
#pragma once
#include <mode/machine/fpu.h>
bool_t fpsimd_HWCapTest(void);
bool_t fpsimd_init(void);
#endif /* __ARCH_MACHINE_FPU_H */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_MACHINE_GIC_COMMON_H
#define __ARCH_MACHINE_GIC_COMMON_H
#pragma once
#include <autoconf.h>
#include <stdint.h>
@ -80,4 +79,3 @@ static inline void handleSpuriousIRQ(void)
void initIRQController(void);
#endif /* __ARCH_MACHINE_GIC_COMMON_H */

View file

@ -7,8 +7,7 @@
/*
* ARM Generic Interrupt Controller PL-390
*/
#ifndef __ARCH_MACHINE_GIC_V2_H
#define __ARCH_MACHINE_GIC_V2_H
#pragma once
/* tell the kernel we have the set trigger feature */
#define HAVE_SET_TRIGGER 1
@ -299,5 +298,3 @@ static inline void set_gic_vcpu_ctrl_lr(int num, virq_t lr)
}
#endif /* End of CONFIG_ARM_HYPERVISOR_SUPPORT */
#endif /* !__ARCH_MACHINE_GIC_V2_H */

View file

@ -9,8 +9,7 @@
* Arm Generic Interrupt Controller v3
*/
#ifndef ARCH_MACHINE_GIC_3_H
#define ARCH_MACHINE_GIC_3_H
#pragma once
/* tell the kernel we have the set trigger feature */
#define HAVE_SET_TRIGGER 1
@ -287,4 +286,3 @@ static inline void ackInterrupt(irq_t irq)
}
#endif /* ARCH_MACHINE_GIC_3_H */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_MACHINE_HARDWARE_H
#define __ARCH_MACHINE_HARDWARE_H
#pragma once
#include <config.h>
#include <mode/machine/hardware.h>
@ -31,4 +30,3 @@ typedef word_t vm_fault_type_t;
#define L1_CACHE_LINE_SIZE_BITS CONFIG_L1_CACHE_LINE_SIZE_BITS
#define L1_CACHE_LINE_SIZE BIT(L1_CACHE_LINE_SIZE_BITS)
#endif /* !__ARCH_MACHINE_HARDWARE_H */

View file

@ -8,8 +8,7 @@
* ARM L2 Cache controller L2C-310
*/
#ifndef __ARCH_MACHINE_L2C_310_H
#define __ARCH_MACHINE_L2C_310_H
#pragma once
#include <arch/types.h>
@ -22,4 +21,3 @@ void plat_cleanL2Range(paddr_t start, paddr_t end);
void plat_invalidateL2Range(paddr_t start, paddr_t end);
void plat_cleanInvalidateL2Range(paddr_t start, paddr_t end);
#endif /* !__ARCH_MACHINE_L2C_310_H */

View file

@ -4,9 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_MACHINE_REGISTERSET_H
#define __ARCH_MACHINE_REGISTERSET_H
#pragma once
#include <mode/machine/registerset.h>
#endif /* __ARCH_MACHINE_REGISTERSET_H */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_MACHINE_TIMER_H_
#define __ARCH_MACHINE_TIMER_H_
#pragma once
#include <config.h>
#include <stdint.h>
@ -69,4 +68,3 @@ static inline CONST ticks_t getTimerPrecision(void)
void initTimer(void);
#endif
#endif /* __ARCH_MACHINE_TIMER_H_ */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_MACHINE_TLB_H
#define __ARCH_MACHINE_TLB_H
#pragma once
#include <mode/machine.h>
#include <arch/smp/ipi_inline.h>
@ -54,4 +53,3 @@ static inline void invalidateTranslationAll(void)
SMP_COND_STATEMENT(doRemoteInvalidateTranslationAll(MASK(CONFIG_MAX_NUM_NODES)));
}
#endif /* __ARCH_MACHINE_TLB_H */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_MODEL_SMP_H_
#define __ARCH_MODEL_SMP_H_
#pragma once
#include <config.h>
#include <mode/smp/smp.h>
@ -47,4 +46,3 @@ static inline bool_t try_arch_atomic_exchange(void *ptr, void *new_val, void **p
#endif /* ENABLE_SMP_SUPPORT */
#endif /* __ARCH_MODEL_SMP_H_ */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_MODEL_STATEDATA_H
#define __ARCH_MODEL_STATEDATA_H
#pragma once
#include <config.h>
#include <arch/object/vcpu.h>
@ -34,4 +33,3 @@ extern user_breakpoint_state_t armKSNullBreakpointState VISIBLE;
extern word_t armKSGlobalsFrame[BIT(ARMSmallPageBits) / sizeof(word_t)];
#endif
#endif /* __ARCH_MODEL_STATEDATA_H */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_OBJECT_INTERRUPT_H
#define __ARCH_OBJECT_INTERRUPT_H
#pragma once
#include <types.h>
#include <api/failures.h>
@ -65,4 +64,3 @@ static inline exception_t Arch_checkIRQ(word_t irq_w)
return EXCEPTION_NONE;
}
#endif

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_OBJECT_IOSPACE_H
#define __ARCH_OBJECT_IOSPACE_H
#pragma once
#include <types.h>
#include <api/failures.h>
@ -68,5 +67,4 @@ static inline void clearIOPageDirectory(cap_t cap)
#endif /* end of !CONFIG_ARM_SMMU */
#endif

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_OBJECT_OBJECTTYPE_H
#define __ARCH_OBJECT_OBJECTTYPE_H
#pragma once
#include <types.h>
#include <api/failures.h>
@ -30,5 +29,3 @@ word_t Arch_getObjectSize(word_t t);
static inline void Arch_postCapDeletion(cap_t cap)
{
}
#endif

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_OBJECT_STRUCTURES_H
#define __ARCH_OBJECT_STRUCTURES_H
#pragma once
#include <mode/object/structures.h>
@ -16,4 +15,4 @@ static inline bool_t CONST Arch_isCapRevocable(cap_t derivedCap, cap_t srcCap)
return false;
}
#endif

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_OBJECT_VCPU_H
#define __ARCH_OBJECT_VCPU_H
#pragma once
#include <config.h>
@ -200,4 +199,3 @@ static inline void VGICMaintenance(void) {}
#endif /* end of !CONFIG_ARM_HYPERVISOR_SUPPORT */
#endif /* __ARCH_OBJECT_VCPU_H */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_SMP_IPI_H
#define __ARCH_SMP_IPI_H
#pragma once
#include <config.h>
@ -25,4 +24,4 @@ typedef enum {
} IpiRemoteCall_t;
#endif /* ENABLE_SMP_SUPPORT */
#endif /* __ARCH_SMP_IPI_H */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_SMP_IPI_INLINE_H
#define __ARCH_SMP_IPI_INLINE_H
#pragma once
#include <config.h>
#include <smp/ipi.h>
@ -43,4 +42,4 @@ static inline void doRemoteMaskPrivateInterrupt(word_t cpu, word_t disable, word
doRemoteOp2Arg(IpiRemoteCall_MaskPrivateInterrupt, disable, irq, cpu);
}
#endif /* ENABLE_SMP_SUPPORT */
#endif /* __ARCH_SMP_IPI_INLINE_H */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_TYPES_H
#define __ARCH_TYPES_H
#pragma once
#include <config.h>
#include <assert.h>
@ -51,4 +50,3 @@ typedef struct kernel_frame {
int userAvailable;
} kernel_frame_t;
#endif

View file

@ -3,10 +3,7 @@
*
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef ARCH_USER_ACCESS_H
#define ARCH_USER_ACCESS_H
#pragma once
void armv_init_user_access(void);
#endif /* ARCH_USER_ACCESS_H */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef ARMV_BENCHMARK_H
#define ARMV_BENCHMARK_H
#pragma once
#include <config.h>
#ifdef CONFIG_ENABLE_BENCHMARKS
@ -36,4 +35,3 @@ static inline void armv_handleOverflowIRQ(void)
MCR(PMCR, pmcr);
}
#endif /* CONFIG_ENABLE_BENCHMARKS */
#endif /* ARMV_BENCHMARK_H */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARMV_CONTEXT_SWITCH_H__
#define __ARMV_CONTEXT_SWITCH_H__
#pragma once
#include <arch/object/structures.h>
#include <arch/api/types.h>
@ -29,4 +28,3 @@ static inline void armv_contextSwitch(pde_t *cap_pd, asid_t asid)
armv_contextSwitch_HWASID(cap_pd, getHWASID(asid));
}
#endif /* __ARMV_CONTEXT_SWITCH_H__ */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_ARMV_DEBUG_H_
#define __ARCH_ARMV_DEBUG_H_
#pragma once
#include <config.h>
#ifdef CONFIG_HARDWARE_DEBUG_API
@ -133,4 +132,3 @@ static inline bool_t Arch_breakpointIsMismatch(dbg_bcr_t in_val)
}
#endif /* CONFIG_HARDWARE_DEBUG_API */
#endif /* __ARCH_ARMV_DEBUG_H_ */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_ARMV6_MACHINE_H
#define __ARCH_ARMV6_MACHINE_H
#pragma once
static inline void wfi(void)
{
@ -56,4 +55,3 @@ static inline void isb(void)
#define SYSTEM_WRITE_64(reg, v) MCRR(reg, v)
#define SYSTEM_READ_64(reg, v) MRRC(reg, v)
#endif

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef ARMV_BENCHMARK_H
#define ARMV_BENCHMARK_H
#pragma once
#ifdef CONFIG_ENABLE_BENCHMARKS
#include <config.h>
@ -31,4 +30,4 @@ static inline void armv_handleOverflowIRQ(void)
MCR(PMOVSR, val);
}
#endif /* CONFIG_ENABLE_BENCHMARKS */
#endif /* ARMV_BENCHMARK_H */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARMV_CONTEXT_SWITCH_H__
#define __ARMV_CONTEXT_SWITCH_H__
#pragma once
#include <config.h>
#include <arch/object/structures.h>
@ -52,4 +51,3 @@ static inline void armv_contextSwitch(pde_t *cap_pd, asid_t asid)
armv_contextSwitch_HWASID(cap_pd, getHWASID(asid));
}
#endif /* __ARMV_CONTEXT_SWITCH_H__ */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_ARMV_DEBUG_H_
#define __ARCH_ARMV_DEBUG_H_
#pragma once
#include <config.h>
@ -172,4 +171,4 @@ static inline bool_t Arch_breakpointIsMismatch(dbg_bcr_t in_val)
}
#endif /* CONFIG_HARDWARE_DEBUG_API */
#endif /* __ARCH_ARMV_DEBUG_H_ */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_ARMV7A_MACHINE_H
#define __ARCH_ARMV7A_MACHINE_H
#pragma once
#include <util.h>
@ -49,5 +48,3 @@ void lockTLBEntryCritical(unsigned int addr, unsigned int x, unsigned int y);
#define SYSTEM_READ_WORD(reg, v) MRC(reg, v)
#define SYSTEM_WRITE_64(reg, v) MCRR(reg, v)
#define SYSTEM_READ_64(reg, v) MRRC(reg, v)
#endif

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_ARMV_VCPU_H_
#define __ARCH_ARMV_VCPU_H_
#pragma once
#include <config.h>
@ -863,5 +862,3 @@ static inline bool_t armv_handleVCPUFault(word_t hsr)
#endif /* End of CONFIG_ARM_HYPERVISOR_SUPPORT */
#endif

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef ARMV_BENCHMARK_H
#define ARMV_BENCHMARK_H
#pragma once
#include <config.h>
#ifdef CONFIG_ENABLE_BENCHMARKS
@ -32,4 +31,4 @@ static inline void armv_handleOverflowIRQ(void)
}
#endif /* CONFIG_ENABLE_BENCHMARKS */
#endif /* ARMV_BENCHMARK_H */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARMV_CONTEXT_SWITCH_H__
#define __ARMV_CONTEXT_SWITCH_H__
#pragma once
#include <config.h>
#include <arch/kernel/vspace.h>
@ -22,4 +21,3 @@ static inline void armv_contextSwitch(vspace_root_t *vspace, asid_t asid)
setCurrentUserVSpaceRoot(ttbr_new(asid, pptr_to_paddr(vspace)));
}
#endif /* __ARMV_CONTEXT_SWITCH_H__ */

View file

@ -4,8 +4,5 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_ARMV_DEBUG_H_
#define __ARCH_ARMV_DEBUG_H_
#pragma once
#endif /* __ARCH_ARMV_DEBUG_H_ */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_ARMV_MACHINE_H
#define __ARCH_ARMV_MACHINE_H
#pragma once
static inline void wfi(void)
{
@ -39,4 +38,3 @@ static inline void isb(void)
#define SYSTEM_WRITE_64(reg, v) MSR(reg, v)
#define SYSTEM_READ_64(reg, v) MRS(reg, v)
#endif /* __ARCH_ARMV_MACHINE_H */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_ARMV_TLB_H
#define __ARCH_ARMV_TLB_H
#pragma once
#include <config.h>
#include <mode/machine.h>
@ -51,5 +50,4 @@ static inline void invalidateLocalTLB_IPA_VMID(word_t ipa_plus_vmid)
}
}
#endif

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_ARMV_VCPU_H_
#define __ARCH_ARMV_VCPU_H_
#pragma once
#include <config.h>
@ -646,5 +645,4 @@ static inline bool_t armv_handleVCPUFault(word_t hsr)
#endif /* End of CONFIG_ARM_HYPERVISOR_SUPPORT */
#endif

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_MODE_HARDWARE_H
#define __ARCH_MODE_HARDWARE_H
#pragma once
#define LOAD lw
#define STORE sw
@ -49,4 +48,3 @@ static inline uint64_t riscv_read_time(void)
#endif /* __ASSEMBLER__ */
#endif /* __ARCH_MODE_HARDWARE_H */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __KERNEL_MODE_STACK_H
#define __KERNEL_MODE_STACK_H
#pragma once
#include <config.h>
#include <util.h>
@ -16,4 +15,3 @@
#define KERNEL_STACK_ALIGNMENT 4
#endif
#endif /* __KERNEL_MODE_STACK_H */

View file

@ -4,9 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_MODE_MACHINE_H
#define __ARCH_MODE_MACHINE_H
#pragma once
/* Place holder for 32-bit machine header */
#endif /* __ARCH_MODE_MACHINE_H */

View file

@ -5,7 +5,6 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_OBJECT_STRUCTURES_32_H
#define __ARCH_OBJECT_STRUCTURES_32_H
#pragma once
#endif /* __ARCH_OBJECT_STRUCTURES_32_H */

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_MODE_TYPES_H
#define __ARCH_MODE_TYPES_H
#pragma once
#include <config.h>
#include <assert.h>
@ -15,4 +14,3 @@ compile_assert(long_is_32bits, sizeof(unsigned long) == 4)
#define wordRadix 5
#endif

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef __ARCH_MODE_HARDWARE_H
#define __ARCH_MODE_HARDWARE_H
#pragma once
#define LOAD ld
#define STORE sd
@ -107,4 +106,3 @@ static inline uint64_t riscv_read_time(void)
#endif /* __ASSEMBLER__ */
#endif /* __ARCH_MODE_HARDWARE_H */

Some files were not shown because too many files have changed in this diff Show more