Steffen Klassert [Tue, 27 Jul 2010 05:20:47 +0000 (07:20 +0200)]
padata: update API documentation
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Steffen Klassert [Tue, 27 Jul 2010 05:19:27 +0000 (07:19 +0200)]
padata: Remove padata_get_cpumask
A function that copies the padata cpumasks to a user buffer
is a bit error prone. The cpumask can change any time so we
can't be sure to have the right cpumask when using this function.
A user who is interested in the padata cpumasks should register
to the padata cpumask notifier chain instead. Users of
padata_get_cpumask are already updated, so we can remove it.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Steffen Klassert [Tue, 27 Jul 2010 05:18:46 +0000 (07:18 +0200)]
crypto: pcrypt - Update pcrypt cpumask according to the padata cpumask notifier
The padata cpumask change notifier passes a padata_cpumask to the
notifier chain. So we use this cpumask instead of asking padata for
the cpumask.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Steffen Klassert [Tue, 27 Jul 2010 05:16:33 +0000 (07:16 +0200)]
crypto: pcrypt - Rename pcrypt_instance
In the crypto-layer an instance refers usually to a crypto instance.
The struct pcrypt_instance is not related to a crypto instance.
It rather contains the padata informations, so we rename it to
padata_pcrypt. The functions that handle this struct are renamed
accordingly.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Steffen Klassert [Tue, 27 Jul 2010 05:15:50 +0000 (07:15 +0200)]
padata: Pass the padata cpumasks to the cpumask_change_notifier chain
We pass a pointer to the new padata cpumasks to the cpumask_change_notifier
chain. So users can access the cpumasks without the need of an extra
padata_get_cpumask function.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Steffen Klassert [Tue, 27 Jul 2010 05:15:06 +0000 (07:15 +0200)]
padata: Rearrange set_cpumask functions
padata_set_cpumask needs to be protected by a lock. We make
__padata_set_cpumasks unlocked and static. So this function
can be used by the exported and locked padata_set_cpumask and
padata_set_cpumasks functions.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Steffen Klassert [Tue, 27 Jul 2010 05:14:28 +0000 (07:14 +0200)]
padata: Rename padata_alloc functions
We rename padata_alloc to padata_alloc_possible because this
function allocates a padata_instance and uses the cpu_possible
mask for parallel and serial workers. Also we rename __padata_alloc
to padata_alloc to avoid to export underlined functions. Underlined
functions are considered to be private to padata. Users are updated
accordingly.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Steffen Klassert [Tue, 20 Jul 2010 06:52:20 +0000 (08:52 +0200)]
crypto: pcrypt - Dont calulate a callback cpu on empty callback cpumask
If the callback cpumask is empty, we crash with a division by zero
when we try to calculate a callback cpu. So we don't update the callback
cpu in pcrypt_do_parallel if the callback cpumask is empty.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Steffen Klassert [Tue, 20 Jul 2010 06:51:25 +0000 (08:51 +0200)]
padata: Check for valid cpumasks
Now that we allow to change the cpumasks from userspace, we have
to check for valid cpumasks in padata_do_parallel. This patch adds
the necessary check. This fixes a division by zero crash if the
parallel cpumask contains no active cpu.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Steffen Klassert [Tue, 20 Jul 2010 06:49:20 +0000 (08:49 +0200)]
padata: Allocate cpumask dependend recources in any case
The cpumask separation work assumes the cpumask dependend recources
present regardless of valid or invalid cpumasks. With this patch
we allocate the cpumask dependend recources in any case. This fixes
two NULL pointer dereference crashes in padata_replace and in
padata_get_cpumask.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Steffen Klassert [Tue, 20 Jul 2010 06:48:34 +0000 (08:48 +0200)]
padata: Fix cpu index counting
The counting of the cpu index got lost with a recent commit.
This patch restores it. This fixes a hang of the parallel worker
threads on cpu hotplug.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Peter Huewe [Thu, 15 Jul 2010 19:00:41 +0000 (21:00 +0200)]
crypto: geode_aes - Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)
This patch converts pci_table entries, where .subvendor=PCI_ANY_ID and
.subdevice=PCI_ANY_ID, .class=0 and .class_mask=0, to use the
PCI_VDEVICE macro, and thus improves readability.
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Dan Kruchinin [Wed, 14 Jul 2010 10:34:15 +0000 (14:34 +0400)]
pcrypt: Added sysfs interface to pcrypt
Added sysfs interface to pcrypt. Now pcrypt subsystem creates two
sysfs directories with corresponding padata sysfs objects:
/sys/kernel/pcrypt/[pencrypt|pdecrypt]
Signed-off-by: Dan Kruchinin <dkruchinin@acm.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Dan Kruchinin [Wed, 14 Jul 2010 10:33:08 +0000 (14:33 +0400)]
padata: Added sysfs primitives to padata subsystem
Added sysfs primitives to padata subsystem. Now API user may
embedded kobject each padata instance contains into any sysfs
hierarchy. For now padata sysfs interface provides only
two objects:
serial_cpumask [RW] - cpumask for serial workers
parallel_cpumask [RW] - cpumask for parallel workers
Signed-off-by: Dan Kruchinin <dkruchinin@acm.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Dan Kruchinin [Wed, 14 Jul 2010 10:31:57 +0000 (14:31 +0400)]
padata: Make two separate cpumasks
The aim of this patch is to make two separate cpumasks
for padata parallel and serial workers respectively.
It allows user to make more thin and sophisticated configurations
of padata framework. For example user may bind parallel and serial workers to non-intersecting
CPU groups to gain better performance. Also each padata instance has notifiers chain for its
cpumasks now. If either parallel or serial or both masks were changed all
interested subsystems will get notification about that. It's especially useful
if padata user uses algorithm for callback CPU selection according to serial cpumask.
Signed-off-by: Dan Kruchinin <dkruchinin@acm.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Steffen Klassert [Wed, 7 Jul 2010 13:34:03 +0000 (15:34 +0200)]
padata: update documentation
This patch updates the padata documentation to the changed
API of padata_start/padata_stop and padata_do parallel.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Steffen Klassert [Wed, 7 Jul 2010 13:32:39 +0000 (15:32 +0200)]
padata: simplify serialization mechanism
We count the number of processed objects on a percpu basis,
so we need to go through all the percpu reorder queues to calculate
the sequence number of the next object that needs serialization.
This patch changes this to count the number of processed objects
global. So we can calculate the sequence number and the percpu
reorder queue of the next object that needs serialization without
searching through the percpu reorder queues. This avoids some
accesses to memory of foreign cpus.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Steffen Klassert [Wed, 7 Jul 2010 13:32:02 +0000 (15:32 +0200)]
padata: make padata_do_parallel to return zero on success
To return -EINPROGRESS on success in padata_do_parallel was
considered to be odd. This patch changes this to return zero
on success. Also the only user of padata, pcrypt is adapted to
convert a return of zero to -EINPROGRESS within the crypto layer.
This also removes the pcrypt fallback if padata_do_parallel
was called on a not running padata instance as we can't handle it
anymore. This fallback was unused, so it's save to remove it.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Steffen Klassert [Wed, 7 Jul 2010 13:31:26 +0000 (15:31 +0200)]
padata: Handle empty padata cpumasks
This patch fixes a bug when the padata cpumask does not
intersect with the active cpumask. In this case we get a
division by zero in padata_alloc_pd and we end up with a
useless padata instance. Padata can end up with an empty
cpumask for two reasons:
1. A user removed the last cpu that belongs to the padata
cpumask and the active cpumask.
2. The last cpu that belongs to the padata cpumask and the
active cpumask goes offline.
We introduce a function padata_validate_cpumask to check if the padata
cpumask does intersect with the active cpumask. If the cpumasks do not
intersect we mark the instance as invalid, so it can't be used. We do not
allocate the cpumask dependend recources in this case. This fixes the
division by zero and keeps the padate instance in a consistent state.
It's not possible to trigger this bug by now because the only padata user,
pcrypt uses always the possible cpumask.
Reported-by: Dan Kruchinin <dkruchinin@acm.org>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Steffen Klassert [Wed, 7 Jul 2010 13:30:47 +0000 (15:30 +0200)]
padata: Block until the instance is unused on stop
This patch makes padata_stop to block until the padata
instance is unused. Also we split padata_stop to a locked
and a unlocked version. This is in preparation to be able
to change the cpumask after a call to patata stop.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Steffen Klassert [Wed, 7 Jul 2010 13:30:10 +0000 (15:30 +0200)]
padata: Check for valid padata instance on start
This patch introduces the PADATA_INVALID flag which is
checked on padata start. This will be used to mark a padata
instance as invalid, if the padata cpumask does not intersect
with the active cpumask. we change padata_start to return an
error if the PADATA_INVALID is set. Also we adapt the only
padata user, pcrypt to this change.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Justin P. Mattock [Wed, 14 Jul 2010 12:11:39 +0000 (20:11 +0800)]
crypto: hifn_795x - Remove unused ctx variable
The below patch gets rid of an unused variable ctx reported by
GCC when building the kernel.
CC [M] drivers/crypto/hifn_795x.o
drivers/crypto/hifn_795x.c: In function 'hifn_flush':
drivers/crypto/hifn_795x.c:2021:23: warning: variable 'ctx' set but not used
drivers/crypto/hifn_795x.c: In function 'hifn_process_queue':
drivers/crypto/hifn_795x.c:2142:23: warning: variable 'ctx' set but not used
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Kulikov Vasiliy [Mon, 5 Jul 2010 13:25:06 +0000 (21:25 +0800)]
hwrng: n2-drv - remove casts from void*
Remove unnesessary casts from void*.
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Lee Nipper [Wed, 16 Jun 2010 05:29:15 +0000 (15:29 +1000)]
crypto: talitos - fix ahash for multiple of blocksize
Correct ahash_process_req() to properly handle cases
where the total hash amount is a multiple of the blocksize.
The SEC must have some data to hash during the very last
descriptor operation; so up to one whole blocksize
of data is buffered until the final hash.
Signed-off-by: Lee Nipper <lee.nipper@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Joachim Fritschi [Thu, 3 Jun 2010 11:02:51 +0000 (21:02 +1000)]
crypto: twofish: Rename twofish to twofish_generic and add an alias
This fixes the broken autoloading of the corresponding twofish assembler
ciphers on x86 and x86_64 if they are available. The module name of the
generic implementation was in conflict with the alias in the assembler
modules. The generic twofish c implementation is renamed to
twofish_generic according to the other algorithms with assembler
implementations and an module alias is added for 'twofish'. You can now
load 'twofish' giving you the best implementation by priority,
'twofish-generic' to get the c implementation or 'twofish-asm' to get
the assembler version of cipher.
Signed-off-by: Joachim Fritschi <jfritschi@freenet.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Alexander Shishkin [Thu, 3 Jun 2010 10:53:43 +0000 (20:53 +1000)]
crypto: testmgr - add an option to disable cryptoalgos' self-tests
By default, CONFIG_CRYPTO_MANAGER_TESTS will be enabled and thus
self-tests will still run, but it is now possible to disable them
to gain some time during bootup.
Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Herbert Xu [Thu, 3 Jun 2010 10:33:06 +0000 (20:33 +1000)]
crypto: pcomp - Fix illegal Kconfig configuration
The PCOMP Kconfig entry current allows the following combination
which is illegal:
ZLIB=y
PCOMP=y
ALGAPI=m
ALGAPI2=y
MANAGER=m
MANAGER2=m
This patch fixes this by adding PCOMP2 so that PCOMP can select
ALGAPI to propagate the setting to MANAGER2.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Dan Carpenter [Thu, 3 Jun 2010 10:19:28 +0000 (20:19 +1000)]
padata: add parenthesis in MAX_SEQ_NR macro
MAX_SEQ_NR is used in padata_alloc_pd() like this:
pd->max_seq_nr = (MAX_SEQ_NR / num_cpus) * num_cpus - 1;
It needs parenthesis or the divide by num_cpus takes precedence over the
subtraction.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Herbert Xu [Wed, 26 May 2010 01:36:58 +0000 (11:36 +1000)]
Merge git://git./linux/kernel/git/davem/crypto-2.6
Dan Carpenter [Wed, 26 May 2010 00:45:22 +0000 (10:45 +1000)]
crypto: mv_cesa - fixup error handling in mv_probe()
The error handling in mv_probe() was a bit messed up. There were some
gotos to the wrong labels so it ended up releasing stuff that that hadn't
been aquired and not releasing stuff that was meant to be released. I
shuffled it around a bit to fix it and make it clearer.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Andrea Gelmini [Wed, 26 May 2010 00:41:03 +0000 (10:41 +1000)]
crypto: des_s390 - Checkpatch cleanup
arch/s390/crypto/crypto_des.h:18: ERROR: do not use C99 // comments
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Huang Weiyi [Wed, 26 May 2010 00:37:52 +0000 (10:37 +1000)]
crypto: omap - remove unused #include <linux/version.h>
Remove unused #include <linux/version.h>('s) in
drivers/crypto/omap-sham.c
Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
David S. Miller [Sun, 23 May 2010 05:53:09 +0000 (22:53 -0700)]
n2_crypto: Add HMAC support.
One note is that, unlike with non-HMAC hashes, we can't support
hmac(sha224) using the HMAC_SHA256 opcode.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 22 May 2010 09:45:56 +0000 (02:45 -0700)]
n2_crypto: Make ahash parameterization explicit.
All of the ahash ->digest() ops do essentially the same thing, just
using different parameters.
So instead, have a single n2_hash_async_digest() and use an
n2_ahash_alg container that provides the parameters.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Thu, 20 May 2010 06:16:05 +0000 (23:16 -0700)]
n2_crypto: Log algorithm success/failure in kernel log.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 22 May 2010 08:11:03 +0000 (01:11 -0700)]
n2_crypto: Kill n2_base_ctx and helpers.
Unused, and we'll do this via the request context.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 22 May 2010 08:09:04 +0000 (01:09 -0700)]
n2_crypto: Plumb fallback ahash requests properly.
Do this by putting the async fallback request at the end of an n2
specific ahash request context, then properly adjusting the request
private size in our ahash ->cra_init().
We also need to put the writable state bits into the n2 request
private instead of the n2 cra_ctx.
With help from Herbert Xu.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 22 May 2010 07:50:12 +0000 (00:50 -0700)]
n2_crypto: Fix MAU kmem_cache name.
Both the CWQ and MAU caches unintentionally had that same name.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Wed, 26 May 2010 00:37:08 +0000 (17:37 -0700)]
n2_crypto: Fix build after of_device/of_platform_driver changes.
Signed-off-by: David S. Miller <davem@davemloft.net>
Julia Lawall [Wed, 26 May 2010 00:36:51 +0000 (10:36 +1000)]
crypto: Use ERR_CAST
Use ERR_CAST(x) rather than ERR_PTR(PTR_ERR(x)). The former makes more
clear what is the purpose of the operation, which otherwise looks like a
no-op.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
type T;
T x;
identifier f;
@@
T f (...) { <+...
- ERR_PTR(PTR_ERR(x))
+ x
...+> }
@@
expression x;
@@
- ERR_PTR(PTR_ERR(x))
+ ERR_CAST(x)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Linus Torvalds [Tue, 25 May 2010 23:59:51 +0000 (16:59 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (63 commits)
drivers/net/usb/asix.c: Fix pointer cast.
be2net: Bug fix to avoid disabling bottom half during firmware upgrade.
proc_dointvec: write a single value
hso: add support for new products
Phonet: fix potential use-after-free in pep_sock_close()
ath9k: remove VEOL support for ad-hoc
ath9k: change beacon allocation to prefer the first beacon slot
sock.h: fix kernel-doc warning
cls_cgroup: Fix build error when built-in
macvlan: do proper cleanup in macvlan_common_newlink() V2
be2net: Bug fix in init code in probe
net/dccp: expansion of error code size
ath9k: Fix rx of mcast/bcast frames in PS mode with auto sleep
wireless: fix sta_info.h kernel-doc warnings
wireless: fix mac80211.h kernel-doc warnings
iwlwifi: testing the wrong variable in iwl_add_bssid_station()
ath9k_htc: rare leak in ath9k_hif_usb_alloc_tx_urbs()
ath9k_htc: dereferencing before check in hif_usb_tx_cb()
rt2x00: Fix rt2800usb TX descriptor writing.
rt2x00: Fix failed SLEEP->AWAKE and AWAKE->SLEEP transitions.
...
Linus Torvalds [Tue, 25 May 2010 23:53:16 +0000 (16:53 -0700)]
Merge branch 'alpha-next' of git://git./linux/kernel/git/mattst88/alpha-2.6
* 'alpha-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha-2.6:
alpha: simplify and optimize sched_find_first_bit
alpha: invoke oom-killer from page fault
Convert alpha to use clocksources instead of arch_gettimeoffset
Linus Torvalds [Tue, 25 May 2010 23:51:55 +0000 (16:51 -0700)]
Merge git://git./linux/kernel/git/gregkh/driver-core-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
driver core: add devname module aliases to allow module on-demand auto-loading
Linus Torvalds [Tue, 25 May 2010 23:48:30 +0000 (16:48 -0700)]
Revert "module: drop the lock while waiting for module to complete initialization."
This reverts commit
480b02df3aa9f07d1c7df0cd8be7a5ca73893455, since
Rafael reports that it causes occasional kernel paging request faults in
load_module().
Dropping the module lock and re-taking it deep in the call-chain is
definitely not the right thing to do. That just turns the mutex from a
lock into a "random non-locking data structure" that doesn't actually
protect what it's supposed to protect.
Requested-and-tested-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Brandon Philips <brandon@ifup.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David S. Miller [Tue, 25 May 2010 23:24:03 +0000 (16:24 -0700)]
drivers/net/usb/asix.c: Fix pointer cast.
Stephen Rothwell reports the following new warning:
drivers/net/usb/asix.c: In function 'asix_rx_fixup':
drivers/net/usb/asix.c:325: warning: cast from pointer to integer of different size
drivers/net/usb/asix.c:354: warning: cast from pointer to integer of different size
The code just cares about the low alignment bits, so use
an "unsigned long" cast instead of one to "u32".
Signed-off-by: David S. Miller <davem@davemloft.net>
Sarveshwar Bandi [Tue, 25 May 2010 23:16:32 +0000 (16:16 -0700)]
be2net: Bug fix to avoid disabling bottom half during firmware upgrade.
Certain firmware commands/operations to upgrade firmware could take several
seconds to complete. The code presently disables bottom half during these
operations which could lead to unpredictable behaviour in certain cases. This
patch now does all firmware upgrade operations asynchronously using a
completion variable.
Signed-off-by: Sarveshwar Bandi <sarveshwarb@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
J. R. Okajima [Tue, 25 May 2010 23:10:14 +0000 (16:10 -0700)]
proc_dointvec: write a single value
The commit
00b7c3395aec3df43de5bd02a3c5a099ca51169f
"sysctl: refactor integer handling proc code"
modified the behaviour of writing to /proc.
Before the commit, write("1\n") to /proc/sys/kernel/printk succeeded. But
now it returns EINVAL.
This commit supports writing a single value to a multi-valued entry.
Signed-off-by: J. R. Okajima <hooanon05@yahoo.co.jp>
Reviewed-and-tested-by: WANG Cong <amwang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Filip Aben [Tue, 25 May 2010 23:09:23 +0000 (16:09 -0700)]
hso: add support for new products
This patch adds a few new product id's for the hso driver.
Signed-off-by: Filip Aben <f.aben@option.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Rémi Denis-Courmont [Tue, 25 May 2010 23:08:39 +0000 (16:08 -0700)]
Phonet: fix potential use-after-free in pep_sock_close()
sk_common_release() might destroy our last reference to the socket.
So an extra temporary reference is needed during cleanup.
Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Turner [Thu, 29 Apr 2010 02:49:36 +0000 (22:49 -0400)]
alpha: simplify and optimize sched_find_first_bit
Search only the first 100 bits instead of 140, saving a couple
instructions. The resulting code is about 1/3 faster (40K ticks/1000
iterations down to 30K ticks/1000 iterations).
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: linux-alpha@vger.kernel.org
Acked-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Matt Turner <mattst88@gmail.com>
Nick Piggin [Thu, 29 Apr 2010 21:48:18 +0000 (17:48 -0400)]
alpha: invoke oom-killer from page fault
As explained in commit
1c0fe6e3bd, we want to call the architecture
independent oom killer when getting an unexplained OOM from
handle_mm_fault, rather than simply killing current.
[mattst88: kill now unused 'survive' label]
Cc: linux-alpha@vger.kernel.org
Cc: Richard Henderson <rth@twiddle.net>
Cc: linux-arch@vger.kernel.org
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Nick Piggin <npiggin@suse.de>
John Stultz [Fri, 19 Mar 2010 16:23:57 +0000 (12:23 -0400)]
Convert alpha to use clocksources instead of arch_gettimeoffset
Alpha has a tsc like rpcc counter that it uses to manage time.
This can be converted to an actual clocksource instead of utilizing
the arch_gettimeoffset method that is really only there for legacy
systems with no continuous counter.
Further cleanups could be made if alpha converted to the clockevent
model.
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Richard Henderson <rth@twiddle.net>
Acked-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Tested-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Kay Sievers [Thu, 20 May 2010 16:07:20 +0000 (18:07 +0200)]
driver core: add devname module aliases to allow module on-demand auto-loading
This adds:
alias: devname:<name>
to some common kernel modules, which will allow the on-demand loading
of the kernel module when the device node is accessed.
Ideally all these modules would be compiled-in, but distros seems too
much in love with their modularization that we need to cover the common
cases with this new facility. It will allow us to remove a bunch of pretty
useless init scripts and modprobes from init scripts.
The static device node aliases will be carried in the module itself. The
program depmod will extract this information to a file in the module directory:
$ cat /lib/modules/
2.6.34-00650-g537b60d-dirty/modules.devname
# Device nodes to trigger on-demand module loading.
microcode cpu/microcode c10:184
fuse fuse c10:229
ppp_generic ppp c108:0
tun net/tun c10:200
dm_mod mapper/control c10:235
Udev will pick up the depmod created file on startup and create all the
static device nodes which the kernel modules specify, so that these modules
get automatically loaded when the device node is accessed:
$ /sbin/udevd --debug
...
static_dev_create_from_modules: mknod '/dev/cpu/microcode' c10:184
static_dev_create_from_modules: mknod '/dev/fuse' c10:229
static_dev_create_from_modules: mknod '/dev/ppp' c108:0
static_dev_create_from_modules: mknod '/dev/net/tun' c10:200
static_dev_create_from_modules: mknod '/dev/mapper/control' c10:235
udev_rules_apply_static_dev_perms: chmod '/dev/net/tun' 0666
udev_rules_apply_static_dev_perms: chmod '/dev/fuse' 0666
A few device nodes are switched to statically allocated numbers, to allow
the static nodes to work. This might also useful for systems which still run
a plain static /dev, which is completely unsafe to use with any dynamic minor
numbers.
Note:
The devname aliases must be limited to the *common* and *single*instance*
device nodes, like the misc devices, and never be used for conceptually limited
systems like the loop devices, which should rather get fixed properly and get a
control node for losetup to talk to, instead of creating a random number of
device nodes in advance, regardless if they are ever used.
This facility is to hide the mess distros are creating with too modualized
kernels, and just to hide that these modules are not compiled-in, and not to
paper-over broken concepts. Thanks! :)
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: Miklos Szeredi <miklos@szeredi.hu>
Cc: Chris Mason <chris.mason@oracle.com>
Cc: Alasdair G Kergon <agk@redhat.com>
Cc: Tigran Aivazian <tigran@aivazian.fsnet.co.uk>
Cc: Ian Kent <raven@themaw.net>
Signed-Off-By: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David S. Miller [Tue, 25 May 2010 21:05:24 +0000 (14:05 -0700)]
Merge branch 'wimax-2.6.35.y' of git://git./linux/kernel/git/inaky/wimax
David S. Miller [Tue, 25 May 2010 20:15:11 +0000 (13:15 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6
Linus Torvalds [Tue, 25 May 2010 19:06:33 +0000 (12:06 -0700)]
Merge branch 'devel' of /home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (103 commits)
ARM: 6141/1: Add audio support part in arch/arm/mach-w90x900
ARM: 5939/1: ARM: Add option CMDLINE_FORCE to force usage of the in-kernel cmdline
ARM: 6140/1: silence a bogus sparse warning in unwind.c
ARM: mach-at91: duplicated include
ARM: arch/arm/nwfpe/fpsr.h: Checkpatch cleanup
ARM: arch/arm/mach-shark/pci.c: Checkpatch cleanup
ARM: arch/arm/nwfpe/ChangeLog: Checkpatch cleanup
ARM: arch/arm/mach-sa1100/leds.c: Checkpatch cleanup
ARM: arch/arm/mach-h720x/common.h: Checkpatch cleanup
ARM: arch/arm/mach-footbridge/ebsa285-pci.c: Checkpatch cleanup
ARM: arch/arm/mach-clps711x/Makefile.boot: Checkpatch cleanup
ARM: arch/arm/boot/bootp/bootp.lds: Checkpatch cleanup
ARM: SPEAR6xx: remove duplicated #include
ARM: s3c6400_defconfig: Add NAND driver
ARM: s3c6400_defconfig: enable sound as modules
ARM: s3c6400_defconfig: enable power management
ARM: s5pv210_defconfig: Update s5pv210_defconfig to v2.6.34
ARM: s5pc110_defconfig: Update s5pc110_defconfig to v2.6.34
ARM: s5p6442_defconfig: Update s5p6442_defconfig to v2.6.34
ARM: s5p6440_defconfig: Update s5p6440_defconfig to v2.6.34
...
Linus Torvalds [Tue, 25 May 2010 19:05:17 +0000 (12:05 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
RDMA/nes: Fix incorrect unlock in nes_process_mac_intr()
RDMA/nes: Async event for closed QP causes crash
RDMA/nes: Have ethtool read hardware registers for rx/tx stats
RDMA/cxgb4: Only insert sq qid in lookup table
RDMA/cxgb4: Support IB_WR_READ_WITH_INV opcode
RDMA/cxgb4: Set fence flag for inv-local-stag work requests
RDMA/cxgb4: Update some HW limits
RDMA/cxgb4: Don't limit fastreg page list depth
RDMA/cxgb4: Return proper errors in fastreg mr/pbl allocation
RDMA/cxgb4: Fix overflow bug in CQ arm
RDMA/cxgb4: Optimize CQ overflow detection
RDMA/cxgb4: CQ size must be IQ size - 2
RDMA/cxgb4: Register RDMA provider based on LLD state_change events
RDMA/cxgb4: Detach from the LLD after unregistering RDMA device
IB/ipath: Remove support for QLogic PCIe QLE devices
IB/qib: Add new qib driver for QLogic PCIe InfiniBand adapters
IB/mad: Make needlessly global mad_sendq_size/mad_recvq_size static
IB/core: Allow device-specific per-port sysfs files
mlx4_core: Clean up mlx4_alloc_icm() a bit
mlx4_core: Fix possible chunk sg list overflow in mlx4_alloc_icm()
Linus Torvalds [Tue, 25 May 2010 19:04:17 +0000 (12:04 -0700)]
Merge branch 'next-spi' of git://git.secretlab.ca/git/linux-2.6
* 'next-spi' of git://git.secretlab.ca/git/linux-2.6:
spi/xilinx: Fix compile error
spi/davinci: Fix clock prescale factor computation
spi: move bitbang txrx utility functions to private header
spi/mpc5121: Add SPI master driver for MPC5121 PSC
powerpc/mpc5121: move PSC FIFO memory init to platform code
spi/ep93xx: implemented driver for Cirrus EP93xx SPI controller
Documentation/spi/* compile warning fix
spi/omap2_mcspi: Check params before dereference or use
spi/omap2_mcspi: add turbo mode support
spi/omap2_mcspi: change default DMA_MIN_BYTES value to 160
spi/pl022: fix stop queue procedure
spi/pl022: add support for the PL023 derivate
spi/pl022: fix up differences between ARM and ST versions
spi/spi_mpc8xxx: Do not use map_tx_dma to unmap rx_dma
spi/spi_mpc8xxx: Fix QE mode Litte Endian
spi/spi_mpc8xxx: fix potential memory corruption.
Linus Torvalds [Tue, 25 May 2010 19:03:17 +0000 (12:03 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/gerg/m68knommu
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
arch/m68knommu/platform/68360/commproc.c: Checkpatch cleanup
arch/m68knommu/mm/fault.c: Checkpatch cleanup
m68knommu: improve short help of m68knommu/Kconfig/RAMSIZE for '0' case
m68knommu: remove un-used mcfsmc.h
m68knommu: add smc91x support for ColdFire NETtel boards
m68knommu: add smc91x support to ColdFire 5249 platform
m68knommu: remove size limit on non-MMU TASK_SIZE
m68knommu: fix broken use of BUAD_TABLE_SIZE in 68328serial driver
m68knommu: Coldfire QSPI platform support
Linus Torvalds [Tue, 25 May 2010 18:49:41 +0000 (11:49 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/lrg/voltage-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6:
regulator: return set_mode is same mode is requested
Regulators: ab3100/bq24022: add a missing .owner field in regulator_desc
twl6030: regulator: Remove vsel tables and use formula for calculation
mc13783-regulator: fix vaild voltage range checking for mc13783_fixed_regulator_set_voltage
regulator: use voltage number array in 88pm860x
regulator: make 88pm860x sharing one driver structure
regulator: simplify regulator_register() error handling
regulator: fix unset_regulator_supplies() to remove all matches
regulator: prevent registration of matching regulator consumer supplies
regulator: Allow regulator-regulator supplies to be specified by name
Linus Torvalds [Tue, 25 May 2010 18:40:40 +0000 (11:40 -0700)]
Merge git://git./linux/kernel/git/wim/linux-2.6-watchdog
* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
watchdog: Driver for the watchdog timer on Freescale IMX2 (and later) processors.
watchdog: s3c2410_wdt - Fix on handling of the request_mem_region fail
watchdog: s3c2410_wdt - Add extra option to include watchdog for Samsung SoCs
iTCO_wdt: fix TCO V1 timeout values and limits
watchdog: twl4030_wdt: Disable watchdog during probing
watchdog: update/improve/consolidate watchdog driver
watchdog: booke_wdt: fix ioctl status flags
watchdog: fix several MODULE_PARM_DESC strings
watchdog: bfin: use new common Blackfin watchdog header
Roland Dreier [Tue, 25 May 2010 16:54:03 +0000 (09:54 -0700)]
Merge branches 'cxgb4', 'misc', 'mlx4', 'nes' and 'qib' into for-next
Chien Tung [Tue, 25 May 2010 15:13:09 +0000 (10:13 -0500)]
RDMA/nes: Fix incorrect unlock in nes_process_mac_intr()
Commit
ce6e74f2 ("RDMA/nes: Make nesadapter->phy_lock usage
consistent") introduced a problem where phy_lock was only unlocked
within an if statement and so nes_process_mac_intr() could return with
phy_lock still held. Fix this.
This was discovered because of the sparse warning:
drivers/infiniband/hw/nes/nes_hw.c:2643:9: warning: context imbalance in 'nes_process_mac_intr' - different lock contexts for basic block
Reported-by: Roland Dreier <rdreier@cisco.com>
Signed-off-by: Chien Tung <chien.tin.tung@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Linus Torvalds [Tue, 25 May 2010 15:17:51 +0000 (08:17 -0700)]
Merge git://git./linux/kernel/git/steve/gfs2-2.6-fixes
* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes:
GFS2: Fix permissions checking for setflags ioctl()
GFS2: Don't "get" xattrs for ACLs when ACLs are turned off
GFS2: Rework reclaiming unlinked dinodes
Linus Torvalds [Tue, 25 May 2010 15:17:01 +0000 (08:17 -0700)]
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
* 'for-linus' of git://oss.sgi.com/xfs/xfs:
xfs: Ensure inode allocation buffers are fully replayed
xfs: enable background pushing of the CIL
xfs: forced unmounts need to push the CIL
xfs: Introduce delayed logging core code
xfs: Delayed logging design documentation
xfs: Improve scalability of busy extent tracking
xfs: make the log ticket ID available outside the log infrastructure
xfs: clean up log ticket overrun debug output
xfs: Clean up XFS_BLI_* flag namespace
xfs: modify buffer item reference counting
xfs: allow log ticket allocation to take allocation flags
xfs: Don't reuse the same transaction ID for duplicated transactions.
Linus Torvalds [Tue, 25 May 2010 15:16:34 +0000 (08:16 -0700)]
Merge git://git.infradead.org/battery-2.6
* git://git.infradead.org/battery-2.6:
power_supply: Fix regression for 'type' property
Felix Fietkau [Thu, 13 May 2010 18:37:25 +0000 (20:37 +0200)]
ath9k: remove VEOL support for ad-hoc
With VEOL, Beacon transmission in ad-hoc does not currently work.
I believe for larger ad-hoc networks, VEOL is too unreliable, as
it can get beacon transmissions stuck during synchronization.
Use SWBA based beacon trasmission similar to AP mode instead.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Benoit Papillault <benoit.papillault@free.fr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Thu, 13 May 2010 18:37:24 +0000 (20:37 +0200)]
ath9k: change beacon allocation to prefer the first beacon slot
This fixes IBSS beacon transmissions without VEOL enabled
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Henrik Kretzschmar [Mon, 24 May 2010 21:34:09 +0000 (14:34 -0700)]
auxdisplay: section cleanup in cfag12864bfb driver
This fixes a two section mismatches and makes remove() __devexit.
Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Cc: Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Dan Carpenter [Mon, 24 May 2010 21:34:09 +0000 (14:34 -0700)]
nuc900fb: release correct mem region
We should be releasing "res->start" here.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Wan ZongShun <mcuos.com@gmail.com>
Cc: Wang Qiang <rurality.linux@gmail.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Albert Herranz [Mon, 24 May 2010 21:34:08 +0000 (14:34 -0700)]
fb_defio: fix for non-dirty ptes
Fix a problem observed while using fb_defio with a short delay on a
PowerPC platform.
It is possible that page_mkclean() is invoked in the deferred io work
function _before_ a PTE has been marked dirty. In this case, the page is
removed from the defio pagelist but page_mkclean() does not write-protect
the page again. The end result is that defio ignores all subsequent
writes to the page and the corresponding portions of the framebuffer never
get updated.
The fix consists in keeping track of the pages with non-dirty PTEs,
re-checking them again on the next deferred io work iteration. Note that
those pages are not passed to the defio callback as they are not written
by userspace yet.
Signed-off-by: Albert Herranz <albert_herranz@yahoo.es>
Acked-by: Jaya Kumar <jayakumar.lkml@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Henrik Kretzschmar [Mon, 24 May 2010 21:34:07 +0000 (14:34 -0700)]
sgivwfb: fix sections
Since the drivers probe call was changed from .init.text to .devinit.text
in commit
c2e13037e6794bd0d9de3f9ecabf5615f15c160b ("platform-drivers:
move probe to .devinit.text in drivers/video") the fb_fix_screeninfo and
fb_var_screeninfo structures must be changed from .init.data to
.devinit.data, too.
Also the drivers remove routine should be moved from .text to .devexit.text
It removes these 7 section mismatch warnings from modpost:
WARNING: vmlinux.o(.devinit.text+0x1e28): Section mismatch in reference from the function sgivwfb_probe() to the variable .init.data:sgivwfb_fix
The function __devinit sgivwfb_probe() references
a variable __initdata sgivwfb_fix.
If sgivwfb_fix is only used by sgivwfb_probe then
annotate sgivwfb_fix with a matching annotation.
WARNING: vmlinux.o(.devinit.text+0x1e50): Section mismatch in reference from the function sgivwfb_probe() to the (unknown reference) .init.data:(unknown)
The function __devinit sgivwfb_probe() references
a (unknown reference) __initdata (unknown).
If (unknown) is only used by sgivwfb_probe then
annotate (unknown) with a matching annotation.
WARNING: vmlinux.o(.devinit.text+0x1e59): Section mismatch in reference from the function sgivwfb_probe() to the (unknown reference) .init.data:(unknown)
The function __devinit sgivwfb_probe() references
a (unknown reference) __initdata (unknown).
If (unknown) is only used by sgivwfb_probe then
annotate (unknown) with a matching annotation.
WARNING: vmlinux.o(.devinit.text+0x1e60): Section mismatch in reference from the function sgivwfb_probe() to the variable .init.data:sgivwfb_fix
The function __devinit sgivwfb_probe() references
a variable __initdata sgivwfb_fix.
If sgivwfb_fix is only used by sgivwfb_probe then
annotate sgivwfb_fix with a matching annotation.
WARNING: vmlinux.o(.devinit.text+0x1e6a): Section mismatch in reference from the function sgivwfb_probe() to the (unknown reference) .init.data:(unknown)
The function __devinit sgivwfb_probe() references
a (unknown reference) __initdata (unknown).
If (unknown) is only used by sgivwfb_probe then
annotate (unknown) with a matching annotation.
WARNING: vmlinux.o(.devinit.text+0x1e7f): Section mismatch in reference from the function sgivwfb_probe() to the variable .init.data:sgivwfb_var1600sw
The function __devinit sgivwfb_probe() references
a variable __initdata sgivwfb_var1600sw.
If sgivwfb_var1600sw is only used by sgivwfb_probe then
annotate sgivwfb_var1600sw with a matching annotation.
WARNING: vmlinux.o(.devinit.text+0x1e91): Section mismatch in reference from the function sgivwfb_probe() to the variable .init.data:sgivwfb_var
The function __devinit sgivwfb_probe() references
a variable __initdata sgivwfb_var.
If sgivwfb_var is only used by sgivwfb_probe then
annotate sgivwfb_var with a matching annotation.
Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Cc: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Henrik Kretzschmar [Mon, 24 May 2010 21:34:05 +0000 (14:34 -0700)]
s3c2410fb: fix sections
Since the drivers probe calls were changed from .init.text to
.devinit.text in commit
c2e13037e6794bd0d9de3f9ecabf5615f15c160b
("platform-drivers: move probe to .devinit.text in drivers/video") all the
function from .init.text should be moved to .devinit.text, too.
The drivers remove calls can also be move from .text to .devexit.text.
Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Cc: Vincent Sanders <support@simtec.co.uk>
Acked-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Tested-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Henrik Kretzschmar [Mon, 24 May 2010 21:34:04 +0000 (14:34 -0700)]
hitfb: fix sections
Since the drivers probe call was changed from .init.text to .devinit.text
in commit
c2e13037e6794bd0d9de3f9ecabf5615f15c160b ("platform-drivers:
move probe to .devinit.text in drivers/video") the fb_fix_screeninfo and
fb_var_screeninfo structures must be changed from .init.data to
.devinit.data, too.
Also the drivers remove routine should be moved from .exit.text to
.devexit.text
Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Grazvydas Ignotas [Mon, 24 May 2010 21:34:02 +0000 (14:34 -0700)]
fbdev: move FBIO_WAITFORVSYNC to linux/fb.h
FBIO_WAITFORVSYNC is currently implemented by matroxfb, atyfb, intelfb and
more. All of them keep redefining the same FBIO_WAITFORVSYNC macro over
and over again, so move it to linux/fb.h and clean up those duplicate
defines.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Cc: Ville Syrjala <syrjala@sci.fi>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Maik Broemme <mbroemme@plusserver.de>
Cc: Petr Vandrovec <vandrove@vc.cvut.cz>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Cc: "Hiremath, Vaibhav" <hvaibhav@ti.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Martin Ambrose [Mon, 24 May 2010 21:34:01 +0000 (14:34 -0700)]
fbdev: da8xx/omap-l1xx: implement double buffering
This work includes the following:
- Implement handler for FBIO_WAITFORVSYNC ioctl.
- Allocate the data and palette buffers separately. A consequence of
this is that the palette and data loading is now done in different
phases. And that the LCD must be disabled temporarily after the palette
is loaded but this will only happen once after init and each time the
palette is changed. I think this is OK.
- Allocate two (ping and pong) framebuffers from memory.
- Add pan_display handler which toggles the LCDC DMA registers between
the ping and pong buffers.
Signed-off-by: Martin Ambrose <martin@ti.com>
Cc: Chaithrika U S <chaithrika@ti.com>
Cc: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Henrik Kretzschmar [Mon, 24 May 2010 21:34:00 +0000 (14:34 -0700)]
fbdev: section cleanup in w100fb
Fix up the section in the w100fb driver, by moving:
* w100fb_remove() from .text to .devexit.text
* w100_get_xtal_table() from .text to .devinit.text
* w100fb_init() from .devinit.text to .init.text
Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: <stable@kernel.org> [if "platform-drivers: move probe to .devinit.text in drivers/video" was merged]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Henrik Kretzschmar [Mon, 24 May 2010 21:33:59 +0000 (14:33 -0700)]
fbdev: section cleanup in vga16fb
Fix up the sections in the vga16fb driver, by moving:
* the variables vga16_defined and vga16fb
from .init.data to .devinit.data
* vga16fb_setup() from .text to .init.text
* vga16fb_remove() from .text. to .devexit.text
This fixes the following warnings issued by modpost:
WARNING: drivers/video/built-in.o(.devinit.text+0x1a420): Section mismatch in re
ference from the function vga16fb_probe() to the (unknown reference) .init.data:
(unknown)
The function __devinit vga16fb_probe() references
a (unknown reference) __initdata (unknown).
If (unknown) is only used by vga16fb_probe then
annotate (unknown) with a matching annotation.
WARNING: drivers/video/built-in.o(.devinit.text+0x1a437): Section mismatch in reference from the function vga16fb_probe() to the variable .init.data:vga16fb_defined
The function __devinit vga16fb_probe() references
a variable __initdata vga16fb_defined.
If vga16fb_defined is only used by vga16fb_probe then
annotate vga16fb_defined with a matching annotation.
WARNING: drivers/video/built-in.o(.devinit.text+0x1a457): Section mismatch in reference from the function vga16fb_probe() to the variable .init.data:vga16fb_fix
The function __devinit vga16fb_probe() references
a variable __initdata vga16fb_fix.
If vga16fb_fix is only used by vga16fb_probe then
annotate vga16fb_fix with a matching annotation.
Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: <stable@kernel.org> [if "platform-drivers: move probe to .devinit.text in drivers/video" was merged]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Henrik Kretzschmar [Mon, 24 May 2010 21:33:57 +0000 (14:33 -0700)]
fbdev: section cleanup in vfb
Fix up the section in the vfb driver, by moving the variables vfb_default
and vfb_fix from .init.data to .devinit.data
This fixes the following warnings issued by modpost:
WARNING: drivers/video/vfb.o(.devinit.text+0xf8): Section mismatch in reference from the function vfb_probe() to the variable .init.data:vfb_default
The function __devinit vfb_probe() references
a variable __initdata vfb_default.
If vfb_default is only used by vfb_probe then
annotate vfb_default with a matching annotation.
WARNING: drivers/video/vfb.o(.devinit.text+0x114): Section mismatch in reference from the function vfb_probe() to the variable .init.data:vfb_fix
The function __devinit vfb_probe() references
a variable __initdata vfb_fix.
If vfb_fix is only used by vfb_probe then
annotate vfb_fix with a matching annotation.
Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: <stable@kernel.org> [if "platform-drivers: move probe to .devinit.text in drivers/video" was merged]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Henrik Kretzschmar [Mon, 24 May 2010 21:33:56 +0000 (14:33 -0700)]
fbdev: section cleanup in hgafb
Fix up the sections in the hgafb driver, by
* moving hga_default_var and hga_fix from .init.data to .devinit.data
* moving hga_detect() from .init.text to .devinit.text
* moving hga_fb_remove() from .text to .devexit.text
This fixes the following warnings issued by modpost:
WARNING: drivers/video/hgafb.o(.devinit.text+0x18): Section mismatch in referenc
e from the function hgafb_probe() to the function .init.text:hga_card_detect()
The function __devinit hgafb_probe() references
a function __init hga_card_detect().
If hga_card_detect is only used by hgafb_probe then
annotate hga_card_detect with a matching annotation.
WARNING: drivers/video/hgafb.o(.devinit.text+0xfe): Section mismatch in referenc
e from the function hgafb_probe() to the variable .init.data:hga_fix
The function __devinit hgafb_probe() references
a variable __initdata hga_fix.
If hga_fix is only used by hgafb_probe then
annotate hga_fix with a matching annotation.
WARNING: drivers/video/hgafb.o(.devinit.text+0x105): Section mismatch in reference from the function hgafb_probe() to the variable .init.data:hga_default_var
The function __devinit hgafb_probe() references
a variable __initdata hga_default_var.
If hga_default_var is only used by hgafb_probe then
annotate hga_default_var with a matching annotation.
Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: <stable@kernel.org> [if "platform-drivers: move probe to .devinit.text in drivers/video" was merged]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Henrik Kretzschmar [Mon, 24 May 2010 21:33:54 +0000 (14:33 -0700)]
fbdev: section cleanup in arcfb
Fix the sections in the arcfb driver, by moving:
* the variables arcfb_fix and arcfb_var from .init.data to .devinit.data
* arcfb_remove() from .text to .devexit.text
This fixes the following warnings issued by modpost:
WARNING: drivers/video/built-in.o(.devinit.text+0x543): Section mismatch in reference from the function arcfb_probe() to the variable .init.data:arcfb_var
The function __devinit arcfb_probe() references
a variable __initdata arcfb_var.
If arcfb_var is only used by arcfb_probe then
annotate arcfb_var with a matching annotation.
WARNING: drivers/video/built-in.o(.devinit.text+0x558): Section mismatch in reference from the function arcfb_probe() to the variable .init.data:arcfb_fix
The function __devinit arcfb_probe() references
a variable __initdata arcfb_fix.
If arcfb_fix is only used by arcfb_probe then
annotate arcfb_fix with a matching annotation.
Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: <stable@kernel.org> [if "platform-drivers: move probe to .devinit.text in drivers/video" was merged]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Dan Carpenter [Mon, 24 May 2010 21:33:53 +0000 (14:33 -0700)]
sis: strcpy() => strlcpy()
These are different size buffers (40 chars vs 16), we may as well be
cautious.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Michael Hennerich [Mon, 24 May 2010 21:33:52 +0000 (14:33 -0700)]
fbdev: bfin-lq035q1-fb: respect new PPI mode platform field
This lets us support the new BF527-EZKIT V2.1 via platform resources
tweaks only.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Cc: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Mark Brown [Mon, 24 May 2010 21:33:51 +0000 (14:33 -0700)]
rtc: use genirq directly in rtc-wm831x
Now that the WM831x core uses genirq for the IRQ controller there is no
need to use the WM831x-specific wrappers to request interrupts so convert
to use genirq directly.
Also use more meaningful strings to make /proc/interrupts more readily
legible.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Dan Carpenter [Mon, 24 May 2010 21:33:49 +0000 (14:33 -0700)]
rtc-cmos: do dev_set_drvdata() earlier in the initialization
The bug is an oops when dev_get_drvdata() returned null in
cmos_update_irq_enable(). The call tree looks like this:
rtc_dev_ioctl()
=> rtc_update_irq_enable()
=> cmos_update_irq_enable()
It's caused by a race condition in the module initialization. It is
rtc_device_register() which makes the ioctl operations live so I moved
the call to dev_set_drvdata() before the call to rtc_device_register().
Addresses https://bugzilla.kernel.org/show_bug.cgi?id=15963
Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Dan Carpenter <error27@gmail.com>
Tested-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Paul Gortmaker <p_gortmaker@yahoo.com>
Cc: Malte Schroder <maltesch@gmx.de>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Marc Zyngier [Mon, 24 May 2010 21:33:47 +0000 (14:33 -0700)]
rtc-ds1302: add some abstraction for new platform support
The current ds1302 driver (or at least the one that lives in /drivers/rtc)
seems to be designed for memory mapped devices only. This make it quite
hard to add support for GPIO-based implementations (as this is the case
for the upcoming Arcom Vulcan).
This patch moves the direct register access to inline functions with
explicit names. Still not as good as a proper platform driver, but at
least neater.
Signed-off-by: Marc Zyngier <maz@misterjones.org>
Cc: Paul Gortmaker <p_gortmaker@yahoo.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
H Hartley Sweeten [Mon, 24 May 2010 21:33:46 +0000 (14:33 -0700)]
rtc-isl1208: use sysfs_{create/remove}_group
Instead of individually creating and removing the sysfs device attribute
files, wrap them in an attribute_group and use
sysfs_{create/remove}_group.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Paul Gortmaker <p_gortmaker@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Vladimir Zapolskiy [Mon, 24 May 2010 21:33:46 +0000 (14:33 -0700)]
rtc-mxc: remove unnecessary clock source for rtc subsystem
On imx SoCs rtc clock parent is CKIL, but clock rate shall be determined
using rtc clock itself, that eliminates CKIL clock usage in the driver.
Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Daniel Mack <daniel@caiaq.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Paul Gortmaker <p_gortmaker@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Maurus Cuelenaere [Mon, 24 May 2010 21:33:43 +0000 (14:33 -0700)]
s3c rtc driver: add support for S3C64xx
Add support for the S3C64xx SoC to the generic S3C RTC driver.
Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Cc: Frans Pop <elendil@planet.nl>
Cc: Paul Gortmaker <p_gortmaker@yahoo.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Huang Weiyi [Mon, 24 May 2010 21:33:43 +0000 (14:33 -0700)]
smbfs: remove duplicated #include
Remove duplicated #include('s) in fs/smbfs/symlink.c
Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Randy Dunlap [Mon, 24 May 2010 21:33:41 +0000 (14:33 -0700)]
xen: fix build when SYSRQ is disabled
Fix build error when CONFIG_MAGIC_SYSRQ is not enabled:
drivers/xen/manage.c:223: error: implicit declaration of function 'handle_sysrq'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Carsten Emde [Mon, 24 May 2010 21:33:41 +0000 (14:33 -0700)]
drivers/hwmon/coretemp.c: get TjMax value from MSR
The MSR IA32_TEMPERATURE_TARGET contains the TjMax value in the newer
Intel processors.
Signed-off-by: Huaxu Wan <huaxu.wan@linux.intel.com>
Signed-off-by: Carsten Emde <C.Emde@osadl.org>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Valdis Kletnieks <valdis.kletnieks@vt.edu>
Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Yong Wang <yong.y.wang@linux.intel.com>
Cc: Rudolf Marek <r.marek@assembler.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Carsten Emde [Mon, 24 May 2010 21:33:39 +0000 (14:33 -0700)]
drivers/hwmon/coretemp.c: detect the thermal sensors by CPUID
The thermal sensors of Intel(R) CPUs can be detected by CPUID instruction,
indicated by CPUID.06H.EAX[0].
Signed-off-by: Huaxu Wan <huaxu.wan@linux.intel.com>
Signed-off-by: Carsten Emde <C.Emde@osadl.org>
Reviewed-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Yong Wang <yong.y.wang@linux.intel.com>
Cc: Rudolf Marek <r.marek@assembler.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Paul Thomas [Mon, 24 May 2010 21:33:38 +0000 (14:33 -0700)]
hwmon: add TI ads7871 a/d converter driver
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Paul Thomas <pthomas8589@gmail.com>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Samu Onkalo [Mon, 24 May 2010 21:33:37 +0000 (14:33 -0700)]
lis3: setup poll interval limits
Set valid adjustment window (0 - 2000ms).
Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com>
Acked-by: Eric Piel <eric.piel@tremplin-utc.net>
Cc: Daniel Mack <daniel@caiaq.de>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Samu Onkalo [Mon, 24 May 2010 21:33:37 +0000 (14:33 -0700)]
lis3: interrupt handlers for 8bit wakeup and click events
Content for the 8bit device threaded interrupt handlers. Depending on the
interrupt line and chip configuration, either click or wakeup / freefall
handler is called. In case of click, BTN_ event is sent via input device.
In case of wakeup or freefall, input device ABS_ events are updated
immediatelly.
It is still possible to configure interrupt line 1 for fast freefall
detection and use the second line either for click or threshold based
interrupts. Or both lines can be used for click / threshold interrupts.
Polled input device can be set to stopped state and still get coordinate
updates via input device using interrupt based method. Polled mode and
interrupt mode can also be used parallel.
BTN_ events are remapped based on existing axis remapping information.
Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com>
Acked-by: Eric Piel <eric.piel@tremplin-utc.net>
Cc: Daniel Mack <daniel@caiaq.de>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Samu Onkalo [Mon, 24 May 2010 21:33:36 +0000 (14:33 -0700)]
lis3: add skeletons for interrupt handlers
Original lis3 driver didn't provide interrupt handler(s) for click or
threshold event handling. This patch adds threaded handlers for one or
two interrupt lines for 8 bit device. Actual content for interrupt
handling is provided in the separate patch.
Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com>
Tested-by: Daniel Mack <daniel@caiaq.de>
Acked-by: Eric Piel <eric.piel@tremplin-utc.net>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Samu Onkalo [Mon, 24 May 2010 21:33:35 +0000 (14:33 -0700)]
lis3: introduce platform data for second ff / wu unit
8 bit device has two wakeup / free fall units. It was not possible to
configure the second unit. This patch introduces configuration entry to
the platform data and also corresponding changes to the 8 bit setup
function.
High pass filters were enabled by default. Patch introduces configuration
option for high pass filter cut off frequency and also possibility to
disable or enable the filter via platform data. Since the control is a
new one and default state was filter enabled, new option is used to
disable the filter. This way old platform data is still compatible with
the change.
Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com>
Acked-by: Eric Piel <eric.piel@tremplin-utc.net>
Tested-by: Daniel Mack <daniel@caiaq.de>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Samu Onkalo [Mon, 24 May 2010 21:33:34 +0000 (14:33 -0700)]
lis3: separate configuration function for 8 bit device
Separate configuration function for 8 bit version of the chip. This way
generic part of the init function stays little bit more readable.
Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com>
Acked-by: Eric Piel <eric.piel@tremplin-utc.net>
Tested-by: Daniel Mack <daniel@caiaq.de>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Samu Onkalo [Mon, 24 May 2010 21:33:32 +0000 (14:33 -0700)]
lis3: add missing constants for 8bit device
Definitions for click were missing.
Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com>
Acked-by: Eric Piel <eric.piel@tremplin-utc.net>
Tested-by: Daniel Mack <daniel@caiaq.de>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>