Source-Changes-D archive

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

Re: CVS commit: src/sys/dev/hpc



On Tue, Sep 18, 2018 at 12:17:41 +0900, Rin Okuyama wrote:

> > @@ -278,8 +279,10 @@ hpckbd_keymap_setup(struct hpckbd_core *
> >   	 * XXX The way this is done is really wrong.  The __UNCONST()
> >   	 * is a hint as to what is wrong.  This actually ends up modifying
> >   	 * initialized data which is marked "const".
> > +	 *
> >   	 * The reason we get away with it here is that on sh3 kernel
> > -	 * is directly mapped.
> > +	 * is directly mapped. For mips, read-only data is mapped
> > +	 * read/write at the moment.
> >   	 */

Is this distinction necessary?  My guess would be that on mips the
reason it works is exactly the same: the kernel is directly mapped
i.e. we bypass MMU for these accesses.

If that's indeed the case, the "at the moment" part of the comment
would be misleading, as there's no other moment in the future where it
becomes false.

Please, can you clarify?

-uwe


Home | Main Index | Thread Index | Old Index