linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: "Liu, Jinsong" <jinsong.liu@intel.com>, len.brown@intel.com
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Kernel development list <linux-kernel@vger.kernel.org>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	"keir.xen@gmail.com" <keir.xen@gmail.com>,
	Jan Beulich <JBeulich@suse.com>,
	"Li, Shaohua" <shaohua.li@intel.com>,
	"lenb@kernel.org" <lenb@kernel.org>
Subject: Re: [Xen-devel] [PATCH 1/3] PAD helper for native and paravirt platform
Date: Tue, 21 Feb 2012 09:27:24 -0500	[thread overview]
Message-ID: <20120221142724.GB5652@phenom.dumpdata.com> (raw)
In-Reply-To: <DE8DF0795D48FD4CA783C40EC82923350A3E7C@SHSMSX101.ccr.corp.intel.com>

On Tue, Feb 21, 2012 at 05:49:58AM +0000, Liu, Jinsong wrote:
> Konrad Rzeszutek Wilk wrote:
> >>>>> +struct pv_pad_ops {
> >>>>> +	int (*acpi_pad_init)(void);
> >>>>> +	void (*acpi_pad_exit)(void);
> >>>>> +};
> >>>>> +
> >>> 
> >>> Looking at this a bit closer I am not sure why you choose the
> >>> paravirt interface for this? There is another one - the x86 that
> >>> could have been choosen. Or introduce a new one that is specific to
> >>> ACPI. 
> >>> 
> >>> I am curious - what was the reason for using the paravirt interface?
> >>> I understand it does get the job done, but it seems a bit overkill
> >>> when something simple could have been used?
> >>> 
> >> 
> >> It uses paravirt interface to avoid some code like 'xen_...' in
> >> native code path (acpi_pad.c). 
> >> I'm not quite sure what does 'x86' here mean? Adding 2 fields
> >> (acpi_pad_init/exit) in arch/x86/xen/enlighten.c --> xen_cpu_ops?
> >> seems it's much simpler.  
> > 
> > arch/x86/include/asm/x86_init.h
> > 
> > But before you go that way let me ask you another question - can ACPI
> > PAD 
> > be used on ARM or IA64? If so, wouldn't this fail compilation as this
> > pvops structure is not defined on IA64?
> 
> Ideally ACPI PAD is not bound to some arch, so IMO it could be used at least on IA64 (through currently no real PAD on IA64 platform as far as I know).
> However, in native acpi_pad implementation, it indeed depends on X86 for reason like mwait.
> So for xen acpi_pad, I think it's OK to choose x86, defining an acpi_pad_ops at x86_init.c which would be overwritten when xen init.

OK, or in osl.c. We need Len to chime in here as I can see this expanding in the future.
> 
> Another choice is to define config ACPI_PROCESSOR_AGGREGATOR as 'bool', which would disable native acpi_pad module.

Ewww. No.
> 
> Your opinion?
> 
> Thanks,
> Jinsong
> 
> > 
> > The other thing I am not comfortable about is that the pvops structure
> > are used for low-level code. Not for higher up, like ACPI. For that
> > another structure seems more prudent. Perhaps something like the x86
> > one, but specific to ACPI?

  reply	other threads:[~2012-02-21 14:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <DE8DF0795D48FD4CA783C40EC829233509D853@SHSMSX101.ccr.corp.intel.com>
2012-02-17 14:29 ` [PATCH 1/3] PAD helper for native and paravirt platform Konrad Rzeszutek Wilk
2012-02-17 14:47   ` [Xen-devel] " Konrad Rzeszutek Wilk
2012-02-19 12:14     ` Liu, Jinsong
2012-02-19 18:23       ` Konrad Rzeszutek Wilk
2012-02-21  5:49         ` Liu, Jinsong
2012-02-21 14:27           ` Konrad Rzeszutek Wilk [this message]
2012-02-22 17:02             ` Liu, Jinsong
2012-02-22 18:23               ` Konrad Rzeszutek Wilk
2012-02-23 13:26                 ` Liu, Jinsong

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=20120221142724.GB5652@phenom.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=JBeulich@suse.com \
    --cc=jinsong.liu@intel.com \
    --cc=keir.xen@gmail.com \
    --cc=len.brown@intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shaohua.li@intel.com \
    --cc=xen-devel@lists.xensource.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).