arch: unify include guards naming

Unifies include guards naming in arch headers.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
This commit is contained in:
Tomasz Lauda 2019-07-10 15:22:21 +02:00 committed by Tomasz Lauda
parent 58d3774948
commit ceb35857b6
28 changed files with 87 additions and 67 deletions

View File

@ -6,8 +6,8 @@
* Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
*/
#ifndef __ARCH_ATOMIC_H_
#define __ARCH_ATOMIC_H_
#ifndef __ARCH_ATOMIC_H__
#define __ARCH_ATOMIC_H__
#include <stdint.h>
#include <errno.h>
@ -42,4 +42,4 @@ static inline int32_t arch_atomic_sub(atomic_t *a, int32_t value)
return __sync_fetch_and_sub(&a->value, value);
}
#endif
#endif /* __ARCH_ATOMIC_H__ */

View File

@ -5,8 +5,8 @@
* Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
*/
#ifndef __INCLUDE_ARCH_CACHE__
#define __INCLUDE_ARCH_CACHE__
#ifndef __ARCH_CACHE_H__
#define __ARCH_CACHE_H__
#include <stdint.h>
#include <stddef.h>
@ -17,4 +17,4 @@ static inline void icache_invalidate_region(void *addr, size_t size) {}
static inline void dcache_writeback_invalidate_region(void *addr,
size_t size) {}
#endif
#endif /* __ARCH_CACHE_H__ */

View File

@ -5,8 +5,8 @@
* Author: Rander Wang <rander.wang@linux.intel.com>
*/
#ifndef __INCLUDE_ARCH_CPU__
#define __INCLUDE_ARCH_CPU__
#ifndef __ARCH_CPU_H__
#define __ARCH_CPU_H__
static inline void arch_cpu_enable_core(int id)
{
@ -35,4 +35,4 @@ static inline int cpu_read_threadptr(void)
return 0;
}
#endif
#endif /* __ARCH_CPU_H__ */

View File

@ -5,8 +5,8 @@
* Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
*/
#ifndef __ARCH_INTERRUPT_H
#define __ARCH_INTERRUPT_H
#ifndef __ARCH_INTERRUPT_H__
#define __ARCH_INTERRUPT_H__
#include <sof/interrupt-map.h>
#include <stdint.h>
@ -29,4 +29,4 @@ static inline uint32_t arch_interrupt_global_disable(void) {return 0; }
static inline void arch_interrupt_global_enable(uint32_t flags) {}
static inline int arch_interrupt_init(void) {return 0; }
#endif
#endif /* __ARCH_INTERRUPT_H__ */

View File

@ -5,8 +5,8 @@
* Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
*/
#ifndef __INCLUDE_ARCH_SOF__
#define __INCLUDE_ARCH_SOF__
#ifndef __ARCH_SOF_H__
#define __ARCH_SOF_H__
#include <stdint.h>
#include <stdlib.h>
@ -51,4 +51,4 @@ static inline void *arch_dump_regs(void)
return NULL;
}
#endif
#endif /* __ARCH_SOF_H__ */

View File

@ -5,8 +5,8 @@
* Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
*/
#ifndef __ARCH_SPINLOCK_H_
#define __ARCH_SPINLOCK_H_
#ifndef __ARCH_SPINLOCK_H__
#define __ARCH_SPINLOCK_H__
#include <stdint.h>
#include <errno.h>
@ -18,4 +18,4 @@ static inline void arch_spinlock_init(spinlock_t *lock) {}
static inline void arch_spin_lock(spinlock_t *lock) {}
static inline void arch_spin_unlock(spinlock_t *lock) {}
#endif
#endif /* __ARCH_SPINLOCK_H__ */

View File

@ -5,8 +5,8 @@
* Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
*/
#ifndef __INCLUDE_ARCH_STRING_SOF__
#define __INCLUDE_ARCH_STRING_SOF__
#ifndef __ARCH_STRING_H__
#define __ARCH_STRING_H__
#include <errno.h>
#include <string.h>
@ -59,4 +59,4 @@ static inline int arch_memset_s(void *dest, size_t dest_size,
return 0;
}
#endif
#endif /* __ARCH_STRING_H__ */

View File

@ -11,8 +11,8 @@
* \authors Liam Girdwood <liam.r.girdwood@linux.intel.com>
*/
#ifndef __ARCH_TASK_H_
#define __ARCH_TASK_H_
#ifndef __ARCH_TASK_H__
#define __ARCH_TASK_H__
#include <sof/schedule/schedule.h>
@ -33,4 +33,4 @@ static inline int arch_run_task(struct task *task)
return 0;
}
#endif
#endif /* __ARCH_TASK_H__ */

View File

@ -5,8 +5,8 @@
* Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
*/
#ifndef __ARCH_TIMER_H_
#define __ARCH_TIMER_H_
#ifndef __ARCH_TIMER_H__
#define __ARCH_TIMER_H__
#include <arch/interrupt.h>
#include <stdint.h>
@ -25,4 +25,4 @@ static inline int arch_timer_set(struct timer *timer,
uint64_t ticks) {return 0; }
static inline void arch_timer_clear(struct timer *timer) {}
#endif
#endif /* __ARCH_TIMER_H__ */

View File

@ -5,6 +5,11 @@
* Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
*/
#ifndef __ARCH_WAIT_H__
#define __ARCH_WAIT_H__
static inline void arch_wait_for_interrupt(int level) {}
static inline void idelay(int n) {}
#endif /* __ARCH_WAIT_H__ */

View File

@ -56,4 +56,4 @@ static inline void alloc_core_context(int core)
}
#endif
#endif
#endif /* __ARCH_ALLOC_H__ */

View File

@ -5,8 +5,8 @@
* Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
*/
#ifndef __ARCH_ATOMIC_H_
#define __ARCH_ATOMIC_H_
#ifndef __ARCH_ATOMIC_H__
#define __ARCH_ATOMIC_H__
#include <stdint.h>
#include <errno.h>
@ -64,4 +64,4 @@ static inline int32_t arch_atomic_sub(atomic_t *a, int32_t value)
return (*(volatile int32_t *)&a->value);
}
#endif
#endif /* __ARCH_ATOMIC_H__ */

View File

@ -5,8 +5,8 @@
* Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
*/
#ifndef __INCLUDE_ARCH_CACHE__
#define __INCLUDE_ARCH_CACHE__
#ifndef __ARCH_CACHE_H__
#define __ARCH_CACHE_H__
#include <stdint.h>
#include <stddef.h>
@ -71,4 +71,4 @@ static inline void dcache_writeback_invalidate_all(void)
#endif
}
#endif
#endif /* __ARCH_CACHE_H__ */

View File

@ -5,8 +5,8 @@
* Author: Rander Wang <rander.wang@linux.intel.com>
*/
#ifndef __INCLUDE_ARCH_CPU__
#define __INCLUDE_ARCH_CPU__
#ifndef __ARCH_CPU_H__
#define __ARCH_CPU_H__
#include <platform/cpu.h>
#include <config.h>
@ -59,4 +59,4 @@ static inline int cpu_read_threadptr(void)
return threadptr;
}
#endif
#endif /* __ARCH_CPU_H__ */

View File

@ -9,4 +9,9 @@
* Header file for init.S
*/
#ifndef __ARCH_GDB_INIT_H__
#define __ARCH_GDB_INIT_H__
extern void gdb_init_debug_exception(void);
#endif /* __ARCH_GDB_INIT_H__ */

View File

@ -9,8 +9,13 @@
* Header file for Xtensa-GDB utilities.
*/
#ifndef __ARCH_GDB_UTILITIES_H__
#define __ARCH_GDB_UTILITIES_H__
void arch_gdb_read_sr(int sr);
void arch_gdb_write_sr(int sr, int *sregs);
unsigned char arch_gdb_load_from_memory(void *mem);
void arch_gdb_memory_load_and_store(void *mem, unsigned char ch);
void arch_gdb_single_step(int *sregs);
#endif /* __ARCH_GDB_UTILITIES_H__ */

View File

@ -9,8 +9,8 @@
* Header file for xtensa specific defs for GDB.
*/
#ifndef XTENSA_DEFS_H
#define XTENSA_DEFS_H
#ifndef __ARCH_GDB_XTENSA_DEFS_H__
#define __ARCH_GDB_XTENSA_DEFS_H__
#include <xtensa/specreg.h>
#include <xtensa/config/core-isa.h>
@ -24,4 +24,4 @@
#define DEBUG_EXCSAVE (EXCSAVE + XCHAL_DEBUGLEVEL)
#define DEBUG_PS (EPS + XCHAL_DEBUGLEVEL)
#endif /* XTENSA_DEFS_H */
#endif /* __ARCH_GDB_XTENSA_DEFS_H__ */

View File

@ -35,4 +35,4 @@ static inline int arch_idc_send_msg(struct idc_msg *msg, uint32_t mode)
static inline int arch_idc_init(void) { return 0; }
#endif
#endif
#endif /* __ARCH_IDC_H__ */

View File

@ -121,4 +121,4 @@ static inline void register_exceptions(void)
*/
static inline void __memmap_init(void) { }
#endif
#endif /* __ARCH_INIT_H__ */

View File

@ -5,8 +5,8 @@
* Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
*/
#ifndef __ARCH_INTERRUPT_H
#define __ARCH_INTERRUPT_H
#ifndef __ARCH_INTERRUPT_H__
#define __ARCH_INTERRUPT_H__
#include <xtensa/xtruntime.h>
#include <xtensa/hal.h>
@ -86,4 +86,4 @@ static inline void arch_interrupt_global_enable(uint32_t flags)
:: "a" (flags) : "memory");
}
#endif
#endif /* __ARCH_INTERRUPT_H__ */

View File

@ -3,6 +3,9 @@
* Copyright(c) 2019 Intel Corporation. All rights reserved.
*/
#ifndef __ARCH_OFFSET_DEFS_H__
#define __ARCH_OFFSET_DEFS_H__
#include <xtensa/config/core-isa.h>
#define REG_OFFSET_EXCCAUSE 0x0
@ -31,3 +34,5 @@
#define REG_OFFSET_EXCSAVE1 0x5c
#define REG_OFFSET_AR_BEGIN 0x60
#define REG_OFFSET_AR_END (REG_OFFSET_AR_BEGIN + 4 * XCHAL_NUM_AREGS)
#endif /* __ARCH_OFFSET_DEFS_H__ */

View File

@ -6,8 +6,8 @@
* Janusz Jankowski <janusz.jankowski@linux.intel.com>
*/
#ifndef __INCLUDE_ARCH_SOF__
#define __INCLUDE_ARCH_SOF__
#ifndef __ARCH_SOF_H__
#define __ARCH_SOF_H__
#include <stdint.h>
#include <stddef.h>
@ -74,4 +74,4 @@ static inline void arch_dump_regs(uint32_t ps, uintptr_t stack_ptr,
dcache_writeback_region(buf, ARCH_OOPS_SIZE);
}
#endif
#endif /* __ARCH_SOF_H__ */

View File

@ -5,8 +5,8 @@
* Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
*/
#ifndef __ARCH_SPINLOCK_H_
#define __ARCH_SPINLOCK_H_
#ifndef __ARCH_SPINLOCK_H__
#define __ARCH_SPINLOCK_H__
#include <stdint.h>
#include <errno.h>
@ -68,4 +68,4 @@ static inline void arch_spin_unlock(spinlock_t *lock)
: "memory");
}
#endif
#endif /* __ARCH_SPINLOCK_H__ */

View File

@ -5,8 +5,8 @@
* Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
*/
#ifndef __INCLUDE_ARCH_STRING_SOF__
#define __INCLUDE_ARCH_STRING_SOF__
#ifndef __ARCH_STRING_H__
#define __ARCH_STRING_H__
#include <errno.h>
#include <stdlib.h>
@ -77,4 +77,4 @@ static inline int arch_memset_s(void *dest, size_t dest_size,
return 0;
}
#endif
#endif /* __ARCH_STRING_H__ */

View File

@ -11,8 +11,8 @@
* \authors Liam Girdwood <liam.r.girdwood@linux.intel.com>
*/
#ifndef __ARCH_TASK_H_
#define __ARCH_TASK_H_
#ifndef __ARCH_TASK_H__
#define __ARCH_TASK_H__
#include <sof/list.h>
@ -66,4 +66,4 @@ void arch_free_tasks(void);
*/
int arch_assign_tasks(void);
#endif
#endif /* __ARCH_TASK_H__ */

View File

@ -5,8 +5,8 @@
* Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
*/
#ifndef __ARCH_TIMER_H_
#define __ARCH_TIMER_H_
#ifndef __ARCH_TIMER_H__
#define __ARCH_TIMER_H__
#include <arch/interrupt.h>
#include <stdint.h>
@ -65,4 +65,4 @@ static inline void arch_timer_clear(struct timer *timer)
arch_interrupt_clear(timer->irq);
}
#endif
#endif /* __ARCH_TIMER_H__ */

View File

@ -5,8 +5,8 @@
* Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
*/
#ifndef __ARCH_WAIT_H_
#define __ARCH_WAIT_H_
#ifndef __ARCH_WAIT_H__
#define __ARCH_WAIT_H__
#include <xtensa/xtruntime.h>
#include <arch/interrupt.h>
@ -58,4 +58,4 @@ static inline void idelay(int n)
asm volatile("nop");
}
#endif
#endif /* __ARCH_WAIT_H__ */

View File

@ -5,12 +5,12 @@
* Author: Tomasz Lauda <tomasz.lauda@linux.intel.com>
*/
#ifndef __XTOS_XTOS_STRUCTS_H__
#define __XTOS_XTOS_STRUCTS_H__
#include "xtos-internal.h"
#include <config.h>
#ifndef __XTOS_STRUCTS_H__
#define __XTOS_STRUCTS_H__
struct idc;
struct irq_task;
struct notify;
@ -41,4 +41,4 @@ struct core_context {
void _xtos_initialize_pointers_per_core(void);
#endif /* __XTOS_STRUCTS_H__ */
#endif /* __XTOS_XTOS_STRUCTS_H__ */