diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-21 13:34:13 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-21 13:34:13 -0400 |
commit | 9a2bc8603eca4ea4a3a01163593084c5c1b3e16a (patch) | |
tree | 359ec96e8c42b037b79d2efd4cd1ee87e24c0842 /include | |
parent | d75e2c9ad97c40f6d2cdaf2e16381b2034d19a6f (diff) | |
parent | c064da47144b11be4697a4611f640086a663016a (diff) |
Merge branch 'anton-kgdb' (kgdb dmesg fixups)
Merge emailed kgdb dmesg fixups patches from Anton Vorontsov:
"The dmesg command appears to be broken after the printk rework. The
old logic in the kdb code makes no sense in terms of current
printk/logging storage format, and KDB simply hangs forever upon
entering 'dmesg' command.
The first patch revives the command by switching to kmsg_dumper
iterator. As a side-effect, the code is now much more simpler.
A few changes were needed in the printk.c: we needed unlocked variant
of the kmsg_dumper iterator, but these can surely wait for 3.6.
It's probably too late even for the first patch to go to 3.5, but I'll
try to convince otherwise. :-) Here we go:
- The current code is broken for sure, and has no hope to work at
all. It is a regression
- The new code works for me, and probably works for everyone else;
- If it compiles (and I urge everyone to compile-test it on your
setup), it hardly can make things worse."
* Merge emailed patches from Anton Vorontsov: (4 commits)
kdb: Switch to nolock variants of kmsg_dump functions
printk: Implement some unlocked kmsg_dump functions
printk: Remove kdb_syslog_data
kdb: Revive dmesg command
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/kmsg_dump.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/kmsg_dump.h b/include/linux/kmsg_dump.h index d6bd50110ec2..2e7a1e032c71 100644 --- a/include/linux/kmsg_dump.h +++ b/include/linux/kmsg_dump.h | |||
@@ -55,12 +55,17 @@ struct kmsg_dumper { | |||
55 | #ifdef CONFIG_PRINTK | 55 | #ifdef CONFIG_PRINTK |
56 | void kmsg_dump(enum kmsg_dump_reason reason); | 56 | void kmsg_dump(enum kmsg_dump_reason reason); |
57 | 57 | ||
58 | bool kmsg_dump_get_line_nolock(struct kmsg_dumper *dumper, bool syslog, | ||
59 | char *line, size_t size, size_t *len); | ||
60 | |||
58 | bool kmsg_dump_get_line(struct kmsg_dumper *dumper, bool syslog, | 61 | bool kmsg_dump_get_line(struct kmsg_dumper *dumper, bool syslog, |
59 | char *line, size_t size, size_t *len); | 62 | char *line, size_t size, size_t *len); |
60 | 63 | ||
61 | bool kmsg_dump_get_buffer(struct kmsg_dumper *dumper, bool syslog, | 64 | bool kmsg_dump_get_buffer(struct kmsg_dumper *dumper, bool syslog, |
62 | char *buf, size_t size, size_t *len); | 65 | char *buf, size_t size, size_t *len); |
63 | 66 | ||
67 | void kmsg_dump_rewind_nolock(struct kmsg_dumper *dumper); | ||
68 | |||
64 | void kmsg_dump_rewind(struct kmsg_dumper *dumper); | 69 | void kmsg_dump_rewind(struct kmsg_dumper *dumper); |
65 | 70 | ||
66 | int kmsg_dump_register(struct kmsg_dumper *dumper); | 71 | int kmsg_dump_register(struct kmsg_dumper *dumper); |
@@ -71,6 +76,13 @@ static inline void kmsg_dump(enum kmsg_dump_reason reason) | |||
71 | { | 76 | { |
72 | } | 77 | } |
73 | 78 | ||
79 | static inline bool kmsg_dump_get_line_nolock(struct kmsg_dumper *dumper, | ||
80 | bool syslog, const char *line, | ||
81 | size_t size, size_t *len) | ||
82 | { | ||
83 | return false; | ||
84 | } | ||
85 | |||
74 | static inline bool kmsg_dump_get_line(struct kmsg_dumper *dumper, bool syslog, | 86 | static inline bool kmsg_dump_get_line(struct kmsg_dumper *dumper, bool syslog, |
75 | const char *line, size_t size, size_t *len) | 87 | const char *line, size_t size, size_t *len) |
76 | { | 88 | { |
@@ -83,6 +95,10 @@ static inline bool kmsg_dump_get_buffer(struct kmsg_dumper *dumper, bool syslog, | |||
83 | return false; | 95 | return false; |
84 | } | 96 | } |
85 | 97 | ||
98 | static inline void kmsg_dump_rewind_nolock(struct kmsg_dumper *dumper) | ||
99 | { | ||
100 | } | ||
101 | |||
86 | static inline void kmsg_dump_rewind(struct kmsg_dumper *dumper) | 102 | static inline void kmsg_dump_rewind(struct kmsg_dumper *dumper) |
87 | { | 103 | { |
88 | } | 104 | } |