mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-30 23:54:04 +08:00
perf/x86/uncore/hsw-ep: Handle systems with only two SBOXes
There was another report of a boot failure with a #GP fault in the uncore SBOX initialization. The earlier work around was not enough for this system. The boot was failing while trying to initialize the third SBOX. This patch detects parts with only two SBOXes and limits the number of SBOX units to two there. Stable material, as it affects boot problems on 3.18. Tested-by: Andreas Oehler <andreas@oehler-net.de> Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: <stable@vger.kernel.org> Cc: Arnaldo Carvalho de Melo <acme@kernel.org> Cc: Stephane Eranian <eranian@google.com> Cc: Yan, Zheng <zheng.z.yan@intel.com> Link: http://lkml.kernel.org/r/1420583675-9163-1-git-send-email-andi@firstfloor.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
parent
86c269fea3
commit
5306c31c57
@ -17,7 +17,7 @@
|
|||||||
#define UNCORE_PCI_DEV_TYPE(data) ((data >> 8) & 0xff)
|
#define UNCORE_PCI_DEV_TYPE(data) ((data >> 8) & 0xff)
|
||||||
#define UNCORE_PCI_DEV_IDX(data) (data & 0xff)
|
#define UNCORE_PCI_DEV_IDX(data) (data & 0xff)
|
||||||
#define UNCORE_EXTRA_PCI_DEV 0xff
|
#define UNCORE_EXTRA_PCI_DEV 0xff
|
||||||
#define UNCORE_EXTRA_PCI_DEV_MAX 2
|
#define UNCORE_EXTRA_PCI_DEV_MAX 3
|
||||||
|
|
||||||
/* support up to 8 sockets */
|
/* support up to 8 sockets */
|
||||||
#define UNCORE_SOCKET_MAX 8
|
#define UNCORE_SOCKET_MAX 8
|
||||||
|
@ -891,6 +891,7 @@ void snbep_uncore_cpu_init(void)
|
|||||||
enum {
|
enum {
|
||||||
SNBEP_PCI_QPI_PORT0_FILTER,
|
SNBEP_PCI_QPI_PORT0_FILTER,
|
||||||
SNBEP_PCI_QPI_PORT1_FILTER,
|
SNBEP_PCI_QPI_PORT1_FILTER,
|
||||||
|
HSWEP_PCI_PCU_3,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int snbep_qpi_hw_config(struct intel_uncore_box *box, struct perf_event *event)
|
static int snbep_qpi_hw_config(struct intel_uncore_box *box, struct perf_event *event)
|
||||||
@ -2026,6 +2027,17 @@ void hswep_uncore_cpu_init(void)
|
|||||||
{
|
{
|
||||||
if (hswep_uncore_cbox.num_boxes > boot_cpu_data.x86_max_cores)
|
if (hswep_uncore_cbox.num_boxes > boot_cpu_data.x86_max_cores)
|
||||||
hswep_uncore_cbox.num_boxes = boot_cpu_data.x86_max_cores;
|
hswep_uncore_cbox.num_boxes = boot_cpu_data.x86_max_cores;
|
||||||
|
|
||||||
|
/* Detect 6-8 core systems with only two SBOXes */
|
||||||
|
if (uncore_extra_pci_dev[0][HSWEP_PCI_PCU_3]) {
|
||||||
|
u32 capid4;
|
||||||
|
|
||||||
|
pci_read_config_dword(uncore_extra_pci_dev[0][HSWEP_PCI_PCU_3],
|
||||||
|
0x94, &capid4);
|
||||||
|
if (((capid4 >> 6) & 0x3) == 0)
|
||||||
|
hswep_uncore_sbox.num_boxes = 2;
|
||||||
|
}
|
||||||
|
|
||||||
uncore_msr_uncores = hswep_msr_uncores;
|
uncore_msr_uncores = hswep_msr_uncores;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2287,6 +2299,11 @@ static DEFINE_PCI_DEVICE_TABLE(hswep_uncore_pci_ids) = {
|
|||||||
.driver_data = UNCORE_PCI_DEV_DATA(UNCORE_EXTRA_PCI_DEV,
|
.driver_data = UNCORE_PCI_DEV_DATA(UNCORE_EXTRA_PCI_DEV,
|
||||||
SNBEP_PCI_QPI_PORT1_FILTER),
|
SNBEP_PCI_QPI_PORT1_FILTER),
|
||||||
},
|
},
|
||||||
|
{ /* PCU.3 (for Capability registers) */
|
||||||
|
PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x2fc0),
|
||||||
|
.driver_data = UNCORE_PCI_DEV_DATA(UNCORE_EXTRA_PCI_DEV,
|
||||||
|
HSWEP_PCI_PCU_3),
|
||||||
|
},
|
||||||
{ /* end: all zeroes */ }
|
{ /* end: all zeroes */ }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user