Robert Love [Wed, 23 May 2012 02:06:16 +0000 (19:06 -0700)]
[SCSI] bnx2fc: Allocate fcoe_ctlr with bnx2fc_interface, not as a member
Currently the fcoe_ctlr associated with an interface is allocated
as a member of struct bnx2fc_interface. This causes problems when
when later patches attempt to use the new fcoe_sysfs APIs which
allow us to allocate the bnx2fc_interface as private data to a
fcoe_ctlr_device instance. The problem is that libfcoe wants to
be able use pointer math to find a fcoe_ctlr's fcoe_ctlr_device
as well as finding a fcoe_ctlr_device's assocated fcoe_ctlr. To
do this we need to allocate the fcoe_ctlr_device, with private
data for the LLD. The private data will contain the fcoe_ctlr
and its private data will be the bnx2fc_interface.
+-------------------+
| fcoe_ctlr_device |
+-------------------+
| fcoe_ctlr |
+-------------------+
| bnx2fc_interface |
+-------------------+
This prep work will allow us to go from a fcoe_ctlr_device
instance to its fcoe_ctlr as well as from a fcoe_ctlr to its
fcoe_ctlr_device once the fcoe_sysfs API is in use (later
patches in this series).
Signed-off-by: Robert Love <robert.w.love@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Robert Love [Wed, 23 May 2012 02:06:10 +0000 (19:06 -0700)]
[SCSI] fcoe: Allocate fcoe_ctlr with fcoe_interface, not as a member
Currently the fcoe_ctlr associated with an interface is allocated
as a member of struct fcoe_interface. This causes problems when
attempting to use the new fcoe_sysfs APIs which allow us to allocate
the fcoe_interface as private data to the fcoe_ctlr_device instance.
The problem is that libfcoe wants to be able use pointer math to find a
fcoe_ctlr's fcoe_ctlr_device as well as finding a fcoe_ctlr_device's
assocated fcoe_ctlr. To do this we need to allocate the
fcoe_ctlr_device, with private data for the LLD. The private data
contains the fcoe_ctlr and its private data is the fcoe_interface.
This patch only allocates the fcoe_interface with the fcoe_ctlr, the
fcoe_ctlr_device will be added in a later patch, which will complete
the below diagram-
+------------------+
| fcoe_ctlr_device |
+------------------+
| fcoe_ctlr |
+------------------+
| fcoe_interface |
+------------------+
This prep work will allow us to go from a fcoe_ctlr_device instance
to its fcoe_ctlr as well as from a fcoe_ctlr to its fcoe_ctlr_device
once the fcoe_sysfs API is in use (later patches in this series).
Signed-off-by: Robert Love <robert.w.love@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Jun'ichi Nomura [Tue, 22 May 2012 09:57:17 +0000 (18:57 +0900)]
[SCSI] Fix dm-multipath starvation when scsi host is busy
block congestion control doesn't have any concept of fairness across
multiple queues. This means that if SCSI reports the host as busy in
the queue congestion control it can result in an unfair starvation
situation in dm-mp if there are multiple multipath devices on the same
host. For example:
http://www.redhat.com/archives/dm-devel/2012-May/msg00123.html
The fix for this is to report only the sdev busy state (and ignore the
host busy state) in the block congestion control call back.
The host is still congested, but the SCSI subsystem will sort out the
congestion in a fair way because it knows the relation between the
queues and the host.
[jejb: fixed up trailing whitespace]
Reported-by: Bernd Schubert <bernd.schubert@itwm.fraunhofer.de>
Tested-by: Bernd Schubert <bernd.schubert@itwm.fraunhofer.de>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Namjae Jeon [Sun, 20 May 2012 07:08:01 +0000 (03:08 -0400)]
[SCSI] ufs: fix potential NULL pointer dereferencing error in ufshcd_prove.
Avoid dereferencing a NULL pointer if scsi_host_alloc is failed.
Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Dan Carpenter [Thu, 17 May 2012 07:13:40 +0000 (10:13 +0300)]
[SCSI] qla2xxx: don't free pool that wasn't allocated
In the original code, if dma_pool_alloc() fails then we call
dma_pool_free(). It causes an error, possibly a NULL dereference.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Dan Carpenter [Sat, 27 Aug 2011 09:59:30 +0000 (12:59 +0300)]
[SCSI] mptfusion: unlock on error in mpt_config()
We introduced a new return here and forgot to unlock the mutex.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: "Nandigama, Nagalakshmi" <Nagalakshmi.Nandigama@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Nicholas Bellinger [Tue, 15 May 2012 18:34:29 +0000 (14:34 -0400)]
[SCSI] tcm_qla2xxx: Add >= 24xx series fabric module for target-core
This patch adds support for tcm_qla2xxx fabric module for target-core
using the new qla_target.c LLD logic. This includes support for explict
NodeACLs via configfs using tcm_qla2xxx_setup_nacl_from_rport() from libfc
struct fc_host->rports, and demo-mode support for virtual LUN=0 access.
This patch also adds support for using tcm_qla2xxx_lport->lport_fcport_map
and ->lport_loopid_map of btree_head32 to track struct se_node_acl pointers
for individual 24-bit Port ID and 16-bit Loop ID values w/ qla_target_template
->find_sess_by_s_id() and ->find_sess_by_loop_id() used in a number of
locations into the primary I/O dispatch logic in qla_target.c LLD code.
The main piece for FC Nexus setup is in tcm_qla2xxx_check_initiator_node_acl(),
which calls tcm_qla2xxx_set_sess_by_[s_id,loop_id]() to setup our
lport->lport_fcport_map and lport_loopid_map pointers respectively, and
register the new nexus with TCM via __transport_register_session().
(nab: Add qla_tgt_mgmt_cmd usage with TARGET_SCF_ACK_KREF during TMRs +
change tcm_qla2xxx_nacl->nport_id to u32 (DanC))
(danc: tcm_qla2xxx: checking for NULL instead of IS_ERR())
(roland: Fix up v3.5 breakage for removal of transport_do_task_sg_chain +
Add hook so qla_target code can shutdown sessions)
(steveh: Convert FC address map from flat array to btree)
(randy: fix qla2xxx printk format warnings for size_t)
(joern: Make most of tcm_qla2xxx static + remove unnecessary
workqueue_struct prototypes + use WWN_SIZE instead of hard-coded
constants)
Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Nicholas Bellinger [Tue, 15 May 2012 18:34:28 +0000 (14:34 -0400)]
[SCSI] qla2xxx: Add LLD target-mode infrastructure for >= 24xx series
Add LLD target mode for >= 24xx series HW. This code was originally based on
external qla2x00t module based on 8.02.01-k4, and has been refactored to
push the bulk of code into mainline qla2xxx.ko LLD -> qla_target.c.
The implementation uses internal workqueues for I/O context submission
into tcm_qla2xxx code, and includes the struct qla_tgt_func_tmpl API for
external interaction to allow qla2xxx LDD to function without direct
target-core dependencies:
It also enables qla_target.c usage within existing qla2xxx LLD code.
This includes:
*) Addition of target mode specific members to existing data
structures in qla_def.h and struct qla_hw_data->tgt_ops using
qla_target.h:struct qla_tgt_func_tmpl
*) Addition of struct qla_tgt_func_tmpl and direct calls into
qla_target.c logic w/ qlt_* prefixed functions.
*) Addition of qla_iocb.c:qla2x00_req_pkt() for ring processing, and
qla2x00_issue_marker() for handling request/response queue processing
for target mode operation
*) Addition of various qla_tgt_mode_enabled() logic checks in
qla24xx_nvram_config(), qla2x00_initialize_adapter(), qla2x00_rff_id(),
qla2x00_abort_isp(), qla24xx_modify_vp_config(), and
qla2x00_vp_abort_isp().
By default the new qlini_mode module parameter is setting initiator-mode
to 'enabled' in order for 'modprobe qla2xxx' to continue to function as
expected in initiator only mode. Enabling target-mode operation will
currently require a:
modprobe qla2xxx qlini_mode="disabled"
in order to explictly disabled initiator mode and allow target-mode
to be enabled via tcm_qla2xxx configfs fabric callers.
(nab: Convert to qlini_mode='enabled' by default in qla_target.c)
(joern: Remove loop_id from qla_tgt_make_local_sess() arguments +
Remove unused s_id + fix s_id endianness bug +
simplify qla_tgt_abort_work)
(gerard: fix section __exit mismatch in qla_tgt_exit)
(arun: Capture ATIO queue during firmware dump + Send SCR in target mode +
Target mode review comments)
(roland: Don't create duplicate target sessions to address tearing down
ACLs with IO in flight + Add missing call to qlt_fc_port_deleted
call during qla2x00_schedule_rport_del timeout)
Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Chad Dupuis [Tue, 15 May 2012 18:34:27 +0000 (14:34 -0400)]
[SCSI] Revert "qla2xxx: During loopdown perform Diagnostic loopback."
commit
491118dff9aeb207408bd42aa4897bc2c145747f
Author: Saurav Kashyap <saurav.kashyap@qlogic.com>
Date: Tue Aug 16 11:31:50 2011 -0700
[SCSI] qla2xxx: During loopdown perform Diagnostic loopback.
The LOOP_DOWN test is not needed.
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Giridhar Malavali [Tue, 15 May 2012 18:34:26 +0000 (14:34 -0400)]
[SCSI] qla2xxx: Display proper firmware version when new minidump template is gathered for ISP82xx.
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Giridhar Malavali [Tue, 15 May 2012 18:34:25 +0000 (14:34 -0400)]
[SCSI] qla2xxx: Don't capture minidump for ISP82xx on flash update from application.
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Joe Carnuccio [Tue, 15 May 2012 18:34:24 +0000 (14:34 -0400)]
[SCSI] qla2xxx: Avoid losing any fc ports when loop id's are exhausted.
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Chad Dupuis [Tue, 15 May 2012 18:34:23 +0000 (14:34 -0400)]
[SCSI] qla2xxx: Log link up and link down messages to track link flops.
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Saurav Kashyap [Tue, 15 May 2012 18:34:22 +0000 (14:34 -0400)]
[SCSI] qla2xxx: Corrections to log messages.
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Joe Carnuccio [Tue, 15 May 2012 18:34:21 +0000 (14:34 -0400)]
[SCSI] qla2xxx: Optimize existing port name server query matching.
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Joe Carnuccio [Tue, 15 May 2012 18:34:20 +0000 (14:34 -0400)]
[SCSI] qla2xxx: Remove mirrored field vp_idx from struct fc_port.
The field vp_idx in struct fc_port is a redundant/mirror copy of
the same field in struct scsi_qla_host;
struct fc_port has a pointer vha to scsi_qla_host which allows
the original copy of vp_idx to be readily accessed.
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Nigel Kirkland [Tue, 15 May 2012 18:34:19 +0000 (14:34 -0400)]
[SCSI] qla2xxx: Fixups for ISP83xx.
Signed-off-by: Nigel Kirkland <nigel.kirkland@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Giridhar Malavali [Tue, 15 May 2012 18:34:18 +0000 (14:34 -0400)]
[SCSI] qla2xxx: Display proper supported speeds for 16G FC adapters.
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Andrew Vasquez [Tue, 15 May 2012 18:34:17 +0000 (14:34 -0400)]
[SCSI] qla2xxx: Fix typo in bus-reset handler.
Both the target-id and LUN are munged in the original printk().
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Saurav Kashyap [Tue, 15 May 2012 18:34:16 +0000 (14:34 -0400)]
[SCSI] qla2xxx: Stats should be different from physical and virtual ports
Currently stats is part of ha data structure, common for physical and virtual
ports. Moved the stats to vha, each port will have its own stat.
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Saurav Kashyap [Tue, 15 May 2012 18:34:15 +0000 (14:34 -0400)]
[SCSI] qla2xxx: Add ql_dbg_verbose logging level.
Add an extra layer of logging granularity for messages that are necessary in
some circumstances but may flood the kernel log buffer with too many messages
otherwise.
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Chad Dupuis [Tue, 15 May 2012 18:34:14 +0000 (14:34 -0400)]
[SCSI] qla2xxx: Handle interrupt registration failures more gracefully.
If interrupt registration failed we could crash the machine as we were trying
to deference some pointers which weren't allocated yet. Move the allocation
a little earlier and make some checks to the free resource code to make sure
that we don't try to free a resource that was never allocated.
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Chad Dupuis [Tue, 15 May 2012 18:34:13 +0000 (14:34 -0400)]
[SCSI] qla2xxx: Change "Done" to "Entering" in the debug print statement in qla2x00_port_logout.
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Giridhar Malavali [Tue, 15 May 2012 18:34:12 +0000 (14:34 -0400)]
[SCSI] qla2xxx: Detect PEG errors.
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Chad Dupuis [Tue, 15 May 2012 18:34:11 +0000 (14:34 -0400)]
[SCSI] qla2xxx: Remove unneeded DPC wakeups from qla82xx_watchdog.
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Masanari Iida [Tue, 15 May 2012 18:34:10 +0000 (14:34 -0400)]
[SCSI] qla2xxx: Fix typo in qla_mbx.c
Correct spelling "occured" to "occurred" in
drivers/scsi/qla2xxx/qla_mbx.c
Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Chetan Loke [Tue, 15 May 2012 18:34:09 +0000 (14:34 -0400)]
[SCSI] qla2xxx: Micro optimization in queuecommand handler
Optimized queuecommand handler's to eliminate double head-room checks.
The checks are moved inside the 1st if-loop otherwise you would end up checking twice when there is
enough head room.
Signed-off-by: Chetan Loke <loke.chetan@gmail.com>
Reviewed-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Reviewed-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Raul Porcel [Tue, 15 May 2012 18:34:08 +0000 (14:34 -0400)]
[SCSI] qla2xxx: Fix typo in qla_init.c
Replace "Inconisistent" with "Inconsistent" in drivers/scsi/qla2xxx/qla_init.c
Signed-off-by: Raul Porcel <armin76@gentoo.org>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Aaron Lu [Tue, 15 May 2012 06:43:00 +0000 (14:43 +0800)]
[SCSI] scsi_pm: resume device if suspend failed
For scsi devices which use scsi bus runtime callback, runtime suspend
will call scsi_dev_type_suspend, and if the drv->suspend failed, the
device will still be in active state. But since scsi_device_quiesce is
called, the device will not be able to respond any more commands.
So add a check here to see if err occured, if so, bring the device back
to normal state with scsi_device_resume.
Signed-off-by: Aaron Lu <aaron.lu@amd.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Krishna Gudipati [Sat, 12 May 2012 00:49:59 +0000 (17:49 -0700)]
[SCSI] bfa: Fix to set vport FC host sysfs entries
Made changes to set the fc_host sysfs entries supported_speeds,
supported_classes etc., during the vport creation from the
FC transport template.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Bhanu Prakash Gollapudi [Tue, 24 Apr 2012 22:26:04 +0000 (15:26 -0700)]
[SCSI] bnx2fc: Bumped version to 1.0.11
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Bhanu Prakash Gollapudi [Tue, 24 Apr 2012 22:26:03 +0000 (15:26 -0700)]
[SCSI] bnx2fc: cleanup task management IO when it times out.
When the task management IO times out, or a flush operation is performed while
task management IO is pending, driver is not cleaning up the IO. This patch
cleans up the IO for the above cases.
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Bhanu Prakash Gollapudi [Tue, 24 Apr 2012 22:26:02 +0000 (15:26 -0700)]
[SCSI] bnx2fc: Decrememnt io ref count when abort times out
When IO abort times out during eh_abort or a flush operation is performed while
abort is pending, the driver is not cleaning up the IO and thus not reducing
the IO reference count. With this change, as part of explicit logout, the IO is
cleaned up.
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Bhanu Prakash Gollapudi [Tue, 24 Apr 2012 22:26:01 +0000 (15:26 -0700)]
[SCSI] bnx2fc: Allow FLOGI to be retried when receiving bad responses.
Commit
907c07d45199f954ddcf66c2c9763c87d012cb15 added more cases to do FLOGI
retry on receiving bad response. Remove the code that drops the packet and
allow the stack to handle bad FLOGI response.
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Laurent Pinchart [Fri, 18 May 2012 08:58:26 +0000 (10:58 +0200)]
fbdev: sh_mobile_lcdc: Don't confuse line size with pitch
When using the MERAM the LCDC line size needs to be programmed with a
MERAM-specific value different than the real frame buffer pitch. Fix it.
Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: stable@vger.kernel.org # for 3.4
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Tue, 22 May 2012 03:33:19 +0000 (20:33 -0700)]
Merge branch 'irq-core-for-linus' of git://git./linux/kernel/git/tip/tip
Pull core irq changes from Ingo Molnar:
"A collection of small fixes."
By Thomas Gleixner
* 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
hexagon: Remove select of not longer existing Kconfig switches
arm: Select core options instead of redefining them
genirq: Do not consider disabled wakeup irqs
genirq: Allow check_wakeup_irqs to notice level-triggered interrupts
genirq: Be more informative on irq type mismatch
genirq: Reject bogus threaded irq requests
genirq: Streamline irq_action
Linus Torvalds [Tue, 22 May 2012 03:27:36 +0000 (20:27 -0700)]
Merge branch 'next' of git://git./linux/kernel/git/jmorris/linux-security
Pull security subsystem updates from James Morris:
"New notable features:
- The seccomp work from Will Drewry
- PR_{GET,SET}_NO_NEW_PRIVS from Andy Lutomirski
- Longer security labels for Smack from Casey Schaufler
- Additional ptrace restriction modes for Yama by Kees Cook"
Fix up trivial context conflicts in arch/x86/Kconfig and include/linux/filter.h
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (65 commits)
apparmor: fix long path failure due to disconnected path
apparmor: fix profile lookup for unconfined
ima: fix filename hint to reflect script interpreter name
KEYS: Don't check for NULL key pointer in key_validate()
Smack: allow for significantly longer Smack labels v4
gfp flags for security_inode_alloc()?
Smack: recursive tramsmute
Yama: replace capable() with ns_capable()
TOMOYO: Accept manager programs which do not start with / .
KEYS: Add invalidation support
KEYS: Do LRU discard in full keyrings
KEYS: Permit in-place link replacement in keyring list
KEYS: Perform RCU synchronisation on keys prior to key destruction
KEYS: Announce key type (un)registration
KEYS: Reorganise keys Makefile
KEYS: Move the key config into security/keys/Kconfig
KEYS: Use the compat keyctl() syscall wrapper on Sparc64 for Sparc32 compat
Yama: remove an unused variable
samples/seccomp: fix dependencies on arch macros
Yama: add additional ptrace scopes
...
Linus Torvalds [Tue, 22 May 2012 03:20:23 +0000 (20:20 -0700)]
Merge tag 'virtio-for-linus' of git://git./linux/kernel/git/rusty/linux-2.6-for-linus
Pull virtio updates from Rusty Russell.
* tag 'virtio-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
virtio: fix typo in comment
virtio-mmio: Devices parameter parsing
virtio_blk: Drop unused request tracking list
virtio-blk: Fix hot-unplug race in remove method
virtio: Use ida to allocate virtio index
virtio: balloon: separate out common code between remove and freeze functions
virtio: balloon: drop restore_common()
9p: disconnect channel when PCI device is removed
virtio: update documentation to v0.9.5 of spec
Chen Baozi [Sun, 20 May 2012 02:44:34 +0000 (10:44 +0800)]
virtio: fix typo in comment
- Delete "@request_vqs" and "@free_vqs" comments, since
they are no longer in struct virtio_config_ops.
- According to the macro below, "@val" should be "@v".
Signed-off-by: Chen Baozi <chenbaozi@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Pawel Moll [Wed, 9 May 2012 17:30:16 +0000 (18:30 +0100)]
virtio-mmio: Devices parameter parsing
This patch adds an option to instantiate guest virtio-mmio devices
basing on a kernel command line (or module) parameter, for example:
virtio_mmio.devices=0x100@0x100b0000:48
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Asias He [Fri, 30 Mar 2012 03:24:10 +0000 (11:24 +0800)]
virtio_blk: Drop unused request tracking list
Benchmark shows small performance improvement on fusion io device.
Before:
seq-read : io=1,024MB, bw=19,982KB/s, iops=39,964, runt= 52475msec
seq-write: io=1,024MB, bw=20,321KB/s, iops=40,641, runt= 51601msec
rnd-read : io=1,024MB, bw=15,404KB/s, iops=30,808, runt= 68070msec
rnd-write: io=1,024MB, bw=14,776KB/s, iops=29,552, runt= 70963msec
After:
seq-read : io=1,024MB, bw=20,343KB/s, iops=40,685, runt= 51546msec
seq-write: io=1,024MB, bw=20,803KB/s, iops=41,606, runt= 50404msec
rnd-read : io=1,024MB, bw=16,221KB/s, iops=32,442, runt= 64642msec
rnd-write: io=1,024MB, bw=15,199KB/s, iops=30,397, runt= 68991msec
Signed-off-by: Asias He <asias@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Asias He [Fri, 4 May 2012 12:22:04 +0000 (20:22 +0800)]
virtio-blk: Fix hot-unplug race in remove method
If we reset the virtio-blk device before the requests already dispatched
to the virtio-blk driver from the block layer are finised, we will stuck
in blk_cleanup_queue() and the remove will fail.
blk_cleanup_queue() calls blk_drain_queue() to drain all requests queued
before DEAD marking. However it will never success if the device is
already stopped. We'll have q->in_flight[] > 0, so the drain will not
finish.
How to reproduce the race:
1. hot-plug a virtio-blk device
2. keep reading/writing the device in guest
3. hot-unplug while the device is busy serving I/O
Test:
~1000 rounds of hot-plug/hot-unplug test passed with this patch.
Changes in v3:
- Drop blk_abort_queue and blk_abort_request
- Use __blk_end_request_all to complete request dispatched to driver
Changes in v2:
- Drop req_in_flight
- Use virtqueue_detach_unused_buf to get request dispatched to driver
Signed-off-by: Asias He <asias@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Asias He [Thu, 3 May 2012 02:20:51 +0000 (10:20 +0800)]
virtio: Use ida to allocate virtio index
Current index allocation in virtio is based on a monotonically
increasing variable "index". This means we'll run out of numbers
after a while. E.g. someone crazy doing this in host side.
while(1) {
hot-plug a virtio device
hot-unplug the virito devcie
}
Signed-off-by: Asias He <asias@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Amit Shah [Thu, 26 Apr 2012 19:15:57 +0000 (00:45 +0530)]
virtio: balloon: separate out common code between remove and freeze functions
The remove and freeze functions have a lot of shared code; put it into a
common function that gets called by both.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Amit Shah [Thu, 26 Apr 2012 19:15:55 +0000 (00:45 +0530)]
virtio: balloon: drop restore_common()
restore_common() was used when there were different thaw and freeze PM
callbacks implemented. We removed thaw in commit
f38f8387cbdc4138a492ce9f2a5f04fd3cd3cf33.
restore_common() can be removed and virtballoon_restore() can itself do
the restore ops.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Sasha Levin [Fri, 13 Apr 2012 21:48:36 +0000 (17:48 -0400)]
9p: disconnect channel when PCI device is removed
When a virtio_9p pci device is being removed, we should close down any
active channels and free up resources, we're not supposed to BUG() if there's
still an open channel since it's a valid case when removing the PCI device.
Otherwise, removing the PCI device with an open channel would cause the
following BUG():
[ 1184.671416] ------------[ cut here ]------------
[ 1184.672057] kernel BUG at net/9p/trans_virtio.c:618!
[ 1184.672057] invalid opcode: 0000 [#1] PREEMPT SMP
[ 1184.672057] CPU 3
[ 1184.672057] Pid: 5, comm: kworker/u:0 Tainted: G W 3.4.0-rc2-next-
20120413-sasha-dirty #76
[ 1184.672057] RIP: 0010:[<
ffffffff825c9116>] [<
ffffffff825c9116>] p9_virtio_remove+0x16/0x90
[ 1184.672057] RSP: 0018:
ffff88000d653ac0 EFLAGS:
00010202
[ 1184.672057] RAX:
ffffffff836bfb40 RBX:
ffff88000c9b2148 RCX:
ffff88000d658978
[ 1184.672057] RDX:
0000000000000006 RSI:
0000000000000000 RDI:
ffff880028868000
[ 1184.672057] RBP:
ffff88000d653ad0 R08:
0000000000000000 R09:
0000000000000000
[ 1184.672057] R10:
0000000000000000 R11:
0000000000000001 R12:
ffff880028868000
[ 1184.672057] R13:
ffffffff835aa7c0 R14:
ffff880041630000 R15:
ffff88000d653da0
[ 1184.672057] FS:
0000000000000000(0000) GS:
ffff880035a00000(0000) knlGS:
0000000000000000
[ 1184.672057] CS: 0010 DS: 0000 ES: 0000 CR0:
000000008005003b
[ 1184.672057] CR2:
0000000001181000 CR3:
000000000eba1000 CR4:
00000000000406e0
[ 1184.672057] DR0:
0000000000000000 DR1:
0000000000000000 DR2:
0000000000000000
x000000000117a190 *[ 1184.672057] DR3:
00000000000000**
00 DR6:
00000000ffff0ff0 DR7:
0000000000000400
[ 1184.672057] Process kworker/u:0 (pid: 5, threadinfo
ffff88000d652000, task
ffff88000d658000)
[ 1184.672057] Stack:
[ 1184.672057]
ffff880028868000 ffffffff836bfb40 ffff88000d653af0 ffffffff8193661b
[ 1184.672057]
ffff880028868008 ffffffff836bfb40 ffff88000d653b10 ffffffff81af1c81
[ 1184.672057]
ffff880028868068 ffff880028868008 ffff88000d653b30 ffffffff81af257a
[ 1184.795301] Call Trace:
[ 1184.795301] [<
ffffffff8193661b>] virtio_dev_remove+0x1b/0x60
[ 1184.795301] [<
ffffffff81af1c81>] __device_release_driver+0x81/0xd0
[ 1184.795301] [<
ffffffff81af257a>] device_release_driver+0x2a/0x40
[ 1184.795301] [<
ffffffff81af0d48>] bus_remove_device+0x138/0x150
[ 1184.795301] [<
ffffffff81aef08d>] device_del+0x14d/0x1b0
[ 1184.795301] [<
ffffffff81aef138>] device_unregister+0x48/0x60
[ 1184.795301] [<
ffffffff8193694d>] unregister_virtio_device+0xd/0x10
[ 1184.795301] [<
ffffffff8265fc74>] virtio_pci_remove+0x2a/0x6c
[ 1184.795301] [<
ffffffff818a95ad>] pci_device_remove+0x4d/0x110
[ 1184.795301] [<
ffffffff81af1c81>] __device_release_driver+0x81/0xd0
[ 1184.795301] [<
ffffffff81af257a>] device_release_driver+0x2a/0x40
[ 1184.795301] [<
ffffffff81af0d48>] bus_remove_device+0x138/0x150
[ 1184.795301] [<
ffffffff81aef08d>] device_del+0x14d/0x1b0
[ 1184.795301] [<
ffffffff81aef138>] device_unregister+0x48/0x60
[ 1184.795301] [<
ffffffff818a36fa>] pci_stop_bus_device+0x6a/0x90
[ 1184.795301] [<
ffffffff818a3791>] pci_stop_and_remove_bus_device+0x11/0x20
[ 1184.795301] [<
ffffffff818c21d9>] remove_callback+0x9/0x10
[ 1184.795301] [<
ffffffff81252d91>] sysfs_schedule_callback_work+0x21/0x60
[ 1184.795301] [<
ffffffff810cb1a1>] process_one_work+0x281/0x430
[ 1184.795301] [<
ffffffff810cb140>] ? process_one_work+0x220/0x430
[ 1184.795301] [<
ffffffff81252d70>] ? sysfs_read_file+0x1c0/0x1c0
[ 1184.795301] [<
ffffffff810cc613>] worker_thread+0x1f3/0x320
[ 1184.795301] [<
ffffffff810cc420>] ? manage_workers.clone.13+0x130/0x130
[ 1184.795301] [<
ffffffff810d30b2>] kthread+0xb2/0xc0
[ 1184.795301] [<
ffffffff826783f4>] kernel_thread_helper+0x4/0x10
[ 1184.795301] [<
ffffffff810deb18>] ? finish_task_switch+0x78/0xf0
[ 1184.795301] [<
ffffffff82676574>] ? retint_restore_args+0x13/0x13
[ 1184.795301] [<
ffffffff810d3000>] ? kthread_flush_work_fn+0x10/0x10
[ 1184.795301] [<
ffffffff826783f0>] ? gs_change+0x13/0x13
[ 1184.795301] Code: c1 9e 0a 00 48 83 c4 08 5b c9 c3 66 2e 0f 1f 84 00 00 00 00 00 55 48 89 e5 41 54 49 89 fc 53 48 8b 9f a8 04 00 00 80 3b 00 74 0a <0f> 0b 0f 1f 84 00 00 00 00 00 48 8b 87 88 04 00 00 ff 50 30 31
[ 1184.795301] RIP [<
ffffffff825c9116>] p9_virtio_remove+0x16/0x90
[ 1184.795301] RSP <
ffff88000d653ac0>
[ 1184.952618] ---[ end trace
a307b3ed40206b4c ]---
Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Rusty Russell [Tue, 22 May 2012 02:46:09 +0000 (12:16 +0930)]
virtio: update documentation to v0.9.5 of spec
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Linus Torvalds [Tue, 22 May 2012 02:43:57 +0000 (19:43 -0700)]
Merge branch 'smp-hotplug-for-linus' of git://git./linux/kernel/git/tip/tip
Pull smp hotplug cleanups from Thomas Gleixner:
"This series is merily a cleanup of code copied around in arch/* and
not changing any of the real cpu hotplug horrors yet. I wish I'd had
something more substantial for 3.5, but I underestimated the lurking
horror..."
Fix up trivial conflicts in arch/{arm,sparc,x86}/Kconfig and
arch/sparc/include/asm/thread_info_32.h
* 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (79 commits)
um: Remove leftover declaration of alloc_task_struct_node()
task_allocator: Use config switches instead of magic defines
sparc: Use common threadinfo allocator
score: Use common threadinfo allocator
sh-use-common-threadinfo-allocator
mn10300: Use common threadinfo allocator
powerpc: Use common threadinfo allocator
mips: Use common threadinfo allocator
hexagon: Use common threadinfo allocator
m32r: Use common threadinfo allocator
frv: Use common threadinfo allocator
cris: Use common threadinfo allocator
x86: Use common threadinfo allocator
c6x: Use common threadinfo allocator
fork: Provide kmemcache based thread_info allocator
tile: Use common threadinfo allocator
fork: Provide weak arch_release_[task_struct|thread_info] functions
fork: Move thread info gfp flags to header
fork: Remove the weak insanity
sh: Remove cpu_idle_wait()
...
Linus Torvalds [Tue, 22 May 2012 02:26:51 +0000 (19:26 -0700)]
Merge branch 'core-rcu-for-linus' of git://git./linux/kernel/git/tip/tip
Pull RCU changes from Ingo Molnar:
"This is the v3.5 RCU tree from Paul E. McKenney:
1) A set of improvements and fixes to the RCU_FAST_NO_HZ feature (with
more on the way for 3.6). Posted to LKML:
https://lkml.org/lkml/2012/4/23/324 (commits 1-3 and 5),
https://lkml.org/lkml/2012/4/16/611 (commit 4),
https://lkml.org/lkml/2012/4/30/390 (commit 6), and
https://lkml.org/lkml/2012/5/4/410 (commit 7, combined with
the other commits for the convenience of the tester).
2) Changes to make rcu_barrier() avoid disrupting execution of CPUs
that have no RCU callbacks. Posted to LKML:
https://lkml.org/lkml/2012/4/23/322.
3) A couple of commits that improve the efficiency of the interaction
between preemptible RCU and the scheduler, these two being all that
survived an abortive attempt to allow preemptible RCU's
__rcu_read_lock() to be inlined. The full set was posted to LKML at
https://lkml.org/lkml/2012/4/14/143, and the first and third patches
of that set remain.
4) Lai Jiangshan's algorithmic implementation of SRCU, which includes
call_srcu() and srcu_barrier(). A major feature of this new
implementation is that synchronize_srcu() no longer disturbs the
execution of other CPUs. This work is based on earlier
implementations by Peter Zijlstra and Paul E. McKenney. Posted to
LKML: https://lkml.org/lkml/2012/2/22/82.
5) A number of miscellaneous bug fixes and improvements which were
posted to LKML at: https://lkml.org/lkml/2012/4/23/353 with
subsequent updates posted to LKML."
* 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (32 commits)
rcu: Make rcu_barrier() less disruptive
rcu: Explicitly initialize RCU_FAST_NO_HZ per-CPU variables
rcu: Make RCU_FAST_NO_HZ handle timer migration
rcu: Update RCU maintainership
rcu: Make exit_rcu() more precise and consolidate
rcu: Move PREEMPT_RCU preemption to switch_to() invocation
rcu: Ensure that RCU_FAST_NO_HZ timers expire on correct CPU
rcu: Add rcutorture test for call_srcu()
rcu: Implement per-domain single-threaded call_srcu() state machine
rcu: Use single value to handle expedited SRCU grace periods
rcu: Improve srcu_readers_active_idx()'s cache locality
rcu: Remove unused srcu_barrier()
rcu: Implement a variant of Peter's SRCU algorithm
rcu: Improve SRCU's wait_idx() comments
rcu: Flip ->completed only once per SRCU grace period
rcu: Increment upper bit only for srcu_read_lock()
rcu: Remove fast check path from __synchronize_srcu()
rcu: Direct algorithmic SRCU implementation
rcu: Introduce rcutorture testing for rcu_barrier()
timer: Fix mod_timer_pinned() header comment
...
Linus Torvalds [Tue, 22 May 2012 02:25:14 +0000 (19:25 -0700)]
Merge branch 'core-locking-for-linus' of git://git./linux/kernel/git/tip/tip
Pull core locking updates from Ingo Molnar:
"This update:
- extends and simplifies x86 NMI callback handling code to enhance
and fix the HP hw-watchdog driver
- simplifies the x86 NMI callback handling code to fix a kmemcheck
bug.
- enhances the hung-task debugger"
* 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/nmi: Fix the type of the nmiaction.flags field
x86/nmi: Fix page faults by nmiaction if kmemcheck is enabled
x86/nmi: Add new NMI queues to deal with IO_CHK and SERR
watchdog, hpwdt: Remove priority option for NMI callback
hung task debugging: Inject NMI when hung and going to panic
Linus Torvalds [Tue, 22 May 2012 02:23:41 +0000 (19:23 -0700)]
Merge branch 'core-iommu-for-linus' of git://git./linux/kernel/git/tip/tip
Pull iommu core changes from Ingo Molnar:
"The IOMMU changes in this cycle are mostly about factoring out
Intel-VT-d specific IRQ remapping details and introducing struct
irq_remap_ops, in preparation for AMD specific hardware."
* 'core-iommu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
iommu: Fix off by one in dmar_get_fault_reason()
irq_remap: Fix the 'sub_handle' uninitialized warning
irq_remap: Fix UP build failure
irq_remap: Fix compiler warning with CONFIG_IRQ_REMAP=y
iommu: rename intr_remapping.[ch] to irq_remapping.[ch]
iommu: rename intr_remapping references to irq_remapping
x86, iommu/vt-d: Clean up interfaces for interrupt remapping
iommu/vt-d: Convert MSI remapping setup to remap_ops
iommu/vt-d: Convert free_irte into a remap_ops callback
iommu/vt-d: Convert IR set_affinity function to remap_ops
iommu/vt-d: Convert IR ioapic-setup to use remap_ops
iommu/vt-d: Convert missing apic.c intr-remapping call to remap_ops
iommu/vt-d: Make intr-remapping initialization generic
iommu: Rename intr_remapping files to intel_intr_remapping
Linus Torvalds [Tue, 22 May 2012 02:22:55 +0000 (19:22 -0700)]
Merge branch 'core-debugobjects-for-linus' of git://git./linux/kernel/git/tip/tip
Pull core/debugobjects changes from Ingo Molnar:
"Not much happened: it includes a cleanup and an irq latency reduction
fixlet."
* 'core-debugobjects-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
debugobjects: Fill_pool() returns void now
debugobjects: printk with irqs enabled
debugobjects: Remove unused return value from fill_pool()
Linus Torvalds [Tue, 22 May 2012 02:21:20 +0000 (19:21 -0700)]
Merge git://git./linux/kernel/git/steve/gfs2-3.0-nmw
Pull GFS2 changes from Steven Whitehouse.
* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-nmw: (24 commits)
GFS2: Fix quota adjustment return code
GFS2: Add rgrp information to block_alloc trace point
GFS2: Eliminate unused "new" parameter to gfs2_meta_indirect_buffer
GFS2: Update glock doc to add new stats info
GFS2: Update main gfs2 doc
GFS2: Remove redundant metadata block type check
GFS2: Fix sgid propagation when using ACLs
GFS2: eliminate log elements and simplify
GFS2: Eliminate vestigial sd_log_le_rg
GFS2: Eliminate needless parameter from function gfs2_setbit
GFS2: Log code fixes
GFS2: Remove unused argument from gfs2_internal_read
GFS2: Remove bd_list_tr
GFS2: Remove duplicate log code
GFS2: Clean up log write code path
GFS2: Use variable rather than qa to determine if unstuff necessary
GFS2: Change variable blk to biblk
GFS2: Fix function parameter comments in rgrp.c
GFS2: Eliminate offset parameter to gfs2_setbit
GFS2: Use slab for block reservation memory
...
Linus Torvalds [Tue, 22 May 2012 02:15:03 +0000 (19:15 -0700)]
Merge branch 'for-next' of git://git./linux/kernel/git/gerg/m68knommu
Pull m68knommu tree from Greg Ungerer:
"More merge and clean up of MMU and non-MMU common files, namely
signal.c and dma.c. There is also a simplification of the ColdFire
GPIO setup tables. Using a couple of simple macros we make the init
tables really small and easy to read, and save a couple of thousand
lines of code. Also a move of all the ColdFire subarch support files
into the existing coldfire directory. The sub-directories just ended
up duplicating Makefiles and now only contain really simple pieces of
code. This saves quite a few lines of code too.
As always a couple of bugs fixes thrown in too. Oh and a new
defconfig for the ColdFire platforms that support having the MMU
enabled."
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: (39 commits)
m68k: add a defconfig for the M5475EVB ColdFire with MMU board
m68knommu: unaligned.h fix for M68000 core
m68k: merge the MMU and non-MMU versions of the arch dma code
m68knommu: reorganize the no-MMU cache flushing to match m68k
m68knommu: move the 54xx platform code into the common ColdFire code directory
m68knommu: move the 532x platform code into the common ColdFire code directory
m68knommu: move the 5407 platform code into the common ColdFire code directory
m68knommu: move the 5307 platform code into the common ColdFire code directory
m68knommu: move the 528x platform code into the common ColdFire code directory
m68knommu: move the 527x platform code into the common ColdFire code directory
m68knommu: move the 5272 platform code into the common ColdFire code directory
m68knommu: move the 5249 platform code into the common ColdFire code directory
m68knommu: move the 523x platform code into the common ColdFire code directory
m68knommu: move the 520x platform code into the common ColdFire code directory
m68knommu: move the 5206 platform code into the common ColdFire code directory
m68knommu: simplify the ColdFire 5407 GPIO struct setup
m68knommu: simplify the ColdFire 532x GPIO struct setup
m68knommu: simplify the ColdFire 5307 GPIO struct setup
m68knommu: simplify the ColdFire 528x GPIO struct setup
m68knommu: simplify the ColdFire 527x GPIO struct setup
...
Linus Torvalds [Tue, 22 May 2012 01:48:10 +0000 (18:48 -0700)]
Revert "vfs: remove unnecessary d_unhashed() check from __d_lookup_rcu"
This reverts commit
8c01a529b861ba97c7d78368e6a5d4d42e946f75.
It turns out the d_unhashed() check isn't unnecessary after all: while
it's true that unhashing will increment the sequence numbers, that does
not necessarily invalidate the RCU lookup, because it might have seen
the dentry pointer (before it got unhashed), but by the time it loaded
the sequence number, it could have seen the *new* sequence number (after
it got unhashed).
End result: we might look up an unhashed dentry that is about to be
freed, with the sequence number never indicating anything bad about it.
So checking that the dentry is still hashed (*after* reading the sequence
number) is indeed the proper fix, and was never unnecessary.
Reported-by: Dave Jones <davej@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
James Morris [Tue, 22 May 2012 01:21:06 +0000 (11:21 +1000)]
Merge branch 'master' of git://git.infradead.org/users/eparis/selinux into next
Per pull request, for 3.5.
Linus Torvalds [Tue, 22 May 2012 00:54:55 +0000 (17:54 -0700)]
Merge tag 'rdma-for-3.5' of git://git./linux/kernel/git/roland/infiniband
Pull InfiniBand/RDMA changes from Roland Dreier:
- Add ocrdma hardware driver for Emulex IB-over-Ethernet adapters
- Add generic and mlx4 support for "raw" QPs: allow suitably privileged
applications to send and receive arbitrary packets directly to/from
the hardware
- Add "doorbell drop" handling to the cxgb4 driver
- A fairly large batch of qib hardware driver changes
- A few fixes for lockdep-detected issues
- A few other miscellaneous fixes and cleanups
Fix up trivial conflict in drivers/net/ethernet/emulex/benet/be.h.
* tag 'rdma-for-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: (53 commits)
RDMA/cxgb4: Include vmalloc.h for vmalloc and vfree
IB/mlx4: Fix mlx4_ib_add() error flow
IB/core: Fix IB_SA_COMP_MASK macro
IB/iser: Fix error flow in iser ep connection establishment
IB/mlx4: Increase the number of vectors (EQs) available for ULPs
RDMA/cxgb4: Add query_qp support
RDMA/cxgb4: Remove kfifo usage
RDMA/cxgb4: Use vmalloc() for debugfs QP dump
RDMA/cxgb4: DB Drop Recovery for RDMA and LLD queues
RDMA/cxgb4: Disable interrupts in c4iw_ev_dispatch()
RDMA/cxgb4: Add DB Overflow Avoidance
RDMA/cxgb4: Add debugfs RDMA memory stats
cxgb4: DB Drop Recovery for RDMA and LLD queues
cxgb4: Common platform specific changes for DB Drop Recovery
cxgb4: Detect DB FULL events and notify RDMA ULD
RDMA/cxgb4: Drop peer_abort when no endpoint found
RDMA/cxgb4: Always wake up waiters in c4iw_peer_abort_intr()
mlx4_core: Change bitmap allocator to work in round-robin fashion
RDMA/nes: Don't call event handler if pointer is NULL
RDMA/nes: Fix for the ORD value of the connecting peer
...
Linus Torvalds [Tue, 22 May 2012 00:46:21 +0000 (17:46 -0700)]
Merge tag 'scsi-misc' of git://git./linux/kernel/git/jejb/scsi
Pull SCSI misc update from James Bottomley:
"The patch contains the usual assortment of driver updates (be2iscsi,
bfa, bnx2i, fcoe, hpsa, isci, lpfc, megaraid, mpt2sas, pm8001, sg)
plus an assortment of other changes and fixes. Also new is the fact
that the isci update is delivered as a git merge (with signed tag)."
* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (158 commits)
isci: End the RNC resumption wait when the RNC is destroyed.
isci: Fixed RNC bug that lost the suspension or resumption during destroy
isci: Fix RNC AWAIT_SUSPENSION->INVALIDATING transition.
isci: Manage the IREQ_NO_AUTO_FREE_TAG under scic_lock.
isci: Remove obviated host callback list.
isci: Check IDEV_GONE before performing abort path operations.
isci: Restore the ATAPI device RNC management code.
isci: Don't wait for an RNC suspend if it's being destroyed.
isci: Change the phy control and link reset interface for HW reasons.
isci: Added timeouts to RNC suspensions in the abort path.
isci: Add protocol indicator for TMF requests.
isci: Directly control IREQ_ABORT_PATH_ACTIVE when completing TMFs.
isci: Wait for RNC resumption before leaving the abort path.
isci: Fix RNC suspend call for SCI_RESUMING state.
isci: Manage tag releases differently when aborting tasks.
isci: Callbacks to libsas occur under scic_lock and are synchronized.
isci: When in the abort path, defeat other resume calls until done.
isci: Implement waiting for suspend in the abort path.
isci: Make sure all TCs are terminated and cleaned in LUN reset.
isci: Manage the LLHANG timer enable/disable per-device.
...
Linus Torvalds [Tue, 22 May 2012 00:40:42 +0000 (17:40 -0700)]
Merge branch 'usb-target-merge' of git://git./linux/kernel/git/nab/target-pending
Pull usb-gadget scsi-target merge from Nicholas Bellinger:
"As promised, here is the pull request for Sebastian's usb-gadget
target UASP / BOT driver for v3.5-rc1. This code has been in
linux-next for a number of weeks, and is now ready for an initial
merge.
This fabric uses the target framework to provide a usb gadget device.
This gadget supports the USB Attached SCSI Protocol (UASP) and Bulk
Only Transfers (BOT or BBB). BOT is the primary interface, UAS is the
alternative interface.
Note this series is dependent upon a single target core patch for
adding se_cmd->unknown_data_length in target-pending/for-next, that
got merged in the parent.
Kudos to Sebastian for making this driver happen so easily, and for
his patches to improve usb-core and target core along the way to his
goal. Also thanks to Felipe + Greg-KH for their help in getting this
driver ready for mainline."
* 'usb-target-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
usb-gadget: Initial merge of target module for UASP + BOT
Linus Torvalds [Tue, 22 May 2012 00:37:09 +0000 (17:37 -0700)]
Merge branch 'for-next' of git://git./linux/kernel/git/nab/target-pending
Pull scsi-target changes from Nicholas Bellinger:
"There has been lots of work in existing code in a number of areas this
past cycle. The major highlights have been:
* Removal of transport_do_task_sg_chain() from core + fabrics
(Roland)
* target-core: Removal of se_task abstraction from target-core and
enforce hw_max_sectors for pSCSI backends (hch)
* Re-factoring of iscsi-target tx immediate/response queues (agrover)
* Conversion of iscsi-target back to using target core memory
allocation logic (agrover)
We've had one last minute iscsi-target patch go into for-next to
address a nasty regression bug related to the target core allocation
logic conversion from agrover that is not included in friday's
linux-next build, but has been included in this series.
On the new fabric module code front for-3.5, here is a brief status
update for the three currently in flight this round:
* usb-gadget target driver:
Sebastian Siewior's driver for supporting usb-gadget target mode
operation. This will be going out as a separate PULL request from
target-pending/usb-target-merge with subsystem maintainer ACKs. There
is one minor target-core patch in this series required to function.
* sbp ieee-1394/firewire target driver:
Chris Boot's driver for supportting the Serial Block Protocol (SBP)
across IEEE-1394 Firewire hardware. This will be going out as a
separate PULL request from target-pending/sbp-target-merge with two
additional drivers/firewire/ patches w/ subsystem maintainer ACKs.
* qla2xxx LLD target mode infrastructure changes + tcm_qla2xxx:
The Qlogic >= 24xx series HW target mode LLD infrastructure patch-set
and tcm_qla2xxx fabric driver. Support for FC target mode using
qla2xxx LLD code has been officially submitted by Qlogic to James
below, and is currently outstanding but not yet merged into
scsi.git/for-next..
[PATCH 00/22] qla2xxx: Updates for scsi "misc" branch
http://www.spinics.net/lists/linux-scsi/msg59350.html
Note there are *zero* direct dependencies upon this for-next series
for the qla2xxx LLD target + tcm_qla2xxx patches submitted above, and
over the last days the target mode team has been tracking down an
tcm_qla2xxx specific active I/O shutdown bug that appears to now be
almost squashed for 3.5-rc-fixes."
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (47 commits)
iscsi-target: Fix iov_count calculation bug in iscsit_allocate_iovecs
iscsi-target: remove dead code in iscsi_check_valuelist_for_support
target: Handle ATA_16 passthrough for pSCSI backend devices
target: Add MI_REPORT_TARGET_PGS ext. header + implict_trans_secs attribute
target: Fix MAINTENANCE_IN service action CDB checks to use lower 5 bits
target: add support for the WRITE_VERIFY command
target: make target_put_session void
target: cleanup transport_execute_tasks()
target: Remove max_sectors device attribute for modern se_task less code
target: lock => unlock typo in transport_lun_wait_for_tasks
target: Enforce hw_max_sectors for SCF_SCSI_DATA_SG_IO_CDB
target: remove the t_se_count field in struct se_cmd
target: remove the t_task_cdbs_ex_left field in struct se_cmd
target: remove the t_task_cdbs_left field in struct se_cmd
target: remove struct se_task
target: move the state and execute lists to the command
target: simplify command to task linkage
target: always allocate a single task
target: replace ->execute_task with ->execute_cmd
target: remove the task_sectors field in struct se_task
...
Linus Torvalds [Tue, 22 May 2012 00:01:56 +0000 (17:01 -0700)]
Merge tag 'for-3.5' of git://openrisc.net/jonas/linux
Pull OpenRISC updates from Jonas Bonn:
"A couple of cleanups for the OpenRISC architecture:
- Implement IRQ domains
- Use DMA mapping framework completely and catch up with recent
changes to dma_map_ops
- One bug fix to the "or1k_atomic" syscall to not clobber call-saved
registers
- OOM killer patches to the pagefault handler ported from the X86
arch
- ...and a couple of header file cleanups"
* tag 'for-3.5' of git://openrisc.net/jonas/linux:
openrisc: use scratch regs in atomic syscall
openrisc: provide dma_map_ops
openrisc: header file cleanups
openrisc/mm/fault.c: Port OOM changes to do_page_fault
openrisc: remove unnecessary includes
openrisc: implement irqdomains
Linus Torvalds [Mon, 21 May 2012 23:58:23 +0000 (16:58 -0700)]
Merge tag 'pinctrl-for-v3.5' of git://git./linux/kernel/git/linusw/linux-pinctrl
Pull pin control subsystem changes from Linus Walleij:
- Generic Device Tree bindings and hooks for drivers so we can move
over modern drivers to using this.
- Device Tree bindings for Tegra SoCs.
- Funneling some devicetree helper code for the drivers/of subsystem.
- New pin control drivers for:
* Freescale MXS
* Freescale i.MX51
* Freescale i.MX53
All of these use Device Tree bindings.
- Dummy pinctrl handles for stepwise migration to pinctrl, akin to
dummy regulators.
- Minor non-urgent fixes and improvments.
Fix up trivial conflicts in Documentation/driver-model/devres.txt and
drivers/pinctrl/core.c,
* tag 'pinctrl-for-v3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (46 commits)
pinctrl: pinctrl-imx: add imx51 pinctrl driver
pinctrl: pinctrl-imx: add imx53 pinctrl driver
pinctrl: pinctrl-pxa3xx: remove empty pinmux disable function
pinctrl: pinctrl-mxs: remove empty pinmux disable function
pinctrl: pinctrl-imx: remove empty pinmux disable function
pinctrl: make pinmux disable function optional
pinctrl: a minor error checking improvement for pinconf
pinctrl: mxs: skip gpio nodes for group creation
pinctrl: mxs: create group for pin config node
pinctrl: (cosmetic) fix two entries in DocBook comments
pinctrl: add more info to error msgs in pin_request
pinctrl: add pinctrl-mxs support
pinctrl: pinctrl-imx: add imx6q pinctrl driver
pinctrl: pinctrl-imx: add imx pinctrl core driver
dt: add of_get_child_count helper function
pinctrl: support gpio request deferred probing
pinctrl: add pinctrl_provide_dummies interface for platforms to use
pinctrl: enhance reporting of errors when loading from DT
pinctrl: add kerneldoc for pinctrl_ops device tree functions
pinctrl: propagate map validation errors
...
Linus Torvalds [Mon, 21 May 2012 23:49:16 +0000 (16:49 -0700)]
Merge tag 'regulator-3.5' of git://git./linux/kernel/git/broonie/regulator
Pull regulator updates from Mark Brown:
"The major thing here is the addition of some helpers to factor code
out of drivers, making a fair proportion of regulators much more just
data rather than code which is nice.
- Helpers in the core for regulators using regmap, providing generic
implementations of the enable and voltage selection operations which
just need data to describe them in the drivers.
- Split out voltage mapping and voltage setting, allowing many more
drivers to take advantage of the infrastructure for selectors.
- Loads and loads of cleanups from Axel Lin once again, including many
changes to take advantage of the above new framework features
- New drivers for Ricoh RC5T583, TI TPS62362, TI TPS62363, TI
TPS65913, TI TWL6035 and TI TWL6037.
Some of the registration changes to support the core refactoring
caused so many conflicts that eventually topic branches were abandoned
for this release."
* tag 'regulator-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (227 commits)
regulator: tps65910: use of_node of matched regulator being register
regulator: tps65910: dt: support when "regulators" node found
regulator: tps65910: add error message in case of failure
regulator: tps62360: dt: initialize of_node param for regulator register.
regulator: tps65910: use devm_* for memory allocation
regulator: tps65910: use small letter for regulator names
mfd: tpx6586x: Depend on regulator
regulator: regulator for Palmas Kconfig
regulator: regulator driver for Palmas series chips
regulator: Enable Device Tree for the db8500-prcmu regulator driver
regulator: db8500-prcmu: Separate regulator registration from probe
regulator: ab3100: Use regulator_map_voltage_iterate()
regulator: tps65217: Convert to set_voltage_sel and map_voltage
regulator: Enable the ab8500 for Device Tree
regulator: ab8500: Split up probe() into manageable pieces
regulator: max8925: Remove check_range function and max_uV from struct rc5t583_regulator_info
regulator: max8649: Remove unused check_range() function
regulator: rc5t583: Remove max_uV from struct rc5t583_regulator_info
regulator: da9052: Convert to set_voltage_sel and map_voltage
regulator: max8952: Use devm_kzalloc
...
Linus Torvalds [Mon, 21 May 2012 23:32:44 +0000 (16:32 -0700)]
Merge tag 'regmap-3.5' of git://git./linux/kernel/git/broonie/regmap
Pull regmap updates from Mark Brown:
"A surprisingly large series of updates for regmap this time, mostly
due to all the work Stephen Warren has done to add support for MMIO
buses. This wasn't really the target for the framework but it turns
out that there's a reasonable number of cases where it's very helpful
to use the register cache support to allow the register map to remain
available while the device is suspended.
- A MMIO bus implementation, contributed by Stephen Warren. Currently
this is limited to 32 bit systems and native endian registers.
- Support for naming register maps, mainly intended for MMIO devices
with multiple register banks. This was also contributed by Stephen
Warren.
- Support for register striding, again contributed by Stephen Warren
and mainly intended for use with MMIO as typically the registers
will be a fixed size but byte addressed.
- irqdomain support for the generic regmap irq_chip, including support
for dynamically allocate interrupt numbers.
- A function dev_get_regmap() which allows frameworks using regmap to
obtain the regmap for a device from the struct device, making life a
little simpler for them.
- Updates to regmap-irq to support more chips (contributed by Graeme
Gregory) and to use irqdomains.
- Support for devices with 24 bit register addresses.
The striding support collided with all the topic branches so the
branches look a bit messy and eventually I just gave up. There's also
the TI Palmas driver and a couple of other isolated MFD patches that
all depend on new regmap features so are being merged here."
* tag 'regmap-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: (24 commits)
mfd: palmas PMIC device support Kconfig
mfd: palmas PMIC device support
regmap: Fix typo in IRQ register striding
mfd: wm8994: Update to fully use irq_domain
regmap: add support for non contiguous status to regmap-irq
regmap: Convert regmap_irq to use irq_domain
regmap: Pass back the allocated regmap IRQ controller data
mfd: da9052: Fix genirq abuse
regmap: Implement dev_get_regmap()
regmap: Devices using format_write don't support bulk operations
regmap: Converts group operation into single read write operations
regmap: Cache single values read from the chip
regmap: fix compile errors in regmap-irq.c due to stride changes
regmap: implement register striding
regmap: fix compilation when !CONFIG_DEBUG_FS
regmap: allow regmap instances to be named
regmap: validate regmap_raw_read/write val_len
regmap: mmio: remove some error checks now in the core
regmap: mmio: convert some error returns to BUG()
regmap: add MMIO bus support
...
Linus Torvalds [Mon, 21 May 2012 23:24:54 +0000 (16:24 -0700)]
Merge tag 'pci-for-3.5' of git://git./linux/kernel/git/helgaas/pci
Pull PCI changes from Bjorn Helgaas:
- Host bridge cleanups from Yinghai
- Disable Bus Master bit on PCI device shutdown (kexec-related)
- Stratus ftServer fix
- pci_dev_reset() locking fix
- IvyBridge graphics erratum workaround
* tag 'pci-for-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (21 commits)
microblaze/PCI: fix "io_offset undeclared" error
x86/PCI: only check for spinlock being held in SMP kernels
resources: add resource_overlaps()
PCI: fix uninitialized variable 'cap_mask'
MAINTAINERS: update PCI git tree and patchwork
PCI: disable Bus Master on PCI device shutdown
PCI: work around IvyBridge internal graphics FLR erratum
x86/PCI: fix unused variable warning in amd_bus.c
PCI: move mutex locking out of pci_dev_reset function
PCI: work around Stratus ftServer broken PCIe hierarchy
x86/PCI: merge pcibios_scan_root() and pci_scan_bus_on_node()
x86/PCI: dynamically allocate pci_root_info for native host bridge drivers
x86/PCI: embed pci_sysdata into pci_root_info on ACPI path
x86/PCI: embed name into pci_root_info struct
x86/PCI: add host bridge resource release for _CRS path
x86/PCI: refactor get_current_resources()
PCI: add host bridge release support
PCI: add generic device into pci_host_bridge struct
PCI: rename pci_host_bridge() to find_pci_root_bridge()
x86/PCI: fix memleak with get_current_resources()
...
Linus Torvalds [Mon, 21 May 2012 23:14:04 +0000 (16:14 -0700)]
vfs: be even more careful about dentry RCU name lookups
Miklos Szeredi points out that we need to also worry about memory
odering when doing the dentry name comparison asynchronously with RCU.
In particular, doing a rename can do a memcpy() of one dentry name over
another, and we want to make sure that any unlocked reader will always
see the proper terminating NUL character, so that it won't ever run off
the allocation.
Rather than having to be extra careful with the name copy or at lookup
time for each character, this resolves the issue by making sure that all
names that are inlined in the dentry always have a NUL character at the
end of the name allocation. If we do that at dentry allocation time, we
know that no future name copy will ever change that final NUL to
anything else, so there are no memory ordering issues.
So even if a concurrent rename ends up overwriting the NUL character
that terminates the original name, we always know that there is one
final NUL at the end, and there is no worry about the lockless RCU
lookup traversing the name too far.
The out-of-line allocations are never copied over, so we can just make
sure that we write the name (with terminating NULL) and do a write
barrier before we expose the name to anything else by setting it in the
dentry.
Reported-by: Miklos Szeredi <mszeredi@suse.cz>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Nick Piggin <npiggin@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Mon, 21 May 2012 23:06:20 +0000 (16:06 -0700)]
vfs: make AIO use the proper rw_verify_area() area helpers
We had for some reason overlooked the AIO interface, and it didn't use
the proper rw_verify_area() helper function that checks (for example)
mandatory locking on the file, and that the size of the access doesn't
cause us to overflow the provided offset limits etc.
Instead, AIO did just the security_file_permission() thing (that
rw_verify_area() also does) directly.
This fixes it to do all the proper helper functions, which not only
means that now mandatory file locking works with AIO too, we can
actually remove lines of code.
Reported-by: Manish Honap <manish_honap_vit@yahoo.co.in>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Mon, 21 May 2012 23:01:50 +0000 (16:01 -0700)]
Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm
Pull core ARM updates from Russell King:
"This is the bulk of the core ARM updates for this merge window.
Included in here is a different way to handle the VIVT cache flushing
on context switch, which should allow scheduler folk to remove a
special case in their core code.
We have architectured timer support here, which is a set of timers
specified by the ARM architecture for future SoCs. So we should see
less variability in timer design going forward.
The last big thing here is my cleanup to the way we handle PCI across
ARM, fixing some oddities in some platforms which hadn't realised
there was a way to deal with their private data already built in to
our PCI backend.
I've also removed support for the ARMv3 architecture; it hasn't worked
properly for years so it seems pointless to keep it around."
* 'for-linus' of git://git.linaro.org/people/rmk/linux-arm: (47 commits)
ARM: PCI: remove per-pci_hw list of buses
ARM: PCI: dove/kirkwood/mv78xx0: use sys->private_data
ARM: PCI: provide a default bus scan implementation
ARM: PCI: get rid of pci_std_swizzle()
ARM: PCI: versatile: fix PCI interrupt setup
ARM: PCI: integrator: use common PCI swizzle
ARM: 7416/1: LPAE: Remove unused L_PTE_(BUFFERABLE|CACHEABLE) macros
ARM: 7415/1: vfp: convert printk's to pr_*'s
ARM: decompressor: avoid speculative prefetch from non-RAM areas
ARM: Remove ARMv3 support from decompressor
ARM: 7413/1: move read_{boot,persistent}_clock to the architecture level
ARM: Remove support for ARMv3 ARM610 and ARM710 CPUs
ARM: 7363/1: DEBUG_LL: limit early mapping to the minimum
ARM: 7391/1: versatile: add some auxdata for device trees
ARM: 7389/2: plat-versatile: modernize FPGA IRQ controller
AMBA: get rid of last two uses of NO_IRQ
ARM: 7408/1: cacheflush: return error to userspace when flushing syscall fails
ARM: 7409/1: Do not call flush_cache_user_range with mmap_sem held
ARM: 7404/1: cmpxchg64: use atomic64 and local64 routines for cmpxchg64
ARM: 7347/1: SCU: use cpu_logical_map for per-CPU low power mode
...
Linus Torvalds [Mon, 21 May 2012 22:59:46 +0000 (15:59 -0700)]
Merge branch 'clkdev' of git://git.linaro.org/people/rmk/linux-arm
Pull clkdev updates from Russell King:
"This supplements clkdev with a device-managed API, allowing drivers
cleanup paths to be simplified. We also optimize clk_find() so that
it exits as soon as it finds a perfect match, and we provide a way to
minimise the amount of code platforms need to register clkdev entries.
Some of the code in arm-soc depends on these changes."
* 'clkdev' of git://git.linaro.org/people/rmk/linux-arm:
CLKDEV: provide helpers for common clock framework
ARM: 7392/1: CLKDEV: Optimize clk_find()
ARM: 7376/1: clkdev: Implement managed clk_get()
Linus Torvalds [Mon, 21 May 2012 19:52:42 +0000 (12:52 -0700)]
Fix blocking allocations called very early during bootup
During early boot, when the scheduler hasn't really been fully set up,
we really can't do blocking allocations because with certain (dubious)
configurations the "might_resched()" calls can actually result in
scheduling events.
We could just make such users always use GFP_ATOMIC, but quite often the
code that does the allocation isn't really aware of the fact that the
scheduler isn't up yet, and forcing that kind of random knowledge on the
initialization code is just annoying and not good for anybody.
And we actually have a the 'gfp_allowed_mask' exactly for this reason:
it's just that the kernel init sequence happens to set it to allow
blocking allocations much too early.
So move the 'gfp_allowed_mask' initialization from 'start_kernel()'
(which is some of the earliest init code, and runs with preemption
disabled for good reasons) into 'kernel_init()'. kernel_init() is run
in the newly created thread that will become the 'init' process, as
opposed to the early startup code that runs within the context of what
will be the first idle thread.
So by the time we reach 'kernel_init()', we know that the scheduler must
be at least limping along, because we've already scheduled from the idle
thread into the init thread.
Reported-by: Steven Rostedt <rostedt@goodmis.org>
Cc: David Rientjes <rientjes@google.com>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Sam Ravnborg [Mon, 21 May 2012 18:45:37 +0000 (20:45 +0200)]
net: drop NET dependency from HAVE_BPF_JIT
There is no point having the NET dependency on the select target, as it
forces all users to depend on NET to tell they support BPF_JIT. Move
the config option to the bottom of the file - this could be a nice place
also for future "selectable" config symbols.
Fix up all users to drop the dependency on NET now that it is not
required to supress warnings for non-NET builds.
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: David Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Mon, 21 May 2012 19:47:53 +0000 (12:47 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/lliubbo/blackfin
Pull blackfin changes from Bob Liu:
"The biggest change was added an new processor(bf60x series).
Bf60x series processor of blackfin can up to 1GHz with Hardware
Support for HD Video Analytics, it use the same blackfin ISA but with
some changes on system buses, interrupt controller and peripheral
devices.
Added dir arch/blackfin/mach-bf609/ and did some changes to the
framework made linux working fine on the reference board bf609-ezkit
now."
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lliubbo/blackfin: (41 commits)
blackfin: fix build after add bf60x mach/pm.h
blackfin: twi: include linux/i2c.h
blackfin: bf60x: add head file for crc controller
blackfin: bf60x: twi: work around temporary anomaly
0501001
blackfin: twi: Move TWI MMR access macro to twi head file
blackfin: twi: Move TWI peripheral pin request array to platform data
blackfin: bf60x: anomaly: Add a temporary anomaly
0501001
blackfin: bf60x: Rename the DDR controller macro
blackfin: mach-bf609: pm: cleanup bfin_deepsleep
blackfin: bf60x: cleanup get clock code
blackfin: bf60x: pm: Add a debug option to calculate kernel wakeup time.
blackfin: bf60x: add wakeup source select
blackfin: bf60x: make clock changeable in kernel menuconfig
blackfin:mach-bf609: fix norflash for bf609-ezkit
blackfin: mach-bf609: add can_wakeup to ethernet device
blackfin: remove redundant CONFIG_BF60x macro
blackfin: rotary: Add pm_wakeup flag to platform data structure.
bfin_gpio: fix bf548-ezkit kernel fail to boot
bfin_dma: fix initcall return error in proc_dma_init()
Blackfin: delete fork func
...
Linus Torvalds [Mon, 21 May 2012 19:46:48 +0000 (12:46 -0700)]
Merge tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming
Pull c6x updates from Mark Salter:
"Clean up some c6x Kconfig items and add support for Elf FDPIC loader."
* tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming:
C6X: remove unused config items
C6X: add support to build with BINFMT_ELF_FDPIC
C6X: change main arch kbuild symbol
Linus Torvalds [Mon, 21 May 2012 19:43:54 +0000 (12:43 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/geert/linux-m68k
Pull m68k updates from Geert Uytterhoeven.
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
m68k: Setup CROSS_COMPILE at the top
m68k: Correct the Atari ALLOWINT definition
m68k/video: Create <asm/vga.h>
m68k: Make sure {read,write}s[bwl]() are always defined
m68k/mm: Port OOM changes to do_page_fault()
scsi/atari: Make more functions static
scsi/atari: Revive "atascsi=" setup option
net/ariadne: Improve debug prints
m68k/atari: Change VME irq numbers from unsigned long to unsigned int
m68k/amiga: Use arch_initcall() for registering platform devices
m68k/amiga: Add error checks when registering platform devices
m68k/amiga: Mark z_dev_present() __init
m68k: Remove unused MAX_NOINT_IPL definition
Linus Torvalds [Mon, 21 May 2012 19:41:17 +0000 (12:41 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/s390/linux
Pull s390 updates from Martin Schwidefsky:
"Just a random collection of bug-fixes and cleanups, nothing new in
this merge request."
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (46 commits)
s390/ap: Fix wrong or missing comments
s390/ap: move receive callback to message struct
s390/dasd: re-prioritize partition detection message
s390/qeth: reshuffle initialization
s390/qeth: cleanup drv attr usage
s390/claw: cleanup drv attr usage
s390/lcs: cleanup drv attr usage
s390/ctc: cleanup drv attr usage
s390/ccwgroup: remove ccwgroup_create_from_string
s390/qeth: stop using struct ccwgroup driver for discipline callbacks
s390/qeth: switch to ccwgroup_create_dev
s390/claw: switch to ccwgroup_create_dev
s390/lcs: switch to ccwgroup_create_dev
s390/ctcm: switch to ccwgroup_create_dev
s390/ccwgroup: exploit ccwdev_by_dev_id
s390/ccwgroup: introduce ccwgroup_create_dev
s390: fix race on TIF_MCCK_PENDING
s390/barrier: make use of fast-bcr facility
s390/barrier: cleanup barrier functions
s390/claw: remove "eieio" calls
...
Linus Torvalds [Mon, 21 May 2012 17:32:01 +0000 (10:32 -0700)]
Merge git://git./linux/kernel/git/davem/sparc-next
Pull sparc updates from David Miller:
1) Kill off support for sun4c and Cypress sun4m chips.
And as a result we were able to also kill off that ugly btfixup thing
that required multi-stage links of the final vmlinux image in the
Kbuild system. This should make the kbuild maintainers really happy.
Thanks a lot to Sam Ravnborg for his tireless efforts to get this
going.
2) Convert sparc64 to nobootmem. I suspect now with sparc32 being a lot
cleaner, it should be able to fall in line and modernize in this area
too.
3) Make sparc32 use generic clockevents, from Tkhai Kirill.
[ I fixed up the BPF rules, and tried to clean up the build rules too.
But I don't have - or want - a sparc cross-build environment, so the
BPF rule bug and the related build cleanup was all done with just a
bare "make -n" pseudo-test. - Linus ]
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next: (110 commits)
sparc32: use flushi when run-time patching in per_cpu_patch
sparc32: fix cpuid_patch run-time patching
sparc32: drop unused inline functions in srmmu.c
sparc32: drop unused functions in pgtsrmmu.h
sparc32,leon: move leon mmu functions to leon_mm.c
sparc32,leon: remove duplicate definitions in leon.h
sparc32,leon: remove duplicate UART register definitions
sparc32,leon: move leon ASI definitions to asi.h
sparc32: move trap table to a separate file
sparc64: renamed ttable.S to ttable_64.S
sparc32: Remove asm/sysen.h header.
sparc32: Delete asm/smpprim.h
sparc32: Remove unused empty_bad_page{,_table} declarations.
sparc32: Kill boot_cpu_id4
sparc32: Move GET_PROCESSOR*_ID() out of asm/asmmacro.h
sparc32: Remove completely unused code from asm/cache.h
sparc32: Add ucmpdi2.o to obj-y instead of lib-y.
sparc32: add ucmpdi2
sparc: introduce arch/sparc/Kbuild
sparc: remove obsolete documentation
...
Linus Torvalds [Mon, 21 May 2012 17:03:46 +0000 (10:03 -0700)]
Merge git://git./linux/kernel/git/davem/net-next
Pull networking changes from David Miller:
1) Get rid of the error prone NLA_PUT*() macros that used an embedded
goto.
2) Kill off the token-ring and MCA networking drivers, from Paul
Gortmaker.
3) Reduce high-order allocations made by datagram AF_UNIX sockets, from
Eric Dumazet.
4) Add PTP hardware clock support to IGB and IXGBE, from Richard
Cochran and Jacob Keller.
5) Allow users to query timestamping capabilities of a card via
ethtool, from Richard Cochran.
6) Add loadbalance mode to the teaming driver, from Jiri Pirko. Part
of this is that we can now have BPF filters not attached to sockets,
and the loadbalancing function is calculated using one.
7) Francois Romieu went through the network drivers removing gratuitous
uses of netdev->base_addr, perhaps some day we can remove it
completely but it's used for ISA probing still.
8) Add a BPF JIT for sparc. I know, who cares, right? :-)
9) Move networking sysctl registry away from using the compatability
mode interfaces in the sysctl code. From Eric W Biederman.
10) Pavel Emelyanov added a way to save and restore TCP socket state via
TCP_REPAIR, TCP_REPAIR_QUEUE, and TCP_QUEUE_SEQ socket options as
well as a way to forcefully bind a socket to a port via the
sk->sk_reuse value SK_FORCE_REUSE. There is also a
TCP_REPAIR_OPTIONS which allows to reinstante the TCP options
enabled on the connection.
11) Several enhancements from Eric Dumazet that, in particular, can
enhance splice performance on TCP sockets significantly.
a) Reset the offset of the per-socket sendmsg page when we know
we're the only use of the page in linear_to_page().
b) Add facilities such that skb->data can be backed a page rather
than SLAB kmalloc'd memory. In particular devices which were
receiving into linear RX buffers can now end up providing paged
data.
The big result is that code like splice and GRO do not have to copy
any more.
12) Allow a pure sender to more gracefully handle ACK backlogs in TCP.
What can happen at high rates is that the sender hasn't grown his
receive buffer limits at all (he's not receiving data so really
doesn't need to), but the non-data ACKs consume receive buffer
space.
sk_add_backlog() is too aggressive in dropping frames in this case,
so relax it's requirements by using the receive buffer plus the send
buffer limit as the backlog limit instead of just the former.
Also from Eric Dumazet.
13) Add ipv6 support to L2TP, from Benjamin LaHaise, James Chapman, and
Chris Elston.
14) Implement TCP early retransmit (RFC 5827), from Yuchung Cheng.
Basically, we can start fast retransmit before hiting the dupack
threshold under certain conditions.
15) New CODEL active queue management packet scheduler, from Eric
Dumazet based upon initial work by Dave Taht.
Basically, the big feature is that packets are dropped (or ECN bits
are set) based upon how long packets live in the queue, rather than
the queue length (which is what RED uses).
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1341 commits)
drivers/net/stmmac: seq_file fix memory leak
ipv6/exthdrs: strict Pad1 and PadN check
USB: qmi_wwan: Add ZTE (Vodafone) K3520-Z
USB: qmi_wwan: Add ZTE (Vodafone) K3765-Z
USB: qmi_wwan: Make forced int 4 whitelist generic
net/ipv4: replace simple_strtoul with kstrtoul
net/ipv4/ipconfig: neaten __setup placement
net: qmi_wwan: Add Vodafone/Huawei K5005 support
net: cdc_ether: Add ZTE WWAN matches before generic Ethernet
ipv6: use skb coalescing in reassembly
ipv4: use skb coalescing in defragmentation
net: introduce skb_try_coalesce()
net:ipv6:fixed space issues relating to operators.
net:ipv6:fixed a trailing white space issue.
ipv6: disable GSO on sockets hitting dst_allfrag
tg3: use netdev_alloc_frag() API
net: napi_frags_skb() is static
ppp: avoid false drop_monitor false positives
ipv6: bool/const conversions phase2
ipx: Remove spurious NULL checking in ipx_ioctl().
...
Roland Dreier [Mon, 21 May 2012 16:00:47 +0000 (09:00 -0700)]
Merge branches 'core', 'cxgb4', 'ipath', 'iser', 'lockdep', 'mlx4', 'nes', 'ocrdma', 'qib' and 'raw-qp' into for-linus
Vipul Pandya [Mon, 21 May 2012 12:01:13 +0000 (17:31 +0530)]
RDMA/cxgb4: Include vmalloc.h for vmalloc and vfree
Signed-off-by: Vipul Pandya <vipul@chelsio.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Linus Torvalds [Mon, 21 May 2012 15:50:57 +0000 (08:50 -0700)]
Merge branch 'dentry-cleanups' (dcache access cleanups and optimizations)
This branch simplifies and clarifies the dcache lookup, and allows us to
do certain nice optimizations when comparing dentries. It also cleans
up the interface to __d_lookup_rcu(), especially around passing the
inode information around.
* dentry-cleanups:
vfs: make it possible to access the dentry hash/len as one 64-bit entry
vfs: move dentry name length comparison from dentry_cmp() into callers
vfs: do the careful dentry name access for all dentry_cmp cases
vfs: remove unnecessary d_unhashed() check from __d_lookup_rcu
vfs: clean up __d_lookup_rcu() and dentry_cmp() interfaces
Linus Torvalds [Mon, 21 May 2012 15:46:08 +0000 (08:46 -0700)]
Merge branch 'vfs-cleanups' (random vfs cleanups)
This teaches vfs_fstat() to use the appropriate f[get|put]_light
functions, allowing it to avoid some unnecessary locking for the common
case.
More noticeably, it also cleans up and simplifies the "getname_flags()"
function, which now relies on the architecture strncpy_from_user() doing
all the user access checks properly, instead of hacking around the fact
that on x86 it didn't use to do it right (see commit
92ae03f2ef99: "x86:
merge 32/64-bit versions of 'strncpy_from_user()' and speed it up").
* vfs-cleanups:
VFS: make vfs_fstat() use f[get|put]_light()
VFS: clean up and simplify getname_flags()
x86: make word-at-a-time strncpy_from_user clear bytes at the end
Linus Torvalds [Mon, 21 May 2012 15:41:38 +0000 (08:41 -0700)]
Merge branch 'stat-cleanups' (clean up copying of stat info to user space)
This makes cp_new_stat() a bit more readable, and avoids having to
memset() the whole structure just to fill in a couple of padding fields.
This is another result of me looking at code generation of functions
that show up high on certain kernel profiles, and just going "Oh, let's
just clean that up".
Architectures that don't supply the #define to fill just the padding
fields will still fall back to memset().
* stat-cleanups:
vfs: don't force a big memset of stat data just to clear padding fields
vfs: de-crapify "cp_new_stat()" function
Linus Torvalds [Mon, 21 May 2012 15:37:07 +0000 (08:37 -0700)]
Merge branch 'vm-cleanups' (unmap_vma() interface cleanup)
This series sanitizes the interface to unmap_vma(). The crazy interface
annoyed me no end when I was looking at unmap_single_vma(), which we can
spend quite a lot of time in (especially with loads that have a lot of
small fork/exec's: shell scripts etc).
Moving the nr_accounted calculations to where they belong at least
clarifies things a little. I hope to come back to look at the
performance of this later, but if/when I get back to it I at least don't
have to see the crazy interfaces any more.
* vm-cleanups:
vm: remove 'nr_accounted' calculations from the unmap_vmas() interfaces
vm: simplify unmap_vmas() calling convention
Russell King [Mon, 21 May 2012 14:15:33 +0000 (15:15 +0100)]
Merge branch 'v3-removal' into for-linus
Conflicts:
arch/arm/boot/compressed/head.S
Russell King [Mon, 21 May 2012 14:15:24 +0000 (15:15 +0100)]
Merge branch 'misc' into for-linus
Conflicts:
arch/arm/kernel/ptrace.c
Russell King [Mon, 21 May 2012 14:15:10 +0000 (15:15 +0100)]
Merge branches 'amba', 'devel-stable', 'fixes', 'mach-types', 'mmci', 'pci' and 'versatile' into for-linus
James Bottomley [Mon, 21 May 2012 11:17:30 +0000 (12:17 +0100)]
Merge tag 'isci-for-3.5' into misc
isci update for 3.5
1/ Rework remote-node-context (RNC) handling for proper management of
the silicon state machine in error handling and hot-plug conditions.
Further details below, suffice to say if the RNC is mismanaged the
silicon state machines may lock up.
2/ Refactor the initialization code to be reused for suspend/resume support
3/ Miscellaneous bug fixes to address discovery issues and hardware
compatibility.
RNC rework details from Jeff Skirvin:
In the controller, devices as they appear on a SAS domain (or
direct-attached SATA devices) are represented by memory structures known
as "Remote Node Contexts" (RNCs). These structures are transferred from
main memory to the controller using a set of register commands; these
commands include setting up the context ("posting"), removing the
context ("invalidating"), and commands to control the scheduling of
commands and connections to that remote device ("suspensions" and
"resumptions"). There is a similar path to control RNC scheduling from
the protocol engine, which interprets the results of command and data
transmission and reception.
In general, the controller chooses among non-suspended RNCs to find one
that has work requiring scheduling the transmission of command and data
frames to a target. Likewise, when a target tries to return data back
to the initiator, the state of the RNC is used by the controller to
determine how to treat the incoming request. As an example, if the RNC
is in the state "TX/RX Suspended", incoming SSP connection requests from
the target will be rejected by the controller hardware. When an RNC is
"TX Suspended", it will not be selected by the controller hardware to
start outgoing command or data operations (with certain priority-based
exceptions).
As mentioned above, there are two sources for management of the RNC
states: commands from driver software, and the result of transmission
and reception conditions of commands and data signaled by the controller
hardware. As an example of the latter, if an outgoing SSP command ends
with a OPEN_REJECT(BAD_DESTINATION) status, the RNC state will
transition to the "TX Suspended" state, and this is signaled by the
controller hardware in the status to the completion of the pending
command as well as signaled in a controller hardware event. Examples of
the former are included in the patch changelogs.
Driver software is required to suspend the RNC in a "TX/RX Suspended"
condition before any outstanding commands can be terminated. Failure to
guarantee this can lead to a complete hardware hang condition. Earlier
versions of the driver software did not guarantee that an RNC was
correctly managed before I/O termination, and so operated in an unsafe
way.
Further, the driver performed unnecessary contortions to preserve the
remote device command state and so was more complicated than it needed
to be. A simplifying driver assumption is that once an I/O has entered
the error handler path without having completed in the target, the
requirement on the driver is that all use of the sas_task must end.
Beyond that, recovery of operation is dependent on libsas and other
components to reset, rediscover and reconfigure the device before normal
operation can restart. In the driver, this simplifying assumption meant
that the RNC management could be reduced to entry into the suspended
state, terminating the targeted I/O request, and resuming the RNC as
needed for device-specific management such as an SSP Abort Task or LUN
Reset Management request.
Thomas Gleixner [Mon, 21 May 2012 09:08:02 +0000 (11:08 +0200)]
hexagon: Remove select of not longer existing Kconfig switches
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Thomas Gleixner [Mon, 21 May 2012 09:06:17 +0000 (11:06 +0200)]
arm: Select core options instead of redefining them
HARDIRQS_SW_RESEND and GENERIC_IRQ_PROBE are already defined as config
switches in the core Kconfig file. Select them instead of defining
them in ARM.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Djalal Harouni [Sun, 20 May 2012 13:55:30 +0000 (13:55 +0000)]
drivers/net/stmmac: seq_file fix memory leak
Use single_release() instead of seq_release() to free memory allocated
by single_open().
Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Steven Miao [Wed, 16 May 2012 07:54:31 +0000 (15:54 +0800)]
blackfin: fix build after add bf60x mach/pm.h
Signed-off-by: Steven Miao <realmz6@gmail.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
Sonic Zhang [Wed, 16 May 2012 10:10:27 +0000 (18:10 +0800)]
blackfin: twi: include linux/i2c.h
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
Sonic Zhang [Thu, 17 May 2012 09:51:37 +0000 (17:51 +0800)]
blackfin: bf60x: add head file for crc controller
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
Sonic Zhang [Tue, 15 May 2012 08:20:33 +0000 (16:20 +0800)]
blackfin: bf60x: twi: work around temporary anomaly
0501001
Disable IRQ when reading MMR rcv_data8 and rcv_data16.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
Sonic Zhang [Tue, 15 May 2012 07:54:26 +0000 (15:54 +0800)]
blackfin: twi: Move TWI MMR access macro to twi head file
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
Sonic Zhang [Tue, 15 May 2012 07:25:50 +0000 (15:25 +0800)]
blackfin: twi: Move TWI peripheral pin request array to platform data
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
Sonic Zhang [Tue, 15 May 2012 06:17:35 +0000 (14:17 +0800)]
blackfin: bf60x: anomaly: Add a temporary anomaly
0501001
Add a temporary anomaly
0501001 for data loss in MMR reading if interrupted.
Add work around for bfin serial driver as well.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
Sonic Zhang [Tue, 15 May 2012 05:04:24 +0000 (13:04 +0800)]
blackfin: bf60x: Rename the DDR controller macro
Rename the DDR controller macro from DDR0 to DMC0 to avoid confustion for
bf60x.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
Steven Miao [Thu, 17 May 2012 09:38:09 +0000 (17:38 +0800)]
blackfin: mach-bf609: pm: cleanup bfin_deepsleep
In bfin_deepsleep(), using register instead of local variable and remove
unused dpmc register read.
Signed-off-by: Steven Miao <realmz6@gmail.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
Sonic Zhang [Thu, 17 May 2012 09:35:24 +0000 (17:35 +0800)]
blackfin: bf60x: cleanup get clock code
Remove redundance code for get clock.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>