All of lore.kernel.org
 help / color / mirror / Atom feed
From: oleksii.kurochko@gmail.com
To: "Roger Pau Monné" <roger.pau@citrix.com>,
	"Jan Beulich" <jbeulich@suse.com>
Cc: xen-devel@lists.xenproject.org, Jan Beulich <jbeulich@suse.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Julien Grall <julien@xen.org>,
	Stefano Stabellini <sstabellini@kernel.org>
Subject: Re: [PATCH v4 1/6] xen: introduce SIMPLE_DECL_SECTION
Date: Fri, 27 Sep 2024 12:42:50 +0200	[thread overview]
Message-ID: <d06c89fed69930f03db078d3d9d633026d5a604a.camel@gmail.com> (raw)
In-Reply-To: <ZvZ9zkCme0r8bqmC@macbook.local>

On Fri, 2024-09-27 at 11:41 +0200, Roger Pau Monné wrote:
> On Fri, Sep 27, 2024 at 11:07:58AM +0200,
> oleksii.kurochko@gmail.com wrote:
> > On Fri, 2024-09-27 at 09:58 +0200, Roger Pau Monné wrote:
> > > On Thu, Sep 26, 2024 at 06:54:20PM +0200, Oleksii Kurochko wrote:
> > > > Introduce SIMPLE_DECL_SECTION to cover the case when
> > > > an architecture wants to declare a section without specifying
> > > > of load address for the section.
> > > > 
> > > > Update x86/xen.lds.S to use SIMPLE_DECL_SECTION.
> > > 
> > > No strong opinion, but I feel SIMPLE is not very descriptive.  It
> > > might be better to do it the other way around: introduce a define
> > > for
> > > when the DECL_SECTION macro should specify a load address:
> > > DECL_SECTION_WITH_LADDR for example.
> > In the next patch, two sections are introduced: dt_dev_info and
> > acpi_dev_info. The definition of these sections has been made
> > common
> > and moved to xen.lds.h, and it looks like this:
> >    +#define DT_DEV_INFO(secname)    \
> >    +  . = ALIGN(POINTER_ALIGN);     \
> >    +  DECL_SECTION(secname) {       \
> >    +       _sdevice = .;           \
> >    +       *(secname)              \
> >    +       _edevice = .;           \
> >    +  } :text
> > (A similar approach is used for ACPI, please refer to the next
> > patch in
> > this series.)
> > 
> > For PPC, DECL_SECTION should specify a load address, whereas for
> > Arm
> > and RISC-V, it should not.
> > 
> > With this generalization, the name of DECL_SECTION should have the
> > same
> > name in both cases, whether a load address needs to be specified or
> > not
> 
> Oh, sorry, I think you misunderstood my suggestion.
> 
> I'm not suggesting to introduce a new macro named
> DECL_SECTION_WITH_LADDR(), but rather to use DECL_SECTION_WITH_LADDR
> instead of SIMPLE_DECL_SECTION in order to signal whether
> DECL_SECTION() should specify a load address or not, iow:
> 
> #ifdef DECL_SECTION_WITH_LADDR
> # define DECL_SECTION(x) x : AT(ADDR(x) - __XEN_VIRT_START)
> #else
> # define DECL_SECTION(x) x :
> #endif
Thanks for the clarification, I really misunderstood your initial
suggestion.

I'm okay with the renaming; perhaps it will indeed make things a bit
clearer.

If Jan doesn’t mind (since he gave the Ack), I'll rename the define in
the next patch version.
Jan, do you mind if I proceed with the renaming?

~ Oleksii


  reply	other threads:[~2024-09-27 10:43 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-26 16:54 [PATCH v4 0/6] Move {acpi_}device_init() and device_get_class() to common code Oleksii Kurochko
2024-09-26 16:54 ` [PATCH v4 1/6] xen: introduce SIMPLE_DECL_SECTION Oleksii Kurochko
2024-09-27  6:36   ` Jan Beulich
2024-09-27  7:58   ` Roger Pau Monné
2024-09-27  9:07     ` oleksii.kurochko
2024-09-27  9:41       ` Roger Pau Monné
2024-09-27 10:42         ` oleksii.kurochko [this message]
2024-09-27 11:59           ` Jan Beulich
2024-09-26 16:54 ` [PATCH v4 2/6] xen: define ACPI and DT device info sections macros Oleksii Kurochko
2024-09-27  6:38   ` Jan Beulich
2024-09-27  7:28   ` Jan Beulich
2024-09-27  9:24     ` oleksii.kurochko
2024-09-26 16:54 ` [PATCH v4 3/6] xen/arm: use {DT,ACPI}_DEV_INFO for device info sections Oleksii Kurochko
2024-09-27  7:16   ` Michal Orzel
2024-09-27  9:17     ` oleksii.kurochko
2024-09-26 16:54 ` [PATCH v4 4/6] xen/ppc: add section for device information in linker script Oleksii Kurochko
2024-09-26 16:54 ` [PATCH v4 5/6] xen/riscv: " Oleksii Kurochko
2024-09-27  6:39   ` Jan Beulich
2024-09-26 16:54 ` [PATCH v4 6/6] xen/common: move device initialization code to common code Oleksii Kurochko
2024-09-27  7:40   ` Michal Orzel

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=d06c89fed69930f03db078d3d9d633026d5a604a.camel@gmail.com \
    --to=oleksii.kurochko@gmail.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=roger.pau@citrix.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.