Re: [PATCH 1/2] kdump: vmcore: move copy_to() from vmcore.c to uaccess.h

2021-12-10 Thread Christophe Leroy
Le 10/12/2021 à 17:59, Andrew Morton a écrit : > On Fri, 10 Dec 2021 21:36:00 +0800 Tiezhu Yang wrote: > >> In arch/*/kernel/crash_dump*.c, there exist similar code about >> copy_oldmem_page(), move copy_to() from vmcore.c to uaccess.h, >> and then we can use copy_to() to simplify the related c

[PATCH v2 1/2] kdump: vmcore: remove copy_to() and add copy_to_user_or_kernel()

2021-12-10 Thread Tiezhu Yang
In arch/*/kernel/crash_dump*.c, there exist many similar code about copy_oldmem_page(), remove copy_to() in fs/proc/vmcore.c and add copy_to_user_or_kernel() in lib/usercopy.c, then we can use copy_to_user_or_kernel() to simplify the related code. Signed-off-by: Tiezhu Yang --- fs/proc/vmcore.c

[PATCH v2 2/2] kdump: crashdump: use copy_to_user_or_kernel() to simplify code

2021-12-10 Thread Tiezhu Yang
Use copy_to_user_or_kernel() to simplify the related code about copy_oldmem_page() in arch/*/kernel/crash_dump*.c files. Signed-off-by: Tiezhu Yang --- arch/arm/kernel/crash_dump.c | 12 +++- arch/arm64/kernel/crash_dump.c | 12 +++- arch/ia64/kernel/crash_dump.c| 12 ++

[PATCH v2 0/2] kdump: simplify code

2021-12-10 Thread Tiezhu Yang
v2: -- add copy_to_user_or_kernel() in lib/usercopy.c -- define userbuf as bool type Tiezhu Yang (2): kdump: vmcore: remove copy_to() and add copy_to_user_or_kernel() kdump: crashdump: use copy_to_user_or_kernel() to simplify code arch/arm/kernel/crash_dump.c | 12 +++- arch/

Re: [PATCH v2] of/fdt: Rework early_init_dt_scan_memory() to call directly

2021-12-10 Thread Frank Rowand
On 12/8/21 10:58 AM, Rob Herring wrote: > Use of the of_scan_flat_dt() function predates libfdt and is discouraged > as libfdt provides a nicer set of APIs. Rework > early_init_dt_scan_memory() to be called directly and use libfdt. > > Cc: John Crispin > Cc: Thomas Bogendoerfer > Cc: Michael Ell

Re: [PATCH 1/2] kdump: vmcore: move copy_to() from vmcore.c to uaccess.h

2021-12-10 Thread Tiezhu Yang
On 12/11/2021 12:59 AM, Andrew Morton wrote: On Fri, 10 Dec 2021 21:36:00 +0800 Tiezhu Yang wrote: In arch/*/kernel/crash_dump*.c, there exist similar code about copy_oldmem_page(), move copy_to() from vmcore.c to uaccess.h, and then we can use copy_to() to simplify the related code. ... ---

[patch V3 35/35] dmaengine: qcom_hidma: Cleanup MSI handling

2021-12-10 Thread Thomas Gleixner
From: Thomas Gleixner There is no reason to walk the MSI descriptors to retrieve the interrupt number for a device. Use msi_get_virq() instead. Signed-off-by: Thomas Gleixner Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jason Gunthorpe Acked-by: Sinan Kaya Cc: dmaeng...@vger.kernel.org ---

[patch V3 34/35] soc: ti: ti_sci_inta_msi: Get rid of ti_sci_inta_msi_get_virq()

2021-12-10 Thread Thomas Gleixner
From: Thomas Gleixner Just use the core function msi_get_virq(). Signed-off-by: Thomas Gleixner Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jason Gunthorpe Cc: Peter Ujfalusi Cc: Vinod Koul Cc: dmaeng...@vger.kernel.org --- drivers/dma/ti/k3-udma-private.c |6 ++ drivers/dma

[patch V3 33/35] bus: fsl-mc: fsl-mc-allocator: Rework MSI handling

2021-12-10 Thread Thomas Gleixner
From: Thomas Gleixner Storing a pointer to the MSI descriptor just to track the Linux interrupt number is daft. Just store the interrupt number and be done with it. Signed-off-by: Thomas Gleixner Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jason Gunthorpe Cc: Stuart Yoder Cc: Laurentiu Tudo

[patch V3 32/35] mailbox: bcm-flexrm-mailbox: Rework MSI interrupt handling

2021-12-10 Thread Thomas Gleixner
From: Thomas Gleixner No point in retrieving the MSI descriptors. Just query the Linux interrupt number. Signed-off-by: Thomas Gleixner Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jason Gunthorpe Cc: Jassi Brar --- drivers/mailbox/bcm-flexrm-mailbox.c |7 ++- 1 file changed, 2 ins

[patch V3 31/35] iommu/arm-smmu-v3: Use msi_get_virq()

2021-12-10 Thread Thomas Gleixner
From: Thomas Gleixner Let the core code fiddle with the MSI descriptor retrieval. Signed-off-by: Thomas Gleixner Tested-by: Robin Murphy Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jason Gunthorpe Cc: Will Deacon Cc: Joerg Roedel Cc: linux-arm-ker...@lists.infradead.org Cc: io...@lists.li

[patch V3 30/35] perf/smmuv3: Use msi_get_virq()

2021-12-10 Thread Thomas Gleixner
From: Thomas Gleixner Let the core code fiddle with the MSI descriptor retrieval. Signed-off-by: Thomas Gleixner Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jason Gunthorpe Cc: Mark Rutland Cc: Will Deacon Cc: linux-arm-ker...@lists.infradead.org --- drivers/perf/arm_smmuv3_pmu.c |5 +

[patch V3 29/35] dmaengine: mv_xor_v2: Get rid of msi_desc abuse

2021-12-10 Thread Thomas Gleixner
From: Thomas Gleixner Storing a pointer to the MSI descriptor just to keep track of the Linux interrupt number is daft. Use msi_get_virq() instead. Signed-off-by: Thomas Gleixner Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jason Gunthorpe Cc: Vinod Koul Cc: dmaeng...@vger.kernel.org --- dr

[patch V3 28/35] PCI/MSI: Simplify pci_irq_get_affinity()

2021-12-10 Thread Thomas Gleixner
From: Thomas Gleixner Replace open coded MSI descriptor chasing and use the proper accessor functions instead. Signed-off-by: Thomas Gleixner Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jason Gunthorpe --- drivers/pci/msi/msi.c | 26 ++ 1 file changed, 10 insertion

[patch V3 27/35] PCI/MSI: Use __msi_get_virq() in pci_get_vector()

2021-12-10 Thread Thomas Gleixner
From: Thomas Gleixner Use msi_get_vector() and handle the return value to be compatible. No functional change intended. Signed-off-by: Thomas Gleixner Reviewed-by: Greg Kroah-Hartman --- V2: Handle the INTx case directly instead of trying to be overly smart - Marc --- drivers/pci/msi/msi.c |

[patch V3 26/35] genirq/msi: Provide interface to retrieve Linux interrupt number

2021-12-10 Thread Thomas Gleixner
From: Thomas Gleixner This allows drivers to retrieve the Linux interrupt number instead of fiddling with MSI descriptors. msi_get_virq() returns the Linux interrupt number or 0 in case that there is no entry for the given MSI index. Signed-off-by: Thomas Gleixner Reviewed-by: Greg Kroah-Hartm

[patch V3 25/35] powerpc/pseries/msi: Let core code check for contiguous entries

2021-12-10 Thread Thomas Gleixner
From: Thomas Gleixner Set the domain info flag and remove the check. Signed-off-by: Thomas Gleixner Reviewed-by: Greg Kroah-Hartman Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: "Cédric Le Goater" Cc: linuxppc-dev@lists.ozlabs.org --- V2: Remove it completely - Cedric --- arch/power

[patch V3 24/35] PCI/MSI: Provide MSI_FLAG_MSIX_CONTIGUOUS

2021-12-10 Thread Thomas Gleixner
From: Thomas Gleixner Provide a domain info flag which makes the core code check for a contiguous MSI-X index on allocation. That's simpler than checking it at some other domain callback in architecture code. Signed-off-by: Thomas Gleixner Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jason Gun

[patch V3 23/35] PCI/MSI: Use msi_desc::msi_index

2021-12-10 Thread Thomas Gleixner
From: Thomas Gleixner The usage of msi_desc::pci::entry_nr is confusing at best. It's the index into the MSI[X] descriptor table. Use msi_desc::msi_index which is shared between all MSI incarnations instead of having a PCI specific storage for no value. Signed-off-by: Thomas Gleixner Reviewed-

[patch V3 22/35] soc: ti: ti_sci_inta_msi: Use msi_desc::msi_index

2021-12-10 Thread Thomas Gleixner
From: Thomas Gleixner Use the common msi_index member and get rid of the pointless wrapper struct. Signed-off-by: Thomas Gleixner Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jason Gunthorpe Cc: Nishanth Menon Cc: Tero Kristo Cc: Santosh Shilimkar Cc: Thomas Gleixner Cc: linux-arm-ker...@

[patch V3 21/35] bus: fsl-mc-msi: Use msi_desc::msi_index

2021-12-10 Thread Thomas Gleixner
From: Thomas Gleixner Use the common msi_index member and get rid of the pointless wrapper struct. Signed-off-by: Thomas Gleixner Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jason Gunthorpe Cc: Stuart Yoder Cc: Laurentiu Tudor --- drivers/bus/fsl-mc/fsl-mc-allocator.c |2 +- drivers/b

[patch V3 20/35] platform-msi: Use msi_desc::msi_index

2021-12-10 Thread Thomas Gleixner
From: Thomas Gleixner Use the common msi_index member and get rid of the pointless wrapper struct. Signed-off-by: Thomas Gleixner Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jason Gunthorpe --- drivers/base/platform-msi.c | 10 +- drivers/dma/qcom/hidma.c

[patch V3 19/35] genirq/msi: Consolidate MSI descriptor data

2021-12-10 Thread Thomas Gleixner
From: Thomas Gleixner All non PCI/MSI usage variants have data structures in struct msi_desc with only one member: xxx_index. PCI/MSI has a entry_nr member. Add a common msi_index member to struct msi_desc so all implementations can share it which allows further consolidation. Signed-off-by: Th

[patch V3 18/35] platform-msi: Store platform private data pointer in msi_device_data

2021-12-10 Thread Thomas Gleixner
From: Thomas Gleixner Storing the platform private data in a MSI descriptor is sloppy at best. The data belongs to the device and not to the descriptor. Add a pointer to struct msi_device_data and store the pointer there. Signed-off-by: Thomas Gleixner Reviewed-by: Greg Kroah-Hartman Reviewed-

[patch V3 17/35] platform-msi: Rename functions and clarify comments

2021-12-10 Thread Thomas Gleixner
From: Thomas Gleixner It's hard to distinguish what platform_msi_domain_alloc() and platform_msi_domain_alloc_irqs() are about. Make the distinction more explicit and add comments which explain the use cases properly. Signed-off-by: Thomas Gleixner Reviewed-by: Greg Kroah-Hartman Reviewed-by:

[patch V3 16/35] genirq/msi: Remove the original sysfs interfaces

2021-12-10 Thread Thomas Gleixner
From: Thomas Gleixner No more users. Refactor the core code accordingly and move the global interface under CONFIG_PCI_MSI_ARCH_FALLBACKS. Signed-off-by: Thomas Gleixner Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jason Gunthorpe --- include/linux/msi.h | 29 +++-

[patch V3 15/35] platform-msi: Let the core code handle sysfs groups

2021-12-10 Thread Thomas Gleixner
From: Thomas Gleixner Set the domain info flag and remove the local sysfs code. Signed-off-by: Thomas Gleixner Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jason Gunthorpe --- drivers/base/platform-msi.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) --- a/drivers/base/

[patch V3 14/35] PCI/MSI: Let the irq code handle sysfs groups

2021-12-10 Thread Thomas Gleixner
From: Thomas Gleixner Set the domain info flag which makes the core code handle sysfs groups and put an explicit invocation into the legacy code. Signed-off-by: Thomas Gleixner Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jason Gunthorpe Acked-by: Bjorn Helgaas --- drivers/pci/msi/irqdomain

[patch V3 13/35] genirq/msi: Provide msi_device_populate/destroy_sysfs()

2021-12-10 Thread Thomas Gleixner
From: Thomas Gleixner Add new allocation functions which can be activated by domain info flags. They store the groups pointer in struct msi_device_data. Signed-off-by: Thomas Gleixner Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jason Gunthorpe --- include/linux/msi.h |4 kernel/irq

[patch V3 12/35] soc: ti: ti_sci_inta_msi: Allocate MSI device data on first use

2021-12-10 Thread Thomas Gleixner
From: Thomas Gleixner Allocate the MSI device data on first invocation of the allocation function. Signed-off-by: Thomas Gleixner Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jason Gunthorpe Cc: Nishanth Menon Cc: Tero Kristo Cc: Santosh Shilimkar Cc: linux-arm-ker...@lists.infradead.org -

[patch V3 11/35] bus: fsl-mc-msi: Allocate MSI device data on first use

2021-12-10 Thread Thomas Gleixner
From: Thomas Gleixner Allocate the MSI device data on first invocation of the allocation function. Signed-off-by: Thomas Gleixner Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jason Gunthorpe Cc: Stuart Yoder Cc: Laurentiu Tudor --- drivers/bus/fsl-mc/fsl-mc-msi.c | 14 -- 1 f

[patch V3 10/35] platform-msi: Allocate MSI device data on first use

2021-12-10 Thread Thomas Gleixner
From: Thomas Gleixner Allocate the MSI device data on first invocation of the allocation function for platform MSI private data. Signed-off-by: Thomas Gleixner Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jason Gunthorpe --- drivers/base/platform-msi.c |8 +++- 1 file changed, 7 inse

[patch V3 09/35] PCI/MSI: Allocate MSI device data on first use

2021-12-10 Thread Thomas Gleixner
From: Thomas Gleixner Allocate MSI device data on first use, i.e. when a PCI driver invokes one of the PCI/MSI enablement functions. Signed-off-by: Thomas Gleixner Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jason Gunthorpe Acked-by: Bjorn Helgaas --- drivers/pci/msi/msi.c | 20 +

[patch V3 08/35] device: Add device:: Msi_data pointer and struct msi_device_data

2021-12-10 Thread Thomas Gleixner
From: Thomas Gleixner Create struct msi_device_data and add a pointer of that type to struct dev_msi_info, which is part of struct device. Provide an allocator function which can be invoked from the MSI interrupt allocation code pathes. Add a properties field to the data structure as a first mem

[patch V3 07/35] device: Move MSI related data into a struct

2021-12-10 Thread Thomas Gleixner
From: Thomas Gleixner The only unconditional part of MSI data in struct device is the irqdomain pointer. Everything else can be allocated on demand. Create a data structure and move the irqdomain pointer into it. The other MSI specific parts are going to be removed from struct device in later ste

[patch V3 06/35] powerpc/pseries/msi: Use PCI device properties

2021-12-10 Thread Thomas Gleixner
From: Thomas Gleixner instead of fiddling with MSI descriptors. Signed-off-by: Thomas Gleixner Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org --- V3: Use pci_dev->msix_enabled - Jason --- arch/powerpc/platforms/pseries/msi.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)

[patch V3 05/35] powerpc/cell/axon_msi: Use PCI device property

2021-12-10 Thread Thomas Gleixner
From: Thomas Gleixner instead of fiddling with MSI descriptors. Signed-off-by: Thomas Gleixner Cc: Arnd Bergmann Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: linuxppc-dev@lists.ozlabs.org --- V3: Use pci_dev property - Jason V2: Invoke the function with the correct number of arguments

[patch V3 04/35] genirq/msi: Use PCI device property

2021-12-10 Thread Thomas Gleixner
From: Thomas Gleixner to determine whether this is MSI or MSIX instead of consulting MSI descriptors. Signed-off-by: Thomas Gleixner --- V2: Use PCI device property - Jason --- kernel/irq/msi.c | 17 ++--- 1 file changed, 2 insertions(+), 15 deletions(-) --- a/kernel/irq/msi.c +

[patch V3 00/35] genirq/msi, PCI/MSI: Spring cleaning - Part 2

2021-12-10 Thread Thomas Gleixner
This is the second part of [PCI]MSI refactoring which aims to provide the ability of expanding MSI-X vectors after enabling MSI-X. This is based on the first part of this work which can be found here: https://lore.kernel.org/r/20211206210147.872865...@linutronix.de and has been applied to:

[patch V3 02/35] x86/pci/XEN: Use PCI device property

2021-12-10 Thread Thomas Gleixner
From: Thomas Gleixner instead of fiddling with MSI descriptors. Signed-off-by: Thomas Gleixner Cc: Juergen Gross Cc: xen-de...@lists.xenproject.org --- V3: Use pci_dev->msix_enabled. --- arch/x86/pci/xen.c |9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) --- a/arch/x86/pci/x

[patch V3 01/35] PCI/MSI: Set pci_dev::msi[x]_enabled early

2021-12-10 Thread Thomas Gleixner
There are quite some places which retrieve the first MSI descriptor to evaluate whether the setup is for MSI or MSI-X. That's required because pci_dev::msi[x]_enabled is only set when the setup completed successfully. There is no real reason why msi[x]_enabled can't be set at the beginning of the

[patch V3 03/35] x86/apic/msi: Use PCI device MSI property

2021-12-10 Thread Thomas Gleixner
From: Thomas Gleixner instead of fiddling with MSI descriptors. Signed-off-by: Thomas Gleixner --- V3: Use pci_dev->msix_enabled - Jason --- arch/x86/kernel/apic/msi.c |5 + 1 file changed, 1 insertion(+), 4 deletions(-) --- a/arch/x86/kernel/apic/msi.c +++ b/arch/x86/kernel/apic/msi.

Re: [PATCH 0/7] Cleanup after removal of configs

2021-12-10 Thread Alexandre Ghiti
On Fri, Nov 5, 2021 at 4:56 PM Arnd Bergmann wrote: > > On Fri, Nov 5, 2021 at 4:43 PM Alexandre Ghiti > wrote: > > > > While bumping from 5.13 to 5.15, I found that a few deleted configs had > > left some pieces here and there: this patchset cleans that. > > > > Alexandre Ghiti (7): > > Docume

Re: [PATCH] powerpc: Add set_memory_{p/np}() and remove set_memory_attr()

2021-12-10 Thread Maxime Bizon
On Friday 10 Dec 2021 à 08:09:42 (+), Christophe Leroy wrote: Tested-by: Maxime Bizon -- Maxime

Re: [RFC PATCH v2 0/7] Use pageblock_order for cma and alloc_contig_range alignment.

2021-12-10 Thread Zi Yan
On 10 Dec 2021, at 13:36, David Hildenbrand wrote: > On 10.12.21 00:04, Zi Yan wrote: >> From: Zi Yan >> >> Hi all, > > Hi, > > thanks for working on that! > >> >> This patchset tries to remove the MAX_ORDER - 1 alignment requirement for CMA >> and alloc_contig_range(). It prepares for my upcomin

Re: [RFC PATCH v2 0/7] Use pageblock_order for cma and alloc_contig_range alignment.

2021-12-10 Thread David Hildenbrand
On 10.12.21 00:04, Zi Yan wrote: > From: Zi Yan > > Hi all, Hi, thanks for working on that! > > This patchset tries to remove the MAX_ORDER - 1 alignment requirement for CMA > and alloc_contig_range(). It prepares for my upcoming changes to make > MAX_ORDER > adjustable at boot time[1]. > >

Re: [PATCH v4 06/10] powerpc/mm: Use generic_get_unmapped_area() and call it from arch_get_unmapped_area()

2021-12-10 Thread Christophe Leroy
Le 09/12/2021 à 10:50, Nicholas Piggin a écrit : > Excerpts from Christophe Leroy's message of December 9, 2021 3:18 am: >> Use the generic version of arch_get_unmapped_area() which >> is now available at all time instead of its copy >> radix__arch_get_unmapped_area() >> >> Instead of setting mm-

Re: [PATCH 1/2] kdump: vmcore: move copy_to() from vmcore.c to uaccess.h

2021-12-10 Thread Andrew Morton
On Fri, 10 Dec 2021 21:36:00 +0800 Tiezhu Yang wrote: > In arch/*/kernel/crash_dump*.c, there exist similar code about > copy_oldmem_page(), move copy_to() from vmcore.c to uaccess.h, > and then we can use copy_to() to simplify the related code. > > ... > > --- a/fs/proc/vmcore.c > +++ b/fs/proc

Re: [RFC PATCH v2 3/7] mm: migrate: allocate the right size of non hugetlb or THP compound pages.

2021-12-10 Thread Zi Yan
On 10 Dec 2021, at 2:53, Eric Ren wrote: > Hi, > > On 2021/12/10 07:04, Zi Yan wrote: >> From: Zi Yan >> >> alloc_migration_target() is used by alloc_contig_range() and non-LRU >> movable compound pages can be migrated. Current code does not allocate the >> right page size for such pages. Check T

Re: [RFC PATCH v2 1/7] mm: page_alloc: avoid merging non-fallbackable pageblocks with others.

2021-12-10 Thread Zi Yan
Hi Eric, Thanks for looking into my patch. On 10 Dec 2021, at 2:43, Eric Ren wrote: > Hi, > > On 2021/12/10 07:04, Zi Yan wrote: >> From: Zi Yan >> >> This is done in addition to MIGRATE_ISOLATE pageblock merge avoidance. >> It prepares for the upcoming removal of the MAX_ORDER-1 alignment >> r

Re: [RFC PATCH v2 0/7] Use pageblock_order for cma and alloc_contig_range alignment.

2021-12-10 Thread Zi Yan
On 10 Dec 2021, at 2:30, Eric Ren wrote: > Hi Zi Yan, > > On 2021/12/10 07:04, Zi Yan wrote: >> From: Zi Yan >> >> Hi all, >> >> This patchset tries to remove the MAX_ORDER - 1 alignment requirement for CMA >> and alloc_contig_range(). It prepares for my upcoming changes to make >> MAX_ORDER >>

Re: [PATCH v5 08/12] KVM: Reinstate gfn_to_pfn_cache with invalidation support

2021-12-10 Thread David Woodhouse
On Fri, 2021-12-10 at 15:53 +0100, Paolo Bonzini wrote: > On 12/10/21 13:25, David Woodhouse wrote: > > On Thu, 2021-12-09 at 23:34 +0100, Paolo Bonzini wrote: > > > Compared to the review it's missing this hunk: > > > > > > @@ -265,7 +265,7 @@ void kvm_gfn_to_pfn_cache_unmap(struct kvm *kvm, > >

Re: [PATCH v5 08/12] KVM: Reinstate gfn_to_pfn_cache with invalidation support

2021-12-10 Thread Paolo Bonzini
On 12/10/21 13:25, David Woodhouse wrote: On Thu, 2021-12-09 at 23:34 +0100, Paolo Bonzini wrote: Compared to the review it's missing this hunk: @@ -265,7 +265,7 @@ void kvm_gfn_to_pfn_cache_unmap(struct kvm *kvm, struct gfn_to_pfn_cache *gpc) gpc->valid = false; - old_khva =

[PATCH 1/2] kdump: vmcore: move copy_to() from vmcore.c to uaccess.h

2021-12-10 Thread Tiezhu Yang
In arch/*/kernel/crash_dump*.c, there exist similar code about copy_oldmem_page(), move copy_to() from vmcore.c to uaccess.h, and then we can use copy_to() to simplify the related code. Signed-off-by: Tiezhu Yang --- fs/proc/vmcore.c| 14 -- include/linux/uaccess.h | 14 +

[PATCH 0/2] kdump: simplify code

2021-12-10 Thread Tiezhu Yang
Tiezhu Yang (2): kdump: vmcore: move copy_to() from vmcore.c to uaccess.h kdump: crashdump: use copy_to() to simplify the related code arch/arm/kernel/crash_dump.c | 10 ++ arch/arm64/kernel/crash_dump.c | 10 ++ arch/ia64/kernel/crash_dump.c| 10 -- arch/mip

[PATCH 2/2] kdump: crashdump: use copy_to() to simplify the related code

2021-12-10 Thread Tiezhu Yang
Use copy_to() to simplify the related code about copy_oldmem_page() in arch/*/kernel/crash_dump*.c files. Signed-off-by: Tiezhu Yang --- arch/arm/kernel/crash_dump.c | 10 ++ arch/arm64/kernel/crash_dump.c | 10 ++ arch/ia64/kernel/crash_dump.c| 10 -- arch/mips

Re: [PATCH v5 08/12] KVM: Reinstate gfn_to_pfn_cache with invalidation support

2021-12-10 Thread David Woodhouse
On Thu, 2021-12-09 at 23:34 +0100, Paolo Bonzini wrote: > > Compared to the review it's missing this hunk: > > @@ -265,7 +265,7 @@ void kvm_gfn_to_pfn_cache_unmap(struct kvm *kvm, struct > gfn_to_pfn_cache *gpc) > > gpc->valid = false; > > - old_khva = gpc->khva; > + old

Re: [PATCH 0/4] perf: Add new macros for mem_hops field

2021-12-10 Thread Peter Zijlstra
On Fri, Dec 10, 2021 at 05:35:41PM +1100, Michael Ellerman wrote: > Arnaldo Carvalho de Melo writes: > > Em Mon, Dec 06, 2021 at 02:47:45PM +0530, Kajol Jain escreveu: > >> Patchset adds new macros for mem_hops field which can be > >> used to represent remote-node, socket and board level details.

Re: [PATCH 1/4] perf: Add new macros for mem_hops field

2021-12-10 Thread Peter Zijlstra
On Mon, Dec 06, 2021 at 02:47:46PM +0530, Kajol Jain wrote: > Add new macros for mem_hops field which can be used to > represent remote-node, socket and board level details. > > Currently the code had macro for HOPS_0, which corresponds > to data coming from another core but same node. > Add new m

[PATCH] powermac: low_i2c: Add missing of_node_put for loop iteration

2021-12-10 Thread Qing Wang
From: Wang Qing for_each_available_child_of_node() should decrement the node reference counter. Reported by Coccinelle: arch/powerpc/platforms/powermac/low_i2c.c:916:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before return. Signed-off-by: Wang Qing --- arch/p

[PATCH] powerpc: Add set_memory_{p/np}() and remove set_memory_attr()

2021-12-10 Thread Christophe Leroy
set_memory_attr() was implemented by commit 4d1755b6a762 ("powerpc/mm: implement set_memory_attr()") because the set_memory_xx() couldn't be used at that time to modify memory "on the fly" as explained it the commit. But set_memory_attr() uses set_pte_at() which leads to warnings when CONFIG_DEBUG