Revision tags: v2.6.39-rc1, v2.6.38, v2.6.38-rc8, v2.6.38-rc7, v2.6.38-rc6, v2.6.38-rc5, v2.6.38-rc4, v2.6.38-rc3 |
|
#
52bd080d |
| 23-Jan-2011 |
Thomas Gleixner <tglx@linutronix.de> |
MIPS: Replace deprecated spinlock initialization
SPIN_LOCK_UNLOCK is deprecated. Use the lockdep capable variant instead.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: linux-mips@linux-mi
MIPS: Replace deprecated spinlock initialization
SPIN_LOCK_UNLOCK is deprecated. Use the lockdep capable variant instead.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/2025/ Signed-off-by: Ralf Baechle <ralf@duck.linux-mips.net>
show more ...
|
#
7424cdf7 |
| 23-Jan-2011 |
Thomas Gleixner <tglx@linutronix.de> |
mips: Replace deprecated spinlock initialization
SPIN_LOCK_UNLOCK is deprecated. Use the lockdep capable variant instead.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Ralf Baechle <ralf@
mips: Replace deprecated spinlock initialization
SPIN_LOCK_UNLOCK is deprecated. Use the lockdep capable variant instead.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Ralf Baechle <ralf@linux-mips.org>
show more ...
|
Revision tags: v2.6.38-rc2, v2.6.38-rc1, v2.6.37, v2.6.37-rc8, v2.6.37-rc7, v2.6.37-rc6, v2.6.37-rc5, v2.6.37-rc4, v2.6.37-rc3, v2.6.37-rc2, v2.6.37-rc1 |
|
#
863abad4 |
| 30-Oct-2010 |
Jesper Juhl <jj@chaosbits.net> |
MIPS: VPE loader: Check vmalloc return value in vpe_open
The return value of the vmalloc() call in arch/mips/kernel/vpe.c::vpe_open() is not checked, so we potentially store a null pointer in v->pbu
MIPS: VPE loader: Check vmalloc return value in vpe_open
The return value of the vmalloc() call in arch/mips/kernel/vpe.c::vpe_open() is not checked, so we potentially store a null pointer in v->pbuffer. Add a check for a null return and then return -ENOMEM in that case.
[Ralf: The check added by Jesper's original patch is where it logically should be. Adding it eleminated the need for the checks in a few other places, so I removed them. There still is a zillion of other things that need to be fixed in this file / API.]
Signed-off-by: Jesper Juhl <jj@chaosbits.net> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/1747/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
show more ...
|
Revision tags: v2.6.36, v2.6.36-rc8, v2.6.36-rc7, v2.6.36-rc6, v2.6.36-rc5, v2.6.36-rc4, v2.6.36-rc3, v2.6.36-rc2, v2.6.36-rc1 |
|
#
6038f373 |
| 15-Aug-2010 |
Arnd Bergmann <arnd@arndb.de> |
llseek: automatically add .llseek fop
All file_operations should get a .llseek operation so we can make nonseekable_open the default for future file operations without a .llseek pointer.
The three
llseek: automatically add .llseek fop
All file_operations should get a .llseek operation so we can make nonseekable_open the default for future file operations without a .llseek pointer.
The three cases that we can automatically detect are no_llseek, seq_lseek and default_llseek. For cases where we can we can automatically prove that the file offset is always ignored, we use noop_llseek, which maintains the current behavior of not returning an error from a seek.
New drivers should normally not use noop_llseek but instead use no_llseek and call nonseekable_open at open time. Existing drivers can be converted to do the same when the maintainer knows for certain that no user code relies on calling seek on the device file.
The generated code is often incorrectly indented and right now contains comments that clarify for each added line why a specific variant was chosen. In the version that gets submitted upstream, the comments will be gone and I will manually fix the indentation, because there does not seem to be a way to do that using coccinelle.
Some amount of new code is currently sitting in linux-next that should get the same modifications, which I will do at the end of the merge window.
Many thanks to Julia Lawall for helping me learn to write a semantic patch that does all this.
===== begin semantic patch ===== // This adds an llseek= method to all file operations, // as a preparation for making no_llseek the default. // // The rules are // - use no_llseek explicitly if we do nonseekable_open // - use seq_lseek for sequential files // - use default_llseek if we know we access f_pos // - use noop_llseek if we know we don't access f_pos, // but we still want to allow users to call lseek // @ open1 exists @ identifier nested_open; @@ nested_open(...) { <+... nonseekable_open(...) ...+> }
@ open exists@ identifier open_f; identifier i, f; identifier open1.nested_open; @@ int open_f(struct inode *i, struct file *f) { <+... ( nonseekable_open(...) | nested_open(...) ) ...+> }
@ read disable optional_qualifier exists @ identifier read_f; identifier f, p, s, off; type ssize_t, size_t, loff_t; expression E; identifier func; @@ ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off) { <+... ( *off = E | *off += E | func(..., off, ...) | E = *off ) ...+> }
@ read_no_fpos disable optional_qualifier exists @ identifier read_f; identifier f, p, s, off; type ssize_t, size_t, loff_t; @@ ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off) { ... when != off }
@ write @ identifier write_f; identifier f, p, s, off; type ssize_t, size_t, loff_t; expression E; identifier func; @@ ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off) { <+... ( *off = E | *off += E | func(..., off, ...) | E = *off ) ...+> }
@ write_no_fpos @ identifier write_f; identifier f, p, s, off; type ssize_t, size_t, loff_t; @@ ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off) { ... when != off }
@ fops0 @ identifier fops; @@ struct file_operations fops = { ... };
@ has_llseek depends on fops0 @ identifier fops0.fops; identifier llseek_f; @@ struct file_operations fops = { ... .llseek = llseek_f, ... };
@ has_read depends on fops0 @ identifier fops0.fops; identifier read_f; @@ struct file_operations fops = { ... .read = read_f, ... };
@ has_write depends on fops0 @ identifier fops0.fops; identifier write_f; @@ struct file_operations fops = { ... .write = write_f, ... };
@ has_open depends on fops0 @ identifier fops0.fops; identifier open_f; @@ struct file_operations fops = { ... .open = open_f, ... };
// use no_llseek if we call nonseekable_open //////////////////////////////////////////// @ nonseekable1 depends on !has_llseek && has_open @ identifier fops0.fops; identifier nso ~= "nonseekable_open"; @@ struct file_operations fops = { ... .open = nso, ... +.llseek = no_llseek, /* nonseekable */ };
@ nonseekable2 depends on !has_llseek @ identifier fops0.fops; identifier open.open_f; @@ struct file_operations fops = { ... .open = open_f, ... +.llseek = no_llseek, /* open uses nonseekable */ };
// use seq_lseek for sequential files ///////////////////////////////////// @ seq depends on !has_llseek @ identifier fops0.fops; identifier sr ~= "seq_read"; @@ struct file_operations fops = { ... .read = sr, ... +.llseek = seq_lseek, /* we have seq_read */ };
// use default_llseek if there is a readdir /////////////////////////////////////////// @ fops1 depends on !has_llseek && !nonseekable1 && !nonseekable2 && !seq @ identifier fops0.fops; identifier readdir_e; @@ // any other fop is used that changes pos struct file_operations fops = { ... .readdir = readdir_e, ... +.llseek = default_llseek, /* readdir is present */ };
// use default_llseek if at least one of read/write touches f_pos ///////////////////////////////////////////////////////////////// @ fops2 depends on !fops1 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @ identifier fops0.fops; identifier read.read_f; @@ // read fops use offset struct file_operations fops = { ... .read = read_f, ... +.llseek = default_llseek, /* read accesses f_pos */ };
@ fops3 depends on !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @ identifier fops0.fops; identifier write.write_f; @@ // write fops use offset struct file_operations fops = { ... .write = write_f, ... + .llseek = default_llseek, /* write accesses f_pos */ };
// Use noop_llseek if neither read nor write accesses f_pos ///////////////////////////////////////////////////////////
@ fops4 depends on !fops1 && !fops2 && !fops3 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @ identifier fops0.fops; identifier read_no_fpos.read_f; identifier write_no_fpos.write_f; @@ // write fops use offset struct file_operations fops = { ... .write = write_f, .read = read_f, ... +.llseek = noop_llseek, /* read and write both use no f_pos */ };
@ depends on has_write && !has_read && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @ identifier fops0.fops; identifier write_no_fpos.write_f; @@ struct file_operations fops = { ... .write = write_f, ... +.llseek = noop_llseek, /* write uses no f_pos */ };
@ depends on has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @ identifier fops0.fops; identifier read_no_fpos.read_f; @@ struct file_operations fops = { ... .read = read_f, ... +.llseek = noop_llseek, /* read uses no f_pos */ };
@ depends on !has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @ identifier fops0.fops; @@ struct file_operations fops = { ... +.llseek = noop_llseek, /* no read or write fn */ }; ===== End semantic patch =====
Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Julia Lawall <julia@diku.dk> Cc: Christoph Hellwig <hch@infradead.org>
show more ...
|
Revision tags: v2.6.35, v2.6.35-rc6, v2.6.35-rc5, v2.6.35-rc4, v2.6.35-rc3, v2.6.35-rc2, v2.6.35-rc1, v2.6.34, v2.6.34-rc7, v2.6.34-rc6, v2.6.34-rc5, v2.6.34-rc4, v2.6.34-rc3, v2.6.34-rc2, v2.6.34-rc1 |
|
#
8facefd0 |
| 27-Feb-2010 |
Ralf Baechle <ralf@linux-mips.org> |
MIPS: Don't include <linux/smp_lock.h> unnecessarily.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
Revision tags: v2.6.33, v2.6.33-rc8, v2.6.33-rc7, v2.6.33-rc6, v2.6.33-rc5, v2.6.33-rc4, v2.6.33-rc3, v2.6.33-rc2, v2.6.33-rc1, v2.6.32, v2.6.32-rc8, v2.6.32-rc7, v2.6.32-rc6, v2.6.32-rc5, v2.6.32-rc4 |
|
#
a22d621c |
| 08-Oct-2009 |
Ralf Baechle <ralf@linux-mips.org> |
MIPS: VPE: Remove stray unlock_kernel.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Reported-by: Josip Rodin <joy@entuzijast.net>
|
Revision tags: v2.6.32-rc3 |
|
#
1bbfc20d |
| 28-Sep-2009 |
Ralf Baechle <ralf@linux-mips.org> |
MIPS: VPE: Get rid of BKL.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
Revision tags: v2.6.32-rc1, v2.6.32-rc2 |
|
#
982f6ffe |
| 16-Sep-2009 |
Ralf Baechle <ralf@linux-mips.org> |
MIPS: Remove useless zero initializations.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
Revision tags: v2.6.31, v2.6.31-rc9, v2.6.31-rc8, v2.6.31-rc7, v2.6.31-rc6 |
|
#
ce21f4e8 |
| 03-Aug-2009 |
Ralf Baechle <ralf@linux-mips.org> |
MIPS: VPE: Delete unused function get_tc_unused().
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
#
349c4229 |
| 03-Aug-2009 |
Ralf Baechle <ralf@linux-mips.org> |
MIPS: VPE: Fix bogus indentation.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
#
f18b51cc |
| 03-Aug-2009 |
Ralf Baechle <ralf@linux-mips.org> |
MIPS: VPE: Make various functions static.
None of these is used outside the VPE loader.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
#
477c4b07 |
| 03-Aug-2009 |
Ralf Baechle <ralf@linux-mips.org> |
MIPS: VPE: Free relocation chain on error.
This may happen if a bad sequence of relocations is being encountered.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
Revision tags: v2.6.31-rc5, v2.6.31-rc4, v2.6.31-rc3 |
|
#
e2a9cf96 |
| 10-Jul-2009 |
Raghu Gandham <raghu@mips.com> |
MIPS: VPE: Fix compiler warning.
Signed-off-by: Raghu Gandham <raghu@mips.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
Revision tags: v2.6.31-rc2 |
|
#
52a7a27c |
| 28-Jun-2009 |
Joe Perches <joe@perches.com> |
MIPS: MT: Remove unnecessary semicolons
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
Revision tags: v2.6.31-rc1, v2.6.30, v2.6.30-rc8, v2.6.30-rc7, v2.6.30-rc6, v2.6.30-rc5, v2.6.30-rc4, v2.6.30-rc3, v2.6.30-rc2, v2.6.30-rc1, v2.6.29, v2.6.29-rc8, v2.6.29-rc7, v2.6.29-rc6, v2.6.29-rc5, v2.6.29-rc4, v2.6.29-rc3, v2.6.29-rc2, v2.6.29-rc1 |
|
#
1bb5beb4 |
| 06-Jan-2009 |
Kay Sievers <kay.sievers@vrfy.org> |
mips: struct device - replace bus_id with dev_name(), dev_set_name()
Cc: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregk
mips: struct device - replace bus_id with dev_name(), dev_set_name()
Cc: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
show more ...
|
Revision tags: v2.6.28, v2.6.28-rc9, v2.6.28-rc8 |
|
#
8ebcfc8b |
| 04-Dec-2008 |
Nick Andrew <nick@nick-andrew.net> |
MIPS: Fix incorrect use of loose in vpe.c
It should be 'lose', not 'loose'.
Signed-off-by: Nick Andrew <nick@nick-andrew.net> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
Revision tags: v2.6.28-rc7, v2.6.28-rc6, v2.6.28-rc5 |
|
#
d76b0d9b |
| 13-Nov-2008 |
David Howells <dhowells@redhat.com> |
CRED: Use creds in file structs
Attach creds to file structs and discard f_uid/f_gid.
file_operations::open() methods (such as hppfs_open()) should use file->f_cred rather than current_cred(). At
CRED: Use creds in file structs
Attach creds to file structs and discard f_uid/f_gid.
file_operations::open() methods (such as hppfs_open()) should use file->f_cred rather than current_cred(). At the moment file->f_cred will be current_cred() at this point.
Signed-off-by: David Howells <dhowells@redhat.com> Reviewed-by: James Morris <jmorris@namei.org> Signed-off-by: James Morris <jmorris@namei.org>
show more ...
|
Revision tags: v2.6.28-rc4, v2.6.28-rc3, v2.6.28-rc2, v2.6.28-rc1, v2.6.27, v2.6.27-rc9, v2.6.27-rc8, v2.6.27-rc7, v2.6.27-rc6, v2.6.27-rc5, v2.6.27-rc4, v2.6.27-rc3, v2.6.27-rc2, v2.6.27-rc1, v2.6.26, v2.6.26-rc9, v2.6.26-rc8, v2.6.26-rc7, v2.6.26-rc6, v2.6.26-rc5, v2.6.26-rc4, v2.6.26-rc3 |
|
#
7558da94 |
| 15-May-2008 |
Jonathan Corbet <corbet@lwn.net> |
mips: cdev lock_kernel() pushdown
Push the cdev lock_kernel() call into MIPS-specific drivers.
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
|
Revision tags: v2.6.26-rc2 |
|
#
d303f4a1 |
| 04-May-2008 |
Cyrill Gorcunov <gorcunov@gmail.com> |
[MIPS] ELF handling - use SELFMAG instead of numeric constant
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
Revision tags: v2.6.26-rc1 |
|
#
9f2546ad |
| 17-Apr-2008 |
Ralf Baechle <ralf@linux-mips.org> |
[MIPS] Don't use max_pfn which is no longer initialized these days.
Still won't play nicely with esotheric configurations such as discontig memory ...
Signed-off-by: Ralf Baechle <ralf@linux-mips.o
[MIPS] Don't use max_pfn which is no longer initialized these days.
Still won't play nicely with esotheric configurations such as discontig memory ...
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
show more ...
|
Revision tags: v2.6.25 |
|
#
b618336a |
| 16-Apr-2008 |
Kevin D. Kissell <kevink@mips.com> |
[MIPS] Fixes necessary for non-SMP kernels and non-relocatable binaries
Signed-off-by: Kevin D. Kissell <kevink@mips.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
Revision tags: v2.6.25-rc9, v2.6.25-rc8, v2.6.25-rc7, v2.6.25-rc6 |
|
#
5408c490 |
| 13-Mar-2008 |
Ralf Baechle <ralf@linux-mips.org> |
[MIPS] VPE loader: Check result of memory allocation.
And while at it, make it a little cleaner. Issue originally reported by Tiejun Chen (tiejun.chen@windriver.com).
Signed-off-by: Ralf Baechle <
[MIPS] VPE loader: Check result of memory allocation.
And while at it, make it a little cleaner. Issue originally reported by Tiejun Chen (tiejun.chen@windriver.com).
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
show more ...
|
Revision tags: v2.6.25-rc5, v2.6.25-rc4, v2.6.25-rc3, v2.6.25-rc2, v2.6.25-rc1, v2.6.24, v2.6.24-rc8, v2.6.24-rc7, v2.6.24-rc6, v2.6.24-rc5, v2.6.24-rc4, v2.6.24-rc3, v2.6.24-rc2 |
|
#
adfb8998 |
| 05-Nov-2007 |
Lucas Woods <woodzy@gmail.com> |
[MIPS] Remove duplicate includes.
Signed-off-by: Lucas Woods <woodzy@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
#
b1e3afa0 |
| 19-Nov-2007 |
Joe Perches <joe@perches.com> |
[MIPS] vpe: Add missing "space"
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
|
#
7c3a622d |
| 08-Nov-2007 |
Nigel Stephens <nigel@mips.com> |
[MIPS] vpe: handle halting TCs in an errata safe way.
Adds a JR.HB after halting a TC, to ensure that the TC has really halted. only modifies the TCSTATUS register when the TC is safely halted.
Sig
[MIPS] vpe: handle halting TCs in an errata safe way.
Adds a JR.HB after halting a TC, to ensure that the TC has really halted. only modifies the TCSTATUS register when the TC is safely halted.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
show more ...
|