2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/drivers/hwtracing/intel_th
Lorenzo Stoakes 8e55352059 intel_th: avoid using deprecated page->mapping, index fields
The struct page->mapping, index fields are deprecated and soon to be only
available as part of a folio.

It is likely the intel_th code which sets page->mapping, index is was
implemented out of concern that some aspect of the page fault logic may
encounter unexpected problems should they not.

However, the appropriate interface for inserting kernel-allocated memory is
vm_insert_page() in a VM_MIXEDMAP. By using the helper function
vmf_insert_mixed() we can do this with minimal churn in the existing fault
handler.

By doing so, we bypass the remainder of the faulting logic. The pages are
still pinned so there is no possibility of anything unexpected being done
with the pages once established.

It would also be reasonable to pre-map everything on fault, however to
minimise churn we retain the fault handler.

We also eliminate all code which clears page->mapping on teardown as this
has now become unnecessary.

The MSU code relies on faulting to function correctly, so is by definition
dependent on CONFIG_MMU. We avoid spurious reports about compilation
failure for unsupported platforms by making this requirement explicit in
Kconfig as part of this change too.

Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Acked-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Link: https://lore.kernel.org/r/20250331125608.60300-1-lorenzo.stoakes@oracle.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-04-15 13:29:03 +02:00
..
acpi.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
core.c intel_th: core: fix kernel-doc warnings 2025-01-13 06:18:47 +01:00
debug.c intel_th: Add SPDX GPL-2.0 header to replace GPLv2 boilerplate 2018-03-28 18:47:19 +03:00
debug.h intel_th: Add SPDX GPL-2.0 header to replace GPLv2 boilerplate 2018-03-28 18:47:19 +03:00
gth.c intel_th: Convert sprintf/snprintf to sysfs_emit 2024-05-04 18:57:22 +02:00
gth.h intel_th: Add switch triggering support 2019-05-03 18:16:21 +02:00
intel_th.h driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
Kconfig intel_th: avoid using deprecated page->mapping, index fields 2025-04-15 13:29:03 +02:00
Makefile intel_th: msu-sink: An example msu buffer "sink" 2019-07-25 13:03:18 +02:00
msu-sink.c intel_th: msu-sink: add missing MODULE_DESCRIPTION() 2024-07-03 16:40:30 +02:00
msu.c intel_th: avoid using deprecated page->mapping, index fields 2025-04-15 13:29:03 +02:00
msu.h Merge 5.3-rc5 into char-misc-next 2019-08-19 07:11:53 +02:00
pci.c intel_th: pci: Add Panther Lake-P/U support 2025-02-20 09:35:57 +01:00
pti.c intel_th: Constify attribute_group structs 2021-04-16 07:26:50 +02:00
pti.h intel_th: Use the correct style for SPDX License Identifier 2019-07-30 19:41:53 +02:00
sth.c intel_th: Remove redundant initialization of pointer outp 2024-05-04 18:57:22 +02:00
sth.h intel_th: Add SPDX GPL-2.0 header to replace GPLv2 boilerplate 2018-03-28 18:47:19 +03:00