The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Lijun Pan <Lijun.Pan@freescale.com>
Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
	Lijun.Pan2000@gmail.com
Subject: Re: [PATCH RESEND v3] fsl-ifc: add missing include on ARM64
Date: Wed, 16 Dec 2015 00:18:10 +0100	[thread overview]
Message-ID: <3280521.lmIxOlm3Me@wuerfel> (raw)
In-Reply-To: <1449863702-3020-1-git-send-email-Lijun.Pan@freescale.com>

On Friday 11 December 2015 13:55:02 Lijun Pan wrote:
> 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>
> 

I've applied this to the fixes branch of arm-soc now.

Thanks,

	Arnd

      reply	other threads:[~2015-12-15 23:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-11 19:55 [PATCH RESEND v3] fsl-ifc: add missing include on ARM64 Lijun Pan
2015-12-15 23:18 ` Arnd Bergmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3280521.lmIxOlm3Me@wuerfel \
    --to=arnd@arndb.de \
    --cc=Lijun.Pan2000@gmail.com \
    --cc=Lijun.Pan@freescale.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox