From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751142AbcGMQ3L (ORCPT ); Wed, 13 Jul 2016 12:29:11 -0400 Received: from mga04.intel.com ([192.55.52.120]:6903 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750865AbcGMQ3E (ORCPT ); Wed, 13 Jul 2016 12:29:04 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,358,1464678000"; d="scan'208";a="994521405" Subject: Re: [PATCH 4/4] x86: use pte_none() to test for empty PTE To: Julia Lawall , Michal Hocko References: <20160708001909.FB2443E2@viggo.jf.intel.com> <20160708001915.813703D9@viggo.jf.intel.com> <20160713151820.GA20693@dhcp22.suse.cz> Cc: linux-kernel@vger.kernel.org, x86@kernel.org, linux-mm@kvack.org, torvalds@linux-foundation.org, akpm@linux-foundation.org, bp@alien8.de, ak@linux.intel.com, dave.hansen@intel.com, David Howells From: Dave Hansen Message-ID: <57866C22.4040402@intel.com> Date: Wed, 13 Jul 2016 09:28:18 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/13/2016 08:49 AM, Julia Lawall wrote: > My results are below. There are a couple of cases in arch/mn10300/mm that > were not in the original patch. Yeah, so mn10300 is obviously unaffected by the erratum in question, and I didn't look for non-x86 architectures for this patch. But, this code definitely _looks_ like it should be using pte_none(), especially since mn10300 defines it the same way as x86 (well, as x86 _did_ before this series). #define pte_none(x) (!pte_val(x)) > diff -u -p a/arch/mn10300/mm/cache-inv-icache.c b/arch/mn10300/mm/cache-inv-icache.c > --- a/arch/mn10300/mm/cache-inv-icache.c > +++ b/arch/mn10300/mm/cache-inv-icache.c > @@ -45,11 +45,11 @@ static void flush_icache_page_range(unsi > return; > > pud = pud_offset(pgd, start); > - if (!pud || !pud_val(*pud)) > + if (!pud || pud_none(*pud)) > return; > > pmd = pmd_offset(pud, start); > - if (!pmd || !pmd_val(*pmd)) > + if (!pmd || pmd_none(*pmd)) > return;