Received: by 2002:a05:6a10:8a4d:0:0:0:0 with SMTP id dn13csp292667pxb; Thu, 12 Aug 2021 16:47:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyCggpmCmAuCNi96ygG432p1FYoC10tz9HIrwlfyP4Zs7CzLt6vIuvjIeMFuCqC2HRUdPDZ X-Received: by 2002:a05:6e02:cc3:: with SMTP id c3mr742473ilj.207.1628812047265; Thu, 12 Aug 2021 16:47:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628812047; cv=none; d=google.com; s=arc-20160816; b=gD3nVyfxompHJOf7TMhDlBNAxtnEmOXKirDU4jrqxr9vBeEkwBOVVBohekn3fegqyX Dd5F1cSIr7BY5K6yCT1XRQ6e50QWuaDQx7MrQ8rkQOxX+l60hetYZ7eM/9Gln3yUMy2A 3Ab9kFK/s51WpGGmwy2id0HS5dDRR2jxkwRT1WzdRCuoW/WdDWmShaeTko3x0bSsN3Zu 8RRPnzUap+sQq8+08snM17wwzMhuE4LAcJBcCge9U27kk1HYw2sty7WZImyCiW1FrK0L XAuDxMwCVOVDYDK8yQD683QiACOdqCDeD/8gkULOD/IdJfw9xyeWpHCBJD1MqGiF60R5 E8jA== 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=yMQlt/5Hzg5TjztyU9P38aldE1n+KANR7vQ6zD4ggF8=; b=jeWke/iXze0oABI149hKobn5rNrFlJX8vbWeEk+do3EHKigUE9fMrgUcN+TXMox9Ec DLO8D+32rxq2B3EkWUZMaQ3hGpIizqtZFNf+a+6DOmRYcy5ugTlwar0bsysoV+26zkvi pQQD6WvUVviIcYvp7q94pCGAhCetdoKtxVkKIkXKBzfZfWmTVDa3Ixh6eljh7hx8bL6n ZHcIiPWawGvDwgI9MyS1w2uplDFOq8YqxaxIXuQesMwC/bDsXlswczN7WidFYtrK5gYn jTlkmk2jH18Wb6Qi6GyBMSOf7hBiwVTMKF/CMU/aaxyRTKJ2sJS1DsOsqV8teIFdWdhK aZyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SoMM9n1T; 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 j3si4694216ilu.69.2021.08.12.16.47.16; Thu, 12 Aug 2021 16:47:27 -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=SoMM9n1T; 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 S238552AbhHLXio (ORCPT + 99 others); Thu, 12 Aug 2021 19:38:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:48816 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238143AbhHLXi1 (ORCPT ); Thu, 12 Aug 2021 19:38:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 311AD6113E; 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=1628811481; bh=P/zEitpJGWXqQnjfHf92tqfSZBtCS0Di5vxOaU/9MD8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SoMM9n1Tr9XrlR6f4RTBC9zHGaQ7Tv1e0NIHSbudb/XWoxRn7yJH/EpDjhLAoPG1U k2VsEjQP02DPXvFXHVj0R/S5Y2782k0scB4WxtX6mUIyBLJ7DJBN+h7ftKfmMPBqL/ +DwhvMMSy8nq0eWpPPrIbZSFCcFjBC7vIKQLYgC3XG9amedpT0Z2lEUgg4tURebKiG YLkUqikSOR7OvDrVu4UmlG/b0J5Fj+t4XXjgRaiRZjacqnGyXqsrLy0Xfxr5Ihhlte 5Eng0QYUmJZbsFRfwkwDPu7hBvayhRq+wFiEagK/TeSRFOxgwNdiBAFPKisC4F4rIU +uvGLl4pZGrxQ== 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 09/19] ARC: mm: switch to asm-generic/pgalloc.h Date: Thu, 12 Aug 2021 16:37:43 -0700 Message-Id: <20210812233753.104217-10-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 With previous patch ARC pgalloc functions are same as generic, hence switch to that. Suggested-by: Mike Rapoport Signed-off-by: Vineet Gupta --- arch/arc/include/asm/pgalloc.h | 42 +--------------------------------- 1 file changed, 1 insertion(+), 41 deletions(-) diff --git a/arch/arc/include/asm/pgalloc.h b/arch/arc/include/asm/pgalloc.h index 8ab1af3da6e7..0cde9e5eefd7 100644 --- a/arch/arc/include/asm/pgalloc.h +++ b/arch/arc/include/asm/pgalloc.h @@ -31,6 +31,7 @@ #include #include +#include static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte) @@ -69,47 +70,6 @@ static inline pgd_t *pgd_alloc(struct mm_struct *mm) return ret; } -static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd) -{ - free_page((unsigned long)pgd); -} - -static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm) -{ - pte_t *pte; - - pte = (pte_t *) __get_free_page(GFP_KERNEL | __GFP_ZERO); - - return pte; -} - -static inline pgtable_t pte_alloc_one(struct mm_struct *mm) -{ - struct page *page; - - page = (pgtable_t)alloc_page(GFP_KERNEL | __GFP_ZERO | __GFP_ACCOUNT); - if (!page) - return NULL; - - if (!pgtable_pte_page_ctor(page)) { - __free_page(page); - return NULL; - } - - return page; -} - -static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) -{ - free_page((unsigned long)pte); -} - -static inline void pte_free(struct mm_struct *mm, pgtable_t pte_page) -{ - pgtable_pte_page_dtor(pte_page); - __free_page(pte_page); -} - #define __pte_free_tlb(tlb, pte, addr) pte_free((tlb)->mm, pte) #endif /* _ASM_ARC_PGALLOC_H */ -- 2.25.1