H. Peter Anvin [Sun, 4 Jan 2009 23:10:40 +0000 (15:10 -0800)]
bzip2/lzma: handle failures from bzip2 and lzma correctly
Impact: Bug fix
If bzip2 or lzma fails (for example, if they aren't installed on the
system), we need to propagate the failure out to "make". However,
they were masked by being followed by a semicolon.
Alain Knaff [Sun, 4 Jan 2009 21:46:17 +0000 (22:46 +0100)]
bzip2/lzma: x86 kernel compression support
Impact: Replaces x86 kernel decompressor with new code
This is the third part of the bzip2/lzma patch
The bzip patch is based on an idea by Christian Ludwig, includes support for
compressing the kernel with bzip2 or lzma rather than gzip. Both
compressors give smaller sizes than gzip. Lzma's decompresses faster
than bzip2.
It also supports ramdisks and initramfs' compressed using these two
compressors.
The functionality has been successfully used for a couple of years by
the udpcast project
This version applies to "tip" kernel 2.6.28
This part contains:
- support for new bzip2 and lzma kernel compression for x86
Signed-off-by: Alain Knaff <alain@knaff.lu> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Alain Knaff [Sun, 4 Jan 2009 21:46:17 +0000 (22:46 +0100)]
bzip2/lzma: config and initramfs support for bzip2/lzma decompression
Impact: New code for initramfs decompression, new features
This is the second part of the bzip2/lzma patch
The bzip patch is based on an idea by Christian Ludwig, includes support for
compressing the kernel with bzip2 or lzma rather than gzip. Both
compressors give smaller sizes than gzip. Lzma's decompresses faster
than bzip2.
It also supports ramdisks and initramfs' compressed using these two
compressors.
The functionality has been successfully used for a couple of years by
the udpcast project
This version applies to "tip" kernel 2.6.28
This part contains:
- support for new compressions (bzip2 and lzma) in initramfs and
old-style ramdisk
- config dialog for kernel compression (but new kernel compressions
not yet supported)
Signed-off-by: Alain Knaff <alain@knaff.lu> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Alain Knaff [Sun, 4 Jan 2009 21:46:16 +0000 (22:46 +0100)]
bzip2/lzma: library support for gzip, bzip2 and lzma decompression
Impact: Replaces inflate.c with a wrapper around zlib_inflate; new library code
This is the first part of the bzip2/lzma patch
The bzip patch is based on an idea by Christian Ludwig, includes support for
compressing the kernel with bzip2 or lzma rather than gzip. Both
compressors give smaller sizes than gzip. Lzma's decompresses faster
than bzip2.
It also supports ramdisks and initramfs' compressed using these two
compressors.
The functionality has been successfully used for a couple of years by
the udpcast project
This version applies to "tip" kernel 2.6.28
This part contains:
- changed inflate.c to accomodate rest of patch
- implementation of bzip2 compression (not used at this stage yet)
- implementation of lzma compression (not used at this stage yet)
- Makefile routines to support bzip2 and lzma kernel compression
Signed-off-by: Alain Knaff <alain@knaff.lu> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Linus Torvalds [Sat, 3 Jan 2009 20:04:39 +0000 (12:04 -0800)]
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/
...
Linus Torvalds [Sat, 3 Jan 2009 20:02:18 +0000 (12:02 -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: (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
...
Linus Torvalds [Sat, 3 Jan 2009 20:00:07 +0000 (12:00 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/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
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).
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>
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>
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>
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>
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....
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.
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.
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.
Joerg Roedel [Wed, 26 Nov 2008 16:21:24 +0000 (17:21 +0100)]
add frontend implementation for the IOMMU API
This API can be used by KVM for accessing different types of IOMMUs to
do device passthrough to guests. Beside that this API can also be used
by device drivers to map non-linear host memory into dma-linear
addresses to prevent sgather-gather DMA. UIO may be another user for
this API.
Joerg Roedel [Wed, 26 Nov 2008 16:02:33 +0000 (17:02 +0100)]
introcude linux/iommu.h for an iommu api
This patch introduces the API to abstract the exported VT-d functions
for KVM into a generic API. This way the AMD IOMMU implementation can
plug into this API later.
Weidong Han [Mon, 8 Dec 2008 15:00:00 +0000 (23:00 +0800)]
Add domain_flush_cache
Because virtual machine domain may have multiple devices from different iommus, it cannot use __iommu_flush_cache.
In some common low level functions, use domain_flush_cache instead of __iommu_flush_cache. On the other hand, in some functions, iommu can is specified or domain cannot be got, still use __iommu_flush_cache
Signed-off-by: Weidong Han <weidong.han@intel.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Weidong Han [Mon, 8 Dec 2008 14:51:37 +0000 (22:51 +0800)]
Add/remove domain device info for virtual machine domain
Add iommu reference count in domain, and add a lock to protect iommu setting including iommu_bmp, iommu_count and iommu_coherency.
virtual machine domain may have multiple devices from different iommus, so it needs to do more things when add/remove domain device info. Thus implement separate these functions for virtual machine domain.
Signed-off-by: Weidong Han <weidong.han@intel.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Weidong Han [Mon, 8 Dec 2008 07:49:06 +0000 (15:49 +0800)]
iommu coherency
In dmar_domain, more than one iommus may be included in iommu_bmp. Due to "Coherency" capability may be different across iommus, set this variable to indicate iommu access is coherent or not. Only when all related iommus in a dmar_domain are all coherent, iommu access of this domain is coherent.
Signed-off-by: Weidong Han <weidong.han@intel.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>