On Mon, Aug 1, 2011 at 10:58 PM, Andre Heider <a.hei...@gmail.com> wrote: > On Mon, Aug 1, 2011 at 10:30 PM, Geert Uytterhoeven > <ge...@linux-m68k.org> wrote: >> On Mon, Aug 1, 2011 at 22:03, Andre Heider <a.hei...@gmail.com> wrote: >>> 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: for (region_idx = 0; region_idx < dev->num_regions; region_idx++) { ... gendisk->first_minor = devidx * PS3DISK_MINORS + region_idx; But that limit might be raised in future hypervisor versions. Maybe a BUG_ON(dev->num_regions <= PS3DISK_MINORS); is more appropriate? _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev