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=-9.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 B6115C433E0 for ; Tue, 9 Mar 2021 18:59:48 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 179FE64FE3 for ; Tue, 9 Mar 2021 18:59:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 179FE64FE3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=alien8.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=3S8JHJ9YdZDXj0C6hZf0+D2NzyzUIU3qHn+ib+Vh1+A=; b=PJRHE0zcgSO1YsIIzA/iFh67a 6RBQMxYLqXmcBO99rBlyF+Y9TKi3QmJYS4VyQtFzgTh17ZambvPvN+rQBkltf2eE2OI23kjHoP1nK j0t/9o6S1b6U+aOxw5gUks2TKf240GIke08GNGbYFBrcy1T/YAscO30G255lOMYUtDCfPoTWboedf n2n0Jtq4Q8Fvd6Ng/gpsndP/yqxOEZ5u7glmy62cqxR9yBrmnLw9x81pCvYCMa27p5A3TslStOkEI Wn1baAuUKs5rMKrvzCBZO3UX1kBGE6RYgxLB9vZ9tMr7ZVdzBZEt2IHLZ5G9a4ALXbrcIE/hLhY1+ YGlw0YSkQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lJhYD-005H0N-NF; Tue, 09 Mar 2021 18:57:49 +0000 Received: from mail.skyhub.de ([5.9.137.197]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lJhY9-005GzY-DW for linux-arm-kernel@lists.infradead.org; Tue, 09 Mar 2021 18:57:47 +0000 Received: from zn.tnic (p200300ec2f0d1e00d0c5a693a55ce411.dip0.t-ipconnect.de [IPv6:2003:ec:2f0d:1e00:d0c5:a693:a55c:e411]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 69B591EC0472; Tue, 9 Mar 2021 19:57:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1615316261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=XORSsete5wDAuj0qz8rNhfE7ztUreCnJFjyEgtuEEKM=; b=azPU0PhRnMmVMUehnvtIjy9yn/D1YnQz5gJG/iSyo655LhqKHIlSxCuwCq1j715vh3uovh NFWAIPqleg2xfS2vuxq5ytUA3EO2hDYspG0gNDGondbClyxv39iE018r97NVYuPLrjYwrs 2iCwWZ5mRvfKVA+fNRbyRBboOODaGyY= Date: Tue, 9 Mar 2021 19:57:37 +0100 From: Borislav Petkov To: Juergen Gross Cc: xen-devel@lists.xenproject.org, x86@kernel.org, virtualization@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org, kvm@vger.kernel.org, Deep Shah , "VMware, Inc." , Russell King , Catalin Marinas , Will Deacon , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , Paolo Bonzini , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Boris Ostrovsky , Stefano Stabellini , Peter Zijlstra Subject: Re: [PATCH v6 02/12] x86/paravirt: switch time pvops functions to use static_call() Message-ID: <20210309185737.GE699@zn.tnic> References: <20210309134813.23912-1-jgross@suse.com> <20210309134813.23912-3-jgross@suse.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210309134813.23912-3-jgross@suse.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210309_185745_637719_D140278A X-CRM114-Status: GOOD ( 13.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Mar 09, 2021 at 02:48:03PM +0100, Juergen Gross wrote: > @@ -167,6 +168,17 @@ static u64 native_steal_clock(int cpu) > return 0; > } > > +DEFINE_STATIC_CALL(pv_steal_clock, native_steal_clock); > +DEFINE_STATIC_CALL(pv_sched_clock, native_sched_clock); > + > +bool paravirt_using_native_sched_clock = true; > + > +void paravirt_set_sched_clock(u64 (*func)(void)) > +{ > + static_call_update(pv_sched_clock, func); > + paravirt_using_native_sched_clock = (func == native_sched_clock); > +} What's the point of this function if there's a global paravirt_using_native_sched_clock variable now? Looking how the bit of information whether native_sched_clock is used, is needed in tsc.c, it probably would be cleaner if you add a set_sched_clock_native(void); or so, to tsc.c instead and call that here and make that long var name a a shorter and static one in tsc.c instead. Hmm? -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel