linux/arch/x86
Jan Beulich 1796316a8b x86: consolidate __swp_XXX() macros
Impact: cleanup, code robustization

The __swp_...() macros silently relied upon which bits are used for
_PAGE_FILE and _PAGE_PROTNONE. After having changed _PAGE_PROTNONE in
our Xen kernel to no longer overlap _PAGE_PAT, live locks and crashes
were reported that could have been avoided if these macros properly
used the symbolic constants. Since, as pointed out earlier, for Xen
Dom0 support mainline likewise will need to eliminate the conflict
between _PAGE_PAT and _PAGE_PROTNONE, this patch does all the necessary
adjustments, plus it introduces a mechanism to check consistency
between MAX_SWAPFILES_SHIFT and the actual encoding macros.

This also fixes a latent bug in that x86-64 used a 6-bit mask in
__swp_type(), and if MAX_SWAPFILES_SHIFT was increased beyond 5 in (the
seemingly unrelated) linux/swap.h, this would have resulted in a
collision with _PAGE_FILE.

Non-PAE 32-bit code gets similarly adjusted for its pte_to_pgoff() and
pgoff_to_pte() calculations.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-12-16 18:34:51 +01:00
..
boot x86: use limited register constraint for setnz 2008-11-25 15:38:03 +01:00
configs x86: remove irqbalance in kernel for 32 bit 2008-10-16 16:52:52 +02:00
crypto crypto: crc32c - Use Intel CRC32 instruction 2008-08-29 15:49:50 +10:00
ia32 compat: generic compat get/settimeofday 2008-10-16 11:21:33 -07:00
include/asm x86: consolidate __swp_XXX() macros 2008-12-16 18:34:51 +01:00
kernel x86: remove init_mm export as planned for 2.6.26 2008-12-12 16:59:05 +01:00
kvm KVM: MMU: avoid creation of unreachable pages in the shadow 2008-11-26 12:34:27 +02:00
lguest lguest: fix irq vectors. 2008-10-31 11:24:28 +11:00
lib Merge branch 'x86/unify-cpu-detect' into x86-v28-for-linus-phase4-D 2008-10-11 20:23:20 +02:00
mach-default Merge branches 'x86/prototypes', 'x86/x2apic' and 'x86/debug' into x86/core 2008-08-14 14:58:22 +02:00
mach-generic x86: make 32bit support per_cpu vector 2008-10-16 16:52:53 +02:00
mach-rdc321x removed unused #include <linux/version.h>'s 2008-08-23 12:14:12 -07:00
mach-voyager x86, voyager: fix smp generic helper voyager breakage 2008-11-11 12:08:53 +01:00
math-emu x86: coding style fixes to arch/x86/math-emu/reg_constant 2008-06-18 15:00:13 +02:00
mm x86, hibernate: fix breakage on x86_32 with CONFIG_NUMA set 2008-11-12 23:28:51 +01:00
oprofile x86/oprofile: fix Intel cpu family 6 detection 2008-12-03 17:17:17 +01:00
pci x86: fixup config space size of CPU functions for AMD family 11h 2008-11-26 03:53:27 +01:00
power x86, hibernate: fix breakage on x86_32 with CONFIG_NUMA set 2008-11-12 23:28:51 +01:00
vdso Merge branches 'x86/urgent', 'x86/amd-iommu', 'x86/apic', 'x86/cleanups', 'x86/core', 'x86/cpu', 'x86/fixmap', 'x86/gart', 'x86/kprobes', 'x86/memtest', 'x86/modules', 'x86/nmi', 'x86/pat', 'x86/reboot', 'x86/setup', 'x86/step', 'x86/unify-pci', 'x86/uv', 'x86/xen' and 'xen-64bit' into x86/for-linus 2008-07-21 16:37:17 +02:00
video
xen Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-11-30 13:01:04 -08:00
Kconfig Merge commit 'v2.6.28-rc8' into x86/mm 2008-12-12 11:53:43 +01:00
Kconfig.cpu x86, bts: improve help text for BTS config 2008-10-28 16:39:37 +01:00
Kconfig.debug x86, mm: enable GBPAGES option by default 2008-10-22 13:30:12 +02:00
Makefile x86, um: ... and asm-x86 move 2008-10-22 22:55:20 -07:00
Makefile_32.cpu x86: merge winchip-2 and winchip-2a cpu choices 2008-10-13 10:22:48 +02:00