Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1301998imm; Tue, 3 Jul 2018 08:49:48 -0700 (PDT) X-Google-Smtp-Source: AAOMgpf91HTwpciK7e1Vl2YEN4RyptBc7cWpK1BOnPBES/JkETIx37rEzTcUAM/hv9j6XTeMQSdF X-Received: by 2002:a62:8d7:: with SMTP id 84-v6mr9607734pfi.172.1530632988458; Tue, 03 Jul 2018 08:49:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530632988; cv=none; d=google.com; s=arc-20160816; b=ECbbj0SmA7TeEyLLOSJx7t3NJJNl2KoJmnL1XD+xSFM0xmdVIxuY+Ew84iZVtO8ky2 OVZQdRi/lR+uBcitNoMqduu20vd/LGGCOG/YIkSu//0BwE93118SUBlCS1rDFer0iHOe okD3J6hJqlYwnJ5DE+pl20XPcy9o/y2iMjSsevG6AJzr5BGLOn7tXsFDZo/uucUjBXeC MrnCDsOls6aZ3XecG2jeCMDhJtp48a/Z4cuSp9CGYMkAgKvtOg1z4LSapFN9t7qZPfwn N5IErE3UEqKhUIrLZFnurWjOGxp1R8ZzNzrNmouiMRBRxGxWAy1JOx79Mo8BNA/WxEk+ sY6g== 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:in-reply-to :content-disposition:mime-version:references:subject:cc:to:from:date :arc-authentication-results; bh=vso4rPXxBVD7sHlsPh0WH/qYUxOUIaVqMA72B3etpz4=; b=ErD0PRMrPJwlAaPYC1G5W4QMF2qeKVEaO5t0xEMMCv8hZAoAgCJnhgQG4OweZgABWx SU+UMvAooguQhLCchoe7+KWEf9PJZn9yI39m6RS6lU6E34Yk6jLhKWqSOjlMamjQntYv pHJ5E2U4mA/89EbZ/50G+tx/AYYDS7Hzh1PamxQ6ETS3W5sTLPr4QYvImcdxVgdOUSvZ zK8Dijrtg2IeeEPBctHyy9v45s54CR4JAl98n4rwsu8sTPYdBxRWhPryUUlxm2nOoB4G 99mZ7kiKMrcUXn5UjBVG8z4YEZ6wW6OUb8Rw8nzXh48+sO1OU+pg2J62D3iNr094jZsg DjoA== 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 e9-v6si1192665pgo.397.2018.07.03.08.49.33; Tue, 03 Jul 2018 08:49:48 -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 S933063AbeGCPsD (ORCPT + 99 others); Tue, 3 Jul 2018 11:48:03 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:58390 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932209AbeGCPsB (ORCPT ); Tue, 3 Jul 2018 11:48:01 -0400 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 w63Fhml9070162 for ; Tue, 3 Jul 2018 11:48:01 -0400 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0a-001b2d01.pphosted.com with ESMTP id 2k09281etn-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 03 Jul 2018 11:48:00 -0400 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 3 Jul 2018 16:47:58 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 3 Jul 2018 16:47:55 +0100 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w63Flsgt37617734 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 3 Jul 2018 15:47:54 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CEDADA404D; Tue, 3 Jul 2018 18:48:19 +0100 (BST) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DD970A4040; Tue, 3 Jul 2018 18:48:18 +0100 (BST) Received: from rapoport-lnx (unknown [9.148.206.209]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Tue, 3 Jul 2018 18:48:18 +0100 (BST) Date: Tue, 3 Jul 2018 18:47:51 +0300 From: Mike Rapoport To: Michal Hocko Cc: Matthew Wilcox , Geert Uytterhoeven , Greg Ungerer , Sam Creasey , linux-m68k@lists.linux-m68k.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/3] m68k/page_no.h: force __va argument to be unsigned long References: <1530613795-6956-1-git-send-email-rppt@linux.vnet.ibm.com> <1530613795-6956-3-git-send-email-rppt@linux.vnet.ibm.com> <20180703142054.GL16767@dhcp22.suse.cz> <20180703150315.GC4809@rapoport-lnx> <20180703150535.GA21590@bombadil.infradead.org> <20180703151401.GQ16767@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180703151401.GQ16767@dhcp22.suse.cz> User-Agent: Mutt/1.5.24 (2015-08-30) X-TM-AS-GCONF: 00 x-cbid: 18070315-0020-0000-0000-000002A2B18D X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18070315-0021-0000-0000-000020EECB17 Message-Id: <20180703154751.GF4809@rapoport-lnx> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-07-03_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=969 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807030179 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 03, 2018 at 05:14:01PM +0200, Michal Hocko wrote: > On Tue 03-07-18 08:05:35, Matthew Wilcox wrote: > > On Tue, Jul 03, 2018 at 06:03:16PM +0300, Mike Rapoport wrote: > > > On Tue, Jul 03, 2018 at 04:20:54PM +0200, Michal Hocko wrote: > > > > On Tue 03-07-18 13:29:54, Mike Rapoport wrote: > > > > > Add explicit casting to unsigned long to the __va() parameter > > > > > > > > Why is this needed? > > > > > > To make it consitent with other architecures and asm-generic :) > > > > > > But more importantly, __memblock_free_late() passes u64 to page_to_pfn(). > > > > Why does memblock work in terms of u64 instead of phys_addr_t? > > Yes, phys_addr_t was exactly that came to my mind as well. Casting > physical address to unsigned long just screams for potential problems. Not sure if for m68k-nommu the physical address can really go beyond 32 bits, but in general this is something that should be taken care of. I think adding the cast in m68k-nommu case is a viable band aid to allow sorting out the bootmem vs nobootmem. In any case care should be taken of all those #define __va(x) ((void *)((unsigned long)(x))) all around. Regardless, I can s/u64/phys_addr_t/ in memblock.c. > -- > Michal Hocko > SUSE Labs > -- Sincerely yours, Mike.