public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* linux-next: manual merge of the loongarch tree with the origin tree
@ 2023-04-28 11:43 broonie
  0 siblings, 0 replies; 2+ messages in thread
From: broonie @ 2023-04-28 11:43 UTC (permalink / raw)
  To: Huacai Chen
  Cc: Florent Revest, Huacai Chen, Linux Kernel Mailing List,
	Linux Next Mailing List, Qing Zhang, Steven Rostedt, Youling Tang

Hi all,

Today's linux-next merge of the loongarch tree got conflicts in:

  samples/ftrace/ftrace-direct-modify.c
  samples/ftrace/ftrace-direct-too.c
  samples/ftrace/ftrace-direct.c

between commits:

  23edf48309b14 ("ftrace: Replace uses of _ftrace_direct APIs with _ftrace_direct_multi")
  da8bdfbd42233 ("ftrace: Rename _ftrace_direct_multi APIs to _ftrace_direct APIs")

from the origin tree and commit:

  89451e0111632 ("LoongArch: ftrace: Add direct call trampoline samples support")

from the loongarch 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 samples/ftrace/ftrace-direct-modify.c
index 25fba66f61c05,ca72c3b710eb5..0000000000000
--- a/samples/ftrace/ftrace-direct-modify.c
+++ b/samples/ftrace/ftrace-direct-modify.c
@@@ -96,8 -96,40 +96,42 @@@ asm 
  
  #endif /* CONFIG_S390 */
  
+ #ifdef CONFIG_LOONGARCH
+ 
+ asm (
+ "	.pushsection    .text, \"ax\", @progbits\n"
+ "	.type		my_tramp1, @function\n"
+ "	.globl		my_tramp1\n"
+ "   my_tramp1:\n"
+ "	addi.d	$sp, $sp, -16\n"
+ "	st.d	$t0, $sp, 0\n"
+ "	st.d	$ra, $sp, 8\n"
+ "	bl	my_direct_func1\n"
+ "	ld.d	$t0, $sp, 0\n"
+ "	ld.d	$ra, $sp, 8\n"
+ "	addi.d	$sp, $sp, 16\n"
+ "	jr	$t0\n"
+ "	.size		my_tramp1, .-my_tramp1\n"
+ 
+ "	.type		my_tramp2, @function\n"
+ "	.globl		my_tramp2\n"
+ "   my_tramp2:\n"
+ "	addi.d	$sp, $sp, -16\n"
+ "	st.d	$t0, $sp, 0\n"
+ "	st.d	$ra, $sp, 8\n"
+ "	bl	my_direct_func2\n"
+ "	ld.d	$t0, $sp, 0\n"
+ "	ld.d	$ra, $sp, 8\n"
+ "	addi.d	$sp, $sp, 16\n"
+ "	jr	$t0\n"
+ "	.size		my_tramp2, .-my_tramp2\n"
+ "	.popsection\n"
+ );
+ 
+ #endif /* CONFIG_LOONGARCH */
+ 
 +static struct ftrace_ops direct;
 +
  static unsigned long my_tramp = (unsigned long)my_tramp1;
  static unsigned long tramps[2] = {
  	(unsigned long)my_tramp1,
diff --cc samples/ftrace/ftrace-direct-too.c
index f28e7b99840f0,ef64d75097737..0000000000000
--- a/samples/ftrace/ftrace-direct-too.c
+++ b/samples/ftrace/ftrace-direct-too.c
@@@ -70,13 -70,37 +70,40 @@@ asm 
  
  #endif /* CONFIG_S390 */
  
+ #ifdef CONFIG_LOONGARCH
+ 
+ asm (
+ "	.pushsection	.text, \"ax\", @progbits\n"
+ "	.type		my_tramp, @function\n"
+ "	.globl		my_tramp\n"
+ "   my_tramp:\n"
+ "	addi.d	$sp, $sp, -48\n"
+ "	st.d	$a0, $sp, 0\n"
+ "	st.d	$a1, $sp, 8\n"
+ "	st.d	$a2, $sp, 16\n"
+ "	st.d	$t0, $sp, 24\n"
+ "	st.d	$ra, $sp, 32\n"
+ "	bl	my_direct_func\n"
+ "	ld.d	$a0, $sp, 0\n"
+ "	ld.d	$a1, $sp, 8\n"
+ "	ld.d	$a2, $sp, 16\n"
+ "	ld.d	$t0, $sp, 24\n"
+ "	ld.d	$ra, $sp, 32\n"
+ "	addi.d	$sp, $sp, 48\n"
+ "	jr	$t0\n"
+ "	.size		my_tramp, .-my_tramp\n"
+ "	.popsection\n"
+ );
+ 
+ #endif /* CONFIG_LOONGARCH */
+ 
 +static struct ftrace_ops direct;
 +
  static int __init ftrace_direct_init(void)
  {
 -	return register_ftrace_direct((unsigned long)handle_mm_fault,
 -				     (unsigned long)my_tramp);
 +	ftrace_set_filter_ip(&direct, (unsigned long) handle_mm_fault, 0, 0);
 +
 +	return register_ftrace_direct(&direct, (unsigned long) my_tramp);
  }
  
  static void __exit ftrace_direct_exit(void)
diff --cc samples/ftrace/ftrace-direct.c
index d81a9473b5851,9be720957bf8d..0000000000000
--- a/samples/ftrace/ftrace-direct.c
+++ b/samples/ftrace/ftrace-direct.c
@@@ -63,13 -63,33 +63,36 @@@ asm 
  
  #endif /* CONFIG_S390 */
  
+ #ifdef CONFIG_LOONGARCH
+ 
+ asm (
+ "	.pushsection	.text, \"ax\", @progbits\n"
+ "	.type		my_tramp, @function\n"
+ "	.globl		my_tramp\n"
+ "   my_tramp:\n"
+ "	addi.d	$sp, $sp, -32\n"
+ "	st.d	$a0, $sp, 0\n"
+ "	st.d	$t0, $sp, 8\n"
+ "	st.d	$ra, $sp, 16\n"
+ "	bl	my_direct_func\n"
+ "	ld.d	$a0, $sp, 0\n"
+ "	ld.d	$t0, $sp, 8\n"
+ "	ld.d	$ra, $sp, 16\n"
+ "	addi.d	$sp, $sp, 32\n"
+ "	jr	$t0\n"
+ "	.size		my_tramp, .-my_tramp\n"
+ "	.popsection\n"
+ );
+ 
+ #endif /* CONFIG_LOONGARCH */
+ 
 +static struct ftrace_ops direct;
 +
  static int __init ftrace_direct_init(void)
  {
 -	return register_ftrace_direct((unsigned long)wake_up_process,
 -				     (unsigned long)my_tramp);
 +	ftrace_set_filter_ip(&direct, (unsigned long) wake_up_process, 0, 0);
 +
 +	return register_ftrace_direct(&direct, (unsigned long) my_tramp);
  }
  
  static void __exit ftrace_direct_exit(void)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* linux-next: manual merge of the loongarch tree with the origin tree
@ 2026-04-22 11:12 Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2026-04-22 11:12 UTC (permalink / raw)
  To: Huacai Chen
  Cc: Andrew Morton, Huacai Chen, Linux Kernel Mailing List,
	Linux Next Mailing List, Mike Rapoport

[-- Attachment #1: Type: text/plain, Size: 1541 bytes --]

Hi all,

Today's linux-next merge of the loongarch tree got a conflict in:

  arch/loongarch/mm/init.c

between commit:

  6215d9f4470fb ("arch, mm: consolidate empty_zero_page")

from the origin tree and commit:

  8b81576c16c06 ("LoongArch: Add HIGHMEM (PKMAP and FIX_KMAP) support")

from the loongarch 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 arch/loongarch/mm/init.c
index 00f3822b6e47c,bf51f4a1b086e..0000000000000
--- a/arch/loongarch/mm/init.c
+++ b/arch/loongarch/mm/init.c
@@@ -36,20 -36,9 +36,6 @@@
  #include <asm/pgalloc.h>
  #include <asm/tlb.h>
  
- void copy_user_highpage(struct page *to, struct page *from,
- 	unsigned long vaddr, struct vm_area_struct *vma)
- {
- 	void *vfrom, *vto;
- 
- 	vfrom = kmap_local_page(from);
- 	vto = kmap_local_page(to);
- 	copy_page(vto, vfrom);
- 	kunmap_local(vfrom);
- 	kunmap_local(vto);
- 	/* Make sure this page is cleared on other CPU's too before using it */
- 	smp_wmb();
- }
 -unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)] __page_aligned_bss;
 -EXPORT_SYMBOL(empty_zero_page);
--
  int __ref page_is_ram(unsigned long pfn)
  {
  	unsigned long addr = PFN_PHYS(pfn);

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-04-22 11:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-22 11:12 linux-next: manual merge of the loongarch tree with the origin tree Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2023-04-28 11:43 broonie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox