From patchwork Wed Feb 8 09:48:02 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: 54329 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3362596wrn; Wed, 8 Feb 2023 01:54:33 -0800 (PST) X-Google-Smtp-Source: AK7set/b+j1n6eSObtfT8RHhZbtBTmyb/JIxmVqfvfnvxeYjezFKdSkkWK27bh/QSEhO1paci55M X-Received: by 2002:a17:906:1011:b0:8af:11b5:fabd with SMTP id 17-20020a170906101100b008af11b5fabdmr85009ejm.5.1675850073041; Wed, 08 Feb 2023 01:54:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675850073; cv=none; d=google.com; s=arc-20160816; b=I1cC7wSdbuG4O94g8hrlPV1D/2QPIFmaip/jlLuDepuoufrkZSU6HCJXyu9W1nQbpU 1jmbWT8V92XOvtZqcpmOkSnG0BMjLCF5UTeMW2OrBb5kPjuk1bSPJPHjp6RhFkrwCWxn OtxtVivf8SQtinRv2fnZGkBdPYg/Nscf/SFfxT+MjwgeY87M1cSvQunaCx8N93qn34hc IbCtRSkD6Qt9x2j7Nj6e/baCOXlZZgiuIk7bs5KCGx+Ld1pFaI4hBumQWyEkbiV2IxZ7 u2uC+Gr4KY0UURwGzTCxjWeXrMYcNCqFHWNFfJ8fCgb7JWun/yI1QdX5ZibXZsdSXHmr wBkg== 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=cgAzemY7B1F/6uDMuyTwMzAAXy5L5tE63/+jwgIvD245MJxzb8FSv5EmBS+odubcE9 mlx3tvsZud1visgSh3YNSoahfxysw08rkaJv0voVHG5VMDQpr4o6QKS39bs1wPUxzmxF /zWPwUGtJ2P0/4ajrxi7vycf9Fg2hElK43JScVHlsH6uqyD+QNzUq2OxZCVgxTPoBiPZ R7AjP2t3nuwzRqnF2DYBiEWihpH+l7/xwtdVoML4Zz55bQMOQ6KoeCOk+a2HaZI/Gi0v 0oXAMXvC+pxscsnOyXd6kZx2eYS7pQYZkNVxBXTXeS5BjcKJ+huZAF7rOdKZ4/IXjaqX 1DbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=nqcZlHh+; 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 y14-20020a17090668ce00b008432fa22567si1092597ejr.649.2023.02.08.01.54.09; Wed, 08 Feb 2023 01:54:33 -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=nqcZlHh+; 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 S230493AbjBHJuj (ORCPT + 99 others); Wed, 8 Feb 2023 04:50:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231140AbjBHJuW (ORCPT ); Wed, 8 Feb 2023 04:50:22 -0500 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5021816307 for ; Wed, 8 Feb 2023 01:50:16 -0800 (PST) X-UUID: fb0d5250a79511eda06fc9ecc4dadd91-20230208 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=nqcZlHh+RLCBZJNKC2TI/DeatpTMppLWNeM76LFp11FQv9nyYbeK3Dcf7QUbiDhDmhizjhFjvWpELoQLCBkmcZMhmHB+BhA9QT1C0rXaY21WmhNnfIVOKUqhGPoK2xPSH/blYw4KYtJyNpfOGuw/+hyvSdYDbDgIUY4D64b/OFA=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.19,REQID:2893d28c-26e7-4786-910f-f555578b4ad2,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:885ddb2,CLOUDID:105dd5f7-ff42-4fb0-b929-626456a83c14,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-UUID: fb0d5250a79511eda06fc9ecc4dadd91-20230208 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 439345689; Wed, 08 Feb 2023 17:50:12 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.194) 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; Wed, 8 Feb 2023 17:50:11 +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.792.15 via Frontend Transport; Wed, 8 Feb 2023 17:50:10 +0800 From: To: Daniel Lezcano , Thomas Gleixner , Matthias Brugger , AngeloGioacchino Del Regno , "Maciej W . Rozycki" , John Stultz CC: , , , , Chun-Hung Wu , , , Subject: [PATCH 1/3] time/sched_clock: Export sched_clock_register() Date: Wed, 8 Feb 2023 17:48:02 +0800 Message-ID: <20230208094813.20874-2-walter.chang@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20230208094813.20874-1-walter.chang@mediatek.com> References: <20230208094813.20874-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,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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757256166043696632?= X-GMAIL-MSGID: =?utf-8?q?1757256166043696632?= 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) { From patchwork Wed Feb 8 09:48:03 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: 54327 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3362242wrn; Wed, 8 Feb 2023 01:53:19 -0800 (PST) X-Google-Smtp-Source: AK7set83zHKl/LyQGo4s1NnkSOsMKsYdZ0sFW4BSKU2rIhuC9pekckoAew2UayCv4GK6yK8eAEnR X-Received: by 2002:a62:a10b:0:b0:587:bdcc:bf0d with SMTP id b11-20020a62a10b000000b00587bdccbf0dmr6641608pff.0.1675849998857; Wed, 08 Feb 2023 01:53:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675849998; cv=none; d=google.com; s=arc-20160816; b=QOfjzdIou17uevlzRJEAQ60TppN788O3mx/t3QoFteG0Unust+sVMD58RbryaSLaPr PVX1W2G/MpV2uMFaOBwzSb8yq/Lrje4k19LNVyfUzpDSlrkXvQ5el7JFDpduzbfGw16J JySdSdK7z+RHSBRDSwsu7clbyxW9YRUpSY40WO9voXBU3jfuYbMrC1CJg7hURd8o2SiM MBwVC47eUDu3Axnpw+oLQbGbnaBC3LM4wDVSe2VPR6WKD9kxqIKbPjxJrFD0b6zr3je0 bJD1Q0K4gGdhgIVTtaARsAWA3rQLqJwu0FErUNFE6jdG5NQj4wQUKGermZ1gZxHyrwrU mTgg== 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=53j2Zr5g1CHI4OUeg0l8fF8afX2h7OOtLqGtKgBQpXk=; b=bJcC9T6k8UsC1u6LuCRZ4iOki7dBvfsbX8msrkmUBvbPkP7YC5J/9EcdFJWklyeMx4 WmNNiTu0MKD3EeGRHsB0+oOX0O16AeVCu+6fgtweaiPd5SUXLOEP15w4EJflkrKNf1eF v02z/b3dhD62Hu4hVYvLT9KRPJJbr9lbSr+Qqvn8FtOk0n3gQ2Q2fE2NW9YYra114uRP CI7QpLeYcoeP7ipAyZbbAZOyOwJWhnelKjb+XI/nSXe0hCmzUmc55+2HDCe8a05AwpQr e4gXmmvMko0qr+y8llxR7x/0k0ocRBhZ8luYTZiiwlKciUz4OxIcSwrCjO3Zq4jvCEsj zlnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=TIf2FeJ2; 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 r29-20020aa7989d000000b005818631179asi17969204pfl.95.2023.02.08.01.53.04; Wed, 08 Feb 2023 01:53:18 -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=TIf2FeJ2; 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 S230468AbjBHJud (ORCPT + 99 others); Wed, 8 Feb 2023 04:50:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231209AbjBHJuX (ORCPT ); Wed, 8 Feb 2023 04:50:23 -0500 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFDE0E3A7 for ; Wed, 8 Feb 2023 01:50:19 -0800 (PST) X-UUID: fcbe7dc2a79511eda06fc9ecc4dadd91-20230208 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=53j2Zr5g1CHI4OUeg0l8fF8afX2h7OOtLqGtKgBQpXk=; b=TIf2FeJ2rF78i2JvokCV10akfOQFmb5WWvQ+zmEwzK4KBOi/zIXkefv1UZYqJVnSSOls8XX5mdYbBZfuVeK6r9ccG0sRVltBFttWi7W2KTNbXMXVWz0y65dOIMpVzzndI7thq+FANJI/o6kbg1LKol5fnDJxGcHdPQTarx7KwSk=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.19,REQID:d1007f4f-41f5-489d-ace8-e2dc85fedbac,IP:0,U RL:0,TC:0,Content:-5,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:-5 X-CID-META: VersionHash:885ddb2,CLOUDID:ba47468e-8530-4eff-9f77-222cf6e2895b,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-UUID: fcbe7dc2a79511eda06fc9ecc4dadd91-20230208 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1439268316; Wed, 08 Feb 2023 17:50:15 +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.792.15; Wed, 8 Feb 2023 17:50:13 +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.792.15 via Frontend Transport; Wed, 8 Feb 2023 17:50:13 +0800 From: To: Daniel Lezcano , Thomas Gleixner , Matthias Brugger , AngeloGioacchino Del Regno , "Maciej W . Rozycki" , John Stultz CC: , , , , Chun-Hung Wu , , , Subject: [PATCH 2/3] clocksource/drivers/mmio: Export clocksource_mmio_init() Date: Wed, 8 Feb 2023 17:48:03 +0800 Message-ID: <20230208094813.20874-3-walter.chang@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20230208094813.20874-1-walter.chang@mediatek.com> References: <20230208094813.20874-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,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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757256088288154916?= X-GMAIL-MSGID: =?utf-8?q?1757256088288154916?= From: Chun-Hung Wu Export clocksource_mmio_init() and clocksource_mmio_readl_up() to support building clocksource driver as module, such as timer-mediatek.c. Signed-off-by: Chun-Hung Wu --- drivers/clocksource/mmio.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/clocksource/mmio.c b/drivers/clocksource/mmio.c index 9de751531831..b08b2f9d7a8b 100644 --- a/drivers/clocksource/mmio.c +++ b/drivers/clocksource/mmio.c @@ -21,6 +21,7 @@ u64 clocksource_mmio_readl_up(struct clocksource *c) { return (u64)readl_relaxed(to_mmio_clksrc(c)->reg); } +EXPORT_SYMBOL_GPL(clocksource_mmio_readl_up); u64 clocksource_mmio_readl_down(struct clocksource *c) { @@ -46,9 +47,9 @@ u64 clocksource_mmio_readw_down(struct clocksource *c) * @bits: Number of valid bits * @read: One of clocksource_mmio_read*() above */ -int __init clocksource_mmio_init(void __iomem *base, const char *name, - unsigned long hz, int rating, unsigned bits, - u64 (*read)(struct clocksource *)) +int clocksource_mmio_init(void __iomem *base, const char *name, + unsigned long hz, int rating, unsigned bits, + u64 (*read)(struct clocksource *)) { struct clocksource_mmio *cs; @@ -68,3 +69,4 @@ int __init clocksource_mmio_init(void __iomem *base, const char *name, return clocksource_register_hz(&cs->clksrc, hz); } +EXPORT_SYMBOL_GPL(clocksource_mmio_init); From patchwork Wed Feb 8 09:48:04 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: 54328 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3362381wrn; Wed, 8 Feb 2023 01:53:46 -0800 (PST) X-Google-Smtp-Source: AK7set8o3/7GYzeBjJBFQ/WxJdKb1gnUH1aGTIDAuJij9pTvZGtKFdOnil81y2ClsI2gVAmJiq+e X-Received: by 2002:a05:6402:278f:b0:4aa:aa5b:fcd0 with SMTP id b15-20020a056402278f00b004aaaa5bfcd0mr8529794ede.1.1675850026123; Wed, 08 Feb 2023 01:53:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675850026; cv=none; d=google.com; s=arc-20160816; b=DDJv+2bSMPkjuC+6Eq3ckeygStfSp5x7cY0PJnIczcAUOhKcOWNy3EAHDBKwVHhP/Y 7hINm20dJxxX+3uPTd6Div9lJNU7xUM+BQ3g69K3WMlNBhmyWtlOJisF4HPDNRuN6ySk PQFwNhIeJJSGHGQlQLj859VTLth/iS2axgpCLFPaea87kSaxI+Ul6CY/47x1bEUJJgZX SRoa22msJqRHvhTvxQGmzP7oHNhg2P82+NWhdYPpuGvMPD/AI19Yx0ud27oVAcq1uJUC pFtm8R6eWtluyMLC1k468uSYt7I7bzK2+K3SwgVAos0FDK9+r1Ngt4SJtUGVuI7uNpc6 7SAA== 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=4QpgheGdPxzb58/Ksj9pKvTs/gU5rhW1z6K0RerBlRY=; b=0LqSPAhWp5DBuiq6bVXdSOJuMGYdS7rjvXBjQ7P0Nt3/0CmF2Jh+cNj61T9ghtcWIj UreqwUF3U2+Mifr7who/ldjR/BTf4SmujxK0z9vrNH7X0/BadoTgikRQW8duCanttqur 6xx2koIfG9O1A72hsBtAxy3yeKB9Hs5fmS3V40uRsdCRpeYWbxub3UY3QRvxvpHSn0Df T8QAiNljhYWrSB+IHoPHIyipjSZNmSOQyxu6X6wFWXUA0GTsbNiuwrf7A3S3z1q7qFZa 2HDBbu29vHJh6a6pIswvc81dKZ8PSqQhVKxyxE/zHSvkYWWHCUlwG9V6jHZz04rPmpEj KAlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=ZeL5dLIi; 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 g9-20020a056402114900b0048772a84504si17348436edw.591.2023.02.08.01.53.24; Wed, 08 Feb 2023 01:53:46 -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=ZeL5dLIi; 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 S231283AbjBHJus (ORCPT + 99 others); Wed, 8 Feb 2023 04:50:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230461AbjBHJu1 (ORCPT ); Wed, 8 Feb 2023 04:50:27 -0500 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 736EBE3A7 for ; Wed, 8 Feb 2023 01:50:25 -0800 (PST) X-UUID: fe25a730a79511ed945fc101203acc17-20230208 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=4QpgheGdPxzb58/Ksj9pKvTs/gU5rhW1z6K0RerBlRY=; b=ZeL5dLIi2FASzMFuFNR1AqFTnGsgAw++eiyksgnKUC+zMJxOKLPVPO+tPO75rTGPhRvbJr6P8WE+A2WbFhByWp45nu8+BCSfLxCwCRqm4kOG3BAU9ryhzDQf8hKsEQUcoDskM4V4gj7sUGdRsodYMVtf3sEZPrBn5VWZC6jBQgM=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.19,REQID:d2323d6e-21f4-4cc1-a8c4-c50b1dd82ae4,IP:0,U RL:0,TC:0,Content:-5,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:-5 X-CID-META: VersionHash:885ddb2,CLOUDID:185ed5f7-ff42-4fb0-b929-626456a83c14,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:1,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0 X-CID-BVR: 0 X-UUID: fe25a730a79511ed945fc101203acc17-20230208 Received: from mtkmbs10n2.mediatek.inc [(172.21.101.183)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 205996995; Wed, 08 Feb 2023 17:50:17 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.194) 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; Wed, 8 Feb 2023 17:50:16 +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.792.15 via Frontend Transport; Wed, 8 Feb 2023 17:50:16 +0800 From: To: Daniel Lezcano , Thomas Gleixner , Matthias Brugger , AngeloGioacchino Del Regno , "Maciej W . Rozycki" , John Stultz CC: , , , , Chun-Hung Wu , , , Subject: [PATCH 3/3] clocksource/drivers/timer-of: Remove __init markings Date: Wed, 8 Feb 2023 17:48:04 +0800 Message-ID: <20230208094813.20874-4-walter.chang@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20230208094813.20874-1-walter.chang@mediatek.com> References: <20230208094813.20874-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,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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757256117237185870?= X-GMAIL-MSGID: =?utf-8?q?1757256117237185870?= From: Chun-Hung Wu This allows timer drivers to be compiled as modules. Link: https://lore.kernel.org/patchwork/patch/1214447/ Signed-off-by: Chun-Hung Wu --- drivers/clocksource/timer-of.c | 23 ++++++++++++----------- drivers/clocksource/timer-of.h | 6 +++--- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/drivers/clocksource/timer-of.c b/drivers/clocksource/timer-of.c index c3f54d9912be..59bc5921acad 100644 --- a/drivers/clocksource/timer-of.c +++ b/drivers/clocksource/timer-of.c @@ -19,7 +19,7 @@ * * Free the irq resource */ -static __init void timer_of_irq_exit(struct of_timer_irq *of_irq) +static void timer_of_irq_exit(struct of_timer_irq *of_irq) { struct timer_of *to = container_of(of_irq, struct timer_of, of_irq); @@ -47,8 +47,8 @@ static __init void timer_of_irq_exit(struct of_timer_irq *of_irq) * * Returns 0 on success, < 0 otherwise */ -static __init int timer_of_irq_init(struct device_node *np, - struct of_timer_irq *of_irq) +static int timer_of_irq_init(struct device_node *np, + struct of_timer_irq *of_irq) { int ret; struct timer_of *to = container_of(of_irq, struct timer_of, of_irq); @@ -91,7 +91,7 @@ static __init int timer_of_irq_init(struct device_node *np, * * Disables and releases the refcount on the clk */ -static __init void timer_of_clk_exit(struct of_timer_clk *of_clk) +static void timer_of_clk_exit(struct of_timer_clk *of_clk) { of_clk->rate = 0; clk_disable_unprepare(of_clk->clk); @@ -107,8 +107,8 @@ static __init void timer_of_clk_exit(struct of_timer_clk *of_clk) * * Returns 0 on success, < 0 otherwise */ -static __init int timer_of_clk_init(struct device_node *np, - struct of_timer_clk *of_clk) +static int timer_of_clk_init(struct device_node *np, + struct of_timer_clk *of_clk) { int ret; @@ -146,13 +146,13 @@ static __init int timer_of_clk_init(struct device_node *np, goto out; } -static __init void timer_of_base_exit(struct of_timer_base *of_base) +static void timer_of_base_exit(struct of_timer_base *of_base) { iounmap(of_base->base); } -static __init int timer_of_base_init(struct device_node *np, - struct of_timer_base *of_base) +static int timer_of_base_init(struct device_node *np, + struct of_timer_base *of_base) { of_base->base = of_base->name ? of_io_request_and_map(np, of_base->index, of_base->name) : @@ -165,7 +165,7 @@ static __init int timer_of_base_init(struct device_node *np, return 0; } -int __init timer_of_init(struct device_node *np, struct timer_of *to) +int timer_of_init(struct device_node *np, struct timer_of *to) { int ret = -EINVAL; int flags = 0; @@ -209,6 +209,7 @@ int __init timer_of_init(struct device_node *np, struct timer_of *to) timer_of_base_exit(&to->of_base); return ret; } +EXPORT_SYMBOL_GPL(timer_of_init); /** * timer_of_cleanup - release timer_of resources @@ -217,7 +218,7 @@ int __init timer_of_init(struct device_node *np, struct timer_of *to) * Release the resources that has been used in timer_of_init(). * This function should be called in init error cases */ -void __init timer_of_cleanup(struct timer_of *to) +void timer_of_cleanup(struct timer_of *to) { if (to->flags & TIMER_OF_IRQ) timer_of_irq_exit(&to->of_irq); diff --git a/drivers/clocksource/timer-of.h b/drivers/clocksource/timer-of.h index a5478f3e8589..5d1472846346 100644 --- a/drivers/clocksource/timer-of.h +++ b/drivers/clocksource/timer-of.h @@ -66,9 +66,9 @@ static inline unsigned long timer_of_period(struct timer_of *to) return to->of_clk.period; } -extern int __init timer_of_init(struct device_node *np, - struct timer_of *to); +extern int timer_of_init(struct device_node *np, + struct timer_of *to); -extern void __init timer_of_cleanup(struct timer_of *to); +extern void timer_of_cleanup(struct timer_of *to); #endif