Title: [8264] trunk/arch/blackfin: Task [#5347], resync_core_dcache() is not depend on per_cpu area, so cpu_relax() can be called any where
- Revision
- 8264
- Author
- gyang
- Date
- 2010-02-01 01:07:50 -0500 (Mon, 01 Feb 2010)
Log Message
Task [#5347], resync_core_dcache() is not depend on per_cpu area, so cpu_relax() can be called any where
Modified Paths
Diff
Modified: trunk/arch/blackfin/include/asm/cpu.h (8263 => 8264)
--- trunk/arch/blackfin/include/asm/cpu.h 2010-02-01 06:07:24 UTC (rev 8263)
+++ trunk/arch/blackfin/include/asm/cpu.h 2010-02-01 06:07:50 UTC (rev 8264)
@@ -17,8 +17,6 @@
struct task_struct *idle;
unsigned int imemctl;
unsigned int dmemctl;
- unsigned long dcache_invld_count;
- unsigned long icache_invld_count;
};
DECLARE_PER_CPU(struct blackfin_cpudata, cpu_data);
Modified: trunk/arch/blackfin/include/asm/smp.h (8263 => 8264)
--- trunk/arch/blackfin/include/asm/smp.h 2010-02-01 06:07:24 UTC (rev 8263)
+++ trunk/arch/blackfin/include/asm/smp.h 2010-02-01 06:07:50 UTC (rev 8264)
@@ -24,6 +24,13 @@
};
extern struct corelock_slot corelock;
+#ifdef __ARCH_SYNC_CORE_ICACHE
+extern unsigned long icache_invld_count[NR_CPUS];
+#endif
+#ifdef __ARCH_SYNC_CORE_DCACHE
+extern unsigned long dcache_invld_count[NR_CPUS];
+#endif
+
void smp_icache_flush_range_others(unsigned long start,
unsigned long end);
#ifdef CONFIG_HOTPLUG_CPU
Modified: trunk/arch/blackfin/kernel/setup.c (8263 => 8264)
--- trunk/arch/blackfin/kernel/setup.c 2010-02-01 06:07:24 UTC (rev 8263)
+++ trunk/arch/blackfin/kernel/setup.c 2010-02-01 06:07:50 UTC (rev 8264)
@@ -1239,10 +1239,10 @@
dsup_banks, BFIN_DSUBBANKS, BFIN_DWAYS,
BFIN_DLINES);
#ifdef __ARCH_SYNC_CORE_DCACHE
- seq_printf(m, "SMP Dcache Flushes\t: %lu\n\n", cpudata->dcache_invld_count);
+ seq_printf(m, "SMP Dcache Flushes\t: %lu\n\n", dcache_invld_count[cpu_num]);
#endif
#ifdef __ARCH_SYNC_CORE_ICACHE
- seq_printf(m, "SMP Icache Flushes\t: %lu\n\n", cpudata->icache_invld_count);
+ seq_printf(m, "SMP Icache Flushes\t: %lu\n\n", icache_invld_count[cpu_num]);
#endif
if (cpu_num != num_possible_cpus() - 1)
Modified: trunk/arch/blackfin/mach-common/smp.c (8263 => 8264)
--- trunk/arch/blackfin/mach-common/smp.c 2010-02-01 06:07:24 UTC (rev 8263)
+++ trunk/arch/blackfin/mach-common/smp.c 2010-02-01 06:07:50 UTC (rev 8264)
@@ -427,24 +427,26 @@
EXPORT_SYMBOL_GPL(smp_icache_flush_range_others);
#ifdef __ARCH_SYNC_CORE_ICACHE
+unsigned long icache_invld_count[NR_CPUS];
void resync_core_icache(void)
{
unsigned int cpu = get_cpu();
blackfin_invalidate_entire_icache();
- ++per_cpu(cpu_data, cpu).icache_invld_count;
+ icache_invld_count[cpu]++;
put_cpu();
}
EXPORT_SYMBOL(resync_core_icache);
#endif
#ifdef __ARCH_SYNC_CORE_DCACHE
+unsigned long dcache_invld_count[NR_CPUS];
unsigned long barrier_mask __attribute__ ((__section__(".l2.bss")));
void resync_core_dcache(void)
{
unsigned int cpu = get_cpu();
blackfin_invalidate_entire_dcache();
- ++per_cpu(cpu_data, cpu).dcache_invld_count;
+ dcache_invld_count[cpu]++;
put_cpu();
}
EXPORT_SYMBOL(resync_core_dcache);
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits