Re: [PATCH] MIPS: Remove unused and erroneous div64.h

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

 



On Thu, 15 Apr 2021, Huacai Chen wrote:

> >  I think this is a weak argument for removal, isn't it?
> Yes ,it is weak, but I'm not able to fix it, could you please help me?

 First of all you need to assign the quotient to `*n' rather than `__n', 
which is a temporary only.  Otherwise it's discarded, so no surprise the 
piece does not work.

 Also this piece assumes the quotient will fit in 32 bits (which should be 
obvious from the name and data type of the relevant temporary if not the 
asm itself), which is what the initial division of the high part was for 
before commit c21004cd5b4c and which the `do_div' wrapper does not arrange 
for.  Said commit is really broken indeed as it mustn't have dropped the 
initial division and instead it should have only amended the asm for the 
removal of the `h' constraint (easy fix).

  Maciej



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux