aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVineet Gupta2017-05-05 13:59:41 -0500
committerVineet Gupta2017-05-05 14:06:33 -0500
commit868a65307d3015064db2a6fb2d6e451293e3047f (patch)
tree99f243ee05a18be0877ed9fdd2dca463edace850
parent65c02a556bc4f374e9002ded1ea11a0263da7b63 (diff)
downloadkernel-868a65307d3015064db2a6fb2d6e451293e3047f.tar.gz
kernel-868a65307d3015064db2a6fb2d6e451293e3047f.tar.xz
kernel-868a65307d3015064db2a6fb2d6e451293e3047f.zip
ARC: mm: fix build failure in linux-next for UP builds
kisskb build service reported ARC defconfig build failures in linux-next | arch/arc/include/asm/mmu.h:75:21: error: 'NR_CPUS' undeclared here (not in a function) | make[3]: *** [arch/arc/mm/ioremap.o] Error 1 | make[2]: *** [arch/arc/mm] Error 2 | make[1]: *** [arch/arc] Error 2 which I bisected to a subtle side-effect of a totally benign mm patch ("mm, vmalloc: properly track vmalloc users") which caused a header include chain deviation - asm/mmu.h using NR_CPUS before including linux/threads.h Fix that by adding the dependnet header and while it at fix a related header to include linux headers aheads of asm headers as sometimes that slso triggers such issues ! Reported-by: noreply@ellerman.id.au Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
-rw-r--r--arch/arc/include/asm/mmu.h4
-rw-r--r--arch/arc/include/asm/pgtable.h6
2 files changed, 7 insertions, 3 deletions
diff --git a/arch/arc/include/asm/mmu.h b/arch/arc/include/asm/mmu.h
index b144d7ca7d20..db7319e9b506 100644
--- a/arch/arc/include/asm/mmu.h
+++ b/arch/arc/include/asm/mmu.h
@@ -9,6 +9,10 @@
9#ifndef _ASM_ARC_MMU_H 9#ifndef _ASM_ARC_MMU_H
10#define _ASM_ARC_MMU_H 10#define _ASM_ARC_MMU_H
11 11
12#ifndef __ASSEMBLY__
13#include <linux/threads.h> /* NR_CPUS */
14#endif
15
12#if defined(CONFIG_ARC_MMU_V1) 16#if defined(CONFIG_ARC_MMU_V1)
13#define CONFIG_ARC_MMU_VER 1 17#define CONFIG_ARC_MMU_VER 1
14#elif defined(CONFIG_ARC_MMU_V2) 18#elif defined(CONFIG_ARC_MMU_V2)
diff --git a/arch/arc/include/asm/pgtable.h b/arch/arc/include/asm/pgtable.h
index ee22d40afef4..08fe33830d4b 100644
--- a/arch/arc/include/asm/pgtable.h
+++ b/arch/arc/include/asm/pgtable.h
@@ -35,11 +35,11 @@
35#ifndef _ASM_ARC_PGTABLE_H 35#ifndef _ASM_ARC_PGTABLE_H
36#define _ASM_ARC_PGTABLE_H 36#define _ASM_ARC_PGTABLE_H
37 37
38#include <asm/page.h> 38#include <linux/const.h>
39#include <asm/mmu.h>
40#define __ARCH_USE_5LEVEL_HACK 39#define __ARCH_USE_5LEVEL_HACK
41#include <asm-generic/pgtable-nopmd.h> 40#include <asm-generic/pgtable-nopmd.h>
42#include <linux/const.h> 41#include <asm/page.h>
42#include <asm/mmu.h> /* to propagate CONFIG_ARC_MMU_VER <n> */
43 43
44/************************************************************************** 44/**************************************************************************
45 * Page Table Flags 45 * Page Table Flags