Message ID | 20230214105412.5856-2-walter.chang@mediatek.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2901745wrn; Tue, 14 Feb 2023 03:05:56 -0800 (PST) X-Google-Smtp-Source: AK7set+cCA/B9khBl3nds5TUiMggWZneLlgl3k4DTNnjePrrx+VSi2mozwG9oW9x0KPNT2g90s2u X-Received: by 2002:a50:bae7:0:b0:499:d1ca:6d83 with SMTP id x94-20020a50bae7000000b00499d1ca6d83mr1955054ede.2.1676372756089; Tue, 14 Feb 2023 03:05:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676372756; cv=none; d=google.com; s=arc-20160816; b=TMm0pkeUgtgrKr1NibeYAsdcTCimoVCEJbJdfCg+Jw0dc2KB2Vm/wgs0qm6gmIkHYj OEN1OF+qXucKV06eaoFopwHxVfhDZQpxj4EDMxmRy3TxWK+RjqZbHoASrXw14eAQM4cL TLZfMK4+i9P/1KPE/UUmo2PO2sLX2tFpVytkU88ajF6Hr96fdL2l1MsUP88zRhg/gd7m rqS1CbUWdYFoKZFePhTpBvQ80fFMtNOQcYBNbj4IA5+dWoELbEf+SlHc5xBMWrDtEqAV 3OFJzBlSLgqEVLWuA4We3P60dIMt00W7oFEFWEisCkzVwSqZT7g1Z5kVcMSgHUqy6jpX X+gA== 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=kV0J1/FM+1iF9G81TOXk0JsrKpONZFmg5K8V55ImZCc=; b=ov4IqtFwL5Y9q/SRwpFbqytiljLWs+UzpTVe6ivYjTw9s2fxA2RDehwnxXQ4YDd+CA rbhlmJyLaVWKE5mK5qJVwAxRAkDpOutq0kaG9QCbqgKZSuitKMGgAG/e5AxSfp88IKne V58pJmGgp3aDxKPGdAEUpcw+R9fbtx7+F+aMBhGrlsa/zJr1jk5olPx+Qle/42ZHAg6s 2v3NqzUbQb4XUP4YOmRcnmqHAJLVrpYGF3xkP6zItuwKEhKe6lLFr53JEwZrWihRbF+W SUe6ymDQDmi+U5x1Or5MMlxunBrFTYeySNuhgC3kewi6e85ctre/Yyby2cEqmjhIR2WI Yoqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=RepwRWiB; 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 24-20020a170906001800b008b13495ef93si566791eja.988.2023.02.14.03.05.33; Tue, 14 Feb 2023 03:05:56 -0800 (PST) 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=RepwRWiB; 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 S232056AbjBNK4a (ORCPT <rfc822;tebrre53rla2o@gmail.com> + 99 others); Tue, 14 Feb 2023 05:56:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229713AbjBNK42 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 14 Feb 2023 05:56:28 -0500 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E36259F6 for <linux-kernel@vger.kernel.org>; Tue, 14 Feb 2023 02:56:27 -0800 (PST) X-UUID: 3895816eac5611eda06fc9ecc4dadd91-20230214 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=kV0J1/FM+1iF9G81TOXk0JsrKpONZFmg5K8V55ImZCc=; b=RepwRWiBWI6i45+6C6PeDRP2m9i89Gvrf4GAjBk7ITvuyiHJhnn7uo/GX2L+EtjH3dkjXElft8jVadvf0YaoO80vR7HBUheCOuue6MoqIJB10eqA9apn3dTofTzgcvmwGnW8LOdcSJjFHzVVg2+snTWLhH5xotb4J+7AqtTc1RY=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.19,REQID:18e0cb29-2856-447f-b843-7efa5073caf2,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.19,REQID:18e0cb29-2856-447f-b843-7efa5073caf2,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:885ddb2,CLOUDID:5cbb69b0-beed-4dfc-bd9c-e1b22fa6ccc4,B ulkID:23021418562454WU8JHL,BulkQuantity:0,Recheck:0,SF:38|29|28|17|19|48,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-UUID: 3895816eac5611eda06fc9ecc4dadd91-20230214 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw01.mediatek.com (envelope-from <walter.chang@mediatek.com>) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1501535501; Tue, 14 Feb 2023 18:56:23 +0800 Received: from mtkmbs13n1.mediatek.inc (172.21.101.193) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.3; Tue, 14 Feb 2023 18:56:22 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs13n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Tue, 14 Feb 2023 18:56:22 +0800 From: <walter.chang@mediatek.com> To: Daniel Lezcano <daniel.lezcano@linaro.org>, Thomas Gleixner <tglx@linutronix.de>, Matthias Brugger <matthias.bgg@gmail.com>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, "Maciej W . Rozycki" <macro@orcam.me.uk>, John Stultz <jstultz@google.com>, "Krzysztof Kozlowski" <krzysztof.kozlowski@linaro.org> CC: <wsd_upstream@mediatek.com>, <stanley.chu@mediatek.com>, <Chun-hung.Wu@mediatek.com>, <Freddy.Hsin@mediatek.com>, Chun-Hung Wu <chun-hung.wu@mediatek.com>, <linux-kernel@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-mediatek@lists.infradead.org> Subject: [PATCH v2 1/4] time/sched_clock: Export sched_clock_register() Date: Tue, 14 Feb 2023 18:53:11 +0800 Message-ID: <20230214105412.5856-2-walter.chang@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20230214105412.5856-1-walter.chang@mediatek.com> References: <20230214105412.5856-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,UNPARSEABLE_RELAY 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757804239445455042?= X-GMAIL-MSGID: =?utf-8?q?1757804239445455042?= |
Series |
Support timer drivers as loadable modules
|
|
Commit Message
Walter Chang (張維哲)
Feb. 14, 2023, 10:53 a.m. UTC
From: Chun-Hung Wu <chun-hung.wu@mediatek.com> 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 <chun-hung.wu@mediatek.com> --- 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) {