From: Sinan Kaya <okaya@codeaurora.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: linux-pci@vger.kernel.org, Timur Tabi <timur@codeaurora.org>,
linux-arm-msm@vger.kernel.org,
linux-arm Mailing List <linux-arm-kernel@lists.infradead.org>,
Jonathan Corbet <corbet@lwn.net>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
<x86@kernel.org>, Bjorn Helgaas <bhelgaas@google.com>,
Christoffer Dall <cdall@linaro.org>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Marc Zyngier <marc.zyngier@arm.com>,
Kai-Heng Feng <kai.heng.feng@canonical.com>,
Thymo van Beers <thymovanbeers@gmail.com>,
Frederic Weisbecker <frederic@kernel.org>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
David
Subject: Re: [PATCH] PCI: move early dump functionality from x86 arch into the common code
Date: Fri, 1 Jun 2018 11:06:53 -0400 [thread overview]
Message-ID: <53e4d6c3-ee19-fd04-4ba3-862d04558689@codeaurora.org> (raw)
In-Reply-To: <CAHp75Vc3YKAR1P_F0fwD+ueGub4gVUjP0=wv4Egf_fTSVkSUjw@mail.gmail.com>
On 6/1/2018 11:02 AM, Andy Shevchenko wrote:
> On Wed, May 30, 2018 at 7:34 AM, Sinan Kaya <okaya@codeaurora.org> wrote:
>> Move early dump functionality into common code so that it is available for
>> all archtiectures. No need to carry arch specific reads around as the read
>> hooks are already initialized by the time pci_setup_device() is getting
>> called during scan.
>
>> /* If set, the PCIe ATS capability will not be used. */
>> static bool pcie_ats_disabled;
>>
>> +bool pci_early_dump;
>> +
>
> I didn't check above these, but maybe a good idea to add one line
> comment what is this about?
This was discussed here:
https://www.spinics.net/lists/linux-pci/msg72859.html
>
>
>> extern const unsigned char pcie_link_speed[];
>> -
>> +extern bool pci_early_dump;
>> bool pcie_cap_has_lnkctl(const struct pci_dev *dev);
>>
>
> Hmm... I would rather not attach this line to some function declarations.
Sure
>
>> +static void early_dump_pci_device(struct pci_dev *pdev)
>> +{
>> + u32 value[256 / 4];
>> + int i;
>> +
>> + dev_info(&pdev->dev, "pci 0000:%02x:%02x.%d config space:\n",
>> + pdev->bus->number, PCI_SLOT(pdev->devfn),
>> + PCI_FUNC(pdev->devfn));
>
> Shouldn't be this changed to pci_info() ?
Yeah, I need to get used to pci_info().
>
>> +
>> + for (i = 0; i < 256; i += 4)
>> + pci_read_config_dword(pdev, i, &value[i / 4]);
>> +
>> + print_hex_dump(KERN_INFO, "", DUMP_PREFIX_OFFSET, 16, 1, value,
>> + 256, false);
>> +}
>
--
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
WARNING: multiple messages have this Message-ID (diff)
From: Sinan Kaya <okaya@codeaurora.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: linux-pci@vger.kernel.org, Timur Tabi <timur@codeaurora.org>,
linux-arm-msm@vger.kernel.org,
linux-arm Mailing List <linux-arm-kernel@lists.infradead.org>,
Jonathan Corbet <corbet@lwn.net>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
<x86@kernel.org>, Bjorn Helgaas <bhelgaas@google.com>,
Christoffer Dall <cdall@linaro.org>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Marc Zyngier <marc.zyngier@arm.com>,
Kai-Heng Feng <kai.heng.feng@canonical.com>,
Thymo van Beers <thymovanbeers@gmail.com>,
Frederic Weisbecker <frederic@kernel.org>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
David Rientjes <rientjes@google.com>,
Kate Stewart <kstewart@linuxfoundation.org>,
Philippe Ombredanne <pombredanne@nexb.com>,
Tom Lendacky <thomas.lendacky@amd.com>,
Juergen Gross <jgross@suse.com>, Borislav Petkov <bp@suse.de>,
Mikulas Patocka <mpatocka@redhat.com>,
Petr Tesarik <ptesarik@suse.cz>,
Andy Lutomirski <luto@kernel.org>,
Dou Liyang <douly.fnst@cn.fujitsu.com>,
Ram Pai <linuxram@us.ibm.com>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
"open list:DOCUMENTATION" <linux-doc@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] PCI: move early dump functionality from x86 arch into the common code
Date: Fri, 1 Jun 2018 11:06:53 -0400 [thread overview]
Message-ID: <53e4d6c3-ee19-fd04-4ba3-862d04558689@codeaurora.org> (raw)
In-Reply-To: <CAHp75Vc3YKAR1P_F0fwD+ueGub4gVUjP0=wv4Egf_fTSVkSUjw@mail.gmail.com>
On 6/1/2018 11:02 AM, Andy Shevchenko wrote:
> On Wed, May 30, 2018 at 7:34 AM, Sinan Kaya <okaya@codeaurora.org> wrote:
>> Move early dump functionality into common code so that it is available for
>> all archtiectures. No need to carry arch specific reads around as the read
>> hooks are already initialized by the time pci_setup_device() is getting
>> called during scan.
>
>> /* If set, the PCIe ATS capability will not be used. */
>> static bool pcie_ats_disabled;
>>
>> +bool pci_early_dump;
>> +
>
> I didn't check above these, but maybe a good idea to add one line
> comment what is this about?
This was discussed here:
https://www.spinics.net/lists/linux-pci/msg72859.html
>
>
>> extern const unsigned char pcie_link_speed[];
>> -
>> +extern bool pci_early_dump;
>> bool pcie_cap_has_lnkctl(const struct pci_dev *dev);
>>
>
> Hmm... I would rather not attach this line to some function declarations.
Sure
>
>> +static void early_dump_pci_device(struct pci_dev *pdev)
>> +{
>> + u32 value[256 / 4];
>> + int i;
>> +
>> + dev_info(&pdev->dev, "pci 0000:%02x:%02x.%d config space:\n",
>> + pdev->bus->number, PCI_SLOT(pdev->devfn),
>> + PCI_FUNC(pdev->devfn));
>
> Shouldn't be this changed to pci_info() ?
Yeah, I need to get used to pci_info().
>
>> +
>> + for (i = 0; i < 256; i += 4)
>> + pci_read_config_dword(pdev, i, &value[i / 4]);
>> +
>> + print_hex_dump(KERN_INFO, "", DUMP_PREFIX_OFFSET, 16, 1, value,
>> + 256, false);
>> +}
>
--
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Sinan Kaya <okaya@codeaurora.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Kate Stewart <kstewart@linuxfoundation.org>,
"open list:DOCUMENTATION" <linux-doc@vger.kernel.org>,
linux-pci@vger.kernel.org, Petr Tesarik <ptesarik@suse.cz>,
Ram Pai <linuxram@us.ibm.com>,
Kai-Heng Feng <kai.heng.feng@canonical.com>,
"H. Peter Anvin" <hpa@zytor.com>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
Christoffer Dall <cdall@linaro.org>,
Jonathan Corbet <corbet@lwn.net>,
Timur Tabi <timur@codeaurora.org>,
"maintainer:X86 ARCHITECTURE \(32-BIT AND 64-BIT\)"
<x86@kernel.org>, Ingo Molnar <mingo@redhat.com>,
David Rientjes <rientjes@google.com>,
Thymo van Beers <thymovanbeers@gmail.com>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Tom Lendacky <thomas.lendacky@amd.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
Marc Zyngier <marc.zyngier@arm.com>,
linux-arm-msm@vger.kernel.org,
Frederic Weisbecker <frederic@kernel.org>,
Mikulas Patocka <mpatocka@redhat.com>,
Andy Lutomirski <luto@kernel.org>,
Bjorn Helgaas <bhelgaas@google.com>,
Thomas Gleixner <tglx@linutronix.de>,
linux-arm Mailing List <linux-arm-kernel@lists.infradead.org>,
Juergen Gross <jgross@suse.com>,
Dou Liyang <douly.fnst@cn.fujitsu.com>,
Borislav Petkov <bp@suse.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
open list <linux-kernel@vger.kernel.org>,
Philippe Ombredanne <pombredanne@nexb.com>
Subject: Re: [PATCH] PCI: move early dump functionality from x86 arch into the common code
Date: Fri, 1 Jun 2018 11:06:53 -0400 [thread overview]
Message-ID: <53e4d6c3-ee19-fd04-4ba3-862d04558689@codeaurora.org> (raw)
In-Reply-To: <CAHp75Vc3YKAR1P_F0fwD+ueGub4gVUjP0=wv4Egf_fTSVkSUjw@mail.gmail.com>
On 6/1/2018 11:02 AM, Andy Shevchenko wrote:
> On Wed, May 30, 2018 at 7:34 AM, Sinan Kaya <okaya@codeaurora.org> wrote:
>> Move early dump functionality into common code so that it is available for
>> all archtiectures. No need to carry arch specific reads around as the read
>> hooks are already initialized by the time pci_setup_device() is getting
>> called during scan.
>
>> /* If set, the PCIe ATS capability will not be used. */
>> static bool pcie_ats_disabled;
>>
>> +bool pci_early_dump;
>> +
>
> I didn't check above these, but maybe a good idea to add one line
> comment what is this about?
This was discussed here:
https://www.spinics.net/lists/linux-pci/msg72859.html
>
>
>> extern const unsigned char pcie_link_speed[];
>> -
>> +extern bool pci_early_dump;
>> bool pcie_cap_has_lnkctl(const struct pci_dev *dev);
>>
>
> Hmm... I would rather not attach this line to some function declarations.
Sure
>
>> +static void early_dump_pci_device(struct pci_dev *pdev)
>> +{
>> + u32 value[256 / 4];
>> + int i;
>> +
>> + dev_info(&pdev->dev, "pci 0000:%02x:%02x.%d config space:\n",
>> + pdev->bus->number, PCI_SLOT(pdev->devfn),
>> + PCI_FUNC(pdev->devfn));
>
> Shouldn't be this changed to pci_info() ?
Yeah, I need to get used to pci_info().
>
>> +
>> + for (i = 0; i < 256; i += 4)
>> + pci_read_config_dword(pdev, i, &value[i / 4]);
>> +
>> + print_hex_dump(KERN_INFO, "", DUMP_PREFIX_OFFSET, 16, 1, value,
>> + 256, false);
>> +}
>
--
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: okaya@codeaurora.org (Sinan Kaya)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] PCI: move early dump functionality from x86 arch into the common code
Date: Fri, 1 Jun 2018 11:06:53 -0400 [thread overview]
Message-ID: <53e4d6c3-ee19-fd04-4ba3-862d04558689@codeaurora.org> (raw)
In-Reply-To: <CAHp75Vc3YKAR1P_F0fwD+ueGub4gVUjP0=wv4Egf_fTSVkSUjw@mail.gmail.com>
On 6/1/2018 11:02 AM, Andy Shevchenko wrote:
> On Wed, May 30, 2018 at 7:34 AM, Sinan Kaya <okaya@codeaurora.org> wrote:
>> Move early dump functionality into common code so that it is available for
>> all archtiectures. No need to carry arch specific reads around as the read
>> hooks are already initialized by the time pci_setup_device() is getting
>> called during scan.
>
>> /* If set, the PCIe ATS capability will not be used. */
>> static bool pcie_ats_disabled;
>>
>> +bool pci_early_dump;
>> +
>
> I didn't check above these, but maybe a good idea to add one line
> comment what is this about?
This was discussed here:
https://www.spinics.net/lists/linux-pci/msg72859.html
>
>
>> extern const unsigned char pcie_link_speed[];
>> -
>> +extern bool pci_early_dump;
>> bool pcie_cap_has_lnkctl(const struct pci_dev *dev);
>>
>
> Hmm... I would rather not attach this line to some function declarations.
Sure
>
>> +static void early_dump_pci_device(struct pci_dev *pdev)
>> +{
>> + u32 value[256 / 4];
>> + int i;
>> +
>> + dev_info(&pdev->dev, "pci 0000:%02x:%02x.%d config space:\n",
>> + pdev->bus->number, PCI_SLOT(pdev->devfn),
>> + PCI_FUNC(pdev->devfn));
>
> Shouldn't be this changed to pci_info() ?
Yeah, I need to get used to pci_info().
>
>> +
>> + for (i = 0; i < 256; i += 4)
>> + pci_read_config_dword(pdev, i, &value[i / 4]);
>> +
>> + print_hex_dump(KERN_INFO, "", DUMP_PREFIX_OFFSET, 16, 1, value,
>> + 256, false);
>> +}
>
--
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
WARNING: multiple messages have this Message-ID (diff)
From: Sinan Kaya <okaya@codeaurora.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: linux-pci@vger.kernel.org, Timur Tabi <timur@codeaurora.org>,
linux-arm-msm@vger.kernel.org,
linux-arm Mailing List <linux-arm-kernel@lists.infradead.org>,
Jonathan Corbet <corbet@lwn.net>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
<x86@kernel.org>, Bjorn Helgaas <bhelgaas@google.com>,
Christoffer Dall <cdall@linaro.org>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Marc Zyngier <marc.zyngier@arm.com>,
Kai-Heng Feng <kai.heng.feng@canonical.com>,
Thymo van Beers <thymovanbeers@gmail.com>,
Frederic Weisbecker <frederic@kernel.org>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
David Rientjes <rientjes@google.com>,
Kate Stewart <kstewart@linuxfoundation.org>,
Philippe Ombredanne <pombredanne@nexb.com>,
Tom Lendacky <thomas.lendacky@amd.com>,
Juergen Gross <jgross@suse.com>, Borislav Petkov <bp@suse.de>,
Mikulas Patocka <mpatocka@redhat.com>,
Petr Tesarik <ptesarik@suse.cz>,
Andy Lutomirski <luto@kernel.org>,
Dou Liyang <douly.fnst@cn.fujitsu.com>,
Ram Pai <linuxram@us.ibm.com>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
"open list:DOCUMENTATION" <linux-doc@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] PCI: move early dump functionality from x86 arch into the common code
Date: Fri, 1 Jun 2018 11:06:53 -0400 [thread overview]
Message-ID: <53e4d6c3-ee19-fd04-4ba3-862d04558689@codeaurora.org> (raw)
In-Reply-To: <CAHp75Vc3YKAR1P_F0fwD+ueGub4gVUjP0=wv4Egf_fTSVkSUjw@mail.gmail.com>
On 6/1/2018 11:02 AM, Andy Shevchenko wrote:
> On Wed, May 30, 2018 at 7:34 AM, Sinan Kaya <okaya@codeaurora.org> wrote:
>> Move early dump functionality into common code so that it is available for
>> all archtiectures. No need to carry arch specific reads around as the read
>> hooks are already initialized by the time pci_setup_device() is getting
>> called during scan.
>
>> /* If set, the PCIe ATS capability will not be used. */
>> static bool pcie_ats_disabled;
>>
>> +bool pci_early_dump;
>> +
>
> I didn't check above these, but maybe a good idea to add one line
> comment what is this about?
This was discussed here:
https://www.spinics.net/lists/linux-pci/msg72859.html
>
>
>> extern const unsigned char pcie_link_speed[];
>> -
>> +extern bool pci_early_dump;
>> bool pcie_cap_has_lnkctl(const struct pci_dev *dev);
>>
>
> Hmm... I would rather not attach this line to some function declarations.
Sure
>
>> +static void early_dump_pci_device(struct pci_dev *pdev)
>> +{
>> + u32 value[256 / 4];
>> + int i;
>> +
>> + dev_info(&pdev->dev, "pci 0000:%02x:%02x.%d config space:\n",
>> + pdev->bus->number, PCI_SLOT(pdev->devfn),
>> + PCI_FUNC(pdev->devfn));
>
> Shouldn't be this changed to pci_info() ?
Yeah, I need to get used to pci_info().
>
>> +
>> + for (i = 0; i < 256; i += 4)
>> + pci_read_config_dword(pdev, i, &value[i / 4]);
>> +
>> + print_hex_dump(KERN_INFO, "", DUMP_PREFIX_OFFSET, 16, 1, value,
>> + 256, false);
>> +}
>
--
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
next prev parent reply other threads:[~2018-06-01 15:06 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-30 4:34 [PATCH] PCI: move early dump functionality from x86 arch into the common code Sinan Kaya
2018-05-30 4:34 ` Sinan Kaya
2018-05-30 4:34 ` Sinan Kaya
2018-05-30 4:34 ` Sinan Kaya
2018-05-30 4:34 ` Sinan Kaya
2018-05-30 4:36 ` Sinan Kaya
2018-05-30 4:36 ` Sinan Kaya
2018-05-30 4:36 ` Sinan Kaya
2018-05-30 4:36 ` Sinan Kaya
2018-05-30 4:36 ` Sinan Kaya
2018-06-01 14:45 ` Sinan Kaya
2018-06-01 14:45 ` Sinan Kaya
2018-06-01 14:45 ` Sinan Kaya
2018-06-01 14:45 ` Sinan Kaya
2018-06-01 14:45 ` Sinan Kaya
2018-06-01 15:02 ` Andy Shevchenko
2018-06-01 15:02 ` Andy Shevchenko
2018-06-01 15:02 ` Andy Shevchenko
2018-06-01 15:02 ` Andy Shevchenko
2018-06-01 15:02 ` Andy Shevchenko
2018-06-01 15:06 ` Sinan Kaya [this message]
2018-06-01 15:06 ` Sinan Kaya
2018-06-01 15:06 ` Sinan Kaya
2018-06-01 15:06 ` Sinan Kaya
2018-06-01 15:06 ` Sinan Kaya
2018-06-01 15:24 ` Andy Shevchenko
2018-06-01 15:24 ` Andy Shevchenko
2018-06-01 15:24 ` Andy Shevchenko
2018-06-01 15:24 ` Andy Shevchenko
2018-06-01 15:24 ` Andy Shevchenko
2018-06-01 15:24 ` Sinan Kaya
2018-06-01 15:24 ` Sinan Kaya
2018-06-01 15:24 ` Sinan Kaya
2018-06-01 15:24 ` Sinan Kaya
2018-06-01 15:24 ` Sinan Kaya
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53e4d6c3-ee19-fd04-4ba3-862d04558689@codeaurora.org \
--to=okaya@codeaurora.org \
--cc=andy.shevchenko@gmail.com \
--cc=bhelgaas@google.com \
--cc=cdall@linaro.org \
--cc=corbet@lwn.net \
--cc=frederic@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=kai.heng.feng@canonical.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=mingo@redhat.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=tglx@linutronix.de \
--cc=thymovanbeers@gmail.com \
--cc=timur@codeaurora.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.