Commit 2458cbbe authored by A. Hahn's avatar A. Hahn

pcie-wb: added support for kernel 5+ (experimental)

parent 4d96c292
......@@ -313,7 +313,12 @@ static int setup_bar(struct pci_dev* pdev, struct pcie_wb_resource* res, int bar
return -ENOMEM;
}
res->addr = ioremap_nocache(res->start, res->size);
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,0,0)
res->addr = ioremap_nocache(res->start, res->size);
#else
#warning Using ioremap_cache (instead of ioremap_nocache)
res->addr = ioremap_cache(res->start, res->size);
#endif
if (debug)
printk(KERN_ALERT PCIE_WB "/BAR%d: ioremap to %lx\n", bar, (unsigned long)res->addr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment