x86, timer, genirq updates
Subsystems (3)
Linus, please pull the latest x86 git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86.git
x86: an AMD/Barcelona bugfix, timers: two bugfixes, genirq:
missing inline function added. Tested on 32-bit and 64-bit x86.
Ingo
------------------>
Adrian Bunk (1):
timer: kernel/timer.c section fixes
Barry Kasindorf (1):
oprofile: op_model_athlon.c support for AMD family 10h barcelona performance counters
Kevin Hilman (1):
genirq: add unlocked version of set_irq_handler()
Thomas Gleixner (1):
clockevents: fix reprogramming decision in oneshot broadcast
arch/x86/oprofile/op_model_athlon.c | 22 ++++++++++---- include/linux/irq.h | 7 ++++ kernel/time/tick-broadcast.c | 56 +++++++++++++----------------------- kernel/timer.c | 4 +- 4 files changed, 46 insertions(+), 43 deletions(-)
arch/x86/oprofile/op_model_athlon.c +16 -6
@@ -1,6 +1,6 @@/** * @file op_model_athlon.h -* athlon / K7 model-specific MSR operations +* athlon / K7 / K8 / Family 10h model-specific MSR operations * * @remark Copyright 2002 OProfile authors * @remark Read the file COPYING
@@ -31,12 +31,16 @@#define CTRL_WRITE (l,h,msrs,c) do {wrmsr(msrs->controls[(c)].addr, (l), (h));} while (0)#define CTRL_SET_ACTIVE (n) (n |= (1<<22))#define CTRL_SET_INACTIVE (n) (n &= ~(1<<22)) -#define CTRL_CLEAR (x) (x &= (1<<21)) +#define CTRL_CLEAR_LO (x) (x &= (1<<21)) +#define CTRL_CLEAR_HI (x) (x &= 0xfffffcf0)#define CTRL_SET_ENABLE (val) (val |= 1<<20)#define CTRL_SET_USR (val,u) (val |= ((u & 1) << 16))#define CTRL_SET_KERN (val,k) (val |= ((k & 1) << 17))#define CTRL_SET_UM (val, m) (val |= (m << 8)) -#define CTRL_SET_EVENT (val, e) (val |= e) +#define CTRL_SET_EVENT_LOW (val, e) (val |= (e & 0xff)) +#define CTRL_SET_EVENT_HIGH (val, e) (val |= ((e >> 8) & 0xf)) +#define CTRL_SET_HOST_ONLY (val, h) (val |= ((h & 1) << 9)) +#define CTRL_SET_GUEST_ONLY (val, h) (val |= ((h & 1) << 8))static unsigned long reset_value[NUM_COUNTERS ];
@@ -70,7 +74,8 @@ static void athlon_setup_ctrs(struct op_msrs const * const msrs)if (unlikely (!CTRL_IS_RESERVED (msrs,i)))continue ;CTRL_READ (low, high, msrs, i); -CTRL_CLEAR (low); +CTRL_CLEAR_LO (low); +CTRL_CLEAR_HI (high);CTRL_WRITE (low, high, msrs, i); }
@@ -89,12 +94,17 @@ static void athlon_setup_ctrs(struct op_msrs const * const msrs)CTR_WRITE (counter_config[i].count, msrs, i);CTRL_READ (low, high, msrs, i); -CTRL_CLEAR (low); +CTRL_CLEAR_LO (low); +CTRL_CLEAR_HI (high);CTRL_SET_ENABLE (low);CTRL_SET_USR (low, counter_config[i].user);CTRL_SET_KERN (low, counter_config[i].kernel);CTRL_SET_UM (low, counter_config[i].unit_mask); -CTRL_SET_EVENT (low, counter_config[i].event); +CTRL_SET_EVENT_LOW (low, counter_config[i].event); +CTRL_SET_EVENT_HIGH (high, counter_config[i].event); +CTRL_SET_HOST_ONLY (high,0 ); +CTRL_SET_GUEST_ONLY (high,0 ); +CTRL_WRITE (low, high, msrs, i); }else { reset_value[i] =0 ;
include/linux/irq.h +7 -0
@@ -339,6 +339,13 @@ extern void __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, const char *name); +/* caller has locked the irq_desc and both params are valid */ +static inline void __set_irq_handler_unlocked (int irq, +irq_flow_handler_t handler) +{ + irq_desc[irq].handle_irq = handler; +} +/* * Set a highlevel flow handler for a given IRQ: */
kernel/time/tick-broadcast.c +21 -35
85 lines not on this page · raw message
kernel/timer.c +2 -2
@@ -1219,11 +1219,11 @@ asmlinkage long sys_sysinfo(struct sysinfo __user *info)*/ static struct lock_class_key base_lock_keys[NR_CPUS ]; -static int __devinit init_timers_cpu (int cpu) +static int __cpuinit init_timers_cpu (int cpu) {int j;tvec_base_t *base; -static char __devinitdata tvec_base_done[NR_CPUS ]; +static char __cpuinitdata tvec_base_done[NR_CPUS ];if (!tvec_base_done[cpu]) {static char boot_done;