Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp2882130pxb; Mon, 6 Sep 2021 07:26:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxd3LIgQIjaohBDgXl3bALOLm9DNCu0MTQ5nSIHy+f7bH9Ft7kZqDkiKzw34TdGxMHIJJPn X-Received: by 2002:a17:906:3bc1:: with SMTP id v1mr13682826ejf.182.1630938360416; Mon, 06 Sep 2021 07:26:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630938360; cv=none; d=google.com; s=arc-20160816; b=nedfeAMJlCaetx/8j5EWcBBaJNoo7h9Ze7anaBG0pJaptrx/1GtJ8y5zQOS2VVIk1b Dcv6AVoPCBeGx2mnCsJEPwy43zkfUZ79XyHuwgVuYvmYy6JIbNaqpqkWp6/kPOZGYGtj Sac+W4EbEWdGCN39krMjLZ7o6VNGNKeRPYMqPh0CTkCagOy01i99kCQUj6FDmGdv7AiB wDCyhiZ2wQJWkCx+vZXtLvTq9QXV7UU+Qfsid1eC8a7vZzOgSlolF/p2Ehmqb6oU+9xJ hr8PZJiMm6d1Iwzo/dXNzc1sACpIAS8jgvuVKQdwW2yrtl2ZitCaxoSaS83F5P2xEOF6 FSNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=a1ig8YTFMn8o0S8xZRd6vor5m3Cp6vgqt+R8f3Aaqr8=; b=e4GjT1dSdrypZU8u/zZkSLQ1c1cPfgP3PnrefBHkc+tTQUdxjPAtc5u+VsT2zv8GiF kIKU3BTf7URmlPoDpIP9WoFeEnvH2p9QAaVfVJfl/Df8c9K6lTj7fMxkoWu+LpdC97WL T7wIUjEFClfS7mGEYMRVgJiUD/eko7ZMx8j0kuAyv1IATwvmV7wYoOROFXppOiPoKvfC UdUXV7ghGffGL66qVd/QxZP26ImJ+kNFoP1SgQPHAgGM4Ppt4TZrMmF08zaC0bfjD2ch WJtl2ZAvus/K6YDSXw4p5sjWIf4sgrhO+vVNnY5GgTlcLTljCu/Yimb9opqDUf34+eou 4+iA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=gPDFVvcg; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p18si8416055eds.16.2021.09.06.07.25.34; Mon, 06 Sep 2021 07:26:00 -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=@ellerman.id.au header.s=201909 header.b=gPDFVvcg; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243348AbhIFOYN (ORCPT + 99 others); Mon, 6 Sep 2021 10:24:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243298AbhIFOYI (ORCPT ); Mon, 6 Sep 2021 10:24:08 -0400 Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86ADDC061575; Mon, 6 Sep 2021 07:23:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1630938178; bh=a1ig8YTFMn8o0S8xZRd6vor5m3Cp6vgqt+R8f3Aaqr8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=gPDFVvcgFKVCtnnFcqifi3/U7sQu2oKLjlWmQLo9QKNWq1U2MACHRnqyFWKrnad56 uL+i5BVZJzimDdNdOdWWL97qyY3vQEru4eOyRsCgGll1qxWgWbklqZekpDGcAGKuCf 7DC9/fmleSs/J6PLf3UKelktEfEUDK/VqMn/+w368Z5+i7rKCZizeZ9JNKFm1pNAA5 h4LY2z9lptO/oPnnmWr1502XTFsZvG+pEmckwN3k0Ifrq04O0itioFFI4oF6PBSbWI occtjlLIAW9X8Cbc98/3bwK1W8QWf6J3uswp0ONhi5bpMTYeu0fzaFaimB7DadN/5M jHul5fcpFPOCA== Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4H39bX6gcYz9sW4; Tue, 7 Sep 2021 00:22:48 +1000 (AEST) From: Michael Ellerman To: Weizhao Ouyang , Steven Rostedt , Ingo Molnar Cc: Russell King , Catalin Marinas , Will Deacon , Guo Ren , Michal Simek , Thomas Bogendoerfer , Nick Hu , Greentime Hu , Vincent Chen , "James E.J. Bottomley" , Helge Deller , Benjamin Herrenschmidt , Paul Mackerras , Paul Walmsley , Palmer Dabbelt , Albert Ou , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Yoshinori Sato , Rich Felker , "David S. Miller" , Thomas Gleixner , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-csky@vger.kernel.org, linux-ia64@vger.kernel.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, Weizhao Ouyang Subject: Re: [PATCH v2] ftrace: Cleanup ftrace_dyn_arch_init() In-Reply-To: <20210906111626.1259867-1-o451686892@gmail.com> References: <20210906111626.1259867-1-o451686892@gmail.com> Date: Tue, 07 Sep 2021 00:22:46 +1000 Message-ID: <87v93dn5qh.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Weizhao Ouyang writes: > Most of ARCHs use empty ftrace_dyn_arch_init(), introduce a weak common > ftrace_dyn_arch_init() to cleanup them. > > Signed-off-by: Weizhao Ouyang > Acked-by: Heiko Carstens (s390) > > --- > > Changes in v2: > -- correct CONFIG_DYNAMIC_FTRACE on PowerPC > -- add Acked-by tag > diff --git a/arch/powerpc/include/asm/ftrace.h b/arch/powerpc/include/asm/ftrace.h > index debe8c4f7062..d59f67c0225f 100644 > --- a/arch/powerpc/include/asm/ftrace.h > +++ b/arch/powerpc/include/asm/ftrace.h > @@ -61,6 +61,10 @@ struct dyn_arch_ftrace { > }; > #endif /* __ASSEMBLY__ */ > > +#ifdef CONFIG_DYNAMIC_FTRACE > +int __init ftrace_dyn_arch_init(void); > +#endif /* CONFIG_DYNAMIC_FTRACE */ > + > #ifdef CONFIG_DYNAMIC_FTRACE_WITH_REGS > #define ARCH_SUPPORTS_FTRACE_OPS 1 > #endif That breaks the build for powerpc: /linux/arch/powerpc/include/asm/ftrace.h: Assembler messages: /linux/arch/powerpc/include/asm/ftrace.h:65: Error: unrecognized opcode: `int' make[4]: *** [/linux/scripts/Makefile.build:352: arch/powerpc/kernel/trace/ftrace_64.o] Error 1 make[3]: *** [/linux/scripts/Makefile.build:514: arch/powerpc/kernel/trace] Error 2 make[2]: *** [/linux/scripts/Makefile.build:514: arch/powerpc/kernel] Error 2 make[1]: *** [/linux/Makefile:1861: arch/powerpc] Error 2 make[1]: *** Waiting for unfinished jobs.... It needs to be inside an #ifndef __ASSEMBLY__ section. cheers