Skip to content
Commit 9e41bff2 authored by Ravikiran G Thirumalai's avatar Ravikiran G Thirumalai Committed by Ingo Molnar
Browse files

x86: fix /dev/mem mmap breakage when PAT is disabled



Impact: allow /dev/mem mmaps on non-PAT CPUs/platforms

Fix mmap to /dev/mem when CONFIG_X86_PAT is off and CONFIG_STRICT_DEVMEM is
off

mmap to /dev/mem on kernel memory has been failing since the
introduction of PAT (CONFIG_STRICT_DEVMEM=n case).   Seems like
the check to avoid cache aliasing with PAT is kicking in even
when PAT is disabled. The bug seems to have crept in 2.6.26.

This patch makes sure that the mmap to regular
kernel memory succeeds if CONFIG_STRICT_DEVMEM=n and
PAT is disabled, and the checks to avoid cache aliasing
still happens if PAT is enabled.

Signed-off-by: default avatarRavikiran Thirumalai <kiran@scalex86.org>
Tested-by: default avatarTim Sirianni <tim@scalemp.com>
Cc: <stable@kernel.org>
Acked-by: default avatarH. Peter Anvin <hpa@zytor.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent ee477524
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment