]> www.infradead.org Git - users/jedix/linux-maple.git/log
users/jedix/linux-maple.git
13 years agobtrfs: create btrfs_file_write_iter()
Dave Kleikamp [Wed, 21 Mar 2012 20:06:42 +0000 (15:06 -0500)]
btrfs: create btrfs_file_write_iter()

Since btrfs has it's own aio_write function, it needs a similar
write_iter. This patch patterns btrfs_file_write_iter on
btrfs_file_aio_write, then has the latter call the former.

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
13 years agoSPEC: v2.6.39-200.0.3
Guru Anbalagane [Tue, 20 Mar 2012 00:52:16 +0000 (17:52 -0700)]
SPEC: v2.6.39-200.0.3
Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoMerge branch 'uek2-merge' of git://ca-git.us.oracle.com/linux-konrad-public into...
Guru Anbalagane [Tue, 20 Mar 2012 00:43:53 +0000 (17:43 -0700)]
Merge branch 'uek2-merge' of git://ca-git.us.oracle.com/linux-konrad-public into uek2-200

13 years agoSPEC: v2.6.39-200.0.2
Guru Anbalagane [Thu, 15 Mar 2012 00:46:04 +0000 (17:46 -0700)]
SPEC: v2.6.39-200.0.2

Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoxen: make page table walk hugepages aware
Dave McCracken [Thu, 15 Mar 2012 00:37:45 +0000 (17:37 -0700)]
xen: make page table walk hugepages aware

Orabug: 13719997
Fix problem in Xen pvhugepages where page table walk to lock/unlock
page table pages needed to be taught about hugepages.

Signed-off-by: Dave McCracken <dave.mccracken@oracle.com>
Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agox86/PCI: Preserve existing pci=bfsort whitelist for Dell systems
Narendra_K@Dell.com [Fri, 18 Mar 2011 17:22:14 +0000 (10:22 -0700)]
x86/PCI: Preserve existing pci=bfsort whitelist for Dell systems

Commit 6e8af08dfa40b747002207d3ce8e8b43a050d99f enables pci=bfsort on
future Dell systems. But the identification string 'Dell System' matches
on already existing whitelist, which do not have SMBIOS type 0xB1,
causing pci=bfsort not being set on existing whitelist.

This patch fixes the regression by moving the type 0xB1 check beyond the
existing whitelist so that existing whitelist is walked before.

Signed-off-by: Shyam Iyer <shyam_iyer@dell.com>
Signed-off-by: Narendra K <narendra_k@dell.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
13 years agoxen/blkback: Disable DISCARD support for loopback device (but leave for phy).
Konrad Rzeszutek Wilk [Tue, 13 Mar 2012 22:05:58 +0000 (18:05 -0400)]
xen/blkback: Disable DISCARD support for loopback device (but leave for phy).

Until we back-port the changes from 3.3 which alter the loopback device
to support the full gamma of discard attributes. Otherwise we have to
punch through loop device to retrieve the underlaying disk size and
do other nasty things to get the proper information.

Also there is the outstanding issue that Logical Volumes won't pass
through the DISCARD support, so in most cases we can't take advantage of
this code until that gets fixed.

Fixes Oracle BZ#13779884
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoblock: fix patch import error in max_discard_sectors check
Jens Axboe [Sat, 23 Jul 2011 18:34:59 +0000 (20:34 +0200)]
block: fix patch import error in max_discard_sectors check

A '!' snuck in before the unlikely, rendering it useless.

Reported-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
[Fixes BZ#13779884]
Signed-off-b: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

13 years agoblock: eliminate potential for infinite loop in blkdev_issue_discard
Mike Snitzer [Wed, 6 Jul 2011 19:30:50 +0000 (21:30 +0200)]
block: eliminate potential for infinite loop in blkdev_issue_discard

Due to the recently identified overflow in read_capacity_16() it was
possible for max_discard_sectors to be zero but still have discards
enabled on the associated device's queue.

Eliminate the possibility for blkdev_issue_discard to infinitely loop.

Interestingly this issue wasn't identified until a device, whose
discard_granularity was 0 due to read_capacity_16 overflow, was consumed
by blk_stack_limits() to construct limits for a higher-level DM
multipath device.  The multipath device's resulting limits never had the
discard limits stacked because blk_stack_limits() will only do so if
the bottom device's discard_granularity != 0.  This resulted in the
multipath device's limits.max_discard_sectors being 0.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
[Fixes Oracle BZ13779884]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk>
13 years agoconfig: Use the xen-acpi-processor instead of the cpufreq-xen driver.
Konrad Rzeszutek Wilk [Wed, 14 Mar 2012 00:47:44 +0000 (20:47 -0400)]
config: Use the xen-acpi-processor instead of the cpufreq-xen driver.

The xen-acpi-processor (CONFIG_XEN_ACPI_PROCESSOR=y) is a more modern
version of the cpufreq-xen driver that can automatically inhibit
the cpufreq scaling drivers.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen/acpi-processor: C and P-state driver that uploads said data to hypervisor.
Konrad Rzeszutek Wilk [Fri, 3 Feb 2012 21:03:20 +0000 (16:03 -0500)]
xen/acpi-processor: C and P-state driver that uploads said data to hypervisor.

This driver solves three problems:
 1). Parse and upload ACPI0007 (or PROCESSOR_TYPE) information to the
     hypervisor - aka P-states (cpufreq data).
 2). Upload the the Cx state information (cpuidle data).
 3). Inhibit CPU frequency scaling drivers from loading.

The reason for wanting to solve 1) and 2) is such that the Xen hypervisor
is the only one that knows the CPU usage of different guests and can
make the proper decision of when to put CPUs and packages in proper states.
Unfortunately the hypervisor has no support to parse ACPI DSDT tables, hence it
needs help from the initial domain to provide this information. The reason
for 3) is that we do not want the initial domain to change P-states while the
hypervisor is doing it as well - it causes rather some funny cases of P-states
transitions.

For this to work, the driver parses the Power Management data and uploads said
information to the Xen hypervisor. It also calls acpi_processor_notify_smm()
to inhibit the other CPU frequency scaling drivers from being loaded.

Everything revolves around the 'struct acpi_processor' structure which
gets updated during the bootup cycle in different stages. At the startup, when
the ACPI parser starts, the C-state information is processed (processor_idle)
and saved in said structure as 'power' element. Later on, the CPU frequency
scaling driver (powernow-k8 or acpi_cpufreq), would call the the
acpi_processor_* (processor_perflib functions) to parse P-states information
and populate in the said structure the 'performance' element.

Since we do not want the CPU frequency scaling drivers from loading
we have to call the acpi_processor_* functions to parse the P-states and
call "acpi_processor_notify_smm" to stop them from loading.

There is also one oddity in this driver which is that under Xen, the
physical online CPU count can be different from the virtual online CPU count.
Meaning that the macros 'for_[online|possible]_cpu' would process only
up to virtual online CPU count. We on the other hand want to process
the full amount of physical CPUs. For that, the driver checks if the ACPI IDs
count is different from the APIC ID count - which can happen if the user
choose to use dom0_max_vcpu argument. In such a case a backup of the PM
structure is used and uploaded to the hypervisor.

[v1-v2: Initial RFC implementations that were posted]
[v3: Changed the name to passthru suggested by Pasi Kärkkäinen <pasik@iki.fi>]
[v4: Added vCPU != pCPU support - aka dom0_max_vcpus support]
[v5: Cleaned up the driver, fix bug under Athlon XP]
[v6: Changed the driver to a CPU frequency governor]
[v7: Jan Beulich <jbeulich@suse.com> suggestion to make it a cpufreq scaling driver
     made me rework it as driver that inhibits cpufreq scaling driver]
[v8: Per Jan's review comments, fixed up the driver]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Conflicts:

drivers/xen/Kconfig
drivers/xen/Makefile
include/xen/interface/platform.h

13 years agoRevert "Merge branch 'stable/cpufreq-xen.v6.rebased' into uek2-merge"
Konrad Rzeszutek Wilk [Wed, 14 Mar 2012 00:43:38 +0000 (20:43 -0400)]
Revert "Merge branch 'stable/cpufreq-xen.v6.rebased' into uek2-merge"

This reverts commit 2fa5344c95525da55cd6896af85541fc23c1bdc0, reversing
changes made to d696e467d97b748cab14eb1b9910bf45f2044033.

As the upstream version has changed course..

and also remove xen/processor-passthru.c which the git commit:
 696e467d97b748cab14eb1b9910bf45f2044033 should have done.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoSPEC: v2.6.39-200.0.1 UEK2 update 1
Guru Anbalagane [Sun, 11 Mar 2012 21:08:22 +0000 (14:08 -0700)]
SPEC: v2.6.39-200.0.1 UEK2 update 1
Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoMerge branch 'loop' of git://ca-git.us.oracle.com/linux-dkleikam-public into ovm...
Guru Anbalagane [Fri, 9 Mar 2012 01:35:18 +0000 (17:35 -0800)]
Merge branch 'loop' of git://ca-git.us.oracle.com/linux-dkleikam-public into ovm-uek2

13 years agoMerge branch 'uek2-merge' of git://ca-git.us.oracle.com/linux-konrad-public into...
Guru Anbalagane [Fri, 9 Mar 2012 01:32:39 +0000 (17:32 -0800)]
Merge branch 'uek2-merge' of git://ca-git.us.oracle.com/linux-konrad-public into ovm-uek2

13 years agonfs: only dirty user pages in direct read code
Dave Kleikamp [Thu, 8 Mar 2012 19:05:17 +0000 (13:05 -0600)]
nfs: only dirty user pages in direct read code

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
13 years agoSPEC: v2.6.39-100.5.1
Guru Anbalagane [Wed, 7 Mar 2012 00:55:21 +0000 (16:55 -0800)]
SPEC: v2.6.39-100.5.1

Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoproc: make sure mem_open() doesn't pin the target's memory
Oleg Nesterov [Tue, 31 Jan 2012 16:15:11 +0000 (17:15 +0100)]
proc: make sure mem_open() doesn't pin the target's memory

Once /proc/pid/mem is opened, the memory can't be released until
mem_release() even if its owner exits.

Change mem_open() to do atomic_inc(mm_count) + mmput(), this only
pins mm_struct. Change mem_rw() to do atomic_inc_not_zero(mm_count)
before access_remote_vm(), this verifies that this mm is still alive.

I am not sure what should mem_rw() return if atomic_inc_not_zero()
fails. With this patch it returns zero to match the "mm == NULL" case,
may be it should return -EINVAL like it did before e268337d.

Perhaps it makes sense to add the additional fatal_signal_pending()
check into the main loop, to ensure we do not hold this memory if
the target task was oom-killed.

Cc: stable@kernel.org
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 6d08f2c7139790c268820a2e590795cb8333181a)

For Oracle bug 13811116
Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
13 years agoproc: mem_release() should check mm != NULL
Oleg Nesterov [Tue, 31 Jan 2012 16:14:38 +0000 (17:14 +0100)]
proc: mem_release() should check mm != NULL

mem_release() can hit mm == NULL, add the necessary check.

Cc: stable@kernel.org
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 71879d3cb3dd8f2dfdefb252775c1b3ea04a3dd4)

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
For Oracle bug 13811116

13 years agoproc: unify mem_read() and mem_write()
Oleg Nesterov [Tue, 31 Jan 2012 16:14:54 +0000 (17:14 +0100)]
proc: unify mem_read() and mem_write()

commit 572d34b946bae070debd42db1143034d9687e13f upstream.

No functional changes, cleanup and preparation.

mem_read() and mem_write() are very similar. Move this code into the
new common helper, mem_rw(), which takes the additional "int write"
argument.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit b49767a65a6454f7d546068a785e25dbb0eabbcd)
For Oracle bug 13811116

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
13 years agoSPEC: v2.6.39-100.4.1
Guru Anbalagane [Thu, 1 Mar 2012 22:51:47 +0000 (14:51 -0800)]
SPEC: v2.6.39-100.4.1

Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoMerge branch 'b2.6.39-100.3.1rpmsymlink' of git://ca-git.us.oracle.com/linux-muvarov...
Guru Anbalagane [Thu, 1 Mar 2012 22:45:11 +0000 (14:45 -0800)]
Merge branch 'b2.6.39-100.3.1rpmsymlink' of git://ca-git.us.oracle.com/linux-muvarov-public into uek2-stable

13 years agosysfs: restore upstream sysfs code
Guru Anbalagane [Thu, 1 Mar 2012 21:42:49 +0000 (13:42 -0800)]
sysfs: restore upstream sysfs code

Revert "Partial revert of mainline removal of deprecated sysfs interface for 13568528"

This reverts commit 0c01ee13c10ea3360d517f46cfbe26fd09ee1819.

13 years agoMerge branch 'uek2' of git://ca-git.us.oracle.com/linux-mason-public into uek2-stable
Guru Anbalagane [Thu, 1 Mar 2012 21:42:10 +0000 (13:42 -0800)]
Merge branch 'uek2' of git://ca-git.us.oracle.com/linux-mason-public into uek2-stable

13 years agorpm: remove symlink on uninstall
Maxim Uvarov [Thu, 1 Mar 2012 20:49:11 +0000 (12:49 -0800)]
rpm: remove symlink on uninstall

Orabug: 13791936
Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoBtrfs: fix casting error in scrub reada code
Chris Mason [Tue, 28 Feb 2012 17:42:44 +0000 (12:42 -0500)]
Btrfs: fix casting error in scrub reada code

The reada code from scrub was casting down a u64 to
an unsigned long so it could insert it into a radix tree.

What it really wanted to do was cast down the result of a shift, instead
of casting down the u64.  The bug resulted in trying to insert our
reada struct into the wrong place, which caused soft lockups and other
problems.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
13 years agoconfig: Enable Xen's PV USB, SCSI, MCE and Xen CPU freq driver
Konrad Rzeszutek Wilk [Mon, 27 Feb 2012 01:10:59 +0000 (20:10 -0500)]
config: Enable Xen's PV USB, SCSI, MCE and Xen CPU freq driver

drivers and modules. For both OL5 and OL6

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoMerge branch 'stable/cpufreq-xen.v6.rebased' into uek2-merge
Konrad Rzeszutek Wilk [Mon, 27 Feb 2012 01:08:48 +0000 (20:08 -0500)]
Merge branch 'stable/cpufreq-xen.v6.rebased' into uek2-merge

* stable/cpufreq-xen.v6.rebased:
  [CPUFREQ] xen: governor for Xen hypervisor frequency scaling.
  xen/enlighten: Expose MWAIT and MWAIT_LEAF if hypervisor OKs it.

Conflicts:
drivers/xen/Kconfig
drivers/xen/Makefile

13 years ago[CPUFREQ] xen: governor for Xen hypervisor frequency scaling.
Konrad Rzeszutek Wilk [Fri, 3 Feb 2012 21:03:20 +0000 (16:03 -0500)]
[CPUFREQ] xen: governor for Xen hypervisor frequency scaling.

This CPU freq governor leaves the frequency decision to the Xen hypervisor.

To do that the driver parses the Power Management data and uploads said
information to the Xen hypervisor. Then the Xen hypervisor can select the
proper Cx and Pxx states for the initial domain and all other domains.

To upload the information, this CPU frequency driver reads Power Management (PM)
(_Pxx and _Cx) which are populated in the 'struct acpi_processor' structure.
It simply reads the contents of that structure and pass it up the Xen hypervisor.
For that to work we depend on the appropriate CPU frequency scaling driver
to do the heavy-lifting - so that the contents is correct.

The CPU frequency governor it has been loaded also sets up a timer
to check if the ACPI IDs count is different from the APIC ID count - which
can happen if the user choose to use dom0_max_vcpu argument. In such a case
a backup of the PM structure is used and uploaded to the hypervisor.

[v1-v2: Initial RFC implementations that were posted]
[v3: Changed the name to passthru suggested by Pasi Kärkkäinen <pasik@iki.fi>]
[v4: Added vCPU != pCPU support - aka dom0_max_vcpus support]
[v5: Cleaned up the driver, fix bug under Athlon XP]
[v6: Changed the driver to a CPU frequency governor]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Conflicts:

drivers/xen/Kconfig
drivers/xen/Makefile

13 years agoxen/enlighten: Expose MWAIT and MWAIT_LEAF if hypervisor OKs it.
Konrad Rzeszutek Wilk [Tue, 14 Feb 2012 03:26:32 +0000 (22:26 -0500)]
xen/enlighten: Expose MWAIT and MWAIT_LEAF if hypervisor OKs it.

For the hypervisor to take advantage of the MWAIT support it needs
to extract from the ACPI _CST the register address. But the
hypervisor does not have the support to parse DSDT so it relies on
the initial domain (dom0) to parse the ACPI Power Management information
and push it up to the hypervisor. The pushing of the data is done
by the processor_harveset_xen module which parses the information that
the ACPI parser has graciously exposed in 'struct acpi_processor'.

For the ACPI parser to also expose the Cx states for MWAIT, we need
to expose the MWAIT capability (leaf 1). Furthermore we also need to
expose the MWAIT_LEAF capability (leaf 5) for cstate.c to properly
function.

The hypervisor could expose these flags when it traps the XEN_EMULATE_PREFIX
operations, but it can't do it since it needs to be backwards compatible.
Instead we choose to use the native CPUID to figure out if the MWAIT
capability exists and use the XEN_SET_PDC query hypercall to figure out
if the hypervisor wants us to expose the MWAIT_LEAF capability or not.

Note: The XEN_SET_PDC query was implemented in c/s 23783:
"ACPI: add _PDC input override mechanism".

With this in place, instead of
 C3 ACPI IOPORT 415
we get now
 C3:ACPI FFH INTEL MWAIT 0x20

Note: The cpu_idle which would be calling the mwait variants for idling
never gets set b/c we set the default pm_idle to be the hypercall variant.

Acked-by: Jan Beulich <JBeulich@suse.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoRevert "Merge branch 'stable/processor-passthru.v5.rebased' into uek2-merge"
Konrad Rzeszutek Wilk [Mon, 27 Feb 2012 01:02:45 +0000 (20:02 -0500)]
Revert "Merge branch 'stable/processor-passthru.v5.rebased' into uek2-merge"

This reverts commit 7a1bf3f7980152408ccf3cf9d2c0fc0816a0afd8, reversing
changes made to 4b91467d57da88ca97d6a96f40d1157ca7fdd034.

The CPU freq approach is better.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoMerge branch 'stable/processor-passthru.v5.rebased' into uek2-merge
Konrad Rzeszutek Wilk [Fri, 24 Feb 2012 07:33:35 +0000 (02:33 -0500)]
Merge branch 'stable/processor-passthru.v5.rebased' into uek2-merge

* stable/processor-passthru.v5.rebased:
  xen/processor-passthru: threads aren't suppose to leave on their own.

13 years agoxen/processor-passthru: threads aren't suppose to leave on their own.
Konrad Rzeszutek Wilk [Fri, 24 Feb 2012 06:59:52 +0000 (01:59 -0500)]
xen/processor-passthru: threads aren't suppose to leave on their own.

otherwise you get this:
WARNING: at /home/konrad/ssd/linux-uek-2.6.39/kernel/workqueue.c:1217 worker_enter_idle+0xd3/0x140()
eth1: no IPv6 routers present
Hardware name: System Product Name
Modules linked in: processor_passthru xen_evtchn iscsi_boot_sysfs iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi libcrc32c crc32c nouveau mxm_wmi video sg sd_mod atl1c e1000e radeon ahci libahci libata fbcon tileblit font ttm bitblit scsi_mod softcursor drm_kms_helper wmi xen_blkfront xen_netfront fb_sys_fops sysimgblt sysfillrect syscopyarea xenfs xen_privcmd [last unloaded: dump_dma]
Pid: 525, comm: kworker/1:1 Not tainted 2.6.39 #5
Call Trace:
 [<ffffffff8107c97a>] warn_slowpath_common+0x7a/0xb0
 [<ffffffff8107c9c5>] warn_slowpath_null+0x15/0x20
 [<ffffffff810920b3>] worker_enter_idle+0xd3/0x140
 [<ffffffff81094cd0>] worker_thread+0x230/0x420
 [<ffffffff81094aa0>] ? manage_workers+0x220/0x220
 [<ffffffff81099596>] kthread+0x96/0xa0
 [<ffffffff81576d24>] kernel_thread_helper+0x4/0x10
 [<ffffffff81575e33>] ? int_ret_from_sys_call+0x7/0x1b
 [<ffffffff8156f9a1>] ? retint_restore_args+0x5/0x6
 [<ffffffff81576d20>] ? gs_change+0x13/0x13

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoconfig: Enable Xen's PV USB, SCSI, MCE and Processor-Passthru
Konrad Rzeszutek Wilk [Fri, 24 Feb 2012 05:40:29 +0000 (00:40 -0500)]
config: Enable Xen's PV USB, SCSI, MCE and Processor-Passthru

modules.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoMerge branch 'stable/not-upstreamed' into uek2-merge
Konrad Rzeszutek Wilk [Fri, 24 Feb 2012 05:35:13 +0000 (00:35 -0500)]
Merge branch 'stable/not-upstreamed' into uek2-merge

* stable/not-upstreamed:
  Xen: Export host physical CPU information to dom0
  xen/mce: Change the machine check point
  Add mcelog support from xen platform

Conflicts:
drivers/xen/Kconfig
drivers/xen/Makefile

13 years agoXen: Export host physical CPU information to dom0
Liu Jinsong [Thu, 8 Dec 2011 14:28:07 +0000 (22:28 +0800)]
Xen: Export host physical CPU information to dom0

This patch rebased from Jeremy's pvops commit
3b34cd19627c6e191b15fd6cb59f997b8db21e19 and
68320323a51c2378aca433c76157d9e66104ff1e

This patch expose host's physical CPU information to dom0 in sysfs, so
that dom0's management tools can control the physical CPU if needed.

It also provides interface in sysfs to logical online/offline a physical CPU.

Notice: The information in dom0 is synced with xen hypervisor asynchronously.

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen/mce: Change the machine check point
Liu Jinsong [Tue, 6 Dec 2011 21:26:16 +0000 (05:26 +0800)]
xen/mce: Change the machine check point

This patch backport from Jeremy's pvops commit
073349667402682c997394b3fcdbbeb6707f368f

Enable MCE support in dom0, so that if a MCE happen and that MCE impact
dom0, dom0 can receive a vMCE.

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Signed-off-by: Ke, Liping <liping.ke@intel.com>
Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoAdd mcelog support from xen platform
Liu Jinsong [Tue, 6 Dec 2011 10:08:12 +0000 (18:08 +0800)]
Add mcelog support from xen platform

This patch backport from Jeremy's pvops commit a5ed1f3dae179158e385e9371462dd65d5e125c5,
which in turn backport from previous xen DOM0(2.6.18) cs: 75e5bfa7fbdc

When a MCE/CMCI error happens (or by polling), the related error
information will be sent to privileged pv-ops domain by XEN. This
patch will help to fetch the xen-logged information by hypercall
and then convert XEN-format log into Linux format MCELOG. It makes
using current available mcelog tools for native Linux possible.

With this patch, after mce/cmci error log information is sent to
pv-ops guest, Running mcelog tools in the guest, you will get same
detailed decoded mce information as in Native Linux.

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Signed-off-by: Ke, Liping <liping.ke@intel.com>
Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoMerge branch 'stable/not-upstreamed.drivers' into uek2-merge
Konrad Rzeszutek Wilk [Fri, 24 Feb 2012 05:20:40 +0000 (00:20 -0500)]
Merge branch 'stable/not-upstreamed.drivers' into uek2-merge

* stable/not-upstreamed.drivers:
  usb: xen pvusb driver
  xen/scsi[front|back]: consolidate and simplify struct xenbus_driver instantiation
  xen/scsiback: allow RESERVE/RELEASE commands
  xen/scsiback: vscsi >2TB patch
  xen-scsi[front|back]: Fix warnings and bugs.
  xen/scsi[front|back]: Forgot .owner attribute.
  xen/scsi[front|back]: Initial commit from Novell SLES11SP1 2.6.32 tree.

13 years agoMerge branch 'devel/xen-scsi.v1.0' of git://git.kernel.org/pub/scm/linux/kernel/git...
Konrad Rzeszutek Wilk [Fri, 24 Feb 2012 05:15:16 +0000 (00:15 -0500)]
Merge branch 'devel/xen-scsi.v1.0' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen into stable/not-upstreamed.drivers

* 'devel/xen-scsi.v1.0' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
  xen/scsi[front|back]: consolidate and simplify struct xenbus_driver instantiation
  xen/scsiback: allow RESERVE/RELEASE commands
  xen/scsiback: vscsi >2TB patch
  xen-scsi[front|back]: Fix warnings and bugs.
  xen/scsi[front|back]: Forgot .owner attribute.
  xen/scsi[front|back]: Initial commit from Novell SLES11SP1 2.6.32 tree.

13 years agousb: xen pvusb driver
Nathanael Rensen [Tue, 7 Feb 2012 05:50:24 +0000 (13:50 +0800)]
usb: xen pvusb driver

Port the original Xen PV USB drivers developed by Noboru Iwamatsu
<n_iwamatsu@jp.fujitsu.com> to the Linux pvops kernel. The backend driver
resides in dom0 with access to the physical USB device. The frontend driver
resides in a domU to provide paravirtualised access to physical USB devices.

For usage, see http://wiki.xensource.com/xenwiki/XenUSBPassthrough.

Signed-off-by: Nathanael Rensen <nathanael@polymorpheus.com>.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Conflicts:

drivers/usb/host/Kconfig
drivers/usb/host/Makefile

13 years agoMerge branch 'stable/not-upstreamed' into uek2-merge
Konrad Rzeszutek Wilk [Fri, 24 Feb 2012 04:54:24 +0000 (23:54 -0500)]
Merge branch 'stable/not-upstreamed' into uek2-merge

* stable/not-upstreamed:
  x86/microcode: check proper return code.
  xen: add CPU microcode update driver
  xen: add dom0_op hypercall
  xen/acpi: Domain0 acpi parser related platform hypercall

Conflicts:
arch/x86/xen/Kconfig
include/xen/interface/platform.h

Note: The approach in upstream is to get rid of the microcode
driver altogether and do at early bootup. Even as early as
syslinux/pxeboot or initial kernel image. But those patches
are not yet ready.

13 years agoMerge branch 'devel/acpi-s3.v4.rebased' into uek2-merge
Konrad Rzeszutek Wilk [Fri, 24 Feb 2012 04:54:01 +0000 (23:54 -0500)]
Merge branch 'devel/acpi-s3.v4.rebased' into uek2-merge

* devel/acpi-s3.v4.rebased:
  xen/pci:use hypercall PHYSDEVOP_restore_msi_ext to restore MSI/MSI-X vectors
  xen/acpi/sleep: Register to the acpi_suspend_lowlevel a callback.
  xen/acpi/sleep: Enable ACPI sleep via the __acpi_override_sleep
  xen/acpi: Domain0 acpi parser related platform hypercall
  xen: Utilize the restore_msi_irqs hook.
  x86/acpi/sleep: Provide registration for acpi_suspend_lowlevel.
  x86, acpi, tboot: Have a ACPI sleep override instead of calling tboot_sleep.
  x86: Expand the x86_msi_ops to have a restore MSIs.

Conflicts:
drivers/xen/Makefile
include/xen/interface/physdev.h
include/xen/interface/platform.h

13 years agoMerge branch 'stable/processor-passthru.v5.rebased' into uek2-merge
Konrad Rzeszutek Wilk [Fri, 24 Feb 2012 04:49:59 +0000 (23:49 -0500)]
Merge branch 'stable/processor-passthru.v5.rebased' into uek2-merge

* stable/processor-passthru.v5.rebased:
  xen/processor-passthru: Provide an driver that passes struct acpi_processor data to the hypervisor.
  xen/enlighten: Expose MWAIT and MWAIT_LEAF if hypervisor OKs it.
  xen/setup/pm/acpi: Remove the call to boot_option_idle_override.
  xen/acpi: Domain0 acpi parser related platform hypercall
  xen/pm_idle: Make pm_idle be default_idle under Xen.
  cpuidle: stop depending on pm_idle
  cpuidle: replace xen access to x86 pm_idle and default_idle
  cpuidle: create bootparam "cpuidle.off=1"

Conflicts:
drivers/xen/Kconfig
drivers/xen/Makefile
include/xen/interface/platform.h

13 years agoxen/processor-passthru: Provide an driver that passes struct acpi_processor data...
Konrad Rzeszutek Wilk [Fri, 24 Feb 2012 04:47:20 +0000 (23:47 -0500)]
xen/processor-passthru: Provide an driver that passes struct acpi_processor data to the hypervisor.

The ACPI processor processes the _Pxx and the _Cx state information
which are populated in the 'struct acpi_processor' per-cpu structure.
We read the contents of that structure and pass it up the Xen hypervisor.

The ACPI processor along with the CPU freq driver does all the heavy-lifting
for us (filtering, calling ACPI functions, etc) so that the contents is correct.
After we are done parsing the information, we wait in case of hotplug CPUs
get loaded and then pass that information to the hypervisor.

[v1-v2: Initial RFC implementations that were posted]
[v3: Changed the name to passthru suggested by Pasi Kärkkäinen <pasik@iki.fi>]
[v4: Added vCPU != pCPU support - aka dom0_max_vcpus support]
[v5: Cleaned up the driver, fix bug under Athlon XP]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Conflicts:

drivers/xen/Kconfig
drivers/xen/Makefile

13 years agoxen/enlighten: Expose MWAIT and MWAIT_LEAF if hypervisor OKs it.
Konrad Rzeszutek Wilk [Tue, 14 Feb 2012 03:26:32 +0000 (22:26 -0500)]
xen/enlighten: Expose MWAIT and MWAIT_LEAF if hypervisor OKs it.

For the hypervisor to take advantage of the MWAIT support it needs
to extract from the ACPI _CST the register address. But the
hypervisor does not have the support to parse DSDT so it relies on
the initial domain (dom0) to parse the ACPI Power Management information
and push it up to the hypervisor. The pushing of the data is done
by the processor_harveset_xen module which parses the information that
the ACPI parser has graciously exposed in 'struct acpi_processor'.

For the ACPI parser to also expose the Cx states for MWAIT, we need
to expose the MWAIT capability (leaf 1). Furthermore we also need to
expose the MWAIT_LEAF capability (leaf 5) for cstate.c to properly
function.

The hypervisor could expose these flags when it traps the XEN_EMULATE_PREFIX
operations, but it can't do it since it needs to be backwards compatible.
Instead we choose to use the native CPUID to figure out if the MWAIT
capability exists and use the XEN_SET_PDC query hypercall to figure out
if the hypervisor wants us to expose the MWAIT_LEAF capability or not.

Note: The XEN_SET_PDC query was implemented in c/s 23783:
"ACPI: add _PDC input override mechanism".

With this in place, instead of
 C3 ACPI IOPORT 415
we get now
 C3:ACPI FFH INTEL MWAIT 0x20

Note: The cpu_idle which would be calling the mwait variants for idling
never gets set b/c we set the default pm_idle to be the hypercall variant.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen/setup/pm/acpi: Remove the call to boot_option_idle_override.
Konrad Rzeszutek Wilk [Mon, 23 Jan 2012 15:53:57 +0000 (10:53 -0500)]
xen/setup/pm/acpi: Remove the call to boot_option_idle_override.

We needed that call in the past to force the kernel to use
default_idle (which called safe_halt, which called xen_safe_halt).

But set_pm_idle_to_default() does now that, so there is no need
to use this boot option operand.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen/acpi: Domain0 acpi parser related platform hypercall
Yu Ke [Wed, 24 Mar 2010 18:01:13 +0000 (11:01 -0700)]
xen/acpi: Domain0 acpi parser related platform hypercall

This patches implements the xen_platform_op hypercall, to pass the parsed
ACPI info to hypervisor.

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Tian Kevin <kevin.tian@intel.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
[v1: Added DEFINE_GUEST.. in appropiate headers]
[v2: Ripped out typedefs]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen/pm_idle: Make pm_idle be default_idle under Xen.
Konrad Rzeszutek Wilk [Mon, 21 Nov 2011 23:02:02 +0000 (18:02 -0500)]
xen/pm_idle: Make pm_idle be default_idle under Xen.

The idea behind commit d91ee5863b71 ("cpuidle: replace xen access to x86
pm_idle and default_idle") was to have one call - disable_cpuidle()
which would make pm_idle not be molested by other code.  It disallows
cpuidle_idle_call to be set to pm_idle (which is excellent).

But in the select_idle_routine() and idle_setup(), the pm_idle can still
be set to either: amd_e400_idle, mwait_idle or default_idle.  This
depends on some CPU flags (MWAIT) and in AMD case on the type of CPU.

In case of mwait_idle we can hit some instances where the hypervisor
(Amazon EC2 specifically) sets the MWAIT and we get:

  Brought up 2 CPUs
  invalid opcode: 0000 [#1] SMP

  Pid: 0, comm: swapper Not tainted 3.1.0-0.rc6.git0.3.fc16.x86_64 #1
  RIP: e030:[<ffffffff81015d1d>]  [<ffffffff81015d1d>] mwait_idle+0x6f/0xb4
  ...
  Call Trace:
   [<ffffffff8100e2ed>] cpu_idle+0xae/0xe8
   [<ffffffff8149ee78>] cpu_bringup_and_idle+0xe/0x10
  RIP  [<ffffffff81015d1d>] mwait_idle+0x6f/0xb4
   RSP <ffff8801d28ddf10>

In the case of amd_e400_idle we don't get so spectacular crashes, but we
do end up making an MSR which is trapped in the hypervisor, and then
follow it up with a yield hypercall.  Meaning we end up going to
hypervisor twice instead of just once.

The previous behavior before v3.0 was that pm_idle was set to
default_idle regardless of select_idle_routine/idle_setup.

We want to do that, but only for one specific case: Xen.  This patch
does that.

Fixes RH BZ #739499 and Ubuntu #881076
Reported-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agocpuidle: stop depending on pm_idle
Len Brown [Fri, 1 Apr 2011 23:34:59 +0000 (19:34 -0400)]
cpuidle: stop depending on pm_idle

cpuidle users should call cpuidle_call_idle() directly
rather than via (pm_idle)() function pointer.

Architecture may choose to continue using (pm_idle)(),
but cpuidle need not depend on it:

  my_arch_cpu_idle()
...
if(cpuidle_call_idle())
pm_idle();

cc: Kevin Hilman <khilman@deeprootsystems.com>
cc: Paul Mundt <lethal@linux-sh.org>
cc: x86@kernel.org
Acked-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
13 years agocpuidle: replace xen access to x86 pm_idle and default_idle
Len Brown [Fri, 1 Apr 2011 22:28:35 +0000 (18:28 -0400)]
cpuidle: replace xen access to x86 pm_idle and default_idle

When a Xen Dom0 kernel boots on a hypervisor, it gets access
to the raw-hardware ACPI tables.  While it parses the idle tables
for the hypervisor's beneift, it uses HLT for its own idle.

Rather than have xen scribble on pm_idle and access default_idle,
have it simply disable_cpuidle() so acpi_idle will not load and
architecture default HLT will be used.

cc: xen-devel@lists.xensource.com
Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
13 years agocpuidle: create bootparam "cpuidle.off=1"
Len Brown [Fri, 1 Apr 2011 22:13:10 +0000 (18:13 -0400)]
cpuidle: create bootparam "cpuidle.off=1"

useful for disabling cpuidle to fall back
to architecture-default idle loop

cpuidle drivers and governors will fail to register.
on x86 they'll say so:

intel_idle: intel_idle yielding to (null)
ACPI: acpi_idle yielding to (null)

Signed-off-by: Len Brown <len.brown@intel.com>
13 years agoRevert "Merge branch 'stable/acpi-cpufreq.v3.rebased' into uek2-merge"
Konrad Rzeszutek Wilk [Fri, 24 Feb 2012 04:26:17 +0000 (23:26 -0500)]
Revert "Merge branch 'stable/acpi-cpufreq.v3.rebased' into uek2-merge"

This reverts commit 3acb13af318b052c429430359fec3871b5ad2800, reversing
changes made to c1c344a8ba3c301fe799bfe82ac384e2a18b83e4.

Instead we will use the one that is going upstream.

13 years agox86/microcode: check proper return code.
Ben Guthro [Thu, 3 Nov 2011 15:06:56 +0000 (11:06 -0400)]
x86/microcode: check proper return code.

After pulling in this change from your tree, I found the following bug,
when checking an enum value, which should be considered before inclusion:

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen: add CPU microcode update driver
Jeremy Fitzhardinge [Sat, 28 Mar 2009 00:39:15 +0000 (17:39 -0700)]
xen: add CPU microcode update driver

Xen does all the hard work for us, including choosing the right update
method for this cpu type and actually doing it for all cpus.  We just
need to supply it with the firmware blob.

Because Xen updates all CPUs (and the kernel's virtual cpu numbers have
no fixed relationship with the underlying physical cpus), we only bother
doing anything for cpu "0".

[ Impact: allow CPU microcode update in Xen dom0 ]
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
13 years agoxen: add dom0_op hypercall
Jeremy Fitzhardinge [Fri, 23 Sep 2011 18:44:17 +0000 (11:44 -0700)]
xen: add dom0_op hypercall

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
13 years agoxen/acpi: Domain0 acpi parser related platform hypercall
Yu Ke [Wed, 24 Mar 2010 18:01:13 +0000 (11:01 -0700)]
xen/acpi: Domain0 acpi parser related platform hypercall

This patches implements the xen_platform_op hypercall, to pass the parsed
ACPI info to hypervisor.

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Tian Kevin <kevin.tian@intel.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
[v1: Added DEFINE_GUEST.. in appropiate headers]
[v2: Ripped out typedefs]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoSPEC: v2.6.39-100.3.1
Guru Anbalagane [Wed, 22 Feb 2012 23:11:38 +0000 (15:11 -0800)]
SPEC: v2.6.39-100.3.1

Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoMerge branch 'uek2' of git://ca-git.us.oracle.com/linux-mason-public into uek2-stable
Guru Anbalagane [Wed, 22 Feb 2012 21:29:55 +0000 (13:29 -0800)]
Merge branch 'uek2' of git://ca-git.us.oracle.com/linux-mason-public into uek2-stable

13 years agoBtrfs: clear the extent uptodate bits during parent transid failures
Chris Mason [Wed, 22 Feb 2012 17:36:24 +0000 (12:36 -0500)]
Btrfs: clear the extent uptodate bits during parent transid failures

If btrfs reads a block and finds a parent transid mismatch, it clears
the uptodate flags on the extent buffer, and the pages inside it.  But
we only clear the uptodate bits in the state tree if the block straddles
more than one page.

This is from an old optimization from to reduce contention on the extent
state tree.  But it is buggy because the code that retries a read from
a different copy of the block is going to find the uptodate state bits
set and skip the IO.

The end result of the bug is that we'll never actually read the good
copy (if there is one).

The fix here is to always clear the uptodate state bits, which is safe
because this code is only called when the parent transid fails.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
13 years agoMerge branch 'uek-2.6.39-stable' of git://ca-git.us.oracle.com/linux-joejin-public...
Guru Anbalagane [Tue, 21 Feb 2012 05:35:44 +0000 (21:35 -0800)]
Merge branch 'uek-2.6.39-stable' of git://ca-git.us.oracle.com/linux-joejin-public into uek2-stable

13 years agoMerge branch 'uek2' of git://ca-git.us.oracle.com/linux-mason-public into uek2-stable
Guru Anbalagane [Tue, 21 Feb 2012 05:19:12 +0000 (21:19 -0800)]
Merge branch 'uek2' of git://ca-git.us.oracle.com/linux-mason-public into uek2-stable

13 years agoBtrfs: add extra sanity checks on the path names in btrfs_mksubvol
Chris Mason [Tue, 21 Feb 2012 03:14:55 +0000 (22:14 -0500)]
Btrfs: add extra sanity checks on the path names in btrfs_mksubvol

Signed-off-by: Chris Mason <chris.mason@oracle.com>
13 years agoBtrfs: make sure we update latest_bdev
Chris Mason [Tue, 21 Feb 2012 01:53:43 +0000 (20:53 -0500)]
Btrfs: make sure we update latest_bdev

When we are setting up the mount, we close all the
devices that were not actually part of the metadata we found.

But, we don't make sure that one of those devices wasn't
fs_devices->latest_bdev, which means we can do a use after free
on the one we closed.

This updates latest_bdev as it goes.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
13 years agonfs: add support for read_iter, write_iter
Dave Kleikamp [Mon, 20 Feb 2012 18:21:02 +0000 (12:21 -0600)]
nfs: add support for read_iter, write_iter

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
13 years agoBtrfs: improve error handling for btrfs_insert_dir_item callers
Chris Mason [Mon, 20 Feb 2012 13:40:56 +0000 (08:40 -0500)]
Btrfs: improve error handling for btrfs_insert_dir_item callers

This allows us to gracefully continue if we aren't able to insert
directory items, both for normal files/dirs and snapshots.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
13 years agoMerge branch 'uek2-stable' of git://ca-git.us.oracle.com/linux-uek-2.6.39 into uek2...
Joe Jin [Thu, 16 Feb 2012 00:04:29 +0000 (08:04 +0800)]
Merge branch 'uek2-stable' of git://ca-git.us.oracle.com/linux-uek-2.6.39 into uek2-stable

13 years agofnic: return zero on fnic_reset() success
Joe Jin [Thu, 19 Jan 2012 08:04:25 +0000 (16:04 +0800)]
fnic: return zero on fnic_reset() success

When issue LIP by sysfs found write("1") returned 8194, this caused by
fnic_reset() return SUCCESS to store_fc_private_host_issue_lip(). Return 0/-1
for fnic_reset() fix this issue.

Tested-by: Sriharsha <sriharsha.devdas@oracle.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
Cc: Abhijeet Joglekar <abjoglek@cisco.com>
Cc: Venkata Siva Vijayendra Bhamidipati <vbhamidi@cisco.com>
Cc: Brian Uchino <buchino@cisco.com>
CC: stable@vger.kernel.org
13 years ago[SCSI] libfc: improve flogi retries to avoid lport stuck
Vasu Dev [Fri, 28 Oct 2011 18:34:23 +0000 (11:34 -0700)]
[SCSI] libfc: improve flogi retries to avoid lport stuck

Adds more cases to do flogi retry, now also retry
on getting bad response due to either no ELS response
or flogi response payload length not large enough.
In those cases flogi was not retried and that
was leaving lport offline.

Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Tested-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit 907c07d45199f954ddcf66c2c9763c87d012cb15)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years ago[SCSI] libfc: avoid exchanges collision during lport reset
Vasu Dev [Fri, 28 Oct 2011 18:34:17 +0000 (11:34 -0700)]
[SCSI] libfc: avoid exchanges collision during lport reset

Currently timer delay is large and is using msleep to avoid
avoid exchanges collision across lport reset, so instead
do this by initializing exches pool indexes during
reset also.

Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Tested-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
(cherry picked from commit b6e3c84034b93e6acc895711f74730e235dfe9d2)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
13 years agoigbvf: update version number
Williams, Mitch A [Thu, 19 May 2011 05:37:59 +0000 (05:37 +0000)]
igbvf: update version number

Update the version number to match version conventions. Bump the major
version to indicate that new hardware support (i350) has been added.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoMerge branch 'stable/xen-pciback-0.6.3.bugfixes' into uek2-merge
Konrad Rzeszutek Wilk [Wed, 15 Feb 2012 16:01:35 +0000 (11:01 -0500)]
Merge branch 'stable/xen-pciback-0.6.3.bugfixes' into uek2-merge

* stable/xen-pciback-0.6.3.bugfixes:
  xen/pci[front|back]: Use %d instead of %1x for displaying PCI devfn.

13 years agoMerge branch 'stable/bug.fixes-3.3.rebased' into uek2-merge
Konrad Rzeszutek Wilk [Wed, 15 Feb 2012 15:48:39 +0000 (10:48 -0500)]
Merge branch 'stable/bug.fixes-3.3.rebased' into uek2-merge

* stable/bug.fixes-3.3.rebased:
  xen pvhvm: do not remap pirqs onto evtchns if !xen_have_vector_callback
  xen/smp: Fix CPU online/offline bug triggering a BUG: scheduling while atomic.
  xen/bootup: During bootup suppress XENBUS: Unable to read cpu state

13 years agoMerge branch 'stable/for-linus-3.3.rebased' into uek2-merge
Konrad Rzeszutek Wilk [Wed, 15 Feb 2012 15:48:24 +0000 (10:48 -0500)]
Merge branch 'stable/for-linus-3.3.rebased' into uek2-merge

* stable/for-linus-3.3.rebased:
  xenbus_dev: add missing error check to watch handling

13 years agoxenbus_dev: add missing error check to watch handling
Jan Beulich [Tue, 24 Jan 2012 13:52:42 +0000 (13:52 +0000)]
xenbus_dev: add missing error check to watch handling

So far only the watch path was checked to be zero terminated, while
the watch token was merely assumed to be.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen/pci[front|back]: Use %d instead of %1x for displaying PCI devfn.
Konrad Rzeszutek Wilk [Wed, 25 Jan 2012 21:00:00 +0000 (16:00 -0500)]
xen/pci[front|back]: Use %d instead of %1x for displaying PCI devfn.

.. as the rest of the kernel is using that format.

Suggested-by: Марк Коренберг <socketpair@gmail.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen pvhvm: do not remap pirqs onto evtchns if !xen_have_vector_callback
Stefano Stabellini [Mon, 30 Jan 2012 14:31:46 +0000 (14:31 +0000)]
xen pvhvm: do not remap pirqs onto evtchns if !xen_have_vector_callback

CC: stable@kernel.org #2.6.37 and onwards
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen/smp: Fix CPU online/offline bug triggering a BUG: scheduling while atomic.
Konrad Rzeszutek Wilk [Wed, 1 Feb 2012 20:56:54 +0000 (15:56 -0500)]
xen/smp: Fix CPU online/offline bug triggering a BUG: scheduling while atomic.

When a user offlines a VCPU and then onlines it, we get:

NMI watchdog disabled (cpu2): hardware events not enabled
BUG: scheduling while atomic: swapper/2/0/0x00000002
Modules linked in: dm_multipath dm_mod xen_evtchn iscsi_boot_sysfs iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi scsi_mod libcrc32c crc32c radeon fbco
 ttm bitblit softcursor drm_kms_helper xen_blkfront xen_netfront xen_fbfront fb_sys_fops sysimgblt sysfillrect syscopyarea xen_kbdfront xenfs [last unloaded:

Pid: 0, comm: swapper/2 Tainted: G           O 3.2.0phase15.1-00003-gd6f7f5b-dirty #4
Call Trace:
 [<ffffffff81070571>] __schedule_bug+0x61/0x70
 [<ffffffff8158eb78>] __schedule+0x798/0x850
 [<ffffffff8158ed6a>] schedule+0x3a/0x50
 [<ffffffff810349be>] cpu_idle+0xbe/0xe0
 [<ffffffff81583599>] cpu_bringup_and_idle+0xe/0x10

The reason for this should be obvious from this call-chain:
cpu_bringup_and_idle:
 \- cpu_bringup
  |   \-[preempt_disable]
  |
  |- cpu_idle
       \- play_dead [assuming the user offlined the VCPU]
       |     \
       |     +- (xen_play_dead)
       |          \- HYPERVISOR_VCPU_off [so VCPU is dead, once user
       |          |                       onlines it starts from here]
       |          \- cpu_bringup [preempt_disable]
       |
       +- preempt_enable_no_reschedule()
       +- schedule()
       \- preempt_enable()

So we have two preempt_disble() and one preempt_enable(). Calling
preempt_enable() after the cpu_bringup() in the xen_play_dead
fixes the imbalance.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen/bootup: During bootup suppress XENBUS: Unable to read cpu state
Konrad Rzeszutek Wilk [Wed, 1 Feb 2012 21:07:41 +0000 (16:07 -0500)]
xen/bootup: During bootup suppress XENBUS: Unable to read cpu state

When the initial domain starts, it prints (depending on the
amount of CPUs) a slew of
XENBUS: Unable to read cpu state
XENBUS: Unable to read cpu state
XENBUS: Unable to read cpu state
XENBUS: Unable to read cpu state

which provide no useful information - as the error is a valid
issue - but not on the initial domain. The reason is that the
XenStore is not accessible at that time (it is after all the
first guest) so the CPU hotplug watch cannot parse "availability/cpu"
attribute.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoSPEC: v2.6.39-100.2.1
Guru Anbalagane [Tue, 14 Feb 2012 23:45:30 +0000 (15:45 -0800)]
SPEC: v2.6.39-100.2.1

Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoMerge branch 'v2.6.39-100.1.1.bug13709784' of git://ca-git.us.oracle.com/linux-chande...
Guru Anbalagane [Tue, 14 Feb 2012 23:26:36 +0000 (15:26 -0800)]
Merge branch 'v2.6.39-100.1.1.bug13709784' of git://ca-git.us.oracle.com/linux-chander-public into uek2-stable

13 years agoconfig: enable dm-nfs
Guru Anbalagane [Mon, 13 Feb 2012 04:24:32 +0000 (20:24 -0800)]
config: enable dm-nfs

Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoUpdate lpfc version for 8.3.5.58.2p driver release
Chuck Anderson [Sat, 11 Feb 2012 02:04:23 +0000 (18:04 -0800)]
Update lpfc version for 8.3.5.58.2p driver release

Oracle bug 13709784
Oracle bugzilla 13352
02/10/2012
Chuck Anderson

Patch Emulex LPFC device driver to 8.3.5.58.2p

Update lpfc version for 8.3.5.58.2p driver release

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
13 years agoFix build warning with uninitialized variable
Chuck Anderson [Sat, 11 Feb 2012 01:24:04 +0000 (17:24 -0800)]
Fix build warning with uninitialized variable

Oracle bug 13709784
Oracle bugzilla 13352
02/10/2012
Chuck Anderson

Patch Emulex LPFC device driver to 8.3.5.58.2p

commit id: 1b51197d0fd0c06877c6df1bba84ac4008a7fc60

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
13 years agoFix warning on i386 system (CR 123966)
Chuck Anderson [Sat, 11 Feb 2012 01:11:40 +0000 (17:11 -0800)]
Fix warning on i386 system (CR 123966)

Oracle bug 13709784
Oracle bugzilla 13352
02/10/2012
Chuck Anderson

Patch Emulex LPFC device driver to 8.3.5.58.2p

commit comment:
lpfc 8.3.29: T10 Diff fixes and enhancements.
Fix warning on i386 system (132966)

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
13 years agoFix mailbox and vpi memory leaks causing crashes (CR 126818)
Chuck Anderson [Sat, 11 Feb 2012 01:05:53 +0000 (17:05 -0800)]
Fix mailbox and vpi memory leaks causing crashes (CR 126818)

Oracle bug 13709784
Oracle bugzilla 13352
02/10/2012
Chuck Anderson

Patch Emulex LPFC device driver to 8.3.5.58.2p

commit comment:
lpfc 8.3.29: Locking fix and Memory leak Fixes
Fix mailbox and vpi memory leaks (126818)

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
13 years agoFixed unbounded firmware revision string from port caused the system panic (CR 126560)
Chuck Anderson [Sat, 11 Feb 2012 00:59:09 +0000 (16:59 -0800)]
Fixed unbounded firmware revision string from port caused the system panic (CR 126560)

Oracle bug 13709784
Oracle bugzilla 13352
02/10/2012
Chuck Anderson

Patch Emulex LPFC device driver to 8.3.5.58.2p

commit comment:
lpfc 8.3.29: SLI related fixes.
Fix unbounded firmware revision string from port cause panic (126560)

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
13 years agoSPEC: v2.6.39-100.1.1
Guru Anbalagane [Wed, 8 Feb 2012 06:10:28 +0000 (22:10 -0800)]
SPEC: v2.6.39-100.1.1

Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoMerge branch 'uek2-stable_modsigndev' of git://ca-git.us.oracle.com/linux-muvarov...
Guru Anbalagane [Wed, 8 Feb 2012 05:47:57 +0000 (21:47 -0800)]
Merge branch 'uek2-stable_modsigndev' of git://ca-git.us.oracle.com/linux-muvarov-public into uek2-stable

13 years agoMerge branch 'uek2-stable-enic2' of git://ca-git.us.oracle.com/linux-chander-public...
Guru Anbalagane [Wed, 8 Feb 2012 05:38:44 +0000 (21:38 -0800)]
Merge branch 'uek2-stable-enic2' of git://ca-git.us.oracle.com/linux-chander-public into uek2-stable

Conflicts:
drivers/net/ixgbe/ixgbe_82599.c

Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
13 years agoMerge branch 'for_uek' of git://ca-git.us.oracle.com/linux-bpicco-public into uek2...
Guru Anbalagane [Wed, 8 Feb 2012 05:04:02 +0000 (21:04 -0800)]
Merge branch 'for_uek' of git://ca-git.us.oracle.com/linux-bpicco-public into uek2-stable

13 years agomm: compaction: check pfn_valid when entering a new MAX_ORDER_NR_PAGES block during...
Mel Gorman [Fri, 3 Feb 2012 23:37:18 +0000 (15:37 -0800)]
mm: compaction: check pfn_valid when entering a new MAX_ORDER_NR_PAGES block during isolation for migration

commit 0bf380bc70ecba68cb4d74dc656cc2fa8c4d801a upstream.

When isolating for migration, migration starts at the start of a zone
which is not necessarily pageblock aligned.  Further, it stops isolating
when COMPACT_CLUSTER_MAX pages are isolated so migrate_pfn is generally
not aligned.  This allows isolate_migratepages() to call pfn_to_page() on
an invalid PFN which can result in a crash.  This was originally reported
against a 3.0-based kernel with the following trace in a crash dump.

PID: 9902   TASK: d47aecd0  CPU: 0   COMMAND: "memcg_process_s"
 #0 [d72d3ad0] crash_kexec at c028cfdb
 #1 [d72d3b24] oops_end at c05c5322
 #2 [d72d3b38] __bad_area_nosemaphore at c0227e60
 #3 [d72d3bec] bad_area at c0227fb6
 #4 [d72d3c00] do_page_fault at c05c72ec
 #5 [d72d3c80] error_code (via page_fault) at c05c47a4
    EAX: 00000000  EBX: 000c0000  ECX: 00000001  EDX: 00000807  EBP: 000c0000
    DS:  007b      ESI: 00000001  ES:  007b      EDI: f3000a80  GS:  6f50
    CS:  0060      EIP: c030b15a  ERR: ffffffff  EFLAGS: 00010002
 #6 [d72d3cb4] isolate_migratepages at c030b15a
 #7 [d72d3d14] zone_watermark_ok at c02d26cb
 #8 [d72d3d2c] compact_zone at c030b8de
 #9 [d72d3d68] compact_zone_order at c030bba1
#10 [d72d3db4] try_to_compact_pages at c030bc84
#11 [d72d3ddc] __alloc_pages_direct_compact at c02d61e7
#12 [d72d3e08] __alloc_pages_slowpath at c02d66c7
#13 [d72d3e78] __alloc_pages_nodemask at c02d6a97
#14 [d72d3eb8] alloc_pages_vma at c030a845
#15 [d72d3ed4] do_huge_pmd_anonymous_page at c03178eb
#16 [d72d3f00] handle_mm_fault at c02f36c6
#17 [d72d3f30] do_page_fault at c05c70ed
#18 [d72d3fb0] error_code (via page_fault) at c05c47a4
    EAX: b71ff000  EBX: 00000001  ECX: 00001600  EDX: 00000431
    DS:  007b      ESI: 08048950  ES:  007b      EDI: bfaa3788
    SS:  007b      ESP: bfaa36e0  EBP: bfaa3828  GS:  6f50
    CS:  0073      EIP: 080487c8  ERR: ffffffff  EFLAGS: 00010202

It was also reported by Herbert van den Bergh against 3.1-based kernel
with the following snippet from the console log.

BUG: unable to handle kernel paging request at 01c00008
IP: [<c0522399>] isolate_migratepages+0x119/0x390
*pdpt = 000000002f7ce001 *pde = 0000000000000000

It is expected that it also affects 3.2.x and current mainline.

The problem is that pfn_valid is only called on the first PFN being
checked and that PFN is not necessarily aligned.  Lets say we have a case
like this

H = MAX_ORDER_NR_PAGES boundary
| = pageblock boundary
m = cc->migrate_pfn
f = cc->free_pfn
o = memory hole

H------|------H------|----m-Hoooooo|ooooooH-f----|------H

The migrate_pfn is just below a memory hole and the free scanner is beyond
the hole.  When isolate_migratepages started, it scans from migrate_pfn to
migrate_pfn+pageblock_nr_pages which is now in a memory hole.  It checks
pfn_valid() on the first PFN but then scans into the hole where there are
not necessarily valid struct pages.

This patch ensures that isolate_migratepages calls pfn_valid when
necessary.

Reported-by: Herbert van den Bergh <herbert.van.den.bergh@oracle.com>
Tested-by: Herbert van den Bergh <herbert.van.den.bergh@oracle.com>
Signed-off-by: Mel Gorman <mgorman@suse.de>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 years agoblock: Disable autoprotect
Martin K. Petersen [Wed, 22 Sep 2010 19:33:37 +0000 (15:33 -0400)]
block: Disable autoprotect

Not all filesystems keep their pages stable during I/O leading to
checksum failures.  Disable automatic protection.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
13 years agoMerge branch 'uek2-stable_hpwdt' of git://ca-git.us.oracle.com/linux-muvarov-public...
Guru Anbalagane [Wed, 8 Feb 2012 00:41:55 +0000 (16:41 -0800)]
Merge branch 'uek2-stable_hpwdt' of git://ca-git.us.oracle.com/linux-muvarov-public into uek2-stable

13 years agoenic: do vlan cleanup
Jiri Pirko [Wed, 20 Jul 2011 04:54:18 +0000 (04:54 +0000)]
enic: do vlan cleanup

- unify vlan and nonvlan rx path
- kill enic->vlan_group and enic_vlan_rx_register

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 6ede746b62627b6f03fe88afad1a07d38917b85d)

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
13 years agoenic: Add support to configure hardware interrupt coalesce timers in a platform indep...
Vasanthy Kolluri [Fri, 17 Jun 2011 07:56:48 +0000 (07:56 +0000)]
enic: Add support to configure hardware interrupt coalesce timers in a platform independent way

enic driver and the underlying hardware use different units for representing the interrupt coalesce timer.
Driver converts the interrupt coalesce timer in usec to hardware cycles while setting the relevant hardware
registers. The conversion factor can be different for each of the adapter hardware types. So it is dynamically
learnt from the adapter firmware using the devcmd CMD_INTR_COAL_CONVERT. This allows the driver to configure
the hardware interrupt coalesce timers in a platform independent way.

Signed-off-by: Danny Guo <dannguo@cisco.com>
Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
(cherry picked from commit ea7ea65a3b37bf207d5c352ac6254506b3dc3901)

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
13 years agoenic: Partial: Bug Fix: Fix hardware transmit queue indexing in enic_poll_controller
Vasanthy Kolluri [Thu, 9 Jun 2011 10:37:07 +0000 (10:37 +0000)]
enic: Partial: Bug Fix: Fix hardware transmit queue indexing in enic_poll_controller

Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Danny Guo <dannguo@cisco.com>
Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit b880a954b9e2585ce325aedd76e4741880cab180)

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
13 years agoenic: Get/Set interrupt resource index for transmit and receive queues
Vasanthy Kolluri [Thu, 9 Jun 2011 10:37:02 +0000 (10:37 +0000)]
enic: Get/Set interrupt resource index for transmit and receive queues

Instead of deriving the index of a transmit/receive interrupt resource
from the transmit/receive queue index, always save and retrieve it
using an additional variable.

Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Danny Guo <dannguo@cisco.com>
Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 7d260ec26ee56495bcb32491d44ed4590cc838a0)

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
13 years agoenic: Log device configuration in detail during driver load
Vasanthy Kolluri [Thu, 9 Jun 2011 10:36:57 +0000 (10:36 +0000)]
enic: Log device configuration in detail during driver load

Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Danny Guo <dannguo@cisco.com>
Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit e1fb77bfd062b8d38fb0e428ae0edcd2dc4ec07b)

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
13 years agoenic: Pass 802.1p bits for packets tagged with vlan zero
Vasanthy Kolluri [Thu, 9 Jun 2011 10:36:52 +0000 (10:36 +0000)]
enic: Pass 802.1p bits for packets tagged with vlan zero

enic driver currently passes 802.1p bits to the upper layers for packets
tagged with non-zero vlan ids only. This patch extends such behaviour to
zero vlan tagged packets also.

The patch is dependant on the following kernel patches:

1) vlan_dev: VLAN 0 should be treated as "no vlan tag" (802.1p packet)
   - net-next-2.6 git commit: ad1afb00393915a51c21b1ae8704562bf036855f
   - Available 2.6.36 and later
2) vlan: Centralize handling of hardware acceleration.
  - net-next-2.6 git commit: 3701e51382a026cba10c60b03efabe534fba4ca4
  - Available 2.6.37 and later

Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Danny Guo <dannguo@cisco.com>
Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 8757446d8df4446fc7f5d24ad6d53e9f265cc021)

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>