* linux-next: manual merge of the akpm-current tree with the powerpc tree
@ 2021-06-18 9:44 Stephen Rothwell
2021-06-19 2:54 ` Nicholas Piggin
0 siblings, 1 reply; 32+ messages in thread
From: Stephen Rothwell @ 2021-06-18 9:44 UTC (permalink / raw)
To: Andrew Morton, Michael Ellerman, PowerPC
Cc: Christophe Leroy, Linux Kernel Mailing List,
Linux Next Mailing List, Nicholas Piggin
[-- Attachment #1: Type: text/plain, Size: 1266 bytes --]
Hi all,
Today's linux-next merge of the akpm-current tree got a conflict in:
arch/powerpc/kernel/smp.c
between commit:
86f46f343272 ("powerpc/32s: Initialise KUAP and KUEP in C")
from the powerpc tree and commit:
103e676c91d0 ("lazy tlb: introduce lazy mm refcount helper functions")
from the akpm-current tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
--
Cheers,
Stephen Rothwell
diff --cc arch/powerpc/kernel/smp.c
index b83a59ce9beb,b289f1d213f8..000000000000
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@@ -1541,11 -1541,7 +1541,11 @@@ void start_secondary(void *unused
{
unsigned int cpu = raw_smp_processor_id();
+ /* PPC64 calls setup_kup() in early_setup_secondary() */
+ if (IS_ENABLED(CONFIG_PPC32))
+ setup_kup();
+
- mmgrab(&init_mm);
+ mmgrab_lazy_tlb(&init_mm);
current->active_mm = &init_mm;
smp_store_cpu_info(cpu);
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: linux-next: manual merge of the akpm-current tree with the powerpc tree
2021-06-18 9:44 linux-next: manual merge of the akpm-current tree with the powerpc tree Stephen Rothwell
@ 2021-06-19 2:54 ` Nicholas Piggin
0 siblings, 0 replies; 32+ messages in thread
From: Nicholas Piggin @ 2021-06-19 2:54 UTC (permalink / raw)
To: Andrew Morton, PowerPC, Michael Ellerman, Stephen Rothwell
Cc: Christophe Leroy, Linux Kernel Mailing
List, Linux Next Mailing List
Excerpts from Stephen Rothwell's message of June 18, 2021 7:44 pm:
> Hi all,
>
> Today's linux-next merge of the akpm-current tree got a conflict in:
>
> arch/powerpc/kernel/smp.c
>
> between commit:
>
> 86f46f343272 ("powerpc/32s: Initialise KUAP and KUEP in C")
>
> from the powerpc tree and commit:
>
> 103e676c91d0 ("lazy tlb: introduce lazy mm refcount helper functions")
>
> from the akpm-current tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
This is the correct merge.
Thanks,
Nick
>
> --
> Cheers,
> Stephen Rothwell
>
> diff --cc arch/powerpc/kernel/smp.c
> index b83a59ce9beb,b289f1d213f8..000000000000
> --- a/arch/powerpc/kernel/smp.c
> +++ b/arch/powerpc/kernel/smp.c
> @@@ -1541,11 -1541,7 +1541,11 @@@ void start_secondary(void *unused
> {
> unsigned int cpu = raw_smp_processor_id();
>
> + /* PPC64 calls setup_kup() in early_setup_secondary() */
> + if (IS_ENABLED(CONFIG_PPC32))
> + setup_kup();
> +
> - mmgrab(&init_mm);
> + mmgrab_lazy_tlb(&init_mm);
> current->active_mm = &init_mm;
>
> smp_store_cpu_info(cpu);
>
^ permalink raw reply [flat|nested] 32+ messages in thread
* linux-next: manual merge of the akpm-current tree with the powerpc tree
@ 2021-05-05 1:39 Stephen Rothwell
2021-05-05 4:57 ` Michael Ellerman
2021-05-05 23:43 ` Stephen Rothwell
0 siblings, 2 replies; 32+ messages in thread
From: Stephen Rothwell @ 2021-05-05 1:39 UTC (permalink / raw)
To: Andrew Morton, Michael Ellerman, PowerPC
Cc: Anshuman Khandual, Christophe Leroy, Linux Kernel Mailing List,
Linux Next Mailing List
[-- Attachment #1: Type: text/plain, Size: 4133 bytes --]
Hi all,
Today's linux-next merge of the akpm-current tree got a conflict in:
arch/powerpc/Kconfig
between commit:
c6b05f4e233c ("powerpc/kconfig: Restore alphabetic order of the selects under CONFIG_PPC")
from the powerpc tree and commits:
fd7d5c273c43 ("mm: generalize HUGETLB_PAGE_SIZE_VARIABLE")
301ba77ae03c ("mm: generalize ARCH_ENABLE_MEMORY_[HOTPLUG|HOTREMOVE]")
from the akpm-current tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
--
Cheers,
Stephen Rothwell
diff --cc arch/powerpc/Kconfig
index ab17a56c3d10,d4333049b813..000000000000
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@@ -118,11 -118,10 +118,13 @@@ config PP
# Please keep this list sorted alphabetically.
#
select ARCH_32BIT_OFF_T if PPC32
+ select ARCH_ENABLE_MEMORY_HOTPLUG
+ select ARCH_ENABLE_MEMORY_HOTREMOVE
+ select ARCH_HAS_COPY_MC if PPC64
select ARCH_HAS_DEBUG_VIRTUAL
+ select ARCH_HAS_DEBUG_VM_PGTABLE
select ARCH_HAS_DEVMEM_IS_ALLOWED
+ select ARCH_HAS_DMA_MAP_DIRECT if PPC_PSERIES
select ARCH_HAS_ELF_RANDOMIZE
select ARCH_HAS_FORTIFY_SOURCE
select ARCH_HAS_GCOV_PROFILE_ALL
@@@ -163,8 -162,9 +165,8 @@@
select BUILDTIME_TABLE_SORT
select CLONE_BACKWARDS
select DCACHE_WORD_ACCESS if PPC64 && CPU_LITTLE_ENDIAN
- select DMA_OPS_BYPASS if PPC64
select DMA_OPS if PPC64
+ select DMA_OPS_BYPASS if PPC64
- select ARCH_HAS_DMA_MAP_DIRECT if PPC64 && PPC_PSERIES
select DYNAMIC_FTRACE if FUNCTION_TRACER
select EDAC_ATOMIC_SCRUB
select EDAC_SUPPORT
@@@ -182,15 -181,12 +184,15 @@@
select GENERIC_STRNCPY_FROM_USER
select GENERIC_STRNLEN_USER
select GENERIC_TIME_VSYSCALL
- select GENERIC_GETTIMEOFDAY
+ select GENERIC_VDSO_TIME_NS
select HAVE_ARCH_AUDITSYSCALL
- select HAVE_ARCH_HUGE_VMAP if PPC_BOOK3S_64 && PPC_RADIX_MMU
+ select HAVE_ARCH_HUGE_VMALLOC if HAVE_ARCH_HUGE_VMAP
+ select HAVE_ARCH_HUGE_VMAP if PPC_BOOK3S_64 && PPC_RADIX_MMU
select HAVE_ARCH_JUMP_LABEL
+ select HAVE_ARCH_JUMP_LABEL_RELATIVE
select HAVE_ARCH_KASAN if PPC32 && PPC_PAGE_SHIFT <= 14
select HAVE_ARCH_KASAN_VMALLOC if PPC32 && PPC_PAGE_SHIFT <= 14
+ select HAVE_ARCH_KFENCE if PPC32
select HAVE_ARCH_KGDB
select HAVE_ARCH_MMAP_RND_BITS
select HAVE_ARCH_MMAP_RND_COMPAT_BITS if COMPAT
@@@ -231,19 -227,23 +233,20 @@@
select HAVE_LIVEPATCH if HAVE_DYNAMIC_FTRACE_WITH_REGS
select HAVE_MOD_ARCH_SPECIFIC
select HAVE_NMI if PERF_EVENTS || (PPC64 && PPC_BOOK3S)
- select HAVE_HARDLOCKUP_DETECTOR_ARCH if (PPC64 && PPC_BOOK3S)
- select HAVE_OPTPROBES if PPC64
+ select HAVE_OPTPROBES
select HAVE_PERF_EVENTS
select HAVE_PERF_EVENTS_NMI if PPC64
- select HAVE_HARDLOCKUP_DETECTOR_PERF if PERF_EVENTS && HAVE_PERF_EVENTS_NMI && !HAVE_HARDLOCKUP_DETECTOR_ARCH
select HAVE_PERF_REGS
select HAVE_PERF_USER_STACK_DUMP
- select HUGETLB_PAGE_SIZE_VARIABLE if PPC_BOOK3S_64 && HUGETLB_PAGE
- select MMU_GATHER_RCU_TABLE_FREE
- select MMU_GATHER_PAGE_SIZE
select HAVE_REGS_AND_STACK_ACCESS_API
- select HAVE_RELIABLE_STACKTRACE if PPC_BOOK3S_64 && CPU_LITTLE_ENDIAN
+ select HAVE_RELIABLE_STACKTRACE
+ select HAVE_RSEQ
select HAVE_SOFTIRQ_ON_OWN_STACK
+ select HAVE_STACKPROTECTOR if PPC32 && $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=r2)
+ select HAVE_STACKPROTECTOR if PPC64 && $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=r13)
select HAVE_SYSCALL_TRACEPOINTS
select HAVE_VIRT_CPU_ACCOUNTING
- select HAVE_IRQ_TIME_ACCOUNTING
- select HAVE_RSEQ
++ select HUGETLB_PAGE_SIZE_VARIABLE if PPC_BOOK3S_64 && HUGETLB_PAGE
select IOMMU_HELPER if PPC64
select IRQ_DOMAIN
select IRQ_FORCED_THREADING
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: linux-next: manual merge of the akpm-current tree with the powerpc tree
2021-05-05 1:39 Stephen Rothwell
@ 2021-05-05 4:57 ` Michael Ellerman
2021-05-05 5:46 ` Stephen Rothwell
2021-05-05 23:43 ` Stephen Rothwell
1 sibling, 1 reply; 32+ messages in thread
From: Michael Ellerman @ 2021-05-05 4:57 UTC (permalink / raw)
To: Stephen Rothwell, Andrew Morton, PowerPC
Cc: Anshuman Khandual, Christophe Leroy, Linux Kernel Mailing List,
Linux Next Mailing List
Stephen Rothwell <sfr@canb.auug.org.au> writes:
> Hi all,
>
> Today's linux-next merge of the akpm-current tree got a conflict in:
>
> arch/powerpc/Kconfig
>
> between commit:
>
> c6b05f4e233c ("powerpc/kconfig: Restore alphabetic order of the selects under CONFIG_PPC")
>
> from the powerpc tree and commits:
>
> fd7d5c273c43 ("mm: generalize HUGETLB_PAGE_SIZE_VARIABLE")
> 301ba77ae03c ("mm: generalize ARCH_ENABLE_MEMORY_[HOTPLUG|HOTREMOVE]")
>
> from the akpm-current tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
Urgh, I did check linux-next to see if that patch would conflict but
didn't think it would conflict *that* badly.
I guess I'll leave it for now, but I can drop it if necessary.
cheers
> diff --cc arch/powerpc/Kconfig
> index ab17a56c3d10,d4333049b813..000000000000
> --- a/arch/powerpc/Kconfig
> +++ b/arch/powerpc/Kconfig
> @@@ -118,11 -118,10 +118,13 @@@ config PP
> # Please keep this list sorted alphabetically.
> #
> select ARCH_32BIT_OFF_T if PPC32
> + select ARCH_ENABLE_MEMORY_HOTPLUG
> + select ARCH_ENABLE_MEMORY_HOTREMOVE
> + select ARCH_HAS_COPY_MC if PPC64
> select ARCH_HAS_DEBUG_VIRTUAL
> + select ARCH_HAS_DEBUG_VM_PGTABLE
> select ARCH_HAS_DEVMEM_IS_ALLOWED
> + select ARCH_HAS_DMA_MAP_DIRECT if PPC_PSERIES
> select ARCH_HAS_ELF_RANDOMIZE
> select ARCH_HAS_FORTIFY_SOURCE
> select ARCH_HAS_GCOV_PROFILE_ALL
> @@@ -163,8 -162,9 +165,8 @@@
> select BUILDTIME_TABLE_SORT
> select CLONE_BACKWARDS
> select DCACHE_WORD_ACCESS if PPC64 && CPU_LITTLE_ENDIAN
> - select DMA_OPS_BYPASS if PPC64
> select DMA_OPS if PPC64
> + select DMA_OPS_BYPASS if PPC64
> - select ARCH_HAS_DMA_MAP_DIRECT if PPC64 && PPC_PSERIES
> select DYNAMIC_FTRACE if FUNCTION_TRACER
> select EDAC_ATOMIC_SCRUB
> select EDAC_SUPPORT
> @@@ -182,15 -181,12 +184,15 @@@
> select GENERIC_STRNCPY_FROM_USER
> select GENERIC_STRNLEN_USER
> select GENERIC_TIME_VSYSCALL
> - select GENERIC_GETTIMEOFDAY
> + select GENERIC_VDSO_TIME_NS
> select HAVE_ARCH_AUDITSYSCALL
> - select HAVE_ARCH_HUGE_VMAP if PPC_BOOK3S_64 && PPC_RADIX_MMU
> + select HAVE_ARCH_HUGE_VMALLOC if HAVE_ARCH_HUGE_VMAP
> + select HAVE_ARCH_HUGE_VMAP if PPC_BOOK3S_64 && PPC_RADIX_MMU
> select HAVE_ARCH_JUMP_LABEL
> + select HAVE_ARCH_JUMP_LABEL_RELATIVE
> select HAVE_ARCH_KASAN if PPC32 && PPC_PAGE_SHIFT <= 14
> select HAVE_ARCH_KASAN_VMALLOC if PPC32 && PPC_PAGE_SHIFT <= 14
> + select HAVE_ARCH_KFENCE if PPC32
> select HAVE_ARCH_KGDB
> select HAVE_ARCH_MMAP_RND_BITS
> select HAVE_ARCH_MMAP_RND_COMPAT_BITS if COMPAT
> @@@ -231,19 -227,23 +233,20 @@@
> select HAVE_LIVEPATCH if HAVE_DYNAMIC_FTRACE_WITH_REGS
> select HAVE_MOD_ARCH_SPECIFIC
> select HAVE_NMI if PERF_EVENTS || (PPC64 && PPC_BOOK3S)
> - select HAVE_HARDLOCKUP_DETECTOR_ARCH if (PPC64 && PPC_BOOK3S)
> - select HAVE_OPTPROBES if PPC64
> + select HAVE_OPTPROBES
> select HAVE_PERF_EVENTS
> select HAVE_PERF_EVENTS_NMI if PPC64
> - select HAVE_HARDLOCKUP_DETECTOR_PERF if PERF_EVENTS && HAVE_PERF_EVENTS_NMI && !HAVE_HARDLOCKUP_DETECTOR_ARCH
> select HAVE_PERF_REGS
> select HAVE_PERF_USER_STACK_DUMP
> - select HUGETLB_PAGE_SIZE_VARIABLE if PPC_BOOK3S_64 && HUGETLB_PAGE
> - select MMU_GATHER_RCU_TABLE_FREE
> - select MMU_GATHER_PAGE_SIZE
> select HAVE_REGS_AND_STACK_ACCESS_API
> - select HAVE_RELIABLE_STACKTRACE if PPC_BOOK3S_64 && CPU_LITTLE_ENDIAN
> + select HAVE_RELIABLE_STACKTRACE
> + select HAVE_RSEQ
> select HAVE_SOFTIRQ_ON_OWN_STACK
> + select HAVE_STACKPROTECTOR if PPC32 && $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=r2)
> + select HAVE_STACKPROTECTOR if PPC64 && $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=r13)
> select HAVE_SYSCALL_TRACEPOINTS
> select HAVE_VIRT_CPU_ACCOUNTING
> - select HAVE_IRQ_TIME_ACCOUNTING
> - select HAVE_RSEQ
> ++ select HUGETLB_PAGE_SIZE_VARIABLE if PPC_BOOK3S_64 && HUGETLB_PAGE
> select IOMMU_HELPER if PPC64
> select IRQ_DOMAIN
> select IRQ_FORCED_THREADING
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: linux-next: manual merge of the akpm-current tree with the powerpc tree
2021-05-05 4:57 ` Michael Ellerman
@ 2021-05-05 5:46 ` Stephen Rothwell
0 siblings, 0 replies; 32+ messages in thread
From: Stephen Rothwell @ 2021-05-05 5:46 UTC (permalink / raw)
To: Michael Ellerman
Cc: Stephen Rothwell, Andrew Morton, PowerPC, Anshuman Khandual,
Christophe Leroy, Linux Kernel Mailing List,
Linux Next Mailing List
[-- Attachment #1: Type: text/plain, Size: 380 bytes --]
Hi Michael,
On Wed, 05 May 2021 14:57:18 +1000 Michael Ellerman <mpe@ellerman.id.au> wrote:
>
> Urgh, I did check linux-next to see if that patch would conflict but
> didn't think it would conflict *that* badly.
Its not as bad as it looks, the akpm-current patches just added three
selects and just need to be put in the proper place.
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: linux-next: manual merge of the akpm-current tree with the powerpc tree
2021-05-05 1:39 Stephen Rothwell
2021-05-05 4:57 ` Michael Ellerman
@ 2021-05-05 23:43 ` Stephen Rothwell
1 sibling, 0 replies; 32+ messages in thread
From: Stephen Rothwell @ 2021-05-05 23:43 UTC (permalink / raw)
To: Michael Ellerman, PowerPC
Cc: Andrew Morton, Anshuman Khandual, Christophe Leroy,
Linux Kernel Mailing List, Linux Next Mailing List
[-- Attachment #1: Type: text/plain, Size: 4526 bytes --]
Hi all,
On Wed, 5 May 2021 11:39:59 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the akpm-current tree got a conflict in:
>
> arch/powerpc/Kconfig
>
> between commit:
>
> c6b05f4e233c ("powerpc/kconfig: Restore alphabetic order of the selects under CONFIG_PPC")
>
> from the powerpc tree and commits:
>
> fd7d5c273c43 ("mm: generalize HUGETLB_PAGE_SIZE_VARIABLE")
> 301ba77ae03c ("mm: generalize ARCH_ENABLE_MEMORY_[HOTPLUG|HOTREMOVE]")
>
> from the akpm-current tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
>
> --
> Cheers,
> Stephen Rothwell
>
> diff --cc arch/powerpc/Kconfig
> index ab17a56c3d10,d4333049b813..000000000000
> --- a/arch/powerpc/Kconfig
> +++ b/arch/powerpc/Kconfig
> @@@ -118,11 -118,10 +118,13 @@@ config PP
> # Please keep this list sorted alphabetically.
> #
> select ARCH_32BIT_OFF_T if PPC32
> + select ARCH_ENABLE_MEMORY_HOTPLUG
> + select ARCH_ENABLE_MEMORY_HOTREMOVE
> + select ARCH_HAS_COPY_MC if PPC64
> select ARCH_HAS_DEBUG_VIRTUAL
> + select ARCH_HAS_DEBUG_VM_PGTABLE
> select ARCH_HAS_DEVMEM_IS_ALLOWED
> + select ARCH_HAS_DMA_MAP_DIRECT if PPC_PSERIES
> select ARCH_HAS_ELF_RANDOMIZE
> select ARCH_HAS_FORTIFY_SOURCE
> select ARCH_HAS_GCOV_PROFILE_ALL
> @@@ -163,8 -162,9 +165,8 @@@
> select BUILDTIME_TABLE_SORT
> select CLONE_BACKWARDS
> select DCACHE_WORD_ACCESS if PPC64 && CPU_LITTLE_ENDIAN
> - select DMA_OPS_BYPASS if PPC64
> select DMA_OPS if PPC64
> + select DMA_OPS_BYPASS if PPC64
> - select ARCH_HAS_DMA_MAP_DIRECT if PPC64 && PPC_PSERIES
> select DYNAMIC_FTRACE if FUNCTION_TRACER
> select EDAC_ATOMIC_SCRUB
> select EDAC_SUPPORT
> @@@ -182,15 -181,12 +184,15 @@@
> select GENERIC_STRNCPY_FROM_USER
> select GENERIC_STRNLEN_USER
> select GENERIC_TIME_VSYSCALL
> - select GENERIC_GETTIMEOFDAY
> + select GENERIC_VDSO_TIME_NS
> select HAVE_ARCH_AUDITSYSCALL
> - select HAVE_ARCH_HUGE_VMAP if PPC_BOOK3S_64 && PPC_RADIX_MMU
> + select HAVE_ARCH_HUGE_VMALLOC if HAVE_ARCH_HUGE_VMAP
> + select HAVE_ARCH_HUGE_VMAP if PPC_BOOK3S_64 && PPC_RADIX_MMU
> select HAVE_ARCH_JUMP_LABEL
> + select HAVE_ARCH_JUMP_LABEL_RELATIVE
> select HAVE_ARCH_KASAN if PPC32 && PPC_PAGE_SHIFT <= 14
> select HAVE_ARCH_KASAN_VMALLOC if PPC32 && PPC_PAGE_SHIFT <= 14
> + select HAVE_ARCH_KFENCE if PPC32
> select HAVE_ARCH_KGDB
> select HAVE_ARCH_MMAP_RND_BITS
> select HAVE_ARCH_MMAP_RND_COMPAT_BITS if COMPAT
> @@@ -231,19 -227,23 +233,20 @@@
> select HAVE_LIVEPATCH if HAVE_DYNAMIC_FTRACE_WITH_REGS
> select HAVE_MOD_ARCH_SPECIFIC
> select HAVE_NMI if PERF_EVENTS || (PPC64 && PPC_BOOK3S)
> - select HAVE_HARDLOCKUP_DETECTOR_ARCH if (PPC64 && PPC_BOOK3S)
> - select HAVE_OPTPROBES if PPC64
> + select HAVE_OPTPROBES
> select HAVE_PERF_EVENTS
> select HAVE_PERF_EVENTS_NMI if PPC64
> - select HAVE_HARDLOCKUP_DETECTOR_PERF if PERF_EVENTS && HAVE_PERF_EVENTS_NMI && !HAVE_HARDLOCKUP_DETECTOR_ARCH
> select HAVE_PERF_REGS
> select HAVE_PERF_USER_STACK_DUMP
> - select HUGETLB_PAGE_SIZE_VARIABLE if PPC_BOOK3S_64 && HUGETLB_PAGE
> - select MMU_GATHER_RCU_TABLE_FREE
> - select MMU_GATHER_PAGE_SIZE
> select HAVE_REGS_AND_STACK_ACCESS_API
> - select HAVE_RELIABLE_STACKTRACE if PPC_BOOK3S_64 && CPU_LITTLE_ENDIAN
> + select HAVE_RELIABLE_STACKTRACE
> + select HAVE_RSEQ
> select HAVE_SOFTIRQ_ON_OWN_STACK
> + select HAVE_STACKPROTECTOR if PPC32 && $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=r2)
> + select HAVE_STACKPROTECTOR if PPC64 && $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=r13)
> select HAVE_SYSCALL_TRACEPOINTS
> select HAVE_VIRT_CPU_ACCOUNTING
> - select HAVE_IRQ_TIME_ACCOUNTING
> - select HAVE_RSEQ
> ++ select HUGETLB_PAGE_SIZE_VARIABLE if PPC_BOOK3S_64 && HUGETLB_PAGE
> select IOMMU_HELPER if PPC64
> select IRQ_DOMAIN
> select IRQ_FORCED_THREADING
This is now a conflict between the powerpc tree and Linus' tree.
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 32+ messages in thread
* linux-next: manual merge of the akpm-current tree with the powerpc tree
@ 2021-04-15 9:44 Stephen Rothwell
2021-04-15 9:58 ` Stephen Rothwell
0 siblings, 1 reply; 32+ messages in thread
From: Stephen Rothwell @ 2021-04-15 9:44 UTC (permalink / raw)
To: Andrew Morton, Michael Ellerman, PowerPC
Cc: Christophe Leroy, Linux Kernel Mailing List,
Linux Next Mailing List, Nicholas Piggin, Stephen Rothwell
[-- Attachment #1: Type: text/plain, Size: 2620 bytes --]
Hi all,
Today's linux-next merge of the akpm-current tree got a conflict in:
arch/powerpc/kernel/module.c
between commit:
2ec13df16704 ("powerpc/modules: Load modules closer to kernel text")
from the powerpc tree and commit:
4930ba789f8d ("powerpc/64s/radix: enable huge vmalloc mappings")
from the akpm-current tree.
I fixed it up (I think - see below) and can carry the fix as
necessary. This is now fixed as far as linux-next is concerned, but any
non trivial conflicts should be mentioned to your upstream maintainer
when your tree is submitted for merging. You may also want to consider
cooperating with the maintainer of the conflicting tree to minimise any
particularly complex conflicts.
--
Cheers,
Stephen Rothwell
diff --cc arch/powerpc/kernel/module.c
index fab84024650c,cdb2d88c54e7..000000000000
--- a/arch/powerpc/kernel/module.c
+++ b/arch/powerpc/kernel/module.c
@@@ -88,29 -88,26 +89,42 @@@ int module_finalize(const Elf_Ehdr *hdr
return 0;
}
- #ifdef MODULES_VADDR
-void *module_alloc(unsigned long size)
+static __always_inline void *
+__module_alloc(unsigned long size, unsigned long start, unsigned long end)
{
- unsigned long start = VMALLOC_START;
- unsigned long end = VMALLOC_END;
-
-#ifdef MODULES_VADDR
- BUILD_BUG_ON(TASK_SIZE > MODULES_VADDR);
- start = MODULES_VADDR;
- end = MODULES_END;
-#endif
-
+ /*
+ * Don't do huge page allocations for modules yet until more testing
+ * is done. STRICT_MODULE_RWX may require extra work to support this
+ * too.
+ */
+
return __vmalloc_node_range(size, 1, start, end, GFP_KERNEL,
- PAGE_KERNEL_EXEC, VM_FLUSH_RESET_PERMS, NUMA_NO_NODE,
+ PAGE_KERNEL_EXEC,
+ VM_NO_HUGE_VMAP | VM_FLUSH_RESET_PERMS,
+ NUMA_NO_NODE,
__builtin_return_address(0));
}
+
++
+void *module_alloc(unsigned long size)
+{
++ unsigned long start = VMALLOC_START;
++ unsigned long end = VMALLOC_END;
+ unsigned long limit = (unsigned long)_etext - SZ_32M;
+ void *ptr = NULL;
+
++#ifdef MODULES_VADDR
+ BUILD_BUG_ON(TASK_SIZE > MODULES_VADDR);
++ start = MODULES_VADDR;
++ end = MODULES_END;
+
+ /* First try within 32M limit from _etext to avoid branch trampolines */
+ if (MODULES_VADDR < PAGE_OFFSET && MODULES_END > limit)
- ptr = __module_alloc(size, limit, MODULES_END);
++ ptr = __module_alloc(size, limit, end);
+
+ if (!ptr)
- ptr = __module_alloc(size, MODULES_VADDR, MODULES_END);
++#endif
++ ptr = __module_alloc(size, start, end);
+
+ return ptr;
+}
- #endif
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: linux-next: manual merge of the akpm-current tree with the powerpc tree
2021-04-15 9:44 Stephen Rothwell
@ 2021-04-15 9:58 ` Stephen Rothwell
2021-04-15 10:07 ` Christophe Leroy
0 siblings, 1 reply; 32+ messages in thread
From: Stephen Rothwell @ 2021-04-15 9:58 UTC (permalink / raw)
To: Andrew Morton, Michael Ellerman, PowerPC
Cc: Christophe Leroy, Linux Kernel Mailing List,
Linux Next Mailing List, Nicholas Piggin
[-- Attachment #1: Type: text/plain, Size: 3707 bytes --]
Hi all,
On Thu, 15 Apr 2021 19:44:17 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the akpm-current tree got a conflict in:
>
> arch/powerpc/kernel/module.c
>
> between commit:
>
> 2ec13df16704 ("powerpc/modules: Load modules closer to kernel text")
>
> from the powerpc tree and commit:
>
> 4930ba789f8d ("powerpc/64s/radix: enable huge vmalloc mappings")
>
> from the akpm-current tree.
>
> I fixed it up (I think - see below) and can carry the fix as
> necessary. This is now fixed as far as linux-next is concerned, but any
> non trivial conflicts should be mentioned to your upstream maintainer
> when your tree is submitted for merging. You may also want to consider
> cooperating with the maintainer of the conflicting tree to minimise any
> particularly complex conflicts.
>
> --
> Cheers,
> Stephen Rothwell
>
> diff --cc arch/powerpc/kernel/module.c
> index fab84024650c,cdb2d88c54e7..000000000000
> --- a/arch/powerpc/kernel/module.c
> +++ b/arch/powerpc/kernel/module.c
> @@@ -88,29 -88,26 +89,42 @@@ int module_finalize(const Elf_Ehdr *hdr
> return 0;
> }
>
> - #ifdef MODULES_VADDR
> -void *module_alloc(unsigned long size)
> +static __always_inline void *
> +__module_alloc(unsigned long size, unsigned long start, unsigned long end)
> {
> - unsigned long start = VMALLOC_START;
> - unsigned long end = VMALLOC_END;
> -
> -#ifdef MODULES_VADDR
> - BUILD_BUG_ON(TASK_SIZE > MODULES_VADDR);
> - start = MODULES_VADDR;
> - end = MODULES_END;
> -#endif
> -
> + /*
> + * Don't do huge page allocations for modules yet until more testing
> + * is done. STRICT_MODULE_RWX may require extra work to support this
> + * too.
> + */
> +
> return __vmalloc_node_range(size, 1, start, end, GFP_KERNEL,
> - PAGE_KERNEL_EXEC, VM_FLUSH_RESET_PERMS, NUMA_NO_NODE,
> + PAGE_KERNEL_EXEC,
> + VM_NO_HUGE_VMAP | VM_FLUSH_RESET_PERMS,
> + NUMA_NO_NODE,
> __builtin_return_address(0));
> }
> +
> ++
> +void *module_alloc(unsigned long size)
> +{
> ++ unsigned long start = VMALLOC_START;
> ++ unsigned long end = VMALLOC_END;
> + unsigned long limit = (unsigned long)_etext - SZ_32M;
> + void *ptr = NULL;
> +
> ++#ifdef MODULES_VADDR
> + BUILD_BUG_ON(TASK_SIZE > MODULES_VADDR);
> ++ start = MODULES_VADDR;
> ++ end = MODULES_END;
> +
> + /* First try within 32M limit from _etext to avoid branch trampolines */
> + if (MODULES_VADDR < PAGE_OFFSET && MODULES_END > limit)
> - ptr = __module_alloc(size, limit, MODULES_END);
> ++ ptr = __module_alloc(size, limit, end);
> +
> + if (!ptr)
> - ptr = __module_alloc(size, MODULES_VADDR, MODULES_END);
> ++#endif
> ++ ptr = __module_alloc(size, start, end);
> +
> + return ptr;
> +}
> - #endif
Unfortunately, it also needs this:
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 15 Apr 2021 19:53:58 +1000
Subject: [PATCH] merge fix up for powerpc merge fix
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
arch/powerpc/kernel/module.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/powerpc/kernel/module.c b/arch/powerpc/kernel/module.c
index d8ab1ad2eb05..c060f99afd4d 100644
--- a/arch/powerpc/kernel/module.c
+++ b/arch/powerpc/kernel/module.c
@@ -110,7 +110,9 @@ void *module_alloc(unsigned long size)
{
unsigned long start = VMALLOC_START;
unsigned long end = VMALLOC_END;
+#ifdef MODULES_VADDR
unsigned long limit = (unsigned long)_etext - SZ_32M;
+#endif
void *ptr = NULL;
#ifdef MODULES_VADDR
--
2.30.2
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply related [flat|nested] 32+ messages in thread
* Re: linux-next: manual merge of the akpm-current tree with the powerpc tree
2021-04-15 9:58 ` Stephen Rothwell
@ 2021-04-15 10:07 ` Christophe Leroy
2021-04-15 10:08 ` Christophe Leroy
0 siblings, 1 reply; 32+ messages in thread
From: Christophe Leroy @ 2021-04-15 10:07 UTC (permalink / raw)
To: Stephen Rothwell, Andrew Morton, Michael Ellerman, PowerPC
Cc: Linux Kernel Mailing List, Linux Next Mailing List, Nicholas Piggin
Le 15/04/2021 à 11:58, Stephen Rothwell a écrit :
> Hi all,
>
> On Thu, 15 Apr 2021 19:44:17 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>>
>> Today's linux-next merge of the akpm-current tree got a conflict in:
>>
>> arch/powerpc/kernel/module.c
>>
>> between commit:
>>
>> 2ec13df16704 ("powerpc/modules: Load modules closer to kernel text")
>>
>> from the powerpc tree and commit:
>>
>> 4930ba789f8d ("powerpc/64s/radix: enable huge vmalloc mappings")
>>
>> from the akpm-current tree.
>>
>> I fixed it up (I think - see below) and can carry the fix as
>> necessary. This is now fixed as far as linux-next is concerned, but any
>> non trivial conflicts should be mentioned to your upstream maintainer
>> when your tree is submitted for merging. You may also want to consider
>> cooperating with the maintainer of the conflicting tree to minimise any
>> particularly complex conflicts.
>>
>> --
>> Cheers,
>> Stephen Rothwell
>>
>> diff --cc arch/powerpc/kernel/module.c
>> index fab84024650c,cdb2d88c54e7..000000000000
>> --- a/arch/powerpc/kernel/module.c
>> +++ b/arch/powerpc/kernel/module.c
>> @@@ -88,29 -88,26 +89,42 @@@ int module_finalize(const Elf_Ehdr *hdr
>> return 0;
>> }
>>
>> - #ifdef MODULES_VADDR
>> -void *module_alloc(unsigned long size)
>> +static __always_inline void *
>> +__module_alloc(unsigned long size, unsigned long start, unsigned long end)
>> {
>> - unsigned long start = VMALLOC_START;
>> - unsigned long end = VMALLOC_END;
>> -
>> -#ifdef MODULES_VADDR
>> - BUILD_BUG_ON(TASK_SIZE > MODULES_VADDR);
>> - start = MODULES_VADDR;
>> - end = MODULES_END;
>> -#endif
>> -
>> + /*
>> + * Don't do huge page allocations for modules yet until more testing
>> + * is done. STRICT_MODULE_RWX may require extra work to support this
>> + * too.
>> + */
>> +
>> return __vmalloc_node_range(size, 1, start, end, GFP_KERNEL,
>> - PAGE_KERNEL_EXEC, VM_FLUSH_RESET_PERMS, NUMA_NO_NODE,
>> + PAGE_KERNEL_EXEC,
>> + VM_NO_HUGE_VMAP | VM_FLUSH_RESET_PERMS,
>> + NUMA_NO_NODE,
>> __builtin_return_address(0));
>> }
>> +
>> ++
>> +void *module_alloc(unsigned long size)
>> +{
>> ++ unsigned long start = VMALLOC_START;
>> ++ unsigned long end = VMALLOC_END;
>> + unsigned long limit = (unsigned long)_etext - SZ_32M;
>> + void *ptr = NULL;
>> +
>> ++#ifdef MODULES_VADDR
>> + BUILD_BUG_ON(TASK_SIZE > MODULES_VADDR);
>> ++ start = MODULES_VADDR;
>> ++ end = MODULES_END;
The #endif should be here.
>> +
>> + /* First try within 32M limit from _etext to avoid branch trampolines */
>> + if (MODULES_VADDR < PAGE_OFFSET && MODULES_END > limit)
>> - ptr = __module_alloc(size, limit, MODULES_END);
>> ++ ptr = __module_alloc(size, limit, end);
>> +
>> + if (!ptr)
>> - ptr = __module_alloc(size, MODULES_VADDR, MODULES_END);
>> ++#endif
>> ++ ptr = __module_alloc(size, start, end);
>> +
>> + return ptr;
>> +}
>> - #endif
>
> Unfortunately, it also needs this:
Before the #endif is too far.
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Thu, 15 Apr 2021 19:53:58 +1000
> Subject: [PATCH] merge fix up for powerpc merge fix
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
> arch/powerpc/kernel/module.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/powerpc/kernel/module.c b/arch/powerpc/kernel/module.c
> index d8ab1ad2eb05..c060f99afd4d 100644
> --- a/arch/powerpc/kernel/module.c
> +++ b/arch/powerpc/kernel/module.c
> @@ -110,7 +110,9 @@ void *module_alloc(unsigned long size)
> {
> unsigned long start = VMALLOC_START;
> unsigned long end = VMALLOC_END;
> +#ifdef MODULES_VADDR
> unsigned long limit = (unsigned long)_etext - SZ_32M;
> +#endif
> void *ptr = NULL;
>
> #ifdef MODULES_VADDR
>
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: linux-next: manual merge of the akpm-current tree with the powerpc tree
2021-04-15 10:07 ` Christophe Leroy
@ 2021-04-15 10:08 ` Christophe Leroy
2021-04-15 10:15 ` Christophe Leroy
0 siblings, 1 reply; 32+ messages in thread
From: Christophe Leroy @ 2021-04-15 10:08 UTC (permalink / raw)
To: Stephen Rothwell, Andrew Morton, Michael Ellerman, PowerPC
Cc: Linux Kernel Mailing List, Linux Next Mailing List, Nicholas Piggin
Le 15/04/2021 à 12:07, Christophe Leroy a écrit :
>
>
> Le 15/04/2021 à 11:58, Stephen Rothwell a écrit :
>> Hi all,
>>
>> On Thu, 15 Apr 2021 19:44:17 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>>>
>>> Today's linux-next merge of the akpm-current tree got a conflict in:
>>>
>>> arch/powerpc/kernel/module.c
>>>
>>> between commit:
>>>
>>> 2ec13df16704 ("powerpc/modules: Load modules closer to kernel text")
>>>
>>> from the powerpc tree and commit:
>>>
>>> 4930ba789f8d ("powerpc/64s/radix: enable huge vmalloc mappings")
>>>
>>> from the akpm-current tree.
>>>
>>> I fixed it up (I think - see below) and can carry the fix as
>>> necessary. This is now fixed as far as linux-next is concerned, but any
>>> non trivial conflicts should be mentioned to your upstream maintainer
>>> when your tree is submitted for merging. You may also want to consider
>>> cooperating with the maintainer of the conflicting tree to minimise any
>>> particularly complex conflicts.
>>>
>>> --
>>> Cheers,
>>> Stephen Rothwell
>>>
>>> diff --cc arch/powerpc/kernel/module.c
>>> index fab84024650c,cdb2d88c54e7..000000000000
>>> --- a/arch/powerpc/kernel/module.c
>>> +++ b/arch/powerpc/kernel/module.c
>>> @@@ -88,29 -88,26 +89,42 @@@ int module_finalize(const Elf_Ehdr *hdr
>>> return 0;
>>> }
>>> - #ifdef MODULES_VADDR
>>> -void *module_alloc(unsigned long size)
>>> +static __always_inline void *
>>> +__module_alloc(unsigned long size, unsigned long start, unsigned long end)
>>> {
>>> - unsigned long start = VMALLOC_START;
>>> - unsigned long end = VMALLOC_END;
>>> -
>>> -#ifdef MODULES_VADDR
>>> - BUILD_BUG_ON(TASK_SIZE > MODULES_VADDR);
>>> - start = MODULES_VADDR;
>>> - end = MODULES_END;
>>> -#endif
>>> -
>>> + /*
>>> + * Don't do huge page allocations for modules yet until more testing
>>> + * is done. STRICT_MODULE_RWX may require extra work to support this
>>> + * too.
>>> + */
>>> +
>>> return __vmalloc_node_range(size, 1, start, end, GFP_KERNEL,
>>> - PAGE_KERNEL_EXEC, VM_FLUSH_RESET_PERMS, NUMA_NO_NODE,
>>> + PAGE_KERNEL_EXEC,
>>> + VM_NO_HUGE_VMAP | VM_FLUSH_RESET_PERMS,
>>> + NUMA_NO_NODE,
>>> __builtin_return_address(0));
>>> }
>>> +
>>> ++
>>> +void *module_alloc(unsigned long size)
>>> +{
>>> ++ unsigned long start = VMALLOC_START;
>>> ++ unsigned long end = VMALLOC_END;
>>> + unsigned long limit = (unsigned long)_etext - SZ_32M;
>>> + void *ptr = NULL;
>>> +
>>> ++#ifdef MODULES_VADDR
>>> + BUILD_BUG_ON(TASK_SIZE > MODULES_VADDR);
>>> ++ start = MODULES_VADDR;
>>> ++ end = MODULES_END;
>
> The #endif should be here.
>
>
>>> +
>>> + /* First try within 32M limit from _etext to avoid branch trampolines */
>>> + if (MODULES_VADDR < PAGE_OFFSET && MODULES_END > limit)
Should also use start and end here instead of MODULES_VADDR and MODULES_END
>>> - ptr = __module_alloc(size, limit, MODULES_END);
>>> ++ ptr = __module_alloc(size, limit, end);
>>> +
>>> + if (!ptr)
>>> - ptr = __module_alloc(size, MODULES_VADDR, MODULES_END);
>>> ++#endif
>>> ++ ptr = __module_alloc(size, start, end);
>>> +
>>> + return ptr;
>>> +}
>>> - #endif
>>
>> Unfortunately, it also needs this:
>
> Before the #endif is too far.
>
>>
>> From: Stephen Rothwell <sfr@canb.auug.org.au>
>> Date: Thu, 15 Apr 2021 19:53:58 +1000
>> Subject: [PATCH] merge fix up for powerpc merge fix
>>
>> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
>> ---
>> arch/powerpc/kernel/module.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/arch/powerpc/kernel/module.c b/arch/powerpc/kernel/module.c
>> index d8ab1ad2eb05..c060f99afd4d 100644
>> --- a/arch/powerpc/kernel/module.c
>> +++ b/arch/powerpc/kernel/module.c
>> @@ -110,7 +110,9 @@ void *module_alloc(unsigned long size)
>> {
>> unsigned long start = VMALLOC_START;
>> unsigned long end = VMALLOC_END;
>> +#ifdef MODULES_VADDR
>> unsigned long limit = (unsigned long)_etext - SZ_32M;
>> +#endif
>> void *ptr = NULL;
>> #ifdef MODULES_VADDR
>>
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: linux-next: manual merge of the akpm-current tree with the powerpc tree
2021-04-15 10:08 ` Christophe Leroy
@ 2021-04-15 10:15 ` Christophe Leroy
0 siblings, 0 replies; 32+ messages in thread
From: Christophe Leroy @ 2021-04-15 10:15 UTC (permalink / raw)
To: Stephen Rothwell, Andrew Morton, Michael Ellerman, PowerPC
Cc: Linux Next Mailing List, Linux Kernel Mailing List, Nicholas Piggin
Le 15/04/2021 à 12:08, Christophe Leroy a écrit :
>
>
> Le 15/04/2021 à 12:07, Christophe Leroy a écrit :
>>
>>
>> Le 15/04/2021 à 11:58, Stephen Rothwell a écrit :
>>> Hi all,
>>>
>>> On Thu, 15 Apr 2021 19:44:17 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>>>>
>>>> Today's linux-next merge of the akpm-current tree got a conflict in:
>>>>
>>>> arch/powerpc/kernel/module.c
>>>>
>>>> between commit:
>>>>
>>>> 2ec13df16704 ("powerpc/modules: Load modules closer to kernel text")
>>>>
>>>> from the powerpc tree and commit:
>>>>
>>>> 4930ba789f8d ("powerpc/64s/radix: enable huge vmalloc mappings")
>>>>
>>>> from the akpm-current tree.
>>>>
>>>> I fixed it up (I think - see below) and can carry the fix as
>>>> necessary. This is now fixed as far as linux-next is concerned, but any
>>>> non trivial conflicts should be mentioned to your upstream maintainer
>>>> when your tree is submitted for merging. You may also want to consider
>>>> cooperating with the maintainer of the conflicting tree to minimise any
>>>> particularly complex conflicts.
>>>>
>>>> --
>>>> Cheers,
>>>> Stephen Rothwell
>>>>
>>>> diff --cc arch/powerpc/kernel/module.c
>>>> index fab84024650c,cdb2d88c54e7..000000000000
>>>> --- a/arch/powerpc/kernel/module.c
>>>> +++ b/arch/powerpc/kernel/module.c
>>>> @@@ -88,29 -88,26 +89,42 @@@ int module_finalize(const Elf_Ehdr *hdr
>>>> return 0;
>>>> }
>>>> - #ifdef MODULES_VADDR
>>>> -void *module_alloc(unsigned long size)
>>>> +static __always_inline void *
>>>> +__module_alloc(unsigned long size, unsigned long start, unsigned long end)
>>>> {
>>>> - unsigned long start = VMALLOC_START;
>>>> - unsigned long end = VMALLOC_END;
>>>> -
>>>> -#ifdef MODULES_VADDR
>>>> - BUILD_BUG_ON(TASK_SIZE > MODULES_VADDR);
>>>> - start = MODULES_VADDR;
>>>> - end = MODULES_END;
>>>> -#endif
>>>> -
>>>> + /*
>>>> + * Don't do huge page allocations for modules yet until more testing
>>>> + * is done. STRICT_MODULE_RWX may require extra work to support this
>>>> + * too.
>>>> + */
>>>> +
>>>> return __vmalloc_node_range(size, 1, start, end, GFP_KERNEL,
>>>> - PAGE_KERNEL_EXEC, VM_FLUSH_RESET_PERMS, NUMA_NO_NODE,
>>>> + PAGE_KERNEL_EXEC,
>>>> + VM_NO_HUGE_VMAP | VM_FLUSH_RESET_PERMS,
>>>> + NUMA_NO_NODE,
>>>> __builtin_return_address(0));
>>>> }
>>>> +
>>>> ++
>>>> +void *module_alloc(unsigned long size)
>>>> +{
>>>> ++ unsigned long start = VMALLOC_START;
>>>> ++ unsigned long end = VMALLOC_END;
>>>> + unsigned long limit = (unsigned long)_etext - SZ_32M;
>>>> + void *ptr = NULL;
>>>> +
>>>> ++#ifdef MODULES_VADDR
>>>> + BUILD_BUG_ON(TASK_SIZE > MODULES_VADDR);
>>>> ++ start = MODULES_VADDR;
>>>> ++ end = MODULES_END;
>>
>> The #endif should be here.
>>
>>
>>>> +
>>>> + /* First try within 32M limit from _etext to avoid branch trampolines */
>>>> + if (MODULES_VADDR < PAGE_OFFSET && MODULES_END > limit)
>
> Should also use start and end here instead of MODULES_VADDR and MODULES_END
The cleanest however should be to define MODULES_VADDR and MODULES_END all the time with a fallback
to VMALLOC_START/VMALLOC_END, to avoid the #ifdef.
The #ifdef was OK when we wanted to define modules_alloc() only when module area was different from
vmalloc area, but now that we want modules_alloc() at all time, MODULES_VADDR and MODULES_END should
be defined all the time.
>
>>>> - ptr = __module_alloc(size, limit, MODULES_END);
>>>> ++ ptr = __module_alloc(size, limit, end);
>>>> +
>>>> + if (!ptr)
>>>> - ptr = __module_alloc(size, MODULES_VADDR, MODULES_END);
>>>> ++#endif
>>>> ++ ptr = __module_alloc(size, start, end);
>>>> +
>>>> + return ptr;
>>>> +}
>>>> - #endif
>>>
>>> Unfortunately, it also needs this:
>>
>> Before the #endif is too far.
>>
>>>
>>> From: Stephen Rothwell <sfr@canb.auug.org.au>
>>> Date: Thu, 15 Apr 2021 19:53:58 +1000
>>> Subject: [PATCH] merge fix up for powerpc merge fix
>>>
>>> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
>>> ---
>>> arch/powerpc/kernel/module.c | 2 ++
>>> 1 file changed, 2 insertions(+)
>>>
>>> diff --git a/arch/powerpc/kernel/module.c b/arch/powerpc/kernel/module.c
>>> index d8ab1ad2eb05..c060f99afd4d 100644
>>> --- a/arch/powerpc/kernel/module.c
>>> +++ b/arch/powerpc/kernel/module.c
>>> @@ -110,7 +110,9 @@ void *module_alloc(unsigned long size)
>>> {
>>> unsigned long start = VMALLOC_START;
>>> unsigned long end = VMALLOC_END;
>>> +#ifdef MODULES_VADDR
>>> unsigned long limit = (unsigned long)_etext - SZ_32M;
>>> +#endif
>>> void *ptr = NULL;
>>> #ifdef MODULES_VADDR
>>>
^ permalink raw reply [flat|nested] 32+ messages in thread
* linux-next: manual merge of the akpm-current tree with the powerpc tree
@ 2020-12-08 9:40 Stephen Rothwell
2020-12-17 0:48 ` Stephen Rothwell
0 siblings, 1 reply; 32+ messages in thread
From: Stephen Rothwell @ 2020-12-08 9:40 UTC (permalink / raw)
To: Andrew Morton, Michael Ellerman, PowerPC
Cc: Francis Laniel, Ganesh Goudar, Linux Kernel Mailing List,
Linux Next Mailing List, Mahesh Salgaonkar
[-- Attachment #1: Type: text/plain, Size: 2145 bytes --]
Hi all,
Today's linux-next merge of the akpm-current tree got conflicts in:
drivers/misc/lkdtm/Makefile
drivers/misc/lkdtm/lkdtm.h
tools/testing/selftests/lkdtm/tests.txt
between commit:
3ba150fb2120 ("lkdtm/powerpc: Add SLB multihit test")
from the powerpc tree and commit:
014a486edd8a ("drivers/misc/lkdtm: add new file in LKDTM to test fortified strscpy")
from the akpm-current tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
--
Cheers,
Stephen Rothwell
diff --cc drivers/misc/lkdtm/Makefile
index 5a92c74eca92,d898f7b22045..000000000000
--- a/drivers/misc/lkdtm/Makefile
+++ b/drivers/misc/lkdtm/Makefile
@@@ -10,7 -10,7 +10,8 @@@ lkdtm-$(CONFIG_LKDTM) += rodata_objcop
lkdtm-$(CONFIG_LKDTM) += usercopy.o
lkdtm-$(CONFIG_LKDTM) += stackleak.o
lkdtm-$(CONFIG_LKDTM) += cfi.o
+ lkdtm-$(CONFIG_LKDTM) += fortify.o
+lkdtm-$(CONFIG_PPC_BOOK3S_64) += powerpc.o
KASAN_SANITIZE_stackleak.o := n
KCOV_INSTRUMENT_rodata.o := n
diff --cc drivers/misc/lkdtm/lkdtm.h
index 79ec05c18dd1,6aa6d6a1a839..000000000000
--- a/drivers/misc/lkdtm/lkdtm.h
+++ b/drivers/misc/lkdtm/lkdtm.h
@@@ -102,7 -104,7 +104,10 @@@ void lkdtm_STACKLEAK_ERASING(void)
/* cfi.c */
void lkdtm_CFI_FORWARD_PROTO(void);
+ /* fortify.c */
+ void lkdtm_FORTIFIED_STRSCPY(void);
+
+/* powerpc.c */
+void lkdtm_PPC_SLB_MULTIHIT(void);
+
#endif
diff --cc tools/testing/selftests/lkdtm/tests.txt
index 18e4599863c0,92ba4cc41314..000000000000
--- a/tools/testing/selftests/lkdtm/tests.txt
+++ b/tools/testing/selftests/lkdtm/tests.txt
@@@ -68,4 -68,4 +68,5 @@@ USERCOPY_STACK_BEYON
USERCOPY_KERNEL
STACKLEAK_ERASING OK: the rest of the thread stack is properly erased
CFI_FORWARD_PROTO
+ FORTIFIED_STRSCPY
+PPC_SLB_MULTIHIT Recovered
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: linux-next: manual merge of the akpm-current tree with the powerpc tree
2020-12-08 9:40 Stephen Rothwell
@ 2020-12-17 0:48 ` Stephen Rothwell
0 siblings, 0 replies; 32+ messages in thread
From: Stephen Rothwell @ 2020-12-17 0:48 UTC (permalink / raw)
To: Michael Ellerman
Cc: Andrew Morton, PowerPC, Francis Laniel, Ganesh Goudar,
Linux Kernel Mailing List, Linux Next Mailing List,
Mahesh Salgaonkar
[-- Attachment #1: Type: text/plain, Size: 2425 bytes --]
Hi all,
On Tue, 8 Dec 2020 20:40:16 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the akpm-current tree got conflicts in:
>
> drivers/misc/lkdtm/Makefile
> drivers/misc/lkdtm/lkdtm.h
> tools/testing/selftests/lkdtm/tests.txt
>
> between commit:
>
> 3ba150fb2120 ("lkdtm/powerpc: Add SLB multihit test")
>
> from the powerpc tree and commit:
>
> 014a486edd8a ("drivers/misc/lkdtm: add new file in LKDTM to test fortified strscpy")
>
> from the akpm-current tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
>
>
> diff --cc drivers/misc/lkdtm/Makefile
> index 5a92c74eca92,d898f7b22045..000000000000
> --- a/drivers/misc/lkdtm/Makefile
> +++ b/drivers/misc/lkdtm/Makefile
> @@@ -10,7 -10,7 +10,8 @@@ lkdtm-$(CONFIG_LKDTM) += rodata_objcop
> lkdtm-$(CONFIG_LKDTM) += usercopy.o
> lkdtm-$(CONFIG_LKDTM) += stackleak.o
> lkdtm-$(CONFIG_LKDTM) += cfi.o
> + lkdtm-$(CONFIG_LKDTM) += fortify.o
> +lkdtm-$(CONFIG_PPC_BOOK3S_64) += powerpc.o
>
> KASAN_SANITIZE_stackleak.o := n
> KCOV_INSTRUMENT_rodata.o := n
> diff --cc drivers/misc/lkdtm/lkdtm.h
> index 79ec05c18dd1,6aa6d6a1a839..000000000000
> --- a/drivers/misc/lkdtm/lkdtm.h
> +++ b/drivers/misc/lkdtm/lkdtm.h
> @@@ -102,7 -104,7 +104,10 @@@ void lkdtm_STACKLEAK_ERASING(void)
> /* cfi.c */
> void lkdtm_CFI_FORWARD_PROTO(void);
>
> + /* fortify.c */
> + void lkdtm_FORTIFIED_STRSCPY(void);
> +
> +/* powerpc.c */
> +void lkdtm_PPC_SLB_MULTIHIT(void);
> +
> #endif
> diff --cc tools/testing/selftests/lkdtm/tests.txt
> index 18e4599863c0,92ba4cc41314..000000000000
> --- a/tools/testing/selftests/lkdtm/tests.txt
> +++ b/tools/testing/selftests/lkdtm/tests.txt
> @@@ -68,4 -68,4 +68,5 @@@ USERCOPY_STACK_BEYON
> USERCOPY_KERNEL
> STACKLEAK_ERASING OK: the rest of the thread stack is properly erased
> CFI_FORWARD_PROTO
> + FORTIFIED_STRSCPY
> +PPC_SLB_MULTIHIT Recovered
These conflicts are now between the powerpc tree and Linus' tree.
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 32+ messages in thread
* linux-next: manual merge of the akpm-current tree with the powerpc tree
@ 2020-09-17 8:57 Stephen Rothwell
0 siblings, 0 replies; 32+ messages in thread
From: Stephen Rothwell @ 2020-09-17 8:57 UTC (permalink / raw)
To: Andrew Morton, Michael Ellerman, PowerPC
Cc: Mike Rapoport, Christophe Leroy, Linux Next Mailing List,
Linux Kernel Mailing List
[-- Attachment #1: Type: text/plain, Size: 1440 bytes --]
Hi all,
Today's linux-next merge of the akpm-current tree got a conflict in:
arch/powerpc/mm/kasan/kasan_init_32.c
between commit:
4c42dc5c69a8 ("powerpc/kasan: Fix CONFIG_KASAN_VMALLOC for 8xx")
from the powerpc tree and commit:
76713c119a9d ("arch, drivers: replace for_each_membock() with for_each_mem_range()")
from the akpm-current tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
--
Cheers,
Stephen Rothwell
diff --cc arch/powerpc/mm/kasan/kasan_init_32.c
index 929716ea21e9,26fda3203320..000000000000
--- a/arch/powerpc/mm/kasan/kasan_init_32.c
+++ b/arch/powerpc/mm/kasan/kasan_init_32.c
@@@ -137,12 -138,12 +137,12 @@@ void __init kasan_mmu_init(void
void __init kasan_init(void)
{
- struct memblock_region *reg;
+ phys_addr_t base, end;
+ int ret;
+ u64 i;
- for_each_memblock(memory, reg) {
- phys_addr_t base = reg->base;
- phys_addr_t top = min(base + reg->size, total_lowmem);
+ for_each_mem_range(i, &base, &end) {
+ phys_addr_t top = min(end, total_lowmem);
- int ret;
if (base >= top)
continue;
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 32+ messages in thread
* linux-next: manual merge of the akpm-current tree with the powerpc tree
@ 2020-06-03 8:50 Stephen Rothwell
0 siblings, 0 replies; 32+ messages in thread
From: Stephen Rothwell @ 2020-06-03 8:50 UTC (permalink / raw)
To: Andrew Morton, Michael Ellerman, PowerPC
Cc: Linux Next Mailing List, Linux Kernel Mailing List,
Christophe Leroy, Mike Rapoport
[-- Attachment #1: Type: text/plain, Size: 1860 bytes --]
Hi all,
Today's linux-next merge of the akpm-current tree got a conflict in:
arch/powerpc/mm/ptdump/ptdump.c
between commit:
6b789a26d7da ("powerpc/ptdump: Handle hugepd at PGD level")
from the powerpc tree and patch:
"powerpc: add support for folded p4d page tables"
from the akpm-current tree.
Thanks to Michael Ellerman for an example resolution.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
--
Cheers,
Stephen Rothwell
diff --cc arch/powerpc/mm/ptdump/ptdump.c
index 5fc880e30175,507cb9793b26..000000000000
--- a/arch/powerpc/mm/ptdump/ptdump.c
+++ b/arch/powerpc/mm/ptdump/ptdump.c
@@@ -333,13 -304,13 +333,15 @@@ static void walk_pagetables(struct pg_s
* the hash pagetable.
*/
for (i = pgd_index(addr); i < PTRS_PER_PGD; i++, pgd++, addr += PGDIR_SIZE) {
- if (pgd_none(*pgd) || pgd_is_leaf(*pgd))
- note_page(st, addr, 1, pgd_val(*pgd), PGDIR_SIZE);
- else if (is_hugepd(__hugepd(pgd_val(*pgd))))
- walk_hugepd(st, (hugepd_t *)pgd, addr, PGDIR_SHIFT, 1);
+ p4d_t *p4d = p4d_offset(pgd, 0);
+
- if (!p4d_none(*p4d) && !p4d_is_leaf(*p4d))
++ if (p4d_none(*p4d) || p4d_is_leaf(*p4d))
++ note_page(st, addr, 1, p4d_val(*p4d), PGDIR_SIZE);
++ else if (is_hugepd(__hugepd(p4d_val(*p4d))))
++ walk_hugepd(st, (hugepd_t *)p4d, addr, PGDIR_SHIFT, 1);
+ else
- /* pgd exists */
- walk_pud(st, pgd, addr);
+ /* p4d exists */
+ walk_pud(st, p4d, addr);
- else
- note_page(st, addr, 1, p4d_val(*p4d));
}
}
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 32+ messages in thread
* linux-next: manual merge of the akpm-current tree with the powerpc tree
@ 2019-07-08 11:43 Stephen Rothwell
0 siblings, 0 replies; 32+ messages in thread
From: Stephen Rothwell @ 2019-07-08 11:43 UTC (permalink / raw)
To: Andrew Morton, Michael Ellerman, PowerPC
Cc: Linux Next Mailing List, Linux Kernel Mailing List, Aneesh Kumar K.V
[-- Attachment #1: Type: text/plain, Size: 1899 bytes --]
Hi all,
Today's linux-next merge of the akpm-current tree got a conflict in:
arch/powerpc/include/asm/pgtable.h
between commit:
d6eacedd1f0e ("powerpc/book3s: Use config independent helpers for page table walk")
from the powerpc tree and commit:
be66a174b253 ("mm/nvdimm: add is_ioremap_addr and use that to check ioremap address")
from the akpm-current tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
--
Cheers,
Stephen Rothwell
diff --cc arch/powerpc/include/asm/pgtable.h
index bf7d771f342e,64145751b2fd..000000000000
--- a/arch/powerpc/include/asm/pgtable.h
+++ b/arch/powerpc/include/asm/pgtable.h
@@@ -140,30 -140,20 +140,44 @@@ static inline void pte_frag_set(mm_cont
}
#endif
+#ifndef pmd_is_leaf
+#define pmd_is_leaf pmd_is_leaf
+static inline bool pmd_is_leaf(pmd_t pmd)
+{
+ return false;
+}
+#endif
+
+#ifndef pud_is_leaf
+#define pud_is_leaf pud_is_leaf
+static inline bool pud_is_leaf(pud_t pud)
+{
+ return false;
+}
+#endif
+
+#ifndef pgd_is_leaf
+#define pgd_is_leaf pgd_is_leaf
+static inline bool pgd_is_leaf(pgd_t pgd)
+{
+ return false;
+}
+#endif
+
+ #ifdef CONFIG_PPC64
+ #define is_ioremap_addr is_ioremap_addr
+ static inline bool is_ioremap_addr(const void *x)
+ {
+ #ifdef CONFIG_MMU
+ unsigned long addr = (unsigned long)x;
+
+ return addr >= IOREMAP_BASE && addr < IOREMAP_END;
+ #else
+ return false;
+ #endif
+ }
+ #endif /* CONFIG_PPC64 */
+
#endif /* __ASSEMBLY__ */
#endif /* _ASM_POWERPC_PGTABLE_H */
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 32+ messages in thread
* linux-next: manual merge of the akpm-current tree with the powerpc tree
@ 2019-04-23 8:57 Stephen Rothwell
0 siblings, 0 replies; 32+ messages in thread
From: Stephen Rothwell @ 2019-04-23 8:57 UTC (permalink / raw)
To: Andrew Morton, Michael Ellerman, PowerPC
Cc: Linux Next Mailing List, Linux Kernel Mailing List,
Aneesh Kumar K.V, Michal Hocko, Laurent Vivier,
David Hildenbrand
[-- Attachment #1: Type: text/plain, Size: 2413 bytes --]
Hi all,
Today's linux-next merge of the akpm-current tree got a conflict in:
arch/powerpc/mm/mem.c
between commit:
f172acbfae1a ("powerpc/mm: move warning from resize_hpt_for_hotplug()")
26ad26718dfa ("powerpc/mm: Fix section mismatch warning")
from the powerpc tree and commit:
fc6a586376ab ("mm, memory_hotplug: provide a more generic restrictions for memory hotplug")
e8b6bc564e97 ("mm/memory_hotplug: make __remove_pages() and arch_remove_memory() never fail")
from the akpm-current tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
--
Cheers,
Stephen Rothwell
diff --cc arch/powerpc/mm/mem.c
index e12bec98366f,cc9425fb9056..000000000000
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@@ -109,8 -109,8 +109,8 @@@ int __weak remove_section_mapping(unsig
return -ENODEV;
}
- int __ref arch_add_memory(int nid, u64 start, u64 size, struct vmem_altmap *altmap,
- bool want_memblock)
-int __meminit arch_add_memory(int nid, u64 start, u64 size,
- struct mhp_restrictions *restrictions)
++int __ref arch_add_memory(int nid, u64 start, u64 size,
++ struct mhp_restrictions *restrictions)
{
unsigned long start_pfn = start >> PAGE_SHIFT;
unsigned long nr_pages = size >> PAGE_SHIFT;
@@@ -131,8 -131,8 +131,8 @@@
}
#ifdef CONFIG_MEMORY_HOTREMOVE
- int __ref arch_remove_memory(int nid, u64 start, u64 size,
- struct vmem_altmap *altmap)
-void __meminit arch_remove_memory(int nid, u64 start, u64 size,
- struct vmem_altmap *altmap)
++void __ref arch_remove_memory(int nid, u64 start, u64 size,
++ struct vmem_altmap *altmap)
{
unsigned long start_pfn = start >> PAGE_SHIFT;
unsigned long nr_pages = size >> PAGE_SHIFT;
@@@ -161,10 -160,7 +160,8 @@@
*/
vm_unmap_aliases();
- resize_hpt_for_hotplug(memblock_phys_mem_size());
+ if (resize_hpt_for_hotplug(memblock_phys_mem_size()) == -ENOSPC)
+ pr_warn("Hash collision while resizing HPT\n");
-
- return ret;
}
#endif
#endif /* CONFIG_MEMORY_HOTPLUG */
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 32+ messages in thread
* linux-next: manual merge of the akpm-current tree with the powerpc tree
@ 2019-02-25 6:42 Stephen Rothwell
2019-02-25 6:44 ` Stephen Rothwell
0 siblings, 1 reply; 32+ messages in thread
From: Stephen Rothwell @ 2019-02-25 6:42 UTC (permalink / raw)
To: Andrew Morton, Michael Ellerman, PowerPC
Cc: Linux Next Mailing List, Linux Kernel Mailing List, Christophe Leroy
[-- Attachment #1: Type: text/plain, Size: 3268 bytes --]
Hi all,
Today's linux-next merge of the akpm-current tree got a conflict in:
arch/powerpc/kernel/irq.c
between commit:
c8e409a33cf8 ("powerpc/irq: use memblock functions returning virtual address")
and other patches in the powerpc tree
from the powerpc tree and patch:
"powerpc: use memblock functions returning virtual address"
from the akpm-current tree.
This file looks the same after applying either of those patches, so I
just used the powerpc version of the file due to the other changes.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
The akpm patch now looks like this:
diff --git a/arch/powerpc/kernel/dt_cpu_ftrs.c b/arch/powerpc/kernel/dt_cpu_ftrs.c
index e49bd5efcfe6..28c076c771de 100644
--- a/arch/powerpc/kernel/dt_cpu_ftrs.c
+++ b/arch/powerpc/kernel/dt_cpu_ftrs.c
@@ -810,7 +810,6 @@ static int __init process_cpufeatures_node(unsigned long node,
int len;
f = &dt_cpu_features[i];
- memset(f, 0, sizeof(struct dt_cpu_feature));
f->node = node;
@@ -1005,7 +1004,7 @@ static int __init dt_cpu_ftrs_scan_callback(unsigned long node, const char
/* Count and allocate space for cpu features */
of_scan_flat_dt_subnodes(node, count_cpufeatures_subnodes,
&nr_dt_cpu_features);
- dt_cpu_features = __va(memblock_phys_alloc(sizeof(struct dt_cpu_feature) * nr_dt_cpu_features, PAGE_SIZE));
+ dt_cpu_features = memblock_alloc(sizeof(struct dt_cpu_feature) * nr_dt_cpu_features, PAGE_SIZE);
cpufeatures_setup_start(isa);
diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c
index 8c890c6557ed..e7382abee868 100644
--- a/arch/powerpc/kernel/paca.c
+++ b/arch/powerpc/kernel/paca.c
@@ -196,7 +196,11 @@ void __init allocate_paca_ptrs(void)
paca_nr_cpu_ids = nr_cpu_ids;
paca_ptrs_size = sizeof(struct paca_struct *) * nr_cpu_ids;
- paca_ptrs = __va(memblock_phys_alloc(paca_ptrs_size, SMP_CACHE_BYTES));
+ paca_ptrs = memblock_alloc_raw(paca_ptrs_size, SMP_CACHE_BYTES);
+ if (!paca_ptrs)
+ panic("Failed to allocate %d bytes for paca pointers\n",
+ paca_ptrs_size);
+
memset(paca_ptrs, 0x88, paca_ptrs_size);
}
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index e97aaf201d67..c0ed4fa0b9d3 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -127,7 +127,10 @@ static void __init move_device_tree(void)
if ((memory_limit && (start + size) > PHYSICAL_START + memory_limit) ||
!memblock_is_memory(start + size - 1) ||
overlaps_crashkernel(start, size) || overlaps_initrd(start, size)) {
- p = __va(memblock_phys_alloc(size, PAGE_SIZE));
+ p = memblock_alloc_raw(size, PAGE_SIZE);
+ if (!p)
+ panic("Failed to allocate %lu bytes to move device tree\n",
+ size);
memcpy(p, initial_boot_params, size);
initial_boot_params = p;
DBG("Moved device tree to 0x%px\n", p);
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply related [flat|nested] 32+ messages in thread
* Re: linux-next: manual merge of the akpm-current tree with the powerpc tree
2019-02-25 6:42 Stephen Rothwell
@ 2019-02-25 6:44 ` Stephen Rothwell
0 siblings, 0 replies; 32+ messages in thread
From: Stephen Rothwell @ 2019-02-25 6:44 UTC (permalink / raw)
To: Andrew Morton, Michael Ellerman, PowerPC
Cc: Linux Next Mailing List, Linux Kernel Mailing List, Christophe Leroy
[-- Attachment #1: Type: text/plain, Size: 239 bytes --]
Hi all,
On Mon, 25 Feb 2019 17:42:48 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the akpm-current tree got a conflict in:
This was actually the akpm tree.
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 32+ messages in thread
* linux-next: manual merge of the akpm-current tree with the powerpc tree
@ 2019-02-25 6:16 Stephen Rothwell
0 siblings, 0 replies; 32+ messages in thread
From: Stephen Rothwell @ 2019-02-25 6:16 UTC (permalink / raw)
To: Andrew Morton, Michael Ellerman, PowerPC
Cc: Linux Next Mailing List, Linux Kernel Mailing List,
Christophe Leroy, Mike Rapoport
[-- Attachment #1: Type: text/plain, Size: 929 bytes --]
Hi all,
Today's linux-next merge of the akpm-current tree got a conflict in:
arch/powerpc/kernel/setup_64.c
between commits:
c8e409a33cf8 ("powerpc/irq: use memblock functions returning virtual address")
d608898abc74 ("powerpc: clean stack pointers naming")
from the powerpc tree and commit:
82af77ee7503 ("powerpc: prefer memblock APIs returning virtual address")
from the akpm-current tree.
Commits 82af77ee7503 and c8e409a33cf8 overlap.
I fixed it up (I just used the powerpc tree version of this file) and
can carry the fix as necessary. This is now fixed as far as linux-next
is concerned, but any non trivial conflicts should be mentioned to your
upstream maintainer when your tree is submitted for merging. You may
also want to consider cooperating with the maintainer of the conflicting
tree to minimise any particularly complex conflicts.
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 32+ messages in thread
* linux-next: manual merge of the akpm-current tree with the powerpc tree
@ 2018-12-06 6:44 Stephen Rothwell
2018-12-07 1:40 ` Joel Fernandes
0 siblings, 1 reply; 32+ messages in thread
From: Stephen Rothwell @ 2018-12-06 6:44 UTC (permalink / raw)
To: Andrew Morton, Michael Ellerman, Benjamin Herrenschmidt, PowerPC
Cc: Linux Next Mailing List, Linux Kernel Mailing List,
Joel Fernandes (Google),
Christophe Leroy
[-- Attachment #1: Type: text/plain, Size: 5611 bytes --]
Hi Andrew,
Today's linux-next merge of the akpm-current tree got conflicts in:
arch/powerpc/include/asm/book3s/32/pgalloc.h
arch/powerpc/include/asm/nohash/32/pgalloc.h
arch/powerpc/mm/pgtable-book3s64.c
between commits:
a95d133c8643 ("powerpc/mm: Move pte_fragment_alloc() to a common location")
32ea4c149990 ("powerpc/mm: Extend pte_fragment functionality to PPC32")
from the powerpc tree and commit:
913c2d755b39 ("mm: treewide: remove unused address argument from pte_alloc functions")
from the akpm-current tree.
I fixed it up (see below, plus the extra merge fix patch) and can
carry the fix as necessary. This is now fixed as far as linux-next is
concerned, but any non trivial conflicts should be mentioned to your
upstream maintainer when your tree is submitted for merging. You may
also want to consider cooperating with the maintainer of the conflicting
tree to minimise any particularly complex conflicts.
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 6 Dec 2018 17:41:27 +1100
Subject: [PATCH] fix up for "mm: treewide: remove unused address argument from
pte_alloc functions"
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
arch/powerpc/mm/pgtable-frag.c | 2 +-
arch/powerpc/mm/pgtable_32.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/mm/pgtable-frag.c b/arch/powerpc/mm/pgtable-frag.c
index af23a587f019..a7b05214760c 100644
--- a/arch/powerpc/mm/pgtable-frag.c
+++ b/arch/powerpc/mm/pgtable-frag.c
@@ -95,7 +95,7 @@ static pte_t *__alloc_for_ptecache(struct mm_struct *mm, int kernel)
return (pte_t *)ret;
}
-pte_t *pte_fragment_alloc(struct mm_struct *mm, unsigned long vmaddr, int kernel)
+pte_t *pte_fragment_alloc(struct mm_struct *mm, int kernel)
{
pte_t *pte;
diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c
index deda68e02338..5b1e1adeb4d2 100644
--- a/arch/powerpc/mm/pgtable_32.c
+++ b/arch/powerpc/mm/pgtable_32.c
@@ -48,12 +48,12 @@ __ref pte_t *pte_alloc_one_kernel(struct mm_struct *mm)
if (!slab_is_available())
return memblock_alloc(PTE_FRAG_SIZE, PTE_FRAG_SIZE);
- return (pte_t *)pte_fragment_alloc(mm, address, 1);
+ return (pte_t *)pte_fragment_alloc(mm, 1);
}
pgtable_t pte_alloc_one(struct mm_struct *mm)
{
- return (pgtable_t)pte_fragment_alloc(mm, address, 0);
+ return (pgtable_t)pte_fragment_alloc(mm, 0);
}
void __iomem *
--
2.19.1
--
Cheers,
Stephen Rothwell
diff --cc arch/powerpc/include/asm/book3s/32/pgalloc.h
index b5b955eb2fb7,af9e13555d95..000000000000
--- a/arch/powerpc/include/asm/book3s/32/pgalloc.h
+++ b/arch/powerpc/include/asm/book3s/32/pgalloc.h
@@@ -56,16 -61,29 +56,16 @@@ static inline void pmd_populate_kernel(
static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmdp,
pgtable_t pte_page)
{
- *pmdp = __pmd((page_to_pfn(pte_page) << PAGE_SHIFT) | _PMD_PRESENT);
-}
-
-#define pmd_pgtable(pmd) pmd_page(pmd)
-#else
-
-static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmdp,
- pte_t *pte)
-{
- *pmdp = __pmd((unsigned long)pte | _PMD_PRESENT);
-}
-
-static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmdp,
- pgtable_t pte_page)
-{
- *pmdp = __pmd((unsigned long)lowmem_page_address(pte_page) | _PMD_PRESENT);
+ *pmdp = __pmd(__pa(pte_page) | _PMD_PRESENT);
}
-#define pmd_pgtable(pmd) pmd_page(pmd)
-#endif
+#define pmd_pgtable(pmd) ((pgtable_t)pmd_page_vaddr(pmd))
- extern pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long addr);
- extern pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long addr);
+ extern pte_t *pte_alloc_one_kernel(struct mm_struct *mm);
+ extern pgtable_t pte_alloc_one(struct mm_struct *mm);
+void pte_frag_destroy(void *pte_frag);
- pte_t *pte_fragment_alloc(struct mm_struct *mm, unsigned long vmaddr, int kernel);
++pte_t *pte_fragment_alloc(struct mm_struct *mm, int kernel);
+void pte_fragment_free(unsigned long *table, int kernel);
static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
{
diff --cc arch/powerpc/include/asm/nohash/32/pgalloc.h
index 17963951bdb0,16623f53f0d4..000000000000
--- a/arch/powerpc/include/asm/nohash/32/pgalloc.h
+++ b/arch/powerpc/include/asm/nohash/32/pgalloc.h
@@@ -73,17 -77,14 +73,17 @@@ static inline void pmd_populate_kernel(
static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmdp,
pgtable_t pte_page)
{
- *pmdp = __pmd((unsigned long)lowmem_page_address(pte_page) | _PMD_PRESENT);
+ *pmdp = __pmd((unsigned long)pte_page | _PMD_PRESENT);
}
-#define pmd_pgtable(pmd) pmd_page(pmd)
+#define pmd_pgtable(pmd) ((pgtable_t)pmd_page_vaddr(pmd))
#endif
- extern pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long addr);
- extern pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long addr);
+ extern pte_t *pte_alloc_one_kernel(struct mm_struct *mm);
+ extern pgtable_t pte_alloc_one(struct mm_struct *mm);
+void pte_frag_destroy(void *pte_frag);
- pte_t *pte_fragment_alloc(struct mm_struct *mm, unsigned long vmaddr, int kernel);
++pte_t *pte_fragment_alloc(struct mm_struct *mm, int kernel);
+void pte_fragment_free(unsigned long *table, int kernel);
static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
{
diff --cc arch/powerpc/mm/pgtable-book3s64.c
index f3c31f5e1026,6f9d434b0a4c..000000000000
--- a/arch/powerpc/mm/pgtable-book3s64.c
+++ b/arch/powerpc/mm/pgtable-book3s64.c
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply related [flat|nested] 32+ messages in thread
* Re: linux-next: manual merge of the akpm-current tree with the powerpc tree
2018-12-06 6:44 Stephen Rothwell
@ 2018-12-07 1:40 ` Joel Fernandes
0 siblings, 0 replies; 32+ messages in thread
From: Joel Fernandes @ 2018-12-07 1:40 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Andrew Morton, Michael Ellerman, Benjamin Herrenschmidt, PowerPC,
Linux Next Mailing List, Linux Kernel Mailing List,
Christophe Leroy
On Thu, Dec 06, 2018 at 05:44:17PM +1100, Stephen Rothwell wrote:
> Hi Andrew,
>
> Today's linux-next merge of the akpm-current tree got conflicts in:
>
> arch/powerpc/include/asm/book3s/32/pgalloc.h
> arch/powerpc/include/asm/nohash/32/pgalloc.h
> arch/powerpc/mm/pgtable-book3s64.c
>
> between commits:
>
> a95d133c8643 ("powerpc/mm: Move pte_fragment_alloc() to a common location")
> 32ea4c149990 ("powerpc/mm: Extend pte_fragment functionality to PPC32")
>
> from the powerpc tree and commit:
>
> 913c2d755b39 ("mm: treewide: remove unused address argument from pte_alloc functions")
>
> from the akpm-current tree.
>
> I fixed it up (see below, plus the extra merge fix patch) and can
> carry the fix as necessary. This is now fixed as far as linux-next is
> concerned, but any non trivial conflicts should be mentioned to your
> upstream maintainer when your tree is submitted for merging. You may
> also want to consider cooperating with the maintainer of the conflicting
> tree to minimise any particularly complex conflicts.
The conflict resolution looks good to me.
Reviewed-by: Joel Fernandes (Google) <joel@joelfernandes.org>
thanks,
- Joel
^ permalink raw reply [flat|nested] 32+ messages in thread
* linux-next: manual merge of the akpm-current tree with the powerpc tree
@ 2016-05-02 7:20 Stephen Rothwell
2016-05-02 11:17 ` Aneesh Kumar K.V
0 siblings, 1 reply; 32+ messages in thread
From: Stephen Rothwell @ 2016-05-02 7:20 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-next, linux-kernel, Hugh Dickins, Aneesh Kumar K.V
Hi Andrew,
Today's linux-next merge of the akpm-current tree got a conflict in:
arch/powerpc/include/asm/book3s/64/pgtable.h
between commit:
dbaba7a16b7b ("powerpc/mm: THP is only available on hash64 as of now")
from the powerpc tree and commit:
383b50a4e356 ("arch: fix has_transparent_hugepage()")
from the akpm-current tree.
I fixed it up (see below - the code moved) and can carry the fix as
necessary. This is now fixed as far as linux-next is concerned, but any
non trivial conflicts should be mentioned to your upstream maintainer
when your tree is submitted for merging. You may also want to consider
cooperating with the maintainer of the conflicting tree to minimise any
particularly complex conflicts.
--
Cheers,
Stephen Rothwell
diff --cc arch/powerpc/include/asm/book3s/64/pgtable.h
index 48dc76c13094,8fe6f6b48aa5..000000000000
--- a/arch/powerpc/include/asm/book3s/64/pgtable.h
+++ b/arch/powerpc/include/asm/book3s/64/pgtable.h
@@@ -820,86 -265,9 +820,87 @@@ static inline int pmd_protnone(pmd_t pm
#define __HAVE_ARCH_PMD_WRITE
#define pmd_write(pmd) pte_write(pmd_pte(pmd))
+#ifdef CONFIG_TRANSPARENT_HUGEPAGE
+extern pmd_t pfn_pmd(unsigned long pfn, pgprot_t pgprot);
+extern pmd_t mk_pmd(struct page *page, pgprot_t pgprot);
+extern pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot);
+extern void set_pmd_at(struct mm_struct *mm, unsigned long addr,
+ pmd_t *pmdp, pmd_t pmd);
+extern void update_mmu_cache_pmd(struct vm_area_struct *vma, unsigned long addr,
+ pmd_t *pmd);
+extern int hash__has_transparent_hugepage(void);
++#define has_transparent_hugepage has_transparent_hugepage
+static inline int has_transparent_hugepage(void)
+{
+ if (radix_enabled())
+ return radix__has_transparent_hugepage();
+ return hash__has_transparent_hugepage();
+}
+
+static inline unsigned long
+pmd_hugepage_update(struct mm_struct *mm, unsigned long addr, pmd_t *pmdp,
+ unsigned long clr, unsigned long set)
+{
+ if (radix_enabled())
+ return radix__pmd_hugepage_update(mm, addr, pmdp, clr, set);
+ return hash__pmd_hugepage_update(mm, addr, pmdp, clr, set);
+}
+
+static inline int pmd_large(pmd_t pmd)
+{
+ return !!(pmd_val(pmd) & _PAGE_PTE);
+}
+
+static inline pmd_t pmd_mknotpresent(pmd_t pmd)
+{
+ return __pmd(pmd_val(pmd) & ~_PAGE_PRESENT);
+}
+/*
+ * For radix we should always find H_PAGE_HASHPTE zero. Hence
+ * the below will work for radix too
+ */
+static inline int __pmdp_test_and_clear_young(struct mm_struct *mm,
+ unsigned long addr, pmd_t *pmdp)
+{
+ unsigned long old;
+
+ if ((pmd_val(*pmdp) & (_PAGE_ACCESSED | H_PAGE_HASHPTE)) == 0)
+ return 0;
+ old = pmd_hugepage_update(mm, addr, pmdp, _PAGE_ACCESSED, 0);
+ return ((old & _PAGE_ACCESSED) != 0);
+}
+
+#define __HAVE_ARCH_PMDP_SET_WRPROTECT
+static inline void pmdp_set_wrprotect(struct mm_struct *mm, unsigned long addr,
+ pmd_t *pmdp)
+{
+
+ if ((pmd_val(*pmdp) & _PAGE_WRITE) == 0)
+ return;
+
+ pmd_hugepage_update(mm, addr, pmdp, _PAGE_WRITE, 0);
+}
+
+static inline int pmd_trans_huge(pmd_t pmd)
+{
+ if (radix_enabled())
+ return radix__pmd_trans_huge(pmd);
+ return hash__pmd_trans_huge(pmd);
+}
+
+#define __HAVE_ARCH_PMD_SAME
+static inline int pmd_same(pmd_t pmd_a, pmd_t pmd_b)
+{
+ if (radix_enabled())
+ return radix__pmd_same(pmd_a, pmd_b);
+ return hash__pmd_same(pmd_a, pmd_b);
+}
+
static inline pmd_t pmd_mkhuge(pmd_t pmd)
{
- return __pmd(pmd_val(pmd) | (_PAGE_PTE | _PAGE_THP_HUGE));
+ if (radix_enabled())
+ return radix__pmd_mkhuge(pmd);
+ return hash__pmd_mkhuge(pmd);
}
#define __HAVE_ARCH_PMDP_SET_ACCESS_FLAGS
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: linux-next: manual merge of the akpm-current tree with the powerpc tree
2016-05-02 7:20 Stephen Rothwell
@ 2016-05-02 11:17 ` Aneesh Kumar K.V
0 siblings, 0 replies; 32+ messages in thread
From: Aneesh Kumar K.V @ 2016-05-02 11:17 UTC (permalink / raw)
To: Stephen Rothwell, Andrew Morton; +Cc: linux-next, linux-kernel, Hugh Dickins
Stephen Rothwell <sfr@canb.auug.org.au> writes:
> Hi Andrew,
>
> Today's linux-next merge of the akpm-current tree got a conflict in:
>
> arch/powerpc/include/asm/book3s/64/pgtable.h
>
> between commit:
>
> dbaba7a16b7b ("powerpc/mm: THP is only available on hash64 as of now")
>
> from the powerpc tree and commit:
>
> 383b50a4e356 ("arch: fix has_transparent_hugepage()")
>
> from the akpm-current tree.
>
> I fixed it up (see below - the code moved) and can carry the fix as
> necessary. This is now fixed as far as linux-next is concerned, but any
> non trivial conflicts should be mentioned to your upstream maintainer
> when your tree is submitted for merging. You may also want to consider
> cooperating with the maintainer of the conflicting tree to minimise any
> particularly complex conflicts.
>
looks good.
> --
> Cheers,
> Stephen Rothwell
>
> diff --cc arch/powerpc/include/asm/book3s/64/pgtable.h
> index 48dc76c13094,8fe6f6b48aa5..000000000000
> --- a/arch/powerpc/include/asm/book3s/64/pgtable.h
> +++ b/arch/powerpc/include/asm/book3s/64/pgtable.h
> @@@ -820,86 -265,9 +820,87 @@@ static inline int pmd_protnone(pmd_t pm
> #define __HAVE_ARCH_PMD_WRITE
> #define pmd_write(pmd) pte_write(pmd_pte(pmd))
>
> +#ifdef CONFIG_TRANSPARENT_HUGEPAGE
> +extern pmd_t pfn_pmd(unsigned long pfn, pgprot_t pgprot);
> +extern pmd_t mk_pmd(struct page *page, pgprot_t pgprot);
> +extern pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot);
> +extern void set_pmd_at(struct mm_struct *mm, unsigned long addr,
> + pmd_t *pmdp, pmd_t pmd);
> +extern void update_mmu_cache_pmd(struct vm_area_struct *vma, unsigned long addr,
> + pmd_t *pmd);
> +extern int hash__has_transparent_hugepage(void);
> ++#define has_transparent_hugepage has_transparent_hugepage
> +static inline int has_transparent_hugepage(void)
> +{
> + if (radix_enabled())
> + return radix__has_transparent_hugepage();
> + return hash__has_transparent_hugepage();
> +}
> +
> +static inline unsigned long
> +pmd_hugepage_update(struct mm_struct *mm, unsigned long addr, pmd_t *pmdp,
> + unsigned long clr, unsigned long set)
> +{
> + if (radix_enabled())
> + return radix__pmd_hugepage_update(mm, addr, pmdp, clr, set);
> + return hash__pmd_hugepage_update(mm, addr, pmdp, clr, set);
> +}
> +
> +static inline int pmd_large(pmd_t pmd)
> +{
> + return !!(pmd_val(pmd) & _PAGE_PTE);
> +}
> +
> +static inline pmd_t pmd_mknotpresent(pmd_t pmd)
> +{
> + return __pmd(pmd_val(pmd) & ~_PAGE_PRESENT);
> +}
> +/*
> + * For radix we should always find H_PAGE_HASHPTE zero. Hence
> + * the below will work for radix too
> + */
> +static inline int __pmdp_test_and_clear_young(struct mm_struct *mm,
> + unsigned long addr, pmd_t *pmdp)
> +{
> + unsigned long old;
> +
> + if ((pmd_val(*pmdp) & (_PAGE_ACCESSED | H_PAGE_HASHPTE)) == 0)
> + return 0;
> + old = pmd_hugepage_update(mm, addr, pmdp, _PAGE_ACCESSED, 0);
> + return ((old & _PAGE_ACCESSED) != 0);
> +}
> +
> +#define __HAVE_ARCH_PMDP_SET_WRPROTECT
> +static inline void pmdp_set_wrprotect(struct mm_struct *mm, unsigned long addr,
> + pmd_t *pmdp)
> +{
> +
> + if ((pmd_val(*pmdp) & _PAGE_WRITE) == 0)
> + return;
> +
> + pmd_hugepage_update(mm, addr, pmdp, _PAGE_WRITE, 0);
> +}
> +
> +static inline int pmd_trans_huge(pmd_t pmd)
> +{
> + if (radix_enabled())
> + return radix__pmd_trans_huge(pmd);
> + return hash__pmd_trans_huge(pmd);
> +}
> +
> +#define __HAVE_ARCH_PMD_SAME
> +static inline int pmd_same(pmd_t pmd_a, pmd_t pmd_b)
> +{
> + if (radix_enabled())
> + return radix__pmd_same(pmd_a, pmd_b);
> + return hash__pmd_same(pmd_a, pmd_b);
> +}
> +
> static inline pmd_t pmd_mkhuge(pmd_t pmd)
> {
> - return __pmd(pmd_val(pmd) | (_PAGE_PTE | _PAGE_THP_HUGE));
> + if (radix_enabled())
> + return radix__pmd_mkhuge(pmd);
> + return hash__pmd_mkhuge(pmd);
> }
>
> #define __HAVE_ARCH_PMDP_SET_ACCESS_FLAGS
^ permalink raw reply [flat|nested] 32+ messages in thread
* linux-next: manual merge of the akpm-current tree with the powerpc tree
@ 2016-03-04 7:49 Stephen Rothwell
0 siblings, 0 replies; 32+ messages in thread
From: Stephen Rothwell @ 2016-03-04 7:49 UTC (permalink / raw)
To: Andrew Morton, Michael Ellerman, Benjamin Herrenschmidt, linuxppc-dev
Cc: linux-next, linux-kernel, Kirill A. Shutemov, Ebru Akagunduz
Hi all,
Today's linux-next merge of the akpm-current tree got a conflict in:
mm/huge_memory.c
between commit:
ff20c2e0acc5 ("mm: Some arch may want to use HPAGE_PMD related values as variables")
from the powerpc tree and commit:
82fdbe051e29 ("mm: make optimistic check for swapin readahead")
from the akpm-current tree.
I fixed it up (see below) and can carry the fix as necessary (no action
is required).
--
Cheers,
Stephen Rothwell
diff --cc mm/huge_memory.c
index 43b11a695113,5b38aa24566f..000000000000
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@@ -98,7 -100,8 +100,8 @@@ static DECLARE_WAIT_QUEUE_HEAD(khugepag
* it would have happened if the vma was large enough during page
* fault.
*/
-static unsigned int khugepaged_max_ptes_none __read_mostly = HPAGE_PMD_NR-1;
-static unsigned int khugepaged_max_ptes_swap __read_mostly = HPAGE_PMD_NR/8;
+static unsigned int khugepaged_max_ptes_none __read_mostly;
++static unsigned int khugepaged_max_ptes_swap __read_mostly;
static int khugepaged(void *none);
static int khugepaged_slab_init(void);
@@@ -660,18 -691,6 +691,19 @@@ static int __init hugepage_init(void
return -EINVAL;
}
+ khugepaged_pages_to_scan = HPAGE_PMD_NR * 8;
+ khugepaged_max_ptes_none = HPAGE_PMD_NR - 1;
++ khugepaged_max_ptes_swap = HPAGE_PMD_NR / 8;
+ /*
+ * hugepages can't be allocated by the buddy allocator
+ */
+ MAYBE_BUILD_BUG_ON(HPAGE_PMD_ORDER >= MAX_ORDER);
+ /*
+ * we use page->mapping and page->index in second tail page
+ * as list_head: assuming THP order >= 2
+ */
+ MAYBE_BUILD_BUG_ON(HPAGE_PMD_ORDER < 2);
+
err = hugepage_init_sysfs(&hugepage_kobj);
if (err)
goto err_sysfs;
^ permalink raw reply [flat|nested] 32+ messages in thread
* linux-next: manual merge of the akpm-current tree with the powerpc tree
@ 2015-12-18 5:33 Stephen Rothwell
2016-01-07 9:15 ` Stephen Rothwell
0 siblings, 1 reply; 32+ messages in thread
From: Stephen Rothwell @ 2015-12-18 5:33 UTC (permalink / raw)
To: Andrew Morton, Michael Ellerman, Benjamin Herrenschmidt, linuxppc-dev
Cc: linux-next, linux-kernel, Aneesh Kumar K.V
Hi Andrew,
Today's linux-next merge of the akpm-current tree got a conflict in:
arch/powerpc/include/asm/pgtable.h
between commit:
ee4889c7bc2a ("powerpc/mm: Don't have generic headers introduce functions touching pte bits")
from the powerpc tree and commit:
e0e8474c0d55 ("mm, dax, gpu: convert vm_insert_mixed to pfn_t")
from the akpm-current tree.
I fixed it up (the code being changed was moved from this file - I added
the fix up patch below) and can carry the fix as necessary (no action
is required).
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 18 Dec 2015 16:30:47 +1100
Subject: [PATCH] mm, dax, gpu: merge fix for convert vm_insert_mixed to pfn_t
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
arch/powerpc/include/asm/book3s/32/pgtable.h | 1 +
arch/powerpc/include/asm/book3s/64/hash.h | 1 +
arch/powerpc/include/asm/nohash/pgtable.h | 1 +
3 files changed, 3 insertions(+)
diff --git a/arch/powerpc/include/asm/book3s/32/pgtable.h b/arch/powerpc/include/asm/book3s/32/pgtable.h
index 38b33dcfcc9d..3ed3303c1295 100644
--- a/arch/powerpc/include/asm/book3s/32/pgtable.h
+++ b/arch/powerpc/include/asm/book3s/32/pgtable.h
@@ -313,6 +313,7 @@ static inline int pte_present(pte_t pte)
* Even if PTEs can be unsigned long long, a PFN is always an unsigned
* long for now.
*/
+#define pfn_pte pfn_pte
static inline pte_t pfn_pte(unsigned long pfn, pgprot_t pgprot)
{
return __pte(((pte_basic_t)(pfn) << PTE_RPN_SHIFT) |
diff --git a/arch/powerpc/include/asm/book3s/64/hash.h b/arch/powerpc/include/asm/book3s/64/hash.h
index 9e861b4378bd..6ab967d0da00 100644
--- a/arch/powerpc/include/asm/book3s/64/hash.h
+++ b/arch/powerpc/include/asm/book3s/64/hash.h
@@ -410,6 +410,7 @@ static inline int pte_present(pte_t pte)
* Even if PTEs can be unsigned long long, a PFN is always an unsigned
* long for now.
*/
+#define pfn_pte pfn_pte
static inline pte_t pfn_pte(unsigned long pfn, pgprot_t pgprot)
{
return __pte(((pte_basic_t)(pfn) << PTE_RPN_SHIFT) |
diff --git a/arch/powerpc/include/asm/nohash/pgtable.h b/arch/powerpc/include/asm/nohash/pgtable.h
index 1263c22d60d8..11e3767216c0 100644
--- a/arch/powerpc/include/asm/nohash/pgtable.h
+++ b/arch/powerpc/include/asm/nohash/pgtable.h
@@ -49,6 +49,7 @@ static inline int pte_present(pte_t pte)
* Even if PTEs can be unsigned long long, a PFN is always an unsigned
* long for now.
*/
+#define pfn_pte pfn_pte
static inline pte_t pfn_pte(unsigned long pfn, pgprot_t pgprot) {
return __pte(((pte_basic_t)(pfn) << PTE_RPN_SHIFT) |
pgprot_val(pgprot)); }
--
2.6.2
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
^ permalink raw reply related [flat|nested] 32+ messages in thread
* Re: linux-next: manual merge of the akpm-current tree with the powerpc tree
2015-12-18 5:33 Stephen Rothwell
@ 2016-01-07 9:15 ` Stephen Rothwell
2016-01-07 17:15 ` Aneesh Kumar K.V
0 siblings, 1 reply; 32+ messages in thread
From: Stephen Rothwell @ 2016-01-07 9:15 UTC (permalink / raw)
To: Andrew Morton, Michael Ellerman, Benjamin Herrenschmidt, linuxppc-dev
Cc: linux-next, linux-kernel, Aneesh Kumar K.V
Hi all,
On Fri, 18 Dec 2015 16:33:51 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the akpm-current tree got a conflict in:
>
> arch/powerpc/include/asm/pgtable.h
>
> between commit:
>
> ee4889c7bc2a ("powerpc/mm: Don't have generic headers introduce functions touching pte bits")
>
> from the powerpc tree and commit:
>
> e0e8474c0d55 ("mm, dax, gpu: convert vm_insert_mixed to pfn_t")
>
> from the akpm-current tree.
>
> I fixed it up (the code being changed was moved from this file - I added
> the fix up patch below) and can carry the fix as necessary (no action
> is required).
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Fri, 18 Dec 2015 16:30:47 +1100
> Subject: [PATCH] mm, dax, gpu: merge fix for convert vm_insert_mixed to pfn_t
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
> arch/powerpc/include/asm/book3s/32/pgtable.h | 1 +
> arch/powerpc/include/asm/book3s/64/hash.h | 1 +
> arch/powerpc/include/asm/nohash/pgtable.h | 1 +
> 3 files changed, 3 insertions(+)
>
> diff --git a/arch/powerpc/include/asm/book3s/32/pgtable.h b/arch/powerpc/include/asm/book3s/32/pgtable.h
> index 38b33dcfcc9d..3ed3303c1295 100644
> --- a/arch/powerpc/include/asm/book3s/32/pgtable.h
> +++ b/arch/powerpc/include/asm/book3s/32/pgtable.h
> @@ -313,6 +313,7 @@ static inline int pte_present(pte_t pte)
> * Even if PTEs can be unsigned long long, a PFN is always an unsigned
> * long for now.
> */
> +#define pfn_pte pfn_pte
> static inline pte_t pfn_pte(unsigned long pfn, pgprot_t pgprot)
> {
> return __pte(((pte_basic_t)(pfn) << PTE_RPN_SHIFT) |
> diff --git a/arch/powerpc/include/asm/book3s/64/hash.h b/arch/powerpc/include/asm/book3s/64/hash.h
> index 9e861b4378bd..6ab967d0da00 100644
> --- a/arch/powerpc/include/asm/book3s/64/hash.h
> +++ b/arch/powerpc/include/asm/book3s/64/hash.h
> @@ -410,6 +410,7 @@ static inline int pte_present(pte_t pte)
> * Even if PTEs can be unsigned long long, a PFN is always an unsigned
> * long for now.
> */
> +#define pfn_pte pfn_pte
> static inline pte_t pfn_pte(unsigned long pfn, pgprot_t pgprot)
> {
> return __pte(((pte_basic_t)(pfn) << PTE_RPN_SHIFT) |
> diff --git a/arch/powerpc/include/asm/nohash/pgtable.h b/arch/powerpc/include/asm/nohash/pgtable.h
> index 1263c22d60d8..11e3767216c0 100644
> --- a/arch/powerpc/include/asm/nohash/pgtable.h
> +++ b/arch/powerpc/include/asm/nohash/pgtable.h
> @@ -49,6 +49,7 @@ static inline int pte_present(pte_t pte)
> * Even if PTEs can be unsigned long long, a PFN is always an unsigned
> * long for now.
> */
> +#define pfn_pte pfn_pte
> static inline pte_t pfn_pte(unsigned long pfn, pgprot_t pgprot) {
> return __pte(((pte_basic_t)(pfn) << PTE_RPN_SHIFT) |
> pgprot_val(pgprot)); }
> --
> 2.6.2
This merge fix up patch now looks like this:
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 15 Dec 2015 16:50:42 +1100
Subject: [PATCH] merge fix for "powerpc, thp: remove infrastructure for handling splitting PMDs"
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
arch/powerpc/include/asm/book3s/64/hash-64k.h | 12 ------------
arch/powerpc/include/asm/book3s/64/hash.h | 11 +++--------
arch/powerpc/include/asm/book3s/64/pgtable.h | 4 ----
3 files changed, 2 insertions(+), 24 deletions(-)
diff --git a/arch/powerpc/include/asm/book3s/64/hash-64k.h b/arch/powerpc/include/asm/book3s/64/hash-64k.h
index 9e55e3b1fef0..849bbec80f7b 100644
--- a/arch/powerpc/include/asm/book3s/64/hash-64k.h
+++ b/arch/powerpc/include/asm/book3s/64/hash-64k.h
@@ -256,13 +256,6 @@ static inline int pmd_trans_huge(pmd_t pmd)
(_PAGE_PTE | _PAGE_THP_HUGE));
}
-static inline int pmd_trans_splitting(pmd_t pmd)
-{
- if (pmd_trans_huge(pmd))
- return pmd_val(pmd) & _PAGE_SPLITTING;
- return 0;
-}
-
static inline int pmd_large(pmd_t pmd)
{
return !!(pmd_val(pmd) & _PAGE_PTE);
@@ -273,11 +266,6 @@ static inline pmd_t pmd_mknotpresent(pmd_t pmd)
return __pmd(pmd_val(pmd) & ~_PAGE_PRESENT);
}
-static inline pmd_t pmd_mksplitting(pmd_t pmd)
-{
- return __pmd(pmd_val(pmd) | _PAGE_SPLITTING);
-}
-
#define __HAVE_ARCH_PMD_SAME
static inline int pmd_same(pmd_t pmd_a, pmd_t pmd_b)
{
diff --git a/arch/powerpc/include/asm/book3s/64/hash.h b/arch/powerpc/include/asm/book3s/64/hash.h
index 9e861b4378bd..b6827603e613 100644
--- a/arch/powerpc/include/asm/book3s/64/hash.h
+++ b/arch/powerpc/include/asm/book3s/64/hash.h
@@ -36,11 +36,6 @@
#define _PAGE_SOFT_DIRTY 0x20000 /* software: software dirty tracking */
/*
- * THP pages can't be special. So use the _PAGE_SPECIAL
- */
-#define _PAGE_SPLITTING _PAGE_SPECIAL
-
-/*
* We need to differentiate between explicit huge page and THP huge
* page, since THP huge page also need to track real subpage details
*/
@@ -49,9 +44,9 @@
/*
* set of bits not changed in pmd_modify.
*/
-#define _HPAGE_CHG_MASK (PTE_RPN_MASK | _PAGE_HPTEFLAGS | \
- _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_SPLITTING | \
- _PAGE_THP_HUGE | _PAGE_PTE | _PAGE_SOFT_DIRTY)
+#define _HPAGE_CHG_MASK (PTE_RPN_MASK | _PAGE_HPTEFLAGS | _PAGE_DIRTY | \
+ _PAGE_ACCESSED | _PAGE_THP_HUGE | _PAGE_PTE | \
+ _PAGE_SOFT_DIRTY)
#ifdef CONFIG_PPC_64K_PAGES
#include <asm/book3s/64/hash-64k.h>
diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h b/arch/powerpc/include/asm/book3s/64/pgtable.h
index 03c1a5a21c0c..04022fad3708 100644
--- a/arch/powerpc/include/asm/book3s/64/pgtable.h
+++ b/arch/powerpc/include/asm/book3s/64/pgtable.h
@@ -258,10 +258,6 @@ extern int pmdp_clear_flush_young(struct vm_area_struct *vma,
extern pmd_t pmdp_huge_get_and_clear(struct mm_struct *mm,
unsigned long addr, pmd_t *pmdp);
-#define __HAVE_ARCH_PMDP_SPLITTING_FLUSH
-extern void pmdp_splitting_flush(struct vm_area_struct *vma,
- unsigned long address, pmd_t *pmdp);
-
extern pmd_t pmdp_collapse_flush(struct vm_area_struct *vma,
unsigned long address, pmd_t *pmdp);
#define pmdp_collapse_flush pmdp_collapse_flush
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
^ permalink raw reply related [flat|nested] 32+ messages in thread
* Re: linux-next: manual merge of the akpm-current tree with the powerpc tree
2016-01-07 9:15 ` Stephen Rothwell
@ 2016-01-07 17:15 ` Aneesh Kumar K.V
2016-01-07 20:03 ` Stephen Rothwell
0 siblings, 1 reply; 32+ messages in thread
From: Aneesh Kumar K.V @ 2016-01-07 17:15 UTC (permalink / raw)
To: Stephen Rothwell, Andrew Morton, Michael Ellerman,
Benjamin Herrenschmidt, linuxppc-dev
Cc: linux-next, linux-kernel
Stephen Rothwell <sfr@canb.auug.org.au> writes:
> This merge fix up patch now looks like this:
What about the #define pfn_pte part ? We don't need that now ?
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Tue, 15 Dec 2015 16:50:42 +1100
> Subject: [PATCH] merge fix for "powerpc, thp: remove infrastructure for handling splitting PMDs"
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
> arch/powerpc/include/asm/book3s/64/hash-64k.h | 12 ------------
> arch/powerpc/include/asm/book3s/64/hash.h | 11 +++--------
> arch/powerpc/include/asm/book3s/64/pgtable.h | 4 ----
> 3 files changed, 2 insertions(+), 24 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/book3s/64/hash-64k.h b/arch/powerpc/include/asm/book3s/64/hash-64k.h
> index 9e55e3b1fef0..849bbec80f7b 100644
> --- a/arch/powerpc/include/asm/book3s/64/hash-64k.h
> +++ b/arch/powerpc/include/asm/book3s/64/hash-64k.h
> @@ -256,13 +256,6 @@ static inline int pmd_trans_huge(pmd_t pmd)
> (_PAGE_PTE | _PAGE_THP_HUGE));
> }
>
> -static inline int pmd_trans_splitting(pmd_t pmd)
> -{
> - if (pmd_trans_huge(pmd))
> - return pmd_val(pmd) & _PAGE_SPLITTING;
> - return 0;
> -}
> -
> static inline int pmd_large(pmd_t pmd)
> {
> return !!(pmd_val(pmd) & _PAGE_PTE);
> @@ -273,11 +266,6 @@ static inline pmd_t pmd_mknotpresent(pmd_t pmd)
> return __pmd(pmd_val(pmd) & ~_PAGE_PRESENT);
> }
>
> -static inline pmd_t pmd_mksplitting(pmd_t pmd)
> -{
> - return __pmd(pmd_val(pmd) | _PAGE_SPLITTING);
> -}
> -
> #define __HAVE_ARCH_PMD_SAME
> static inline int pmd_same(pmd_t pmd_a, pmd_t pmd_b)
> {
> diff --git a/arch/powerpc/include/asm/book3s/64/hash.h b/arch/powerpc/include/asm/book3s/64/hash.h
> index 9e861b4378bd..b6827603e613 100644
> --- a/arch/powerpc/include/asm/book3s/64/hash.h
> +++ b/arch/powerpc/include/asm/book3s/64/hash.h
> @@ -36,11 +36,6 @@
> #define _PAGE_SOFT_DIRTY 0x20000 /* software: software dirty tracking */
>
> /*
> - * THP pages can't be special. So use the _PAGE_SPECIAL
> - */
> -#define _PAGE_SPLITTING _PAGE_SPECIAL
> -
> -/*
> * We need to differentiate between explicit huge page and THP huge
> * page, since THP huge page also need to track real subpage details
> */
> @@ -49,9 +44,9 @@
> /*
> * set of bits not changed in pmd_modify.
> */
> -#define _HPAGE_CHG_MASK (PTE_RPN_MASK | _PAGE_HPTEFLAGS | \
> - _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_SPLITTING | \
> - _PAGE_THP_HUGE | _PAGE_PTE | _PAGE_SOFT_DIRTY)
> +#define _HPAGE_CHG_MASK (PTE_RPN_MASK | _PAGE_HPTEFLAGS | _PAGE_DIRTY | \
> + _PAGE_ACCESSED | _PAGE_THP_HUGE | _PAGE_PTE | \
> + _PAGE_SOFT_DIRTY)
>
> #ifdef CONFIG_PPC_64K_PAGES
> #include <asm/book3s/64/hash-64k.h>
> diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h b/arch/powerpc/include/asm/book3s/64/pgtable.h
> index 03c1a5a21c0c..04022fad3708 100644
> --- a/arch/powerpc/include/asm/book3s/64/pgtable.h
> +++ b/arch/powerpc/include/asm/book3s/64/pgtable.h
> @@ -258,10 +258,6 @@ extern int pmdp_clear_flush_young(struct vm_area_struct *vma,
> extern pmd_t pmdp_huge_get_and_clear(struct mm_struct *mm,
> unsigned long addr, pmd_t *pmdp);
>
> -#define __HAVE_ARCH_PMDP_SPLITTING_FLUSH
> -extern void pmdp_splitting_flush(struct vm_area_struct *vma,
> - unsigned long address, pmd_t *pmdp);
> -
> extern pmd_t pmdp_collapse_flush(struct vm_area_struct *vma,
> unsigned long address, pmd_t *pmdp);
> #define pmdp_collapse_flush pmdp_collapse_flush
>
>
> --
> Cheers,
> Stephen Rothwell sfr@canb.auug.org.au
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: linux-next: manual merge of the akpm-current tree with the powerpc tree
2016-01-07 17:15 ` Aneesh Kumar K.V
@ 2016-01-07 20:03 ` Stephen Rothwell
0 siblings, 0 replies; 32+ messages in thread
From: Stephen Rothwell @ 2016-01-07 20:03 UTC (permalink / raw)
To: Aneesh Kumar K.V
Cc: Andrew Morton, Michael Ellerman, Benjamin Herrenschmidt,
linuxppc-dev, linux-next, linux-kernel
Hi Aneesh,
On Thu, 07 Jan 2016 22:45:19 +0530 "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> wrote:
>
> Stephen Rothwell <sfr@canb.auug.org.au> writes:
>
> > This merge fix up patch now looks like this:
>
>
> What about the #define pfn_pte part ? We don't need that now ?
That is done as part of the merge conflict resolution. This is an
extra needed merge resolution patch due to code being moved between
files. You can see the entire merge resolution using
git diff-tree --cc 5a028bd9b7de
in next-20160107.
The #defines are there in
arch/powerpc/include/asm/book3s/32/pgtable.h
arch/powerpc/include/asm/book3s/64/hash.h
arch/powerpc/include/asm/nohash/pgtable.h
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
^ permalink raw reply [flat|nested] 32+ messages in thread
* linux-next: manual merge of the akpm-current tree with the powerpc tree
@ 2015-12-15 5:53 Stephen Rothwell
2015-12-15 6:44 ` Stephen Rothwell
2015-12-15 9:37 ` Aneesh Kumar K.V
0 siblings, 2 replies; 32+ messages in thread
From: Stephen Rothwell @ 2015-12-15 5:53 UTC (permalink / raw)
To: Andrew Morton, Michael Ellerman, Benjamin Herrenschmidt, linuxppc-dev
Cc: linux-next, linux-kernel, Aneesh Kumar K.V, Kirill A. Shutemov
Hi Andrew,
Today's linux-next merge of the akpm-current tree got conflicts in:
arch/powerpc/include/asm/nohash/64/pgtable.h
arch/powerpc/mm/pgtable_64.c
between various commits from the powerpc tree and commits:
e56ebae0dd4c ("powerpc, thp: remove infrastructure for handling splitting PMDs")
from the akpm-current tree.
I used the powerpc tree version of the first and the akpm-current tree
version of the second and then I applied the following merge fix patch:
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 15 Dec 2015 16:50:42 +1100
Subject: [PATCH] merge fix for "powerpc, thp: remove infrastructure for
handling splitting PMDs"
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
arch/powerpc/include/asm/book3s/64/hash-64k.h | 12 ------------
arch/powerpc/include/asm/book3s/64/hash.h | 10 ++--------
arch/powerpc/include/asm/book3s/64/pgtable.h | 4 ----
3 files changed, 2 insertions(+), 24 deletions(-)
diff --git a/arch/powerpc/include/asm/book3s/64/hash-64k.h b/arch/powerpc/include/asm/book3s/64/hash-64k.h
index 9f9942998587..f2072a4ca9e3 100644
--- a/arch/powerpc/include/asm/book3s/64/hash-64k.h
+++ b/arch/powerpc/include/asm/book3s/64/hash-64k.h
@@ -256,13 +256,6 @@ static inline int pmd_trans_huge(pmd_t pmd)
(_PAGE_PTE | _PAGE_THP_HUGE));
}
-static inline int pmd_trans_splitting(pmd_t pmd)
-{
- if (pmd_trans_huge(pmd))
- return pmd_val(pmd) & _PAGE_SPLITTING;
- return 0;
-}
-
static inline int pmd_large(pmd_t pmd)
{
return !!(pmd_val(pmd) & _PAGE_PTE);
@@ -273,11 +266,6 @@ static inline pmd_t pmd_mknotpresent(pmd_t pmd)
return __pmd(pmd_val(pmd) & ~_PAGE_PRESENT);
}
-static inline pmd_t pmd_mksplitting(pmd_t pmd)
-{
- return __pmd(pmd_val(pmd) | _PAGE_SPLITTING);
-}
-
#define __HAVE_ARCH_PMD_SAME
static inline int pmd_same(pmd_t pmd_a, pmd_t pmd_b)
{
diff --git a/arch/powerpc/include/asm/book3s/64/hash.h b/arch/powerpc/include/asm/book3s/64/hash.h
index 8b929e531758..4e69d9a273ed 100644
--- a/arch/powerpc/include/asm/book3s/64/hash.h
+++ b/arch/powerpc/include/asm/book3s/64/hash.h
@@ -35,11 +35,6 @@
#define _PAGE_SPECIAL 0x10000 /* software: special page */
/*
- * THP pages can't be special. So use the _PAGE_SPECIAL
- */
-#define _PAGE_SPLITTING _PAGE_SPECIAL
-
-/*
* We need to differentiate between explicit huge page and THP huge
* page, since THP huge page also need to track real subpage details
*/
@@ -48,9 +43,8 @@
/*
* set of bits not changed in pmd_modify.
*/
-#define _HPAGE_CHG_MASK (PTE_RPN_MASK | _PAGE_HPTEFLAGS | \
- _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_SPLITTING | \
- _PAGE_THP_HUGE | _PAGE_PTE)
+#define _HPAGE_CHG_MASK (PTE_RPN_MASK | _PAGE_HPTEFLAGS | _PAGE_DIRTY |
+ _PAGE_ACCESSED | _PAGE_THP_HUGE | _PAGE_PTE)
#ifdef CONFIG_PPC_64K_PAGES
#include <asm/book3s/64/hash-64k.h>
diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h b/arch/powerpc/include/asm/book3s/64/pgtable.h
index a2d4e0e37067..6306d6565ee0 100644
--- a/arch/powerpc/include/asm/book3s/64/pgtable.h
+++ b/arch/powerpc/include/asm/book3s/64/pgtable.h
@@ -232,10 +232,6 @@ extern int pmdp_clear_flush_young(struct vm_area_struct *vma,
extern pmd_t pmdp_huge_get_and_clear(struct mm_struct *mm,
unsigned long addr, pmd_t *pmdp);
-#define __HAVE_ARCH_PMDP_SPLITTING_FLUSH
-extern void pmdp_splitting_flush(struct vm_area_struct *vma,
- unsigned long address, pmd_t *pmdp);
-
extern pmd_t pmdp_collapse_flush(struct vm_area_struct *vma,
unsigned long address, pmd_t *pmdp);
#define pmdp_collapse_flush pmdp_collapse_flush
--
2.6.2
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
^ permalink raw reply related [flat|nested] 32+ messages in thread
* Re: linux-next: manual merge of the akpm-current tree with the powerpc tree
2015-12-15 5:53 Stephen Rothwell
@ 2015-12-15 6:44 ` Stephen Rothwell
2015-12-15 9:37 ` Aneesh Kumar K.V
1 sibling, 0 replies; 32+ messages in thread
From: Stephen Rothwell @ 2015-12-15 6:44 UTC (permalink / raw)
To: Andrew Morton, Michael Ellerman, Benjamin Herrenschmidt, linuxppc-dev
Cc: linux-next, linux-kernel, Aneesh Kumar K.V, Kirill A. Shutemov
Hi Andrew,
On Tue, 15 Dec 2015 16:53:42 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> diff --git a/arch/powerpc/include/asm/book3s/64/hash.h b/arch/powerpc/include/asm/book3s/64/hash.h
> index 8b929e531758..4e69d9a273ed 100644
> --- a/arch/powerpc/include/asm/book3s/64/hash.h
> +++ b/arch/powerpc/include/asm/book3s/64/hash.h
> @@ -48,9 +43,8 @@
> /*
> * set of bits not changed in pmd_modify.
> */
> -#define _HPAGE_CHG_MASK (PTE_RPN_MASK | _PAGE_HPTEFLAGS | \
> - _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_SPLITTING | \
> - _PAGE_THP_HUGE | _PAGE_PTE)
> +#define _HPAGE_CHG_MASK (PTE_RPN_MASK | _PAGE_HPTEFLAGS | _PAGE_DIRTY |
^
I missed a backslash here which I fixed up in my tree.
> + _PAGE_ACCESSED | _PAGE_THP_HUGE | _PAGE_PTE)
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: linux-next: manual merge of the akpm-current tree with the powerpc tree
2015-12-15 5:53 Stephen Rothwell
2015-12-15 6:44 ` Stephen Rothwell
@ 2015-12-15 9:37 ` Aneesh Kumar K.V
1 sibling, 0 replies; 32+ messages in thread
From: Aneesh Kumar K.V @ 2015-12-15 9:37 UTC (permalink / raw)
To: Stephen Rothwell, Andrew Morton, Michael Ellerman,
Benjamin Herrenschmidt, linuxppc-dev
Cc: linux-next, linux-kernel, Kirill A. Shutemov
Stephen Rothwell <sfr@canb.auug.org.au> writes:
> Hi Andrew,
>
> Today's linux-next merge of the akpm-current tree got conflicts in:
>
> arch/powerpc/include/asm/nohash/64/pgtable.h
> arch/powerpc/mm/pgtable_64.c
>
> between various commits from the powerpc tree and commits:
>
> e56ebae0dd4c ("powerpc, thp: remove infrastructure for handling splitting PMDs")
For reference the web url for the patch
http://article.gmane.org/gmane.linux.kernel.mm/139654
>
> from the akpm-current tree.
>
> I used the powerpc tree version of the first and the akpm-current tree
> version of the second and then I applied the following merge fix patch:
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Tue, 15 Dec 2015 16:50:42 +1100
> Subject: [PATCH] merge fix for "powerpc, thp: remove infrastructure for
> handling splitting PMDs"
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Looks good.
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> ---
> arch/powerpc/include/asm/book3s/64/hash-64k.h | 12 ------------
> arch/powerpc/include/asm/book3s/64/hash.h | 10 ++--------
> arch/powerpc/include/asm/book3s/64/pgtable.h | 4 ----
> 3 files changed, 2 insertions(+), 24 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/book3s/64/hash-64k.h b/arch/powerpc/include/asm/book3s/64/hash-64k.h
> index 9f9942998587..f2072a4ca9e3 100644
> --- a/arch/powerpc/include/asm/book3s/64/hash-64k.h
> +++ b/arch/powerpc/include/asm/book3s/64/hash-64k.h
> @@ -256,13 +256,6 @@ static inline int pmd_trans_huge(pmd_t pmd)
> (_PAGE_PTE | _PAGE_THP_HUGE));
> }
>
> -static inline int pmd_trans_splitting(pmd_t pmd)
> -{
> - if (pmd_trans_huge(pmd))
> - return pmd_val(pmd) & _PAGE_SPLITTING;
> - return 0;
> -}
> -
> static inline int pmd_large(pmd_t pmd)
> {
> return !!(pmd_val(pmd) & _PAGE_PTE);
> @@ -273,11 +266,6 @@ static inline pmd_t pmd_mknotpresent(pmd_t pmd)
> return __pmd(pmd_val(pmd) & ~_PAGE_PRESENT);
> }
>
> -static inline pmd_t pmd_mksplitting(pmd_t pmd)
> -{
> - return __pmd(pmd_val(pmd) | _PAGE_SPLITTING);
> -}
> -
> #define __HAVE_ARCH_PMD_SAME
> static inline int pmd_same(pmd_t pmd_a, pmd_t pmd_b)
> {
> diff --git a/arch/powerpc/include/asm/book3s/64/hash.h b/arch/powerpc/include/asm/book3s/64/hash.h
> index 8b929e531758..4e69d9a273ed 100644
> --- a/arch/powerpc/include/asm/book3s/64/hash.h
> +++ b/arch/powerpc/include/asm/book3s/64/hash.h
> @@ -35,11 +35,6 @@
> #define _PAGE_SPECIAL 0x10000 /* software: special page */
>
> /*
> - * THP pages can't be special. So use the _PAGE_SPECIAL
> - */
> -#define _PAGE_SPLITTING _PAGE_SPECIAL
> -
> -/*
> * We need to differentiate between explicit huge page and THP huge
> * page, since THP huge page also need to track real subpage details
> */
> @@ -48,9 +43,8 @@
> /*
> * set of bits not changed in pmd_modify.
> */
> -#define _HPAGE_CHG_MASK (PTE_RPN_MASK | _PAGE_HPTEFLAGS | \
> - _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_SPLITTING | \
> - _PAGE_THP_HUGE | _PAGE_PTE)
> +#define _HPAGE_CHG_MASK (PTE_RPN_MASK | _PAGE_HPTEFLAGS | _PAGE_DIRTY |
> + _PAGE_ACCESSED | _PAGE_THP_HUGE | _PAGE_PTE)
>
> #ifdef CONFIG_PPC_64K_PAGES
> #include <asm/book3s/64/hash-64k.h>
> diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h b/arch/powerpc/include/asm/book3s/64/pgtable.h
> index a2d4e0e37067..6306d6565ee0 100644
> --- a/arch/powerpc/include/asm/book3s/64/pgtable.h
> +++ b/arch/powerpc/include/asm/book3s/64/pgtable.h
> @@ -232,10 +232,6 @@ extern int pmdp_clear_flush_young(struct vm_area_struct *vma,
> extern pmd_t pmdp_huge_get_and_clear(struct mm_struct *mm,
> unsigned long addr, pmd_t *pmdp);
>
> -#define __HAVE_ARCH_PMDP_SPLITTING_FLUSH
> -extern void pmdp_splitting_flush(struct vm_area_struct *vma,
> - unsigned long address, pmd_t *pmdp);
> -
> extern pmd_t pmdp_collapse_flush(struct vm_area_struct *vma,
> unsigned long address, pmd_t *pmdp);
> #define pmdp_collapse_flush pmdp_collapse_flush
> --
> 2.6.2
>
> --
> Cheers,
> Stephen Rothwell sfr@canb.auug.org.au
^ permalink raw reply [flat|nested] 32+ messages in thread
end of thread, other threads:[~2021-06-19 2:54 UTC | newest]
Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-18 9:44 linux-next: manual merge of the akpm-current tree with the powerpc tree Stephen Rothwell
2021-06-19 2:54 ` Nicholas Piggin
-- strict thread matches above, loose matches on Subject: below --
2021-05-05 1:39 Stephen Rothwell
2021-05-05 4:57 ` Michael Ellerman
2021-05-05 5:46 ` Stephen Rothwell
2021-05-05 23:43 ` Stephen Rothwell
2021-04-15 9:44 Stephen Rothwell
2021-04-15 9:58 ` Stephen Rothwell
2021-04-15 10:07 ` Christophe Leroy
2021-04-15 10:08 ` Christophe Leroy
2021-04-15 10:15 ` Christophe Leroy
2020-12-08 9:40 Stephen Rothwell
2020-12-17 0:48 ` Stephen Rothwell
2020-09-17 8:57 Stephen Rothwell
2020-06-03 8:50 Stephen Rothwell
2019-07-08 11:43 Stephen Rothwell
2019-04-23 8:57 Stephen Rothwell
2019-02-25 6:42 Stephen Rothwell
2019-02-25 6:44 ` Stephen Rothwell
2019-02-25 6:16 Stephen Rothwell
2018-12-06 6:44 Stephen Rothwell
2018-12-07 1:40 ` Joel Fernandes
2016-05-02 7:20 Stephen Rothwell
2016-05-02 11:17 ` Aneesh Kumar K.V
2016-03-04 7:49 Stephen Rothwell
2015-12-18 5:33 Stephen Rothwell
2016-01-07 9:15 ` Stephen Rothwell
2016-01-07 17:15 ` Aneesh Kumar K.V
2016-01-07 20:03 ` Stephen Rothwell
2015-12-15 5:53 Stephen Rothwell
2015-12-15 6:44 ` Stephen Rothwell
2015-12-15 9:37 ` Aneesh Kumar K.V
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).