public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Axel Lin <axel.lin@ingics.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Peter Zijlstra <peterz@infradead.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] include/linux/kernel.h: Make might_fault to be a nop for !MMU
Date: Mon, 2 Dec 2013 00:15:01 +0200	[thread overview]
Message-ID: <20131201221501.GE5998@redhat.com> (raw)
In-Reply-To: <1385710934.11444.2.camel@phoenix>

On Fri, Nov 29, 2013 at 03:42:14PM +0800, Axel Lin wrote:
> No fault if !MUU, thus make might_fault to be a nop for !MMU.
> 
> This fixes below build error if
> !CONFIG_MMU && (CONFIG_PROVE_LOCKING=y || CONFIG_DEBUG_ATOMIC_SLEEP=y):
> 
> arch/arm/kernel/built-in.o: In function `arch_ptrace':
> arch/arm/kernel/ptrace.c:852: undefined reference to `might_fault'
> arch/arm/kernel/built-in.o: In function `restore_sigframe':
> arch/arm/kernel/signal.c:173: undefined reference to `might_fault'
> arch/arm/kernel/signal.c:174: undefined reference to `might_fault'
> arch/arm/kernel/signal.c:175: undefined reference to `might_fault'
> arch/arm/kernel/signal.c:176: undefined reference to `might_fault'
> arch/arm/kernel/built-in.o:arch/arm/kernel/signal.c:177: more undefined references to `might_fault' follow
> make: *** [vmlinux] Error 1
> 
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> Cc: Michael S. Tsirkin <mst@redhat.com>
> Cc: Peter Zijlstra <peterz@infradead.org>

Makes sense. FWIW

Acked-by: Michael S. Tsirkin <mst@redhat.com>

> ---
>  include/linux/kernel.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/include/linux/kernel.h b/include/linux/kernel.h
> index 2ac0277..8b0ad48 100644
> --- a/include/linux/kernel.h
> +++ b/include/linux/kernel.h
> @@ -193,7 +193,8 @@ extern int _cond_resched(void);
>  		(__x < 0) ? -__x : __x;		\
>  	})
>  
> -#if defined(CONFIG_PROVE_LOCKING) || defined(CONFIG_DEBUG_ATOMIC_SLEEP)
> +#if defined(CONFIG_MMU) && \
> +	(defined(CONFIG_PROVE_LOCKING) || defined(CONFIG_DEBUG_ATOMIC_SLEEP))
>  void might_fault(void);
>  #else
>  static inline void might_fault(void) { }
> -- 
> 1.8.1.2
> 
> 

      reply	other threads:[~2013-12-01 22:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-29  7:42 [PATCH] include/linux/kernel.h: Make might_fault to be a nop for !MMU Axel Lin
2013-12-01 22:15 ` Michael S. Tsirkin [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=20131201221501.GE5998@redhat.com \
    --to=mst@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=axel.lin@ingics.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.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