Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1555908rwd; Tue, 16 May 2023 20:15:28 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7BUVCr+anwXiLmQmRNvpDaMr1iLmZr4HWXf+Kn8EtBZab3782n02w6Q2Gr7+7ZNk6ydicM X-Received: by 2002:a17:902:e752:b0:1ae:b2a:8ed7 with SMTP id p18-20020a170902e75200b001ae0b2a8ed7mr1113177plf.29.1684293327999; Tue, 16 May 2023 20:15:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684293327; cv=none; d=google.com; s=arc-20160816; b=T3YJrqbzDXb0uXOF/y8s2eF+FtGdWr67D2kTJCydRUfsc5mGXPK3+KK/648xov4for 88bu8o3R7eQ4ofYEp5sIBFAU5+iu0FCWhlSRnOeY4fYoid24ZqN6U54OiRURrH6bFY3T n4y60YE/QWUpJsQq5m2kxSjO03ZrOxAOCTmUM8VSvwhLr9NRt6NTPKuggvx+0J1GAwQS Dces7SQ+kyKMz/bioW4rucSb5QI9JjMYSbgzch1CgErLe3uClQcMgBbZgOn+FYWCKHNJ jsy/zkI5fLkGneIS6OHiaUl0CbsepTYM0mAMDZu2BInPCGGAhFyZs4lu3qUcVvwxCaiV Z9vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=RexUN+td4e/E4ud86CV5E7wKgvXssOxMb0wiC7TICTw=; b=VqvyQOFPcXOihrJjgDyjCRnqa9Sbc1dYyaTgLYDP5MXWsJf6DPtWDDqFZyJGI8u1X8 fGw37ApT6xKDd0NWLW6EclgD6ZN3Mzu7hqVJgptfErbkCL5Dzjlzs8JQtBd2cc8c28Wz 9LgupQOt9/yST+CR4MrKPSmw+yKI00MSpF/5msnC8VunK6Spg0IzBlGHIa8TZd8HkNob HGog5qk5qenw++Mp2y00njm4HEOaScOQEIy0ptcritCpHEu7KxToKhPmeGmmOp+JB14l 6rwZ0/baYsz2YskSpKfIszZLvhW/9N0dLKkdfETlhQvKNvoWDSDCs/Silq8r7zjI/IDs kpGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=hUO4c6X3; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z5-20020a170903018500b001ab29e00303si18942209plg.426.2023.05.16.20.15.14; Tue, 16 May 2023 20:15:27 -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=@mediatek.com header.s=dk header.b=hUO4c6X3; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232125AbjEQCly (ORCPT + 99 others); Tue, 16 May 2023 22:41:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232098AbjEQClx (ORCPT ); Tue, 16 May 2023 22:41:53 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93B651706 for ; Tue, 16 May 2023 19:41:50 -0700 (PDT) X-UUID: 3c7ad3b4f45a11ed9cb5633481061a41-20230517 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=RexUN+td4e/E4ud86CV5E7wKgvXssOxMb0wiC7TICTw=; b=hUO4c6X3WKhlrMZ3GAPprd9C1WcOx3qABNvcy1NAFe/QUzdnziavl8pOELjIEcnQaReTIk9oyLdx/7c1omL4Hw537iUcvEEa2M9wr9qlx375XovT5KM38AnQyRdG2SrJb0DcUUNUFaqPtKMljZTv8CmOZ7hiSNtDtVQEwkg2yJk=; X-CID-UNFAMILIAR: 1 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.25,REQID:ca85d6ad-f776-4315-8ddf-31b4a43a2f93,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:100,FILE:0,BULK:0,RULE:Release_Ham,ACTIO N:release,TS:100 X-CID-INFO: VERSION:1.1.25,REQID:ca85d6ad-f776-4315-8ddf-31b4a43a2f93,IP:0,URL :0,TC:0,Content:0,EDM:0,RT:0,SF:100,FILE:0,BULK:0,RULE:Spam_GS981B3D,ACTIO N:quarantine,TS:100 X-CID-META: VersionHash:d5b0ae3,CLOUDID:74c00c6c-2f20-4998-991c-3b78627e4938,B ulkID:2305171026343BENMZM0,BulkQuantity:0,Recheck:0,SF:48|38|29|28|16|19,T C:nil,Content:0,EDM:-3,IP:nil,URL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0 ,OSI:0,OSA:0,AV:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-UUID: 3c7ad3b4f45a11ed9cb5633481061a41-20230517 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 976849742; Wed, 17 May 2023 10:26:31 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.194) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Wed, 17 May 2023 10:26:30 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs13n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Wed, 17 May 2023 10:26:30 +0800 From: To: Daniel Lezcano , Thomas Gleixner , Matthias Brugger , AngeloGioacchino Del Regno , "Maciej W . Rozycki" , John Stultz CC: , , , , , Chun-Hung Wu , , , Subject: [PATCH v5 1/4] time/sched_clock: Export sched_clock_register() Date: Wed, 17 May 2023 10:25:45 +0800 Message-ID: <20230517022557.24388-2-walter.chang@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20230517022557.24388-1-walter.chang@mediatek.com> References: <20230517022557.24388-1-walter.chang@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,URIBL_BLOCKED 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 From: Chun-Hung Wu clocksource driver may use sched_clock_register() to resigter itself as a sched_clock source. Export it to support building such driver as module, like timer-mediatek.c Signed-off-by: Chun-Hung Wu Signed-off-by: Walter Chang Acked-by: John Stultz --- kernel/time/sched_clock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/time/sched_clock.c b/kernel/time/sched_clock.c index 8464c5acc913..8e49e87d1221 100644 --- a/kernel/time/sched_clock.c +++ b/kernel/time/sched_clock.c @@ -150,8 +150,7 @@ static enum hrtimer_restart sched_clock_poll(struct hrtimer *hrt) return HRTIMER_RESTART; } -void __init -sched_clock_register(u64 (*read)(void), int bits, unsigned long rate) +void sched_clock_register(u64 (*read)(void), int bits, unsigned long rate) { u64 res, wrap, new_mask, new_epoch, cyc, ns; u32 new_mult, new_shift; @@ -223,6 +222,7 @@ sched_clock_register(u64 (*read)(void), int bits, unsigned long rate) pr_debug("Registered %pS as sched_clock source\n", read); } +EXPORT_SYMBOL_GPL(sched_clock_register); void __init generic_sched_clock_init(void) { -- 2.18.0