All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: tim@xen.org, keir@xen.org, ian.campbell@citrix.com,
	george.dunlap@eu.citrix.com, andrew.cooper3@citrix.com,
	julien.grall@linaro.org, ian.jackson@eu.citrix.com,
	xen-devel@lists.xen.org
Subject: Re: [PATCH 2/2] x86: Don't use BAD_APICID for non-APICID fields
Date: Tue, 24 Mar 2015 09:50:56 -0400	[thread overview]
Message-ID: <55116BC0.3030401@oracle.com> (raw)
In-Reply-To: <55112966020000780006CD76@mail.emea.novell.com>

On 03/24/2015 04:07 AM, Jan Beulich wrote:
>>>> On 23.03.15 at 20:54, <boris.ostrovsky@oracle.com> wrote:
>> BAD_APICID is used by cpuinfo_x86's phys_proc_id, cpu_core_id
>> and compute_unit_id even though these fields don't hold an APIC ID
>> itself but rather its derivative.
>>
>> Provide appropriate macros for each of those three (and make them
>> unsigned).
>>
>> This also fixes regression introduced by commit 2090f14c5cbd ("sysctl:
>> make XEN_SYSCTL_topologyinfo sysctl a little more efficient") which
>> leaked BAD_APICID into common code, breaking ARM.
>>
>> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
>> Reported-by: Julien Grall <julien.grall@linaro.org>
>> ---
>>
>> I left sysctl with
>>
>>      cputopo.core = cpu_to_core(i);
>>      if ( cputopo.core == INVALID_COREID )
>>          cputopo.core = XEN_INVALID_CORE_ID;
>>      cputopo.socket = cpu_to_socket(i);
>>      if ( cputopo.socket == INVALID_SOCKETID )
>>          cputopo.socket = XEN_INVALID_SOCKET_ID;
>>
>> since this is the only place that would use suggested inlines for external
>> (public) calls.
> But again - why did you not avoid the new #defines and use the
> XEN_-prefixed ones right away?

I did want to use XEN_* macros but then I realized that I need a new 
#define for cpuinfo_x86.compute_unit_id as well. This #define does not 
need to be public so for consistency I thought that having 
hypervisor-internal INVALID_* macros would be better.


-boris

  reply	other threads:[~2015-03-24 13:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-23 19:54 [PATCH 0/2] A couple of regression fixes on ARM Boris Ostrovsky
2015-03-23 19:54 ` [PATCH 1/2] pci: Include asm/numa.h in pci.h Boris Ostrovsky
2015-03-24 10:07   ` Ian Campbell
2015-03-23 19:54 ` [PATCH 2/2] x86: Don't use BAD_APICID for non-APICID fields Boris Ostrovsky
2015-03-24  8:07   ` Jan Beulich
2015-03-24 13:50     ` Boris Ostrovsky [this message]
2015-03-23 21:28 ` [PATCH 0/2] A couple of regression fixes on ARM Julien Grall

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=55116BC0.3030401@oracle.com \
    --to=boris.ostrovsky@oracle.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=julien.grall@linaro.org \
    --cc=keir@xen.org \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xen.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.