cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

shmem_utils.h (745B)


      1/* SPDX-License-Identifier: MIT */
      2/*
      3 * Copyright © 2020 Intel Corporation
      4 */
      5
      6#ifndef SHMEM_UTILS_H
      7#define SHMEM_UTILS_H
      8
      9#include <linux/types.h>
     10
     11struct iosys_map;
     12struct drm_i915_gem_object;
     13struct file;
     14
     15struct file *shmem_create_from_data(const char *name, void *data, size_t len);
     16struct file *shmem_create_from_object(struct drm_i915_gem_object *obj);
     17
     18void *shmem_pin_map(struct file *file);
     19void shmem_unpin_map(struct file *file, void *ptr);
     20
     21int shmem_read_to_iosys_map(struct file *file, loff_t off,
     22			    struct iosys_map *map, size_t map_off, size_t len);
     23int shmem_read(struct file *file, loff_t off, void *dst, size_t len);
     24int shmem_write(struct file *file, loff_t off, void *src, size_t len);
     25
     26#endif /* SHMEM_UTILS_H */