19155e234SNayna Jain // SPDX-License-Identifier: GPL-2.0 29155e234SNayna Jain /* 39155e234SNayna Jain * Copyright (C) 2019 IBM Corporation 49155e234SNayna Jain * Author: Nayna Jain 59155e234SNayna Jain * 69155e234SNayna Jain * This file initializes secvar operations for PowerPC Secureboot 79155e234SNayna Jain */ 89155e234SNayna Jain 99155e234SNayna Jain #include <linux/cache.h> 109155e234SNayna Jain #include <asm/secvar.h> 11*26149b02SRussell Currey #include <asm/bug.h> 129155e234SNayna Jain 13*26149b02SRussell Currey const struct secvar_operations *secvar_ops __ro_after_init = NULL; 149155e234SNayna Jain set_secvar_ops(const struct secvar_operations * ops)15*26149b02SRussell Curreyint set_secvar_ops(const struct secvar_operations *ops) 169155e234SNayna Jain { 17*26149b02SRussell Currey if (WARN_ON_ONCE(secvar_ops)) 18*26149b02SRussell Currey return -EBUSY; 19*26149b02SRussell Currey 209155e234SNayna Jain secvar_ops = ops; 21*26149b02SRussell Currey 22*26149b02SRussell Currey return 0; 239155e234SNayna Jain } 24