All of lore.kernel.org
 help / color / mirror / Atom feed
From: Costin Lupu <costin.lupu@cs.pub.ro>
To: Tim Deegan <tim@xen.org>
Cc: xen-devel@lists.xenproject.org, Ian Jackson <iwj@xenproject.org>,
	Wei Liu <wl@xen.org>, Julien Grall <julien@xen.org>
Subject: Re: [PATCH 1/5] tools/debugger: Fix PAGE_SIZE redefinition error
Date: Fri, 30 Apr 2021 22:33:01 +0300	[thread overview]
Message-ID: <3e7f6771-1f1a-eb00-95f8-5ef6998091be@cs.pub.ro> (raw)
In-Reply-To: <YIxQMCOsy7snOFJ0@deinos.phlegethon.org>

On 4/30/21 9:45 PM, Tim Deegan wrote:
> At 14:36 +0300 on 30 Apr (1619793419), Costin Lupu wrote:
>> Hi Tim,
>>
>> On 4/29/21 10:58 PM, Tim Deegan wrote:
>>> Hi,
>>>
>>> At 15:05 +0300 on 27 Apr (1619535916), Costin Lupu wrote:
>>>> If PAGE_SIZE is already defined in the system (e.g. in
>>>> /usr/include/limits.h header) then gcc will trigger a redefinition error
>>>> because of -Werror. This commit also protects PAGE_SHIFT definitions for
>>>> keeping consistency.
>>>
>>> Thanks for looking into this!  I think properly speaking we should fix
>>> this by defining KDD_PAGE_SHIFT and KDD_PAGE_SIZE in kdd.h and using
>>> those everywhere we currently use PAGE_SIZE/PAGE_SHIFT. in kdd.c and
>>> kdd-xen.c.  If for some reason we ever ended up with a system-defined
>>> PAGE_SIZE that wasn't 4096u then we would not want to use it here
>>> because it would break our guest operations.
>>
>> As discussed for another patch of the series, an agreed solution that
>> would apply for other libs as well would be to use XC_PAGE_* macros
>> instead of PAGE_* macros. I've just sent a v2 doing that. Please let me
>> know if you think it would be better to introduce the KDD_PAGE_*
>> definitions instead.
> 
> Sorry to be annoying, but yes, please do introduce the KDD_ versions.
> All the xen-specific code in KDD lives in kdd-xen.c; kdd.c shouldn't
> include any xen headers.

No worries, will do. I imagined that might be the case for kdd.c, but I
wasn't sure.

Cheers,
Costin


  reply	other threads:[~2021-04-30 19:33 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-27 12:05 [PATCH 0/5] Fix redefinition errors for toolstack libs Costin Lupu
2021-04-27 12:05 ` [PATCH 1/5] tools/debugger: Fix PAGE_SIZE redefinition error Costin Lupu
2021-04-29 19:58   ` Tim Deegan
2021-04-30 11:36     ` Costin Lupu
2021-04-30 18:45       ` Tim Deegan
2021-04-30 19:33         ` Costin Lupu [this message]
2021-04-27 12:05 ` [PATCH 2/5] tools/libfsimage: Fix PATH_MAX " Costin Lupu
2021-04-28  9:04   ` Julien Grall
2021-04-28 18:35     ` Costin Lupu
2021-04-29 11:39       ` Julien Grall
2021-04-27 12:05 ` [PATCH 3/5] tools/libs/foreignmemory: Fix PAGE_SIZE " Costin Lupu
2021-04-28  9:03   ` Julien Grall
2021-04-28 18:27     ` Costin Lupu
2021-04-29 11:29       ` Julien Grall
2021-04-27 12:05 ` [PATCH 4/5] tools/libs/gnttab: " Costin Lupu
2021-04-27 12:05 ` [PATCH 5/5] tools/ocaml: Fix redefinition errors Costin Lupu
2021-04-28 12:34 ` [PATCH 0/5] Fix redefinition errors for toolstack libs Christian Lindig
2021-04-28 18:37   ` Costin Lupu

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=3e7f6771-1f1a-eb00-95f8-5ef6998091be@cs.pub.ro \
    --to=costin.lupu@cs.pub.ro \
    --cc=iwj@xenproject.org \
    --cc=julien@xen.org \
    --cc=tim@xen.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    --subject='Re: [PATCH 1/5] tools/debugger: Fix PAGE_SIZE redefinition error' \
    /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

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.