From patchwork Wed Dec 5 12:28:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 10714007 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 51F7714E2 for ; Wed, 5 Dec 2018 12:30:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 417202C78C for ; Wed, 5 Dec 2018 12:30:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 351E62CC55; Wed, 5 Dec 2018 12:30:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B36A62CAFA for ; Wed, 5 Dec 2018 12:30:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DE4726B744F; Wed, 5 Dec 2018 07:29:59 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id DB8CF6B7450; Wed, 5 Dec 2018 07:29:59 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CCF9A6B7451; Wed, 5 Dec 2018 07:29:59 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by kanga.kvack.org (Postfix) with ESMTP id A2F246B744F for ; Wed, 5 Dec 2018 07:29:59 -0500 (EST) Received: by mail-qt1-f197.google.com with SMTP id d35so20586561qtd.20 for ; Wed, 05 Dec 2018 04:29:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references; bh=5f1RX8PgtIxd6340o2+u9UfUNpwJ2JR8T6eBwDHn5iE=; b=agdsxzreDS+9Ajj1cNBP89npTOtBIHWTzYlV99FdLZ7icAb4h5zrRZ3NaDFwi1ME34 TohGolsEQQ0kqxa0mX2wtB6U1KN/1N2vR81uMdjZEf/npzFDTkFngu/+C7Gq9eYH1HdY OWsgOoamSEbd7DSUlPjxVW1FTIkEAg5qT6e8dnhDROQpbQzD3DXQts3vl1BEXKWaQHh4 YcdXp6+gl8yArAmvjS4VJA1O0QSoLBIm+9szk8KCqfEYB3S52XNtULqKmyEp9iOpm+Ch mV5wxhco0jy9/5ZznQ1+kCWaDUdhYg3i+9WFtxtOoCGu9aevOX1vQ+15LxWdpULNOFaC D9Rw== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Gm-Message-State: AA+aEWaZxjwICnTl4KNB/0RgbB6+7g4Bfpp4IzCW8nnSG6kub8RIDjKx hsx8MinHzBSgKQfQJ/MWYhbZXUtkkniYGGsZicWWdg81w1mbuOHKQLg59stHnKQGbic/RDnubmG te7mrPx0pltmAe22yYSxVMsh3ExjP4xEJMp8MAT80uM7z+lprRMl5vIbJFa70dyFnsg== X-Received: by 2002:a37:7e86:: with SMTP id z128mr21370687qkc.20.1544012999413; Wed, 05 Dec 2018 04:29:59 -0800 (PST) X-Google-Smtp-Source: AFSGD/X4n1uQjj68PLNErRL9fT5oJng8nt2KfY0DbwAPke0VJsa+Ga2HKkEmMZlFsNErAdpn4DvD X-Received: by 2002:a37:7e86:: with SMTP id z128mr21370659qkc.20.1544012998887; Wed, 05 Dec 2018 04:29:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544012998; cv=none; d=google.com; s=arc-20160816; b=Qhv5B91ArhkkjGxi1coKoaTUNGH49u2Uu/fDLkNOVlE3Lyn2rH++S8JNNc7G3HmweO 4LAMPGx1fWBc8fpvmiTZNbGXu8aIiT7Dw90PgtokAOHdwKtnHHZTXnsU1v8pA6SFvGpz nsSp6P/B0SnaGpC+p+lPVOv0qpJ6wP2amlgBeo6yXJbTyLN3kgHjaifRDwokVAJ4NFds tjGLtZjjz3of8oR3VhTbZenfkr7at1czhM5uelldhPGkQ/+fXx+DiOsiBP9yRwD5+N5q WFd6XjRrE9X9GWsOLgiCrR5kXCUjY3pFOk645/LsmK+vAx11ezuIAvz7sq8ktWFYpEOY WTBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from; bh=5f1RX8PgtIxd6340o2+u9UfUNpwJ2JR8T6eBwDHn5iE=; b=rA+q65HyRWff5xWzKnJ61H7dxntddPCCyVjl+pBnw3O+qXNXs5yyzHiYen8ZtF/Igd sxX8Vuy2SYWAiLxQzlCcdraLg4Q6ok7T4SQ4d0FA+nbIJlHmEwpafRpGQBbFE15QX38A zbyxU5/9VaA12erWrPsvdn8KfK+e5CrWQk1DaMg8r/GR3o6yemEeWkZi9YJ8Z5kSQFTA Y5FWjA4AV146Zyc68KA61EKyWyu5FHol2hkM5lTz5kHQI1f0JQb4DO6pvg3R8URKb6Da VCyvasaiVZ+x9FQi/UchXtAGp61GcvnjZuoZPfc5TrcU1igl5XMw8AiHw/G0yHuZs0DX yeVA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id i21si11088199qtp.305.2018.12.05.04.29.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Dec 2018 04:29:58 -0800 (PST) Received-SPF: pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of david@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F33E2307EAA1; Wed, 5 Dec 2018 12:29:57 +0000 (UTC) Received: from t460s.redhat.com (ovpn-117-65.ams2.redhat.com [10.36.117.65]) by smtp.corp.redhat.com (Postfix) with ESMTP id C4DF582789; Wed, 5 Dec 2018 12:29:11 +0000 (UTC) From: David Hildenbrand To: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-m68k@lists.linux-m68k.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-mediatek@lists.infradead.org, David Hildenbrand , David Airlie , Arnd Bergmann , Greg Kroah-Hartman , Andrew Morton , Michal Hocko , Matthew Wilcox Subject: [PATCH RFC 1/7] agp: efficeon: no need to set PG_reserved on GATT tables Date: Wed, 5 Dec 2018 13:28:45 +0100 Message-Id: <20181205122851.5891-2-david@redhat.com> In-Reply-To: <20181205122851.5891-1-david@redhat.com> References: <20181205122851.5891-1-david@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Wed, 05 Dec 2018 12:29:58 +0000 (UTC) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP The l1 GATT page table is kept in a special on-chip page with 64 entries. We allocate the l2 page table pages via get_zeroed_page() and enter them into the table. These l2 pages are modified accordingly when inserting/removing memory via efficeon_insert_memory and efficeon_remove_memory. Apart from that, these pages are not exposed or ioremap'ed. We can stop setting them reserved (propably copied from generic code). Cc: David Airlie Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: Andrew Morton Cc: Michal Hocko Cc: Matthew Wilcox Signed-off-by: David Hildenbrand --- drivers/char/agp/efficeon-agp.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/char/agp/efficeon-agp.c b/drivers/char/agp/efficeon-agp.c index 7f88490b5479..c53f0f9ef5b0 100644 --- a/drivers/char/agp/efficeon-agp.c +++ b/drivers/char/agp/efficeon-agp.c @@ -163,7 +163,6 @@ static int efficeon_free_gatt_table(struct agp_bridge_data *bridge) unsigned long page = efficeon_private.l1_table[index]; if (page) { efficeon_private.l1_table[index] = 0; - ClearPageReserved(virt_to_page((char *)page)); free_page(page); freed++; } @@ -219,7 +218,6 @@ static int efficeon_create_gatt_table(struct agp_bridge_data *bridge) efficeon_free_gatt_table(agp_bridge); return -ENOMEM; } - SetPageReserved(virt_to_page((char *)page)); for (offset = 0; offset < PAGE_SIZE; offset += clflush_chunk) clflush((char *)page+offset);