Re: [PATCH] archs: add ioremap_change_write_prot

From: Marco Stornelli
Date: Wed Oct 27 2010 - 02:55:33 EST


2010/10/26 Thomas Gleixner <tglx@xxxxxxxxxxxxx>:
>
> Why inventing a new interface if we have one already ?
>
>    set_memory_* which has a few more variants than ro/rw
>
> Also this is not related to ioremap, these are functions which works on
> almost anything when there are other restrictions in place.
>
> So implementing set_memory_ro(), set_memory_rw() for those archs which
> you need it for makes more sense than creating a misnomed and
> misplaced wrapper.
>
> Thanks,
>
>        tglx
>

Andi and Thomas, thanks for your response. I was trying to use an
homogeneous interface, I see that only x86 has got set_memory_*, but
ok I can use these ones. About the name I used, I was trying to use a
way to change the protection after an ioremap, so for x86 means a call
to these functions, but other archs could mean other checks.

However it needs to adds a define or something similar to know if the
archs implements or not this interface. Suggestions about this point?

Thanks.

Marco
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/