diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/arch/alpha/kernel/irq.c working-2.5.2-pre10-cachealign/arch/alpha/kernel/irq.c --- linux-2.5.2-pre10/arch/alpha/kernel/irq.c Mon Dec 17 16:09:00 2001 +++ working-2.5.2-pre10-cachealign/arch/alpha/kernel/irq.c Tue Jan 8 14:19:33 2002 @@ -33,7 +33,7 @@ /* * Controller mappings for all interrupt sources: */ -irq_desc_t irq_desc[NR_IRQS] __cacheline_aligned = { +irq_desc_t irq_desc[NR_IRQS] __aligned_section = { [0 ... NR_IRQS-1] = { 0, &no_irq_type, NULL, 0, SPIN_LOCK_UNLOCKED} }; diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/arch/alpha/kernel/smp.c working-2.5.2-pre10-cachealign/arch/alpha/kernel/smp.c --- linux-2.5.2-pre10/arch/alpha/kernel/smp.c Tue Jan 8 11:49:16 2002 +++ working-2.5.2-pre10-cachealign/arch/alpha/kernel/smp.c Tue Jan 8 14:19:33 2002 @@ -57,8 +57,8 @@ /* A collection of single bit ipi messages. */ static struct { - unsigned long bits ____cacheline_aligned; -} ipi_data[NR_CPUS] __cacheline_aligned; + unsigned long bits __aligned_type; +} ipi_data[NR_CPUS] __aligned_section; enum ipi_message_type { IPI_RESCHEDULE, diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/arch/i386/kernel/init_task.c working-2.5.2-pre10-cachealign/arch/i386/kernel/init_task.c --- linux-2.5.2-pre10/arch/i386/kernel/init_task.c Tue Sep 18 08:29:09 2001 +++ working-2.5.2-pre10-cachealign/arch/i386/kernel/init_task.c Tue Jan 8 14:19:33 2002 @@ -29,5 +29,5 @@ * section. Since TSS's are completely CPU-local, we want them * on exact cacheline boundaries, to eliminate cacheline ping-pong. */ -struct tss_struct init_tss[NR_CPUS] __cacheline_aligned = { [0 ... NR_CPUS-1] = INIT_TSS }; +struct tss_struct init_tss[NR_CPUS] __aligned_section = { [0 ... NR_CPUS-1] = INIT_TSS }; diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/arch/i386/kernel/irq.c working-2.5.2-pre10-cachealign/arch/i386/kernel/irq.c --- linux-2.5.2-pre10/arch/i386/kernel/irq.c Mon Dec 17 16:09:00 2001 +++ working-2.5.2-pre10-cachealign/arch/i386/kernel/irq.c Tue Jan 8 14:19:33 2002 @@ -66,7 +66,7 @@ /* * Controller mappings for all interrupt sources: */ -irq_desc_t irq_desc[NR_IRQS] __cacheline_aligned = +irq_desc_t irq_desc[NR_IRQS] __aligned_section = { [0 ... NR_IRQS-1] = { 0, &no_irq_type, NULL, 0, SPIN_LOCK_UNLOCKED}}; static void register_irq_proc (unsigned int irq); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/arch/ia64/kernel/irq.c working-2.5.2-pre10-cachealign/arch/ia64/kernel/irq.c --- linux-2.5.2-pre10/arch/ia64/kernel/irq.c Mon Dec 17 16:09:00 2001 +++ working-2.5.2-pre10-cachealign/arch/ia64/kernel/irq.c Tue Jan 8 14:19:33 2002 @@ -65,7 +65,7 @@ /* * Controller mappings for all interrupt sources: */ -irq_desc_t _irq_desc[NR_IRQS] __cacheline_aligned = +irq_desc_t _irq_desc[NR_IRQS] __aligned_section = { [0 ... NR_IRQS-1] = { IRQ_DISABLED, &no_irq_type, NULL, 0, SPIN_LOCK_UNLOCKED}}; static void register_irq_proc (unsigned int irq); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/arch/ia64/kernel/perfmon.c working-2.5.2-pre10-cachealign/arch/ia64/kernel/perfmon.c --- linux-2.5.2-pre10/arch/ia64/kernel/perfmon.c Tue Nov 27 16:53:28 2001 +++ working-2.5.2-pre10-cachealign/arch/ia64/kernel/perfmon.c Tue Jan 8 14:19:33 2002 @@ -276,7 +276,7 @@ struct { struct task_struct *owner; -} ____cacheline_aligned pmu_owners[NR_CPUS]; +} __aligned_type pmu_owners[NR_CPUS]; /* diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/arch/mips/kernel/irq.c working-2.5.2-pre10-cachealign/arch/mips/kernel/irq.c --- linux-2.5.2-pre10/arch/mips/kernel/irq.c Mon Dec 17 16:09:00 2001 +++ working-2.5.2-pre10-cachealign/arch/mips/kernel/irq.c Tue Jan 8 14:19:33 2002 @@ -24,7 +24,7 @@ /* * Controller mappings for all interrupt sources: */ -irq_desc_t irq_desc[NR_IRQS] __cacheline_aligned = +irq_desc_t irq_desc[NR_IRQS] __aligned_section = { [0 ... NR_IRQS-1] = { 0, &no_irq_type, NULL, 0, SPIN_LOCK_UNLOCKED}}; /* diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/arch/ppc/kernel/irq.c working-2.5.2-pre10-cachealign/arch/ppc/kernel/irq.c --- linux-2.5.2-pre10/arch/ppc/kernel/irq.c Mon Dec 17 16:09:01 2001 +++ working-2.5.2-pre10-cachealign/arch/ppc/kernel/irq.c Tue Jan 8 14:19:33 2002 @@ -75,7 +75,7 @@ #define MAXCOUNT 10000000 -irq_desc_t irq_desc[NR_IRQS] __cacheline_aligned = +irq_desc_t irq_desc[NR_IRQS] __aligned_section = { [0 ... NR_IRQS-1] = { 0, NULL, NULL, 0, SPIN_LOCK_UNLOCKED}}; int ppc_spurious_interrupts = 0; diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/arch/sh/kernel/irq.c working-2.5.2-pre10-cachealign/arch/sh/kernel/irq.c --- linux-2.5.2-pre10/arch/sh/kernel/irq.c Mon Dec 17 16:09:01 2001 +++ working-2.5.2-pre10-cachealign/arch/sh/kernel/irq.c Tue Jan 8 14:19:33 2002 @@ -40,7 +40,7 @@ /* * Controller mappings for all interrupt sources: */ -irq_desc_t irq_desc[NR_IRQS] __cacheline_aligned = +irq_desc_t irq_desc[NR_IRQS] __aligned_section = { [0 ... NR_IRQS-1] = { 0, &no_irq_type, }}; /* diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/drivers/net/acenic.h working-2.5.2-pre10-cachealign/drivers/net/acenic.h --- linux-2.5.2-pre10/drivers/net/acenic.h Tue Nov 27 16:53:30 2001 +++ working-2.5.2-pre10-cachealign/drivers/net/acenic.h Tue Jan 8 14:19:33 2002 @@ -647,7 +647,7 @@ * RX elements */ unsigned long std_refill_busy - __attribute__ ((aligned (SMP_CACHE_BYTES))); + __aligned_type; unsigned long mini_refill_busy, jumbo_refill_busy; atomic_t cur_rx_bufs; atomic_t cur_mini_bufs; @@ -682,7 +682,7 @@ char name[48]; #ifdef INDEX_DEBUG spinlock_t debug_lock - __attribute__ ((aligned (SMP_CACHE_BYTES)));; + __aligned_type; u32 last_tx, last_std_rx, last_mini_rx; #endif struct net_device_stats stats; diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/fs/block_dev.c working-2.5.2-pre10-cachealign/fs/block_dev.c --- linux-2.5.2-pre10/fs/block_dev.c Tue Jan 8 11:49:26 2002 +++ working-2.5.2-pre10-cachealign/fs/block_dev.c Tue Jan 8 14:19:33 2002 @@ -254,7 +254,7 @@ #define HASH_SIZE (1UL << HASH_BITS) #define HASH_MASK (HASH_SIZE-1) static struct list_head bdev_hashtable[HASH_SIZE]; -static spinlock_t bdev_lock __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED; +static spinlock_t bdev_lock __cacheline_aligned = SPIN_LOCK_UNLOCKED; static kmem_cache_t * bdev_cachep; #define alloc_bdev() \ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/fs/buffer.c working-2.5.2-pre10-cachealign/fs/buffer.c --- linux-2.5.2-pre10/fs/buffer.c Tue Jan 8 11:49:26 2002 +++ working-2.5.2-pre10-cachealign/fs/buffer.c Tue Jan 8 14:19:33 2002 @@ -74,7 +74,7 @@ static rwlock_t hash_table_lock = RW_LOCK_UNLOCKED; static struct buffer_head *lru_list[NR_LIST]; -static spinlock_t lru_list_lock __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED; +static spinlock_t lru_list_lock __cacheline_aligned = SPIN_LOCK_UNLOCKED; static int nr_buffers_type[NR_LIST]; static unsigned long size_buffers_type[NR_LIST]; diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/fs/dcache.c working-2.5.2-pre10-cachealign/fs/dcache.c --- linux-2.5.2-pre10/fs/dcache.c Mon Dec 17 16:09:10 2001 +++ working-2.5.2-pre10-cachealign/fs/dcache.c Tue Jan 8 14:19:33 2002 @@ -29,7 +29,7 @@ #define DCACHE_PARANOIA 1 /* #define DCACHE_DEBUG 1 */ -spinlock_t dcache_lock __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED; +spinlock_t dcache_lock __cacheline_aligned = SPIN_LOCK_UNLOCKED; /* Right now the dcache depends on the kernel lock */ #define check_lock() if (!kernel_locked()) BUG() diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/include/asm-alpha/cache.h working-2.5.2-pre10-cachealign/include/asm-alpha/cache.h --- linux-2.5.2-pre10/include/asm-alpha/cache.h Fri Oct 5 11:47:08 2001 +++ working-2.5.2-pre10-cachealign/include/asm-alpha/cache.h Tue Jan 8 14:19:33 2002 @@ -18,7 +18,4 @@ # define L1_CACHE_SHIFT 5 #endif -#define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) -#define SMP_CACHE_BYTES L1_CACHE_BYTES - #endif diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/include/asm-alpha/hardirq.h working-2.5.2-pre10-cachealign/include/asm-alpha/hardirq.h --- linux-2.5.2-pre10/include/asm-alpha/hardirq.h Tue Jul 10 07:47:39 2001 +++ working-2.5.2-pre10-cachealign/include/asm-alpha/hardirq.h Tue Jan 8 14:19:33 2002 @@ -11,7 +11,7 @@ unsigned int __local_bh_count; unsigned int __syscall_count; struct task_struct * __ksoftirqd_task; -} ____cacheline_aligned irq_cpustat_t; +} __aligned_type irq_cpustat_t; #include /* Standard mappings for irq_cpustat_t above */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/include/asm-arm/cache.h working-2.5.2-pre10-cachealign/include/asm-arm/cache.h --- linux-2.5.2-pre10/include/asm-arm/cache.h Tue Sep 19 09:15:23 2000 +++ working-2.5.2-pre10-cachealign/include/asm-arm/cache.h Tue Jan 8 14:19:33 2002 @@ -5,15 +5,4 @@ #define __ASMARM_CACHE_H #define L1_CACHE_BYTES 32 -#define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) -#define SMP_CACHE_BYTES L1_CACHE_BYTES - -#ifdef MODULE -#define __cacheline_aligned __attribute__((__aligned__(L1_CACHE_BYTES))) -#else -#define __cacheline_aligned \ - __attribute__((__aligned__(L1_CACHE_BYTES), \ - __section__(".data.cacheline_aligned"))) -#endif - #endif diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/include/asm-arm/hardirq.h working-2.5.2-pre10-cachealign/include/asm-arm/hardirq.h --- linux-2.5.2-pre10/include/asm-arm/hardirq.h Fri Oct 12 02:04:57 2001 +++ working-2.5.2-pre10-cachealign/include/asm-arm/hardirq.h Tue Jan 8 14:19:33 2002 @@ -12,7 +12,7 @@ unsigned int __local_bh_count; unsigned int __syscall_count; struct task_struct * __ksoftirqd_task; /* waitqueue is too large */ -} ____cacheline_aligned irq_cpustat_t; +} __aligned_type irq_cpustat_t; #include /* Standard mappings for irq_cpustat_t above */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/include/asm-cris/hardirq.h working-2.5.2-pre10-cachealign/include/asm-cris/hardirq.h --- linux-2.5.2-pre10/include/asm-cris/hardirq.h Fri Jul 27 08:10:07 2001 +++ working-2.5.2-pre10-cachealign/include/asm-cris/hardirq.h Tue Jan 8 14:19:33 2002 @@ -12,7 +12,7 @@ unsigned int __local_bh_count; unsigned int __syscall_count; struct task_struct * __ksoftirqd_task; /* waitqueue is too large */ -} ____cacheline_aligned irq_cpustat_t; +} __aligned_type irq_cpustat_t; #include /* Standard mappings for irq_cpustat_t above */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/include/asm-i386/hardirq.h working-2.5.2-pre10-cachealign/include/asm-i386/hardirq.h --- linux-2.5.2-pre10/include/asm-i386/hardirq.h Tue Nov 27 16:53:39 2001 +++ working-2.5.2-pre10-cachealign/include/asm-i386/hardirq.h Tue Jan 8 14:19:33 2002 @@ -13,7 +13,7 @@ unsigned int __syscall_count; struct task_struct * __ksoftirqd_task; /* waitqueue is too large */ unsigned int __nmi_count; /* arch dependent */ -} ____cacheline_aligned irq_cpustat_t; +} __aligned_type irq_cpustat_t; #include /* Standard mappings for irq_cpustat_t above */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/include/asm-i386/processor.h working-2.5.2-pre10-cachealign/include/asm-i386/processor.h --- linux-2.5.2-pre10/include/asm-i386/processor.h Tue Nov 27 16:53:39 2001 +++ working-2.5.2-pre10-cachealign/include/asm-i386/processor.h Tue Jan 8 14:19:33 2002 @@ -53,7 +53,7 @@ unsigned long *pmd_quick; unsigned long *pte_quick; unsigned long pgtable_cache_sz; -} __attribute__((__aligned__(SMP_CACHE_BYTES))); +} __aligned_type; #define X86_VENDOR_INTEL 0 #define X86_VENDOR_CYRIX 1 diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/include/asm-m68k/hardirq.h working-2.5.2-pre10-cachealign/include/asm-m68k/hardirq.h --- linux-2.5.2-pre10/include/asm-m68k/hardirq.h Tue Nov 6 11:41:42 2001 +++ working-2.5.2-pre10-cachealign/include/asm-m68k/hardirq.h Tue Jan 8 14:19:33 2002 @@ -11,7 +11,7 @@ unsigned int __local_bh_count; unsigned int __syscall_count; struct task_struct * __ksoftirqd_task; -} ____cacheline_aligned irq_cpustat_t; +} __aligned_type irq_cpustat_t; #include /* Standard mappings for irq_cpustat_t above */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/include/asm-mips/cache.h working-2.5.2-pre10-cachealign/include/asm-mips/cache.h --- linux-2.5.2-pre10/include/asm-mips/cache.h Tue Jul 3 06:56:40 2001 +++ working-2.5.2-pre10-cachealign/include/asm-mips/cache.h Tue Jan 8 14:19:33 2002 @@ -34,6 +34,4 @@ #define L1_CACHE_BYTES 32 /* A guess */ #endif -#define SMP_CACHE_BYTES L1_CACHE_BYTES - #endif /* _ASM_CACHE_H */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/include/asm-mips/hardirq.h working-2.5.2-pre10-cachealign/include/asm-mips/hardirq.h --- linux-2.5.2-pre10/include/asm-mips/hardirq.h Mon Sep 10 03:43:01 2001 +++ working-2.5.2-pre10-cachealign/include/asm-mips/hardirq.h Tue Jan 8 14:19:33 2002 @@ -21,7 +21,7 @@ unsigned int __local_bh_count; unsigned int __syscall_count; struct task_struct * __ksoftirqd_task; /* waitqueue is too large */ -} ____cacheline_aligned irq_cpustat_t; +} __aligned_type irq_cpustat_t; #include /* Standard mappings for irq_cpustat_t above */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/include/asm-mips64/hardirq.h working-2.5.2-pre10-cachealign/include/asm-mips64/hardirq.h --- linux-2.5.2-pre10/include/asm-mips64/hardirq.h Mon Sep 10 03:43:02 2001 +++ working-2.5.2-pre10-cachealign/include/asm-mips64/hardirq.h Tue Jan 8 14:19:33 2002 @@ -20,7 +20,7 @@ unsigned int __local_bh_count; unsigned int __syscall_count; struct task_struct * __ksoftirqd_task; /* waitqueue is too large */ -} ____cacheline_aligned irq_cpustat_t; +} __aligned_type irq_cpustat_t; #include /* Standard mappings for irq_cpustat_t above */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/include/asm-parisc/cache.h working-2.5.2-pre10-cachealign/include/asm-parisc/cache.h --- linux-2.5.2-pre10/include/asm-parisc/cache.h Thu Dec 7 06:46:39 2000 +++ working-2.5.2-pre10-cachealign/include/asm-parisc/cache.h Tue Jan 8 14:19:33 2002 @@ -31,12 +31,6 @@ #define L1_CACHE_BYTES 32 #endif -#define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) - -#define SMP_CACHE_BYTES L1_CACHE_BYTES - -#define __cacheline_aligned __attribute__((__aligned__(L1_CACHE_BYTES))) - extern void init_cache(void); /* initializes cache-flushing */ extern void flush_data_cache(void); /* flushes data-cache only */ extern void flush_instruction_cache(void);/* flushes code-cache only */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/include/asm-parisc/hardirq.h working-2.5.2-pre10-cachealign/include/asm-parisc/hardirq.h --- linux-2.5.2-pre10/include/asm-parisc/hardirq.h Wed Dec 6 07:29:39 2000 +++ working-2.5.2-pre10-cachealign/include/asm-parisc/hardirq.h Tue Jan 8 14:19:33 2002 @@ -16,7 +16,7 @@ unsigned int __local_irq_count; unsigned int __local_bh_count; unsigned int __syscall_count; -} ____cacheline_aligned irq_cpustat_t; +} __aligned_type irq_cpustat_t; #include /* Standard mappings for irq_cpustat_t above */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/include/asm-ppc/cache.h working-2.5.2-pre10-cachealign/include/asm-ppc/cache.h --- linux-2.5.2-pre10/include/asm-ppc/cache.h Mon Jan 7 10:38:25 2002 +++ working-2.5.2-pre10-cachealign/include/asm-ppc/cache.h Tue Jan 8 14:19:33 2002 @@ -27,18 +27,7 @@ #endif #define L1_CACHE_BYTES L1_CACHE_LINE_SIZE -#define SMP_CACHE_BYTES L1_CACHE_BYTES - -#define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) #define L1_CACHE_PAGES 8 - -#ifdef MODULE -#define __cacheline_aligned __attribute__((__aligned__(L1_CACHE_BYTES))) -#else -#define __cacheline_aligned \ - __attribute__((__aligned__(L1_CACHE_BYTES), \ - __section__(".data.cacheline_aligned"))) -#endif #if defined(__KERNEL__) && !defined(__ASSEMBLY__) extern void flush_dcache_range(unsigned long start, unsigned long stop); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/include/asm-ppc/hardirq.h working-2.5.2-pre10-cachealign/include/asm-ppc/hardirq.h --- linux-2.5.2-pre10/include/asm-ppc/hardirq.h Mon Jan 7 10:38:26 2002 +++ working-2.5.2-pre10-cachealign/include/asm-ppc/hardirq.h Tue Jan 8 14:19:33 2002 @@ -21,7 +21,7 @@ unsigned int __syscall_count; struct task_struct * __ksoftirqd_task; unsigned int __last_jiffy_stamp; -} ____cacheline_aligned irq_cpustat_t; +} __aligned_type irq_cpustat_t; #include /* Standard mappings for irq_cpustat_t above */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/include/asm-s390/hardirq.h working-2.5.2-pre10-cachealign/include/asm-s390/hardirq.h --- linux-2.5.2-pre10/include/asm-s390/hardirq.h Thu Jul 26 07:12:02 2001 +++ working-2.5.2-pre10-cachealign/include/asm-s390/hardirq.h Tue Jan 8 14:19:33 2002 @@ -24,7 +24,7 @@ unsigned int __local_bh_count; unsigned int __syscall_count; struct task_struct * __ksoftirqd_task; /* waitqueue is too large */ -} ____cacheline_aligned irq_cpustat_t; +} __aligned_type irq_cpustat_t; #include /* Standard mappings for irq_cpustat_t above */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/include/asm-s390/init.h working-2.5.2-pre10-cachealign/include/asm-s390/init.h --- linux-2.5.2-pre10/include/asm-s390/init.h Thu Jul 26 07:12:02 2001 +++ working-2.5.2-pre10-cachealign/include/asm-s390/init.h Tue Jan 8 14:19:33 2002 @@ -22,8 +22,5 @@ #define __FINIT .previous #define __INITDATA .section ".data.init",#alloc,#write */ - -#define __cacheline_aligned __attribute__ ((__aligned__(256))) - #endif diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/include/asm-s390x/hardirq.h working-2.5.2-pre10-cachealign/include/asm-s390x/hardirq.h --- linux-2.5.2-pre10/include/asm-s390x/hardirq.h Thu Jul 26 07:12:02 2001 +++ working-2.5.2-pre10-cachealign/include/asm-s390x/hardirq.h Tue Jan 8 14:19:33 2002 @@ -24,7 +24,7 @@ unsigned int __local_bh_count; unsigned int __syscall_count; struct task_struct * __ksoftirqd_task; /* waitqueue is too large */ -} ____cacheline_aligned irq_cpustat_t; +} __aligned_type irq_cpustat_t; #include /* Standard mappings for irq_cpustat_t above */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/include/asm-s390x/init.h working-2.5.2-pre10-cachealign/include/asm-s390x/init.h --- linux-2.5.2-pre10/include/asm-s390x/init.h Thu Jul 26 07:12:02 2001 +++ working-2.5.2-pre10-cachealign/include/asm-s390x/init.h Tue Jan 8 14:19:33 2002 @@ -23,7 +23,5 @@ #define __INITDATA .section ".data.init",#alloc,#write */ -#define __cacheline_aligned __attribute__ ((__aligned__(256))) - #endif diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/include/asm-sh/hardirq.h working-2.5.2-pre10-cachealign/include/asm-sh/hardirq.h --- linux-2.5.2-pre10/include/asm-sh/hardirq.h Sun Sep 9 05:29:09 2001 +++ working-2.5.2-pre10-cachealign/include/asm-sh/hardirq.h Tue Jan 8 14:19:33 2002 @@ -11,7 +11,7 @@ unsigned int __local_bh_count; unsigned int __syscall_count; struct task_struct * __ksoftirqd_task; -} ____cacheline_aligned irq_cpustat_t; +} __aligned_type irq_cpustat_t; #include /* Standard mappings for irq_cpustat_t above */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/include/asm-sparc/cache.h working-2.5.2-pre10-cachealign/include/asm-sparc/cache.h --- linux-2.5.2-pre10/include/asm-sparc/cache.h Wed Sep 1 04:23:30 1999 +++ working-2.5.2-pre10-cachealign/include/asm-sparc/cache.h Tue Jan 8 14:19:33 2002 @@ -11,17 +11,6 @@ #include #define L1_CACHE_BYTES 32 -#define L1_CACHE_ALIGN(x) ((((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1))) - -#define SMP_CACHE_BYTES 32 - -#ifdef MODULE -#define __cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES))) -#else -#define __cacheline_aligned \ - __attribute__((__aligned__(SMP_CACHE_BYTES), \ - __section__(".data.cacheline_aligned"))) -#endif /* Direct access to the instruction cache is provided through and * alternate address space. The IDC bit must be off in the ICCR on diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/include/asm-sparc/hardirq.h working-2.5.2-pre10-cachealign/include/asm-sparc/hardirq.h --- linux-2.5.2-pre10/include/asm-sparc/hardirq.h Tue Jul 10 07:47:39 2001 +++ working-2.5.2-pre10-cachealign/include/asm-sparc/hardirq.h Tue Jan 8 14:19:33 2002 @@ -24,7 +24,7 @@ unsigned int __local_bh_count; unsigned int __syscall_count; struct task_struct * __ksoftirqd_task; -} ____cacheline_aligned irq_cpustat_t; +} __aligned_type irq_cpustat_t; #include /* Standard mappings for irq_cpustat_t above */ /* Note that local_irq_count() is replaced by sparc64 specific version for SMP */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/include/asm-sparc64/cache.h working-2.5.2-pre10-cachealign/include/asm-sparc64/cache.h --- linux-2.5.2-pre10/include/asm-sparc64/cache.h Thu Oct 18 07:16:39 2001 +++ working-2.5.2-pre10-cachealign/include/asm-sparc64/cache.h Tue Jan 8 14:19:33 2002 @@ -7,17 +7,7 @@ /* bytes per L1 cache line */ #define L1_CACHE_BYTES 32 /* Two 16-byte sub-blocks per line. */ -#define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) - #define SMP_CACHE_BYTES_SHIFT 6 #define SMP_CACHE_BYTES (1 << SMP_CACHE_BYTES_SHIFT) /* L2 cache line size. */ - -#ifdef MODULE -#define __cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES))) -#else -#define __cacheline_aligned \ - __attribute__((__aligned__(SMP_CACHE_BYTES), \ - __section__(".data.cacheline_aligned"))) -#endif #endif diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/include/asm-sparc64/hardirq.h working-2.5.2-pre10-cachealign/include/asm-sparc64/hardirq.h --- linux-2.5.2-pre10/include/asm-sparc64/hardirq.h Thu Oct 18 07:16:39 2001 +++ working-2.5.2-pre10-cachealign/include/asm-sparc64/hardirq.h Tue Jan 8 14:19:33 2002 @@ -24,7 +24,7 @@ unsigned int __local_bh_count; unsigned int __syscall_count; struct task_struct * __ksoftirqd_task; -} ____cacheline_aligned irq_cpustat_t; +} __aligned_type irq_cpustat_t; #include /* Standard mappings for irq_cpustat_t above */ /* Note that local_irq_count() is replaced by sparc64 specific version for SMP */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/include/linux/brlock.h working-2.5.2-pre10-cachealign/include/linux/brlock.h --- linux-2.5.2-pre10/include/linux/brlock.h Mon Jan 7 10:38:47 2002 +++ working-2.5.2-pre10-cachealign/include/linux/brlock.h Tue Jan 8 14:19:33 2002 @@ -68,7 +68,7 @@ #ifndef __BRLOCK_USE_ATOMICS struct br_wrlock { spinlock_t lock; -} __attribute__ ((__aligned__(SMP_CACHE_BYTES))); +} __aligned_type; extern struct br_wrlock __br_write_locks[__BR_IDX_MAX]; #endif diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/include/linux/cache.h working-2.5.2-pre10-cachealign/include/linux/cache.h --- linux-2.5.2-pre10/include/linux/cache.h Thu Dec 20 14:30:28 2001 +++ working-2.5.2-pre10-cachealign/include/linux/cache.h Tue Jan 8 14:19:33 2002 @@ -12,34 +12,25 @@ #define SMP_CACHE_BYTES L1_CACHE_BYTES #endif -#ifndef ____cacheline_aligned -#define ____cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES))) -#endif - -#ifndef ____cacheline_aligned_in_smp #ifdef CONFIG_SMP -#define ____cacheline_aligned_in_smp ____cacheline_aligned -#else -#define ____cacheline_aligned_in_smp -#endif /* CONFIG_SMP */ -#endif +/* Use this with types. */ +#define __aligned_type __attribute__((__aligned__(SMP_CACHE_BYTES))) -#ifndef __cacheline_aligned -#ifdef MODULE -#define __cacheline_aligned ____cacheline_aligned -#else +#ifndef MODULE +/* This with simple variables whose types are not aligned (not arrays!) */ #define __cacheline_aligned \ __attribute__((__aligned__(SMP_CACHE_BYTES), \ __section__(".data.cacheline_aligned"))) -#endif -#endif /* __cacheline_aligned */ - -#ifndef __cacheline_aligned_in_smp -#ifdef CONFIG_SMP -#define __cacheline_aligned_in_smp __cacheline_aligned +/* This is for variables whose types are declared __aligned_type */ +#define __aligned_section __attribute__((__section__(".data.cacheline_aligned"))) #else -#define __cacheline_aligned_in_smp -#endif /* CONFIG_SMP */ -#endif +#define __cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES))) +#define __aligned_section +#endif /* MODULE */ +#else +#define __aligned_type +#define __cacheline_aligned +#define __aligned_section +#endif /* !CONFIG_SMP */ #endif /* __LINUX_CACHE_H */ diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/include/linux/interrupt.h working-2.5.2-pre10-cachealign/include/linux/interrupt.h --- linux-2.5.2-pre10/include/linux/interrupt.h Tue Jan 8 11:49:33 2002 +++ working-2.5.2-pre10-cachealign/include/linux/interrupt.h Tue Jan 8 14:19:33 2002 @@ -127,7 +127,7 @@ struct tasklet_head { struct tasklet_struct *list; -} __attribute__ ((__aligned__(SMP_CACHE_BYTES))); +} __aligned_type; extern struct tasklet_head tasklet_vec[NR_CPUS]; extern struct tasklet_head tasklet_hi_vec[NR_CPUS]; diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/include/linux/irq.h working-2.5.2-pre10-cachealign/include/linux/irq.h --- linux-2.5.2-pre10/include/linux/irq.h Mon Jan 7 10:46:41 2002 +++ working-2.5.2-pre10-cachealign/include/linux/irq.h Tue Jan 8 14:19:33 2002 @@ -62,7 +62,7 @@ struct irqaction *action; /* IRQ action list */ unsigned int depth; /* nested irq disables */ spinlock_t lock; -} ____cacheline_aligned irq_desc_t; +} __aligned_type irq_desc_t; extern irq_desc_t irq_desc [NR_IRQS]; diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/include/linux/netdevice.h working-2.5.2-pre10-cachealign/include/linux/netdevice.h --- linux-2.5.2-pre10/include/linux/netdevice.h Mon Jan 7 10:40:13 2002 +++ working-2.5.2-pre10-cachealign/include/linux/netdevice.h Tue Jan 8 14:19:33 2002 @@ -161,7 +161,7 @@ unsigned fastroute_deferred_out; unsigned fastroute_latency_reduction; unsigned cpu_collision; -} __attribute__ ((__aligned__(SMP_CACHE_BYTES))); +} __aligned_type; extern struct netif_rx_stats netdev_rx_stat[]; @@ -478,7 +478,7 @@ struct sk_buff_head input_pkt_queue; struct net_device *output_queue; struct sk_buff *completion_queue; -} __attribute__((__aligned__(SMP_CACHE_BYTES))); +} __aligned_type; extern struct softnet_data softnet_data[NR_CPUS]; diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/include/net/route.h working-2.5.2-pre10-cachealign/include/net/route.h --- linux-2.5.2-pre10/include/net/route.h Mon Jan 7 10:40:25 2002 +++ working-2.5.2-pre10-cachealign/include/net/route.h Tue Jan 8 14:19:33 2002 @@ -109,7 +109,7 @@ unsigned int out_hit; unsigned int out_slow_tot; unsigned int out_slow_mc; -} ____cacheline_aligned_in_smp; +} __aligned_type; extern struct ip_rt_acct *ip_rt_acct; diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/include/net/snmp.h working-2.5.2-pre10-cachealign/include/net/snmp.h --- linux-2.5.2-pre10/include/net/snmp.h Mon Jan 7 10:40:25 2002 +++ working-2.5.2-pre10-cachealign/include/net/snmp.h Tue Jan 8 14:19:33 2002 @@ -62,7 +62,7 @@ unsigned long IpFragFails; unsigned long IpFragCreates; unsigned long __pad[0]; -} ____cacheline_aligned; +} __aligned_type; struct ipv6_mib { @@ -89,7 +89,7 @@ unsigned long Ip6InMcastPkts; unsigned long Ip6OutMcastPkts; unsigned long __pad[0]; -} ____cacheline_aligned; +} __aligned_type; struct icmp_mib { @@ -121,7 +121,7 @@ unsigned long IcmpOutAddrMaskReps; unsigned long dummy; unsigned long __pad[0]; -} ____cacheline_aligned; +} __aligned_type; struct icmpv6_mib { @@ -159,7 +159,7 @@ unsigned long Icmp6OutGroupMembResponses; unsigned long Icmp6OutGroupMembReductions; unsigned long __pad[0]; -} ____cacheline_aligned; +} __aligned_type; struct tcp_mib { @@ -178,7 +178,7 @@ unsigned long TcpInErrs; unsigned long TcpOutRsts; unsigned long __pad[0]; -} ____cacheline_aligned; +} __aligned_type; struct udp_mib { @@ -187,7 +187,7 @@ unsigned long UdpInErrors; unsigned long UdpOutDatagrams; unsigned long __pad[0]; -} ____cacheline_aligned; +} __aligned_type; struct linux_mib { @@ -257,7 +257,7 @@ unsigned long TCPAbortFailed; unsigned long TCPMemoryPressures; unsigned long __pad[0]; -} ____cacheline_aligned; +} __aligned_type; /* diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/include/net/tcp.h working-2.5.2-pre10-cachealign/include/net/tcp.h --- linux-2.5.2-pre10/include/net/tcp.h Mon Jan 7 10:40:25 2002 +++ working-2.5.2-pre10-cachealign/include/net/tcp.h Tue Jan 8 14:19:33 2002 @@ -117,8 +117,7 @@ * Now align to a new cache line as all the following members * are often dirty. */ - rwlock_t __tcp_lhash_lock - __attribute__((__aligned__(SMP_CACHE_BYTES))); + rwlock_t __tcp_lhash_lock __aligned_type; atomic_t __tcp_lhash_users; wait_queue_head_t __tcp_lhash_wait; spinlock_t __tcp_portalloc_lock; diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/kernel/fork.c working-2.5.2-pre10-cachealign/kernel/fork.c --- linux-2.5.2-pre10/kernel/fork.c Tue Jan 8 11:49:34 2002 +++ working-2.5.2-pre10-cachealign/kernel/fork.c Tue Jan 8 14:19:33 2002 @@ -208,7 +208,7 @@ return retval; } -spinlock_t mmlist_lock __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED; +spinlock_t mmlist_lock __cacheline_aligned = SPIN_LOCK_UNLOCKED; int mmlist_nr; #define allocate_mm() (kmem_cache_alloc(mm_cachep, SLAB_KERNEL)) diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/kernel/softirq.c working-2.5.2-pre10-cachealign/kernel/softirq.c --- linux-2.5.2-pre10/kernel/softirq.c Tue Jan 8 11:49:34 2002 +++ working-2.5.2-pre10-cachealign/kernel/softirq.c Tue Jan 8 14:19:33 2002 @@ -42,7 +42,7 @@ irq_cpustat_t irq_stat[NR_CPUS]; -static struct softirq_action softirq_vec[32] __cacheline_aligned_in_smp; +static struct softirq_action softirq_vec[32] __cacheline_aligned; /* * we cannot loop indefinitely here to avoid userspace starvation, @@ -145,9 +145,8 @@ /* Tasklets */ - -struct tasklet_head tasklet_vec[NR_CPUS] __cacheline_aligned_in_smp; -struct tasklet_head tasklet_hi_vec[NR_CPUS] __cacheline_aligned_in_smp; +struct tasklet_head tasklet_vec[NR_CPUS] __cacheline_aligned; +struct tasklet_head tasklet_hi_vec[NR_CPUS] __cacheline_aligned; void __tasklet_schedule(struct tasklet_struct *t) { diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/mm/filemap.c working-2.5.2-pre10-cachealign/mm/filemap.c --- linux-2.5.2-pre10/mm/filemap.c Tue Jan 8 11:49:34 2002 +++ working-2.5.2-pre10-cachealign/mm/filemap.c Tue Jan 8 14:19:33 2002 @@ -47,7 +47,7 @@ unsigned int page_hash_bits; struct page **page_hash_table; -spinlock_t pagecache_lock __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED; +spinlock_t pagecache_lock __cacheline_aligned = SPIN_LOCK_UNLOCKED; /* * NOTE: to avoid deadlocking you must never acquire the pagemap_lru_lock * with the pagecache_lock held. @@ -57,7 +57,7 @@ * pagemap_lru_lock -> * pagecache_lock */ -spinlock_t pagemap_lru_lock __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED; +spinlock_t pagemap_lru_lock __cacheline_aligned = SPIN_LOCK_UNLOCKED; #define CLUSTER_PAGES (1 << page_cluster) #define CLUSTER_OFFSET(x) (((x) >> page_cluster) << page_cluster) diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/net/core/dev.c working-2.5.2-pre10-cachealign/net/core/dev.c --- linux-2.5.2-pre10/net/core/dev.c Tue Nov 27 16:53:43 2001 +++ working-2.5.2-pre10-cachealign/net/core/dev.c Tue Jan 8 14:19:33 2002 @@ -185,7 +185,7 @@ * Device drivers call our routines to queue packets here. We empty the * queue in the local softnet handler. */ -struct softnet_data softnet_data[NR_CPUS] __cacheline_aligned; +struct softnet_data softnet_data[NR_CPUS] __aligned_section; #ifdef CONFIG_NET_FASTROUTE int netdev_fastroute; diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/net/ipv4/netfilter/ip_tables.c working-2.5.2-pre10-cachealign/net/ipv4/netfilter/ip_tables.c --- linux-2.5.2-pre10/net/ipv4/netfilter/ip_tables.c Tue Nov 6 11:41:43 2001 +++ working-2.5.2-pre10-cachealign/net/ipv4/netfilter/ip_tables.c Tue Jan 8 14:19:33 2002 @@ -90,7 +90,7 @@ unsigned int underflow[NF_IP_NUMHOOKS]; /* ipt_entry tables: one per CPU */ - char entries[0] __attribute__((aligned(SMP_CACHE_BYTES))); + char entries[0] __aligned_type; }; static LIST_HEAD(ipt_target); diff -urN -I \$.*\$ --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.2-pre10/net/socket.c working-2.5.2-pre10-cachealign/net/socket.c --- linux-2.5.2-pre10/net/socket.c Tue Jan 8 11:49:35 2002 +++ working-2.5.2-pre10-cachealign/net/socket.c Tue Jan 8 14:19:33 2002 @@ -187,7 +187,7 @@ static union { int counter; char __pad[SMP_CACHE_BYTES]; -} sockets_in_use[NR_CPUS] __cacheline_aligned = {{0}}; +} sockets_in_use[NR_CPUS] __aligned_section = {{0}}; /* * Support routines. Move socket addresses back and forth across the kernel/user