Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp448542rwe; Wed, 19 Apr 2023 00:55:09 -0700 (PDT) X-Google-Smtp-Source: AKy350akp8j6irb63T5W4dPjYawljhYg4O6w9pJC0XLpTHynJjJwvSY69yfpiUOfsLHO8ABgysdJ X-Received: by 2002:a9d:6d0b:0:b0:6a1:3fd6:5a11 with SMTP id o11-20020a9d6d0b000000b006a13fd65a11mr2611823otp.36.1681890909006; Wed, 19 Apr 2023 00:55:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681890908; cv=none; d=google.com; s=arc-20160816; b=LE3H+FeZ2mNZnMbSQwTy3q6nNQlj6mQyifiJo9NSJTIh3LfThl5sVQOFnAdUCkccKP iBh3+PoEm522oVwUNBGRvbGaizM2EBjvcxU8uIgbEFLNaGXLzgPIIMZWa13EuWh5qn70 UT6k5weZwAES45yOcT93AkDOL5H4UH2fhaNwTje9I8gv/xVn/0HU5u8Y5qbIaK4On4WC g/S8TLVhym5o8H3GWQlmw1gqA8A/Zwir4wRDent4dtGuGCpSyAozSo9Ses6Bk38Hu17i W5DAmSEOm8z617ah1oaI4gNKlWikpohLkxNEShl5/aE4ixMT+u76AP37jUZR1d66+1c6 tb+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=kV0J1/FM+1iF9G81TOXk0JsrKpONZFmg5K8V55ImZCc=; b=VEn+3/YIiWPlM7x9l5Pmn7JMAt7e5uPS9Zo77KzFbZEaG0GlSapZTBZtGo+1dGHLeu 1qJb+ZpDJOnS8ARdcejCcEuA1qOjobgXx4gSjnjDuIDA/jWrcBALW8QCaaicH3ErNjQr 5quI1KK1O+fj4uW6dUCeuJvxKJCd+Yydyz0koY1AfvPAfPFgmdQQXgRVZ9rpP0aV7mpx WDlBz5X6JmH953MvHKzswD6rZlsi7KZWseaD8z5l/AiSMuyi+0MDmFfB/Kr83o4Ou9ld RjAjh+Q751f9WmqUwC2THZxBFv5VSXjiLnvqeSMtvoPKrk+tE1vHJeAjv9s7ColoGZi0 Zueg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=QQSw9JL9; 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 cb1-20020a056830618100b006a5e782cee9si7678818otb.19.2023.04.19.00.54.56; Wed, 19 Apr 2023 00:55:08 -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=QQSw9JL9; 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 S232389AbjDSHtv (ORCPT + 99 others); Wed, 19 Apr 2023 03:49:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232457AbjDSHts (ORCPT ); Wed, 19 Apr 2023 03:49:48 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3AFAC10E0 for ; Wed, 19 Apr 2023 00:49:45 -0700 (PDT) X-UUID: bcc03b52de8611eda9a90f0bb45854f4-20230419 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=QQSw9JL9NdPf0Y9tBuMgpDH3KDXX1M/N/0PqGsr9KXEEx1oAzUzfyau+zHDnGdQhJtIIRWIEIZFa3HsOorfl1ZYxNhiU8waXPyS89d/pTM2sVbpY1PW9dAk5gfEmUmexNjYvWQpgXARTxqmbtF42nKMHV4/V8NbD42uwgyNXdHg=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.22,REQID:0ac8bd2d-b731-4886-b550-720e4261af16,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:120426c,CLOUDID:a3419084-cd9c-45f5-8134-710979e3df0e,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL: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: bcc03b52de8611eda9a90f0bb45854f4-20230419 Received: from mtkmbs13n2.mediatek.inc [(172.21.101.108)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1288790781; Wed, 19 Apr 2023 15:49:39 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) 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.1118.25; Wed, 19 Apr 2023 15:49:37 +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.25 via Frontend Transport; Wed, 19 Apr 2023 15:49:37 +0800 From: To: Daniel Lezcano , Thomas Gleixner , Matthias Brugger , AngeloGioacchino Del Regno , "Maciej W . Rozycki" , John Stultz CC: , , , , , Chun-Hung Wu , , , Subject: [PATCH linux-next v3 1/4] time/sched_clock: Export sched_clock_register() Date: Wed, 19 Apr 2023 15:49:05 +0800 Message-ID: <20230419074910.10809-2-walter.chang@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20230419074910.10809-1-walter.chang@mediatek.com> References: <20230419074910.10809-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 --- 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