Skip to contentSkip to conversation

Incomplete Kconfig conversion

RFC Superseded Doug Goldstein 8 participants 69 messages Oct 5, 2015 – Nov 11, 2015

v1 of 8 Superseded Latest is v8 →

lore
Share & tools
lore
#0 lore raw

cover Incomplete Kconfig conversion

This is very incomplete and is only posted in hopes of getting some feedback if this conversion is welcome by the community. There are a few different ways I can go from here.

* convert all of include/$(ARCH)/config.h
* move this to the top level and convert all of configs/
* due both of the above

I'd like to break this series up as small as possible and land parts in the tree that I can land. At this point the first 4 patches are too large and need culling down to only what's necessary. But my goal was to make it as obvious as possible where the original code came from and how it was transformed over time.

Ultimately my goal is to allow for more parts of the hypervisor to be turned off at compile time and potentially make it easier to include more experimental features by others which can be turned off by default. Also to provide the one true location for all possible knobs in the source code.

Doug Goldstein (29):
build: import Kbuild/Kconfig from Linux 4.2
build: trim down Linux bits
build: hookup initial Kconfig usage
build: include config bits to build with
build: convert HAS_PASSTHROUGH use to Kconfig
build: convert HAS_DEVICE_TREE use to Kconfig
build: convert HAS_PCI use to Kconfig
build: convert HAS_NS16550 use to Kconfig
build: convert HAS_IOPORTS use to Kconfig
build: convert HAS_ACPI use to Kconfig
build: convert HAS_VIDEO use to Kconfig
build: convert HAS_VGA use to Kconfig
build: convert HAS_CPUFREQ use to Kconfig
build: convert HAS_GDBSX use to Kconfig
build: convert HAS_PDX use to Kconfig
build: convert HAS_KEXEC use to Kconfig
build: convert HAS_ARM_HDLCD use to Kconfig
build: convert HAS_CADENCE_UART use to Kconfig
build: convert HAS_PL011 use to Kconfig
build: convert HAS_EXYNOS4210 use to Kconfig
build: convert HAS_OMAP use to Kconfig
build: convert HAS_SCIF use to Kconfig
build: convert HAS_EHCI use to Kconfig
build: convert HAS_MEM_ACCESS use to Kconfig
build: convert HAS_MEM_PAGING use to Kconfig
build: convert HAS_MEM_SHARING use to Kconfig
build: convert HAS_GICV3 use to Kconfig
build: convert CONFIG_COMPAT to Kconfig
build: convert kexec options to CONFIG_KEXEC

 .gitignore                                     |    8 +
 config/x86_32.mk                               |    2 -
 config/x86_64.mk                               |    3 -
 xen/Kconfig                                    |   26 +
 xen/Makefile                                   |   14 +
 xen/Makefile.linux                             | 1595 +++++++++++++++
 xen/Rules.mk                                   |   18 +-
 xen/arch/arm/Kconfig                           |   37 +
 xen/arch/arm/Makefile                          |    2 +-
 xen/arch/arm/Makefile.kconfig                  |    8 +
 xen/arch/arm/Rules.mk                          |    8 -
 xen/arch/arm/defconfig                         |    0
 xen/arch/arm/vgic.c                            |    2 +-
 xen/arch/x86/Kconfig                           |   50 +
 xen/arch/x86/Makefile.kconfig                  |   26 +
 xen/arch/x86/Rules.mk                          |   12 -
 xen/arch/x86/i386_defconfig                    |    1 +
 xen/arch/x86/x86_64_defconfig                  |    0
 xen/common/Kconfig                             |   43 +
 xen/common/Makefile                            |    8 +-
 xen/common/compat/memory.c                     |    4 +-
 xen/common/domain.c                            |    2 +-
 xen/common/domctl.c                            |    2 +-
 xen/common/memory.c                            |   12 +-
 xen/common/sysctl.c                            |    4 +-
 xen/common/vm_event.c                          |   16 +-
 xen/drivers/Kconfig                            |   15 +
 xen/drivers/Makefile                           |   10 +-
 xen/drivers/acpi/Kconfig                       |    4 +
 xen/drivers/char/Kconfig                       |   33 +
 xen/drivers/char/Makefile                      |   14 +-
 xen/drivers/char/ns16550.c                     |   40 +-
 xen/drivers/cpufreq/Kconfig                    |    4 +
 xen/drivers/passthrough/Kconfig                |    4 +
 xen/drivers/passthrough/Makefile               |    4 +-
 xen/drivers/passthrough/iommu.c                |    4 +-
 xen/drivers/pci/Kconfig                        |    4 +
 xen/drivers/video/Kconfig                      |   13 +
 xen/drivers/video/Makefile                     |   14 +-
 xen/include/asm-arm/device.h                   |    2 +-
 xen/include/asm-arm/domain.h                   |    3 +-
 xen/include/asm-arm/gic.h                      |    4 +-
 xen/include/asm-arm/vgic.h                     |    2 +-
 xen/include/linux/kconfig.h                    |   54 +
 xen/include/xen/config.h                       |    2 +
 xen/include/xen/hvm/iommu.h                    |    2 +-
 xen/include/xen/iommu.h                        |   14 +-
 xen/include/xen/mem_access.h                   |    4 +-
 xen/include/xen/pdx.h                          |    4 +-
 xen/include/xen/sched.h                        |    4 +-
 xen/include/xsm/dummy.h                        |   14 +-
 xen/include/xsm/xsm.h                          |   28 +-
 xen/scripts/Kbuild.include                     |  305 +++
 xen/scripts/Makefile                           |   42 +
 xen/scripts/Makefile.asm-generic               |   23 +
 xen/scripts/Makefile.build                     |  427 ++++
 xen/scripts/Makefile.clean                     |   91 +
 xen/scripts/Makefile.extrawarn                 |   68 +
 xen/scripts/Makefile.help                      |    3 +
 xen/scripts/Makefile.host                      |  128 ++
 xen/scripts/Makefile.kasan                     |   29 +
 xen/scripts/Makefile.lib                       |  390 ++++
 xen/scripts/Makefile.modpost                   |  152 ++
 xen/scripts/basic/.gitignore                   |    1 +
 xen/scripts/basic/Makefile                     |   15 +
 xen/scripts/basic/fixdep.c                     |  462 +++++
 xen/scripts/gcc-goto.sh                        |   21 +
 xen/scripts/kconfig/.gitignore                 |   22 +
 xen/scripts/kconfig/Makefile                   |  317 +++
 xen/scripts/kconfig/POTFILES.in                |   12 +
 xen/scripts/kconfig/check.sh                   |   13 +
 xen/scripts/kconfig/conf.c                     |  722 +++++++
 xen/scripts/kconfig/confdata.c                 | 1248 ++++++++++++
 xen/scripts/kconfig/expr.c                     | 1206 +++++++++++
 xen/scripts/kconfig/expr.h                     |  238 +++
 xen/scripts/kconfig/gconf.c                    | 1521 ++++++++++++++
 xen/scripts/kconfig/gconf.glade                |  661 ++++++
 xen/scripts/kconfig/images.c                   |  326 +++
 xen/scripts/kconfig/kxgettext.c                |  235 +++
 xen/scripts/kconfig/list.h                     |  131 ++
 xen/scripts/kconfig/lkc.h                      |  186 ++
 xen/scripts/kconfig/lkc_proto.h                |   52 +
 xen/scripts/kconfig/lxdialog/.gitignore        |    4 +
 xen/scripts/kconfig/lxdialog/BIG.FAT.WARNING   |    4 +
 xen/scripts/kconfig/lxdialog/check-lxdialog.sh |   91 +
 xen/scripts/kconfig/lxdialog/checklist.c       |  332 +++
 xen/scripts/kconfig/lxdialog/dialog.h          |  257 +++
 xen/scripts/kconfig/lxdialog/inputbox.c        |  301 +++
 xen/scripts/kconfig/lxdialog/menubox.c         |  437 ++++
 xen/scripts/kconfig/lxdialog/textbox.c         |  408 ++++
 xen/scripts/kconfig/lxdialog/util.c            |  713 +++++++
 xen/scripts/kconfig/lxdialog/yesno.c           |  114 ++
 xen/scripts/kconfig/mconf.c                    | 1047 ++++++++++
 xen/scripts/kconfig/menu.c                     |  697 +++++++
 xen/scripts/kconfig/merge_config.sh            |  158 ++
 xen/scripts/kconfig/nconf.c                    | 1561 ++++++++++++++
 xen/scripts/kconfig/nconf.gui.c                |  656 ++++++
 xen/scripts/kconfig/nconf.h                    |   96 +
 xen/scripts/kconfig/qconf.cc                   | 1798 +++++++++++++++++
 xen/scripts/kconfig/qconf.h                    |  338 ++++
 xen/scripts/kconfig/streamline_config.pl       |  647 ++++++
 xen/scripts/kconfig/symbol.c                   | 1377 +++++++++++++
 xen/scripts/kconfig/util.c                     |  147 ++
 xen/scripts/kconfig/zconf.gperf                |   48 +
 xen/scripts/kconfig/zconf.hash.c_shipped       |  289 +++
 xen/scripts/kconfig/zconf.l                    |  372 ++++
 xen/scripts/kconfig/zconf.lex.c_shipped        | 2476 +++++++++++++++++++++++
 xen/scripts/kconfig/zconf.tab.c_shipped        | 2580 ++++++++++++++++++++++++
 xen/scripts/kconfig/zconf.y                    |  742 +++++++
 xen/scripts/link-vmlinux.sh                    |  252 +++
 xen/scripts/mkmakefile                         |   52 +
 xen/scripts/mksysmap                           |   44 +
 xen/scripts/setlocalversion                    |  174 ++
 xen/xsm/dummy.c                                |   10 +-
 xen/xsm/flask/hooks.c                          |   34 +-
 xen/xsm/xsm_core.c                             |    2 +-
 xen/xsm/xsm_policy.c                           |    4 +-
 117 files changed, 29337 insertions(+), 175 deletions(-)
 create mode 100644 xen/Kconfig
 create mode 100644 xen/Makefile.linux
 create mode 100644 xen/arch/arm/Kconfig
 create mode 100644 xen/arch/arm/Makefile.kconfig
 create mode 100644 xen/arch/arm/defconfig
 create mode 100644 xen/arch/x86/Kconfig
 create mode 100644 xen/arch/x86/Makefile.kconfig
 create mode 100644 xen/arch/x86/i386_defconfig
 create mode 100644 xen/arch/x86/x86_64_defconfig
 create mode 100644 xen/common/Kconfig
 create mode 100644 xen/drivers/Kconfig
 create mode 100644 xen/drivers/acpi/Kconfig
 create mode 100644 xen/drivers/char/Kconfig
 create mode 100644 xen/drivers/cpufreq/Kconfig
 create mode 100644 xen/drivers/passthrough/Kconfig
 create mode 100644 xen/drivers/pci/Kconfig
 create mode 100644 xen/drivers/video/Kconfig
 create mode 100644 xen/include/linux/kconfig.h
 create mode 100644 xen/scripts/Kbuild.include
 create mode 100644 xen/scripts/Makefile
 create mode 100644 xen/scripts/Makefile.asm-generic
 create mode 100644 xen/scripts/Makefile.build
 create mode 100644 xen/scripts/Makefile.clean
 create mode 100644 xen/scripts/Makefile.extrawarn
 create mode 100644 xen/scripts/Makefile.help
 create mode 100644 xen/scripts/Makefile.host
 create mode 100644 xen/scripts/Makefile.kasan
 create mode 100644 xen/scripts/Makefile.lib
 create mode 100644 xen/scripts/Makefile.modpost
 create mode 100644 xen/scripts/basic/.gitignore
 create mode 100644 xen/scripts/basic/Makefile
 create mode 100644 xen/scripts/basic/fixdep.c
 create mode 100755 xen/scripts/gcc-goto.sh
 create mode 100644 xen/scripts/kconfig/.gitignore
 create mode 100644 xen/scripts/kconfig/Makefile
 create mode 100644 xen/scripts/kconfig/POTFILES.in
 create mode 100755 xen/scripts/kconfig/check.sh
 create mode 100644 xen/scripts/kconfig/conf.c
 create mode 100644 xen/scripts/kconfig/confdata.c
 create mode 100644 xen/scripts/kconfig/expr.c
 create mode 100644 xen/scripts/kconfig/expr.h
 create mode 100644 xen/scripts/kconfig/gconf.c
 create mode 100644 xen/scripts/kconfig/gconf.glade
 create mode 100644 xen/scripts/kconfig/images.c
 create mode 100644 xen/scripts/kconfig/kxgettext.c
 create mode 100644 xen/scripts/kconfig/list.h
 create mode 100644 xen/scripts/kconfig/lkc.h
 create mode 100644 xen/scripts/kconfig/lkc_proto.h
 create mode 100644 xen/scripts/kconfig/lxdialog/.gitignore
 create mode 100644 xen/scripts/kconfig/lxdialog/BIG.FAT.WARNING
 create mode 100755 xen/scripts/kconfig/lxdialog/check-lxdialog.sh
 create mode 100644 xen/scripts/kconfig/lxdialog/checklist.c
 create mode 100644 xen/scripts/kconfig/lxdialog/dialog.h
 create mode 100644 xen/scripts/kconfig/lxdialog/inputbox.c
 create mode 100644 xen/scripts/kconfig/lxdialog/menubox.c
 create mode 100644 xen/scripts/kconfig/lxdialog/textbox.c
 create mode 100644 xen/scripts/kconfig/lxdialog/util.c
 create mode 100644 xen/scripts/kconfig/lxdialog/yesno.c
 create mode 100644 xen/scripts/kconfig/mconf.c
 create mode 100644 xen/scripts/kconfig/menu.c
 create mode 100755 xen/scripts/kconfig/merge_config.sh
 create mode 100644 xen/scripts/kconfig/nconf.c
 create mode 100644 xen/scripts/kconfig/nconf.gui.c
 create mode 100644 xen/scripts/kconfig/nconf.h
 create mode 100644 xen/scripts/kconfig/qconf.cc
 create mode 100644 xen/scripts/kconfig/qconf.h
 create mode 100755 xen/scripts/kconfig/streamline_config.pl
 create mode 100644 xen/scripts/kconfig/symbol.c
 create mode 100644 xen/scripts/kconfig/util.c
 create mode 100644 xen/scripts/kconfig/zconf.gperf
 create mode 100644 xen/scripts/kconfig/zconf.hash.c_shipped
 create mode 100644 xen/scripts/kconfig/zconf.l
 create mode 100644 xen/scripts/kconfig/zconf.lex.c_shipped
 create mode 100644 xen/scripts/kconfig/zconf.tab.c_shipped
 create mode 100644 xen/scripts/kconfig/zconf.y
 create mode 100755 xen/scripts/link-vmlinux.sh
 create mode 100755 xen/scripts/mkmakefile
 create mode 100755 xen/scripts/mksysmap
 create mode 100755 xen/scripts/setlocalversion
Signature · 1 line
2.4.9
#1 lore raw

RFC 1/29 build: import Kbuild/Kconfig from Linux 4.2

Brings in the Kbuild/Kconfig plumbing from the Linux 4.2 release.

---
 xen/Makefile.linux                             | 1596 +++++++++++++++
 xen/include/linux/kconfig.h                    |   54 +
 xen/scripts/Kbuild.include                     |  305 +++
 xen/scripts/Makefile                           |   42 +
 xen/scripts/Makefile.asm-generic               |   23 +
 xen/scripts/Makefile.build                     |  427 ++++
 xen/scripts/Makefile.clean                     |   91 +
 xen/scripts/Makefile.extrawarn                 |   68 +
 xen/scripts/Makefile.help                      |    3 +
 xen/scripts/Makefile.host                      |  128 ++
 xen/scripts/Makefile.kasan                     |   29 +
 xen/scripts/Makefile.lib                       |  390 ++++
 xen/scripts/Makefile.modpost                   |  152 ++
 xen/scripts/basic/.gitignore                   |    2 +
 xen/scripts/basic/Makefile                     |   16 +
 xen/scripts/basic/fixdep.c                     |  462 +++++
 xen/scripts/gcc-goto.sh                        |   21 +
 xen/scripts/kconfig/.gitignore                 |   22 +
 xen/scripts/kconfig/Makefile                   |  317 +++
 xen/scripts/kconfig/POTFILES.in                |   12 +
 xen/scripts/kconfig/check.sh                   |   13 +
 xen/scripts/kconfig/conf.c                     |  722 +++++++
 xen/scripts/kconfig/confdata.c                 | 1248 ++++++++++++
 xen/scripts/kconfig/expr.c                     | 1206 +++++++++++
 xen/scripts/kconfig/expr.h                     |  238 +++
 xen/scripts/kconfig/gconf.c                    | 1521 ++++++++++++++
 xen/scripts/kconfig/gconf.glade                |  661 ++++++
 xen/scripts/kconfig/images.c                   |  326 +++
 xen/scripts/kconfig/kxgettext.c                |  235 +++
 xen/scripts/kconfig/list.h                     |  131 ++
 xen/scripts/kconfig/lkc.h                      |  186 ++
 xen/scripts/kconfig/lkc_proto.h                |   52 +
 xen/scripts/kconfig/lxdialog/.gitignore        |    4 +
 xen/scripts/kconfig/lxdialog/BIG.FAT.WARNING   |    4 +
 xen/scripts/kconfig/lxdialog/check-lxdialog.sh |   91 +
 xen/scripts/kconfig/lxdialog/checklist.c       |  332 +++
 xen/scripts/kconfig/lxdialog/dialog.h          |  257 +++
 xen/scripts/kconfig/lxdialog/inputbox.c        |  301 +++
 xen/scripts/kconfig/lxdialog/menubox.c         |  437 ++++
 xen/scripts/kconfig/lxdialog/textbox.c         |  408 ++++
 xen/scripts/kconfig/lxdialog/util.c            |  713 +++++++
 xen/scripts/kconfig/lxdialog/yesno.c           |  114 ++
 xen/scripts/kconfig/mconf.c                    | 1047 ++++++++++
 xen/scripts/kconfig/menu.c                     |  697 +++++++
 xen/scripts/kconfig/merge_config.sh            |  158 ++
 xen/scripts/kconfig/nconf.c                    | 1561 ++++++++++++++
 xen/scripts/kconfig/nconf.gui.c                |  656 ++++++
 xen/scripts/kconfig/nconf.h                    |   96 +
 xen/scripts/kconfig/qconf.cc                   | 1798 +++++++++++++++++
 xen/scripts/kconfig/qconf.h                    |  338 ++++
 xen/scripts/kconfig/streamline_config.pl       |  647 ++++++
 xen/scripts/kconfig/symbol.c                   | 1377 +++++++++++++
 xen/scripts/kconfig/util.c                     |  147 ++
 xen/scripts/kconfig/zconf.gperf                |   48 +
 xen/scripts/kconfig/zconf.hash.c_shipped       |  289 +++
 xen/scripts/kconfig/zconf.l                    |  372 ++++
 xen/scripts/kconfig/zconf.lex.c_shipped        | 2476 +++++++++++++++++++++++
 xen/scripts/kconfig/zconf.tab.c_shipped        | 2580 ++++++++++++++++++++++++
 xen/scripts/kconfig/zconf.y                    |  742 +++++++
 xen/scripts/link-vmlinux.sh                    |  252 +++
 xen/scripts/mkmakefile                         |   52 +
 xen/scripts/mksysmap                           |   44 +
 xen/scripts/setlocalversion                    |  174 ++
 63 files changed, 28911 insertions(+)
 create mode 100644 xen/Makefile.linux
 create mode 100644 xen/include/linux/kconfig.h
 create mode 100644 xen/scripts/Kbuild.include
 create mode 100644 xen/scripts/Makefile
 create mode 100644 xen/scripts/Makefile.asm-generic
 create mode 100644 xen/scripts/Makefile.build
 create mode 100644 xen/scripts/Makefile.clean
 create mode 100644 xen/scripts/Makefile.extrawarn
 create mode 100644 xen/scripts/Makefile.help
 create mode 100644 xen/scripts/Makefile.host
 create mode 100644 xen/scripts/Makefile.kasan
 create mode 100644 xen/scripts/Makefile.lib
 create mode 100644 xen/scripts/Makefile.modpost
 create mode 100644 xen/scripts/basic/.gitignore
 create mode 100644 xen/scripts/basic/Makefile
 create mode 100644 xen/scripts/basic/fixdep.c
 create mode 100755 xen/scripts/gcc-goto.sh
 create mode 100644 xen/scripts/kconfig/.gitignore
 create mode 100644 xen/scripts/kconfig/Makefile
 create mode 100644 xen/scripts/kconfig/POTFILES.in
 create mode 100755 xen/scripts/kconfig/check.sh
 create mode 100644 xen/scripts/kconfig/conf.c
 create mode 100644 xen/scripts/kconfig/confdata.c
 create mode 100644 xen/scripts/kconfig/expr.c
 create mode 100644 xen/scripts/kconfig/expr.h
 create mode 100644 xen/scripts/kconfig/gconf.c
 create mode 100644 xen/scripts/kconfig/gconf.glade
 create mode 100644 xen/scripts/kconfig/images.c
 create mode 100644 xen/scripts/kconfig/kxgettext.c
 create mode 100644 xen/scripts/kconfig/list.h
 create mode 100644 xen/scripts/kconfig/lkc.h
 create mode 100644 xen/scripts/kconfig/lkc_proto.h
 create mode 100644 xen/scripts/kconfig/lxdialog/.gitignore
 create mode 100644 xen/scripts/kconfig/lxdialog/BIG.FAT.WARNING
 create mode 100755 xen/scripts/kconfig/lxdialog/check-lxdialog.sh
 create mode 100644 xen/scripts/kconfig/lxdialog/checklist.c
 create mode 100644 xen/scripts/kconfig/lxdialog/dialog.h
 create mode 100644 xen/scripts/kconfig/lxdialog/inputbox.c
 create mode 100644 xen/scripts/kconfig/lxdialog/menubox.c
 create mode 100644 xen/scripts/kconfig/lxdialog/textbox.c
 create mode 100644 xen/scripts/kconfig/lxdialog/util.c
 create mode 100644 xen/scripts/kconfig/lxdialog/yesno.c
 create mode 100644 xen/scripts/kconfig/mconf.c
 create mode 100644 xen/scripts/kconfig/menu.c
 create mode 100755 xen/scripts/kconfig/merge_config.sh
 create mode 100644 xen/scripts/kconfig/nconf.c
 create mode 100644 xen/scripts/kconfig/nconf.gui.c
 create mode 100644 xen/scripts/kconfig/nconf.h
 create mode 100644 xen/scripts/kconfig/qconf.cc
 create mode 100644 xen/scripts/kconfig/qconf.h
 create mode 100755 xen/scripts/kconfig/streamline_config.pl
 create mode 100644 xen/scripts/kconfig/symbol.c
 create mode 100644 xen/scripts/kconfig/util.c
 create mode 100644 xen/scripts/kconfig/zconf.gperf
 create mode 100644 xen/scripts/kconfig/zconf.hash.c_shipped
 create mode 100644 xen/scripts/kconfig/zconf.l
 create mode 100644 xen/scripts/kconfig/zconf.lex.c_shipped
 create mode 100644 xen/scripts/kconfig/zconf.tab.c_shipped
 create mode 100644 xen/scripts/kconfig/zconf.y
 create mode 100755 xen/scripts/link-vmlinux.sh
 create mode 100755 xen/scripts/mkmakefile
 create mode 100755 xen/scripts/mksysmap
 create mode 100755 xen/scripts/setlocalversion
xen/Makefile.linux new file +1596 -0
new file mode 100644
index 0000000..c361593
@@ -0,0 +1,1596 @@
+VERSION = 4
+PATCHLEVEL = 2
+SUBLEVEL = 0
+EXTRAVERSION =
+NAME = Hurr durr I'ma sheep
+
+# *DOCUMENTATION*
+# To see a list of typical targets execute "make help"
+# More info can be located in ./README
+# Comments in this file are targeted only to the developer, do not
+# expect to learn how to build the kernel reading this file.
+
+# o Do not use make's built-in rules and variables
+#   (this increases performance and avoids hard-to-debug behaviour);
+# o Look for make include files relative to root of kernel src
+MAKEFLAGS += -rR --include-dir=$(CURDIR)
+
+# Avoid funny character set dependencies
+unexport LC_ALL
+LC_COLLATE=C
+LC_NUMERIC=C
+export LC_COLLATE LC_NUMERIC
+
+# Avoid interference with shell env settings
+unexport GREP_OPTIONS
+
+# We are using a recursive build, so we need to do a little thinking
+# to get the ordering right.
+#
+# Most importantly: sub-Makefiles should only ever modify files in
+# their own directory. If in some directory we have a dependency on
+# a file in another dir (which doesn't happen often, but it's often
+# unavoidable when linking the built-in.o targets which finally
+# turn into vmlinux), we will call a sub make in that other dir, and
+# after that we are sure that everything which is in that other dir
+# is now up to date.
+#
+# The only cases where we need to modify files which have global
+# effects are thus separated out and done before the recursive
+# descending is started. They are now explicitly listed as the
+# prepare rule.
+
+# Beautify output
+# ---------------------------------------------------------------------------
+#
+# Normally, we echo the whole command before executing it. By making
+# that echo $($(quiet)$(cmd)), we now have the possibility to set
+# $(quiet) to choose other forms of output instead, e.g.
+#
+#         quiet_cmd_cc_o_c = Compiling $(RELDIR)/$@
+#         cmd_cc_o_c       = $(CC) $(c_flags) -c -o $@ $<
+#
+# If $(quiet) is empty, the whole command will be printed.
+# If it is set to "quiet_", only the short version will be printed.
+# If it is set to "silent_", nothing will be printed at all, since
+# the variable $(silent_cmd_cc_o_c) doesn't exist.
+#
+# A simple variant is to prefix commands with $(Q) - that's useful
+# for commands that shall be hidden in non-verbose mode.
+#
+#	$(Q)ln $@ :<
+#
+# If KBUILD_VERBOSE equals 0 then the above command will be hidden.
+# If KBUILD_VERBOSE equals 1 then the above command is displayed.
+#
+# To put more focus on warnings, be less verbose as default
+# Use 'make V=1' to see the full commands
+
+ifeq ("$(origin V)", "command line")
+  KBUILD_VERBOSE = $(V)
+endif
+ifndef KBUILD_VERBOSE
+  KBUILD_VERBOSE = 0
+endif
+
+ifeq ($(KBUILD_VERBOSE),1)
+  quiet =
+  Q =
+else
+  quiet=quiet_
+  Q = @
+endif
+
+# If the user is running make -s (silent mode), suppress echoing of
+# commands
+
+ifneq ($(filter 4.%,$(MAKE_VERSION)),)	# make-4
+ifneq ($(filter %s ,$(firstword x$(MAKEFLAGS))),)
+  quiet=silent_
+endif
+else					# make-3.8x
+ifneq ($(filter s% -s%,$(MAKEFLAGS)),)
+  quiet=silent_
+endif
+endif
+
+export quiet Q KBUILD_VERBOSE
+
+# kbuild supports saving output files in a separate directory.
+# To locate output files in a separate directory two syntaxes are supported.
+# In both cases the working directory must be the root of the kernel src.
+# 1) O=
+# Use "make O=dir/to/store/output/files/"
+#
+# 2) Set KBUILD_OUTPUT
+# Set the environment variable KBUILD_OUTPUT to point to the directory
+# where the output files shall be placed.
+# export KBUILD_OUTPUT=dir/to/store/output/files/
+# make
+#
+# The O= assignment takes precedence over the KBUILD_OUTPUT environment
+# variable.
+
+# KBUILD_SRC is set on invocation of make in OBJ directory
+# KBUILD_SRC is not intended to be used by the regular user (for now)
+ifeq ($(KBUILD_SRC),)
+
+# OK, Make called in directory where kernel src resides
+# Do we want to locate output files in a separate directory?
+ifeq ("$(origin O)", "command line")
+  KBUILD_OUTPUT := $(O)
+endif
+
+# That's our default target when none is given on the command line
+PHONY := _all
+_all:
+
+# Cancel implicit rules on top Makefile
+$(CURDIR)/Makefile Makefile: ;
+
+ifneq ($(KBUILD_OUTPUT),)
+# Invoke a second make in the output directory, passing relevant variables
+# check that the output directory actually exists
+saved-output := $(KBUILD_OUTPUT)
+KBUILD_OUTPUT := $(shell mkdir -p $(KBUILD_OUTPUT) && cd $(KBUILD_OUTPUT) \
+								&& /bin/pwd)
+$(if $(KBUILD_OUTPUT),, \
+     $(error failed to create output directory "$(saved-output)"))
+
+PHONY += $(MAKECMDGOALS) sub-make
+
+$(filter-out _all sub-make $(CURDIR)/Makefile, $(MAKECMDGOALS)) _all: sub-make
+	@:
+
+sub-make: FORCE
+	$(Q)$(MAKE) -C $(KBUILD_OUTPUT) KBUILD_SRC=$(CURDIR) \
+	-f $(CURDIR)/Makefile $(filter-out _all sub-make,$(MAKECMDGOALS))
+
+# Leave processing to above invocation of make
+skip-makefile := 1
+endif # ifneq ($(KBUILD_OUTPUT),)
+endif # ifeq ($(KBUILD_SRC),)
+
+# We process the rest of the Makefile if this is the final invocation of make
+ifeq ($(skip-makefile),)
+
+# Do not print "Entering directory ...",
+# but we want to display it when entering to the output directory
+# so that IDEs/editors are able to understand relative filenames.
+MAKEFLAGS += --no-print-directory
+
+# Call a source code checker (by default, "sparse") as part of the
+# C compilation.
+#
+# Use 'make C=1' to enable checking of only re-compiled files.
+# Use 'make C=2' to enable checking of *all* source files, regardless
+# of whether they are re-compiled or not.
+#
+# See the file "Documentation/sparse.txt" for more details, including
+# where to get the "sparse" utility.
+
+ifeq ("$(origin C)", "command line")
+  KBUILD_CHECKSRC = $(C)
+endif
+ifndef KBUILD_CHECKSRC
+  KBUILD_CHECKSRC = 0
+endif
+
+# Use make M=dir to specify directory of external module to build
+# Old syntax make ... SUBDIRS=$PWD is still supported
+# Setting the environment variable KBUILD_EXTMOD take precedence
+ifdef SUBDIRS
+  KBUILD_EXTMOD ?= $(SUBDIRS)
+endif
+
+ifeq ("$(origin M)", "command line")
+  KBUILD_EXTMOD := $(M)
+endif
+
+# If building an external module we do not care about the all: rule
+# but instead _all depend on modules
+PHONY += all
+ifeq ($(KBUILD_EXTMOD),)
+_all: all
+else
+_all: modules
+endif
+
+ifeq ($(KBUILD_SRC),)
+        # building in the source tree
+        srctree := .
+else
+        ifeq ($(KBUILD_SRC)/,$(dir $(CURDIR)))
+                # building in a subdirectory of the source tree
+                srctree := ..
+        else
+                srctree := $(KBUILD_SRC)
+        endif
+endif
+objtree		:= .
+src		:= $(srctree)
+obj		:= $(objtree)
+
+VPATH		:= $(srctree)$(if $(KBUILD_EXTMOD),:$(KBUILD_EXTMOD))
+
+export srctree objtree VPATH
+
+# SUBARCH tells the usermode build what the underlying arch is.  That is set
+# first, and if a usermode build is happening, the "ARCH=um" on the command
+# line overrides the setting of ARCH below.  If a native build is happening,
+# then ARCH is assigned, getting whatever value it gets normally, and
+# SUBARCH is subsequently ignored.
+
+SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \
+				  -e s/sun4u/sparc64/ \
+				  -e s/arm.*/arm/ -e s/sa110/arm/ \
+				  -e s/s390x/s390/ -e s/parisc64/parisc/ \
+				  -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
+				  -e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ )
+
+# Cross compiling and selecting different set of gcc/bin-utils
+# ---------------------------------------------------------------------------
+#
+# When performing cross compilation for other architectures ARCH shall be set
+# to the target architecture. (See arch/* for the possibilities).
+# ARCH can be set during invocation of make:
+# make ARCH=ia64
+# Another way is to have ARCH set in the environment.
+# The default ARCH is the host where make is executed.
+
+# CROSS_COMPILE specify the prefix used for all executables used
+# during compilation. Only gcc and related bin-utils executables
+# are prefixed with $(CROSS_COMPILE).
+# CROSS_COMPILE can be set on the command line
+# make CROSS_COMPILE=ia64-linux-
+# Alternatively CROSS_COMPILE can be set in the environment.
+# A third alternative is to store a setting in .config so that plain
+# "make" in the configured kernel build directory always uses that.
+# Default value for CROSS_COMPILE is not to prefix executables
+# Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
+ARCH		?= $(SUBARCH)
+CROSS_COMPILE	?= $(CONFIG_CROSS_COMPILE:"%"=%)
+
+# Architecture as present in compile.h
+UTS_MACHINE 	:= $(ARCH)
+SRCARCH 	:= $(ARCH)
+
+# Additional ARCH settings for x86
+ifeq ($(ARCH),i386)
+        SRCARCH := x86
+endif
+ifeq ($(ARCH),x86_64)
+        SRCARCH := x86
+endif
+
+# Additional ARCH settings for sparc
+ifeq ($(ARCH),sparc32)
+       SRCARCH := sparc
+endif
+ifeq ($(ARCH),sparc64)
+       SRCARCH := sparc
+endif
+
+# Additional ARCH settings for sh
+ifeq ($(ARCH),sh64)
+       SRCARCH := sh
+endif
+
+# Additional ARCH settings for tile
+ifeq ($(ARCH),tilepro)
+       SRCARCH := tile
+endif
+ifeq ($(ARCH),tilegx)
+       SRCARCH := tile
+endif
+
+# Where to locate arch specific headers
+hdr-arch  := $(SRCARCH)
+
+KCONFIG_CONFIG	?= .config
+export KCONFIG_CONFIG
+
+# SHELL used by kbuild
+CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
+	  else if [ -x /bin/bash ]; then echo /bin/bash; \
+	  else echo sh; fi ; fi)
+
+HOSTCC       = gcc
+HOSTCXX      = g++
+HOSTCFLAGS   = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu89
+HOSTCXXFLAGS = -O2
+
+ifeq ($(shell $(HOSTCC) -v 2>&1 | grep -c "clang version"), 1)
+HOSTCFLAGS  += -Wno-unused-value -Wno-unused-parameter \
+		-Wno-missing-field-initializers -fno-delete-null-pointer-checks
+endif
+
+# Decide whether to build built-in, modular, or both.
+# Normally, just do built-in.
+
+KBUILD_MODULES :=
+KBUILD_BUILTIN := 1
+
+# If we have only "make modules", don't compile built-in objects.
+# When we're building modules with modversions, we need to consider
+# the built-in objects during the descend as well, in order to
+# make sure the checksums are up to date before we record them.
+
+ifeq ($(MAKECMDGOALS),modules)
+  KBUILD_BUILTIN := $(if $(CONFIG_MODVERSIONS),1)
+endif
+
+# If we have "make <whatever> modules", compile modules
+# in addition to whatever we do anyway.
+# Just "make" or "make all" shall build modules as well
+
+ifneq ($(filter all _all modules,$(MAKECMDGOALS)),)
+  KBUILD_MODULES := 1
+endif
+
+ifeq ($(MAKECMDGOALS),)
+  KBUILD_MODULES := 1
+endif
+
+export KBUILD_MODULES KBUILD_BUILTIN
+export KBUILD_CHECKSRC KBUILD_SRC KBUILD_EXTMOD
+
+# We need some generic definitions (do not try to remake the file).
+scripts/Kbuild.include: ;
+include scripts/Kbuild.include
+
+# Make variables (CC, etc...)
+AS		= $(CROSS_COMPILE)as
+LD		= $(CROSS_COMPILE)ld
+CC		= $(CROSS_COMPILE)gcc
+CPP		= $(CC) -E
+AR		= $(CROSS_COMPILE)ar
+NM		= $(CROSS_COMPILE)nm
+STRIP		= $(CROSS_COMPILE)strip
+OBJCOPY		= $(CROSS_COMPILE)objcopy
+OBJDUMP		= $(CROSS_COMPILE)objdump
+AWK		= awk
+GENKSYMS	= scripts/genksyms/genksyms
+INSTALLKERNEL  := installkernel
+DEPMOD		= /sbin/depmod
+PERL		= perl
+PYTHON		= python
+CHECK		= sparse
+
+CHECKFLAGS     := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
+		  -Wbitwise -Wno-return-void $(CF)
+CFLAGS_MODULE   =
+AFLAGS_MODULE   =
+LDFLAGS_MODULE  =
+CFLAGS_KERNEL	=
+AFLAGS_KERNEL	=
+CFLAGS_GCOV	= -fprofile-arcs -ftest-coverage
+
+
+# Use USERINCLUDE when you must reference the UAPI directories only.
+USERINCLUDE    := \
+		-I$(srctree)/arch/$(hdr-arch)/include/uapi \
+		-Iarch/$(hdr-arch)/include/generated/uapi \
+		-I$(srctree)/include/uapi \
+		-Iinclude/generated/uapi \
+                -include $(srctree)/include/linux/kconfig.h
+
+# Use LINUXINCLUDE when you must reference the include/ directory.
+# Needed to be compatible with the O= option
+LINUXINCLUDE    := \
+		-I$(srctree)/arch/$(hdr-arch)/include \
+		-Iarch/$(hdr-arch)/include/generated/uapi \
+		-Iarch/$(hdr-arch)/include/generated \
+		$(if $(KBUILD_SRC), -I$(srctree)/include) \
+		-Iinclude \
+		$(USERINCLUDE)
+
+KBUILD_CPPFLAGS := -D__KERNEL__
+
+KBUILD_CFLAGS   := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
+		   -fno-strict-aliasing -fno-common \
+		   -Werror-implicit-function-declaration \
+		   -Wno-format-security \
+		   -std=gnu89
+
+KBUILD_AFLAGS_KERNEL :=
+KBUILD_CFLAGS_KERNEL :=
+KBUILD_AFLAGS   := -D__ASSEMBLY__
+KBUILD_AFLAGS_MODULE  := -DMODULE
+KBUILD_CFLAGS_MODULE  := -DMODULE
+KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds
+
+# Read KERNELRELEASE from include/config/kernel.release (if it exists)
+KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
+KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
+
+export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION
+export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC
+export CPP AR NM STRIP OBJCOPY OBJDUMP
+export MAKE AWK GENKSYMS INSTALLKERNEL PERL PYTHON UTS_MACHINE
+export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
+
+export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS
+export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE CFLAGS_GCOV CFLAGS_KASAN
+export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE
+export KBUILD_AFLAGS_MODULE KBUILD_CFLAGS_MODULE KBUILD_LDFLAGS_MODULE
+export KBUILD_AFLAGS_KERNEL KBUILD_CFLAGS_KERNEL
+export KBUILD_ARFLAGS
+
+# When compiling out-of-tree modules, put MODVERDIR in the module
+# tree rather than in the kernel tree. The kernel tree might
+# even be read-only.
+export MODVERDIR := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/).tmp_versions
+
+# Files to ignore in find ... statements
+
+export RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o    \
+			  -name CVS -o -name .pc -o -name .hg -o -name .git \) \
+			  -prune -o
+export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn \
+			 --exclude CVS --exclude .pc --exclude .hg --exclude .git
+
+# ===========================================================================
+# Rules shared between *config targets and build targets
+
+# Basic helpers built in scripts/
+PHONY += scripts_basic
+scripts_basic:
+	$(Q)$(MAKE) $(build)=scripts/basic
+	$(Q)rm -f .tmp_quiet_recordmcount
+
+# To avoid any implicit rule to kick in, define an empty command.
+scripts/basic/%: scripts_basic ;
+
+PHONY += outputmakefile
+# outputmakefile generates a Makefile in the output directory, if using a
+# separate output directory. This allows convenient use of make in the
+# output directory.
+outputmakefile:
+ifneq ($(KBUILD_SRC),)
+	$(Q)ln -fsn $(srctree) source
+	$(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile \
+	    $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL)
+endif
+
+# Support for using generic headers in asm-generic
+PHONY += asm-generic
+asm-generic:
+	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.asm-generic \
+	            src=asm obj=arch/$(SRCARCH)/include/generated/asm
+	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.asm-generic \
+	            src=uapi/asm obj=arch/$(SRCARCH)/include/generated/uapi/asm
+
+# To make sure we do not include .config for any of the *config targets
+# catch them early, and hand them over to scripts/kconfig/Makefile
+# It is allowed to specify more targets when calling make, including
+# mixing *config targets and build targets.
+# For example 'make oldconfig all'.
+# Detect when mixed targets is specified, and make a second invocation
+# of make so .config is not included in this case either (for *config).
+
+version_h := include/generated/uapi/linux/version.h
+old_version_h := include/linux/version.h
+
+no-dot-config-targets := clean mrproper distclean \
+			 cscope gtags TAGS tags help% %docs check% coccicheck \
+			 $(version_h) headers_% archheaders archscripts \
+			 kernelversion %src-pkg
+
+config-targets := 0
+mixed-targets  := 0
+dot-config     := 1
+
+ifneq ($(filter $(no-dot-config-targets), $(MAKECMDGOALS)),)
+	ifeq ($(filter-out $(no-dot-config-targets), $(MAKECMDGOALS)),)
+		dot-config := 0
+	endif
+endif
+
+ifeq ($(KBUILD_EXTMOD),)
+        ifneq ($(filter config %config,$(MAKECMDGOALS)),)
+                config-targets := 1
+                ifneq ($(words $(MAKECMDGOALS)),1)
+                        mixed-targets := 1
+                endif
+        endif
+endif
+
+ifeq ($(mixed-targets),1)
+# ===========================================================================
+# We're called with mixed targets (*config and build targets).
+# Handle them one by one.
+
+PHONY += $(MAKECMDGOALS) __build_one_by_one
+
+$(filter-out __build_one_by_one, $(MAKECMDGOALS)): __build_one_by_one
+	@:
+
+__build_one_by_one:
+	$(Q)set -e; \
+	for i in $(MAKECMDGOALS); do \
+		$(MAKE) -f $(srctree)/Makefile $$i; \
+	done
+
+else
+ifeq ($(config-targets),1)
+# ===========================================================================
+# *config targets only - make sure prerequisites are updated, and descend
+# in scripts/kconfig to make the *config target
+
+# Read arch specific Makefile to set KBUILD_DEFCONFIG as needed.
+# KBUILD_DEFCONFIG may point out an alternative default configuration
+# used for 'make defconfig'
+include arch/$(SRCARCH)/Makefile
+export KBUILD_DEFCONFIG KBUILD_KCONFIG
+
+config: scripts_basic outputmakefile FORCE
+	$(Q)$(MAKE) $(build)=scripts/kconfig $@
+
+%config: scripts_basic outputmakefile FORCE
+	$(Q)$(MAKE) $(build)=scripts/kconfig $@
+
+else
+# ===========================================================================
+# Build targets only - this includes vmlinux, arch specific targets, clean
+# targets and others. In general all targets except *config targets.
+
+ifeq ($(KBUILD_EXTMOD),)
+# Additional helpers built in scripts/
+# Carefully list dependencies so we do not try to build scripts twice
+# in parallel
+PHONY += scripts
+scripts: scripts_basic include/config/auto.conf include/config/tristate.conf \
+	 asm-generic
+	$(Q)$(MAKE) $(build)=$(@)
+
+# Objects we will link into vmlinux / subdirs we need to visit
+init-y		:= init/
+drivers-y	:= drivers/ sound/ firmware/
+net-y		:= net/
+libs-y		:= lib/
+core-y		:= usr/
+endif # KBUILD_EXTMOD
+
+ifeq ($(dot-config),1)
+# Read in config
+-include include/config/auto.conf
+
+ifeq ($(KBUILD_EXTMOD),)
+# Read in dependencies to all Kconfig* files, make sure to run
+# oldconfig if changes are detected.
+-include include/config/auto.conf.cmd
+
+# To avoid any implicit rule to kick in, define an empty command
+$(KCONFIG_CONFIG) include/config/auto.conf.cmd: ;
+
+# If .config is newer than include/config/auto.conf, someone tinkered
+# with it and forgot to run make oldconfig.
+# if auto.conf.cmd is missing then we are probably in a cleaned tree so
+# we execute the config step to be sure to catch updated Kconfig files
+include/config/%.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd
+	$(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig
+else
+# external modules needs include/generated/autoconf.h and include/config/auto.conf
+# but do not care if they are up-to-date. Use auto.conf to trigger the test
+PHONY += include/config/auto.conf
+
+include/config/auto.conf:
+	$(Q)test -e include/generated/autoconf.h -a -e $@ || (		\
+	echo >&2;							\
+	echo >&2 "  ERROR: Kernel configuration is invalid.";		\
+	echo >&2 "         include/generated/autoconf.h or $@ are missing.";\
+	echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it.";	\
+	echo >&2 ;							\
+	/bin/false)
+
+endif # KBUILD_EXTMOD
+
+else
+# Dummy target needed, because used as prerequisite
+include/config/auto.conf: ;
+endif # $(dot-config)
+
+# The all: target is the default when no target is given on the
+# command line.
+# This allow a user to issue only 'make' to build a kernel including modules
+# Defaults to vmlinux, but the arch makefile usually adds further targets
+all: vmlinux
+
+# The arch Makefile can set ARCH_{CPP,A,C}FLAGS to override the default
+# values of the respective KBUILD_* variables
+ARCH_CPPFLAGS :=
+ARCH_AFLAGS :=
+ARCH_CFLAGS :=
+include arch/$(SRCARCH)/Makefile
+
+KBUILD_CFLAGS	+= $(call cc-option,-fno-delete-null-pointer-checks,)
+
+ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
+KBUILD_CFLAGS	+= -Os $(call cc-disable-warning,maybe-uninitialized,)
+else
+KBUILD_CFLAGS	+= -O2
+endif
+
+# Tell gcc to never replace conditional load with a non-conditional one
+KBUILD_CFLAGS	+= $(call cc-option,--param=allow-store-data-races=0)
+
+ifdef CONFIG_READABLE_ASM
+# Disable optimizations that make assembler listings hard to read.
+# reorder blocks reorders the control in the function
+# ipa clone creates specialized cloned functions
+# partial inlining inlines only parts of functions
+KBUILD_CFLAGS += $(call cc-option,-fno-reorder-blocks,) \
+                 $(call cc-option,-fno-ipa-cp-clone,) \
+                 $(call cc-option,-fno-partial-inlining)
+endif
+
+ifneq ($(CONFIG_FRAME_WARN),0)
+KBUILD_CFLAGS += $(call cc-option,-Wframe-larger-than=${CONFIG_FRAME_WARN})
+endif
+
+# Handle stack protector mode.
+#
+# Since kbuild can potentially perform two passes (first with the old
+# .config values and then with updated .config values), we cannot error out
+# if a desired compiler option is unsupported. If we were to error, kbuild
+# could never get to the second pass and actually notice that we changed
+# the option to something that was supported.
+#
+# Additionally, we don't want to fallback and/or silently change which compiler
+# flags will be used, since that leads to producing kernels with different
+# security feature characteristics depending on the compiler used. ("But I
+# selected CC_STACKPROTECTOR_STRONG! Why did it build with _REGULAR?!")
+#
+# The middle ground is to warn here so that the failed option is obvious, but
+# to let the build fail with bad compiler flags so that we can't produce a
+# kernel when there is a CONFIG and compiler mismatch.
+#
+ifdef CONFIG_CC_STACKPROTECTOR_REGULAR
+  stackp-flag := -fstack-protector
+  ifeq ($(call cc-option, $(stackp-flag)),)
+    $(warning Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR: \
+             -fstack-protector not supported by compiler)
+  endif
+else
+ifdef CONFIG_CC_STACKPROTECTOR_STRONG
+  stackp-flag := -fstack-protector-strong
+  ifeq ($(call cc-option, $(stackp-flag)),)
+    $(warning Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: \
+	      -fstack-protector-strong not supported by compiler)
+  endif
+else
+  # Force off for distro compilers that enable stack protector by default.
+  stackp-flag := $(call cc-option, -fno-stack-protector)
+endif
+endif
+KBUILD_CFLAGS += $(stackp-flag)
+
+ifeq ($(shell $(CC) -v 2>&1 | grep -c "clang version"), 1)
+COMPILER := clang
+else
+COMPILER := gcc
+endif
+export COMPILER
+
+ifeq ($(COMPILER),clang)
+KBUILD_CPPFLAGS += $(call cc-option,-Qunused-arguments,)
+KBUILD_CPPFLAGS += $(call cc-option,-Wno-unknown-warning-option,)
+KBUILD_CFLAGS += $(call cc-disable-warning, unused-variable)
+KBUILD_CFLAGS += $(call cc-disable-warning, format-invalid-specifier)
+KBUILD_CFLAGS += $(call cc-disable-warning, gnu)
+# Quiet clang warning: comparison of unsigned expression < 0 is always false
+KBUILD_CFLAGS += $(call cc-disable-warning, tautological-compare)
+# CLANG uses a _MergedGlobals as optimization, but this breaks modpost, as the
+# source of a reference will be _MergedGlobals and not on of the whitelisted names.
+# See modpost pattern 2
+KBUILD_CFLAGS += $(call cc-option, -mno-global-merge,)
+KBUILD_CFLAGS += $(call cc-option, -fcatch-undefined-behavior)
+else
+
+# This warning generated too much noise in a regular build.
+# Use make W=1 to enable this warning (see scripts/Makefile.build)
+KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable)
+endif
+
+ifdef CONFIG_FRAME_POINTER
+KBUILD_CFLAGS	+= -fno-omit-frame-pointer -fno-optimize-sibling-calls
+else
+# Some targets (ARM with Thumb2, for example), can't be built with frame
+# pointers.  For those, we don't have FUNCTION_TRACER automatically
+# select FRAME_POINTER.  However, FUNCTION_TRACER adds -pg, and this is
+# incompatible with -fomit-frame-pointer with current GCC, so we don't use
+# -fomit-frame-pointer with FUNCTION_TRACER.
+ifndef CONFIG_FUNCTION_TRACER
+KBUILD_CFLAGS	+= -fomit-frame-pointer
+endif
+endif
+
+KBUILD_CFLAGS   += $(call cc-option, -fno-var-tracking-assignments)
+
+ifdef CONFIG_DEBUG_INFO
+ifdef CONFIG_DEBUG_INFO_SPLIT
+KBUILD_CFLAGS   += $(call cc-option, -gsplit-dwarf, -g)
+else
+KBUILD_CFLAGS	+= -g
+endif
+KBUILD_AFLAGS	+= -Wa,-gdwarf-2
+endif
+ifdef CONFIG_DEBUG_INFO_DWARF4
+KBUILD_CFLAGS	+= $(call cc-option, -gdwarf-4,)
+endif
+
+ifdef CONFIG_DEBUG_INFO_REDUCED
+KBUILD_CFLAGS 	+= $(call cc-option, -femit-struct-debug-baseonly) \
+		   $(call cc-option,-fno-var-tracking)
+endif
+
+ifdef CONFIG_FUNCTION_TRACER
+ifndef CC_FLAGS_FTRACE
+CC_FLAGS_FTRACE := -pg
+endif
+export CC_FLAGS_FTRACE
+ifdef CONFIG_HAVE_FENTRY
+CC_USING_FENTRY	:= $(call cc-option, -mfentry -DCC_USING_FENTRY)
+endif
+KBUILD_CFLAGS	+= $(CC_FLAGS_FTRACE) $(CC_USING_FENTRY)
+KBUILD_AFLAGS	+= $(CC_USING_FENTRY)
+ifdef CONFIG_DYNAMIC_FTRACE
+	ifdef CONFIG_HAVE_C_RECORDMCOUNT
+		BUILD_C_RECORDMCOUNT := y
+		export BUILD_C_RECORDMCOUNT
+	endif
+endif
+endif
+
+# We trigger additional mismatches with less inlining
+ifdef CONFIG_DEBUG_SECTION_MISMATCH
+KBUILD_CFLAGS += $(call cc-option, -fno-inline-functions-called-once)
+endif
+
+# arch Makefile may override CC so keep this after arch Makefile is included
+NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
+CHECKFLAGS     += $(NOSTDINC_FLAGS)
+
+# warn about C99 declaration after statement
+KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)
+
+# disable pointer signed / unsigned warnings in gcc 4.0
+KBUILD_CFLAGS += $(call cc-disable-warning, pointer-sign)
+
+# disable invalid "can't wrap" optimizations for signed / pointers
+KBUILD_CFLAGS	+= $(call cc-option,-fno-strict-overflow)
+
+# conserve stack if available
+KBUILD_CFLAGS   += $(call cc-option,-fconserve-stack)
+
+# disallow errors like 'EXPORT_GPL(foo);' with missing header
+KBUILD_CFLAGS   += $(call cc-option,-Werror=implicit-int)
+
+# require functions to have arguments in prototypes, not empty 'int foo()'
+KBUILD_CFLAGS   += $(call cc-option,-Werror=strict-prototypes)
+
+# Prohibit date/time macros, which would make the build non-deterministic
+KBUILD_CFLAGS   += $(call cc-option,-Werror=date-time)
+
+# use the deterministic mode of AR if available
+KBUILD_ARFLAGS := $(call ar-option,D)
+
+# check for 'asm goto'
+ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-goto.sh $(CC)), y)
+	KBUILD_CFLAGS += -DCC_HAVE_ASM_GOTO
+	KBUILD_AFLAGS += -DCC_HAVE_ASM_GOTO
+endif
+
+include scripts/Makefile.kasan
+include scripts/Makefile.extrawarn
+
+# Add any arch overrides and user supplied CPPFLAGS, AFLAGS and CFLAGS as the
+# last assignments
+KBUILD_CPPFLAGS += $(ARCH_CPPFLAGS) $(KCPPFLAGS)
+KBUILD_AFLAGS   += $(ARCH_AFLAGS)   $(KAFLAGS)
+KBUILD_CFLAGS   += $(ARCH_CFLAGS)   $(KCFLAGS)
+
+# Use --build-id when available.
+LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\
+			      $(call cc-ldoption, -Wl$(comma)--build-id,))
+KBUILD_LDFLAGS_MODULE += $(LDFLAGS_BUILD_ID)
+LDFLAGS_vmlinux += $(LDFLAGS_BUILD_ID)
+
+ifeq ($(CONFIG_STRIP_ASM_SYMS),y)
+LDFLAGS_vmlinux	+= $(call ld-option, -X,)
+endif
+
+# Default kernel image to build when no specific target is given.
+# KBUILD_IMAGE may be overruled on the command line or
+# set in the environment
+# Also any assignments in arch/$(ARCH)/Makefile take precedence over
+# this default value
+export KBUILD_IMAGE ?= vmlinux
+
+#
+# INSTALL_PATH specifies where to place the updated kernel and system map
+# images. Default is /boot, but you can set it to other values
+export	INSTALL_PATH ?= /boot
+
+#
+# INSTALL_DTBS_PATH specifies a prefix for relocations required by build roots.
+# Like INSTALL_MOD_PATH, it isn't defined in the Makefile, but can be passed as
+# an argument if needed. Otherwise it defaults to the kernel install path
+#
+export INSTALL_DTBS_PATH ?= $(INSTALL_PATH)/dtbs/$(KERNELRELEASE)
+
+#
+# INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory
+# relocations required by build roots.  This is not defined in the
+# makefile but the argument can be passed to make if needed.
+#
+
+MODLIB	= $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
+export MODLIB
+
+#
+# INSTALL_MOD_STRIP, if defined, will cause modules to be
+# stripped after they are installed.  If INSTALL_MOD_STRIP is '1', then
+# the default option --strip-debug will be used.  Otherwise,
+# INSTALL_MOD_STRIP value will be used as the options to the strip command.
+
+ifdef INSTALL_MOD_STRIP
+ifeq ($(INSTALL_MOD_STRIP),1)
+mod_strip_cmd = $(STRIP) --strip-debug
+else
+mod_strip_cmd = $(STRIP) $(INSTALL_MOD_STRIP)
+endif # INSTALL_MOD_STRIP=1
+else
+mod_strip_cmd = true
+endif # INSTALL_MOD_STRIP
+export mod_strip_cmd
+
+# CONFIG_MODULE_COMPRESS, if defined, will cause module to be compressed
+# after they are installed in agreement with CONFIG_MODULE_COMPRESS_GZIP
+# or CONFIG_MODULE_COMPRESS_XZ.
+
+mod_compress_cmd = true
+ifdef CONFIG_MODULE_COMPRESS
+  ifdef CONFIG_MODULE_COMPRESS_GZIP
+    mod_compress_cmd = gzip -n -f
+  endif # CONFIG_MODULE_COMPRESS_GZIP
+  ifdef CONFIG_MODULE_COMPRESS_XZ
+    mod_compress_cmd = xz -f
+  endif # CONFIG_MODULE_COMPRESS_XZ
+endif # CONFIG_MODULE_COMPRESS
+export mod_compress_cmd
+
+# Select initial ramdisk compression format, default is gzip(1).
+# This shall be used by the dracut(8) tool while creating an initramfs image.
+#
+INITRD_COMPRESS-y                  := gzip
+INITRD_COMPRESS-$(CONFIG_RD_BZIP2) := bzip2
+INITRD_COMPRESS-$(CONFIG_RD_LZMA)  := lzma
+INITRD_COMPRESS-$(CONFIG_RD_XZ)    := xz
+INITRD_COMPRESS-$(CONFIG_RD_LZO)   := lzo
+INITRD_COMPRESS-$(CONFIG_RD_LZ4)   := lz4
+# do not export INITRD_COMPRESS, since we didn't actually
+# choose a sane default compression above.
+# export INITRD_COMPRESS := $(INITRD_COMPRESS-y)
+
+ifdef CONFIG_MODULE_SIG_ALL
+MODSECKEY = ./signing_key.priv
+MODPUBKEY = ./signing_key.x509
+export MODPUBKEY
+mod_sign_cmd = perl $(srctree)/scripts/sign-file $(CONFIG_MODULE_SIG_HASH) $(MODSECKEY) $(MODPUBKEY)
+else
+mod_sign_cmd = true
+endif
+export mod_sign_cmd
+
+
+ifeq ($(KBUILD_EXTMOD),)
+core-y		+= kernel/ mm/ fs/ ipc/ security/ crypto/ block/
+
+vmlinux-dirs	:= $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \
+		     $(core-y) $(core-m) $(drivers-y) $(drivers-m) \
+		     $(net-y) $(net-m) $(libs-y) $(libs-m)))
+
+vmlinux-alldirs	:= $(sort $(vmlinux-dirs) $(patsubst %/,%,$(filter %/, \
+		     $(init-) $(core-) $(drivers-) $(net-) $(libs-))))
+
+init-y		:= $(patsubst %/, %/built-in.o, $(init-y))
+core-y		:= $(patsubst %/, %/built-in.o, $(core-y))
+drivers-y	:= $(patsubst %/, %/built-in.o, $(drivers-y))
+net-y		:= $(patsubst %/, %/built-in.o, $(net-y))
+libs-y1		:= $(patsubst %/, %/lib.a, $(libs-y))
+libs-y2		:= $(patsubst %/, %/built-in.o, $(libs-y))
+libs-y		:= $(libs-y1) $(libs-y2)
+
+# Externally visible symbols (used by link-vmlinux.sh)
+export KBUILD_VMLINUX_INIT := $(head-y) $(init-y)
+export KBUILD_VMLINUX_MAIN := $(core-y) $(libs-y) $(drivers-y) $(net-y)
+export KBUILD_LDS          := arch/$(SRCARCH)/kernel/vmlinux.lds
+export LDFLAGS_vmlinux
+# used by scripts/pacmage/Makefile
+export KBUILD_ALLDIRS := $(sort $(filter-out arch/%,$(vmlinux-alldirs)) arch Documentation include samples scripts tools virt)
+
+vmlinux-deps := $(KBUILD_LDS) $(KBUILD_VMLINUX_INIT) $(KBUILD_VMLINUX_MAIN)
+
+# Final link of vmlinux
+      cmd_link-vmlinux = $(CONFIG_SHELL) $< $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux)
+quiet_cmd_link-vmlinux = LINK    $@
+
+# Include targets which we want to
+# execute if the rest of the kernel build went well.
+vmlinux: scripts/link-vmlinux.sh $(vmlinux-deps) FORCE
+ifdef CONFIG_HEADERS_CHECK
+	$(Q)$(MAKE) -f $(srctree)/Makefile headers_check
+endif
+ifdef CONFIG_SAMPLES
+	$(Q)$(MAKE) $(build)=samples
+endif
+ifdef CONFIG_BUILD_DOCSRC
+	$(Q)$(MAKE) $(build)=Documentation
+endif
+ifdef CONFIG_GDB_SCRIPTS
+	$(Q)ln -fsn `cd $(srctree) && /bin/pwd`/scripts/gdb/vmlinux-gdb.py
+endif
+	+$(call if_changed,link-vmlinux)
+
+# The actual objects are generated when descending,
+# make sure no implicit rule kicks in
+$(sort $(vmlinux-deps)): $(vmlinux-dirs) ;
+
+# Handle descending into subdirectories listed in $(vmlinux-dirs)
+# Preset locale variables to speed up the build process. Limit locale
+# tweaks to this spot to avoid wrong language settings when running
+# make menuconfig etc.
+# Error messages still appears in the original language
+
+PHONY += $(vmlinux-dirs)
+$(vmlinux-dirs): prepare scripts
+	$(Q)$(MAKE) $(build)=$@
+
+define filechk_kernel.release
+	echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))"
+endef
+
+# Store (new) KERNELRELEASE string in include/config/kernel.release
+include/config/kernel.release: include/config/auto.conf FORCE
+	$(call filechk,kernel.release)
+
+
+# Things we need to do before we recursively start building the kernel
+# or the modules are listed in "prepare".
+# A multi level approach is used. prepareN is processed before prepareN-1.
+# archprepare is used in arch Makefiles and when processed asm symlink,
+# version.h and scripts_basic is processed / created.
+
+# Listed in dependency order
+PHONY += prepare archprepare prepare0 prepare1 prepare2 prepare3
+
+# prepare3 is used to check if we are building in a separate output directory,
+# and if so do:
+# 1) Check that make has not been executed in the kernel src $(srctree)
+prepare3: include/config/kernel.release
+ifneq ($(KBUILD_SRC),)
+	@$(kecho) '  Using $(srctree) as source for kernel'
+	$(Q)if [ -f $(srctree)/.config -o -d $(srctree)/include/config ]; then \
+		echo >&2 "  $(srctree) is not clean, please run 'make mrproper'"; \
+		echo >&2 "  in the '$(srctree)' directory.";\
+		/bin/false; \
+	fi;
+endif
+
+# prepare2 creates a makefile if using a separate output directory
+prepare2: prepare3 outputmakefile asm-generic
+
+prepare1: prepare2 $(version_h) include/generated/utsrelease.h \
+                   include/config/auto.conf
+	$(cmd_crmodverdir)
+
+archprepare: archheaders archscripts prepare1 scripts_basic
+
+prepare0: archprepare FORCE
+	$(Q)$(MAKE) $(build)=.
+
+# All the preparing..
+prepare: prepare0
+
+# Generate some files
+# ---------------------------------------------------------------------------
+
+# KERNELRELEASE can change from a few different places, meaning version.h
+# needs to be updated, so this check is forced on all builds
+
+uts_len := 64
+define filechk_utsrelease.h
+	if [ `echo -n "$(KERNELRELEASE)" | wc -c ` -gt $(uts_len) ]; then \
+	  echo '"$(KERNELRELEASE)" exceeds $(uts_len) characters' >&2;    \
+	  exit 1;                                                         \
+	fi;                                                               \
+	(echo \#define UTS_RELEASE \"$(KERNELRELEASE)\";)
+endef
+
+define filechk_version.h
+	(echo \#define LINUX_VERSION_CODE $(shell                         \
+	expr $(VERSION) \* 65536 + 0$(PATCHLEVEL) \* 256 + 0$(SUBLEVEL)); \
+	echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';)
+endef
+
+$(version_h): $(srctree)/Makefile FORCE
+	$(call filechk,version.h)
+	$(Q)rm -f $(old_version_h)
+
+include/generated/utsrelease.h: include/config/kernel.release FORCE
+	$(call filechk,utsrelease.h)
+
+PHONY += headerdep
+headerdep:
+	$(Q)find $(srctree)/include/ -name '*.h' | xargs --max-args 1 \
+	$(srctree)/scripts/headerdep.pl -I$(srctree)/include
+
+# ---------------------------------------------------------------------------
+# Firmware install
+INSTALL_FW_PATH=$(INSTALL_MOD_PATH)/lib/firmware
+export INSTALL_FW_PATH
+
+PHONY += firmware_install
+firmware_install: FORCE
+	@mkdir -p $(objtree)/firmware
+	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.fwinst obj=firmware __fw_install
+
+# ---------------------------------------------------------------------------
+# Kernel headers
+
+#Default location for installed headers
+export INSTALL_HDR_PATH = $(objtree)/usr
+
+# If we do an all arch process set dst to asm-$(hdr-arch)
+hdr-dst = $(if $(KBUILD_HEADERS), dst=include/asm-$(hdr-arch), dst=include/asm)
+
+PHONY += archheaders
+archheaders:
+
+PHONY += archscripts
+archscripts:
+
+PHONY += __headers
+__headers: $(version_h) scripts_basic asm-generic archheaders archscripts FORCE
+	$(Q)$(MAKE) $(build)=scripts build_unifdef
+
+PHONY += headers_install_all
+headers_install_all:
+	$(Q)$(CONFIG_SHELL) $(srctree)/scripts/headers.sh install
+
+PHONY += headers_install
+headers_install: __headers
+	$(if $(wildcard $(srctree)/arch/$(hdr-arch)/include/uapi/asm/Kbuild),, \
+	  $(error Headers not exportable for the $(SRCARCH) architecture))
+	$(Q)$(MAKE) $(hdr-inst)=include/uapi
+	$(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi/asm $(hdr-dst)
+
+PHONY += headers_check_all
+headers_check_all: headers_install_all
+	$(Q)$(CONFIG_SHELL) $(srctree)/scripts/headers.sh check
+
+PHONY += headers_check
+headers_check: headers_install
+	$(Q)$(MAKE) $(hdr-inst)=include/uapi HDRCHECK=1
+	$(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi/asm $(hdr-dst) HDRCHECK=1
+
+# ---------------------------------------------------------------------------
+# Kernel selftest
+
+PHONY += kselftest
+kselftest:
+	$(Q)$(MAKE) -C tools/testing/selftests run_tests
+
+# ---------------------------------------------------------------------------
+# Modules
+
+ifdef CONFIG_MODULES
+
+# By default, build modules as well
+
+all: modules
+
+# Build modules
+#
+# A module can be listed more than once in obj-m resulting in
+# duplicate lines in modules.order files.  Those are removed
+# using awk while concatenating to the final file.
+
+PHONY += modules
+modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
+	$(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order
+	@$(kecho) '  Building modules, stage 2.';
+	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
+	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.fwinst obj=firmware __fw_modbuild
+
+modules.builtin: $(vmlinux-dirs:%=%/modules.builtin)
+	$(Q)$(AWK) '!x[$$0]++' $^ > $(objtree)/modules.builtin
+
+%/modules.builtin: include/config/auto.conf
+	$(Q)$(MAKE) $(modbuiltin)=$*
+
+
+# Target to prepare building external modules
+PHONY += modules_prepare
+modules_prepare: prepare scripts
+
+# Target to install modules
+PHONY += modules_install
+modules_install: _modinst_ _modinst_post
+
+PHONY += _modinst_
+_modinst_:
+	@rm -rf $(MODLIB)/kernel
+	@rm -f $(MODLIB)/source
+	@mkdir -p $(MODLIB)/kernel
+	@ln -s `cd $(srctree) && /bin/pwd` $(MODLIB)/source
+	@if [ ! $(objtree) -ef  $(MODLIB)/build ]; then \
+		rm -f $(MODLIB)/build ; \
+		ln -s $(CURDIR) $(MODLIB)/build ; \
+	fi
+	@cp -f $(objtree)/modules.order $(MODLIB)/
+	@cp -f $(objtree)/modules.builtin $(MODLIB)/
+	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst
+
+# This depmod is only for convenience to give the initial
+# boot a modules.dep even before / is mounted read-write.  However the
+# boot script depmod is the master version.
+PHONY += _modinst_post
+_modinst_post: _modinst_
+	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.fwinst obj=firmware __fw_modinst
+	$(call cmd,depmod)
+
+ifeq ($(CONFIG_MODULE_SIG), y)
+PHONY += modules_sign
+modules_sign:
+	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modsign
+endif
+
+else # CONFIG_MODULES
+
+# Modules not configured
+# ---------------------------------------------------------------------------
+
+modules modules_install: FORCE
+	@echo >&2
+	@echo >&2 "The present kernel configuration has modules disabled."
+	@echo >&2 "Type 'make config' and enable loadable module support."
+	@echo >&2 "Then build a kernel with module support enabled."
+	@echo >&2
+	@exit 1
+
+endif # CONFIG_MODULES
+
+###
+# Cleaning is done on three levels.
+# make clean     Delete most generated files
+#                Leave enough to build external modules
+# make mrproper  Delete the current configuration, and all generated files
+# make distclean Remove editor backup files, patch leftover files and the like
+
+# Directories & files removed with 'make clean'
+CLEAN_DIRS  += $(MODVERDIR)
+
+# Directories & files removed with 'make mrproper'
+MRPROPER_DIRS  += include/config usr/include include/generated          \
+		  arch/*/include/generated .tmp_objdiff
+MRPROPER_FILES += .config .config.old .version .old_version \
+		  Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS \
+		  signing_key.priv signing_key.x509 x509.genkey		\
+		  extra_certificates signing_key.x509.keyid		\
+		  signing_key.x509.signer vmlinux-gdb.py
+
+# clean - Delete most, but leave enough to build external modules
+#
+clean: rm-dirs  := $(CLEAN_DIRS)
+clean: rm-files := $(CLEAN_FILES)
+clean-dirs      := $(addprefix _clean_, . $(vmlinux-alldirs) Documentation samples)
+
+PHONY += $(clean-dirs) clean archclean vmlinuxclean
+$(clean-dirs):
+	$(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@)
+
+vmlinuxclean:
+	$(Q)$(CONFIG_SHELL) $(srctree)/scripts/link-vmlinux.sh clean
+
+clean: archclean vmlinuxclean
+
+# mrproper - Delete all generated files, including .config
+#
+mrproper: rm-dirs  := $(wildcard $(MRPROPER_DIRS))
+mrproper: rm-files := $(wildcard $(MRPROPER_FILES))
+mrproper-dirs      := $(addprefix _mrproper_,Documentation/DocBook scripts)
+
+PHONY += $(mrproper-dirs) mrproper archmrproper
+$(mrproper-dirs):
+	$(Q)$(MAKE) $(clean)=$(patsubst _mrproper_%,%,$@)
+
+mrproper: clean archmrproper $(mrproper-dirs)
+	$(call cmd,rmdirs)
+	$(call cmd,rmfiles)
+
+# distclean
+#
+PHONY += distclean
+
+distclean: mrproper
+	@find $(srctree) $(RCS_FIND_IGNORE) \
+		\( -name '*.orig' -o -name '*.rej' -o -name '*~' \
+		-o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
+		-o -name '.*.rej' -o -name '*%'  -o -name 'core' \) \
+		-type f -print | xargs rm -f
+
+
+# Packaging of the kernel to various formats
+# ---------------------------------------------------------------------------
+# rpm target kept for backward compatibility
+package-dir	:= scripts/package
+
+%src-pkg: FORCE
+	$(Q)$(MAKE) $(build)=$(package-dir) $@
+%pkg: include/config/kernel.release FORCE
+	$(Q)$(MAKE) $(build)=$(package-dir) $@
+rpm: include/config/kernel.release FORCE
+	$(Q)$(MAKE) $(build)=$(package-dir) $@
+
+
+# Brief documentation of the typical targets used
+# ---------------------------------------------------------------------------
+
+boards := $(wildcard $(srctree)/arch/$(SRCARCH)/configs/*_defconfig)
+boards := $(sort $(notdir $(boards)))
+board-dirs := $(dir $(wildcard $(srctree)/arch/$(SRCARCH)/configs/*/*_defconfig))
+board-dirs := $(sort $(notdir $(board-dirs:/=)))
+
+help:
+	@echo  'Cleaning targets:'
+	@echo  '  clean		  - Remove most generated files but keep the config and'
+	@echo  '                    enough build support to build external modules'
+	@echo  '  mrproper	  - Remove all generated files + config + various backup files'
+	@echo  '  distclean	  - mrproper + remove editor backup and patch files'
+	@echo  ''
+	@echo  'Configuration targets:'
+	@$(MAKE) -f $(srctree)/scripts/kconfig/Makefile help
+	@echo  ''
+	@echo  'Other generic targets:'
+	@echo  '  all		  - Build all targets marked with [*]'
+	@echo  '* vmlinux	  - Build the bare kernel'
+	@echo  '* modules	  - Build all modules'
+	@echo  '  modules_install - Install all modules to INSTALL_MOD_PATH (default: /)'
+	@echo  '  firmware_install- Install all firmware to INSTALL_FW_PATH'
+	@echo  '                    (default: $$(INSTALL_MOD_PATH)/lib/firmware)'
+	@echo  '  dir/            - Build all files in dir and below'
+	@echo  '  dir/file.[oisS] - Build specified target only'
+	@echo  '  dir/file.lst    - Build specified mixed source/assembly target only'
+	@echo  '                    (requires a recent binutils and recent build (System.map))'
+	@echo  '  dir/file.ko     - Build module including final link'
+	@echo  '  modules_prepare - Set up for building external modules'
+	@echo  '  tags/TAGS	  - Generate tags file for editors'
+	@echo  '  cscope	  - Generate cscope index'
+	@echo  '  gtags           - Generate GNU GLOBAL index'
+	@echo  '  kernelrelease	  - Output the release version string (use with make -s)'
+	@echo  '  kernelversion	  - Output the version stored in Makefile (use with make -s)'
+	@echo  '  image_name	  - Output the image name (use with make -s)'
+	@echo  '  headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'; \
+	 echo  '                    (default: $(INSTALL_HDR_PATH))'; \
+	 echo  ''
+	@echo  'Static analysers'
+	@echo  '  checkstack      - Generate a list of stack hogs'
+	@echo  '  namespacecheck  - Name space analysis on compiled kernel'
+	@echo  '  versioncheck    - Sanity check on version.h usage'
+	@echo  '  includecheck    - Check for duplicate included header files'
+	@echo  '  export_report   - List the usages of all exported symbols'
+	@echo  '  headers_check   - Sanity check on exported headers'
+	@echo  '  headerdep       - Detect inclusion cycles in headers'
+	@$(MAKE) -f $(srctree)/scripts/Makefile.help checker-help
+	@echo  ''
+	@echo  'Kernel selftest'
+	@echo  '  kselftest       - Build and run kernel selftest (run as root)'
+	@echo  '                    Build, install, and boot kernel before'
+	@echo  '                    running kselftest on it'
+	@echo  ''
+	@echo  'Kernel packaging:'
+	@$(MAKE) $(build)=$(package-dir) help
+	@echo  ''
+	@echo  'Documentation targets:'
+	@$(MAKE) -f $(srctree)/Documentation/DocBook/Makefile dochelp
+	@echo  ''
+	@echo  'Architecture specific targets ($(SRCARCH)):'
+	@$(if $(archhelp),$(archhelp),\
+		echo '  No architecture specific help defined for $(SRCARCH)')
+	@echo  ''
+	@$(if $(boards), \
+		$(foreach b, $(boards), \
+		printf "  %-24s - Build for %s\\n" $(b) $(subst _defconfig,,$(b));) \
+		echo '')
+	@$(if $(board-dirs), \
+		$(foreach b, $(board-dirs), \
+		printf "  %-16s - Show %s-specific targets\\n" help-$(b) $(b);) \
+		printf "  %-16s - Show all of the above\\n" help-boards; \
+		echo '')
+
+	@echo  '  make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build'
+	@echo  '  make V=2   [targets] 2 => give reason for rebuild of target'
+	@echo  '  make O=dir [targets] Locate all output files in "dir", including .config'
+	@echo  '  make C=1   [targets] Check all c source with $$CHECK (sparse by default)'
+	@echo  '  make C=2   [targets] Force check of all c source with $$CHECK'
+	@echo  '  make RECORDMCOUNT_WARN=1 [targets] Warn about ignored mcount sections'
+	@echo  '  make W=n   [targets] Enable extra gcc checks, n=1,2,3 where'
+	@echo  '		1: warnings which may be relevant and do not occur too often'
+	@echo  '		2: warnings which occur quite often but may still be relevant'
+	@echo  '		3: more obscure warnings, can most likely be ignored'
+	@echo  '		Multiple levels can be combined with W=12 or W=123'
+	@echo  ''
+	@echo  'Execute "make" or "make all" to build all targets marked with [*] '
+	@echo  'For further info see the ./README file'
+
+
+help-board-dirs := $(addprefix help-,$(board-dirs))
+
+help-boards: $(help-board-dirs)
+
+boards-per-dir = $(sort $(notdir $(wildcard $(srctree)/arch/$(SRCARCH)/configs/$*/*_defconfig)))
+
+$(help-board-dirs): help-%:
+	@echo  'Architecture specific targets ($(SRCARCH) $*):'
+	@$(if $(boards-per-dir), \
+		$(foreach b, $(boards-per-dir), \
+		printf "  %-24s - Build for %s\\n" $*/$(b) $(subst _defconfig,,$(b));) \
+		echo '')
+
+
+# Documentation targets
+# ---------------------------------------------------------------------------
+%docs: scripts_basic FORCE
+	$(Q)$(MAKE) $(build)=scripts build_docproc
+	$(Q)$(MAKE) $(build)=Documentation/DocBook $@
+
+else # KBUILD_EXTMOD
+
+###
+# External module support.
+# When building external modules the kernel used as basis is considered
+# read-only, and no consistency checks are made and the make
+# system is not used on the basis kernel. If updates are required
+# in the basis kernel ordinary make commands (without M=...) must
+# be used.
+#
+# The following are the only valid targets when building external
+# modules.
+# make M=dir clean     Delete all automatically generated files
+# make M=dir modules   Make all modules in specified dir
+# make M=dir	       Same as 'make M=dir modules'
+# make M=dir modules_install
+#                      Install the modules built in the module directory
+#                      Assumes install directory is already created
+
+# We are always building modules
+KBUILD_MODULES := 1
+PHONY += crmodverdir
+crmodverdir:
+	$(cmd_crmodverdir)
+
+PHONY += $(objtree)/Module.symvers
+$(objtree)/Module.symvers:
+	@test -e $(objtree)/Module.symvers || ( \
+	echo; \
+	echo "  WARNING: Symbol version dump $(objtree)/Module.symvers"; \
+	echo "           is missing; modules will have no dependencies and modversions."; \
+	echo )
+
+module-dirs := $(addprefix _module_,$(KBUILD_EXTMOD))
+PHONY += $(module-dirs) modules
+$(module-dirs): crmodverdir $(objtree)/Module.symvers
+	$(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@)
+
+modules: $(module-dirs)
+	@$(kecho) '  Building modules, stage 2.';
+	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
+
+PHONY += modules_install
+modules_install: _emodinst_ _emodinst_post
+
+install-dir := $(if $(INSTALL_MOD_DIR),$(INSTALL_MOD_DIR),extra)
+PHONY += _emodinst_
+_emodinst_:
+	$(Q)mkdir -p $(MODLIB)/$(install-dir)
+	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst
+
+PHONY += _emodinst_post
+_emodinst_post: _emodinst_
+	$(call cmd,depmod)
+
+clean-dirs := $(addprefix _clean_,$(KBUILD_EXTMOD))
+
+PHONY += $(clean-dirs) clean
+$(clean-dirs):
+	$(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@)
+
+clean:	rm-dirs := $(MODVERDIR)
+clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers
+
+help:
+	@echo  '  Building external modules.'
+	@echo  '  Syntax: make -C path/to/kernel/src M=$$PWD target'
+	@echo  ''
+	@echo  '  modules         - default target, build the module(s)'
+	@echo  '  modules_install - install the module'
+	@echo  '  clean           - remove generated files in module directory only'
+	@echo  ''
+
+# Dummies...
+PHONY += prepare scripts
+prepare: ;
+scripts: ;
+endif # KBUILD_EXTMOD
+
+clean: $(clean-dirs)
+	$(call cmd,rmdirs)
+	$(call cmd,rmfiles)
+	@find $(if $(KBUILD_EXTMOD), $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \
+		\( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
+		-o -name '*.ko.*' \
+		-o -name '*.dwo'  \
+		-o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \
+		-o -name '*.symtypes' -o -name 'modules.order' \
+		-o -name modules.builtin -o -name '.tmp_*.o.*' \
+		-o -name '*.gcno' \) -type f -print | xargs rm -f
+
+# Generate tags for editors
+# ---------------------------------------------------------------------------
+quiet_cmd_tags = GEN     $@
+      cmd_tags = $(CONFIG_SHELL) $(srctree)/scripts/tags.sh $@
+
+tags TAGS cscope gtags: FORCE
+	$(call cmd,tags)
+
+# Scripts to check various things for consistency
+# ---------------------------------------------------------------------------
+
+PHONY += includecheck versioncheck coccicheck namespacecheck export_report
+
+includecheck:
+	find $(srctree)/* $(RCS_FIND_IGNORE) \
+		-name '*.[hcS]' -type f -print | sort \
+		| xargs $(PERL) -w $(srctree)/scripts/checkincludes.pl
+
+versioncheck:
+	find $(srctree)/* $(RCS_FIND_IGNORE) \
+		-name '*.[hcS]' -type f -print | sort \
+		| xargs $(PERL) -w $(srctree)/scripts/checkversion.pl
+
+coccicheck:
+	$(Q)$(CONFIG_SHELL) $(srctree)/scripts/$@
+
+namespacecheck:
+	$(PERL) $(srctree)/scripts/namespace.pl
+
+export_report:
+	$(PERL) $(srctree)/scripts/export_report.pl
+
+endif #ifeq ($(config-targets),1)
+endif #ifeq ($(mixed-targets),1)
+
+PHONY += checkstack kernelrelease kernelversion image_name
+
+# UML needs a little special treatment here.  It wants to use the host
+# toolchain, so needs $(SUBARCH) passed to checkstack.pl.  Everyone
+# else wants $(ARCH), including people doing cross-builds, which means
+# that $(SUBARCH) doesn't work here.
+ifeq ($(ARCH), um)
+CHECKSTACK_ARCH := $(SUBARCH)
+else
+CHECKSTACK_ARCH := $(ARCH)
+endif
+checkstack:
+	$(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \
+	$(PERL) $(src)/scripts/checkstack.pl $(CHECKSTACK_ARCH)
+
+kernelrelease:
+	@echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))"
+
+kernelversion:
+	@echo $(KERNELVERSION)
+
+image_name:
+	@echo $(KBUILD_IMAGE)
+
+# Clear a bunch of variables before executing the submake
+tools/: FORCE
+	$(Q)mkdir -p $(objtree)/tools
+	$(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(filter --j% -j,$(MAKEFLAGS))" O=$(O) subdir=tools -C $(src)/tools/
+
+tools/%: FORCE
+	$(Q)mkdir -p $(objtree)/tools
+	$(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(filter --j% -j,$(MAKEFLAGS))" O=$(O) subdir=tools -C $(src)/tools/ $*
+
+# Single targets
+# ---------------------------------------------------------------------------
+# Single targets are compatible with:
+# - build with mixed source and output
+# - build with separate output dir 'make O=...'
+# - external modules
+#
+#  target-dir => where to store outputfile
+#  build-dir  => directory in kernel source tree to use
+
+ifeq ($(KBUILD_EXTMOD),)
+        build-dir  = $(patsubst %/,%,$(dir $@))
+        target-dir = $(dir $@)
+else
+        zap-slash=$(filter-out .,$(patsubst %/,%,$(dir $@)))
+        build-dir  = $(KBUILD_EXTMOD)$(if $(zap-slash),/$(zap-slash))
+        target-dir = $(if $(KBUILD_EXTMOD),$(dir $<),$(dir $@))
+endif
+
+%.s: %.c prepare scripts FORCE
+	$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
+%.i: %.c prepare scripts FORCE
+	$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
+%.o: %.c prepare scripts FORCE
+	$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
+%.lst: %.c prepare scripts FORCE
+	$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
+%.s: %.S prepare scripts FORCE
+	$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
+%.o: %.S prepare scripts FORCE
+	$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
+%.symtypes: %.c prepare scripts FORCE
+	$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
+
+# Modules
+/: prepare scripts FORCE
+	$(cmd_crmodverdir)
+	$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
+	$(build)=$(build-dir)
+# Make sure the latest headers are built for Documentation
+Documentation/: headers_install
+%/: prepare scripts FORCE
+	$(cmd_crmodverdir)
+	$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
+	$(build)=$(build-dir)
+%.ko: prepare scripts FORCE
+	$(cmd_crmodverdir)
+	$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1)   \
+	$(build)=$(build-dir) $(@:.ko=.o)
+	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
+
+# FIXME Should go into a make.lib or something
+# ===========================================================================
+
+quiet_cmd_rmdirs = $(if $(wildcard $(rm-dirs)),CLEAN   $(wildcard $(rm-dirs)))
+      cmd_rmdirs = rm -rf $(rm-dirs)
+
+quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN   $(wildcard $(rm-files)))
+      cmd_rmfiles = rm -f $(rm-files)
+
+# Run depmod only if we have System.map and depmod is executable
+quiet_cmd_depmod = DEPMOD  $(KERNELRELEASE)
+      cmd_depmod = $(CONFIG_SHELL) $(srctree)/scripts/depmod.sh $(DEPMOD) \
+                   $(KERNELRELEASE) "$(patsubst y,_,$(CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX))"
+
+# Create temporary dir for module support files
+# clean it up only when building all modules
+cmd_crmodverdir = $(Q)mkdir -p $(MODVERDIR) \
+                  $(if $(KBUILD_MODULES),; rm -f $(MODVERDIR)/*)
+
+# read all saved command lines
+
+targets := $(wildcard $(sort $(targets)))
+cmd_files := $(wildcard .*.cmd $(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd))
+
+ifneq ($(cmd_files),)
+  $(cmd_files): ;	# Do not try to update included dependency files
+  include $(cmd_files)
+endif
+
+endif	# skip-makefile
+
+PHONY += FORCE
+FORCE:
+
+# Declare the contents of the .PHONY variable as phony.  We keep that
+# information in a variable so we can use it in if_changed and friends.
+.PHONY: $(PHONY)
xen/include/linux/kconfig.h new file +54 -0

54 lines not on this page · raw message

xen/scripts/Kbuild.include new file +305 -0

305 lines not on this page · raw message

xen/scripts/Makefile new file +42 -0

42 lines not on this page · raw message

xen/scripts/Makefile.asm-generic new file +23 -0
new file mode 100644
index 0000000..045e009
@@ -0,0 +1,23 @@
+# include/asm-generic contains a lot of files that are used
+# verbatim by several architectures.
+#
+# This Makefile reads the file arch/$(SRCARCH)/include/asm/Kbuild
+# and for each file listed in this file with generic-y creates
+# a small wrapper file in $(obj) (arch/$(SRCARCH)/include/generated/asm)
+
+kbuild-file := $(srctree)/arch/$(SRCARCH)/include/$(src)/Kbuild
+-include $(kbuild-file)
+
+include scripts/Kbuild.include
+
+# Create output directory if not already present
+_dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj))
+
+quiet_cmd_wrap = WRAP    $@
+cmd_wrap = echo "\#include <asm-generic/$*.h>" >$@
+
+all: $(patsubst %, $(obj)/%, $(generic-y))
+	@:
+
+$(obj)/%.h:
+	$(call cmd,wrap)
xen/scripts/Makefile.build new file +427 -0

427 lines not on this page · raw message

xen/scripts/Makefile.clean new file +91 -0

91 lines not on this page · raw message

xen/scripts/Makefile.extrawarn new file +68 -0

68 lines not on this page · raw message

xen/scripts/Makefile.help new file +3 -0
new file mode 100644
index 0000000..d03608f
@@ -0,0 +1,3 @@
+
+checker-help:
+	@echo  '  coccicheck      - Check with Coccinelle.'
xen/scripts/Makefile.host new file +128 -0

128 lines not on this page · raw message

xen/scripts/Makefile.kasan new file +29 -0
new file mode 100644
index 0000000..3f874d2
@@ -0,0 +1,29 @@
+ifdef CONFIG_KASAN
+ifdef CONFIG_KASAN_INLINE
+	call_threshold := 10000
+else
+	call_threshold := 0
+endif
+
+CFLAGS_KASAN_MINIMAL := -fsanitize=kernel-address
+
+CFLAGS_KASAN := $(call cc-option, -fsanitize=kernel-address \
+		-fasan-shadow-offset=$(CONFIG_KASAN_SHADOW_OFFSET) \
+		--param asan-stack=1 --param asan-globals=1 \
+		--param asan-instrumentation-with-call-threshold=$(call_threshold))
+
+ifeq ($(call cc-option, $(CFLAGS_KASAN_MINIMAL) -Werror),)
+   ifneq ($(CONFIG_COMPILE_TEST),y)
+        $(warning Cannot use CONFIG_KASAN: \
+            -fsanitize=kernel-address is not supported by compiler)
+   endif
+else
+    ifeq ($(CFLAGS_KASAN),)
+        ifneq ($(CONFIG_COMPILE_TEST),y)
+            $(warning CONFIG_KASAN: compiler does not support all options.\
+                Trying minimal configuration)
+        endif
+        CFLAGS_KASAN := $(CFLAGS_KASAN_MINIMAL)
+    endif
+endif
+endif
xen/scripts/Makefile.lib new file +390 -0

234 lines not on this page · raw message

xen/scripts/Makefile.modpost new file +152 -0

152 lines not on this page · raw message

xen/scripts/basic/.gitignore new file +2 -0
new file mode 100644
index 0000000..9528ec9

Lines of this file are not shown. View the raw message.

xen/scripts/basic/Makefile new file +16 -0
new file mode 100644
index 0000000..ec10d93

Lines of this file are not shown. View the raw message.

xen/scripts/basic/fixdep.c new file +462 -0

462 lines not on this page · raw message

xen/scripts/gcc-goto.sh new file +21 -0
new file mode 100755
index 0000000..c9469d3

Lines of this file are not shown. View the raw message.

xen/scripts/kconfig/.gitignore new file +22 -0
new file mode 100644
index 0000000..be603c4

Lines of this file are not shown. View the raw message.

xen/scripts/kconfig/Makefile new file +317 -0

317 lines not on this page · raw message

xen/scripts/kconfig/POTFILES.in new file +12 -0
new file mode 100644
index 0000000..9674573

Lines of this file are not shown. View the raw message.

xen/scripts/kconfig/check.sh new file +13 -0
new file mode 100755
index 0000000..55b79ba

Lines of this file are not shown. View the raw message.

xen/scripts/kconfig/conf.c new file +722 -0

722 lines not on this page · raw message

xen/scripts/kconfig/confdata.c new file +1248 -0

1,248 lines not on this page · raw message

xen/scripts/kconfig/expr.c new file +1206 -0

1,206 lines not on this page · raw message

xen/scripts/kconfig/expr.h new file +238 -0

238 lines not on this page · raw message

xen/scripts/kconfig/gconf.c new file +1521 -0

1,521 lines not on this page · raw message

xen/scripts/kconfig/gconf.glade new file +661 -0

661 lines not on this page · raw message

xen/scripts/kconfig/images.c new file +326 -0

326 lines not on this page · raw message

xen/scripts/kconfig/kxgettext.c new file +235 -0

235 lines not on this page · raw message

xen/scripts/kconfig/list.h new file +131 -0

131 lines not on this page · raw message

xen/scripts/kconfig/lkc.h new file +186 -0

186 lines not on this page · raw message

xen/scripts/kconfig/lkc_proto.h new file +52 -0

52 lines not on this page · raw message

xen/scripts/kconfig/lxdialog/.gitignore new file +4 -0
new file mode 100644
index 0000000..90b08ff

Lines of this file are not shown. View the raw message.

xen/scripts/kconfig/lxdialog/BIG.FAT.WARNING new file +4 -0
new file mode 100644
index 0000000..a8999d8

Lines of this file are not shown. View the raw message.

xen/scripts/kconfig/lxdialog/check-lxdialog.sh new file +91 -0

91 lines not on this page · raw message

xen/scripts/kconfig/lxdialog/checklist.c new file +332 -0

332 lines not on this page · raw message

xen/scripts/kconfig/lxdialog/dialog.h new file +257 -0

257 lines not on this page · raw message

xen/scripts/kconfig/lxdialog/inputbox.c new file +301 -0

301 lines not on this page · raw message

xen/scripts/kconfig/lxdialog/menubox.c new file +437 -0

437 lines not on this page · raw message

xen/scripts/kconfig/lxdialog/textbox.c new file +408 -0

408 lines not on this page · raw message

xen/scripts/kconfig/lxdialog/util.c new file +713 -0

713 lines not on this page · raw message

xen/scripts/kconfig/lxdialog/yesno.c new file +114 -0

114 lines not on this page · raw message

xen/scripts/kconfig/mconf.c new file +1047 -0

1,047 lines not on this page · raw message

xen/scripts/kconfig/menu.c new file +697 -0

697 lines not on this page · raw message

xen/scripts/kconfig/merge_config.sh new file +158 -0

158 lines not on this page · raw message

xen/scripts/kconfig/nconf.c new file +1561 -0

1,561 lines not on this page · raw message

xen/scripts/kconfig/nconf.gui.c new file +656 -0

656 lines not on this page · raw message

xen/scripts/kconfig/nconf.h new file +96 -0

96 lines not on this page · raw message

xen/scripts/kconfig/qconf.cc new file +1798 -0

1,798 lines not on this page · raw message

xen/scripts/kconfig/qconf.h new file +338 -0

338 lines not on this page · raw message

xen/scripts/kconfig/streamline_config.pl new file +647 -0

647 lines not on this page · raw message

xen/scripts/kconfig/symbol.c new file +1377 -0

1,377 lines not on this page · raw message

xen/scripts/kconfig/util.c new file +147 -0

147 lines not on this page · raw message

xen/scripts/kconfig/zconf.gperf new file +48 -0

48 lines not on this page · raw message

xen/scripts/kconfig/zconf.hash.c_shipped new file +289 -0

289 lines not on this page · raw message

xen/scripts/kconfig/zconf.l new file +372 -0

372 lines not on this page · raw message

xen/scripts/kconfig/zconf.lex.c_shipped new file +2476 -0

2,476 lines not on this page · raw message

xen/scripts/kconfig/zconf.tab.c_shipped new file +2580 -0

2,580 lines not on this page · raw message

xen/scripts/kconfig/zconf.y new file +742 -0

742 lines not on this page · raw message

xen/scripts/link-vmlinux.sh new file +252 -0

252 lines not on this page · raw message

xen/scripts/mkmakefile new file +52 -0

52 lines not on this page · raw message

xen/scripts/mksysmap new file +44 -0

44 lines not on this page · raw message

xen/scripts/setlocalversion new file +174 -0

174 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.4.9

Part of the diff is not shown here. View the raw message.

#2 lore raw

Re: [RFC 01/29] build: import Kbuild/Kconfig from Linux 4.2

Quoted 47 lines
Quoted 1 line
Quoted 1 line · On 06.10.15 at 00:03, <[email protected]> wrote:

Brings in the Kbuild/Kconfig plumbing from the Linux 4.2 release.

---
 xen/Makefile.linux                             | 1596 +++++++++++++++
 xen/include/linux/kconfig.h                    |   54 +
 xen/scripts/Kbuild.include                     |  305 +++
 xen/scripts/Makefile                           |   42 +
 xen/scripts/Makefile.asm-generic               |   23 +
 xen/scripts/Makefile.build                     |  427 ++++
 xen/scripts/Makefile.clean                     |   91 +
 xen/scripts/Makefile.extrawarn                 |   68 +
 xen/scripts/Makefile.help                      |    3 +
 xen/scripts/Makefile.host                      |  128 ++
 xen/scripts/Makefile.kasan                     |   29 +
 xen/scripts/Makefile.lib                       |  390 ++++
 xen/scripts/Makefile.modpost                   |  152 ++
 xen/scripts/basic/.gitignore                   |    2 +
 xen/scripts/basic/Makefile                     |   16 +
 xen/scripts/basic/fixdep.c                     |  462 +++++
 xen/scripts/gcc-goto.sh                        |   21 +
 xen/scripts/kconfig/.gitignore                 |   22 +
 xen/scripts/kconfig/Makefile                   |  317 +++
 xen/scripts/kconfig/POTFILES.in                |   12 +
 xen/scripts/kconfig/check.sh                   |   13 +
 xen/scripts/kconfig/conf.c                     |  722 +++++++
 xen/scripts/kconfig/confdata.c                 | 1248 ++++++++++++
 xen/scripts/kconfig/expr.c                     | 1206 +++++++++++
 xen/scripts/kconfig/expr.h                     |  238 +++
 xen/scripts/kconfig/gconf.c                    | 1521 ++++++++++++++
 xen/scripts/kconfig/gconf.glade                |  661 ++++++
 xen/scripts/kconfig/images.c                   |  326 +++
 xen/scripts/kconfig/kxgettext.c                |  235 +++
 xen/scripts/kconfig/list.h                     |  131 ++
 xen/scripts/kconfig/lkc.h                      |  186 ++
 xen/scripts/kconfig/lkc_proto.h                |   52 +
 xen/scripts/kconfig/lxdialog/.gitignore        |    4 +
 xen/scripts/kconfig/lxdialog/BIG.FAT.WARNING   |    4 +
 xen/scripts/kconfig/lxdialog/check-lxdialog.sh |   91 +
 xen/scripts/kconfig/lxdialog/checklist.c       |  332 +++
 xen/scripts/kconfig/lxdialog/dialog.h          |  257 +++
 xen/scripts/kconfig/lxdialog/inputbox.c        |  301 +++
 xen/scripts/kconfig/lxdialog/menubox.c         |  437 ++++
 xen/scripts/kconfig/lxdialog/textbox.c         |  408 ++++
 xen/scripts/kconfig/lxdialog/util.c            |  713 +++++++
 xen/scripts/kconfig/lxdialog/yesno.c           |  114 ++
Quoted 8 lines
 xen/scripts/kconfig/mconf.c                    | 1047 ++++++++++
 xen/scripts/kconfig/menu.c                     |  697 +++++++
 xen/scripts/kconfig/merge_config.sh            |  158 ++
 xen/scripts/kconfig/nconf.c                    | 1561 ++++++++++++++
 xen/scripts/kconfig/nconf.gui.c                |  656 ++++++
 xen/scripts/kconfig/nconf.h                    |   96 +
 xen/scripts/kconfig/qconf.cc                   | 1798 +++++++++++++++++
 xen/scripts/kconfig/qconf.h                    |  338 ++++

Do we really need all the ?conf.[ch]* in Xen? Wouldn't the simple non-GUI thing suffice for our needs?

Also, btw - I don't think we should name the thing Kconfig in Xen; Xconfig would be odd too (to be confused with X), so maybe XenConfig?

Jan

#3 lore raw

Re: [RFC 01/29] build: import Kbuild/Kconfig from Linux 4.2

Quoted 56 lines · Jan Beulich
Quoted 47 lines
Quoted 1 line
Quoted 1 line · On 06.10.15 at 00:03, <[email protected]> wrote:

Brings in the Kbuild/Kconfig plumbing from the Linux 4.2 release.

---
 xen/Makefile.linux                             | 1596 +++++++++++++++
 xen/include/linux/kconfig.h                    |   54 +
 xen/scripts/Kbuild.include                     |  305 +++
 xen/scripts/Makefile                           |   42 +
 xen/scripts/Makefile.asm-generic               |   23 +
 xen/scripts/Makefile.build                     |  427 ++++
 xen/scripts/Makefile.clean                     |   91 +
 xen/scripts/Makefile.extrawarn                 |   68 +
 xen/scripts/Makefile.help                      |    3 +
 xen/scripts/Makefile.host                      |  128 ++
 xen/scripts/Makefile.kasan                     |   29 +
 xen/scripts/Makefile.lib                       |  390 ++++
 xen/scripts/Makefile.modpost                   |  152 ++
 xen/scripts/basic/.gitignore                   |    2 +
 xen/scripts/basic/Makefile                     |   16 +
 xen/scripts/basic/fixdep.c                     |  462 +++++
 xen/scripts/gcc-goto.sh                        |   21 +
 xen/scripts/kconfig/.gitignore                 |   22 +
 xen/scripts/kconfig/Makefile                   |  317 +++
 xen/scripts/kconfig/POTFILES.in                |   12 +
 xen/scripts/kconfig/check.sh                   |   13 +
 xen/scripts/kconfig/conf.c                     |  722 +++++++
 xen/scripts/kconfig/confdata.c                 | 1248 ++++++++++++
 xen/scripts/kconfig/expr.c                     | 1206 +++++++++++
 xen/scripts/kconfig/expr.h                     |  238 +++
 xen/scripts/kconfig/gconf.c                    | 1521 ++++++++++++++
 xen/scripts/kconfig/gconf.glade                |  661 ++++++
 xen/scripts/kconfig/images.c                   |  326 +++
 xen/scripts/kconfig/kxgettext.c                |  235 +++
 xen/scripts/kconfig/list.h                     |  131 ++
 xen/scripts/kconfig/lkc.h                      |  186 ++
 xen/scripts/kconfig/lkc_proto.h                |   52 +
 xen/scripts/kconfig/lxdialog/.gitignore        |    4 +
 xen/scripts/kconfig/lxdialog/BIG.FAT.WARNING   |    4 +
 xen/scripts/kconfig/lxdialog/check-lxdialog.sh |   91 +
 xen/scripts/kconfig/lxdialog/checklist.c       |  332 +++
 xen/scripts/kconfig/lxdialog/dialog.h          |  257 +++
 xen/scripts/kconfig/lxdialog/inputbox.c        |  301 +++
 xen/scripts/kconfig/lxdialog/menubox.c         |  437 ++++
 xen/scripts/kconfig/lxdialog/textbox.c         |  408 ++++
 xen/scripts/kconfig/lxdialog/util.c            |  713 +++++++
 xen/scripts/kconfig/lxdialog/yesno.c           |  114 ++
Quoted 8 lines
 xen/scripts/kconfig/mconf.c                    | 1047 ++++++++++
 xen/scripts/kconfig/menu.c                     |  697 +++++++
 xen/scripts/kconfig/merge_config.sh            |  158 ++
 xen/scripts/kconfig/nconf.c                    | 1561 ++++++++++++++
 xen/scripts/kconfig/nconf.gui.c                |  656 ++++++
 xen/scripts/kconfig/nconf.h                    |   96 +
 xen/scripts/kconfig/qconf.cc                   | 1798 +++++++++++++++++
 xen/scripts/kconfig/qconf.h                    |  338 ++++
Quoted 9 lines

Do we really need all the ?conf.[ch]* in Xen? Wouldn't the simple non-GUI thing suffice for our needs?

Also, btw - I don't think we should name the thing Kconfig in Xen; Xconfig would be odd too (to be confused with X), so maybe XenConfig?

Jan

I used a very very broad brush stroke when I grabbed kconfig.

$ cp -r linux/scripts/ xen/xen/scripts/

And only removed what I knew was obviously not necessary. Before this patchset is considered for actual inclusion I plan on trimming this patch down.

Signature · 1 line
Doug Goldstein

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#4 lore raw

Re: [RFC 01/29] build: import Kbuild/Kconfig from Linux 4.2

In reply to Jan Beulich
Quoted 56 lines · Jan Beulich
Quoted 47 lines
Quoted 1 line
Quoted 1 line · On 06.10.15 at 00:03, <[email protected]> wrote:

Brings in the Kbuild/Kconfig plumbing from the Linux 4.2 release.

---
 xen/Makefile.linux                             | 1596 +++++++++++++++
 xen/include/linux/kconfig.h                    |   54 +
 xen/scripts/Kbuild.include                     |  305 +++
 xen/scripts/Makefile                           |   42 +
 xen/scripts/Makefile.asm-generic               |   23 +
 xen/scripts/Makefile.build                     |  427 ++++
 xen/scripts/Makefile.clean                     |   91 +
 xen/scripts/Makefile.extrawarn                 |   68 +
 xen/scripts/Makefile.help                      |    3 +
 xen/scripts/Makefile.host                      |  128 ++
 xen/scripts/Makefile.kasan                     |   29 +
 xen/scripts/Makefile.lib                       |  390 ++++
 xen/scripts/Makefile.modpost                   |  152 ++
 xen/scripts/basic/.gitignore                   |    2 +
 xen/scripts/basic/Makefile                     |   16 +
 xen/scripts/basic/fixdep.c                     |  462 +++++
 xen/scripts/gcc-goto.sh                        |   21 +
 xen/scripts/kconfig/.gitignore                 |   22 +
 xen/scripts/kconfig/Makefile                   |  317 +++
 xen/scripts/kconfig/POTFILES.in                |   12 +
 xen/scripts/kconfig/check.sh                   |   13 +
 xen/scripts/kconfig/conf.c                     |  722 +++++++
 xen/scripts/kconfig/confdata.c                 | 1248 ++++++++++++
 xen/scripts/kconfig/expr.c                     | 1206 +++++++++++
 xen/scripts/kconfig/expr.h                     |  238 +++
 xen/scripts/kconfig/gconf.c                    | 1521 ++++++++++++++
 xen/scripts/kconfig/gconf.glade                |  661 ++++++
 xen/scripts/kconfig/images.c                   |  326 +++
 xen/scripts/kconfig/kxgettext.c                |  235 +++
 xen/scripts/kconfig/list.h                     |  131 ++
 xen/scripts/kconfig/lkc.h                      |  186 ++
 xen/scripts/kconfig/lkc_proto.h                |   52 +
 xen/scripts/kconfig/lxdialog/.gitignore        |    4 +
 xen/scripts/kconfig/lxdialog/BIG.FAT.WARNING   |    4 +
 xen/scripts/kconfig/lxdialog/check-lxdialog.sh |   91 +
 xen/scripts/kconfig/lxdialog/checklist.c       |  332 +++
 xen/scripts/kconfig/lxdialog/dialog.h          |  257 +++
 xen/scripts/kconfig/lxdialog/inputbox.c        |  301 +++
 xen/scripts/kconfig/lxdialog/menubox.c         |  437 ++++
 xen/scripts/kconfig/lxdialog/textbox.c         |  408 ++++
 xen/scripts/kconfig/lxdialog/util.c            |  713 +++++++
 xen/scripts/kconfig/lxdialog/yesno.c           |  114 ++
Quoted 8 lines
 xen/scripts/kconfig/mconf.c                    | 1047 ++++++++++
 xen/scripts/kconfig/menu.c                     |  697 +++++++
 xen/scripts/kconfig/merge_config.sh            |  158 ++
 xen/scripts/kconfig/nconf.c                    | 1561 ++++++++++++++
 xen/scripts/kconfig/nconf.gui.c                |  656 ++++++
 xen/scripts/kconfig/nconf.h                    |   96 +
 xen/scripts/kconfig/qconf.cc                   | 1798 +++++++++++++++++
 xen/scripts/kconfig/qconf.h                    |  338 ++++
Quoted 9 lines

Do we really need all the ?conf.[ch]* in Xen? Wouldn't the simple non-GUI thing suffice for our needs?

Also, btw - I don't think we should name the thing Kconfig in Xen; Xconfig would be odd too (to be confused with X), so maybe XenConfig?

Jan

I forgot to answer the 2nd paragraph in my last reply. Sticking to Kconfig was actually intentional to make it easy for us to stay in sync with upstream development of Kconfig.

Signature · 1 line
Doug Goldstein

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#5 lore raw

Re: [RFC 01/29] build: import Kbuild/Kconfig from Linux 4.2

Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 06.10.15 at 18:47, <[email protected]> wrote:
Quoted 3 lines · Jan Beulich

Also, btw - I don't think we should name the thing Kconfig in Xen; Xconfig would be odd too (to be confused with X), so maybe XenConfig?

I forgot to answer the 2nd paragraph in my last reply. Sticking to Kconfig was actually intentional to make it easy for us to stay in sync with upstream development of Kconfig.

How would a difference in names significantly hamper that?

Jan

#6 lore raw

Re: [RFC 01/29] build: import Kbuild/Kconfig from Linux 4.2

Quoted 11 lines · Jan Beulich
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 06.10.15 at 18:47, <[email protected]> wrote:
Quoted 3 lines · Jan Beulich

Also, btw - I don't think we should name the thing Kconfig in Xen; Xconfig would be odd too (to be confused with X), so maybe XenConfig?

I forgot to answer the 2nd paragraph in my last reply. Sticking to Kconfig was actually intentional to make it easy for us to stay in sync with upstream development of Kconfig.

How would a difference in names significantly hamper that?

It doesn't seem to me that cosmetic differences like file names are worth forking over, even if the actual patch to do so would be trivial (I don't know if it is or not).

The language and the tool which implements it is called Kconfig (or kconfig), the fact that K may once-upon-a-time have meant Kernel doesn't seem terribly relevant to me.

Ian.

#7 lore raw

Re: [RFC 01/29] build: import Kbuild/Kconfig from Linux 4.2

Quoted 9 lines · Ian Campbell
Quoted 8 lines · Jan Beulich
Quoted 8 lines
Quoted 1 line
Quoted 1 line · On 06.10.15 at 18:47, <[email protected]> wrote:
Quoted 3 lines · Jan Beulich

Also, btw - I don't think we should name the thing Kconfig in Xen; Xconfig would be odd too (to be confused with X), so maybe XenConfig?

I forgot to answer the 2nd paragraph in my last reply. Sticking to Kconfig was actually intentional to make it easy for us to stay in sync with upstream development of Kconfig.

Quoted 8 lines
Quoted 1 line

How would a difference in names significantly hamper that?

It doesn't seem to me that cosmetic differences like file names are worth forking over, even if the actual patch to do so would be trivial (I don't know if it is or not).

The language and the tool which implements it is called Kconfig (or kconfig), the fact that K may once-upon-a-time have meant Kernel doesn't seem terribly relevant to me.

I concur. Keeping it called kconfig will allow more people to know exactly what it is.

~Andrew

#8 lore raw

Re: [RFC 01/29] build: import Kbuild/Kconfig from Linux 4.2

Quoted 16 lines
Quoted 1 line
Quoted 1 line · On 07.10.15 at 10:23, <[email protected]> wrote:
Quoted 14 lines · Ian Campbell
Quoted 9 lines · Jan Beulich
Quoted 8 lines
Quoted 1 line
Quoted 1 line · On 06.10.15 at 18:47, <[email protected]> wrote:
Quoted 3 lines · Jan Beulich

Also, btw - I don't think we should name the thing Kconfig in Xen; Xconfig would be odd too (to be confused with X), so maybe XenConfig?

I forgot to answer the 2nd paragraph in my last reply. Sticking to Kconfig was actually intentional to make it easy for us to stay in sync with upstream development of Kconfig.

How would a difference in names significantly hamper that?

It doesn't seem to me that cosmetic differences like file names are worth forking over, even if the actual patch to do so would be trivial (I don't know if it is or not).

Quoted 6 lines
Quoted 3 lines

The language and the tool which implements it is called Kconfig (or kconfig), the fact that K may once-upon-a-time have meant Kernel doesn't seem terribly relevant to me.

I concur. Keeping it called kconfig will allow more people to know exactly what it is.

Just for the record - my objection wasn't so much to the tool's name than to the names of the individual files the tool is to consume (hence also the use of respective upper case letters above).

Jan

#9 lore raw

Re: [RFC 01/29] build: import Kbuild/Kconfig from Linux 4.2

Quoted 26 lines · Jan Beulich
Quoted 26 lines
Quoted 1 line
Quoted 1 line · On 07.10.15 at 10:23, <[email protected]> wrote:
Quoted 23 lines · Ian Campbell
Quoted 6 lines · Jan Beulich
Quoted 6 lines
Quoted 1 line
Quoted 1 line · On 06.10.15 at 18:47, <[email protected]> wrote:
Quoted 4 lines · Jan Beulich

Also, btw - I don't think we should name the thing Kconfig in Xen;
Xconfig would be odd too (to be confused with X), so maybe XenConfig?

Quoted 6 lines
Quoted 5 lines

I forgot to answer the 2nd paragraph in my last reply. Sticking to
Kconfig was actually intentional to make it easy for us to stay in sync
with upstream development of Kconfig.

How would a difference in names significantly hamper that?

It doesn't seem to me that cosmetic differences like file names are worth
forking over, even if the actual patch to do so would be trivial (I don't
know if it is or not).

The language and the tool which implements it is called Kconfig (or kconfig), the fact that K may once-upon-a-time have meant Kernel doesn't
seem terribly relevant to me.

Quoted 7 lines
Quoted 2 lines

I concur. Keeping it called kconfig will allow more people to know exactly what it is.

Just for the record - my objection wasn't so much to the tool's name than to the names of the individual files the tool is to consume (hence also the use of respective upper case letters above).

I don't think that is worth forking/deviating over either, not by a long shot. The tool is call kconfig and it reads files called Kconfig.

Ian.

#10 lore raw

RFC 2/29 build: trim down Linux bits

In reply to Doug Goldstein
---
 xen/scripts/basic/.gitignore | 1 -
 xen/scripts/basic/Makefile   | 1 -
 2 files changed, 2 deletions(-)
xen/scripts/basic/.gitignore +0 -1
index 9528ec9..a776371 100644
@@ -1,2 +1 @@
 fixdep
-bin2c
xen/scripts/basic/Makefile +0 -1
index ec10d93..4fcef87 100644
@@ -9,7 +9,6 @@
 # fixdep: 	 Used to generate dependency information during build process
 
 hostprogs-y	:= fixdep
-hostprogs-$(CONFIG_BUILD_BIN2C)     += bin2c
 always		:= $(hostprogs-y)
 
 # fixdep is needed to compile other host programs
Signature · 1 line
2.4.9
#11 lore raw

Re: [RFC 02/29] build: trim down Linux bits

Quoted 1 line
Quoted 1 line
Quoted 1 line · On 06.10.15 at 00:03, <[email protected]> wrote:

Changes like this should be explained:

Quoted 18 lines
---
 xen/scripts/basic/.gitignore | 1 -
 xen/scripts/basic/Makefile   | 1 -
 2 files changed, 2 deletions(-)
xen/scripts/basic/.gitignore +0 -1
index 9528ec9..a776371 100644
@@ -1,2 +1 @@
 fixdep
-bin2c
xen/scripts/basic/Makefile +0 -0
index ec10d93..4fcef87 100644

xen/scripts/basic/Makefile line 12

Quoted 4 lines
xen/scripts/basic/Makefile +0 -1
@@ -9,7 +9,6 @@
 # fixdep: 	 Used to generate dependency information during build process
 
 hostprogs-y	:= fixdep
-hostprogs-$(CONFIG_BUILD_BIN2C)     += bin2c

Why does Linux need this but we don't?

Jan

#12 lore raw

Re: [RFC 02/29] build: trim down Linux bits

Quoted 24 lines · Jan Beulich
Quoted 1 line
Quoted 1 line
Quoted 1 line · On 06.10.15 at 00:03, <[email protected]> wrote:

Changes like this should be explained:

Quoted 20 lines
---
 xen/scripts/basic/.gitignore | 1 -
 xen/scripts/basic/Makefile   | 1 -
 2 files changed, 2 deletions(-)
xen/scripts/basic/.gitignore +0 -1
index 9528ec9..a776371 100644
@@ -1,2 +1 @@
 fixdep
-bin2c
xen/scripts/basic/Makefile +0 -0
index ec10d93..4fcef87 100644
@@ -9,7 +9,6 @@
 # fixdep: 	 Used to generate dependency information during build process
 
Quoted 7 lines

xen/scripts/basic/Makefile line 12

Quoted 2 lines
xen/scripts/basic/Makefile +0 -1
 hostprogs-y	:= fixdep
-hostprogs-$(CONFIG_BUILD_BIN2C)     += bin2c

Why does Linux need this but we don't?

Jan

Its for building firmware into the kernel. It converts a blob/binary to a C-style header which can be included into the code. One of the many things in their scripts directory that we won't need for Kconfig support.

Signature · 1 line
Doug Goldstein

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#13 lore raw

Re: [RFC 02/29] build: trim down Linux bits

Quoted 32 lines · Doug Goldstein
Quoted 31 lines · Jan Beulich
Quoted 1 line
Quoted 1 line
Quoted 1 line · On 06.10.15 at 00:03, <[email protected]> wrote:

Changes like this should be explained:

Quoted 22 lines
---
 xen/scripts/basic/.gitignore | 1 -
 xen/scripts/basic/Makefile   | 1 -
 2 files changed, 2 deletions(-)
xen/scripts/basic/.gitignore +0 -1
index 9528ec9..a776371 100644
@@ -1,2 +1 @@
 fixdep
-bin2c
xen/scripts/basic/Makefile +0 -0
index ec10d93..4fcef87 100644
@@ -9,7 +9,6 @@
 # fixdep: 	 Used to generate dependency information during

build process

Quoted 2 lines

hostprogs-y := fixdep
-hostprogs-$(CONFIG_BUILD_BIN2C) += bin2c

Why does Linux need this but we don't?

Quoted 6 lines
Quoted 2 lines

Jan

Its for building firmware into the kernel. It converts a blob/binary to a C-style header which can be included into the code. One of the many things in their scripts directory that we won't need for Kconfig support.

ISTR there was a fork of Kconfig maintained for easy inclusion into other projects. I can't find it though, the closest I got was
https://github.com/lacombar/kconfig/ which is clearly not the answer (not touched for 5yrs).

Ian.

#14 lore raw

Re: [RFC 02/29] build: trim down Linux bits

Quoted 40 lines · Ian Campbell
Quoted 32 lines · Doug Goldstein
Quoted 31 lines · Jan Beulich
Quoted 1 line
Quoted 1 line
Quoted 1 line · On 06.10.15 at 00:03, <[email protected]> wrote:

Changes like this should be explained:

Quoted 22 lines
---
 xen/scripts/basic/.gitignore | 1 -
 xen/scripts/basic/Makefile   | 1 -
 2 files changed, 2 deletions(-)
xen/scripts/basic/.gitignore +0 -1
index 9528ec9..a776371 100644
@@ -1,2 +1 @@
 fixdep
-bin2c
xen/scripts/basic/Makefile +0 -0
index ec10d93..4fcef87 100644
@@ -9,7 +9,6 @@
 # fixdep: 	 Used to generate dependency information during

build process

Quoted 2 lines

hostprogs-y := fixdep
-hostprogs-$(CONFIG_BUILD_BIN2C) += bin2c

Why does Linux need this but we don't?

Quoted 6 lines
Quoted 2 lines

Jan

Its for building firmware into the kernel. It converts a blob/binary to a C-style header which can be included into the code. One of the many things in their scripts directory that we won't need for Kconfig support.

Quoted 7 lines

ISTR there was a fork of Kconfig maintained for easy inclusion into other projects. I can't find it though, the closest I got was
https://github.com/lacombar/kconfig/ which is clearly not the answer (not touched for 5yrs).

Ian.

I think this is the project?

http://ymorin.is-a-geek.org/projects/kconfig-frontends

For some reason I couldn't find it when I started out on this originally and planned on replacing the first few patches with that. But looking at it now, it appears abandoned.

Signature · 1 line
Doug Goldstein

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#15 lore raw

Re: [RFC 02/29] build: trim down Linux bits

Quoted 52 lines · Doug Goldstein
Quoted 51 lines · Ian Campbell
Quoted 34 lines · Doug Goldstein
Quoted 33 lines · Jan Beulich
Quoted 1 line
Quoted 1 line
Quoted 1 line · On 06.10.15 at 00:03, <[email protected]> wrote:

Changes like this should be explained:

Quoted 24 lines
---
 xen/scripts/basic/.gitignore | 1 -
 xen/scripts/basic/Makefile   | 1 -
 2 files changed, 2 deletions(-)
xen/scripts/basic/.gitignore +0 -1
index 9528ec9..a776371 100644
@@ -1,2 +1 @@
 fixdep
-bin2c
xen/scripts/basic/Makefile +0 -0
index ec10d93..4fcef87 100644
@@ -9,7 +9,6 @@
 # fixdep: 	 Used to generate dependency information

during
build process

Quoted 2 lines

hostprogs-y := fixdep
-hostprogs-$(CONFIG_BUILD_BIN2C) += bin2c

Why does Linux need this but we don't?

Quoted 8 lines
Quoted 2 lines

Jan

Its for building firmware into the kernel. It converts a blob/binary to
a C-style header which can be included into the code. One of the many things in their scripts directory that we won't need for Kconfig support.

ISTR there was a fork of Kconfig maintained for easy inclusion into other
projects. I can't find it though, the closest I got was
https://github.com/lacombar/kconfig/ which is clearly not the answer (not
touched for 5yrs).

Quoted 6 lines
Quoted 2 lines

Ian.

I think this is the project?

[... snip URL nangled by our stupid spam gateway...]

Yes, that's the one, I think.

Quoted 3 lines

For some reason I couldn't find it when I started out on this originally and planned on replacing the first few patches with that. But looking at it now, it appears abandoned.

Yeah, it doesn't look like a good option now.

Ian.

#16 lore raw

RFC 3/29 build: hookup initial Kconfig usage

In reply to Doug Goldstein

Wire in the Kconfig build and makefile rules to be able to generate valid configuration files to be used by the build process.

---
 .gitignore                    |  8 ++++++++
 xen/Kconfig                   | 26 ++++++++++++++++++++++++++
 xen/Makefile                  | 14 ++++++++++++++
 xen/Makefile.linux            | 21 ++++++++++-----------
 xen/arch/arm/Kconfig          | 27 +++++++++++++++++++++++++++
 xen/arch/arm/Makefile.kconfig |  8 ++++++++
 xen/arch/arm/defconfig        |  0
 xen/arch/x86/Kconfig          | 28 ++++++++++++++++++++++++++++
 xen/arch/x86/Makefile.kconfig | 26 ++++++++++++++++++++++++++
 xen/arch/x86/i386_defconfig   |  1 +
 xen/arch/x86/x86_64_defconfig |  0
 xen/common/Kconfig            |  4 ++++
 xen/drivers/Kconfig           |  3 +++
 13 files changed, 155 insertions(+), 11 deletions(-)
 create mode 100644 xen/Kconfig
 create mode 100644 xen/arch/arm/Kconfig
 create mode 100644 xen/arch/arm/Makefile.kconfig
 create mode 100644 xen/arch/arm/defconfig
 create mode 100644 xen/arch/x86/Kconfig
 create mode 100644 xen/arch/x86/Makefile.kconfig
 create mode 100644 xen/arch/x86/i386_defconfig
 create mode 100644 xen/arch/x86/x86_64_defconfig
 create mode 100644 xen/common/Kconfig
 create mode 100644 xen/drivers/Kconfig
.gitignore +8 -0
index 9ead7c4..a78494d 100644
@@ -218,6 +218,11 @@ tools/xentrace/tbctl
 tools/xentrace/xenctx
 tools/xentrace/xentrace
 xen/.banner
+xen/.config
+xen/.config.old
+xen/defconfig
+xen/**/*.cmd
+xen/**/modules.order
 xen/System.map
 xen/arch/arm/asm-offsets.s
 xen/arch/arm/xen.lds
@@ -240,6 +245,9 @@ xen/include/headers++.chk
 xen/include/asm
 xen/include/asm-*/asm-offsets.h
 xen/include/compat/*
+xen/include/config.h
+xen/include/config/
+xen/include/generated/
 xen/include/public/public
 xen/include/xen/*.new
 xen/include/xen/acm_policy.h
xen/Kconfig new file +26 -0
new file mode 100644
index 0000000..7353077
@@ -0,0 +1,26 @@
+#
+# For a description of the syntax of this configuration file,
+# see Documentation/kbuild/kconfig-language.txt from the Linux
+# kernel source tree.
+#
+mainmenu "Xen $KERNELVERSION Configuration"
+
+config SRCARCH
+	string
+	option env="SRCARCH"
+
+config ARCH
+	string
+	option env="ARCH"
+
+source "arch/$SRCARCH/Kconfig"
+
+config KERNELVERSION
+	string
+	option env="KERNELVERSION"
+
+config DEFCONFIG_LIST
+	string
+	option defconfig_list
+	default "$ARCH_DEFCONFIG"
+	default "arch/$SRCARCH/defconfig"
xen/Makefile +14 -0
index c556198..6bb9c27 100644
@@ -17,12 +17,18 @@ export XEN_ROOT := $(BASEDIR)/..
 
 EFI_MOUNTPOINT ?= $(BOOT_DIR)/efi
 
+# Don't break if the build process wasn't called from the top level
+XEN_TARGET_ARCH ?= $(shell uname -m)
+
 .PHONY: default
 default: build
 
 .PHONY: dist
 dist: install
 
+.PHONY: build
+build:: include/config/auto.conf
+
 .PHONY: build install uninstall clean distclean cscope TAGS tags MAP gtags
 build install uninstall debug clean distclean cscope TAGS tags MAP gtags::
 ifneq ($(XEN_TARGET_ARCH),x86_32)
@@ -216,3 +222,11 @@ FORCE:
 
 %/: FORCE
 	$(MAKE) -f $(BASEDIR)/Rules.mk -C $* built_in.o built_in_bin.o
+
+kconfig := oldsilentconfig oldconfig config menuconfig defconfig \
+	savedefconfig listnewconfig include/config/auto.conf
+.PHONY: $(kconfig)
+$(kconfig):
+	$(MAKE) -f Makefile.linux ARCH=$(XEN_TARGET_ARCH) $@
+
+-include include/config/auto.conf.cmd
xen/Makefile.linux +10 -11
index c361593..ffb4aef 100644
@@ -1,8 +1,7 @@
-VERSION = 4
-PATCHLEVEL = 2
+VERSION = $(XEN_VERSION)
+PATCHLEVEL = $(XEN_SUBVERSION)
 SUBLEVEL = 0
-EXTRAVERSION =
-NAME = Hurr durr I'ma sheep
+EXTRAVERSION = $(XEN_EXTRAVERSION)
 
 # *DOCUMENTATION*
 # To see a list of typical targets execute "make help"
@@ -144,7 +143,7 @@ $(filter-out _all sub-make $(CURDIR)/Makefile, $(MAKECMDGOALS)) _all: sub-make
 
 sub-make: FORCE
 	$(Q)$(MAKE) -C $(KBUILD_OUTPUT) KBUILD_SRC=$(CURDIR) \
-	-f $(CURDIR)/Makefile $(filter-out _all sub-make,$(MAKECMDGOALS))
+	-f $(CURDIR)/Makefile.linux $(filter-out _all sub-make,$(MAKECMDGOALS))
 
 # Leave processing to above invocation of make
 skip-makefile := 1
@@ -509,7 +508,7 @@ $(filter-out __build_one_by_one, $(MAKECMDGOALS)): __build_one_by_one
 __build_one_by_one:
 	$(Q)set -e; \
 	for i in $(MAKECMDGOALS); do \
-		$(MAKE) -f $(srctree)/Makefile $$i; \
+		$(MAKE) -f $(srctree)/Makefile.linux $$i; \
 	done
 
 else
@@ -521,7 +520,7 @@ ifeq ($(config-targets),1)
 # Read arch specific Makefile to set KBUILD_DEFCONFIG as needed.
 # KBUILD_DEFCONFIG may point out an alternative default configuration
 # used for 'make defconfig'
-include arch/$(SRCARCH)/Makefile
+include arch/$(SRCARCH)/Makefile.kconfig
 export KBUILD_DEFCONFIG KBUILD_KCONFIG
 
 config: scripts_basic outputmakefile FORCE
@@ -569,7 +568,7 @@ $(KCONFIG_CONFIG) include/config/auto.conf.cmd: ;
 # if auto.conf.cmd is missing then we are probably in a cleaned tree so
 # we execute the config step to be sure to catch updated Kconfig files
 include/config/%.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd
-	$(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig
+	$(Q)$(MAKE) -f $(srctree)/Makefile.linux silentoldconfig
 else
 # external modules needs include/generated/autoconf.h and include/config/auto.conf
 # but do not care if they are up-to-date. Use auto.conf to trigger the test
@@ -602,7 +601,7 @@ all: vmlinux
 ARCH_CPPFLAGS :=
 ARCH_AFLAGS :=
 ARCH_CFLAGS :=
-include arch/$(SRCARCH)/Makefile
+include arch/$(SRCARCH)/Makefile.kconfig
 
 KBUILD_CFLAGS	+= $(call cc-option,-fno-delete-null-pointer-checks,)
 
@@ -921,7 +920,7 @@ quiet_cmd_link-vmlinux = LINK    $@
 # execute if the rest of the kernel build went well.
 vmlinux: scripts/link-vmlinux.sh $(vmlinux-deps) FORCE
 ifdef CONFIG_HEADERS_CHECK
-	$(Q)$(MAKE) -f $(srctree)/Makefile headers_check
+	$(Q)$(MAKE) -f $(srctree)/Makefile.linux headers_check
 endif
 ifdef CONFIG_SAMPLES
 	$(Q)$(MAKE) $(build)=samples
@@ -1015,7 +1014,7 @@ define filechk_version.h
 	echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';)
 endef
 
-$(version_h): $(srctree)/Makefile FORCE
+$(version_h): $(srctree)/Makefile.linux FORCE
 	$(call filechk,version.h)
 	$(Q)rm -f $(old_version_h)
 
xen/arch/arm/Kconfig new file +27 -0
new file mode 100644
index 0000000..8db5ff9
@@ -0,0 +1,27 @@
+# Select 32 or 64 bit
+config 64BIT
+	bool "64-bit Xen" if ARCH = "arm64"
+	default ARCH != "arm32"
+	help
+	  Say yes to build a 64-bit Xen
+	  Say no to build a 32-bit Xen
+
+config ARM_32
+       def_bool y
+       depends on !64BIT
+
+config ARM_64
+       def_bool y
+       depends on 64BIT
+
+config ARM
+	def_bool y
+
+config ARCH_DEFCONFIG
+	string
+	default "arch/arm/arm32_defconfig" if ARM_32
+	default "arch/arm/arm64_defconfig" if ARM_64
+
+source "common/Kconfig"
+
+source "drivers/Kconfig"
xen/arch/arm/Makefile.kconfig new file +8 -0
new file mode 100644
index 0000000..35a475f
@@ -0,0 +1,8 @@
+
+KBUILD_DEFCONFIG := $(ARCH)_defconfig
+
+KBUILD_CFLAGS += -Iinclude/asm-arm/$(ARCH)
+
+define archhelp
+  echo '* xen.gz    - Compressed Xen image'
+endef
xen/arch/arm/defconfig new file +0 -0
new file mode 100644
index 0000000..e69de29
xen/arch/x86/Kconfig new file +28 -0
new file mode 100644
index 0000000..5e34f4e
@@ -0,0 +1,28 @@
+# Select 32 or 64 bit
+config 64BIT
+	bool "64-bit Xen" if ARCH = "x86_64"
+	default ARCH != "i386"
+	---help---
+	  Say yes to build a 64-bit Xen
+	  Say no to build a 32-bit Xen
+
+config X86_32
+	def_bool y
+	depends on !64BIT
+
+config X86_64
+	def_bool y
+	depends on 64BIT
+
+config X86
+	def_bool y
+	select HAS_GDBSX
+
+config ARCH_DEFCONFIG
+	string
+	default "arch/x86/i386_defconfig" if X86_32
+	default "arch/x86/x86_64_defconfig" if X86_64
+
+source "common/Kconfig"
+
+source "drivers/Kconfig"
xen/arch/x86/Makefile.kconfig new file +26 -0
new file mode 100644
index 0000000..cedf921
@@ -0,0 +1,26 @@
+
+KBUILD_DEFCONFIG := $(ARCH)_defconfig
+
+KBUILD_CFLAGS += -Iinclude/asm-x86/mach-default
+KBUILD_CFLAGS += -Iinclude/asm-x86/mach-generic
+
+core-y += arch/x86/
+
+drivers-$(CONFIG_OPROFILE) += arch/x86/oprofile/
+
+all: xen.gz
+
+xen.gz: vmlinux
+	$(Q)$(MAKE) $(build)=$(boot) $(KBUILD_IMAGE)
+
+PHONY += install
+install:
+	$(Q)$(MAKE) $(build)=$(boot) $@
+
+archclean:
+	$(Q)rm -rf $(objtree)/arch/x86
+	$(Q)$(MAKE) $(clean)=$(boot)
+
+define archhelp
+  echo '* xen.gz    - Compressed Xen image'
+endef
xen/arch/x86/i386_defconfig new file +1 -0
new file mode 100644
index 0000000..2441d5a
@@ -0,0 +1 @@
+# CONFIG_64BIT is not set
xen/arch/x86/x86_64_defconfig new file +0 -0
new file mode 100644
index 0000000..e69de29
xen/common/Kconfig new file +4 -0
new file mode 100644
index 0000000..0251856
@@ -0,0 +1,4 @@
+
+menu "Common Features"
+
+endmenu
xen/drivers/Kconfig new file +3 -0
new file mode 100644
index 0000000..7bc7b6e
@@ -0,0 +1,3 @@
+menu "Device Drivers"
+
+endmenu
Signature · 1 line
2.4.9
#17 lore raw

Re: [RFC 03/29] build: hookup initial Kconfig usage

Quoted 26 lines · Doug Goldstein

new file mode 100644
index 0000000..e69de29

xen/arch/x86/Kconfig new file +18 -0
new file mode 100644
index 0000000..5e34f4e
@@ -0,0 +1,28 @@
+# Select 32 or 64 bit
+config 64BIT
+	bool "64-bit Xen" if ARCH = "x86_64"
+	default ARCH != "i386"
+	---help---
+	  Say yes to build a 64-bit Xen
+	  Say no to build a 32-bit Xen
+
+config X86_32
+	def_bool y
+	depends on !64BIT
+
+config X86_64
+	def_bool y
+	depends on 64BIT
+
+config X86
+	def_bool y

xen/arch/x86/Kconfig line 28

Quoted 10 lines
xen/arch/x86/Kconfig new file +10 -0
+	select HAS_GDBSX
+
+config ARCH_DEFCONFIG
+	string
+	default "arch/x86/i386_defconfig" if X86_32
+	default "arch/x86/x86_64_defconfig" if X86_64
+
+source "common/Kconfig"
+
+source "drivers/Kconfig"

We dropped 32bit hypervisor builds in 4.4, and it definitely doesn't build any more.

You don't need to provide i386_defconfig or X86_32 as far as the hypervisor is concerned.

~Andrew

#18 lore raw

Re: [RFC 03/29] build: hookup initial Kconfig usage

Quoted 42 lines
Quoted 1 line
Quoted 1 line · On 06.10.15 at 11:58, <[email protected]> wrote:
Quoted 26 lines · Doug Goldstein

new file mode 100644
index 0000000..e69de29

xen/arch/x86/Kconfig new file +18 -0
new file mode 100644
index 0000000..5e34f4e
@@ -0,0 +1,28 @@
+# Select 32 or 64 bit
+config 64BIT
+	bool "64-bit Xen" if ARCH = "x86_64"
+	default ARCH != "i386"
+	---help---
+	  Say yes to build a 64-bit Xen
+	  Say no to build a 32-bit Xen
+
+config X86_32
+	def_bool y
+	depends on !64BIT
+
+config X86_64
+	def_bool y
+	depends on 64BIT
+
+config X86
+	def_bool y

xen/arch/x86/Kconfig line 28

Quoted 10 lines
xen/arch/x86/Kconfig new file +10 -0
+	select HAS_GDBSX
+
+config ARCH_DEFCONFIG
+	string
+	default "arch/x86/i386_defconfig" if X86_32
+	default "arch/x86/x86_64_defconfig" if X86_64
+
+source "common/Kconfig"
+
+source "drivers/Kconfig"

We dropped 32bit hypervisor builds in 4.4, and it definitely doesn't build any more.

Quoted 2 lines

You don't need to provide i386_defconfig or X86_32 as far as the hypervisor is concerned.

Are defconfig-s that useful at all? (I ask because I extremely rarely make us of them in Linux.)

Jan

#19 lore raw

Re: [RFC 03/29] build: hookup initial Kconfig usage

Quoted 42 lines · Jan Beulich
Quoted 42 lines
Quoted 1 line
Quoted 1 line · On 06.10.15 at 11:58, <[email protected]> wrote:
Quoted 26 lines · Doug Goldstein

new file mode 100644
index 0000000..e69de29

xen/arch/x86/Kconfig new file +18 -0
new file mode 100644
index 0000000..5e34f4e
@@ -0,0 +1,28 @@
+# Select 32 or 64 bit
+config 64BIT
+	bool "64-bit Xen" if ARCH = "x86_64"
+	default ARCH != "i386"
+	---help---
+	  Say yes to build a 64-bit Xen
+	  Say no to build a 32-bit Xen
+
+config X86_32
+	def_bool y
+	depends on !64BIT
+
+config X86_64
+	def_bool y
+	depends on 64BIT
+
+config X86
+	def_bool y

xen/arch/x86/Kconfig line 28

Quoted 10 lines
xen/arch/x86/Kconfig new file +10 -0
+	select HAS_GDBSX
+
+config ARCH_DEFCONFIG
+	string
+	default "arch/x86/i386_defconfig" if X86_32
+	default "arch/x86/x86_64_defconfig" if X86_64
+
+source "common/Kconfig"
+
+source "drivers/Kconfig"

We dropped 32bit hypervisor builds in 4.4, and it definitely doesn't build any more.

Quoted 8 lines
Quoted 2 lines

You don't need to provide i386_defconfig or X86_32 as far as the hypervisor is concerned.

Are defconfig-s that useful at all? (I ask because I extremely rarely make us of them in Linux.)

Jan

You use it more than you think. Look at linux/arch/x86/configs/x86_64_defconfig. The contents of that is used everytime you don't have an existing config or are using a previous build's.

Signature · 1 line
Doug Goldstein

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#20 lore raw

Re: [RFC 03/29] build: hookup initial Kconfig usage

Quoted 8 lines
Quoted 1 line
Quoted 1 line · On 11.11.15 at 00:00, <[email protected]> wrote:
Quoted 2 lines · Jan Beulich

Are defconfig-s that useful at all? (I ask because I extremely rarely make us of them in Linux.)

You use it more than you think. Look at linux/arch/x86/configs/x86_64_defconfig. The contents of that is used everytime you don't have an existing config or are using a previous build's.

I agree to the former (but I never do such), but I don't think using a previous build's .config involves the defconfig. Unless I misunderstand your meaning of "previous build"...

Jan

#21 lore raw

Re: [RFC 03/29] build: hookup initial Kconfig usage

In reply to Doug Goldstein
Quoted 10 lines
Quoted 1 line
Quoted 1 line · On 06.10.15 at 00:03, <[email protected]> wrote:

Wire in the Kconfig build and makefile rules to be able to generate valid configuration files to be used by the build process.

---
 .gitignore                    |  8 ++++++++
 xen/Kconfig                   | 26 ++++++++++++++++++++++++++
 xen/Makefile                  | 14 ++++++++++++++
 xen/Makefile.linux            | 21 ++++++++++-----------

Bad name again for Xen. There are more such things (like KERNELVERSION) below.

xen/arch/arm/Kconfig line 2

Quoted 5 lines
xen/arch/arm/Kconfig new file +2 -0
@@ -0,0 +1,27 @@
+# Select 32 or 64 bit
+config 64BIT

Things like this should be generic options, not an arch-specific ones.

Jan

#22 lore raw

RFC 4/29 build: include config bits to build with

In reply to Doug Goldstein
---
 xen/Rules.mk             | 2 ++
 xen/include/xen/config.h | 2 ++
 2 files changed, 4 insertions(+)
xen/Rules.mk +2 -0
index bf19d20..01ec6d2 100644
@@ -12,6 +12,8 @@ frame_pointer ?= n
 lto           ?= n
 kexec         ?= y
 
+include $(BASEDIR)/include/config/auto.conf
+
 include $(XEN_ROOT)/Config.mk
 
 # Hardcoded configuration implications and dependencies.
xen/include/xen/config.h +2 -0
index f7258c7..12a4688 100644
@@ -12,6 +12,8 @@
 #endif
 #include <asm/config.h>
 
+#include <generated/autoconf.h>
+
 #define EXPORT_SYMBOL(var)
 #define EXPORT_SYMBOL_GPL(var)
 
Signature · 1 line
2.4.9
#23 lore raw

RFC 5/29 build: convert HAS_PASSTHROUGH use to Kconfig

In reply to Doug Goldstein

Use the Kconfig generated HAS_PASSTHROUGH defines for the code base.

---
 xen/Rules.mk                    |  1 -
 xen/arch/arm/Kconfig            |  1 +
 xen/arch/arm/Rules.mk           |  1 -
 xen/arch/x86/Kconfig            |  1 +
 xen/arch/x86/Rules.mk           |  1 -
 xen/common/compat/memory.c      |  4 ++--
 xen/common/memory.c             |  8 ++++----
 xen/drivers/Kconfig             |  1 +
 xen/drivers/Makefile            |  2 +-
 xen/drivers/passthrough/Kconfig |  4 ++++
 xen/include/xen/sched.h         |  4 ++--
 xen/include/xsm/dummy.h         |  8 ++++----
 xen/include/xsm/xsm.h           | 12 ++++++------
 xen/xsm/dummy.c                 |  4 ++--
 xen/xsm/flask/hooks.c           | 14 +++++++-------
 15 files changed, 35 insertions(+), 31 deletions(-)
 create mode 100644 xen/drivers/passthrough/Kconfig
xen/Rules.mk +0 -1
index 01ec6d2..d5ea000 100644
@@ -58,7 +58,6 @@ CFLAGS-$(perfc_arrays)  += -DPERF_ARRAYS
 CFLAGS-$(lock_profile)  += -DLOCK_PROFILE
 CFLAGS-$(HAS_ACPI)      += -DHAS_ACPI
 CFLAGS-$(HAS_GDBSX)     += -DHAS_GDBSX
-CFLAGS-$(HAS_PASSTHROUGH) += -DHAS_PASSTHROUGH
 CFLAGS-$(HAS_DEVICE_TREE) += -DHAS_DEVICE_TREE
 CFLAGS-$(HAS_MEM_ACCESS)  += -DHAS_MEM_ACCESS
 CFLAGS-$(HAS_MEM_PAGING)  += -DHAS_MEM_PAGING
xen/arch/arm/Kconfig +1 -0
index 8db5ff9..6331431 100644
@@ -16,6 +16,7 @@ config ARM_64
 
 config ARM
 	def_bool y
+	select HAS_PASSTHROUGH
 
 config ARCH_DEFCONFIG
 	string
xen/arch/arm/Rules.mk +0 -1
index b31770c..86d7b81 100644
@@ -9,7 +9,6 @@
 HAS_DEVICE_TREE := y
 HAS_VIDEO := y
 HAS_ARM_HDLCD := y
-HAS_PASSTHROUGH := y
 HAS_PDX := y
 
 CFLAGS += -I$(BASEDIR)/include
xen/arch/x86/Kconfig +1 -0
index 5e34f4e..fb009d1 100644
@@ -16,6 +16,7 @@ config X86_64
 
 config X86
 	def_bool y
+	select HAS_PASSTHROUGH
 	select HAS_GDBSX
 
 config ARCH_DEFCONFIG
xen/arch/x86/Rules.mk +0 -1
index 4a04a8a..7648ba7 100644
@@ -7,7 +7,6 @@ HAS_VGA  := y
 HAS_VIDEO  := y
 HAS_CPUFREQ := y
 HAS_PCI := y
-HAS_PASSTHROUGH := y
 HAS_NS16550 := y
 HAS_EHCI := y
 HAS_KEXEC := y
xen/common/compat/memory.c +2 -2
index 002948b..9ff99db 100644
@@ -17,7 +17,7 @@ CHECK_TYPE(domid);
 CHECK_mem_access_op;
 CHECK_vmemrange;
 
-#ifdef HAS_PASSTHROUGH
+#ifdef CONFIG_HAS_PASSTHROUGH
 struct get_reserved_device_memory {
     struct compat_reserved_device_memory_map map;
     unsigned int used_entries;
@@ -339,7 +339,7 @@ int compat_memory_op(unsigned int cmd, XEN_GUEST_HANDLE_PARAM(void) compat)
             break;
         }
 
-#ifdef HAS_PASSTHROUGH
+#ifdef CONFIG_HAS_PASSTHROUGH
         case XENMEM_reserved_device_memory_map:
         {
             struct get_reserved_device_memory grdm;
xen/common/memory.c +4 -4
index f6aed0d..ab018d3 100644
@@ -608,7 +608,7 @@ static int xenmem_add_to_physmap(struct domain *d,
     xatp->gpfn += start;
     xatp->size -= start;
 
-#ifdef HAS_PASSTHROUGH
+#ifdef CONFIG_HAS_PASSTHROUGH
     if ( need_iommu(d) )
         this_cpu(iommu_dont_flush_iotlb) = 1;
 #endif
@@ -631,7 +631,7 @@ static int xenmem_add_to_physmap(struct domain *d,
         }
     }
 
-#ifdef HAS_PASSTHROUGH
+#ifdef CONFIG_HAS_PASSTHROUGH
     if ( need_iommu(d) )
     {
         this_cpu(iommu_dont_flush_iotlb) = 0;
@@ -758,7 +758,7 @@ static int construct_memop_from_reservation(
     return 0;
 }
 
-#ifdef HAS_PASSTHROUGH
+#ifdef CONFIG_HAS_PASSTHROUGH
 struct get_reserved_device_memory {
     struct xen_reserved_device_memory_map map;
     unsigned int used_entries;
@@ -1205,7 +1205,7 @@ long do_memory_op(unsigned long cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
         break;
     }
 
-#ifdef HAS_PASSTHROUGH
+#ifdef CONFIG_HAS_PASSTHROUGH
     case XENMEM_reserved_device_memory_map:
     {
         struct get_reserved_device_memory grdm;
xen/drivers/Kconfig +1 -0
index 7bc7b6e..57311cc 100644
@@ -1,3 +1,4 @@
 menu "Device Drivers"
 
+source "drivers/passthrough/Kconfig"
 endmenu
xen/drivers/Makefile +1 -1
index 9c70f20..e283870 100644
@@ -1,6 +1,6 @@
 subdir-y += char
 subdir-$(HAS_CPUFREQ) += cpufreq
 subdir-$(HAS_PCI) += pci
-subdir-$(HAS_PASSTHROUGH) += passthrough
+subdir-$(CONFIG_HAS_PASSTHROUGH) += passthrough
 subdir-$(HAS_ACPI) += acpi
 subdir-$(HAS_VIDEO) += video
xen/drivers/passthrough/Kconfig new file +4 -0
new file mode 100644
index 0000000..817837d
@@ -0,0 +1,4 @@
+
+# Select HAS_PASSTHROUGH if PCI pass through is supported
+config HAS_PASSTHROUGH
+	bool
xen/include/xen/sched.h +2 -2
index 3729b0f..fc61fc3 100644
@@ -366,7 +366,7 @@ struct domain
 
     int64_t          time_offset_seconds;
 
-#ifdef HAS_PASSTHROUGH
+#ifdef CONFIG_HAS_PASSTHROUGH
     /* Does this guest need iommu mappings (-1 meaning "being set up")? */
     s8               need_iommu;
 #endif
@@ -839,7 +839,7 @@ void watchdog_domain_destroy(struct domain *d);
 #define has_hvm_container_vcpu(v)   (has_hvm_container_domain((v)->domain))
 #define is_pinned_vcpu(v) ((v)->domain->is_pinned || \
                            cpumask_weight((v)->cpu_hard_affinity) == 1)
-#ifdef HAS_PASSTHROUGH
+#ifdef CONFIG_HAS_PASSTHROUGH
 #define need_iommu(d)    ((d)->need_iommu)
 #else
 #define need_iommu(d)    (0)
xen/include/xsm/dummy.h +4 -4
index 9fe372c..af0d3bd 100644
@@ -323,7 +323,7 @@ static XSM_INLINE int xsm_get_vnumainfo(XSM_DEFAULT_ARG struct domain *d)
     return xsm_default_action(action, current->domain, d);
 }
 
-#if defined(HAS_PASSTHROUGH) && defined(HAS_PCI)
+#if defined(CONFIG_HAS_PASSTHROUGH) && defined(HAS_PCI)
 static XSM_INLINE int xsm_get_device_group(XSM_DEFAULT_ARG uint32_t machine_bdf)
 {
     XSM_ASSERT_ACTION(XSM_HOOK);
@@ -348,9 +348,9 @@ static XSM_INLINE int xsm_deassign_device(XSM_DEFAULT_ARG struct domain *d, uint
     return xsm_default_action(action, current->domain, d);
 }
 
-#endif /* HAS_PASSTHROUGH && HAS_PCI */
+#endif /* CONFIG_HAS_PASSTHROUGH && HAS_PCI */
 
-#if defined(HAS_PASSTHROUGH) && defined(HAS_DEVICE_TREE)
+#if defined(CONFIG_HAS_PASSTHROUGH) && defined(HAS_DEVICE_TREE)
 static XSM_INLINE int xsm_test_assign_dtdevice(XSM_DEFAULT_ARG const char *dtpath)
 {
     XSM_ASSERT_ACTION(XSM_HOOK);
@@ -371,7 +371,7 @@ static XSM_INLINE int xsm_deassign_dtdevice(XSM_DEFAULT_ARG struct domain *d,
     return xsm_default_action(action, current->domain, d);
 }
 
-#endif /* HAS_PASSTHROUGH && HAS_DEVICE_TREE */
+#endif /* CONFIG_HAS_PASSTHROUGH && HAS_DEVICE_TREE */
 
 static XSM_INLINE int xsm_resource_plug_core(XSM_DEFAULT_VOID)
 {
xen/include/xsm/xsm.h +6 -6
index ba3caed..f09f750 100644
@@ -114,14 +114,14 @@ struct xsm_operations {
     int (*iomem_mapping) (struct domain *d, uint64_t s, uint64_t e, uint8_t allow);
     int (*pci_config_permission) (struct domain *d, uint32_t machine_bdf, uint16_t start, uint16_t end, uint8_t access);
 
-#if defined(HAS_PASSTHROUGH) && defined(HAS_PCI)
+#if defined(CONFIG_HAS_PASSTHROUGH) && defined(HAS_PCI)
     int (*get_device_group) (uint32_t machine_bdf);
     int (*test_assign_device) (uint32_t machine_bdf);
     int (*assign_device) (struct domain *d, uint32_t machine_bdf);
     int (*deassign_device) (struct domain *d, uint32_t machine_bdf);
 #endif
 
-#if defined(HAS_PASSTHROUGH) && defined(HAS_DEVICE_TREE)
+#if defined(CONFIG_HAS_PASSTHROUGH) && defined(HAS_DEVICE_TREE)
     int (*test_assign_dtdevice) (const char *dtpath);
     int (*assign_dtdevice) (struct domain *d, const char *dtpath);
     int (*deassign_dtdevice) (struct domain *d, const char *dtpath);
@@ -468,7 +468,7 @@ static inline int xsm_pci_config_permission (xsm_default_t def, struct domain *d
     return xsm_ops->pci_config_permission(d, machine_bdf, start, end, access);
 }
 
-#if defined(HAS_PASSTHROUGH) && defined(HAS_PCI)
+#if defined(CONFIG_HAS_PASSTHROUGH) && defined(HAS_PCI)
 static inline int xsm_get_device_group(xsm_default_t def, uint32_t machine_bdf)
 {
     return xsm_ops->get_device_group(machine_bdf);
@@ -488,9 +488,9 @@ static inline int xsm_deassign_device(xsm_default_t def, struct domain *d, uint3
 {
     return xsm_ops->deassign_device(d, machine_bdf);
 }
-#endif /* HAS_PASSTHROUGH && HAS_PCI) */
+#endif /* CONFIG_HAS_PASSTHROUGH && HAS_PCI) */
 
-#if defined(HAS_PASSTHROUGH) && defined(HAS_DEVICE_TREE)
+#if defined(CONFIG_HAS_PASSTHROUGH) && defined(HAS_DEVICE_TREE)
 static inline int xsm_assign_dtdevice(xsm_default_t def, struct domain *d,
                                       const char *dtpath)
 {
@@ -509,7 +509,7 @@ static inline int xsm_deassign_dtdevice(xsm_default_t def, struct domain *d,
     return xsm_ops->deassign_dtdevice(d, dtpath);
 }
 
-#endif /* HAS_PASSTHROUGH && HAS_DEVICE_TREE */
+#endif /* CONFIG_HAS_PASSTHROUGH && HAS_DEVICE_TREE */
 
 static inline int xsm_resource_plug_pci (xsm_default_t def, uint32_t machine_bdf)
 {
xen/xsm/dummy.c +2 -2
index 72eba40..ca84ff5 100644
@@ -89,14 +89,14 @@ void xsm_fixup_ops (struct xsm_operations *ops)
     set_to_dummy_if_null(ops, pci_config_permission);
     set_to_dummy_if_null(ops, get_vnumainfo);
 
-#if defined(HAS_PASSTHROUGH) && defined(HAS_PCI)
+#if defined(CONFIG_HAS_PASSTHROUGH) && defined(HAS_PCI)
     set_to_dummy_if_null(ops, get_device_group);
     set_to_dummy_if_null(ops, test_assign_device);
     set_to_dummy_if_null(ops, assign_device);
     set_to_dummy_if_null(ops, deassign_device);
 #endif
 
-#if defined(HAS_PASSTHROUGH) && defined(HAS_DEVICE_TREE)
+#if defined(CONFIG_HAS_PASSTHROUGH) && defined(HAS_DEVICE_TREE)
     set_to_dummy_if_null(ops, test_assign_dtdevice);
     set_to_dummy_if_null(ops, assign_dtdevice);
     set_to_dummy_if_null(ops, deassign_dtdevice);
xen/xsm/flask/hooks.c +7 -7
index 4180f3b..67161b2 100644
@@ -588,7 +588,7 @@ static int flask_domctl(struct domain *d, int cmd)
     case XEN_DOMCTL_ioport_permission:
     case XEN_DOMCTL_ioport_mapping:
 #endif
-#ifdef HAS_PASSTHROUGH
+#ifdef CONFIG_HAS_PASSTHROUGH
     /*
      * These have individual XSM hooks
      * (drivers/passthrough/{pci,device_tree.c)
@@ -1213,7 +1213,7 @@ static int flask_mem_sharing(struct domain *d)
 }
 #endif
 
-#if defined(HAS_PASSTHROUGH) && defined(HAS_PCI)
+#if defined(CONFIG_HAS_PASSTHROUGH) && defined(HAS_PCI)
 static int flask_get_device_group(uint32_t machine_bdf)
 {
     u32 rsid;
@@ -1277,9 +1277,9 @@ static int flask_deassign_device(struct domain *d, uint32_t machine_bdf)
 
     return avc_current_has_perm(rsid, SECCLASS_RESOURCE, RESOURCE__REMOVE_DEVICE, NULL);
 }
-#endif /* HAS_PASSTHROUGH && HAS_PCI */
+#endif /* CONFIG_HAS_PASSTHROUGH && HAS_PCI */
 
-#if defined(HAS_PASSTHROUGH) && defined(HAS_DEVICE_TREE)
+#if defined(CONFIG_HAS_PASSTHROUGH) && defined(HAS_DEVICE_TREE)
 static int flask_test_assign_dtdevice(const char *dtpath)
 {
     u32 rsid;
@@ -1333,7 +1333,7 @@ static int flask_deassign_dtdevice(struct domain *d, const char *dtpath)
     return avc_current_has_perm(rsid, SECCLASS_RESOURCE, RESOURCE__REMOVE_DEVICE,
                                 NULL);
 }
-#endif /* HAS_PASSTHROUGH && HAS_DEVICE_TREE */
+#endif /* CONFIG_HAS_PASSTHROUGH && HAS_DEVICE_TREE */
 
 #ifdef CONFIG_X86
 static int flask_do_mca(void)
@@ -1725,14 +1725,14 @@ static struct xsm_operations flask_ops = {
     .remove_from_physmap = flask_remove_from_physmap,
     .map_gmfn_foreign = flask_map_gmfn_foreign,
 
-#if defined(HAS_PASSTHROUGH) && defined(HAS_PCI)
+#if defined(CONFIG_HAS_PASSTHROUGH) && defined(HAS_PCI)
     .get_device_group = flask_get_device_group,
     .test_assign_device = flask_test_assign_device,
     .assign_device = flask_assign_device,
     .deassign_device = flask_deassign_device,
 #endif
 
-#if defined(HAS_PASSTHROUGH) && defined(HAS_DEVICE_TREE)
+#if defined(CONFIG_HAS_PASSTHROUGH) && defined(HAS_DEVICE_TREE)
     .test_assign_dtdevice = flask_test_assign_dtdevice,
     .assign_dtdevice = flask_assign_dtdevice,
     .deassign_dtdevice = flask_deassign_dtdevice,
Signature · 1 line
2.4.9
#24 lore raw

Re: [RFC 05/29] build: convert HAS_PASSTHROUGH use to Kconfig

Quoted 4 lines · Doug Goldstein

Use the Kconfig generated HAS_PASSTHROUGH defines for the code base.

Moving to a Kconfig style of selecting features changes the meaning of our HAS_ prefix.

IMO, the HAS_ should disappear in the conversion, as the CONFIG_* itself existing indicates that kconfig has decided that a feature is present.

~Andrew

#25 lore raw

Re: [RFC 05/29] build: convert HAS_PASSTHROUGH use to Kconfig

Quoted 4 lines
Quoted 1 line
Quoted 1 line · On 06.10.15 at 11:47, <[email protected]> wrote:
Quoted 2 lines · Doug Goldstein

Use the Kconfig generated HAS_PASSTHROUGH defines for the code base.

Quoted 8 lines
Quoted 2 lines

Moving to a Kconfig style of selecting features changes the meaning of our HAS_ prefix.

IMO, the HAS_ should disappear in the conversion, as the CONFIG_* itself existing indicates that kconfig has decided that a feature is present.

+1

Jan

#26 lore raw

Re: [RFC 05/29] build: convert HAS_PASSTHROUGH use to Kconfig

In reply to Andrew Cooper
Quoted 6 lines · Andrew Cooper
Quoted 4 lines · Doug Goldstein

Use the Kconfig generated HAS_PASSTHROUGH defines for the code base.

Quoted 8 lines

Moving to a Kconfig style of selecting features changes the meaning of our HAS_ prefix.

IMO, the HAS_ should disappear in the conversion, as the CONFIG_* itself existing indicates that kconfig has decided that a feature is present.

~Andrew

So I am treating the CONFIG_HAS_ defines similar to how the Linux kernel has CONFIG_HAVE_. These are not actually user facing options but instead they are enforced by the architecture instead of being a user facing option.

For example CONFIG_HAS_KEXEC means the architecture/platform supports KEXEC but CONFIG_KEXEC would be the user configurable option to turn it on/off. This would be consistent with the current behavior in the Xen tree where HAS_KEXEC means the architecture/platform supports KEXEC while 'kexec' as an env var allows the user to build kexec on or off.

If that's not desired I can combine them.

Signature · 1 line
Doug Goldstein

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#27 lore raw

RFC 6/29 build: convert HAS_DEVICE_TREE use to Kconfig

In reply to Doug Goldstein

Use the Kconfig generated CONFIG_HAS_DEVICE_TREE defines in the code base.

---
 xen/Rules.mk                     |  1 -
 xen/arch/arm/Kconfig             |  1 +
 xen/arch/arm/Rules.mk            |  1 -
 xen/common/Kconfig               |  4 ++++
 xen/common/Makefile              |  4 ++--
 xen/drivers/char/ns16550.c       |  6 +++---
 xen/drivers/passthrough/Makefile |  2 +-
 xen/drivers/passthrough/iommu.c  |  2 +-
 xen/include/asm-arm/device.h     |  2 +-
 xen/include/xen/hvm/iommu.h      |  2 +-
 xen/include/xen/iommu.h          |  4 ++--
 xen/include/xsm/dummy.h          |  4 ++--
 xen/include/xsm/xsm.h            | 10 +++++-----
 xen/xsm/dummy.c                  |  2 +-
 xen/xsm/flask/hooks.c            |  6 +++---
 xen/xsm/xsm_core.c               |  2 +-
 xen/xsm/xsm_policy.c             |  4 ++--
 17 files changed, 30 insertions(+), 27 deletions(-)
xen/Rules.mk +0 -1
index d5ea000..581a498 100644
@@ -58,7 +58,6 @@ CFLAGS-$(perfc_arrays)  += -DPERF_ARRAYS
 CFLAGS-$(lock_profile)  += -DLOCK_PROFILE
 CFLAGS-$(HAS_ACPI)      += -DHAS_ACPI
 CFLAGS-$(HAS_GDBSX)     += -DHAS_GDBSX
-CFLAGS-$(HAS_DEVICE_TREE) += -DHAS_DEVICE_TREE
 CFLAGS-$(HAS_MEM_ACCESS)  += -DHAS_MEM_ACCESS
 CFLAGS-$(HAS_MEM_PAGING)  += -DHAS_MEM_PAGING
 CFLAGS-$(HAS_MEM_SHARING) += -DHAS_MEM_SHARING
xen/arch/arm/Kconfig +1 -0
index 6331431..86b9f52 100644
@@ -16,6 +16,7 @@ config ARM_64
 
 config ARM
 	def_bool y
+	select HAS_DEVICE_TREE
 	select HAS_PASSTHROUGH
 
 config ARCH_DEFCONFIG
xen/arch/arm/Rules.mk +0 -1
index 86d7b81..4725374 100644
@@ -6,7 +6,6 @@
 # 'make clean' before rebuilding.
 #
 
-HAS_DEVICE_TREE := y
 HAS_VIDEO := y
 HAS_ARM_HDLCD := y
 HAS_PDX := y
xen/common/Kconfig +4 -0
index 0251856..53ca33f 100644
@@ -1,4 +1,8 @@
 
 menu "Common Features"
 
+# Select HAS_DEVICE_TREE if device tree is supported
+config HAS_DEVICE_TREE
+	bool
+
 endmenu
xen/common/Makefile +2 -2
index b290c16..d51e971 100644
@@ -2,7 +2,7 @@ obj-y += bitmap.o
 obj-y += core_parking.o
 obj-y += cpu.o
 obj-y += cpupool.o
-obj-$(HAS_DEVICE_TREE) += device_tree.o
+obj-$(CONFIG_HAS_DEVICE_TREE) += device_tree.o
 obj-y += domctl.o
 obj-y += domain.o
 obj-y += event_2l.o
@@ -70,4 +70,4 @@ subdir-$(x86_64) += hvm
 subdir-$(coverage) += gcov
 
 subdir-y += libelf
-subdir-$(HAS_DEVICE_TREE) += libfdt
+subdir-$(CONFIG_HAS_DEVICE_TREE) += libfdt
xen/drivers/char/ns16550.c +3 -3
index d443880..bd524e6 100644
@@ -24,7 +24,7 @@
 #include <xen/8250-uart.h>
 #include <xen/vmap.h>
 #include <asm/io.h>
-#ifdef HAS_DEVICE_TREE
+#ifdef CONFIG_HAS_DEVICE_TREE
 #include <asm/device.h>
 #endif
 #ifdef CONFIG_X86
@@ -1123,7 +1123,7 @@ void __init ns16550_init(int index, struct ns16550_defaults *defaults)
     ns16550_parse_port_config(uart, (index == 0) ? opt_com1 : opt_com2);
 }
 
-#ifdef HAS_DEVICE_TREE
+#ifdef CONFIG_HAS_DEVICE_TREE
 static int __init ns16550_uart_dt_init(struct dt_device_node *dev,
                                        const void *data)
 {
@@ -1198,7 +1198,7 @@ DT_DEVICE_START(ns16550, "NS16550 UART", DEVICE_SERIAL)
         .init = ns16550_uart_dt_init,
 DT_DEVICE_END
 
-#endif /* HAS_DEVICE_TREE */
+#endif /* CONFIG_HAS_DEVICE_TREE */
 /*
  * Local variables:
  * mode: C
xen/drivers/passthrough/Makefile +1 -1
index 16e9027..2bb5afb 100644
@@ -6,4 +6,4 @@ subdir-$(arm) += arm
 obj-y += iommu.o
 obj-$(x86) += io.o
 obj-$(HAS_PCI) += pci.o
-obj-$(HAS_DEVICE_TREE) += device_tree.o
+obj-$(CONFIG_HAS_DEVICE_TREE) += device_tree.o
xen/drivers/passthrough/iommu.c +1 -1
index 3e55abf..3359330 100644
@@ -346,7 +346,7 @@ int iommu_do_domctl(
     ret = iommu_do_pci_domctl(domctl, d, u_domctl);
 #endif
 
-#ifdef HAS_DEVICE_TREE
+#ifdef CONFIG_HAS_DEVICE_TREE
     if ( ret == -ENODEV )
         ret = iommu_do_dt_domctl(domctl, d, u_domctl);
 #endif
xen/include/asm-arm/device.h +1 -1
index 5d0a4cd..b455bdf 100644
@@ -16,7 +16,7 @@ struct dev_archdata {
 struct device
 {
     enum device_type type;
-#ifdef HAS_DEVICE_TREE
+#ifdef CONFIG_HAS_DEVICE_TREE
     struct dt_device_node *of_node; /* Used by drivers imported from Linux */
 #endif
     struct dev_archdata archdata;
xen/include/xen/hvm/iommu.h +1 -1
index 106e08f..c817eec 100644
@@ -29,7 +29,7 @@ struct hvm_iommu {
     /* iommu_ops */
     const struct iommu_ops *platform_ops;
 
-#ifdef HAS_DEVICE_TREE
+#ifdef CONFIG_HAS_DEVICE_TREE
     /* List of DT devices assigned to this domain */
     struct list_head dt_devices;
 #endif
xen/include/xen/iommu.h +2 -2
index 8f3a20e..fa10a45 100644
@@ -109,7 +109,7 @@ void iommu_read_msi_from_ire(struct msi_desc *msi_desc, struct msi_msg *msg);
 #define PT_IRQ_TIME_OUT MILLISECS(8)
 #endif /* HAS_PCI */
 
-#ifdef HAS_DEVICE_TREE
+#ifdef CONFIG_HAS_DEVICE_TREE
 #include <xen/device_tree.h>
 
 int iommu_assign_dt_device(struct domain *d, struct dt_device_node *dev);
@@ -120,7 +120,7 @@ int iommu_release_dt_devices(struct domain *d);
 int iommu_do_dt_domctl(struct xen_domctl *, struct domain *,
                        XEN_GUEST_HANDLE_PARAM(xen_domctl_t));
 
-#endif /* HAS_DEVICE_TREE */
+#endif /* CONFIG_HAS_DEVICE_TREE */
 
 struct page_info;
 
xen/include/xsm/dummy.h +2 -2
index af0d3bd..fa47daa 100644
@@ -350,7 +350,7 @@ static XSM_INLINE int xsm_deassign_device(XSM_DEFAULT_ARG struct domain *d, uint
 
 #endif /* CONFIG_HAS_PASSTHROUGH && HAS_PCI */
 
-#if defined(CONFIG_HAS_PASSTHROUGH) && defined(HAS_DEVICE_TREE)
+#if defined(CONFIG_HAS_PASSTHROUGH) && defined(CONFIG_HAS_DEVICE_TREE)
 static XSM_INLINE int xsm_test_assign_dtdevice(XSM_DEFAULT_ARG const char *dtpath)
 {
     XSM_ASSERT_ACTION(XSM_HOOK);
@@ -371,7 +371,7 @@ static XSM_INLINE int xsm_deassign_dtdevice(XSM_DEFAULT_ARG struct domain *d,
     return xsm_default_action(action, current->domain, d);
 }
 
-#endif /* CONFIG_HAS_PASSTHROUGH && HAS_DEVICE_TREE */
+#endif /* CONFIG_HAS_PASSTHROUGH && CONFIG_HAS_DEVICE_TREE */
 
 static XSM_INLINE int xsm_resource_plug_core(XSM_DEFAULT_VOID)
 {
xen/include/xsm/xsm.h +5 -5
index f09f750..02d66c8 100644
@@ -121,7 +121,7 @@ struct xsm_operations {
     int (*deassign_device) (struct domain *d, uint32_t machine_bdf);
 #endif
 
-#if defined(CONFIG_HAS_PASSTHROUGH) && defined(HAS_DEVICE_TREE)
+#if defined(CONFIG_HAS_PASSTHROUGH) && defined(CONFIG_HAS_DEVICE_TREE)
     int (*test_assign_dtdevice) (const char *dtpath);
     int (*assign_dtdevice) (struct domain *d, const char *dtpath);
     int (*deassign_dtdevice) (struct domain *d, const char *dtpath);
@@ -490,7 +490,7 @@ static inline int xsm_deassign_device(xsm_default_t def, struct domain *d, uint3
 }
 #endif /* CONFIG_HAS_PASSTHROUGH && HAS_PCI) */
 
-#if defined(CONFIG_HAS_PASSTHROUGH) && defined(HAS_DEVICE_TREE)
+#if defined(CONFIG_HAS_PASSTHROUGH) && defined(CONFIG_HAS_DEVICE_TREE)
 static inline int xsm_assign_dtdevice(xsm_default_t def, struct domain *d,
                                       const char *dtpath)
 {
@@ -509,7 +509,7 @@ static inline int xsm_deassign_dtdevice(xsm_default_t def, struct domain *d,
     return xsm_ops->deassign_dtdevice(d, dtpath);
 }
 
-#endif /* CONFIG_HAS_PASSTHROUGH && HAS_DEVICE_TREE */
+#endif /* CONFIG_HAS_PASSTHROUGH && CONFIG_HAS_DEVICE_TREE */
 
 static inline int xsm_resource_plug_pci (xsm_default_t def, uint32_t machine_bdf)
 {
@@ -740,7 +740,7 @@ extern int xsm_multiboot_policy_init(unsigned long *module_map,
                                      void *(*bootstrap_map)(const module_t *));
 #endif
 
-#ifdef HAS_DEVICE_TREE
+#ifdef CONFIG_HAS_DEVICE_TREE
 extern int xsm_dt_init(void);
 extern int xsm_dt_policy_init(void);
 #endif
@@ -764,7 +764,7 @@ static inline int xsm_multiboot_init (unsigned long *module_map,
 }
 #endif
 
-#ifdef HAS_DEVICE_TREE
+#ifdef CONFIG_HAS_DEVICE_TREE
 static inline int xsm_dt_init(void)
 {
     return 0;
xen/xsm/dummy.c +1 -1
index ca84ff5..880662f 100644
@@ -96,7 +96,7 @@ void xsm_fixup_ops (struct xsm_operations *ops)
     set_to_dummy_if_null(ops, deassign_device);
 #endif
 
-#if defined(CONFIG_HAS_PASSTHROUGH) && defined(HAS_DEVICE_TREE)
+#if defined(CONFIG_HAS_PASSTHROUGH) && defined(CONFIG_HAS_DEVICE_TREE)
     set_to_dummy_if_null(ops, test_assign_dtdevice);
     set_to_dummy_if_null(ops, assign_dtdevice);
     set_to_dummy_if_null(ops, deassign_dtdevice);
xen/xsm/flask/hooks.c +3 -3
index 67161b2..0c9ef87 100644
@@ -1279,7 +1279,7 @@ static int flask_deassign_device(struct domain *d, uint32_t machine_bdf)
 }
 #endif /* CONFIG_HAS_PASSTHROUGH && HAS_PCI */
 
-#if defined(CONFIG_HAS_PASSTHROUGH) && defined(HAS_DEVICE_TREE)
+#if defined(CONFIG_HAS_PASSTHROUGH) && defined(CONFIG_HAS_DEVICE_TREE)
 static int flask_test_assign_dtdevice(const char *dtpath)
 {
     u32 rsid;
@@ -1333,7 +1333,7 @@ static int flask_deassign_dtdevice(struct domain *d, const char *dtpath)
     return avc_current_has_perm(rsid, SECCLASS_RESOURCE, RESOURCE__REMOVE_DEVICE,
                                 NULL);
 }
-#endif /* CONFIG_HAS_PASSTHROUGH && HAS_DEVICE_TREE */
+#endif /* CONFIG_HAS_PASSTHROUGH && CONFIG_HAS_DEVICE_TREE */
 
 #ifdef CONFIG_X86
 static int flask_do_mca(void)
@@ -1732,7 +1732,7 @@ static struct xsm_operations flask_ops = {
     .deassign_device = flask_deassign_device,
 #endif
 
-#if defined(CONFIG_HAS_PASSTHROUGH) && defined(HAS_DEVICE_TREE)
+#if defined(CONFIG_HAS_PASSTHROUGH) && defined(CONFIG_HAS_DEVICE_TREE)
     .test_assign_dtdevice = flask_test_assign_dtdevice,
     .assign_dtdevice = flask_assign_dtdevice,
     .deassign_dtdevice = flask_deassign_dtdevice,
xen/xsm/xsm_core.c +1 -1
index 0ac6d03..2a74496 100644
@@ -85,7 +85,7 @@ int __init xsm_multiboot_init(unsigned long *module_map,
 }
 #endif
 
-#ifdef HAS_DEVICE_TREE
+#ifdef CONFIG_HAS_DEVICE_TREE
 int __init xsm_dt_init(void)
 {
     int ret = 0;
xen/xsm/xsm_policy.c +2 -2
index 6e0bb78..b60d822 100644
@@ -23,7 +23,7 @@
 #include <xen/multiboot.h>
 #endif
 #include <xen/bitops.h>
-#ifdef HAS_DEVICE_TREE
+#ifdef CONFIG_HAS_DEVICE_TREE
 # include <asm/setup.h>
 # include <xen/device_tree.h>
 #endif
@@ -74,7 +74,7 @@ int __init xsm_multiboot_policy_init(unsigned long *module_map,
 }
 #endif
 
-#ifdef HAS_DEVICE_TREE
+#ifdef CONFIG_HAS_DEVICE_TREE
 int __init xsm_dt_policy_init(void)
 {
     struct bootmodule *mod = boot_module_find_by_kind(BOOTMOD_XSM);
Signature · 1 line
2.4.9
#28 lore raw

RFC 7/29 build: convert HAS_PCI use to Kconfig

In reply to Doug Goldstein

Use the Kconfig generated CONFIG_HAS_PCI defines in the code base.

---
 xen/Rules.mk                     |  1 -
 xen/arch/x86/Kconfig             |  1 +
 xen/arch/x86/Rules.mk            |  1 -
 xen/common/sysctl.c              |  2 +-
 xen/drivers/Kconfig              |  3 +++
 xen/drivers/Makefile             |  2 +-
 xen/drivers/char/ns16550.c       | 24 ++++++++++++------------
 xen/drivers/passthrough/Makefile |  2 +-
 xen/drivers/passthrough/iommu.c  |  2 +-
 xen/drivers/pci/Kconfig          |  4 ++++
 xen/include/xen/iommu.h          | 10 +++++-----
 xen/include/xsm/dummy.h          |  4 ++--
 xen/include/xsm/xsm.h            |  6 +++---
 xen/xsm/dummy.c                  |  2 +-
 xen/xsm/flask/hooks.c            | 14 +++++++-------
 15 files changed, 42 insertions(+), 36 deletions(-)
 create mode 100644 xen/drivers/pci/Kconfig
xen/Rules.mk +0 -1
index 581a498..2dcd102 100644
@@ -61,7 +61,6 @@ CFLAGS-$(HAS_GDBSX)     += -DHAS_GDBSX
 CFLAGS-$(HAS_MEM_ACCESS)  += -DHAS_MEM_ACCESS
 CFLAGS-$(HAS_MEM_PAGING)  += -DHAS_MEM_PAGING
 CFLAGS-$(HAS_MEM_SHARING) += -DHAS_MEM_SHARING
-CFLAGS-$(HAS_PCI)       += -DHAS_PCI
 CFLAGS-$(HAS_IOPORTS)   += -DHAS_IOPORTS
 CFLAGS-$(HAS_PDX)       += -DHAS_PDX
 CFLAGS-$(frame_pointer) += -fno-omit-frame-pointer -DCONFIG_FRAME_POINTER
xen/arch/x86/Kconfig +1 -0
index fb009d1..d1d8f35 100644
@@ -17,6 +17,7 @@ config X86_64
 config X86
 	def_bool y
 	select HAS_PASSTHROUGH
+	select HAS_PCI
 	select HAS_GDBSX
 
 config ARCH_DEFCONFIG
xen/arch/x86/Rules.mk +0 -1
index 7648ba7..10cfb21 100644
@@ -6,7 +6,6 @@ HAS_ACPI := y
 HAS_VGA  := y
 HAS_VIDEO  := y
 HAS_CPUFREQ := y
-HAS_PCI := y
 HAS_NS16550 := y
 HAS_EHCI := y
 HAS_KEXEC := y
xen/common/sysctl.c +1 -1
index 85e853f..47d115e 100644
@@ -401,7 +401,7 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) u_sysctl)
         break;
 #endif
 
-#ifdef HAS_PCI
+#ifdef CONFIG_HAS_PCI
     case XEN_SYSCTL_pcitopoinfo:
     {
         xen_sysctl_pcitopoinfo_t *ti = &op->u.pcitopoinfo;
xen/drivers/Kconfig +3 -0
index 57311cc..5362e41 100644
@@ -1,4 +1,7 @@
 menu "Device Drivers"
 
 source "drivers/passthrough/Kconfig"
+
+source "drivers/pci/Kconfig"
+
 endmenu
xen/drivers/Makefile +1 -1
index e283870..eb32d69 100644
@@ -1,6 +1,6 @@
 subdir-y += char
 subdir-$(HAS_CPUFREQ) += cpufreq
-subdir-$(HAS_PCI) += pci
+subdir-$(CONFIG_HAS_PCI) += pci
 subdir-$(CONFIG_HAS_PASSTHROUGH) += passthrough
 subdir-$(HAS_ACPI) += acpi
 subdir-$(HAS_VIDEO) += video
xen/drivers/char/ns16550.c +12 -12
index bd524e6..615124c 100644
@@ -16,7 +16,7 @@
 #include <xen/timer.h>
 #include <xen/serial.h>
 #include <xen/iocap.h>
-#ifdef HAS_PCI
+#ifdef CONFIG_HAS_PCI
 #include <xen/pci.h>
 #include <xen/pci_regs.h>
 #include <xen/pci_ids.h>
@@ -64,7 +64,7 @@ static struct ns16550 {
     unsigned int timeout_ms;
     bool_t intr_works;
     bool_t dw_usr_bsy;
-#ifdef HAS_PCI
+#ifdef CONFIG_HAS_PCI
     /* PCI card parameters. */
     unsigned int pb_bdf[3]; /* pci bridge BDF */
     unsigned int ps_bdf[3]; /* pci serial port BDF */
@@ -97,7 +97,7 @@ struct ns16550_config_param {
 };
 
 
-#ifdef HAS_PCI
+#ifdef CONFIG_HAS_PCI
 enum {
     param_default = 0,
     param_trumanage,
@@ -474,7 +474,7 @@ static int ns16550_getc(struct serial_port *port, char *pc)
 
 static void pci_serial_early_init(struct ns16550 *uart)
 {
-#ifdef HAS_PCI
+#ifdef CONFIG_HAS_PCI
     if ( !uart->ps_bdf_enable || uart->io_base >= 0x10000 )
         return;
 
@@ -615,7 +615,7 @@ static void __init ns16550_init_postirq(struct serial_port *port)
 
     ns16550_setup_postirq(uart);
 
-#ifdef HAS_PCI
+#ifdef CONFIG_HAS_PCI
     if ( uart->bar || uart->ps_bdf_enable )
     {
         if ( !uart->enable_ro )
@@ -644,7 +644,7 @@ static void ns16550_suspend(struct serial_port *port)
 
     stop_timer(&uart->timer);
 
-#ifdef HAS_PCI
+#ifdef CONFIG_HAS_PCI
     if ( uart->bar )
        uart->cr = pci_conf_read16(0, uart->ps_bdf[0], uart->ps_bdf[1],
                                   uart->ps_bdf[2], PCI_COMMAND);
@@ -653,7 +653,7 @@ static void ns16550_suspend(struct serial_port *port)
 
 static void _ns16550_resume(struct serial_port *port)
 {
-#ifdef HAS_PCI
+#ifdef CONFIG_HAS_PCI
     struct ns16550 *uart = port->uart;
 
     if ( uart->bar )
@@ -791,7 +791,7 @@ static int __init check_existence(struct ns16550 *uart)
     return 1; /* Everything is MMIO */
 #endif
 
-#ifdef HAS_PCI
+#ifdef CONFIG_HAS_PCI
     pci_serial_early_init(uart);
 #endif
 
@@ -822,7 +822,7 @@ static int __init check_existence(struct ns16550 *uart)
     return (status == 0x90);
 }
 
-#ifdef HAS_PCI
+#ifdef CONFIG_HAS_PCI
 static int __init
 pci_uart_config (struct ns16550 *uart, int skip_amt, int bar_idx)
 {
@@ -1022,7 +1022,7 @@ static void __init ns16550_parse_port_config(
 
     if ( *conf == ',' && *++conf != ',' )
     {
-#ifdef HAS_PCI
+#ifdef CONFIG_HAS_PCI
         if ( strncmp(conf, "pci", 3) == 0 )
         {
             if ( pci_uart_config(uart, 1/* skip AMT */, uart - ns16550_com) )
@@ -1045,7 +1045,7 @@ static void __init ns16550_parse_port_config(
     if ( *conf == ',' && *++conf != ',' )
         uart->irq = simple_strtol(conf, &conf, 10);
 
-#ifdef HAS_PCI
+#ifdef CONFIG_HAS_PCI
     if ( *conf == ',' && *++conf != ',' )
     {
         conf = parse_pci(conf, NULL, &uart->ps_bdf[0],
@@ -1086,7 +1086,7 @@ static void ns16550_init_common(struct ns16550 *uart)
 {
     uart->clock_hz  = UART_CLOCK_HZ;
 
-#ifdef HAS_PCI
+#ifdef CONFIG_HAS_PCI
     uart->enable_ro = 0;
 #endif
 
xen/drivers/passthrough/Makefile +1 -1
index 2bb5afb..a6657c5 100644
@@ -5,5 +5,5 @@ subdir-$(arm) += arm
 
 obj-y += iommu.o
 obj-$(x86) += io.o
-obj-$(HAS_PCI) += pci.o
+obj-$(CONFIG_HAS_PCI) += pci.o
 obj-$(CONFIG_HAS_DEVICE_TREE) += device_tree.o
xen/drivers/passthrough/iommu.c +1 -1
index 3359330..65c2e46 100644
@@ -342,7 +342,7 @@ int iommu_do_domctl(
     if ( !iommu_enabled )
         return -ENOSYS;
 
-#ifdef HAS_PCI
+#ifdef CONFIG_HAS_PCI
     ret = iommu_do_pci_domctl(domctl, d, u_domctl);
 #endif
 
xen/drivers/pci/Kconfig new file +4 -0
new file mode 100644
index 0000000..68b9953
@@ -0,0 +1,4 @@
+
+# Select HAS_PCI if PCI is supported
+config HAS_PCI
+	bool
xen/include/xen/iommu.h +5 -5
index fa10a45..e5ed3be 100644
@@ -87,7 +87,7 @@ enum iommu_feature
 bool_t iommu_has_feature(struct domain *d, enum iommu_feature feature);
 
 
-#ifdef HAS_PCI
+#ifdef CONFIG_HAS_PCI
 void pt_pci_init(void);
 
 struct pirq;
@@ -107,7 +107,7 @@ int iommu_update_ire_from_msi(struct msi_desc *msi_desc, struct msi_msg *msg);
 void iommu_read_msi_from_ire(struct msi_desc *msi_desc, struct msi_msg *msg);
 
 #define PT_IRQ_TIME_OUT MILLISECS(8)
-#endif /* HAS_PCI */
+#endif /* CONFIG_HAS_PCI */
 
 #ifdef CONFIG_HAS_DEVICE_TREE
 #include <xen/device_tree.h>
@@ -141,11 +141,11 @@ struct iommu_ops {
     int (*assign_device)(struct domain *, u8 devfn, device_t *dev, u32 flag);
     int (*reassign_device)(struct domain *s, struct domain *t,
                            u8 devfn, device_t *dev);
-#ifdef HAS_PCI
+#ifdef CONFIG_HAS_PCI
     int (*get_device_group_id)(u16 seg, u8 bus, u8 devfn);
     int (*update_ire_from_msi)(struct msi_desc *msi_desc, struct msi_msg *msg);
     void (*read_msi_from_ire)(struct msi_desc *msi_desc, struct msi_msg *msg);
-#endif /* HAS_PCI */
+#endif /* CONFIG_HAS_PCI */
 
     void (*teardown)(struct domain *d);
     int (*map_page)(struct domain *d, unsigned long gfn, unsigned long mfn,
@@ -174,7 +174,7 @@ int iommu_get_reserved_device_memory(iommu_grdm_t *, void *);
 
 void iommu_share_p2m_table(struct domain *d);
 
-#ifdef HAS_PCI
+#ifdef CONFIG_HAS_PCI
 int iommu_do_pci_domctl(struct xen_domctl *, struct domain *d,
                         XEN_GUEST_HANDLE_PARAM(xen_domctl_t));
 #endif
xen/include/xsm/dummy.h +2 -2
index fa47daa..42e696a 100644
@@ -323,7 +323,7 @@ static XSM_INLINE int xsm_get_vnumainfo(XSM_DEFAULT_ARG struct domain *d)
     return xsm_default_action(action, current->domain, d);
 }
 
-#if defined(CONFIG_HAS_PASSTHROUGH) && defined(HAS_PCI)
+#if defined(CONFIG_HAS_PASSTHROUGH) && defined(CONFIG_HAS_PCI)
 static XSM_INLINE int xsm_get_device_group(XSM_DEFAULT_ARG uint32_t machine_bdf)
 {
     XSM_ASSERT_ACTION(XSM_HOOK);
@@ -348,7 +348,7 @@ static XSM_INLINE int xsm_deassign_device(XSM_DEFAULT_ARG struct domain *d, uint
     return xsm_default_action(action, current->domain, d);
 }
 
-#endif /* CONFIG_HAS_PASSTHROUGH && HAS_PCI */
+#endif /* CONFIG_HAS_PASSTHROUGH && CONFIG_HAS_PCI */
 
 #if defined(CONFIG_HAS_PASSTHROUGH) && defined(CONFIG_HAS_DEVICE_TREE)
 static XSM_INLINE int xsm_test_assign_dtdevice(XSM_DEFAULT_ARG const char *dtpath)
xen/include/xsm/xsm.h +3 -3
index 02d66c8..c843a41 100644
@@ -114,7 +114,7 @@ struct xsm_operations {
     int (*iomem_mapping) (struct domain *d, uint64_t s, uint64_t e, uint8_t allow);
     int (*pci_config_permission) (struct domain *d, uint32_t machine_bdf, uint16_t start, uint16_t end, uint8_t access);
 
-#if defined(CONFIG_HAS_PASSTHROUGH) && defined(HAS_PCI)
+#if defined(CONFIG_HAS_PASSTHROUGH) && defined(CONFIG_HAS_PCI)
     int (*get_device_group) (uint32_t machine_bdf);
     int (*test_assign_device) (uint32_t machine_bdf);
     int (*assign_device) (struct domain *d, uint32_t machine_bdf);
@@ -468,7 +468,7 @@ static inline int xsm_pci_config_permission (xsm_default_t def, struct domain *d
     return xsm_ops->pci_config_permission(d, machine_bdf, start, end, access);
 }
 
-#if defined(CONFIG_HAS_PASSTHROUGH) && defined(HAS_PCI)
+#if defined(CONFIG_HAS_PASSTHROUGH) && defined(CONFIG_HAS_PCI)
 static inline int xsm_get_device_group(xsm_default_t def, uint32_t machine_bdf)
 {
     return xsm_ops->get_device_group(machine_bdf);
@@ -488,7 +488,7 @@ static inline int xsm_deassign_device(xsm_default_t def, struct domain *d, uint3
 {
     return xsm_ops->deassign_device(d, machine_bdf);
 }
-#endif /* CONFIG_HAS_PASSTHROUGH && HAS_PCI) */
+#endif /* CONFIG_HAS_PASSTHROUGH && CONFIG_HAS_PCI) */
 
 #if defined(CONFIG_HAS_PASSTHROUGH) && defined(CONFIG_HAS_DEVICE_TREE)
 static inline int xsm_assign_dtdevice(xsm_default_t def, struct domain *d,
xen/xsm/dummy.c +1 -1
index 880662f..e8741a4 100644
@@ -89,7 +89,7 @@ void xsm_fixup_ops (struct xsm_operations *ops)
     set_to_dummy_if_null(ops, pci_config_permission);
     set_to_dummy_if_null(ops, get_vnumainfo);
 
-#if defined(CONFIG_HAS_PASSTHROUGH) && defined(HAS_PCI)
+#if defined(CONFIG_HAS_PASSTHROUGH) && defined(CONFIG_HAS_PCI)
     set_to_dummy_if_null(ops, get_device_group);
     set_to_dummy_if_null(ops, test_assign_device);
     set_to_dummy_if_null(ops, assign_device);
xen/xsm/flask/hooks.c +7 -7
index 0c9ef87..db01875 100644
@@ -20,7 +20,7 @@
 #include <xen/errno.h>
 #include <xen/guest_access.h>
 #include <xen/xenoprof.h>
-#ifdef HAS_PCI
+#ifdef CONFIG_HAS_PCI
 #include <asm/msi.h>
 #endif
 #include <public/xen.h>
@@ -111,7 +111,7 @@ static int get_irq_sid(int irq, u32 *sid, struct avc_audit_data *ad)
         }
         return security_irq_sid(irq, sid);
     }
-#ifdef HAS_PCI
+#ifdef CONFIG_HAS_PCI
     {
         struct irq_desc *desc = irq_to_desc(irq);
         if ( desc->msi_desc && desc->msi_desc->dev ) {
@@ -853,7 +853,7 @@ static int flask_map_domain_pirq (struct domain *d)
 static int flask_map_domain_msi (struct domain *d, int irq, void *data,
                                  u32 *sid, struct avc_audit_data *ad)
 {
-#ifdef HAS_PCI
+#ifdef CONFIG_HAS_PCI
     struct msi_info *msi = data;
 
     u32 machine_bdf = (msi->seg << 16) | (msi->bus << 8) | msi->devfn;
@@ -899,7 +899,7 @@ static int flask_unmap_domain_pirq (struct domain *d)
 static int flask_unmap_domain_msi (struct domain *d, int irq, void *data,
                                    u32 *sid, struct avc_audit_data *ad)
 {
-#ifdef HAS_PCI
+#ifdef CONFIG_HAS_PCI
     struct msi_info *msi = data;
     u32 machine_bdf = (msi->seg << 16) | (msi->bus << 8) | msi->devfn;
 
@@ -1213,7 +1213,7 @@ static int flask_mem_sharing(struct domain *d)
 }
 #endif
 
-#if defined(CONFIG_HAS_PASSTHROUGH) && defined(HAS_PCI)
+#if defined(CONFIG_HAS_PASSTHROUGH) && defined(CONFIG_HAS_PCI)
 static int flask_get_device_group(uint32_t machine_bdf)
 {
     u32 rsid;
@@ -1277,7 +1277,7 @@ static int flask_deassign_device(struct domain *d, uint32_t machine_bdf)
 
     return avc_current_has_perm(rsid, SECCLASS_RESOURCE, RESOURCE__REMOVE_DEVICE, NULL);
 }
-#endif /* CONFIG_HAS_PASSTHROUGH && HAS_PCI */
+#endif /* CONFIG_HAS_PASSTHROUGH && CONFIG_HAS_PCI */
 
 #if defined(CONFIG_HAS_PASSTHROUGH) && defined(CONFIG_HAS_DEVICE_TREE)
 static int flask_test_assign_dtdevice(const char *dtpath)
@@ -1725,7 +1725,7 @@ static struct xsm_operations flask_ops = {
     .remove_from_physmap = flask_remove_from_physmap,
     .map_gmfn_foreign = flask_map_gmfn_foreign,
 
-#if defined(CONFIG_HAS_PASSTHROUGH) && defined(HAS_PCI)
+#if defined(CONFIG_HAS_PASSTHROUGH) && defined(CONFIG_HAS_PCI)
     .get_device_group = flask_get_device_group,
     .test_assign_device = flask_test_assign_device,
     .assign_device = flask_assign_device,
Signature · 1 line
2.4.9
#29 lore raw

RFC 8/29 build: convert HAS_NS16550 use to Kconfig

In reply to Doug Goldstein

Use the Kconfig generated CONFIG_HAS_NS16550 defines in the code base.

---
 xen/arch/x86/Kconfig      | 1 +
 xen/arch/x86/Rules.mk     | 1 -
 xen/drivers/Kconfig       | 2 ++
 xen/drivers/char/Kconfig  | 4 ++++
 xen/drivers/char/Makefile | 2 +-
 5 files changed, 8 insertions(+), 2 deletions(-)
 create mode 100644 xen/drivers/char/Kconfig
xen/arch/x86/Kconfig +1 -0
index d1d8f35..7296fbb 100644
@@ -18,6 +18,7 @@ config X86
 	def_bool y
 	select HAS_PASSTHROUGH
 	select HAS_PCI
+	select HAS_NS16550
 	select HAS_GDBSX
 
 config ARCH_DEFCONFIG
xen/arch/x86/Rules.mk +0 -1
index 10cfb21..ae2929d 100644
@@ -6,7 +6,6 @@ HAS_ACPI := y
 HAS_VGA  := y
 HAS_VIDEO  := y
 HAS_CPUFREQ := y
-HAS_NS16550 := y
 HAS_EHCI := y
 HAS_KEXEC := y
 HAS_GDBSX := y
xen/drivers/Kconfig +2 -0
index 5362e41..fe6fcca 100644
@@ -1,5 +1,7 @@
 menu "Device Drivers"
 
+source "drivers/char/Kconfig"
+
 source "drivers/passthrough/Kconfig"
 
 source "drivers/pci/Kconfig"
xen/drivers/char/Kconfig new file +4 -0
new file mode 100644
index 0000000..ca7924f
@@ -0,0 +1,4 @@
+
+# Select HAS_NS16550 if a 16550 UART is supported
+config HAS_NS16550
+	bool
xen/drivers/char/Makefile +1 -1
index 47fc3f9..5e9d271 100644
@@ -1,5 +1,5 @@
 obj-y += console.o
-obj-$(HAS_NS16550) += ns16550.o
+obj-$(CONFIG_HAS_NS16550) += ns16550.o
 obj-$(HAS_CADENCE_UART) += cadence-uart.o
 obj-$(HAS_PL011) += pl011.o
 obj-$(HAS_EXYNOS4210) += exynos4210-uart.o
Signature · 1 line
2.4.9
#30 lore raw

RFC 9/29 build: convert HAS_IOPORTS use to Kconfig

In reply to Doug Goldstein

Use the Kconfig generated CONFIG_HAS_IOPORTS defines in the code base.

---
 xen/Rules.mk               |  1 -
 xen/arch/x86/Kconfig       |  1 +
 xen/arch/x86/Rules.mk      |  1 -
 xen/drivers/char/Kconfig   |  5 +++++
 xen/drivers/char/ns16550.c | 10 +++++-----
 5 files changed, 11 insertions(+), 7 deletions(-)
xen/Rules.mk +0 -1
index 2dcd102..fb1b256 100644
@@ -61,7 +61,6 @@ CFLAGS-$(HAS_GDBSX)     += -DHAS_GDBSX
 CFLAGS-$(HAS_MEM_ACCESS)  += -DHAS_MEM_ACCESS
 CFLAGS-$(HAS_MEM_PAGING)  += -DHAS_MEM_PAGING
 CFLAGS-$(HAS_MEM_SHARING) += -DHAS_MEM_SHARING
-CFLAGS-$(HAS_IOPORTS)   += -DHAS_IOPORTS
 CFLAGS-$(HAS_PDX)       += -DHAS_PDX
 CFLAGS-$(frame_pointer) += -fno-omit-frame-pointer -DCONFIG_FRAME_POINTER
 
xen/arch/x86/Kconfig +1 -0
index 7296fbb..ba1e2f2 100644
@@ -16,6 +16,7 @@ config X86_64
 
 config X86
 	def_bool y
+	select HAS_IOPORTS
 	select HAS_PASSTHROUGH
 	select HAS_PCI
 	select HAS_NS16550
xen/arch/x86/Rules.mk +0 -1
index ae2929d..5fb4ff7 100644
@@ -1,7 +1,6 @@
 ########################################
 # x86-specific definitions
 
-HAS_IOPORTS := y
 HAS_ACPI := y
 HAS_VGA  := y
 HAS_VIDEO  := y
xen/drivers/char/Kconfig +5 -0
index ca7924f..09cb79f 100644
@@ -2,3 +2,8 @@
 # Select HAS_NS16550 if a 16550 UART is supported
 config HAS_NS16550
 	bool
+
+# Select HAS_IOPORTS if 16550 has I/O ports
+config HAS_IOPORTS
+	bool
+	depends on HAS_NS16550
xen/drivers/char/ns16550.c +5 -5
index 615124c..98b660a 100644
@@ -348,7 +348,7 @@ static void ns16550_delayed_resume(void *data);
 static char ns_read_reg(struct ns16550 *uart, int reg)
 {
     void __iomem *addr = uart->remapped_io_base + (reg << uart->reg_shift);
-#ifdef HAS_IOPORTS
+#ifdef CONFIG_HAS_IOPORTS
     if ( uart->remapped_io_base == NULL )
         return inb(uart->io_base + reg);
 #endif
@@ -366,7 +366,7 @@ static char ns_read_reg(struct ns16550 *uart, int reg)
 static void ns_write_reg(struct ns16550 *uart, int reg, char c)
 {
     void __iomem *addr = uart->remapped_io_base + (reg << uart->reg_shift);
-#ifdef HAS_IOPORTS
+#ifdef CONFIG_HAS_IOPORTS
     if ( uart->remapped_io_base == NULL )
         return outb(c, uart->io_base + reg);
 #endif
@@ -546,7 +546,7 @@ static void __init ns16550_init_preirq(struct serial_port *port)
 {
     struct ns16550 *uart = port->uart;
 
-#ifdef HAS_IOPORTS
+#ifdef CONFIG_HAS_IOPORTS
     /* I/O ports are distinguished by their size (16 bits). */
     if ( uart->io_base >= 0x10000 )
 #endif
@@ -716,7 +716,7 @@ static void ns16550_resume(struct serial_port *port)
 
 static void __init ns16550_endboot(struct serial_port *port)
 {
-#ifdef HAS_IOPORTS
+#ifdef CONFIG_HAS_IOPORTS
     struct ns16550 *uart = port->uart;
     int rv;
 
@@ -780,7 +780,7 @@ static int __init check_existence(struct ns16550 *uart)
 {
     unsigned char status, scratch, scratch2, scratch3;
 
-#ifdef HAS_IOPORTS
+#ifdef CONFIG_HAS_IOPORTS
     /*
      * We can't poke MMIO UARTs until they get I/O remapped later. Assume that
      * if we're getting MMIO UARTs, the arch code knows what it's doing.
Signature · 1 line
2.4.9
#31 lore raw

RFC 10/29 build: convert HAS_ACPI use to Kconfig

In reply to Doug Goldstein

Use the Kconfig generated CONFIG_HAS_ACPI defines in the code base.

---
 xen/Rules.mk             | 1 -
 xen/arch/x86/Kconfig     | 1 +
 xen/arch/x86/Rules.mk    | 1 -
 xen/common/sysctl.c      | 2 +-
 xen/drivers/Kconfig      | 2 ++
 xen/drivers/Makefile     | 2 +-
 xen/drivers/acpi/Kconfig | 4 ++++
 7 files changed, 9 insertions(+), 4 deletions(-)
 create mode 100644 xen/drivers/acpi/Kconfig
xen/Rules.mk +0 -1
index fb1b256..1cf6088 100644
@@ -56,7 +56,6 @@ CFLAGS-$(crash_debug)   += -DCRASH_DEBUG
 CFLAGS-$(perfc)         += -DPERF_COUNTERS
 CFLAGS-$(perfc_arrays)  += -DPERF_ARRAYS
 CFLAGS-$(lock_profile)  += -DLOCK_PROFILE
-CFLAGS-$(HAS_ACPI)      += -DHAS_ACPI
 CFLAGS-$(HAS_GDBSX)     += -DHAS_GDBSX
 CFLAGS-$(HAS_MEM_ACCESS)  += -DHAS_MEM_ACCESS
 CFLAGS-$(HAS_MEM_PAGING)  += -DHAS_MEM_PAGING
xen/arch/x86/Kconfig +1 -0
index ba1e2f2..8df53dd 100644
@@ -17,6 +17,7 @@ config X86_64
 config X86
 	def_bool y
 	select HAS_IOPORTS
+	select HAS_ACPI
 	select HAS_PASSTHROUGH
 	select HAS_PCI
 	select HAS_NS16550
xen/arch/x86/Rules.mk +0 -1
index 5fb4ff7..0991120 100644
@@ -1,7 +1,6 @@
 ########################################
 # x86-specific definitions
 
-HAS_ACPI := y
 HAS_VGA  := y
 HAS_VIDEO  := y
 HAS_CPUFREQ := y
xen/common/sysctl.c +1 -1
index 47d115e..a3007b8 100644
@@ -171,7 +171,7 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) u_sysctl)
         op->u.availheap.avail_bytes <<= PAGE_SHIFT;
         break;
 
-#ifdef HAS_ACPI
+#ifdef CONFIG_HAS_ACPI
     case XEN_SYSCTL_get_pmstat:
         ret = do_get_pm_info(&op->u.get_pmstat);
         break;
xen/drivers/Kconfig +2 -0
index fe6fcca..eb01d47 100644
@@ -1,5 +1,7 @@
 menu "Device Drivers"
 
+source "drivers/acpi/Kconfig"
+
 source "drivers/char/Kconfig"
 
 source "drivers/passthrough/Kconfig"
xen/drivers/Makefile +1 -1
index eb32d69..9f6c18b 100644
@@ -2,5 +2,5 @@ subdir-y += char
 subdir-$(HAS_CPUFREQ) += cpufreq
 subdir-$(CONFIG_HAS_PCI) += pci
 subdir-$(CONFIG_HAS_PASSTHROUGH) += passthrough
-subdir-$(HAS_ACPI) += acpi
+subdir-$(CONFIG_HAS_ACPI) += acpi
 subdir-$(HAS_VIDEO) += video
xen/drivers/acpi/Kconfig new file +4 -0
new file mode 100644
index 0000000..11ab5e4
@@ -0,0 +1,4 @@
+
+# Select HAS_ACPI if ACPI is supported
+config HAS_ACPI
+	bool
Signature · 1 line
2.4.9
#32 lore raw

RFC 11/29 build: convert HAS_VIDEO use to Kconfig

In reply to Doug Goldstein

Use the Kconfig generated CONFIG_HAS_VIDEO defines in the code base.

---
 xen/arch/arm/Kconfig       |  1 +
 xen/arch/arm/Rules.mk      |  1 -
 xen/arch/x86/Kconfig       |  1 +
 xen/arch/x86/Rules.mk      |  1 -
 xen/drivers/Kconfig        |  2 ++
 xen/drivers/Makefile       |  2 +-
 xen/drivers/video/Kconfig  | 13 +++++++++++++
 xen/drivers/video/Makefile |  8 ++++----
 8 files changed, 22 insertions(+), 7 deletions(-)
 create mode 100644 xen/drivers/video/Kconfig
xen/arch/arm/Kconfig +1 -0
index 86b9f52..35c014b 100644
@@ -17,6 +17,7 @@ config ARM_64
 config ARM
 	def_bool y
 	select HAS_DEVICE_TREE
+	select HAS_VIDEO
 	select HAS_PASSTHROUGH
 
 config ARCH_DEFCONFIG
xen/arch/arm/Rules.mk +0 -1
index 4725374..90b1f24 100644
@@ -6,7 +6,6 @@
 # 'make clean' before rebuilding.
 #
 
-HAS_VIDEO := y
 HAS_ARM_HDLCD := y
 HAS_PDX := y
 
xen/arch/x86/Kconfig +1 -0
index 8df53dd..2544b43 100644
@@ -19,6 +19,7 @@ config X86
 	select HAS_IOPORTS
 	select HAS_ACPI
 	select HAS_PASSTHROUGH
+	select HAS_VIDEO
 	select HAS_PCI
 	select HAS_NS16550
 	select HAS_GDBSX
xen/arch/x86/Rules.mk +0 -1
index 0991120..7fff71e 100644
@@ -2,7 +2,6 @@
 # x86-specific definitions
 
 HAS_VGA  := y
-HAS_VIDEO  := y
 HAS_CPUFREQ := y
 HAS_EHCI := y
 HAS_KEXEC := y
xen/drivers/Kconfig +2 -0
index eb01d47..f0ad01e 100644
@@ -8,4 +8,6 @@ source "drivers/passthrough/Kconfig"
 
 source "drivers/pci/Kconfig"
 
+source "drivers/video/Kconfig"
+
 endmenu
xen/drivers/Makefile +1 -1
index 9f6c18b..01d6b8d 100644
@@ -3,4 +3,4 @@ subdir-$(HAS_CPUFREQ) += cpufreq
 subdir-$(CONFIG_HAS_PCI) += pci
 subdir-$(CONFIG_HAS_PASSTHROUGH) += passthrough
 subdir-$(CONFIG_HAS_ACPI) += acpi
-subdir-$(HAS_VIDEO) += video
+subdir-$(CONFIG_HAS_VIDEO) += video
xen/drivers/video/Kconfig new file +13 -0
new file mode 100644
index 0000000..a88a7a9
@@ -0,0 +1,13 @@
+
+# Select HAS_VIDEO if video is supported
+config HAS_VIDEO
+	bool
+
+# Select HAS_VGA if VGA is supported
+config HAS_VGA
+	bool
+	depends on HAS_VIDEO
+
+# Select HAS_ARM_HDLCD if ARM HDLCD is supported
+config HAS_ARM_HDLCD
+	bool
xen/drivers/video/Makefile +4 -4
index a756292..914b6cf 100644
@@ -1,7 +1,7 @@
 obj-$(HAS_VGA) := vga.o
-obj-$(HAS_VIDEO) += font_8x14.o
-obj-$(HAS_VIDEO) += font_8x16.o
-obj-$(HAS_VIDEO) += font_8x8.o
-obj-$(HAS_VIDEO) += lfb.o
+obj-$(CONFIG_HAS_VIDEO) += font_8x14.o
+obj-$(CONFIG_HAS_VIDEO) += font_8x16.o
+obj-$(CONFIG_HAS_VIDEO) += font_8x8.o
+obj-$(CONFIG_HAS_VIDEO) += lfb.o
 obj-$(HAS_VGA) += vesa.o
 obj-$(HAS_ARM_HDLCD) += arm_hdlcd.o
Signature · 1 line
2.4.9
#33 lore raw

RFC 12/29 build: convert HAS_VGA use to Kconfig

In reply to Doug Goldstein

Use the Kconfig generated CONFIG_HAS_VGA defines in the code base.

---
 xen/arch/x86/Kconfig       | 1 +
 xen/arch/x86/Rules.mk      | 1 -
 xen/drivers/video/Makefile | 4 ++--
 3 files changed, 3 insertions(+), 3 deletions(-)
xen/arch/x86/Kconfig +1 -0
index 2544b43..1205871 100644
@@ -20,6 +20,7 @@ config X86
 	select HAS_ACPI
 	select HAS_PASSTHROUGH
 	select HAS_VIDEO
+	select HAS_VGA
 	select HAS_PCI
 	select HAS_NS16550
 	select HAS_GDBSX
xen/arch/x86/Rules.mk +0 -1
index 7fff71e..b1af104 100644
@@ -1,7 +1,6 @@
 ########################################
 # x86-specific definitions
 
-HAS_VGA  := y
 HAS_CPUFREQ := y
 HAS_EHCI := y
 HAS_KEXEC := y
xen/drivers/video/Makefile +2 -2
index 914b6cf..0143c4a 100644
@@ -1,7 +1,7 @@
-obj-$(HAS_VGA) := vga.o
+obj-$(CONFIG_HAS_VGA) := vga.o
 obj-$(CONFIG_HAS_VIDEO) += font_8x14.o
 obj-$(CONFIG_HAS_VIDEO) += font_8x16.o
 obj-$(CONFIG_HAS_VIDEO) += font_8x8.o
 obj-$(CONFIG_HAS_VIDEO) += lfb.o
-obj-$(HAS_VGA) += vesa.o
+obj-$(CONFIG_HAS_VGA) += vesa.o
 obj-$(HAS_ARM_HDLCD) += arm_hdlcd.o
Signature · 1 line
2.4.9
#34 lore raw

RFC 13/29 build: convert HAS_CPUFREQ use to Kconfig

In reply to Doug Goldstein

Use the Kconfig generated CONFIG_HAS_CPUFREQ defines in the code base.

---
 xen/arch/x86/Kconfig        | 1 +
 xen/arch/x86/Rules.mk       | 1 -
 xen/drivers/Kconfig         | 2 ++
 xen/drivers/Makefile        | 2 +-
 xen/drivers/cpufreq/Kconfig | 4 ++++
 5 files changed, 8 insertions(+), 2 deletions(-)
 create mode 100644 xen/drivers/cpufreq/Kconfig
xen/arch/x86/Kconfig +1 -0
index 1205871..004a863 100644
@@ -21,6 +21,7 @@ config X86
 	select HAS_PASSTHROUGH
 	select HAS_VIDEO
 	select HAS_VGA
+	select HAS_CPUFREQ
 	select HAS_PCI
 	select HAS_NS16550
 	select HAS_GDBSX
xen/arch/x86/Rules.mk +0 -1
index b1af104..ceb1731 100644
@@ -1,7 +1,6 @@
 ########################################
 # x86-specific definitions
 
-HAS_CPUFREQ := y
 HAS_EHCI := y
 HAS_KEXEC := y
 HAS_GDBSX := y
xen/drivers/Kconfig +2 -0
index f0ad01e..bc3a54f 100644
@@ -4,6 +4,8 @@ source "drivers/acpi/Kconfig"
 
 source "drivers/char/Kconfig"
 
+source "drivers/cpufreq/Kconfig"
+
 source "drivers/passthrough/Kconfig"
 
 source "drivers/pci/Kconfig"
xen/drivers/Makefile +1 -1
index 01d6b8d..7bbb654 100644
@@ -1,5 +1,5 @@
 subdir-y += char
-subdir-$(HAS_CPUFREQ) += cpufreq
+subdir-$(CONFIG_HAS_CPUFREQ) += cpufreq
 subdir-$(CONFIG_HAS_PCI) += pci
 subdir-$(CONFIG_HAS_PASSTHROUGH) += passthrough
 subdir-$(CONFIG_HAS_ACPI) += acpi
xen/drivers/cpufreq/Kconfig new file +4 -0
new file mode 100644
index 0000000..00be480
@@ -0,0 +1,4 @@
+
+# Select HAS_CPUFREQ if CPU frequency scaling is supported
+config HAS_CPUFREQ
+	bool
Signature · 1 line
2.4.9
#35 lore raw

RFC 14/29 build: convert HAS_GDBSX use to Kconfig

In reply to Doug Goldstein

Use the Kconfig generated CONFIG_HAS_GDBSX defines in the code base.

---
 xen/Rules.mk          | 1 -
 xen/arch/x86/Rules.mk | 1 -
 xen/common/Kconfig    | 4 ++++
 xen/common/domain.c   | 2 +-
 4 files changed, 5 insertions(+), 3 deletions(-)
xen/Rules.mk +0 -1
index 1cf6088..3498213 100644
@@ -56,7 +56,6 @@ CFLAGS-$(crash_debug)   += -DCRASH_DEBUG
 CFLAGS-$(perfc)         += -DPERF_COUNTERS
 CFLAGS-$(perfc_arrays)  += -DPERF_ARRAYS
 CFLAGS-$(lock_profile)  += -DLOCK_PROFILE
-CFLAGS-$(HAS_GDBSX)     += -DHAS_GDBSX
 CFLAGS-$(HAS_MEM_ACCESS)  += -DHAS_MEM_ACCESS
 CFLAGS-$(HAS_MEM_PAGING)  += -DHAS_MEM_PAGING
 CFLAGS-$(HAS_MEM_SHARING) += -DHAS_MEM_SHARING
xen/arch/x86/Rules.mk +0 -1
index ceb1731..a3c4300 100644
@@ -3,7 +3,6 @@
 
 HAS_EHCI := y
 HAS_KEXEC := y
-HAS_GDBSX := y
 HAS_PDX := y
 xenoprof := y
 
xen/common/Kconfig +4 -0
index 53ca33f..f63284d 100644
@@ -5,4 +5,8 @@ menu "Common Features"
 config HAS_DEVICE_TREE
 	bool
 
+# Select HAS_GDBSX if GDBSX is supported
+config HAS_GDBSX
+	bool
+
 endmenu
xen/common/domain.c +1 -1
index 7c362eb..ffbe1bd 100644
@@ -772,7 +772,7 @@ void vcpu_end_shutdown_deferral(struct vcpu *v)
         vcpu_check_shutdown(v);
 }
 
-#ifdef HAS_GDBSX
+#ifdef CONFIG_HAS_GDBSX
 void domain_pause_for_debugger(void)
 {
     struct vcpu *curr = current;
Signature · 1 line
2.4.9
#36 lore raw

RFC 15/29 build: convert HAS_PDX use to Kconfig

In reply to Doug Goldstein

Use the Kconfig generated CONFIG_HAS_PDX defines in the code base.

---
 xen/Rules.mk          | 1 -
 xen/arch/arm/Kconfig  | 1 +
 xen/arch/arm/Rules.mk | 1 -
 xen/arch/x86/Kconfig  | 1 +
 xen/arch/x86/Rules.mk | 1 -
 xen/common/Kconfig    | 4 ++++
 xen/common/Makefile   | 2 +-
 xen/include/xen/pdx.h | 4 ++--
 8 files changed, 9 insertions(+), 6 deletions(-)
xen/Rules.mk +0 -1
index 3498213..bb9d0c1 100644
@@ -59,7 +59,6 @@ CFLAGS-$(lock_profile)  += -DLOCK_PROFILE
 CFLAGS-$(HAS_MEM_ACCESS)  += -DHAS_MEM_ACCESS
 CFLAGS-$(HAS_MEM_PAGING)  += -DHAS_MEM_PAGING
 CFLAGS-$(HAS_MEM_SHARING) += -DHAS_MEM_SHARING
-CFLAGS-$(HAS_PDX)       += -DHAS_PDX
 CFLAGS-$(frame_pointer) += -fno-omit-frame-pointer -DCONFIG_FRAME_POINTER
 
 ifneq ($(max_phys_cpus),)
xen/arch/arm/Kconfig +1 -0
index 35c014b..83c3ec2 100644
@@ -19,6 +19,7 @@ config ARM
 	select HAS_DEVICE_TREE
 	select HAS_VIDEO
 	select HAS_PASSTHROUGH
+	select HAS_PDX
 
 config ARCH_DEFCONFIG
 	string
xen/arch/arm/Rules.mk +0 -1
index 90b1f24..52b1ad4 100644
@@ -7,7 +7,6 @@
 #
 
 HAS_ARM_HDLCD := y
-HAS_PDX := y
 
 CFLAGS += -I$(BASEDIR)/include
 
xen/arch/x86/Kconfig +1 -0
index 004a863..8ff2e19 100644
@@ -25,6 +25,7 @@ config X86
 	select HAS_PCI
 	select HAS_NS16550
 	select HAS_GDBSX
+	select HAS_PDX
 
 config ARCH_DEFCONFIG
 	string
xen/arch/x86/Rules.mk +0 -1
index a3c4300..a300937 100644
@@ -3,7 +3,6 @@
 
 HAS_EHCI := y
 HAS_KEXEC := y
-HAS_PDX := y
 xenoprof := y
 
 CFLAGS += -I$(BASEDIR)/include 
xen/common/Kconfig +4 -0
index f63284d..b429a64 100644
@@ -5,6 +5,10 @@ menu "Common Features"
 config HAS_DEVICE_TREE
 	bool
 
+# Select HAS_PDX if PDX is supported
+config HAS_PDX
+	bool
+
 # Select HAS_GDBSX if GDBSX is supported
 config HAS_GDBSX
 	bool
xen/common/Makefile +1 -1
index d51e971..9645113 100644
@@ -23,7 +23,7 @@ obj-y += memory.o
 obj-y += multicall.o
 obj-y += notifier.o
 obj-y += page_alloc.o
-obj-$(HAS_PDX) += pdx.o
+obj-$(CONFIG_HAS_PDX) += pdx.o
 obj-y += preempt.o
 obj-y += random.o
 obj-y += rangeset.o
xen/include/xen/pdx.h +2 -2
index 18fe8e5..6f25f90 100644
@@ -1,7 +1,7 @@
 #ifndef __XEN_PDX_H__
 #define __XEN_PDX_H__
 
-#ifdef HAS_PDX
+#ifdef CONFIG_HAS_PDX
 
 extern unsigned long max_pdx;
 extern unsigned long pfn_pdx_bottom_mask, ma_va_bottom_mask;
@@ -37,7 +37,7 @@ static inline unsigned long pdx_to_pfn(unsigned long pdx)
 
 extern void pfn_pdx_hole_setup(unsigned long);
 
-#endif /* HAS_PDX */
+#endif /* CONFIG_HAS_PDX */
 #endif /* __XEN_PDX_H__ */
 
 /*
Signature · 1 line
2.4.9
#37 lore raw

RFC 16/29 build: convert HAS_KEXEC use to Kconfig

In reply to Doug Goldstein

Use the Kconfig generated CONFIG_HAS_KEXEC defines in the code base.

---
 xen/Rules.mk          | 2 +-
 xen/arch/x86/Kconfig  | 1 +
 xen/arch/x86/Rules.mk | 1 -
 xen/common/Kconfig    | 4 ++++
 4 files changed, 6 insertions(+), 2 deletions(-)
xen/Rules.mk +1 -1
index bb9d0c1..82a4d0a 100644
@@ -68,7 +68,7 @@ ifneq ($(max_phys_irqs),)
 CFLAGS-y                += -DMAX_PHYS_IRQS=$(max_phys_irqs)
 endif
 
-CONFIG_KEXEC-$(HAS_KEXEC) := $(kexec)
+CONFIG_KEXEC-$(CONFIG_HAS_KEXEC) := $(kexec)
 CONFIG_KEXEC              := $(CONFIG_KEXEC-y)
 
 CFLAGS-$(CONFIG_KEXEC)  += -DCONFIG_KEXEC
xen/arch/x86/Kconfig +1 -0
index 8ff2e19..48c7d6a 100644
@@ -26,6 +26,7 @@ config X86
 	select HAS_NS16550
 	select HAS_GDBSX
 	select HAS_PDX
+	select HAS_KEXEC
 
 config ARCH_DEFCONFIG
 	string
xen/arch/x86/Rules.mk +0 -1
index a300937..b248043 100644
@@ -2,7 +2,6 @@
 # x86-specific definitions
 
 HAS_EHCI := y
-HAS_KEXEC := y
 xenoprof := y
 
 CFLAGS += -I$(BASEDIR)/include 
xen/common/Kconfig +4 -0
index b429a64..6987e84 100644
@@ -9,6 +9,10 @@ config HAS_DEVICE_TREE
 config HAS_PDX
 	bool
 
+# Select HAS_KEXEC if kexec is supported
+config HAS_KEXEC
+	bool
+
 # Select HAS_GDBSX if GDBSX is supported
 config HAS_GDBSX
 	bool
Signature · 1 line
2.4.9
#38 lore raw

RFC 17/29 build: convert HAS_ARM_HDLCD use to Kconfig

In reply to Doug Goldstein

Use the Kconfig generated CONFIG_HAS_ARM_HDLCD defines in the code base.

---
 xen/arch/arm/Kconfig       | 1 +
 xen/arch/arm/Rules.mk      | 2 --
 xen/drivers/video/Makefile | 2 +-
 3 files changed, 2 insertions(+), 3 deletions(-)
xen/arch/arm/Kconfig +1 -0
index 83c3ec2..112bee1 100644
@@ -18,6 +18,7 @@ config ARM
 	def_bool y
 	select HAS_DEVICE_TREE
 	select HAS_VIDEO
+	select HAS_ARM_HDLCD
 	select HAS_PASSTHROUGH
 	select HAS_PDX
 
xen/arch/arm/Rules.mk +0 -2
index 52b1ad4..2158bd8 100644
@@ -6,8 +6,6 @@
 # 'make clean' before rebuilding.
 #
 
-HAS_ARM_HDLCD := y
-
 CFLAGS += -I$(BASEDIR)/include
 
 $(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS))
xen/drivers/video/Makefile +1 -1
index 0143c4a..b9b5e23 100644
@@ -4,4 +4,4 @@ obj-$(CONFIG_HAS_VIDEO) += font_8x16.o
 obj-$(CONFIG_HAS_VIDEO) += font_8x8.o
 obj-$(CONFIG_HAS_VIDEO) += lfb.o
 obj-$(CONFIG_HAS_VGA) += vesa.o
-obj-$(HAS_ARM_HDLCD) += arm_hdlcd.o
+obj-$(CONFIG_HAS_ARM_HDLCD) += arm_hdlcd.o
Signature · 1 line
2.4.9
#39 lore raw

RFC 18/29 build: convert HAS_CADENCE_UART use to Kconfig

In reply to Doug Goldstein

Use the Kconfig generated CONFIG_HAS_CADENCE_UART defines in the code base.

---
 xen/drivers/char/Kconfig  | 4 ++++
 xen/drivers/char/Makefile | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)
xen/drivers/char/Kconfig +4 -0
index 09cb79f..a79af08 100644
@@ -7,3 +7,7 @@ config HAS_NS16550
 config HAS_IOPORTS
 	bool
 	depends on HAS_NS16550
+
+# Select HAS_CADENCE_UART if a Cadence UART is supported
+config HAS_CADENCE_UART
+	bool
xen/drivers/char/Makefile +1 -1
index 5e9d271..e86ba6f 100644
@@ -1,6 +1,6 @@
 obj-y += console.o
 obj-$(CONFIG_HAS_NS16550) += ns16550.o
-obj-$(HAS_CADENCE_UART) += cadence-uart.o
+obj-$(CONFIG_HAS_CADENCE_UART) += cadence-uart.o
 obj-$(HAS_PL011) += pl011.o
 obj-$(HAS_EXYNOS4210) += exynos4210-uart.o
 obj-$(HAS_OMAP) += omap-uart.o
Signature · 1 line
2.4.9
#40 lore raw

RFC 19/29 build: convert HAS_PL011 use to Kconfig

In reply to Doug Goldstein

Use the Kconfig generated CONFIG_HAS_PL011 defines in the code base.

---
 xen/drivers/char/Kconfig  | 4 ++++
 xen/drivers/char/Makefile | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)
xen/drivers/char/Kconfig +4 -0
index a79af08..6423748 100644
@@ -11,3 +11,7 @@ config HAS_IOPORTS
 # Select HAS_CADENCE_UART if a Cadence UART is supported
 config HAS_CADENCE_UART
 	bool
+
+# Select HAS_PL011 if a PL011 is supported
+config HAS_PL011
+	bool
xen/drivers/char/Makefile +1 -1
index e86ba6f..df87594 100644
@@ -1,7 +1,7 @@
 obj-y += console.o
 obj-$(CONFIG_HAS_NS16550) += ns16550.o
 obj-$(CONFIG_HAS_CADENCE_UART) += cadence-uart.o
-obj-$(HAS_PL011) += pl011.o
+obj-$(CONFIG_HAS_PL011) += pl011.o
 obj-$(HAS_EXYNOS4210) += exynos4210-uart.o
 obj-$(HAS_OMAP) += omap-uart.o
 obj-$(HAS_SCIF) += scif-uart.o
Signature · 1 line
2.4.9
#41 lore raw

RFC 20/29 build: convert HAS_EXYNOS4210 use to Kconfig

In reply to Doug Goldstein

Use the Kconfig generated CONFIG_HAS_EXYNOS4210 defines in the code base.

---
 xen/drivers/char/Kconfig  | 4 ++++
 xen/drivers/char/Makefile | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)
xen/drivers/char/Kconfig +4 -0
index 6423748..9124214 100644
@@ -15,3 +15,7 @@ config HAS_CADENCE_UART
 # Select HAS_PL011 if a PL011 is supported
 config HAS_PL011
 	bool
+
+# Select HAS_EXYNOS4210 if a Exynos 4210 UART is supported
+config HAS_EXYNOS4210
+	bool
xen/drivers/char/Makefile +1 -1
index df87594..f8e7b44 100644
@@ -2,7 +2,7 @@ obj-y += console.o
 obj-$(CONFIG_HAS_NS16550) += ns16550.o
 obj-$(CONFIG_HAS_CADENCE_UART) += cadence-uart.o
 obj-$(CONFIG_HAS_PL011) += pl011.o
-obj-$(HAS_EXYNOS4210) += exynos4210-uart.o
+obj-$(CONFIG_HAS_EXYNOS4210) += exynos4210-uart.o
 obj-$(HAS_OMAP) += omap-uart.o
 obj-$(HAS_SCIF) += scif-uart.o
 obj-$(HAS_EHCI) += ehci-dbgp.o
Signature · 1 line
2.4.9
#42 lore raw

RFC 21/29 build: convert HAS_OMAP use to Kconfig

In reply to Doug Goldstein

Use the Kconfig generated CONFIG_HAS_OMAP defines in the code base.

---
 xen/drivers/char/Kconfig  | 4 ++++
 xen/drivers/char/Makefile | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)
xen/drivers/char/Kconfig +4 -0
index 9124214..f06e7ef 100644
@@ -19,3 +19,7 @@ config HAS_PL011
 # Select HAS_EXYNOS4210 if a Exynos 4210 UART is supported
 config HAS_EXYNOS4210
 	bool
+
+# Select HAS_OMAP if an OMAP UART is supported
+config HAS_OMAP
+	bool
xen/drivers/char/Makefile +1 -1
index f8e7b44..7118570 100644
@@ -3,7 +3,7 @@ obj-$(CONFIG_HAS_NS16550) += ns16550.o
 obj-$(CONFIG_HAS_CADENCE_UART) += cadence-uart.o
 obj-$(CONFIG_HAS_PL011) += pl011.o
 obj-$(CONFIG_HAS_EXYNOS4210) += exynos4210-uart.o
-obj-$(HAS_OMAP) += omap-uart.o
+obj-$(CONFIG_HAS_OMAP) += omap-uart.o
 obj-$(HAS_SCIF) += scif-uart.o
 obj-$(HAS_EHCI) += ehci-dbgp.o
 obj-$(CONFIG_ARM) += dt-uart.o
Signature · 1 line
2.4.9
#43 lore raw

RFC 22/29 build: convert HAS_SCIF use to Kconfig

In reply to Doug Goldstein

Use the Kconfig generated CONFIG_HAS_SCIF defines in the code base.

---
 xen/drivers/char/Kconfig  | 4 ++++
 xen/drivers/char/Makefile | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)
xen/drivers/char/Kconfig +4 -0
index f06e7ef..8eda61c 100644
@@ -23,3 +23,7 @@ config HAS_EXYNOS4210
 # Select HAS_OMAP if an OMAP UART is supported
 config HAS_OMAP
 	bool
+
+# Select HAS_SCIF if a SCIF UART is supported
+config HAS_SCIF
+	bool
xen/drivers/char/Makefile +1 -1
index 7118570..f9d9a9c 100644
@@ -4,7 +4,7 @@ obj-$(CONFIG_HAS_CADENCE_UART) += cadence-uart.o
 obj-$(CONFIG_HAS_PL011) += pl011.o
 obj-$(CONFIG_HAS_EXYNOS4210) += exynos4210-uart.o
 obj-$(CONFIG_HAS_OMAP) += omap-uart.o
-obj-$(HAS_SCIF) += scif-uart.o
+obj-$(CONFIG_HAS_SCIF) += scif-uart.o
 obj-$(HAS_EHCI) += ehci-dbgp.o
 obj-$(CONFIG_ARM) += dt-uart.o
 obj-y += serial.o
Signature · 1 line
2.4.9
#44 lore raw

RFC 23/29 build: convert HAS_EHCI use to Kconfig

In reply to Doug Goldstein

Use the Kconfig generated CONFIG_HAS_EHCI defines in the code base.

---
 xen/arch/x86/Kconfig      | 1 +
 xen/arch/x86/Rules.mk     | 1 -
 xen/drivers/char/Kconfig  | 4 ++++
 xen/drivers/char/Makefile | 2 +-
 4 files changed, 6 insertions(+), 2 deletions(-)
xen/arch/x86/Kconfig +1 -0
index 48c7d6a..7be9c4e 100644
@@ -23,6 +23,7 @@ config X86
 	select HAS_VGA
 	select HAS_CPUFREQ
 	select HAS_PCI
+	select HAS_EHCI
 	select HAS_NS16550
 	select HAS_GDBSX
 	select HAS_PDX
xen/arch/x86/Rules.mk +0 -1
index b248043..9f9680e 100644
@@ -1,7 +1,6 @@
 ########################################
 # x86-specific definitions
 
-HAS_EHCI := y
 xenoprof := y
 
 CFLAGS += -I$(BASEDIR)/include 
xen/drivers/char/Kconfig +4 -0
index 8eda61c..5f5cb94 100644
@@ -27,3 +27,7 @@ config HAS_OMAP
 # Select HAS_SCIF if a SCIF UART is supported
 config HAS_SCIF
 	bool
+
+# Select HAS_EHCI if EHCI debug is supported
+config HAS_EHCI
+	bool
xen/drivers/char/Makefile +1 -1
index f9d9a9c..aa620fc 100644
@@ -5,6 +5,6 @@ obj-$(CONFIG_HAS_PL011) += pl011.o
 obj-$(CONFIG_HAS_EXYNOS4210) += exynos4210-uart.o
 obj-$(CONFIG_HAS_OMAP) += omap-uart.o
 obj-$(CONFIG_HAS_SCIF) += scif-uart.o
-obj-$(HAS_EHCI) += ehci-dbgp.o
+obj-$(CONFIG_HAS_EHCI) += ehci-dbgp.o
 obj-$(CONFIG_ARM) += dt-uart.o
 obj-y += serial.o
Signature · 1 line
2.4.9
#45 lore raw

RFC 24/29 build: convert HAS_MEM_ACCESS use to Kconfig

In reply to Doug Goldstein

Use the Kconfig generated CONFIG_HAS_MEM_ACCESS defines in the code base.

---
 xen/Rules.mk                 | 1 -
 xen/arch/arm/Kconfig         | 1 +
 xen/arch/x86/Kconfig         | 1 +
 xen/common/Kconfig           | 4 ++++
 xen/common/Makefile          | 2 +-
 xen/common/domctl.c          | 2 +-
 xen/common/vm_event.c        | 2 +-
 xen/include/xen/mem_access.h | 4 ++--
 xen/include/xsm/dummy.h      | 2 +-
 xen/include/xsm/xsm.h        | 4 ++--
 xen/xsm/dummy.c              | 2 +-
 xen/xsm/flask/hooks.c        | 4 ++--
 12 files changed, 17 insertions(+), 12 deletions(-)
xen/Rules.mk +0 -1
index 82a4d0a..4559d9c 100644
@@ -56,7 +56,6 @@ CFLAGS-$(crash_debug)   += -DCRASH_DEBUG
 CFLAGS-$(perfc)         += -DPERF_COUNTERS
 CFLAGS-$(perfc_arrays)  += -DPERF_ARRAYS
 CFLAGS-$(lock_profile)  += -DLOCK_PROFILE
-CFLAGS-$(HAS_MEM_ACCESS)  += -DHAS_MEM_ACCESS
 CFLAGS-$(HAS_MEM_PAGING)  += -DHAS_MEM_PAGING
 CFLAGS-$(HAS_MEM_SHARING) += -DHAS_MEM_SHARING
 CFLAGS-$(frame_pointer) += -fno-omit-frame-pointer -DCONFIG_FRAME_POINTER
xen/arch/arm/Kconfig +1 -0
index 112bee1..f100f17 100644
@@ -21,6 +21,7 @@ config ARM
 	select HAS_ARM_HDLCD
 	select HAS_PASSTHROUGH
 	select HAS_PDX
+	select HAS_MEM_ACCESS
 
 config ARCH_DEFCONFIG
 	string
xen/arch/x86/Kconfig +1 -0
index 7be9c4e..0125ce9 100644
@@ -28,6 +28,7 @@ config X86
 	select HAS_GDBSX
 	select HAS_PDX
 	select HAS_KEXEC
+	select HAS_MEM_ACCESS
 
 config ARCH_DEFCONFIG
 	string
xen/common/Kconfig +4 -0
index 6987e84..bdb95f0 100644
@@ -5,6 +5,10 @@ menu "Common Features"
 config HAS_DEVICE_TREE
 	bool
 
+# Select HAS_MEM_ACCESS if mem access is supported
+config HAS_MEM_ACCESS
+	bool
+
 # Select HAS_PDX if PDX is supported
 config HAS_PDX
 	bool
xen/common/Makefile +1 -1
index 9645113..d599d66 100644
@@ -18,7 +18,7 @@ obj-$(CONFIG_KEXEC) += kexec.o
 obj-$(CONFIG_KEXEC) += kimage.o
 obj-y += lib.o
 obj-y += lzo.o
-obj-$(HAS_MEM_ACCESS) += mem_access.o
+obj-$(CONFIG_HAS_MEM_ACCESS) += mem_access.o
 obj-y += memory.o
 obj-y += multicall.o
 obj-y += notifier.o
xen/common/domctl.c +1 -1
index 46b967e..1fab587 100644
@@ -1130,7 +1130,7 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl)
         d->disable_migrate = op->u.disable_migrate.disable;
         break;
 
-#ifdef HAS_MEM_ACCESS
+#ifdef CONFIG_HAS_MEM_ACCESS
     case XEN_DOMCTL_set_access_required:
         if ( unlikely(current->domain == d) )
             ret = -EPERM;
xen/common/vm_event.c +1 -1
index e1f9580..0fe93dc 100644
@@ -397,7 +397,7 @@ void vm_event_resume(struct domain *d, struct vm_event_domain *ved)
             vm_event_register_write_resume(v, &rsp);
             break;
 
-#ifdef HAS_MEM_ACCESS
+#ifdef CONFIG_HAS_MEM_ACCESS
         case VM_EVENT_REASON_MEM_ACCESS:
             mem_access_resume(v, &rsp);
             break;
xen/include/xen/mem_access.h +2 -2
index 111f1fe..90efe01 100644
@@ -25,7 +25,7 @@
 #include <public/memory.h>
 #include <asm/p2m.h>
 
-#ifdef HAS_MEM_ACCESS
+#ifdef CONFIG_HAS_MEM_ACCESS
 
 int mem_access_memop(unsigned long cmd,
                      XEN_GUEST_HANDLE_PARAM(xen_mem_access_op_t) arg);
@@ -58,7 +58,7 @@ void mem_access_resume(struct vcpu *vcpu, vm_event_response_t *rsp)
     /* Nothing to do. */
 }
 
-#endif /* HAS_MEM_ACCESS */
+#endif /* CONFIG_HAS_MEM_ACCESS */
 
 #endif /* _XEN_ASM_MEM_ACCESS_H */
 
xen/include/xsm/dummy.h +1 -1
index 42e696a..7a9006b 100644
@@ -560,7 +560,7 @@ static XSM_INLINE int xsm_vm_event_control(XSM_DEFAULT_ARG struct domain *d, int
     return xsm_default_action(action, current->domain, d);
 }
 
-#ifdef HAS_MEM_ACCESS
+#ifdef CONFIG_HAS_MEM_ACCESS
 static XSM_INLINE int xsm_mem_access(XSM_DEFAULT_ARG struct domain *d)
 {
     XSM_ASSERT_ACTION(XSM_DM_PRIV);
xen/include/xsm/xsm.h +2 -2
index c843a41..a550ae2 100644
@@ -152,7 +152,7 @@ struct xsm_operations {
 
     int (*vm_event_control) (struct domain *d, int mode, int op);
 
-#ifdef HAS_MEM_ACCESS
+#ifdef CONFIG_HAS_MEM_ACCESS
     int (*mem_access) (struct domain *d);
 #endif
 
@@ -603,7 +603,7 @@ static inline int xsm_vm_event_control (xsm_default_t def, struct domain *d, int
     return xsm_ops->vm_event_control(d, mode, op);
 }
 
-#ifdef HAS_MEM_ACCESS
+#ifdef CONFIG_HAS_MEM_ACCESS
 static inline int xsm_mem_access (xsm_default_t def, struct domain *d)
 {
     return xsm_ops->mem_access(d);
xen/xsm/dummy.c +1 -1
index e8741a4..19fb8f7 100644
@@ -129,7 +129,7 @@ void xsm_fixup_ops (struct xsm_operations *ops)
 
     set_to_dummy_if_null(ops, vm_event_control);
 
-#ifdef HAS_MEM_ACCESS
+#ifdef CONFIG_HAS_MEM_ACCESS
     set_to_dummy_if_null(ops, mem_access);
 #endif
 
xen/xsm/flask/hooks.c +2 -2
index db01875..82cc79b 100644
@@ -1192,7 +1192,7 @@ static int flask_vm_event_control(struct domain *d, int mode, int op)
     return current_has_perm(d, SECCLASS_DOMAIN2, DOMAIN2__VM_EVENT);
 }
 
-#ifdef HAS_MEM_ACCESS
+#ifdef CONFIG_HAS_MEM_ACCESS
 static int flask_mem_access(struct domain *d)
 {
     return current_has_perm(d, SECCLASS_DOMAIN2, DOMAIN2__MEM_ACCESS);
@@ -1705,7 +1705,7 @@ static struct xsm_operations flask_ops = {
 
     .vm_event_control = flask_vm_event_control,
 
-#ifdef HAS_MEM_ACCESS
+#ifdef CONFIG_HAS_MEM_ACCESS
     .mem_access = flask_mem_access,
 #endif
 
Signature · 1 line
2.4.9
#46 lore raw

RFC 25/29 build: convert HAS_MEM_PAGING use to Kconfig

In reply to Doug Goldstein

Use the Kconfig generated CONFIG_HAS_MEM_PAGING defines in the code base.

---
 config/x86_32.mk        | 1 -
 config/x86_64.mk        | 1 -
 xen/Rules.mk            | 1 -
 xen/arch/x86/Kconfig    | 1 +
 xen/common/Kconfig      | 4 ++++
 xen/common/memory.c     | 2 +-
 xen/common/vm_event.c   | 8 ++++----
 xen/include/xsm/dummy.h | 2 +-
 xen/include/xsm/xsm.h   | 4 ++--
 xen/xsm/dummy.c         | 2 +-
 xen/xsm/flask/hooks.c   | 4 ++--
 11 files changed, 16 insertions(+), 14 deletions(-)
config/x86_32.mk +0 -1
index c2d785e..f81ee38 100644
@@ -7,7 +7,6 @@ CONFIG_MIGRATE := y
 CONFIG_XCUTILS := y
 
 HAS_MEM_ACCESS := y
-HAS_MEM_PAGING := y
 HAS_MEM_SHARING := y
 
 CFLAGS += -m32 -march=i686
config/x86_64.mk +0 -1
index bf104c2..e681f55 100644
@@ -8,7 +8,6 @@ CONFIG_MIGRATE := y
 CONFIG_XCUTILS := y
 
 HAS_MEM_ACCESS := y
-HAS_MEM_PAGING := y
 HAS_MEM_SHARING := y
 
 CONFIG_XEN_INSTALL_SUFFIX := .gz
xen/Rules.mk +0 -1
index 4559d9c..4d4e29c 100644
@@ -56,7 +56,6 @@ CFLAGS-$(crash_debug)   += -DCRASH_DEBUG
 CFLAGS-$(perfc)         += -DPERF_COUNTERS
 CFLAGS-$(perfc_arrays)  += -DPERF_ARRAYS
 CFLAGS-$(lock_profile)  += -DLOCK_PROFILE
-CFLAGS-$(HAS_MEM_PAGING)  += -DHAS_MEM_PAGING
 CFLAGS-$(HAS_MEM_SHARING) += -DHAS_MEM_SHARING
 CFLAGS-$(frame_pointer) += -fno-omit-frame-pointer -DCONFIG_FRAME_POINTER
 
xen/arch/x86/Kconfig +1 -0
index 0125ce9..ced84fa 100644
@@ -29,6 +29,7 @@ config X86
 	select HAS_PDX
 	select HAS_KEXEC
 	select HAS_MEM_ACCESS
+	select HAS_MEM_PAGING
 
 config ARCH_DEFCONFIG
 	string
xen/common/Kconfig +4 -0
index bdb95f0..f6cfb9e 100644
@@ -9,6 +9,10 @@ config HAS_DEVICE_TREE
 config HAS_MEM_ACCESS
 	bool
 
+# Select HAS_MEM_PAGING if mem paging is supported
+config HAS_MEM_PAGING
+	bool
+
 # Select HAS_PDX if PDX is supported
 config HAS_PDX
 	bool
xen/common/memory.c +1 -1
index ab018d3..cb4063a 100644
@@ -1283,7 +1283,7 @@ int prepare_ring_for_helper(
 
     page = get_page_from_gfn(d, gmfn, &p2mt, P2M_UNSHARE);
 
-#ifdef HAS_MEM_PAGING
+#ifdef CONFIG_HAS_MEM_PAGING
     if ( p2m_is_paging(p2mt) )
     {
         if ( page )
xen/common/vm_event.c +4 -4
index 0fe93dc..2e59e41 100644
@@ -403,7 +403,7 @@ void vm_event_resume(struct domain *d, struct vm_event_domain *ved)
             break;
 #endif
 
-#ifdef HAS_MEM_PAGING
+#ifdef CONFIG_HAS_MEM_PAGING
         case VM_EVENT_REASON_MEM_PAGING:
             p2m_mem_paging_resume(d, &rsp);
             break;
@@ -502,7 +502,7 @@ int __vm_event_claim_slot(struct domain *d, struct vm_event_domain *ved,
         return vm_event_grab_slot(ved, (current->domain != d));
 }
 
-#ifdef HAS_MEM_PAGING
+#ifdef CONFIG_HAS_MEM_PAGING
 /* Registered with Xen-bound event channel for incoming notifications. */
 static void mem_paging_notification(struct vcpu *v, unsigned int port)
 {
@@ -530,7 +530,7 @@ static void mem_sharing_notification(struct vcpu *v, unsigned int port)
 /* Clean up on domain destruction */
 void vm_event_cleanup(struct domain *d)
 {
-#ifdef HAS_MEM_PAGING
+#ifdef CONFIG_HAS_MEM_PAGING
     if ( d->vm_event->paging.ring_page )
     {
         /* Destroying the wait queue head means waking up all
@@ -592,7 +592,7 @@ int vm_event_domctl(struct domain *d, xen_domctl_vm_event_op_t *vec,
 
     switch ( vec->mode )
     {
-#ifdef HAS_MEM_PAGING
+#ifdef CONFIG_HAS_MEM_PAGING
     case XEN_DOMCTL_VM_EVENT_OP_PAGING:
     {
         struct vm_event_domain *ved = &d->vm_event->paging;
xen/include/xsm/dummy.h +1 -1
index 7a9006b..dd7618f 100644
@@ -568,7 +568,7 @@ static XSM_INLINE int xsm_mem_access(XSM_DEFAULT_ARG struct domain *d)
 }
 #endif
 
-#ifdef HAS_MEM_PAGING
+#ifdef CONFIG_HAS_MEM_PAGING
 static XSM_INLINE int xsm_mem_paging(XSM_DEFAULT_ARG struct domain *d)
 {
     XSM_ASSERT_ACTION(XSM_DM_PRIV);
xen/include/xsm/xsm.h +2 -2
index a550ae2..b23ecda 100644
@@ -156,7 +156,7 @@ struct xsm_operations {
     int (*mem_access) (struct domain *d);
 #endif
 
-#ifdef HAS_MEM_PAGING
+#ifdef CONFIG_HAS_MEM_PAGING
     int (*mem_paging) (struct domain *d);
 #endif
 
@@ -610,7 +610,7 @@ static inline int xsm_mem_access (xsm_default_t def, struct domain *d)
 }
 #endif
 
-#ifdef HAS_MEM_PAGING
+#ifdef CONFIG_HAS_MEM_PAGING
 static inline int xsm_mem_paging (xsm_default_t def, struct domain *d)
 {
     return xsm_ops->mem_paging(d);
xen/xsm/dummy.c +1 -1
index 19fb8f7..2f50be9 100644
@@ -133,7 +133,7 @@ void xsm_fixup_ops (struct xsm_operations *ops)
     set_to_dummy_if_null(ops, mem_access);
 #endif
 
-#ifdef HAS_MEM_PAGING
+#ifdef CONFIG_HAS_MEM_PAGING
     set_to_dummy_if_null(ops, mem_paging);
 #endif
 
xen/xsm/flask/hooks.c +2 -2
index 82cc79b..582eb85 100644
@@ -1199,7 +1199,7 @@ static int flask_mem_access(struct domain *d)
 }
 #endif
 
-#ifdef HAS_MEM_PAGING
+#ifdef CONFIG_HAS_MEM_PAGING
 static int flask_mem_paging(struct domain *d)
 {
     return current_has_perm(d, SECCLASS_DOMAIN2, DOMAIN2__MEM_PAGING);
@@ -1709,7 +1709,7 @@ static struct xsm_operations flask_ops = {
     .mem_access = flask_mem_access,
 #endif
 
-#ifdef HAS_MEM_PAGING
+#ifdef CONFIG_HAS_MEM_PAGING
     .mem_paging = flask_mem_paging,
 #endif
 
Signature · 1 line
2.4.9
#47 lore raw

RFC 26/29 build: convert HAS_MEM_SHARING use to Kconfig

In reply to Doug Goldstein

Use the Kconfig generated CONFIG_HAS_MEM_SHARING defines in the code base.

---
 config/x86_32.mk        | 1 -
 config/x86_64.mk        | 1 -
 xen/Rules.mk            | 1 -
 xen/arch/x86/Kconfig    | 1 +
 xen/common/Kconfig      | 4 ++++
 xen/common/memory.c     | 2 +-
 xen/common/vm_event.c   | 6 +++---
 xen/include/xsm/dummy.h | 2 +-
 xen/include/xsm/xsm.h   | 4 ++--
 xen/xsm/dummy.c         | 2 +-
 xen/xsm/flask/hooks.c   | 4 ++--
 11 files changed, 15 insertions(+), 13 deletions(-)
config/x86_32.mk +0 -1
index f81ee38..849ea4f 100644
@@ -7,7 +7,6 @@ CONFIG_MIGRATE := y
 CONFIG_XCUTILS := y
 
 HAS_MEM_ACCESS := y
-HAS_MEM_SHARING := y
 
 CFLAGS += -m32 -march=i686
 
config/x86_64.mk +0 -1
index e681f55..7899fd5 100644
@@ -8,7 +8,6 @@ CONFIG_MIGRATE := y
 CONFIG_XCUTILS := y
 
 HAS_MEM_ACCESS := y
-HAS_MEM_SHARING := y
 
 CONFIG_XEN_INSTALL_SUFFIX := .gz
 
xen/Rules.mk +0 -1
index 4d4e29c..0742b06 100644
@@ -56,7 +56,6 @@ CFLAGS-$(crash_debug)   += -DCRASH_DEBUG
 CFLAGS-$(perfc)         += -DPERF_COUNTERS
 CFLAGS-$(perfc_arrays)  += -DPERF_ARRAYS
 CFLAGS-$(lock_profile)  += -DLOCK_PROFILE
-CFLAGS-$(HAS_MEM_SHARING) += -DHAS_MEM_SHARING
 CFLAGS-$(frame_pointer) += -fno-omit-frame-pointer -DCONFIG_FRAME_POINTER
 
 ifneq ($(max_phys_cpus),)
xen/arch/x86/Kconfig +1 -0
index ced84fa..2031008 100644
@@ -30,6 +30,7 @@ config X86
 	select HAS_KEXEC
 	select HAS_MEM_ACCESS
 	select HAS_MEM_PAGING
+	select HAS_MEM_SHARING
 
 config ARCH_DEFCONFIG
 	string
xen/common/Kconfig +4 -0
index f6cfb9e..58858d2 100644
@@ -13,6 +13,10 @@ config HAS_MEM_ACCESS
 config HAS_MEM_PAGING
 	bool
 
+# Select HAS_MEM_SHARING if mem sharing is supported
+config HAS_MEM_SHARING
+	bool
+
 # Select HAS_PDX if PDX is supported
 config HAS_PDX
 	bool
xen/common/memory.c +1 -1
index cb4063a..541b823 100644
@@ -1292,7 +1292,7 @@ int prepare_ring_for_helper(
         return -ENOENT;
     }
 #endif
-#ifdef HAS_MEM_SHARING
+#ifdef CONFIG_HAS_MEM_SHARING
     if ( p2m_is_shared(p2mt) )
     {
         if ( page )
xen/common/vm_event.c +3 -3
index 2e59e41..28a7add 100644
@@ -518,7 +518,7 @@ static void monitor_notification(struct vcpu *v, unsigned int port)
         vm_event_resume(v->domain, &v->domain->vm_event->monitor);
 }
 
-#ifdef HAS_MEM_SHARING
+#ifdef CONFIG_HAS_MEM_SHARING
 /* Registered with Xen-bound event channel for incoming notifications. */
 static void mem_sharing_notification(struct vcpu *v, unsigned int port)
 {
@@ -549,7 +549,7 @@ void vm_event_cleanup(struct domain *d)
         destroy_waitqueue_head(&d->vm_event->monitor.wq);
         (void)vm_event_disable(d, &d->vm_event->monitor);
     }
-#ifdef HAS_MEM_SHARING
+#ifdef CONFIG_HAS_MEM_SHARING
     if ( d->vm_event->share.ring_page )
     {
         destroy_waitqueue_head(&d->vm_event->share.wq);
@@ -682,7 +682,7 @@ int vm_event_domctl(struct domain *d, xen_domctl_vm_event_op_t *vec,
     }
     break;
 
-#ifdef HAS_MEM_SHARING
+#ifdef CONFIG_HAS_MEM_SHARING
     case XEN_DOMCTL_VM_EVENT_OP_SHARING:
     {
         struct vm_event_domain *ved = &d->vm_event->share;
xen/include/xsm/dummy.h +1 -1
index dd7618f..d6051a4 100644
@@ -576,7 +576,7 @@ static XSM_INLINE int xsm_mem_paging(XSM_DEFAULT_ARG struct domain *d)
 }
 #endif
 
-#ifdef HAS_MEM_SHARING
+#ifdef CONFIG_HAS_MEM_SHARING
 static XSM_INLINE int xsm_mem_sharing(XSM_DEFAULT_ARG struct domain *d)
 {
     XSM_ASSERT_ACTION(XSM_DM_PRIV);
xen/include/xsm/xsm.h +2 -2
index b23ecda..0a4c34f 100644
@@ -160,7 +160,7 @@ struct xsm_operations {
     int (*mem_paging) (struct domain *d);
 #endif
 
-#ifdef HAS_MEM_SHARING
+#ifdef CONFIG_HAS_MEM_SHARING
     int (*mem_sharing) (struct domain *d);
 #endif
 
@@ -617,7 +617,7 @@ static inline int xsm_mem_paging (xsm_default_t def, struct domain *d)
 }
 #endif
 
-#ifdef HAS_MEM_SHARING
+#ifdef CONFIG_HAS_MEM_SHARING
 static inline int xsm_mem_sharing (xsm_default_t def, struct domain *d)
 {
     return xsm_ops->mem_sharing(d);
xen/xsm/dummy.c +1 -1
index 2f50be9..d7ed323 100644
@@ -137,7 +137,7 @@ void xsm_fixup_ops (struct xsm_operations *ops)
     set_to_dummy_if_null(ops, mem_paging);
 #endif
 
-#ifdef HAS_MEM_SHARING
+#ifdef CONFIG_HAS_MEM_SHARING
     set_to_dummy_if_null(ops, mem_sharing);
 #endif
 
xen/xsm/flask/hooks.c +2 -2
index 582eb85..7ba6528 100644
@@ -1206,7 +1206,7 @@ static int flask_mem_paging(struct domain *d)
 }
 #endif
 
-#ifdef HAS_MEM_SHARING
+#ifdef CONFIG_HAS_MEM_SHARING
 static int flask_mem_sharing(struct domain *d)
 {
     return current_has_perm(d, SECCLASS_DOMAIN2, DOMAIN2__MEM_SHARING);
@@ -1713,7 +1713,7 @@ static struct xsm_operations flask_ops = {
     .mem_paging = flask_mem_paging,
 #endif
 
-#ifdef HAS_MEM_SHARING
+#ifdef CONFIG_HAS_MEM_SHARING
     .mem_sharing = flask_mem_sharing,
 #endif
 
Signature · 1 line
2.4.9
#48 lore raw

RFC 27/29 build: convert HAS_GICV3 use to Kconfig

In reply to Doug Goldstein

Use the Kconfig generated CONFIG_HAS_GICV3 defines in the code base.

---
 xen/arch/arm/Kconfig         | 4 ++++
 xen/arch/arm/Makefile        | 2 +-
 xen/arch/arm/Rules.mk        | 2 --
 xen/arch/arm/vgic.c          | 2 +-
 xen/include/asm-arm/domain.h | 3 ++-
 xen/include/asm-arm/gic.h    | 4 ++--
 xen/include/asm-arm/vgic.h   | 2 +-
 7 files changed, 11 insertions(+), 8 deletions(-)
xen/arch/arm/Kconfig +4 -0
index f100f17..01744c7 100644
@@ -28,6 +28,10 @@ config ARCH_DEFCONFIG
 	default "arch/arm/arm32_defconfig" if ARM_32
 	default "arch/arm/arm64_defconfig" if ARM_64
 
+# Select HAS_GICV3 if Generic Interrupt Connect (GICv3) is supported
+config HAS_GICV3
+	bool
+
 source "common/Kconfig"
 
 source "drivers/Kconfig"
xen/arch/arm/Makefile +1 -1
index 1ef39f7..cc23520 100644
@@ -13,7 +13,7 @@ obj-y += sysctl.o
 obj-y += domain_build.o
 obj-y += gic.o gic-v2.o
 obj-$(CONFIG_ARM_32) += gic-hip04.o
-obj-$(HAS_GICV3) += gic-v3.o
+obj-$(CONFIG_HAS_GICV3) += gic-v3.o
 obj-y += io.o
 obj-y += irq.o
 obj-y += kernel.o
xen/arch/arm/Rules.mk +0 -2
index 2158bd8..4947e64 100644
@@ -32,8 +32,6 @@ ifneq ($(call cc-option,$(CC),-fvisibility=hidden,n),n)
 CFLAGS += -DGCC_HAS_VISIBILITY_ATTRIBUTE
 endif
 
-CFLAGS-$(HAS_GICV3) += -DHAS_GICV3
-
 EARLY_PRINTK := n
 
 ifeq ($(debug),y)
xen/arch/arm/vgic.c +1 -1
index a6835a8..a00fb89 100644
@@ -83,7 +83,7 @@ int domain_vgic_init(struct domain *d, unsigned int nr_spis)
 
     switch ( d->arch.vgic.version )
     {
-#ifdef HAS_GICV3
+#ifdef CONFIG_HAS_GICV3
     case GIC_V3:
         if ( vgic_v3_init(d) )
            return -ENODEV;
xen/include/asm-arm/domain.h +2 -1
index b89727e..4dd72ed 100644
@@ -102,7 +102,8 @@ struct arch_domain
         struct pending_irq *pending_irqs;
         /* Base address for guest GIC */
         paddr_t dbase; /* Distributor base address */
-#ifdef HAS_GICV3
+        paddr_t cbase; /* CPU base address */
+#ifdef CONFIG_HAS_GICV3
         /* GIC V3 addressing */
         /* List of contiguous occupied by the redistributors */
         struct vgic_rdist_region {
xen/include/asm-arm/gic.h +2 -2
index 6d53f97..4dbd651 100644
@@ -162,7 +162,7 @@
 
 #define DT_MATCH_GIC_V3 DT_MATCH_COMPATIBLE("arm,gic-v3")
 
-#ifdef HAS_GICV3
+#ifdef CONFIG_HAS_GICV3
 /*
  * GICv3 registers that needs to be saved/restored
  */
@@ -190,7 +190,7 @@ struct gic_v2 {
  */
 union gic_state_data {
     struct gic_v2 v2;
-#ifdef HAS_GICV3
+#ifdef CONFIG_HAS_GICV3
     struct gic_v3 v3;
 #endif
 };
xen/include/asm-arm/vgic.h +1 -1
index 96839f0..1fa7c61 100644
@@ -238,7 +238,7 @@ extern void vgic_free_virq(struct domain *d, unsigned int virq);
 
 void vgic_v2_setup_hw(paddr_t dbase, paddr_t cbase, paddr_t vbase);
 
-#ifdef HAS_GICV3
+#ifdef CONFIG_HAS_GICV3
 struct rdist_region;
 void vgic_v3_setup_hw(paddr_t dbase,
                       unsigned int nr_rdist_regions,
Signature · 1 line
2.4.9
#49 lore raw

Re: [RFC 27/29] build: convert HAS_GICV3 use to Kconfig

Hi,

Quoted 1 line · Doug Goldstein

Use the Kconfig generated CONFIG_HAS_GICV3 defines in the code base.

If you are going to rename all HAS_* to CONFIG_HAS_, please drop the HAS which is now redundant.

Quoted 17 lines
---
  xen/arch/arm/Kconfig         | 4 ++++
  xen/arch/arm/Makefile        | 2 +-
  xen/arch/arm/Rules.mk        | 2 --
  xen/arch/arm/vgic.c          | 2 +-
  xen/include/asm-arm/domain.h | 3 ++-
  xen/include/asm-arm/gic.h    | 4 ++--
  xen/include/asm-arm/vgic.h   | 2 +-
  7 files changed, 11 insertions(+), 8 deletions(-)
xen/arch/arm/Kconfig +0 -0
index f100f17..01744c7 100644

xen/arch/arm/Kconfig config ARCH_DEFCONFIG · line 31

Quoted 4 lines
xen/arch/arm/Kconfig +1 -0
@@ -28,6 +28,10 @@ config ARCH_DEFCONFIG
  	default "arch/arm/arm32_defconfig" if ARM_32
  	default "arch/arm/arm64_defconfig" if ARM_64
 
+# Select HAS_GICV3 if Generic Interrupt Connect (GICv3) is supported

s/Connect/Controller/ although saying GICv3 is enough. No need to spell out the acronym.

If you really want to spell it it should be Generic Interrupt Controller v3.

xen/arch/arm/Kconfig config ARCH_DEFCONFIG · line 34

Quoted 3 lines
xen/arch/arm/Kconfig +3 -0
+config HAS_GICV3
+	bool
+

I may have miss something with this change GICv3 is not built anymore for ARM64.

The user should be able to get a Xen with the exactly the same features after this series without any changes from his side.

Quoted 3 lines
xen/arch/arm/Kconfig +0 -0
  source "common/Kconfig"
 
  source "drivers/Kconfig"

[...]

xen/include/asm-arm/domain.h struct arch_domain · line 105

Quoted 10 lines
xen/include/asm-arm/domain.h +1 -1
index b89727e..4dd72ed 100644
@@ -102,7 +102,8 @@ struct arch_domain
          struct pending_irq *pending_irqs;
          /* Base address for guest GIC */
          paddr_t dbase; /* Distributor base address */
-#ifdef HAS_GICV3
+        paddr_t cbase; /* CPU base address */

Can you please make sure that you series don't re-introduce code or change it.

This should be pretty easy to check with grep. I.e any changes in *.c and *.h files but in lines containing ifdef/endif are likely wrong.

Regards,

Signature · 1 line
Julien Grall
#50 lore raw

Re: [RFC 27/29] build: convert HAS_GICV3 use to Kconfig

Quoted 30 lines · Julien Grall

Hi,

Quoted 2 lines · Doug Goldstein

Use the Kconfig generated CONFIG_HAS_GICV3 defines in the code base.

If you are going to rename all HAS_* to CONFIG_HAS_, please drop the HAS which is now redundant.

Quoted 20 lines
---
  xen/arch/arm/Kconfig         | 4 ++++
  xen/arch/arm/Makefile        | 2 +-
  xen/arch/arm/Rules.mk        | 2 --
  xen/arch/arm/vgic.c          | 2 +-
  xen/include/asm-arm/domain.h | 3 ++-
  xen/include/asm-arm/gic.h    | 4 ++--
  xen/include/asm-arm/vgic.h   | 2 +-
  7 files changed, 11 insertions(+), 8 deletions(-)
xen/arch/arm/Kconfig +0 -0
index f100f17..01744c7 100644
@@ -28,6 +28,10 @@ config ARCH_DEFCONFIG
        default "arch/arm/arm32_defconfig" if ARM_32
        default "arch/arm/arm64_defconfig" if ARM_64
 
Quoted 7 lines

xen/arch/arm/Kconfig config ARCH_DEFCONFIG · line 31

Quoted 1 line
xen/arch/arm/Kconfig +1 -0
+# Select HAS_GICV3 if Generic Interrupt Connect (GICv3) is supported

s/Connect/Controller/ although saying GICv3 is enough. No need to spell out the acronym.

If you really want to spell it it should be Generic Interrupt Controller v3.

Do remember that those comments are for users, not developers. *You* may know without thinking that "GIC" is an interrupt controller, but many users would appreciate at least a hint so that they know whether they can safely ignore it or go look further into it.

-George

#51 lore raw

Re: [RFC 27/29] build: convert HAS_GICV3 use to Kconfig

Quoted 37 lines · George Dunlap
Quoted 36 lines · Julien Grall

Hi,

Quoted 2 lines · Doug Goldstein

Use the Kconfig generated CONFIG_HAS_GICV3 defines in the code base.

If you are going to rename all HAS_* to CONFIG_HAS_, please drop the HAS which is now redundant.

Quoted 17 lines
---
   xen/arch/arm/Kconfig         | 4 ++++
   xen/arch/arm/Makefile        | 2 +-
   xen/arch/arm/Rules.mk        | 2 --
   xen/arch/arm/vgic.c          | 2 +-
   xen/include/asm-arm/domain.h | 3 ++-
   xen/include/asm-arm/gic.h    | 4 ++--
   xen/include/asm-arm/vgic.h   | 2 +-
   7 files changed, 11 insertions(+), 8 deletions(-)
xen/arch/arm/Kconfig +0 -0
index f100f17..01744c7 100644

xen/arch/arm/Kconfig config ARCH_DEFCONFIG · line 31

Quoted 4 lines
xen/arch/arm/Kconfig +1 -0
@@ -28,6 +28,10 @@ config ARCH_DEFCONFIG
         default "arch/arm/arm32_defconfig" if ARM_32
         default "arch/arm/arm64_defconfig" if ARM_64
 
+# Select HAS_GICV3 if Generic Interrupt Connect (GICv3) is supported

s/Connect/Controller/ although saying GICv3 is enough. No need to spell out the acronym.

Quoted 6 lines
Quoted 1 line

If you really want to spell it it should be Generic Interrupt Controller v3.

Do remember that those comments are for users, not developers. *You* may know without thinking that "GIC" is an interrupt controller, but many users would appreciate at least a hint so that they know whether they can safely ignore it or go look further into it.

Even with that in mind, the term "GICvN" is commonly used in the ARM world. It's like the term APIC on x86, you don't spell out.

Regards,

Signature · 1 line
Julien Grall
#52 lore raw

Re: [RFC 27/29] build: convert HAS_GICV3 use to Kconfig

Quoted 45 lines · Julien Grall
Quoted 42 lines · George Dunlap
Quoted 39 lines · Julien Grall

Hi,

Quoted 2 lines · Doug Goldstein

Use the Kconfig generated CONFIG_HAS_GICV3 defines in the code base.

If you are going to rename all HAS_* to CONFIG_HAS_, please drop the HAS which is now redundant.

Quoted 17 lines
---
   xen/arch/arm/Kconfig         | 4 ++++
   xen/arch/arm/Makefile        | 2 +-
   xen/arch/arm/Rules.mk        | 2 --
   xen/arch/arm/vgic.c          | 2 +-
   xen/include/asm-arm/domain.h | 3 ++-
   xen/include/asm-arm/gic.h    | 4 ++--
   xen/include/asm-arm/vgic.h   | 2 +-
   7 files changed, 11 insertions(+), 8 deletions(-)
xen/arch/arm/Kconfig +0 -0
index f100f17..01744c7 100644

xen/arch/arm/Kconfig config ARCH_DEFCONFIG · line 31

Quoted 4 lines
xen/arch/arm/Kconfig +1 -0
@@ -28,6 +28,10 @@ config ARCH_DEFCONFIG
         default "arch/arm/arm32_defconfig" if ARM_32
         default "arch/arm/arm64_defconfig" if ARM_64
 
+# Select HAS_GICV3 if Generic Interrupt Connect (GICv3) is supported

s/Connect/Controller/ although saying GICv3 is enough. No need to spell out
the acronym.

If you really want to spell it it should be Generic Interrupt Controller v3.

Quoted 7 lines
Quoted 4 lines

Do remember that those comments are for users, not developers. *You* may know without thinking that "GIC" is an interrupt controller, but many users would appreciate at least a hint so that they know whether they can safely ignore it or go look further into it.

Even with that in mind, the term "GICvN" is commonly used in the ARM world. It's like the term APIC on x86, you don't spell out.

So you don't -- good comparison. :-)

-George

#53 lore raw

Re: [RFC 27/29] build: convert HAS_GICV3 use to Kconfig

In reply to George Dunlap
Quoted 40 lines · George Dunlap
Quoted 38 lines · Julien Grall

Hi,

Quoted 2 lines · Doug Goldstein

Use the Kconfig generated CONFIG_HAS_GICV3 defines in the code base.

If you are going to rename all HAS_* to CONFIG_HAS_, please drop the HAS
which is now redundant.

Quoted 17 lines
---
  xen/arch/arm/Kconfig         | 4 ++++
  xen/arch/arm/Makefile        | 2 +-
  xen/arch/arm/Rules.mk        | 2 --
  xen/arch/arm/vgic.c          | 2 +-
  xen/include/asm-arm/domain.h | 3 ++-
  xen/include/asm-arm/gic.h    | 4 ++--
  xen/include/asm-arm/vgic.h   | 2 +-
  7 files changed, 11 insertions(+), 8 deletions(-)
xen/arch/arm/Kconfig +0 -0
index f100f17..01744c7 100644

xen/arch/arm/Kconfig config ARCH_DEFCONFIG · line 31

Quoted 4 lines
xen/arch/arm/Kconfig +1 -0
@@ -28,6 +28,10 @@ config ARCH_DEFCONFIG
        default "arch/arm/arm32_defconfig" if ARM_32
        default "arch/arm/arm64_defconfig" if ARM_64
 
+# Select HAS_GICV3 if Generic Interrupt Connect (GICv3) is supported

s/Connect/Controller/ although saying GICv3 is enough. No need to spell out
the acronym.

Quoted 4 lines
Quoted 2 lines

If you really want to spell it it should be Generic Interrupt Controller v3.

Do remember that those comments are for users, not developers.

They really shouldn't be, the choice of inclusion of GICv3 is a choice for the (sub)arch maintainer, not the end user.

And this is is a code comment in the Kconfig, not the help text for a user facing option, so Doug hasn't actually made it a user facing option, which is good and proper.

When this switch was first proposed I raised a concern about the proliferation of user facing options and therefore of Xen binaries which support different sets of h/w or feature support. I remain concerned about that and your comment seems to me to be the first instance of that worry becoming realised, even if it was based on a misunderstanding of where the comment would appear.

Quoted 4 lines

*You*
may know without thinking that "GIC" is an interrupt controller, but many users would appreciate at least a hint so that they know whether they can safely ignore it or go look further into it.

No user of Xen should ever be asked to make this decision.

Ian.

#54 lore raw

Re: [RFC 27/29] build: convert HAS_GICV3 use to Kconfig

In reply to Julien Grall
Quoted 1 line · Julien Grall

Hi,

Thanks for the quick review! I appreciate it.

Quoted 6 lines · Doug Goldstein
Quoted 1 line

Use the Kconfig generated CONFIG_HAS_GICV3 defines in the code base.

If you are going to rename all HAS_* to CONFIG_HAS_, please drop the HAS which is now redundant.

So I am treating the CONFIG_HAS_ defines similar to how the Linux kernel has CONFIG_HAVE_. These are not actually user facing options but instead they are enforced by the architecture instead of being a user facing option.

For example CONFIG_HAS_KEXEC means the architecture/platform supports KEXEC but CONFIG_KEXEC would be the user configurable option to turn it on/off. This would be consistent with the current behavior in the Xen tree where HAS_KEXEC means the architecture/platform supports KEXEC while 'kexec' as an env var allows the user to build kexec on or off.

Quoted 21 lines
Quoted 21 lines
---
  xen/arch/arm/Kconfig         | 4 ++++
  xen/arch/arm/Makefile        | 2 +-
  xen/arch/arm/Rules.mk        | 2 --
  xen/arch/arm/vgic.c          | 2 +-
  xen/include/asm-arm/domain.h | 3 ++-
  xen/include/asm-arm/gic.h    | 4 ++--
  xen/include/asm-arm/vgic.h   | 2 +-
  7 files changed, 11 insertions(+), 8 deletions(-)
xen/arch/arm/Kconfig +0 -0
index f100f17..01744c7 100644
@@ -28,6 +28,10 @@ config ARCH_DEFCONFIG
      default "arch/arm/arm32_defconfig" if ARM_32
      default "arch/arm/arm64_defconfig" if ARM_64
 
Quoted 7 lines

xen/arch/arm/Kconfig config ARCH_DEFCONFIG · line 31

Quoted 1 line
xen/arch/arm/Kconfig +1 -0
+# Select HAS_GICV3 if Generic Interrupt Connect (GICv3) is supported

s/Connect/Controller/ although saying GICv3 is enough. No need to spell out the acronym.

If you really want to spell it it should be Generic Interrupt Controller v3.

Thanks. I will update those comments.

Quoted 10 lines

xen/arch/arm/Kconfig config ARCH_DEFCONFIG · line 34

Quoted 4 lines
xen/arch/arm/Kconfig +3 -0
+config HAS_GICV3
+    bool
+

I may have miss something with this change GICv3 is not built anymore for ARM64.

The user should be able to get a Xen with the exactly the same features after this series without any changes from his side.

Definitely my goal with this patchset is to make sure everything behaves the same way it did before.

Quoted 21 lines
Quoted 4 lines
xen/arch/arm/Kconfig +0 -0
  source "common/Kconfig"
 
  source "drivers/Kconfig"

[...]

xen/include/asm-arm/domain.h struct arch_domain · line 105

Quoted 10 lines
xen/include/asm-arm/domain.h +1 -1
index b89727e..4dd72ed 100644
@@ -102,7 +102,8 @@ struct arch_domain
          struct pending_irq *pending_irqs;
          /* Base address for guest GIC */
          paddr_t dbase; /* Distributor base address */
-#ifdef HAS_GICV3
+        paddr_t cbase; /* CPU base address */

Can you please make sure that you series don't re-introduce code or change it.

Quoted 5 lines

This should be pretty easy to check with grep. I.e any changes in *.c and *.h files but in lines containing ifdef/endif are likely wrong.

Regards,

Apologies, I made a mistake during a rebase.

Signature · 1 line
Doug Goldstein

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#55 lore raw

RFC 28/29 build: convert CONFIG_COMPAT to Kconfig

In reply to Doug Goldstein
---
 config/x86_64.mk     | 1 -
 xen/arch/x86/Kconfig | 8 ++++++++
 2 files changed, 8 insertions(+), 1 deletion(-)
config/x86_64.mk +0 -1
index 7899fd5..fcae0b1 100644
@@ -2,7 +2,6 @@ CONFIG_X86 := y
 CONFIG_X86_64 := y
 CONFIG_X86_$(XEN_OS) := y
 
-CONFIG_COMPAT := y
 CONFIG_HVM := y
 CONFIG_MIGRATE := y
 CONFIG_XCUTILS := y
xen/arch/x86/Kconfig +8 -0
index 2031008..6b0c98e 100644
@@ -37,6 +37,14 @@ config ARCH_DEFCONFIG
 	default "arch/x86/i386_defconfig" if X86_32
 	default "arch/x86/x86_64_defconfig" if X86_64
 
+config COMPAT
+	bool
+	default y if 64BIT
+	help
+	  Support 32-bit PV guests on 64-bit Xen
+
+	  If unsure, say Y.
+
 source "common/Kconfig"
 
 source "drivers/Kconfig"
Signature · 1 line
2.4.9
#56 lore raw

RFC 29/29 build: convert kexec options to CONFIG_KEXEC

In reply to Doug Goldstein

Replace kexec := y in Rules.mk with a Kconfig option called CONFIG_KEXEC

---
 xen/Rules.mk       |  6 ------
 xen/common/Kconfig | 11 +++++++++++
 2 files changed, 11 insertions(+), 6 deletions(-)
xen/Rules.mk +0 -6
index 0742b06..9480ad0 100644
@@ -10,7 +10,6 @@ lock_profile  ?= n
 crash_debug   ?= n
 frame_pointer ?= n
 lto           ?= n
-kexec         ?= y
 
 include $(BASEDIR)/include/config/auto.conf
 
@@ -65,11 +64,6 @@ ifneq ($(max_phys_irqs),)
 CFLAGS-y                += -DMAX_PHYS_IRQS=$(max_phys_irqs)
 endif
 
-CONFIG_KEXEC-$(CONFIG_HAS_KEXEC) := $(kexec)
-CONFIG_KEXEC              := $(CONFIG_KEXEC-y)
-
-CFLAGS-$(CONFIG_KEXEC)  += -DCONFIG_KEXEC
-
 AFLAGS-y                += -D__ASSEMBLY__ -include $(BASEDIR)/include/xen/config.h
 
 # Clang's built-in assembler can't handle .code16/.code32/.code64 yet
xen/common/Kconfig +11 -0
index 58858d2..6de2cac 100644
@@ -29,4 +29,15 @@ config HAS_KEXEC
 config HAS_GDBSX
 	bool
 
+# Enable/Disable kexec support
+config KEXEC
+	def_bool y
+	depends on HAS_KEXEC
+	---help---
+	  Allows a running Xen hypervisor to be replaced with another OS
+	  without rebooting. This is primarily used to execute a crash
+	  environment to collect information on a Xen hypervisor or dom0 crash.
+
+	  If unsure, say Y.
+
 endmenu
Signature · 1 line
2.4.9
#57 lore raw
In reply to Doug Goldstein

Hi,

Can you please run scripts/get_maintainers.pl on every patch to get the list of relevant maintainers.

Regards,

Quoted 248 lines · Doug Goldstein

This is very incomplete and is only posted in hopes of getting some feedback if this conversion is welcome by the community. There are a few different ways I can go from here.

* convert all of include/$(ARCH)/config.h
* move this to the top level and convert all of configs/
* due both of the above

I'd like to break this series up as small as possible and land parts in the tree that I can land. At this point the first 4 patches are too large and need culling down to only what's necessary. But my goal was to make it as obvious as possible where the original code came from and how it was transformed over time.

Ultimately my goal is to allow for more parts of the hypervisor to be turned off at compile time and potentially make it easier to include more experimental features by others which can be turned off by default. Also to provide the one true location for all possible knobs in the source code.

Doug Goldstein (29):
build: import Kbuild/Kconfig from Linux 4.2
build: trim down Linux bits
build: hookup initial Kconfig usage
build: include config bits to build with
build: convert HAS_PASSTHROUGH use to Kconfig
build: convert HAS_DEVICE_TREE use to Kconfig
build: convert HAS_PCI use to Kconfig
build: convert HAS_NS16550 use to Kconfig
build: convert HAS_IOPORTS use to Kconfig
build: convert HAS_ACPI use to Kconfig
build: convert HAS_VIDEO use to Kconfig
build: convert HAS_VGA use to Kconfig
build: convert HAS_CPUFREQ use to Kconfig
build: convert HAS_GDBSX use to Kconfig
build: convert HAS_PDX use to Kconfig
build: convert HAS_KEXEC use to Kconfig
build: convert HAS_ARM_HDLCD use to Kconfig
build: convert HAS_CADENCE_UART use to Kconfig
build: convert HAS_PL011 use to Kconfig
build: convert HAS_EXYNOS4210 use to Kconfig
build: convert HAS_OMAP use to Kconfig
build: convert HAS_SCIF use to Kconfig
build: convert HAS_EHCI use to Kconfig
build: convert HAS_MEM_ACCESS use to Kconfig
build: convert HAS_MEM_PAGING use to Kconfig
build: convert HAS_MEM_SHARING use to Kconfig
build: convert HAS_GICV3 use to Kconfig
build: convert CONFIG_COMPAT to Kconfig
build: convert kexec options to CONFIG_KEXEC

  .gitignore                                     |    8 +
  config/x86_32.mk                               |    2 -
  config/x86_64.mk                               |    3 -
  xen/Kconfig                                    |   26 +
  xen/Makefile                                   |   14 +
  xen/Makefile.linux                             | 1595 +++++++++++++++
  xen/Rules.mk                                   |   18 +-
  xen/arch/arm/Kconfig                           |   37 +
  xen/arch/arm/Makefile                          |    2 +-
  xen/arch/arm/Makefile.kconfig                  |    8 +
  xen/arch/arm/Rules.mk                          |    8 -
  xen/arch/arm/defconfig                         |    0
  xen/arch/arm/vgic.c                            |    2 +-
  xen/arch/x86/Kconfig                           |   50 +
  xen/arch/x86/Makefile.kconfig                  |   26 +
  xen/arch/x86/Rules.mk                          |   12 -
  xen/arch/x86/i386_defconfig                    |    1 +
  xen/arch/x86/x86_64_defconfig                  |    0
  xen/common/Kconfig                             |   43 +
  xen/common/Makefile                            |    8 +-
  xen/common/compat/memory.c                     |    4 +-
  xen/common/domain.c                            |    2 +-
  xen/common/domctl.c                            |    2 +-
  xen/common/memory.c                            |   12 +-
  xen/common/sysctl.c                            |    4 +-
  xen/common/vm_event.c                          |   16 +-
  xen/drivers/Kconfig                            |   15 +
  xen/drivers/Makefile                           |   10 +-
  xen/drivers/acpi/Kconfig                       |    4 +
  xen/drivers/char/Kconfig                       |   33 +
  xen/drivers/char/Makefile                      |   14 +-
  xen/drivers/char/ns16550.c                     |   40 +-
  xen/drivers/cpufreq/Kconfig                    |    4 +
  xen/drivers/passthrough/Kconfig                |    4 +
  xen/drivers/passthrough/Makefile               |    4 +-
  xen/drivers/passthrough/iommu.c                |    4 +-
  xen/drivers/pci/Kconfig                        |    4 +
  xen/drivers/video/Kconfig                      |   13 +
  xen/drivers/video/Makefile                     |   14 +-
  xen/include/asm-arm/device.h                   |    2 +-
  xen/include/asm-arm/domain.h                   |    3 +-
  xen/include/asm-arm/gic.h                      |    4 +-
  xen/include/asm-arm/vgic.h                     |    2 +-
  xen/include/linux/kconfig.h                    |   54 +
  xen/include/xen/config.h                       |    2 +
  xen/include/xen/hvm/iommu.h                    |    2 +-
  xen/include/xen/iommu.h                        |   14 +-
  xen/include/xen/mem_access.h                   |    4 +-
  xen/include/xen/pdx.h                          |    4 +-
  xen/include/xen/sched.h                        |    4 +-
  xen/include/xsm/dummy.h                        |   14 +-
  xen/include/xsm/xsm.h                          |   28 +-
  xen/scripts/Kbuild.include                     |  305 +++
  xen/scripts/Makefile                           |   42 +
  xen/scripts/Makefile.asm-generic               |   23 +
  xen/scripts/Makefile.build                     |  427 ++++
  xen/scripts/Makefile.clean                     |   91 +
  xen/scripts/Makefile.extrawarn                 |   68 +
  xen/scripts/Makefile.help                      |    3 +
  xen/scripts/Makefile.host                      |  128 ++
  xen/scripts/Makefile.kasan                     |   29 +
  xen/scripts/Makefile.lib                       |  390 ++++
  xen/scripts/Makefile.modpost                   |  152 ++
  xen/scripts/basic/.gitignore                   |    1 +
  xen/scripts/basic/Makefile                     |   15 +
  xen/scripts/basic/fixdep.c                     |  462 +++++
  xen/scripts/gcc-goto.sh                        |   21 +
  xen/scripts/kconfig/.gitignore                 |   22 +
  xen/scripts/kconfig/Makefile                   |  317 +++
  xen/scripts/kconfig/POTFILES.in                |   12 +
  xen/scripts/kconfig/check.sh                   |   13 +
  xen/scripts/kconfig/conf.c                     |  722 +++++++
  xen/scripts/kconfig/confdata.c                 | 1248 ++++++++++++
  xen/scripts/kconfig/expr.c                     | 1206 +++++++++++
  xen/scripts/kconfig/expr.h                     |  238 +++
  xen/scripts/kconfig/gconf.c                    | 1521 ++++++++++++++
  xen/scripts/kconfig/gconf.glade                |  661 ++++++
  xen/scripts/kconfig/images.c                   |  326 +++
  xen/scripts/kconfig/kxgettext.c                |  235 +++
  xen/scripts/kconfig/list.h                     |  131 ++
  xen/scripts/kconfig/lkc.h                      |  186 ++
  xen/scripts/kconfig/lkc_proto.h                |   52 +
  xen/scripts/kconfig/lxdialog/.gitignore        |    4 +
  xen/scripts/kconfig/lxdialog/BIG.FAT.WARNING   |    4 +
  xen/scripts/kconfig/lxdialog/check-lxdialog.sh |   91 +
  xen/scripts/kconfig/lxdialog/checklist.c       |  332 +++
  xen/scripts/kconfig/lxdialog/dialog.h          |  257 +++
  xen/scripts/kconfig/lxdialog/inputbox.c        |  301 +++
  xen/scripts/kconfig/lxdialog/menubox.c         |  437 ++++
  xen/scripts/kconfig/lxdialog/textbox.c         |  408 ++++
  xen/scripts/kconfig/lxdialog/util.c            |  713 +++++++
  xen/scripts/kconfig/lxdialog/yesno.c           |  114 ++
  xen/scripts/kconfig/mconf.c                    | 1047 ++++++++++
  xen/scripts/kconfig/menu.c                     |  697 +++++++
  xen/scripts/kconfig/merge_config.sh            |  158 ++
  xen/scripts/kconfig/nconf.c                    | 1561 ++++++++++++++
  xen/scripts/kconfig/nconf.gui.c                |  656 ++++++
  xen/scripts/kconfig/nconf.h                    |   96 +
  xen/scripts/kconfig/qconf.cc                   | 1798 +++++++++++++++++
  xen/scripts/kconfig/qconf.h                    |  338 ++++
  xen/scripts/kconfig/streamline_config.pl       |  647 ++++++
  xen/scripts/kconfig/symbol.c                   | 1377 +++++++++++++
  xen/scripts/kconfig/util.c                     |  147 ++
  xen/scripts/kconfig/zconf.gperf                |   48 +
  xen/scripts/kconfig/zconf.hash.c_shipped       |  289 +++
  xen/scripts/kconfig/zconf.l                    |  372 ++++
  xen/scripts/kconfig/zconf.lex.c_shipped        | 2476 +++++++++++++++++++++++
  xen/scripts/kconfig/zconf.tab.c_shipped        | 2580 ++++++++++++++++++++++++
  xen/scripts/kconfig/zconf.y                    |  742 +++++++
  xen/scripts/link-vmlinux.sh                    |  252 +++
  xen/scripts/mkmakefile                         |   52 +
  xen/scripts/mksysmap                           |   44 +
  xen/scripts/setlocalversion                    |  174 ++
  xen/xsm/dummy.c                                |   10 +-
  xen/xsm/flask/hooks.c                          |   34 +-
  xen/xsm/xsm_core.c                             |    2 +-
  xen/xsm/xsm_policy.c                           |    4 +-
  117 files changed, 29337 insertions(+), 175 deletions(-)

create mode 100644 xen/Kconfig
create mode 100644 xen/Makefile.linux
create mode 100644 xen/arch/arm/Kconfig
create mode 100644 xen/arch/arm/Makefile.kconfig create mode 100644 xen/arch/arm/defconfig
create mode 100644 xen/arch/x86/Kconfig
create mode 100644 xen/arch/x86/Makefile.kconfig create mode 100644 xen/arch/x86/i386_defconfig
create mode 100644 xen/arch/x86/x86_64_defconfig create mode 100644 xen/common/Kconfig
create mode 100644 xen/drivers/Kconfig
create mode 100644 xen/drivers/acpi/Kconfig
create mode 100644 xen/drivers/char/Kconfig
create mode 100644 xen/drivers/cpufreq/Kconfig
create mode 100644 xen/drivers/passthrough/Kconfig create mode 100644 xen/drivers/pci/Kconfig
create mode 100644 xen/drivers/video/Kconfig
create mode 100644 xen/include/linux/kconfig.h
create mode 100644 xen/scripts/Kbuild.include
create mode 100644 xen/scripts/Makefile
create mode 100644 xen/scripts/Makefile.asm-generic create mode 100644 xen/scripts/Makefile.build
create mode 100644 xen/scripts/Makefile.clean
create mode 100644 xen/scripts/Makefile.extrawarn create mode 100644 xen/scripts/Makefile.help
create mode 100644 xen/scripts/Makefile.host
create mode 100644 xen/scripts/Makefile.kasan
create mode 100644 xen/scripts/Makefile.lib
create mode 100644 xen/scripts/Makefile.modpost
create mode 100644 xen/scripts/basic/.gitignore
create mode 100644 xen/scripts/basic/Makefile
create mode 100644 xen/scripts/basic/fixdep.c
create mode 100755 xen/scripts/gcc-goto.sh
create mode 100644 xen/scripts/kconfig/.gitignore create mode 100644 xen/scripts/kconfig/Makefile
create mode 100644 xen/scripts/kconfig/POTFILES.in create mode 100755 xen/scripts/kconfig/check.sh
create mode 100644 xen/scripts/kconfig/conf.c
create mode 100644 xen/scripts/kconfig/confdata.c create mode 100644 xen/scripts/kconfig/expr.c
create mode 100644 xen/scripts/kconfig/expr.h
create mode 100644 xen/scripts/kconfig/gconf.c
create mode 100644 xen/scripts/kconfig/gconf.glade create mode 100644 xen/scripts/kconfig/images.c
create mode 100644 xen/scripts/kconfig/kxgettext.c create mode 100644 xen/scripts/kconfig/list.h
create mode 100644 xen/scripts/kconfig/lkc.h
create mode 100644 xen/scripts/kconfig/lkc_proto.h create mode 100644 xen/scripts/kconfig/lxdialog/.gitignore create mode 100644 xen/scripts/kconfig/lxdialog/BIG.FAT.WARNING create mode 100755 xen/scripts/kconfig/lxdialog/check-lxdialog.sh create mode 100644 xen/scripts/kconfig/lxdialog/checklist.c create mode 100644 xen/scripts/kconfig/lxdialog/dialog.h create mode 100644 xen/scripts/kconfig/lxdialog/inputbox.c create mode 100644 xen/scripts/kconfig/lxdialog/menubox.c create mode 100644 xen/scripts/kconfig/lxdialog/textbox.c create mode 100644 xen/scripts/kconfig/lxdialog/util.c create mode 100644 xen/scripts/kconfig/lxdialog/yesno.c create mode 100644 xen/scripts/kconfig/mconf.c
create mode 100644 xen/scripts/kconfig/menu.c
create mode 100755 xen/scripts/kconfig/merge_config.sh create mode 100644 xen/scripts/kconfig/nconf.c
create mode 100644 xen/scripts/kconfig/nconf.gui.c create mode 100644 xen/scripts/kconfig/nconf.h
create mode 100644 xen/scripts/kconfig/qconf.cc
create mode 100644 xen/scripts/kconfig/qconf.h
create mode 100755 xen/scripts/kconfig/streamline_config.pl create mode 100644 xen/scripts/kconfig/symbol.c
create mode 100644 xen/scripts/kconfig/util.c
create mode 100644 xen/scripts/kconfig/zconf.gperf create mode 100644 xen/scripts/kconfig/zconf.hash.c_shipped create mode 100644 xen/scripts/kconfig/zconf.l
create mode 100644 xen/scripts/kconfig/zconf.lex.c_shipped create mode 100644 xen/scripts/kconfig/zconf.tab.c_shipped create mode 100644 xen/scripts/kconfig/zconf.y
create mode 100755 xen/scripts/link-vmlinux.sh
create mode 100755 xen/scripts/mkmakefile
create mode 100755 xen/scripts/mksysmap
create mode 100755 xen/scripts/setlocalversion

Signature · 1 line
Julien Grall
#58 lore raw
Quoted 7 lines · Julien Grall

Hi,

Can you please run scripts/get_maintainers.pl on every patch to get the list of relevant maintainers.

Regards,

Yes. Sorry for not doing so. I treated this patchset as incomplete and just wanted to ensure the community was ok with my approach so I didn't want to bombard the maintainers individually yet.

Signature · 1 line
Doug Goldstein

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#59 lore raw
In reply to Doug Goldstein
Quoted 14 lines · Doug Goldstein

This is very incomplete and is only posted in hopes of getting some feedback if this conversion is welcome by the community. There are a few different ways I can go from here.

* convert all of include/$(ARCH)/config.h
* move this to the top level and convert all of configs/
* due both of the above

I'd like to break this series up as small as possible and land parts in the tree that I can land. At this point the first 4 patches are too large and need culling down to only what's necessary. But my goal was to make it as obvious as possible where the original code came from and how it was transformed over time.

Quoted 4 lines

Ultimately my goal is to allow for more parts of the hypervisor to be turned off at compile time and potentially make it easier to include more experimental features by others which can be turned off by default. Also to provide the one true location for all possible knobs in the source code.

I forgot to mention that you can grab this whole series from:

https://github.com/cardoe/xen/tree/kconfig_rfc

For anyone interested in building it but not going through the git am process for 29 patches.

Signature · 1 line
Doug Goldstein

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#60 lore raw
In reply to Doug Goldstein
Quoted 14 lines · Doug Goldstein

This is very incomplete and is only posted in hopes of getting some feedback if this conversion is welcome by the community. There are a few different ways I can go from here.

* convert all of include/$(ARCH)/config.h
* move this to the top level and convert all of configs/
* due both of the above

I'd like to break this series up as small as possible and land parts in the tree that I can land. At this point the first 4 patches are too large and need culling down to only what's necessary. But my goal was to make it as obvious as possible where the original code came from and how it was transformed over time.

Quoted 4 lines

Ultimately my goal is to allow for more parts of the hypervisor to be turned off at compile time and potentially make it easier to include more experimental features by others which can be turned off by default. Also to provide the one true location for all possible knobs in the source code.

Thankyou for looking into this. Do you by any chance have a git tree with this in?

~Andrew

#61 lore raw
Quoted 15 lines · Andrew Cooper
Quoted 14 lines · Doug Goldstein

This is very incomplete and is only posted in hopes of getting some feedback if this conversion is welcome by the community. There are a few different ways I can go from here.

* convert all of include/$(ARCH)/config.h
* move this to the top level and convert all of configs/
* due both of the above

I'd like to break this series up as small as possible and land parts in the tree that I can land. At this point the first 4 patches are too large and need culling down to only what's necessary. But my goal was to make it as obvious as possible where the original code came from and how it was transformed over time.

Quoted 6 lines
Quoted 4 lines

Ultimately my goal is to allow for more parts of the hypervisor to be turned off at compile time and potentially make it easier to include more experimental features by others which can be turned off by default. Also to provide the one true location for all possible knobs in the source code.

Thankyou for looking into this. Do you by any chance have a git tree with this in?

Sorry for the noise - I should have read the thread a little more before asking.

~Andrew

#62 lore raw
In reply to Doug Goldstein

Hi Doug,

Quoted 4 lines · Doug Goldstein

Ultimately my goal is to allow for more parts of the hypervisor to be turned off at compile time and potentially make it easier to include more experimental features by others which can be turned off by default. Also to provide the one true location for all possible knobs in the source code.

I gave a quick look to this series and noticed that a lots of HAS_* which were enable for ARM platform before is now disabled by default. I have in mind the UART drivers and GICv3.

While I agree that disabling unnecessary driver in Xen is nice to have, the user should not see any difference with and without series. By that I mean that if the GICv3 is enabled on ARM64, it should stay enabled by default either in the Kconfig or via a defconfig.

Furthermore, there is some options that can't be built for some architecture. For instance, if you enable the ARM UART on x86 it will break the compilation. Do you expect the user to provide a valid defconfig? Or shall we add dependencies in the Kconfig?

Regards,

Signature · 1 line
Julien Grall
#63 lore raw
Quoted 19 lines · Julien Grall

Hi Doug,

Quoted 6 lines · Doug Goldstein

Ultimately my goal is to allow for more parts of the hypervisor to be turned
off at compile time and potentially make it easier to include more experimental features by others which can be turned off by default. Also to
provide the one true location for all possible knobs in the source code.

I gave a quick look to this series and noticed that a lots of HAS_* which were enable for ARM platform before is now disabled by default. I have in mind the UART drivers and GICv3.

While I agree that disabling unnecessary driver in Xen is nice to have, the user should not see any difference with and without series. By that I mean that if the GICv3 is enabled on ARM64, it should stay enabled by default either in the Kconfig or via a defconfig.

Quoted 4 lines

Furthermore, there is some options that can't be built for some architecture. For instance, if you enable the ARM UART on x86 it will break the compilation. Do you expect the user to provide a valid defconfig? Or shall we add dependencies in the Kconfig?

We should definitely put dependencies in Kconfig.

The default build should have as much turned on as sensible (i.e. all features, but not the custom debugging options)

~Andrew

#64 lore raw
In reply to Doug Goldstein
Quoted 4 lines · Doug Goldstein

Ultimately my goal is to allow for more parts of the hypervisor to be turned off at compile time and potentially make it easier to include more experimental features by others which can be turned off by default. Also to provide the one true location for all possible knobs in the source code.

I'm OK with the switch to Kconfig generally but I'd like us to start with a conversion which offers the exact same set of options as exist today in the Makefile (i.e. not very many at all) and where the use of select and etc means that anyone who asks Kconfig to generate the default config (i.e. not an explicit defconfig file) will produce a binary with the exact same feature set as today. (Sorry if I misunderstood whether that is the goal with this initial series vs. your ultimate goal)

IOW we start by treating Kconfig as a better way for _developers_ to control the configuration of Xen at compile time than adding and removing #defines (i.e. the one true location thing you mention) but not (yet) as a way to let users produce a wide variety of different images.

Then we can start to consider patches which make options available for users, on a case by case basis.

Maybe those options should be behind some sort of dependency gate which means that explicit action is needed in order to deviating from the defaults such that it is acknowledged by the user that they have done so and that such configurations may not even build let alone work.

I'd also like to propose that we consider having a strict requirement for patches to the test infrastructure to exercise any new user-facing option before we accept the patch implementing it.

What I don't want to see is fragmentation where every distro does something subtly different or normal users ending up with different configurations to the norm. By "normal users" I mean those without specialised requirements or environments who aren't willing/able to support their decision to step off the beaten path.

Ian.

#65 lore raw
Quoted 31 lines · Ian Campbell
Quoted 4 lines · Doug Goldstein

Ultimately my goal is to allow for more parts of the hypervisor to be turned off at compile time and potentially make it easier to include more experimental features by others which can be turned off by default. Also to provide the one true location for all possible knobs in the source code.

I'm OK with the switch to Kconfig generally but I'd like us to start with a conversion which offers the exact same set of options as exist today in the Makefile (i.e. not very many at all) and where the use of select and etc means that anyone who asks Kconfig to generate the default config (i.e. not an explicit defconfig file) will produce a binary with the exact same feature set as today. (Sorry if I misunderstood whether that is the goal with this initial series vs. your ultimate goal)

IOW we start by treating Kconfig as a better way for _developers_ to control the configuration of Xen at compile time than adding and removing #defines (i.e. the one true location thing you mention) but not (yet) as a way to let users produce a wide variety of different images.

Then we can start to consider patches which make options available for users, on a case by case basis.

Maybe those options should be behind some sort of dependency gate which means that explicit action is needed in order to deviating from the defaults such that it is acknowledged by the user that they have done so and that such configurations may not even build let alone work.

I'd also like to propose that we consider having a strict requirement for patches to the test infrastructure to exercise any new user-facing option before we accept the patch implementing it.

Quoted 8 lines

What I don't want to see is fragmentation where every distro does something subtly different or normal users ending up with different configurations to the norm. By "normal users" I mean those without specialised requirements or environments who aren't willing/able to support their decision to step off the beaten path.

Ian.

Ian,

You stated this better than I did. My goal is not to necessarily make this like the Linux kernel where users toggle on different bits at a whim but more for developers and companies shipping Xen, basically those with specialized environments could use this to upstream more code and have it disabled by default.

The current patchset only exposes KEXEC as a user facing option because its currently a user facing option in the source tree. I would not expand the list of user facing options past that. I consider adding more outside of the scope of this work and something that would happen after this series lands on a case by case basis.

My ultimate goal with this initial work is to get all the developer knobs in one place because currently they are spread around as Makefile defines or defines in a header file and get a little bit of code comments around them.

Signature · 1 line
Doug Goldstein

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#66 lore raw
Quoted 5 lines · Doug Goldstein

You stated this better than I did. My goal is not to necessarily make this like the Linux kernel where users toggle on different bits at a whim but more for developers and companies shipping Xen, basically those with specialized environments could use this to upstream more code and have it disabled by default.

This last bit will need some care and consideration, since such options are liable to lead to the sort of fragmentation I'm worried about i.e. people thinking they can turn them on outside the specialized environments and be supported in doing so. But I think we can deal with that after this initial transition. It should dovetail quite nicely with the "feature lifecycle" stuff being discussed elsewhere.

Quoted 10 lines

The current patchset only exposes KEXEC as a user facing option because its currently a user facing option in the source tree. I would not expand the list of user facing options past that. I consider adding more outside of the scope of this work and something that would happen after this series lands on a case by case basis.

My ultimate goal with this initial work is to get all the developer knobs in one place because currently they are spread around as Makefile defines or defines in a header file and get a little bit of code comments around them.

Great!

Ian.

#67 lore raw
Quoted 20 lines · Ian Campbell
Quoted 5 lines · Doug Goldstein

You stated this better than I did. My goal is not to necessarily make this like the Linux kernel where users toggle on different bits at a whim but more for developers and companies shipping Xen, basically those with specialized environments could use this to upstream more code and have it disabled by default.

This last bit will need some care and consideration, since such options are liable to lead to the sort of fragmentation I'm worried about i.e. people thinking they can turn them on outside the specialized environments and be supported in doing so. But I think we can deal with that after this initial transition. It should dovetail quite nicely with the "feature lifecycle" stuff being discussed elsewhere.

Quoted 6 lines

The current patchset only exposes KEXEC as a user facing option because its currently a user facing option in the source tree. I would not expand the list of user facing options past that. I consider adding more outside of the scope of this work and something that would happen after this series lands on a case by case basis.

Quoted 6 lines
Quoted 4 lines

My ultimate goal with this initial work is to get all the developer knobs in one place because currently they are spread around as Makefile defines or defines in a header file and get a little bit of code comments around them.

Great!

Sooo is there another patchset on its way? I was thinking to base some of the xSplice development on this, and also make tmem configurable as well.

Quoted 7 lines

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#68 lore raw
Quoted 26 lines · Konrad Rzeszutek Wilk
Quoted 25 lines · Ian Campbell
Quoted 5 lines · Doug Goldstein

You stated this better than I did. My goal is not to necessarily make this like the Linux kernel where users toggle on different bits at a whim but more for developers and companies shipping Xen, basically those with specialized environments could use this to upstream more code and have it disabled by default.

This last bit will need some care and consideration, since such options are liable to lead to the sort of fragmentation I'm worried about i.e. people thinking they can turn them on outside the specialized environments and be supported in doing so. But I think we can deal with that after this initial transition. It should dovetail quite nicely with the "feature lifecycle" stuff being discussed elsewhere.

Quoted 10 lines

The current patchset only exposes KEXEC as a user facing option because its currently a user facing option in the source tree. I would not expand the list of user facing options past that. I consider adding more outside of the scope of this work and something that would happen after this series lands on a case by case basis.

My ultimate goal with this initial work is to get all the developer knobs in one place because currently they are spread around as Makefile defines or defines in a header file and get a little bit of code comments around them.

Quoted 5 lines
Quoted 1 line

Great!

Sooo is there another patchset on its way? I was thinking to base some of the xSplice development on this, and also make tmem configurable as well.

Yes. Apologizes on the delay. I'll get on it today.

Signature · 1 line
Doug Goldstein

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel