mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-27 03:25:28 +07:00
9937e16b28
Reduces pointer chasing and gets more to the point. v2: * Tidy whitespace. * Tidy comment. (Michal) Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Suggested-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com> Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190611110044.7742-1-tvrtko.ursulin@linux.intel.com
47 lines
949 B
C
47 lines
949 B
C
/*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
* Copyright © 2017-2018 Intel Corporation
|
|
*/
|
|
|
|
#ifndef _INTEL_WOPCM_H_
|
|
#define _INTEL_WOPCM_H_
|
|
|
|
#include <linux/types.h>
|
|
|
|
/**
|
|
* struct intel_wopcm - Overall WOPCM info and WOPCM regions.
|
|
* @size: Size of overall WOPCM.
|
|
* @guc: GuC WOPCM Region info.
|
|
* @guc.base: GuC WOPCM base which is offset from WOPCM base.
|
|
* @guc.size: Size of the GuC WOPCM region.
|
|
*/
|
|
struct intel_wopcm {
|
|
u32 size;
|
|
struct {
|
|
u32 base;
|
|
u32 size;
|
|
} guc;
|
|
};
|
|
|
|
/**
|
|
* intel_wopcm_guc_size()
|
|
* @wopcm: intel_wopcm structure
|
|
*
|
|
* Returns size of the WOPCM shadowed region.
|
|
*
|
|
* Returns:
|
|
* 0 if GuC is not present or not in use.
|
|
* Otherwise, the GuC WOPCM size.
|
|
*/
|
|
static inline u32 intel_wopcm_guc_size(struct intel_wopcm *wopcm)
|
|
{
|
|
return wopcm->guc.size;
|
|
}
|
|
|
|
void intel_wopcm_init_early(struct intel_wopcm *wopcm);
|
|
int intel_wopcm_init(struct intel_wopcm *wopcm);
|
|
int intel_wopcm_init_hw(struct intel_wopcm *wopcm);
|
|
|
|
#endif
|