diff options
author | Dave Young <[email protected]> | 2014-04-07 15:39:46 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2014-04-07 16:36:14 -0700 |
commit | 6b550f6f2004017f1b4633d2c9e39b610bfe84f0 (patch) | |
tree | 959dfd5dff0e3e907a6a5c7bb9b179f2da2661a4 /lib/memory-notifier-error-inject.c | |
parent | 64b47e8fdb40a0d46e8cf458dd3e24f8afa073f6 (diff) |
x86/mm: sparse warning fix for early_memremap
This patch series takes the common bits from the x86 early ioremap
implementation and creates a generic implementation which may be used by
other architectures. The early ioremap interfaces are intended for
situations where boot code needs to make temporary virtual mappings
before the normal ioremap interfaces are available. Typically, this
means before paging_init() has run.
This patch (of 6):
There's a lot of sparse warnings for code like below: void *a =
early_memremap(phys_addr, size);
early_memremap intend to map kernel memory with ioremap facility, the
return pointer should be a kernel ram pointer instead of iomem one.
For making the function clearer and supressing sparse warnings this patch
do below two things:
1. cast to (__force void *) for the return value of early_memremap
2. add early_memunmap function and pass (__force void __iomem *) to iounmap
From Boris:
"Ingo told me yesterday, it makes sense too. I'd guess we can try it.
FWIW, all callers of early_memremap use the memory they get remapped
as normal memory so we should be safe"
Signed-off-by: Dave Young <[email protected]>
Signed-off-by: Mark Salter <[email protected]>
Acked-by: H. Peter Anvin <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Catalin Marinas <[email protected]>
Cc: Will Deacon <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions