From: Ingo Molnar <mingo@elte.hu>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>,
LKML <linux-kernel@vger.kernel.org>, Jens Axboe <axboe@kernel.dk>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Christoph Lameter <clameter@linux-foundation.org>,
Petr Tesarik <ptesarik@suse.cz>,
Virtualization <virtualization@lists.linux-foundation.org>,
Xen devel <xen-devel@lists.xensource.com>,
Thomas Friebel <thomas.friebel@amd.com>,
Avi Kivity <avi@qumranet.com>
Subject: [patch] x86: paravirt spinlocks, !CONFIG_SMP build fixes (was: Re: [PATCH RFC 0/4] Paravirtual spinlocks)
Date: Wed, 9 Jul 2008 14:35:03 +0200 [thread overview]
Message-ID: <20080709123503.GA13610@elte.hu> (raw)
In-Reply-To: <20080709122852.GA30579@elte.hu>
* Ingo Molnar <mingo@elte.hu> wrote:
> as there were no fundamental objections in this thread i've created a
> tip/x86/paravirt-spinlocks topic branch for these patches and started
> testing them.
small UP build fixes below.
Ingo
----------------->
commit c77bc635bb0486b0ddbe03012a8662b399ae9cdb
Author: Ingo Molnar <mingo@elte.hu>
Date: Wed Jul 9 14:33:33 2008 +0200
x86: paravirt spinlocks, !CONFIG_SMP build fixes
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c
index bba4041..6aa8aed 100644
--- a/arch/x86/kernel/paravirt.c
+++ b/arch/x86/kernel/paravirt.c
@@ -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 = {
@@ -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);
diff --git a/include/asm-x86/paravirt.h b/include/asm-x86/paravirt.h
index 65ed02c..b2aba8f 100644
--- a/include/asm-x86/paravirt.h
+++ b/include/asm-x86/paravirt.h
@@ -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);
@@ -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 */
next prev parent reply other threads:[~2008-07-09 12:35 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-07 19:07 [PATCH RFC 0/4] Paravirtual spinlocks Jeremy Fitzhardinge
2008-07-07 19:07 ` [PATCH RFC 1/4] x86/paravirt: add hooks for spinlock operations Jeremy Fitzhardinge
2008-07-07 19:07 ` [PATCH RFC 2/4] paravirt: introduce a "lock-byte" spinlock implementation Jeremy Fitzhardinge
2008-07-07 19:07 ` [PATCH RFC 3/4] xen: use lock-byte " Jeremy Fitzhardinge
2008-07-07 19:07 ` [PATCH RFC 4/4] xen: implement Xen-specific spinlocks Jeremy Fitzhardinge
2008-07-08 6:37 ` Johannes Weiner
2008-07-08 7:15 ` Jeremy Fitzhardinge
2008-07-08 7:30 ` Johannes Weiner
2008-07-08 0:29 ` [PATCH RFC 0/4] Paravirtual spinlocks Rusty Russell
2008-07-08 0:37 ` Jeremy Fitzhardinge
2008-07-08 1:01 ` Rusty Russell
2008-07-08 4:51 ` Nick Piggin
2008-07-08 5:28 ` Jeremy Fitzhardinge
2008-07-09 12:28 ` Ingo Molnar
2008-07-09 12:35 ` Ingo Molnar [this message]
2008-07-09 12:39 ` [patch] x86: paravirt spinlocks, modular build fix (was: Re: [PATCH RFC 0/4] Paravirtual spinlocks) Ingo Molnar
2008-07-09 13:33 ` [PATCH RFC 0/4] Paravirtual spinlocks Ingo Molnar
2008-07-09 13:49 ` [patch] x86, paravirt-spinlocks: fix boot hang (was: Re: [PATCH RFC 0/4] Paravirtual spinlocks) Ingo Molnar
2008-07-09 15:55 ` [patch] x86, paravirt-spinlocks: fix boot hang Jeremy Fitzhardinge
2008-07-09 19:26 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080709123503.GA13610@elte.hu \
--to=mingo@elte.hu \
--cc=a.p.zijlstra@chello.nl \
--cc=avi@qumranet.com \
--cc=axboe@kernel.dk \
--cc=clameter@linux-foundation.org \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nickpiggin@yahoo.com.au \
--cc=ptesarik@suse.cz \
--cc=thomas.friebel@amd.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox