From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754546Ab0CVLcb (ORCPT ); Mon, 22 Mar 2010 07:32:31 -0400 Received: from mail-pv0-f174.google.com ([74.125.83.174]:37435 "EHLO mail-pv0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753871Ab0CVLca (ORCPT ); Mon, 22 Mar 2010 07:32:30 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=AiA1Yj1wTsnkaiLDfa2SZC0WJSRJLB2CYJfG2wOXWUjtqEXPRtd98+Hb7EZV/G16wy 9Sn2LtCQcnjujkMlENMZ6Uj6gqrHhHuNmG+nyO5nOswYM7g+uTg17pFju+zo/xcFq01y vYFBaXIwxQD6QszDnQizaDYNJnCDEpSwlFe6o= MIME-Version: 1.0 In-Reply-To: References: Date: Mon, 22 Mar 2010 12:32:25 +0100 Message-ID: Subject: Re: CrystalHD driver safe on big endian systems? From: Leon Woestenberg To: "Scott D. Davilla" Cc: jarod@wilsonet.com, "Naren (Narendra) Sankar" , "hancockrwd@gmail.com" , "jarod@redhat.com" , "linux-kernel@vger.kernel.org" , "abraham.manu@gmail.com" Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Scott and others, On Mon, Mar 22, 2010 at 4:53 AM, Scott D. Davilla wrote: > > <..> From what I've seen in code, it looks definite little endian based and would need > a look over regarding byte swap. > What parts of the code assumes little endian from what you've seen? Now, byte swap endianess is one thing, C bitfields in combination with it, another. I have given it a first shot here (mailer unsuitable for sending patches), still failed on PowerPC: http://www.sidebranch.com/crystalhd/ May I suggest we instrument all register access functions with a printk() of the register being written? Then I can compare little endian access patterns with big endian, to be sure we get the bitfields, code assumptions and byte swap correctly. Regards, -- Leon