Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp561105rdb; Thu, 18 Jan 2024 11:24:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IHFOa5SCnKk0UYQAHl5iyrWG8EU9Tt5hGRPcIx6PHJzpa7qWqAHo2/u99XfP34twHTIYxa6 X-Received: by 2002:a17:902:bc86:b0:1d4:3eb1:1e3 with SMTP id bb6-20020a170902bc8600b001d43eb101e3mr1357475plb.13.1705605873644; Thu, 18 Jan 2024 11:24:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705605873; cv=pass; d=google.com; s=arc-20160816; b=W8m3co7WMZvO4ZSoGuc80xdTnPWgw8w3O5p/zvCYtctpdKTH5dTLYLnxyOZwShJ+hG f6N6jVI8DY0MnQ/kQSG/JmaP+Rf795YibGT+axPSoCJ1MU1ESmOgwYcLY97jT7WQ2EXR rh09+Zms6hQCJ4KuoGQaWJbrlVWVndL3xoqbNmeMSHGhqJT1s2a2s1/hhpmUH+FQm83D 9Efc52Fkns3l7YnqA7Kdlf/qHcqpQQ/vhZbrJWu8jzw39VAJpsLpE7ixyHkR06pq/soE gsLKT+jlTtF3FBVEtQj5p1sMsn73FV2h4OeXSyHe8y94qcm9H4hEj2KrL+v2hL8dZqCy XoPA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=xnIpWqev2LgwO8Ow1GD+t6pP0ociRd6H33tAplbXrUk=; fh=s9pLbVodJXefBBbeS8R3C1MyZ1Q1bEMVefbhlECeRbM=; b=fkJJoGg8+ON88ATOMnieVZR65Y//Gd5fDo0acsIyEXWmPGAv4oKiPGI3JE6i31DzP6 btVEgyUmW5aWMCjsiBV6ltrQuC3tzJVQtw6oTAWtimtE9xagkkl1EakYkBCteQroA6ZP Kb2a3cqfeXkkRbyGxye2EDKXFZ26UVuvVClcIlXzX+4KrUQx+mkHNgwmAmd+4KzEHqT1 23rvYkzPvVURt5QuIdnDoBMqZE/dunZlsjNQlr0cBAEsA3L3t+HKyaQwTYcHCODfAzVE nT8x6oPiTTONu0NSWV6DCFp8aeIJrEPif51QuZ6DqV9uWk5cPnuBIMdoWxIZABudhklo G9mA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=v1RVh8N+; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-30510-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30510-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id n7-20020a170902d2c700b001d70571142bsi1678358plc.523.2024.01.18.11.24.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 11:24:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-30510-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=v1RVh8N+; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-30510-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30510-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 4BC42287DDA for ; Thu, 18 Jan 2024 19:24:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AC1922E844; Thu, 18 Jan 2024 19:24:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="v1RVh8N+"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="l5HNtTYm" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6EBCB2E641; Thu, 18 Jan 2024 19:24:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705605842; cv=none; b=GxMF9VuJ9laSe/SNcHHDeAyfSH7YZZCWGz3RY9y20qhrfOg6frVW0dvOgbXPV+lS56f+2M19x0SDz49Vg9khLkyp32wAPquR3sgc2VJw80fWesWjNAKkztLivEbN4RiQRd05McOAdfTkxkHPZiOY0Yt63V0A6XcBkBKhcGLwF/o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705605842; c=relaxed/simple; bh=IQQtFURNvODIyaNvAuKT7JPni73b4s8l2TDrTyHUN08=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=dVR7Wk/ltRwXy4xgbaP9QOm5wITx7nhkHEVjWafY3lEH0mi61u8JysmrtU3eVJ/gsqq+aKb4FoO6LWRbmEv9Q7QT18DAt73Npk+6BJXOkGTe5CwUtj2alhv7lpzJ1gNNwTO7i0pHti2USYEp7I2Lk+Gobo9gKZaXc6AzEKMuF3I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=v1RVh8N+; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=l5HNtTYm; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Thu, 18 Jan 2024 19:23:58 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1705605839; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xnIpWqev2LgwO8Ow1GD+t6pP0ociRd6H33tAplbXrUk=; b=v1RVh8N+ZiGCtAGsO4yxoeGJyWHEJrIywhLLcvlCxA2lOLNifcCrTdGi9nb786xgvQeR7E RDJ71FNz36JevSDJjmAh/U0oQTE1HbVwa09E3qZ3uxb37Q39v01v34gMjMYCNh1u64iSHe TIkBV4nEvCdg6QgKaOVvm9Zvg5rXjY3g2cmuQnWr265E/qhUF9A5e5YVV0fajuHhtocYvM VjyITKQ1BtN4X4Zwmxk+DpaR9qM/b5mC15fg6+4OFCygZieVWVIPfWY+fpNBKChLSeBUKu 6Y5x/YZjuDiEpIR+CIg7II2m9nKUghQYQmwqgU0O8NTLzS6Z5Fre3+4ySDP+BA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1705605839; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xnIpWqev2LgwO8Ow1GD+t6pP0ociRd6H33tAplbXrUk=; b=l5HNtTYmSueFVepDrpX9uvpC77E617HsQX/jfGvHznnv6H85SkJ/84hFAvS6UGV1Ms6GiW jHwX1+dBF7iFQ9Aw== From: "tip-bot2 for Joshua Yeong" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/core] clocksource/timer-riscv: Add riscv_clock_shutdown callback Cc: Joshua Yeong , Anup Patel , Daniel Lezcano , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20231116105312.4800-1-joshua.yeong@starfivetech.com> References: <20231116105312.4800-1-joshua.yeong@starfivetech.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <170560583897.398.3924693885126380500.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit The following commit has been merged into the timers/core branch of tip: Commit-ID: 6a902b118e7f30dbf0e6248f7b0f97e12c0939c3 Gitweb: https://git.kernel.org/tip/6a902b118e7f30dbf0e6248f7b0f97e12c0939c3 Author: Joshua Yeong AuthorDate: Thu, 16 Nov 2023 18:53:12 +08:00 Committer: Daniel Lezcano CommitterDate: Wed, 27 Dec 2023 15:37:11 +01:00 clocksource/timer-riscv: Add riscv_clock_shutdown callback Add clocksource detach/shutdown callback to disable RISC-V timer interrupt when switching out riscv timer as clock source Signed-off-by: Joshua Yeong Reviewed-by: Anup Patel Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20231116105312.4800-1-joshua.yeong@starfivetech.com --- drivers/clocksource/timer-riscv.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/clocksource/timer-riscv.c b/drivers/clocksource/timer-riscv.c index 57857c0..e66dcbd 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) = { .name = "riscv_timer_clockevent", .features = CLOCK_EVT_FEAT_ONESHOT, .rating = 100, .set_next_event = riscv_clock_next_event, + .set_state_shutdown = riscv_clock_shutdown, }; /*