Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp10618797pxu; Wed, 30 Dec 2020 07:13:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJwpiJexmjBdhbcDDyOVvTdZek5BFhnj0HaF7VgPHCibIL4gPM9BxkYwZTRwNw/HxO/bWVue X-Received: by 2002:aa7:c1c6:: with SMTP id d6mr51018326edp.275.1609341184637; Wed, 30 Dec 2020 07:13:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609341184; cv=none; d=google.com; s=arc-20160816; b=ydeS+20zE2dW/nb5Q/YFqhzOxvoPTuA6mgHyY59Wf8jsN6Cz7/RoaN9arTsk+gy59J scf2mfOHcenV4dN88iJfB6fqrQM/r9rvR9xOv1i5pXkmSCRFOUjNYXz4yfBEJ6VnkM89 r0yysumJ7tu/rf/KBmsOCl8Pi8IIKtPa1+exrNcJzPich6C+kskFHw4lrJhSmW4jctrU n4jeJyHOQCIHdqSjK7hgEkK4hxkEznGHnioofsZ18VkgFot87l0rQADYOju51YbqKGcS icIDFSc7gi1owaIMU2ZsrqLiyAwvLhM6g4F99is64GIK5vyH4IqeBCZM1y6YQE9dbx9j Pnsw== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=St0NdTV01/J9iqigeBwIWN/CDV02cRkzrk2oD2rIe+E=; b=ROb3DNpzVmRmHWiQRIYoAM9tmKdeoaLOynGjqSL/l5hgKww5QR+rVsI8VI2MHtzXWr lJIpqk8L29IOpmhShulLLynkJumG4Uw3wAynW/vCNdqWNgjKTdVoqhTSATad87UAWgwv bjhvUWguG5eOR62q6AlhMtCsh9624lYzKmtyhuX+nuzmYpxSF8I6Za5dCfXf6b6pAUs3 R2wPQjtUOB3UjoRlFTM4E95rNILB9qWljHEl61FTDIqjae6wNZRe0EHAATMXEx2fCxnI 2lXN7e/f/L4M5/yab2yE9zQmvfRPSL/NeJcswSRZPSI51+FDSMXqK9iW5OomoA28p8e/ pgaQ== ARC-Authentication-Results: i=1; mx.google.com; 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 v19si23752021edr.303.2020.12.30.07.12.41; Wed, 30 Dec 2020 07:13:04 -0800 (PST) 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; 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 S1726420AbgL3PMN (ORCPT + 99 others); Wed, 30 Dec 2020 10:12:13 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:44548 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726247AbgL3PMM (ORCPT ); Wed, 30 Dec 2020 10:12:12 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kud8A-00F2sB-Jo; Wed, 30 Dec 2020 16:11:18 +0100 Date: Wed, 30 Dec 2020 16:11:18 +0100 From: Andrew Lunn To: Marc Zyngier Cc: DENG Qingfang , "David S. Miller" , Florian Fainelli , Heiner Kallweit , Jakub Kicinski , Landen Chao , Matthias Brugger , Philipp Zabel , Russell King , Sean Wang , Thomas Gleixner , Vivien Didelot , Vladimir Oltean , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Weijie Gao , Chuanhong Guo , Linus Walleij , =?iso-8859-1?Q?Ren=E9?= van Dorst Subject: Re: Registering IRQ for MT7530 internal PHYs Message-ID: References: <20201230042208.8997-1-dqfext@gmail.com> <441a77e8c30927ce5bc24708e1ceed79@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <441a77e8c30927ce5bc24708e1ceed79@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > +static void mt7530_irq_bus_lock(struct irq_data *d) > > +{ > > + struct mt7530_priv *priv = irq_data_get_irq_chip_data(d); > > + > > + mutex_lock(&priv->reg_mutex); > > Are you always guaranteed to be in a thread context? I guess that > is the case, given that you request a threaded interrupt, but > it would be worth documenting. Hi Marc These Ethernet switches are often connected by MDIO, SPI or I2C busses to the SoC. So in order to access switch registers over these busses, sleeping is required. So yes, threaded interrupts are required. Andrew