mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Cao jin <caoj.fnst@cn.fujitsu.com>
To: <x86@kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <tglx@linutronix.de>, <mingo@redhat.com>, <bp@alien8.de>,
	<hpa@zytor.com>
Subject: Re: [PATCH] x86/boot: drop memset from copy.S
Date: Fri, 11 Jan 2019 11:40:53 +0800	[thread overview]
Message-ID: <1b9db13b-ebe9-70f7-bc79-b608d8906a4b@cn.fujitsu.com> (raw)
In-Reply-To: <4bb8f61a-f93c-4b30-9990-ecf5a8ddc998@cn.fujitsu.com>

On 1/8/19 4:46 PM, Cao jin wrote:
> One more question: in compressed/, for mem*(), it seems we both use the
> macros of boot/string.h, and the functions of compressed/string.c. Is
> that what we want?
> 
> compressed/ is compiled with -O2, so it cannot be told by objdump -d,
> but still can be confirmed by nm <*.o>, for example:
> 
> $nm arch/x86/boot/compressed/eboot.o
>                  U memcpy
>                  U memset
> 
> $nm arch/x86/boot/compressed/pgtable_64.o
>                  # No entry of mem*()
> 
> both of eboot.c and pgtable_64.c #include "../string.h", and use some of
>  mem*(), it is counter-intuitive to me. Very appreciate it someone can
> leave a hint.
> 

Well, I think HPA's previous answer is also suitable for this question,
with -O2, sometimes __builtin_mem*() is optimized as inline code, while
sometimes just emit a call to corresponding self-defined mem*() functions.

-- 
Sincerely,
Cao jin



      reply	other threads:[~2019-01-11  3:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-07  7:40 Cao jin
2019-01-07  7:59 ` hpa
2019-01-07  8:52   ` Cao jin
2019-01-08  8:38     ` hpa
2019-01-10  8:28       ` Cao jin
2019-01-08  8:46 ` Cao jin
2019-01-11  3:40   ` Cao jin [this message]

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=1b9db13b-ebe9-70f7-bc79-b608d8906a4b@cn.fujitsu.com \
    --to=caoj.fnst@cn.fujitsu.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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

all inboxes | Powered by JetHome®