]> Pileus Git - ~andy/linux/log
~andy/linux
14 years agoALSA: hda - Add a workaround for ASUS A7K
Takashi Iwai [Tue, 6 Oct 2009 06:31:29 +0000 (08:31 +0200)]
ALSA: hda - Add a workaround for ASUS A7K

ASUS A7K needs additional GPIO1 bit setup; it has to be cleared.
Added a new fixup hook for this laptop so that it works as is.

Refernece: Novell bnc#494309
http://bugzilla.novell.com/show_bug.cgi?id=494309

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agodrm/ttm: fix refcounting in ttm global code.
Dave Airlie [Tue, 29 Sep 2009 03:56:38 +0000 (13:56 +1000)]
drm/ttm: fix refcounting in ttm global code.

the global refcount wasn't being increased after the first reference.
this caused an oops on unload on a multi-gpu card.

Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/fb: add more correct 8/16/24/32 bpp fb support.
Dave Airlie [Tue, 6 Oct 2009 03:54:01 +0000 (13:54 +1000)]
drm/fb: add more correct 8/16/24/32 bpp fb support.

The previous patches had some unwanted side effects, I've fixed
the lack of 32bpp working, and fixed up 16bpp so it should also work.

this also adds the interface to allow the driver to set a preferred
console depth so for example low memory rn50 can set it to 8bpp.
It also catches 24bpp on cards that can't do it and forces 32bpp.

Tested on r100/r600/i945.

Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6
Linus Torvalds [Mon, 5 Oct 2009 21:39:22 +0000 (14:39 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6:
  Revert "ide: try to use PIO Mode 0 during probe if possible"
  ide: use printk_once

14 years agoomap: Lock DPLL5 at boot
Rajendra Nayak [Mon, 5 Oct 2009 20:31:44 +0000 (13:31 -0700)]
omap: Lock DPLL5 at boot

Lock DPLL5 at 120MHz at boot. The USBHOST 120MHz f-clock and
USBTLL f-clock are the only users of this DPLL, and 120MHz is
is the only recommended rate for these clocks.

With this patch, the 60 MHz ULPI clock is generated correctly.

Tested on an OMAP3430 SDP.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap: Fix incorrect 730 vs 850 detection
Tony Lindgren [Mon, 5 Oct 2009 20:31:43 +0000 (13:31 -0700)]
omap: Fix incorrect 730 vs 850 detection

Commit cd92204924fafbd5c7241dfd12ca3176d542e0c5 added
support for omap850. However, the patch accidentally
removed the wrong ifdef:

 #  define cpu_is_omap730() 1
 # endif
 #endif
+#else
+# if defined(CONFIG_ARCH_OMAP850)
+#  undef  cpu_is_omap850
+#  define cpu_is_omap850() 1
+# endif
+#endif

...

 void omap2_check_revision(void);

 #endif    /* defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) */
-
-#endif

Instead of removing removing the #endif at the end of the file,
the #endif before #else should have been removed.

But we cannot have multiple #else statements as pointed out by
Alistair Buxton <a.j.buxton@gmail.com>. So the fix is to:

- remove the non-multi-omap special handling, as we need to
  detect between omap730 and omap850 anyways.

- add the missing #endif back to the end of the file

Reported-by: Sanjeev Premi <premi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoMerge branch 'kvm-updates/2.6.32' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Linus Torvalds [Mon, 5 Oct 2009 19:07:39 +0000 (12:07 -0700)]
Merge branch 'kvm-updates/2.6.32' of git://git.kernel.org/pub/scm/virt/kvm/kvm

* 'kvm-updates/2.6.32' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: add support for change_pte mmu notifiers
  KVM: MMU: add SPTE_HOST_WRITEABLE flag to the shadow ptes
  KVM: MMU: dont hold pagecount reference for mapped sptes pages
  KVM: Prevent overflow in KVM_GET_SUPPORTED_CPUID
  KVM: VMX: flush TLB with INVEPT on cpu migration
  KVM: fix LAPIC timer period overflow
  KVM: s390: fix memsize >= 4G
  KVM: SVM: Handle tsc in svm_get_msr/svm_set_msr correctly
  KVM: SVM: Fix tsc offset adjustment when running nested

14 years agoMerge branch 'fixes-for-linus' of git://git.monstr.eu/linux-2.6-microblaze
Linus Torvalds [Mon, 5 Oct 2009 19:06:59 +0000 (12:06 -0700)]
Merge branch 'fixes-for-linus' of git://git.monstr.eu/linux-2.6-microblaze

* 'fixes-for-linus' of git://git.monstr.eu/linux-2.6-microblaze:
  microblaze: Clear sticky FSR register after saving it to func parametr
  microblaze: UMS is used only for MMU kernel

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Mon, 5 Oct 2009 19:06:40 +0000 (12:06 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sparc: using HZ needs an include of linux/param.h
  sparc32: convert to asm-generic/hardirq.h
  sparc64: Cache per-cpu %pcr register value in perf code.
  sparc64: Fix comment typo in perf_event.c
  sparc64: Minor coding style fixups in perf code.
  sparc64: Add a basic conflict engine in preparation for multi-counter support.
  sparc64: Increase vmalloc size to fix percpu regressions.
  sparc64: Add initial perf event conflict resolution and checks.
  sparc: Niagara1 perf event support.
  sparc: Add Niagara2 HW cache event support.
  sparc: Support all ultra3 and ultra4 derivatives.
  sparc: Support HW cache events.

14 years agoiSCSI/iBFT: use proper address translation
Jan Beulich [Fri, 2 Oct 2009 15:12:39 +0000 (16:12 +0100)]
iSCSI/iBFT: use proper address translation

In virtual environments (namely, Xen Dom0) virt <-> phys and
virt <-> isa-bus translations cannot be freely interchanged (and
even outside such environments it is not really correct to do so).
When looking at memory below 1M, the latter translations should
always be used.

iscsi_ibft_find.c part from: Martin Wilck <martin.wilck@ts.fujitsu.com>.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Konrad Rzeszutek Wilk <ketuzsezs@darnok.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 5 Oct 2009 19:04:41 +0000 (12:04 -0700)]
Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  perf tools: Run generate-cmdlist.sh properly
  perf_event: Clean up perf_event_init_task()
  perf_event: Fix event group handling in __perf_event_sched_*()
  perf timechart: Add a power-only mode
  perf top: Add poll_idle to the skip list

14 years agoMerge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 5 Oct 2009 19:04:16 +0000 (12:04 -0700)]
Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  hrtimer: Remove overly verbose "switch to high res mode" message

14 years agoMerge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 5 Oct 2009 19:03:43 +0000 (12:03 -0700)]
Merge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  kmemtrace: Fix up tracer registration
  tracing: Fix infinite recursion in ftrace_update_pid_func()

14 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Mon, 5 Oct 2009 19:02:18 +0000 (12:02 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: Don't leak 64-bit kernel register values to 32-bit processes
  x86, SLUB: Remove unused CONFIG FAST_CMPXCHG_LOCAL
  x86: earlyprintk: Fix regression to handle serial,ttySn as 1 arg
  x86: Don't generate cmpxchg8b_emu if CONFIG_X86_CMPXCHG64=y
  x86: Fix csum_ipv6_magic asm memory clobber
  x86: Optimize cmpxchg64() at build-time some more

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
Linus Torvalds [Mon, 5 Oct 2009 18:56:55 +0000 (11:56 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
  m68knommu: fix rename of pt_regs offset defines breakage
  m68knommu: remove duplicated #include
  m68knommu: show KiB rather than pages in "Freeing initrd memory:" message

14 years agoOMAP3: PM: introduce a new powerdomain walk helper
Artem Bityutskiy [Thu, 1 Oct 2009 07:01:55 +0000 (10:01 +0300)]
OMAP3: PM: introduce a new powerdomain walk helper

The 'pwrdm_for_each()' function walks powerdomains with a spinlock
locked, so the the callbacks cannot do anything which may sleep.
This patch introduces a 'pwrdm_for_each_nolock()' helper which does
the same, but without the spinlock locked. This fixes the following
lockdep warning:

[    0.000000] WARNING: at kernel/lockdep.c:2460 lockdep_trace_alloc+0xac/0xec()
[    0.000000] Modules linked in:
(unwind_backtrace+0x0/0xdc) from [<c0045464>] (warn_slowpath_common+0x48/0x60)
(warn_slowpath_common+0x48/0x60) from [<c0067dd4>] (lockdep_trace_alloc+0xac/0xec)
(lockdep_trace_alloc+0xac/0xec) from [<c009da14>] (kmem_cache_alloc+0x1c/0xd0)
(kmem_cache_alloc+0x1c/0xd0) from [<c00b21d8>] (d_alloc+0x1c/0x1a4)
(d_alloc+0x1c/0x1a4) from [<c00a887c>] (__lookup_hash+0xd8/0x118)
(__lookup_hash+0xd8/0x118) from [<c00a9f20>] (lookup_one_len+0x84/0x94)
(lookup_one_len+0x84/0x94) from [<c010d12c>] (debugfs_create_file+0x8c/0x20c)
(debugfs_create_file+0x8c/0x20c) from [<c010d320>] (debugfs_create_dir+0x1c/0x20)
(debugfs_create_dir+0x1c/0x20) from [<c000e8cc>] (pwrdms_setup+0x60/0x90)
(pwrdms_setup+0x60/0x90) from [<c002e010>] (pwrdm_for_each+0x30/0x80)
(pwrdm_for_each+0x30/0x80) from [<c000e79c>] (pm_dbg_init+0x7c/0x14c)
(pm_dbg_init+0x7c/0x14c) from [<c00232b4>] (do_one_initcall+0x5c/0x1b8)
(do_one_initcall+0x5c/0x1b8) from [<c00083f8>] (kernel_init+0x90/0x10c)
(kernel_init+0x90/0x10c) from [<c00242c4>] (kernel_thread_exit+0x0/0x8)

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
14 years agoOMAP3: PM: Enable GPIO module-level wakeups
Kevin Hilman [Thu, 10 Sep 2009 15:53:08 +0000 (15:53 +0000)]
OMAP3: PM: Enable GPIO module-level wakeups

Currently, only GPIOs in the wakeup domain (GPIOs in bank 0) are
enabled as wakups.  This patch also enables GPIOs in the PER
powerdomain (banks 2-6) to be used as possible wakeup sources.

In addition, this patch ensures that all GPIO wakeups can wakeup
the MPU using the PM_MPUGRPSEL_<pwrdm> registers.

NOTE: this doesn't enable the individual GPIOs as wakeups, this simply
enables the per-bank wakeups at the powerdomain level.

This problem was discovered by Mike Chan when preventing the CORE
powerdomain from going into retention/off.  When CORE was allowed to
hit retention, GPIO wakeups via IO pad were working fine, but when
CORE remained on, GPIO module-level wakeups were not working properly.

To test, prevent CORE from going inactive/retention/off, thus
preventing the IO chain from being armed:

  # echo 3 > /debug/pm_debug/core_pwrdm/suspend

This ensures that GPIO wakeups happen via module-level wakeups and
not via IO pad.

Tested on 3430SDP using the touchscreen GPIO (gpio 2, in WKUP)
Tested on Zoom2 using the QUART interrup GPIO  (gpio 102, in PER)

Also, c.f. OMAP PM wiki for troubleshooting GPIO wakeup issues:
http://elinux.org/OMAP_Power_Management

Reported-by: Mike Chan <mikechan@google.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
14 years agoOMAP3: PM: USBHOST: clear wakeup events on both hosts
Vikram Pandita [Sat, 18 Jul 2009 00:33:09 +0000 (19:33 -0500)]
OMAP3: PM: USBHOST: clear wakeup events on both hosts

USBHOST module has 2 fclocks (for HOST1 and HOST2), only one iclock
and only a single bit in the WKST register to indicate a wakeup event.

Because of the single WKST bit, we cannot know whether a wakeup event
was on HOST1 or HOST2, so enable both fclocks before clearing the
wakeup event to ensure both hosts can properly clear the event.

Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
14 years agoOMAP3: PM: PRCM interrupt: only handle selected PRCM interrupts
Paul Walmsley [Wed, 22 Jul 2009 17:29:02 +0000 (10:29 -0700)]
OMAP3: PM: PRCM interrupt: only handle selected PRCM interrupts

Clearing wakeup sources is now only done when the PRM indicates a
wakeup source interrupt.  Since we don't handle any other types of
PRCM interrupts right now, warn if we get any other type of PRCM
interrupt.  Either code needs to be added to the PRCM interrupt
handler to react to these, or these other interrupts should be masked
off at init.

Updated after Jon Hunter's PRCM IRQ rework by Kevin Hilman.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
14 years agoOMAP3: PM: PRCM interrupt: check MPUGRPSEL register
Paul Walmsley [Wed, 22 Jul 2009 17:18:07 +0000 (10:18 -0700)]
OMAP3: PM: PRCM interrupt: check MPUGRPSEL register

PM_WKST register contents should be ANDed with the contents of the
MPUGRPSEL registers.  Otherwise the MPU PRCM interrupt handler could
wind up clearing wakeup events meant for the IVA PRCM interrupt
handler. A future revision to this code should be to read a cached
version of MPUGRPSEL from the powerdomain code, since PRM reads are
relatively slow.

Updated after Jon Hunter's PRCM IRQ change by Kevin Hilman

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
14 years agoOMAP3: PM: Prevent hang in prcm_interrupt_handler
Jon Hunter [Sat, 27 Jun 2009 05:07:25 +0000 (00:07 -0500)]
OMAP3: PM: Prevent hang in prcm_interrupt_handler

There are two scenarios where a race condition could result in a hang
in the prcm_interrupt handler. These are:

1). Waiting for PRM_IRQSTATUS_MPU register to clear.
Bit 0 of the PRM_IRQSTATUS_MPU register indicates that a wake-up event
is pending for the MPU. This bit can only be cleared if the all the
wake-up events latched in the various PM_WKST_x registers have been
cleared. If a wake-up event occurred during the processing of the prcm
interrupt handler, after the corresponding PM_WKST_x register was
checked but before the PRM_IRQSTATUS_MPU was cleared, then the CPU
would be stuck forever waiting for bit 0 in PRM_IRQSTATUS_MPU to be
cleared.

2). Waiting for the PM_WKST_x register to clear.
Some power domains have more than one wake-up source. The PM_WKST_x
registers indicate the source of a wake-up event and need to be cleared
after a wake-up event occurs. When the PM_WKST_x registers are read and
before they are cleared, it is possible that another wake-up event
could occur causing another bit to be set in one of the PM_WKST_x
registers. If this did occur after reading a PM_WKST_x register then
the CPU would miss this event and get stuck forever in a loop waiting
for that PM_WKST_x register to clear.

This patch address the above race conditions that would result in a
hang.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Reviewed-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
14 years agomicroblaze: Clear sticky FSR register after saving it to func parametr
Michal Simek [Mon, 28 Sep 2009 06:50:53 +0000 (08:50 +0200)]
microblaze: Clear sticky FSR register after saving it to func parametr

Previous patch d63678d607d0e37ec7abe5ceb545d7e8aab956a4 clear
it for noMMU kernel. This one do it for MMU.

Correct noMMU version

Signed-off-by: Michal Simek <monstr@monstr.eu>
14 years agomicroblaze: UMS is used only for MMU kernel
Michal Simek [Fri, 25 Sep 2009 09:52:50 +0000 (11:52 +0200)]
microblaze: UMS is used only for MMU kernel

Signed-off-by: Michal Simek <monstr@monstr.eu>
14 years agowext: let get_wireless_stats() sleep
Johannes Berg [Mon, 5 Oct 2009 09:22:23 +0000 (02:22 -0700)]
wext: let get_wireless_stats() sleep

A number of drivers (recently including cfg80211-based ones)
assume that all wireless handlers, including statistics, can
sleep and they often also implicitly assume that the rtnl is
held around their invocation. This is almost always true now
except when reading from sysfs:

  BUG: sleeping function called from invalid context at kernel/mutex.c:280
  in_atomic(): 1, irqs_disabled(): 0, pid: 10450, name: head
  2 locks held by head/10450:
   #0:  (&buffer->mutex){+.+.+.}, at: [<c10ceb99>] sysfs_read_file+0x24/0xf4
   #1:  (dev_base_lock){++.?..}, at: [<c12844ee>] wireless_show+0x1a/0x4c
  Pid: 10450, comm: head Not tainted 2.6.32-rc3 #1
  Call Trace:
   [<c102301c>] __might_sleep+0xf0/0xf7
   [<c1324355>] mutex_lock_nested+0x1a/0x33
   [<f8cea53b>] wdev_lock+0xd/0xf [cfg80211]
   [<f8cea58f>] cfg80211_wireless_stats+0x45/0x12d [cfg80211]
   [<c13118d6>] get_wireless_stats+0x16/0x1c
   [<c12844fe>] wireless_show+0x2a/0x4c

Fix this by using the rtnl instead of dev_base_lock.

Reported-by: Miles Lane <miles.lane@gmail.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobe2net: Fix a bug in preparation of mcc wrb which was causing flash operation to...
Ajit Khaparde [Mon, 5 Oct 2009 09:09:40 +0000 (02:09 -0700)]
be2net: Fix a bug in preparation of mcc wrb which was causing flash operation to fail

This patch fixes a bug that got introduced in commit 76998bc7.
During preparation of mcc wrb, req was being wrongly overwritten
and the flash operation was failing.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosparc: using HZ needs an include of linux/param.h
Stephen Rothwell [Mon, 5 Oct 2009 07:46:08 +0000 (00:46 -0700)]
sparc: using HZ needs an include of linux/param.h

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agopcnet_cs: add cis of National Semicondoctor's multifunction pcmcia card
Ken Kawasaki [Mon, 5 Oct 2009 07:40:03 +0000 (00:40 -0700)]
pcnet_cs: add cis of National Semicondoctor's multifunction pcmcia card

pcnet_cs,serial_cs:

add cis of National Semicondoctor's lan&modem mulitifunction pcmcia card,
NE2K, tamarack ethernet card,
and some serial card(COMpad2, COMpad4).

Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: Support inclusion of <linux/socket.h> before <sys/socket.h>
Ben Hutchings [Mon, 5 Oct 2009 07:24:36 +0000 (00:24 -0700)]
net: Support inclusion of <linux/socket.h> before <sys/socket.h>

The following user-space program fails to compile:

    #include <linux/socket.h>
    #include <sys/socket.h>
    int main() { return 0; }

The reason is that <linux/socket.h> tests __GLIBC__ to decide whether it
should define various structures and macros that are now defined for
user-space by <sys/socket.h>, but __GLIBC__ is not defined if no libc
headers have yet been included.

It seems safe to drop support for libc 5 now.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Bastian Blank <waldi@debian.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoALSA: hda - Fix invalid initializations for ALC861 auto mode
Takashi Iwai [Mon, 5 Oct 2009 06:25:13 +0000 (08:25 +0200)]
ALSA: hda - Fix invalid initializations for ALC861 auto mode

The recent auto-parser doesn't work for machines with a single output
with ALC861, such as Toshiba laptops, because alc_subsystem_id() sets
the hp_pins[0] while it's listed in line_outs[0].
This ends up with the doubled initialization of the same mixer widget,
and it mutes the DAC route because hp_pins has no DAC assigned.

To fix this problem, just check spec->autocfg.hp_outs and speaker_outs
so that they are really detected pins.

Reference: Novell bnc#544161
http://bugzilla.novell.com/show_bug.cgi?id=544161

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agopktgen: restore nanosec delays
Eric Dumazet [Sat, 3 Oct 2009 01:39:18 +0000 (01:39 +0000)]
pktgen: restore nanosec delays

Commit fd29cf72 (pktgen: convert to use ktime_t)
inadvertantly converted "delay" parameter from nanosec to microsec.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agopktgen: Fix multiqueue handling
Eric Dumazet [Fri, 2 Oct 2009 20:24:59 +0000 (20:24 +0000)]
pktgen: Fix multiqueue handling

It is not currently possible to instruct pktgen to use one selected tx queue.

When Robert added multiqueue support in commit 45b270f8, he added
an interval (queue_map_min, queue_map_max), and his code doesnt take
into account the case of min = max, to select one tx queue exactly.

I suspect a high performance setup on a eight txqueue device wants
to use exactly eight cpus, and assign one tx queue to each sender.

This patchs makes pktgen select the right tx queue, not the first one.

Also updates Documentation to reflect Robert changes.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Robert Olsson <robert.olsson@its.uu.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: swap max hw supported frame size between 82574 and 82583
Alexander Duyck [Fri, 2 Oct 2009 12:30:42 +0000 (12:30 +0000)]
e1000e: swap max hw supported frame size between 82574 and 82583

There appears to have been a mixup in the max supported jumbo frame size
between 82574 and 82583 which ended up disabling jumbo frames on the 82574
as a result.  This patch swaps the two so that this issue is resolved.

This patch fixes http://bugzilla.kernel.org/show_bug.cgi?id=14261

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: add support for 82599 based X520 10G Dual KX4 Mezz card
Don Skidmore [Fri, 2 Oct 2009 08:58:25 +0000 (08:58 +0000)]
ixgbe: add support for 82599 based X520 10G Dual KX4 Mezz card

This patch adds device support for the 82599 based X520 10GbE
Dual Port KX4 Mezzanine card.

Signed-off-by: Don Skidmore<donald.c.skidmore@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: add support for 82599 Combined Backplane
Don Skidmore [Fri, 2 Oct 2009 08:58:04 +0000 (08:58 +0000)]
ixgbe: add support for 82599 Combined Backplane

This patch will add support for the 82599 Dual port Backplane
device (0x10f8).  This device has the ability to link in serial (KR) and
parallel (KX4/KX) modes, depending on what the switch capabilities are in
the blade chassis.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoRevert "ide: try to use PIO Mode 0 during probe if possible"
David S. Miller [Mon, 5 Oct 2009 04:00:17 +0000 (21:00 -0700)]
Revert "ide: try to use PIO Mode 0 during probe if possible"

This reverts commit 6029336426a2b43e4bc6f4a84be8789a047d139e.

Based upon a report by David Fries, wherein his system hangs
on bootup with sis5513 controller, right after the CDROM
is registered by ide-cd.c and the TOC is first read.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoLinux 2.6.32-rc3 v2.6.32-rc3
Linus Torvalds [Mon, 5 Oct 2009 00:12:30 +0000 (17:12 -0700)]
Linux 2.6.32-rc3

I'm skipping -rc2 because the -rc1 Makefile mistakenly said -rc2, so in
order to avoid confusion, I'm jumping from -rc1 to -rc3.  That way, when
'uname' (or an oops report) says 2.6.32-rc2, there's no confusion about
whether people perhaps meant -rc1 or -rc2.

14 years agodrm/fb: add setcmap and fix 8-bit support.
Dave Airlie [Sun, 4 Oct 2009 23:58:02 +0000 (09:58 +1000)]
drm/fb: add setcmap and fix 8-bit support.

This adds support for the setcmap api and fixes the 8bpp
support at least on radeon hardware. It adds a new load_lut
hook which can be called once the color map is setup.

Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: respect single crtc cards, only create one crtc. (v2)
Dave Airlie [Thu, 1 Oct 2009 23:19:09 +0000 (09:19 +1000)]
drm/radeon/kms: respect single crtc cards, only create one crtc. (v2)

Also add single crtc for RN50 chips.

changes in v2:
fix vblank init to respect single crtc flag
fix r100 mode bandwidth to respect single crtc flag

Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm: Delete the DRM_DEBUG_KMS in drm_mode_cursor_ioctl
Zhao Yakui [Wed, 30 Sep 2009 07:21:43 +0000 (15:21 +0800)]
drm: Delete the DRM_DEBUG_KMS in drm_mode_cursor_ioctl

We can get the corresponding info by adding the boot option of "drm.debug=
0x07". But On some boxes it will print the following message many times in
course of moving mouse. In such case the useful DRM debug info will be flushed.
   >[drm:drm_mode_cursor_ioctl],

Avoid using the DRM_DEBUG_KMS in drm_mode_cursor_ioctl.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: add support for "Surround View"
Alex Deucher [Fri, 2 Oct 2009 21:36:41 +0000 (17:36 -0400)]
drm/radeon/kms: add support for "Surround View"

"Surround View" is an option in the system bios that
enables the AMD IGP chip in conjunction with a
discrete AMD card.  However, since the IGP vbios is
part of the system bios it is not accessible via the
rom bar or the legacy vga location.  When "Surround View"
is enabled in the system bios, the system bios puts a
copy of the IGP vbios image at the start of vram.

This patch adds support for reading the vbios image out
of vram on IGP cards.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agoheaders: remove sched.h from poll.h
Alexey Dobriyan [Sun, 4 Oct 2009 12:11:37 +0000 (16:11 +0400)]
headers: remove sched.h from poll.h

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'acpi-pad' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
Linus Torvalds [Sun, 4 Oct 2009 22:03:00 +0000 (15:03 -0700)]
Merge branch 'acpi-pad' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6

* 'acpi-pad' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
  acpi_pad: build only on X86
  ACPI: create Processor Aggregator Device driver

Fixup trivial conflicts in MAINTAINERS file.

14 years agoMerge branch 'sfi-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb...
Linus Torvalds [Sun, 4 Oct 2009 22:00:08 +0000 (15:00 -0700)]
Merge branch 'sfi-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-sfi-2.6

* 'sfi-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-sfi-2.6:
  SFI: remove __init from sfi_verify_table
  SFI: fix section mismatch warnings in sfi_core.c

14 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
Linus Torvalds [Sun, 4 Oct 2009 21:59:53 +0000 (14:59 -0700)]
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
  ACPI: EC: Don't parse DSDT for EC early init on Compal
  ACPI: EC: Rewrite DMI checks
  ACPI: dock: fix "sibiling" typo
  ACPI: kill overly verbose "throttling states" log messages
  ACPI: Fix bound checks for copy_from_user in the acpi /proc code
  ACPI: fix bus scanning memory leaks
  ACPI: EC: Restart command even if no interrupts from EC
  sony-laptop: Don't unregister the SPIC driver if it wasn't registered
  sony-laptop: remove _INI call at init time
  sony-laptop: SPIC unset IRQF_SHARED, set IRQF_DISABLED
  sony-laptop: remove device_ctrl and the SPIC mini drivers

14 years agoMerge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvar...
Linus Torvalds [Sun, 4 Oct 2009 21:59:14 +0000 (14:59 -0700)]
Merge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging

* 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  macintosh: Don't assume i2c device probing always succeeds
  i2c: Hide probe errors caused by ACPI resource conflicts
  i2c: Minor documentation update
  mfd: AB3100 drop unused module parameters
  Staging: IIO: tsl2561: Drop unused module parameters
  leds: leds-pca9532 - Drop unused module parameters
  ltc4215/ltc4245: Discard obsolete detect methods
  ds2482: Discard obsolete detect method
  max6875: Discard obsolete detect method
  i2c: Move misc devices documentation

14 years agomacintosh: Don't assume i2c device probing always succeeds
Jean Delvare [Sun, 4 Oct 2009 20:53:46 +0000 (22:53 +0200)]
macintosh: Don't assume i2c device probing always succeeds

If i2c device probing fails, then there is no driver to dereference
after calling i2c_new_device(). Stop assuming that probing will always
succeed, to avoid NULL pointer dereferences. We have an easier access
to the driver anyway.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Tim Shepard <shep@alum.mit.edu>
Cc: Colin Leroy <colin@colino.net>
14 years agoi2c: Hide probe errors caused by ACPI resource conflicts
Jean Delvare [Sun, 4 Oct 2009 20:53:45 +0000 (22:53 +0200)]
i2c: Hide probe errors caused by ACPI resource conflicts

When an ACPI resource conflict is detected, error messages are already
printed by ACPI. There's no point in causing the driver core to print
more error messages, so return one of the error codes for which no
message is printed.

This fixes bug #14293:
http://bugzilla.kernel.org/show_bug.cgi?id=14293

Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agoi2c: Minor documentation update
Jean Delvare [Sun, 4 Oct 2009 20:53:45 +0000 (22:53 +0200)]
i2c: Minor documentation update

The sysfs path to i2c adapters has changed recently, update the
documentation to reflect that change.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agomfd: AB3100 drop unused module parameters
Jean Delvare [Sun, 4 Oct 2009 20:53:44 +0000 (22:53 +0200)]
mfd: AB3100 drop unused module parameters

The I2C_CLIENT_INSMOD_1 macro is only useful for i2c drivers which
implement device detection. The ab3100 driver doesn't, so there is no
point in calling it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
14 years agoStaging: IIO: tsl2561: Drop unused module parameters
Jean Delvare [Sun, 4 Oct 2009 20:53:43 +0000 (22:53 +0200)]
Staging: IIO: tsl2561: Drop unused module parameters

The I2C_CLIENT_INSMOD macro is only useful for i2c drivers which
implement device detection. The tsl2561 driver doesn't, so there
is no point in calling it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
14 years agoleds: leds-pca9532 - Drop unused module parameters
Jean Delvare [Sun, 4 Oct 2009 20:53:43 +0000 (22:53 +0200)]
leds: leds-pca9532 - Drop unused module parameters

The I2C_CLIENT_INSMOD_1 macro is only useful for i2c drivers which
implement device detection. The leds-pca9532 driver doesn't, so there
is no point in calling it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Riku Voipio <riku.voipio@iki.fi>
14 years agoltc4215/ltc4245: Discard obsolete detect methods
Jean Delvare [Sun, 4 Oct 2009 20:53:42 +0000 (22:53 +0200)]
ltc4215/ltc4245: Discard obsolete detect methods

There is no point in implementing a detect callback for the LTC4215
and LTC4245, as these devices can't be detected. It was there solely
to handle "force" module parameters to instantiate devices, but now
we have a better sysfs interface that can do the same.

So we can get rid of the ugly module parameters and the detect
callbacks. This shrinks the binary module sizes by 36% and 46%,
respectively.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Ira W. Snyder <iws@ovro.caltech.edu>
14 years agods2482: Discard obsolete detect method
Jean Delvare [Sun, 4 Oct 2009 20:53:41 +0000 (22:53 +0200)]
ds2482: Discard obsolete detect method

There is no point in implementing a detect callback for the DS2482, as
this device can't be detected. It was there solely to handle "force"
module parameters to instantiate devices, but now we have a better sysfs
interface that can do the same.

So we can get rid of the ugly module parameters and the detect callback.
This shrinks the binary module size by 21%.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Ben Gardner <gardner.ben@gmail.com>
14 years agomax6875: Discard obsolete detect method
Jean Delvare [Sun, 4 Oct 2009 20:53:41 +0000 (22:53 +0200)]
max6875: Discard obsolete detect method

There is no point in implementing a detect callback for the MAX6875, as
this device can't be detected. It was there solely to handle "force"
module parameters to instantiate devices, but now we have a better sysfs
interface that can do the same.

So we can get rid of the ugly module parameters and the detect callback.
This basically divides the binary module size by 2.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Ben Gardner <gardner.ben@gmail.com>
14 years agoi2c: Move misc devices documentation
Jean Delvare [Sun, 4 Oct 2009 20:53:40 +0000 (22:53 +0200)]
i2c: Move misc devices documentation

Some times ago the eeprom and max6875 drivers moved to
drivers/misc/eeprom, but their documentation did not follow. It's
finally time to get rid of Documentation/i2c/chips.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Ben Gardner <gardner.ben@gmail.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
14 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
Linus Torvalds [Sun, 4 Oct 2009 19:39:14 +0000 (12:39 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block

* 'for-linus' of git://git.kernel.dk/linux-2.6-block: (41 commits)
  Revert "Seperate read and write statistics of in_flight requests"
  cfq-iosched: don't delay async queue if it hasn't dispatched at all
  block: Topology ioctls
  cfq-iosched: use assigned slice sync value, not default
  cfq-iosched: rename 'desktop' sysfs entry to 'low_latency'
  cfq-iosched: implement slower async initiate and queue ramp up
  cfq-iosched: delay async IO dispatch, if sync IO was just done
  cfq-iosched: add a knob for desktop interactiveness
  Add a tracepoint for block request remapping
  block: allow large discard requests
  block: use normal I/O path for discard requests
  swapfile: avoid NULL pointer dereference in swapon when s_bdev is NULL
  fs/bio.c: move EXPORT* macros to line after function
  Add missing blk_trace_remove_sysfs to be in pair with blk_trace_init_sysfs
  cciss: fix build when !PROC_FS
  block: Do not clamp max_hw_sectors for stacking devices
  block: Set max_sectors correctly for stacking devices
  cciss: cciss_host_attr_groups should be const
  cciss: Dynamically allocate the drive_info_struct for each logical drive.
  cciss: Add usage_count attribute to each logical drive in /sys
  ...

14 years agoRevert "Seperate read and write statistics of in_flight requests"
Jens Axboe [Sun, 4 Oct 2009 19:04:38 +0000 (21:04 +0200)]
Revert "Seperate read and write statistics of in_flight requests"

This reverts commit a9327cac440be4d8333bba975cbbf76045096275.

Corrado Zoccolo <czoccolo@gmail.com> reports:

"with 2.6.32-rc1 I started getting the following strange output from
"iostat -kx 2":
Linux 2.6.31bisect (et2)  04/10/2009  _i686_ (2 CPU)

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
          10,70    0,00    3,16   15,75    0,00   70,38

Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s
avgrq-sz avgqu-sz   await  svctm  %util
sda              18,22     0,00    0,67    0,01    14,77     0,02
43,94     0,01   10,53 39043915,03 2629219,87
sdb              60,89     9,68   50,79    3,04  1724,43    50,52
65,95     0,70   13,06 488437,47 2629219,87

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           2,72    0,00    0,74    0,00    0,00   96,53

Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s
avgrq-sz avgqu-sz   await  svctm  %util
sda               0,00     0,00    0,00    0,00     0,00     0,00
0,00     0,00    0,00   0,00 100,00
sdb               0,00     0,00    0,00    0,00     0,00     0,00
0,00     0,00    0,00   0,00 100,00

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           6,68    0,00    0,99    0,00    0,00   92,33

Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s
avgrq-sz avgqu-sz   await  svctm  %util
sda               0,00     0,00    0,00    0,00     0,00     0,00
0,00     0,00    0,00   0,00 100,00
sdb               0,00     0,00    0,00    0,00     0,00     0,00
0,00     0,00    0,00   0,00 100,00

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           4,40    0,00    0,73    1,47    0,00   93,40

Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s
avgrq-sz avgqu-sz   await  svctm  %util
sda               0,00     0,00    0,00    0,00     0,00     0,00
0,00     0,00    0,00   0,00 100,00
sdb               0,00     4,00    0,00    3,00     0,00    28,00
18,67     0,06   19,50 333,33 100,00

Global values for service time and utilization are garbage. For
interval values, utilization is always 100%, and service time is
higher than normal.

I bisected it down to:
[a9327cac440be4d8333bba975cbbf76045096275] Seperate read and write
statistics of in_flight requests
and verified that reverting just that commit indeed solves the issue
on 2.6.32-rc1."

So until this is debugged, revert the bad commit.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agocfq-iosched: don't delay async queue if it hasn't dispatched at all
Jens Axboe [Sun, 4 Oct 2009 18:36:19 +0000 (20:36 +0200)]
cfq-iosched: don't delay async queue if it hasn't dispatched at all

We cannot delay for the first dispatch of the async queue if it
hasn't dispatched at all, since that could present a local user
DoS attack vector using an app that just did slow timed sync reads
while filling memory.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoperf: Propagate term signal to child
Chris Wilson [Sun, 4 Oct 2009 00:35:01 +0000 (01:35 +0100)]
perf: Propagate term signal to child

If we launch the child on behalf of the user, ensure that it dies
along with ourselves when we are interrupted.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
LKML-Reference: <1254616502-4728-1-git-send-email-chris@chris-wilson.co.uk>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoKVM: add support for change_pte mmu notifiers
Izik Eidus [Wed, 23 Sep 2009 18:47:18 +0000 (21:47 +0300)]
KVM: add support for change_pte mmu notifiers

this is needed for kvm if it want ksm to directly map pages into its
shadow page tables.

[marcelo: cast pfn assignment to u64]

Signed-off-by: Izik Eidus <ieidus@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
14 years agoKVM: MMU: add SPTE_HOST_WRITEABLE flag to the shadow ptes
Izik Eidus [Wed, 23 Sep 2009 18:47:17 +0000 (21:47 +0300)]
KVM: MMU: add SPTE_HOST_WRITEABLE flag to the shadow ptes

this flag notify that the host physical page we are pointing to from
the spte is write protected, and therefore we cant change its access
to be write unless we run get_user_pages(write = 1).

(this is needed for change_pte support in kvm)

Signed-off-by: Izik Eidus <ieidus@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
14 years agoKVM: MMU: dont hold pagecount reference for mapped sptes pages
Izik Eidus [Wed, 23 Sep 2009 18:47:16 +0000 (21:47 +0300)]
KVM: MMU: dont hold pagecount reference for mapped sptes pages

When using mmu notifiers, we are allowed to remove the page count
reference tooken by get_user_pages to a specific page that is mapped
inside the shadow page tables.

This is needed so we can balance the pagecount against mapcount
checking.

(Right now kvm increase the pagecount and does not increase the
mapcount when mapping page into shadow page table entry,
so when comparing pagecount against mapcount, you have no
reliable result.)

Signed-off-by: Izik Eidus <ieidus@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
14 years agoKVM: Prevent overflow in KVM_GET_SUPPORTED_CPUID
Avi Kivity [Sun, 4 Oct 2009 14:45:13 +0000 (16:45 +0200)]
KVM: Prevent overflow in KVM_GET_SUPPORTED_CPUID

The number of entries is multiplied by the entry size, which can
overflow on 32-bit hosts.  Bound the entry count instead.

Reported-by: David Wagner <daw@cs.berkeley.edu>
Cc: stable@kernel.org
Signed-off-by: Avi Kivity <avi@redhat.com>
14 years agoKVM: VMX: flush TLB with INVEPT on cpu migration
Marcelo Tosatti [Thu, 1 Oct 2009 22:16:58 +0000 (19:16 -0300)]
KVM: VMX: flush TLB with INVEPT on cpu migration

It is possible that stale EPTP-tagged mappings are used, if a
vcpu migrates to a different pcpu.

Set KVM_REQ_TLB_FLUSH in vmx_vcpu_load, when switching pcpus, which
will invalidate both VPID and EPT mappings on the next vm-entry.

Cc: stable@kernel.org
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
14 years agoKVM: fix LAPIC timer period overflow
Aurelien Jarno [Fri, 25 Sep 2009 09:09:37 +0000 (11:09 +0200)]
KVM: fix LAPIC timer period overflow

Don't overflow when computing the 64-bit period from 32-bit registers.

Fixes sourceforge bug #2826486.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Cc: stable@kernel.org
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
14 years agoKVM: s390: fix memsize >= 4G
Christian Borntraeger [Mon, 21 Sep 2009 08:45:18 +0000 (10:45 +0200)]
KVM: s390: fix memsize >= 4G

commit 628eb9b8a8f3
    KVM: s390: streamline memslot handling

introduced kvm_s390_vcpu_get_memsize. This broke guests >=4G, since this
function returned an int.

This patch changes the return value to a long.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
14 years agoKVM: SVM: Handle tsc in svm_get_msr/svm_set_msr correctly
Joerg Roedel [Wed, 16 Sep 2009 13:24:18 +0000 (15:24 +0200)]
KVM: SVM: Handle tsc in svm_get_msr/svm_set_msr correctly

When running nested we need to touch the l1 guests
tsc_offset. Otherwise changes will be lost or a wrong value
be read.

Cc: stable@kernel.org
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
14 years agoKVM: SVM: Fix tsc offset adjustment when running nested
Joerg Roedel [Wed, 16 Sep 2009 13:24:17 +0000 (15:24 +0200)]
KVM: SVM: Fix tsc offset adjustment when running nested

When svm_vcpu_load is called while the vcpu is running in
guest mode the tsc adjustment made there is lost on the next
emulated #vmexit. This causes the tsc running backwards in
the guest. This patch fixes the issue by also adjusting the
tsc_offset in the emulated hsave area so that it will not
get lost.

Cc: stable@kernel.org
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
14 years agoMerge branch 'for-linus' of git://www.linux-m32r.org/git/takata/linux-2.6_dev
Linus Torvalds [Sun, 4 Oct 2009 04:57:06 +0000 (21:57 -0700)]
Merge branch 'for-linus' of git://www.linux-m32r.org/git/takata/linux-2.6_dev

* 'for-linus' of git://www.linux-m32r.org/git/takata/linux-2.6_dev:
  m32r: Fix IPI function calls for SMP
  m32r: Fix set_memory() for DISCONTIGMEM
  m32r: add rtc_lock variable
  m32r: define ioread* and iowrite* macros
  m32r: export delay loop symbols
  m32r: fix tme_handler

14 years agotty: Avoid dropping ldisc_mutex over hangup tty re-initialization
Linus Torvalds [Sun, 4 Oct 2009 04:44:21 +0000 (21:44 -0700)]
tty: Avoid dropping ldisc_mutex over hangup tty re-initialization

A couple of people have hit the WARN_ON() in drivers/char/tty_io.c,
tty_open() that is unhappy about seeing the tty line discipline go away
during the tty hangup. See for example

http://bugzilla.kernel.org/show_bug.cgi?id=14255

and the reason is that we do the tty_ldisc_halt() outside the
ldisc_mutex in order to be able to flush the scheduled work without a
deadlock with vhangup_work.

However, it turns out that we can solve this particular case by

 - using "cancel_delayed_work_sync()" in tty_ldisc_halt(), which waits
   for just the particular work, rather than synchronizing with any
   random outstanding pending work.

   This won't deadlock, since the buf.work we synchronize with doesn't
   care about the ldisc_mutex, it just flushes the tty ldisc buffers.

 - realize that for this particular case, we don't need to wait for any
   hangup work, because we are inside the hangup codepaths ourselves.

so as a result we can just drop the flush_scheduled_work() entirely, and
then move the tty_ldisc_halt() call to inside the mutex.  That way we
never expose the partially torn down ldisc state to tty_open(), and hold
the ldisc_mutex over the whole sequence.

Reported-by: Ingo Molnar <mingo@elte.hu>
Reported-by: Heinz Diehl <htd@fancy-poultry.org>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agom32r: Fix IPI function calls for SMP
Toshihiro HANAWA [Fri, 2 Oct 2009 08:52:54 +0000 (17:52 +0900)]
m32r: Fix IPI function calls for SMP

This patch fixes the m32r SMP kernel after 2.6.27.

A part of the following patch breaks m32r SMP operation.
> m32r: convert to generic helpers for IPI function calls
> commit 7b7426c8a615cf61df9a77b9df7d5b75d91e3fa0

In the above patch, a CALL_FUNC_SINGLE_IPI was newly introduced,
but the its IPI vector number was wrong in the patch code.

The m32r SMP kernel hanged-up during boot operation, because
the CPU_BOOT_IPI was called instead of CALL_FUNC_SINGLE_IPI
(CPU_BOOT_IPI had no side effect at that time because the 2nd
core had already been started up),
as a result, csd_unlock() was not called, then a dead lock
occurred in csd_lock_wait() after the detection of Compact Flash
memory as IDE generic disk.

Signed-off-by: Toshihiro HANAWA <hanawa@ccs.tsukuba.ac.jp>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
14 years agom32r: Fix set_memory() for DISCONTIGMEM
Hirokazu Takata [Wed, 23 Sep 2009 12:37:06 +0000 (21:37 +0900)]
m32r: Fix set_memory() for DISCONTIGMEM

In case CONFIG_DISCONTIGMEM is set, the memory size of system was
always determined by CONFIG_MEMORY_SIZE and was not changeable.

This patch fixes set_memory() of arch/m32r/mm/discontig.c so that
we can specify memory size by the "mem=<size>" kernel parameter.

Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
14 years agom32r: add rtc_lock variable
Hirokazu Takata [Wed, 26 Aug 2009 04:13:12 +0000 (13:13 +0900)]
m32r: add rtc_lock variable

Add a spinlock variable "rtc_lock".
This is taken from arch/arm/kernel/time.c.

Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
14 years agom32r: define ioread* and iowrite* macros
Hirokazu Takata [Wed, 26 Aug 2009 04:04:33 +0000 (13:04 +0900)]
m32r: define ioread* and iowrite* macros

Define ioread* and iowrite* macros to fix the following build errors:

  CC [M]  drivers/uio/uio_smx.o
drivers/uio/uio_smx.c: In function 'smx_handler':
drivers/uio/uio_smx.c:31: error: implicit declaration of function 'ioread32'
drivers/uio/uio_smx.c:37: error: implicit declaration of function 'iowrite32'

Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
14 years agom32r: export delay loop symbols
Hirokazu Takata [Wed, 26 Aug 2009 04:09:12 +0000 (13:09 +0900)]
m32r: export delay loop symbols

- Move EXPORT_SYMBOL lines of delay loop functions
  from arch/m32r/kernel/m32r_ksyms.c to arch/m32r/lib/delay.c.
- Export __ndelay.

Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
14 years agom32r: fix tme_handler
Hirokazu Takata [Tue, 11 Aug 2009 14:12:41 +0000 (23:12 +0900)]
m32r: fix tme_handler

Fix pmd_bad check code of tme_handler (TLB Miss Exception handler).
The correct _KERNPG_TABLE value is not 0x263(=611) but 0x163.

Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
14 years agoblock: Topology ioctls
Martin K. Petersen [Sat, 3 Oct 2009 18:52:01 +0000 (20:52 +0200)]
block: Topology ioctls

Not all users of the topology information want to use libblkid.  Provide
the topology information through bdev ioctls.

Also clarify sector size comments for existing BLK ioctls.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Sat, 3 Oct 2009 18:25:30 +0000 (11:25 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of ssh://master.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (21 commits)
  ALSA: usb - Use strlcat() correctly
  ALSA: Fix invalid __exit in sound/mips/*.c
  ALSA: hda - Fix / improve ALC66x parser
  ALSA: ctxfi: Swapped SURROUND-SIDE mute
  sound: Make keywest_driver static
  ALSA: intel8x0 - Mute External Amplifier by default for Sony VAIO VGN-B1VP
  ALSA: hda - Fix digita/analog mic auto-switching with IDT codecs
  ASoC: fix kconfig order of Blackfin drivers
  ALSA: hda - Added quirk to enable sound on Toshiba NB200
  ASoC: Fix dependency of CONFIG_SND_PXA2XX_SOC_IMOTE2
  ALSA: Don't assume i2c device probing always succeeds
  ALSA: intel8x0 - Mute External Amplifier by default for Sony VAIO VGN-T350P
  ALSA: echoaudio - Re-enable the line-out control for the Mia card
  ALSA: hda - Resurrect input-source mixer of ALC268 model=acer
  ALSA: hda - Analog Devices AD1984A add HP Touchsmart model
  ALSA: hda - Add HP Pavilion dv4t-1300 to MSI whitelist
  ALSA: hda - CD-audio sound for hda-intel conexant benq laptop
  ASoC: DaVinci: Correct McASP FIFO initialization
  ASoC: Davinci: Fix race with cpu_dai->dma_data
  ASoC: DaVinci: Fix divide by zero error during 1st execution
  ...

14 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Linus Torvalds [Sat, 3 Oct 2009 18:24:19 +0000 (11:24 -0700)]
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
  [PATCH] ext4: retry failed direct IO allocations
  ext4: Fix build warning in ext4_dirty_inode()
  ext4: drop ext4dev compat
  ext4: fix a BUG_ON crash by checking that page has buffers attached to it

14 years agocfq-iosched: use assigned slice sync value, not default
Jens Axboe [Sat, 3 Oct 2009 17:46:03 +0000 (19:46 +0200)]
cfq-iosched: use assigned slice sync value, not default

We should use the sysfs modified slice sync value, in case it differs
from the default.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agocfq-iosched: rename 'desktop' sysfs entry to 'low_latency'
Jens Axboe [Sat, 3 Oct 2009 17:42:18 +0000 (19:42 +0200)]
cfq-iosched: rename 'desktop' sysfs entry to 'low_latency'

Don't think that's necessarily a perfect description of what this
option fiddles with, but it's probably better than 'desktop'.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoMerge branch 'fix/hda' into for-linus
Takashi Iwai [Sat, 3 Oct 2009 16:31:33 +0000 (18:31 +0200)]
Merge branch 'fix/hda' into for-linus

14 years agoMerge branch 'fix/asoc' into for-linus
Takashi Iwai [Sat, 3 Oct 2009 16:31:22 +0000 (18:31 +0200)]
Merge branch 'fix/asoc' into for-linus

14 years agocfq-iosched: implement slower async initiate and queue ramp up
Jens Axboe [Sat, 3 Oct 2009 14:26:03 +0000 (16:26 +0200)]
cfq-iosched: implement slower async initiate and queue ramp up

This slowly ramps up the async queue depth based on the time
passed since the sync IO, and doesn't allow async at all until
a sync slice period has passed.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agocfq-iosched: delay async IO dispatch, if sync IO was just done
Vivek Goyal [Sat, 3 Oct 2009 13:21:27 +0000 (15:21 +0200)]
cfq-iosched: delay async IO dispatch, if sync IO was just done

o Do not allow more than max_dispatch requests from an async queue, if some
  sync request has finished recently. This is in the hope that sync activity
  is still going on in the system and we might receive a sync request soon.
  Most likely from a sync queue which finished a request and we did not enable
  idling on it.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoMerge branch 'misc' into release
Len Brown [Sat, 3 Oct 2009 05:31:37 +0000 (01:31 -0400)]
Merge branch 'misc' into release

14 years agoMerge branch 'bugzilla-14081' into release
Len Brown [Sat, 3 Oct 2009 05:31:34 +0000 (01:31 -0400)]
Merge branch 'bugzilla-14081' into release

14 years agoagp: parisc-agp.c - use correct page_mask function
Helge Deller [Sun, 27 Sep 2009 21:13:04 +0000 (21:13 +0000)]
agp: parisc-agp.c - use correct page_mask function

This commit:

Commit 2a4ceb6d3e6a566cb4a9dc8f974177f031d27cd7
Author: David Woodhouse <David.Woodhouse@intel.com>
Date:   Mon Jul 27 10:27:29 2009 +0100
     agp: Switch mask_memory() method to take address argument again, not page

broke the parisc AGP driver (again). This patch fixes it.

Signed-off-by: Helge Deller <deller@gmx.de>
Acked-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
14 years agoACPI: EC: Don't parse DSDT for EC early init on Compal
Alexey Starikovskiy [Fri, 2 Oct 2009 16:21:40 +0000 (20:21 +0400)]
ACPI: EC: Don't parse DSDT for EC early init on Compal

Compal DSDT breaks if scanned early, while we need early scan
for almost all ASUS machines. Safest workaround seems to be to
continue do an early scan for all machines, but this Compal model.

http://bugzilla.kernel.org/show_bug.cgi?id=14086

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoACPI: EC: Rewrite DMI checks
Alexey Starikovskiy [Fri, 2 Oct 2009 16:21:33 +0000 (20:21 +0400)]
ACPI: EC: Rewrite DMI checks

Use dmi_check_system() for DMI matching.
Don't use string "Notebook" for matching MSI hardware.

http://bugzilla.kernel.org/show_bug.cgi?id=14081

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoSFI: remove __init from sfi_verify_table
Arjan van de Ven [Fri, 2 Oct 2009 14:29:47 +0000 (07:29 -0700)]
SFI: remove __init from sfi_verify_table

sfi_verify_table() is called at runtime, and thus cannot be __init

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoACPI: dock: fix "sibiling" typo
Alex Chiang [Thu, 1 Oct 2009 17:59:23 +0000 (11:59 -0600)]
ACPI: dock: fix "sibiling" typo

Crossword clues as haikus:

Snakes from the same brood
fighting Jackson on a plane?
sibilant siblings

I guess Will Shortz's job is still secure.

Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoACPI: kill overly verbose "throttling states" log messages
Roland Dreier [Wed, 30 Sep 2009 20:58:03 +0000 (13:58 -0700)]
ACPI: kill overly verbose "throttling states" log messages

I was recently lucky enough to get a 64-CPU system.  The processors
actually have T-states, so my kernel log ends up with 64 lines like:

    ACPI: Processor [CPU0] (supports xx throttling states)

This is pretty useless clutter because

 - this info is already available after boot from
   /proc/acpi/processor/CPUnn/throttling

 - there's also an ACPI_DEBUG_PRINT() in processor_throttling.c that
   gives the same info on boot for anyone who *really* cares.

So just delete the code that prints the throttling states in
processor_core.c.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoSFI: fix section mismatch warnings in sfi_core.c
Rakib Mullick [Wed, 30 Sep 2009 23:09:55 +0000 (16:09 -0700)]
SFI: fix section mismatch warnings in sfi_core.c

The function sfi_map_memory/sfi_unmap_memory uses
early_ioremap/early_iounmap respectively, which refers to a __init
function.  And function sfi_check_table also refers to a __init function
sfi_verify_table.  Since the references are valid, so use __ref to get rid
of the warnings.

 We were warned by the following warnings:

  LD      vmlinux.o
  MODPOST vmlinux.o
WARNING: vmlinux.o(.text+0xb6ba3a): Section mismatch in reference from
the function sfi_map_memory() to the function
.init.text:early_ioremap()
The function sfi_map_memory() references
the function __init early_ioremap().
This is often because sfi_map_memory lacks a __init
annotation or the annotation of early_ioremap is wrong.

WARNING: vmlinux.o(.text+0xb6bab6): Section mismatch in reference from
the function sfi_unmap_memory() to the function
.init.text:early_iounmap()
The function sfi_unmap_memory() references
the function __init early_iounmap().
This is often because sfi_unmap_memory lacks a __init
annotation or the annotation of early_iounmap is wrong.

WARNING: vmlinux.o(.text+0xb6be30): Section mismatch in reference from
the function sfi_check_table() to the function
.init.text:sfi_verify_table()
The function sfi_check_table() references
the function __init sfi_verify_table().
This is often because sfi_check_table lacks a __init
annotation or the annotation of sfi_verify_table is wrong.

Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoACPI: Fix bound checks for copy_from_user in the acpi /proc code
Arjan van de Ven [Sat, 26 Sep 2009 18:50:25 +0000 (20:50 +0200)]
ACPI: Fix bound checks for copy_from_user in the acpi /proc code

The ACPI /proc write() code takes an unsigned length argument like any write()
function, but then assigned it to a *signed* integer called "len".
Only after this is a sanity check for len done to make it not larger than 4.

Due to the type change a len < 0 is in principle also possible; this patch
adds a check for this.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years ago[PATCH] ext4: retry failed direct IO allocations
Eric Sandeen [Sat, 3 Oct 2009 01:20:55 +0000 (21:20 -0400)]
[PATCH] ext4: retry failed direct IO allocations

On a 256M filesystem, doing this in a loop:

        xfs_io -F -f -d -c 'pwrite 0 64m' test
        rm -f test

eventually leads to ENOSPC.  (the xfs_io command does a
64m direct IO write to the file "test")

As with other block allocation callers, it looks like we need to
potentially retry the allocations on the initial ENOSPC.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoext4: Fix build warning in ext4_dirty_inode()
Curt Wohlgemuth [Sat, 3 Oct 2009 01:08:32 +0000 (21:08 -0400)]
ext4: Fix build warning in ext4_dirty_inode()

This fixes the following warning:

fs/ext4/inode.c: In function 'ext4_dirty_inode':
fs/ext4/inode.c:5615: warning: unused variable 'current_handle'

We remove the jbd_debug() statement which does use current_handle, as
it's not terribly important in the grand scheme of things.

Thanks to Stephen Rothwell for pointing this out.

Signed-off-by: Curt Wohlgemuth <curtw@google.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Fri, 2 Oct 2009 23:20:43 +0000 (16:20 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm: (25 commits)
  ARM: 5728/1: Proper prefetch abort handling on ARMv6 and ARMv7
  ARM: 5727/1: Pass IFSR register to do_PrefetchAbort()
  ARM: 5740/1: fix valid_phys_addr_range() range check
  ARM: 5739/1: ARM: allow empty ATAG_CORE
  ARM: 5735/1: sa1111: CodingStyle cleanups
  ARM: 5738/1: Correct TCM documentation
  ARM: 5734/1: arm: fix compilation of entry-common.S for older CPUs
  ARM: 5733/1: fix bcmring compile error
  ARM: 5732/1: remove redundant include file
  ARM: 5731/2: Fix U300 generic GPIO, remove ifdefs from MMCI v3
  ARM: Ensure do_cache_op takes mmap_sem
  ARM: Fix __cpuexit section mismatch warnings
  ARM: Don't allow highmem on SMP platforms without h/w TLB ops broadcast
  ARM: includecheck fix: mach-davinci, board-dm365-evm.c
  ARM: Remove unused CONFIG SA1100_H3XXX
  ARM: Fix warning: unused variable 'highmem'
  ARM: Fix warning: #warning syscall migrate_pages not implemented
  ARM: Fix SA11x0 clocksource warning
  ARM: Fix SA1100 Neponset serial section mismatch
  ARM: Fix SA1100 Assabet/Neponset PCMCIA section mismatch warnings
  ...

14 years agoARM: 5728/1: Proper prefetch abort handling on ARMv6 and ARMv7
Kirill A. Shutemov [Fri, 25 Sep 2009 12:40:49 +0000 (13:40 +0100)]
ARM: 5728/1: Proper prefetch abort handling on ARMv6 and ARMv7

Currently, on ARMv6 and ARMv7, if an application tries to execute
code (or garbage) on non-executable page it hangs. It caused by
incorrect prefetch abort handling. Now every prefetch abort
processes as a translation fault.

To fix this we have to analyze instruction fault status register
to figure out reason why we've got the abort and process it
accordingly.

To make IFSR different from DFSR we set bit 31 which is reserved in
both IFSR and DFSR.

This patch also tries to protect from future hangs on unexpected
exceptions. An application will be killed if unexpected exception
type was received.

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5727/1: Pass IFSR register to do_PrefetchAbort()
Kirill A. Shutemov [Fri, 25 Sep 2009 12:39:47 +0000 (13:39 +0100)]
ARM: 5727/1: Pass IFSR register to do_PrefetchAbort()

Instruction fault status register, IFSR, was introduced on ARMv6 to
provide status information about the last insturction fault. It
needed for proper prefetch abort handling.

Now we have three prefetch abort model:

  * legacy - for CPUs before ARMv6. They doesn't provide neither
    IFSR nor IFAR. We simulate IFSR with section translation fault
    status for them to generalize code;
  * ARMv6 - provides IFSR, but not IFAR;
  * ARMv7 - provides both IFSR and IFAR.

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>