* [PATCH v3 1/2] Documentation: devicetree: root node serial-number property documentation @ 2015-04-18 9:58 Paul Kocialkowski 2015-04-18 9:58 ` [PATCH v3 2/2] arch: arm: Show the serial number from devicetree in cpuinfo Paul Kocialkowski 0 siblings, 1 reply; 11+ messages in thread From: Paul Kocialkowski @ 2015-04-18 9:58 UTC (permalink / raw) To: linux-arm-kernel Open firmware is already using the serial-number property for passing the device's serial number from the bootloader to the kernel. In addition, lshw already has support for scanning this property. The serial number is a string that somewhat represents the device's serial number. It might come from some form of storage (e.g. an eeprom) and be programmed at factory-time by the manufacturer or come from identification bits available in e.g. the SoC (note that the soc_id property in the SoC bus should hold a full account of those bits). The serial number is taken as-is from the bootloader, so it is up to the bootloader to define where the serial number comes from and what length it should be. Some use cases for the serial number require it to have a maximum length (e.g. for USB serial number) and some other cases imply more restrictions on what the serial number should look like (e.g. in Android, the ro.serialno property is usually a 16-bytes (plus one null byte) representation of a 64 bit number). Signed-off-by: Paul Kocialkowski <contact@paulk.fr> --- Documentation/devicetree/booting-without-of.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/booting-without-of.txt b/Documentation/devicetree/booting-without-of.txt index 7768518..95fc385 100644 --- a/Documentation/devicetree/booting-without-of.txt +++ b/Documentation/devicetree/booting-without-of.txt @@ -828,6 +828,10 @@ address which can extend beyond that limit. name may clash with standard defined ones, you prefix them with your vendor name and a comma. + Additional properties for the root node: + + - serial-number : a string representing the device's serial number + b) The /cpus node This node is the parent of all individual CPU nodes. It doesn't -- 1.9.1 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v3 2/2] arch: arm: Show the serial number from devicetree in cpuinfo 2015-04-18 9:58 [PATCH v3 1/2] Documentation: devicetree: root node serial-number property documentation Paul Kocialkowski @ 2015-04-18 9:58 ` Paul Kocialkowski 2015-04-27 8:27 ` Paul Kocialkowski 2015-04-27 13:48 ` Rob Herring 0 siblings, 2 replies; 11+ messages in thread From: Paul Kocialkowski @ 2015-04-18 9:58 UTC (permalink / raw) To: linux-arm-kernel This grabs the serial number shown in cpuinfo from the serial-number devicetree property in priority. When booting with ATAGs (and without device-tree), the provided number is still shown instead. Signed-off-by: Paul Kocialkowski <contact@paulk.fr> --- arch/arm/include/asm/system_info.h | 1 + arch/arm/kernel/setup.c | 27 +++++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/system_info.h b/arch/arm/include/asm/system_info.h index 720ea03..3860cbd40 100644 --- a/arch/arm/include/asm/system_info.h +++ b/arch/arm/include/asm/system_info.h @@ -17,6 +17,7 @@ /* information about the system we're running on */ extern unsigned int system_rev; +extern const char *system_serial; extern unsigned int system_serial_low; extern unsigned int system_serial_high; extern unsigned int mem_fclk_21285; diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 1d60beb..349790f 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -93,6 +93,9 @@ unsigned int __atags_pointer __initdata; unsigned int system_rev; EXPORT_SYMBOL(system_rev); +const char *system_serial; +EXPORT_SYMBOL(system_serial); + unsigned int system_serial_low; EXPORT_SYMBOL(system_serial_low); @@ -821,8 +824,29 @@ arch_initcall(customize_machine); static int __init init_machine_late(void) { +#ifdef CONFIG_OF + struct device_node *root; + int ret; +#endif + if (machine_desc->init_late) machine_desc->init_late(); + +#ifdef CONFIG_OF + root = of_find_node_by_path("/"); + if (root) { + ret = of_property_read_string(root, "serial-number", + &system_serial); + if (ret) + system_serial = NULL; + } +#endif + + if (!system_serial) + system_serial = kasprintf(GFP_KERNEL, "%08x%08x", + system_serial_high, + system_serial_low); + return 0; } late_initcall(init_machine_late); @@ -1091,8 +1115,7 @@ static int c_show(struct seq_file *m, void *v) seq_printf(m, "Hardware\t: %s\n", machine_name); seq_printf(m, "Revision\t: %04x\n", system_rev); - seq_printf(m, "Serial\t\t: %08x%08x\n", - system_serial_high, system_serial_low); + seq_printf(m, "Serial\t\t: %s\n", system_serial); return 0; } -- 1.9.1 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v3 2/2] arch: arm: Show the serial number from devicetree in cpuinfo 2015-04-18 9:58 ` [PATCH v3 2/2] arch: arm: Show the serial number from devicetree in cpuinfo Paul Kocialkowski @ 2015-04-27 8:27 ` Paul Kocialkowski 2015-04-27 13:48 ` Rob Herring 1 sibling, 0 replies; 11+ messages in thread From: Paul Kocialkowski @ 2015-04-27 8:27 UTC (permalink / raw) To: linux-arm-kernel Le samedi 18 avril 2015 ? 11:58 +0200, Paul Kocialkowski a ?crit : > This grabs the serial number shown in cpuinfo from the serial-number devicetree > property in priority. When booting with ATAGs (and without device-tree), the > provided number is still shown instead. Any further comment on this? > Signed-off-by: Paul Kocialkowski <contact@paulk.fr> > --- > arch/arm/include/asm/system_info.h | 1 + > arch/arm/kernel/setup.c | 27 +++++++++++++++++++++++++-- > 2 files changed, 26 insertions(+), 2 deletions(-) > > diff --git a/arch/arm/include/asm/system_info.h b/arch/arm/include/asm/system_info.h > index 720ea03..3860cbd40 100644 > --- a/arch/arm/include/asm/system_info.h > +++ b/arch/arm/include/asm/system_info.h > @@ -17,6 +17,7 @@ > > /* information about the system we're running on */ > extern unsigned int system_rev; > +extern const char *system_serial; > extern unsigned int system_serial_low; > extern unsigned int system_serial_high; > extern unsigned int mem_fclk_21285; > diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c > index 1d60beb..349790f 100644 > --- a/arch/arm/kernel/setup.c > +++ b/arch/arm/kernel/setup.c > @@ -93,6 +93,9 @@ unsigned int __atags_pointer __initdata; > unsigned int system_rev; > EXPORT_SYMBOL(system_rev); > > +const char *system_serial; > +EXPORT_SYMBOL(system_serial); > + > unsigned int system_serial_low; > EXPORT_SYMBOL(system_serial_low); > > @@ -821,8 +824,29 @@ arch_initcall(customize_machine); > > static int __init init_machine_late(void) > { > +#ifdef CONFIG_OF > + struct device_node *root; > + int ret; > +#endif > + > if (machine_desc->init_late) > machine_desc->init_late(); > + > +#ifdef CONFIG_OF > + root = of_find_node_by_path("/"); > + if (root) { > + ret = of_property_read_string(root, "serial-number", > + &system_serial); > + if (ret) > + system_serial = NULL; > + } > +#endif > + > + if (!system_serial) > + system_serial = kasprintf(GFP_KERNEL, "%08x%08x", > + system_serial_high, > + system_serial_low); > + > return 0; > } > late_initcall(init_machine_late); > @@ -1091,8 +1115,7 @@ static int c_show(struct seq_file *m, void *v) > > seq_printf(m, "Hardware\t: %s\n", machine_name); > seq_printf(m, "Revision\t: %04x\n", system_rev); > - seq_printf(m, "Serial\t\t: %08x%08x\n", > - system_serial_high, system_serial_low); > + seq_printf(m, "Serial\t\t: %s\n", system_serial); > > return 0; > } -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: This is a digitally signed message part URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150427/9c4abe91/attachment.sig> ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v3 2/2] arch: arm: Show the serial number from devicetree in cpuinfo 2015-04-18 9:58 ` [PATCH v3 2/2] arch: arm: Show the serial number from devicetree in cpuinfo Paul Kocialkowski 2015-04-27 8:27 ` Paul Kocialkowski @ 2015-04-27 13:48 ` Rob Herring 2015-04-27 14:42 ` Paul Kocialkowski 1 sibling, 1 reply; 11+ messages in thread From: Rob Herring @ 2015-04-27 13:48 UTC (permalink / raw) To: linux-arm-kernel On Sat, Apr 18, 2015 at 4:58 AM, Paul Kocialkowski <contact@paulk.fr> wrote: > This grabs the serial number shown in cpuinfo from the serial-number devicetree > property in priority. When booting with ATAGs (and without device-tree), the > provided number is still shown instead. > > Signed-off-by: Paul Kocialkowski <contact@paulk.fr> One comment below, otherwise: Acked-by: Rob Herring <robh@kernel.org> > --- > arch/arm/include/asm/system_info.h | 1 + > arch/arm/kernel/setup.c | 27 +++++++++++++++++++++++++-- > 2 files changed, 26 insertions(+), 2 deletions(-) > > diff --git a/arch/arm/include/asm/system_info.h b/arch/arm/include/asm/system_info.h > index 720ea03..3860cbd40 100644 > --- a/arch/arm/include/asm/system_info.h > +++ b/arch/arm/include/asm/system_info.h > @@ -17,6 +17,7 @@ > > /* information about the system we're running on */ > extern unsigned int system_rev; > +extern const char *system_serial; > extern unsigned int system_serial_low; > extern unsigned int system_serial_high; > extern unsigned int mem_fclk_21285; > diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c > index 1d60beb..349790f 100644 > --- a/arch/arm/kernel/setup.c > +++ b/arch/arm/kernel/setup.c > @@ -93,6 +93,9 @@ unsigned int __atags_pointer __initdata; > unsigned int system_rev; > EXPORT_SYMBOL(system_rev); > > +const char *system_serial; > +EXPORT_SYMBOL(system_serial); > + > unsigned int system_serial_low; > EXPORT_SYMBOL(system_serial_low); > > @@ -821,8 +824,29 @@ arch_initcall(customize_machine); > > static int __init init_machine_late(void) > { > +#ifdef CONFIG_OF > + struct device_node *root; > + int ret; > +#endif > + > if (machine_desc->init_late) > machine_desc->init_late(); > + > +#ifdef CONFIG_OF These ifdefs should not be necessary, but please double check. Rob > + root = of_find_node_by_path("/"); > + if (root) { > + ret = of_property_read_string(root, "serial-number", > + &system_serial); > + if (ret) > + system_serial = NULL; > + } > +#endif > + > + if (!system_serial) > + system_serial = kasprintf(GFP_KERNEL, "%08x%08x", > + system_serial_high, > + system_serial_low); > + > return 0; > } > late_initcall(init_machine_late); > @@ -1091,8 +1115,7 @@ static int c_show(struct seq_file *m, void *v) > > seq_printf(m, "Hardware\t: %s\n", machine_name); > seq_printf(m, "Revision\t: %04x\n", system_rev); > - seq_printf(m, "Serial\t\t: %08x%08x\n", > - system_serial_high, system_serial_low); > + seq_printf(m, "Serial\t\t: %s\n", system_serial); > > return 0; > } > -- > 1.9.1 > ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v3 2/2] arch: arm: Show the serial number from devicetree in cpuinfo 2015-04-27 13:48 ` Rob Herring @ 2015-04-27 14:42 ` Paul Kocialkowski 2015-04-27 15:20 ` Rob Herring 2015-04-28 16:09 ` Russell King - ARM Linux 0 siblings, 2 replies; 11+ messages in thread From: Paul Kocialkowski @ 2015-04-27 14:42 UTC (permalink / raw) To: linux-arm-kernel Le lundi 27 avril 2015 ? 08:48 -0500, Rob Herring a ?crit : > On Sat, Apr 18, 2015 at 4:58 AM, Paul Kocialkowski <contact@paulk.fr> wrote: > > This grabs the serial number shown in cpuinfo from the serial-number devicetree > > property in priority. When booting with ATAGs (and without device-tree), the > > provided number is still shown instead. > > > > Signed-off-by: Paul Kocialkowski <contact@paulk.fr> > > One comment below, otherwise: > > Acked-by: Rob Herring <robh@kernel.org> > > > --- > > arch/arm/include/asm/system_info.h | 1 + > > arch/arm/kernel/setup.c | 27 +++++++++++++++++++++++++-- > > 2 files changed, 26 insertions(+), 2 deletions(-) > > > > diff --git a/arch/arm/include/asm/system_info.h b/arch/arm/include/asm/system_info.h > > index 720ea03..3860cbd40 100644 > > --- a/arch/arm/include/asm/system_info.h > > +++ b/arch/arm/include/asm/system_info.h > > @@ -17,6 +17,7 @@ > > > > /* information about the system we're running on */ > > extern unsigned int system_rev; > > +extern const char *system_serial; > > extern unsigned int system_serial_low; > > extern unsigned int system_serial_high; > > extern unsigned int mem_fclk_21285; > > diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c > > index 1d60beb..349790f 100644 > > --- a/arch/arm/kernel/setup.c > > +++ b/arch/arm/kernel/setup.c > > @@ -93,6 +93,9 @@ unsigned int __atags_pointer __initdata; > > unsigned int system_rev; > > EXPORT_SYMBOL(system_rev); > > > > +const char *system_serial; > > +EXPORT_SYMBOL(system_serial); > > + > > unsigned int system_serial_low; > > EXPORT_SYMBOL(system_serial_low); > > > > @@ -821,8 +824,29 @@ arch_initcall(customize_machine); > > > > static int __init init_machine_late(void) > > { > > +#ifdef CONFIG_OF > > + struct device_node *root; > > + int ret; > > +#endif > > + > > if (machine_desc->init_late) > > machine_desc->init_late(); > > + > > +#ifdef CONFIG_OF > > These ifdefs should not be necessary, but please double check. Well, of_property_read_string is only defined when CONFIG_OF is set (base.c is always built in drivers/of but the directory is only included when CONFIG_OF is set). Of course, on ARM, we now expect that it is the case, but it seems like good practice to check for it, since it could theoretically be disabled. This is also being done a few lines above in customize_machine. > > + root = of_find_node_by_path("/"); > > + if (root) { > > + ret = of_property_read_string(root, "serial-number", > > + &system_serial); > > + if (ret) > > + system_serial = NULL; > > + } > > +#endif > > + > > + if (!system_serial) > > + system_serial = kasprintf(GFP_KERNEL, "%08x%08x", > > + system_serial_high, > > + system_serial_low); > > + > > return 0; > > } > > late_initcall(init_machine_late); > > @@ -1091,8 +1115,7 @@ static int c_show(struct seq_file *m, void *v) > > > > seq_printf(m, "Hardware\t: %s\n", machine_name); > > seq_printf(m, "Revision\t: %04x\n", system_rev); > > - seq_printf(m, "Serial\t\t: %08x%08x\n", > > - system_serial_high, system_serial_low); > > + seq_printf(m, "Serial\t\t: %s\n", system_serial); > > > > return 0; > > } > > -- > > 1.9.1 > > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: This is a digitally signed message part URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150427/5dfe6591/attachment.sig> ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v3 2/2] arch: arm: Show the serial number from devicetree in cpuinfo 2015-04-27 14:42 ` Paul Kocialkowski @ 2015-04-27 15:20 ` Rob Herring 2015-04-27 18:45 ` Paul Kocialkowski 2015-04-28 16:09 ` Russell King - ARM Linux 1 sibling, 1 reply; 11+ messages in thread From: Rob Herring @ 2015-04-27 15:20 UTC (permalink / raw) To: linux-arm-kernel On Mon, Apr 27, 2015 at 9:42 AM, Paul Kocialkowski <contact@paulk.fr> wrote: > Le lundi 27 avril 2015 ? 08:48 -0500, Rob Herring a ?crit : >> On Sat, Apr 18, 2015 at 4:58 AM, Paul Kocialkowski <contact@paulk.fr> wrote: >> > This grabs the serial number shown in cpuinfo from the serial-number devicetree >> > property in priority. When booting with ATAGs (and without device-tree), the >> > provided number is still shown instead. >> > >> > Signed-off-by: Paul Kocialkowski <contact@paulk.fr> >> >> One comment below, otherwise: >> >> Acked-by: Rob Herring <robh@kernel.org> >> >> > --- >> > arch/arm/include/asm/system_info.h | 1 + >> > arch/arm/kernel/setup.c | 27 +++++++++++++++++++++++++-- >> > 2 files changed, 26 insertions(+), 2 deletions(-) >> > >> > diff --git a/arch/arm/include/asm/system_info.h b/arch/arm/include/asm/system_info.h >> > index 720ea03..3860cbd40 100644 >> > --- a/arch/arm/include/asm/system_info.h >> > +++ b/arch/arm/include/asm/system_info.h >> > @@ -17,6 +17,7 @@ >> > >> > /* information about the system we're running on */ >> > extern unsigned int system_rev; >> > +extern const char *system_serial; >> > extern unsigned int system_serial_low; >> > extern unsigned int system_serial_high; >> > extern unsigned int mem_fclk_21285; >> > diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c >> > index 1d60beb..349790f 100644 >> > --- a/arch/arm/kernel/setup.c >> > +++ b/arch/arm/kernel/setup.c >> > @@ -93,6 +93,9 @@ unsigned int __atags_pointer __initdata; >> > unsigned int system_rev; >> > EXPORT_SYMBOL(system_rev); >> > >> > +const char *system_serial; >> > +EXPORT_SYMBOL(system_serial); >> > + >> > unsigned int system_serial_low; >> > EXPORT_SYMBOL(system_serial_low); >> > >> > @@ -821,8 +824,29 @@ arch_initcall(customize_machine); >> > >> > static int __init init_machine_late(void) >> > { >> > +#ifdef CONFIG_OF >> > + struct device_node *root; >> > + int ret; >> > +#endif >> > + >> > if (machine_desc->init_late) >> > machine_desc->init_late(); >> > + >> > +#ifdef CONFIG_OF >> >> These ifdefs should not be necessary, but please double check. > > Well, of_property_read_string is only defined when CONFIG_OF is set > (base.c is always built in drivers/of but the directory is only included > when CONFIG_OF is set). Look at include/linux/of.h. There are an empty versions of both functions. > Of course, on ARM, we now expect that it is the case, but it seems like > good practice to check for it, since it could theoretically be disabled. We still (and will continue to) have non-OF platforms. > This is also being done a few lines above in customize_machine. True, but that doesn't mean we want more. Rob ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v3 2/2] arch: arm: Show the serial number from devicetree in cpuinfo 2015-04-27 15:20 ` Rob Herring @ 2015-04-27 18:45 ` Paul Kocialkowski 0 siblings, 0 replies; 11+ messages in thread From: Paul Kocialkowski @ 2015-04-27 18:45 UTC (permalink / raw) To: linux-arm-kernel Le lundi 27 avril 2015 ? 10:20 -0500, Rob Herring a ?crit : > On Mon, Apr 27, 2015 at 9:42 AM, Paul Kocialkowski <contact@paulk.fr> wrote: > > Le lundi 27 avril 2015 ? 08:48 -0500, Rob Herring a ?crit : > >> On Sat, Apr 18, 2015 at 4:58 AM, Paul Kocialkowski <contact@paulk.fr> wrote: > >> > This grabs the serial number shown in cpuinfo from the serial-number devicetree > >> > property in priority. When booting with ATAGs (and without device-tree), the > >> > provided number is still shown instead. > >> > > >> > Signed-off-by: Paul Kocialkowski <contact@paulk.fr> > >> > >> One comment below, otherwise: > >> > >> Acked-by: Rob Herring <robh@kernel.org> > >> > >> > --- > >> > arch/arm/include/asm/system_info.h | 1 + > >> > arch/arm/kernel/setup.c | 27 +++++++++++++++++++++++++-- > >> > 2 files changed, 26 insertions(+), 2 deletions(-) > >> > > >> > diff --git a/arch/arm/include/asm/system_info.h b/arch/arm/include/asm/system_info.h > >> > index 720ea03..3860cbd40 100644 > >> > --- a/arch/arm/include/asm/system_info.h > >> > +++ b/arch/arm/include/asm/system_info.h > >> > @@ -17,6 +17,7 @@ > >> > > >> > /* information about the system we're running on */ > >> > extern unsigned int system_rev; > >> > +extern const char *system_serial; > >> > extern unsigned int system_serial_low; > >> > extern unsigned int system_serial_high; > >> > extern unsigned int mem_fclk_21285; > >> > diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c > >> > index 1d60beb..349790f 100644 > >> > --- a/arch/arm/kernel/setup.c > >> > +++ b/arch/arm/kernel/setup.c > >> > @@ -93,6 +93,9 @@ unsigned int __atags_pointer __initdata; > >> > unsigned int system_rev; > >> > EXPORT_SYMBOL(system_rev); > >> > > >> > +const char *system_serial; > >> > +EXPORT_SYMBOL(system_serial); > >> > + > >> > unsigned int system_serial_low; > >> > EXPORT_SYMBOL(system_serial_low); > >> > > >> > @@ -821,8 +824,29 @@ arch_initcall(customize_machine); > >> > > >> > static int __init init_machine_late(void) > >> > { > >> > +#ifdef CONFIG_OF > >> > + struct device_node *root; > >> > + int ret; > >> > +#endif > >> > + > >> > if (machine_desc->init_late) > >> > machine_desc->init_late(); > >> > + > >> > +#ifdef CONFIG_OF > >> > >> These ifdefs should not be necessary, but please double check. > > > > Well, of_property_read_string is only defined when CONFIG_OF is set > > (base.c is always built in drivers/of but the directory is only included > > when CONFIG_OF is set). > > Look at include/linux/of.h. There are an empty versions of both functions. Oh, you're right, I didn't know it was the case. I'll submit another version with those changes then! > > Of course, on ARM, we now expect that it is the case, but it seems like > > good practice to check for it, since it could theoretically be disabled. > > We still (and will continue to) have non-OF platforms. > > > This is also being done a few lines above in customize_machine. > > True, but that doesn't mean we want more. Ack. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: This is a digitally signed message part URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150427/75f88604/attachment-0001.sig> ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v3 2/2] arch: arm: Show the serial number from devicetree in cpuinfo 2015-04-27 14:42 ` Paul Kocialkowski 2015-04-27 15:20 ` Rob Herring @ 2015-04-28 16:09 ` Russell King - ARM Linux 2015-05-02 15:46 ` Paul Kocialkowski 1 sibling, 1 reply; 11+ messages in thread From: Russell King - ARM Linux @ 2015-04-28 16:09 UTC (permalink / raw) To: linux-arm-kernel On Mon, Apr 27, 2015 at 04:42:27PM +0200, Paul Kocialkowski wrote: > Well, of_property_read_string is only defined when CONFIG_OF is set > (base.c is always built in drivers/of but the directory is only included > when CONFIG_OF is set). > > Of course, on ARM, we now expect that it is the case, but it seems like > good practice to check for it, since it could theoretically be disabled. That is _not_ "is the case" - there are a number of non-OF platforms... including some which will probably never be converted. -- FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up according to speedtest.net. ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v3 2/2] arch: arm: Show the serial number from devicetree in cpuinfo 2015-04-28 16:09 ` Russell King - ARM Linux @ 2015-05-02 15:46 ` Paul Kocialkowski 2015-05-06 9:01 ` Russell King - ARM Linux 0 siblings, 1 reply; 11+ messages in thread From: Paul Kocialkowski @ 2015-05-02 15:46 UTC (permalink / raw) To: linux-arm-kernel Le mardi 28 avril 2015 ? 17:09 +0100, Russell King - ARM Linux a ?crit : > On Mon, Apr 27, 2015 at 04:42:27PM +0200, Paul Kocialkowski wrote: > > Well, of_property_read_string is only defined when CONFIG_OF is set > > (base.c is always built in drivers/of but the directory is only included > > when CONFIG_OF is set). > > > > Of course, on ARM, we now expect that it is the case, but it seems like > > good practice to check for it, since it could theoretically be disabled. > > That is _not_ "is the case" - there are a number of non-OF platforms... > including some which will probably never be converted. Right, so I think v4 should be fine too, given the empty functions in case CONFIG_OF is not set. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: This is a digitally signed message part URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150502/487217c6/attachment.sig> ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v3 2/2] arch: arm: Show the serial number from devicetree in cpuinfo 2015-05-02 15:46 ` Paul Kocialkowski @ 2015-05-06 9:01 ` Russell King - ARM Linux 2015-05-06 9:37 ` Paul Kocialkowski 0 siblings, 1 reply; 11+ messages in thread From: Russell King - ARM Linux @ 2015-05-06 9:01 UTC (permalink / raw) To: linux-arm-kernel On Sat, May 02, 2015 at 05:46:22PM +0200, Paul Kocialkowski wrote: > Le mardi 28 avril 2015 ? 17:09 +0100, Russell King - ARM Linux a ?crit : > > On Mon, Apr 27, 2015 at 04:42:27PM +0200, Paul Kocialkowski wrote: > > > Well, of_property_read_string is only defined when CONFIG_OF is set > > > (base.c is always built in drivers/of but the directory is only included > > > when CONFIG_OF is set). > > > > > > Of course, on ARM, we now expect that it is the case, but it seems like > > > good practice to check for it, since it could theoretically be disabled. > > > > That is _not_ "is the case" - there are a number of non-OF platforms... > > including some which will probably never be converted. > > Right, so I think v4 should be fine too, given the empty functions in > case CONFIG_OF is not set. Yes, can you please put them in my patch system so we can get this applied? Rob - does your ack apply to the v4 patch? Thanks. -- FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up according to speedtest.net. ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v3 2/2] arch: arm: Show the serial number from devicetree in cpuinfo 2015-05-06 9:01 ` Russell King - ARM Linux @ 2015-05-06 9:37 ` Paul Kocialkowski 0 siblings, 0 replies; 11+ messages in thread From: Paul Kocialkowski @ 2015-05-06 9:37 UTC (permalink / raw) To: linux-arm-kernel Le mercredi 06 mai 2015 ? 10:01 +0100, Russell King - ARM Linux a ?crit : > On Sat, May 02, 2015 at 05:46:22PM +0200, Paul Kocialkowski wrote: > > Le mardi 28 avril 2015 ? 17:09 +0100, Russell King - ARM Linux a ?crit : > > > On Mon, Apr 27, 2015 at 04:42:27PM +0200, Paul Kocialkowski wrote: > > > > Well, of_property_read_string is only defined when CONFIG_OF is set > > > > (base.c is always built in drivers/of but the directory is only included > > > > when CONFIG_OF is set). > > > > > > > > Of course, on ARM, we now expect that it is the case, but it seems like > > > > good practice to check for it, since it could theoretically be disabled. > > > > > > That is _not_ "is the case" - there are a number of non-OF platforms... > > > including some which will probably never be converted. > > > > Right, so I think v4 should be fine too, given the empty functions in > > case CONFIG_OF is not set. > > Yes, can you please put them in my patch system so we can get this > applied? What exactly do you mean? I sent v4 to linux-arm-kernel at lists.infradead.org and devicetree at vger.kernel.org with you and Rob in the CC list, on the 28th of April. > Rob - does your ack apply to the v4 patch? > > Thanks. > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: This is a digitally signed message part URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150506/d301340a/attachment-0001.sig> ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2015-05-06 9:37 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-04-18 9:58 [PATCH v3 1/2] Documentation: devicetree: root node serial-number property documentation Paul Kocialkowski 2015-04-18 9:58 ` [PATCH v3 2/2] arch: arm: Show the serial number from devicetree in cpuinfo Paul Kocialkowski 2015-04-27 8:27 ` Paul Kocialkowski 2015-04-27 13:48 ` Rob Herring 2015-04-27 14:42 ` Paul Kocialkowski 2015-04-27 15:20 ` Rob Herring 2015-04-27 18:45 ` Paul Kocialkowski 2015-04-28 16:09 ` Russell King - ARM Linux 2015-05-02 15:46 ` Paul Kocialkowski 2015-05-06 9:01 ` Russell King - ARM Linux 2015-05-06 9:37 ` Paul Kocialkowski
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).