Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp448637rwe; Wed, 19 Apr 2023 00:55:15 -0700 (PDT) X-Google-Smtp-Source: AKy350aiVuWKoV51eKCj7aUVv2RA/VERAgZfZwW1SVntItwSDW3IRgAeLlRzeiwgo8f+opCt3zKl X-Received: by 2002:a9d:7510:0:b0:6a5:d235:970c with SMTP id r16-20020a9d7510000000b006a5d235970cmr2574114otk.18.1681890915233; Wed, 19 Apr 2023 00:55:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681890915; cv=none; d=google.com; s=arc-20160816; b=rLHI0Vt9RTTm5CQ/CuxTPi3zg03JRoX8EwQPBCm/WoBwRjXQa9sq3W/2MuYpkYXLf5 CGGAyDQ3CaFkh2elTcpgc+KlehUg3fAT2ijC/gkm1Dv9q5i9pQHXfXUu0a6wSVuE0hPE QLxDVL6dDRq5W8w1EmlCHGgx6BXt92uBY3uRfY8MJTNq/NY9ly2SZYZc+BA+Knf1XfiN 4dvFuJF1Kap/piFRPNHPS6Yt1M498M+35YQF0PSGAXPuvprQWV8trv2gQzoiMt7y5koZ pyAEYeiDigTJVHzEVGQENA63BM4G/rsi8gLWvgHLHP8+tASTHjGe+dIFy7QUYi3g0S0d xVoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=+O0WO7yYI7mQhiZ8rqGJznJVC6zAde9t8Thengpd4qE=; b=gE7HBWE14PBsP3IshkV6Dx1BJNcuLVVhXOBTzzBpa0fmnnIvAL4q2xfnb6YJYV3CjG /tJxUaX6VDo+Jr8QLjGmArnQIQuGE7G1Bp22tfZli3Bs+89n75CpnK3uDTL9wCleQ88C TBt7WEs+Eb3YsJIN8z7LLa3A53ZTB6Kb6GE3tfmVYqDTMKJvco21+UDkEa8QmH/GsYts 37PiPxZQadjXOBZglS/BJ8rTKVoey0oOBuqWI9r9cssjJw0BunUX0lzpbEVBFoqQdemq IrXOBBhAZpY4JX/qfmELj0Zdr6W0nmvGpmEBLRq1h9FYK9oX7ndLNvowy6VgJmR9fsug QkMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=Mlbbi9Vi; 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 cb6-20020a056830618600b006a444f0c94csi12702449otb.209.2023.04.19.00.55.02; Wed, 19 Apr 2023 00:55:15 -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=Mlbbi9Vi; 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 S232495AbjDSHty (ORCPT + 99 others); Wed, 19 Apr 2023 03:49:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232433AbjDSHtr (ORCPT ); Wed, 19 Apr 2023 03:49:47 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6814597 for ; Wed, 19 Apr 2023 00:49:39 -0700 (PDT) X-UUID: b98f450ede8611eda9a90f0bb45854f4-20230419 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=+O0WO7yYI7mQhiZ8rqGJznJVC6zAde9t8Thengpd4qE=; b=Mlbbi9Vitq1m2gEqVaFuLVaY8GRnimASFRUUm3TbOfdebT4nTa5fkNgNw/MQV+HXT35GV666TBOEQzAm+J/zAe3IAm5I/baasxRUW0wyIMSJUFR+ukexmEa243lfHVtjZINqWaTbwwKlWTjPSaGOm4HFsW2wBOHbHcjv1SZALcY=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.22,REQID:b89faa77-7d2c-4854-925d-f6c6b286bf1d,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:120426c,CLOUDID:f7409084-cd9c-45f5-8134-710979e3df0e,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-CID-BAS: 0,_,0,_ X-UUID: b98f450ede8611eda9a90f0bb45854f4-20230419 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 1809981656; Wed, 19 Apr 2023 15:49:33 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) 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.1118.25; Wed, 19 Apr 2023 15:49:32 +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:32 +0800 From: To: Daniel Lezcano , Thomas Gleixner , Matthias Brugger , AngeloGioacchino Del Regno , "Maciej W . Rozycki" , John Stultz CC: , , , , , , , Subject: [PATCH linux-next v3 0/4] Support timer drivers as loadable modules Date: Wed, 19 Apr 2023 15:49:04 +0800 Message-ID: <20230419074910.10809-1-walter.chang@mediatek.com> X-Mailer: git-send-email 2.18.0 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, T_SCC_BODY_TEXT_LINE,T_SPF_TEMPERROR,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: Walter Chang This set of patches aims to make SoC related timer drivers, such as timer-mediatek.c become loadable modules for the Generic Kernel Image (GKI). This driver registers an always-on timer as tick_broadcast_device on MediaTek SoCs. If the system does not load this module at startup, system will also boot normally by using built-in `bc_hrtimer` instead. Besides, the previous experiment [1] indicates that the SYST/GPT, in combination with a loadable module, is fully operational. The first three patches export functions and remove __init markings to support loadable timer modules. The fourth patch makes timer-mediatek.c become loadable module for GKI. [1] https://lore.kernel.org/all/32777456f8e0f98e4cd5b950f421d21f71b149cf.camel@mediatek.com/#t [v3] - Rebase on linux-next [v2] - Convert timer-mediatek.c driver to loadable module Chun-Hung Wu (4): time/sched_clock: Export sched_clock_register() clocksource/drivers/mmio: Export clocksource_mmio_init() clocksource/drivers/timer-of: Remove __init markings clocksource/drivers/timer-mediatek: Make timer-mediatek become loadable module drivers/clocksource/Kconfig | 2 +- drivers/clocksource/mmio.c | 8 +++--- drivers/clocksource/timer-mediatek.c | 39 ++++++++++++++++++++++++++++ drivers/clocksource/timer-of.c | 23 ++++++++-------- drivers/clocksource/timer-of.h | 6 ++--- kernel/time/sched_clock.c | 4 +-- 6 files changed, 62 insertions(+), 20 deletions(-) -- 2.18.0