From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5E643C433E0 for ; Fri, 19 Feb 2021 23:06:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 325E364EB3 for ; Fri, 19 Feb 2021 23:06:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229743AbhBSXGT (ORCPT ); Fri, 19 Feb 2021 18:06:19 -0500 Received: from cynthia.allandria.com ([50.242.82.17]:49687 "EHLO cynthia.allandria.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229515AbhBSXGR (ORCPT ); Fri, 19 Feb 2021 18:06:17 -0500 X-Greylist: delayed 2073 seconds by postgrey-1.27 at vger.kernel.org; Fri, 19 Feb 2021 18:06:17 EST Received: from flar by cynthia.allandria.com with local (Exim 4.84_2) (envelope-from ) id 1lDEIC-0000OT-RK; Fri, 19 Feb 2021 14:30:32 -0800 Date: Fri, 19 Feb 2021 14:30:32 -0800 From: Brad Boyer To: Geert Uytterhoeven Cc: Michael Schmitz , Arnd Bergmann , Finn Thain , "Song Bao Hua (Barry Song)" , "tglx@linutronix.de" , "gregkh@linuxfoundation.org" , "arnd@arndb.de" , "funaho@jurai.org" , "philb@gnu.org" , "corbet@lwn.net" , "mingo@redhat.com" , "linux-m68k@lists.linux-m68k.org" , "linux-kernel@vger.kernel.org" Subject: Re: [RFC] IRQ handlers run with some high-priority interrupts(not NMI) enabled on some platform Message-ID: <20210219223032.GA1343@allandria.com> References: <0b766dba0b004ced94131e158cd8e67d@hisilicon.com> <5148eb2aaceb42d78087bc6d8ce15183@hisilicon.com> <5fcea94e-6fc9-c340-d7d2-4ae8b69890b8@telegraphics.com.au> <0c0ea8eca77c45ea89f2d4432580211c@hisilicon.com> <28d4b91d-1774-a8a-df97-7ac9b365c2@telegraphics.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 19, 2021 at 09:10:57AM +0100, Geert Uytterhoeven wrote: > Hi Michael, > > On Thu, Feb 18, 2021 at 11:11 PM Michael Schmitz wrote: > > On 19/02/21 12:19 am, Arnd Bergmann wrote: > > > drivers/net/ethernet/8390/apne.c > > > drivers/net/ethernet/8390/ax88796.c > > > drivers/net/ethernet/8390/hydra.c > > > drivers/net/ethernet/8390/mac8390.c > > > drivers/net/ethernet/8390/ne.c > > > drivers/net/ethernet/8390/zorro8390.c > > [...] > > > Most of these are normal short-lived interrupts that only transfer > > > a few bytes or schedule deferred processing of some sort. > > > Most of the scsi and network drivers process the data in > > > a softirq, so those are generally fine here, but I do see that 8390 > > > (ne2000) ethernet and the drivers/ide drivers do transfer their > > > data in hardirq context. > > > > > > Arnd > > > > 8390 ethernet drivers are widely used on m68k platforms (Amiga and > > Atari). At least on Amiga, the corresponding interrupt is a hardirq so > > I'd advise caution. That said, the 8390 drivers might benefit from some > > refactoring (the way these drivers are compiled does prevent e.g. the > > APNE driver from being used with two different variants of PCMCIA > > interfaces. I had begun some work on making IO primitives runtime > > selected two years ago but that ended up looking too ugly ...). > > > > Can't recall what IPL the 8390 interrupts operate at - Geert? > > #define IRQ_AMIGA_PORTS IRQ_AUTO_2 > > Zorro expansion boards can also use > > #define IRQ_AMIGA_EXTER IRQ_AUTO_6 > > and some boards may have a jumper to select the latter, but all Amiga > Linux drivers use IRQ_AMIGA_PORTS. The mac8390 driver will show up wherever NuBus interrupts are routed, which varies by hardware. It's frequently IRQ_AUTO_2 (due to being routed through the second VIA chip on most models), but it can be in other places on systems that don't use a second VIA chip. On the IIfx, NuBus interrupts get routed through OSS to IRQ_AUTO_3. I don't see any cases that use other interrupt levels, but some of the logic is a little harder to follow. It's not an 8390, but it looks like macmace actually uses two levels. The regular interrupt should show up at IRQ_AUTO_3 and the DMA interrupts at IRQ_AUTO_4. Most Macs only use 4 for serial, but this is an exception. Brad Boyer flar@allandria.com