The memconsole code was using ioremap() which defaults to using
an uncacheable mapping. When using PAT this creates a PAT entry
as uncached-minus. When a userspace program, such as cbmem,
wants to mmap() the memory area not using O_SYNC by way of /dev/mem
it creates a conflicting entry and fails. Correct this situation
by using ioreamp_cache() becaus the cbmem memconsole lives in memory
that is just reserved from the OS -- not in mmio space.
BUG=None
BRANCH=None
TEST=Tested on Pixel with new cbmem utlity. No errors.
Change-Id: Iff8a160205bf59e4c4d0e9508832901f8dbd1cde
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/48654
E820_RESERVED))
break;
- pcbm = ioremap(scan_addr, remap_size);
+ pcbm = ioremap_cache(scan_addr, remap_size);
if (!pcbm) {
scan_addr += CBMEM_ALIGNMENT;
continue;
if ((pcbm[i].magic == CBMEM_ENTRY_MAGIC) &&
(pcbm[i].id == CBMEM_CONSOLE_ID)) {
/* Yes, map the log. */
- cbmem_console = ioremap(pcbm[i].base,
+ cbmem_console = ioremap_cache(pcbm[i].base,
pcbm[i].size);
break;
}