Archived
14
0
Fork 0
Commit graph

22806 commits

Author SHA1 Message Date
Michael Ellerman
af3b74df1b [POWERPC] Move xmon_irq() declaration into xmon.h
The typdef for irqreturn_t was moved into its own header a
while back, so there's no reason we can't move xmon_irq()
into xmon.h now.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-05-14 22:31:54 +10:00
Michael Ellerman
7d9e793463 [POWERPC] Add a declaration for xmon()
Usually we call xmon() via debugger(), so this could be static.
Sometimes when debugging it's nice to be able to call xmon()
directly though, so add a declaration.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-05-14 22:31:52 +10:00
Michael Ellerman
572fb578de [POWERPC] Move declaration of tce variables into mmu-hash64.h
... instead of having extern declarations in a .c file.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-05-14 22:31:47 +10:00
Michael Ellerman
5f25f06529 [POWERPC] Move declaration of init_bootmem_done into system.h
... instead of having an extern declaration in a .c file.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-05-14 22:31:44 +10:00
Kumar Gala
663276b7c6 [POWERPC] Set lower flag bits in regs->trap to indicate debug level exception
We use the low bits of regs->trap as flag bits.  We already indicate
critical and machine check level exceptions via this mechanism.  Extend it
to indicate debug level exceptions.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-05-14 22:31:37 +10:00
Roland McGrath
7a10174eea [POWERPC] Define and use TLF_RESTORE_SIGMASK
Replace TIF_RESTORE_SIGMASK with TLF_RESTORE_SIGMASK and define
our own set_restore_sigmask() function.  This saves the costly
SMP-safe set_bit operation, which we do not need for the sigmask
flag since TIF_SIGPENDING always has to be set too.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-05-14 22:31:33 +10:00
Linus Torvalds
c714a534d8 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.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-05-12 13:34:13 -07:00
Linus Torvalds
9404ef0297 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).

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-05-12 10:14:22 -07:00
Linus Torvalds
2b753a1599 Merge git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-inttypes
* git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-inttypes:
  types: s390: fix #ifdef reversal in <asm-s390/types.h>
2008-05-12 09:07:56 -07:00
Linus Torvalds
8d97b84935 Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (28 commits)
  [MIPS] Pb1000: bury the remnants of the PCI code
  [MIPS] Fix build failure in mips oprofile code
  [MIPS] fix warning message on SMP kernels
  [MIPS] markeins: build fix
  [MIPS] ELF handling - use SELFMAG instead of numeric constant
  [MIPS] Get rid of __ilog2
  [MIPS] Fix __fls for non-MIPS32/MIPS64 cpus
  [MIPS] XXS1500 code style cleanup
  [MIPS] MTX-1 code style cleanup
  [MIPS] Pb1200/DBAu1200 code style cleanup
  [MIPS] Pb1550 code style cleanup
  [MIPS] Pb1500 code style cleanup
  [MIPS] Pb1100 code style cleanup
  [MIPS] Pb1000 code style cleanup
  [MIPS] DBAu1xx0 code style cleanup
  [MIPS] Alchemy PCI code style cleanup
  [MIPS] Alchemy common code style cleanup
  [MIPS] Alchemy common headers style cleanup
  [MIPS] Add empty argument parenthesis to GCC_IMM_ASM
  [MIPS] msp_hwbutton.c: minor irq handler cleanups
  ...
2008-05-12 09:03:42 -07:00
H. Peter Anvin
2ccdcfeeca types: s390: fix #ifdef reversal in <asm-s390/types.h>
The #ifdef for the integer types was reversed; the standard pattern in
these files are:

#ifndef __s390x__
/* 32-bit code */
#else
/* 64-bit code */
#endif

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>
2008-05-12 08:49:59 -07:00
Ralf Baechle
ddc0d00994 [MIPS] Get rid of __ilog2
56a6b1eb7b was a bit too conservative and
left __ilog2 around which is only used as an internal function for other
bitops.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-05-12 16:46:55 +01:00
Thomas Bogendoerfer
fcd84f2fca [MIPS] Fix __fls for non-MIPS32/MIPS64 cpus
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>
2008-05-12 16:46:55 +01:00
Sergei Shtylyov
c3d1d5c8c1 [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>
2008-05-12 16:46:55 +01:00
Sergei Shtylyov
6afabe6c93 [MIPS] Pb1550 code style cleanup
Fix a few errors and warnings given by checkpatch.pl:

- 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.

In addition to these changes, also do the following:

- replace numeric literals with the matching macros;

- properly indent the code and the array initializers;

- insert spaces between operator and its operands, also remove excess spaces
  there;

- remove space after the type cast's closing parenthesis;

- insert missing space before closing brace in the array initializers;

- replace spaces after the macro name with tabs in the #define directives, also
  sometimes insert space there for better looks;

- remove excess tabs after the macro name in the #define directives;

- fix typos/errors, capitalize acronyms, etc. in the comments;

- make the multi-line comment style consistent with the kernel style elsewhere
  by adding empty first line;

- 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>
2008-05-12 16:46:55 +01:00
Sergei Shtylyov
2091a17ff7 [MIPS] Pb1500 code style cleanup
Fix several errors and warnings given by checkpatch.pl:

- use of C99 // comments;

- printk() without KERN_* facility level;

- unnecessary braces for single-statement block;

- using simple_strtol() where strict_strtol() could be used.

In addition to these changes, also do the following:

- replace numeric literals/expressions with the matching macros;

- insert spaces between operator and its operands;

- properly indent the code and the array initializers;

- remove useless #if dirctive from board_setup();

- remove needless parentheses;

- remove unneeded type casts;

- remove excess new lines;

- make hexadecimal literals all lower case;

- remove space after the type cast's closing parenthesis;

- insert missing space before closing brace in the array initializers;

- replace spaces after the macro name with tabs in the #define directives,
  also sometimes insert space there for better looks;

- fix typos/errors, capitalize acronyms, etc. in the 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>
2008-05-12 16:46:54 +01:00
Sergei Shtylyov
be1c3c1ed1 [MIPS] Pb1100 code style cleanup
Fix several errors and warnings given by checkpatch.pl:

- space between asterisk and variable name;

- use of C99 // comments;

- using simple_strtol() where strict_strtol() could be used.

In addition to these changes, also do the following:

- properly indent the code;

- remove space after the type cast's closing parenthesis;

- replace numeric literals/expressions with the matching macros;

- replace spaces after the macro name with tabs in the #define directives,
  and sometimes insert spaces there;

- fix typos/errors, capitalize acronyms, etc. in the comments;

- make the multi-line comment style consistent with the kernel style
  elsewhere by adding empty first line;

- 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>
2008-05-12 16:46:54 +01:00
Sergei Shtylyov
7916c3548e [MIPS] Pb1000 code style cleanup
Fix several errors and warnings given by checkpatch.pl:

- use of C99 // comments;

- brace not on the same line with condition in the 'switch' statement;

- printk() without KERN_* facility level;

- unnecessary braces for single-statement block;

- using simple_strtol() where strict_strtol() could be used.

In addition to these changes, also do the following:

- properly indent the 'switch' statement;

- remove needless parentheses;

- insert spaces between operator and its operands;

- replace numeric literals/expressions with the matching macros;

- remove useless #if dirctive from board_setup();

- remove unneeded numeric literal type casts;

- remove space after the type cast's closing parenthesis;

- replace spaces after the macro name with tabs in the #define directives, and
  sometimes insert spaces there;

- remove excess new lines;

- fix typos/errors, capitalize acronyms, etc. in the comments;

- make the multi-line comment style consistent with the kernel style elsewhere
  by adding empty first/last line;

- 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>
2008-05-12 16:46:54 +01:00
Sergei Shtylyov
abd14cc00d [MIPS] DBAu1xx0 code style cleanup
Fix several errors and warnings given by checkpatch.pl:

- macros with complex values not enclosed in parentheses;

- leading spaces instead of tabs;

- printk() without KERN_* facility level;

- using simple_strtol() where strict_strtol() could be used;

- line over 80 characters.

In addition to these changes, also do the following:

- initialize variable instead of assigning value later where it makes sense;

- insert spaces between operator and its operands, also remove excess spaces
  there;

- remove unneeded numeric literal type casts;

- remove needless parentheses;

- remove space after the type cast's closing parenthesis;

- insert missing space before closing brace in the array initializers;

- replace spaces after the macro name with tabs in the #define directives;

- remove excess tabs after the macro name in the #define directives;

- fix typos/errors, capitalize acronyms, etc. in the comments;

- make the multi-line comment style consistent with the kernel style elsewhere
  by adding empty first/last line;

- 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>
2008-05-12 16:46:53 +01:00
Sergei Shtylyov
ff6814d530 [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>
2008-05-12 16:46:52 +01:00
Ralf Baechle
ad1d77a385 [MIPS] Add empty argument parenthesis to GCC_IMM_ASM
This is to clarify that GCC_IMM_ASM does not take an argument as the
context of the macro's invocation seems to imply.

As suggested by Maciej W. Rozycki (macro@linux-mips.org).

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-05-12 16:46:52 +01:00
Kevin D. Kissell
1928cc84a0 [MIPS] MT: Functional fixes and a little reformatting of APRP support
Signed-off-by: Kevin D. Kissell <kevink@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-05-12 16:46:51 +01:00
Linus Torvalds
3c29970c02 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
2008-05-12 07:29:08 -07:00
Linus Torvalds
59b1c82500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sparc64: Work around memory probing bug in openfirmware.
  sparc32: fix rtrap.S typo
  sparc32: Fix build.
2008-05-12 07:28:37 -07:00
Paul Mackerras
0d4b6b901c [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.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-05-12 22:57:51 +10:00
Linus Torvalds
5701412351 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
2008-05-11 17:09:24 -07:00
Linus Torvalds
c3921ab715 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
02b67cc3ba "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.

Also make fs/locks.c use it.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-05-11 16:04:48 -07:00
Robert Reif
b5e10df665 sparc32: Fix build.
Fix sparc32 build error due to undefined bool type.

CC [M] fs/ocfs2/dlm/userdlm.o
In file included from include/asm/sigcontext.h:6,
from include/asm/signal.h:5,
from include/linux/signal.h:4,
from fs/ocfs2/dlm/userdlm.c:30:
include/asm/ptrace.h:42: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ before ‘pt_regs_is_syscall’
include/asm/ptrace.h:47: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ before ‘pt_regs_clear_syscall’
make[3]: *** [fs/ocfs2/dlm/userdlm.o] Error 1
make[2]: *** [fs/ocfs2/dlm] Error 2
make[1]: *** [fs/ocfs2] Error 2
make: *** [fs] Error 2

Signed-off-by: Robert Reif <reif@earthlink.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-05-11 15:47:05 -07:00
Jean Delvare
ae429083ef 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.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-05-11 20:37:06 +02:00
Jean Delvare
60b129d7bf 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.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-05-11 20:37:06 +02:00
Linus Torvalds
854a989546 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sparc: Fix debugger syscall restart interactions.
  sparc: Fix ptrace() detach.
  sparc32: Don't twiddle PT_DTRACE in exec.
  sparc video: remove open boot prom code
2008-05-11 09:55:48 -07:00
Linus Torvalds
633331f389 Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  [libata] revert new check-ready Status register logic
2008-05-11 09:52:45 -07:00
David S. Miller
28e6103665 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>
2008-05-11 02:07:19 -07:00
David S. Miller
986bef854f sparc: Fix ptrace() detach.
Forever we had a PTRACE_SUNOS_DETACH which was unconditionally
recognized, regardless of the personality of the process.

Unfortunately, this value is what ended up in the GLIBC sys/ptrace.h
header file on sparc as PTRACE_DETACH and PT_DETACH.

So continue to recognize this old value.  Luckily, it doesn't conflict
with anything we actually care about.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-05-11 01:59:05 -07:00
Linus Torvalds
5bb7ff795f Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 5033/1: Unbreak corgi_ssp by registering ssp drivers earlier.
  [ARM] Orion: clean up addr-map.c after window setting code purge
  [ARM] Orion: pass proper t_clk into mv643xx_eth
  [ARM] Orion: use mv643xx_eth driver mbus window handling
  [ARM] pxa: Fix RCSR handling
  [ARM] lubbock: fix compilation
  [ARM] 5032/1: Added cpufreq support for pxa27x CPU
  [ARM] 5031/1: Indentation correction in cpu-pxa.c.
  [ARM] 5028/1: pxafb: fix broken "backward compatibility way" in framebuffer
  [ARM] 4882/2: Correction for S3C2410 clkout generation
  [ARM] 5027/1: Fixed random memory corruption on pxa suspend cycle.
  [ARM] 5024/1: Fix some minor clk issues in the MMCI PL18x driver
  [ARM] 5023/1: Fix broken gpio interrupts on ep93xx
  ns9xxx: fix sparse warning
  ns9xxx: check for irq lockups
  ns9xxx: fix handle_prio_irq to unmask irqs with lower priority
2008-05-10 21:14:05 -07:00
Linus Torvalds
3e1b83ab39 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
2008-05-10 21:10:48 -07:00
Linus Torvalds
8e3e076c5a 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 00b41ec261 '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>
2008-05-10 20:58:02 -07:00
Linus Torvalds
39f004ba27 Make <asm-x86/spinlock.h> use ACCESS_ONCE()
..instead of cooking up its own uglier local version of it.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-05-10 19:52:43 -07:00
Linus Torvalds
9c3cdc1f83 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.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-05-10 19:51:16 -07:00
Vaidyanathan Srinivasan
5c3a121d52 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.

Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@kernel.org
2008-05-10 19:31:45 +02:00
Simon Holm Thøgersen
eb2b4e682a x86: revert commit 709f744 ("x86: bitops asm constraint fixes")
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>
2008-05-10 19:31:45 +02:00
Suresh Siddha
fd3c3ed5d1 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>
2008-05-10 19:31:45 +02:00
Russell King
1f2ee6496b Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/nico/orion into fixes 2008-05-09 23:24:09 +01:00
Jeff Garzik
005b1f7495 [libata] revert new check-ready Status register logic
This behavior differs across multiple controllers, so we cannot use
common logic for all controllers.

Revert back to the basic common behavior, and specific drivers will
be updated from here to take into account the unusual Status return
values.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-05-09 15:00:55 -04:00
Linus Torvalds
3ed43c745d 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
  ...
2008-05-09 10:34:00 -07:00
Linus Torvalds
a9545ee3c8 Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* 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
  ...
2008-05-09 08:07:58 -07:00
Linus Torvalds
d9a9a23ff2 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
  ...
2008-05-09 08:06:31 -07:00
Rusty Russell
6c2545eeff 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>
2008-05-09 07:45:18 -07:00
Jochen Friedrich
8af302e2dc [POWERPC] Fix of_i2c include for module compilation
Remove #ifdef CONFIG_OF_I2C as this breaks module compilation.
Drivers using this header should depend on OF_I2C anyways, so
there's no need to make this conditional.

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-05-09 20:22:58 +10:00
Paul Mackerras
2a5f2e3e6c Merge branch 'for-2.6.26' of master.kernel.org:/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx into merge 2008-05-09 20:12:06 +10:00