[openib-general] [PATCH 0/7] AMSO1100 RNIC Driver

Roland Dreier rdreier at cisco.com
Fri Mar 10 15:43:00 PST 2006


    Tom> The c2_mq data structure describes both the request queue and
    Tom> the reply queue -- they have the same format. A request
    Tom> queue, however, has a shared index that resides in adapter
    Tom> DDR, while the reply queue's shared index resides in host
    Tom> DDR. This is why the tool complains -- because the __iomem
    Tom> qualifier is only correct when the c2_mq structure is used to
    Tom> define the request queue, and is incorrect for the reply
    Tom> queue. This fundamental problem extends to the functions used
    Tom> to manipulate these queues and the parameters that are passed
    Tom> to them.

Yes, that's exactly right.

    Tom> So... to fix this issue I will perform a spate of strange and
    Tom> unnatural acts, such as creating two functions with different
    Tom> arguments depending on whether the queue is a request or
    Tom> response queue, and properly qualifying arguments to
    Tom> functions where the type ends up getting promoted due to an
    Tom> expression in the argument (e.g. this +that, etc...)

The solution shouldn't be strange and unnatural.  sparse is correctly
pointing out that amso1100 is not using the right accessors for io
memory, since the return value of ioremap() is fundamentally not a
pointer that can be dereferenced.  The right way to get sparse to stop
complaining should feel like a cleanup, since you'll be using the
proper abstraction rather than abusing types.

I think you already got enough info about running sparse ('make C=1')
but let me know if you see problems.

 - R.



More information about the general mailing list