Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp6021650ybe; Tue, 10 Sep 2019 12:16:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqy+XGNUhSlDPOn317HT68mOZ8uNmucxq78iw7bKIjXZ8AHxxOV+H+OREHME9zX5059GT2a4 X-Received: by 2002:a50:e04b:: with SMTP id g11mr33061905edl.302.1568143001735; Tue, 10 Sep 2019 12:16:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568143001; cv=none; d=google.com; s=arc-20160816; b=0HxGxS/eCMa+Edr33tDTVTNSfupnS06/jsA4cVbd4mm9yFhYpxsunKa19SOvLVakX1 vFap83y0T74/9HPqRq+xVntzP8rTpeBEJBzrDG4H9VkV+/Y/W2BoyHWzpDdXalunc7O9 vVlmWnYXcACcXGj0URF9yEm6FxnrlNuFZcEDdUYYZ8NfOQLtZC0WvPLqwq1vOAAlxZH6 ZeFFbxaoDrSZY9fMJo/8Rk40o9q1IIj8HF8QJQ4kcOXZ1fzrVGDsEFnTxEjdfJ1LXRMJ fu40RicTF2PNpYUsiGWBp2feiFTlmlSQAIkCG4cLm5VFpoSpxagdWyz5OtbrPYeLgFvT +leg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:subject:from:references :in-reply-to:message-id:dkim-signature; bh=+6o+78VZsQA+v7vQ/HRTMCRCI9xi61deAbzDhccBXKU=; b=xyWtR74yGuRiAeddUtqOHBsv43RMz+fisHAwbyHbtt/pjPFUElE425lBwi52Wb3j9t LNqQivO+6QEyxKb2MEqItEfQFfqj4JTPIUZzNC6F9rYWRbrJR1NJxRi5sfJmzQ+k2Dd2 79AblojnH8RQUH8otH+g1JItF2d4CQ5aerVjWsGkf3UpSLOQVlRkHvrRFS38kEoJXNid jhynIz4jLurlTSwW3DzrlETWkJwdyAOCIBwE1d3i+O8ZuCVt0G0JpZVNMmEbSWNeG7KB lkTIX9ABHuRT6EgyGSQGpKk/cI6CcLqfJMlluYvSbR9iR5JPnBzNMgec9cgtZruJRhgi dB2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=tLMUSP0a; 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 p28si10639524ejn.88.2019.09.10.12.16.17; Tue, 10 Sep 2019 12:16:41 -0700 (PDT) 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; dkim=pass header.i=@c-s.fr header.s=mail header.b=tLMUSP0a; 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 S2394217AbfIJQW5 (ORCPT + 99 others); Tue, 10 Sep 2019 12:22:57 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:7576 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2394211AbfIJQW5 (ORCPT ); Tue, 10 Sep 2019 12:22:57 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 46SVgd4bCYz9tyvS; Tue, 10 Sep 2019 18:22:53 +0200 (CEST) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=tLMUSP0a; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id nz-WxYFQc0gT; Tue, 10 Sep 2019 18:22:53 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 46SVgd3Qyqz9tyvQ; Tue, 10 Sep 2019 18:22:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1568132573; bh=+6o+78VZsQA+v7vQ/HRTMCRCI9xi61deAbzDhccBXKU=; h=In-Reply-To:References:From:Subject:To:Cc:Date:From; b=tLMUSP0aHHdfA/uGbuUYrb2i2RZcbnaUor8S5aGIXKI/8hTw6KLlkfP1zkiS+j7Iq wNjfSOdNqW2YyRvQbIUfQi6RYegbVQwKqqbLDUTsWGdvNCqJOYftPsLB+uPD9jqSDc WlccUH+JzrhK3heSCZunkAjJwVzvOAZLwBqjl39Y= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 234238B88E; Tue, 10 Sep 2019 18:22:55 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id Z-JXUHdkEBL5; Tue, 10 Sep 2019 18:22:55 +0200 (CEST) Received: from pc16032vm.idsi0.si.c-s.fr (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id CC1588B885; Tue, 10 Sep 2019 18:22:54 +0200 (CEST) Received: by pc16032vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 96AFD6B751; Tue, 10 Sep 2019 16:22:54 +0000 (UTC) Message-Id: In-Reply-To: References: From: Christophe Leroy Subject: [PATCH v3 2/2] powerpc/kexec: move kexec files into a dedicated subdir. To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Tue, 10 Sep 2019 16:22:54 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org arch/powerpc/kernel/ contains 8 files dedicated to kexec. Move them into a dedicated subdirectory. Signed-off-by: Christophe Leroy --- v2: moved crash.c as well as it's part of kexec suite. v3: renamed files to remove 'kexec' keyword from names. --- arch/powerpc/kernel/Makefile | 19 +--------------- arch/powerpc/kernel/kexec/Makefile | 25 ++++++++++++++++++++++ arch/powerpc/kernel/{ => kexec}/crash.c | 0 .../kernel/{kexec_elf_64.c => kexec/elf_64.c} | 0 arch/powerpc/kernel/{ima_kexec.c => kexec/ima.c} | 0 .../kernel/{machine_kexec.c => kexec/machine.c} | 0 .../{machine_kexec_32.c => kexec/machine_32.c} | 0 .../{machine_kexec_64.c => kexec/machine_64.c} | 0 .../machine_file_64.c} | 0 .../{kexec_relocate_32.S => kexec/relocate_32.S} | 2 +- 10 files changed, 27 insertions(+), 19 deletions(-) create mode 100644 arch/powerpc/kernel/kexec/Makefile rename arch/powerpc/kernel/{ => kexec}/crash.c (100%) rename arch/powerpc/kernel/{kexec_elf_64.c => kexec/elf_64.c} (100%) rename arch/powerpc/kernel/{ima_kexec.c => kexec/ima.c} (100%) rename arch/powerpc/kernel/{machine_kexec.c => kexec/machine.c} (100%) rename arch/powerpc/kernel/{machine_kexec_32.c => kexec/machine_32.c} (100%) rename arch/powerpc/kernel/{machine_kexec_64.c => kexec/machine_64.c} (100%) rename arch/powerpc/kernel/{machine_kexec_file_64.c => kexec/machine_file_64.c} (100%) rename arch/powerpc/kernel/{kexec_relocate_32.S => kexec/relocate_32.S} (99%) diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index f6c80f31502a..42e150e6e663 100644 --- a/arch/powerpc/kernel/Makefile +++ b/arch/powerpc/kernel/Makefile @@ -5,9 +5,6 @@ CFLAGS_ptrace.o += -DUTS_MACHINE='"$(UTS_MACHINE)"' -# Disable clang warning for using setjmp without setjmp.h header -CFLAGS_crash.o += $(call cc-disable-warning, builtin-requires-header) - ifdef CONFIG_PPC64 CFLAGS_prom_init.o += $(NO_MINIMAL_TOC) endif @@ -81,7 +78,6 @@ obj-$(CONFIG_CRASH_DUMP) += crash_dump.o obj-$(CONFIG_FA_DUMP) += fadump.o ifdef CONFIG_PPC32 obj-$(CONFIG_E500) += idle_e500.o -obj-$(CONFIG_KEXEC_CORE) += kexec_relocate_32.o endif obj-$(CONFIG_PPC_BOOK3S_32) += idle_6xx.o l2cr_6xx.o cpu_setup_6xx.o obj-$(CONFIG_TAU) += tau_6xx.o @@ -125,14 +121,7 @@ pci64-$(CONFIG_PPC64) += pci_dn.o pci-hotplug.o isa-bridge.o obj-$(CONFIG_PCI) += pci_$(BITS).o $(pci64-y) \ pci-common.o pci_of_scan.o obj-$(CONFIG_PCI_MSI) += msi.o -obj-$(CONFIG_KEXEC_CORE) += machine_kexec.o crash.o \ - machine_kexec_$(BITS).o -obj-$(CONFIG_KEXEC_FILE) += machine_kexec_file_$(BITS).o kexec_elf_$(BITS).o -ifdef CONFIG_HAVE_IMA_KEXEC -ifdef CONFIG_IMA -obj-y += ima_kexec.o -endif -endif +obj-$(CONFIG_KEXEC_CORE) += kexec/ obj-$(CONFIG_AUDIT) += audit.o obj64-$(CONFIG_AUDIT) += compat_audit.o @@ -164,12 +153,6 @@ endif GCOV_PROFILE_prom_init.o := n KCOV_INSTRUMENT_prom_init.o := n UBSAN_SANITIZE_prom_init.o := n -GCOV_PROFILE_machine_kexec_64.o := n -KCOV_INSTRUMENT_machine_kexec_64.o := n -UBSAN_SANITIZE_machine_kexec_64.o := n -GCOV_PROFILE_machine_kexec_32.o := n -KCOV_INSTRUMENT_machine_kexec_32.o := n -UBSAN_SANITIZE_machine_kexec_32.o := n GCOV_PROFILE_kprobes.o := n KCOV_INSTRUMENT_kprobes.o := n UBSAN_SANITIZE_kprobes.o := n diff --git a/arch/powerpc/kernel/kexec/Makefile b/arch/powerpc/kernel/kexec/Makefile new file mode 100644 index 000000000000..46e52ee95322 --- /dev/null +++ b/arch/powerpc/kernel/kexec/Makefile @@ -0,0 +1,25 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# Makefile for the linux kernel. +# + +# Disable clang warning for using setjmp without setjmp.h header +CFLAGS_crash.o += $(call cc-disable-warning, builtin-requires-header) + +obj-y += machine.o crash.o machine_$(BITS).o + +obj-$(CONFIG_PPC32) += relocate_32.o + +obj-$(CONFIG_KEXEC_FILE) += machine_file_$(BITS).o elf_$(BITS).o + +ifdef CONFIG_HAVE_IMA_KEXEC +ifdef CONFIG_IMA +obj-y += ima.o +endif +endif + + +# Disable GCOV, KCOV & sanitizers in odd or sensitive code +GCOV_PROFILE_machine_$(BITS).o := n +KCOV_INSTRUMENT_machine_$(BITS).o := n +UBSAN_SANITIZE_machine_$(BITS).o := n diff --git a/arch/powerpc/kernel/crash.c b/arch/powerpc/kernel/kexec/crash.c similarity index 100% rename from arch/powerpc/kernel/crash.c rename to arch/powerpc/kernel/kexec/crash.c diff --git a/arch/powerpc/kernel/kexec_elf_64.c b/arch/powerpc/kernel/kexec/elf_64.c similarity index 100% rename from arch/powerpc/kernel/kexec_elf_64.c rename to arch/powerpc/kernel/kexec/elf_64.c diff --git a/arch/powerpc/kernel/ima_kexec.c b/arch/powerpc/kernel/kexec/ima.c similarity index 100% rename from arch/powerpc/kernel/ima_kexec.c rename to arch/powerpc/kernel/kexec/ima.c diff --git a/arch/powerpc/kernel/machine_kexec.c b/arch/powerpc/kernel/kexec/machine.c similarity index 100% rename from arch/powerpc/kernel/machine_kexec.c rename to arch/powerpc/kernel/kexec/machine.c diff --git a/arch/powerpc/kernel/machine_kexec_32.c b/arch/powerpc/kernel/kexec/machine_32.c similarity index 100% rename from arch/powerpc/kernel/machine_kexec_32.c rename to arch/powerpc/kernel/kexec/machine_32.c diff --git a/arch/powerpc/kernel/machine_kexec_64.c b/arch/powerpc/kernel/kexec/machine_64.c similarity index 100% rename from arch/powerpc/kernel/machine_kexec_64.c rename to arch/powerpc/kernel/kexec/machine_64.c diff --git a/arch/powerpc/kernel/machine_kexec_file_64.c b/arch/powerpc/kernel/kexec/machine_file_64.c similarity index 100% rename from arch/powerpc/kernel/machine_kexec_file_64.c rename to arch/powerpc/kernel/kexec/machine_file_64.c diff --git a/arch/powerpc/kernel/kexec_relocate_32.S b/arch/powerpc/kernel/kexec/relocate_32.S similarity index 99% rename from arch/powerpc/kernel/kexec_relocate_32.S rename to arch/powerpc/kernel/kexec/relocate_32.S index 3f8ca6a566fb..b9355e0d5c85 100644 --- a/arch/powerpc/kernel/kexec_relocate_32.S +++ b/arch/powerpc/kernel/kexec/relocate_32.S @@ -32,7 +32,7 @@ relocate_new_kernel: mr r31, r5 #define ENTRY_MAPPING_KEXEC_SETUP -#include "fsl_booke_entry_mapping.S" +#include #undef ENTRY_MAPPING_KEXEC_SETUP mr r3, r29 -- 2.13.3