linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] next: sh: Fix compile error
@ 2015-01-07 20:32 Guenter Roeck
  2015-01-07 21:04 ` Paul E. McKenney
  0 siblings, 1 reply; 3+ messages in thread
From: Guenter Roeck @ 2015-01-07 20:32 UTC (permalink / raw)
  To: linux-sh
  Cc: linux-kernel, Guenter Roeck, Paul E. McKenney,
	Christian Borntraeger

Commit a91ed664749c ("kernel: tighten rules for ACCESS ONCE") results in a
compile failure for sh builds with CONFIG_X2TLB enabled.

arch/sh/mm/gup.c: In function 'gup_get_pte':
arch/sh/mm/gup.c:20:2: error: invalid initializer
make[1]: *** [arch/sh/mm/gup.o] Error 1

Replace ACCESS_ONCE with READ_ONCE to fix the problem.

Fixes: a91ed664749c ("kernel: tighten rules for ACCESS ONCE")
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
Compile tested only.

 arch/sh/mm/gup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/sh/mm/gup.c b/arch/sh/mm/gup.c
index 37458f3..e113bb4 100644
--- a/arch/sh/mm/gup.c
+++ b/arch/sh/mm/gup.c
@@ -17,7 +17,7 @@
 static inline pte_t gup_get_pte(pte_t *ptep)
 {
 #ifndef CONFIG_X2TLB
-	return ACCESS_ONCE(*ptep);
+	return READ_ONCE(*ptep);
 #else
 	/*
 	 * With get_user_pages_fast, we walk down the pagetables without
-- 
2.1.0


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

* Re: [PATCH] next: sh: Fix compile error
  2015-01-07 20:32 [PATCH] next: sh: Fix compile error Guenter Roeck
@ 2015-01-07 21:04 ` Paul E. McKenney
  2015-01-07 21:08   ` Christian Borntraeger
  0 siblings, 1 reply; 3+ messages in thread
From: Paul E. McKenney @ 2015-01-07 21:04 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: linux-sh, linux-kernel, Christian Borntraeger

On Wed, Jan 07, 2015 at 12:32:28PM -0800, Guenter Roeck wrote:
> Commit a91ed664749c ("kernel: tighten rules for ACCESS ONCE") results in a
> compile failure for sh builds with CONFIG_X2TLB enabled.
> 
> arch/sh/mm/gup.c: In function 'gup_get_pte':
> arch/sh/mm/gup.c:20:2: error: invalid initializer
> make[1]: *** [arch/sh/mm/gup.o] Error 1
> 
> Replace ACCESS_ONCE with READ_ONCE to fix the problem.
> 
> Fixes: a91ed664749c ("kernel: tighten rules for ACCESS ONCE")
> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

> Cc: Christian Borntraeger <borntraeger@de.ibm.com>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
> Compile tested only.
> 
>  arch/sh/mm/gup.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/sh/mm/gup.c b/arch/sh/mm/gup.c
> index 37458f3..e113bb4 100644
> --- a/arch/sh/mm/gup.c
> +++ b/arch/sh/mm/gup.c
> @@ -17,7 +17,7 @@
>  static inline pte_t gup_get_pte(pte_t *ptep)
>  {
>  #ifndef CONFIG_X2TLB
> -	return ACCESS_ONCE(*ptep);
> +	return READ_ONCE(*ptep);
>  #else
>  	/*
>  	 * With get_user_pages_fast, we walk down the pagetables without
> -- 
> 2.1.0
> 


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

* Re: [PATCH] next: sh: Fix compile error
  2015-01-07 21:04 ` Paul E. McKenney
@ 2015-01-07 21:08   ` Christian Borntraeger
  0 siblings, 0 replies; 3+ messages in thread
From: Christian Borntraeger @ 2015-01-07 21:08 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: paulmck, linux-sh, linux-kernel

Am 07.01.2015 um 22:04 schrieb Paul E. McKenney:
> On Wed, Jan 07, 2015 at 12:32:28PM -0800, Guenter Roeck wrote:
>> Commit a91ed664749c ("kernel: tighten rules for ACCESS ONCE") results in a
>> compile failure for sh builds with CONFIG_X2TLB enabled.
>>
>> arch/sh/mm/gup.c: In function 'gup_get_pte':
>> arch/sh/mm/gup.c:20:2: error: invalid initializer
>> make[1]: *** [arch/sh/mm/gup.o] Error 1
>>
>> Replace ACCESS_ONCE with READ_ONCE to fix the problem.
>>
>> Fixes: a91ed664749c ("kernel: tighten rules for ACCESS ONCE")
>> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> 
> Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

Applied to my tree, thanks.

Christian


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

end of thread, other threads:[~2015-01-07 21:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-07 20:32 [PATCH] next: sh: Fix compile error Guenter Roeck
2015-01-07 21:04 ` Paul E. McKenney
2015-01-07 21:08   ` Christian Borntraeger

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).