From patchwork Mon Apr 29 17:37:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qian Cai X-Patchwork-Id: 10922343 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DF26914B6 for ; Mon, 29 Apr 2019 17:37:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C8397286A1 for ; Mon, 29 Apr 2019 17:37:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BC882288CB; Mon, 29 Apr 2019 17:37:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4C3BF286A1 for ; Mon, 29 Apr 2019 17:37:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=aDk6I37m5m3oFZ/HyMwI8cEj3nGcwQInuL/6jvutoBQ=; b=lsslTidOPxgNma 866+t3ATVwypvJgl+CRLTfedNJ9DT/K65PthU63FUe3oAtoVx3tQquwKN2/H2JImSH3bYrlPKv1nv LepcLPbwl4BrLZrAnhK9wGoUVsCU7nN0/Ptv/iXqsj7nefLZB1GHmN8b6JVQYgRKk7wVBBCeFRyMg RDSoqumPHnIXoavCubxDYNAo+dIXFuk+fMDYUcbTspbc5Id/fxr8pABO8mt1J5JMdL36uIf+tXgqp 2jPwjdYiyq7rIAXD9eK3XWEbVtKpkrQAnSb5DrRLbvN6ck3KAaiwhJT4ckzNJxzr+DPeQJHcyRerN QjXosRZwdGXYWP5ukKrw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hLADi-0005FJ-F5; Mon, 29 Apr 2019 17:37:38 +0000 Received: from mail-qt1-x841.google.com ([2607:f8b0:4864:20::841]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hLADN-00051K-02 for linux-arm-kernel@lists.infradead.org; Mon, 29 Apr 2019 17:37:21 +0000 Received: by mail-qt1-x841.google.com with SMTP id b3so12864297qtc.12 for ; Mon, 29 Apr 2019 10:37:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Scl3PSeQx2hTIiqKFeLsOvlDZYPJZC93Bw/i/+ssipk=; b=ptaO2FS6ypIWyQztD2x2lutibcWLniDRjyeuKUfWIf1O+X5lxP5eMp4/yYYtuz+pGY Ce1XXKV/mauofPq43ANGGo6PE3Kk/SDXnWiQRI+og1/IPlwqZfM6Vq8Ohx+Qd+xe3Cea 1XliFECnAIIRzb4T3QpixakaHFmr/RZ921PUK1wHvYo6CbSuHBTc3bjjbOBaLe1x3AKr LqNHs/SltBfNkLhL6b7nnJnLPK211670F1VVeE8oneNUafHLpj9ZvtGw3ypqtz1pEIJx JcDr2aqjt21YG85BglmPhR89KSy7HkMswTGFzEMe1/jlO7ILrDSYmMKxnVU2We8soAVR P51A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Scl3PSeQx2hTIiqKFeLsOvlDZYPJZC93Bw/i/+ssipk=; b=lnDLgi1tooTHfZjEtIuDvTOo+qphYQ/L8QM1nil6B9gphLjQKQf+aTMO7jeEdr0YiF hw/QzAqSrdgd5GMzHoIrD1HGkuV9J9AzRUEfT/THatStRQ+groYlPru3VuR76kgEZeok s9p3NI1NXaeKLF/Z4cX9xnTLWjhbJNWhzVBIAWHgRok3IOpd0fYPEnNXADvZABZ6QHhx fE0/p4dERT8ByNSJUzoWUjaxJkZj+hHNNpllnN9OFQ1sio258aNb8mEgymiGu9MV3Vm2 /BDu9C82Msu65U/lLvoS9KsVY9YxXi9M+H/vBQMl4rgXkgc/z5E+L1ucznKZ1/nT4yvI Pp5Q== X-Gm-Message-State: APjAAAWE8x33QtzLgFLqjJbhGSVbPBQMagpyRKHwfH8kB6KfmJ4Ovm8+ QeRpwOHZsm/sRg7G7yZDz9Z/RQ== X-Google-Smtp-Source: APXvYqxVU8sw20J6Qw/4taFaNGKYpelgEYrGSEY3WYaBH1E6yhmpWrRJFCcKzXbh58XbHGTuCJNX8g== X-Received: by 2002:ac8:3613:: with SMTP id m19mr27358131qtb.261.1556559435878; Mon, 29 Apr 2019 10:37:15 -0700 (PDT) Received: from ovpn-121-162.rdu2.redhat.com (pool-71-184-117-43.bstnma.fios.verizon.net. [71.184.117.43]) by smtp.gmail.com with ESMTPSA id 74sm4710182qta.15.2019.04.29.10.37.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Apr 2019 10:37:15 -0700 (PDT) From: Qian Cai To: catalin.marinas@arm.com, will.deacon@arm.com Subject: [PATCH 1/2] arm64: fix pte_unmap() -Wunused-but-set-variable Date: Mon, 29 Apr 2019 13:37:01 -0400 Message-Id: <20190429173702.31389-1-cai@lca.pw> X-Mailer: git-send-email 2.20.1 (Apple Git-117) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190429_103717_238355_45EBD929 X-CRM114-Status: GOOD ( 11.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Qian Cai , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Many compilation warnings due to pte_unmap() compiles away. Fixed it by making it an static inline function. mm/gup.c: In function 'gup_pte_range': mm/gup.c:1727:16: warning: variable 'ptem' set but not used [-Wunused-but-set-variable] mm/gup.c: At top level: mm/memory.c: In function 'copy_pte_range': mm/memory.c:821:24: warning: variable 'orig_dst_pte' set but not used [-Wunused-but-set-variable] mm/memory.c:821:9: warning: variable 'orig_src_pte' set but not used [-Wunused-but-set-variable] mm/swap_state.c: In function 'swap_ra_info': mm/swap_state.c:641:15: warning: variable 'orig_pte' set but not used [-Wunused-but-set-variable] mm/madvise.c: In function 'madvise_free_pte_range': mm/madvise.c:318:9: warning: variable 'orig_pte' set but not used [-Wunused-but-set-variable] Signed-off-by: Qian Cai --- arch/arm64/include/asm/pgtable.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index de70c1eabf33..74ebe9693714 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h @@ -478,6 +478,8 @@ static inline phys_addr_t pmd_page_paddr(pmd_t pmd) return __pmd_to_phys(pmd); } +static inline void pte_unmap(pte_t *pte) { } + /* Find an entry in the third-level page table. */ #define pte_index(addr) (((addr) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)) @@ -486,7 +488,6 @@ static inline phys_addr_t pmd_page_paddr(pmd_t pmd) #define pte_offset_map(dir,addr) pte_offset_kernel((dir), (addr)) #define pte_offset_map_nested(dir,addr) pte_offset_kernel((dir), (addr)) -#define pte_unmap(pte) do { } while (0) #define pte_unmap_nested(pte) do { } while (0) #define pte_set_fixmap(addr) ((pte_t *)set_fixmap_offset(FIX_PTE, addr)) From patchwork Mon Apr 29 17:37:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qian Cai X-Patchwork-Id: 10922345 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7155F14B6 for ; Mon, 29 Apr 2019 17:37:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5B14A286A1 for ; Mon, 29 Apr 2019 17:37:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4F37F288CB; Mon, 29 Apr 2019 17:37:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F05CA286A1 for ; Mon, 29 Apr 2019 17:37:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=SqxKoI/qNBLPwze2YK5c0yTHy58hJx5RPjxn4ZZeRPs=; b=V2h7aVw1lS7OhX ziekzxx/KAxCVVGszkeuIhrYEwREzMsDvHymACEk7iER23/M1OAn2jnSH1PbUs8oFXev+haMiqhVa pkbvxwt0LjR2FPrKFAyvTrAXLeIO4gNeiGuNTziLLTNZ4LoJEsYTykYhjqFygEzxEu+IyK1FSMmnN yUXMOMFtquLJumJhTHKvV2+tkh02It6Mvr9se5kwI5XYLNIDLxAZFZun8od+G+YalgmeMksK6TsOZ aTlNnbMBd0YFWyan50SQOfSg437ogu4vpVQ4T0qtbUMJANj87DMWhHN8LMV7lZ2bJVylAtgKnVAXN VBzRKOJ/fP3fMd4doaYg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hLADp-0005NC-9B; Mon, 29 Apr 2019 17:37:45 +0000 Received: from mail-qk1-x742.google.com ([2607:f8b0:4864:20::742]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hLADS-00059U-Sa for linux-arm-kernel@lists.infradead.org; Mon, 29 Apr 2019 17:37:24 +0000 Received: by mail-qk1-x742.google.com with SMTP id c190so6441419qke.9 for ; Mon, 29 Apr 2019 10:37:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nvnWUGFqH95OBjKoRYHHb96ddSAj8nCyrjhcWgd3CDw=; b=bWqiVcnRj/Vd97tx4zyzrejGtpdVMQ0UFD0o2qJcWQuAZWnEdAnWyaipWP7zob7o7A Ra51WcsiMK0BC++h98ACNGCqNIarwvYtJ3lra2c1TvmHnCpdbTI9DbavgqP02S8hREFq LCxSytLcGt4FNW0WQwaKw8MgwCHevGQdNX7rBwHLxXLy3gl2QM7p4s1nZfSUXOnkZmoQ Lbkbn5qnpvsavdq7H6Pl5mNpf5BoMl7fgZH8dvuMMOnkI7LityhmwMH9qoQEdsyiW4HO U7nUa71zuLcBnM19Hz5IxvBgN4C7x1yA3bC63zEGy4YKBuCdNPvOl/l+ODb/t6l1Bdqa +hdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nvnWUGFqH95OBjKoRYHHb96ddSAj8nCyrjhcWgd3CDw=; b=ZNqquNHBJ33L7r1qUf2nvydwH0PsoqxjpPgVYB+08F1KWdTzJoLfEzcugSK2Pun1pb XvOt3xivpfgPwytR9KVDw+lIdDN7b637s1YAHmcNbZvSRmIFuALruNFF/aYKLGT98VlD EEqDyBvSUc28z3oO8csS7hPEl+NncpAObWrhqMFjMe8mkr6isksFDhIh146UJKSB1Coc 1b5zdlEjI/ldEhWpFDTLH5t3Av6XveFUlOGC/o+R6cdlNPChHq4XFotpvSq320BIhPCB UwHPaYQl1mh9ZPuV8GegmeNT1Y4yGUssgUWmI9gdmEjPshRHcKjwvl2Gw8j4cOCrklwW +lUw== X-Gm-Message-State: APjAAAWcG8LttMoUMYAfsrFTqdPWVNL3cDCtpab8GnEfUyoETAnlnIat Xr39W+5NAJH8yg+CCpqs5hVuHA== X-Google-Smtp-Source: APXvYqyDR1sXcSEAZU/tvwIMNEhwty8wwd269Y2/rO40JCaUuY3rcPAbpIdrHEQc/6u+v7vtffq0yA== X-Received: by 2002:a37:a514:: with SMTP id o20mr15647617qke.41.1556559441746; Mon, 29 Apr 2019 10:37:21 -0700 (PDT) Received: from ovpn-121-162.rdu2.redhat.com (pool-71-184-117-43.bstnma.fios.verizon.net. [71.184.117.43]) by smtp.gmail.com with ESMTPSA id 74sm4710182qta.15.2019.04.29.10.37.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Apr 2019 10:37:21 -0700 (PDT) From: Qian Cai To: catalin.marinas@arm.com, will.deacon@arm.com Subject: [PATCH 2/2] arm64: remove pte_unmap_nested() Date: Mon, 29 Apr 2019 13:37:02 -0400 Message-Id: <20190429173702.31389-2-cai@lca.pw> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20190429173702.31389-1-cai@lca.pw> References: <20190429173702.31389-1-cai@lca.pw> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190429_103722_945583_FB5DEAC0 X-CRM114-Status: UNSURE ( 9.99 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Qian Cai , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Due to the commit ece0e2b6406a ("mm: remove pte_*map_nested()"), pte_unmap_nested() is not used anymore. Signed-off-by: Qian Cai --- arch/arm64/include/asm/pgtable.h | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index 74ebe9693714..7543e345e078 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h @@ -488,7 +488,6 @@ static inline void pte_unmap(pte_t *pte) { } #define pte_offset_map(dir,addr) pte_offset_kernel((dir), (addr)) #define pte_offset_map_nested(dir,addr) pte_offset_kernel((dir), (addr)) -#define pte_unmap_nested(pte) do { } while (0) #define pte_set_fixmap(addr) ((pte_t *)set_fixmap_offset(FIX_PTE, addr)) #define pte_set_fixmap_offset(pmd, addr) pte_set_fixmap(pte_offset_phys(pmd, addr))