Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp4689343pxb; Tue, 31 Aug 2021 10:52:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLIlLRwitY0GAgB3Zao4LqmDHYVdOBUjxWxLI+HUhEXpSvSuNKnsyAb+pO8sCXWqTk5Bti X-Received: by 2002:a05:6402:1775:: with SMTP id da21mr30299737edb.49.1630432361705; Tue, 31 Aug 2021 10:52:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630432361; cv=none; d=google.com; s=arc-20160816; b=ubvGVY8B31NYA29SvWTkX6B2O8KYXC/YCqBi7I9/eHEdeVNh0ew2v/crOMT1bukCDd BPFLHIpEQd9cLRhUv/geRbfmq0KCLY++qf79cYghqLV2PAh1OWc8SMeKCh2DdeoAOWSY kXL5faU6mr8ur4EpYGXvv7RyNHQDVyrXckBH96btZVbK626n7f1SZBJy7IH132PkUHtH j70sGYKGWAs+RYfen1RkSStMw9zNmhcpXOHE4kXtU7hCTzrUU0W78z24KtMCBSyvdl2L viRZLO+c/zrAMqeJoGtK6WIxY95Fjo7GxOGPFLL/nAlKXiWZBmQ6Bi9UQTOqKmrtHNyx 1eUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qdb32U8Gd8SJ4dGxwfbTzoAZGekY2T3buKbiAPh7r3Q=; b=Rz+dy2X/ksHf22kuayU/CwSXY591o6wq5tHut/r/KY/yfjpr1lP03XYylJXe76TC2g 96suRtve+v+bRnAkuTKK03XQAz2XrYJtt08C9VVrYpnai6I6JYFDJWd1Y+W6yOlxd9di 7PXPrM3jZFrWv9zfvARO0uAPZEQY+QfgO8mIliOHmjoDUZSpMl8xYnJWgf0syjJhaXoh 0SjuKSTGUD7cCsH10e4zRPoyTeefJZw2Tvxxy83aTLpFKTflkIOz/3PBrm7CflvO35lY buFstQo0XjojaWUm3ObhS6CvdZPL/Lxb5lPgp9jyPWRb+p1K2gvr4OlJZHN9pd6au9Oh HAvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=q9r1CnGT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m1si11881895ejj.616.2021.08.31.10.52.18; Tue, 31 Aug 2021 10:52:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=q9r1CnGT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240471AbhHaRvj (ORCPT + 99 others); Tue, 31 Aug 2021 13:51:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240501AbhHaRvh (ORCPT ); Tue, 31 Aug 2021 13:51:37 -0400 Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4819DC061575 for ; Tue, 31 Aug 2021 10:50:42 -0700 (PDT) Received: by mail-pg1-x529.google.com with SMTP id t1so17545060pgv.3 for ; Tue, 31 Aug 2021 10:50:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qdb32U8Gd8SJ4dGxwfbTzoAZGekY2T3buKbiAPh7r3Q=; b=q9r1CnGTeTXpwiRSsk1EL+Z+s8oF1K1iT7EX+pUbhnaLjk+/lRL7ugk6Vhc3EvclTJ qmtiDfqNhoLU8rfRBXQHSKwWpuebcwKETCWC1cO+/tXVyfMKTBPwQD7jKAugXDzUNQt/ 3ssI3e9I/JK3+bAIuO2ZtRpQDOoeEphoqNPjNwVzStPHVkXmFu+Svivc4BQvoV19KkF7 YyKWU6l8OwXE1YUj3x20ArHtD4ktliMx3qmNt3xyfmawFZnb1Wj4wbFEIzON+YRzBIHJ U0yslS7jRQLDb8QvIot5RZUFardlSuLnjB2VBJKs7R5M8R+K14iq/Iks8YXgW17YWAtt McUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qdb32U8Gd8SJ4dGxwfbTzoAZGekY2T3buKbiAPh7r3Q=; b=AIKPNTfmNxIVP30w6z7BrxqKDG7Pq/iP1CDgGpubwfkODtyeyig/XNdmsOFA9rn05g cOQR5K6fjqXEgukYw2AVOjLEaF3YekHFz+7ehGMjMAGRP07nBl9HTkC4CBHgDjtq3qco w9JXEauXLGwajZ/vXh1ImeidyIb0CwZ529zKUnAp/D3V98VCNfhOnUxGxqTjgwjS+6gF vvDLmpPyzTciCmovSE9u0pYmNJh8j1X8lGB8ODRigsc2zEadXiBEgIwW6WdNHMoz0k7W ZCe3oAn7/Ei7EL5FHFglM73srWAsqjsOJBWbIKsa323m+LKLx4eh7ToWz67UkqRrIWUW KmGw== X-Gm-Message-State: AOAM5324mhJL+JNRptUjbzfihrgWFfLpa8eSMNxeK1qE29GuXHoiNv/Y cRB0hjOz0BX/Oolr/5r25cviBqxlsz8= X-Received: by 2002:a63:4206:: with SMTP id p6mr27375563pga.449.1630432240408; Tue, 31 Aug 2021 10:50:40 -0700 (PDT) Received: from localhost ([47.251.3.230]) by smtp.gmail.com with ESMTPSA id e16sm15863834pfc.214.2021.08.31.10.50.39 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 31 Aug 2021 10:50:39 -0700 (PDT) From: Lai Jiangshan To: linux-kernel@vger.kernel.org Cc: Lai Jiangshan , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , Joerg Roedel , "Peter Zijlstra (Intel)" , Daniel Bristot de Oliveira , Brijesh Singh , Andy Shevchenko , Arvind Sankar , Chester Lin , Juergen Gross Subject: [PATCH 02/24] x86/traps: Move arch/x86/kernel/traps.c to arch/x86/entry/ Date: Wed, 1 Sep 2021 01:50:03 +0800 Message-Id: <20210831175025.27570-3-jiangshanlai@gmail.com> X-Mailer: git-send-email 2.19.1.6.gb485710b In-Reply-To: <20210831175025.27570-1-jiangshanlai@gmail.com> References: <20210831175025.27570-1-jiangshanlai@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lai Jiangshan traps.c handles works for entries. It is very close to the code in arch/x86/entry/. So we move traps.c to arch/x86/entry/. It is also prepared for later patches that implements C version of the entry code in traps.c. Signed-off-by: Lai Jiangshan --- arch/x86/entry/Makefile | 5 ++++- arch/x86/{kernel => entry}/traps.c | 0 arch/x86/kernel/Makefile | 5 +---- 3 files changed, 5 insertions(+), 5 deletions(-) rename arch/x86/{kernel => entry}/traps.c (100%) diff --git a/arch/x86/entry/Makefile b/arch/x86/entry/Makefile index 7fec5dcf6438..4e26248cea33 100644 --- a/arch/x86/entry/Makefile +++ b/arch/x86/entry/Makefile @@ -11,8 +11,11 @@ CFLAGS_REMOVE_common.o = $(CC_FLAGS_FTRACE) CFLAGS_common.o += -fno-stack-protector +CFLAGS_REMOVE_traps.o = -fstack-protector -fstack-protector-strong +CFLAGS_traps.o += -fno-stack-protector + obj-y := entry_$(BITS).o thunk_$(BITS).o syscall_$(BITS).o -obj-y += common.o +obj-y += common.o traps.o obj-y += vdso/ obj-y += vsyscall/ diff --git a/arch/x86/kernel/traps.c b/arch/x86/entry/traps.c similarity index 100% rename from arch/x86/kernel/traps.c rename to arch/x86/entry/traps.c diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile index 21aa164cece2..5ba80522f5da 100644 --- a/arch/x86/kernel/Makefile +++ b/arch/x86/kernel/Makefile @@ -48,14 +48,11 @@ KCOV_INSTRUMENT := n CFLAGS_head$(BITS).o += -fno-stack-protector -CFLAGS_REMOVE_traps.o = -fstack-protector -fstack-protector-strong -CFLAGS_traps.o += -fno-stack-protector - CFLAGS_irq.o := -I $(srctree)/$(src)/../include/asm/trace obj-y := process_$(BITS).o signal.o obj-$(CONFIG_COMPAT) += signal_compat.o -obj-y += traps.o idt.o irq.o irq_$(BITS).o dumpstack_$(BITS).o +obj-y += idt.o irq.o irq_$(BITS).o dumpstack_$(BITS).o obj-y += time.o ioport.o dumpstack.o nmi.o obj-$(CONFIG_MODIFY_LDT_SYSCALL) += ldt.o obj-y += setup.o x86_init.o i8259.o irqinit.o -- 2.19.1.6.gb485710b