drivers/platform/x86/amd/hsmp/hsmp.h
Source file repositories/reference/linux-study-clean/drivers/platform/x86/amd/hsmp/hsmp.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/platform/x86/amd/hsmp/hsmp.h- Extension
.h- Size
- 1890 bytes
- Lines
- 75
- Domain
- Driver Families
- Bucket
- drivers/platform
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/compiler_types.hlinux/device.hlinux/hwmon.hlinux/kconfig.hlinux/miscdevice.hlinux/pci.hlinux/semaphore.hlinux/sysfs.h
Detected Declarations
struct hsmp_mbaddr_infostruct hsmp_socketstruct hsmp_plat_devicefunction hsmp_create_sensor
Annotated Snippet
struct hsmp_mbaddr_info {
u32 base_addr;
u32 msg_id_off;
u32 msg_resp_off;
u32 msg_arg_off;
u32 size;
};
struct hsmp_socket {
struct bin_attribute hsmp_attr;
struct hsmp_mbaddr_info mbinfo;
void __iomem *metric_tbl_addr;
void __iomem *virt_base_addr;
struct semaphore hsmp_sem;
char name[HSMP_ATTR_GRP_NAME_SIZE];
struct device *dev;
u16 sock_ind;
int (*amd_hsmp_rdwr)(struct hsmp_socket *sock, u32 off, u32 *val, bool rw);
};
struct hsmp_plat_device {
struct miscdevice mdev;
struct hsmp_socket *sock;
u32 proto_ver;
u16 num_sockets;
bool is_probed;
};
int hsmp_cache_proto_ver(u16 sock_ind);
int hsmp_test(u16 sock_ind, u32 value);
long hsmp_ioctl(struct file *fp, unsigned int cmd, unsigned long arg);
void hsmp_misc_deregister(void);
int hsmp_misc_register(struct device *dev);
int hsmp_get_tbl_dram_base(u16 sock_ind);
ssize_t hsmp_metric_tbl_read(struct hsmp_socket *sock, char *buf, size_t size);
struct hsmp_plat_device *get_hsmp_pdev(void);
#if IS_ENABLED(CONFIG_HWMON)
int hsmp_create_sensor(struct device *dev, u16 sock_ind);
#else
static inline int hsmp_create_sensor(struct device *dev, u16 sock_ind) { return 0; }
#endif
int hsmp_msg_get_nargs(u16 sock_ind, u32 msg_id, u32 *data, u8 num_args);
#endif /* HSMP_H */
Annotation
- Immediate include surface: `linux/compiler_types.h`, `linux/device.h`, `linux/hwmon.h`, `linux/kconfig.h`, `linux/miscdevice.h`, `linux/pci.h`, `linux/semaphore.h`, `linux/sysfs.h`.
- Detected declarations: `struct hsmp_mbaddr_info`, `struct hsmp_socket`, `struct hsmp_plat_device`, `function hsmp_create_sensor`.
- Atlas domain: Driver Families / drivers/platform.
- 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.