Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp628224imm; Wed, 26 Sep 2018 04:28:16 -0700 (PDT) X-Google-Smtp-Source: ACcGV63A+wd49ru8FHCz54ecCm7tqKJYHepUPoayk4j+WDy5wyyTQiV9eoAqryvXQPpOnUS961Gi X-Received: by 2002:a17:902:d715:: with SMTP id w21-v6mr5521189ply.143.1537961296133; Wed, 26 Sep 2018 04:28:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537961296; cv=none; d=google.com; s=arc-20160816; b=voNctwTDY3j1ozcYBv0juinagvGCl8boB7tPVFTSSmIu/rh0TNh3IPdDGcEgC3vaZp VhbzbcVV1ZSIrjSicWvwpEa9P44OH7G52otW6AaoBFzX1G115XQTVjbgn6Qwcq0rnvAl i98fdWHzRd8dbVNdhK5/8nDQk1za5N0HWhKT5rwjwv3syfIel+hulVMOIvEMFXAHZ7/d rDhAH7Ad9limMz2w/oyjifQC4JszXQqD+hEy2G1vu9tXmURkzsjxnnY/EYnroAuWHBJ3 Z19opJleP7xxKWxGo1LhPadeP8f4WrWcM70KYxp93h8hihV2CrnzlPBn+IV89hkbAx0j 9D7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:content-disposition :mime-version:subject:cc:to:from:date; bh=qON5CuhYJFWhExsfrRnUY3Peo6grGvR2Q4AL1YsTj5E=; b=GIQo/uCjAdLG/bezVNQ17sAX2ld1JGRP/Lmdae3q1JteUxsNMNpxT2Sk5fw/I9v70I 9BYIq3tYWhdZyRp9lhO4MJ/ivqNs69cazHTCswZrDHQeYoSBsnXbycZjaxKg13XYZdPL 7zZzKMbJikOzH/Pt4V5UhZCqCuRbor3SvOfUUINjJEWQsFrjcbwD17NAeZyJR/LLaQIr A9dZvQtnZnQoentSkjJP1K5m1Bko+5+P2TDY6uRdoRImWE7t/yaq/I2dVeoGh4VmdrwR UTsjdr3Kez4UhCSb4zg/pteIsVocnBoSSBbx92bQVU/cxUyBqoYbLhEd1f4C++hYXgGF FQ+Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t123-v6si5099718pgc.662.2018.09.26.04.27.59; Wed, 26 Sep 2018 04:28:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727299AbeIZRkX (ORCPT + 99 others); Wed, 26 Sep 2018 13:40:23 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:33424 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726593AbeIZRkX (ORCPT ); Wed, 26 Sep 2018 13:40:23 -0400 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w8QBP6Rk087256 for ; Wed, 26 Sep 2018 07:27:52 -0400 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0b-001b2d01.pphosted.com with ESMTP id 2mr805khsd-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 26 Sep 2018 07:27:51 -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-Type: text/plain; charset=us-ascii 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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++) { -- 2.7.4 -- Sincerely yours, Mike.