linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Kumar Gala <galak@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] powerpc/mm: Fix assert_pte_locked to work properly on uniprocessor
Date: Wed, 19 Aug 2009 13:35:57 +1000	[thread overview]
Message-ID: <1250652957.4810.6.camel@pasglop> (raw)
In-Reply-To: <1250644900-32133-1-git-send-email-galak@kernel.crashing.org>

On Tue, 2009-08-18 at 20:21 -0500, Kumar Gala wrote:
> Since the pte_lockptr is a spinlock it gets optimized away on
> uniprocessor builds so using spin_is_locked is not correct.  We can use
> assert_spin_locked instead and get the proper behavior between UP and
> SMP builds.

Thanks. Applied.

Cheers,
Ben.

> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
> ---
>  arch/powerpc/mm/pgtable.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/powerpc/mm/pgtable.c b/arch/powerpc/mm/pgtable.c
> index 627767d..4b9a27d 100644
> --- a/arch/powerpc/mm/pgtable.c
> +++ b/arch/powerpc/mm/pgtable.c
> @@ -242,7 +242,7 @@ void assert_pte_locked(struct mm_struct *mm, unsigned long addr)
>  	BUG_ON(pud_none(*pud));
>  	pmd = pmd_offset(pud, addr);
>  	BUG_ON(!pmd_present(*pmd));
> -	BUG_ON(!spin_is_locked(pte_lockptr(mm, pmd)));
> +	assert_spin_locked(pte_lockptr(mm, pmd));
>  }
>  #endif /* CONFIG_DEBUG_VM */
>  

      reply	other threads:[~2009-08-19  3:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-19  1:21 [PATCH] powerpc/mm: Fix assert_pte_locked to work properly on uniprocessor Kumar Gala
2009-08-19  3:35 ` Benjamin Herrenschmidt [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=1250652957.4810.6.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=galak@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.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;
as well as URLs for NNTP newsgroup(s).