new scanlog code and RTAS

Todd Inglett tinglett at vnet.ibm.com
Fri Aug 30 22:59:02 EST 2002


I just wrote a proc interface to scanlog data that will be in the next
patch (it's in IBM internal CVS already).

One related change I made was to add an exported buffer in rtas.[ch]
called rtas_data_buf (size RTAS_DATA_BUF_SIZE = 1024 right now) which is
declared in rtas.c and therefore should always have a pa < 4GB.  This is
protected by rtas_data_buf_lock.

I figure this as a "cheap" alternative to having a true memory allocator
(or a zone) for memory < 4GB.  RTAS calls are pretty few and far between
so I don't expect any real contention for this buffer.  As for lock
ordering I just get and release the buffer immediately around the rtas
call (copying to a local buffer).  The RTAS interface has a lock, RTAS
itself will never obtain another lock :).

Another solution would be to write RTAS "wrapper" functions for each
RTAS function.  For RTAS functions that take data pointers we could hide
this "bounce buffer" internally.  I kind of like this idea.  The
rtas_call() interface is *really* error prone anyway....

Thoughts?

-todd


** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list