All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/6] UBI: add max_beb_per1024 parameter / ioctl
@ 2012-08-20 16:00 Richard Genoud
  2012-08-20 16:00 ` [PATCH v3 1/6] UBI: prepare for max_beb_per1024 module parameter addition Richard Genoud
                   ` (6 more replies)
  0 siblings, 7 replies; 35+ messages in thread
From: Richard Genoud @ 2012-08-20 16:00 UTC (permalink / raw)
  To: Artem Bityutskiy; +Cc: Richard Genoud, linux-mtd, Shmulik Ladkani

This patch serie introduce, step by step the kernel module parameter
max_beb_per1024, then the ioctl and finally drop the kernel config option
CONFIG_MTD_UBI_BEB_LIMIT.

It's based on top of linux-ubi/master (4ebb4b5)

Changelog:
V2..V3:
* Suppress the possibility to have an empty string for vid_hdr_offs and
max_beb_per1024 and change the module info accordingly.
* add the Reviewed-by of Shmulik on the 1st patch.

V1..V2:
* The upper bound of max_beb_per1024 is checked and set to 768
* The vid_hdr_offs parameter can now be an empty string in order to have a
kernel parameter like that: mtd.ubi=2,,25
* The max_beb_per1024 parameter can also be empty (just for consistency with
vid_hdr_offs)
* The comment in ubi-user.h has been adjusted with the new range 0-768 and
the term "default kernel value" is used in place of MTD_UBI_DEFAULT_BEB_LIMIT
or CONFIG_MTD_UBI_BEB_LIMIT
* As max_beb_per1024 can be safely null, the config range of MTD_UBI_BEB_LIMIT
has been updates to 0..768
* For the ioctl, max_beb_per1024 is now an __u16, so that we are not limited
to 255 anymore.
* The comment on the default value of max_beb_per1024 has been adjusted before
and after the ioctl patch.

Best Regards

Richard.


Richard Genoud (6):
  UBI: prepare for max_beb_per1024 module parameter addition
  UBI: change CONFIG_MTD_UBI_BEB_LIMIT range
  UBI: check max_beb_per1024 value in ubi_attach_mtd_dev
  UBI: replace MTD_UBI_BEB_LIMIT with module parameter
  UBI: add ioctl for max_beb_per1024
  UBI: drop CONFIG_MTD_UBI_BEB_LIMIT

 arch/arm/configs/sam9_l9260_defconfig |    1 -
 drivers/mtd/ubi/Kconfig               |   26 --------------
 drivers/mtd/ubi/build.c               |   62 +++++++++++++++++++++++---------
 drivers/mtd/ubi/cdev.c                |    3 +-
 drivers/mtd/ubi/ubi.h                 |    6 +++-
 include/mtd/ubi-user.h                |   19 +++++++++-
 6 files changed, 69 insertions(+), 48 deletions(-)

-- 
1.7.2.5

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH v3 1/6] UBI: prepare for max_beb_per1024 module parameter addition
  2012-08-20 16:00 [PATCH v3 0/6] UBI: add max_beb_per1024 parameter / ioctl Richard Genoud
@ 2012-08-20 16:00 ` Richard Genoud
  2012-08-20 19:01   ` Artem Bityutskiy
  2012-08-20 16:00 ` [PATCH v3 2/6] UBI: change CONFIG_MTD_UBI_BEB_LIMIT range Richard Genoud
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 35+ messages in thread
From: Richard Genoud @ 2012-08-20 16:00 UTC (permalink / raw)
  To: Artem Bityutskiy; +Cc: Richard Genoud, linux-mtd, Shmulik Ladkani

This patch prepare the way for the addition of max_beb_per1024 module
parameter.
There's no functional change.

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Reviewed-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
---
 drivers/mtd/ubi/build.c |   14 ++++++++------
 drivers/mtd/ubi/cdev.c  |    3 ++-
 drivers/mtd/ubi/ubi.h   |    3 ++-
 3 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index 4385aaa..3c0b91f 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -602,6 +602,7 @@ static int get_bad_peb_limit(const struct ubi_device *ubi, int max_beb_per1024)
 /**
  * io_init - initialize I/O sub-system for a given UBI device.
  * @ubi: UBI device description object
+ * @max_beb_per1024: maximum expected number of bad PEB per 1024 PEB
  *
  * If @ubi->vid_hdr_offset or @ubi->leb_start is zero, default offsets are
  * assumed:
@@ -614,10 +615,8 @@ static int get_bad_peb_limit(const struct ubi_device *ubi, int max_beb_per1024)
  * This function returns zero in case of success and a negative error code in
  * case of failure.
  */
-static int io_init(struct ubi_device *ubi)
+static int io_init(struct ubi_device *ubi, int max_beb_per1024)
 {
-	const int max_beb_per1024 = CONFIG_MTD_UBI_BEB_LIMIT;
-
 	if (ubi->mtd->numeraseregions != 0) {
 		/*
 		 * Some flashes have several erase regions. Different regions
@@ -839,6 +838,7 @@ static int autoresize(struct ubi_device *ubi, int vol_id)
  * @mtd: MTD device description object
  * @ubi_num: number to assign to the new UBI device
  * @vid_hdr_offset: VID header offset
+ * @max_beb_per1024: maximum number of expected bad blocks per 1024 eraseblocks
  *
  * This function attaches MTD device @mtd_dev to UBI and assign @ubi_num number
  * to the newly created UBI device, unless @ubi_num is %UBI_DEV_NUM_AUTO, in
@@ -849,7 +849,8 @@ static int autoresize(struct ubi_device *ubi, int vol_id)
  * Note, the invocations of this function has to be serialized by the
  * @ubi_devices_mutex.
  */
-int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num, int vid_hdr_offset)
+int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,
+		       int vid_hdr_offset, int max_beb_per1024)
 {
 	struct ubi_device *ubi;
 	int i, err, ref = 0;
@@ -922,7 +923,7 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num, int vid_hdr_offset)
 	dbg_msg("sizeof(struct ubi_ainf_peb) %zu", sizeof(struct ubi_ainf_peb));
 	dbg_msg("sizeof(struct ubi_wl_entry) %zu", sizeof(struct ubi_wl_entry));
 
-	err = io_init(ubi);
+	err = io_init(ubi, max_beb_per1024);
 	if (err)
 		goto out_free;
 
@@ -1211,7 +1212,8 @@ static int __init ubi_init(void)
 
 		mutex_lock(&ubi_devices_mutex);
 		err = ubi_attach_mtd_dev(mtd, UBI_DEV_NUM_AUTO,
-					 p->vid_hdr_offs);
+					 p->vid_hdr_offs,
+					 CONFIG_MTD_UBI_BEB_LIMIT);
 		mutex_unlock(&ubi_devices_mutex);
 		if (err < 0) {
 			ubi_err("cannot attach mtd%d", mtd->index);
diff --git a/drivers/mtd/ubi/cdev.c b/drivers/mtd/ubi/cdev.c
index fb55678..619f914 100644
--- a/drivers/mtd/ubi/cdev.c
+++ b/drivers/mtd/ubi/cdev.c
@@ -1010,7 +1010,8 @@ static long ctrl_cdev_ioctl(struct file *file, unsigned int cmd,
 		 * 'ubi_attach_mtd_dev()'.
 		 */
 		mutex_lock(&ubi_devices_mutex);
-		err = ubi_attach_mtd_dev(mtd, req.ubi_num, req.vid_hdr_offset);
+		err = ubi_attach_mtd_dev(mtd, req.ubi_num, req.vid_hdr_offset,
+					 CONFIG_MTD_UBI_BEB_LIMIT);
 		mutex_unlock(&ubi_devices_mutex);
 		if (err < 0)
 			put_mtd_device(mtd);
diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h
index c94612e..2a2475b 100644
--- a/drivers/mtd/ubi/ubi.h
+++ b/drivers/mtd/ubi/ubi.h
@@ -693,7 +693,8 @@ int ubi_io_write_vid_hdr(struct ubi_device *ubi, int pnum,
 			 struct ubi_vid_hdr *vid_hdr);
 
 /* build.c */
-int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num, int vid_hdr_offset);
+int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,
+		       int vid_hdr_offset, int max_beb_per1024);
 int ubi_detach_mtd_dev(int ubi_num, int anyway);
 struct ubi_device *ubi_get_device(int ubi_num);
 void ubi_put_device(struct ubi_device *ubi);
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH v3 2/6] UBI: change CONFIG_MTD_UBI_BEB_LIMIT range
  2012-08-20 16:00 [PATCH v3 0/6] UBI: add max_beb_per1024 parameter / ioctl Richard Genoud
  2012-08-20 16:00 ` [PATCH v3 1/6] UBI: prepare for max_beb_per1024 module parameter addition Richard Genoud
@ 2012-08-20 16:00 ` Richard Genoud
  2012-08-20 19:03   ` Artem Bityutskiy
  2012-08-20 16:00 ` [PATCH v3 3/6] UBI: check max_beb_per1024 value in ubi_attach_mtd_dev Richard Genoud
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 35+ messages in thread
From: Richard Genoud @ 2012-08-20 16:00 UTC (permalink / raw)
  To: Artem Bityutskiy; +Cc: Richard Genoud, linux-mtd, Shmulik Ladkani

There's no reason to limit MTD_UBI_BEB_LIMIT to 256 (25%), let's set it
to 768 (75%) this should be enough.
And the lower bound can be 0, no reason to forbid it (even if it will be
reserved for test purpose only I guess).

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
---
 drivers/mtd/ubi/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/ubi/Kconfig b/drivers/mtd/ubi/Kconfig
index 9ee92d6..dcbaae3 100644
--- a/drivers/mtd/ubi/Kconfig
+++ b/drivers/mtd/ubi/Kconfig
@@ -30,7 +30,7 @@ config MTD_UBI_WL_THRESHOLD
 config MTD_UBI_BEB_LIMIT
 	int "Maximum expected bad eraseblock count per 1024 eraseblocks"
 	default 20
-	range 1 256
+	range 0 768
 	help
 	  This option specifies the maximum bad physical eraseblocks UBI
 	  expects on the MTD device (per 1024 eraseblocks). If the underlying
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH v3 3/6] UBI: check max_beb_per1024 value in ubi_attach_mtd_dev
  2012-08-20 16:00 [PATCH v3 0/6] UBI: add max_beb_per1024 parameter / ioctl Richard Genoud
  2012-08-20 16:00 ` [PATCH v3 1/6] UBI: prepare for max_beb_per1024 module parameter addition Richard Genoud
  2012-08-20 16:00 ` [PATCH v3 2/6] UBI: change CONFIG_MTD_UBI_BEB_LIMIT range Richard Genoud
@ 2012-08-20 16:00 ` Richard Genoud
  2012-08-20 19:19   ` Artem Bityutskiy
  2012-08-20 16:00 ` [PATCH v3 4/6] UBI: replace MTD_UBI_BEB_LIMIT with module parameter Richard Genoud
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 35+ messages in thread
From: Richard Genoud @ 2012-08-20 16:00 UTC (permalink / raw)
  To: Artem Bityutskiy; +Cc: Richard Genoud, linux-mtd, Shmulik Ladkani

max_beb_per1024 shouldn't be negative, and a 0 value will be treated as
the default value.
For the upper bound, 768/1024 should be enough.

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
---
 drivers/mtd/ubi/build.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index 3c0b91f..6a749d6 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -49,6 +49,9 @@
 /* Maximum number of comma-separated items in the 'mtd=' parameter */
 #define MTD_PARAM_MAX_COUNT 2
 
+/* Maximum value for the number of bad eraseblocks per 1024 limit */
+#define MAX_MTD_UBI_BEB_LIMIT 768
+
 #ifdef CONFIG_MTD_UBI_MODULE
 #define ubi_is_module() 1
 #else
@@ -855,6 +858,15 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,
 	struct ubi_device *ubi;
 	int i, err, ref = 0;
 
+	if ((max_beb_per1024 < 0) || (max_beb_per1024 > MAX_MTD_UBI_BEB_LIMIT))
+		return -EINVAL;
+
+	/*
+	 * Use the default value if max_beb_per1024 isn't provided.
+	 */
+	if (!max_beb_per1024)
+		max_beb_per1024 = CONFIG_MTD_UBI_BEB_LIMIT;
+
 	/*
 	 * Check if we already have the same MTD device attached.
 	 *
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH v3 4/6] UBI: replace MTD_UBI_BEB_LIMIT with module parameter
  2012-08-20 16:00 [PATCH v3 0/6] UBI: add max_beb_per1024 parameter / ioctl Richard Genoud
                   ` (2 preceding siblings ...)
  2012-08-20 16:00 ` [PATCH v3 3/6] UBI: check max_beb_per1024 value in ubi_attach_mtd_dev Richard Genoud
@ 2012-08-20 16:00 ` Richard Genoud
  2012-08-21 13:54   ` Artem Bityutskiy
  2012-08-20 16:00 ` [PATCH v3 5/6] UBI: add ioctl for max_beb_per1024 Richard Genoud
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 35+ messages in thread
From: Richard Genoud @ 2012-08-20 16:00 UTC (permalink / raw)
  To: Artem Bityutskiy; +Cc: Richard Genoud, linux-mtd, Shmulik Ladkani

This patch provides the possibility to adjust the "maximum expected number of
bad blocks per 1024 blocks" (max_beb_per1024) for each mtd device.

The majority of NAND devices have their max_beb_per1024 equal to 20, but
sometimes it's more.
Now, we can adjust that via a kernel parameter:
ubi.mtd=<name|num|path>[,<vid_hdr_offs>[,max_beb_per1024]]

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
---
 drivers/mtd/ubi/Kconfig |    2 ++
 drivers/mtd/ubi/build.c |   38 ++++++++++++++++++++++++--------------
 2 files changed, 26 insertions(+), 14 deletions(-)

diff --git a/drivers/mtd/ubi/Kconfig b/drivers/mtd/ubi/Kconfig
index dcbaae3..37e070c 100644
--- a/drivers/mtd/ubi/Kconfig
+++ b/drivers/mtd/ubi/Kconfig
@@ -51,6 +51,8 @@ config MTD_UBI_BEB_LIMIT
 	  MTD partitions of the same size, UBI will reserve 40 eraseblocks when
 	  attaching a partition.
 
+	  This option can be overridden by the kernel parameter ubi.mtd.
+
 	  Leave the default value if unsure.
 
 config MTD_UBI_GLUEBI
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index 6a749d6..5b987cb 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -47,7 +47,7 @@
 #define MTD_PARAM_LEN_MAX 64
 
 /* Maximum number of comma-separated items in the 'mtd=' parameter */
-#define MTD_PARAM_MAX_COUNT 2
+#define MTD_PARAM_MAX_COUNT 3
 
 /* Maximum value for the number of bad eraseblocks per 1024 limit */
 #define MAX_MTD_UBI_BEB_LIMIT 768
@@ -63,10 +63,12 @@
  * @name: MTD character device node path, MTD device name, or MTD device number
  *        string
  * @vid_hdr_offs: VID header offset
+ * @max_beb_per1024: maximum expected number of bad blocks per 1024 erase blocks
  */
 struct mtd_dev_param {
 	char name[MTD_PARAM_LEN_MAX];
 	int vid_hdr_offs;
+	int max_beb_per1024;
 };
 
 /* Numbers of elements set in the @mtd_dev_param array */
@@ -1224,8 +1226,7 @@ static int __init ubi_init(void)
 
 		mutex_lock(&ubi_devices_mutex);
 		err = ubi_attach_mtd_dev(mtd, UBI_DEV_NUM_AUTO,
-					 p->vid_hdr_offs,
-					 CONFIG_MTD_UBI_BEB_LIMIT);
+					 p->vid_hdr_offs, p->max_beb_per1024);
 		mutex_unlock(&ubi_devices_mutex);
 		if (err < 0) {
 			ubi_err("cannot attach mtd%d", mtd->index);
@@ -1345,6 +1346,7 @@ static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp)
 	char buf[MTD_PARAM_LEN_MAX];
 	char *pbuf = &buf[0];
 	char *tokens[MTD_PARAM_MAX_COUNT];
+	int err;
 
 	if (!val)
 		return -EINVAL;
@@ -1392,23 +1394,31 @@ static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp)
 	if (p->vid_hdr_offs < 0)
 		return p->vid_hdr_offs;
 
+	if (tokens[2]) {
+		err = kstrtoint(tokens[2], 10, &p->max_beb_per1024);
+		if (err) {
+			pr_err("UBI error: bad value for max_beb_per1024 parameter: %s",
+			       tokens[2]);
+			return -EINVAL;
+		}
+	}
+
 	mtd_devs += 1;
 	return 0;
 }
 
 module_param_call(mtd, ubi_mtd_param_parse, NULL, NULL, 000);
-MODULE_PARM_DESC(mtd, "MTD devices to attach. Parameter format: "
-		      "mtd=<name|num|path>[,<vid_hdr_offs>].\n"
+MODULE_PARM_DESC(mtd, "MTD devices to attach. Parameter format: mtd=<name|num|path>[,<vid_hdr_offs>[,max_beb_per1024]].\n"
 		      "Multiple \"mtd\" parameters may be specified.\n"
-		      "MTD devices may be specified by their number, name, or "
-		      "path to the MTD character device node.\n"
-		      "Optional \"vid_hdr_offs\" parameter specifies UBI VID "
-		      "header position to be used by UBI.\n"
-		      "Example 1: mtd=/dev/mtd0 - attach MTD device "
-		      "/dev/mtd0.\n"
-		      "Example 2: mtd=content,1984 mtd=4 - attach MTD device "
-		      "with name \"content\" using VID header offset 1984, and "
-		      "MTD device number 4 with default VID header offset.");
+		      "MTD devices may be specified by their number, name, or path to the MTD character device node.\n"
+		      "Optional \"vid_hdr_offs\" parameter specifies UBI VID header position to be used by UBI. (default value if 0)\n"
+		      "Optional \"max_beb_per1024\" parameter specifies the maximum expected bad eraseblock per 1024 eraseblocks. (default value ("
+		      __stringify(CONFIG_MTD_UBI_BEB_LIMIT) ") if 0)\n"
+		      "\n"
+		      "Example 1: mtd=/dev/mtd0 - attach MTD device /dev/mtd0.\n"
+		      "Example 2: mtd=content,1984 mtd=4 - attach MTD device with name \"content\" using VID header offset 1984, and MTD device number 4 with default VID header offset.\n"
+		      "Example 3: mtd=/dev/mtd1,0,25 - attach MTD device /dev/mtd1 using default VID header offset and reserve 25*nand_size_in_blocks/1024 erase blocks for bad block handling.\n"
+		      "\t(e.g. if the NAND *chipset* has 4096 PEB, 100 will be reserved for this UBI device).");
 
 MODULE_VERSION(__stringify(UBI_VERSION));
 MODULE_DESCRIPTION("UBI - Unsorted Block Images");
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH v3 5/6] UBI: add ioctl for max_beb_per1024
  2012-08-20 16:00 [PATCH v3 0/6] UBI: add max_beb_per1024 parameter / ioctl Richard Genoud
                   ` (3 preceding siblings ...)
  2012-08-20 16:00 ` [PATCH v3 4/6] UBI: replace MTD_UBI_BEB_LIMIT with module parameter Richard Genoud
@ 2012-08-20 16:00 ` Richard Genoud
  2012-08-21 19:34   ` Artem Bityutskiy
  2012-08-20 16:00 ` [PATCH v3 6/6] UBI: drop CONFIG_MTD_UBI_BEB_LIMIT Richard Genoud
  2012-08-23 10:10 ` [PATCH v3 0/6] UBI: add max_beb_per1024 parameter / ioctl Artem Bityutskiy
  6 siblings, 1 reply; 35+ messages in thread
From: Richard Genoud @ 2012-08-20 16:00 UTC (permalink / raw)
  To: Artem Bityutskiy; +Cc: Richard Genoud, linux-mtd, Shmulik Ladkani

This patch provides the possibility to adjust the "maximum expected number of
bad blocks per 1024 blocks" (max_beb_per1024) for each mtd device from
UBI_IOCATT ioctl.

The majority of NAND devices have their max_beb_per1024 equal to 20, but
sometimes it's more.
We already could adjust that via a kernel parameter, now we can also use
UBI_IOCATT ioctl:
struct ubi_attach_req {
	__s32 ubi_num;
	__s32 mtd_num;
	__s32 vid_hdr_offset;
	__u16 max_beb_per1024;
	__s8 padding[10];
};

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
---
 drivers/mtd/ubi/Kconfig |    3 ++-
 drivers/mtd/ubi/build.c |    2 ++
 drivers/mtd/ubi/cdev.c  |    2 +-
 include/mtd/ubi-user.h  |   19 ++++++++++++++++++-
 4 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/ubi/Kconfig b/drivers/mtd/ubi/Kconfig
index 37e070c..9406d26 100644
--- a/drivers/mtd/ubi/Kconfig
+++ b/drivers/mtd/ubi/Kconfig
@@ -51,7 +51,8 @@ config MTD_UBI_BEB_LIMIT
 	  MTD partitions of the same size, UBI will reserve 40 eraseblocks when
 	  attaching a partition.
 
-	  This option can be overridden by the kernel parameter ubi.mtd.
+	  This option can be overridden by the kernel parameter ubi.mtd and the
+	  ioctl UBI_IOCATT.
 
 	  Leave the default value if unsure.
 
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index 5b987cb..a690d86 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -865,6 +865,8 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,
 
 	/*
 	 * Use the default value if max_beb_per1024 isn't provided.
+	 * This way, we are keeping the same behaviour between the UBI_IOCATT
+	 * ioctl and the module parameter.
 	 */
 	if (!max_beb_per1024)
 		max_beb_per1024 = CONFIG_MTD_UBI_BEB_LIMIT;
diff --git a/drivers/mtd/ubi/cdev.c b/drivers/mtd/ubi/cdev.c
index 619f914..7885dc0 100644
--- a/drivers/mtd/ubi/cdev.c
+++ b/drivers/mtd/ubi/cdev.c
@@ -1011,7 +1011,7 @@ static long ctrl_cdev_ioctl(struct file *file, unsigned int cmd,
 		 */
 		mutex_lock(&ubi_devices_mutex);
 		err = ubi_attach_mtd_dev(mtd, req.ubi_num, req.vid_hdr_offset,
-					 CONFIG_MTD_UBI_BEB_LIMIT);
+					 req.max_beb_per1024);
 		mutex_unlock(&ubi_devices_mutex);
 		if (err < 0)
 			put_mtd_device(mtd);
diff --git a/include/mtd/ubi-user.h b/include/mtd/ubi-user.h
index 8787349..2a763ae 100644
--- a/include/mtd/ubi-user.h
+++ b/include/mtd/ubi-user.h
@@ -222,6 +222,7 @@ enum {
  * @ubi_num: UBI device number to create
  * @mtd_num: MTD device number to attach
  * @vid_hdr_offset: VID header offset (use defaults if %0)
+ * @max_beb_per1024: Maximum expected bad eraseblocks per 1024 eraseblocks
  * @padding: reserved for future, not used, has to be zeroed
  *
  * This data structure is used to specify MTD device UBI has to attach and the
@@ -245,12 +246,28 @@ enum {
  * be 2KiB-64 bytes = 1984. Note, that this position is not even 512-bytes
  * aligned, which is OK, as UBI is clever enough to realize this is 4th
  * sub-page of the first page and add needed padding.
+ *
+ * The @max_beb_per1024 is the maximum bad eraseblocks UBI expects on the ubi
+ * device per 1024 eraseblocks.
+ * This value is often given in an other form in the NAND datasheet (min NVB
+ * i.e. minimal number of valid blocks). The maximum expected bad eraseblocks
+ * per 1024 is then:
+ *   1024 * (1 - MinNVB / MaxNVB)
+ * Which gives 20 for most NAND devices.
+ * This limit is used in order to derive amount of eraseblock UBI reserves for
+ * handling new bad blocks.
+ * If the device has more bad eraseblocks than this limit, UBI does not reserve
+ * any physical eraseblocks for new bad eraseblocks, but attempts to use
+ * available eraseblocks (if any).
+ * The accepted range is 0-768. If 0 is given, the default kernel value will be
+ * used for compatibility.
  */
 struct ubi_attach_req {
 	__s32 ubi_num;
 	__s32 mtd_num;
 	__s32 vid_hdr_offset;
-	__s8 padding[12];
+	__u16 max_beb_per1024;
+	__s8 padding[10];
 };
 
 /**
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH v3 6/6] UBI: drop CONFIG_MTD_UBI_BEB_LIMIT
  2012-08-20 16:00 [PATCH v3 0/6] UBI: add max_beb_per1024 parameter / ioctl Richard Genoud
                   ` (4 preceding siblings ...)
  2012-08-20 16:00 ` [PATCH v3 5/6] UBI: add ioctl for max_beb_per1024 Richard Genoud
@ 2012-08-20 16:00 ` Richard Genoud
  2012-08-21 19:34   ` Artem Bityutskiy
  2012-08-23 10:10 ` [PATCH v3 0/6] UBI: add max_beb_per1024 parameter / ioctl Artem Bityutskiy
  6 siblings, 1 reply; 35+ messages in thread
From: Richard Genoud @ 2012-08-20 16:00 UTC (permalink / raw)
  To: Artem Bityutskiy; +Cc: Richard Genoud, linux-mtd, Shmulik Ladkani

This option can be set by a kernel parameter and an ioctl, so we may not
need the kernel config option any more.

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
---
 arch/arm/configs/sam9_l9260_defconfig |    1 -
 drivers/mtd/ubi/Kconfig               |   29 -----------------------------
 drivers/mtd/ubi/build.c               |    4 ++--
 drivers/mtd/ubi/ubi.h                 |    3 +++
 4 files changed, 5 insertions(+), 32 deletions(-)

diff --git a/arch/arm/configs/sam9_l9260_defconfig b/arch/arm/configs/sam9_l9260_defconfig
index b4384af..47dd71a 100644
--- a/arch/arm/configs/sam9_l9260_defconfig
+++ b/arch/arm/configs/sam9_l9260_defconfig
@@ -39,7 +39,6 @@ CONFIG_MTD_NAND=y
 CONFIG_MTD_NAND_ATMEL=y
 CONFIG_MTD_NAND_PLATFORM=y
 CONFIG_MTD_UBI=y
-CONFIG_MTD_UBI_BEB_LIMIT=25
 CONFIG_MTD_UBI_GLUEBI=y
 CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_RAM=y
diff --git a/drivers/mtd/ubi/Kconfig b/drivers/mtd/ubi/Kconfig
index 9406d26..7a57cc0 100644
--- a/drivers/mtd/ubi/Kconfig
+++ b/drivers/mtd/ubi/Kconfig
@@ -27,35 +27,6 @@ config MTD_UBI_WL_THRESHOLD
 	  life-cycle less than 10000, the threshold should be lessened (e.g.,
 	  to 128 or 256, although it does not have to be power of 2).
 
-config MTD_UBI_BEB_LIMIT
-	int "Maximum expected bad eraseblock count per 1024 eraseblocks"
-	default 20
-	range 0 768
-	help
-	  This option specifies the maximum bad physical eraseblocks UBI
-	  expects on the MTD device (per 1024 eraseblocks). If the underlying
-	  flash does not admit of bad eraseblocks (e.g. NOR flash), this value
-	  is ignored.
-
-	  NAND datasheets often specify the minimum and maximum NVM (Number of
-	  Valid Blocks) for the flashes' endurance lifetime. The maximum
-	  expected bad eraseblocks per 1024 eraseblocks then can be calculated
-	  as "1024 * (1 - MinNVB / MaxNVB)", which gives 20 for most NANDs
-	  (MaxNVB is basically the total count of eraseblocks on the chip).
-
-	  To put it differently, if this value is 20, UBI will try to reserve
-	  about 1.9% of physical eraseblocks for bad blocks handling. And that
-	  will be 1.9% of eraseblocks on the entire NAND chip, not just the MTD
-	  partition UBI attaches. This means that if you have, say, a NAND
-	  flash chip admits maximum 40 bad eraseblocks, and it is split on two
-	  MTD partitions of the same size, UBI will reserve 40 eraseblocks when
-	  attaching a partition.
-
-	  This option can be overridden by the kernel parameter ubi.mtd and the
-	  ioctl UBI_IOCATT.
-
-	  Leave the default value if unsure.
-
 config MTD_UBI_GLUEBI
 	tristate "MTD devices emulation driver (gluebi)"
 	help
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index a690d86..b0adc58 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -869,7 +869,7 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,
 	 * ioctl and the module parameter.
 	 */
 	if (!max_beb_per1024)
-		max_beb_per1024 = CONFIG_MTD_UBI_BEB_LIMIT;
+		max_beb_per1024 = MTD_UBI_DEFAULT_BEB_LIMIT;
 
 	/*
 	 * Check if we already have the same MTD device attached.
@@ -1415,7 +1415,7 @@ MODULE_PARM_DESC(mtd, "MTD devices to attach. Parameter format: mtd=<name|num|pa
 		      "MTD devices may be specified by their number, name, or path to the MTD character device node.\n"
 		      "Optional \"vid_hdr_offs\" parameter specifies UBI VID header position to be used by UBI. (default value if 0)\n"
 		      "Optional \"max_beb_per1024\" parameter specifies the maximum expected bad eraseblock per 1024 eraseblocks. (default value ("
-		      __stringify(CONFIG_MTD_UBI_BEB_LIMIT) ") if 0)\n"
+		      __stringify(MTD_UBI_DEFAULT_BEB_LIMIT) ") if 0)\n"
 		      "\n"
 		      "Example 1: mtd=/dev/mtd0 - attach MTD device /dev/mtd0.\n"
 		      "Example 2: mtd=content,1984 mtd=4 - attach MTD device with name \"content\" using VID header offset 1984, and MTD device number 4 with default VID header offset.\n"
diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h
index 2a2475b..2148f35 100644
--- a/drivers/mtd/ubi/ubi.h
+++ b/drivers/mtd/ubi/ubi.h
@@ -50,6 +50,9 @@
 /* UBI name used for character devices, sysfs, etc */
 #define UBI_NAME_STR "ubi"
 
+/* Default number of maximum expected bad blocks per 1024 eraseblocks */
+#define MTD_UBI_DEFAULT_BEB_LIMIT 20
+
 /* Normal UBI messages */
 #define ubi_msg(fmt, ...) printk(KERN_NOTICE "UBI: " fmt "\n", ##__VA_ARGS__)
 /* UBI warning messages */
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 1/6] UBI: prepare for max_beb_per1024 module parameter addition
  2012-08-20 16:00 ` [PATCH v3 1/6] UBI: prepare for max_beb_per1024 module parameter addition Richard Genoud
@ 2012-08-20 19:01   ` Artem Bityutskiy
  0 siblings, 0 replies; 35+ messages in thread
From: Artem Bityutskiy @ 2012-08-20 19:01 UTC (permalink / raw)
  To: Richard Genoud; +Cc: linux-mtd, Shmulik Ladkani

[-- Attachment #1: Type: text/plain, Size: 384 bytes --]

On Mon, 2012-08-20 at 18:00 +0200, Richard Genoud wrote:
> This patch prepare the way for the addition of max_beb_per1024 module
> parameter.
> There's no functional change.
> 
> Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
> Reviewed-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>

Pushed with a minor amendment, thanks!

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 2/6] UBI: change CONFIG_MTD_UBI_BEB_LIMIT range
  2012-08-20 16:00 ` [PATCH v3 2/6] UBI: change CONFIG_MTD_UBI_BEB_LIMIT range Richard Genoud
@ 2012-08-20 19:03   ` Artem Bityutskiy
  0 siblings, 0 replies; 35+ messages in thread
From: Artem Bityutskiy @ 2012-08-20 19:03 UTC (permalink / raw)
  To: Richard Genoud; +Cc: linux-mtd, Shmulik Ladkani

[-- Attachment #1: Type: text/plain, Size: 657 bytes --]

On Mon, 2012-08-20 at 18:00 +0200, Richard Genoud wrote:
> There's no reason to limit MTD_UBI_BEB_LIMIT to 256 (25%), let's set it
> to 768 (75%) this should be enough.
> And the lower bound can be 0, no reason to forbid it (even if it will be
> reserved for test purpose only I guess).
> 
> Signed-off-by: Richard Genoud <richard.genoud@gmail.com>

I've folded this patch into
"UBI: use the whole MTD device size to get bad_peb_limit"
instead. Yes, I know that value 0 is not handled at that point, but I
think it is not a big problem (AKA good enough). Certainly not worth a
separate patch.

Thanks!

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 3/6] UBI: check max_beb_per1024 value in ubi_attach_mtd_dev
  2012-08-20 16:00 ` [PATCH v3 3/6] UBI: check max_beb_per1024 value in ubi_attach_mtd_dev Richard Genoud
@ 2012-08-20 19:19   ` Artem Bityutskiy
  0 siblings, 0 replies; 35+ messages in thread
From: Artem Bityutskiy @ 2012-08-20 19:19 UTC (permalink / raw)
  To: Richard Genoud; +Cc: linux-mtd, Shmulik Ladkani

[-- Attachment #1: Type: text/plain, Size: 402 bytes --]

On Mon, 2012-08-20 at 18:00 +0200, Richard Genoud wrote:
> @@ -855,6 +858,15 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,
>  	struct ubi_device *ubi;
>  	int i, err, ref = 0;
>  
> +	if ((max_beb_per1024 < 0) || (max_beb_per1024 > MAX_MTD_UBI_BEB_LIMIT))
> +		return -EINVAL;

Removed excessive brackets and pushed to linux-ubi, thanks!

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 4/6] UBI: replace MTD_UBI_BEB_LIMIT with module parameter
  2012-08-20 16:00 ` [PATCH v3 4/6] UBI: replace MTD_UBI_BEB_LIMIT with module parameter Richard Genoud
@ 2012-08-21 13:54   ` Artem Bityutskiy
  2012-08-22  8:32     ` Richard Genoud
  0 siblings, 1 reply; 35+ messages in thread
From: Artem Bityutskiy @ 2012-08-21 13:54 UTC (permalink / raw)
  To: Richard Genoud; +Cc: linux-mtd, Shmulik Ladkani

[-- Attachment #1: Type: text/plain, Size: 1444 bytes --]

Amended the commit subject,

On Mon, 2012-08-20 at 18:00 +0200, Richard Genoud wrote:
> This patch provides the possibility to adjust the "maximum expected number of
> bad blocks per 1024 blocks" (max_beb_per1024) for each mtd device.
> 
> The majority of NAND devices have their max_beb_per1024 equal to 20, but
> sometimes it's more.
> Now, we can adjust that via a kernel parameter:
> ubi.mtd=<name|num|path>[,<vid_hdr_offs>[,max_beb_per1024]]
> 
> Signed-off-by: Richard Genoud <richard.genoud@gmail.com>

Did few minor amendments and applied this one. And pushed out. 

> +			pr_err("UBI error: bad value for max_beb_per1024 parameter: %s",
> +			       tokens[2]);

Changed this to 'printk(KERN_ERR' and wrapped the line.

The former is because the entire function uses 'printk(KERN_ERR', and I
am a fan of consistency. We can change them all to 'pr_err()' and
'pr_warn()' in a separate patch.

Similar for wrapping - UBI wraps all messages. If we want, we can unwrap
them all in a separate patch.

Feel free to submit such a patch, I won't have objections.

> -MODULE_PARM_DESC(mtd, "MTD devices to attach. Parameter format: "
> -		      "mtd=<name|num|path>[,<vid_hdr_offs>].\n"

You unwrapped this one and I pushed that as is, because it is just much
more readable, and it is the only place where we describe a module, so
no inconsistencies. :-)

Thank you!

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 6/6] UBI: drop CONFIG_MTD_UBI_BEB_LIMIT
  2012-08-20 16:00 ` [PATCH v3 6/6] UBI: drop CONFIG_MTD_UBI_BEB_LIMIT Richard Genoud
@ 2012-08-21 19:34   ` Artem Bityutskiy
  0 siblings, 0 replies; 35+ messages in thread
From: Artem Bityutskiy @ 2012-08-21 19:34 UTC (permalink / raw)
  To: Richard Genoud; +Cc: linux-mtd, Shmulik Ladkani

[-- Attachment #1: Type: text/plain, Size: 520 bytes --]

On Mon, 2012-08-20 at 18:00 +0200, Richard Genoud wrote:
> This option can be set by a kernel parameter and an ioctl, so we may not
> need the kernel config option any more.
> 
> Signed-off-by: Richard Genoud <richard.genoud@gmail.com>

Thanks for separating this. Actually, I've given some more thoughts, and
changed my mind :-) Shmulik is right, it is nicer to preserve the
Kconfig option. So let's drop this patch.

AFAICS, all the kernel stuff is in my tree now.


-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 5/6] UBI: add ioctl for max_beb_per1024
  2012-08-20 16:00 ` [PATCH v3 5/6] UBI: add ioctl for max_beb_per1024 Richard Genoud
@ 2012-08-21 19:34   ` Artem Bityutskiy
  0 siblings, 0 replies; 35+ messages in thread
From: Artem Bityutskiy @ 2012-08-21 19:34 UTC (permalink / raw)
  To: Richard Genoud; +Cc: linux-mtd, Shmulik Ladkani

[-- Attachment #1: Type: text/plain, Size: 1061 bytes --]

On Mon, 2012-08-20 at 18:00 +0200, Richard Genoud wrote:
> This patch provides the possibility to adjust the "maximum expected number of
> bad blocks per 1024 blocks" (max_beb_per1024) for each mtd device from
> UBI_IOCATT ioctl.

Thanks, pushed to linux-ubi.git with minor amendments.

>  struct ubi_attach_req {
>  	__s32 ubi_num;
>  	__s32 mtd_num;
>  	__s32 vid_hdr_offset;
> -	__s8 padding[12];
> +	__u16 max_beb_per1024;
> +	__s8 padding[10];
>  };

I've made that to be _s16, for consistency. AFAIR, the reasons I used
signed types all over the place (unless the really needed an unsigned
type) are:

1. Easy to write functions with return a positive resulting value of
something (e.g., pnum) in case of success and a negative error code in
case of failure.
2. Easy to check for sane value by just comparing to 0.

But these are not very strong arguments, and I read somewhere that some
CPUs handle unsigned integers a bit faster, not sure what architectures
was that about.

Thanks!

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 4/6] UBI: replace MTD_UBI_BEB_LIMIT with module parameter
  2012-08-21 13:54   ` Artem Bityutskiy
@ 2012-08-22  8:32     ` Richard Genoud
  2012-08-22  8:49       ` Artem Bityutskiy
  0 siblings, 1 reply; 35+ messages in thread
From: Richard Genoud @ 2012-08-22  8:32 UTC (permalink / raw)
  To: dedekind1; +Cc: linux-mtd, Shmulik Ladkani

2012/8/21 Artem Bityutskiy <dedekind1@gmail.com>:
> Changed this to 'printk(KERN_ERR' and wrapped the line.
>
> The former is because the entire function uses 'printk(KERN_ERR', and I
> am a fan of consistency. We can change them all to 'pr_err()' and
> 'pr_warn()' in a separate patch.
>
> Similar for wrapping - UBI wraps all messages. If we want, we can unwrap
> them all in a separate patch.
>
> Feel free to submit such a patch, I won't have objections.
>
>> -MODULE_PARM_DESC(mtd, "MTD devices to attach. Parameter format: "
>> -                   "mtd=<name|num|path>[,<vid_hdr_offs>].\n"
>
> You unwrapped this one and I pushed that as is, because it is just much
> more readable, and it is the only place where we describe a module, so
> no inconsistencies. :-)
>
> Thank you!
>
> --
> Best Regards,
> Artem Bityutskiy

Looking for consistency, I made a quick git grep "\<printk( *KERN_" | wc -l
the answer is  > 32000
Looks like I found something to do if I'm getting bored with openstreetmap :)


I double checked linux-ubi/master tree with mine, it's all right.

I'll resend the mtd-utils part updated with the new kernel header ubi-user.h

Best regards

Richard.

-- 
for me, ck means con kolivas and not calvin klein... does it mean I'm a geek ?

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 4/6] UBI: replace MTD_UBI_BEB_LIMIT with module parameter
  2012-08-22  8:32     ` Richard Genoud
@ 2012-08-22  8:49       ` Artem Bityutskiy
  2012-08-22 12:09         ` Richard Genoud
  0 siblings, 1 reply; 35+ messages in thread
From: Artem Bityutskiy @ 2012-08-22  8:49 UTC (permalink / raw)
  To: Richard Genoud; +Cc: linux-mtd, Shmulik Ladkani

[-- Attachment #1: Type: text/plain, Size: 772 bytes --]

On Wed, 2012-08-22 at 10:32 +0200, Richard Genoud wrote:
> Looking for consistency, I made a quick git grep "\<printk( *KERN_" |
> wc -l
> the answer is  > 32000
> Looks like I found something to do if I'm getting bored with
> openstreetmap :)

Well, now I am talking about consistency within UBI only, withing the
project. I think that function is the only one which uses plain printk
in UBI. I do not remember the details, but there were some issues using
the UBI wrappers like 'ubi_msg' in this function because it is called
very early during boot time (when UBI is compiled-in). And I just did
not know about pr_err() that time, or pr_err() did not exist. So you can
just amend this single function if you wish.
> 
-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 4/6] UBI: replace MTD_UBI_BEB_LIMIT with module parameter
  2012-08-22  8:49       ` Artem Bityutskiy
@ 2012-08-22 12:09         ` Richard Genoud
  2012-08-22 12:16           ` Artem Bityutskiy
  0 siblings, 1 reply; 35+ messages in thread
From: Richard Genoud @ 2012-08-22 12:09 UTC (permalink / raw)
  To: dedekind1; +Cc: linux-mtd, Shmulik Ladkani

2012/8/22 Artem Bityutskiy <dedekind1@gmail.com>:
> Well, now I am talking about consistency within UBI only, withing the
> project. I think that function is the only one which uses plain printk
> in UBI. I do not remember the details, but there were some issues using
> the UBI wrappers like 'ubi_msg' in this function because it is called
> very early during boot time (when UBI is compiled-in). And I just did
> not know about pr_err() that time, or pr_err() did not exist. So you can
> just amend this single function if you wish.

(for the record, pr_err didn't exists at the time UBI got into the kernel)
I tested this function with pr_err and ubi_err, and both are working.
(by using  ubi.mtd= ubi.mtd=2,0,toto ubi.mtd=1,2,3,4)
It should be better to use ubi_err don't you think ?
(or I missed a corner case ?)


Richard.

-- 
for me, ck means con kolivas and not calvin klein... does it mean I'm a geek ?

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 4/6] UBI: replace MTD_UBI_BEB_LIMIT with module parameter
  2012-08-22 12:09         ` Richard Genoud
@ 2012-08-22 12:16           ` Artem Bityutskiy
  0 siblings, 0 replies; 35+ messages in thread
From: Artem Bityutskiy @ 2012-08-22 12:16 UTC (permalink / raw)
  To: Richard Genoud; +Cc: linux-mtd, Shmulik Ladkani

[-- Attachment #1: Type: text/plain, Size: 1007 bytes --]

On Wed, 2012-08-22 at 14:09 +0200, Richard Genoud wrote:
> 2012/8/22 Artem Bityutskiy <dedekind1@gmail.com>:
> > Well, now I am talking about consistency within UBI only, withing the
> > project. I think that function is the only one which uses plain printk
> > in UBI. I do not remember the details, but there were some issues using
> > the UBI wrappers like 'ubi_msg' in this function because it is called
> > very early during boot time (when UBI is compiled-in). And I just did
> > not know about pr_err() that time, or pr_err() did not exist. So you can
> > just amend this single function if you wish.
> 
> (for the record, pr_err didn't exists at the time UBI got into the kernel)
> I tested this function with pr_err and ubi_err, and both are working.
> (by using  ubi.mtd= ubi.mtd=2,0,toto ubi.mtd=1,2,3,4)
> It should be better to use ubi_err don't you think ?
> (or I missed a corner case ?)

I guess it is safe to change than, thank you!

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 0/6] UBI: add max_beb_per1024 parameter / ioctl
  2012-08-20 16:00 [PATCH v3 0/6] UBI: add max_beb_per1024 parameter / ioctl Richard Genoud
                   ` (5 preceding siblings ...)
  2012-08-20 16:00 ` [PATCH v3 6/6] UBI: drop CONFIG_MTD_UBI_BEB_LIMIT Richard Genoud
@ 2012-08-23 10:10 ` Artem Bityutskiy
  2012-08-23 10:36   ` Shmulik Ladkani
  6 siblings, 1 reply; 35+ messages in thread
From: Artem Bityutskiy @ 2012-08-23 10:10 UTC (permalink / raw)
  To: Richard Genoud; +Cc: linux-mtd, Shmulik Ladkani

[-- Attachment #1: Type: text/plain, Size: 1961 bytes --]

On Mon, 2012-08-20 at 18:00 +0200, Richard Genoud wrote:
> This patch serie introduce, step by step the kernel module parameter
> max_beb_per1024, then the ioctl and finally drop the kernel config option
> CONFIG_MTD_UBI_BEB_LIMIT.
> 
> It's based on top of linux-ubi/master (4ebb4b5)

I've also pushed this patch:

From 5fe236c703063f9bc87b66c593408a0d48bbe0e7 Mon Sep 17 00:00:00 2001
From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Date: Thu, 23 Aug 2012 13:01:11 +0300
Subject: [PATCH] UBI: disallow max_beb_per1024 on NOR flash

If the flash does not admit of bad blocks (e.g., NOR) - disallow using
'max_beb_per1024'.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
---
 drivers/mtd/ubi/build.c |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index aa60b30..865e4fa 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -860,9 +860,6 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,
 	if (max_beb_per1024 < 0 || max_beb_per1024 > MAX_MTD_UBI_BEB_LIMIT)
 		return -EINVAL;
 
-	if (!max_beb_per1024)
-		max_beb_per1024 = CONFIG_MTD_UBI_BEB_LIMIT;
-
 	/*
 	 * Check if we already have the same MTD device attached.
 	 *
@@ -935,6 +932,15 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,
 	if (err)
 		goto out_free;
 
+	if (!max_beb_per1024) {
+		if (!ubi->bad_allowed) {
+			ubi_err("mtd%d does not admit of bad blocks, "
+				"max_beb_per1024 cannot be used", mtd->index);
+			goto out_free;
+		}
+		max_beb_per1024 = CONFIG_MTD_UBI_BEB_LIMIT;
+	}
+
 	err = -ENOMEM;
 	ubi->peb_buf = vmalloc(ubi->peb_size);
 	if (!ubi->peb_buf)
-- 
1.7.10.4

Are you OK with this?

Now that we seem to have everything in, would you please give this all a
final test. Could you please check both on nandsim and mtdram?

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 0/6] UBI: add max_beb_per1024 parameter / ioctl
  2012-08-23 10:10 ` [PATCH v3 0/6] UBI: add max_beb_per1024 parameter / ioctl Artem Bityutskiy
@ 2012-08-23 10:36   ` Shmulik Ladkani
  2012-08-23 11:01     ` Richard Genoud
  2012-08-23 12:30     ` Artem Bityutskiy
  0 siblings, 2 replies; 35+ messages in thread
From: Shmulik Ladkani @ 2012-08-23 10:36 UTC (permalink / raw)
  To: dedekind1; +Cc: Richard Genoud, linux-mtd

On Thu, 23 Aug 2012 13:10:15 +0300 Artem Bityutskiy <dedekind1@gmail.com> wrote:
> diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
> index aa60b30..865e4fa 100644
> --- a/drivers/mtd/ubi/build.c
> +++ b/drivers/mtd/ubi/build.c
> @@ -860,9 +860,6 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,
>  	if (max_beb_per1024 < 0 || max_beb_per1024 > MAX_MTD_UBI_BEB_LIMIT)
>  		return -EINVAL;
>  
> -	if (!max_beb_per1024)
> -		max_beb_per1024 = CONFIG_MTD_UBI_BEB_LIMIT;
> -
>  	/*
>  	 * Check if we already have the same MTD device attached.
>  	 *
> @@ -935,6 +932,15 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,
>  	if (err)
>  		goto out_free;
>  
> +	if (!max_beb_per1024) {
> +		if (!ubi->bad_allowed) {
> +			ubi_err("mtd%d does not admit of bad blocks, "
> +				"max_beb_per1024 cannot be used", mtd->index);
> +			goto out_free;
> +		}
> +		max_beb_per1024 = CONFIG_MTD_UBI_BEB_LIMIT;
> +	}
> +

Artem, this is now located *after* the call to
	io_init(ubi, max_beb_per1024)
So falling to the default (in case max_beb_per1024 is zero) won't work.

Also, why displaying the error if max_beb_per1024 was NOT povided?
Shouldn't it be displayed only when max_beb_per1024 is other than zero?
What am I missing?

Regards,
Shmulik

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 0/6] UBI: add max_beb_per1024 parameter / ioctl
  2012-08-23 10:36   ` Shmulik Ladkani
@ 2012-08-23 11:01     ` Richard Genoud
  2012-08-23 12:30     ` Artem Bityutskiy
  1 sibling, 0 replies; 35+ messages in thread
From: Richard Genoud @ 2012-08-23 11:01 UTC (permalink / raw)
  To: Shmulik Ladkani; +Cc: linux-mtd, dedekind1

2012/8/23 Shmulik Ladkani <shmulik.ladkani@gmail.com>:
> Artem, this is now located *after* the call to
>         io_init(ubi, max_beb_per1024)
> So falling to the default (in case max_beb_per1024 is zero) won't work.
>
> Also, why displaying the error if max_beb_per1024 was NOT povided?
> Shouldn't it be displayed only when max_beb_per1024 is other than zero?
> What am I missing?
+1
mounting NOR flash without the max_beb_per1024 will fail, that's
really not what we want.

Regards,
Richard.

-- 
for me, ck means con kolivas and not calvin klein... does it mean I'm a geek ?

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 0/6] UBI: add max_beb_per1024 parameter / ioctl
  2012-08-23 10:36   ` Shmulik Ladkani
  2012-08-23 11:01     ` Richard Genoud
@ 2012-08-23 12:30     ` Artem Bityutskiy
  2012-08-23 12:44       ` Shmulik Ladkani
  1 sibling, 1 reply; 35+ messages in thread
From: Artem Bityutskiy @ 2012-08-23 12:30 UTC (permalink / raw)
  To: Shmulik Ladkani, Richard Genoud; +Cc: linux-mtd

[-- Attachment #1: Type: text/plain, Size: 1758 bytes --]

From fa7595564e95672ab87d4a910c6bc02123b75e88 Mon Sep 17 00:00:00 2001
From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Date: Thu, 23 Aug 2012 13:01:11 +0300
Subject: [PATCH] UBI: disallow max_beb_per1024 on NOR flash

If the flash does not admit of bad blocks (e.g., NOR) - disallow using
'max_beb_per1024'.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
---

Second attempt, did not test :-)

 drivers/mtd/ubi/build.c |   18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index 355756b..aaf7df3 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -646,8 +646,18 @@ static int io_init(struct ubi_device *ubi, int max_beb_per1024)
 	ubi->flash_size = ubi->mtd->size;
 
 	if (mtd_can_have_bb(ubi->mtd)) {
-		ubi->bad_allowed = 1;
+		if (max_beb_per1024 < 0 ||
+		    max_beb_per1024 > MAX_MTD_UBI_BEB_LIMIT)
+			return -EINVAL;
+		if (!max_beb_per1024)
+			max_beb_per1024 = CONFIG_MTD_UBI_BEB_LIMIT;
+
 		ubi->bad_peb_limit = get_bad_peb_limit(ubi, max_beb_per1024);
+		ubi->bad_allowed = 1;
+	} else if (max_beb_per1024) {
+		ubi_err("mtd%d does not admit of bad blocks, max_beb_per1024 "
+			"cannot be used", mtd->index);
+		return -EINVAL;
 	}
 
 	if (ubi->mtd->type == MTD_NORFLASH) {
@@ -857,12 +867,6 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,
 	struct ubi_device *ubi;
 	int i, err, ref = 0;
 
-	if (max_beb_per1024 < 0 || max_beb_per1024 > MAX_MTD_UBI_BEB_LIMIT)
-		return -EINVAL;
-
-	if (!max_beb_per1024)
-		max_beb_per1024 = CONFIG_MTD_UBI_BEB_LIMIT;
-
 	/*
 	 * Check if we already have the same MTD device attached.
 	 *
-- 
1.7.10.4


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 0/6] UBI: add max_beb_per1024 parameter / ioctl
  2012-08-23 12:30     ` Artem Bityutskiy
@ 2012-08-23 12:44       ` Shmulik Ladkani
  2012-08-23 12:58         ` Artem Bityutskiy
  0 siblings, 1 reply; 35+ messages in thread
From: Shmulik Ladkani @ 2012-08-23 12:44 UTC (permalink / raw)
  To: dedekind1; +Cc: Richard Genoud, linux-mtd

Hi,

On Thu, 23 Aug 2012 15:30:30 +0300 Artem Bityutskiy <dedekind1@gmail.com> wrote:
> From fa7595564e95672ab87d4a910c6bc02123b75e88 Mon Sep 17 00:00:00 2001
> From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
> Date: Thu, 23 Aug 2012 13:01:11 +0300
> Subject: [PATCH] UBI: disallow max_beb_per1024 on NOR flash
> 
> If the flash does not admit of bad blocks (e.g., NOR) - disallow using
> 'max_beb_per1024'.
> 
> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
> ---
> 
> Second attempt, did not test :-)

Looks ok to me.

Reviewed-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 0/6] UBI: add max_beb_per1024 parameter / ioctl
  2012-08-23 12:44       ` Shmulik Ladkani
@ 2012-08-23 12:58         ` Artem Bityutskiy
  2012-08-23 13:13           ` Richard Genoud
  0 siblings, 1 reply; 35+ messages in thread
From: Artem Bityutskiy @ 2012-08-23 12:58 UTC (permalink / raw)
  To: Shmulik Ladkani; +Cc: Richard Genoud, linux-mtd

[-- Attachment #1: Type: text/plain, Size: 1108 bytes --]

On Thu, 2012-08-23 at 15:44 +0300, Shmulik Ladkani wrote:
> Hi,
> 
> On Thu, 23 Aug 2012 15:30:30 +0300 Artem Bityutskiy <dedekind1@gmail.com> wrote:
> > From fa7595564e95672ab87d4a910c6bc02123b75e88 Mon Sep 17 00:00:00 2001
> > From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
> > Date: Thu, 23 Aug 2012 13:01:11 +0300
> > Subject: [PATCH] UBI: disallow max_beb_per1024 on NOR flash
> > 
> > If the flash does not admit of bad blocks (e.g., NOR) - disallow using
> > 'max_beb_per1024'.
> > 
> > Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
> > ---
> > 
> > Second attempt, did not test :-)
> 
> Looks ok to me.
> 
> Reviewed-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>

Thanks, it is pushed now. The further things we'd need to do are:

1. Somewhat test what we ended up with.
2. Write some documentation.
3. Search for UBI users in the mtd mailing list and send them
   an e-mail with heads-up, to make sure people have a possibility
   to complain before this stuff is merged.

I can do number 3 :-)

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 0/6] UBI: add max_beb_per1024 parameter / ioctl
  2012-08-23 12:58         ` Artem Bityutskiy
@ 2012-08-23 13:13           ` Richard Genoud
  2012-08-23 14:45             ` Artem Bityutskiy
  2012-08-31 14:46             ` Richard Genoud
  0 siblings, 2 replies; 35+ messages in thread
From: Richard Genoud @ 2012-08-23 13:13 UTC (permalink / raw)
  To: dedekind1; +Cc: linux-mtd, Shmulik Ladkani

2012/8/23 Artem Bityutskiy <dedekind1@gmail.com>:
> Thanks, it is pushed now. The further things we'd need to do are:
>
> 1. Somewhat test what we ended up with.
> 2. Write some documentation.
> 3. Search for UBI users in the mtd mailing list and send them
>    an e-mail with heads-up, to make sure people have a possibility
>    to complain before this stuff is merged.
>
> I can do number 3 :-)

I could do some more tests with the final version.

I guess that the documentation to update is there:
http://www.linux-mtd.infradead.org/doc/ubi.html
The message commit of dccaefbd68ce0c4d83f1d57667726868bdc03cce (UBI:
use the whole MTD device size to get bad_peb_limit)
could be a start for the "Why?"


-- 
for me, ck means con kolivas and not calvin klein... does it mean I'm a geek ?

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 0/6] UBI: add max_beb_per1024 parameter / ioctl
  2012-08-23 13:13           ` Richard Genoud
@ 2012-08-23 14:45             ` Artem Bityutskiy
  2012-08-31 14:46             ` Richard Genoud
  1 sibling, 0 replies; 35+ messages in thread
From: Artem Bityutskiy @ 2012-08-23 14:45 UTC (permalink / raw)
  To: Richard Genoud; +Cc: linux-mtd, Shmulik Ladkani

[-- Attachment #1: Type: text/plain, Size: 864 bytes --]

On Thu, 2012-08-23 at 15:13 +0200, Richard Genoud wrote:
> I could do some more tests with the final version.

Thanks!

> I guess that the documentation to update is there:
> http://www.linux-mtd.infradead.org/doc/ubi.html

Yes, a separate section about how UBI reserves eraseblocks for bad PEBs
handling is needed.

> The message commit of dccaefbd68ce0c4d83f1d57667726868bdc03cce (UBI:
> use the whole MTD device size to get bad_peb_limit)
> could be a start for the "Why?"

Sure.

Additionally, all places where we mention 2% should be amended
correspondingly. I guess this commit can be used to locate the places:
http://git.infradead.org/mtd-www.git/commit/2b91234cf1dd9968d18679b19d7dbe22b6508cff

Also, this section should be amended:
http://www.linux-mtd.infradead.org/doc/ubi.html#L_overhead

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 0/6] UBI: add max_beb_per1024 parameter / ioctl
  2012-08-23 13:13           ` Richard Genoud
  2012-08-23 14:45             ` Artem Bityutskiy
@ 2012-08-31 14:46             ` Richard Genoud
  2012-09-03  8:00               ` Artem Bityutskiy
                                 ` (2 more replies)
  1 sibling, 3 replies; 35+ messages in thread
From: Richard Genoud @ 2012-08-31 14:46 UTC (permalink / raw)
  To: dedekind1; +Cc: linux-mtd, Shmulik Ladkani

2012/8/23 Richard Genoud <richard.genoud@gmail.com>:
> I could do some more tests with the final version.
I did some test:
- new ubiattacht/detach with old kernel
- old ubiattacht/detach/mkvol/format/ ubifs mount with new kernel
- new ubi* with new kernel.
- command line ubi.mtd=...
I ran into the case where I asked for 20 PEB reserved for bad PEB handling:
UBI warning: print_rsvd_warning: cannot reserve enough PEBs for bad
PEB handling, reserved 10, need 20
and I did a ubirmvol on a small volume:
# ubirmvol /dev/ubi0 -N toto2
UBI: reserved more 10 PEBs for bad PEB handling
=> that's great, no need to detach and then re-attach

I tested also some values at limits, it seems all right.

BUT, I ran into a bug, I don't know if it's my kernel (as I've got
quite a lot of patches ahead of 3.6 to get my board run), but it's
kind of nasty.
It's not related to this patch serie, I could trigger it with a
3.6-rc1 kernel (and my board-patches).
I get some memory crashing when I do :
flash_erase /dev/mtd2 0 160 (it's a whole mtd partition)
ubiattach -m 2
After that, I can have a OOPS right away, but sometimes not.
but if I run someting (top for exemple) I get an oops then.
So, the memory is beeing corrupted somewhere, but I couldn't find out
exactly where.
But I found that if I comment out the lines :
diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c
--- a/drivers/mtd/ubi/vtbl.c
+++ b/drivers/mtd/ubi/vtbl.c
@@ -346,8 +346,8 @@ retry:
         */
        err = ubi_scan_add_used(ubi, si, new_seb->pnum, new_seb->ec,
                                vid_hdr, 0);
+//     kfree(new_seb);
+//     ubi_free_vid_hdr(ubi, vid_hdr);
        return err;

 write_error:

I can't trigger an oops any more.

As I can't test with older kernel, I reverted some commits that
touched drivers/mtd/ubi
I reverted all commits from 3.6-rc1 to
4415626732defb5a4567a0a757c7c5baae7ca846 (UBI: amend commentaries WRT
dtype)
and I still can trigger the oops.

Does someone can reproduce that ?

Best regards,
Richard

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 0/6] UBI: add max_beb_per1024 parameter / ioctl
  2012-08-31 14:46             ` Richard Genoud
@ 2012-09-03  8:00               ` Artem Bityutskiy
  2012-09-03 10:57                 ` Richard Genoud
  2012-09-03 14:32               ` Artem Bityutskiy
  2012-09-03 14:33               ` Artem Bityutskiy
  2 siblings, 1 reply; 35+ messages in thread
From: Artem Bityutskiy @ 2012-09-03  8:00 UTC (permalink / raw)
  To: Richard Genoud; +Cc: linux-mtd, Shmulik Ladkani

[-- Attachment #1: Type: text/plain, Size: 1760 bytes --]

On Fri, 2012-08-31 at 16:46 +0200, Richard Genoud wrote:
> BUT, I ran into a bug, I don't know if it's my kernel (as I've got
> quite a lot of patches ahead of 3.6 to get my board run), but it's
> kind of nasty.

What is your kernel? Why don't you just pull the corresponding ubifs
backport tree?

> It's not related to this patch serie, I could trigger it with a
> 3.6-rc1 kernel (and my board-patches).
> I get some memory crashing when I do :
> flash_erase /dev/mtd2 0 160 (it's a whole mtd partition)
> ubiattach -m 2

Would you please be able to reproduce this with linux-ubi tree and also
send be the full oops?

> After that, I can have a OOPS right away, but sometimes not.
> but if I run someting (top for exemple) I get an oops then.
> So, the memory is beeing corrupted somewhere, but I couldn't find out
> exactly where.

If you could somehow reproduce this with nandsim, it would make it easy
for me to find the bug.

> But I found that if I comment out the lines :
> diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c
> --- a/drivers/mtd/ubi/vtbl.c
> +++ b/drivers/mtd/ubi/vtbl.c
> @@ -346,8 +346,8 @@ retry:
>          */
>         err = ubi_scan_add_used(ubi, si, new_seb->pnum, new_seb->ec,
>                                 vid_hdr, 0);

We renamed all scan functions recently, so AFAICS you are not using the
latest UBI code-base. How about picking the latest back-port tree?

> +//     kfree(new_seb);
> +//     ubi_free_vid_hdr(ubi, vid_hdr);

This is strange, I think these 2 frees are all-right, I think the
root-cause is somewhere else.


> Does someone can reproduce that ?

It is difficult to say because you did not send the full oops.

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 0/6] UBI: add max_beb_per1024 parameter / ioctl
  2012-09-03  8:00               ` Artem Bityutskiy
@ 2012-09-03 10:57                 ` Richard Genoud
  2012-09-03 11:53                   ` Artem Bityutskiy
  0 siblings, 1 reply; 35+ messages in thread
From: Richard Genoud @ 2012-09-03 10:57 UTC (permalink / raw)
  To: dedekind1; +Cc: linux-mtd, Shmulik Ladkani

2012/9/3 Artem Bityutskiy <dedekind1@gmail.com>:
> On Fri, 2012-08-31 at 16:46 +0200, Richard Genoud wrote:
>> BUT, I ran into a bug, I don't know if it's my kernel (as I've got
>> quite a lot of patches ahead of 3.6 to get my board run), but it's
>> kind of nasty.
>
> What is your kernel? Why don't you just pull the corresponding ubifs
> backport tree?
I'm on 3.6-rc1 + specific work for my board (pinctrl, device tree and
some driver stuff) without which I can't boot

> Would you please be able to reproduce this with linux-ubi tree and also
> send be the full oops?
I rebased my work onto linux-ubi/master, I enabled only the needed
options to boot and test.
[   12.500000] UBI: attaching mtd3 to ubi0
[   12.539062] UBI: scanning is finished
[   12.539062] UBI: empty MTD device detected
[   12.562500] ------------[ cut here ]------------
[   12.562500] kernel BUG at mm/slob.c:331!
[   12.562500] Internal error: Oops - BUG: 0 [#1] ARM
[   12.562500] CPU: 0    Not tainted  (3.6.0-rc1+ #887)
[   12.562500] PC is at slob_alloc.clone.18+0x174/0x1b4
[   12.562500] LR is at slob_page_alloc+0x1a8/0x1d0
[   12.562500] pc : [<c0068130>]    lr : [<c0067c40>]    psr: 60000093
[   12.562500] sp : c7b47e08  ip : 00000000  fp : 01020014
[   12.562500] r10: 00000000  r9 : a0000013  r8 : 00007b69
[   12.562500] r7 : c0321000  r6 : 00000030  r5 : c0417d20  r4 : c02e1908
[   12.562500] r3 : 01020014  r2 : 01020013  r1 : fefdffec  r0 : 00000000
[   12.562500] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM
Segment user
[   12.562500] Control: 0005317f  Table: 27b48000  DAC: 00000015
[   12.562500] Process ubiattach (pid: 354, stack limit = 0xc7b46270)
[   12.562500] Stack: (0xc7b47e08 to 0xc7b48000)
[   12.562500] 7e00:                   00000030 000000d0 01020014
c7add1e0 c7b6a0f4 00000000
[   12.562500] 7e20: c7b6a0a0 c7add2a0 00000001 00000001 c7b6a0f0
c0068374 00000000 c7b67020
[   12.562500] 7e40: c7b6a0f4 c01798c0 00005800 c7ad7540 c7ad7540
00001000 00000001 00005800
[   12.562500] 7e60: 00000000 02000200 00000002 00000000 00005800
7fffefff 00000001 c7ad7540
[   12.562500] 7e80: c7add2a0 c7b67020 c7af79e0 c7ad7540 c7add2a0
01000000 00000000 00000000
[   12.562500] 7ea0: 00000000 c016c020 c7b67020 00000000 c7ad7540
00000000 00000000 02000000
[   12.562500] 7ec0: 00000014 c89e6000 000080d2 c7ad7540 c89e6000
c7add2a0 00000000 c89eb6ac
[   12.562500] 7ee0: c7b46000 00000000 00000003 c016cff4 c7ad7540
c7add2a0 00000000 c7a5e820
[   12.562500] 7f00: 00000014 c017a618 c7ad7540 00000000 00000000
c016fee0 c7aac2f0 c7aa8640
[   12.562500] 7f20: c7aa24b0 40186f40 40186f40 00000000 be82bb20
c7a5e820 40186f40 00000003
[   12.562500] 7f40: c0009388 c01703d8 ffffffff 00000003 00000000
00000000 00000000 00000000
[   12.562500] 7f60: be82bb20 00000003 40186f40 c0078684 c7acb6a0
00000003 40186f40 c7acb6a0
[   12.562500] 7f80: be82bb20 c00786f4 00000003 00000000 be82bb20
be82bb20 40186f40 00000003
[   12.562500] 7fa0: 00000036 c0009200 be82bb20 40186f40 00000003
40186f40 be82bb20 00000000
[   12.562500] 7fc0: be82bb20 40186f40 00000003 00000036 ffffffff
0001442c ffffffff 00000003
[   12.562500] 7fe0: b6ef5ec4 be82bae0 000098ec b6ef5f08 60000010
00000003 27ffe831 27ffec31
[   12.562500] [<c0068130>] (slob_alloc.clone.18+0x174/0x1b4) from
[<c0068374>] (kmem_cache_alloc_node+0x28/0x64)
[   12.562500] [<c0068374>] (kmem_cache_alloc_node+0x28/0x64) from
[<c01798c0>] (ubi_add_to_av+0x318/0x3fc)
[   12.562500] [<c01798c0>] (ubi_add_to_av+0x318/0x3fc) from
[<c016c020>] (create_vtbl+0x1cc/0x258)
[   12.562500] [<c016c020>] (create_vtbl+0x1cc/0x258) from
[<c016cff4>] (ubi_read_volume_table+0xe0/0x1f0)
[   12.562500] [<c016cff4>] (ubi_read_volume_table+0xe0/0x1f0) from
[<c017a618>] (ubi_attach+0x54/0xac)
[   12.562500] [<c017a618>] (ubi_attach+0x54/0xac) from [<c016fee0>]
(ubi_attach_mtd_dev+0x1bc/0x474)
[   12.562500] [<c016fee0>] (ubi_attach_mtd_dev+0x1bc/0x474) from
[<c01703d8>] (ctrl_cdev_ioctl+0xd8/0x168)
[   12.562500] [<c01703d8>] (ctrl_cdev_ioctl+0xd8/0x168) from
[<c0078684>] (do_vfs_ioctl+0x270/0x2ac)
[   12.562500] [<c0078684>] (do_vfs_ioctl+0x270/0x2ac) from
[<c00786f4>] (sys_ioctl+0x34/0x54)
[   12.562500] [<c00786f4>] (sys_ioctl+0x34/0x54) from [<c0009200>]
(ret_fast_syscall+0x0/0x2c)
[   12.562500] Code: e1a0200b ebfffe5b e250a000 1a000000 (e7f001f2)
[   12.562500] ---[ end trace 473f0aad0098fe9c ]---


>
>> After that, I can have a OOPS right away, but sometimes not.
>> but if I run someting (top for exemple) I get an oops then.
>> So, the memory is beeing corrupted somewhere, but I couldn't find out
>> exactly where.
>
> If you could somehow reproduce this with nandsim, it would make it easy
> for me to find the bug.
here it is:
[    0.921875] [nandsim] warning: read_byte: unexpected data output
cycle, state is STATE_READY return 0x0
[    0.929687] [nandsim] warning: read_byte: unexpected data output
cycle, state is STATE_READY return 0x0
[    0.937500] [nandsim] warning: read_byte: unexpected data output
cycle, state is STATE_READY return 0x0
[    0.953125] [nandsim] warning: read_byte: unexpected data output
cycle, state is STATE_READY return 0x0
[    0.960937] [nandsim] warning: read_byte: unexpected data output
cycle, state is STATE_READY return 0x0
[    0.968750] [nandsim] warning: read_byte: unexpected data output
cycle, state is STATE_READY return 0x0
[    0.976562] NAND device: Manufacturer ID: 0x98, Chip ID: 0x39
(Toshiba NAND 128MiB 1,8V 8-bit), page size: 512, OOB size: 16
[    0.992187] flash size: 128 MiB
[    0.992187] page size: 512 bytes
[    0.992187] OOB area size: 16 bytes
[    1.000000] sector size: 16 KiB
[    1.000000] pages number: 262144
[    1.007812] pages per sector: 32
[    1.007812] bus width: 8
[    1.007812] bits in sector size: 14
[    1.015625] bits in page size: 9
[    1.015625] bits in OOB size: 4
[    1.023437] flash size with OOB: 135168 KiB
[    1.023437] page address bytes: 4
[    1.031250] sector address bytes: 3
[    1.031250] options: 0x42
[    1.039062] Scanning device for bad blocks
[    1.242187] Creating 1 MTD partitions on "NAND 128MiB 1,8V 8-bit":
[    1.250000] 0x000000000000-0x000008000000 : "NAND simulator partition 0"

# flash_erase /dev/mtd0 0 8192
Erasing 16 Kibyte @ 7ffc000 -- 100 % complete
# ./ubiattach -m 0
[  152.718750] UBI: attaching mtd0 to ubi0
[  153.054687] UBI: scanning is finished
[  153.062500] UBI: empty MTD device detected
[  153.078125] Internal error: Oops - undefined instruction: 0 [#1] ARM
[  153.078125] CPU: 0    Not tainted  (3.6.0-rc1+ #888)
[  153.078125] PC is at 0xc7aab444
[  153.078125] LR is at ip_local_out+0x28/0x2c
[  153.078125] pc : [<c7aab444>]    lr : [<c01bcab4>]    psr: 60000013
[  153.078125] sp : c7aefa80  ip : 0900800a  fp : c02df6fc
[  153.078125] r10: 00000068  r9 : 00000108  r8 : 00000000
[  153.078125] r7 : c7aefb3c  r6 : c7ac17e0  r5 : c7bb3464  r4 : c7bc0280
[  153.078125] r3 : c7aab308  r2 : 00000525  r1 : 00000000  r0 : c7bc029f
[  153.078125] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM
Segment kernel
[  153.078125] Control: 0005317f  Table: 27b08000  DAC: 00000017
[  153.078125] Process klogd (pid: 324, stack limit = 0xc7aee270)
[  153.078125] Stack: (0xc7aefa80 to 0xc7af0000)
[  153.078125] fa80: c7bc0280 c01be694 c7bc0280 c7bb3464 c7ac17e0
c01dbbe0 c7aefa8c c7ac17e0
[  153.078125] faa0: c7aefc9c c7aefb3c c7bc0280 0900800a 6400800a
c01dd420 00000068 00000008
[  153.078125] fac0: c7aefb5c c7aefb6c 00004040 c7ac17e0 c7ad2780
000000cc 00000060 00000060
[  153.078125] fae0: 00000000 00000000 c01bdd0c 00000000 c7ac198c
00000011 c7ac17e0 00000068
[  153.078125] fb00: c7ac17e0 c7ad28a0 00000000 00000068 c7ad28b8
c0191af8 c7ad28a0 c7ac17e0
[  153.078125] fb20: 00000011 c01db548 00000000 c7ad28a0 c7adb7e4
c01de1c8 0000d203 00000002
[  153.078125] fb40: 00000001 00000000 02110000 00000000 6400800a
0900800a d2030108 0900800a
[  153.078125] fb60: 00000000 00000000 c02cce00 00000000 c7aefbcc
c7aefbb0 00000060 c7aefc9c
[  153.078125] fb80: c7ac17e0 c7ae8960 00000010 00004040 c7aefec8
c01e3bec 00000060 bf000000
[  153.078125] fba0: c7ac22a0 00000060 c7aefc9c c018e1f8 00000000
00000000 00000000 00000001
[  153.078125] fbc0: ffffffff 00000000 00000000 00000000 00000000
00000000 c7ae8960 00000000
[  153.078125] fbe0: 00000000 00000000 00000000 00000000 c7aefc30
00000000 00000000 00000000
[  153.078125] fc00: 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000
[  153.078125] fc20: 00000000 00000000 00000000 00000000 00000000
00011200 01ffffff 00000060
[  153.078125] fc40: c7ac22a0 c02e3208 00000000 c7aefc9c c02e2c50
c004c190 00000000 00000041
[  153.078125] fc60: c02e2c50 00000000 00000001 00000000 bf000000
c7ac25cc c7aefc9c c7bb5004
[  153.078125] fc80: c7ac2ac4 c018e4b0 c7ac22a0 c01fc444 00000060
c01fe03c c7ae8ab8 c7ac25cc
[  153.078125] fca0: 00000010 c7aefcb8 00000001 00000000 00000000
00004040 c7bb5004 00000060
[  153.078125] fcc0: 00000001 c7ac2ac4 00000000 c7ac22a0 00000060
00000001 c7aabec8 c01fc4d8
[  153.078125] fce0: 00000000 00000000 c7aee000 00011200 c7acb6b8
c7ac2ac0 c7ac25c0 c7bc0200
[  153.078125] fd00: c7ac2b34 c7ac2b50 00000001 c7aabec8 c7aefec8
c01fc820 00000000 3b9aca00
[  153.078125] fd20: c7ac25c0 c7ac2ac0 c7bc0200 c01faa90 a40f89aa
00000023 c7bc0200 c7ac2ac0
[  153.078125] fd40: 00000000 00000000 c7ad0000 c01f8168 c7acb6b8
c01f803c 00000012 c7bc0200
[  153.078125] fd60: c7bc0238 c01fe95c c7bc0200 c7aefd94 c7aefdd8
c7aab880 c7ad0000 c01f9264
[  153.078125] fd80: c0229578 c7aefd94 00000000 c01f92c0 ffffffe0
00000000 c7aab880 c7aefdd8
[  153.078125] fda0: c0229578 00000000 00000000 00000000 00000060
c7aee000 c7aefdd8 c7aab880
[  153.078125] fdc0: c7acb6b8 c00c46dc c7aefdd8 c7bc0160 c7ac2020
c00c4d24 c02d48a4 c7acb6b8
[  153.078125] fde0: c7bc0160 00000000 00000020 c7acb7b0 c7bc0160
c7ac2020 c7acb6b0 c00baed4
[  153.078125] fe00: 00008000 c7acb7b0 c7ac0e38 00000000 00000101
c00b66a4 c7aeff00 c7aefec0
[  153.078125] fe20: c7aefe84 00000001 c7aab190 00000001 c7ad0000
c0073528 c7aeff00 c7aeff08
[  153.078125] fe40: c7aeff00 c7aefec0 00000000 00000000 00000000
c7aee000 c7aabec8 c0075048
[  153.078125] fe60: 0002bbb4 00000002 c7bc00c0 00000000 c7aeff78
00000024 ffffff9c 00000000
[  153.078125] fe80: 00000000 c7ac0e38 c7bb4000 c7aeff00 c7bc00c0
00000000 c7aee000 00000000
[  153.078125] fea0: c7aee000 c7aeff78 c7aefec8 c0075588 c7aefec8
00000000 b6ef8990 c02e3208
[  153.078125] fec0: 00000000 00000000 00000000 00000000 00000000
c7aeff78 00000001 ffffff9c
[  153.078125] fee0: c7aeff00 c7bb4000 c7aee000 00000000 0000000a
c00758ec 00000041 c02d2688
[  153.078125] ff00: c7aab190 c7aabec8 0002bbb4 00000002 c7bb4005
c7802800 c7aab190 c7aa9500
[  153.078125] ff20: c7ac0e38 00000101 00000000 00000000 00000000
00000000 00000000 c7af1b68
[  153.078125] ff40: c7af1b60 00000000 00000000 c007fb50 00000000
00000000 00000004 ffffff9c
[  153.078125] ff60: c7bb4000 00000001 c0009388 c00695ac c7aeff90
0000004e 00000000 becd0000
[  153.078125] ff80: 00000024 00000100 00000000 00000000 b6f04eb0
becd67d0 00000005 c0009388
[  153.078125] ffa0: 00000000 c0009200 00000000 b6f04eb0 b6ef8990
00000000 00000054 b6f04eb0
[  153.078125] ffc0: 00000000 b6f04eb0 becd67d0 00000005 b6f05040
00000fff 000a6e38 0000000a
[  153.078125] ffe0: becd6c54 becd6710 b6ebeed4 b6eee76c 60000010
b6ef8990 27ffe831 27ffec31
[  153.078125] [<c01bcab4>] (ip_local_out+0x28/0x2c) from [<c01be694>]
(ip_send_skb+0x8/0x58)
[  153.078125] [<c01be694>] (ip_send_skb+0x8/0x58) from [<c01dbbe0>]
(udp_send_skb+0x180/0x250)
[  153.078125] [<c01dbbe0>] (udp_send_skb+0x180/0x250) from
[<c01dd420>] (udp_sendmsg+0x474/0x67c)
[  153.078125] [<c01dd420>] (udp_sendmsg+0x474/0x67c) from
[<c01e3bec>] (inet_sendmsg+0x60/0x70)
[  153.078125] [<c01e3bec>] (inet_sendmsg+0x60/0x70) from [<c018e1f8>]
(sock_sendmsg+0x80/0xa0)
[  153.078125] [<c018e1f8>] (sock_sendmsg+0x80/0xa0) from [<c018e4b0>]
(kernel_sendmsg+0x3c/0x70)
[  153.078125] [<c018e4b0>] (kernel_sendmsg+0x3c/0x70) from
[<c01fc444>] (xs_send_kvec+0x98/0xa8)
[  153.078125] [<c01fc444>] (xs_send_kvec+0x98/0xa8) from [<c01fc4d8>]
(xs_sendpages+0x84/0x1e8)
[  153.078125] [<c01fc4d8>] (xs_sendpages+0x84/0x1e8) from
[<c01fc820>] (xs_udp_send_request+0x38/0xb4)
[  153.078125] [<c01fc820>] (xs_udp_send_request+0x38/0xb4) from
[<c01faa90>] (xprt_transmit+0xd0/0x1e8)
[  153.078125] [<c01faa90>] (xprt_transmit+0xd0/0x1e8) from
[<c01f8168>] (call_transmit+0x12c/0x194)
[  153.078125] [<c01f8168>] (call_transmit+0x12c/0x194) from
[<c01fe95c>] (__rpc_execute+0x4c/0xfc)
[  153.078125] [<c01fe95c>] (__rpc_execute+0x4c/0xfc) from
[<c01f9264>] (rpc_run_task+0xa4/0xb0)
[  153.078125] [<c01f9264>] (rpc_run_task+0xa4/0xb0) from [<c01f92c0>]
(rpc_call_sync+0x50/0x74)
[  153.078125] [<c01f92c0>] (rpc_call_sync+0x50/0x74) from
[<c00c46dc>] (nfs_rpc_wrapper.clone.6+0x28/0x64)
[  153.078125] [<c00c46dc>] (nfs_rpc_wrapper.clone.6+0x28/0x64) from
[<c00c4d24>] (nfs_proc_getattr+0x48/0x54)
[  153.078125] [<c00c4d24>] (nfs_proc_getattr+0x48/0x54) from
[<c00baed4>] (__nfs_revalidate_inode+0x8c/0x114)
[  153.078125] [<c00baed4>] (__nfs_revalidate_inode+0x8c/0x114) from
[<c00b66a4>] (nfs_lookup_revalidate+0x144/0x2ec)
[  153.078125] [<c00b66a4>] (nfs_lookup_revalidate+0x144/0x2ec) from
[<c0073528>] (lookup_fast+0x1b4/0x260)
[  153.078125] [<c0073528>] (lookup_fast+0x1b4/0x260) from
[<c0075048>] (do_last.clone.41+0x130/0x5cc)
[  153.078125] [<c0075048>] (do_last.clone.41+0x130/0x5cc) from
[<c0075588>] (path_openat+0xa4/0x3d8)
[  153.078125] [<c0075588>] (path_openat+0xa4/0x3d8) from [<c00758ec>]
(do_filp_open+0x30/0x7c)
[  153.078125] [<c00758ec>] (do_filp_open+0x30/0x7c) from [<c00695ac>]
(do_sys_open+0xd8/0x170)
[  153.078125] [<c00695ac>] (do_sys_open+0xd8/0x170) from [<c0009200>]
(ret_fast_syscall+0x0/0x2c)
[  153.078125] Code: 00000000 00000000 00000000 31313a30 (fdd20000)
[  153.078125] ---[ end trace ee2f60ac8ae81fb8 ]---

and another:
# flash_erase /dev/mtd0 0 8192
Erasing 16 Kibyte @ 7ffc000 -- 100 % complete
# ./ubiattach -m 0
[   97.273437] UBI: attaching mtd0 to ubi0
[   97.609375] UBI: scanning is finished
[   97.617187] UBI: empty MTD device detected
[   97.625000] ------------[ cut here ]------------
[   97.625000] kernel BUG at mm/slob.c:331!
[   97.625000] Internal error: Oops - BUG: 0 [#1] ARM
[   97.625000] CPU: 0    Not tainted  (3.6.0-rc1+ #888)
[   97.625000] PC is at slob_alloc.clone.18+0x174/0x1b4
[   97.625000] LR is at slob_page_alloc+0x1a8/0x1d0
[   97.625000] pc : [<c0068130>]    lr : [<c0067c40>]    psr: 60000093
[   97.625000] sp : c7af3e08  ip : 00000000  fp : 01620014
[   97.625000] r10: 00000000  r9 : a0000013  r8 : 00007bb3
[   97.625000] r7 : c0313000  r6 : 00000030  r5 : c040a660  r4 : c02d3908
[   97.625000] r3 : 01620014  r2 : 01620013  r1 : fe9dffec  r0 : 00000000
[   97.625000] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM
Segment user
[   97.625000] Control: 0005317f  Table: 27b4c000  DAC: 00000015
[   97.625000] Process ubiattach (pid: 351, stack limit = 0xc7af2270)
[   97.625000] Stack: (0xc7af3e08 to 0xc7af4000)
[   97.625000] 3e00:                   00000030 000000d0 01620014
c7b1c2a0 c7ba5314 00000000
[   97.625000] 3e20: c7ba52c0 c7b1c3e0 00000001 00000001 c7ba5310
c0068374 00000000 c7bae240
[   97.625000] 3e40: c7ba5314 c0174c40 00003e00 c7ad9a60 00000200
00000001 00003e00 00000000
[   97.625000] 3e60: 00000000 02000200 00000002 00000000 00003e00
7fffefff 00000001 c7ad9a60
[   97.625000] 3e80: c7b1c3e0 c7bae240 c7b1c450 c7ad9a60 c7b1c3e0
01000000 00000000 00000000
[   97.625000] 3ea0: 00000000 c01673a0 c7bae240 00000000 c7ad9a60
00000000 00000000 02000000
[   97.625000] 3ec0: 00000014 c89ca000 000080d2 c7ad9a60 c89ca000
c7b1c3e0 00000000 c89cde7c
[   97.625000] 3ee0: c7af2000 00000000 00000000 c0168374 c7ad9a60
c7b1c3e0 00000000 c79315c0
[   97.625000] 3f00: 00000014 c0175998 c7ad9a60 00000000 00000000
c016b260 c7aac3f0 c7aacc50
[   97.625000] 3f20: c7aa7020 40186f40 40186f40 00000000 bedd1b20
c79315c0 40186f40 00000003
[   97.625000] 3f40: c0009388 c016b758 ffffffff 00000000 00000000
00000000 00000000 00000000
[   97.625000] 3f60: bedd1b20 00000003 40186f40 c0078684 c7b36600
00000003 40186f40 c7b36600
[   97.625000] 3f80: bedd1b20 c00786f4 00000003 00000000 bedd1b20
bedd1b20 40186f40 00000003
[   97.625000] 3fa0: 00000036 c0009200 bedd1b20 40186f40 00000003
40186f40 bedd1b20 00000000
[   97.625000] 3fc0: bedd1b20 40186f40 00000003 00000036 ffffffff
0001442c ffffffff 00000000
[   97.625000] 3fe0: b6f7bec4 bedd1ae0 000098ec b6f7bf08 60000010
00000003 27ffe831 27ffec31
[   97.625000] [<c0068130>] (slob_alloc.clone.18+0x174/0x1b4) from
[<c0068374>] (kmem_cache_alloc_node+0x28/0x64)
[   97.625000] [<c0068374>] (kmem_cache_alloc_node+0x28/0x64) from
[<c0174c40>] (ubi_add_to_av+0x318/0x3fc)
[   97.625000] [<c0174c40>] (ubi_add_to_av+0x318/0x3fc) from
[<c01673a0>] (create_vtbl+0x1cc/0x258)
[   97.625000] [<c01673a0>] (create_vtbl+0x1cc/0x258) from
[<c0168374>] (ubi_read_volume_table+0xe0/0x1f0)
[   97.625000] [<c0168374>] (ubi_read_volume_table+0xe0/0x1f0) from
[<c0175998>] (ubi_attach+0x54/0xac)
[   97.625000] [<c0175998>] (ubi_attach+0x54/0xac) from [<c016b260>]
(ubi_attach_mtd_dev+0x1bc/0x474)
[   97.625000] [<c016b260>] (ubi_attach_mtd_dev+0x1bc/0x474) from
[<c016b758>] (ctrl_cdev_ioctl+0xd8/0x168)
[   97.625000] [<c016b758>] (ctrl_cdev_ioctl+0xd8/0x168) from
[<c0078684>] (do_vfs_ioctl+0x270/0x2ac)
[   97.625000] [<c0078684>] (do_vfs_ioctl+0x270/0x2ac) from
[<c00786f4>] (sys_ioctl+0x34/0x54)
[   97.625000] [<c00786f4>] (sys_ioctl+0x34/0x54) from [<c0009200>]
(ret_fast_syscall+0x0/0x2c)
[   97.625000] Code: e1a0200b ebfffe5b e250a000 1a000000 (e7f001f2)
[   97.625000] ---[ end trace 8743f692af56986c ]---
Segmentation fault

yet another one:
# ./ubiattach -m 0
[  159.718750] UBI: attaching mtd0 to ubi0
[  160.031250] UBI: scanning is finished
[  160.031250] UBI: empty MTD device detected
[  160.656250] UBI: attached mtd0 (name "NAND simulator partition 0",
size 128 MiB) to ubi0
[  160.664062] UBI: PEB size: 16384 bytes (16 KiB), LEB size: 15872 bytes
[  160.671875] UBI: min./max. I/O unit sizes: 512/512, sub-page size 256
[  160.679687] UBI: VID header offset: 256 (aligned 256), data offset: 512
[  160.687500] UBI: good PEBs: 8192, bad PEBs: 0, corrupted PEBs: 0
[  160.695312] UBI: user volume: 0, internal volumes: 1, max. volumes count: 92
[  160.703125] UBI: max/mean erase counter: 0/0, WL threshold: 4096,
image sequence number: 1661313839
[  160.710937] UBI: available PEBs: 8028, total reserved PEBs: 164,
PEBs reserved for bad PEB handling: 160
[  160.718750] UBI: background thread "ubi_bgt0d" started, PID 327
UBI device numb[  160.742187] Unable to handle kernel paging request
at virtual address 5af0c7b4
e[  160.750000] pgd = c0004000
r[  160.750000] [5af0c7b4] *pgd=00000000
0[  160.757812] Internal error: Oops: 5 [#1] ARM
[  160.757812] CPU: 0    Not tainted  (3.6.0-rc1+ #890)
[  160.757812] PC is at unlink_anon_vmas+0x2c/0x18c
[  160.757812] LR is at free_pgtables+0x28/0xa0
[  160.757812] pc : [<c0063a38>]    lr : [<c005b118>]    psr: 80000013
[  160.757812] sp : c7ab9eb0  ip : 00000880  fp : c0291e0f
[  160.757812] r10: b6eee000  r9 : 00100100  r8 : 5af0c7b4
[  160.757812] r7 : 6b30c7a5  r6 : c7abd8e0  r5 : 00000000  r4 : c7abfb7a
[  160.757812] r3 : c7abfb82  r2 : 00200000  r1 : 00008000  r0 : c7abd8a8
[  160.757812] Flags: Nzcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
[  160.757812] Control: 0005317f  Table: 27ae4000  DAC: 00000015
[  160.757812] Process ubiattach (pid: 325, stack limit = 0xc7ab8270)
[  160.757812] Stack: (0xc7ab9eb0 to 0xc7aba000)
[  160.757812] 9ea0:                                     c7abd8a8
c7abd8a8 00200000 c7abd788
[  160.757812] 9ec0: 00000000 00001000 c7ab9f08 c7abd8a8 c7abd8a8
b6eee000 00000000 c005b118
[  160.757812] 9ee0: b6eee000 c7ad5600 c7ac82a0 c7ad5600 00000000
c7ac82d4 c0009388 c7ab8000
[  160.757812] 9f00: 00000000 c006024c c7ac82a0 00000001 00000000
c0008ea0 c78f27e0 00000000
[  160.757812] 9f20: 00000400 c7b36000 c78f27e0 c7ac82a0 00000001
c7ab8000 c78f27e0 c7ac82a0
[  160.757812] 9f40: c7ac82a0 00000000 c7ac82a0 00000000 00000000
c0014bd4 c7ac82a0 c7ac8000
[  160.757812] 9f60: 00000000 c0019914 c7ac8000 0000003d c7a46780
c7ac8000 00000000 00000001
[  160.757812] 9f80: 000000f8 c001af2c 00000000 00000000 b6f5c2ec
c001b0d0 b6f1e98c c001b10c
[  160.757812] 9fa0: 00000000 c0009200 b6f1e98c 00000000 00000000
00060d4c 00060d24 00000000
[  160.757812] 9fc0: b6f1e98c 00000000 b6f5c2ec 000000f8 00000000
00000000 b6f6ff70 00000000
[  160.757812] 9fe0: b6f5bebc be80bbf0 b6f42820 b6efb23c 60000010
00000000 00000000 00000000
[  160.757812] [<c0063a38>] (unlink_anon_vmas+0x2c/0x18c) from
[<c005b118>] (free_pgtables+0x28/0xa0)
[  160.757812] [<c005b118>] (free_pgtables+0x28/0xa0) from
[<c006024c>] (exit_mmap+0xcc/0x19c)
[  160.757812] [<c006024c>] (exit_mmap+0xcc/0x19c) from [<c0014bd4>]
(mmput+0x38/0xa8)
[  160.757812] [<c0014bd4>] (mmput+0x38/0xa8) from [<c0019914>]
(exit_mm+0xe8/0xec)
[  160.757812] [<c0019914>] (exit_mm+0xe8/0xec) from [<c001af2c>]
(do_exit+0x1d0/0x2c4)
[  160.757812] [<c001af2c>] (do_exit+0x1d0/0x2c4) from [<c001b0d0>]
(do_group_exit+0x84/0xb0)
[  160.757812] [<c001b0d0>] (do_group_exit+0x84/0xb0) from
[<c001b10c>] (sys_exit_group+0x10/0x18)
[  160.757812] [<c001b10c>] (sys_exit_group+0x10/0x18) from
[<c0009200>] (ret_fast_syscall+0x0/0x2c)
[  160.757812] Code: e59fb158 e59f9158 ea000028 e5948004 (e598a000)
,[  160.984375] ---[ end trace a5ec5c26278be2bc ]---
 [  160.992187] Fixing recursive fault but reboot is needed!
total 8192 LEBs (130023424 bytes, 124.0 MiB), available 8028 LEBs
(127420416 bytes, 121.5 MiB), LEB size 15872 bytes (15.5 KiB)

as you can see, the oops is not always at the same place, and does not
happened at the same moment
BUT something important I forgot to tell:
# flash_erase /dev/mtd0 0 8192
# ubiformat /dev/mtd0
# ubiattach -m 0
If I do a ubiformat after the flash_erase, I don't have an oops.

> We renamed all scan functions recently, so AFAICS you are not using the
> latest UBI code-base. How about picking the latest back-port tree?

Did the same thing, with the new UBI code, same result, once those are
not freed, I don't get oopses anymore.
diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c
index 64b9c56..6b9d6d8 100644
--- a/drivers/mtd/ubi/vtbl.c
+++ b/drivers/mtd/ubi/vtbl.c
@@ -340,8 +340,8 @@ retry:
         * of this LEB as it will be deleted and freed in 'ubi_add_to_av()'.
         */
        err = ubi_add_to_av(ubi, ai, new_aeb->pnum, new_aeb->ec, vid_hdr, 0);
-       kfree(new_aeb);
-       ubi_free_vid_hdr(ubi, vid_hdr);
+//     kfree(new_aeb);
+//     ubi_free_vid_hdr(ubi, vid_hdr);
        return err;

 write_error:

> This is strange, I think these 2 frees are all-right, I think the
> root-cause is somewhere else.
Yes, I didn't see neither the problem with those.
It's like the new_aeb and vid_hdr structs are still used after being
freed, but I couldn't find out where.

But once again, as I can't boot with a vanilla kernel or linux-ubi
kernel, I can't guarantee that this bug comes from UBI and not from
somewhere else.


here is the "minimal" .config I used:
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
CONFIG_GENERIC_GPIO=y
CONFIG_HAVE_PROC_CPU=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_TRACE_IRQFLAGS_SUPPORT=y
CONFIG_RWSEM_GENERIC_SPINLOCK=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_GENERIC_BUG=y
CONFIG_HAVE_IRQ_WORK=y
CONFIG_EXPERIMENTAL=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_HAVE_KERNEL_GZIP=y
CONFIG_HAVE_KERNEL_LZMA=y
CONFIG_HAVE_KERNEL_XZ=y
CONFIG_HAVE_KERNEL_LZO=y
CONFIG_KERNEL_LZO=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
CONFIG_HAVE_GENERIC_HARDIRQS=y
CONFIG_GENERIC_HARDIRQS=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_GENERIC_IRQ_SHOW=y
CONFIG_HARDIRQS_SW_RESEND=y
CONFIG_IRQ_DOMAIN=y
CONFIG_SPARSE_IRQ=y
CONFIG_KTIME_SCALAR=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
CONFIG_TINY_RCU=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL=y
CONFIG_ANON_INODES=y
CONFIG_EXPERT=y
CONFIG_UID16=y
CONFIG_KALLSYMS=y
CONFIG_KALLSYMS_ALL=y
CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_AIO=y
CONFIG_EMBEDDED=y
CONFIG_HAVE_PERF_EVENTS=y
CONFIG_PERF_USE_VMALLOC=y
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_COMPAT_BRK=y
CONFIG_SLOB=y
CONFIG_HAVE_OPROFILE=y
CONFIG_HAVE_KPROBES=y
CONFIG_HAVE_KRETPROBES=y
CONFIG_HAVE_ARCH_TRACEHOOK=y
CONFIG_HAVE_DMA_ATTRS=y
CONFIG_GENERIC_SMP_IDLE_THREAD=y
CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
CONFIG_HAVE_CLK=y
CONFIG_HAVE_DMA_API_DEBUG=y
CONFIG_HAVE_ARCH_JUMP_LABEL=y
CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
CONFIG_HAVE_GENERIC_DMA_COHERENT=y
CONFIG_RT_MUTEXES=y
CONFIG_BLOCK=y
CONFIG_MSDOS_PARTITION=y
CONFIG_IOSCHED_NOOP=y
CONFIG_DEFAULT_NOOP=y
CONFIG_INLINE_SPIN_UNLOCK_IRQ=y
CONFIG_INLINE_READ_UNLOCK=y
CONFIG_INLINE_READ_UNLOCK_IRQ=y
CONFIG_INLINE_WRITE_UNLOCK=y
CONFIG_INLINE_WRITE_UNLOCK_IRQ=y
CONFIG_MMU=y
CONFIG_ARCH_AT91=y
CONFIG_HAVE_AT91_DBGU0=y
CONFIG_AT91_SAM9_ALT_RESET=y
CONFIG_AT91_SAM9G45_RESET=y
CONFIG_SOC_AT91SAM9=y
CONFIG_SOC_AT91SAM9X5=y
CONFIG_ARCH_AT91SAM9X5=y
CONFIG_AT91_PMC_UNIT=y
CONFIG_MACH_AT91SAM_DT=y
CONFIG_AT91_PROGRAMMABLE_CLOCKS=y
CONFIG_CPU_ARM926T=y
CONFIG_CPU_32v5=y
CONFIG_CPU_ABRT_EV5TJ=y
CONFIG_CPU_PABRT_LEGACY=y
CONFIG_CPU_CACHE_VIVT=y
CONFIG_CPU_COPY_V4WB=y
CONFIG_CPU_TLB_V4WBI=y
CONFIG_CPU_CP15=y
CONFIG_CPU_CP15_MMU=y
CONFIG_CPU_USE_DOMAINS=y
CONFIG_ARM_THUMB=y
CONFIG_MULTI_IRQ_HANDLER=y
CONFIG_VMSPLIT_3G=y
CONFIG_PREEMPT_NONE=y
CONFIG_AEABI=y
CONFIG_OABI_COMPAT=y
CONFIG_HAVE_ARCH_PFN_VALID=y
CONFIG_SELECT_MEMORY_MODEL=y
CONFIG_FLATMEM_MANUAL=y
CONFIG_FLATMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y
CONFIG_HAVE_MEMBLOCK=y
CONFIG_PAGEFLAGS_EXTENDED=y
CONFIG_VIRT_TO_BUS=y
CONFIG_NEED_PER_CPU_KM=y
CONFIG_ALIGNMENT_TRAP=y
CONFIG_UACCESS_WITH_MEMCPY=y
CONFIG_USE_OF=y
CONFIG_ARM_APPENDED_DTB=y
CONFIG_ARM_ATAG_DTB_COMPAT=y
CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y
CONFIG_AUTO_ZRELADDR=y
CONFIG_FPE_FASTFPE=y
CONFIG_BINFMT_ELF=y
CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y
CONFIG_HAVE_AOUT=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_UNIX=y
CONFIG_INET=y
CONFIG_IP_PNP=y
CONFIG_IP_PNP_DHCP=y
CONFIG_INET_LRO=y
CONFIG_BQL=y
CONFIG_HAVE_BPF_JIT=y
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_MTD=y
CONFIG_MTD_CMDLINE_PARTS=y
CONFIG_MTD_OF_PARTS=y
CONFIG_MTD_CHAR=y
CONFIG_MTD_BLKDEVS=y
CONFIG_MTD_BLOCK=y
CONFIG_MTD_MAP_BANK_WIDTH_1=y
CONFIG_MTD_MAP_BANK_WIDTH_2=y
CONFIG_MTD_MAP_BANK_WIDTH_4=y
CONFIG_MTD_CFI_I1=y
CONFIG_MTD_CFI_I2=y
CONFIG_MTD_NAND_ECC=y
CONFIG_MTD_NAND=y
CONFIG_MTD_NAND_IDS=y
CONFIG_MTD_NAND_NANDSIM=y
CONFIG_MTD_UBI=y
CONFIG_DTC=y
CONFIG_OF=y
CONFIG_PROC_DEVICETREE=y
CONFIG_OF_FLATTREE=y
CONFIG_OF_EARLY_FLATTREE=y
CONFIG_OF_ADDRESS=y
CONFIG_OF_IRQ=y
CONFIG_OF_DEVICE=y
CONFIG_OF_NET=y
CONFIG_OF_MDIO=y
CONFIG_OF_MTD=y
CONFIG_BLK_DEV=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_RAM=y
CONFIG_SCSI_MOD=y
CONFIG_NETDEVICES=y
CONFIG_NET_CORE=y
CONFIG_MII=y
CONFIG_ETHERNET=y
CONFIG_HAVE_NET_MACB=y
CONFIG_NET_CADENCE=y
CONFIG_MACB=y
CONFIG_PHYLIB=y
CONFIG_DAVICOM_PHY=y
CONFIG_INPUT=y
CONFIG_SERIO=y
CONFIG_SERIO_SERPORT=y
CONFIG_SERIO_LIBPS2=y
CONFIG_VT=y
CONFIG_CONSOLE_TRANSLATIONS=y
CONFIG_VT_CONSOLE=y
CONFIG_HW_CONSOLE=y
CONFIG_UNIX98_PTYS=y
CONFIG_SERIAL_ATMEL=y
CONFIG_SERIAL_ATMEL_CONSOLE=y
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_PINCTRL=y
CONFIG_PINMUX=y
CONFIG_PINCTRL_AT91=y
CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y
CONFIG_ARCH_REQUIRE_GPIOLIB=y
CONFIG_GPIOLIB=y
CONFIG_OF_GPIO=y
CONFIG_SSB_POSSIBLE=y
CONFIG_BCMA_POSSIBLE=y
CONFIG_HAVE_FB_ATMEL=y
CONFIG_DUMMY_CONSOLE=y
CONFIG_HID=y
CONFIG_HIDRAW=y
CONFIG_HID_GENERIC=y
CONFIG_USB_ARCH_HAS_OHCI=y
CONFIG_USB_ARCH_HAS_EHCI=y
CONFIG_RTC_LIB=y
CONFIG_CLKDEV_LOOKUP=y
CONFIG_FILE_LOCKING=y
CONFIG_FSNOTIFY=y
CONFIG_DNOTIFY=y
CONFIG_INOTIFY_USER=y
CONFIG_FANOTIFY=y
CONFIG_PROC_FS=y
CONFIG_PROC_SYSCTL=y
CONFIG_PROC_PAGE_MONITOR=y
CONFIG_SYSFS=y
CONFIG_TMPFS=y
CONFIG_NETWORK_FILESYSTEMS=y
CONFIG_NFS_FS=y
CONFIG_NFS_V2=y
CONFIG_ROOT_NFS=y
CONFIG_LOCKD=y
CONFIG_NFS_COMMON=y
CONFIG_SUNRPC=y
CONFIG_PRINTK_TIME=y
CONFIG_ENABLE_WARN_DEPRECATED=y
CONFIG_ENABLE_MUST_CHECK=y
CONFIG_STRIP_ASM_SYMS=y
CONFIG_DEBUG_FS=y
CONFIG_DEBUG_SECTION_MISMATCH=y
CONFIG_DEBUG_KERNEL=y
CONFIG_DEBUG_BUGVERBOSE=y
CONFIG_DEBUG_INFO=y
CONFIG_HAVE_FUNCTION_TRACER=y
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
CONFIG_HAVE_DYNAMIC_FTRACE=y
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
CONFIG_HAVE_C_RECORDMCOUNT=y
CONFIG_TRACING_SUPPORT=y
CONFIG_HAVE_ARCH_KGDB=y
CONFIG_ARM_UNWIND=y
CONFIG_DEBUG_USER=y
CONFIG_DEFAULT_SECURITY_DAC=y
CONFIG_BITREVERSE=y
CONFIG_GENERIC_STRNCPY_FROM_USER=y
CONFIG_GENERIC_STRNLEN_USER=y
CONFIG_GENERIC_PCI_IOMAP=y
CONFIG_GENERIC_IO=y
CONFIG_CRC32=y
CONFIG_CRC32_SLICEBY8=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_HAS_DMA=y
CONFIG_DQL=y
CONFIG_NLATTR=y
CONFIG_GENERIC_ATOMIC64=y
CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 0/6] UBI: add max_beb_per1024 parameter / ioctl
  2012-09-03 10:57                 ` Richard Genoud
@ 2012-09-03 11:53                   ` Artem Bityutskiy
  2012-09-03 13:14                     ` Richard Genoud
  0 siblings, 1 reply; 35+ messages in thread
From: Artem Bityutskiy @ 2012-09-03 11:53 UTC (permalink / raw)
  To: Richard Genoud; +Cc: linux-mtd, Shmulik Ladkani

[-- Attachment #1: Type: text/plain, Size: 1858 bytes --]

On Mon, 2012-09-03 at 12:57 +0200, Richard Genoud wrote:
> > If you could somehow reproduce this with nandsim, it would make it easy
> > for me to find the bug.
> here it is:
> [    0.921875] [nandsim] warning: read_byte: unexpected data output
> cycle, state is STATE_READY return 0x0
> [    0.929687] [nandsim] warning: read_byte: unexpected data output
> cycle, state is STATE_READY return 0x0
> [    0.937500] [nandsim] warning: read_byte: unexpected data output
> cycle, state is STATE_READY return 0x0
> [    0.953125] [nandsim] warning: read_byte: unexpected data output
> cycle, state is STATE_READY return 0x0
> [    0.960937] [nandsim] warning: read_byte: unexpected data output
> cycle, state is STATE_READY return 0x0
> [    0.968750] [nandsim] warning: read_byte: unexpected data output
> cycle, state is STATE_READY return 0x0
> [    0.976562] NAND device: Manufacturer ID: 0x98, Chip ID: 0x39
> (Toshiba NAND 128MiB 1,8V 8-bit), page size: 512, OOB size: 16
> [    0.992187] flash size: 128 MiB
> [    0.992187] page size: 512 bytes
> [    0.992187] OOB area size: 16 bytes
> [    1.000000] sector size: 16 KiB
> [    1.000000] pages number: 262144
> [    1.007812] pages per sector: 32
> [    1.007812] bus width: 8
> [    1.007812] bits in sector size: 14
> [    1.015625] bits in page size: 9
> [    1.015625] bits in OOB size: 4
> [    1.023437] flash size with OOB: 135168 KiB
> [    1.023437] page address bytes: 4
> [    1.031250] sector address bytes: 3
> [    1.031250] options: 0x42
> [    1.039062] Scanning device for bad blocks
> [    1.242187] Creating 1 MTD partitions on "NAND 128MiB 1,8V 8-bit":
> [    1.250000] 0x000000000000-0x000008000000 : "NAND simulator partition 0"
> 
> # flash_erase /dev/mtd0 0 8192

Hmm, cannot reproduce on my x86_64.

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 0/6] UBI: add max_beb_per1024 parameter / ioctl
  2012-09-03 11:53                   ` Artem Bityutskiy
@ 2012-09-03 13:14                     ` Richard Genoud
  2012-09-03 13:31                       ` Artem Bityutskiy
  0 siblings, 1 reply; 35+ messages in thread
From: Richard Genoud @ 2012-09-03 13:14 UTC (permalink / raw)
  To: dedekind1; +Cc: linux-mtd, Shmulik Ladkani

[-- Attachment #1: Type: text/plain, Size: 42233 bytes --]

I finally managed to reproduced it on linux-ubi/master + only one
patch to make my board boot:
(I thought it needed much more code than that...)
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index c8050b1..c6eb877 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -141,6 +141,10 @@ config ARCH_AT91SAM9G45
	bool "AT91SAM9G45"
	select SOC_AT91SAM9G45

+config ARCH_AT91SAM9X5
+	bool "AT91SAM9x5"
+	select SOC_AT91SAM9X5
+
 config ARCH_AT91X40
	bool "AT91x40"
	depends on !MMU

The 1st try was a complete hang, with no trace at all. And here are 3
differents oops:

# flash_erase /dev/mtd0 0 8192
Erasing 16 Kibyte @ 7ffc000 -- 100 % complete
# ubiattach -m 0
[  162.984375] UBI: attaching mtd0 to ubi0
[  163.273437] UBI: scanning is finished
[  163.273437] UBI: empty MTD device detected
[  163.289062] ------------[ cut here ]------------
[  163.289062] kernel BUG at mm/slob.c:331!
[  163.289062] Internal error: Oops - BUG: 0 [#1] ARM
[  163.289062] CPU: 0    Not tainted  (3.6.0-rc1+ #893)
[  163.289062] PC is at slob_alloc.clone.18+0x17c/0x1c0
[  163.289062] LR is at slob_page_alloc+0x1a8/0x1d0
[  163.289062] pc : [<c006c23c>]    lr : [<c006bd28>]    psr: 60000093
[  163.289062] sp : c740fd30  ip : 00000000  fp : 04f20014
[  163.289062] r10: 00000000  r9 : a0000013  r8 : 00007406
[  163.289062] r7 : c02a5000  r6 : 00000030  r5 : c038d0c0  r4 : c0281c70
[  163.289062] r3 : 04f20014  r2 : 04f20013  r1 : fb0dffec  r0 : 00000000
[  163.289062] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM
Segment user
[  163.289062] Control: 0005317f  Table: 27a9c000  DAC: 00000015
[  163.289062] Process ubiattach (pid: 336, stack limit = 0xc740e270)
[  163.289062] Stack: (0xc740fd30 to 0xc7410000)
[  163.289062] fd20:                                     00000030
000000d0 04f20014 c7aac9c0
[  163.289062] fd40: 00000000 c7401060 c7aac940 c74010b4 c7ac1960
c74010b0 00000000 c006c4a8
[  163.289062] fd60: 00000000 c7b2b560 00000000 c013a6b8 00003e00
c01378dc 00003e00 c740fdac
[  163.289062] fd80: c8970000 c7b2b560 00000002 00000000 00000001
7fffefff 00000001 00000000
[  163.289062] fda0: 00000001 02000200 c7aac940 00000001 00000000
c7b2b560 c7aace08 c7ac1960
[  163.289062] fdc0: c7aac940 01000000 00000000 00000000 00000000
c012dd94 c7b2b560 00000000
[  163.289062] fde0: c7ac1960 00000000 00000000 02000000 c7a2d260
c8970000 000080d2 c7ac1960
[  163.289062] fe00: c8970000 00000000 c7aac940 c8973e7c c7aac94c
000000a0 00000000 c012e574
[  163.289062] fe20: 00000000 00000000 00000000 00002000 c7aac940
00000000 c7aac940 c7ac1960
[  163.289062] fe40: 00000199 c7a2d260 c7aac94c 000000a0 00000000
c013c00c ffffffff 00000000
[  163.289062] fe60: c7aac954 00000040 80000013 c0281c70 c7aac954
c7aac944 c7aac94c c7aac95c
[  163.289062] fe80: 00000040 000080d0 00000020 00000020 c7ac1960
c7ac1ddc 00000140 fffffe00
[  163.289062] fea0: c7ac1960 00000000 00000000 c7a2d260 00000000
000000a0 00000000 c01317d8
[  163.289062] fec0: c7a42010 c7a3bed0 00000002 00000000 00000000
c740ff78 00000001 bead4af8
[  163.289062] fee0: c7a2d260 bead4af8 c7a3e4b0 00000003 c740e000
00000000 00000000 c0131fa8
[  163.289062] ff00: ffffffff 00000000 00000000 00000000 00000000
00000000 c7ac7c00 bead4af8
[  163.289062] ff20: bead4af8 c007c5b4 00000000 00000000 00000000
00000000 00000000 00000003
[  163.289062] ff40: 00000003 c0385a20 00000000 c004f75c 00000000
00000003 c7ac7c00 c7051000
[  163.289062] ff60: c7ac7c08 c006c520 c027a224 c7ac7c00 bead4af8
40186f40 00000003 c000d9c4
[  163.289062] ff80: c740e000 c007c66c 00000003 00000000 bead4af8
bead4af8 40186f40 00000003
[  163.289062] ffa0: 00000036 c000d860 bead4af8 40186f40 00000003
40186f40 bead4af8 00000000
[  163.289062] ffc0: bead4af8 40186f40 00000003 00000036 00000003
bead4db4 00000000 00000000
[  163.289062] ffe0: b6f62ec4 bead4ab0 000098c8 b6f62f08 60000010
00000003 00000000 08000002
[  163.289062] [<c006c23c>] (slob_alloc.clone.18+0x17c/0x1c0) from
[<c006c4a8>] (kmem_cache_alloc_node+0x28/0x64)
[  163.289062] [<c006c4a8>] (kmem_cache_alloc_node+0x28/0x64) from
[<c013a6b8>] (ubi_add_to_av+0x6c0/0x7cc)
[  163.289062] [<c013a6b8>] (ubi_add_to_av+0x6c0/0x7cc) from
[<c012dd94>] (create_vtbl+0x1cc/0x258)
[  163.289062] [<c012dd94>] (create_vtbl+0x1cc/0x258) from
[<c012e574>] (ubi_read_volume_table+0xe4/0x960)
[  163.289062] [<c012e574>] (ubi_read_volume_table+0xe4/0x960) from
[<c013c00c>] (ubi_attach+0x13d0/0x147c)
[  163.289062] [<c013c00c>] (ubi_attach+0x13d0/0x147c) from
[<c01317d8>] (ubi_attach_mtd_dev+0x58c/0xb20)
[  163.289062] [<c01317d8>] (ubi_attach_mtd_dev+0x58c/0xb20) from
[<c0131fa8>] (ctrl_cdev_ioctl+0xd8/0x168)
[  163.289062] [<c0131fa8>] (ctrl_cdev_ioctl+0xd8/0x168) from
[<c007c5b4>] (do_vfs_ioctl+0x4c0/0x544)
[  163.289062] [<c007c5b4>] (do_vfs_ioctl+0x4c0/0x544) from
[<c007c66c>] (sys_ioctl+0x34/0x54)
[  163.289062] [<c007c66c>] (sys_ioctl+0x34/0x54) from [<c000d860>]
(ret_fast_syscall+0x0/0x2c)
[  163.289062] Code: e1a0200b ebfffe52 e250a000 1a000000 (e7f001f2)
[  163.289062] ---[ end trace adca1a6dde15e0c1 ]---
Segmentation fault
#

another:
# flash_erase /dev/mtd0 0 8192
Erasing 16 Kibyte @ 7ffc000 -- 100 % complete
# ubiattach -m 0
[   61.882812] UBI: attaching mtd0 to ubi0
[   62.171875] UBI: scanning is finished
[   62.179687] UBI: empty MTD device detected
[   62.187500] Unable to handle kernel NULL pointer dereference at
virtual address 00000000
[   62.195312] pgd = c7adc000
[   62.203125] [00000000] *pgd=27ad9831, *pte=00000000, *ppte=00000000
[   62.203125] Internal error: Oops: 17 [#1] ARM
[   62.203125] CPU: 0    Not tainted  (3.6.0-rc1+ #893)
[   62.203125] PC is at ubi_wl_init+0x138/0x36c
[   62.203125] LR is at schedule_erase+0x50/0x64
[   62.203125] pc : [<c0139b18>]    lr : [<c013845c>]    psr: 60000013
[   62.203125] sp : c7acbe28  ip : 00008000  fp : 00000000
[   62.203125] r10: c7ad2890  r9 : c029ff5c  r8 : ffffffe0
[   62.203125] r7 : c7aaef00  r6 : c7aaef14  r5 : c7ad2508  r4 : c7a6e440
[   62.203125] r3 : 00000000  r2 : c7a6e838  r1 : c7ad2860  r0 : 00000000
[   62.203125] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
[   62.203125] Control: 0005317f  Table: 27adc000  DAC: 00000015
[   62.203125] Process ubiattach (pid: 329, stack limit = 0xc7aca270)
[   62.203125] Stack: (0xc7acbe28 to 0xc7acc000)
[   62.203125] be20:                   00000000 c7aaef00 7fffefff
00000000 c7aaef00 c7a6e440
[   62.203125] be40: 00000199 c7a2d260 c7aaef0c 000000a0 00000000
c013c020 ffffffff 00000000
[   62.203125] be60: c7aaef14 00000040 80000013 c039a634 c7aaef14
c7aaef04 c7aaef0c c7aaef1c
[   62.203125] be80: 00000040 000080d0 00000020 00000020 c7a6e440
c7a6e8bc 00000140 fffffe00
[   62.203125] bea0: c7a6e440 00000000 00000000 c7a2d260 00000000
000000a0 00000000 c01317d8
[   62.203125] bec0: c7a42010 c7a3bed0 00000002 00000000 00000000
c7acbf78 00000001 be873af8
[   62.203125] bee0: c7a2d260 be873af8 c7a3e4b0 00000003 c7aca000
00000000 00000000 c0131fa8
[   62.203125] bf00: ffffffff 00000000 00000000 00000000 00000000
00000000 c7aadae0 be873af8
[   62.203125] bf20: be873af8 c007c5b4 00000000 00000000 00000000
00000000 00000000 00000003
[   62.203125] bf40: 00000003 c039a100 00000000 c004f75c 00000000
00000003 c7aadae0 c7a88000
[   62.203125] bf60: c7aadae8 c006c520 c027a224 c7aadae0 be873af8
40186f40 00000003 c000d9c4
[   62.203125] bf80: c7aca000 c007c66c 00000003 00000000 be873af8
be873af8 40186f40 00000003
[   62.203125] bfa0: 00000036 c000d860 be873af8 40186f40 00000003
40186f40 be873af8 00000000
[   62.203125] bfc0: be873af8 40186f40 00000003 00000036 00000003
be873db4 00000000 00000000
[   62.203125] bfe0: b6ed3ec4 be873ab0 000098c8 b6ed3f08 60000010
00000003 27ffe831 27ffec31
[   62.203125] [<c0139b18>] (ubi_wl_init+0x138/0x36c) from
[<c013c020>] (ubi_attach+0x13e4/0x147c)
[   62.203125] [<c013c020>] (ubi_attach+0x13e4/0x147c) from
[<c01317d8>] (ubi_attach_mtd_dev+0x58c/0xb20)
[   62.203125] [<c01317d8>] (ubi_attach_mtd_dev+0x58c/0xb20) from
[<c0131fa8>] (ctrl_cdev_ioctl+0xd8/0x168)
[   62.203125] [<c0131fa8>] (ctrl_cdev_ioctl+0xd8/0x168) from
[<c007c5b4>] (do_vfs_ioctl+0x4c0/0x544)
[   62.203125] [<c007c5b4>] (do_vfs_ioctl+0x4c0/0x544) from
[<c007c66c>] (sys_ioctl+0x34/0x54)
[   62.203125] [<c007c66c>] (sys_ioctl+0x34/0x54) from [<c000d860>]
(ret_fast_syscall+0x0/0x2c)
[   62.203125] Code: e1a01005 e5930000 ebfcca73 ea000074 (e5983020)
[   62.460937] ---[ end trace 41b3746085dc3822 ]---
Segmentation fault



and a big one:
# ubiattach -m 0
[   44.507812] UBI: attaching mtd0 to ubi0
[   44.796875] UBI: scanning is finished
[   44.804687] UBI: empty MTD device detected
[   44.820312] BUG: Bad page state in process klogd  pfn:27ad3
[   44.820312] page:c039aa60 count:0 mapcount:81 mapping:  (null)
index:0xc7ad3ae0
[   44.828125] page flags: 0x800(private)
[   44.835937] [<c00119e8>] (unwind_backtrace+0x0/0xe4) from
[<c004ef88>] (bad_page+0xcc/0xf8)
[   44.843750] [<c004ef88>] (bad_page+0xcc/0xf8) from [<c004fea8>]
(get_page_from_freelist+0x38c/0x4b8)
[   44.851562] [<c004fea8>] (get_page_from_freelist+0x38c/0x4b8) from
[<c00500bc>] (__alloc_pages_nodemask+0xe8/0x5e4)
[   44.859375] [<c00500bc>] (__alloc_pages_nodemask+0xe8/0x5e4) from
[<c006c084>] (slob_new_pages.clone.17+0x10/0x4c)
[   44.875000] [<c006c084>] (slob_new_pages.clone.17+0x10/0x4c) from
[<c006c4c4>] (kmem_cache_alloc_node+0x44/0x64)
[   44.882812] [<c006c4c4>] (kmem_cache_alloc_node+0x44/0x64) from
[<c00762d4>] (getname_flags+0x24/0x94)
[   44.890625] [<c00762d4>] (getname_flags+0x24/0x94) from
[<c006d6a8>] (do_sys_open+0xa0/0x170)
[   44.898437] [<c006d6a8>] (do_sys_open+0xa0/0x170) from [<c000d860>]
(ret_fast_syscall+0x0/0x2c)
[   44.906250] Disabling lock debugging due to kernel taint
[   44.914062] Unable to handle kernel paging request at virtual
address 00100104
[   44.914062] pgd = c7aa8000
[   44.914062] [00100104] *pgd=27a7e831, *pte=00000000, *ppte=00000000
[   44.914062] Internal error: Oops: 817 [#1] ARM
[   44.914062] CPU: 0    Tainted: G    B         (3.6.0-rc1+ #893)
[   44.914062] PC is at get_page_from_freelist+0x24c/0x4b8
[   44.914062] LR is at get_page_from_freelist+0x38c/0x4b8
[   44.914062] pc : [<c004fd68>]    lr : [<c004fea8>]    psr: 60000093
[   44.914062] sp : c7aa1e68  ip : 60000013  fp : 60000013
[   44.914062] r10: c039aa60  r9 : c029ad10  r8 : c0290b10
[   44.914062] r7 : b6fcd990  r6 : c0290558  r5 : c03ae04c  r4 : 00000000
[   44.914062] r3 : 00200200  r2 : 00100100  r1 : 00200200  r0 : 00000000
[   44.914062] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM
Segment user
[   44.914062] Control: 0005317f  Table: 27aa8000  DAC: 00000015
[   44.914062] Process klogd (pid: 302, stack limit = 0xc7aa0270)
[   44.914062] Stack: (0xc7aa1e68 to 0xc7aa2000)
[   44.914062] 1e60:                   00000041 00000000 c7aa1ec0
000200d0 00000001 00000008
[   44.914062] 1e80: c0290b14 00000000 ffffffff 00000000 c7aa0000
00000000 00000101 00000000
[   44.914062] 1ea0: c7b420c0 c0290558 fffffdee 000000d0 01ffffff
00000000 b6fcd990 c0290b10
[   44.914062] 1ec0: 00000000 00000000 c0290558 c00500bc 00000000
00000041 c0290558 00000000
[   44.914062] 1ee0: 00000000 00000000 c7a6f000 00000000 000200d0
c78296a0 c78296d8 c00eded0
[   44.914062] 1f00: c02809b8 c78296a0 c78296a0 c02809b8 c78296d0
c0290558 c0038dac c7802780
[   44.914062] 1f20: 00000000 00000000 b6fcd990 c000d9c4 c7aa0000
00000000 0000000a c006c084
[   44.914062] 1f40: 00000020 c006c4c4 c027a224 00000000 00000000
c00762d4 00000000 00000000
[   44.914062] 1f60: ffffff9c beefb7d0 00000001 c006d6a8 c7aa1f90
0000004e 00000000 beef0000
[   44.914062] 1f80: 00000024 00000100 00000000 00000000 b6fd9eb0
beefb7d0 00000005 c000d9c4
[   44.914062] 1fa0: 00000000 c000d860 00000000 b6fd9eb0 b6fcd990
00000000 00000054 b6fd9eb0
[   44.914062] 1fc0: 00000000 b6fd9eb0 beefb7d0 00000005 b6fda040
00000fff 000a6e38 0000000a
[   44.914062] 1fe0: beefbc54 beefb710 b6f93ed4 b6fc376c 60000010
b6fcd990 00000000 00000000
[   44.914062] [<c004fd68>] (get_page_from_freelist+0x24c/0x4b8) from
[<c00500bc>] (__alloc_pages_nodemask+0xe8/0x5e4)
[   44.914062] [<c00500bc>] (__alloc_pages_nodemask+0xe8/0x5e4) from
[<c006c084>] (slob_new_pages.clone.17+0x10/0x4c)
[   44.914062] [<c006c084>] (slob_new_pages.clone.17+0x10/0x4c) from
[<c006c4c4>] (kmem_cache_alloc_node+0x44/0x64)
[   44.914062] [<c006c4c4>] (kmem_cache_alloc_node+0x44/0x64) from
[<c00762d4>] (getname_flags+0x24/0x94)
[   44.914062] [<c00762d4>] (getname_flags+0x24/0x94) from
[<c006d6a8>] (do_sys_open+0xa0/0x170)
[   44.914062] [<c006d6a8>] (do_sys_open+0xa0/0x170) from [<c000d860>]
(ret_fast_syscall+0x0/0x2c)
[   44.914062] Code: e59f1254 e24aa014 e59a3018 e59a2014 (e5823004)
[   44.914062] ---[ end trace 4f68e63fbfe364d4 ]---
[   44.914062] Unable to handle kernel paging request at virtual
address 00100104
[   44.914062] pgd = c0004000
[   44.914062] [00100104] *pgd=00000000
[   44.914062] Internal error: Oops: 817 [#2] ARM
[   44.914062] CPU: 0    Tainted: G    B D       (3.6.0-rc1+ #893)
[   44.914062] PC is at get_page_from_freelist+0x24c/0x4b8
[   44.914062] LR is at zone_watermark_ok+0x18/0x1c
[   44.914062] pc : [<c004fd68>]    lr : [<c004dce0>]    psr: 60000093
[   44.914062] sp : c7aa1b78  ip : 00000041  fp : 60000093
[   44.914062] r10: c039aa60  r9 : c029ad10  r8 : c0290b10
[   44.914062] r7 : c7a776f4  r6 : c0290558  r5 : c03ae04c  r4 : 00000000
[   44.914062] r3 : 00200200  r2 : 00100100  r1 : 00200200  r0 : 00000001
[   44.914062] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM
Segment user
[   44.914062] Control: 0005317f  Table: 27aa8000  DAC: 00000015
[   44.914062] Process klogd (pid: 302, stack limit = 0xc7aa0270)
[   44.914062] Stack: (0xc7aa1b78 to 0xc7aa2000)
[   44.914062] 1b60:
    00000041 c0291934
[   44.914062] 1b80: c0294d50 00020200 00000001 00000008 c0290b14
00000000 ffffffff 00000000
[   44.914062] 1ba0: c7aa0000 00000000 c7aa1c08 00000000 00000001
c0290558 00000006 00000200
[   44.914062] 1bc0: 01ffffff 00000000 c7a776f4 c0290b10 00000000
00000000 c0290558 c00500bc
[   44.914062] 1be0: 00000000 00000041 c0290558 00000000 c0291934
00000000 c02815fc c0290558
[   44.914062] 1c00: 00020200 c0281618 00000001 c00530f4 000002dc
c0053b3c c02815fc c0290558
[   44.914062] 1c20: 00000001 c0290558 c02815bc c7a776c0 c7a95d20
00000000 c7a776f4 00000817
[   44.914062] 1c40: c7a776f4 60000093 00000001 c005063c c7aa1c78
c0063e08 c7a776c0 00000001
[   44.914062] 1c60: 00000000 00000001 00000093 00000000 00000008
c7aa1c78 00000006 00000004
[   44.914062] 1c80: c0291d5e 00000000 00000000 60000093 c7a776c0
00000000 c7a776c0 00000000
[   44.914062] 1ca0: 00000000 c00175a8 c7a776c0 c7a6f000 00000000
c001c5bc c7a6f000 00000000
[   44.914062] 1cc0: c7a77be0 c7a6f000 0000000b c7aa0000 c0220eac
c001db5c 00010000 c01d5d18
[   44.914062] 1ce0: c0222c31 c7aa1cfc 00000002 c7aa1e20 0000000b
c7aa0000 c0220eac 00000817
[   44.914062] 1d00: c7a776f4 60000093 00010000 c00109f4 c7aa0270
0000000b 00000817 00100104
[   44.914062] 1d20: 00000817 c7a776c0 c7aa1e20 00000000 00000029
c0012888 00100104 c7aa1e20
[   44.914062] 1d40: c7a6f000 c7a776c0 00000817 c0012ae8 00100104
00000817 c7aa1e20 00000817
[   44.914062] 1d60: 00000007 00100104 c7aa1e20 c027cfe0 c029ad10
c039aa60 60000013 c00085a0
[   44.914062] 1d80: 00000000 c0049100 c7a6f000 00000012 00000000
c000e0d8 fefff000 c001ae94
[   44.914062] 1da0: 60000013 c000d500 0000006f 00000001 c027f360
c027f360 0000002c 00000006
[   44.914062] 1dc0: 00000004 c0291d5e 00000000 00000000 60000013
00000000 60000093 c7aa1df0
[   44.914062] 1de0: c001ae90 c001ae94 60000013 ffffffff 00000000
00000000 00000000 00000000
[   44.914062] 1e00: c0291d5e 0000002c c004fd68 60000093 ffffffff
c7aa1e54 c0290b10 c000d498
[   44.914062] 1e20: 00000000 00200200 00100100 00200200 00000000
c03ae04c c0290558 b6fcd990
[   44.914062] 1e40: c0290b10 c029ad10 c039aa60 60000013 60000013
c7aa1e68 c004fea8 c004fd68
[   44.914062] 1e60: 60000093 ffffffff 00000041 00000000 c7aa1ec0
000200d0 00000001 00000008
[   44.914062] 1e80: c0290b14 00000000 ffffffff 00000000 c7aa0000
00000000 00000101 00000000
[   44.914062] 1ea0: c7b420c0 c0290558 fffffdee 000000d0 01ffffff
00000000 b6fcd990 c0290b10
[   44.914062] 1ec0: 00000000 00000000 c0290558 c00500bc 00000000
00000041 c0290558 00000000
[   44.914062] 1ee0: 00000000 00000000 c7a6f000 00000000 000200d0
c78296a0 c78296d8 c00eded0
[   44.914062] 1f00: c02809b8 c78296a0 c78296a0 c02809b8 c78296d0
c0290558 c0038dac c7802780
[   44.914062] 1f20: 00000000 00000000 b6fcd990 c000d9c4 c7aa0000
00000000 0000000a c006c084
[   44.914062] 1f40: 00000020 c006c4c4 c027a224 00000000 00000000
c00762d4 00000000 00000000
[   44.914062] 1f60: ffffff9c beefb7d0 00000001 c006d6a8 c7aa1f90
0000004e 00000000 beef0000
[   44.914062] 1f80: 00000024 00000100 00000000 00000000 b6fd9eb0
beefb7d0 00000005 c000d9c4
[   44.914062] 1fa0: 00000000 c000d860 00000000 b6fd9eb0 b6fcd990
00000000 00000054 b6fd9eb0
[   44.914062] 1fc0: 00000000 b6fd9eb0 beefb7d0 00000005 b6fda040
00000fff 000a6e38 0000000a
[   44.914062] 1fe0: beefbc54 beefb710 b6f93ed4 b6fc376c 60000010
b6fcd990 00000000 00000000
[   44.914062] [<c004fd68>] (get_page_from_freelist+0x24c/0x4b8) from
[<c00500bc>] (__alloc_pages_nodemask+0xe8/0x5e4)
[   44.914062] [<c00500bc>] (__alloc_pages_nodemask+0xe8/0x5e4) from
[<c005063c>] (__get_free_pages+0x10/0x4c)
[   44.914062] [<c005063c>] (__get_free_pages+0x10/0x4c) from
[<c0063e08>] (exit_mmap+0x94/0x19c)
[   44.914062] [<c0063e08>] (exit_mmap+0x94/0x19c) from [<c00175a8>]
(mmput+0x38/0xa8)
[   44.914062] [<c00175a8>] (mmput+0x38/0xa8) from [<c001c5bc>]
(exit_mm+0xe8/0xec)
[   44.914062] [<c001c5bc>] (exit_mm+0xe8/0xec) from [<c001db5c>]
(do_exit+0x1d4/0x688)
[   44.914062] [<c001db5c>] (do_exit+0x1d4/0x688) from [<c00109f4>]
(die+0x208/0x244)
[   44.914062] [<c00109f4>] (die+0x208/0x244) from [<c0012888>]
(__do_kernel_fault+0x64/0x84)
[   44.914062] [<c0012888>] (__do_kernel_fault+0x64/0x84) from
[<c0012ae8>] (do_page_fault+0x240/0x254)
[   44.914062] [<c0012ae8>] (do_page_fault+0x240/0x254) from
[<c00085a0>] (do_DataAbort+0x30/0x98)
[   44.914062] [<c00085a0>] (do_DataAbort+0x30/0x98) from [<c000d498>]
(__dabt_svc+0x38/0x60)
[   44.914062] Exception stack(0xc7aa1e20 to 0xc7aa1e68)
[   44.914062] 1e20: 00000000 00200200 00100100 00200200 00000000
c03ae04c c0290558 b6fcd990
[   44.914062] 1e40: c0290b10 c029ad10 c039aa60 60000013 60000013
c7aa1e68 c004fea8 c004fd68
[   44.914062] 1e60: 60000093 ffffffff
[   44.914062] [<c000d498>] (__dabt_svc+0x38/0x60) from [<c004fd68>]
(get_page_from_freelist+0x24c/0x4b8)
[   44.914062] [<c004fd68>] (get_page_from_freelist+0x24c/0x4b8) from
[<c00500bc>] (__alloc_pages_nodemask+0xe8/0x5e4)
[   44.914062] [<c00500bc>] (__alloc_pages_nodemask+0xe8/0x5e4) from
[<c006c084>] (slob_new_pages.clone.17+0x10/0x4c)
[   44.914062] [<c006c084>] (slob_new_pages.clone.17+0x10/0x4c) from
[<c006c4c4>] (kmem_cache_alloc_node+0x44/0x64)
[   44.914062] [<c006c4c4>] (kmem_cache_alloc_node+0x44/0x64) from
[<c00762d4>] (getname_flags+0x24/0x94)
[   44.914062] [<c00762d4>] (getname_flags+0x24/0x94) from
[<c006d6a8>] (do_sys_open+0xa0/0x170)
[   44.914062] [<c006d6a8>] (do_sys_open+0xa0/0x170) from [<c000d860>]
(ret_fast_syscall+0x0/0x2c)
[   44.914062] Code: e59f1254 e24aa014 e59a3018 e59a2014 (e5823004)
[   44.914062] ---[ end trace 4f68e63fbfe364d5 ]---
[   44.914062] Fixing recursive fault but reboot is needed!
[   45.796875] Unable to handle kernel paging request at virtual
address 00100104
[   45.796875] pgd = c7ad8000
[   45.796875] [00100104] *pgd=0000001c
[   45.796875] Unable to handle kernel paging request at virtual
address a0000400
[   45.796875] pgd = c7ad8000
[   45.796875] [a0000400] *pgd=00000000
[   45.796875] Internal error: Oops: 5 [#3] ARM
[   45.796875] CPU: 0    Tainted: G    B D       (3.6.0-rc1+ #893)
[   45.796875] PC is at show_pte+0x74/0xbc
[   45.796875] LR is at show_pte+0x3c/0xbc
[   45.796875] pc : [<c0012708>]    lr : [<c00126d0>]    psr: 60000093
[   45.796875] sp : c7ab5bb8  ip : 60000093  fp : 00010000
[   45.796875] r10: 00000029  r9 : c7ac7254  r8 : 00000000
[   45.796875] r7 : c7ab5cb0  r6 : 00000000  r5 : 00000000  r4 : 00000100
[   45.796875] r3 : a0000000  r2 : 00000000  r1 : 00000000  r0 : c0220df7
[   45.796875] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM
Segment user
[   45.796875] Control: 0005317f  Table: 27ad8000  DAC: 00000015
[   45.796875] Process ubiattach (pid: 329, stack limit = 0xc7ab4270)
[   45.796875] Stack: (0xc7ab5bb8 to 0xc7ab6000)
[   45.796875] 5ba0:
    00100104 00000817
[   45.796875] 5bc0: c7ac7220 c0012878 00100104 c7ab5cb0 c7ace780
c7ac7220 00000817 c0012ae8
[   45.796875] 5be0: 00100104 00000817 c7ab5cb0 00000817 00000007
00100104 c7ab5cb0 c027cfe0
[   45.796875] 5c00: c029ad10 c039aa60 60000013 c00085a0 00000001
c02806d8 c7ad3b80 c00369ec
[   45.796875] 5c20: c7ab0960 60000093 c7ab5c44 c0036af4 c7ac4000
00000001 0000000e c7ab0c18
[   45.796875] 5c40: 00000002 c0025984 00000001 0000000e c7ab0960
00000001 c7ab0c48 c02806d8
[   45.796875] 5c60: 00000000 c00260e0 0000000e 20000093 c02809b8
c78f54a0 c02809b8 c78f54a0
[   45.796875] 5c80: c02809b8 c78f54a0 c7ab0c48 c02806d0 00000001
c0290c1a c004fd68 60000093
[   45.796875] 5ca0: ffffffff c7ab5ce4 c0290b10 c000d498 00000001
00200200 00100100 00200200
[   45.796875] 5cc0: 00000000 c03ae04c c0290558 80000013 c0290b10
c029ad10 c039aa60 60000013
[   45.796875] 5ce0: 00000041 c7ab5cf8 c004dce0 c004fd68 60000093
ffffffff 00000041 c027e4a0
[   45.796875] 5d00: 00000000 00020050 00000001 00000008 c0290b14
00000000 ffffffff 00000000
[   45.796875] 5d20: c7ab4000 00000000 00000000 00000000 c0296184
c0290558 00000100 00000050
[   45.796875] 5d40: 01ffffff 00000000 80000013 c0290b10 00000000
00000000 c0290558 c00500bc
[   45.796875] 5d60: 00000000 00000041 c0290558 00000000 c7ab5dd4
00000000 00000000 c0049100
[   45.796875] 5d80: 00020050 00000012 00000000 c000e0d8 fefff000
c006c18c 60000013 c000d500
[   45.796875] 5da0: c7ad9f60 c0290558 ffffffe0 c0281c70 c0281c5c
0000003c 80000013 c03995f4
[   45.796875] 5dc0: 0000001e 00000000 00000020 c006c084 00000050
c006c1a4 0000003c 00000050
[   45.796875] 5de0: 00000020 0000001c ffffffff c7b42220 ffffffff
c7ae2000 c029ff5c c7ae1fc0
[   45.796875] 5e00: 00000000 c006c2b0 c7a73440 c0138430 ffffffff
c7a73440 c7b42220 c7ad2774
[   45.796875] 5e20: c7ad2760 c0139afc 00000000 c7ad2760 7fffefff
00000000 c7ad2760 c7a73440
[   45.796875] 5e40: 00000199 c7928380 c7ad276c 000000a0 00000000
c013c020 ffffffff 00000000
[   45.796875] 5e60: c7ad2774 00000040 80000013 c0281c70 c7ad2774
c7ad2764 c7ad276c c7ad277c
[   45.796875] 5e80: 00000040 000080d0 00000020 00000020 c7a73440
c7a738bc 00000140 fffffe00
[   45.796875] 5ea0: c7a73440 00000000 00000000 c7928380 00000000
000000a0 00000000 c01317d8
[   45.796875] 5ec0: c7a42bb0 c7a3bea8 00000002 00000000 00000000
c7ab5f78 00000001 bea1caf8
[   45.796875] 5ee0: c7928380 bea1caf8 c7a3f4b0 00000003 c7ab4000
00000000 00000000 c0131fa8
[   45.796875] 5f00: ffffffff 00000000 00000000 00000000 00000000
00000000 c7ad25a0 bea1caf8
[   45.796875] 5f20: bea1caf8 c007c5b4 00000000 00000000 00000000
00000000 00000000 00000003
[   45.796875] 5f40: 00000003 c039a740 00000000 c004f75c 00000000
00000003 c7ad25a0 c7aba000
[   45.796875] 5f60: c7ad25a8 c006c520 c027a224 c7ad25a0 bea1caf8
40186f40 00000003 c000d9c4
[   45.796875] 5f80: c7ab4000 c007c66c 00000003 00000000 bea1caf8
bea1caf8 40186f40 00000003
[   45.796875] 5fa0: 00000036 c000d860 bea1caf8 40186f40 00000003
40186f40 bea1caf8 00000000
[   45.796875] 5fc0: bea1caf8 40186f40 00000003 00000036 00000003
bea1cdb4 00000000 00000000
[   45.796875] 5fe0: b6f62ec4 bea1cab0 000098c8 b6f62f08 60000010
00000003 00000006 00000004
[   45.796875] [<c0012708>] (show_pte+0x74/0xbc) from [<c0012878>]
(__do_kernel_fault+0x54/0x84)
[   45.796875] [<c0012878>] (__do_kernel_fault+0x54/0x84) from
[<c0012ae8>] (do_page_fault+0x240/0x254)
[   45.796875] [<c0012ae8>] (do_page_fault+0x240/0x254) from
[<c00085a0>] (do_DataAbort+0x30/0x98)
[   45.796875] [<c00085a0>] (do_DataAbort+0x30/0x98) from [<c000d498>]
(__dabt_svc+0x38/0x60)
[   45.796875] Exception stack(0xc7ab5cb0 to 0xc7ab5cf8)
[   45.796875] 5ca0:                                     00000001
00200200 00100100 00200200
[   45.796875] 5cc0: 00000000 c03ae04c c0290558 80000013 c0290b10
c029ad10 c039aa60 60000013
[   45.796875] 5ce0: 00000041 c7ab5cf8 c004dce0 c004fd68 60000093 ffffffff
[   45.796875] [<c000d498>] (__dabt_svc+0x38/0x60) from [<c004fd68>]
(get_page_from_freelist+0x24c/0x4b8)
[   45.796875] [<c004fd68>] (get_page_from_freelist+0x24c/0x4b8) from
[<c00500bc>] (__alloc_pages_nodemask+0xe8/0x5e4)
[   45.796875] [<c00500bc>] (__alloc_pages_nodemask+0xe8/0x5e4) from
[<c006c084>] (slob_new_pages.clone.17+0x10/0x4c)
[   45.796875] [<c006c084>] (slob_new_pages.clone.17+0x10/0x4c) from
[<c006c1a4>] (slob_alloc.clone.18+0xe4/0x1c0)
[   45.796875] [<c006c1a4>] (slob_alloc.clone.18+0xe4/0x1c0) from
[<c006c2b0>] (__kmalloc_node+0x30/0xa0)
[   45.796875] [<c006c2b0>] (__kmalloc_node+0x30/0xa0) from
[<c0138430>] (schedule_erase+0x24/0x64)
[   45.796875] [<c0138430>] (schedule_erase+0x24/0x64) from
[<c0139afc>] (ubi_wl_init+0x11c/0x36c)
[   45.796875] [<c0139afc>] (ubi_wl_init+0x11c/0x36c) from
[<c013c020>] (ubi_attach+0x13e4/0x147c)
[   45.796875] [<c013c020>] (ubi_attach+0x13e4/0x147c) from
[<c01317d8>] (ubi_attach_mtd_dev+0x58c/0xb20)
[   45.796875] [<c01317d8>] (ubi_attach_mtd_dev+0x58c/0xb20) from
[<c0131fa8>] (ctrl_cdev_ioctl+0xd8/0x168)
[   45.796875] [<c0131fa8>] (ctrl_cdev_ioctl+0xd8/0x168) from
[<c007c5b4>] (do_vfs_ioctl+0x4c0/0x544)
[   45.796875] [<c007c5b4>] (do_vfs_ioctl+0x4c0/0x544) from
[<c007c66c>] (sys_ioctl+0x34/0x54)
[   45.796875] [<c007c66c>] (sys_ioctl+0x34/0x54) from [<c000d860>]
(ret_fast_syscall+0x0/0x2c)
[   45.796875] Code: e3c33eff e3c3300f e59f003c e2433460 (e7932104)
[   45.796875] ---[ end trace 4f68e63fbfe364d6 ]---
[   45.796875] Unable to handle kernel paging request at virtual
address 00100104
[   45.796875] pgd = c0004000
[   45.796875] [00100104] *pgd=00000000
[   45.796875] Internal error: Oops: 817 [#4] ARM
[   45.796875] CPU: 0    Tainted: G    B D       (3.6.0-rc1+ #893)
[   45.796875] PC is at get_page_from_freelist+0x24c/0x4b8
[   45.796875] LR is at zone_watermark_ok+0x18/0x1c
[   45.796875] pc : [<c004fd68>]    lr : [<c004dce0>]    psr: 60000093
[   45.796875] sp : c7ab58c8  ip : 00000041  fp : 60000093
[   45.796875] r10: c039aa60  r9 : c029ad10  r8 : c0290b10
[   45.796875] r7 : c7ac7254  r6 : c0290558  r5 : c03ae04c  r4 : 00000000
[   45.796875] r3 : 00200200  r2 : 00100100  r1 : 00200200  r0 : 00000001
[   45.796875] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM
Segment user
[   45.796875] Control: 0005317f  Table: 27ad8000  DAC: 00000015
[   45.796875] Process ubiattach (pid: 329, stack limit = 0xc7ab4270)
[   45.796875] Stack: (0xc7ab58c8 to 0xc7ab6000)
[   45.796875] 58c0:                   00000041 c0291934 c0294388
00020200 00000001 00000008
[   45.796875] 58e0: c0290b14 00000000 ffffffff 00000000 c7ab4000
00000000 c7ab5958 00000000
[   45.796875] 5900: 00000001 c0290558 00000006 00000200 01ffffff
00000000 c7ac7254 c0290b10
[   45.796875] 5920: 00000000 00000000 c0290558 c00500bc 00000000
00000041 c0290558 00000000
[   45.796875] 5940: c0291934 00000000 c001971c c0222c9f 00020200
00000000 00000001 c0291934
[   45.796875] 5960: c029e088 00000000 00000001 00000000 c02943c0
c0290558 c01114f0 c7ac7220
[   45.796875] 5980: c7acf668 00000000 c7ac7254 00000005 c7ac7254
60000093 00000001 c005063c
[   45.796875] 59a0: c7ab59c8 c0063e08 c7ac7220 00000001 00000000
00000001 0000012c 00000000
[   45.796875] 59c0: 00000008 c7ab59c8 00000006 00000004 c0291d5e
00000000 00000000 60000093
[   45.796875] 59e0: c7ac7220 00000000 c7ac7220 00000000 00000000
c00175a8 c7ac7220 c7ace780
[   45.796875] 5a00: 00000000 c001c5bc c7ace780 0000003d c7acea20
c7ace780 0000000b c7ab4000
[   45.796875] 5a20: c0220eac c001db5c 00010000 c01d5d18 c0222c31
c7ab5a4c 00000002 c7ab5b70
[   45.796875] 5a40: 0000000b c7ab4000 c0220eac 00000005 c7ac7254
60000093 00010000 c00109f4
[   45.796875] 5a60: c7ab4270 0000000b 00000005 a0000400 00000005
c7ac7220 c7ab5b70 00000000
[   45.796875] 5a80: 00000028 c0012888 a0000400 c7ab5b70 c7ace780
c7ac7220 00000005 c0012ae8
[   45.796875] 5aa0: a0000400 00000005 c7ab5b70 00000005 00000005
a0000400 c7ab5b70 c027cfe0
[   45.796875] 5ac0: c7ac7254 00000029 00010000 c00085a0 c0291470
c011153c c01114f0 c0287b4c
[   45.796875] 5ae0: c0291470 00000027 00000018 c001a4bc 00000027
60000093 c0291470 c001aa8c
[   45.796875] 5b00: 00000021 00000010 00000008 ffffffff 4c102108
00000000 000000e2 00000000
[   45.796875] 5b20: 00000018 00000018 00000004 00000001 c0291d5e
00000000 00000000 60000093
[   45.796875] 5b40: 00000000 c001ae90 00000000 00000000 00000000
00000000 c0012708 60000093
[   45.796875] 5b60: ffffffff c7ab5ba4 00000000 c000d498 c0220df7
00000000 00000000 a0000000
[   45.796875] 5b80: 00000100 00000000 00000000 c7ab5cb0 00000000
c7ac7254 00000029 00010000
[   45.796875] 5ba0: 60000093 c7ab5bb8 c00126d0 c0012708 60000093
ffffffff 00100104 00000817
[   45.796875] 5bc0: c7ac7220 c0012878 00100104 c7ab5cb0 c7ace780
c7ac7220 00000817 c0012ae8
[   45.796875] 5be0: 00100104 00000817 c7ab5cb0 00000817 00000007
00100104 c7ab5cb0 c027cfe0
[   45.796875] 5c00: c029ad10 c039aa60 60000013 c00085a0 00000001
c02806d8 c7ad3b80 c00369ec
[   45.796875] 5c20: c7ab0960 60000093 c7ab5c44 c0036af4 c7ac4000
00000001 0000000e c7ab0c18
[   45.796875] 5c40: 00000002 c0025984 00000001 0000000e c7ab0960
00000001 c7ab0c48 c02806d8
[   45.796875] 5c60: 00000000 c00260e0 0000000e 20000093 c02809b8
c78f54a0 c02809b8 c78f54a0
[   45.796875] 5c80: c02809b8 c78f54a0 c7ab0c48 c02806d0 00000001
c0290c1a c004fd68 60000093
[   45.796875] 5ca0: ffffffff c7ab5ce4 c0290b10 c000d498 00000001
00200200 00100100 00200200
[   45.796875] 5cc0: 00000000 c03ae04c c0290558 80000013 c0290b10
c029ad10 c039aa60 60000013
[   45.796875] 5ce0: 00000041 c7ab5cf8 c004dce0 c004fd68 60000093
ffffffff 00000041 c027e4a0
[   45.796875] 5d00: 00000000 00020050 00000001 00000008 c0290b14
00000000 ffffffff 00000000
[   45.796875] 5d20: c7ab4000 00000000 00000000 00000000 c0296184
c0290558 00000100 00000050
[   45.796875] 5d40: 01ffffff 00000000 80000013 c0290b10 00000000
00000000 c0290558 c00500bc
[   45.796875] 5d60: 00000000 00000041 c0290558 00000000 c7ab5dd4
00000000 00000000 c0049100
[   45.796875] 5d80: 00020050 00000012 00000000 c000e0d8 fefff000
c006c18c 60000013 c000d500
[   45.796875] 5da0: c7ad9f60 c0290558 ffffffe0 c0281c70 c0281c5c
0000003c 80000013 c03995f4
[   45.796875] 5dc0: 0000001e 00000000 00000020 c006c084 00000050
c006c1a4 0000003c 00000050
[   45.796875] 5de0: 00000020 0000001c ffffffff c7b42220 ffffffff
c7ae2000 c029ff5c c7ae1fc0
[   45.796875] 5e00: 00000000 c006c2b0 c7a73440 c0138430 ffffffff
c7a73440 c7b42220 c7ad2774
[   45.796875] 5e20: c7ad2760 c0139afc 00000000 c7ad2760 7fffefff
00000000 c7ad2760 c7a73440
[   45.796875] 5e40: 00000199 c7928380 c7ad276c 000000a0 00000000
c013c020 ffffffff 00000000
[   45.796875] 5e60: c7ad2774 00000040 80000013 c0281c70 c7ad2774
c7ad2764 c7ad276c c7ad277c
[   45.796875] 5e80: 00000040 000080d0 00000020 00000020 c7a73440
c7a738bc 00000140 fffffe00
[   45.796875] 5ea0: c7a73440 00000000 00000000 c7928380 00000000
000000a0 00000000 c01317d8
[   45.796875] 5ec0: c7a42bb0 c7a3bea8 00000002 00000000 00000000
c7ab5f78 00000001 bea1caf8
[   45.796875] 5ee0: c7928380 bea1caf8 c7a3f4b0 00000003 c7ab4000
00000000 00000000 c0131fa8
[   45.796875] 5f00: ffffffff 00000000 00000000 00000000 00000000
00000000 c7ad25a0 bea1caf8
[   45.796875] 5f20: bea1caf8 c007c5b4 00000000 00000000 00000000
00000000 00000000 00000003
[   45.796875] 5f40: 00000003 c039a740 00000000 c004f75c 00000000
00000003 c7ad25a0 c7aba000
[   45.796875] 5f60: c7ad25a8 c006c520 c027a224 c7ad25a0 bea1caf8
40186f40 00000003 c000d9c4
[   45.796875] 5f80: c7ab4000 c007c66c 00000003 00000000 bea1caf8
bea1caf8 40186f40 00000003
[   45.796875] 5fa0: 00000036 c000d860 bea1caf8 40186f40 00000003
40186f40 bea1caf8 00000000
[   45.796875] 5fc0: bea1caf8 40186f40 00000003 00000036 00000003
bea1cdb4 00000000 00000000
[   45.796875] 5fe0: b6f62ec4 bea1cab0 000098c8 b6f62f08 60000010
00000003 00000006 00000004
[   45.796875] [<c004fd68>] (get_page_from_freelist+0x24c/0x4b8) from
[<c00500bc>] (__alloc_pages_nodemask+0xe8/0x5e4)
[   45.796875] [<c00500bc>] (__alloc_pages_nodemask+0xe8/0x5e4) from
[<c005063c>] (__get_free_pages+0x10/0x4c)
[   45.796875] [<c005063c>] (__get_free_pages+0x10/0x4c) from
[<c0063e08>] (exit_mmap+0x94/0x19c)
[   45.796875] [<c0063e08>] (exit_mmap+0x94/0x19c) from [<c00175a8>]
(mmput+0x38/0xa8)
[   45.796875] [<c00175a8>] (mmput+0x38/0xa8) from [<c001c5bc>]
(exit_mm+0xe8/0xec)
[   45.796875] [<c001c5bc>] (exit_mm+0xe8/0xec) from [<c001db5c>]
(do_exit+0x1d4/0x688)
[   45.796875] [<c001db5c>] (do_exit+0x1d4/0x688) from [<c00109f4>]
(die+0x208/0x244)
[   45.796875] [<c00109f4>] (die+0x208/0x244) from [<c0012888>]
(__do_kernel_fault+0x64/0x84)
[   45.796875] [<c0012888>] (__do_kernel_fault+0x64/0x84) from
[<c0012ae8>] (do_page_fault+0x240/0x254)
[   45.796875] [<c0012ae8>] (do_page_fault+0x240/0x254) from
[<c00085a0>] (do_DataAbort+0x30/0x98)
[   45.796875] [<c00085a0>] (do_DataAbort+0x30/0x98) from [<c000d498>]
(__dabt_svc+0x38/0x60)
[   45.796875] Exception stack(0xc7ab5b70 to 0xc7ab5bb8)
[   45.796875] 5b60:                                     c0220df7
00000000 00000000 a0000000
[   45.796875] 5b80: 00000100 00000000 00000000 c7ab5cb0 00000000
c7ac7254 00000029 00010000
[   45.796875] 5ba0: 60000093 c7ab5bb8 c00126d0 c0012708 60000093 ffffffff
[   45.796875] [<c000d498>] (__dabt_svc+0x38/0x60) from [<c0012708>]
(show_pte+0x74/0xbc)
[   45.796875] [<c0012708>] (show_pte+0x74/0xbc) from [<c0012878>]
(__do_kernel_fault+0x54/0x84)
[   45.796875] [<c0012878>] (__do_kernel_fault+0x54/0x84) from
[<c0012ae8>] (do_page_fault+0x240/0x254)
[   45.796875] [<c0012ae8>] (do_page_fault+0x240/0x254) from
[<c00085a0>] (do_DataAbort+0x30/0x98)
[   45.796875] [<c00085a0>] (do_DataAbort+0x30/0x98) from [<c000d498>]
(__dabt_svc+0x38/0x60)
[   45.796875] Exception stack(0xc7ab5cb0 to 0xc7ab5cf8)
[   45.796875] 5ca0:                                     00000001
00200200 00100100 00200200
[   45.796875] 5cc0: 00000000 c03ae04c c0290558 80000013 c0290b10
c029ad10 c039aa60 60000013
[   45.796875] 5ce0: 00000041 c7ab5cf8 c004dce0 c004fd68 60000093 ffffffff
[   45.796875] [<c000d498>] (__dabt_svc+0x38/0x60) from [<c004fd68>]
(get_page_from_freelist+0x24c/0x4b8)
[   45.796875] [<c004fd68>] (get_page_from_freelist+0x24c/0x4b8) from
[<c00500bc>] (__alloc_pages_nodemask+0xe8/0x5e4)
[   45.796875] [<c00500bc>] (__alloc_pages_nodemask+0xe8/0x5e4) from
[<c006c084>] (slob_new_pages.clone.17+0x10/0x4c)
[   45.796875] [<c006c084>] (slob_new_pages.clone.17+0x10/0x4c) from
[<c006c1a4>] (slob_alloc.clone.18+0xe4/0x1c0)
[   45.796875] [<c006c1a4>] (slob_alloc.clone.18+0xe4/0x1c0) from
[<c006c2b0>] (__kmalloc_node+0x30/0xa0)
[   45.796875] [<c006c2b0>] (__kmalloc_node+0x30/0xa0) from
[<c0138430>] (schedule_erase+0x24/0x64)
[   45.796875] [<c0138430>] (schedule_erase+0x24/0x64) from
[<c0139afc>] (ubi_wl_init+0x11c/0x36c)
[   45.796875] [<c0139afc>] (ubi_wl_init+0x11c/0x36c) from
[<c013c020>] (ubi_attach+0x13e4/0x147c)
[   45.796875] [<c013c020>] (ubi_attach+0x13e4/0x147c) from
[<c01317d8>] (ubi_attach_mtd_dev+0x58c/0xb20)
[   45.796875] [<c01317d8>] (ubi_attach_mtd_dev+0x58c/0xb20) from
[<c0131fa8>] (ctrl_cdev_ioctl+0xd8/0x168)
[   45.796875] [<c0131fa8>] (ctrl_cdev_ioctl+0xd8/0x168) from
[<c007c5b4>] (do_vfs_ioctl+0x4c0/0x544)
[   45.796875] [<c007c5b4>] (do_vfs_ioctl+0x4c0/0x544) from
[<c007c66c>] (sys_ioctl+0x34/0x54)
[   45.796875] [<c007c66c>] (sys_ioctl+0x34/0x54) from [<c000d860>]
(ret_fast_syscall+0x0/0x2c)
[   45.796875] Code: e59f1254 e24aa014 e59a3018 e59a2014 (e5823004)
[   45.796875] ---[ end trace 4f68e63fbfe364d7 ]---
[   45.796875] Fixing recursive fault but reboot is needed!
[   46.148437] Unable to handle kernel paging request at virtual
address 00100104
[   46.148437] pgd = c0004000
[   46.148437] [00100104] *pgd=00000000
[   46.148437] Internal error: Oops: 817 [#5] ARM
[   46.148437] CPU: 0    Tainted: G    B D       (3.6.0-rc1+ #893)
[   46.148437] PC is at get_page_from_freelist+0x24c/0x4b8
[   46.148437] LR is at zone_watermark_ok+0x18/0x1c
[   46.148437] pc : [<c004fd68>]    lr : [<c004dce0>]    psr: 60000093
[   46.148437] sp : c0273cc0  ip : 00000041  fp : 60000093
[   46.148437] r10: c039aa60  r9 : c029ad10  r8 : c0290b10
[   46.148437] r7 : 80000093  r6 : c0290558  r5 : c03ae04c  r4 : 00000000
[   46.148437] r3 : 00200200  r2 : 00100100  r1 : 00200200  r0 : 00000001
[   46.148437] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM
Segment kernel
[   46.148437] Control: 0005317f  Table: 27ad8000  DAC: 00000017
[   46.148437] Process swapper (pid: 0, stack limit = 0xc0272270)
[   46.148437] Stack: (0xc0273cc0 to 0xc0274000)
[   46.148437] 3cc0: 00000041 c7acf4a0 c0272000 00020020 00000001
00000008 c0290b14 00000000
[   46.148437] 3ce0: ffffffff 00000000 c0272000 00000000 c7ace7b0
00000000 c0038dac c0290558
[   46.148437] 3d00: c7ace780 00000020 01ffffff 00000000 80000093
c0290b10 00000000 00000000
[   46.148437] 3d20: c0290558 c00500bc 00000000 00000041 c0290558
00000000 00000001 00000000
[   46.148437] 3d40: c0273d74 c00308d8 00020020 c0036604 00000000
20000013 c7a4994c c7abb900
[   46.148437] 3d60: 000000cc 00000060 c7a48a40 c0290558 fffffff8
c0281c70 c0281c5c 00000090
[   46.148437] 3d80: 80000093 c03995f4 00000048 00000000 00000008
c006c084 00000020 c006c1a4
[   46.148437] 3da0: 00000090 00000020 00000008 c7808b40 0000000e
c7ab0c18 c7ab0960 00000001
[   46.148437] 3dc0: c02806d8 00000000 00000002 c006c4a8 c0297524
c0280098 0000000e c0024abc
[   46.148437] 3de0: 00000001 00000001 0000000e c0025834 00000001
0000000e c7ab0960 00000001
[   46.148437] 3e00: c7ab0c48 c02806d8 00000000 c00260e0 0000000e
20000093 c7ab0960 c7a8bfc0
[   46.148437] 3e20: 00000001 0000000e c0280778 c00262d0 c02806d0
00000001 c0290c1a c001e6bc
[   46.148437] 3e40: c001e6a4 c0033b20 00000000 c003bb9c 00000000
00000000 00000000 00000000
[   46.148437] 3e60: 0000002e 0860173b ffc06c00 c027c058 00000000
c027e4a0 00000000 00000000
[   46.148437] 3e80: c0290c20 c7ac7220 00000001 c00240f0 c027c058
c0024124 c0290fdc 0000008f
[   46.148437] 3ea0: c027e4a0 c003ee50 c027e4a0 00000000 c0290fdc
0000008f c027e4a0 00000000
[   46.148437] 3ec0: 00000000 c0016f10 c027e6a8 c78023c0 00000012
c0044dac c78023c0 c027e6a8
[   46.148437] 3ee0: 0005d6d5 c78023c0 00000000 ffffffff c0273f64
c7ace780 c7ac7220 c7ac7220
[   46.148437] 3f00: c0273f8c c0044f40 c78023c0 c0046fc4 00000012
c004485c 00000012 c000e0d4
[   46.148437] 3f20: fefff000 c0036734 60000013 c000d500 c7ace780
00000000 00000000 60000013
[   46.148437] 3f40: c7ace780 c7ac7220 00000002 c0272000 c7ace780
c7ac7220 c7ac7220 c0273f8c
[   46.148437] 3f60: c7ab4044 c0273f78 c01d6ec0 c0036734 60000013
ffffffff c027c058 c02809b8
[   46.148437] 3f80: 00000000 c0272000 c0273fb4 c01d6ec0 c027c058
c0272000 c027cd20 c0290d48
[   46.148437] 3fa0: c03aca60 20004000 41069265 2026c3b0 00000000
c000e300 c027a090 ffffffff
[   46.148437] 3fc0: c026d5ec c02566cc ffffffff ffffffff c02561cc
00000000 00000000 c026d5ec
[   46.148437] 3fe0: 00000000 00053175 c027a01c c026d5bc c027cd14
20008040 00000000 00000000
[   46.148437] [<c004fd68>] (get_page_from_freelist+0x24c/0x4b8) from
[<c00500bc>] (__alloc_pages_nodemask+0xe8/0x5e4)
[   46.148437] [<c00500bc>] (__alloc_pages_nodemask+0xe8/0x5e4) from
[<c006c084>] (slob_new_pages.clone.17+0x10/0x4c)
[   46.148437] [<c006c084>] (slob_new_pages.clone.17+0x10/0x4c) from
[<c006c1a4>] (slob_alloc.clone.18+0xe4/0x1c0)
[   46.148437] [<c006c1a4>] (slob_alloc.clone.18+0xe4/0x1c0) from
[<c006c4a8>] (kmem_cache_alloc_node+0x28/0x64)
[   46.148437] [<c006c4a8>] (kmem_cache_alloc_node+0x28/0x64) from
[<c0024abc>] (__sigqueue_alloc+0x78/0x120)
[   46.148437] [<c0024abc>] (__sigqueue_alloc+0x78/0x120) from
[<c0025834>] (__send_signal.clone.23+0xa4/0x214)
[   46.148437] [<c0025834>] (__send_signal.clone.23+0xa4/0x214) from
[<c00260e0>] (do_send_sig_info+0x40/0x4c)
[   46.148437] [<c00260e0>] (do_send_sig_info+0x40/0x4c) from
[<c00262d0>] (kill_pid_info+0x30/0x44)
[   46.148437] [<c00262d0>] (kill_pid_info+0x30/0x44) from
[<c001e6bc>] (it_real_fn+0x18/0x20)
[   46.148437] [<c001e6bc>] (it_real_fn+0x18/0x20) from [<c0033b20>]
(hrtimer_run_queues+0x12c/0x1e4)
[   46.148437] [<c0033b20>] (hrtimer_run_queues+0x12c/0x1e4) from
[<c00240f0>] (run_local_timers+0x8/0x14)
[   46.148437] [<c00240f0>] (run_local_timers+0x8/0x14) from
[<c0024124>] (update_process_times+0x28/0x48)
[   46.148437] [<c0024124>] (update_process_times+0x28/0x48) from
[<c003ee50>] (tick_handle_periodic+0xc/0x74)
[   46.148437] [<c003ee50>] (tick_handle_periodic+0xc/0x74) from
[<c0016f10>] (at91sam926x_pit_interrupt+0x7c/0xa8)
[   46.148437] [<c0016f10>] (at91sam926x_pit_interrupt+0x7c/0xa8) from
[<c0044dac>] (handle_irq_event_percpu+0x30/0x19c)
[   46.148437] [<c0044dac>] (handle_irq_event_percpu+0x30/0x19c) from
[<c0044f40>] (handle_irq_event+0x28/0x38)
[   46.148437] [<c0044f40>] (handle_irq_event+0x28/0x38) from
[<c0046fc4>] (handle_fasteoi_irq+0x9c/0xdc)
[   46.148437] [<c0046fc4>] (handle_fasteoi_irq+0x9c/0xdc) from
[<c004485c>] (generic_handle_irq+0x20/0x30)
[   46.148437] [<c004485c>] (generic_handle_irq+0x20/0x30) from
[<c000e0d4>] (handle_IRQ+0x60/0x84)
[   46.148437] [<c000e0d4>] (handle_IRQ+0x60/0x84) from [<c000d500>]
(__irq_svc+0x40/0x4c)
[   46.148437] [<c000d500>] (__irq_svc+0x40/0x4c) from [<c0036734>]
(finish_task_switch.clone.52.clone.57+0x2c/0xe0)
[   46.148437] [<c0036734>]
(finish_task_switch.clone.52.clone.57+0x2c/0xe0) from [<c01d6ec0>]
(__schedule+0x300/0x338)
[   46.148437] [<c01d6ec0>] (__schedule+0x300/0x338) from [<c000e300>]
(cpu_idle+0xa4/0xb4)
[   46.148437] [<c000e300>] (cpu_idle+0xa4/0xb4) from [<c02566cc>]
(start_kernel+0x240/0x280)
[   46.148437] Code: e59f1254 e24aa014 e59a3018 e59a2014 (e5823004)
[   46.148437] ---[ end trace 4f68e63fbfe364d8 ]---
[   46.148437] Kernel panic - not syncing: Fatal exception in interrupt


I attached the .config I used


Regards,
Richard.

[-- Attachment #2: .config --]
[-- Type: application/octet-stream, Size: 27890 bytes --]

#
# Automatically generated file; DO NOT EDIT.
# Linux/arm 3.6.0-rc1 Kernel Configuration
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
CONFIG_GENERIC_GPIO=y
CONFIG_HAVE_PROC_CPU=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_TRACE_IRQFLAGS_SUPPORT=y
CONFIG_RWSEM_GENERIC_SPINLOCK=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_VECTORS_BASE=0xffff0000
CONFIG_ARM_PATCH_PHYS_VIRT=y
CONFIG_GENERIC_BUG=y
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
CONFIG_HAVE_IRQ_WORK=y

#
# General setup
#
CONFIG_EXPERIMENTAL=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_CROSS_COMPILE=""
CONFIG_LOCALVERSION=""
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_HAVE_KERNEL_GZIP=y
CONFIG_HAVE_KERNEL_LZMA=y
CONFIG_HAVE_KERNEL_XZ=y
CONFIG_HAVE_KERNEL_LZO=y
# CONFIG_KERNEL_GZIP is not set
# CONFIG_KERNEL_LZMA is not set
# CONFIG_KERNEL_XZ is not set
CONFIG_KERNEL_LZO=y
CONFIG_DEFAULT_HOSTNAME="(none)"
# CONFIG_SWAP is not set
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
# CONFIG_POSIX_MQUEUE is not set
# CONFIG_BSD_PROCESS_ACCT is not set
# CONFIG_FHANDLE is not set
# CONFIG_TASKSTATS is not set
# CONFIG_AUDIT is not set
CONFIG_HAVE_GENERIC_HARDIRQS=y

#
# IRQ subsystem
#
CONFIG_GENERIC_HARDIRQS=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_GENERIC_IRQ_SHOW=y
CONFIG_HARDIRQS_SW_RESEND=y
CONFIG_IRQ_DOMAIN=y
# CONFIG_IRQ_DOMAIN_DEBUG is not set
CONFIG_SPARSE_IRQ=y
CONFIG_KTIME_SCALAR=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y

#
# Timers subsystem
#
# CONFIG_NO_HZ is not set
# CONFIG_HIGH_RES_TIMERS is not set

#
# RCU Subsystem
#
CONFIG_TINY_RCU=y
# CONFIG_PREEMPT_RCU is not set
# CONFIG_TREE_RCU_TRACE is not set
# CONFIG_IKCONFIG is not set
CONFIG_LOG_BUF_SHIFT=14
# CONFIG_CGROUPS is not set
# CONFIG_CHECKPOINT_RESTORE is not set
# CONFIG_NAMESPACES is not set
# CONFIG_SCHED_AUTOGROUP is not set
# CONFIG_SYSFS_DEPRECATED is not set
# CONFIG_RELAY is not set
# CONFIG_BLK_DEV_INITRD is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL=y
CONFIG_ANON_INODES=y
CONFIG_EXPERT=y
CONFIG_UID16=y
# CONFIG_SYSCTL_SYSCALL is not set
CONFIG_KALLSYMS=y
CONFIG_KALLSYMS_ALL=y
CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_AIO=y
CONFIG_EMBEDDED=y
CONFIG_HAVE_PERF_EVENTS=y
CONFIG_PERF_USE_VMALLOC=y

#
# Kernel Performance Events And Counters
#
# CONFIG_PERF_EVENTS is not set
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_COMPAT_BRK=y
# CONFIG_SLAB is not set
# CONFIG_SLUB is not set
CONFIG_SLOB=y
# CONFIG_PROFILING is not set
CONFIG_HAVE_OPROFILE=y
# CONFIG_JUMP_LABEL is not set
CONFIG_HAVE_KPROBES=y
CONFIG_HAVE_KRETPROBES=y
CONFIG_HAVE_ARCH_TRACEHOOK=y
CONFIG_HAVE_DMA_ATTRS=y
CONFIG_GENERIC_SMP_IDLE_THREAD=y
CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
CONFIG_HAVE_CLK=y
CONFIG_HAVE_DMA_API_DEBUG=y
CONFIG_HAVE_ARCH_JUMP_LABEL=y
CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y

#
# GCOV-based kernel profiling
#
# CONFIG_GCOV_KERNEL is not set
CONFIG_HAVE_GENERIC_DMA_COHERENT=y
CONFIG_RT_MUTEXES=y
CONFIG_BASE_SMALL=0
# CONFIG_MODULES is not set
CONFIG_BLOCK=y
# CONFIG_LBDAF is not set
# CONFIG_BLK_DEV_BSG is not set
# CONFIG_BLK_DEV_BSGLIB is not set
# CONFIG_BLK_DEV_INTEGRITY is not set

#
# Partition Types
#
# CONFIG_PARTITION_ADVANCED is not set
CONFIG_MSDOS_PARTITION=y

#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
# CONFIG_IOSCHED_DEADLINE is not set
# CONFIG_IOSCHED_CFQ is not set
CONFIG_DEFAULT_NOOP=y
CONFIG_DEFAULT_IOSCHED="noop"
# CONFIG_INLINE_SPIN_TRYLOCK is not set
# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set
# CONFIG_INLINE_SPIN_LOCK is not set
# CONFIG_INLINE_SPIN_LOCK_BH is not set
# CONFIG_INLINE_SPIN_LOCK_IRQ is not set
# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set
# CONFIG_INLINE_SPIN_UNLOCK_BH is not set
CONFIG_INLINE_SPIN_UNLOCK_IRQ=y
# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set
# CONFIG_INLINE_READ_TRYLOCK is not set
# CONFIG_INLINE_READ_LOCK is not set
# CONFIG_INLINE_READ_LOCK_BH is not set
# CONFIG_INLINE_READ_LOCK_IRQ is not set
# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set
CONFIG_INLINE_READ_UNLOCK=y
# CONFIG_INLINE_READ_UNLOCK_BH is not set
CONFIG_INLINE_READ_UNLOCK_IRQ=y
# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set
# CONFIG_INLINE_WRITE_TRYLOCK is not set
# CONFIG_INLINE_WRITE_LOCK is not set
# CONFIG_INLINE_WRITE_LOCK_BH is not set
# CONFIG_INLINE_WRITE_LOCK_IRQ is not set
# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set
CONFIG_INLINE_WRITE_UNLOCK=y
# CONFIG_INLINE_WRITE_UNLOCK_BH is not set
CONFIG_INLINE_WRITE_UNLOCK_IRQ=y
# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set
# CONFIG_MUTEX_SPIN_ON_OWNER is not set
# CONFIG_FREEZER is not set

#
# System Type
#
CONFIG_MMU=y
# CONFIG_ARCH_SOCFPGA is not set
# CONFIG_ARCH_INTEGRATOR is not set
# CONFIG_ARCH_REALVIEW is not set
# CONFIG_ARCH_VERSATILE is not set
# CONFIG_ARCH_VEXPRESS is not set
CONFIG_ARCH_AT91=y
# CONFIG_ARCH_BCMRING is not set
# CONFIG_ARCH_HIGHBANK is not set
# CONFIG_ARCH_CLPS711X is not set
# CONFIG_ARCH_CNS3XXX is not set
# CONFIG_ARCH_GEMINI is not set
# CONFIG_ARCH_PRIMA2 is not set
# CONFIG_ARCH_EBSA110 is not set
# CONFIG_ARCH_EP93XX is not set
# CONFIG_ARCH_FOOTBRIDGE is not set
# CONFIG_ARCH_MXC is not set
# CONFIG_ARCH_MXS is not set
# CONFIG_ARCH_NETX is not set
# CONFIG_ARCH_H720X is not set
# CONFIG_ARCH_IOP13XX is not set
# CONFIG_ARCH_IOP32X is not set
# CONFIG_ARCH_IOP33X is not set
# CONFIG_ARCH_IXP4XX is not set
# CONFIG_ARCH_MVEBU is not set
# CONFIG_ARCH_DOVE is not set
# CONFIG_ARCH_KIRKWOOD is not set
# CONFIG_ARCH_LPC32XX is not set
# CONFIG_ARCH_MV78XX0 is not set
# CONFIG_ARCH_ORION5X is not set
# CONFIG_ARCH_MMP is not set
# CONFIG_ARCH_KS8695 is not set
# CONFIG_ARCH_W90X900 is not set
# CONFIG_ARCH_TEGRA is not set
# CONFIG_ARCH_PICOXCELL is not set
# CONFIG_ARCH_PNX4008 is not set
# CONFIG_ARCH_PXA is not set
# CONFIG_ARCH_MSM is not set
# CONFIG_ARCH_SHMOBILE is not set
# CONFIG_ARCH_RPC is not set
# CONFIG_ARCH_SA1100 is not set
# CONFIG_ARCH_S3C24XX is not set
# CONFIG_ARCH_S3C64XX is not set
# CONFIG_ARCH_S5P64X0 is not set
# CONFIG_ARCH_S5PC100 is not set
# CONFIG_ARCH_S5PV210 is not set
# CONFIG_ARCH_EXYNOS is not set
# CONFIG_ARCH_SHARK is not set
# CONFIG_ARCH_U300 is not set
# CONFIG_ARCH_U8500 is not set
# CONFIG_ARCH_NOMADIK is not set
# CONFIG_ARCH_DAVINCI is not set
# CONFIG_ARCH_OMAP is not set
# CONFIG_PLAT_SPEAR is not set
# CONFIG_ARCH_VT8500 is not set
# CONFIG_ARCH_ZYNQ is not set
CONFIG_HAVE_AT91_DBGU0=y
CONFIG_AT91_SAM9_ALT_RESET=y
CONFIG_AT91_SAM9G45_RESET=y
CONFIG_SOC_AT91SAM9=y

#
# Atmel AT91 System-on-Chip
#

#
# Atmel AT91 Processor
#
# CONFIG_SOC_AT91RM9200 is not set
# CONFIG_SOC_AT91SAM9260 is not set
# CONFIG_SOC_AT91SAM9261 is not set
# CONFIG_SOC_AT91SAM9263 is not set
# CONFIG_SOC_AT91SAM9RL is not set
# CONFIG_SOC_AT91SAM9G45 is not set
CONFIG_SOC_AT91SAM9X5=y
# CONFIG_SOC_AT91SAM9N12 is not set
# CONFIG_ARCH_AT91_NONE is not set
# CONFIG_ARCH_AT91RM9200 is not set
# CONFIG_ARCH_AT91SAM9260 is not set
# CONFIG_ARCH_AT91SAM9261 is not set
# CONFIG_ARCH_AT91SAM9G10 is not set
# CONFIG_ARCH_AT91SAM9263 is not set
# CONFIG_ARCH_AT91SAM9RL is not set
# CONFIG_ARCH_AT91SAM9G20 is not set
# CONFIG_ARCH_AT91SAM9G45 is not set
CONFIG_ARCH_AT91SAM9X5=y
CONFIG_AT91_PMC_UNIT=y

#
# Generic Board Type
#
CONFIG_MACH_AT91SAM_DT=y

#
# AT91 Board Options
#

#
# AT91 Feature Selections
#
CONFIG_AT91_PROGRAMMABLE_CLOCKS=y
CONFIG_AT91_TIMER_HZ=128

#
# Processor Type
#
CONFIG_CPU_ARM926T=y
CONFIG_CPU_32v5=y
CONFIG_CPU_ABRT_EV5TJ=y
CONFIG_CPU_PABRT_LEGACY=y
CONFIG_CPU_CACHE_VIVT=y
CONFIG_CPU_COPY_V4WB=y
CONFIG_CPU_TLB_V4WBI=y
CONFIG_CPU_CP15=y
CONFIG_CPU_CP15_MMU=y
CONFIG_CPU_USE_DOMAINS=y

#
# Processor Features
#
# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set
CONFIG_ARM_THUMB=y
# CONFIG_CPU_ICACHE_DISABLE is not set
# CONFIG_CPU_DCACHE_DISABLE is not set
# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
# CONFIG_CACHE_L2X0 is not set
CONFIG_ARM_L1_CACHE_SHIFT=5
CONFIG_ARM_NR_BANKS=8
CONFIG_MULTI_IRQ_HANDLER=y

#
# Bus support
#
# CONFIG_PCI_SYSCALL is not set
# CONFIG_ARCH_SUPPORTS_MSI is not set
# CONFIG_PCCARD is not set

#
# Kernel Features
#
CONFIG_VMSPLIT_3G=y
# CONFIG_VMSPLIT_2G is not set
# CONFIG_VMSPLIT_1G is not set
CONFIG_PAGE_OFFSET=0xC0000000
CONFIG_ARCH_NR_GPIO=0
CONFIG_PREEMPT_NONE=y
# CONFIG_PREEMPT_VOLUNTARY is not set
# CONFIG_PREEMPT is not set
CONFIG_HZ=128
CONFIG_AEABI=y
# CONFIG_OABI_COMPAT is not set
# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
CONFIG_HAVE_ARCH_PFN_VALID=y
# CONFIG_HIGHMEM is not set
CONFIG_SELECT_MEMORY_MODEL=y
CONFIG_FLATMEM_MANUAL=y
CONFIG_FLATMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y
CONFIG_HAVE_MEMBLOCK=y
CONFIG_PAGEFLAGS_EXTENDED=y
CONFIG_SPLIT_PTLOCK_CPUS=999999
# CONFIG_COMPACTION is not set
# CONFIG_PHYS_ADDR_T_64BIT is not set
CONFIG_ZONE_DMA_FLAG=0
CONFIG_VIRT_TO_BUS=y
# CONFIG_KSM is not set
CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
CONFIG_CROSS_MEMORY_ATTACH=y
CONFIG_NEED_PER_CPU_KM=y
# CONFIG_CLEANCACHE is not set
CONFIG_FORCE_MAX_ZONEORDER=11
# CONFIG_LEDS is not set
CONFIG_ALIGNMENT_TRAP=y
CONFIG_UACCESS_WITH_MEMCPY=y
# CONFIG_SECCOMP is not set
# CONFIG_CC_STACKPROTECTOR is not set
# CONFIG_DEPRECATED_PARAM_STRUCT is not set

#
# Boot options
#
CONFIG_USE_OF=y
CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0
CONFIG_ARM_APPENDED_DTB=y
CONFIG_ARM_ATAG_DTB_COMPAT=y
CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y
# CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND is not set
CONFIG_CMDLINE="mem=128M console=ttyS0,115200 initrd=0x21100000,25165824 root=/dev/ram0 rw"
CONFIG_CMDLINE_FROM_BOOTLOADER=y
# CONFIG_CMDLINE_EXTEND is not set
# CONFIG_CMDLINE_FORCE is not set
# CONFIG_XIP_KERNEL is not set
CONFIG_KEXEC=y
CONFIG_ATAGS_PROC=y
# CONFIG_CRASH_DUMP is not set
CONFIG_AUTO_ZRELADDR=y

#
# CPU Power Management
#
# CONFIG_CPU_IDLE is not set
# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set

#
# Floating point emulation
#

#
# At least one emulation must be selected
#
CONFIG_VFP=y

#
# Userspace binary formats
#
CONFIG_BINFMT_ELF=y
CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
CONFIG_HAVE_AOUT=y
# CONFIG_BINFMT_AOUT is not set
# CONFIG_BINFMT_MISC is not set

#
# Power management options
#
# CONFIG_SUSPEND is not set
# CONFIG_PM_RUNTIME is not set
CONFIG_ARCH_SUSPEND_POSSIBLE=y
# CONFIG_ARM_CPU_SUSPEND is not set
CONFIG_NET=y

#
# Networking options
#
CONFIG_PACKET=y
CONFIG_UNIX=y
# CONFIG_UNIX_DIAG is not set
# CONFIG_XFRM_USER is not set
# CONFIG_NET_KEY is not set
CONFIG_INET=y
# CONFIG_IP_MULTICAST is not set
# CONFIG_IP_ADVANCED_ROUTER is not set
CONFIG_IP_PNP=y
# CONFIG_IP_PNP_DHCP is not set
# CONFIG_IP_PNP_BOOTP is not set
# CONFIG_IP_PNP_RARP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE_DEMUX is not set
# CONFIG_ARPD is not set
# CONFIG_SYN_COOKIES is not set
# CONFIG_INET_AH is not set
# CONFIG_INET_ESP is not set
# CONFIG_INET_IPCOMP is not set
# CONFIG_INET_XFRM_TUNNEL is not set
# CONFIG_INET_TUNNEL is not set
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
# CONFIG_INET_XFRM_MODE_BEET is not set
CONFIG_INET_LRO=y
# CONFIG_INET_DIAG is not set
# CONFIG_TCP_CONG_ADVANCED is not set
CONFIG_TCP_CONG_CUBIC=y
CONFIG_DEFAULT_TCP_CONG="cubic"
# CONFIG_TCP_MD5SIG is not set
# CONFIG_IPV6 is not set
# CONFIG_NETWORK_SECMARK is not set
# CONFIG_NETWORK_PHY_TIMESTAMPING is not set
# CONFIG_NETFILTER is not set
# CONFIG_IP_DCCP is not set
# CONFIG_IP_SCTP is not set
# CONFIG_RDS is not set
# CONFIG_TIPC is not set
# CONFIG_ATM is not set
# CONFIG_L2TP is not set
# CONFIG_BRIDGE is not set
# CONFIG_NET_DSA is not set
# CONFIG_VLAN_8021Q is not set
# CONFIG_DECNET is not set
# CONFIG_LLC2 is not set
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_WAN_ROUTER is not set
# CONFIG_PHONET is not set
# CONFIG_IEEE802154 is not set
# CONFIG_NET_SCHED is not set
# CONFIG_DCB is not set
# CONFIG_BATMAN_ADV is not set
# CONFIG_OPENVSWITCH is not set
CONFIG_BQL=y

#
# Network testing
#
# CONFIG_NET_PKTGEN is not set
# CONFIG_HAMRADIO is not set
# CONFIG_CAN is not set
# CONFIG_IRDA is not set
# CONFIG_BT is not set
# CONFIG_AF_RXRPC is not set
# CONFIG_WIRELESS is not set
# CONFIG_WIMAX is not set
# CONFIG_RFKILL is not set
# CONFIG_NET_9P is not set
# CONFIG_CAIF is not set
# CONFIG_CEPH_LIB is not set
# CONFIG_NFC is not set
CONFIG_HAVE_BPF_JIT=y

#
# Device Drivers
#

#
# Generic Driver Options
#
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
# CONFIG_STANDALONE is not set
# CONFIG_PREVENT_FIRMWARE_BUILD is not set
CONFIG_FW_LOADER=y
CONFIG_FIRMWARE_IN_KERNEL=y
CONFIG_EXTRA_FIRMWARE=""
# CONFIG_DEBUG_DRIVER is not set
# CONFIG_DEBUG_DEVRES is not set
# CONFIG_SYS_HYPERVISOR is not set
# CONFIG_GENERIC_CPU_DEVICES is not set
# CONFIG_DMA_SHARED_BUFFER is not set
# CONFIG_CONNECTOR is not set
CONFIG_MTD=y
# CONFIG_MTD_REDBOOT_PARTS is not set
CONFIG_MTD_CMDLINE_PARTS=y
# CONFIG_MTD_AFS_PARTS is not set
CONFIG_MTD_OF_PARTS=y
# CONFIG_MTD_AR7_PARTS is not set

#
# User Modules And Translation Layers
#
CONFIG_MTD_CHAR=y
CONFIG_MTD_BLKDEVS=y
CONFIG_MTD_BLOCK=y
# CONFIG_FTL is not set
# CONFIG_NFTL is not set
# CONFIG_INFTL is not set
# CONFIG_RFD_FTL is not set
# CONFIG_SSFDC is not set
# CONFIG_SM_FTL is not set
# CONFIG_MTD_OOPS is not set

#
# RAM/ROM/Flash chip drivers
#
# CONFIG_MTD_CFI is not set
# CONFIG_MTD_JEDECPROBE is not set
CONFIG_MTD_MAP_BANK_WIDTH_1=y
CONFIG_MTD_MAP_BANK_WIDTH_2=y
CONFIG_MTD_MAP_BANK_WIDTH_4=y
# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
CONFIG_MTD_CFI_I1=y
CONFIG_MTD_CFI_I2=y
# CONFIG_MTD_CFI_I4 is not set
# CONFIG_MTD_CFI_I8 is not set
# CONFIG_MTD_RAM is not set
# CONFIG_MTD_ROM is not set
# CONFIG_MTD_ABSENT is not set

#
# Mapping drivers for chip access
#
# CONFIG_MTD_COMPLEX_MAPPINGS is not set
# CONFIG_MTD_PLATRAM is not set

#
# Self-contained MTD device drivers
#
# CONFIG_MTD_SLRAM is not set
# CONFIG_MTD_PHRAM is not set
# CONFIG_MTD_MTDRAM is not set
# CONFIG_MTD_BLOCK2MTD is not set

#
# Disk-On-Chip Device Drivers
#
# CONFIG_MTD_DOC2000 is not set
# CONFIG_MTD_DOC2001 is not set
# CONFIG_MTD_DOC2001PLUS is not set
# CONFIG_MTD_DOCG3 is not set
CONFIG_MTD_NAND_ECC=y
# CONFIG_MTD_NAND_ECC_SMC is not set
CONFIG_MTD_NAND=y
# CONFIG_MTD_NAND_VERIFY_WRITE is not set
# CONFIG_MTD_NAND_ECC_BCH is not set
# CONFIG_MTD_SM_COMMON is not set
# CONFIG_MTD_NAND_MUSEUM_IDS is not set
# CONFIG_MTD_NAND_GPIO is not set
CONFIG_MTD_NAND_IDS=y
# CONFIG_MTD_NAND_DISKONCHIP is not set
# CONFIG_MTD_NAND_DOCG4 is not set
# CONFIG_MTD_NAND_ATMEL is not set
CONFIG_MTD_NAND_NANDSIM=y
# CONFIG_MTD_NAND_PLATFORM is not set
# CONFIG_MTD_ONENAND is not set

#
# LPDDR flash memory drivers
#
# CONFIG_MTD_LPDDR is not set
CONFIG_MTD_UBI=y
CONFIG_MTD_UBI_WL_THRESHOLD=4096
CONFIG_MTD_UBI_BEB_LIMIT=20
# CONFIG_MTD_UBI_GLUEBI is not set
CONFIG_DTC=y
CONFIG_OF=y

#
# Device Tree and Open Firmware support
#
CONFIG_PROC_DEVICETREE=y
# CONFIG_OF_SELFTEST is not set
CONFIG_OF_FLATTREE=y
CONFIG_OF_EARLY_FLATTREE=y
CONFIG_OF_ADDRESS=y
CONFIG_OF_IRQ=y
CONFIG_OF_DEVICE=y
CONFIG_OF_NET=y
CONFIG_OF_MDIO=y
CONFIG_OF_MTD=y
# CONFIG_PARPORT is not set
CONFIG_BLK_DEV=y
# CONFIG_BLK_DEV_COW_COMMON is not set
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_LOOP_MIN_COUNT=8
# CONFIG_BLK_DEV_CRYPTOLOOP is not set

#
# DRBD disabled because PROC_FS, INET or CONNECTOR not selected
#
# CONFIG_BLK_DEV_NBD is not set
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=4
CONFIG_BLK_DEV_RAM_SIZE=8192
# CONFIG_BLK_DEV_XIP is not set
# CONFIG_CDROM_PKTCDVD is not set
# CONFIG_ATA_OVER_ETH is not set
# CONFIG_MG_DISK is not set
# CONFIG_BLK_DEV_RBD is not set

#
# Misc devices
#
# CONFIG_SENSORS_LIS3LV02D is not set
# CONFIG_ATMEL_PWM is not set
# CONFIG_ATMEL_TCLIB is not set
# CONFIG_ATMEL_SSC is not set
# CONFIG_ENCLOSURE_SERVICES is not set
# CONFIG_C2PORT is not set

#
# EEPROM support
#
# CONFIG_EEPROM_93CX6 is not set

#
# Texas Instruments shared transport line discipline
#
# CONFIG_TI_ST is not set

#
# Altera FPGA firmware download module
#

#
# SCSI device support
#
CONFIG_SCSI_MOD=y
# CONFIG_RAID_ATTRS is not set
# CONFIG_SCSI is not set
# CONFIG_SCSI_DMA is not set
# CONFIG_SCSI_NETLINK is not set
# CONFIG_ATA is not set
# CONFIG_MD is not set
CONFIG_NETDEVICES=y
CONFIG_NET_CORE=y
# CONFIG_BONDING is not set
# CONFIG_DUMMY is not set
# CONFIG_EQUALIZER is not set
CONFIG_MII=y
# CONFIG_NET_TEAM is not set
# CONFIG_MACVLAN is not set
# CONFIG_NETCONSOLE is not set
# CONFIG_NETPOLL is not set
# CONFIG_NET_POLL_CONTROLLER is not set
# CONFIG_TUN is not set
# CONFIG_VETH is not set

#
# CAIF transport drivers
#
CONFIG_ETHERNET=y
CONFIG_HAVE_NET_MACB=y
CONFIG_NET_CADENCE=y
CONFIG_MACB=y
# CONFIG_NET_VENDOR_BROADCOM is not set
# CONFIG_NET_CALXEDA_XGMAC is not set
# CONFIG_NET_VENDOR_CHELSIO is not set
# CONFIG_NET_VENDOR_CIRRUS is not set
# CONFIG_DM9000 is not set
# CONFIG_DNET is not set
# CONFIG_NET_VENDOR_FARADAY is not set
# CONFIG_NET_VENDOR_INTEL is not set
# CONFIG_NET_VENDOR_MARVELL is not set
# CONFIG_NET_VENDOR_MICREL is not set
# CONFIG_NET_VENDOR_NATSEMI is not set
# CONFIG_ETHOC is not set
# CONFIG_NET_VENDOR_SEEQ is not set
# CONFIG_NET_VENDOR_SMSC is not set
# CONFIG_NET_VENDOR_STMICRO is not set
# CONFIG_NET_VENDOR_WIZNET is not set
CONFIG_PHYLIB=y

#
# MII PHY device drivers
#
# CONFIG_AMD_PHY is not set
# CONFIG_MARVELL_PHY is not set
CONFIG_DAVICOM_PHY=y
# CONFIG_QSEMI_PHY is not set
# CONFIG_LXT_PHY is not set
# CONFIG_CICADA_PHY is not set
# CONFIG_VITESSE_PHY is not set
# CONFIG_SMSC_PHY is not set
# CONFIG_BROADCOM_PHY is not set
# CONFIG_BCM87XX_PHY is not set
# CONFIG_ICPLUS_PHY is not set
# CONFIG_REALTEK_PHY is not set
# CONFIG_NATIONAL_PHY is not set
# CONFIG_STE10XP is not set
# CONFIG_LSI_ET1011C_PHY is not set
CONFIG_MICREL_PHY=y
# CONFIG_FIXED_PHY is not set
# CONFIG_MDIO_BITBANG is not set
# CONFIG_MDIO_BUS_MUX_GPIO is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
# CONFIG_WLAN is not set

#
# Enable WiMAX (Networking options) to see the WiMAX drivers
#
# CONFIG_WAN is not set
# CONFIG_ISDN is not set

#
# Input device support
#
CONFIG_INPUT=y
# CONFIG_INPUT_FF_MEMLESS is not set
# CONFIG_INPUT_POLLDEV is not set
# CONFIG_INPUT_SPARSEKMAP is not set
# CONFIG_INPUT_MATRIXKMAP is not set

#
# Userland interfaces
#
# CONFIG_INPUT_MOUSEDEV is not set
# CONFIG_INPUT_JOYDEV is not set
# CONFIG_INPUT_EVDEV is not set
# CONFIG_INPUT_EVBUG is not set

#
# Input Device Drivers
#
# CONFIG_INPUT_KEYBOARD is not set
# CONFIG_INPUT_MOUSE is not set
# CONFIG_INPUT_JOYSTICK is not set
# CONFIG_INPUT_TABLET is not set
# CONFIG_INPUT_TOUCHSCREEN is not set
# CONFIG_INPUT_MISC is not set

#
# Hardware I/O ports
#
# CONFIG_SERIO is not set
# CONFIG_GAMEPORT is not set

#
# Character devices
#
CONFIG_VT=y
CONFIG_CONSOLE_TRANSLATIONS=y
CONFIG_VT_CONSOLE=y
CONFIG_HW_CONSOLE=y
# CONFIG_VT_HW_CONSOLE_BINDING is not set
CONFIG_UNIX98_PTYS=y
# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
# CONFIG_LEGACY_PTYS is not set
# CONFIG_SERIAL_NONSTANDARD is not set
# CONFIG_N_GSM is not set
# CONFIG_TRACE_SINK is not set
# CONFIG_DEVKMEM is not set

#
# Serial drivers
#
# CONFIG_SERIAL_8250 is not set

#
# Non-8250 serial port support
#
CONFIG_SERIAL_ATMEL=y
CONFIG_SERIAL_ATMEL_CONSOLE=y
# CONFIG_SERIAL_ATMEL_PDC is not set
# CONFIG_SERIAL_ATMEL_TTYAT is not set
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
# CONFIG_SERIAL_TIMBERDALE is not set
# CONFIG_SERIAL_ALTERA_JTAGUART is not set
# CONFIG_SERIAL_ALTERA_UART is not set
# CONFIG_SERIAL_XILINX_PS_UART is not set
# CONFIG_TTY_PRINTK is not set
# CONFIG_HVC_DCC is not set
# CONFIG_IPMI_HANDLER is not set
# CONFIG_HW_RANDOM is not set
# CONFIG_R3964 is not set
# CONFIG_RAW_DRIVER is not set
# CONFIG_TCG_TPM is not set
# CONFIG_I2C is not set
# CONFIG_SPI is not set
# CONFIG_HSI is not set

#
# PPS support
#
# CONFIG_PPS is not set

#
# PPS generators support
#

#
# PTP clock support
#

#
# Enable Device Drivers -> PPS to see the PTP clock options.
#
CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y
CONFIG_ARCH_REQUIRE_GPIOLIB=y
CONFIG_GPIOLIB=y
CONFIG_OF_GPIO=y
# CONFIG_DEBUG_GPIO is not set
# CONFIG_GPIO_SYSFS is not set

#
# Memory mapped GPIO drivers:
#
# CONFIG_GPIO_GENERIC_PLATFORM is not set
# CONFIG_GPIO_EM is not set

#
# I2C GPIO expanders:
#

#
# PCI GPIO expanders:
#

#
# SPI GPIO expanders:
#

#
# AC97 GPIO expanders:
#

#
# MODULbus GPIO expanders:
#
# CONFIG_W1 is not set
# CONFIG_POWER_SUPPLY is not set
# CONFIG_POWER_AVS is not set
# CONFIG_HWMON is not set
# CONFIG_THERMAL is not set
# CONFIG_WATCHDOG is not set
CONFIG_SSB_POSSIBLE=y

#
# Sonics Silicon Backplane
#
CONFIG_SSB=y
# CONFIG_SSB_SILENT is not set
# CONFIG_SSB_DEBUG is not set
CONFIG_BCMA_POSSIBLE=y

#
# Broadcom specific AMBA
#
# CONFIG_BCMA is not set

#
# Multifunction device drivers
#
# CONFIG_MFD_CORE is not set
# CONFIG_MFD_SM501 is not set
# CONFIG_MFD_ASIC3 is not set
# CONFIG_HTC_EGPIO is not set
# CONFIG_HTC_PASIC3 is not set
# CONFIG_MFD_TMIO is not set
# CONFIG_MFD_T7L66XB is not set
# CONFIG_MFD_TC6387XB is not set
# CONFIG_MFD_TC6393XB is not set
# CONFIG_ABX500_CORE is not set
# CONFIG_REGULATOR is not set
# CONFIG_MEDIA_SUPPORT is not set

#
# Graphics support
#
CONFIG_HAVE_FB_ATMEL=y
# CONFIG_DRM is not set
# CONFIG_VGASTATE is not set
# CONFIG_VIDEO_OUTPUT_CONTROL is not set
# CONFIG_FB is not set
# CONFIG_EXYNOS_VIDEO is not set
# CONFIG_BACKLIGHT_LCD_SUPPORT is not set

#
# Console display driver support
#
CONFIG_DUMMY_CONSOLE=y
# CONFIG_SOUND is not set

#
# HID support
#
CONFIG_HID=y
# CONFIG_HIDRAW is not set
# CONFIG_UHID is not set
CONFIG_HID_GENERIC=y

#
# Special HID drivers
#
CONFIG_USB_ARCH_HAS_OHCI=y
CONFIG_USB_ARCH_HAS_EHCI=y
# CONFIG_USB_ARCH_HAS_XHCI is not set
# CONFIG_USB_SUPPORT is not set
# CONFIG_MMC is not set
# CONFIG_MEMSTICK is not set
# CONFIG_NEW_LEDS is not set
# CONFIG_ACCESSIBILITY is not set
# CONFIG_EDAC is not set
CONFIG_RTC_LIB=y
# CONFIG_RTC_CLASS is not set
# CONFIG_DMADEVICES is not set
# CONFIG_AUXDISPLAY is not set
# CONFIG_UIO is not set

#
# Virtio drivers
#
# CONFIG_VIRTIO_BALLOON is not set
# CONFIG_VIRTIO_MMIO is not set

#
# Microsoft Hyper-V guest support
#
# CONFIG_STAGING is not set
CONFIG_CLKDEV_LOOKUP=y

#
# Hardware Spinlock drivers
#
# CONFIG_IOMMU_SUPPORT is not set

#
# Remoteproc drivers (EXPERIMENTAL)
#

#
# Rpmsg drivers (EXPERIMENTAL)
#
# CONFIG_VIRT_DRIVERS is not set
# CONFIG_PM_DEVFREQ is not set
# CONFIG_EXTCON is not set
# CONFIG_MEMORY is not set
# CONFIG_IIO is not set
# CONFIG_PWM is not set

#
# File systems
#
# CONFIG_EXT2_FS is not set
# CONFIG_EXT3_FS is not set
# CONFIG_EXT4_FS is not set
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not set
# CONFIG_XFS_FS is not set
# CONFIG_BTRFS_FS is not set
# CONFIG_NILFS2_FS is not set
# CONFIG_FS_POSIX_ACL is not set
CONFIG_FILE_LOCKING=y
CONFIG_FSNOTIFY=y
CONFIG_DNOTIFY=y
CONFIG_INOTIFY_USER=y
CONFIG_FANOTIFY=y
# CONFIG_QUOTA is not set
# CONFIG_QUOTACTL is not set
# CONFIG_AUTOFS4_FS is not set
# CONFIG_FUSE_FS is not set

#
# Caches
#
# CONFIG_FSCACHE is not set

#
# CD-ROM/DVD Filesystems
#
# CONFIG_ISO9660_FS is not set
# CONFIG_UDF_FS is not set

#
# DOS/FAT/NT Filesystems
#
# CONFIG_MSDOS_FS is not set
# CONFIG_VFAT_FS is not set
# CONFIG_NTFS_FS is not set

#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_PROC_SYSCTL=y
CONFIG_PROC_PAGE_MONITOR=y
CONFIG_SYSFS=y
CONFIG_TMPFS=y
# CONFIG_TMPFS_POSIX_ACL is not set
# CONFIG_TMPFS_XATTR is not set
# CONFIG_HUGETLB_PAGE is not set
# CONFIG_CONFIGFS_FS is not set
# CONFIG_MISC_FILESYSTEMS is not set
CONFIG_NETWORK_FILESYSTEMS=y
CONFIG_NFS_FS=y
CONFIG_NFS_V2=y
CONFIG_NFS_V3=y
# CONFIG_NFS_V3_ACL is not set
# CONFIG_NFS_V4 is not set
# CONFIG_NFS_SWAP is not set
CONFIG_ROOT_NFS=y
# CONFIG_NFSD is not set
CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
CONFIG_NFS_COMMON=y
CONFIG_SUNRPC=y
# CONFIG_SUNRPC_DEBUG is not set
# CONFIG_CEPH_FS is not set
# CONFIG_CIFS is not set
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
# CONFIG_AFS_FS is not set
# CONFIG_NLS is not set

#
# Kernel hacking
#
CONFIG_PRINTK_TIME=y
CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4
CONFIG_ENABLE_WARN_DEPRECATED=y
CONFIG_ENABLE_MUST_CHECK=y
CONFIG_FRAME_WARN=1024
# CONFIG_MAGIC_SYSRQ is not set
CONFIG_STRIP_ASM_SYMS=y
# CONFIG_READABLE_ASM is not set
# CONFIG_UNUSED_SYMBOLS is not set
CONFIG_DEBUG_FS=y
# CONFIG_HEADERS_CHECK is not set
# CONFIG_DEBUG_SECTION_MISMATCH is not set
CONFIG_DEBUG_KERNEL=y
# CONFIG_DEBUG_SHIRQ is not set
# CONFIG_LOCKUP_DETECTOR is not set
# CONFIG_HARDLOCKUP_DETECTOR is not set
# CONFIG_PANIC_ON_OOPS is not set
CONFIG_PANIC_ON_OOPS_VALUE=0
# CONFIG_DETECT_HUNG_TASK is not set
# CONFIG_SCHED_DEBUG is not set
# CONFIG_SCHEDSTATS is not set
# CONFIG_TIMER_STATS is not set
# CONFIG_DEBUG_OBJECTS is not set
# CONFIG_DEBUG_KMEMLEAK is not set
# CONFIG_DEBUG_RT_MUTEXES is not set
# CONFIG_RT_MUTEX_TESTER is not set
# CONFIG_DEBUG_SPINLOCK is not set
# CONFIG_DEBUG_MUTEXES is not set
# CONFIG_DEBUG_LOCK_ALLOC is not set
# CONFIG_PROVE_LOCKING is not set
# CONFIG_SPARSE_RCU_POINTER is not set
# CONFIG_LOCK_STAT is not set
# CONFIG_DEBUG_ATOMIC_SLEEP is not set
# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
# CONFIG_DEBUG_STACK_USAGE is not set
# CONFIG_DEBUG_KOBJECT is not set
CONFIG_DEBUG_BUGVERBOSE=y
CONFIG_DEBUG_INFO=y
# CONFIG_DEBUG_INFO_REDUCED is not set
# CONFIG_DEBUG_VM is not set
# CONFIG_DEBUG_WRITECOUNT is not set
# CONFIG_DEBUG_MEMORY_INIT is not set
# CONFIG_DEBUG_LIST is not set
# CONFIG_TEST_LIST_SORT is not set
# CONFIG_DEBUG_SG is not set
# CONFIG_DEBUG_NOTIFIERS is not set
# CONFIG_DEBUG_CREDENTIALS is not set
# CONFIG_BOOT_PRINTK_DELAY is not set
# CONFIG_RCU_TORTURE_TEST is not set
# CONFIG_RCU_TRACE is not set
# CONFIG_BACKTRACE_SELF_TEST is not set
# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
# CONFIG_LKDTM is not set
# CONFIG_NOTIFIER_ERROR_INJECTION is not set
# CONFIG_FAULT_INJECTION is not set
# CONFIG_LATENCYTOP is not set
# CONFIG_DEBUG_PAGEALLOC is not set
CONFIG_HAVE_FUNCTION_TRACER=y
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
CONFIG_HAVE_DYNAMIC_FTRACE=y
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
CONFIG_HAVE_C_RECORDMCOUNT=y
CONFIG_TRACING_SUPPORT=y
# CONFIG_FTRACE is not set
# CONFIG_DYNAMIC_DEBUG is not set
# CONFIG_DMA_API_DEBUG is not set
# CONFIG_ATOMIC64_SELFTEST is not set
# CONFIG_SAMPLES is not set
CONFIG_HAVE_ARCH_KGDB=y
# CONFIG_KGDB is not set
# CONFIG_TEST_KSTRTOX is not set
# CONFIG_STRICT_DEVMEM is not set
CONFIG_ARM_UNWIND=y
CONFIG_DEBUG_USER=y
# CONFIG_DEBUG_LL is not set

#
# Security options
#
# CONFIG_KEYS is not set
# CONFIG_SECURITY_DMESG_RESTRICT is not set
# CONFIG_SECURITY is not set
# CONFIG_SECURITYFS is not set
CONFIG_DEFAULT_SECURITY_DAC=y
CONFIG_DEFAULT_SECURITY=""
# CONFIG_CRYPTO is not set
# CONFIG_BINARY_PRINTF is not set

#
# Library routines
#
CONFIG_BITREVERSE=y
CONFIG_GENERIC_STRNCPY_FROM_USER=y
CONFIG_GENERIC_STRNLEN_USER=y
CONFIG_GENERIC_PCI_IOMAP=y
CONFIG_GENERIC_IO=y
# CONFIG_CRC_CCITT is not set
# CONFIG_CRC16 is not set
# CONFIG_CRC_T10DIF is not set
# CONFIG_CRC_ITU_T is not set
CONFIG_CRC32=y
# CONFIG_CRC32_SELFTEST is not set
CONFIG_CRC32_SLICEBY8=y
# CONFIG_CRC32_SLICEBY4 is not set
# CONFIG_CRC32_SARWATE is not set
# CONFIG_CRC32_BIT is not set
# CONFIG_CRC7 is not set
# CONFIG_LIBCRC32C is not set
# CONFIG_CRC8 is not set
# CONFIG_XZ_DEC is not set
# CONFIG_XZ_DEC_BCJ is not set
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_HAS_DMA=y
CONFIG_DQL=y
CONFIG_NLATTR=y
CONFIG_GENERIC_ATOMIC64=y
CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y
# CONFIG_AVERAGE is not set
# CONFIG_CORDIC is not set
# CONFIG_DDR is not set

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 0/6] UBI: add max_beb_per1024 parameter / ioctl
  2012-09-03 13:14                     ` Richard Genoud
@ 2012-09-03 13:31                       ` Artem Bityutskiy
  2012-09-03 13:37                         ` Richard Genoud
  0 siblings, 1 reply; 35+ messages in thread
From: Artem Bityutskiy @ 2012-09-03 13:31 UTC (permalink / raw)
  To: Richard Genoud; +Cc: linux-mtd, Shmulik Ladkani

[-- Attachment #1: Type: text/plain, Size: 419 bytes --]

On Mon, 2012-09-03 at 15:14 +0200, Richard Genoud wrote:
> I finally managed to reproduced it on linux-ubi/master + only one
> patch to make my board boot:
> (I thought it needed much more code than that...)

Hmm, you use slob... I guess this is the reason, I do not see issues
with slub. May be there is a bug which is revealed when slob is used?
I'll need to try slob.

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 0/6] UBI: add max_beb_per1024 parameter / ioctl
  2012-09-03 13:31                       ` Artem Bityutskiy
@ 2012-09-03 13:37                         ` Richard Genoud
  0 siblings, 0 replies; 35+ messages in thread
From: Richard Genoud @ 2012-09-03 13:37 UTC (permalink / raw)
  To: dedekind1; +Cc: linux-mtd, Shmulik Ladkani

2012/9/3 Artem Bityutskiy <dedekind1@gmail.com>:
> On Mon, 2012-09-03 at 15:14 +0200, Richard Genoud wrote:
>> I finally managed to reproduced it on linux-ubi/master + only one
>> patch to make my board boot:
>> (I thought it needed much more code than that...)
>
> Hmm, you use slob... I guess this is the reason, I do not see issues
> with slub. May be there is a bug which is revealed when slob is used?
> I'll need to try slob.

Good call Artem !
I switched to slub and I can't reproduce it anymore.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 0/6] UBI: add max_beb_per1024 parameter / ioctl
  2012-08-31 14:46             ` Richard Genoud
  2012-09-03  8:00               ` Artem Bityutskiy
@ 2012-09-03 14:32               ` Artem Bityutskiy
  2012-09-03 14:33               ` Artem Bityutskiy
  2 siblings, 0 replies; 35+ messages in thread
From: Artem Bityutskiy @ 2012-09-03 14:32 UTC (permalink / raw)
  To: Richard Genoud; +Cc: linux-mtd, Shmulik Ladkani

[-- Attachment #1: Type: text/plain, Size: 630 bytes --]

On Fri, 2012-08-31 at 16:46 +0200, Richard Genoud wrote:
> diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c
> --- a/drivers/mtd/ubi/vtbl.c
> +++ b/drivers/mtd/ubi/vtbl.c
> @@ -346,8 +346,8 @@ retry:
>          */
>         err = ubi_scan_add_used(ubi, si, new_seb->pnum, new_seb->ec,
>                                 vid_hdr, 0);
> +//     kfree(new_seb);
> +//     ubi_free_vid_hdr(ubi, vid_hdr);
>         return err;
> 
Richard, I've sent you the fix. I've tested it and it fixes the issue.
Switching to SLUB must be hiding it somehow. Thanks for reporting!
> 
-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 0/6] UBI: add max_beb_per1024 parameter / ioctl
  2012-08-31 14:46             ` Richard Genoud
  2012-09-03  8:00               ` Artem Bityutskiy
  2012-09-03 14:32               ` Artem Bityutskiy
@ 2012-09-03 14:33               ` Artem Bityutskiy
  2012-09-03 14:45                 ` Richard Genoud
  2 siblings, 1 reply; 35+ messages in thread
From: Artem Bityutskiy @ 2012-09-03 14:33 UTC (permalink / raw)
  To: Richard Genoud; +Cc: linux-mtd, Shmulik Ladkani

[-- Attachment #1: Type: text/plain, Size: 279 bytes --]

On Fri, 2012-08-31 at 16:46 +0200, Richard Genoud wrote:
> I tested also some values at limits, it seems all right.

Thanks Richard for testing. Would you be also energetic enough to do the
last step - some documentation for mtd-www?

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v3 0/6] UBI: add max_beb_per1024 parameter / ioctl
  2012-09-03 14:33               ` Artem Bityutskiy
@ 2012-09-03 14:45                 ` Richard Genoud
  0 siblings, 0 replies; 35+ messages in thread
From: Richard Genoud @ 2012-09-03 14:45 UTC (permalink / raw)
  To: dedekind1; +Cc: linux-mtd, Shmulik Ladkani

2012/9/3 Artem Bityutskiy <dedekind1@gmail.com>:
> On Fri, 2012-08-31 at 16:46 +0200, Richard Genoud wrote:
>> I tested also some values at limits, it seems all right.
>
> Thanks Richard for testing. Would you be also energetic enough to do the
> last step - some documentation for mtd-www?

yep, that's next in line !

^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2012-09-03 14:45 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-20 16:00 [PATCH v3 0/6] UBI: add max_beb_per1024 parameter / ioctl Richard Genoud
2012-08-20 16:00 ` [PATCH v3 1/6] UBI: prepare for max_beb_per1024 module parameter addition Richard Genoud
2012-08-20 19:01   ` Artem Bityutskiy
2012-08-20 16:00 ` [PATCH v3 2/6] UBI: change CONFIG_MTD_UBI_BEB_LIMIT range Richard Genoud
2012-08-20 19:03   ` Artem Bityutskiy
2012-08-20 16:00 ` [PATCH v3 3/6] UBI: check max_beb_per1024 value in ubi_attach_mtd_dev Richard Genoud
2012-08-20 19:19   ` Artem Bityutskiy
2012-08-20 16:00 ` [PATCH v3 4/6] UBI: replace MTD_UBI_BEB_LIMIT with module parameter Richard Genoud
2012-08-21 13:54   ` Artem Bityutskiy
2012-08-22  8:32     ` Richard Genoud
2012-08-22  8:49       ` Artem Bityutskiy
2012-08-22 12:09         ` Richard Genoud
2012-08-22 12:16           ` Artem Bityutskiy
2012-08-20 16:00 ` [PATCH v3 5/6] UBI: add ioctl for max_beb_per1024 Richard Genoud
2012-08-21 19:34   ` Artem Bityutskiy
2012-08-20 16:00 ` [PATCH v3 6/6] UBI: drop CONFIG_MTD_UBI_BEB_LIMIT Richard Genoud
2012-08-21 19:34   ` Artem Bityutskiy
2012-08-23 10:10 ` [PATCH v3 0/6] UBI: add max_beb_per1024 parameter / ioctl Artem Bityutskiy
2012-08-23 10:36   ` Shmulik Ladkani
2012-08-23 11:01     ` Richard Genoud
2012-08-23 12:30     ` Artem Bityutskiy
2012-08-23 12:44       ` Shmulik Ladkani
2012-08-23 12:58         ` Artem Bityutskiy
2012-08-23 13:13           ` Richard Genoud
2012-08-23 14:45             ` Artem Bityutskiy
2012-08-31 14:46             ` Richard Genoud
2012-09-03  8:00               ` Artem Bityutskiy
2012-09-03 10:57                 ` Richard Genoud
2012-09-03 11:53                   ` Artem Bityutskiy
2012-09-03 13:14                     ` Richard Genoud
2012-09-03 13:31                       ` Artem Bityutskiy
2012-09-03 13:37                         ` Richard Genoud
2012-09-03 14:32               ` Artem Bityutskiy
2012-09-03 14:33               ` Artem Bityutskiy
2012-09-03 14:45                 ` Richard Genoud

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.