linux-stable/drivers
Tejun Heo 98e5e1bf72 dump_stack: implement arch-specific hardware description in task dumps
x86 and ia64 can acquire extra hardware identification information
from DMI and print it along with task dumps; however, the usage isn't
consistent.

* x86 show_regs() collects vendor, product and board strings and print
  them out with PID, comm and utsname.  Some of the information is
  printed again later in the same dump.

* warn_slowpath_common() explicitly accesses the DMI board and prints
  it out with "Hardware name:" label.  This applies to both x86 and
  ia64 but is irrelevant on all other archs.

* ia64 doesn't show DMI information on other non-WARN dumps.

This patch introduces arch-specific hardware description used by
dump_stack().  It can be set by calling dump_stack_set_arch_desc()
during boot and, if exists, printed out in a separate line with
"Hardware name:" label.

dmi_set_dump_stack_arch_desc() is added which sets arch-specific
description from DMI data.  It uses dmi_ids_string[] which is set from
dmi_present() used for DMI debug message.  It is superset of the
information x86 show_regs() is using.  The function is called from x86
and ia64 boot code right after dmi_scan_machine().

This makes the explicit DMI handling in warn_slowpath_common()
unnecessary.  Removed.

show_regs() isn't yet converted to use generic debug information
printing and this patch doesn't remove the duplicate DMI handling in
x86 show_regs().  The next patch will unify show_regs() handling and
remove the duplication.

An example WARN dump follows.

 WARNING: at kernel/workqueue.c:4841 init_workqueues+0x35/0x505()
 Modules linked in:
 CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.9.0-rc1-work+ #3
 Hardware name: empty empty/S3992, BIOS 080011  10/26/2007
  0000000000000009 ffff88007c861e08 ffffffff81c614dc ffff88007c861e48
  ffffffff8108f500 ffffffff82228240 0000000000000040 ffffffff8234a08e
  0000000000000000 0000000000000000 0000000000000000 ffff88007c861e58
 Call Trace:
  [<ffffffff81c614dc>] dump_stack+0x19/0x1b
  [<ffffffff8108f500>] warn_slowpath_common+0x70/0xa0
  [<ffffffff8108f54a>] warn_slowpath_null+0x1a/0x20
  [<ffffffff8234a0c3>] init_workqueues+0x35/0x505
  ...

v2: Use the same string as the debug message from dmi_present() which
    also contains BIOS information.  Move hardware name into its own
    line as warn_slowpath_common() did.  This change was suggested by
    Bjorn Helgaas.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Fengguang Wu <fengguang.wu@intel.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-04-30 17:04:02 -07:00
..
accessibility
acpi PCI changes for the v3.10 merge window: 2013-04-29 09:30:25 -07:00
amba
ata Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2013-04-30 09:36:50 -07:00
atm
auxdisplay
base Merge branch 'for-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq 2013-04-29 19:07:40 -07:00
bcma
block drbd: rename random32() to prandom_u32() 2013-04-29 18:28:42 -07:00
bluetooth
bus
cdrom
char Char / Misc driver update for 3.10-rc1 2013-04-29 11:18:34 -07:00
clk Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2013-04-30 09:36:50 -07:00
clocksource Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-04-30 08:15:40 -07:00
connector
cpufreq
cpuidle
crypto Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2013-04-30 09:36:50 -07:00
dca
devfreq
dio
dma dmaengine: at_hdmac: fix race condition in atc_advance_work() 2013-04-18 08:54:22 -07:00
edac Merge branch 'linux_next' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac 2013-04-30 10:00:49 -07:00
eisa PCI changes for the v3.10 merge window: 2013-04-29 09:30:25 -07:00
extcon
firewire
firmware dump_stack: implement arch-specific hardware description in task dumps 2013-04-30 17:04:02 -07:00
gpio These are the pinctrl changes for v3.10: 2013-04-29 09:40:35 -07:00
gpu Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2013-04-30 09:36:50 -07:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2013-04-30 09:37:55 -07:00
hsi
hv Merge branch 'x86-paravirt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-04-30 08:41:21 -07:00
hwmon Staging driver tree update for 3.10-rc1 2013-04-29 11:34:17 -07:00
hwspinlock
i2c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2013-04-30 09:36:50 -07:00
ide
idle
iio
infiniband drivers/infiniband/hw/mlx4: convert to using idr_alloc_cyclic() 2013-04-29 18:28:41 -07:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2013-04-19 09:15:13 -07:00
iommu Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-04-30 08:40:35 -07:00
ipack
irqchip Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2013-04-30 09:36:50 -07:00
isdn Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2013-04-30 09:36:50 -07:00
leds
lguest lguest: rename random32() to prandom_u32() 2013-04-29 18:28:43 -07:00
macintosh
mailbox
md Revert "block: add missing block_bio_complete() tracepoint" 2013-04-18 09:00:26 -07:00
media Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2013-04-30 09:58:16 -07:00
memory
memstick
message
mfd regulator: Updates for v3.10 2013-04-29 16:32:25 -07:00
misc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2013-04-30 09:36:50 -07:00
mmc mmc: rename random32() to prandom_u32() 2013-04-29 18:28:42 -07:00
mtd mtdchar: remove no-longer-used vma helpers 2013-04-19 10:05:39 -07:00
net Main features: 2013-04-30 10:10:48 -07:00
nfc
ntb
nubus
of [media] DT: export of_get_next_parent() for use by modules: fix modular V4L2 2013-04-17 12:28:57 -03:00
oprofile
parisc
parport
pci PCI changes for the v3.10 merge window: 2013-04-29 09:30:25 -07:00
pcmcia
pinctrl pinctrl: move subsystem mutex to pinctrl_dev struct 2013-04-26 17:01:35 +02:00
platform Merge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86 2013-04-18 15:14:34 -07:00
pnp
power Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2013-04-30 09:36:50 -07:00
pps
ps3
ptp
pwm
rapidio
regulator Merge remote-tracking branch 'regulator/topic/wm8994' into v3.9-rc8 2013-04-28 02:13:50 +01:00
remoteproc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2013-04-30 09:36:50 -07:00
rpmsg drivers/rpmsg/virtio_rpmsg_bus.c: fix error return code in rpmsg_probe() 2013-04-29 18:28:13 -07:00
rtc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2013-04-30 09:36:50 -07:00
s390 TTY/Serial driver update for 3.10-rc1 2013-04-29 12:16:17 -07:00
sbus
scsi Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2013-04-30 09:36:50 -07:00
sfi
sh
sn
spi spi: Updates for v3.10 2013-04-29 16:38:41 -07:00
ssb ssb: implement spurious tone avoidance 2013-04-10 10:31:26 -04:00
ssbi
staging staging: zcache: enable zcache to be built/loaded as a module 2013-04-30 17:04:01 -07:00
target target: Fix incorrect fallthrough of ALUA Standby/Offline/Transition CDBs 2013-04-11 01:48:49 -07:00
tc
thermal
tty TTY/Serial driver update for 3.10-rc1 2013-04-29 12:16:17 -07:00
uio
usb drivers/usb/storage/realtek_cr.c: fix build 2013-04-30 17:04:00 -07:00
uwb uwb: rename random32() to prandom_u32() 2013-04-29 18:28:43 -07:00
vfio PCI changes for the v3.10 merge window: 2013-04-29 09:30:25 -07:00
vhost Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2013-04-12 15:26:42 -07:00
video Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2013-04-30 09:36:50 -07:00
virt
virtio
vlynq
vme
w1
watchdog watchdog: Revert the AT91RM9200_WATCHDOG dependency 2013-04-14 09:09:10 +02:00
xen zcache/tmem: Better error checking on frontswap_register_ops return value. 2013-04-30 17:04:01 -07:00
zorro
Kconfig
Makefile USB patches for 3.10-rc1 2013-04-29 12:19:23 -07:00