Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751539AbdFHIMd (ORCPT ); Thu, 8 Jun 2017 04:12:33 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:34695 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750919AbdFHIMa (ORCPT ); Thu, 8 Jun 2017 04:12:30 -0400 Date: Thu, 8 Jun 2017 01:12:28 -0700 From: Christoph Hellwig To: Geert Uytterhoeven Cc: Palmer Dabbelt , Linux-Arch , "linux-kernel@vger.kernel.org" , Arnd Bergmann , Olof Johansson , albert@sifive.com, patches@groups.riscv.org, Bjorn Helgaas , linux-pci Subject: Re: [PATCH 06/17] pci: Add generic pcibios_{fixup_bus,align_resource} Message-ID: <20170608081228.GA26932@infradead.org> References: <20170523004107.536-1-palmer@dabbelt.com> <20170606230007.19101-1-palmer@dabbelt.com> <20170606230007.19101-7-palmer@dabbelt.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.0 (2017-02-23) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 962 Lines: 23 On Wed, Jun 07, 2017 at 09:19:49AM +0200, Geert Uytterhoeven wrote: > CC pci folks Ok, replying with pci folks in Cc then :) Weak symbols have (rightly) gotten a bad reputation, so maybe we should approach this without them. It seems we have a large number of emptry pcibios_fixup_bus calls alreayd, so I think we should simply have the architectures that do define it define a Kconfig or header symbol and not call it at all otherwise. For the ones that exist as lot just seem to call pci_read_bridge_bases and/or pcibios_fixup_device_resources in one form or another, and I wonder why we even need the arch indirection for that. Similarly for pcibios_align_resource: a lot of architetures seem to have a noop, and the once that don't mostly seem copy and paste code, so we should again have a symbol for architectures to opt into it, and we probably should have a generic helper for the VGA window mirroring code instead of duplicating it multiple times.