lkml.org 
[lkml]   [1999]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [patch] SMP fixes 2.2.1, #2
    Date
    From
    > Manuel J. Galan and Mark-Andre Hopf have noticed bugs in the TSC code in
    > the previous patch, these are now fixed in the attached patch.
    > -- mingo

    Inside there was something interesting. My Large-File-Summit stuff
    does need similar too -- although only in printk() support, and only
    when the BITS_PER_LONG is under 64 (all ia32 systems, of course).
    Should we integrate something alike into the general lib/ directory
    in the kernel ?

    For most of the gcc generated cases we definitely don't want to use
    this -- when we are doing some filesystem internal code, for example.
    (We don't want __divdi3, __moddi3 et.al. with those gcc library calls!
    Rather we want carefully control where the uses occur.)

    /Matti Aarnio

    ....
    > +/*
    > + * accurate 64-bit division, expanded to 32-bit divisions. Not terribly
    > + * optimized but we need it at boot time only anyway.
    > + *
    > + * result == a / b
    > + * == (a1 + a2*(2^32)) / b
    > + * == a1/b + a2*(2^32/b)
    > + * == a1/b + a2*((2^32-1)/b) + a2/b + (a2*((2^32-1) % b))/b
    > + * ^---- (this multiplication can overflow)
    > + */
    > +
    > +unsigned long long div64 (unsigned long long a, unsigned long long b)
    > +{

    -
    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/

    \
     
     \ /
      Last update: 2005-03-22 13:50    [W:0.023 / U:29.628 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site