From efb9ca08b5a2374b29938cdcab417ce4feb14b54 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Thu, 8 Nov 2007 11:37:47 +0000 Subject: [MIPS] Change get_cycles to always return 0. This avoids us executing an mfc0 c0_count instruction on processors which don't have but also on certain R4000 and R4400 versions where reading from the count register just in the very moment when its value equals c0_compare will result in the timer interrupt getting lost. There is still a number of users of get_cycles remaining outside the arch code: crypto/tcrypt.c: start = get_cycles(); crypto/tcrypt.c: end = get_cycles(); crypto/tcrypt.c: start = get_cycles(); crypto/tcrypt.c: end = get_cycles(); crypto/tcrypt.c: start = get_cycles(); crypto/tcrypt.c: end = get_cycles(); drivers/char/hangcheck-timer.c: return get_cycles(); drivers/char/hangcheck-timer.c: printk("Hangcheck: Using get_cycles().\n"); drivers/char/random.c: sample.cycles = get_cycles(); drivers/input/joystick/analog.c:#define GET_TIME(x) do { x = get_cycles(); } include/linux/arcdevice.h: _x = get_cycles(); \ include/linux/arcdevice.h: _y = get_cycles(); \ mm/slub.c: if (!s->defrag_ratio || get_cycles() % 1024 > s->defrag_ratio) mm/slub.c: p += 64 + (get_cycles() & 0xff) * sizeof(void *); Signed-off-by: Ralf Baechle --- include/asm-mips/timex.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm-mips/timex.h b/include/asm-mips/timex.h index 5816ad1569d..6529704aa73 100644 --- a/include/asm-mips/timex.h +++ b/include/asm-mips/timex.h @@ -35,7 +35,7 @@ typedef unsigned int cycles_t; static inline cycles_t get_cycles(void) { - return read_c0_count(); + return 0; } #endif /* __KERNEL__ */ -- cgit v1.2.3 From f6771dbb27c704ce837ba3bb1dcaa53f48f76ea8 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Thu, 8 Nov 2007 18:02:29 +0000 Subject: [MIPS] Fix shadow register support. Shadow register support would not possibly have worked on multicore systems. The support code for it was also depending not on MIPS R2 but VSMP or SMTC kernels even though it makes perfect sense with UP kernels. SR sets are a scarce resource and the expected usage pattern is that users actually hardcode the register set numbers in their code. So fix the allocator by ditching it. Move the remaining CPU probe bits into the generic CPU probe. Signed-off-by: Ralf Baechle --- include/asm-mips/cpu-info.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/asm-mips/cpu-info.h b/include/asm-mips/cpu-info.h index 94f1c817236..ed5c02c6afb 100644 --- a/include/asm-mips/cpu-info.h +++ b/include/asm-mips/cpu-info.h @@ -54,6 +54,7 @@ struct cpuinfo_mips { struct cache_desc dcache; /* Primary D or combined I/D cache */ struct cache_desc scache; /* Secondary cache */ struct cache_desc tcache; /* Tertiary/split secondary cache */ + int srsets; /* Shadow register sets */ #if defined(CONFIG_MIPS_MT_SMTC) /* * In the MIPS MT "SMTC" model, each TC is considered -- cgit v1.2.3 From 89becf5c0d9019f4f9300840f08a98ee33d57d37 Mon Sep 17 00:00:00 2001 From: Yoichi Yuasa Date: Fri, 9 Nov 2007 18:42:35 +0900 Subject: [MIPS] Lasat: Fix overlap of interrupt number ranges. The range of MIPS_CPU IRQ and the range of LASAT IRQ overlap. Signed-off-by: Yoichi Yuasa Signed-off-by: Ralf Baechle --- include/asm-mips/lasat/lasatint.h | 5 ----- include/asm-mips/mach-lasat/irq.h | 13 +++++++++++++ 2 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 include/asm-mips/mach-lasat/irq.h (limited to 'include') diff --git a/include/asm-mips/lasat/lasatint.h b/include/asm-mips/lasat/lasatint.h index 581dc45685a..e0d2458b43d 100644 --- a/include/asm-mips/lasat/lasatint.h +++ b/include/asm-mips/lasat/lasatint.h @@ -1,11 +1,6 @@ #ifndef __ASM_LASAT_LASATINT_H #define __ASM_LASAT_LASATINT_H -#include - -#define LASATINT_BASE MIPS_CPU_IRQ_BASE -#define LASATINT_END (LASATINT_BASE + 16) - /* lasat 100 */ #define LASAT_INT_STATUS_REG_100 (KSEG1ADDR(0x1c880000)) #define LASAT_INT_MASK_REG_100 (KSEG1ADDR(0x1c890000)) diff --git a/include/asm-mips/mach-lasat/irq.h b/include/asm-mips/mach-lasat/irq.h new file mode 100644 index 00000000000..da75f89f372 --- /dev/null +++ b/include/asm-mips/mach-lasat/irq.h @@ -0,0 +1,13 @@ +#ifndef _ASM_MACH_LASAT_IRQ_H +#define _ASM_MACH_LASAT_IRQ_H + +#define LASAT_CASCADE_IRQ (MIPS_CPU_IRQ_BASE + 0) + +#define LASAT_IRQ_BASE 8 +#define LASAT_IRQ_END 23 + +#define NR_IRQS 24 + +#include_next + +#endif /* _ASM_MACH_LASAT_IRQ_H */ -- cgit v1.2.3