From patchwork Wed Sep 26 11:27:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 10615729 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 8594D13A4 for ; Wed, 26 Sep 2018 11:27:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6AF292A8C3 for ; Wed, 26 Sep 2018 11:27:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E1AB2A8E2; Wed, 26 Sep 2018 11:27:56 +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 C04182A8C3 for ; Wed, 26 Sep 2018 11:27:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BD4188E0006; Wed, 26 Sep 2018 07:27:54 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id B84038E0001; Wed, 26 Sep 2018 07:27:54 -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 A25978E0006; Wed, 26 Sep 2018 07:27:54 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-ot1-f71.google.com (mail-ot1-f71.google.com [209.85.210.71]) by kanga.kvack.org (Postfix) with ESMTP id 769038E0001 for ; Wed, 26 Sep 2018 07:27:54 -0400 (EDT) Received: by mail-ot1-f71.google.com with SMTP id q12-v6so16166495otf.20 for ; Wed, 26 Sep 2018 04:27:54 -0700 (PDT) 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:date:from:to :cc:subject:mime-version:content-disposition:user-agent:message-id; bh=qON5CuhYJFWhExsfrRnUY3Peo6grGvR2Q4AL1YsTj5E=; b=Rtvd5V1u10+r8t/9BqXToIHpBB2yJDxNsEYRw2T/70DMXsFOM4r/6yga7cM3waNhie lEdyvh0Tp+KKG7sSoBZyCAiW5lGPhJ1EY/weL9TzM3q9bkeyInni71tT1r7KkmFSf/hj CelTVmxLVDowMEp9ZGcFof8/ytnWXJV/L3wnJhhoXABgKBddgehIXxfm8MFaoDX83ceH E4JvAgGaKUEOQImotxy/EzZBu9tqW8z9uzfmdKEkQDYKkt4Byo4NFFFkNoN13YZGnhTZ cBjd3g3exod2voxr6e76ILOsUeEeS3W+XYxVkZJYNWRtTugrbQc+LanhuQefacvIDgyA slDQ== X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 148.163.156.1 is neither permitted nor denied by best guess record for domain of rppt@linux.vnet.ibm.com) smtp.mailfrom=rppt@linux.vnet.ibm.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com X-Gm-Message-State: ABuFfoj40bnSqZU63/9g0wUiE2WKAAZ7GqH0wfwthL5xzPPqV2VRHvQT 9mCH5I+mxyWxZ5GzkHusyu3iHEmiqCSHQ340RaI19tUsHGyf94uWMG8VDj6nckHXPX3iyEzeZjD k3IzSBUNqfOaAf6L/CYvhaCRxeP0djNcfsiH3BoWeoNF5KuPuwND0ISxwDoHv2Bo= X-Received: by 2002:a9d:2282:: with SMTP id y2-v6mr3964873ota.382.1537961274241; Wed, 26 Sep 2018 04:27:54 -0700 (PDT) X-Google-Smtp-Source: ACcGV60IaI2wvA7NLvDEkHTCGYf+n20uK5RzlJGE2DaF+mEHe/9zWtEwdyKU4+y5RROWrfczBLQT X-Received: by 2002:a9d:2282:: with SMTP id y2-v6mr3964836ota.382.1537961273515; Wed, 26 Sep 2018 04:27:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537961273; cv=none; d=google.com; s=arc-20160816; b=YIpeZ85i2K7H4O6WcaPODLza6sjxjmG+0EaKbQn6UN9dk/6IWzhNmvRRrRClQZ7HTg u47m2I0bBwxzgf8LSVgbj99NSDQPzxvbM7gfWgErevPi7IvM3OpmO0ynLBcpep+esdpF 94k1Wsbr/Wwkcc/tHIB9pHF1aVv1yuhKIadUX9TUUBTX6+rVRYH0OhReEvv60qDU5kIp myiBFQNMvp1f36IVygAKvcTQhVwOhfKyVeZdCkeCFYiCftdGHnvdkzmWOWof12cD4+cN 6m2T1gX6LSuZtm7D20Hwzup6fgtMzX/6YwhnilPBXUXBGhdtaEwVplCgHNiYeEQFtGGj 3I7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:user-agent:content-disposition:mime-version:subject:cc :to:from:date; bh=qON5CuhYJFWhExsfrRnUY3Peo6grGvR2Q4AL1YsTj5E=; b=ehp8jwRG0S0IolnerruyZCwMQIGu7FaXXVoGzKKTD08B7pb3AQCCUDxdcqpaTZefr4 JK67pmBzgcfbTnJX+GCOzitECuShly7BXWEGKl8qJgPIT9bUvi9uM2+0oQpoV1zZzobF 9uZE46p5a3gtkpI0tp4zLK9HfR+gUJ8UXpYHtBFUcskhc2kU3Fm6n2FSewIZG3ljCHpg 740t2sVP+GKRiWTopkY+RGu5NwgZVvmWv/K88hyI1fCsyf5ugLpGBTOjUPLvrltDeF+e AOSl0Dpsma5cm580mD5TVGPm6mrYoI7Ed1rK40HgsczD9QomCG8KWmKah0dPAw4g8s2b 5KQg== ARC-Authentication-Results: i=1; mx.google.com; spf=neutral (google.com: 148.163.156.1 is neither permitted nor denied by best guess record for domain of rppt@linux.vnet.ibm.com) smtp.mailfrom=rppt@linux.vnet.ibm.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com. [148.163.156.1]) by mx.google.com with ESMTPS id v13-v6si2661385ote.41.2018.09.26.04.27.53 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Sep 2018 04:27:53 -0700 (PDT) Received-SPF: neutral (google.com: 148.163.156.1 is neither permitted nor denied by best guess record for domain of rppt@linux.vnet.ibm.com) client-ip=148.163.156.1; Authentication-Results: mx.google.com; spf=neutral (google.com: 148.163.156.1 is neither permitted nor denied by best guess record for domain of rppt@linux.vnet.ibm.com) smtp.mailfrom=rppt@linux.vnet.ibm.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w8QBOOtV086589 for ; Wed, 26 Sep 2018 07:27:52 -0400 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0a-001b2d01.pphosted.com with ESMTP id 2mr7ud43pe-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 26 Sep 2018 07:27:52 -0400 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 26 Sep 2018 12:27:50 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp07.uk.ibm.com (192.168.101.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 26 Sep 2018 12:27:48 +0100 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w8QBRlf253149698 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 26 Sep 2018 11:27:47 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8DA5D11C04A; Wed, 26 Sep 2018 14:27:28 +0100 (BST) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 18C6311C052; Wed, 26 Sep 2018 14:27:28 +0100 (BST) Received: from rapoport-lnx (unknown [9.148.8.124]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Wed, 26 Sep 2018 14:27:27 +0100 (BST) Date: Wed, 26 Sep 2018 14:27:45 +0300 From: Mike Rapoport To: Andrew Morton Cc: Michal Hocko , Guo Ren , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] csky: fixups after bootmem removal MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-TM-AS-GCONF: 00 x-cbid: 18092611-0028-0000-0000-000002FECE81 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18092611-0029-0000-0000-000023B8E741 Message-Id: <20180926112744.GC4628@rapoport-lnx> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-09-26_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809260113 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 Hi, The below patch fixes the bootmem leftovers in csky. It is based on the current mmots and csky build there fails because of undefined reference to dma_direct_ops: MODPOST vmlinux.o kernel/dma/mapping.o: In function `dmam_alloc_attrs': kernel/dma/mapping.c:143: undefined reference to `dma_direct_ops' kernel/dma/mapping.o: In function `dmam_declare_coherent_memory': kernel/dma/mapping.c:184: undefined reference to `dma_direct_ops' mm/dmapool.o: In function `dma_free_attrs': include/linux/dma-mapping.h:558: undefined reference to `dma_direct_ops' I've blindly added "select DMA_DIRECT_OPS" to arch/csky/Kconfig and it fixed the build, but I really have no idea if this the right thing to do... From 63c3b24e661e6cad88f0432dd460d35a16741871 Mon Sep 17 00:00:00 2001 From: Mike Rapoport Date: Wed, 26 Sep 2018 13:40:13 +0300 Subject: [PATCH] csky: fixups after bootmem removal The bootmem removal patchest didn't take into account csky architecture and it still had bootmem leftovers. Remove them now. Signed-off-by: Mike Rapoport --- arch/csky/Kconfig | 1 - arch/csky/kernel/setup.c | 1 - arch/csky/mm/highmem.c | 4 ++-- arch/csky/mm/init.c | 3 +-- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/arch/csky/Kconfig b/arch/csky/Kconfig index fb2a0ae..fc25ea6 100644 --- a/arch/csky/Kconfig +++ b/arch/csky/Kconfig @@ -35,7 +35,6 @@ config CSKY select HAVE_C_RECORDMCOUNT select HAVE_DMA_API_DEBUG select HAVE_DMA_CONTIGUOUS - select HAVE_MEMBLOCK select MAY_HAVE_SPARSE_IRQ select MODULES_USE_ELF_RELA if MODULES select OF diff --git a/arch/csky/kernel/setup.c b/arch/csky/kernel/setup.c index 27f9e10..bee4d26 100644 --- a/arch/csky/kernel/setup.c +++ b/arch/csky/kernel/setup.c @@ -3,7 +3,6 @@ #include #include -#include #include #include #include diff --git a/arch/csky/mm/highmem.c b/arch/csky/mm/highmem.c index 149921a..5b90501 100644 --- a/arch/csky/mm/highmem.c +++ b/arch/csky/mm/highmem.c @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include #include #include @@ -138,7 +138,7 @@ static void __init fixrange_init (unsigned long start, unsigned long end, pmd = (pmd_t *)pud; for (; (k < PTRS_PER_PMD) && (vaddr != end); pmd++, k++) { if (pmd_none(*pmd)) { - pte = (pte_t *) alloc_bootmem_low_pages(PAGE_SIZE); + pte = (pte_t *) memblock_alloc_low(PAGE_SIZE, PAGE_SIZE); set_pmd(pmd, __pmd(__pa(pte))); BUG_ON(pte != pte_offset_kernel(pmd, 0)); } diff --git a/arch/csky/mm/init.c b/arch/csky/mm/init.c index fd2791b..46c5aaa 100644 --- a/arch/csky/mm/init.c +++ b/arch/csky/mm/init.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include @@ -44,7 +43,7 @@ void __init mem_init(void) #endif high_memory = (void *) __va(max_low_pfn << PAGE_SHIFT); - free_all_bootmem(); + memblock_free_all(); #ifdef CONFIG_HIGHMEM for (tmp = highstart_pfn; tmp < highend_pfn; tmp++) {