From: Mahesh Salgaonkar
[ Upstream commit 0db880fc865ffb522141ced4bfa66c12ab1fbb70 ]
nmi_enter()/nmi_exit() touches per cpu variables which can lead to kernel
crash when invoked during real mode interrupt handling (e.g. early HMI/MCE
interrupt handler) if percpu allocation comes from vmalloc are
Hi Oliver,
On Tue, 6 Aug 2024 at 00:26, Oliver Upton wrote:
>
> [+cc Fuad]
>
> Fuad, you mentioned in commit 9c30fc615daa ("KVM: arm64: Move setting
> the page as dirty out of the critical section") that restructuring
> around the MMU lock was helpful for reuse (presumably for pKVM), but I
> lack
On Tue, 06 Aug 2024 00:26:54 +0100,
Oliver Upton wrote:
>
> On Mon, Aug 05, 2024 at 11:26:03PM +, Oliver Upton wrote:
> > [+cc Fuad]
>
> Take 2!
>
> > Fuad, you mentioned in commit 9c30fc615daa ("KVM: arm64: Move setting
> > the page as dirty out of the critical section") that restructuring
From: Yicong Yang
On building the topology from the devicetree, we've already
gotten the SMT thread number of each core. Update the largest
SMT thread number to enable the SMT control.
Signed-off-by: Yicong Yang
---
drivers/base/arch_topology.c | 13 +
1 file changed, 13 insertions
From: Yicong Yang
The core CPU control framework supports runtime SMT control which
is not yet supported on arm64. Besides the general vulnerabilities
concerns we want this runtime control on our arm64 server for:
- better single CPU performance in some cases
- saving overall power consumption
From: Yicong Yang
For ACPI we'll build the topology from PPTT and we cannot directly
get the SMT number of each core. Instead using a temporary xarray
to record the SMT number of each core when building the topology
and we can know the largest SMT number in the system. Then we can
enable the supp
From: Yicong Yang
Currently if architectures want to support HOTPLUG_SMT they need to
provide a topology_is_primary_thread() telling the framework which
thread in the SMT cannot offline. However arm64 doesn't have a
restriction on which thread in the SMT cannot offline, a simplest
choice is that
From: Yicong Yang
Enable HOTPLUG_SMT for SMT control.
Signed-off-by: Yicong Yang
---
arch/arm64/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index a2f8ff354ca6..bd3bc2f5e0ec 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -238,
On Thu, Jul 25, 2024 at 04:44:13PM +0100, Dave Martin wrote:
> Hi,
>
> On Fri, May 03, 2024 at 02:01:22PM +0100, Joey Gouly wrote:
> > Allow EL0 or EL1 to access POR_EL0 without being trapped to EL2.
> >
> > Signed-off-by: Joey Gouly
> > Cc: Catalin Marinas
> > Cc: Will Deacon
> > Acked-by: Ca
On Thu, Aug 01, 2024 at 05:22:45PM +0100, Dave Martin wrote:
> On Thu, Aug 01, 2024 at 04:54:41PM +0100, Joey Gouly wrote:
> > On Thu, Jul 25, 2024 at 05:00:18PM +0100, Dave Martin wrote:
> > > Hi,
> > >
> > > On Fri, May 03, 2024 at 02:01:36PM +0100, Joey Gouly wrote:
> > > > Add PKEY support to
Add Sample Rate Converter(SRC) codec support, define the output
format and rate for SRC.
Signed-off-by: Shengjiu Wang
---
include/uapi/sound/compress_offload.h | 2 ++
include/uapi/sound/compress_params.h | 9 -
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/include/uapi
This function is base on the accelerator implementation
for compress API:
https://patchwork.kernel.org/project/alsa-devel/patch/20240731083843.59911-1-pe...@perex.cz/
Audio signal processing also has the requirement for memory to
memory similar as Video.
This asrc memory to memory (memory ->asrc-
ASRC can be used on memory to memory case, define several
functions for m2m usage.
m2m_prepare: prepare for the start step
m2m_start: the start step
m2m_unprepare: unprepare for stop step, optional
m2m_stop: stop step
m2m_check_format: check format is supported or not
m2m_calc_out_len: calculate o
ASRC can be used on memory to memory case, define several
functions for m2m usage and export them as function pointer.
Signed-off-by: Shengjiu Wang
---
sound/soc/fsl/fsl_easrc.c | 226 ++
sound/soc/fsl/fsl_easrc.h | 4 +
2 files changed, 230 insertions(+)
d
Implement the ASRC memory to memory function using
the compress framework, user can use this function with
compress ioctl interface.
This feature can be shared by ASRC and EASRC drivers
Signed-off-by: Shengjiu Wang
---
sound/soc/fsl/Kconfig | 1 +
sound/soc/fsl/Makefile |
Register m2m platform device, that user can
use M2M feature.
Signed-off-by: Shengjiu Wang
---
sound/soc/fsl/fsl_asrc.c | 37 +
1 file changed, 33 insertions(+), 4 deletions(-)
diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c
index 01e3af5b1bea
Register m2m platform device,that user can
use M2M feature.
Signed-off-by: Shengjiu Wang
---
sound/soc/fsl/fsl_easrc.c | 33 +++--
1 file changed, 31 insertions(+), 2 deletions(-)
diff --git a/sound/soc/fsl/fsl_easrc.c b/sound/soc/fsl/fsl_easrc.c
index 959a8e2dd716..
commit 0db880fc865f ("powerpc: Avoid nmi_enter/nmi_exit in real mode
interrupt.") has a config comment typo, fix it.
Signed-off-by: Jinjie Ruan
---
arch/powerpc/include/asm/percpu.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/include/asm/percpu.h
b/arch/powe
On 8/6/24 12:26, Shengjiu Wang wrote:
> Add Sample Rate Converter(SRC) codec support, define the output
> format and rate for SRC.
>
> Signed-off-by: Shengjiu Wang
> ---
> include/uapi/sound/compress_offload.h | 2 ++
> include/uapi/sound/compress_params.h | 9 -
> 2 files changed, 1
All-
"The sample rate converter is not an encoder ..."
Indeed, an encoder creates a compressed bitstream from audio data
(typically linear PCM samples), normally for transmission of some
type. A sample rate converter generates audio data from audio data,
and is normally applied prior to an
Le 06/08/2024 à 13:23, Jinjie Ruan a écrit :
[Vous ne recevez pas souvent de courriers de ruanjin...@huawei.com. Découvrez
pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ]
commit 0db880fc865f ("powerpc: Avoid nmi_enter/nmi_exit in real mode
interrupt.") has a con
On 2024/8/6 20:50, Christophe Leroy wrote:
>
>
> Le 06/08/2024 à 13:23, Jinjie Ruan a écrit :
>> [Vous ne recevez pas souvent de courriers de ruanjin...@huawei.com.
>> Découvrez pourquoi ceci est important à
>> https://aka.ms/LearnAboutSenderIdentification ]
>>
>> commit 0db880fc865f ("powerpc
Right.
I don't have a reason to change numa_pte_updates semantics yet so far, but
here there's the problem where numa_huge_pte_updates can be ambiguous when
there is even PUD involved.
In general, I don't know how I should treat this counter in PUD path even
if NUMA isn't involved in dax yet; it
On 01.08.24 08:08, Mike Rapoport wrote:
From: "Mike Rapoport (Microsoft)"
sgi-ip27 is the only system that defines NODE_DATA() differently than
the rest of NUMA machines.
Add node_data array of struct pglist pointers that will point to
__node_data[node]->pglist and redefine NODE_DATA() to use
On 01.08.24 08:08, Mike Rapoport wrote:
From: "Mike Rapoport (Microsoft)"
For SGI IP27 machines node_possible_map is statically set to
NODE_MASK_ALL and it is not updated during NUMA initialization.
Ensure that it only contains nodes present in the system.
Signed-off-by: Mike Rapoport (Micros
On 01.08.24 08:08, Mike Rapoport wrote:
From: "Mike Rapoport (Microsoft)"
Commit f8f9f21c7848 ("MIPS: Fix build error for loongson64 and
sgi-ip27") added HAVE_ARCH_NODEDATA_EXTENSION to sgi-ip27 to silence a
compilation error that happened because sgi-ip27 didn't define array of
pg_data_t as no
On 01.08.24 08:08, Mike Rapoport wrote:
From: "Mike Rapoport (Microsoft)"
Commit f8f9f21c7848 ("MIPS: Fix build error for loongson64 and
sgi-ip27") added HAVE_ARCH_NODEDATA_EXTENSION to loongson64 to silence a
compilation error that happened because loongson64 didn't define array
of pg_data_t a
On 01.08.24 08:08, Mike Rapoport wrote:
From: "Mike Rapoport (Microsoft)"
Allocation of numa_distance uses memblock_phys_alloc_range() to limit
allocation to be below the last mapped page.
But NUMA initializaition runs after the direct map is populated and
there is also code in setup_arch() th
On 01.08.24 08:08, Mike Rapoport wrote:
From: "Mike Rapoport (Microsoft)"
Instead of looping over numa_meminfo array to detect node's start and
end addresses use get_pfn_range_for_init().
This is shorter and make it easier to lift numa_memblks to generic code.
Signed-off-by: Mike Rapoport (Mi
On 01.08.24 08:08, Mike Rapoport wrote:
From: "Mike Rapoport (Microsoft)"
The definitions of FAKE_NODE_MIN_SIZE and FAKE_NODE_MIN_HASH_MASK are
only used by numa emulation code, make them local to
arch/x86/mm/numa_emulation.c
Signed-off-by: Mike Rapoport (Microsoft)
Reviewed-by: Jonathan Came
On 01.08.24 08:08, Mike Rapoport wrote:
From: "Mike Rapoport (Microsoft)"
By the time numa_emulation() is called, all physical memory is already
mapped in the direct map and there is no need to define limits for
memblock allocation.
Replace memblock_phys_alloc_range() with memblock_alloc().
S
On 01.08.24 08:08, Mike Rapoport wrote:
From: "Mike Rapoport (Microsoft)"
This is required to make numa emulation code architecture independent so
that it can be moved to generic code in following commits.
Signed-off-by: Mike Rapoport (Microsoft)
Reviewed-by: Jonathan Cameron
Tested-by: Zi Y
On 01.08.24 08:08, Mike Rapoport wrote:
From: "Mike Rapoport (Microsoft)"
This is required to make numa emulation code architecture independent so
that it can be moved to generic code in following commits.
Signed-off-by: Mike Rapoport (Microsoft)
Reviewed-by: Jonathan Cameron
Tested-by: Zi Y
On 01.08.24 08:08, Mike Rapoport wrote:
From: "Mike Rapoport (Microsoft)"
CPU id cannot be negative.
Making it unsigned also aligns with declarations in
include/asm-generic/numa.h used by arm64 and riscv and allows sharing
numa emulation code with these architectures.
Signed-off-by: Mike Rapo
On 01.08.24 08:08, Mike Rapoport wrote:
From: "Mike Rapoport (Microsoft)"
Move code dealing with numa_memblks from arch/x86 to mm/ and add Kconfig
options to let x86 select it in its Kconfig.
This code will be later reused by arch_numa.
No functional changes.
Signed-off-by: Mike Rapoport (Mi
On 01.08.24 08:08, Mike Rapoport wrote:
From: "Mike Rapoport (Microsoft)"
Move code dealing with numa_distance array from arch/x86 to
mm/numa_memblks.c
This code will be later reused by arch_numa.
No functional changes.
Signed-off-by: Mike Rapoport (Microsoft)
Tested-by: Zi Yan # for x86_6
On 05.08.24 22:09, Dan Williams wrote:
Mike Rapoport wrote:
From: "Mike Rapoport (Microsoft)"
Move numa_emulation codfrom arch/x86 to mm/numa_emulation.c
s/codfrom/code from/
I am surprised that numa-emulation stayed x86 only for so long. I think
it is useful facility for debugging NUMA sca
On 01.08.24 08:08, Mike Rapoport wrote:
From: "Mike Rapoport (Microsoft)"
Move numa_emulation codfrom arch/x86 to mm/numa_emulation.c
This code will be later reused by arch_numa.
I'm confused why documentation lists for "numa=fake="
[KNL, ARM64, RISCV, X86, EARLY]
--
Cheers,
David / dhil
On 01.08.24 08:08, Mike Rapoport wrote:
From: "Mike Rapoport (Microsoft)"
Move most of x86::numa_init() to numa_memblks so that the latter will be
more self-contained.
With this numa_memblk data structures should not be exposed to the
architecture specific code.
Signed-off-by: Mike Rapoport (
On 01.08.24 08:08, Mike Rapoport wrote:
From: "Mike Rapoport (Microsoft)"
Make functions and variables that are exclusively used by numa_memblks
static.
Move numa_nodemask_from_meminfo() before its callers to avoid forward
declaration.
Signed-off-by: Mike Rapoport (Microsoft)
Tested-by: Zi Y
On 01.08.24 08:08, Mike Rapoport wrote:
From: "Mike Rapoport (Microsoft)"
numa_cleanup_meminfo() moves blocks outside system RAM to
numa_reserved_meminfo and it uses 0 and PFN_PHYS(max_pfn) to determine
the memory boundaries.
Replace the memory range boundaries with more portable
memblock_star
On 01.08.24 08:08, Mike Rapoport wrote:
From: "Mike Rapoport (Microsoft)"
Currently of_numa_parse_memory_nodes() returns 0 if no "memory" node in
device tree contains "numa-node-id" property. This makes of_numa_init()
to return "success" despite no NUMA nodes were actually parsed and set
up.
a
On 06.08.24 15:20, David Hildenbrand wrote:
On 01.08.24 08:08, Mike Rapoport wrote:
From: "Mike Rapoport (Microsoft)"
Move numa_emulation codfrom arch/x86 to mm/numa_emulation.c
This code will be later reused by arch_numa.
I'm confused why documentation lists for "numa=fake="
[KNL, ARM64,
On 01.08.24 08:08, Mike Rapoport wrote:
From: "Mike Rapoport (Microsoft)"
NUMA emulation can be now enabled on arm64 and riscv in addition to x86.
Move description of numa=fake parameters from x86 documentation of
admin-guide/kernel-parameters.txt
Suggested-by: Zi Yan
Signed-off-by: Mike Rap
On 01.08.24 08:08, Mike Rapoport wrote:
From: "Mike Rapoport (Microsoft)"
The x86 implementation of range-to-target_node lookup (i.e.
phys_to_target_node() and memory_add_physaddr_to_nid()) relies on
numa_memblks.
Since numa_memblks are now part of the generic code, move these
functions from x
On 01.08.24 08:08, Mike Rapoport wrote:
From: "Mike Rapoport (Microsoft)"
Until now arch_numa was directly translating firmware NUMA information
to memblock.
Using numa_memblks as an intermediate step has a few advantages:
* alignment with more battle tested x86 implementation
* availability o
Hi,
On Thu, Aug 01, 2024 at 05:01:10PM +0100, Joey Gouly wrote:
> On Thu, Jul 25, 2024 at 04:57:09PM +0100, Dave Martin wrote:
> > On Fri, May 03, 2024 at 02:01:33PM +0100, Joey Gouly wrote:
> > > If a memory fault occurs that is due to an overlay/pkey fault, report
> > > that to
> > > userspace
On Tue, Aug 06, 2024 at 02:33:37PM +0100, Dave Martin wrote:
> Hi,
>
> On Thu, Aug 01, 2024 at 05:01:10PM +0100, Joey Gouly wrote:
> > On Thu, Jul 25, 2024 at 04:57:09PM +0100, Dave Martin wrote:
> > > On Fri, May 03, 2024 at 02:01:33PM +0100, Joey Gouly wrote:
> > > > If a memory fault occurs tha
On Tue, Aug 06, 2024 at 11:35:32AM +0100, Joey Gouly wrote:
> On Thu, Aug 01, 2024 at 05:22:45PM +0100, Dave Martin wrote:
> > On Thu, Aug 01, 2024 at 04:54:41PM +0100, Joey Gouly wrote:
> > > On Thu, Jul 25, 2024 at 05:00:18PM +0100, Dave Martin wrote:
> > > > Hi,
> > > >
> > > > On Fri, May 03,
Hi,
On Tue, Aug 06, 2024 at 02:43:57PM +0100, Joey Gouly wrote:
> On Tue, Aug 06, 2024 at 02:33:37PM +0100, Dave Martin wrote:
> > Hi,
> >
> > On Thu, Aug 01, 2024 at 05:01:10PM +0100, Joey Gouly wrote:
> > > On Thu, Jul 25, 2024 at 04:57:09PM +0100, Dave Martin wrote:
> > > > On Fri, May 03, 202
On Tue, Aug 06, 2024 at 03:31:03PM +0100, Joey Gouly wrote:
> On Tue, Aug 06, 2024 at 11:35:32AM +0100, Joey Gouly wrote:
> > On Thu, Aug 01, 2024 at 05:22:45PM +0100, Dave Martin wrote:
> > > On Thu, Aug 01, 2024 at 04:54:41PM +0100, Joey Gouly wrote:
> > > > On Thu, Jul 25, 2024 at 05:00:18PM +01
On Sat, Jul 27, 2024 at 5:24 AM Sean Christopherson wrote:
>
> Don't mark pages dirty if KVM bails from the page fault handler without
> installing a stage-2 mapping, i.e. if the page is guaranteed to not be
> written by the guest.
>
> In addition to being a (very) minor fix, this paves the way fo
On Sat, Jul 27, 2024 at 5:24 AM Sean Christopherson wrote:
>
> Mark pages accessed before dropping mmu_lock when faulting in guest memory
> so that RISC-V can convert to kvm_release_faultin_page() without tripping
> its lockdep assertion on mmu_lock being held. Marking pages accessed
> outside of
On Sat, Jul 27, 2024 at 5:24 AM Sean Christopherson wrote:
>
> Convert RISC-V to __kvm_faultin_pfn()+kvm_release_faultin_page(), which
> are new APIs to consolidate arch code and provide consistent behavior
> across all KVM architectures.
>
> Signed-off-by: Sean Christopherson
For KVM RISC-V:
Ac
On Tue, Aug 06, 2024, Marc Zyngier wrote:
> On Tue, 06 Aug 2024 00:26:54 +0100,
> Oliver Upton wrote:
> >
> > On Mon, Aug 05, 2024 at 11:26:03PM +, Oliver Upton wrote:
> > > [+cc Fuad]
> >
> > Take 2!
> >
> > > Fuad, you mentioned in commit 9c30fc615daa ("KVM: arm64: Move setting
> > > the
Add compatible string, fsl,ls1088a-isc, fsl,ls2080a-isc, fsl,lx2160a-isc.
Fix the below warning:
arch/arm64/boot/dts/freescale/fsl-ls2080a-qds.dtb: /soc/syscon@1f7: failed
to match any schema with compatible: ['fsl,ls2080a-isc', 'syscon']
Signed-off-by: Frank Li
---
Change from v1 to v2
- fi
On Tue, Aug 06, 2024 at 03:02:00PM +0200, David Hildenbrand wrote:
> > Right.
> >
> > I don't have a reason to change numa_pte_updates semantics yet so far, but
> > here there's the problem where numa_huge_pte_updates can be ambiguous when
> > there is even PUD involved.
> >
> > In general, I don
On 06.08.24 18:26, Peter Xu wrote:
On Tue, Aug 06, 2024 at 03:02:00PM +0200, David Hildenbrand wrote:
Right.
I don't have a reason to change numa_pte_updates semantics yet so far, but
here there's the problem where numa_huge_pte_updates can be ambiguous when
there is even PUD involved.
In gene
On Tue, Aug 06, 2024 at 06:32:10PM +0200, David Hildenbrand wrote:
> On 06.08.24 18:26, Peter Xu wrote:
> > On Tue, Aug 06, 2024 at 03:02:00PM +0200, David Hildenbrand wrote:
> > > > Right.
> > > >
> > > > I don't have a reason to change numa_pte_updates semantics yet so far,
> > > > but
> > > >
On Fri, 02 Aug 2024 11:22:19 -0400, Frank Li wrote:
> Convert dt-binding rcpm from txt to yaml format.
> Add fsl,ls1028a-rcpm compatible string.
>
> Additional changes:
> - Add missed compatible string fsl,-rcpm.
> - Remove map fsl,-rcpm to fsl,qoriq-rcpm-.
>
> Signed-off-by: Frank Li
> ---
>
On Tue, 06 Aug 2024 12:21:21 -0400, Frank Li wrote:
> Add compatible string, fsl,ls1088a-isc, fsl,ls2080a-isc, fsl,lx2160a-isc.
> Fix the below warning:
> arch/arm64/boot/dts/freescale/fsl-ls2080a-qds.dtb: /soc/syscon@1f7:
> failed to match any schema with compatible: ['fsl,ls2080a-isc', 'sy
Fabio M. De Francesco wrote:
> In extlog_print(), trace "Non-standard Section Body" reported by firmware
> to the OS via Common Platform Error Record (CPER) (UEFI v2.10 Appendix N
> 2.3) to add further debug information and so to make ELOG log
> consistently with ghes_do_proc() (GHES).
I think thi
On Mon, Aug 05, 2024 at 06:06:59PM -0600, Matthew W Carlis wrote:
> Hello again. I just realized that my first response to this thread two weeks
> ago was not actually starting from the end of the discussion. I hope I found
> it now... Must say sorry for this I am still figuring out how to follow t
Fabio M. De Francesco wrote:
> Currently, extlog_print() (ELOG) only reports CPER PCIe section (UEFI
> v2.10, Appendix N.2.7) to the kernel log via print_extlog_rcd().
I think the critical detail is is that print_extlog_rcd() is only
triggered when ras_userspace_consumers() returns true. The obser
On Sat, Aug 03, 2024 at 12:03:25AM +0530, Amit Machhiwal wrote:
> With CONFIG_PCI_DYNAMIC_OF_NODES [1], a hot-plug and hot-unplug sequence
> of a PCI device attached to a PCI-bridge causes following kernel Oops on
> a pseries KVM guest:
What is unique about pseries here? There's nothing specific
Hi,
On Fri, 2019-12-13 at 08:47 +0100, Romain Dolbeau wrote:
> Le jeu. 12 déc. 2019 à 22:40, Andreas Schwab a écrit :
> > I'm using 4K pages, in case that matters
>
> Yes it does matter, as it seems to be the difference between "working"
> and "not working" :-)
> Thank you for the config & point
On Mon, May 27, 2024 at 04:43:40PM +0200, Fabio M. De Francesco wrote:
> In extlog_print(), trace "Non-standard Section Body" reported by firmware
> to the OS via Common Platform Error Record (CPER) (UEFI v2.10 Appendix N
> 2.3) to add further debug information and so to make ELOG log
> consistentl
Adds a new format for MODVERSIONS which stores each field in a separate
ELF section. This initially adds support for variable length names, but
could later be used to add additional fields to MODVERSIONS in a
backwards compatible way if needed. Any new fields will be ignored by
old user tooling, un
On Mon, May 27, 2024 at 04:43:41PM +0200, Fabio M. De Francesco wrote:
> Currently, extlog_print() (ELOG) only reports CPER PCIe section (UEFI
> v2.10, Appendix N.2.7) to the kernel log via print_extlog_rcd(). Instead,
> the similar ghes_do_proc() (GHES) prints to kernel log and calls
> pci_print_a
It is more logical to update the stat before the page is freed, to avoid
use after free scenarios.
Fixes: 15995a352474 ("mm: report per-page metadata information")
Signed-off-by: Pasha Tatashin
---
mm/hugetlb_vmemmap.c | 4 ++--
mm/page_ext.c| 8
2 files changed, 6 insertions(+)
nid is needed during memory hot-remove in order to account the
information about the memmap overhead that is being removed.
In addition, we cannot use page_pgdat(pfn_to_page(pfn)) during
hotremove after remove_pfn_range_from_zone().
We also cannot determine nid from walking through memblocks afte
commit 0db880fc865f ("powerpc: Avoid nmi_enter/nmi_exit in real mode
interrupt.") has a config comment typo, and the #if/#else/#endif section
is small and doesn't nest additional #ifdefs so the comment is useless
and should be removed completely.
Signed-off-by: Jinjie Ruan
Suggested-by: Christoph
Le 04/08/2024 à 13:20, Uwe Kleine-König a écrit :
This driver doesn't use the driver_data member of struct i2c_device_id,
so don't explicitly initialize this member.
Well, even if the member was used, a 0 init is useless because as soon
as you initialise one field of the struct, the compile
From: "Mike Rapoport (Microsoft)"
Hi,
Following the discussion about handling of CXL fixed memory windows on
arm64 [1] I decided to bite the bullet and move numa_memblks from x86 to
the generic code so they will be available on arm64/riscv and maybe on
loongarch sometime later.
While it could b
From: "Mike Rapoport (Microsoft)"
The stub functions in kernel/numa.c belong to mm/ rather than to kernel/
Signed-off-by: Mike Rapoport (Microsoft)
Acked-by: David Hildenbrand
Reviewed-by: Jonathan Cameron
Tested-by: Zi Yan # for x86_64 and arm64
Tested-by: Jonathan Cameron [arm64 + CXL via
From: "Mike Rapoport (Microsoft)"
sgi-ip27 is the only system that defines NODE_DATA() differently than
the rest of NUMA machines.
Add node_data array of struct pglist pointers that will point to
__node_data[node]->pglist and redefine NODE_DATA() to use node_data
array.
This will allow pulling
From: "Mike Rapoport (Microsoft)"
For SGI IP27 machines node_possible_map is statically set to
NODE_MASK_ALL and it is not updated during NUMA initialization.
Ensure that it only contains nodes present in the system.
Signed-off-by: Mike Rapoport (Microsoft)
Reviewed-by: Jonathan Cameron
Teste
From: "Mike Rapoport (Microsoft)"
Commit f8f9f21c7848 ("MIPS: Fix build error for loongson64 and
sgi-ip27") added HAVE_ARCH_NODEDATA_EXTENSION to sgi-ip27 to silence a
compilation error that happened because sgi-ip27 didn't define array of
pg_data_t as node_data like most other architectures did.
From: "Mike Rapoport (Microsoft)"
Make definition of node_data match other architectures.
This will allow pulling declaration of node_data to the generic mm code in
the following commit.
Signed-off-by: Mike Rapoport (Microsoft)
Reviewed-by: Jiaxun Yang
Reviewed-by: David Hildenbrand
Reviewed-
From: "Mike Rapoport (Microsoft)"
Commit f8f9f21c7848 ("MIPS: Fix build error for loongson64 and
sgi-ip27") added HAVE_ARCH_NODEDATA_EXTENSION to loongson64 to silence a
compilation error that happened because loongson64 didn't define array
of pg_data_t as node_data like most other architectures
From: "Mike Rapoport (Microsoft)"
Every architecture that supports NUMA defines node_data in the same way:
struct pglist_data *node_data[MAX_NUMNODES];
No reason to keep multiple copies of this definition and its forward
declarations, especially when such forward declaration is the only
From: "Mike Rapoport (Microsoft)"
There are no users of HAVE_ARCH_NODEDATA_EXTENSION left, so
arch_alloc_nodedata() and arch_refresh_nodedata() are not needed
anymore.
Replace the call to arch_alloc_nodedata() in free_area_init() with a
new helper alloc_offline_node_data(), remove arch_refresh_n
From: "Mike Rapoport (Microsoft)"
Architectures that support NUMA duplicate the code that allocates
NODE_DATA on the node-local memory with slight variations in reporting
of the addresses where the memory was allocated.
Use x86 version as the basis for the generic alloc_node_data() function
and
From: "Mike Rapoport (Microsoft)"
Allocation of numa_distance uses memblock_phys_alloc_range() to limit
allocation to be below the last mapped page.
But NUMA initializaition runs after the direct map is populated and
there is also code in setup_arch() that adjusts memblock limit to
reflect how m
From: "Mike Rapoport (Microsoft)"
Instead of looping over numa_meminfo array to detect node's start and
end addresses use get_pfn_range_for_init().
This is shorter and make it easier to lift numa_memblks to generic code.
Signed-off-by: Mike Rapoport (Microsoft)
Tested-by: Zi Yan # for x86_64
From: "Mike Rapoport (Microsoft)"
The definitions of FAKE_NODE_MIN_SIZE and FAKE_NODE_MIN_HASH_MASK are
only used by numa emulation code, make them local to
arch/x86/mm/numa_emulation.c
Signed-off-by: Mike Rapoport (Microsoft)
Reviewed-by: Jonathan Cameron
Tested-by: Zi Yan # for x86_64 and a
From: "Mike Rapoport (Microsoft)"
By the time numa_emulation() is called, all physical memory is already
mapped in the direct map and there is no need to define limits for
memblock allocation.
Replace memblock_phys_alloc_range() with memblock_alloc().
Signed-off-by: Mike Rapoport (Microsoft)
R
From: "Mike Rapoport (Microsoft)"
This is required to make numa emulation code architecture independent so
that it can be moved to generic code in following commits.
Signed-off-by: Mike Rapoport (Microsoft)
Reviewed-by: Jonathan Cameron
Tested-by: Zi Yan # for x86_64 and arm64
Tested-by: Jona
From: "Mike Rapoport (Microsoft)"
This is required to make numa emulation code architecture independent so
that it can be moved to generic code in following commits.
Signed-off-by: Mike Rapoport (Microsoft)
Reviewed-by: Jonathan Cameron
Tested-by: Zi Yan # for x86_64 and arm64
Tested-by: Jona
From: "Mike Rapoport (Microsoft)"
CPU id cannot be negative.
Making it unsigned also aligns with declarations in
include/asm-generic/numa.h used by arm64 and riscv and allows sharing
numa emulation code with these architectures.
Signed-off-by: Mike Rapoport (Microsoft)
Reviewed-by: Jonathan Ca
From: "Mike Rapoport (Microsoft)"
Move code dealing with numa_memblks from arch/x86 to mm/ and add Kconfig
options to let x86 select it in its Kconfig.
This code will be later reused by arch_numa.
No functional changes.
Signed-off-by: Mike Rapoport (Microsoft)
Tested-by: Zi Yan # for x86_64
From: "Mike Rapoport (Microsoft)"
Move code dealing with numa_distance array from arch/x86 to
mm/numa_memblks.c
This code will be later reused by arch_numa.
No functional changes.
Signed-off-by: Mike Rapoport (Microsoft)
Tested-by: Zi Yan # for x86_64 and arm64
Reviewed-by: Jonathan Cameron
From: "Mike Rapoport (Microsoft)"
Move numa_emulation code from arch/x86 to mm/numa_emulation.c
This code will be later reused by arch_numa.
No functional changes.
Signed-off-by: Mike Rapoport (Microsoft)
Tested-by: Zi Yan # for x86_64 and arm64
Reviewed-by: Jonathan Cameron
Tested-by: Jona
From: "Mike Rapoport (Microsoft)"
Move most of x86::numa_init() to numa_memblks so that the latter will be
more self-contained.
With this numa_memblk data structures should not be exposed to the
architecture specific code.
Signed-off-by: Mike Rapoport (Microsoft)
Tested-by: Zi Yan # for x86_6
From: "Mike Rapoport (Microsoft)"
Make functions and variables that are exclusively used by numa_memblks
static.
Move numa_nodemask_from_meminfo() before its callers to avoid forward
declaration.
Signed-off-by: Mike Rapoport (Microsoft)
Tested-by: Zi Yan # for x86_64 and arm64
Reviewed-by: Jo
From: "Mike Rapoport (Microsoft)"
numa_cleanup_meminfo() moves blocks outside system RAM to
numa_reserved_meminfo and it uses 0 and PFN_PHYS(max_pfn) to determine
the memory boundaries.
Replace the memory range boundaries with more portable
memblock_start_of_DRAM() and memblock_end_of_DRAM().
S
From: "Mike Rapoport (Microsoft)"
Currently of_numa_parse_memory_nodes() returns 0 if no "memory" node in
device tree contains "numa-node-id" property. This makes of_numa_init()
to return "success" despite no NUMA nodes were actually parsed and set
up.
arch_numa workarounds this by returning an
From: "Mike Rapoport (Microsoft)"
Until now arch_numa was directly translating firmware NUMA information
to memblock.
Using numa_memblks as an intermediate step has a few advantages:
* alignment with more battle tested x86 implementation
* availability of NUMA emulation
* maintaining node inform
From: "Mike Rapoport (Microsoft)"
The x86 implementation of range-to-target_node lookup (i.e.
phys_to_target_node() and memory_add_physaddr_to_nid()) relies on
numa_memblks.
Since numa_memblks are now part of the generic code, move these
functions from x86 to mm/numa_memblks.c and select
CONFIG_
99 matches
Mail list logo