aboutsummaryrefslogtreecommitdiffstats
path: root/arch (follow)
AgeCommit message (Collapse)AuthorFilesLines
2007-10-16powerpc32 vDSO: linker script indentationRoland McGrath1-101/+118
This cleans up the formatting in the vDSO linker script, mostly just the use of whitespace. It's intended to approximate the kernel standard conventions for indenting C, treating elements of the linker script about like initialized variable definitions. Signed-off-by: Roland McGrath <roland@redhat.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16powerpc64 vDSO: linker script indentationRoland McGrath1-103/+122
This cleans up the formatting in the vDSO linker script, mostly just the use of whitespace. It's intended to approximate the kernel standard conventions for indenting C, treating elements of the linker script about like initialized variable definitions. Signed-off-by: Roland McGrath <roland@redhat.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16SH vDSO: linker script indentationRoland McGrath1-35/+42
This cleans up the formatting in the vDSO linker script, mostly just the use of whitespace. It's intended to approximate the kernel standard conventions for indenting C, treating elements of the linker script about like initialized variable definitions. Signed-off-by: Roland McGrath <roland@redhat.com> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16ia64 vDSO: linker script indentationRoland McGrath1-63/+72
This cleans up the formatting in the vDSO linker script, mostly just the use of whitespace. It's intended to approximate the kernel standard conventions for indenting C, treating elements of the linker script about like initialized variable definitions. Signed-off-by: Roland McGrath <roland@redhat.com> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16s3c2410fb: removes lcdcon1 register value from s3c2410fb_displayKrzysztof Helt6-28/+0
This patch removes lcdcon1 register field from the s3c2410fb_display as all bits are calculated from other fields. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Antonino Daplas <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16s3c2410fb: adds pixclock to s3c2410fb_displayKrzysztof Helt6-110/+11
This patch adds pixelclock field to the s3c2410fb_display structure and make use of it in the driver. The Bast machine defined 9 modes but pixclock and margin values are defined only for the 640x480 modes so I removed other modes. This patch also fixes wrong display type constant for the SMDK2440 board. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Antonino Daplas <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16s3c2410fb: remove lcdcon2 and lcdcon3 register fieldsKrzysztof Helt6-72/+0
This patch removes unused lcdcon2 and lcdcon3 register value from the s3c2410fb_display structure. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Antonino Daplas <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16s3c2410fb: add pulse length fields to s3c2410fb_displayKrzysztof Helt6-0/+31
This patch adds synchronization pulse lenght fields to the s3c2410fb_display structure and makes use of them in the driver. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Antonino Daplas <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16s3c2410fb: add vertical margins fields to s3c2410fb_displayKrzysztof Helt6-0/+33
This patch adds vertical margins values to all s3c24xx platform. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Antonino Daplas <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16s3c2410fb: remove lcdcon3 register from s3c2410fb_displayKrzysztof Helt6-198/+129
This patch removes unused lcdcon3 register from the s3c2410fb_display structure. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Antonino Daplas <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16s3c2410fb: add margin fields to s3c2410fb_displayKrzysztof Helt6-9/+54
This patch adds margins fields to the s3c2410fb_display structure. It also sets display type and horizontal margins in all platform files that use the s3c2410fb driver. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Antonino Daplas <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16s3c2410fb: multi-display supportKrzysztof Helt6-255/+328
This patch adds a new structure to describe and handle more than one panel (display mode) for the s3c2410 framebuffer. This structure is added after the pxafb driver. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Antonino Daplas <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16rtc: make rtc-ds1742 driver hotplug-awareAtsushi Nemoto2-2/+2
The rtc-ds1742 platform driver name doesn't match its module name, which might prevents it from properly hotplugging. There is only two in-tree user of its driver, which are fixed by this patch too. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: David Brownell <david-b@pacbell.net> Cc: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16kprobes: support kretprobe blacklistMasami Hiramatsu8-1/+25
Introduce architecture dependent kretprobe blacklists to prohibit users from inserting return probes on the function in which kprobes can be inserted but kretprobes can not. This patch also removes "__kprobes" mark from "__switch_to" on x86_64 and registers "__switch_to" to the blacklist on x86-64, because that mark is to prohibit user from inserting only kretprobe. Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com> Cc: Prasanna S Panchamukhi <prasanna@in.ibm.com> Acked-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16V850: cleanup struct irqaction initializersThomas Gleixner2-7/+9
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Miles Bader <miles@gnu.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16uml: definitively kill subprocesses on panicLepton Wu2-1/+39
In a stock 2.6.22.6 kernel, poweroff a user mode linux guest (2.6.22.6 running in skas0 mode) will halt the host linux. I think the reason is the kernel thread abort because of a bug. Then the sys_reboot in process of user mode linux guest is not trapped by the user mode linux kernel and is executed by host. I think it is better to make sure all of our children process to quit when user mode linux kernel abort. [ jdike - the kernel process needs to ignore SIGTERM, plus the waitpid/kill loop is needed to make sure that all of our children are dead before the kernel exits ] Signed-off-by: Lepton Wu <ytht.net@gmail.com> Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16uml: arch/um/drivers formattingJeff Dike9-253/+244
Style fixes for the rest of the drivers. arch/um/drivers should be pretty CodingStyle-compliant now. Except for the ubd driver, which will have to be treated separately. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16uml: fix stub address calculationsJeff Dike18-77/+81
The calculation of CONFIG_STUB_CODE and CONFIG_STUB_DATA didn't take into account anything but 3G/1G and 2G/2G, leaving the other vmsplits out in the cold. I'd rather not duplicate the four known host vmsplit cases for each of these symbols. I'd also like to calculate them based on the highest userspace address. The Kconfig language seems not to allow calculation of hex constants, so I moved this to as-layout.h. CONFIG_STUB_CODE, CONFIG_STUB_DATA, and CONFIG_STUB_START are now gone. In their place are STUB_CODE, STUB_DATA, and STUB_START in as-layout.h. i386 and x86_64 seem to differ as to whether an unadorned constant is an int or a long, so I cast them to unsigned long so they can be printed consistently. However, they are also used in stub.S, where C types don't work so well. So, there are ASM_ versions of these constants for use in stub.S. I also ifdef-ed the non-asm-friendly portion of as-layout.h. With this in place, most of the rest of this patch is changing CONFIG_STUB_* to STUB_*, except in stub.S, where they are changed to ASM_STUB_*. defconfig has the old symbols deleted. I also print these addresses out in case there is any problem mapping them on the host. The two stub.S files had some trailing whitespace, so that is cleaned up here. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16uml: correctly handle skb allocation failuresJeff Dike1-0/+47
Handle memory allocation failures when reading packets. We have to read something from the host, even if we can't allocate any memory. If we don't, the host side of the device may fill up and stop delivering interrupts because no new packets can be queued. A single sk_buff is allocated whenever an MTU is seen which is larger than any seen earlier. This is used to read packets if there is a memory allocation failure. The large MTU check is done from eth_configure, which is called when a interface is added to the system. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16uml: network driver MTU cleanupsJeff Dike19-188/+80
A bunch of MTU-related cleanups in the network code. First, there is the addition of the notion of a maximally-sized packet, which is the MTU plus headers. This is used to size the skb that will receive a packet. This allows ether_adjust_skb to go away, as it was used to resize the skb after it was allocated. Since the skb passed into the low-level read routine is no longer resized, and possibly reallocated, there, they (and the write routines) don't need to get an sk_buff **. They just need the sk_buff * now. The callers of ether_adjust_skb still need to do the skb_put, so that's now inlined. The MAX_PACKET definitions in most of the drivers are gone. The set_mtu methods were all the same and did nothing, so they can be removed. The ethertap driver had a typo which doubled the size of the packet rather than adding two bytes to it. It also wasn't defining its setup_size, causing a zero-byte kmalloc and crash when the invalid pointer returned from kmalloc was dereferenced. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16uml: network formattingJeff Dike22-616/+602
Style and other non-functional changes in the UML networking code, including include tidying style violations copyright updates printks getting severities userspace code calling libc directly rather than using the os_* wrappers There's also a exit path cleanup in the pcap driver. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16uml: use *SEC_PER_*SEC constantsJeff Dike5-17/+22
There are various uses of powers of 1000, plus the odd BILLION constant in the time code. However, there are perfectly good definitions of *SEC_PER_*SEC in linux/time.h which can be used instaed. These are replaced directly in kernel code. Userspace code imports those constants as UM_*SEC_PER_*SEC and uses these. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16uml: eliminate SIGALRMJeff Dike7-35/+17
Now that ITIMER_REAL is no longer used, there is no need for any use of SIGALRM whatsoever. This patch removes all mention of it. In addition, real_alarm_handler took a signal argument which is now always SIGVTALRM. So, that is gone. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16uml: time build fixJeff Dike2-5/+21
Put back an implementation of timeval_to_ns in arch/um/os-Linux/time.c. tglx pointed out in his review of tickless support that there was a perfectly good implementation of it in linux/time.h. The problem is that this is userspace code which can't pull in kernel headers and there doesn't seem to be a libc version. So, I'm copying the version from linux/time.h rather than resurrecting my version. This causes some declaration changes as it now returns a signed value rather than an unsigned value. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16uml: eliminate interrupts in the idle loopJeff Dike4-52/+17
Now, the idle loop now longer needs SIGALRM firing - it can just sleep for the requisite amount of time and fake a timer interrupt when it finishes. Any use of ITIMER_REAL now goes away. disable_timer only turns off ITIMER_VIRTUAL. switch_timers is no longer needed, so it, and all calls, goes away. disable_timer now returns the amount of time remaining on the timer. default_idle uses this to tell idle_sleep how long to sleep. idle_sleep will call alarm_handler if nanosleep returns 0, which is the case if it didn't return early due to an interrupt. Otherwise, it just returns. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16uml: tickless supportJeff Dike7-55/+55
Enable tickless support. CONFIG_TICK_ONESHOT and CONFIG_NO_HZ are enabled. itimer_clockevent gets CLOCK_EVT_FEAT_ONESHOT and an implementation of .set_next_event. CONFIG_UML_REAL_TIME_CLOCK goes away because it only makes sense when there is a clock ticking away all the time. timer_handler now just calls do_IRQ once without trying to figure out how many ticks to emulate. The idle loop now needs to turn ticking on and off. Userspace ticks keep happening as usual. However, the userspace loop keep track of when the next wakeup should happen and suppresses process ticks until that happens. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16uml: clocksource supportJeff Dike1-0/+20
Add clocksource support. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16uml: GENERIC_CLOCKEVENTS supportJeff Dike4-57/+55
Enable CONFIG_GENERIC_CLOCKEVENTS. timer_irq gets its name changed to timer_handler, and becomes the recipient of timer signals. The clock_event_device is set up to imitate the current ticking clock, i.e. CLOCK_EVT_FEAT_ONESHOT is not enabled yet. disable_timer now doesn't ignore SIGALRM and SIGVTALRM because that breaks delay calibration. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16uml: GENERIC_TIME supportJeff Dike3-43/+5
Enable CONFIG_GENERIC_TIME. As a side-effect of this, the UML implementations of do_gettimeofday and do_settimeofday go away, as these are provided by generic code. set_time also goes away since it was only used by do_settimeofday. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16uml: separate timer initializationJeff Dike4-4/+13
Move timer signal initialization from init_irq_signals to a new function, timer_init. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16uml: simplify interval settingJeff Dike4-6/+5
set_interval took a timer type as an argument, but it always specified a virtual timer. So, it is not needed, and it is gone, and set_interval is simplified appropriately. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16uml: fix timer switchingJeff Dike4-21/+26
Fix up the switching between virtual and real timers. The idle loop sleeps, so the timer at that point must be real time. At all other times, the timer must be virtual. Even when userspace is running, and the kernel is asleep, the virtual timer is correct because the process timer will be running and the process timer will be firing. The timer switch used to be in the context switch and timer handler code. This is moved to the idle loop and the signal handler, making it much more clear why it is happening. switch_timers now returns the old timer type so that it may be restored. The signal handler uses this in order to restore the previous timer type when it returns. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16uml: eliminate hz()Jeff Dike5-12/+8
Eliminate hz() since its only purpose was to provide a kernel-space constant to userspace code. This can be done instead by providing the constant directly through kernel_constants.h. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16uml: more idiomatic parameter parsingJeff Dike1-2/+2
Make mconsole parameter parsing slightly more idiomatic. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16uml: remove unused fileJeff Dike1-195/+0
arch/um/os-Linux/tt.c is no longer used. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16uml: remove unneeded void * castJesper Juhl1-1/+1
vmalloc() returns a void pointer, so casting to (void *) is pretty pointless. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16uml: eliminate floating point state from register fileJeff Dike2-3/+0
The floating point fields in the pt_regs register file aren't used, so they are deleted. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16uml: style fixes in FP codeJeff Dike10-238/+77
Tidy the code affected by the floating point fixes. A bunch of unused stuff is gone, including two sigcontext.c files, which turned out to be entirely unneeded. There are the usual fixes - whitespace and style cleanups copyright updates emacs formatting comments gone include cleanups adding severities to printks Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16uml: sysrq and mconsole fixesJeff Dike2-15/+10
Fix the passing of printk output back to the mconsole client. The existing code was somewhat confused, accumulating output in a buffer, but writing it out entirely whenever a new chunk was added. This is fixed. The earlier include cleanups caused linux/sysrq.h to not be included - this is fixed by adding the include back, under CONFIG_MAGIC_SYSRQ. CONFIG_MAGIC_SYSRQ is also defaulted to on in defconfig. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16uml: coredumping floating point fixesJeff Dike1-22/+0
Fix core dumping of floating point state. ELF_CORE_COPY_FPREGS gets a definitions, and as a result, dump_fpu no longer needs to exist. Also, elf_fpregset_t needed a real definition. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16uml: ptrace floating point fixesJeff Dike3-51/+93
Handle floating point state better in ptrace. The code now correctly distinguishes between PTRACE_[GS]ETFPREGS and PTRACE_[GS]ETFPXREGS. The FPX requests get handed off to arch-specific code because that's not generic. get_fpregs, set_fpregs, set_fpregs, and set_fpxregs needed real implementations. Something here exposed a missing include in asm/page.h, which needed linux/types.h in order to get gfp_t, so that's fixed here. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16uml: floating point signal delivery fixesJeff Dike8-116/+284
Handle floating point state in across signals correctly. UML/i386 needs to know whether the host does PTRACE_[GS]ETFPXREGS, so an arch_init_registers hook is added, which on x86_64 does nothing. UML doesn't save and restore floating point registers on kernel entry and exit, so they need to be copied between the host process and the sigcontext. save_fpx_registers and restore_fpx_registers are added for this purpose. save_fp_registers and restore_fp_registers already exist. There was a bunch of floating point state conversion code in arch/um/sys-i386/ptrace.c which isn't needed there, but is needed in signal.c, so it is moved over. The i386 code now distinguishes between fp and fpx state and handles them correctly. The x86_64 code just needs to copy state as-is between the host process and the stack. There are also some fixes there to pass the correct address of the floating point state around. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16uml: don't use glibc asm/user.hJeff Dike2-11/+4
Stop including asm/user.h from libc - it seems to be disappearing from distros. It's replaced with sys/user.h which defines user_fpregs_struct and user_fpxregs_struct instead of user_i387_struct and struct user_fxsr_struct on i386. As a bonus, on x86_64, I get to dump some stupid typedefs which were needed in order to get asm/user.h to compile. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16uml: clean up tlb flush pathJeff Dike2-158/+127
Tidy the tlb flushing code. With tt mode gone, there is no reason to have the capability to have called directly from do_mmap, do_mprotect, and do_munmap, rather than calling a function pointer that it is given. There was a large amount of data that was passed from function to function, being used at the lowest level, without being changed. This stuff is now encapsulated in a structure which is initialized at the top layer and passed down. This simplifies the code, reduces the amount of code needed to pass the parameters around, and saves on stack space. A somewhat more subtle change is the meaning of the current operation index. It used to start at -1, being pre-incremented when adding an operation. It now starts at 0, being post-incremented, with associated adjustments of +/- 1 on comparisons. In addition, tlb.h contained a couple of declarations which had no users outside of tlb.c, so they could be moved or deleted. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16uml: userspace files should call libc directlyJeff Dike12-121/+138
A number of files that were changed in the recent removal of tt mode are userspace files which call the os_* wrappers instead of calling libc directly. A few other files were affected by this, through This patch makes these call glibc directly. There are also style fixes in the affected areas. os_print_error has no remaining callers, so it is deleted. There is a interface change to os_set_exec_close, eliminating a parameter which was always the same. The callers are fixed as well. os_process_pc got its error path cleaned up. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16uml: replace clone with forkJeff Dike1-35/+20
Convert the boot-time host ptrace testing from clone to fork. They were essentially doing fork anyway. This cleans up the code a bit, and makes valgrind a bit happier about grinding it. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16uml: remove os_* usage from userspace filesJeff Dike8-219/+186
This patch fixes some userspace files which were calling libc through the os_* wrappers. It turns out that there was only one user of os_new_tty_pgrp, so it can be deleted. There are also some style and whitespace fixes in here. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16uml: free LDT state on process exitJeff Dike1-0/+2
The space allocated for a process LDT wasn't being freed when the process exited. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16uml: rename pt_regs general-purpose register fileJeff Dike9-94/+94
Before the removal of tt mode, access to a register on the skas-mode side of a pt_regs struct looked like pt_regs.regs.skas.regs.regs[FOO]. This was bad enough, but it became pt_regs.regs.regs.regs[FOO] with the removal of the union from the middle. To get rid of the run of three "regs", the last field is renamed to "gp". Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-16uml: fold mmu_context_skas into mm_contextJeff Dike10-69/+56
This patch folds mmu_context_skas into struct mm_context, changing all users of these structures as needed. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>