platform/kernel/linux-starfive.git
12 years agostaging: line6: use source select control for UX2 devices
Markus Grabner [Thu, 19 Jan 2012 23:09:08 +0000 (00:09 +0100)]
staging: line6: use source select control for UX2 devices

Signed-off-by: Markus Grabner <grabner@icg.tugraz.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: line6: removed obsolete code
Markus Grabner [Thu, 19 Jan 2012 23:09:07 +0000 (00:09 +0100)]
staging: line6: removed obsolete code

Signed-off-by: Markus Grabner <grabner@icg.tugraz.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: precedence bug in crystalhd_stop_tx_dma_engine()
Dan Carpenter [Sun, 15 Jan 2012 11:29:39 +0000 (14:29 +0300)]
staging: precedence bug in crystalhd_stop_tx_dma_engine()

The intent here is to see if we have cleared the DMA_START_BIT flag.  We
clear it a couple lines later.  The current code has a precedence bug so
it is equivalent to "if (!dma_cntrl) { ...".

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agodrivers/staging: adjust double test
Julia Lawall [Thu, 12 Jan 2012 21:49:27 +0000 (22:49 +0100)]
drivers/staging: adjust double test

Rewrite a duplicated test to test the correct value

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression E;
@@

(
* E
  || ... || E
|
* E
  && ... && E
)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: r8712u: Simplify semaphores
Larry Finger [Thu, 9 Feb 2012 01:42:03 +0000 (19:42 -0600)]
staging: r8712u: Simplify semaphores

I am preparing to convert this driver from semaphore to mutex locking,
The first step has been to eliminate a number of semaphores that were
initialized but never used, and one whose only use was a single "up"
after initialization. A total of 9 semaphores were removed in this process.

One other change was to remove some inline semaphore routines that were
unused.

In addition, several cases had the following structure:

down()
if () {
   ...
}
up()

The locking overhead was reduced by moving the up/down inside the if
block.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: fix the build breakage cuased by telephony drivers
Tomas Winkler [Thu, 9 Feb 2012 12:56:25 +0000 (14:56 +0200)]
staging: fix the build breakage cuased by telephony drivers

Fix build error caused by commit:

6222d7a17745f6e48fddda7245e4bb0d58bfeaf0
telephony: Move to staging

The telephony driver was moved to staging but the Makefiles
weren't updated

Cc: Joe Perches <joe@perches.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: bcm: Use memdup_user rather than duplicating its implementation
Thomas Meyer [Sun, 22 Jan 2012 17:29:51 +0000 (18:29 +0100)]
Staging: bcm: Use memdup_user rather than duplicating its implementation

This is a little bit restricted to reduce false positives

The semantic patch that makes this change is available
in scripts/coccinelle/api/memdup_user.cocci.

More information about semantic patching is available at
http://coccinelle.lip6.fr/

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: bcm: Alter name, datatype, and default value of iterator variables.
Kevin McKinney [Thu, 5 Jan 2012 01:29:05 +0000 (20:29 -0500)]
Staging: bcm: Alter name, datatype, and default value of iterator variables.

This patch renames variables used in iteration
statements with i, changes the datatype to int,
and removes any default value.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: bcm: Replace variables and function outputs defined as INT with int.
Kevin McKinney [Thu, 5 Jan 2012 01:29:04 +0000 (20:29 -0500)]
Staging: bcm: Replace variables and function outputs defined as INT with int.

This patch replaces all variables and function output
that have a datatype definition of "INT" with "int".

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: bcm: Remove assignment from if statement and reverse if logic for readability.
Kevin McKinney [Thu, 5 Jan 2012 01:29:03 +0000 (20:29 -0500)]
Staging: bcm: Remove assignment from if statement and reverse if logic for readability.

This patch removes an assignment from an if statement,
and it reverses the logic in several if statements to
make them more readable and understandable.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: bcm: Remove typedef from CmHost.c and use enum.
Kevin McKinney [Thu, 5 Jan 2012 01:29:02 +0000 (20:29 -0500)]
Staging: bcm: Remove typedef from CmHost.c and use enum.

This patch removes a typedef from a variable definition
in CmHost.c, and uses a enum instead. This Warning
was reported by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: bcm: Replace dated variable __FUNCTION__.
Kevin McKinney [Thu, 5 Jan 2012 01:29:01 +0000 (20:29 -0500)]
Staging: bcm: Replace dated variable __FUNCTION__.

This patch replaces the obsolete variable, __FUNCTION__,
that holds the name of the current function with
variable, __func__.  Reported by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: bcm: Fix coding style issues in CmHost.c
Kevin McKinney [Thu, 5 Jan 2012 01:29:00 +0000 (20:29 -0500)]
Staging: bcm: Fix coding style issues in CmHost.c

This patch cleans up several code style issues found
in CmHost.c reported by checkpatch.pl.  These include:
white space, braces, indents, and comments.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: bcm: Fix an integer overflow in IOCTL_BCM_NVM_READ/WRITE
Kevin McKinney [Tue, 20 Dec 2011 15:41:13 +0000 (10:41 -0500)]
Staging: bcm: Fix an integer overflow in IOCTL_BCM_NVM_READ/WRITE

Variables stNVMReadWrite.uioffset and stNVMReadWrite.uiNumBytes
are chosen from userspace and can be very high. The sum of
these two digits would result in a small number. Therefore,
this patch verifies a negative number was not entered, and
reorganizes the equation to remove the integer overflow.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: quickstart: Rename quickstart_btn to quickstart_button
Szymon Janc [Wed, 11 Jan 2012 22:22:49 +0000 (23:22 +0100)]
Staging: quickstart: Rename quickstart_btn to quickstart_button

Signed-off-by: Szymon Janc <szymon@janc.net.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: quickstart: Use %u for printing button id
Szymon Janc [Wed, 11 Jan 2012 22:22:48 +0000 (23:22 +0100)]
Staging: quickstart: Use %u for printing button id

Button id is of unsigned int type.

Signed-off-by: Szymon Janc <szymon@janc.net.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: quickstart: Use list.h API for buttons list
Szymon Janc [Wed, 11 Jan 2012 22:22:47 +0000 (23:22 +0100)]
Staging: quickstart: Use list.h API for buttons list

Signed-off-by: Szymon Janc <szymon@janc.net.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: quickstart: Get rid of quickstart_data struct
Szymon Janc [Wed, 11 Jan 2012 22:22:46 +0000 (23:22 +0100)]
Staging: quickstart: Get rid of quickstart_data struct

Signed-off-by: Szymon Janc <szymon@janc.net.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: quickstart: Remove unused defines
Szymon Janc [Wed, 11 Jan 2012 22:22:45 +0000 (23:22 +0100)]
Staging: quickstart: Remove unused defines

Signed-off-by: Szymon Janc <szymon@janc.net.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: quickstart: Use switch-case in quickstart_acpi_notify
Szymon Janc [Wed, 11 Jan 2012 22:22:44 +0000 (23:22 +0100)]
Staging: quickstart: Use switch-case in quickstart_acpi_notify

Signed-off-by: Szymon Janc <szymon@janc.net.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: quickstart: Cleanup quickstart_acpi_config
Szymon Janc [Wed, 11 Jan 2012 22:22:43 +0000 (23:22 +0100)]
Staging: quickstart: Cleanup quickstart_acpi_config

Signed-off-by: Szymon Janc <szymon@janc.net.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: quickstart: Cleanup quickstart_acpi_add
Szymon Janc [Wed, 11 Jan 2012 22:22:42 +0000 (23:22 +0100)]
Staging: quickstart: Cleanup quickstart_acpi_add

Signed-off-by: Szymon Janc <szymon@janc.net.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: quickstart: Cleanup quickstart_acpi_remove
Szymon Janc [Wed, 11 Jan 2012 22:22:41 +0000 (23:22 +0100)]
Staging: quickstart: Cleanup quickstart_acpi_remove

Signed-off-by: Szymon Janc <szymon@janc.net.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: quickstart: Cleanup quickstart_acpi_ghid
Szymon Janc [Wed, 11 Jan 2012 22:22:40 +0000 (23:22 +0100)]
Staging: quickstart: Cleanup quickstart_acpi_ghid

Also fix memory leak (buffer.pointer) when returned buffer of length
less than 8.

Signed-off-by: Szymon Janc <szymon@janc.net.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: quickstart: Make quickstart_input static
Szymon Janc [Wed, 11 Jan 2012 22:22:39 +0000 (23:22 +0100)]
Staging: quickstart: Make quickstart_input static

Signed-off-by: Szymon Janc <szymon@janc.net.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: quickstart: Move some code to avoid forward declarations
Szymon Janc [Wed, 11 Jan 2012 22:22:38 +0000 (23:22 +0100)]
Staging: quickstart: Move some code to avoid forward declarations

Signed-off-by: Szymon Janc <szymon@janc.net.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: quickstart: Prefix remaining functions names with quickstart_
Szymon Janc [Wed, 11 Jan 2012 22:22:37 +0000 (23:22 +0100)]
Staging: quickstart: Prefix remaining functions names with quickstart_

Signed-off-by: Szymon Janc <szymon@janc.net.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: quickstart: Some style, whitespaces and typos fixes
Szymon Janc [Wed, 11 Jan 2012 22:22:36 +0000 (23:22 +0100)]
Staging: quickstart: Some style, whitespaces and typos fixes

Signed-off-by: Szymon Janc <szymon@janc.net.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: zram: remove xvmalloc
Nitin Gupta [Mon, 9 Jan 2012 22:52:00 +0000 (16:52 -0600)]
staging: zram: remove xvmalloc

Removes the xvmalloc allocator code from the zram driver

Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Acked-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: zram: replace xvmalloc with zsmalloc
Nitin Gupta [Mon, 9 Jan 2012 22:51:59 +0000 (16:51 -0600)]
staging: zram: replace xvmalloc with zsmalloc

Replaces xvmalloc with zsmalloc as the compressed page allocator
for zram

Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Acked-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: add zsmalloc to Kconfig/Makefile
Seth Jennings [Mon, 9 Jan 2012 22:51:57 +0000 (16:51 -0600)]
staging: add zsmalloc to Kconfig/Makefile

Adds the new zsmalloc library to the staging Kconfig and Makefile

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: zsmalloc: zsmalloc memory allocation library
Nitin Gupta [Mon, 9 Jan 2012 22:51:56 +0000 (16:51 -0600)]
staging: zsmalloc: zsmalloc memory allocation library

This patch creates a new memory allocation library named
zsmalloc.

NOTE: zsmalloc currently depends on SPARSEMEM for the MAX_PHYSMEM_BITS
value needed to determine the format of the object handle. There may
be a better way to do this.  Feedback is welcome.

Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: zcache: crypto API support
Seth Jennings [Tue, 3 Jan 2012 22:31:34 +0000 (16:31 -0600)]
staging: zcache: crypto API support

This patch allow zcache to use the crypto API for page compression.
It replaces the direct LZO compress/decompress calls with calls
into the crypto compression API. The compressor to be used is
specified in the kernel boot line with the zcache parameter like:
zcache=lzo or zcache=deflate.  If the specified compressor can't
be loaded, zcache uses lzo as the default compressor.

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: hv: storvsc: Consolidate all the wire protocol definitions
K. Y. Srinivasan [Thu, 12 Jan 2012 20:38:08 +0000 (12:38 -0800)]
Staging: hv: storvsc: Consolidate all the wire protocol definitions

Consolidate all definitions that support communication with the host.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: hv: storvsc: Consolidate the request structure
K. Y. Srinivasan [Thu, 12 Jan 2012 20:38:07 +0000 (12:38 -0800)]
Staging: hv: storvsc: Consolidate the request structure

Consolidate the request structure by getting rid of struct hv_storvsc_request.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: hv: storvsc: Get rid of some unused defines
K. Y. Srinivasan [Thu, 12 Jan 2012 20:38:06 +0000 (12:38 -0800)]
Staging: hv: storvsc: Get rid of some unused defines

Get rid of some unused defines.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: hv: storvsc: Cleanup some protocol related constants
K. Y. Srinivasan [Thu, 12 Jan 2012 20:38:05 +0000 (12:38 -0800)]
Staging: hv: storvsc: Cleanup some protocol related constants

Cleanup some protocol related constants.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: hv: storvsc: Cleanup the code for generating protocol version
K. Y. Srinivasan [Thu, 12 Jan 2012 20:38:04 +0000 (12:38 -0800)]
Staging: hv: storvsc: Cleanup the code for generating protocol version

Cleanup the code for generating protocol version.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: hv: storvsc: Miscellaneous cleanup of storvsc driver
K. Y. Srinivasan [Thu, 12 Jan 2012 20:38:03 +0000 (12:38 -0800)]
Staging: hv: storvsc: Miscellaneous cleanup of storvsc driver

Miscellaneous cleanup of storvsc driver - get rid of unnecessary defines and
use fixed size types for structures used for communication with the host.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: hv: storvsc: Rename the context field in hv_storvsc_request
K. Y. Srinivasan [Thu, 12 Jan 2012 20:38:02 +0000 (12:38 -0800)]
Staging: hv: storvsc: Rename the context field in hv_storvsc_request

Rename the context field in hv_storvsc_request. As part of this change
fix the type of this field.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: hv: storvsc: Get rid of the on_io_completion in hv_storvsc_request
K. Y. Srinivasan [Thu, 12 Jan 2012 20:38:01 +0000 (12:38 -0800)]
Staging: hv: storvsc: Get rid of the on_io_completion in hv_storvsc_request

Get rid of the on_io_completion field  in struct hv_storvsc_request. As part of this
relocate the bounce buffer handling code (to avoid having forward declarations).

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: hv: storvsc: Add a comment to explain life-cycle management
K. Y. Srinivasan [Thu, 12 Jan 2012 20:38:00 +0000 (12:38 -0800)]
Staging: hv: storvsc: Add a comment to explain life-cycle management

Add a comment to explain life-cycle management and fix format issue.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: hv: storvsc: Move and cleanup storvsc_remove()
K. Y. Srinivasan [Thu, 12 Jan 2012 20:37:59 +0000 (12:37 -0800)]
Staging: hv: storvsc: Move and cleanup storvsc_remove()

Relocate the storvsc_remove() function to a different location in the file
and invoke scsi_host_put() only after all the cleanup.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: hv: storvsc: Cleanup storvsc_host_reset_handler()
K. Y. Srinivasan [Thu, 12 Jan 2012 20:37:58 +0000 (12:37 -0800)]
Staging: hv: storvsc: Cleanup storvsc_host_reset_handler()

Cleanup storvsc_host_reset_handler() by getting rid of storvsc_host_reset().

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: hv: storvsc: Introduce defines for srb status codes
K. Y. Srinivasan [Thu, 12 Jan 2012 20:37:57 +0000 (12:37 -0800)]
Staging: hv: storvsc: Introduce defines for srb status codes

Introduce defines for srb status codes.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: hv: storvsc: Cleanup storvsc_queuecommand()
K. Y. Srinivasan [Thu, 12 Jan 2012 20:37:56 +0000 (12:37 -0800)]
Staging: hv: storvsc: Cleanup storvsc_queuecommand()

Cleanup storvsc_queuecommand(). As part of this cleanup, rename the function to
check if the scsi command can be sent to the host, consolidate error recovery
and get rid of some dead code.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: hv: storvsc: Cleanup storvsc_probe()
K. Y. Srinivasan [Thu, 12 Jan 2012 20:37:55 +0000 (12:37 -0800)]
Staging: hv: storvsc: Cleanup storvsc_probe()

Cleanup storvsc_probe(). As part of this cleanup, get rid of
storvsc_get_ide_info() by inlining the necessary code.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: hv: storvsc: Cleanup some comments
K. Y. Srinivasan [Thu, 12 Jan 2012 20:37:54 +0000 (12:37 -0800)]
Staging: hv: storvsc: Cleanup some comments

Use consistent format for comments and get rid of some unnecessary
comments.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: ramster: enable as staging driver
Dan Magenheimer [Mon, 30 Jan 2012 22:39:19 +0000 (14:39 -0800)]
staging: ramster: enable as staging driver

Enable build of ramster as a staging driver

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: ramster: ramster-specific new files
Dan Magenheimer [Mon, 30 Jan 2012 22:39:19 +0000 (14:39 -0800)]
staging: ramster: ramster-specific new files

New files for ramster support:  The file ramster.h declares externs
and some pampd bitfield manipulation.  The file zcache.h declares
some zcache functions that now must be accessed from the ramster
glue code.  The file ramster_o2net.c is the glue between
zcache and the o2net messaging code, providing routines called
from zcache that initiate messages, and routines that handle
messages by calling zcache. TODO explains future plans for merging.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: ramster: ramster-specific changes to zcache/tmem
Dan Magenheimer [Mon, 30 Jan 2012 22:39:19 +0000 (14:39 -0800)]
staging: ramster: ramster-specific changes to zcache/tmem

In tmem.[ch], new "repatriate" (provoke async get) and "localify" (handle
incoming data resulting from an async get) routines combine with a handful
of changes to existing pamops interfaces allow the generic tmem code
to support asynchronous operations.  Also, a new tmem_xhandle struct
groups together key information that must be passed to remote tmem stores.

Zcache-main.c is augmented with a large amount of ramster-specific code
to handle remote operations and "foreign" pages on both ends of the
"remotify" protocol.  New "foreign" pools are auto-created on demand.
A "selfshrinker" thread periodically repatriates remote persistent pages
when local memory conditions allow.  For certain operations, a queue is
necessary to guarantee strict ordering as out-of-order puts/flushes can
cause strange race conditions.  Pampd pointers now either point to local
memory OR describe a remote page; to allow the same 64-bits to describe
either, the LSB is used to differentiate.  Some acrobatics must be performed
to ensure local memory is available to handle a remote persistent get,
or deal with the data directly anyway if the malloc failed.  Lots
of ramster-specific statistics are available via sysfs.

Note: Some debug ifdefs left in for now.
Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: ramster: ramster-specific changes to cluster code
Dan Magenheimer [Mon, 30 Jan 2012 22:39:18 +0000 (14:39 -0800)]
staging: ramster: ramster-specific changes to cluster code

Ramster-specific changes to ocfs2 cluster foundation, including:
A method for fooling the o2 heartbeat into starting without
an ocfs2 filesystem; a new message mechanism ("data magic") for handling
a reply to a message requesting data; a hack for keeping the cluster
alive even after timeouts so cluster machines can be rebooted separately.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: ramster: local compression + tmem
Dan Magenheimer [Mon, 30 Jan 2012 22:39:18 +0000 (14:39 -0800)]
staging: ramster: local compression + tmem

Copy files from drivers/staging/zcache.  Ramster compresses pages
locally before transmitting them to another node, so we can
leverage the zcache and tmem code directly.  Note: there are
no ramster-specific changes yet to these files.

(Why copy?  The ramster tmem.c/tmem.h changes are definitely shareable
between zcache and ramster; the eventual destination for tmem.c
is the linux lib directory.  Ramster changes to zcache are more substantial
and zcache is currently undergoing some significant unrelated changes
(including a new allocator and breaking zcache-main.c into smaller files),
so it seemed best to branch temporarily and merge later.)

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: ramster: cluster/messaging foundation
Dan Magenheimer [Mon, 30 Jan 2012 22:39:18 +0000 (14:39 -0800)]
staging: ramster: cluster/messaging foundation

Copy cluster subdirectory from ocfs2.  These files implement
the basic cluster discovery, mapping, heartbeat / keepalive, and
messaging ("o2net") that ramster requires for internode communication.
Note: there are NO ramster-specific changes yet; this commit
does NOT pass checkpatch since the copied source files do not.

(Why copy?  This particular part of ocfs2 has never been broken out
for non-ocfs2 use before, some (small) changes are required for ramster
to use that code, and ramster is currently incompatible with real
ocfs2 anyway (requires !CONFIG_OCFS2_FS).  Before ramster can be promoted
out of staging, we will need to work with the ocfs2 maintainers to
see if the code interdependencies can be merged, but for now, for
staging, this seemed to be an expedient way to make use of the ocfs2
core cluster code while still incorporating necessary changes for ramster.)

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: Fix typo in mei/interrupt.c
Masanari Iida [Wed, 25 Jan 2012 14:14:56 +0000 (23:14 +0900)]
staging: Fix typo in mei/interrupt.c

Correct spelling "reseting" to "resetting" in
drivers/staging/mei/interrupt.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agotelephony: Move to staging
Joe Perches [Mon, 30 Jan 2012 22:54:48 +0000 (14:54 -0800)]
telephony: Move to staging

This stuff is really old and in quite poor shape.
Does anyone still use it?

If not, I think it's appropriate to let it simmer
in staging for a few releases.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android/lowmemorykiller: Do not kill kernel threads
Anton Vorontsov [Mon, 6 Feb 2012 16:30:01 +0000 (20:30 +0400)]
staging: android/lowmemorykiller: Do not kill kernel threads

LMK should not try killing kernel threads.

Suggested-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android/lowmemorykiller: No need for task->signal check
Anton Vorontsov [Mon, 6 Feb 2012 16:29:54 +0000 (20:29 +0400)]
staging: android/lowmemorykiller: No need for task->signal check

task->signal == NULL is not possible, so no need for these checks.

Suggested-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android/lowmemorykiller: Better mm handling
Anton Vorontsov [Mon, 6 Feb 2012 16:29:47 +0000 (20:29 +0400)]
staging: android/lowmemorykiller: Better mm handling

LMK should not directly check for task->mm. The reason is that the
process' threads may exit or detach its mm via use_mm(), but other
threads may still have a valid mm. To catch this we use
find_lock_task_mm(), which walks up all threads and returns an
appropriate task (with lock held).

Suggested-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android/lowmemorykiller: Don't grab tasklist_lock
Anton Vorontsov [Mon, 6 Feb 2012 16:29:41 +0000 (20:29 +0400)]
staging: android/lowmemorykiller: Don't grab tasklist_lock

Grabbing tasklist_lock has its disadvantages, i.e. it blocks
process creation and destruction. If there are lots of processes,
blocking doesn't sound as a great idea.

For LMK, it is sufficient to surround tasks list traverse with
rcu_read_{,un}lock().

>From now on using force_sig() is not safe, as it can race with an
already exiting task, so we use send_sig() now. As a downside, it
won't kill PID namespace init processes, but that's not what we
want anyway.

Suggested-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android: logger: clarify non-update of w_off in do_write_log_from_user
Tim Bird [Wed, 8 Feb 2012 02:34:28 +0000 (18:34 -0800)]
staging: android: logger: clarify non-update of w_off in do_write_log_from_user

Add comment to explain when w_off is not updated in case of failed second
fragment copy to buffer.

Signed-off-by: Tim Bird <tim.bird@am.sony.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android: logger: clarify code in clock_interval
Tim Bird [Wed, 8 Feb 2012 02:32:02 +0000 (18:32 -0800)]
staging: android: logger: clarify code in clock_interval

Add commentary, rename the function and make the code easier to read.

Signed-off-by: Tim Bird <tim.bird@am.sony.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android: logger: reorder prepare_to_wait and mutex_lock
Tim Bird [Wed, 8 Feb 2012 02:30:09 +0000 (18:30 -0800)]
staging: android: logger: reorder prepare_to_wait and mutex_lock

If mutex_lock waits, it will return in state TASK_RUNNING,
rubbing out the effect of prepare_to_wait().

Signed-off-by: Tim Bird <tim.bird@am.sony.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android: logger: simplify and optimize get_entry_len
Tim Bird [Wed, 8 Feb 2012 18:37:57 +0000 (10:37 -0800)]
staging: android: logger: simplify and optimize get_entry_len

Make this code slightly easier to read, and eliminate calls
to sub-routines.  Some of these were previously optimized away
by the compiler, but one memcpy was not.

In my testing, this makes the code about 20% smaller, and
has no sub-routine calls and no branches (on ARM).

v2 of this patch is, IMHO, easier to read than v1. Compared to
that patch it uses __u8 instead of unsigned char, for
consistency with the __u16 val data type, simplifies the
conditional expression, adds a another comment, and
moves a common statement out of the if.

Signed-off-by: Tim Bird <tim.bird@am.sony.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android: logger: Change logger_offset() from macro to function
Tim Bird [Wed, 8 Feb 2012 02:26:38 +0000 (18:26 -0800)]
staging: android: logger: Change logger_offset() from macro to function

Convert to function and add log as a parameter, rather than relying
on log in the context of the macro.

Signed-off-by: Tim Bird <tim.bird@am.sony.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agodrivers/staging/android/timed_gpio.c: Stlye fixes
Tracey Dent [Mon, 23 Jan 2012 02:28:46 +0000 (21:28 -0500)]
drivers/staging/android/timed_gpio.c: Stlye fixes

Just made it more neat and not bother scripts/checkpatch.pl

Signed-off-by: Tracey Dent <tdent48227@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agodrivers/staging/android/ashmem.c: Cleanups
Tracey Dent [Mon, 23 Jan 2012 02:28:44 +0000 (21:28 -0500)]
drivers/staging/android/ashmem.c: Cleanups

Minor cleanups that consist of removal of a whitespace and
make file_operations const.

Signed-off-by: Tracey Dent <tdent48227@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: android: ram_console: Use resource_size function
Thomas Meyer [Sun, 22 Jan 2012 17:34:58 +0000 (18:34 +0100)]
Staging: android: ram_console: Use resource_size function

The semantic patch that makes this change is available
in scripts/coccinelle/api/resource_size.cocci.

More information about semantic patching is available at
http://coccinelle.lip6.fr/

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agodrivers:staging:android Typos: fix some comments that have typos in them.
Justin P. Mattock [Thu, 12 Jan 2012 14:51:31 +0000 (06:51 -0800)]
drivers:staging:android Typos: fix some comments that have typos in them.

Below is a patch that fixes some typos in some comments.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android: ram_console use kmemdup instead of kmalloc
Greg Dietsche [Sun, 15 Jan 2012 20:44:34 +0000 (14:44 -0600)]
staging: android: ram_console use kmemdup instead of kmalloc

Replace kmalloc + memcpy will kmemdup in ram_console_late_init

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: nvec: Fix Kconfig dependencies
Julian Andres Klode [Mon, 26 Dec 2011 16:57:40 +0000 (17:57 +0100)]
staging: nvec: Fix Kconfig dependencies

nvec modules do not require other stuff to be build in,
nor does nvec_ps2 require mouse support, only generic
serio support.

Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: nvec: Use gpio_request_one() instead of gpio_request()
Julian Andres Klode [Mon, 26 Dec 2011 16:57:39 +0000 (17:57 +0100)]
staging: nvec: Use gpio_request_one() instead of gpio_request()

This saves us some calls and thus makes the code shorter
and nicer.

Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: nvec: Fix typo s/I2C_SL_NEWL/I2C_SL_NEWSL/
Julian Andres Klode [Mon, 26 Dec 2011 16:57:38 +0000 (17:57 +0100)]
staging: nvec: Fix typo s/I2C_SL_NEWL/I2C_SL_NEWSL/

The constant I2C_SL_NEWL meant "new slave", but the
S was missing.

Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: nvec: ps2: change serio type to passthrough
Marc Dietrich [Mon, 26 Dec 2011 16:57:37 +0000 (17:57 +0100)]
staging: nvec: ps2: change serio type to passthrough

This changes the serio type of the nvec_ps2 mouse port to passthrough.
The old 8042 type seems appropiete for keyboards only.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: nvec: ps2: disable/enable mouse on suspend/resume
Marc Dietrich [Mon, 26 Dec 2011 16:57:36 +0000 (17:57 +0100)]
staging: nvec: ps2: disable/enable mouse on suspend/resume

This change makes the touchpad buttons work after suspend/resume.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: nvec: ps2: add some more debug functions
Marc Dietrich [Mon, 26 Dec 2011 16:57:35 +0000 (17:57 +0100)]
staging: nvec: ps2: add some more debug functions

This can print the mouse traffic which goes over the i2c bus. Make
mouse debugging messages configurable and disable them by default.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: nvec: ps2: tell nvec to send 6 byte long messages
Marc Dietrich [Mon, 26 Dec 2011 16:57:34 +0000 (17:57 +0100)]
staging: nvec: ps2: tell nvec to send 6 byte long messages

This packet size used on most modern touchpads. Ideally, this should
be configurable or autodetected.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: nvec: ps2: let the start/stop streaming commands be called by the start...
Marc Dietrich [Mon, 26 Dec 2011 16:57:33 +0000 (17:57 +0100)]
staging: nvec: ps2: let the start/stop streaming commands be called by the start/stop functions of serio

Instead of executing these commands during open/close, the start/stop
event of the serio device seem to be more appropiete.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: nvec: ps2: add suspend/resume functions
Marc Dietrich [Mon, 26 Dec 2011 16:57:32 +0000 (17:57 +0100)]
staging: nvec: ps2: add suspend/resume functions

This adds suspend and resume functions to the nvec_ps2 mouse driver.

During suspend the nvec sends a "Cancel all mouse events" command. If
this is missed, there will be still some bytes in the received buffer
after resume which make the mouse go out of sync.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Julian Andres Klode <jak@jak-linux.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: sep: Fix warnings caused by sizeof() types
Alan Cox [Tue, 31 Jan 2012 16:56:48 +0000 (16:56 +0000)]
staging: sep: Fix warnings caused by sizeof() types

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: sep: SEP update
Mark Allyn [Wed, 28 Dec 2011 17:37:59 +0000 (17:37 +0000)]
staging: sep: SEP update

This is basically a rewrite so there isn't a nice easy to present way of
providing this as a patch series. This patch is a pull of Mark's new driver into
the upstream staging area. On top of that are a series of patches by
Andy Shevchenko to make it build on the current tree, fix a few things and
even get it passed sparse.

The new driver supports the kernel crypto layer, passes the coding style checks,
passes human taste checks and has proper kernel-doc formatted comments.

I've then folded back in some later fixes it was missing that got applied to
to the kernel tree.

This should be ready for more serious review with a view to migration from
the staging tree shortly.

Signed-off-by: Mark Allyn <mark.a.allyn@intel.com>
[Forward port and some bug fixing]
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
[Fold and tweaks for 3.2]
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoLinux 3.3-rc1
Linus Torvalds [Thu, 19 Jan 2012 23:04:48 +0000 (15:04 -0800)]
Linux 3.3-rc1

12 years agoMerge branches 'sched-urgent-for-linus', 'perf-urgent-for-linus' and 'x86-urgent...
Linus Torvalds [Thu, 19 Jan 2012 22:53:06 +0000 (14:53 -0800)]
Merge branches 'sched-urgent-for-linus', 'perf-urgent-for-linus' and 'x86-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  sched/accounting, proc: Fix /proc/stat interrupts sum

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  tracepoints/module: Fix disabling tracepoints with taint CRAP or OOT
  x86/kprobes: Add arch/x86/tools/insn_sanity to .gitignore
  x86/kprobes: Fix typo transferred from Intel manual

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86, syscall: Need __ARCH_WANT_SYS_IPC for 32 bits
  x86, tsc: Fix SMI induced variation in quick_pit_calibrate()
  x86, opcode: ANDN and Group 17 in x86-opcode-map.txt
  x86/kconfig: Move the ZONE_DMA entry under a menu
  x86/UV2: Add accounting for BAU strong nacks
  x86/UV2: Ack BAU interrupt earlier
  x86/UV2: Remove stale no-resources test for UV2 BAU
  x86/UV2: Work around BAU bug
  x86/UV2: Fix BAU destination timeout initialization
  x86/UV2: Fix new UV2 hardware by using native UV2 broadcast mode
  x86: Get rid of dubious one-bit signed bitfield

12 years agoMerge tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux-2.6
Linus Torvalds [Thu, 19 Jan 2012 22:52:03 +0000 (14:52 -0800)]
Merge tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux-2.6

gpio bug fixes for v3.3

* tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux-2.6:
  gpio: tps65910: Use correct offset for gpio initialization
  gpio/it8761e: Restrict it8761e gpio driver to x86.
  gpio-ml-ioh: cleanup __iomem annotation usage
  gpio-ml-ioh: cleanup NULL pointer checking
  gpio-pch: cleanup __iomem annotation usage
  gpio-pch: cleanup NULL pointer checking

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Linus Torvalds [Thu, 19 Jan 2012 22:49:16 +0000 (14:49 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/viro/vfs

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  qnx4: don't leak ->BitMap on late failure exits
  qnx4: reduce the insane nesting in qnx4_checkroot()
  qnx4: di_fname is an array, for crying out loud...
  vfs: remove printk from set_nlink()
  wake up s_wait_unfrozen when ->freeze_fs fails

12 years agox86, syscall: Need __ARCH_WANT_SYS_IPC for 32 bits
H. Peter Anvin [Thu, 19 Jan 2012 20:41:25 +0000 (12:41 -0800)]
x86, syscall: Need __ARCH_WANT_SYS_IPC for 32 bits

In checkin

  303395ac3bf3 x86: Generate system call tables and unistd_*.h from tables

the feature macros in <asm/unistd.h> were unified between 32 and 64
bits.  Unfortunately 32 bits requires __ARCH_WANT_SYS_IPC and this was
inadvertently dropped.

Reported-by: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Link: http://lkml.kernel.org/r/CALLzPKbeXN5gdngo8uYYU8mAow=XhrwBFBhKfG811f37BubQOg@mail.gmail.com
12 years agoMerge remote-tracking branch 'linus/master' into x86/urgent
H. Peter Anvin [Thu, 19 Jan 2012 20:56:50 +0000 (12:56 -0800)]
Merge remote-tracking branch 'linus/master' into x86/urgent

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Thu, 19 Jan 2012 19:46:08 +0000 (11:46 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jmorris/linux-security

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
  KEYS: Permit key_serial() to be called with a const key pointer
  keys: fix user_defined key sparse messages
  ima: fix cred sparse warning
  MPILIB: Add a missing ENOMEM check

12 years agoqnx4: don't leak ->BitMap on late failure exits
Al Viro [Thu, 19 Jan 2012 18:54:36 +0000 (13:54 -0500)]
qnx4: don't leak ->BitMap on late failure exits

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoqnx4: reduce the insane nesting in qnx4_checkroot()
Al Viro [Thu, 19 Jan 2012 18:40:57 +0000 (13:40 -0500)]
qnx4: reduce the insane nesting in qnx4_checkroot()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoqnx4: di_fname is an array, for crying out loud...
Al Viro [Thu, 19 Jan 2012 18:19:42 +0000 (13:19 -0500)]
qnx4: di_fname is an array, for crying out loud...

(struct qnx4_inode_entry *)(bh->b_data + some_offset)->di_fname
is not going to be NULL, TYVM...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoKEYS: Permit key_serial() to be called with a const key pointer
David Howells [Wed, 18 Jan 2012 10:04:29 +0000 (10:04 +0000)]
KEYS: Permit key_serial() to be called with a const key pointer

Permit key_serial() to be called with a const key pointer.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
12 years agokeys: fix user_defined key sparse messages
Mimi Zohar [Wed, 18 Jan 2012 10:03:14 +0000 (10:03 +0000)]
keys: fix user_defined key sparse messages

Replace the rcu_assign_pointer() calls with rcu_assign_keypointer().

Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
12 years agoima: fix cred sparse warning
Mimi Zohar [Wed, 18 Jan 2012 03:11:28 +0000 (22:11 -0500)]
ima: fix cred sparse warning

Fix ima_policy.c sparse "warning: dereference of noderef expression"
message, by accessing cred->uid using current_cred().

Changelog v1:
- Change __cred to just cred (based on David Howell's comment)

Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
12 years agouml: fix compile for x86-64
Linus Torvalds [Thu, 19 Jan 2012 03:26:11 +0000 (19:26 -0800)]
uml: fix compile for x86-64

Randy Dunlap reports that we get

  arch/x86/um/shared/sysdep/ptrace.h:7:20: error: redefinition of 'regs_return_value'
  arch/x86/um/shared/sysdep/ptrace.h:7:20: note: previous definition of 'regs_return_value' was here

when compiling UML for x86-64.

Stephen Rothwell root-caused it and says:

 "Caused by commit d7e7528bcd45 ("Audit: push audit success and retcode
  into arch ptrace.h") (another patch that was never in linux-next :-().

  This file now needs protection against double inclusion."

so let's do as the man says.

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Analyzed-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMPILIB: Add a missing ENOMEM check
David Howells [Wed, 18 Jan 2012 10:03:54 +0000 (10:03 +0000)]
MPILIB: Add a missing ENOMEM check

Add a missing ENOMEM check.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Mimi Zohar <zohar@us.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
12 years agoMerge branch 'for-next-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/nab...
Linus Torvalds [Thu, 19 Jan 2012 00:29:42 +0000 (16:29 -0800)]
Merge branch 'for-next-merge' of git://git./linux/kernel/git/nab/target-pending

* 'for-next-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
  ib_srpt: Initial SRP Target merge for v3.3-rc1

12 years agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target...
Linus Torvalds [Wed, 18 Jan 2012 23:59:18 +0000 (15:59 -0800)]
Merge branch 'for-next' of git://git./linux/kernel/git/nab/target-pending

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (26 commits)
  target: Set additional sense length field in sense data
  target: Remove legacy device status check from transport_execute_tasks
  target: Remove __transport_execute_tasks() for each processing context
  target: Remove extra se_device->execute_task_lock access in fast path
  target: Drop se_device TCQ queue_depth usage from I/O path
  target: Fix possible NULL pointer with __transport_execute_tasks
  target: Remove TFO->check_release_cmd() fabric API caller
  tcm_fc: Convert ft_send_work to use target_submit_cmd
  target: Add target_submit_cmd() for process context fabric submission
  target: Make target_put_sess_cmd use target_release_cmd_kref
  target: Set response format in INQUIRY response
  target: tcm_mod_builder: small fixups
  Documentation/target: Fix tcm_mod_builder.py build breakage
  target: remove overagressive ____cacheline_aligned annoations
  tcm_loop: bump max_sectors
  target/configs: remove trailing newline from udev_path and alias
  iscsi-target: fix chap identifier simple_strtoul usage
  target: remove useless casts
  target: simplify target_check_cdb_and_preempt
  target: Move core_scsi3_check_cdb_abort_and_preempt
  ...

12 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux
Linus Torvalds [Wed, 18 Jan 2012 23:51:48 +0000 (15:51 -0800)]
Merge branch 'release' of git://git./linux/kernel/git/lenb/linux

This includes initial support for the recently published ACPI 5.0 spec.
In particular, support for the "hardware-reduced" bit that eliminates
the dependency on legacy hardware.

APEI has patches resulting from testing on real hardware.

Plus other random fixes.

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: (52 commits)
  acpi/apei/einj: Add extensions to EINJ from rev 5.0 of acpi spec
  intel_idle: Split up and provide per CPU initialization func
  ACPI processor: Remove unneeded variable passed by acpi_processor_hotadd_init V2
  ACPI processor: Remove unneeded cpuidle_unregister_driver call
  intel idle: Make idle driver more robust
  intel_idle: Fix a cast to pointer from integer of different size warning in intel_idle
  ACPI: kernel-parameters.txt : Add intel_idle.max_cstate
  intel_idle: remove redundant local_irq_disable() call
  ACPI processor: Fix error path, also remove sysdev link
  ACPI: processor: fix acpi_get_cpuid for UP processor
  intel_idle: fix API misuse
  ACPI APEI: Convert atomicio routines
  ACPI: Export interfaces for ioremapping/iounmapping ACPI registers
  ACPI: Fix possible alignment issues with GAS 'address' references
  ACPI, ia64: Use SRAT table rev to use 8bit or 16/32bit PXM fields (ia64)
  ACPI, x86: Use SRAT table rev to use 8bit or 32bit PXM fields (x86/x86-64)
  ACPI: Store SRAT table revision
  ACPI, APEI, Resolve false conflict between ACPI NVS and APEI
  ACPI, Record ACPI NVS regions
  ACPI, APEI, EINJ, Refine the fix of resource conflict
  ...

12 years agotpm: fix (ACPI S3) suspend regression
Stefan Berger [Wed, 18 Jan 2012 03:07:30 +0000 (22:07 -0500)]
tpm: fix (ACPI S3) suspend regression

This patch fixes an (ACPI S3) suspend regression introduced in commit
68d6e6713fcb ("tpm: Introduce function to poll for result of self test")
and occurring with an Infineon TPM and tpm_tis and tpm_infineon drivers
active.

The suspend problem occurred if the TPM was disabled and/or deactivated
and therefore the TPM_PCRRead checking the result of the (asynchronous)
self test returned an error code which then caused the tpm_tis driver to
become inactive and this then seemed to have negatively influenced the
suspend support by the tpm_infineon driver...  Besides that the tpm_tis
drive may stay active even if the TPM is disabled and/or deactivated.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Tested-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>