Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp3174241rdb; Thu, 16 Nov 2023 02:12:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IGmXVQ6JaV2aFL4YLlsaqD7NBpBrL8hw/Nu3+u70za+7qirWsibZCV6KzMwVw1xoj81gIMr X-Received: by 2002:a05:6a21:a590:b0:187:9f36:c30a with SMTP id gd16-20020a056a21a59000b001879f36c30amr2795379pzc.39.1700129571330; Thu, 16 Nov 2023 02:12:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700129571; cv=none; d=google.com; s=arc-20160816; b=KPRgU6Bgye7aUy+5SexP7do1ZnOntM71MQYflWWmhZSpUBfmXxQjfd4AzxX2D+Z5WY iT4N0bA17fke664CPR7NJEyyOWKd/x16/vsOafgH/plGvDU/foizbdnIg1suU0I5nwRB pDppkfocn7RR0nNtz7ZWzau0ipy43r7gaTT3xhtXFFqwwwgVBN6TvDBhL+KXcSjT7fmj 4jmH2a6ciMbIjgHO5kUNrGfKyZ1uCokQNg4msigpS1tdO3lNcwiHaDVeOs/xQXrIH/MX BXmPQdVC5bu+zaHrbh1JfU2BhcaI7LZlwYGR5i3nElMEfVqmT5Y/2gdssmqi8qaTTYMM oYwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=fhaFfpVqJgGoKXCozqLAMmf/sLVC3yUm3pzsgBTdMG4=; fh=P2m5FQ8u+D9hLWS8Cc6FRX3j/HkVUu0K48cerNB63h8=; b=V7rF4awmTFaKO5fQnER1KCmDw3HeD0PCPVPZPnYD47LexpytH/5bgEnbbpM4wbkInA /ll6j9+VuzGMik2gmeMHg4jMPHZadHzXFunlx8d43AV6LnkJRK6EmIhpZ4eWSW3nbkLD kcoLbxpskAuwKGBRrFvD5kcxrhLp4bcu9XslxUr0IGWWKfCAz2FbfT5FV9VR/3ZaCe63 iHOEDGZkeh1YwKXepz2DIcJ6Cwt2lz+/BKWmpV1D6/u8zmwVcWtfH6/+4365UWWBQDC5 AsdrqgCoNEe7t3HhD1zW6YmVY1jAW93YslDdWbjpGvOXqslydu3/b4a+RI7cnEF/yZxk StaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=YKz4seFq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id v2-20020a1709029a0200b001cc16aa4983si11564946plp.194.2023.11.16.02.12.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 02:12:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=YKz4seFq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 32D1B8025476; Thu, 16 Nov 2023 02:12:42 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230348AbjKPKMc (ORCPT + 99 others); Thu, 16 Nov 2023 05:12:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230235AbjKPKMb (ORCPT ); Thu, 16 Nov 2023 05:12:31 -0500 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B0A319E for ; Thu, 16 Nov 2023 02:12:28 -0800 (PST) Received: by mail-pj1-x1032.google.com with SMTP id 98e67ed59e1d1-2800c221af2so474044a91.0 for ; Thu, 16 Nov 2023 02:12:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1700129548; x=1700734348; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=fhaFfpVqJgGoKXCozqLAMmf/sLVC3yUm3pzsgBTdMG4=; b=YKz4seFq2A99m3DtPEcz6audqpi6dM+BwkTTNFoLdnezZcj5gUbvwSJFmwprtFWX9k CgMVKfcfbvQAth6B919KuIZ3eKJJETJyZYAZepF0wDjISvufUiwxXx+d/tRNijJXPfK0 Oo5guKeuuyADEaKg+5cc0SkEq9C2sQ+UmY4kWJVfWVCWZ2pT1ZVkXFR5DP0gqT5S8jLy B38AVcVpI1XFCcsjjCM9EszCCauH6Zv/2wjMrwYEolpZARhO4clytdE2cbtLPssaOxsB ZY4xHtzz2d8UpaRABJ4n9j8CuWNjyyLsIqx6d4fZPlMAfIu1k7OgteJ5JtaVzURwbWsZ v5gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700129548; x=1700734348; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fhaFfpVqJgGoKXCozqLAMmf/sLVC3yUm3pzsgBTdMG4=; b=q0NfwjQkjGZSfpASce5YFJRKNROdnt9TyUUIxSnU/eRP7K5+0sd9yKU8uyemtjkzi0 E5hUgcFuHs2fqC6aAv0nYtlNSKdwHQmGGVEfnSUM1hXviocqiHUXYhLxkZrXHY2Abr+2 360+s4P2hBBPzT32f5/dKcLzScZmBkn6Dt/hhLLh/W7SJ1j4F69gANHiGUN0DXdexN0v OYB+JSd/ykSQHX2Zxw0FpghNvEgZl4WhOdG0+v7HzkVVh82yqHkDmZBgpzHoxvAsrGZU TrOV5SFX4tg098b83kZFpI8FlP0H+bwtWWNDhdWC8cGeo5VtV1YbJ5vObCmjfzkCs1qj E9VQ== X-Gm-Message-State: AOJu0Yxpz4YdDdzkPdIkeD52rzqGqanLTJNZndue3Suqi7vgf1yuRHcd 7+zlfggGa+3mGoluA2/Q0r5MD+vjm6qM74Bu2GYwYA== X-Received: by 2002:a17:90b:3b83:b0:280:cc73:4c79 with SMTP id pc3-20020a17090b3b8300b00280cc734c79mr12707187pjb.7.1700129547996; Thu, 16 Nov 2023 02:12:27 -0800 (PST) MIME-Version: 1.0 References: <20231116040749.8430-1-joshua.yeong@starfivetech.com> In-Reply-To: <20231116040749.8430-1-joshua.yeong@starfivetech.com> From: Anup Patel Date: Thu, 16 Nov 2023 15:42:15 +0530 Message-ID: Subject: Re: [PATCH v2 1/1] clocksource/timer-risc: Add riscv_clock_shutdown callback To: Joshua Yeong Cc: daniel.lezcano@linaro.org, tglx@linutronix.de, paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, leyfoon.tan@starfivetech.com, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, Anup Patel Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 16 Nov 2023 02:12:42 -0800 (PST) On Thu, Nov 16, 2023 at 9:38=E2=80=AFAM Joshua Yeong wrote: > > Add clocksource detach/shutdown callback to disable RISC-V timer interrup= t when > switching out riscv timer as clock source > > Signed-off-by: Joshua Yeong Typo in patch subject: s/timer-risc/timer-riscv/ Otherwise, it looks good to me. Reviewed-by: Anup Patel Regards, Anup > --- > drivers/clocksource/timer-riscv.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/clocksource/timer-riscv.c b/drivers/clocksource/time= r-riscv.c > index 57857c0dfba9..e66dcbd66566 100644 > --- a/drivers/clocksource/timer-riscv.c > +++ b/drivers/clocksource/timer-riscv.c > @@ -61,12 +61,19 @@ static int riscv_clock_next_event(unsigned long delta= , > return 0; > } > > +static int riscv_clock_shutdown(struct clock_event_device *evt) > +{ > + riscv_clock_event_stop(); > + return 0; > +} > + > static unsigned int riscv_clock_event_irq; > static DEFINE_PER_CPU(struct clock_event_device, riscv_clock_event) =3D = { > .name =3D "riscv_timer_clockevent", > .features =3D CLOCK_EVT_FEAT_ONESHOT, > .rating =3D 100, > .set_next_event =3D riscv_clock_next_event, > + .set_state_shutdown =3D riscv_clock_shutdown, > }; > > /* > -- > 2.25.1 >