Ameya Palande wrote:
diff --git a/drivers/dsp/bridge/wmd/tiomap3430.c b/drivers/dsp/bridge/wmd/tiomap3430.c index 1fca3e5..b489da1 100644 --- a/drivers/dsp/bridge/wmd/tiomap3430.c +++ b/drivers/dsp/bridge/wmd/tiomap3430.c @@ -2034,26 +2034,27 @@ static DSP_STATUS PteSet(struct PgTableAttrs *pt, u32 pa, u32 va, if (pfn_valid(__phys_to_pfn(patemp))) { pg = phys_to_page(patemp); get_page(pg); + if (page_count(pg) <= 1) { + printk(KERN_EMERG "DSPBRIDGE:MAP " + "function: COUNT 0 FOR PA " + "0x%x\n", patemp); + printk(KERN_EMERG "Bad page state" + "in process '%s'\n" + "page:%p flags:0x%0*lx " + "mapping:%p mapcount:%d " + "count:%d\n" + "Trying to fix it up, but " + "a reboot is needed\n" + "Backtrace:\n", + current->comm, pg, + (int)(2*sizeof(unsigned long)), + (unsigned long)pg->flags, + pg->mapping, page_mapcount(pg), + page_count(pg)); + dump_stack(); + BUG_ON(1); + }
Is it possible to clean up this print? How much should I drink to read this code? Why you guys don't create dump finctions which dump whatever you need. E.g., create a "dump_page_state(struct page *pg)" function and call it. -- Best Regards, Artem Bityutskiy (Артём Битюцкий) -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html