dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

30177 Commits

Author SHA1 Message Date
Linus Torvalds e9af797d75 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
  [CPUFREQ] Fix on resume, now preserves user policy min/max.
  [CPUFREQ] Add Celeron Core support to p4-clockmod.
  [CPUFREQ] add to speedstep-lib additional fsb values for core processors
  [CPUFREQ] Disable sysfs ui for p4-clockmod.
  [CPUFREQ] p4-clockmod: reduce noise
  [CPUFREQ] clean up speedstep-centrino and reduce cpumask_t usage
2009-01-05 18:33:38 -08:00
Linus Torvalds 520c853466 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
  inotify: fix type errors in interfaces
  fix breakage in reiserfs_new_inode()
  fix the treatment of jfs special inodes
  vfs: remove duplicate code in get_fs_type()
  add a vfs_fsync helper
  sys_execve and sys_uselib do not call into fsnotify
  zero i_uid/i_gid on inode allocation
  inode->i_op is never NULL
  ntfs: don't NULL i_op
  isofs check for NULL ->i_op in root directory is dead code
  affs: do not zero ->i_op
  kill suid bit only for regular files
  vfs: lseek(fd, 0, SEEK_CUR) race condition
2009-01-05 18:32:06 -08:00
Julian Calaby 4696b64d23 sparc: Fix minor SPARC32 compile error
When CONFIG_PROC_FS is unset, include/linux/interrupt.h defines
init_irq_proc() as an empty function.

arch/sparc/kernel/irq_32.c defines this function unconditionally.

Fix the latter so that it only defines this function when CONFIG_PROC_FS
is set.

This fixes the following error:
arch/sparc/kernel/irq_32.c:672: error: redefinition of 'init_irq_proc'
include/linux/interrupt.h:461: error: previous definition of
'init_irq_proc' was here

This was found using randconfig builds.

Signed-off-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-05 18:13:49 -08:00
Al Viro 5641f1fde0 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>
2009-01-05 17:41:45 -08:00
Al Viro 7483cb7bbc uml got broken by commit 30742d5c22
... if you revert a commit, revert the fixups elsewhere that had been
triggered by it.  Such as 8c56250f48
(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>
2009-01-05 17:41:45 -08:00
Al Viro 22409f9c80 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>
2009-01-05 17:41:45 -08:00
Al Viro 56ff5efad9 zero i_uid/i_gid on inode allocation
... and don't bother in callers.  Don't bother with zeroing i_blocks,
while we are at it - it's already been zeroed.

i_mode is not worth the effort; it has no common default value.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-01-05 11:54:28 -05:00
Ingo Molnar 46483d10e5 Merge branch 'core/iommu' into core/urgent
Conflicts:
	lib/swiotlb.c
2009-01-05 14:17:24 +01:00
David S. Miller 576b4d0cce sparc: Remove reg*.h from Kbuild
Forgot to commit this in previous change, noticed by
Sam.

Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-05 00:55:24 -08:00
Julian Calaby 47cd5265ea sparc: Clean arch-specific code in prom_common.c
prom_nextprop() and prom_firstprop() have slightly different calling
conventions in 32 and 64 bit SPARC.

prom_common.c uses a ifdef guard to ensure that these functions are
called correctly.

Adjust code to eliminate this ifdef by using a calling convention that
is compatible with both 32 and 64 bit SPARC.

Signed-off-by: Julian Calaby <julian.calaby@gmail.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-05 00:07:18 -08:00
David S. Miller 192eee8ef5 sparc: Kill asm/reg*.h
As noticed by Sam Ravnborg, these aren't use for anything.
Neither the kernel nor userland make a reference to this
family of header files.

So just get rid of them.

Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-04 23:17:21 -08:00
Bastian Blank 761b602620 sparc: Use 64BIT config entry
Use 64BIT config entry to distinguish between 32 and 64bit builds
instead of relying on the ARCH setting.  Using sparc64 as ARCH still
forces 64BIT on.

Inspired by the x86 and s390 configs.

[ Integrated CONFIG_64BIT help text suggestions from Sam -DaveM ]

Signed-off-by: Bastian Blank <waldi@debian.org>
Tested-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-04 23:03:10 -08:00
Sam Ravnborg 83c86984bf sparc: unify ipcbuf.h
The ony difference is the size of the mode.
sparc has extra padding to compensate for this.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-04 15:44:52 -08:00
Helge Deller c298be7449 parisc: fix module loading failure of large kernel modules
On 32bit (and sometimes 64bit) and with big kernel modules like xfs or
ipv6 the relocation types R_PARISC_PCREL17F and R_PARISC_PCREL22F may
fail to reach their PLT stub if we only create one big stub array for
all sections at the beginning of the core or init section.

With this patch we now instead add individual PLT stub entries
directly in front of the code sections where the stubs are actually
called. This reduces the distance between the PCREL location and the
stub entry so that the relocations can be fulfilled.

While calculating the final layout of the kernel module in memory, the
kernel module loader calls arch_mod_section_prepend() to request the
to be reserved amount of memory in front of each individual section.

Tested with 32- and 64bit kernels.

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2009-01-05 08:40:14 +10:30
Ingo Molnar 4010b0192d Merge branch 'linus' into core/urgent 2009-01-04 10:59:36 +01:00
Linus Torvalds 7d3b56ba37 Merge branch 'cpus4096-for-linus-3' of git://git.kernel.org/pub/scm/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/
  ...
2009-01-03 12:04:39 -08:00
Linus Torvalds 269b012321 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/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
  ...
2009-01-03 12:03:52 -08:00
Linus Torvalds 61420f59a5 Merge branch 'cputime' of git://git390.osdl.marist.edu/pub/scm/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
2009-01-03 11:56:24 -08:00
Al Viro 3bfacef412 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>
2009-01-03 11:45:54 -08:00
Cyrill Gorcunov ab14398abd 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>
2009-01-03 19:15:42 +01:00
Mike Travis 80855f7361 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>
2009-01-03 19:15:40 +01:00
Rusty Russell 2fdf66b491 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>
2009-01-03 19:15:40 +01:00
Rusty Russell ee943a82b6 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>
2009-01-03 19:15:39 +01:00
Mike Travis 9628937d5b 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>
2009-01-03 19:00:55 +01:00
Mike Travis 730cf27246 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>
2009-01-03 18:59:47 +01:00
Ingo Molnar 6bdf197b04 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>
2009-01-03 18:59:33 +01:00
Ingo Molnar e465b535ce Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-cpumask into cpus4096-v2 2009-01-03 18:54:51 +01:00
Mike Travis 7eb1955336 Merge branch 'master' of git://git.kernel.org/pub/scm/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>
2009-01-03 18:53:31 +01:00
Joerg Roedel 065a6d68c7 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>
2009-01-03 16:44:15 +01:00
Joerg Roedel b0a11f44ab Merge branches 'iommu/api' and 'iommu/amd' into for-linus 2009-01-03 16:43:44 +01:00
Jaswinder Singh Rajput 0e93dd8835 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>
2009-01-03 16:41:18 +01:00
Joerg Roedel 8ecaf8f19f 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>
2009-01-03 14:12:00 +01:00
Joerg Roedel 5774f7c5fe 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>
2009-01-03 14:12:00 +01:00
Joerg Roedel 18811f55d4 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>
2009-01-03 14:11:59 +01:00
Joerg Roedel f57d98ae69 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>
2009-01-03 14:11:59 +01:00
Joerg Roedel c1858976f5 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>
2009-01-03 14:11:59 +01:00
Joerg Roedel 5d31ee7e08 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>
2009-01-03 14:11:59 +01:00
Joerg Roedel c8f0fb36bf 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>
2009-01-03 14:11:59 +01:00
Joerg Roedel 55877a6bcd 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>
2009-01-03 14:11:59 +01:00
Joerg Roedel d03f067a9d 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>
2009-01-03 14:11:59 +01:00
Joerg Roedel 146a6917fc 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>
2009-01-03 14:11:59 +01:00
Joerg Roedel 0f2a86f200 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>
2009-01-03 14:11:59 +01:00
Joerg Roedel da49f6df72 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>
2009-01-03 14:11:58 +01:00
Joerg Roedel 7f26508bbb AMD IOMMU: add init code for statistic collection
Impact: create a new debugfs directory

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-01-03 14:11:58 +01:00
Joerg Roedel a9dddbe049 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>
2009-01-03 14:11:58 +01:00
Joerg Roedel 2e117604a4 AMD IOMMU: add Kconfig entry for statistic collection code
Impact: adds new Kconfig entry

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-01-03 14:11:57 +01:00
Joerg Roedel a4e267c88b AMD IOMMU: use dev_name in iommu_enable function
Impact: cleanup

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-01-03 14:11:57 +01:00
Joerg Roedel edcb34da25 AMD IOMMU: use calc_devid in prealloc_protection_domains
Impact: cleanup

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-01-03 14:11:57 +01:00
Joerg Roedel c226f85309 AMD IOMMU: convert amd_iommu_isolate to bool
Impact: cleanup

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-01-03 14:11:57 +01:00
Joerg Roedel 0cfd7aa90b 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>
2009-01-03 14:11:57 +01:00
Joerg Roedel ab89672286 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>
2009-01-03 14:11:56 +01:00
Joerg Roedel 1ac4cbbc5e 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>
2009-01-03 14:11:56 +01:00
Joerg Roedel e2dc14a2a6 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>
2009-01-03 14:11:56 +01:00
Joerg Roedel 26961efe0d AMD IOMMU: register functions for the IOMMU API
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-01-03 14:11:56 +01:00
Joerg Roedel 645c4c8d72 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>
2009-01-03 14:11:56 +01:00
Joerg Roedel eb74ff6cc0 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>
2009-01-03 14:11:56 +01:00
Joerg Roedel c6229ca649 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>
2009-01-03 14:11:56 +01:00
Joerg Roedel 01106066a6 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>
2009-01-03 14:11:56 +01:00
Joerg Roedel 684f288884 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>
2009-01-03 14:11:55 +01:00
Joerg Roedel 98383fc301 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>
2009-01-03 14:11:55 +01:00
Joerg Roedel c156e347d6 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>
2009-01-03 14:11:55 +01:00
Joerg Roedel 6d98cd8043 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>
2009-01-03 14:11:55 +01:00
Joerg Roedel e275a2a0fc 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>
2009-01-03 14:11:55 +01:00
Joerg Roedel 355bf553ed 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>
2009-01-03 14:11:55 +01:00
Joerg Roedel f1179dc005 AMD IOMMU: rename set_device_domain function
Impact: rename set_device_domain() to attach_device()

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-01-03 14:11:54 +01:00
Joerg Roedel 863c74ebd0 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>
2009-01-03 14:11:54 +01:00
Joerg Roedel 5b28df6f43 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>
2009-01-03 14:11:54 +01:00
Joerg Roedel 9fdb19d64c 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>
2009-01-03 14:11:54 +01:00
Joerg Roedel 43f4960983 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>
2009-01-03 14:11:54 +01:00
Joerg Roedel 9e919012e3 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>
2009-01-03 14:11:54 +01:00
Joerg Roedel 237b6f3329 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>
2009-01-03 14:11:54 +01:00
Joerg Roedel 8d201968e1 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>
2009-01-03 14:11:54 +01:00
Joerg Roedel a2acfb7579 AMD IOMMU: add domain id free function
Impact: add code to release a domain id

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-01-03 14:11:53 +01:00
Joerg Roedel 86db2e5d47 AMD IOMMU: make dma_ops_free_pagetable generic
Impact: change code to free pagetables from protection domains

The dma_ops_free_pagetable function can only free pagetables from
dma_ops domains. Change that to free pagetables of pure protection
domains.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-01-03 14:11:53 +01:00
Joerg Roedel 38e817febe AMD IOMMU: rename iommu_map to iommu_map_page
Impact: function rename

The iommu_map function maps only one page. Make this clear in the
function name.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-01-03 14:11:53 +01:00
Joerg Roedel 19de40a847 KVM: change KVM to use IOMMU API
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-01-03 14:11:07 +01:00
Joerg Roedel 1aaf118352 select IOMMU_API when DMAR and/or AMD_IOMMU is selected
These two IOMMUs can implement the current version of this API. So
select the API if one or both of these IOMMU drivers is selected.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-01-03 14:10:09 +01:00
Joerg Roedel c4fa386428 KVM: rename vtd.c to iommu.c
Impact: file renamed

The code in the vtd.c file can be reused for other IOMMUs as well. So
rename it to make it clear that it handle more than VT-d.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2009-01-03 14:10:09 +01:00
David S. Miller fa8efd50b3 sparc: Update 64-bit defconfig.
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-02 21:54:25 -08:00
Rusty Russell 9ddabc2a29 h8300: define __fls
Like fls, but can't be handed 0 and returns the bit number.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2009-01-03 16:16:04 +10:30
Sam Ravnborg f54c88cb6c sparc: remove NO_PROC_ID - it is no longer used
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-02 21:33:54 -08:00
Sam Ravnborg 65579f3cfb sparc: drop get_tbr() in traps.h
get_tbr() has no users in the whole tree -drop it.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-02 21:33:05 -08:00
Sam Ravnborg 220483fec0 sparc: fix warning in userspace header traps.h
Fix following warning:
traps.h:23: extern's make no sense in userspace

Add an ifdef __KERNEL__ block that cover the
extern definition and a few related things that neither
is for userspace.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-02 21:32:34 -08:00
Sam Ravnborg fffeeb4137 sparc: fix warnings in userspace header byteorder.h
Fix following warnings in byteorder.h:

byteorder.h:4: include of <linux/types.h> is preferred over <asm/types.h>
byteorder.h:9: leaks CONFIG_SPARC32 to userspace where it is not valid
byteorder.h:13: leaks CONFIG_SPARC64 to userspace where it is not valid
byteorder.h:14: found __[us]{8,16,32,64} type without #include <linux/types.h>
byteorder.h:47: leaks CONFIG_SPARC64 to userspace where it is not valid

- changed to use include <linux/types.h> as suggested
- use preprocessor defined symbols to distingush between 32 and 64 bit

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-02 21:31:58 -08:00
Sam Ravnborg 2ef4c01e18 sparc: fix warning in userspace header jsflash.h
Fix following warnings in jsflash.h:

jsflash.h:11: include of <linux/types.h> is preferred over <asm/types.h>
jsflash.h:24: found __[us]{8,16,32,64} type without #include <linux/types.h>

Fixed by changing the include to <linux/types.h>

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-02 21:31:13 -08:00
Sam Ravnborg 7c59d28d0e sparc: unify openprom.h
After the preparational steps the unification was simple.

The linux_prom_pci_registers definition did not look like
it could be unified at first look since the structure is assigned
using prop_getproperty() / of_get_property() so the structure
is assumed to come direct form the prom.

The LINUX_OPPROM_MAGIC was kept even if it is not used by the kernel
on the assumption that userspace may require it.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-02 21:15:25 -08:00
Sam Ravnborg 640cc590bd sparc64: delete unused linux_prom64_ranges from openprom_64.h
It was not used over the whole tree - so drop it.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-02 21:14:35 -08:00
Sam Ravnborg bb5b52bbd5 sparc: prepare openprom for unification
Align the sparc and sparc64 versions so differences are minimal.
A few data types are changed to better reflect there actual usage.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-02 21:13:52 -08:00
Sam Ravnborg b608c3fe3c sparc: remove linux_prom_pci_assigned_addresses from openprom_32.h
It is not used anywhere in the tree so drop it.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-02 21:12:40 -08:00
Sam Ravnborg 3011618d9a sparc: remove ebus definitions from openprom*.h
Looks like leftovers from the removal of the special ebus layer.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-02 21:10:48 -08:00
Sam Ravnborg 1eae29bcc2 sparc: unify siginfo.h
Trivial unification where the sparc64 specific
parts are protected using a signle ifdef/endif pair.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-02 21:10:04 -08:00
Rusty Russell 0999769e6c cris: define __fls
Like fls, but can't be handed 0 and returns the bit number.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2009-01-03 15:37:14 +10:30
Sam Ravnborg f3ec38d513 sparc: unify ptrace.h
The two ptrace.h implementations are very alike but
the small differences required two set of ifdef/else/endif pairs.

The definition of reg_window32 could have been shared but
that would have required several updates in sparc32 code as
all printk formatting for example assume it is longs.

sparc_stackf looked like anohter candidate to share if the 32
bit was renamed to sparc_stackf32.
But it contains two pointers in the sparc32 version which would
have been 64 bit in the sparc64 version so it was non-trivial.
Using a set of accessor macros could do the trick if pursued later.

The sparc64 specific definitions are not protected by
ifdef - as it should not be required to do so.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-02 19:42:12 -08:00
Sam Ravnborg bd703d88a2 sparc: unify sigcontext.h
With the renamed types in place the unification was straightforward.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-02 19:34:46 -08:00
Sam Ravnborg 4d7b92ad57 sparc: add '32' suffix to reg_window, sigcontext, __siginfo_t
Renaming a few types to contain a 32 suffix makes the
type names compatible with sparc64 and thus makes sharing
between the two a lot easier.

Note: None of these definitions are expected part of the
stable ABI towards userspace.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-02 19:32:59 -08:00
Sam Ravnborg ece93487c3 sparc: unify signal.h
They were almost identical and with the preapration
patch nothing was needed to be added.

The unified version contains a few sparc64 only definitions
but they are kept as is and not protected by ifdef/endif.
The unified version exports a bit more to userspace then the
32 bit version did.
This is not considered fatal.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-02 19:21:06 -08:00
Sam Ravnborg 55d646feee sparc64: prepare signal_64 for unification
o add a sparc32 only definition
o fix a few style issues (white space errors etc).
o include compiler.h (for __user)

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-02 19:17:47 -08:00
David S. Miller a0381a9480 sparc: Kill bogus comment about IRQF_SHARED in pci_psycho.c
Noticed by Geert Uytterhoeven.

Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-02 19:12:46 -08:00
Sam Ravnborg 12aa0b1732 sparc: unify stat.h
To my suprise struct stat64 was not equal on sparc 32 and sparc64,
so there was really nothing to share here.
Unify the files by adding their respective content to stat.h.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-02 18:48:21 -08:00
Sam Ravnborg 085219f79c sparc32: use proper types in struct stat
Like sparc64 use proper types in struct stat

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-02 18:47:34 -08:00