Eric Sesterhenn [Mon, 12 May 2008 21:02:21 +0000 (14:02 -0700)]
Fix hfsplus oops on image without extents
Fix an oops with a corrupted hfs+ image.
See http://bugzilla.kernel.org/show_bug.cgi?id=10548 for details.
Problem is that we call hfs_btree_open() from hfsplus_fill_super() to set
HFSPLUS_SB(sb).[ext_tree|cat_tree] Both trees are still NULL at this moment.
If hfs_btree_open() fails for any reason it calls iput() on the page, which
gets to hfsplus_releasepage() which tries to access HFSPLUS_SB(sb).* which is
still NULL and oopses while dereferencing it.
[akpm@linux-foundation.org: build fix] Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Bjorn Helgaas [Mon, 12 May 2008 21:02:18 +0000 (14:02 -0700)]
PNP: set IRQ index in sysfs "set irq" interface
We have to set the ISAPNP register index when setting an IRQ via the sysfs
interface. We already do it for IO, MEM, and DMA resources; I just missed the
IRQ one.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Len Brown <lenb@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Robert P. J. Day [Mon, 12 May 2008 21:02:17 +0000 (14:02 -0700)]
mn10300: replace deprecated "TOPDIR" with newer "srctree"
This would appear to be the last reference to TOPDIR in the entire tree, after
which i'm guessing that variable can be dropped.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Acked-by: David Howells <dhowells@redhat.com> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Julia Lawall [Mon, 12 May 2008 21:02:16 +0000 (14:02 -0700)]
drivers/video/pnx4008: eliminate double free
The function framebuffer_release just calls kfree, so calling kfree
subsequently on the same argument represents a double free. The comments with
the definition of framebuffer_release in drivers/video/fbsysfs.c suggest that
a more elaborate definition of this function is planned, such that the
splitting up of framebuffer_release and kfree as done in the second instance
might someday make sense, but it does not make sense now.
This was found using the following semantic match.
(http://www.emn.fr/x-info/coccinelle/)
Darrick J. Wong [Mon, 12 May 2008 21:02:13 +0000 (14:02 -0700)]
adt7473: minor documentation update
Add a sentence about when fan speed increases to maximum.
Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Serge E. Hallyn [Mon, 12 May 2008 21:02:13 +0000 (14:02 -0700)]
capabilities: add bounding set to /proc/self/status
There is currently no way to query the bounding set of another task. As there
appears to be no security reason not to, and as Michael Kerrisk points out the
following valid reasons to do so exist:
* consistency (I can see all of the other per-thread/process sets in
/proc/.../status)
* debugging -- I could imagine that it would make the job of debugging an
application that uses capabilities a little simpler.
this patch adds the bounding set to /proc/self/status right after the
effective set.
Signed-off-by: Serge E. Hallyn <serue@us.ibm.com> Acked-by: Michael Kerrisk <mtk.manpages@gmail.com> Acked-by: Andrew G. Morgan <morgan@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Dan Williams [Mon, 12 May 2008 21:02:12 +0000 (14:02 -0700)]
md: fix raid5 'repair' operations
commit bd2ab67030e9116f1e4aae1289220255412b37fd "md: close a livelock window
in handle_parity_checks5" introduced a bug in handling 'repair' operations.
After a repair operation completes we clear the state bits tracking this
operation. However, they are cleared too early and this results in the code
deciding to re-run the parity check operation. Since we have done the repair
in memory the second check does not find a mismatch and thus does not do a
writeback.
Krzysztof Helt [Mon, 12 May 2008 21:02:11 +0000 (14:02 -0700)]
tridentfb: improve clock setting accuracy
Improve clock calculation precision (to kHz from MHz) and removes parameter
field vclk from the tridentfb_par structure.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Krzysztof Helt [Mon, 12 May 2008 21:02:09 +0000 (14:02 -0700)]
tridentfb: remove misplaced enable_mmio()
Remove redundant enable_mmio() call as the mmio mode is enabled in the probe
function earlier.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jan Kara [Mon, 12 May 2008 21:02:08 +0000 (14:02 -0700)]
quota: don't call sync_fs() from vfs_quota_off() when there's no quota turn off
Sometimes, vfs_quota_off() is called on a partially set up super block (for
example when fill_super() fails for some reason). In such cases we cannot
call ->sync_fs() because it can Oops because of not properly filled in super
block. So in case we find there's not quota to turn off, we just skip
everything and return which fixes the above problem.
[akpm@linux-foundation.org: fxi tpyo] Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
m68knommu: ColdFire add support for kernel preemption (missing chunk)
As the subject says this patch adds the support for kernel preemption on
m68knommu Coldfire. I thing the same changes could be applied to 68360 &
68328 but since I don't have the HW, I don't touch it. Kconfig enables the
preemption item only on coldfire.
This is a missing chunk from Sebastian's original patch that I lost from the
first submission.
Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de> Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Dean Nelson [Mon, 12 May 2008 21:02:03 +0000 (14:02 -0700)]
drivers/misc/sgi-xp: replace partid_t with a short
In preparation for supporting greater than 64 partitions replace partid_t by
short in drivers/misc/sgi-xp.
Signed-off-by: Dean Nelson <dcn@sgi.com> Acked-by: Robin Holt <holt@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Dean Nelson [Mon, 12 May 2008 21:02:02 +0000 (14:02 -0700)]
drivers/misc/sgi-xp: clean up return values
Make XP return values more generic to XP and not so tied to XPC by changing
enum xpc_retval to xp_retval, along with changing return value prefixes from
xpc to xp. Also, cleanup a comment block that referenced some of these return
values as well as the handling of BTE related return values.
Signed-off-by: Dean Nelson <dcn@sgi.com> Acked-by: Robin Holt <holt@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Eric BENARD [Mon, 12 May 2008 21:02:01 +0000 (14:02 -0700)]
spi: pxa2xx_spi clock resume bugfix
There is a typo in pxa2xx_spi.c, comment says "Enable the SSP clock", code
says: clk_disable ... so after resume, the SSP is dead.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Ned Forrester <nforrester@whoi.edu> Cc: Stephen Street <stephen@streetfiresound.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Mon, 12 May 2008 21:02:00 +0000 (14:02 -0700)]
uml: track and make up lost ticks
Alarm delivery could be noticably late in the !CONFIG_NOHZ case because lost
ticks weren't being taken into account. This is now treated more carefully,
with the time between ticks being calculated and the appropriate number of
ticks delivered to the timekeeping system.
Cc: Nix <nix@esperi.org.uk> Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Mon, 12 May 2008 21:01:59 +0000 (14:01 -0700)]
uml: style fixes in the random driver
Give random.c a style workover while I'm changing it.
Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Mon, 12 May 2008 21:01:58 +0000 (14:01 -0700)]
uml: random driver fixes
The random driver would essentially hang if the host's /dev/random returned
-EAGAIN. There was a test of need_resched followed by a schedule inside the
loop, but that didn't help and it's the wrong way to work anyway.
The right way is to ask for an interrupt when there is input available from
the host and handle it then rather than polling.
Now, when the host's /dev/random returns -EAGAIN, the driver asks for a wakeup
when there's randomness available again and sleeps. The interrupt routine
just wakes up whatever processes are sleeping on host_read_wait.
There is an atomic_t, host_sleep_count, which counts the number of processes
waiting for randomness. When this reaches zero, the interrupt is disabled.
An added complication is that async I/O notification was only recently added
to /dev/random (by me), so essentially all hosts will lack it. So, we use the
sigio workaround here, which is to have a separate thread poll on the
descriptor and send an interrupt when there is input on it. This mechanism is
activated when a process gets -EAGAIN (activating this multiple times is
harmless, if a bit wasteful) and deactivated by the last process still
waiting.
The module name was changed from "random" to "hw_random" in order for udev to
recognize it.
The sigio workaround needed some changes. sigio_broken was added for cases
when we know that async notification doesn't work. This is now called from
maybe_sigio_broken, which deals with pts devices.
Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Mon, 12 May 2008 21:01:57 +0000 (14:01 -0700)]
uml: physical memory shouldn't include initial stack
The top of physical memory should be below the initial process stack, not the
top of the address space, at least for as long as the stack isn't known to the
kernel VM system and appropriately reserved.
Cc: "Christopher S. Aker" <caker@theshore.net> Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jiri Olsa [Mon, 12 May 2008 21:01:56 +0000 (14:01 -0700)]
uml: use DIV_ROUND_UP
I just saw similar patches in the janitor kernel's list, and spotted place it
fits.
Signed-off-by: Jiri Olsa <olsajiri@gmail.com> Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Robert P. J. Day [Mon, 12 May 2008 21:01:55 +0000 (14:01 -0700)]
uml: fix CONFIG_RAW dependencies
Add the BLOCK dependency for RAW_DRIVER, to match what's in
drivers/char/Kconfig. Also, while we're there, update the alleged
obsolesence of RAW_DRIVER since it doesn't seem to be going away any
time soon.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Mon, 12 May 2008 21:01:54 +0000 (14:01 -0700)]
uml: use __SPIN_LOCK_UNLOCKED
From: Robert P. J. Day <rpjday@crashcourse.ca>
Use newer, non-deprecated __SPIN_LOCK_UNLOCKED macro.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Mon, 12 May 2008 21:01:53 +0000 (14:01 -0700)]
uml: fix bad NTP interaction with clock
UML's supposed nanosecond clock interacts badly with NTP when NTP
decides that the clock has drifted ahead and needs to be slowed down.
Slowing down the clock is done by decrementing the cycle-to-nanosecond
multiplier, which is 1. Decrementing that gives you 0 and time is
stopped.
This is fixed by switching to a microsecond clock, with a multiplier
of 1000.
Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Mon, 12 May 2008 21:01:52 +0000 (14:01 -0700)]
uml: remove unused header
From: Adrian Bunk <bunk@kernel.org>
This patch removes the unused and broken (the normal asm/keyboard.h
files no longer exists) include/asm-um/keyboard.h
Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Mon, 12 May 2008 21:01:52 +0000 (14:01 -0700)]
uml: fix build when SLOB is enabled
Reintroduce uml_kmalloc for the benefit of UML libc code. The
previous tactic of declaring __kmalloc so it could be called directly
from the libc side of the house turned out to be getting too intimate
with slab, and it doesn't work with slob.
So, the uml_kmalloc wrapper is back. It calls kmalloc or whatever
that translates into, and libc code calls it.
kfree is left alone since that still works, leaving a somewhat
inconsistent API.
Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Johann Felix Soden <johfel@users.sourceforge.net> Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Mon, 12 May 2008 21:01:50 +0000 (14:01 -0700)]
uml: tidy ptrace interface
Tidy the ptrace interface code. Removed a bunch of unused macros.
Started converting register sets from arrays of longs to structures.
Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Mon, 12 May 2008 21:01:50 +0000 (14:01 -0700)]
uml: move hppfs_kern.c to hppfs.c
There's no reason for the _kern in hppfs_kern.c, so move it to hppfs.c.
Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Mon, 12 May 2008 21:01:49 +0000 (14:01 -0700)]
uml: hppfs fixes
hppfs tidying and fixes noticed during hch's get_inode work -
style fixes
a copy_to_user got its return value checked
hppfs_write no longer fiddles file->f_pos because it gets and
returns pos in its arguments
hppfs_delete_inode dputs the underlyng procfs dentry stored in
its private data and mntputs the vfsmnt stashed in s_fs_info
hppfs_put_super no longer needs to mntput the s_fs_info, so it
no longer needs to exist
hppfs_readlink and hppfs_follow_link were doing a bunch of stuff
with a struct file which they didn't use
there is now a ->permission which calls generic_permission
get_inode was always returning 0 for some reason - it now
returns an inode if nothing bad happened
Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Mon, 12 May 2008 21:01:48 +0000 (14:01 -0700)]
uml: style fixes
A few random style fixes.
Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Dike [Mon, 12 May 2008 21:01:47 +0000 (14:01 -0700)]
uml: redo host capability detection and disabling
Redo how host capabilities are recorded at startup and disabled on the
command line.
There are now explicit variables saying what's been disabled by the
command line rather than the implicitness of the have_* variable being
zero. The capability variables now start at zero and are set to one
as their capabilities are found to be present on the host.
Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Mon, 12 May 2008 20:34:13 +0000 (13:34 -0700)]
Make 'cond_resched()' nullification depend on PREEMPT_BKL
Because it's not correct with a non-preemptable BKL and just causes
PREEMPT kernels to have longer latencies than non-PREEMPT ones (which is
obviously not the point of it at all).
Of course, that config option actually got removed as an option earlier,
so for now this basically disables it entirely, but if BKL preemption is
ever resurrected it will be a meaningful optimization. And in the
meantime, it at least documents the intent of the code, while not doing
the wrong thing.
* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
[CIFS] don't allow demultiplex thread to exit until kthread_stop is called
[CIFS] when not using unix extensions, check for and set ATTR_READONLY on create and mkdir
[CIFS] add local struct inode pointer to cifs_setattr
[CIFS] cifs_find_tcp_session cleanup
Linus Torvalds [Mon, 12 May 2008 17:14:22 +0000 (10:14 -0700)]
Fix up 'need_resched()' definition
We should not go through the task pointer to get at the thread info,
since it's usually cheaper to just access the thread info directly.
So don't make the code look up 'current', when we can just use the
thread info accessor functions directly. This generally avoids one
level of indirection and tends to work better together with code that
also looks at other thread flags (eg preempt_count).
Stick with the original pattern, but make sure the 32-bit code
actually comes first!
Reported by Al Viro.
Signed-off-by: H. Peter Anvin <hpa@zytor.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Al Viro <viro@zeniv.linux.org.uk>
...
CC arch/mips/emma2rh/markeins/setup.o
/home/bunk/linux/kernel-2.6/git/linux-2.6/arch/mips/emma2rh/markeins/setup.c:79: error: conflicting types for 'clock'
/home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/clocksource.h:96: error: previous declaration of 'clock' was here
make[2]: *** [arch/mips/emma2rh/markeins/setup.o] Error 1
<-- snip -->
[Ralf: reformated to 80 colums after the fix and marked emma2rh_clock as
__initdata]
Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Only MIPS32 and MIPS64 CPUs implement clz/dclz. Therefore don't export
__ilog2() for non MIPS32/MIPS64 cpus and use generic __fls bitop code for
these cpus.
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Sergei Shtylyov [Wed, 30 Apr 2008 19:29:04 +0000 (23:29 +0400)]
[MIPS] Pb1200/DBAu1200 code style cleanup
Fix several errors and warnings given by checkpatch.pl:
- use of C99 // comments;
- initialization of a 'static' variable to 0;
- space after opening and before closing parentheses;
- missing space between 'for' and opening parenthesis;
- macros with complex values not enclosed in parentheses;
- printk() without KERN_* facility level;
- unnecessary braces for single-statement block;
- using simple_strtol() where strict_strtol() could be used;
- line over 80 characters.
In addition to these changes, also do the following:
- mention DBAu1200 board in the Makefile;
- replace the group of #include/#ifdef directives by a single
#include <au1xxx.h> since this header contains the needed stuff;
- properly indent the blocks;
- insert spaces between operator and its operands, remove excess spaces
there;
- remove needless parentheses and add some for clarity;
- replace numeric literals/expressions with the matching macros;
- remove space after the type cast's closing parenthesis;
- reduce pb1200_setup_cascade() to the single 'return' statement;
- reduce the number of printed empty lines in the so-called CPLD
workaround;
- remove #undef AU1X00_EXTERNAL_INT since that macro is not defined
anywhere;
- replace spaces after the macro name with tabs in the #define directives;
- remove excess tabs after the macro name in the #define directives;
- fix typo in the BCSR_RESETS_PWMR1mUX macro's name;
- group all Pb1200 PCMCIA definitions together;
- put the function's result type and name/parameters on the same line;
- insert missing and remove excess new lines;
- make the multi-line comment style consistent with the kernel style
elsewhere by adding empty first line and/or adding space/asterisk on
their left side;
- fix typos/errors, capitalize acronyms, etc. in the comments;
- combine some comments;
- update MontaVista copyright;
- remove Pete Popov's old email address...
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Sergei Shtylyov [Wed, 30 Apr 2008 19:18:35 +0000 (23:18 +0400)]
[MIPS] Alchemy common headers style cleanup
Fix several errors and warnings given by checkpatch.pl:
- space after opening and before closing parentheses;
- opening brace following 'struct' not on the same line;
- leading spaces instead of tabs;
- use of C99 // comments;
- macros with complex values not enclosed in parentheses;
- missing space between the type and asterisk in a variable declaration;
- space between asterisk and function name;
- including <asm/io.h> instead of <linux/io.h> and <asm/irq.h> instead of
<linux/irq.h>;
- use of '__inline__' instead of 'inline';
- space between function name and opening parenthesis;
- line over 80 characters.
In addition to these changes, also do the following:
- remove needless parentheses;
- insert spaces between operator and its operands;
- replace spaces after the macro name with tabs in the #define directives and
after the type in the structure field declarations;
- remove excess tabs after the macro name in the #define directives and in the
'extern' variable declarations;
- remove excess spaces between # and define for the SSI_*_MASK macros to align
with other such macros;
- put '||' operator on the same line with its first operand;
- properly indent multi-line function prototypes;
- make the multi-line comment style consistent with the kernel style elsewhere
by adding empty first line and/or adding space/asterisk on their left side;
- make two-line comments that only have one line of text one-line;
- convert the large multi-line comment in au1xxx_ide.h into several one-liners,
replace spaces with tabs there;
- fix typos/errors, capitalize acronyms, etc. in the comments;
- insert missing and remove excess new lines;
- update MontaVista copyright;
- remove Pete Popov's and Steve Longerbeam's old email addresses...
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Jeff Garzik [Fri, 18 Apr 2008 23:23:01 +0000 (19:23 -0400)]
[MIPS] msp_hwbutton.c: minor irq handler cleanups
- remove always-true test
- neaten request_irq() indentation
This change's main purpose is to prepare for the patchset in
jgarzik/misc-2.6.git#irq-remove, that explores removal of the
never-used 'irq' argument in each interrupt handler.
Signed-off-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
do_brk's return value was stored in an unsigned long variable before being
tested for less than zero making the test always fail. Also do_brk's
called irix_map_prda_page wasn't forwarding do_brk() success.
Bug checking the return value of do_brk() and initial fix for it found
by Roel Kluin <12o3l@tiscali.nl>.
Sergei Shtylyov [Sat, 5 Apr 2008 18:16:21 +0000 (22:16 +0400)]
[MIPS] Alchemy: SMBus resource fix
The Alchemy platform code registers the SMBus device using the virtual
address of its registers instead of the physical one -- fix this, taking
into account that actually the whole megabyte is decoded by any of the
programmable serial controllers (one of which is SMBus), and that all the
Alchemy peripherals are directly mappable into KSEG1 kernel space and
therefore ioremap() call would just boil down to CKSEG1ADDR() invocation.
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This patch fixes bug #10627 which caused the compilation error below.
CC [M] drivers/usb/c67x00/c67x00-ll-hpi.o
drivers/usb/c67x00/c67x00-ll-hpi.c: In function `ll_recv_msg':
drivers/usb/c67x00/c67x00-ll-hpi.c:243: erreur: `HZ' undeclared (first use in this function)
drivers/usb/c67x00/c67x00-ll-hpi.c:243: erreur: (Each undeclared identifier is reported only once
drivers/usb/c67x00/c67x00-ll-hpi.c:243: erreur: for each function it appears in.)
Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Mon, 12 May 2008 14:29:08 +0000 (07:29 -0700)]
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
[POWERPC] ppc: More compile fixes
[POWERPC] ppc: Don't run prom_init_check for arch/ppc builds
[POWERPC] ppc: Include <asm/cacheflush.h> in kernel/ppc_ksyms.c
[POWERPC] ppc: Use ebony_defconfig for defconfig
[POWERPC] Fix default cputable entries for e200 and e500 families
Alan Cox [Mon, 12 May 2008 11:29:25 +0000 (12:29 +0100)]
strip: Fix termios assumption
Strip assumes that the tty drivers always have a set_termios method which
may not be true. Check this when binding to the tty so that we don't oops
later.
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Paul Mackerras [Mon, 12 May 2008 12:57:51 +0000 (22:57 +1000)]
[POWERPC] ppc: More compile fixes
This fixes a few more miscellaneous compile problems with ARCH=ppc.
1. Don't compile devres.c on ARCH=ppc, it doesn't have ioremap_flags.
2. Include <asm/irq.h> in setup.c for the __DO_IRQ_CANON definition.
3. Include <linux/proc_fs.h> in residual.c for the
definition of create_proc_read_entry.
4. Fix xchg_ptr to be a static inline to eliminate a compiler warning.
Paul Mackerras [Mon, 12 May 2008 04:20:35 +0000 (14:20 +1000)]
[POWERPC] Fix default cputable entries for e200 and e500 families
Commit 76bc080ef5a34aedb63e1691f28c6b42f3468e4e ("POWERPC] Make default
cputable entries reflect selected CPU family") added default entries
for the e200 and e500 families, but missed a closing brace on those
entries, as pointed out by David Gibson. This adds the closing braces.
Linus Torvalds [Mon, 12 May 2008 00:09:24 +0000 (17:09 -0700)]
Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
* 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
i2c: Convert some more new-style drivers to use module aliasing
i2c: Match dummy devices by type
i2c-sibyte: Mark i2c_sibyte_add_bus() as static
i2c-sibyte: Correct a comment about frequency
i2c: Improve the functionality documentation
i2c: Improve smbus-protocol documentation
i2c-piix4: Blacklist two mainboards
i2c-piix4: Increase the intitial delay for the ServerWorks CSB5
i2c-mpc: Compare to NO_IRQ instead of zero
Linus Torvalds [Sun, 11 May 2008 23:04:48 +0000 (16:04 -0700)]
Add new 'cond_resched_bkl()' helper function
It acts exactly like a regular 'cond_resched()', but will not get
optimized away when CONFIG_PREEMPT is set.
Normal kernel code is already preemptable in the presense of
CONFIG_PREEMPT, so cond_resched() is optimized away (see commit 02b67cc3ba36bdba351d6c3a00593f4ec550d9d3 "sched: do not do
cond_resched() when CONFIG_PREEMPT").
But when wanting to conditionally reschedule while holding a lock, you
need to use "cond_sched_lock(lock)", and the new function is the BKL
equivalent of that.
Jean Delvare [Sun, 11 May 2008 18:37:06 +0000 (20:37 +0200)]
i2c: Convert some more new-style drivers to use module aliasing
Update 3 more new-style i2c drivers to use standard module aliasing
instead of the old driver_name/type driver matching scheme. These
video drivers aren't used yet so converting them is trivial.
Jean Delvare [Sun, 11 May 2008 18:37:06 +0000 (20:37 +0200)]
i2c: Match dummy devices by type
As the old driver_name/type matching scheme is going away soon, change
the dummy device mechanism to use the new matching scheme.
This has the downside that dummy i2c clients can no longer choose
their name, they'll all appear as "dummy" in sysfs and in log
messages. I don't think it is a problem in practice though, as there
is little reason to use these i2c clients to log messages.
The frequency may have been once hardcoded to 100 kHz, but currently it is
passed as an argument to i2c_sibyte_add_bus(), so update the comment to
match code. While at it, reformat a nearby comment for consistency. No
functional changes.
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> Signed-off-by: Jean Delvare <khali@linux-fr.org>
David Brownell [Sun, 11 May 2008 18:37:05 +0000 (20:37 +0200)]
i2c: Improve smbus-protocol documentation
Improve the smbus-protocol documentation file somewhat:
- Use the names of the SMBus protocol operations (from the 2.0
specification), not made-up-for-Linux names.
- Add the name of the call used to execute each operation ... and
point out that there are mismatches, where functions execute
different protocol operations than their names specify.
The most confusing examples are that "Read Byte" isn't executed by
i2c_smbus_read_byte(), and that "Write Byte" isn't executed by
i2c_smbus_write_byte(). When coding, that's not as bad as it may
seem; but that case would seem to be worth fixing.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
Jean Delvare [Sun, 11 May 2008 18:37:05 +0000 (20:37 +0200)]
i2c-piix4: Blacklist two mainboards
We had a report that running sensors-detect on a Sapphire AM2RD790
motherbord killed the CPU. While the exact cause is still unknown,
I'd rather play it safe and prevent any access to the SMBus on that
machine by not letting the i2c-piix4 driver attach to the SMBus host
device on that machine. Also blacklist a similar board made by DFI.
David Milburn [Sun, 11 May 2008 18:37:05 +0000 (20:37 +0200)]
i2c-piix4: Increase the intitial delay for the ServerWorks CSB5
Per the PIIX4 errata, there maybe a delay between setting the
start bit in the Smbus Host Controller Register and the transaction
actually starting. If the driver doesn't delay long enough, it
may appear that the transaction is complete when actually it
hasn't started, this may lead to bus collisions.
While 1 ms appears to be enough for most chips, the ServerWorks CSB5
wants 2 ms.
Signed-off-by: David Milburn <dmilburn@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
Jon Smirl [Sun, 11 May 2008 18:37:04 +0000 (20:37 +0200)]
i2c-mpc: Compare to NO_IRQ instead of zero
Alter the mpc i2c driver to use the NO_IRQ symbol instead of the constant
zero when checking for valid interrupts. NO_IRQ=-1 on ppc and NO_IRQ=0 on
powerpc so the checks against zero are not correct.
Signed-off-by: Jon Smirl <jonsmirl@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
Steve French [Sun, 11 May 2008 15:53:33 +0000 (15:53 +0000)]
[CIFS] don't allow demultiplex thread to exit until kthread_stop is called
cifs_demultiplex_thread can exit under several conditions:
1) if it's signaled
2) if there's a problem with session setup
3) if kthread_stop is called on it
The first two are problems. If kthread_stop is called on the thread,
there is no guarantee that it will still be up. We need to have the
thread stay up until kthread_stop is called on it.
One option would be to not even try to tear things down until after
kthread_stop is called. However, in the case where there is a problem
setting up the session, there's no real reason to try continuing the
loop.
This patch allows the thread to clean up and prepare for exit under all
three conditions, but it has the thread go to sleep until kthread_stop
is called. This allows us to simplify the shutdown code somewhat since
we can be reasonably sure that the thread won't exit after being
signaled but before kthread_stop is called.
It also removes the places where the thread itself set the tsk variable
since it appeared that it could have a potential race where the thread
might never be shut down.
Signed-off-by: Jeff Layton <jlayton@redhat.com> Acked-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Steve French <sfrench@us.ibm.com>