plat.c (cf87766dd6f9ddcceaa8ee26e3cbd7538e42dd19) plat.c (55cb93fd243bad2c6e15f9151a32f575d2f5371f)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * AMD HSMP Platform Driver
4 * Copyright (c) 2024, AMD.
5 * All Rights Reserved.
6 *
7 * This file provides platform device implementations.
8 */

--- 61 unchanged lines hidden (view full) ---

70 return -EINVAL;
71
72 sock = &hsmp_pdev->sock[sock_ind];
73
74 return hsmp_metric_tbl_read(sock, buf, count);
75}
76
77static umode_t hsmp_is_sock_attr_visible(struct kobject *kobj,
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * AMD HSMP Platform Driver
4 * Copyright (c) 2024, AMD.
5 * All Rights Reserved.
6 *
7 * This file provides platform device implementations.
8 */

--- 61 unchanged lines hidden (view full) ---

70 return -EINVAL;
71
72 sock = &hsmp_pdev->sock[sock_ind];
73
74 return hsmp_metric_tbl_read(sock, buf, count);
75}
76
77static umode_t hsmp_is_sock_attr_visible(struct kobject *kobj,
78 struct bin_attribute *battr, int id)
78 const struct bin_attribute *battr, int id)
79{
80 u16 sock_ind;
81
82 sock_ind = (uintptr_t)battr->private;
83
84 if (id == 0 && sock_ind >= hsmp_pdev->num_sockets)
85 return SYSFS_GROUP_INVISIBLE;
86

--- 252 unchanged lines hidden ---
79{
80 u16 sock_ind;
81
82 sock_ind = (uintptr_t)battr->private;
83
84 if (id == 0 && sock_ind >= hsmp_pdev->num_sockets)
85 return SYSFS_GROUP_INVISIBLE;
86

--- 252 unchanged lines hidden ---