arch/m68k/include/asm/cacheflush_no.h
Source file repositories/reference/linux-study-clean/arch/m68k/include/asm/cacheflush_no.h
File Facts
- System
- Linux kernel
- Corpus path
arch/m68k/include/asm/cacheflush_no.h- Extension
.h- Size
- 1884 bytes
- Lines
- 87
- Domain
- Architecture Layer
- Bucket
- arch/m68k
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
Dependency Surface
linux/mm.hasm/mcfsim.hasm-generic/cacheflush.h
Detected Declarations
function __clear_cache_allfunction __flush_cache_allfunction __flush_icache_allfunction __flush_dcache_allfunction cache_pushfunction address
Annotated Snippet
#ifndef _M68KNOMMU_CACHEFLUSH_H
#define _M68KNOMMU_CACHEFLUSH_H
/*
* (C) Copyright 2000-2010, Greg Ungerer <gerg@snapgear.com>
*/
#include <linux/mm.h>
#include <asm/mcfsim.h>
#define flush_cache_all() __flush_cache_all()
#define flush_dcache_range(start, len) __flush_dcache_all()
#define flush_icache_range(start, len) __flush_icache_all()
void mcf_cache_push(void);
static inline void __clear_cache_all(void)
{
#ifdef CACHE_INVALIDATE
__asm__ __volatile__ (
"movec %0, %%CACR\n\t"
"nop\n\t"
: : "r" (CACHE_INVALIDATE) );
#endif
}
static inline void __flush_cache_all(void)
{
#ifdef CACHE_PUSH
mcf_cache_push();
#endif
__clear_cache_all();
}
/*
* Some ColdFire parts implement separate instruction and data caches,
* on those we should just flush the appropriate cache. If we don't need
* to do any specific flushing then this will be optimized away.
*/
static inline void __flush_icache_all(void)
{
#ifdef CACHE_INVALIDATEI
__asm__ __volatile__ (
"movec %0, %%CACR\n\t"
"nop\n\t"
: : "r" (CACHE_INVALIDATEI) );
#endif
}
static inline void __flush_dcache_all(void)
{
#ifdef CACHE_PUSH
mcf_cache_push();
#endif
#ifdef CACHE_INVALIDATED
__asm__ __volatile__ (
"movec %0, %%CACR\n\t"
"nop\n\t"
: : "r" (CACHE_INVALIDATED) );
#else
/* Flush the write buffer */
__asm__ __volatile__ ( "nop" );
#endif
}
/*
* Push cache entries at supplied address. We want to write back any dirty
* data and then invalidate the cache lines associated with this address.
*/
static inline void cache_push(unsigned long paddr, int len)
{
__flush_cache_all();
}
/*
* Clear cache entries at supplied address (that is don't write back any
* dirty data).
*/
static inline void cache_clear(unsigned long paddr, int len)
{
__clear_cache_all();
}
#include <asm-generic/cacheflush.h>
#endif /* _M68KNOMMU_CACHEFLUSH_H */
Annotation
- Immediate include surface: `linux/mm.h`, `asm/mcfsim.h`, `asm-generic/cacheflush.h`.
- Detected declarations: `function __clear_cache_all`, `function __flush_cache_all`, `function __flush_icache_all`, `function __flush_dcache_all`, `function cache_push`, `function address`.
- Atlas domain: Architecture Layer / arch/m68k.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.