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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no 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 7E4FCC433E3 for ; Thu, 25 Mar 2021 07:44:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 31C3961A27 for ; Thu, 25 Mar 2021 07:44:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229836AbhCYHnx (ORCPT ); Thu, 25 Mar 2021 03:43:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229653AbhCYHnj (ORCPT ); Thu, 25 Mar 2021 03:43:39 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F0B2C06174A for ; Thu, 25 Mar 2021 00:43:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=xjBNfcp6p4BIctZomY46PzWOaEWIxfJHX1EGfm570g8=; b=T3GrczZhiQuFC0e3oq+Tcc90+K QQHpl5LbAAiCPkJjBI1ilV2UIK8whc/ioMMfaCjgr/kMKpRNlIPZrtwCo41fwMBCd/yOqY1blrAQF esGgP0bu3CjFgrfgm0WaNVVHhXLSXNlUhZSu3kF+NqIK566CSErxzlJu4tRurChgPgVATOtI5aP6a m3hzqhx0kL1CyjD88xtFrnmqVmCo3Q42jPTEM45+x6YCEWxiWDs/ahfVGf3/N3lFvfsNy06ozcGMs nlzUwcYaKoinyExMSVj6LdBsHlcpDjv8FsUbm25BLfnFr1hQ8Ssk2/JDJFySRKetTDj4DFkPFTx/h 6f7cdHBg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lPKdN-00CTwE-St; Thu, 25 Mar 2021 07:42:28 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 814CC301A7A; Thu, 25 Mar 2021 08:42:24 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 69D2D29D50698; Thu, 25 Mar 2021 08:42:24 +0100 (CET) Date: Thu, 25 Mar 2021 08:42:24 +0100 From: Peter Zijlstra To: Rasmus Villemoes Cc: Sami Tolvanen , Steven Rostedt , Arnd Bergmann , Josh Poimboeuf , Jason Baron , Ingo Molnar , Juri Lelli , Vincent Guittot , Ard Biesheuvel , Dietmar Eggemann , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Frederic Weisbecker , Linux Kernel Mailing List Subject: Re: [PATCH] static_call: fix function type mismatch Message-ID: References: <0f4679d6-44a4-d045-f249-a9cffb126fd4@rasmusvillemoes.dk> <2b38d13f-9f90-b94b-7de4-c924696e6a9f@rasmusvillemoes.dk> <170687fb-13ef-e9b8-ac69-032202b344fe@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <170687fb-13ef-e9b8-ac69-032202b344fe@rasmusvillemoes.dk> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 25, 2021 at 01:42:41AM +0100, Rasmus Villemoes wrote: > > Actually, it looks like I can't select PREEMPT_DYNAMIC> and tweaking Kconfig > > Ah, there's no prompt on the "bool" line, so it doesn't show up. That > seems to be a mistake, since there's an elaborate help text which says > > The runtime overhead is negligible with > HAVE_STATIC_CALL_INLINE enabled > but if runtime patching is not available for the specific > architecture > then the potential overhead should be considered. > > So it seems that it was meant to be "you can enable this if you really > want". > > to force enable it on arm64 results in a build error Right, PREEMPT_DYNAMIC really hard relies on HAVE_STATIC_CALL There's an implicit dependency in the select: config PREEMPT ... select PREEMPT_DYNAMIC if HAVE_PREEMPT_DYNAMIC > > ("implicit declaration of function 'static_call_mod'"). > > Seems to be an omission in the last !HAVE_STATIC_CALL branch in > static_call_types.h, and there's also no > EXPORT_STATIC_CALL_TRAMP{,_GPL} in static_call.h for that case. That interface doesn't make sense for !HAVE_STATIC_CALL. It's impossible to not export the function pointer itself but still call it for !HAVE_STATIC_CALL.