21 Jul, 2011
1 commit
-
Fix up a few ->llseek() implementations that won't deal with SEEK_HOLE/SEEK_DATA
properly. Make them future proof so that if we ever add new options they will
return -EINVAL. Thanks,Signed-off-by: Josef Bacik
Signed-off-by: Al Viro
05 Oct, 2010
1 commit
-
All these files use the big kernel lock in a trivial
way to serialize their private file operations,
typically resulting from an earlier semi-automatic
pushdown from VFS.None of these drivers appears to want to lock against
other code, and they all use the BKL as the top-level
lock in their file operations, meaning that there
is no lock-order inversion problem.Consequently, we can remove the BKL completely,
replacing it with a per-file mutex in every case.
Using a scripted approach means we can avoid
typos.These drivers do not seem to be under active
maintainance from my brief investigation. Apologies
to those maintainers that I have missed.file=$1
name=$2
if grep -q lock_kernel ${file} ; then
if grep -q 'include.*linux.mutex.h' ${file} ; then
sed -i '/include.*/d' ${file}
else
sed -i 's/include.*.*$/include /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.*\/d' ${file} \
-e '/cycle_kernel_lock()/d'
fiSigned-off-by: Arnd Bergmann
17 May, 2010
1 commit
-
These are the last remaining device drivers using
the ->ioctl file operation in the drivers directory
(except from v4l drivers).[fweisbec: drop i8k pushdown as it has been done from
procfs pushdown branch already]Signed-off-by: Arnd Bergmann
Signed-off-by: Frederic Weisbecker
14 Oct, 2009
1 commit
-
There is nothing to protect inside nvram_llseek(), the file
offset doesn't need to be protected and nvram_len is only
initialized from an __init path.It's safe to remove the big kernel lock there.
Signed-off-by: Frederic Weisbecker
LKML-Reference:
Cc: Greg KH
Signed-off-by: Thomas Gleixner
11 Sep, 2009
1 commit
-
Remove the reliance on a staticly defined NVRAM size, allowing
platforms to support NVRAMs with sizes differing from the standard.A fall back value is provided for platforms not supporting this extension.
Signed-off-by: Martyn Welch
Signed-off-by: Benjamin Herrenschmidt
13 Jun, 2008
1 commit
-
The generic nvram driver announces itself as
'Macintosh non-volatile memory driver'
instead of 'Generic non-volatile memory driver'. Fix that.Signed-off-by: Philippe De Muyter
Cc: Benjamin Herrenschmidt
Cc: Arjan van de Ven
Cc: Paul Mackerras
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
13 Feb, 2007
1 commit
-
Many struct file_operations in the kernel can be "const". Marking them const
moves these to the .rodata section, which avoids false sharing with potential
dirty data. In addition it'll catch accidental writes at compile time to
these shared resources.Signed-off-by: Arjan van de Ven
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
28 Mar, 2006
1 commit
-
This removes statically assigned platform numbers and reworks the
powerpc platform probe code to use a better mechanism. With this,
board support files can simply declare a new machine type with a
macro, and implement a probe() function that uses the flattened
device-tree to detect if they apply for a given machine.We now have a machine_is() macro that replaces the comparisons of
_machine with the various PLATFORM_* constants. This commit also
changes various drivers to use the new macro instead of looking at
_machine.Signed-off-by: Benjamin Herrenschmidt
Signed-off-by: Paul Mackerras
17 Apr, 2005
1 commit
-
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.Let it rip!