debug: convert to use pr_debug for pte init and find dev
These two op have too much print, convert to pr_debug and not print by default. Change-Id: I5b3c738db783419717441e24ee0b04ab6f02d61e Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
This commit is contained in:
parent
f111af6856
commit
33ffdd2473
|
|
@ -109,7 +109,7 @@ static u64 *find_pte(u64 addr, int level)
|
|||
u64 va_bits;
|
||||
int i;
|
||||
|
||||
debug("addr=%llx level=%d\n", addr, level);
|
||||
pr_debug("addr=%llx level=%d\n", addr, level);
|
||||
|
||||
get_tcr(0, NULL, &va_bits);
|
||||
if (va_bits < 39)
|
||||
|
|
@ -123,7 +123,7 @@ static u64 *find_pte(u64 addr, int level)
|
|||
for (i = start_level; i < 4; i++) {
|
||||
idx = (addr >> level2shift(i)) & 0x1FF;
|
||||
pte += idx;
|
||||
debug("idx=%llx PTE %p at level %d: %llx\n", idx, pte, i, *pte);
|
||||
pr_debug("idx=%llx PTE %p at level %d: %llx\n", idx, pte, i, *pte);
|
||||
|
||||
/* Found it */
|
||||
if (i == level)
|
||||
|
|
@ -163,7 +163,7 @@ static u64 *create_table(void)
|
|||
static void set_pte_table(u64 *pte, u64 *table)
|
||||
{
|
||||
/* Point *pte to the new table */
|
||||
debug("Setting %p to addr=%p\n", pte, table);
|
||||
pr_debug("Setting %p to addr=%p\n", pte, table);
|
||||
*pte = PTE_TYPE_TABLE | (ulong)table;
|
||||
}
|
||||
|
||||
|
|
@ -182,7 +182,7 @@ static void split_block(u64 *pte, int level)
|
|||
"mem_map.", pte, old_pte);
|
||||
|
||||
new_table = create_table();
|
||||
debug("Splitting pte %p (%llx) into %p\n", pte, old_pte, new_table);
|
||||
pr_debug("Splitting pte %p (%llx) into %p\n", pte, old_pte, new_table);
|
||||
|
||||
for (i = 0; i < MAX_PTE_ENTRIES; i++) {
|
||||
new_table[i] = old_pte | (i << levelshift);
|
||||
|
|
@ -191,7 +191,7 @@ static void split_block(u64 *pte, int level)
|
|||
if ((level + 1) == 3)
|
||||
new_table[i] |= PTE_TYPE_TABLE;
|
||||
|
||||
debug("Setting new_table[%lld] = %llx\n", i, new_table[i]);
|
||||
pr_debug("Setting new_table[%lld] = %llx\n", i, new_table[i]);
|
||||
}
|
||||
|
||||
/* Set the new table into effect */
|
||||
|
|
@ -213,7 +213,7 @@ static void add_map(struct mm_region *map)
|
|||
while (size) {
|
||||
pte = find_pte(virt, 0);
|
||||
if (pte && (pte_type(pte) == PTE_TYPE_FAULT)) {
|
||||
debug("Creating table for virt 0x%llx\n", virt);
|
||||
pr_debug("Creating table for virt 0x%llx\n", virt);
|
||||
new_table = create_table();
|
||||
set_pte_table(pte, new_table);
|
||||
}
|
||||
|
|
@ -224,11 +224,11 @@ static void add_map(struct mm_region *map)
|
|||
panic("pte not found\n");
|
||||
|
||||
blocksize = 1ULL << level2shift(level);
|
||||
debug("Checking if pte fits for virt=%llx size=%llx blocksize=%llx\n",
|
||||
pr_debug("Checking if pte fits for virt=%llx size=%llx blocksize=%llx\n",
|
||||
virt, size, blocksize);
|
||||
if (size >= blocksize && !(virt & (blocksize - 1))) {
|
||||
/* Page fits, create block PTE */
|
||||
debug("Setting PTE %p to block virt=%llx\n",
|
||||
pr_debug("Setting PTE %p to block virt=%llx\n",
|
||||
pte, virt);
|
||||
if (level == 3)
|
||||
*pte = phys | attrs | PTE_TYPE_PAGE;
|
||||
|
|
@ -240,12 +240,12 @@ static void add_map(struct mm_region *map)
|
|||
break;
|
||||
} else if (pte_type(pte) == PTE_TYPE_FAULT) {
|
||||
/* Page doesn't fit, create subpages */
|
||||
debug("Creating subtable for virt 0x%llx blksize=%llx\n",
|
||||
pr_debug("Creating subtable for virt 0x%llx blksize=%llx\n",
|
||||
virt, blocksize);
|
||||
new_table = create_table();
|
||||
set_pte_table(pte, new_table);
|
||||
} else if (pte_type(pte) == PTE_TYPE_BLOCK) {
|
||||
debug("Split block into subtable for virt 0x%llx blksize=0x%llx\n",
|
||||
pr_debug("Split block into subtable for virt 0x%llx blksize=0x%llx\n",
|
||||
virt, blocksize);
|
||||
split_block(pte, level);
|
||||
}
|
||||
|
|
@ -439,9 +439,9 @@ inline void flush_dcache_all(void)
|
|||
__asm_flush_dcache_all();
|
||||
ret = __asm_flush_l3_dcache();
|
||||
if (ret)
|
||||
debug("flushing dcache returns 0x%x\n", ret);
|
||||
pr_debug("flushing dcache returns 0x%x\n", ret);
|
||||
else
|
||||
debug("flushing dcache successfully.\n");
|
||||
pr_debug("flushing dcache successfully.\n");
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -520,13 +520,13 @@ static u64 set_one_region(u64 start, u64 size, u64 attrs, bool flag, int level)
|
|||
*pte &= ~PMD_ATTRINDX_MASK;
|
||||
*pte |= attrs & PMD_ATTRINDX_MASK;
|
||||
}
|
||||
debug("Set attrs=%llx pte=%p level=%d\n", attrs, pte, level);
|
||||
pr_debug("Set attrs=%llx pte=%p level=%d\n", attrs, pte, level);
|
||||
|
||||
return levelsize;
|
||||
}
|
||||
|
||||
/* Unaligned or doesn't fit, maybe split block into table */
|
||||
debug("addr=%llx level=%d pte=%p (%llx)\n", start, level, pte, *pte);
|
||||
pr_debug("addr=%llx level=%d pte=%p (%llx)\n", start, level, pte, *pte);
|
||||
|
||||
/* Maybe we need to split the block into a table */
|
||||
if (pte_type(pte) == PTE_TYPE_BLOCK)
|
||||
|
|
@ -548,7 +548,7 @@ void mmu_set_region_dcache_behaviour(phys_addr_t start, size_t size,
|
|||
u64 real_start = start;
|
||||
u64 real_size = size;
|
||||
|
||||
debug("start=%lx size=%lx\n", (ulong)start, (ulong)size);
|
||||
pr_debug("start=%lx size=%lx\n", (ulong)start, (ulong)size);
|
||||
|
||||
if (!gd->arch.tlb_emerg)
|
||||
panic("Emergency page table not setup.");
|
||||
|
|
|
|||
|
|
@ -260,7 +260,7 @@ int uclass_find_device_by_seq(enum uclass_id id, int seq_or_req_seq,
|
|||
int ret;
|
||||
|
||||
*devp = NULL;
|
||||
debug("%s: %d %d\n", __func__, find_req_seq, seq_or_req_seq);
|
||||
pr_debug("%s: %d %d\n", __func__, find_req_seq, seq_or_req_seq);
|
||||
if (seq_or_req_seq == -1)
|
||||
return -ENODEV;
|
||||
ret = uclass_get(id, &uc);
|
||||
|
|
@ -268,15 +268,15 @@ int uclass_find_device_by_seq(enum uclass_id id, int seq_or_req_seq,
|
|||
return ret;
|
||||
|
||||
list_for_each_entry(dev, &uc->dev_head, uclass_node) {
|
||||
debug(" - %d %d '%s'\n", dev->req_seq, dev->seq, dev->name);
|
||||
pr_debug(" - %d %d '%s'\n", dev->req_seq, dev->seq, dev->name);
|
||||
if ((find_req_seq ? dev->req_seq : dev->seq) ==
|
||||
seq_or_req_seq) {
|
||||
*devp = dev;
|
||||
debug(" - found\n");
|
||||
pr_debug(" - found\n");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
debug(" - not found\n");
|
||||
pr_debug(" - not found\n");
|
||||
|
||||
return -ENODEV;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue