init.c (a2e7496b453eaa577425858d6f8b854800ed7343) init.c (d5638de827cff0fce77007e426ec0ffdedf68a44)
1// SPDX-License-Identifier: GPL-2.0
2/* Copyright(c) 2019 Intel Corporation. All rights rsvd. */
3#include <linux/init.h>
4#include <linux/kernel.h>
5#include <linux/module.h>
6#include <linux/slab.h>
7#include <linux/pci.h>
8#include <linux/interrupt.h>

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

349
350 if (idxd->hw.gen_cap.evl_support == 0)
351 return 0;
352
353 evl = kzalloc_node(sizeof(*evl), GFP_KERNEL, dev_to_node(dev));
354 if (!evl)
355 return -ENOMEM;
356
1// SPDX-License-Identifier: GPL-2.0
2/* Copyright(c) 2019 Intel Corporation. All rights rsvd. */
3#include <linux/init.h>
4#include <linux/kernel.h>
5#include <linux/module.h>
6#include <linux/slab.h>
7#include <linux/pci.h>
8#include <linux/interrupt.h>

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

349
350 if (idxd->hw.gen_cap.evl_support == 0)
351 return 0;
352
353 evl = kzalloc_node(sizeof(*evl), GFP_KERNEL, dev_to_node(dev));
354 if (!evl)
355 return -ENOMEM;
356
357 spin_lock_init(&evl->lock);
357 mutex_init(&evl->lock);
358 evl->size = IDXD_EVL_SIZE_MIN;
359
360 idxd_name = dev_name(idxd_confdev(idxd));
361 evl_cache_size = sizeof(struct idxd_evl_fault) + evl_ent_size(idxd);
362 /*
363 * Since completion record in evl_cache will be copied to user
364 * when handling completion record page fault, need to create
365 * the cache suitable for user copy.

--- 564 unchanged lines hidden ---
358 evl->size = IDXD_EVL_SIZE_MIN;
359
360 idxd_name = dev_name(idxd_confdev(idxd));
361 evl_cache_size = sizeof(struct idxd_evl_fault) + evl_ent_size(idxd);
362 /*
363 * Since completion record in evl_cache will be copied to user
364 * when handling completion record page fault, need to create
365 * the cache suitable for user copy.

--- 564 unchanged lines hidden ---