Port-powerpc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: How to use a bus_space at the end of a 32-bit address space?



On Sun, 4 Dec 2011 13:30:56 +0100
Frank Wille <frank%phoenix.owl.de@localhost> wrote:

> --- sys/arch/powerpc/powerpc/bus_space.c      30 Jun 2011 00:53:00
> -0000 1.28 +++ sys/arch/powerpc/powerpc/bus_space.c   4 Dec
> 2011 12:16:08 -0000 @@ -526,7 +526,7 @@
>       size = _BUS_SPACE_STRIDE(t, size);
>       bpa = _BUS_SPACE_STRIDE(t, bpa);
>  
> -     if (bpa + size > t->pbs_limit) {
> +     if (t->pbs_limit != 0 && bpa + size > t->pbs_limit) {
>  #ifdef DEBUG
>               printf("bus_space_map(%p[%x:%x], %#x, %#x) failed: EINVAL
> \n", t, t->pbs_base, t->pbs_limit, bpa, size);
> @@ -702,7 +702,7 @@
>       if (t->pbs_extent == NULL)
>               return ENOMEM;
>  
> -     if (rstart + size > t->pbs_limit) {
> +     if (t->pbs_limit != 0 && rstart + size > t->pbs_limit) {
>  #ifdef DEBUG
>               printf("%s(%p[%x:%x], %#x, %#x) failed: EINVAL\n",
>                  __func__, t, t->pbs_base, t->pbs_limit, rstart, size);

When there are no objections I will commit that in a few days.

-- 
Frank Wille


Home | Main Index | Thread Index | Old Index