Merge tag 'powerpc-6.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc fixes from Madhavan Srinivasan: - fix to handle patchable function entries during module load - fix to align vmemmap start to page size - fixes to handle compilation errors and warnings Thanks to Anthony Iliopoulos, Donet Tom, Ritesh Harjani (IBM), Venkat Rao Bagalkote, and Stephen Rothwell. * tag 'powerpc-6.15-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/boot: Fix dash warning powerpc/boot: Check for ld-option support powerpc: Add check to select PPC_RADIX_BROADCAST_TLBIE powerpc64/ftrace: fix module loading without patchable function entries book3s64/radix : Align section vmemmap start address to PAGE_SIZE book3s64/radix: Fix compile errors when CONFIG_ARCH_WANT_OPTIMIZE_DAX_VMEMMAP=n
This commit is contained in:
@@ -234,10 +234,8 @@ fi
|
||||
|
||||
# suppress some warnings in recent ld versions
|
||||
nowarn="-z noexecstack"
|
||||
if ! ld_is_lld; then
|
||||
if [ "$LD_VERSION" -ge "$(echo 2.39 | ld_version)" ]; then
|
||||
nowarn="$nowarn --no-warn-rwx-segments"
|
||||
fi
|
||||
if "${CROSS}ld" -v --no-warn-rwx-segments >/dev/null 2>&1; then
|
||||
nowarn="$nowarn --no-warn-rwx-segments"
|
||||
fi
|
||||
|
||||
platformo=$object/"$platform".o
|
||||
|
||||
@@ -258,10 +258,6 @@ static unsigned long get_stubs_size(const Elf64_Ehdr *hdr,
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i == hdr->e_shnum) {
|
||||
pr_err("%s: doesn't contain __patchable_function_entries.\n", me->name);
|
||||
return -ENOEXEC;
|
||||
}
|
||||
#endif
|
||||
|
||||
pr_debug("Looks like a total of %lu stubs, max\n", relocs);
|
||||
|
||||
@@ -976,7 +976,7 @@ int __meminit radix__vmemmap_create_mapping(unsigned long start,
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#ifdef CONFIG_ARCH_WANT_OPTIMIZE_DAX_VMEMMAP
|
||||
bool vmemmap_can_optimize(struct vmem_altmap *altmap, struct dev_pagemap *pgmap)
|
||||
{
|
||||
if (radix_enabled())
|
||||
@@ -984,6 +984,7 @@ bool vmemmap_can_optimize(struct vmem_altmap *altmap, struct dev_pagemap *pgmap)
|
||||
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
int __meminit vmemmap_check_pmd(pmd_t *pmdp, int node,
|
||||
unsigned long addr, unsigned long next)
|
||||
@@ -1120,6 +1121,19 @@ int __meminit radix__vmemmap_populate(unsigned long start, unsigned long end, in
|
||||
pmd_t *pmd;
|
||||
pte_t *pte;
|
||||
|
||||
/*
|
||||
* Make sure we align the start vmemmap addr so that we calculate
|
||||
* the correct start_pfn in altmap boundary check to decided whether
|
||||
* we should use altmap or RAM based backing memory allocation. Also
|
||||
* the address need to be aligned for set_pte operation.
|
||||
|
||||
* If the start addr is already PMD_SIZE aligned we will try to use
|
||||
* a pmd mapping. We don't want to be too aggressive here beacause
|
||||
* that will cause more allocations in RAM. So only if the namespace
|
||||
* vmemmap start addr is PMD_SIZE aligned we will use PMD mapping.
|
||||
*/
|
||||
|
||||
start = ALIGN_DOWN(start, PAGE_SIZE);
|
||||
for (addr = start; addr < end; addr = next) {
|
||||
next = pmd_addr_end(addr, end);
|
||||
|
||||
@@ -1145,8 +1159,8 @@ int __meminit radix__vmemmap_populate(unsigned long start, unsigned long end, in
|
||||
* in altmap block allocation failures, in which case
|
||||
* we fallback to RAM for vmemmap allocation.
|
||||
*/
|
||||
if (altmap && (!IS_ALIGNED(addr, PMD_SIZE) ||
|
||||
altmap_cross_boundary(altmap, addr, PMD_SIZE))) {
|
||||
if (!IS_ALIGNED(addr, PMD_SIZE) || (altmap &&
|
||||
altmap_cross_boundary(altmap, addr, PMD_SIZE))) {
|
||||
/*
|
||||
* make sure we don't create altmap mappings
|
||||
* covering things outside the device.
|
||||
|
||||
@@ -17,7 +17,7 @@ config PPC_POWERNV
|
||||
select MMU_NOTIFIER
|
||||
select FORCE_SMP
|
||||
select ARCH_SUPPORTS_PER_VMA_LOCK
|
||||
select PPC_RADIX_BROADCAST_TLBIE
|
||||
select PPC_RADIX_BROADCAST_TLBIE if PPC_RADIX_MMU
|
||||
default y
|
||||
|
||||
config OPAL_PRD
|
||||
|
||||
@@ -23,7 +23,7 @@ config PPC_PSERIES
|
||||
select FORCE_SMP
|
||||
select SWIOTLB
|
||||
select ARCH_SUPPORTS_PER_VMA_LOCK
|
||||
select PPC_RADIX_BROADCAST_TLBIE
|
||||
select PPC_RADIX_BROADCAST_TLBIE if PPC_RADIX_MMU
|
||||
default y
|
||||
|
||||
config PARAVIRT
|
||||
|
||||
Reference in New Issue
Block a user