From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1947299AbcBSIlU (ORCPT ); Fri, 19 Feb 2016 03:41:20 -0500 Received: from www.linutronix.de ([62.245.132.108]:53419 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1947185AbcBSIlT (ORCPT ); Fri, 19 Feb 2016 03:41:19 -0500 Date: Fri, 19 Feb 2016 09:39:49 +0100 (CET) From: Thomas Gleixner To: Peter Zijlstra cc: Andi Kleen , Stephane Eranian , LKML , Ingo Molnar , Borislav Petkov , Harish Chegondi , Kan Liang , Andi Kleen Subject: Re: [patch 07/11] x86/perf/uncore: Track packages not per cpu data In-Reply-To: Message-ID: References: <20160217132903.767990400@linutronix.de> <20160217133932.279611021@linutronix.de> <878u2j9gjr.fsf@tassilo.jf.intel.com> <20160217221640.GD5083@two.firstfloor.org> <20160218081320.GQ6357@twins.programming.kicks-ass.net> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 18 Feb 2016, Thomas Gleixner wrote: > So there is a limitation to BIOS creativity and all we need is to maintain a > logical package id. Just for the record. This driver would fall apart today if the socket ids would be > 7. The uncore extra PCI devs assume a fixed mapping between the physid in their config space and the physid of the socket. If the pci config space id would be > 8 then the storage space is exceeded. #define UNCORE_SOCKET_MAX 8 struct pci_dev *uncore_extra_pci_dev[UNCORE_SOCKET_MAX][UNCORE_EXTRA_PCI_DEV_MAX]; Of course there is no range check for this either. uncore_pci_probe() sticks it blindly into the array.... Thanks, tglx