Re: Bug in vme subsystem (vme.c)

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

 



On 23/02/13 17:53, ternaryd wrote:
> Hi,
> 
> In vme.c, function vme_master_set(), vme_check_window() is called,
> where invalid restrictions are applied. In case of address space
> VME_A16, vme_base + size must not exceed VME_A16_MAX, which is defined
> in include/linux/vme.h to 0x10000ULL. The second test is never
> evaluated.
> 

The second test is probably redundant.

> As slave windows must not overlap, this means that there can not be
> more than one window in this address space on any VME bus member,
> because the only valid base address would be 0x0. The correct test
> should be the maximum value of a 64-bit unsigned integer plus 1, minus
> 0xffff; and if checking is already done, maybe some alignment test
> could help. Other than this, the call to vme_check_window() could also
> be eliminated.
> 

Can't check that in vme.c, the restriction you mention is hardware dependent.
In the case of the tsi148, see tsi148_slave_set() in
drivers/vme/bridges/vme_tsi148.c. The Universe II has different restrictions.

Martyn

-- 
Martyn Welch (Lead Software Engineer)  | Registered in England and Wales
GE Intelligent Platforms               | (3828642) at 100 Barbirolli Square
T +44(0)1327322748                     | Manchester, M2 3AB
E martyn.welch@xxxxxx                  | VAT:GB 927559189
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux