]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Mon, 15 Sep 2008 05:50:43 +0000 (22:50 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: talitos - Avoid consecutive packets going out with same IV

15 years agocrypto: talitos - Avoid consecutive packets going out with same IV
Kim Phillips [Sun, 14 Sep 2008 20:41:19 +0000 (13:41 -0700)]
crypto: talitos - Avoid consecutive packets going out with same IV

The SEC's h/w IV out implementation DMAs the trailing encrypted payload
block of the last encryption to ctx->iv.  Since the last encryption may
still be pending completion, we can sufficiently prevent successive
packets from being transmitted with the same IV by xoring with sequence
number.

Also initialize alg_list earlier to prevent oopsing on a failed probe.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Lee Nipper <lee.nipper@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
15 years agox86/paravirt: Remove duplicate paravirt_pagetable_setup_{start, done}()
Alex Nixon [Wed, 3 Sep 2008 13:36:40 +0000 (14:36 +0100)]
x86/paravirt: Remove duplicate paravirt_pagetable_setup_{start, done}()

They were already called once in arch/x86/kernel/setup.c - we don't need to call them again.

fixes:

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

Signed-off-by: Alex Nixon <alex.nixon@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoxen: fix for xen guest with mem > 3.7G
Jeremy Fitzhardinge [Sun, 14 Sep 2008 14:42:23 +0000 (07:42 -0700)]
xen: fix for xen guest with mem > 3.7G

PFN_PHYS() can truncate large addresses unless its passed a suitable
large type.  This is fixed more generally in the patch series
introducing phys_addr_t, but we need a short-term fix to solve a
Xen regression reported by Roberto De Ioris.

Reported-by: Roberto De Ioris <roberto@unbit.it>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoAdd Uwe Kleine-König to .mailmap
Uwe Kleine-König [Sat, 13 Sep 2008 20:29:31 +0000 (22:29 +0200)]
Add Uwe Kleine-König to .mailmap

There are a few commits that misencoded my name (or used "oe" instead of
"ö").  So add a correct version to .mailmap.

Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Sat, 13 Sep 2008 21:51:22 +0000 (14:51 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] Fix PCI_DMA_BUS_IS_PHYS for ARM
  [ARM] 5247/1: tosa: SW_EAR_IN support
  [ARM] 5246/1: tosa: add proper clock alias for tc6393xb clock
  [ARM] 5245/1: Fix warning about unused return value in drivers/pcmcia
  [ARM] OMAP: Fix MMC device data
  imx serial: fix rts handling for non imx1 based hardware
  imx serial: set RXD mux bit on i.MX27 and i.MX31
  i.MX serial: fix init failure
  pcm037: add rts/cts support for serial port

15 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Sat, 13 Sep 2008 21:48:14 +0000 (14:48 -0700)]
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  [libata] LBA28/LBA48 off-by-one bug in ata.h
  sata_inic162x: enable LED blinking
  ata: duplicate variable sparse warning

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
Linus Torvalds [Sat, 13 Sep 2008 21:47:33 +0000 (14:47 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
  PCI: re-add debug prints for unmodified BARs
  PCI: fix pciehp_free_irq()
  PCI Hotplug: fakephp: fix deadlock... again
  PCI: Fix printk warnings in setup-bus.c
  PCI: Fix printk warnings in probe.c
  PCI/iommu: blacklist DMAR on Intel G31/G33 chipsets

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Sat, 13 Sep 2008 21:46:57 +0000 (14:46 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  niu: panic on reset
  netlink: fix overrun in attribute iteration
  [Bluetooth] Fix regression from using default link policy
  ath9k: Assign seq# when mac80211 requests this

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Sat, 13 Sep 2008 21:45:42 +0000 (14:45 -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: Fix user_regset 'n' field values.
  sparc64: Fix PCI error interrupt registry on PSYCHO.
  sparc32: Fix function signature of of_bus_sbus_get_flags().
  sparc64: Fix interrupt register calculations on Psycho and Sabre.

15 years agomemstick: fix MSProHG 8-bit interface mode support
Alex Dubov [Sat, 13 Sep 2008 09:33:26 +0000 (02:33 -0700)]
memstick: fix MSProHG 8-bit interface mode support

- 8-bit interface mode never worked properly.  The only adapter I have
  which supports the 8b mode (the Jmicron) had some problems with its
  clock wiring and they discovered it only now.  We also discovered that
  ProHG media is more sensitive to the ordering of initialization
  commands.

- Make the driver fall back to highest supported mode instead of always
  falling back to serial.  The driver will attempt the switch to 8b mode
  for any new MSPro card, but not all of them support it.  Previously,
  these new cards ended up in serial mode, which is not the best idea
  (they work fine with 4b, after all).

- Edit some macros for better conformance to Sony documentation

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agorescan_partitions(): make device capacity errors non-fatal
Andrew Morton [Sat, 13 Sep 2008 09:33:25 +0000 (02:33 -0700)]
rescan_partitions(): make device capacity errors non-fatal

Herton Krzesinski reports that the error-checking changes in
04ebd4aee52b06a2c38127d9208546e5b96f3a19 ("block/ioctl.c and
fs/partition/check.c: check value returned by add_partition") cause his
buggy USB camera to no longer mount.  "The camera is an Olympus X-840.
The original issue comes from the camera itself: its format program
creates a partition with an off by one error".

Buggy devices happen.  It is better for the kernel to warn and to proceed
with the mount.

Reported-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Cc: Abdel Benamrouche <draconux@gmail.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agospi_s3c24xx: fix section warning
Ben Dooks [Sat, 13 Sep 2008 09:33:24 +0000 (02:33 -0700)]
spi_s3c24xx: fix section warning

Fix the section mismatch warning generated by the incorrect naming of
s3c24xx_spidrv which should be s3c24xx_spi_driver:

WARNING: drivers/spi/spi_s3c24xx.o(.data+0x4):
  Section mismatch in reference from the variable s3c24xx_spidrv
  to the (unknown reference) .exit.text:(unknown)

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoatmel_lcdfb: disable LCD and DMA engines when suspending
Haavard Skinnemoen [Sat, 13 Sep 2008 09:33:23 +0000 (02:33 -0700)]
atmel_lcdfb: disable LCD and DMA engines when suspending

When suspending the system with atmel_lcdfb enabled, I sometimes see
this:

atmel_lcdfb atmel_lcdfb.0: FIFO underflow 0x10

Which can be explained by the fact that we're not stopping the LCD
controller and its DMA engine when suspending, we're just gating the
clocks to them.

There's another potential issue which may be harder to trigger but
much more nasty: If we gate the clocks at _just_ the right moment,
e.g. when the DMA engine is doing a bus transaction, we may cause the
DMA engine to violate the system bus protocol and cause a lockup.

Avoid these issues by shutting down the LCD controller before entering
suspend (and restarting it when resuming). This prevents the underrun
from happening in the first place, and prevents whatever nastiness is
happening when the bus clock stops in the middle of a DMA transfer.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoia64: fix panic during `modprobe -r xpc'
Robin Holt [Sat, 13 Sep 2008 09:33:22 +0000 (02:33 -0700)]
ia64: fix panic during `modprobe -r xpc'

If you are on ia64 and you modprobe xpc then modprobe -r xpc, you
immediately get a panic.  xpc depends on xp which depends on gru for a
symbol.  That symbol is only used when we are running on UV hardware.

Currently, the GRU driver detects we are not on UV hardware and does no
initializing.  It does not do the same check when unloading.  As a result,
the gru driver attempts to tear down stuff that was not setup.

This is a simple two-line workaround to get us through this release.  Once
2.6.28 is opened, we need to rework the symbols that xp is depending on
from gru so the gru driver can properly fail to load when hardware is not
available.

Signed-off-by: Robin Holt <holt@sgi.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMAINTAINERS: fix USB VIDEO CLASS mail list address
Ming Lei [Sat, 13 Sep 2008 09:33:21 +0000 (02:33 -0700)]
MAINTAINERS: fix USB VIDEO CLASS mail list address

It should be linux-uvc-devel@lists.berlios.de.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoDocumentation/ABI: /sys/class/gpio
David Brownell [Sat, 13 Sep 2008 09:33:20 +0000 (02:33 -0700)]
Documentation/ABI: /sys/class/gpio

Provide summary ABI docs about the /sys/class/gpio files.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomm: mark the correct zone as full when scanning zonelists
Mel Gorman [Sat, 13 Sep 2008 09:33:19 +0000 (02:33 -0700)]
mm: mark the correct zone as full when scanning zonelists

The iterator for_each_zone_zonelist() uses a struct zoneref *z cursor when
scanning zonelists to keep track of where in the zonelist it is.  The
zoneref that is returned corresponds to the the next zone that is to be
scanned, not the current one.  It was intended to be treated as an opaque
list.

When the page allocator is scanning a zonelist, it marks elements in the
zonelist corresponding to zones that are temporarily full.  As the
zonelist is being updated, it uses the cursor here;

  if (NUMA_BUILD)
        zlc_mark_zone_full(zonelist, z);

This is intended to prevent rescanning in the near future but the zoneref
cursor does not correspond to the zone that has been found to be full.
This is an easy misunderstanding to make so this patch corrects the
problem by changing zoneref cursor to be the current zone being scanned
instead of the next one.

Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Cc: Andy Whitcroft <apw@shadowen.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: <stable@kernel.org> [2.6.26.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agopxa2xx_spi: dma bugfixes
Ned Forrester [Sat, 13 Sep 2008 09:33:18 +0000 (02:33 -0700)]
pxa2xx_spi: dma bugfixes

Fixes two DMA bugs in the pxa2xx_spi driver.  The first bug is in all
versions of this driver; the second was introduced in the 2.6.20 kernel,
and prevents using the driver with chips like m25p16 flash (which can
issue large DMA reads).

 1. Zero length transfers are permitted for use to insert timing,
    but pxa2xx_spi.c will fail if this is requested in DMA mode.
    Fixed by using programmed I/O (PIO) mode for such transfers.

 2. Transfers larger than 8191 are not permitted in DMA mode.  A
    test for length rejects all large transfers regardless of DMA
    or PIO mode.  Worked around by rejecting only large transfers
    with DMA mapped buffers, and forcing all other transfers
    larger than 8191 to use PIO mode.  A rate limited warning is
    issued for DMA transfers forced to PIO mode.

This patch should apply to all kernels back to and including 2.6.20;
it was test patched against 2.6.20.  An additional patch would be
required for older kernels, but those versions are very buggy anyway.

Signed-off-by: Ned Forrester <nforrester@whoi.edu>
Cc: Vernon Sauder <vernoninhand@gmail.com>
Cc: Eric Miao <eric.y.miao@gmail.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: <stable@kernel.org> [2.6.25.x, 2.6.26.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agopxa2xx_spi: chipselect bugfixes
Ned Forrester [Sat, 13 Sep 2008 09:33:17 +0000 (02:33 -0700)]
pxa2xx_spi: chipselect bugfixes

Fixes several chipselect bugs in the pxa2xx_spi driver.  These bugs are in
all versions of this driver and prevent using it with chips like m25p16
flash.

 1. The spi_transfer.cs_change flag is handled too early:
    before spi_transfer.delay_usecs applies, thus making the
    delay ineffective at holding chip select.

 2. spi_transfer.delay_usecs is ignored on the last transfer
    of a message (likewise not holding chipselect long enough).

 3. If spi_transfer.cs_change is set on the last transfer, the
    chip select is always disabled, instead of the intended
    meaning: optionally holding chip select enabled for the
    next message.

Those first three bugs were fixed with a relocation of delays
and chip select de-assertions.

 4. If a message has the cs_change flag set on the last transfer,
    and had the chip select stayed enabled as requested (see 3,
    above), it would not have been disabled if the next message is
    for a different chip.  Fixed by dropping chip select regardless
    of cs_change at end of a message, if there is no next message
    or if the next message is for a different chip.

This patch should apply to all kernels back to and including 2.6.20;
it was test patched against 2.6.20.  An additional patch would be
required for older kernels, but those versions are very buggy anyway.

Signed-off-by: Ned Forrester <nforrester@whoi.edu>
Cc: Vernon Sauder <vernoninhand@gmail.com>
Cc: Eric Miao <eric.y.miao@gmail.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: <stable@kernel.org> [2.6.25.x, 2.6.26.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agospi_mpc83xx: reject invalid transfer sizes
Peter Korsgaard [Sat, 13 Sep 2008 09:33:15 +0000 (02:33 -0700)]
spi_mpc83xx: reject invalid transfer sizes

Error out on transfer length != multiple of bytes per word with -EINVAL.
Fixes a buffer overrun crash if length < bytes per word.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agospi_mpc83xx: fix clockrate calculation for low speed
Peter Korsgaard [Sat, 13 Sep 2008 09:33:14 +0000 (02:33 -0700)]
spi_mpc83xx: fix clockrate calculation for low speed

Commit a61f5345 (spi_mpc83xx clockrate fixes) broke clockrate calculation
for low speeds.  SPMODE_DIV16 should be set if the divider is higher than
64, not only if the divider gets clipped to 1024.

Furthermore, the clipping check was off by a factor 16 as well.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomm: ifdef Quicklists in /proc/meminfo
Hugh Dickins [Sat, 13 Sep 2008 09:33:13 +0000 (02:33 -0700)]
mm: ifdef Quicklists in /proc/meminfo

A "Quicklists:          0 kB" line has just started appearing in
/proc/meminfo, but most architectures (including x86) don't have
them configured, so #ifdef it, like the highmem lines.

And those architectures which do have quicklists configured are
using them for page tables: so let's place it next to PageTables.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Acked-by: Christoph Lameter <cl@linux-foundation.org>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agobfs: fix Lockdep warning
Eric Sesterhenn [Sat, 13 Sep 2008 09:33:12 +0000 (02:33 -0700)]
bfs: fix Lockdep warning

This fixes:

  =============================================
  [ INFO: possible recursive locking detected ]
  2.6.27-rc5-00283-g70bb089 #68
  ---------------------------------------------
  touch/6855 is trying to acquire lock:
   (&info->bfs_lock){--..}, at: [<c02262f5>] bfs_delete_inode+0x9e/0x18c

  but task is already holding lock:
   (&info->bfs_lock){--..}, at: [<c0226c00>] bfs_create+0x45/0x187

  other info that might help us debug this:
  2 locks held by touch/6855:
   #0:  (&type->i_mutex_dir_key#5){--..}, at: [<c018ad13>] do_filp_open+0x10b/0x62f
   #1:  (&info->bfs_lock){--..}, at: [<c0226c00>] bfs_create+0x45/0x187

  stack backtrace:
  Pid: 6855, comm: touch Not tainted 2.6.27-rc5-00283-g70bb089 #68
   [<c013e769>] validate_chain+0x458/0x9f4
   [<c013bece>] ? trace_hardirqs_off+0xb/0xd
   [<c013f36b>] __lock_acquire+0x666/0x6e0
   [<c013f440>] lock_acquire+0x5b/0x77
   [<c02262f5>] ? bfs_delete_inode+0x9e/0x18c
   [<c06aab74>] mutex_lock_nested+0xbc/0x234
   [<c02262f5>] ? bfs_delete_inode+0x9e/0x18c
   [<c02262f5>] ? bfs_delete_inode+0x9e/0x18c
   [<c02262f5>] bfs_delete_inode+0x9e/0x18c
   [<c0226257>] ? bfs_delete_inode+0x0/0x18c
   [<c01925e1>] generic_delete_inode+0x94/0xfe
   [<c019265d>] generic_drop_inode+0x12/0x12f
   [<c0191b7e>] iput+0x4b/0x4e
   [<c0226d1e>] bfs_create+0x163/0x187
   [<c0188b42>] vfs_create+0xa6/0x114
   [<c018adb5>] do_filp_open+0x1ad/0x62f
   [<c0107cdc>] ? native_sched_clock+0x82/0x96
   [<c06ac309>] ? _spin_unlock+0x27/0x3c
   [<c019379e>] ? alloc_fd+0xbf/0xc9
   [<c06ae2f4>] ? sub_preempt_count+0x9d/0xab
   [<c019379e>] ? alloc_fd+0xbf/0xc9
   [<c0180391>] do_sys_open+0x42/0xb8
   [<c041d564>] ? trace_hardirqs_on_thunk+0xc/0x10
   [<c0180449>] sys_open+0x1e/0x26
   [<c01038bd>] sysenter_do_call+0x12/0x31
   =======================

The problem is that we don't unlock the bfs->lock mutex before calling
iput (we do in the other cases).

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Cc: Tigran Aivazian <tigran@aivazian.fsnet.co.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocoredump_filter: add description of bit 4
Hidehiro Kawai [Sat, 13 Sep 2008 09:33:10 +0000 (02:33 -0700)]
coredump_filter: add description of bit 4

There is no description of bit 4 of coredump_filter in the
documentation.  This patch adds it.

Signed-off-by: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
Cc: Roland McGrath <roland@redhat.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocpuset: hotplug documentation fix
Li Zefan [Sat, 13 Sep 2008 09:33:09 +0000 (02:33 -0700)]
cpuset: hotplug documentation fix

If all the cpus in a cpuset are offlined, the tasks in it will be moved to
the nearest ancestor with non-empty cpus.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Paul Jackson <pj@sgi.com>
Cc: Paul Menage <menage@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocpuset: avoid changing cpuset's cpus when -errno returned
Li Zefan [Sat, 13 Sep 2008 09:33:08 +0000 (02:33 -0700)]
cpuset: avoid changing cpuset's cpus when -errno returned

After the patch:

commit 0b2f630a28d53b5a2082a5275bc3334b10373508
Author: Miao Xie <miaox@cn.fujitsu.com>
Date:   Fri Jul 25 01:47:21 2008 -0700

    cpusets: restructure the function update_cpumask() and update_nodemask()

It might happen that 'echo 0 > /cpuset/sub/cpus' returned failure but 'cpus'
has been changed, because cpus was changed before calling heap_init() which
may return -ENOMEM.

This patch restores the orginal behavior.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Paul Menage <menage@google.com>
Cc: Paul Jackson <pj@sgi.com>
Cc: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoinclude/linux/ioport.h: add missing macro argument for devm_release_* family
Hiroshi DOYU [Sat, 13 Sep 2008 09:33:07 +0000 (02:33 -0700)]
include/linux/ioport.h: add missing macro argument for devm_release_* family

akpm: these have no callers at this time, but they shall soon, so let's
get them right.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoproc: more debugging for "already registered" case
Alexey Dobriyan [Sat, 13 Sep 2008 09:33:06 +0000 (02:33 -0700)]
proc: more debugging for "already registered" case

Print parent directory name as well.

The aim is to catch non-creation of parent directory when proc_mkdir will
return NULL and all subsequent registrations go directly in /proc instead
of intended directory.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
[ Fixed insane printk string while at it.  - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years ago[libata] LBA28/LBA48 off-by-one bug in ata.h
Taisuke Yamada [Sat, 13 Sep 2008 20:46:15 +0000 (16:46 -0400)]
[libata] LBA28/LBA48 off-by-one bug in ata.h

I recently bought 3 HGST P7K500-series 500GB SATA drives and
had trouble accessing the block right on the LBA28-LBA48 border.
Here's how it fails (same for all 3 drives):

  # dd if=/dev/sdc bs=512 count=1 skip=268435455 > /dev/null
  dd: reading `/dev/sdc': Input/output error
  0+0 records in
  0+0 records out
  0 bytes (0 B) copied, 0.288033 seconds, 0.0 kB/s
  # dmesg
  ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
  ata1.00: BMDMA stat 0x25
  ata1.00: cmd c8/00:08:f8:ff:ff/00:00:00:00:00/ef tag 0 dma 4096 in
  res 51/04:08:f8:ff:ff/00:00:00:00:00/ef Emask 0x1 (device error)
  ata1.00: status: { DRDY ERR }
  ata1.00: error: { ABRT }
  ata1.00: configured for UDMA/33
  ata1: EH complete
  ...

After some investigations, it turned out this seems to be caused
by misinterpretation of the ATA specification on LBA28 access.
Following part is the code in question:

  === include/linux/ata.h ===
  static inline int lba_28_ok(u64 block, u32 n_block)
  {
    /* check the ending block number */
    return ((block + n_block - 1) < ((u64)1 << 28)) && (n_block <= 256);
  }

HGST drive (sometimes) fails with LBA28 access of {block = 0xfffffff,
n_block = 1}, and this behavior seems to be comformant. Other drives,
including other HGST drives are not that strict, through.

>From the ATA specification:
(http://www.t13.org/Documents/UploadedDocuments/project/d1410r3b-ATA-ATAPI-6.pdf)

  8.15.29  Word (61:60): Total number of user addressable sectors
  This field contains a value that is one greater than the total number
  of user addressable sectors (see 6.2). The maximum value that shall
  be placed in this field is 0FFFFFFFh.

So the driver shouldn't use the value of 0xfffffff for LBA28 request
as this exceeds maximum user addressable sector. The logical maximum
value for LBA28 is 0xffffffe.

The obvious fix is to cut "- 1" part, and the patch attached just do
that. I've been using the patched kernel for about a month now, and
the same fix is also floating on the net for some time. So I believe
this fix works reliably.

Just FYI, many Windows/Intel platform users also seems to be struck
by this, and HGST has issued a note pointing to Intel ICH8/9 driver.

  "28-bit LBA command is being used to access LBAs 29-bits in length"
http://www.hitachigst.com/hddt/knowtree.nsf/cffe836ed7c12018862565b000530c74/b531b8bce8745fb78825740f00580e23

Also, *BSDs seems to have similar fix included sometime around ~2004,
through I have not checked out exact portion of the code.

Signed-off-by: Taisuke Yamada <tai@rakugaki.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agosata_inic162x: enable LED blinking
Bob Stewart [Thu, 11 Sep 2008 09:50:03 +0000 (11:50 +0200)]
sata_inic162x: enable LED blinking

Enable LED blinking.

Signed-off-by: Bob Stewart <bob@evoria.net>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agoata: duplicate variable sparse warning
Stephen Hemminger [Mon, 8 Sep 2008 16:31:39 +0000 (09:31 -0700)]
ata: duplicate variable sparse warning

drivers/ata/ata_piix.c:1502:7: warning: symbol 'rc' shadows an earlier one

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years ago[ARM] Fix PCI_DMA_BUS_IS_PHYS for ARM
Russell King [Sat, 13 Sep 2008 20:23:06 +0000 (21:23 +0100)]
[ARM] Fix PCI_DMA_BUS_IS_PHYS for ARM

PCI_DMA_BUS_IS_PHYS was defined to be zero, which meant we ignored
the DMA mask for IDE and SCSI transfers.  This is wrong - we have
no DMA translation hardware.  We want to obey DMA masks so that the
block layer performs bouncing itself.

Reported-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years agoMerge branch 'for-rmk' of git://pasiphae.extern.pengutronix.de/git/imx/linux-2.6.git
Russell King [Sat, 13 Sep 2008 19:10:59 +0000 (20:10 +0100)]
Merge branch 'for-rmk' of git://pasiphae.extern.pengutronix.de/git/imx/linux-2.6.git

15 years ago[ARM] 5247/1: tosa: SW_EAR_IN support
Dmitry Baryshkov [Thu, 11 Sep 2008 00:28:51 +0000 (01:28 +0100)]
[ARM] 5247/1: tosa: SW_EAR_IN support

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Acked-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years ago[ARM] 5246/1: tosa: add proper clock alias for tc6393xb clock
Dmitry Baryshkov [Wed, 10 Sep 2008 09:30:37 +0000 (10:30 +0100)]
[ARM] 5246/1: tosa: add proper clock alias for tc6393xb clock

Add clock alias for clock that is used by tc6393xb device on tosa.
As that chip plays pretty major part in tosa life and is currently
disabled, this is 2.4.27 material.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years ago[ARM] 5245/1: Fix warning about unused return value in drivers/pcmcia
Jürgen Schindele [Mon, 8 Sep 2008 21:06:29 +0000 (22:06 +0100)]
[ARM] 5245/1: Fix warning about unused return value in drivers/pcmcia

Fix warning when compiling "drivers/pcmcia/soc-common.c"
The return value of the function "device_create_file"
was not used / assigned.

Signed-off-by: Jrgen Schindele <linux@schindele.name>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years agoARM: OMAP2: Fix definition of SGX clock register bits
Daniel Stone [Wed, 27 Aug 2008 01:31:59 +0000 (04:31 +0300)]
ARM: OMAP2: Fix definition of SGX clock register bits

The GFX/SGX functional and interface clocks have different masks, for
some unknown reason, so split EN_SGX_SHIFT into one each for fclk and
iclk.

Correct according to the TRM and the far more important 'does this
actually work at all?' metric.

Signed-off-by: Daniel Stone <daniel.stone@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoASoC: OMAP: Fix Gumstix Overo machine driver by using snd_soc_dai struct (rev 2)
Jarkko Nikula [Fri, 12 Sep 2008 20:52:19 +0000 (13:52 -0700)]
ASoC: OMAP: Fix Gumstix Overo machine driver by using snd_soc_dai struct (rev 2)

Structs snd_soc_codec_dai and snd_soc_cpu_dai are obsolete and are merged to
snd_soc_dai by the commit 8687eb8bded8c3c5842a85bd0c30e43fc5a3e0e0.

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Acked-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoomap: usb: ehci: fix use of hcd->regs
Felipe Balbi [Fri, 12 Sep 2008 18:22:56 +0000 (21:22 +0300)]
omap: usb: ehci: fix use of hcd->regs

From 818dc8ebd261cdc59670fe1580248ad47f18a1de Mon Sep 17 00:00:00 2001
From: Felipe Balbi <felipe.balbi@nokia.com>
Date: Fri, 12 Sep 2008 21:07:09 +0300
Subject: [PATCH] omap: usb: ehci: fix usb of hcd->regs

hcd->regs should be initialized by ioremaping hcd->rsrc_start and
hcd->rsrc_len. Fix it for ehci-omap.c.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoomapfb: use proper bits per pixel for beagleboard.
Felipe Contreras [Fri, 12 Sep 2008 22:28:20 +0000 (01:28 +0300)]
omapfb: use proper bits per pixel for beagleboard.

This was suggested by Mans Rullgard, otherwise it doesn't work.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoARM: OMAP: Fix cpu detection
Tony Lindgren [Fri, 12 Sep 2008 23:32:15 +0000 (16:32 -0700)]
ARM: OMAP: Fix cpu detection

At some point while adding omap2 support, IS_OMAP_CLASS broke as pointed out
by Russell King. Fix this to work as it used to work, and modify omap24xx and
omap34xx detection to work accordingly.

Also rename OMAP3430_REV_ES2_2 to OMAP3430_REV_ES3_0.

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoARM: OMAP: Split omap2 cpu detection into 24xx and 34xx specific functions
Tony Lindgren [Fri, 12 Sep 2008 23:25:39 +0000 (16:25 -0700)]
ARM: OMAP: Split omap2 cpu detection into 24xx and 34xx specific functions

Also add omap_type() to detect between GP/EMU/HS omap, and remove
unnecessary variable class.

This is to make room for further clean-up of omap processor detection.

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoPCI: re-add debug prints for unmodified BARs
Yinghai Lu [Tue, 9 Sep 2008 19:27:52 +0000 (12:27 -0700)]
PCI: re-add debug prints for unmodified BARs

Print out for device BAR values before the kernel tries to update them.
Also make related output use KERN_DEBUG.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
15 years agoAdd missing variable to twl4030-power.c
Tony Lindgren [Fri, 12 Sep 2008 23:24:54 +0000 (16:24 -0700)]
Add missing variable to twl4030-power.c

As pointed out by Felipe Balbi.

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoniu: panic on reset
Santwona Behera [Fri, 12 Sep 2008 23:04:26 +0000 (16:04 -0700)]
niu: panic on reset

The reset_task function in the niu driver does not reset the tx and rx
buffers properly. This leads to panic on reset. This patch is a
modified implementation of the previously posted fix.

Signed-off-by: Santwona Behera <santwona.behera@sun.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc: Fix user_regset 'n' field values.
David S. Miller [Fri, 12 Sep 2008 22:01:31 +0000 (15:01 -0700)]
sparc: Fix user_regset 'n' field values.

As noticed by Russell King, we were not setting this properly
to the number of entries, but rather the total size.

This results in the core dumping code allocating waayyyy too
much memory.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc64: Fix PCI error interrupt registry on PSYCHO.
David S. Miller [Fri, 12 Sep 2008 22:13:15 +0000 (15:13 -0700)]
sparc64: Fix PCI error interrupt registry on PSYCHO.

We need to pass IRQF_SHARED, otherwise we get things like:

IRQ handler type mismatch for IRQ 33
current handler: PSYCHO_UE
Call Trace:
 [000000000048394c] request_irq+0xac/0x120
 [00000000007c5f6c] psycho_scan_bus+0x98/0x158
 [00000000007c2bc0] pcibios_init+0xdc/0x12c
 [0000000000426a5c] do_one_initcall+0x1c/0x160
 [00000000007c0180] kernel_init+0x9c/0xfc
 [0000000000427050] kernel_thread+0x30/0x60
 [00000000006ae1d0] rest_init+0x10/0x60

on e3500 and similar systems.

On a single board, the UE interrupts of two Psycho nodes
are funneled through the same interrupt, from of_debug=3
dump:

/pci@b,4000: direct translate 2ee --> 21
 ...
/pci@b,2000: direct translate 2ee --> 21

Decimal "33" mentioned above is the hex "21" mentioned here.

Thanks to Meelis Roos for dumps and testing.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoOMAP2/3 clock: warn if clock is missing clockdomain
Paul Walmsley [Wed, 10 Sep 2008 16:48:10 +0000 (10:48 -0600)]
OMAP2/3 clock: warn if clock is missing clockdomain

At this point, all OMAP2/3 clocks should be associated with a clockdomain.
Warn in clk_register() if any are missing a clockdomain

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP3 clock: remove duplicate call to omap2_init_clk_clkdm()
Paul Walmsley [Wed, 10 Sep 2008 16:48:07 +0000 (10:48 -0600)]
OMAP3 clock: remove duplicate call to omap2_init_clk_clkdm()

The OMAP3 arch clock init code already calls omap2_init_clk_clkdm(), so there
is no reason to call it again in the per-clock init.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP2 clockdomain: add virt_opp_clkdm
Paul Walmsley [Wed, 10 Sep 2008 16:48:04 +0000 (10:48 -0600)]
OMAP2 clockdomain: add virt_opp_clkdm

Every OMAP2/3 clock will need to be associated with a clockdomain.
However, the "virt_prcm_set" clock has no clockdomain, since it is a
virtual clock without any hardware referents.  So, create a new
clockdomain, "virt_clkdm", for this clock.  This clockdomain should be
reusable for OMAP3 virtual clock nodes.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP2/3 clock: note clockdomains for remaining clocks
Paul Walmsley [Wed, 10 Sep 2008 16:48:01 +0000 (10:48 -0600)]
OMAP2/3 clock: note clockdomains for remaining clocks

Fill in clockdomains for all remaining clocks.  On OMAP2, these mostly
involve IVA and DSP clocks; on OMAP3, these mostly involve some core_l4_clkdm
devices and the secure peripherals.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP3 clock: mark DPLL clocks with their DPLLx clockdomains
Paul Walmsley [Wed, 10 Sep 2008 16:47:58 +0000 (10:47 -0600)]
OMAP3 clock: mark DPLL clocks with their DPLLx clockdomains

Mark each DPLL clock as belonging to their respective DPLL clockdomain.
cf. 34xx TRM Table 4-27 (among other references).

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP3 PRCM: add DPLL1-5 powerdomains, clockdomains
Paul Walmsley [Wed, 10 Sep 2008 16:47:55 +0000 (10:47 -0600)]
OMAP3 PRCM: add DPLL1-5 powerdomains, clockdomains

Each DPLL exists in its own powerdomain (cf 34xx TRM figure 4-18) and
clockdomain; so, create powerdomain and clockdomain structures for them.
These are used in a following patch for DPLL-related clocks.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP2/3 clockdomain: remove wkup_clkdm
Paul Walmsley [Wed, 10 Sep 2008 16:47:52 +0000 (10:47 -0600)]
OMAP2/3 clockdomain: remove wkup_clkdm

Remove wkup_clkdm, as it has been completely replaced by prm_clkdm and
cm_clkdm.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP2/3 clock: mark the rest of the CM clocks as belonging to cm_clkdm
Paul Walmsley [Wed, 10 Sep 2008 16:47:49 +0000 (10:47 -0600)]
OMAP2/3 clock: mark the rest of the CM clocks as belonging to cm_clkdm

Mark CM clocks with no clockdomain as belonging to the CM clockdomain.

References for the OMAP3xxx clocks:

OMAP34xx Multimedia Device Silicon Revision 3.0 Version I TRM
  Figure 4-13:
     - sys_ck
  Figure 4-35:
     - sys_clkout2
  Figure 4-37:
     - corex2_fck, core_ck, dss_tv_fck
  Figure 4-38:
     - omap_96m_alwon_fck
  Figure 4-39:
     - corex2_fck, cm_96m_fck, omap_96m_fck, omap_54m_fck, omap_12m_fck,
       dpll1_fck, dpll2_fck, rm_ick, dss_tv_fck
  Section 4.7.3.2:
     - omap_96m_alwon_fck, omap_96m_fck, omap_48m_fck

OMAP34xx Multimedia High Security (HS) Device Silicon Revision 3.0 Security
Addendum Version B TRM
  Figure 3-19:
     - cpefuse_fck
  Table 3-57:
     - dss_tv_fck

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP2/3 clock: convert wkup_clkdm CM clocks to cm_clkdm
Paul Walmsley [Wed, 10 Sep 2008 16:47:46 +0000 (10:47 -0600)]
OMAP2/3 clock: convert wkup_clkdm CM clocks to cm_clkdm

Convert existing wkup_clkdm clocks that should be in the CM clockdomain
to cm_clkdm.  (A later patch will add CM clockdomain associations for
unassociated clocks.)

References:

OMAP2420 Multimedia Processor Silicon Revision 2.1.1, 2.2 TRM Version Q
   Figure 5-9
      - func_54m_ck, core_ck, func_96m_ck, func_48m_ck, func_12m_ck

OMAP34xx Multimedia Device Silicon Revision 3.0 Version I TRM
   Figure 4-35
      - sys_clkout2

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP2/3 clock: annotate PRM clocks that are missing clockdomains
Paul Walmsley [Wed, 10 Sep 2008 16:47:43 +0000 (10:47 -0600)]
OMAP2/3 clock: annotate PRM clocks that are missing clockdomains

Some PRM clocks are missing clockdomain assignments; add them.

Also, in OMAP2xxx clock tree, standardize the name for wdt1_osc_ck.

References for the OMAP2xxx clocks:

OMAP2420 Multimedia Processor Silicon Revision 2.1.1, 2.2 TRM Version Q
  Table 18-41:
      - wdt1_osc_ck

References for the OMAP3xxx clocks:

OMAP34xx Multimedia Device Silicon Revision 3.0 Version I TRM
  Figure 4-13:
      - sys_clkout1,
  Table 4-37:
      - sys_ck
  Table 4-38:
      - omap_32k_fck, osc_sys_ck,
  Figure 4-56:
      - sr1_fck, sr2_fck
  Figure 4-57:
      - omap_96m_alwon_fck
  Section 4.7.7.13:
      - sr1_fck, sr2_fck

OMAP34xx Multimedia High Security (HS) Device Silicon Revision 3.0 Security
Addendum Version B TRM
  Table 2-5:
      - usim_fck
  Figure 3-29:
      - secure_32k_fck, gpt12_fck, wdt1_fck

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP2/3 clock: convert wkup_clkdm PRM clocks to prm_clkdm
Paul Walmsley [Wed, 10 Sep 2008 16:47:39 +0000 (10:47 -0600)]
OMAP2/3 clock: convert wkup_clkdm PRM clocks to prm_clkdm

Convert existing wkup_clkdm clocks that should be in the PRM clockdomain
to prm_clkdm.  (A later patch will add PRM clockdomain associations for
unassociated clocks.)

References for the OMAP2xxx clocks:

OMAP2420 Multimedia Processor Silicon Revision 2.1.1, 2.2 TRM Version Q
  Figure 4-11:
      - alt_ck
  Figure 5-7:
      - func_32k_ck, osc_ck, sys_ck
  Figure 5-8 (assumes that "Level 0" = PRM)
      - dpll_ck, apll96_ck, apll54_ck, func_54m_ck
  Section 5.4.1.1:
      - sys_clkout_src, sys_clkout
  Section 29.3.1.1:
      - gpios_fck, mpu_wdt_fck, mpu_wdt_ick

References for the OMAP3xxx clocks:

OMAP34xx Multimedia Device Silicon Revision 3.0 Version I TRM
  Figure 4-54:
      - gpt1_fck, wkup_32k_fck, wdt2_fck, wkup_l4_fck, omap_32ksync_ick,
        gpt1_ick
  Section 25.3.1.1.3:
      - gpio1_fck, gpio1_ick

OMAP34xx Multimedia High Security (HS) Device Silicon Revision 3.0 Security
Addendum Version B TRM
  Table 2-5:
      - usim_ick
  Figure 3-29:
      - wdt1_ick, gpt12_ick

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoOMAP2/3 clockdomains: add CM and PRM clkdms
Paul Walmsley [Wed, 10 Sep 2008 16:47:36 +0000 (10:47 -0600)]
OMAP2/3 clockdomains: add CM and PRM clkdms

Add clockdomains for the CM and PRM.  These will ultimately replace the
"wkup_clkdm", which appears to not actually exist on the hardware.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agolowmem: Remove the possibility to stack the module
Viktor Rosendahl [Thu, 11 Sep 2008 16:20:42 +0000 (19:20 +0300)]
lowmem: Remove the possibility to stack the module

The mod_reg_security() function that is used to stack modules has been removed:
"LSMs wishing to stack capability as a secondary module should do so
explicitly". Thus, let's remove the possibility to stack in the init function.
The functionality could probably be reintroduced later if somebody has time to
implement it.

Signed-off-by: Viktor Rosendahl <viktor.rosendahl@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agolowmem: Fix split of ptrace
Viktor Rosendahl [Thu, 11 Sep 2008 16:20:41 +0000 (19:20 +0300)]
lowmem: Fix split of ptrace

A previous commit split the ptrace member into two. Thus we need to update the
lowmem module accordingly.

Signed-off-by: Viktor Rosendahl <viktor.rosendahl@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agolowmem: add compatibility code
Viktor Rosendahl [Thu, 11 Sep 2008 16:20:40 +0000 (19:20 +0300)]
lowmem: add compatibility code

This is a patch that will reintroduce the old sysctl lowmem variables as read
only values in /proc/sys/vm. Some parts of the userland (at least libosso) are
reading these and it would probably greatly ease the transition to the new
scheme with memory limits in pages. We can revert this ugly patch when userland
has moved to the new scheme.

Signed-off-by: Viktor Rosendahl <viktor.rosendahl@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agolowmem: Security modules can no longer be removed.
Viktor Rosendahl [Thu, 11 Sep 2008 16:20:39 +0000 (19:20 +0300)]
lowmem: Security modules can no longer be removed.

The unregister_security() and mod_unreg_security() functions were removed
because the upstream developers believe that it should not be possible to remove
security modules, "It is used only by out-of-tree modules, which are often
binary-only, illegal, abusive of the API and dangerous, e.g.  silently
re-vectoring SELinux."

Signed-off-by: Viktor Rosendahl <viktor.rosendahl@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agolowmem: update memory management functions for the new kernel
Viktor Rosendahl [Thu, 11 Sep 2008 16:20:38 +0000 (19:20 +0300)]
lowmem: update memory management functions for the new kernel

These functions now require an additional argument, so let's add it.

Signed-off-by: Viktor Rosendahl <viktor.rosendahl@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agolowmem: sysfs has changed
Viktor Rosendahl [Thu, 11 Sep 2008 16:20:37 +0000 (19:20 +0300)]
lowmem: sysfs has changed

Currently, the lowmem module doesn't even compile because the kernel API has
changed. This patch will unbreak the sysfs related code.

Signed-off-by: Viktor Rosendahl <viktor.rosendahl@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agolowmem: remove an unecessary local variable
Viktor Rosendahl [Thu, 11 Sep 2008 16:20:36 +0000 (19:20 +0300)]
lowmem: remove an unecessary local variable

This "changed" variable is kind of deprecated. We used to have a spinlock
[which was later deemed unecessary] around the first if clause in the
*_watermark_state() functions; the variable was needed in order to move the
operation in the second if clause out of the lock section.

Signed-off-by: Viktor Rosendahl <viktor.rosendahl@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agolowmem: get rid of the percentages
Viktor Rosendahl [Thu, 11 Sep 2008 16:20:35 +0000 (19:20 +0300)]
lowmem: get rid of the percentages

The purpose of this patch is to get rid of the lame percentage calculations in
lowmem.c. Currently, the limits (measured in pages) are calculated from
percentages every time somebody from userspace requests some memory. With this
patch, the limits are in pages and furthermore, they are specified as minimum
amount of "free pages", instead of as maximum amount of "used pages". "Free"
means free pages or such pages that can easily be freed by the VM system.

This patch changes the names of the lowmem sysctl limits in /proc/sys/vm:
lowmem_deny_watermark        => lowmem_deny_watermark_pages
lowmem_notify_low      => lowmem_notify_low_pages
lowmem_notify_high       => lowmem_notify_high_pages

The following read only value disappears:
lowmem_used_pages

The following read only value is introduced:
lowmem_free_pages

The old value can be calculated from userspace with the following pseudocode:

if lowmem_free_pages < lowmem_allowed_pages
   lowmem_used_pages = lowmem_allowed_pages - lowmem_free_pages
else
   lowmem_used_pages = 0;

Note that the value of lowmem_free_pages is only accurate when the system is
rather low on memory (otherwise it's a bit too pessimistic), this was true also
for the lowmem_used_pages metric.

Signed-off-by: Viktor Rosendahl <viktor.rosendahl@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agolowmem: remove unecessary usage of proc_dointvec_minmax()
Viktor Rosendahl [Thu, 11 Sep 2008 16:20:34 +0000 (19:20 +0300)]
lowmem: remove unecessary usage of proc_dointvec_minmax()

As far as I can understand, using proc_dointvec_minmax() instead of
proc_dointvec only makes sense if you supply the min and/or max values in the
extra1 and extra2 fields of the struct.

Signed-off-by: Viktor Rosendahl <viktor.rosendahl@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoSecurity: Kernel OOM-killer and allocation denial use different rules
Henrik Saari [Thu, 11 Sep 2008 16:20:33 +0000 (19:20 +0300)]
Security: Kernel OOM-killer and allocation denial use different rules

Security: Kernel OOM-killer and allocation denial use different rules

Original patch created by Leonid Moiseichuk <leonid.moiseichuk@nokia.com>

Fixes the issue with the oom killer and lowmem module being inconsistent;
processes that are important enough to be protected from the oom killer should
not be denied memory either.

Signed-off-by: Henrik Saari <henrik.saari@nokia.com>
Signed-off-by: Viktor Rosendahl <viktor.rosendahl@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agotwl4030: improve rtc device setup
David Brownell [Thu, 11 Sep 2008 09:48:39 +0000 (02:48 -0700)]
twl4030: improve rtc device setup

Make the twl4030 RTC initialization follow the driver model better.
The platform device is created (if needed) as part of twl4030 setup
instead of as a board-specific thing, and fits properly into the
driver model tree.

The only minor glitch here is on boards using platform_data to pass
MSECURE initialization hooks to the RTC driver.  The right solution
probably just removes that platform_data, and might even make Linux
follow the principle of "least privilege" (at the hardware level!)
instead of always holding this signal high.

Pending better handling of MSECURE, this patch just does what the
RTC init does, but earlier:  MSECURE is always high, so the RTC time
and calendar registers can be updated (and presumably a bunch of
non-RTC privileged operations will be allowed too).

Yet to be done:  set up the IRQ resource; make the rtc driver use
that IRQ resource; and properly issue wakeup alarms.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agomach-omap2: fix more arch_initcall() breakage
David Brownell [Thu, 11 Sep 2008 06:01:24 +0000 (23:01 -0700)]
mach-omap2: fix more arch_initcall() breakage

Remove more bogus arch_initcall() logic in mach-omap2/board-xyx.c files.
They broke a multi-OMAP build I did, at *RUN TIME* not build time, since
it tried to do the i2c init for every board linked in the kernel.

Remember, init_machine() entries run at arch_initcall() time; that's
where any board-specific init logic should normally go.  Any initcalls
in the mach-*/*c files should normally be guarded by tests to make sure
they only run on the relevant hardware (board, cpu).  Better yet, get
rid of the initcalls; init_machine() can *explicitly* call the right
version of that code, and pass in board-specific config data; and there
are hooks that can handle cpu-specific stuff too.

A quick glance suggests most of the remaining initcall logic in the
mach-omap2 directory is similarly broken... this patch gets rid of
one frequently-cloned idiom, it should help.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoFix build for beagleboard
Peter 'p2' De Schrijver [Fri, 12 Sep 2008 10:32:36 +0000 (13:32 +0300)]
Fix build for beagleboard

Also add missing u8 data as noted by Felipe Balbi.

Signed-off-by: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agox86: fix possible x86_64 and EFI regression
Jeremy Fitzhardinge [Thu, 11 Sep 2008 23:42:00 +0000 (16:42 -0700)]
x86: fix possible x86_64 and EFI regression

Russ Anderson reported a boot crash with EFI and latest mainline:

 BIOS-e820: 00000000fffa0000 - 00000000fffac000 (reserved)
Pid: 0, comm: swapper Not tainted 2.6.27-rc5-00100-gec0c15a-dirty #5

Call Trace:
 [<ffffffff80849195>] early_idt_handler+0x55/0x69
 [<ffffffff80313e52>] __memcpy+0x12/0xa4
 [<ffffffff80859015>] efi_init+0xce/0x932
 [<ffffffff80869c83>] setup_early_serial8250_console+0x2d/0x36a
 [<ffffffff80238688>] __insert_resource+0x18/0xc8
 [<ffffffff8084f6de>] setup_arch+0x3a7/0x632
 [<ffffffff808499ed>] start_kernel+0x91/0x367
 [<ffffffff80849393>] x86_64_start_kernel+0xe3/0xe7
 [<ffffffff808492b0>] x86_64_start_kernel+0x0/0xe7

 RIP 0x10

Such a crash is possible if the CPU in this system is a 64-bit
processor which doesn't support NX (ie, old Intel P4 -based64-bit
processors).

Certainly, if we support such processors, then we should start with
_PAGE_NX initially clear in __supported_pte_flags, and then set it once
we've established that the processor does indeed support NX.  That will
prevent early_ioremap - or anything else - from trying to set it.

The simple fix is to simply call check_efer() earlier.

Reported-by: Russ Anderson <rja@sgi.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluet...
David S. Miller [Fri, 12 Sep 2008 02:11:50 +0000 (19:11 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-2.6

15 years agonetlink: fix overrun in attribute iteration
Vegard Nossum [Fri, 12 Sep 2008 02:05:29 +0000 (19:05 -0700)]
netlink: fix overrun in attribute iteration

kmemcheck reported this:

  kmemcheck: Caught 16-bit read from uninitialized memory (f6c1ba30)
  0500110001508abf050010000500000002017300140000006f72672e66726565
   i i i i i i i i i i i i i u u u u u u u u u u u u u u u u u u u
                                   ^

  Pid: 3462, comm: wpa_supplicant Not tainted (2.6.27-rc3-00054-g6397ab9-dirty #13)
  EIP: 0060:[<c05de64a>] EFLAGS: 00010296 CPU: 0
  EIP is at nla_parse+0x5a/0xf0
  EAX: 00000008 EBX: fffffffd ECX: c06f16c0 EDX: 00000005
  ESI: 00000010 EDI: f6c1ba30 EBP: f6367c6c ESP: c0a11e88
   DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
  CR0: 8005003b CR2: f781cc84 CR3: 3632f000 CR4: 000006d0
  DR0: c0ead9bc DR1: 00000000 DR2: 00000000 DR3: 00000000
  DR6: ffff4ff0 DR7: 00000400
   [<c05d4b23>] rtnl_setlink+0x63/0x130
   [<c05d5f75>] rtnetlink_rcv_msg+0x165/0x200
   [<c05ddf66>] netlink_rcv_skb+0x76/0xa0
   [<c05d5dfe>] rtnetlink_rcv+0x1e/0x30
   [<c05dda21>] netlink_unicast+0x281/0x290
   [<c05ddbe9>] netlink_sendmsg+0x1b9/0x2b0
   [<c05beef2>] sock_sendmsg+0xd2/0x100
   [<c05bf945>] sys_sendto+0xa5/0xd0
   [<c05bf9a6>] sys_send+0x36/0x40
   [<c05c03d6>] sys_socketcall+0x1e6/0x2c0
   [<c020353b>] sysenter_do_call+0x12/0x3f
   [<ffffffff>] 0xffffffff

This is the line in nla_ok():

  /**
   * nla_ok - check if the netlink attribute fits into the remaining bytes
   * @nla: netlink attribute
   * @remaining: number of bytes remaining in attribute stream
   */
  static inline int nla_ok(const struct nlattr *nla, int remaining)
  {
          return remaining >= sizeof(*nla) &&
                 nla->nla_len >= sizeof(*nla) &&
                 nla->nla_len <= remaining;
  }

It turns out that remaining can become negative due to alignment in
nla_next(). But GCC promotes "remaining" to unsigned in the test
against sizeof(*nla) above. Therefore the test succeeds, and the
nla_for_each_attr() may access memory outside the received buffer.

A short example illustrating this point is here:

  #include <stdio.h>

  main(void)
  {
          printf("%d\n", -1 >= sizeof(int));
  }

...which prints "1".

This patch adds a cast in front of the sizeof so that GCC will make
a signed comparison and fix the illegal memory dereference. With the
patch applied, there is no kmemcheck report.

Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years ago[Bluetooth] Fix regression from using default link policy
Marcel Holtmann [Fri, 12 Sep 2008 01:11:54 +0000 (03:11 +0200)]
[Bluetooth] Fix regression from using default link policy

To speed up the Simple Pairing connection setup, the support for the
default link policy has been enabled. This is in contrast to settings
the link policy on every connection setup. Using the default link policy
is the preferred way since there is no need to dynamically change it for
every connection.

For backward compatibility reason and to support old userspace the
HCISETLINKPOL ioctl has been switched over to using hci_request() to
issue the HCI command for setting the default link policy instead of
just storing it in the HCI device structure.

However the hci_request() can only be issued when the device is
brought up. If used on a device that is registered, but still down
it will timeout and fail. This is problematic since the command is
put on the TX queue and the Bluetooth core tries to submit it to
hardware that is not ready yet. The timeout for these requests is
10 seconds and this causes a significant regression when setting up
a new device.

The userspace can perfectly handle a failure of the HCISETLINKPOL
ioctl and will re-submit it later, but the 10 seconds delay causes
a problem. So in case hci_request() is called on a device that is
still down, just fail it with ENETDOWN to indicate what happens.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
15 years agoARM: OMAP: Clean-up MMC device init
Tony Lindgren [Fri, 12 Sep 2008 00:23:52 +0000 (17:23 -0700)]
ARM: OMAP: Clean-up MMC device init

Clean-up MMC device init:

- Initialize devices in mach-omap1/devices.c and mach-omap2/devices.c
  instead of plat-omap/devices.c

- Remove old struct omap_mmc_config, use struct omap_mmc_platform_data instead

Note that this removes the second omap-hsmmc controller init for overo.
This needs to be fixed properly by changing hsmmc_init() to accept
board specific struct omap_mmc_platform_data.

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoSync MMC device code with arm devel branch
Tony Lindgren [Fri, 12 Sep 2008 00:05:32 +0000 (17:05 -0700)]
Sync MMC device code with arm devel branch

This is to sync with Russell's commit 7736c09c6cf9521f2413d78856a66f4a37046e84.

Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
Linus Torvalds [Thu, 11 Sep 2008 18:50:15 +0000 (11:50 -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:
  sg: disable interrupts inside sg_copy_buffer

15 years agoMN10300: Change the fault handler to check in_atomic() not in_interrupt()
David Howells [Thu, 11 Sep 2008 16:18:56 +0000 (17:18 +0100)]
MN10300: Change the fault handler to check in_atomic() not in_interrupt()

Change the MN10300 fault handler to make it check in_atomic() rather than
in_interrupt() as commit 6edaf68a87d17570790fd55f0c451a29ec1d6703 did for other
architectures:

Author: Peter Zijlstra <a.p.zijlstra@chello.nl>
Date:   Wed Dec 6 20:32:18 2006 -0800

[PATCH] mm: arch do_page_fault() vs in_atomic()

In light of the recent pagefault and filemap_copy_from_user work I've
gone through all the arch pagefault handlers to make sure the
inc_preempt_count() 'feature' works as expected.

Several sections of code (including the new filemap_copy_from_user)
rely on the fact that faults do not take locks under increased preempt
count.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agosg: disable interrupts inside sg_copy_buffer
FUJITA Tomonori [Thu, 11 Sep 2008 16:35:39 +0000 (18:35 +0200)]
sg: disable interrupts inside sg_copy_buffer

The callers of sg_copy_buffer must disable interrupts before calling
it (since it uses kmap_atomic). Some callers use it on
interrupt-disabled code but some need to take the trouble to disable
interrupts just for this. No wonder they forget about it and we hit a
bug like:

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

James said that it might be better to disable interrupts inside the
function rather than risk the callers getting it wrong.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
Linus Torvalds [Thu, 11 Sep 2008 15:42:55 +0000 (08:42 -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:
  block: disable sysfs parts of the disk command filter

15 years agoMerge branch 'kvm-updates/2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Thu, 11 Sep 2008 15:42:14 +0000 (08:42 -0700)]
Merge branch 'kvm-updates/2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm

* 'kvm-updates/2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm:
  KVM: VMX: Always return old for clear_flush_young() when using EPT
  KVM: SVM: fix guest global tlb flushes with NPT
  KVM: SVM: fix random segfaults with NPT enabled

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
Linus Torvalds [Thu, 11 Sep 2008 15:41:17 +0000 (08:41 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
  [SCSI] fix check of PQ and PDT bits for WLUNs
  [SCSI] make scsi_check_sense HARDWARE_ERROR return ADD_TO_MLQUEUE on retry
  [SCSI] scsi_dh: make check_sense return ADD_TO_MLQUEUE
  [SCSI] zfcp: Remove duplicated unlikely() macros.
  [SCSI] zfcp: channel cannot be detached due to refcount imbalance
  [SCSI] zfcp: Fix reference counter for remote ports
  [SCSI] zfcp: Simplify ccw notify handler
  [SCSI] zfcp: Correctly query end flag in gpn_ft response
  [SCSI] zfcp: Fix request queue locking
  [SCSI] sd: select CRC_T10DIF only when necessary

15 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Thu, 11 Sep 2008 15:40:32 +0000 (08:40 -0700)]
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] prevent ia64 from invoking irq handlers on offline CPUs
  [IA64] arch/ia64/sn/pci/tioca_provider.c: introduce missing kfree
  [IA64] fix up bte.h
  [IA64] fix compile failure with non modular builds

15 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux...
Linus Torvalds [Thu, 11 Sep 2008 15:40:11 +0000 (08:40 -0700)]
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-udf-2.6

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-udf-2.6:
  udf: add llseek method
  udf: Fix error paths in udf_new_inode()
  udf: Fix lock inversion between iprune_mutex and alloc_mutex (v2)

15 years agoath9k: Assign seq# when mac80211 requests this
Jouni Malinen [Mon, 11 Aug 2008 11:01:50 +0000 (14:01 +0300)]
ath9k: Assign seq# when mac80211 requests this

Use TX control flag IEEE80211_TX_CTL_ASSIGN_SEQ as a request to update
the seq# for the frames. This will likely require some further cleanup
to get seq# correctly for Beacons vs. other frames and also potentially
for multiple BSSes. Anyway, this is better than ending up sending out
most frames with seq# 0.

(This is a backport of patch w/ same title already in net-next-2.6.
It is verified to fix http://bugzilla.kernel.org/show_bug.cgi?id=11394
and it should be acceptable for -rc due to the driver being new
in 2.6.27.)

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoblock: disable sysfs parts of the disk command filter
Jens Axboe [Thu, 11 Sep 2008 12:20:23 +0000 (14:20 +0200)]
block: disable sysfs parts of the disk command filter

We still have life time issues with the sysfs command filter kobject,
so disable it for 2.6.27 release. We can revisit this and make it work
properly for 2.6.28, for 2.6.27 release it's too risky.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years ago[ARM] OMAP: Fix MMC device data
Russell King [Tue, 9 Sep 2008 09:16:22 +0000 (10:16 +0100)]
[ARM] OMAP: Fix MMC device data

OMAPs MMC device data was passing the wrong structure via the platform
device.  Moreover, a missing function means that both sx1_defconfig
and omap_h2_1610_defconfig builds failed with

undefined reference to `omap_set_mmc_info'

errors.  Fix this by updating the MMC support from the omapzoom tree.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years agoclocksource, acpi_pm.c: fix check for monotonicity
Dominik Brodowski [Thu, 11 Sep 2008 09:09:49 +0000 (11:09 +0200)]
clocksource, acpi_pm.c: fix check for monotonicity

Actually check the monotonicity of the ACPI PMTMR ten times, only delay for
0.9 miliseconds at most, and bail out early if some problem is determined.

Reported-by: Jochen Voß <jochen.voss@googlemail.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge commit 'v2.6.27-rc6' into timers/urgent
Ingo Molnar [Thu, 11 Sep 2008 09:13:58 +0000 (11:13 +0200)]
Merge commit 'v2.6.27-rc6' into timers/urgent

15 years agoKVM: VMX: Always return old for clear_flush_young() when using EPT
Sheng Yang [Mon, 8 Sep 2008 07:12:30 +0000 (15:12 +0800)]
KVM: VMX: Always return old for clear_flush_young() when using EPT

As well as discard fake accessed bit and dirty bit of EPT.

Signed-off-by: Sheng Yang <sheng.yang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
15 years agoKVM: SVM: fix guest global tlb flushes with NPT
Joerg Roedel [Tue, 9 Sep 2008 17:11:51 +0000 (19:11 +0200)]
KVM: SVM: fix guest global tlb flushes with NPT

Accesses to CR4 are intercepted even with Nested Paging enabled. But the code
does not check if the guest wants to do a global TLB flush. So this flush gets
lost. This patch adds the check and the flush to svm_set_cr4.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
15 years agoKVM: SVM: fix random segfaults with NPT enabled
Joerg Roedel [Wed, 27 Aug 2008 12:18:43 +0000 (14:18 +0200)]
KVM: SVM: fix random segfaults with NPT enabled

This patch introduces a guest TLB flush on every NPF exit in KVM. This fixes
random segfaults and #UD exceptions in the guest seen under some workloads
(e.g. long running compile workloads or tbench). A kernbench run with and
without that fix showed that it has a slowdown lower than 0.5%

Cc: stable@kernel.org
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@qumranet.com>
15 years agosched: fix deadlock in setting scheduler parameter to zero
Hiroshi Shimamoto [Thu, 11 Sep 2008 00:00:19 +0000 (17:00 -0700)]
sched: fix deadlock in setting scheduler parameter to zero

Andrei Gusev wrote:

> I played witch scheduler settings. After doing something like:
> echo -n 1000000 >sched_rt_period_us
>
> command is locked. I found in kernel.log:
>
> Sep 11 00:39:34 zaratustra
> Sep 11 00:39:34 zaratustra Pid: 4495, comm: bash Tainted: G        W
> (2.6.26.3 #12)
> Sep 11 00:39:34 zaratustra EIP: 0060:[<c0213fc7>] EFLAGS: 00210246 CPU: 0
> Sep 11 00:39:34 zaratustra EIP is at div64_u64+0x57/0x80
> Sep 11 00:39:34 zaratustra EAX: 0000389f EBX: 00000000 ECX: 00000000
> EDX: 00000000
> Sep 11 00:39:34 zaratustra ESI: d9800000 EDI: d9800000 EBP: 0000389f
> ESP: ea7a6edc
> Sep 11 00:39:34 zaratustra DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
> Sep 11 00:39:34 zaratustra Process bash (pid: 4495, ti=ea7a6000
> task=ea744000 task.ti=ea7a6000)
> Sep 11 00:39:34 zaratustra Stack: 00000000 000003e8 d9800000 0000389f
c0119042 00000000 00000000 00000001
> Sep 11 00:39:34 zaratustra 00000000 00000000 ea7a6f54 00010000 00000000
c04d2e80 00000001 000e7ef0
> Sep 11 00:39:34 zaratustra c01191a3 00000000 00000000 ea7a6fa0 00000001
ffffffff c04d2e80 ea5b2480
> Sep 11 00:39:34 zaratustra Call Trace:
> Sep 11 00:39:34 zaratustra [<c0119042>] __rt_schedulable+0x52/0x130
> Sep 11 00:39:34 zaratustra [<c01191a3>] sched_rt_handler+0x83/0x120
> Sep 11 00:39:34 zaratustra [<c01a76a6>] proc_sys_call_handler+0xb6/0xd0
> Sep 11 00:39:34 zaratustra [<c01a76c0>] proc_sys_write+0x0/0x20
> Sep 11 00:39:34 zaratustra [<c01a76d9>] proc_sys_write+0x19/0x20
> Sep 11 00:39:34 zaratustra [<c016cc68>] vfs_write+0xa8/0x140
> Sep 11 00:39:34 zaratustra [<c016cdd1>] sys_write+0x41/0x80
> Sep 11 00:39:34 zaratustra [<c0103051>] sysenter_past_esp+0x6a/0x91
> Sep 11 00:39:34 zaratustra =======================
> Sep 11 00:39:34 zaratustra Code: c8 41 0f ad f3 d3 ee f6 c1 20 0f 45 de
> 31 f6 0f ad ef d3 ed f6 c1 20 0f 45 fd 0f 45 ee 31 c9 39 eb 89 fe 89 ea
> 77 08 89 e8 31 d2 <f7> f3 89 c1 89 f0 8b 7c 24 08 f7 f3 8b 74 24 04 89
> ca 8b 1c 24
> Sep 11 00:39:34 zaratustra EIP: [<c0213fc7>] div64_u64+0x57/0x80 SS:ESP
> 0068:ea7a6edc
> Sep 11 00:39:34 zaratustra ---[ end trace 4eaa2a86a8e2da22 ]---

fix the boundary condition.

sysctl_sched_rt_period=0 makes exception at to_ratio().

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agosched: fix 2.6.27-rc5 couldn't boot on tulsa machine randomly
Zhang, Yanmin [Tue, 9 Sep 2008 03:26:33 +0000 (11:26 +0800)]
sched: fix 2.6.27-rc5 couldn't boot on tulsa machine randomly

On my tulsa x86-64 machine, kernel 2.6.25-rc5 couldn't boot randomly.

Basically, function __enable_runtime forgets to reset rt_rq->rt_throttled
to 0. When every cpu is up, per-cpu migration_thread is created and it runs
very fast, sometimes to mark the corresponding rt_rq->rt_throttled to 1 very
quickly. After all cpus are up, with below calling chain:

   sched_init_smp => arch_init_sched_domains => build_sched_domains => ...
=> cpu_attach_domain => rq_attach_root => set_rq_online => ...
=> _enable_runtime

_enable_runtime is called against every rt_rq again, so rt_rq->rt_time is
reset to 0, but rt_rq->rt_throttled might be still 1. Later on function
do_sched_rt_period_timer couldn't reset it, and all RT tasks couldn't be
scheduled to run on that cpu. here is RT task migration_thread which is
woken up when a task is migrated to another cpu.

Below patch fixes it against 2.6.27-rc5.

Signed-off-by: Zhang Yanmin <yanmin_zhang@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agosparc32: Fix function signature of of_bus_sbus_get_flags().
David S. Miller [Thu, 11 Sep 2008 06:38:51 +0000 (23:38 -0700)]
sparc32: Fix function signature of of_bus_sbus_get_flags().

This doesn't match the function pointer type it gets assigned
to.  Luckily, this was harmless.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoARM:OMAP3: Smartreflex disable/enable fix
Kalle Jokiniemi [Fri, 29 Aug 2008 10:05:44 +0000 (13:05 +0300)]
ARM:OMAP3: Smartreflex disable/enable fix

Smartreflex modules have to be disabled when device enters WFI.
Previously only suspend idle path had these calls. By moving the
disable/enable calls to omap_sram_idle, all idle paths will be covered.

Signed-off-by: Kalle Jokiniemi <ext-kalle.jokiniemi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
15 years agoPatch for Touch Screen noise on OMAP3EVM.
A NAVEEN [Mon, 8 Sep 2008 06:11:57 +0000 (11:41 +0530)]
Patch for Touch Screen noise on OMAP3EVM.

When git kernel tree is used on a OMAP3EVM board file for touch screen
testing, it shows lot of jitter. With this patch the jitter can be
reduced.

Signed-off-by: Naveen Atmakuri <anaveen@mistralsolutions.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>