[{"id":1977008,"web_url":"http://patchwork.ozlabs.org/comment/1977008/","msgid":"<20180821061451.GB481@infradead.org>","date":"2018-08-21T06:14:51","subject":"Re: [RFC 00/15] PCI: turn some __weak functions into callbacks","submitter":{"id":178,"url":"http://patchwork.ozlabs.org/api/people/178/","name":"Christoph Hellwig","email":"hch@infradead.org"},"content":"On Fri, Aug 17, 2018 at 12:26:30PM +0200, Arnd Bergmann wrote:\n> Hi Bjorn and others,\n> \n> Triggered by Christoph's patches, I had another go at converting\n> all of the remaining pci host bridge implementations to be based\n> on pci_alloc_host_bridge and a separate registration function.\n\nI really like the idea behind this series.\n\n> I'm adding a bit of duplication into the less maintained code\n> here, but it makes everything more consistent, and gives an\n> easy place to hook up callback functions etc.\n\nI wonder if there is a way to avoid some of that by adding a few\nmore helpers, but even without the helpers that approach looks\nok to me.\n\nDo you have a git tree somewhere to play around with the changes?","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 41vh0J5CwLz9s4V\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 21 Aug 2018 16:41:20 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 41vh0J1l44zF1Rx\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 21 Aug 2018 16:41:20 +1000 (AEST)","from bombadil.infradead.org (bombadil.infradead.org\n\t[IPv6:2607:7c80:54:e::133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 41vgy42r0BzF0hg\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tTue, 21 Aug 2018 16:39:23 +1000 (AEST)","from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red\n\tHat Linux)) id 1frzwJ-0001sf-Hx; Tue, 21 Aug 2018 06:14:51 +0000"],"Authentication-Results":["ozlabs.org; dmarc=none (p=none dis=none)\n\theader.from=infradead.org","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=infradead.org header.i=@infradead.org\n\theader.b=\"RXbIsBMI\"; dkim-atps=neutral","lists.ozlabs.org; dmarc=none (p=none dis=none)\n\theader.from=infradead.org","lists.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=infradead.org header.i=@infradead.org\n\theader.b=\"RXbIsBMI\"; dkim-atps=neutral","lists.ozlabs.org; spf=none (mailfrom)\n\tsmtp.mailfrom=bombadil.srs.infradead.org\n\t(client-ip=2607:7c80:54:e::133; \n\thelo=bombadil.infradead.org;\n\tenvelope-from=batv+d4094ddc20615de85f15+5476+infradead.org+hch@bombadil.srs.infradead.org;\n\treceiver=<UNKNOWN>)","lists.ozlabs.org;\n\tdmarc=none (p=none dis=none) header.from=infradead.org"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=infradead.org; s=bombadil.20170209;\n\th=In-Reply-To:Content-Type:MIME-Version\n\t:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:\n\tContent-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:\n\tList-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive;\n\tbh=+6mg4P+MOb9+SHS/evbOP0DuPZ4Vgqdm2kEH1dkv000=;\n\tb=RXbIsBMI/dedUMWrOEnynvgVx\n\tFHfqBG//pB7a+r3p466JBD2Esb+8sC5/IhsJfkqzD8pNZ1124B1mMOvcNGt39obMpZagIIDcFGLP/\n\tdTgA+XOoVXxjgfzWkycAK3Zsmyg7d2+pdPXf7aLSaDoh10x589EZfXbB9VYsAAitfuSol0A24ziJq\n\tl2NZsy3kUGr9LqXvyhvCBxne76is01aiyh/KwLnepMoMYkF2CHLG7g4syGIKGFgARWl1PdFXao/KD\n\tG7pcKuf6dsuqYTVzHFNER1gZYp20xtukJPwR//U7Xfotyl0N1vTmHXROJDEyP0Y4tN8HUbGReEX29\n\tPZvLqvwkg==;","Date":"Mon, 20 Aug 2018 23:14:51 -0700","From":"Christoph Hellwig <hch@infradead.org>","To":"Arnd Bergmann <arnd@arndb.de>","Subject":"Re: [RFC 00/15] PCI: turn some __weak functions into callbacks","Message-ID":"<20180821061451.GB481@infradead.org>","References":"<20180817102645.3839621-1-arnd@arndb.de>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20180817102645.3839621-1-arnd@arndb.de>","User-Agent":"Mutt/1.9.2 (2017-12-15)","X-SRS-Rewrite":"SMTP reverse-path rewritten from <hch@infradead.org> by\n\tbombadil.infradead.org. See http://www.infradead.org/rpr.html","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.27","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>, linux-pci@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org, Christoph Hellwig <hch@infradead.org>, \n\tlinux-acpi@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>,\n\tlinuxppc-dev@lists.ozlabs.org","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}},{"id":1977142,"web_url":"http://patchwork.ozlabs.org/comment/1977142/","msgid":"<CAK8P3a1_VbhLteRiJe2WDk2FgcPFMLTXv_t5oi2zZ1ywh63cZg@mail.gmail.com>","date":"2018-08-21T10:07:40","subject":"Re: [RFC 00/15] PCI: turn some __weak functions into callbacks","submitter":{"id":30,"url":"http://patchwork.ozlabs.org/api/people/30/","name":"Arnd Bergmann","email":"arnd@arndb.de"},"content":"On Tue, Aug 21, 2018 at 8:14 AM Christoph Hellwig <hch@infradead.org> wrote:\n>\n> On Fri, Aug 17, 2018 at 12:26:30PM +0200, Arnd Bergmann wrote:\n> > Hi Bjorn and others,\n> >\n> > Triggered by Christoph's patches, I had another go at converting\n> > all of the remaining pci host bridge implementations to be based\n> > on pci_alloc_host_bridge and a separate registration function.\n>\n> I really like the idea behind this series.\n>\n> > I'm adding a bit of duplication into the less maintained code\n> > here, but it makes everything more consistent, and gives an\n> > easy place to hook up callback functions etc.\n>\n> I wonder if there is a way to avoid some of that by adding a few\n> more helpers, but even without the helpers that approach looks\n> ok to me.\n\nOk, thanks for taking a first look.\n\nOne core part that gets duplicated a lot (also in existing drivers)\nis the chunk that could be handled by this:\n\nint pci_host_bridge_init(struct pci_host_bridge *bridge,\n                   struct device *parent, int bus,\n                   struct pci_ops *ops, void *sysdata,\n                   struct list_head *resource_list)\n{\n       if (resources)\n              list_splice_init(resources, &bridge->windows);\n       bridge->dev.parent = parent;\n       bridge->sysdata = sysdata;\n       bridge->busnr = bus;\n       bridge->ops = ops;\n}\n\nThat would probably help, but we should think carefully about\nthe set of fields that we want pass here, specifically because the\nidea of splitting the probing into two parts was to avoid having\nto come up with a new interface every time that list changes\ndue to some rework.\n\nFor instance, the numa node is something that might get passed\nhere, and if we decide to split out the operations into a separate\npci_host_bridge_ops structure, the pointer to that would also\nbe something we'd want to pass this way.\n\n> Do you have a git tree somewhere to play around with the changes?\n\nI now uploaded it (with fixes incorporated) to\n\nhttps://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git\npci-probe-rework\n\n       arnd","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 41vmcS37mKz9s4Z\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 21 Aug 2018 20:09:28 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 41vmcS1xYgzF1Rh\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 21 Aug 2018 20:09:28 +1000 (AEST)","from mail-qt0-f196.google.com (mail-qt0-f196.google.com\n\t[209.85.216.196])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 41vmZl4ZKlzF0hg\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tTue, 21 Aug 2018 20:07:59 +1000 (AEST)","by mail-qt0-f196.google.com with SMTP id r37-v6so12207016qtc.0\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tTue, 21 Aug 2018 03:07:59 -0700 (PDT)"],"Authentication-Results":["ozlabs.org;\n\tdmarc=none (p=none dis=none) header.from=arndb.de","lists.ozlabs.org;\n\tdmarc=none (p=none dis=none) header.from=arndb.de","lists.ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=gmail.com\n\t(client-ip=209.85.216.196; helo=mail-qt0-f196.google.com;\n\tenvelope-from=arndbergmann@gmail.com; receiver=<UNKNOWN>)","lists.ozlabs.org;\n\tdmarc=none (p=none dis=none) header.from=arndb.de"],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=xqNsNgCpJFa21cWSGZHlNueon7cKTyWvt+4FEuonZp4=;\n\tb=OXz2JE4fyOHlLeAobl37xerktq4YFyTP54z5kiurQLXs9LYc9XXhpyfh+8TTKpwmQw\n\tQEAtozc1LHlWiWsW3MNMYRdmsPaazO1R5p9RmfC2h9GPJx5lQqYCtUbdBDuM1Sqzskhe\n\tIoBzgdwBODcvE2St7B0AGFwUB6qe/11rMI0H3oKpsiciqO8A2b6sEi7UImJnVvthFt14\n\tfCDhP+KBRjo0S1IawQTW4pvX6i2grvPs+0JEHa/wJthWr8/Qade1ZBuEsnVAd0jE8INC\n\t+UQLhgX2FrlJxnrQO1tx3M1tSI7Kc2Iwl58nwxzfGLoYB8x/Oq4pv4bKmtkUZMTzo8DP\n\tp4rQ==","X-Gm-Message-State":"AOUpUlHKo+SSeStyZHjvs7iC+UxUGQMMR+CdTJv50TM0xvgF0dYW3/Ic\n\t5mnjODmHXgrec7bAvxJrNCZyX8Jepbrj3mMEKZk=","X-Google-Smtp-Source":"AA+uWPw1YeDdzZYA9TxI8CC9dgL5MP1Rp1A4yNXDL7nRFbGhknbyyxvYDRMgXJg4h02hdayt4asJRPvz1dl5Ue3pA/k=","X-Received":"by 2002:aed:2b47:: with SMTP id\n\tp65-v6mr9787912qtd.132.1534846077425; \n\tTue, 21 Aug 2018 03:07:57 -0700 (PDT)","MIME-Version":"1.0","References":"<20180817102645.3839621-1-arnd@arndb.de>\n\t<20180821061451.GB481@infradead.org>","In-Reply-To":"<20180821061451.GB481@infradead.org>","From":"Arnd Bergmann <arnd@arndb.de>","Date":"Tue, 21 Aug 2018 12:07:40 +0200","Message-ID":"<CAK8P3a1_VbhLteRiJe2WDk2FgcPFMLTXv_t5oi2zZ1ywh63cZg@mail.gmail.com>","Subject":"Re: [RFC 00/15] PCI: turn some __weak functions into callbacks","To":"Christoph Hellwig <hch@infradead.org>","Content-Type":"text/plain; charset=\"UTF-8\"","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.27","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,\n\tlinux-pci <linux-pci@vger.kernel.org>,\n\tLinux Kernel Mailing List <linux-kernel@vger.kernel.org>,\n\tACPI Devel Maling List <linux-acpi@vger.kernel.org>,\n\tBjorn Helgaas <bhelgaas@google.com>,\n\tlinuxppc-dev <linuxppc-dev@lists.ozlabs.org>","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}},{"id":1977257,"web_url":"http://patchwork.ozlabs.org/comment/1977257/","msgid":"<1534851050.14722.3.camel@infradead.org>","date":"2018-08-21T11:30:50","subject":"Re: [RFC 00/15] PCI: turn some __weak functions into callbacks","submitter":{"id":26,"url":"http://patchwork.ozlabs.org/api/people/26/","name":"David Woodhouse","email":"dwmw2@infradead.org"},"content":"On Mon, 2018-08-20 at 23:14 -0700, Christoph Hellwig wrote:\n> On Fri, Aug 17, 2018 at 12:26:30PM +0200, Arnd Bergmann wrote:\n> > Hi Bjorn and others,\n> > \n> > Triggered by Christoph's patches, I had another go at converting\n> > all of the remaining pci host bridge implementations to be based\n> > on pci_alloc_host_bridge and a separate registration function.\n> \n> I really like the idea behind this series.\n\nHm... are you turning direct calls into retpolined indirect calls?","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 41vrPB5n4Lz9s4c\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 21 Aug 2018 22:59:58 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 41vrPB49JjzF1Rx\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 21 Aug 2018 22:59:58 +1000 (AEST)","from twosheds.infradead.org (twosheds.infradead.org\n\t[90.155.92.209])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 41vrLl5cvXzF0kx\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tTue, 21 Aug 2018 22:57:48 +1000 (AEST)","from [2001:8b0:10b:1::2fb]\n\tby twosheds.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat\n\tLinux)) id 1fs6Dn-005BZW-Pi; Tue, 21 Aug 2018 12:57:19 +0000"],"Authentication-Results":["ozlabs.org; dmarc=none (p=none dis=none)\n\theader.from=infradead.org","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=infradead.org header.i=@infradead.org\n\theader.b=\"jEL7Cndr\"; dkim-atps=neutral","lists.ozlabs.org; dmarc=none (p=none dis=none)\n\theader.from=infradead.org","lists.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=infradead.org header.i=@infradead.org\n\theader.b=\"jEL7Cndr\"; dkim-atps=neutral","lists.ozlabs.org; spf=none (mailfrom)\n\tsmtp.mailfrom=twosheds.srs.infradead.org (client-ip=90.155.92.209;\n\thelo=twosheds.infradead.org;\n\tenvelope-from=batv+107d9a8675f06f04878e+5476+infradead.org+dwmw2@twosheds.srs.infradead.org;\n\treceiver=<UNKNOWN>)","lists.ozlabs.org;\n\tdmarc=none (p=none dis=none) header.from=infradead.org","lists.ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=infradead.org header.i=@infradead.org\n\theader.b=\"jEL7Cndr\"; dkim-atps=neutral"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=infradead.org; s=twosheds.20170209;\n\th=Mime-Version:Date:Content-Type:\n\tReferences:In-Reply-To:Cc:To:From:Subject:Message-ID:Sender:Reply-To:\n\tContent-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:\n\tList-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive;\n\tbh=E4BxIOd7LujIPQdoUIYqwS8tgnm11XvQGhlaARuS7jQ=;\n\tb=jEL7Cndrn26hFk+9jDQftwrMJ\n\tjawEELfCLeSWjcd1BC4Pp+M1Eqk+cRAivlYK6nMsNfQ4JxN6ACNtCWiyWg1h/+2zw+mpyI7LHAphB\n\tx93yO8o+JgTZu26akgqhWDbChvax8p+k0Nu2gpbjfWU9tsMOPbXZDmF9Ub58fJek/WI1Y2YRPfp5G\n\tNnKqtEHXDRn4KtalPXd7vwOM4CjnYIRAlVe3s5kdfXvolAutgXBUzykqIoM3as5RfpCsbkL4j0snx\n\t9FcLzs+PdsZ1FtXAAMAYXFVAGSIJrgHbpT+OIdEia6KR03h/ObjxU25FDg1K9nJQH1oo4xdPtAigs\n\tpCNApNcjQ==;","Message-ID":"<1534851050.14722.3.camel@infradead.org>","Subject":"Re: [RFC 00/15] PCI: turn some __weak functions into callbacks","From":"David Woodhouse <dwmw2@infradead.org>","To":"Christoph Hellwig <hch@infradead.org>, Arnd Bergmann <arnd@arndb.de>","In-Reply-To":"<20180821061451.GB481@infradead.org>","References":"<20180817102645.3839621-1-arnd@arndb.de>\n\t<20180821061451.GB481@infradead.org>","Face":"iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAG1BMVEUHBwcUFBQpKSlGRkZhYWF9fX2Xl5eysrLMzMxFF+rXAAACaElEQVQ4y21UQXbbIBQE9wJALmAg6ToWON22FrhZthHgbvssUPathC7QWMful2JHSmtWwGg+zPxBCE0DU4QoJQgRgsg4w2gJjBNE8PjFBZgnQMBs+uZ1NQNQjZO3BV4AGDFC0f+l4DBG0VUAM4yv7SO8IgRdHXQ+A78HKL5OAeCfNQV5cHX8DsBUyIJKtYbt98BKaGNCKjfgFVkqYVLbkHKsRsbSCSa0T6npIqLrpRBgQKHUpQmgs9eEKaiUcooE8WWfCGVnBiUcn1uF2XhbfmN9apKnmMP2K4kizKkQWxuaVNOpU2cACIyxO1Po8ETHcXEDMVnozcejkAYA9iaD4pU0ZvNQ8VurNnTuFAYVtuIPUZW25PjDIjQAlGyffIiRQxoWAZBmJ0LTdW2Nyc0iP3DqRhxizvGJkBWZmyFVyZkddWzmBoIBVMpCCJ1CFzl98xav4VJKSSD45KbUT75ixikTphDSRh8+Uz7JLgUTAgAFwzqzjxc/nDY7WUApqY0OMdTwCKZSXplSKkgIRCHElCp8ZnhnKqXuwcNbk1L0VXE+I9alUXoHlLHl3mv7/dWQlJwtjREC7mu9L/U2jQyMUuO2EDS4q9Kl2ddm232bxIE5pjJuVwiljNn/Cfv25/T0cu5cZbwHGVq7h/zp0B4n3S99V/utD+Uo8BiGx9xCsOAV5z7/tjo4Z4z1Lvb90KZ7eFOoOeXOukqF2seo234YYuaQPpRP+cVZU5adT1Edun5Iz3z8fTz3+eSDh0Ip1c7zx1MaijGzTd/3MbRuBHz8cvcVgCMBRpOHvgu59WDhoat+nIZm+LWm9C/aaaGq5DCP9QAAAABJRU5ErkJggg==","Content-Type":"multipart/signed; micalg=\"sha-256\";\n\tprotocol=\"application/x-pkcs7-signature\";\n\tboundary=\"=-wIJPw7IU5BIPjh1RAdme\"","Date":"Tue, 21 Aug 2018 12:30:50 +0100","Mime-Version":"1.0","X-Mailer":"Evolution 3.18.5.2-0ubuntu3.2 ","X-SRS-Rewrite":"SMTP reverse-path rewritten from <dwmw2@infradead.org> by\n\ttwosheds.infradead.org. See http://www.infradead.org/rpr.html","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.27","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>, linux-pci@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,\n\tBjorn Helgaas <bhelgaas@google.com>, linuxppc-dev@lists.ozlabs.org","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}},{"id":1977284,"web_url":"http://patchwork.ozlabs.org/comment/1977284/","msgid":"<20180821131441.GA6156@infradead.org>","date":"2018-08-21T13:14:41","subject":"Re: [RFC 00/15] PCI: turn some __weak functions into callbacks","submitter":{"id":178,"url":"http://patchwork.ozlabs.org/api/people/178/","name":"Christoph Hellwig","email":"hch@infradead.org"},"content":"On Tue, Aug 21, 2018 at 12:30:50PM +0100, David Woodhouse wrote:\n> On Mon, 2018-08-20 at 23:14 -0700, Christoph Hellwig wrote:\n> > On Fri, Aug 17, 2018 at 12:26:30PM +0200, Arnd Bergmann wrote:\n> > > Hi Bjorn and others,\n> > > \n> > > Triggered by Christoph's patches, I had another go at converting\n> > > all of the remaining pci host bridge implementations to be based\n> > > on pci_alloc_host_bridge and a separate registration function.\n> > \n> > I really like the idea behind this series.\n> \n> Hm... are you turning direct calls into retpolined indirect calls?\n\nHe does.  But not anywhere near the fast path.","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 41vrnp0txJz9s3x\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 21 Aug 2018 23:17:50 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 41vrnn5gJzzF162\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 21 Aug 2018 23:17:49 +1000 (AEST)","from bombadil.infradead.org (bombadil.infradead.org\n\t[IPv6:2607:7c80:54:e::133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 41vrkY4KHFzF0hg\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tTue, 21 Aug 2018 23:14:57 +1000 (AEST)","from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red\n\tHat Linux)) id 1fs6Ub-0001ci-RX; Tue, 21 Aug 2018 13:14:41 +0000"],"Authentication-Results":["ozlabs.org; dmarc=none (p=none dis=none)\n\theader.from=infradead.org","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=infradead.org header.i=@infradead.org\n\theader.b=\"mLZ4u9Ix\"; dkim-atps=neutral","lists.ozlabs.org; dmarc=none (p=none dis=none)\n\theader.from=infradead.org","lists.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=infradead.org header.i=@infradead.org\n\theader.b=\"mLZ4u9Ix\"; dkim-atps=neutral","lists.ozlabs.org; spf=none (mailfrom)\n\tsmtp.mailfrom=bombadil.srs.infradead.org\n\t(client-ip=2607:7c80:54:e::133; \n\thelo=bombadil.infradead.org;\n\tenvelope-from=batv+d4094ddc20615de85f15+5476+infradead.org+hch@bombadil.srs.infradead.org;\n\treceiver=<UNKNOWN>)","lists.ozlabs.org;\n\tdmarc=none (p=none dis=none) header.from=infradead.org","lists.ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=infradead.org header.i=@infradead.org\n\theader.b=\"mLZ4u9Ix\"; dkim-atps=neutral"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=infradead.org; s=bombadil.20170209;\n\th=In-Reply-To:Content-Transfer-Encoding\n\t:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:\n\tSender:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:\n\tResent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:\n\tList-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive;\n\tbh=d98yOvqik39kYVbGz25Uc80En1BMy4Nim0RpXPxAZ9w=;\n\tb=mLZ4u9IxhcaTXXLwhMP5EeTkIa\n\taBwshDvyZUMuxeB7N8uzKR+zjqyESIl5f+deQaMh6ZqPFEOIuNfrm8gqQE9eqMpFreI6Kl0w2qGlE\n\t14HaJFcd0SHEP61LBOG9JJnucRFtICo3YRnUQzx0uY/s5+vNAPF/W/fLDIjUBMMLEP0ak2nwu2VLo\n\tiedU+cdZsw2ctDRsZEh2Uqq72o34AWwLHX9oPpbyLNwl67w4wIDNfpXhwHqJhHiu+6cNRhKYJJ8L8\n\ty7tA6ygGbqKQqkbiPfviwFwMMHAAwl/731jrrRowbjmUswok9G6YzqfhllbIJMISAYayI++31K9ut\n\tjbtZfAIg==;","Date":"Tue, 21 Aug 2018 06:14:41 -0700","From":"Christoph Hellwig <hch@infradead.org>","To":"David Woodhouse <dwmw2@infradead.org>","Subject":"Re: [RFC 00/15] PCI: turn some __weak functions into callbacks","Message-ID":"<20180821131441.GA6156@infradead.org>","References":"<20180817102645.3839621-1-arnd@arndb.de>\n\t<20180821061451.GB481@infradead.org>\n\t<1534851050.14722.3.camel@infradead.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<1534851050.14722.3.camel@infradead.org>","User-Agent":"Mutt/1.9.2 (2017-12-15)","X-SRS-Rewrite":"SMTP reverse-path rewritten from <hch@infradead.org> by\n\tbombadil.infradead.org. See http://www.infradead.org/rpr.html","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.27","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,\n\tArnd Bergmann <arnd@arndb.de>, linux-pci@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org, Christoph Hellwig <hch@infradead.org>, \n\tlinux-acpi@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>,\n\tlinuxppc-dev@lists.ozlabs.org","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}},{"id":2002333,"web_url":"http://patchwork.ozlabs.org/comment/2002333/","msgid":"<20181002205903.GD120535@bhelgaas-glaptop.roam.corp.google.com>","date":"2018-10-02T20:59:03","subject":"Re: [RFC 00/15] PCI: turn some __weak functions into callbacks","submitter":{"id":67298,"url":"http://patchwork.ozlabs.org/api/people/67298/","name":"Bjorn Helgaas","email":"helgaas@kernel.org"},"content":"On Fri, Aug 17, 2018 at 12:26:30PM +0200, Arnd Bergmann wrote:\n> Hi Bjorn and others,\n> \n> Triggered by Christoph's patches, I had another go at converting\n> all of the remaining pci host bridge implementations to be based\n> on pci_alloc_host_bridge and a separate registration function.\n> \n> This is made possible through work from Lorenzo and others to\n> convert many of the existing drivers, as well as the removal\n> of some of the older architectures that nobody used.\n> \n> I'm adding a bit of duplication into the less maintained code\n> here, but it makes everything more consistent, and gives an\n> easy place to hook up callback functions etc.\n> \n> The three parts of this series are:\n> \n> a) push up the registration into the callers (this is where\n>    code gets added)\n> b) clean up some of the more common host bridge\n>    implementations again to integrate that code better.\n>    This could be done for the rest as well, or we could just\n>    leave them alone.\n> c) start moving the __weak functions into callbacks in\n>    pci_host_bridge. This is intentionally incomplete, since\n>    it is a lot of work to do it for all those functions,\n>    and I want to get consensus on the approach first, as well\n>    as maybe get other developers to help out with the rest.\n> \n> Please have a look.\n> \n>        Arnd\n> \n> [1] https://lore.kernel.org/lkml/4288331.jNpl6KXlNO@wuerfel/\n> [2] https://patchwork.kernel.org/patch/10555657/\n> \n> Arnd Bergmann (15):\n>   PCI: clean up legacy host bridge scan functions\n>   PCI: move pci_scan_bus into callers\n>   PCI: move pci_scan_root_bus into callers\n>   PCI: export pci_register_host_bridge\n>   PCI: move pci_create_root_bus into callers\n>   powerpc/pci: fold pci_create_root_bus into pcibios_scan_phb\n>   PCI/ACPI: clean up acpi_pci_root_create()\n>   x86: PCI: clean up pcibios_scan_root()\n>   PCI: xenfront: clean up pcifront_scan_root()\n>   sparc/PCI: simplify pci_scan_one_pbm\n>   PCI: hyperv: convert to pci_scan_root_bus_bridge\n>   PCI: make pcibios_bus_add_device() a callback function\n>   PCI: turn pcibios_alloc_irq into a callback\n>   PCI: make pcibios_root_bridge_prepare a callback\n>   PCI: make pcibios_add_bus/remove_bus callbacks\n> \n>  arch/arm64/kernel/pci.c               |  40 ++-----\n>  arch/ia64/pci/pci.c                   |  25 +----\n>  arch/ia64/sn/kernel/io_init.c         |  27 +++++\n>  arch/microblaze/pci/pci-common.c      |  27 +++++\n>  arch/powerpc/include/asm/pci-bridge.h |   3 +\n>  arch/powerpc/kernel/pci-common.c      |  60 +++++------\n>  arch/s390/pci/pci.c                   |  30 +++++-\n>  arch/sh/drivers/pci/pci.c             |   1 +\n>  arch/sh/drivers/pci/pcie-sh7786.c     |   3 +-\n>  arch/sh/include/asm/pci.h             |   2 +\n>  arch/sparc/kernel/pci.c               |  40 ++++---\n>  arch/sparc/kernel/pcic.c              |  35 ++++++\n>  arch/x86/pci/acpi.c                   |  15 +--\n>  arch/x86/pci/common.c                 |  42 ++++----\n>  arch/xtensa/kernel/pci.c              |  27 +++++\n>  drivers/acpi/pci_root.c               |  43 +++++---\n>  drivers/parisc/dino.c                 |  28 +++++\n>  drivers/parisc/lba_pci.c              |  28 +++++\n>  drivers/pci/bus.c                     |   8 +-\n>  drivers/pci/controller/pci-hyperv.c   |  47 ++++----\n>  drivers/pci/controller/vmd.c          |  30 +++++-\n>  drivers/pci/hotplug/ibmphp_core.c     |  35 ++++++\n>  drivers/pci/pci-driver.c              |  13 ++-\n>  drivers/pci/probe.c                   | 150 +++++++++-----------------\n>  drivers/pci/xen-pcifront.c            |  40 +++----\n>  include/linux/acpi.h                  |   2 +\n>  include/linux/pci.h                   |  17 ++-\n>  27 files changed, 514 insertions(+), 304 deletions(-)\n\nSorry for the late response to this.\n\nI think I'm generally on-board with this.  I admit I'm a little\nhesitant about adding 200 lines of code when this is really more\n\"cleanup\" than new functionality, but I think a lot of that is because\nthis series contains costs (e.g., duplicating code) for everybody but\nonly has the corresponding benefits for a few (ACPI, x86, xenfront).\nThose cases are much closer to parity in terms of lines added/removed.\n\nI saw some minor comments that suggested you had some updates, so I'll\nwatch for an updated posting.\n\nBjorn","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 42Ps6N3yPgz9s1c\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed,  3 Oct 2018 07:02:20 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 42Ps6N2Mp5zF38n\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed,  3 Oct 2018 07:02:20 +1000 (AEST)","from mail.kernel.org (mail.kernel.org [198.145.29.99])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 42Ps2h3jf2zF3FT\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tWed,  3 Oct 2018 06:59:07 +1000 (AEST)","from localhost (unknown [69.71.4.100])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby mail.kernel.org (Postfix) with ESMTPSA id 430B12082A;\n\tTue,  2 Oct 2018 20:59:05 +0000 (UTC)"],"Authentication-Results":["ozlabs.org;\n\tdmarc=fail (p=none dis=none) header.from=kernel.org","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=kernel.org header.i=@kernel.org\n\theader.b=\"VrlUApMo\"; dkim-atps=neutral","lists.ozlabs.org;\n\tdmarc=pass (p=none dis=none) header.from=kernel.org","lists.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=kernel.org header.i=@kernel.org\n\theader.b=\"VrlUApMo\"; dkim-atps=neutral","lists.ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=kernel.org\n\t(client-ip=198.145.29.99; helo=mail.kernel.org;\n\tenvelope-from=helgaas@kernel.org; receiver=<UNKNOWN>)","lists.ozlabs.org;\n\tdmarc=pass (p=none dis=none) header.from=kernel.org","lists.ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=kernel.org header.i=@kernel.org\n\theader.b=\"VrlUApMo\"; dkim-atps=neutral"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=default; t=1538513945;\n\tbh=NhShGRlF3tvA3wPqMetEvDsa+MXMBWRWcegxI0YNFUQ=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=VrlUApMoHYMLzjumPIlCSSIgIIKQ8IBo3cly3bPbZ6rMCxrrSFR2Qen2Ljvvn6rsg\n\tuu3M9ERNwPR7ZWRZlriqVlR4pDu0NLzS8SU13jwcn27jfCIzyQIzfdHDaE+OM4mF/W\n\thsSmQFg18TrNMExTlRVbce97ivlHjiB7qe60yz0Q=","Date":"Tue, 2 Oct 2018 15:59:03 -0500","From":"Bjorn Helgaas <helgaas@kernel.org>","To":"Arnd Bergmann <arnd@arndb.de>","Subject":"Re: [RFC 00/15] PCI: turn some __weak functions into callbacks","Message-ID":"<20181002205903.GD120535@bhelgaas-glaptop.roam.corp.google.com>","References":"<20180817102645.3839621-1-arnd@arndb.de>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20180817102645.3839621-1-arnd@arndb.de>","User-Agent":"Mutt/1.10.1 (2018-07-13)","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>, linux-pci@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org, Christoph Hellwig <hch@infradead.org>, \n\tlinux-acpi@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>,\n\tlinuxppc-dev@lists.ozlabs.org","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}}]