Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp544718imm; Fri, 1 Jun 2018 05:41:01 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKia8g+etlTd3VP3b2Rp4Q4Q6tPuG0HPfwXZ1xK6BwAMgO7NM8+aZCqRZ8UMZWh5K0t3vFf X-Received: by 2002:a17:902:728a:: with SMTP id d10-v6mr3884029pll.192.1527856861522; Fri, 01 Jun 2018 05:41:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527856861; cv=none; d=google.com; s=arc-20160816; b=w2+J1Y/Y7AG+tIE1SSlW5nltrEWEa7IRGt/wgNprlWgdUqvPY7GkTtRtaZqJk8Xg45 GP597HxbK5+hxyCf66eYWjaESj1nA8iF7Zd8SJ36dX+0co+oslTMB31pl3EiO2uQ1wn8 +TAwQlbi1ReEIhaVpJQKC3KCVm3sggUOgQaie9uuvw3sRBY9XxtSVhD850w5P+cRrGtf UW43KbX9FQvUq2b9vJY1TzHbw+DF4EsothS8qETUKE+JjfttJtx2Ow6zht3PdbEEFu0v 8x2aoPCK+Wol/p9vge2QIfJSnf4OpiKPD41kruG1po5wvVWifW1BdWZCO7sbLtsFUEkH hG8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=aCpMlRJt0MlNBrHFhiuReMSLM39TQLWrfQHvp8t3F3k=; b=Q+KbJj3LXRUticwIVDB08TTj0dkaPzKCuE+fHhG4SkzxM0r/zvZXgsmhDsZsZLp9GH jE2XUKTipH3pXKOFYy7I3DLxVPYi4G/o06seeH3+Kv5ccoOTuXNisycTTctTTS6z93mR GyKi9WnaEJ0qML1y7bLXC399AMJ18VxANV6Fy2I8/X+bWfNSkoNt5PeexUg3ajNPPa/z YxTMsBnRNanFDMiOIy8RnNnIgKGlMSM9bBZpnvrr92wghKrnyl0ZsO8rf9tp2R39J224 jdrYEHM0CE5Mr2loWiGglynYSiHY6+vm8mPVUTXE8QtDOnDP0tyeykyleOtqOfUznn28 sa0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=OVOSahot; dkim=pass header.i=@codeaurora.org header.s=default header.b=TTG3hBm5; 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 g8-v6si32298053pgr.474.2018.06.01.05.40.46; Fri, 01 Jun 2018 05:41:01 -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=OVOSahot; dkim=pass header.i=@codeaurora.org header.s=default header.b=TTG3hBm5; 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 S1752096AbeFAMkC (ORCPT + 99 others); Fri, 1 Jun 2018 08:40:02 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:50378 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752043AbeFAMkA (ORCPT ); Fri, 1 Jun 2018 08:40:00 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id AEF0F605BD; Fri, 1 Jun 2018 12:39:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1527856799; bh=WubhHD9Hp6pLM2BDogrx9jy9cZxFOcGkheb+hewSswU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OVOSahotAamhHmA91t1T121DeDkZ83l3+XVT7ufTxVUHeltuBQtYOQnAxG6M1hIiI wMxcbHQplRMjKBQFQFjCLWm0baG6NFPtzP+SKefovIPtQgeFqhdMpfcGYO5lawdBFh H/5IBhbHHMsSmBNOD6Dt7GIVlP+OjT6kC3Ak1wFQ= 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 cpandya-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: cpandya@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id C104760263; Fri, 1 Jun 2018 12:39:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1527856798; bh=WubhHD9Hp6pLM2BDogrx9jy9cZxFOcGkheb+hewSswU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TTG3hBm5oWvi0DkG+D1Z99ryqs3CTNeUeUtn3fWfCOi4B+owAs6DavRFKWatlKHFW tUK4NR7fadQTCc2EtfpWriU4YXUnL+TU8UdlutACyPUsPdvWTRu9rr91liGhSjeytG Tq+5mS3wYiSuS2mnP++rEjdLX7GHHwvIZB0q9DNA= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org C104760263 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 From: Chintan Pandya To: will.deacon@arm.com, catalin.marinas@arm.com, mark.rutland@arm.com, akpm@linux-foundation.org Cc: toshi.kani@hpe.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Chintan Pandya Subject: [PATCH v12 5/5] arm64: Allow huge io mappings again Date: Fri, 1 Jun 2018 18:09:18 +0530 Message-Id: <1527856758-27169-6-git-send-email-cpandya@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1527856758-27169-1-git-send-email-cpandya@codeaurora.org> References: <1527856758-27169-1-git-send-email-cpandya@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; - BUG_ON(phys & ~PUD_MASK); - set_pud(pudp, new_pud); + set_pud(pudp, pfn_pud(__phys_to_pfn(phys), sect_prot)); return 1; } @@ -950,15 +943,8 @@ int pmd_set_huge(pmd_t *pmdp, phys_addr_t phys, pgprot_t prot) { pgprot_t sect_prot = __pgprot(PMD_TYPE_SECT | pgprot_val(mk_sect_prot(prot))); - pmd_t new_pmd = pfn_pmd(__phys_to_pfn(phys), sect_prot); - - /* Only allow permission changes for now */ - if (!pgattr_change_is_safe(READ_ONCE(pmd_val(*pmdp)), - pmd_val(new_pmd))) - return 0; - BUG_ON(phys & ~PMD_MASK); - set_pmd(pmdp, new_pmd); + set_pmd(pmdp, pfn_pmd(__phys_to_pfn(phys), sect_prot)); return 1; } -- Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project