linux/arch/mips
[MIPS] James E Wilson e1701fb2e2 [PATCH] Fix BCM1480 doubled process accounting times.
Running a UP kernel on a bcm1480 board, I get nonsensical timing
results, like this:
release@unknown:~/tmp$ time ./a.out
real    0m22.906s
user    0m45.792s
sys     0m0.010s
According to my watch, this program took 23 seconds to run, so the real
time clock is OK.  It is process accounting that is broken.

I tracked this down to a problem with the function
bcm1480_timer_interrupt in the file sibyte/bcm1480/time.c.  This
function calls ll_timer_interrupt for cpu0, and ll_local_timer_interrupt
for all cpus.  However, both of these functions do process accounting.
Thus processes running on cpu0 end up with doubled times.  This is very
obvious in a UP kernel where all processes run on cpu0.

The correct way to do this is to only call ll_local_timer interrupt if
this is not cpu0.  This can be seen in the mips-board/generic/time.c
file, and also in the sibyte/sb1250/time.c file, both of which handle
this correctly.  I fixed the bcm1480/time.c file by copying over the
correct code from the sb1250/time.c file.

With this fix, I now get sensible results.
release@unknown:~/tmp$ time ./a.out
real    0m22.903s
user    0m22.894s
sys     0m0.006s

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-06-19 17:39:16 +01:00
..
arc [PATCH] remove set_page_count() outside mm/ 2006-03-22 07:54:02 -08:00
au1000 [MIPS] Au1xx0: fix prom_getenv() to handle YAMON style environment 2006-06-06 00:15:17 +01:00
boot Add .gitignore files for MIPS. 2005-11-07 18:05:37 +00:00
cobalt [MIPS] Cobalt: Fix undefined reference to disable_early_printk. 2006-06-19 17:39:14 +01:00
configs [MIPS] Update MIPS defconfigs. 2006-04-27 15:13:50 +01:00
ddb5xxx [SERIAL] typo: buad -> baud 2006-06-05 10:45:30 +01:00
dec [MIPS] Rewrite all the assembler interrupt handlers to C. 2006-04-19 04:14:21 +02:00
galileo-boards/ev96100 [MIPS] Rewrite all the assembler interrupt handlers to C. 2006-04-19 04:14:21 +02:00
gt64120 [SERIAL] typo: buad -> baud 2006-06-05 10:45:30 +01:00
ite-boards [SERIAL] typo: buad -> baud 2006-06-05 10:45:30 +01:00
jazz [MIPS] Rewrite all the assembler interrupt handlers to C. 2006-04-19 04:14:21 +02:00
jmr3927 [MIPS] Rewrite all the assembler interrupt handlers to C. 2006-04-19 04:14:21 +02:00
kernel [MIPS] Fix fpu_save_double on 64-bit. 2006-06-19 17:39:13 +01:00
lasat [MIPS] Rewrite all the assembler interrupt handlers to C. 2006-04-19 04:14:21 +02:00
lib [MIPS] Fix optimization for size build. 2006-06-19 17:39:16 +01:00
lib-32 [MIPS] Fix dump_tlb.c warning and cleanup. 2006-02-07 13:30:26 +00:00
lib-64 Fixup a few lose ends in explicit support for MIPS R1/R2. 2005-10-29 19:32:37 +01:00
math-emu [MIPS] Fix compiler warnings (field width, unused variable) 2006-06-06 00:15:20 +01:00
mips-boards [MIPS] Malta: Handle byteswapping hardare bug in big endian mode. 2006-06-19 17:39:13 +01:00
mm [MIPS] Fix sparsemem support. 2006-06-06 00:15:20 +01:00
momentum [SERIAL] typo: buad -> baud 2006-06-05 10:45:30 +01:00
oprofile [MIPS] Fix modpost warning: Rename op_model_xxx to op_model_xxx_ops. 2006-06-06 00:15:11 +01:00
pci [MIPS] War on whitespace: cleanup initial spaces followed by tabs. 2006-03-21 13:27:47 +00:00
philips/pnx8550 [MIPS] Rewrite all the assembler interrupt handlers to C. 2006-04-19 04:14:21 +02:00
pmc-sierra [MIPS] Rewrite all the assembler interrupt handlers to C. 2006-04-19 04:14:21 +02:00
qemu [MIPS] Rewrite all the assembler interrupt handlers to C. 2006-04-19 04:14:21 +02:00
sgi-ip22 [MIPS] Rewrite all the assembler interrupt handlers to C. 2006-04-19 04:14:21 +02:00
sgi-ip27 [MIPS] Fix ip27 build. 2006-04-27 15:13:49 +01:00
sgi-ip32 [MIPS] IP32: Fix warnings. 2006-06-06 00:15:19 +01:00
sibyte [PATCH] Fix BCM1480 doubled process accounting times. 2006-06-19 17:39:16 +01:00
sni [MIPS] Rewrite all the assembler interrupt handlers to C. 2006-04-19 04:14:21 +02:00
tx4927 [MIPS] Rewrite all the assembler interrupt handlers to C. 2006-04-19 04:14:21 +02:00
tx4938 [MIPS] Rewrite all the assembler interrupt handlers to C. 2006-04-19 04:14:21 +02:00
vr41xx [MIPS] Fix VR41xx build errors. 2006-04-19 04:14:22 +02:00
defconfig [MIPS] Update MIPS defconfigs. 2006-04-27 15:13:50 +01:00
Kconfig [MIPS] Mark PNX8550 support broken. 2006-06-19 17:39:16 +01:00
Kconfig.debug [MIPS] Kconfig: Clarify description of CROSSCOMPILE. 2006-04-27 15:13:50 +01:00
Makefile [MIPS] Fix optimization for size build. 2006-06-19 17:39:16 +01:00