aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/powernv/opal.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-12-11 20:48:14 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-12-11 20:48:14 -0500
commit140cd7fb04a4a2bc09a30980bc8104cc89e09330 (patch)
tree776d57c7508f946d592de4334d4d3cb50fd36220 /arch/powerpc/platforms/powernv/opal.c
parent27afc5dbda52ee3dbcd0bda7375c917c6936b470 (diff)
parent56548fc0e86cb9156af7a7e1f15ba78f251dafaf (diff)
Merge tag 'powerpc-3.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux
Pull powerpc updates from Michael Ellerman: "Some nice cleanups like removing bootmem, and removal of __get_cpu_var(). There is one patch to mm/gup.c. This is the generic GUP implementation, but is only used by us and arm(64). We have an ack from Steve Capper, and although we didn't get an ack from Andrew he told us to take the patch through the powerpc tree. There's one cxl patch. This is in drivers/misc, but Greg said he was happy for us to manage fixes for it. There is an infrastructure patch to support an IPMI driver for OPAL. There is also an RTC driver for OPAL. We weren't able to get any response from the RTC maintainer, Alessandro Zummo, so in the end we just merged the driver. The usual batch of Freescale updates from Scott" * tag 'powerpc-3.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux: (101 commits) powerpc/powernv: Return to cpu offline loop when finished in KVM guest powerpc/book3s: Fix partial invalidation of TLBs in MCE code. powerpc/mm: don't do tlbie for updatepp request with NO HPTE fault powerpc/xmon: Cleanup the breakpoint flags powerpc/xmon: Enable HW instruction breakpoint on POWER8 powerpc/mm/thp: Use tlbiel if possible powerpc/mm/thp: Remove code duplication powerpc/mm/hugetlb: Sanity check gigantic hugepage count powerpc/oprofile: Disable pagefaults during user stack read powerpc/mm: Check for matching hpte without taking hpte lock powerpc: Drop useless warning in eeh_init() powerpc/powernv: Cleanup unused MCE definitions/declarations. powerpc/eeh: Dump PHB diag-data early powerpc/eeh: Recover EEH error on ownership change for BCM5719 powerpc/eeh: Set EEH_PE_RESET on PE reset powerpc/eeh: Refactor eeh_reset_pe() powerpc: Remove more traces of bootmem powerpc/pseries: Initialise nvram_pstore_info's buf_lock cxl: Name interrupts in /proc/interrupt cxl: Return error to PSL if IRQ demultiplexing fails & print clearer warning ...
Diffstat (limited to 'arch/powerpc/platforms/powernv/opal.c')
-rw-r--r--arch/powerpc/platforms/powernv/opal.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c
index d019b081df9d..cb0b6de79cd4 100644
--- a/arch/powerpc/platforms/powernv/opal.c
+++ b/arch/powerpc/platforms/powernv/opal.c
@@ -50,7 +50,6 @@ static int mc_recoverable_range_len;
50 50
51struct device_node *opal_node; 51struct device_node *opal_node;
52static DEFINE_SPINLOCK(opal_write_lock); 52static DEFINE_SPINLOCK(opal_write_lock);
53extern u64 opal_mc_secondary_handler[];
54static unsigned int *opal_irqs; 53static unsigned int *opal_irqs;
55static unsigned int opal_irq_count; 54static unsigned int opal_irq_count;
56static ATOMIC_NOTIFIER_HEAD(opal_notifier_head); 55static ATOMIC_NOTIFIER_HEAD(opal_notifier_head);
@@ -644,6 +643,16 @@ static void __init opal_dump_region_init(void)
644 pr_warn("DUMP: Failed to register kernel log buffer. " 643 pr_warn("DUMP: Failed to register kernel log buffer. "
645 "rc = %d\n", rc); 644 "rc = %d\n", rc);
646} 645}
646
647static void opal_ipmi_init(struct device_node *opal_node)
648{
649 struct device_node *np;
650
651 for_each_child_of_node(opal_node, np)
652 if (of_device_is_compatible(np, "ibm,opal-ipmi"))
653 of_platform_device_create(np, NULL, NULL);
654}
655
647static int __init opal_init(void) 656static int __init opal_init(void)
648{ 657{
649 struct device_node *np, *consoles; 658 struct device_node *np, *consoles;
@@ -707,6 +716,8 @@ static int __init opal_init(void)
707 opal_msglog_init(); 716 opal_msglog_init();
708 } 717 }
709 718
719 opal_ipmi_init(opal_node);
720
710 return 0; 721 return 0;
711} 722}
712machine_subsys_initcall(powernv, opal_init); 723machine_subsys_initcall(powernv, opal_init);
@@ -742,6 +753,8 @@ void opal_shutdown(void)
742 753
743/* Export this so that test modules can use it */ 754/* Export this so that test modules can use it */
744EXPORT_SYMBOL_GPL(opal_invalid_call); 755EXPORT_SYMBOL_GPL(opal_invalid_call);
756EXPORT_SYMBOL_GPL(opal_ipmi_send);
757EXPORT_SYMBOL_GPL(opal_ipmi_recv);
745 758
746/* Convert a region of vmalloc memory to an opal sg list */ 759/* Convert a region of vmalloc memory to an opal sg list */
747struct opal_sg_list *opal_vmalloc_to_sg_list(void *vmalloc_addr, 760struct opal_sg_list *opal_vmalloc_to_sg_list(void *vmalloc_addr,
@@ -805,3 +818,9 @@ void opal_free_sg_list(struct opal_sg_list *sg)
805 sg = NULL; 818 sg = NULL;
806 } 819 }
807} 820}
821
822EXPORT_SYMBOL_GPL(opal_poll_events);
823EXPORT_SYMBOL_GPL(opal_rtc_read);
824EXPORT_SYMBOL_GPL(opal_rtc_write);
825EXPORT_SYMBOL_GPL(opal_tpo_read);
826EXPORT_SYMBOL_GPL(opal_tpo_write);