platform/kernel/linux-starfive.git
15 years agoremove stale comment from <linux/hdreg.h>
Bartlomiej Zolnierkiewicz [Thu, 5 Mar 2009 15:10:59 +0000 (16:10 +0100)]
remove stale comment from <linux/hdreg.h>

HDIO_GET_IDENTITY returns 256 words currently.

Noticed by Norman Diamond.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoAT91: initialize Compact Flash on AT91SAM9263 cpu
Stanislaw Gruszka [Thu, 5 Mar 2009 15:10:58 +0000 (16:10 +0100)]
AT91: initialize Compact Flash on AT91SAM9263 cpu

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Cc: Andrew Victor <avictor.za@gmail.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Acked-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: add at91_ide driver
Stanislaw Gruszka [Thu, 5 Mar 2009 15:10:58 +0000 (16:10 +0100)]
ide: add at91_ide driver

This is IDE host driver for AT91 (SAM9, CAP9, AT572D940HF) Static Memory
Controller with Compact Flash True IDE Mode logic.

Driver have to switch 8/16 bit bus width when accessing Task Tile or Data
Register. Moreover some extra things need to be done when setting PIO mode.
Only PIO mode is used, hardware have no DMA support. If interrupt line is
connected through GPIO extra quirk is needed to cope with fake interrupts.

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Cc: Andrew Victor <avictor.za@gmail.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: allow to wrap interrupt handler
Stanislaw Gruszka [Thu, 5 Mar 2009 15:10:57 +0000 (16:10 +0100)]
ide: allow to wrap interrupt handler

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Cc: Andrew Victor <linux@maxim.org.za>
[bart: minor checkpatch.pl / CodingStyle fixups]
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide-iops: fix odd-length ATAPI PIO transfers
Sergei Shtylyov [Thu, 5 Mar 2009 15:10:56 +0000 (16:10 +0100)]
ide-iops: fix odd-length ATAPI PIO transfers

Commit 9567b349f7e7dd7e2483db99ee8e4a6fe0caca38 (ide: merge ->atapi_*put_bytes
and ->ata_*put_data methods) introduced a regression  WRT the odd-length ATAPI
PIO transfers -- the final word didn't get written (causing command timeouts).

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: NULL noise: drivers/ide/ide-*.c
Hannes Eder [Thu, 5 Mar 2009 15:10:56 +0000 (16:10 +0100)]
ide: NULL noise: drivers/ide/ide-*.c

Fix this sparse warnings:
  drivers/ide/ide-disk_proc.c:130:11: warning: Using plain integer as NULL pointer
  drivers/ide/ide-floppy_proc.c:32:11: warning: Using plain integer as NULL pointer
  drivers/ide/ide-proc.c:234:11: warning: Using plain integer as NULL pointer
  drivers/ide/ide-tape.c:2141:11: warning: Using plain integer as NULL pointer

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Cc: trivial@kernel.org
Cc: kernel-janitors@vger.kernel.org
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoide: expiry() returns int, negative expiry() return values won't be noticed
Roel Kluin [Thu, 5 Mar 2009 15:10:55 +0000 (16:10 +0100)]
ide: expiry() returns int, negative expiry() return values won't be noticed

bart:
It seems like the bug could cause insanely long timeouts for:
- ATA_DMA_ERR error in dma_timer_expiry()
- commands without ->expiry in tc86c001_timer_expiry()
  (TC86C001 IDE controller only)

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
[bart: port it to the current tree]
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agox86: UV, SGI RTC: add generic system vector, build fix on UP
Ingo Molnar [Thu, 5 Mar 2009 14:15:44 +0000 (15:15 +0100)]
x86: UV, SGI RTC: add generic system vector, build fix on UP

Make ack_APIC_irq() build on !SMP && !APIC too.

Cc: Dimitri Sivanich <sivanich@sgi.com>
LKML-Reference: <20090304185605.GA24419@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years ago[WATCHDOG] gef_wdt.c: fsl_get_sys_freq() failure not noticed
Roel Kluin [Tue, 3 Mar 2009 14:10:05 +0000 (15:10 +0100)]
[WATCHDOG] gef_wdt.c: fsl_get_sys_freq() failure not noticed

fsl_get_sys_freq() may return -1 when 'soc' isn't found, but in
gef_wdt_probe() 'freq' is unsigned, so the test doesn't catch that.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
15 years ago[WATCHDOG] ks8695_wdt.c: 'CLOCK_TICK_RATE' undeclared
Alexey Dobriyan [Thu, 12 Feb 2009 10:42:41 +0000 (13:42 +0300)]
[WATCHDOG] ks8695_wdt.c: 'CLOCK_TICK_RATE' undeclared

On arm-acs5k_tiny:

drivers/watchdog/ks8695_wdt.c:68: error: 'CLOCK_TICK_RATE' undeclared
(first use in this function)

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Cc: stable <stable@kernel.org>
15 years agox86: pre-initialize boot_cpu_data.x86_phys_bits to avoid system_state tests
Jeremy Fitzhardinge [Thu, 5 Mar 2009 00:16:51 +0000 (16:16 -0800)]
x86: pre-initialize boot_cpu_data.x86_phys_bits to avoid system_state tests

Impact: cleanup, micro-optimization

Pre-initialize boot_cpu_data.x86_phys_bits to a reasonable default
to remove the use of system_state tests in __virt_addr_valid()
and __phys_addr().

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86-32: use specific __vmalloc_start_set flag in __virt_addr_valid
Jeremy Fitzhardinge [Thu, 5 Mar 2009 00:10:44 +0000 (16:10 -0800)]
x86-32: use specific __vmalloc_start_set flag in __virt_addr_valid

Rather than relying on the ever-unreliable system_state,
add a specific __vmalloc_start_set flag to indicate whether
the vmalloc area has meaningful boundaries yet, and use that
in x86-32's __phys_addr and __virt_addr_valid.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: clean up old gcc warnings
Jeremy Fitzhardinge [Thu, 5 Mar 2009 01:14:30 +0000 (17:14 -0800)]
x86: clean up old gcc warnings

gcc 3.2.2 reports:

In file included from /usr/src/all/linux-next/arch/x86/include/asm/page.h:8,
                 from /usr/src/all/linux-next/arch/x86/include/asm/processor.h:18,
                 from /usr/src/all/linux-next/arch/x86/include/asm/atomic_32.h:6,
                 from /usr/src/all/linux-next/arch/x86/include/asm/atomic.h:2,
                 from include/linux/crypto.h:20,
                 from arch/x86/kernel/asm-offsets_32.c:7,
                 from arch/x86/kernel/asm-offsets.c:2:
/usr/src/all/linux-next/arch/x86/include/asm/page_types.h:54: warning: parameter has incomplete type
/usr/src/all/linux-next/arch/x86/include/asm/page_types.h:56: warning: parameter has incomplete type
In file included from /usr/src/all/linux-next/arch/x86/include/asm/page.h:8,
                 from /usr/src/all/linux-next/arch/x86/include/asm/processor.h:18,
                 from include/linux/prefetch.h:14,
                 from include/linux/list.h:6,
                 from include/linux/module.h:9,
                 from init/main.c:13:
/usr/src/all/linux-next/arch/x86/include/asm/page_types.h:54: warning: parameter has incomplete type
/usr/src/all/linux-next/arch/x86/include/asm/page_types.h:56: warning: parameter has incomplete type

This is a bogus warning, but moving the pat-related functions
into asm/pat.h and including asm/pgtable_types.h should fix it.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: move init_memory_mapping() to common mm/init.c, build fix on 32-bit PAE
Ingo Molnar [Thu, 5 Mar 2009 13:39:03 +0000 (14:39 +0100)]
x86: move init_memory_mapping() to common mm/init.c, build fix on 32-bit PAE

Impact: build fix

Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <1236257708-27269-14-git-send-email-penberg@cs.helsinki.fi>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: move function and variable declarations to asm/init.h
Pekka Enberg [Thu, 5 Mar 2009 12:55:08 +0000 (14:55 +0200)]
x86: move function and variable declarations to asm/init.h

Impact: cleanup

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <1236257708-27269-17-git-send-email-penberg@cs.helsinki.fi>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: unify kernel_physical_mapping_init() function signatures
Pekka Enberg [Thu, 5 Mar 2009 12:55:07 +0000 (14:55 +0200)]
x86: unify kernel_physical_mapping_init() function signatures

Impact: cleanup

In preparation for moving the function declaration to a header file,
unify 32-bit and 64-bit signatures.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <1236257708-27269-16-git-send-email-penberg@cs.helsinki.fi>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: fix up some bad global variable names in mm/init.c
Pekka Enberg [Thu, 5 Mar 2009 12:55:06 +0000 (14:55 +0200)]
x86: fix up some bad global variable names in mm/init.c

Impact: cleanup

The table_start, table_end, and table_top are too generic for global
namespace so rename them to be more specific.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <1236257708-27269-15-git-send-email-penberg@cs.helsinki.fi>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: move init_memory_mapping() to common mm/init.c
Pekka Enberg [Thu, 5 Mar 2009 12:55:05 +0000 (14:55 +0200)]
x86: move init_memory_mapping() to common mm/init.c

Impact: cleanup

This patch moves the init_memory_mapping() function to common mm/init.c.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <1236257708-27269-14-git-send-email-penberg@cs.helsinki.fi>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: add stub init_gbpages() for 32-bit init_memory_mapping()
Pekka Enberg [Thu, 5 Mar 2009 12:55:04 +0000 (14:55 +0200)]
x86: add stub init_gbpages() for 32-bit init_memory_mapping()

Impact: cleanup

This patch adds an empty static inline init_gbpages() for the 32-bit
version of init_memory_mapping() making both versions identical.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <1236257708-27269-13-git-send-email-penberg@cs.helsinki.fi>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: ifdef 32-bit and 64-bit NR_RANGE_MR for save_mr() unification
Pekka Enberg [Thu, 5 Mar 2009 12:55:03 +0000 (14:55 +0200)]
x86: ifdef 32-bit and 64-bit NR_RANGE_MR for save_mr() unification

Impact: cleanup

As a trivial preparation for moving common code to arc/x86/mm/init.c,
ifdef the 32-bit and 64-bit versions of NR_RANGE_MR.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <1236257708-27269-12-git-send-email-penberg@cs.helsinki.fi>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: ifdef 32-bit and 64-bit pfn setup in init_memory_mapping()
Pekka Enberg [Thu, 5 Mar 2009 12:55:02 +0000 (14:55 +0200)]
x86: ifdef 32-bit and 64-bit pfn setup in init_memory_mapping()

Impact: cleanup

To reduce the diff between the 32-bit and 64-bit versions of
init_memory_mapping(), ifdef configuration specific pfn setup
code in the function.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <1236257708-27269-11-git-send-email-penberg@cs.helsinki.fi>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: ifdef 32-bit and 64-bit setup in init_memory_mapping()
Pekka Enberg [Thu, 5 Mar 2009 12:55:01 +0000 (14:55 +0200)]
x86: ifdef 32-bit and 64-bit setup in init_memory_mapping()

Impact: cleanup

To reduce the diff between the 32-bit and 64-bit versions of
init_memory_mapping(), ifdef configuration specific setup code
in the function.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <1236257708-27269-10-git-send-email-penberg@cs.helsinki.fi>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: add table start and end sanity checks to 32-bit init_memory_mapping()
Pekka Enberg [Thu, 5 Mar 2009 12:55:00 +0000 (14:55 +0200)]
x86: add table start and end sanity checks to 32-bit init_memory_mapping()

Impact: cleanup

This patch adds a sanity check to the 32-bit version of
init_memory_mapping() to reduce the diff to the 64-bit version.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <1236257708-27269-9-git-send-email-penberg@cs.helsinki.fi>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: unify kernel_physical_mapping_init() call in init_memory_mapping()
Pekka Enberg [Thu, 5 Mar 2009 12:54:59 +0000 (14:54 +0200)]
x86: unify kernel_physical_mapping_init() call in init_memory_mapping()

Impact: cleanup

The 64-bit version of init_memory_mapping() uses the last mapped
address returned from kernel_physical_mapping_init() whereas the
32-bit version doesn't. This patch adds relevant ifdefs to both
versions of the function to reduce the diff between them.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <1236257708-27269-8-git-send-email-penberg@cs.helsinki.fi>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: rename after_init_bootmem to after_bootmem in mm/init_32.c
Pekka Enberg [Thu, 5 Mar 2009 12:54:58 +0000 (14:54 +0200)]
x86: rename after_init_bootmem to after_bootmem in mm/init_32.c

Impact: cleanup

This patch renames after_init_bootmem to after_bootmem in
mm/init_32.c to reduce the diff to the 64-bit version of of
init_memory_mapping().

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <1236257708-27269-7-git-send-email-penberg@cs.helsinki.fi>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: remove unnecessary save_mr() sanity check
Pekka Enberg [Thu, 5 Mar 2009 12:54:57 +0000 (14:54 +0200)]
x86: remove unnecessary save_mr() sanity check

Impact: cleanup

The save_mr() function already checks that start_pfn is less than
end_pfn so we can remove the unnecessary check which reduces the
diff between the 32-bit and the 64-bit versions of init_memory_mapping().

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <1236257708-27269-6-git-send-email-penberg@cs.helsinki.fi>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: ifdef 32-bit specific setup in init_memory_mapping()
Pekka Enberg [Thu, 5 Mar 2009 12:54:56 +0000 (14:54 +0200)]
x86: ifdef 32-bit specific setup in init_memory_mapping()

Impact: cleanup

Enabling NX, PSE, and PGE are only required on 32-bit so ifdef them
in both versions of the function.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <1236257708-27269-5-git-send-email-penberg@cs.helsinki.fi>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: move pgd_base out of init_memory_mapping()
Pekka Enberg [Thu, 5 Mar 2009 12:54:55 +0000 (14:54 +0200)]
x86: move pgd_base out of init_memory_mapping()

Impact: cleanup

This patch moves pgd_base out of init_memory_mapping() to reduce
the diff between the 32-bit version and the 64-bit version of the
function.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <1236257708-27269-4-git-send-email-penberg@cs.helsinki.fi>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: find_early_table_space() unification
Pekka Enberg [Thu, 5 Mar 2009 12:54:54 +0000 (14:54 +0200)]
x86: find_early_table_space() unification

Impact: cleanup

There are some minor differences between the 32-bit and 64-bit
find_early_table_space() functions. This patch wraps those
differences under CONFIG_X86_32 to make the function identical
on both configurations.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <1236257708-27269-3-git-send-email-penberg@cs.helsinki.fi>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: add gbpages support to 32-bit init_memory_mapping()
Pekka Enberg [Thu, 5 Mar 2009 12:54:53 +0000 (14:54 +0200)]
x86: add gbpages support to 32-bit init_memory_mapping()

Impact: cleanup

To reduce the diff between the 32-bit and 64-bit versions of
init_memory_mapping(), add gbpages support to the 32-bit version.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <1236257708-27269-2-git-send-email-penberg@cs.helsinki.fi>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: init_memory_mapping() trivial cleanups
Pekka Enberg [Thu, 5 Mar 2009 12:54:52 +0000 (14:54 +0200)]
x86: init_memory_mapping() trivial cleanups

Impact: cleanup

To reduce the diff between the 32-bit and 64-bit versions of
init_memory_mapping(), fix up all trivial issues.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <1236257708-27269-1-git-send-email-penberg@cs.helsinki.fi>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agolibata: Don't trust current capacity values in identify words 57-58
Robert Hancock [Tue, 17 Feb 2009 02:15:08 +0000 (20:15 -0600)]
libata: Don't trust current capacity values in identify words 57-58

Hanno Böck reported a problem where an old Conner CP30254 240MB hard drive
was reported as 1.1TB in capacity by libata:

http://lkml.org/lkml/2009/2/13/134

This was caused by libata trusting the drive's reported current capacity in
sectors in identify words 57 and 58 if the drive does not support LBA and the
current CHS translation values appear valid. Unfortunately it seems older
ATA specs were vague about what this field should contain and a number of drives
used values with wrong byte order or that were totally bogus. There's no
unique information that it conveys and so we can just calculate the number
of sectors from the reported current CHS values.

While we're at it, clean up this function to use named constants for the
identify word values.

Signed-off-by: Robert Hancock <hancockrwd@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agolibata: make sure port is thawed when skipping resets
Tejun Heo [Wed, 4 Mar 2009 06:59:30 +0000 (15:59 +0900)]
libata: make sure port is thawed when skipping resets

When SCR access is available and the link is offline, softreset is
skipped as it only wastes time and some controllers don't respond very
well.  However, the skip path forgot to thaw the port, which not only
blocks further event notification from the port but also causes
repeated EH invocations on the same event on drivers which rely on
->thaw() to clear events if the IRQ is shared with another device or
port.

This problem has always been there but is uncovered by recent sata_nv
nf2/3 change which dropped hardreset support while maintaining SCR
access.  nf2/3 doesn't clear hotplug event mask from the interrupt
handler but relies on ->thaw() to clear them.  When the hardreset was
there, the reset action was never skipped and the port was always
thawed but, with the hardreset gone, ->prereset() determines that
there's no need for softreset and both ->softreset() and ->thaw() are
skipped.  This leads to stuck hotplug event in the IRQ status register
triggering hotplug event whenever IRQ is delieverd on the same IRQ.
As the controller shares the same IRQ for both ports, this happens on
every IO if one port is occpupied and the other isn't.

This patch fixes the problem by making sure that the port is thawed on
reset-skip path.

bko#11615 reports this problem.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Robert Hancock <hancockrwd@gmail.com>
Reported-by: Dan Andresan <danyer@gmail.com>
Reported-by: Arne Woerner <arne_woerner@yahoo.com>
Reported-by: Stefan Lippers-Hollmann <s.L-H@gmx.de>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agosata_nv: fix module parameter description
Brandon Ehle [Sun, 1 Mar 2009 08:02:49 +0000 (00:02 -0800)]
sata_nv: fix module parameter description

Update MODULE_PARM_DESC for ADMA to reflect the fact that the
option is disabled by default.

Signed-off-by: Brandon Ehle <azverkan@yahoo.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agoahci: Add the Device IDs for MCP89 and remove IDs of MCP7B to/from ahci.c
peerchen [Fri, 27 Feb 2009 08:58:41 +0000 (16:58 +0800)]
ahci: Add the Device IDs for MCP89 and remove IDs of MCP7B to/from ahci.c

Added the Device IDs for MCP89 AHCI controller.

Removed the IDs of MCP7B because this chipset had been cancelled.

Signed-off-by: Peer Chen <peerchen@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agolibata: don't use on-stack sense buffer
Tejun Heo [Mon, 2 Mar 2009 09:55:16 +0000 (18:55 +0900)]
libata: don't use on-stack sense buffer

sense_buffer is used as DMA target and shouldn't be allocated on
stack.  Use ap->sector_buf instead.  This problem is spotted by Chuck
Ebbert.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agolibata: align ap->sector_buf
Tejun Heo [Mon, 2 Mar 2009 09:53:26 +0000 (18:53 +0900)]
libata: align ap->sector_buf

ap->sector_buf is used as DMA target and should at least be aligned on
cacheline.  This caused problems on some embedded machines.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agolibata: fix dma_unmap_sg misuse
FUJITA Tomonori [Fri, 27 Feb 2009 08:35:43 +0000 (17:35 +0900)]
libata: fix dma_unmap_sg misuse

libata passes the returned value of dma_map_sg() to
dma_unmap_sg(),which is the misuse of dma_unmap_sg().

DMA-mapping.txt says:

To unmap a scatterlist, just call:

pci_unmap_sg(pdev, sglist, nents, direction);

Again, make sure DMA activity has already finished.

PLEASE NOTE:  The 'nents' argument to the pci_unmap_sg call must be
              the _same_ one you passed into the pci_map_sg call,
      it should _NOT_ be the 'count' value _returned_ from the
              pci_map_sg call.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agolibata: change drive ready wait after hard reset to 5s
Stuart Hayes [Wed, 4 Mar 2009 19:59:46 +0000 (11:59 -0800)]
libata: change drive ready wait after hard reset to 5s

This fixes problems during resume with drives that take longer than 1s to
be ready.  The ATA-6 spec appears to allow 5 seconds for a drive to be
ready.

On one affected system, this patch changes "PM: resume devices took..."
message from 17 seconds to 4 seconds, and gets rid of a lot of ugly
timeout/error messages.

Without this patch, the libata code moves on after 1s, tries to send a
soft reset (which the drive doesn't see because it isn't ready) which also
times out, then an IDENTIFY command is sent to the drive which times out,
and finally the error handler will try to send another hard reset which
will finally get things working.

Signed-off-by: Stuart Hayes <stuart_hayes@dell.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agoBlackfin arch: cleanup bfin_sport.h header and export it to userspace
Alon Bar-Lev [Thu, 5 Mar 2009 11:42:43 +0000 (19:42 +0800)]
Blackfin arch: cleanup bfin_sport.h header and export it to userspace

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agotracing/function-graph-tracer: use the more lightweight local clock
Frederic Weisbecker [Thu, 5 Mar 2009 00:49:22 +0000 (01:49 +0100)]
tracing/function-graph-tracer: use the more lightweight local clock

Impact: decrease hangs risks with the graph tracer on slow systems

Since the function graph tracer can spend too much time on timer
interrupts, it's better now to use the more lightweight local
clock. Anyway, the function graph traces are more reliable on a
per cpu trace.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <49af243d.06e9300a.53ad.ffff840c@mx.google.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoloop: don't increment p->offset with (size_t) -EINVAL
Roel Kluin [Thu, 5 Mar 2009 07:03:53 +0000 (08:03 +0100)]
loop: don't increment p->offset with (size_t) -EINVAL

Upon a 'transfer error block' size is set to -EINVAL, but this becomes positive
since size is unsigned: p->offset still gets incremented.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agocciss: remove 30 second initial timeout on controller reset
Jens Axboe [Fri, 27 Feb 2009 07:10:26 +0000 (08:10 +0100)]
cciss: remove 30 second initial timeout on controller reset

Commit 5e4c91c84b194b26cf592779e451f4b5be777cba forgot to remove the
initial sleep, get rid of it.

Thanks to Randy Dunlap <randy.dunlap@oracle.com> for spotting this error.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoFix kernel NULL pointer dereference in xen-blkfront
Kris Shannon [Mon, 2 Mar 2009 08:47:37 +0000 (19:47 +1100)]
Fix kernel NULL pointer dereference in xen-blkfront

When booting Xen Dom0 on a pre-release 3.2.1 hypervisor the system Oopses on a
"Unable to handle kernel NULL pointer dereference" in xenwatch.

From the backtrace it looks like backend_changed is calling bdget_disk
with a NULL pointer.  Checking for NULL and returning ENODEV instead
allows the kernel to boot.

15 years agoBlackfin arch: fix bug - gdb signull case make trunk kernel panic frequently
Jie Zhang [Thu, 5 Mar 2009 10:50:26 +0000 (18:50 +0800)]
Blackfin arch: fix bug - gdb signull case make trunk kernel panic frequently

Use copy_to_user_page and copy_from_user_page instead of
memcpy. copy_to_user_page does cache flush when necessary.

Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: remove spurious dash when dcache is off
Mike Frysinger [Thu, 5 Mar 2009 10:47:20 +0000 (18:47 +0800)]
Blackfin arch: remove spurious dash when dcache is off

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: mark init_pda as __init as only __init funcs all it
Mike Frysinger [Thu, 5 Mar 2009 10:45:07 +0000 (18:45 +0800)]
Blackfin arch: mark init_pda as __init as only __init funcs all it

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: fix bug - On bf548-ezkit, ethernet fails to work after wakeup from...
Michael Hennerich [Thu, 5 Mar 2009 10:41:24 +0000 (18:41 +0800)]
Blackfin arch: fix bug - On bf548-ezkit, ethernet fails to work after wakeup from "mem"

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agox86: UV, SGI RTC: fix uv_time.c for UP
Dimitri Sivanich [Wed, 4 Mar 2009 22:02:46 +0000 (16:02 -0600)]
x86: UV, SGI RTC: fix uv_time.c for UP

Fix non-smp build of uv_time.c.

Signed-off-by: Dimitri Sivanich <sivanich@sgi.com>
LKML-Reference: <20090304220246.GC6288@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoBlackfin arch: Random read/write errors are a bad thing
Robin Getz [Thu, 5 Mar 2009 10:18:49 +0000 (18:18 +0800)]
Blackfin arch: Random read/write errors are a bad thing

Random read/write errors are a bad thing - so don't let anyone
(including the test bench) run on something we know is bad.

Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agox86/doc: mini-howto for using earlyprintk=dbgp
Yinghai Lu [Thu, 5 Mar 2009 00:11:35 +0000 (16:11 -0800)]
x86/doc: mini-howto for using earlyprintk=dbgp

[ mingo: small edits and extensions. ]

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Greg KH <gregkh@suse.de>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Sarah Sharp <sarah.a.sharp@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
LKML-Reference: <49AF18B7.4050305@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoBlackfin arch: update default kernel config, select KSZ8893M driver for BF518
Graf Yang [Thu, 5 Mar 2009 09:32:41 +0000 (17:32 +0800)]
Blackfin arch: update default kernel config, select KSZ8893M driver for BF518

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: Fix bug - KGDB single step into the middle of a 4 bytes instruction...
Sonic Zhang [Thu, 5 Mar 2009 10:26:59 +0000 (18:26 +0800)]
Blackfin arch: Fix bug - KGDB single step into the middle of a 4 bytes instruction on bf561 after soft bp is hit

Run IFLUSH twice to avoid loading wrong instruction
after invalidating icache and following sequence is met.

1) The one instruction address is cached in the icache.
2) This instruction in SDRAM is changed.
3) IFLASH[P0] is executed only once in lackfin_icache_flush_range().
4) This instruction is executed again, but not the changed new one.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: Fix bug - make ksz8893m driver available when bfin_mac is enabled
Graf Yang [Thu, 5 Mar 2009 09:35:59 +0000 (17:35 +0800)]
Blackfin arch: Fix bug - make ksz8893m driver available when bfin_mac is enabled

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: make sure people do not set the kernel load address too high
Mike Frysinger [Thu, 5 Mar 2009 09:33:36 +0000 (17:33 +0800)]
Blackfin arch: make sure people do not set the kernel load address too high

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agotracing: move utility functions from ftrace.h to kernel.h
Ingo Molnar [Thu, 5 Mar 2009 09:28:45 +0000 (10:28 +0100)]
tracing: move utility functions from ftrace.h to kernel.h

Make common utility functions such as trace_printk() and
tracing_start()/tracing_stop() generally available to kernel
code.

Cc: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agotracing: rename ftrace_printk() => trace_printk()
Ingo Molnar [Thu, 5 Mar 2009 09:24:48 +0000 (10:24 +0100)]
tracing: rename ftrace_printk() => trace_printk()

Impact: cleanup

Use a more generic name - this also allows the prototype to move
to kernel.h and be generally available to kernel developers who
want to do some quick tracing.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge branch 'tip/tracing/ftrace' of git://git.kernel.org/pub/scm/linux/kernel/git...
Ingo Molnar [Thu, 5 Mar 2009 09:21:49 +0000 (10:21 +0100)]
Merge branch 'tip/tracing/ftrace' of git://git./linux/kernel/git/rostedt/linux-2.6-trace into tracing/ftrace

15 years agoMerge branch 'tracing/ftrace' into tracing/core
Ingo Molnar [Thu, 5 Mar 2009 09:20:47 +0000 (10:20 +0100)]
Merge branch 'tracing/ftrace' into tracing/core

15 years agoBlackfin arch: fix bug - The SPORT_HYS bit is not set for BF561 0.5
Enrik Berkhan [Thu, 5 Mar 2009 06:42:30 +0000 (14:42 +0800)]
Blackfin arch: fix bug - The SPORT_HYS bit is not set for BF561 0.5

IMHO the setting should depend on ANOMALY_05000305 which is about the
availability of the bit, not ANOMALY_05000265 which only describes the
SPORT sensitivity to noise (checked for BF561 only, though).

If that's not true for other BF variants, maybe the definition of
ANOMALY_05000265 for BF561 should be changed to '(1)' instead.

Signed-off-by: Enrik Berkhan <Enrik.Berkhan@ge.com>
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agotracing: have latency tracers set the latency format
Steven Rostedt [Thu, 5 Mar 2009 03:15:30 +0000 (22:15 -0500)]
tracing: have latency tracers set the latency format

The latency tracers (irqsoff, preemptoff, preemptirqsoff, and wakeup)
are pretty useless with the default output format. This patch makes them
automatically enable the latency format when they are selected. They
also record the state of the latency option, and if it was not enabled
when selected, they disable it on reset.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
15 years agotracing: consolidate print_lat_fmt and print_trace_fmt
Steven Rostedt [Thu, 5 Mar 2009 02:57:29 +0000 (21:57 -0500)]
tracing: consolidate print_lat_fmt and print_trace_fmt

Impact: clean up

Both print_lat_fmt and print_trace_fmt do pretty much the same thing
except for one different function call. This patch consolidates the
two functions and adds an if statement to perform the difference.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
15 years agotracing: remove extra latency_trace method from trace structure
Steven Rostedt [Thu, 5 Mar 2009 02:42:04 +0000 (21:42 -0500)]
tracing: remove extra latency_trace method from trace structure

Impact: clean up

The trace and latency_trace function pointers are identical for
every tracer but the function tracer. The differences in the function
tracer are trivial (latency output puts paranthesis around parent).

This patch removes the latency_trace pointer and all prints will
now just use the trace output function pointer.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
15 years agotracing: add latency output format option
Steven Rostedt [Thu, 5 Mar 2009 01:34:24 +0000 (20:34 -0500)]
tracing: add latency output format option

With the removal of the latency_trace file, we lost the ability
to see some of the finer details in a trace. Like the state of
interrupts enabled, the preempt count, need resched, and if we
are in an interrupt handler, softirq handler or not.

This patch simply creates an option to bring back the old format.
This also removes the warning about an unused variable that held
the latency_trace file operations.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
15 years agotracing: fix seq read from trace files
Steven Rostedt [Thu, 5 Mar 2009 01:31:11 +0000 (20:31 -0500)]
tracing: fix seq read from trace files

The buffer used by trace_seq was updated incorrectly. Instead
of consuming what was actually read, it consumed the rest of the
buffer on reads.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
15 years agoSquashfs: frag_size should be signed, as it can hold an error result
Roel Kluin [Thu, 5 Mar 2009 00:55:31 +0000 (00:55 +0000)]
Squashfs: frag_size should be signed, as it can hold an error result

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
15 years agoSquashfs: fix documentation typo, Cramfs filesystem limit is 256 MiB
Phillip Lougher [Thu, 5 Mar 2009 00:40:13 +0000 (00:40 +0000)]
Squashfs: fix documentation typo, Cramfs filesystem limit is 256 MiB

Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
15 years agoSquashfs: Fix oops when reading fsfuzzer corrupted filesystems
Phillip Lougher [Thu, 5 Mar 2009 00:31:12 +0000 (00:31 +0000)]
Squashfs: Fix oops when reading fsfuzzer corrupted filesystems

This fixes a code regression caused by the recent mainlining changes.
The recent code changes call zlib_inflate repeatedly, decompressing into
separate 4K buffers, this code didn't check for the possibility that
zlib_inflate might ask for too many buffers when decompressing corrupted
data.

Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
15 years agotracing: do not return EFAULT if read copied anything
Steven Rostedt [Thu, 5 Mar 2009 00:10:05 +0000 (19:10 -0500)]
tracing: do not return EFAULT if read copied anything

Impact: fix trace read to conform to standards

Andrew Morton, Theodore Tso and H. Peter Anvin brought to my attention
that a userspace read should not return -EFAULT if it succeeded in
copying anything. It should only return -EFAULT if it failed to copy
at all.

This patch modifies the check of copy_from_user and updates the return
code appropriately.

I also used H. Peter Anvin's short cut rule to just test ret == count.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
15 years agoring-buffer: fix timestamp in partial ring_buffer_page_read
Steven Rostedt [Wed, 4 Mar 2009 04:52:42 +0000 (23:52 -0500)]
ring-buffer: fix timestamp in partial ring_buffer_page_read

If a partial ring_buffer_page_read happens, then some of the
incremental timestamps may be lost. This patch writes the
recent timestamp into the page that is passed back to the caller.

A partial ring_buffer_page_read is where the full page would not
be written back to the user, and instead, just part of the page
is copied to the user. A full page would be a page swap with the
ring buffer and the timestamps would be correct.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
15 years agoext4: fix ext4_free_inode() vs. ext4_claim_inode() race
Eric Sandeen [Wed, 4 Mar 2009 23:38:18 +0000 (18:38 -0500)]
ext4: fix ext4_free_inode() vs. ext4_claim_inode() race

I was seeing fsck errors on inode bitmaps after a 4 thread
dbench run on a 4 cpu machine:

Inode bitmap differences: -50736 -(50752--50753) etc...

I believe that this is because ext4_free_inode() uses atomic
bitops, and although ext4_new_inode() *used* to also use atomic
bitops for synchronization, commit
393418676a7602e1d7d3f6e560159c65c8cbd50e changed this to use
the sb_bgl_lock, so that we could also synchronize against
read_inode_bitmap and initialization of uninit inode tables.

However, that change left ext4_free_inode using atomic bitops,
which I think leaves no synchronization between setting &
unsetting bits in the inode table.

The below patch fixes it for me, although I wonder if we're
getting at all heavy-handed with this spinlock...

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agotracing: add cpu_file intialization for ftrace_dump
Steven Rostedt [Wed, 4 Mar 2009 23:20:36 +0000 (18:20 -0500)]
tracing: add cpu_file intialization for ftrace_dump

Impact: fix to ftrace_dump output corruption

The commit: b04cc6b1f6398b0e0b60d37e27ce51b4899672ec
  tracing/core: introduce per cpu tracing files

added a new field to the iterator called cpu_file. This was a handle
to differentiate between the per cpu trace output files and the
all cpu "trace" file. The all cpu "trace" file required setting this
to TRACE_PIPE_ALL_CPU.

The problem is that the ftrace_dump sets up its own iterator but was
not updated to handle this change. The result was only CPU 0 printing
out on crash and a lot of "<0>"'s also being printed.

Reported-by: Thomas Gleixner <tglx@linuxtronix.de>
Tested-by: Darren Hart <dvhtc@us.ibm.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
15 years agodmatest: fix use after free in dmatest_exit
Dan Williams [Wed, 4 Mar 2009 23:06:03 +0000 (16:06 -0700)]
dmatest: fix use after free in dmatest_exit

dmatest_cleanup_chanel will free dtc, so grab ->chan before it goes away
and use it to do the release.

Reported-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agoipu_idmac: fix spinlock type
Luotao Fu [Thu, 26 Feb 2009 11:29:20 +0000 (12:29 +0100)]
ipu_idmac: fix spinlock type

fix a probably accidently dropped reference operator while calling
spin_unlock_restore to an ipu lock.

Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
Cc: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agoiop-adma, mv_xor: fix mem leak on self-test setup failure
Roel Kluin [Wed, 25 Feb 2009 12:56:21 +0000 (13:56 +0100)]
iop-adma, mv_xor: fix mem leak on self-test setup failure

iop_adma_zero_sum_self_test has the brackets in the wrong place for the
setup failure deallocation path.  This error was duplicated in
mv_xor_xor_self_test.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agofsldma: fix off by one in dma_halt
Dan Williams [Mon, 2 Mar 2009 22:33:46 +0000 (15:33 -0700)]
fsldma: fix off by one in dma_halt

Prevent dev_err from firing even if we successfully detected 'dma-idle'
before the full 1ms timeout has elapsed.

Acked-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agoI/OAT: fail self-test if callback test reaches timeout
Dan Williams [Mon, 2 Mar 2009 20:31:35 +0000 (13:31 -0700)]
I/OAT: fail self-test if callback test reaches timeout

If we miss interrupts in the self test then fail registration of this
channel as it is unsuitable for use as a public channel.

Signed-off-by: Maciej Sosnowski <maciej.sosnowski@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agoI/OAT: update driver version and copyright dates
Maciej Sosnowski [Thu, 26 Feb 2009 10:05:43 +0000 (11:05 +0100)]
I/OAT: update driver version and copyright dates

Together with new fixes update driver version
and extend copyright dates ranges.

Signed-off-by: Maciej Sosnowski <maciej.sosnowski@intel.com>
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agoI/OAT: list usage cleanup
Eric Sesterhenn [Thu, 26 Feb 2009 10:05:30 +0000 (11:05 +0100)]
I/OAT: list usage cleanup

Trivial cleanup, list_del(); list_add_tail() is equivalent
to list_move_tail(). Semantic patch for coccinelle can be
found at www.cccmz.de/~snakebyte/list_move_tail.spatch

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Maciej Sosnowski <maciej.sosnowski@intel.com>
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agoI/OAT: set tcp_dma_copybreak to 256k for I/OAT ver.3
Maciej Sosnowski [Thu, 26 Feb 2009 10:05:17 +0000 (11:05 +0100)]
I/OAT: set tcp_dma_copybreak to 256k for I/OAT ver.3

Upcoming server platforms from Intel based on the Nehalem performance
have significantly improved CPU based copy performance.
However, the DMA engine can still be effective at higher I/O sizes
for TCP traffic and at this time copybreak
should be set to 256k for TCP traffic only.

Signed-off-by: Maciej Sosnowski <maciej.sosnowski@intel.com>
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agoI/OAT: cancel watchdog before dma remove
Maciej Sosnowski [Thu, 26 Feb 2009 10:05:07 +0000 (11:05 +0100)]
I/OAT: cancel watchdog before dma remove

Channel watchdog should be canceled before the rest of dma remove stuff.

Signed-off-by: Maciej Sosnowski <maciej.sosnowski@intel.com>
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agoI/OAT: fail initialization on zero channels detection
Maciej Sosnowski [Thu, 26 Feb 2009 10:04:54 +0000 (11:04 +0100)]
I/OAT: fail initialization on zero channels detection

On some systems with I/OAT ver.2 when DCA is disabled in BIOS
situations have been observed
that zero DMA channels are detected instead of four.
To avoid kernel panic driver should fail gracefully with appropriate message.

Signed-off-by: Maciej Sosnowski <maciej.sosnowski@intel.com>
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agoI/OAT: do not set DCACTRL_CMPL_WRITE_ENABLE for I/OAT ver.3
Maciej Sosnowski [Thu, 26 Feb 2009 10:04:38 +0000 (11:04 +0100)]
I/OAT: do not set DCACTRL_CMPL_WRITE_ENABLE for I/OAT ver.3

Flag DCACTRL_CMPL_WRITE_ENABLE is valid only for I/OAT ver.2
so it should not be set for I/OAT ver.3.

Signed-off-by: Maciej Sosnowski <maciej.sosnowski@intel.com>
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agoI/OAT: add verification for proper APICID_TAG_MAP setting by BIOS
Maciej Sosnowski [Thu, 26 Feb 2009 10:04:23 +0000 (11:04 +0100)]
I/OAT: add verification for proper APICID_TAG_MAP setting by BIOS

BIOS versions for systems with I/OAT ver.2 have been found
which fail to program APICID_TAG_MAP for DCA.
The ioatdma driver should recognize incorrectly set APICID_TAG_MAP
and disable DCA in that case.

Signed-off-by: Maciej Sosnowski <maciej.sosnowski@intel.com>
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
15 years agosmack: fixes for unlabeled host support
etienne [Wed, 4 Mar 2009 06:33:51 +0000 (07:33 +0100)]
smack: fixes for unlabeled host support

The following patch (against 2.6.29rc5) fixes a few issues in the
smack/netlabel "unlabeled host support" functionnality that was added in
2.6.29rc.  It should go in before -final.

1) smack_host_label disregard a "0.0.0.0/0 @" rule (or other label),
preventing 'tagged' tasks to access Internet (many systems drop packets with
IP options)

2) netmasks were not handled correctly, they were stored in a way _not
equivalent_ to conversion to be32 (it was equivalent for /0, /8, /16, /24,
/32 masks but not other masks)

3) smack_netlbladdr prefixes (IP/mask) were not consistent (mask&IP was not
done), so there could have been different list entries for the same IP
prefix; if those entries had different labels, well ...

4) they were not sorted

1) 2) 3) are bugs, 4) is a more cosmetic issue.
The patch :

-creates a new helper smk_netlbladdr_insert to insert a smk_netlbladdr,
-sorted by netmask length

-use the new sorted nature of  smack_netlbladdrs list to simplify
 smack_host_label : the first match _will_ be the more specific

-corrects endianness issues in smk_write_netlbladdr &  netlbladdr_seq_show

Signed-off-by: <etienne.basset@numericable.fr>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Reviewed-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: James Morris <jmorris@namei.org>
15 years agox86: fix bootmem cross node for 32bit numa, cleanup
Yinghai Lu [Wed, 4 Mar 2009 20:21:24 +0000 (12:21 -0800)]
x86: fix bootmem cross node for 32bit numa, cleanup

Impact: clean up

Simplify the code, reuse some lines.
Remove min_low_pfn reference, it is always 0

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
LKML-Reference: <49AEE2C4.2030602@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agorcu: increment quiescent state counter in ksoftirqd()
Eric Dumazet [Wed, 4 Mar 2009 20:11:56 +0000 (12:11 -0800)]
rcu: increment quiescent state counter in ksoftirqd()

If a machine is flooded by network frames, a cpu can loop
100% of its time inside ksoftirqd() without calling schedule().
This can delay RCU grace period to insane values.

Adding rcu_qsctr_inc() call in ksoftirqd() solves this problem.

Paul: "This regression was a result of the recent change from
"schedule()" to "cond_resched()", which got rid of that quiescent
state in the common case where a reschedule is not needed".

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: move free_initrd_mem() to common mm/init.c
Pekka Enberg [Wed, 4 Mar 2009 09:13:40 +0000 (11:13 +0200)]
x86: move free_initrd_mem() to common mm/init.c

Impact: cleanup

The function is identical on 32-bit and 64-bit configurations so move it to the
common mm/init.c file.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
LKML-Reference: <1236158020.29024.28.camel@penberg-laptop>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: add Dell XPS710 reboot quirk
Leann Ogasawara [Wed, 4 Mar 2009 19:53:00 +0000 (11:53 -0800)]
x86: add Dell XPS710 reboot quirk

Dell XPS710 will hang on reboot.  This is resolved by adding a quirk to
set bios reboot.

Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Cc: "manoj.iyer" <manoj.iyer@canonical.com>
Cc: <stable@kernel.org>
LKML-Reference: <1236196380.3231.89.camel@emiko>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: reserve exact size of mptable
Yinghai Lu [Wed, 4 Mar 2009 09:25:54 +0000 (01:25 -0800)]
x86: reserve exact size of mptable

Impact: save a bit of RAM

Get the exact size for the reserve_bootmem() call.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
LKML-Reference: <49AE4922.605@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: ioremap mptable
Yinghai Lu [Wed, 4 Mar 2009 09:25:21 +0000 (01:25 -0800)]
x86: ioremap mptable

Impact: fix boot with mptable above max_low_mapped

Try to use early_ioremap() to map MPC to make sure it works even it is
at the end of ram.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
LKML-Reference: <49AE4901.3090801@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Reported-and-tested-by: Kevin O'Connor <kevin@koconnor.net>
15 years agox86: make 32-bit init_memory_mapping range change more like 64-bit
Yinghai Lu [Wed, 4 Mar 2009 09:24:04 +0000 (01:24 -0800)]
x86: make 32-bit init_memory_mapping range change more like 64-bit

Impact: cleanup

make code more readable and more like 64-bit

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
LKML-Reference: <49AE48B4.8010907@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: fix bootmem cross node for 32bit numa
Yinghai Lu [Wed, 4 Mar 2009 09:22:35 +0000 (01:22 -0800)]
x86: fix bootmem cross node for 32bit numa

Impact: fix panic on system 2g x4 sockets

Found one system with 4 sockets and every sockets has 2g can not boot
with numa32 because boot mem is crossing nodes.

So try to have numa version of setup_bootmem_allocator().

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
LKML-Reference: <49AE485B.8000902@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, math-emu: fix init_fpu for task != current
Daniel Glöckner [Wed, 4 Mar 2009 18:42:27 +0000 (19:42 +0100)]
x86, math-emu: fix init_fpu for task != current

Impact: fix math-emu related crash while using GDB/ptrace

init_fpu() calls finit to initialize a task's xstate, while finit always
works on the current task. If we use PTRACE_GETFPREGS on another
process and both processes did not already use floating point, we get
a null pointer exception in finit.

This patch creates a new function finit_task that takes a task_struct
parameter. finit becomes a wrapper that simply calls finit_task with
current. On the plus side this avoids many calls to get_current which
would each resolve to an inline assembler mov instruction.

An empty finit_task has been added to i387.h to avoid linker errors in
case the compiler still emits the call in init_fpu when
CONFIG_MATH_EMULATION is not defined.

The declaration of finit in i387.h has been removed as the remaining
code using this function gets its prototype from fpu_proto.h.

Signed-off-by: Daniel Glöckner <dg@emlix.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Pallipadi Venkatesh" <venkatesh.pallipadi@intel.com>
Cc: Arjan van de Ven <arjan@infradead.org>
Cc: Bill Metzenthen <billm@melbpc.org.au>
LKML-Reference: <E1Lew31-0004il-Fg@mailer.emlix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: UV, SGI RTC: add UV RTC clocksource/clockevents
Dimitri Sivanich [Wed, 4 Mar 2009 18:59:18 +0000 (12:59 -0600)]
x86: UV, SGI RTC: add UV RTC clocksource/clockevents

This patch provides a high resolution clock/timer source using the
SGI UV system-wide synchronized RTC clock/timer hardware.

Signed-off-by: Dimitri Sivanich <sivanich@sgi.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: john stultz <johnstul@us.ibm.com>
LKML-Reference: <20090304185918.GC24419@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: UV, SGI RTC: loop through installed UV blades
Dimitri Sivanich [Wed, 4 Mar 2009 18:57:19 +0000 (12:57 -0600)]
x86: UV, SGI RTC: loop through installed UV blades

Add macro to loop through each possible blade.

Signed-off-by: Dimitri Sivanich <sivanich@sgi.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: john stultz <johnstul@us.ibm.com>
LKML-Reference: <20090304185719.GB24419@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: UV, SGI RTC: add generic system vector
Dimitri Sivanich [Wed, 4 Mar 2009 18:56:05 +0000 (12:56 -0600)]
x86: UV, SGI RTC: add generic system vector

This patch allocates a system interrupt vector for various platform
specific uses.

Signed-off-by: Dimitri Sivanich <sivanich@sgi.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: john stultz <johnstul@us.ibm.com>
LKML-Reference: <20090304185605.GA24419@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge branch 'x86/urgent' into x86/mm
Ingo Molnar [Wed, 4 Mar 2009 19:20:10 +0000 (20:20 +0100)]
Merge branch 'x86/urgent' into x86/mm

Conflicts:
arch/x86/include/asm/fixmap_64.h
Semantic merge:
arch/x86/include/asm/fixmap.h

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: EFI: Back efi_ioremap with init_memory_mapping instead of FIX_MAP
Huang Ying [Wed, 4 Mar 2009 02:58:33 +0000 (10:58 +0800)]
x86: EFI: Back efi_ioremap with init_memory_mapping instead of FIX_MAP

Impact: Fix boot failure on EFI system with large runtime memory range

Brian Maly reported that some EFI system with large runtime memory
range can not boot. Because the FIX_MAP used to map runtime memory
range is smaller than run time memory range.

This patch fixes this issue by re-implement efi_ioremap() with
init_memory_mapping().

Reported-and-tested-by: Brian Maly <bmaly@redhat.com>
Signed-off-by: Huang Ying <ying.huang@intel.com>
Cc: Brian Maly <bmaly@redhat.com>
Cc: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <1236135513.6204.306.camel@yhuang-dev.sh.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: set_highmem_pages_init() cleanup, #2
Pekka Enberg [Wed, 4 Mar 2009 08:16:07 +0000 (10:16 +0200)]
x86: set_highmem_pages_init() cleanup, #2

Impact: cleanup

The zones are set up at this stage so there's a highmem zone
available even for the UMA case.

The only difference there is that for machines that have
CONFIG_HIGHMEM enabled but don't have any highmem available,
->zone_start_pfn is zero whereas highstart_pfn is non-zero).

The field is left zeroed because of the !size test in
free_area_init_core() but shouldn't be a problem because
add_highpages_with_active_regions() handles empty ranges just
fine.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Mel Gorman <mel@csn.ul.ie>
LKML-Reference: <1236154567.29024.23.camel@penberg-laptop>
Signed-off-by: Ingo Molnar <mingo@elte.hu>