Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3270094imu; Sun, 6 Jan 2019 23:44:02 -0800 (PST) X-Google-Smtp-Source: ALg8bN5z+Xh70gnyXCr+DHL3Lt1ZFlEdeGDnjIdFmq9D1tR5YYLOsYPmSyQNs+UHc8mOXsWFN4Y8 X-Received: by 2002:a17:902:4601:: with SMTP id o1mr34817381pld.243.1546847042420; Sun, 06 Jan 2019 23:44:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546847042; cv=none; d=google.com; s=arc-20160816; b=Sqvp69F52zWw2kh9CXTXwBVqxhNb9+WxUwwsWgPC+4wDuxptHveC+z7xmQzgFNTI74 wUUEf5HZBN8hbm6BvlmyETHMqLz6oqZFrkLAZ428LMSdmWq86LvZeRB8x2qpYaaoEDww fLR3iKJIwbMxI/mHD4VV16rUO9CijfqzmGIH/941CAhoEyIUoYDXtTF/dObMTKyKzSYw 2fR6vkI7fRd6N5WxemireHCHR2cPIeGA+M4oi1ZsGkq1HvgikRcsgpJTsKlqhPb/koe+ lrxnhytXtMakSM4Dx+uCxK5jckTrGD097wPKPJpngOZBeyhWtE7kpyL078/9Tvh8aySo w2QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=Ym3IVSXfoItCJqY1cf+ulJeAN1jNckSOMJzQabrrTjU=; b=Wi25ouALk4Pme2RuFkxoeSDehK+EgjGBSpmZPlvm9KMC3ZXGxPbTdY6XIhGwsN92gU yCbRT3g7J5b4LDihIddAqakFsdXf51egRtLerh5BAx4l0qf1OfYxoGWEnXH83CEx9zxO Iv5hwUgp4rGy1jJqfCiEeXUUMxtz/lTN6hnJqLP8vMiGZiHyEOshx/VTHwbgZQYdZLVG lhOB+X70/VhKkSFhYE6cAsA0gJwXWWpizNboNnt6ZAw5SSXKVDzTaC1l0xGwjVzTdNk8 EQ5+UPFr/e9UnBvFJbhAVO1tbHm27q4UNWSSFOhneBANfRFIcSIqX82Hbm196HlJedtV DwWQ== 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 g11si6411358pgn.32.2019.01.06.23.43.46; Sun, 06 Jan 2019 23:44:02 -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 S1726531AbfAGHlF (ORCPT + 99 others); Mon, 7 Jan 2019 02:41:05 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:26748 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726468AbfAGHlE (ORCPT ); Mon, 7 Jan 2019 02:41:04 -0500 X-IronPort-AV: E=Sophos;i="5.56,450,1539619200"; d="scan'208";a="51456255" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 07 Jan 2019 15:41:03 +0800 Received: from G08CNEXCHPEKD02.g08.fujitsu.local (unknown [10.167.33.83]) by cn.fujitsu.com (Postfix) with ESMTP id B91F44B7EC5B; Mon, 7 Jan 2019 15:40:57 +0800 (CST) Received: from TSAO.g08.fujitsu.local (10.167.226.60) by G08CNEXCHPEKD02.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 7 Jan 2019 15:41:01 +0800 From: Cao jin To: , CC: , , , Subject: [PATCH] x86/boot: drop memset from copy.S Date: Mon, 7 Jan 2019 15:40:56 +0800 Message-ID: <20190107074056.12532-1-caoj.fnst@cn.fujitsu.com> X-Mailer: git-send-email 2.17.2 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.167.226.60] X-yoursite-MailScanner-ID: B91F44B7EC5B.AE839 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 According to objdump output of setup, function memset is not used in setup code. Currently, all usage of memset in setup come from macro definition of string.h. Signed-off-by: Cao jin --- Compiled and booted under x86_64; compiled under i386. Questions: now there is 2 definition of memcpy, one lies in copy.S, another lies in string.h which is mapped to gcc builtin function. Do we still need 2 definition? Could we move the content of copy.S to boot/string.c? At first glance, the usage of string.{c.h} of setup is kind of confusing, they are also used in compressed/ and purgatory/ arch/x86/boot/copy.S | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/arch/x86/boot/copy.S b/arch/x86/boot/copy.S index 15d9f74b0008..5157d08b0ff2 100644 --- a/arch/x86/boot/copy.S +++ b/arch/x86/boot/copy.S @@ -33,21 +33,6 @@ GLOBAL(memcpy) retl ENDPROC(memcpy) -GLOBAL(memset) - pushw %di - movw %ax, %di - movzbl %dl, %eax - imull $0x01010101,%eax - pushw %cx - shrw $2, %cx - rep; stosl - popw %cx - andw $3, %cx - rep; stosb - popw %di - retl -ENDPROC(memset) - GLOBAL(copy_from_fs) pushw %ds pushw %fs -- 2.17.0