linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: "Michal Suchánek" <msuchanek@suse.de>,
	"kbuild test robot" <lkp@intel.com>
Cc: linuxppc-dev@lists.ozlabs.org, kbuild-all@01.org,
	Nicholas Piggin <npiggin@gmail.com>
Subject: Re: [PATCH v2 4/4] powerpc/64: system call implement the bulk of the logic in C
Date: Mon, 02 Sep 2019 20:20:37 +1000	[thread overview]
Message-ID: <8736hft2x6.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <20190830220451.74183fa0@kitsune.suse.cz>

Michal Suchánek <msuchanek@suse.de> writes:
> On Sat, 31 Aug 2019 02:48:26 +0800
> kbuild test robot <lkp@intel.com> wrote:
>
>> Hi Nicholas,
>> 
>> I love your patch! Yet something to improve:
>> 
>> [auto build test ERROR on linus/master]
>> [cannot apply to v5.3-rc6 next-20190830]
>> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
>> 
>> url:    https://github.com/0day-ci/linux/commits/Nicholas-Piggin/powerpc-64-syscalls-in-C/20190828-064221
>> config: powerpc64-defconfig (attached as .config)
>> compiler: powerpc64-linux-gcc (GCC) 7.4.0
>> reproduce:
>>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>>         chmod +x ~/bin/make.cross
>>         # save the attached .config to linux build tree
>>         GCC_VERSION=7.4.0 make.cross ARCH=powerpc64 
>> 
>> If you fix the issue, kindly add following tag
>> Reported-by: kbuild test robot <lkp@intel.com>
>> 
>> All errors (new ones prefixed by >>):
>> 
>>    powerpc64-linux-ld: warning: orphan section `.gnu.hash' from `linker stubs' being placed in section `.gnu.hash'.
>>    arch/powerpc/kernel/syscall_64.o: In function `.system_call_exception':
>> >> syscall_64.c:(.text+0x180): undefined reference to `.tabort_syscall'  
>
> Interestingly it builds and boots for me. Is this something about
> dotted vs dotless symbols depending on some config options?

It's the big endian build that fails, which is ELFv1, and the linker is
saying it can't find a function called `.tabort_syscall` - which is
understandable because there isn't one. There's a text address called
`tabort_syscall` but it has no function descriptor so you can't call it
normally from C.

> I see there is _GLOBAL(ret_from_fork) just below so maybe we need
> _GLOBAL(tabort_syscall) instead of .globl tabort_syscall as well.

Yes, on ELFv1 the _GLOBAL macros creates a function descriptor for you.

This fixes it for me:

diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
index 82bcb9a68172..8f2735da205d 100644
--- a/arch/powerpc/kernel/entry_64.S
+++ b/arch/powerpc/kernel/entry_64.S
@@ -170,8 +170,7 @@ _ASM_NOKPROBE_SYMBOL(system_call_common);
 	b	.Lsyscall_restore_regs_cont
 
 #ifdef CONFIG_PPC_TRANSACTIONAL_MEM
-	.globl tabort_syscall
-tabort_syscall:
+_GLOBAL(tabort_syscall)
 	/* Firstly we need to enable TM in the kernel */
 	mfmsr	r10
 	li	r9, 1


cheers

  reply	other threads:[~2019-09-02 10:22 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-27 13:55 [PATCH v2 0/4] powerpc/64: syscalls in C Nicholas Piggin
2019-08-27 13:55 ` [PATCH v2 1/4] powerpc: convert to copy_thread_tls Nicholas Piggin
2019-08-27 13:55 ` [PATCH v2 2/4] powerpc/64: remove support for kernel-mode syscalls Nicholas Piggin
2019-08-27 13:55 ` [PATCH v2 3/4] powerpc/64: system call remove non-volatile GPR save optimisation Nicholas Piggin
2019-08-28  9:02   ` Christophe Leroy
2019-08-28  9:32     ` Nicholas Piggin
2019-08-27 13:55 ` [PATCH v2 4/4] powerpc/64: system call implement the bulk of the logic in C Nicholas Piggin
2019-08-28  6:51   ` Christophe Leroy
2019-08-28  9:41     ` Nicholas Piggin
2019-08-28 15:30   ` Michal Suchánek
2019-08-28 22:19     ` Nicholas Piggin
2019-08-30 18:48   ` kbuild test robot
2019-08-30 20:04     ` Michal Suchánek
2019-09-02 10:20       ` Michael Ellerman [this message]
2019-08-28  9:06 ` [PATCH v2 0/4] powerpc/64: syscalls " Christophe Leroy
2019-08-28  9:49   ` Nicholas Piggin
2019-08-28  9:55     ` Christophe Leroy
2019-08-29  9:38       ` Nicholas Piggin
2019-08-29 10:45         ` Nicholas Piggin
2019-08-29 11:51         ` Segher Boessenkool
2019-08-29 15:49           ` Nicholas Piggin
2019-08-29 22:56             ` Nicholas Piggin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8736hft2x6.fsf@mpe.ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=kbuild-all@01.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=lkp@intel.com \
    --cc=msuchanek@suse.de \
    --cc=npiggin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).