android_kernel_xiaomi_sm8350/arch
Helge Deller 48d27cb229 parisc: fix usage of 32bit PTE page table entries on 32bit kernels
This patch fixes a long outstanding bug on 32bit parisc linux kernels
which prevented us from using 32bit PTE table entries (instead of 64bit
entries of which 32bit were unused).

The problem was caused by this assembler statement in the L2_ptep
macro in arch/parisc/kernel/entry.S:447:
	EXTR \va,31-ASM_PGDIR_SHIFT,ASM_BITS_PER_PGD,\index
which expanded to
	extrw,u r8,9,11,r1
and which has undefined behavior since the length value (11) extends
beyond the leftmost bit (11-1 > 9).
Interestingly PA2.0 processors seem to don't care and just zero-extend
the value, while PA1.1 processors don't.

Fix this problem by detecting an address space overflow with ASM_BITS_PER_PGD
and adjusting it accordingly. To prevent such problems in the future,
some compile time sanity checks in arch/parisc/mm/init.c were added.

Since the page table now only consumes half of it's old size, we can
use the freed memory to harmonize 32- and 64bit kernels and let both
map 16MB for the initial page table.

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
2009-03-31 02:51:33 +00:00
..
alpha proc 2/2: remove struct proc_dir_entry::owner 2009-03-31 01:14:44 +04:00
arm V4L/DVB (11034): soc-camera: remove now unused gpio member of struct soc_camera_link 2009-03-30 12:43:22 -03:00
avr32 Merge branch 'core/percpu' into percpu-cpumask-x86-for-linus-2 2009-03-27 17:28:43 +01:00
blackfin proc 2/2: remove struct proc_dir_entry::owner 2009-03-31 01:14:44 +04:00
cris cpumask: remove references to struct irqaction's mask field. 2009-03-30 22:05:14 +10:30
frv cpumask: remove references to struct irqaction's mask field. 2009-03-30 22:05:14 +10:30
h8300 cpumask: remove references to struct irqaction's mask field. 2009-03-30 22:05:14 +10:30
ia64 Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-cpumask 2009-03-30 18:00:26 -07:00
m32r cpumask: remove references to struct irqaction's mask field. 2009-03-30 22:05:14 +10:30
m68k ide: cleanup <asm-m68k/ide.h> 2009-03-27 12:46:23 +01:00
m68knommu Merge branch 'master' of /home/davem/src/GIT/linux-2.6/ 2009-03-26 15:23:24 -07:00
mips Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-cpumask 2009-03-30 18:00:26 -07:00
mn10300 cpumask: remove references to struct irqaction's mask field. 2009-03-30 22:05:14 +10:30
parisc parisc: fix usage of 32bit PTE page table entries on 32bit kernels 2009-03-31 02:51:33 +00:00
powerpc Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-cpumask 2009-03-30 18:00:26 -07:00
s390 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 2009-03-27 16:23:12 -07:00
sh Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-cpumask 2009-03-30 18:00:26 -07:00
sparc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6 2009-03-30 18:46:12 -07:00
um uml: convert network device to netdevice ops 2009-03-27 00:46:40 -07:00
x86 Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-cpumask 2009-03-30 18:00:26 -07:00
xtensa Merge branch 'header-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-03-26 16:11:41 -07:00
.gitignore
Kconfig dma-debug: add Kconfig entry 2009-03-05 14:36:50 +01:00