Re: [PATCH 2/2] m68k: introduce a virtual m68k machine

From: Finn Thain
Date: Thu Sep 30 2021 - 21:08:51 EST


On Thu, 30 Sep 2021, Laurent Vivier wrote:

> Le 30/09/2021 à 22:56, John Paul Adrian Glaubitz a écrit :
> >
> > On 4/28/21 14:15, Laurent Vivier wrote:
> >>> I have tested and reviewed your patch, great work!
> >>> I'm confident this can make v5.14, with the small nits fixed.
> >>
> >> Thank you for your review.
> >>
> >> I will answer to some of your comments and update accordingly my patch.
> >
> > It looks like this patch somehow fell off the table, didn't it?
> >
> > I was hoping to be able to build a virt kernel for Debian/m68k by default
> > in the near future.
>
> Yes, I started to update my work according to the comments from Geert but didn't have time to finish.
>
> Especially I tried to remove the LEGACY_TIMER_TICK, but it doesn't work,

There was an RFC patch from Arnd to convert the mac platform from
LEGACY_TIMER_TICK to GENERIC_CLOCKEVENTS:
https://lore.kernel.org/linux-m68k/20201008154651.1901126-14-arnd@xxxxxxxx/
Arnd used a periodic clockevent device. I have a developmental branch
based on that patch.

Alternatively, I have a branch that implements a oneshot clockevent
device. This delivers GENERIC_CLOCKEVENTS and NO_HZ. For this I used VIA 1
timer 1 in free-running mode for the clocksource and VIA 1 timer 2 in
one-shot mode for the clockevent device. (But this does require some QEMU
improvements because there's no oneshot-mode in mos6522.c in mainline
QEMU.)

Anyway, it can be done. If you want to pursue it, perhaps we can
collaborate.

> and as it has been tested like this by you and most of the other m68k
> targets uses it I think I will let the patch with it.
>
> I'm going to update my patch to have a v2, at least to have fresh
> reviews.
>
> Thanks,
> Laurent
>