linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: s ticket <smticket@gmail.com>
Cc: Gwendal Grignou <gwendal@google.com>,
	linux-ide@vger.kernel.org, jgarzik@pobox.com,
	Mark Lord <liml@rtr.ca>
Subject: Re: How to assess PMP register
Date: Sat, 09 May 2009 14:18:20 +0900	[thread overview]
Message-ID: <4A05121C.1040104@kernel.org> (raw)
In-Reply-To: <fa69d4570905082212y74242302o5bd8059ce358a4be@mail.gmail.com>

s ticket wrote:
> 2009/5/6 Gwendal Grignou <gwendal@google.com>:
>> - you can not access a PMP device from user space directly because
>> there is no file descriptor for it.
>> - however, libata stores a dump of PMP registers taken after every
>> reset in gscr structure of the ata_device structure that represent the
>> PMP in the kernel. You can modify libata to print the registers you
>> need.
> 
> I add a  `pmp_attach' function ata_port_operation, and call
> `sata_pmp_read' in that
> function. It works fine. But when I call `sata_pmp_read' in process
> context while another
> process is writing to disks, the kernel hangs (deadlock?). Is there
> any suggestion?
> I found that `sata_pmp_read' finally calls `ata_exec_internal_sg' to
> do the real work and
> 'ata_exec_internal_sg' takes ata_port->lock.
> 
> BTW, why `sata_pmp_read' and `sata_pmp_write' aren't exported?

The PMP access functions can only be called from EH context and that's
one of the reasons they aren't exported?  What are you trying to
achieve?

Thanks.

-- 
tejun

  reply	other threads:[~2009-05-09  5:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-30  1:49 How to assess PMP register s ticket
2009-04-30 16:08 ` Grant Grundler
2009-04-30 22:34 ` Mark Lord
2009-05-04  5:04   ` s ticket
2009-05-04 23:37     ` Mark Lord
2009-05-06  7:03       ` Gwendal Grignou
2009-05-09  5:12         ` s ticket
2009-05-09  5:18           ` Tejun Heo [this message]
2009-05-09  6:23             ` s ticket
2009-05-09  8:09               ` Tejun Heo

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=4A05121C.1040104@kernel.org \
    --to=tj@kernel.org \
    --cc=gwendal@google.com \
    --cc=jgarzik@pobox.com \
    --cc=liml@rtr.ca \
    --cc=linux-ide@vger.kernel.org \
    --cc=smticket@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).