Message ID | 1532438594-4530-2-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 6990C180E for <patchwork-linux-mm@patchwork.kernel.org>; Tue, 24 Jul 2018 13:23:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 514E8285CE for <patchwork-linux-mm@patchwork.kernel.org>; Tue, 24 Jul 2018 13:23:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 44FD92886C; Tue, 24 Jul 2018 13:23:32 +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 D5001285CE for <patchwork-linux-mm@patchwork.kernel.org>; Tue, 24 Jul 2018 13:23:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C9F306B000E; Tue, 24 Jul 2018 09:23:30 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id C4FB76B0010; Tue, 24 Jul 2018 09:23:30 -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 AEF736B0266; Tue, 24 Jul 2018 09:23:30 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-oi0-f70.google.com (mail-oi0-f70.google.com [209.85.218.70]) by kanga.kvack.org (Postfix) with ESMTP id 806266B000E for <linux-mm@kvack.org>; Tue, 24 Jul 2018 09:23:30 -0400 (EDT) Received: by mail-oi0-f70.google.com with SMTP id x18-v6so4163992oie.7 for <linux-mm@kvack.org>; Tue, 24 Jul 2018 06:23:30 -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=I/QOyX3PFEfGRaiBPb16nRsZihtMU1MD5iWobTE4cO8=; b=gD0fxp4i4W0VJXJTkik3RSGbyl1mP6MhCkazhcIAfoigpjk3L6j8MVAyhPrCO+VQgC /QUqFVHhbN/oVmobVESGo//5ZaWGeleDClbYFW/PpmcxUptty22+fKf3NjbtBJZW/sVy vl8GVYJKzINupUxTe5OPs2b2DkDPZp+MtxXR1ANm3EygAkz7eKtBESfW/HZHrts+E2/U uWL/jo7k7WxkyrCbZICwqWTN4vxNbcD340JSmWlPYsynFZGbtkT5McWyk9GeaTb2sEic nvYMW8pNXVUINzYWxbwtJIwp7GfO3KCVems6/GyTfWRcS0r/+J4bPmbTaDZhsr3ouMCK iDbg== 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: AOUpUlEKPKdL7X05wXzfiLabNW7LVvaue5DV7BvsuBTi9B8dWERcq6Pg z2vRmFtPrbKrANR6IzKKh/1Nsw7jBxHCDlYZpWf+mESy7ptOn9oedXO7+HTOj/+oOyCoYzJdnU5 ZKdBHL1zA80gosiQAMDRDfbs6ollDQykSp92l2f+Hz8fciI02fHZJEc9XngL4jcU= X-Received: by 2002:aca:2c89:: with SMTP id s131-v6mr2998836ois.171.1532438610290; Tue, 24 Jul 2018 06:23:30 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc4r83N0Pwe1ALsqqqcvIZm8MfBxZxQCTPosqKbGpR/BtYgILv0/aCima8XBfGFtsVy8k+e X-Received: by 2002:aca:2c89:: with SMTP id s131-v6mr2998798ois.171.1532438609666; Tue, 24 Jul 2018 06:23:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532438609; cv=none; d=google.com; s=arc-20160816; b=Oh2VNNxkHYGKMmh3YIE5tLXNnIbTOGay5FMThA43JA8U7lQDjX0/8AV8fUgIIzRsnI 4ToIIsgPmfyRlmEx7LipDiTpC+KuhVq4wV4VctA4QSPlzVF1IVWJSskS9anaU8MUk/lL Ju9qhK98GdhXfOIwym3F23nrk9Shtn3wfwsD1dTsMo0zeZeZk6jPAxaUZaC11onKaSb7 RFhcW0x9o6ikcheRqV9trL1hN9/KsBs0C1HzV02Ym9XJCbeRoa3ytzzUxBLVShOrA3PB AbaHbbBGhQ7U6BMuALwyuxyR6sWG5lM03cWL6+QNFInBU9qznLYzED3I5Cf7AFApu/+1 bHRA== 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=I/QOyX3PFEfGRaiBPb16nRsZihtMU1MD5iWobTE4cO8=; b=JXdJMUlOmFuD1ngrR448VXVjBgj4ppL9KViFt7hIopi/cMLJ2GVB9TXkXkIRQ1I3sz 8SaIKSUvUDq+tND20PLRWxWBclNYxH0Wh3/c/+1+qqyimQJftBsY9TOI/XsqF3+TIhGO d6+W8apAqe1b8aWIb0NGcfy6tXKqyqFAZrkeMhP0bs4V9sHL8nTAnkKwOlAq7BhGVk+h PLAblnYS+RRzBPtny42PIZ4muNPLqHLkwPsYf1/Ie5efBNAQ+ewUmkOaHwHW03BNz9i5 l/BGuAhDvPGjlqNu9ap9ruGQbUllphmCqSZfCPtrCgQGNjnlRJiMAzWkc8EpqS1x9A/N QQ2g== 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 l191-v6si8144586oib.284.2018.07.24.06.23.29 for <linux-mm@kvack.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jul 2018 06:23:29 -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 (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w6ODIl7U008444 for <linux-mm@kvack.org>; Tue, 24 Jul 2018 09:23:28 -0400 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0a-001b2d01.pphosted.com with ESMTP id 2ke3r5uy9a-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for <linux-mm@kvack.org>; Tue, 24 Jul 2018 09:23:28 -0400 Received: from localhost by e06smtp07.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>; Tue, 24 Jul 2018 14:23:26 +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) Tue, 24 Jul 2018 14:23:22 +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 w6ODNLch40894590 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 24 Jul 2018 13:23:21 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 39E6711C04C; Tue, 24 Jul 2018 16:23:36 +0100 (BST) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A8D5D11C054; Tue, 24 Jul 2018 16:23:34 +0100 (BST) Received: from rapoport-lnx (unknown [9.148.8.56]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Tue, 24 Jul 2018 16:23:34 +0100 (BST) Received: by rapoport-lnx (sSMTP sendmail emulation); Tue, 24 Jul 2018 16:23:19 +0300 From: Mike Rapoport <rppt@linux.vnet.ibm.com> To: Jeff Dike <jdike@addtoit.com>, Richard Weinberger <richard@nod.at> Cc: Michal Hocko <mhocko@kernel.org>, linux-um@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Mike Rapoport <rppt@linux.vnet.ibm.com> Subject: [PATCH 1/2] um: setup_physmem: stop using global variables Date: Tue, 24 Jul 2018 16:23:13 +0300 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1532438594-4530-1-git-send-email-rppt@linux.vnet.ibm.com> References: <1532438594-4530-1-git-send-email-rppt@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18072413-0028-0000-0000-000002DF8A11 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18072413-0029-0000-0000-00002397702C Message-Id: <1532438594-4530-2-git-send-email-rppt@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-07-24_04:,, 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=803 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807240141 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 |
um: switch to 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); }
The setup_physmem() function receives uml_physmem and uml_reserved as parameters and still used these global variables. Replace such usage with local variables. Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com> --- arch/um/kernel/physmem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)