All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Daniel Kiper <daniel.kiper@oracle.com>
Cc: keir@xen.org, ian.campbell@citrix.com,
	stefano.stabellini@eu.citrix.com,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	roy.franz@linaro.org, ning.sun@intel.com,
	ross.philipson@citrix.com, xen-devel@lists.xenproject.org,
	qiaowei.ren@intel.com, richard.l.maliszewski@intel.com,
	gang.wei@intel.com, fu.wei@linaro.org
Subject: Re: [PATCH v2 1/5] xen/x86: Introduce MultiBoot Data (MBD) type
Date: Thu, 25 Sep 2014 14:24:56 +0100	[thread overview]
Message-ID: <542433C80200007800038FFC@mail.emea.novell.com> (raw)
In-Reply-To: <20140925125640.GU3459@olila.local.net-space.pl>

>>> On 25.09.14 at 14:56, <daniel.kiper@oracle.com> wrote:
> On Thu, Sep 25, 2014 at 10:22:16AM +0100, Jan Beulich wrote:
>> >>> On 24.09.14 at 20:40, <andrew.cooper3@citrix.com> wrote:
>> > On 24/09/14 18:19, Daniel Kiper wrote:
>> >> +typedef unsigned char u8;
>> >> +typedef unsigned short u16;
>> >> +typedef unsigned long u32;
>> >> +typedef unsigned long long u64;
>> >> +
>> >> +#include "../../../include/xen/compiler.h"
>> >> +#include "../../../include/xen/multiboot.h"
>> >> +
>> >> +#include "../../../include/asm/mbd.h"
>> >
>> > How about playing with -I for this file in the Makefile to allow
>> > #include <xen/compiler.h> and so ?
>>
>> Including these here is bogus anyway, even if for the ones above it's
> 
> Hmmm... Why it is bogus?

Because the headers aren't intended for the environment this code
runs in.

>> perhaps acceptable. But expressing it to be bogus via the ../../../
>> prefix is quite desirable imo.
> 
> I have been thinking about that since I saw this first time. Why we could
> not use -I gcc option here? Could you enlighten me?

For aforementioned reason: Once we make it easy and seamless to
include further headers, the risk of depending on something this code
shouldn't depend on grows.

Apart from that you also need to deal with dependency tracking if
you include new headers here - please see the Makefile for how
this needs to be done (and which really should have got dropped
by 46fce9fd2b3 ["x86: get rid of BOOT_TRAMPOLINE"]). And yes,
the existing inclusion of multiboot.h is lacking dependency tracking
too (but as usual this is no excuse to continue with this bad practice).

Which points at another issue making it (right now at least) desirable
to don't make it a nobrainer to include further ones: Non-leaf ones
would likely cause missed dependencies as long as they need to be
tracked manually.

>> >> +
>> >> +/*
>> >> + * __HERE__ IS ENTRY POINT!!!
>> >
>> > I am still of the firm opinion that anyone capable of editing this file
>> > ought to know understand the _start symbol, making this comment useless.
>>
>> Indeed.
> 
> We know this right now. However, I spent some time to discover this at
> the beginning of this work. This file is full of magic so I think that
> this comment helps a bit to understand what is going on. So, please
> do me a favor and let's leave it here. If you wish I can use lowercase
> and remove underscore.

And remove the three exclamation marks and fix the grammar.
All in all - much preferred - just drop the comment.

> Additionally, I removed similar comment for
> __reloc() (as you requested) which does not make sense if it is
> prefixed with static.

Making a function referenced from inline assembly only static is likely
wrong anyway. No idea though why removing a similar comment
there would be an issue.

Jan

  reply	other threads:[~2014-09-25 13:25 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-24 17:19 [PATCH v2 0/5] xen: Break multiboot (v1) dependency and add multiboot2 support Daniel Kiper
2014-09-24 17:19 ` [PATCH v2 1/5] xen/x86: Introduce MultiBoot Data (MBD) type Daniel Kiper
2014-09-24 18:40   ` Andrew Cooper
2014-09-25  9:22     ` Jan Beulich
2014-09-25 12:56       ` Daniel Kiper
2014-09-25 13:24         ` Jan Beulich [this message]
2014-09-25 19:24     ` Daniel Kiper
2014-09-26  8:13       ` Jan Beulich
2014-09-24 17:19 ` [PATCH v2 2/5] xen/x86: Define e820 entries counter as unsigned int Daniel Kiper
2014-09-24 18:10   ` Andrew Cooper
2014-09-24 17:19 ` [PATCH v2 3/5] xen/x86: Migrate to boot_info structure Daniel Kiper
2014-09-24 19:00   ` Andrew Cooper
2014-09-25  9:43   ` Ian Campbell
2014-09-25 12:32     ` Daniel Kiper
2014-09-24 17:19 ` [PATCH v2 4/5] xen/x86: Use constant as multiboot protocol identifier Daniel Kiper
2014-09-24 18:11   ` Andrew Cooper
2014-09-24 17:19 ` [PATCH v2 5/5] xen/x86: Add multiboot2 protocol support Daniel Kiper
2014-09-24 19:14   ` Andrew Cooper
2014-09-25 18:42     ` Daniel Kiper
2014-09-25 18:52       ` Andrew Cooper
2014-09-24 17:48 ` [PATCH v2 0/5] xen: Break multiboot (v1) dependency and add multiboot2 support Roy Franz
2014-09-25  9:15   ` Jan Beulich
2014-09-25  9:45     ` Ian Campbell
2014-09-25 13:01     ` Daniel Kiper
2014-09-25 15:56       ` Roy Franz
2014-09-25 19:47         ` Daniel Kiper

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=542433C80200007800038FFC@mail.emea.novell.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=daniel.kiper@oracle.com \
    --cc=fu.wei@linaro.org \
    --cc=gang.wei@intel.com \
    --cc=ian.campbell@citrix.com \
    --cc=keir@xen.org \
    --cc=ning.sun@intel.com \
    --cc=qiaowei.ren@intel.com \
    --cc=richard.l.maliszewski@intel.com \
    --cc=ross.philipson@citrix.com \
    --cc=roy.franz@linaro.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --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.