Re: [PATCH] mtd: cmdlinepart: use cmdline partition parser lib

2013-10-25 Thread Ezequiel Garcia
Hi,

On Fri, Oct 25, 2013 at 11:52:14AM +, Caizhiyong wrote:
> > 
> > I'd like to review the patch in detail and test it, but being a bit old,
> > the patch doesn't apply as it is on v3.12-rc5. Care to resend an update?
> >
>   I have sent you a 2 patch base on v3.12-rc6. Are there any problems? I 
> tested it for a long time and found no problems.
> 

I haven't had time to look at that yet, thanks for re-sending them!

If you already did testing using those, then I think we would all appreciate
that you post the results.

In particular, we're interested in **seeing** this change parses correctly
all possible combinations of partitions configured by the 'mtdparts' parameter.

This is a big change you're proposing and we need to be sure there won't
be any users experiencing any unexpected result while using 'mtdparts'.
-- 
Ezequiel García, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH] mtd: cmdlinepart: use cmdline partition parser lib

2013-10-25 Thread Caizhiyong
> 
> I'd like to review the patch in detail and test it, but being a bit old,
> the patch doesn't apply as it is on v3.12-rc5. Care to resend an update?
>
  I have sent you a 2 patch base on v3.12-rc6. Are there any problems? I tested 
it for a long time and found no problems.

  Are there any plans for supporting synchronous NAND in the future?

 
> Brian: I saw you want to move forward with this. I guess we can give
> it a test, and if all the possible 'mtdparts' use cases work, then
> we shouldn't object the cleanup, right?
> --
> Ezequiel García, Free Electrons
> Embedded Linux, Kernel and Android Engineering
> http://free-electrons.com


RE: [PATCH] mtd: cmdlinepart: use cmdline partition parser lib

2013-10-25 Thread Caizhiyong
 
 I'd like to review the patch in detail and test it, but being a bit old,
 the patch doesn't apply as it is on v3.12-rc5. Care to resend an update?

  I have sent you a 2 patch base on v3.12-rc6. Are there any problems? I tested 
it for a long time and found no problems.

  Are there any plans for supporting synchronous NAND in the future?

 
 Brian: I saw you want to move forward with this. I guess we can give
 it a test, and if all the possible 'mtdparts' use cases work, then
 we shouldn't object the cleanup, right?
 --
 Ezequiel García, Free Electrons
 Embedded Linux, Kernel and Android Engineering
 http://free-electrons.com


Re: [PATCH] mtd: cmdlinepart: use cmdline partition parser lib

2013-10-25 Thread Ezequiel Garcia
Hi,

On Fri, Oct 25, 2013 at 11:52:14AM +, Caizhiyong wrote:
  
  I'd like to review the patch in detail and test it, but being a bit old,
  the patch doesn't apply as it is on v3.12-rc5. Care to resend an update?
 
   I have sent you a 2 patch base on v3.12-rc6. Are there any problems? I 
 tested it for a long time and found no problems.
 

I haven't had time to look at that yet, thanks for re-sending them!

If you already did testing using those, then I think we would all appreciate
that you post the results.

In particular, we're interested in **seeing** this change parses correctly
all possible combinations of partitions configured by the 'mtdparts' parameter.

This is a big change you're proposing and we need to be sure there won't
be any users experiencing any unexpected result while using 'mtdparts'.
-- 
Ezequiel García, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] mtd: cmdlinepart: use cmdline partition parser lib

2013-10-20 Thread Ezequiel Garcia
Hi Cai,

Sorry for the late review. See below some minor comments.

On Thu, Aug 15, 2013 at 11:19:36AM +, Caizhiyong wrote:
> From: Cai Zhiyong 
> 
> MTD cmdline partition use cmdline partition parser lib
> 
> reference: https://lkml.org/lkml/2013/8/6/550
> 

How about some more verbose commit message explaining the impact
of this change, or clearly stating there's no functionality change
(as it should given the mtdparts parameter _must_ be kept compatible).

> Signed-off-by: Cai ZhiYong 
> ---
>  Documentation/block/cmdline-partition.txt |  93 +---
>  block/cmdline-parser.c|  16 +-
>  drivers/mtd/Kconfig   |   1 +
>  drivers/mtd/cmdlinepart.c | 361 
> --
>  include/linux/cmdline-parser.h|   8 +-
>  5 files changed, 111 insertions(+), 368 deletions(-)
> 

This a nice diffstat, nice job!

> diff --git a/Documentation/block/cmdline-partition.txt 
> b/Documentation/block/cmdline-partition.txt
> index 651863d..adc5f7a 100644
> --- a/Documentation/block/cmdline-partition.txt
> +++ b/Documentation/block/cmdline-partition.txt
> @@ -1,40 +1,59 @@
>  Embedded device command line partition
> -=
> -
> -Read block device partition table from command line.
> -The partition used for fixed block device (eMMC) embedded device.
> -It is no MBR, save storage space. Bootloader can be easily accessed
> -by absolute address of data on the block device.
> -Users can easily change the partition.
> -
> -The format for the command line is just like mtdparts:
> -
> -blkdevparts=[;]
> +Authors: Cai Zhiyong 
> +
> +The format for the command line is as follows,
> +it is used by MTD device (reference drivers/mtd/cmdlinepart.c) and
> +block device (reference block/partitions/cmdline.c)
> +
> +
> +For MTD device:
> +  mtdparts=[; +:= :[,]
> +   := [@][][ro][lk]
> +:= unique name used in mapping driver/device (mtd->name)
> +  := standard linux memsize OR "-" to denote all remaining space
> +   size is automatically truncated at end of device
> +   if specified or trucated size is 0 the part is skipped
> +:= standard linux memsize
> +   if omitted the part will immediately follow the previous part
> +   or 0 if the first part
> +  := '(' NAME ')'
> +   NAME will appear in /proc/mtd
> +
> +   and  can be specified such that the parts are out of order
> +  in physical memory and may even overlap.
> +
> +  The parts are assigned MTD numbers in the order they are specified in the
> +  command line regardless of their order in physical memory.
> +
> +  Examples:
> +
> +  1 NOR Flash, with 1 single writable partition:
> +  edb7312-nor:-
> +
> +  1 NOR Flash with 2 partitions, 1 NAND with one
> +  edb7312-nor:256k(ARMboot)ro,-(root);edb7312-nand:-(home)
> +
> +
> +For block device:
> +  blkdevparts=[;]
> := :[,]
> - := [@](part-name)
> -
> -
> -block device disk name, embedded device used fixed block device,
> -it's disk name also fixed. such as: mmcblk0, mmcblk1, mmcblk0boot0.
> -
> -
> -partition size, in bytes, such as: 512, 1m, 1G.
> -
> -
> -partition start address, in bytes.
> -
> -(part-name)
> -partition name, kernel send uevent with "PARTNAME". application can 
> create
> -a link to block device partition with the name "PARTNAME".
> -user space application can access partition by partition name.
> -
> -Example:
> -eMMC disk name is "mmcblk0" and "mmcblk0boot0"
> -
> -  bootargs:
> +   := [@][]
> +  
> +   block device disk name, embedded device used fixed block device,
> +   it's disk name also fixed. such as: mmcblk0, mmcblk1, mmcblk0boot0.
> +  := standard linux memsize OR "-" to denote all remaining space
> +   size is automatically truncated at end of device
> +   if specified or trucated size is 0 the part is skipped
> +:= standard linux memsize
> +   if omitted the part will immediately follow the previous part
> +   or 0 if the first part
> +  := '(' NAME ')'
> +partition name, kernel send uevent with "PARTNAME". application could
> +create a link to block device partition with the name "PARTNAME".
> +user space application can access partition by partition name.
> +
> +  Example:
> +
> +eMMC disk name is "mmcblk0" and "mmcblk0boot0", bootargs:
>  
> 'blkdevparts=mmcblk0:1G(data0),1G(data1),-;mmcblk0boot0:1m(boot),-(kernel)'
> -
> -  dmesg:
> -mmcblk0: p1(data0) p2(data1) p3()
> -mmcblk0boot0: p1(boot) p2(kernel)
> -
> diff --git a/block/cmdline-parser.c b/block/cmdline-parser.c
> index 18fb435..8c09db3 100644
> --- a/block/cmdline-parser.c
> +++ b/block/cmdline-parser.c
> @@ 

Re: [PATCH] mtd: cmdlinepart: use cmdline partition parser lib

2013-10-20 Thread Ezequiel Garcia
Hi Cai,

Sorry for the late review. See below some minor comments.

On Thu, Aug 15, 2013 at 11:19:36AM +, Caizhiyong wrote:
 From: Cai Zhiyong caizhiy...@huawei.com
 
 MTD cmdline partition use cmdline partition parser lib
 
 reference: https://lkml.org/lkml/2013/8/6/550
 

How about some more verbose commit message explaining the impact
of this change, or clearly stating there's no functionality change
(as it should given the mtdparts parameter _must_ be kept compatible).

 Signed-off-by: Cai ZhiYong caizhiy...@huawei.com
 ---
  Documentation/block/cmdline-partition.txt |  93 +---
  block/cmdline-parser.c|  16 +-
  drivers/mtd/Kconfig   |   1 +
  drivers/mtd/cmdlinepart.c | 361 
 --
  include/linux/cmdline-parser.h|   8 +-
  5 files changed, 111 insertions(+), 368 deletions(-)
 

This a nice diffstat, nice job!

 diff --git a/Documentation/block/cmdline-partition.txt 
 b/Documentation/block/cmdline-partition.txt
 index 651863d..adc5f7a 100644
 --- a/Documentation/block/cmdline-partition.txt
 +++ b/Documentation/block/cmdline-partition.txt
 @@ -1,40 +1,59 @@
  Embedded device command line partition
 -=
 -
 -Read block device partition table from command line.
 -The partition used for fixed block device (eMMC) embedded device.
 -It is no MBR, save storage space. Bootloader can be easily accessed
 -by absolute address of data on the block device.
 -Users can easily change the partition.
 -
 -The format for the command line is just like mtdparts:
 -
 -blkdevparts=blkdev-def[;blkdev-def]
 +Authors: Cai Zhiyong caizhiy...@huawei.com
 +
 +The format for the command line is as follows,
 +it is used by MTD device (reference drivers/mtd/cmdlinepart.c) and
 +block device (reference block/partitions/cmdline.c)
 +
 +
 +For MTD device:
 +  mtdparts=mtddef[;mtddef]
 +  mtddef  := mtd-id:partdef[,partdef]
 +  partdef := size[@offset][name][ro][lk]
 +  mtd-id  := unique name used in mapping driver/device (mtd-name)
 +  size:= standard linux memsize OR - to denote all remaining space
 +   size is automatically truncated at end of device
 +   if specified or trucated size is 0 the part is skipped
 +  offset  := standard linux memsize
 +   if omitted the part will immediately follow the previous part
 +   or 0 if the first part
 +  name:= '(' NAME ')'
 +   NAME will appear in /proc/mtd
 +
 +  size and offset can be specified such that the parts are out of order
 +  in physical memory and may even overlap.
 +
 +  The parts are assigned MTD numbers in the order they are specified in the
 +  command line regardless of their order in physical memory.
 +
 +  Examples:
 +
 +  1 NOR Flash, with 1 single writable partition:
 +  edb7312-nor:-
 +
 +  1 NOR Flash with 2 partitions, 1 NAND with one
 +  edb7312-nor:256k(ARMboot)ro,-(root);edb7312-nand:-(home)
 +
 +
 +For block device:
 +  blkdevparts=blkdev-def[;blkdev-def]
blkdev-def := blkdev-id:partdef[,partdef]
 -partdef := size[@offset](part-name)
 -
 -blkdev-id
 -block device disk name, embedded device used fixed block device,
 -it's disk name also fixed. such as: mmcblk0, mmcblk1, mmcblk0boot0.
 -
 -size
 -partition size, in bytes, such as: 512, 1m, 1G.
 -
 -offset
 -partition start address, in bytes.
 -
 -(part-name)
 -partition name, kernel send uevent with PARTNAME. application can 
 create
 -a link to block device partition with the name PARTNAME.
 -user space application can access partition by partition name.
 -
 -Example:
 -eMMC disk name is mmcblk0 and mmcblk0boot0
 -
 -  bootargs:
 +  partdef := size[@offset][name]
 +  blkdev-id
 +   block device disk name, embedded device used fixed block device,
 +   it's disk name also fixed. such as: mmcblk0, mmcblk1, mmcblk0boot0.
 +  size:= standard linux memsize OR - to denote all remaining space
 +   size is automatically truncated at end of device
 +   if specified or trucated size is 0 the part is skipped
 +  offset  := standard linux memsize
 +   if omitted the part will immediately follow the previous part
 +   or 0 if the first part
 +  name:= '(' NAME ')'
 +partition name, kernel send uevent with PARTNAME. application could
 +create a link to block device partition with the name PARTNAME.
 +user space application can access partition by partition name.
 +
 +  Example:
 +
 +eMMC disk name is mmcblk0 and mmcblk0boot0, bootargs:
  
 'blkdevparts=mmcblk0:1G(data0),1G(data1),-;mmcblk0boot0:1m(boot),-(kernel)'
 -
 -  dmesg:
 -mmcblk0: p1(data0) p2(data1) p3()
 -mmcblk0boot0: p1(boot) p2(kernel)