[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0902052024470.13998@blonde.anvils>
Date: Thu, 5 Feb 2009 20:25:48 +0000 (GMT)
From: Hugh Dickins <hugh@...itas.com>
To: Jeremy Fitzhardinge <jeremy@...p.org>
cc: Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org,
the arch/x86 maintainers <x86@...nel.org>
Subject: Re: [PATCH 36 of 36] x86: make the X_bad functions consistent
On Thu, 5 Feb 2009, Jeremy Fitzhardinge wrote:
> Impact: cleanup
>
> Use the same logic to implement all 3 _bad() functions.
>
> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>
A backward step in my opinion.
Hugh
> ---
> arch/x86/include/asm/pgtable.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
> --- a/arch/x86/include/asm/pgtable.h
> +++ b/arch/x86/include/asm/pgtable.h
> @@ -554,7 +554,7 @@
>
> static inline int pmd_bad(pmd_t pmd)
> {
> - return (pmd_flags(pmd) & ~_PAGE_USER) != _KERNPG_TABLE;
> + return (pmd_flags(pmd) & ~(_KERNPG_TABLE | _PAGE_USER)) != 0;
> }
>
> static inline unsigned long pages_to_mb(unsigned long npg)
> @@ -638,7 +638,7 @@
>
> static inline int pgd_bad(pgd_t pgd)
> {
> - return (pgd_flags(pgd) & ~_PAGE_USER) != _KERNPG_TABLE;
> + return (pgd_flags(pgd) & ~(_KERNPG_TABLE | _PAGE_USER)) != 0;
> }
>
> static inline int pgd_none(pgd_t pgd)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists