Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1700842rwr; Thu, 20 Apr 2023 20:48:37 -0700 (PDT) X-Google-Smtp-Source: AKy350ZoQqv3ytliMyIq/WS+SM/7x+Q2C6yN/Cr6wBQTQZAeD97P/O9Gnn7QyYepLFzlLVfSi0kn X-Received: by 2002:a17:90b:341:b0:247:42f6:e8ca with SMTP id fh1-20020a17090b034100b0024742f6e8camr4154544pjb.12.1682048917332; Thu, 20 Apr 2023 20:48:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682048917; cv=none; d=google.com; s=arc-20160816; b=zCAZ07axZaTaM3sdhBPIlWTHDLOs4vTYIJ5/PYxh2lAPOMslXalTE3n/FfykunOBZf +f86nav3cBz7tpttbTeG0AXLxeqHPzQY5AXK/WxLy8Ckj/h/DbWOnhmEKBooAPsCP+C+ 8p9LCIcUM7EoYkbxbSRKBeYhwscFcVOr+oPUIoQ06M0RZcVNrAkkAJenK8UoEXcIsUK8 LUmFhy+fBsFkIzK67ZO2gKSd/QojJ38G32+gw8cLlEiH0cJkO9FkEPZEyljVJku7b7Hb FsbWB56McaltIEAPIdsHz7pu8oJTtfAXHSGFNKo80DRvDnhqiw8pQRyW5Yj3AGncWP1m L7ig== 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=OE2thU26tHMsfd6B/Hwy5NAPhiRKfxc48HI/JmWb8I/KaF4hvhjtiXgYSLoNyhdzgB iu/XDn9z242LKG1J1ZUxilfypcVcVMd3ircoG736UG8jsnbgIO6ezMa51E3sB/XlaKmz Kn+kP+pv03nQv+0qtrYUfxfjHZYF1Y7j0ELboFRLTGVCDZQ3hglKwVhS3j91L7Ame3YM lrp27d0zWRl32q6KU087Z/QE6XqmwtQWOrNH4W0AZlasZo9TVyGCQg8bMWgk+O1MmPbM wkioqQkmntmfbaeOCTlfcpxe2QmLXf9NoixH0SJIU276gpq2JVZpCU2oODt6hh9egKc/ 0jPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b="FSxOFc/N"; 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 kk17-20020a17090b4a1100b0022c9cb7662csi6810968pjb.159.2023.04.20.20.48.22; Thu, 20 Apr 2023 20:48:37 -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="FSxOFc/N"; 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 S233635AbjDUDr4 (ORCPT + 99 others); Thu, 20 Apr 2023 23:47:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233688AbjDUDrx (ORCPT ); Thu, 20 Apr 2023 23:47:53 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79F4E49D1 for ; Thu, 20 Apr 2023 20:47:51 -0700 (PDT) X-UUID: 45f2f6b4dff711edb6b9f13eb10bd0fe-20230421 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=FSxOFc/Ni37MP87PSulX/ASb49zzL7pEUN1ulR+wFu3ezRu2Lv4TgmehF/2TexmmviE0f2iOOh1E7GOzKr/NQyRSvvuURvuC/rGXaMPFZPfasiiuqoq13BGM0H4V+i9ojnJE/t6TzsTplOEQvx5vcHrp8YsPO+DJPtgTm+BwPKQ=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.22,REQID:70bee397-8b78-44fd-808c-2770bf0936e8,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:542fadeb-db6f-41fe-8b83-13fe7ed1ef52,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: 45f2f6b4dff711edb6b9f13eb10bd0fe-20230421 Received: from mtkmbs11n2.mediatek.inc [(172.21.101.187)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1361055635; Fri, 21 Apr 2023 11:47:44 +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; Fri, 21 Apr 2023 11:47:42 +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; Fri, 21 Apr 2023 11:47:42 +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 v4 1/4] time/sched_clock: Export sched_clock_register() Date: Fri, 21 Apr 2023 11:46:46 +0800 Message-ID: <20230421034649.15247-2-walter.chang@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20230421034649.15247-1-walter.chang@mediatek.com> References: <20230421034649.15247-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