diff for duplicates of <20130215000108.GD17099@iris.ozlabs.ibm.com> diff --git a/a/1.txt b/N1/1.txt index 9f7a379..7722acd 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -337,7 +337,7 @@ index 4efa4a4..94cec5b 100644 +static int kvmppc_h_pr_xics_hcall(struct kvm_vcpu *vcpu, u32 cmd) +{ + long rc = kvmppc_xics_hcall(vcpu, cmd); -+ if (rc = H_TOO_HARD) ++ if (rc == H_TOO_HARD) + return EMULATE_FAIL; + kvmppc_set_gpr(vcpu, 3, rc); + return EMULATE_DONE; @@ -464,7 +464,8 @@ index 0000000..7749060 + +/* + * LOCKING -+ * ===+ * ++ * ======= ++ * + * Each ICS has a mutex protecting the information about the IRQ + * sources and avoiding simultaneous deliveries if the same interrupt. + * @@ -474,7 +475,7 @@ index 0000000..7749060 + +/* + * TODO -+ * == ++ * ==== + * + * - To speed up resends, keep a bitmap of "resend" set bits in the + * ICS @@ -512,9 +513,9 @@ index 0000000..7749060 + * we are the only setter, thus concurrent access is undefined + * to begin with. + */ -+ if (level = KVM_INTERRUPT_SET_LEVEL) ++ if (level == KVM_INTERRUPT_SET_LEVEL) + state->asserted = 1; -+ else if (level = KVM_INTERRUPT_UNSET) { ++ else if (level == KVM_INTERRUPT_UNSET) { + state->asserted = 0; + return; + } @@ -626,7 +627,7 @@ index 0000000..7749060 + new.out_ee = (new.xisr && (new.pending_pri < new.cppr)); + + /* Attempt atomic update */ -+ success = cmpxchg64(&icp->state.raw, old.raw, new.raw) = old.raw; ++ success = cmpxchg64(&icp->state.raw, old.raw, new.raw) == old.raw; + if (!success) + goto bail; + @@ -782,7 +783,7 @@ index 0000000..7749060 + * implementation will differ from PAPR and not lose such + * interrupts. + */ -+ if (state->priority = MASKED) { ++ if (state->priority == MASKED) { + XICS_DBG("irq %#x masked pending\n", new_irq); + state->masked_pending = 1; + goto out; @@ -957,7 +958,7 @@ index 0000000..7749060 + XICS_DBG("h_ipi vcpu %d to server %lu mfrr %#lx\n", + vcpu->vcpu_id, server, mfrr); + -+ local = vcpu->vcpu_id = server; ++ local = vcpu->vcpu_id == server; + if (local) + icp = vcpu->arch.icp; + else @@ -1031,7 +1032,7 @@ index 0000000..7749060 + */ + if (cppr > icp->state.cppr) + icp_down_cppr(xics, icp, cppr); -+ else if (cppr = icp->state.cppr) ++ else if (cppr == icp->state.cppr) + return; + + /* @@ -1098,7 +1099,7 @@ index 0000000..7749060 + icp_down_cppr(xics, icp, xirr >> 24); + + /* IPIs have no EOI */ -+ if (irq = XICS_IPI) ++ if (irq == XICS_IPI) + return H_SUCCESS; + /* + * EOI handling: If the interrupt is still asserted, we need to @@ -1162,7 +1163,7 @@ index 0000000..7749060 + if (!kvm) + return 0; + -+ seq_printf(m, "=====\nICP state\n=====\n"); ++ seq_printf(m, "=========\nICP state\n=========\n"); + + kvm_for_each_vcpu(i, vcpu, kvm) { + struct kvmppc_icp *icp = vcpu->arch.icp; @@ -1184,7 +1185,7 @@ index 0000000..7749060 + if (!ics) + continue; + -+ seq_printf(m, "=====\nICS state for ICS 0x%x\n=====\n", ++ seq_printf(m, "=========\nICS state for ICS 0x%x\n=========\n", + icsid); + + mutex_lock(&ics->lock); @@ -1354,7 +1355,7 @@ index 0000000..7749060 + break; + val = irqp->server; + val |= ((u64)irqp->priority << KVM_IRQ_PRIORITY_SHIFT); -+ if (irqp->priority = MASKED) ++ if (irqp->priority == MASKED) + val |= KVM_IRQ_MASKED; + if (irqp->asserted) + val |= KVM_IRQ_LEVEL_SENSITIVE | @@ -1625,7 +1626,7 @@ index 0000000..0e20a51 + int i; + + kvm_for_each_vcpu(i, vcpu, kvm) { -+ if (nr = vcpu->vcpu_id) ++ if (nr == vcpu->vcpu_id) + return vcpu->arch.icp; + } + return NULL; @@ -1684,7 +1685,7 @@ index 1772883..3bcc030 100644 + if (copy_from_user(&args, argp, sizeof(args))) + break; + r = -EINVAL; -+ if (args.type = KVM_IRQCHIP_TYPE_XICS) ++ if (args.type == KVM_IRQCHIP_TYPE_XICS) + r = kvmppc_xics_create(kvm, &args); + break; + } diff --git a/a/content_digest b/N1/content_digest index b9e4dde..dce8886 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,7 +1,7 @@ "ref\020130214235907.GA17099@iris.ozlabs.ibm.com\0" "From\0Paul Mackerras <paulus@samba.org>\0" "Subject\0[PATCH 3/9] KVM: PPC: Book3S: Add kernel emulation for the XICS interrupt controller\0" - "Date\0Fri, 15 Feb 2013 00:01:08 +0000\0" + "Date\0Fri, 15 Feb 2013 11:01:08 +1100\0" "To\0Alexander Graf <agraf@suse.de>\0" "Cc\0kvm@vger.kernel.org" " kvm-ppc@vger.kernel.org\0" @@ -346,7 +346,7 @@ "+static int kvmppc_h_pr_xics_hcall(struct kvm_vcpu *vcpu, u32 cmd)\n" "+{\n" "+\tlong rc = kvmppc_xics_hcall(vcpu, cmd);\n" - "+\tif (rc = H_TOO_HARD)\n" + "+\tif (rc == H_TOO_HARD)\n" "+\t\treturn EMULATE_FAIL;\n" "+\tkvmppc_set_gpr(vcpu, 3, rc);\n" "+\treturn EMULATE_DONE;\n" @@ -473,7 +473,8 @@ "+\n" "+/*\n" "+ * LOCKING\n" - "+ * ===+ *\n" + "+ * =======\n" + "+ *\n" "+ * Each ICS has a mutex protecting the information about the IRQ\n" "+ * sources and avoiding simultaneous deliveries if the same interrupt.\n" "+ *\n" @@ -483,7 +484,7 @@ "+\n" "+/*\n" "+ * TODO\n" - "+ * ==\n" + "+ * ====\n" "+ *\n" "+ * - To speed up resends, keep a bitmap of \"resend\" set bits in the\n" "+ * ICS\n" @@ -521,9 +522,9 @@ "+\t * we are the only setter, thus concurrent access is undefined\n" "+\t * to begin with.\n" "+\t */\n" - "+\tif (level = KVM_INTERRUPT_SET_LEVEL)\n" + "+\tif (level == KVM_INTERRUPT_SET_LEVEL)\n" "+\t\tstate->asserted = 1;\n" - "+\telse if (level = KVM_INTERRUPT_UNSET) {\n" + "+\telse if (level == KVM_INTERRUPT_UNSET) {\n" "+\t\tstate->asserted = 0;\n" "+\t\treturn;\n" "+\t}\n" @@ -635,7 +636,7 @@ "+\tnew.out_ee = (new.xisr && (new.pending_pri < new.cppr));\n" "+\n" "+\t/* Attempt atomic update */\n" - "+\tsuccess = cmpxchg64(&icp->state.raw, old.raw, new.raw) = old.raw;\n" + "+\tsuccess = cmpxchg64(&icp->state.raw, old.raw, new.raw) == old.raw;\n" "+\tif (!success)\n" "+\t\tgoto bail;\n" "+\n" @@ -791,7 +792,7 @@ "+\t * implementation will differ from PAPR and not lose such\n" "+\t * interrupts.\n" "+\t */\n" - "+\tif (state->priority = MASKED) {\n" + "+\tif (state->priority == MASKED) {\n" "+\t\tXICS_DBG(\"irq %#x masked pending\\n\", new_irq);\n" "+\t\tstate->masked_pending = 1;\n" "+\t\tgoto out;\n" @@ -966,7 +967,7 @@ "+\tXICS_DBG(\"h_ipi vcpu %d to server %lu mfrr %#lx\\n\",\n" "+\t\t\tvcpu->vcpu_id, server, mfrr);\n" "+\n" - "+\tlocal = vcpu->vcpu_id = server;\n" + "+\tlocal = vcpu->vcpu_id == server;\n" "+\tif (local)\n" "+\t\ticp = vcpu->arch.icp;\n" "+\telse\n" @@ -1040,7 +1041,7 @@ "+\t */\n" "+\tif (cppr > icp->state.cppr)\n" "+\t\ticp_down_cppr(xics, icp, cppr);\n" - "+\telse if (cppr = icp->state.cppr)\n" + "+\telse if (cppr == icp->state.cppr)\n" "+\t\treturn;\n" "+\n" "+\t/*\n" @@ -1107,7 +1108,7 @@ "+\ticp_down_cppr(xics, icp, xirr >> 24);\n" "+\n" "+\t/* IPIs have no EOI */\n" - "+\tif (irq = XICS_IPI)\n" + "+\tif (irq == XICS_IPI)\n" "+\t\treturn H_SUCCESS;\n" "+\t/*\n" "+\t * EOI handling: If the interrupt is still asserted, we need to\n" @@ -1171,7 +1172,7 @@ "+\tif (!kvm)\n" "+\t\treturn 0;\n" "+\n" - "+\tseq_printf(m, \"=====\\nICP state\\n=====\\n\");\n" + "+\tseq_printf(m, \"=========\\nICP state\\n=========\\n\");\n" "+\n" "+\tkvm_for_each_vcpu(i, vcpu, kvm) {\n" "+\t\tstruct kvmppc_icp *icp = vcpu->arch.icp;\n" @@ -1193,7 +1194,7 @@ "+\t\tif (!ics)\n" "+\t\t\tcontinue;\n" "+\n" - "+\t\tseq_printf(m, \"=====\\nICS state for ICS 0x%x\\n=====\\n\",\n" + "+\t\tseq_printf(m, \"=========\\nICS state for ICS 0x%x\\n=========\\n\",\n" "+\t\t\t icsid);\n" "+\n" "+\t\tmutex_lock(&ics->lock);\n" @@ -1363,7 +1364,7 @@ "+\t\t\t\tbreak;\n" "+\t\t\tval = irqp->server;\n" "+\t\t\tval |= ((u64)irqp->priority << KVM_IRQ_PRIORITY_SHIFT);\n" - "+\t\t\tif (irqp->priority = MASKED)\n" + "+\t\t\tif (irqp->priority == MASKED)\n" "+\t\t\t\tval |= KVM_IRQ_MASKED;\n" "+\t\t\tif (irqp->asserted)\n" "+\t\t\t\tval |= KVM_IRQ_LEVEL_SENSITIVE |\n" @@ -1634,7 +1635,7 @@ "+\tint i;\n" "+\n" "+\tkvm_for_each_vcpu(i, vcpu, kvm) {\n" - "+\t\tif (nr = vcpu->vcpu_id)\n" + "+\t\tif (nr == vcpu->vcpu_id)\n" "+\t\t\treturn vcpu->arch.icp;\n" "+\t}\n" "+\treturn NULL;\n" @@ -1693,7 +1694,7 @@ "+\t\tif (copy_from_user(&args, argp, sizeof(args)))\n" "+\t\t\tbreak;\n" "+\t\tr = -EINVAL;\n" - "+\t\tif (args.type = KVM_IRQCHIP_TYPE_XICS)\n" + "+\t\tif (args.type == KVM_IRQCHIP_TYPE_XICS)\n" "+\t\t\tr = kvmppc_xics_create(kvm, &args);\n" "+\t\tbreak;\n" "+\t}\n" @@ -1771,4 +1772,4 @@ "-- \n" 1.7.10.rc3.219.g53414 -ff96adf92f6e0a4b88d20188037848d42a2c8271428eb2ec07b32d1b255cf544 +ab0c3c2807b7752e824b1bafe3533771bec48068242680b7b8783f303a342549
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.