]> git.baikalelectronics.ru Git - kernel.git/commit
x86: don't define __this_fixmap_does_not_exist()
authorWang Chen <wangchen@cn.fujitsu.com>
Sat, 7 Mar 2009 05:34:19 +0000 (13:34 +0800)
committerIngo Molnar <mingo@elte.hu>
Sun, 8 Mar 2009 16:07:47 +0000 (17:07 +0100)
commit66606a1bc1722f58a38c80975de20421830e48d7
treec2b7a0300ae9e83b368b779154b3c217c09b0d86
parent2b79b294121abeb0c30c9ade78e2f0e7f65d68c5
x86: don't define __this_fixmap_does_not_exist()

Impact: improve out-of-range fixmap index debugging

Commit "09794a75c09bc317e834347f962e1816a9b8703c"
defined the __this_fixmap_does_not_exist() function
with a WARN_ON(1) in it.

This causes the linker to not report an error when
__this_fixmap_does_not_exist() is called with a
non-constant parameter.

Ingo defined __this_fixmap_does_not_exist() because he
wanted to get virt addresses of fix memory of nest level
by non-constant index.

But we can fix this and still keep the link-time check:

We can get the four slot virt addresses on link time and
store them to array slot_virt[].

Then we can then refer the slot_virt with non-constant index,
in the ioremap-leak detection code.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
LKML-Reference: <49B2075B.4070509@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/mm/ioremap.c