Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3620416imm; Mon, 4 Jun 2018 06:44:46 -0700 (PDT) X-Google-Smtp-Source: ADUXVKII4t4ppEBUy/UG2LO7hXgbDECH2iM5bgNrKK8YnH6uhpZ5y6oP0foWiYQaGoLlpMvP2EUY X-Received: by 2002:a17:902:321:: with SMTP id 30-v6mr21791074pld.122.1528119886599; Mon, 04 Jun 2018 06:44:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528119886; cv=none; d=google.com; s=arc-20160816; b=uOC8W0UrDOYS1DSa4zt3h2AZcVU4wRD5B0Ui26WILIrmDBILCO7DjHBLPdw2fXauGr nOdSA/W2gzFphddZW9AfpIYh9hdcfXa2GVM0AYo+MvwRopW1pcUdZGu6eqU0CDdcdpxi Vlf56yqAxQSXk+fYDY92QuuY2ym/1QeuSFI0OTFkPJZhWUeZgTxVUnb8aHgSRxThU31+ PDby+jyJZyQ/VJMywSKeAkFxCQ8QXGvF5XN7ucwiBYsotoYboXRO6LnG1dQAFEVLuStT ihBYwGo8llMnEg7J8DvrFk6EcvYmROQxrrj6bPdxddnkQCCDMNusinUC+sAme/H0UN6A tecQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=kyRmJp1j9pzNJkjMeJ8gayTuVpWu4mR/F7yZpLUE3FY=; b=jkkMevrAWhlD9EDbOc1WwRVyMS8I5BOJtG9wqfQveCa9HrWdi3nFEUJrIXtPuV4CA8 92kEd0eo8zvVkI0kaguQVi9gftaXR79SqqM2YycJCmaU1OQtIthRyarzEjT/w0WP1Xhe H8oA+9GqDP+WACiZkbeyjooAyLf2LOsAmZ9Sx2b0Z1l6WDon7qgbmluaCtX8Mq2DlFPr CogAMNtR3r4kUeGXps01YoqoI3Gn9FdJvkwaJQyHhsqYHGtIx+Yvv1kDBVyJxri/ZBpe NQGEw/OoN1/7qTX9gj/whGFLvaY+XUEA7iKXPIuyRfsJayaU5UAMYp/yeKUF5dkg/VaF Y85A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=UXnbBX0m; dkim=pass header.i=@codeaurora.org header.s=default header.b=UXnbBX0m; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m13-v6si5612821pgv.271.2018.06.04.06.44.31; Mon, 04 Jun 2018 06:44:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=UXnbBX0m; dkim=pass header.i=@codeaurora.org header.s=default header.b=UXnbBX0m; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753188AbeFDNnD (ORCPT + 99 others); Mon, 4 Jun 2018 09:43:03 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:48708 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752774AbeFDNnC (ORCPT ); Mon, 4 Jun 2018 09:43:02 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 8C787601D9; Mon, 4 Jun 2018 13:43:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1528119781; bh=M+IRkuxuqWr4IfHTKjwCXQbV/KvKs8zyh9nOxb6yk38=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=UXnbBX0mLxkAQQSD1cMYkPNB/vxRcIj94xFpAUZFyy48uMy0v+Dq3ru0v45RjZS8b zMM0gH4vDgN44E8cZJnvYcdUEHVchUswNnz8aMXCMmQL/cCpQvTJb61J3xIs3nhF2B 44iJLFfhhIBBqf4gfUzGQVzjvJNgKkLpaJeETWaI= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [10.204.79.109] (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: cpandya@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 5E70B60224; Mon, 4 Jun 2018 13:42:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1528119781; bh=M+IRkuxuqWr4IfHTKjwCXQbV/KvKs8zyh9nOxb6yk38=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=UXnbBX0mLxkAQQSD1cMYkPNB/vxRcIj94xFpAUZFyy48uMy0v+Dq3ru0v45RjZS8b zMM0gH4vDgN44E8cZJnvYcdUEHVchUswNnz8aMXCMmQL/cCpQvTJb61J3xIs3nhF2B 44iJLFfhhIBBqf4gfUzGQVzjvJNgKkLpaJeETWaI= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 5E70B60224 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=cpandya@codeaurora.org Subject: Re: [PATCH v12 5/5] arm64: Allow huge io mappings again To: Will Deacon Cc: catalin.marinas@arm.com, mark.rutland@arm.com, akpm@linux-foundation.org, toshi.kani@hpe.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <1527856758-27169-1-git-send-email-cpandya@codeaurora.org> <1527856758-27169-6-git-send-email-cpandya@codeaurora.org> <20180604121452.GK9482@arm.com> From: Chintan Pandya Message-ID: Date: Mon, 4 Jun 2018 19:12:57 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180604121452.GK9482@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/4/2018 5:44 PM, Will Deacon wrote: > On Fri, Jun 01, 2018 at 06:09:18PM +0530, Chintan Pandya wrote: >> Huge mappings have had stability issues due to stale >> TLB entry and memory leak issues. Since, those are >> addressed in this series of patches, it is now safe >> to allow huge mappings. >> >> Signed-off-by: Chintan Pandya >> --- >> arch/arm64/mm/mmu.c | 18 ++---------------- >> 1 file changed, 2 insertions(+), 16 deletions(-) >> >> diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c >> index 6e7e16c..c65abc4 100644 >> --- a/arch/arm64/mm/mmu.c >> +++ b/arch/arm64/mm/mmu.c >> @@ -934,15 +934,8 @@ int pud_set_huge(pud_t *pudp, phys_addr_t phys, pgprot_t prot) >> { >> pgprot_t sect_prot = __pgprot(PUD_TYPE_SECT | >> pgprot_val(mk_sect_prot(prot))); >> - pud_t new_pud = pfn_pud(__phys_to_pfn(phys), sect_prot); >> - >> - /* Only allow permission changes for now */ >> - if (!pgattr_change_is_safe(READ_ONCE(pud_val(*pudp)), >> - pud_val(new_pud))) >> - return 0; > > Do you actually need to remove these checks? If we're doing > break-before-make properly, then the check won't fire but it would be > good to keep it there so we can catch misuse of these in future. > > In other words, can we drop this patch? Yes, we don't need this patch as BBM is happening before this. I missed that. I'll remove this patch in v13. > > Will > Chintan -- Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project