Re: [PATCH v2 18/19] drivers: mem: Create file to access second half of 64-bit memory

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

 



On Thu, Jan 31, 2019 at 2:55 AM Peter Mamonov <pmamonov@xxxxxxxxx> wrote:
>
> Hello, Andrey,
>
> > In order to allow access to second half of address space on 64-bit
> > machines, add code that creates /dev/highmem dedicated for that.
> >
> > Note that due to maximum file size being limited to MAX_LFS_FILESIZE
> > or 0x7fff_ffff_ffff_ffff bytes at addresses 0x7fff_ffff_ffff_ffff and
> > 0xffff_ffff_ffff_ffff cannot be access through /dev/mem and
> > /dev/hightmem correspondingly.
>
> Does it imply using `-s /dev/highmem` argument when accessing addresses beyond
> MAX_LFS_FILESIZE?

Yes, it does.

> That's not very convenient:
>
>         $ git grep -l /dev/mem
>         commands/crc.c
>         commands/digest.c
>         commands/disasm.c
>         commands/md.c
>         commands/memcmp.c
>         commands/memcpy.c
>         commands/memset.c
>         commands/mm.c
>         commands/mw.c
>

I don't disagree, but there isn't much that can be done about that
AFAICT. The first version of this fix kept single /dev/mem file, but
ended up introducing quite a bit of special cases all over the FS
layer, so it was rejected. The only two options to make it more
convenient that I can see would be to either modify "/dev/mem" users
to make "/dev/highmem" substitution automatically based on offset they
are given, or, assuming it is possible, create a mapping that would
expose all of the interesting registers on MIPS64 in the lower half of
64-bit address space.

Thanks,
Andrey Smirnov

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux