From patchwork Mon Dec 12 08:35:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lai Jiangshan X-Patchwork-Id: 32265 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2118130wrr; Mon, 12 Dec 2022 00:35:49 -0800 (PST) X-Google-Smtp-Source: AA0mqf4b8wj9B2zire6PNERH+8ivrbB96vGtWsVvonT7OLhjnMjcXZun88WOzhW9SCOV6Z1Xq9MA X-Received: by 2002:a05:6a00:1a53:b0:56c:a62f:b9da with SMTP id h19-20020a056a001a5300b0056ca62fb9damr18438782pfv.27.1670834149430; Mon, 12 Dec 2022 00:35:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670834149; cv=none; d=google.com; s=arc-20160816; b=HIz5nqBq2S/cj4bFghPPRwG8v79aKWvyxRYInL03A6ylh1qKhkZ/Kud5P1k792hMVy Du/0KXoeFftioAHZSHj0lbVpAaW8F7ptnsMftqRzk7zhrndEaZzWj/nI5v0Ey0AvfLCl i9JLNYWMck/rt/7sqy+me0Pu0zL4XCn9QIjFCIpXUGwzeTTl7MkZxZL032guOPYNVWQ+ KlTBxvdPMjgWc0Sp36J5QYFamY5wCQqMOad6ysH7E0zvPTbbC7ULg3g5r+wYqhGPWNhM mUDgxZCJxOSWSYurBEySzxEk8AL/w22vIJsWPWbgb16+BUY5qCvmQOaQtRPAUenA9tu0 MRkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=3XG1FDSbN84YuWL1rhQtaPSVYHFaS7/iTj3wcBHrbpA=; b=L+ykfbFFCqlFX+7CzBejBEwCEM9xbH8raYTT2pUijG2Gh6EFOkC8aP4PrN/qJd5X18 KgmjF0tzVcq9xEnA0f1Cqvk9/F2VQ8PFuocwXCkZOhHNQLmlgUQ1q1WG4mUf5LRj9ddZ FL1ZuUgFOE66Np5uf95qpVbhnjQFMYf/EPefvoVomOixw9X5CrOUAyKdMCFcRPrX3exU +q/WZtkvNPlLphIUTr51CuiWWOR7oq8a+D+sMH5pteHTLnWnhjSsZOaNRrgnoJfTf2oF 6d6SQDvEBENExIlbYSWiK800cFtcBVclbh5hn/5Jsg9kWjum4PeEcMAlbuFjh2jrHICj VGBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=i2fkxJzf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j8-20020a056a00234800b0056c057b09b0si9604928pfj.216.2022.12.12.00.35.36; Mon, 12 Dec 2022 00:35:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=i2fkxJzf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231540AbiLLIeh (ORCPT + 99 others); Mon, 12 Dec 2022 03:34:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231536AbiLLIee (ORCPT ); Mon, 12 Dec 2022 03:34:34 -0500 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F663DFAA; Mon, 12 Dec 2022 00:34:33 -0800 (PST) Received: by mail-pj1-x1036.google.com with SMTP id o1-20020a17090a678100b00219cf69e5f0so14911901pjj.2; Mon, 12 Dec 2022 00:34:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=3XG1FDSbN84YuWL1rhQtaPSVYHFaS7/iTj3wcBHrbpA=; b=i2fkxJzf2YX4Ip9wNBJZ27KQGAbQLzBnlHnRn5qKMHlTU/PNg4qTp2IgGNKrEsmvDV ySdhelDfiYpTINSawG1WHEjuhE0llMwZ6GqWA8Kv8xmtBlMPvS7dyfA8Fnh0pFgXtMv5 MxJ69fFa8xEDPO3pn4gmXatB+9J/ibO4SZ7esoXWztb3JPYX1KS6ya/BGoEhiyfIHYfx RWvx1pxfkehwdOK6Iq/b5D4PoN3VDBhA/l42XhDZKfkanAjOdgyK90tOjbmV6KiEicah ZZLGsgi2k2sx+ehi35fgZbWxTQy6zF57VtJcULQ1QUjUVyp7LqV7Ktmi4IReNDhRUcB1 GBzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3XG1FDSbN84YuWL1rhQtaPSVYHFaS7/iTj3wcBHrbpA=; b=w/DanRSJkR3g/7WMtEzFUfYex5ix2mpQXyTvGUMB11m/5wMmeODD6TPtXsrHELZPOR WcN49rfgsCaOIDAS0c3jFtRzP0Sx1ja4Hul1JzO+55DC2KuuVNuMAwESxsXG887jXGr8 ZokzzZrHLv+xBV0lvTMP3Edd7AABdOAWyyO+CXCX6J31ZXG9OTm1ozzrg1f+p91Kkwfs IyWRL3cdtOjTGzGUoz27E553iE+sflPhDxQDn79OnwZNdaUmxXze7PkHZrPsrdLp8pQB zclvkgbJli+IV9vp60qqZfXuFXrmmoS22PGwlVle61C3anaC5A9TV5gwzWBptXfIP1PT mFsA== X-Gm-Message-State: ANoB5plUCXss/1xxnHoKloGkFHWAKpiYB737Ts2Iilo5+jzQ7kmcpBlL CJHexHqsCJxgj44hEvJqFh8CYcil0Vw= X-Received: by 2002:a05:6a20:c194:b0:ad:600c:54b1 with SMTP id bg20-20020a056a20c19400b000ad600c54b1mr8199425pzb.59.1670834072041; Mon, 12 Dec 2022 00:34:32 -0800 (PST) Received: from localhost ([47.254.32.37]) by smtp.gmail.com with ESMTPSA id r19-20020a170902c61300b0017a032d7ae4sm5703554plr.104.2022.12.12.00.34.31 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Dec 2022 00:34:31 -0800 (PST) From: Lai Jiangshan To: linux-kernel@vger.kernel.org Cc: Sean Christopherson , Lai Jiangshan , Paolo Bonzini , kvm@vger.kernel.org Subject: [PATCH V2] kvm: Remove the unused macro KVM_MMU_READ_[UN]LOCK() Date: Mon, 12 Dec 2022 16:35:32 +0800 Message-Id: <20221212083532.369940-1-jiangshanlai@gmail.com> X-Mailer: git-send-email 2.19.1.6.gb485710b MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751996589265531470?= X-GMAIL-MSGID: =?utf-8?q?1751996589265531470?= From: Lai Jiangshan No code is using KVM_MMU_READ_[UN]LOCK(). Signed-off-by: Lai Jiangshan --- virt/kvm/kvm_mm.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/virt/kvm/kvm_mm.h b/virt/kvm/kvm_mm.h index a1ab15006af3..180f1a09e6ba 100644 --- a/virt/kvm/kvm_mm.h +++ b/virt/kvm/kvm_mm.h @@ -14,14 +14,10 @@ #define KVM_MMU_LOCK_INIT(kvm) rwlock_init(&(kvm)->mmu_lock) #define KVM_MMU_LOCK(kvm) write_lock(&(kvm)->mmu_lock) #define KVM_MMU_UNLOCK(kvm) write_unlock(&(kvm)->mmu_lock) -#define KVM_MMU_READ_LOCK(kvm) read_lock(&(kvm)->mmu_lock) -#define KVM_MMU_READ_UNLOCK(kvm) read_unlock(&(kvm)->mmu_lock) #else #define KVM_MMU_LOCK_INIT(kvm) spin_lock_init(&(kvm)->mmu_lock) #define KVM_MMU_LOCK(kvm) spin_lock(&(kvm)->mmu_lock) #define KVM_MMU_UNLOCK(kvm) spin_unlock(&(kvm)->mmu_lock) -#define KVM_MMU_READ_LOCK(kvm) spin_lock(&(kvm)->mmu_lock) -#define KVM_MMU_READ_UNLOCK(kvm) spin_unlock(&(kvm)->mmu_lock) #endif /* KVM_HAVE_MMU_RWLOCK */ kvm_pfn_t hva_to_pfn(unsigned long addr, bool atomic, bool interruptible,