All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Takashi Iwai <tiwai@suse.de>
Cc: Jaroslav Kysela <perex@perex.cz>,
	LKML <linux-kernel@vger.kernel.org>,
	John Kacur <jkacur@redhat.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	ALSA development <alsa-devel@alsa-project.org>
Subject: Re: [PATCH] sound/oss: convert to unlocked_ioctl
Date: Mon, 12 Jul 2010 23:13:03 +0200	[thread overview]
Message-ID: <201007122313.03465.arnd@arndb.de> (raw)
In-Reply-To: <s5hocec5tby.wl%tiwai@suse.de>

On Monday 12 July 2010 22:38:25 Takashi Iwai wrote:
> Now the rest is eliminating each lock_kernel() in sound/oss/*.c :)

For other files, I've used a script (see below) to do this, it probably
works with the OSS files as well, although I have not tried yet.

Of course, another option for OSS device drivers would be to
remove the entire driver ;). Either way, my feeling is that the
OSS drivers are not stopping anyone from building a kernel without
CONFIG_BKL once we have introduced that symbol and made the drivers
depend on it.

	Arnd

---
#!/bin/bash
file=$1
name=$2
if grep -q lock_kernel ${file} ; then
    if grep -q 'include.*linux.mutex.h' ${file} ; then
            sed -i '/include.*<linux\/smp_lock.h>/d' ${file}
    else
            sed -i 's/include.*<linux\/smp_lock.h>.*$/include <linux\/mutex.h>/g' ${file}
    fi
    sed -i ${file} \
        -e "/^#include.*linux.mutex.h/,$ {
                1,/^\(static\|int\|long\)/ {
                     /^\(static\|int\|long\)/istatic DEFINE_MUTEX(${name}_mutex);

} }"  \
    -e "s/\(un\)*lock_kernel\>[ ]*()/mutex_\1lock(\&${name}_mutex)/g" \
    -e '/[      ]*cycle_kernel_lock();/d'
else
    sed -i -e '/include.*\<smp_lock.h\>/d' ${file}  \
                -e '/cycle_kernel_lock()/d'
fi

      reply	other threads:[~2010-07-12 21:13 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-10 21:51 [PATCH 0/3] further BKL removal Arnd Bergmann
2010-07-10 21:51 ` [PATCH 1/3] drm: kill BKL from common code Arnd Bergmann
2010-08-24 18:46   ` Andreas Schwab
2010-08-24 20:45     ` Arnd Bergmann
2010-07-10 21:51 ` [PATCH 2/3] Remove BKL from fs/locks.c Arnd Bergmann
2010-07-10 22:01   ` Christoph Hellwig
2010-07-11 10:31     ` Arnd Bergmann
2010-07-10 21:51 ` [PATCH 3/3] sound: push BKL into open functions Arnd Bergmann
2010-07-11  7:15   ` Jaroslav Kysela
2010-07-11  7:15     ` Jaroslav Kysela
2010-07-11 10:16     ` Arnd Bergmann
2010-07-12 15:53       ` Takashi Iwai
2010-07-12 15:53         ` Takashi Iwai
2010-07-12 17:53         ` [PATCH] sound/oss: convert to unlocked_ioctl Arnd Bergmann
2010-07-12 20:38           ` Takashi Iwai
2010-07-12 20:38             ` Takashi Iwai
2010-07-12 21:13             ` Arnd Bergmann [this message]

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=201007122313.03465.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=fweisbec@gmail.com \
    --cc=jkacur@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.de \
    /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 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.