Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1587949
| From | John Stultz <john.stultz@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: gcc7 log2 compile issues in kernel/time/timekeeping.c |
| Date | 2017-02-24 22:30 +0100 |
| Message-ID | <tevB7-65j-1@gated-at.bofh.it> (permalink) |
| References | <te6CK-54T-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Feb 23, 2017 at 10:43 AM, Laura Abbott <labbott@redhat.com> wrote:
> Hi,
>
> Fedora was previously carrying a workaround for a gcc7 issue reported
> on arm64 http://lists.infradead.org/pipermail/linux-arm-kernel/2016-October/461597.html.
> The workaround got rid of __ilog2_NaN. I dropped the patch this morning
> because a proper fix (29905b52fad0 ("log2: make order_base_2() behave
> correctly on const input value zero")) was merged. This fixed the arm64
> problem linked in the thread but there seems to be another issue in
> timekeeping.c:
>
> /kernel/time/timekeeping.c:2051: undefined reference to `____ilog2_NaN'
>
> Fedora enables CONFIG_CLOCKSOURCE_VALIDATE_LAST_CYCLE so I think the
> compiler is calculating a possible constant of 0 once again.
>
> Any ideas about a proper fix?
Huh. So if I understand this, its because we don't explicit checks for
offsec or cycle_interval being zero in:
shift = ilog2(offset) - ilog2(tk->cycle_interval);
Right?
Clearly that case isn't expected to happen, but if it did we'd want
the result of ilog2 to return zero. So I'm not sure if that
order_base_2() function is maybe the right function to use as it has
an explict zero check?
thanks
-john
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: gcc7 log2 compile issues in kernel/time/timekeeping.c John Stultz <john.stultz@linaro.org> - 2017-02-24 22:30 +0100
Re: gcc7 log2 compile issues in kernel/time/timekeeping.c Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-02-24 22:50 +0100
Re: gcc7 log2 compile issues in kernel/time/timekeeping.c Laura Abbott <labbott@redhat.com> - 2017-02-25 00:40 +0100
Re: gcc7 log2 compile issues in kernel/time/timekeeping.c Markus Trippelsdorf <markus@trippelsdorf.de> - 2017-02-25 09:20 +0100
Re: gcc7 log2 compile issues in kernel/time/timekeeping.c Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-02-25 10:20 +0100
Re: gcc7 log2 compile issues in kernel/time/timekeeping.c Markus Trippelsdorf <markus@trippelsdorf.de> - 2017-02-25 12:20 +0100
Re: gcc7 log2 compile issues in kernel/time/timekeeping.c Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-02-25 12:40 +0100
Re: gcc7 log2 compile issues in kernel/time/timekeeping.c Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-02-25 13:00 +0100
Re: gcc7 log2 compile issues in kernel/time/timekeeping.c Laura Abbott <labbott@redhat.com> - 2017-03-01 02:20 +0100
csiph-web