linux/arch/x86/kernel/cpu/sgx
Lorenzo Stoakes 93d23dff8e mm: use linear_page_[index, delta]() consistently
There are a number of places where we open code what linear_page_index()
and linear_page_delta() calculate.

Replace this code with the appropriate functions for consistency.

No functional change intended.

Link: https://lore.kernel.org/20260710-b4-pre-scalable-cow-v2-21-2a5aa403d977@kernel.org
Signed-off-by: Lorenzo Stoakes <ljs@kernel.org>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>	[DRM]
Acked-by: Kai Huang <kai.huang@intel.com> # for sgx
Reviewed-by: Gregory Price <gourry@gourry.net>
Reviewed-by: Pedro Falcato <pfalcato@suse.de> # for mm
Reviewed-by: Ackerley Tng <ackerleytng@google.com>	[guest_memfd]
Reviewed-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
Cc: David Hildenbrand (Arm) <david@kernel.org>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: SJ Park <sj@kernel.org>
Cc: Liam R. Howlett (Oracle) <liam@infradead.org>
Cc: Zi Yan <ziy@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2026-08-04 19:19:01 -07:00
..
driver.c treewide: Explicitly include the x86 CPUID headers 2026-05-06 14:29:59 +02:00
driver.h x86/sgx: Use SHA-256 library API instead of crypto_shash API 2025-04-28 12:39:33 -07:00
encl.c mm: rename zap_vma_ptes() to zap_special_vma_range() 2026-04-05 13:53:15 -07:00
encl.h mm: update architecture and driver code to use vm_flags_t 2025-07-09 22:42:14 -07:00
encls.h x86/sgx: Implement ENCLS[EUPDATESVN] 2025-10-16 14:42:09 -07:00
ioctl.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
main.c treewide: Explicitly include the x86 CPUID headers 2026-05-06 14:29:59 +02:00
Makefile x86/sgx: Introduce virtual EPC for use by KVM guests 2021-04-06 09:43:17 +02:00
sgx.h x86/sgx: Introduce functions to count the sgx_(vepc_)open() 2025-10-16 14:42:08 -07:00
virt.c mm: use linear_page_[index, delta]() consistently 2026-08-04 19:19:01 -07:00