All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: "Cihula, Joseph" <joseph.cihula@intel.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	"x86@kernel.org" <x86@kernel.org>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"tboot-devel@lists.sourceforge.net"
	<tboot-devel@lists.sourceforge.net>,
	"Wang, Shane" <shane.wang@intel.com>,
	"linux-pm@lists.linux-foundation.org"
	<linux-pm@lists.linux-foundation.org>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	"Brown, Len" <len.brown@intel.com>,
	"hpa@zytor.com" <hpa@zytor.com>, "Yu, Ke" <ke.yu@intel.com>,
	"liang.tang@oracle.com" <liang.tang@oracle.com>,
	"Tian, Kevin" <kevin.tian@intel.com>,
	"keir@xen.org" <keir@xen.org>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [Xen-devel] RE: [PATCH 2/7] x86, acpi, tboot: Have a ACPI sleep override instead of calling tboot_sleep.
Date: Wed, 07 Sep 2011 10:27:14 -0700	[thread overview]
Message-ID: <4E67A972.6030909@goop.org> (raw)
In-Reply-To: <9F57BF860713DF4BA3EFA4F8C6DFEDAC16F3F524@ORSMSX101.amr.corp.intel.com>

On 09/06/2011 09:20 PM, Cihula, Joseph wrote:
>> From: Konrad Rzeszutek Wilk [mailto:konrad.wilk@oracle.com]
>> Sent: Wednesday, August 31, 2011 11:31 AM
>>
>> The ACPI suspend path makes a call to tboot_sleep right before it writes the PM1A, PM1B values. We
>> replace the direct call to tboot via an registration callback similar to __acpi_register_gsi.
>>
>> CC: Thomas Gleixner <tglx@linutronix.de>
>> CC: "H. Peter Anvin" <hpa@zytor.com>
>> CC: x86@kernel.org
>> CC: Len Brown <len.brown@intel.com>
>> CC: Joseph Cihula <joseph.cihula@intel.com>
>> CC: Shane Wang <shane.wang@intel.com>
>> CC: xen-devel@lists.xensource.com
>> CC: linux-pm@lists.linux-foundation.org
>> CC: tboot-devel@lists.sourceforge.net
>> CC: linux-acpi@vger.kernel.org
>> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
>> ---
>>  arch/x86/include/asm/acpi.h   |    3 +++
>>  arch/x86/kernel/acpi/boot.c   |    3 +++
>>  arch/x86/kernel/tboot.c       |   13 +++++++++----
>>  drivers/acpi/acpica/hwsleep.c |   12 ++++++++++--
>>  include/linux/tboot.h         |    3 ++-
>>  5 files changed, 27 insertions(+), 7 deletions(-)
>>
>> diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h index 610001d..49864a1
>> 100644
>> --- a/arch/x86/include/asm/acpi.h
>> +++ b/arch/x86/include/asm/acpi.h
>> @@ -98,6 +98,9 @@ void acpi_pic_sci_set_trigger(unsigned int, u16);  extern int
>> (*__acpi_register_gsi)(struct device *dev, u32 gsi,
>>  				  int trigger, int polarity);
>>
>> +extern int (*__acpi_override_sleep)(u8 sleep_state, u32 pm1a_ctrl,
>> +				    u32 pm1b_ctrl, bool *skip_rest);
>> +
>>  static inline void disable_acpi(void)
>>  {
>>  	acpi_disabled = 1;
>> diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 4558f0d..d191b4c
>> 100644
>> --- a/arch/x86/kernel/acpi/boot.c
>> +++ b/arch/x86/kernel/acpi/boot.c
>> @@ -552,6 +552,9 @@ static int acpi_register_gsi_ioapic(struct device *dev, u32 gsi,  int
>> (*__acpi_register_gsi)(struct device *dev, u32 gsi,
>>  			   int trigger, int polarity) = acpi_register_gsi_pic;
>>
>> +int (*__acpi_override_sleep)(u8 sleep_state, u32 pm1a_ctrl,
>> +			     u32 pm1b_ctrl, bool *skip_rest) = NULL;
>> +
>>  /*
>>   * success: return IRQ number (>=0)
>>   * failure: return < 0
>> diff --git a/arch/x86/kernel/tboot.c b/arch/x86/kernel/tboot.c index 30ac65d..a18070c 100644
>> --- a/arch/x86/kernel/tboot.c
>> +++ b/arch/x86/kernel/tboot.c
>> @@ -41,7 +41,7 @@
>>  #include <asm/setup.h>
>>  #include <asm/e820.h>
>>  #include <asm/io.h>
>> -
>> +#include <linux/acpi.h>
>>  #include "acpi/realmode/wakeup.h"
>>
>>  /* Global pointer to shared data; NULL means no measured launch. */ @@ -270,7 +270,8 @@ static
>> void tboot_copy_fadt(const struct acpi_table_fadt *fadt)
>>  		offsetof(struct acpi_table_facs, firmware_waking_vector);  }
>>
>> -void tboot_sleep(u8 sleep_state, u32 pm1a_control, u32 pm1b_control)
>> +int tboot_sleep(u8 sleep_state, u32 pm1a_control, u32 pm1b_control,
>> +		 bool *skip_rest)
> Don't you need to use the 'unused' attrib on skip_rest in order to prevent compiler warnings?

No, gcc doesn't warn about unused parameters.

    J

  reply	other threads:[~2011-09-07 17:27 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-31 18:31 [RFC PATCH v1] ACPI S3 to work under Xen Konrad Rzeszutek Wilk
2011-08-31 18:31 ` [PATCH 1/7] x86: Expand the x86_msi_ops to have a restore MSIs Konrad Rzeszutek Wilk
2011-08-31 18:31 ` Konrad Rzeszutek Wilk
2011-08-31 18:31 ` [PATCH 2/7] x86, acpi, tboot: Have a ACPI sleep override instead of calling tboot_sleep Konrad Rzeszutek Wilk
2011-09-07  4:20   ` Cihula, Joseph
2011-09-07 17:27     ` Jeremy Fitzhardinge [this message]
2011-09-07 17:55       ` [Xen-devel] " Cihula, Joseph
2011-09-07 17:55       ` Cihula, Joseph
2011-09-07 17:27     ` Jeremy Fitzhardinge
2011-09-07  4:20   ` Cihula, Joseph
2011-08-31 18:31 ` Konrad Rzeszutek Wilk
2011-08-31 18:31 ` [PATCH 3/7] x86/acpi/sleep: Provide registration for acpi_suspend_lowlevel Konrad Rzeszutek Wilk
2011-08-31 18:31 ` Konrad Rzeszutek Wilk
2011-08-31 18:31 ` [PATCH 4/7] xen: Utilize the restore_msi_irqs hook Konrad Rzeszutek Wilk
2011-08-31 18:31 ` Konrad Rzeszutek Wilk
2011-08-31 18:31 ` [PATCH 5/7] xen/acpi: Domain0 acpi parser related platform hypercall Konrad Rzeszutek Wilk
2011-08-31 18:31 ` Konrad Rzeszutek Wilk
2011-09-07  5:50   ` Cihula, Joseph
2011-09-07  5:50   ` Cihula, Joseph
2011-09-07 17:29     ` [Xen-devel] " Jeremy Fitzhardinge
2011-09-07 17:29     ` Jeremy Fitzhardinge
2011-09-07 17:43       ` Cihula, Joseph
2011-09-07 19:06         ` Konrad Rzeszutek Wilk
2011-09-07 19:06         ` Konrad Rzeszutek Wilk
2011-09-08 13:38           ` Konrad Rzeszutek Wilk
2011-09-22 12:51             ` Konrad Rzeszutek Wilk
2011-09-08 13:38           ` Konrad Rzeszutek Wilk
2011-09-07 17:43       ` Cihula, Joseph
2011-09-21 19:29       ` Konrad Rzeszutek Wilk
2011-09-21 22:42         ` Jeremy Fitzhardinge
2011-08-31 18:31 ` [PATCH 6/7] xen/acpi/sleep: Enable ACPI sleep via the __acpi_override_sleep Konrad Rzeszutek Wilk
2011-08-31 18:31 ` Konrad Rzeszutek Wilk
2011-09-07  4:36   ` Cihula, Joseph
2011-09-07  4:36   ` Cihula, Joseph
2011-08-31 18:31 ` [PATCH 7/7] xen/acpi/sleep: Register to the acpi_suspend_lowlevel a callback Konrad Rzeszutek Wilk
2011-08-31 18:31 ` Konrad Rzeszutek Wilk
2011-09-01  6:58 ` [RFC PATCH v1] ACPI S3 to work under Xen Tian, Kevin
2011-09-01  6:58 ` Tian, Kevin
2011-09-02 11:52 ` [Xen-devel] " Stefano Stabellini
2011-09-02 11:52 ` Stefano Stabellini

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=4E67A972.6030909@goop.org \
    --to=jeremy@goop.org \
    --cc=hpa@zytor.com \
    --cc=joseph.cihula@intel.com \
    --cc=ke.yu@intel.com \
    --cc=keir@xen.org \
    --cc=kevin.tian@intel.com \
    --cc=konrad.wilk@oracle.com \
    --cc=len.brown@intel.com \
    --cc=liang.tang@oracle.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=shane.wang@intel.com \
    --cc=tboot-devel@lists.sourceforge.net \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --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 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.