From: lauraa@codeaurora.org (Laura Abbott)
To: linux-arm-kernel@lists.infradead.org
Subject: gen_pool_add broken with LPAE based systems
Date: Thu, 14 Mar 2013 16:05:27 -0700 [thread overview]
Message-ID: <514257B7.5080206@codeaurora.org> (raw)
Hi,
We use genalloc for managing certain pools of physical memory. genalloc
currently uses unsigned long for virtual addresses and phys_addr_t for
physical addresses. Our ARM LPAE systems have 64-bit physical addresses
but unsigned long is still 32 bits. Using gen_pool_add breaks with
addresses > 4G because gen_pool_add treats the address passed in as the
virtual address. gen_pool allocates internally based on the 32 bit
virtual address as well so everything is broken if we want to be able to
manage the full address space after 4G. I see a couple of options:
1) Change gen_pool_add to use physical addresses and allocate based on
physical addresses instead of virtual addresses
2) Change the virtual address to be a 64 bit type or something
selectable to a 64 bit type.
3) Allow a flag per pool to select whether the allocator is virtual or
physical and switch between those.
4) Split the APIs into virtual <-> physical and physical only and have
separate types for each.
Any of these suggestions seem reasonable or is there another option to
consider?
Thanks,
Laura
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
WARNING: multiple messages have this Message-ID (diff)
From: Laura Abbott <lauraa@codeaurora.org>
To: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>,
Andrew Morton <akpm@linux-foundation.org>,
Benjamin Gaignard <benjamin.gaignard@stericsson.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: gen_pool_add broken with LPAE based systems
Date: Thu, 14 Mar 2013 16:05:27 -0700 [thread overview]
Message-ID: <514257B7.5080206@codeaurora.org> (raw)
Hi,
We use genalloc for managing certain pools of physical memory. genalloc
currently uses unsigned long for virtual addresses and phys_addr_t for
physical addresses. Our ARM LPAE systems have 64-bit physical addresses
but unsigned long is still 32 bits. Using gen_pool_add breaks with
addresses > 4G because gen_pool_add treats the address passed in as the
virtual address. gen_pool allocates internally based on the 32 bit
virtual address as well so everything is broken if we want to be able to
manage the full address space after 4G. I see a couple of options:
1) Change gen_pool_add to use physical addresses and allocate based on
physical addresses instead of virtual addresses
2) Change the virtual address to be a 64 bit type or something
selectable to a 64 bit type.
3) Allow a flag per pool to select whether the allocator is virtual or
physical and switch between those.
4) Split the APIs into virtual <-> physical and physical only and have
separate types for each.
Any of these suggestions seem reasonable or is there another option to
consider?
Thanks,
Laura
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
next reply other threads:[~2013-03-14 23:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-14 23:05 Laura Abbott [this message]
2013-03-14 23:05 ` gen_pool_add broken with LPAE based systems Laura Abbott
2013-03-19 21:54 ` Andrew Morton
2013-03-19 21:54 ` Andrew Morton
2013-03-19 22:49 ` Laura Abbott
2013-03-19 22:49 ` Laura Abbott
2013-03-19 23:00 ` Andrew Morton
2013-03-19 23:00 ` Andrew Morton
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=514257B7.5080206@codeaurora.org \
--to=lauraa@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.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 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.