Skip to contentSkip to conversation

ARM: NOMMU: provide pgprot_device() macro

PATCH New Vladimir Murzin 2 participants 2 messages May 15, 2017 – May 23, 2017 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: NOMMU: provide pgprot_device() macro

NOMMU build leads to the following error:

CC drivers/pci/mmap.o
drivers/pci/mmap.c: In function 'pci_mmap_resource_range':
drivers/pci/mmap.c:60:3: error: implicit declaration of function 'pgprot_device' [-Werror=implicit-function-declaration]
vma->vm_page_prot = pgprot_device(vma->vm_page_prot);
^
cc1: some warnings being treated as errors
scripts/Makefile.build:302: recipe for target 'drivers/pci/mmap.o' failed
make[2]: *** [drivers/pci/mmap.o] Error 1
scripts/Makefile.build:561: recipe for target 'drivers/pci' failed
make[1]: *** [drivers/pci] Error 2
Makefile:1016: recipe for target 'drivers' failed
make: *** [drivers] Error 2

Fix it with support of pgprot_device() macro for NOMMU.

Fixes 00d2904ffeac ("ARM/PCI: Use generic pci_mmap_resource_range()")
---
 arch/arm/include/asm/pgtable-nommu.h | 1 +
 1 file changed, 1 insertion(+)
arch/arm/include/asm/pgtable-nommu.h +1 -0
index 302240c..a0d726a 100644
@@ -66,6 +66,7 @@
 #define pgprot_noncached(prot)	(prot)
 #define pgprot_writecombine(prot) (prot)
 #define pgprot_dmacoherent(prot) (prot)
+#define pgprot_device(prot)	(prot)
 
 
 /*
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 ARM: NOMMU: provide pgprot_device() macro

Quoted 15 lines · Vladimir Murzin

NOMMU build leads to the following error:

CC drivers/pci/mmap.o
drivers/pci/mmap.c: In function 'pci_mmap_resource_range':
drivers/pci/mmap.c:60:3: error: implicit declaration of function 'pgprot_device' [-Werror=implicit-function-declaration]

   vma->vm_page_prot = pgprot_device(vma->vm_page_prot);
   ^

cc1: some warnings being treated as errors scripts/Makefile.build:302: recipe for target 'drivers/pci/mmap.o' failed make[2]: *** [drivers/pci/mmap.o] Error 1 scripts/Makefile.build:561: recipe for target 'drivers/pci' failed make[1]: *** [drivers/pci] Error 2
Makefile:1016: recipe for target 'drivers' failed
make: *** [drivers] Error 2

Quoted 1 line

Fix it with support of pgprot_device() macro for NOMMU.

Looks trivial enough...

Quoted 22 lines
Fixes 00d2904ffeac ("ARM/PCI: Use generic pci_mmap_resource_range()")
---
 arch/arm/include/asm/pgtable-nommu.h | 1 +
 1 file changed, 1 insertion(+)
arch/arm/include/asm/pgtable-nommu.h +1 -0
index 302240c..a0d726a 100644
@@ -66,6 +66,7 @@
 #define pgprot_noncached(prot)	(prot)
 #define pgprot_writecombine(prot) (prot)
 #define pgprot_dmacoherent(prot) (prot)
+#define pgprot_device(prot)	(prot)
 
 
 /*
Signature · 1 line
1.9.1
Signature · 3 lines
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.