linux-sg2042/arch/x86/mm
Dave Young 6b550f6f20 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 <dyoung@redhat.com>
Signed-off-by: Mark Salter <msalter@redhat.com>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Cc: Borislav Petkov <borislav.petkov@amd.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-04-07 16:36:14 -07:00
..
kmemcheck
Makefile x86, trace: Add page fault tracepoints 2013-11-08 14:15:49 -08:00
amdtopology.c
dump_pagetables.c x86, ptdump: Add the functionality to dump an arbitrary pagetable 2014-03-04 16:16:17 +00:00
extable.c
fault.c Merge branch 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-03-31 12:26:05 -07:00
gup.c mm: dump page when hitting a VM_BUG_ON using VM_BUG_ON_PAGE 2014-01-23 16:36:50 -08:00
highmem_32.c
hugetlbpage.c x86/mm: Implement ASLR for hugetlb mappings 2013-11-19 14:24:50 +01:00
init.c arch/x86/mm/init.c: fix incorrect function name in alloc_low_pages() 2013-11-13 12:09:11 +09:00
init_32.c memblock: make memblock_set_node() support different memblock_type 2014-01-21 16:19:44 -08:00
init_64.c memblock: make memblock_set_node() support different memblock_type 2014-01-21 16:19:44 -08:00
iomap_32.c
ioremap.c x86/mm: sparse warning fix for early_memremap 2014-04-07 16:36:14 -07:00
kmmio.c x86: Delete non-required instances of include <linux/init.h> 2014-01-06 21:25:18 -08:00
memtest.c x86/mm: memblock: switch to use NUMA_NO_NODE 2014-01-21 16:19:47 -08:00
mm_internal.h
mmap.c
mmio-mod.c
numa.c x86, platforms: Remove NUMAQ 2014-02-27 08:07:39 -08:00
numa_32.c x86: Fix the initialization of physnode_map 2014-02-01 22:15:51 -08:00
numa_64.c
numa_emulation.c
numa_internal.h
pageattr-test.c x86: Delete non-required instances of include <linux/init.h> 2014-01-06 21:25:18 -08:00
pageattr.c Merge branch 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-03-31 12:26:05 -07:00
pat.c
pat_internal.h
pat_rbtree.c
pf_in.c
pf_in.h
pgtable.c x86, mm: do not leak page->ptl for pmd page tables 2013-11-21 16:42:28 -08:00
pgtable_32.c
physaddr.c
physaddr.h
setup_nx.c
srat.c x86/mm: Avoid duplicated pxm_to_node() calls 2014-02-09 15:32:31 +01:00
testmmiotrace.c
tlb.c x86/mm: Eliminate redundant page table walk during TLB range flushing 2014-01-25 09:10:43 +01:00