[to-be-updated] kbuild-consolidate-header-generation-from-asm-offset-information.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: kbuild: consolidate header generation from ASM offset information
has been removed from the -mm tree.  Its filename was
     kbuild-consolidate-header-generation-from-asm-offset-information.patch

This patch was dropped because an updated version will be merged

------------------------------------------------------
From: Matthias Kaehlcke <mka@xxxxxxxxxxxx>
Subject: kbuild: consolidate header generation from ASM offset information

Largely redundant code is used in different places to generate C headers
from offset information extracted from assembly language output. 
Consolidate the code in a Makefile include and use this instead.

Link: http://lkml.kernel.org/r/20170403193739.84905-1-mka@xxxxxxxxxxxx
Signed-off-by: Matthias Kaehlcke <mka@xxxxxxxxxxxx>
Cc: Tony Luck <tony.luck@xxxxxxxxx>
Cc: Fenghua Yu <fenghua.yu@xxxxxxxxx>
Cc: Michal Marek <mmarek@xxxxxxxx>
Cc: Jan Kiszka <jan.kiszka@xxxxxxxxxxx>
Cc: Kieran Bingham <kieran.bingham@xxxxxxxxxx>
Cc: Grant Grundler <grundler@xxxxxxxxxxxx>
Cc: Michael Davidson <md@xxxxxxxxxx>
Cc: Greg Hackmann <ghackmann@xxxxxxxxxx>
Cc: Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 Kbuild                       |   21 ++-------------------
 arch/ia64/kernel/Makefile    |   19 +++----------------
 scripts/Makefile.asm-offsets |   22 ++++++++++++++++++++++
 scripts/mod/Makefile         |   21 ++-------------------
 4 files changed, 29 insertions(+), 54 deletions(-)

diff -puN Kbuild~kbuild-consolidate-header-generation-from-asm-offset-information Kbuild
--- a/Kbuild~kbuild-consolidate-header-generation-from-asm-offset-information
+++ a/Kbuild
@@ -7,29 +7,12 @@
 # 4) Check for missing system calls
 # 5) Generate constants.py (may need bounds.h)
 
-# Default sed regexp - multiline due to syntax constraints
-define sed-y
-	"/^->/{s:->#\(.*\):/* \1 */:; \
-	s:^->\([^ ]*\) [\$$#]*\([-0-9]*\) \(.*\):#define \1 \2 /* \3 */:; \
-	s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \
-	s:->::; p;}"
-endef
+include scripts/Makefile.asm-offsets
 
 # Use filechk to avoid rebuilds when a header changes, but the resulting file
 # does not
 define filechk_offsets
-	(set -e; \
-	 echo "#ifndef $2"; \
-	 echo "#define $2"; \
-	 echo "/*"; \
-	 echo " * DO NOT MODIFY."; \
-	 echo " *"; \
-	 echo " * This file was generated by Kbuild"; \
-	 echo " */"; \
-	 echo ""; \
-	 sed -ne $(sed-y); \
-	 echo ""; \
-	 echo "#endif" )
+	$(call gen_header_from_asm_offsets,$2)
 endef
 
 #####
diff -puN arch/ia64/kernel/Makefile~kbuild-consolidate-header-generation-from-asm-offset-information arch/ia64/kernel/Makefile
--- a/arch/ia64/kernel/Makefile~kbuild-consolidate-header-generation-from-asm-offset-information
+++ a/arch/ia64/kernel/Makefile
@@ -50,25 +50,12 @@ CFLAGS_traps.o  += -mfixed-range=f2-f5,f
 # The gate DSO image is built using a special linker script.
 include $(src)/Makefile.gate
 
+include $(srctree)/scripts/Makefile.asm-offsets
+
 # Calculate NR_IRQ = max(IA64_NATIVE_NR_IRQS, XEN_NR_IRQS, ...) based on config
-define sed-y
-	"/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"
-endef
 quiet_cmd_nr_irqs = GEN     $@
 define cmd_nr_irqs
-	(set -e; \
-	 echo "#ifndef __ASM_NR_IRQS_H__"; \
-	 echo "#define __ASM_NR_IRQS_H__"; \
-	 echo "/*"; \
-	 echo " * DO NOT MODIFY."; \
-	 echo " *"; \
-	 echo " * This file was generated by Kbuild"; \
-	 echo " *"; \
-	 echo " */"; \
-	 echo ""; \
-	 sed -ne $(sed-y) $<; \
-	 echo ""; \
-	 echo "#endif" ) > $@
+	$(call gen_header_from_asm_offsets,__ASM_NR_IRQS_H__) < $< > $@
 endef
 
 # We use internal kbuild rules to avoid the "is up to date" message from make
diff -puN /dev/null scripts/Makefile.asm-offsets
--- /dev/null
+++ a/scripts/Makefile.asm-offsets
@@ -0,0 +1,22 @@
+# Default sed regexp - multiline due to syntax constraints
+define sed-asm-offsets-to-c
+	"/^->/{s:->#\(.*\):/* \1 */:; \
+	s:^->\([^ ]*\) [\$$#]*\([-0-9]*\) \(.*\):#define \1 \2 /* \3 */:; \
+	s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \
+	s:->::; p;}"
+endef
+
+define gen_header_from_asm_offsets
+	(set -e; \
+	 echo "#ifndef $1"; \
+	 echo "#define $1"; \
+	 echo "/*"; \
+	 echo " * DO NOT MODIFY."; \
+	 echo " *"; \
+	 echo " * This file was generated by Kbuild"; \
+	 echo " */"; \
+	 echo ""; \
+	 sed -ne $(sed-asm-offsets-to-c); \
+	 echo ""; \
+	 echo "#endif" )
+endef
diff -puN scripts/mod/Makefile~kbuild-consolidate-header-generation-from-asm-offset-information scripts/mod/Makefile
--- a/scripts/mod/Makefile~kbuild-consolidate-header-generation-from-asm-offset-information
+++ a/scripts/mod/Makefile
@@ -7,28 +7,11 @@ modpost-objs	:= modpost.o file2alias.o s
 
 devicetable-offsets-file := devicetable-offsets.h
 
-define sed-y
-	"/^->/{s:->#\(.*\):/* \1 */:; \
-	s:^->\([^ ]*\) [\$$#]*\([-0-9]*\) \(.*\):#define \1 \2 /* \3 */:; \
-	s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \
-	s:->::; p;}"
-endef
+include $(srctree)/scripts/Makefile.asm-offsets
 
 quiet_cmd_offsets = GEN     $@
 define cmd_offsets
-	(set -e; \
-	 echo "#ifndef __DEVICETABLE_OFFSETS_H__"; \
-	 echo "#define __DEVICETABLE_OFFSETS_H__"; \
-	 echo "/*"; \
-	 echo " * DO NOT MODIFY."; \
-	 echo " *"; \
-	 echo " * This file was generated by Kbuild"; \
-	 echo " *"; \
-	 echo " */"; \
-	 echo ""; \
-	 sed -ne $(sed-y) $<; \
-	 echo ""; \
-	 echo "#endif" ) > $@
+	$(call gen_header_from_asm_offsets,__DEVICETABLE_OFFSETS_H__) < $< > $@
 endef
 
 $(obj)/$(devicetable-offsets-file): $(obj)/devicetable-offsets.s
_

Patches currently in -mm which might be from mka@xxxxxxxxxxxx are

jiffiesh-declare-jiffies-and-jiffies_64-with-____cacheline_aligned_in_smp.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux