From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751595AbbCTJir (ORCPT ); Fri, 20 Mar 2015 05:38:47 -0400 Received: from mail-bl2on0109.outbound.protection.outlook.com ([65.55.169.109]:35376 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750990AbbCTJip convert rfc822-to-8bit (ORCPT ); Fri, 20 Mar 2015 05:38:45 -0400 X-Greylist: delayed 89256 seconds by postgrey-1.27 at vger.kernel.org; Fri, 20 Mar 2015 05:38:44 EDT X-WSS-ID: 0NLI84B-07-92S-02 X-M-MSG: Message-ID: <550BEA98.8010609@amd.com> Date: Fri, 20 Mar 2015 10:38:32 +0100 From: =?windows-1252?Q?Christian_K=F6nig?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: David Miller CC: , , Subject: Re: [PATCH] radeon: Do not directly dereference pointers to BIOS area. References: <20150318.231840.1263267500500914630.davem@davemloft.net> <550A8DF2.1010104@amd.com> <20150319.122906.969543288532051737.davem@davemloft.net> In-Reply-To: <20150319.122906.969543288532051737.davem@davemloft.net> Content-Type: text/plain; charset="windows-1252"; format=flowed X-Originating-IP: [10.224.153.50] Content-Transfer-Encoding: 8BIT X-EOPAttributedMessage: 0 Authentication-Results: spf=none (sender IP is 165.204.84.221) smtp.mailfrom=Christian.Koenig@amd.com; davemloft.net; dkim=none (message not signed) header.d=none; X-Forefront-Antispam-Report: CIP:165.204.84.221;CTRY:US;IPV:NLI;EFV:NLI;BMV:1;SFV:NSPM;SFS:(10019020)(6009001)(428002)(51694002)(24454002)(51704005)(189002)(199003)(86362001)(65806001)(59896002)(110136001)(33656002)(101416001)(50466002)(87266999)(50986999)(65956001)(76176999)(36756003)(65816999)(54356999)(77096005)(19580395003)(47776003)(19580405001)(77156002)(92566002)(2950100001)(62966003)(83506001)(46102003)(23746002)(106466001)(87936001)(64126003)(105586002);DIR:OUT;SFP:1102;SCL:1;SRVR:BN1PR02MB150;H:atltwp01.amd.com;FPR:;SPF:None;MLV:sfv;MX:1;A:1;LANG:en; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN1PR02MB150; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5002010)(5005006);SRVR:BN1PR02MB150;BCL:0;PCL:0;RULEID:;SRVR:BN1PR02MB150; X-Forefront-PRVS: 05214FD68E X-OriginatorOrg: amd4.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Mar 2015 09:38:37.8325 (UTC) X-MS-Exchange-CrossTenant-Id: fde4dada-be84-483f-92cc-e026cbee8e96 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fde4dada-be84-483f-92cc-e026cbee8e96;Ip=[165.204.84.221];Helo=[atltwp01.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1PR02MB150 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Regards, Christian.