Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932603AbbDPAxz (ORCPT ); Wed, 15 Apr 2015 20:53:55 -0400 Received: from proofpoint-cluster.metrocast.net ([65.175.128.136]:52655 "EHLO proofpoint-cluster.metrocast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751373AbbDPAxr (ORCPT ); Wed, 15 Apr 2015 20:53:47 -0400 Message-ID: <1429142387.1899.57.camel@palomino.walls.org> Subject: Re: ioremap_uc() followed by set_memory_wc() - burrying MTRR From: Andy Walls To: Andy Lutomirski Cc: "Luis R. Rodriguez" , Toshi Kani , "H. Peter Anvin" , Ingo Molnar , "linux-kernel@vger.kernel.org" , Hal Rosenstock , Sean Hefty , Suresh Siddha , Rickard Strandqvist , Mike Marciniszyn , Roland Dreier , Juergen Gross , Mauro Carvalho Chehab , Borislav Petkov , Mel Gorman , Vlastimil Babka , Davidlohr Bueso , Dave Hansen , Jean-Christophe Plagniol-Villard , Thomas Gleixner , Ville =?ISO-8859-1?Q?Syrj=E4l=E4?= , Linux Fbdev development list , linux-media@vger.kernel.org, X86 ML Date: Wed, 15 Apr 2015 19:59:47 -0400 In-Reply-To: References: <20150410171750.GA5622@wotan.suse.de> <1428695379.6646.69.camel@misato.fc.hp.com> <20150410210538.GB5622@wotan.suse.de> <1428699490.21794.5.camel@misato.fc.hp.com> <20150411012938.GC5622@wotan.suse.de> <20150413174938.GE5622@wotan.suse.de> <1429137531.1899.28.camel@palomino.walls.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.4.4 (3.4.4-2.fc17) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-04-15_07:2015-04-15,2015-04-15,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1504160006 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1666 Lines: 42 On Wed, 2015-04-15 at 16:42 -0700, Andy Lutomirski wrote: > On Wed, Apr 15, 2015 at 3:38 PM, Andy Walls wrote: > > > > IMO the right solution would be to avoid ioremapping the whole bar at > startup. Instead ioremap pieces once the driver learns what they are. > This wouldn't have any of these problems -- you'd ioremap() register > regions and you'd ioremap_wc() the framebuffer once you find it. If > there are regions of unknown purpose, just don't map them all. > > Would this be feasible? Feasible? Maybe. Worth the time and effort for end-of-life, convential PCI hardware so I can have an optimally performing X display on a Standard Def Analog TV screen? Nope. I don't have that level of nostalgia. We sort of know where some things are in the MMIO space due to experimentation and past efforts examining the firmware binary. Documentation/video4linux/cx2341x/fw-*.txt documents some things. The driver code actually codifies a little bit more knowledge. The driver code for doing transfers between host and card is complex and fragile with some streams that use DMA, other streams that use PIO, digging VBI data straight out of card memory, and scatter-gather being broken on newer firmwares. Playing around with ioremapping will be hard to get right and likely cause something in the code to break for the primary use case of the ivtv supported cards. Regards, Andy -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/