Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1918507pxv; Fri, 2 Jul 2021 16:10:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwhYpH5LfY+pODXRxMbsX0ltstSIbt4O5RAD9NY7T+ixTG920YkYDM6vsDfgJ0GkiSh6FBQ X-Received: by 2002:a05:6e02:ef4:: with SMTP id j20mr1526245ilk.141.1625267432267; Fri, 02 Jul 2021 16:10:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625267432; cv=none; d=google.com; s=arc-20160816; b=Qoapn3rEhIM/HB6PudyDAIfiLD9BdIxbM3hh+m9ey4f8iiIuk1N9G+G8A5ipVdId3r ty+vdEseyBP9BEJvM4swwgqlqWKX4J0uemUJQsPwc/o4UI9L5sOQmW5uHpNU1jAFjaK+ TUzy8zvoUujw3FTP01zr0qsK1RYnl5A1A0PR1oyejFHoulWaJ/+OyzgmW7ssOxWIcybA cTzB8N4qxehd81EUPbw/2eiYH/WNPnkUvxoef56iIXxNDNv8R0uxw105R+Y2TWfOdu3n SsuNemHO2dpTb2bjNPT5alAl37JD/OQVYB0ZXF3L/oB2sFWY9cUkse7PVfOM95l++xuM WOtA== 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:references:message-id :in-reply-to:subject:cc:to:from:date; bh=99RLuDzcaVRgYCs3zGIFkhhEY7aAQj+2LlPVkA/VZCg=; b=PtP+Z4+tslcmQ1e3jlO4ENSyh0ruz+KYjbWjPlX+fAnadLtkwWoiDNNRgK8VkbNlto Sx73eueelSlbUWum2H2M9YF755evuBR/eZjn8rM603EMs9gsrxePWZehEyU+fbBXK0mL DPK5IlAfJkpdSQ7hk94go/vbCJVTnSvYPX1hAUtfPqhuPUoXcOaOiNB1u4G3qn1yld8a xq2idZoGBweQQkpXKgXhHyamdmbPjfT7MzOarZ2GVYjjHpTWhhTUHVzRGULGYKfQZchS HjfezeAH8oYudwy+kuABgzrFDyCkU8OxAYZKhXtxPNmM6cO7CJP4o6xGmK7Y2+OxFaoh tu7A== 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 y7si4958008jap.7.2021.07.02.16.10.19; Fri, 02 Jul 2021 16:10:32 -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 S230020AbhGBXMW (ORCPT + 99 others); Fri, 2 Jul 2021 19:12:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229648AbhGBXMW (ORCPT ); Fri, 2 Jul 2021 19:12:22 -0400 Received: from angie.orcam.me.uk (angie.orcam.me.uk [IPv6:2001:4190:8020::34]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 87E0DC061762; Fri, 2 Jul 2021 16:09:49 -0700 (PDT) Received: by angie.orcam.me.uk (Postfix, from userid 500) id D35AA92009C; Sat, 3 Jul 2021 01:09:45 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id C43C092009B; Sat, 3 Jul 2021 01:09:45 +0200 (CEST) Date: Sat, 3 Jul 2021 01:09:45 +0200 (CEST) From: "Maciej W. Rozycki" To: Nikolai Zhubr cc: Bjorn Helgaas , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Arnd Bergmann , x86@kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC 0/2] x86/PCI: SiS PIRQ router updates In-Reply-To: <60DF4C75.7020609@gmail.com> Message-ID: References: <60DF4C75.7020609@gmail.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Nikolai, > > Nikolai, can you please give it a hit with the extra debug patch as > > requested in my other message? > > With > linux-x86-pirq-router-sis85c503.diff applied > linux-x86-pirq-router-sis85c497.diff applied > and DEBUG 1 in arch/x86/include/asm/pci_x86.h > here is new log: > > https://pastebin.com/n3udQgcq > > My feeling is that something went a bit wrong because: > > 8139too 0000:00:0d.0: can't route interrupt More important is actually the previous line: PCI: Attempting to find IRQ router for [0000:0000] meaning that the PIRQ structure defined by the BIOS has not specified the vendor:device ID pair for the router [1039:0496] which we match against. I don't know where exactly the definition our `struct irq_routing_table' corresponds to comes from (I'll appreciate pointers!); it has not been given in the PCI BIOS 2.1 specification, only individual IRQ routing entries have. It may well be that [0000:0000] is a legitimate blanket entry requesting the OS to figure out itself which device is the hardware router. Anyway it is something we can handle in a reasonably staightforward manner, so I'll spend some time to implement such wildcard matching. Most importantly your system does have the router structure, so barring this minor snag it can be handled properly without horrible hacks. We're very close now. > Note: I still used 4.14 kernel for this test but your patches applied cleanly > with no fuzz so I suppose it should be ok. Indeed, that does not matter. This code is very old, dating back to 1990s. Maciej