arch/nios2/lib/delay.c
Source file repositories/reference/linux-study-clean/arch/nios2/lib/delay.c
File Facts
- System
- Linux kernel
- Corpus path
arch/nios2/lib/delay.c- Extension
.c- Size
- 814 bytes
- Lines
- 41
- Domain
- Architecture Layer
- Bucket
- arch/nios2
- Inferred role
- Architecture Layer: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
Dependency Surface
linux/module.hasm/delay.hasm/param.hasm/processor.hasm/timex.h
Detected Declarations
function __delayfunction __const_udelayfunction __udelayfunction __ndelayexport __delayexport __const_udelayexport __udelayexport __ndelay
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-only
/* Copyright Altera Corporation (C) 2014. All rights reserved.
*/
#include <linux/module.h>
#include <asm/delay.h>
#include <asm/param.h>
#include <asm/processor.h>
#include <asm/timex.h>
void __delay(unsigned long cycles)
{
cycles_t start = get_cycles();
while ((get_cycles() - start) < cycles)
cpu_relax();
}
EXPORT_SYMBOL(__delay);
void __const_udelay(unsigned long xloops)
{
u64 loops;
loops = (u64)xloops * loops_per_jiffy * HZ;
__delay(loops >> 32);
}
EXPORT_SYMBOL(__const_udelay);
void __udelay(unsigned long usecs)
{
__const_udelay(usecs * 0x10C7UL); /* 2**32 / 1000000 (rounded up) */
}
EXPORT_SYMBOL(__udelay);
void __ndelay(unsigned long nsecs)
{
__const_udelay(nsecs * 0x5UL); /* 2**32 / 1000000000 (rounded up) */
}
EXPORT_SYMBOL(__ndelay);
Annotation
- Immediate include surface: `linux/module.h`, `asm/delay.h`, `asm/param.h`, `asm/processor.h`, `asm/timex.h`.
- Detected declarations: `function __delay`, `function __const_udelay`, `function __udelay`, `function __ndelay`, `export __delay`, `export __const_udelay`, `export __udelay`, `export __ndelay`.
- Atlas domain: Architecture Layer / arch/nios2.
- Implementation status: integration 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.