From f5899b5d4fa806403f547dc41312d017d94ec273 Mon Sep 17 00:00:00 2001 From: John Hawkes Date: Fri, 16 Dec 2005 10:00:24 -0800 Subject: [IA64] disable preemption in udelay() The udelay() inline for ia64 uses the ITC. If CONFIG_PREEMPT is enabled and the platform has unsynchronized ITCs and the calling task migrates to another CPU while doing the udelay loop, then the effective delay may be too short or very, very long. This patch disables preemption around 100 usec chunks of the overall desired udelay time. This minimizes preemption-holdoffs. udelay() is now too big to be inline, move it out of line and export it. Signed-off-by: John Hawkes Signed-off-by: Tony Luck --- include/asm-ia64/delay.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'include') diff --git a/include/asm-ia64/delay.h b/include/asm-ia64/delay.h index 57182d6f2b9a..bba702076391 100644 --- a/include/asm-ia64/delay.h +++ b/include/asm-ia64/delay.h @@ -84,14 +84,6 @@ __delay (unsigned long loops) ia64_delay_loop (loops - 1); } -static __inline__ void -udelay (unsigned long usecs) -{ - unsigned long start = ia64_get_itc(); - unsigned long cycles = usecs*local_cpu_data->cyc_per_usec; - - while (ia64_get_itc() - start < cycles) - cpu_relax(); -} +extern void udelay (unsigned long usecs); #endif /* _ASM_IA64_DELAY_H */ -- cgit v1.2.3 From dc86e88c2bb8a7603ee175fbb6a9e92cf3293dd8 Mon Sep 17 00:00:00 2001 From: Christoph Lameter Date: Mon, 12 Dec 2005 09:34:32 -0800 Subject: [IA64] Add __read_mostly support for IA64 sparc64, i386 and x86_64 have support for a special data section dedicated to rarely updated data that is frequently read. The section was created to avoid false sharing of those rarely read data with frequently written kernel data. This patch creates such a data section for ia64 and will group rarely written data into this section. Signed-off-by: Christoph Lameter Signed-off-by: Tony Luck --- include/linux/cache.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/cache.h b/include/linux/cache.h index f6b5a46c5f82..0b7ecf3af78a 100644 --- a/include/linux/cache.h +++ b/include/linux/cache.h @@ -13,7 +13,7 @@ #define SMP_CACHE_BYTES L1_CACHE_BYTES #endif -#if defined(CONFIG_X86) || defined(CONFIG_SPARC64) +#if defined(CONFIG_X86) || defined(CONFIG_SPARC64) || defined(CONFIG_IA64) #define __read_mostly __attribute__((__section__(".data.read_mostly"))) #else #define __read_mostly -- cgit v1.2.3