poke-devel
[Top][All Lists]
Advanced

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

Re: Re: [PATCH v2] Add io space MMAP for memory mapping devices and file


From: Mohammad-Reza Nabipoor
Subject: Re: Re: [PATCH v2] Add io space MMAP for memory mapping devices and files
Date: Sat, 6 Jan 2024 16:23:03 +0100


On Sat, Jan 06, 2024 at 03:40:15PM +0100, Mohammad-Reza Nabipoor wrote:
> 
> > +  if (align > 8)
> > +    align = 8;
> > +
> > +  if (align > 1 && offset % align)
> 
> 
> Why not returning IOD_EIOFF for "Invalid offset"? Or some other error?
> If user is asking for an invalid range of memory, we have to return
> an error, rather than trying to "fix" the problem.  It prevents mistakes.
> 
> Or we can handle the alignment like how some processors handle?
>   For N byte read, you have to be aligned on N-byte boundaries.
> 
> 


Maybe we can relax alignment requirement using a flag.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]