GitHub/moto-9609/android_kernel_motorola_exynos9610.git
15 years agomm lockless pagecache barrier fix
Nick Piggin [Tue, 6 Jan 2009 02:05:50 +0000 (03:05 +0100)]
mm lockless pagecache barrier fix

An XFS workload showed up a bug in the lockless pagecache patch. Basically it
would go into an "infinite" loop, although it would sometimes be able to break
out of the loop! The reason is a missing compiler barrier in the "increment
reference count unless it was zero" case of the lockless pagecache protocol in
the gang lookup functions.

This would cause the compiler to use a cached value of struct page pointer to
retry the operation with, rather than reload it. So the page might have been
removed from pagecache and freed (refcount==0) but the lookup would not correctly
notice the page is no longer in pagecache, and keep attempting to increment the
refcount and failing, until the page gets reallocated for something else. This
isn't a data corruption because the condition will be detected if the page has
been reallocated. However it can result in a lockup.

Linus points out that ACCESS_ONCE is also required in that pointer load, even
if it's absence is not causing a bug on our particular build. The most general
way to solve this is just to put an rcu_dereference in radix_tree_deref_slot.

Assembly of find_get_pages,
before:
.L220:
        movq    (%rbx), %rax    #* ivtmp.1162, tmp82
        movq    (%rax), %rdi    #, prephitmp.1149
.L218:
        testb   $1, %dil        #, prephitmp.1149
        jne     .L217   #,
        testq   %rdi, %rdi      # prephitmp.1149
        je      .L203   #,
        cmpq    $-1, %rdi       #, prephitmp.1149
        je      .L217   #,
        movl    8(%rdi), %esi   # <variable>._count.counter, c
        testl   %esi, %esi      # c
        je      .L218   #,

after:
.L212:
        movq    (%rbx), %rax    #* ivtmp.1109, tmp81
        movq    (%rax), %rdi    #, ret
        testb   $1, %dil        #, ret
        jne     .L211   #,
        testq   %rdi, %rdi      # ret
        je      .L197   #,
        cmpq    $-1, %rdi       #, ret
        je      .L211   #,
        movl    8(%rdi), %esi   # <variable>._count.counter, c
        testl   %esi, %esi      # c
        je      .L212   #,

(notice the obvious infinite loop in the first example, if page->count remains 0)

Signed-off-by: Nick Piggin <npiggin@suse.de>
Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoi2o: Update my address
Alan Cox [Mon, 5 Jan 2009 14:04:40 +0000 (14:04 +0000)]
i2o: Update my address

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomm: update my address
Alan Cox [Mon, 5 Jan 2009 14:06:29 +0000 (14:06 +0000)]
mm: update my address

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoX86_DEBUGCTLMSR won't work on uml
Al Viro [Mon, 5 Jan 2009 17:19:02 +0000 (17:19 +0000)]
X86_DEBUGCTLMSR won't work on uml

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agouml got broken by commit 30742d5c2277c325fb0e9d2d817d55a19995fe8f
Al Viro [Mon, 5 Jan 2009 17:18:52 +0000 (17:18 +0000)]
uml got broken by commit 30742d5c2277c325fb0e9d2d817d55a19995fe8f

... if you revert a commit, revert the fixups elsewhere that had been
triggered by it.  Such as 8c56250f48347750c82ab18d98d647dcf99ca674
(lockdep, UML: fix compilation when CONFIG_TRACE_IRQFLAGS_SUPPORT is not set).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoget rid of the last symlink in uml build
Al Viro [Mon, 5 Jan 2009 17:18:42 +0000 (17:18 +0000)]
get rid of the last symlink in uml build

We need to make asm-offsets.h contents visible for objects built
with userland headers.  Instead of creating a symlink, just have the
file with equivalent include (relative to location of header) created
once.  That kills the last symlink used in arch/um builds.

Additionally, both generated headers can become dependencies of
archprepare now, killing the misuse of prepare.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'audit.b61' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit...
Linus Torvalds [Mon, 5 Jan 2009 00:32:11 +0000 (16:32 -0800)]
Merge branch 'audit.b61' of git://git./linux/kernel/git/viro/audit-current

* 'audit.b61' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current:
  audit: validate comparison operations, store them in sane form
  clean up audit_rule_{add,del} a bit
  make sure that filterkey of task,always rules is reported
  audit rules ordering, part 2
  fixing audit rule ordering mess, part 1
  audit_update_lsm_rules() misses the audit_inode_hash[] ones
  sanitize audit_log_capset()
  sanitize audit_fd_pair()
  sanitize audit_mq_open()
  sanitize AUDIT_MQ_SENDRECV
  sanitize audit_mq_notify()
  sanitize audit_mq_getsetattr()
  sanitize audit_ipc_set_perm()
  sanitize audit_ipc_obj()
  sanitize audit_socketcall
  don't reallocate buffer in every audit_sockaddr()

15 years agortc: add alarm/update irq interfaces
Alessandro Zummo [Sun, 4 Jan 2009 20:00:54 +0000 (12:00 -0800)]
rtc: add alarm/update irq interfaces

Add standard interfaces for alarm/update irqs enabling.  Drivers are no
more required to implement equivalent ioctl code as rtc-dev will provide
it.

UIE emulation should now be handled correctly and will work even for those
RTC drivers who cannot be configured to do both UIE and AIE.

Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Cc: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agofs: symlink write_begin allocation context fix
Nick Piggin [Sun, 4 Jan 2009 20:00:53 +0000 (12:00 -0800)]
fs: symlink write_begin allocation context fix

With the write_begin/write_end aops, page_symlink was broken because it
could no longer pass a GFP_NOFS type mask into the point where the
allocations happened.  They are done in write_begin, which would always
assume that the filesystem can be entered from reclaim.  This bug could
cause filesystem deadlocks.

The funny thing with having a gfp_t mask there is that it doesn't really
allow the caller to arbitrarily tinker with the context in which it can be
called.  It couldn't ever be GFP_ATOMIC, for example, because it needs to
take the page lock.  The only thing any callers care about is __GFP_FS
anyway, so turn that into a single flag.

Add a new flag for write_begin, AOP_FLAG_NOFS.  Filesystems can now act on
this flag in their write_begin function.  Change __grab_cache_page to
accept a nofs argument as well, to honour that flag (while we're there,
change the name to grab_cache_page_write_begin which is more instructive
and does away with random leading underscores).

This is really a more flexible way to go in the end anyway -- if a
filesystem happens to want any extra allocations aside from the pagecache
ones in ints write_begin function, it may now use GFP_KERNEL (rather than
GFP_NOFS) for common case allocations (eg.  ocfs2_alloc_write_ctxt, for a
random example).

[kosaki.motohiro@jp.fujitsu.com: fix ubifs]
[kosaki.motohiro@jp.fujitsu.com: fix fuse]
Signed-off-by: Nick Piggin <npiggin@suse.de>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: <stable@kernel.org> [2.6.28.x]
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
[ Cleaned up the calling convention: just pass in the AOP flags
  untouched to the grab_cache_page_write_begin() function.  That
  just simplifies everybody, and may even allow future expansion of the
  logic.   - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoviafb: fix crashes due to 4k stack overflow
Bruno Prémont [Sun, 4 Jan 2009 21:11:54 +0000 (13:11 -0800)]
viafb: fix crashes due to 4k stack overflow

The function viafb_cursor() uses 2 stack-variables of CURSOR_SIZE bits;
CURSOR_SIZE is defined as (8 * 1024).  Using up twice 1k on stack is too
much for 4k-stack (though it works with 8k-stacks).  Make those two
variables kzalloc'ed to preserve stack space.

Also merge the whole lot of local struct's in viafb_ioctl into a union so
the stack usage gets minimized here as well.  (struct's are only accessed
in their indicidual IOCTL case) This second part is only compile-tested as
I know of no userspace app using the IOCTLs.

Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Cc: <JosephChan@via.com.tw>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agofs: introduce bgl_lock_ptr()
Pekka Enberg [Sun, 4 Jan 2009 20:00:48 +0000 (12:00 -0800)]
fs: introduce bgl_lock_ptr()

As suggested by Andreas Dilger, introduce a bgl_lock_ptr() helper in
<linux/blockgroup_lock.h> and add separate sb_bgl_lock() helpers to
filesystem specific header files to break the hidden dependency to
struct ext[234]_sb_info.

Also, while at it, convert the macros to static inlines to try make up
for all the times I broke Andrew Morton's tree.

Acked-by: Andreas Dilger <adilger@sun.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agospi.h uses/needs device.h
Randy Dunlap [Sun, 4 Jan 2009 20:00:47 +0000 (12:00 -0800)]
spi.h uses/needs device.h

Include header files as used/needed:

  In file included from drivers/leds/leds-dac124s085.c:16:
  include/linux/spi/spi.h:66: error: field 'dev' has incomplete type
  include/linux/spi/spi.h: In function 'to_spi_device':
  include/linux/spi/spi.h:100: warning: type defaults to 'int' in declaration of '__mptr'
  ...

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: 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 agovmalloc.c: fix flushing in vmap_page_range()
Adam Lackorzynski [Sun, 4 Jan 2009 20:00:46 +0000 (12:00 -0800)]
vmalloc.c: fix flushing in vmap_page_range()

The flush_cache_vmap in vmap_page_range() is called with the end of the
range twice.  The following patch fixes this for me.

Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocgroups: fix a race between cgroup_clone and umount
Li Zefan [Sun, 4 Jan 2009 20:00:45 +0000 (12:00 -0800)]
cgroups: fix a race between cgroup_clone and umount

The race is calling cgroup_clone() while umounting the ns cgroup subsys,
and thus cgroup_clone() might access invalid cgroup_fs, or kill_sb() is
called after cgroup_clone() created a new dir in it.

The BUG I triggered is BUG_ON(root->number_of_cgroups != 1);

  ------------[ cut here ]------------
  kernel BUG at kernel/cgroup.c:1093!
  invalid opcode: 0000 [#1] SMP
  ...
  Process umount (pid: 5177, ti=e411e000 task=e40c4670 task.ti=e411e000)
  ...
  Call Trace:
   [<c0493df7>] ? deactivate_super+0x3f/0x51
   [<c04a3600>] ? mntput_no_expire+0xb3/0xdd
   [<c04a3ab2>] ? sys_umount+0x265/0x2ac
   [<c04a3b06>] ? sys_oldumount+0xd/0xf
   [<c0403911>] ? sysenter_do_call+0x12/0x31
  ...
  EIP: [<c0456e76>] cgroup_kill_sb+0x23/0xe0 SS:ESP 0068:e411ef2c
  ---[ end trace c766c1be3bf944ac ]---

Cc: Serge E. Hallyn <serue@us.ibm.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Paul Menage <menage@google.com>
Cc: "Serge E. Hallyn" <serue@us.ibm.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoaudit: validate comparison operations, store them in sane form
Al Viro [Tue, 16 Dec 2008 10:59:26 +0000 (05:59 -0500)]
audit: validate comparison operations, store them in sane form

Don't store the field->op in the messy (and very inconvenient for e.g.
audit_comparator()) form; translate to dense set of values and do full
validation of userland-submitted value while we are at it.

->audit_init_rule() and ->audit_match_rule() get new values now; in-tree
instances updated.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoclean up audit_rule_{add,del} a bit
Al Viro [Mon, 15 Dec 2008 06:50:28 +0000 (01:50 -0500)]
clean up audit_rule_{add,del} a bit

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agomake sure that filterkey of task,always rules is reported
Al Viro [Tue, 16 Dec 2008 08:51:22 +0000 (03:51 -0500)]
make sure that filterkey of task,always rules is reported

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoaudit rules ordering, part 2
Al Viro [Mon, 15 Dec 2008 06:17:50 +0000 (01:17 -0500)]
audit rules ordering, part 2

Fix the actual rule listing; add per-type lists _not_ used for matching,
with all exit,... sitting on one such list.  Simplifies "do something
for all rules" logics, while we are at it...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agofixing audit rule ordering mess, part 1
Al Viro [Mon, 15 Dec 2008 04:45:27 +0000 (23:45 -0500)]
fixing audit rule ordering mess, part 1

Problem: ordering between the rules on exit chain is currently lost;
all watch and inode rules are listed after everything else _and_
exit,never on one kind doesn't stop exit,always on another from
being matched.

Solution: assign priorities to rules, keep track of the current
highest-priority matching rule and its result (always/never).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoaudit_update_lsm_rules() misses the audit_inode_hash[] ones
Al Viro [Sun, 14 Dec 2008 17:04:02 +0000 (12:04 -0500)]
audit_update_lsm_rules() misses the audit_inode_hash[] ones

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agosanitize audit_log_capset()
Al Viro [Sun, 4 Jan 2009 19:52:57 +0000 (14:52 -0500)]
sanitize audit_log_capset()

* no allocations
* return void
* don't duplicate checked for dummy context

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agosanitize audit_fd_pair()
Al Viro [Sun, 14 Dec 2008 09:57:47 +0000 (04:57 -0500)]
sanitize audit_fd_pair()

* no allocations
* return void

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agosanitize audit_mq_open()
Al Viro [Sun, 14 Dec 2008 09:02:26 +0000 (04:02 -0500)]
sanitize audit_mq_open()

* don't bother with allocations
* don't do double copy_from_user()
* don't duplicate parts of check for audit_dummy_context()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agosanitize AUDIT_MQ_SENDRECV
Al Viro [Sun, 14 Dec 2008 08:46:48 +0000 (03:46 -0500)]
sanitize AUDIT_MQ_SENDRECV

* logging the original value of *msg_prio in mq_timedreceive(2)
  is insane - the argument is write-only (i.e. syscall always
  ignores the original value and only overwrites it).
* merge __audit_mq_timed{send,receive}
* don't do copy_from_user() twice
* don't mess with allocations in auditsc part
* ... and don't bother checking !audit_enabled and !context in there -
  we'd already checked for audit_dummy_context().

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agosanitize audit_mq_notify()
Al Viro [Wed, 10 Dec 2008 12:16:12 +0000 (07:16 -0500)]
sanitize audit_mq_notify()

* don't copy_from_user() twice
* don't bother with allocations
* don't duplicate parts of audit_dummy_context()
* make it return void

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agosanitize audit_mq_getsetattr()
Al Viro [Wed, 10 Dec 2008 11:58:59 +0000 (06:58 -0500)]
sanitize audit_mq_getsetattr()

* get rid of allocations
* make it return void
* don't duplicate parts of audit_dummy_context()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agosanitize audit_ipc_set_perm()
Al Viro [Wed, 10 Dec 2008 08:47:15 +0000 (03:47 -0500)]
sanitize audit_ipc_set_perm()

* get rid of allocations
* make it return void
* simplify callers

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agosanitize audit_ipc_obj()
Al Viro [Wed, 10 Dec 2008 08:40:06 +0000 (03:40 -0500)]
sanitize audit_ipc_obj()

* get rid of allocations
* make it return void
* simplify callers

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agosanitize audit_socketcall
Al Viro [Wed, 10 Dec 2008 08:16:51 +0000 (03:16 -0500)]
sanitize audit_socketcall

* don't bother with allocations
* now that it can't fail, make it return void

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agodon't reallocate buffer in every audit_sockaddr()
Al Viro [Wed, 10 Dec 2008 00:50:34 +0000 (19:50 -0500)]
don't reallocate buffer in every audit_sockaddr()

No need to do that more than once per process lifetime; allocating/freeing
on each sendto/accept/etc. is bloody pointless.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoMerge branch 'cpus4096-for-linus-3' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 3 Jan 2009 20:04:39 +0000 (12:04 -0800)]
Merge branch 'cpus4096-for-linus-3' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'cpus4096-for-linus-3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (77 commits)
  x86: setup_per_cpu_areas() cleanup
  cpumask: fix compile error when CONFIG_NR_CPUS is not defined
  cpumask: use alloc_cpumask_var_node where appropriate
  cpumask: convert shared_cpu_map in acpi_processor* structs to cpumask_var_t
  x86: use cpumask_var_t in acpi/boot.c
  x86: cleanup some remaining usages of NR_CPUS where s/b nr_cpu_ids
  sched: put back some stack hog changes that were undone in kernel/sched.c
  x86: enable cpus display of kernel_max and offlined cpus
  ia64: cpumask fix for is_affinity_mask_valid()
  cpumask: convert RCU implementations, fix
  xtensa: define __fls
  mn10300: define __fls
  m32r: define __fls
  h8300: define __fls
  frv: define __fls
  cris: define __fls
  cpumask: CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS
  cpumask: zero extra bits in alloc_cpumask_var_node
  cpumask: replace for_each_cpu_mask_nr with for_each_cpu in kernel/time/
  cpumask: convert mm/
  ...

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/linux...
Linus Torvalds [Sat, 3 Jan 2009 20:03:52 +0000 (12:03 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/joro/linux-2.6-iommu

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/linux-2.6-iommu: (89 commits)
  AMD IOMMU: remove now unnecessary #ifdefs
  AMD IOMMU: prealloc_protection_domains should be static
  kvm/iommu: fix compile warning
  AMD IOMMU: add statistics about total number of map requests
  AMD IOMMU: add statistics about allocated io memory
  AMD IOMMU: add stats counter for domain tlb flushes
  AMD IOMMU: add stats counter for single iommu domain tlb flushes
  AMD IOMMU: add stats counter for cross-page request
  AMD IOMMU: add stats counter for free_coherent requests
  AMD IOMMU: add stats counter for alloc_coherent requests
  AMD IOMMU: add stats counter for unmap_sg requests
  AMD IOMMU: add stats counter for map_sg requests
  AMD IOMMU: add stats counter for unmap_single requests
  AMD IOMMU: add stats counter for map_single requests
  AMD IOMMU: add stats counter for completion wait events
  AMD IOMMU: add init code for statistic collection
  AMD IOMMU: add necessary header defines for stats counting
  AMD IOMMU: add Kconfig entry for statistic collection code
  AMD IOMMU: use dev_name in iommu_enable function
  AMD IOMMU: use calc_devid in prealloc_protection_domains
  ...

15 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Sat, 3 Jan 2009 20:02:18 +0000 (12:02 -0800)]
Merge branch 'for_linus' of git://git./linux/kernel/git/mchehab/linux-2.6

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (34 commits)
  V4L/DVB (10173): Missing v4l2_prio_close in radio_release
  V4L/DVB (10172): add DVB_DEVICE_TYPE= to uevent
  V4L/DVB (10171): Use usb_set_intfdata
  V4L/DVB (10170): tuner-simple: prevent possible OOPS caused by divide by zero error
  V4L/DVB (10168): sms1xxx: fix inverted gpio for lna control on tiger r2
  V4L/DVB (10167): sms1xxx: add support for inverted gpio
  V4L/DVB (10166): dvb frontend: stop using non-C99 compliant comments
  V4L/DVB (10165): Add FE_CAN_2G_MODULATION flag to frontends that support DVB-S2
  V4L/DVB (10164): Add missing S2 caps flag to S2API
  V4L/DVB (10163): em28xx: allocate adev together with struct em28xx dev
  V4L/DVB (10162): tuner-simple: Fix tuner type set message
  V4L/DVB (10161): saa7134: fix autodetection for AVer TV GO 007 FM Plus
  V4L/DVB (10160): em28xx: update chip id for em2710
  V4L/DVB (10157): Add USB ID for the Sil4701 radio from DealExtreme
  V4L/DVB (10156): saa7134: Add support for Avermedia AVer TV GO 007 FM Plus
  V4L/DVB (10155): Add TEA5764 radio driver
  V4L/DVB (10154): saa7134: fix a merge conflict on Behold H6 board
  V4L/DVB (10153): Add the Beholder H6 card to DVB-T part of sources.
  V4L/DVB (10152): Change configuration of the Beholder H6 card
  V4L/DVB (10151): Fix I2C bridge error in zl10353
  ...

15 years agosparseirq: move set/get_timer_rand_state back to .c
Yinghai Lu [Sat, 3 Jan 2009 08:06:34 +0000 (00:06 -0800)]
sparseirq: move set/get_timer_rand_state back to .c

those two functions only used in that C file

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
Linus Torvalds [Sat, 3 Jan 2009 20:00:07 +0000 (12:00 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/drzeus/mmc

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
  mmc: warn about voltage mismatches
  mmc_spi: Add support for OpenFirmware bindings
  pxamci: fix dma_unmap_sg length
  mmc_block: ensure all sectors that do not have errors are read
  drivers/mmc: Move a dereference below a NULL test
  sdhci: handle built-in sdhci with modular leds class
  mmc: balanc pci_iomap with pci_iounmap
  mmc_block: print better error messages
  mmc: Add mmc_vddrange_to_ocrmask() helper function
  ricoh_mmc: Handle newer models of Ricoh controllers
  mmc: Add 8-bit bus width support
  sdhci: activate led support also when module
  mmc: trivial annotation of 'blocks'
  pci: use pci_ioremap_bar() in drivers/mmc
  sdricoh_cs: Add support for Bay Controller devices
  mmc: at91_mci: reorder timer setup and mmc_add_host() call

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
Linus Torvalds [Sat, 3 Jan 2009 19:59:13 +0000 (11:59 -0800)]
Merge git://git./linux/kernel/git/wim/linux-2.6-watchdog

* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
  [WATCHDOG] Add support for the WM8350 watchdog
  [WATCHDOG] Add SMSC SCH311x Watchdog Timer.
  [WATCHDOG] ib700wdt - add timeout parameter

15 years agoMerge branch 'cputime' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
Linus Torvalds [Sat, 3 Jan 2009 19:56:24 +0000 (11:56 -0800)]
Merge branch 'cputime' of git://git390.osdl.marist.edu/linux-2.6

* 'cputime' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
  [PATCH] fast vdso implementation for CLOCK_THREAD_CPUTIME_ID
  [PATCH] improve idle cputime accounting
  [PATCH] improve precision of idle time detection.
  [PATCH] improve precision of process accounting.
  [PATCH] idle cputime accounting
  [PATCH] fix scaled & unscaled cputime accounting

15 years agoMake %p print '(null)' for NULL pointers
Linus Torvalds [Sat, 3 Jan 2009 19:46:17 +0000 (11:46 -0800)]
Make %p print '(null)' for NULL pointers

Before, when we only ever printed out the pointer value itself, a NULL
pointer would never cause issues and might as well be printed out as
just its numeric value.

However, with the extended %p formats, especially %pR, we might validly
want to print out resources for debugging.  And sometimes they don't
even exist, and the resource pointer is just NULL.  Print it out as
such, rather than oopsing.

This is a more generic version of a patch done by Trent Piepho (catching
all %p cases rather than just %pR, and using "(null)" instead of
"[NULL]" to match glibc).

Requested-by: Trent Piepho <xyzzy@speakeasy.org>
Acked-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoget rid of special-casing the /sbin/loader on alpha
Al Viro [Sat, 3 Jan 2009 07:16:33 +0000 (07:16 +0000)]
get rid of special-casing the /sbin/loader on alpha

... just make it a binfmt handler like #! one.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agosanitize ifdefs in binfmt_aout
Al Viro [Sat, 3 Jan 2009 07:16:23 +0000 (07:16 +0000)]
sanitize ifdefs in binfmt_aout

They are actually alpha vs.  i386/arm/m68k i.e. ecoff vs. aout.

In the only place where we actually tried to handle arm and i386/m68k in
different ways (START_DATA() in coredump handling), the arm variant
works for all of them (i386 and m68k have u.start_code set to 0).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoremove the rudiment of a.out for sparc
Al Viro [Sat, 3 Jan 2009 07:16:13 +0000 (07:16 +0000)]
remove the rudiment of a.out for sparc

it's been used only in sunos compat

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoUpdated contact info for CREDITS file
Hugh Blemings [Sat, 3 Jan 2009 05:48:44 +0000 (16:48 +1100)]
Updated contact info for CREDITS file

This updates some personal info in the CREDITS file.

I'm no longer actively involved in Keyspan driver work so shouldn't
really be listed as a Maintainer here.

I do however field the occasional question on them and as I'm dropping
the misc.nu domain, want to ensure people can find me should they need
to.

Signed-off-by: Hugh Blemings <hugh@blemings.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agox86: setup_per_cpu_areas() cleanup
Cyrill Gorcunov [Fri, 2 Jan 2009 18:51:32 +0000 (21:51 +0300)]
x86: setup_per_cpu_areas() cleanup

Impact: cleanup

__alloc_bootmem and __alloc_bootmem_node do panic
for us in case of fail so no need for additional
checks here.

Also lets use pr_*() macros for printing.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agocpumask: fix compile error when CONFIG_NR_CPUS is not defined
Mike Travis [Thu, 1 Jan 2009 02:08:48 +0000 (18:08 -0800)]
cpumask: fix compile error when CONFIG_NR_CPUS is not defined

CONFIG_NR_CPUS will be defined for all arch's whether SMP or not, but
it may not have made it into all arches yet.

Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agocpumask: use alloc_cpumask_var_node where appropriate
Mike Travis [Thu, 1 Jan 2009 02:08:47 +0000 (18:08 -0800)]
cpumask: use alloc_cpumask_var_node where appropriate

Impact: Reduce inter-node memory traffic.

Reduces inter-node memory traffic (offloading the global system bus)
by allocating referenced struct cpumasks on the same node as the
referring struct.

Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agocpumask: convert shared_cpu_map in acpi_processor* structs to cpumask_var_t
Rusty Russell [Thu, 1 Jan 2009 02:08:47 +0000 (18:08 -0800)]
cpumask: convert shared_cpu_map in acpi_processor* structs to cpumask_var_t

Impact: Reduce memory usage, use new API.

This is part of an effort to reduce structure sizes for machines
configured with large NR_CPUS.  cpumask_t gets replaced by
cpumask_var_t, which is either struct cpumask[1] (small NR_CPUS) or
struct cpumask * (large NR_CPUS).

(Changes to powernow-k* by <travis>.)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: use cpumask_var_t in acpi/boot.c
Rusty Russell [Thu, 1 Jan 2009 02:08:47 +0000 (18:08 -0800)]
x86: use cpumask_var_t in acpi/boot.c

Impact: reduce stack size, use new API.

Replace cpumask_t with cpumask_var_t.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: cleanup some remaining usages of NR_CPUS where s/b nr_cpu_ids
Mike Travis [Thu, 1 Jan 2009 02:08:46 +0000 (18:08 -0800)]
x86: cleanup some remaining usages of NR_CPUS where s/b nr_cpu_ids

Impact: Reduce future system panics due to cpumask operations using NR_CPUS

Insure that code does not look at bits >= nr_cpu_ids as when cpumasks are
allocated based on nr_cpu_ids, these extra bits will not be defined.

Also some other minor updates:

   * change in to use cpu accessor function set_cpu_present() instead of
     directly accessing cpu_present_map w/cpu_clear() [arch/x86/kernel/reboot.c]

   * use cpumask_of() instead of &cpumask_of_cpu() [arch/x86/kernel/reboot.c]

   * optimize some cpu_mask_to_apicid_and functions.

Signed-off-by: Mike Travis <travis@sgi.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agosched: put back some stack hog changes that were undone in kernel/sched.c
Mike Travis [Thu, 1 Jan 2009 02:08:45 +0000 (18:08 -0800)]
sched: put back some stack hog changes that were undone in kernel/sched.c

Impact: prevents panic from stack overflow on numa-capable machines.

Some of the "removal of stack hogs" changes in kernel/sched.c by using
node_to_cpumask_ptr were undone by the early cpumask API updates, and
causes a panic due to stack overflow.  This patch undoes those changes
by using cpumask_of_node() which returns a 'const struct cpumask *'.

In addition, cpu_coregoup_map is replaced with cpu_coregroup_mask further
reducing stack usage.  (Both of these updates removed 9 FIXME's!)

Also:
   Pick up some remaining changes from the old 'cpumask_t' functions to
   the new 'struct cpumask *' functions.

   Optimize memory traffic by allocating each percpu local_cpu_mask on the
   same node as the referring cpu.

Signed-off-by: Mike Travis <travis@sgi.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: enable cpus display of kernel_max and offlined cpus
Mike Travis [Thu, 1 Jan 2009 02:08:45 +0000 (18:08 -0800)]
x86: enable cpus display of kernel_max and offlined cpus

Impact: enables /sys/devices/system/cpu/{kernel_max,offline} user interface

By setting total_cpus, the drivers/base/cpu.c will display the
values of kernel_max (NR_CPUS-1) and the offlined cpu map.

Signed-off-by: Mike Travis <travis@sgi.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoia64: cpumask fix for is_affinity_mask_valid()
Ingo Molnar [Sat, 3 Jan 2009 11:50:46 +0000 (12:50 +0100)]
ia64: cpumask fix for is_affinity_mask_valid()

Impact: build fix on ia64

ia64's default_affinity_write() still had old cpumask_t usage:

 /home/mingo/tip/kernel/irq/proc.c: In function `default_affinity_write':
 /home/mingo/tip/kernel/irq/proc.c:114: error: incompatible type for argument 1 of `is_affinity_mask_valid'
 make[3]: *** [kernel/irq/proc.o] Error 1
 make[3]: *** Waiting for unfinished jobs....

update it to cpumask_var_t.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agocpumask: convert RCU implementations, fix
Ingo Molnar [Sat, 3 Jan 2009 12:16:09 +0000 (13:16 +0100)]
cpumask: convert RCU implementations, fix

Impact: cleanup

This warning:

 kernel/rcuclassic.c: In function ‘rcu_start_batch’:
 kernel/rcuclassic.c:397: warning: passing argument 1 of ‘cpumask_andnot’ from incompatible pointer type

triggers because one usage site of rcp->cpumask was not converted
to to_cpumask(rcp->cpumask). There's no ill effects of this bug.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux...
Ingo Molnar [Sat, 3 Jan 2009 17:54:51 +0000 (18:54 +0100)]
Merge branch 'master' of git://git./linux/kernel/git/rusty/linux-2.6-cpumask into cpus4096-v2

15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux...
Mike Travis [Thu, 1 Jan 2009 01:34:16 +0000 (17:34 -0800)]
Merge branch 'master' of git://git./linux/kernel/git/rusty/linux-2.6-cpumask into merge-rr-cpumask

Conflicts:
arch/x86/kernel/io_apic.c
kernel/rcuclassic.c
kernel/sched.c
kernel/time/tick-sched.c

Signed-off-by: Mike Travis <travis@sgi.com>
[ mingo@elte.hu: backmerged typo fix for io_apic.c ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoAMD IOMMU: remove now unnecessary #ifdefs
Joerg Roedel [Sat, 3 Jan 2009 13:16:35 +0000 (14:16 +0100)]
AMD IOMMU: remove now unnecessary #ifdefs

The #ifdef's are no longer necessary when the iommu-api and the amd
iommu updates are merged together.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoMerge branches 'iommu/api' and 'iommu/amd' into for-linus
Joerg Roedel [Sat, 3 Jan 2009 15:43:44 +0000 (16:43 +0100)]
Merge branches 'iommu/api' and 'iommu/amd' into for-linus

15 years agoAMD IOMMU: prealloc_protection_domains should be static
Jaswinder Singh Rajput [Mon, 29 Dec 2008 16:15:22 +0000 (21:45 +0530)]
AMD IOMMU: prealloc_protection_domains should be static

Impact: cleanup, reduce kernel size a bit, avoid sparse warning

Fixes sparse warning:
arch/x86/kernel/amd_iommu.c:1299:6: warning: symbol 'prealloc_protection_domains' was not declared. Should it be static?

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agokvm/iommu: fix compile warning
Joerg Roedel [Sat, 3 Jan 2009 15:37:53 +0000 (16:37 +0100)]
kvm/iommu: fix compile warning

This fixes a compile warning about a variable thats maybe used
uninitialized in the function.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: add statistics about total number of map requests
Joerg Roedel [Fri, 12 Dec 2008 15:13:04 +0000 (16:13 +0100)]
AMD IOMMU: add statistics about total number of map requests

Impact: see total number of map requests in debugfs

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: add statistics about allocated io memory
Joerg Roedel [Fri, 12 Dec 2008 14:57:30 +0000 (15:57 +0100)]
AMD IOMMU: add statistics about allocated io memory

Impact: see amount of allocated io memory in debugfs

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: add stats counter for domain tlb flushes
Joerg Roedel [Fri, 12 Dec 2008 14:48:28 +0000 (15:48 +0100)]
AMD IOMMU: add stats counter for domain tlb flushes

Impact: see number of domain tlb flushes in debugfs

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: add stats counter for single iommu domain tlb flushes
Joerg Roedel [Fri, 12 Dec 2008 14:46:29 +0000 (15:46 +0100)]
AMD IOMMU: add stats counter for single iommu domain tlb flushes

Impact: see number of single iommu domain tlb flushes in debugfs

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: add stats counter for cross-page request
Joerg Roedel [Fri, 12 Dec 2008 14:42:39 +0000 (15:42 +0100)]
AMD IOMMU: add stats counter for cross-page request

Impact: see number of requests for more than one page in debugfs

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: add stats counter for free_coherent requests
Joerg Roedel [Fri, 12 Dec 2008 14:16:38 +0000 (15:16 +0100)]
AMD IOMMU: add stats counter for free_coherent requests

Impact: see number of free_coherent requests in debugfs

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: add stats counter for alloc_coherent requests
Joerg Roedel [Fri, 12 Dec 2008 14:14:21 +0000 (15:14 +0100)]
AMD IOMMU: add stats counter for alloc_coherent requests

Impact: see number of alloc_coherent requests in debugfs

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: add stats counter for unmap_sg requests
Joerg Roedel [Fri, 12 Dec 2008 14:12:14 +0000 (15:12 +0100)]
AMD IOMMU: add stats counter for unmap_sg requests

Impact: see number of unmap_sg requests in debugfs

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: add stats counter for map_sg requests
Joerg Roedel [Fri, 12 Dec 2008 14:09:48 +0000 (15:09 +0100)]
AMD IOMMU: add stats counter for map_sg requests

Impact: see number of map_sg requests in debugfs

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: add stats counter for unmap_single requests
Joerg Roedel [Fri, 12 Dec 2008 14:07:12 +0000 (15:07 +0100)]
AMD IOMMU: add stats counter for unmap_single requests

Impact: see number of unmap_single requests in debugfs

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: add stats counter for map_single requests
Joerg Roedel [Fri, 12 Dec 2008 14:05:16 +0000 (15:05 +0100)]
AMD IOMMU: add stats counter for map_single requests

Impact: see number of map_single requests in debugfs

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: add stats counter for completion wait events
Joerg Roedel [Fri, 12 Dec 2008 13:59:58 +0000 (14:59 +0100)]
AMD IOMMU: add stats counter for completion wait events

Impact: see number of completion wait events in debugfs

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: add init code for statistic collection
Joerg Roedel [Fri, 12 Dec 2008 12:50:21 +0000 (13:50 +0100)]
AMD IOMMU: add init code for statistic collection

Impact: create a new debugfs directory

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: add necessary header defines for stats counting
Joerg Roedel [Fri, 12 Dec 2008 11:33:06 +0000 (12:33 +0100)]
AMD IOMMU: add necessary header defines for stats counting

Impact: add defines to make iommu stats collection configurable

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: add Kconfig entry for statistic collection code
Joerg Roedel [Thu, 11 Dec 2008 18:00:12 +0000 (19:00 +0100)]
AMD IOMMU: add Kconfig entry for statistic collection code

Impact: adds new Kconfig entry

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: use dev_name in iommu_enable function
Joerg Roedel [Wed, 10 Dec 2008 19:04:18 +0000 (20:04 +0100)]
AMD IOMMU: use dev_name in iommu_enable function

Impact: cleanup

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: use calc_devid in prealloc_protection_domains
Joerg Roedel [Wed, 10 Dec 2008 19:01:45 +0000 (20:01 +0100)]
AMD IOMMU: use calc_devid in prealloc_protection_domains

Impact: cleanup

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: convert amd_iommu_isolate to bool
Joerg Roedel [Fri, 12 Dec 2008 12:53:54 +0000 (13:53 +0100)]
AMD IOMMU: convert amd_iommu_isolate to bool

Impact: cleanup

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: convert iommu->need_sync to bool
Joerg Roedel [Wed, 10 Dec 2008 18:58:00 +0000 (19:58 +0100)]
AMD IOMMU: convert iommu->need_sync to bool

Impact: use bool instead of int for iommu->need_sync

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: use dev_name instead of self-build print_devid
Joerg Roedel [Wed, 10 Dec 2008 18:43:07 +0000 (19:43 +0100)]
AMD IOMMU: use dev_name instead of self-build print_devid

Impact: use generic dev_name instead of own function

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: allocate a new protection for hotplugged devices
Joerg Roedel [Wed, 10 Dec 2008 18:33:26 +0000 (19:33 +0100)]
AMD IOMMU: allocate a new protection for hotplugged devices

Impact: also hotplug devices benefit from device isolation

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: add a domain flag for default domains
Joerg Roedel [Wed, 10 Dec 2008 17:48:59 +0000 (18:48 +0100)]
AMD IOMMU: add a domain flag for default domains

Impact: adds a new protection domain flag

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: register functions for the IOMMU API
Joerg Roedel [Wed, 3 Dec 2008 16:00:17 +0000 (17:00 +0100)]
AMD IOMMU: register functions for the IOMMU API

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: add domain address lookup function for IOMMU API
Joerg Roedel [Tue, 2 Dec 2008 19:05:50 +0000 (20:05 +0100)]
AMD IOMMU: add domain address lookup function for IOMMU API

Impact: add a generic function to lockup addresses in protection domains

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: add domain unmap function for IOMMU API
Joerg Roedel [Tue, 2 Dec 2008 18:59:10 +0000 (19:59 +0100)]
AMD IOMMU: add domain unmap function for IOMMU API

Impact: add a generic function to unmap pages into protection domains

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: add domain map function for IOMMU API
Joerg Roedel [Tue, 2 Dec 2008 18:48:43 +0000 (19:48 +0100)]
AMD IOMMU: add domain map function for IOMMU API

Impact: add a generic function to map pages into protection domains

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: add device attach function for IOMMU API
Joerg Roedel [Tue, 2 Dec 2008 18:34:11 +0000 (19:34 +0100)]
AMD IOMMU: add device attach function for IOMMU API

Impact: add a generic function to attach devices to protection domains

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: add device detach function for IOMMU API
Joerg Roedel [Mon, 8 Dec 2008 11:07:44 +0000 (12:07 +0100)]
AMD IOMMU: add device detach function for IOMMU API

Impact: add a generic function to detach devices from protection domains

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: add domain destroy function for IOMMU API
Joerg Roedel [Tue, 2 Dec 2008 17:34:12 +0000 (18:34 +0100)]
AMD IOMMU: add domain destroy function for IOMMU API

Impact: add a generic function for releasing protection domains

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: add domain init function for IOMMU API
Joerg Roedel [Tue, 2 Dec 2008 17:13:27 +0000 (18:13 +0100)]
AMD IOMMU: add domain init function for IOMMU API

Impact: add a generic function for allocation protection domains

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: add domain cleanup helper function
Joerg Roedel [Mon, 8 Dec 2008 11:05:55 +0000 (12:05 +0100)]
AMD IOMMU: add domain cleanup helper function

Impact: add a function to remove all devices from a domain

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: add device notifier callback
Joerg Roedel [Wed, 10 Dec 2008 17:27:25 +0000 (18:27 +0100)]
AMD IOMMU: add device notifier callback

Impact: inform IOMMU about state change of a device in the driver core

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: add device detach helper functions
Joerg Roedel [Mon, 8 Dec 2008 11:02:41 +0000 (12:02 +0100)]
AMD IOMMU: add device detach helper functions

Impact: add helper functions to detach a device from a domain

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: rename set_device_domain function
Joerg Roedel [Wed, 10 Dec 2008 13:39:51 +0000 (14:39 +0100)]
AMD IOMMU: rename set_device_domain function

Impact: rename set_device_domain() to attach_device()

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: add device reference counting for protection domains
Joerg Roedel [Tue, 2 Dec 2008 16:56:36 +0000 (17:56 +0100)]
AMD IOMMU: add device reference counting for protection domains

Impact: know how many devices are assigned to a domain

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: add checks for dma_ops domain to dma_ops functions
Joerg Roedel [Tue, 2 Dec 2008 16:49:42 +0000 (17:49 +0100)]
AMD IOMMU: add checks for dma_ops domain to dma_ops functions

Impact: detect when a driver uses a device assigned otherwise

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: add protection domain flags
Joerg Roedel [Tue, 2 Dec 2008 16:46:25 +0000 (17:46 +0100)]
AMD IOMMU: add protection domain flags

Imapct: add a new struct member to 'struct protection_domain'

When using protection domains for dma_ops and KVM its better to know for
which subsystem it was allocated. Add a flags member to struct
protection domain for that purpose.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: add iommu_flush_domain function
Joerg Roedel [Tue, 2 Dec 2008 20:01:12 +0000 (21:01 +0100)]
AMD IOMMU: add iommu_flush_domain function

Impact: add a function to flush a domain id on every IOMMU

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: don't remove protection domain from iommu_pd_list
Joerg Roedel [Wed, 10 Dec 2008 19:05:52 +0000 (20:05 +0100)]
AMD IOMMU: don't remove protection domain from iommu_pd_list

Impact: save unneeded logic to add and remove domains to the list

The removal of a protection domain from the iommu_pd_list is not
necessary. Another benefit is that we save complexity because we don't
have to readd it later when the device no longer uses the domain.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: move invalidation command building to a separate function
Joerg Roedel [Tue, 2 Dec 2008 19:54:37 +0000 (20:54 +0100)]
AMD IOMMU: move invalidation command building to a separate function

Impact: refactoring of iommu_queue_inv_iommu_pages

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: refactor completion wait handling into separate functions
Joerg Roedel [Tue, 2 Dec 2008 19:34:41 +0000 (20:34 +0100)]
AMD IOMMU: refactor completion wait handling into separate functions

Impact: split one function into three

The separate functions are required synchronize commands across all
hardware IOMMUs in the system.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
15 years agoAMD IOMMU: add domain id free function
Joerg Roedel [Tue, 2 Dec 2008 17:28:53 +0000 (18:28 +0100)]
AMD IOMMU: add domain id free function

Impact: add code to release a domain id

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>