All of lore.kernel.org
 help / color / mirror / Atom feed
From: <Jordan_Hargrave@Dell.com>
To: minyard@acm.org
Cc: Matt_Domsch@Dell.com, alexey.y.starikovskiy@linux.intel.com,
	linux-acpi@vger.kernel.org,
	openipmi-developer@lists.sourceforge.net, lenb@kernel.org,
	bjorn.helgaas@hp.com
Subject: RE: [Openipmi-developer] acpi_find_bmc() and acpi_get_table()
Date: Wed, 28 Feb 2007 16:05:41 -0600	[thread overview]
Message-ID: <5DDAB7BA7BDB58439DD0EED0B8E9A3AE073884@ausx3mpc102.aus.amer.dell.com> (raw)
In-Reply-To: 45E5F733.8080708@acm.org

The reason for the acpi_bus_register/unregister is to get the handle of the IPMI ACPI object.  There isn't a way to get the device handle otherwise.  Once it gets the handle it doesn't need the ACPI device anymore.  It's not the best solution, but the current way that the SI driver initializes (at least with SLES and older RHEL3/4) doesn't match up well with the way that the ACPI drivers initialize.  Actually for RHEL5 I could make this cleaner, moving the try_init_acpidev code into the acpi_ipmi_add; then set a global variable to show that it initialized properly to pass back to try_init_xxxx.  For older OpenIPMI driver code this doesn't mesh so well as the try_init_xxx routines take a smi_info ** argument and we can't pass this to the ACPI add routine.

--jordan hargrave
Dell Enterprise Linux Engineering



-----Original Message-----
From: Corey Minyard [mailto:minyard@acm.org]
Sent: Wed 2/28/2007 3:42 PM
To: Hargrave, Jordan
Cc: Domsch, Matt; alexey.y.starikovskiy@linux.intel.com; linux-acpi@vger.kernel.org; openipmi-developer@lists.sourceforge.net; lenb@kernel.org; bjorn.helgaas@hp.com
Subject: Re: [Openipmi-developer] acpi_find_bmc() and acpi_get_table()
 
Jordan_Hargrave@Dell.com wrote:
> Corey,
>
>   Here is the patch (RHEL5 base code) I've been testing that detects the ACPI namespace object.
> The IPI0001 device doesn't contain the register spacing directly; it has a _CRS resource object that
> (for KCS) has two I/O port entries.  I save the first port in io.addr_data, then calculate the register spacing based on subtracting the 2nd port address and the 1st.
>   
This patch looks pretty good, comments inline below.
> I'm thinking of changing the register spacing to using an array of port/memory addresses to make calculating interface addresses more generic.
>   
Ok, I'll wait until you are sure here.  The changes below are fine, they
neaten things up a little.  It would probably need to be a separate patch.
> eg.
> static unsigned char port_inb(struct si_sm_io *io, unsigned int offset)
> {
>         unsigned int addr = io->addr_data;
>
>         return inb(addr + (offset * io->regspacing));
> }
>
> would become something like:
> static unsigned char port_inb(struct si_sm_io *io, unsigned int offset)
> {
>         unsigned int addr = io->addr_data[offset];
>
>         return inb(addr);
> }
>
> --jordan hargrave
> Dell Enterprise Linux Engineering
>
>
>   
> +
> +static struct acpi_driver acpi_ipmi_driver = {
> +  .name = ACPI_IPMI_DRIVER_NAME,
> +  .class = ACPI_IPMI_CLASS,
> +  .ids = ACPI_IPMI_HID,
> +  .ops = {
> +    .add = acpi_ipmi_add,
> +    .remove = acpi_ipmi_remove,
> +  },
> +};
>   
Need to fix the indention above.

Also, we need to delete the old code, I think.
> @@ -1576,6 +1694,12 @@ static __devinit void acpi_find_bmc(void
>  	if (acpi_failure)
>  		return;
>  
> +	/* Really we only need to get the IPMI device handle here */
> +	acpi_bus_register_driver(&acpi_ipmi_driver);
> +	acpi_bus_unregister_driver(&acpi_ipmi_driver);
>   
Again, I don't know ACPI, but the above code looks rather strange.

Thanks,

-Corey

  reply	other threads:[~2007-02-28 22:05 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-11  4:27 acpi_find_bmc() and acpi_get_table() Len Brown
2007-02-11  4:53 ` Corey Minyard
2007-02-11  5:28   ` Len Brown
2007-02-16  4:03 ` Bjorn Helgaas
2007-02-16  5:15   ` Corey Minyard
2007-02-20  4:31     ` Bjorn Helgaas
2007-02-20  6:46       ` Alexey Starikovskiy
2007-02-20 13:55         ` Corey Minyard
2007-02-25 21:59           ` Matt Domsch
2007-02-26 18:30             ` Jordan_Hargrave
2007-02-26 19:32               ` [Openipmi-developer] " Bjorn Helgaas
2007-02-26 20:06                 ` Jordan_Hargrave
2007-02-26 22:39                   ` Bjorn Helgaas
2007-02-28 21:42               ` Corey Minyard
2007-02-28 22:05                 ` Jordan_Hargrave [this message]
2007-02-28 22:35                   ` Bjorn Helgaas
2007-02-28 22:44                     ` Corey Minyard
2007-04-13 17:44               ` Bjorn Helgaas
2007-04-17 22:50                 ` Corey Minyard
2007-04-18 15:32                   ` [Openipmi-developer] " Bjorn Helgaas
2007-07-18 16:49               ` Jordan_Hargrave
2007-07-18 19:19                 ` Bjorn Helgaas
2007-07-19 16:32                   ` [Openipmi-developer] " Jordan_Hargrave
2007-07-19 18:50                     ` Bjorn Helgaas
2008-07-17 18:32                     ` [Openipmi-developer] " Bjorn Helgaas
2007-07-20 14:11                   ` Corey Minyard

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=5DDAB7BA7BDB58439DD0EED0B8E9A3AE073884@ausx3mpc102.aus.amer.dell.com \
    --to=jordan_hargrave@dell.com \
    --cc=Matt_Domsch@Dell.com \
    --cc=alexey.y.starikovskiy@linux.intel.com \
    --cc=bjorn.helgaas@hp.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=minyard@acm.org \
    --cc=openipmi-developer@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 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.