commit 46b4dfdc1dd4976d892fa47b5e8a2551fe6278fa Author: Stephane Eranian Date: Thu Nov 6 21:40:54 2008 +0100 perfmon(ia64): rename CONFIG_PERFMON to CONFIG_PERFMON_V20 Avoid name collision with generic CONFIG_PERFMON which currently only works on x86. Signed-off-by: Stephane Eranian diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index 27eec71..30a85c5 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig @@ -504,7 +504,7 @@ config COMPAT_FOR_U64_ALIGNMENT config IA64_MCA_RECOVERY tristate "MCA recovery from errors other than TLB." -config PERFMON +config PERFMON_V20 bool "Performance monitor support" help Selects whether support for the IA-64 performance monitor hardware diff --git a/arch/ia64/configs/bigsur_defconfig b/arch/ia64/configs/bigsur_defconfig index 6dd8655..2c04fbe 100644 --- a/arch/ia64/configs/bigsur_defconfig +++ b/arch/ia64/configs/bigsur_defconfig @@ -134,7 +134,7 @@ CONFIG_ARCH_SPARSEMEM_ENABLE=y CONFIG_IA32_SUPPORT=y CONFIG_COMPAT=y # CONFIG_IA64_MCA_RECOVERY is not set -CONFIG_PERFMON=y +CONFIG_PERFMON_V20=y CONFIG_IA64_PALINFO=y # diff --git a/arch/ia64/configs/generic_defconfig b/arch/ia64/configs/generic_defconfig index e05f9e1..7d89a19 100644 --- a/arch/ia64/configs/generic_defconfig +++ b/arch/ia64/configs/generic_defconfig @@ -209,7 +209,7 @@ CONFIG_IA32_SUPPORT=y CONFIG_COMPAT=y CONFIG_COMPAT_FOR_U64_ALIGNMENT=y CONFIG_IA64_MCA_RECOVERY=y -CONFIG_PERFMON=y +CONFIG_PERFMON_V20=y CONFIG_IA64_PALINFO=y # CONFIG_IA64_MC_ERR_INJECT is not set CONFIG_SGI_SN=y diff --git a/arch/ia64/configs/gensparse_defconfig b/arch/ia64/configs/gensparse_defconfig index e86fbd3..5f8c772 100644 --- a/arch/ia64/configs/gensparse_defconfig +++ b/arch/ia64/configs/gensparse_defconfig @@ -142,7 +142,7 @@ CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y CONFIG_IA32_SUPPORT=y CONFIG_COMPAT=y CONFIG_IA64_MCA_RECOVERY=y -CONFIG_PERFMON=y +CONFIG_PERFMON_V20=y CONFIG_IA64_PALINFO=y CONFIG_SGI_SN=y diff --git a/arch/ia64/configs/sim_defconfig b/arch/ia64/configs/sim_defconfig index 546a772..d51457a 100644 --- a/arch/ia64/configs/sim_defconfig +++ b/arch/ia64/configs/sim_defconfig @@ -133,7 +133,7 @@ CONFIG_ARCH_SPARSEMEM_ENABLE=y CONFIG_IA32_SUPPORT=y CONFIG_COMPAT=y # CONFIG_IA64_MCA_RECOVERY is not set -# CONFIG_PERFMON is not set +# CONFIG_PERFMON_V20 is not set CONFIG_IA64_PALINFO=m # diff --git a/arch/ia64/configs/tiger_defconfig b/arch/ia64/configs/tiger_defconfig index c522edf..318d846 100644 --- a/arch/ia64/configs/tiger_defconfig +++ b/arch/ia64/configs/tiger_defconfig @@ -156,7 +156,7 @@ CONFIG_VIRTUAL_MEM_MAP=y CONFIG_HOLES_IN_ZONE=y # CONFIG_IA32_SUPPORT is not set CONFIG_IA64_MCA_RECOVERY=y -CONFIG_PERFMON=y +CONFIG_PERFMON_V20=y CONFIG_IA64_PALINFO=y # CONFIG_IA64_MC_ERR_INJECT is not set # CONFIG_IA64_ESI is not set diff --git a/arch/ia64/configs/zx1_defconfig b/arch/ia64/configs/zx1_defconfig index 0a06b13..2bf0ad4 100644 --- a/arch/ia64/configs/zx1_defconfig +++ b/arch/ia64/configs/zx1_defconfig @@ -153,7 +153,7 @@ CONFIG_HOLES_IN_ZONE=y CONFIG_IA32_SUPPORT=y CONFIG_COMPAT=y CONFIG_IA64_MCA_RECOVERY=y -CONFIG_PERFMON=y +CONFIG_PERFMON_V20=y CONFIG_IA64_PALINFO=y # CONFIG_IA64_ESI is not set # CONFIG_KEXEC is not set diff --git a/arch/ia64/include/asm/processor.h b/arch/ia64/include/asm/processor.h index f88fa05..3ecf7e0 100644 --- a/arch/ia64/include/asm/processor.h +++ b/arch/ia64/include/asm/processor.h @@ -321,7 +321,7 @@ struct thread_struct { #else # define INIT_THREAD_IA32 #endif /* CONFIG_IA32_SUPPORT */ -#ifdef CONFIG_PERFMON +#ifdef CONFIG_PERFMON_V20 void *pfm_context; /* pointer to detailed PMU context */ unsigned long pfm_needs_checking; /* when >0, pending perfmon work on kernel exit */ # define INIT_THREAD_PM .pfm_context = NULL, \ diff --git a/arch/ia64/include/asm/system.h b/arch/ia64/include/asm/system.h index 927a381..387e540 100644 --- a/arch/ia64/include/asm/system.h +++ b/arch/ia64/include/asm/system.h @@ -224,7 +224,7 @@ extern void ia64_account_on_switch (struct task_struct *prev, struct task_struct # define IA64_ACCOUNT_ON_SWITCH(p,n) #endif -#ifdef CONFIG_PERFMON +#ifdef CONFIG_PERFMON_V20 DECLARE_PER_CPU(unsigned long, pfm_syst_info); # define PERFMON_IS_SYSWIDE() (__get_cpu_var(pfm_syst_info) & 0x1) #else diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile index c381ea9..93819cc 100644 --- a/arch/ia64/kernel/Makefile +++ b/arch/ia64/kernel/Makefile @@ -23,7 +23,7 @@ obj-$(CONFIG_IOSAPIC) += iosapic.o obj-$(CONFIG_MODULES) += module.o obj-$(CONFIG_SMP) += smp.o smpboot.o obj-$(CONFIG_NUMA) += numa.o -obj-$(CONFIG_PERFMON) += perfmon_default_smpl.o +obj-$(CONFIG_PERFMON_V20) += perfmon_default_smpl.o obj-$(CONFIG_IA64_CYCLONE) += cyclone.o obj-$(CONFIG_CPU_FREQ) += cpufreq/ obj-$(CONFIG_IA64_MCA_RECOVERY) += mca_recovery.o diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c index 28d3d48..db54bd4 100644 --- a/arch/ia64/kernel/irq_ia64.c +++ b/arch/ia64/kernel/irq_ia64.c @@ -40,7 +40,7 @@ #include #include -#ifdef CONFIG_PERFMON +#ifdef CONFIG_PERFMON_V20 # include #endif @@ -660,7 +660,7 @@ init_IRQ (void) } #endif #endif -#ifdef CONFIG_PERFMON +#ifdef CONFIG_PERFMON_V20 pfm_init_percpu(); #endif platform_irq_init(); diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index 6543a55..3bd1883 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c @@ -52,7 +52,7 @@ #include #include -#ifdef CONFIG_PERFMON +#ifdef CONFIG_PERFMON_V20 /* * perfmon context state */ @@ -6820,10 +6820,10 @@ pfm_inherit(struct task_struct *task, struct pt_regs *regs) * the psr bits are already set properly in copy_threads() */ } -#else /* !CONFIG_PERFMON */ +#else /* !CONFIG_PERFMON_v20 */ asmlinkage long sys_perfmonctl (int fd, int cmd, void *arg, int count) { return -ENOSYS; } -#endif /* CONFIG_PERFMON */ +#endif /* CONFIG_PERFMON_V20 */ diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c index c571627..afbf1a8 100644 --- a/arch/ia64/kernel/process.c +++ b/arch/ia64/kernel/process.c @@ -46,7 +46,7 @@ #include "entry.h" -#ifdef CONFIG_PERFMON +#ifdef CONFIG_PERFMON_V20 # include #endif @@ -174,7 +174,7 @@ do_notify_resume_user(sigset_t *unused, struct sigscratch *scr, long in_syscall) return; } -#ifdef CONFIG_PERFMON +#ifdef CONFIG_PERFMON_V20 if (current->thread.pfm_needs_checking) /* * Note: pfm_handle_work() allow us to call it with interrupts @@ -334,14 +334,14 @@ cpu_idle (void) void ia64_save_extra (struct task_struct *task) { -#ifdef CONFIG_PERFMON +#ifdef CONFIG_PERFMON_V20 unsigned long info; #endif if ((task->thread.flags & IA64_THREAD_DBG_VALID) != 0) ia64_save_debug_regs(&task->thread.dbr[0]); -#ifdef CONFIG_PERFMON +#ifdef CONFIG_PERFMON_V20 if ((task->thread.flags & IA64_THREAD_PM_VALID) != 0) pfm_save_regs(task); @@ -359,14 +359,14 @@ ia64_save_extra (struct task_struct *task) void ia64_load_extra (struct task_struct *task) { -#ifdef CONFIG_PERFMON +#ifdef CONFIG_PERFMON_V20 unsigned long info; #endif if ((task->thread.flags & IA64_THREAD_DBG_VALID) != 0) ia64_load_debug_regs(&task->thread.dbr[0]); -#ifdef CONFIG_PERFMON +#ifdef CONFIG_PERFMON_V20 if ((task->thread.flags & IA64_THREAD_PM_VALID) != 0) pfm_load_regs(task); @@ -523,7 +523,7 @@ copy_thread (int nr, unsigned long clone_flags, } #endif -#ifdef CONFIG_PERFMON +#ifdef CONFIG_PERFMON_V20 if (current->thread.pfm_context) pfm_inherit(p, child_ptregs); #endif @@ -735,7 +735,7 @@ exit_thread (void) { ia64_drop_fpu(current); -#ifdef CONFIG_PERFMON +#ifdef CONFIG_PERFMON_V20 /* if needed, stop monitoring and flush state to perfmon context */ if (current->thread.pfm_context) pfm_exit_thread(current); diff --git a/arch/ia64/kernel/ptrace.c b/arch/ia64/kernel/ptrace.c index 92c9689..ffd212f 100644 --- a/arch/ia64/kernel/ptrace.c +++ b/arch/ia64/kernel/ptrace.c @@ -31,7 +31,7 @@ #include #include #include -#ifdef CONFIG_PERFMON +#ifdef CONFIG_PERFMON_V20 #include #endif @@ -2105,7 +2105,7 @@ access_uarea(struct task_struct *child, unsigned long addr, "address 0x%lx\n", addr); return -1; } -#ifdef CONFIG_PERFMON +#ifdef CONFIG_PERFMON_V20 /* * Check if debug registers are used by perfmon. This * test must be done once we know that we can do the diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c index 1dcbb85..f865315 100644 --- a/arch/ia64/kernel/smpboot.c +++ b/arch/ia64/kernel/smpboot.c @@ -381,7 +381,7 @@ smp_callin (void) extern void ia64_init_itm(void); extern volatile int time_keeper_id; -#ifdef CONFIG_PERFMON +#ifdef CONFIG_PERFMON_V20 extern void pfm_init_percpu(void); #endif @@ -411,7 +411,7 @@ smp_callin (void) ia64_mca_cmc_vector_setup(); /* Setup vector on AP */ -#ifdef CONFIG_PERFMON +#ifdef CONFIG_PERFMON_V20 pfm_init_percpu(); #endif diff --git a/arch/ia64/lib/Makefile b/arch/ia64/lib/Makefile index 98771e2..754f415 100644 --- a/arch/ia64/lib/Makefile +++ b/arch/ia64/lib/Makefile @@ -13,7 +13,7 @@ lib-y := __divsi3.o __udivsi3.o __modsi3.o __umodsi3.o \ obj-$(CONFIG_ITANIUM) += copy_page.o copy_user.o memcpy.o obj-$(CONFIG_MCKINLEY) += copy_page_mck.o memcpy_mck.o -lib-$(CONFIG_PERFMON) += carta_random.o +lib-$(CONFIG_PERFMON_V20) += carta_random.o AFLAGS___divdi3.o = AFLAGS___udivdi3.o = -DUNSIGNED diff --git a/arch/ia64/oprofile/Makefile b/arch/ia64/oprofile/Makefile index aad27a7..3323fd5 100644 --- a/arch/ia64/oprofile/Makefile +++ b/arch/ia64/oprofile/Makefile @@ -7,4 +7,4 @@ DRIVER_OBJS := $(addprefix ../../../drivers/oprofile/, \ timer_int.o ) oprofile-y := $(DRIVER_OBJS) init.o backtrace.o -oprofile-$(CONFIG_PERFMON) += perfmon.o +oprofile-$(CONFIG_PERFMON_V20) += perfmon.o diff --git a/arch/ia64/oprofile/init.c b/arch/ia64/oprofile/init.c index 31b545c..9ed2bc1 100644 --- a/arch/ia64/oprofile/init.c +++ b/arch/ia64/oprofile/init.c @@ -20,7 +20,7 @@ int __init oprofile_arch_init(struct oprofile_operations *ops) { int ret = -ENODEV; -#ifdef CONFIG_PERFMON +#ifdef CONFIG_PERFMON_V20 /* perfmon_init() can fail, but we have no way to report it */ ret = perfmon_init(ops); #endif @@ -32,7 +32,7 @@ int __init oprofile_arch_init(struct oprofile_operations *ops) void oprofile_arch_exit(void) { -#ifdef CONFIG_PERFMON +#ifdef CONFIG_PERFMON_V20 perfmon_exit(); #endif } diff --git a/include/linux/sched.h b/include/linux/sched.h index 0421500..16bf42d 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1349,7 +1349,7 @@ struct task_struct { */ unsigned long timer_slack_ns; unsigned long default_timer_slack_ns; -#ifdef CONFIG_PERFMON +#ifdef CONFIG_PERFMON_V20 struct pfm_context *pfm_context; #endif }; diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 7bc960a..d12a175 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -625,7 +625,7 @@ asmlinkage long sys_fallocate(int fd, int mode, loff_t offset, loff_t len); int kernel_execve(const char *filename, char *const argv[], char *const envp[]); -#ifdef CONFIG_PERFMON +#ifdef CONFIG_PERFMON_V20 struct pfarg_sinfo; asmlinkage long sys_pfm_create(int flags, struct pfarg_sinfo *s, char __user *f, void __user *uarg, size_t uarg_size); @@ -634,6 +634,6 @@ asmlinkage long sys_pfm_write(int fd, int flags, int type, void __user *arg, siz asmlinkage long sys_pfm_read(int fd, int flags, int type, void __user *arg, size_t s); asmlinkage long sys_pfm_attach(int fd, int flags, int target); asmlinkage long sys_pfm_set_state(int fd, int flags, int state); -#endif /* CONFIG_PERFMON */ +#endif /* CONFIG_PERFMON_V20 */ #endif