]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
Linus Torvalds [Wed, 11 Nov 2009 19:27:49 +0000 (11:27 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog

* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
  [WATCHDOG] SBC-FITPC2 watchdog driver registration fix

14 years agoMerge branch 'fixes-s3c-2632-rc6' of git://git.fluff.org/bjdooks/linux
Linus Torvalds [Wed, 11 Nov 2009 19:27:26 +0000 (11:27 -0800)]
Merge branch 'fixes-s3c-2632-rc6' of git://git.fluff.org/bjdooks/linux

* 'fixes-s3c-2632-rc6' of git://git.fluff.org/bjdooks/linux:
  ARM: S3C64XX: DMA: Free node for non-circular queues
  ARM: S3C64XX: DMA: Callback with correct buffer pointer
  ARM: S3C64XX: DMA: Make src and dst transfer size same
  ARM: S3C64XX: DMA: Unify callback functions for success/failure
  ARM: S3C64XX: DMA: Protect buffer pointers while manipulation
  ARM: S3C64XX: Tidy definition and comments in s3c_dma_has_circular()
  ARM: S3C64XX: Remove duplicate s3c_dma_has_circular() definition for S3C64xx.
  ARM: SMDK6410: Allocate more GPIO space for WM1190-EV1
  ARM: SMDK6410: Configure GPIO pull up for WM835x IRQ line

14 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Wed, 11 Nov 2009 19:26:42 +0000 (11:26 -0800)]
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (27 commits)
  V4L/DVB (13314): saa7134: set ts_force_val for the Hauppauge WinTV HVR-1150
  V4L/DVB (13313): saa7134: add support for FORCE_TS_VALID mode for mpeg ts input
  V4L/DVB (13311): uvcvideo: Fix compilation warning with 2.6.32 due to type mismatch with abs()
  V4L/DVB (13309): uvcvideo: Ignore the FIX_BANDWIDTH for compressed video
  V4L/DVB (13287): ce6230 - saa7164-cmd: Fix wrong sizeof
  V4L/DVB (13286): pxa-camera: Fix missing sched.h
  V4L/DVB (13264): gspca_mr97310a: Change vstart for CIF sensor type 1 cams
  V4L/DVB (13257): gspca - m5602-s5k4aa: Add vflip for Fujitsu Amilo Xi 2528
  V4L/DVB (13256): gspca - m5602-s5k4aa: Add another MSI GX700 vflip quirk
  V4L/DVB (13255): gspca - m5602-s5k4aa: Add vflip quirk for the Bruneinit laptop
  V4L/DVB (13240): firedtv: fix regression: tuning fails due to bogus error return
  V4L/DVB (13237): firedtv: length field corrupt in ca2host if length>127
  V4L/DVB (13230): s2255drv: Don't conditionalize video buffer completion on waiting processes
  V4L/DVB (13202): smsusb: add autodetection support for three additional Hauppauge USB IDs
  V4L/DVB (13190): em28xx: fix panic that can occur when starting audio streaming
  V4L/DVB (13170): bttv: Fix reversed polarity error when switching video standard
  V4L/DVB (13169): bttv: Fix potential out-of-order field processing
  V4L/DVB (13167): pt1: Fix a compile error on arm
  V4L/DVB (13132): fix use-after-free Oops, resulting from a driver-core API change
  V4L/DVB (13131): pxa_camera: fix camera pixel format configuration
  ...

14 years agoBtrfs: allow more metadata chunk preallocation
Chris Mason [Wed, 11 Nov 2009 15:16:57 +0000 (10:16 -0500)]
Btrfs: allow more metadata chunk preallocation

On an FS where all of the space has not been allocated into chunks yet,
the enospc can return enospc just because the existing metadata chunks
are full.

We get around this by allowing more metadata chunks to be allocated up
to a certain limit, and finding the right limit is a little fuzzy.  The
problem is the reservations for delalloc would preallocate way too much
of the FS as metadata.  We need to start saying no and just force some
IO to happen.

But we also need to let a reasonable amount of the FS become metadata.
This bumps the hard limit up, later releases will have a better system.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: fallback on uncompressed io if compressed io fails
Josef Bacik [Wed, 11 Nov 2009 02:23:48 +0000 (21:23 -0500)]
Btrfs: fallback on uncompressed io if compressed io fails

Currently compressed IO does not deal with not having its entire extent able to
be allocated.  So if we have enough free space to allocate for the extent, but
its not contiguous, it will fail spectacularly.  This patch fixes this by
falling back on uncompressed IO which lets us spread the delalloc extent across
multiple extents.  I tested this by making us randomly think the reservation had
failed to make it fallback on the uncompressed io way and it seemed to work
fine.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: find ideal block group for caching
Josef Bacik [Wed, 11 Nov 2009 02:23:48 +0000 (21:23 -0500)]
Btrfs: find ideal block group for caching

This patch changes a few things.  Hopefully the comments are helpfull, but
I'll try and be as verbose here.

Problem:

My fedora box was taking 1 minute and 21 seconds to boot with btrfs as root.
Part of this problem was we pick the first block group we can find and start
caching it, even if it may not have enough free space.  The other problem is
we only search for cached block groups the first time around, which we won't
find any cached block groups because this is a newly mounted fs, so we end up
caching several block groups during bootup, which with alot of fragmentation
takes around 30-45 seconds to complete, which bogs down the system.  So

Solution:

1) Don't cache block groups willy-nilly at first.  Instead try and figure out
which block group has the most free, and therefore will take the least amount
of time to cache.

2) Don't be so picky about cached block groups.  The other problem is once
we've filled up a cluster, if the block group isn't finished caching the next
time we try and do the allocation we'll completely ignore the cluster and
start searching from the beginning of the space, which makes us cache more
block groups, which slows us down even more.  So instead of skipping block
groups that are not finished caching when we have a hint, only skip the block
group if it hasn't started caching yet.

There is one other tweak in here.  Before if we allocated a chunk and still
couldn't find new space, we'd end up switching the space info to force another
chunk allocation.  This could make us end up with way too many chunks, so keep
track of this particular case.

With this patch and my previous cluster fixes my fedora box now boots in 43
seconds, and according to the bootchart is not held up by our block group
caching at all.

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: avoid null deref in unpin_extent_cache()
Dan Carpenter [Tue, 10 Nov 2009 09:01:43 +0000 (09:01 +0000)]
Btrfs: avoid null deref in unpin_extent_cache()

I re-orderred the checks to avoid dereferencing "em" if it was null.

Found by smatch static checker.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: skip btrfs_release_path in btrfs_update_root and btrfs_del_root
Li Dongyang [Fri, 6 Nov 2009 14:33:01 +0000 (14:33 +0000)]
Btrfs: skip btrfs_release_path in btrfs_update_root and btrfs_del_root

We don't need to call btrfs_release_path because btrfs_free_path will do
that for us.

Signed-off-by: Li Dongyang <Jerry87905@gmail.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: fix some metadata enospc issues
Josef Bacik [Wed, 11 Nov 2009 02:23:48 +0000 (21:23 -0500)]
Btrfs: fix some metadata enospc issues

We weren't reserving metadata space for rename, rmdir and unlink, which could
cause problems.

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: fix how we set max_size for free space clusters
Josef Bacik [Wed, 11 Nov 2009 02:23:48 +0000 (21:23 -0500)]
Btrfs: fix how we set max_size for free space clusters

This patch fixes a problem where max_size can be set to 0 even though we
filled the cluster properly.  We set max_size to 0 if we restart the cluster
window, but if the new start entry is big enough to be our new cluster then we
could return with a max_size set to 0, which will mean the next time we try to
allocate from this cluster it will fail.  So set max_extent to the entry's
size.  Tested this on my box and now we actually allocate from the cluster
after we fill it.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: cleanup transaction starting and fix journal_info usage
Josef Bacik [Wed, 11 Nov 2009 02:23:48 +0000 (21:23 -0500)]
Btrfs: cleanup transaction starting and fix journal_info usage

We use journal_info to tell if we're in a nested transaction to make sure we
don't commit the transaction within a nested transaction.  We use another
method to see if there are any outstanding ioctl trans handles, so if we're
starting one do not set current->journal_info, since it will screw with other
filesystems.  This patch also cleans up the starting stuff so there aren't any
magic numbers.

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: fix data allocation hint start
Josef Bacik [Wed, 11 Nov 2009 02:23:47 +0000 (21:23 -0500)]
Btrfs: fix data allocation hint start

Sometimes our start allocation hint when we cow a file can be either
EXTENT_HOLE or some other such place holder, which is not optimal.  So if we
find that our em->block_start is one of these special values, check to see
where the first block of the inode is stored, and use that as a hint.  If that
block is also a special value, just fallback on a hint of 0 and let the
allocator figure out a good place to put the data.

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoomap3: update Pandora defconfig
Grazvydas Ignotas [Wed, 11 Nov 2009 19:00:38 +0000 (11:00 -0800)]
omap3: update Pandora defconfig

This patch updates defconfig to enable options needed to properly
boot OMAP3 pandora board. It also enables MMC, OTG, GPIO LEDs,
TWL4030 GPIO and sound drivers.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap3: 3430sdp: Enable Linux Regulator framework
Sergio Aguirre [Wed, 11 Nov 2009 19:00:37 +0000 (11:00 -0800)]
omap3: 3430sdp: Enable Linux Regulator framework

Some drivers have dependencies on this, and therefore should be
enabled.

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap3: beagle: Fix USB host port power control
Jarkko Nikula [Wed, 11 Nov 2009 19:00:36 +0000 (11:00 -0800)]
omap3: beagle: Fix USB host port power control

The host port power is enabled by driving the nEN_USB_PWR low as stated in
the comment. This fix is originally from Steve Sakoman <steve@sakoman.com>.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Cc: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap3: pandora: Fix keypad keymap
Grazvydas Ignotas [Wed, 11 Nov 2009 19:00:35 +0000 (11:00 -0800)]
omap3: pandora: Fix keypad keymap

The original TWL4030 keypad driver from linux-omap used KEY()
macro defined as (col, row), but while it was merged upstream
it was changed to use matrix keypad infrastructure, which uses
(row, col) format. Update the keymap in board file to match
layout of mainline driver.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap1: Amstrad Delta defconfig fixes
Janusz Krzysztofik [Wed, 11 Nov 2009 19:00:34 +0000 (11:00 -0800)]
omap1: Amstrad Delta defconfig fixes

The patch provides the following fixes:

- keep kernel small enough to boot with standard tools,
- ensure compatibility with both new and legacy distros,
- turn on support for recently added or fixed hardware features.

Created and tested against linux-2.6.32-rc5.

Signed-off-by: Janusz Krzysztofik <jkrzysz@tis.icnet.pl>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap: Fix omapfb/lcdc on OMAP1510 broken when PM set
Janusz Krzysztofik [Wed, 11 Nov 2009 19:00:03 +0000 (11:00 -0800)]
omap: Fix omapfb/lcdc on OMAP1510 broken when PM set

With CONFIG_PM=y, the omapfb/lcdc device on Amstrad Delta, after initially
starting correctly, breaks with the following error messages:

omapfb omapfb: resetting (status 0xffffff96,reset count 1)
...
omapfb omapfb: resetting (status 0xffffff96,reset count 100)
omapfb omapfb: too many reset attempts, giving up.

Looking closer at this I have found that it had been broken almost 2 years ago
with commit 2418996e3b100114edb2ae110d5d4acb928909d2, PM fixes for OMAP1.

The definite reason for broken omapfb/lcdc behavoiur in PM mode
appeared to be ARM_IDLECT1:IDLIF_ARM (bit 6) put into idle regardless of LCD
DMA possibly running. The bit were set based on return value of the
omap_dma_running() function that did not check for dedicated LCD DMA
channel status. The patch below fixes this.

Note that the hardcoded register value will be fixed during the next merge
cycle to use OMAP_LCDC_ defines. Currently the OMAP_LCDC_ defines are local
to drivers/video/omap/lcdc.c, so let's not start moving those right now.

Created against linux-2.6.32-rc6

Tested on Amstrad Delta

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoJBD/JBD2: free j_wbuf if journal init fails.
Tao Ma [Tue, 10 Nov 2009 09:13:22 +0000 (17:13 +0800)]
JBD/JBD2: free j_wbuf if journal init fails.

If journal init fails, we need to free j_wbuf.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Jan Kara <jack@suse.cz>
14 years agoext3: Wait for proper transaction commit on fsync
Jan Kara [Fri, 16 Oct 2009 17:26:15 +0000 (19:26 +0200)]
ext3: Wait for proper transaction commit on fsync

We cannot rely on buffer dirty bits during fsync because pdflush can come
before fsync is called and clear dirty bits without forcing a transaction
commit. What we do is that we track which transaction has last changed
the inode and which transaction last changed allocation and force it to
disk on fsync.

Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
14 years agoext3: retry failed direct IO allocations
Eric Sandeen [Tue, 13 Oct 2009 02:34:27 +0000 (21:34 -0500)]
ext3: retry failed direct IO allocations

On a 256M 4k block filesystem, doing this in a loop:

    dd if=/dev/zero of=test oflag=direct bs=1M count=64
    rm -f test

eventually leads to spurious ENOSPC:

    dd: writing `test': No space left on device

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

A similar patch went into ext4 (commit
fbbf69456619de5d251cb9f1df609069178c62d5)

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
14 years agoperf tools: Test -fstack-protector-all compiler option for inclusion in CFLAGS
Michael Cree [Wed, 11 Nov 2009 07:43:03 +0000 (20:43 +1300)]
perf tools: Test -fstack-protector-all compiler option for inclusion in CFLAGS

Some architectures (e.g. Alpha) do not support the
-fstack-protector-all compiler option and the use of the option
with -Werror causes the compiler to abort and the build fails.

Test that the compiler supports -fstack-protector-all before
inclusion in CFLAGS.

Signed-off-by: Michael Cree <mcree@orcon.net.nz>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <20091111074302.GA3728@omega>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoMerge branch 'fix/hda' into for-linus
Takashi Iwai [Wed, 11 Nov 2009 07:10:31 +0000 (08:10 +0100)]
Merge branch 'fix/hda' into for-linus

14 years agoALSA: hda - possible read past array alc88[02]_parse_auto_config()
Roel Kluin [Tue, 10 Nov 2009 19:11:55 +0000 (20:11 +0100)]
ALSA: hda - possible read past array alc88[02]_parse_auto_config()

The test of index `i' is after the read - too late - and
unsafe: if snd_hda_get_connections() fails in the last
iteration a read beyond the array is possible.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoperf tools: Bring linear set of section headers for features
Frederic Weisbecker [Wed, 11 Nov 2009 03:51:07 +0000 (04:51 +0100)]
perf tools: Bring linear set of section headers for features

Build a set of section headers for features right after the
datas. Each implemented feature will have one of such section
header that provides the offset and the size of the data
manipulated by the feature.

The trace informations have moved after the data and are
recorded on exit time.

The new layout is as follows:

 -----------------------
                             ___
 [ magic               ]      |
 [ header size         ]      |
 [ attr size           ]      |
 [ attr content offset ]      |
 [ attr content size   ]      |
 [ data offset         ]  File Headers
 [ data size           ]      |
 [ event_types offset  ]      |
 [ event_types size    ]      |
 [ feature bitmap      ]      v

 [ attr section        ]
 [ events section      ]

                             ___
 [         X           ]      |
 [         X           ]      |
 [         X           ]    Datas
 [         X           ]      |
 [         X           ]      v

                             ___
 [ Feature 1 offset    ]      |
 [ Feature 1 size      ] Features headers
 [ Feature 2 offset    ]      |
 [ Feature 2 size      ]      v

 [ Feature 1 content   ]
 [ Feature 2 content   ]
 -----------------------

We have as many feature's section headers as we have features in
use for the current file.

Say Feat 1 and Feat 3 are used by the file, but not Feat 2. Then
the feature headers will be like follows:

[ Feature 1 offset    ]      |
[ Feature 1 size      ] Features headers
[ Feature 3 offset    ]      |
[ Feature 3 size      ]      v

There is no hole to cover Feature 2 that is not in use here. We
only need to cover the needed headers in order, from the lowest
feature bit to the highest.

Currently we have two features: HEADER_TRACE_INFO and
HEADER_BUILD_ID. Both have their contents that follow the
feature headers. Putting the contents right after the feature
headers is not mandatory though. While we keep the feature
headers right after the data and in order, their offsets can
point everywhere. We have just put the two above feature
contents in the end of the file for convenience.

The purpose of this layout change is to have a file format that
scales while keeping it simple: having such linear feature
headers is less error prone wrt forward/backward compatibility
as the content of a feature can be put anywhere, its location
can even change by the time, it's fine because its headers will
tell where it is. And we know how to find these headers,
following the above rules.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
LKML-Reference: <1257911467-28276-6-git-send-email-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf tools: Use perf_header__set/has_feat whenever possible
Frederic Weisbecker [Wed, 11 Nov 2009 03:51:06 +0000 (04:51 +0100)]
perf tools: Use perf_header__set/has_feat whenever possible

And drop the alternate checks/sets using set_bit or other kind
of helpers.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
LKML-Reference: <1257911467-28276-5-git-send-email-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf tools: Read the build-ids from the header layer
Frederic Weisbecker [Wed, 11 Nov 2009 03:51:05 +0000 (04:51 +0100)]
perf tools: Read the build-ids from the header layer

Keep the build-ids reading implementation in the data mapping
but move its call to the headers so that we have a better
control on it (offset seeking, size passing, etc..).

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
LKML-Reference: <1257911467-28276-4-git-send-email-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf tools: Split up build id saving into fetch and write
Frederic Weisbecker [Wed, 11 Nov 2009 03:51:04 +0000 (04:51 +0100)]
perf tools: Split up build id saving into fetch and write

We are saving the build id once we stop the profiling. And only
after doing that we know if we need to set that feature in the
header through the feature bitmap.

But if we want a proper feature support in the headers, using a
rule of offset/size pairs in sections, we need to know in
advance how many features we need to set in the headers, so that
we can reserve rooms for their section headers.

The current state doesn't allow that, as it forces us to first
save the build-ids to the file right after the datas instead of
planning any structured layout.

That's why this splits up the build-ids processing in two parts:
one that fetches the build-ids from the Dso objects, and one
that saves them into the file.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
LKML-Reference: <1257911467-28276-3-git-send-email-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf tools: Move the build-id storage operations to headers
Frederic Weisbecker [Wed, 11 Nov 2009 03:51:03 +0000 (04:51 +0100)]
perf tools: Move the build-id storage operations to headers

So that it makes easier to control it. Especially because we
plan to give it a feature section.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
LKML-Reference: <1257911467-28276-2-git-send-email-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf tools: Synthetize the targeted process
Frederic Weisbecker [Wed, 11 Nov 2009 03:51:02 +0000 (04:51 +0100)]
perf tools: Synthetize the targeted process

Don't forget to also synthetize the targeted process from perf
record or we'll miss its dso in the events and then we won't be
able to deal with its build-id.

We are missing it because it is created after the existing
synthetized tasks but before the counters are enabled and can
send its mapping event.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
LKML-Reference: <1257911467-28276-1-git-send-email-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agopowerpc: pasemi_defconfig update
Olof Johansson [Tue, 6 Oct 2009 15:52:50 +0000 (10:52 -0500)]
powerpc: pasemi_defconfig update

pasemi_defconfig hasn't been updated for a year.

Mostly a refresh of defaults, but this also disables 64K pages.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agoMerge commit 'kumar/merge' into merge
Benjamin Herrenschmidt [Wed, 11 Nov 2009 04:43:25 +0000 (15:43 +1100)]
Merge commit 'kumar/merge' into merge

14 years agoomap: Use resource_size
Tobias Klauser [Wed, 11 Nov 2009 02:55:19 +0000 (18:55 -0800)]
omap: Use resource_size

Use the resource_size function instead of manually calculating the
resource size. This reduces the chance of introducing off-by-one errors
and actually fixes one in mailbox.c.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoomap: Fix race condition in omap dma driver
Tao Hu [Wed, 11 Nov 2009 02:55:17 +0000 (18:55 -0800)]
omap: Fix race condition in omap dma driver

The bug could cause irq enable bit of one DMA channel is
cleared/set unexpectedly when 2 (or more) drivers are calling
omap_request_dma()/omap_free_dma() simultaneously

Signed-off-by: Fei Yang <AFY095@motorola.com>
Signed-off-by: Tao Hu <taohu@motorola.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
14 years agoMerge branch 'for-rmk' of git://linux-arm.org/linux-2.6
Russell King [Tue, 10 Nov 2009 23:37:21 +0000 (23:37 +0000)]
Merge branch 'for-rmk' of git://linux-arm.org/linux-2.6

14 years agoperf bench: Improve sched-message.c with more comfortable output
Hitoshi Mitake [Tue, 10 Nov 2009 15:04:02 +0000 (00:04 +0900)]
perf bench: Improve sched-message.c with more comfortable output

This patch improves sched-message.c with more comfortable output.

Change points are comment style description and
formatting numerical values and its units.

Example:

 | % perf bench sched messaging
 | # Running sched/messaging benchmark...
 | # 20 sender and receiver processes per group
 | # 10 groups == 400 processes run
 |
 |      Total time: 1.490 [sec]

Signed-off-by: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1257865442-20252-4-git-send-email-mitake@dcl.info.waseda.ac.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
14 years agoperf bench: Improve sched-pipe.c with more comfortable output
Hitoshi Mitake [Tue, 10 Nov 2009 15:04:01 +0000 (00:04 +0900)]
perf bench: Improve sched-pipe.c with more comfortable output

This patch improves sched-pipe.c with more comfortable output.

Change points are comment style description and
formatting numerical values and its units.

Example:

 | % ./perf bench sched pipe
 | # Running sched/pipe benchmark...
 | # Extecuted 1000000 pipe operations between two tasks
 |
 |      Total time:5.822 [sec]
 |
 |        5.822553 usecs/op
 |          171745 ops/sec

Signed-off-by: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1257865442-20252-3-git-send-email-mitake@dcl.info.waseda.ac.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf bench: Improve builtin-bench.c for more friendly output
Hitoshi Mitake [Tue, 10 Nov 2009 15:04:00 +0000 (00:04 +0900)]
perf bench: Improve builtin-bench.c for more friendly output

This patch makes output of perf bench more friendly.
Current style of putput, keeping user wait
and printing everything suddenly when we finish,
may confuse users.

So I improved it:

 | % perf bench sched messaging
 | # Running sched/messaging benchmark...  <- printed right after invocation
 | # 20 sender and receiver processes per group
 | # 10 groups == 400 processes run
 |
 |      Total time: 1.476 [sec]

Signed-off-by: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1257865442-20252-2-git-send-email-mitake@dcl.info.waseda.ac.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agosound: rawmidi: fix MIDI device O_APPEND error handling
Clemens Ladisch [Wed, 21 Oct 2009 07:11:43 +0000 (09:11 +0200)]
sound: rawmidi: fix MIDI device O_APPEND error handling

Commit 9a1b64caac82aa02cb74587ffc798e6f42c6170a in 2.6.30 broke the
error handling code in rawmidi_open_priv().

If only the output substream of a RawMIDI device has been opened and
if this device is then opened with O_RDWR | O_APPEND and if the
initialization of the input substream fails (either because of low
memory or because the device driver's open callback fails), then the
runtime structure of the already open output substream will be freed
and all following writes through the first handle will cause
snd_rawmidi_write() to use the NULL runtime pointer.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agosound: rawmidi: fix checking of O_APPEND when opening MIDI device
Clemens Ladisch [Wed, 21 Oct 2009 07:10:16 +0000 (09:10 +0200)]
sound: rawmidi: fix checking of O_APPEND when opening MIDI device

Commit 9a1b64caac82aa02cb74587ffc798e6f42c6170a in 2.6.30 dropped the
check that a substream must already have been opened with O_APPEND to be
able to open it a second time.

This would make it possible for a substream to be switched to append
mode, which would mean that non-atomic writes would fail unexpectedly.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agosound: rawmidi: fix double init when opening MIDI device with O_APPEND
Clemens Ladisch [Wed, 21 Oct 2009 07:09:38 +0000 (09:09 +0200)]
sound: rawmidi: fix double init when opening MIDI device with O_APPEND

Commit 9a1b64caac82aa02cb74587ffc798e6f42c6170a in 2.6.30 moved the
substream initialization code to where it would be executed every time
the substream is opened.

This had the consequence that any further opening would drop and leak
the data in the existing buffer, and that the device driver's open
callback would be called multiple times, unexpectedly.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda - Avoid quirk for HP dc5750
Takashi Iwai [Tue, 10 Nov 2009 15:08:45 +0000 (16:08 +0100)]
ALSA: hda - Avoid quirk for HP dc5750

The present quirk for HP dc5750 seems broken and maps the pins wrongly.
Since the auto-parser works well for this device, set the default entry
to use model=auto.

Reference: Novell bnc#552154
https://bugzilla.novell.com/show_bug.cgi?id=552154

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years ago[WATCHDOG] SBC-FITPC2 watchdog driver registration fix
Denis Turischev [Thu, 5 Nov 2009 11:32:40 +0000 (13:32 +0200)]
[WATCHDOG] SBC-FITPC2 watchdog driver registration fix

This patch fixes device registration process.

Signed-off-by: Denis Turischev <denis@compulab.co.il>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
14 years agoperf bench: Modify command-list.txt for the entry of perf-bench
Hitoshi Mitake [Tue, 10 Nov 2009 11:50:55 +0000 (20:50 +0900)]
perf bench: Modify command-list.txt for the entry of perf-bench

This patch modifies command-list.txt for the entry of
perf-bench. So perf will show 'bench' in command list.

Example:
% perf

 usage: perf [--version] [--help] COMMAND [ARGS]

 The most commonly used perf commands are:
   annotate    Read perf.data (created by perf record) and display annotated code
   bench       General framework for benchmark suites
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   list        List all symbolic event types
   probe       Define new dynamic tracepoints
   record      Run a command and record its profile into perf.data
   report      Read perf.data (created by perf record) and display the profile
   sched       Tool to trace/measure scheduler properties (latencies)
   stat        Run a command and gather performance counter statistics
   timechart   Tool to visualize total system behavior during a workload
   top         System profiling tool.
   trace       Read perf.data (created by perf record) and display trace output

 See 'perf help COMMAND' for more information on a specific command.

Signed-off-by: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1257853855-28934-4-git-send-email-mitake@dcl.info.waseda.ac.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf bench: Add new document about perf-bench
Hitoshi Mitake [Tue, 10 Nov 2009 11:50:54 +0000 (20:50 +0900)]
perf bench: Add new document about perf-bench

This patch adds new document about perf-bench.
Man page and html will be provided for user.

Signed-off-by: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1257853855-28934-3-git-send-email-mitake@dcl.info.waseda.ac.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf bench: Clean up bench/bench.h
Ingo Molnar [Tue, 10 Nov 2009 11:50:53 +0000 (20:50 +0900)]
perf bench: Clean up bench/bench.h

Clean up initializers in bench.h:

  - No need to break the line for function prototypes, they are more
    readable in a single line. (even if checkpatch complains about it

  - We try to align definitions / structure fields vertically,
    to make it  all a bit more readable.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1257853855-28934-2-git-send-email-mitake@dcl.info.waseda.ac.jp>

14 years agohw-breakpoints: Wrap in the KVM breakpoint active state check
Frederic Weisbecker [Tue, 10 Nov 2009 10:03:12 +0000 (11:03 +0100)]
hw-breakpoints: Wrap in the KVM breakpoint active state check

Wrap in the cpu dr7 check that tells if we have active
breakpoints that need to be restored in the cpu.

This wrapper makes the check more self-explainable and also
reusable for any further other uses.

Reported-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Avi Kivity <avi@redhat.com>
Cc: "K. Prasad" <prasad@linux.vnet.ibm.com>
14 years agohw-breakpoints: Fix broken hw-breakpoint sample module
Frederic Weisbecker [Tue, 10 Nov 2009 09:17:07 +0000 (10:17 +0100)]
hw-breakpoints: Fix broken hw-breakpoint sample module

The hw-breakpoint sample module has been broken during the
hw-breakpoint internals refactoring. Propagate the changes
to it.

Reported-by: "K. Prasad" <prasad@linux.vnet.ibm.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
14 years agohw-breakpoints: Fix broken a.out format dump
Frederic Weisbecker [Mon, 9 Nov 2009 20:03:43 +0000 (21:03 +0100)]
hw-breakpoints: Fix broken a.out format dump

Fix the broken a.out format dump. For now we only dump the ptrace
breakpoints.

TODO: Dump every perf breakpoints for the current thread, not only
ptrace based ones.

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: "K. Prasad" <prasad@linux.vnet.ibm.com>
14 years agoksym_tracer: Support read accesses independent of read/write.
Paul Mundt [Mon, 9 Nov 2009 08:37:34 +0000 (17:37 +0900)]
ksym_tracer: Support read accesses independent of read/write.

All of the infrastructure already exists to support read accesses
for platforms that support a read access independently of read/write
(such as in the case of the SuperH UBC). This just trivially hooks
up the read case by itself.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Prasad <prasad@linux.vnet.ibm.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Jan Kiszka <jan.kiszka@web.de>
Cc: Jiri Slaby <jirislaby@gmail.com>
Cc: Avi Kivity <avi@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>
LKML-Reference: <20091109083733.GA25848@linux-sh.org>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
14 years agoARM: Use a definition for the userspace cmpxchg emulation syscall
Russell King [Mon, 9 Nov 2009 23:53:29 +0000 (23:53 +0000)]
ARM: Use a definition for the userspace cmpxchg emulation syscall

Use a definition for the cmpxchg SWI instead of hard-coding the number.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Nicolas Pitre <nico@fluxnic.net>
14 years agoALSA: hda - Tweak OLPC XO-1.5 microphone bias
Daniel Drake [Mon, 9 Nov 2009 15:17:24 +0000 (15:17 +0000)]
ALSA: hda - Tweak OLPC XO-1.5 microphone bias

Our contacts at Conexant suggested that we reduce the external
microphone bias to 50% in order to center the input signal with
the DC input range of the codec. This is because the microphone
port is DC coupled for potential use with sensors.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agox86, amd-ucode: Check UCODE_MAGIC before loading the container file
Borislav Petkov [Thu, 29 Oct 2009 13:45:52 +0000 (14:45 +0100)]
x86, amd-ucode: Check UCODE_MAGIC before loading the container file

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
LKML-Reference: <20091029134552.GC30802@alberich.amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf bench: Modify builtin-pipe.c for processing common options
Hitoshi Mitake [Mon, 9 Nov 2009 23:20:02 +0000 (08:20 +0900)]
perf bench: Modify builtin-pipe.c for processing common options

This patch modifies builtin-pipe.c for processing common
options. The first option added is "--format".
Users of perf bench will be able to specify output style by
--format.

Usage example:

 % ./perf bench sched pipe # with no style specify
 (executing 1000000 pipe operations between two tasks)

         Total time:5.855 sec
                 5.855061 usecs/op
                 170792 ops/sec

 % ./perf bench --format=simple sched pipe # specified simple
 5.988

Signed-off-by: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1257808802-9420-5-git-send-email-mitake@dcl.info.waseda.ac.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
14 years agoperf bench: Modify bench/bench-messaging.c to adopt unified output formatting
Hitoshi Mitake [Mon, 9 Nov 2009 23:20:01 +0000 (08:20 +0900)]
perf bench: Modify bench/bench-messaging.c to adopt unified output formatting

This patch modifies bench/bench-messaging.c to adopt
unified output formatting: --format option.

Usage example:

 % ./perf bench sched messaging              # with no style
 specify (20 sender and receiver processes per group)
 (10 groups == 400 processes run)

        Total time:1.431 sec

 % ./perf bench --format=simple sched messaging # specified
 simple 1.431

Signed-off-by: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1257808802-9420-4-git-send-email-mitake@dcl.info.waseda.ac.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf bench: Modify builtin-bench.c for processing common options
Hitoshi Mitake [Mon, 9 Nov 2009 23:20:00 +0000 (08:20 +0900)]
perf bench: Modify builtin-bench.c for processing common options

This patch modifies builtin-bench.c for processing common
options. The first option added is "--format".
Users of perf bench will be able to specify output style by
--format.

Usage example:

 % ./perf bench sched messaging # with no style specify
 (20 sender and receiver processes per group)
 (10 groups == 400 processes run)

         Total time:1.431 sec

 % ./perf bench --format=simple sched messaging # specified
 simple 1.431

Signed-off-by: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1257808802-9420-3-git-send-email-mitake@dcl.info.waseda.ac.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf bench: Add format constants to bench.h for unified output formatting
Hitoshi Mitake [Mon, 9 Nov 2009 23:19:59 +0000 (08:19 +0900)]
perf bench: Add format constants to bench.h for unified output formatting

This patch adds some constants and extern declaration to
bench.h. These are used for unified output formatting
of 'perf bench'.

Signed-off-by: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1257808802-9420-2-git-send-email-mitake@dcl.info.waseda.ac.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agodrm/kms: Init the CRTC info fields for modes forced from the command line.
Francisco Jerez [Sat, 7 Nov 2009 15:27:32 +0000 (16:27 +0100)]
drm/kms: Init the CRTC info fields for modes forced from the command line.

Fixes fdo bug 24710.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/r600: CS parser updates
Alex Deucher [Mon, 9 Nov 2009 21:41:21 +0000 (16:41 -0500)]
drm/radeon/r600: CS parser updates

Add some additional regs that require relocs.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agohighmem: Fix debug_kmap_atomic() to also handle KM_IRQ_PTE, KM_NMI, and KM_NMI_PTE
Soeren Sandmann [Wed, 28 Oct 2009 17:56:35 +0000 (18:56 +0100)]
highmem: Fix debug_kmap_atomic() to also handle KM_IRQ_PTE, KM_NMI, and KM_NMI_PTE

Previously calling debug_kmap_atomic() with these types would
cause spurious warnings.

(triggered by SysProf using perf events)

Signed-off-by: Soeren Sandmann Pedersen <sandmann@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: a.p.zijlstra@chello.nl
Cc: <stable@kernel.org> # .31.x
LKML-Reference: <ye8vdhz8krw.fsf@camel23.daimi.au.dk>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agohighmem: Fix race in debug_kmap_atomic() which could cause warn_count to underflow
Soeren Sandmann [Wed, 28 Oct 2009 17:55:36 +0000 (18:55 +0100)]
highmem: Fix race in debug_kmap_atomic() which could cause warn_count to underflow

debug_kmap_atomic() tries to prevent ever printing more than 10
warnings, but it does so by testing whether an unsigned integer
is equal to 0. However, if the warning is caused by a nested
IRQ, then this counter may underflow and the stream of warnings
will never end.

Fix that by using a signed integer instead.

Signed-off-by: Soeren Sandmann Pedersen <sandmann@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: a.p.zijlstra@chello.nl
Cc: <stable@kernel.org> # .31.x
LKML-Reference: <ye8zl7b8ktj.fsf@camel23.daimi.au.dk>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoARM: S3C: Merge fixes-s3c64xx-dma
Ben Dooks [Mon, 9 Nov 2009 23:52:34 +0000 (23:52 +0000)]
ARM: S3C: Merge fixes-s3c64xx-dma

Merge branch 'fixes-s3c64xx-dma' into fixes-s3c-2632-rc6

14 years agoARM: S3C64XX: DMA: Free node for non-circular queues
Jassi Brar [Thu, 5 Nov 2009 04:44:39 +0000 (13:44 +0900)]
ARM: S3C64XX: DMA: Free node for non-circular queues

We need to free the buff and lli nodes if the buffer queue is
not CIRCULAR.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoARM: S3C64XX: DMA: Callback with correct buffer pointer
Jassi Brar [Thu, 5 Nov 2009 04:44:33 +0000 (13:44 +0900)]
ARM: S3C64XX: DMA: Callback with correct buffer pointer

buffdone callback should be called per buffer request with pointer
to the latest serviced request.
'next' should point to the one next to currently active.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoARM: S3C64XX: DMA: Make src and dst transfer size same
Jassi Brar [Thu, 5 Nov 2009 04:44:45 +0000 (13:44 +0900)]
ARM: S3C64XX: DMA: Make src and dst transfer size same

Some devices don't seem to work if the source and desitnation transfer
widths are not same. For example, SPI dma xfers, with 8bits/word,
don't work without this patch.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoARM: S3C64XX: DMA: Unify callback functions for success/failure
Jassi Brar [Thu, 5 Nov 2009 04:44:26 +0000 (13:44 +0900)]
ARM: S3C64XX: DMA: Unify callback functions for success/failure

Replace s3c64xx_dma_tcirq and s3c64xx_dma_errirq with the common
s3c64xx_dma_buffdone.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoARM: S3C64XX: DMA: Protect buffer pointers while manipulation
Jassi Brar [Thu, 5 Nov 2009 04:44:20 +0000 (13:44 +0900)]
ARM: S3C64XX: DMA: Protect buffer pointers while manipulation

Ensure the DMA buffer points are not updated from
another source during the process of enquing a buffer.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
[ben-linux@fluff.org: Updated patch comment]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoARM: S3C64XX: Tidy definition and comments in s3c_dma_has_circular()
Ben Dooks [Mon, 9 Nov 2009 23:45:47 +0000 (23:45 +0000)]
ARM: S3C64XX: Tidy definition and comments in s3c_dma_has_circular()

The recent changes to arch/arm/mach-s3c6400/include/mach/dma.h have
left an out of date comment in there as well as accidentally changing
the type of the function.

Fix the commit 54489cd46a3a268ed981c681726c6d690883f076

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoARM: S3C64XX: Remove duplicate s3c_dma_has_circular() definition for S3C64xx.
Maurus Cuelenaere [Wed, 4 Nov 2009 12:13:29 +0000 (13:13 +0100)]
ARM: S3C64XX: Remove duplicate s3c_dma_has_circular() definition for S3C64xx.

This patch removes the duplicated s3c_dma_has_circular() definition and so fixes
compilation for S3C64xx.

Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoARM: SMDK6410: Allocate more GPIO space for WM1190-EV1
Mark Brown [Tue, 3 Nov 2009 14:42:10 +0000 (14:42 +0000)]
ARM: SMDK6410: Allocate more GPIO space for WM1190-EV1

The WM835x has some GPIOs on it, allocate some space so we can use
them with gpiolib.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agoARM: SMDK6410: Configure GPIO pull up for WM835x IRQ line
Mark Brown [Tue, 3 Nov 2009 14:42:04 +0000 (14:42 +0000)]
ARM: SMDK6410: Configure GPIO pull up for WM835x IRQ line

When used with the WM1190-EV1 board we can use the internal pull up
resistor of the CPU to provide the required pull for the IRQ line.
Without this interrupts from the WM835x don't work in the default
WM1190-EV1 hardwaer configuration.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
14 years agomtd/maps: Fix accidental removal in Makefile
Atsushi Nemoto [Mon, 9 Nov 2009 23:21:19 +0000 (23:21 +0000)]
mtd/maps: Fix accidental removal in Makefile

The commit d79c326 ("gpio-addr-flash: new driver for GPIO assisted
flash addressing") removed two lines from the Makefile by accident.
Though I'm not sure how this accident happened, this patch reverts the
removal.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoALSA: hda: Use model=auto quirk for Sony VAIO VGN-FW170J using ALC262
Daniel T Chen [Mon, 9 Nov 2009 00:03:55 +0000 (19:03 -0500)]
ALSA: hda: Use model=auto quirk for Sony VAIO VGN-FW170J using ALC262

BugLink: https://bugs.launchpad.net/bugs/478309
The internal microphone on this VAIO model does not work unless the
"auto" quirk is used.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoMerge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvar...
Linus Torvalds [Mon, 9 Nov 2009 17:58:31 +0000 (09:58 -0800)]
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:
  i2c: Add an interface to lock/unlock an I2C bus segment
  i2c-piix4: Modify code name SB900 to Hudson-2

14 years agoMerge branch 'for-linus' of git://neil.brown.name/md
Linus Torvalds [Mon, 9 Nov 2009 17:57:02 +0000 (09:57 -0800)]
Merge branch 'for-linus' of git://neil.brown.name/md

* 'for-linus' of git://neil.brown.name/md:
  md/raid5: make sure curr_sync_completes is uptodate when reshape starts
  md: don't clear endpoint for resync when resync is interrupted.

14 years agoksm: cond_resched in unstable tree
Hugh Dickins [Mon, 9 Nov 2009 15:58:23 +0000 (15:58 +0000)]
ksm: cond_resched in unstable tree

KSM needs a cond_resched() for CONFIG_PREEMPT_NONE, in its unbounded
search of the unstable tree.  The stable tree cases already have one,
and originally there was one down inside get_user_pages();
but I missed it when I converted to follow_page() instead.

Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Acked-by: Izik Eidus <ieidus@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke...
Linus Torvalds [Mon, 9 Nov 2009 17:52:55 +0000 (09:52 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2:
  nilfs2: fix missing cleanup of gc cache on error cases
  nilfs2: fix kernel oops in error case of nilfs_ioctl_move_blocks

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Mon, 9 Nov 2009 17:51:42 +0000 (09:51 -0800)]
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: (34 commits)
  net/fsl_pq_mdio: add module license GPL
  can: fix WARN_ON dump in net/core/rtnetlink.c:rtmsg_ifinfo()
  can: should not use __dev_get_by_index() without locks
  hisax: remove bad udelay call to fix build error on ARM
  ipip: Fix handling of DF packets when pmtudisc is OFF
  qlge: Set PCIe reset type for EEH to fundamental.
  qlge: Fix early exit from mbox cmd complete wait.
  ixgbe: fix traffic hangs on Tx with ioatdma loaded
  ixgbe: Fix checking TFCS register for TXOFF status when DCB is enabled
  ixgbe: Fix gso_max_size for 82599 when DCB is enabled
  macsonic: fix crash on PowerBook 520
  NET: cassini, fix lock imbalance
  ems_usb: Fix byte order issues on big endian machines
  be2net: Bug fix to send config commands to hardware after netdev_register
  be2net: fix to set proper flow control on resume
  netfilter: xt_connlimit: fix regression caused by zero family value
  rt2x00: Don't queue ieee80211 work after USB removal
  Revert "ipw2200: fix oops on missing firmware"
  decnet: netdevice refcount leak
  netfilter: nf_nat: fix NAT issue in 2.6.30.4+
  ...

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Mon, 9 Nov 2009 17:51:15 +0000 (09:51 -0800)]
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: Move of_set_property_mutex acquisition outside of devtree_lock grab.
  sparc64: replace parentheses in pmul()
  sparc64: Add a comment about why we only use certain memory barriers these days.

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6
Linus Torvalds [Mon, 9 Nov 2009 17:50:55 +0000 (09:50 -0800)]
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"

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Linus Torvalds [Mon, 9 Nov 2009 17:50:15 +0000 (09:50 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  cifs: don't use CIFSGetSrvInodeNumber in is_path_accessible
  cifs: clean up handling when server doesn't consistently support inode numbers

14 years agoMerge branch 'sh/for-2.6.32' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal...
Linus Torvalds [Mon, 9 Nov 2009 17:49:58 +0000 (09:49 -0800)]
Merge branch 'sh/for-2.6.32' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6

* 'sh/for-2.6.32' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
  sh: Replace old style lock initializer
  sh: Account for cache aliases in flush_icache_range()
  sh: unwinder: Fix up invalid PC refetch in dwarf unwinder.
  serial: sh-sci: disable callback typo fix

14 years agoMerge branch 'for-linus' of git://www.linux-m32r.org/git/takata/linux-2.6_dev
Linus Torvalds [Mon, 9 Nov 2009 17:47:21 +0000 (09:47 -0800)]
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 arch/m32r/boot/compressed/Makefile

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Mon, 9 Nov 2009 17:30:14 +0000 (09:30 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: snd-aica: declare MODULE_FIRMWARE
  ALSA: hda - Don't initialize CORB/RIRB for single_cmd mode
  ALSA: usb-audio: fix combine_word problem
  sound: Replace old style lock initializer
  ASoC: S3C64XX I2S: Enable audio-bus clock
  ASoC: OMAP: Don't try to set unsupported OMAP_DMA_DATA_BURST_16 on OMAP1
  ALSA: hda, move hp_bseries_system
  sound: Use KERN_WARNING instead of KERN_WARN, which does not exist
  ALSA: intel8x0: Mute External Amplifier by default for another Sony model
  ALSA: hda - Add OLPC XO-1.5 PCI ID
  ALSA: hda - Enable GPIO control for mute LED on HP systems

14 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
Linus Torvalds [Mon, 9 Nov 2009 17:28:42 +0000 (09:28 -0800)]
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: sleep: another HP/Compaq DMI entries for init_set_sci_en_on_resume
  ACPI: add DMI entry for SCI_EN resume quirk on HP dv4
  thermal: sysfs-api.txt - document passive attribute for thermal zones
  thermal: sysfs-api.txt - reformat for improved readability
  acpi: thermal: Add EOL to the trip_point_N_type strings
  ACPI: Move dereference after NULL test
  ACPICA: avoid "Info: mapping multiple BARs. Your kernel is fine."
  ACPI: add __cpuinit to acpi_processor_add()
  acpi-power-meter: Don't leak ACPI error codes to userspace
  eeepc-laptop: don't enable camera at startup if it's already on.
  Revert "eeepc-laptop: Prevent a panic when disabling RT2860 wireless when associated"
  ACPI: clean up video.c boundary checks and types

14 years agoperf tools: Fix syntax in documentation
Zeev Tarantov [Mon, 9 Nov 2009 11:26:13 +0000 (13:26 +0200)]
perf tools: Fix syntax in documentation

Fix trivial syntax in perf-events user-space tools
documentation.

Signed-off-by: Zeev Tarantov <zeev.tarantov@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <12d7e64c0911081811i7e5b466cu6706ff6ab3e70db4@mail.gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf bench: Fix bench/sched-pipe.c to wait for child process
Hitoshi Mitake [Mon, 9 Nov 2009 03:31:05 +0000 (12:31 +0900)]
perf bench: Fix bench/sched-pipe.c to wait for child process

Ingo reported this small 'perf bench sched pipe' output problem:

 | $ ./perf bench sched pipe
 | (executing 1000000 pipe operations between two tasks)
 |
 | Total time:4.898 sec
 | $ 4.898586 usecs/op
 | 204140 ops/sec
 |
 | the shell prompt came back before the usecs/op and ops/sec line
 | was printed. Process teardown race, lack of wait() or so?

This caused by lack of calling waitpid() by parent process,
so I added it.

Signed-off-by: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Kosina <jkosina@suse.cz>
LKML-Reference: <1257737465-7546-1-git-send-email-mitake@dcl.info.waseda.ac.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agosh: Replace old style lock initializer
Thomas Gleixner [Fri, 6 Nov 2009 22:42:05 +0000 (22:42 +0000)]
sh: Replace old style lock initializer

SPIN_LOCK_UNLOCKED is deprecated. Use __SPIN_LOCK_UNLOCKED instead.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-sh@vger.kernel.org
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Account for cache aliases in flush_icache_range()
Matt Fleming [Thu, 5 Nov 2009 23:14:39 +0000 (23:14 +0000)]
sh: Account for cache aliases in flush_icache_range()

The icache may also contain aliases so we must account for them just
like we do when manipulating the dcache. We usually get away with
aliases in the icache because the instructions that are read from memory
are read-only, i.e. they never change. However, the place where this
bites us is when the code has been modified.

Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosparc: Move of_set_property_mutex acquisition outside of devtree_lock grab.
David S. Miller [Mon, 9 Nov 2009 01:41:20 +0000 (17:41 -0800)]
sparc: Move of_set_property_mutex acquisition outside of devtree_lock grab.

Otherwise we try to sleep with preemption disabled, etc.

Noticed by Thomas Gleixner.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agom32r: fix arch/m32r/boot/compressed/Makefile
Hirokazu Takata [Sun, 8 Nov 2009 23:51:35 +0000 (08:51 +0900)]
m32r: fix arch/m32r/boot/compressed/Makefile

- Fix a comment string
- Fix a typo of $(suffix-y)

Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
14 years agoext4: partial revert to fix double brelse WARNING()
Theodore Ts'o [Sun, 8 Nov 2009 20:45:44 +0000 (15:45 -0500)]
ext4: partial revert to fix double brelse WARNING()

This is a partial revert of commit 6487a9d (only the changes made to
fs/ext4/namei.c), since it is causing the following brelse()
double-free warning when running fsstress on a file system with 1k
blocksize and we run into a block allocation failure while converting
a single-block directory to a multi-block hash-tree indexed directory.

WARNING: at fs/buffer.c:1197 __brelse+0x2e/0x33()
Hardware name:
VFS: brelse: Trying to free free buffer
Modules linked in:
Pid: 2226, comm: jbd2/sdd-8 Not tainted 2.6.32-rc6-00577-g0003f55 #101
Call Trace:
 [<c01587fb>] warn_slowpath_common+0x65/0x95
 [<c0158869>] warn_slowpath_fmt+0x29/0x2c
 [<c021168e>] __brelse+0x2e/0x33
 [<c0288a9f>] jbd2_journal_refile_buffer+0x67/0x6c
 [<c028a9ed>] jbd2_journal_commit_transaction+0x319/0x14d8
 [<c0164d73>] ? try_to_del_timer_sync+0x58/0x60
 [<c0175bcc>] ? sched_clock_cpu+0x12a/0x13e
 [<c017f6b4>] ? trace_hardirqs_off+0xb/0xd
 [<c0175c1f>] ? cpu_clock+0x3f/0x5b
 [<c017f6ec>] ? lock_release_holdtime+0x36/0x137
 [<c0664ad0>] ? _spin_unlock_irqrestore+0x44/0x51
 [<c0180af3>] ? trace_hardirqs_on_caller+0x103/0x124
 [<c0180b1f>] ? trace_hardirqs_on+0xb/0xd
 [<c0164d73>] ? try_to_del_timer_sync+0x58/0x60
 [<c0290d1c>] kjournald2+0x11a/0x310
 [<c017118e>] ? autoremove_wake_function+0x0/0x38
 [<c0290c02>] ? kjournald2+0x0/0x310
 [<c0170ee6>] kthread+0x66/0x6b
 [<c0170e80>] ? kthread+0x0/0x6b
 [<c01251b3>] kernel_thread_helper+0x7/0x10
---[ end trace 5579351b86af61e3 ]---

Commit 6487a9d was an attempt some buffer head leaks in an ENOSPC
error path, but in some cases it actually results in an excess ENOSPC,
as shown above.  Fixing this means cleaning up who is responsible for
releasing the buffer heads from the callee to the caller of
add_dirent_to_buf().

Since that's a relatively complex change, and we're late in the rcX
development cycle, I'm reverting this now, and holding back a more
complete fix until after 2.6.32 ships.  We've lived with this
buffer_head leak on ENOSPC in ext3 and ext4 for a very long time; a
few more months won't kill us.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: Curt Wohlgemuth <curtw@google.com>
14 years ago[ARM] Fix test for unimplemented ARM syscalls
Russell King [Sun, 8 Nov 2009 20:05:28 +0000 (20:05 +0000)]
[ARM] Fix test for unimplemented ARM syscalls

The existing test always failed since 'no' was always greater than
0x7ff.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoperf tools: Modify perf routines to use new debugfs routines
Clark Williams [Sun, 8 Nov 2009 15:03:07 +0000 (09:03 -0600)]
perf tools: Modify perf routines to use new debugfs routines

modify perf.c get_debugfs_mntpnt() to use the util/debugfs.c
debugfs_find_mountpoint()

modify util/parse-events.c to use debugfs_valid_mountpoint().

Signed-off-by: Clark Williams <williams@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <20091101155720.624cc87e@torg>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoperf tools: Add debugfs utility routines for perf
Clark Williams [Sun, 8 Nov 2009 15:01:37 +0000 (09:01 -0600)]
perf tools: Add debugfs utility routines for perf

Add routines to locate the debugfs mount point and to manage the
mounting and unmounting of the debugfs.

Signed-off-by: Clark Williams <williams@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <20091101155621.2b3503ee@torg>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoMerge branch 'for-rmk' of git://git.marvell.com/orion
Russell King [Sun, 8 Nov 2009 16:40:38 +0000 (16:40 +0000)]
Merge branch 'for-rmk' of git://git.marvell.com/orion

14 years agoperf tools: Fix permission checks
Pekka Enberg [Sun, 8 Nov 2009 16:01:06 +0000 (18:01 +0200)]
perf tools: Fix permission checks

The perf_event_open() system call returns EACCES if the user is
not root which results in a very confusing error message:

  $ perf record -A -a -f

    Error: perfcounter syscall returned with -1 (Permission denied)

    Fatal: No CONFIG_PERF_EVENTS=y kernel support configured?

It turns out that's because perf tools are checking only for
EPERM. Fix that up to get a much better error message:

  $ perf record -A -a -f
    Fatal: Permission error - are you root?

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <1257696066-4046-1-git-send-email-penberg@cs.helsinki.fi>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agox86/PCI: Adjust GFP mask handling for coherent allocations
Jan Beulich [Sun, 8 Nov 2009 11:12:14 +0000 (12:12 +0100)]
x86/PCI: Adjust GFP mask handling for coherent allocations

Rather than forcing GFP flags and DMA mask to be inconsistent,
GFP flags should be determined even for the fallback device
through dma_alloc_coherent_mask()/dma_alloc_coherent_gfp_flags().

This restores 64-bit behavior as it was prior to commits
8965eb19386fdf5ccd0ef8b02593eb8560aa3416 and
4a367f3a9dbf2e7ffcee4702203479809236ee6e (not sure why there are
two of them), where GFP_DMA was forced on for 32-bit, but not
for 64-bit, with the slight adjustment that afaict even 32-bit
doesn't need this without CONFIG_ISA.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Acked-by: Takashi Iwai <tiwai@suse.de>
LKML-Reference: <4AF18187020000780001D8AA@vpn.id2.novell.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
14 years agoksym_tracer: Remove KSYM_SELFTEST_ENTRY
Li Zefan [Thu, 10 Sep 2009 01:35:20 +0000 (09:35 +0800)]
ksym_tracer: Remove KSYM_SELFTEST_ENTRY

The macro used to be used in both trace_selftest.c and
trace_ksym.c, but no longer, so remove it from header file.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Prasad <prasad@linux.vnet.ibm.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
14 years agohw-breakpoints: Arbitrate access to pmu following registers constraints
Frederic Weisbecker [Thu, 10 Sep 2009 07:26:21 +0000 (09:26 +0200)]
hw-breakpoints: Arbitrate access to pmu following registers constraints

Allow or refuse to build a counter using the breakpoints pmu following
given constraints.

We keep track of the pmu users by using three per cpu variables:

- nr_cpu_bp_pinned stores the number of pinned cpu breakpoints counters
  in the given cpu

- nr_bp_flexible stores the number of non-pinned breakpoints counters
  in the given cpu.

- task_bp_pinned stores the number of pinned task breakpoints in a cpu

The latter is not a simple counter but gathers the number of tasks that
have n pinned breakpoints.
Considering HBP_NUM the number of available breakpoint address
registers:
   task_bp_pinned[0] is the number of tasks having 1 breakpoint
   task_bp_pinned[1] is the number of tasks having 2 breakpoints
   [...]
   task_bp_pinned[HBP_NUM - 1] is the number of tasks having the
   maximum number of registers (HBP_NUM).

When a breakpoint counter is created and wants an access to the pmu,
we evaluate the following constraints:

== Non-pinned counter ==

- If attached to a single cpu, check:

    (per_cpu(nr_bp_flexible, cpu) || (per_cpu(nr_cpu_bp_pinned, cpu)
         + max(per_cpu(task_bp_pinned, cpu)))) < HBP_NUM

       -> If there are already non-pinned counters in this cpu, it
          means there is already a free slot for them.
          Otherwise, we check that the maximum number of per task
          breakpoints (for this cpu) plus the number of per cpu
          breakpoint (for this cpu) doesn't cover every registers.

- If attached to every cpus, check:

    (per_cpu(nr_bp_flexible, *) || (max(per_cpu(nr_cpu_bp_pinned, *))
           + max(per_cpu(task_bp_pinned, *)))) < HBP_NUM

       -> This is roughly the same, except we check the number of per
          cpu bp for every cpu and we keep the max one. Same for the
          per tasks breakpoints.

== Pinned counter ==

- If attached to a single cpu, check:

       ((per_cpu(nr_bp_flexible, cpu) > 1)
            + per_cpu(nr_cpu_bp_pinned, cpu)
            + max(per_cpu(task_bp_pinned, cpu))) < HBP_NUM

       -> Same checks as before. But now the nr_bp_flexible, if any,
          must keep one register at least (or flexible breakpoints will
          never be be fed).

- If attached to every cpus, check:

      ((per_cpu(nr_bp_flexible, *) > 1)
           + max(per_cpu(nr_cpu_bp_pinned, *))
           + max(per_cpu(task_bp_pinned, *))) < HBP_NUM

Changes in v2:

- Counter -> event rename

Changes in v5:

- Fix unreleased non-pinned task-bound-only counters. We only released
  it in the first cpu. (Thanks to Paul Mackerras for reporting that)

Changes in v6:

- Currently, events scheduling are done in this order: cpu context
  pinned + cpu context non-pinned + task context pinned + task context
  non-pinned events. Then our current constraints are right theoretically
  but not in practice, because non-pinned counters may be scheduled
  before we can apply every possible pinned counters. So consider
  non-pinned counters as pinned for now.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Prasad <prasad@linux.vnet.ibm.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Jan Kiszka <jan.kiszka@web.de>
Cc: Jiri Slaby <jirislaby@gmail.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Avi Kivity <avi@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Paul Mundt <lethal@linux-sh.org>