Akinobu Mita | 1 Jun 2011 16:32
Picon

[PATCH] asm-generic: add another generic ext2 atomic bitops

The majority of architectures implement ext2 atomic bitops as
test_and_{set,clear}_bit() without spinlock.

This adds this type of generic implementation in ext2-atomic.h and
use it wherever possible.

Suggested-by: Andreas Dilger <adilger <at> dilger.ca>
Signed-off-by: Akinobu Mita <akinobu.mita <at> gmail.com>
Cc: Arnd Bergmann <arnd <at> arndb.de>
Cc: linux-arch <at> vger.kernel.org
---
 arch/alpha/include/asm/bitops.h          |    4 ++--
 arch/arm/include/asm/bitops.h            |    6 ++----
 arch/cris/include/asm/bitops.h           |    4 ++--
 arch/frv/include/asm/bitops.h            |    4 ++--
 arch/ia64/include/asm/bitops.h           |    4 ++--
 arch/m68k/include/asm/bitops_mm.h        |    6 ++----
 arch/mn10300/include/asm/bitops.h        |    8 ++------
 arch/parisc/include/asm/bitops.h         |   10 ++--------
 arch/powerpc/include/asm/bitops.h        |    6 ++----
 arch/s390/include/asm/bitops.h           |    6 ++----
 arch/sparc/include/asm/bitops_64.h       |    6 ++----
 arch/tile/include/asm/bitops_64.h        |    6 ++----
 arch/x86/include/asm/bitops.h            |    6 ++----
 arch/xtensa/include/asm/bitops.h         |   15 ++-------------
 include/asm-generic/bitops/ext2-atomic.h |    9 +++++++++
 15 files changed, 37 insertions(+), 63 deletions(-)

diff --git a/arch/alpha/include/asm/bitops.h b/arch/alpha/include/asm/bitops.h
index 85b8152..e7f02c6 100644
(Continue reading)

ralf | 1 Jun 2011 20:05
Favicon

[patch 04/14] i8253: Make MIPS use the shared i8253_lock.

Signed-off-by: Ralf Baechle <ralf <at> linux-mips.org>
To: linux-kernel <at> vger.kernel.org
Cc: linux-mips <at> linux-mips.org

 arch/mips/Kconfig        |    1 +
 arch/mips/kernel/i8253.c |    3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)

Index: linux-mips/arch/mips/Kconfig
===================================================================
--- linux-mips.orig/arch/mips/Kconfig
+++ linux-mips/arch/mips/Kconfig
 <at>  <at>  -2388,6 +2388,7  <at>  <at>  config MMU
 config I8253
 	bool
 	select CLKSRC_I8253
+	select I8253_LOCK
 	select MIPS_EXTERNAL_TIMER

 config ZONE_DMA32
Index: linux-mips/arch/mips/kernel/i8253.c
===================================================================
--- linux-mips.orig/arch/mips/kernel/i8253.c
+++ linux-mips/arch/mips/kernel/i8253.c
 <at>  <at>  -16,9 +16,6  <at>  <at> 
 #include <asm/io.h>
 #include <asm/time.h>

-DEFINE_RAW_SPINLOCK(i8253_lock);
-EXPORT_SYMBOL(i8253_lock);
(Continue reading)

ralf | 1 Jun 2011 20:04
Favicon

[patch 03/14] i8253: Consolidate all kernel definitions of i8253_lock in lib/i8253-lock.c.

Signed-off-by: Ralf Baechle <ralf <at> linux-mips.org>
To: linux-kernel <at> vger.kernel.org

 lib/Kconfig      |    6 ++++++
 lib/Makefile     |    1 +
 lib/i8253-lock.c |   11 +++++++++++
 3 files changed, 18 insertions(+)

Index: linux-i8253/lib/i8253-lock.c
===================================================================
--- /dev/null
+++ linux-i8253/lib/i8253-lock.c
 <at>  <at>  -0,0 +1,11  <at>  <at> 
+#include <linux/spinlock.h>
+#include <linux/module.h>
+
+/*
+ * Protects access to I/O ports
+ *
+ * 0040-0043 : timer0, i8253 / i8254
+ * 0061-0061 : NMI Control Register which contains two speaker control bits.
+ */
+DEFINE_RAW_SPINLOCK(i8253_lock);
+EXPORT_SYMBOL(i8253_lock);
Index: linux-i8253/lib/Makefile
===================================================================
--- linux-i8253.orig/lib/Makefile
+++ linux-i8253/lib/Makefile
 <at>  <at>  -37,6 +37,7  <at>  <at>  obj-$(CONFIG_HAS_IOMEM) += iomap_copy.o 
 obj-$(CONFIG_CHECK_SIGNATURE) += check_signature.o
(Continue reading)

ralf | 1 Jun 2011 20:05
Favicon

[patch 05/14] i8253: Make x86 use the shared i8253_lock.

Signed-off-by: Ralf Baechle <ralf <at> linux-mips.org>
To: linux-kernel <at> vger.kernel.org
Cc: Thomas Gleixner <tglx <at> linutronix.de>
Cc: Ingo Molnar <mingo <at> redhat.com>
Cc: "H. Peter Anvin" <hpa <at> zytor.com>
Cc: x86 <at> kernel.org

 arch/x86/Kconfig        |    1 +
 arch/x86/kernel/i8253.c |    3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)

Index: linux-mips/arch/x86/Kconfig
===================================================================
--- linux-mips.orig/arch/x86/Kconfig
+++ linux-mips/arch/x86/Kconfig
 <at>  <at>  -67,6 +67,7  <at>  <at>  config X86
 	select GENERIC_IRQ_PROBE
 	select GENERIC_PENDING_IRQ if SMP
 	select GENERIC_IRQ_SHOW
+	select I8253_LOCK
 	select IRQ_FORCED_THREADING
 	select USE_GENERIC_SMP_HELPERS if SMP
 	select HAVE_BPF_JIT if (X86_64 && NET)
Index: linux-mips/arch/x86/kernel/i8253.c
===================================================================
--- linux-mips.orig/arch/x86/kernel/i8253.c
+++ linux-mips/arch/x86/kernel/i8253.c
 <at>  <at>  -16,9 +16,6  <at>  <at> 
 #include <asm/hpet.h>
 #include <asm/smp.h>
(Continue reading)

Chris Metcalf | 1 Jun 2011 22:15
Favicon

Re: [PATCH 1/1] Add new syscall sys_sendmmsg to generic unistd

On 5/29/2011 5:57 PM, Arnd Bergmann wrote:
> On Sunday 29 May 2011 23:30:24 Jonas Bonn wrote:
>>> * remove all __ARCH_WANT_* from asm/unistd.h and use the generic glibc
>>>   implementation.
>>
>> I tried this earlier but ran into issues with uClibc, which is the only
>> libc port that we currently have.  Is uClibc known to be compatible with
>> the reduced set of syscalls?
>>
>> A good compromise here may be to submit the patch upstream with the
>> reduced set of syscalls but to maintain a separate tree locally that
>> reenables these for use with our current uClibc port until we can get it
>> straightened out.  It would be good to know, however, what's known to be
>> working for others in this area...
> 
> I don't think that there is a port today, but you can maybe Chris Metcalf,
> Guan Xuetao or Linas Vepstas know more about this, as they have all
> worked on the glibc support for the generic syscall interface.

The arch/tile glibc port works with none of the "extra" syscalls.  It has
not yet been pushed back to the community (although we just got our FSF
paperwork complete), but you can grab our version from
http://www.tilera.com/scm/ .  I tried to extract the asm-generic aspects
into a sysdeps/unix/sysv/linux/generic/ hierarchy as distinct from the
actual tile-specific code.

We hacked up uclibc to handle our architecture, too, but then discontinued
support for it, and the code was a pretty gnarly set of hacks on top of the
old nptl branch (long since merged into the uclibc trunk).

(Continue reading)

Greg Ungerer | 2 Jun 2011 06:30

Re: [PATCH] asm-generic: add another generic ext2 atomic bitops


Hi Akinobu,

On 02/06/11 00:32, Akinobu Mita wrote:
> The majority of architectures implement ext2 atomic bitops as
> test_and_{set,clear}_bit() without spinlock.
>
> This adds this type of generic implementation in ext2-atomic.h and
> use it wherever possible.

I am trying to get consensus on merging the m68k bitops_mm.h and
bitops_no.h. Here is a proposed patch to do this:

http://www.spinics.net/lists/linux-m68k/msg03803.html

I expect you wouldn't need to patch m68k/bitops_mm.h if this
goes in.

Regards
Greg

> Suggested-by: Andreas Dilger<adilger <at> dilger.ca>
> Signed-off-by: Akinobu Mita<akinobu.mita <at> gmail.com>
> Cc: Arnd Bergmann<arnd <at> arndb.de>
> Cc: linux-arch <at> vger.kernel.org
> ---
>   arch/alpha/include/asm/bitops.h          |    4 ++--
>   arch/arm/include/asm/bitops.h            |    6 ++----
>   arch/cris/include/asm/bitops.h           |    4 ++--
>   arch/frv/include/asm/bitops.h            |    4 ++--
(Continue reading)

Sergei Shtylyov | 2 Jun 2011 13:29

Re: [patch 12/14] i8253: Move remaining content and delete <asm/i8253.h>

Hello.

On 01-06-2011 22:05, ralf <at> linux-mips.org wrote:

> There is no really good other place but one line for two out of three
> architectures that have a <asm/i8253.h> file doesn't justify this files
> existence.

    I couldn't parse that. :-)

> Signed-off-by: Ralf Baechle <ralf <at> linux-mips.org>
> To: linux-kernel <at> vger.kernel.org
> Cc: linux-arm-kernel <at> lists.infradead.org
> Cc: Russell King <linux <at> arm.linux.org.uk>
> Cc: linux-mips <at> linux-mips.org
> Cc: Thomas Gleixner <tglx <at> linutronix.de>
> Cc: Ingo Molnar <mingo <at> redhat.com>
> Cc: "H. Peter Anvin" <hpa <at> zytor.com>
> Cc: x86 <at> kernel.org

WBR, Sergei
Arnd Bergmann | 2 Jun 2011 20:30
Picon
Gravatar

Re: [PATCH] asm-generic/unistd.h: support sendmmsg syscall

On Thursday 02 June 2011 20:21:45 Chris Metcalf wrote:
> 
> Signed-off-by: Chris Metcalf <cmetcalf <at> tilera.com>

Acked-by: Arnd Bergmann <arnd <at> arndb.de>
Arnd Bergmann | 3 Jun 2011 18:00
Picon
Gravatar

Re: [PATCH] asm-generic: add another generic ext2 atomic bitops

On Wednesday 01 June 2011, Akinobu Mita wrote:
> The majority of architectures implement ext2 atomic bitops as
> test_and_{set,clear}_bit() without spinlock.
> 
> This adds this type of generic implementation in ext2-atomic.h and
> use it wherever possible.

The idea sounds really good, but I'm trying to keep the number of
ARCH_* macros low. How about instead providing a new
asm-generic/bitops/ext2-atomic-setbit.h or similar?

Each architecture can then include either the spinlock or the
atomic bitop based version.

	Arnd
Gerhard Pircher | 3 Jun 2011 21:22
Picon

Re: [patch 00/14] Sort out i8253 and PC speaker locking and headers


-------- Original-Nachricht --------
> Datum: Fri, 3 Jun 2011 19:00:38 +0100
> Von: Ralf Baechle <ralf <at> linux-mips.org>
> An: Gerhard Pircher <gerhard_pircher <at> gmx.net>
> CC: linux-mips <at> linux-mips.org, linuxppc-dev <at> lists.ozlabs.org, linux-alpha <at> vger.kernel.org,
linux-arch <at> vger.kernel.org, linux-kernel <at> vger.kernel.org, Thomas Gleixner
<tglx <at> linutronix.de>, Benjamin Herrenschmidt <benh <at> kernel.crashing.org>
> Betreff: Re: [patch 00/14] Sort out i8253 and PC speaker locking and headers

> On Thu, Jun 02, 2011 at 09:11:19PM +0200, Gerhard Pircher wrote:
> 
> > > #if defined(CONFIG_MIPS) || defined(CONFIG_X86)
> > > /* Use the global PIT lock ! */
> > > #include <asm/i8253.h>
> > > #else
> > > #include <asm/8253pit.h>
> > > static DEFINE_RAW_SPINLOCK(i8253_lock);
> > > #endif
> > > 
> > > sound/drivers/pcsp/pcsp.h:
> > > 
> > > #if defined(CONFIG_MIPS) || defined(CONFIG_X86)
> > > /* Use the global PIT lock ! */
> > > #include <asm/i8253.h>
> > > #else
> > > #include <asm/8253pit.h>
> > > static DEFINE_RAW_SPINLOCK(i8253_lock);
> > > 
> > > $ git grep -F pcsp.h sound/drivers/pcsp
(Continue reading)


Gmane