All of lore.kernel.org
 help / color / mirror / Atom feed
* About mpc85xx flash memory allocation
@ 2011-01-24  1:15 Mitsutaka Amano
  2011-01-24  6:48 ` tiejun.chen
  0 siblings, 1 reply; 4+ messages in thread
From: Mitsutaka Amano @ 2011-01-24  1:15 UTC (permalink / raw)
  To: linuxppc-dev

Hi all,

I'm testing the ppc platform is based on mpc85xx. 256MB Flash memory
has been installed. Then I found this entries.

/proc/vmallocinfo
~~~
0xc9100000-0xd9101000 268439552 of_flash_probe+0x290/0x814 ioremap

physmap_of allocated 268MB over to the vmalloc. vmalloc space is tight.

Why does we need mpc platforms to flash memory allocation? I know
other architectures don't allocate to the vmalloc.
The design of the hardware? or Is there the way to use the flash
memory without vmalloc?

Thanks,
Mitsutaka

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: About mpc85xx flash memory allocation
  2011-01-24  1:15 About mpc85xx flash memory allocation Mitsutaka Amano
@ 2011-01-24  6:48 ` tiejun.chen
       [not found]   ` <AANLkTi=wfBzUUPqByQQK=UYiXN6CXrzferePCeM3TGpn@mail.gmail.com>
  0 siblings, 1 reply; 4+ messages in thread
From: tiejun.chen @ 2011-01-24  6:48 UTC (permalink / raw)
  To: Mitsutaka Amano; +Cc: linuxppc-dev

Mitsutaka Amano wrote:
> Hi all,
> 
> I'm testing the ppc platform is based on mpc85xx. 256MB Flash memory
> has been installed. Then I found this entries.
> 
> /proc/vmallocinfo
> ~~~
> 0xc9100000-0xd9101000 268439552 of_flash_probe+0x290/0x814 ioremap
> 
> physmap_of allocated 268MB over to the vmalloc. vmalloc space is tight.
> 
> Why does we need mpc platforms to flash memory allocation? I know

This should not be dedicated to so-called mpc platform. And we always use
ioremap() to map the device space. And on PPC ioremap also use the same space as
vmalloc(). While bootstrap you also can see this associated message like the
follows,
------
......
  * 0xd1000000..0xffbe9000  : vmalloc & ioremap

> other architectures don't allocate to the vmalloc.
> The design of the hardware? or Is there the way to use the flash

You can open /dev/mem then mmap() with a appropriate offset to access the device
space including flash.

Tiejun

> memory without vmalloc?
> 
> Thanks,
> Mitsutaka

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: About mpc85xx flash memory allocation
       [not found]     ` <4D3E3004.2040308@windriver.com>
@ 2011-01-25  2:17       ` Mitsutaka Amano
  2011-01-26 10:51         ` Mitsutaka Amano
  0 siblings, 1 reply; 4+ messages in thread
From: Mitsutaka Amano @ 2011-01-25  2:17 UTC (permalink / raw)
  To: tiejun.chen; +Cc: linuxppc-dev

On Tue, Jan 25, 2011 at 11:05 AM, tiejun.chen <tiejun.chen@windriver.com> w=
rote:
> Mitsutaka Amano wrote:
>> On Mon, Jan 24, 2011 at 3:48 PM, tiejun.chen <tiejun.chen@windriver.com>=
 wrote:
>>> Mitsutaka Amano wrote:
>>>> Hi all,
>>>>
>>>> I'm testing the ppc platform is based on mpc85xx. 256MB Flash memory
>>>> has been installed. Then I found this entries.
>>>>
>>>> /proc/vmallocinfo
>>>> ~~~
>>>> 0xc9100000-0xd9101000 268439552 of_flash_probe+0x290/0x814 ioremap
>>>>
>>>> physmap_of allocated 268MB over to the vmalloc. vmalloc space is tight=
.
>>>>
>>>> Why does we need mpc platforms to flash memory allocation? I know
>>> This should not be dedicated to so-called mpc platform. And we always u=
se
>>> ioremap() to map the device space. And on PPC ioremap also use the same=
 space as
>>> vmalloc(). While bootstrap you also can see this associated message lik=
e the
>>> follows,
>>> ------
>>> ......
>>> =A0* 0xd1000000..0xffbe9000 =A0: vmalloc & ioremap
>> Yeah. My platform says the follow message.
>>
>> =A0 * 0xc9000000..0xdf000000 =A0: vmalloc & ioremap
>
> Any reason why you don't access > 0xdf000000?

Higher than 0xdf000000 has to map TLB for using other peripherals.
it's 400MB over.

>
>>
>> The default vmalloc & ioremap space was about 200MB. so I increased
>> that by decreasing lowmem.
>> But If possible, I hope to keep default maps. So I don't want to use
>> vmalloc & ioremap
>>
>>>> other architectures don't allocate to the vmalloc.
>>>> The design of the hardware? or Is there the way to use the flash
>>> You can open /dev/mem then mmap() with a appropriate offset to access t=
he device
>>> space including flash.
>> I use the device tree(dts) and define flash partitions. Also I use CFI
>> driver and CFI_PHYSMAP_OF for device tree.
>> Is there the reference driver in what uses mmap() kernel tree? I think
>> I have to write a driver what can support dts and mmap() with a
>> appropriate offset to access the device.
>
> You should not write anything again. And you can access any physical addr=
ess
> directly via /dev/mem from the user space like the following:
>
> fd =3D open(/dev/mem,);
> mmap(fd + offset);

Thanks for letting me know. I want to use in combination with device
tree. So I'll write a driver based on physmap_of.c(such as mmap_of.c)

Thanks,
Mitsutaka

>
> Tiejun
>
>>
>> Thanks,
>> Mitsutaka
>>
>>> Tiejun
>>>
>>>> memory without vmalloc?
>>>>
>>>> Thanks,
>>>> Mitsutaka
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: About mpc85xx flash memory allocation
  2011-01-25  2:17       ` Mitsutaka Amano
@ 2011-01-26 10:51         ` Mitsutaka Amano
  0 siblings, 0 replies; 4+ messages in thread
From: Mitsutaka Amano @ 2011-01-26 10:51 UTC (permalink / raw)
  To: tiejun.chen; +Cc: linuxppc-dev

On Tue, Jan 25, 2011 at 11:17 AM, Mitsutaka Amano
<mitsutaka.amano@gmail.com> wrote:
> On Tue, Jan 25, 2011 at 11:05 AM, tiejun.chen <tiejun.chen@windriver.com>=
 wrote:
>> Mitsutaka Amano wrote:
>>> On Mon, Jan 24, 2011 at 3:48 PM, tiejun.chen <tiejun.chen@windriver.com=
> wrote:
>>>> Mitsutaka Amano wrote:
>>>>> Hi all,
>>>>>
>>>>> I'm testing the ppc platform is based on mpc85xx. 256MB Flash memory
>>>>> has been installed. Then I found this entries.
>>>>>
>>>>> /proc/vmallocinfo
>>>>> ~~~
>>>>> 0xc9100000-0xd9101000 268439552 of_flash_probe+0x290/0x814 ioremap
>>>>>
>>>>> physmap_of allocated 268MB over to the vmalloc. vmalloc space is tigh=
t.
>>>>>
>>>>> Why does we need mpc platforms to flash memory allocation? I know
>>>> This should not be dedicated to so-called mpc platform. And we always =
use
>>>> ioremap() to map the device space. And on PPC ioremap also use the sam=
e space as
>>>> vmalloc(). While bootstrap you also can see this associated message li=
ke the
>>>> follows,
>>>> ------
>>>> ......
>>>> =A0* 0xd1000000..0xffbe9000 =A0: vmalloc & ioremap
>>> Yeah. My platform says the follow message.
>>>
>>> =A0 * 0xc9000000..0xdf000000 =A0: vmalloc & ioremap
>>
>> Any reason why you don't access > 0xdf000000?
>
> Higher than 0xdf000000 has to map TLB for using other peripherals.
> it's 400MB over.
>
>>
>>>
>>> The default vmalloc & ioremap space was about 200MB. so I increased
>>> that by decreasing lowmem.
>>> But If possible, I hope to keep default maps. So I don't want to use
>>> vmalloc & ioremap
>>>
>>>>> other architectures don't allocate to the vmalloc.
>>>>> The design of the hardware? or Is there the way to use the flash
>>>> You can open /dev/mem then mmap() with a appropriate offset to access =
the device
>>>> space including flash.
>>> I use the device tree(dts) and define flash partitions. Also I use CFI
>>> driver and CFI_PHYSMAP_OF for device tree.
>>> Is there the reference driver in what uses mmap() kernel tree? I think
>>> I have to write a driver what can support dts and mmap() with a
>>> appropriate offset to access the device.
>>
>> You should not write anything again. And you can access any physical add=
ress
>> directly via /dev/mem from the user space like the following:
>>
>> fd =3D open(/dev/mem,);
>> mmap(fd + offset);
>
> Thanks for letting me know. I want to use in combination with device
> tree. So I'll write a driver based on physmap_of.c(such as mmap_of.c)
I confused and misunderstand that. it has to use as a rootfs. so It
can't use a userland program.
Of cource, it can be force mapping to the userspace. but system will
be unstable. I think.

Mitsutaka

>
> Thanks,
> Mitsutaka
>
>>
>> Tiejun
>>
>>>
>>> Thanks,
>>> Mitsutaka
>>>
>>>> Tiejun
>>>>
>>>>> memory without vmalloc?
>>>>>
>>>>> Thanks,
>>>>> Mitsutaka
>>
>>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-01-26 10:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-24  1:15 About mpc85xx flash memory allocation Mitsutaka Amano
2011-01-24  6:48 ` tiejun.chen
     [not found]   ` <AANLkTi=wfBzUUPqByQQK=UYiXN6CXrzferePCeM3TGpn@mail.gmail.com>
     [not found]     ` <4D3E3004.2040308@windriver.com>
2011-01-25  2:17       ` Mitsutaka Amano
2011-01-26 10:51         ` Mitsutaka Amano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.