linux/arch/sh
Dan Williams 92281dee82 arch: introduce memremap()
Existing users of ioremap_cache() are mapping memory that is known in
advance to not have i/o side effects.  These users are forced to cast
away the __iomem annotation, or otherwise neglect to fix the sparse
errors thrown when dereferencing pointers to this memory.  Provide
memremap() as a non __iomem annotated ioremap_*() in the case when
ioremap is otherwise a pointer to cacheable memory. Empirically,
ioremap_<cacheable-type>() call sites are seeking memory-like semantics
(e.g.  speculative reads, and prefetching permitted).

memremap() is a break from the ioremap implementation pattern of adding
a new memremap_<type>() for each mapping type and having silent
compatibility fall backs.  Instead, the implementation defines flags
that are passed to the central memremap() and if a mapping type is not
supported by an arch memremap returns NULL.

We introduce a memremap prototype as a trivial wrapper of
ioremap_cache() and ioremap_wt().  Later, once all ioremap_cache() and
ioremap_wt() usage has been removed from drivers we teach archs to
implement arch_memremap() with the ability to strictly enforce the
mapping type.

Cc: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2015-08-14 13:23:28 -04:00
..
boards Replace module_init with equivalent device_initcall in non modules. 2015-07-02 10:30:48 -07:00
boot Kbuild: centralize MKIMAGE and cmd_uimage definitions 2012-03-26 15:49:20 +02:00
cchips sh: hd64461: Migrate off of deprecated dynamic IRQ API. 2012-05-18 23:20:09 +09:00
configs PM: Eliminate CONFIG_PM_RUNTIME 2014-12-19 22:55:06 +01:00
drivers PCI: Remove unnecessary #includes of <asm/pci.h> 2015-06-08 07:56:09 -05:00
include arch: introduce memremap() 2015-08-14 13:23:28 -04:00
kernel SH: use clkdev_add_table() 2015-05-06 11:58:58 +01:00
lib sh: ftrace: Remove check of obsolete variable function_trace_stop 2014-07-18 13:57:04 -04:00
lib64 sh64: Kill off old exception debugging helpers. 2012-06-14 14:12:18 +09:00
math-emu sh: remove unused do_fpu_error 2014-04-03 16:20:52 -07:00
mm mm/hugetlb: reduce arch dependent code about huge_pmd_unshare 2015-06-24 17:49:41 -07:00
oprofile oprofile, arm/sh: Fix oprofile_arch_exit() linkage issue 2011-12-23 11:58:34 +01:00
tools sh: Add RSK2+SH7269 board 2012-05-10 17:20:01 +09:00
Kconfig sh: expose number of page table levels 2015-04-14 16:49:02 -07:00
Kconfig.cpu arch/sh: remove depends on CONFIG_EXPERIMENTAL 2013-01-21 14:43:13 -08:00
Kconfig.debug sh: dwarf unwinder depends on SHcompact. 2012-03-30 19:31:22 +09:00
Makefile sh: also try passing -m4-nofpu for SH2A builds 2014-07-23 15:10:54 -07:00