diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Kconfig.debug | 17 | ||||
-rw-r--r-- | lib/inflate.c | 2 | ||||
-rw-r--r-- | lib/vsprintf.c | 16 |
3 files changed, 25 insertions, 10 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 7dbd5d9c29a4..d57b12f59c8c 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -338,7 +338,7 @@ config SLUB_STATS | |||
338 | 338 | ||
339 | config DEBUG_KMEMLEAK | 339 | config DEBUG_KMEMLEAK |
340 | bool "Kernel memory leak detector" | 340 | bool "Kernel memory leak detector" |
341 | depends on DEBUG_KERNEL && EXPERIMENTAL && (X86 || ARM) && \ | 341 | depends on DEBUG_KERNEL && EXPERIMENTAL && (X86 || ARM || PPC) && \ |
342 | !MEMORY_HOTPLUG | 342 | !MEMORY_HOTPLUG |
343 | select DEBUG_FS if SYSFS | 343 | select DEBUG_FS if SYSFS |
344 | select STACKTRACE if STACKTRACE_SUPPORT | 344 | select STACKTRACE if STACKTRACE_SUPPORT |
@@ -805,6 +805,21 @@ config DEBUG_BLOCK_EXT_DEVT | |||
805 | 805 | ||
806 | Say N if you are unsure. | 806 | Say N if you are unsure. |
807 | 807 | ||
808 | config DEBUG_FORCE_WEAK_PER_CPU | ||
809 | bool "Force weak per-cpu definitions" | ||
810 | depends on DEBUG_KERNEL | ||
811 | help | ||
812 | s390 and alpha require percpu variables in modules to be | ||
813 | defined weak to work around addressing range issue which | ||
814 | puts the following two restrictions on percpu variable | ||
815 | definitions. | ||
816 | |||
817 | 1. percpu symbols must be unique whether static or not | ||
818 | 2. percpu variables can't be defined inside a function | ||
819 | |||
820 | To ensure that generic code follows the above rules, this | ||
821 | option forces all percpu variables to be defined as weak. | ||
822 | |||
808 | config LKDTM | 823 | config LKDTM |
809 | tristate "Linux Kernel Dump Test Tool Module" | 824 | tristate "Linux Kernel Dump Test Tool Module" |
810 | depends on DEBUG_KERNEL | 825 | depends on DEBUG_KERNEL |
diff --git a/lib/inflate.c b/lib/inflate.c index 1a8e8a978128..d10255973a9f 100644 --- a/lib/inflate.c +++ b/lib/inflate.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * Adapted for booting Linux by Hannu Savolainen 1993 | 7 | * Adapted for booting Linux by Hannu Savolainen 1993 |
8 | * based on gzip-1.0.3 | 8 | * based on gzip-1.0.3 |
9 | * | 9 | * |
10 | * Nicolas Pitre <nico@cam.org>, 1999/04/14 : | 10 | * Nicolas Pitre <nico@fluxnic.net>, 1999/04/14 : |
11 | * Little mods for all variable to reside either into rodata or bss segments | 11 | * Little mods for all variable to reside either into rodata or bss segments |
12 | * by marking constant variables with 'const' and initializing all the others | 12 | * by marking constant variables with 'const' and initializing all the others |
13 | * at run-time only. This allows for the kernel uncompressor to run | 13 | * at run-time only. This allows for the kernel uncompressor to run |
diff --git a/lib/vsprintf.c b/lib/vsprintf.c index cb8a112030bb..d320c1816a7b 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c | |||
@@ -581,7 +581,7 @@ static char *symbol_string(char *buf, char *end, void *ptr, | |||
581 | unsigned long value = (unsigned long) ptr; | 581 | unsigned long value = (unsigned long) ptr; |
582 | #ifdef CONFIG_KALLSYMS | 582 | #ifdef CONFIG_KALLSYMS |
583 | char sym[KSYM_SYMBOL_LEN]; | 583 | char sym[KSYM_SYMBOL_LEN]; |
584 | if (ext != 'f') | 584 | if (ext != 'f' && ext != 's') |
585 | sprint_symbol(sym, value); | 585 | sprint_symbol(sym, value); |
586 | else | 586 | else |
587 | kallsyms_lookup(value, NULL, NULL, NULL, sym); | 587 | kallsyms_lookup(value, NULL, NULL, NULL, sym); |
@@ -794,7 +794,8 @@ static char *ip4_addr_string(char *buf, char *end, const u8 *addr, | |||
794 | * | 794 | * |
795 | * - 'F' For symbolic function descriptor pointers with offset | 795 | * - 'F' For symbolic function descriptor pointers with offset |
796 | * - 'f' For simple symbolic function names without offset | 796 | * - 'f' For simple symbolic function names without offset |
797 | * - 'S' For symbolic direct pointers | 797 | * - 'S' For symbolic direct pointers with offset |
798 | * - 's' For symbolic direct pointers without offset | ||
798 | * - 'R' For a struct resource pointer, it prints the range of | 799 | * - 'R' For a struct resource pointer, it prints the range of |
799 | * addresses (not the name nor the flags) | 800 | * addresses (not the name nor the flags) |
800 | * - 'M' For a 6-byte MAC address, it prints the address in the | 801 | * - 'M' For a 6-byte MAC address, it prints the address in the |
@@ -822,6 +823,7 @@ static char *pointer(const char *fmt, char *buf, char *end, void *ptr, | |||
822 | case 'F': | 823 | case 'F': |
823 | case 'f': | 824 | case 'f': |
824 | ptr = dereference_function_descriptor(ptr); | 825 | ptr = dereference_function_descriptor(ptr); |
826 | case 's': | ||
825 | /* Fallthrough */ | 827 | /* Fallthrough */ |
826 | case 'S': | 828 | case 'S': |
827 | return symbol_string(buf, end, ptr, spec, *fmt); | 829 | return symbol_string(buf, end, ptr, spec, *fmt); |
@@ -1063,10 +1065,12 @@ qualifier: | |||
1063 | * @args: Arguments for the format string | 1065 | * @args: Arguments for the format string |
1064 | * | 1066 | * |
1065 | * This function follows C99 vsnprintf, but has some extensions: | 1067 | * This function follows C99 vsnprintf, but has some extensions: |
1066 | * %pS output the name of a text symbol | 1068 | * %pS output the name of a text symbol with offset |
1069 | * %ps output the name of a text symbol without offset | ||
1067 | * %pF output the name of a function pointer with its offset | 1070 | * %pF output the name of a function pointer with its offset |
1068 | * %pf output the name of a function pointer without its offset | 1071 | * %pf output the name of a function pointer without its offset |
1069 | * %pR output the address range in a struct resource | 1072 | * %pR output the address range in a struct resource |
1073 | * %n is ignored | ||
1070 | * | 1074 | * |
1071 | * The return value is the number of characters which would | 1075 | * The return value is the number of characters which would |
1072 | * be generated for the given input, excluding the trailing | 1076 | * be generated for the given input, excluding the trailing |
@@ -1522,11 +1526,7 @@ EXPORT_SYMBOL_GPL(vbin_printf); | |||
1522 | * a binary buffer that generated by vbin_printf. | 1526 | * a binary buffer that generated by vbin_printf. |
1523 | * | 1527 | * |
1524 | * The format follows C99 vsnprintf, but has some extensions: | 1528 | * The format follows C99 vsnprintf, but has some extensions: |
1525 | * %pS output the name of a text symbol | 1529 | * see vsnprintf comment for details. |
1526 | * %pF output the name of a function pointer with its offset | ||
1527 | * %pf output the name of a function pointer without its offset | ||
1528 | * %pR output the address range in a struct resource | ||
1529 | * %n is ignored | ||
1530 | * | 1530 | * |
1531 | * The return value is the number of characters which would | 1531 | * The return value is the number of characters which would |
1532 | * be generated for the given input, excluding the trailing | 1532 | * be generated for the given input, excluding the trailing |