Skip to contentSkip to conversation

parisc: fix compile failure with kmap_atomic changes

PATCH In review James Bottomley 3 participants 8 messages Oct 27, 2010 – Oct 28, 2010

Subsystems (3)
lore
Share & tools
lore

James Bottomley

author maintainer
#0 lore raw

PATCH 1/1 parisc: fix compile failure with kmap_atomic changes

This commit:

commit 3e4d3af501cccdc8a8cca41bdbe57d54ad7e7e73

Author: Peter Zijlstra <[email protected]>
Date:   Tue Oct 26 14:21:51 2010 -0700

mm: stack based kmap_atomic()

overlooked the fact that parisc uses kmap as a coherence mechanism, so even though we have no highmem, we do need to supply our own versions of kmap (and atomic). This patch converts the parisc kmap to the form which is needed to keep it compiling (it's a simple prototype and name change).

---

arch/parisc/include/asm/cacheflush.h +4 -4
index dba11ae..f388a85 100644
@@ -126,20 +126,20 @@ static inline void *kmap(struct page *page)
 
 #define kunmap(page)			kunmap_parisc(page_address(page))
 
-static inline void *kmap_atomic(struct page *page, enum km_type idx)
+static inline void *__kmap_atomic(struct page *page)
 {
 	pagefault_disable();
 	return page_address(page);
 }
 
-static inline void kunmap_atomic_notypecheck(void *addr, enum km_type idx)
+static inline void __kunmap_atomic(void *addr)
 {
 	kunmap_parisc(addr);
 	pagefault_enable();
 }
 
-#define kmap_atomic_prot(page, idx, prot)	kmap_atomic(page, idx)
-#define kmap_atomic_pfn(pfn, idx)	kmap_atomic(pfn_to_page(pfn), (idx))
+#define kmap_atomic_prot(page, prot)	kmap_atomic(page)
+#define kmap_atomic_pfn(pfn)	kmap_atomic(pfn_to_page(pfn))
 #define kmap_atomic_to_page(ptr)	virt_to_page(ptr)
 #endif
 
#1 lore raw

Sent effectively the same change to parisc-linux list months ago...

Quoted 54 lines

This commit:

commit 3e4d3af501cccdc8a8cca41bdbe57d54ad7e7e73

Author: Peter Zijlstra <[email protected]>
Date:   Tue Oct 26 14:21:51 2010 -0700

mm: stack based kmap_atomic()

overlooked the fact that parisc uses kmap as a coherence mechanism, so even though we have no highmem, we do need to supply our own versions of kmap (and atomic). This patch converts the parisc kmap to the form which is needed to keep it compiling (it's a simple prototype and name change).

---

arch/parisc/include/asm/cacheflush.h +4 -5
index dba11ae..f388a85 100644
@@ -126,20 +126,20 @@ static inline void *kmap(struct page *page)
 
 #define kunmap(page)			kunmap_parisc(page_address(page))
 
-static inline void *kmap_atomic(struct page *page, enum km_type idx)
+static inline void *__kmap_atomic(struct page *page)
 {
 	pagefault_disable();
 	return page_address(page);
 }
 
-static inline void kunmap_atomic_notypecheck(void *addr, enum km_type idx)
+static inline void __kunmap_atomic(void *addr)
 {
 	kunmap_parisc(addr);
 	pagefault_enable();
 }
 
-#define kmap_atomic_prot(page, idx, prot)	kmap_atomic(page, idx)
-#define kmap_atomic_pfn(pfn, idx)	kmap_atomic(pfn_to_page(pfn), (idx))
+#define kmap_atomic_prot(page, prot)	kmap_atomic(page)
+#define kmap_atomic_pfn(pfn)	kmap_atomic(pfn_to_page(pfn))
 #define kmap_atomic_to_page(ptr)	virt_to_page(ptr)
 #endif
 
 
 
--

To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 2 lines
J. David Anglin                                  [email protected]
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)
author maintainer
#2 lore raw
Quoted 3 lines · John David Anglin

Sent effectively the same change to parisc-linux list months ago...

You did? Why didn't you send it to Peter? When I grumbled at him on IRC for breaking parisc (as well as quite a few other 64 bit architectures in mainline) he had no idea there was a problem.

James

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#3 lore raw
Quoted 8 lines · John David Anglin
Quoted 3 lines

Sent effectively the same change to parisc-linux list months ago...

You did? Why didn't you send it to Peter? When I grumbled at him on IRC for breaking parisc (as well as quite a few other 64 bit architectures in mainline) he had no idea there was a problem.

For example, it is in the diff recently posted here:
http://permalink.gmane.org/gmane.linux.ports.parisc/3173
This diff is from last May.

I wasn't aware of the compilation issue or the IRC discussion. I had noticed the problem by looking at the generic code.

Dave

Signature · 2 lines
J. David Anglin                                  [email protected]
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)
author maintainer
#4 lore raw
Quoted 5 lines · John David Anglin
Quoted 5 lines · John David Anglin
Quoted 3 lines

Sent effectively the same change to parisc-linux list months ago...

Quoted 7 lines
Quoted 3 lines

You did? Why didn't you send it to Peter? When I grumbled at him on IRC for breaking parisc (as well as quite a few other 64 bit architectures in mainline) he had no idea there was a problem.

For example, it is in the diff recently posted here:
http://permalink.gmane.org/gmane.linux.ports.parisc/3173
This diff is from last May.

Um, so that doesn't fix the compile failure.

The specific problem is that kmap_atomic no longer takes the index argument because Peter moved it to a stack based implementation. All our kmap_atomic primitives in asm/cacheflush.h still have the extra index argument which causes a compile failure.

To fix it, I had to run through a bunch of renames and extra argument removals.

James

#5 lore raw
Quoted 4 lines

The specific problem is that kmap_atomic no longer takes the index argument because Peter moved it to a stack based implementation. All our kmap_atomic primitives in asm/cacheflush.h still have the extra index argument which causes a compile failure.

Sorry, missed that. The issue I was trying to address was the lack of calls to pagefault_disable() and pagefault_enable().

Dave

Signature · 2 lines
J. David Anglin                                  [email protected]
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)
#6 lore raw
In reply to James Bottomley
Quoted 5 lines · James Bottomley
Author: Peter Zijlstra <[email protected]>
Date:   Tue Oct 26 14:21:51 2010 -0700

mm: stack based kmap_atomic()

Quoted 7 lines

overlooked the fact that parisc uses kmap as a coherence mechanism, so even though we have no highmem, we do need to supply our own versions of kmap (and atomic). This patch converts the parisc kmap to the form which is needed to keep it compiling (it's a simple prototype and name change).

Care to send it straight to Linus? I didn't want to rebase my tree to pull in the fix and risk his wrath...

Thanks,
--Kyle

author maintainer
#7 lore raw
Quoted 12 lines · Kyle McMartin
Quoted 11 lines · James Bottomley
Author: Peter Zijlstra <[email protected]>
Date:   Tue Oct 26 14:21:51 2010 -0700

mm: stack based kmap_atomic()

overlooked the fact that parisc uses kmap as a coherence mechanism, so even though we have no highmem, we do need to supply our own versions of kmap (and atomic). This patch converts the parisc kmap to the form which is needed to keep it compiling (it's a simple prototype and name change).

Quoted 6 lines
Quoted 1 line

Care to send it straight to Linus? I didn't want to rebase my tree to pull in the fix and risk his wrath...

Sure ... I was hoping Peter would ... as part of some fairly extensive fixes for this code, but apparently he's unavailable while flying to the US today. By the way, it would be Acked-by: you if I do, since the patch didn't pass through your hands.

James