mirror of
https://github.com/NVIDIA/open-gpu-kernel-modules.git
synced 2026-02-07 08:39:58 +00:00
575.57.08
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
|
||||
const char *uvm_lock_order_to_string(uvm_lock_order_t lock_order)
|
||||
{
|
||||
BUILD_BUG_ON(UVM_LOCK_ORDER_COUNT != 37);
|
||||
BUILD_BUG_ON(UVM_LOCK_ORDER_COUNT != 38);
|
||||
|
||||
switch (lock_order) {
|
||||
UVM_ENUM_STRING_CASE(UVM_LOCK_ORDER_INVALID);
|
||||
@@ -58,6 +58,7 @@ const char *uvm_lock_order_to_string(uvm_lock_order_t lock_order)
|
||||
UVM_ENUM_STRING_CASE(UVM_LOCK_ORDER_PMM);
|
||||
UVM_ENUM_STRING_CASE(UVM_LOCK_ORDER_PMM_PMA);
|
||||
UVM_ENUM_STRING_CASE(UVM_LOCK_ORDER_PMM_ROOT_CHUNK);
|
||||
UVM_ENUM_STRING_CASE(UVM_LOCK_ACCESS_COUNTERS_CLEAR_OPS);
|
||||
UVM_ENUM_STRING_CASE(UVM_LOCK_ORDER_CHANNEL);
|
||||
UVM_ENUM_STRING_CASE(UVM_LOCK_ORDER_WLC_CHANNEL);
|
||||
UVM_ENUM_STRING_CASE(UVM_LOCK_ORDER_TOOLS_VA_SPACE_LIST);
|
||||
@@ -352,15 +353,7 @@ bool __uvm_thread_check_all_unlocked(void)
|
||||
|
||||
NV_STATUS uvm_bit_locks_init(uvm_bit_locks_t *bit_locks, size_t count, uvm_lock_order_t lock_order)
|
||||
{
|
||||
// TODO: Bug 1772140: Notably bit locks currently do not work on memory
|
||||
// allocated through vmalloc() (including big allocations created with
|
||||
// uvm_kvmalloc()). The problem is the bit_waitqueue() helper used by the
|
||||
// kernel internally that uses virt_to_page().
|
||||
// To prevent us from using kmalloc() for a huge allocation, warn if the
|
||||
// allocation size gets bigger than what we are comfortable with for
|
||||
// kmalloc() in uvm_kvmalloc().
|
||||
size_t size = sizeof(unsigned long) * BITS_TO_LONGS(count);
|
||||
WARN_ON_ONCE(size > UVM_KMALLOC_THRESHOLD);
|
||||
|
||||
bit_locks->bits = kzalloc(size, NV_UVM_GFP_FLAGS);
|
||||
if (!bit_locks->bits)
|
||||
|
||||
Reference in New Issue
Block a user