Skip to content

RFC x86: probe for assembler capabilities in Kconfig

Jason A. Donenfeld linux-crypto linux-kbuild linux-next lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3x86: probe assembler instead of kconfig instead of makefilearch/x86/Kconfig arch/x86/Kconfig.assembler arch/x86/Makefile +2 more+38 -340 replies
2/3crypto: x86 - rework configuration based on Kconfigarch/x86/crypto/Makefile crypto/Kconfig+80 -1100 replies
3/3crypto: curve25519 - do not pollute dispatcher based on assemblerinclude/crypto/curve25519.h+2 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH RFC 0/3] x86: probe for assembler capabilities in Kconfig

Doing this probing inside of the Makefiles means we have a maze of ifdefs inside the source code and child Makefiles that need to make proper decisions on this too. Instead, we do it at Kconfig time, like many other compiler and assembler options, which allows us to set up the dependencies normally for full compilation units.

This patchset might have weird implications, as things have relied on the old behavior for a long time. For example, it now means that environment changes need for Kconfig's defaults to be triggered again. I recently saw some patch on LKML that was doing a substring comparison on KBUILD_CFLAGS looking for -DCONFIG_AS_SOMETHING; things like that will have to change too.

This RFC isn't super heavily tested, and I expect problems. Let me know what you think.

Jason A. Donenfeld (3):
x86: probe assembler instead of kconfig instead of makefile
crypto: x86 - rework configuration based on Kconfig
crypto: curve25519 - do not pollute dispatcher based on assembler

 arch/x86/Kconfig              |   2 +
 arch/x86/Kconfig.assembler    |  36 ++++++++
 arch/x86/Makefile             |  22 -----
 arch/x86/crypto/Makefile      | 162 ++++++++++++++--------------------
 crypto/Kconfig                |  28 +++---
 drivers/gpu/drm/i915/Makefile |   3 -
 include/crypto/curve25519.h   |   6 +-
 lib/raid6/test/Makefile       |   9 --
 8 files changed, 120 insertions(+), 148 deletions(-)
 create mode 100644 arch/x86/Kconfig.assembler
Signature · 1 line
2.25.1