Re: [PATCH] NVMe: Fixed race between nvme_thread probe path.

2015-06-18 Thread Jon Derrick
On Thu, Jun 18, 2015 at 04:13:50PM +0530, Parav Pandit wrote: Kernel thread nvme_thread and driver load process can be executing in parallel on different CPU. This leads to race condition whenever nvme_alloc_queue() instructions are executed out of order that can reflects incorrect value for

Re: [PATCH] NVMe: Fixed race between nvme_thread probe path.

2015-06-26 Thread Jon Derrick
+ smp_wmb(); This has been applied already as an explicit mb() Since these structure is only accessible by software, won't smp_wmb() sufficient enough? Seems reasonable to me -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to

Re: [PATCH] VMD: Attach vmd resources to parent domain's resource tree

2016-02-23 Thread Jon Derrick
On Tue, Feb 23, 2016 at 11:16:11PM +, Keith Busch wrote: > On Tue, Feb 23, 2016 at 02:50:13PM -0700, Jon Derrick wrote: > > This patch attaches the new VMD domain's resources to the VMD device's > > resources. This allows /proc/iomem to display a more complete picture.

[PATCH] VMD: Attach vmd resources to parent domain's resource tree

2016-02-23 Thread Jon Derrick
c230-c24f : PCI Bus 1:01 c400-c40f : :5d:05.5 c4002000-c40f : VMD MEMBAR2 Signed-off-by: Jon Derrick <jonathan.derr...@intel.com> --- arch/x86/pci/vmd.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/arch/x86/pci/vmd.c b/arch/x

Re: [PATCHv3 4/4] MAINTAINERS: Remove powerpc's opal match

2017-02-16 Thread Jon Derrick
Thanks everyone. Sorry about the mess :) On 02/15/2017 10:23 PM, Michael Ellerman wrote: > Jon Derrick <jonathan.derr...@intel.com> writes: > >> PPC's 'opal' match pattern also matches block/sed-opal.c, where it looks >> like the 'arch/powerpc' file pattern should be

[PATCH 2/4] block/sed: Add helper to qualify response tokens

2017-02-15 Thread Jon Derrick
Add helper which verifies the response token is valid and matches the expected value. Merges token_type and response_get_token. Signed-off-by: Jon Derrick <jonathan.derr...@intel.com> --- block/sed-opal.c | 61 +++- 1 file chang

[PATCH 3/4] block/sed: Check received header lengths

2017-02-15 Thread Jon Derrick
Add a buffer size check against discovery and response header lengths before we loop over their buffers. Signed-off-by: Jon Derrick <jonathan.derr...@intel.com> --- block/sed-opal.c | 35 +-- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a

[PATCH 4/4] MAINTAINERS: Remove powerpc's opal match

2017-02-15 Thread Jon Derrick
PPC's 'opal' match pattern also matches block/sed-opal.c, where it looks like the 'arch/powerpc' file pattern should be enough to match powerpc opal code by itself. Remove the opal regex pattern from powerpc. Signed-off-by: Jon Derrick <jonathan.derr...@intel.com> --- MAINTAINERS | 1 -

[PATCH 1/4] block/sed: Use ssize_t on atom parsers to return errors

2017-02-15 Thread Jon Derrick
The short atom parser can return an errno from decoding but does not currently return the error as a signed value. Convert all of the parsers to ssize_t. Signed-off-by: Jon Derrick <jonathan.derr...@intel.com> --- block/sed-opal.c | 28 ++-- include/lin

[PATCHv3 4/4] MAINTAINERS: Remove powerpc's opal match

2017-02-15 Thread Jon Derrick
PPC's 'opal' match pattern also matches block/sed-opal.c, where it looks like the 'arch/powerpc' file pattern should be enough to match powerpc opal code by itself. Remove the opal regex pattern from powerpc. Signed-off-by: Jon Derrick <jonathan.derr...@intel.com> --- MAINTAINERS | 1 -

[PATCHv3 1/4] block/sed: Use ssize_t on atom parsers to return errors

2017-02-15 Thread Jon Derrick
The short atom parser can return an errno from decoding but does not currently return the error as a signed value. Convert all of the parsers to ssize_t. Signed-off-by: Jon Derrick <jonathan.derr...@intel.com> --- block/sed-opal.c | 28 ++-- 1 file changed, 14 inse

Re: [PATCH 3/4] block/sed: Check received header lengths

2017-02-15 Thread Jon Derrick
On 02/15/2017 11:15 AM, Scott Bauer wrote: > On Wed, Feb 15, 2017 at 12:38:53PM -0700, Jon Derrick wrote: >> Add a buffer size check against discovery and response header lengths >> before we loop over their buffers. >> >> Signed-off-by: Jon Derrick <jonathan.derr.

[PATCHv2 3/4] block/sed: Check received header lengths

2017-02-15 Thread Jon Derrick
Add a buffer size check against discovery and response header lengths before we loop over their buffers. Signed-off-by: Jon Derrick <jonathan.derr...@intel.com> --- block/sed-opal.c | 35 +-- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a

[PATCHv2 4/4] MAINTAINERS: Remove powerpc's opal match

2017-02-15 Thread Jon Derrick
PPC's 'opal' match pattern also matches block/sed-opal.c, where it looks like the 'arch/powerpc' file pattern should be enough to match powerpc opal code by itself. Remove the opal regex pattern from powerpc. Signed-off-by: Jon Derrick <jonathan.derr...@intel.com> --- MAINTAINERS | 1 -

[PATCHv2 1/4] block/sed: Use ssize_t on atom parsers to return errors

2017-02-15 Thread Jon Derrick
The short atom parser can return an errno from decoding but does not currently return the error as a signed value. Convert all of the parsers to ssize_t. Signed-off-by: Jon Derrick <jonathan.derr...@intel.com> --- block/sed-opal.c | 28 ++-- 1 file changed, 14 inse

[PATCHv2 2/4] block/sed: Add helper to qualify response tokens

2017-02-15 Thread Jon Derrick
Add helper which verifies the response token is valid and matches the expected value. Merges token_type and response_get_token. Signed-off-by: Jon Derrick <jonathan.derr...@intel.com> --- block/sed-opal.c | 61 +++- 1 file chang

[PATCHv2 0/4] OPAL patches

2017-02-15 Thread Jon Derrick
Just a couple of fixes for sed-opal to prevent faulty firmware from allowing us to go off in the weeds, and a helper to remove some duplicate code. v1->v2: left tok->len as a size_t got everyone important on the same email thread Jon Derrick (4): block/sed: Use ssize_t on atom p

[PATCHv4 3/4] block/sed: Check received header lengths

2017-02-15 Thread Jon Derrick
Add a buffer size check against discovery and response header lengths before we loop over their buffers. Signed-off-by: Jon Derrick <jonathan.derr...@intel.com> Reviewed-by: Scott Bauer <scott.ba...@intel.com> --- block/sed-opal.c | 35 +-- 1 file

[PATCHv4 1/4] block/sed: Use ssize_t on atom parsers to return errors

2017-02-15 Thread Jon Derrick
The short atom parser can return an errno from decoding but does not currently return the error as a signed value. Convert all of the parsers to ssize_t. Signed-off-by: Jon Derrick <jonathan.derr...@intel.com> Reviewed-by: Scott Bauer <scott.ba...@intel.com> --- block/sed

[PATCHv4 2/4] block/sed: Add helper to qualify response tokens

2017-02-15 Thread Jon Derrick
Add helper which verifies the response token is valid and matches the expected value. Merges token_type and response_get_token. Signed-off-by: Jon Derrick <jonathan.derr...@intel.com> Reviewed-by: Scott Bauer <scott.ba...@intel.com> --- block/sed

[PATCHv4 0/4] OPAL patches

2017-02-15 Thread Jon Derrick
parser check and changed it to only check the subpacket length v1->v2: left tok->len as a size_t got everyone important on the same email thread Jon Derrick (4): block/sed: Use ssize_t on atom parsers to return errors block/sed: Add helper to qualify response tokens block/sed: Check rec

[PATCHv4 4/4] MAINTAINERS: Remove powerpc's opal match

2017-02-15 Thread Jon Derrick
PPC's 'opal' match pattern also matches block/sed-opal.c, where it looks like the 'arch/powerpc' file pattern should be enough to match powerpc opal code by itself. Remove the opal regex pattern from powerpc. Signed-off-by: Jon Derrick <jonathan.derr...@intel.com> --- MAINTAINERS | 1 -

[PATCHv3 3/4] block/sed: Check received header lengths

2017-02-15 Thread Jon Derrick
Add a buffer size check against discovery and response header lengths before we loop over their buffers. Signed-off-by: Jon Derrick <jonathan.derr...@intel.com> --- block/sed-opal.c | 35 +-- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a

[PATCHv3 0/4] OPAL patches

2017-02-15 Thread Jon Derrick
k->len as a size_t got everyone important on the same email thread Jon Derrick (4): block/sed: Use ssize_t on atom parsers to return errors block/sed: Add helper to qualify response tokens block/sed: Check received header lengths MAINTAINERS: Remove powerpc's opal match MAINTAINERS | 1

[PATCHv3 2/4] block/sed: Add helper to qualify response tokens

2017-02-15 Thread Jon Derrick
Add helper which verifies the response token is valid and matches the expected value. Merges token_type and response_get_token. Signed-off-by: Jon Derrick <jonathan.derr...@intel.com> --- block/sed-opal.c | 61 +++- 1 file chang

Re: [PATCH] x86/ioapic: Ignore root bridges without a companion ACPI device

2016-09-12 Thread Jon Derrick
On Sat, Sep 10, 2016 at 11:40:45PM +0800, Rui Wang wrote: > Some PCI root bridges don't have a corresponding ACPI device. > This can be the case on some old platforms. Don't call acpi_ioapic_add() > on these bridges because they can't support ioapic hotplug. Not just old platforms. VMD is a new

Re: [PATCH] x86/ioapic: Ignore root bridges without a companion ACPI device

2016-09-12 Thread Jon Derrick
On Mon, Sep 12, 2016 at 03:43:23PM -0600, Luck, Tony wrote: > > What branch is this based on? I can't find the relevant code/commits > > tip tree. branch x86/apic > > -Tony Cheers!

Re: [PATCH 1/2] nvme : Use correct scnprintf in cmb show

2016-12-19 Thread Jon Derrick
Looks good. Thanks Stephen. Reviewed-by Jon Derrick: <jonathan.derr...@intel.com> On Fri, Dec 16, 2016 at 11:54:50AM -0700, Stephen Bates wrote: > Make sure we are using the correct scnprintf in the sysfs show > function for the CMB. > > Signed-off-by: Stephen Bates &l

Re: [PATCH 2/2] nvme: improve cmb sysfs reporting

2016-12-19 Thread Jon Derrick
Minor nit below On Fri, Dec 16, 2016 at 11:54:51AM -0700, Stephen Bates wrote: > Add more information to the NVMe CMB sysfs entry. This includes > information about the CMB size, location and capabilities. > > Signed-off-by: Stephen Bates > --- > drivers/nvme/host/pci.c |

Re: [PATCH v3 2/5] lib: Add Sed-opal library

2016-12-20 Thread Jon Derrick
On Mon, Dec 19, 2016 at 11:28:47PM -0800, Christoph Hellwig wrote: [snip] > > + while (cpos < total) { > > + if (!(pos[0] & 0x80)) /* tiny atom */ > > + token_length = response_parse_tiny(iter, pos); > > + else if (!(pos[0] & 0x40)) /* short atom */ > > +

Re: block/sed-opal.c: 2 * bad if tests ?

2017-03-06 Thread Jon Derrick
On 03/06/2017 05:00 AM, David Binderman wrote: > Hello there, > > 1. > > block/sed-opal.c:2136:40: warning: logical ‘and’ of mutually exclusive tests > is always false [-Wlogical-op] > > Source code is > > if (lk_unlk->session.who < OPAL_USER1 && > lk_unlk->session.who >

Re: [PATCH 2/3] pci: Generalize is_vmd behavior

2017-08-11 Thread Jon Derrick
On 08/11/2017 11:03 AM, Bjorn Helgaas wrote: > On Mon, Aug 07, 2017 at 01:57:12PM -0600, Jon Derrick wrote: >> Generalize is_vmd behavior to remove dependency on domain number >> checking in pci quirks. >> >> Signed-off-by: Jon Derrick <jonathan.derr...@intel.com>

Re: [PATCH 3/3] iommu: prevent VMD child devices from being remapping targets

2017-08-11 Thread Jon Derrick
Hi Robin, thanks for the reply. On 08/11/2017 12:25 PM, Robin Murphy wrote: > On 07/08/17 20:57, Jon Derrick wrote: >> VMD child devices must use the VMD endpoint's ID as the DMA source. >> Because of this, there needs to be a way to link the parent VMD >> endpoint's DMAR do

[PATCH 1/3] MAINTAINERS: Add Jonathan Derrick as VMD maintainer

2017-08-07 Thread Jon Derrick
Add myself as VMD maintainer Signed-off-by: Jon Derrick <jonathan.derr...@intel.com> --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index f66488d..3ec39df 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -10090,6 +10090,7 @@ F: drivers/p

[PATCH 2/3] pci: Generalize is_vmd behavior

2017-08-07 Thread Jon Derrick
Generalize is_vmd behavior to remove dependency on domain number checking in pci quirks. Signed-off-by: Jon Derrick <jonathan.derr...@intel.com> --- arch/x86/include/asm/pci.h | 8 +++- arch/x86/pci/common.c | 2 +- drivers/pci/quirks.c | 2 +- include/linux/pci.h

[PATCH 3/3] iommu: prevent VMD child devices from being remapping targets

2017-08-07 Thread Jon Derrick
binding by userspace-access drivers such as VFIO. Signed-off-by: Jon Derrick <jonathan.derr...@intel.com> --- drivers/iommu/intel-iommu.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 687f18f..651a6cd 100644 --- a/d

Re: [RFC 2/3] module: Ignore delete_id parameter

2017-09-28 Thread Jon Derrick
On 09/28/2017 12:03 AM, Dan Williams wrote: > On Wed, Sep 27, 2017 at 1:40 PM, Jon Derrick <jonathan.derr...@intel.com> > wrote: >> The PCI driver delete_id parameter is handled in each individual driver >> registration callback. >> >> Signed-off-by: Jon

Re: [RFC 1/3] PCI: pci-driver: Introduce pci device delete list

2017-09-28 Thread Jon Derrick
Hi Greg, On 09/28/2017 03:09 AM, Greg Kroah-Hartman wrote: > On Wed, Sep 27, 2017 at 04:40:20PM -0400, Jon Derrick wrote: >> This patch introduces a new kernel command line parameter to mask pci >> device ids from pci driver id tables. This prevents masked devices from >>

Re: [RFC 2/3] module: Ignore delete_id parameter

2017-09-28 Thread Jon Derrick
On 09/28/2017 03:02 AM, Greg Kroah-Hartman wrote: > On Wed, Sep 27, 2017 at 04:40:21PM -0400, Jon Derrick wrote: >> The PCI driver delete_id parameter is handled in each individual driver >> registration callback. >> >> Signed-off-by: Jon Derrick <jonathan.derr..

[RFC 0/3] Introduce PCI device blacklisting

2017-09-27 Thread Jon Derrick
This set introduces a method to keep devices from matching driver id tables. Please see 0001 for more details of the motivation and implementation. This set currently applies to Bjorn's next (v4.14-rc1) branch. Jon Derrick (3): PCI: pci-driver: Introduce pci device delete list module

[RFC 1/3] PCI: pci-driver: Introduce pci device delete list

2017-09-27 Thread Jon Derrick
:5678 .delete_id=: .delete_id=::::010802 .delete_id=1234:5678,abcd:ef01,2345: Signed-off-by: Jon Derrick <jonathan.derr...@intel.com> --- drivers/pci/pci-driver.c

[RFC 3/3] Documentation: Add pci device delete_id interface

2017-09-27 Thread Jon Derrick
Document the .delete_id= cmdline interface for masking built-in and module device id tables. Signed-off-by: Jon Derrick <jonathan.derr...@intel.com> --- Documentation/admin-guide/kernel-parameters.txt | 13 + 1 file changed, 13 insertions(+) diff --git a/Documentation/admin

[RFC 2/3] module: Ignore delete_id parameter

2017-09-27 Thread Jon Derrick
The PCI driver delete_id parameter is handled in each individual driver registration callback. Signed-off-by: Jon Derrick <jonathan.derr...@intel.com> --- kernel/module.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/kernel/module.c b/kernel/module.c index de66ec8..2b2dccf

[PATCH v2 1/4] MAINTAINERS: Add Jonathan Derrick as VMD maintainer

2017-08-17 Thread Jon Derrick
Add myself as VMD maintainer Signed-off-by: Jon Derrick <jonathan.derr...@intel.com> Acked-by: Keith Busch <keith.bu...@intel.com> --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index f66488d..3ec39df 100644 --- a/MAINTAINERS +++ b

[PATCH v2 0/4] VMD fixups

2017-08-17 Thread Jon Derrick
Mostly just cleanup in this revision, eg, trying to limit scope of vmd code to x86 Previous: https://patchwork.kernel.org/patch/9886095/ https://patchwork.kernel.org/patch/9886097/ https://patchwork.kernel.org/patch/9886101/ Jon Derrick (4): MAINTAINERS: Add Jonathan Derrick as VMD maintainer

[PATCH v2 3/4] x86/PCI: Use is_vmd rather than relying on the domain number

2017-08-17 Thread Jon Derrick
Signed-off-by: Jon Derrick <jonathan.derr...@intel.com> --- arch/x86/pci/fixup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c index ca4b02e5..1ed2fbf 100644 --- a/arch/x86/pci/fixup.c +++ b/arch/x86/pci/fixup.c @@ -628,7

[PATCH v2 4/4] iommu: Prevent VMD child devices from being remapping targets

2017-08-17 Thread Jon Derrick
an IOMMU, which prevents it from exposing an iommu_group sysfs directories and allowing subsequent binding by userspace-access drivers such as VFIO. Signed-off-by: Jon Derrick <jonathan.derr...@intel.com> --- drivers/iommu/intel-iommu.c | 5 + 1 file changed, 5 insertions(+) diff --git a/d

[PATCH v2 2/4] pci/x86: Move VMD quirks to x86 fixups

2017-08-17 Thread Jon Derrick
VMD currently only exists for Intel x86 products Signed-off-by: Jon Derrick <jonathan.derr...@intel.com> --- arch/x86/pci/fixup.c | 18 ++ drivers/pci/quirks.c | 17 - 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/arch/x86/pci/fixup.c b/ar

[PATCH] ext4: Check superblock mapped prior to committing

2018-06-29 Thread Jon Derrick
to syncing. [1] https://www.spinics.net/lists/linux-ext4/msg56527.html Signed-off-by: Jon Derrick --- fs/ext4/super.c | 8 1 file changed, 8 insertions(+) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 0c4c220..ee33233 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -4736,6

[PATCH] PCI: Equalize hotplug memory for non/occupied slots

2018-07-25 Thread Jon Derrick
nd bridge: d620-d63f [size=2M] 02:04.0 PCI bridge: <-- Unoccupied Memory behind bridge: d640-d65f [size=2M] Signed-off-by: Jon Derrick --- Original RFC here: https://patchwork.ozlabs.org/patch/945374/ I split this bit out from the RFC while awaiting the pci string handling

[PATCH v2] PCI hotplug Eq v2

2018-08-30 Thread Jon Derrick
the topology. v1->v2: Comments Jon Derrick (1): PCI: Equalize hotplug memory for non/occupied slots drivers/pci/setup-bus.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) -- 1.8.3.1

[PATCH v2] PCI: Equalize hotplug memory for non/occupied slots

2018-08-30 Thread Jon Derrick
IO resources for hotplug buses in order to prove this calculation. Signed-off-by: Jon Derrick --- drivers/pci/setup-bus.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 79b1824..70d0aba 100644 --- a

[PATCH] PCI/AER: Fix an AER enabling/disabling race

2018-09-01 Thread Jon Derrick
] pcieport 1:02:05.0: pci_disable_pcie_error_reporting [ 344.411601] pcieport 1:02:06.0: pci_disable_pcie_error_reporting [ 344.505332] pcieport 1:02:07.0: pci_disable_pcie_error_reporting [ 344.621824] nvme 1:06:00.0: pci_enable_pcie_error_reporting Signed-off-by: Jon Derrick

[PATCH] PCI/portdrv: Enable error reporting on managed ports

2018-09-04 Thread Jon Derrick
: pci_disable_pcie_error_reporting [ 344.411601] pcieport 1:02:06.0: pci_disable_pcie_error_reporting [ 344.505332] pcieport 1:02:07.0: pci_disable_pcie_error_reporting [ 344.621824] nvme 1:06:00.0: pci_enable_pcie_error_reporting Signed-off-by: Jon Derrick --- drivers/pci/pcie

[PATCH v3] PCI: Equalize hotplug memory and io for non/occupied slots

2018-09-25 Thread Jon Derrick
bridge: <-- Occupied Memory behind bridge: d620-d63f [size=2M] 02:04.0 PCI bridge: <-- Unoccupied Memory behind bridge: d640-d65f [size=2M] Signed-off-by: Jon Derrick --- v2->v3: Made the IO and mem size calculations nearly equivalent drivers/pci/s

[PATCH v2 2/4] pci/x86: Move VMD quirks to x86 fixups

2017-08-17 Thread Jon Derrick
VMD currently only exists for Intel x86 products Signed-off-by: Jon Derrick --- arch/x86/pci/fixup.c | 18 ++ drivers/pci/quirks.c | 17 - 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c index 11e4074

[PATCH v2 4/4] iommu: Prevent VMD child devices from being remapping targets

2017-08-17 Thread Jon Derrick
an IOMMU, which prevents it from exposing an iommu_group sysfs directories and allowing subsequent binding by userspace-access drivers such as VFIO. Signed-off-by: Jon Derrick --- drivers/iommu/intel-iommu.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/iommu/intel-iommu.c b

[PATCH v2 0/4] VMD fixups

2017-08-17 Thread Jon Derrick
Mostly just cleanup in this revision, eg, trying to limit scope of vmd code to x86 Previous: https://patchwork.kernel.org/patch/9886095/ https://patchwork.kernel.org/patch/9886097/ https://patchwork.kernel.org/patch/9886101/ Jon Derrick (4): MAINTAINERS: Add Jonathan Derrick as VMD maintainer

[PATCH v2 3/4] x86/PCI: Use is_vmd rather than relying on the domain number

2017-08-17 Thread Jon Derrick
Signed-off-by: Jon Derrick --- arch/x86/pci/fixup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c index ca4b02e5..1ed2fbf 100644 --- a/arch/x86/pci/fixup.c +++ b/arch/x86/pci/fixup.c @@ -628,7 +628,7 @@ DECLARE_PCI_FIXUP_HEADER

[PATCH v2 1/4] MAINTAINERS: Add Jonathan Derrick as VMD maintainer

2017-08-17 Thread Jon Derrick
Add myself as VMD maintainer Signed-off-by: Jon Derrick Acked-by: Keith Busch --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index f66488d..3ec39df 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -10090,6 +10090,7 @@ F: drivers/pci/dwc/*imx6

Re: [RFC 1/3] PCI: pci-driver: Introduce pci device delete list

2017-09-28 Thread Jon Derrick
Hi Greg, On 09/28/2017 03:09 AM, Greg Kroah-Hartman wrote: > On Wed, Sep 27, 2017 at 04:40:20PM -0400, Jon Derrick wrote: >> This patch introduces a new kernel command line parameter to mask pci >> device ids from pci driver id tables. This prevents masked devices from >>

Re: [RFC 2/3] module: Ignore delete_id parameter

2017-09-28 Thread Jon Derrick
On 09/28/2017 03:02 AM, Greg Kroah-Hartman wrote: > On Wed, Sep 27, 2017 at 04:40:21PM -0400, Jon Derrick wrote: >> The PCI driver delete_id parameter is handled in each individual driver >> registration callback. >> >> Signed-off-by: Jon Derrick >> --- >>

Re: [RFC 2/3] module: Ignore delete_id parameter

2017-09-28 Thread Jon Derrick
On 09/28/2017 12:03 AM, Dan Williams wrote: > On Wed, Sep 27, 2017 at 1:40 PM, Jon Derrick > wrote: >> The PCI driver delete_id parameter is handled in each individual driver >> registration callback. >> >> Signed-off-by: Jon Derrick >> --- >> kernel/

Re: [PATCH 2/3] pci: Generalize is_vmd behavior

2017-08-11 Thread Jon Derrick
On 08/11/2017 11:03 AM, Bjorn Helgaas wrote: > On Mon, Aug 07, 2017 at 01:57:12PM -0600, Jon Derrick wrote: >> Generalize is_vmd behavior to remove dependency on domain number >> checking in pci quirks. >> >> Signed-off-by: Jon Derrick >> --- >> arch/x86/

Re: [PATCH 3/3] iommu: prevent VMD child devices from being remapping targets

2017-08-11 Thread Jon Derrick
Hi Robin, thanks for the reply. On 08/11/2017 12:25 PM, Robin Murphy wrote: > On 07/08/17 20:57, Jon Derrick wrote: >> VMD child devices must use the VMD endpoint's ID as the DMA source. >> Because of this, there needs to be a way to link the parent VMD >> endpoint's DMAR do

[PATCH 1/3] MAINTAINERS: Add Jonathan Derrick as VMD maintainer

2017-08-07 Thread Jon Derrick
Add myself as VMD maintainer Signed-off-by: Jon Derrick --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index f66488d..3ec39df 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -10090,6 +10090,7 @@ F: drivers/pci/dwc/*imx6* PCI DRIVER FOR INTEL

[PATCH 2/3] pci: Generalize is_vmd behavior

2017-08-07 Thread Jon Derrick
Generalize is_vmd behavior to remove dependency on domain number checking in pci quirks. Signed-off-by: Jon Derrick --- arch/x86/include/asm/pci.h | 8 +++- arch/x86/pci/common.c | 2 +- drivers/pci/quirks.c | 2 +- include/linux/pci.h| 4 4 files changed, 9

[PATCH 3/3] iommu: prevent VMD child devices from being remapping targets

2017-08-07 Thread Jon Derrick
binding by userspace-access drivers such as VFIO. Signed-off-by: Jon Derrick --- drivers/iommu/intel-iommu.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 687f18f..651a6cd 100644 --- a/drivers/iommu/intel-iommu.c +++ b

[PATCH] genirq/affinity: report extra vectors on uneven nodes

2019-08-07 Thread Jon Derrick
lts in the caller's WARN being triggered: irq_build_affinity_masks() ... if (nr_present < numvecs) WARN_ON(nr_present + nr_others < numvecs); Signed-off-by: Jon Derrick --- kernel/irq/affinity.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git

[PATCH 2/2] PCI: vmd: Fix shadow offsets to reflect spec changes

2019-09-16 Thread Jon Derrick
The shadow offset scratchpad was moved to 0x2000-0x2010. Update the location to get the correct shadow offset. Cc: sta...@vger.kernel.org # v5.2+ Fixes: 6788958e ("PCI: vmd: Assign membar addresses from shadow registers") Signed-off-by: Jon Derrick --- drivers/pci/controller

[PATCH 0/2] VMD fixes for v5.4

2019-09-16 Thread Jon Derrick
Hi Lorenzo, Bjorn, Keith, Please consider the following patches for 5.4 inclusion. These will apply to 5.2 stable. 4.19 has a few feature deps so I will instead follow-up with a backport. Jon Derrick (2): PCI: vmd: Fix config addressing when using bus offsets PCI: vmd: Fix shadow offsets

[PATCH 1/2] PCI: vmd: Fix config addressing when using bus offsets

2019-09-16 Thread Jon Derrick
: vmd: Add offset to bus numbers if necessary") Signed-off-by: Jon Derrick --- drivers/pci/controller/vmd.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c index 4575e0c6dc4b..2e4da3f51d6b 100644 ---

[PATCH] PCI: vmd: Expose oob management window to users

2019-09-16 Thread Jon Derrick
Some VMD devices provide a management window within MEMBAR2 that is used to communicate out-of-band with child devices. This patch creates a binary file for interacting with the interface. OOB Reads/Writes are bounds-checked by sysfs_fs_bin_{read,write} Signed-off-by: Jon Derrick --- Depends

[RFC 3/3] Documentation: Add pci device delete_id interface

2017-09-27 Thread Jon Derrick
Document the .delete_id= cmdline interface for masking built-in and module device id tables. Signed-off-by: Jon Derrick --- Documentation/admin-guide/kernel-parameters.txt | 13 + 1 file changed, 13 insertions(+) diff --git a/Documentation/admin-guide/kernel-parameters.txt b

[RFC 2/3] module: Ignore delete_id parameter

2017-09-27 Thread Jon Derrick
The PCI driver delete_id parameter is handled in each individual driver registration callback. Signed-off-by: Jon Derrick --- kernel/module.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/kernel/module.c b/kernel/module.c index de66ec8..2b2dccf 100644 --- a/kernel/module.c +++ b

[RFC 0/3] Introduce PCI device blacklisting

2017-09-27 Thread Jon Derrick
This set introduces a method to keep devices from matching driver id tables. Please see 0001 for more details of the motivation and implementation. This set currently applies to Bjorn's next (v4.14-rc1) branch. Jon Derrick (3): PCI: pci-driver: Introduce pci device delete list module

[RFC 1/3] PCI: pci-driver: Introduce pci device delete list

2017-09-27 Thread Jon Derrick
:5678 .delete_id=: .delete_id=::::010802 .delete_id=1234:5678,abcd:ef01,2345: Signed-off-by: Jon Derrick --- drivers/pci/pci-driver.c | 253 ++- include/linux/pci.h

[PATCH v3 0/2] PCI/ERR: Allow Native AER/DPC using _OSC

2020-04-30 Thread Jon Derrick
le Firmware First. [1] https://members.pcisig.com/wg/PCI-SIG/document/12888 Jon Derrick (2): PCI/AER: Use _OSC to determine Firmware First before HEST PCI/DPC: Use _OSC to determine DPC support drivers/pci/pcie/aer.c | 3 +++ drivers/pci/pcie/dpc.c | 3 --- driver

[PATCH v3 2/2] PCI/DPC: Use _OSC to determine DPC support

2020-04-30 Thread Jon Derrick
e behavior that assumes if OSPM has negotiated AER by _OSC, OSPM will also want DPC control. [1] https://members.pcisig.com/wg/PCI-SIG/document/12888 Signed-off-by: Jon Derrick --- drivers/pci/pcie/dpc.c | 3 --- drivers/pci/pcie/portdrv_core.c | 3 ++- 2 files changed, 2 insertions(+), 4 deletion

[PATCH v3 1/2] PCI/AER: Use _OSC to determine Firmware First before HEST

2020-04-30 Thread Jon Derrick
ed for AER services. This patch ensures the PCI layers first uses the _OSC negotiated state by checking the Host Bridge's Native AER flag prior to HEST parsing. Signed-off-by: Jon Derrick --- drivers/pci/pcie/aer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pci/pcie/aer.c b/d

[PATCH] irqdomain/treewide: Free firmware node after domain removal

2020-07-21 Thread Jon Derrick
es the handle and adds the freeing of firmware node after domain removal where appropriate. Fixes: e3beca48a45b ("irqdomain/treewide: Keep firmware node unconditionally allocated") Reviewed-by: Andy Shevchenko Signed-off-by: Jon Derrick Cc: sta...@vger.kernel.org --- arch/mips/pci/pc

[PATCH 1/6] PCI: vmd: Create physical offset helper

2020-07-28 Thread Jon Derrick
Moves the guest-passthrough physical offset discovery code to a new helper. No functional changes. Reviewed-by: Andy Shevchenko Signed-off-by: Jon Derrick --- drivers/pci/controller/vmd.c | 105 +-- 1 file changed, 62 insertions(+), 43 deletions(-) diff --git

[PATCH 5/6] x86/apic/msi: Use Real PCI DMA device when configuring IRTE

2020-07-28 Thread Jon Derrick
VMD retransmits child device MSI/X with the VMD endpoint's requester-id. In order to support direct interrupt remapping of VMD child devices, ensure that the IRTE is programmed with the VMD endpoint's requester-id using pci_real_dma_dev(). Reviewed-by: Andy Shevchenko Signed-off-by: Jon Derrick

[PATCH 0/6] VMD MSI Remapping Bypass

2020-07-28 Thread Jon Derrick
domain/treewide: Free firmware node after domain removal") in tip/urgent Jon Derrick (6): PCI: vmd: Create physical offset helper PCI: vmd: Create bus offset configuration helper PCI: vmd: Create IRQ Domain configuration helper PCI: vmd: Create IRQ allocation helper x86/apic/msi: Use

[PATCH 6/6] PCI: vmd: Disable MSI/X remapping when possible

2020-07-28 Thread Jon Derrick
for Icelake Server and client VMD products. Reviewed-by: Andy Shevchenko Signed-off-by: Jon Derrick --- drivers/pci/controller/vmd.c | 58 +++- 1 file changed, 50 insertions(+), 8 deletions(-) diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c

[PATCH 2/6] PCI: vmd: Create bus offset configuration helper

2020-07-28 Thread Jon Derrick
Moves the bus offset configuration discovery code to a new helper. Modifies the bus offset 2-bit decode switch to have a 0 case and a default error case, just in case the field is expanded in future hardware. Reviewed-by: Andy Shevchenko Signed-off-by: Jon Derrick --- drivers/pci/controller

[PATCH 4/6] PCI: vmd: Create IRQ allocation helper

2020-07-28 Thread Jon Derrick
Moves the IRQ allocation and SRCU initialization code to a new helper. No functional changes. Reviewed-by: Andy Shevchenko Signed-off-by: Jon Derrick --- drivers/pci/controller/vmd.c | 94 1 file changed, 53 insertions(+), 41 deletions(-) diff --git

[PATCH 3/6] PCI: vmd: Create IRQ Domain configuration helper

2020-07-28 Thread Jon Derrick
Moves the IRQ and MSI Domain configuration code to new helpers. No functional changes. Reviewed-by: Andy Shevchenko Signed-off-by: Jon Derrick --- drivers/pci/controller/vmd.c | 52 1 file changed, 35 insertions(+), 17 deletions(-) diff --git a/drivers/pci

[PATCH] ext4: Check superblock mapped prior to committing

2018-06-29 Thread Jon Derrick
to syncing. [1] https://www.spinics.net/lists/linux-ext4/msg56527.html Signed-off-by: Jon Derrick --- fs/ext4/super.c | 8 1 file changed, 8 insertions(+) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 0c4c220..ee33233 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -4736,6

[PATCH v2] PCI: Equalize hotplug memory for non/occupied slots

2018-08-30 Thread Jon Derrick
IO resources for hotplug buses in order to prove this calculation. Signed-off-by: Jon Derrick --- drivers/pci/setup-bus.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 79b1824..70d0aba 100644 --- a

[PATCH v2] PCI hotplug Eq v2

2018-08-30 Thread Jon Derrick
the topology. v1->v2: Comments Jon Derrick (1): PCI: Equalize hotplug memory for non/occupied slots drivers/pci/setup-bus.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) -- 1.8.3.1

[PATCH] PCI/AER: Fix an AER enabling/disabling race

2018-09-01 Thread Jon Derrick
] pcieport 1:02:05.0: pci_disable_pcie_error_reporting [ 344.411601] pcieport 1:02:06.0: pci_disable_pcie_error_reporting [ 344.505332] pcieport 1:02:07.0: pci_disable_pcie_error_reporting [ 344.621824] nvme 1:06:00.0: pci_enable_pcie_error_reporting Signed-off-by: Jon Derrick

[PATCH] nvme-pci: Prevent mmio reads if pci channel offline

2019-02-21 Thread Jon Derrick
to reduce the likelihood of encountering these issues and not fully close the gap. mmio writes are posted and in the fast path and have been left as-is. [1] https://lkml.org/lkml/2018/7/30/858 [2] https://lkml.org/lkml/2018/9/18/1546 Signed-off-by: Jon Derrick --- drivers/nvme/host/pci.c | 75

[PATCH] PCI: Equalize hotplug memory for non/occupied slots

2018-07-25 Thread Jon Derrick
nd bridge: d620-d63f [size=2M] 02:04.0 PCI bridge: <-- Unoccupied Memory behind bridge: d640-d65f [size=2M] Signed-off-by: Jon Derrick --- Original RFC here: https://patchwork.ozlabs.org/patch/945374/ I split this bit out from the RFC while awaiting the pci string handling

[PATCH] PCI/portdrv: Enable error reporting on managed ports

2018-09-04 Thread Jon Derrick
: pci_disable_pcie_error_reporting [ 344.411601] pcieport 1:02:06.0: pci_disable_pcie_error_reporting [ 344.505332] pcieport 1:02:07.0: pci_disable_pcie_error_reporting [ 344.621824] nvme 1:06:00.0: pci_enable_pcie_error_reporting Signed-off-by: Jon Derrick --- drivers/pci/pcie

[PATCH v3] PCI: Equalize hotplug memory and io for non/occupied slots

2018-09-25 Thread Jon Derrick
bridge: <-- Occupied Memory behind bridge: d620-d63f [size=2M] 02:04.0 PCI bridge: <-- Unoccupied Memory behind bridge: d640-d65f [size=2M] Signed-off-by: Jon Derrick --- v2->v3: Made the IO and mem size calculations nearly equivalent drivers/pci/s

Re: [PATCH] NVMe: Fixed race between nvme_thread & probe path.

2015-06-26 Thread Jon Derrick
> >> + smp_wmb(); > > > > This has been applied already as an explicit mb() > > Since these structure is only accessible by software, won't smp_wmb() > sufficient enough? > Seems reasonable to me -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a

Re: [PATCH] NVMe: Fixed race between nvme_thread & probe path.

2015-06-18 Thread Jon Derrick
On Thu, Jun 18, 2015 at 04:13:50PM +0530, Parav Pandit wrote: > Kernel thread nvme_thread and driver load process can be executing > in parallel on different CPU. This leads to race condition whenever > nvme_alloc_queue() instructions are executed out of order that can > reflects incorrect value

Re: [PATCH 1/2] nvme : Use correct scnprintf in cmb show

2016-12-19 Thread Jon Derrick
Looks good. Thanks Stephen. Reviewed-by Jon Derrick: On Fri, Dec 16, 2016 at 11:54:50AM -0700, Stephen Bates wrote: > Make sure we are using the correct scnprintf in the sysfs show > function for the CMB. > > Signed-off-by: Stephen Bates > --- > drivers/nvme/host/pci.c

Re: [PATCH 2/2] nvme: improve cmb sysfs reporting

2016-12-19 Thread Jon Derrick
Minor nit below On Fri, Dec 16, 2016 at 11:54:51AM -0700, Stephen Bates wrote: > Add more information to the NVMe CMB sysfs entry. This includes > information about the CMB size, location and capabilities. > > Signed-off-by: Stephen Bates > --- > drivers/nvme/host/pci.c | 31

  1   2   >