Mohammed reports (https://bugzilla.kernel.org/show_bug.cgi?id=213029)
the commit e4ab4658f1cf ("clocksource/drivers/hyper-v: Handle vDSO
differences inline") broke vDSO on x86. The problem appears to be that
VDSO_CLOCKMODE_HVCLOCK is an enum value in 'enum vdso_clock_mode' and
'#ifdef VDSO_CLOCKMODE_HVCLOCK' branch evaluates to false (it is not
a define). Replace it with CONFIG_X86 as it is the only arch which
has this mode currently.
Reported-by: Mohammed Gamal <redacted>
Fixes: e4ab4658f1cf ("clocksource/drivers/hyper-v: Handle vDSO differences inline")
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
---
drivers/clocksource/hyperv_timer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
From: Michael Kelley <hidden> Date: 2021-05-12 17:15:53
From: Vitaly Kuznetsov <vkuznets@redhat.com> Sent: Wednesday, May 12, 2021 1:47 AM
quoted hunk
Mohammed reports (https://bugzilla.kernel.org/show_bug.cgi?id=213029)
the commit e4ab4658f1cf ("clocksource/drivers/hyper-v: Handle vDSO
differences inline") broke vDSO on x86. The problem appears to be that
VDSO_CLOCKMODE_HVCLOCK is an enum value in 'enum vdso_clock_mode' and
'#ifdef VDSO_CLOCKMODE_HVCLOCK' branch evaluates to false (it is not
a define). Replace it with CONFIG_X86 as it is the only arch which
has this mode currently.
Reported-by: Mohammed Gamal <redacted>
Fixes: e4ab4658f1cf ("clocksource/drivers/hyper-v: Handle vDSO differences inline")
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
---
drivers/clocksource/hyperv_timer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Well, bummer. I thought I was being so clever. I hate having to base the
behavior directly on the architecture instead of the actual VDSO feature,
but I don't see a way to detect whether VDSO_CLOCKMODE_HVCLOCK is
defined or not. The other alternative would be to add another #define
such as VDSO_CLOCKMODE_HVCLOCK_PRESENT in
arch/x86/include/asm/vdso/clocksource.h, and use it in the #ifdefs
here. But that's a bit messy too, and I'm not sure it's worth the
trouble. So,
Reviewed-by: Michael Kelley <redacted>
Mohammed -- Thanks for finding this!
From: Thomas Gleixner <hidden> Date: 2021-05-12 20:46:11
On Wed, May 12 2021 at 10:46, Vitaly Kuznetsov wrote:
quoted hunk
Mohammed reports (https://bugzilla.kernel.org/show_bug.cgi?id=213029)
the commit e4ab4658f1cf ("clocksource/drivers/hyper-v: Handle vDSO
differences inline") broke vDSO on x86. The problem appears to be that
VDSO_CLOCKMODE_HVCLOCK is an enum value in 'enum vdso_clock_mode' and
'#ifdef VDSO_CLOCKMODE_HVCLOCK' branch evaluates to false (it is not
a define). Replace it with CONFIG_X86 as it is the only arch which
has this mode currently.
Reported-by: Mohammed Gamal <redacted>
Fixes: e4ab4658f1cf ("clocksource/drivers/hyper-v: Handle vDSO differences inline")
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
---
drivers/clocksource/hyperv_timer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
On Wed, May 12 2021 at 10:46, Vitaly Kuznetsov wrote:
quoted
Mohammed reports (https://bugzilla.kernel.org/show_bug.cgi?id=213029)
the commit e4ab4658f1cf ("clocksource/drivers/hyper-v: Handle vDSO
differences inline") broke vDSO on x86. The problem appears to be that
VDSO_CLOCKMODE_HVCLOCK is an enum value in 'enum vdso_clock_mode' and
'#ifdef VDSO_CLOCKMODE_HVCLOCK' branch evaluates to false (it is not
a define). Replace it with CONFIG_X86 as it is the only arch which
has this mode currently.
Reported-by: Mohammed Gamal <redacted>
Fixes: e4ab4658f1cf ("clocksource/drivers/hyper-v: Handle vDSO differences inline")
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
---
drivers/clocksource/hyperv_timer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
That's lame as it needs to be patched differently once ARM64 gains
support. What about the below?
The solution I liked the most was Michael's: no need to do anything
except for adding VDSO_CLOCKMODE_HVCLOCK to the enum. Too bad it didn't
work)
You proposal seems to be slightly better than mine: when adding
VDSO_CLOCKMODE_HVCLOCK to ARM the change will be limited to
drivers/clocksource/hyperv_timer.c will stay intact.
I'll send v2 shortly, thanks!