Russell King [Tue, 10 May 2005 13:23:01 +0000 (14:23 +0100)]
[PATCH] ARM: Move copy/clear user_page locking into implementation
Move the locking for copy_user_page() and clear_user_page() into
the implementations which require locking. For simple memcpy/
memset based implementations, the locking is extra overhead which
is not necessary, and prevents preemption occuring.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
Jeff Dike [Sat, 7 May 2005 04:30:55 +0000 (21:30 -0700)]
[PATCH] uml: x86_64 fixes
This fixes some x86_64 bugs -
- maybe_map returns -1 on error instead of 0, which is interpreted as
physical address 0
- removed an include of ipc.h, which isn't needed
- fixed the calculation of signal frame location
- the signal delivery code is now immune to the stack expansion check
- added a missing include
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Bodo Stroesser [Sat, 7 May 2005 04:30:54 +0000 (21:30 -0700)]
[PATCH] uml: Fix process exit race
tt-mode closes switch_pipes in exit_thread_tt and kills processes in
switch_to_tt, if the exit_state is EXIT_DEAD or EXIT_ZOMBIE.
In very rare cases the exiting process can be scheduled out after having set
exit_state and closed switch_pipes (from release_task it calls proc_pid_flush,
which might sleep). If this process is to be restarted, UML failes in
switch_to_tt with:
write of switch_pipe failed, err = 9
We fix this by closing switch_pipes not in exit_thread_tt, but later in
release_thread_tt. Additionally, we set switch_pipe[0] = 0 after closing.
switch_to_tt must not kill "from" process depending on its exit_state, but
must kill it after release_thread was processed only, so it examines
switch_pipe[0] for its decision.
Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com> Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Bodo Stroesser [Sat, 7 May 2005 04:30:52 +0000 (21:30 -0700)]
[PATCH] uml: Use CONFIG variable for address space size
tt/mem.c still uses hardcoded TOP for i386 instead of CONFIG_TOP_ADDR provided
by subarch's Kconfig_XXXX, which would be right.
Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com> Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Dike [Sat, 7 May 2005 04:30:51 +0000 (21:30 -0700)]
[PATCH] uml: Turn literal numbers into symbolic constants
So, there I was, looking at my own code, wondering what the magic setjmp
return values did. This patch turns the constants that are used to make
requests of the initial thread into meaningful symbols.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Dike [Sat, 7 May 2005 04:30:51 +0000 (21:30 -0700)]
[PATCH] uml: Makefile cleanup
This eliminates some stuff from arch/um/kernel/Makefile which refers to a
file which has long since been deleted.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Dike [Sat, 7 May 2005 04:30:50 +0000 (21:30 -0700)]
[PATCH] uml: Eliminate unusable function
Eliminate the non-inline version of switch_mm, which can't be used,
considering the inline version in asm/mmu_context.h
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Bodo Stroesser [Sat, 7 May 2005 04:30:49 +0000 (21:30 -0700)]
[PATCH] uml: S390 preparation, save an extra register
s390 tt-mode needs to save not only syscall number, but an further register
also.
Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com> Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Bodo Stroesser [Sat, 7 May 2005 04:30:46 +0000 (21:30 -0700)]
[PATCH] uml: S390 preparation, peekusr/pokeusr defined by subarch
s390 needs to change some parts of arch/um/kernel/ptrace.c. Thus, the code
regarding PEEKUSER and POKEUSER are shifted to arch/um/sys-<subarch>/ptrace.c.
Also s390 debug registers need to be updated, when singlestepping is switched
on / off. Thus, setting/resetting of singlestepping is centralized in the new
function set_singlestep(), which also inserts the macro
SUBARCH_SET_SINGLESTEP(mode), if defined.
Finally, s390 has the "ieee_instruction_pointer" in its
registers, which also is allowed to be read via
To implement this feature, sys_ptrace inserts the macro
SUBARCH_PTRACE_SPECIAL, if defined.
Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com> Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Dike [Sat, 7 May 2005 04:30:45 +0000 (21:30 -0700)]
[PATCH] uml: command line handling cleanup
Command line handling cleanups - a couple of things made static and an
unused declaration removed from header.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Dike [Sat, 7 May 2005 04:30:44 +0000 (21:30 -0700)]
[PATCH] uml: Remove include/asm-um/elf.h
I accidentally included include/asm-um/elf.h as a real file in a previous
patch. This patch eliminates it.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Dike [Sat, 7 May 2005 04:30:43 +0000 (21:30 -0700)]
[PATCH] uml: __deprecated makes build unnecessarily noisy
Remove the __deprecated from verify_area_skas and verify_area_tt. Since
verify_area is itself marked __deprecated, and it is the only caller of
these, then they don't need to be marked. Marking them only makes the
build noisier.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jiri Benc [Sat, 7 May 2005 04:30:42 +0000 (21:30 -0700)]
[PATCH] video/tuner: add VIDEO_G_FREQUENCY and freq range to VIDIOC_G_TUNER
This patch adds a VIDIOC_G_FREQUENCY command to tuner-core.c and sets
lowest and highest tunable frequencies in v4l2_tuner structure returned by
VIDIOC_G_TUNER command.
Jiri Benc [Sat, 7 May 2005 04:30:42 +0000 (21:30 -0700)]
[PATCH] video/tuner: fix tuner->freq updating
In VIDIOC_S_FREQUENCY command in tuner-core.c, t->freq is set to a new
value before calling set_freq(). This is not necessary, as set_freq() sets
t->freq itself. Moreover, it causes problems with Philips tuners, as they
need to take into consideration difference between previous and new
frequency.
Kumar Gala [Sat, 7 May 2005 04:30:41 +0000 (21:30 -0700)]
[PATCH] ppc32: Fix POWER3/POWER4 compiler error
In separating out support for hardware floating point we missed the fact
that both POWER3 and POWER4 have HW FP. Enable CONFIG_PPC_FPU for POWER3
and POWER4 fixes the issue.
Signed-off-by: Kumar Gala <kumar.gala@freescale.com> Acked-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Paul Mackerras [Sat, 7 May 2005 00:41:03 +0000 (17:41 -0700)]
[PATCH] ppc64: enable CONFIG_RTAS_PROC by default
This patch enables CONFIG_RTAS_PROC by default on pSeries. This will
preserve /proc/ppc64/rtas/rmo_buffer, which is needed by librtas.
Signed-off-by: John Rose <johnrose@austin.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Sat, 7 May 2005 00:41:01 +0000 (17:41 -0700)]
[PATCH] revert msdos partitioning fix
This change from March 3rd causes the partition parsing code to ignore
partitions which have a signature byte of zero. Turns out that more people
have such partitions than we expected, and their device numbering is coming up
wrong in post-2.6.11 kernels.
So revert the change while we think about the problem a bit more.
James Bottomley [Fri, 6 May 2005 18:14:48 +0000 (13:14 -0500)]
[SCSI] correct the sym2 period setting routines
There's a slight bug in the routines in that if the period requires dt,
then the routine will unconditionally set it. DT may only be set if
Wide is also set, so this turns back on the wide bit.
For domain validation to work correctly, we need to observe the wide bit
absolutely.
Acked by: Matthew Wilcox <willy@debian.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Jens Axboe [Fri, 6 May 2005 06:37:44 +0000 (08:37 +0200)]
[PATCH] fix alsa via82xx resume
Trying software suspend on my workstation makes it crash on resume. The
problem is that via82xx marks the chip_init function as _devinit, but calls
it on resume as well.
Paul Mackerras [Fri, 6 May 2005 06:28:56 +0000 (16:28 +1000)]
[PATCH] ppc64: global interrupt queue cleanup
Move the code to set global interrupt queue membership to xics.c,
and remove no longer needed extern declarations. Also call it on
all cpus (even the boot cpu) to prepare for kexec.
Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: R Sharada <sharada@in.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Trivial patch to remove our last direct reference to contig_page_data.
This will make it just that much less hard to seperate NUMA and
DISCONTIG. Please forward on. Against 2.6.12-rc1
Signed-off-by: Joel Schopp <jschopp@austin.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Paul Mackerras [Fri, 6 May 2005 04:27:17 +0000 (14:27 +1000)]
[PATCH] ppc64: remove asm/bootinfo.h include
The defines in bootinfo.h are not used, so the include can be removed.
According to Ben, birecs are not used on ppc64:
on ppc64, we made the decision of enforcing the presence of an
OF device-tree and either an OF-like client interface or a kexec
like flattened tree.
so if your bootloader want to say things to the kernel,
it can do so by adding properties to the device-tree
compile-tested with defconfig
Signed-off-by: Olaf Hering <olh@suse.de> Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Paul Mackerras [Fri, 6 May 2005 03:35:04 +0000 (13:35 +1000)]
[PATCH] ppc64: fix reloc_offset comment
The code in reloc_offset is actually subtracting the address in the link
register from the address calculated by the linker. Perhaps the
extended mnemonic `sub' replaced an original `subf' and the comment just
did not get updated.
Paul Mackerras [Fri, 6 May 2005 03:29:34 +0000 (13:29 +1000)]
[PATCH] ppc64: fix prom.c compile warning
The code in unflatten_device_tree knows that get_property is written to
only return with lenp equal to 1 when also returning a valid pointer.
The gcc 3.3.3 compiler is not able to prove this to itself, so it warns
about a possible uninitialized pointer dereference:
.../arch/ppc64/kernel/prom.c: In function `unflatten_device_tree':
.../arch/ppc64/kernel/prom.c:828:
warning: `p' might be used uninitialized in this function
Unless it is desired to rework the interaction between the two
functions, this will keep the existing behavior but quiet the compiler.
Adrian Bunk [Thu, 5 May 2005 23:16:22 +0000 (16:16 -0700)]
[PATCH] drivers/scsi/sym53c416.c: fix a wrong check
The Coverity checker found that this for loop was wrong.
This patch changes it to what seems to be intended.
Signed-off-by: Adrian Bunk <bunk@stusta.de> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: Matthew Wilcox <willy@debian.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Domen Puncer [Thu, 5 May 2005 23:16:19 +0000 (16:16 -0700)]
[PATCH] fix lib/sort regression test
The regression test in lib/sort.c is currently worthless because the array
that is generated for sorting will be all zeros. This patch fixes things
so that the array that is generated will contain unsorted integers (that
are not all identical) as was probably intended.
Signed-off-by Daniel Dickman <didickman@yahoo.com> Signed-off-by: Domen Puncer <domen@coderock.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Domen Puncer [Thu, 5 May 2005 23:16:15 +0000 (16:16 -0700)]
[PATCH] CodingStyle: trivial whitespace fixups
When I do a "diff -Nur arch/i386 arch/x86_64" to see what is different between these two
architectures, I see some differences due to whitespace issues only. The attached patch removes
some of the noise by fixing up the following files:
- arch/i386/boot/bootsect.S
- arch/i386/boot/video.S
- arch/x86_64/boot/bootsect.S
Signed-off-by: Daniel Dickman <didickman@yahoo.com> Signed-off-by: Domen Puncer <domen@coderock.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Domen Puncer [Thu, 5 May 2005 23:16:13 +0000 (16:16 -0700)]
[PATCH] ixj* - compile warning cleanup
compile warning cleanup - suggested by Adrian Bunk; remove unmaintained rcs
char strings from source and handle the occurrences of their use, make sure
kernel-userspace issues taken care of; break out into separate patch
Signed-off-by: Stephen Biggs <yrgrknmxpzlk@gawab.com> Signed-off-by: Domen Puncer <domen@coderock.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Adrian Bunk [Thu, 5 May 2005 23:16:09 +0000 (16:16 -0700)]
[PATCH] make some things static
This patch makes some needlessly global identifiers static.
Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Arjan van de Ven <arjanv@infradead.org> Acked-by: Trond Myklebust <trond.myklebust@fys.uio.no> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Attached is a patch to bttv which fixes the following problems.
Affected cards and problems:
~~~~~~~~~~~~~~~~~~~~~~~~
o VP-1020 (200103A) Tuning problems, device detection.
o VP-1020 (DST-MOT) Errors during tuning, device detection fails in a while.
o VP-1030 (DST-CI) Tuning sometimes fails after CI commands.
o VP-2031 (DCT-CI) Tuning problems
The timeout happens before the actual timeout occured in the MCU
on the board, and hence the problems.
Changes: (bttv-i2c.diff)
~~~~~~~~~~~~~~~~~~~~~~~~
o Changed the custom wait queue to wait_event_interruptible_timeout()
- Suggestion by Johannes Stezenbach.
o Fixed the wait queue timeout problem
- This fixes the timeout problem on various cards.
- This problem was visible as many
* Cannot tune to channels, when signal levels are very low.
* app_info does not work in some conditions for CI based cards
- Smaller values worked good for newer cards, but the older cards
suffered, settled down to the worst case values that could happen in any
eventuality.
Signed-off-by: Manu Abraham <manu@kromtek.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] DAC960: add support for Mylex AcceleRAID 4/5/600
This patch adds support for a new class of DAC960 controllers. It's based
on the GPLed idac320 driver from IBM for Linux 2.4.18. That driver is a
fork of the 2.4.18 version of DAC960 that adds support for this new type of
controllers (internally called "GEM Series"), that differ from other DAC960
V2 firmware controllers only in the register offsets and removes support
for all others.
This patch instead integrates support for these controllers into the DAC960
driver.
Thanks to Anders Norrbring for pointing me to the idac320 driver and
testing this patch.
No Signed-Off: line because all code is either copy & pasted from IBM's
idac320 driver or support for other controllers in the 2.6 DAC960 driver.
Note: the really odd formating matches the rest of the DAC960 driver.
Cc: Dave Olien <dmo@osdl.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This however will produce pathological cases, like having a idle system
being requested 1 ms timeouts will give systematically 2 ms timeouts,
whereas currently it simply gives a few usecs less than 1 ms.
The complex (and more computationally expensive) solution would be to
check the gettimeofday time, and compute the correct number of jiffies.
This way, if we request a 300 usecs timer 200 usecs inside the timer
tick, we can wait just one tick, but not if we are 800 usecs inside the
tick. This would also mean that we would have to lock preemption during
these computations to avoid races, etc.
I've searched the archives but couldn't find this particular issue being
discussed before.
Attached is a patch to do the simple solution, in case anybody thinks
that it should be used.
Signed-Off-By: Paulo Marques <pmarques@grupopie.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Thu, 5 May 2005 23:15:48 +0000 (16:15 -0700)]
[PATCH] __block_write_full_page() simplification
The `last_bh' logic probably isn't worth much. In those situations where only
the front part of the page is being written out we will save some looping but
in the vastly more common case of an all-page writeout if just adds more code.
Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Nick Piggin [Thu, 5 May 2005 23:15:46 +0000 (16:15 -0700)]
[PATCH] __block_write_full_page race fix
When running
fsstress -v -d $DIR/tmp -n 1000 -p 1000 -l 2
on an ext2 filesystem with 1024 byte block size, on SMP i386 with 4096 byte
page size over loopback to an image file on a tmpfs filesystem, I would
very quickly hit
BUG_ON(!buffer_async_write(bh));
in fs/buffer.c:end_buffer_async_write
It seems that more than one request would be submitted for a given bh
at a time.
What would happen is the following:
2 threads doing __mpage_writepages on the same page.
Thread 1 - lock the page first, and enter __block_write_full_page.
Thread 1 - (eg.) mark_buffer_async_write on the first 2 buffers.
Thread 1 - set page writeback, unlock page.
Thread 2 - lock page, wait on page writeback
Thread 1 - submit_bh on the first 2 buffers.
=> both requests complete, none of the page buffers are async_write,
end_page_writeback is called.
Thread 2 - wakes up. enters __block_write_full_page.
Thread 2 - mark_buffer_async_write on (eg.) the last buffer
Thread 1 - finds the last buffer has async_write set, submit_bh on that.
Thread 2 - submit_bh on the last buffer.
=> oops.
So change __block_write_full_page to explicitly keep track of the last bh
we need to issue, so we don't touch anything after issuing the last
request.
Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Nick Piggin [Thu, 5 May 2005 23:15:45 +0000 (16:15 -0700)]
[PATCH] fix race in __block_prepare_write
Fix a race where __block_prepare_write can leak out an in-flight read
against a bh if get_block returns an error. This can lead to the page
becoming unlocked while the buffer is locked and the read still in flight.
__mpage_writepage BUGs on this condition.
BUG sighted on a 2-way Itanium2 system with 16K PAGE_SIZE running
fsstress -v -d $DIR/tmp -n 1000 -p 1000 -l 2
where $DIR is a new ext2 filesystem with 4K blocks that is quite
small (causing get_block to fail often with -ENOSPC).
Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Randy.Dunlap [Thu, 5 May 2005 23:15:43 +0000 (16:15 -0700)]
[PATCH] patch-kernel: support non-incremental 2.6.x.y 'stable' patches
Add better support for (non-incremental) 2.6.x.y patches; If an ending
version number if not specified, the script automatically increments the
SUBLEVEL (x in 2.6.x.y) until no more patch files are found; however,
EXTRAVERSION (y in 2.6.x.y) is never automatically incremented but must be
specified fully.
patch-kernel does not normally support reverse patching, but does so when
applying EXTRAVERSION (x.y) patches, so that moving from 2.6.11.y to
2.6.11.z is easy and handled by the script (reverse 2.6.11.y and apply
2.6.11.z).
Signed-off-by: Randy Dunlap <rddunlap@osdl.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] kprobes: Allow multiple kprobes at the same address
Allow registration of multiple kprobes at an address in an architecture
agnostic way. Corresponding handlers will be invoked in a sequence. But,
a kprobe and a jprobe can't (yet) co-exist at the same address.
Signed-off-by: Ananth N Mavinakayanahalli <amavin@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel oops! when unregister_kprobe() is called on a non-registered
kprobe. This patch fixes the above problem by checking if the probe exists
before unregistering.
Signed-off-by: Prasanna S Panchamukhi <prasanna@in.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] Kprobes: Incorrect handling of probes on ret/lret instruction
Kprobes could not handle the insertion of a probe on the ret/lret
instruction and used to oops after single stepping since kprobes was
modifying eip/rip incorrectly. Adjustment of eip/rip is not required after
single stepping in case of ret/lret instruction, because eip/rip points to
the correct location after execution of the ret/lret instruction. This
patch fixes the above problem.
Signed-off-by: Prasanna S Panchamukhi <prasanna@in.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Bodo Stroesser [Thu, 5 May 2005 23:15:40 +0000 (16:15 -0700)]
[PATCH] uml: header and code cleanup
Remove some definitions and declarations from arch/um/include/skas_ptrace.h,
as they have moved to arch/um/include/sysdep/skas_ptrace.h
Also, remove PTRACE_SIGPENDING support in UML at all.
Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com> Signed-off-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Bodo Stroesser [Thu, 5 May 2005 23:15:39 +0000 (16:15 -0700)]
[PATCH] uml: remove a dangling symlink
UML: remove no longer needed arch-signal.h
Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com> Signed-off-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
s390 passes parameters in registers. So the only safe way to find out the
address of signal context, error-address and error-type (trap_no), which are
passed to signal handlers as parameters, is to declare these parameters.
So I inserted an subarch-specific macro which holds the declaration of
parameters for signal handlers.
Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com> Signed-off-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Bodo Stroesser [Thu, 5 May 2005 23:15:37 +0000 (16:15 -0700)]
[PATCH] uml: s390 preparation, delay moved to arch
s390 has fast read access to realtime clock (nanosecond resolution). So it
makes sense to have an arch-specific implementation not only of __delay, but
__udelay also.
Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com> Signed-off-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Bodo Stroesser [Thu, 5 May 2005 23:15:36 +0000 (16:15 -0700)]
[PATCH] uml: s390 preparation, checksumming done in arch code
Checksum handling largely depends on the subarch.
Thus, I renamed i386 arch_csum_partial in arch/um/sys-i386/checksum.S back to
csum_partial, removed csum_partial from arch/um/kernel/checksum.c and shifted
EXPORT_SYMBOL(csum_partial) to arch/um/sys-i386/ksyms.c.
Then, csum_partial_copy_to and csum_partial_copy_from were shifted from
arch/um/kernel/checksum.c to arch/um/include/sysdep-i386/checksum.h and
inserted in the calling functions csum_partial_copy_from_user() and
csum_and_copy_to_user().
Now, arch/um/kernel/checksum.c is empty and removed.
Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com> Signed-off-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Bodo Stroesser [Thu, 5 May 2005 23:15:36 +0000 (16:15 -0700)]
[PATCH] uml: s390 preparation, linkage.h inherited from host
This patch replaces the contents of include/asm-um/linkage.h
by
#include "asm/arch/linkage.h"
Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com> Signed-off-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Bodo Stroesser [Thu, 5 May 2005 23:15:35 +0000 (16:15 -0700)]
[PATCH] uml: s390 preparation, elf.h
This patch make elh.h a symlink to the new arch-specific include files of the
form elf-<subarch>.h, as in the same way already is done for some other
includes. Also moves Elf-stuff from archparam-<subarch>.h and elf.h to the
new elf-<subarch>.h files.
Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com> Signed-off-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Dike [Thu, 5 May 2005 23:15:32 +0000 (16:15 -0700)]
[PATCH] uml: Fix SIGWINCH relaying
This makes SIGWINCH work again, and fixes a couple of SIGWINCH-associated
crashes. First, the sigio thread disables SIGWINCH because all hell breaks
loose if it ever gets one and tries to call the signal handling code. Second,
there was a problem with deferencing tty structs after they were freed. The
SIGWINCH support for a tty wasn't being turned off or freed after the tty went
away.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Bodo Stroesser [Thu, 5 May 2005 23:15:31 +0000 (16:15 -0700)]
[PATCH] uml: S390 preparation, abstract host page fault data
This patch removes the arch-specific fault/trap-infos from thread and
skas-regs.
It adds a new struct faultinfo, that is arch-specific defined in
sysdep/faultinfo.h.
The structure is inserted in thread.arch and thread.regs.skas and
thread.regs.tt
Now, segv and other trap-handlers can copy the contents from regs.X.faultinfo
to thread.arch.faultinfo with one simple assignment.
Also, the number of macros necessary is reduced to
FAULT_ADDRESS(struct faultinfo)
extracts the faulting address from faultinfo
FAULT_WRITE(struct faultinfo)
extracts the "is_write" flag
SEGV_IS_FIXABLE(struct faultinfo)
is true for the fixable segvs, i.e. (TRAP == 14)
on i386
UPT_FAULTINFO(regs)
result is (struct faultinfo *) to the faultinfo
in regs->skas.faultinfo
GET_FAULTINFO_FROM_SC(struct faultinfo, struct sigcontext *)
copies the relevant parts of the sigcontext to
struct faultinfo.
On SIGSEGV, call user_signal() instead of handle_segv(), if the architecture
provides the information needed in PTRACE_FAULTINFO, or if PTRACE_FAULTINFO is
missing, because segv-stub will provide the info.
The benefit of the change is, that in case of a non-fixable SIGSEGV, we can
give user processes a SIGSEGV, instead of possibly looping on pagefault
handling.
Since handle_segv() sikked arch_fixup() implicitly by passing ip==0 to segv(),
I changed segv() to call arch_fixup() only, if !is_user.
Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com> Signed-off-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Dike [Thu, 5 May 2005 23:15:30 +0000 (16:15 -0700)]
[PATCH] uml: fix a ptrace call
This fixes write_ldt_entry to treat userspace_pid as an array.
Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Al Viro [Thu, 5 May 2005 23:15:29 +0000 (16:15 -0700)]
[PATCH] uml: finish cross-build support
O=... builds support. Very easy, actually.
Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>