Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/dev/pci



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

On Dec 24, 2010, at 5:11 AM, Christoph Egger wrote:

On 24.12.10 11:07, Izumi Tsutsui wrote:
Modified Files:
   src/sys/dev/pci: voyagerfb.c

Log Message:
read 32bits instead of 64bits and truncate the upper 32bits

Please stop making unnecessary changes to drivers you can't test on
actual hardware.

Sorry, should have mentioned this makes the i386 ALL kernel linking.

Adding a bogus fix to make ALL buildable is quite silly.

bus_space_read_8(9) is a documented MI API and
MD implementation should provide bus_space_read_8()
if the machine really needs the driver in its kernel,
or don't enable the device on i386.

The 'reg' variable is of type 'uint32_t'.
So why using bus_space_read_8() when
bus_space_read_4() gives the same result?

Because you can't assume that all hardware allows partial register accesses. It may be true on (almost?) all x86 hardware but that's about it. Registers are in no way guaranteed to behave like memory locations.

have fun
Michael

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)

iQEVAwUBTRVi8cpnzkX8Yg2nAQLkWwf9EcP2bPxTNbyg7IV89d9IK1y6fkX9MNwV
DfW/mnsNbS8YAMAavcKSFty18wMI/3fVdVophTd+udVzL/A6lh8+zr5UZPPShJuT
pshy/LgM5y9C6YYxN6gcHOdEN+MrMUNLen7poNyCSJ1IFVwLzS0YnBb6qScUm+V8
3JQFnz/zkiKtjBziWcxf7FjL9wwDoFiqSuGBAtzB+Hy0Llk24iZYkeSu1x/GwZIp
Jzu1nOA+xmuqsYtzkxzQ8hMeTZHrqECW35475e+mTW0YtZqDMlNE4l483ptpnB2Q
GrfcAz1FBopZk5Dh6CslBTPteafB8OE/AEK/watDKR6pftza7OiVVQ==
=UoRH
-----END PGP SIGNATURE-----


Home | Main Index | Thread Index | Old Index