From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751822AbbCTRYS (ORCPT ); Fri, 20 Mar 2015 13:24:18 -0400 Received: from shards.monkeyblade.net ([149.20.54.216]:35993 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751762AbbCTRYM convert rfc822-to-8bit (ORCPT ); Fri, 20 Mar 2015 13:24:12 -0400 Date: Fri, 20 Mar 2015 13:24:09 -0400 (EDT) Message-Id: <20150320.132409.66093972510859656.davem@davemloft.net> To: christian.koenig@amd.com Cc: alexander.deucher@amd.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] radeon: Do not directly dereference pointers to BIOS area. From: David Miller In-Reply-To: <550BEA98.8010609@amd.com> References: <550A8DF2.1010104@amd.com> <20150319.122906.969543288532051737.davem@davemloft.net> <550BEA98.8010609@amd.com> X-Mailer: Mew version 6.6 on Emacs 24.4 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christian König Date: Fri, 20 Mar 2015 10:38:32 +0100 > On 19.03.2015 17:29, David Miller wrote: >> From: Christian König >> Date: Thu, 19 Mar 2015 09:50:58 +0100 >> >>> In general I would say yes, but for this particular hardware it's a >>> bit questionable to do so. >>> >>> For radeon hardware to work correctly the CPU access to the PCIE BARs >>> should work even without using the specialized IO macros/functions, >>> otherwise mapping VRAM CPU accessible isn't really possible. >>> >>> What's the background of the change? Some problems on a certain CPU >>> platform? or just general cleanups? >> It's an _iomem_ pointer, it's not a virtual address. >> >> Therefore it is illegal to dereference the pointer. >> >> The value is opaque and has values that only make sense when used >> with the readb() et al. interfaces. >> >> This code is relying upon the fact that on x86 it happens to be >> a virtual address, but this won't work on many other architectures. > > In this case I'm perfectly fine with it and the patch is Reviewed-by: > Christian König > > Just wanted to make sure that you're not trying to get Radeon working > on a platform which will never really support the necessary hardware > features. I would like this to get merged via the Radeon DRM maintainer, thanks.