pandora-kernel.git
14 years agoatm: use for_each_set_bit()
Akinobu Mita [Thu, 11 Mar 2010 12:07:50 +0000 (12:07 +0000)]
atm: use for_each_set_bit()

Replace open-coded loop with for_each_set_bit().

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agophonet: use for_each_set_bit()
Akinobu Mita [Thu, 11 Mar 2010 12:07:49 +0000 (12:07 +0000)]
phonet: use for_each_set_bit()

Replace open-coded loop with for_each_set_bit().

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotimestamping: fix example build
Randy Dunlap [Fri, 12 Mar 2010 19:23:27 +0000 (19:23 +0000)]
timestamping: fix example build

Fix Makefiles so that Documentation/networking/timestamping/timestamping.c
will build when using the CONFIG_BUILD_DOCSRC kconfig option.
(timestamping.c does not build currently with its simple Makefile.)

Also fix printf format warnings.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoARM: SAMSUNG: Fix build error from stale define in <plat/uncompress.h>
Ben Dooks [Mon, 15 Mar 2010 22:57:18 +0000 (22:57 +0000)]
ARM: SAMSUNG: Fix build error from stale define in <plat/uncompress.h>

The decleration of error() as static in the platform specific uncompress
code in  arch/arm/plat-samsung/include/plat/uncomopress.h causes the build
of the uncompressor to break. Remove it, as it is no longer needed.

arch/arm/boot/compressed/decompress.o: In function `gunzip':
/var/tmp/kernel-orig/arch/arm/boot/compressed/../../../../lib/decompress_inflate.c:67: undefined reference to `error'
/var/tmp/kernel-orig/arch/arm/boot/compressed/../../../../lib/decompress_inflate.c:73: undefined reference to `error'
/var/tmp/kernel-orig/arch/arm/boot/compressed/../../../../lib/decompress_inflate.c:80: undefined reference to `error'
/var/tmp/kernel-orig/arch/arm/boot/compressed/../../../../lib/decompress_inflate.c:95: undefined reference to `error'
/var/tmp/kernel-orig/arch/arm/boot/compressed/../../../../lib/decompress_inflate.c:152: undefined reference to `error'

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agodrivers/net: drop redundant memset
Julia Lawall [Tue, 9 Mar 2010 11:14:11 +0000 (11:14 +0000)]
drivers/net: drop redundant memset

The region set by the call to memset is immediately overwritten by the
subsequent call to memcpy.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression e1,e2,e3,e4;
@@

- memset(e1,e2,e3);
  memcpy(e1,e4,e3);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoi4l: change magic numbers in Eicon DIVA ISDN driver to symbolic names
Ian Munsie [Thu, 11 Mar 2010 12:07:25 +0000 (12:07 +0000)]
i4l: change magic numbers in Eicon DIVA ISDN driver to symbolic names

Replace references to the '20' magic number found throughout the Eicon
ISDN driver for the length of the station_id field in the T30_INFO struct
with the T30_MAX_STATION_ID_LENGTH symbolic constant.

Signed-off-by: Ian Munsie <imunsie@au.ibm.com>
Cc: Armin Schindler <mac@melware.de>
Cc: Karsten Keil <isdn@linux-pingi.de>
Cc: Stoyan Gaydarov <sgayda2@uiuc.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoi4l: silence compiler warnings for array access in Eicon DIVA ISDN driver
Ian Munsie [Thu, 11 Mar 2010 12:07:24 +0000 (12:07 +0000)]
i4l: silence compiler warnings for array access in Eicon DIVA ISDN driver

When compiling this driver, the compiler throws the following warnings:

drivers/isdn/hardware/eicon/message.c:8426: warning: array subscript is above array bounds
drivers/isdn/hardware/eicon/message.c:8427: warning: array subscript is above array bounds
drivers/isdn/hardware/eicon/message.c:8434: warning: array subscript is above array bounds
drivers/isdn/hardware/eicon/message.c:8435: warning: array subscript is above array bounds
drivers/isdn/hardware/eicon/message.c:8436: warning: array subscript is above array bounds
drivers/isdn/hardware/eicon/message.c:8447: warning: array subscript is above array bounds

This arises from the particular semantics the driver is using to write to
the nlc array (static byte[256]).  The array has a length in byte 0
followed by a T30_INFO struct starting at byte 1.

The T30_INFO struct has a number of variable length strings after the
station_id entry, which cannot be explicitly defined in the struct and the
driver accesses them with an array index to station_id beyond the length
of station_id.

This patch merely changes the semantics that the driver uses to access the
entries after the station_id entry to use the original 256 byte nlc array
taking the offset and length of the station_id entry to calculate where to
write in the array, thereby silencing the warning.

Signed-off-by: Ian Munsie <imunsie@au.ibm.com>
Cc: Armin Schindler <mac@melware.de>
Cc: Karsten Keil <isdn@linux-pingi.de>
Cc: Stoyan Gaydarov <sgayda2@uiuc.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoisdn: misplaced parenthesis in pof_handle_data()
Roel Kluin [Thu, 11 Mar 2010 12:07:22 +0000 (12:07 +0000)]
isdn: misplaced parenthesis in pof_handle_data()

The parenthesis was misplaced.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Karsten Keil <isdn@linux-pingi.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: change smp_mb() comment to conform the true
Stanislaw Gruszka [Tue, 9 Mar 2010 06:55:02 +0000 (06:55 +0000)]
bnx2x: change smp_mb() comment to conform the true

Access to fp->tx_bp_prod is protected by __netif_tx_lock,
smp_mb() is not needed for that.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: remove not necessary compiler barrier
Stanislaw Gruszka [Tue, 9 Mar 2010 06:55:01 +0000 (06:55 +0000)]
bnx2x: remove not necessary compiler barrier

Access to fp->tx_bd_prod is protected by __netif_tx_lock, so we do not
need any barrier for that.

Update of fp->tx_bd_cons in bnx2x_tx_int() is not protected by lock, but
barrier() nor smb_mb() in bnx2x_tx_avail() not guarantee we will see
values that is written on other cpu. Ordering issues between
netif_tx_stop_queue(), netif_tx_queue_stopped(), fp->tx_bd_cons = bd_cons
and bnx2x_tx_avail() are already handled by smp_mb() in bnx2x_tx_int()
and bnx2x_start_xmit().

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: use smp_mb() to keep ordering of read write operations
Stanislaw Gruszka [Tue, 9 Mar 2010 06:55:00 +0000 (06:55 +0000)]
bnx2x: use smp_mb() to keep ordering of read write operations

Since we want to keep ordering of write to fp->bd_tx_cons and
netif_tx_queue_stopped(txq), what is read of txq->state, we have to use
general memory barrier.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobe2net: fix mccq create for big endian architectures
Ajit Khaparde [Thu, 11 Mar 2010 01:35:59 +0000 (01:35 +0000)]
be2net: fix mccq create for big endian architectures

The request to create an mccq was being dispatched without
doing a byte swap of num_pages. This byte swap is necessary
for Big Endian systems like PPC. Not having this fix leads
mccq create to fail on BE ASICs running newer version of
firmware, thereby causing driver initialization failure.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoTI DaVinci EMAC: Convert to dev_pm_ops
chaithrika@ti.com [Wed, 10 Mar 2010 22:37:56 +0000 (22:37 +0000)]
TI DaVinci EMAC: Convert to dev_pm_ops

Migrate from the legacy PM hooks to use dev_pm_ops structure.

Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: davinci emac: use dma_{map, unmap}_single API for cache coherency
Sekhar Nori [Tue, 9 Mar 2010 01:20:37 +0000 (01:20 +0000)]
net: davinci emac: use dma_{map, unmap}_single API for cache coherency

The davinci emac driver uses some ARM specific DMA APIs
for cache coherency which have been removed from kernel
with the 2.6.34 merge.

Modify the driver to use the dma_{map, unmap}_single() APIs
defined in dma-mapping.h

Without this fix, the driver fails to compile on Linus's
tree.

Tested on DM365 and OMAP-L138 EVMs.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoARM: SAMSUNG: Add suspend/resume support for S3C PWM driver
Vasily Khoruzhick [Mon, 15 Mar 2010 14:27:08 +0000 (16:27 +0200)]
ARM: SAMSUNG: Add suspend/resume support for S3C PWM driver

Reset period_ns and duty_ns values in suspend handler to avoid skip of
configuration if same values passed to pwm_config;
Restore invertion bit in resume handler.

Without this patch PWM works incorrectly after resume from suspend.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoARM: S3C2440: Fix s3c2440 cpufreq compilation post move.
Vasily Khoruzhick [Sun, 14 Mar 2010 14:32:28 +0000 (16:32 +0200)]
ARM: S3C2440: Fix s3c2440 cpufreq compilation post move.

Fix compilation issue by moving s3c2440-cpufreq.c into mach-s3c2440 directory

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoe100: Fix ring parameter change handling regression.
David S. Miller [Mon, 15 Mar 2010 22:23:30 +0000 (15:23 -0700)]
e100: Fix ring parameter change handling regression.

When the PCI pool changes were added to fix resume failures:

commit 98468efddb101f8a29af974101c17ba513b07be1
e100: Use pci pool to work around GFP_ATOMIC order 5 memory allocation failu

and

commit 70abc8cb90e679d8519721e2761d8366a18212a6
e100: Fix broken cbs accounting due to missing memset.

This introduced a problem that can happen if the TX ring size
is increased.  We need to size the PCI pool using cbs->max
instead of the default cbs->count value.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoARM: Fix RiscPC decompressor build errors
Russell King [Mon, 15 Mar 2010 22:04:24 +0000 (22:04 +0000)]
ARM: Fix RiscPC decompressor build errors

arch/arm/boot/compressed/decompress.o: In function `do_decompress':
decompress.c:(.text+0x26e8): undefined reference to `error'
decompress.c:(.text+0x2760): undefined reference to `error'
decompress.c:(.text+0x27d8): undefined reference to `error'
decompress.c:(.text+0x2824): undefined reference to `error'
decompress.c:(.text+0x28f0): undefined reference to `error'

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoNFS: ensure bdi_unregister is called on mount failure.
NeilBrown [Thu, 11 Mar 2010 00:20:17 +0000 (11:20 +1100)]
NFS: ensure bdi_unregister is called on mount failure.

bdi_unregister is called by nfs_put_super which is only called by
generic_shutdown_super if ->s_root is not NULL.  So if we error out
in a circumstance where we called nfs_bdi_register (i.e. server !=
NULL) but have not set s_root, then we need to call bdi_unregister
explicitly in nfs_get_sb and various other *_get_sb() functions.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
14 years agoARM: Fix sorting of platform group config options and includes
Russell King [Mon, 15 Mar 2010 19:03:06 +0000 (19:03 +0000)]
ARM: Fix sorting of platform group config options and includes

... and document the sorting criteria to help future additions.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5991/1: Fix regression in restore_user_regs macro
Anders Grafström [Mon, 15 Mar 2010 15:04:14 +0000 (16:04 +0100)]
ARM: 5991/1: Fix regression in restore_user_regs macro

ARMv5T and earlier require that a ldm {}^ instruction is not followed
by an instruction that accesses banked registers. This patch restores
the nop that was lost in commit b86040a59feb255a8193173caa4d5199464433d5.

Signed-off-by: Anders Grafström <grfstrm@users.sourceforge.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agocifs: trivial white space
Dan Carpenter [Mon, 15 Mar 2010 08:22:26 +0000 (11:22 +0300)]
cifs: trivial white space

I fixed the indent level.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
14 years agoBtrfs: fix gfp flags masking in the compression code
Nick Piggin [Mon, 15 Mar 2010 15:05:29 +0000 (11:05 -0400)]
Btrfs: fix gfp flags masking in the compression code

GFP_FS must be masked out, NOFS can't be or'd in.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: don't look at bio flags after submit_bio
Chris Mason [Mon, 15 Mar 2010 14:21:30 +0000 (10:21 -0400)]
Btrfs: don't look at bio flags after submit_bio

After callling submit_bio, the bio can be freed at any time.  The
btrfs submission thread helper was checking the bio flags too late,
which might not give the correct answer.

When CONFIG_DEBUG_PAGE_ALLOC is turned on, it can lead to oopsen.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agobtrfs: using btrfs_stack_device_id() get devid
Xiao Guangrong [Wed, 6 Jan 2010 11:48:18 +0000 (11:48 +0000)]
btrfs: using btrfs_stack_device_id() get devid

We can use btrfs_stack_device_id() to get dev_item->devid

Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agobtrfs: use memparse
Akinobu Mita [Sun, 28 Feb 2010 10:59:11 +0000 (10:59 +0000)]
btrfs: use memparse

Use memparse() instead of its own private implementation.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Chris Mason <chris.mason@oracle.com>
Cc: linux-btrfs@vger.kernel.org
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: add a "df" ioctl for btrfs
Josef Bacik [Wed, 13 Jan 2010 18:19:06 +0000 (18:19 +0000)]
Btrfs: add a "df" ioctl for btrfs

df is a very loaded question in btrfs.  This gives us a way to get the per-space
usage information so we can tell exactly what is in use where.  This will help
us figure out ENOSPC problems, and help users better understand where their disk
space is going.

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: cache the extent state everywhere we possibly can V2
Josef Bacik [Wed, 3 Feb 2010 19:33:23 +0000 (19:33 +0000)]
Btrfs: cache the extent state everywhere we possibly can V2

This patch just goes through and fixes everybody that does

lock_extent()
blah
unlock_extent()

to use

lock_extent_bits()
blah
unlock_extent_cached()

and pass around a extent_state so we only have to do the searches once per
function.  This gives me about a 3 mb/s boots on my random write test.  I have
not converted some things, like the relocation and ioctl's, since they aren't
heavily used and the relocation stuff is in the middle of being re-written.  I
also changed the clear_extent_bit() to only unset the cached state if we are
clearing EXTENT_LOCKED and related stuff, so we can do things like this

lock_extent_bits()
clear delalloc bits
unlock_extent_cached()

without losing our cached state.  I tested this thoroughly and turned on
LEAK_DEBUG to make sure we weren't leaking extent states, everything worked out
fine.

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: cache ordered extent when completing io
Josef Bacik [Tue, 2 Feb 2010 20:51:14 +0000 (20:51 +0000)]
Btrfs: cache ordered extent when completing io

When finishing io we run btrfs_dec_test_ordered_pending, and then immediately
run btrfs_lookup_ordered_extent, but btrfs_dec_test_ordered_pending does that
already, so we're searching twice when we don't have to.  This patch lets us
pass a btrfs_ordered_extent in to btrfs_dec_test_ordered_pending so if we do
complete io on that ordered extent we can just use the one we found then instead
of having to do another btrfs_lookup_ordered_extent.  This made my fio job with
the other patch go from 24 mb/s to 29 mb/s.

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: cache extent state in find_delalloc_range
Josef Bacik [Tue, 2 Feb 2010 21:19:11 +0000 (21:19 +0000)]
Btrfs: cache extent state in find_delalloc_range

This patch makes us cache the extent state we find in find_delalloc_range since
we'll have to lock the extent later on in the function.  This will keep us from
re-searching for the rang when we try to lock the extent.

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: change the ordered tree to use a spinlock instead of a mutex
Josef Bacik [Tue, 2 Feb 2010 21:48:28 +0000 (21:48 +0000)]
Btrfs: change the ordered tree to use a spinlock instead of a mutex

The ordered tree used to need a mutex, but currently all we use it for is to
protect the rb_tree, and a spin_lock is just fine for that.  Using a spin_lock
instead makes dbench run a little faster, 58 mb/s instead of 51 mb/s, and have
less latency, 3445.138 ms instead of 3820.633 ms.

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: finish read pages in the order they are submitted
Chris Mason [Wed, 3 Feb 2010 18:18:45 +0000 (18:18 +0000)]
Btrfs: finish read pages in the order they are submitted

The endio is done at reverse order of bio vectors.

That means for a sequential read, the page first submitted will finish
last in a bio. Considering we will do checksum (making cache hot) for
every page, this does introduce delay (and chance to squeeze cache used
soon) for pages submitted at the begining.

I don't observe obvious performance difference with below patch at my
simple test, but seems more natural to finish read in the order they are
submitted.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agobtrfs: fix btrfs_mkdir goto for no free objectids
Miao Xie [Thu, 11 Feb 2010 08:06:58 +0000 (08:06 +0000)]
btrfs: fix btrfs_mkdir goto for no free objectids

btrfs_mkdir() must jump to the place of ending transaction after
btrfs_find_free_objectid() failed. Or this transaction can't end.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: flush data on snapshot creation
Sage Weil [Fri, 19 Feb 2010 22:13:50 +0000 (14:13 -0800)]
Btrfs: flush data on snapshot creation

Flush any delalloc extents when we create a snapshot, so that recently
written file data is always included in the snapshot.

A later commit will add the ability to snapshot without the flush, but
most people expect flushing.

Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: make df be a little bit more understandable
Josef Bacik [Fri, 5 Mar 2010 21:59:21 +0000 (21:59 +0000)]
Btrfs: make df be a little bit more understandable

The way we report df usage is way confusing for everybody, including some other
utilities (bacula for one).  So this patch makes df a little bit more
understandable.  First we make used actually count the total amount of used
space in all space info's.  This will give us a real view of how much disk space
is in use.  Second, for blocks available, only count data space.  This makes
things like bacula work because it says 0 when you can no longer write anymore
data to the disk.  I think this is a nice compromise, since you will end up with
something like the following

[root@alpha ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
                      148G   30G  111G  21% /
/dev/sda1             194M  116M   68M  64% /boot
tmpfs                 985M   12K  985M   1% /dev/shm
/dev/mapper/VolGroup-LogVol02
                      145G  140G     0 100% /mnt/btrfs-test

Compare this with btrfsctl -i output

[root@alpha btrfs-progs-unstable]# ./btrfsctl -i /mnt/btrfs-test/
Metadata, DUP: total=4.62GB, used=2.46GB
System, DUP: total=8.00MB, used=24.00KB
Data: total=134.80GB, used=134.80GB
Metadata: total=8.00MB, used=0.00
System: total=4.00MB, used=0.00
operation complete

This way we show that there is no more data space to be used, but we have
another 5GB of space left for metadata.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agobtrfs: Update existing btrfs_device for renaming device
TARUISI Hiroaki [Tue, 9 Feb 2010 06:36:45 +0000 (06:36 +0000)]
btrfs: Update existing btrfs_device for renaming device

When we scan devices in a multi-device filesystem, we memorize the original
name.  If the device gets a new name, later scans don't update the
in-kernel structures related to it, and we're not able to mount the
filesystem.

This patch updates device name during scaning.

Signed-off-by: TARUISI Hiroaki <taruishi.hiroak@jp.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: add new defrag-range ioctl.
Chris Mason [Thu, 11 Mar 2010 14:42:04 +0000 (09:42 -0500)]
Btrfs: add new defrag-range ioctl.

The btrfs defrag ioctl was limited to doing the entire file.  This
commit adds a new interface that can defrag a specific range inside
the file.

It can also force compression on the file, allowing you to selectively
compress individual files after they were created, even when mount -o
compress isn't turned on.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: be more selective in the defrag ioctl
Chris Mason [Wed, 10 Mar 2010 15:52:59 +0000 (10:52 -0500)]
Btrfs: be more selective in the defrag ioctl

The btrfs defrag ioctl had some bugs around delalloc accounting, and it
wasn't properly skipping pages that were not in the mapping.

It wasn't properly clearing the page checked flag, which could make the
writeback code ignore the page forever while pinning it as dirty.

This commit fixes those problems and makes defrag a little smarter.  It
skips holes and it doesn't waste time defragging large extents.  If a
tiny extent comes before a very large extent, it will defrag both of
them to make sure the tiny extent ends up next to something big.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: run the backing dev more often in the submit_bio helper
Chris Mason [Wed, 10 Mar 2010 20:33:32 +0000 (15:33 -0500)]
Btrfs: run the backing dev more often in the submit_bio helper

The submit_bio helper thread can decide to loop back around to
service more bios.  This commit forces it to unplug first, which helps
reduce the latency seen by submitters.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: make subvolid=0 mount the original default root
Josef Bacik [Mon, 14 Dec 2009 19:18:38 +0000 (19:18 +0000)]
Btrfs: make subvolid=0 mount the original default root

Since theres not a good way to make sure the user sees the original default root
tree id, and not to mention it's 5 so is way different than any other volume,
just make subvol=0 mount the original default root.  This makes it a bit easier
for users to handle in the long run.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: add ioctl and incompat flag to set the default mount subvol
Josef Bacik [Fri, 11 Dec 2009 21:11:29 +0000 (21:11 +0000)]
Btrfs: add ioctl and incompat flag to set the default mount subvol

This patch needs to go along with my previous patch.  This lets us set the
default dir item's location to whatever root we want to use as our default
mounting subvol.  With this we don't have to use mount -o subvol=<tree id>
anymore to mount a different subvol, we can just set the new one and it will
just magically work.  I've done some moderate testing with this, mostly just
switching the default mount around, mounting subvols and the default mount at
the same time and such, everything seems to work.  Thanks,

Older kernels would generally be able to still mount the filesystem with the
default subvolume set, but it would result in a different volume being mounted,
which could be an even more unpleasant suprise for users.  So if you set your
default subvolume, you can't go back to older kernels.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: change how we mount subvolumes
Josef Bacik [Fri, 4 Dec 2009 17:38:27 +0000 (17:38 +0000)]
Btrfs: change how we mount subvolumes

This work is in preperation for being able to set a different root as the
default mounting root.

There is currently a problem with how we mount subvolumes.  We cannot currently
mount a subvolume of a subvolume, you can only mount subvolumes/snapshots of the
default subvolume.  So say you take a snapshot of the default subvolume and call
it snap1, and then take a snapshot of snap1 and call it snap2, so now you have

/
/snap1
/snap1/snap2

as your available volumes.  Currently you can only mount / and /snap1,
you cannot mount /snap1/snap2.  To fix this problem instead of passing
subvolid=<name> you must pass in subvolid=<treeid>, where <treeid> is
the tree id that gets spit out via the subvolume listing you get from
the subvolume listing patches (btrfs filesystem list).  This allows us
to mount /, /snap1 and /snap1/snap2 as the root volume.

In addition to the above, we also now read the default dir item in the
tree root to get the root key that it points to.  For now this just
points at what has always been the default subvolme, but later on I plan
to change it to point at whatever root you want to be the new default
root, so you can just set the default mount and not have to mount with
-o subvolid=<treeid>.  I tested this out with the above scenario and it
worked perfectly.  Thanks,

mount -o subvol operates inside the selected subvolid.  For example:

mount -o subvol=snap1,subvolid=256 /dev/xxx /mnt

/mnt will have the snap1 directory for the subvolume with id
256.

mount -o subvol=snap /dev/xxx /mnt

/mnt will be the snap directory of whatever the default subvolume
is.

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: make set/get functions for the super compat_ro flags use compat_ro
Josef Bacik [Thu, 17 Dec 2009 21:32:27 +0000 (21:32 +0000)]
Btrfs: make set/get functions for the super compat_ro flags use compat_ro

Our set/get functions for compat_ro_flags actually look at compat_flags.  This
will mess any attempt to use compat flags up.  The fix is obvious.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: add search and inode lookup ioctls
Chris Mason [Sun, 28 Feb 2010 20:39:26 +0000 (15:39 -0500)]
Btrfs: add search and inode lookup ioctls

The search ioctl is a generic tool for doing btree searches from
userland applications.  The first user of the search ioctl is a
subvolume listing feature, but we'll also use it to find new
files in a subvolume.

The search ioctl allows you to specify min and max keys to search for,
along with min and max transid.  It returns the items along with a
header that includes the item key.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: add a function to lookup a directory path by following backrefs
TARUISI Hiroaki [Wed, 18 Nov 2009 05:42:14 +0000 (05:42 +0000)]
Btrfs: add a function to lookup a directory path by following backrefs

This will be used by the inode lookup ioctl.

Signed-off-by: TARUISI Hiroaki <taruishi.hiroak@jp.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoALSA: hda - Disable MSI for Nvidia controller
Takashi Iwai [Mon, 15 Mar 2010 14:51:53 +0000 (15:51 +0100)]
ALSA: hda - Disable MSI for Nvidia controller

Judging from the member of enable_msi white-list, Nvidia controller
seems to cause troubles with MSI enabled, e.g. boot hang up or other
serious issue may come up.  It's safer to disable MSI as default for
Nvidia controllers again for now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
14 years agoARM: 5989/1: ARM: KGDB: add support for SMP platforms
Will Deacon [Fri, 12 Mar 2010 10:03:58 +0000 (11:03 +0100)]
ARM: 5989/1: ARM: KGDB: add support for SMP platforms

To support SMP platforms, KGDB requires the architecture backend to
implement the kgdb_roundup_cpus function.

This patch, taken against 2.6.33, implements the function for ARM based
on the MIPS port.

Cc: Jason Wessel <jason.wessel@windriver.com>
Cc: Jean-Michel Hautbois <jhautbois@gmail.com>
Cc: KGDB Mailing List <kgdb-bugreport@lists.sourceforge.net>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5990/1: ARM: use __armv5tej_mmu_cache_flush for V5TEJ instead of __armv4_mmu_cac...
Sascha Hauer [Mon, 15 Mar 2010 14:14:50 +0000 (15:14 +0100)]
ARM: 5990/1: ARM: use __armv5tej_mmu_cache_flush for V5TEJ instead of __armv4_mmu_cache_flush

This got broken with commit 0e056f20

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: Add final piece to fix XIP decompressor in read-only memory
Russell King [Mon, 15 Mar 2010 14:29:22 +0000 (14:29 +0000)]
ARM: Add final piece to fix XIP decompressor in read-only memory

This defines STATIC_RW_DATA, which prevents the read/write malloc
management data being declared with a static attribute.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/lethal/genesis-2.6
Russell King [Mon, 15 Mar 2010 14:27:06 +0000 (14:27 +0000)]
Merge /pub/scm/linux/kernel/git/lethal/genesis-2.6

14 years agopcmcia: add important if statement
Dan Carpenter [Mon, 15 Mar 2010 08:25:10 +0000 (11:25 +0300)]
pcmcia: add important if statement

There was a problem introduced in Jul 2008 by:
0e6f9d270840 pcmcia: use pcmcia_loop_config in scsi pcmcia drivers

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
14 years agopcmcia: re-route Cardbus IRQ to ISA on ti1130 bridges if necessary
Jens Künzer [Sat, 6 Mar 2010 07:27:22 +0000 (08:27 +0100)]
pcmcia: re-route Cardbus IRQ to ISA on ti1130 bridges if necessary

As the PCI irq pin of the ti1130 pcmcia bridge is not connected (at
least on some old IBM Thinkpad 760ED notebooks), the Cardbus IRQ has
to be routed to an ISA irq.

Part 3 of a series to allow the ISA irq to be used for Cardbus devices
if the socket's PCI irq is unusable.

[linux@dominikbrodowski.net: split up the original patch, commit message,
 cleanup]

Signed-off-by: Jens Kuenzer <Jens.Kuenzer@fpga.homeip.net>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
14 years agopcmcia: allow for cb_irq to differ from pci_dev's irq in yenta_socket
Jens Künzer [Sat, 6 Mar 2010 07:02:24 +0000 (08:02 +0100)]
pcmcia: allow for cb_irq to differ from pci_dev's irq in yenta_socket

cb_irq is presumed to be the same as the pci_dev's irq. This won't be
true any more as soon as we allow the ISA irq to be used for Cardbus
devices. Therefore, use the pci_dev's irq explicitely whenever we
care about it.

Part 2 of a series to allow the ISA irq to be used for Cardbus devices
if the socket's PCI irq is unusable.

[linux@dominikbrodowski.net: split up the original patch, commit message]

Signed-off-by: Jens Kuenzer <Jens.Kuenzer@fpga.homeip.net>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
14 years agopcmcia: honor saved flags in yenta_socket's I365_CSCINT register
Jens Künzer [Sat, 6 Mar 2010 06:46:16 +0000 (07:46 +0100)]
pcmcia: honor saved flags in yenta_socket's I365_CSCINT register

Instead of overwriting the I365_CSCINT register, save the old value and
merely change the bits we care about.

Part 1 of a series to allow the ISA irq to be used for Cardbus devices
if the socket's PCI irq is unusable.

[linux@dominikbrodowski.net: split up the original patch, commit message]

Signed-off-by: Jens Kuenzer <Jens.Kuenzer@fpga.homeip.net>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
14 years agopcmcia: revert "irq probe can be done without risking an IRQ storm"
Dominik Brodowski [Tue, 9 Mar 2010 16:17:36 +0000 (17:17 +0100)]
pcmcia: revert "irq probe can be done without risking an IRQ storm"

This reverts commit 635416ef393e8cec5a89fc6c1de710ee9596a51e. The
argument passed to request_irq() only affects action->flags (IRQF_*),
but IRQ_NOAUTOEN relates to desc->status.

Reported-by: Jan Beulich <JBeulich@novell.com>
CC: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
14 years agopcmcia: pd6729, i82092: use parent (PCI) resources
Dominik Brodowski [Sat, 13 Mar 2010 16:42:39 +0000 (17:42 +0100)]
pcmcia: pd6729, i82092: use parent (PCI) resources

A newly added parent resource entry for the root PCI bus, such as

40000000-ffffffff : PCI Bus #00

means that the pd6729 and i82092 drivers cannot allocate iomem as
freely as before, unless they do so as PCI devices. Therefore, set
socket->cb_dev so that rsrc_nonstatic.c does the right thing.

Reported-by: Komuro <komurojun-mbn@nifty.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
14 years agopcmcia/vrc4171: use local spinlock for device local lock.
Yoichi Yuasa [Wed, 10 Mar 2010 06:57:56 +0000 (15:57 +0900)]
pcmcia/vrc4171: use local spinlock for device local lock.

struct pcmcia_socket lock had been used before.

Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
14 years agoALSA: hda - Add PCI quirks for MSI NetOn AP1900 and Wind Top AE2220
Anisse Astier [Wed, 10 Mar 2010 18:17:46 +0000 (19:17 +0100)]
ALSA: hda - Add PCI quirks for MSI NetOn AP1900 and Wind Top AE2220

This should make the speakers and jack detection work on MSI all-in-one
computers NetOn AP1900 and Wind Top AE2220.

Signed-off-by: Anisse Astier <anisse@astier.eu>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda - Fix secondary ADC of ALC260 basic model
Takashi Iwai [Mon, 15 Mar 2010 08:07:52 +0000 (09:07 +0100)]
ALSA: hda - Fix secondary ADC of ALC260 basic model

Fix adc_nids[] for ALC260 basic model to match with num_adc_nids.
Otherwise you get an invalid NID in the secondary "Input Source" mixer
element.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
14 years agoALSA: hda - Add an error message for invalid mapping NID
Takashi Iwai [Mon, 15 Mar 2010 08:05:46 +0000 (09:05 +0100)]
ALSA: hda - Add an error message for invalid mapping NID

Add an error message to snd_hda_add_nid() for invalid mapping NID to make
easier to hunt the buggy code.

Also added a missing space to the error message in snd_hda_build_controls()

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda - New Intel HDA controller
Vitaliy Kulikov [Mon, 15 Mar 2010 08:01:26 +0000 (09:01 +0100)]
ALSA: hda - New Intel HDA controller

Added a PCI controller id on new Dell laptops.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
Linus Torvalds [Mon, 15 Mar 2010 03:29:21 +0000 (20:29 -0700)]
Merge branch 'release' of git://git./linux/kernel/git/lenb/linux-acpi-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (34 commits)
  ACPI: processor: push file static MADT pointer into internal map_madt_entry()
  ACPI: processor: refactor internal map_lsapic_id()
  ACPI: processor: refactor internal map_x2apic_id()
  ACPI: processor: refactor internal map_lapic_id()
  ACPI: processor: driver doesn't need to evaluate _PDC
  ACPI: processor: remove early _PDC optin quirks
  ACPI: processor: add internal processor_physically_present()
  ACPI: processor: move acpi_get_cpuid into processor_core.c
  ACPI: processor: export acpi_get_cpuid()
  ACPI: processor: mv processor_pdc.c processor_core.c
  ACPI: processor: mv processor_core.c processor_driver.c
  ACPI: plan to delete "acpi=ht" boot option
  ACPI: remove "acpi=ht" DMI blacklist
  PNPACPI: add bus number support
  PNPACPI: add window support
  resource: add window support
  resource: add bus number support
  resource: expand IORESOURCE_TYPE_BITS to make room for bus resource type
  acpiphp: Execute ACPI _REG method for hotadded devices
  ACPI video: Be more liberal in validating _BQC behaviour
  ...

14 years agoinit dynamic bin_attribute structures
Wolfram Sang [Mon, 15 Mar 2010 00:29:41 +0000 (01:29 +0100)]
init dynamic bin_attribute structures

Commit 6992f5334995af474c2b58d010d08bc597f0f2fe ("sysfs: Use one lockdep
class per sysfs attribute.") introduced this requirement.  First, at25
was fixed manually.  Then, other occurences were found with coccinelle
and the following semantic patch.  Results were reviewed and fixed up:

    @ init @
    identifier struct_name, bin;
    @@

     struct struct_name {
     ...
     struct bin_attribute bin;
     ...
     };

    @ main extends init @
    expression E;
    statement S;
    identifier name, err;
    @@

    (
     struct struct_name *name;
    |
    - struct struct_name *name = NULL;
    + struct struct_name *name;
    )
     ...
    (
     sysfs_bin_attr_init(&name->bin);
    |
    + sysfs_bin_attr_init(&name->bin);
     if (sysfs_create_bin_file(E, &name->bin))
     S
    |
    + sysfs_bin_attr_init(&name->bin);
     err = sysfs_create_bin_file(E, &name->bin);
    )

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agovideo: enable sh_mobile_lcdc on SH-Mobile ARM
Magnus Damm [Wed, 10 Mar 2010 11:33:10 +0000 (11:33 +0000)]
video: enable sh_mobile_lcdc on SH-Mobile ARM

This patch enables the sh_mobile_lcdc driver on
SH-Mobile ARM.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agoARM: mach-shmobile: ap4evb SDHI0 platform data V2
Magnus Damm [Wed, 10 Mar 2010 09:26:44 +0000 (09:26 +0000)]
ARM: mach-shmobile: ap4evb SDHI0 platform data V2

Add SDHI0 platform data for the AP4EVB board V2.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agoARM: mach-shmobile: sh7372 SDHI vector merge
Magnus Damm [Wed, 10 Mar 2010 05:17:24 +0000 (05:17 +0000)]
ARM: mach-shmobile: sh7372 SDHI vector merge

Merge the SDHI vectors for sh7372 using the recently
merged INTC force_enable/disable feature.

With this in place SDHI hotplug is supported using
the drivers sh_mobile_sdhi and tmio_mmc.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agoARM: mach-shmobile: sh7377 SDHI vector merge
Magnus Damm [Wed, 10 Mar 2010 05:15:16 +0000 (05:15 +0000)]
ARM: mach-shmobile: sh7377 SDHI vector merge

Merge the SDHI vectors for sh7377 using the recently
merged INTC force_enable/disable feature.

With this in place SDHI hotplug is supported using
the drivers sh_mobile_sdhi and tmio_mmc.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agoARM: mach-shmobile: sh7367 SDHI vector merge
Magnus Damm [Wed, 10 Mar 2010 05:13:12 +0000 (05:13 +0000)]
ARM: mach-shmobile: sh7367 SDHI vector merge

Merge the SDHI vectors for sh7367 using the recently
merged INTC force_enable/disable feature.

With this in place SDHI hotplug is supported using
the drivers sh_mobile_sdhi and tmio_mmc.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agoARM: mach-shmobile: G4EVM KEYSC platform data
NISHIMOTO Hiroki [Tue, 23 Feb 2010 10:55:10 +0000 (10:55 +0000)]
ARM: mach-shmobile: G4EVM KEYSC platform data

This patch adds KEYSC platform data for the G4EVM board.

Signed-off-by: NISHIMOTO Hiroki <nishimoto.hiroki@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agomtd: enable sh_flctl on SH-Mobile ARM
Magnus Damm [Fri, 19 Feb 2010 10:01:22 +0000 (10:01 +0000)]
mtd: enable sh_flctl on SH-Mobile ARM

Update the Kconfig entry for the sh_flctl driver to
enable build on SH-Mobile ARM platforms.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agoARM: mach-shmobile: G3EVM FLCTL platform data
Magnus Damm [Fri, 19 Feb 2010 09:54:06 +0000 (09:54 +0000)]
ARM: mach-shmobile: G3EVM FLCTL platform data

This patch adds FLCTL platform data for the G3EVM board.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agoARM: mach-shmobile: G3EVM KEYSC platform data
Magnus Damm [Tue, 16 Feb 2010 10:48:15 +0000 (10:48 +0000)]
ARM: mach-shmobile: G3EVM KEYSC platform data

This patch adds KEYSC platform data for the G3EVM board.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agoMerge branches 'battery-2.6.34', 'bugzilla-10805', 'bugzilla-14668', 'bugzilla-531916...
Len Brown [Mon, 15 Mar 2010 01:30:17 +0000 (21:30 -0400)]
Merge branches 'battery-2.6.34', 'bugzilla-10805', 'bugzilla-14668', 'bugzilla-531916-power-state', 'ht-warn-2.6.34', 'pnp', 'processor-rename', 'sony-2.6.34', 'suse-bugzilla-531547', 'tz-check', 'video' and 'misc-2.6.34' into release

14 years agoACPI: processor: push file static MADT pointer into internal map_madt_entry()
Alex Chiang [Mon, 22 Feb 2010 19:12:00 +0000 (12:12 -0700)]
ACPI: processor: push file static MADT pointer into internal map_madt_entry()

There's no real need for a pointer to the MADT to be global. The only
function who uses it is map_madt_entry.

This allows us to remove some more ugly #ifdefs.

Acked-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoACPI: processor: refactor internal map_lsapic_id()
Alex Chiang [Mon, 22 Feb 2010 19:11:55 +0000 (12:11 -0700)]
ACPI: processor: refactor internal map_lsapic_id()

Un-nest the if statements for readability.

Remove comments that re-state the obvious.

Change the control flow so that we no longer need a temp variable.

Acked-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoACPI: processor: refactor internal map_x2apic_id()
Alex Chiang [Mon, 22 Feb 2010 19:11:50 +0000 (12:11 -0700)]
ACPI: processor: refactor internal map_x2apic_id()

Untangle the nested if conditions to make this function look
more similar to the other map_*apic_id() functions.

Acked-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoACPI: processor: refactor internal map_lapic_id()
Alex Chiang [Mon, 22 Feb 2010 19:11:44 +0000 (12:11 -0700)]
ACPI: processor: refactor internal map_lapic_id()

Untangle the if() statement a little for readability.

Acked-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoACPI: processor: driver doesn't need to evaluate _PDC
Alex Chiang [Mon, 22 Feb 2010 19:11:39 +0000 (12:11 -0700)]
ACPI: processor: driver doesn't need to evaluate _PDC

Now that the early _PDC evaluation path knows how to correctly
evaluate _PDC on only physically present processors, there's no
need for the processor driver to evaluate it later when it loads.

To cover the hotplug case, push _PDC evaluation down into the
hotplug paths.

Cc: x86@kernel.org
Cc: Tony Luck <tony.luck@intel.com>
Acked-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoACPI: processor: remove early _PDC optin quirks
Alex Chiang [Mon, 22 Feb 2010 19:11:34 +0000 (12:11 -0700)]
ACPI: processor: remove early _PDC optin quirks

Now that we check for physically present processors before blindly
evaluating _PDC, we no longer need to maintain a DMI opt-in table
nor a kernel param.

Acked-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoACPI: processor: add internal processor_physically_present()
Alex Chiang [Mon, 22 Feb 2010 19:11:29 +0000 (12:11 -0700)]
ACPI: processor: add internal processor_physically_present()

Detect if a processor is physically present before evaluating _PDC.

We want this because some BIOS will provide a _PDC even for processors
that are not present. These bogus _PDC methods then attempt to load
non-existent tables, which causes problems.

Avoid those bogus landmines.

Acked-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoACPI: processor: move acpi_get_cpuid into processor_core.c
Alex Chiang [Mon, 22 Feb 2010 19:11:24 +0000 (12:11 -0700)]
ACPI: processor: move acpi_get_cpuid into processor_core.c

Enumerating processors (via MADT/_MAT) belongs in the processor core,
which is always built-in, rather than living in the processor driver
which may not be built.

Acked-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoACPI: processor: export acpi_get_cpuid()
Alex Chiang [Mon, 22 Feb 2010 19:11:19 +0000 (12:11 -0700)]
ACPI: processor: export acpi_get_cpuid()

Rename static get_cpu_id() to acpi_get_cpuid() and export it.

This change also gives us an opportunity to remove the
#ifndef CONFIG_SMP from processor_driver.c and into a header file
where it properly belongs.

Acked-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoACPI: processor: mv processor_pdc.c processor_core.c
Alex Chiang [Mon, 22 Feb 2010 19:11:14 +0000 (12:11 -0700)]
ACPI: processor: mv processor_pdc.c processor_core.c

We've renamed the old processor_core.c to processor_driver.c, to
convey the idea that it can be built modular and has driver-like
bits.

Now let's re-create a processor_core.c for the bits needed
statically by the rest of the kernel. The contents of processor_pdc.c
are a good starting spot, so let's just rename that file and
complete our three card monte.

Acked-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoACPI: processor: mv processor_core.c processor_driver.c
Alex Chiang [Mon, 22 Feb 2010 19:11:08 +0000 (12:11 -0700)]
ACPI: processor: mv processor_core.c processor_driver.c

The ACPI processor driver can be built as a module. But it has
pieces of code that should always be built statically into the
kernel.

The plan is for processor_core.c to contain the static bits while
processor_driver.c contains the module-like bits.

Since the bulk of the code in the current processor_core.c is
module-like, first step is to rename the file to processor_driver.c

Next step will re-create processor_core.c and cherry-pick out
the static bits.

Acked-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoACPI: plan to delete "acpi=ht" boot option
Len Brown [Sun, 14 Mar 2010 20:28:46 +0000 (16:28 -0400)]
ACPI: plan to delete "acpi=ht" boot option

Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoACPI: remove "acpi=ht" DMI blacklist
Len Brown [Fri, 19 Feb 2010 04:42:47 +0000 (23:42 -0500)]
ACPI: remove "acpi=ht" DMI blacklist

SuSE added these entries when deploying ACPI in Linux-2.4.
I pulled them into Linux-2.6 on 2003-08-09.
Over the last 6+ years, several entries have proven to be
unnecessary and deleted, while no new entries have been added.
Matthew suggests that they now have negative value, and I agree.

Based-on-patch-by: Matthew Garrett <mjg59@srcf.ucam.org>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoPNPACPI: add bus number support
Bjorn Helgaas [Fri, 5 Mar 2010 17:47:57 +0000 (10:47 -0700)]
PNPACPI: add bus number support

Add support for bus number resources.  This is for bridges with a range of
bus numbers behind them.  Previously, PNP ignored bus number resources.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoPNPACPI: add window support
Bjorn Helgaas [Fri, 5 Mar 2010 17:47:52 +0000 (10:47 -0700)]
PNPACPI: add window support

Add support for resource windows.  This is for bridge resources, i.e.,
regions where a bridge forwards transactions from the primary to the
secondary side.  This does not add support for *setting* windows via
the /proc interface.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoresource: add window support
Bjorn Helgaas [Fri, 5 Mar 2010 17:47:47 +0000 (10:47 -0700)]
resource: add window support

Add support for resource windows.  This is for bridge resources, i.e.,
regions where a bridge forwards transactions from the primary to the
secondary side.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoresource: add bus number support
Bjorn Helgaas [Fri, 5 Mar 2010 17:47:42 +0000 (10:47 -0700)]
resource: add bus number support

Add support for bus number resources.  This is for bridges with a range of
bus numbers behind them.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoresource: expand IORESOURCE_TYPE_BITS to make room for bus resource type
Bjorn Helgaas [Fri, 5 Mar 2010 17:47:26 +0000 (10:47 -0700)]
resource: expand IORESOURCE_TYPE_BITS to make room for bus resource type

No functional change; this just makes room for another resource type.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agotomoyo: fix potential use after free
Dan Carpenter [Sat, 13 Mar 2010 11:14:22 +0000 (14:14 +0300)]
tomoyo: fix potential use after free

The original code returns a freed pointer.  This function is expected to
return NULL on errors.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: James Morris <jmorris@namei.org>
14 years agoacpiphp: Execute ACPI _REG method for hotadded devices
Shaohua Li [Thu, 25 Feb 2010 02:59:34 +0000 (10:59 +0800)]
acpiphp: Execute ACPI _REG method for hotadded devices

Per ACPI spec, _ERG method should be executed before device driver
gets control for hotpluged device. Firmware might do some configuration
there. See http://bugzilla.kernel.org/show_bug.cgi?id=10805. In this
machine, _REG method of docked device will configure cardbus bridge.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Tested-by: Paul Martin <pm@debian.org>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoACPI video: Be more liberal in validating _BQC behaviour
Matthew Garrett [Tue, 16 Feb 2010 21:53:50 +0000 (16:53 -0500)]
ACPI video: Be more liberal in validating _BQC behaviour

Right now, if _BQC returns a value we don't understand we immediately
invalidate it. Change this behaviour so we only invalidate it if it
continues to give an invalid answer after we've already set a brightness.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Acked-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoVideo: ARM CLCD: Better fix for swapped IENB and CNTL registers
Russell King [Fri, 12 Feb 2010 14:32:01 +0000 (14:32 +0000)]
Video: ARM CLCD: Better fix for swapped IENB and CNTL registers

On PL111, as found on Realview and other platforms, these registers are
always arranged as CNTL then IENB.  On PL110, these registers are IENB
then CNTL, except on Versatile platforms.

Re-arrange the handling of these register swaps so that PL111 always
gets it right without resorting to ifdefs, leaving the only case needing
special handling being PL110 on Versatile.

Fill out amba/clcd.h with the PL110/PL111 register definition
differences in case someone tries to use the PL110 specific definitions
on PL111.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: Add L2 cache handling to smp boot support
Russell King [Fri, 12 Feb 2010 14:36:24 +0000 (14:36 +0000)]
ARM: Add L2 cache handling to smp boot support

The page table and secondary data which we're asking the secondary CPU
to make use of has to hit RAM to ensure that the secondary CPU can see
it since it may not be taking part in coherency or cache searches at
this point.

Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoMerge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 14 Mar 2010 18:15:45 +0000 (11:15 -0700)]
Merge branch 'core-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86/mce: Fix build bug with CONFIG_PROVE_LOCKING=y && CONFIG_X86_MCE_INTEL=y

14 years agoAdd include to i2c-xii.c to fix build error
Randy Dunlap [Thu, 4 Feb 2010 20:11:09 +0000 (12:11 -0800)]
Add include to i2c-xii.c to fix build error

drivers/i2c/busses/i2c-xiic.c:493: error: implicit declaration of function 'mdelay'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: "Richard Röjfors" <richard.rojfors@pelagicore.com>
Cc: "Ben Dooks (embedded platforms)" <ben-linux@fluff.org>
Cc: linux-i2c@vger.kernel.org
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoAdd the platform data include for the Xilinx XPS IIC Bus Interface
Richard Röjfors [Tue, 9 Mar 2010 08:17:36 +0000 (09:17 +0100)]
Add the platform data include for the Xilinx XPS IIC Bus Interface

This file was missed in the original patch that went into Linus' tree.

Cc: "Ben Dooks (embedded platforms)" <ben-linux@fluff.org>
Cc: linux-i2c@vger.kernel.org
Signed-off-by: Richard Röjfors <richard.rojfors@pelagicore.com>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Sun, 14 Mar 2010 18:13:54 +0000 (11:13 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: i8042 - add ALDI/MEDION netbook E1222 to qurik reset table
  Input: ALPS - fix stuck buttons on some touchpads
  Input: wm831x-on - convert to use genirq
  Input: ads7846 - add wakeup support
  Input: appletouch - fix integer overflow issue
  Input: ad7877 - increase pen up imeout
  Input: ads7846 - add support for AD7843 parts
  Input: bf54x-keys - fix system hang when pressing a key
  Input: alps - add support for the touchpad on Toshiba Tecra A11-11L
  Input: remove BKL, fix input_open_file() locking
  Input: serio_raw - remove BKL
  Input: mousedev - remove BKL
  Input: add driver for TWL4030 vibrator device
  Input: enable remote wakeup for PNP i8042 keyboard ports
  Input: scancode in get/set_keycodes should be unsigned
  Input: i8042 - use platfrom_create_bundle() helper
  Input: wacom - merge out and in prox events
  Input: gamecon - fix off by one range check
  Input: wacom - replace WACOM_PKGLEN_PENABLED