aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-05-08if_cablemodem.h: Add parenthesis around ioctl macrosJosh Boyer1-6/+6
Protect the SIOCGCM* ioctl macros with parenthesis. Reported-by: Paul Wouters <[email protected]> Signed-off-by: Josh Boyer <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-05-08gso: Handle Trans-Ether-Bridging protocol in skb_network_protocol()Pravin B Shelar3-10/+13
Rather than having logic to calculate inner protocol in every tunnel gso handler move it to gso code. This simplifies code. Cc: Eric Dumazet <[email protected]> Cc: Cong Wang <[email protected]> Cc: David S. Miller <[email protected]> Signed-off-by: Pravin B Shelar <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-05-08net: fec: fix kernel oops when plug/unplug cable many timesFrank Li2-15/+39
reproduce steps 1. flood ping from other machine ping -f -s 41000 IP 2. run below script while [ 1 ]; do ethtool -s eth0 autoneg off; sleep 3;ethtool -s eth0 autoneg on; sleep 4; done; You can see oops in one hour. The reason is fec_restart clear BD but NAPI may use it. The solution is disable NAPI and stop xmit when reset BD. disable NAPI may sleep, so fec_restart can't be call in atomic context. Signed-off-by: Frank Li <[email protected]> Reviewed-by: Lucas Stach <[email protected]> Tested-by: Lucas Stach <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-05-08bfin_mac: fix error return code in bfin_mac_probe()Wei Yongjun1-1/+2
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-05-08sfc: fix return value check in efx_ptp_probe_channel()Wei Yongjun1-1/+3
In case of error, the function ptp_clock_register() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun <[email protected]> Reviewed-by: Ben Hutchings <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-05-08net/spider_net: fix error return code in spider_net_open()Wei Yongjun1-1/+2
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-05-08net/irda: fix error return code in bfin_sir_open()Wei Yongjun1-2/+4
Fix to return -ENOMEM in the irlap_open() error handling case instead of 0(overwrite to 0 by bfin_sir_startup()), as done elsewhere in this function. Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-05-08net: of_mdio: fix behavior on missing phy deviceSebastian Hesselbarth1-7/+4
of_mdiobus_register creates a phy_device even if get_phy_device failed to create it previously. This causes indefinite polling on non-existent PHYs. This fix makes of_mdio_register rely on get_phy_device to properly create the device or fail otherwise. Signed-off-by: Sebastian Hesselbarth <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-05-08sierra_net: keep status interrupt URB activeDan Williams1-7/+31
The driver and firmware sync up through SYNC messages, and the firmware's affirmative reply to these SYNC messages appears to be the "Reset" indication received via the status interrupt endpoint. Thus the driver needs the status interrupt endpoint always active so that the Reset indication can be received even if the netdev is closed, which is the case right after device insertion. If the Reset indication is not received by the driver, it continues sending SYNC messages to the firmware, which crashes about 10 seconds later and the device stops responding. Signed-off-by: Dan Williams <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-05-08usbnet: allow status interrupt URB to always be activeDan Williams2-6/+76
Some drivers (sierra_net) need the status interrupt URB active even when the device is closed, because they receive custom indications from firmware. Add functions to refcount the status interrupt URB submit/kill operation so that sub-drivers and the generic driver don't fight over whether the status interrupt URB is active or not. A sub-driver can call usbnet_status_start() at any time, but the URB is only submitted the first time the function is called. Likewise, when the sub-driver is done with the URB, it calls usbnet_status_stop() but the URB is only killed when all users have stopped it. The URB is still killed and re-submitted for suspend/resume, as before, with the same refcount it had at suspend. Signed-off-by: Dan Williams <[email protected]> Acked-by: Oliver Neukum <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-05-08qmi_wwan/cdc_ether: add device IDs for Dell 5804 (Novatel E371) WWAN cardDan Williams2-0/+14
A rebranded Novatel E371 for AT&T's LTE bands. qmi_wwan should drive this device, while cdc_ether should ignore it. Even though the USB descriptors are plain CDC-ETHER that USB interface is a QMI interface. Cc: <[email protected]> Signed-off-by: Dan Williams <[email protected]> Acked-by: Bjørn Mork <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-05-08be2net: disable TX in be_close()Sathya Perla1-0/+2
be_close() followed by be_clear() is called as a part of cleanup in the EEH/AER flow. This patch stops TX in be_close() before cleaning/freeing up the TX queues in be_clear(). This prevents be_xmit() from being called while TX queues no longer exist. Signed-off-by: Sathya Perla <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-05-08be2net: fix EQ from getting full while cleaning RX CQSathya Perla1-6/+1
While cleaning RX queues, the CQ DB may be rung several times (with rearm) while waiting for the flush compl. Each CQ-notify with rearm can result in an event. The EQ may get full resulting in a HW error. Fix this by not re-arming the CQ while notifying a valid completion. Also, there's no need to wait for 1ms after destroying RXQ, as the code in be_rx_cq_clean() waits for the flush compl to arrive. Signed-off-by: Sathya Perla <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-05-08be2net: fix payload_len value for GET_MAC_LIST cmd reqSathya Perla1-3/+2
The buffer size for a FW cmd request must be big enough to fit the response, else the cmd fails. For GET_MAC_LIST cmd, though the memory allocated for the cmd is big enough to fit the response, the payload_len value in the WRB hdr is being set to the request length only. Fix this for GET_MAC_LIST cmd. Signed-off-by: Sathya Perla <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-05-08be2net: provision VF resources before enabling SR-IOVSathya Perla1-8/+13
When the PF driver calls pci_enable_sriov(), the VFs may be probed inline before the call returns. So, the resources required for all VFs must be provisioned by the PF driver *before* calling pci_enable_sriov(); else, VF probe will fail. Signed-off-by: Sathya Perla <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-05-08Merge branch 'for-3.10/drivers' of git://git.kernel.dk/linux-blockLinus Torvalds62-372/+17681
Pull block driver updates from Jens Axboe: "It might look big in volume, but when categorized, not a lot of drivers are touched. The pull request contains: - mtip32xx fixes from Micron. - A slew of drbd updates, this time in a nicer series. - bcache, a flash/ssd caching framework from Kent. - Fixes for cciss" * 'for-3.10/drivers' of git://git.kernel.dk/linux-block: (66 commits) bcache: Use bd_link_disk_holder() bcache: Allocator cleanup/fixes cciss: bug fix to prevent cciss from loading in kdump crash kernel cciss: add cciss_allow_hpsa module parameter drivers/block/mg_disk.c: add CONFIG_PM_SLEEP to suspend/resume functions mtip32xx: Workaround for unaligned writes bcache: Make sure blocksize isn't smaller than device blocksize bcache: Fix merge_bvec_fn usage for when it modifies the bvm bcache: Correctly check against BIO_MAX_PAGES bcache: Hack around stuff that clones up to bi_max_vecs bcache: Set ra_pages based on backing device's ra_pages bcache: Take data offset from the bdev superblock. mtip32xx: mtip32xx: Disable TRIM support mtip32xx: fix a smatch warning bcache: Disable broken btree fuzz tester bcache: Fix a format string overflow bcache: Fix a minor memory leak on device teardown bcache: Documentation updates bcache: Use WARN_ONCE() instead of __WARN() bcache: Add missing #include <linux/prefetch.h> ...
2013-05-08rtc: rtc-tile: add missing platform_device_unregister() when module exitWei Yongjun1-0/+1
We have registered platform device when module init, and need unregister it when module exit. Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Chris Metcalf <[email protected]>
2013-05-08pstore/ram: fix error return code in ramoops_probe()Wei Yongjun1-0/+2
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <[email protected]> Acked-by: Kees Cook <[email protected]> Signed-off-by: Tony Luck <[email protected]>
2013-05-08Merge branch 'for-3.10/core' of git://git.kernel.dk/linux-blockLinus Torvalds50-956/+1000
Pull block core updates from Jens Axboe: - Major bit is Kents prep work for immutable bio vecs. - Stable candidate fix for a scheduling-while-atomic in the queue bypass operation. - Fix for the hang on exceeded rq->datalen 32-bit unsigned when merging discard bios. - Tejuns changes to convert the writeback thread pool to the generic workqueue mechanism. - Runtime PM framework, SCSI patches exists on top of these in James' tree. - A few random fixes. * 'for-3.10/core' of git://git.kernel.dk/linux-block: (40 commits) relay: move remove_buf_file inside relay_close_buf partitions/efi.c: replace useless kzalloc's by kmalloc's fs/block_dev.c: fix iov_shorten() criteria in blkdev_aio_read() block: fix max discard sectors limit blkcg: fix "scheduling while atomic" in blk_queue_bypass_start Documentation: cfq-iosched: update documentation help for cfq tunables writeback: expose the bdi_wq workqueue writeback: replace custom worker pool implementation with unbound workqueue writeback: remove unused bdi_pending_list aoe: Fix unitialized var usage bio-integrity: Add explicit field for owner of bip_buf block: Add an explicit bio flag for bios that own their bvec block: Add bio_alloc_pages() block: Convert some code to bio_for_each_segment_all() block: Add bio_for_each_segment_all() bounce: Refactor __blk_queue_bounce to not use bi_io_vec raid1: use bio_copy_data() pktcdvd: Use bio_reset() in disabled code to kill bi_idx usage pktcdvd: use bio_copy_data() block: Add bio_copy_data() ...
2013-05-08NVMe: Simplify Firmware Activate code slightlyMatthew Wilcox2-4/+5
Add definitions for the three Firmware Activate actions, and change the SCSI translation code to construct the command into a temporary variable instead of translating the endianness back-and-forth. Signed-off-by: Matthew Wilcox <[email protected]> Reviewed-by: Vishal Verma <[email protected]>
2013-05-08NVMe: Only clear the enable bit when disabling controllerMatthew Wilcox1-1/+4
Many of the bits in the Controller Configuration register may only be modified when the Enable bit is clear. Clearing them at the same time as the Enable bit might be OK, but let's play it safe and only touch the Enable bit. Signed-off-by: Matthew Wilcox <[email protected]> Reviewed-by: Keith Busch <[email protected]>
2013-05-08NVMe: Wait for device to acknowledge shutdownMatthew Wilcox1-19/+46
A recent update to the specification makes it clear that the host is expected to wait for the device to acknowledge the Enable bit transitioning to 0 as well as waiting for the device to acknowledge a transition to 1. Reported-by: Khosrow Panah <[email protected]> Signed-off-by: Matthew Wilcox <[email protected]> Reviewed-by: Keith Busch <[email protected]>
2013-05-08ALSA: Add comment for control TLV APIDavid Henningsson1-1/+5
Userspace is not meant to have to handle all strange dB ranges, so add a specification comment. Signed-off-by: David Henningsson <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-05-08ACPICA: ACPICA: Fix for _INI regressionTomasz Nowicki1-0/+1
This change fixes a problem introduced by recent commit c34c82b (ACPICA: Predefine names: Add allowed argument types to master info table) in 20130328 where _INI methods are no longer executed properly because of a memory block that is not initialized properly. ACPICA BZ1016. Tomasz Nowicki <[email protected]> References: https://bugs.acpica.org/show_bug.cgi?id=1016 Signed-off-by: Tomasz Nowicki <[email protected]> Signed-off-by: Bob Moore <[email protected]> Signed-off-by: Lv Zheng <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2013-05-08ACPICA: _OSI support: Fix possible memory leakJung-uk Kim1-1/+2
Fixes a possible memory leak in the error exit path introduced by recent commit 388a990 ("ACPICA: _OSI Support: handle any errors from acpi_os_acquire_mutex()"). [rjw: Changelog] Signed-off-by: Jung-uk Kim <[email protected]> Signed-off-by: Bob Moore <[email protected]> Signed-off-by: Lv Zheng <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2013-05-08ACPICA: Fix possible buffer overflow during a field unit read operationBob Moore1-1/+13
Can only happen under these conditions: 1) The DSDT version is 1, meaning integers are 32-bits. 2) The field is between 33 and 64 bits long. It applies cleanly back to ACPICA 20100806+ (Linux v2.6.37+). Signed-off-by: Bob Moore <[email protected]> Signed-off-by: Lv Zheng <[email protected]> Cc: 2.6.37+ <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2013-05-08xen: clear IRQ_NOAUTOEN and IRQ_NOREQUESTJulien Grall1-1/+2
Reset the IRQ_NOAUTOEN and IRQ_NOREQUEST flags that are enabled by default on ARM. If IRQ_NOAUTOEN is set, __setup_irq doesn't call irq_startup, that is responsible for calling irq_unmask at startup time. As a result event channels remain masked. The clear is already made in bind_evtchn_to_irq with commit a8636c0 but was missing on all others bind_*_to_irq. Move the clear in xen_irq_info_common_init. On x86, IRQ_NOAUTOEN and IRQ_NOREQUEST are cleared by default, so this commit doesn't impact this architecture. Acked-by: Stefano Stabellini <[email protected]> Signed-off-by: Julien Grall <[email protected]> Signed-off-by: Konrad Rzeszutek Wilk <[email protected]>
2013-05-08xen: mask x2APIC feature in PVZhenzhong Duan1-0/+3
On x2apic enabled pvm, doing sysrq+l, got NULL pointer dereference as below. SysRq : Show backtrace of all active CPUs BUG: unable to handle kernel NULL pointer dereference at (null) IP: [<ffffffff8125e3cb>] memcpy+0xb/0x120 Call Trace: [<ffffffff81039633>] ? __x2apic_send_IPI_mask+0x73/0x160 [<ffffffff8103973e>] x2apic_send_IPI_all+0x1e/0x20 [<ffffffff8103498c>] arch_trigger_all_cpu_backtrace+0x6c/0xb0 [<ffffffff81501be4>] ? _raw_spin_lock_irqsave+0x34/0x50 [<ffffffff8131654e>] sysrq_handle_showallcpus+0xe/0x10 [<ffffffff8131616d>] __handle_sysrq+0x7d/0x140 [<ffffffff81316230>] ? __handle_sysrq+0x140/0x140 [<ffffffff81316287>] write_sysrq_trigger+0x57/0x60 [<ffffffff811ca996>] proc_reg_write+0x86/0xc0 [<ffffffff8116dd8e>] vfs_write+0xce/0x190 [<ffffffff8116e3e5>] sys_write+0x55/0x90 [<ffffffff8150a242>] system_call_fastpath+0x16/0x1b That's because apic points to apic_x2apic_cluster or apic_x2apic_phys but the basic element like cpumask isn't initialized. Mask x2APIC feature in pvm to avoid overwrite of apic pointer, update commit message per Konrad's suggestion. Signed-off-by: Zhenzhong Duan <[email protected]> Tested-by: Tamon Shiose <[email protected]> Signed-off-by: Konrad Rzeszutek Wilk <[email protected]>
2013-05-08xen: SWIOTLB is only used on x86Arnd Bergmann1-1/+1
Enabling SWIOTLB_XEN on ARM results in build errors because the underlying SWIOTLB is only available on X86: drivers/xen/swiotlb-xen.c: In function 'is_xen_swiotlb_buffer': drivers/xen/swiotlb-xen.c:105:2: error: implicit declaration of function 'mfn_to_local_pfn Cc: Konrad Rzeszutek Wilk <[email protected]> Acked-by: Stefano Stabellini <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Konrad Rzeszutek Wilk <[email protected]>
2013-05-08xen/spinlock: Fix check from greater than to be also be greater or equal to.Konrad Rzeszutek Wilk1-1/+1
During review of git commit cb9c6f15f318aa3aeb62fe525aa5c6dcf6eee159 ("xen/spinlock: Check against default value of -1 for IRQ line.") Stefano pointed out a bug in the patch. Unfortunatly due to vacation timing the fix was not applied and this patch fixes it up. Acked-by: Stefano Stabellini <[email protected]> Signed-off-by: Konrad Rzeszutek Wilk <[email protected]>
2013-05-08xen/smp/pvhvm: Don't point per_cpu(xen_vpcu, 33 and larger) to shared_infoKonrad Rzeszutek Wilk1-0/+3
As it will point to some data, but not event channel data (the shared_info has an array limited to 32). This means that for PVHVM guests with more than 32 VCPUs without the usage of VCPUOP_register_info any interrupts to VCPUs larger than 32 would have gone unnoticed during early bootup. That is OK, as during early bootup, in smp_init we end up calling the hotplug mechanism (xen_hvm_cpu_notify) which makes the VCPUOP_register_vcpu_info call for all VCPUs and we can receive interrupts on VCPUs 33 and further. This is just a cleanup. Acked-by: Stefano Stabellini <[email protected]> Signed-off-by: Konrad Rzeszutek Wilk <[email protected]>
2013-05-08f2fs: cover free_nid management with spin_lockJaegeuk Kim1-16/+18
After build_free_nids() searches free nid candidates from nat pages and current journal blocks, it checks all the candidates if they are allocated so that the nat cache has its nid with an allocated block address. In this procedure, previously we used list_for_each_entry_safe(fnid, next_fnid, &nm_i->free_nid_list, list). But, this is not covered by free_nid_list_lock, resulting in null pointer bug. This patch moves this checking routine inside add_free_nid() in order not to use the spin_lock. Signed-off-by: Jaegeuk Kim <[email protected]>
2013-05-08f2fs: optimize scan_nat_page()Haicheng Li1-5/+9
When nm_i->fcnt > 2 * MAX_FREE_NIDS, stop scanning other NAT entries. Signed-off-by: Haicheng Li <[email protected]> [Jaegeuk Kim: fix handling the return value of add_free_nid()] Signed-off-by: Jaegeuk Kim <[email protected]>
2013-05-08f2fs: code cleanup for scan_nat_page() and build_free_nids()Haicheng Li1-6/+4
This patch does two cleanups: 1. remove unused variable "fcnt" in build_free_nids(). 2. make scan_nat_page() as void type and remove useless variable "fcnt". Signed-off-by: Haicheng Li <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
2013-05-08f2fs: bugfix for alloc_nid_failed()Haicheng Li1-2/+6
Directly drop the free_nid cache when nm_i->fcnt > 2 * MAX_FREE_NIDS Since there is NOT nmi->free_nid_list_lock spinlock protection between a sequential calling of alloc_nid() and alloc_nid_failed(), some other threads may already add new free_nid to the free_nid_list during this period. We need to make sure nmi->fcnt is never > 2 * MAX_FREE_NIDS. Signed-off-by: Haicheng Li <[email protected]> [Jaegeuk Kim: fit the coding style] Signed-off-by: Jaegeuk Kim <[email protected]>
2013-05-08f2fs: recover when journal contains deleted filesChris Fries1-2/+6
When recovering a journal file with fsync data for files that have been deleted, don't bail out on recovery. Signed-off-by: Chris Fries <[email protected]> Reviewed-by: Russell Knize <[email protected]> Reviewed-by: Jason Hrycay <[email protected]> [Jaegeuk Kim: fit the coding style] Signed-off-by: Jaegeuk Kim <[email protected]>
2013-05-08f2fs: continue to mount after failing recoveryChris Fries1-4/+3
When unable to roll forward the journal, we shouldn't bail out and not mount, we should continue to attempt the mount. Bad recovery data is likely unrecoverable at this point, and requiring the user to try to mount again doesn't solve any issues. Signed-off-by: Chris Fries <[email protected]> Reviewed-by: Russell Knize <[email protected]> Reviewed-by: Jason Hrycay <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
2013-05-08f2fs: avoid deadlock during evict after f2fs_gcJaegeuk Kim3-2/+26
o Deadlock case #1 Thread 1: - writeback_sb_inodes - do_writepages - f2fs_write_data_pages - write_cache_pages - f2fs_write_data_page - f2fs_balance_fs - wait mutex_lock(gc_mutex) Thread 2: - f2fs_balance_fs - mutex_lock(gc_mutex) - f2fs_gc - f2fs_iget - wait iget_locked(inode->i_lock) Thread 3: - do_unlinkat - iput - lock(inode->i_lock) - evict - inode_wait_for_writeback o Deadlock case #2 Thread 1: - __writeback_single_inode : set I_SYNC - do_writepages - f2fs_write_data_page - f2fs_balance_fs - f2fs_gc - iput - evict - inode_wait_for_writeback(I_SYNC) In order to avoid this, even though iput is called with the zero-reference count, we need to stop the eviction procedure if the inode is on writeback. So this patch links f2fs_drop_inode which checks the I_SYNC flag. Signed-off-by: Jaegeuk Kim <[email protected]>
2013-05-08MIPS: microMIPS: Support dynamic ASID sizing.Steven J. Hill1-2/+32
Changes for pure microMIPS cores to dynamically determine the ASID size at boot time. Includes bug fix https://patchwork.linux-mips.org/patch/5230/ Signed-off-by: Steven J. Hill <[email protected]> Signed-off-by: Jonas Gorski <[email protected]>
2013-05-08MIPS: Allow ASID size to be determined at boot time.Steven J. Hill10-61/+137
Original patch by Ralf Baechle and removed by Harold Koerfgen with commit f67e4ffc79905482c3b9b8c8dd65197bac7eb508. This allows for more generic kernels since the size of the ASID and corresponding masks can be determined at run-time. This patch is also required for the new Aptiv cores and has been tested on Malta and Malta Aptiv platforms. [[email protected]: Added relevant part of fix https://patchwork.linux-mips.org/patch/5213/] Signed-off-by: Steven J. Hill <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2013-05-08MIPS: FW: malta: Code formatting clean-ups.Steven J. Hill4-88/+64
Clean-up code according to the 'checkpatch.pl' script. Signed-off-by: Steven J. Hill <[email protected]>
2013-05-08MIPS: FW: Remove obsolete header file for MTI platforms.Steven J. Hill14-61/+4
Remove 'arch/mips/include/asm/mips-boards/prom.h' and get rid of all inclusions of it by Malta and SEAD-3 platforms. [[email protected]: Fold in John Crispin <[email protected]>'s "MIPS: ar7 powertv build"]. [[email protected]: Fold in John Crispin <[email protected]>'s "MIPS: unbreak powertv build"]. [[email protected]: Test. Build. Your. Fscking. Code. Or...] Signed-off-by: Steven J. Hill <[email protected]>
2013-05-08MIPS: FW: malta: Use new common FW library variable processing.Steven J. Hill5-199/+28
Remove old YAMON prom code and use common firmware library code. Signed-off-by: Steven J. Hill <[email protected]>
2013-05-08MIPS: FW: sead3: Use new common FW library variable processing.Steven J. Hill4-86/+51
Remove old YAMON prom code and use common firmware library code. Signed-off-by: Steven J. Hill <[email protected]>
2013-05-08MIPS: FW: Add environment variable processing.Steven J. Hill3-0/+150
Add parsing of the environment and command line variables passed to the kernel to the firmware library. Signed-off-by: Steven J. Hill <[email protected]>
2013-05-08MIPS: Add declarations to MIPS Technologies Inc. generic header.Steven J. Hill1-0/+3
Add declaration of 'mips_scroll_message' and 'mips_display_message' to the common generic header file for the MIPS Technologies Inc. development boards. Signed-off-by: Steven J. Hill <[email protected]>
2013-05-08MIPS: sead3: Use generic suspend/resume for LEDs.Lars-Peter Clausen1-22/+2
Setting the LED_CORE_SUSPENDRESUME flag causes the LED driver core to call led_classdev_suspend/led_classdev_resume during suspend/resume. Since this is exactly what the driver's custom suspend/resume callbacks do we can replace them by setting the LED_CORE_SUSPENDRESUME flag. Signed-off-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Steven J. Hill <[email protected]>
2013-05-08KVM: Fix kvm_irqfd_init initializationAsias He1-5/+13
In commit a0f155e96 'KVM: Initialize irqfd from kvm_init()', when kvm_init() is called the second time (e.g kvm-amd.ko and kvm-intel.ko), kvm_arch_init() will fail with -EEXIST, then kvm_irqfd_exit() will be called on the error handling path. This way, the kvm_irqfd system will not be ready. This patch fix the following: BUG: unable to handle kernel NULL pointer dereference at (null) IP: [<ffffffff81c0721e>] _raw_spin_lock+0xe/0x30 PGD 0 Oops: 0002 [#1] SMP Modules linked in: vhost_net CPU 6 Pid: 4257, comm: qemu-system-x86 Not tainted 3.9.0-rc3+ #757 Dell Inc. OptiPlex 790/0V5HMK RIP: 0010:[<ffffffff81c0721e>] [<ffffffff81c0721e>] _raw_spin_lock+0xe/0x30 RSP: 0018:ffff880221721cc8 EFLAGS: 00010046 RAX: 0000000000000100 RBX: ffff88022dcc003f RCX: ffff880221734950 RDX: ffff8802208f6ca8 RSI: 000000007fffffff RDI: 0000000000000000 RBP: ffff880221721cc8 R08: 0000000000000002 R09: 0000000000000002 R10: 00007f7fd01087e0 R11: 0000000000000246 R12: ffff8802208f6ca8 R13: 0000000000000080 R14: ffff880223e2a900 R15: 0000000000000000 FS: 00007f7fd38488e0(0000) GS:ffff88022dcc0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 000000022309f000 CR4: 00000000000427e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process qemu-system-x86 (pid: 4257, threadinfo ffff880221720000, task ffff880222bd5640) Stack: ffff880221721d08 ffffffff810ac5c5 ffff88022431dc00 0000000000000086 0000000000000080 ffff880223e2a900 ffff8802208f6ca8 0000000000000000 ffff880221721d48 ffffffff810ac8fe 0000000000000000 ffff880221734000 Call Trace: [<ffffffff810ac5c5>] __queue_work+0x45/0x2d0 [<ffffffff810ac8fe>] queue_work_on+0x8e/0xa0 [<ffffffff810ac949>] queue_work+0x19/0x20 [<ffffffff81009b6b>] irqfd_deactivate+0x4b/0x60 [<ffffffff8100a69d>] kvm_irqfd+0x39d/0x580 [<ffffffff81007a27>] kvm_vm_ioctl+0x207/0x5b0 [<ffffffff810c9545>] ? update_curr+0xf5/0x180 [<ffffffff811b66e8>] do_vfs_ioctl+0x98/0x550 [<ffffffff810c1f5e>] ? finish_task_switch+0x4e/0xe0 [<ffffffff81c054aa>] ? __schedule+0x2ea/0x710 [<ffffffff811b6bf7>] sys_ioctl+0x57/0x90 [<ffffffff8140ae9e>] ? trace_hardirqs_on_thunk+0x3a/0x3c [<ffffffff81c0f602>] system_call_fastpath+0x16/0x1b Code: c1 ea 08 38 c2 74 0f 66 0f 1f 44 00 00 f3 90 0f b6 03 38 c2 75 f7 48 83 c4 08 5b c9 c3 55 48 89 e5 66 66 66 66 90 b8 00 01 00 00 <f0> 66 0f c1 07 89 c2 66 c1 ea 08 38 c2 74 0c 0f 1f 00 f3 90 0f RIP [<ffffffff81c0721e>] _raw_spin_lock+0xe/0x30 RSP <ffff880221721cc8> CR2: 0000000000000000 ---[ end trace 13fb1e4b6e5ab21f ]--- Signed-off-by: Asias He <[email protected]> Acked-by: Cornelia Huck <[email protected]> Signed-off-by: Gleb Natapov <[email protected]>
2013-05-08KVM: x86: fix maintenance of guest/host xcr0 stateMarcelo Tosatti1-20/+20
Emulation of xcr0 writes zero guest_xcr0_loaded variable so that subsequent VM-entry reloads CPU's xcr0 with guests xcr0 value. However, this is incorrect because guest_xcr0_loaded variable is read to decide whether to reload hosts xcr0. In case the vcpu thread is scheduled out after the guest_xcr0_loaded = 0 assignment, and scheduler decides to preload FPU: switch_to { __switch_to __math_state_restore restore_fpu_checking fpu_restore_checking if (use_xsave()) fpu_xrstor_checking xrstor64 with CPU's xcr0 == guests xcr0 Fix by properly restoring hosts xcr0 during emulation of xcr0 writes. Analyzed-by: Ulrich Obergfell <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]> Reviewed-by: Paolo Bonzini <[email protected]> Signed-off-by: Gleb Natapov <[email protected]>
2013-05-08arm64: Treat the bitops index argument as an 'int'Catalin Marinas1-5/+5
The bitops prototype use an 'int' as the bit index type but the asm implementation assume it to be a 'long'. Since the compiler does not guarantee zeroing the upper 32-bits in a register when used as 'int', change the bitops implementation accordingly. Signed-off-by: Catalin Marinas <[email protected]>