summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-tegra/include/mach/nvmap.h8
-rw-r--r--drivers/video/tegra/host/debug.c12
-rw-r--r--drivers/video/tegra/host/nvhost_3dctx.c2
-rw-r--r--drivers/video/tegra/host/nvhost_hwctx.h4
-rw-r--r--drivers/video/tegra/nvmap/nvmap.c22
-rw-r--r--drivers/video/tegra/nvmap/nvmap_dev.c12
-rw-r--r--drivers/video/tegra/nvmap/nvmap_heap.c2
-rw-r--r--drivers/video/tegra/nvmap/nvmap_heap.h8
-rw-r--r--drivers/video/tegra/nvmap/nvmap_ioctl.c4
9 files changed, 37 insertions, 37 deletions
diff --git a/arch/arm/mach-tegra/include/mach/nvmap.h b/arch/arm/mach-tegra/include/mach/nvmap.h
index 7422d1a44d8a..b19ccf6ae7dd 100644
--- a/arch/arm/mach-tegra/include/mach/nvmap.h
+++ b/arch/arm/mach-tegra/include/mach/nvmap.h
@@ -3,7 +3,7 @@
*
* structure declarations for nvmem and nvmap user-space ioctls
*
- * Copyright (c) 2009, NVIDIA Corporation.
+ * Copyright (c) 2009-2011, NVIDIA Corporation.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -84,9 +84,9 @@ struct nvmap_client *nvmap_client_get(struct nvmap_client *client);
void nvmap_client_put(struct nvmap_client *c);
-unsigned long nvmap_pin(struct nvmap_client *c, struct nvmap_handle_ref *r);
+phys_addr_t nvmap_pin(struct nvmap_client *c, struct nvmap_handle_ref *r);
-unsigned long nvmap_handle_address(struct nvmap_client *c, unsigned long id);
+phys_addr_t nvmap_handle_address(struct nvmap_client *c, unsigned long id);
void nvmap_unpin(struct nvmap_client *client, struct nvmap_handle_ref *r);
@@ -100,7 +100,7 @@ void nvmap_unpin_handles(struct nvmap_client *client,
struct nvmap_platform_carveout {
const char *name;
unsigned int usage_mask;
- unsigned long base;
+ phys_addr_t base;
size_t size;
size_t buddy_size;
};
diff --git a/drivers/video/tegra/host/debug.c b/drivers/video/tegra/host/debug.c
index 28dc52f75212..c7c6a0c19f03 100644
--- a/drivers/video/tegra/host/debug.c
+++ b/drivers/video/tegra/host/debug.c
@@ -123,7 +123,7 @@ static int show_channel_command(struct output *o, u32 val, int *count)
}
}
-static void show_channel_gather(struct output *o, u32 phys_addr,
+static void show_channel_gather(struct output *o, phys_addr_t phys_addr,
u32 words);
static void show_channel_word(struct output *o, int *state, int *count,
@@ -162,13 +162,13 @@ static void show_channel_word(struct output *o, int *state, int *count,
* TODO: This uses ioremap_xxx on memory which is deprecated.
* Also, it won't work properly with SMMU.
*/
-static void show_channel_gather(struct output *o, u32 phys_addr,
+static void show_channel_gather(struct output *o, phys_addr_t phys_addr,
u32 words)
{
- u32 map_base = phys_addr & PAGE_MASK;
- u32 map_end = (phys_addr + words * 4 + PAGE_SIZE - 1) & PAGE_MASK;
- u32 map_size = map_end - map_base;
- u32 map_offset = phys_addr - map_base;
+ phys_addr_t map_base = phys_addr & PAGE_MASK;
+ phys_addr_t map_end = (phys_addr + words * 4 + PAGE_SIZE - 1) & PAGE_MASK;
+ phys_addr_t map_size = map_end - map_base;
+ phys_addr_t map_offset = phys_addr - map_base;
void *map_addr = ioremap_nocache(map_base, map_size);
int state = NVHOST_DBG_STATE_CMD;
int count, i;
diff --git a/drivers/video/tegra/host/nvhost_3dctx.c b/drivers/video/tegra/host/nvhost_3dctx.c
index 31d57bbdd13d..62caea51cf37 100644
--- a/drivers/video/tegra/host/nvhost_3dctx.c
+++ b/drivers/video/tegra/host/nvhost_3dctx.c
@@ -208,7 +208,7 @@ static void setup_restore_v0(u32 *ptr)
/* the same context save command sequence is used for all contexts. */
static struct nvmap_handle_ref *save_buf = NULL;
-static u32 save_phys = 0;
+static phys_addr_t save_phys = 0;
static unsigned int save_size = 0;
static unsigned int save_incrs = 0;
static unsigned int save_thresh = 0;
diff --git a/drivers/video/tegra/host/nvhost_hwctx.h b/drivers/video/tegra/host/nvhost_hwctx.h
index ec0c9555d29d..67c3c7f8d0ce 100644
--- a/drivers/video/tegra/host/nvhost_hwctx.h
+++ b/drivers/video/tegra/host/nvhost_hwctx.h
@@ -3,7 +3,7 @@
*
* Tegra Graphics Host Hardware Context Interface
*
- * Copyright (c) 2010, NVIDIA Corporation.
+ * Copyright (c) 2010-2011, NVIDIA Corporation.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -44,7 +44,7 @@ struct nvhost_hwctx {
struct nvmap_handle_ref *restore;
u32 *restore_virt;
- u32 restore_phys;
+ phys_addr_t restore_phys;
u32 restore_size;
u32 restore_incrs;
};
diff --git a/drivers/video/tegra/nvmap/nvmap.c b/drivers/video/tegra/nvmap/nvmap.c
index 50714c502194..09627145ec82 100644
--- a/drivers/video/tegra/nvmap/nvmap.c
+++ b/drivers/video/tegra/nvmap/nvmap.c
@@ -1,9 +1,9 @@
/*
- * drivers/video/tegra/nvmap.c
+ * drivers/video/tegra/nvmap/nvmap.c
*
* Memory manager for Tegra GPU
*
- * Copyright (c) 2009-2010, NVIDIA Corporation.
+ * Copyright (c) 2009-2011, NVIDIA Corporation.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -293,9 +293,9 @@ out:
return ret;
}
-static unsigned long handle_phys(struct nvmap_handle *h)
+static phys_addr_t handle_phys(struct nvmap_handle *h)
{
- u32 addr;
+ phys_addr_t addr;
if (h->heap_pgalloc && h->pgalloc.contig) {
addr = page_to_phys(h->pgalloc.pages[0]);
@@ -338,8 +338,8 @@ static int nvmap_reloc_pin_array(struct nvmap_client *client,
for (i = 0; i < nr; i++) {
struct nvmap_handle *patch;
struct nvmap_handle *pin;
- unsigned long reloc_addr;
- unsigned long phys;
+ phys_addr_t reloc_addr;
+ phys_addr_t phys;
unsigned int pfn;
/* all of the handles are validated and get'ted prior to
@@ -373,7 +373,7 @@ static int nvmap_reloc_pin_array(struct nvmap_client *client,
pfn = __phys_to_pfn(phys);
if (pfn != last_pfn) {
pgprot_t prot = nvmap_pgprot(patch, pgprot_kernel);
- unsigned long kaddr = (unsigned long)addr;
+ phys_addr_t kaddr = (phys_addr_t)addr;
set_pte_at(&init_mm, kaddr, *pte, pfn_pte(pfn, prot));
flush_tlb_kernel_page(kaddr);
last_pfn = pfn;
@@ -538,11 +538,11 @@ int nvmap_pin_array(struct nvmap_client *client, struct nvmap_handle *gather,
return count;
}
-unsigned long nvmap_pin(struct nvmap_client *client,
+phys_addr_t nvmap_pin(struct nvmap_client *client,
struct nvmap_handle_ref *ref)
{
struct nvmap_handle *h;
- unsigned long phys;
+ phys_addr_t phys;
int ret = 0;
h = nvmap_handle_get(ref->handle);
@@ -570,10 +570,10 @@ unsigned long nvmap_pin(struct nvmap_client *client,
return ret ?: phys;
}
-unsigned long nvmap_handle_address(struct nvmap_client *c, unsigned long id)
+phys_addr_t nvmap_handle_address(struct nvmap_client *c, unsigned long id)
{
struct nvmap_handle *h;
- unsigned long phys;
+ phys_addr_t phys;
h = nvmap_get_handle_id(c, id);
if (!h)
diff --git a/drivers/video/tegra/nvmap/nvmap_dev.c b/drivers/video/tegra/nvmap/nvmap_dev.c
index 91ed03d0755f..c15cc1b21901 100644
--- a/drivers/video/tegra/nvmap/nvmap_dev.c
+++ b/drivers/video/tegra/nvmap/nvmap_dev.c
@@ -278,9 +278,9 @@ int nvmap_flush_heap_block(struct nvmap_client *client,
{
pte_t **pte;
void *addr;
- unsigned long kaddr;
- unsigned long phys = block->base;
- unsigned long end = block->base + len;
+ phys_addr_t kaddr;
+ phys_addr_t phys = block->base;
+ phys_addr_t end = block->base + len;
if (prot == NVMAP_HANDLE_UNCACHEABLE || prot == NVMAP_HANDLE_WRITE_COMBINE)
goto out;
@@ -296,10 +296,10 @@ int nvmap_flush_heap_block(struct nvmap_client *client,
if (IS_ERR(pte))
return PTR_ERR(pte);
- kaddr = (unsigned long)addr;
+ kaddr = (phys_addr_t)addr;
while (phys < end) {
- unsigned long next = (phys + PAGE_SIZE) & PAGE_MASK;
+ phys_addr_t next = (phys + PAGE_SIZE) & PAGE_MASK;
unsigned long pfn = __phys_to_pfn(phys);
void *base = (void *)kaddr + (phys & ~PAGE_MASK);
@@ -981,7 +981,7 @@ static void allocations_stringify(struct nvmap_client *client,
struct nvmap_handle *handle = ref->handle;
if (handle->alloc && !handle->heap_pgalloc) {
seq_printf(s, "%-16s %-16s %8lx %10u\n", "", "",
- handle->carveout->base,
+ (unsigned long)(handle->carveout->base),
handle->size);
}
}
diff --git a/drivers/video/tegra/nvmap/nvmap_heap.c b/drivers/video/tegra/nvmap/nvmap_heap.c
index 97f4b2bdb5d7..b90a87671f98 100644
--- a/drivers/video/tegra/nvmap/nvmap_heap.c
+++ b/drivers/video/tegra/nvmap/nvmap_heap.c
@@ -941,7 +941,7 @@ static void heap_release(struct device *heap)
* will be rounded up to be a multiple of buddy_size bytes.
*/
struct nvmap_heap *nvmap_heap_create(struct device *parent, const char *name,
- unsigned long base, size_t len,
+ phys_addr_t base, size_t len,
size_t buddy_size, void *arg)
{
struct nvmap_heap *h = NULL;
diff --git a/drivers/video/tegra/nvmap/nvmap_heap.h b/drivers/video/tegra/nvmap/nvmap_heap.h
index 39539762175b..a8884be218d1 100644
--- a/drivers/video/tegra/nvmap/nvmap_heap.h
+++ b/drivers/video/tegra/nvmap/nvmap_heap.h
@@ -1,9 +1,9 @@
/*
- * drivers/video/tegra/nvmap_heap.h
+ * drivers/video/tegra/nvmap/nvmap_heap.h
*
* GPU heap allocator.
*
- * Copyright (c) 2010, NVIDIA Corporation.
+ * Copyright (c) 2010-2011, NVIDIA Corporation.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ struct nvmap_heap;
struct attribute_group;
struct nvmap_heap_block {
- unsigned long base;
+ phys_addr_t base;
unsigned int type;
struct nvmap_handle *handle;
};
@@ -36,7 +36,7 @@ struct nvmap_heap_block {
#define NVMAP_HEAP_MIN_BUDDY_SIZE 8192
struct nvmap_heap *nvmap_heap_create(struct device *parent, const char *name,
- unsigned long base, size_t len,
+ phys_addr_t base, size_t len,
unsigned int buddy_size, void *arg);
void nvmap_heap_destroy(struct nvmap_heap *heap);
diff --git a/drivers/video/tegra/nvmap/nvmap_ioctl.c b/drivers/video/tegra/nvmap/nvmap_ioctl.c
index 2c24a2f4bd38..d8868b25d9a8 100644
--- a/drivers/video/tegra/nvmap/nvmap_ioctl.c
+++ b/drivers/video/tegra/nvmap/nvmap_ioctl.c
@@ -632,7 +632,7 @@ out:
}
static int rw_handle_page(struct nvmap_handle *h, int is_read,
- unsigned long start, unsigned long rw_addr,
+ phys_addr_t start, unsigned long rw_addr,
unsigned long bytes, unsigned long kaddr, pte_t *pte)
{
pgprot_t prot = nvmap_pgprot(h, pgprot_kernel);
@@ -641,7 +641,7 @@ static int rw_handle_page(struct nvmap_handle *h, int is_read,
while (!err && start < end) {
struct page *page = NULL;
- unsigned long phys;
+ phys_addr_t phys;
size_t count;
void *src;