arch/powerpc/include/asm/hvsi.h
Source file repositories/reference/linux-study-clean/arch/powerpc/include/asm/hvsi.h
File Facts
- System
- Linux kernel
- Corpus path
arch/powerpc/include/asm/hvsi.h- Extension
.h- Size
- 2895 bytes
- Lines
- 98
- Domain
- Architecture Layer
- Bucket
- arch/powerpc
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
struct hvsi_headerstruct hvsi_datastruct hvsi_controlstruct hvsi_querystruct hvsi_query_responsestruct tty_structstruct hvsi_privstruct hvc_struct
Annotated Snippet
struct hvsi_header {
uint8_t type;
uint8_t len;
__be16 seqno;
} __attribute__((packed));
struct hvsi_data {
struct hvsi_header hdr;
uint8_t data[HVSI_MAX_OUTGOING_DATA];
} __attribute__((packed));
struct hvsi_control {
struct hvsi_header hdr;
__be16 verb;
/* optional depending on verb: */
__be32 word;
__be32 mask;
} __attribute__((packed));
struct hvsi_query {
struct hvsi_header hdr;
__be16 verb;
} __attribute__((packed));
struct hvsi_query_response {
struct hvsi_header hdr;
__be16 verb;
__be16 query_seqno;
union {
uint8_t version;
__be32 mctrl_word;
} u;
} __attribute__((packed));
/* hvsi lib struct definitions */
#define HVSI_INBUF_SIZE 255
struct tty_struct;
struct hvsi_priv {
unsigned int inbuf_len; /* data in input buffer */
unsigned char inbuf[HVSI_INBUF_SIZE];
unsigned int inbuf_cur; /* Cursor in input buffer */
size_t inbuf_pktlen; /* packet length from cursor */
atomic_t seqno; /* packet sequence number */
unsigned int opened:1; /* driver opened */
unsigned int established:1; /* protocol established */
unsigned int is_console:1; /* used as a kernel console device */
unsigned int mctrl_update:1; /* modem control updated */
unsigned short mctrl; /* modem control */
struct tty_struct *tty; /* tty structure */
ssize_t (*get_chars)(uint32_t termno, u8 *buf, size_t count);
ssize_t (*put_chars)(uint32_t termno, const u8 *buf, size_t count);
uint32_t termno;
};
/* hvsi lib functions */
struct hvc_struct;
extern void hvsilib_init(struct hvsi_priv *pv,
ssize_t (*get_chars)(uint32_t termno, u8 *buf,
size_t count),
ssize_t (*put_chars)(uint32_t termno, const u8 *buf,
size_t count),
int termno, int is_console);
extern int hvsilib_open(struct hvsi_priv *pv, struct hvc_struct *hp);
extern void hvsilib_close(struct hvsi_priv *pv, struct hvc_struct *hp);
extern int hvsilib_read_mctrl(struct hvsi_priv *pv);
extern int hvsilib_write_mctrl(struct hvsi_priv *pv, int dtr);
extern void hvsilib_establish(struct hvsi_priv *pv);
extern ssize_t hvsilib_get_chars(struct hvsi_priv *pv, u8 *buf, size_t count);
extern ssize_t hvsilib_put_chars(struct hvsi_priv *pv, const u8 *buf,
size_t count);
#endif /* _HVSI_H */
Annotation
- Detected declarations: `struct hvsi_header`, `struct hvsi_data`, `struct hvsi_control`, `struct hvsi_query`, `struct hvsi_query_response`, `struct tty_struct`, `struct hvsi_priv`, `struct hvc_struct`.
- Atlas domain: Architecture Layer / arch/powerpc.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.