[PATCH v2] ARM: remove name from machine_desc for DT platforms

Rob Herring robherring2 at gmail.com
Thu Nov 21 18:53:45 EST 2013


On Mon, Nov 18, 2013 at 7:54 AM, Russell King - ARM Linux
<linux at arm.linux.org.uk> wrote:
> On Fri, Nov 15, 2013 at 02:16:29AM +0900, Grant Likely wrote:
>> On Thu, Nov 14, 2013 at 11:46 PM, Rob Herring <robherring2 at gmail.com> wrote:
>> > If this is a required feature then we should make machine_desc common
>> > (or at least part of it) with the other arches that have copied arm and
>> > then add it to arm64 as well. Then I could do further consolidation of
>> > the FDT machine matching code. Otherwise this is all just pointless
>> > architecture variation that really has nothing to do with the architecture.
>>
>> I think you are missing my point. go ahead, take it out of
>> /proc/cpuinfo. That's not the issue.
>
> You do realise this is a user API issue, right?
>
> http://fossies.org/dox/glibc-2.18/ports_2sysdeps_2unix_2sysv_2linux_2arm_2ioperm_8c_source.html
>
> Right, it only has four strings which it matches against, but this is
> evidence that /proc/cpuinfo is a user API, and the strings therein are
> used by userspace in ways you don't expect.
>
> We can't just go around removing things.

I mentioned the string changes in the commit message. If we take the
hard line here, then we can never change these strings and are stuck
with them forever. And in turn, we can never consolidate several board
machine_descs into an SoC machine_desc. However, in the DT case we've
already been changing this string as platforms have been converted to
DT and I don't think anyone has complained. I think we should fix this
sooner rather than later as more DT platforms become entrenched.

Stepping back, where should this information come from in the DT case?
This is an easy thing to have in the DT and not in the kernel. It
seems like a no-brainer to me. Or perhaps we say the Hardware field is
deprecated and remove it on DT? It is already available in
/proc/device-tree.

Rob



More information about the linux-arm-kernel mailing list