Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8235703e authored by Vineet Gupta's avatar Vineet Gupta
Browse files

ARC: Use kconfig helper IS_ENABLED() to get rid of defines.h

parent ba5afadb
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -16,13 +16,11 @@ KBUILD_DEFCONFIG := fpga_defconfig

cflags-y	+= -mA7 -fno-common -pipe -fno-builtin -D__linux__

LINUXINCLUDE	+=  -include ${src}/arch/arc/include/asm/defines.h

ifdef CONFIG_ARC_CURR_IN_REG
# For a global register defintion, make sure it gets passed to every file
# We had a customer reported bug where some code built in kernel was NOT using
# any kernel headers, and missing the r25 global register
# Can't do unconditionally (like above) because of recursive include issues
# Can't do unconditionally because of recursive include issues
# due to <linux/thread_info.h>
LINUXINCLUDE	+=  -include ${src}/arch/arc/include/asm/current.h
endif
+2 −0
Original line number Diff line number Diff line
@@ -9,6 +9,8 @@
#ifndef __ARC_ASM_CACHE_H
#define __ARC_ASM_CACHE_H

#include <asm/mmu.h>	/* some of cache registers depend on MMU ver */

/* In case $$ not config, setup a dummy number for rest of kernel */
#ifndef CONFIG_ARC_CACHE_LINE_SHIFT
#define L1_CACHE_SHIFT		6

arch/arc/include/asm/defines.h

deleted100644 → 0
+0 −56
Original line number Diff line number Diff line
/*
 * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */

#ifndef __ARC_ASM_DEFINES_H__
#define __ARC_ASM_DEFINES_H__

#if defined(CONFIG_ARC_MMU_V1)
#define CONFIG_ARC_MMU_VER 1
#elif defined(CONFIG_ARC_MMU_V2)
#define CONFIG_ARC_MMU_VER 2
#elif defined(CONFIG_ARC_MMU_V3)
#define CONFIG_ARC_MMU_VER 3
#endif

#ifdef CONFIG_ARC_HAS_LLSC
#define __CONFIG_ARC_HAS_LLSC_VAL 1
#else
#define __CONFIG_ARC_HAS_LLSC_VAL 0
#endif

#ifdef CONFIG_ARC_HAS_SWAPE
#define __CONFIG_ARC_HAS_SWAPE_VAL 1
#else
#define __CONFIG_ARC_HAS_SWAPE_VAL 0
#endif

#ifdef CONFIG_ARC_HAS_RTSC
#define __CONFIG_ARC_HAS_RTSC_VAL 1
#else
#define __CONFIG_ARC_HAS_RTSC_VAL 0
#endif

#ifdef CONFIG_ARC_MMU_SASID
#define __CONFIG_ARC_MMU_SASID_VAL 1
#else
#define __CONFIG_ARC_MMU_SASID_VAL 0
#endif

#ifdef CONFIG_ARC_HAS_ICACHE
#define __CONFIG_ARC_HAS_ICACHE	1
#else
#define __CONFIG_ARC_HAS_ICACHE	0
#endif

#ifdef CONFIG_ARC_HAS_DCACHE
#define __CONFIG_ARC_HAS_DCACHE	1
#else
#define __CONFIG_ARC_HAS_DCACHE	0
#endif

#endif /* __ARC_ASM_DEFINES_H__ */
+8 −0
Original line number Diff line number Diff line
@@ -9,6 +9,14 @@
#ifndef _ASM_ARC_MMU_H
#define _ASM_ARC_MMU_H

#if defined(CONFIG_ARC_MMU_V1)
#define CONFIG_ARC_MMU_VER 1
#elif defined(CONFIG_ARC_MMU_V2)
#define CONFIG_ARC_MMU_VER 2
#elif defined(CONFIG_ARC_MMU_V3)
#define CONFIG_ARC_MMU_VER 3
#endif

#ifndef __ASSEMBLY__

typedef struct {
+3 −2
Original line number Diff line number Diff line
@@ -9,10 +9,11 @@
#ifndef __ASM_TLB_MMU_V1_H__
#define __ASM_TLB_MMU_V1_H__

#if defined(__ASSEMBLY__) && defined(CONFIG_ARC_MMU_VER == 1)

#include <asm/mmu.h>
#include <asm/tlb.h>

#if defined(__ASSEMBLY__) && (CONFIG_ARC_MMU_VER == 1)

.macro TLB_WRITE_HEURISTICS

#define JH_HACK1
Loading