diff for duplicates of <20121105032109.GD22409@drongo> diff --git a/a/1.txt b/N1/1.txt index 8939f78..8af9131 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -329,7 +329,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; @@ -458,7 +458,8 @@ index 0000000..1538be2 + +/* + * LOCKING -+ * ===+ * ++ * ======= ++ * + * Each ICS has a mutex protecting the information about the IRQ + * sources and avoiding simultaneous deliveries if the same interrupt. + * @@ -468,7 +469,8 @@ index 0000000..1538be2 + +/* + * Interrupt numbering -+ * =========+ * ++ * =================== ++ * + * The 24-bit global interrupt numbers are divided in two components, + * the BUID and the interrupt source. We have arbitrarily chosen a + * 10 bit @@ -476,7 +478,7 @@ index 0000000..1538be2 + +/* + * TODO -+ * == ++ * ==== + * + * - To speed up resends, keep a bitmap of "resend" set bits in the + * ICS @@ -547,7 +549,7 @@ index 0000000..1538be2 + 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; @@ -601,9 +603,9 @@ index 0000000..1538be2 + * 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; + } @@ -715,7 +717,7 @@ index 0000000..1538be2 + 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; + @@ -871,7 +873,7 @@ index 0000000..1538be2 + * 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; @@ -1046,7 +1048,7 @@ index 0000000..1538be2 + 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 @@ -1120,7 +1122,7 @@ index 0000000..1538be2 + */ + if (cppr > icp->state.cppr) + icp_down_cppr(xics, icp, cppr); -+ else if (cppr = icp->state.cppr) ++ else if (cppr == icp->state.cppr) + return; + + /* @@ -1187,7 +1189,7 @@ index 0000000..1538be2 + 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 @@ -1251,7 +1253,7 @@ index 0000000..1538be2 + 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; @@ -1273,7 +1275,7 @@ index 0000000..1538be2 + if (!ics) + continue; + -+ seq_printf(m, "=====\nICS state for BUID 0x%x\n=====\n", ++ seq_printf(m, "=========\nICS state for BUID 0x%x\n=========\n", + buid); + + mutex_lock(&ics->lock); @@ -1448,13 +1450,13 @@ index 0000000..1538be2 + buid = args->ics.buid; + + /* BUID 0 is bogus */ -+ if (buid = 0) { ++ if (buid == 0) { + rc = 0; + goto out; + } + + /* Sanity checks */ -+ if (nr_irqs = 0 || nr_irqs > KVMPPC_XICS_IRQ_COUNT || ++ if (nr_irqs == 0 || nr_irqs > KVMPPC_XICS_IRQ_COUNT || + buid > KVMPPC_XICS_MAX_BUID) + return -EINVAL; + @@ -1511,9 +1513,9 @@ index 0000000..1538be2 + if (copy_from_user(&args, argp, sizeof(args))) + break; + rc = -EINVAL; -+ if (args.type = KVM_IRQCHIP_TYPE_ICP) ++ if (args.type == KVM_IRQCHIP_TYPE_ICP) + rc = kvm_vm_ioctl_create_icp(kvm, &args); -+ else if (args.type = KVM_IRQCHIP_TYPE_ICS) ++ else if (args.type == KVM_IRQCHIP_TYPE_ICS) + rc = kvm_vm_ioctl_create_ics(kvm, &args); + break; + } @@ -1567,7 +1569,7 @@ index ba552f8..90b5b5c 100644 + if (get_user(type, (u32 __user *)argp)) + break; + r = -EINVAL; -+ if (type = KVM_IRQCHIP_TYPE_ICP || type = KVM_IRQCHIP_TYPE_ICS) ++ if (type == KVM_IRQCHIP_TYPE_ICP || type == KVM_IRQCHIP_TYPE_ICS) + r = kvmppc_xics_ioctl(kvm, ioctl, arg); + break; + } diff --git a/a/content_digest b/N1/content_digest index fe288ae..5f96d6e 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,7 +1,7 @@ "ref\020121105031806.GA22409@drongo\0" "From\0Paul Mackerras <paulus@samba.org>\0" "Subject\0[RFC PATCH 3/9] KVM: PPC: Book3S: Add kernel emulation for the XICS interrupt controller\0" - "Date\0Mon, 05 Nov 2012 03:21:09 +0000\0" + "Date\0Mon, 5 Nov 2012 14:21:09 +1100\0" "To\0Alexander Graf <agraf@suse.de>\0" "Cc\0kvm@vger.kernel.org" kvm-ppc@vger.kernel.org @@ -339,7 +339,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" @@ -468,7 +468,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" @@ -478,7 +479,8 @@ "+\n" "+/*\n" "+ * Interrupt numbering\n" - "+ * =========+ *\n" + "+ * ===================\n" + "+ *\n" "+ * The 24-bit global interrupt numbers are divided in two components,\n" "+ * the BUID and the interrupt source. We have arbitrarily chosen a\n" "+ * 10 bit\n" @@ -486,7 +488,7 @@ "+\n" "+/*\n" "+ * TODO\n" - "+ * ==\n" + "+ * ====\n" "+ *\n" "+ * - To speed up resends, keep a bitmap of \"resend\" set bits in the\n" "+ * ICS\n" @@ -557,7 +559,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" @@ -611,9 +613,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" @@ -725,7 +727,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" @@ -881,7 +883,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" @@ -1056,7 +1058,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" @@ -1130,7 +1132,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" @@ -1197,7 +1199,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" @@ -1261,7 +1263,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" @@ -1283,7 +1285,7 @@ "+\t\tif (!ics)\n" "+\t\t\tcontinue;\n" "+\n" - "+\t\tseq_printf(m, \"=====\\nICS state for BUID 0x%x\\n=====\\n\",\n" + "+\t\tseq_printf(m, \"=========\\nICS state for BUID 0x%x\\n=========\\n\",\n" "+\t\t\t buid);\n" "+\n" "+\t\tmutex_lock(&ics->lock);\n" @@ -1458,13 +1460,13 @@ "+\tbuid = args->ics.buid;\n" "+\n" "+\t/* BUID 0 is bogus */\n" - "+\tif (buid = 0) {\n" + "+\tif (buid == 0) {\n" "+\t\trc = 0;\n" "+\t\tgoto out;\n" "+\t}\n" "+\n" "+\t/* Sanity checks */\n" - "+\tif (nr_irqs = 0 || nr_irqs > KVMPPC_XICS_IRQ_COUNT ||\n" + "+\tif (nr_irqs == 0 || nr_irqs > KVMPPC_XICS_IRQ_COUNT ||\n" "+\t buid > KVMPPC_XICS_MAX_BUID)\n" "+\t\treturn -EINVAL;\n" "+\n" @@ -1521,9 +1523,9 @@ "+\t\tif (copy_from_user(&args, argp, sizeof(args)))\n" "+\t\t\tbreak;\n" "+\t\trc = -EINVAL;\n" - "+\t\tif (args.type = KVM_IRQCHIP_TYPE_ICP)\n" + "+\t\tif (args.type == KVM_IRQCHIP_TYPE_ICP)\n" "+\t\t\trc = kvm_vm_ioctl_create_icp(kvm, &args);\n" - "+\t\telse if (args.type = KVM_IRQCHIP_TYPE_ICS)\n" + "+\t\telse if (args.type == KVM_IRQCHIP_TYPE_ICS)\n" "+\t\t\trc = kvm_vm_ioctl_create_ics(kvm, &args);\n" "+\t\tbreak;\n" "+\t}\n" @@ -1577,7 +1579,7 @@ "+\t\tif (get_user(type, (u32 __user *)argp))\n" "+\t\t\tbreak;\n" "+\t\tr = -EINVAL;\n" - "+\t\tif (type = KVM_IRQCHIP_TYPE_ICP || type = KVM_IRQCHIP_TYPE_ICS)\n" + "+\t\tif (type == KVM_IRQCHIP_TYPE_ICP || type == KVM_IRQCHIP_TYPE_ICS)\n" "+\t\t\tr = kvmppc_xics_ioctl(kvm, ioctl, arg);\n" "+\t\tbreak;\n" "+\t}\n" @@ -1618,4 +1620,4 @@ "-- \n" 1.7.10.4 -0e30a24b5fbdc7c22a0e28f0ceefe17408e925a95645926ada292533ad5059a4 +9583351c98c427e62ca0116d7b0039e5ff5388ec158c061426a5f59c640aa568
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.