platform/adaptation/renesas_rcar/renesas_kernel.git
12 years agodm thin metadata: lift __begin_transaction out of __write_initial_superblock
Joe Thornber [Fri, 27 Jul 2012 14:08:11 +0000 (15:08 +0100)]
dm thin metadata: lift __begin_transaction out of __write_initial_superblock

Lift the call to __begin_transaction out of __write_initial_superblock in
dm-thin-metadata.  Called higher up the call chain now.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm thin metadata: move dm_commit_pool_metadata into __write_initial_superblock
Joe Thornber [Fri, 27 Jul 2012 14:08:11 +0000 (15:08 +0100)]
dm thin metadata: move dm_commit_pool_metadata into __write_initial_superblock

Move dm_commit_pool_metadata inline into __write_initial_superblock in dm-thin-metadata.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm thin metadata: factor out __write_initial_superblock
Joe Thornber [Fri, 27 Jul 2012 14:08:10 +0000 (15:08 +0100)]
dm thin metadata: factor out __write_initial_superblock

Factor out __write_initial_superblock and also pull some other initial
creation code out of dm_pool_metadata_open.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm thin metadata: lift some initialisation out of __open_or_format_metadata
Joe Thornber [Fri, 27 Jul 2012 14:08:10 +0000 (15:08 +0100)]
dm thin metadata: lift some initialisation out of __open_or_format_metadata

Lift some initialisation out of __open_or_format_metadata in dm-thin-metadata.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm thin metadata: factor __destroy_persistent_data out of dm_pool_metadata_close
Joe Thornber [Fri, 27 Jul 2012 14:08:10 +0000 (15:08 +0100)]
dm thin metadata: factor __destroy_persistent_data out of dm_pool_metadata_close

Factor __destroy_persistent_data_objects out of dm_pool_metadata_close.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm thin metadata: move bm creation code into create_persistent_data_objects
Joe Thornber [Fri, 27 Jul 2012 14:08:10 +0000 (15:08 +0100)]
dm thin metadata: move bm creation code into create_persistent_data_objects

Move block manager creation and the check for unformatted metadata into
__create_persistent_data_objects().

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm thin metadata: rename init_pmd to __create_persistent_data_objects
Joe Thornber [Fri, 27 Jul 2012 14:08:10 +0000 (15:08 +0100)]
dm thin metadata: rename init_pmd to __create_persistent_data_objects

Rename init_pmd to __create_persistent_data_objects in dm-thin-metadata.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm thin metadata: wrap superblock locking
Joe Thornber [Fri, 27 Jul 2012 14:08:09 +0000 (15:08 +0100)]
dm thin metadata: wrap superblock locking

Introduce wrappers to handle write locking the superblock
appropriately.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm persistent data: stop using dm_bm_unlock_move when shadowing blocks in tm
Joe Thornber [Fri, 27 Jul 2012 14:08:09 +0000 (15:08 +0100)]
dm persistent data: stop using dm_bm_unlock_move when shadowing blocks in tm

Stop using dm_bm_unlock_move when shadowing blocks in the transaction
manager as an optimisation and remove the function as it is then no
longer used.

Some code, such as the space maps, keeps using on-disk data structures
from the previous transaction.  It can do this because blocks won't
be reallocated until the subsequent transaction.  Using
dm_bm_unlock_move to copy blocks sounds like a win, but it forces a
synchronous read should the old block be accessed.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm persistent data: tidy transaction manager creation fns
Joe Thornber [Fri, 27 Jul 2012 14:08:09 +0000 (15:08 +0100)]
dm persistent data: tidy transaction manager creation fns

Tidy the transaction manager creation functions.

They no longer lock the superblock.  Superblock locking is pulled out to
the caller.

Also export dm_bm_write_lock_zero.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm thin metadata: stop tracking need for commit
Joe Thornber [Fri, 27 Jul 2012 14:08:08 +0000 (15:08 +0100)]
dm thin metadata: stop tracking need for commit

Remove an optimisation that tracks whether or not a thin metadata commit
is needed.

If dm_pool_commit_metadata() is called and no changes have been made
to the metadata then this optimisation avoided writing to disk.

Removing because we're going to do something better later.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm persistent data: create new dm_block_manager struct
Joe Thornber [Fri, 27 Jul 2012 14:08:08 +0000 (15:08 +0100)]
dm persistent data: create new dm_block_manager struct

This patch introduces a separate struct for the block_manager.
It also uses IS_ERR to check the return value of dm_bufio_client_create
instead of testing incorrectly for NULL.

Prior to this patch a struct dm_block_manager was really an alias for
a struct dm_bufio_client.  We want to add some functionality to the
block manager that will require extra fields, so this one to one
mapping is no longer valid.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm thin metadata: factor __setup_btree_details out of init_pmd
Joe Thornber [Fri, 27 Jul 2012 14:08:08 +0000 (15:08 +0100)]
dm thin metadata: factor __setup_btree_details out of init_pmd

Factor __setup_btree_details out of init_pmd in dm-thin-metadata.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm: use bool bitfields in struct dm_target
Alasdair G Kergon [Fri, 27 Jul 2012 14:08:08 +0000 (15:08 +0100)]
dm: use bool bitfields in struct dm_target

Use boolean bit fields for flags in struct dm_target.

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm thin: set flush_supported
Joe Thornber [Fri, 27 Jul 2012 14:08:07 +0000 (15:08 +0100)]
dm thin: set flush_supported

The thin provisioning target commits internal metadata on flush.  So it
should receive flushes regardless of whether the underlying devices
support them.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm: allow targets to request flushes regardless of underlying device support
Joe Thornber [Fri, 27 Jul 2012 14:08:07 +0000 (15:08 +0100)]
dm: allow targets to request flushes regardless of underlying device support

Allow targets to override the 'supports flush' calculation.

Set 'flush_supported' if a target needs to receive flushes regardless of
whether or not its underlying devices have support.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm persistent data: only commit space map if index changed
Joe Thornber [Fri, 27 Jul 2012 14:08:06 +0000 (15:08 +0100)]
dm persistent data: only commit space map if index changed

Introduce bitmap_index_changed to track whether or not the index changed
then only commit a space map if it did.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm persistent data: always unlock superblock in dm_bm_flush_and_unlock
Joe Thornber [Fri, 27 Jul 2012 14:08:06 +0000 (15:08 +0100)]
dm persistent data: always unlock superblock in dm_bm_flush_and_unlock

Unlock the superblock even if initial dm_bufio_write_dirty_buffers fails.

Also, remove redundant flush calls.  dm_bm_flush_and_unlock's calls to
dm_bufio_write_dirty_buffers already result in dm_bufio_issue_flush
being called.

This avoids warnings about unflushed dirty buffers from bufio.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm thin: avoid unnecessarily breaking sharing for flushes
Joe Thornber [Fri, 27 Jul 2012 14:08:06 +0000 (15:08 +0100)]
dm thin: avoid unnecessarily breaking sharing for flushes

There's no need to break sharing, triggering a copy, for a write that has no
data (i.e. a flush).

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm thin: fix memory leak in process_prepared_mapping error paths
Joe Thornber [Fri, 27 Jul 2012 14:08:05 +0000 (15:08 +0100)]
dm thin: fix memory leak in process_prepared_mapping error paths

Fix memory leak in process_prepared_mapping by always freeing
the dm_thin_new_mapping structs from the mapping_pool mempool on
the error paths.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm crypt: rename struct convert_context sector field
Mikulas Patocka [Fri, 27 Jul 2012 14:08:05 +0000 (15:08 +0100)]
dm crypt: rename struct convert_context sector field

Rename sector to cc_sector in dm-crypt's convert_context struct.

This is preparation for a future patch that merges dm_io and
convert_context which both have a "sector" field.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm crypt: store crypt_config instead of dm_target struct
Alasdair G Kergon [Fri, 27 Jul 2012 14:08:05 +0000 (15:08 +0100)]
dm crypt: store crypt_config instead of dm_target struct

Store the crypt_config struct pointer directly in struct dm_crypt_io
instead of the dm_target struct pointer.

Target information is never used - only target->private is referenced,
thus we can change it to point directly to struct crypt_config.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm crypt: move cipher data out of per_cpu struct
Mikulas Patocka [Fri, 27 Jul 2012 14:08:05 +0000 (15:08 +0100)]
dm crypt: move cipher data out of per_cpu struct

Move static dm-crypt cipher data out of per-cpu structure.

Cipher information is static, so it does not have to be in a per-cpu
structure.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm crypt: rename pending field
Mikulas Patocka [Fri, 27 Jul 2012 14:08:04 +0000 (15:08 +0100)]
dm crypt: rename pending field

There are two dm crypt structures that have a field called "pending".

This patch renames them to "cc_pending" and "io_pending" to reduce confusion
and ease searching the code.

Also remove unnecessary initialisation of r in crypt_convert_block().

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm raid: move sectors_per_dev calculation
Jonathan E Brassow [Fri, 27 Jul 2012 14:08:04 +0000 (15:08 +0100)]
dm raid: move sectors_per_dev calculation

In preparation for RAID10 inclusion in dm-raid, we move the sectors_per_dev
calculation later in the device creation process.  This is because we won't
know up-front how many stripes vs how many mirrors there are which will
change the calculation.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm raid: restructure parse_raid_params
Jonathan E Brassow [Fri, 27 Jul 2012 14:08:04 +0000 (15:08 +0100)]
dm raid: restructure parse_raid_params

In preparation for RAID10 addition to dm-raid, we change an 'if' conditional
to a 'switch' conditional to make it easier to see what is being checked for
each RAID type.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm mpath: add retain_attached_hw_handler feature
Mike Snitzer [Fri, 27 Jul 2012 14:08:04 +0000 (15:08 +0100)]
dm mpath: add retain_attached_hw_handler feature

A SCSI device handler might get attached to a device during the
initial device scan.  We do not necessarily want to override
this when loading a multipath table, so this patch adds a new
multipath feature argument "retain_attached_hw_handler".

During SCSI device scan all loaded SCSI device handlers will be
consulted for a match (via scsi_dh's provided .match).  If a match is
found that device handler will be attached.  We need a way to have
userspace multipathd's provided 'hw_handler' not override the already
attached hardware handler.

When specifying the new feature 'retain_attached_hw_handler' multipath
will use the currently attached hardware handler instead of trying to
attach the one specified during table load.  If no hardware handler is
attached the specified hardware handler will still be used.

Leverages scsi_dh_attach's ability to increment the scsi_dh's reference
count if the same scsi_dh name is provided when attaching - currently
attached scsi_dh name is determined with scsi_dh_attached_handler_name.

Depends upon commit 7e8a74b177f17d100916b6ad415450f7c9508691
("[SCSI] scsi_dh: add scsi_dh_attached_handler_name").

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Tested-by: Babu Moger <babu.moger@netapp.com>
Reviewed-by: Chandra Seetharaman <sekharan@us.ibm.com>
Acked-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm thin: optimize power of two block size
Mikulas Patocka [Fri, 27 Jul 2012 14:08:03 +0000 (15:08 +0100)]
dm thin: optimize power of two block size

dm-thin will be most likely used with a block size that is a power of
two. So it should be optimized for this case.

This patch changes division and modulo operations to shifts and bit
masks if block size is a power of two.

A test that bi_sector is divisible by a block size is removed from
io_overlaps_block. Device mapper never sends bios that span a block
boundary. Consequently, if we tested that bi_size is equivalent to block
size, bi_sector must already be on a block boundary.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm thin: split discards on block boundary
Mikulas Patocka [Fri, 27 Jul 2012 14:08:03 +0000 (15:08 +0100)]
dm thin: split discards on block boundary

This patch sets the variable "ti->split_discard_requests" for the dm thin
target so that device mapper core splits discard requests on a block
boundary.

Consequently, a discard request that spans multiple blocks is never sent
to dm-thin. The patch also removes some code in process_discard that
deals with discards that span multiple blocks.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm: introduce split_discard_requests
Mikulas Patocka [Fri, 27 Jul 2012 14:08:03 +0000 (15:08 +0100)]
dm: introduce split_discard_requests

This patch introduces a new variable split_discard_requests. It can be
set by targets so that discard requests are split on max_io_len
boundaries.

When split_discard_requests is not set, discard requests are only split on
boundaries between targets, as was the case before this patch.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm thin: support for non power of 2 pool blocksize
Mike Snitzer [Fri, 27 Jul 2012 14:08:02 +0000 (15:08 +0100)]
dm thin: support for non power of 2 pool blocksize

Non power of 2 blocksize support is needed to properly align thinp IO
on storage that has non power of 2 optimal IO sizes (e.g. RAID6 10+2).

Use sector_div to support non power of 2 blocksize for the pool's
data device.  This provides comparable performance to the power of 2
math that was performed until now (as tested on modern x86_64 hardware).

The kernel currently assumes that limits->discard_granularity is a power
of two so the thin target only enables discard support if the block
size is a power of two.

Eliminate pool structure's 'block_shift', 'offset_mask' and
remaining 4 byte holes.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm stripe: optimize chunk_size calculations
Mikulas Patocka [Fri, 27 Jul 2012 14:08:02 +0000 (15:08 +0100)]
dm stripe: optimize chunk_size calculations

dm-stripe is usually used with a chunk size that is a power of two.
Use faster shifts and bit masks in such cases.

stripe_width is already optimized in a similar way.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm stripe: remove minimum stripe size
Mikulas Patocka [Fri, 27 Jul 2012 14:08:01 +0000 (15:08 +0100)]
dm stripe: remove minimum stripe size

There is no technical limitation in device mapper that would prevent the
dm-stripe target from using a stripe size smaller than page size.

This patch removes the limit and makes stripe volumes portable across
architectures with different page size.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm stripe: support for non power of 2 chunksize
Mike Snitzer [Fri, 27 Jul 2012 14:08:01 +0000 (15:08 +0100)]
dm stripe: support for non power of 2 chunksize

Support non-power-of-2 chunk sizes with dm striping for proper alignment
of stripe IO on storage that has non-power-of-2 optimal IO sizes (e.g.
RAID6 10+2).

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm: support non power of two target max_io_len
Mike Snitzer [Fri, 27 Jul 2012 14:08:00 +0000 (15:08 +0100)]
dm: support non power of two target max_io_len

Remove the restriction that limits a target's specified maximum incoming
I/O size to be a power of 2.

Rename this setting from 'split_io' to the less-ambiguous 'max_io_len'.
Change it from sector_t to uint32_t, which is plenty big enough, and
introduce a wrapper function dm_set_target_max_io_len() to set it.
Use sector_div() to process it now that it is not necessarily a power of 2.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm stripe: remove stripes_mask
Mikulas Patocka [Fri, 27 Jul 2012 14:08:00 +0000 (15:08 +0100)]
dm stripe: remove stripes_mask

The structure stripe_c contains a stripes_mask field. This field is
useless because it can be trivially calculated by subtracting one from
stripes. It is used only at one place. This patch removes it.

The patch also changes ffs(stripes) - 1 to __ffs(stripes).

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm stripe: fix size test
Mikulas Patocka [Fri, 27 Jul 2012 14:08:00 +0000 (15:08 +0100)]
dm stripe: fix size test

dm-stripe is supposed to ensure that all the space allocated to the
stripes is fully used and that all stripes are the same size.  This
patch fixes the test.  It checks that device length is divisible by the
chunk size and checks that the resulting quotient is divisible by the
number of stripes (which is equivalent to testing if device length is
divisible by chunk_size * stripes).

Previously, the code only tested that the number of sectors in the target
was divisible by each of the chunk size and the number of stripes
separately, which could leave entire stripes unused.

(A setup that genuinely needs some stripes to be shorter than others
can be created by concatenating striped targets.)

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm thin: provide specific errors for two table load failure cases
Mike Snitzer [Fri, 27 Jul 2012 14:07:59 +0000 (15:07 +0100)]
dm thin: provide specific errors for two table load failure cases

Provide specific error message strings for two pool_ctr() failure cases
that currently give just "Unknown error".

Reference: test_two_pools_pointing_to_the_same_metadata_fails and
test_different_pool_cant_replace_pool in thinp-test-suite.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm: replace simple_strtoul
majianpeng [Fri, 27 Jul 2012 14:07:59 +0000 (15:07 +0100)]
dm: replace simple_strtoul

Replace obsolete simple_strtoul() with kstrtou8/kstrtouint.

Signed-off-by: majianpeng <majianpeng@gmail.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm snapshot: remove redundant assignment in merge fn
Alasdair G Kergon [Fri, 27 Jul 2012 14:07:59 +0000 (15:07 +0100)]
dm snapshot: remove redundant assignment in merge fn

Remove redundant bvm->bi_sector self-assignment in dm snapshot's
origin_merge().

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm thin metadata: introduce THIN_MAX_CONCURRENT_LOCKS
Joe Thornber [Fri, 27 Jul 2012 14:07:58 +0000 (15:07 +0100)]
dm thin metadata: introduce THIN_MAX_CONCURRENT_LOCKS

Introduce THIN_MAX_CONCURRENT_LOCKS into dm-thin-metadata to
give a name to an otherwise "magic" number.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm thin metadata: remove pointless label from __commit_transaction
Joe Thornber [Fri, 27 Jul 2012 14:07:58 +0000 (15:07 +0100)]
dm thin metadata: remove pointless label from __commit_transaction

Remove the pointless label 'out' from __commit_transaction in
dm-thin-metadata.c

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm persistent data: remove debug space map checker
Joe Thornber [Fri, 27 Jul 2012 14:07:58 +0000 (15:07 +0100)]
dm persistent data: remove debug space map checker

Remove debug space map checker from dm persistent data.

The space map checker is a wrapper for other space maps that double
checks the reference counts are correct.  It holds all these reference
counts in memory rather than on disk, so uses a lot of memory and is
thus restricted to small pools.

As yet, this checker hasn't found any issues, but has caused a few of
its own due to people turning it on by default with larger pools.

Removing.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm: remove unused flush target method
Joe Thornber [Fri, 27 Jul 2012 14:07:58 +0000 (15:07 +0100)]
dm: remove unused flush target method

Remove unused dm_flush_fn .flush target method from header.

This was left-over from the FLUSH/FUA conversion and is no longer used.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm thin: clean up compiler warning
Mike Snitzer [Fri, 27 Jul 2012 14:07:57 +0000 (15:07 +0100)]
dm thin: clean up compiler warning

Clean up "warning: dubious: !x & y".  Also make it clear that
__snapshotted_since() returns a bool and that dm_thin_lookup_result's
'shared' member is a flag.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agodm thin: reduce endio_hook pool size
Alasdair G Kergon [Fri, 27 Jul 2012 14:07:57 +0000 (15:07 +0100)]
dm thin: reduce endio_hook pool size

Reduce the slab size used for the dm_thin_endio_hook mempool.

Allocation has been seen to fail on machines with smaller amounts
of memory due to fragmentation.

  lvm: page allocation failure. order:5, mode:0xd0
  device-mapper: table: 253:38: thin-pool: Error creating pool's endio_hook mempool

Cc: stable@vger.kernel.org
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agomfd: Ensure AB8500 platform data is passed through db8500-prcmu to MFD Core
Lee Jones [Fri, 27 Jul 2012 12:38:50 +0000 (13:38 +0100)]
mfd: Ensure AB8500 platform data is passed through db8500-prcmu to MFD Core

When booting via platform code the AB8500 platform data is now passed
in though the DB8500. However, if pdata_size is not set it will not be
subsequently passed onto subordinate devices. This patch correctly
populates pdata_size.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agomfd: Arizone core should select MFD_CORE
Samuel Ortiz [Fri, 27 Jul 2012 13:24:27 +0000 (15:24 +0200)]
mfd: Arizone core should select MFD_CORE

Otherwise, with:

CONFIG_MFD_ARIZONA=y
CONFIG_MFD_ARIZONA_I2C=m
CONFIG_MFD_CORE=m

We get:

drivers/built-in.o: In function `arizona_dev_init':
(.devinit.text+0x3ab0): undefined reference to `mfd_add_devices'
drivers/built-in.o: In function `arizona_dev_init':
(.devinit.text+0x3fdc): undefined reference to `mfd_add_devices'
drivers/built-in.o: In function `arizona_dev_init':
(.devinit.text+0x3fff): undefined reference to `mfd_add_devices'
drivers/built-in.o: In function `arizona_dev_init':
(.devinit.text+0x4059): undefined reference to `mfd_remove_devices'
drivers/built-in.o: In function `arizona_dev_exit':
(.devexit.text+0x9): undefined reference to `mfd_remove_devices'

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
12 years agoMerge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
Linus Torvalds [Fri, 27 Jul 2012 03:29:52 +0000 (20:29 -0700)]
Merge tag 'fixes-for-linus' of git://git./linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Olof Johansson:
 "A mixed bag of fixes, some for merge window fallout (tegra, MXS), and
  a short series of fixes for marvell platforms that didn't make it in
  before 3.5."

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  ARM: mxs: fix compile error caused by prom_update_property change
  ARM: dt: tegra trimslice: enable USB2 port
  ARM: dt: tegra trimslice: add vbus-gpio property
  ARM: vt8500: Add maintainer for VT8500 architecture
  ARM: Kirkwood: Replace mrvl with marvell
  ARM: Orion: fix driver probe error handling with respect to clk
  ARM: Dove: Fixup ge00 initialisation
  ARM: Kirkwood: Fix PHY disable clk problems
  ARM: Kirkwood: Ensure runit clock always ticks.
  ARM: versatile: Don't use platform clock for Integrator & VE
  ARM: tegra: harmony: add regulator supply name and its input supply

12 years agoMerge branch 'for-3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney...
Linus Torvalds [Fri, 27 Jul 2012 03:26:27 +0000 (20:26 -0700)]
Merge branch 'for-3.6-rc1' of git://git./linux/kernel/git/cooloney/linux-leds

Pull LED subsystem update from Bryan Wu.

* 'for-3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds: (50 commits)
  leds-lp8788: forgotten unlock at lp8788_led_work
  LEDS: propagate error codes in blinkm_detect()
  LEDS: memory leak in blinkm_led_common_set()
  leds: add new lp8788 led driver
  LEDS: add BlinkM RGB LED driver, documentation and update MAINTAINERS
  leds: max8997: Simplify max8997_led_set_mode implementation
  leds/leds-s3c24xx: use devm_gpio_request
  leds: convert Network Space v2 LED driver to devm_kzalloc() and cleanup error exit path
  leds: convert DAC124S085 LED driver to devm_kzalloc()
  leds: convert LM3530 LED driver to devm_kzalloc() and cleanup error exit path
  leds: convert TCA6507 LED driver to devm_kzalloc()
  leds: convert Freescale MC13783 LED driver to devm_kzalloc() and cleanup error exit path
  leds: convert ADP5520 LED driver to devm_kzalloc() and cleanup error exit path
  leds: convert PCA955x LED driver to devm_kzalloc() and cleanup error exit path
  leds: convert Sun Fire LED driver to devm_kzalloc() and cleanup error exit path
  leds: convert PCA9532 LED driver to devm_kzalloc()
  leds: convert LT3593 LED driver to devm_kzalloc()
  leds: convert Renesas TPU LED driver to devm_kzalloc() and cleanup error exit path
  leds: convert LP5523 LED driver to devm_kzalloc() and cleanup error exit path
  leds: convert PCA9633 LED driver to devm_kzalloc()
  ...

12 years agodrm/exynos: fixed exception to page allocation failure
Inki Dae [Mon, 9 Jul 2012 06:42:16 +0000 (15:42 +0900)]
drm/exynos: fixed exception to page allocation failure

this patch corrects to deallocate the pages allocated already
at alloc_page failure.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agodrm/exynos: use __free_page() to deallocate memory
Inki Dae [Mon, 9 Jul 2012 05:35:38 +0000 (14:35 +0900)]
drm/exynos: use __free_page() to deallocate memory

this patch uses __free_page() to deallocate the pages allocated
by alloc_page() and the pages doesn't need set_parge_dirty()
and mark_page_accessed() because they aren't from page cache so
removes them.

this patch has a pair with previous patch below,
http://www.spinics.net/lists/dri-devel/msg24382.html

Changelog v2:
remove unnecessary arguments.

Changelog v3:
fix npages type.
- npages can have negative value.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agodrm/exynos: fixed a comment to gem size.
Inki Dae [Fri, 29 Jun 2012 07:28:17 +0000 (16:28 +0900)]
drm/exynos: fixed a comment to gem size.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agodrm/exynos: removed unnecessary variable
Inki Dae [Wed, 27 Jun 2012 02:31:41 +0000 (11:31 +0900)]
drm/exynos: removed unnecessary variable

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agodrm/exynos: do not release memory region from exporter.
Inki Dae [Tue, 12 Jun 2012 07:52:54 +0000 (16:52 +0900)]
drm/exynos: do not release memory region from exporter.

the region should be released by exporter once dmabuf's refcount becomes 0.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agodrm/exynos: set buffer type from exporter.
Inki Dae [Thu, 7 Jun 2012 07:15:07 +0000 (16:15 +0900)]
drm/exynos: set buffer type from exporter.

when fd is imported to gem, whether the memory type from exporter
is contigous or not should be set to gem flag so that drm-based
driver can aware of the memory type.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agodrm/exynos: use alloc_page() to allocate pages.
Inki Dae [Thu, 7 Jun 2012 06:59:48 +0000 (15:59 +0900)]
drm/exynos: use alloc_page() to allocate pages.

shmem_read_mapping_page_gfp() first tries to allocate pages from page cache
so if pages are allocated from page cache then these pages could have
valid cache line. after that cpu may read garbage data from cache
once gpu operation is completed with allocated pages. so with this patch,
Non-contiguous memory allocation request allocates pages from highmem
through alloc_page() with GFP_HIGHUSER_MOVABLE.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agodrm/exynos: fixed build warning.
Inki Dae [Tue, 29 May 2012 12:49:51 +0000 (21:49 +0900)]
drm/exynos: fixed build warning.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agodrm/exynos: fixed edid data setting at vidi connection request
Inki Dae [Wed, 27 Jun 2012 07:36:12 +0000 (16:36 +0900)]
drm/exynos: fixed edid data setting at vidi connection request

edid data from user should be allocated and copied into vidi context and also
freed with disconnection.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agodrm/exynos: check if raw edid data is fake or not for test
Inki Dae [Wed, 27 Jun 2012 07:16:26 +0000 (16:16 +0900)]
drm/exynos: check if raw edid data is fake or not for test

if raw edid data isn't same as fake data then it can't be tested.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agodrm/exynos: set edid fake data only for test.
Inki Dae [Wed, 27 Jun 2012 07:00:56 +0000 (16:00 +0900)]
drm/exynos: set edid fake data only for test.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agodrm/exynos: removed unnecessary declaration.
Inki Dae [Wed, 27 Jun 2012 06:48:31 +0000 (15:48 +0900)]
drm/exynos: removed unnecessary declaration.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agodrm/exynos: fix buffer pitch calculation
Cooper Yuan [Fri, 29 Jun 2012 02:49:45 +0000 (11:49 +0900)]
drm/exynos: fix buffer pitch calculation

Signed-off-by: Cooper Yuan <cooperyuan@gmail.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agodrm/exynos: check for null in return value of dma_buf_map_attachment()
Subash Patel [Mon, 25 Jun 2012 18:22:57 +0000 (11:22 -0700)]
drm/exynos: check for null in return value of dma_buf_map_attachment()

dma_buf_map_attachment() can return NULL and valid sg as return
value. Hence the check for the returned scatter-gather must be using
the inline function IS_ERR_OR_NULL() in place of IS_ERR()

Signed-off-by: Subash Patel <subash.ramaswamy@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agodrm/exynos: return NULL if exynos_pages_to_sg fails
Subash Patel [Mon, 25 Jun 2012 18:22:56 +0000 (11:22 -0700)]
drm/exynos: return NULL if exynos_pages_to_sg fails

exynos_pages_to_sg() internally calls sg_kmalloc() which can return
no pages when the system is under high memory crunch. One such instance
is chromeos-install in the chromeos. This patch adds check for the return
value of the function in subject to return NULL on failure.

Signed-off-by: Subash Patel <subash.ramaswamy@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agodrm/exynos: Use devm_* functions in exynos_mixer.c
Sachin Kamat [Tue, 19 Jun 2012 06:17:41 +0000 (11:47 +0530)]
drm/exynos: Use devm_* functions in exynos_mixer.c

devm_* functions are device managed functions and make error handling
and cleanup cleaner and simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agodrm/exynos: Use devm_* functions in exynos_hdmi.c
Sachin Kamat [Tue, 19 Jun 2012 06:17:40 +0000 (11:47 +0530)]
drm/exynos: Use devm_* functions in exynos_hdmi.c

devm_* functions are device managed functions and make error handling
and cleanup cleaner and simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agodrm/exynos: Use devm_* functions in exynos_drm_fimd.c
Sachin Kamat [Tue, 19 Jun 2012 06:17:39 +0000 (11:47 +0530)]
drm/exynos: Use devm_* functions in exynos_drm_fimd.c

devm_* functions are device managed functions and make error handling
and cleanup cleaner and simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agodrm/exynos: Add missing static storage class specifier
Sachin Kamat [Wed, 13 Jun 2012 08:47:09 +0000 (14:17 +0530)]
drm/exynos: Add missing static storage class specifier

Fixes the following sparse warning:
drivers/gpu/drm/exynos/exynos_drm_connector.c:199:20:
warning: symbol 'exynos_drm_best_encoder' was not declared. Should it be static?

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agodrm/exynos: add property for crtc mode
Joonyoung Shim [Wed, 27 Jun 2012 05:27:11 +0000 (14:27 +0900)]
drm/exynos: add property for crtc mode

This patch adds exynos specific property for crtc mode. The crtc mode
property has tow modes - normal and blank. The normal mode is default
mode and can use crtc normally. The blank mode turns off the private
plane of crtc, so we don't see crtc screen but can see other plane
screens.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
12 years agodrm/exynos: add crtc disable function
Joonyoung Shim [Wed, 27 Jun 2012 05:27:10 +0000 (14:27 +0900)]
drm/exynos: add crtc disable function

The crtc disable is used to turn off private plane for crtc.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
12 years agodrm/exynos: add plane enable/disable
Joonyoung Shim [Wed, 27 Jun 2012 05:27:09 +0000 (14:27 +0900)]
drm/exynos: add plane enable/disable

The plane enable/disable can control only a power of plane, so they will
be helpful to handle planes with dpms.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
12 years agodrm/exynos: remove unnecessary connector dpms control
Joonyoung Shim [Wed, 27 Jun 2012 05:27:08 +0000 (14:27 +0900)]
drm/exynos: remove unnecessary connector dpms control

The connector dpms should be controlled only by DPMS property and mode
set.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
12 years agodrm/exynos: fix dpms operation for mode set
Joonyoung Shim [Wed, 27 Jun 2012 05:27:07 +0000 (14:27 +0900)]
drm/exynos: fix dpms operation for mode set

When we do mode set, the dpms mode should be ON. Don't control dpms in
crtc commit function.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
12 years agodrm/exynos: add property for plane zpos
Joonyoung Shim [Wed, 27 Jun 2012 05:27:06 +0000 (14:27 +0900)]
drm/exynos: add property for plane zpos

The exynos drm driver used a specific ioctl - DRM_EXYNOS_PLANE_SET_ZPOS
to set zpos of plane. It can be substitute to property of plane. This
patch adds a property for plane zpos and removes
DRM_EXYNOS_PLANE_SET_ZPOS ioctl.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
12 years agodrm/exynos: update overlay via plane from crtc
Joonyoung Shim [Wed, 27 Jun 2012 05:27:05 +0000 (14:27 +0900)]
drm/exynos: update overlay via plane from crtc

There is no any reason to update overlay at crtc directly because the
crtc uses plane. Move its code to plane and call proper functions of
plane from crtc.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
12 years agodrm/exynos: use private plane for crtc
Joonyoung Shim [Wed, 27 Jun 2012 05:27:04 +0000 (14:27 +0900)]
drm/exynos: use private plane for crtc

The crtc can use private plane instead it has overlay struct. It will be
helpful use plane feature from crtc later.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
12 years agodrm/exynos: define to_exynos_plane macro
Joonyoung Shim [Wed, 27 Jun 2012 05:27:03 +0000 (14:27 +0900)]
drm/exynos: define to_exynos_plane macro

Add macro to get struct exynos_plane from struct drm_plane pointer.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
12 years agodrm/exynos: fix to set pipe of crtc
Joonyoung Shim [Wed, 27 Jun 2012 05:27:02 +0000 (14:27 +0900)]
drm/exynos: fix to set pipe of crtc

It is enough to set pipe of crtc to manager only when do mode_set of
crtc.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
12 years agodrm/exynos: fix point to call overlay_ops->mode_set
Joonyoung Shim [Wed, 27 Jun 2012 05:27:01 +0000 (14:27 +0900)]
drm/exynos: fix point to call overlay_ops->mode_set

Call overlay->mode_set from crtc->mode_set instead of encoder->mode_set,
it makes codes clearly.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
12 years agoMerge branch 'drm-next' of ../main_line/linux-drm into dave-drm-next
Inki Dae [Fri, 27 Jul 2012 02:09:46 +0000 (11:09 +0900)]
Merge branch 'drm-next' of ../main_line/linux-drm into dave-drm-next

12 years agopowerpc/ftrace: Trace function graph entry before updating index
Steven Rostedt [Wed, 18 Jul 2012 12:35:28 +0000 (12:35 +0000)]
powerpc/ftrace: Trace function graph entry before updating index

As Colin Cross ported my x86 change to ARM, he also pointed out that
powerpc is also behind in this fix.

The commit 722b3c746953 "ftrace/graph: Trace function entry before
updating index" fixes an issue with function graph tracing for x86,
where if the called entry function decides not to trace interrupts, it
can fail the check if an interrupt comes in just after the
curr_ret_stack is updated.

The solution is to call the entry function first, then update the
curr_ret_stack if the entry function wants to be traced.

Cc: Colin Cross <ccross@android.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
12 years agoradeonfb: Add quirk for the graphics adapter in some JSxx
Tony Breeds [Wed, 18 Jul 2012 06:49:04 +0000 (06:49 +0000)]
radeonfb: Add quirk for the graphics adapter in some JSxx

These devices are set to 640x480 by firmware, switch them to 800x600@60
so that the graphical installer can run on remote console.

Reported by IBM during SLES10 SP2 beta testing:

https://bugzilla.novell.com/show_bug.cgi?id=461002
LTC50817

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
12 years agopowerpc: Lack of firmware flash support is not an error
Anton Blanchard [Sun, 22 Jul 2012 20:42:32 +0000 (20:42 +0000)]
powerpc: Lack of firmware flash support is not an error

Reduce the severity of the warning given when firmware flash is
not supported. Not all platforms have it.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
12 years agopowerpc: Enable pseries hardware RNG and crypto modules
Anton Blanchard [Sun, 22 Jul 2012 20:26:51 +0000 (20:26 +0000)]
powerpc: Enable pseries hardware RNG and crypto modules

Enable the hardware RNG and crypto modules. I verified they both
autoload via the VIO subsystem, so there is no need to build them in.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
12 years agopowerpc: Update g5_defconfig
Benjamin Herrenschmidt [Sun, 22 Jul 2012 16:48:32 +0000 (16:48 +0000)]
powerpc: Update g5_defconfig

This updates the g5 defconfig to include nouveau instead of nvidiafb
(which works much better nowadays, in fact the latter crashes on modern
distros), and to set CONFIG_VT_HW_CONSOLE_BINDING without which takeover
from the firmware offb by nouveau doesn't work properly (and leads to
unexplained black screens for some users).

The rest is churn of going through defconfig / savedefconfig

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
12 years agopowerpc/kvm/bookehv: Fix build regression
Alexander Graf [Tue, 24 Jul 2012 13:02:34 +0000 (13:02 +0000)]
powerpc/kvm/bookehv: Fix build regression

After merging the register type check patches from Ben's tree, the
hv enabled booke implementation ceased to compile.

This patch fixes things up so everyone's happy again.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
12 years agopowerpc: Set stack limit properly in crit_transfer_to_handler
Stuart Yoder [Mon, 16 Jul 2012 09:06:48 +0000 (09:06 +0000)]
powerpc: Set stack limit properly in crit_transfer_to_handler

Commit 9778b696a0188ad3b3524b383953ee73b31b7b68 incorrectly
changes the code setting the stack limit on entry to the
kernel to mark the thread_info at the bottom of the stack
out of bounds anymore. This fixes it.

Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Linus Torvalds [Fri, 27 Jul 2012 01:14:11 +0000 (18:14 -0700)]
Merge git://git./linux/kernel/git/davem/sparc

Pull sparc updates from David Miller:
 "Nothing much this merge window for sparc.

  1) Fix FPU state management in sparc32, from Tkhai Kirill.

  2) More sparc32 mm layer code cleanups, largely more side effects of
     the sun4c support removal in the 3.5 From Sam Ravnborg.

  3) Remove unused code in sparc64, from Bjorn Helgaas and Kirill Tkhai.

  4) Some declaration and comment tidies in PROM support code, from
     Geert Uytterhoeven."

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: (24 commits)
  sparc32, copy_thread: Clear TIF_USEDFPU flag of created task instead of current
  sparc32: delete dead code in show_mem()
  sparc32: move kmap_init() to highmem.c
  sparc32: move probe_memory() to srmmu.c
  sparc32: drop unused BAD_PAGE stuff
  sparc32: centralize all mmu context handling in srmmu.c
  sparc32: drop quicklist
  sparc32: drop sparc model check in paging_init
  sparc32: drop sparc_unmapped_base
  sparc32,leon: drop leon_init()
  sparc32: drop fixmap.h
  sparc32: fixmap.h cleanup
  sparc32: drop unused kmap_atomic_to_page
  sparc32: drop swapper_pg_dir
  sparc32: beautify srmmu_inherit_prom_mappings()
  sparc32: use void * in nocache get/free
  sparc32: fix coding-style in srmmu.c
  sparc32: sort includes in srmmu.c
  sparc32: define a few srmmu functions __init
  sparc64: remove unused function straddles_64bit_va_hole()
  ...

12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Fri, 27 Jul 2012 01:09:01 +0000 (18:09 -0700)]
Merge git://git./linux/kernel/git/davem/net

Pull networking updates and fixes from David Miller:

1) Reinstate the no-ref optimization for input route lookups in ipv4 to
   fix some routing cache removal perf regressions.

2) Make TCP socket pre-demux work on ipv6 side too, from Eric Dumazet.

3) Get RX hash value from correct place in be2net driver, from
   Sarveshwar Bandi.

4) Validation of FIB cached routes missing critical check, from Eric
   Dumazet.

5) EEH support in mlx4 driver, from Kleber Sacilotto de Souza.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (23 commits)
  ipv6: Early TCP socket demux
  ipv4: Fix input route performance regression.
  pch_gbe: vlan skb len fix
  pch_gbe: add extra clean tx
  pch_gbe: fix transmit watchdog timeout
  ixgbe: fix panic while dumping packets on Tx hang with IOMMU
  be2net: Fix to parse RSS hash from Receive completions correctly.
  net/mlx4_en: Limit the RFS filter IDs to be < RPS_NO_FILTER
  hyperv: Add error handling to rndis_filter_device_add()
  hyperv: Add a check for ring_size value
  ipv4: rt_cache_valid must check expired routes
  net/pch_gpe: Cannot disable ethernet autonegation
  qeth: repair crash in qeth_l3_vlan_rx_kill_vid()
  netiucv: cleanup attribute usage
  net: wiznet add missing HAS_IOMEM dependency
  be2net: Missing byteswap in be_get_fw_log_level causes oops on PowerPC
  mlx4: Add support for EEH error recovery
  cdc-ncm: tag Ericsson WWAN devices (eg F5521gw) with FLAG_WWAN
  wanmain: comparing array with NULL
  caif: fix NULL pointer check
  ...

12 years agoBtrfs: using vmalloc and friends needs vmalloc.h
Stephen Rothwell [Fri, 27 Jul 2012 00:11:13 +0000 (10:11 +1000)]
Btrfs: using vmalloc and friends needs vmalloc.h

On powerpc, we don't get the implicit vmalloc.h include, and as a result
the build fails noisily:

  fs/btrfs/send.c: In function 'fs_path_free':
  fs/btrfs/send.c:185:4: error: implicit declaration of function 'vfree' [-Werror=implicit-function-declaration]
  fs/btrfs/send.c: In function 'fs_path_ensure_buf':
  fs/btrfs/send.c:215:4: error: implicit declaration of function 'vmalloc' [-Werror=implicit-function-declaration]
  fs/btrfs/send.c:215:12: warning: assignment makes pointer from integer without a cast [enabled by default]
  fs/btrfs/send.c:225:12: warning: assignment makes pointer from integer without a cast [enabled by default]
  fs/btrfs/send.c:233:13: warning: assignment makes pointer from integer without a cast [enabled by default]
  fs/btrfs/send.c: In function 'iterate_dir_item':
  fs/btrfs/send.c:900:10: warning: assignment makes pointer from integer without a cast [enabled by default]
  fs/btrfs/send.c:909:11: warning: assignment makes pointer from integer without a cast [enabled by default]
  fs/btrfs/send.c: In function 'btrfs_ioctl_send':
  fs/btrfs/send.c:4463:17: warning: assignment makes pointer from integer without a cast [enabled by default]
  fs/btrfs/send.c:4469:17: warning: assignment makes pointer from integer without a cast [enabled by default]
  fs/btrfs/send.c:4475:2: error: implicit declaration of function 'vzalloc' [-Werror=implicit-function-declaration]
  fs/btrfs/send.c:4475:20: warning: assignment makes pointer from integer without a cast [enabled by default]
  fs/btrfs/send.c:4483:21: warning: assignment makes pointer from integer without a cast [enabled by default]

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoleds-lp8788: forgotten unlock at lp8788_led_work
Devendra Naga [Thu, 26 Jul 2012 18:00:31 +0000 (02:00 +0800)]
leds-lp8788: forgotten unlock at lp8788_led_work

at default case of switch we return with out unlocking the mutex.

Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
12 years agoLEDS: propagate error codes in blinkm_detect()
Dan Carpenter [Thu, 26 Jul 2012 08:00:25 +0000 (16:00 +0800)]
LEDS: propagate error codes in blinkm_detect()

Use the error codes from the lower levels instead of -ENODEV.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jan-Simon Möller <jansimon.moeller@gmx.de>
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
12 years agoLEDS: memory leak in blinkm_led_common_set()
Dan Carpenter [Thu, 26 Jul 2012 07:59:51 +0000 (15:59 +0800)]
LEDS: memory leak in blinkm_led_common_set()

This can return without freeing the bl_work struct.  Also there was no
check for allocation failure.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jan-Simon Möller <jansimon.moeller@gmx.de>
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
12 years agocpumask: cpulist_parse() comments correction
Alex Shi [Thu, 26 Jul 2012 23:59:42 +0000 (09:29 +0930)]
cpumask: cpulist_parse() comments correction

As introduced in Rusty's commit 29c0177e6a4, the function has no
parameter @len, so need to remove it from comments to avoid kernel-doc
warning:

alexs@debian:~/linux-next$ scripts/kernel-doc -man
include/linux/cpumask.h | split-man.pl /tmp/man
....
Warning(include/linux/cpumask.h:602): Excess function parameter 'len'
description in 'cpulist_parse'

and correct the function name in comments to cpulist_parse.

Signed-off-by: Alex Shi <alex.shi@intel.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agoinit: add comments to keep initcall-names in sync with initcall levels
Jim Cromie [Thu, 14 Jun 2012 22:00:59 +0000 (16:00 -0600)]
init: add comments to keep initcall-names in sync with initcall levels

main.c has initcall_level_names[] for parse_args to print in debug messages,
add comments to keep them in sync with initcalls defined in init.h.

Also add "loadable" into comment re not using *_initcall macros in
modules, to disambiguate from kernel/params.c and other builtins.

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Acked-by: Borislav Petkov <borislav.petkov@amd.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agocpumask: add a few comments of cpumask functions
Alex Shi [Mon, 28 May 2012 14:23:51 +0000 (22:23 +0800)]
cpumask: add a few comments of cpumask functions

Current few cpumask functions' purposes are not quite clear. Stupid
user like myself needs to dig into details for clear function
purpose and return value.
Add few explanation for them is helpful.

Thanks for Srivatsa's comments and correction!

Signed-off-by: Alex Shi <alex.shi@intel.com>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
12 years agosparc32, copy_thread: Clear TIF_USEDFPU flag of created task instead of current
Tkhai Kirill [Fri, 29 Jun 2012 02:55:25 +0000 (02:55 +0000)]
sparc32, copy_thread: Clear TIF_USEDFPU flag of created task instead of current

FPU state is saved into task_struct of created task. Current task continues
use of the state, so it needs TIF_USEDFPU flag is not cleared.

Created task receives fresh FPU and cleared TIF_USEFPU flag is required for it.

Signed-off-by: Kirill Tkhai <tkhai@yandex.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: delete dead code in show_mem()
Sam Ravnborg [Thu, 26 Jul 2012 11:02:28 +0000 (11:02 +0000)]
sparc32: delete dead code in show_mem()

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32: move kmap_init() to highmem.c
Sam Ravnborg [Thu, 26 Jul 2012 11:02:27 +0000 (11:02 +0000)]
sparc32: move kmap_init() to highmem.c

Try to keep highmem support in a more central place.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>