History log of /u-boot/fs/ubifs/ubifs.h
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 13248d66 09-Nov-2023 Igor Prusov <ivprusov@salutedevices.com>

treewide: use linux/time.h for time conversion defines

Now that we have time conversion defines from in time.h there is no need
for each driver to define their own version.

Signed-off-by: Igor Prusov <ivprusov@salutedevices.com>
Reviewed-by: Svyatoslav Ryhel <clamor95@gmail.com> # tegra
Reviewed-by: Eugen Hristev <eugen.hristev@collabora.com> #at91
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org> #qcom geni
Reviewed-by: Stefan Bosch <stefan_b@posteo.net> #nanopi2
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>

# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 0cf207ec 27-Sep-2021 Wolfgang Denk <wd@denx.de>

WS cleanup: remove SPACE(s) followed by TAB

Signed-off-by: Wolfgang Denk <wd@denx.de>

# 5a08cfee 27-Jun-2018 Christophe Kerello <christophe.kerello@st.com>

ubifs: remove useless code

By checking ubifs source code, s_instances parameter is not
used anymore. So, set this parameter and the associated source
code under __UBOOT__ compilation.

Signed-off-by: Christophe Kerello <christophe.kerello@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>

# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 05ea83b6 03-Apr-2018 Bradley Bolen <bradleybolen@gmail.com>

ubifs: Change value of mutex_is_locked()

The mutex lock and unlock functions are stubbed out and mutex_is_locked
was 0. This caused asserts to fail in ubifs code when checking that the
mutex was locked. For example,

UBIFS assert failed in ubifs_change_lp at 540
UBIFS assert failed in ubifs_release_lprops at 278

Assume that the "mutex" is locked since that is the normal case when it
is checked in the ubifs code.

Signed-off-by: Bradley Bolen <bradleybolen@gmail.com>

# e9951281 23-Mar-2018 Petr Vorel <petr.vorel@gmail.com>

ubifs: Reintroduce using CONFIG_UBIFS_SILENCE_MSG

Use of CONFIG_UBIFS_SILENCE_MSG was added in
147162dac6 ("ubi: ubifs: Turn off verbose prints")

Then it was removed in
ff94bc40af ("mtd, ubi, ubifs: resync with Linux-3.14")

Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Heiko Schocher <hs@denx.de>
Signed-off-by: Petr Vorel <petr.vorel@gmail.com>

# 0195a7bb 21-Oct-2015 Heiko Schocher <hs@denx.de>

ubi,ubifs: sync with linux v4.2

sync with linux v4.2

commit 64291f7db5bd8150a74ad2036f1037e6a0428df2
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date: Sun Aug 30 11:34:09 2015 -0700

Linux 4.2

This update is needed, as it turned out, that fastmap
was in experimental/broken state in kernel v3.15, which
was the last base for U-Boot.

Signed-off-by: Heiko Schocher <hs@denx.de>
Tested-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>

# ad15749b 17-Sep-2015 Hans de Goede <hdegoede@redhat.com>

ubifs: Modify ubifs u-boot wrapper function prototypes for generic fs use

Modify the ubifs u-boot wrapper function prototypes for generic fs use,
and give them their own header file.

This is a preparation patch for adding ubifs support to the generic fs
code from fs/fs.c.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Heiko Schocher <hs@denx.de>

# dc288431 22-Jan-2015 Anton Habegger <anton.habegger@gmail.com>

ubifs: Import atomic_long operations from Linux

This commit is a preperation for a subsequent UBIFS commit
which needs atomic_long operations.

Therefor "include/asm-generic/atomic-long.h" is imported
from 1860e37 Linux 3.15

Signed-off-by: Anton Habegger <anton.habegger@gmail.com>

# cba1da49 06-Nov-2014 Masahiro Yamada <masahiroy@kernel.org>

include: move various macros to include/linux/kernel.h

U-Boot has imported various utility macros from Linux
scattering them to various places without consistency.

In include/common.h are min, max, min3, max3, ARRAY_SIZE, ALIGN,
container_of, DIV_ROUND_UP, etc.
In include/linux/compat.h are min_t, max_t, round_up, round_down,
etc.
We also have duplicated defines of min_t in some *.c files.

Moreover, we are suffering from too cluttered include/common.h.

This commit moves various macros that originate in
include/linux/kernel.h of Linux to their original position.

Note:
This commit simply moves the macros; the macros roundup,
min, max, min2, max3, ARRAY_SIZE are different
from those of Linux at this point.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>

# 3b612970 31-Aug-2014 Masahiro Yamada <masahiroy@kernel.org>

kbuild: force to define __UBOOT__ in all the C sources

U-Boot has imported various source files from other projects,
mostly Linux.

Something like

#ifdef __UBOOT__
[ modification for U-Boot ]
#else
[ original code ]
#endif

is an often used strategy for clarification of adjusted parts,
that is, easier re-sync in future.

Instead of defining __UBOOT__ in each source file,
passing it from the top Makefile would be easier.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Heiko Schocher <hs@denx.de>

# ff94bc40 24-Jun-2014 Heiko Schocher <hs@denx.de>

mtd, ubi, ubifs: resync with Linux-3.14

resync ubi subsystem with linux:

commit 455c6fdbd219161bd09b1165f11699d6d73de11c
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date: Sun Mar 30 20:40:15 2014 -0700

Linux 3.14

A nice side effect of this, is we introduce UBI Fastmap support
to U-Boot.

Signed-off-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Tom Rini <trini@ti.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Sergey Lapin <slapin@ossfans.org>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Joerg Krause <jkrause@posteo.de>

# 1674df60 20-Jan-2014 Karicheri, Muralidharan <m-karicheri2@ti.com>

ubifs: fix checkpatch warning

Fix the following checkpatch warning:-

WARNING: externs should be avoided in .c files

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>

# 147162da 08-Apr-2013 Joe Hershberger <joe.hershberger@ni.com>

ubi: ubifs: Turn off verbose prints

The prints are out of control. SILENCE!

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>

# 87d93a1b 09-Dec-2009 Wolfgang Wegner <w.wegner@astro-kom.de>

move prototypes for gunzip() and zunzip() to common.h

Prototype for gunzip/zunzip was only in lib_generic/gunzip.c and thus
repeated in every file using it. This patch moves the prototypes to
common.h and removes all prototypes distributed anywhere else.

Signed-off-by: Wolfgang Wegner <w.wegner@astro-kom.de>

# 02f99901 24-Aug-2009 Simon Kagstrom <simon.kagstrom@netinsight.net>

Move __set/clear_bit from ubifs.h to bitops.h

__set_bit and __clear_bit are defined in ubifs.h as well as in
asm/include/bitops.h for some architectures. This patch moves
the generic implementation to include/linux/bitops.h and uses
that unless it's defined by the architecture.

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>

# c1a0fd5f 27-Apr-2009 Ricardo Ribalda <ricardo@ribalda.com>

ubifs: BUG: Blocks commpressed with zlib

Blocks compressed with zlib dont have the full gzip header.

Without this patch, block compressed with zlib cannot be readed!

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@uam.es>

# febd7e41 27-Mar-2009 Artem Bityutskiy <Artem.Bityutskiy@nokia.com>

UBIFS: add R/O compatibility

Now UBIFS is supported by u-boot. If we ever decide to change the
media format, then people will have to upgrade their u-boots to
mount new format images. However, very often it is possible to
preserve R/O forward-compatibility, even though the write
forward-compatibility is not preserved.

This patch introduces a new super-block field which stores the
R/O compatibility version.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Acked-by: Adrian Hunter <Adrian.Hunter@nokia.com>
Signed-off-by: Stefan Roese <sr@denx.de>

# 9eefe2a2 19-Mar-2009 Stefan Roese <sr@denx.de>

UBIFS: Implement read-only UBIFS support in U-Boot

The U-Boot UBIFS implementation is largely a direct copy from the current
Linux version (2.6.29-rc6). As already done in the UBI version we have an
"abstraction layer" to redefine or remove some OS calls (e.g. mutex_lock()
...). This makes it possible to use the original Linux code with very
little changes. And by this we can better update to later Linux versions.

I removed some of the Linux features that are not used in the U-Boot
version (e.g. garbage-collection, write support).

Signed-off-by: Stefan Roese <sr@denx.de>
CC: Artem Bityutskiy <dedekind@infradead.org>
CC: Adrian Hunter <ext-Adrian.Hunter@nokia.com>

# 1e94b46f 14-Sep-2023 Simon Glass <sjg@chromium.org>

common: Drop linux/printk.h from common header

This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 0cf207ec 27-Sep-2021 Wolfgang Denk <wd@denx.de>

WS cleanup: remove SPACE(s) followed by TAB

Signed-off-by: Wolfgang Denk <wd@denx.de>

# 5a08cfee 27-Jun-2018 Christophe Kerello <christophe.kerello@st.com>

ubifs: remove useless code

By checking ubifs source code, s_instances parameter is not
used anymore. So, set this parameter and the associated source
code under __UBOOT__ compilation.

Signed-off-by: Christophe Kerello <christophe.kerello@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>

# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 05ea83b6 03-Apr-2018 Bradley Bolen <bradleybolen@gmail.com>

ubifs: Change value of mutex_is_locked()

The mutex lock and unlock functions are stubbed out and mutex_is_locked
was 0. This caused asserts to fail in ubifs code when checking that the
mutex was locked. For example,

UBIFS assert failed in ubifs_change_lp at 540
UBIFS assert failed in ubifs_release_lprops at 278

Assume that the "mutex" is locked since that is the normal case when it
is checked in the ubifs code.

Signed-off-by: Bradley Bolen <bradleybolen@gmail.com>

# e9951281 23-Mar-2018 Petr Vorel <petr.vorel@gmail.com>

ubifs: Reintroduce using CONFIG_UBIFS_SILENCE_MSG

Use of CONFIG_UBIFS_SILENCE_MSG was added in
147162dac6 ("ubi: ubifs: Turn off verbose prints")

Then it was removed in
ff94bc40af ("mtd, ubi, ubifs: resync with Linux-3.14")

Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Heiko Schocher <hs@denx.de>
Signed-off-by: Petr Vorel <petr.vorel@gmail.com>

# 0195a7bb 21-Oct-2015 Heiko Schocher <hs@denx.de>

ubi,ubifs: sync with linux v4.2

sync with linux v4.2

commit 64291f7db5bd8150a74ad2036f1037e6a0428df2
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date: Sun Aug 30 11:34:09 2015 -0700

Linux 4.2

This update is needed, as it turned out, that fastmap
was in experimental/broken state in kernel v3.15, which
was the last base for U-Boot.

Signed-off-by: Heiko Schocher <hs@denx.de>
Tested-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>

# ad15749b 17-Sep-2015 Hans de Goede <hdegoede@redhat.com>

ubifs: Modify ubifs u-boot wrapper function prototypes for generic fs use

Modify the ubifs u-boot wrapper function prototypes for generic fs use,
and give them their own header file.

This is a preparation patch for adding ubifs support to the generic fs
code from fs/fs.c.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Heiko Schocher <hs@denx.de>

# dc288431 22-Jan-2015 Anton Habegger <anton.habegger@gmail.com>

ubifs: Import atomic_long operations from Linux

This commit is a preperation for a subsequent UBIFS commit
which needs atomic_long operations.

Therefor "include/asm-generic/atomic-long.h" is imported
from 1860e37 Linux 3.15

Signed-off-by: Anton Habegger <anton.habegger@gmail.com>

# cba1da49 06-Nov-2014 Masahiro Yamada <masahiroy@kernel.org>

include: move various macros to include/linux/kernel.h

U-Boot has imported various utility macros from Linux
scattering them to various places without consistency.

In include/common.h are min, max, min3, max3, ARRAY_SIZE, ALIGN,
container_of, DIV_ROUND_UP, etc.
In include/linux/compat.h are min_t, max_t, round_up, round_down,
etc.
We also have duplicated defines of min_t in some *.c files.

Moreover, we are suffering from too cluttered include/common.h.

This commit moves various macros that originate in
include/linux/kernel.h of Linux to their original position.

Note:
This commit simply moves the macros; the macros roundup,
min, max, min2, max3, ARRAY_SIZE are different
from those of Linux at this point.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>

# 3b612970 31-Aug-2014 Masahiro Yamada <masahiroy@kernel.org>

kbuild: force to define __UBOOT__ in all the C sources

U-Boot has imported various source files from other projects,
mostly Linux.

Something like

#ifdef __UBOOT__
[ modification for U-Boot ]
#else
[ original code ]
#endif

is an often used strategy for clarification of adjusted parts,
that is, easier re-sync in future.

Instead of defining __UBOOT__ in each source file,
passing it from the top Makefile would be easier.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Heiko Schocher <hs@denx.de>

# ff94bc40 24-Jun-2014 Heiko Schocher <hs@denx.de>

mtd, ubi, ubifs: resync with Linux-3.14

resync ubi subsystem with linux:

commit 455c6fdbd219161bd09b1165f11699d6d73de11c
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date: Sun Mar 30 20:40:15 2014 -0700

Linux 3.14

A nice side effect of this, is we introduce UBI Fastmap support
to U-Boot.

Signed-off-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Tom Rini <trini@ti.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Sergey Lapin <slapin@ossfans.org>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Joerg Krause <jkrause@posteo.de>

# 1674df60 20-Jan-2014 Karicheri, Muralidharan <m-karicheri2@ti.com>

ubifs: fix checkpatch warning

Fix the following checkpatch warning:-

WARNING: externs should be avoided in .c files

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>

# 147162da 08-Apr-2013 Joe Hershberger <joe.hershberger@ni.com>

ubi: ubifs: Turn off verbose prints

The prints are out of control. SILENCE!

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>

# 87d93a1b 09-Dec-2009 Wolfgang Wegner <w.wegner@astro-kom.de>

move prototypes for gunzip() and zunzip() to common.h

Prototype for gunzip/zunzip was only in lib_generic/gunzip.c and thus
repeated in every file using it. This patch moves the prototypes to
common.h and removes all prototypes distributed anywhere else.

Signed-off-by: Wolfgang Wegner <w.wegner@astro-kom.de>

# 02f99901 24-Aug-2009 Simon Kagstrom <simon.kagstrom@netinsight.net>

Move __set/clear_bit from ubifs.h to bitops.h

__set_bit and __clear_bit are defined in ubifs.h as well as in
asm/include/bitops.h for some architectures. This patch moves
the generic implementation to include/linux/bitops.h and uses
that unless it's defined by the architecture.

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>

# c1a0fd5f 27-Apr-2009 Ricardo Ribalda <ricardo@ribalda.com>

ubifs: BUG: Blocks commpressed with zlib

Blocks compressed with zlib dont have the full gzip header.

Without this patch, block compressed with zlib cannot be readed!

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@uam.es>

# febd7e41 27-Mar-2009 Artem Bityutskiy <Artem.Bityutskiy@nokia.com>

UBIFS: add R/O compatibility

Now UBIFS is supported by u-boot. If we ever decide to change the
media format, then people will have to upgrade their u-boots to
mount new format images. However, very often it is possible to
preserve R/O forward-compatibility, even though the write
forward-compatibility is not preserved.

This patch introduces a new super-block field which stores the
R/O compatibility version.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Acked-by: Adrian Hunter <Adrian.Hunter@nokia.com>
Signed-off-by: Stefan Roese <sr@denx.de>

# 9eefe2a2 19-Mar-2009 Stefan Roese <sr@denx.de>

UBIFS: Implement read-only UBIFS support in U-Boot

The U-Boot UBIFS implementation is largely a direct copy from the current
Linux version (2.6.29-rc6). As already done in the UBI version we have an
"abstraction layer" to redefine or remove some OS calls (e.g. mutex_lock()
...). This makes it possible to use the original Linux code with very
little changes. And by this we can better update to later Linux versions.

I removed some of the Linux features that are not used in the U-Boot
version (e.g. garbage-collection, write support).

Signed-off-by: Stefan Roese <sr@denx.de>
CC: Artem Bityutskiy <dedekind@infradead.org>
CC: Adrian Hunter <ext-Adrian.Hunter@nokia.com>

# 0cf207ec 27-Sep-2021 Wolfgang Denk <wd@denx.de>

WS cleanup: remove SPACE(s) followed by TAB

Signed-off-by: Wolfgang Denk <wd@denx.de>

# 5a08cfee 27-Jun-2018 Christophe Kerello <christophe.kerello@st.com>

ubifs: remove useless code

By checking ubifs source code, s_instances parameter is not
used anymore. So, set this parameter and the associated source
code under __UBOOT__ compilation.

Signed-off-by: Christophe Kerello <christophe.kerello@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>

# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 05ea83b6 03-Apr-2018 Bradley Bolen <bradleybolen@gmail.com>

ubifs: Change value of mutex_is_locked()

The mutex lock and unlock functions are stubbed out and mutex_is_locked
was 0. This caused asserts to fail in ubifs code when checking that the
mutex was locked. For example,

UBIFS assert failed in ubifs_change_lp at 540
UBIFS assert failed in ubifs_release_lprops at 278

Assume that the "mutex" is locked since that is the normal case when it
is checked in the ubifs code.

Signed-off-by: Bradley Bolen <bradleybolen@gmail.com>

# e9951281 23-Mar-2018 Petr Vorel <petr.vorel@gmail.com>

ubifs: Reintroduce using CONFIG_UBIFS_SILENCE_MSG

Use of CONFIG_UBIFS_SILENCE_MSG was added in
147162dac6 ("ubi: ubifs: Turn off verbose prints")

Then it was removed in
ff94bc40af ("mtd, ubi, ubifs: resync with Linux-3.14")

Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Heiko Schocher <hs@denx.de>
Signed-off-by: Petr Vorel <petr.vorel@gmail.com>

# 0195a7bb 21-Oct-2015 Heiko Schocher <hs@denx.de>

ubi,ubifs: sync with linux v4.2

sync with linux v4.2

commit 64291f7db5bd8150a74ad2036f1037e6a0428df2
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date: Sun Aug 30 11:34:09 2015 -0700

Linux 4.2

This update is needed, as it turned out, that fastmap
was in experimental/broken state in kernel v3.15, which
was the last base for U-Boot.

Signed-off-by: Heiko Schocher <hs@denx.de>
Tested-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>

# ad15749b 17-Sep-2015 Hans de Goede <hdegoede@redhat.com>

ubifs: Modify ubifs u-boot wrapper function prototypes for generic fs use

Modify the ubifs u-boot wrapper function prototypes for generic fs use,
and give them their own header file.

This is a preparation patch for adding ubifs support to the generic fs
code from fs/fs.c.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Heiko Schocher <hs@denx.de>

# dc288431 22-Jan-2015 Anton Habegger <anton.habegger@gmail.com>

ubifs: Import atomic_long operations from Linux

This commit is a preperation for a subsequent UBIFS commit
which needs atomic_long operations.

Therefor "include/asm-generic/atomic-long.h" is imported
from 1860e37 Linux 3.15

Signed-off-by: Anton Habegger <anton.habegger@gmail.com>

# cba1da49 06-Nov-2014 Masahiro Yamada <yamada.m@jp.panasonic.com>

include: move various macros to include/linux/kernel.h

U-Boot has imported various utility macros from Linux
scattering them to various places without consistency.

In include/common.h are min, max, min3, max3, ARRAY_SIZE, ALIGN,
container_of, DIV_ROUND_UP, etc.
In include/linux/compat.h are min_t, max_t, round_up, round_down,
etc.
We also have duplicated defines of min_t in some *.c files.

Moreover, we are suffering from too cluttered include/common.h.

This commit moves various macros that originate in
include/linux/kernel.h of Linux to their original position.

Note:
This commit simply moves the macros; the macros roundup,
min, max, min2, max3, ARRAY_SIZE are different
from those of Linux at this point.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>

# 3b612970 31-Aug-2014 Masahiro Yamada <yamada.m@jp.panasonic.com>

kbuild: force to define __UBOOT__ in all the C sources

U-Boot has imported various source files from other projects,
mostly Linux.

Something like

#ifdef __UBOOT__
[ modification for U-Boot ]
#else
[ original code ]
#endif

is an often used strategy for clarification of adjusted parts,
that is, easier re-sync in future.

Instead of defining __UBOOT__ in each source file,
passing it from the top Makefile would be easier.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Heiko Schocher <hs@denx.de>

# ff94bc40 24-Jun-2014 Heiko Schocher <hs@denx.de>

mtd, ubi, ubifs: resync with Linux-3.14

resync ubi subsystem with linux:

commit 455c6fdbd219161bd09b1165f11699d6d73de11c
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date: Sun Mar 30 20:40:15 2014 -0700

Linux 3.14

A nice side effect of this, is we introduce UBI Fastmap support
to U-Boot.

Signed-off-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Tom Rini <trini@ti.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Sergey Lapin <slapin@ossfans.org>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Joerg Krause <jkrause@posteo.de>

# 1674df60 20-Jan-2014 Karicheri, Muralidharan <m-karicheri2@ti.com>

ubifs: fix checkpatch warning

Fix the following checkpatch warning:-

WARNING: externs should be avoided in .c files

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>

# 147162da 08-Apr-2013 Joe Hershberger <joe.hershberger@ni.com>

ubi: ubifs: Turn off verbose prints

The prints are out of control. SILENCE!

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>

# 87d93a1b 09-Dec-2009 Wolfgang Wegner <w.wegner@astro-kom.de>

move prototypes for gunzip() and zunzip() to common.h

Prototype for gunzip/zunzip was only in lib_generic/gunzip.c and thus
repeated in every file using it. This patch moves the prototypes to
common.h and removes all prototypes distributed anywhere else.

Signed-off-by: Wolfgang Wegner <w.wegner@astro-kom.de>

# 02f99901 24-Aug-2009 Simon Kagstrom <simon.kagstrom@netinsight.net>

Move __set/clear_bit from ubifs.h to bitops.h

__set_bit and __clear_bit are defined in ubifs.h as well as in
asm/include/bitops.h for some architectures. This patch moves
the generic implementation to include/linux/bitops.h and uses
that unless it's defined by the architecture.

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>

# c1a0fd5f 27-Apr-2009 Ricardo Ribalda <ricardo@ribalda.com>

ubifs: BUG: Blocks commpressed with zlib

Blocks compressed with zlib dont have the full gzip header.

Without this patch, block compressed with zlib cannot be readed!

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@uam.es>

# febd7e41 27-Mar-2009 Artem Bityutskiy <Artem.Bityutskiy@nokia.com>

UBIFS: add R/O compatibility

Now UBIFS is supported by u-boot. If we ever decide to change the
media format, then people will have to upgrade their u-boots to
mount new format images. However, very often it is possible to
preserve R/O forward-compatibility, even though the write
forward-compatibility is not preserved.

This patch introduces a new super-block field which stores the
R/O compatibility version.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Acked-by: Adrian Hunter <Adrian.Hunter@nokia.com>
Signed-off-by: Stefan Roese <sr@denx.de>

# 9eefe2a2 19-Mar-2009 Stefan Roese <sr@denx.de>

UBIFS: Implement read-only UBIFS support in U-Boot

The U-Boot UBIFS implementation is largely a direct copy from the current
Linux version (2.6.29-rc6). As already done in the UBI version we have an
"abstraction layer" to redefine or remove some OS calls (e.g. mutex_lock()
...). This makes it possible to use the original Linux code with very
little changes. And by this we can better update to later Linux versions.

I removed some of the Linux features that are not used in the U-Boot
version (e.g. garbage-collection, write support).

Signed-off-by: Stefan Roese <sr@denx.de>
CC: Artem Bityutskiy <dedekind@infradead.org>
CC: Adrian Hunter <ext-Adrian.Hunter@nokia.com>

# 5a08cfee 27-Jun-2018 Christophe Kerello <christophe.kerello@st.com>

ubifs: remove useless code

By checking ubifs source code, s_instances parameter is not
used anymore. So, set this parameter and the associated source
code under __UBOOT__ compilation.

Signed-off-by: Christophe Kerello <christophe.kerello@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>


# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 05ea83b6 03-Apr-2018 Bradley Bolen <bradleybolen@gmail.com>

ubifs: Change value of mutex_is_locked()

The mutex lock and unlock functions are stubbed out and mutex_is_locked
was 0. This caused asserts to fail in ubifs code when checking that the
mutex was locked. For example,

UBIFS assert failed in ubifs_change_lp at 540
UBIFS assert failed in ubifs_release_lprops at 278

Assume that the "mutex" is locked since that is the normal case when it
is checked in the ubifs code.

Signed-off-by: Bradley Bolen <bradleybolen@gmail.com>


# e9951281 23-Mar-2018 Petr Vorel <petr.vorel@gmail.com>

ubifs: Reintroduce using CONFIG_UBIFS_SILENCE_MSG

Use of CONFIG_UBIFS_SILENCE_MSG was added in
147162dac6 ("ubi: ubifs: Turn off verbose prints")

Then it was removed in
ff94bc40af ("mtd, ubi, ubifs: resync with Linux-3.14")

Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Heiko Schocher <hs@denx.de>
Signed-off-by: Petr Vorel <petr.vorel@gmail.com>


# 0195a7bb 21-Oct-2015 Heiko Schocher <hs@denx.de>

ubi,ubifs: sync with linux v4.2

sync with linux v4.2

commit 64291f7db5bd8150a74ad2036f1037e6a0428df2
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date: Sun Aug 30 11:34:09 2015 -0700

Linux 4.2

This update is needed, as it turned out, that fastmap
was in experimental/broken state in kernel v3.15, which
was the last base for U-Boot.

Signed-off-by: Heiko Schocher <hs@denx.de>
Tested-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>


# ad15749b 17-Sep-2015 Hans de Goede <hdegoede@redhat.com>

ubifs: Modify ubifs u-boot wrapper function prototypes for generic fs use

Modify the ubifs u-boot wrapper function prototypes for generic fs use,
and give them their own header file.

This is a preparation patch for adding ubifs support to the generic fs
code from fs/fs.c.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Heiko Schocher <hs@denx.de>


# dc288431 22-Jan-2015 Anton Habegger <anton.habegger@gmail.com>

ubifs: Import atomic_long operations from Linux

This commit is a preperation for a subsequent UBIFS commit
which needs atomic_long operations.

Therefor "include/asm-generic/atomic-long.h" is imported
from 1860e37 Linux 3.15

Signed-off-by: Anton Habegger <anton.habegger@gmail.com>


# cba1da49 06-Nov-2014 Masahiro Yamada <yamada.m@jp.panasonic.com>

include: move various macros to include/linux/kernel.h

U-Boot has imported various utility macros from Linux
scattering them to various places without consistency.

In include/common.h are min, max, min3, max3, ARRAY_SIZE, ALIGN,
container_of, DIV_ROUND_UP, etc.
In include/linux/compat.h are min_t, max_t, round_up, round_down,
etc.
We also have duplicated defines of min_t in some *.c files.

Moreover, we are suffering from too cluttered include/common.h.

This commit moves various macros that originate in
include/linux/kernel.h of Linux to their original position.

Note:
This commit simply moves the macros; the macros roundup,
min, max, min2, max3, ARRAY_SIZE are different
from those of Linux at this point.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>


# 3b612970 31-Aug-2014 Masahiro Yamada <yamada.m@jp.panasonic.com>

kbuild: force to define __UBOOT__ in all the C sources

U-Boot has imported various source files from other projects,
mostly Linux.

Something like

#ifdef __UBOOT__
[ modification for U-Boot ]
#else
[ original code ]
#endif

is an often used strategy for clarification of adjusted parts,
that is, easier re-sync in future.

Instead of defining __UBOOT__ in each source file,
passing it from the top Makefile would be easier.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Heiko Schocher <hs@denx.de>


# ff94bc40 24-Jun-2014 Heiko Schocher <hs@denx.de>

mtd, ubi, ubifs: resync with Linux-3.14

resync ubi subsystem with linux:

commit 455c6fdbd219161bd09b1165f11699d6d73de11c
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date: Sun Mar 30 20:40:15 2014 -0700

Linux 3.14

A nice side effect of this, is we introduce UBI Fastmap support
to U-Boot.

Signed-off-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Tom Rini <trini@ti.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Sergey Lapin <slapin@ossfans.org>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Joerg Krause <jkrause@posteo.de>


# 1674df60 20-Jan-2014 Karicheri, Muralidharan <m-karicheri2@ti.com>

ubifs: fix checkpatch warning

Fix the following checkpatch warning:-

WARNING: externs should be avoided in .c files

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>


# 147162da 08-Apr-2013 Joe Hershberger <joe.hershberger@ni.com>

ubi: ubifs: Turn off verbose prints

The prints are out of control. SILENCE!

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>


# 87d93a1b 09-Dec-2009 Wolfgang Wegner <w.wegner@astro-kom.de>

move prototypes for gunzip() and zunzip() to common.h

Prototype for gunzip/zunzip was only in lib_generic/gunzip.c and thus
repeated in every file using it. This patch moves the prototypes to
common.h and removes all prototypes distributed anywhere else.

Signed-off-by: Wolfgang Wegner <w.wegner@astro-kom.de>


# ab32ffa1 24-Aug-2009 Simon Kagstrom <simon.kagstrom@netinsight.net>

Move __set/clear_bit from ubifs.h to bitops.h

__set_bit and __clear_bit are defined in ubifs.h as well as in
asm/include/bitops.h for some architectures. This patch moves
the generic implementation to include/linux/bitops.h and uses
that unless it's defined by the architecture.

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>


# 02f99901 24-Aug-2009 Simon Kagstrom <simon.kagstrom@netinsight.net>

Move __set/clear_bit from ubifs.h to bitops.h

__set_bit and __clear_bit are defined in ubifs.h as well as in
asm/include/bitops.h for some architectures. This patch moves
the generic implementation to include/linux/bitops.h and uses
that unless it's defined by the architecture.

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>


# c1a0fd5f 27-Apr-2009 Ricardo Ribalda Delgado <ricardo.ribalda@uam.es>

ubifs: BUG: Blocks commpressed with zlib

Blocks compressed with zlib dont have the full gzip header.

Without this patch, block compressed with zlib cannot be readed!

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@uam.es>


# febd7e41 27-Mar-2009 Artem Bityutskiy <Artem.Bityutskiy@nokia.com>

UBIFS: add R/O compatibility

Now UBIFS is supported by u-boot. If we ever decide to change the
media format, then people will have to upgrade their u-boots to
mount new format images. However, very often it is possible to
preserve R/O forward-compatibility, even though the write
forward-compatibility is not preserved.

This patch introduces a new super-block field which stores the
R/O compatibility version.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Acked-by: Adrian Hunter <Adrian.Hunter@nokia.com>
Signed-off-by: Stefan Roese <sr@denx.de>


# 9eefe2a2 19-Mar-2009 Stefan Roese <sr@denx.de>

UBIFS: Implement read-only UBIFS support in U-Boot

The U-Boot UBIFS implementation is largely a direct copy from the current
Linux version (2.6.29-rc6). As already done in the UBI version we have an
"abstraction layer" to redefine or remove some OS calls (e.g. mutex_lock()
...). This makes it possible to use the original Linux code with very
little changes. And by this we can better update to later Linux versions.

I removed some of the Linux features that are not used in the U-Boot
version (e.g. garbage-collection, write support).

Signed-off-by: Stefan Roese <sr@denx.de>
CC: Artem Bityutskiy <dedekind@infradead.org>
CC: Adrian Hunter <ext-Adrian.Hunter@nokia.com>