Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3941021pxj; Mon, 21 Jun 2021 09:50:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwunOrSxVCHWLvuUfLvicIfjLhvHCzcTuAgTD48MQKh7pgVBDpSx8HMbPkLkT7U9pp5qWwH X-Received: by 2002:a17:906:af0f:: with SMTP id lx15mr13210629ejb.324.1624294224331; Mon, 21 Jun 2021 09:50:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624294224; cv=none; d=google.com; s=arc-20160816; b=T1L2CguF5voKsNXDMTFlFgfaBhhjX9eh4Ni/lTTwXsbk2dGgTRbmm1klTknTP2ICwZ lDirqod0djAZ0PO+etahlvtBMe1LPED7zEGuOKNPdQyxZHKEJqOhNs551owN7o5/x7l6 mBckHvXBdJ71OkqFrCmVjMk49l/YoQ8weKWa3fGoN/qBzXuxJq1Sz5JNrPQuBUq3t2uC s6RxfiPPIUOrT/26/FOEEEj/3KFaSfwxG8jspgkqRE7dSLaocC0xIdIrDLsfXaR2eGRm Un/XuLD163V+gXNinTaVQVUniKvCIUK2q0y1WewctNTgpVY/PKrKK+h4B0cW6J+6x3bL ANEA== 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=9ntoQwIrjjfCcaT+2ZYOuyIYJ02rDc+lC2p3NeRR4qw=; b=P3SVs12Oe6YAWkxDJdLv2vzr+P2gE+t31zrfyCoI3om6lYQPokXkX+vl0NETiW2o3I 0BUBOZTSCug/wD14OJpog4dv0ogweaVjESnJi4tFW4LtI+rbT8CqqttatYUkwRkp1Yp+ /hcK3lCj+ICGo2HUiHrnBlaY1wC5bGyea6dKl6yRdqKbBNy7diFt1PZF8Nx/cmsd75Ur X5KR6OxWau+n+M120siLRZlmBzaS13k7MDe3vytVYxcXFuHgO2Wm2XzeiGSvxPiyBXFT qSHvuyC4SiMyCzqgGdQhIH7BiD26PAjxK0OflgzW75vn8liF9cN6TlULfmBA7JGjTUSd YnGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="jWRCNdh/"; 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 e16si11597976ejj.154.2021.06.21.09.50.01; Mon, 21 Jun 2021 09:50:24 -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="jWRCNdh/"; 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 S231617AbhFUQsu (ORCPT + 99 others); Mon, 21 Jun 2021 12:48:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:37532 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232988AbhFUQoA (ORCPT ); Mon, 21 Jun 2021 12:44:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1B57561357; Mon, 21 Jun 2021 16:32:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624293127; bh=v1Shj5F8hMUeW+OTytwhZYkO9DtqxbdNhawBkXHVLsI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jWRCNdh/km9UMQooeBbm2LJe2XSgjyNOAj1gyN5fx0i+IfqMhRmNU+wnnxTdbU9i/ kDetjnnLjf1cKfufkKR2IUCNcNz3RMPzLQFPWKAZdwivYpfXF6vnnhDGrmsnXPRka/ bzjt9tFgKnM4phbES1kAlqQJ0IuEk598OIZh6ueM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jisheng Zhang , Palmer Dabbelt , Sasha Levin Subject: [PATCH 5.12 109/178] riscv: code patching only works on !XIP_KERNEL Date: Mon, 21 Jun 2021 18:15:23 +0200 Message-Id: <20210621154926.480706508@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210621154921.212599475@linuxfoundation.org> References: <20210621154921.212599475@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: Jisheng Zhang [ Upstream commit 42e0e0b453bc6ead49c573ed512502069627546b ] Some features which need code patching such as KPROBES, DYNAMIC_FTRACE KGDB can only work on !XIP_KERNEL. Add dependencies for these features that rely on code patching. Signed-off-by: Jisheng Zhang Signed-off-by: Palmer Dabbelt Signed-off-by: Sasha Levin --- arch/riscv/Kconfig | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index d9522fc35ca5..4f116be9152f 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -54,11 +54,11 @@ config RISCV select GENERIC_TIME_VSYSCALL if MMU && 64BIT select HANDLE_DOMAIN_IRQ select HAVE_ARCH_AUDITSYSCALL - select HAVE_ARCH_JUMP_LABEL - select HAVE_ARCH_JUMP_LABEL_RELATIVE + select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL + select HAVE_ARCH_JUMP_LABEL_RELATIVE if !XIP_KERNEL select HAVE_ARCH_KASAN if MMU && 64BIT select HAVE_ARCH_KASAN_VMALLOC if MMU && 64BIT - select HAVE_ARCH_KGDB + select HAVE_ARCH_KGDB if !XIP_KERNEL select HAVE_ARCH_KGDB_QXFER_PKT select HAVE_ARCH_MMAP_RND_BITS if MMU select HAVE_ARCH_SECCOMP_FILTER @@ -73,9 +73,9 @@ config RISCV select HAVE_GCC_PLUGINS select HAVE_GENERIC_VDSO if MMU && 64BIT select HAVE_IRQ_TIME_ACCOUNTING - select HAVE_KPROBES - select HAVE_KPROBES_ON_FTRACE - select HAVE_KRETPROBES + select HAVE_KPROBES if !XIP_KERNEL + select HAVE_KPROBES_ON_FTRACE if !XIP_KERNEL + select HAVE_KRETPROBES if !XIP_KERNEL select HAVE_PCI select HAVE_PERF_EVENTS select HAVE_PERF_REGS @@ -227,11 +227,11 @@ config ARCH_RV64I bool "RV64I" select 64BIT select ARCH_SUPPORTS_INT128 if CC_HAS_INT128 && GCC_VERSION >= 50000 - select HAVE_DYNAMIC_FTRACE if MMU && $(cc-option,-fpatchable-function-entry=8) + select HAVE_DYNAMIC_FTRACE if !XIP_KERNEL && MMU && $(cc-option,-fpatchable-function-entry=8) select HAVE_DYNAMIC_FTRACE_WITH_REGS if HAVE_DYNAMIC_FTRACE - select HAVE_FTRACE_MCOUNT_RECORD + select HAVE_FTRACE_MCOUNT_RECORD if !XIP_KERNEL select HAVE_FUNCTION_GRAPH_TRACER - select HAVE_FUNCTION_TRACER + select HAVE_FUNCTION_TRACER if !XIP_KERNEL select SWIOTLB if MMU endchoice -- 2.30.2