]> www.infradead.org Git - users/jedix/linux-maple.git/log
users/jedix/linux-maple.git
13 years agoocfs2: Tighten free bit calculation in the global bitmap
Sunil Mushran [Tue, 8 Nov 2011 21:00:19 +0000 (13:00 -0800)]
ocfs2: Tighten free bit calculation in the global bitmap

When clearing bits in the global bitmap, we do not test the current bit value.
This patch tightens the code by considering the possiblity that the bit being
cleared was already cleared.

Now this should not happen. But we are seeing stray instances in which free
bit count in the global bitmap exceeds the total bit count. In each instance
the bitmap is correct. Only the free bit count is incorrect.

This patch checks the current bit value and increments the free bit count
only if the bit was previously set. It also prints information to allow
us to debug further.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
13 years agoocfs2/trivial: Limit unaligned aio+dio write messages to once per day
Sunil Mushran [Wed, 7 Sep 2011 18:39:30 +0000 (11:39 -0700)]
ocfs2/trivial: Limit unaligned aio+dio write messages to once per day

It was printing more frequently.

Signed-off-cy: Sunil Mushran <sunil.mushran@oracle.com>

13 years agoMerge branch 'loop' of git://ca-git.us.oracle.com/linux-dkleikam-public into uek2-200
Maxim Uvarov [Fri, 23 Mar 2012 01:38:26 +0000 (18:38 -0700)]
Merge branch 'loop' of git://ca-git.us.oracle.com/linux-dkleikam-public into uek2-200

13 years agobtrfs: btrfs_direct_IO_bvec() needs to check for sector alignment
Dave Kleikamp [Thu, 22 Mar 2012 22:19:44 +0000 (17:19 -0500)]
btrfs: btrfs_direct_IO_bvec() needs to check for sector alignment

I left out a vital piece of btrfs_direct_IO_bvec(). I didn't think
check_direct_IO() was needed, but it is. This patch creates its
equivalent, check_direct_IO_bvec().

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
13 years agoMerge branch 'loop' of git://ca-git.us.oracle.com/linux-dkleikam-public into buek2-200
Maxim Uvarov [Thu, 22 Mar 2012 17:36:09 +0000 (10:36 -0700)]
Merge branch 'loop' of git://ca-git.us.oracle.com/linux-dkleikam-public into buek2-200

13 years agoMerge branch 'uek2-merge' of git://ca-git.us.oracle.com/linux-konrad-public into...
Maxim Uvarov [Thu, 22 Mar 2012 17:35:15 +0000 (10:35 -0700)]
Merge branch 'uek2-merge' of git://ca-git.us.oracle.com/linux-konrad-public into buek2-200

13 years agoloop: increase default number of loop devices to 512
Dave Kleikamp [Thu, 22 Mar 2012 16:58:15 +0000 (11:58 -0500)]
loop: increase default number of loop devices to 512

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
13 years agoxen/merge error: Re-introduce xen-platform-pci driver.
Konrad Rzeszutek Wilk [Thu, 22 Mar 2012 14:23:34 +0000 (10:23 -0400)]
xen/merge error: Re-introduce xen-platform-pci driver.

The merge 98687483f3918349f96697261b491ee41b824871:

    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

mismerged the Makefile. The end result that the line
obj-$(CONFIG_XEN_PVHVM) += platform_pci.o was removed
leading to no PVonHVM driver to tell QEMU to unplug the device.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agox86/PCI: reduce severity of host bridge window conflict warnings
Bjorn Helgaas [Sat, 2 Jul 2011 16:47:12 +0000 (10:47 -0600)]
x86/PCI: reduce severity of host bridge window conflict warnings

Host bridge windows are top-level resources, so if we find a host bridge
window conflict, it's probably with a hard-coded legacy reservation.
Moving host bridge windows is theoretically possible, but we don't support
it; we just ignore windows with conflicts, and it's not worth making this
a user-visible error.

Reported-and-tested-by: Jools Wills <jools@oxfordinspire.co.uk>
References: https://bugzilla.kernel.org/show_bug.cgi?id=38522
Reported-by: Das <dasfox@gmail.com>
References: https://bugzilla.kernel.org/show_bug.cgi?id=16497
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Fixes Oracle Bug 13818972
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoSPEC: v2.6.39-200.0.5
Maxim Uvarov [Thu, 22 Mar 2012 00:34:38 +0000 (17:34 -0700)]
SPEC: v2.6.39-200.0.5

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoMerge branch 'loop' of git://ca-git.us.oracle.com/linux-dkleikam-public into buek2-200
Maxim Uvarov [Thu, 22 Mar 2012 00:31:57 +0000 (17:31 -0700)]
Merge branch 'loop' of git://ca-git.us.oracle.com/linux-dkleikam-public into buek2-200

13 years agoSPEC: v2.6.39-200.0.4
Maxim Uvarov [Thu, 22 Mar 2012 00:23:10 +0000 (17:23 -0700)]
SPEC: v2.6.39-200.0.4

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
13 years agoocfs2/trivial: Print message indicating unaligned aio+dio write
Sunil Mushran [Mon, 15 Aug 2011 20:49:11 +0000 (13:49 -0700)]
ocfs2/trivial: Print message indicating unaligned aio+dio write

Print a message indicating unaligned aio+dio writes. It prints a message
once per 24 hrs.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
13 years agoocfs2: Avoid livelock in ocfs2_readpage()
Jan Kara [Mon, 15 Aug 2011 17:09:33 +0000 (10:09 -0700)]
ocfs2: Avoid livelock in ocfs2_readpage()

[Pulled before push to mainline]

When someone writes to an inode, readers accessing the same inode via
ocfs2_readpage() just busyloop trying to get ip_alloc_sem because
do_generic_file_read() looks up the page again and retries ->readpage()
when previous attempt failed with AOP_TRUNCATED_PAGE. When there are enough
readers, they can occupy all CPUs and in non-preempt kernel the system is
deadlocked because writer holding ip_alloc_sem is never run to release the
semaphore. Fix the problem by making reader block on ip_alloc_sem to break
the busy loop.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Joel Becker <jlbec@evilplan.org>
13 years agoocfs2: serialize unaligned aio
Mark Fasheh [Mon, 15 Aug 2011 17:08:44 +0000 (10:08 -0700)]
ocfs2: serialize unaligned aio

[Pulled before push to mainline]

Fix a corruption that can happen when we have (two or more) outstanding
aio's to an overlapping unaligned region.  Ext4
(e9e3bcecf44c04b9e6b505fd8e2eb9cea58fb94d) and xfs recently had to fix
similar issues.

In our case what happens is that we can have an outstanding aio on a region
and if a write comes in with some bytes overlapping the original aio we may
decide to read that region into a page before continuing (typically because
of buffered-io fallback).  Since we have no ordering guarantees with the
aio, we can read stale or bad data into the page and then write it back out.

If the i/o is page and block aligned, then we avoid this issue as there
won't be any need to read data from disk.

I took the same approach as Eric in the ext4 patch and introduced some
serialization of unaligned async direct i/o.  I don't expect this to have an
effect on the most common cases of AIO.  Unaligned aio will be slower
though, but that's far more acceptable than data corruption.

Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Joel Becker <jlbec@evilplan.org>
13 years agoocfs2: null deref on allocation error
Dan Carpenter [Mon, 15 Aug 2011 16:55:36 +0000 (09:55 -0700)]
ocfs2: null deref on allocation error

[Pulled before push to mainline]

The original code had a null derefence in the error handling.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Joel Becker <jlbec@evilplan.org>
13 years agoocfs2: Bugfix for hard readonly mount
Tiger Yang [Mon, 15 Aug 2011 16:54:55 +0000 (09:54 -0700)]
ocfs2: Bugfix for hard readonly mount

[Pulled before push to mainline]

ocfs2 cannot currently mount a device that is readonly at the media
("hard readonly").  Fix the broken places.
see detail: http://oss.oracle.com/bugzilla/show_bug.cgi?id=1322

[ Description edited -- Joel ]

Signed-off-by: Tiger Yang <tiger.yang@oracle.com>
Reviewed-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Joel Becker <jlbec@evilplan.org>
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 agoxen/acpi: Remove the WARN's as they just create noise.
Konrad Rzeszutek Wilk [Wed, 21 Mar 2012 15:43:32 +0000 (11:43 -0400)]
xen/acpi: Remove the WARN's as they just create noise.

When booting the kernel under machines that do not have P-states
we would end up with:

------------[ cut here ]------------
 WARNING: at drivers/xen/xen-acpi-processor.c:504
 xen_acpi_processor_init+0x286/0
 x2e0()
 Hardware name: ProLiant BL460c G6
 Modules linked in:
 Pid: 1, comm: swapper Not tainted 2.6.39-200.0.3.el5uek #1
 Call Trace:
  [<ffffffff8191d056>] ? xen_acpi_processor_init+0x286/0x2e0
  [<ffffffff81068300>] warn_slowpath_common+0x90/0xc0
  [<ffffffff8191cdd0>] ? check_acpi_ids+0x1e0/0x1e0
  [<ffffffff8106834a>] warn_slowpath_null+0x1a/0x20
  [<ffffffff8191d056>] xen_acpi_processor_init+0x286/0x2e0
  [<ffffffff8191cdd0>] ? check_acpi_ids+0x1e0/0x1e0
  [<ffffffff81002168>] do_one_initcall+0xe8/0x130

.. snip..

Which is OK - the machines do not have P-states, so we fail to register
to process the _PXX states. But there is no need to WARN the user
of it.

Oracle BZ# 13871288
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@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>