diff for duplicates of <20130411055400.GD9042@drongo> diff --git a/a/1.txt b/N1/1.txt index b2b23d9..aa04b57 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -126,7 +126,7 @@ index f4e66c4..5f5821b 100644 +#ifdef CONFIG_PPC_BOOK3S_64 +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); @@ -240,7 +240,7 @@ index 4efa4a4..9802245 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; @@ -367,7 +367,8 @@ index 0000000..175a3c2 + +/* + * LOCKING -+ * ===+ * ++ * ======= ++ * + * Each ICS has a mutex protecting the information about the IRQ + * sources and avoiding simultaneous deliveries if the same interrupt. + * @@ -377,7 +378,7 @@ index 0000000..175a3c2 + +/* + * TODO -+ * == ++ * ==== + * + * - To speed up resends, keep a bitmap of "resend" set bits in the + * ICS @@ -417,9 +418,9 @@ index 0000000..175a3c2 + * 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; + } @@ -533,7 +534,7 @@ index 0000000..175a3c2 + 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; + @@ -689,7 +690,7 @@ index 0000000..175a3c2 + * 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; @@ -864,7 +865,7 @@ index 0000000..175a3c2 + 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 @@ -938,7 +939,7 @@ index 0000000..175a3c2 + */ + if (cppr > icp->state.cppr) + icp_down_cppr(xics, icp, cppr); -+ else if (cppr = icp->state.cppr) ++ else if (cppr == icp->state.cppr) + return; + + /* @@ -1005,7 +1006,7 @@ index 0000000..175a3c2 + 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 @@ -1069,7 +1070,7 @@ index 0000000..175a3c2 + 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; @@ -1091,7 +1092,7 @@ index 0000000..175a3c2 + 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); @@ -1371,7 +1372,7 @@ index 0000000..c44034f + 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 af092b9..7ef1360 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,7 +1,7 @@ "ref\020130411055205.GB9042@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, 11 Apr 2013 05:54:00 +0000\0" + "Date\0Thu, 11 Apr 2013 15:54:00 +1000\0" "To\0Alexander Graf <agraf@suse.de>\0" "Cc\0kvm@vger.kernel.org" kvm-ppc@vger.kernel.org @@ -136,7 +136,7 @@ "+#ifdef CONFIG_PPC_BOOK3S_64\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" @@ -250,7 +250,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" @@ -377,7 +377,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" @@ -387,7 +388,7 @@ "+\n" "+/*\n" "+ * TODO\n" - "+ * ==\n" + "+ * ====\n" "+ *\n" "+ * - To speed up resends, keep a bitmap of \"resend\" set bits in the\n" "+ * ICS\n" @@ -427,9 +428,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" @@ -543,7 +544,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" @@ -699,7 +700,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" @@ -874,7 +875,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" @@ -948,7 +949,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" @@ -1015,7 +1016,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" @@ -1079,7 +1080,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" @@ -1101,7 +1102,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" @@ -1381,7 +1382,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" @@ -1425,4 +1426,4 @@ "-- \n" 1.7.10.4 -cf34501ecb5d56e9de5b1ca0e20faa401ac797d1a447a9a627edefb7c90b7eca +8f0e71d1baaee3ae9762562bb1416d0ca91b47a0b4e8a869e75f4943f46356d5
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.