aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/cxl/native.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-11-16 15:47:46 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2017-11-16 15:47:46 -0500
commit5b0e2cb020085efe202123162502e0b551e49a0e (patch)
tree534bbb4c9f98c2ed9a520e11107029e5df38c3c2 /drivers/misc/cxl/native.c
parent758f875848d78148cf9a9cdb3ff1ddf29b234056 (diff)
parent3ffa9d9e2a7c10127d8cbf91ea2be15390b450ed (diff)
Merge tag 'powerpc-4.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc updates from Michael Ellerman: "A bit of a small release, I suspect in part due to me travelling for KS. But my backlog of patches to review is smaller than usual, so I think in part folks just didn't send as much this cycle. Non-highlights: - Five fixes for the >128T address space handling, both to fix bugs in our implementation and to bring the semantics exactly into line with x86. Highlights: - Support for a new OPAL call on bare metal machines which gives us a true NMI (ie. is not masked by MSR[EE]=0) for debugging etc. - Support for Power9 DD2 in the CXL driver. - Improvements to machine check handling so that uncorrectable errors can be reported into the generic memory_failure() machinery. - Some fixes and improvements for VPHN, which is used under PowerVM to notify the Linux partition of topology changes. - Plumbing to enable TM (transactional memory) without suspend on some Power9 processors (PPC_FEATURE2_HTM_NO_SUSPEND). - Support for emulating vector loads form cache-inhibited memory, on some Power9 revisions. - Disable the fast-endian switch "syscall" by default (behind a CONFIG), we believe it has never had any users. - A major rework of the API drivers use when initiating and waiting for long running operations performed by OPAL firmware, and changes to the powernv_flash driver to use the new API. - Several fixes for the handling of FP/VMX/VSX while processes are using transactional memory. - Optimisations of TLB range flushes when using the radix MMU on Power9. - Improvements to the VAS facility used to access coprocessors on Power9, and related improvements to the way the NX crypto driver handles requests. - Implementation of PMEM_API and UACCESS_FLUSHCACHE for 64-bit. Thanks to: Alexey Kardashevskiy, Alistair Popple, Allen Pais, Andrew Donnellan, Aneesh Kumar K.V, Arnd Bergmann, Balbir Singh, Benjamin Herrenschmidt, Breno Leitao, Christophe Leroy, Christophe Lombard, Cyril Bur, Frederic Barrat, Gautham R. Shenoy, Geert Uytterhoeven, Guilherme G. Piccoli, Gustavo Romero, Haren Myneni, Joel Stanley, Kamalesh Babulal, Kautuk Consul, Markus Elfring, Masami Hiramatsu, Michael Bringmann, Michael Neuling, Michal Suchanek, Naveen N. Rao, Nicholas Piggin, Oliver O'Halloran, Paul Mackerras, Pedro Miraglia Franco de Carvalho, Philippe Bergheaud, Sandipan Das, Seth Forshee, Shriya, Stephen Rothwell, Stewart Smith, Sukadev Bhattiprolu, Tyrel Datwyler, Vaibhav Jain, Vaidyanathan Srinivasan, and William A. Kennington III" * tag 'powerpc-4.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (151 commits) powerpc/64s: Fix Power9 DD2.0 workarounds by adding DD2.1 feature powerpc/64s: Fix masking of SRR1 bits on instruction fault powerpc/64s: mm_context.addr_limit is only used on hash powerpc/64s/radix: Fix 128TB-512TB virtual address boundary case allocation powerpc/64s/hash: Allow MAP_FIXED allocations to cross 128TB boundary powerpc/64s/hash: Fix fork() with 512TB process address space powerpc/64s/hash: Fix 128TB-512TB virtual address boundary case allocation powerpc/64s/hash: Fix 512T hint detection to use >= 128T powerpc: Fix DABR match on hash based systems powerpc/signal: Properly handle return value from uprobe_deny_signal() powerpc/fadump: use kstrtoint to handle sysfs store powerpc/lib: Implement UACCESS_FLUSHCACHE API powerpc/lib: Implement PMEM API powerpc/powernv/npu: Don't explicitly flush nmmu tlb powerpc/powernv/npu: Use flush_all_mm() instead of flush_tlb_mm() powerpc/powernv/idle: Round up latency and residency values powerpc/kprobes: refactor kprobe_lookup_name for safer string operations powerpc/kprobes: Blacklist emulate_update_regs() from kprobes powerpc/kprobes: Do not disable interrupts for optprobes and kprobes_on_ftrace powerpc/kprobes: Disable preemption before invoking probe handler for optprobes ...
Diffstat (limited to 'drivers/misc/cxl/native.c')
-rw-r--r--drivers/misc/cxl/native.c27
1 files changed, 21 insertions, 6 deletions
diff --git a/drivers/misc/cxl/native.c b/drivers/misc/cxl/native.c
index 4a82c313cf71..02b6b45b4c20 100644
--- a/drivers/misc/cxl/native.c
+++ b/drivers/misc/cxl/native.c
@@ -897,6 +897,14 @@ int cxl_attach_dedicated_process_psl9(struct cxl_context *ctx, u64 wed, u64 amr)
897 if (ctx->afu->adapter->native->sl_ops->update_dedicated_ivtes) 897 if (ctx->afu->adapter->native->sl_ops->update_dedicated_ivtes)
898 afu->adapter->native->sl_ops->update_dedicated_ivtes(ctx); 898 afu->adapter->native->sl_ops->update_dedicated_ivtes(ctx);
899 899
900 ctx->elem->software_state = cpu_to_be32(CXL_PE_SOFTWARE_STATE_V);
901 /*
902 * Ideally we should do a wmb() here to make sure the changes to the
903 * PE are visible to the card before we call afu_enable.
904 * On ppc64 though all mmios are preceded by a 'sync' instruction hence
905 * we dont dont need one here.
906 */
907
900 result = cxl_ops->afu_reset(afu); 908 result = cxl_ops->afu_reset(afu);
901 if (result) 909 if (result)
902 return result; 910 return result;
@@ -1077,13 +1085,11 @@ static int native_get_irq_info(struct cxl_afu *afu, struct cxl_irq_info *info)
1077 1085
1078void cxl_native_irq_dump_regs_psl9(struct cxl_context *ctx) 1086void cxl_native_irq_dump_regs_psl9(struct cxl_context *ctx)
1079{ 1087{
1080 u64 fir1, fir2, serr; 1088 u64 fir1, serr;
1081 1089
1082 fir1 = cxl_p1_read(ctx->afu->adapter, CXL_PSL9_FIR1); 1090 fir1 = cxl_p1_read(ctx->afu->adapter, CXL_PSL9_FIR1);
1083 fir2 = cxl_p1_read(ctx->afu->adapter, CXL_PSL9_FIR2);
1084 1091
1085 dev_crit(&ctx->afu->dev, "PSL_FIR1: 0x%016llx\n", fir1); 1092 dev_crit(&ctx->afu->dev, "PSL_FIR1: 0x%016llx\n", fir1);
1086 dev_crit(&ctx->afu->dev, "PSL_FIR2: 0x%016llx\n", fir2);
1087 if (ctx->afu->adapter->native->sl_ops->register_serr_irq) { 1093 if (ctx->afu->adapter->native->sl_ops->register_serr_irq) {
1088 serr = cxl_p1n_read(ctx->afu, CXL_PSL_SERR_An); 1094 serr = cxl_p1n_read(ctx->afu, CXL_PSL_SERR_An);
1089 cxl_afu_decode_psl_serr(ctx->afu, serr); 1095 cxl_afu_decode_psl_serr(ctx->afu, serr);
@@ -1257,14 +1263,23 @@ static irqreturn_t native_slice_irq_err(int irq, void *data)
1257 return IRQ_HANDLED; 1263 return IRQ_HANDLED;
1258} 1264}
1259 1265
1260void cxl_native_err_irq_dump_regs(struct cxl *adapter) 1266void cxl_native_err_irq_dump_regs_psl9(struct cxl *adapter)
1267{
1268 u64 fir1;
1269
1270 fir1 = cxl_p1_read(adapter, CXL_PSL9_FIR1);
1271 dev_crit(&adapter->dev, "PSL_FIR: 0x%016llx\n", fir1);
1272}
1273
1274void cxl_native_err_irq_dump_regs_psl8(struct cxl *adapter)
1261{ 1275{
1262 u64 fir1, fir2; 1276 u64 fir1, fir2;
1263 1277
1264 fir1 = cxl_p1_read(adapter, CXL_PSL_FIR1); 1278 fir1 = cxl_p1_read(adapter, CXL_PSL_FIR1);
1265 fir2 = cxl_p1_read(adapter, CXL_PSL_FIR2); 1279 fir2 = cxl_p1_read(adapter, CXL_PSL_FIR2);
1266 1280 dev_crit(&adapter->dev,
1267 dev_crit(&adapter->dev, "PSL_FIR1: 0x%016llx\nPSL_FIR2: 0x%016llx\n", fir1, fir2); 1281 "PSL_FIR1: 0x%016llx\nPSL_FIR2: 0x%016llx\n",
1282 fir1, fir2);
1268} 1283}
1269 1284
1270static irqreturn_t native_irq_err(int irq, void *data) 1285static irqreturn_t native_irq_err(int irq, void *data)