Message ID | 1533326330-31677-6-git-send-email-rppt@linux.vnet.ibm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 3E86A13AC for <patchwork-linux-mm@patchwork.kernel.org>; Fri, 3 Aug 2018 19:59:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2F5932C165 for <patchwork-linux-mm@patchwork.kernel.org>; Fri, 3 Aug 2018 19:59:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 238D12C245; Fri, 3 Aug 2018 19:59:25 +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 67BE42C165 for <patchwork-linux-mm@patchwork.kernel.org>; Fri, 3 Aug 2018 19:59:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C74F56B0010; Fri, 3 Aug 2018 15:59:18 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id BAE046B0266; Fri, 3 Aug 2018 15:59:18 -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 A9E5B6B0269; Fri, 3 Aug 2018 15:59:18 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-oi0-f69.google.com (mail-oi0-f69.google.com [209.85.218.69]) by kanga.kvack.org (Postfix) with ESMTP id 6DE5B6B0010 for <linux-mm@kvack.org>; Fri, 3 Aug 2018 15:59:18 -0400 (EDT) Received: by mail-oi0-f69.google.com with SMTP id t138-v6so5657720oih.5 for <linux-mm@kvack.org>; Fri, 03 Aug 2018 12:59:18 -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:from:to:cc :subject:date:in-reply-to:references:message-id; bh=pErKKv6F4MkqIuM85zPVB5Q1Ron22fUWJmwJd2N7CKU=; b=kyr+FclGLRvVr4TUCja2q3tZQzFpPMdLcGdrXpgPXymZSg7eWRe56AjvC10XAFp8b6 Z0U9gKwx02mD1ZXh30XS2ADxn3Jv6CEBCy9CXFd1jfy9rgPuR+79ED6ac/MoEW5exky2 dNFwnKIneF00Btsar+M1rLns25tbH9GexZge6nCzqnWh9iJceYfRwkxdbG+Gcebp5WDL kRNsqg7N1eDChr3dxVk9SCUvWs1l/tenUr/OxGmRaQxrsUvl4xKe+qTFC9PrV/pYhBda njoyP0wfPddymYYZEH0qX6+awVUzYOCy9D29CZ9QsJNrX5NqFSoVvdCpvwTtQfVqlUPY dkGg== X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 148.163.158.5 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: AOUpUlHiWrPfBQd9fQDMyXYamtk0kRT0mOrQ5DU4PNoED61xPVCRMsax 3f1anoOJ3rX50lTT0tWSZHuMjrHk78HEiU3BSQt5yA//+avnHSNrV+4xX1z9vzqjNyyX2hBS3xN ezNZ1IoHnySzBkOYmGZooquQ5mOKrXu7f3CjSUd4KdIVLoiRy77cGimCAOweDQdo= X-Received: by 2002:aca:3c45:: with SMTP id j66-v6mr4326397oia.118.1533326358223; Fri, 03 Aug 2018 12:59:18 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcsC9CN4AZ2Q8UuxHkdqIjrCPccrz4Gbed5tMGdEeBl3LrLfpKkf1gQvOYvkoOq7fJlJxga X-Received: by 2002:aca:3c45:: with SMTP id j66-v6mr4326353oia.118.1533326357558; Fri, 03 Aug 2018 12:59:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533326357; cv=none; d=google.com; s=arc-20160816; b=Iqm4xSZqHF10JqckwHLNGnFxH969mGXWAWdynTWaOwzpCM84AfN7A3nRanHHoddHAn +QO2jrfWhM4pU2i5ELXH5U2gG12gG0ftWvmCa+VrbN5bEIkAMElkSqqmi03lnQB/WJ6T Xq9FmdnSQ5xKBhe9DjarMIu0qxODc3/OYzUR51OYHL72y8R6812LF6ff69AVrdMAsTDn pgFuWeA1DvTNco5TmfBAyFbk4orL8RqQ3ExNKo3F9Y//7x7Fnv8k1RBLWhUrNhSNzjT5 thVltrpUL0RVvJYURvkVpxGB6nW6HuJoH/MPTWyA9uSFgFXUDPjLj+iYlJH/D703uadg pmfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:references:in-reply-to:date:subject:cc:to:from :arc-authentication-results; bh=pErKKv6F4MkqIuM85zPVB5Q1Ron22fUWJmwJd2N7CKU=; b=uFSwnmdW5aaIBQQ4ao65VrmiZ/hSCZjD9MwRta37/a2ym/tK7EJUzO0420P/qtrbe8 G5/FMoQtZ5+NbB+grsgbc2eSYgbp/YH5hgkrVc6kq5Iqu8FrPhwguNiVM+gwYw3SJHdu eti6htKOCFjWfVbfxO7Q3FhNxs0RoH33QyoLPVWBNsrr1sRx2KVQ2jm0eixTFu8I9saj kybT+50Wp90P5S36CcfTiRiy9hv8BqmneHe0IC2mIcwp9Rfb1ifkXkJboIJz5qNIf4If 3Vvl4uQGyLtn1G5UJ79N3ZLWUsBjspYTTLOqXLgxTtY2t/CSVCD0D2zxIM+n4aRkpMJO 41eA== ARC-Authentication-Results: i=1; mx.google.com; spf=neutral (google.com: 148.163.158.5 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 (mx0b-001b2d01.pphosted.com. [148.163.158.5]) by mx.google.com with ESMTPS id t12-v6si3909317oif.377.2018.08.03.12.59.17 for <linux-mm@kvack.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Aug 2018 12:59:17 -0700 (PDT) Received-SPF: neutral (google.com: 148.163.158.5 is neither permitted nor denied by best guess record for domain of rppt@linux.vnet.ibm.com) client-ip=148.163.158.5; Authentication-Results: mx.google.com; spf=neutral (google.com: 148.163.158.5 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 (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w73Jx3M5186622 for <linux-mm@kvack.org>; Fri, 3 Aug 2018 15:59:17 -0400 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0b-001b2d01.pphosted.com with ESMTP id 2kmt6sfpjc-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for <linux-mm@kvack.org>; Fri, 03 Aug 2018 15:59:16 -0400 Received: from localhost by e06smtp03.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for <linux-mm@kvack.org> from <rppt@linux.vnet.ibm.com>; Fri, 3 Aug 2018 20:59:14 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp03.uk.ibm.com (192.168.101.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 3 Aug 2018 20:59:11 +0100 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w73JxAT542532966 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 3 Aug 2018 19:59:10 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CB1C952051; Fri, 3 Aug 2018 22:59:19 +0100 (BST) Received: from rapoport-lnx (unknown [9.148.204.91]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTPS id B26965204E; Fri, 3 Aug 2018 22:59:17 +0100 (BST) Received: by rapoport-lnx (sSMTP sendmail emulation); Fri, 03 Aug 2018 22:59:07 +0300 From: Mike Rapoport <rppt@linux.vnet.ibm.com> To: Andrew Morton <akpm@linux-foundation.org> Cc: Richard Kuo <rkuo@codeaurora.org>, Ley Foon Tan <lftan@altera.com>, Richard Weinberger <richard@nod.at>, Guan Xuetao <gxt@pku.edu.cn>, Michal Hocko <mhocko@kernel.org>, linux-hexagon@vger.kernel.org, nios2-dev@lists.rocketboards.org, linux-um@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Mike Rapoport <rppt@linux.vnet.ibm.com> Subject: [PATCH 5/7] um: setup_physmem: stop using global variables Date: Fri, 3 Aug 2018 22:58:48 +0300 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1533326330-31677-1-git-send-email-rppt@linux.vnet.ibm.com> References: <1533326330-31677-1-git-send-email-rppt@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18080319-0012-0000-0000-00000293ABB5 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18080319-0013-0000-0000-000020C5BF45 Message-Id: <1533326330-31677-6-git-send-email-rppt@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-08-03_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=681 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1808030216 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: <linux-mm.kvack.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
switch several architectures NO_BOOTMEM
|
expand
|
diff --git a/arch/um/kernel/physmem.c b/arch/um/kernel/physmem.c index f02596e..0eaec0e 100644 --- a/arch/um/kernel/physmem.c +++ b/arch/um/kernel/physmem.c @@ -86,7 +86,7 @@ void __init setup_physmem(unsigned long start, unsigned long reserve_end, long map_size; int err; - offset = uml_reserved - uml_physmem; + offset = reserve_end - start; map_size = len - offset; if(map_size <= 0) { os_warn("Too few physical memory! Needed=%lu, given=%lu\n", @@ -96,12 +96,12 @@ void __init setup_physmem(unsigned long start, unsigned long reserve_end, physmem_fd = create_mem_file(len + highmem); - err = os_map_memory((void *) uml_reserved, physmem_fd, offset, + err = os_map_memory((void *) reserve_end, physmem_fd, offset, map_size, 1, 1, 1); if (err < 0) { os_warn("setup_physmem - mapping %ld bytes of memory at 0x%p " "failed - errno = %d\n", map_size, - (void *) uml_reserved, err); + (void *) reserve_end, err); exit(1); }