public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Kristen Accardi <kristen.c.accardi@intel.com>
To: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Cc: pcihpd-discuss@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, greg@kroah.com
Subject: Re: [Pcihpd-discuss] [patch] pci hotplug: add common acpi functions to core
Date: Wed, 01 Mar 2006 14:42:21 -0800	[thread overview]
Message-ID: <1141252941.13333.31.camel@whizzy> (raw)
In-Reply-To: <44050A17.9030506@jp.fujitsu.com>

On Wed, 2006-03-01 at 11:42 +0900, Kenji Kaneshige wrote:
> Hi Kristen,
> 
> Here is one more comment.
> 
> > +void acpi_get_hp_params_from_firmware(struct pci_dev *dev,
> > +		struct hotplug_params *hpp)
> > +{
> > +	acpi_status status = AE_NOT_FOUND;
> > +	struct pci_dev *pdev = dev;
> > +
> > +	/*
> > +	 * _HPP settings apply to all child buses, until another _HPP is
> > +	 * encountered. If we don't find an _HPP for the input pci dev,
> > +	 * look for it in the parent device scope since that would apply to
> > +	 * this pci dev. If we don't find any _HPP, use hardcoded defaults
> > +	 */
> > +	while (pdev && (ACPI_FAILURE(status))) {
> > +		acpi_handle handle = DEVICE_ACPI_HANDLE(&(pdev->dev));
> > +		if (!handle)
> > +			break;
> > +		status = acpi_run_hpp(handle, hpp);
> > +		if (!(pdev->bus->parent))
> > +			break;
> > +		/* Check if a parent object supports _HPP */
> > +		pdev = pdev->bus->parent->self;
> > +	}
> > +}
> > +EXPORT_SYMBOL_GPL(acpi_get_hp_params_from_firmware);
> 
> I think the acpi_get_hp_params_from_firmware() function assumes that
> users set default hpp parameters into *hpp before calling this function.
> I think it is very hard for new users of the function to notice it, so
> I think this assumption should be removed.
> 
> Thanks,
> Kenji Kaneshige
> 

Are you suggesting that we have the defaults set within this function?
I would like to change acpiphp to use the same functions to get hpp
values eventually (in a different patch), but I notice that acpiphp sets
the default cache line size to 8, while shpchp sets the default cache
line size to 16.  So it seems like it would be better to allow drivers
to set the default themselves, unless one of these drivers is doing the
wrong thing and using the wrong default value.



  reply	other threads:[~2006-03-01 22:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-01  0:46 [patch] pci hotplug: add common acpi functions to core Kristen Accardi
2006-03-01  0:53 ` Greg KH
2006-03-01  2:01 ` Randy.Dunlap
2006-03-01  2:03 ` [Pcihpd-discuss] " Kenji Kaneshige
2006-03-01 22:56   ` Kristen Accardi
2006-03-01  2:42 ` Kenji Kaneshige
2006-03-01 22:42   ` Kristen Accardi [this message]
2006-03-02  3:18     ` Kenji Kaneshige
2006-03-02 23:38       ` Kristen Accardi
2006-03-03 18:16 ` [patch] pci hotplug: add common acpi functions to core v2 Kristen Accardi

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=1141252941.13333.31.camel@whizzy \
    --to=kristen.c.accardi@intel.com \
    --cc=greg@kroah.com \
    --cc=kaneshige.kenji@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pcihpd-discuss@lists.sourceforge.net \
    /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