These are pretty similar to the standard library memset() / memcpy(). Switch to building scrub-page.S unconditionally; the linker will simply not pick it up when not needed.
Signed-off-by: Jan Beulich <[email protected]> --- v3: New. --- While moving I noticed that the files here have .file at the top, while mem{cpy,set}.S don't. There not being any static symbols, likely we could omit the directives here, too? Or should mem{cpy,set}.S gain them? --- xen/arch/x86/Makefile | 3 --- xen/arch/x86/lib/Makefile | 3 +++ xen/arch/x86/{clear_page.S => lib/clear-page.S} | 0 xen/arch/x86/{copy_page.S => lib/copy-page.S} | 0 xen/arch/x86/{ => lib}/scrub-page.S | 0 5 files changed, 3 insertions(+), 3 deletions(-) rename xen/arch/x86/{clear_page.S => lib/clear-page.S} (100%) rename xen/arch/x86/{copy_page.S => lib/copy-page.S} (100%) rename xen/arch/x86/{ => lib}/scrub-page.S (100%) diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index 43117c88e59d..1fc651146f10 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -17,8 +17,6 @@ obj-y += apic.o obj-y += bhb-thunk.o obj-y += bitops.o obj-bin-y += bzimage.init.o -obj-bin-y += clear_page.o -obj-bin-y += copy_page.o obj-y += cpu-policy.o obj-y += cpuid.o obj-$(CONFIG_PV) += compat.o @@ -57,7 +55,6 @@ obj-y += pci.o obj-y += physdev.o obj-$(CONFIG_COMPAT) += x86_64/physdev.o obj-$(CONFIG_X86_PSR) += psr.o -obj-bin-$(CONFIG_DEBUG) += scrub-page.o obj-y += setup.o obj-y += shutdown.o obj-y += smp.o diff --git a/xen/arch/x86/lib/Makefile b/xen/arch/x86/lib/Makefile index a5169f5e19c1..b9a65c662a56 100644 --- a/xen/arch/x86/lib/Makefile +++ b/xen/arch/x86/lib/Makefile @@ -1,5 +1,8 @@ +lib-y += clear-page.o lib-y += copy-guest.o +lib-y += copy-page.o lib-y += copy-unsafe.o lib-y += generic-hweightl.o lib-y += memcpy.o lib-y += memset.o +lib-y += scrub-page.o diff --git a/xen/arch/x86/clear_page.S b/xen/arch/x86/lib/clear-page.S similarity index 100% rename from xen/arch/x86/clear_page.S rename to xen/arch/x86/lib/clear-page.S diff --git a/xen/arch/x86/copy_page.S b/xen/arch/x86/lib/copy-page.S similarity index 100% rename from xen/arch/x86/copy_page.S rename to xen/arch/x86/lib/copy-page.S diff --git a/xen/arch/x86/scrub-page.S b/xen/arch/x86/lib/scrub-page.S similarity index 100% rename from xen/arch/x86/scrub-page.S rename to xen/arch/x86/lib/scrub-page.S
