diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-26 11:03:38 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-26 11:03:38 -0400 |
commit | 7115e3fcf45514db7525a05365b10454ff7f345e (patch) | |
tree | 17450e6337d559cc35dae6a7a73abab01ac63f00 /drivers | |
parent | 1f6e05171bb5cc32a4d6437ab2269fc21d169ca7 (diff) | |
parent | c752d04066a36ae30b29795f3fa3f536292c1f8c (diff) |
Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
* 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (121 commits)
perf symbols: Increase symbol KSYM_NAME_LEN size
perf hists browser: Refuse 'a' hotkey on non symbolic views
perf ui browser: Use libslang to read keys
perf tools: Fix tracing info recording
perf hists browser: Elide DSO column when it is set to just one DSO, ditto for threads
perf hists: Don't consider filtered entries when calculating column widths
perf hists: Don't decay total_period for filtered entries
perf hists browser: Honour symbol_conf.show_{nr_samples,total_period}
perf hists browser: Do not exit on tab key with single event
perf annotate browser: Don't change selection line when returning from callq
perf tools: handle endianness of feature bitmap
perf tools: Add prelink suggestion to dso update message
perf script: Fix unknown feature comment
perf hists browser: Apply the dso and thread filters when merging new batches
perf hists: Move the dso and thread filters from hist_browser
perf ui browser: Honour the xterm colors
perf top tui: Give color hints just on the percentage, like on --stdio
perf ui browser: Make the colors configurable and change the defaults
perf tui: Remove unneeded call to newtCls on startup
perf hists: Don't format the percentage on hist_entry__snprintf
...
Fix up conflicts in arch/x86/kernel/kprobes.c manually.
Ingo's tree did the insane "add volatile to const array", which just
doesn't make sense ("volatile const"?). But we could remove the const
*and* make the array volatile to make doubly sure that gcc doesn't
optimize it away..
Also fix up kernel/trace/ring_buffer.c non-data-conflicts manually: the
reader_lock has been turned into a raw lock by the core locking merge,
and there was a new user of it introduced in this perf core merge. Make
sure that new use also uses the raw accessor functions.
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/apei/ghes.c | 22 | ||||
-rw-r--r-- | drivers/char/ipmi/ipmi_watchdog.c | 33 | ||||
-rw-r--r-- | drivers/watchdog/hpwdt.c | 25 |
3 files changed, 26 insertions, 54 deletions
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index 0784f99a4665..b8e08cb67a18 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #include <acpi/hed.h> | 50 | #include <acpi/hed.h> |
51 | #include <asm/mce.h> | 51 | #include <asm/mce.h> |
52 | #include <asm/tlbflush.h> | 52 | #include <asm/tlbflush.h> |
53 | #include <asm/nmi.h> | ||
53 | 54 | ||
54 | #include "apei-internal.h" | 55 | #include "apei-internal.h" |
55 | 56 | ||
@@ -749,15 +750,11 @@ static void ghes_proc_in_irq(struct irq_work *irq_work) | |||
749 | } | 750 | } |
750 | } | 751 | } |
751 | 752 | ||
752 | static int ghes_notify_nmi(struct notifier_block *this, | 753 | static int ghes_notify_nmi(unsigned int cmd, struct pt_regs *regs) |
753 | unsigned long cmd, void *data) | ||
754 | { | 754 | { |
755 | struct ghes *ghes, *ghes_global = NULL; | 755 | struct ghes *ghes, *ghes_global = NULL; |
756 | int sev, sev_global = -1; | 756 | int sev, sev_global = -1; |
757 | int ret = NOTIFY_DONE; | 757 | int ret = NMI_DONE; |
758 | |||
759 | if (cmd != DIE_NMI) | ||
760 | return ret; | ||
761 | 758 | ||
762 | raw_spin_lock(&ghes_nmi_lock); | 759 | raw_spin_lock(&ghes_nmi_lock); |
763 | list_for_each_entry_rcu(ghes, &ghes_nmi, list) { | 760 | list_for_each_entry_rcu(ghes, &ghes_nmi, list) { |
@@ -770,10 +767,10 @@ static int ghes_notify_nmi(struct notifier_block *this, | |||
770 | sev_global = sev; | 767 | sev_global = sev; |
771 | ghes_global = ghes; | 768 | ghes_global = ghes; |
772 | } | 769 | } |
773 | ret = NOTIFY_STOP; | 770 | ret = NMI_HANDLED; |
774 | } | 771 | } |
775 | 772 | ||
776 | if (ret == NOTIFY_DONE) | 773 | if (ret == NMI_DONE) |
777 | goto out; | 774 | goto out; |
778 | 775 | ||
779 | if (sev_global >= GHES_SEV_PANIC) { | 776 | if (sev_global >= GHES_SEV_PANIC) { |
@@ -825,10 +822,6 @@ static struct notifier_block ghes_notifier_sci = { | |||
825 | .notifier_call = ghes_notify_sci, | 822 | .notifier_call = ghes_notify_sci, |
826 | }; | 823 | }; |
827 | 824 | ||
828 | static struct notifier_block ghes_notifier_nmi = { | ||
829 | .notifier_call = ghes_notify_nmi, | ||
830 | }; | ||
831 | |||
832 | static unsigned long ghes_esource_prealloc_size( | 825 | static unsigned long ghes_esource_prealloc_size( |
833 | const struct acpi_hest_generic *generic) | 826 | const struct acpi_hest_generic *generic) |
834 | { | 827 | { |
@@ -918,7 +911,8 @@ static int __devinit ghes_probe(struct platform_device *ghes_dev) | |||
918 | ghes_estatus_pool_expand(len); | 911 | ghes_estatus_pool_expand(len); |
919 | mutex_lock(&ghes_list_mutex); | 912 | mutex_lock(&ghes_list_mutex); |
920 | if (list_empty(&ghes_nmi)) | 913 | if (list_empty(&ghes_nmi)) |
921 | register_die_notifier(&ghes_notifier_nmi); | 914 | register_nmi_handler(NMI_LOCAL, ghes_notify_nmi, 0, |
915 | "ghes"); | ||
922 | list_add_rcu(&ghes->list, &ghes_nmi); | 916 | list_add_rcu(&ghes->list, &ghes_nmi); |
923 | mutex_unlock(&ghes_list_mutex); | 917 | mutex_unlock(&ghes_list_mutex); |
924 | break; | 918 | break; |
@@ -964,7 +958,7 @@ static int __devexit ghes_remove(struct platform_device *ghes_dev) | |||
964 | mutex_lock(&ghes_list_mutex); | 958 | mutex_lock(&ghes_list_mutex); |
965 | list_del_rcu(&ghes->list); | 959 | list_del_rcu(&ghes->list); |
966 | if (list_empty(&ghes_nmi)) | 960 | if (list_empty(&ghes_nmi)) |
967 | unregister_die_notifier(&ghes_notifier_nmi); | 961 | unregister_nmi_handler(NMI_LOCAL, "ghes"); |
968 | mutex_unlock(&ghes_list_mutex); | 962 | mutex_unlock(&ghes_list_mutex); |
969 | /* | 963 | /* |
970 | * To synchronize with NMI handler, ghes can only be | 964 | * To synchronize with NMI handler, ghes can only be |
diff --git a/drivers/char/ipmi/ipmi_watchdog.c b/drivers/char/ipmi/ipmi_watchdog.c index 3302586655c4..c2917ffad2c2 100644 --- a/drivers/char/ipmi/ipmi_watchdog.c +++ b/drivers/char/ipmi/ipmi_watchdog.c | |||
@@ -65,6 +65,7 @@ | |||
65 | * mechanism for it at that time. | 65 | * mechanism for it at that time. |
66 | */ | 66 | */ |
67 | #include <asm/kdebug.h> | 67 | #include <asm/kdebug.h> |
68 | #include <asm/nmi.h> | ||
68 | #define HAVE_DIE_NMI | 69 | #define HAVE_DIE_NMI |
69 | #endif | 70 | #endif |
70 | 71 | ||
@@ -1077,17 +1078,8 @@ static void ipmi_unregister_watchdog(int ipmi_intf) | |||
1077 | 1078 | ||
1078 | #ifdef HAVE_DIE_NMI | 1079 | #ifdef HAVE_DIE_NMI |
1079 | static int | 1080 | static int |
1080 | ipmi_nmi(struct notifier_block *self, unsigned long val, void *data) | 1081 | ipmi_nmi(unsigned int val, struct pt_regs *regs) |
1081 | { | 1082 | { |
1082 | struct die_args *args = data; | ||
1083 | |||
1084 | if (val != DIE_NMIUNKNOWN) | ||
1085 | return NOTIFY_OK; | ||
1086 | |||
1087 | /* Hack, if it's a memory or I/O error, ignore it. */ | ||
1088 | if (args->err & 0xc0) | ||
1089 | return NOTIFY_OK; | ||
1090 | |||
1091 | /* | 1083 | /* |
1092 | * If we get here, it's an NMI that's not a memory or I/O | 1084 | * If we get here, it's an NMI that's not a memory or I/O |
1093 | * error. We can't truly tell if it's from IPMI or not | 1085 | * error. We can't truly tell if it's from IPMI or not |
@@ -1097,15 +1089,15 @@ ipmi_nmi(struct notifier_block *self, unsigned long val, void *data) | |||
1097 | 1089 | ||
1098 | if (testing_nmi) { | 1090 | if (testing_nmi) { |
1099 | testing_nmi = 2; | 1091 | testing_nmi = 2; |
1100 | return NOTIFY_STOP; | 1092 | return NMI_HANDLED; |
1101 | } | 1093 | } |
1102 | 1094 | ||
1103 | /* If we are not expecting a timeout, ignore it. */ | 1095 | /* If we are not expecting a timeout, ignore it. */ |
1104 | if (ipmi_watchdog_state == WDOG_TIMEOUT_NONE) | 1096 | if (ipmi_watchdog_state == WDOG_TIMEOUT_NONE) |
1105 | return NOTIFY_OK; | 1097 | return NMI_DONE; |
1106 | 1098 | ||
1107 | if (preaction_val != WDOG_PRETIMEOUT_NMI) | 1099 | if (preaction_val != WDOG_PRETIMEOUT_NMI) |
1108 | return NOTIFY_OK; | 1100 | return NMI_DONE; |
1109 | 1101 | ||
1110 | /* | 1102 | /* |
1111 | * If no one else handled the NMI, we assume it was the IPMI | 1103 | * If no one else handled the NMI, we assume it was the IPMI |
@@ -1120,12 +1112,8 @@ ipmi_nmi(struct notifier_block *self, unsigned long val, void *data) | |||
1120 | panic(PFX "pre-timeout"); | 1112 | panic(PFX "pre-timeout"); |
1121 | } | 1113 | } |
1122 | 1114 | ||
1123 | return NOTIFY_STOP; | 1115 | return NMI_HANDLED; |
1124 | } | 1116 | } |
1125 | |||
1126 | static struct notifier_block ipmi_nmi_handler = { | ||
1127 | .notifier_call = ipmi_nmi | ||
1128 | }; | ||
1129 | #endif | 1117 | #endif |
1130 | 1118 | ||
1131 | static int wdog_reboot_handler(struct notifier_block *this, | 1119 | static int wdog_reboot_handler(struct notifier_block *this, |
@@ -1290,7 +1278,8 @@ static void check_parms(void) | |||
1290 | } | 1278 | } |
1291 | } | 1279 | } |
1292 | if (do_nmi && !nmi_handler_registered) { | 1280 | if (do_nmi && !nmi_handler_registered) { |
1293 | rv = register_die_notifier(&ipmi_nmi_handler); | 1281 | rv = register_nmi_handler(NMI_UNKNOWN, ipmi_nmi, 0, |
1282 | "ipmi"); | ||
1294 | if (rv) { | 1283 | if (rv) { |
1295 | printk(KERN_WARNING PFX | 1284 | printk(KERN_WARNING PFX |
1296 | "Can't register nmi handler\n"); | 1285 | "Can't register nmi handler\n"); |
@@ -1298,7 +1287,7 @@ static void check_parms(void) | |||
1298 | } else | 1287 | } else |
1299 | nmi_handler_registered = 1; | 1288 | nmi_handler_registered = 1; |
1300 | } else if (!do_nmi && nmi_handler_registered) { | 1289 | } else if (!do_nmi && nmi_handler_registered) { |
1301 | unregister_die_notifier(&ipmi_nmi_handler); | 1290 | unregister_nmi_handler(NMI_UNKNOWN, "ipmi"); |
1302 | nmi_handler_registered = 0; | 1291 | nmi_handler_registered = 0; |
1303 | } | 1292 | } |
1304 | #endif | 1293 | #endif |
@@ -1336,7 +1325,7 @@ static int __init ipmi_wdog_init(void) | |||
1336 | if (rv) { | 1325 | if (rv) { |
1337 | #ifdef HAVE_DIE_NMI | 1326 | #ifdef HAVE_DIE_NMI |
1338 | if (nmi_handler_registered) | 1327 | if (nmi_handler_registered) |
1339 | unregister_die_notifier(&ipmi_nmi_handler); | 1328 | unregister_nmi_handler(NMI_UNKNOWN, "ipmi"); |
1340 | #endif | 1329 | #endif |
1341 | atomic_notifier_chain_unregister(&panic_notifier_list, | 1330 | atomic_notifier_chain_unregister(&panic_notifier_list, |
1342 | &wdog_panic_notifier); | 1331 | &wdog_panic_notifier); |
@@ -1357,7 +1346,7 @@ static void __exit ipmi_wdog_exit(void) | |||
1357 | 1346 | ||
1358 | #ifdef HAVE_DIE_NMI | 1347 | #ifdef HAVE_DIE_NMI |
1359 | if (nmi_handler_registered) | 1348 | if (nmi_handler_registered) |
1360 | unregister_die_notifier(&ipmi_nmi_handler); | 1349 | unregister_nmi_handler(NMI_UNKNOWN, "ipmi"); |
1361 | #endif | 1350 | #endif |
1362 | 1351 | ||
1363 | atomic_notifier_chain_unregister(&panic_notifier_list, | 1352 | atomic_notifier_chain_unregister(&panic_notifier_list, |
diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c index 809cbda03d7a..3774c9b8dac9 100644 --- a/drivers/watchdog/hpwdt.c +++ b/drivers/watchdog/hpwdt.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/notifier.h> | 35 | #include <linux/notifier.h> |
36 | #include <asm/cacheflush.h> | 36 | #include <asm/cacheflush.h> |
37 | #endif /* CONFIG_HPWDT_NMI_DECODING */ | 37 | #endif /* CONFIG_HPWDT_NMI_DECODING */ |
38 | #include <asm/nmi.h> | ||
38 | 39 | ||
39 | #define HPWDT_VERSION "1.3.0" | 40 | #define HPWDT_VERSION "1.3.0" |
40 | #define SECS_TO_TICKS(secs) ((secs) * 1000 / 128) | 41 | #define SECS_TO_TICKS(secs) ((secs) * 1000 / 128) |
@@ -477,15 +478,11 @@ static int hpwdt_time_left(void) | |||
477 | /* | 478 | /* |
478 | * NMI Handler | 479 | * NMI Handler |
479 | */ | 480 | */ |
480 | static int hpwdt_pretimeout(struct notifier_block *nb, unsigned long ulReason, | 481 | static int hpwdt_pretimeout(unsigned int ulReason, struct pt_regs *regs) |
481 | void *data) | ||
482 | { | 482 | { |
483 | unsigned long rom_pl; | 483 | unsigned long rom_pl; |
484 | static int die_nmi_called; | 484 | static int die_nmi_called; |
485 | 485 | ||
486 | if (ulReason != DIE_NMIUNKNOWN) | ||
487 | goto out; | ||
488 | |||
489 | if (!hpwdt_nmi_decoding) | 486 | if (!hpwdt_nmi_decoding) |
490 | goto out; | 487 | goto out; |
491 | 488 | ||
@@ -508,7 +505,7 @@ static int hpwdt_pretimeout(struct notifier_block *nb, unsigned long ulReason, | |||
508 | "Management Log for details.\n"); | 505 | "Management Log for details.\n"); |
509 | 506 | ||
510 | out: | 507 | out: |
511 | return NOTIFY_OK; | 508 | return NMI_DONE; |
512 | } | 509 | } |
513 | #endif /* CONFIG_HPWDT_NMI_DECODING */ | 510 | #endif /* CONFIG_HPWDT_NMI_DECODING */ |
514 | 511 | ||
@@ -648,13 +645,6 @@ static struct miscdevice hpwdt_miscdev = { | |||
648 | .fops = &hpwdt_fops, | 645 | .fops = &hpwdt_fops, |
649 | }; | 646 | }; |
650 | 647 | ||
651 | #ifdef CONFIG_HPWDT_NMI_DECODING | ||
652 | static struct notifier_block die_notifier = { | ||
653 | .notifier_call = hpwdt_pretimeout, | ||
654 | .priority = 0, | ||
655 | }; | ||
656 | #endif /* CONFIG_HPWDT_NMI_DECODING */ | ||
657 | |||
658 | /* | 648 | /* |
659 | * Init & Exit | 649 | * Init & Exit |
660 | */ | 650 | */ |
@@ -740,10 +730,9 @@ static int __devinit hpwdt_init_nmi_decoding(struct pci_dev *dev) | |||
740 | * die notify list to handle a critical NMI. The default is to | 730 | * die notify list to handle a critical NMI. The default is to |
741 | * be last so other users of the NMI signal can function. | 731 | * be last so other users of the NMI signal can function. |
742 | */ | 732 | */ |
743 | if (priority) | 733 | retval = register_nmi_handler(NMI_UNKNOWN, hpwdt_pretimeout, |
744 | die_notifier.priority = 0x7FFFFFFF; | 734 | (priority) ? NMI_FLAG_FIRST : 0, |
745 | 735 | "hpwdt"); | |
746 | retval = register_die_notifier(&die_notifier); | ||
747 | if (retval != 0) { | 736 | if (retval != 0) { |
748 | dev_warn(&dev->dev, | 737 | dev_warn(&dev->dev, |
749 | "Unable to register a die notifier (err=%d).\n", | 738 | "Unable to register a die notifier (err=%d).\n", |
@@ -763,7 +752,7 @@ static int __devinit hpwdt_init_nmi_decoding(struct pci_dev *dev) | |||
763 | 752 | ||
764 | static void hpwdt_exit_nmi_decoding(void) | 753 | static void hpwdt_exit_nmi_decoding(void) |
765 | { | 754 | { |
766 | unregister_die_notifier(&die_notifier); | 755 | unregister_nmi_handler(NMI_UNKNOWN, "hpwdt"); |
767 | if (cru_rom_addr) | 756 | if (cru_rom_addr) |
768 | iounmap(cru_rom_addr); | 757 | iounmap(cru_rom_addr); |
769 | } | 758 | } |