From patchwork Tue Jan 12 01:31:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chanho Park X-Patchwork-Id: 12012029 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7F393C433DB for ; Tue, 12 Jan 2021 01:33:22 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2E9D022E01 for ; Tue, 12 Jan 2021 01:33:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2E9D022E01 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=xgdaTAq4tYqXxjB0Z5vwuzjcituUeniFv7YEWKidRNc=; b=r/VqOLCFm6R1X600EJUvrsJBho LWkNFV+ikJJ5Rb5krCa7GhRx9J8yBCHonrkLFNIfd3rdw59Cq0HNFga0on34k2h3rtWq0izxXs2wr nWrkcROxsi3jE8HM11NMehzxFB9FuRA/nuD0POijiABeS6s4HJXEbF4H7zQeJ6NYdW87w/w/mhaqS aab2exFvzRs9cGtiMkkFFDNtpexrXFaXs9CNTb1c7md6T8Wz5lILqwIVZtc2t0677TS/7W4/HA63C 6V1r3Pi0YQtKMBXDMLRaUSjRG3JzMfeRMLEpPScoJb1rV3K2mzKHak4g3JoQXLQmXetF4q0csGVqm GxKo5xPw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz8XM-0007In-G3; Tue, 12 Jan 2021 01:31:56 +0000 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kz8XJ-0007Gy-0a for linux-arm-kernel@lists.infradead.org; Tue, 12 Jan 2021 01:31:54 +0000 Received: by mail-pj1-x1030.google.com with SMTP id u4so639730pjn.4 for ; Mon, 11 Jan 2021 17:31:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=K8fP1RqszClj6VEz3gTlWgu+qTohPjILOBDirL7KVmU=; b=WaxWpi8mGX07PZy0eY1bJ3eElXxrYhYq2KlfGFhRLrMe0tLJC8qFs41XM4u+2t/wiN AcrAOwR3+55denO15uc1QhTluztDraAr9Dsu9KzCOmqHen7pads2eddLB8/0c5GbQHdh YzDrwYl7HI6cApBEWvZFY9wa9PAON6EefbiJU2NY7Ji5gMJjIdF8qWHuWPZgOn2HDZRL wmVmicYq+b27v4USzY7cj8sgfz8DnHbG53mxsSRrf95/sJhgfLIfNn3JlfFXxao0J0jb n2g4DyxTWpM8eGCg3MOrHyZTGJJi17qFUosvQiC3H1GU9x2ZgaiK9RqWrjXxgELnodOW Hhkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=K8fP1RqszClj6VEz3gTlWgu+qTohPjILOBDirL7KVmU=; b=Tfb1Je0ig8YKuwbvCO9zQu9najYa8z92gdjmvqwUzyAeM1siAVWPhI8VD62Hp9WwWD BVhzQi7j7mQ5E4GJVsD6ps/f+vfjXh/YOIcqlRyoKyFUwx7twrMuZNn5eAWs/mxQl4ra bJTMaW+p2NabYGHaIVRdNLThxqEEROwlmlGrNA7E96IDWL3mLaWfvZbfTLeHhSxIPmEK uHG316TI4KbDIe6mzp1uHAkJYCfcPBV0x3IXxecfOpT50TPvtpATIdHGYgX72naMhr0g ZCMQLCYtkasMpcSDNcG1KQU+bPx6JzFkk68to7kUVr0JEmKTLYyiSc+c6mzBO8DErKhB 0TNg== X-Gm-Message-State: AOAM533g2W+ZHtt5k0pS3PktZ2/PjNyctvrxuyQhVmOVThNVYzqkm17w ZOItQqZsnP6VgGXU7XUwB9k= X-Google-Smtp-Source: ABdhPJwVXjoHQH8QR94l+0QrWVuToh9TNNKm2b7TVeDW+VTsbAz1Qb2ayzd6QlqGu0jWwse48gUwAQ== X-Received: by 2002:a17:902:ee02:b029:db:c0d6:57f9 with SMTP id z2-20020a170902ee02b02900dbc0d657f9mr2584164plb.65.1610415108910; Mon, 11 Jan 2021 17:31:48 -0800 (PST) Received: from localhost ([221.153.153.187]) by smtp.gmail.com with ESMTPSA id m10sm720492pjn.53.2021.01.11.17.31.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 11 Jan 2021 17:31:48 -0800 (PST) From: Chanho Park X-Google-Original-From: Chanho Park To: mark.rutland@arm.com, maz@kernel.org Subject: [PATCH] clocksource/drivers/arm_arch_timer: export arch_timer_get_rate Date: Tue, 12 Jan 2021 10:31:40 +0900 Message-Id: <20210112013140.35979-1-chanho61.park@samsung.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210111_203153_095514_BB58B1B6 X-CRM114-Status: GOOD ( 13.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chanho Park , Daniel Lezcano , Thomas Gleixner , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This patch adds to export arch_timer_get_rate function for calculating absolute timestamp which is based on arch timer like below. arch_timer_read_counter was already exported but arch_timer_get_rate wasn't. Thus, this patch tries to export this to use this function from loadable kernel module. u32 rate = arch_timer_get_rate() / (1000 * 1000); u64 abs_ns = arch_timer_read_counter() * 1000 / rate; Cc: Mark Rutland Cc: Marc Zyngier Cc: Daniel Lezcano Cc: Thomas Gleixner Signed-off-by: Chanho Park --- drivers/clocksource/arm_arch_timer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c index d0177824c518..f3f49d96dbe9 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c @@ -961,6 +961,7 @@ u32 arch_timer_get_rate(void) { return arch_timer_rate; } +EXPORT_SYMBOL_GPL(arch_timer_get_rate); bool arch_timer_evtstrm_available(void) {