checkpatch complained about missing newlines after declarations which are added with this patch.
Cc: Peter Zijlstra <a.p.zijls...@chello.nl> Cc: Paul Mackerras <pau...@samba.org> Cc: Ingo Molnar <mi...@redhat.com> Cc: Arnaldo Carvalho de Melo <a...@kernel.org> Cc: Thomas Gleixner <t...@linutronix.de> Cc: "H. Peter Anvin" <h...@zytor.com> Cc: x...@kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Julian Brost <linux-ker...@0x4a42.net> Signed-off-by: Fabian Hofmann <fabian.hofm...@fau.de> --- arch/x86/kernel/cpu/perf_event_intel_uncore.c | 4 ++++ arch/x86/kernel/cpu/perf_event_intel_uncore_nhmex.c | 1 + arch/x86/kernel/cpu/perf_event_intel_uncore_snbep.c | 9 +++++++++ 3 files changed, 14 insertions(+) diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c index 161655f..32f67c7 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c +++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c @@ -529,6 +529,7 @@ static void uncore_pmu_event_del(struct perf_event *event, int flags) void uncore_pmu_event_read(struct perf_event *event) { struct intel_uncore_box *box = uncore_event_to_box(event); + uncore_perf_event_update(box, event); } @@ -714,6 +715,7 @@ static void __init uncore_type_exit(struct intel_uncore_type *type) static void __init uncore_types_exit(struct intel_uncore_type **types) { int i; + for (i = 0; types[i]; i++) uncore_type_exit(types[i]); } @@ -805,6 +807,7 @@ static int uncore_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id if (UNCORE_PCI_DEV_TYPE(id->driver_data) == UNCORE_EXTRA_PCI_DEV) { int idx = UNCORE_PCI_DEV_IDX(id->driver_data); + uncore_extra_pci_dev[phys_id][idx] = pdev; pci_set_drvdata(pdev, NULL); return 0; @@ -1002,6 +1005,7 @@ static int uncore_cpu_starting(int cpu) if (exist && exist->phys_id == phys_id) { atomic_inc(&exist->refcnt); *per_cpu_ptr(pmu->box, cpu) = exist; + if (box) { list_add(&box->list, &boxes_to_free); diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore_nhmex.c b/arch/x86/kernel/cpu/perf_event_intel_uncore_nhmex.c index 2749965..d51e06c 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_uncore_nhmex.c +++ b/arch/x86/kernel/cpu/perf_event_intel_uncore_nhmex.c @@ -1005,6 +1005,7 @@ again: * the 0~7 bits and the 8~15 bits respectively. */ u64 mask = 0xff << ((idx - 2) * 8); + if (!__BITS_VALUE(atomic_read(&er->ref), idx - 2, 8) || !((er->config ^ config1) & mask)) { atomic_add(1 << ((idx - 2) * 8), &er->ref); diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore_snbep.c b/arch/x86/kernel/cpu/perf_event_intel_uncore_snbep.c index da905c2..e001cc3 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_uncore_snbep.c +++ b/arch/x86/kernel/cpu/perf_event_intel_uncore_snbep.c @@ -915,6 +915,7 @@ static void snbep_qpi_enable_event(struct intel_uncore_box *box, struct perf_eve if (reg1->idx != EXTRA_REG_NONE) { int idx = box->pmu->pmu_idx + SNBEP_PCI_QPI_PORT0_FILTER; struct pci_dev *filter_pdev = uncore_extra_pci_dev[box->phys_id][idx]; + if (filter_pdev) { pci_write_config_dword(filter_pdev, reg1->reg, (u32)reg1->config); @@ -1136,6 +1137,7 @@ static int snbep_pci2phy_map_init(int devid) int snbep_uncore_pci_init(void) { int ret = snbep_pci2phy_map_init(0x3ce0); + if (ret) return ret; uncore_pci_uncores = snbep_pci_uncores; @@ -1148,6 +1150,7 @@ int snbep_uncore_pci_init(void) static void ivbep_uncore_msr_init_box(struct intel_uncore_box *box) { unsigned msr = uncore_msr_box_ctl(box); + if (msr) wrmsrl(msr, IVBEP_PMON_BOX_CTL_INT); } @@ -1400,6 +1403,7 @@ static void ivbep_cbox_enable_event(struct intel_uncore_box *box, struct perf_ev if (reg1->idx != EXTRA_REG_NONE) { u64 filter = uncore_shared_reg_config(box, 0); + wrmsrl(reg1->reg, filter & 0xffffffff); wrmsrl(reg1->reg + 6, filter >> 32); } @@ -1700,6 +1704,7 @@ static struct pci_driver ivbep_uncore_pci_driver = { int ivbep_uncore_pci_init(void) { int ret = snbep_pci2phy_map_init(0x0e1e); + if (ret) return ret; uncore_pci_uncores = ivbep_pci_uncores; @@ -1728,6 +1733,7 @@ static struct attribute_group hswep_uncore_ubox_format_group = { static int hswep_ubox_hw_config(struct intel_uncore_box *box, struct perf_event *event) { struct hw_perf_event_extra *reg1 = &event->hw.extra_reg; + reg1->reg = HSWEP_U_MSR_PMON_FILTER; reg1->config = event->attr.config1 & HSWEP_U_MSR_PMON_BOX_FILTER_MASK; reg1->idx = 0; @@ -1835,6 +1841,7 @@ static struct extra_reg hswep_uncore_cbox_extra_regs[] = { static u64 hswep_cbox_filter_mask(int fields) { u64 mask = 0; + if (fields & 0x1) mask |= HSWEP_CB0_MSR_PMON_BOX_FILTER_TID; if (fields & 0x2) @@ -1887,6 +1894,7 @@ static void hswep_cbox_enable_event(struct intel_uncore_box *box, if (reg1->idx != EXTRA_REG_NONE) { u64 filter = uncore_shared_reg_config(box, 0); + wrmsrl(reg1->reg, filter & 0xffffffff); wrmsrl(reg1->reg + 1, filter >> 32); } @@ -2290,6 +2298,7 @@ static struct pci_driver hswep_uncore_pci_driver = { int hswep_uncore_pci_init(void) { int ret = snbep_pci2phy_map_init(0x2f1e); + if (ret) return ret; uncore_pci_uncores = hswep_pci_uncores; -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/