From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754396AbbDTGwt (ORCPT ); Mon, 20 Apr 2015 02:52:49 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:37598 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751520AbbDTGwm (ORCPT ); Mon, 20 Apr 2015 02:52:42 -0400 Date: Mon, 20 Apr 2015 08:52:35 +0200 From: Ingo Molnar To: Pavel Machek Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, jgross@suse.com, roland@purestorage.com, akpm@linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [patch for 4.0] x86: silence warning in /dev/mem support Message-ID: <20150420065235.GA13876@gmail.com> References: <20150416080440.GA507@amd> <20150416100954.GA7847@gmail.com> <20150416101549.GB27776@amd> <20150417083915.GA12451@gmail.com> <20150417084846.GB13741@amd> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20150417084846.GB13741@amd> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Pavel Machek wrote: > Hi! > > > > CC arch/x86/mm/ioremap.o > > > arch/x86/mm/ioremap.c: In function ‘xlate_dev_mem_ptr’: > > > arch/x86/mm/ioremap.c:363:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] > > > addr = (void *)((unsigned long)addr | (phys & ~PAGE_MASK)); > > > ^ > > > LD arch/x86/mm/built-in.o > > > > > > pavel@amd:/data/l/linux$ gcc --version > > > gcc (Debian 4.9.2-10) 4.9.2 > > > > So this code has not been changed for a year or so in theory, and I've > > never seen this warning with GCC 4.9.1. I'm wondering how it > > triggered. Could you send me your .config that triggers this? > > Config sent in private email. 32-bit kernel. Ah, I see, the key is: CONFIG_HIGHMEM64G=y and neither x86 defconfig nor allyesconfig/allmodconfig selects HIGHMEM64G apparently, so this was rarely triggered. Thanks, Ingo