Skip to content

Commit

Permalink
xtensa: replace variant/core.h with asm/core.h
Browse files Browse the repository at this point in the history
Introduce the header arch/xtensa/include/asm/core.h that provides
definitions for XCHAL macros missing in older xtensa releases. Use this
header instead of variant/core.h

Signed-off-by: Max Filippov <[email protected]>
  • Loading branch information
jcmvbkbc committed May 7, 2019
1 parent 8e65986 commit 8f8d574
Show file tree
Hide file tree
Showing 21 changed files with 32 additions and 23 deletions.
2 changes: 1 addition & 1 deletion arch/xtensa/boot/boot-redboot/bootstrap.S
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
#include <variant/core.h>
#include <asm/core.h>
#include <asm/regs.h>
#include <asm/asmmacro.h>
#include <asm/cacheasm.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/include/asm/asmmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#ifndef _XTENSA_ASMMACRO_H
#define _XTENSA_ASMMACRO_H

#include <variant/core.h>
#include <asm/core.h>

/*
* Some little helpers for loops. Use zero-overhead-loops
Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/include/asm/cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#ifndef _XTENSA_CACHE_H
#define _XTENSA_CACHE_H

#include <variant/core.h>
#include <asm/core.h>

#define L1_CACHE_SHIFT XCHAL_DCACHE_LINEWIDTH
#define L1_CACHE_BYTES XCHAL_DCACHE_LINESIZE
Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/include/asm/checksum.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include <linux/in6.h>
#include <linux/uaccess.h>
#include <variant/core.h>
#include <asm/core.h>

/*
* computes the checksum of a memory block at buff, length len,
Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/include/asm/coprocessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
#ifndef _XTENSA_COPROCESSOR_H
#define _XTENSA_COPROCESSOR_H

#include <variant/core.h>
#include <variant/tie.h>
#include <asm/core.h>
#include <asm/types.h>

#ifdef __ASSEMBLY__
Expand Down
13 changes: 13 additions & 0 deletions arch/xtensa/include/asm/core.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2019 Cadence Design Systems Inc. */

#ifndef _ASM_XTENSA_CORE_H
#define _ASM_XTENSA_CORE_H

#include <variant/core.h>

#ifndef XCHAL_SPANNING_WAY
#define XCHAL_SPANNING_WAY 0
#endif

#endif
4 changes: 0 additions & 4 deletions arch/xtensa/include/asm/initialize_mmu.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@
#define CA_WRITEBACK (0x4)
#endif

#ifndef XCHAL_SPANNING_WAY
#define XCHAL_SPANNING_WAY 0
#endif

#ifdef __ASSEMBLY__

#define XTENSA_HWVERSION_RC_2009_0 230000
Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/include/asm/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#define _XTENSA_IRQ_H

#include <linux/init.h>
#include <variant/core.h>
#include <asm/core.h>

#ifdef CONFIG_PLATFORM_NR_IRQS
# define PLATFORM_NR_IRQS CONFIG_PLATFORM_NR_IRQS
Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#ifndef _XTENSA_PROCESSOR_H
#define _XTENSA_PROCESSOR_H

#include <variant/core.h>
#include <asm/core.h>

#include <linux/compiler.h>
#include <linux/stringify.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ struct pt_regs {
unsigned long areg[16];
};

#include <variant/core.h>
#include <asm/core.h>

# define arch_has_single_step() (1)
# define task_pt_regs(tsk) ((struct pt_regs*) \
Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/include/asm/vectors.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#ifndef _XTENSA_VECTORS_H
#define _XTENSA_VECTORS_H

#include <variant/core.h>
#include <asm/core.h>
#include <asm/kmem_layout.h>

#if XCHAL_HAVE_PTP_MMU
Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/kernel/hw_breakpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <linux/log2.h>
#include <linux/percpu.h>
#include <linux/perf_event.h>
#include <variant/core.h>
#include <asm/core.h>

/* Breakpoint currently in use for each IBREAKA. */
static DEFINE_PER_CPU(struct perf_event *, bp_on_reg[XCHAL_NUM_IBREAK]);
Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
#include <asm/page.h>
#include <asm/thread_info.h>

#include <asm/core.h>
#include <asm/vectors.h>
#include <variant/core.h>

OUTPUT_ARCH(xtensa)
ENTRY(_start)
Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/lib/checksum.S
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

#include <linux/errno.h>
#include <linux/linkage.h>
#include <variant/core.h>
#include <asm/asmmacro.h>
#include <asm/core.h>

/*
* computes a partial checksum, e.g. for TCP/UDP fragments
Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/lib/memcopy.S
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
*/

#include <linux/linkage.h>
#include <variant/core.h>
#include <asm/asmmacro.h>
#include <asm/core.h>

/*
* void *memcpy(void *dst, const void *src, size_t len);
Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/lib/memset.S
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
*/

#include <linux/linkage.h>
#include <variant/core.h>
#include <asm/asmmacro.h>
#include <asm/core.h>

/*
* void *memset(void *dst, int c, size_t length)
Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/lib/strncpy_user.S
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

#include <linux/errno.h>
#include <linux/linkage.h>
#include <variant/core.h>
#include <asm/asmmacro.h>
#include <asm/core.h>

/*
* char *__strncpy_user(char *dst, const char *src, size_t len)
Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/lib/strnlen_user.S
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
*/

#include <linux/linkage.h>
#include <variant/core.h>
#include <asm/asmmacro.h>
#include <asm/core.h>

/*
* size_t __strnlen_user(const char *s, size_t len)
Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/lib/usercopy.S
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
*/

#include <linux/linkage.h>
#include <variant/core.h>
#include <asm/asmmacro.h>
#include <asm/core.h>

.text
ENTRY(__xtensa_copy_user)
Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/platforms/xt2000/include/platform/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#ifndef _XTENSA_XT2000_HARDWARE_H
#define _XTENSA_XT2000_HARDWARE_H

#include <variant/core.h>
#include <asm/core.h>

/*
* On-board components.
Expand Down
2 changes: 1 addition & 1 deletion arch/xtensa/platforms/xt2000/include/platform/serial.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#ifndef _XTENSA_XT2000_SERIAL_H
#define _XTENSA_XT2000_SERIAL_H

#include <variant/core.h>
#include <asm/core.h>
#include <asm/io.h>

/* National-Semi PC16552D DUART: */
Expand Down

0 comments on commit 8f8d574

Please sign in to comment.