All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iwlegacy: mark il_adjust_beacon_interval as noinline
@ 2015-12-09 16:42 ` Arnd Bergmann
  0 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2015-12-09 16:42 UTC (permalink / raw)
  To: Stanislaw Gruszka, Kalle Valo
  Cc: linux-wireless, netdev, linux-kernel, linux-arm-kernel, nico

With the new optimized do_div() code, some versions of gcc
produce obviously incorrect code that leads to a link error
in iwlegacy/common.o:

drivers/built-in.o: In function `il_send_rxon_timing':
:(.text+0xa6b4d4): undefined reference to `____ilog2_NaN'
:(.text+0xa6b4f0): undefined reference to `__aeabi_uldivmod'

In a few thousand randconfig builds, I have seen this problem
a couple of times in this file, but never anywhere else in the
kernel, so we can try to work around this in the only file
that shows the behavior, by marking the il_adjust_beacon_interval
function as noinline, which convinces gcc to use the unoptimized
do_div() all the time.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

diff --git a/drivers/net/wireless/intel/iwlegacy/common.c b/drivers/net/wireless/intel/iwlegacy/common.c
index 887114582583..6308bb217454 100644
--- a/drivers/net/wireless/intel/iwlegacy/common.c
+++ b/drivers/net/wireless/intel/iwlegacy/common.c
@@ -3602,7 +3602,7 @@ il_is_ht40_tx_allowed(struct il_priv *il, struct ieee80211_sta_ht_cap *ht_cap)
 }
 EXPORT_SYMBOL(il_is_ht40_tx_allowed);
 
-static u16
+static u16 noinline
 il_adjust_beacon_interval(u16 beacon_val, u16 max_beacon_val)
 {
 	u16 new_val;


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

* [PATCH] iwlegacy: mark il_adjust_beacon_interval as noinline
@ 2015-12-09 16:42 ` Arnd Bergmann
  0 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2015-12-09 16:42 UTC (permalink / raw)
  To: linux-arm-kernel

With the new optimized do_div() code, some versions of gcc
produce obviously incorrect code that leads to a link error
in iwlegacy/common.o:

drivers/built-in.o: In function `il_send_rxon_timing':
:(.text+0xa6b4d4): undefined reference to `____ilog2_NaN'
:(.text+0xa6b4f0): undefined reference to `__aeabi_uldivmod'

In a few thousand randconfig builds, I have seen this problem
a couple of times in this file, but never anywhere else in the
kernel, so we can try to work around this in the only file
that shows the behavior, by marking the il_adjust_beacon_interval
function as noinline, which convinces gcc to use the unoptimized
do_div() all the time.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

diff --git a/drivers/net/wireless/intel/iwlegacy/common.c b/drivers/net/wireless/intel/iwlegacy/common.c
index 887114582583..6308bb217454 100644
--- a/drivers/net/wireless/intel/iwlegacy/common.c
+++ b/drivers/net/wireless/intel/iwlegacy/common.c
@@ -3602,7 +3602,7 @@ il_is_ht40_tx_allowed(struct il_priv *il, struct ieee80211_sta_ht_cap *ht_cap)
 }
 EXPORT_SYMBOL(il_is_ht40_tx_allowed);
 
-static u16
+static u16 noinline
 il_adjust_beacon_interval(u16 beacon_val, u16 max_beacon_val)
 {
 	u16 new_val;

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

* Re: [PATCH] iwlegacy: mark il_adjust_beacon_interval as noinline
  2015-12-09 16:42 ` Arnd Bergmann
@ 2015-12-09 17:13   ` Nicolas Pitre
  -1 siblings, 0 replies; 8+ messages in thread
From: Nicolas Pitre @ 2015-12-09 17:13 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Stanislaw Gruszka, Kalle Valo, linux-wireless, netdev,
	linux-kernel, linux-arm-kernel

On Wed, 9 Dec 2015, Arnd Bergmann wrote:

> With the new optimized do_div() code, some versions of gcc
> produce obviously incorrect code that leads to a link error
> in iwlegacy/common.o:
> 
> drivers/built-in.o: In function `il_send_rxon_timing':
> :(.text+0xa6b4d4): undefined reference to `____ilog2_NaN'
> :(.text+0xa6b4f0): undefined reference to `__aeabi_uldivmod'
> 
> In a few thousand randconfig builds, I have seen this problem
> a couple of times in this file, but never anywhere else in the
> kernel, so we can try to work around this in the only file
> that shows the behavior, by marking the il_adjust_beacon_interval
> function as noinline, which convinces gcc to use the unoptimized
> do_div() all the time.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Nicolas Pitre <nico@linaro.org>

> 
> diff --git a/drivers/net/wireless/intel/iwlegacy/common.c b/drivers/net/wireless/intel/iwlegacy/common.c
> index 887114582583..6308bb217454 100644
> --- a/drivers/net/wireless/intel/iwlegacy/common.c
> +++ b/drivers/net/wireless/intel/iwlegacy/common.c
> @@ -3602,7 +3602,7 @@ il_is_ht40_tx_allowed(struct il_priv *il, struct ieee80211_sta_ht_cap *ht_cap)
>  }
>  EXPORT_SYMBOL(il_is_ht40_tx_allowed);
>  
> -static u16
> +static u16 noinline
>  il_adjust_beacon_interval(u16 beacon_val, u16 max_beacon_val)
>  {
>  	u16 new_val;
> 
> 

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

* [PATCH] iwlegacy: mark il_adjust_beacon_interval as noinline
@ 2015-12-09 17:13   ` Nicolas Pitre
  0 siblings, 0 replies; 8+ messages in thread
From: Nicolas Pitre @ 2015-12-09 17:13 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, 9 Dec 2015, Arnd Bergmann wrote:

> With the new optimized do_div() code, some versions of gcc
> produce obviously incorrect code that leads to a link error
> in iwlegacy/common.o:
> 
> drivers/built-in.o: In function `il_send_rxon_timing':
> :(.text+0xa6b4d4): undefined reference to `____ilog2_NaN'
> :(.text+0xa6b4f0): undefined reference to `__aeabi_uldivmod'
> 
> In a few thousand randconfig builds, I have seen this problem
> a couple of times in this file, but never anywhere else in the
> kernel, so we can try to work around this in the only file
> that shows the behavior, by marking the il_adjust_beacon_interval
> function as noinline, which convinces gcc to use the unoptimized
> do_div() all the time.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Nicolas Pitre <nico@linaro.org>

> 
> diff --git a/drivers/net/wireless/intel/iwlegacy/common.c b/drivers/net/wireless/intel/iwlegacy/common.c
> index 887114582583..6308bb217454 100644
> --- a/drivers/net/wireless/intel/iwlegacy/common.c
> +++ b/drivers/net/wireless/intel/iwlegacy/common.c
> @@ -3602,7 +3602,7 @@ il_is_ht40_tx_allowed(struct il_priv *il, struct ieee80211_sta_ht_cap *ht_cap)
>  }
>  EXPORT_SYMBOL(il_is_ht40_tx_allowed);
>  
> -static u16
> +static u16 noinline
>  il_adjust_beacon_interval(u16 beacon_val, u16 max_beacon_val)
>  {
>  	u16 new_val;
> 
> 

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

* Re: [PATCH] iwlegacy: mark il_adjust_beacon_interval as noinline
  2015-12-09 16:42 ` Arnd Bergmann
@ 2015-12-10 11:08   ` Stanislaw Gruszka
  -1 siblings, 0 replies; 8+ messages in thread
From: Stanislaw Gruszka @ 2015-12-10 11:08 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Kalle Valo, linux-wireless, netdev, linux-kernel, linux-arm-kernel, nico

On Wed, Dec 09, 2015 at 05:42:41PM +0100, Arnd Bergmann wrote:
> With the new optimized do_div() code, some versions of gcc
> produce obviously incorrect code that leads to a link error
> in iwlegacy/common.o:
> 
> drivers/built-in.o: In function `il_send_rxon_timing':
> :(.text+0xa6b4d4): undefined reference to `____ilog2_NaN'
> :(.text+0xa6b4f0): undefined reference to `__aeabi_uldivmod'
> 
> In a few thousand randconfig builds, I have seen this problem
> a couple of times in this file, but never anywhere else in the
> kernel, so we can try to work around this in the only file
> that shows the behavior, by marking the il_adjust_beacon_interval
> function as noinline, which convinces gcc to use the unoptimized
> do_div() all the time.

I don't think this is good way to "fix" the issue, but also have
nothing against to this particular change.

Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>

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

* [PATCH] iwlegacy: mark il_adjust_beacon_interval as noinline
@ 2015-12-10 11:08   ` Stanislaw Gruszka
  0 siblings, 0 replies; 8+ messages in thread
From: Stanislaw Gruszka @ 2015-12-10 11:08 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Dec 09, 2015 at 05:42:41PM +0100, Arnd Bergmann wrote:
> With the new optimized do_div() code, some versions of gcc
> produce obviously incorrect code that leads to a link error
> in iwlegacy/common.o:
> 
> drivers/built-in.o: In function `il_send_rxon_timing':
> :(.text+0xa6b4d4): undefined reference to `____ilog2_NaN'
> :(.text+0xa6b4f0): undefined reference to `__aeabi_uldivmod'
> 
> In a few thousand randconfig builds, I have seen this problem
> a couple of times in this file, but never anywhere else in the
> kernel, so we can try to work around this in the only file
> that shows the behavior, by marking the il_adjust_beacon_interval
> function as noinline, which convinces gcc to use the unoptimized
> do_div() all the time.

I don't think this is good way to "fix" the issue, but also have
nothing against to this particular change.

Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>

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

* Re: iwlegacy: mark il_adjust_beacon_interval as noinline
  2015-12-09 16:42 ` Arnd Bergmann
@ 2015-12-11 11:50   ` Kalle Valo
  -1 siblings, 0 replies; 8+ messages in thread
From: Kalle Valo @ 2015-12-11 11:50 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Stanislaw Gruszka, linux-wireless, netdev, linux-kernel,
	linux-arm-kernel, nico


> With the new optimized do_div() code, some versions of gcc
> produce obviously incorrect code that leads to a link error
> in iwlegacy/common.o:
> 
> drivers/built-in.o: In function `il_send_rxon_timing':
> :(.text+0xa6b4d4): undefined reference to `____ilog2_NaN'
> :(.text+0xa6b4f0): undefined reference to `__aeabi_uldivmod'
> 
> In a few thousand randconfig builds, I have seen this problem
> a couple of times in this file, but never anywhere else in the
> kernel, so we can try to work around this in the only file
> that shows the behavior, by marking the il_adjust_beacon_interval
> function as noinline, which convinces gcc to use the unoptimized
> do_div() all the time.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Acked-by: Nicolas Pitre <nico@linaro.org>
> Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>

Thanks, applied to wireless-drivers-next.git.

Kalle Valo

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

* iwlegacy: mark il_adjust_beacon_interval as noinline
@ 2015-12-11 11:50   ` Kalle Valo
  0 siblings, 0 replies; 8+ messages in thread
From: Kalle Valo @ 2015-12-11 11:50 UTC (permalink / raw)
  To: linux-arm-kernel


> With the new optimized do_div() code, some versions of gcc
> produce obviously incorrect code that leads to a link error
> in iwlegacy/common.o:
> 
> drivers/built-in.o: In function `il_send_rxon_timing':
> :(.text+0xa6b4d4): undefined reference to `____ilog2_NaN'
> :(.text+0xa6b4f0): undefined reference to `__aeabi_uldivmod'
> 
> In a few thousand randconfig builds, I have seen this problem
> a couple of times in this file, but never anywhere else in the
> kernel, so we can try to work around this in the only file
> that shows the behavior, by marking the il_adjust_beacon_interval
> function as noinline, which convinces gcc to use the unoptimized
> do_div() all the time.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Acked-by: Nicolas Pitre <nico@linaro.org>
> Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>

Thanks, applied to wireless-drivers-next.git.

Kalle Valo

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

end of thread, other threads:[~2015-12-11 11:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-09 16:42 [PATCH] iwlegacy: mark il_adjust_beacon_interval as noinline Arnd Bergmann
2015-12-09 16:42 ` Arnd Bergmann
2015-12-09 17:13 ` Nicolas Pitre
2015-12-09 17:13   ` Nicolas Pitre
2015-12-10 11:08 ` Stanislaw Gruszka
2015-12-10 11:08   ` Stanislaw Gruszka
2015-12-11 11:50 ` Kalle Valo
2015-12-11 11:50   ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.