linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Nathan Fontenot <nfont@linux.vnet.ibm.com>
To: Denis Kirjanov <kda@linux-powerpc.org>,
	Michael Ellerman <mpe@ellerman.id.au>
Cc: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>,
	linuxppc-dev@lists.ozlabs.org,
	Dan Williams <dan.j.williams@intel.com>
Subject: Re: [PATCH] powerpc/mm: Allow user space to map rtas_rmo_buf
Date: Mon, 25 Jan 2016 12:42:53 -0600	[thread overview]
Message-ID: <56A66CAD.9040707@linux.vnet.ibm.com> (raw)
In-Reply-To: <CAOJe8K2nE-49zBrCNrwNoepccv5UZ2SvdX0Ut_2XtzMhJd2T7Q@mail.gmail.com>

On 01/22/2016 04:41 AM, Denis Kirjanov wrote:
> On 1/22/16, Michael Ellerman <mpe@ellerman.id.au> wrote:
>> On Fri, 2016-01-22 at 11:58 +0530, Vasant Hegde wrote:
>>> On 01/22/2016 10:59 AM, Michael Ellerman wrote:
>>>> On Thu, 2016-01-21 at 21:45 +0530, Vasant Hegde wrote:
>>>>
>>>>> With commit 90a545e9 (restrict /dev/mem to idle io memory ranges)
>>>>> mapping
>>>>> rtas_rmo_buf from user space is failing. Hence we are not able to make
>>>>> RTAS syscall.
>>>>
>>>> Having said that, why the <expletive deleted> is librtas mapping
>>>> /dev/mem in
>>>> the first place? Unless there is a very good reason, and probably even
>>>> if there
>>>> is, we should fix that to use a sane API.
>>>
>>> We use rtas system call. We use /dev/mem interface to map the RTAS memory
>>> region
>>> (allocated by kernel and information is passed to user space via procfs)
>>> so that
>>> we can read/write to RTAS memory.
>>>
>>> I do not have historical information. May be Nathan has more information
>>> on this.
>>
>> Yeah, we need to dig into what it's actually doing and why. I had a quick
>> look
>> but it wasn't obvious.
>>
>> We should not need 1) a system call, 2) a proc interface, and 3) a mmap of
>> /dev/mem.
>>
>> If the syscall's not sufficient and we really need to mmap, we should create
>> a
>> device which can then be mmapped in a more standard way.
>>
>> Having said that, Nathan's been moving more of the hotplug logic into the
>> kernel, so I'm also not clear on how much of the existing API we will need
>> in
>> the future. So yep hopefully Nathan can chime in.
> 
> Yeah, but if we're going to move to only one interface to work with
> RTAS we can break existing applications.
> 

Yes, but I doubt that anything other than librtas is using this. I don't think
this interface was ever documented anywhere.

-Nathan

>>
>> cheers
>>
>> _______________________________________________
>> Linuxppc-dev mailing list
>> Linuxppc-dev@lists.ozlabs.org
>> https://lists.ozlabs.org/listinfo/linuxppc-dev
> 

  reply	other threads:[~2016-01-25 18:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-21 16:15 [PATCH] powerpc/mm: Allow user space to map rtas_rmo_buf Vasant Hegde
2016-01-21 16:32 ` Dan Williams
2016-01-22  5:29 ` Michael Ellerman
2016-01-22  6:28   ` Vasant Hegde
2016-01-22  8:35     ` Michael Ellerman
2016-01-22 10:41       ` Denis Kirjanov
2016-01-25 18:42         ` Nathan Fontenot [this message]
2016-01-25 18:42       ` Nathan Fontenot
2016-01-29  1:58 ` Michael Ellerman

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=56A66CAD.9040707@linux.vnet.ibm.com \
    --to=nfont@linux.vnet.ibm.com \
    --cc=dan.j.williams@intel.com \
    --cc=hegdevasant@linux.vnet.ibm.com \
    --cc=kda@linux-powerpc.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    /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).