All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: xen-devel@lists.xenproject.org,
	Stefano Stabellini <sstabellini@kernel.org>,
	Julien Grall <julien@xen.org>,
	Bertrand Marquis <bertrand.marquis@arm.com>,
	Michal Orzel <michal.orzel@amd.com>,
	Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>,
	Anthony PERARD <anthony.perard@vates.tech>,
	Jan Beulich <jbeulich@suse.com>,
	Shawn Anastasio <sanastasio@raptorengineering.com>,
	Alistair Francis <alistair.francis@wdc.com>,
	Bob Eshleman <bobbyeshleman@gmail.com>,
	Connor Davis <connojdavis@gmail.com>,
	Oleksii Kurochko <oleksii.kurochko@gmail.com>
Subject: Re: [PATCH v3 4/8] pdx: allow per-arch optimization of PDX conversion helpers
Date: Mon, 4 Aug 2025 12:29:08 +0200	[thread overview]
Message-ID: <aJCLdAF21yTc6_yZ@macbook.local> (raw)
In-Reply-To: <4a051d46-d2f9-4dd7-9927-146834054579@citrix.com>

On Tue, Jul 29, 2025 at 03:54:24PM +0100, Andrew Cooper wrote:
> On 24/07/2025 12:04 pm, Roger Pau Monne wrote:
> > diff --git a/xen/arch/arm/include/asm/Makefile b/xen/arch/arm/include/asm/Makefile
> > index 4565baca6a4d..cec13c889dab 100644
> > --- a/xen/arch/arm/include/asm/Makefile
> > +++ b/xen/arch/arm/include/asm/Makefile
> > @@ -5,6 +5,7 @@ generic-y += hardirq.h
> >  generic-y += iocap.h
> >  generic-y += irq-dt.h
> >  generic-y += paging.h
> > +generic-y += pdx.h
> >  generic-y += percpu.h
> >  generic-y += random.h
> >  generic-y += softirq.h
> 
> Please could I talk you into using __has_include__, as I'm slowly trying
> to purge asm-generic.
> 
> > diff --git a/xen/include/xen/pdx.h b/xen/include/xen/pdx.h
> > index 10153da98bf1..91fc32370f21 100644
> > --- a/xen/include/xen/pdx.h
> > +++ b/xen/include/xen/pdx.h
> > @@ -159,6 +159,14 @@ static inline paddr_t directmapoff_to_maddr(unsigned long offset)
> >  
> >  #endif /* CONFIG_PDX_MASK_COMPRESSION */
> >  
> > +/*
> > + * Allow each architecture to define it's (possibly optimized) versions of the
> > + * translation functions.
> > + *
> > + * Do not use _xlate suffixed functions, always use the non _xlate variants.
> > + */
> > +#include <asm/pdx.h>
> > +
> 
> You want:
> 
> #if __has_include__(<asm/pdx.h>)
> # include <asm/pdx.h>
> #else
> 
> // common defaults.
> 
> #endif
> 
> here.  This lets you implement the x86 special case only, and keeps all
> the common logic in one file.

Sure, I wasn't aware of this functionality.

Thanks, Roger.


  reply	other threads:[~2025-08-04 10:29 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-24 11:04 [PATCH v3 0/8] pdx: introduce a new compression algorithm Roger Pau Monne
2025-07-24 11:04 ` [PATCH v3 1/8] kconfig: turn PDX compression into a choice Roger Pau Monne
2025-07-24 11:04 ` [PATCH v3 2/8] pdx: provide a unified set of unit functions Roger Pau Monne
2025-07-29 13:06   ` Jan Beulich
2025-07-24 11:04 ` [PATCH v3 3/8] pdx: introduce command line compression toggle Roger Pau Monne
2025-07-24 11:04 ` [PATCH v3 4/8] pdx: allow per-arch optimization of PDX conversion helpers Roger Pau Monne
2025-07-29 13:20   ` Jan Beulich
2025-07-29 14:54   ` Andrew Cooper
2025-08-04 10:29     ` Roger Pau Monné [this message]
2025-07-24 11:04 ` [PATCH v3 5/8] test/pdx: add PDX compression unit tests Roger Pau Monne
2025-07-24 11:04 ` [PATCH v3 6/8] pdx: move some helpers in preparation for new compression Roger Pau Monne
2025-07-24 11:04 ` [PATCH v3 7/8] pdx: introduce a new compression algorithm based on region offsets Roger Pau Monne
2025-07-29 14:16   ` Jan Beulich
2025-08-04 13:08     ` Roger Pau Monné
2025-08-04 13:40       ` Jan Beulich
2025-07-24 11:04 ` [PATCH v3 8/8] x86/mm: adjust loop in arch_init_memory() to iterate over the PDX space Roger Pau Monne
2025-07-29 14:33   ` Jan Beulich
2025-07-29 16:54     ` Roger Pau Monné
2025-07-30  5:31       ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aJCLdAF21yTc6_yZ@macbook.local \
    --to=roger.pau@citrix.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=alistair.francis@wdc.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=bertrand.marquis@arm.com \
    --cc=bobbyeshleman@gmail.com \
    --cc=connojdavis@gmail.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --cc=oleksii.kurochko@gmail.com \
    --cc=sanastasio@raptorengineering.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.