kernel_optimize_test/arch/mips
Paul Burton 97c8580e85
MIPS: Annotate cpu_wait implementations with __cpuidle
Annotate cpu_wait implementations using the __cpuidle macro which
places these functions in the .cpuidle.text section. This allows
cpu_in_idle() to return true for PC values which fall within these
functions, allowing nmi_backtrace() to produce cleaner output for CPUs
running idle functions. For example:

  # echo l >/proc/sysrq-trigger
  [   38.587170] sysrq: SysRq : Show backtrace of all active CPUs
  [   38.593657] NMI backtrace for cpu 1
  [   38.597611] CPU: 1 PID: 161 Comm: sh Not tainted 4.18.0-rc1+ #27
  [   38.604306] Stack : 00000000 00000004 00000006 80486724 00000000 00000000 00000000 00000000
  [   38.613647]         80e17eda 00000034 00000000 00000000 80d20000 80b67e98 8e559c90 0ffe1e88
  [   38.622986]         00000000 00000000 80e70000 00000000 8f61db18 38312e34 722d302e 202b3163
  [   38.632324]         8e559d3c 8e559adc 00000001 6b636162 80d20000 80000000 00000000 80d1cfa4
  [   38.641664]         00000001 80d20000 80d19520 00000000 00000003 80836724 00000004 80e10004
  [   38.650993]         ...
  [   38.653724] Call Trace:
  [   38.656499] [<8040cdd0>] show_stack+0xa0/0x144
  [   38.661475] [<80b67e98>] dump_stack+0xe8/0x120
  [   38.666455] [<80b6f6d4>] nmi_cpu_backtrace+0x1b4/0x1cc
  [   38.672189] [<80b6f81c>] nmi_trigger_cpumask_backtrace+0x130/0x1e4
  [   38.679081] [<808295d8>] __handle_sysrq+0xc0/0x180
  [   38.684421] [<80829b84>] write_sysrq_trigger+0x50/0x64
  [   38.690176] [<8061c984>] proc_reg_write+0xd0/0xfc
  [   38.695447] [<805aac1c>] __vfs_write+0x54/0x194
  [   38.700500] [<805aaf24>] vfs_write+0xe0/0x18c
  [   38.705360] [<805ab190>] ksys_write+0x7c/0xf0
  [   38.710238] [<80416018>] syscall_common+0x34/0x58
  [   38.715558] Sending NMI from CPU 1 to CPUs 0,2-3:
  [   38.720916] NMI backtrace for cpu 0 skipped: idling at r4k_wait_irqoff+0x2c/0x34
  [   38.729186] NMI backtrace for cpu 3 skipped: idling at r4k_wait_irqoff+0x2c/0x34
  [   38.737449] NMI backtrace for cpu 2 skipped: idling at r4k_wait_irqoff+0x2c/0x34

Without this we get register value & backtrace output from all CPUs,
which is generally useless for those running the idle function & serves
only to overwhelm & obfuscate the meaningful output from non-idle CPUs.

Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: James Hogan <jhogan@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Huacai Chen <chenhc@lemote.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/19598/
2018-06-28 14:18:54 -07:00
..
alchemy Merge branch 'i2c/for-4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2018-06-14 16:21:46 +09:00
ar7
ath25 MIPS: ath25: use generic dma noncoherent ops 2018-06-24 09:27:27 -07:00
ath79 MIPS: pb44: Fix i2c-gpio GPIO descriptor table 2018-06-18 22:19:50 +01:00
bcm47xx MIPS: BCM47XX: Enable 74K Core ExternalSync for PCIe erratum 2018-06-18 22:19:50 +01:00
bcm63xx
bmips MIPS: bmips: remove unnecessary call to register "simple-bus" 2018-06-24 09:27:27 -07:00
boot MIPS: boot: merge build rules of vmlinux.*.itb by using pattern rule 2018-06-24 09:27:27 -07:00
cavium-octeon MIPS: octeon: use of_platform_populate to probe devices 2018-06-24 09:27:27 -07:00
cobalt
configs MIPS: Malta: Use PIIX4 poweroff driver to power down 2018-06-24 09:27:27 -07:00
crypto MIPS: crypto: Add crc32 and crc32c hw accelerated module 2018-02-19 20:50:36 +00:00
dec MIPS: Convert update_persistent_clock() to update_persistent_clock64() 2018-05-14 23:58:23 +01:00
emma
fw
generic MIPS: generic: remove unnecessary of_platform_populate call 2018-06-24 09:27:27 -07:00
include MIPS: Schedule on CPUs we need to lose FPU for a mode switch 2018-06-24 09:27:27 -07:00
jazz MIPS: jazz: split dma mapping operations from dma-default 2018-06-24 09:27:27 -07:00
jz4740 MIPS: JZ4740: Drop old platform reset code 2018-05-14 23:58:23 +01:00
kernel MIPS: Annotate cpu_wait implementations with __cpuidle 2018-06-28 14:18:54 -07:00
kvm Small update for KVM. 2018-06-12 11:34:04 -07:00
lantiq MIPS: lantiq: remove unnecessary of_platform_default_populate call 2018-06-24 09:27:27 -07:00
lasat MIPS: Convert update_persistent_clock() to update_persistent_clock64() 2018-05-14 23:58:23 +01:00
lib MIPS: memset.S: Reinstate delay slot indentation 2018-05-21 16:01:15 +01:00
loongson32 MIPS: use generic dma noncoherent ops for simple noncoherent platforms 2018-06-24 09:26:05 -07:00
loongson64 MIPS: loongson64: use generic dma noncoherent ops 2018-06-24 09:27:27 -07:00
math-emu
mm arch: mips: mm: page: Remove unused function 2018-06-24 09:27:27 -07:00
mti-malta MIPS: Malta: Use PIIX4 poweroff driver to power down 2018-06-24 09:27:27 -07:00
net bpf, mips: remove unused function 2018-05-14 19:11:45 -07:00
netlogic MIPS: netlogic: remove unnecessary of_platform_bus_probe call 2018-06-24 09:27:27 -07:00
oprofile MIPS: perf: More robustly probe for the presence of per-tc counters 2018-05-15 15:16:16 +01:00
paravirt
pci arch: mips: pci: pci-ip27.c: Remove unused function 2018-06-24 09:27:27 -07:00
pic32 MIPS: use generic dma noncoherent ops for simple noncoherent platforms 2018-06-24 09:26:05 -07:00
pistachio
pmcs-msp71xx
pnx833x
power
ralink MIPS: ralink: Fix booting on MT7621 2018-03-22 00:06:30 +00:00
rb532
sgi-ip22
sgi-ip27
sgi-ip32 MIPS: IP32: use generic dma noncoherent ops 2018-06-24 09:27:27 -07:00
sibyte MIPS: remove CONFIG_DMA_COHERENT 2018-06-24 09:26:02 -07:00
sni MIPS: sni: Remove the read_persistent_clock() 2018-05-14 23:58:25 +01:00
tools
txx9 MIPS: use generic dma noncoherent ops for simple noncoherent platforms 2018-06-24 09:26:05 -07:00
vdso MIPS: VDSO: Replace __mips_isa_rev with MIPS_ISA_REV 2018-03-09 11:22:48 +00:00
vr41xx MIPS: Annotate cpu_wait implementations with __cpuidle 2018-06-28 14:18:54 -07:00
Kbuild
Kbuild.platforms
Kconfig MIPS: Malta: Use PIIX4 poweroff driver to power down 2018-06-24 09:27:27 -07:00
Kconfig.debug
Makefile kbuild: add machine size to CHECKFLAGS 2018-06-01 11:36:58 +09:00
Makefile.postlink