Paul Mackerras [Mon, 23 Aug 2004 05:28:40 +0000 (22:28 -0700)]
[PATCH] ppc32: Fix bug in altivec emulation
This patch fixes a bug in the kernel emulation of altivec instructions with
denormalized operands. The emulation of the vmaddfp and vmnsubfp
instructions was giving the wrong answer because I had the wrong order of
operands to the fmadds and fnmsubs instructions. This patch fixes it for
both ppc32 and ppc64.
Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Paul Mackerras [Mon, 23 Aug 2004 05:28:04 +0000 (22:28 -0700)]
[PATCH] ppc32: emulate obsolete instructions
This patch adds emulation in the illegal instruction handler for a couple
of old instructions that are no longer implemented in the PPC970 and later
chips. This patch adds the code for both ppc32 and ppc64, and cleans up
the ppc64 traps.c a bit, along the lines of the ppc32 code. It also makes
sure that the ppc64 code generates a SIGTRAP after emulating an instruction
if single-stepping is enabled.
Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This patch adds code to the ppc32 alignment exception handler to make it
handle the load/store string and load/store multiple word instructions.
This is an issue for older CPUs such as the PPC601, which traps on
load/store string instructions which cross a page boundary (newer CPUs
handle this in hardware). I have a little test program which exercises
this code, so I am reasonably confident it's correct.
Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Matt Porter [Mon, 23 Aug 2004 05:27:40 +0000 (22:27 -0700)]
[PATCH] ppc32: make PPC40x large tlb mapping optional
This makes the PPC40x lowmem large tlb mapping selectable via a cmdline
option. This allows use of the normal page-sized mapping so that kernel
text can be read only if desired.
Signed-off-by: Josh Boyer <jwboyer@charter.net> Signed-off-by: Matt Porter <mporter@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Matt Porter [Mon, 23 Aug 2004 05:27:29 +0000 (22:27 -0700)]
[PATCH] ppc32: optimize/fix timer_interrupt loop
The following patch fixes the situation where the loop condition could
generate a next_dec of zero while exiting the loop. This is suboptimal on
Classic PPC because it forces another interrupt to occur and reenter the
handler. It is fatal on Book E cores, because their decrementer is stopped
when writing a zero (Classic interrupts on a 0->-1 transition, Book E
interrupts on a 1->0 transition). Instead, stay in the loop on a
next_dec==0.
Signed-off-by: Matt Porter <mporter@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] ppc32: remove hardcoded offsets from ppc asm
This patch by Vincent Hanquez removes some hard coded offsets for accessing
thread info fields from assembly, uses the normal offset generation
mecanism that we already have for other things instead.
Signed-off-by: Vincent Hanquez <tab@snarc.org> 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>
Keith Owens [Mon, 23 Aug 2004 05:27:05 +0000 (22:27 -0700)]
[PATCH] Make i386 die() more resilient against recursive errors
Make i386 die() more resilient against recursive errors, almost a cut
and paste of the ia64 die() routine. Much of the patch is indentation
changes.
Mainly to make it easier to add crash, lcrash, kmsgdump or other RAS patches.
They are invoked from die() and if they crash themselves, we have to avoid
recursive loops in die().
Signed-off-by: Keith Owens <kaos@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Akiyama Nobuyuki [Mon, 23 Aug 2004 05:26:54 +0000 (22:26 -0700)]
[PATCH] NMI trigger switch support for debugging(updated)
I made a patch for debugging with the help of NMI trigger switch.
When kernel hangs severely, keyboard operation(e.g.Ctrl-Alt-Del)
doesn't work properly. This patch enables debugging information
to be displayed on console in this case.
I think this feature is necessary as standard functionality.
Please feel free to use this patch and let me know if you have
any comments.
Background:
When a trouble occurs in kernel, we usually begin to investigate
with following information:
- panic >> panic message.
- oops >> CPU registers and stack trace.
- hang >> **NONE** no standard method established.
How it works:
Most IA32 servers have a NMI switch that fires NMI interrupt up.
The NMI interrupt can interrupt even if kernel is serious state,
for example deadlock under the interrupt disabled.
When the NMI switch is pressed after this feature is activated,
CPU registers and stack trace are displayed on console and then
panic occurs.
This feature is activated or deactivated with sysctl.
On IA32 architecture, only the following are defined as reason
of NMI interrupt:
- memory parity error
- I/O check error
The reason code of NMI switch is not defined, so this patch assumes
that all undefined NMI interrupts are fired by MNI switch.
However, oprofile and NMI watchdog also use undefined NMI interrupt.
Therefore this feature cannot be used at the same time with oprofile
and NMI watchdog. This feature hands NMI interrupt over to oprofile
and NMI watchdog. So, when they have been activated, this feature
doesn't work even if it is activated.
Arnd Bergmann [Mon, 23 Aug 2004 05:26:41 +0000 (22:26 -0700)]
[PATCH] fix reading string module parameters in sysfs
Reading the contents of a module_param_string through sysfs currently
oopses because the param_get_charp() function cannot operate on a
kparam_string struct. This introduces the required param_get_string.
Mike Kravetz [Mon, 23 Aug 2004 05:26:30 +0000 (22:26 -0700)]
[PATCH] proc fs task name locking fix
Races have been observed between excec-time overwriting of task->comm and
/proc accesses to the same data. This causes environment string
information to appear in /proc.
Fix that up by taking task_lock() around updates to and accesses to
task->comm.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
it took more than 80 usecs for XFree86 to do a context-switch!
it turns out that the reason for this (massive) context-switching
overhead is the following change in 2.6.8:
[PATCH] larger IO bitmaps
To demonstrate the effect of this change i've written ioperm-latency.c
(attached), which gives the following on vanilla 2.6.8.1:
# ./ioperm-latency
default no ioperm: scheduling latency: 2528 cycles
turning on port 80 ioperm: scheduling latency: 10563 cycles
turning on port 65535 ioperm: scheduling latency: 10517 cycles
the ChangeSet says:
Now, with the lazy bitmap allocation and per-CPU TSS, this
will really not drain any resources I think.
this is plain wrong. An increase in the IO bitmap size introduces
per-context-switch overhead as well: we now have to copy an 8K bitmap
every time XFree86 context-switches - even though XFree86 never uses
ports higher than 1024! I've straced XFree86 on a number of x86 systems
and in every instance ioperm() was used - so i'd say the majority of x86
Linux systems running 2.6.8.1 are affected by this problem.
This not only causes lots of overhead, it also trashes ~16K out of the
L1 and L2 caches, on every context-switch. It's as if XFree86 did a L1
cache flush on every context-switch ...
the simple solution would be to revert IO_BITMAP_BITS back to 1024 and
release 2.6.8.2?
I've implemented another solution as well, which tracks the
highest-enabled port # for every task and does the copying of the bitmap
intelligently. (patch attached) The patched kernel gives:
# ./ioperm-latency
default no ioperm: scheduling latency: 2423 cycles
turning on port 80 ioperm: scheduling latency: 2503 cycles
turning on port 65535 ioperm: scheduling latency: 10607 cycles
this is much more acceptable - the full overhead only occurs in the very
unlikely event of a task using the high ioport range. X doesnt suffer
any significant overhead.
(tracking the maximum allowed port # also allows a simplification of
io_bitmap handling: e.g. we dont do the invalid-offset trick anymore -
the IO bitmap in the TSS is always valid and secure.)
I tested the patch on x86 SMP and UP, it works fine for me. I tested
boundary conditions as well, it all seems secure.
/*
* Use a pair of RT processes bound to the same CPU to measure
* context-switch overhead:
*/
static void measure(void)
{
unsigned long i, min = ~0UL, pid, mask = 1, t1, t2;
sched_set_affinity(0, sizeof(mask), &mask);
pid = fork();
if (!pid)
for (;;) {
asm volatile ("sti; nop; cli");
sched_yield();
}
sched_yield();
for (i = 0; i < 100; i++) {
asm volatile ("sti; nop; cli");
CYCLES(t1);
sched_yield();
CYCLES(t2);
if (i > 10) {
if (t2 - t1 < min)
min = t2 - t1;
}
}
asm volatile ("sti");
It seems that on some OldWolrd macs, we don't get the OF stdout device,
thus the new set_preferred_console() dies at boot trying to dereference
a NULL pointer.
In 2.5.18 some minix-specific stuff was moved to the minix subdirectory
where it belonged. However, a typo crept in, causing inode disk usage
to be incorrectly reported. A few people have complained, but so far
not sufficiently loudly.
Alan Cox [Sun, 22 Aug 2004 07:03:35 +0000 (00:03 -0700)]
[PATCH] missing CPU descriptors
There are a couple of cache descriptors in the current Intel manuals
missing from our tables at least one of which appears in an actual
processor in the real world.
Jesse Barnes [Sun, 22 Aug 2004 05:30:28 +0000 (22:30 -0700)]
[PATCH] ACPI for 2.6
Define acpi_noirq on ia64 since it's used now in pci_link.c. All ia64
machines use ACPI, so we can just define it to 0 like we do for acpi_disabled
and acpi_pci_disabled.
Arnd Bergmann [Fri, 20 Aug 2004 10:29:39 +0000 (12:29 +0200)]
[WATCHDOG] v2.6.8.1 compat_ioctl-patch
The watchdog ioctl interface is defined correctly for 32 bit emulation,
although WIOC_GETSUPPORT was not marked as such, for an unclear reason.
WDIOC_SETTIMEOUT and WDIOC_GETTIMEOUT were added in may 2002 to the
code but never to the ioctl list. This adds all three definitions.
Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
[ARM PATCH] 2023/1: platform_device definitions no longer needed in include/asm-arm/hardware.h
Patch from Michael Opdenacker
Hello,
platform_device definitions are no longer needed in include/asm-arm/hardware.h:
- platform_add_device no longer exists anywhere else in the whole kernel
- other definitions should be taken from include/linux/device.h instead
Russell King [Tue, 17 Aug 2004 12:36:34 +0000 (13:36 +0100)]
[ARM] Deprecate virt_to_bus/bus_to_virt.
These macros don't take account of which bus is actually required,
so they should not be used in new drivers; in fact, new drivers
should use the DMA API.
Russell King [Mon, 16 Aug 2004 23:42:32 +0000 (00:42 +0100)]
[ARM] Add ARM AMBA CLCD framebuffer driver.
This changeset adds the ARM AMBA CLCD framebuffer driver. This is
a generic core driver; users are expected to add their platform
specifics via the "platform_data" struct device entry.