sfrench/cifs-2.6.git
16 years agoSmack: unlabeled outgoing ambient packets
Casey Schaufler [Fri, 15 Feb 2008 23:24:25 +0000 (15:24 -0800)]
Smack: unlabeled outgoing ambient packets

Smack uses CIPSO labeling, but allows for unlabeled packets by
specifying an "ambient" label that is applied to incoming unlabeled
packets.

Because the other end of the connection may dislike IP options, and ssh
is one know application that behaves thus, it is prudent to respond in
kind.

This patch changes the network labeling behavior such that an outgoing
packet that would be given a CIPSO label that matches the ambient label
is left unlabeled.  An "unlbl" domain is added and the netlabel
defaulting mechanism invoked rather than assuming that everything is
CIPSO.  Locking has been added around changes to the ambient label as
the mechanisms used to do so are more involved.

Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Acked-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agox86: fix page_is_ram() thinko
Arjan van de Ven [Mon, 18 Feb 2008 17:58:45 +0000 (09:58 -0800)]
x86: fix page_is_ram() thinko

page_is_ram() has a special case for the 640k-1M bios area, however
due to a thinko the special case checks the e820 table entry and
not the memory the user has asked for. This patch fixes the bug.

[ mingo@elte.hu: this too is better solved in the e820 space, but those
  fixes are too intrusive for v2.6.25. ]

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: fix WARN_ON() message: teach page_is_ram() about the special 4Kb bios data page
Arjan van de Ven [Mon, 18 Feb 2008 17:54:33 +0000 (09:54 -0800)]
x86: fix WARN_ON() message: teach page_is_ram() about the special 4Kb bios data page

This patch teaches page_is_ram() about the fact that the first
4Kb of memory are special on x86, even though the E820 table
normally doesn't exclude it.

This fixes the WARN_ON() reported by Laurent Riffard who was also
very helpful in diagnosing the issue.

[ mingo@elte.hu: we are working on doing this properly in the e820
  space, but for 2.6.25 this is the better fix. ]

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: i8259A: remove redundant irq_descinitialization
Ahmed S. Darwish [Sun, 17 Feb 2008 22:59:54 +0000 (00:59 +0200)]
x86: i8259A: remove redundant irq_descinitialization

Remove redundant irq_desc[NR_IRQS] element initialization in
init_ISA_irqs(). irq_desc[NR_IRQS] is already statically
initialized with the same values in kernel/irq/handle.c .

besides the clean-up value this also saves some space:

      text    data     bss     dec     hex filename
      1389     356      14    1759     6df i8259_32.o.before
      1325     356      14    1695     69f i8259_32.o.after

Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: fix vdso_install breaks user "make install"
Sam Ravnborg [Sat, 16 Feb 2008 11:36:10 +0000 (12:36 +0100)]
x86: fix vdso_install breaks user "make install"

I suggest to make the vdso_install step independent as
in following patch.

This solves the issue at ahnd and still gives us the posibility
to install the files should they be needed.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: change IO delay back to 0x80
Ingo Molnar [Sun, 17 Feb 2008 19:20:24 +0000 (20:20 +0100)]
x86: change IO delay back to 0x80

change back the IO delay to 0x80.

Alan says that 0xed is known to break some older boxes, and given that
the get-rid-of-outb-APIs efforts are well underway we should just let
them be finished.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: lds - Use THREAD_SIZE instead of numeric constant
Cyrill Gorcunov [Sun, 17 Feb 2008 15:17:18 +0000 (18:17 +0300)]
x86: lds - Use THREAD_SIZE instead of numeric constant

Though we use PDA for regular task stack but that
is not acceptable for init_task wich is special
one. We still have to allocate init_task's stack
in that manner.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: lds - Use PAGE_SIZE instead of numeric constant
Cyrill Gorcunov [Sun, 17 Feb 2008 15:17:17 +0000 (18:17 +0300)]
x86: lds - Use PAGE_SIZE instead of numeric constant

It's much better to use PAGE_SIZE then magic 4096
(though it's almost synonym in most cases on x86 but
not for *all* cases ;)

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86 cleanup: suspend_asm_64.S - use X86_CR4_PGE instead of numeric value
Cyrill Gorcunov [Fri, 8 Feb 2008 21:49:13 +0000 (00:49 +0300)]
x86 cleanup: suspend_asm_64.S - use X86_CR4_PGE instead of numeric value

By including <asm/processor-flags.h> we're allowed to use
X86_CR4_PGE instead of numeric constant.

md5 sums of compiled files are differ due to this inclusion
but .text section remains the same.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: docs fixes to Documentation/i386/IO-APIC.txt
Nick Andrew [Sun, 17 Feb 2008 07:01:42 +0000 (18:01 +1100)]
x86: docs fixes to Documentation/i386/IO-APIC.txt

Clean up spelling and grammar of IO-APIC.txt

Signed-off-by: Nick Andrew <nick@nick-andrew.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: fix printout ugliness in cpu info printk
Marcin Slusarz [Fri, 1 Feb 2008 20:31:51 +0000 (21:31 +0100)]
x86: fix printout ugliness in cpu info printk

fix print_cpu_info, because it produced on boot:

  CPU: <6>AMD Athlon(tm) 64 Processor 3200+ stepping 00

instead of:

  CPU: AMD Athlon(tm) 64 Processor 3200+ stepping 00

(broken since 04e1ba852132c9ad006affcd5b8c8606295170b0 -
 x86: cleanup kernel/setup_64.c)

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: clean up csum-wrappers_64.c some more
Ingo Molnar [Sun, 17 Feb 2008 15:48:25 +0000 (16:48 +0100)]
x86: clean up csum-wrappers_64.c some more

no code changed:

arch/x86/lib/csum-wrappers_64.o:
   text    data     bss     dec     hex filename
    839       0       0     839     347 csum-wrappers_64.o.before
    839       0       0     839     347 csum-wrappers_64.o.after
md5:
b31994226c33e0b52bef5a0e110b84b0  csum-wrappers_64.o.before.asm
b31994226c33e0b52bef5a0e110b84b0  csum-wrappers_64.o.after.asm

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: coding style fixes in arch/x86/lib/csum-wrappers_64.c
Paolo Ciarrocchi [Sun, 17 Feb 2008 13:56:50 +0000 (14:56 +0100)]
x86: coding style fixes in arch/x86/lib/csum-wrappers_64.c

no code changed:

arch/x86/lib/csum-wrappers_64.o:
   text    data     bss     dec     hex filename
    839       0       0     839     347 csum-wrappers_64.o.before
    839       0       0     839     347 csum-wrappers_64.o.after
md5:
b31994226c33e0b52bef5a0e110b84b0  csum-wrappers_64.o.before.asm
b31994226c33e0b52bef5a0e110b84b0  csum-wrappers_64.o.after.asm

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: coding style fixes in arch/x86/lib/io_64.c
Paolo Ciarrocchi [Sun, 17 Feb 2008 13:41:16 +0000 (14:41 +0100)]
x86: coding style fixes in arch/x86/lib/io_64.c

This simple patch makes the file error free (according to
checkpatch.pl)

no code changed:

arch/x86/lib/io_64.o:
   text    data     bss     dec     hex filename
    308       0       0     308     134 io_64.o.before
    308       0       0     308     134 io_64.o.after
md5:
3c64f9ed83d091678e849b36ca27bee3  io_64.o.before.asm
3c64f9ed83d091678e849b36ca27bee3  io_64.o.after.asm

Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: exclude vsyscall files from stackprotect
Ingo Molnar [Thu, 14 Feb 2008 07:38:49 +0000 (08:38 +0100)]
x86: exclude vsyscall files from stackprotect

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: add pgd_large() on 64-bit, for consistency
H. Peter Anvin [Tue, 19 Feb 2008 15:18:32 +0000 (16:18 +0100)]
x86: add pgd_large() on 64-bit, for consistency

In order to have it at all levels, add pgd_large() which only
returns 0.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: minor cleanup of comments in processor.h
Mike Travis [Fri, 8 Feb 2008 23:37:42 +0000 (15:37 -0800)]
x86: minor cleanup of comments in processor.h

Signed-off-by: Mike Travis <travis@sgi.com>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: Jack Steiner <steiner@sgi.com>
Cc: linux-mm@kvack.org
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: annotate pci/common.s:pci_scan_bus_with_sysdata with __devinit
Sam Ravnborg [Sun, 17 Feb 2008 12:23:00 +0000 (13:23 +0100)]
x86: annotate pci/common.s:pci_scan_bus_with_sysdata with __devinit

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: fix section mismatch in head_64.S:initial_code
Sam Ravnborg [Sun, 17 Feb 2008 12:22:59 +0000 (13:22 +0100)]
x86: fix section mismatch in head_64.S:initial_code

initial_code are initially used to hold a function pointer
from __init and later from __cpuinit. This confuses modpost
and changing initial_code to REFDATA silence the warning.
(But now we do not discard the variable anymore).

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: fix section mismatch in srat_64.c:reserve_hotadd
Sam Ravnborg [Sun, 17 Feb 2008 12:22:58 +0000 (13:22 +0100)]
x86: fix section mismatch in srat_64.c:reserve_hotadd

reserve_hotadd() are only used by __init acpi_numa_memory_affinity_init().
Annotate reserve_hotadd() with __init is the trivial fix.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: fix section mismatch warning in topology.c:arch_register_cpu
Sam Ravnborg [Sun, 17 Feb 2008 12:22:49 +0000 (13:22 +0100)]
x86: fix section mismatch warning in topology.c:arch_register_cpu

arch_register_cpu() is only defined for HOTPLUG_CPU code
so simple fix is to ignore references by annotating the
function __ref.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: fix section mismatch in setup_64.c:srat_detect_node
Sam Ravnborg [Sun, 17 Feb 2008 12:22:47 +0000 (13:22 +0100)]
x86: fix section mismatch in setup_64.c:srat_detect_node

srat_detect_node() is only used by __cpuinit init_intel().
So the trivial fix is to annotate srat_detect_node() with __cpuinit.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: fix section mismatch warning in setup_64.c:nearby_node
Sam Ravnborg [Sun, 17 Feb 2008 12:22:46 +0000 (13:22 +0100)]
x86: fix section mismatch warning in setup_64.c:nearby_node

nearby_node() were only used by __cpuinit amd_detect_cmp()
So annotating nearby_node() __cpuinit was the trivial fix.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: fix compile warning building without CONFIG_SYSCTL
Li Zefan [Sun, 3 Feb 2008 07:40:30 +0000 (15:40 +0800)]
x86: fix compile warning building without CONFIG_SYSCTL

arch/x86/kernel/nmi_64.c:50: warning: 'unknown_nmi_panic_callback' declared 'static' but never defined

This patch also fixes nmi_32.c

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: CPA: remove BUG_ON for LRU/Compound pages
Andi Kleen [Mon, 11 Feb 2008 09:50:21 +0000 (10:50 +0100)]
x86: CPA: remove BUG_ON for LRU/Compound pages

New implementation does not use lru for anything so there is no need
to reject pages that are in the LRU. Similar for compound pages (which
were checked because they also use page->lru)

[ tglx@linutronix.de: removed unused variable ]

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: don't make swapper_pg_fixmap global
Adrian Bunk [Wed, 13 Feb 2008 21:29:55 +0000 (23:29 +0200)]
x86: don't make swapper_pg_fixmap global

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Ian Campbell <ijc@hellion.org.uk>
Cc: hpa@zytor.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: don't make irq_return global
Adrian Bunk [Wed, 13 Feb 2008 21:29:53 +0000 (23:29 +0200)]
x86: don't make irq_return global

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: hpa@zytor.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: unexport io_delay_type
Adrian Bunk [Wed, 13 Feb 2008 21:29:42 +0000 (23:29 +0200)]
x86: unexport io_delay_type

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: hpa@zytor.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: make mxcsr_feature_mask static again
Adrian Bunk [Wed, 13 Feb 2008 21:29:33 +0000 (23:29 +0200)]
x86: make mxcsr_feature_mask static again

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Roland McGrath <roland@redhat.com>
Cc: hpa@zytor.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: sparse warning in efi.c
Harvey Harrison [Wed, 13 Feb 2008 21:26:13 +0000 (13:26 -0800)]
x86: sparse warning in efi.c

Yes, it should.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: sparse error in efi_32.c
Harvey Harrison [Wed, 13 Feb 2008 21:26:39 +0000 (13:26 -0800)]
x86: sparse error in efi_32.c

arch/x86/kernel/efi_32.c:42:6: warning: symbol 'efi_call_phys_prelog' was not declared. Should it be static?
arch/x86/kernel/efi_32.c:84:6: warning: symbol 'efi_call_phys_epilog' was not declared. Should it be static?

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86, kprobes: remove sparse warnings from x86
Harvey Harrison [Thu, 14 Feb 2008 23:23:53 +0000 (15:23 -0800)]
x86, kprobes: remove sparse warnings from x86

arch/x86/kernel/kprobes.c:584:16: warning: symbol 'kretprobe_trampoline_holder' was not declared. Should it be static?
arch/x86/kernel/kprobes.c:676:6: warning: symbol 'trampoline_handler' was not declared. Should it be static?

Make them static and add the __used attribute, approach taken from the
arm kprobes implementation.

kretprobe_trampoline_holder uses inline assemly to define the global
symbol kretprobe_trampoline, but nothing ever calls the holder explicitly.

trampoline handler is only called from inline assembly in the same file,
mark it used and static.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Acked-by: Masami Hiramatsu <mhiramat@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agoremove mca-pentium
Adrian Bunk [Thu, 14 Feb 2008 21:23:37 +0000 (23:23 +0200)]
remove mca-pentium

This patch removes the mca-pentium boot option that was a noop.

besides the source code cleanup factor, this saves some text as well:

   arch/x86/kernel/cpu/bugs.o:
      text    data     bss     dec     hex filename
       651      77       4     732     2dc bugs.o.before
       631      53       4     688     2b0 bugs.o.after

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years ago[S390] qdio: FCP/SCSI write I/O stagnates on LPAR
Ursula Braun [Tue, 19 Feb 2008 14:29:35 +0000 (15:29 +0100)]
[S390] qdio: FCP/SCSI write I/O stagnates on LPAR

If running on LPAR, qdio might overlook an incoming buffer in certain
scenarios. The patch makes sure that incoming buffers are detected
immediately in all situations.

Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
16 years ago[S390] Fix futex_atomic_cmpxchg_std inline assembly.
Heiko Carstens [Tue, 19 Feb 2008 14:29:34 +0000 (15:29 +0100)]
[S390] Fix futex_atomic_cmpxchg_std inline assembly.

Add missing exception table entry so that the kernel can handle
proctection exceptions as well on the cs instruction. Currently only
specification exceptions are handled correctly.
The missing entry allows user space to crash the kernel.

Cc: stable <stable@kernel.org>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
16 years ago[S390] dcss: Fix Unlikely(x) != y
Roel Kluin [Tue, 19 Feb 2008 14:29:33 +0000 (15:29 +0100)]
[S390] dcss: Fix Unlikely(x) != y

Fix Unlikely(x) != y

Cc: Gerald Schaefer <geraldsc@de.ibm.com>
Cc: Stefan Weinhuber <wein@de.ibm.com>
Cc: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
16 years ago[S390] sclp: clean up send/receive naming scheme
Peter Oberparleiter [Tue, 19 Feb 2008 14:29:32 +0000 (15:29 +0100)]
[S390] sclp: clean up send/receive naming scheme

Make state change events adjust the correct mask by cleaning up
naming inconsistencies. Also remove chance for lockup by removing
unnecessary mask related check before reading events.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
16 years ago[S390] etr: fix compile error on !SMP
Heiko Carstens [Tue, 19 Feb 2008 14:29:31 +0000 (15:29 +0100)]
[S390] etr: fix compile error on !SMP

Since a5fbb6d1064be885d2a6b82f625186753cf74848
"KVM: fix !SMP build error" smp_call_function isn't a define anymore
that folds into nothing but a define that calls up_smp_call_function
with all parameters. Hence we cannot #ifdef out the unused code
anymore...
This seems to be the preferred method, so do this for s390 as well.

arch/s390/kernel/time.c: In function 'etr_sync_clock':
arch/s390/kernel/time.c:825: error: 'clock_sync_cpu_start' undeclared
arch/s390/kernel/time.c:862: error: 'clock_sync_cpu_end' undeclared

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
16 years ago[S390] qdio: fix qdio_activate timeout handling.
Heiko Carstens [Tue, 19 Feb 2008 14:29:30 +0000 (15:29 +0100)]
[S390] qdio: fix qdio_activate timeout handling.

Current code in qdio_activate waits for at least 5 seconds
until it returns. It may return earlier if an error occurs,
but not if everything is ok. This large timeout value
became visible with commit dfa77f611ff295598e218aa0eb6efa73a5cf26d0
"qdio: set QDIO_ACTIVATE_TIMEOUT to 5s", which intended to
fix the timeout value which was zero. In turn setting an
FCP adapter online took 5 seconds.

In practice waiting for 5ms before continuing is sufficient
as pointed out by Utz Bacher and Cornelia Huck.

Cc: Utz Bacher <utz.bacher@de.ibm.com>
Cc: Jan Glauber <jan.glauber@de.ibm.com>
Cc: Ursula Braun <braunu@de.ibm.com>
Cc: Martin Peschke <mp3@de.ibm.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
16 years ago[S390] Initialize per cpu lowcores on cpu hotplug.
Heiko Carstens [Tue, 19 Feb 2008 14:29:29 +0000 (15:29 +0100)]
[S390] Initialize per cpu lowcores on cpu hotplug.

Just copy the first 512 read-only bytes of the current cpu lowcore if
a new cpu gets onlined. The rest is zeroed out and must be explicitly
initialized. Current code just copies the entire lowcore and
initializes the needed fields.
This should reveal bugs in future enhancements quite early.
Also when the lowcore of the first cpu is replaced this is now done
atomically (no interrupts, no machine checks).

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
16 years ago[S390] find bit corner case.
Martin Schwidefsky [Tue, 19 Feb 2008 14:29:28 +0000 (15:29 +0100)]
[S390] find bit corner case.

Fix [ext2_]find_first_[zero_]bit for the corner case of an all clear
or all set bit field by always handling that last word of the bit field
with __ffz_word/__ffs_word.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
16 years ago[S390] dasd: fix locking in __dasd_device_process_final_queue
Stefan Weinhuber [Tue, 19 Feb 2008 14:29:27 +0000 (15:29 +0100)]
[S390] dasd: fix locking in __dasd_device_process_final_queue

After setting the status of the cqr and releasing the lock for the
block cqr queue, we call the cqr callback function, which will usually
just trigger the dasd_block_tasklet. But when the tasklet is already
running the cqr might be processed before we invoke the callback
function. In rare cases the callback pointer may already be invalid
by the time we want to call it, which will result in a panic.
Solution: Call the callback function first and then release the lock.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
16 years ago[S390] Make sure enabled wait psw is loaded in default_idle.
Heiko Carstens [Tue, 19 Feb 2008 14:29:26 +0000 (15:29 +0100)]
[S390] Make sure enabled wait psw is loaded in default_idle.

If both NO_IDLE_HZ and VIRT_TIMER are disabled default_idle won't load
an enabled wait psw and busy loop instead. This is because the
idle_chain is empty and the return value of atomic_notifier_call_chain
will be NOTIFY_DONE, which causes default_idle to return instead of
loading an enabled wait psw.
Fix this by calling __atomic_notifier_call_chain instead and add proper
return value handling.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
16 years ago[S390] Let NR_CPUS default to 32/64 on s390/s390x.
Heiko Carstens [Tue, 19 Feb 2008 14:29:25 +0000 (15:29 +0100)]
[S390] Let NR_CPUS default to 32/64 on s390/s390x.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
16 years ago[S390] cio: Do timed recovery on workqueue.
Cornelia Huck [Tue, 19 Feb 2008 14:29:24 +0000 (15:29 +0100)]
[S390] cio: Do timed recovery on workqueue.

We can't do our recovery in softirq context, so we schedule it from
our timer function.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
16 years ago[S390] cio: Remember to initialize recovery_lock.
Cornelia Huck [Tue, 19 Feb 2008 14:29:23 +0000 (15:29 +0100)]
[S390] cio: Remember to initialize recovery_lock.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
16 years agolibata: implement drain buffers
James Bottomley [Tue, 19 Feb 2008 10:36:57 +0000 (11:36 +0100)]
libata: implement drain buffers

This just updates the libata slave configure routine to take advantage
of the block layer drain buffers.  It also adjusts the size lengths in
the atapi code to add the drain buffer to the DMA length so the driver
knows it can rely on it.

I suspect I should also be checking for AHCI as well as ATA_DEV_ATAPI,
but I couldn't see how to do that easily.

tj: * atapi_drain_needed() added such that draining is applied to only
      misc ATAPI commands.
    * q->bounce_gfp used when allocating drain buffer.
    * Now duplicate ATAPI PIO drain logic dropped.
    * ata_dev_printk() used instead of sdev_printk().

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agolibata: eliminate the home grown dma padding in favour of
James Bottomley [Tue, 19 Feb 2008 10:36:56 +0000 (11:36 +0100)]
libata: eliminate the home grown dma padding in favour of

that provided by the block layer

ATA requires that all DMA transfers begin and end on word boundaries.
Because of this, a large amount of machinery grew up in ide to adjust
scatterlists on this basis.  However, as of 2.5, the block layer has a
dma_alignment variable which ensures both the beginning and length of a
DMA transfer are aligned on the dma_alignment boundary.  Although the
block layer does adjust the beginning of the transfer to ensure this
happens, it doesn't actually adjust the length, it merely makes sure
that space is allocated for transfers beyond the declared length.  The
upshot of this is that scatterlists may be padded to any size between
the actual length and the length adjusted to the dma_alignment safely
knowing that memory is allocated in this region.

Right at the moment, SCSI takes the default dma_aligment which is on a
512 byte boundary.  Note that this aligment only applies to transfers
coming in from user space.  However, since all kernel allocations are
automatically aligned on a minimum of 32 byte boundaries, it is safe to
adjust them in this manner as well.

tj: * Adjusting sg after padding is done in block layer.  Make libata
      set queue alignment correctly for ATAPI devices and drop broken
      sg mangling from ata_sg_setup().
    * Use request->raw_data_len for ATAPI transfer chunk size.
    * Killed qc->raw_nbytes.
    * Separated out killing qc->n_iter.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoblock: clear drain buffer if draining for write command
Tejun Heo [Tue, 19 Feb 2008 10:36:55 +0000 (11:36 +0100)]
block: clear drain buffer if draining for write command

Clear drain buffer before chaining if the command in question is a
write.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoblock: implement request_queue->dma_drain_needed
Tejun Heo [Tue, 19 Feb 2008 10:36:53 +0000 (11:36 +0100)]
block: implement request_queue->dma_drain_needed

Draining shouldn't be done for commands where overflow may indicate
data integrity issues.  Add dma_drain_needed callback to
request_queue.  Drain buffer is appened iff this function returns
non-zero.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoblock: add request->raw_data_len
Tejun Heo [Tue, 19 Feb 2008 10:36:35 +0000 (11:36 +0100)]
block: add request->raw_data_len

With padding and draining moved into it, block layer now may extend
requests as directed by queue parameters, so now a request has two
sizes - the original request size and the extended size which matches
the size of area pointed to by bios and later by sgs.  The latter size
is what lower layers are primarily interested in when allocating,
filling up DMA tables and setting up the controller.

Both padding and draining extend the data area to accomodate
controller characteristics.  As any controller which speaks SCSI can
handle underflows, feeding larger data area is safe.

So, this patch makes the primary data length field, request->data_len,
indicate the size of full data area and add a separate length field,
request->raw_data_len, for the unmodified request size.  The latter is
used to report to higher layer (userland) and where the original
request size should be fed to the controller or device.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoblock: update bio according to DMA alignment padding
Tejun Heo [Tue, 19 Feb 2008 10:35:38 +0000 (11:35 +0100)]
block: update bio according to DMA alignment padding

DMA start address and transfer size alignment for PC requests are
achieved using bio_copy_user() instead of bio_map_user().  This works
because bio_copy_user() always uses full pages and block DMA alignment
isn't allowed to go over PAGE_SIZE.

However, the implementation didn't update the last bio of the request
to make this padding visible to lower layers.  This patch makes
blk_rq_map_user() extend the last bio such that it includes the
padding area and the size of area pointed to by the request is
properly aligned.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agolibata: update ATAPI overflow draining
Tejun Heo [Tue, 19 Feb 2008 10:35:37 +0000 (11:35 +0100)]
libata: update ATAPI overflow draining

For misc ATAPI commands which transfer variable length data to the
host, overflow can occur due to application or hardware bug.  Such
overflows can be ignored safely as long as overflow data is properly
drained.  libata HSM implementation has this implemented in
__atapi_pio_bytes() and recently updated for 2.6.24-rc but it requires
further improvements.  Improve drain logic such that...

* Report overflow errors using ehi desc mechanism instead of printing
  directly.

* Properly calculate the number of bytes to be drained considering
  actual number of consumed bytes for partial draining.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Acked-by: Albert Lee <albertcc@tw.ibm.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agogenirq: do not leave interupts enabled on free_irq
Thomas Gleixner [Mon, 18 Feb 2008 17:25:17 +0000 (18:25 +0100)]
genirq: do not leave interupts enabled on free_irq

The default_disable() function was changed in commit:

 76d2160147f43f982dfe881404cfde9fd0a9da21
 genirq: do not mask interrupts by default

It removed the mask function in favour of the default delayed
interrupt disabling. Unfortunately this also broke the shutdown in
free_irq() when the last handler is removed from the interrupt for
those architectures which rely on the default implementations. Now we
can end up with a enabled interrupt line after the last handler was
removed, which can result in spurious interrupts.

Fix this by adding a default_shutdown function, which is only
installed, when the irqchip implementation does provide neither a
shutdown nor a disable function.

[@stable: affected versions: .21 - .24 ]

Pointed-out-by: Michael Hennerich <Michael.Hennerich@analog.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: stable@kernel.org
Tested-by: Michael Hennerich <Michael.Hennerich@analog.com>
16 years agogenirq: spurious.c: use time_* macros
S.Caglar Onur [Thu, 14 Feb 2008 15:36:51 +0000 (17:36 +0200)]
genirq: spurious.c: use time_* macros

The functions time_before, time_before_eq, time_after, and
time_after_eq are more robust for comparing jiffies against other
values.

So following patch implements usage of the time_after() macro, defined
at linux/jiffies.h, which deals with wrapping correctly

Signed-off-by: S.Caglar Onur <caglar@pardus.org.tr>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agoelevator: make elevator_get() attempt to load the appropriate module
Jens Axboe [Tue, 19 Feb 2008 09:20:37 +0000 (10:20 +0100)]
elevator: make elevator_get() attempt to load the appropriate module

Currently we fail if someone requests a valid io scheduler, but it's
modular and not currently loaded. That can happen from a driver init
asking for a different scheduler, or online switching through sysfs
as requested by a user.

This patch makes elevator_get() request_module() to attempt to load
the appropriate module, instead of requiring that done manually.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agocfq-iosched: add hlist for browsing parallel to the radix tree
Jens Axboe [Tue, 19 Feb 2008 09:02:29 +0000 (10:02 +0100)]
cfq-iosched: add hlist for browsing parallel to the radix tree

It's cumbersome to browse a radix tree from start to finish, especially
since we modify keys when a process exits. So add a hlist for the single
purpose of browsing over all known cfq_io_contexts, used for exit,
io prio change, etc.

This fixes http://bugzilla.kernel.org/show_bug.cgi?id=9948

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agoblock: make blk_rq_map_user() clear ->bio if it unmaps it
Jens Axboe [Mon, 18 Feb 2008 12:51:56 +0000 (13:51 +0100)]
block: make blk_rq_map_user() clear ->bio if it unmaps it

That way the interface is symmetric, and calling blk_rq_unmap_user()
on the request wont oops.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
16 years agofs/block_dev.c: remove #if 0'ed code
Adrian Bunk [Mon, 18 Feb 2008 12:48:32 +0000 (13:48 +0100)]
fs/block_dev.c: remove #if 0'ed code

Commit b2e895dbd80c420bfc0937c3729b4afe073b3848 #if 0'ed this code stating:

<--  snip  -->

    [PATCH] revert blockdev direct io back to 2.6.19 version

    Andrew Vasquez is reporting as-iosched oopses and a 65% throughput
    slowdown due to the recent special-casing of direct-io against
    blockdevs.  We don't know why either of these things are occurring.

    The patch minimally reverts us back to the 2.6.19 code for a 2.6.20
    release.

<--  snip  -->

It has since been dead code, and unless someone wants to revive it now
it's time to remove it.

This patch also makes bio_release_pages() static again and removes the
ki_bio_count member from struct kiocb, reverting changes that had been
done for this dead code.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jens Axboe <axboe@carl.home.kernel.dk>
16 years agomake struct def_blk_aops static
Adrian Bunk [Mon, 18 Feb 2008 12:48:31 +0000 (13:48 +0100)]
make struct def_blk_aops static

This patch makes the needlessly global struct def_blk_aops static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jens Axboe <axboe@carl.home.kernel.dk>
16 years agomake blk_settings_init() static
Adrian Bunk [Mon, 18 Feb 2008 12:45:55 +0000 (13:45 +0100)]
make blk_settings_init() static

blk_settings_init() can become static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jens Axboe <axboe@carl.home.kernel.dk>
16 years agomake blk_ioc_init() static
Adrian Bunk [Mon, 18 Feb 2008 12:45:53 +0000 (13:45 +0100)]
make blk_ioc_init() static

blk_ioc_init() can become static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jens Axboe <axboe@carl.home.kernel.dk>
16 years agomake blk-core.c:request_cachep static again
Adrian Bunk [Mon, 18 Feb 2008 12:45:51 +0000 (13:45 +0100)]
make blk-core.c:request_cachep static again

request_cachep needlessly became global.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jens Axboe <axboe@carl.home.kernel.dk>
16 years ago[SPARC64]: Add regs_return_value().
David S. Miller [Tue, 19 Feb 2008 08:31:22 +0000 (00:31 -0800)]
[SPARC64]: Add regs_return_value().

Needed for kretprobes.

Noticed by Ananth N Mavinakayanahalli.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NIU]: Bump driver version and release date.
David S. Miller [Tue, 19 Feb 2008 05:30:48 +0000 (21:30 -0800)]
[NIU]: Bump driver version and release date.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NIU]: Fix BMAC alternate MAC address indexing.
Matheos Worku [Tue, 19 Feb 2008 05:30:03 +0000 (21:30 -0800)]
[NIU]: Fix BMAC alternate MAC address indexing.

BMAC port alternate MAC address index needs to start at 1. Index 0 is
used for the main MAC address.

Signed-off-by: Matheos Worku <matheos.worku@sun.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: fix kernel-doc warnings in header files
Randy Dunlap [Tue, 19 Feb 2008 04:52:13 +0000 (20:52 -0800)]
net: fix kernel-doc warnings in header files

Add missing structure kernel-doc descriptions to sock.h & skbuff.h
to fix kernel-doc warnings.

(I think that Stephen H. sent a similar patch, but I can't find it.
I just want to kill the warnings, with either patch.)

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV6]: Use BUG_ON instead of if + BUG in fib6_del_route.
Pavel Emelyanov [Tue, 19 Feb 2008 04:50:42 +0000 (20:50 -0800)]
[IPV6]: Use BUG_ON instead of if + BUG in fib6_del_route.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV6]: dst_entry leak in ip4ip6_err. (resend)
Denis V. Lunev [Tue, 19 Feb 2008 04:49:36 +0000 (20:49 -0800)]
[IPV6]: dst_entry leak in ip4ip6_err. (resend)

The result of the ip_route_output is not assigned to skb. This means that
- it is leaked
- possible OOPS below dereferrencing skb->dst
- no ICMP message for this case

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agofix historic ioremap() abuse in AGP
Arjan van dev Ven [Wed, 6 Feb 2008 04:16:00 +0000 (05:16 +0100)]
fix historic ioremap() abuse in AGP

Several AGP drivers right now use ioremap_nocache() on kernel ram in order
to turn a page of regular memory uncached.

There are two problems with this:

    1) This is a total nightmare for the ioremap() implementation to keep
       various mappings of the same page coherent.

    2) It's a total nightmare for the AGP code since it adds a ton of
       complexity in terms of keeping track of 2 different pointers to
       the same thing, in terms of error handling etc etc.

This patch fixes this by making the AGP drivers use the new
set_memory_XX APIs instead.

Note: amd-k7-agp.c is built on Alpha too, and generic.c is built
on ia64 as well, which do not yet have the set_memory_*() APIs,
so for them some we have a few ugly #ifdefs - hopefully they'll
be fixed soon.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Dave Airlie <airlied@linux.ie>
16 years agobluetooth: do not move child device other than rfcomm
Dave Young [Tue, 19 Feb 2008 04:45:41 +0000 (20:45 -0800)]
bluetooth: do not move child device other than rfcomm

hci conn child devices other than rfcomm tty should not be moved here.
This is my lost, thanks for Barnaby's reporting and testing.

Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoagp/sis: Suspend support for SiS AGP
Stuart Bennett [Tue, 8 Jan 2008 13:14:07 +0000 (13:14 +0000)]
agp/sis: Suspend support for SiS AGP

Tested on M650 chipset

Signed-off-by: Dave Airlie <airlied@redhat.com>
16 years agoagp/sis: Clear bit 2 from aperture size byte as well
Stuart Bennett [Tue, 8 Jan 2008 13:13:28 +0000 (13:13 +0000)]
agp/sis: Clear bit 2 from aperture size byte as well

SiS M650 has aperture size byte 0x44

Signed-off-by: Dave Airlie <airlied@redhat.com>
16 years agobluetooth: put hci dev after del conn
Dave Young [Tue, 19 Feb 2008 04:44:01 +0000 (20:44 -0800)]
bluetooth: put hci dev after del conn

Move hci_dev_put to del_conn to avoid hci dev going away before hci conn.

Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
Linus Torvalds [Tue, 19 Feb 2008 02:46:56 +0000 (18:46 -0800)]
Merge git://git./linux/kernel/git/bart/ide-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
  ide-cd: fix missing residual count setting in DMA mode
  ht6560b: force prefetch for some devices
  ht6560b can only do up to PIO mode 4
  linux/hdsmart.h: fix goofups (take 2)
  via82cxxx: add new PCI id for cx700
  falconide: locking bugfix
  MAINTAINERS: update ide-cd maintainer's email address
  ide/libata: ST310211A has buggy HPA too
  ide: Add missing base addresses for falconide and macide

16 years agoAudit: use == not = in if statements
Eric Paris [Mon, 18 Feb 2008 23:23:16 +0000 (18:23 -0500)]
Audit: use == not = in if statements

Clearly this was supposed to be an == not an = in the if statement.
This patch also causes us to stop processing execve args once we have
failed rather than continuing to loop on failure over and over and over.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[NET]: Elminate spurious print_mac() calls.
David S. Miller [Tue, 19 Feb 2008 00:50:22 +0000 (16:50 -0800)]
[NET]: Elminate spurious print_mac() calls.

Patrick McHardy notes that print_mac() can get invoked
even if the result it unused (f.e. as an argument to
pr_debug() when DEBUG is not defined).

Mark this function as "__pure" to eliminate this problem.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoide-cd: fix missing residual count setting in DMA mode
Kiyoshi Ueda [Tue, 19 Feb 2008 00:41:26 +0000 (01:41 +0100)]
ide-cd: fix missing residual count setting in DMA mode

This patch fixes the missing residual count setting in DMA mode,
which was introduced during the conversion to blk-end-request.
The residual count could be used by the request submitter.
So if it isn't set correctly, some upper layers does not work.
(e.g. wodim for CD burning.)

The bug is in only DMA mode.
In PIO mode, we are setting the residual count correctly,
so no need to fix.

Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Reported-by: Andreas Schwab <schwab@suse.de>
Tested-by: Andreas Schwab <schwab@suse.de>
Tested-by: Laura Garcia <nevola@gmail.com>
Tested-by: Borislav Petkov <petkovbb@googlemail.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoht6560b: force prefetch for some devices
Jan Evert van Grootheest [Tue, 19 Feb 2008 00:41:26 +0000 (01:41 +0100)]
ht6560b: force prefetch for some devices

Prefetch needs to be set for some ide devices to work when connected to
a ht6560b interface. This was not always done properly, causing a system
with a HD and CD on the primary interface to not work properly. Or, in
effect, hang hard.

This patch forces prefetch on devices before checking whether it
is necessary to change the settings in the interface

This patch should also be applied to 2.4. I don't currently have a
2.4 tree around.

(also change my email address)

Signed-off-by: Jan Evert van Grootheest <janevert@caiway.nl>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoht6560b can only do up to PIO mode 4
Jan Evert van Grootheest [Tue, 19 Feb 2008 00:41:26 +0000 (01:41 +0100)]
ht6560b can only do up to PIO mode 4

According to the datasheet, ht6560b only supports up to PIO mode 4.

[bart: manually ported it over 2.6.25-rc2]

Signed-off-by: Jan Evert van Grootheest <janevert@caiway.nl>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agolinux/hdsmart.h: fix goofups (take 2)
Bartlomiej Zolnierkiewicz [Tue, 19 Feb 2008 00:41:26 +0000 (01:41 +0100)]
linux/hdsmart.h: fix goofups (take 2)

Fix goofups of commit 76166952bbc81dda1c8a8c14e75a2aa06f6c052c
("<linux/hdsmart.h> is not used by kernel code").

Also update include/linux/Kbuild to reflect the fact that hdsmart.h
uses __KERNEL__ ifdefs now.

Reported-by: "Robert P. J. Day" <rpjday@crashcourse.ca>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agovia82cxxx: add new PCI id for cx700
Andrew Smith [Tue, 19 Feb 2008 00:41:26 +0000 (01:41 +0100)]
via82cxxx: add new PCI id for cx700

[bart: manually ported it over via82cxxx changes]

From: Andrew Smith <asmith@tranquility.fsbusiness.co.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agofalconide: locking bugfix
Bartlomiej Zolnierkiewicz [Tue, 19 Feb 2008 00:41:25 +0000 (01:41 +0100)]
falconide: locking bugfix

commit 8ac4ce742c66100931b6f2d7a36b0df08bc721fe ("ide: fix host drivers
depending on ide_generic to probe for interfaces (take 2)") moved probing
to falconide but forgot to take care of Atari specific locking - fix it.

Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Michael Schmitz <schmitz@debian.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoMAINTAINERS: update ide-cd maintainer's email address
Borislav Petkov [Tue, 19 Feb 2008 00:41:25 +0000 (01:41 +0100)]
MAINTAINERS: update ide-cd maintainer's email address

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide/libata: ST310211A has buggy HPA too
Mikko Rapeli [Tue, 19 Feb 2008 00:41:25 +0000 (01:41 +0100)]
ide/libata: ST310211A has buggy HPA too

Signed-off-by: Mikko Rapeli <mikko.rapeli@teleca.com>
Tested-by: Bart Champagne <bart@as35701.net>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: Add missing base addresses for falconide and macide
Geert Uytterhoeven [Tue, 19 Feb 2008 00:41:24 +0000 (01:41 +0100)]
ide: Add missing base addresses for falconide and macide

commit 29dd59755a849cc6475faa6a75f3b804e23a6fc2 ("ide: remove ide_setup_ports")
forgot to take into account the base addresses for the CONTROL registers for
falconide and macide, as pointed out by Michael Schmitz.

Falconide was tested on Aranym.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Michael Schmitz <schmitz@debian.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years ago[SPARC64]: Kill pcic_present().
David S. Miller [Tue, 19 Feb 2008 00:40:10 +0000 (16:40 -0800)]
[SPARC64]: Kill pcic_present().

And also it's helper function pci_is_controller().  Both
are unused.

I can't remove the equivalent from sparc32 yet as some
ancient bus probing code still uses that platform's version.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Mon, 18 Feb 2008 23:52:40 +0000 (15:52 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  RDMA/nes: Fix possible array overrun
  RDMA/nes: Fix VLAN support
  RDMA/nes: Fix MAC interrupt erroneously masked on ifdown
  IB: Fix return value in ib_device_register_sysfs()

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86
Linus Torvalds [Mon, 18 Feb 2008 23:51:40 +0000 (15:51 -0800)]
Merge git://git./linux/kernel/git/x86/linux-2.6-x86

* git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86:
  x86: fix lguest build failure
  x86: reenable support for system without on node0
  x86: CPA: avoid double checking of alias ranges
  x86: CPA no alias checking for _NX
  x86: zap invalid and unused pmds in early boot
  x86: CPA, fix alias checks

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb
Linus Torvalds [Mon, 18 Feb 2008 23:49:47 +0000 (15:49 -0800)]
Merge git://git./linux/kernel/git/mchehab/v4l-dvb

* git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (59 commits)
  V4L/DVB (7219): zoran: Fix namespace conflicts with Zoran 'GPIO_MAX' enum
  V4L/DVB (7205): tuner-xc2028 depends on FW_LOADER
  V4L/DVB (7201): cx88-mpeg: Fix race condition in variable access
  V4L/DVB (7200): Fix FM firmware loading
  V4L/DVB (7198): V4L, include ioctl.h in videodev headers
  V4L/DVB (7197): bttv: Fix overlay divide error
  V4L/DVB (7195): xc5000: fix build error when built as module
  V4L/DVB (7194): cx88-mpeg: Allow concurrent access to cx88-mpeg devices
  V4L/DVB (7193): tveeprom: Add proper tuner mapping for hauppauge eeprom id 133
  V4L/DVB (7192): Adds support for Genius TVGo A11MCE
  V4L/DVB (7189): autosuspend support
  V4L/DVB (7188): radio-si470x version 1.0.6
  V4L/DVB (7186): tda10086: make the 22kHz tone for DISEQC a config option
  V4L/DVB (7183): radio-si470x: fix build warning
  V4L/DVB (7180): em28xx: add URB_NO_TRANSFER_DMA_MAP, since urb->transfer_dma is set
  V4L/DVB (7179): Allow more than one em28xx board
  V4L/DVB (7164): em28xx-alsa: Add a missing mutex
  V4L/DVB (7163): em28xx: makes audio settings more stable
  V4L/DVB (7162): em28xx: Fix endian and returns the correct values
  V4L/DVB (7161): em28xx: Fix printing debug values higher than 127
  ...

16 years agoMerge branch 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6
Linus Torvalds [Mon, 18 Feb 2008 23:46:21 +0000 (15:46 -0800)]
Merge branch 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6

* 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6:
  [XFS] Added quota targets and removed dmapi directory
  [XFS] Fix up xfs out-of-tree builds. (a.k.a. external modules)
  [XFS] Remove Makefile wrappers in XFS

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Mon, 18 Feb 2008 23:46:03 +0000 (15:46 -0800)]
Merge git://git./linux/kernel/git/herbert/crypto-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  [CRYPTO] null: Add missing Kconfig dependency on BLKCIPHER
  [CRYPTO] tcrypt: Add missing Kconfig dependency on BLKCIPHER
  [HIFN]: Fix invalid config ifdefs for RNG support

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-hrt
Linus Torvalds [Mon, 18 Feb 2008 23:45:48 +0000 (15:45 -0800)]
Merge git://git./linux/kernel/git/tglx/linux-2.6-hrt

* git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-hrt:
  timer_list: print relative expiry time signed

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
Linus Torvalds [Mon, 18 Feb 2008 23:41:05 +0000 (15:41 -0800)]
Merge git://git./linux/kernel/git/sam/kbuild

* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild:
  kbuild: explain why DEBUG_SECTION_MISMATCH is UNDEFINED
  kbuild: fix building vmlinux.o
  kbuild: allow -fstack-protector to take effect
  kconfig: fix select in combination with default

16 years ago[SPARC]: Kill 'prom_palette'.
David S. Miller [Mon, 18 Feb 2008 23:28:16 +0000 (15:28 -0800)]
[SPARC]: Kill 'prom_palette'.

The idea of this thing is we could save/restore the firmware's
palette when breaking in and out of the firmware prompt.

Only one driver implemented this (atyfb) and it's value is
questionable.  If you're just debugging you don't really
care that the characters end up being purple or whatever.

And we can provide better debugging and firmware command
facilities with minimal in-kernel console I/O drivers.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[ATYFB]: Kill 'prom_palette' sparc code.
David S. Miller [Mon, 18 Feb 2008 23:26:43 +0000 (15:26 -0800)]
[ATYFB]: Kill 'prom_palette' sparc code.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC64]: Kill 'prom_keyboard'.
David S. Miller [Mon, 18 Feb 2008 23:21:30 +0000 (15:21 -0800)]
[SPARC64]: Kill 'prom_keyboard'.

Nothing ever sets it, so it just takes up space.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC]: Kill extern decl of 'panic_setup'.
David S. Miller [Mon, 18 Feb 2008 23:17:58 +0000 (15:17 -0800)]
[SPARC]: Kill extern decl of 'panic_setup'.

This was made static in kernel/panic.c a long time ago.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC64]: Delete 'boot_flags'.
David S. Miller [Mon, 18 Feb 2008 23:16:20 +0000 (15:16 -0800)]
[SPARC64]: Delete 'boot_flags'.

It is write-only, nothing tests it's value.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC64]: Kill unused function 'kernel_enter_debugger'.
David S. Miller [Mon, 18 Feb 2008 23:13:48 +0000 (15:13 -0800)]
[SPARC64]: Kill unused function 'kernel_enter_debugger'.

Signed-off-by: David S. Miller <davem@davemloft.net>