We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 47a2ebb commit 2b75562Copy full SHA for 2b75562
include/linux/io-mapping.h
@@ -28,6 +28,7 @@ struct io_mapping {
28
29
#ifdef CONFIG_HAVE_ATOMIC_IOMAP
30
31
+#include <linux/pfn.h>
32
#include <asm/iomap.h>
33
/*
34
* For small address space machines, mapping large objects
@@ -64,12 +65,10 @@ io_mapping_map_atomic_wc(struct io_mapping *mapping,
64
65
unsigned long offset)
66
{
67
resource_size_t phys_addr;
- unsigned long pfn;
68
69
BUG_ON(offset >= mapping->size);
70
phys_addr = mapping->base + offset;
71
- pfn = (unsigned long) (phys_addr >> PAGE_SHIFT);
72
- return iomap_atomic_prot_pfn(pfn, mapping->prot);
+ return iomap_atomic_prot_pfn(PHYS_PFN(phys_addr), mapping->prot);
73
}
74
75
static inline void
0 commit comments