From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 714CBC3F2D7 for ; Tue, 3 Mar 2020 02:59:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3FB122468D for ; Tue, 3 Mar 2020 02:59:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583204383; bh=zC3Y1C8HwIOEPRo15lvjJ/967zThZkg6I7D9cZHzu88=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=dYUKNhr3PB9xxrzbNmIR4XNU+CFmIt9tkmn15+uE/acrXJTuw3hlYQYY2thQzhCX5 zIp2nYBOSyw3OF1FqUm7hyha5laPzzMCri+gdlgK6c3kZYsKewy0XOKk0rKFMMHN1P IdKTBUPkVofoSQtr6jf755jhxL33Rt/+xXVL0jbA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728107AbgCCCrh (ORCPT ); Mon, 2 Mar 2020 21:47:37 -0500 Received: from mail.kernel.org ([198.145.29.99]:42634 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728085AbgCCCrd (ORCPT ); Mon, 2 Mar 2020 21:47:33 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B3E9E24677; Tue, 3 Mar 2020 02:47:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583203653; bh=zC3Y1C8HwIOEPRo15lvjJ/967zThZkg6I7D9cZHzu88=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vmIng55i4nSiV0BRh3USz4+20dN6gteW5hZ0Ns2ddmTjaanCiZgDVUpMLRaP6qAFW I7JcrqsKMj/z7yy+Rf7ltPg0+KvJ1bQAPMv++dgLO5OkLEMw36if+MsSFcDAIhTdh5 n5qiOZpj5ZyvsnWevIGDqs2nBoLqFX/s/XFRQnIw= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Guo Ren , Sasha Levin , linux-csky@vger.kernel.org Subject: [PATCH AUTOSEL 5.5 63/66] csky: Fixup ftrace modify panic Date: Mon, 2 Mar 2020 21:46:12 -0500 Message-Id: <20200303024615.8889-63-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200303024615.8889-1-sashal@kernel.org> References: <20200303024615.8889-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Guo Ren [ Upstream commit 359ae00d12589c31cf103894d0f32588d523ca83 ] During ftrace init, linux will replace all function prologues (call_mcout) with nops, but it need flush_dcache and invalidate_icache to make it work. So flush_cache functions couldn't be nested called by ftrace framework. Signed-off-by: Guo Ren Signed-off-by: Sasha Levin --- arch/csky/mm/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/csky/mm/Makefile b/arch/csky/mm/Makefile index c94ef64810986..efb7ebab342b3 100644 --- a/arch/csky/mm/Makefile +++ b/arch/csky/mm/Makefile @@ -1,8 +1,10 @@ # SPDX-License-Identifier: GPL-2.0-only ifeq ($(CONFIG_CPU_HAS_CACHEV2),y) obj-y += cachev2.o +CFLAGS_REMOVE_cachev2.o = $(CC_FLAGS_FTRACE) else obj-y += cachev1.o +CFLAGS_REMOVE_cachev1.o = $(CC_FLAGS_FTRACE) endif obj-y += dma-mapping.o -- 2.20.1