[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 2/2] xen: move arm/include/asm/vm_event.h to asm-generic


  • To: Oleksii <oleksii.kurochko@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 31 Aug 2023 18:11:26 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=4secnyOR9xjOEmdLFhXnwxRHt1I72HTXMJCoq5dR7m0=; b=c5712NtdKIEb1NRuwSZuGubXdOwzZIGUJmmpYPB8ECh+kSLImiy+TDYpH6Ka3jP8+Z+xaRbLr7Vw+qxeKQ+9RVTKCqUFnWb4yxo+ErDGJUenEzz5vkePXPSmphfkrTGa2a0IpT3Wm6qNajiHh9X4fi7HL5F7htUNakFYX7HOaX+pTEh4Z4sdsOzrdbADJ0QnNMp9zmwqXYMj5/yrissbR56zkjnyffjR6ZArbCuAdarLFf8VKNrFBjntY0MEg++YyWrWVvxurXaaywl8sywFhS7X89JcY+CfhgZsJ7qTBVUPOtAYTElloxqusouhJRT6kt0hPEd1Qjolnr0XCW6JSg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QnnMsx+wpJhRkj3+ed6mYC0KeVvPmZlKkpbFptfg5htMFV5ki5Mqlmrk9+bMo9VEyJKJoqONYAQhVRcM2jSgvE0WUhuyeRSPNBnnqOLfgEESItlAWKuEO80+A2QY3UaxSU61sMqjaIYXamgBoD0TWPYokM1+P9xNEw0jzcVSsW4aQ5ZoDcrD9UDN6K5qE2UjhdAp8PATskm/gfr27RbW6SEs8BoQ9ljFy9yWLlRbarhT+cDTNyYWdQ9Bqyzzx8m/og4PsJ18hAxOILJbqYEnWBp49ILSBr19Ba1CTMFSmU4tB2I88UpLY4UWNewD2Q1qgWhSa6jxobv4xFJ495FQ3w==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 31 Aug 2023 16:11:40 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 31.08.2023 16:02, Oleksii wrote:
> On Thu, 2023-08-31 at 11:46 +0200, Jan Beulich wrote:
>> On 30.08.2023 18:57, Oleksii Kurochko wrote:
>>> ---
>>>  xen/arch/arm/include/asm/vm_event.h    | 66 ----------------------
>>> ----
>>>  xen/include/asm-generic/asm/vm_event.h | 55 +++++++++++++++++++++
>>>  2 files changed, 55 insertions(+), 66 deletions(-)
>>>  delete mode 100644 xen/arch/arm/include/asm/vm_event.h
>>>  create mode 100644 xen/include/asm-generic/asm/vm_event.h
>>
>> While it's a comment on the first patch, it's really better making
>> here:
>> Did you look at Linux? They don't put an intermediate asm/ here.
>> Instead
>> see their scripts/Makefile.asm-generic. That way an arch still has
>> control which generic headers it gets access to, without duplicating
>> any
>> of them.
> 
> IIUC scripts/Makefile.asm-generic script is needed to generate a
> wrapper for a header which will contain:
> #include <asm-generic/some.h>
> if it is mentioned generic-y += some.h in
> arch/${ARCH}/include/asm/Kbuild.
> 
> But do we need this generated wrapper header?
> Do we need all the support of generic-y in Kbuild, etc.?

For a single header we could likely get away without. But vm_event.h is
only the first example.

> In the previous patch of this patch series, it was added inclusion of
> $(srctree)/include/asm-generic after the inclusion of
> $(srctree)/arch/$(SRCARCH)/include so it will first look if the arch-
> specific header exists, and if not then use generic one.
> 
> Probably I misunderstood you and your suggestion was to have
> scripts/Makefile.asm-generic which will generate folder asm/ with
> necessary headers in arch specific folder?

Yes.

> So basically it was just a
> question if asm/ folder should exist in $(srctree)/include/asm-generic
> or not?

Not really, no. For "#include <asm/...>" to work, you can't simply omit
asm/ under asm-generic/. That's where the generated wrapper headers
come into play.

> One more thing I would like to clarify is the duplicating of the
> headers you mentioned above.
> But if the architecture doesn't want to use a generic header, then it
> still needs to add the header to arch/${ARCH}/include/asm and remove
> mention of the header from arch/${ARCH}/include/asm/Kbuild.

But then it's using its own custom header, not a duplication of whatever
is the (in the case here) stub one.

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.