Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 104468
b: refs/heads/master
c: 4bb689e
h: refs/heads/master
v: v3
  • Loading branch information
Ingo Molnar committed Jul 16, 2008
1 parent b3fffdb commit a86b05a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2d9e1e2f58b5612aa4eab0ab54c84308a29dbd79
refs/heads/master: 4bb689eee12ceb6d669a0c9a519037c049a8af38
4 changes: 4 additions & 0 deletions trunk/arch/x86/kernel/paravirt.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,13 @@ enum paravirt_lazy_mode paravirt_get_lazy_mode(void)

void __init paravirt_use_bytelocks(void)
{
#ifdef CONFIG_SMP
pv_lock_ops.spin_is_locked = __byte_spin_is_locked;
pv_lock_ops.spin_is_contended = __byte_spin_is_contended;
pv_lock_ops.spin_lock = __byte_spin_lock;
pv_lock_ops.spin_trylock = __byte_spin_trylock;
pv_lock_ops.spin_unlock = __byte_spin_unlock;
#endif
}

struct pv_info pv_info = {
Expand Down Expand Up @@ -461,12 +463,14 @@ struct pv_mmu_ops pv_mmu_ops = {
};

struct pv_lock_ops pv_lock_ops = {
#ifdef CONFIG_SMP
.spin_is_locked = __ticket_spin_is_locked,
.spin_is_contended = __ticket_spin_is_contended,

.spin_lock = __ticket_spin_lock,
.spin_trylock = __ticket_spin_trylock,
.spin_unlock = __ticket_spin_unlock,
#endif
};

EXPORT_SYMBOL_GPL(pv_time_ops);
Expand Down
4 changes: 4 additions & 0 deletions trunk/include/asm-x86/paravirt.h
Original file line number Diff line number Diff line change
Expand Up @@ -1387,6 +1387,8 @@ void _paravirt_nop(void);

void paravirt_use_bytelocks(void);

#ifdef CONFIG_SMP

static inline int __raw_spin_is_locked(struct raw_spinlock *lock)
{
return PVOP_CALL1(int, pv_lock_ops.spin_is_locked, lock);
Expand All @@ -1412,6 +1414,8 @@ static __always_inline void __raw_spin_unlock(struct raw_spinlock *lock)
return PVOP_VCALL1(pv_lock_ops.spin_unlock, lock);
}

#endif

/* These all sit in the .parainstructions section to tell us what to patch. */
struct paravirt_patch_site {
u8 *instr; /* original instructions */
Expand Down

0 comments on commit a86b05a

Please sign in to comment.