aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-05-22 19:02:13 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-22 19:02:13 -0400
commit5d4e2d08e7fdf7339f84a1c670d296a77e02f881 (patch)
tree1c419660defa56191091dfdf50fdb57a72009173 /lib
parentfb2123fad3b499f0898835b19dbb93b18d27ee98 (diff)
parent94ca629e40eb7e997be21d8065c25e4f3797b03f (diff)
Merge tag 'driver-core-3.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core updates from Greg Kroah-Hartman: "Here's the driver core, and other driver subsystems, pull request for the 3.5-rc1 merge window. Outside of a few minor driver core changes, we ended up with the following different subsystem and core changes as well, due to interdependancies on the driver core: - hyperv driver updates - drivers/memory being created and some drivers moved into it - extcon driver subsystem created out of the old Android staging switch driver code - dynamic debug updates - printk rework, and /dev/kmsg changes All of this has been tested in the linux-next releases for a few weeks with no reported problems. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>" Fix up conflicts in drivers/extcon/extcon-max8997.c where git noticed that a patch to the deleted drivers/misc/max8997-muic.c driver needs to be applied to this one. * tag 'driver-core-3.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (90 commits) uio_pdrv_genirq: get irq through platform resource if not set otherwise memory: tegra{20,30}-mc: Remove empty *_remove() printk() - isolate KERN_CONT users from ordinary complete lines sysfs: get rid of some lockdep false positives Drivers: hv: util: Properly handle version negotiations. Drivers: hv: Get rid of an unnecessary check in vmbus_prep_negotiate_resp() memory: tegra{20,30}-mc: Use dev_err_ratelimited() driver core: Add dev_*_ratelimited() family Driver Core: don't oops with unregistered driver in driver_find_device() printk() - restore prefix/timestamp printing for multi-newline strings printk: add stub for prepend_timestamp() ARM: tegra30: Make MC optional in Kconfig ARM: tegra20: Make MC optional in Kconfig ARM: tegra30: MC: Remove unnecessary BUG*() ARM: tegra20: MC: Remove unnecessary BUG*() printk: correctly align __log_buf ARM: tegra30: Add Tegra Memory Controller(MC) driver ARM: tegra20: Add Tegra Memory Controller(MC) driver printk() - restore timestamp printing at console output printk() - do not merge continuation lines of different threads ...
Diffstat (limited to 'lib')
-rw-r--r--lib/Kconfig8
-rw-r--r--lib/Kconfig.debug33
-rw-r--r--lib/Makefile2
-rw-r--r--lib/dynamic_debug.c190
-rw-r--r--lib/jedec_ddr_data.c135
-rw-r--r--lib/kobject.c14
6 files changed, 295 insertions, 87 deletions
diff --git a/lib/Kconfig b/lib/Kconfig
index 4a8aba2e5cc0..0e25c03939e3 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -353,6 +353,14 @@ config CORDIC
353 This option provides an implementation of the CORDIC algorithm; 353 This option provides an implementation of the CORDIC algorithm;
354 calculations are in fixed point. Module will be called cordic. 354 calculations are in fixed point. Module will be called cordic.
355 355
356config DDR
357 bool "JEDEC DDR data"
358 help
359 Data from JEDEC specs for DDR SDRAM memories,
360 particularly the AC timing parameters and addressing
361 information. This data is useful for drivers handling
362 DDR SDRAM controllers.
363
356config MPILIB 364config MPILIB
357 tristate 365 tristate
358 select CLZ_TAB 366 select CLZ_TAB
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 6777153f18f3..e11934177030 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -3,12 +3,16 @@ config PRINTK_TIME
3 bool "Show timing information on printks" 3 bool "Show timing information on printks"
4 depends on PRINTK 4 depends on PRINTK
5 help 5 help
6 Selecting this option causes timing information to be 6 Selecting this option causes time stamps of the printk()
7 included in printk output. This allows you to measure 7 messages to be added to the output of the syslog() system
8 the interval between kernel operations, including bootup 8 call and at the console.
9 operations. This is useful for identifying long delays 9
10 in kernel startup. Or add printk.time=1 at boot-time. 10 The timestamp is always recorded internally, and exported
11 See Documentation/kernel-parameters.txt 11 to /dev/kmsg. This flag just specifies if the timestamp should
12 be included, not that the timestamp is recorded.
13
14 The behavior is also controlled by the kernel command line
15 parameter printk.time=1. See Documentation/kernel-parameters.txt
12 16
13config DEFAULT_MESSAGE_LOGLEVEL 17config DEFAULT_MESSAGE_LOGLEVEL
14 int "Default message log level (1-7)" 18 int "Default message log level (1-7)"
@@ -1205,8 +1209,13 @@ config DYNAMIC_DEBUG
1205 otherwise be available at runtime. These messages can then be 1209 otherwise be available at runtime. These messages can then be
1206 enabled/disabled based on various levels of scope - per source file, 1210 enabled/disabled based on various levels of scope - per source file,
1207 function, module, format string, and line number. This mechanism 1211 function, module, format string, and line number. This mechanism
1208 implicitly enables all pr_debug() and dev_dbg() calls. The impact of 1212 implicitly compiles in all pr_debug() and dev_dbg() calls, which
1209 this compile option is a larger kernel text size of about 2%. 1213 enlarges the kernel text size by about 2%.
1214
1215 If a source file is compiled with DEBUG flag set, any
1216 pr_debug() calls in it are enabled by default, but can be
1217 disabled at runtime as below. Note that DEBUG flag is
1218 turned on by many CONFIG_*DEBUG* options.
1210 1219
1211 Usage: 1220 Usage:
1212 1221
@@ -1223,16 +1232,16 @@ config DYNAMIC_DEBUG
1223 lineno : line number of the debug statement 1232 lineno : line number of the debug statement
1224 module : module that contains the debug statement 1233 module : module that contains the debug statement
1225 function : function that contains the debug statement 1234 function : function that contains the debug statement
1226 flags : 'p' means the line is turned 'on' for printing 1235 flags : '=p' means the line is turned 'on' for printing
1227 format : the format used for the debug statement 1236 format : the format used for the debug statement
1228 1237
1229 From a live system: 1238 From a live system:
1230 1239
1231 nullarbor:~ # cat <debugfs>/dynamic_debug/control 1240 nullarbor:~ # cat <debugfs>/dynamic_debug/control
1232 # filename:lineno [module]function flags format 1241 # filename:lineno [module]function flags format
1233 fs/aio.c:222 [aio]__put_ioctx - "__put_ioctx:\040freeing\040%p\012" 1242 fs/aio.c:222 [aio]__put_ioctx =_ "__put_ioctx:\040freeing\040%p\012"
1234 fs/aio.c:248 [aio]ioctx_alloc - "ENOMEM:\040nr_events\040too\040high\012" 1243 fs/aio.c:248 [aio]ioctx_alloc =_ "ENOMEM:\040nr_events\040too\040high\012"
1235 fs/aio.c:1770 [aio]sys_io_cancel - "calling\040cancel\012" 1244 fs/aio.c:1770 [aio]sys_io_cancel =_ "calling\040cancel\012"
1236 1245
1237 Example usage: 1246 Example usage:
1238 1247
diff --git a/lib/Makefile b/lib/Makefile
index 18515f0267c4..74290c9e2864 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -123,6 +123,8 @@ obj-$(CONFIG_SIGNATURE) += digsig.o
123 123
124obj-$(CONFIG_CLZ_TAB) += clz_tab.o 124obj-$(CONFIG_CLZ_TAB) += clz_tab.o
125 125
126obj-$(CONFIG_DDR) += jedec_ddr_data.o
127
126hostprogs-y := gen_crc32table 128hostprogs-y := gen_crc32table
127clean-files := crc32table.h 129clean-files := crc32table.h
128 130
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index 310c753cf83e..7ca29a0a3019 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -107,20 +107,22 @@ static char *ddebug_describe_flags(struct _ddebug *dp, char *buf,
107 return buf; 107 return buf;
108} 108}
109 109
110#define vpr_info_dq(q, msg) \ 110#define vpr_info(fmt, ...) \
111do { \ 111 if (verbose) do { pr_info(fmt, ##__VA_ARGS__); } while (0)
112 if (verbose) \ 112
113 /* trim last char off format print */ \ 113#define vpr_info_dq(q, msg) \
114 pr_info("%s: func=\"%s\" file=\"%s\" " \ 114do { \
115 "module=\"%s\" format=\"%.*s\" " \ 115 /* trim last char off format print */ \
116 "lineno=%u-%u", \ 116 vpr_info("%s: func=\"%s\" file=\"%s\" " \
117 msg, \ 117 "module=\"%s\" format=\"%.*s\" " \
118 q->function ? q->function : "", \ 118 "lineno=%u-%u", \
119 q->filename ? q->filename : "", \ 119 msg, \
120 q->module ? q->module : "", \ 120 q->function ? q->function : "", \
121 (int)(q->format ? strlen(q->format) - 1 : 0), \ 121 q->filename ? q->filename : "", \
122 q->format ? q->format : "", \ 122 q->module ? q->module : "", \
123 q->first_lineno, q->last_lineno); \ 123 (int)(q->format ? strlen(q->format) - 1 : 0), \
124 q->format ? q->format : "", \
125 q->first_lineno, q->last_lineno); \
124} while (0) 126} while (0)
125 127
126/* 128/*
@@ -180,12 +182,11 @@ static int ddebug_change(const struct ddebug_query *query,
180 if (newflags == dp->flags) 182 if (newflags == dp->flags)
181 continue; 183 continue;
182 dp->flags = newflags; 184 dp->flags = newflags;
183 if (verbose) 185 vpr_info("changed %s:%d [%s]%s =%s\n",
184 pr_info("changed %s:%d [%s]%s =%s\n", 186 trim_prefix(dp->filename), dp->lineno,
185 trim_prefix(dp->filename), dp->lineno, 187 dt->mod_name, dp->function,
186 dt->mod_name, dp->function, 188 ddebug_describe_flags(dp, flagbuf,
187 ddebug_describe_flags(dp, flagbuf, 189 sizeof(flagbuf)));
188 sizeof(flagbuf)));
189 } 190 }
190 } 191 }
191 mutex_unlock(&ddebug_lock); 192 mutex_unlock(&ddebug_lock);
@@ -337,7 +338,7 @@ static int check_set(const char **dest, char *src, char *name)
337 * Returns 0 on success, <0 on error. 338 * Returns 0 on success, <0 on error.
338 */ 339 */
339static int ddebug_parse_query(char *words[], int nwords, 340static int ddebug_parse_query(char *words[], int nwords,
340 struct ddebug_query *query) 341 struct ddebug_query *query, const char *modname)
341{ 342{
342 unsigned int i; 343 unsigned int i;
343 int rc; 344 int rc;
@@ -347,6 +348,10 @@ static int ddebug_parse_query(char *words[], int nwords,
347 return -EINVAL; 348 return -EINVAL;
348 memset(query, 0, sizeof(*query)); 349 memset(query, 0, sizeof(*query));
349 350
351 if (modname)
352 /* support $modname.dyndbg=<multiple queries> */
353 query->module = modname;
354
350 for (i = 0 ; i < nwords ; i += 2) { 355 for (i = 0 ; i < nwords ; i += 2) {