Let io_mapping_init_wc() fall back to an uncacheable mapping.
This allows usage of the function on architectures that don't support write-combining. Reported by: bz, emaste X-MFC With: r320196
This commit is contained in:
parent
85823a601c
commit
4600d349be
@ -53,8 +53,13 @@ io_mapping_init_wc(struct io_mapping *mapping, resource_size_t base,
|
||||
|
||||
mapping->base = base;
|
||||
mapping->size = size;
|
||||
#ifdef VM_MEMATTR_WRITE_COMBINING
|
||||
mapping->mem = ioremap_wc(base, size);
|
||||
mapping->attr = VM_MEMATTR_WRITE_COMBINING;
|
||||
#else
|
||||
mapping->mem = ioremap_nocache(base, size);
|
||||
mapping->attr = VM_MEMATTR_UNCACHEABLE;
|
||||
#endif
|
||||
return (mapping);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user