From patchwork Wed Jul 11 19:59:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Kravetz X-Patchwork-Id: 10520377 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id ED5076028E for ; Wed, 11 Jul 2018 19:59:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E3BC0297A7 for ; Wed, 11 Jul 2018 19:59:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D7ED6297C6; Wed, 11 Jul 2018 19:59:50 +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=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, UNPARSEABLE_RELAY 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 BD4FA297A7 for ; Wed, 11 Jul 2018 19:59:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A74696B0010; Wed, 11 Jul 2018 15:59:48 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id A23BC6B0266; Wed, 11 Jul 2018 15:59:48 -0400 (EDT) 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 8EBF16B0269; Wed, 11 Jul 2018 15:59:48 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qk0-f199.google.com (mail-qk0-f199.google.com [209.85.220.199]) by kanga.kvack.org (Postfix) with ESMTP id 5FE136B0010 for ; Wed, 11 Jul 2018 15:59:48 -0400 (EDT) Received: by mail-qk0-f199.google.com with SMTP id l186-v6so25177370qkc.22 for ; Wed, 11 Jul 2018 12:59:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:cc:subject:date :message-id; bh=tP+V3Borxh0U/KXDOHt/QpWaHV3pNZI43ehZ4rhT/GA=; b=a03K7TTtUB16CJ4rTd4Hr3EavWylxbnc9HdIfSwENNyQgmLjV0U5JLIp1KN/Etxfe3 uvU7wOHyV8S2mtZ61jyAKE43uxWlAdAqU+PbciQ//1PoC5otvgh1pD6LFYo5PV2Drv0e DN0a1JBw8X7nyoGP+k6zZ5KN4l/0FasZnukPmJrTn1m85YNlrgor+LQBrCeOPZLTv9Z7 VEobjICIZ2a46P8rLbAtCVai3v55GVbeiPAHQ1F1qWvOEviifUZIbyIJbeoc0GO6m0Vx uXueyNZwJxA0g2scdJXCTcjmyCw95/i2OcDS+NyWSo87E/G7ze+9QXAGvPpxvjK+z0wB NDyA== X-Gm-Message-State: AOUpUlHfhdkpcB1I8Utpsk0Nrc9hyT6tprVjeQ/A50NyR1dS+vGXaXx2 OU7pJfqnrZg6DK5yycjsj53vDE04Ivgh4VqixeNfIqIPLamo4nl/t46ksBlbDG8MX5uDZkyo+zh VCP0afzGZMQQ7Kid55lJmvpSeq5WwB4i2oTQBR/6lJ+0f2TlJ7o8bGDCPdaYxgIJ5lw== X-Received: by 2002:a0c:fac4:: with SMTP id p4-v6mr30025qvo.179.1531339188216; Wed, 11 Jul 2018 12:59:48 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfsYe6df52yF9qbnG4GEeNj/ejKIkQQIUHIV/DNA8lt9xLaUXGcHMIFWBBuzJY1rQvwE//L X-Received: by 2002:a0c:fac4:: with SMTP id p4-v6mr29996qvo.179.1531339187777; Wed, 11 Jul 2018 12:59:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531339187; cv=none; d=google.com; s=arc-20160816; b=gKRcIzNwNUsx/VJIbJnX7duOnJgWifmPotk/iEZGiqllKdAI3yHXdFc0rewdcYDXh3 sulRyMfnebP8MVhn1Efq7nSOlfogCeD+U44/5gGhJ6lHr0qqe+z5NcWHcJcTpWYQsqPX 0Ff39zd1KhyVjLkivFpGlZWg8jTjdspF0Wn5HpvvVkv34r3RrFRIwCP5NlPUNUZntqXu XWFdle0qm1FHDmAOjooxb7knSK+ht5nXFyX7Y8bLbdEeDXSTdV0a/FcWwW1pcjh6B2ne vuQvemCxXqkomO6Ot95OHsK7ApY7IiRh/dKMam5YRXylYs03xEE6OcFwe1DEFz6hTf6r uRxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=tP+V3Borxh0U/KXDOHt/QpWaHV3pNZI43ehZ4rhT/GA=; b=QVj1F+iBVUNUDyykCVscnduEGOQuLu92hA2ZJnnGFmHQBsltefGKbEjln+eQ/rWcEp PzmTpHhIy/5cUXqc4LLjaxtApeiKsGxZRcOQuM9U5m+wG2+Tkgc5fQrNS88TD4GrqkB5 IBXJE+d7I5zfABY1QMaqjUyfr/NwkPqlToQj41wN/ZiuFM+2lM4UXzaVSN/lWLoUxaod N71KY0ZxSH5dQpfQBFo6YgKHiyryvDCDh4g7drkVGrqAb/0AbYaGdl5uo+bVXwfU7vpX aJ/NsqJtPHrRbfCid9Um3Y6zbj3/q43W6olJpk0emTYI2jA4qwSzkAiKA8gP+5AzD1zh yr0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=alWxyPZo; spf=pass (google.com: domain of mike.kravetz@oracle.com designates 141.146.126.78 as permitted sender) smtp.mailfrom=mike.kravetz@oracle.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from aserp2120.oracle.com (aserp2120.oracle.com. [141.146.126.78]) by mx.google.com with ESMTPS id z1-v6si480640qvg.201.2018.07.11.12.59.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Jul 2018 12:59:47 -0700 (PDT) Received-SPF: pass (google.com: domain of mike.kravetz@oracle.com designates 141.146.126.78 as permitted sender) client-ip=141.146.126.78; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=alWxyPZo; spf=pass (google.com: domain of mike.kravetz@oracle.com designates 141.146.126.78 as permitted sender) smtp.mailfrom=mike.kravetz@oracle.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w6BJsElc018749; Wed, 11 Jul 2018 19:59:38 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id; s=corp-2018-07-02; bh=tP+V3Borxh0U/KXDOHt/QpWaHV3pNZI43ehZ4rhT/GA=; b=alWxyPZoDL+G0cqV3fgTPd1uVu/tIBW40DFAO0WEO0JT+lhsdQ6mb3hSXbbTmUzuw2Zq rU+KZR025NbjIXDO0Hs+khH3gUfpuROSZ2L8qyhVqMxbqKhLiiGXsgQnjs6KdLD8Jk6z M25yx+s5r32hiiTy8Cty9bl36JbVbYyETLpt5LEcxGZoy+dR18AOxzi2LIpUwS3n9Avo eyuGmiUI4JCjAZnsjAvarTX2YhmtSVdyu3uQJk1guJPQ/NZaOs3Foi5JHbY8plEwMT3R ZpV1rcgEM1Tsn1enFP7SMBddrffbfof2Y1C8R/4uQY7LB6l926XZ4CdjIUYGONZbSfvK aA== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2120.oracle.com with ESMTP id 2k2p7dyqbs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 11 Jul 2018 19:59:38 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w6BJxXvL007447 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 11 Jul 2018 19:59:36 GMT Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w6BJxUFk008044; Wed, 11 Jul 2018 19:59:30 GMT Received: from monkey.oracle.com (/50.38.38.67) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 11 Jul 2018 12:59:30 -0700 From: Mike Kravetz To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: "Aneesh Kumar K . V" , Michael Ellerman , Benjamin Herrenschmidt , Michal Hocko , Cannon Matthews , Andrew Morton , Mike Kravetz Subject: [PATCH] mm/hugetlb: remove gigantic page support for HIGHMEM Date: Wed, 11 Jul 2018 12:59:13 -0700 Message-Id: <20180711195913.1294-1-mike.kravetz@oracle.com> X-Mailer: git-send-email 2.17.1 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8951 signatures=668706 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=2 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807110211 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 This reverts commit ee8f248d266e ("hugetlb: add phys addr to struct huge_bootmem_page") At one time powerpc used this field and supporting code. However that was removed with commit 79cc38ded1e1 ("powerpc/mm/hugetlb: Add support for reserving gigantic huge pages via kernel command line"). There are no users of this field and supporting code, so remove it. Signed-off-by: Mike Kravetz Acked-by: Michal Hocko --- include/linux/hugetlb.h | 3 --- mm/hugetlb.c | 9 +-------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 36fa6a2a82e3..c39d9170a8a0 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -348,9 +348,6 @@ struct hstate { struct huge_bootmem_page { struct list_head list; struct hstate *hstate; -#ifdef CONFIG_HIGHMEM - phys_addr_t phys; -#endif }; struct page *alloc_huge_page(struct vm_area_struct *vma, diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 430be42b6ca1..e39593df050b 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -2139,16 +2139,9 @@ static void __init gather_bootmem_prealloc(void) struct huge_bootmem_page *m; list_for_each_entry(m, &huge_boot_pages, list) { + struct page *page = virt_to_page(m); struct hstate *h = m->hstate; - struct page *page; -#ifdef CONFIG_HIGHMEM - page = pfn_to_page(m->phys >> PAGE_SHIFT); - memblock_free_late(__pa(m), - sizeof(struct huge_bootmem_page)); -#else - page = virt_to_page(m); -#endif WARN_ON(page_count(page) != 1); prep_compound_huge_page(page, h->order); WARN_ON(PageReserved(page));