Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3139047pxk; Mon, 5 Oct 2020 01:59:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy34PZOji+xKmDV7lRN3ecXyNZ86vo+N8HJYrJvGKbadgSLKGriFeXMA6q4D+bc4Io2yHZn X-Received: by 2002:a17:906:d97b:: with SMTP id rp27mr15211666ejb.18.1601888369457; Mon, 05 Oct 2020 01:59:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601888369; cv=none; d=google.com; s=arc-20160816; b=IgK/EjHl4RoyO0LZPD+CzQwg5hkAuTooWRe2kUWHUd/7OK3wIqbijhLdVbJSSx21Xq rSUeNeoRUOuFYs4sWbhj5mljJp9wP4HtqecpS2V3ZFHyug1zO2ex4jpA7Md2O/aQyYzx SSerXO8TJf/qmgNKGgyY2URy1rwkj7eSfBczdv6pp/THJmlXURcuhG1Wqc100/dT0BZZ axDWvYAzgM8HCQdI84628gerIWIdee5yI5qE0hdTS/zMLMcY9NayK3EqYROLONoKEyPS GUgDafLrKGrKRW+VW0ALHHZHQGgkdA+25ytXoH68zv3SuZ69FxTQFe3a4iYbA9s26PZ8 5fIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=tIhP0FuIGl8w6hVtstWYo1miB0t+IY3lSNHO1NwBAUg=; b=sIR4CUDd7ypF4ZoowO5U8jMsIy5w4rTPl2WGxWcz9eQuTx8aIA6BGdlAuZrVsreLWY 4V19MlBzBz1iXVGAdpeah/qw9VykDIZ3UCxN77NFvfvt4u5JkmlQaLUAzIh5+seMr+2P t7whX//0CuBceV13tm4TfxsBDvC5/Wx88y1IbM28ejJ5tvogTufxieY7wqFjmk5z1Xdv CtgAKEnutPJPbpASW+NeuGg2eeJB5CDqmOQTz473mhU5tMCLW26fUBKKUjfxKRFNBSir R+Y8yeEo9JBrOB/wBpdq5r4WJvnBIWjGf2Azv1ohQtp5c5Xn9gCloyK9HqeaQGlaovLp C+lA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=1bVjaYXP; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=Nn+A19Q+; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l11si367141ejx.564.2020.10.05.01.59.06; Mon, 05 Oct 2020 01:59:29 -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=@linutronix.de header.s=2020 header.b=1bVjaYXP; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=Nn+A19Q+; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725984AbgJEIz5 (ORCPT + 99 others); Mon, 5 Oct 2020 04:55:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725885AbgJEIz4 (ORCPT ); Mon, 5 Oct 2020 04:55:56 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1320C0613CE; Mon, 5 Oct 2020 01:55:56 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1601888154; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=tIhP0FuIGl8w6hVtstWYo1miB0t+IY3lSNHO1NwBAUg=; b=1bVjaYXPTOWxPjjCZXbGOhko1pl72m1MMxVgnEKe/Z72kbb9a8fAxnZ7B+EGasuIXh3BW6 0Uxci4nPv8Drste3gRfkwbq4oOe3hhNIiUcCtKXEeLfyTrKIEWUYX2ZI6ZTqYzu6JHz7bj wk0Qt1WFy96m4OPF87gOw0oa/DYY3cnKi21RacudiD4S/POjFaBFaZXXmZ69QQdYb+FniR gGNjxcGOZ8fZZcm7ficHllUgV2lccAwnU7FCb5drk4Rs9XgTPEngyLbOzQbZd+OJos+ekc VQPZ4jDBfT2JwbnPVjI55zcZORLi2YTWEtueqYvD6+lJGRYH6Tze8AItfGMdNA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1601888154; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=tIhP0FuIGl8w6hVtstWYo1miB0t+IY3lSNHO1NwBAUg=; b=Nn+A19Q+Lozpu8w7R4t0zbn+T9kc7/1vuZQhI5Wg6N3F0nR0r8evtwNibaf602A4ecMxS9 m5hTCF8F9bbSbtAg== To: Ulf Hansson Cc: Jerome Brunet , Kevin Hilman , "open list\:ARM\/Amlogic Meson..." , Linux Kernel Mailing List , "linux-mmc\@vger.kernel.org" , Brad Harper , Sebastian Andrzej Siewior Subject: Re: [PATCH] mmc: meson-gx: remove IRQF_ONESHOT In-Reply-To: References: <20201002164915.938217-1-jbrunet@baylibre.com> Date: Mon, 05 Oct 2020 10:55:54 +0200 Message-ID: <87wo052grp.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 05 2020 at 10:22, Ulf Hansson wrote: > On Fri, 2 Oct 2020 at 18:49, Jerome Brunet wrote: >> >> IRQF_ONESHOT was added to this driver to make sure the irq was not enabled >> again until the thread part of the irq had finished doing its job. >> >> Doing so upsets RT because, under RT, the hardirq part of the irq handler >> is not migrated to a thread if the irq is claimed with IRQF_ONESHOT. >> In this case, it has been reported to eventually trigger a deadlock with >> the led subsystem. >> >> Preventing RT from doing this migration was certainly not the intent, the >> description of IRQF_ONESHOT does not really reflect this constraint: >> >> > IRQF_ONESHOT - Interrupt is not reenabled after the hardirq handler finished. >> > Used by threaded interrupts which need to keep the >> > irq line disabled until the threaded handler has been run. >> >> This is exactly what this driver was trying to acheive so I'm still a bit >> confused whether this is a driver or an RT issue. >> >> Anyway, this can be solved driver side by manually disabling the IRQs >> instead of the relying on the IRQF_ONESHOT. IRQF_ONESHOT may then be removed >> while still making sure the irq won't trigger until the threaded part of >> the handler is done. > > Thomas, may I have your opinion on this one. > > I have no problem to apply $subject patch, but as Jerome also > highlights above - this kind of makes me wonder if this is an RT > issue, that perhaps deserves to be solved in a generic way. > > What do you think? Let me stare at the core code. Something smells fishy.