From owner-freebsd-arm@FreeBSD.ORG Mon May 25 13:13:13 2015 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 41180454 for ; Mon, 25 May 2015 13:13:13 +0000 (UTC) (envelope-from daemon-user@FreeBSD.org) Received: from phabric-backend.isc.freebsd.org (phabric-backend.isc.freebsd.org [IPv6:2001:4f8:3:ffe0:406a:0:50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 06442B20 for ; Mon, 25 May 2015 13:13:13 +0000 (UTC) (envelope-from daemon-user@FreeBSD.org) Received: from phabric-backend.isc.freebsd.org (phabric-backend.isc.freebsd.org [127.0.1.5]) by phabric-backend.isc.freebsd.org (8.14.9/8.14.9) with ESMTP id t4PDDCJX054844 for ; Mon, 25 May 2015 13:13:12 GMT (envelope-from daemon-user@phabric-backend.isc.freebsd.org) Received: (from daemon-user@localhost) by phabric-backend.isc.freebsd.org (8.14.9/8.14.9/Submit) id t4PDDC8g054843; Mon, 25 May 2015 13:13:12 GMT (envelope-from daemon-user) Date: Mon, 25 May 2015 13:13:12 +0000 To: freebsd-arm@freebsd.org From: "jhb (John Baldwin)" Subject: [Differential] [Updated] D2579: PCI support for Alpine platform from Annapurna Labs Message-ID: X-Priority: 3 Thread-Topic: D2579: PCI support for Alpine platform from Annapurna Labs X-Herald-Rules: none X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-Cc: X-Phabricator-Cc: In-Reply-To: References: Thread-Index: NjYxMzQxMmI2MjBmNTRlMzhjMzBkMTMzMmNhIFVjH+g= Precedence: bulk X-Phabricator-Sent-This-Message: Yes X-Mail-Transport-Agent: MetaMTA X-Auto-Response-Suppress: All X-Phabricator-Mail-Tags: , , MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.20 List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 May 2015 13:13:13 -0000 jhb added a comment. My main comment here is that this seems to duplicate a lot of work of the PCI bus driver itself. With NEW_PCIB, the PCI bus is actually far more capable of handling things like assigning resources for bridges and the devices behind them, etc. I'm not sure how much would have to be updated in layers above this driver to allow that to work, but it might reduce a lot of the duplication. INLINE COMMENTS sys/arm/annapurna/alpine/alpine_pci.c:1327 Do not set bustag/handle in alloc routines. Please provide proper activate/deactivate routines instead (NEW_PCIB requires this). You can see my suggestions on how to do this properly (arm does this wrong an awful lot) in D2386. You should also add an adjust_resource routine. REVISION DETAIL https://reviews.freebsd.org/D2579 EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: jpa-semihalf.com, ian, imp, andrew, jhb, onwahe-gmail-com, meloun-miracle-cz, br, sson, loos, sbruno, rpaulo Cc: emaste, freebsd-arm