diff for duplicates of <20130418063026.GC25033@drongo> diff --git a/a/1.txt b/N1/1.txt index 8512ce7..7d400d3 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -129,7 +129,7 @@ index 948b4c2..7cb8a71 100644 +#ifdef CONFIG_KVM_XICS +static inline int kvmppc_xics_enabled(struct kvm_vcpu *vcpu) +{ -+ return vcpu->arch.irq_type = KVMPPC_IRQ_XICS; ++ return vcpu->arch.irq_type == KVMPPC_IRQ_XICS; +} +extern void kvmppc_xics_free_icp(struct kvm_vcpu *vcpu); +extern int kvmppc_xics_create_icp(struct kvm_vcpu *vcpu, unsigned long server); @@ -359,7 +359,8 @@ index 0000000..53af848 + +/* + * LOCKING -+ * ===+ * ++ * ======= ++ * + * Each ICS has a mutex protecting the information about the IRQ + * sources and avoiding simultaneous deliveries if the same interrupt. + * @@ -369,7 +370,7 @@ index 0000000..53af848 + +/* + * TODO -+ * == ++ * ==== + * + * - To speed up resends, keep a bitmap of "resend" set bits in the + * ICS @@ -409,9 +410,9 @@ index 0000000..53af848 + * 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 0; + } @@ -525,7 +526,7 @@ index 0000000..53af848 + 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; + @@ -681,7 +682,7 @@ index 0000000..53af848 + * 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; @@ -857,7 +858,7 @@ index 0000000..53af848 + vcpu->vcpu_id, server, mfrr); + + icp = vcpu->arch.icp; -+ local = icp->server_num = server; ++ local = icp->server_num == server; + if (!local) { + icp = kvmppc_xics_find_server(vcpu->kvm, server); + if (!icp) @@ -930,7 +931,7 @@ index 0000000..53af848 + */ + if (cppr > icp->state.cppr) + icp_down_cppr(xics, icp, cppr); -+ else if (cppr = icp->state.cppr) ++ else if (cppr == icp->state.cppr) + return; + + /* @@ -997,7 +998,7 @@ index 0000000..53af848 + 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 @@ -1061,7 +1062,7 @@ index 0000000..53af848 + 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; @@ -1083,7 +1084,7 @@ index 0000000..53af848 + 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); @@ -1364,7 +1365,7 @@ index 0000000..58ee190 + int i; + + kvm_for_each_vcpu(i, vcpu, kvm) { -+ if (vcpu->arch.icp && nr = vcpu->arch.icp->server_num) ++ if (vcpu->arch.icp && nr == vcpu->arch.icp->server_num) + return vcpu->arch.icp; + } + return NULL; diff --git a/a/content_digest b/N1/content_digest index 9887d9d..43d6dc3 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,7 +1,7 @@ "ref\020130418062926.GA25033@drongo\0" "From\0Paul Mackerras <paulus@samba.org>\0" "Subject\0[PATCH 2/8] KVM: PPC: Book3S: Add kernel emulation for the XICS interrupt controller\0" - "Date\0Thu, 18 Apr 2013 06:30:26 +0000\0" + "Date\0Thu, 18 Apr 2013 16:30:26 +1000\0" "To\0Alexander Graf <agraf@suse.de>\0" "Cc\0kvm@vger.kernel.org" kvm-ppc@vger.kernel.org @@ -139,7 +139,7 @@ "+#ifdef CONFIG_KVM_XICS\n" "+static inline int kvmppc_xics_enabled(struct kvm_vcpu *vcpu)\n" "+{\n" - "+\treturn vcpu->arch.irq_type = KVMPPC_IRQ_XICS;\n" + "+\treturn vcpu->arch.irq_type == KVMPPC_IRQ_XICS;\n" "+}\n" "+extern void kvmppc_xics_free_icp(struct kvm_vcpu *vcpu);\n" "+extern int kvmppc_xics_create_icp(struct kvm_vcpu *vcpu, unsigned long server);\n" @@ -369,7 +369,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" @@ -379,7 +380,7 @@ "+\n" "+/*\n" "+ * TODO\n" - "+ * ==\n" + "+ * ====\n" "+ *\n" "+ * - To speed up resends, keep a bitmap of \"resend\" set bits in the\n" "+ * ICS\n" @@ -419,9 +420,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 0;\n" "+\t}\n" @@ -535,7 +536,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" @@ -691,7 +692,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" @@ -867,7 +868,7 @@ "+\t\t vcpu->vcpu_id, server, mfrr);\n" "+\n" "+\ticp = vcpu->arch.icp;\n" - "+\tlocal = icp->server_num = server;\n" + "+\tlocal = icp->server_num == server;\n" "+\tif (!local) {\n" "+\t\ticp = kvmppc_xics_find_server(vcpu->kvm, server);\n" "+\t\tif (!icp)\n" @@ -940,7 +941,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" @@ -1007,7 +1008,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" @@ -1071,7 +1072,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" @@ -1093,7 +1094,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" @@ -1374,7 +1375,7 @@ "+\tint i;\n" "+\n" "+\tkvm_for_each_vcpu(i, vcpu, kvm) {\n" - "+\t\tif (vcpu->arch.icp && nr = vcpu->arch.icp->server_num)\n" + "+\t\tif (vcpu->arch.icp && nr == vcpu->arch.icp->server_num)\n" "+\t\t\treturn vcpu->arch.icp;\n" "+\t}\n" "+\treturn NULL;\n" @@ -1416,4 +1417,4 @@ "-- \n" 1.7.10.4 -e72bbc61ad2018417a1ea1fb2f2f6217b227b82a9c3b364ce77d953b25408889 +d18a51178f9b0517cf57c0590333918960c74942ca0ebff8d3149dab18884fb3
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.