Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2818660pxb; Tue, 13 Apr 2021 10:53:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3PwY8R0C6VxXY663mvS2kBB99461sTgnsD/fXk52LX/kUe0nHh6SY5YHvwGqdiID7Fmlz X-Received: by 2002:a05:6402:27d4:: with SMTP id c20mr36651441ede.271.1618336384822; Tue, 13 Apr 2021 10:53:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618336384; cv=none; d=google.com; s=arc-20160816; b=GREHpWEsJ+sa+DpDnFtNls7btmZlFyElZvANSMVm5vHYnip3sOBxVMIx7ShxGP6Gxw vlLPTLk94GQz7qdmeyJNOVqLkAFMP0lrO56zcUQiBd96AKsQcqrlRZy/Z05d0yv0ma7k SrzTP9TCVX7gD6LB4hQ+SigLGMJK5miPGEu0jYo7nPfS+J4UFaGtZQwYIXLnAD+vPoHQ F3FXyHh2OOU9iWqy9yrAbcF/pJTHL1bIRz4Be+kOXva1eumK7dXqGVUkYc0R2ZGfHd3M 8xC6TTye4DgETp1JfayxI1KmwtcovhdmhVyNVEBlFFeQ2Klo5H0+o9yFi8ehox8Oqrdz qmjA== 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=q+rIYcR+QjBUGTWuYDNjE9QBf2cnma/979dqdAG9TX0=; b=gFd5WpaJEPXIBfrhnLiMiwwPDXpmy7tQfdaGeBSmiklX2i1C9t4+cV+a+wN3qEpi6Z Mn33gLuWuoRaBxYX11O9oXD6KByzq1lc7FkrZw0wX0MP0HBj+v7HGrFvDp3aK+Fo/1kX /FQCvyTg1ac/wLfYK2ACaJQp0cmwIKYo7FNWUQC/o79+H+ibFQiQ592GF1E6qwZbm+rT yGjtxlF/PtqlEM3Rf051E3b1rO3CVO4PQaT/81QAmcqgaHhcFyAuQi5osGIM7omlpi9F FjIc/Vyrkm7yCWFAij9SnflFiY9j5S/BO9uPiUD03A5fk9ygZy0geHvlRaftkAVPnw3H FqDA== 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 kq9si5408111ejb.12.2021.04.13.10.52.41; Tue, 13 Apr 2021 10:53:04 -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; 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 S1345859AbhDMMxd (ORCPT + 99 others); Tue, 13 Apr 2021 08:53:33 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:48200 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240321AbhDMMxb (ORCPT ); Tue, 13 Apr 2021 08:53:31 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1lWIXL-00GTYv-RL; Tue, 13 Apr 2021 14:52:59 +0200 Date: Tue, 13 Apr 2021 14:52:59 +0200 From: Andrew Lunn To: Marc Zyngier Cc: DENG Qingfang , "David S. Miller" , Florian Fainelli , Heiner Kallweit , Jakub Kicinski , Landen Chao , Matthias Brugger , Russell King , Sean Wang , Vivien Didelot , Vladimir Oltean , Rob Herring , Linus Walleij , Greg Kroah-Hartman , Sergio Paracuellos , linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-staging@lists.linux.dev, devicetree@vger.kernel.org, netdev@vger.kernel.org, Weijie Gao , Chuanhong Guo , =?iso-8859-1?Q?Ren=E9?= van Dorst , Frank Wunderlich , Thomas Gleixner , Greg Ungerer Subject: Re: [RFC v4 net-next 2/4] net: dsa: mt7530: add interrupt support Message-ID: References: <20210412034237.2473017-1-dqfext@gmail.com> <20210412034237.2473017-3-dqfext@gmail.com> <87fszvoqvb.wl-maz@kernel.org> <20210412152210.929733-1-dqfext@gmail.com> <8735vuobfo.wl-maz@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8735vuobfo.wl-maz@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > I guess this is depends whether the most usual case is to have all > these interrupts being actively in use or not. Most interrupts only > use a limited portion of their interrupt space at any given time. > Allocating all interrupts and creating mappings upfront is a waste of > memory. > > If the use case here is that all these interrupts will be wired and > used in most cases, then upfront allocation is probably not a problem. Hi Marc The interrupts are generally used. Since this is an Ethernet switch, generally the port is administratively up, even if there is no cable plugged in. Once/if a cable is plugged in and there is a link peer, the PHY will interrupt to indicate this. The only real case i can think of when the interrupts are not used is when the switch has more ports than connected to the front panel. This can happen in industrial settings, but not SOHO. Those ports which don't go anywhere are never configured up and so the interrupt is never used. Andrew