Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1836788lql; Wed, 13 Mar 2024 09:24:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWauExu8zUO9Q2IABJ7BmAypaHl/lwZ7WRNmZZqsjVyx6hxRAsKxzKFBXzdVzmn8JVeUuCXuyNhYyeUH5IbItPmBX9GIrGsVDKp87kG4g== X-Google-Smtp-Source: AGHT+IERmgNnTOOPectS7Z6sliGyNftdv/kl0pjx5pod5w3caoRFWViLaOgL5q2UOMV0Dqc8pLgQ X-Received: by 2002:a17:906:c50:b0:a45:4ba5:2917 with SMTP id t16-20020a1709060c5000b00a454ba52917mr7996771ejf.75.1710347081024; Wed, 13 Mar 2024 09:24:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710347081; cv=pass; d=google.com; s=arc-20160816; b=GnhGaNhih0do69DvlMdvdE0wnxiUcEu8c329Dq/OFoOBEkKR66yostma6Eu+lgdDRb 7XWSzSgOxc2xS95RKez3ac1aKvccpUzhzkSGKPdupa0Flf/+Fwy05UUqfgseN710uU2n M6VYWkC4GO3h7gwO4GRTHqsEiDffwLMEtsN/iNgeQOwUfK3UvtKP5rsyvOlHIvo+4hHv AhD0gEoxpK4ZSkGLnq1IDloRshBni/vGQgQHRlDbcEdf3FXSWyYlnUXx/B4mc9mY9jhb nXYBKV6bYCRf9QeLX7tIHnOM8MEdDEr8fHmNGHdlklwySCyKU//TufLsUPQceshQce4h enxQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=RJq8BpzhyEjphD0Nc5F4Wy8avuOLO7oHmhsXEqoq+4E=; fh=XJqEK+gexruhDn2GLHZAm3RkoT5++Zid5NN4Wgpz2S0=; b=wXpcWIpWeGxz7gLegAQd8aOOOIIGLWWE6QsJHRjV7ZkknFxo1Bg83nhQqY0iYaXNg8 0Y1qYZkpDz9D3TezRDnv4fiBVD66bpkGyex8Y3xbxlpwwV/r2mbs2j0PpsbNDUaT7Snz qTinCkcv129OHml/FWrIuq/5TGkHjfkLMNXWc+wIf8tmyYU+CzEl9IH4aMlzyUPwksUm aF+9URb3qu3idPrbkeZjIWCX0iemqwe/navZDaKcTnqzpPBk4D3feB4R7lMzAn9HdzWC mKAWMAExo4VCHwNotIuq9L1yuRt37ZJ+9PLgLKaA89BqdUgzHYVAwydu/LFDYRHoLtPQ e5qQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=NSI9SwQL; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-101724-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101724-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id o23-20020a1709064f9700b00a45fc5bd1a3si4308604eju.569.2024.03.13.09.24.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 09:24:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-101724-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=NSI9SwQL; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-101724-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101724-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id BAA711F22C3E for ; Wed, 13 Mar 2024 16:24:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4E29F482D4; Wed, 13 Mar 2024 16:24:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="NSI9SwQL" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (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 F0CA6481D0 for ; Wed, 13 Mar 2024 16:24:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710347073; cv=none; b=NhnI8lhyQ/2Fd2YcXYBlyrxcXv//0nm313i7dCYnwWx7d2xKpVt0tviB00N6JJYscV94Uu2Nisvo0mv+fSvpCGDbQNdq+PEfxop4ZvuaZw/52BD0u2KDfo1ki2O3FaeAGxK6Qy6XhlcJW2Mf4qgIBYpA1wgAASarpIsAwEigr2c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710347073; c=relaxed/simple; bh=PBnvN89TcXRBQ8oX99GovCTrRkyYDZspIJ40zlbYcq0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GpxLA3LXKCcqnLmUGmjvYKuXhlKILwuWoTeEAzrbd4hlxqWJE1uKZdfy34VNetzlqrFuth5GNqu0YLnb2Hv6IB44VSNusOlJlDZ/FvzC5+iZZPihGiYpB238KvrLAlDy0bOVX+s66dcsw2XL4KLyVU7TUKYAOexxPoddcBxAvSs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=NSI9SwQL; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1710347070; bh=PBnvN89TcXRBQ8oX99GovCTrRkyYDZspIJ40zlbYcq0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NSI9SwQLPyfUvrLVdDBXkZAsMalEMg8xb0jAkCqVjAc0HFz94zKHFjHSpUs5RPgq9 bAaR85p3hK5HeRCMs/aAH06zfZ43c55OzixUtqZr3BgydhnLx2rnHeecasUjxIScYS 4RqeXAEt7O7Xl2601NOeT1ofddUd49F8pIDMa8QXdmbuUcJBUoLZjizmXzMoyZWBu2 B4HbbGnnPveo5AlufJl71ek48IHNQ6HwykJhiyCEH23Yej2XF3Mh00FRKdBjQ3q8b3 HgOaioOG4yDPPmHVevQz3BP4qwP44MBpuLjnAif+Jb5mntdpIIOpc0pQIpjC6VQjAP /ha3GCZWG51Xw== Received: from localhost (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sebastianfricke) by madrid.collaboradmins.com (Postfix) with ESMTPSA id AE7A83780B5F; Wed, 13 Mar 2024 16:24:29 +0000 (UTC) Date: Wed, 13 Mar 2024 17:24:27 +0100 From: Sebastian Fricke To: Marc Zyngier Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de, bartosz.golaszewski@linaro.org Subject: Re: RFC: fake IRQchip Message-ID: <20240313162427.lgvfvo7u6phdsbb7@basti-XPS-13-9310> References: <20240308143755.jey6kr3ftlzxt6lg@basti-XPS-13-9310> <874jdfrabn.wl-maz@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline In-Reply-To: <874jdfrabn.wl-maz@kernel.org> Hey Marc, On 09.03.2024 10:03, Marc Zyngier wrote: >Hi Sebastian, > >On Fri, 08 Mar 2024 14:37:55 +0000, >Sebastian Fricke wrote: >> >> Hey, >> >> I am one of the maintainers of the media subsystem and we are currently >> reviewing a patch [1], where the author has developed a polling >> mechanism for a driver, while the hardware (Wave5 Codec) actually always >> expects an interrupt line to be present and the only reason why this >> isn't uphold is because the SoC has a defect, causing the interrupt line >> to be disabled. >> As I am a bit reluctant to litter a driver with workarounds for defective >> hardware, I suggested to the author, that he could implement fake >> IRQchip, which does polling in the background. This could first be >> implemented in the driver directory and then later possibly upstreamed >> to /drivers/irqchip. >> So, far I've got a few approving comments for that idea, but I would >> really like to know what the irqchip folks think about this. >> >> Now my question is basically, what do you think about such a solution? Would >> you accept such a fake irqchip driver, that can be used by >> hardware without an interrupt line to fake one? Do you think there is a >> better solution or do you think that my suggestion has hidden traps? > >The problem with this approach is that it cannot be a generic irqchip, >because it needs to know about the endpoint device to find out when >the interrupt has been cleared. This is specially true for level >signalling. If the device was only doing edge signalling, I could see >a vague path forward, but that's not the case here (as evidenced by >the DT bindings). > >My view on this is that given that the workaround has to know quite a >few things about the generating device, it is better kept close to the >driver code. Alright thanks for your feedback. So in that case implementing polling is definitely the better option as implementing a unique fake IRQchip per driver seems not very efficient. > >Thanks, > > M. Greetings, Sebastian > >-- >Without deviation from the norm, progress is not possible.