]> www.infradead.org Git - users/jedix/linux-maple.git/log
users/jedix/linux-maple.git
13 years agoqla2xxx: handle default case in qla2x00_request_firmware()
Dan Carpenter [Fri, 24 Feb 2012 17:02:01 +0000 (11:02 -0600)]
qla2xxx: handle default case in qla2x00_request_firmware()

This silences a static checker warning.  Also we're always adding new types of
firmware, so it might fix a bug in real life some day.

JIRA Key: V2632FC-177

13 years agoqla2xxx: Fix reset time out as qla2xxx not ack to reset request.
Vikas Chaudhary [Thu, 23 Feb 2012 20:11:58 +0000 (14:11 -0600)]
qla2xxx: Fix reset time out as qla2xxx not ack to reset request.

JIRA Key: V2632FC-176

13 years agoqla2xxx: Fix typo in qla_mbx.c
Masanari Iida [Thu, 23 Feb 2012 19:47:16 +0000 (13:47 -0600)]
qla2xxx: Fix typo in qla_mbx.c

Correct spelling "occured" to "occurred" in
drivers/scsi/qla2xxx/qla_mbx.c

JIRA Key: V2632FC-175

13 years agoqla2xxx: Micro optimization in queuecommand handler
Chetan Loke [Thu, 16 Feb 2012 19:34:56 +0000 (13:34 -0600)]
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.

JIRA Key: V2632FC-172

13 years agoqla2xxx: Fix typo in qla_init.c
Raul Porcel [Thu, 16 Feb 2012 19:19:08 +0000 (13:19 -0600)]
qla2xxx: Fix typo in qla_init.c

Replace "Inconisistent" with "Inconsistent" in drivers/scsi/qla2xxx/qla_init.c

JIRA Key: V2632FC-171

13 years agoqla2xxx: Fix typo in qla_bsg.c
Masanari Iida [Tue, 7 Feb 2012 14:40:21 +0000 (08:40 -0600)]
qla2xxx: Fix typo in qla_bsg.c

JIRA Key: V2632FC-170

13 years agoqla2xxx: Stats should be different from physical and virtual ports
Saurav Kashyap [Wed, 1 Feb 2012 10:06:00 +0000 (15:36 +0530)]
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.

JIRA Key: V2632FC-111

13 years agoqla2xxx: Add ql_dbg_verbose logging level.
Saurav Kashyap [Thu, 19 Jul 2012 08:03:54 +0000 (13:33 +0530)]
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.

JIRA Key: V2632FC-158

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
13 years agoqla2xxx: Block flash access from application when device is initialized for ISP82xx.
Giridhar Malavali [Fri, 27 Jan 2012 15:09:15 +0000 (09:09 -0600)]
qla2xxx: Block flash access from application when device is initialized for ISP82xx.

This could lead to CRB initialization failures or as fail to capture minidump
data. So access to flash needs to be avoided when device is doing reset for
ISP82xx.

JIRA Key: V2632FC-148

13 years agoqla2xxx: Handle interrupt registration failures more gracefully.
Chad Dupuis [Tue, 6 Dec 2011 19:53:04 +0000 (14:53 -0500)]
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.

JIRA Key: V2632FC-155

13 years agoqla2xxx: Change "Done" to "Entering" in the debug print statement in qla2x00_port_logout.
Chad Dupuis [Mon, 23 Jan 2012 13:38:11 +0000 (07:38 -0600)]
qla2xxx: Change "Done" to "Entering" in the debug print statement in qla2x00_port_logout.

JIRA Key: V2632FC-157

13 years agoqla2xxx: Logic to detect overheat condition and fail ISP82xx.
Giridhar Malavali [Thu, 19 Jul 2012 07:55:43 +0000 (13:25 +0530)]
qla2xxx: Logic to detect overheat condition and fail ISP82xx.

JIRA Key: V2632FC-79

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
13 years agoqla2xxx: Encapsulate prematurely completing mailbox commands during ISP82xx firmware...
Chad Dupuis [Thu, 19 Jul 2012 07:43:24 +0000 (13:13 +0530)]
qla2xxx: Encapsulate prematurely completing mailbox commands during ISP82xx firmware hang.

JIRA Key: V2632FC-81

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
13 years agoqla2xxx: Remove unneeded DPC wakeups from qla82xx_watchdog.
Chad Dupuis [Thu, 19 Jul 2012 07:19:21 +0000 (12:49 +0530)]
qla2xxx: Remove unneeded DPC wakeups from qla82xx_watchdog.

JIRA Key: V2632FC-116

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
13 years agoMerge branch 'uek2-merge' of git://ca-git.us.oracle.com/linux-konrad-public
Maxim Uvarov [Fri, 20 Jul 2012 15:14:03 +0000 (08:14 -0700)]
Merge branch 'uek2-merge' of git://ca-git.us.oracle.com/linux-konrad-public

Conflicts:
arch/x86/xen/enlighten.c

13 years agoxen/setup: filter APERFMPERF cpuid feature out
Andre Przywara [Tue, 29 May 2012 11:07:31 +0000 (13:07 +0200)]
xen/setup: filter APERFMPERF cpuid feature out

Xen PV kernels allow access to the APERF/MPERF registers to read the
effective frequency. Access to the MSRs is however redirected to the
currently scheduled physical CPU, making consecutive read and
compares unreliable. In addition each rdmsr traps into the hypervisor.
So to avoid bogus readouts and expensive traps, disable the kernel
internal feature flag for APERF/MPERF if running under Xen.
This will
a) remove the aperfmperf flag from /proc/cpuinfo
b) not mislead the power scheduler (arch/x86/kernel/cpu/sched.c) to
   use the feature to improve scheduling (by default disabled)
c) not mislead the cpufreq driver to use the MSRs

This does not cover userland programs which access the MSRs via the
device file interface, but this will be addressed separately.

[upstream git commit 5e626254206a709c6e937f3dda69bf26c7344f6f]
Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Cc: stable@vger.kernel.org # v3.0+
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen/acpi: Fix potential memory leak.
Konrad Rzeszutek Wilk [Tue, 19 Jun 2012 18:39:31 +0000 (14:39 -0400)]
xen/acpi: Fix potential memory leak.

Coverity points out that we do not free in one case the
pr_backup - and sure enough we forgot.

Found by Coverity (CID 401970)

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoMerge branch 'stable/for-linus-3.6.rebased' into uek2-merge
Konrad Rzeszutek Wilk [Thu, 19 Jul 2012 23:09:22 +0000 (19:09 -0400)]
Merge branch 'stable/for-linus-3.6.rebased' into uek2-merge

* stable/for-linus-3.6.rebased:
  xen PVonHVM: move shared_info to MMIO before kexec
  xen: simplify init_hvm_pv_info
  xen: remove cast from HYPERVISOR_shared_info assignment
  xen: enable platform-pci only in a Xen guest
  xen/pv-on-hvm kexec: shutdown watches from old kernel
  Revert "xen/pv-on-hvm kexec: add xs_reset_watches to shutdown watches from old kernel"
  xen/hvc: Fix up checks when the info is allocated.
  xen/mm: zero PTEs for non-present MFNs in the initial page table
  xen/mm: do direct hypercall in xen_set_pte() if batching is unavailable
  xen/x86: add desc_equal() to compare GDT descriptors
  x86/xen: avoid updating TLS descriptors if they haven't changed
  xen: populate correct number of pages when across mem boundary (v2)
  xen/mce: add .poll method for mcelog device driver

Conflicts:
drivers/xen/xenbus/xenbus_xs.c
include/xen/interface/io/xs_wire.h

13 years agoxen PVonHVM: move shared_info to MMIO before kexec
Olaf Hering [Tue, 17 Jul 2012 15:43:35 +0000 (17:43 +0200)]
xen PVonHVM: move shared_info to MMIO before kexec

Currently kexec in a PVonHVM guest fails with a triple fault because the
new kernel overwrites the shared info page. The exact failure depends on
the size of the kernel image. This patch moves the pfn from RAM into
MMIO space before the kexec boot.

The pfn containing the shared_info is located somewhere in RAM. This
will cause trouble if the current kernel is doing a kexec boot into a
new kernel. The new kernel (and its startup code) can not know where the
pfn is, so it can not reserve the page. The hypervisor will continue to
update the pfn, and as a result memory corruption occours in the new
kernel.

One way to work around this issue is to allocate a page in the
xen-platform pci device's BAR memory range. But pci init is done very
late and the shared_info page is already in use very early to read the
pvclock. So moving the pfn from RAM to MMIO is racy because some code
paths on other vcpus could access the pfn during the small   window when
the old pfn is moved to the new pfn. There is even a  small window were
the old pfn is not backed by a mfn, and during that time all reads
return -1.

Because it is not known upfront where the MMIO region is located it can
not be used right from the start in xen_hvm_init_shared_info.

To minimise trouble the move of the pfn is done shortly before kexec.
This does not eliminate the race because all vcpus are still online when
the syscore_ops will be called. But hopefully there is no work pending
at this point in time. Also the syscore_op is run last which reduces the
risk further.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen: simplify init_hvm_pv_info
Olaf Hering [Tue, 17 Jul 2012 09:59:15 +0000 (11:59 +0200)]
xen: simplify init_hvm_pv_info

init_hvm_pv_info is called only in PVonHVM context, move it into ifdef.
init_hvm_pv_info does not fail, make it a void function.
remove arguments from init_hvm_pv_info because they are not used by the
caller.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen: remove cast from HYPERVISOR_shared_info assignment
Olaf Hering [Tue, 17 Jul 2012 09:57:41 +0000 (11:57 +0200)]
xen: remove cast from HYPERVISOR_shared_info assignment

Both have type struct shared_info so no cast is needed.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen: enable platform-pci only in a Xen guest
Olaf Hering [Tue, 10 Jul 2012 13:31:39 +0000 (15:31 +0200)]
xen: enable platform-pci only in a Xen guest

While debugging kexec issues in a PVonHVM guest I modified
xen_hvm_platform() to return false to disable all PV drivers. This
caused a crash in platform_pci_init() because it expects certain data
structures to be initialized properly.

To avoid such a crash make sure the driver is initialized only if
running in a Xen guest.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen/pv-on-hvm kexec: shutdown watches from old kernel
Olaf Hering [Tue, 10 Jul 2012 12:50:03 +0000 (14:50 +0200)]
xen/pv-on-hvm kexec: shutdown watches from old kernel

Add xs_reset_watches function to shutdown watches from old kernel after
kexec boot.  The old kernel does not unregister all watches in the
shutdown path.  They are still active, the double registration can not
be detected by the new kernel.  When the watches fire, unexpected events
will arrive and the xenwatch thread will crash (jumps to NULL).  An
orderly reboot of a hvm guest will destroy the entire guest with all its
resources (including the watches) before it is rebuilt from scratch, so
the missing unregister is not an issue in that case.

With this change the xenstored is instructed to wipe all active watches
for the guest.  However, a patch for xenstored is required so that it
accepts the XS_RESET_WATCHES request from a client (see changeset
23839:42a45baf037d in xen-unstable.hg). Without the patch for xenstored
the registration of watches will fail and some features of a PVonHVM
guest are not available. The guest is still able to boot, but repeated
kexec boots will fail.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoRevert "xen/pv-on-hvm kexec: add xs_reset_watches to shutdown watches from old kernel"
Konrad Rzeszutek Wilk [Thu, 19 Jul 2012 23:07:16 +0000 (19:07 -0400)]
Revert "xen/pv-on-hvm kexec: add xs_reset_watches to shutdown watches from old kernel"

This reverts commit ddacf5ef684a655abe2bb50c4b2a5b72ae0d5e05.

13 years agoxen/hvc: Fix up checks when the info is allocated.
Konrad Rzeszutek Wilk [Tue, 26 Jun 2012 13:30:51 +0000 (09:30 -0400)]
xen/hvc: Fix up checks when the info is allocated.

Coverity would complain about this - even thought it looks OK.

CID 401957
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Conflicts:

drivers/tty/hvc/hvc_xen.c

13 years agoxen/mm: zero PTEs for non-present MFNs in the initial page table
David Vrabel [Mon, 9 Jul 2012 10:39:06 +0000 (11:39 +0100)]
xen/mm: zero PTEs for non-present MFNs in the initial page table

When constructing the initial page tables, if the MFN for a usable PFN
is missing in the p2m then that frame is initially ballooned out.  In
this case, zero the PTE (as in decrease_reservation() in
drivers/xen/balloon.c).

This is obviously safe instead of having an valid PTE with an MFN of
INVALID_P2M_ENTRY (~0).

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen/mm: do direct hypercall in xen_set_pte() if batching is unavailable
David Vrabel [Mon, 9 Jul 2012 10:39:05 +0000 (11:39 +0100)]
xen/mm: do direct hypercall in xen_set_pte() if batching is unavailable

In xen_set_pte() if batching is unavailable (because the caller is in
an interrupt context such as handling a page fault) it would fall back
to using native_set_pte() and trapping and emulating the PTE write.

On 32-bit guests this requires two traps for each PTE write (one for
each dword of the PTE).  Instead, do one mmu_update hypercall
directly.

During construction of the initial page tables, continue to use
native_set_pte() because most of the PTEs being set are in writable
and unpinned pages (see phys_pmd_init() in arch/x86/mm/init_64.c) and
using a hypercall for this is very expensive.

This significantly improves page fault performance in 32-bit PV
guests.

lmbench3 test  Before    After     Improvement
----------------------------------------------
lat_pagefault  3.18 us   2.32 us   27%
lat_proc fork  356 us    313.3 us  11%

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen/x86: add desc_equal() to compare GDT descriptors
David Vrabel [Mon, 9 Jul 2012 10:39:07 +0000 (11:39 +0100)]
xen/x86: add desc_equal() to compare GDT descriptors

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
[v1: Moving it to the Xen file]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agox86/xen: avoid updating TLS descriptors if they haven't changed
David Vrabel [Mon, 9 Jul 2012 10:39:08 +0000 (11:39 +0100)]
x86/xen: avoid updating TLS descriptors if they haven't changed

When switching tasks in a Xen PV guest, avoid updating the TLS
descriptors if they haven't changed.  This improves the speed of
context switches by almost 10% as much of the time the descriptors are
the same or only one is different.

The descriptors written into the GDT by Xen are modified from the
values passed in the update_descriptor hypercall so we keep shadow
copies of the three TLS descriptors to compare against.

lmbench3 test     Before  After  Improvement
--------------------------------------------
lat_ctx -s 32 24   7.19    6.52  9%
lat_pipe          12.56   11.66  7%

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen: populate correct number of pages when across mem boundary (v2)
zhenzhong.duan [Wed, 18 Jul 2012 05:06:39 +0000 (13:06 +0800)]
xen: populate correct number of pages when across mem boundary (v2)

When populate pages across a mem boundary at bootup, the page count
populated isn't correct. This is due to mem populated to non-mem
region and ignored.

Pfn range is also wrongly aligned when mem boundary isn't page aligned.

For a dom0 booted with dom_mem=3368952K(0xcd9ff000-4k) dmesg diff is:
 [    0.000000] Freeing 9e-100 pfn range: 98 pages freed
 [    0.000000] 1-1 mapping on 9e->100
 [    0.000000] 1-1 mapping on cd9ff->100000
 [    0.000000] Released 98 pages of unused memory
 [    0.000000] Set 206435 page(s) to 1-1 mapping
-[    0.000000] Populating cd9fe-cda00 pfn range: 1 pages added
+[    0.000000] Populating cd9fe-cd9ff pfn range: 1 pages added
+[    0.000000] Populating 100000-100061 pfn range: 97 pages added
 [    0.000000] BIOS-provided physical RAM map:
 [    0.000000] Xen: 0000000000000000 - 000000000009e000 (usable)
 [    0.000000] Xen: 00000000000a0000 - 0000000000100000 (reserved)
 [    0.000000] Xen: 0000000000100000 - 00000000cd9ff000 (usable)
 [    0.000000] Xen: 00000000cd9ffc00 - 00000000cda53c00 (ACPI NVS)
...
 [    0.000000] Xen: 0000000100000000 - 0000000100061000 (usable)
 [    0.000000] Xen: 0000000100061000 - 000000012c000000 (unusable)
...
 [    0.000000] MEMBLOCK configuration:
...
-[    0.000000]  reserved[0x4]       [0x000000cd9ff000-0x000000cd9ffbff], 0xc00 bytes
-[    0.000000]  reserved[0x5]       [0x00000100000000-0x00000100060fff], 0x61000 bytes

Related xen memory layout:
(XEN) Xen-e820 RAM map:
(XEN)  0000000000000000 - 000000000009ec00 (usable)
(XEN)  00000000000f0000 - 0000000000100000 (reserved)
(XEN)  0000000000100000 - 00000000cd9ffc00 (usable)

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
[v2: If xen_do_chunk fail(populate), abort this chunk and any others]
Suggested by David, thanks.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoSPEC: v2.6.39-300.0.6
Maxim Uvarov [Wed, 18 Jul 2012 11:10:04 +0000 (04:10 -0700)]
SPEC: v2.6.39-300.0.6

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoexport devinet_ioctl
Maxim Uvarov [Thu, 12 Jul 2012 14:51:22 +0000 (07:51 -0700)]
export devinet_ioctl

Orabug: 14306942
RDS will be using devinet_ioctl() to implement IP failover/fallback for IB
devices to support active/active. This is an enhancement request to export
devinet_ioctl() so non-kernel modules such as RDS can use it.
Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoChanged length for strncpy to OVMM_MAX_NAME_LEN
Cathy Avery [Thu, 12 Jul 2012 13:45:08 +0000 (09:45 -0400)]
Changed length for strncpy to OVMM_MAX_NAME_LEN

Orabug: 14233627
This is the fix for Oracle Bug 14233627
Signed-off-by: Cathy Avery <cathy.avery@oracle.com>
13 years agoAdd Oracle VM guest messaging driver
Maxim Uvarov [Thu, 12 Jul 2012 15:43:38 +0000 (08:43 -0700)]
Add Oracle VM guest messaging driver

Signed-off-by: Cathy Avery <cathy.avery@oracle.com>
Signed-off-by: Steve Prochniak <steve.prochniak@oracle.com>
Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Conflicts:

drivers/xen/Kconfig

13 years agoMerge branch 'uek2-300#bug14306496' of git://ca-git.us.oracle.com/linux-guasun-public
Maxim Uvarov [Thu, 12 Jul 2012 15:41:59 +0000 (08:41 -0700)]
Merge branch 'uek2-300#bug14306496' of git://ca-git.us.oracle.com/linux-guasun-public

13 years agoSPEC: v2.6.39-300.0.5
Maxim Uvarov [Tue, 10 Jul 2012 17:55:51 +0000 (10:55 -0700)]
SPEC: v2.6.39-300.0.5

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoepoll: clear the tfile_check_list on -ELOOP
Guangyu Sun [Wed, 11 Jul 2012 01:48:04 +0000 (18:48 -0700)]
epoll: clear the tfile_check_list on -ELOOP

Orabug: 14306496
upstream commit: 13d518074a952d33d47c428419693f63389547e9

An epoll_ctl(,EPOLL_CTL_ADD,,) operation can return '-ELOOP' to prevent
circular epoll dependencies from being created.  However, in that case we
do not properly clear the 'tfile_check_list'.  Thus, add a call to
clear_tfile_check_list() for the -ELOOP case.

Signed-off-by: Jason Baron <jbaron@redhat.com>
Reported-by: Yurij M. Plotnikov <Yurij.Plotnikov@oktetlabs.ru>
Cc: Nelson Elhage <nelhage@nelhage.com>
Cc: Davide Libenzi <davidel@xmailserver.org>
Tested-by: Alexandra N. Kossovsky <Alexandra.Kossovsky@oktetlabs.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
13 years agoSPEC: v2.6.39-300.0.5
Maxim Uvarov [Tue, 10 Jul 2012 17:55:51 +0000 (10:55 -0700)]
SPEC: v2.6.39-300.0.5

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agotg3: fix VLAN tagging regression
Kasper Pedersen [Tue, 20 Sep 2011 12:41:17 +0000 (12:41 +0000)]
tg3: fix VLAN tagging regression

commit 92cd3a17ce9c719abb4c28dee3438e0c641f8de4
    tg3: Simplify tx bd assignments

broke VLAN tagging on outbound packets.
It ifdef'ed BCM_KERNEL_SUPPORTS_8021Q, but this
is not set anywhere. So vlan never gets set, and
all packets are sent with vlan=0.

v2: We can just remove the test. vlan_tx_tag_present
is valid regardless of whether the 802.1q module
is built.

Tested on BCM5721 rev 11.

Signed-off-by: Kasper Pedersen <kernel@kasperkp.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 5c1e688388f629e8d8e88183b5ebc21e209252aa)

Conflicts:
drivers/net/tg3.c

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agothp: avoid atomic64_read in pmd_read_atomic for 32bit PAE
Andrea Arcangeli [Wed, 20 Jun 2012 19:52:57 +0000 (12:52 -0700)]
thp: avoid atomic64_read in pmd_read_atomic for 32bit PAE

Orabug: 14300370
In the x86 32bit PAE CONFIG_TRANSPARENT_HUGEPAGE=y case while holding the
mmap_sem for reading, cmpxchg8b cannot be used to read pmd contents under
Xen.

So instead of dealing only with "consistent" pmdvals in
pmd_none_or_trans_huge_or_clear_bad() (which would be conceptually
simpler) we let pmd_none_or_trans_huge_or_clear_bad() deal with pmdvals
where the low 32bit and high 32bit could be inconsistent (to avoid having
to use cmpxchg8b).

The only guarantee we get from pmd_read_atomic is that if the low part of
the pmd was found null, the high part will be null too (so the pmd will be
considered unstable).  And if the low part of the pmd is found "stable"
later, then it means the whole pmd was read atomically (because after a
pmd is stable, neither MADV_DONTNEED nor page faults can alter it anymore,
and we read the high part after the low part).

In the 32bit PAE x86 case, it is enough to read the low part of the pmdval
atomically to declare the pmd as "stable" and that's true for THP and no
THP, furthermore in the THP case we also have a barrier() that will
prevent any inconsistent pmdvals to be cached by a later re-read of the
*pmd.

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Cc: Jonathan Nieder <jrnieder@gmail.com>
Cc: Ulrich Obergfell <uobergfe@redhat.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Hugh Dickins <hughd@google.com>
Cc: Larry Woodman <lwoodman@redhat.com>
Cc: Petr Matousek <pmatouse@redhat.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
Tested-by: Andrew Jones <drjones@redhat.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years ago[SCSI] libfc: fcoe_transport_create fails in single-CPU environment
Steven Clark [Fri, 9 Mar 2012 22:50:30 +0000 (14:50 -0800)]
[SCSI] libfc: fcoe_transport_create fails in single-CPU environment

Orabug: 14239242
(mainline commit: 011a9008b11604b12e8386fa6ac3433ab3175dc2)
Starting fcoe fails at fcoe_transport_create when attempting to allocate a
pool of 4K exchanges on a 64-bit single-CPU environment because the call to
__alloc_percpu() is greater than the max of 32K.  This patch reduces the
number of exchanges to fit within the maximum allowed space.

[ Whitespace problems fixed by Robert Love to satisfy chechpatch.pl ]

Signed-off-by: Steven Clark <sclark@crossbeam.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
13 years agoSPEC: v2.6.39-300.0.4
Maxim Uvarov [Mon, 9 Jul 2012 11:05:49 +0000 (04:05 -0700)]
SPEC: v2.6.39-300.0.4

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoMerge branch 'uek-2.6.39-200' of git://ca-git.us.oracle.com/linux-uek-2.6.39 into...
Maxim Uvarov [Mon, 9 Jul 2012 10:11:39 +0000 (03:11 -0700)]
Merge branch 'uek-2.6.39-200' of git://ca-git.us.oracle.com/linux-uek-2.6.39 into master_stableup

Conflicts:
kernel/time/timekeeping.c
uek-rpm/ol5/kernel-uek.spec
uek-rpm/ol6/kernel-uek.spec

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoRevert "mm: mempolicy: Let vma_merge and vma_split handle vma->vm_policy linkages"
Guangyu Sun [Fri, 6 Jul 2012 15:19:53 +0000 (08:19 -0700)]
Revert "mm: mempolicy: Let vma_merge and vma_split handle vma->vm_policy linkages"

This reverts commit 05f144a0d5c2207a0349348127f996e104ad7404.

This patch is broken and should have been reverted by now by an
alternative fix.

Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
13 years agoSPEC: v2.6.39-200.29.1
Joe Jin [Fri, 6 Jul 2012 11:07:18 +0000 (19:07 +0800)]
SPEC: v2.6.39-200.29.1

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years ago3.0.x: hrtimer: Update hrtimer base offsets each hrtimer_interrupt
John Stultz [Mon, 2 Jul 2012 23:28:54 +0000 (19:28 -0400)]
3.0.x: hrtimer: Update hrtimer base offsets each hrtimer_interrupt

This patch introduces a new funciton which captures the
CLOCK_MONOTONIC time, along with the CLOCK_REALTIME and
CLOCK_BOOTTIME offsets at the same moment. This new function
is then used in place of ktime_get() when hrtimer_interrupt()
is expiring timers.

This ensures that any changes to realtime or boottime offsets
are noticed and stored into the per-cpu hrtimer base structures,
prior to doing any hrtimer expiration. This should ensure that
timers are not expired early if the offsets changes under us.

This is useful in the case where clock_was_set() is called from
atomic context and have to schedule the hrtimer base offset update
via a timer, as it provides extra robustness in the face of any
possible timer delay.

CC: Prarit Bhargava <prarit@redhat.com>
CC: stable@vger.kernel.org
CC: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Backported-by: Joe Jin <joe.jin@oracle.com>
13 years ago3.0.x: time: Fix leapsecond triggered hrtimer/futex load spike issue
John Stultz [Sun, 1 Jul 2012 18:07:56 +0000 (14:07 -0400)]
3.0.x: time: Fix leapsecond triggered hrtimer/futex load spike issue

As widely reported on the internet, some Linux systems after
the leapsecond was inserted are experiencing futex related load
spikes (usually connected to MySQL, Firefox, Thunderbird, Java, etc).

An apparent for this issue workaround is running:
$ date -s "`date`"

Credit: http://www.sheeri.com/content/mysql-and-leap-second-high-cpu-and-fix

I this issue is due to the leapsecond being added without
calling clock_was_set() to notify the hrtimer subsystem of the
change.

The workaround functions as it forces a clock_was_set()
call from settimeofday().

This fix adds the required clock_was_set() calls to where
we adjust for leapseconds.

NOTE: This fix *depends* on the previous fix, which allows
clock_was_set to be called from atomic context. Do not try
to apply just this patch.

CC: Prarit Bhargava <prarit@redhat.com>
CC: stable@vger.kernel.org
CC: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Prarit Bhargava <prarit@redhat.com>
Reported-by: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Backported-by: Joe Jin <joe.jin@oracle.com>
13 years ago3.0.x: hrtimer: Fix clock_was_set so it is safe to call from irq context
John Stultz [Sun, 1 Jul 2012 18:01:21 +0000 (14:01 -0400)]
3.0.x: hrtimer: Fix clock_was_set so it is safe to call from irq context

NOTE:This is a prerequisite patch that's required to
address the widely observed leap-second related futex/hrtimer
issues.

Currently clock_was_set() is unsafe to be called from irq
context, as it calls on_each_cpu(). This causes problems when
we need to adjust the time from update_wall_time().

To fix this, if clock_was_set is called when irqs are
disabled, we schedule a timer to fire for immedately after
we're out of interrupt context to then notify the hrtimer
subsystem.

CC: Prarit Bhargava <prarit@redhat.com>
CC: stable@vger.kernel.org
CC: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Prarit Bhargava <prarit@redhat.com>
Reported-by: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Backported-by: Joe Jin <joe.jin@oracle.com>
13 years agoRevert "Fix clock_was_set so it is safe to call from atomic"
Joe Jin [Fri, 6 Jul 2012 10:59:17 +0000 (18:59 +0800)]
Revert "Fix clock_was_set so it is safe to call from atomic"

This reverts commit f84af0ca7768cc12c300cfc42289706199a0c93c.
To apply new patchset.

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agoRevert "Fix leapsecond triggered hrtimer/futex load spike issue"
Joe Jin [Fri, 6 Jul 2012 10:59:13 +0000 (18:59 +0800)]
Revert "Fix leapsecond triggered hrtimer/futex load spike issue"

This reverts commit 05b3801d5d008ec51a9b9afad9856ce15ee02265.
To apply new patchset.

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agoRevert "3.0.x: hrtimer: Update hrtimer base offsets each hrtimer_interrupt"
Joe Jin [Fri, 6 Jul 2012 10:58:58 +0000 (18:58 +0800)]
Revert "3.0.x: hrtimer: Update hrtimer base offsets each hrtimer_interrupt"

This reverts commit 1ecf58256194384908dc2ec31f4ca92c1bd73077.

To apply new patchset.

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agoSPEC: v2.6.39-200.28.1
Joe Jin [Fri, 6 Jul 2012 09:46:18 +0000 (17:46 +0800)]
SPEC: v2.6.39-200.28.1

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years ago3.0.x: hrtimer: Update hrtimer base offsets each hrtimer_interrupt
John Stultz [Mon, 2 Jul 2012 23:28:54 +0000 (19:28 -0400)]
3.0.x: hrtimer: Update hrtimer base offsets each hrtimer_interrupt

This patch introduces a new funciton which captures the
CLOCK_MONOTONIC time, along with the CLOCK_REALTIME and
CLOCK_BOOTTIME offsets at the same moment. This new function
is then used in place of ktime_get() when hrtimer_interrupt()
is expiring timers.

This ensures that any changes to realtime or boottime offsets
are noticed and stored into the per-cpu hrtimer base structures,
prior to doing any hrtimer expiration. This should ensure that
timers are not expired early if the offsets changes under us.

This is useful in the case where clock_was_set() is called from
atomic context and have to schedule the hrtimer base offset update
via a timer, as it provides extra robustness in the face of any
possible timer delay.

CC: Prarit Bhargava <prarit@redhat.com>
CC: stable@vger.kernel.org
CC: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Backported-by: Joe Jin <joe.jin@oracle.com>
13 years agoSPEC: v2.6.39-200.27.1
Guru Anbalagane [Thu, 5 Jul 2012 21:27:56 +0000 (14:27 -0700)]
SPEC: v2.6.39-200.27.1

Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoSPEC: replace kernel-ovs to kernel-uek
Guru Anbalagane [Thu, 5 Jul 2012 18:22:15 +0000 (11:22 -0700)]
SPEC: replace kernel-ovs to kernel-uek

Orabug: 14238939

Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoSPEC: v2.6.39-200.26.1
Maxim Uvarov [Thu, 5 Jul 2012 10:04:58 +0000 (03:04 -0700)]
SPEC: v2.6.39-200.26.1

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoFix leapsecond triggered hrtimer/futex load spike issue
John Stultz [Mon, 2 Jul 2012 00:00:54 +0000 (20:00 -0400)]
Fix leapsecond triggered hrtimer/futex load spike issue

Backport for 3.0.36

As widely reported on the internet, some Linux systems after
the leapsecond was inserted are experiencing futex related load
spikes (usually connected to MySQL, Firefox, Thunderbird, Java, etc).

An apparent  workaround for this issue is running:
$ date -s "`date`"

Credit: http://www.sheeri.com/content/mysql-and-leap-second-high-cpu-and-fix

I believe this issue is due to the leapsecond being added without
calling clock_was_set() to notify the hrtimer subsystem of the
change. (Although I've not yet chased all the way down to the
hrtimer code to validate exactly what's going on there).

The workaround functions as it forces a clock_was_set()
call from settimeofday().

This fix adds the required clock_was_set() calls to where
we adjust for leapseconds.

NOTE: This fix *depends* on the previous fix, which allows
clock_was_set to be called from atomic context. Do not try
to apply just this patch.

CC: Prarit Bhargava <prarit@redhat.com>
CC: stable@vger.kernel.org
CC: Thomas Gleixner <tglx@linutronix.de>
Reported-by: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: John Stultz <johnstul@us.ibm.com>
13 years agoFix clock_was_set so it is safe to call from atomic
John Stultz [Mon, 2 Jul 2012 00:25:12 +0000 (20:25 -0400)]
Fix clock_was_set so it is safe to call from atomic

Backport for 3.0.36

NOTE:This is a prerequisite patch that's required to
address the widely observed leap-second related futex/hrtimer
issues.

Currently clock_was_set() is unsafe to be called from atomic
context, as it calls on_each_cpu(). This causes problems when
we need to adjust the time from update_wall_time().

To fix this, introduce a work_struct so if we're in_atomic,
we can schedule work to do the necessary update after we're
out of the atomic section.

CC: Prarit Bhargava <prarit@redhat.com>
CC: stable@vger.kernel.org
CC: Thomas Gleixner <tglx@linutronix.de>
Reported-by: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: John Stultz <johnstul@us.ibm.com>
13 years agoSPEC: v2.6.39-200.25.1
Maxim Uvarov [Wed, 4 Jul 2012 09:30:31 +0000 (02:30 -0700)]
SPEC: v2.6.39-200.25.1

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agofixed some merge errors
Guangyu Sun [Tue, 3 Jul 2012 23:51:43 +0000 (16:51 -0700)]
fixed some merge errors

Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
13 years agofutex: Mark get_robust_list as deprecated
Kees Cook [Fri, 23 Mar 2012 19:08:55 +0000 (12:08 -0700)]
futex: Mark get_robust_list as deprecated

Notify get_robust_list users that the syscall is going away.

commit ec0c4274e33c0373e476b73e01995c53128f1257 upstream

Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Cc: Darren Hart <dvhart@linux.intel.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Serge E. Hallyn <serge.hallyn@canonical.com>
Cc: kernel-hardening@lists.openwall.com
Cc: spender@grsecurity.net
Link: http://lkml.kernel.org/r/20120323190855.GA27213@www.outflux.net
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Conflicts:

Documentation/feature-removal-schedule.txt

Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
13 years agoMerge tag 'v3.0.36' into uek2-2.6.39-300#14252075
Guangyu Sun [Tue, 3 Jul 2012 21:41:56 +0000 (14:41 -0700)]
Merge tag 'v3.0.36' into uek2-2.6.39-300#14252075

This is the 3.0.36 stable release

Conflicts:
arch/x86/xen/enlighten.c
include/linux/pci.h

Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
13 years agoMerge tag 'v3.0.35' into uek2-2.6.39-300#14252075
Guangyu Sun [Tue, 3 Jul 2012 21:34:29 +0000 (14:34 -0700)]
Merge tag 'v3.0.35' into uek2-2.6.39-300#14252075

This is the 3.0.35 stable release

Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
13 years agoMerge tag 'v3.0.34' into uek2-2.6.39-300#14252075
Guangyu Sun [Tue, 3 Jul 2012 21:33:43 +0000 (14:33 -0700)]
Merge tag 'v3.0.34' into uek2-2.6.39-300#14252075

This is the 3.0.34 stable release

Conflicts:
arch/x86/include/asm/pgtable-3level.h

Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
13 years agoMerge tag 'v3.0.33' into uek2-2.6.39-300#14252075
Guangyu Sun [Tue, 3 Jul 2012 21:28:27 +0000 (14:28 -0700)]
Merge tag 'v3.0.33' into uek2-2.6.39-300#14252075

This is the 3.0.33 stable release

Conflicts:
drivers/scsi/hpsa.c

Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
13 years agoMerge tag 'v3.0.32' into uek2-2.6.39-300#14252075
Guangyu Sun [Tue, 3 Jul 2012 21:22:12 +0000 (14:22 -0700)]
Merge tag 'v3.0.32' into uek2-2.6.39-300#14252075

This is the 3.0.32 stable release

Conflicts:
arch/x86/xen/enlighten.c
drivers/scsi/hpsa.c

Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
13 years agoMerge tag 'v3.0.31' into uek2-2.6.39-300#14252075
Guangyu Sun [Tue, 3 Jul 2012 21:17:54 +0000 (14:17 -0700)]
Merge tag 'v3.0.31' into uek2-2.6.39-300#14252075

This is the 3.0.31 stable release

Conflicts:
drivers/gpu/drm/i915/i915_gem_execbuffer.c
drivers/hwmon/fam15h_power.c
virt/kvm/iommu.c

Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
13 years agoMerge tag 'v3.0.30' into uek2-2.6.39-300#14252075
Guangyu Sun [Tue, 3 Jul 2012 21:14:47 +0000 (14:14 -0700)]
Merge tag 'v3.0.30' into uek2-2.6.39-300#14252075

This is the 3.0.30 stable release

Conflicts:
drivers/xen/xenbus/xenbus_probe_frontend.c

Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
13 years agoMerge tag 'v3.0.29' into uek2-2.6.39-300#14252075
Guangyu Sun [Tue, 3 Jul 2012 21:14:00 +0000 (14:14 -0700)]
Merge tag 'v3.0.29' into uek2-2.6.39-300#14252075

This is the 3.0.29 stable release

Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
13 years agoMerge tag 'v3.0.28' into uek2-2.6.39-300#14252075
Guangyu Sun [Tue, 3 Jul 2012 21:13:37 +0000 (14:13 -0700)]
Merge tag 'v3.0.28' into uek2-2.6.39-300#14252075

This is the 3.0.28 stable release

Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
13 years agoMerge tag 'v3.0.27' into uek2-2.6.39-300#14252075
Guangyu Sun [Tue, 3 Jul 2012 21:13:20 +0000 (14:13 -0700)]
Merge tag 'v3.0.27' into uek2-2.6.39-300#14252075

This is the 3.0.27 stable release

Conflicts:
drivers/hwmon/fam15h_power.c
drivers/net/e1000e/netdev.c
drivers/usb/serial/ftdi_sio.c
include/asm-generic/pgtable.h
net/ipv6/route.c

Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
13 years agoMerge git://ca-git.us.oracle.com/linux-ganbalag-public.git v2.6.39-200.24.1#leapsec
Maxim Uvarov [Tue, 3 Jul 2012 13:46:14 +0000 (06:46 -0700)]
Merge git://ca-git.us.oracle.com/linux-ganbalag-public.git v2.6.39-200.24.1#leapsec

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agontp: Fix leap-second hrtimer livelock
John Stultz [Thu, 15 Mar 2012 20:04:03 +0000 (13:04 -0700)]
ntp: Fix leap-second hrtimer livelock

Orabug: 14264454  leap second fix for UEK

Since commit 7dffa3c673fbcf835cd7be80bb4aec8ad3f51168 the ntp
subsystem has used an hrtimer for triggering the leapsecond
adjustment. However, this can cause a potential livelock.

Thomas diagnosed this as the following pattern:
CPU 0                                                    CPU 1
do_adjtimex()
  spin_lock_irq(&ntp_lock);
    process_adjtimex_modes();  timer_interrupt()
      process_adj_status();                                do_timer()
        ntp_start_leap_timer();                             write_lock(&xtime_lock);
          hrtimer_start();                                  update_wall_time();
             hrtimer_reprogram();                            ntp_tick_length()
               tick_program_event()                            spin_lock(&ntp_lock);
                 clockevents_program_event()
   ktime_get()
                     seq = req_seqbegin(xtime_lock);

This patch tries to avoid the problem by reverting back to not using
an hrtimer to inject leapseconds, and instead we handle the leapsecond
processing in the second_overflow() function.

The downside to this change is that on systems that support highres
timers, the leap second processing will occur on a HZ tick boundary,
(ie: ~1-10ms, depending on HZ)  after the leap second instead of
possibly sooner (~34us in my tests w/ x86_64 lapic).

This patch applies on top of tip/timers/core.

CC: Sasha Levin <levinsasha928@gmail.com>
CC: Thomas Gleixner <tglx@linutronix.de>
Reported-by: Sasha Levin <levinsasha928@gmail.com>
Diagnoised-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agontp: Add ntp_lock to replace xtime_locking
John Stultz [Mon, 14 Nov 2011 21:48:36 +0000 (13:48 -0800)]
ntp: Add ntp_lock to replace xtime_locking

Use a ntp_lock spin lock to replace xtime_lock locking in ntp.c

CC: Thomas Gleixner <tglx@linutronix.de>
CC: Eric Dumazet <eric.dumazet@gmail.com>
CC: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
13 years agontp: Access tick_length variable via ntp_tick_length()
John Stultz [Mon, 14 Nov 2011 21:18:07 +0000 (13:18 -0800)]
ntp: Access tick_length variable via ntp_tick_length()

Currently the NTP managed tick_length value is accessed globally,
in preparations for locking cleanups, make sure it is accessed via
a function and mark it as static.

CC: Thomas Gleixner <tglx@linutronix.de>
CC: Eric Dumazet <eric.dumazet@gmail.com>
CC: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
13 years agontp: Cleanup timex.h
John Stultz [Mon, 14 Nov 2011 21:06:21 +0000 (13:06 -0800)]
ntp: Cleanup timex.h

Move ntp_sycned to ntp.c and mark time_status as static.
Also yank function declaration for non-existant function.

CC: Thomas Gleixner <tglx@linutronix.de>
CC: Eric Dumazet <eric.dumazet@gmail.com>
CC: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
13 years agoMerge branch 'kexec-v3' of git://ca-git.us.oracle.com/linux-dkiper-public
Maxim Uvarov [Fri, 29 Jun 2012 08:39:20 +0000 (01:39 -0700)]
Merge branch 'kexec-v3' of git://ca-git.us.oracle.com/linux-dkiper-public

13 years agodm-nfs: force random mode for the backend file
Joe Jin [Mon, 4 Jun 2012 05:45:02 +0000 (13:45 +0800)]
dm-nfs: force random mode for the backend file

Orabug: 14092678
Without this flag page_cache_sync_readahead() might take some seconds to
complete.
Since dm-nfs used for ovm and as vdisk, random access is expect, so force
set this flag when open the backend file.

Signed-off-by: Joe Jin <joe.jin@oracle.com>
Cc: Adnan Misherfi <adnan.misherfi@oracle.com>
Cc: Kurt C Hackel <kurt.hackel@oracle.com>
Cc: Andrew Thomas <andrew.thomas@oracle.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agodm-nfs: force random mode for the backend file
Joe Jin [Mon, 4 Jun 2012 05:45:02 +0000 (13:45 +0800)]
dm-nfs: force random mode for the backend file

Orabug: 14092678
Without this flag page_cache_sync_readahead() might take some seconds to
complete.
Since dm-nfs used for ovm and as vdisk, random access is expect, so force
set this flag when open the backend file.

Signed-off-by: Joe Jin <joe.jin@oracle.com>
Cc: Adnan Misherfi <adnan.misherfi@oracle.com>
Cc: Kurt C Hackel <kurt.hackel@oracle.com>
Cc: Andrew Thomas <andrew.thomas@oracle.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoMerge branch 'uek-2.6.39-200' of ca-git.us.oracle.com:linux-uek-2.6.39
Maxim Uvarov [Thu, 28 Jun 2012 14:47:37 +0000 (07:47 -0700)]
Merge branch 'uek-2.6.39-200' of ca-git.us.oracle.com:linux-uek-2.6.39

Conflicts:
block/scsi_ioctl.c
drivers/hwmon/fam15h_power.c
drivers/infiniband/ulp/ipoib/ipoib_main.c
drivers/infiniband/ulp/ipoib/ipoib_multicast.c
drivers/md/dm-mpath.c
drivers/net/Kconfig
drivers/net/Makefile
drivers/net/hxge/hxge_main.c
drivers/net/hxge/hxge_txdma.c
drivers/pci/pcie/aspm.c
drivers/scsi/sd.c
include/linux/if_vlan.h
net/ipv4/route.c
net/ipv6/route.c
net/sunrpc/svc.c
net/sunrpc/svc_xprt.c
uek-rpm/ol5/kernel-uek.spec
uek-rpm/ol6/config-generic
uek-rpm/ol6/kernel-uek.spec

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agox86: Add Xen kexec control code size check to linker script
Daniel Kiper [Thu, 21 Jun 2012 13:39:19 +0000 (15:39 +0200)]
x86: Add Xen kexec control code size check to linker script

Add Xen kexec control code size check to linker script.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
13 years agodrivers/xen: Export vmcoreinfo through sysfs
Daniel Kiper [Thu, 21 Jun 2012 13:38:45 +0000 (15:38 +0200)]
drivers/xen: Export vmcoreinfo through sysfs

Export vmcoreinfo through sysfs.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
13 years agox86/xen/enlighten: Add init and crash kexec/kdump hooks
Daniel Kiper [Thu, 21 Jun 2012 13:38:02 +0000 (15:38 +0200)]
x86/xen/enlighten: Add init and crash kexec/kdump hooks

Add init and crash kexec/kdump hooks.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
13 years agox86/xen: Add kexec/kdump makefile rules
Daniel Kiper [Thu, 21 Jun 2012 13:37:29 +0000 (15:37 +0200)]
x86/xen: Add kexec/kdump makefile rules

Add kexec/kdump makefile rules.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
13 years agox86/xen: Add x86_64 kexec/kdump implementation
Daniel Kiper [Thu, 21 Jun 2012 13:30:38 +0000 (15:30 +0200)]
x86/xen: Add x86_64 kexec/kdump implementation

Add x86_64 kexec/kdump implementation.

v2 - Konrad Rzeszutek Wilk suggestions:
  - rewrite assembler code for transition page table initialization,
  - improve comments in assembler code,
  - other code cleanups for assembler code.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
13 years agox86/xen: Add placeholder for i386 kexec/kdump implementation
Daniel Kiper [Thu, 21 Jun 2012 13:29:39 +0000 (15:29 +0200)]
x86/xen: Add placeholder for i386 kexec/kdump implementation

Add placeholder for i386 kexec/kdump implementation
to not break compilation on this architecture.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
13 years agox86/xen: Register resources required by kexec-tools
Daniel Kiper [Thu, 21 Jun 2012 13:28:54 +0000 (15:28 +0200)]
x86/xen: Register resources required by kexec-tools

Register resources required by kexec-tools.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
13 years agox86/xen: Introduce architecture dependent data for kexec/kdump
Daniel Kiper [Thu, 21 Jun 2012 13:27:57 +0000 (15:27 +0200)]
x86/xen: Introduce architecture dependent data for kexec/kdump

Introduce architecture dependent constants, structures and
functions required by Xen kexec/kdump implementation.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
13 years agoxen: Introduce architecture independent data for kexec/kdump
Daniel Kiper [Thu, 21 Jun 2012 13:25:02 +0000 (15:25 +0200)]
xen: Introduce architecture independent data for kexec/kdump

Introduce architecture independent constants and structures
required by Xen kexec/kdump implementation.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
13 years agox86/kexec: Add extra pointers to transition page table PGD, PUD, PMD and PTE
Daniel Kiper [Thu, 21 Jun 2012 13:24:09 +0000 (15:24 +0200)]
x86/kexec: Add extra pointers to transition page table PGD, PUD, PMD and PTE

Some implementations (e.g. Xen PVOPS) could not use part of identity page table
to construct transition page table. It means that they require separate PUDs,
PMDs and PTEs for virtual and physical (identity) mapping. To satisfy that
requirement add extra pointer to PGD, PUD, PMD and PTE and align existing code.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
13 years agokexec: introduce kexec_ops struct
Daniel Kiper [Thu, 21 Jun 2012 13:22:41 +0000 (15:22 +0200)]
kexec: introduce kexec_ops struct

Some kexec/kdump implementations (e.g. Xen PVOPS) on different archs could
not use default functions or require some changes in behavior of kexec/kdump
generic code. To cope with that problem kexec_ops struct was introduced.
It allows a developer to replace all or some functions and control some
functionality of kexec/kdump generic code.

Default behavior of kexec/kdump generic code is not changed.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
13 years agoMerge branch 'uek2-merge' of git://ca-git.us.oracle.com/linux-konrad-public
Maxim Uvarov [Wed, 27 Jun 2012 09:54:20 +0000 (13:54 +0400)]
Merge branch 'uek2-merge' of git://ca-git.us.oracle.com/linux-konrad-public

13 years agoSPEC: v2.6.39-200.24.1
Guru Anbalagane [Sat, 23 Jun 2012 06:20:52 +0000 (23:20 -0700)]
SPEC: v2.6.39-200.24.1
Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoRevert "Add Oracle VM guest messaging driver"
Guru Anbalagane [Sat, 23 Jun 2012 06:13:46 +0000 (23:13 -0700)]
Revert "Add Oracle VM guest messaging driver"
Orabug: 14233627
This reverts commit 0193318fe7899d2717cabff800c3a51cbfbc6ada.

13 years agoLinux 3.0.36 v3.0.36
Greg Kroah-Hartman [Fri, 22 Jun 2012 18:34:31 +0000 (11:34 -0700)]
Linux 3.0.36

13 years agoUSB: fix gathering of interface associations
Daniel Mack [Tue, 12 Jun 2012 18:23:52 +0000 (20:23 +0200)]
USB: fix gathering of interface associations

commit b3a3dd074f7053ef824ad077e5331b52220ceba1 upstream.

TEAC's UD-H01 (and probably other devices) have a gap in the interface
number allocation of their descriptors:

  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          220
    bNumInterfaces          3
    [...]
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      [...]
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         2
      bInterfaceCount         2
      bFunctionClass          1 Audio
      bFunctionSubClass       0
      bFunctionProtocol      32
      iFunction               4
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      [...]

Once a configuration is selected, usb_set_configuration() walks the
known interfaces of a given configuration and calls find_iad() on
each of them to set the interface association pointer the interface
is included in.

The problem here is that the loop variable is taken for the interface
number in the comparison logic that gathers the association. Which is
fine as long as the descriptors are sane.

In the case above, however, the logic gets out of sync and the
interface association fields of all interfaces beyond the interface
number gap are wrong.

Fix this by passing the interface's bInterfaceNumber to find_iad()
instead.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Reported-by: bEN <ml_all@circa.be>
Reported-by: Ivan Perrone <ivanperrone@hotmail.com>
Tested-by: ivan perrone <ivanperrone@hotmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 years agoUSB: serial: Enforce USB driver and USB serial driver match
Bjørn Mork [Wed, 30 May 2012 08:00:14 +0000 (10:00 +0200)]
USB: serial: Enforce USB driver and USB serial driver match

commit 954c3f8a5f1b7716be9eee978b3bc85bae92d7c8 upstream.

We need to make sure that the USB serial driver we find
matches the USB driver whose probe we are currently
executing. Otherwise we will end up with USB serial
devices bound to the correct serial driver but wrong
USB driver.

An example of such cross-probing, where the usbserial_generic
USB driver has found the sierra serial driver:

May 29 18:26:15 nemi kernel: [ 4442.559246] usbserial_generic 4-4:1.0: Sierra USB modem converter detected
May 29 18:26:20 nemi kernel: [ 4447.556747] usbserial_generic 4-4:1.2: Sierra USB modem converter detected
May 29 18:26:25 nemi kernel: [ 4452.557288] usbserial_generic 4-4:1.3: Sierra USB modem converter detected

sysfs view of the same problem:

bjorn@nemi:~$ ls -l /sys/bus/usb/drivers/sierra/
total 0
--w------- 1 root root 4096 May 29 18:23 bind
lrwxrwxrwx 1 root root    0 May 29 18:23 module -> ../../../../module/usbserial
--w------- 1 root root 4096 May 29 18:23 uevent
--w------- 1 root root 4096 May 29 18:23 unbind
bjorn@nemi:~$ ls -l /sys/bus/usb-serial/drivers/sierra/
total 0
--w------- 1 root root 4096 May 29 18:23 bind
lrwxrwxrwx 1 root root    0 May 29 18:23 module -> ../../../../module/sierra
-rw-r--r-- 1 root root 4096 May 29 18:23 new_id
lrwxrwxrwx 1 root root    0 May 29 18:32 ttyUSB0 -> ../../../../devices/pci0000:00/0000:00:1d.7/usb4/4-4/4-4:1.0/ttyUSB0
lrwxrwxrwx 1 root root    0 May 29 18:32 ttyUSB1 -> ../../../../devices/pci0000:00/0000:00:1d.7/usb4/4-4/4-4:1.2/ttyUSB1
lrwxrwxrwx 1 root root    0 May 29 18:32 ttyUSB2 -> ../../../../devices/pci0000:00/0000:00:1d.7/usb4/4-4/4-4:1.3/ttyUSB2
--w------- 1 root root 4096 May 29 18:23 uevent
--w------- 1 root root 4096 May 29 18:23 unbind

bjorn@nemi:~$ ls -l /sys/bus/usb/drivers/usbserial_generic/
total 0
lrwxrwxrwx 1 root root    0 May 29 18:33 4-4:1.0 -> ../../../../devices/pci0000:00/0000:00:1d.7/usb4/4-4/4-4:1.0
lrwxrwxrwx 1 root root    0 May 29 18:33 4-4:1.2 -> ../../../../devices/pci0000:00/0000:00:1d.7/usb4/4-4/4-4:1.2
lrwxrwxrwx 1 root root    0 May 29 18:33 4-4:1.3 -> ../../../../devices/pci0000:00/0000:00:1d.7/usb4/4-4/4-4:1.3
--w------- 1 root root 4096 May 29 18:33 bind
lrwxrwxrwx 1 root root    0 May 29 18:33 module -> ../../../../module/usbserial
--w------- 1 root root 4096 May 29 18:22 uevent
--w------- 1 root root 4096 May 29 18:33 unbind
bjorn@nemi:~$ ls -l /sys/bus/usb-serial/drivers/generic/
total 0
--w------- 1 root root 4096 May 29 18:33 bind
lrwxrwxrwx 1 root root    0 May 29 18:33 module -> ../../../../module/usbserial
-rw-r--r-- 1 root root 4096 May 29 18:33 new_id
--w------- 1 root root 4096 May 29 18:22 uevent
--w------- 1 root root 4096 May 29 18:33 unbind

So we end up with a mismatch between the USB driver and the
USB serial driver.  The reason for the above is simple: The
USB driver probe will succeed if *any* registered serial
driver matches, and will use that serial driver for all
serial driver functions.

This makes ref counting go wrong. We count the USB driver
as used, but not the USB serial driver.  This may result
in Oops'es as demonstrated by Johan Hovold <jhovold@gmail.com>:

[11811.646396] drivers/usb/serial/usb-serial.c: get_free_serial 1
[11811.646443] drivers/usb/serial/usb-serial.c: get_free_serial - minor base = 0
[11811.646460] drivers/usb/serial/usb-serial.c: usb_serial_probe - registering ttyUSB0
[11811.646766] usb 6-1: pl2303 converter now attached to ttyUSB0
[11812.264197] USB Serial deregistering driver FTDI USB Serial Device
[11812.264865] usbcore: deregistering interface driver ftdi_sio
[11812.282180] USB Serial deregistering driver pl2303
[11812.283141] pl2303 ttyUSB0: pl2303 converter now disconnected from ttyUSB0
[11812.283272] usbcore: deregistering interface driver pl2303
[11812.301056] USB Serial deregistering driver generic
[11812.301186] usbcore: deregistering interface driver usbserial_generic
[11812.301259] drivers/usb/serial/usb-serial.c: usb_serial_disconnect
[11812.301823] BUG: unable to handle kernel paging request at f8e7438c
[11812.301845] IP: [<f8e38445>] usb_serial_disconnect+0xb5/0x100 [usbserial]
[11812.301871] *pde = 357ef067 *pte = 00000000
[11812.301957] Oops: 0000 [#1] PREEMPT SMP
[11812.301983] Modules linked in: usbserial(-) [last unloaded: pl2303]
[11812.302008]
[11812.302019] Pid: 1323, comm: modprobe Tainted: G        W    3.4.0-rc7+ #101 Dell Inc. Vostro 1520/0T816J
[11812.302115] EIP: 0060:[<f8e38445>] EFLAGS: 00010246 CPU: 1
[11812.302130] EIP is at usb_serial_disconnect+0xb5/0x100 [usbserial]
[11812.302141] EAX: f508a180 EBX: f508a180 ECX: 00000000 EDX: f8e74300
[11812.302151] ESI: f5050800 EDI: 00000001 EBP: f5141e78 ESP: f5141e58
[11812.302160]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
[11812.302170] CR0: 8005003b CR2: f8e7438c CR3: 34848000 CR4: 000007d0
[11812.302180] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
[11812.302189] DR6: ffff0ff0 DR7: 00000400
[11812.302199] Process modprobe (pid: 1323, ti=f5140000 task=f61e2bc0 task.ti=f5140000)
[11812.302209] Stack:
[11812.302216]  f8e3be0f f8e3b29c f8e3ae00 00000000 f513641c f5136400 f513641c f507a540
[11812.302325]  f5141e98 c133d2c1 00000000 00000000 f509c400 f513641c f507a590 f5136450
[11812.302372]  f5141ea8 c12f0344 f513641c f507a590 f5141ebc c12f0c67 00000000 f507a590
[11812.302419] Call Trace:
[11812.302439]  [<c133d2c1>] usb_unbind_interface+0x51/0x190
[11812.302456]  [<c12f0344>] __device_release_driver+0x64/0xb0
[11812.302469]  [<c12f0c67>] driver_detach+0x97/0xa0
[11812.302483]  [<c12f001c>] bus_remove_driver+0x6c/0xe0
[11812.302500]  [<c145938d>] ? __mutex_unlock_slowpath+0xcd/0x140
[11812.302514]  [<c12f0ff9>] driver_unregister+0x49/0x80
[11812.302528]  [<c1457df6>] ? printk+0x1d/0x1f
[11812.302540]  [<c133c50d>] usb_deregister+0x5d/0xb0
[11812.302557]  [<f8e37c55>] ? usb_serial_deregister+0x45/0x50 [usbserial]
[11812.302575]  [<f8e37c8d>] usb_serial_deregister_drivers+0x2d/0x40 [usbserial]
[11812.302593]  [<f8e3a6e2>] usb_serial_generic_deregister+0x12/0x20 [usbserial]
[11812.302611]  [<f8e3acf0>] usb_serial_exit+0x8/0x32 [usbserial]
[11812.302716]  [<c1080b48>] sys_delete_module+0x158/0x260
[11812.302730]  [<c110594e>] ? mntput+0x1e/0x30
[11812.302746]  [<c145c3c3>] ? sysenter_exit+0xf/0x18
[11812.302746]  [<c107777c>] ? trace_hardirqs_on_caller+0xec/0x170
[11812.302746]  [<c145c390>] sysenter_do_call+0x12/0x36
[11812.302746] Code: 24 02 00 00 e8 dd f3 20 c8 f6 86 74 02 00 00 02 74 b4 8d 86 4c 02 00 00 47 e8 78 55 4b c8 0f b6 43 0e 39 f8 7f a9 8b 53 04 89 d8 <ff> 92 8c 00 00 00 89 d8 e8 0e ff ff ff 8b 45 f0 c7 44 24 04 2f
[11812.302746] EIP: [<f8e38445>] usb_serial_disconnect+0xb5/0x100 [usbserial] SS:ESP 0068:f5141e58
[11812.302746] CR2: 00000000f8e7438c

Fix by only evaluating serial drivers pointing back to the
USB driver we are currently probing.  This still allows two
or more drivers to match the same device, running their
serial driver probes to sort out which one to use.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Tested-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 years agoUSB: serial: sierra: Add support for Sierra Wireless AirCard 320U modem
Tom Cassidy [Wed, 6 Jun 2012 07:08:48 +0000 (17:08 +1000)]
USB: serial: sierra: Add support for Sierra Wireless AirCard 320U modem

commit 19a3dd1575e954e8c004413bee3e12d3962f2525 upstream.

Add support for Sierra Wireless AirCard 320U modem

Signed-off-by: Tomas Cassidy <tomas.cassidy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 years agousb: cdc-acm: fix devices not unthrottled on open
Otto Meta [Wed, 6 Jun 2012 16:46:21 +0000 (18:46 +0200)]
usb: cdc-acm: fix devices not unthrottled on open

commit 6c4707f3f8c44ec18282e1c014c80e1c257042f9 upstream.

Currently CDC-ACM devices stay throttled when their TTY is closed while
throttled, stalling further communication attempts after the next open.

Unthrottling during open/activate got lost starting with kernel
3.0.0 and this patch reintroduces it.

Signed-off-by: Otto Meta <otto.patches@sister-shadow.de>
Acked-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 years agoUSB: add NO_D3_DURING_SLEEP flag and revert 151b61284776be2
Alan Stern [Wed, 13 Jun 2012 15:20:19 +0000 (11:20 -0400)]
USB: add NO_D3_DURING_SLEEP flag and revert 151b61284776be2

commit c2fb8a3fa25513de8fedb38509b1f15a5bbee47b upstream.

This patch (as1558) fixes a problem affecting several ASUS computers:
The machine crashes or corrupts memory when going into suspend if the
ehci-hcd driver is bound to any controllers.  Users have been forced
to unbind or unload ehci-hcd before putting their systems to sleep.

After extensive testing, it was determined that the machines don't
like going into suspend when any EHCI controllers are in the PCI D3
power state.  Presumably this is a firmware bug, but there's nothing
we can do about it except to avoid putting the controllers in D3
during system sleep.

The patch adds a new flag to indicate whether the problem is present,
and avoids changing the controller's power state if the flag is set.
Runtime suspend is unaffected; this matters only for system suspend.
However as a side effect, the controller will not respond to remote
wakeup requests while the system is asleep.  Hence USB wakeup is not
functional -- but of course, this is already true in the current state
of affairs.

A similar patch has already been applied as commit
151b61284776be2d6f02d48c23c3625678960b97 (USB: EHCI: fix crash during
suspend on ASUS computers).  The patch supersedes that one and reverts
it.  There are two differences:

The old patch added the flag at the USB level; this patch
adds it at the PCI level.

The old patch applied to all chipsets with the same vendor,
subsystem vendor, and product IDs; this patch makes an
exception for a known-good system (based on DMI information).

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Dâniel Fraga <fragabr@gmail.com>
Tested-by: Andrey Rahmatullin <wrar@wrar.name>
Tested-by: Steven Rostedt <rostedt@goodmis.org>
Reviewed-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>