On Wednesday 16 October 2013, Haojian Zhuang wrote: > Oh, no. I shouldn't extend the static mapping table to the entire range. > > Most of the registers only need to map once in the probe() function > of the driver. Whether it's using static mapping or dynamic mapping, > there's no difference. There is a small difference in that having a megabyte-sized mapping will reduce the number of TLB entries required for I/O access, which can improve performance slightly. Other platforms do it for this reason. > The sysctrl register bank is used in both clock & platform > driver. Each clock node contains reg property, it needs to be parsed > by of_iomap(). Hotplug & SMP platform driver needs to parse sysctrl > register bank also. If I don't choose the static IO mapping for sysctrl > register bank, I have to define some global variable to store the > virtual address mapping. Or I have to cost lots of redundant virtual > address space for the same IO mapping. It's a small cost, but your approach makes sense, just make sure you have a comment in the map_io code explaining it. > So I'll only keep the static IO mapping for sysctrl. I'd still choose the larger mapping, but I'll leave the decision to you. Arnd -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html