drivers/ptp/ptp_kvm_arm.c
Source file repositories/reference/linux-study-clean/drivers/ptp/ptp_kvm_arm.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/ptp/ptp_kvm_arm.c- Extension
.c- Size
- 567 bytes
- Lines
- 33
- Domain
- Driver Families
- Bucket
- drivers/ptp
- 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/arm-smccc.hlinux/ptp_kvm.hasm/arch_timer.hasm/hypervisor.h
Detected Declarations
function Copyrightfunction kvm_arch_ptp_exit
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-only
/*
* Virtual PTP 1588 clock for use with KVM guests
* Copyright (C) 2019 ARM Ltd.
* All Rights Reserved
*/
#include <linux/arm-smccc.h>
#include <linux/ptp_kvm.h>
#include <asm/arch_timer.h>
#include <asm/hypervisor.h>
int kvm_arch_ptp_init(void)
{
int ret;
ret = kvm_arm_hyp_service_available(ARM_SMCCC_KVM_FUNC_PTP);
if (ret <= 0)
return -EOPNOTSUPP;
return 0;
}
void kvm_arch_ptp_exit(void)
{
}
int kvm_arch_ptp_get_clock(struct timespec64 *ts)
{
return kvm_arch_ptp_get_crosststamp(NULL, ts, NULL);
}
Annotation
- Immediate include surface: `linux/arm-smccc.h`, `linux/ptp_kvm.h`, `asm/arch_timer.h`, `asm/hypervisor.h`.
- Detected declarations: `function Copyright`, `function kvm_arch_ptp_exit`.
- Atlas domain: Driver Families / drivers/ptp.
- 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.