Commit 095ac6fa authored by Baoquan He's avatar Baoquan He Committed by Borislav Petkov (AMD)
Browse files

x86/ioremap: Simplify setup_data mapping variants



memremap_is_setup_data() and early_memremap_is_setup_data() share
completely the same process and handling, except for the differing
memremap/unmap invocations.

Add a helper __memremap_is_setup_data() extracting the common part and
simplify a lot of code while at it.

Mark __memremap_is_setup_data() as __ref to suppress this section
mismatch warning:

  WARNING: modpost: vmlinux: section mismatch in reference: __memremap_is_setup_data+0x5f (section: .text) ->
  early_memunmap (section: .init.text)

  [ bp: Massage a bit. ]

Signed-off-by: default avatarBaoquan He <bhe@redhat.com>
Signed-off-by: default avatarBorislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20241123114221.149383-2-bhe@redhat.com
parent 5daececd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment