forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-02-20 e636c8d336489bf3eed5878299e6cc045bbad077
kernel/drivers/hwtracing/coresight/coresight-tmc-etf.c
....@@ -428,7 +428,7 @@
428428 return -EINVAL;
429429
430430 /* wrap head around to the amount of space we have */
431
- head = handle->head & ((buf->nr_pages << PAGE_SHIFT) - 1);
431
+ head = handle->head & (((unsigned long)buf->nr_pages << PAGE_SHIFT) - 1);
432432
433433 /* find the page to write to */
434434 buf->cur = head / PAGE_SIZE;