Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp292536pxb; Thu, 12 Aug 2021 16:47:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyk9iO1cV++ia5ZW7laTfFUTfACXU6sVSoN6MHLnS5YQuhRCxTjG0fwDzLttgxxqwHOL5oQ X-Received: by 2002:a05:6638:240d:: with SMTP id z13mr6111794jat.8.1628812034557; Thu, 12 Aug 2021 16:47:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628812034; cv=none; d=google.com; s=arc-20160816; b=agatLQAtTzbAWU+ZvWct6OMQM+sGsmz/JIRlzCXaP97eyiozlQeU5tYBK9ElPbtEY8 goCA88nHxF3K7mg8JcC96ELqA5miQRiXjb2gP2zj8OG2LzNVxl5BaS2AdePwCTYgo7dT 6YWLRT+01ITpO6mcjfyGIHU4oEtXnW/Z/9y4NdqY8069q8tPNVqyvK1so7ErHNevJNZ9 zxxflbwP3/OxHqIFgAvYAc/TdU93nP8yTrJlWFA6e2etEzJzhVKvben8+DI5FdFOHuHz m/SzrGRP/MOgsG+ngfPQMdcprX4PMFoalZj9MCv9S6bIcIMSx4HMcCRSKcdJ2/6qwemn JcLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5zdsDsDJha9L8DN+s6r29iisTM+uVcnY9H/jnpMZ450=; b=sDcVBPXHFmFj20G6u4ObyZ0mgnyUf/liZAnzs10PBquV+i0qNKNZJ2FwrHs/JO63nT VgObv5KAyk5yI5nw5TanyayPDAUHcKIb1q7CJ02u5hP5/TRBqfBRslH2FXYt97MmrnfN wGBGnZYJsoEWL4P7qHRpFx8Kq/7cKS1kKggguAEjgH8OYLx799bDkcb6DNlyjXOawlLS K4tDiFiV15t6tb/VDD9bwZLSSVZbdfHaPYLIjKELZU2DWg2cyaL+ngcuO19e2O4+RhOA XkQwGuXfhvxaCwcLNSlbfQ0/6E2TvKeT3Ax5WiIO44FzA5JrATDSAQa+iN5CRc5YopMn Mnmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qz4+ACaX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p20si3903015iog.74.2021.08.12.16.47.03; Thu, 12 Aug 2021 16:47:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qz4+ACaX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238553AbhHLXiq (ORCPT + 99 others); Thu, 12 Aug 2021 19:38:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:48828 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238433AbhHLXi1 (ORCPT ); Thu, 12 Aug 2021 19:38:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B0B6E6108C; Thu, 12 Aug 2021 23:38:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1628811482; bh=ToKfOhhiER8j02fngobXA+3bITHxEeKJM0blznUvlNM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qz4+ACaX+VhL6UDoG4GATHnXNG72f1jie44pd2QKRM/Fe242x5Rqwzt62yiHkhABI MJ/1t7szUYGw8tdaKtR8D9vCerC3VuDIIJtYTJWFWb0pVK8YkdwVZFN3/cC7PoaxVo Y+thDihH1djtm3oHMhYWc8ik+VvG4d58g49pit5v+E6Avw3D1LtRGJriJJ99kRM7+b BoH5ZmPGOCl0RZ3RbAOOdfUod3kXbWyaxhtNCcWKf6XLiOhhFwxV84smL9w5OC2FSs bVNGScJpcJGUt98HJx8A8QBEXBFWzYUXbsUC2wEVQpuzDpOBj8cOxRKwU32diPvcU/ WPaoB/kKJ0qTA== From: Vineet Gupta To: linux-snps-arc@lists.infradead.org Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Anshuman Khandual , Mike Rapoport , Vineet Gupta Subject: [PATCH v2 10/19] ARC: mm: non-functional code cleanup ahead of 3 levels Date: Thu, 12 Aug 2021 16:37:44 -0700 Message-Id: <20210812233753.104217-11-vgupta@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210812233753.104217-1-vgupta@kernel.org> References: <20210812233753.104217-1-vgupta@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Vineet Gupta --- arch/arc/include/asm/page.h | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/arch/arc/include/asm/page.h b/arch/arc/include/asm/page.h index 514b8b70df50..28ed82b1800f 100644 --- a/arch/arc/include/asm/page.h +++ b/arch/arc/include/asm/page.h @@ -34,6 +34,13 @@ void copy_user_highpage(struct page *to, struct page *from, unsigned long u_vaddr, struct vm_area_struct *vma); void clear_user_page(void *to, unsigned long u_vaddr, struct page *page); +typedef struct { + unsigned long pgd; +} pgd_t; + +#define pgd_val(x) ((x).pgd) +#define __pgd(x) ((pgd_t) { (x) }) + typedef struct { #ifdef CONFIG_ARC_HAS_PAE40 unsigned long long pte; @@ -41,22 +48,17 @@ typedef struct { unsigned long pte; #endif } pte_t; -typedef struct { - unsigned long pgd; -} pgd_t; + +#define pte_val(x) ((x).pte) +#define __pte(x) ((pte_t) { (x) }) + typedef struct { unsigned long pgprot; } pgprot_t; -#define pte_val(x) ((x).pte) -#define pgd_val(x) ((x).pgd) -#define pgprot_val(x) ((x).pgprot) - -#define __pte(x) ((pte_t) { (x) }) -#define __pgd(x) ((pgd_t) { (x) }) -#define __pgprot(x) ((pgprot_t) { (x) }) - -#define pte_pgprot(x) __pgprot(pte_val(x)) +#define pgprot_val(x) ((x).pgprot) +#define __pgprot(x) ((pgprot_t) { (x) }) +#define pte_pgprot(x) __pgprot(pte_val(x)) typedef struct page *pgtable_t; @@ -96,8 +98,8 @@ extern int pfn_valid(unsigned long pfn); * virt here means link-address/program-address as embedded in object code. * And for ARC, link-addr = physical address */ -#define __pa(vaddr) ((unsigned long)(vaddr)) -#define __va(paddr) ((void *)((unsigned long)(paddr))) +#define __pa(vaddr) ((unsigned long)(vaddr)) +#define __va(paddr) ((void *)((unsigned long)(paddr))) #define virt_to_page(kaddr) pfn_to_page(virt_to_pfn(kaddr)) #define virt_addr_valid(kaddr) pfn_valid(virt_to_pfn(kaddr)) -- 2.25.1