Re: [PATCH] mm/hugetlb: fix error code in hugetlbfs_alloc_inode

2012-07-09 Thread Gavin Shan
On Tue, Jul 10, 2012 at 09:03:04AM +0800, Wanpeng Li wrote: From: Wanpeng Li l...@linux.vnet.ibm.com When kmem_cache_alloc fails alloc slab object from hugetlbfs_inode_cachep, return -ENOMEM in usual. But hugetlbfs_alloc_inode implementation has inconsitency with it and returns NULL. Fix it to

Re: [PATCH 3.14 186/228] PCI: Wrong register used to check pending traffic

2014-06-11 Thread Gavin Shan
has any objections, please let me know. -- From: Gavin Shan gws...@linux.vnet.ibm.com commit d0b4cc4e32705ff00d90d32da7783c266c702c04 upstream. The incorrect register offset is passed to pci_wait_for_pending(), which is caused by commit 157e876ffe (PCI: Add

Re: [PATCH] pci: Fix unaligned access testing AF transaction pending

2014-06-12 Thread Gavin Shan
Reported-by: Ben Hutchings b...@decadent.org.uk Cc: sta...@vger.kernel.org Acked-by: Gavin Shan gws...@linux.vnet.ibm.com --- drivers/pci/pci.c |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 759475e..81012ec 100644

Re: [PATCH] PCI/AER: Forward declare struct pci_dev to avoid warning

2014-07-21 Thread Gavin Shan
On Mon, Jul 21, 2014 at 07:30:43PM +0300, Tuomas Tynkkynen wrote: I guess it's same issue and fix as: http://patchwork.ozlabs.org/patch/370629/ Thanks, Gavin Forward declaring struct pci_dev in aer.h avoids this warning: In file included from include/ras/ras_event.h:11:0,

Re: [PATCH 1/1] pci: reset all pci endpoints to stop on going dma

2014-10-19 Thread Gavin Shan
On Fri, Oct 17, 2014 at 02:44:43AM -0700, Eric W. Biederman wrote: Li, Zhen-Hua zhen-h...@hp.com writes: This is an update of the patch https://lkml.org/lkml/2014/10/10/37 This patch is doing the reset works before the kdump kernel boots. If I have said it once I have said it a thousand

Re: [PATCH] powernv/iommu: disable IOMMU bypass with param iommu=nobypass

2014-10-21 Thread Gavin Shan
and writes to addresses not mapped by the IOMMU will cause an EEH, allowing us to debug such issues. Signed-off-by: Thadeu Lima de Souza Cascardo casca...@linux.vnet.ibm.com Reviewed-by: Gavin Shan gws...@linux.vnet.ibm.com Except minor things as below. --- Documentation/kernel-parameters.txt

Re: [PATCH 05/15] powerpc/powernv: Split out set MSI IRQ chip code

2014-09-19 Thread Gavin Shan
On Thu, Sep 18, 2014 at 06:26:50PM +1000, Michael Neuling wrote: From: Ian Munsie imun...@au1.ibm.com Some of the MSI IRQ code in pnv_pci_ioda_msi_setup() is generically useful so split it out. This will be used by some of the cxl PCIe code later. Signed-off-by: Ian Munsie imun...@au1.ibm.com

Re: [PATCH 07/15] powerpc/powerpc: Add new PCIe functions for allocating cxl interrupts

2014-09-19 Thread Gavin Shan
On Thu, Sep 18, 2014 at 06:26:52PM +1000, Michael Neuling wrote: From: Ian Munsie imun...@au1.ibm.com This adds a number of functions for allocating IRQs under powernv PCIe for cxl. Signed-off-by: Ian Munsie imun...@au1.ibm.com Signed-off-by: Michael Neuling mi...@neuling.org ---

Re: [PATCH 0/2] powerpc: pci-ioda: Neatening

2014-09-22 Thread Gavin Shan
On Mon, Sep 22, 2014 at 04:56:17PM +1000, Michael Ellerman wrote: On Sun, 2014-09-21 at 10:55 -0700, Joe Perches wrote: printk calls should return void Joe Perches (2): powerpc: pci-ioda: Remove unnecessary return value from printk powerpc: pci-ioda: Use a single function to emit logging

Re: [PATCH] PCI: Clear bridge MEM_64 flag if one child does not support it

2014-12-08 Thread Gavin Shan
On Mon, Dec 08, 2014 at 03:59:54PM -0800, Yinghai Lu wrote: On Mon, Dec 8, 2014 at 2:56 PM, Benjamin Herrenschmidt b...@kernel.crashing.org wrote: On Mon, 2014-12-08 at 13:52 -0800, Yinghai Lu wrote: 2. or scan the children resource other than ROM to clear bridge MEM_64 for mmio pref. The

Re: [PATCH] PCI: Clear bridge MEM_64 flag if one child does not support it

2014-12-08 Thread Gavin Shan
On Mon, Dec 08, 2014 at 03:59:54PM -0800, Yinghai Lu wrote: On Mon, Dec 8, 2014 at 2:56 PM, Benjamin Herrenschmidt b...@kernel.crashing.org wrote: On Mon, 2014-12-08 at 13:52 -0800, Yinghai Lu wrote: 2. or scan the children resource other than ROM to clear bridge MEM_64 for mmio pref. The

Re: [PATCH] PCI: Clear all bridge res MEM_64 if host bridge has non mem64

2014-12-10 Thread Gavin Shan
On Tue, Dec 09, 2014 at 01:34:31PM -0800, Yinghai Lu wrote: So we could use bridge 64bit mem pref for children mem pref instead of forcing them into bridge mem. Could help Marek's system as his system is using _CRS, and all mem res is under 4G. Link:

Re: [PATCH kernel v10 01/34] powerpc/eeh/ioda2: Use device::iommu_group to check IOMMU group

2015-05-11 Thread Gavin Shan
, remove the workaround from pnv_pci_ioda2_set_bypass(); also remove the @add_to_iommu_group parameter from pnv_ioda_setup_bus_dma(). Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru Acked-by: Gavin Shan gws...@linux.vnet.ibm.com Thanks, Gavin --- arch/powerpc/kernel/eeh.c | 4

Re: [PATCH kernel v10 25/34] powerpc/powernv/ioda2: Introduce helpers to allocate TCE pages

2015-05-13 Thread Gavin Shan
: pnv_pci_ioda2_table_alloc_pages() and pnv_pci_ioda2_table_free_pages(). These do not allocate/free the iommu_table struct. This enforces window size to be a power of two. This should cause no behavioural change. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru Reviewed-by: Gavin Shan gws...@linux.vnet.ibm.com

Re: [PATCH kernel v10 26/34] powerpc/powernv/ioda2: Introduce pnv_pci_ioda2_set_window

2015-05-13 Thread Gavin Shan
a...@ozlabs.ru Reviewed-by: David Gibson da...@gibson.dropbear.id.au Reviewed-by: Gavin Shan gws...@linux.vnet.ibm.com --- Changes: v9: * initialize pe-table_group.tables[0] at the very end when tbl is fully initialized * moved pnv_pci_ioda2_tvt_invalidate() from earlier patch --- arch/powerpc/platforms

Re: [PATCH kernel v10 13/34] powerpc/powernv: Do not set read flag if direction==DMA_NONE

2015-05-13 Thread Gavin Shan
Reviewed-by: David Gibson da...@gibson.dropbear.id.au Reviewed-by: Gavin Shan gws...@linux.vnet.ibm.com --- Changes: v9: * added comment why we must put only valid permission bits --- arch/powerpc/include/asm/iommu.h | 1 + arch/powerpc/kernel/iommu.c | 15 +++ arch

Re: [PATCH kernel v10 14/34] powerpc/iommu: Move tce_xxx callbacks from ppc_md to iommu_table

2015-05-13 Thread Gavin Shan
are P5IOC2/IODA1/IODA2. This makes the callbacks for them public. Later patches will extend callbacks for IODA1/2. No change in behaviour is expected. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru Reviewed-by: David Gibson da...@gibson.dropbear.id.au Reviewed-by: Gavin Shan gws

Re: [PATCH kernel v10 05/34] powerpc/iommu: Always release iommu_table in iommu_free_table()

2015-05-13 Thread Gavin Shan
On Wed, May 13, 2015 at 02:51:36PM +0200, Thomas Huth wrote: On Wed, 13 May 2015 16:30:16 +1000 Alexey Kardashevskiy a...@ozlabs.ru wrote: On 05/13/2015 03:33 PM, Gavin Shan wrote: On Tue, May 12, 2015 at 01:38:54AM +1000, Alexey Kardashevskiy wrote: At the moment iommu_free_table() only

Re: [PATCH kernel v10 12/34] vfio: powerpc/spapr: Rework groups attaching

2015-05-13 Thread Gavin Shan
-by: Alex Williamson alex.william...@redhat.com Reviewed-by: David Gibson da...@gibson.dropbear.id.au Reviewed-by: Gavin Shan gws...@linux.vnet.ibm.com Thanks, Gavin --- drivers/vfio/vfio_iommu_spapr_tce.c | 40 ++--- 1 file changed, 24 insertions(+), 16 deletions

Re: [PATCH kernel v10 16/34] powerpc/spapr: vfio: Replace iommu_table with iommu_table_group

2015-05-13 Thread Gavin Shan
anyway. This should cause no behavioural change. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru Reviewed-by: Gavin Shan gws...@linux.vnet.ibm.com --- Changes: v10: * new to the series, separated from powerpc/spapr: vfio: Switch from iommu_table to new iommu_table_group * iommu_table

Re: [PATCH kernel v10 17/34] powerpc/spapr: vfio: Switch from iommu_table to new iommu_table_group

2015-05-13 Thread Gavin Shan
Gibson da...@gibson.dropbear.id.au Reviewed-by: Gavin Shan gws...@linux.vnet.ibm.com Thanks, Gavin --- Changes: v10: * iommu_table is not embedded into iommu_table_group but allocated dynamically * iommu_table allocation is moved to a single place for IODA2's pnv_pci_ioda_setup_dma_pe where

Re: [PATCH kernel v10 18/34] vfio: powerpc/spapr/iommu/powernv/ioda2: Rework IOMMU ownership control

2015-05-13 Thread Gavin Shan
-by: Alexey Kardashevskiy a...@ozlabs.ru [aw: for the vfio related changes] Acked-by: Alex Williamson alex.william...@redhat.com Reviewed-by: Gavin Shan gws...@linux.vnet.ibm.com Thanks, Gavin --- Changes: v10: * fixed comments around take_ownership/release_ownership in iommu_table_group_ops v9

Re: [PATCH kernel v10 15/34] powerpc/powernv/ioda/ioda2: Rework TCE invalidation in tce_build()/tce_free()

2015-05-13 Thread Gavin Shan
addresses shifted by IOMMU page shift. No change in behaviour is expected. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru Reviewed-by: David Gibson da...@gibson.dropbear.id.au Reviewed-by: Gavin Shan gws...@linux.vnet.ibm.com --- Changes: v10: * moved before Switch from iommu_table to new

Re: [PATCH kernel v10 20/34] powerpc/powernv/ioda2: Move TCE kill register address to PE

2015-05-13 Thread Gavin Shan
Kardashevskiy a...@ozlabs.ru Reviewed-by: Gavin Shan gws...@linux.vnet.ibm.com Thanks, Gavin --- Changes: v10: * fixed error from checkpatch.pl * removed comment at ibm,opal-tce-kill parsing as irrelevant * s/addr/val/ in pnv_pci_ioda2_tvt_invalidate() as it was not a kernel address v9: * new

Re: [PATCH kernel v10 22/34] powerpc/powernv: Implement accessor to TCE entry

2015-05-13 Thread Gavin Shan
-by: Alexey Kardashevskiy a...@ozlabs.ru Reviewed-by: David Gibson da...@gibson.dropbear.id.au Reviewed-by: Gavin Shan gws...@linux.vnet.ibm.com Thanks, Gavin --- Changes: v9: * new patch in the series to separate this mechanical change from functional changes; this is not right before powerpc

Re: [PATCH kernel v10 21/34] powerpc/powernv/ioda2: Add TCE invalidation for all attached groups

2015-05-13 Thread Gavin Shan
On Tue, May 12, 2015 at 01:39:10AM +1000, Alexey Kardashevskiy wrote: The iommu_table struct keeps a list of IOMMU groups it is used for. At the moment there is just a single group attached but further patches will add TCE table sharing. When sharing is enabled, TCE cache in each PE needs to be

Re: [PATCH kernel v10 19/34] powerpc/iommu: Fix IOMMU ownership control functions

2015-05-13 Thread Gavin Shan
-off-by: Alexey Kardashevskiy a...@ozlabs.ru Reviewed-by: David Gibson da...@gibson.dropbear.id.au Reviewed-by: Gavin Shan gws...@linux.vnet.ibm.com Thanks, Gavin --- Changes: v9: * iommu_table_take_ownership() did not return @ret (and ignored EBUSY), now it does return correct error. * updated

Re: [PATCH kernel v10 24/34] powerpc/powernv/ioda2: Rework iommu_table creation

2015-05-13 Thread Gavin Shan
Kardashevskiy a...@ozlabs.ru Reviewed-by: David Gibson da...@gibson.dropbear.id.au Reviewed-by: Gavin Shan gws...@linux.vnet.ibm.com Thanks, Gavin --- Changes: v9: * updated commit log and did minor cleanup --- arch/powerpc/platforms/powernv/pci-ioda.c | 24 1 file changed, 12

Re: [PATCH kernel v10 03/34] powerpc/powernv/ioda: Clean up IOMMU group registration

2015-05-12 Thread Gavin Shan
table sharing. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru Reviewed-by: Gavin Shan gws...@linux.vnet.ibm.com Thanks, Gavin --- arch/powerpc/platforms/powernv/pci-ioda.c | 28 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/arch/powerpc/platforms

Re: [PATCH kernel v10 07/34] vfio: powerpc/spapr: Check that IOMMU page is fully contained by system page

2015-05-13 Thread Gavin Shan
Williamson alex.william...@redhat.com Reviewed-by: David Gibson da...@gibson.dropbear.id.au Reviewed-by: Gavin Shan gws...@linux.vnet.ibm.com Thanks, Gavin --- Changes: v8: changed subject v6: * the helper is simplified to one line v4: * s/tce_check_page_size/tce_page_is_contained

Re: [PATCH kernel v10 09/34] vfio: powerpc/spapr: Move locked_vm accounting to helpers

2015-05-13 Thread Gavin Shan
alex.william...@redhat.com Reviewed-by: David Gibson da...@gibson.dropbear.id.au Reviewed-by: Gavin Shan gws...@linux.vnet.ibm.com --- Changes: v4: * new helpers do nothing if @npages == 0 * tce_iommu_disable() now can decrement the counter if the group was detached (not possible now

Re: [PATCH kernel v10 10/34] vfio: powerpc/spapr: Disable DMA mappings on disabled container

2015-05-13 Thread Gavin Shan
, otherwise -EPERM is returned. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru [aw: for the vfio related changes] Acked-by: Alex Williamson alex.william...@redhat.com Reviewed-by: David Gibson da...@gibson.dropbear.id.au Reviewed-by: Gavin Shan gws...@linux.vnet.ibm.com Thanks, Gavin

Re: [PATCH kernel v10 11/34] vfio: powerpc/spapr: Moving pinning/unpinning to helpers

2015-05-13 Thread Gavin Shan
current tce_build()) which will eliminate redundant conversions. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru [aw: for the vfio related changes] Acked-by: Alex Williamson alex.william...@redhat.com Reviewed-by: David Gibson da...@gibson.dropbear.id.au Reviewed-by: Gavin Shan gws

Re: [PATCH kernel v10 05/34] powerpc/iommu: Always release iommu_table in iommu_free_table()

2015-05-12 Thread Gavin Shan
will need to be able to release iommu_table even if it was used for VFIO in which case it_map is NULL so does the patch. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru Reviewed-by: Gavin Shan gws...@linux.vnet.ibm.com --- arch/powerpc/kernel/iommu.c | 3 +-- 1 file changed, 1 insertion(+), 2

Re: [PATCH kernel v10 06/34] vfio: powerpc/spapr: Move page pinning from arch code to VFIO IOMMU driver

2015-05-12 Thread Gavin Shan
-by: Alexey Kardashevskiy a...@ozlabs.ru [aw: for the vfio related changes] Acked-by: Alex Williamson alex.william...@redhat.com Reviewed-by: David Gibson da...@gibson.dropbear.id.au Reviewed-by: Gavin Shan gws...@linux.vnet.ibm.com --- Changes: v9: * added missing tce_iommu_clear call after

Re: [PATCH kernel v10 08/34] vfio: powerpc/spapr: Use it_page_size

2015-05-13 Thread Gavin Shan
IOMMU_PAGE_SHIFT. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru Reviewed-by: David Gibson da...@gibson.dropbear.id.au [aw: for the vfio related changes] Acked-by: Alex Williamson alex.william...@redhat.com Reviewed-by: Gavin Shan gws...@linux.vnet.ibm.com Thanks, Gavin --- drivers/vfio

Re: [PATCH kernel v10 02/34] powerpc/iommu/powernv: Get rid of set_iommu_table_base_and_group

2015-05-12 Thread Gavin Shan
in tce_iommu_bus_notifier. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru Reviewed-by: Gavin Shan gws...@linux.vnet.ibm.com --- Changes: v10: * new to the series --- arch/powerpc/include/asm/iommu.h| 7 --- arch/powerpc/platforms/powernv/pci-ioda.c | 27

Re: [PATCH kernel v10 04/34] powerpc/iommu: Put IOMMU group explicitly

2015-05-12 Thread Gavin Shan
a iommu_pseries_free_table() helper which does iommu_group_put() and iommu_free_table(). Later it will be changed to receive a table_group and we will have to change less lines then. This should cause no behavioural change. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru Reviewed-by: Gavin

Re: [PATCH kernel v11 20/34] powerpc/powernv/ioda2: Move TCE kill register address to PE

2015-06-04 Thread Gavin Shan
was used) but this is going to change with Dynamic DMA windows (DDW). Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru Reviewed-by: Gavin Shan gws...@linux.vnet.ibm.com Thanks, Gavin --- Changes: v11: * s/pnv_pci_ioda2_tvt_invalidate/pnv_pci_ioda2_tce_invalidate_entire/g (cannot think of better

Re: [PATCH kernel v11 16/34] powerpc/spapr: vfio: Replace iommu_table with iommu_table_group

2015-06-04 Thread Gavin Shan
anyway. This should cause no behavioural change. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru [aw: for the vfio related changes] Acked-by: Alex Williamson alex.william...@redhat.com Reviewed-by: Gavin Shan gws...@linux.vnet.ibm.com --- Changes: v11: * iommu_table_group moved outside

Re: [PATCH kernel v11 21/34] powerpc/powernv/ioda2: Add TCE invalidation for all attached groups

2015-06-04 Thread Gavin Shan
to be invalidated so does the patch. This does not change pnv_pci_ioda1_tce_invalidate() as there is no plan to enable TCE table sharing on PHBs older than IODA2. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru Reviewed-by: Gavin Shan gws...@linux.vnet.ibm.com --- Changes: v10: * new to the series

Re: [PATCH kernel v11 33/34] vfio: powerpc/spapr: Register memory and define IOMMU v2

2015-06-04 Thread Gavin Shan
On Fri, May 29, 2015 at 06:44:57PM +1000, Alexey Kardashevskiy wrote: The existing implementation accounts the whole DMA window in the locked_vm counter. This is going to be worse with multiple containers and huge DMA windows. Also, real-time accounting would requite additional tracking of

Re: [PATCH kernel v11 05/34] powerpc/iommu: Always release iommu_table in iommu_free_table()

2015-06-04 Thread Gavin Shan
will need to be able to release iommu_table even if it was used for VFIO in which case it_map is NULL so does the patch. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru Reviewed-by: Gavin Shan gws...@linux.vnet.ibm.com Thanks, Gavin --- Changes: v11: * fixed parameter checks --- arch/powerpc/kernel

Re: [PATCH kernel] powerpc/powernv/ioda2: Add devices only from buses which belong to PE

2015-06-12 Thread Gavin Shan
to lower level PE rather to the root PE. This limits pnv_ioda_setup_bus_dma() invocation to only PEs which own all subordinate buses. Suggested-by: Gavin Shan gws...@linux.vnet.ibm.com Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru Alexey, I think it's good candidate for stable. Thanks, Gavin

Re: [PATCH kernel] powerpc/powernv/ioda2: Add devices only from buses which belong to PE

2015-06-14 Thread Gavin Shan
On Fri, Jun 12, 2015 at 08:06:43AM -0700, Nishanth Aravamudan wrote: On 12.06.2015 [16:47:03 +1000], Gavin Shan wrote: On Fri, Jun 12, 2015 at 04:19:17PM +1000, Alexey Kardashevskiy wrote: The existing code puts all devices from a root PE to the same IOMMU group. However it is a possible

Re: [RFC v5 7/7] vfio-pci: Allow to mmap MSI-X table if interrupt remapping is supported

2016-04-05 Thread Gavin Shan
On Tue, Apr 05, 2016 at 09:46:44PM +0800, Yongji Xie wrote: >This patch enables mmapping MSI-X tables if >hardware supports interrupt remapping which >can ensure that a given pci device can only >shoot the MSIs assigned for it. > >Signed-off-by: Yongji Xie >--- >

Re: [RFC v5 6/7] PCI: Add a new bit to pci_bus_flags to indicate interrupt remapping

2016-04-05 Thread Gavin Shan
On Tue, Apr 05, 2016 at 09:46:43PM +0800, Yongji Xie wrote: >I'm trying to find a proper way to indicate >the capability of interrupt remapping on PPC64 >because we need this to determine whether it is >safe to mmap MSI-X table in VFIO driver. > >There is a existing flag for this in the IOMMU

Re: [RFC v5 1/7] PCI: Ignore resource_alignment if PCI_PROBE_ONLY was set

2016-04-05 Thread Gavin Shan
On Tue, Apr 05, 2016 at 09:43:29PM +0800, Yongji Xie wrote: >The resource_alignment will releases memory >resources allocated by firmware so that kernel >can reassign new resources later on. But this >will cause the problem that no resources can be >allocated by kernel if PCI_PROBE_ONLY was set,

Re: [RFC v5 2/7] PCI: Do not Use IORESOURCE_STARTALIGN to identify bridge resources

2016-04-05 Thread Gavin Shan
On Tue, Apr 05, 2016 at 09:43:30PM +0800, Yongji Xie wrote: >Now we use the IORESOURCE_STARTALIGN to identify >bridge resources in __assign_resources_sorted(). >That's quite fragile. We can't make sure that >the PCI devices' resources will not use >IORESOURCE_STARTALIGN any more. > >In this patch,

Re: [RFC v5 3/7] PCI: Add a new option for resource_alignment to reassign alignment

2016-04-05 Thread Gavin Shan
On Tue, Apr 05, 2016 at 09:43:31PM +0800, Yongji Xie wrote: >When using resource_alignment kernel parameter, >the current implement reassigns the alignment by >changing resources' size which can potentially >break some drivers. For example, the driver uses >the size to locate some register whose

Re: drivers/of: crash on boot

2016-05-19 Thread Gavin Shan
On Thu, May 19, 2016 at 07:48:18AM -0500, Rob Herring wrote: >On Thu, May 19, 2016 at 6:19 AM, Gavin Shan <gws...@linux.vnet.ibm.com> wrote: >> On Wed, May 18, 2016 at 08:51:59PM -0500, Rob Herring wrote: >>>On Wed, May 18, 2016 at 7:23 PM, Rob Herring <r...@kernel.org&

Re: drivers/of: crash on boot

2016-05-19 Thread Gavin Shan
On Wed, May 18, 2016 at 08:51:59PM -0500, Rob Herring wrote: >On Wed, May 18, 2016 at 7:23 PM, Rob Herring wrote: >> On Wed, May 18, 2016 at 4:26 PM, Rhyland Klein wrote: >>> On 5/18/2016 3:58 PM, Rhyland Klein wrote: On 5/18/2016 3:36 PM, Rob Herring

Re: [PATCH net-next] net/ncsi: avoid maybe-uninitialized warning

2016-07-21 Thread Gavin Shan
unused or not. > >This rearranges the code in a way that makes it obvious to gcc that old_state >is always initialized at the time of use, functionally this should not >change anything. > >Signed-off-by: Arnd Bergmann <a...@arndb.de> Acked-by: Gavin Shan <gws...@linux.vnet.ibm.com>

Re: [PATCH v3 2/7] PCI: Ignore enforced alignment to VF BARs

2016-06-30 Thread Gavin Shan
On Thu, Jun 30, 2016 at 06:53:08PM +0800, Yongji Xie wrote: >VF BARs are read-only zeroes according to SRIOV spec, >the normal way(writing BARs) of allocating resources wouldn't >be applied to VFs. The VFs' resources would be allocated >when we enable SR-IOV capability. So we should not try to

Re: [PATCH v3 1/7] PCI: Ignore enforced alignment when kernel uses existing firmware setup

2016-06-30 Thread Gavin Shan
On Thu, Jun 30, 2016 at 06:53:07PM +0800, Yongji Xie wrote: >PCI resources allocator will use firmware setup and not try to >reassign resource when PCI_PROBE_ONLY or IORESOURCE_PCI_FIXED >is set. > >The enforced alignment in pci_reassigndev_resource_alignment() >should be ignored in this case.

Re: [PATCH v3 3/7] PCI: Do not disable memory decoding in pci_reassigndev_resource_alignment()

2016-06-30 Thread Gavin Shan
On Thu, Jun 30, 2016 at 06:53:09PM +0800, Yongji Xie wrote: >We should not disable memory decoding when we reassign alignment >in pci_reassigndev_resource_alignment(). It's meaningless and >have some side effect. For example, some fixup functions such as >quirk_e100_interrupt() read

Re: [PATCH v3 5/7] PCI: Do not use IORESOURCE_STARTALIGN to identify bridge resources

2016-06-30 Thread Gavin Shan
g the option "noresize" of parameter >"pci=resource_alignment". > >In this patch, we try to use a more robust way to identify >bridge resources. > >Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com> Reviewed-by: Gavin Shan <gws...@linux.vnet.ibm.com>

Re: [PATCH v3 4/7] PCI: Add a new option for resource_alignment to reassign alignment

2016-06-30 Thread Gavin Shan
gister whose length is related >to the size. > >This patch adds a new option "noresize" for the parameter to >solve this problem. > >Signed-off-by: Yongji Xie <xyj...@linux.vnet.ibm.com> Reviewed-by: Gavin Shan <gws...@linux.vnet.ibm.com> >--- > Docu

Re: [PATCH v3 2/7] PCI: Ignore enforced alignment to VF BARs

2016-07-01 Thread Gavin Shan
On Fri, Jul 01, 2016 at 01:27:17PM +0800, Yongji Xie wrote: >>On Thu, Jun 30, 2016 at 06:53:08PM +0800, Yongji Xie wrote: >>>VF BARs are read-only zeroes according to SRIOV spec, >>>the normal way(writing BARs) of allocating resources wouldn't >>>be applied to VFs. The VFs' resources would be

Re: [PATCH v3 2/7] PCI: Ignore enforced alignment to VF BARs

2016-07-01 Thread Gavin Shan
On Fri, Jul 01, 2016 at 02:40:16PM +0800, Yongji Xie wrote: >Hi Gavin, > >On 2016/7/1 14:05, Gavin Shan wrote: > >>On Fri, Jul 01, 2016 at 01:27:17PM +0800, Yongji Xie wrote: >>>>On Thu, Jun 30, 2016 at 06:53:08PM +0800, Yongji Xie wrote: >>>>>VF BARs

Re: [PATCH v3 5/7] PCI: Do not use IORESOURCE_STARTALIGN to identify bridge resources

2016-07-01 Thread Gavin Shan
On Fri, Jul 01, 2016 at 03:04:10PM +0800, Yongji Xie wrote: >Hi Gavin, > >On 2016/7/1 10:34, Gavin Shan wrote: > >>On Thu, Jun 30, 2016 at 06:53:11PM +0800, Yongji Xie wrote: >>>Now we use the IORESOURCE_STARTALIGN to identify bridge resources >>>in __ass

Re: [PATCH] pci-error-recover: doc cleanup

2016-12-13 Thread Gavin Shan
On Fri, Dec 09, 2016 at 05:50:17PM +1100, Andrew Donnellan wrote: >On 09/12/16 17:24, Linas Vepstas wrote: >>I suppose I'm confused, but I recall that link resets are non-fatal. >>Fatal errors typically require that the the pci adapter be completely >>reset, any adapter firmware to be reloaded

Re: [PATCH] genirq/affinity: fix node generation from cpumask

2016-12-14 Thread Gavin Shan
-by: Gabriel Krisman Bertazi <gabr...@krisman.be> >Signed-off-by: Guilherme G. Piccoli <gpicc...@linux.vnet.ibm.com> >Cc: sta...@vger.kernel.org # v4.9+ >Cc: Christoph Hellwig <h...@lst.de> >Cc: linuxppc-...@lists.ozlabs.org >Cc: linux-...@vger.kernel.org >--- Review

Re: [PATCH 2/2] PCI: lock each enable/disable num_vfs operation in sysfs

2017-01-04 Thread Gavin Shan
On Wed, Jan 04, 2017 at 04:00:20PM +, Tantilov, Emil S wrote: >>On Tue, Jan 03, 2017 at 04:48:31PM -0800, Emil Tantilov wrote: >>>Enabling/disabling SRIOV via sysfs by echo-ing multiple values >>>simultaneously: >>> >>>echo 63 > /sys/class/net/ethX/device/sriov_numvfs& >>>echo 63 >

Re: [PATCH 2/2] PCI: lock each enable/disable num_vfs operation in sysfs

2017-01-03 Thread Gavin Shan
On Tue, Jan 03, 2017 at 04:48:31PM -0800, Emil Tantilov wrote: >Enabling/disabling SRIOV via sysfs by echo-ing multiple values >simultaneously: > >echo 63 > /sys/class/net/ethX/device/sriov_numvfs& >echo 63 > /sys/class/net/ethX/device/sriov_numvfs > >sleep 5 > >echo 0 >

Re: [PATCH v2] PCI: lock each enable/disable num_vfs operation in sysfs

2017-01-08 Thread Gavin Shan
xgbe] > [] sriov_numvfs_store+0xdc/0x130 >... >RIP [] pci_iov_release+0x57/0x60 > >Use the existing mutex lock to protect each enable/disable operation. > >-v2: move the existing lock from protecting the config of the IOV bus >to protecting the writes to sriov_numvfs in sysf

Re: [PATCH 2/2] PCI: lock each enable/disable num_vfs operation in sysfs

2017-01-05 Thread Gavin Shan
On Fri, Jan 06, 2017 at 12:55:08AM +, Tantilov, Emil S wrote: >>On Wed, Jan 04, 2017 at 04:00:20PM +, Tantilov, Emil S wrote: On Tue, Jan 03, 2017 at 04:48:31PM -0800, Emil Tantilov wrote: >Enabling/disabling SRIOV via sysfs by echo-ing multiple values >simultaneously: >

Re: [PATCH] pci/sriov: Add an option to probe VFs or not before enabling SR-IOV

2017-03-20 Thread Gavin Shan
On Mon, Mar 20, 2017 at 05:14:34PM +0200, bod...@mellanox.com wrote: >From: Bodong Wang > >Sometimes it is not desirable to probe the virtual functions after >SRIOV is enabled. This can save host side resource usage by VF >instances which would be eventually probed to VMs. >

Re: [PATCH] pci/sriov: Add an option to probe VFs or not before enabling SR-IOV

2017-03-20 Thread Gavin Shan
On Mon, Mar 20, 2017 at 10:57:08PM -0600, Alex Williamson wrote: >On Mon, 20 Mar 2017 18:34:23 -0500 >Bodong Wang wrote: .../... >> > Bodong, I'm not sure if there is a requirement to load driver for the >> > specified number of VFs? That indicates no driver will be loaded

Re: [PATCH] pci/sriov: Add an option to probe VFs or not before enabling SR-IOV

2017-03-21 Thread Gavin Shan
On Tue, Mar 21, 2017 at 12:01:58AM -0600, Alex Williamson wrote: >On Tue, 21 Mar 2017 16:43:05 +1100 >Gavin Shan <gws...@linux.vnet.ibm.com> wrote: >> On Mon, Mar 20, 2017 at 10:57:08PM -0600, Alex Williamson wrote: >> >On Mon, 20 Mar 2017 18:34:23 -0500 >> >Bod

Re: [PATCH] pci/sriov: Add an option to probe VFs or not before enabling SR-IOV

2017-03-20 Thread Gavin Shan
On Mon, Mar 20, 2017 at 06:34:23PM -0500, Bodong Wang wrote: >On 3/20/2017 6:07 PM, Gavin Shan wrote: >>On Mon, Mar 20, 2017 at 05:14:34PM +0200, bod...@mellanox.com wrote: >>>From: Bodong Wang <bod...@mellanox.com> >>> >>>Sometimes it is not desirable to

Re: [V1,1/1] pci/sriov: Add an option to probe VFs or not before enabling SR-IOV

2017-03-21 Thread Gavin Shan
>Note that, the choice must be made before enabling VFs. The change >will not take effect if VFs are already enabled. Simply, one can set >sriov_numvfs to 0, choose whether to probe or not, and then resume >sriov_numvfs. > >Signed-off-by: Bodong Wang <bod...@mellanox.com>

Re: [PATCH] pci/sriov: Add an option to probe VFs or not before enabling SR-IOV

2017-03-21 Thread Gavin Shan
On Tue, Mar 21, 2017 at 08:23:29AM -0600, Alex Williamson wrote: >On Tue, 21 Mar 2017 20:25:18 +1100 >Gavin Shan <gws...@linux.vnet.ibm.com> wrote: >> On Tue, Mar 21, 2017 at 12:01:58AM -0600, Alex Williamson wrote: >> >On Tue, 21 Mar 2017 16:43:05 +1100 >> >G

Re: [PATCH] pci/sriov: Add an option to probe VFs or not before enabling SR-IOV

2017-03-21 Thread Gavin Shan
On Tue, Mar 21, 2017 at 02:34:46PM +, Eli Cohen wrote: >> If we want to talk about the ABI, I would suggest drawing from existing >> ABIs. We already have >> drivers_autoprobe as part of the standard sysfs ABI, so if we want a binary >> switch, then >>sriov_drivers_autoprobe might be a

Re: [v3] PCI: Add an option to control probing of VFs before enabling SR-IOV

2017-04-12 Thread Gavin Shan
ne can set >> sriov_numvfs to 0, choose whether to probe or not, and then resume >> sriov_numvfs. >> >> Signed-off-by: Bodong Wang <bod...@mellanox.com> >> Signed-off-by: Eli Cohen <e...@mellanox.com> >> Reviewed-by: Gavin Shan <gws...@linux.vne

Re: [PATCH] net/ncsi: fix checksum validation in response packet

2017-04-17 Thread Gavin Shan
On Mon, Apr 17, 2017 at 01:36:19PM -0400, David Miller wrote: >From: Cédric Le Goater >Date: Fri, 14 Apr 2017 10:56:37 +0200 > >> htonl was used instead of ntohl. Surely a typo. >> >> Signed-off-by: Cédric Le Goater > >I don't think so, "checksum" is of type "u32"

Re: [PATCH 3.14 186/228] PCI: Wrong register used to check pending traffic

2014-06-11 Thread Gavin Shan
view patch. If anyone has any objections, please let me >> >> know. >> >> >> >> -- >> >> >> >> From: Gavin Shan >> >> >> >> commit d0b4cc4e32705ff00d90d32da7783c266c702c04 upstream. >> >&

Re: [PATCH] pci: Fix unaligned access testing AF transaction pending

2014-06-12 Thread Gavin Shan
t;Reported-by: Ben Hutchings >Cc: sta...@vger.kernel.org Acked-by: Gavin Shan >--- > drivers/pci/pci.c |9 +++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > >diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c >index 759475e..81012ec 100644 >--- a/drivers/pci/

Re: [PATCH] PCI/AER: Forward declare struct pci_dev to avoid warning

2014-07-21 Thread Gavin Shan
On Mon, Jul 21, 2014 at 07:30:43PM +0300, Tuomas Tynkkynen wrote: I guess it's same issue and fix as: http://patchwork.ozlabs.org/patch/370629/ Thanks, Gavin >Forward declaring struct pci_dev in aer.h avoids this warning: > >In file included from include/ras/ras_event.h:11:0, >

Re: [PATCH V4 2/3] arm64/mm/hotplug: Enable MEM_OFFLINE event handling

2020-09-30 Thread Gavin Shan
you get a chance for respin. Reviewed-by: Gavin Shan diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c index 4e70f4fea06c..90a30f5ebfc0 100644 --- a/arch/arm64/mm/mmu.c +++ b/arch/arm64/mm/mmu.c @@ -1482,13 +1482,38 @@ static int prevent_bootmem_remove_notifier(struct notifier_block *nb

Re: [PATCH V4 3/3] arm64/mm/hotplug: Ensure early memory sections are all online

2020-09-30 Thread Gavin Shan
Hi Anshuman, On 9/29/20 11:54 PM, Anshuman Khandual wrote: This adds a validation function that scans the entire boot memory and makes sure that all early memory sections are online. This check is essential for the memory notifier to work properly, as it cannot prevent any boot memory from

Re: [PATCH v3] arm64/mm: add fallback option to allocate virtually contiguous memory

2020-10-11 Thread Gavin Shan
deletions(-) It looks good to me with Anshuman's comments fixed: Reviewed-by: Gavin Shan diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c index 75df62f..11f8639 100644 --- a/arch/arm64/mm/mmu.c +++ b/arch/arm64/mm/mmu.c @@ -1121,8 +1121,15 @@ int __meminit vmemmap_populate(unsigned long

Re: [PATCH V4 2/3] arm64/mm/hotplug: Enable MEM_OFFLINE event handling

2020-10-11 Thread Gavin Shan
Hi Anshuman, On 10/6/20 1:59 PM, Anshuman Khandual wrote: On 10/01/2020 05:27 AM, Gavin Shan wrote: On 9/29/20 11:54 PM, Anshuman Khandual wrote: This enables MEM_OFFLINE memory event handling. It will help intercept any possible error condition such as if boot memory some how still got

Re: [PATCH V4 3/3] arm64/mm/hotplug: Ensure early memory sections are all online

2020-10-11 Thread Gavin Shan
Hi Anshuman, On 10/6/20 2:11 PM, Anshuman Khandual wrote: On 10/01/2020 06:23 AM, Gavin Shan wrote: On 9/29/20 11:54 PM, Anshuman Khandual wrote: This adds a validation function that scans the entire boot memory and makes sure that all early memory sections are online. This check is essential

Re: [PATCH 2/2] arm64/mm: Enable color zero pages

2020-09-16 Thread Gavin Shan
Hi Will, On 9/16/20 6:28 PM, Will Deacon wrote: On Wed, Sep 16, 2020 at 01:25:23PM +1000, Gavin Shan wrote: This enables color zero pages by allocating contigous page frames for it. The number of pages for this is determined by L1 dCache (or iCache) size, which is probbed from the hardware

Re: [PATCH 2/2] arm64/mm: Enable color zero pages

2020-09-16 Thread Gavin Shan
Hi Robin, On 9/16/20 8:46 PM, Robin Murphy wrote: On 2020-09-16 09:28, Will Deacon wrote: On Wed, Sep 16, 2020 at 01:25:23PM +1000, Gavin Shan wrote: This enables color zero pages by allocating contigous page frames for it. The number of pages for this is determined by L1 dCache (or iCache

Re: [PATCH 2/2] arm64/mm: Use CONT_SHIFT to define CONT_PTE_SHIFT

2020-09-10 Thread Gavin Shan
Hi Anshuman, On 9/10/20 4:17 PM, Anshuman Khandual wrote: On 09/08/2020 12:49 PM, Gavin Shan wrote: The macro CONT_PTE_SHIFT actually depends on CONT_SHIFT, which has been defined in page-def.h, based on CONFIG_ARM64_CONT_SHIFT. Lets reflect the dependency. Signed-off-by: Gavin Shan

[PATCH] arm64/mm: Refactor {pgd, pud, pmd, pte}_ERROR()

2020-09-13 Thread Gavin Shan
are folded to PGD. This removes __{pgd, pud, pmd, pte}_error() and call pr_err() from {pgd, pud, pmd, pte}_ERROR() directly, similar to what x86/powerpc are doing. With this, the code looks a bit simplified either. Signed-off-by: Gavin Shan --- arch/arm64/include/asm/pgtable.h | 17

Re: [PATCH] arm64/mm: Refactor {pgd, pud, pmd, pte}_ERROR()

2020-09-13 Thread Gavin Shan
to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Gavin-Shan/arm64-mm-Refactor-pgd-pud-pmd-pte-_ERROR/20200913-194714 base: https

[PATCH v2] arm64/mm: Refactor {pgd, pud, pmd, pte}_ERROR()

2020-09-13 Thread Gavin Shan
are folded to PGD. This removes __{pgd, pud, pmd, pte}_error() and call pr_err() from {pgd, pud, pmd, pte}_ERROR() directly, similar to what x86/powerpc are doing. With this, the code looks a bit simplified either. Signed-off-by: Gavin Shan --- v2: Fix build warning caused by wrong printk format --- arch

Re: [PATCH v2] arm64/mm: Refactor {pgd, pud, pmd, pte}_ERROR()

2020-09-13 Thread Gavin Shan
Hi Anshuman, On 9/14/20 3:31 PM, Anshuman Khandual wrote: On 09/14/2020 05:17 AM, Gavin Shan wrote: The function __{pgd, pud, pmd, pte}_error() are introduced so that they can be called by {pgd, pud, pmd, pte}_ERROR(). However, some of the functions could never be called when the corresponding

Re: [PATCH 2/2] arm64/mm: Enable color zero pages

2020-09-20 Thread Gavin Shan
Hi Robin, On 9/17/20 8:22 PM, Robin Murphy wrote: On 2020-09-17 04:35, Gavin Shan wrote: On 9/16/20 6:28 PM, Will Deacon wrote: On Wed, Sep 16, 2020 at 01:25:23PM +1000, Gavin Shan wrote: This enables color zero pages by allocating contigous page frames for it. The number of pages

Re: [PATCH 2/2] arm64/mm: Use CONT_SHIFT to define CONT_PTE_SHIFT

2020-09-10 Thread Gavin Shan
Hi Anshuman, On 9/10/20 7:28 PM, Anshuman Khandual wrote: On 09/10/2020 02:01 PM, Gavin Shan wrote: On 9/10/20 4:17 PM, Anshuman Khandual wrote: On 09/08/2020 12:49 PM, Gavin Shan wrote: The macro CONT_PTE_SHIFT actually depends on CONT_SHIFT, which has been defined in page-def.h, based

[PATCH v2 2/3] arm64/mm: Unitify CONT_PTE_SHIFT

2020-09-10 Thread Gavin Shan
are removed as they are not used by anyone. * CONT_PTE_SHIFT is determined by CONFIG_ARM64_CONT_PTE_SHIFT. Signed-off-by: Gavin Shan --- arch/arm64/Kconfig | 2 +- arch/arm64/include/asm/page-def.h | 5 - arch/arm64/include/asm/pgtable-hwdef.h | 4 +--- 3

[PATCH v2 1/3] arm64/mm: Remove CONT_RANGE_OFFSET

2020-09-10 Thread Gavin Shan
. This removes the unused macro (CONT_RANGE_OFFSET). Signed-off-by: Gavin Shan Reviewed-by: Anshuman Khandual --- arch/arm64/include/asm/pgtable-hwdef.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/arm64/include/asm/pgtable-hwdef.h b/arch/arm64/include/asm/pgtable-hwdef.h index d

[PATCH v2 3/3] arm64/mm: Unitify CONT_PMD_SHIFT

2020-09-10 Thread Gavin Shan
Similar to how CONT_PTE_SHIFT is determined, this introduces a new kernel option (CONFIG_CONT_PMD_SHIFT) to determine CONT_PMD_SHIFT. Signed-off-by: Gavin Shan --- arch/arm64/Kconfig | 6 ++ arch/arm64/include/asm/pgtable-hwdef.h | 10 ++ 2 files changed, 8

[PATCH 1/2] arm64/mm: Introduce zero PGD table

2020-09-15 Thread Gavin Shan
is decoupled from the zero page(s). Signed-off-by: Gavin Shan --- arch/arm64/include/asm/mmu_context.h | 6 +++--- arch/arm64/include/asm/pgtable.h | 2 ++ arch/arm64/kernel/setup.c| 2 +- arch/arm64/kernel/vmlinux.lds.S | 4 arch/arm64/mm/proc.S | 2 +- 5 files

[PATCH 2/2] arm64/mm: Enable color zero pages

2020-09-15 Thread Gavin Shan
is called after the page allocator begins to work, to allocate the contigous pages needed by color zero page. * Reworked ZERO_PAGE() and define __HAVE_COLOR_ZERO_PAGE. Signed-off-by: Gavin Shan --- arch/arm64/include/asm/cache.h | 22 arch/arm64/include/asm

[PATCH 0/2] arm64/mm: Enable color zero pages

2020-09-15 Thread Gavin Shan
/2] allocates the needed zero pages according to L1 cache size Gavin Shan (2): arm64/mm: Introduce zero PGD table arm64/mm: Enable color zero pages arch/arm64/include/asm/cache.h | 22 + arch/arm64/include/asm/mmu_context.h | 6 ++--- arch/arm64/include/asm/pgtable.h

Re: [PATCH -next] firmware: arm_sdei: simplify the return expression of sdei_device_freeze()

2020-09-15 Thread Gavin Shan
On 9/15/20 1:26 PM, Liu Shixin wrote: Simplify the return expression. Signed-off-by: Liu Shixin --- Reviewed-by: Gavin Shan drivers/firmware/arm_sdei.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/firmware/arm_sdei.c b/drivers/firmware/arm_sdei.c

  1   2   3   4   >