All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>,
	Linux PCI <linux-pci@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Linux PM list <linux-pm@vger.kernel.org>,
	ACPI Devel Mailing List <linux-acpi@vger.kernel.org>,
	Matthew Garrett <mjg59@srcf.ucam.org>
Subject: Re: [PATCH] PCI / ACPI: Make acpiphp ignore root bridges using SHPC native hotplug
Date: Mon, 07 Nov 2011 10:43:04 +0900	[thread overview]
Message-ID: <4EB737A8.3000208@jp.fujitsu.com> (raw)
In-Reply-To: <201111062311.28913.rjw@sisk.pl>

Thank you for doing this.
Looks good to me.

Reviewed-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>

Regards,
Kenji Kaneshige


(2011/11/07 7:11), Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki<rjw@sisk.pl>
>
> If the kernel has requested control of the SHPC native hotplug
> feature for a given root bridge, the acpiphp driver should not try
> to handle that root bridge and it should leave it to shpchp.
> Failing to do so causes problems to happen if shpchp is loaded
> and unloaded before loading acpiphp (ACPI-based hotplug won't work
> in that case anyway).
>
> To address this issue make find_root_bridges() ignore PCI root
> bridges with SHPC native hotplug enabled and make add_bridge()
> return error code if SHPC native hotplug is enabled for the given
> root bridge.  This causes acpiphp to refuse to load if SHPC native
> hotplug is enabled for all root bridges and to refuse binding to
> the root bridges with SHPC native hotplug enabled.
>
> Signed-off-by: Rafael J. Wysocki<rjw@sisk.pl>
> ---
>
> Jesse,
>
> This should apply to your linux-next branch.
>
> Thanks,
> Rafael
>
> ---
>   drivers/pci/hotplug/acpiphp_glue.c |    4 ++--
>   include/linux/acpi.h               |    4 ++++
>   2 files changed, 6 insertions(+), 2 deletions(-)
>
> Index: linux/include/linux/acpi.h
> ===================================================================
> --- linux.orig/include/linux/acpi.h
> +++ linux/include/linux/acpi.h
> @@ -302,6 +302,10 @@ extern bool osc_sb_apei_support_acked;
>   				OSC_PCI_EXPRESS_PME_CONTROL |		\
>   				OSC_PCI_EXPRESS_AER_CONTROL |		\
>   				OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL)
> +
> +#define OSC_PCI_NATIVE_HOTPLUG	(OSC_PCI_EXPRESS_NATIVE_HP_CONTROL |	\
> +				OSC_SHPC_NATIVE_HP_CONTROL)
> +
>   extern acpi_status acpi_pci_osc_control_set(acpi_handle handle,
>   					     u32 *mask, u32 req);
>   extern void acpi_early_init(void);
> Index: linux/drivers/pci/hotplug/acpiphp_glue.c
> ===================================================================
> --- linux.orig/drivers/pci/hotplug/acpiphp_glue.c
> +++ linux/drivers/pci/hotplug/acpiphp_glue.c
> @@ -467,7 +467,7 @@ static int add_bridge(acpi_handle handle
>   	 * granted by the BIOS for it.
>   	 */
>   	root = acpi_pci_find_root(handle);
> -	if (root&&  (root->osc_control_set&  OSC_PCI_EXPRESS_NATIVE_HP_CONTROL))
> +	if (root&&  (root->osc_control_set&  OSC_PCI_NATIVE_HOTPLUG))
>   		return -ENODEV;
>
>   	/* if the bridge doesn't have _STA, we assume it is always there */
> @@ -1395,7 +1395,7 @@ find_root_bridges(acpi_handle handle, u3
>   	if (!root)
>   		return AE_OK;
>
> -	if (root->osc_control_set&  OSC_PCI_EXPRESS_NATIVE_HP_CONTROL)
> +	if (root->osc_control_set&  OSC_PCI_NATIVE_HOTPLUG)
>   		return AE_OK;
>
>   	(*count)++;
>


  reply	other threads:[~2011-11-07  1:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-21 22:43 [PATCH] PCI / ACPI: Make acpiphp ignore root bridges using PCIe native hotplug Rafael J. Wysocki
2011-10-22 21:58 ` Yinghai Lu
2011-10-22 22:10   ` Rafael J. Wysocki
2011-10-25 13:10 ` Kenji Kaneshige
2011-10-25 13:25   ` Rafael J. Wysocki
2011-10-26  0:28     ` Kenji Kaneshige
2011-10-26 11:42       ` Rafael J. Wysocki
2011-10-28  2:45         ` Kenji Kaneshige
2011-11-06 22:11           ` [PATCH] PCI / ACPI: Make acpiphp ignore root bridges using SHPC " Rafael J. Wysocki
2011-11-07  1:43             ` Kenji Kaneshige [this message]
2011-11-11 17:49               ` Jesse Barnes

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=4EB737A8.3000208@jp.fujitsu.com \
    --to=kaneshige.kenji@jp.fujitsu.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mjg59@srcf.ucam.org \
    --cc=rjw@sisk.pl \
    /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.