From patchwork Wed May 16 14:14:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 914672 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40mH3k47Z7z9s1d for ; Thu, 17 May 2018 00:33:22 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="HkUz7uR9"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 40mH3k0sl5zF13T for ; Thu, 17 May 2018 00:33:22 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="HkUz7uR9"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:400e:c00::241; helo=mail-pf0-x241.google.com; envelope-from=npiggin@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="HkUz7uR9"; dkim-atps=neutral Received: from mail-pf0-x241.google.com (mail-pf0-x241.google.com [IPv6:2607:f8b0:400e:c00::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 40mGg257hrzF157 for ; Thu, 17 May 2018 00:15:26 +1000 (AEST) Received: by mail-pf0-x241.google.com with SMTP id f189-v6so425674pfa.7 for ; Wed, 16 May 2018 07:15:26 -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; bh=g/pYbuViNnp0SE7Hjw64GcuUQ5rV99c8aseSn7D5pDE=; b=HkUz7uR9EnjWrygmwvTpVjeLDvpnjQSjRA/llwj1Vr1Lu79bpUKSMVyOr9Rq4MABJf rvqEHOtveHm/9h1wwsqYwugBT+HGGzdrIe712tYqUTojjPBy4aMNPCJwLw2Uqb7bUZG5 nxHhsqDgPchQO1GzhjvzD4gc9oSjUJWmWRNwxWsiCEPppkSlB6aJoefXV/YQY3curon/ KJmG2YMXhYabLAcaoEpGDhMQ+5t2JhEZv17Ogi+Fa6HGW/ceQYaJshoz+y2zuwNRX0BK /rXdOJm3JW/C/UkANiucBSp9/p4wCik8n7h3z3XaQp3csqT3AlXKzpz36FB88gfMjvdC 2Z8w== 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; bh=g/pYbuViNnp0SE7Hjw64GcuUQ5rV99c8aseSn7D5pDE=; b=THKGyj7JwgCsuXMIhrmEtcdfQ9zOGcDyZZjUmH7UdYbvGL1dwpstiWb/4fQ9e7zjLY 2qJG+l2ReKr3FtRr4Ffsk0UG1uy/tFf2nLuXuNSsNlQam/k76bA3coKh60q9gOP0fC1g Ts7IxuKFdVLlYMXo/vVCA/0MYXzZtWlhLkLRoEBnZCDXxwiBVZpx3mIU6fUw7muSulUT O44izAeCyMeZx6xYQdV1gjOcgEJqyV5UCW9Ii/K0oQulTJL/o4EdiWJLkDKUvKe9AX72 VUV+8XNsPiQfkgJYe6WSMvg+EglLwisEsv1V+m0F8ZYSUByhw2iDNZwBAms+n5vWJub1 k4Aw== X-Gm-Message-State: ALKqPwfU/FQ+feddqbdwDgSlYD4ELA8aLjT9bGZoYs33K3YRfah5CdCZ n+EceSc31X3k/ORaEbIpK2M= X-Google-Smtp-Source: AB8JxZo4Gq5BY5UpMqRLeF0XaFMHOT/tgM+H3n9GkSqdMi7KZI4unifAmOhOChBYS9QrwZx+luxC5g== X-Received: by 2002:a63:9a49:: with SMTP id e9-v6mr901463pgo.251.1526480124505; Wed, 16 May 2018 07:15:24 -0700 (PDT) Received: from roar.au.ibm.com (59-102-70-78.tpgi.com.au. [59.102.70.78]) by smtp.gmail.com with ESMTPSA id h130-v6sm7365162pfc.98.2018.05.16.07.15.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 May 2018 07:15:23 -0700 (PDT) From: Nicholas Piggin To: linux-kbuild@vger.kernel.org Subject: [PATCH v4 4/4] powerpc/kbuild: move -mprofile-kernel check to Kconfig Date: Thu, 17 May 2018 00:14:58 +1000 Message-Id: <20180516141458.18996-5-npiggin@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180516141458.18996-1-npiggin@gmail.com> References: <20180516141458.18996-1-npiggin@gmail.com> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Masahiro Yamada , linuxppc-dev@lists.ozlabs.org, Nicholas Piggin Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" This eliminates the workaround that requires disabling -mprofile-kernel by default in Kconfig. [ Note: this depends on https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git kconfig-shell-v3 ] Signed-off-by: Nicholas Piggin Signed-off-by: Nicholas Piggin --- Since v3: - Moved a stray hunk back to patch 3 where it belongs. arch/powerpc/Kconfig | 16 +--------------- arch/powerpc/Makefile | 14 ++------------ 2 files changed, 3 insertions(+), 27 deletions(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 512fcc177c87..af527f894f9b 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -460,23 +460,9 @@ config LD_HEAD_STUB_CATCH If unsure, say "N". -config DISABLE_MPROFILE_KERNEL - bool "Disable use of mprofile-kernel for kernel tracing" - depends on PPC64 && CPU_LITTLE_ENDIAN - default y - help - Selecting this options disables use of the mprofile-kernel ABI for - kernel tracing. That will cause options such as live patching - (CONFIG_LIVEPATCH) which depend on CONFIG_DYNAMIC_FTRACE_WITH_REGS to - be disabled also. - - If you have a toolchain which supports mprofile-kernel, then you can - disable this. Otherwise leave it enabled. If you're not sure, say - "Y". - config MPROFILE_KERNEL depends on PPC64 && CPU_LITTLE_ENDIAN - def_bool !DISABLE_MPROFILE_KERNEL + def_bool $(success $(srctree)/arch/powerpc/tools/gcc-check-mprofile-kernel.sh $(CC) -I$(srctree)/include -D__KERNEL__) config IOMMU_HELPER def_bool PPC64 diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 6faf1d6ad9dd..8f7a64fe7370 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile @@ -161,18 +161,8 @@ CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=powerpc64 endif ifdef CONFIG_MPROFILE_KERNEL - ifeq ($(shell $(srctree)/arch/powerpc/tools/gcc-check-mprofile-kernel.sh $(CC) -I$(srctree)/include -D__KERNEL__),OK) - CC_FLAGS_FTRACE := -pg -mprofile-kernel - KBUILD_CPPFLAGS += -DCC_USING_MPROFILE_KERNEL - else - # If the user asked for mprofile-kernel but the toolchain doesn't - # support it, emit a warning and deliberately break the build later - # with mprofile-kernel-not-supported. We would prefer to make this an - # error right here, but then the user would never be able to run - # oldconfig to change their configuration. - $(warning Compiler does not support mprofile-kernel, set CONFIG_DISABLE_MPROFILE_KERNEL) - CC_FLAGS_FTRACE := -mprofile-kernel-not-supported - endif + CC_FLAGS_FTRACE := -pg -mprofile-kernel + KBUILD_CPPFLAGS += -DCC_USING_MPROFILE_KERNEL endif CFLAGS-$(CONFIG_CELL_CPU) += $(call cc-option,-mcpu=cell)