remarkable-linux/arch
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
..
alpha [PATCH] make osf_select() use core_sys_select() 2008-05-01 13:07:28 -04:00
arm unified (weak) sys_pipe implementation 2008-05-03 13:50:33 -07:00
avr32 unified (weak) sys_pipe implementation 2008-05-03 13:50:33 -07:00
blackfin unified (weak) sys_pipe implementation 2008-05-03 13:50:33 -07:00
cris cris: use non-racy method for /proc/system_profile creation 2008-04-29 08:06:21 -07:00
frv unified (weak) sys_pipe implementation 2008-05-03 13:50:33 -07:00
h8300 unified (weak) sys_pipe implementation 2008-05-03 13:50:33 -07:00
ia64 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 2008-05-02 08:17:58 -07:00
m32r m32r: cleanup: drop .data.idt section in vmlinux.lds script 2008-04-29 14:46:00 +09:00
m68k m68k: remove old mac_esp cruft 2008-05-05 12:38:50 -07:00
m68knommu unified (weak) sys_pipe implementation 2008-05-03 13:50:33 -07:00
mips Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 2008-05-02 11:23:14 -07:00
mn10300 unified (weak) sys_pipe implementation 2008-05-03 13:50:33 -07:00
parisc unified (weak) sys_pipe implementation 2008-05-03 13:50:33 -07:00
powerpc [POWERPC] Assign PDE->data before gluing PDE into /proc tree 2008-05-05 16:47:14 +10:00
ppc Basic braille screen reader support 2008-04-30 08:29:52 -07:00
s390 unified (weak) sys_pipe implementation 2008-05-03 13:50:33 -07:00
sh unified (weak) sys_pipe implementation 2008-05-03 13:50:33 -07:00
sparc sparc32: Delete prom_stdin and prom_stdout. 2008-05-02 05:22:54 -07:00
sparc64 sparc64: Fix syscall restart, for real... 2008-05-02 05:22:52 -07:00
um uml: fix gcc problem 2008-05-04 20:04:45 +02:00
v850 unified (weak) sys_pipe implementation 2008-05-03 13:50:33 -07:00
x86 x86: fix PAE pmd_bad bootup warning 2008-05-06 13:08:58 -07:00
xtensa xtensa: use kbuild.h macros instead of defining them in asm-offsets.c 2008-04-29 08:06:29 -07:00
.gitignore
Kconfig dma: add dma_*map*_attrs() interfaces 2008-04-29 08:06:11 -07:00