mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-09-04 20:19:47 +08:00 
			
		
		
		
	 c7cc504bc3
			
		
	
	
		c7cc504bc3
		
	
	
	
	
		
			
			Commit e50c541 (ARM: perf: add guest vs host discrimination) broken the
link as perf_instruction_pointer and perf_misc_flags are not defined
when CONFIG_HW_PERF_EVENTS is not selected.
As it make little sense to try and profile a guest without any HW event,
just fallback to the original code when this config option is not selected.
Reported-by: Russell King <linux@arm.linux.org.uk>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
		
	
			
		
			
				
	
	
		
			32 lines
		
	
	
		
			840 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			840 B
		
	
	
	
		
			C
		
	
	
	
	
	
| /*
 | |
|  *  linux/arch/arm/include/asm/perf_event.h
 | |
|  *
 | |
|  *  Copyright (C) 2009 picoChip Designs Ltd, Jamie Iles
 | |
|  *
 | |
|  * This program is free software; you can redistribute it and/or modify
 | |
|  * it under the terms of the GNU General Public License version 2 as
 | |
|  * published by the Free Software Foundation.
 | |
|  *
 | |
|  */
 | |
| 
 | |
| #ifndef __ARM_PERF_EVENT_H__
 | |
| #define __ARM_PERF_EVENT_H__
 | |
| 
 | |
| /*
 | |
|  * The ARMv7 CPU PMU supports up to 32 event counters.
 | |
|  */
 | |
| #define ARMPMU_MAX_HWEVENTS		32
 | |
| 
 | |
| #define HW_OP_UNSUPPORTED		0xFFFF
 | |
| #define C(_x)				PERF_COUNT_HW_CACHE_##_x
 | |
| #define CACHE_OP_UNSUPPORTED		0xFFFF
 | |
| 
 | |
| #ifdef CONFIG_HW_PERF_EVENTS
 | |
| struct pt_regs;
 | |
| extern unsigned long perf_instruction_pointer(struct pt_regs *regs);
 | |
| extern unsigned long perf_misc_flags(struct pt_regs *regs);
 | |
| #define perf_misc_flags(regs)	perf_misc_flags(regs)
 | |
| #endif
 | |
| 
 | |
| #endif /* __ARM_PERF_EVENT_H__ */
 |