Re: [DRIVER UPDATE] aty128fb

From: Jes Sorensen (Jes.Sorensen@cern.ch)
Date: Fri Jan 28 2000 - 08:55:03 EST


>>>>> "Benjamin" == Benjamin Herrenschmidt <bh40@calva.net> writes:

>> With regard to filling the cursor then that particular example is
>> not very good since opdating the cursor data is rarely a
>> performance critical item ;-) However even for the performance
>> critical cases (like printing data on the screen), you'd rather use
>> the __raw_{read,write}l() macros and explicitly add the [wm]mb()
>> macros.

Benjamin> Yep. Or you can eventually use normal memory accesses like
Benjamin> it's done usually when accessing the fb. datas for the
Benjamin> cursor pixels. In any case, you need wmb() macro between
Benjamin> filling the cursor datas and enabling it, and this is not
Benjamin> ppc-specific.

Using normal memory accesses is wrong though, it'll break miserably on
systems where the PCI memory is not mapped as regular memory in on
contigous chunk. Some of the early Alpha's have what they call sparse
memory.

This is one of the reasons why the __raw_{read,write} macros were
introduced - you should use them in this case to make the code
portable.

Jes

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jan 31 2000 - 21:00:21 EST