Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild

* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild:
scsi: fix dependency bug in aic7 Makefile
kbuild: add svn revision information to setlocalversion
kbuild: do not warn about __*init/__*exit symbols being exported
Move Kconfig.instrumentation to arch/Kconfig and init/Kconfig
Add HAVE_KPROBES
Add HAVE_OPROFILE
Create arch/Kconfig
Fix ARM to play nicely with generic Instrumentation menu
kconfig: ignore select of unknown symbol
kconfig: mark config as changed when loading an alternate config
kbuild: Spelling/grammar fixes for config DEBUG_SECTION_MISMATCH
Remove __INIT_REFOK and __INITDATA_REFOK
kbuild: print only total number of section mismatces found

+122 -194
+31
arch/Kconfig
··· 1 + # 2 + # General architecture dependent options 3 + # 4 + 5 + config OPROFILE 6 + tristate "OProfile system profiling (EXPERIMENTAL)" 7 + depends on PROFILING 8 + depends on HAVE_OPROFILE 9 + help 10 + OProfile is a profiling system capable of profiling the 11 + whole system, include the kernel, kernel modules, libraries, 12 + and applications. 13 + 14 + If unsure, say N. 15 + 16 + config HAVE_OPROFILE 17 + def_bool n 18 + 19 + config KPROBES 20 + bool "Kprobes" 21 + depends on KALLSYMS && MODULES 22 + depends on HAVE_KPROBES 23 + help 24 + Kprobes allows you to trap at almost any kernel address and 25 + execute a callback function. register_kprobe() establishes 26 + a probepoint and specifies the callback. Kprobes is useful 27 + for kernel debugging, non-intrusive instrumentation and testing. 28 + If in doubt, say "N". 29 + 30 + config HAVE_KPROBES 31 + def_bool n
+1 -2
arch/alpha/Kconfig
··· 5 5 config ALPHA 6 6 bool 7 7 default y 8 + select HAVE_OPROFILE 8 9 help 9 10 The Alpha is a 64-bit general-purpose processor designed and 10 11 marketed by the Digital Equipment Corporation of blessed memory, ··· 649 648 source "drivers/Kconfig" 650 649 651 650 source "fs/Kconfig" 652 - 653 - source "kernel/Kconfig.instrumentation" 654 651 655 652 source "arch/alpha/Kconfig.debug" 656 653
+19 -2
arch/arm/Kconfig
··· 10 10 default y 11 11 select RTC_LIB 12 12 select SYS_SUPPORTS_APM_EMULATION 13 + select HAVE_OPROFILE 14 + select HAVE_KPROBES if (!XIP_KERNEL) 13 15 help 14 16 The ARM series is a line of low-power-consumption RISC chip designs 15 17 licensed by ARM Ltd and targeted at embedded applications and ··· 136 134 137 135 config ARCH_MTD_XIP 138 136 bool 137 + 138 + if OPROFILE 139 + 140 + config OPROFILE_ARMV6 141 + def_bool y 142 + depends on CPU_V6 && !SMP 143 + select OPROFILE_ARM11_CORE 144 + 145 + config OPROFILE_MPCORE 146 + def_bool y 147 + depends on CPU_V6 && SMP 148 + select OPROFILE_ARM11_CORE 149 + 150 + config OPROFILE_ARM11_CORE 151 + bool 152 + 153 + endif 139 154 140 155 config VECTORS_BASE 141 156 hex ··· 1146 1127 endmenu 1147 1128 1148 1129 source "fs/Kconfig" 1149 - 1150 - source "arch/arm/Kconfig.instrumentation" 1151 1130 1152 1131 source "arch/arm/Kconfig.debug" 1153 1132
-62
arch/arm/Kconfig.instrumentation
··· 1 - menuconfig INSTRUMENTATION 2 - bool "Instrumentation Support" 3 - default y 4 - ---help--- 5 - Say Y here to get to see options related to performance measurement, 6 - system-wide debugging, and testing. This option alone does not add any 7 - kernel code. 8 - 9 - If you say N, all options in this submenu will be skipped and 10 - disabled. If you're trying to debug the kernel itself, go see the 11 - Kernel Hacking menu. 12 - 13 - if INSTRUMENTATION 14 - 15 - config PROFILING 16 - bool "Profiling support (EXPERIMENTAL)" 17 - help 18 - Say Y here to enable the extended profiling support mechanisms used 19 - by profilers such as OProfile. 20 - 21 - config OPROFILE 22 - tristate "OProfile system profiling (EXPERIMENTAL)" 23 - depends on PROFILING && !UML 24 - help 25 - OProfile is a profiling system capable of profiling the 26 - whole system, include the kernel, kernel modules, libraries, 27 - and applications. 28 - 29 - If unsure, say N. 30 - 31 - config OPROFILE_ARMV6 32 - bool 33 - depends on OPROFILE && CPU_V6 && !SMP 34 - default y 35 - select OPROFILE_ARM11_CORE 36 - 37 - config OPROFILE_MPCORE 38 - bool 39 - depends on OPROFILE && CPU_V6 && SMP 40 - default y 41 - select OPROFILE_ARM11_CORE 42 - 43 - config OPROFILE_ARM11_CORE 44 - bool 45 - 46 - config KPROBES 47 - bool "Kprobes" 48 - depends on KALLSYMS && MODULES && !UML && !XIP_KERNEL 49 - help 50 - Kprobes allows you to trap at almost any kernel address and 51 - execute a callback function. register_kprobe() establishes 52 - a probepoint and specifies the callback. Kprobes is useful 53 - for kernel debugging, non-intrusive instrumentation and testing. 54 - If in doubt, say "N". 55 - 56 - config MARKERS 57 - bool "Activate markers" 58 - help 59 - Place an empty function call at each marker site. Can be 60 - dynamically changed for a probe function. 61 - 62 - endif # INSTRUMENTATION
+2 -3
arch/avr32/Kconfig
··· 10 10 # With EMBEDDED=n, we get lots of stuff automatically selected 11 11 # that we usually don't need on AVR32. 12 12 select EMBEDDED 13 + select HAVE_OPROFILE 14 + select HAVE_KPROBES 13 15 help 14 16 AVR32 is a high-performance 32-bit RISC microprocessor core, 15 17 designed for cost-sensitive embedded applications, with particular ··· 55 53 56 54 config ARCH_HAS_ILOG2_U64 57 55 def_bool n 58 - 59 - config ARCH_SUPPORTS_OPROFILE 60 - def_bool y 61 56 62 57 config GENERIC_HWEIGHT 63 58 def_bool y
+1 -2
arch/blackfin/Kconfig
··· 24 24 config BLACKFIN 25 25 bool 26 26 default y 27 + select HAVE_OPROFILE 27 28 28 29 config ZONE_DMA 29 30 bool ··· 973 972 source "drivers/Kconfig" 974 973 975 974 source "fs/Kconfig" 976 - 977 - source "kernel/Kconfig.instrumentation" 978 975 979 976 source "arch/blackfin/Kconfig.debug" 980 977
-2
arch/cris/Kconfig
··· 213 213 214 214 source "drivers/usb/Kconfig" 215 215 216 - source "kernel/Kconfig.instrumentation" 217 - 218 216 source "arch/cris/Kconfig.debug" 219 217 220 218 source "security/Kconfig"
-2
arch/frv/Kconfig
··· 375 375 376 376 source "fs/Kconfig" 377 377 378 - source "kernel/Kconfig.instrumentation" 379 - 380 378 source "arch/frv/Kconfig.debug" 381 379 382 380 source "security/Kconfig"
-2
arch/h8300/Kconfig
··· 223 223 224 224 source "fs/Kconfig" 225 225 226 - source "kernel/Kconfig.instrumentation" 227 - 228 226 source "arch/h8300/Kconfig.debug" 229 227 230 228 source "security/Kconfig"
+2 -2
arch/ia64/Kconfig
··· 15 15 select ACPI if (!IA64_HP_SIM) 16 16 select PM if (!IA64_HP_SIM) 17 17 select ARCH_SUPPORTS_MSI 18 + select HAVE_OPROFILE 19 + select HAVE_KPROBES 18 20 default y 19 21 help 20 22 The Itanium Processor Family is Intel's 64-bit successor to ··· 601 599 default y 602 600 603 601 source "arch/ia64/hp/sim/Kconfig" 604 - 605 - source "kernel/Kconfig.instrumentation" 606 602 607 603 source "arch/ia64/Kconfig.debug" 608 604
+1 -2
arch/m32r/Kconfig
··· 8 8 config M32R 9 9 bool 10 10 default y 11 + select HAVE_OPROFILE 11 12 12 13 config SBUS 13 14 bool ··· 426 425 source "drivers/Kconfig" 427 426 428 427 source "fs/Kconfig" 429 - 430 - source "kernel/Kconfig.instrumentation" 431 428 432 429 source "arch/m32r/Kconfig.debug" 433 430
-2
arch/m68k/Kconfig
··· 678 678 679 679 source "fs/Kconfig" 680 680 681 - source "kernel/Kconfig.instrumentation" 682 - 683 681 source "arch/m68k/Kconfig.debug" 684 682 685 683 source "security/Kconfig"
-2
arch/m68knommu/Kconfig
··· 711 711 712 712 source "fs/Kconfig" 713 713 714 - source "kernel/Kconfig.instrumentation" 715 - 716 714 source "arch/m68knommu/Kconfig.debug" 717 715 718 716 source "security/Kconfig"
+1 -2
arch/mips/Kconfig
··· 1 1 config MIPS 2 2 bool 3 3 default y 4 + select HAVE_OPROFILE 4 5 # Horrible source of confusion. Die, die, die ... 5 6 select EMBEDDED 6 7 select RTC_LIB ··· 2095 2094 source "drivers/Kconfig" 2096 2095 2097 2096 source "fs/Kconfig" 2098 - 2099 - source "kernel/Kconfig.instrumentation" 2100 2097 2101 2098 source "arch/mips/Kconfig.debug" 2102 2099
+1 -2
arch/parisc/Kconfig
··· 7 7 8 8 config PARISC 9 9 def_bool y 10 + select HAVE_OPROFILE 10 11 help 11 12 The PA-RISC microprocessor is designed by Hewlett-Packard and used 12 13 in many of their workstations & servers (HP9000 700 and 800 series, ··· 272 271 source "drivers/Kconfig" 273 272 274 273 source "fs/Kconfig" 275 - 276 - source "kernel/Kconfig.instrumentation" 277 274 278 275 source "arch/parisc/Kconfig.debug" 279 276
+2 -2
arch/powerpc/Kconfig
··· 87 87 config PPC 88 88 bool 89 89 default y 90 + select HAVE_OPROFILE 91 + select HAVE_KPROBES 90 92 91 93 config EARLY_PRINTK 92 94 bool ··· 714 712 source "arch/powerpc/sysdev/qe_lib/Kconfig" 715 713 716 714 source "lib/Kconfig" 717 - 718 - source "kernel/Kconfig.instrumentation" 719 715 720 716 source "arch/powerpc/Kconfig.debug" 721 717
+2 -2
arch/ppc/Kconfig
··· 42 42 config PPC 43 43 bool 44 44 default y 45 + select HAVE_OPROFILE 46 + select HAVE_KPROBES 45 47 46 48 config PPC32 47 49 bool ··· 1257 1255 endmenu 1258 1256 1259 1257 source "lib/Kconfig" 1260 - 1261 - source "kernel/Kconfig.instrumentation" 1262 1258 1263 1259 source "arch/ppc/Kconfig.debug" 1264 1260
+2 -2
arch/s390/Kconfig
··· 51 51 52 52 config S390 53 53 def_bool y 54 + select HAVE_OPROFILE 55 + select HAVE_KPROBES 54 56 55 57 source "init/Kconfig" 56 58 ··· 527 525 source "drivers/Kconfig" 528 526 529 527 source "fs/Kconfig" 530 - 531 - source "kernel/Kconfig.instrumentation" 532 528 533 529 source "arch/s390/Kconfig.debug" 534 530
+1 -2
arch/sh/Kconfig
··· 8 8 config SUPERH 9 9 def_bool y 10 10 select EMBEDDED 11 + select HAVE_OPROFILE 11 12 help 12 13 The SuperH is a RISC processor targeted for use in embedded systems 13 14 and consumer electronics; it was also used in the Sega Dreamcast ··· 896 895 source "drivers/Kconfig" 897 896 898 897 source "fs/Kconfig" 899 - 900 - source "kernel/Kconfig.instrumentation" 901 898 902 899 source "arch/sh/Kconfig.debug" 903 900
+1 -2
arch/sparc/Kconfig
··· 63 63 config SPARC 64 64 bool 65 65 default y 66 + select HAVE_OPROFILE 66 67 67 68 # Identify this as a Sparc32 build 68 69 config SPARC32 ··· 320 319 endmenu 321 320 322 321 source "fs/Kconfig" 323 - 324 - source "kernel/Kconfig.instrumentation" 325 322 326 323 source "arch/sparc/Kconfig.debug" 327 324
+2 -2
arch/sparc64/Kconfig
··· 8 8 config SPARC 9 9 bool 10 10 default y 11 + select HAVE_OPROFILE 12 + select HAVE_KPROBES 11 13 12 14 config SPARC64 13 15 bool ··· 466 464 source "drivers/sbus/char/Kconfig" 467 465 468 466 source "fs/Kconfig" 469 - 470 - source "kernel/Kconfig.instrumentation" 471 467 472 468 source "arch/sparc64/Kconfig.debug" 473 469
-2
arch/um/Kconfig
··· 289 289 bool 290 290 default n 291 291 292 - source "kernel/Kconfig.instrumentation" 293 - 294 292 source "arch/um/Kconfig.debug"
-2
arch/v850/Kconfig
··· 331 331 332 332 source "drivers/usb/Kconfig" 333 333 334 - source "kernel/Kconfig.instrumentation" 335 - 336 334 source "arch/v850/Kconfig.debug" 337 335 338 336 source "security/Kconfig"
+2 -6
arch/x86/Kconfig
··· 18 18 ### Arch settings 19 19 config X86 20 20 def_bool y 21 + select HAVE_OPROFILE 22 + select HAVE_KPROBES 21 23 22 24 config GENERIC_LOCKBREAK 23 25 def_bool n ··· 107 105 108 106 config HAVE_SETUP_PER_CPU_AREA 109 107 def_bool X86_64 110 - 111 - config ARCH_SUPPORTS_OPROFILE 112 - bool 113 - default y 114 108 115 109 select HAVE_KVM 116 110 ··· 1594 1596 source "drivers/firmware/Kconfig" 1595 1597 1596 1598 source "fs/Kconfig" 1597 - 1598 - source "kernel/Kconfig.instrumentation" 1599 1599 1600 1600 source "arch/x86/Kconfig.debug" 1601 1601
-2
arch/xtensa/Kconfig
··· 246 246 provide one yourself. 247 247 endmenu 248 248 249 - source "kernel/Kconfig.instrumentation" 250 - 251 249 source "arch/xtensa/Kconfig.debug" 252 250 253 251 source "security/Kconfig"
+2 -7
drivers/scsi/aic7xxx/Makefile
··· 44 44 45 45 # Dependencies for generated files need to be listed explicitly 46 46 47 - $(obj)/aic7xxx_core.o: $(obj)/aic7xxx_seq.h 48 - $(obj)/aic7xxx_core.o: $(obj)/aic7xxx_reg.h 49 - $(obj)/aic79xx_core.o: $(obj)/aic79xx_seq.h 50 - $(obj)/aic79xx_core.o: $(obj)/aic79xx_reg.h 51 - 52 - $(addprefix $(obj)/,$(aic7xxx-y)): $(obj)/aic7xxx_seq.h 53 - $(addprefix $(obj)/,$(aic79xx-y)): $(obj)/aic79xx_seq.h 47 + $(addprefix $(src)/,$(aic7xxx-y:.o=.c)): $(obj)/aic7xxx_seq.h $(obj)/aic7xxx_reg.h 48 + $(addprefix $(src)/,$(aic79xx-y:.o=.c)): $(obj)/aic79xx_seq.h $(obj)/aic79xx_reg.h 54 49 55 50 aic7xxx-gen-$(CONFIG_AIC7XXX_BUILD_FIRMWARE) := $(obj)/aic7xxx_reg.h 56 51 aic7xxx-gen-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT) += $(obj)/aic7xxx_reg_print.c
-3
include/linux/init.h
··· 124 124 #define __REF .section ".ref.text", "ax" 125 125 #define __REFDATA .section ".ref.data", "aw" 126 126 #define __REFCONST .section ".ref.rodata", "aw" 127 - /* backward compatibility */ 128 - #define __INIT_REFOK .section __REF 129 - #define __INITDATA_REFOK .section __REFDATA 130 127 131 128 #ifndef __ASSEMBLY__ 132 129 /*
+14
init/Kconfig
··· 665 665 666 666 endchoice 667 667 668 + config PROFILING 669 + bool "Profiling support (EXPERIMENTAL)" 670 + help 671 + Say Y here to enable the extended profiling support mechanisms used 672 + by profilers such as OProfile. 673 + 674 + config MARKERS 675 + bool "Activate markers" 676 + help 677 + Place an empty function call at each marker site. Can be 678 + dynamically changed for a probe function. 679 + 680 + source "arch/Kconfig" 681 + 668 682 endmenu # General setup 669 683 670 684 config SLABINFO
-49
kernel/Kconfig.instrumentation
··· 1 - menuconfig INSTRUMENTATION 2 - bool "Instrumentation Support" 3 - default y 4 - ---help--- 5 - Say Y here to get to see options related to performance measurement, 6 - system-wide debugging, and testing. This option alone does not add any 7 - kernel code. 8 - 9 - If you say N, all options in this submenu will be skipped and 10 - disabled. If you're trying to debug the kernel itself, go see the 11 - Kernel Hacking menu. 12 - 13 - if INSTRUMENTATION 14 - 15 - config PROFILING 16 - bool "Profiling support (EXPERIMENTAL)" 17 - help 18 - Say Y here to enable the extended profiling support mechanisms used 19 - by profilers such as OProfile. 20 - 21 - config OPROFILE 22 - tristate "OProfile system profiling (EXPERIMENTAL)" 23 - depends on PROFILING && !UML 24 - depends on ARCH_SUPPORTS_OPROFILE || ALPHA || ARM || BLACKFIN || IA64 || M32R || PARISC || PPC || S390 || SUPERH || SPARC 25 - help 26 - OProfile is a profiling system capable of profiling the 27 - whole system, include the kernel, kernel modules, libraries, 28 - and applications. 29 - 30 - If unsure, say N. 31 - 32 - config KPROBES 33 - bool "Kprobes" 34 - depends on KALLSYMS && MODULES && !UML 35 - depends on X86_32 || IA64 || PPC || S390 || SPARC64 || X86_64 || AVR32 36 - help 37 - Kprobes allows you to trap at almost any kernel address and 38 - execute a callback function. register_kprobe() establishes 39 - a probepoint and specifies the callback. Kprobes is useful 40 - for kernel debugging, non-intrusive instrumentation and testing. 41 - If in doubt, say "N". 42 - 43 - config MARKERS 44 - bool "Activate markers" 45 - help 46 - Place an empty function call at each marker site. Can be 47 - dynamically changed for a probe function. 48 - 49 - endif # INSTRUMENTATION
+7 -7
lib/Kconfig.debug
··· 81 81 82 82 config DEBUG_SECTION_MISMATCH 83 83 bool "Enable full Section mismatch analysis" 84 - default n 84 + depends on UNDEFINED 85 85 help 86 86 The section mismatch analysis checks if there are illegal 87 87 references from one section to another section. ··· 90 90 most likely result in an oops. 91 91 In the code functions and variables are annotated with 92 92 __init, __devinit etc. (see full list in include/linux/init.h) 93 - which result in the code/data being placed in specific sections. 94 - The section mismatch anaylsis are always done after a full 95 - kernel build but enabling this options will in addition 93 + which results in the code/data being placed in specific sections. 94 + The section mismatch analysis is always done after a full 95 + kernel build but enabling this option will in addition 96 96 do the following: 97 97 - Add the option -fno-inline-functions-called-once to gcc 98 98 When inlining a function annotated __init in a non-init 99 - function we would loose the section information and thus 99 + function we would lose the section information and thus 100 100 the analysis would not catch the illegal reference. 101 - This options tell gcc to inline less but will also 101 + This option tells gcc to inline less but will also 102 102 result in a larger kernel. 103 103 - Run the section mismatch analysis for each module/built-in.o 104 104 When we run the section mismatch analysis on vmlinux.o we 105 - looses valueable information about where the mismatch was 105 + lose valueble information about where the mismatch was 106 106 introduced. 107 107 Running the analysis for each module/built-in.o file 108 108 will tell where the mismatch happens much closer to the
+1
scripts/kconfig/mconf.c
··· 821 821 return; 822 822 if (!conf_read(dialog_input_result)) { 823 823 set_config_filename(dialog_input_result); 824 + sym_set_change_count(1); 824 825 return; 825 826 } 826 827 show_textbox(NULL, _("File does not exist!"), 5, 38);
+3 -6
scripts/kconfig/menu.c
··· 203 203 prop_warn(prop, 204 204 "config symbol '%s' uses select, but is " 205 205 "not boolean or tristate", sym->name); 206 - else if (sym2->type == S_UNKNOWN) 207 - prop_warn(prop, 208 - "'select' used by config symbol '%s' " 209 - "refers to undefined symbol '%s'", 210 - sym->name, sym2->name); 211 - else if (sym2->type != S_BOOLEAN && sym2->type != S_TRISTATE) 206 + else if (sym2->type != S_UNKNOWN && 207 + sym2->type != S_BOOLEAN && 208 + sym2->type != S_TRISTATE) 212 209 prop_warn(prop, 213 210 "'%s' has wrong type. 'select' only " 214 211 "accept arguments of boolean and "
+8 -9
scripts/mod/modpost.c
··· 870 870 /* Do not export init/exit functions or data */ 871 871 { 872 872 .fromsec = { "__ksymtab*", NULL }, 873 - .tosec = { ALL_INIT_SECTIONS, ALL_EXIT_SECTIONS, NULL }, 873 + .tosec = { INIT_SECTIONS, EXIT_SECTIONS, NULL }, 874 874 .mismatch = EXPORT_TO_INIT_EXIT 875 875 } 876 876 }; ··· 1125 1125 to = to_is_func ? "function" : "variable"; 1126 1126 to_p = to_is_func ? "()" : ""; 1127 1127 1128 + sec_mismatch_count++; 1129 + if (!sec_mismatch_verbose) 1130 + return; 1131 + 1128 1132 fprintf(stderr, "WARNING: %s(%s+0x%llx): Section mismatch in" 1129 1133 " reference from the %s %s%s to the %s %s:%s%s\n", 1130 1134 modname, fromsec, fromaddr, from, fromsym, from_p, 1131 1135 to, tosec, tosym, to_p); 1132 - 1133 - sec_mismatch_count++; 1134 - if (!sec_mismatch_verbose) 1135 - return; 1136 1136 1137 1137 switch (mismatch) { 1138 1138 case TEXT_TO_INIT: ··· 1939 1939 write_dump(dump_write); 1940 1940 if (sec_mismatch_count && !sec_mismatch_verbose) 1941 1941 fprintf(stderr, "modpost: Found %d section mismatch(es).\n" 1942 - "To see additional details select \"Enable full " 1943 - "Section mismatch analysis\"\n" 1944 - "in the Kernel Hacking menu " 1945 - "(CONFIG_SECTION_MISMATCH).\n", sec_mismatch_count); 1942 + "To see full details build your kernel with:\n" 1943 + "'make CONFIG_DEBUG_SECTION_MISMATCH=y'\n", 1944 + sec_mismatch_count); 1946 1945 1947 1946 return err; 1948 1947 }
+16
scripts/setlocalversion
··· 45 45 # All done with mercurial 46 46 exit 47 47 fi 48 + 49 + # Check for svn and a svn repo. 50 + if rev=`svn info 2>/dev/null | grep '^Revision'`; then 51 + rev=`echo $rev | awk '{print $NF}'` 52 + changes=`svn status 2>/dev/null | grep '^[AMD]' | wc -l` 53 + 54 + # Are there uncommitted changes? 55 + if [ $changes != 0 ]; then 56 + printf -- '-svn%s%s%s' "$rev" -dirty "$changes" 57 + else 58 + printf -- '-svn%s' "$rev" 59 + fi 60 + 61 + # All done with svn 62 + exit 63 + fi