ia64/linux-2.6.18-xen.hg

annotate kernel/mutex-debug.h @ 798:b02a90bf5bbc

ACPI: Backport missing part for T-State MSR support

Part of below kernel commit was missed while packporting T-State
support.

commit f79f06ab9f86d7203006d2ec8992ac80df36a34e
Author: Zhao Yakui <yakui.zhao@intel.com>
Date: Thu Nov 15 17:06:36 2007 +0800

ACPI: Enable MSR (FixedHW) support for T-States

Add throttling control via MSR when T-states uses
the FixHW Control Status registers.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Li Shaohua <shaohua.li@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>

Signed-off-by: Wei Gang <gang.wei@intel.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Mar 02 10:53:59 2009 +0000 (2009-03-02)
parents 831230e53067
children
rev   line source
ian@0 1 /*
ian@0 2 * Mutexes: blocking mutual exclusion locks
ian@0 3 *
ian@0 4 * started by Ingo Molnar:
ian@0 5 *
ian@0 6 * Copyright (C) 2004, 2005, 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com>
ian@0 7 *
ian@0 8 * This file contains mutex debugging related internal declarations,
ian@0 9 * prototypes and inline functions, for the CONFIG_DEBUG_MUTEXES case.
ian@0 10 * More details are in kernel/mutex-debug.c.
ian@0 11 */
ian@0 12
ian@0 13 /*
ian@0 14 * This must be called with lock->wait_lock held.
ian@0 15 */
ian@0 16 extern void
ian@0 17 debug_mutex_set_owner(struct mutex *lock, struct thread_info *new_owner);
ian@0 18
ian@0 19 static inline void debug_mutex_clear_owner(struct mutex *lock)
ian@0 20 {
ian@0 21 lock->owner = NULL;
ian@0 22 }
ian@0 23
ian@0 24 extern void debug_mutex_lock_common(struct mutex *lock,
ian@0 25 struct mutex_waiter *waiter);
ian@0 26 extern void debug_mutex_wake_waiter(struct mutex *lock,
ian@0 27 struct mutex_waiter *waiter);
ian@0 28 extern void debug_mutex_free_waiter(struct mutex_waiter *waiter);
ian@0 29 extern void debug_mutex_add_waiter(struct mutex *lock,
ian@0 30 struct mutex_waiter *waiter,
ian@0 31 struct thread_info *ti);
ian@0 32 extern void mutex_remove_waiter(struct mutex *lock, struct mutex_waiter *waiter,
ian@0 33 struct thread_info *ti);
ian@0 34 extern void debug_mutex_unlock(struct mutex *lock);
ian@0 35 extern void debug_mutex_init(struct mutex *lock, const char *name,
ian@0 36 struct lock_class_key *key);
ian@0 37
ian@0 38 #define spin_lock_mutex(lock, flags) \
ian@0 39 do { \
ian@0 40 struct mutex *l = container_of(lock, struct mutex, wait_lock); \
ian@0 41 \
ian@0 42 DEBUG_LOCKS_WARN_ON(in_interrupt()); \
ian@0 43 local_irq_save(flags); \
ian@0 44 __raw_spin_lock(&(lock)->raw_lock); \
ian@0 45 DEBUG_LOCKS_WARN_ON(l->magic != l); \
ian@0 46 } while (0)
ian@0 47
ian@0 48 #define spin_unlock_mutex(lock, flags) \
ian@0 49 do { \
ian@0 50 __raw_spin_unlock(&(lock)->raw_lock); \
ian@0 51 local_irq_restore(flags); \
ian@0 52 preempt_check_resched(); \
ian@0 53 } while (0)