From patchwork Fri Apr 21 03:46:46 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: 86130 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp794820vqo; Thu, 20 Apr 2023 20:48:52 -0700 (PDT) X-Google-Smtp-Source: AKy350ZnIpMxnjCaVfl8umAwXR/Kht3da73tJxDhjiUoMleuXFaTq+AS0px7/gFwSrcbqXoJ3S2K X-Received: by 2002:a05:6a20:158d:b0:f2:4076:9d1e with SMTP id h13-20020a056a20158d00b000f240769d1emr3017634pzj.2.1682048932535; Thu, 20 Apr 2023 20:48:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682048932; cv=none; d=google.com; s=arc-20160816; b=YEkUdEQ7KNAl9Gu8m0b8WmESwx43c8MKbJCJJotXPLUTC6+F+1wlVAqDc/lyFaJcOS D6E3289eI56ntwZrJnJA05W9WtgeT6saj0rhGDdWQ23TSbsKH+RzHoI1w2sBwiuUmppi vS/O7fdqtz03C2Y1AUz9T47sRnwHPkw+wvNh4pUNu/3elMLSVEOreIoNzlQlQ28wpcsv CbS9QRB8OzblGwBfo7WHrh09ttRRkmcUkz97836J+t3RoT7xPJTN1sKjdiSc1staKjxI A8bepxKt0gCNbTOGxc2hV3lbD47NeMpqyxHhEyOs8PJx9QUwf+gs7rklXYJBkYsJkKq4 uOEA== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l26-20020a63571a000000b0051b702b179asi3151903pgb.747.2023.04.20.20.48.38; Thu, 20 Apr 2023 20:48:52 -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 S233689AbjDUDr5 (ORCPT + 99 others); Thu, 20 Apr 2023 23:47:57 -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 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?1763756141775586374?= X-GMAIL-MSGID: =?utf-8?q?1763756141775586374?= 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) {