From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.kernel.org ([198.145.29.99]:38244 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726261AbeKGHKP (ORCPT ); Wed, 7 Nov 2018 02:10:15 -0500 Date: Tue, 6 Nov 2018 15:42:56 -0600 From: Bjorn Helgaas To: Borislav Petkov Cc: "Woods, Brian" , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , "x86@kernel.org" , Clemens Ladisch , Jean Delvare , Guenter Roeck , Pu Wen , Jia Zhang , Takashi Iwai , Andy Whitcroft , Colin Ian King , Myron Stowe , "linux-kernel@vger.kernel.org" , "linux-hwmon@vger.kernel.org" , "linux-pci@vger.kernel.org" Subject: Re: [PATCH 2/4] x86/amd_nb: add support for newer PCI topologies Message-ID: <20181106214256.GA65443@google.com> References: <20181102181055.130531-1-brian.woods@amd.com> <20181102181055.130531-3-brian.woods@amd.com> <20181102195925.GB160487@google.com> <20181102232948.GC26770@zn.tnic> <20181105214537.GA19420@google.com> <20181105215650.GG26868@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181105215650.GG26868@zn.tnic> Sender: linux-hwmon-owner@vger.kernel.org List-Id: linux-hwmon@vger.kernel.org On Mon, Nov 05, 2018 at 10:56:50PM +0100, Borislav Petkov wrote: > On Mon, Nov 05, 2018 at 03:45:37PM -0600, Bjorn Helgaas wrote: > > amd_nb.c prevents us from achieving that goal. These patches don't > > add new functionality; they merely describe minor topographical > > differences in new hardware. We usually try to do that in a more > > generic way, e.g., via an ACPI method, so the new platform can update > > the ACPI method and use an old, already-qualified, already-shipped > > kernel. > > > > I'm not strenuously objecting to these because this isn't a *huge* > > deal, but I suspect it is a source of friction for distros that don't > > want to update and requalify their software for every new platform. > > Err, how is this any different from adding distro support for a new CPU > family? > > This is basically the same thing. When distros add support for new > hardware, they have to backport patches for upstream. These PCI devices > which are part of the CPU are part of that hardware enablement. > > So there's no way around doing that enablement. I don't think you can do > "old distro, new hardware" stuff without *some* hw enablement. Just depends on how hard you want to work on defining abstract interfaces. This isn't some complicated new device where the programming model changed on the new CPU. This is a thermometer that was already supported. ACPI provides plenty of functionality that could be used to support this generically, e.g., see drivers/acpi/thermal.c, drivers/thermal/int340x_thermal/processor_thermal_device.c, etc. But maybe there's some real value in the nitty-gritty device-specific code in amd_nb.c. If so, I guess you're stuck with updates like this and negotiating with the distros to do backports and new releases. Bjorn