All of lore.kernel.org
 help / color / mirror / Atom feed
* Cache Question
@ 2004-11-23 18:19 ` Kapoor, Pankaj
  0 siblings, 0 replies; 5+ messages in thread
From: Kapoor, Pankaj @ 2004-11-23 18:19 UTC (permalink / raw)
  To: linux-mips

[-- Attachment #1: Type: text/plain, Size: 619 bytes --]

Hi,

Is there any specific reason why the cache invalidation routine is
executed with interrupts disabled? 

Example: 

static void
mips32_dma_cache_inv_pc(unsigned long addr, unsigned long size)
{
	unsigned long end, a;
	unsigned int flags;

	if (size >= dcache_size) {
		flush_cache_all();
	} else {
	        __save_and_cli(flags);
		a = addr & ~(dc_lsize - 1);
		end = (addr + size) & ~(dc_lsize - 1);
		while (1) {
			flush_dcache_line(a); /* Hit_Writeback_Inv_D */
			if (a == end) break;
			a += dc_lsize;
		}
		__restore_flags(flags);
	}

	bc_inv(addr, size);
}

Thanks.
- Pankaj

[-- Attachment #2: Type: text/html, Size: 4181 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-11-24 22:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-23 18:19 Cache Question Kapoor, Pankaj
2004-11-23 18:19 ` Kapoor, Pankaj
2004-11-24 22:32 ` Ralf Baechle
2004-11-24 22:42   ` Maciej W. Rozycki
2004-11-24 22:54     ` Ralf Baechle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.