From owner-p4-projects@FreeBSD.ORG Sat Apr 16 03:46:59 2011 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5C04F1065672; Sat, 16 Apr 2011 03:46:59 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1EEC5106564A for ; Sat, 16 Apr 2011 03:46:59 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id 0BEBF8FC15 for ; Sat, 16 Apr 2011 03:46:59 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id p3G3kwce004012 for ; Sat, 16 Apr 2011 03:46:58 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id p3G3kwOj004009 for perforce@freebsd.org; Sat, 16 Apr 2011 03:46:58 GMT (envelope-from jhb@freebsd.org) Date: Sat, 16 Apr 2011 03:46:58 GMT Message-Id: <201104160346.p3G3kwOj004009@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 191578 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Apr 2011 03:46:59 -0000 http://p4web.freebsd.org/@@191578?ac=10 Change 191578 by jhb@jhb_fiver on 2011/04/16 03:46:09 Make bus number code conditional on PCI_RES_BUS, not NEW_PCIB. Affected files ... .. //depot/projects/pci/sys/dev/pci/pci_domain.c#2 edit .. //depot/projects/pci/sys/x86/x86/nexus.c#5 edit Differences ... ==== //depot/projects/pci/sys/dev/pci/pci_domain.c#2 (text+ko) ==== @@ -141,7 +141,9 @@ hr->hr_pcib = pcib; resource_list_init(&hr->hr_rl); +#ifdef PCI_RES_BUS pcib_host_res_init_rman(hr, &hr->hr_bus_rman, 0, 255, "bus numbers"); +#endif pcib_host_res_init_rman(hr, &hr->hr_io_rman, 0, 0xffffffff, "I/O ports"); pcib_host_res_init_rman(hr, &hr->hr_mem_rman, 0, ~0ul, "memory"); @@ -164,11 +166,13 @@ device_printf(pcib, "I/O port resources busy\n"); return (error); } +#ifdef PCI_RES_BUS error = rman_fini(&hr->hr_bus_rman); if (error) { device_printf(pcib, "bus numbers busy\n"); return (error); } +#endif /* * Release all allocated resources and remove them from the @@ -194,8 +198,10 @@ return (&hr->hr_io_rman); case SYS_RES_MEMORY: return (&hr->hr_mem_rman); +#ifdef PCI_RES_BUS case PCI_RES_BUS: return (&hr->hr_bus_rman); +#endif default: return (NULL); } ==== //depot/projects/pci/sys/x86/x86/nexus.c#5 (text+ko) ==== @@ -385,7 +385,7 @@ count = rle->count; } -#ifdef NEW_PCIB +#ifdef PCI_RES_BUS if (type == PCI_RES_BUS) { /* * PCI bus number resources are allocated from a @@ -428,7 +428,7 @@ { struct rman *rm; -#ifdef NEW_PCIB +#ifdef PCI_RES_BUS if (type == PCI_RES_BUS) return (pci_domain_adjust_bus(pcib_get_domain(child), child, r, start, end)); @@ -517,7 +517,7 @@ struct resource *r) { -#ifdef NEW_PCIB +#ifdef PCI_RES_BUS if (type == PCI_RES_BUS) { return (pci_domain_release_bus(pcib_get_domain(child), child, rid, r));