Thread (70 messages) flat view 70 messages, 7 authors, 2011-08-31

Re: [Cbe-oss-dev] [PATCH 09/15] ps3: Limit the number of regions per storage device

From: Andre Heider <hidden>
Date: 2011-08-06 12:47:05

On Sat, Aug 6, 2011 at 2:28 PM, Andre Heider [off-list ref] wrote:
On Mon, Aug 1, 2011 at 10:58 PM, Andre Heider [off-list ref] wrote:
quoted
On Mon, Aug 1, 2011 at 10:30 PM, Geert Uytterhoeven
[off-list ref] wrote:
quoted
On Mon, Aug 1, 2011 at 22:03, Andre Heider [off-list ref] wrote:
quoted
There can be only 8 regions, add a sanity check
Why can there be only 8 regions?
I believe lv1 limits it to 8? I might be mistaken here, it mostly is a
check for the patches after this one
Small follow-up:
While the repository contains ("bus", "dev", "n_regs") to describe the
actual number of regions, it also contains ("bus", "dev", "region", [
"id" | "start" | "size" ]) for always exactly 8 regions (with a value
of 0xdeadbeef for invalid regions).

I added this check for the storage drivers, which contain:
=A0for (region_idx =3D 0; region_idx < dev->num_regions; region_idx++) {
=A0 =A0...
=A0 =A0gendisk->first_minor =3D devidx * PS3DISK_MINORS + region_idx;

But that limit might be raised in future hypervisor versions.
Maybe a
=A0BUG_ON(dev->num_regions <=3D PS3DISK_MINORS);
is more appropriate?
Of course I meant the exact opposite, heh:
 =A0BUG_ON(dev->num_regions > PS3DISK_MINORS);
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help