mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-08 12:19:06 +00:00
DM: vrtc code cleanup
- Move the variable local_time from main.c to rtc.c - Change vrtc_init to return int instead of pointer to vrtc. We do track vrtc in struct vmctx. Signed-off-by: Yin Fengwei <fengwei.yin@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
@@ -36,7 +36,8 @@
|
||||
struct vrtc;
|
||||
struct vmctx;
|
||||
|
||||
struct vrtc *vrtc_init(struct vmctx *ctx, int local_time);
|
||||
int vrtc_init(struct vmctx *ctx);
|
||||
void vrtc_enable_localtime(int l_time);
|
||||
void vrtc_deinit(struct vmctx *ctx);
|
||||
void vrtc_reset(struct vrtc *vrtc);
|
||||
time_t vrtc_get_time(struct vrtc *vrtc);
|
||||
|
@@ -34,8 +34,6 @@
|
||||
#include "types.h"
|
||||
#include "vmm.h"
|
||||
|
||||
#include "atkbdc.h"
|
||||
|
||||
/*
|
||||
* API version for out-of-tree consumers for making compile time decisions.
|
||||
*/
|
||||
@@ -47,8 +45,6 @@
|
||||
#define ALIGN_UP(x, align) (((x) + ((align)-1)) & ~((align)-1))
|
||||
#define ALIGN_DOWN(x, align) ((x) & ~((align)-1))
|
||||
|
||||
struct iovec;
|
||||
|
||||
struct vmctx {
|
||||
int fd;
|
||||
int vmid;
|
||||
@@ -64,8 +60,8 @@ struct vmctx {
|
||||
uuid_t vm_uuid;
|
||||
|
||||
/* fields to track virtual devices */
|
||||
struct atkbdc_base *atkbdc_base;
|
||||
struct vrtc *vrtc;
|
||||
void *atkbdc_base;
|
||||
void *vrtc;
|
||||
};
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user