Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp150381pxb; Thu, 31 Mar 2022 01:49:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0dR71eaXpofvlI9MQXH52kqZPb150cJCZL5nhbZEvb7t5VYmYxw0DYdLEUoL891pffU0w X-Received: by 2002:a17:907:2ce3:b0:6df:d4a8:9039 with SMTP id hz3-20020a1709072ce300b006dfd4a89039mr3921124ejc.697.1648716583395; Thu, 31 Mar 2022 01:49:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648716583; cv=none; d=google.com; s=arc-20160816; b=vPSpGOdLXEoIkswctfk/A//9WXCEUEZOZ6veUEYXIPk6wnEdOD19b1+IUPVfX7fnlN 6Kmh3P/1KjEeIZuYthEQtDD35e7a9MxCS4vvQzEKK6YIy3j562NW6/fmwosNj8TaDSl2 ew7b1U25bP04sN/s8RVFBV37n+s8j0OtZDRA23uSBkOqT5fZ7DVV5+r+16iHVgmN+R/s zhM1wNAMZpD2s8StMYZbcO1BtRT3NNj/VsrjJNrTqnlb4cvUy+jOymb4hIZXZll/YqT8 typQ4aHgsk2eBic3UKuoGuTNJu5RlrTMhw6cT9kgCJoFPIUUW+xwSidsbzmK6MFaHu24 5xag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:subject:cc:to :from:date; bh=Sh+Gp+a+CvYxjvZON3axhyOQzLCvb0sof4TyYuWu83U=; b=FGVEXw+hwIXLcT1HSoZjjEsrC8jaImNbSHdIwFgWF7B6Jl9dciy8c7LX8miZEffv3A IwnqSXSaWdHb2qbY0GMvKceOhlqU4UVMGShpcrsKmpuqGZm7/KbrSl9WaTe8fWeu8cqO 4SxdRnyKxBIMn0aNJK94vafCO6Cum0t3tds85wnPHLEPmnERITA/XddkJ6roOypI6LMR sYxS7gdKRgWryfwOvS3xxzGjkvKxT5M74/M8DXNkP++rXVUoRAPuoSXj9QpkVklAxW0p /QeZsDDsPDrReMJ9VrsxMTmXl8hC8RuvlQWyiMchgei8m2lqHL8Qob+o185yZRW9WTUR R3og== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ch27-20020a0564021bdb00b00419dd616f19si11506684edb.378.2022.03.31.01.49.17; Thu, 31 Mar 2022 01:49:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231688AbiCaHL5 (ORCPT + 99 others); Thu, 31 Mar 2022 03:11:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230243AbiCaHLz (ORCPT ); Thu, 31 Mar 2022 03:11:55 -0400 Received: from angie.orcam.me.uk (angie.orcam.me.uk [78.133.224.34]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2AA451E3FF; Thu, 31 Mar 2022 00:10:07 -0700 (PDT) Received: by angie.orcam.me.uk (Postfix, from userid 500) id 35F8992009C; Thu, 31 Mar 2022 09:10:06 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id 339DB92009B; Thu, 31 Mar 2022 08:10:06 +0100 (BST) Date: Thu, 31 Mar 2022 08:10:06 +0100 (BST) From: "Maciej W. Rozycki" To: Bjorn Helgaas , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" cc: x86@kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RESEND][PATCH v2 0/4] x86/PCI: Odd generic PIRQ router improvements Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,HDRS_LCASE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, This series was dropped from x86/irq due to a bug in a follow-up patch, so resending verbatim after re-verification. While working on the SiS85C497 PIRQ router I have noticed an odd phenomenon with my venerable Tyan Tomcat IV S1564D board, where the PCI INTD# line of the USB host controller included as function 3 of the PIIX3 southbridge cannot be routed in the `noapic' mode. As it turns out the reason for this is the BIOS has two individual entries in its PIRQ table for two of its three functions, and the wrong one is chosen for routing said line. Strictly speaking this violates the PCI BIOS specification, but it can be easily worked around while preserving the semantics for compliant systems. Therefore I have come up with this patch series, which addresses this problem with 3/4, adds function reporting to the debug PIRQ table dump with 2/4 and also prints a usable physical memory address of the PIRQ table in a debug message with 1/4. Then 4/4 follows, addressing the inability to use a PIRQ table to route interrupts for devices placed behind PCI-to-PCI bridges on option cards, and especially where the BIOS has failed to enumerate the whole bus tree in the first place. See individual change descriptions for further details. Please apply. Maciej