Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp219705imu; Thu, 10 Jan 2019 22:25:26 -0800 (PST) X-Google-Smtp-Source: ALg8bN4FLJuxi7sdPmc/155cFF5kkzE/2ewsYCuzue5au6ZO53F2rXGA9FMl60K615rVwnta9N2o X-Received: by 2002:a63:d157:: with SMTP id c23mr12129158pgj.170.1547187926439; Thu, 10 Jan 2019 22:25:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547187926; cv=none; d=google.com; s=arc-20160816; b=P0QBuBboLNlKPwQvCge39iAewO71wP+B2wnF2QekT5Im5cSoIIilEp3VIfWQItw/Gk MgXJY2fhgETy3r6fUBeeUlP9tL80PwnD0ZN7jzwD4Zy7JDeW/Hpk9VVseFWNB6NsTor8 k0wqdjtHaGpkAgNuKfTNQspTbFKxD+NPsTEp7uOn33zyiuVPiRZ82Np5JLTtV9O6/AMI 1YuOuksKGA8uJw7ZQIYRiOUnDB3HLiWRONLB5MUOd6t90BZb/Bo9K5bLGKN/4W/goRAq jJotRgxLJhaGEYtbQwGqZMw1e1aaok479/4f+wtNuZPjHvswmTZHtnPj5t9ldFF0YCuW GYIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject; bh=67JFFoOKMIzSrKTF0YDx9auzF6nZvIGgbUqW3ZK7rd0=; b=Ug44mu2hXSzzh7ESygzeUrai4r1bJQZjz/rgynBzR4D9fxoR+MQVN9En6apBzxhMVi A2kbj4a1dPzofr5CIsDqK9p8PUvfGQJaD0frS2TZb0Qu16IdY500X6ee3In3Dk9p44F+ HHr3tfwwfgvr5nszetFW1lcSzglkhkmC6nCuVnFygUzuOyV1pXPk22dUGQvyj2p5wCsr oZe1eZMVP29WuUR7w5s9tmWWtFTyzHndfoAIDVntIy1c6BQ5ajhg3778t1bVdhN1qug3 eg4vsn21MdlvodU/P95DUB2N2y3nHbc8cuEnin/SX7bujEzgWwoJXjumtKywlPoApmuh lmXA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33si36627227plg.62.2019.01.10.22.25.10; Thu, 10 Jan 2019 22:25:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730485AbfAKDkj (ORCPT + 99 others); Thu, 10 Jan 2019 22:40:39 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:6470 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726531AbfAKDki (ORCPT ); Thu, 10 Jan 2019 22:40:38 -0500 X-IronPort-AV: E=Sophos;i="5.56,463,1539619200"; d="scan'208";a="51761711" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 11 Jan 2019 11:40:37 +0800 Received: from G08CNEXCHPEKD02.g08.fujitsu.local (unknown [10.167.33.83]) by cn.fujitsu.com (Postfix) with ESMTP id F15044BAD909; Fri, 11 Jan 2019 11:40:36 +0800 (CST) Received: from [10.167.226.60] (10.167.226.60) by G08CNEXCHPEKD02.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 11 Jan 2019 11:40:35 +0800 Subject: Re: [PATCH] x86/boot: drop memset from copy.S From: Cao jin To: , CC: , , , References: <20190107074056.12532-1-caoj.fnst@cn.fujitsu.com> <4bb8f61a-f93c-4b30-9990-ecf5a8ddc998@cn.fujitsu.com> Message-ID: <1b9db13b-ebe9-70f7-bc79-b608d8906a4b@cn.fujitsu.com> Date: Fri, 11 Jan 2019 11:40:53 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <4bb8f61a-f93c-4b30-9990-ecf5a8ddc998@cn.fujitsu.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.167.226.60] X-yoursite-MailScanner-ID: F15044BAD909.A7C5A X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: caoj.fnst@cn.fujitsu.com X-Spam-Status: No Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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