linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] parisc: fix compile failure with kmap_atomic changes
@ 2010-10-27 18:35 James Bottomley
  2010-10-28  5:18 ` John David Anglin
  2010-10-28 14:16 ` Kyle McMartin
  0 siblings, 2 replies; 8+ messages in thread
From: James Bottomley @ 2010-10-27 18:35 UTC (permalink / raw)
  To: linux-mm, linux-arch, Parisc List; +Cc: Peter Zijlstra

This commit:

commit 3e4d3af501cccdc8a8cca41bdbe57d54ad7e7e73
Author: Peter Zijlstra <a.p.zijlstra@chello.nl>
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).

Signed-off-by: James Bottomley <James.Bottomley@suse.de>

---

diff --git a/arch/parisc/include/asm/cacheflush.h b/arch/parisc/include/asm/cacheflush.h
index dba11ae..f388a85 100644
--- a/arch/parisc/include/asm/cacheflush.h
+++ b/arch/parisc/include/asm/cacheflush.h
@@ -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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] parisc: fix compile failure with kmap_atomic changes
  2010-10-27 18:35 [PATCH] parisc: fix compile failure with kmap_atomic changes James Bottomley
@ 2010-10-28  5:18 ` John David Anglin
  2010-10-28 14:03   ` James Bottomley
  2010-10-28 14:16 ` Kyle McMartin
  1 sibling, 1 reply; 8+ messages in thread
From: John David Anglin @ 2010-10-28  5:18 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-mm, linux-arch, linux-parisc, peterz

Signed-off-by: John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>

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

> This commit:
> 
> commit 3e4d3af501cccdc8a8cca41bdbe57d54ad7e7e73
> Author: Peter Zijlstra <a.p.zijlstra@chello.nl>
> 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).
> 
> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
> 
> ---
> 
> diff --git a/arch/parisc/include/asm/cacheflush.h b/arch/parisc/include/asm/cacheflush.h
> index dba11ae..f388a85 100644
> --- a/arch/parisc/include/asm/cacheflush.h
> +++ b/arch/parisc/include/asm/cacheflush.h
> @@ -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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] parisc: fix compile failure with kmap_atomic changes
  2010-10-28  5:18 ` John David Anglin
@ 2010-10-28 14:03   ` James Bottomley
  2010-10-28 17:13     ` John David Anglin
  0 siblings, 1 reply; 8+ messages in thread
From: James Bottomley @ 2010-10-28 14:03 UTC (permalink / raw)
  To: John David Anglin; +Cc: linux-mm, linux-arch, linux-parisc, peterz

On Thu, 2010-10-28 at 01:18 -0400, John David Anglin wrote:
> Signed-off-by: John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
> 
> 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 majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] parisc: fix compile failure with kmap_atomic changes
  2010-10-27 18:35 [PATCH] parisc: fix compile failure with kmap_atomic changes James Bottomley
  2010-10-28  5:18 ` John David Anglin
@ 2010-10-28 14:16 ` Kyle McMartin
  2010-10-28 14:26   ` James Bottomley
  1 sibling, 1 reply; 8+ messages in thread
From: Kyle McMartin @ 2010-10-28 14:16 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-mm, linux-arch, Parisc List, Peter Zijlstra

On Wed, Oct 27, 2010 at 01:35:47PM -0500, James Bottomley wrote:
> Author: Peter Zijlstra <a.p.zijlstra@chello.nl>
> 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).
> 
> Signed-off-by: James Bottomley <James.Bottomley@suse.de>

Signed-off-by: Kyle McMartin <kyle@redhat.com>

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

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] parisc: fix compile failure with kmap_atomic changes
  2010-10-28 14:16 ` Kyle McMartin
@ 2010-10-28 14:26   ` James Bottomley
  0 siblings, 0 replies; 8+ messages in thread
From: James Bottomley @ 2010-10-28 14:26 UTC (permalink / raw)
  To: Kyle McMartin; +Cc: linux-mm, linux-arch, Parisc List, Peter Zijlstra

On Thu, 2010-10-28 at 10:16 -0400, Kyle McMartin wrote:
> On Wed, Oct 27, 2010 at 01:35:47PM -0500, James Bottomley wrote:
> > Author: Peter Zijlstra <a.p.zijlstra@chello.nl>
> > 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).
> > 
> > Signed-off-by: James Bottomley <James.Bottomley@suse.de>
> 
> Signed-off-by: Kyle McMartin <kyle@redhat.com>
> 
> 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


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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] parisc: fix compile failure with kmap_atomic changes
  2010-10-28 14:03   ` James Bottomley
@ 2010-10-28 17:13     ` John David Anglin
  2010-10-28 17:39       ` James Bottomley
  0 siblings, 1 reply; 8+ messages in thread
From: John David Anglin @ 2010-10-28 17:13 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-mm, linux-arch, linux-parisc, peterz

> On Thu, 2010-10-28 at 01:18 -0400, John David Anglin wrote:
> > Signed-off-by: John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
> > 
> > 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
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] parisc: fix compile failure with kmap_atomic changes
  2010-10-28 17:13     ` John David Anglin
@ 2010-10-28 17:39       ` James Bottomley
  2010-10-28 18:11         ` John David Anglin
  0 siblings, 1 reply; 8+ messages in thread
From: James Bottomley @ 2010-10-28 17:39 UTC (permalink / raw)
  To: John David Anglin; +Cc: linux-mm, linux-arch, linux-parisc, peterz

On Thu, 2010-10-28 at 13:13 -0400, John David Anglin wrote:
> > On Thu, 2010-10-28 at 01:18 -0400, John David Anglin wrote:
> > > Signed-off-by: John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
> > > 
> > > 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.

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


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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] parisc: fix compile failure with kmap_atomic changes
  2010-10-28 17:39       ` James Bottomley
@ 2010-10-28 18:11         ` John David Anglin
  0 siblings, 0 replies; 8+ messages in thread
From: John David Anglin @ 2010-10-28 18:11 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-mm, linux-arch, linux-parisc, peterz

> 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
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-10-28 18:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-27 18:35 [PATCH] parisc: fix compile failure with kmap_atomic changes James Bottomley
2010-10-28  5:18 ` John David Anglin
2010-10-28 14:03   ` James Bottomley
2010-10-28 17:13     ` John David Anglin
2010-10-28 17:39       ` James Bottomley
2010-10-28 18:11         ` John David Anglin
2010-10-28 14:16 ` Kyle McMartin
2010-10-28 14:26   ` James Bottomley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).