[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a1hDBVembCd+6=ENUWYFz=72JBTFMrKYZ2aFd+_Q04F+g@mail.gmail.com>
Date: Mon, 24 Aug 2020 20:54:28 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Michael Kelley <mikelley@...rosoft.com>
Cc: Will Deacon <will@...nel.org>, Ard Biesheuvel <ardb@...nel.org>,
Catalin Marinas <catalin.marinas@....com>,
Mark Rutland <mark.rutland@....com>,
Marc Zyngier <maz@...nel.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
gregkh <gregkh@...uxfoundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
linux-hyperv@...r.kernel.org,
linux-efi <linux-efi@...r.kernel.org>,
linux-arch <linux-arch@...r.kernel.org>, wei.liu@...nel.org,
Vitaly Kuznetsov <vkuznets@...hat.com>,
"K. Y. Srinivasan" <kys@...rosoft.com>,
Sunil Muthuswamy <sunilmut@...rosoft.com>,
Boqun Feng <boqun.feng@...il.com>
Subject: Re: [PATCH v7 05/10] arm64: hyperv: Add interrupt handlers for VMbus
and stimer
On Mon, Aug 24, 2020 at 6:46 PM Michael Kelley <mikelley@...rosoft.com> wrote:
>
> Add ARM64-specific code to set up and handle the interrupts
> generated by Hyper-V for VMbus messages and for stimer expiration.
>
> This code is architecture dependent and is mostly driven by
> architecture independent code in the VMbus driver and the
> Hyper-V timer clocksource driver.
>
> This code is built only when CONFIG_HYPERV is enabled.
>
> Signed-off-by: Michael Kelley <mikelley@...rosoft.com>
> ---
> arch/arm64/hyperv/Makefile | 2 +-
> arch/arm64/hyperv/mshyperv.c | 133 ++++++++++++++++++++++++++++++++++++++
> arch/arm64/include/asm/mshyperv.h | 70 ++++++++++++++++++++
I still have the feeling that most of the code in arch/arm64/hyperv/ is
misplaced: the only callers are loadable modules in drivers/hv/, and the
code is not really part of the architecture but part of the platform.
For the arm64 architecture, we have a rule that platform specific
code belongs into device drivers rather than into the architecture
code as we used to do in the linux-2.6 days for arch/arm/.
I don't see hyperv being virtual rather than an SoC as a differentiator
either; it's still just one of many platforms. If you look at
arch/arm64/xen/, you can see that they have managed to get
to a much simpler implementation in comparison.
I'm not sure what the correct solution should be, but what I'd try to
do here is to move every function that just considers the platform
rather than the architecture somewhere into drivers/hv where it
can be linked into the same modules as the existing files when
building for arm64, while trying to keep architecture specific code
in the header file where it can be included from those modules.
Arnd
Powered by blists - more mailing lists