mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 09:20:50 +07:00
tile/perf: Support perf_events on tilegx and tilepro
Add perf support for tile architecture. Signed-off-by: Zhigang Lu <zlu@tilera.com> Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
This commit is contained in:
parent
ba67823163
commit
8d61dd7d3e
@ -3,6 +3,8 @@
|
||||
|
||||
config TILE
|
||||
def_bool y
|
||||
select HAVE_PERF_EVENTS
|
||||
select USE_PMC if PERF_EVENTS
|
||||
select HAVE_DMA_ATTRS
|
||||
select HAVE_DMA_API_DEBUG
|
||||
select HAVE_KVM if !TILEGX
|
||||
|
22
arch/tile/include/asm/perf_event.h
Normal file
22
arch/tile/include/asm/perf_event.h
Normal file
@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Copyright 2014 Tilera Corporation. All Rights Reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation, version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
|
||||
* NON INFRINGEMENT. See the GNU General Public License for
|
||||
* more details.
|
||||
*/
|
||||
|
||||
#ifndef _ASM_TILE_PERF_EVENT_H
|
||||
#define _ASM_TILE_PERF_EVENT_H
|
||||
|
||||
#include <linux/percpu.h>
|
||||
DECLARE_PER_CPU(u64, perf_irqs);
|
||||
|
||||
unsigned long handle_syscall_link_address(void);
|
||||
#endif /* _ASM_TILE_PERF_EVENT_H */
|
@ -25,6 +25,7 @@ obj-$(CONFIG_PCI) += pci_gx.o
|
||||
else
|
||||
obj-$(CONFIG_PCI) += pci.o
|
||||
endif
|
||||
obj-$(CONFIG_PERF_EVENTS) += perf_event.o
|
||||
obj-$(CONFIG_USE_PMC) += pmc.o
|
||||
obj-$(CONFIG_TILE_USB) += usb.o
|
||||
obj-$(CONFIG_TILE_HVGLUE_TRACE) += hvglue_trace.o
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include <hv/drv_pcie_rc_intf.h>
|
||||
#include <arch/spr_def.h>
|
||||
#include <asm/traps.h>
|
||||
#include <linux/perf_event.h>
|
||||
|
||||
/* Bit-flag stored in irq_desc->chip_data to indicate HW-cleared irqs. */
|
||||
#define IS_HW_CLEARED 1
|
||||
@ -260,6 +261,23 @@ void ack_bad_irq(unsigned int irq)
|
||||
pr_err("unexpected IRQ trap at vector %02x\n", irq);
|
||||
}
|
||||
|
||||
/*
|
||||
* /proc/interrupts printing:
|
||||
*/
|
||||
int arch_show_interrupts(struct seq_file *p, int prec)
|
||||
{
|
||||
#ifdef CONFIG_PERF_EVENTS
|
||||
int i;
|
||||
|
||||
seq_printf(p, "%*s: ", prec, "PMI");
|
||||
|
||||
for_each_online_cpu(i)
|
||||
seq_printf(p, "%10llu ", per_cpu(perf_irqs, i));
|
||||
seq_puts(p, " perf_events\n");
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Generic, controller-independent functions:
|
||||
*/
|
||||
|
1005
arch/tile/kernel/perf_event.c
Normal file
1005
arch/tile/kernel/perf_event.c
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user