Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp2993079pxb; Mon, 6 Sep 2021 09:48:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfhpzaCX/lX9+NHT8DNzPUQ8FCfh2K/SYNVTdmhSkDnHMuRHXUGdnB7kUdOBlIS/k8RwtB X-Received: by 2002:a05:6602:3284:: with SMTP id d4mr10155932ioz.100.1630946901547; Mon, 06 Sep 2021 09:48:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630946901; cv=none; d=google.com; s=arc-20160816; b=RZErhBNwGpuS7Fw01vurZ1CxqiQpazUphZcHdZ7YbR7SQX6JBgPIWTFFB/wDBXCCTc MQNYi/Vwaz0oJ4X3R3fJ/t6JZPPR74u8amRxf+csl2AWjrjkby8AcZJ+8YwzFof8ttU4 bfYkogpTetjrEwylaMJJ5QX0s8maPjUFsCKnGwXPfBcvzYJmWTJwqQcwl+ShBYyvz7RK n9tbbVsZFFF1rip/+cQFwnw1cWyLcIG83oxs+jYWdN/hF/fyVe6YtaEN9/mfrexL9O/4 kupxmEuDA7EbKO+oqS+yhUO99HbdPDP4rmhrjBAkUo+qiJGzedRFavpHHcp5rQd0V6D5 FLnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=e7Lxz1rTUMVMiOxDU3ihYWK5WPfaNeZ9K8ew2EFVN6M=; b=pN9uab9XXFI+7QnUjIDe+20SXCmEZSdlSfAY7EljjkZFNhkCgZQ2VSk62dz9BpW6bZ TRFoXR8HZ8JhOCQkxD41BaqOw+Tnjmo2ardsDeatGMUg39tCJJo0XAOub9tzg4G71LCk JIqacRR0RpbLSBj/J6mpp+3ALcaDMU3tUio46E59QOkKnV1p1KANg0ASJZi3Devwke+/ 5T/O1BNOd1aYqAsKhNmIfklW1Rd8hpnP7uzBXPNcUQJu0tvI+oYBCJcX24XF1zCuC45h Ve3qvJLRUftYUSjmeFWx1OGq+PCgIV/a0qfJQ+xO2xc1F2pq3wNiAQvtdiz0wyf361WI Cj7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=LXgp52W5; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b12si7340692ila.38.2021.09.06.09.48.10; Mon, 06 Sep 2021 09:48:21 -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=@gmail.com header.s=20210112 header.b=LXgp52W5; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243723AbhIFO7Q (ORCPT + 99 others); Mon, 6 Sep 2021 10:59:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243684AbhIFO7H (ORCPT ); Mon, 6 Sep 2021 10:59:07 -0400 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04246C061575; Mon, 6 Sep 2021 07:58:03 -0700 (PDT) Received: by mail-pj1-x102f.google.com with SMTP id u13-20020a17090abb0db0290177e1d9b3f7so4447409pjr.1; Mon, 06 Sep 2021 07:58:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=e7Lxz1rTUMVMiOxDU3ihYWK5WPfaNeZ9K8ew2EFVN6M=; b=LXgp52W5k+6e+E1lD/+fnmwROVu0im0ZTbRaTGFRUHoee98niPkmedBSPuoaU+C901 xA0zVCRtm3ZstMaY0r+bfrLwX0h4lJRwjHZSrSd7VMiiQmuNR4VJb4KIkfYgNr45+6R/ Ytm3SgdnIw+8vdyNM7Qrbyc2ZfHYtokHyF9mvUbjZBpqaG9aV9hVDtVpCH7AesyMXvxe UqoY/NFf7dqJ+B2r0NE5QZJnHLwexfdT+iciJQG7/AjInHtDs1ZoecQ7oAJRB4rOv/f9 sTenECUfv5Z+O8xZpmI3XfSxkSvYjZ+DMUZOgmuBqGpnmkHpr4lFbj1WgmAnvQDDLG1o HBzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=e7Lxz1rTUMVMiOxDU3ihYWK5WPfaNeZ9K8ew2EFVN6M=; b=iA89nih+C3XC4TBfbpSu9gKv5NHVSmzdRFP0BLVNNkz18vfDPvVjyCvnlH6h6vQu3H pqU0PohkolvcapHtnjs0kfhmVt3sUOy09O4pnxENd4wiWxG4xVoeCsaDb+uLiWVDoD/l CNR53Hsj2+5Bae5qe88JoLQYQSeyQJuEbk+lxwkCcna86ghSeZSzgkPrHxGenWzkAPRs OkCrMpzNxhII0AhaubXod+KvY/jPgX59+lqI0rQ048f0DtxruFjwOFRa0d1Ph2F6z4sc KpXXnnsiwqkFLmjw3kb44Vtpp+lBtZ3//JBVvAwioSrchw+eja5mTkHeWloNxWu1IGLN 6AYw== X-Gm-Message-State: AOAM530K/Gc3aHBcoueBxmIbajNs5c4hKAsVX2uBCno5/ZZdfALz3LFd /4NzsXPIRq1DmVC/CvHBQNbphEXQ9ZcAySCJqUM= X-Received: by 2002:a17:902:8648:b029:129:dda4:ddc2 with SMTP id y8-20020a1709028648b0290129dda4ddc2mr11168934plt.4.1630940282178; Mon, 06 Sep 2021 07:58:02 -0700 (PDT) Received: from owniadeMacBook-Pro.local ([8.21.11.90]) by smtp.gmail.com with ESMTPSA id p3sm7607183pfw.71.2021.09.06.07.57.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Sep 2021 07:58:01 -0700 (PDT) Subject: Re: [PATCH v2] ftrace: Cleanup ftrace_dyn_arch_init() To: Michael Ellerman , 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 References: <20210906111626.1259867-1-o451686892@gmail.com> <87v93dn5qh.fsf@mpe.ellerman.id.au> From: Weizhao Ouyang Message-ID: <87b80cd6-f20f-a673-f438-faff5d7d4334@gmail.com> Date: Mon, 6 Sep 2021 22:57:53 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <87v93dn5qh.fsf@mpe.ellerman.id.au> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/9/6 22:22, Michael Ellerman wrote: > 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 Thanks for reply, I'll fix it up.