Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp594209pxj; Thu, 27 May 2021 07:25:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0TIE6x1ZbXis2A17dEqJHcs044UsmFmmpPEgABf/ZuV3DJV10P4bZsQn7+8+Jqpti4A01 X-Received: by 2002:a17:906:c1d2:: with SMTP id bw18mr4066416ejb.123.1622125534458; Thu, 27 May 2021 07:25:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622125534; cv=none; d=google.com; s=arc-20160816; b=AEdW5MAM7KG3w2zE2oIM9TS3eJ/TFnfzr8Qn+fVHrTkL0NH40IkGyrkpaUfGKAGjSb hz8Qnw5GLG67Xg+k2QMKA3kEjTrnaO91zPULtSM0JGh1AcOduA9Kw8FejuStzsIvSdy2 +oce+2zDDU4trlmKcCiH5bbWj/jOQnLThxERmTepfgW5dtxDTcGD7p51YU5Ck6j098Ye VLgaCnhmRfMC9lWCsVmiX2vP7MoTLsTp3StGr81SZaFbJOeiKBDFVMGyoI46o2yCliHI C4y2cINh1hBONctbI8XRKvKk1aYrku684c7A6W2poNx9UGbLbPQRhkKr45ea4LzvtmkQ wD4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-signature; bh=d8wgJqVTv1rNHg3817XcovAxG94o5OyrEsk/WWRy4VI=; b=A9nQw+CGEpXVHmAjBRWzHdiVOzoox0MK5tInk2E6ww39d7ZLomXhEFnsOfYYUSar9r iTPsI//hwsIcFgT/cIbIYzIzCyekNaoZKAksOdwNZNi/5eQ7SOxHH9cesClil0miQGCf R6Rdf472vs7mquAMlh67DcUANtFgne2xM9BlCTL9q6+VuY4q8OT5MCuaU6w2Lk46kCz2 RTyltVp5qJa+55qk9zj0vhZxdN0AmSUFaSzZWCP/TIh/1AEes3wj8FWDfS+P1GOHT7S0 MCLAvVYHQPGZZ71JizFbJx0+mLgT1txwNpxFXUuL4cM961B8Ry9Odkzz59jsyTvK83a8 j3DA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=mj7GeSn2; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=vKXMzGOb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l18si2073254edw.337.2021.05.27.07.25.09; Thu, 27 May 2021 07:25:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=mj7GeSn2; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=vKXMzGOb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236521AbhE0OZR (ORCPT + 99 others); Thu, 27 May 2021 10:25:17 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:56418 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236501AbhE0OZP (ORCPT ); Thu, 27 May 2021 10:25:15 -0400 Received: from imap.suse.de (imap-alt.suse-dmz.suse.de [192.168.254.47]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id B1D9D2190B; Thu, 27 May 2021 14:23:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1622125421; h=from:from:reply-to: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=d8wgJqVTv1rNHg3817XcovAxG94o5OyrEsk/WWRy4VI=; b=mj7GeSn2/5JwetOeT+5iWIbnhCw6Dpe47cPvPGa4282dm21UZ42LWGWrtFBYFmMl6AqQIa BKdmyoEupm+kyLsBUGZp+n3y5hTiuOx7CoN8kUYZF8ZmXlO0nk0fRwj7Hry2iQJYWx1qMU DdPnT3+CGJmdjNsfuG0rAwysnqUvFiY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1622125421; h=from:from:reply-to: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=d8wgJqVTv1rNHg3817XcovAxG94o5OyrEsk/WWRy4VI=; b=vKXMzGOb1AiaPsu8a3S5oc8imG1I+MV1+cxAnW8JEhs2b9gBma2bkXKsZ31bYEelOFSKKa X5Aisd/jAxZ2HZAQ== Received: from director2.suse.de (director2.suse-dmz.suse.de [192.168.254.72]) by imap.suse.de (Postfix) with ESMTPSA id 77A4111A98; Thu, 27 May 2021 14:23:41 +0000 (UTC) Date: Thu, 27 May 2021 16:23:36 +0200 From: Mian Yousaf Kaukab To: a.zummo@towertech.it, alexandre.belloni@bootlin.com Cc: linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org, biwen.li@nxp.com Subject: Re: [PATCH v4] rtc: pcf2127: handle timestamp interrupts Message-ID: <20210527142306.GA103044@suse.de> References: <20210525101107.9605-1-ykaukab@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210525101107.9605-1-ykaukab@suse.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 25, 2021 at 12:11:07PM +0200, Mian Yousaf Kaukab wrote: > commit 03623b4b041c ("rtc: pcf2127: add tamper detection support") > added support for timestamp interrupts. However they are not being > handled in the irq handler. If a timestamp interrupt occurs it > results in kernel disabling the interrupt and displaying the call > trace: > > [ 121.145580] irq 78: nobody cared (try booting with the "irqpoll" option) > ... > [ 121.238087] [<00000000c4d69393>] irq_default_primary_handler threaded [<000000000a90d25b>] pcf2127_rtc_irq [rtc_pcf2127] > [ 121.248971] Disabling IRQ #78 > > Handle timestamp interrupts in pcf2127_rtc_irq(). Save time stamp > before clearing TSF1 and TSF2 flags so that it can't be overwritten. > Set a flag to mark if the timestamp is valid and only report to sysfs > if the flag is set. To mimic the hardware behavior, don’t save > another timestamp until the first one has been read by the userspace. Alexandre, I hope this patch addresses all your concerns. Please let me know if thats not the case. BR, Yousaf