arch/mips/include/asm/sn/sn0/hub.h
Source file repositories/reference/linux-study-clean/arch/mips/include/asm/sn/sn0/hub.h
File Facts
- System
- Linux kernel
- Corpus path
arch/mips/include/asm/sn/sn0/hub.h- Extension
.h- Size
- 1428 bytes
- Lines
- 63
- Domain
- Architecture Layer
- Bucket
- arch/mips
- 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
asm/sn/sn0/addrs.hasm/sn/sn0/hubpi.hasm/sn/sn0/hubmd.hasm/sn/sn0/hubio.hasm/sn/sn0/hubni.h
Detected Declarations
function get_nasid
Annotated Snippet
#ifndef _ASM_SN_SN0_HUB_H
#define _ASM_SN_SN0_HUB_H
/* The secret password; used to release protection */
#define HUB_PASSWORD 0x53474972756c6573ull
#define CHIPID_HUB 0
#define CHIPID_ROUTER 1
#define HUB_REV_1_0 1
#define HUB_REV_2_0 2
#define HUB_REV_2_1 3
#define HUB_REV_2_2 4
#define HUB_REV_2_3 5
#define HUB_REV_2_4 6
#define MAX_HUB_PATH 80
#include <asm/sn/sn0/addrs.h>
#include <asm/sn/sn0/hubpi.h>
#include <asm/sn/sn0/hubmd.h>
#include <asm/sn/sn0/hubio.h>
#include <asm/sn/sn0/hubni.h>
//#include <asm/sn/sn0/hubcore.h>
/* Translation of uncached attributes */
#define UATTR_HSPEC 0
#define UATTR_IO 1
#define UATTR_MSPEC 2
#define UATTR_UNCAC 3
#ifdef __ASSEMBLER__
/*
* Returns the local nasid into res.
*/
.macro GET_NASID_ASM res
dli \res, LOCAL_HUB_ADDR(NI_STATUS_REV_ID)
ld \res, (\res)
and \res, NSRI_NODEID_MASK
dsrl \res, NSRI_NODEID_SHFT
.endm
#else
/*
* get_nasid() returns the physical node id number of the caller.
*/
static inline nasid_t get_nasid(void)
{
return (nasid_t)((LOCAL_HUB_L(NI_STATUS_REV_ID) & NSRI_NODEID_MASK)
>> NSRI_NODEID_SHFT);
}
#endif
#endif /* _ASM_SN_SN0_HUB_H */
Annotation
- Immediate include surface: `asm/sn/sn0/addrs.h`, `asm/sn/sn0/hubpi.h`, `asm/sn/sn0/hubmd.h`, `asm/sn/sn0/hubio.h`, `asm/sn/sn0/hubni.h`.
- Detected declarations: `function get_nasid`.
- Atlas domain: Architecture Layer / arch/mips.
- 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.