arch/powerpc/perf/bhrb.S
Source file repositories/reference/linux-study-clean/arch/powerpc/perf/bhrb.S
File Facts
- System
- Linux kernel
- Corpus path
arch/powerpc/perf/bhrb.S- Extension
.S- Size
- 991 bytes
- Lines
- 41
- Domain
- Architecture Layer
- Bucket
- arch/powerpc
- Inferred role
- Architecture Layer: arch/powerpc
- Status
- atlas-only
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
asm/ppc_asm.hasm/ppc-opcode.h
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
#include <asm/ppc_asm.h>
#include <asm/ppc-opcode.h>
.text
.balign 8
/* r3 = n (where n = [0-31])
* The maximum number of BHRB entries supported with PPC_MFBHRBE instruction
* is 1024. We have limited number of table entries here as POWER8 implements
* 32 BHRB entries.
*/
/* .global read_bhrb */
_GLOBAL(read_bhrb)
cmpldi r3,31
bgt 1f
LOAD_REG_ADDR(r4, bhrb_table)
sldi r3,r3,3
add r3,r4,r3
mtctr r3
bctr
1: li r3,0
blr
#define MFBHRB_TABLE1(n) PPC_MFBHRBE(R3,n); blr
#define MFBHRB_TABLE2(n) MFBHRB_TABLE1(n); MFBHRB_TABLE1(n+1)
#define MFBHRB_TABLE4(n) MFBHRB_TABLE2(n); MFBHRB_TABLE2(n+2)
#define MFBHRB_TABLE8(n) MFBHRB_TABLE4(n); MFBHRB_TABLE4(n+4)
#define MFBHRB_TABLE16(n) MFBHRB_TABLE8(n); MFBHRB_TABLE8(n+8)
#define MFBHRB_TABLE32(n) MFBHRB_TABLE16(n); MFBHRB_TABLE16(n+16)
bhrb_table:
MFBHRB_TABLE32(0)
Annotation
- Immediate include surface: `asm/ppc_asm.h`, `asm/ppc-opcode.h`.
- Atlas domain: Architecture Layer / arch/powerpc.
- Implementation status: atlas-only.
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.