If an out of sequence RDMA read response middle or last packet is
received, we should only resend the RDMA read request on the first
out of sequence packet and drop subsequent out of sequence packets
otherwise, we get "too many retries".
Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Ralph Campbell [Tue, 13 May 2008 18:41:29 +0000 (11:41 -0700)]
IB/ipath: Fix many locking issues when switching to error state
The send DMA hardware queue voided a number of prior assumptions about
when a send is complete which led to completions being generated out of
order. There were also a number of locking issues when switching the QP
to the error or reset states, and we implement the IB_QPS_SQD state.
Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Ralph Campbell [Tue, 13 May 2008 18:40:25 +0000 (11:40 -0700)]
IB/ipath: Fix RC and UC error handling
When errors are detected in RC, the QP should transition to the
IB_QPS_ERR state, not the IB_QPS_SQE state. Also, when the error is on
the responder side, the receive work completion error was incorrect
(remote vs. local).
Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Roland Dreier [Tue, 13 May 2008 18:27:25 +0000 (11:27 -0700)]
RDMA/nes: Fix up nes_lro_max_aggr module parameter
Fix some bugs with the max_aggr module parameter added with LRO support:
- The module parameter value ignored and not actually used to set
lro_mgr.max_aggr.
- MODULE_PARM_DESC had a typo "_mro_" instead of "_lro_" so it didn't
end up describing the actual module parameter.
- The nes_lro_max_aggr variable was declared as unsigned, but the
module_param line said "int" instead of "uint" for the type.
- The default value for the parameter was stuck in the permissions
field of module_param, which led to nonsensical permissions for the
file under /sys/module/iw_nes/param.
- The parameter was used in only one file but defined in another, which
led to the variable being global for no good reason. Move everything
related to the parameter to the file nes_hw.c where it is actually
used.
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>
Jeff Layton [Fri, 9 May 2008 22:28:02 +0000 (22:28 +0000)]
[CIFS] when not using unix extensions, check for and set ATTR_READONLY on create and mkdir
When creating a directory on a CIFS share without POSIX extensions,
and the given mode has no write bits set, set the ATTR_READONLY bit.
When creating a file, set ATTR_READONLY if the create mode has no write
bits set and we're not using unix extensions.
There are some comments about this being problematic due to the VFS
splitting creates into 2 parts. I'm not sure what that's actually
talking about, but I'm assuming that it has something to do with how
mknod is implemented. In the simple case where we have no unix
extensions and we're just creating a regular file, there's no reason
we can't set ATTR_READONLY.
Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Jeff Layton [Fri, 9 May 2008 21:26:11 +0000 (21:26 +0000)]
[CIFS] add local struct inode pointer to cifs_setattr
Clean up cifs_setattr a bit by adding a local inode pointer, and
changing all of the direntry->d_inode references to it. This also adds a
bit of micro-optimization. d_inode shouldn't change over the life of
this function, so we only need to dereference it once.
Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
David S. Miller [Sun, 11 May 2008 09:07:19 +0000 (02:07 -0700)]
sparc: Fix debugger syscall restart interactions.
So, forever, we've had this ptrace_signal_deliver implementation
which tries to handle all of the nasties that can occur when the
debugger looks at a process about to take a signal. It's meant
to address all of these issues inside of the kernel so that the
debugger need not be mindful of such things.
Problem is, this doesn't work.
The idea was that we should do the syscall restart business first, so
that the debugger captures that state. Otherwise, if the debugger for
example saves the child's state, makes the child execute something
else, then restores the saved state, we won't handle the syscall
restart properly because we lose the "we're in a syscall" state.
The code here worked for most cases, but if the debugger actually
passes the signal through to the child unaltered, it's possible that
we would do a syscall restart when we shouldn't have.
In particular this breaks the case of debugging a process under a gdb
which is being debugged by yet another gdb. gdb uses sigsuspend
to wait for SIGCHLD of the inferior, but if gdb itself is being
debugged by a top-level gdb we get a ptrace_stop(). The top-level gdb
does a PTRACE_CONT with SIGCHLD to let the inferior gdb see the
signal. But ptrace_signal_deliver() assumed the debugger would cancel
out the signal and therefore did a syscall restart, because the return
error was ERESTARTNOHAND.
Fix this by simply making ptrace_signal_deliver() a nop, and providing
a way for the debugger to control system call restarting properly:
1) Report a "in syscall" software bit in regs->{tstate,psr}.
It is set early on in trap entry to a system call and is fully
visible to the debugger via ptrace() and regsets.
2) Test this bit right before doing a syscall restart. We have
to do a final recheck right after get_signal_to_deliver() in
case the debugger cleared the bit during ptrace_stop().
3) Clear the bit in trap return so we don't accidently try to set
that bit in the real register.
As a result we also get a ptrace_{is,clear}_syscall() for sparc32 just
like sparc64 has.
M68K has this same exact bug, and is now the only other user of the
ptrace_signal_deliver hook. It needs to be fixed in the same exact
way as sparc.
Signed-off-by: David S. Miller <davem@davemloft.net>
Linus Torvalds [Sun, 11 May 2008 04:10:48 +0000 (21:10 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86:
x86: rdc: leds build/config fix
x86: sysfs cpu?/topology is empty in 2.6.25 (32-bit Intel system)
x86: revert commit 709f744 ("x86: bitops asm constraint fixes")
x86: restrict keyboard io ports reservation to make ipmi driver work
x86: fix fpu restore from sig return
x86: remove spew print out about bus to node mapping
x86: revert printk format warning change which is for linux-next
x86: cleanup PAT cpu validation
x86: geode: define geode_has_vsa2() even if CONFIG_MGEODE_LX is not set
x86: GEODE: cache results from geode_has_vsa2() and uninline
x86: revert geode config dependency
Linus Torvalds [Sun, 11 May 2008 03:58:02 +0000 (20:58 -0700)]
BKL: revert back to the old spinlock implementation
The generic semaphore rewrite had a huge performance regression on AIM7
(and potentially other BKL-heavy benchmarks) because the generic
semaphores had been rewritten to be simple to understand and fair. The
latter, in particular, turns a semaphore-based BKL implementation into a
mess of scheduling.
The attempt to fix the performance regression failed miserably (see the
previous commit 00b41ec2611dc98f87f30753ee00a53db648d662 'Revert
"semaphore: fix"'), and so for now the simple and sane approach is to
instead just go back to the old spinlock-based BKL implementation that
never had any issues like this.
This patch also has the advantage of being reported to fix the
regression completely according to Yanmin Zhang, unlike the semaphore
hack which still left a couple percentage point regression.
As a spinlock, the BKL obviously has the potential to be a latency
issue, but it's not really any different from any other spinlock in that
respect. We do want to get rid of the BKL asap, but that has been the
plan for several years.
These days, the biggest users are in the tty layer (open/release in
particular) and Alan holds out some hope:
"tty release is probably a few months away from getting cured - I'm
afraid it will almost certainly be the very last user of the BKL in
tty to get fixed as it depends on everything else being sanely locked."
so while we're not there yet, we do have a plan of action.
Tested-by: Yanmin Zhang <yanmin_zhang@linux.intel.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Andi Kleen <andi@firstfloor.org> Cc: Matthew Wilcox <matthew@wil.cx> Cc: Alexander Viro <viro@ftp.linux.org.uk> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sun, 11 May 2008 03:43:22 +0000 (20:43 -0700)]
Revert "semaphore: fix"
This reverts commit bf726eab3711cf192405d21688a4b21e07b6188a, as it has
been reported to cause a regression with processes stuck in __down(),
apparently because some missing wakeup.
Quoth Sven Wegener:
"I'm currently investigating a regression that has showed up with my
last git pull yesterday. Bisecting the commits showed bf726e
"semaphore: fix" to be the culprit, reverting it fixed the issue.
Symptoms: During heavy filesystem usage (e.g. a kernel compile) I get
several compiler processes in uninterruptible sleep, blocking all i/o
on the filesystem. System is an Intel Core 2 Quad running a 64bit
kernel and userspace. Filesystem is xfs on top of lvm. See below for
the output of sysrq-w."
See
http://lkml.org/lkml/2008/5/10/45
for full report.
In the meantime, we can just fix the BKL performance regression by
reverting back to the good old BKL spinlock implementation instead,
since any sleeping lock will generally perform badly, especially if it
tries to be fair.
Reported-by: Sven Wegener <sven.wegener@stealer.net> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sun, 11 May 2008 02:51:16 +0000 (19:51 -0700)]
Move ACCESS_ONCE() to <linux/compiler.h>
It actually makes much more sense there, and we do tend to need it for
non-RCU usage too. Moving it to <linux/compiler.h> will allow some
other cases that have open-coded the same logic to use the same helper
function that RCU has used.
x86: sysfs cpu?/topology is empty in 2.6.25 (32-bit Intel system)
System topology on intel based system needs to be exported
for non-numa case as well.
All parts of asm-i386/topology.h has come under
#ifdef CONFIG_NUMA after the merge to asm-x86/topology.h
/sys/devices/system/cpu/cpu?/topology/* is populated based on
ENABLE_TOPO_DEFINES
The sysfs cpu topology is not being populated on my dual socket
dual core xeon 5160 processor based (x86 32 bit) system.
CONFIG_NUMA is not set in my case yet the topology is relevant
and useful.
irqbalance daemon application depends on topology to build the
cpus and package list and it fails on Fedora9 beta since the
sysfs topology was not being populated in the 2.6.25 kernel.
I am not sure if it was intentional to not define ENABLE_TOPO_DEFINES
for non-numa systems.
This fix has been tested on the above mentioned dual core, dual socket
system.
709f744 causes my computer to freeze during the start up of X and my
login manger (GDM). It gets to the point where it has shown the default
X mouse cursor logo (a big X / cross) and does not respond to anything
from that point on.
This worked fine before 709f744, and it works fine with 709f744
reverted on top of Linus' current tree (f74d505). The revert had
conflicts, as far as I can tell due to white space changes. The diff I
ended up with is below.
It is 100% reproducible.
Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
x86: restrict keyboard io ports reservation to make ipmi driver work
On some of our (single board computer) boards (x86) we are using an
IPMI controller that uses I/O ports 0x62 and 0x66 for a KCS (keyboard
controller style) IPMI system interface.
Trying to load the openipmi driver fails, because the ports
(0x62/0x66) are reserved for keyboard. keyboard reserves the full
range 0x60-0x6F while it doesn't need to.
Reserve only ports 0x60 and 0x64 for the legacy PS/2 i8042 keyboad
controller instead of 0x60-0x6F to allow the openipmi driver to work.
[ tglx: added 64bit fixup ]
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Suresh Siddha [Wed, 7 May 2008 19:09:52 +0000 (12:09 -0700)]
x86: fix fpu restore from sig return
If the task never used fpu, initialize the fpu before restoring the FP
state from the signal handler context. This will allocate the fpu
state, if the task never needed it before.
Reported-and-bisected-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Tested-by: Eric Sesterhenn <snakebyte@gmx.de> Cc: Frederik Deweerdt <deweerdt@free.fr> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[ARM] 5033/1: Unbreak corgi_ssp by registering ssp drivers earlier.
A lot of stuff in spitz/akita/etc. depends on corgi_ssp to be initialised
early. However corgi_ssp initialisation fails, because at that time pxa*-ssp
devices don't have drivers. Move ssp earlier in the makefile so they are
registered before corgi-ssp.
Also move sleep/suspend and cpu-freq to more logical places
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Linus Torvalds [Fri, 9 May 2008 17:34:00 +0000 (10:34 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6: (21 commits)
Blackfin Serial Driver: abstract away DLAB differences into header
Blackfin Serial Driver: macro away the IER differences between processors
[Blackfin] arch: remove useless IRQ_SW_INT defines
[Blackfin] arch: protect linux/usb/musb.h include until the driver gets mainlined
[Blackfin] arch: protect linux/usb/isp1362.h include until the driver gets mainlined
[Blackfin] arch: add EBIU supporting for BF54x EZKIT SMSC LAN911x/LAN921x families embedded ethernet driver
[Blackfin] arch: Set spi flash partition on bf527 as like bf548.
[Blackfin] arch: fix bug - Remove module will not free L1 memory used
[Blackfin] arch: fix wrong header name in comment
[Blackfin] arch: Fix BUG - spi flash on bf527 ezkit would fail at mount
[Blackfin] arch: add twi_lcd and twi_keypad i2c board info to bf527-ezkit
[Blackfin] arch: Add physmap partition for BF527-EZkit
[Blackfin] arch: fix gdb testing regression
[Blackfin] arch: disable single stepping when delivering a signal
[Blackfin] arch: Delete unused (copied from m68k) entries in asm-offsets.c.
[Blackfin] arch: In the double fault handler, set up the PT_RETI slot
[Blackfin] arch: Support for CPU_FREQ and NOHZ
[Blackfin] arch: Functional power management support: Add CPU and platform voltage scaling support
[Blackfin] arch: fix bug - breaking the atomic sections code.
[Blackfin] arch: Equalize include files: Add VR_CTL masks
...
* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
[CIFS] fix build warning
[CIFS] Fixed build warning in is_ip
[CIFS] cleanup cifsd completion
[CIFS] Remove over-indented code in find_unc().
[CIFS] fix typo
[CIFS] Remove duplicate call to mode_to_acl
[CIFS] convert usage of implicit booleans to bool
[CIFS] fixed compatibility issue with samba refferal request
[CIFS] Fix statfs formatting
[CIFS] Adds to dns_resolver checking if the server name is an IP addr and skipping upcall in this case.
[CIFS] Fix spelling mistake
[CIFS] Update cifs version number
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (37 commits)
SH: catch negative denormal_subf1() retval in denormal_add()
sh: Fix DMAC base address for SH7709S
sh: update smc91x platform data for se7206.
sh: Stub in cpu_to_node() and friends for NUMA build.
sh: intc register modify fix
sh: no high level trigger on some sh3 cpus
sh: clean up sh7710 and sh7720 intc tables
sh: add interrupt ack code to sh3
sh: unify external irq pin code for sh3
sh-sci: avoid writing to nonexistent registers
sh-sci: sh7722 lacks scsptr registers
sh-sci: improve sh7722 support
sh: reset hardware from early printk
sh: drain and wait for early printk
sh: use sci_out() for early printk
sh: add memory resources to /proc/iomem
sh: add kernel bss resource
sh: fix sh7705 interrupt vector typo
sh: update smc91x platform data for se7722
sh: update smc91x platform data for MigoR
...
Linus Torvalds [Fri, 9 May 2008 15:06:31 +0000 (08:06 -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: (23 commits)
[POWERPC] Remove leftover printk in isa-bridge.c
[POWERPC] Remove duplicate #include
[POWERPC] Initialize lockdep earlier
[POWERPC] Document when printk is useable
[POWERPC] Fix bogus paca->_current initialization
[POWERPC] Fix of_i2c include for module compilation
[POWERPC] Make default cputable entries reflect selected CPU family
[POWERPC] spufs: lockdep annotations for spufs_dir_close
[POWERPC] spufs: don't requeue victim contex in find_victim if it's not in spu_run
[POWERPC] 4xx: Fix PCI mem in sequoia DTS
[POWERPC] 4xx: Add endpoint support to 4xx PCIe driver
[POWERPC] 4xx: Fix problem with new TLB storage attibute fields on 440x6 core
[POWERPC] spufs: spu_create should send inotify IM_CREATE event
[POWERPC] spufs: handle faults while the context switch pending flag is set
[POWERPC] spufs: fix concurrent delivery of class 0 & 1 exceptions
[POWERPC] spufs: try to route SPU interrupts to local node
[POWERPC] spufs: set SPU_CONTEXT_SWITCH_PENDING before synchronising SPU irqs
[POWERPC] spufs: don't acquire state_mutex interruptible while performing callback
[POWERPC] spufs: update master runcntl with context lock held
[POWERPC] spufs: fix post-stopped update of MFC_CNTL register
...
Rusty Russell [Fri, 9 May 2008 06:25:28 +0000 (16:25 +1000)]
module: don't ignore vermagic string if module doesn't have modversions
Linus found a logic bug: we ignore the version number in a module's
vermagic string if we have CONFIG_MODVERSIONS set, but modversions
also lets through a module with no __versions section for modprobe
--force (with tainting, but still).
We should only ignore the start of the vermagic string if the module
actually *has* crcs to check. Rather than (say) having an
entertaining hissy fit and creating a config option to work around the
buggy code.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Rusty Russell [Fri, 9 May 2008 06:24:21 +0000 (16:24 +1000)]
module: be more picky about allowing missing module versions
We allow missing __versions sections, because modprobe --force strips
it. It makes less sense to allow sections where there's no version
for a specific symbol the module uses, so disallow that.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Rusty Russell [Fri, 9 May 2008 06:23:17 +0000 (16:23 +1000)]
module: put modversions in vermagic
Don't allow a module built without versions altogether to be inserted
into a kernel which expects modversions.
modprobe --force will strip vermagic as well as modversions, so it
won't be effected, but this will make sure that a
non-CONFIG_MODVERSIONS module won't be accidentally inserted into a
CONFIG_MODVERSIONS kernel.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>