--- zzzz-none-000/linux-3.10.107/arch/powerpc/platforms/pseries/dtl.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/arch/powerpc/platforms/pseries/dtl.c 2021-02-04 17:41:59.000000000 +0000 @@ -20,7 +20,6 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include #include #include @@ -29,8 +28,8 @@ #include #include #include - -#include "plpar_wrappers.h" +#include +#include struct dtl { struct dtl_entry *buf; @@ -76,7 +75,7 @@ */ static void consume_dtle(struct dtl_entry *dtle, u64 index) { - struct dtl_ring *dtlr = &__get_cpu_var(dtl_rings); + struct dtl_ring *dtlr = this_cpu_ptr(&dtl_rings); struct dtl_entry *wp = dtlr->write_ptr; struct lppaca *vpa = local_paca->lppaca_ptr; @@ -87,7 +86,7 @@ barrier(); /* check for hypervisor ring buffer overflow, ignore this entry if so */ - if (index + N_DISPATCH_LOG < vpa->dtl_idx) + if (index + N_DISPATCH_LOG < be64_to_cpu(vpa->dtl_idx)) return; ++wp; @@ -393,4 +392,4 @@ err: return rc; } -arch_initcall(dtl_init); +machine_arch_initcall(pseries, dtl_init);