Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3080730pxj; Mon, 17 May 2021 17:16:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwAPn8JGkFjX78XAIO66gFeBlosH+Y/+kDQv5ttKkgtTf2ClT3R6Kklmnx9HgBIU9eQLzVk X-Received: by 2002:a17:906:c09:: with SMTP id s9mr2853543ejf.145.1621296999691; Mon, 17 May 2021 17:16:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621296999; cv=none; d=google.com; s=arc-20160816; b=VBuV8c7Coj2Mc6BQjN0ZeBXwLEy2nauvS/aYAf3i7fVXzATITdVRLt/hC49WOhwDLe arJWCp68juHoFWCtrzNz9UlkmmiMDF6pIZvrcZIHknM9KjK0oxLvtEd9UI7uQKa+ykMM QqbeVfNZOzJ2AOLBQllqt+saBqoFWpcGnGPmliE6Y14jA5WLyfKeNjgj+geOqj+cyZ/f gLTcoCku95poBjqFf9RBMHQcWR0bUorXJ35S2MOD/cVyg0jfNDACN/rxRIE1v3Q3sD0P 6vfso/UDsAQeWtefvIxenqhMJ8I/67W8OVVvMKZWsFcIU6AHOBBvCfZaeCWhZfHghXQE StBA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=5dBpLF0/sWv1iRIGcbadIABULwGlwAnkMzrQusgVDOk=; b=0/69GWz6XwP/XLOsU7sPUfqQKjelAroDSX/YfVGQ8UCOJbXBa3qS8FwuzbvIMP+orG zPiudZUjOLss4rWinnv+q+1rtbhHEGMysFDh1kWFPA4St5jyuC7+qlvZEUGm9lQVwmlC IWsDWMF02S/bD4gLHBu/KDSfYmIf1JCfGrTaLmTozyFQLAA+Q4SP5//WpDWwjBRxutvE IYbHrRGfYImCeCG+XHDAG8zYbo0qxSryeyxCoW+d0IFvvHXmJRNlniRrI5rxJ22C1038 iniaX0aysoWZDXtNIUgcflkbUIMasheWEWrX7GrE3rwF9QKf/P1uv/dyLBNlXi/GWmj/ VZ4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jFdLHy1K; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cq14si17726487edb.242.2021.05.17.17.16.06; Mon, 17 May 2021 17:16:39 -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=@linuxfoundation.org header.s=korg header.b=jFdLHy1K; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239592AbhEQO1A (ORCPT + 99 others); Mon, 17 May 2021 10:27:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:37616 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237496AbhEQOXQ (ORCPT ); Mon, 17 May 2021 10:23:16 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F1671613D9; Mon, 17 May 2021 14:12:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621260741; bh=aNYXZWoSOlAOk+ZWWwQMbgpvI5lokByWOB6Vs2dTSIM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jFdLHy1KkuL6kjRF0zfezafBAR5uro/KNa73PbV8hmC+UkS5uMgUqijScJAm7dT5T p/Z04FgdIR640VFiAKXZSJ+jxOyNvJSnGH1ENWljmVlrvK/V2hZVUMtGyQBjukJpKC A22abk4IXgKTDfQT1RkBoeDtTlvKUhNuhalnz+Ew= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kernel test robot , Nathan Chancellor , Fangrui Song , Palmer Dabbelt , Sasha Levin Subject: [PATCH 5.12 184/363] riscv: Select HAVE_DYNAMIC_FTRACE when -fpatchable-function-entry is available Date: Mon, 17 May 2021 16:00:50 +0200 Message-Id: <20210517140308.809286639@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140302.508966430@linuxfoundation.org> References: <20210517140302.508966430@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nathan Chancellor [ Upstream commit adebc8817b5c975d598ac379bbdf67a7a5186ade ] clang prior to 13.0.0 does not support -fpatchable-function-entry for RISC-V. clang: error: unsupported option '-fpatchable-function-entry=8' for target 'riscv64-unknown-linux-gnu' To avoid this error, only select HAVE_DYNAMIC_FTRACE when this option is not available. Fixes: afc76b8b8011 ("riscv: Using PATCHABLE_FUNCTION_ENTRY instead of MCOUNT") Link: https://github.com/ClangBuiltLinux/linux/issues/1268 Reported-by: kernel test robot Signed-off-by: Nathan Chancellor Reviewed-by: Fangrui Song Signed-off-by: Palmer Dabbelt Signed-off-by: Sasha Levin --- arch/riscv/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 4515a10c5d22..d9522fc35ca5 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -227,7 +227,7 @@ config ARCH_RV64I bool "RV64I" select 64BIT select ARCH_SUPPORTS_INT128 if CC_HAS_INT128 && GCC_VERSION >= 50000 - select HAVE_DYNAMIC_FTRACE if MMU + select HAVE_DYNAMIC_FTRACE if MMU && $(cc-option,-fpatchable-function-entry=8) select HAVE_DYNAMIC_FTRACE_WITH_REGS if HAVE_DYNAMIC_FTRACE select HAVE_FTRACE_MCOUNT_RECORD select HAVE_FUNCTION_GRAPH_TRACER -- 2.30.2