From patchwork Wed May 17 02:25:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?V2FsdGVyIENoYW5nICjlvLXntq3lk7Ip?= X-Patchwork-Id: 95017 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp845259vqo; Tue, 16 May 2023 20:10:58 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5qpuyEIrAYM3yqXlRQ03TxIPoRH2b9+Ev5jeE6LZVv+U4AKFClqVzO7hR1hFNAXUp/E2hK X-Received: by 2002:a17:902:e5c8:b0:1ac:b4e3:8aea with SMTP id u8-20020a170902e5c800b001acb4e38aeamr1391131plf.3.1684293057858; Tue, 16 May 2023 20:10:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684293057; cv=none; d=google.com; s=arc-20160816; b=tu0aLKoKMXy3zEWFcBC3ncnNWtwS8F9hTGR+4rNaLd7wiV/oCbOxd0IdrgrnyL8Jsj lYXmoxpk0cWA5O65Qh1oeDAxPEYOjEdPuPBak/T+8CrC+7XmfET5yvdepFNOeAp7o+yB x/TrY+V/nvCkavU5GR4uD2aa+KCN8I+2J4qPAUmWdCnNGgk9goTlzWR73mf5VjqGBGyi UpHq8ZVZsgcAPZBufeIHLMtM1CWMTjIv2ZA5PKWjJ0pZTrNdguAiZIjlEpRZ1z8stLk1 6Mx/xHUkdjLkpnOklJ4gCigtuBr/LhTykhJz0TxFlKWj7WLyvQUUOkPlOvD7AK/z5HHF XV+w== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c15-20020a170902d48f00b001aaecc8a84dsi20768848plg.645.2023.05.16.20.10.43; Tue, 16 May 2023 20:10:57 -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 S232126AbjEQCly (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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766109277139932896?= X-GMAIL-MSGID: =?utf-8?q?1766109277139932896?= 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) {