]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
15 years agopercpu: move fully free chunk reclamation into a work
Tejun Heo [Fri, 6 Mar 2009 15:44:11 +0000 (00:44 +0900)]
percpu: move fully free chunk reclamation into a work

Impact: code reorganization for later changes

Do fully free chunk reclamation using a work.  This change is to
prepare for locking changes.

Signed-off-by: Tejun Heo <tj@kernel.org>
15 years agopercpu: move chunk area map extension out of area allocation
Tejun Heo [Fri, 6 Mar 2009 15:44:09 +0000 (00:44 +0900)]
percpu: move chunk area map extension out of area allocation

Impact: code reorganization for later changes

Separate out chunk area map extension into a separate function -
pcpu_extend_area_map() - and call it directly from pcpu_alloc() such
that pcpu_alloc_area() is guaranteed to have enough area map slots on
invocation.

With this change, pcpu_alloc_area() does only area allocation and the
only failure mode is when the chunk doens't have enough room, so
there's no need to distinguish it from memory allocation failures.
Make it return -1 on such cases instead of hacky -ENOSPC.

Signed-off-by: Tejun Heo <tj@kernel.org>
15 years agopercpu: replace pcpu_realloc() with pcpu_mem_alloc() and pcpu_mem_free()
Tejun Heo [Fri, 6 Mar 2009 15:44:09 +0000 (00:44 +0900)]
percpu: replace pcpu_realloc() with pcpu_mem_alloc() and pcpu_mem_free()

Impact: code reorganization for later changes

With static map handling moved to pcpu_split_block(), pcpu_realloc()
only clutters the code and it's also unsuitable for scheduled locking
changes.  Implement and use pcpu_mem_alloc/free() instead.

Signed-off-by: Tejun Heo <tj@kernel.org>
15 years agox86, pebs: correct qualifier passed to ds_write_config() from ds_request_pebs()
Markus Metzger [Thu, 5 Mar 2009 07:57:21 +0000 (08:57 +0100)]
x86, pebs: correct qualifier passed to ds_write_config() from ds_request_pebs()

ds_write_config() can write the BTS as well as the PEBS part of
the DS config. ds_request_pebs() passes the wrong qualifier, which
results in the wrong configuration to be written.

Reported-by: Stephane Eranian <eranian@googlemail.com>
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
LKML-Reference: <20090305085721.A22550@sedona.ch.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, bts: remove bad warning
Markus Metzger [Thu, 5 Mar 2009 07:49:54 +0000 (08:49 +0100)]
x86, bts: remove bad warning

In case a ptraced task is reaped (while the tracer is still attached),
ds_exit_thread() is called before ptrace_exit(). The latter will
release the bts_tracer and remove the thread's ds_ctx.
The former will WARN() if the context is not NULL.

Oleg Nesterov submitted patches that move ptrace_exit() before
exit_thread() and thus reverse the order of the above calls.

Remove the bad warning. I will add it again when Oleg's changes are in.

Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
LKML-Reference: <20090305084954.A22000@sedona.ch.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: rename do_not_nx to disable_nx in mm/init_64.c
Pekka Enberg [Thu, 5 Mar 2009 15:04:57 +0000 (17:04 +0200)]
x86: rename do_not_nx to disable_nx in mm/init_64.c

As a preparational step for unifying noexec handling on 32-bit and 64-bit,
rename the do_not_nx variable to disable_nx on 64-bit.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
LKML-Reference: <1236265497.31324.11.camel@penberg-laptop>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: fix uninitialized variable in init_memory_mapping()
Pekka Enberg [Thu, 5 Mar 2009 15:04:26 +0000 (17:04 +0200)]
x86: fix uninitialized variable in init_memory_mapping()

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
LKML-Reference: <1236265466.31324.9.camel@penberg-laptop>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: make "memtest" like "memtest=17"
Yinghai Lu [Fri, 6 Mar 2009 11:12:50 +0000 (03:12 -0800)]
x86: make "memtest" like "memtest=17"

Impact: make boot command line "memtest" do one loop by default

So don't need to guess many patterns in one loop.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <49B10532.3020105@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoALSA: hda - Fix headphone-detect regression with multiple HP jacks
Takashi Iwai [Fri, 6 Mar 2009 08:43:58 +0000 (09:43 +0100)]
ALSA: hda - Fix headphone-detect regression with multiple HP jacks

The recent changes over the DAC detection mechanism in patch_sigmatel.c
breaks the HP detection on the machines with multiple HP jacks.
It's basically because of the workaround to support the multi-channel
output.  Since the HP detection is more important feature, disable
the HP-swap workaroud temporarily.

Reference: Novell bnc#482052
https://bugzilla.novell.com/show_bug.cgi?id=482052

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Fix typos in slave controls in patch_sigmatel.c
Takashi Iwai [Fri, 6 Mar 2009 08:42:07 +0000 (09:42 +0100)]
ALSA: hda - Fix typos in slave controls in patch_sigmatel.c

"Headphone Playback ..." appears twice in slave_vols[] and slave_sws[].
They should be "Headphone Playback2 ..."

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoblock: fix missing bio back/front segment size setting in blk_recount_segments()
Jens Axboe [Fri, 6 Mar 2009 07:55:24 +0000 (08:55 +0100)]
block: fix missing bio back/front segment size setting in blk_recount_segments()

Commit 1e42807918d17e8c93bf14fbb74be84b141334c1 introduced a bug where we
don't get front/back segment sizes in the bio in blk_recount_segments().
Fix this by tracking the back bio as well as the front bio in
__blk_recalc_rq_segments(), this also cleans up the interface by getting
rid of the segment size pointer passing.

Tested-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agox86, percpu: setup reserved percpu area for x86_64
Tejun Heo [Fri, 6 Mar 2009 05:33:59 +0000 (14:33 +0900)]
x86, percpu: setup reserved percpu area for x86_64

Impact: fix relocation overflow during module load

x86_64 uses 32bit relocations for symbol access and static percpu
symbols whether in core or modules must be inside 2GB of the percpu
segement base which the dynamic percpu allocator doesn't guarantee.
This patch makes x86_64 reserve PERCPU_MODULE_RESERVE bytes in the
first chunk so that module percpu areas are always allocated from the
first chunk which is always inside the relocatable range.

This problem exists for any percpu allocator but is easily triggered
when using the embedding allocator because the second chunk is located
beyond 2GB on it.

This patch also changes the meaning of PERCPU_DYNAMIC_RESERVE such
that it only indicates the size of the area to reserve for dynamic
allocation as static and dynamic areas can be separate.  New
PERCPU_DYNAMIC_RESERVED is increased by 4k for both 32 and 64bits as
the reserved area separation eats away some allocatable space and
having slightly more headroom (currently between 4 and 8k after
minimal boot sans module area) makes sense for common case
performance.

x86_32 can address anywhere from anywhere and doesn't need reserving.

Mike Galbraith first reported the problem first and bisected it to the
embedding percpu allocator commit.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Mike Galbraith <efault@gmx.de>
Reported-by: Jaswinder Singh Rajput <jaswinder@kernel.org>
15 years agopercpu, module: implement reserved allocation and use it for module percpu variables
Tejun Heo [Fri, 6 Mar 2009 05:33:59 +0000 (14:33 +0900)]
percpu, module: implement reserved allocation and use it for module percpu variables

Impact: add reserved allocation functionality and use it for module
percpu variables

This patch implements reserved allocation from the first chunk.  When
setting up the first chunk, arch can ask to set aside certain number
of bytes right after the core static area which is available only
through a separate reserved allocator.  This will be used primarily
for module static percpu variables on architectures with limited
relocation range to ensure that the module perpcu symbols are inside
the relocatable range.

If reserved area is requested, the first chunk becomes reserved and
isn't available for regular allocation.  If the first chunk also
includes piggy-back dynamic allocation area, a separate chunk mapping
the same region is created to serve dynamic allocation.  The first one
is called static first chunk and the second dynamic first chunk.
Although they share the page map, their different area map
initializations guarantee they serve disjoint areas according to their
purposes.

If arch doesn't setup reserved area, reserved allocation is handled
like any other allocation.

Signed-off-by: Tejun Heo <tj@kernel.org>
15 years agopercpu: add an indirection ptr for chunk page map access
Tejun Heo [Fri, 6 Mar 2009 05:33:59 +0000 (14:33 +0900)]
percpu: add an indirection ptr for chunk page map access

Impact: allow sharing page map, no functional difference yet

Make chunk->page access indirect by adding a pointer and renaming the
actual array to page_ar.  This will be used by future changes.

Signed-off-by: Tejun Heo <tj@kernel.org>
15 years agox86: make embedding percpu allocator return excessive free space
Tejun Heo [Fri, 6 Mar 2009 05:33:59 +0000 (14:33 +0900)]
x86: make embedding percpu allocator return excessive free space

Impact: reduce unnecessary memory usage on certain configurations

Embedding percpu allocator allocates unit_size *
smp_num_possible_cpus() bytes consecutively and use it for the first
chunk.  However, if the static area is small, this can result in
excessive prellocated free space in the first chunk due to
PCPU_MIN_UNIT_SIZE restriction.

This patch makes embedding percpu allocator preallocate only what's
necessary as described by PERPCU_DYNAMIC_RESERVE and return the
leftover to the bootmem allocator.

Signed-off-by: Tejun Heo <tj@kernel.org>
15 years agopercpu: use negative for auto for pcpu_setup_first_chunk() arguments
Tejun Heo [Fri, 6 Mar 2009 05:33:59 +0000 (14:33 +0900)]
percpu: use negative for auto for pcpu_setup_first_chunk() arguments

Impact: argument semantic cleanup

In pcpu_setup_first_chunk(), zero @unit_size and @dyn_size meant
auto-sizing.  It's okay for @unit_size as 0 doesn't make sense but 0
dynamic reserve size is valid.  Alos, if arch @dyn_size is calculated
from other parameters, it might end up passing in 0 @dyn_size and
malfunction when the size is automatically adjusted.

This patch makes both @unit_size and @dyn_size ssize_t and use -1 for
auto sizing.

Signed-off-by: Tejun Heo <tj@kernel.org>
15 years agopercpu: improve first chunk initial area map handling
Tejun Heo [Fri, 6 Mar 2009 05:33:59 +0000 (14:33 +0900)]
percpu: improve first chunk initial area map handling

Impact: no functional change

When the first chunk is created, its initial area map is not allocated
because kmalloc isn't online yet.  The map is allocated and
initialized on the first allocation request on the chunk.  This works
fine but the scattering of initialization logic between the init
function and allocation path is a bit confusing.

This patch makes the first chunk initialize and use minimal statically
allocated map from pcpu_setpu_first_chunk().  The map resizing path
still needs to handle this specially but it's more straight-forward
and gives more latitude to the init path.  This will ease future
changes.

Signed-off-by: Tejun Heo <tj@kernel.org>
15 years agopercpu: cosmetic renames in pcpu_setup_first_chunk()
Tejun Heo [Fri, 6 Mar 2009 05:33:59 +0000 (14:33 +0900)]
percpu: cosmetic renames in pcpu_setup_first_chunk()

Impact: cosmetic, preparation for future changes

Make the following renames in pcpur_setup_first_chunk() in preparation
for future changes.

* s/free_size/dyn_size/
* s/static_vm/first_vm/
* s/static_chunk/schunk/

Signed-off-by: Tejun Heo <tj@kernel.org>
15 years agopercpu: clean up percpu constants
Tejun Heo [Fri, 6 Mar 2009 05:33:58 +0000 (14:33 +0900)]
percpu: clean up percpu constants

Impact: cleaup

Make the following cleanups.

* There isn't much arch-specific about PERCPU_MODULE_RESERVE.  Always
  define it whether arch overrides PERCPU_ENOUGH_ROOM or not.

* blackfin overrides PERCPU_ENOUGH_ROOM to align static area size.  Do
  it by default.

* percpu allocation sizes doesn't have much to do with the page size.
  Don't use PAGE_SHIFT in their definition.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Bryan Wu <cooloney@kernel.org>
15 years agoMerge branch 'x86/uv' into x86/core
Ingo Molnar [Thu, 5 Mar 2009 20:49:47 +0000 (21:49 +0100)]
Merge branch 'x86/uv' into x86/core

15 years agoMerge branch 'x86/doc' into x86/core
Ingo Molnar [Thu, 5 Mar 2009 20:49:44 +0000 (21:49 +0100)]
Merge branch 'x86/doc' into x86/core

15 years agoMerge branch 'x86/mm' into x86/core
Ingo Molnar [Thu, 5 Mar 2009 20:49:35 +0000 (21:49 +0100)]
Merge branch 'x86/mm' into x86/core

15 years agoMerge branch 'x86/mce2' into x86/core
Ingo Molnar [Thu, 5 Mar 2009 20:49:25 +0000 (21:49 +0100)]
Merge branch 'x86/mce2' into x86/core

15 years agoMerge branch 'x86/urgent' into x86/core
Ingo Molnar [Thu, 5 Mar 2009 20:48:31 +0000 (21:48 +0100)]
Merge branch 'x86/urgent' into x86/core

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 ago[WATCHDOG] orion5x_wdt.c: 'ORION5X_TCLK' undeclared
Wim Van Sebroeck [Wed, 25 Feb 2009 12:33:01 +0000 (13:33 +0100)]
[WATCHDOG] orion5x_wdt.c: 'ORION5X_TCLK' undeclared

orion5x_wdt no longer compiled after the changes in commit
ebe35aff883496c07248df82c8576c3b6e84bbbe ("Orion: prepare for
runtime-determined timer tick rate").

The tick rate define (ORION5X_TCLK) was removed in favor of a runtime
detection. The quick fix is to add the define in the watchdog driver.
The fix is not correct for all supported orion5x platforms, but since
the supported platforms right now are 133 Mhz and 166 Mhz, it won't
be _that_ far off. ;-) A fix that uses the runtime-determined timer
tick rate will be applied later.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Cc: Kristof Provost <kristof@sigsegv.be>
Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>
Cc: Nicolas Pitre <nico@cam.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Andrew Morton <akpm@linux-foundation.org>
15 years agoiwlwifi: fix error flow in iwl*_pci_probe
Reinette Chatre [Tue, 3 Mar 2009 19:37:04 +0000 (11:37 -0800)]
iwlwifi: fix error flow in iwl*_pci_probe

Both the agn and 3945 drivers has some problems with dealing with
errors in their probe functions. Ensure that a goto will undo only
things that was done before the goto was called.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00 : more devices to rt73usb.c
Xose Vazquez Perez [Fri, 27 Feb 2009 23:34:23 +0000 (00:34 +0100)]
rt2x00 : more devices to rt73usb.c

add more usb_dev to rt73usb.c . IDs 'stolen' from the
windows inf file(10/21/2008, 1.03.02.0000) plus some
from the Ralink linux driver(2009_0206_RT73_Linux_STA_Drv1.1.0.2.tar.bz2)

Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00 : more devices to rt2500usb.c
Xose Vazquez Perez [Fri, 27 Feb 2009 23:26:09 +0000 (00:26 +0100)]
rt2x00 : more devices to rt2500usb.c

add more usb_dev to rt2500usb.c . IDs 'stolen' from the
windows inf file(02/12/2009, 2.01.01.0015).

Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoBlackfin arch: SPI_MMC is now mainlined MMC_SPI
Michael Hennerich [Thu, 5 Mar 2009 16:27:57 +0000 (00:27 +0800)]
Blackfin arch: SPI_MMC is now mainlined MMC_SPI

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: disable legacy /proc/scsi/ support by default
Mike Frysinger [Thu, 5 Mar 2009 16:27:17 +0000 (00:27 +0800)]
Blackfin arch: disable legacy /proc/scsi/ support by default

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: remove duplicated ANOMALY_05000448 ifdef check
Mike Frysinger [Thu, 5 Mar 2009 16:24:01 +0000 (00:24 +0800)]
Blackfin arch: remove duplicated ANOMALY_05000448 ifdef check

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoata: add CFA specific identify data words
Sergei Shtylyov [Thu, 5 Mar 2009 16:20:55 +0000 (17:20 +0100)]
ata: add CFA specific identify data words

Declare CFA specific identify data words 162 and 163 for future use.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
[bart: update patch summary/description]
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
15 years agoBlackfin arch: add stubs for anomalies 447 and 448
Mike Frysinger [Thu, 5 Mar 2009 16:20:49 +0000 (00:20 +0800)]
Blackfin arch: add stubs for anomalies 447 and 448

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
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 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 agobonding: Fix device passed into ->ndo_neigh_setup().
Patrick McHardy [Thu, 5 Mar 2009 09:57:44 +0000 (01:57 -0800)]
bonding: Fix device passed into ->ndo_neigh_setup().

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
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 agoMerge branch 'master' of /home/davem/src/GIT/linux-2.6/
David S. Miller [Thu, 5 Mar 2009 07:59:54 +0000 (23:59 -0800)]
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/

15 years agovlan: Fix vlan-in-vlan crashes.
David S. Miller [Thu, 5 Mar 2009 07:46:25 +0000 (23:46 -0800)]
vlan: Fix vlan-in-vlan crashes.

As analyzed by Patrick McHardy, vlan needs to reset it's
netdev_ops pointer in it's ->init() function but this
leaves the compat method pointers stale.

Add a netdev_resync_ops() and call it from the vlan code.

Any other driver which changes ->netdev_ops after register_netdevice()
will need to call this new function after doing so too.

With help from Patrick McHardy.

Tested-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: Fix missing dev->neigh_setup in register_netdevice().
David S. Miller [Thu, 5 Mar 2009 07:01:02 +0000 (23:01 -0800)]
net: Fix missing dev->neigh_setup in register_netdevice().

Signed-off-by: David S. Miller <davem@davemloft.net>
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 agotmspci: fix request_irq race
Meelis Roos [Wed, 4 Mar 2009 04:59:41 +0000 (04:59 +0000)]
tmspci: fix request_irq race

Currently, tmspci tokenring driver crashes on device initialization
because it requests its irq before initializing corresponding data
structures. Fix this by moving request_irq call to a safer place.

Signed-off-by: Meelis Roos <mroos@linux.ee>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agopkt_sched: act_police: Fix a rate estimator test.
Jarek Poplawski [Thu, 5 Mar 2009 01:38:10 +0000 (17:38 -0800)]
pkt_sched: act_police: Fix a rate estimator test.

A commit c1b56878fb68e9c14070939ea4537ad4db79ffae "tc: policing requires
a rate estimator" introduced a test which invalidates previously working
configs, based on examples from iproute2: doc/actions/actions-general.
This is too rigorous: a rate estimator is needed only when police's
"avrate" option is used.

Reported-by: Joao Correia <joaomiguelcorreia@gmail.com>
Diagnosed-by: John Dykstra <john.dykstra1@gmail.com>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
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 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 agotg3: Fix 5906 link problems
Matt Carlson [Wed, 25 Feb 2009 14:21:20 +0000 (14:21 +0000)]
tg3: Fix 5906 link problems

Commit 6833c043f9fc03696fde623914c4a0277df2a0bc introduced the phy
auto-powerdown capability.  While the APD feature only works for 5761
and 5784 asic revisions, the (harmless portion of the) code was applied
to all 5705 and newer devices.  However, the 5906 phy departs from the
usual design.  This commit was interfering with the 5906's ability to
negotiate link against some switches.  This patch corrects the problem.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
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>