<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/mtd/ubi/misc.c, branch v6.12.80</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-02-05T21:36:39+00:00</updated>
<entry>
<title>ubi: use correct names in function kernel-doc comments</title>
<updated>2023-02-05T21:36:39+00:00</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2023-01-13T06:40:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0b3bc49c936c1e6f399fcd2028ce24c3de9e7e59'/>
<id>urn:sha1:0b3bc49c936c1e6f399fcd2028ce24c3de9e7e59</id>
<content type='text'>
Fix kernel-doc warnings by using the correct function names in
their kernel-doc notation:

drivers/mtd/ubi/eba.c:72: warning: expecting prototype for next_sqnum(). Prototype was for ubi_next_sqnum() instead
drivers/mtd/ubi/wl.c:176: warning: expecting prototype for wl_tree_destroy(). Prototype was for wl_entry_destroy() instead
drivers/mtd/ubi/misc.c:24: warning: expecting prototype for calc_data_len(). Prototype was for ubi_calc_data_len() instead

Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: Richard Weinberger &lt;richard@nod.at&gt;
Cc: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Cc: Vignesh Raghavendra &lt;vigneshr@ti.com&gt;
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156</title>
<updated>2019-05-30T18:26:35+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-27T06:55:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1a59d1b8e05ea6ab45f7e18897de1ef0e6bc3da6'/>
<id>urn:sha1:1a59d1b8e05ea6ab45f7e18897de1ef0e6bc3da6</id>
<content type='text'>
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation either version 2 of the license or at
  your option any later version this program is distributed in the
  hope that it will be useful but without any warranty without even
  the implied warranty of merchantability or fitness for a particular
  purpose see the gnu general public license for more details you
  should have received a copy of the gnu general public license along
  with this program if not write to the free software foundation inc
  59 temple place suite 330 boston ma 02111 1307 usa

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 1334 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Reviewed-by: Richard Fontana &lt;rfontana@redhat.com&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070033.113240726@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mtd: ubi: Add logging functions ubi_msg, ubi_warn and ubi_err</title>
<updated>2016-03-20T20:36:05+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2016-02-25T17:25:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=58d303def2a1fbfb5c794bafe7da54b900d9694e'/>
<id>urn:sha1:58d303def2a1fbfb5c794bafe7da54b900d9694e</id>
<content type='text'>
Using logging functions instead of macros can reduce overall object size.

$ size drivers/mtd/ubi/built-in.o*
   text	   data	    bss	    dec	    hex	filename
 271620	 163364	  73696	 508680	  7c308	drivers/mtd/ubi/built-in.o.allyesconfig.new
 287638	 165380	  73504	 526522	  808ba	drivers/mtd/ubi/built-in.o.allyesconfig.old
  87728	   3780	    504	  92012	  1676c	drivers/mtd/ubi/built-in.o.defconfig.new
  97084	   3780	    504	 101368	  18bf8	drivers/mtd/ubi/built-in.o.defconfig.old

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
</content>
</entry>
<entry>
<title>UBI: fix soft lockup in ubi_check_volume()</title>
<updated>2015-01-28T15:18:09+00:00</updated>
<author>
<name>hujianyang</name>
<email>hujianyang@huawei.com</email>
</author>
<published>2014-12-30T03:56:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9aa272b492e7551a9ee0e2c83c720ea013698485'/>
<id>urn:sha1:9aa272b492e7551a9ee0e2c83c720ea013698485</id>
<content type='text'>
Running mtd-utils/tests/ubi-tests/io_basic.c could cause
soft lockup or watchdog reset. It is because *updatevol*
will perform ubi_check_volume() after updating finish
and this function will full scan the updated lebs if the
volume is initialized as STATIC_VOLUME.

This patch adds *cond_resched()* in the loop of lebs scan
to avoid soft lockup.

Helped by Richard Weinberger &lt;richard@nod.at&gt;

[ 2158.067096] INFO: rcu_sched self-detected stall on CPU { 1}  (t=2101 jiffies g=1606 c=1605 q=56)
[ 2158.172867] CPU: 1 PID: 2073 Comm: io_basic Tainted: G           O 3.10.53 #21
[ 2158.172898] [&lt;c000f624&gt;] (unwind_backtrace+0x0/0x120) from [&lt;c000c294&gt;] (show_stack+0x10/0x14)
[ 2158.172918] [&lt;c000c294&gt;] (show_stack+0x10/0x14) from [&lt;c008ac3c&gt;] (rcu_check_callbacks+0x1c0/0x660)
[ 2158.172936] [&lt;c008ac3c&gt;] (rcu_check_callbacks+0x1c0/0x660) from [&lt;c002b480&gt;] (update_process_times+0x38/0x64)
[ 2158.172953] [&lt;c002b480&gt;] (update_process_times+0x38/0x64) from [&lt;c005ff38&gt;] (tick_sched_handle+0x54/0x60)
[ 2158.172966] [&lt;c005ff38&gt;] (tick_sched_handle+0x54/0x60) from [&lt;c00601ac&gt;] (tick_sched_timer+0x44/0x74)
[ 2158.172978] [&lt;c00601ac&gt;] (tick_sched_timer+0x44/0x74) from [&lt;c003f348&gt;] (__run_hrtimer+0xc8/0x1b8)
[ 2158.172992] [&lt;c003f348&gt;] (__run_hrtimer+0xc8/0x1b8) from [&lt;c003fd9c&gt;] (hrtimer_interrupt+0x128/0x2a4)
[ 2158.173007] [&lt;c003fd9c&gt;] (hrtimer_interrupt+0x128/0x2a4) from [&lt;c0246f1c&gt;] (arch_timer_handler_virt+0x28/0x30)
[ 2158.173022] [&lt;c0246f1c&gt;] (arch_timer_handler_virt+0x28/0x30) from [&lt;c0086214&gt;] (handle_percpu_devid_irq+0x9c/0x124)
[ 2158.173036] [&lt;c0086214&gt;] (handle_percpu_devid_irq+0x9c/0x124) from [&lt;c0082bd8&gt;] (generic_handle_irq+0x20/0x30)
[ 2158.173049] [&lt;c0082bd8&gt;] (generic_handle_irq+0x20/0x30) from [&lt;c000969c&gt;] (handle_IRQ+0x64/0x8c)
[ 2158.173060] [&lt;c000969c&gt;] (handle_IRQ+0x64/0x8c) from [&lt;c0008544&gt;] (gic_handle_irq+0x3c/0x60)
[ 2158.173074] [&lt;c0008544&gt;] (gic_handle_irq+0x3c/0x60) from [&lt;c02f0f80&gt;] (__irq_svc+0x40/0x50)
[ 2158.173083] Exception stack(0xc4043c98 to 0xc4043ce0)
[ 2158.173092] 3c80:                                                       c4043ce4 00000019
[ 2158.173102] 3ca0: 1f8a865f c050ad10 1f8a864c 00000031 c04b5970 0003ebce 00000000 f3550000
[ 2158.173113] 3cc0: bf00bc68 00000800 0003ebce c4043ce0 c0186d14 c0186cb8 80000013 ffffffff
[ 2158.173130] [&lt;c02f0f80&gt;] (__irq_svc+0x40/0x50) from [&lt;c0186cb8&gt;] (read_current_timer+0x4/0x38)
[ 2158.173145] [&lt;c0186cb8&gt;] (read_current_timer+0x4/0x38) from [&lt;1f8a865f&gt;] (0x1f8a865f)
[ 2183.927097] BUG: soft lockup - CPU#1 stuck for 22s! [io_basic:2073]
[ 2184.002229] Modules linked in: nandflash(O) [last unloaded: nandflash]

Signed-off-by: Wang Kai &lt;morgan.wang@huawei.com&gt;
Signed-off-by: hujianyang &lt;hujianyang@huawei.com&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
</content>
</entry>
<entry>
<title>UBI: Extend UBI layer debug/messaging capabilities</title>
<updated>2014-11-07T10:08:51+00:00</updated>
<author>
<name>Tanya Brokhman</name>
<email>tlinder@codeaurora.org</email>
</author>
<published>2014-10-20T16:57:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=326087033108e7806e24974f2c8271f95cddaf3a'/>
<id>urn:sha1:326087033108e7806e24974f2c8271f95cddaf3a</id>
<content type='text'>
If there is more then one UBI device mounted, there is no way to
distinguish between messages from different UBI devices.
Add device number to all ubi layer message types.

The R/O block driver messages were replaced by pr_* since
ubi_device structure is not used by it.

Amended a bit by Artem.

Signed-off-by: Tanya Brokhman &lt;tlinder@codeaurora.org&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>UBI: comply with coding style</title>
<updated>2012-09-04T06:39:01+00:00</updated>
<author>
<name>Artem Bityutskiy</name>
<email>artem.bityutskiy@linux.intel.com</email>
</author>
<published>2012-08-27T11:43:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=049333cecbde11988c49ad4d7861eefbc3534422'/>
<id>urn:sha1:049333cecbde11988c49ad4d7861eefbc3534422</id>
<content type='text'>
Join all the split printk lines in order to stop checkpatch complaining.

Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>UBI: limit amount of reserved eraseblocks for bad PEB handling</title>
<updated>2012-09-04T06:38:58+00:00</updated>
<author>
<name>Shmulik Ladkani</name>
<email>shmulik.ladkani@gmail.com</email>
</author>
<published>2012-07-04T08:06:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=37f758a036da56c7cff81b68d1d872752079eb6c'/>
<id>urn:sha1:37f758a036da56c7cff81b68d1d872752079eb6c</id>
<content type='text'>
The existing mechanism of reserving PEBs for bad PEB handling has two
flaws:
- It is calculated as a percentage of good PEBs instead of total PEBs.
- There's no limit on the amount of PEBs UBI reserves for future bad
  eraseblock handling.

This patch changes the mechanism to overcome these flaws.

The desired level of PEBs reserved for bad PEB handling (beb_rsvd_level)
is set to the maximum expected bad eraseblocks (bad_peb_limit) minus the
existing number of bad eraseblocks (bad_peb_count).

The actual amount of PEBs reserved for bad PEB handling is usually set
to the desired level (but in some circumstances may be lower than the
desired level, e.g. when attaching to a device that has too few
available PEBs to satisfy the desired level).

In the case where the device has too many bad PEBs (above the expected
limit), then the desired level, and the actual amount of PEBs reserved
are set to zero. No PEBs will be set aside for future bad eraseblock
handling - even if some PEBs are made available (e.g. by shrinking a
volume).
If another PEB goes bad, and there are available PEBs, then the
eraseblock will be marked bad (consuming one available PEB). But if
there are no available PEBs, ubi will go into readonly mode.

Signed-off-by: Shmulik Ladkani &lt;shmulik.ladkani@gmail.com&gt;
</content>
</entry>
<entry>
<title>UBI: harmonize the update of ubi-&gt;beb_rsvd_pebs</title>
<updated>2012-07-18T11:30:34+00:00</updated>
<author>
<name>Shmulik Ladkani</name>
<email>shmulik.ladkani@gmail.com</email>
</author>
<published>2012-07-04T08:06:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=87e773c95eb0b363f2efcc7aff8a347dc18925d0'/>
<id>urn:sha1:87e773c95eb0b363f2efcc7aff8a347dc18925d0</id>
<content type='text'>
Currently, there are several locations where an attempt to reserve more
PEBs for bad PEB handling is made, with the same code being duplicated.

Harmonize it by introducing 'ubi_update_reserved()'.

Also, improve the debug message issued, making it more descriptive.

Artem: amended the patch a little.

Signed-off-by: Shmulik Ladkani &lt;shmulik.ladkani@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>UBI: trivial: fix comment of ubi_calculate_reserved function</title>
<updated>2012-07-18T10:33:03+00:00</updated>
<author>
<name>Shmulik Ladkani</name>
<email>shmulik.ladkani@gmail.com</email>
</author>
<published>2012-07-04T08:06:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5c669a5bd8c0f0567127128990d01f9ae320a9ef'/>
<id>urn:sha1:5c669a5bd8c0f0567127128990d01f9ae320a9ef</id>
<content type='text'>
The function name within the comment was not aligned with the actual
function name.

Signed-off-by: Shmulik Ladkani &lt;shmulik.ladkani@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>mtd: utilize `mtd_is_*()' functions</title>
<updated>2011-09-21T06:19:06+00:00</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2011-09-21T01:34:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d57f40544a41fdfe90fd863b6865138c5a82f1cc'/>
<id>urn:sha1:d57f40544a41fdfe90fd863b6865138c5a82f1cc</id>
<content type='text'>
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@intel.com&gt;
</content>
</entry>
</feed>
