Off by 4 error on S3C2440_CAMDVIN register address, and
re-indented the pll calculation code to proper C style.
Thanks to Guillaume Gourat for spotting the register mistake
Signed-off-by: Guillaume Gourat Signed-off-by: Ben Dooks Signed-off-by: Russell King
[ARM PATCH] 2473/1: fix alignment trap handler for big-endian
Patch from Lennert Buytenhek
The alignment trap handler in arch/arm/mm/alignment.c performs halfword
and word accesses by translating them into byte accessing and then
combining the pieces. However, it assumes little-endian byte ordering
in doing so, which causes unaligned accesses on big-endian platforms
to erroneously load or store byteswapped data.
This patch was pulled from an old 2.4 -ds tree, and appears to fix the
issue. It was submitted for 2.4 at the time (ARM patch ID 1205/1206),
but rejected since big-endian ARM platforms are not supported in 2.4.
Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King
Alexander Viro [Fri, 11 Feb 2005 10:15:08 +0000 (02:15 -0800)]
[PATCH] megaraid_mbox fix
wrong order of arguments in memset().
This, BTW, shows why cross-builds are useful - the only indication of
problem had been a new warning showing up in sparse output on alpha
build (number exceeding 256 got truncated).
Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Andi Kleen [Fri, 11 Feb 2005 10:03:52 +0000 (02:03 -0800)]
[PATCH] Fix small vmalloc per allocation limit
The vmap vmalloc rework in 2.5 had a unintended side effect. vmalloc uses
kmalloc now to allocate an array with a list of pages. kmalloc has a 128K
maximum. This limits the vmalloc maximum size to 64MB on a 64bit system
with 4K pages. That limit causes problems with other subsystems, e.g.
iptables relies on allocating large vmallocs for its rule sets.
This is a bug IMHO - on 64bit platforms there shouldn't be such a low limit
on the vmalloc size. And even on 32bit it's too small for custom kernels
with enlarged vmalloc area.
Another problem is that this makes vmalloc unreliable. After the system
has been running for some time it is unlikely that kmalloc will be able to
allocate >order 2 pages due to memory fragmentation.
This patch takes the easy way out for fixing this by just allocating this
array with vmalloc when it is larger than a page. While more complicated
and intrusive solutions would be possible they didn't use vmalloc
recursively they didn't seem it worth to handle this very infrequent case.
Please note that the vmalloc recursion is strictly bounded because each
nested allocation will generate a much smaller stack frame. Also the
kernel stack can handle even a few recursion steps easily because vmalloc
has only a small stack frame.
Kumar Gala [Fri, 11 Feb 2005 08:53:38 +0000 (00:53 -0800)]
[PATCH] ppc32: Fix PCI2 support on MPC8555/41 CDS systems
This fixes an issue related to the second PCI host controller working on
MPC8555/41 systems.
We track the last PCI bus number on PCI1 so that the PCI2 host
controller can properly exclude itself at the right time, exclusion
should occur after initial setup so that the early pci config cycles in
setting PCI2 actually get to the controller.
Signed-off-by: Kumar Gala <kumar.gala@freescale.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Armin Schindler [Fri, 11 Feb 2005 04:50:47 +0000 (20:50 -0800)]
[PATCH] Eicon driver: code cleanups
Cleanups (initially sent by Adrian Bunk):
- make some needlessly global code static
- removed obsolete #define OLD_MAX_DESCRIPTORS
- removed more platform independend code not used in linux
- removed dos-<CR> at end of lines
- fix indentation in already modified files
Hugh Dickins [Fri, 11 Feb 2005 04:48:00 +0000 (20:48 -0800)]
[PATCH] general split_vma hugetlb fix
My recent do_munmap hugetlb fix has proved inadequate. There are
other places (madvise, mbind, mlock, mprotect) where split_vma is
called. Only mprotect excludes a hugetlb vma: the others are in
danger of splitting at a misaligned address, causing later BUGs.
So move the ~HPAGE_MASK check from do_munmap to split_vma itself;
and fix up those places (madvise and mlock) which expect split_vma
can fail only with -ENOMEM, and wish to convert that to -EAGAIN.
(It appears genuine that some of these syscalls should be failing
with -ENOMEM and some with -EAGAIN, so respect those behaviours.)
madvise_dontneed doesn't use split_vma, but is equally in danger
of causing a hugetlb BUG via zap_page_range. Whereas elsewhere the
patch is permissive (allowing the operation on a hugetlb vma even when
pointless, so long as it doesn't missplit it), here we must use -EINVAL
on any hugetlb vma, since a page fault would hit the BUG in its nopage.
The 5700 link problem was caused by reading uninitialized values in sram and
causing capacitive coupling mode to be enabled by mistake. This patch fixes
the problem by properly validating the sram contents.
Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
David Howells [Fri, 11 Feb 2005 03:01:29 +0000 (19:01 -0800)]
[PATCH] Fix the mincore() syscall
This fixes the mincore syscall in three ways:
(1) It moves as much argument checking outside of the semaphore-holding
region as possible.
(2) It checks the region parameters against TASK_SIZE so that a 32-bit binary
on a 64-bit platform will get the right error when calling this syscall
on a region that overlaps the end of the 32-bit address space.
(3) It tidies up the VMA checking loop a little.
Signed-Off-By: David Howells <dhowells@redhat.com> Signed-Off-By: Linus Torvalds <torvalds@osdl.org>
David Howells [Fri, 11 Feb 2005 00:19:59 +0000 (16:19 -0800)]
[PATCH] FRV: Fix sigaltstack handling for RT signals
The attached patch fixes sigaltstack handling for RT signal return. It was
reading a userspace struct into kernel space and then passing the kernel copy
to a generic signalling routine which then assumed it had been passed a
userspace pointer...
Signed-Off-By: David Howells <dhowells@redhat.com> Signed-Off-By: Alexander Viro <aviro@redhat.com> Signed-Off-By: Linus Torvalds <torvalds@osdl.org>
Alexander Viro [Fri, 11 Feb 2005 00:19:45 +0000 (16:19 -0800)]
[PATCH] i2c compat ioctl breakage
do_i2c_rdwr_ioctl() does two compat_alloc_user_space(). That doesn't
work; no state is kept and second allocation will ignore the first one
(i.e. give overlapping chunk of user stack).
Fixed by doing allocation at once, slightly cleaned up.
Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Adrian Bunk [Fri, 11 Feb 2005 00:03:43 +0000 (16:03 -0800)]
[PATCH] mark the mcd cdrom driver as BROKEN
The mcd driver drives only very old hardware (some single and double speed
CD drives that were connected either via the soundcard or a special ISA
card), and the mcdx driver offers more functionality for the same hardware.
My plan is to mark MCD as broken in 2.6.11 and if noone complains
completely remove this driver some time later.
Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
It adds the sleep support for newer powermacs, improve power saving on some
laptops, makes use of the new fbdev modelist management routines, and fixes
a few backlight related issues.
I tested it on a thinkpad T30 and a few PPC boxes with success. It should
be less invasive than the previous one (I don't try to restore the mode on
exit, that is what breaks the thinkpad and possibly other stuffs that boot
in VGA text mode), plus fixed a couple of bugs in the mode detection code.
I also reverted the memory map fix on ppc since it doesn't work properly on
some recent laptops where the firmware sets a tiled display. I'll rework
that completely to update the memory map as part of the mode setting later.
That should fix various issues when switching with X/DRI on x86.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] update aty128fb sleep/wakeup code for new powermac changes
This patch updates aty128fb power management code to the changes of the
powermac sleep mecanism. It makes the driver use the new hook for early
wakeup, adds the call to the arch code indicating wether it can wakeup the
chip, etc... This patch shouldn't break non-ppc, but this should be
tested.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
The new PowerMac sleep code provides an arch hook that can be used by video
drivers on laptops to bring back the screen very early, pretty much before
anything else. This basically turns reports of the style "my laptop doesn't
wakeup" to "I get this or this oops/error/panic on wakeup", making fixing the
PM related bugs possible on a whole range of them.
However, the fbdev wakeup code triggers WARN_ON's in the VT subsystem if
called without the console semaphore when redrawing the screen (I added those
warnings a couple of kernel versions ago), and we can't call
acquire_console_sem() since we are so early in the wakeup process that we are
considered as in_atomic() (we hold irqs off too).
This patch addds a try_acquire_console_sem() function that can be used by
those video drivers that implement this early wakeup hook. If the acquire
fails (which should never happen in practice), wakeup is delayed to the normal
PCI callback which does a blocking acquire_console_sem().
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Corey Minyard [Fri, 11 Feb 2005 00:02:47 +0000 (16:02 -0800)]
[PATCH] Update to IPMI driver to support old DMI spec
The 1999 version of the DMI spec had a different configuration than the
newer versions for the IPMI configuration information. This patch handles
the differences between the two.
Bodo Stroesser [Fri, 11 Feb 2005 00:02:33 +0000 (16:02 -0800)]
[PATCH] uml: use PTRACE_OLDSETOPTIONS instead of PTRACE_SETOPTIONS
In linux 2.6, PTRACE_SETOPTIONS is redefined to 0x4200, while the old 2.4
value (21) is still available as PTRACE_OLDSETOPTIONS.
So, if UML uses PTRACE_SETOPTIONS, an UML-kernel built on a 2.6 won't run
on a 2.4 host. Hence we must use PTRACE_OLDSETOPTIONS.
For cases when PTRACE_OLDSETOPTIONS does not exists (i.e. 2.4 host or
archs which miss it because they don't have a "deprecated" value), we
fallback this macro to PTRACE_SETOPTIONS.
Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com> Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Cc: <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Alexander Viro [Thu, 10 Feb 2005 11:09:26 +0000 (03:09 -0800)]
[SPARC]: Fix I/O accessor routines.
* insb et.al. first argument is unsigned long, not void * (just look
at their callers). There _is_ a variant that takes void __iomem *, but that's
ioread8_rep() and its friends.
* exported the rest of these suckers (insl/outsl already had been).
Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Meelis Roos [Thu, 10 Feb 2005 09:12:02 +0000 (01:12 -0800)]
[SPARC32]: Fix syntax errors from smp_{mb,rmb,wmb} on sparc32.
smp_mb(), smp_rmp() and smp_wmb() definitions have a trailing semicolon
and cause compilation errors in single statement context, like
if-then-else on line 358 in include/linux/skbuff.h. This patch removes
all three offending semicolons to make it compile.
Signed-off-by: Meelis Roos <mroos@linux.ee> Acked-by: William Irwin <wli@holomorphy.com> Signed-off-by: David S. Miller <davem@davemloft.net>
[PATCH] nls_cp936.c is not synchronized with M$'s translation table
The nls_cp936.c is not synchronized with MS's translation table, there are
some characters have different code from the code in updated table of MS.
For example, the unicode for character 0xB8A3 (GBK) should be U+798F, but
the code is U+FA1B in nls_cp936.c.
Regenerated the tables. The number of differences is rather large, so I
did not check every change, but looking at a random sample the changes seem
OK. Mostly the CJK Compatibility Ideographs have been replaced by their
ordinary equivalents. Some code points that were unassigned now got a
meaning.
Zwane Mwaikambo [Thu, 10 Feb 2005 06:41:13 +0000 (22:41 -0800)]
[PATCH] OProfile: ARM/XScale1 PMU support fix
Richard Purdie provided a patch to fix support for XScale1 processors (this
is the PMU version i never had access to initially), we weren't clearing
the overflow flags after an overflow interrupt had triggered resulting in
no additional interrupts occuring. Additionally i've added basic power
management support.
Signed-off-by: Zwane Mwaikambo <zwane@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Thu, 10 Feb 2005 06:40:57 +0000 (22:40 -0800)]
[PATCH] Force read implies exec for all 32bit processes in x86-64
This effectively enables executable stack and executable heap for all 32bit
programs on x86-64, except if noexec32=on is specified.
This does not support changing this with personality right now, this would
need more intrusive changes. A 64bit process will always turn it off and a
32bit process turn it on.
Also readd the noexec32=on option to turn this off and fix a minor bug in
noexec=... (would be reported as unknown option)
Zwane Mwaikambo [Thu, 10 Feb 2005 06:40:45 +0000 (22:40 -0800)]
[PATCH] OProfile: exit.text referenced in init.text
The linker doesn't complain, but i got this error on ARM which has similar
code.
oprofile_arch_exit: discarded in section `.exit.text' from arch/arm/oprofile/built-in.o
arch/arm/oprofile/built-in.o(.init.text+0x4c): In function `oprofile_init':
: relocation truncated to fit: R_ARM_PC24 oprofile_arch_exit
Pavel Machek [Thu, 10 Feb 2005 06:40:30 +0000 (22:40 -0800)]
[PATCH] binfmt_elf: clearing bss may fail
So we discover that Borland's Kylix application builder emits weird elf
files which describe a non-writeable bss segment.
So remove the clear_user() check at the place where we zero out the bss. I
don't _think_ there are any security implications here (plus we've never
checked that clear_user() return value, so whoops if it is a problem).
Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
The second parameter of the sys_ipc system wrapper on ppc64, s390-64 and
sparc64 is an "int". sys_shmget gets called with this 32 bit value as the
size parameter. This limits the maximum shared memory segment on these
three architectures to 2GB. To fix this the second parameter is declared
as an "unsigned long" and is then casted to the type required by the The
same int vs. unsigned long bug is fixed for sys_msgsnd and sys_msgrcv as
well.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Thu, 10 Feb 2005 06:39:59 +0000 (22:39 -0800)]
[PATCH] Fix compat shmget overflow
This fixes an incorrect sign extension in the compat layer that breaks
32bit shmget that are >2GB. sys_shmget has a signed size_t size argument,
and the int size argument coming from 32bit user space would get sign
extended to 64bit, which is wrong.
I fixed it on all compat architectures, except PPC64 which was already ok.
It was originally debugged and fixed by Karl Rister @ IBM for SLES9 on x86-64.
Nicolas Pitre [Thu, 10 Feb 2005 06:39:28 +0000 (22:39 -0800)]
[PATCH] L18 flash corruption fix
Another fix to the put_chip() concurrency logic.
Problem was occurring when:
1) one thread was erasing a block in partition x;
2) another thread suspended the erase in order to write to
partition y;
3) a third thread came along to read a different block from
partition x and, when it called put_chip(), chip->oldstate was
FL_ERASING and the erase (mistakenly) resumed;
4) the write in partition y obviously failed at that point.
Incidentally, the fix for this problem also fixed the case where
suspending writes for MTD XIP usage was not working properly.
Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Stelian Pop [Thu, 10 Feb 2005 01:48:07 +0000 (17:48 -0800)]
[PATCH] sonypi: add fan and temperature status/control
1. FAN Status/Control: you can now get the fan status (running or not) and
also set the fan speed (for <5 seconds only). The problem is that there
is an auto regulator that kicks in within about 5 seconds after that to
restart the fan if it is above a threshold temperature (39 Degree C in
my Vaio). It is useful just to get the fan status (primarily). It also
appears that you can change the speed by increasing the values (much
like the LCD control) - there are effectively only about 6 speeds (it
seems - not sure, but from what I've played with on my Vaio).
2. Temperature: you can get the current temperature (same as reported by
ACPI). This is primarily useful for APM users (since ACPI already gives
this). I have used this to detect when the fan comes on in my Vaio (39
Degree C).
From: Narayanan R S <nars@kadamba.org> Signed-off-by: Stelian Pop <stelian@popies.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Takashi Iwai [Wed, 9 Feb 2005 23:33:52 +0000 (15:33 -0800)]
[PATCH] [ALSA] Special AC97 patch for ASUS W1000/CMI9739 laptop
This patch fixes sound output on the ASUS W1000 laptop with the CMI9739
chip. It wrongly reports that it has a SPDIF in, when in fact we wish to
use the EAPD pin.
Russell King [Wed, 9 Feb 2005 21:44:45 +0000 (21:44 +0000)]
[ARM] Fix VFP for entry-armv.S macro-isation.
Unfortunately, VFP got forgotten with when entry-armv.S was updated
to use macros, and the PC value changed from being passed in r5 to
r2. This fixes VFP.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
[PATCH] Fix oops in alloc_zeroed_user_highpage() when page is NULL
The generic and IA-64 versions of alloc_zeroed_user_highpage() don't
check the return value from alloc_page_vma(). This can lead to an oops
if we're OOM.
This fixes my oops on PPC64, but I haven't got an IA-64 machine/compiler
handy.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[IPV4]: ipconfig: Replace schedule_timeout() with msleep()
Description: Use msleep() instead of schedule_timeout() to guarantee the task
delays as expected. Change the units of the two constants to be msecs and secs
respectively.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Description: Use ssleep() instead of schedule_timeout() to guarantee the task
delays as expected. The first two replacements use TASK_INTERRUPTIBLE but do not
check for signals, so ssleep() should be appropriate.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
[NET]: Replace schedule_timeout() with msleep() in netdev_wait_allrefs()
Description: Use msleep() instead of schedule_timeout() to guarantee the task
delays as expected. The current code uses TASK_INTERRUPTIBLE, but does not
respond to signals, so msleep() should be ok.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>