Skip to content

Commit

Permalink
spapr_pci: s/INT64_MAX/UINT64_MAX/
Browse files Browse the repository at this point in the history
It doesn't make sense for a region to be INT64_MAX in size:
memory core uses UINT64_MAX as a special value meaning
"all 64 bit" this is what was meant here.

While this should never affect the spapr system which at the moment always
has < 63 bit size, this makes us hit all kind of corner case bugs with
sub-pages, so users are probably better off if we just use UINT64_MAX
instead.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Alexander Graf <agraf@suse.de>
  • Loading branch information
mstsirkin committed Dec 10, 2013
1 parent 286690e commit 92b8e39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hw/ppc/spapr_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ static int spapr_phb_init(SysBusDevice *s)

/* Initialize memory regions */
sprintf(namebuf, "%s.mmio", sphb->dtbusname);
memory_region_init(&sphb->memspace, OBJECT(sphb), namebuf, INT64_MAX);
memory_region_init(&sphb->memspace, OBJECT(sphb), namebuf, UINT64_MAX);

sprintf(namebuf, "%s.mmio-alias", sphb->dtbusname);
memory_region_init_alias(&sphb->memwindow, OBJECT(sphb),
Expand Down

0 comments on commit 92b8e39

Please sign in to comment.