Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933423AbcDER1P (ORCPT ); Tue, 5 Apr 2016 13:27:15 -0400 Received: from mail-db3on0064.outbound.protection.outlook.com ([157.55.234.64]:40810 "EHLO emea01-db3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932575AbcDER1L (ORCPT ); Tue, 5 Apr 2016 13:27:11 -0400 Authentication-Results: spf=fail (sender IP is 12.216.194.146) smtp.mailfrom=ezchip.com; mellanox.com; dkim=none (message not signed) header.d=none;mellanox.com; dmarc=fail action=none header.from=mellanox.com; From: Chris Metcalf To: Peter Zijlstra , "Rafael J. Wysocki" , Petr Mladek , Russell King , Thomas Gleixner , Aaron Tomlin , Ingo Molnar , Andrew Morton , Daniel Thompson , , , , CC: Chris Metcalf Subject: [PATCH v5 0/4] improvements to the nmi_backtrace code Date: Tue, 5 Apr 2016 13:26:44 -0400 Message-ID: <1459877208-15119-1-git-send-email-cmetcalf@mellanox.com> X-Mailer: git-send-email 2.7.2 In-Reply-To: <201604031905.WLWlnyKg%fengguang.wu@intel.com> X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:12.216.194.146;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(47776003)(2906002)(15975445007)(2201001)(6806005)(2950100001)(104016004)(5008740100001)(105606002)(87936001)(1096002)(11100500001)(4001430100002)(4326007)(229853001)(106466001)(960300001)(586003)(48376002)(1220700001)(92566002)(50466002)(5003940100001)(36756003)(33646002)(189998001)(50986999)(19580405001)(5001770100001)(42186005)(50226001)(5001970100001)(107886002)(85426001)(19580395003)(86362001)(921003)(21314002)(2101003)(83996005)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:AM4PR05MB1684;H:ld-1.internal.tilera.com;FPR:;SPF:Fail;MLV:sfv;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;DB3FFO11FD046;1:yP4G3SBiT+RbcYCBRslgOYAk6P22Y9nzF1BAdnMNehoy1zI6yK13YzjIZUW+THAArxtzvn2WGkxlZErJbDtV3aBWo+rxrmakOwnZnD5vs0wSf6FqbKUi1jIJxVhULidb5jOjjtvStIaoZUMKpnjlX1fWjJybmvUonxtq3Ji5vJGNafkR6LuP6OXui6QjbS5+Mp5Kx30vL6CFtShI0AbtMuodUQ4Xj1Pkm8h3WNNfySR9GJeBCKZEyh/wcFmOn3gsMBIpRrsvMpgIc1L/aih4TFmcE2rIVtg9ARTKmiSJuap/27RjolgWbW2yEkWZ39OwzuxEFBByXa7Q6KXqWEaHzwZ5ITn+S70aH9yCf9NvlmVYrj75On0a+Wws8Kfeow5FsSpPFiVDgAkq5xQZZmdv1dDnXVovxVSaGJ/3jMEgcMhS5ZiynpakvJtqMrWjxZvJxOF8ab0mEgnhEgKITXfVR04oZg16qlTrO4ak48ds0twSmlBAFWShvtNgonbh2NR2c7lf0ptFFiax8dCKLhm0rDnkYjccKHXoZkyLLLh6AM/i0VRihC3urEn0fDvdNiat2YV8gXYO94ct5s5Heg7yNIOd3zMxwgNGttOfEXbCACu52tEPjHVfR+M/Z9pVrGF7 MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: b622c812-8abd-4302-99c8-08d35d777caf X-Microsoft-Exchange-Diagnostics: 1;AM4PR05MB1684;2:ITmiQ7khCcVwZvYA9LbV3JBDlPzdaBpo/StVEavMENFx0juOQ4jbfVzI4gT6bKCS/NdUc4tr18EckTlgR8Hf0VAQHxF72w7PkH0U5Gkk8GxNmZpXskWvxbHa8bUYSTmT6NN4HdQG1Uit3ynGbC25H8ZVcaqJ7S1JVIWKynwEHKxjxq9UZ6wMxz7bjwywt3RJ;3:ls9P//AsTnisaJk8GNLWH9smMKXz+4bYnhnJ6cq63JYy45HZbnPAjDPMlSvVWgVXk5rbNOjfAUApxPpZK5cL0M+VMh4PuAsZxTwWf/onCc9hO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w2oDxJDhdKg X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(13018025)(13023025)(13024025)(13017025)(13015025)(8121501046)(5005006)(3002001)(10201501046);SRVR:AM4PR05MB1684;BCL:0;PCL:0;RULEID:;SRVR:AM4PR05MB1684; X-Microsoft-Exchange-Diagnostics: 1;AM4PR05MB1684;4:8r36W8UGUsaum3m06Ym61Er6NKasYRoZ2tWXHnyNXaiS6tGoe/7YK/4DHMQnqtqh5Vz/BDGA+kCPWXoDTyE0vjLpaldxQYnNv2nVS1T5Y7DDRPdzWTAuBiL3hXbhZXRVtdbZ/sLg8BsBRoNNor7QodM+9oqL6rgK1/tnX7TLgGMKejnTRArbrLmHot0PeKblyl1wiZ4bhcOPkj0f0/FFKESVPe6I2U2qyEqw3F6GuLpFARAXLJ5Kau2nx0d+QCMzfDNxdYNBIqwTGb+BCzuvjHVvviUqD9Nre/amPdMDTaTMK4uIfmK5jRwztuiVRUv7WrH8zGcpqYuQ/KsAbU2fZSdv0w5PlXjMBSny+6VERinJ9m1ni4h/DPFdZkM5IZm3/hb2+h5YU4inAoxek3ENfEAfTyE9ssjwYkhwjSFJsK5dMd4n/+JA+ZE9Ot8ai0IGPsKqwV5kJn7NOit3ozGiYw== X-Forefront-PRVS: 0903DD1D85 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;AM4PR05MB1684;23:E7L3tl7SP46qKSmjoP0K0Uo1lRfvusEmRNwlSJPdJ?= =?us-ascii?Q?lxtnvIDsKuuNyPhxdrhkTEhKvuFyui9bS6JN14233kztFqQ6ThGWPePijJq/?= =?us-ascii?Q?lybmipotwVG+sofPRiVLUAId3xPmPK3ynTgGPc+o/uXuxqBfDyBa+plCda+z?= =?us-ascii?Q?zAePiCoSeja8dnp4Wxw+KJo10IUY04gp2FXQgxWGRljNQv/mFxAZjLglLZRd?= =?us-ascii?Q?I5LnzdsC6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MJ?= =?us-ascii?Q?sQ/YKCJEuDK5a4HEbS6lT6CkE1Mqi0cgRlDDNUd9s/4LcReKbGvBRWA+hY7F?= =?us-ascii?Q?XzlQaEe/giXwoApL28tKDdQx/QjJ6tHRekOSAsupDI4scXT5o9zAslx/6IR5?= =?us-ascii?Q?nVmeL6SOiiLW1MDC1o=3D?= X-Microsoft-Exchange-Diagnostics: 1;AM4PR05MB1684;5:fb4ga2dykSW9BCX2ftGM7D/7Jv89xvaBYpFo7GVvkYn1vB0fGFM2j7Z8K3pmyZwYeuCtYjfP1qla4rte6Vz38yEurxQTEk84ElGX47en2Lqnzzb2BfzTCWg3YcUUGYTXy3lFVg1C0T4kL0VVOpbubg==;24:4eZGdSwKQt47OXH/KYPMdwY0eRjlYCeS48na26ZBfXicbyazIhyfPKgX6spo02DPjdwRmqqY6cCKcPvS9kMr3ovcfoJUtSQQ7NfvqGNVqgM= X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Apr 2016 17:26:55.9534 (UTC) X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=a652971c-7d2e-4d9b-a6a4-d149256f461b;Ip=[12.216.194.146];Helo=[ld-1.internal.tilera.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB1684 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5697 Lines: 123 This is just a one-line change to the v4 series, to catch the new arm vmlinux-xip.lds.S file, which I missed when I rebased to 4.6 for v4 (my arm config for testing did not include CONFIG_XIP_KERNEL). Thanks to Fengguang Wu and the 0-day test robot for that. Whose tree would this go through? I have an ack for Peter Z for patch 4/4 and no other feedback for patches 1/4 or 2/4; I can certainly push 3/4 through the tile tree myself if that helps, though my guess is keeping it with the rest of the series makes more sense for tile since it doesn't lose any functionality that way. >From the version 1 cover letter: This patch series modifies the trigger_xxx_backtrace() NMI-based remote backtracing code to make it more flexible, and makes a few small improvements along the way. The motivation comes from the task isolation code, where there are scenarios where we want to be able to diagnose a case where some cpu is about to interrupt a task-isolated cpu. It can be helpful to see both where the interrupting cpu is, and also an approximation of where the cpu that is being interrupted is. The nmi_backtrace framework allows us to discover the stack of the interrupted cpu. I've tested that the change works as desired on tile, and build-tested x86, arm64, and arm. For x86 and arm64 I confirmed that the generic cpuidle stuff as well as the architecture-specific routines are in the new cpuidle section. For arm I just build-tested it and made sure the generic cpuidle routines were in the new cpuidle section, but I didn't attempt to tease apart the tangle of platform-specific idle routines that arm has and tag them with __cpuidle. That might be more usefully done by someone with arm platform experience in a follow-up patch. I have also pushed it up to kernel.org to pull if that's easier: git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile.git nmi-backtrace The change conflicts with Petr Mladek's NMI printk cleanup patches: https://lkml.kernel.org/r/1459353210-20260-1-git-send-email-pmladek@suse.com He has kindly offered to resolve the conflicts. v5: Add CPUIDLE_TEXT to the new arch/arm/kernel/vmlinux-xip.lds.S v4: Added some more __cpuidle functions (PeterZ, Rafael Wysocki) Rebased to kernel v4.6-rc1 v3: Various improvements to the set of __cpuidle functions; Add back in a missing section accidentally removed in modpost.c (PeterZ) https://lkml.kernel.org/r/1458667179-19630-1-git-send-email-cmetcalf@mellanox.com v2: Switch to using __cpuidle tagging, switch S-O-B to Mellanox https://lkml.kernel.org/r/1458147733-29338-1-git-send-email-cmetcalf@mellanox.com Chris Metcalf (4): nmi_backtrace: add more trigger_*_cpu_backtrace() methods nmi_backtrace: do a local dump_stack() instead of a self-NMI arch/tile: adopt the new nmi_backtrace framework nmi_backtrace: generate one-line reports for idle cpus arch/alpha/kernel/vmlinux.lds.S | 1 + arch/arc/kernel/vmlinux.lds.S | 1 + arch/arm/include/asm/irq.h | 4 +- arch/arm/kernel/smp.c | 13 +------ arch/arm/kernel/vmlinux-xip.lds.S | 1 + arch/arm/kernel/vmlinux.lds.S | 1 + arch/arm64/kernel/vmlinux.lds.S | 1 + arch/arm64/mm/proc.S | 2 + arch/avr32/kernel/vmlinux.lds.S | 1 + arch/blackfin/kernel/vmlinux.lds.S | 1 + arch/c6x/kernel/vmlinux.lds.S | 1 + arch/cris/kernel/vmlinux.lds.S | 1 + arch/frv/kernel/vmlinux.lds.S | 1 + arch/h8300/kernel/vmlinux.lds.S | 1 + arch/hexagon/kernel/vmlinux.lds.S | 1 + arch/ia64/kernel/vmlinux.lds.S | 1 + arch/m32r/kernel/vmlinux.lds.S | 1 + arch/m68k/kernel/vmlinux-nommu.lds | 1 + arch/m68k/kernel/vmlinux-std.lds | 1 + arch/m68k/kernel/vmlinux-sun3.lds | 1 + arch/metag/kernel/vmlinux.lds.S | 1 + arch/microblaze/kernel/vmlinux.lds.S | 1 + arch/mips/kernel/vmlinux.lds.S | 1 + arch/mn10300/kernel/vmlinux.lds.S | 1 + arch/nios2/kernel/vmlinux.lds.S | 1 + arch/openrisc/kernel/vmlinux.lds.S | 1 + arch/parisc/kernel/vmlinux.lds.S | 1 + arch/powerpc/kernel/vmlinux.lds.S | 1 + arch/s390/kernel/vmlinux.lds.S | 1 + arch/score/kernel/vmlinux.lds.S | 1 + arch/sh/kernel/vmlinux.lds.S | 1 + arch/sparc/kernel/vmlinux.lds.S | 1 + arch/tile/include/asm/irq.h | 4 +- arch/tile/kernel/entry.S | 2 +- arch/tile/kernel/pmc.c | 3 -- arch/tile/kernel/process.c | 72 ++++++++---------------------------- arch/tile/kernel/traps.c | 7 +++- arch/tile/kernel/vmlinux.lds.S | 1 + arch/um/kernel/dyn.lds.S | 1 + arch/um/kernel/uml.lds.S | 1 + arch/unicore32/kernel/vmlinux.lds.S | 1 + arch/x86/include/asm/irq.h | 4 +- arch/x86/kernel/acpi/cstate.c | 2 +- arch/x86/kernel/apic/hw_nmi.c | 6 +-- arch/x86/kernel/process.c | 4 +- arch/x86/kernel/vmlinux.lds.S | 1 + arch/xtensa/kernel/vmlinux.lds.S | 3 ++ drivers/acpi/processor_idle.c | 5 ++- drivers/cpuidle/driver.c | 5 ++- drivers/idle/intel_idle.c | 4 +- include/asm-generic/vmlinux.lds.h | 6 +++ include/linux/cpu.h | 5 +++ include/linux/nmi.h | 63 ++++++++++++++++++++++++------- kernel/sched/idle.c | 13 ++++++- lib/nmi_backtrace.c | 40 +++++++++++++------- scripts/mod/modpost.c | 2 +- scripts/recordmcount.c | 1 + scripts/recordmcount.pl | 1 + 58 files changed, 184 insertions(+), 121 deletions(-) -- 2.7.2