Commit fd97e440 authored by Ioannis Glaropoulos's avatar Ioannis Glaropoulos Committed by Andrew Boie
Browse files

arch: remove unused tracing_arch.h



The API in tracing_arch.h is not used by the
kernel so we remove it.

Signed-off-by: default avatarIoannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
parent 56be0fd5
Loading
Loading
Loading
Loading

arch/arc/include/tracing_arch.h

deleted100644 → 0
+0 −36
Original line number Diff line number Diff line
/*
 * Copyright (c) 2016 Intel Corporation
 *
 * SPDX-License-Identifier: Apache-2.0
 */

/**
 * @file
 * @brief Kernel event logger support for ARM
 */

#ifndef ZEPHYR_ARCH_ARC_INCLUDE_TRACING_ARCH_H_
#define ZEPHYR_ARCH_ARC_INCLUDE_TRACING_ARCH_H_

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @brief Get the identification of the current interrupt.
 *
 * This routine obtain the key of the interrupt that is currently processed
 * if it is called from a ISR context.
 *
 * @return The key of the interrupt that is currently being processed.
 */
int z_sys_current_irq_key_get(void)
{
	return Z_INTERRUPT_CAUSE();
}

#ifdef __cplusplus
}
#endif

#endif /* ZEPHYR_ARCH_ARC_INCLUDE_TRACING_ARCH_H_ */

arch/arm/include/tracing_arch.h

deleted100644 → 0
+0 −37
Original line number Diff line number Diff line
/*
 * Copyright (c) 2015 Intel Corporation
 *
 * SPDX-License-Identifier: Apache-2.0
 */

/**
 * @file
 * @brief Kernel event logger support for ARM
 */

#ifndef ZEPHYR_ARCH_ARM_INCLUDE_TRACING_ARCH_H_
#define ZEPHYR_ARCH_ARM_INCLUDE_TRACING_ARCH_H_

#ifdef __cplusplus
extern "C" {
#endif

#include "arch/arm/cortex_m/cmsis.h"
/**
 * @brief Get the identification of the current interrupt.
 *
 * This routine obtain the key of the interrupt that is currently processed
 * if it is called from a ISR context.
 *
 * @return The key of the interrupt that is currently being processed.
 */
int z_sys_current_irq_key_get(void)
{
	return __get_IPSR();
}

#ifdef __cplusplus
}
#endif

#endif /* ZEPHYR_ARCH_ARM_INCLUDE_TRACING_ARCH_H_ */

arch/nios2/include/tracing_arch.h

deleted100644 → 0
+0 −41
Original line number Diff line number Diff line
/*
 * Copyright (c) 2016 Intel Corporation
 *
 * SPDX-License-Identifier: Apache-2.0
 */

/**
 * @file
 * @brief Kernel event logger support for Nios II
 */

#ifndef ZEPHYR_ARCH_NIOS2_INCLUDE_TRACING_ARCH_H_
#define ZEPHYR_ARCH_NIOS2_INCLUDE_TRACING_ARCH_H_

#include <arch/cpu.h>

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @brief Get the identification of the current interrupt.
 *
 * This routine obtain the key of the interrupt that is currently processed
 * if it is called from a ISR context.
 *
 * @return The key of the interrupt that is currently being processed.
 */
static inline int z_sys_current_irq_key_get(void)
{
	u32_t ipending;

	ipending = z_nios2_creg_read(NIOS2_CR_IPENDING);
	return find_lsb_set(ipending) - 1;
}

#ifdef __cplusplus
}
#endif

#endif /* ZEPHYR_ARCH_NIOS2_INCLUDE_TRACING_ARCH_H_ */

arch/posix/include/tracing_arch.h

deleted100644 → 0
+0 −39
Original line number Diff line number Diff line
/*
 * Copyright (c) 2016 Intel Corporation
 * Copyright (c) 2017 Oticon A/S
 *
 * SPDX-License-Identifier: Apache-2.0
 */

/**
 * @file
 * @brief Kernel event logger support for ARM
 */

#ifndef ZEPHYR_ARCH_POSIX_INCLUDE_TRACING_ARCH_H_
#define ZEPHYR_ARCH_POSIX_INCLUDE_TRACING_ARCH_H_

#include "posix_soc_if.h"

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @brief Get the identification of the current interrupt.
 *
 * This routine obtain the key of the interrupt that is currently processed
 * if it is called from a ISR context.
 *
 * @return The key of the interrupt that is currently being processed.
 */
static inline int z_sys_current_irq_key_get(void)
{
	return posix_get_current_irq();
}

#ifdef __cplusplus
}
#endif

#endif /* ZEPHYR_ARCH_POSIX_INCLUDE_TRACING_ARCH_H_ */
+0 −44
Original line number Diff line number Diff line
/*
 * Copyright (c) 2016 Jean-Paul Etienne <fractalclone@gmail.com>
 *
 * SPDX-License-Identifier: Apache-2.0
 */

/**
 * @file
 * @brief Kernel event logger support for RISCV32
 */

#ifndef ZEPHYR_ARCH_RISCV32_INCLUDE_TRACING_ARCH_H_
#define ZEPHYR_ARCH_RISCV32_INCLUDE_TRACING_ARCH_H_

#include <arch/cpu.h>

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @brief Get the identification of the current interrupt.
 *
 * This routine obtain the key of the interrupt that is currently processed
 * if it is called from an IRQ context.
 *
 * @return The key of the interrupt that is currently being processed.
 */
static inline int z_sys_current_irq_key_get(void)
{
	u32_t mcause;

	__asm__ volatile("csrr %0, mcause" : "=r" (mcause));

	mcause &= SOC_MCAUSE_EXP_MASK;

	return mcause;
}

#ifdef __cplusplus
}
#endif

#endif /* ZEPHYR_ARCH_RISCV32_INCLUDE_TRACING_ARCH_H_ */
Loading