X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=include%2Flinux%2Fio.h;h=e2c8419278c192fd8002ae0b470ea2421dc51a57;hb=c636e176d8e5afe2f3b3e3f1de33ec13f1cee308;hp=32403b5716e5b8c4a5eb21bfad1f2e4bf7604501;hpb=79e24da00b1137031245f3341828e4215b1b5b59;p=cascardo%2Flinux.git diff --git a/include/linux/io.h b/include/linux/io.h index 32403b5716e5..82ef36eac8a1 100644 --- a/include/linux/io.h +++ b/include/linux/io.h @@ -135,9 +135,32 @@ enum { /* See memremap() kernel-doc for usage description... */ MEMREMAP_WB = 1 << 0, MEMREMAP_WT = 1 << 1, + MEMREMAP_WC = 1 << 2, }; void *memremap(resource_size_t offset, size_t size, unsigned long flags); void memunmap(void *addr); +/* + * On x86 PAT systems we have memory tracking that keeps track of + * the allowed mappings on memory ranges. This tracking works for + * all the in-kernel mapping APIs (ioremap*), but where the user + * wishes to map a range from a physical device into user memory + * the tracking won't be updated. This API is to be used by + * drivers which remap physical device pages into userspace, + * and wants to make sure they are mapped WC and not UC. + */ +#ifndef arch_io_reserve_memtype_wc +static inline int arch_io_reserve_memtype_wc(resource_size_t base, + resource_size_t size) +{ + return 0; +} + +static inline void arch_io_free_memtype_wc(resource_size_t base, + resource_size_t size) +{ +} +#endif + #endif /* _LINUX_IO_H */