linux-stable/include
Hugh Dickins aeed5fce37 x86: fix PAE pmd_bad bootup warning
Fix warning from pmd_bad() at bootup on a HIGHMEM64G HIGHPTE x86_32.

That came from 9fc34113f6 x86: debug pmd_bad();
but we understand now that the typecasting was wrong for PAE in the previous
version: pagetable pages above 4GB looked bad and stopped Arjan from booting.

And revert that cded932b75 x86: fix pmd_bad
and pud_bad to support huge pages.  It was the wrong way round: we shouldn't
weaken every pmd_bad and pud_bad check to let huge pages slip through - in
part they check that we _don't_ have a huge page where it's not expected.

Put the x86 pmd_bad() and pud_bad() definitions back to what they have long
been: they can be improved (x86_32 should use PTE_MASK, to stop PAE thinking
junk in the upper word is good; and x86_64 should follow x86_32's stricter
comparison, to stop thinking any subset of required bits is good); but that
should be a later patch.

Fix Hans' good observation that follow_page() will never find pmd_huge()
because that would have already failed the pmd_bad test: test pmd_huge in
between the pmd_none and pmd_bad tests.  Tighten x86's pmd_huge() check?
No, once it's a hugepage entry, it can get quite far from a good pmd: for
example, PROT_NONE leaves it with only ACCESSED of the KERN_PGTABLE bits.

However... though follow_page() contains this and another test for huge
pages, so it's nice to keep it working on them, where does it actually get
called on a huge page?  get_user_pages() checks is_vm_hugetlb_page(vma) to
to call alternative hugetlb processing, as does unmap_vmas() and others.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Earlier-version-tested-by: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jeff Chua <jeff.chua.linux@gmail.com>
Cc: Hans Rosenfeld <hans.rosenfeld@amd.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-05-06 13:08:58 -07:00
..
acpi
asm-alpha fix asm-alpha/types.h breakage 2008-05-04 14:45:55 -07:00
asm-arm arm: types: use <asm-generic/int-*.h> for the arm architecture 2008-05-02 16:18:20 -07:00
asm-avr32 avr32: types: use <asm-generic/int-*.h> for the avr32 architecture 2008-05-02 16:18:20 -07:00
asm-blackfin blackfin: types: use <asm-generic/int-*.h> for the blackfin architecture 2008-05-02 16:18:20 -07:00
asm-cris cris: types: use <asm-generic/int-*.h> for the cris architecture 2008-05-02 16:18:20 -07:00
asm-frv frv: types: use <asm-generic/int-*.h> for the frv architecture 2008-05-02 16:18:20 -07:00
asm-generic types: add C99-style constructors to <asm-generic/int-*.h> 2008-05-02 16:18:42 -07:00
asm-h8300 h8300: types: use <asm-generic/int-*.h> for the h8300 architecture 2008-05-02 16:18:21 -07:00
asm-ia64 ia64: types: use <asm-generic/int-*.h> for the ia64 architecture 2008-05-02 16:18:21 -07:00
asm-m32r m32r: types: use <asm-generic/int-*.h> for the m32r architecture 2008-05-02 16:18:21 -07:00
asm-m68k m68k: remove old mac_esp cruft 2008-05-05 12:38:50 -07:00
asm-m68knommu m68knommu: rework definition of HZ 2008-05-01 08:08:36 -07:00
asm-mips fix asm-mips/types.h syntax error 2008-05-04 14:45:55 -07:00
asm-mn10300 mn10300: types: use <asm-generic/int-*.h> for the mn10300 architecture 2008-05-02 16:18:31 -07:00
asm-parisc parisc: types: use <asm-generic/int-*.h> for the parisc architecture 2008-05-02 16:18:32 -07:00
asm-powerpc [POWERPC] devres: Add devm_ioremap_prot() 2008-05-05 16:47:14 +10:00
asm-ppc [RAPIDIO] Move include/asm-ppc/rio.h to asm-powerpc 2008-04-29 19:40:27 +10:00
asm-s390 s390: types: use <asm-generic/int-*.h> for the s390 architecture 2008-05-02 16:18:40 -07:00
asm-sh sh: types: use <asm-generic/int-*.h> for the sh architecture 2008-05-02 16:18:40 -07:00
asm-sparc Merge git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-inttypes 2008-05-03 10:54:23 -07:00
asm-sparc64 sparc64: types: use <asm-generic/int-*.h> for the sparc64 architecture 2008-05-02 16:18:41 -07:00
asm-um rename div64_64 to div64_u64 2008-05-01 08:03:58 -07:00
asm-v850 v850: types: use <asm-generic/int-*.h> for the v850 architecture 2008-05-02 16:18:41 -07:00
asm-x86 x86: fix PAE pmd_bad bootup warning 2008-05-06 13:08:58 -07:00
asm-xtensa xtensa: types: use <asm-generic/int-*.h> for the xtensa architecture 2008-05-02 16:18:42 -07:00
crypto [CRYPTO] api: Fix scatterwalk_sg_chain 2008-05-01 18:22:28 +08:00
keys
linux Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 2008-05-06 11:39:57 -07:00
math-emu
media Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb 2008-04-29 14:53:40 -07:00
mtd
net ip: Make use of the inline function dst_metric_locked() 2008-05-04 22:12:43 -07:00
pcmcia
rdma IB: expand ib_umem_get() prototype 2008-04-29 08:06:12 -07:00
rxrpc
scsi Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2008-05-02 13:52:35 -07:00
sound [ALSA] Add MPU401_INFO_NO_ACK bitflag 2008-04-29 19:01:56 +02:00
video
xen
Kbuild