OpenCloudOS-Kernel/drivers/memory
Lijun Pan c4aa1937b7 fsl-ifc: add missing include on ARM64
Need to include sched.h to fix the following compilation error
if FSL_IFC is enabled on ARM64 machine.

In file included from include/linux/mmzone.h:9:0,
                 from include/linux/gfp.h:5,
                 from include/linux/kmod.h:22,
                 from include/linux/module.h:13,
                 from drivers/memory/fsl_ifc.c:22:
drivers/memory/fsl_ifc.c: In function ‘check_nand_stat’:
include/linux/wait.h:165:35: error: ‘TASK_NORMAL’ undeclared (first use in this function)
 #define wake_up(x)   __wake_up(x, TASK_NORMAL, 1, NULL)
                                   ^
drivers/memory/fsl_ifc.c:136:3: note: in expansion of macro ‘wake_up’
   wake_up(&ctrl->nand_wait);
   ^
include/linux/wait.h:165:35: note: each undeclared identifier is reported only once for each function it appears in
 #define wake_up(x)   __wake_up(x, TASK_NORMAL, 1, NULL)
                                   ^
drivers/memory/fsl_ifc.c:136:3: note: in expansion of macro ‘wake_up’
   wake_up(&ctrl->nand_wait);
   ^

Analysis is as follows:
I put some instrumental code and get the
following .h files inclusion sequence:

In file included from ./arch/arm64/include/asm/compat.h:25:0,
                 from ./arch/arm64/include/asm/stat.h:23,
                 from include/linux/stat.h:5,
                 from include/linux/module.h:10,
                 from drivers/memory/fsl_ifc.c:23:
include/linux/sched.h:113:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘struct’
 struct sched_attr {
 ^

CONFIG_COMPAT=y is enabled while 39 and 48 bit VA is selected.
When 42 bit VA is selected, it does not enable CONFIG_COMPAT=y

In ./arch/arm64/include/asm/stat.h:23, it has
"#ifdef CONFIG_COMPAT"
"#include <asm/compat.h>"
"..."
"#endif"

Since ./arch/arm64/include/asm/stat.h does not
include ./arch/arm64/include/asm/compat.h,
then it will not include include/linux/sched.h
Hence we have to manually add "#include <linux/sched.h>"
in drivers/memory/fsl_ifc.c

Signed-off-by: Lijun Pan <Lijun.Pan@freescale.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2015-12-16 00:16:58 +01:00
..
tegra IOMMU Updates for Linux v4.3 2015-09-08 17:22:35 -07:00
Kconfig memory: omap-gpmc: Fix unselectable debug option for GPMC 2015-10-12 16:19:54 -07:00
Makefile memory: add ARM PL172 MultiPort Memory Controller driver 2015-07-17 10:43:44 -07:00
atmel-sdramc.c memory: drop owner assignment from platform_drivers 2014-10-20 16:20:52 +02:00
emif.c drivers/memory: don't check resource with devm_ioremap_resource 2013-05-18 11:55:52 +02:00
emif.h memory: emif: handle frequency and voltage change events 2012-05-02 10:52:09 -07:00
fsl-corenet-cf.c memory: fsl-corenet: Fix module autoload for OF platform driver 2015-10-05 04:44:11 +01:00
fsl_ifc.c fsl-ifc: add missing include on ARM64 2015-12-16 00:16:58 +01:00
jz4780-nemc.c memory: jz4780-nemc: driver for the NEMC on JZ4780 SoCs 2015-03-26 23:51:36 +01:00
mvebu-devbus.c memory: drop owner assignment from platform_drivers 2014-10-20 16:20:52 +02:00
of_memory.c memory: emif: add device tree support to emif driver 2012-09-04 16:14:31 -07:00
of_memory.h memory: fix build when CONFIG_OF && !CONFIG_DDR 2012-09-05 11:57:19 -07:00
omap-gpmc.c memory: omap-gpmc: dump "before" state before first modification 2015-10-12 16:23:34 -07:00
pl172.c memory: pl172: add ARM PrimeCell PL176 MPMC support 2015-09-29 22:19:02 +02:00
tegra20-mc.c memory: drop owner assignment from platform_drivers 2014-10-20 16:20:52 +02:00
ti-aemif.c memory: ti-aemif: Fix module autoload for OF platform driver 2015-10-05 04:44:11 +01:00