Re: [PATCH v2 21/22] arm64: cpuinfo: Expose MIDR_EL1 and REVIDR_EL1 to sysfs

From: Russell King - ARM Linux
Date: Tue Oct 06 2015 - 05:10:23 EST


On Mon, Oct 05, 2015 at 06:02:10PM +0100, Suzuki K. Poulose wrote:
> +static int __init cpuinfo_regs_init(void)
> +{
> + int cpu, ret;
> +
> + for_each_present_cpu(cpu) {
> + struct device *dev = get_cpu_device(cpu);
> +
> + if (!dev)
> + return -1;

NAK. Go figure out why, I'm too lazy to tell you.

> +
> + ret = sysfs_create_group(&dev->kobj, &cpuregs_attr_group);
> + if (ret)
> + return ret;
> + }
> +
> + return 0;
> +}
> +
> +device_initcall(cpuinfo_regs_init);
> --
> 1.7.9.5
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

--
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
--
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/