Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp189992imn; Mon, 25 Jul 2022 13:34:39 -0700 (PDT) X-Google-Smtp-Source: AGRyM1schhdQ1p29H0lUgiFZnkk1U0gZEePZ9Ca5ezIFXgKaT56freAD0zziJ3IgXFVXzTzmyHJe X-Received: by 2002:a17:902:aa06:b0:16c:cf06:c2d0 with SMTP id be6-20020a170902aa0600b0016ccf06c2d0mr13649741plb.117.1658781279552; Mon, 25 Jul 2022 13:34:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658781279; cv=none; d=google.com; s=arc-20160816; b=AuCSj/oPXgdKBbAEh80y5gvny5XON+vtg2YmV6yJsU5KkvbRjVbVYcLMkBkYRToEig 5ntS1NdZNwC/JnlLFEs7fn7z554MXNnSPJrOBs7QGmv3fz6sXJMUbxRfRP819XF472wN mv/tnZylePoptUbTRjlMd7/3PN8t+cGMPpBl0gRQ7aUcf0FsrC18lmT3YO3e80L+HQIm +aFlXtwy/Rfrvd6LGvEthEq3ZXL5BOQN+EXCap2Pb4T2mnqJz48cb9/NQOjw5OyCKCd8 FLCQEb+d8agYs97BB5VYH9C0s86IBweAx5KKlaf8DiKqKBqO9/zq8J0lW2Lx0lZyBszi 9IMA== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=TlylZNdZ5fqhJyeysat7o0p+sOkJ/jgETlGckKLZDKE=; b=vdZGWhz4HSXMj701SuBWxX3RvuAQVfmygTle1V8bRXJAexyj3VqGLc3Y3GYGNoAZV+ 1c+Zvz4QUsSH0p1YZYiuhABEJ6un4afAjWPF+sWYS3Oo2zVz27jMFngnt40kktjIb87L pu4AKzRFWL+1hpndZsWyn1VG0M6j/zpPwqk352zBaMaiyiFxTFf3hKfBVEqfetfYhJDw n71OQEp9N0lrH9t15XnRMCEEFa92xHWUUGg1874XqG6suGPWZQ2U1IEgoK/8WB7LEFAb 8Uoy5cjBC1vh6K/I9nXPK/HsimKRbkPcGX87V6HkXS7K7lBzo+nBav1kVhW0wb+4pBOW xs1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=lnm0tSCC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d10-20020a170903230a00b0016c06a16953si17719936plh.2.2022.07.25.13.34.24; Mon, 25 Jul 2022 13:34:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=lnm0tSCC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236458AbiGYTjz (ORCPT + 99 others); Mon, 25 Jul 2022 15:39:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230280AbiGYTjw (ORCPT ); Mon, 25 Jul 2022 15:39:52 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 381A9205CC; Mon, 25 Jul 2022 12:39:52 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id EFF03B810E5; Mon, 25 Jul 2022 19:39:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 24445C341C6; Mon, 25 Jul 2022 19:39:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1658777989; bh=cuudPE0wtvbxElXfQCMzPg0O3xDu7MgSPTnAUbd2BI0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=lnm0tSCCxjmphQNW5NriYcH19FeO0pMC/0MZl19jo18xWrIdpmYjjReLjZrbQc3nV M3OCLSW3PO1gZvubU1+zIdU9EZbB6ratbRpHX/aNA2dD8ZrjXLNedUC8xa5hrDNMbu lcZp1M+CGZGybihQDDnCvRc7tTtqd8IELi5v8huc= Date: Mon, 25 Jul 2022 12:39:48 -0700 From: Andrew Morton To: Ben Dooks Cc: linux-kernel@vger.kernel.org, sparclinux@vger.kernel.org, linux-riscv@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-parisc@vger.kernel.org, openrisc@lists.librecores.org, linux-ia64@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-csky@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-snps-arc@lists.infradead.org, linux-alpha@vger.kernel.org Subject: Re: [PATCH] profile: setup_profiling_timer() is moslty not implemented Message-Id: <20220725123948.f16674b10022404814161d4a@linux-foundation.org> In-Reply-To: <20220721195509.418205-1-ben-linux@fluff.org> References: <20220721195509.418205-1-ben-linux@fluff.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,SUSPICIOUS_RECIPS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 21 Jul 2022 20:55:09 +0100 Ben Dooks wrote: > The setup_profiling_timer() is mostly un-implemented by many > architectures. In many places it isn't guarded by CONFIG_PROFILE > which is needed for it to be used. Make it a weak symbol in > kernel/profile.c and remove the 'return -EINVAL' implementations > from the kenrel. > > There are a couple of architectures which do return 0 from > the setup_profiling_timer() function but they don't seem to > do anything else with it. To keep the /proc compatibility for > now, leave these for a future update or removal. > > On ARM, this fixes the following sparse warning: > arch/arm/kernel/smp.c:793:5: warning: symbol 'setup_profiling_timer' was not declared. Should it be static? I'll grab this. We have had some problems with weak functions lately. See https://lore.kernel.org/all/87ee0q7b92.fsf@email.froward.int.ebiederm.org/T/#u Hopefully that was a rare corner case.