Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751347AbVJKBvR (ORCPT ); Mon, 10 Oct 2005 21:51:17 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751348AbVJKBvR (ORCPT ); Mon, 10 Oct 2005 21:51:17 -0400 Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:53915 "EHLO fgwmail6.fujitsu.co.jp") by vger.kernel.org with ESMTP id S1751347AbVJKBvQ (ORCPT ); Mon, 10 Oct 2005 21:51:16 -0400 Date: Tue, 11 Oct 2005 10:50:58 +0900 Message-ID: <87mzlgkeil.wl%muneda.takahiro@jp.fujitsu.com> From: MUNEDA Takahiro To: Kristen Accardi Cc: pcihpd-discuss@lists.sourceforge.net, linux-kernel@vger.kernel.org, acpi-devel@lists.sourceforge.net, rajesh.shah@intel.com, greg@kroah.com, len.brown@intel.com, muneda.takahiro@jp.fujitsu.com Subject: Re: [Pcihpd-discuss] [patch 1/2] acpiphp: allocate resources for adapters with bridges In-Reply-To: <1128707147.11020.10.camel@whizzy> References: <1128707147.11020.10.camel@whizzy> User-Agent: Wanderlust/2.14.1 (Bad Medicine-pre) SEMI/1.14.6 (Maruoka) LIMIT/1.14.9 (Domyoji) APEL/10.6 Emacs/22.0.50 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2975 Lines: 78 Hi Kristen, At Fri, 07 Oct 2005 10:45:46 -0700, Kristen Accardi wrote: > > Allocate resources for adapters with p2p bridges. > > Signed-off-by: Kristen Carlson Accardi > > diff -uprN -X linux-2.6.14-rc2/Documentation/dontdiff linux-2.6.14-rc2/drivers/pci/hotplug/acpiphp_glue.c linux-2.6.14-rc2-kca1/drivers/pci/hotplug/acpiphp_glue.c > --- linux-2.6.14-rc2/drivers/pci/hotplug/acpiphp_glue.c 2005-08-28 16:41:01.000000000 -0700 > +++ linux-2.6.14-rc2-kca1/drivers/pci/hotplug/acpiphp_glue.c 2005-09-28 10:43:15.000000000 -0700 > @@ -58,6 +58,9 @@ static LIST_HEAD(bridge_list); > > static void handle_hotplug_event_bridge (acpi_handle, u32, void *); > static void handle_hotplug_event_func (acpi_handle, u32, void *); > +static void acpiphp_sanitize_bus(struct pci_bus *bus); > +static void acpiphp_set_hpp_values(acpi_handle handle, struct pci_bus *bus); > + > > /* > * initialization & terminatation routines > @@ -207,6 +210,9 @@ register_slot(acpi_handle handle, u32 lv > slot->flags |= (SLOT_ENABLED | SLOT_POWEREDON); > } > > + /* store the handle in the slot for later. */ > + slot->handle = handle; > + > /* install notify handler */ > status = acpi_install_notify_handler(handle, > ACPI_SYSTEM_NOTIFY, > @@ -796,7 +802,12 @@ static int enable_device(struct acpiphp_ > } > } > > + pci_bus_size_bridges(bus); > pci_bus_assign_resources(bus); > + acpiphp_sanitize_bus(bus); > + acpiphp_set_hpp_values(slot->handle, bus); > + pci_enable_bridges(bus); > + acpiphp_configure_ioapics(slot->handle); > pci_bus_add_devices(bus); > > /* associate pci_dev to our representation */ > diff -uprN -X linux-2.6.14-rc2/Documentation/dontdiff linux-2.6.14-rc2/drivers/pci/hotplug/acpiphp.h linux-2.6.14-rc2-kca1/drivers/pci/hotplug/acpiphp.h > --- linux-2.6.14-rc2/drivers/pci/hotplug/acpiphp.h 2005-08-28 16:41:01.000000000 -0700 > +++ linux-2.6.14-rc2-kca1/drivers/pci/hotplug/acpiphp.h 2005-09-28 10:43:15.000000000 -0700 > @@ -119,6 +119,7 @@ struct acpiphp_slot { > struct list_head funcs; /* one slot may have different > objects (i.e. for each function) */ > struct semaphore crit_sect; > + acpi_handle handle; > > u32 id; /* slot id (serial #) for hotplug core */ > u8 device; /* pci device# */ If the p2p bridge is one of the multi-function devices, the slot->handle would be over-written by the last found device's handle. Is your adaptor is *non*-multifunctional? I'm also working for p2p hotplug with acpiphp, and your code is almost same to mine. I could find some bugs in my patch by your patch. I'll update my patch. Thanks, MUNE -- MUNEDA Takahiro - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/