1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * SED key operations.
4 *
5 * Copyright (C) 2023 IBM Corporation
6 *
7 * These are the accessor functions (read/write) for SED Opal
8 * keys. Specific keystores can provide overrides.
9 *
10 */
11
12 #include <linux/kernel.h>
13
14 #ifdef CONFIG_PSERIES_PLPKS_SED
15 int sed_read_key(char *keyname, char *key, u_int *keylen);
16 int sed_write_key(char *keyname, char *key, u_int keylen);
17 #else
18 static inline
sed_read_key(char * keyname,char * key,u_int * keylen)19 int sed_read_key(char *keyname, char *key, u_int *keylen) {
20 return -EOPNOTSUPP;
21 }
22 static inline
sed_write_key(char * keyname,char * key,u_int keylen)23 int sed_write_key(char *keyname, char *key, u_int keylen) {
24 return -EOPNOTSUPP;
25 }
26 #endif
27