* [uml-devel] [PATCH] um: use RWSEM_GENERIC_SPINLOCK on x86
@ 2011-05-23 20:30 Richard Weinberger
2011-05-23 20:46 ` Linus Torvalds
0 siblings, 1 reply; 3+ messages in thread
From: Richard Weinberger @ 2011-05-23 20:30 UTC (permalink / raw)
To: akpm
Cc: #,
user-mode-linux-devel, Richard Weinberger, linux-kernel,
Thomas Gleixner, torvalds, stable
Commit d12337 (rwsem: Remove redundant asmregparm annotation)
broke rwsem on UML.
As we cannot compile UML with -mregparm=3 and keeping asmregparm only
for UML is inadequate the easiest solution is using RWSEM_GENERIC_SPINLOCK.
Thanks to Thomas Gleixner for the idea.
Reported-by: Toralf Förster <toralf.foerster@gmx.de>
Tested-by: Toralf Förster <toralf.foerster@gmx.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: <stable@kernel.org> # .39.x
Signed-off-by: Richard Weinberger <richard@nod.at>
---
arch/um/Kconfig.x86 | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/um/Kconfig.x86 b/arch/um/Kconfig.x86
index a9da516..d57cf9c 100644
--- a/arch/um/Kconfig.x86
+++ b/arch/um/Kconfig.x86
@@ -29,10 +29,10 @@ config X86_64
def_bool 64BIT
config RWSEM_XCHGADD_ALGORITHM
- def_bool X86_XADD
+ def_bool X86_XADD && 64BIT
config RWSEM_GENERIC_SPINLOCK
- def_bool !X86_XADD
+ def_bool !X86_XADD || !64BIT
config 3_LEVEL_PGTABLES
bool "Three-level pagetables (EXPERIMENTAL)" if !64BIT
--
1.7.4.2
------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its
next-generation tools to help Windows* and Linux* C/C++ and Fortran
developers boost performance applications - including clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] um: use RWSEM_GENERIC_SPINLOCK on x86
2011-05-23 20:30 [uml-devel] [PATCH] um: use RWSEM_GENERIC_SPINLOCK on x86 Richard Weinberger
@ 2011-05-23 20:46 ` Linus Torvalds
0 siblings, 0 replies; 3+ messages in thread
From: Linus Torvalds @ 2011-05-23 20:46 UTC (permalink / raw)
To: Richard Weinberger
Cc: akpm, user-mode-linux-devel, linux-kernel, Thomas Gleixner, # .39.x
On Mon, May 23, 2011 at 1:30 PM, Richard Weinberger <richard@nod.at> wrote:
>
> config RWSEM_XCHGADD_ALGORITHM
> - def_bool X86_XADD
> + def_bool X86_XADD && 64BIT
>
> config RWSEM_GENERIC_SPINLOCK
> - def_bool !X86_XADD
> + def_bool !X86_XADD || !64BIT
May I suggest just changing that second one to
config RWSEM_GENERIC_SPINLOCK
def_bool !RWSEM_XCHGADD_ALGORITHM
because I had to look twice just to make sure that they are inverses
of each other.
So why not make that inverse relationship more obvious?
Linus
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] um: use RWSEM_GENERIC_SPINLOCK on x86
@ 2011-05-23 20:46 ` Linus Torvalds
0 siblings, 0 replies; 3+ messages in thread
From: Linus Torvalds @ 2011-05-23 20:46 UTC (permalink / raw)
To: Richard Weinberger
Cc: akpm, user-mode-linux-devel, linux-kernel, Thomas Gleixner, # .39.x
On Mon, May 23, 2011 at 1:30 PM, Richard Weinberger <richard@nod.at> wrote:
>
> config RWSEM_XCHGADD_ALGORITHM
> - def_bool X86_XADD
> + def_bool X86_XADD && 64BIT
>
> config RWSEM_GENERIC_SPINLOCK
> - def_bool !X86_XADD
> + def_bool !X86_XADD || !64BIT
May I suggest just changing that second one to
config RWSEM_GENERIC_SPINLOCK
def_bool !RWSEM_XCHGADD_ALGORITHM
because I had to look twice just to make sure that they are inverses
of each other.
So why not make that inverse relationship more obvious?
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-05-23 20:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-23 20:30 [uml-devel] [PATCH] um: use RWSEM_GENERIC_SPINLOCK on x86 Richard Weinberger
2011-05-23 20:46 ` Linus Torvalds
2011-05-23 20:46 ` Linus Torvalds
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.