Message ID | 20230531102744.2354313-1-suijingfeng@loongson.cn |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2779504vqr; Wed, 31 May 2023 03:41:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ57Q3xrWsN95XzIVAOqpKPLSih1jsaZJsgoSMc1oK661WZg1BaX95lAKfH93214+RzzMb63 X-Received: by 2002:a17:90a:889:b0:256:70d3:b4c0 with SMTP id v9-20020a17090a088900b0025670d3b4c0mr4487451pjc.21.1685529702180; Wed, 31 May 2023 03:41:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685529702; cv=none; d=google.com; s=arc-20160816; b=a4W3N7s4HtIG8pxbS8W8h+uvYfkxyuOGKv37nQolnbbCK6ktablglt7Lr9BBWDTTRm gwtwWqrTRuV2QK4rz1x69xf5vHT8ViCdf76AWfD6a6N0AIihh2utx5XJGIDhFLHFX7Ft cFgZNyD0rr6A2HhP++MNkMZ1N+TIs1Yt/o7A3h4KdsTqg/P/8EP0LCu3eFZpMwhcq3Ke 5NJm4dBO7DuwRhQXmnnMIgqCMphkx7p/Xp/qVOJYlapXVqC2sKG1AanhrjLx1BSLfM+S Dgkubc8ltliRK1nd4lNUYNDB+KFjAV1DkTg77YeYmYxWrklXH7t3KKRCieLNLyFqCmyH /wQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=kC/Lcat+syQ3bkfozwj0d95Epyle7BuN0SRmWWnTqqc=; b=IN6PFJwOih3tvPQxPa77FtSWNJh5wGZ9OT75aV2MAx2M/BY3V9kivL1aCovLOJeVdW xmxmrQCA7OZIpF6X4BhdbXUm/x0QKyIL0/vh2oCJIR5T0aSqkoIhkCYb2R2iODUNlRs5 em5h6VLO1B0MJdKXr/EiE4IRwpE3PQnwTgbDvt8hkTETZMh1ExGmhgECZe/7IJVoxlqK s0IjWl1FqN64pBXqRU4zN1SyvtJnTviOu2Klj8cHAHkul34OxTF375YM9g/HXY6/YULI ZKPfP4DVXXWsH9cp9OkyTtTMnwyT88utdAmGpkxMKRdtHYfkR6nUrStT8FBXHKRv0Fof 5jTQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j72-20020a638b4b000000b00524ea62bcbcsi799535pge.209.2023.05.31.03.41.29; Wed, 31 May 2023 03:41:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232560AbjEaK2F (ORCPT <rfc822;andrewvogler123@gmail.com> + 99 others); Wed, 31 May 2023 06:28:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229949AbjEaK2D (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 31 May 2023 06:28:03 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E949FB3; Wed, 31 May 2023 03:28:01 -0700 (PDT) Received: from loongson.cn (unknown [10.20.42.43]) by gateway (Coremail) with SMTP id _____8Dxd_EwIXdkE+8CAA--.6608S3; Wed, 31 May 2023 18:28:00 +0800 (CST) Received: from openarena.loongson.cn (unknown [10.20.42.43]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Cx77MtIXdk+juCAA--.15700S2; Wed, 31 May 2023 18:27:57 +0800 (CST) From: Sui Jingfeng <suijingfeng@loongson.cn> To: Bjorn Helgaas <bhelgaas@google.com>, Matthew Wilcox <willy@infradead.org>, Ben Hutchings <bhutchings@solarflare.com>, Jesse Barnes <jbarnes@virtuousgeek.org> Cc: Li Yi <liyi@loongson.cn>, linux-pci@vger.kernel.org, loongson-kernel@lists.loongnix.cn, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, kernel test robot <lkp@intel.com>, Geert Uytterhoeven <geert@linux-m68k.org> Subject: [PATCH v2] PCI: Add dummy implement for pci_clear_master() function Date: Wed, 31 May 2023 18:27:44 +0800 Message-Id: <20230531102744.2354313-1-suijingfeng@loongson.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf8Cx77MtIXdk+juCAA--.15700S2 X-CM-SenderInfo: xvxlyxpqjiv03j6o00pqjv00gofq/ X-Coremail-Antispam: 1Uk129KBjvJXoW7CryUGr15Xw4UKr1xurWxZwb_yoW8Aw4rpa 98AFyrCrW8GFy8Gw4UJFyIvF1ag39xZ34Sy3y7Kwn09a9Fya4rtFnYkF17Arn3JrWvkFy3 Ww17Ka1DWw4YyFJanT9S1TB71UUUUj7qnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU bh8YFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20xvaj40_Wr0E3s 1l1IIY67AEw4v_JrI_Jryl8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xv wVC0I7IYx2IY67AKxVWUCVW8JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVWUJVW8JwA2z4 x0Y4vEx4A2jsIE14v26F4UJVW0owA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Cr1j6rxdM2kK e7AKxVWUAVWUtwAS0I0E0xvYzxvE52x082IY62kv0487Mc804VCY07AIYIkI8VC2zVCFFI 0UMc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUAVWUtwAv7VC2z280 aVAFwI0_Gr1j6F4UJwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41lc7CjxV Aaw2AFwI0_JF0_Jw1l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1l4IxY O2xFxVAFwI0_JF0_Jw1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGV WUWwC2zVAF1VAY17CE14v26r1q6r43MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_ JFI_Gr1lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0rV WUJVWUCwCI42IY6I8E87Iv67AKxVW8Jr0_Cr1UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr1j 6F4UJbIYCTnIWIevJa73UjIFyTuYvjxU2gyCDUUUU X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767405992986479533?= X-GMAIL-MSGID: =?utf-8?q?1767405992986479533?= |
Series |
[v2] PCI: Add dummy implement for pci_clear_master() function
|
|
Commit Message
Sui Jingfeng
May 31, 2023, 10:27 a.m. UTC
As some arch(m68k for example) doesn't have config_pci enabled, drivers[1] call pci_clear_master() without config_pci guard can not pass compile test. drivers/gpu/drm/etnaviv/etnaviv_pci_drv.c: In function 'etnaviv_gpu_pci_fini': >> drivers/gpu/drm/etnaviv/etnaviv_pci_drv.c:32:9: error: implicit declaration of function 'pci_clear_master'; did you mean 'pci_set_master'? [-Werror=implicit-function-declaration] 32 | pci_clear_master(pdev); | ^~~~~~~~~~~~~~~~ | pci_set_master cc1: some warnings being treated as errors [1] https://patchwork.freedesktop.org/patch/539977/?series=118522&rev=1 V2: * Adjust commit log style to meet the convention and add Fixes tag Fixes: 6a479079c072 ("PCI: Add pci_clear_master() as opposite of pci_set_master()") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202305301659.4guSLavL-lkp@intel.com/ Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Sui Jingfeng <suijingfeng@loongson.cn> --- include/linux/pci.h | 1 + 1 file changed, 1 insertion(+)
Comments
On Wed, May 31, 2023 at 06:27:44PM +0800, Sui Jingfeng wrote: > As some arch(m68k for example) doesn't have config_pci enabled, drivers[1] > call pci_clear_master() without config_pci guard can not pass compile test. > > drivers/gpu/drm/etnaviv/etnaviv_pci_drv.c: > In function 'etnaviv_gpu_pci_fini': > >> drivers/gpu/drm/etnaviv/etnaviv_pci_drv.c:32:9: > error: implicit declaration of function 'pci_clear_master'; > did you mean 'pci_set_master'? [-Werror=implicit-function-declaration] > 32 | pci_clear_master(pdev); > | ^~~~~~~~~~~~~~~~ > | pci_set_master > cc1: some warnings being treated as errors > > [1] https://patchwork.freedesktop.org/patch/539977/?series=118522&rev=1 > > V2: > * Adjust commit log style to meet the convention and add Fixes tag > > Fixes: 6a479079c072 ("PCI: Add pci_clear_master() as opposite of pci_set_master()") > Reported-by: kernel test robot <lkp@intel.com> > Closes: https://lore.kernel.org/oe-kbuild-all/202305301659.4guSLavL-lkp@intel.com/ > Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> > Signed-off-by: Sui Jingfeng <suijingfeng@loongson.cn> Applied to pci/misc for v6.5 as follows: Author: Sui Jingfeng <suijingfeng@loongson.cn> Date: Wed May 31 18:27:44 2023 +0800 PCI: Add pci_clear_master() stub for non-CONFIG_PCI Add a pci_clear_master() stub when CONFIG_PCI is not set so drivers that support both PCI and platform devices don't need #ifdefs or extra Kconfig symbols for the PCI parts. [bhelgaas: commit log] Fixes: 6a479079c072 ("PCI: Add pci_clear_master() as opposite of pci_set_master()") Link: https://lore.kernel.org/r/20230531102744.2354313-1-suijingfeng@loongson.cn Signed-off-by: Sui Jingfeng <suijingfeng@loongson.cn> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> > --- > include/linux/pci.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/include/linux/pci.h b/include/linux/pci.h > index d0c19ff0c958..71c85380676c 100644 > --- a/include/linux/pci.h > +++ b/include/linux/pci.h > @@ -1904,6 +1904,7 @@ static inline int pci_dev_present(const struct pci_device_id *ids) > #define pci_dev_put(dev) do { } while (0) > > static inline void pci_set_master(struct pci_dev *dev) { } > +static inline void pci_clear_master(struct pci_dev *dev) { } > static inline int pci_enable_device(struct pci_dev *dev) { return -EIO; } > static inline void pci_disable_device(struct pci_dev *dev) { } > static inline int pcim_enable_device(struct pci_dev *pdev) { return -EIO; } > -- > 2.25.1 >
Hi, Thanks a lot. Can you receive my email? I reply several email to you, but Thunderbird told me that may mail is returned. Maybe you could read the content at lore. ``` The recipient's server is busy or down now. SMTP error, OPEN: Host kernel.org(35.85.114.177) OPEN said 521 5.7.1 Service unavailable; client [114.242.206.163] blocked using zen.spamhaus.org ``` On 2023/6/1 01:28, Bjorn Helgaas wrote: > On Wed, May 31, 2023 at 06:27:44PM +0800, Sui Jingfeng wrote: >> As some arch(m68k for example) doesn't have config_pci enabled, drivers[1] >> call pci_clear_master() without config_pci guard can not pass compile test. >> >> drivers/gpu/drm/etnaviv/etnaviv_pci_drv.c: >> In function 'etnaviv_gpu_pci_fini': >>>> drivers/gpu/drm/etnaviv/etnaviv_pci_drv.c:32:9: >> error: implicit declaration of function 'pci_clear_master'; >> did you mean 'pci_set_master'? [-Werror=implicit-function-declaration] >> 32 | pci_clear_master(pdev); >> | ^~~~~~~~~~~~~~~~ >> | pci_set_master >> cc1: some warnings being treated as errors >> >> [1] https://patchwork.freedesktop.org/patch/539977/?series=118522&rev=1 >> >> V2: >> * Adjust commit log style to meet the convention and add Fixes tag >> >> Fixes: 6a479079c072 ("PCI: Add pci_clear_master() as opposite of pci_set_master()") >> Reported-by: kernel test robot <lkp@intel.com> >> Closes: https://lore.kernel.org/oe-kbuild-all/202305301659.4guSLavL-lkp@intel.com/ >> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> >> Signed-off-by: Sui Jingfeng <suijingfeng@loongson.cn> > Applied to pci/misc for v6.5 as follows: > > Author: Sui Jingfeng <suijingfeng@loongson.cn> > Date: Wed May 31 18:27:44 2023 +0800 > > PCI: Add pci_clear_master() stub for non-CONFIG_PCI > > Add a pci_clear_master() stub when CONFIG_PCI is not set so drivers that > support both PCI and platform devices don't need #ifdefs or extra Kconfig > symbols for the PCI parts. > > [bhelgaas: commit log] > Fixes: 6a479079c072 ("PCI: Add pci_clear_master() as opposite of pci_set_master()") > Link: https://lore.kernel.org/r/20230531102744.2354313-1-suijingfeng@loongson.cn > Signed-off-by: Sui Jingfeng <suijingfeng@loongson.cn> > Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> > Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> > >> --- >> include/linux/pci.h | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/include/linux/pci.h b/include/linux/pci.h >> index d0c19ff0c958..71c85380676c 100644 >> --- a/include/linux/pci.h >> +++ b/include/linux/pci.h >> @@ -1904,6 +1904,7 @@ static inline int pci_dev_present(const struct pci_device_id *ids) >> #define pci_dev_put(dev) do { } while (0) >> >> static inline void pci_set_master(struct pci_dev *dev) { } >> +static inline void pci_clear_master(struct pci_dev *dev) { } >> static inline int pci_enable_device(struct pci_dev *dev) { return -EIO; } >> static inline void pci_disable_device(struct pci_dev *dev) { } >> static inline int pcim_enable_device(struct pci_dev *pdev) { return -EIO; } >> -- >> 2.25.1 >>
On Thu, Jun 01, 2023 at 01:44:52AM +0800, Sui Jingfeng wrote: > Can you receive my email? > > I reply several email to you, but Thunderbird told me that may mail is > returned. > > Maybe you could read the content at lore. I do receive your email (at least some; obviously if there are things I don't receive I wouldn't know). I read most Linux email via lei [1], so if it shows up on lore, I should see it. Bjorn [1] https://people.kernel.org/monsieuricon/lore-lei-part-1-getting-started
Hi, Dear Bjorn Where is the formal(unstream) PCI git branch where we could see the latest patch ? On 2023/6/1 02:03, Bjorn Helgaas wrote: > On Thu, Jun 01, 2023 at 01:44:52AM +0800, Sui Jingfeng wrote: >> Can you receive my email? >> >> I reply several email to you, but Thunderbird told me that may mail is >> returned. >> >> Maybe you could read the content at lore. > I do receive your email (at least some; obviously if there are things > I don't receive I wouldn't know). I read most Linux email via lei [1], > so if it shows up on lore, I should see it. > > Bjorn > > [1] https://people.kernel.org/monsieuricon/lore-lei-part-1-getting-started Thanks for the link.
On Tue, Jun 20, 2023 at 12:04:40PM +0800, Sui Jingfeng wrote: > Where is the formal(unstream) PCI git branch where we could see the latest > patch ? Here's the "misc" branch: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git/log/?h=misc And here's the "next" branch that will be merged for v6.5, which includes "misc" and other things: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git/log/?h=next
Hi, On 2023/6/20 19:06, Bjorn Helgaas wrote: > On Tue, Jun 20, 2023 at 12:04:40PM +0800, Sui Jingfeng wrote: >> Where is the formal(unstream) PCI git branch where we could see the latest >> patch ? > Here's the "misc" branch: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git/log/?h=misc > > And here's the "next" branch that will be merged for v6.5, which > includes "misc" and other things: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git/log/?h=next Thanks for you kindness reply and guidance, now I know that.
On Tue, Jun 20, 2023 at 06:06:00AM -0500, Bjorn Helgaas wrote: > On Tue, Jun 20, 2023 at 12:04:40PM +0800, Sui Jingfeng wrote: > > Where is the formal(unstream) PCI git branch where we could see the latest > > patch ? > > Here's the "misc" branch: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git/log/?h=misc > > And here's the "next" branch that will be merged for v6.5, which > includes "misc" and other things: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git/log/?h=next I forgot to mention: in case you need to find other git branches, most subsystems list this in the MAINTAINERS file, e.g., PCI SUBSYSTEM ... T: git git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git
diff --git a/include/linux/pci.h b/include/linux/pci.h index d0c19ff0c958..71c85380676c 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1904,6 +1904,7 @@ static inline int pci_dev_present(const struct pci_device_id *ids) #define pci_dev_put(dev) do { } while (0) static inline void pci_set_master(struct pci_dev *dev) { } +static inline void pci_clear_master(struct pci_dev *dev) { } static inline int pci_enable_device(struct pci_dev *dev) { return -EIO; } static inline void pci_disable_device(struct pci_dev *dev) { } static inline int pcim_enable_device(struct pci_dev *pdev) { return -EIO; }