vas.c (c656cfe571a9b8b882e31177f554bd79141fc015) vas.c (b903737bc522e0ef3f45a2a60c364ff547572c9b)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Copyright 2020-21 IBM Corp.
4 */
5
6#define pr_fmt(fmt) "vas: " fmt
7
8#include <linux/module.h>

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

555
556 if (caps->max_win_creds < DEF_WIN_CREDS) {
557 pr_err("Window creds(%u) > max allowed window creds(%u)\n",
558 DEF_WIN_CREDS, caps->max_win_creds);
559 return -EINVAL;
560 }
561 }
562
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Copyright 2020-21 IBM Corp.
4 */
5
6#define pr_fmt(fmt) "vas: " fmt
7
8#include <linux/module.h>

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

555
556 if (caps->max_win_creds < DEF_WIN_CREDS) {
557 pr_err("Window creds(%u) > max allowed window creds(%u)\n",
558 DEF_WIN_CREDS, caps->max_win_creds);
559 return -EINVAL;
560 }
561 }
562
563 rc = sysfs_add_vas_caps(caps);
564 if (rc)
565 return rc;
566
563 copypaste_feat = true;
564
565 return 0;
566}
567
568/*
569 * VAS windows can be closed due to lost credits when the core is
570 * removed. So reopen them if credits are available due to DLPAR

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

839 rc = h_query_vas_capabilities(H_QUERY_VAS_CAPABILITIES, 0,
840 (u64)virt_to_phys(hv_caps));
841 if (rc)
842 goto out;
843
844 caps_all.descriptor = be64_to_cpu(hv_caps->descriptor);
845 caps_all.feat_type = be64_to_cpu(hv_caps->feat_type);
846
567 copypaste_feat = true;
568
569 return 0;
570}
571
572/*
573 * VAS windows can be closed due to lost credits when the core is
574 * removed. So reopen them if credits are available due to DLPAR

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

843 rc = h_query_vas_capabilities(H_QUERY_VAS_CAPABILITIES, 0,
844 (u64)virt_to_phys(hv_caps));
845 if (rc)
846 goto out;
847
848 caps_all.descriptor = be64_to_cpu(hv_caps->descriptor);
849 caps_all.feat_type = be64_to_cpu(hv_caps->feat_type);
850
851 sysfs_pseries_vas_init(&caps_all);
852
847 hv_cop_caps = kmalloc(sizeof(*hv_cop_caps), GFP_KERNEL);
848 if (!hv_cop_caps) {
849 rc = -ENOMEM;
850 goto out;
851 }
852 /*
853 * QOS capabilities available
854 */

--- 29 unchanged lines hidden ---
853 hv_cop_caps = kmalloc(sizeof(*hv_cop_caps), GFP_KERNEL);
854 if (!hv_cop_caps) {
855 rc = -ENOMEM;
856 goto out;
857 }
858 /*
859 * QOS capabilities available
860 */

--- 29 unchanged lines hidden ---