From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1720AC433B4 for ; Mon, 17 May 2021 14:18:49 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A854161948 for ; Mon, 17 May 2021 14:18:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A854161948 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E77086B006C; Mon, 17 May 2021 10:18:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E021F6B006E; Mon, 17 May 2021 10:18:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C2C2B6B0070; Mon, 17 May 2021 10:18:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0071.hostedemail.com [216.40.44.71]) by kanga.kvack.org (Postfix) with ESMTP id 8C9376B006C for ; Mon, 17 May 2021 10:18:47 -0400 (EDT) Received: from smtpin32.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 284059068 for ; Mon, 17 May 2021 14:18:47 +0000 (UTC) X-FDA: 78150929094.32.8E81791 Received: from mail-qt1-f182.google.com (mail-qt1-f182.google.com [209.85.160.182]) by imf11.hostedemail.com (Postfix) with ESMTP id 7FDA22000274 for ; Mon, 17 May 2021 14:18:44 +0000 (UTC) Received: by mail-qt1-f182.google.com with SMTP id 1so4974975qtb.0 for ; Mon, 17 May 2021 07:18:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:to:cc:references:from:subject:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=z7CDwn4Z3RrKMrbWWCsrq5EqlMuh7Sh4qQd1tbXNXs4=; b=d+ScgR4ycbRnxWoZykRDU2LDfqhErabnJvfpKTIgRAr1AmDp0umL4CeMYzq/sv0Wet 2liKCiBvzMq19LML/5vzrm6L81QlNwPQN+NIH2//RgWHLZQbPBIlE+NVrjEXSdQDXoe5 tTnwZu8ffwNx65fOu01aAwihWpgLcr17so3WyFLEWJN9DQ5QMCvk6Tg/737d1ug4kXVU Yed+HjINWpPGIemP+UkDkS0p0JBZnvEz3HrQr+i5WtExpU3IcAWK+dg1LQbeU+HoBDi7 iU/M9kOzuXrYQDY9GhnEv6bKyPuoJgfh29EBF2lI0JfuhilOrPdzszFlPW+KzClkwK9X 6FdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:to:cc:references:from:subject:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=z7CDwn4Z3RrKMrbWWCsrq5EqlMuh7Sh4qQd1tbXNXs4=; b=ixcAGLEjAJm3w0yFekpUuHUnjPnKVSuUx4MX7LbtpMssamVX4/8JYNfaT5CzJGBeCV E4Mgaffm1K8If5KJBpxZ48mKntwG7YWokzPLcJeTkKEf9yUf0ILxPOvJiijNu9oWYrQ5 oYatUQFKKrMHeHKpbSZ1KaiPOclRSdjcd2/boMyan98JcSniy1jRKTMCcACptsyUhKpP YaN8eYC+8FyPjE267fF1z/j6aOiqxbukDVJXRwGC6wZQRUgLDnfVQ1NprHBjqcNPEwF/ cX4z6uD641ziKRlEs5pwtoV7YUiZ4fg0mbYLyofHbxS2FnmAPfBg2w4mVu32pMlPWtRR yOAQ== X-Gm-Message-State: AOAM533B199PrZtJxlRrEegx+aZ/gsXk/kBub9B0YhFq5k0n13OVgcby C3LGg7KAMYSO9zrVOfL4mA0GNX5ZH2E= X-Google-Smtp-Source: ABdhPJzjbNMc/kjFVZ7Bf3esLT+CT3khD0KKBjg6Zlm6WHCkoweAfgQAu7OxTQnZA0QXggjPubmoiw== X-Received: by 2002:ac8:6605:: with SMTP id c5mr24120956qtp.21.1621261126038; Mon, 17 May 2021 07:18:46 -0700 (PDT) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id q7sm10534903qki.17.2021.05.17.07.18.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 17 May 2021 07:18:45 -0700 (PDT) To: "Aneesh Kumar K.V" Cc: linux-mm@kvack.org, akpm@linux-foundation.org, mpe@ellerman.id.au, linuxppc-dev@lists.ozlabs.org, kaleshsingh@google.com, npiggin@gmail.com, joel@joelfernandes.org, Christophe Leroy References: <20210422054323.150993-1-aneesh.kumar@linux.ibm.com> <20210422054323.150993-6-aneesh.kumar@linux.ibm.com> <20210515163525.GA1106462@roeck-us.net> <87pmxpqxb1.fsf@linux.ibm.com> From: Guenter Roeck Subject: Re: [PATCH v5 5/9] powerpc/mm/book3s64: Update tlb flush routines to take a page walk cache flush argument Message-ID: Date: Mon, 17 May 2021 07:18:42 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <87pmxpqxb1.fsf@linux.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=d+ScgR4y; spf=pass (imf11.hostedemail.com: domain of groeck7@gmail.com designates 209.85.160.182 as permitted sender) smtp.mailfrom=groeck7@gmail.com; dmarc=none X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 7FDA22000274 X-Stat-Signature: hzuy91jkjmrw4nkapktwt1h9w3tqmmfz X-HE-Tag: 1621261124-56101 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 5/17/21 6:55 AM, Aneesh Kumar K.V wrote: > Guenter Roeck writes: >=20 >> On 5/17/21 1:40 AM, Aneesh Kumar K.V wrote: >>> On 5/15/21 10:05 PM, Guenter Roeck wrote: >>>> On Thu, Apr 22, 2021 at 11:13:19AM +0530, Aneesh Kumar K.V wrote: >=20 > ... >=20 >>>> =C2=A0 extern void radix__local_flush_all_mm(struct mm_struct *mm); >>>>> diff --git a/arch/powerpc/include/asm/book3s/64/tlbflush.h b/arch/p= owerpc/include/asm/book3s/64/tlbflush.h >>>>> index 215973b4cb26..f9f8a3a264f7 100644 >>>>> --- a/arch/powerpc/include/asm/book3s/64/tlbflush.h >>>>> +++ b/arch/powerpc/include/asm/book3s/64/tlbflush.h >>>>> @@ -45,13 +45,30 @@ static inline void tlbiel_all_lpid(bool radix) >>>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 hash__tlbie= l_all(TLB_INVAL_SCOPE_LPID); >>>>> =C2=A0 } >>>>> +static inline void flush_pmd_tlb_pwc_range(struct vm_area_struct *= vma, >>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ^^^^ >>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 unsign= ed long start, >>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 unsign= ed long end, >>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 bool f= lush_pwc) >>>>> +{ >>>>> +=C2=A0=C2=A0=C2=A0 if (radix_enabled()) >>>>> +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return radix__flush_pmd= _tlb_range(vma, start, end, flush_pwc); >>>>> +=C2=A0=C2=A0=C2=A0 return hash__flush_tlb_range(vma, start, end); >>>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ^^^^^^^^^^^^^^^^^^= ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >>>> >>>>> +} >>> >>> In this specific case we won't have=C2=A0 build errors because, >>> >>> static inline void hash__flush_tlb_range(struct vm_area_struct *vma, >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 unsigned long start, = unsigned long end) >>> { >>> >> >> Sorry, you completely lost me. >> >> Building parisc:allnoconfig ... failed >> -------------- >> Error log: >> In file included from arch/parisc/include/asm/cacheflush.h:7, >> from include/linux/highmem.h:12, >> from include/linux/pagemap.h:11, >> from include/linux/ksm.h:13, >> from mm/mremap.c:14: >> mm/mremap.c: In function 'flush_pte_tlb_pwc_range': >> arch/parisc/include/asm/tlbflush.h:20:2: error: 'return' with a value,= in function returning void >=20 > As replied here > https://lore.kernel.org/mm-commits/8eedb441-a612-1ec8-8bf7-b40184de9f6f= @linux.ibm.com/ >=20 > That was the generic header change in the patch. I was commenting about= the > ppc64 specific change causing build failures. >=20 Ah, sorry. I wasn't aware that the following is valid C code void f1() { return f2(); ^^^^^^ } as long as f2() is void as well. Confusing, but we live and learn. Guenter From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1593C433ED for ; Mon, 17 May 2021 14:19:23 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 24E8F6141D for ; Mon, 17 May 2021 14:19:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 24E8F6141D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4FkLqF5FTfz2ymC for ; Tue, 18 May 2021 00:19:21 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=d+ScgR4y; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::82d; helo=mail-qt1-x82d.google.com; envelope-from=groeck7@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=d+ScgR4y; dkim-atps=neutral Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4FkLph3ltzz2xtx for ; Tue, 18 May 2021 00:18:51 +1000 (AEST) Received: by mail-qt1-x82d.google.com with SMTP id f8so4924027qth.6 for ; Mon, 17 May 2021 07:18:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:to:cc:references:from:subject:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=z7CDwn4Z3RrKMrbWWCsrq5EqlMuh7Sh4qQd1tbXNXs4=; b=d+ScgR4ycbRnxWoZykRDU2LDfqhErabnJvfpKTIgRAr1AmDp0umL4CeMYzq/sv0Wet 2liKCiBvzMq19LML/5vzrm6L81QlNwPQN+NIH2//RgWHLZQbPBIlE+NVrjEXSdQDXoe5 tTnwZu8ffwNx65fOu01aAwihWpgLcr17so3WyFLEWJN9DQ5QMCvk6Tg/737d1ug4kXVU Yed+HjINWpPGIemP+UkDkS0p0JBZnvEz3HrQr+i5WtExpU3IcAWK+dg1LQbeU+HoBDi7 iU/M9kOzuXrYQDY9GhnEv6bKyPuoJgfh29EBF2lI0JfuhilOrPdzszFlPW+KzClkwK9X 6FdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:to:cc:references:from:subject:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=z7CDwn4Z3RrKMrbWWCsrq5EqlMuh7Sh4qQd1tbXNXs4=; b=NJxnAAHat7ExYagoaohw42dodOFTG/ET/I3eDyC7AwXRt+EwEPq+CLursme8gP8Qp6 uh5rDcKP9RAGEDh0BG+EA5ibb+M7aNns5ulAG0xVpxVLasmDQ0h5EpRnsfYZDOLuoeNm umdlWJoipb4A4gby+5dJljunrsXqkFA8FSXExC63UUZoqPxFwZLmPhqhta447q54U0Mb /BA5ptCP6QtA/21oPfucWXEGtSulqAADm9aC4LSfx0QhcYXPDUigu6MKZBWJh1Y2ng11 yh7cSL6gAh3zcEiM0G2bfpernP44tAImr0IWrvyuPwIz0fJg5P8nM/ECuAp93OeSSYlh ScMw== X-Gm-Message-State: AOAM532i+Px8HwmNdtr1ThVKMAMlPle7CL9Y7RSetYagz4gogfRbptKO kGfXnuddPTLfnZ/XlvigaNg= X-Google-Smtp-Source: ABdhPJzjbNMc/kjFVZ7Bf3esLT+CT3khD0KKBjg6Zlm6WHCkoweAfgQAu7OxTQnZA0QXggjPubmoiw== X-Received: by 2002:ac8:6605:: with SMTP id c5mr24120956qtp.21.1621261126038; Mon, 17 May 2021 07:18:46 -0700 (PDT) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id q7sm10534903qki.17.2021.05.17.07.18.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 17 May 2021 07:18:45 -0700 (PDT) To: "Aneesh Kumar K.V" References: <20210422054323.150993-1-aneesh.kumar@linux.ibm.com> <20210422054323.150993-6-aneesh.kumar@linux.ibm.com> <20210515163525.GA1106462@roeck-us.net> <87pmxpqxb1.fsf@linux.ibm.com> From: Guenter Roeck Subject: Re: [PATCH v5 5/9] powerpc/mm/book3s64: Update tlb flush routines to take a page walk cache flush argument Message-ID: Date: Mon, 17 May 2021 07:18:42 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <87pmxpqxb1.fsf@linux.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: npiggin@gmail.com, linux-mm@kvack.org, kaleshsingh@google.com, joel@joelfernandes.org, akpm@linux-foundation.org, linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On 5/17/21 6:55 AM, Aneesh Kumar K.V wrote: > Guenter Roeck writes: > >> On 5/17/21 1:40 AM, Aneesh Kumar K.V wrote: >>> On 5/15/21 10:05 PM, Guenter Roeck wrote: >>>> On Thu, Apr 22, 2021 at 11:13:19AM +0530, Aneesh Kumar K.V wrote: > > ... > >>>>   extern void radix__local_flush_all_mm(struct mm_struct *mm); >>>>> diff --git a/arch/powerpc/include/asm/book3s/64/tlbflush.h b/arch/powerpc/include/asm/book3s/64/tlbflush.h >>>>> index 215973b4cb26..f9f8a3a264f7 100644 >>>>> --- a/arch/powerpc/include/asm/book3s/64/tlbflush.h >>>>> +++ b/arch/powerpc/include/asm/book3s/64/tlbflush.h >>>>> @@ -45,13 +45,30 @@ static inline void tlbiel_all_lpid(bool radix) >>>>>           hash__tlbiel_all(TLB_INVAL_SCOPE_LPID); >>>>>   } >>>>> +static inline void flush_pmd_tlb_pwc_range(struct vm_area_struct *vma, >>>>                   ^^^^ >>>>> +                       unsigned long start, >>>>> +                       unsigned long end, >>>>> +                       bool flush_pwc) >>>>> +{ >>>>> +    if (radix_enabled()) >>>>> +        return radix__flush_pmd_tlb_range(vma, start, end, flush_pwc); >>>>> +    return hash__flush_tlb_range(vma, start, end); >>>>          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >>>> >>>>> +} >>> >>> In this specific case we won't have  build errors because, >>> >>> static inline void hash__flush_tlb_range(struct vm_area_struct *vma, >>>                      unsigned long start, unsigned long end) >>> { >>> >> >> Sorry, you completely lost me. >> >> Building parisc:allnoconfig ... failed >> -------------- >> Error log: >> In file included from arch/parisc/include/asm/cacheflush.h:7, >> from include/linux/highmem.h:12, >> from include/linux/pagemap.h:11, >> from include/linux/ksm.h:13, >> from mm/mremap.c:14: >> mm/mremap.c: In function 'flush_pte_tlb_pwc_range': >> arch/parisc/include/asm/tlbflush.h:20:2: error: 'return' with a value, in function returning void > > As replied here > https://lore.kernel.org/mm-commits/8eedb441-a612-1ec8-8bf7-b40184de9f6f@linux.ibm.com/ > > That was the generic header change in the patch. I was commenting about the > ppc64 specific change causing build failures. > Ah, sorry. I wasn't aware that the following is valid C code void f1() { return f2(); ^^^^^^ } as long as f2() is void as well. Confusing, but we live and learn. Guenter