Linux on ARM based TI OMAP SoCs
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind@yandex.ru>
To: Ameya Palande <ameya.palande@nokia.com>
Cc: h-kanigeri2@ti.com, linux-omap@vger.kernel.org
Subject: Re: [PATCH] DSPBRIDGE: Fix module build warnings
Date: Wed, 01 Apr 2009 10:00:46 +0300	[thread overview]
Message-ID: <49D3111E.2060304@yandex.ru> (raw)
In-Reply-To: <1238516811-11401-1-git-send-email-ameya.palande@nokia.com>

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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2009-04-01  7:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-31 16:26 [PATCH] DSPBRIDGE: Fix module build warnings Ameya Palande
2009-04-01  7:00 ` Artem Bityutskiy [this message]
2009-04-01  7:04   ` Artem Bityutskiy
     [not found]     ` <269694c00904010613g70a5de8eo5cac92865675ad0f@mail.gmail.com>
2009-04-01 13:14       ` Ameya Palande
2009-04-01 13:34         ` Ameya Palande

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49D3111E.2060304@yandex.ru \
    --to=dedekind@yandex.ru \
    --cc=ameya.palande@nokia.com \
    --cc=h-kanigeri2@ti.com \
    --cc=linux-omap@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox