ttm: Make parts of a struct ttm_bo_device global.

Common resources, like memory accounting and swap lists should be
global and not per device. Introduce a struct ttm_bo_global to
accomodate this, and register it with sysfs. Add a small sysfs interface
to return the number of active buffer objects.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
This commit is contained in:
Thomas Hellstrom
2009-08-18 16:51:56 +02:00
committed by Dave Airlie
parent 5fd9cbad3a
commit a987fcaa80
7 changed files with 296 additions and 141 deletions

View File

@@ -155,6 +155,7 @@ struct ttm_buffer_object {
* Members constant at init.
*/
struct ttm_bo_global *glob;
struct ttm_bo_device *bdev;
unsigned long buffer_start;
enum ttm_bo_type type;