Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751997AbbDTTfA (ORCPT ); Mon, 20 Apr 2015 15:35:00 -0400 Received: from mail-qg0-f53.google.com ([209.85.192.53]:34765 "EHLO mail-qg0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751223AbbDTTe5 (ORCPT ); Mon, 20 Apr 2015 15:34:57 -0400 MIME-Version: 1.0 In-Reply-To: References: <1429555323-11127-1-git-send-email-sonnyrao@chromium.org> From: Bjorn Helgaas Date: Mon, 20 Apr 2015 14:34:36 -0500 Message-ID: Subject: Re: [PATCH] perf/x86/intel/uncore: add support for Haswell ULT IMC uncore To: Stephane Eranian Cc: Sonny Rao , "linux-kernel@vger.kernel.org" , Peter Zijlstra , Paul Mackerras , Ingo Molnar , Arnaldo Carvalho de Melo , Thomas Gleixner , "H. Peter Anvin" , "x86@kernel.org" , "linux-pci@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3125 Lines: 68 On Mon, Apr 20, 2015 at 1:58 PM, Stephane Eranian wrote: > On Mon, Apr 20, 2015 at 11:56 AM, Bjorn Helgaas wrote: >> >> On Mon, Apr 20, 2015 at 1:42 PM, Sonny Rao wrote: >> > This uncore is the same as the Haswell desktop part but uses a >> > different PCI ID. >> > >> > Signed-off-by: Sonny Rao >> > --- >> > arch/x86/kernel/cpu/perf_event_intel_uncore_snb.c | 5 +++++ >> > include/linux/pci_ids.h | 1 + >> > 2 files changed, 6 insertions(+) >> > >> > diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore_snb.c b/arch/x86/kernel/cpu/perf_event_intel_uncore_snb.c >> > index 3001015..0bda6fc 100644 >> > --- a/arch/x86/kernel/cpu/perf_event_intel_uncore_snb.c >> > +++ b/arch/x86/kernel/cpu/perf_event_intel_uncore_snb.c >> > @@ -472,6 +472,10 @@ static const struct pci_device_id hsw_uncore_pci_ids[] = { >> > PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HSW_IMC), >> > .driver_data = UNCORE_PCI_DEV_DATA(SNB_PCI_UNCORE_IMC, 0), >> > }, >> > + { /* IMC */ >> > + PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_HSW_U_IMC), >> > + .driver_data = UNCORE_PCI_DEV_DATA(SNB_PCI_UNCORE_IMC, 0), >> > + }, >> > { /* end: all zeroes */ }, >> > }; >> > >> > @@ -502,6 +506,7 @@ static const struct imc_uncore_pci_dev desktop_imc_pci_ids[] = { >> > IMC_DEV(IVB_IMC, &ivb_uncore_pci_driver), /* 3rd Gen Core processor */ >> > IMC_DEV(IVB_E3_IMC, &ivb_uncore_pci_driver), /* Xeon E3-1200 v2/3rd Gen Core processor */ >> > IMC_DEV(HSW_IMC, &hsw_uncore_pci_driver), /* 4th Gen Core Processor */ >> > + IMC_DEV(HSW_U_IMC, &hsw_uncore_pci_driver), /* 4th Gen Core ULT Mobile Processor */ >> > { /* end marker */ } >> > }; >> > >> > diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h >> > index 38cff8f..e5ae042 100644 >> > --- a/include/linux/pci_ids.h >> > +++ b/include/linux/pci_ids.h >> > @@ -2545,6 +2545,7 @@ >> > #define PCI_DEVICE_ID_INTEL_IVB_IMC 0x0154 >> > #define PCI_DEVICE_ID_INTEL_IVB_E3_IMC 0x0150 >> > #define PCI_DEVICE_ID_INTEL_HSW_IMC 0x0c00 >> > +#define PCI_DEVICE_ID_INTEL_HSW_U_IMC 0x0a04 >> >> Please either use the 0x0a04 constant directly in >> perf_event_intel_uncore_snb.c, or explain why the #define should be >> here, e.g., maybe it will be used in multiple places. See the comment >> at the top of pci_ids.h. >> > But then, the same reasoning would apply to the other 3 IMC defines, > wouldn't it? Yes. But if we made a mistake in the past, that doesn't mean we should repeat it today. >> > #define PCI_DEVICE_ID_INTEL_PXHD_0 0x0320 >> > #define PCI_DEVICE_ID_INTEL_PXHD_1 0x0321 >> > #define PCI_DEVICE_ID_INTEL_PXH_0 0x0329 >> > -- >> > 2.1.2 >> > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/