Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1287636 > unrolled thread
| Started by | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| First post | 2015-12-09 17:50 +0100 |
| Last post | 2015-12-10 12:20 +0100 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] iwlegacy: mark il_adjust_beacon_interval as noinline Arnd Bergmann <arnd@arndb.de> - 2015-12-09 17:50 +0100
Re: [PATCH] iwlegacy: mark il_adjust_beacon_interval as noinline Nicolas Pitre <nicolas.pitre@linaro.org> - 2015-12-09 18:20 +0100
Re: [PATCH] iwlegacy: mark il_adjust_beacon_interval as noinline Stanislaw Gruszka <sgruszka@redhat.com> - 2015-12-10 12:20 +0100
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2015-12-09 17:50 +0100 |
| Subject | [PATCH] iwlegacy: mark il_adjust_beacon_interval as noinline |
| Message-ID | <qDQ6e-2qX-9@gated-at.bofh.it> |
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;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Nicolas Pitre <nicolas.pitre@linaro.org> |
|---|---|
| Date | 2015-12-09 18:20 +0100 |
| Message-ID | <qDQzg-2Qo-15@gated-at.bofh.it> |
| In reply to | #1287636 |
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;
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Stanislaw Gruszka <sgruszka@redhat.com> |
|---|---|
| Date | 2015-12-10 12:20 +0100 |
| Message-ID | <qE7qq-5th-5@gated-at.bofh.it> |
| In reply to | #1287636 |
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> -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web