Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp4258214rwr; Mon, 8 May 2023 05:26:40 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7/+2zOhWn5a0SnLpekAfgbuoWPWvZPnzABlsK0fJFQnWC63P7S0xlzuKIABF73DuF3cZ92 X-Received: by 2002:a05:6a20:12d4:b0:ff:d488:2953 with SMTP id v20-20020a056a2012d400b000ffd4882953mr8506682pzg.16.1683548800451; Mon, 08 May 2023 05:26:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683548800; cv=none; d=google.com; s=arc-20160816; b=038TeGz7QO2I8IAg7Ktt/WytSRH78SQZkCuzTohlkpjlTnkFiG7T5q5U70D6ef8Tnm HtYQCqf5Uo35KHuEJR7m9Jsl/Ilhmo+RUvAh+VxxlZ+BR9IZC/ktcVEtXZyLXvLUGV2s 5F8cT7RFbPDSGh02TtUPNLFQGd6Tlq/pbYubJxn1w/mOCo7P8vy02fBKjBkaa49/9rW5 bKOehUYJqxlO/YSarCRxF+5lrqEhtikJDfst7ZDD2Ti2Eh3BLQaLMVxkx9DRCud78HUR WBkxm/jlC6SYKSKAZRQgVbjieiCblZj/B50jMFBbtrcikojZ9LZpWabaCIGo6dJh9uVU 2j9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=yTcS6ERydBi3sd7UUw2QFTJaMwmeqvxl7dgO0DDj6Ys=; b=biE+BCgn1ArFB5w0NyFlHkB84D0kINd/ZOlav4VRcYkdFJ0kzpVH5EwXdRbPwb/35J 6sRsu96piilmpkQC6QYX2UDJiACq66OOoUirV+WELCST4yefydAReeStZWC0n8n5PaKH aornIw3cPFljOmx2nscsNsw/2fTXyKuO16J3yzcrM8n3hLv/52MQQjUu8cTiCqhT4FKy R9TJcNR/nzmnR78X9s6DwaEW1bsljH6Zs2iNb0TDYp/XGL0n6IBbAUvoWEJ/D3jQqUD6 tQFpYOjil+1lRIw6QWyZ/U0H98kELbhKsYb49UHBld6SFCj/etIyFvtJm2597rJ/Z8NN B8cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=fw9w2wVv; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h15-20020a17090aa88f00b00226e01736f8si25192412pjq.109.2023.05.08.05.26.25; Mon, 08 May 2023 05:26:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-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=@ventanamicro.com header.s=google header.b=fw9w2wVv; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236008AbjEHL5w (ORCPT + 99 others); Mon, 8 May 2023 07:57:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236366AbjEHL5S (ORCPT ); Mon, 8 May 2023 07:57:18 -0400 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 539BB4419E for ; Mon, 8 May 2023 04:55:16 -0700 (PDT) Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1aae5c2423dso43547405ad.3 for ; Mon, 08 May 2023 04:55:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1683546915; x=1686138915; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yTcS6ERydBi3sd7UUw2QFTJaMwmeqvxl7dgO0DDj6Ys=; b=fw9w2wVvyg18HQUViAb/q8qFm0YGCFl6OA5t0nEkt/x4efJjZz1AlZazIVHATLSW+w heUG1plkNWqhle47JUQzWHWSG+vGxo82ayY9ANGhfWkzbQO8Dr6YUiheG3svkLfmg+NN 2GZx2gFnSEjoQGMVoLG9jHAqVyTSd707Zvc6pVK2NLdcrbmEHn3Glt7k/emJkDKaKSq2 MIRlCk1P2l9380YHjRqRfnRuqH8OWIWYheVO0szdRaxlAliT5X3EoD3CDOtTxHsFXQ1y F8OptUnVg8xt4KdB2scf8uJ5YrNv+5MozGjfHscY0OiyRNm/5t2/AQGAJfIYOrKzz/J2 rCFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683546915; x=1686138915; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yTcS6ERydBi3sd7UUw2QFTJaMwmeqvxl7dgO0DDj6Ys=; b=e9DZs9PanbD8WbO/FbbV2TOPmrwZwjSiOQPUT9l0az6Qk21t+blfj4ukBg8J5u8Y4x S8GS0pw6pqdjSwHe19gVbCUTlQydCjSBLJOT3mNBfhOJkaEBTlPHSJhNHrthKINAZqw3 uiowTT4oq2gzP+iCCPQYUQXDJTF+Lj8EXIbqKAN9ZuN2oQqG0JSU0BBfmaT/2NqqUcke bDeyhzGIreHk2ryfW9t2oKRtAbcrisSuAiqjwfh7oRVMXJH6LBpKgXK0cLQu/qG1ochm MPp5Y+R6sOKbzHoYiEy+X6+9OyvkkS0CaxcPPBsbmr/pTMfJounxf2DLxqkjs/FeaM6i q4YA== X-Gm-Message-State: AC+VfDwQh61y2HwoDP3Cs0ZXcTWq+QpRzHqMsVOUG73rNnq+XH0gkVgL ozGFQ9IGYNcBbXSZXdAEME12lQ== X-Received: by 2002:a17:902:868f:b0:1a6:b971:faf8 with SMTP id g15-20020a170902868f00b001a6b971faf8mr9907040plo.53.1683546915118; Mon, 08 May 2023 04:55:15 -0700 (PDT) Received: from sunil-laptop.. ([106.51.189.144]) by smtp.gmail.com with ESMTPSA id w9-20020a170902904900b001aaed524541sm7015149plz.227.2023.05.08.04.55.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 May 2023 04:55:14 -0700 (PDT) From: Sunil V L To: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-acpi@vger.kernel.org, linux-crypto@vger.kernel.org, platform-driver-x86@vger.kernel.org, llvm@lists.linux.dev Cc: Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , "Rafael J . Wysocki" , Len Brown , Daniel Lezcano , Thomas Gleixner , Weili Qian , Zhou Wang , Herbert Xu , "David S . Miller" , Marc Zyngier , Maximilian Luz , Hans de Goede , Mark Gross , Nathan Chancellor , Nick Desaulniers , Tom Rix , Sunil V L , "Rafael J . Wysocki" , Andrew Jones , Conor Dooley Subject: [PATCH V5 17/21] clocksource/timer-riscv: Add ACPI support Date: Mon, 8 May 2023 17:22:33 +0530 Message-Id: <20230508115237.216337-18-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230508115237.216337-1-sunilvl@ventanamicro.com> References: <20230508115237.216337-1-sunilvl@ventanamicro.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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-crypto@vger.kernel.org Initialize the timer driver based on RHCT table on ACPI based platforms. Currently, ACPI doesn't support a flag to indicate that the timer interrupt can wake up the cpu irrespective of its power state. It will be added in future update. Signed-off-by: Sunil V L Acked-by: Rafael J. Wysocki Reviewed-by: Andrew Jones Reviewed-by: Conor Dooley --- drivers/clocksource/timer-riscv.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/clocksource/timer-riscv.c b/drivers/clocksource/timer-riscv.c index cecc4662293b..da3071b387eb 100644 --- a/drivers/clocksource/timer-riscv.c +++ b/drivers/clocksource/timer-riscv.c @@ -10,6 +10,7 @@ #define pr_fmt(fmt) "riscv-timer: " fmt +#include #include #include #include @@ -207,3 +208,13 @@ static int __init riscv_timer_init_dt(struct device_node *n) } TIMER_OF_DECLARE(riscv_timer, "riscv", riscv_timer_init_dt); + +#ifdef CONFIG_ACPI +static int __init riscv_timer_acpi_init(struct acpi_table_header *table) +{ + return riscv_timer_init_common(); +} + +TIMER_ACPI_DECLARE(aclint_mtimer, ACPI_SIG_RHCT, riscv_timer_acpi_init); + +#endif -- 2.34.1