Re: [PATCH v1 net] net/mlx4: Avoid wrong virtual mappings

2016-05-01 Thread Sinan Kaya
On 5/1/2016 4:07 PM, David Miller wrote: > From: Sinan Kaya <ok...@codeaurora.org> > Date: Sun, 1 May 2016 11:43:54 -0400 > >> Can we get this queued for 4.7? Mellanox with arm64 has been broken over 1.5 >> years. > > Can you not quote an entire huge

Re: [PATCH v1 net] net/mlx4: Avoid wrong virtual mappings

2016-05-01 Thread Sinan Kaya
hai Hadas <yish...@mellanox.com> > Reported-by: David Daney <david.da...@cavium.com> > Tested-by: Sinan Kaya <ok...@codeaurora.org> > --- > Changes from v0: > Fix indentation error raised by LeonR > > drivers/infiniband/hw/mlx4/qp.c | 26

Re: [PATCH V2] net: ethernet: mellanox: correct page conversion

2016-04-18 Thread Sinan Kaya
On 4/18/2016 11:40 AM, Christoph Hellwig wrote: > On Mon, Apr 18, 2016 at 11:21:12AM -0400, Sinan Kaya wrote: >> I was looking at the code. I don't see how removing virt_to_page + vmap >> would solve the issue. >> >> The code is trying to access the buffer space wit

Re: [PATCH V2] net: ethernet: mellanox: correct page conversion

2016-04-18 Thread Sinan Kaya
On 4/18/2016 11:59 AM, David Miller wrote: > From: ok...@codeaurora.org > Date: Mon, 18 Apr 2016 01:06:27 -0400 > >> On 2016-04-18 00:00, David Miller wrote: >>> From: Sinan Kaya <ok...@codeaurora.org> >>> Date: Sat, 16 Apr 2016 18:23:32 -0400 >>>

Re: [PATCH V2] net: ethernet: mellanox: correct page conversion

2016-04-19 Thread Sinan Kaya
it, as it might for example come from vmap allocator. > > Remove the code that calls virt_to_page and vmap on dma coherent > allocations from the mlx4 drivers, and replace them with a single > high-order dma_alloc_coherent call. > > Signed-off-by: Christoph Hellwig <h...@lst.d

[PATCH V2] net: ethernet: mellanox: correct page conversion

2016-04-16 Thread Sinan Kaya
-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/net/ethernet/mellanox/mlx4/alloc.c | 37 ++ 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx4/alloc.c b/drivers/net/ethernet/mellanox/mlx4/alloc.c index 0c51c69..22a7ae7

Re: [PATCH V2] net: ethernet: mellanox: correct page conversion

2016-04-18 Thread Sinan Kaya
at solve the arm issue? I will test. As far as I know, there is one more place these DMA addresses are called with vmap. This is in mlx4_en_map_buffer. I was trying to rearrange the allocation so that vmap actually works. What do you think about mlx4_en_map_buffer? -- Sinan Kaya Qualcomm Technolog

Re: [PATCH V2] net: ethernet: mellanox: correct page conversion

2016-04-18 Thread Sinan Kaya
On 4/18/2016 9:10 AM, Christoph Hellwig wrote: > On Mon, Apr 18, 2016 at 09:06:18AM -0400, ok...@codeaurora.org wrote: >> On 2016-04-18 08:12, Christoph Hellwig wrote: >>> On Sat, Apr 16, 2016 at 06:23:32PM -0400, Sinan Kaya wrote: >>>> Current code is assu

Re: [PATCH V2] net: ethernet: mellanox: correct page conversion

2016-04-18 Thread Sinan Kaya
buf.direct.buf; Line 114: (unsigned long long) ring->wqres.buf.direct.map); drivers/net/ethernet/mellanox/mlx4/en_rx.c (1 hit) Line 404: ring->buf = ring->wqres.buf.direct.buf; drivers/net/ethernet/mellanox/mlx4/en_cq.c (1 hit) Line 85: cq->buf = (struct mlx4_cqe *)cq->wqres.

Re: [PATCH V2] net: ethernet: mellanox: correct page conversion

2016-04-18 Thread Sinan Kaya
On 4/18/2016 11:15 AM, Timur Tabi wrote: > Sinan Kaya wrote: >> >> VMAP allows you to make several pages look contiguous to the CPU. >> It can only be used against logical addresses returned from kmalloc >> or alloc_page. >> >> You cannot take seve

Re: [PATCH V2] net: ethernet: mellanox: correct page conversion

2016-04-20 Thread Sinan Kaya
Apologies, Replied to an older post by mistake. I was trying to reply to Eran. >Hi Sinan, > >We are working in Mellanox for a solution which >removes the vmap call and allocate contiguous memory (using >dma_alloc_coherent). > >Thanks, >Eran > > >On 4/20/2016 9:3

Re: [PATCH V2] net: ethernet: mellanox: correct page conversion

2016-04-20 Thread Sinan Kaya
ge_shift = get_order(size) + PAGE_SHIFT; Of course, this is assuming that you are not ready to submit your patch yet. If you are, feel free to post. -- Sinan Kaya Qualcomm Technologies, Inc. on behalf of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of

Re: [PATCH V2] net: ethernet: mellanox: correct page conversion

2016-04-19 Thread Sinan Kaya
On 4/18/2016 11:40 AM, Christoph Hellwig wrote: > On Mon, Apr 18, 2016 at 11:21:12AM -0400, Sinan Kaya wrote: >> I was looking at the code. I don't see how removing virt_to_page + vmap >> would solve the issue. >> >> The code is trying to access the buffer space wit

Re: [PATCH V2] net: ethernet: mellanox: correct page conversion

2016-04-20 Thread Sinan Kaya
er >> patch. My proposal is to use this one. >> > > We will post our suggestion here in the following days. > Thanks, please have me in CC. I'm not subscribed to this group normally. I can post a tested-by after testing. -- Sinan Kaya Qualcomm Technologies, Inc. on behalf

Re: [PATCH v7 2/3] PCI: Enable PCIe Relaxed Ordering if supported

2017-07-13 Thread Sinan Kaya
axed Ordering\n"); > + } > +} I couldn't find anywhere where you actually enable the relaxed ordering like the subject suggests. -- 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.

Re: [PATCH v7 2/3] PCI: Enable PCIe Relaxed Ordering if supported

2017-07-14 Thread Sinan Kaya
ear the Relaxed > Ordering bit > to tell the PCIe EP don't send any TLPs with Relaxed Ordering Attributes to > the Root > Complex. Maybe, you should change the patch commit as "Disable PCIe Relaxed Ordering if not supported"... -- Sinan Kaya Qualcomm Datacenter Technolog

Re: linux-next: manual merge of the pci tree with the net tree

2017-09-05 Thread Sinan Kaya
On 9/4/2017 12:54 AM, Stephen Rothwell wrote: > Just a reminder that this conflict still exists. I suppose this was a message for Bjorn, right? I looked at the change and it looked good to me. -- Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies,

[PATCH V3 15/29] pch_gbe: deprecate pci_get_bus_and_slot()

2017-11-27 Thread Sinan Kaya
information from pdev while calling into pci_get_domain_bus_and_slot() function. Signed-off-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/oki-semi/p

[PATCH V3 14/29] bnx2x: deprecate pci_get_bus_and_slot()

2017-11-27 Thread Sinan Kaya
bnx2x_vf_domain() function to extract the domain information and save it to VF specific data structure. Use the saved domain value while calling pci_get_domain_bus_and_slot(). Signed-off-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 10 +- drive

[PATCH V2 14/29] bnx2x: deprecate pci_get_bus_and_slot()

2017-11-22 Thread Sinan Kaya
bnx2x_vf_domain() function to extract the domain information and save it to VF specific data structure. Use the saved domain value while calling pci_get_domain_bus_and_slot(). Signed-off-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 10 +- drive

[PATCH V2 15/29] pch_gbe: deprecate pci_get_bus_and_slot()

2017-11-22 Thread Sinan Kaya
information from pdev while calling into pci_get_domain_bus_and_slot() function. Signed-off-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/oki-semi/p

Re: [PATCH V4 14/26] pch_gbe: deprecate pci_get_bus_and_slot()

2017-12-19 Thread Sinan Kaya
On 12/19/2017 5:45 AM, Andy Shevchenko wrote: > On Tue, 2017-12-19 at 00:37 -0500, Sinan Kaya wrote: >> pci_get_bus_and_slot() is restrictive such that it assumes domain=0 as >> where a PCI device is present. This restricts the device drivers to be >> reused for other domain n

[PATCH V4 14/26] pch_gbe: deprecate pci_get_bus_and_slot()

2017-12-18 Thread Sinan Kaya
information from pdev while calling into pci_get_domain_bus_and_slot() function. Signed-off-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/oki-semi/p

[PATCH V4 13/26] bnx2x: deprecate pci_get_bus_and_slot()

2017-12-18 Thread Sinan Kaya
bnx2x_vf_domain() function to extract the domain information and save it to VF specific data structure. Use the saved domain value while calling pci_get_domain_bus_and_slot(). Signed-off-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 10 +- drive

[PATCH 16/30] pch_gbe: deprecate pci_get_bus_and_slot()

2017-11-21 Thread Sinan Kaya
the actual domain number from the device. Signed-off-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c b/drivers/net/et

[PATCH 15/30] bnx2x: deprecate pci_get_bus_and_slot()

2017-11-21 Thread Sinan Kaya
the actual domain number from the device. Signed-off-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 10 +- drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.h | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/drive

Re: [PATCH v8 0/7] netdev: intel: Eliminate duplicate barriers on weakly-ordered archs

2018-07-30 Thread Sinan Kaya
+netdev, On 7/30/2018 9:45 AM, Alexander Duyck wrote: I haven't had a chance to work on this much myself. My understanding is that igb has had the barriers updated, but I don't think any of the other drivers have been worked over yet. Unfortunately, I have recently changed jobs and I no

Re: [PATCH v1 0/4] PCI: Remove unnecessary includes of

2018-07-25 Thread Sinan Kaya
unnecessary include of PCI: Remove unnecessary include of Thanks. Reviewed-by: Sinan Kaya Is it possible to kill that file altogether? I haven't looked who is using outside of pci directory.

[PATCH 1/7] i40e/i40evf: Eliminate duplicate barriers on weakly-ordered archs

2018-03-13 Thread Sinan Kaya
-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 2 +- drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/inte

[PATCH 2/7] ixgbe: eliminate duplicate barriers on weakly-ordered archs

2018-03-13 Thread Sinan Kaya
() to writel_relaxed(). Signed-off-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 0da5aa2..3

[PATCH 5/7] igb: eliminate duplicate barriers on weakly-ordered archs

2018-03-13 Thread Sinan Kaya
-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/net/ethernet/intel/igb/igb_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index b88fae7..ba8ccb5 100644 --- a/drivers/net/et

[PATCH 1/7] i40e/i40evf: Eliminate duplicate barriers on weakly-ordered archs

2018-03-13 Thread Sinan Kaya
-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 2 +- drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/inte

[PATCH 6/7] e1000: eliminate duplicate barriers on weakly-ordered archs

2018-03-13 Thread Sinan Kaya
-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/net/ethernet/intel/e1000/e1000_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c index 3dd4aeb..e0e583a 100644 --- a/d

[PATCH 7/7] ixgbevf: eliminate duplicate barriers on weakly-ordered archs

2018-03-13 Thread Sinan Kaya
() to writel_relaxed(). Signed-off-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/net/ethernet/intel/ixgbevf/ixgbevf.h | 5 - drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 7 +++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbev

[PATCH 4/7] igbvf: eliminate duplicate barriers on weakly-ordered archs

2018-03-13 Thread Sinan Kaya
-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/net/ethernet/intel/igbvf/netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/igbvf/netdev.c b/drivers/net/ethernet/intel/igbvf/netdev.c index 4214c15..fe3441b 100644 --- a/drivers/net/et

[PATCH 3/7] RDMA/qedr: eliminate duplicate barriers on weakly-ordered archs

2018-03-13 Thread Sinan Kaya
() to writel_relaxed(). Signed-off-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/infiniband/hw/qedr/verbs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/qedr/verbs.c b/drivers/infiniband/hw/qedr/verbs.c index 53f00db..ccd55f4 100644 --- a/drivers/infinib

Re: [PATCH 7/7] ixgbevf: eliminate duplicate barriers on weakly-ordered archs

2018-03-15 Thread Sinan Kaya
the order of wmb() and writel() is not very obvious or hidden in multiple functions, somebody can introduce a very nasty bug in the future. We also have to think about code maintenance. -- Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcom

Re: [PATCH 7/7] ixgbevf: eliminate duplicate barriers on weakly-ordered archs

2018-03-15 Thread Sinan Kaya
On 3/15/2018 12:21 PM, Sinan Kaya wrote: > On 3/15/2018 10:32 AM, Alexander Duyck wrote: >> We tend to do something like: >> update tx_buffer_info >> update tx_desc >> wmb() >> point first tx_buffer_info next_to_watch value at last tx_desc >> up

Re: [PATCH 6/7] e1000: eliminate duplicate barriers on weakly-ordered archs

2018-03-15 Thread Sinan Kaya
assignment to be similar to the rest of the other code. if wmb() and writel() are not visible in the same function, let's not touch the code. -- Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Co

Re: [PATCH 6/7] e1000: eliminate duplicate barriers on weakly-ordered archs

2018-03-15 Thread Sinan Kaya
On 3/15/2018 8:25 PM, Alexander Duyck wrote: > On Thu, Mar 15, 2018 at 4:30 PM, Sinan Kaya <ok...@codeaurora.org> wrote: >> On 3/14/2018 9:41 PM, Alexander Duyck wrote: >>>> } >>>> >>> So you missed the writel in e1000_xmit_frame. You should p

[PATCH v2 5/6] ixgbevf: keep writel() closer to wmb()

2018-03-15 Thread Sinan Kaya
Remove ixgbevf_write_tail() in favor of moving writel() close to wmb(). Signed-off-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/net/ethernet/intel/ixgbevf/ixgbevf.h | 5 - drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 4 ++-- 2 files changed, 2 insertions(+), 7 del

[PATCH v2 6/6] ixgbevf: eliminate duplicate barriers on weakly-ordered archs

2018-03-15 Thread Sinan Kaya
() to writel_relaxed(). Signed-off-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c index b

[PATCH v2 3/6] igbvf: eliminate duplicate barriers on weakly-ordered archs

2018-03-15 Thread Sinan Kaya
-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/net/ethernet/intel/igbvf/netdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/igbvf/netdev.c b/drivers/net/ethernet/intel/igbvf/netdev.c index 4214c15..edb1c34 100644 --- a/drive

[PATCH v2 1/6] i40e/i40evf: Eliminate duplicate barriers on weakly-ordered archs

2018-03-15 Thread Sinan Kaya
-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 8 drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet

[PATCH v2 0/6] Eliminate duplicate barriers on weakly-ordered archs

2018-03-15 Thread Sinan Kaya
ordered archs dropped ixgbevf: eliminate duplicate barriers on weakly-ordered archs split into two and remove extra barrier. Sinan Kaya (6): i40e/i40evf: Eliminate duplicate barriers on weakly-ordered archs ixgbe: eliminate duplicate barriers on weakly-ordered archs igbvf: eliminate duplicate ba

[PATCH v2 4/6] igb: eliminate duplicate barriers on weakly-ordered archs

2018-03-15 Thread Sinan Kaya
-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/net/ethernet/intel/igb/igb_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index b88fae7..82aea92 100644 --- a/drive

[PATCH v2 2/6] ixgbe: eliminate duplicate barriers on weakly-ordered archs

2018-03-15 Thread Sinan Kaya
() to writel_relaxed(). Signed-off-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 0

Re: [PATCH v2 5/6] ixgbevf: keep writel() closer to wmb()

2018-03-15 Thread Sinan Kaya
On 3/15/2018 9:04 PM, Sinan Kaya wrote: > /* notify HW of packet */ > - ixgbevf_write_tail(tx_ring, i); > + writel(value, tx_ring->tail); > oops. copy paste mistake. I'll hold onto posting v3 until i hear more feedback. -- Sinan Kaya Qualcomm Datacenter Te

Re: [PATCH 7/7] ixgbevf: eliminate duplicate barriers on weakly-ordered archs

2018-03-14 Thread Sinan Kaya
Hi Alexander, On 3/14/2018 5:49 PM, Alexander Duyck wrote: > On Wed, Mar 14, 2018 at 5:13 AM, <ok...@codeaurora.org> wrote: >> On 2018-03-14 01:08, Timur Tabi wrote: >>> >>> On 3/13/18 10:20 PM, Sinan Kaya wrote: > Actually I would argue this whole patch

Re: [PATCH 7/7] ixgbevf: eliminate duplicate barriers on weakly-ordered archs

2018-03-14 Thread Sinan Kaya
On 3/14/2018 9:44 PM, Alexander Duyck wrote: > On Wed, Mar 14, 2018 at 3:57 PM, Sinan Kaya <ok...@codeaurora.org> wrote: >> Hi Alexander, >> >> On 3/14/2018 5:49 PM, Alexander Duyck wrote: >>> On Wed, Mar 14, 2018 at 5:13 AM, <ok...@codeaurora.org> w

Re: [PATCH v7 0/7] netdev: intel: Eliminate duplicate barriers on weakly-ordered archs

2018-03-27 Thread Sinan Kaya
Jeff, On 3/23/2018 10:34 PM, ok...@codeaurora.org wrote: > On 2018-03-23 19:58, Jeff Kirsher wrote: >> On Fri, 2018-03-23 at 14:53 -0700, Alexander Duyck wrote: >>> On Fri, Mar 23, 2018 at 11:52 AM, Sinan Kaya <ok...@codeaurora.org> >>> wrote: >>>

Re: [PATCH v7 0/7] netdev: Eliminate duplicate barriers on weakly-ordered archs

2018-03-27 Thread Sinan Kaya
Dave, On 3/26/2018 12:48 PM, David Miller wrote: > From: Sinan Kaya <ok...@codeaurora.org> > Date: Sun, 25 Mar 2018 10:39:14 -0400 > >> Code includes wmb() followed by writel() in multiple places. writel() >> already has a barrier on some architectures like ar

Re: RFC on writel and writel_relaxed

2018-03-27 Thread Sinan Kaya
wmb() and throw in smp barriers there like you mentioned. I'll leave the changes in the Intel drivers alone. -- 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 Foundatio

Re: RFC on writel and writel_relaxed

2018-03-27 Thread Sinan Kaya
around the need for relaxed API on PPC and then why wmb() question came up. Sinan -- 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.

Re: [PATCH v7 0/7] netdev: Eliminate duplicate barriers on weakly-ordered archs

2018-03-27 Thread Sinan Kaya
On 3/27/2018 10:00 AM, David Miller wrote: > From: Sinan Kaya <ok...@codeaurora.org> > Date: Tue, 27 Mar 2018 08:40:41 -0400 > >> Are you able to drop the applied ones so that I can post V7 or is it >> too late? > > I cannot "drop" changes from

Re: RFC on writel and writel_relaxed

2018-03-27 Thread Sinan Kaya
ritel(). Based on the comment in (https://www.spinics.net/lists/linux-rdma/msg62666.html): Replacing wmb() + writel() with wmb() + writel_relaxed() will work on PPC, it will just not give you a benefit today. I say the patch set stays. This gives benefit on ARM, and has no effect on x86 and PowerPC. If you want to look at trying to optimize things further on PowerPC and such then go for it in terms of trying to implement the writel_relaxed(). Otherwise I say we call the ARM goodness a win and don't get ourselves too wrapped up in trying to fix this for all architectures." > > Cheers, > Ben. > > -- 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.

Re: [PATCH v7 0/7] netdev: intel: Eliminate duplicate barriers on weakly-ordered archs

2018-03-27 Thread Sinan Kaya
-memory case at least a a wmb()/rmb() has to be used. > Is this not correct? We are being told that if you use writel(), then you don't need a wmb() on all architectures. Jason is seeking behavior clarification for write combined buffers. > > Regards, > Lino > -- Sinan Kaya Q

Re: [PATCH v7 0/7] netdev: intel: Eliminate duplicate barriers on weakly-ordered archs

2018-03-27 Thread Sinan Kaya
will have to > NAK the patches. We will accept the wmb() with writel_releaxed() since > that solves things for ARM. > I added netdev and you to the RFC on writel and writel_relaxed list. Feel free to raise your concerns. -- Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliat

Re: [PATCH v7 0/7] netdev: intel: Eliminate duplicate barriers on weakly-ordered archs

2018-03-27 Thread Sinan Kaya
On 3/27/2018 12:54 PM, Jeff Kirsher wrote: > On Tue, 2018-03-27 at 08:42 -0400, Sinan Kaya wrote: >> On 3/23/2018 10:34 PM, ok...@codeaurora.org wrote: >>> On 2018-03-23 19:58, Jeff Kirsher wrote: >>>> On Fri, 2018-03-23 at 14:53 -0700, Alexander Duyck wrote: >>

Re: RFC on writel and writel_relaxed

2018-03-29 Thread Sinan Kaya
On 3/29/2018 12:29 PM, Arnd Bergmann wrote: > On Thu, Mar 29, 2018 at 3:56 PM, Sinan Kaya <ok...@codeaurora.org> wrote: >> On 3/28/2018 11:55 AM, David Miller wrote: >>> From: Benjamin Herrenschmidt <b...@kernel.crashing.org> >>> Date: Thu, 29 Mar 2018 02:1

Re: [PATCH v5 3/5] bnx2x: Eliminate duplicate barriers on weakly-ordered archs

2018-03-24 Thread Sinan Kaya
On 3/24/2018 10:30 AM, Chopra, Manish wrote: >> -Original Message- >> From: Sinan Kaya [mailto:ok...@codeaurora.org] >> Sent: Friday, March 23, 2018 10:44 PM >> To: David Miller <da...@davemloft.net> >> Cc: netdev@vger.kernel.org; ti...@codeaurora.org;

[PATCH v7 0/7] netdev: Eliminate duplicate barriers on weakly-ordered archs

2018-03-25 Thread Sinan Kaya
- remove extra mmiowb in bnx2x - correct spelling mistake in bnx2x: Replace doorbell barrier() with wmb() Sinan Kaya (7): net: qla3xxx: Eliminate duplicate barriers on weakly-ordered archs qlcnic: Eliminate duplicate barriers on weakly-ordered archs bnx2x: Replace doorbell barrier() with wmb(

[PATCH v7 7/7] net: ena: Eliminate duplicate barriers on weakly-ordered archs

2018-03-25 Thread Sinan Kaya
is following a barrier(). Since code already has an explicit barrier call, changing writel() to writel_relaxed() and adding mmiowb() for ordering protection. Signed-off-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/net/ethernet/amazon/ena/ena_com.c | 8 ++-- drivers/net/ethernet/

[PATCH v7 4/7] bnx2x: Eliminate duplicate barriers on weakly-ordered archs

2018-03-25 Thread Sinan Kaya
-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | 12 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 2 +- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h | 4 ++-- drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.

[PATCH v7 3/7] bnx2x: Replace doorbell barrier() with wmb()

2018-03-25 Thread Sinan Kaya
barrier() doesn't guarantee memory writes to be observed by the hardware on all architectures. barrier() only tells compiler not to move this code with respect to other read/writes. If memory write needs to be observed by the HW, wmb() is the right choice. Signed-off-by: Sinan Kaya <

[PATCH v7 6/7] bnxt_en: Eliminate duplicate barriers on weakly-ordered archs

2018-03-25 Thread Sinan Kaya
is following a wmb(). Since code already has an explicit barrier call, changing writel() to writel_relaxed(). Also add mmiowb() so that write code doesn't move outside of scope. Signed-off-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- drivers/net/et

[PATCH v7 1/7] net: qla3xxx: Eliminate duplicate barriers on weakly-ordered archs

2018-03-25 Thread Sinan Kaya
() for multi-arch support. Signed-off-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/net/ethernet/qlogic/qla3xxx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qla3xxx.c b/drivers/net/ethernet/qlogic/qla3xxx.c index 9e5264d..b48f761

[PATCH v7 2/7] qlcnic: Eliminate duplicate barriers on weakly-ordered archs

2018-03-25 Thread Sinan Kaya
-by: Sinan Kaya <ok...@codeaurora.org> Acked-by: Manish Chopra <manish.cho...@cavium.com> --- drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c b/drivers/net/eth

[PATCH v7 5/7] net: qlge: Eliminate duplicate barriers on weakly-ordered archs

2018-03-25 Thread Sinan Kaya
is following a wmb(). Signed-off-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/net/ethernet/qlogic/qlge/qlge.h | 16 drivers/net/ethernet/qlogic/qlge/qlge_main.c | 3 ++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/qlogic/qlge/qlg

Re: RFC on writel and writel_relaxed

2018-04-02 Thread Sinan Kaya
On 3/29/2018 9:40 PM, Benjamin Herrenschmidt wrote: > On Thu, 2018-03-29 at 09:56 -0400, Sinan Kaya wrote: >> On 3/28/2018 11:55 AM, David Miller wrote: >>> From: Benjamin Herrenschmidt <b...@kernel.crashing.org> >>> Date: Thu, 29 Mar 2018 02:13:16 +1100 >&

[PATCH v8 7/7] ixgbevf: eliminate duplicate barriers on weakly-ordered archs

2018-04-02 Thread Sinan Kaya
of writel(). There are places in the code where wmb() has been used as a double barrier for CPU and IO in place of smp_wmb() and wmb() as an optimization. For such places, keep the wmb() but replace the following writel() with writel_relaxed() to have a sequence as wmb() writel_relaxed() mmio_wb() Signed-off

[PATCH v8 3/7] igbvf: eliminate duplicate barriers on weakly-ordered archs

2018-04-02 Thread Sinan Kaya
of writel(). There are places in the code where wmb() has been used as a double barrier for CPU and IO in place of smp_wmb() and wmb() as an optimization. For such places, keep the wmb() but replace the following writel() with writel_relaxed() to have a sequence as wmb() writel_relaxed() mmio_wb() Signed-off

[PATCH v8 6/7] ixgbevf: keep writel() closer to wmb()

2018-04-02 Thread Sinan Kaya
Remove ixgbevf_write_tail() in favor of moving writel() close to wmb(). Signed-off-by: Sinan Kaya <ok...@codeaurora.org> Reviewed-by: Alexander Duyck <alexander.h.du...@intel.com> --- drivers/net/ethernet/intel/ixgbevf/ixgbevf.h | 5 - drivers/net/ethernet/intel/ixgbevf/ix

[PATCH v8 2/7] ixgbe: eliminate duplicate barriers on weakly-ordered archs

2018-04-02 Thread Sinan Kaya
of writel(). There are places in the code where wmb() has been used as a double barrier for CPU and IO in place of smp_wmb() and wmb() as an optimization. For such places, keep the wmb() but replace the following writel() with writel_relaxed() to have a sequence as wmb() writel_relaxed() mmio_wb() Signed-off

[PATCH v8 0/7] netdev: intel: Eliminate duplicate barriers on weakly-ordered archs

2018-04-02 Thread Sinan Kaya
://www.mail-archive.com/netdev@vger.kernel.org/msg225806.html * removed wmb() in front of writel() at several places. * remove old IA64 comments regarding ordering. Sinan Kaya (7): i40e/i40evf: Eliminate duplicate barriers on weakly-ordered archs ixgbe: eliminate duplicate barriers o

[PATCH v8 5/7] fm10k: Eliminate duplicate barriers on weakly-ordered archs

2018-04-02 Thread Sinan Kaya
of writel(). There are places in the code where wmb() has been used as a double barrier for CPU and IO in place of smp_wmb() and wmb() as an optimization. For such places, keep the wmb() but replace the following writel() with writel_relaxed() to have a sequence as wmb() writel_relaxed() mmio_wb() Signed-off

[PATCH v8 4/7] igb: eliminate duplicate barriers on weakly-ordered archs

2018-04-02 Thread Sinan Kaya
of writel(). There are places in the code where wmb() has been used as a double barrier for CPU and IO in place of smp_wmb() and wmb() as an optimization. For such places, keep the wmb() but replace the following writel() with writel_relaxed() to have a sequence as wmb() writel_relaxed() mmio_wb() Signed-off

[PATCH v8 1/7] i40e/i40evf: Eliminate duplicate barriers on weakly-ordered archs

2018-04-02 Thread Sinan Kaya
of writel(). There are places in the code where wmb() has been used as a double barrier for CPU and IO in place of smp_wmb() and wmb() as an optimization. For such places, keep the wmb() but replace the following writel() with writel_relaxed() to have a sequence as wmb() writel_relaxed() mmio_wb() Signed-off

Re: [PATCH v8 0/7] netdev: intel: Eliminate duplicate barriers on weakly-ordered archs

2018-04-02 Thread Sinan Kaya
Alex, On 4/2/2018 3:06 PM, Sinan Kaya wrote: > Code includes wmb() followed by writel() in multiple places. writel() > already has a barrier on some architectures like arm64. > > This ends up CPU observing two barriers back to back before executing the > register write. > &g

Re: [PATCH v8 0/7] netdev: intel: Eliminate duplicate barriers on weakly-ordered archs

2018-04-03 Thread Sinan Kaya
On 4/3/2018 1:47 PM, Alexander Duyck wrote: > On Mon, Apr 2, 2018 at 7:59 PM, Sinan Kaya <ok...@codeaurora.org> wrote: >> Alex, >> >> On 4/2/2018 3:06 PM, Sinan Kaya wrote: >>> Code includes wmb() followed by writel() in multiple places. writel() >>>

Re: [PATCH v7 3/7] bnx2x: Replace doorbell barrier() with wmb()

2018-03-29 Thread Sinan Kaya
he write barrier seems to serve dual purpose. Please help me getting this right on the next version. Sinan -- 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.

Re: RFC on writel and writel_relaxed

2018-03-29 Thread Sinan Kaya
t sparc question sent tilequestion sent unicore32 question sent x86 no issues xtensa question sent -- Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a memb

[PATCH v3 18/18] infiniband: cxgb4: Eliminate duplicate barriers on weakly-ordered archs

2018-03-16 Thread Sinan Kaya
-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/infiniband/hw/cxgb4/t4.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/infiniband/hw/cxgb4/t4.h b/drivers/infiniband/hw/cxgb4/t4.h index 8369c7c..7a48c9e 100644 --- a/drivers/infiniband/hw/cxgb4/t4.h

[PATCH v3 00/18] Eliminate duplicate barriers on weakly-ordered archs

2018-03-16 Thread Sinan Kaya
t needs to change and what can remain. We start with mostly used ones and hope to increase the coverage over time. It will take a while to cover all drivers. Feel free to apply patches individually. Changes since v2: - https://www.spinics.net/lists/arm-kernel/msg641383.html - compilation fix for ixgb

[PATCH v3 10/18] net: qla3xxx: Eliminate duplicate barriers on weakly-ordered archs

2018-03-16 Thread Sinan Kaya
-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/net/ethernet/qlogic/qla3xxx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qla3xxx.c b/drivers/net/ethernet/qlogic/qla3xxx.c index 9e5264d..0e71b74 100644 --- a/drivers/net/ethernet/

[PATCH v3 17/18] RDMA/i40iw: Eliminate duplicate barriers on weakly-ordered archs

2018-03-16 Thread Sinan Kaya
is following a wmb(). Since code already has an explicit barrier call, changing writel() to writel_relaxed(). Signed-off-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/infiniband/hw/i40iw/i40iw_ctrl.c | 6 -- drivers/infiniband/hw/i40iw/i40iw_osdep.h | 1 + drivers/infiniband/hw

[PATCH v3 15/18] RDMA/bnxt_re: Eliminate duplicate barriers on weakly-ordered archs

2018-03-16 Thread Sinan Kaya
-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/infiniband/hw/bnxt_re/qplib_rcfw.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c b/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c index 8329ec6..4a6b981 100644 --- a/d

[PATCH v3 16/18] IB/mlx4: Eliminate duplicate barriers on weakly-ordered archs

2018-03-16 Thread Sinan Kaya
-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/infiniband/hw/mlx4/qp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c index f045491..74b27b0 100644 --- a/drivers/infiniband/hw/mlx4/qp.c +++ b/d

[PATCH v3 13/18] net: cxgb4/cxgb4vf: Eliminate duplicate barriers on weakly-ordered archs

2018-03-16 Thread Sinan Kaya
is following a wmb(). Signed-off-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 6 ++ drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 13 +++-- drivers/net/ethernet/chelsio/cxgb4/sge.c| 8 drivers/net/ethernet/chelsio

[PATCH v3 06/18] ixgbevf: eliminate duplicate barriers on weakly-ordered archs

2018-03-16 Thread Sinan Kaya
() to writel_relaxed(). Signed-off-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c

[PATCH v3 09/18] fm10k: Eliminate duplicate barriers on weakly-ordered archs

2018-03-16 Thread Sinan Kaya
-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/net/ethernet/intel/fm10k/fm10k_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_main.c b/drivers/net/ethernet/intel/fm10k/fm10k_main.c index 8e12aae..8d04e26 100644 --- a/drive

[PATCH v3 05/18] ixgbevf: keep writel() closer to wmb()

2018-03-16 Thread Sinan Kaya
Remove ixgbevf_write_tail() in favor of moving writel() close to wmb(). Signed-off-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/net/ethernet/intel/ixgbevf/ixgbevf.h | 5 - drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 4 ++-- 2 files changed, 2 insertions(+), 7 del

[PATCH v3 02/18] ixgbe: eliminate duplicate barriers on weakly-ordered archs

2018-03-16 Thread Sinan Kaya
() to writel_relaxed(). Signed-off-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 0

[PATCH v3 03/18] igbvf: eliminate duplicate barriers on weakly-ordered archs

2018-03-16 Thread Sinan Kaya
-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/net/ethernet/intel/igbvf/netdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/igbvf/netdev.c b/drivers/net/ethernet/intel/igbvf/netdev.c index 4214c15..edb1c34 100644 --- a/drive

[PATCH v3 04/18] igb: eliminate duplicate barriers on weakly-ordered archs

2018-03-16 Thread Sinan Kaya
-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/net/ethernet/intel/igb/igb_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index b88fae7..82aea92 100644 --- a/drive

[PATCH v3 14/18] net: cxgb3: Eliminate duplicate barriers on weakly-ordered archs

2018-03-16 Thread Sinan Kaya
is following a wmb(). Signed-off-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/net/ethernet/chelsio/cxgb3/adapter.h | 7 +++ drivers/net/ethernet/chelsio/cxgb3/sge.c | 19 ++- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/drivers/net/ethernet/chelsio

[PATCH v3 08/18] scsi: hpsa: Eliminate duplicate barriers on weakly-ordered archs

2018-03-16 Thread Sinan Kaya
-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/scsi/hpsa.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/hpsa.h b/drivers/scsi/hpsa.h index 018f980..c7d7e6a 100644 --- a/drivers/scsi/hpsa.h +++ b/drivers/scsi/hpsa.h @@ -599,7 +599,7 @@ static unsigne

[PATCH v3 11/18] qlcnic: Eliminate duplicate barriers on weakly-ordered archs

2018-03-16 Thread Sinan Kaya
-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c index 46b0372..97

[PATCH v3 07/18] drivers: net: cxgb: Eliminate duplicate barriers on weakly-ordered archs

2018-03-16 Thread Sinan Kaya
-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/net/ethernet/chelsio/cxgb/sge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/chelsio/cxgb/sge.c b/drivers/net/ethernet/chelsio/cxgb/sge.c index 30de26e..57891bd6 100644 --- a/drivers/net/ethernet/c

[PATCH v3 12/18] bnx2x: Eliminate duplicate barriers on weakly-ordered archs

2018-03-16 Thread Sinan Kaya
-by: Sinan Kaya <ok...@codeaurora.org> --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c index 76a4668..3b2f1bd

  1   2   >