Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1700956rwr; Thu, 20 Apr 2023 20:48:47 -0700 (PDT) X-Google-Smtp-Source: AKy350a2Sh7JVtQfTThU0YaSdwU9b1Dz0Fd6HibGsbbf44DY0iEuTwjwAXdu5D1fgLkKj82C/m9v X-Received: by 2002:a17:90a:fa08:b0:234:bf0:86b9 with SMTP id cm8-20020a17090afa0800b002340bf086b9mr3334461pjb.25.1682048927052; Thu, 20 Apr 2023 20:48:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682048927; cv=none; d=google.com; s=arc-20160816; b=C5BrQCMukwEOEiK0HcYUfzZow+Yr9rCOXPpU8pNnVBR7W+4zPDcL753jCKniUgBsev 4e9P6W9uFmfuhdGdTAdaUBB14XxVEwWaB7IpvOl4lp3MgTgMELxMw3Fm9v30THBhwvC9 tjuOOHhl3kxH6rJHnF/Ak1wON/TYnerdHyfp53V7/pT8k3zqi9JX6KUAnvTgdLu0UYK5 mrwXU8Gxta8bMpidJjbXKhKIVpfrDOqA7OsiD3/32ZQTY8sY40ue/47F14v2mtI+6/NG dTc6wXvLguIcU4nbbjPkM8NZcqjZtouNNyVWaBtaDhSuOgxIRca6adhNHjBmE42qlSRH H4hA== 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=9fA4Q8Eu/7r79+HGr+WgcfxZUyDhzDjsfyrl60cGNPw=; b=kS/7WiOHEBpxFVE8fDT3xikK4hmWb0OnWs3ynHVJn99prCphVr3Eo63ZZzCtWv6Mz7 YfsVzM2kgKro7YdP7MWIH8bYkmxBxpHEFL1brrFLvcuW/A+ixQ+QWVQ6xP2i4qZzJYjS Qj5qP07q8yEm3d7G4hMShdP6y8SxamCd/igfuY/h48uzSJ3PRv8F3TekGAz+bXQwdXQ3 akbYiZ+qpDL4lyLoP003bFHVaVQou6N8w4YyKwa97ss+Nye0Ot6YUerco2o3nNPoTgS9 apcMEwqPp/ytGMjFk6HrtQUg0o1M+jtshO+CALAAeUVUjVRC7nYaB6kux3rlfRedWM/H Svnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=Kn+c0UUo; 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 y24-20020a63e258000000b0051bb433f5bbsi3454364pgj.386.2023.04.20.20.48.33; Thu, 20 Apr 2023 20:48:47 -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=Kn+c0UUo; 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 S233095AbjDUDro (ORCPT + 99 others); Thu, 20 Apr 2023 23:47:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229521AbjDUDrl (ORCPT ); Thu, 20 Apr 2023 23:47:41 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BB951FC0 for ; Thu, 20 Apr 2023 20:47:36 -0700 (PDT) X-UUID: 3da494fedff711edb6b9f13eb10bd0fe-20230421 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=9fA4Q8Eu/7r79+HGr+WgcfxZUyDhzDjsfyrl60cGNPw=; b=Kn+c0UUocb5x4sQmKbZafj4CMN/YtG+1dGJO1uomfLVho/KPIgdMcWn6P+a7m2ptvA+m+KNymg5pVikkP4Lj6m3EYRVGkJPW8nP25wSeQoO8foqu9ZH26pVa0+GHdKcbf5ePd0v/l5GeDJZLnLItcZ7h8AuXknmaRfRXKp01P8w=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.22,REQID:2f1a9738-c871-4ba4-a4f8-949559ec3d4e,IP:0,U RL:0,TC:0,Content:-25,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Release_Ham,ACTI ON:release,TS:70 X-CID-INFO: VERSION:1.1.22,REQID:2f1a9738-c871-4ba4-a4f8-949559ec3d4e,IP:0,URL :0,TC:0,Content:-25,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Spam_GS981B3D,ACTI ON:quarantine,TS:70 X-CID-META: VersionHash:120426c,CLOUDID:d8680ba2-8fcb-430b-954a-ba3f00fa94a5,B ulkID:230421114731BRI4OOTO,BulkQuantity:0,Recheck:0,SF:48|38|29|28|17|19,T C:nil,Content:0,EDM:-3,IP:nil,URL: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: 3da494fedff711edb6b9f13eb10bd0fe-20230421 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1517359952; Fri, 21 Apr 2023 11:47:30 +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; Fri, 21 Apr 2023 11:47:28 +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:28 +0800 From: To: Daniel Lezcano , Thomas Gleixner , Matthias Brugger , AngeloGioacchino Del Regno , "Maciej W . Rozycki" , John Stultz CC: , , , , , , , Subject: [PATCH linux-next v4 0/4] Support timer drivers as loadable modules Date: Fri, 21 Apr 2023 11:46:45 +0800 Message-ID: <20230421034649.15247-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 [v4] - Fix review comments pointed by Angelo [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 | 33 ++++++++++++++++++++++++++++ drivers/clocksource/timer-of.c | 23 +++++++++---------- drivers/clocksource/timer-of.h | 6 ++--- kernel/time/sched_clock.c | 4 ++-- 6 files changed, 56 insertions(+), 20 deletions(-) -- 2.18.0