[RFC][PATCH] uncompress.h cleanup and DT support

9 messages, 4 authors, 2011-10-23 · open the first message on its own page

[RFC][PATCH] uncompress.h cleanup and DT support

From: Zoltan Devai <hidden>
Date: 2011-10-23 08:18:29

Hi,

Originally, I just wanted to get rid of arch_decomp_* in all the uncompress.h
files, that were mostly empty. But then, I couldn't stop. Which may also mean
I have gone too far.

Plase consider all this as RFC, it's mostly not even compile-tested.
If you think it's worth to follow-up, I'm happy to do it.

What this series does:
- Remove all instances of arch_decomp_wdog

- Restructure the decompression code just a bit,
  to separate the UART-printing stuff

- Introduce a low-level serial driver of the style
  "check a reg if there's space for a TX char",
  "output char", "wait for flush reg"

- Add init functions for the two common UARTs:
  8250 and the amba.
  This finally gets rid of that dozen re-implementations
  that all use different register access methods and
  register defines, but do the same.

- Some basic style cleanup

- Allow the uncompress UART definitions to be overridden
  by a device tree description.
  This would allow the removal of all the
  "if machine_is_xxx, serial base is 123" lookup tables.

Remarks:
- Just to see how it works out, I converted most of the
  arches/machines to use the ucuart driver.
  I didn't convert any Samsung machines, because the
  code is just too convoluted for me to dive into now.
- The overall patch is above 100K, so I didn't want
  to post it here.
  It's available here:
  git://github.com/zdevai/linux.git uncompress-h

- Overall diffstat below.

Comments welcome.

Cheers,
Zoltan

 arch/arm/Kconfig                                   |    9 +
 arch/arm/boot/compressed/Makefile                  |    9 +-
 arch/arm/boot/compressed/decompress.c              |   78 ++++--
 arch/arm/boot/compressed/head.S                    |    8 +
 arch/arm/boot/compressed/misc.c                    |  154 -----------
 arch/arm/boot/compressed/print.c                   |  290 ++++++++++++++++++++
 arch/arm/mach-at91/include/mach/uncompress.h       |   62 +----
 arch/arm/mach-bcmring/include/mach/uncompress.h    |   47 +---
 arch/arm/mach-clps711x/include/mach/uncompress.h   |   49 +---
 arch/arm/mach-cns3xxx/include/mach/uncompress.h    |   49 +---
 arch/arm/mach-davinci/include/mach/uncompress.h    |   24 +--
 arch/arm/mach-dove/include/mach/uncompress.h       |   30 +--
 arch/arm/mach-ebsa110/include/mach/uncompress.h    |   40 +---
 arch/arm/mach-ep93xx/include/mach/uncompress.h     |   49 +---
 arch/arm/mach-exynos4/include/mach/uncompress.h    |   15 +-
 arch/arm/mach-footbridge/include/mach/uncompress.h |   34 +--
 arch/arm/mach-gemini/include/mach/uncompress.h     |   41 +---
 arch/arm/mach-h720x/include/mach/uncompress.h      |   39 +--
 arch/arm/mach-integrator/include/mach/uncompress.h |   49 +---
 arch/arm/mach-iop13xx/include/mach/uncompress.h    |   26 +--
 arch/arm/mach-iop32x/include/mach/uncompress.h     |   37 +--
 arch/arm/mach-iop33x/include/mach/uncompress.h     |   34 +--
 arch/arm/mach-ixp2000/include/mach/uncompress.h    |   48 +---
 arch/arm/mach-ixp23xx/include/mach/uncompress.h    |   33 +--
 arch/arm/mach-ixp4xx/include/mach/uncompress.h     |   44 +---
 arch/arm/mach-kirkwood/include/mach/uncompress.h   |   40 +---
 arch/arm/mach-ks8695/include/mach/uncompress.h     |   32 +--
 arch/arm/mach-lpc32xx/include/mach/uncompress.h    |   57 +----
 arch/arm/mach-mmp/include/mach/uncompress.h        |   38 +---
 arch/arm/mach-msm/include/mach/uncompress.h        |   45 +---
 arch/arm/mach-mv78xx0/include/mach/uncompress.h    |   40 +---
 arch/arm/mach-mxs/include/mach/uncompress.h        |   63 +----
 arch/arm/mach-netx/include/mach/uncompress.h       |   73 +-----
 arch/arm/mach-nomadik/include/mach/uncompress.h    |   58 +----
 arch/arm/mach-omap1/include/mach/uncompress.h      |    4 -
 arch/arm/mach-omap2/include/mach/uncompress.h      |    4 -
 arch/arm/mach-orion5x/include/mach/uncompress.h    |   48 +---
 arch/arm/mach-picoxcell/include/mach/uncompress.h  |   18 +-
 arch/arm/mach-pnx4008/include/mach/uncompress.h    |   43 +---
 arch/arm/mach-prima2/include/mach/uncompress.h     |   41 +---
 arch/arm/mach-pxa/include/mach/uncompress.h        |   77 +-----
 arch/arm/mach-realview/include/mach/uncompress.h   |   70 +----
 arch/arm/mach-rpc/include/mach/uncompress.h        |    9 +-
 arch/arm/mach-s3c2410/include/mach/uncompress.h    |    2 +
 arch/arm/mach-s3c64xx/include/mach/uncompress.h    |   18 +-
 arch/arm/mach-s5p64x0/include/mach/uncompress.h    |   39 +---
 arch/arm/mach-s5pc100/include/mach/uncompress.h    |    6 +-
 arch/arm/mach-s5pv210/include/mach/uncompress.h    |   17 +-
 arch/arm/mach-sa1100/include/mach/uncompress.h     |   62 ++---
 arch/arm/mach-shark/include/mach/uncompress.h      |   52 +----
 arch/arm/mach-shmobile/include/mach/uncompress.h   |   17 +-
 arch/arm/mach-spear3xx/include/mach/uncompress.h   |   18 --
 arch/arm/mach-spear6xx/include/mach/uncompress.h   |   18 --
 arch/arm/mach-tegra/include/mach/uncompress.h      |   62 +----
 arch/arm/mach-u300/include/mach/uncompress.h       |   45 +---
 arch/arm/mach-ux500/include/mach/uncompress.h      |   54 +----
 arch/arm/mach-versatile/include/mach/uncompress.h  |   45 +---
 arch/arm/mach-vexpress/include/mach/uncompress.h   |   51 +----
 arch/arm/mach-vt8500/include/mach/uncompress.h     |   40 +---
 arch/arm/mach-w90x900/include/mach/uncompress.h    |   47 +---
 arch/arm/mach-zynq/include/mach/uncompress.h       |   53 +---
 arch/arm/plat-mxc/include/mach/uncompress.h        |   37 +--
 arch/arm/plat-omap/include/plat/uncompress.h       |   45 +---
 arch/arm/plat-samsung/Kconfig                      |    8 -
 arch/arm/plat-samsung/include/plat/uncompress.h    |   35 +---
 arch/arm/plat-spear/include/plat/uncompress.h      |   43 +---
 arch/arm/plat-tcc/include/mach/uncompress.h        |   33 +--
 67 files changed, 671 insertions(+), 2234 deletions(-)

[RFC][PATCH] uncompress.h cleanup and DT support

From: Russell King - ARM Linux <hidden>
Date: 2011-10-23 08:41:32

On Sun, Oct 23, 2011 at 10:18:29AM +0200, Zoltan Devai wrote:
Plase consider all this as RFC, it's mostly not even compile-tested.
If you think it's worth to follow-up, I'm happy to do it.
Is the patch available?

Has this been tested with ZBOOT_ROM?

Thanks.

[RFC][PATCH] uncompress.h cleanup and DT support

From: Jean-Christophe PLAGNIOL-VILLARD <hidden>
Date: 2011-10-23 09:02:47

On 10:18 Sun 23 Oct     , Zoltan Devai wrote:
Hi,

Originally, I just wanted to get rid of arch_decomp_* in all the uncompress.h
files, that were mostly empty. But then, I couldn't stop. Which may also mean
I have gone too far.
on small SoC arm926 the kernel may more time that the watchdog refreshing so
the kernel will never have enough time to decompress

and on some platform the watchdog can be configured only one (AT91 as example)

Best Regards,
J.

[RFC][PATCH] uncompress.h cleanup and DT support

From: Zoltan Devai <hidden>
Date: 2011-10-23 09:12:50

2011/10/23 Russell King - ARM Linux [off-list ref]:
On Sun, Oct 23, 2011 at 10:18:29AM +0200, Zoltan Devai wrote:
quoted
Plase consider all this as RFC, it's mostly not even compile-tested.
If you think it's worth to follow-up, I'm happy to do it.
Is the patch available?
git://github.com/zdevai/linux.git uncompress-h
Has this been tested with ZBOOT_ROM?
Not yet, but I don't see a reason why this would break it.

Zoltan

[RFC][PATCH] uncompress.h cleanup and DT support

From: Russell King - ARM Linux <hidden>
Date: 2011-10-23 09:20:59

On Sun, Oct 23, 2011 at 11:12:50AM +0200, Zoltan Devai wrote:
2011/10/23 Russell King - ARM Linux [off-list ref]:
quoted
On Sun, Oct 23, 2011 at 10:18:29AM +0200, Zoltan Devai wrote:
quoted
Plase consider all this as RFC, it's mostly not even compile-tested.
If you think it's worth to follow-up, I'm happy to do it.
Is the patch available?
git://github.com/zdevai/linux.git uncompress-h
I'd rather not pull your tree just to look at the patch.  Is it
available somewhere else?
quoted
Has this been tested with ZBOOT_ROM?
Not yet, but I don't see a reason why this would break it.
Please try building it with ZBOOT_ROM enabled.

[RFC][PATCH] uncompress.h cleanup and DT support

From: Uwe Kleine-König <hidden>
Date: 2011-10-23 09:43:09

On Sun, Oct 23, 2011 at 10:20:59AM +0100, Russell King - ARM Linux wrote:
On Sun, Oct 23, 2011 at 11:12:50AM +0200, Zoltan Devai wrote:
quoted
2011/10/23 Russell King - ARM Linux [off-list ref]:
quoted
On Sun, Oct 23, 2011 at 10:18:29AM +0200, Zoltan Devai wrote:
quoted
Plase consider all this as RFC, it's mostly not even compile-tested.
If you think it's worth to follow-up, I'm happy to do it.
Is the patch available?
git://github.com/zdevai/linux.git uncompress-h
I'd rather not pull your tree just to look at the patch.  Is it
available somewhere else?
It's not hard to look at it and no need to pull, just do:

	git fetch git://github.com/zdevai/linux.git uncompress-h
	git log -p ..FETCH_HEAD

(Of course you get the objects of the branch into your object-db but
that shouldn't matter much.)

Obviously this doesn't give a good opportunity to comment the patch.
It's just to satisfy your curiosity.

Just from a quick glance commit 77bf042c54650ecb39a0e6d79de827d3157cf817
is not OK. For example it changes the license terms
of arch/arm/mach-at91/include/mach/uncompress.h from GPLv2+ to GPLv2 and
removes a copyright. Ditto for some other files.

In commit dbd13d823641694c633c01e8e33e21eb76a1aad2 git played tricks on
you and removed a line like
	#define ARCH_HAVE_DECOMP_SETUP
because it thought it's a comment that shouldn't go into the log.
Note that this isn't very multi-SoC friendly.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[RFC][PATCH] uncompress.h cleanup and DT support

From: Russell King - ARM Linux <hidden>
Date: 2011-10-23 09:47:23

On Sun, Oct 23, 2011 at 11:43:09AM +0200, Uwe Kleine-K?nig wrote:
On Sun, Oct 23, 2011 at 10:20:59AM +0100, Russell King - ARM Linux wrote:
quoted
On Sun, Oct 23, 2011 at 11:12:50AM +0200, Zoltan Devai wrote:
quoted
2011/10/23 Russell King - ARM Linux [off-list ref]:
quoted
On Sun, Oct 23, 2011 at 10:18:29AM +0200, Zoltan Devai wrote:
quoted
Plase consider all this as RFC, it's mostly not even compile-tested.
If you think it's worth to follow-up, I'm happy to do it.
Is the patch available?
git://github.com/zdevai/linux.git uncompress-h
I'd rather not pull your tree just to look at the patch.  Is it
available somewhere else?
It's not hard to look at it and no need to pull, just do:

	git fetch git://github.com/zdevai/linux.git uncompress-h
	git log -p ..FETCH_HEAD
.1 We do reviews in patch form on mailing lists, not from commits inside
   git trees.

.2 I don't even want to pull the objects into my tree - that's a waste of
   bandwidth just to _read_ the patch, and risks pulling in a lot more
   depending on the parents of the commit.

So, please stick to patch form.  If it's too large for the mailing list,
please split the patch up into a logical sequence of steps as individual
patches.  Only then provide a gitweb URL if that's not possible.

If the diffstat at the start of this thread reflects a single patch then
it's doing too much as one change.

[RFC][PATCH] uncompress.h cleanup and DT support

From: Zoltan Devai <hidden>
Date: 2011-10-23 21:21:16

2011/10/23 Jean-Christophe PLAGNIOL-VILLARD [off-list ref]:
On 10:18 Sun 23 Oct ? ? , Zoltan Devai wrote:
quoted
Hi,

Originally, I just wanted to get rid of arch_decomp_* in all the uncompress.h
files, that were mostly empty. But then, I couldn't stop. Which may also mean
I have gone too far.
on small SoC arm926 the kernel may more time that the watchdog refreshing so
the kernel will never have enough time to decompress
Sure, but:
- only Samsung was using it (with optional Kconfig)
- the feature wasn't working since ARM moved to use the decompress_* libs
  instead of inflate.c (2.6.33)

Carrying around a 95% empty definition, that does nothing even when not
empty, doesn't make sense.
If someone needs a decomp_wdog, he needs to re-implement it from scratch,
using the new decompressor libraries.

Z

[RFC][PATCH] uncompress.h cleanup and DT support

From: Zoltan Devai <hidden>
Date: 2011-10-23 21:28:10

2011/10/23 Russell King - ARM Linux [off-list ref]:
On Sun, Oct 23, 2011 at 11:12:50AM +0200, Zoltan Devai wrote:
quoted
2011/10/23 Russell King - ARM Linux [off-list ref]:
quoted
On Sun, Oct 23, 2011 at 10:18:29AM +0200, Zoltan Devai wrote:
quoted
Plase consider all this as RFC, it's mostly not even compile-tested.
If you think it's worth to follow-up, I'm happy to do it.
Is the patch available?
git://github.com/zdevai/linux.git uncompress-h
I'd rather not pull your tree just to look at the patch. ?Is it
available somewhere else?
Submitted as patches.
I tried to make the whole series bisectable, which is why it contains
some extra steps, and didn't want to spam everybody's inbox
with this noise.
quoted
quoted
Has this been tested with ZBOOT_ROM?
Not yet, but I don't see a reason why this would break it.
Please try building it with ZBOOT_ROM enabled.
I did build it, which worked.
Problem is, I don't have a machine which could actually do
ZBOOT_ROM, so I can't test it that way.
(I could execute the image from RAM, but I assume that's
not a good test scenario)

Z
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help