public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: tony@atomide•com (Tony Lindgren)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH 5/5] arm: boot: store ATAGs structure into DT "/chosen/linux,atags" entry
Date: Mon, 13 Jul 2015 06:19:02 -0700	[thread overview]
Message-ID: <20150713131902.GH26485@atomide.com> (raw)
In-Reply-To: <20150707115819.GF12087@pali>

* Pali Roh?r <pali.rohar@gmail•com> [150707 05:00]:
> On Tuesday 07 July 2015 12:32:13 Russell King - ARM Linux wrote:
> > On Mon, Jul 06, 2015 at 10:26:13PM +0200, Pali Roh?r wrote:
> > > Legacy bootloaders can pass additional information for kernel or legacy
> > > userspace applications. When booting DT kernel then ATAGs structure is not
> > > more visible after running kernel uncompress code. This patch stores full
> > > ATAGs structure into DT "/chosen/linux,atags" entry, so kernel can later
> > > reuse it and export via /proc/atags to userspace.
> > 
> > I think you need to go through your commit messages and improve them,
> > especially the ones with "TODO" in them.  As long as there's still things
> > to be done, they're obviously not ready for merging.
> > 
> 
> I know, in cover letter email I wrote that documentation is not ready...
> I send patches for review and comments (like yours). I think it is still
> better to send something and mark it as incomplete. It could prevent to
> work on something which will be again rewritten...
> 
> > Moreover, exporting the ATAGS is questionable, even _if_ there are non-
> > kexec programs making use of this.  The ATAGs have _never_ been exported
> > to userspace when kexec disabled is the kernel - it was introduced for
> > kexec, and has always had this:
> > 
> > config ATAGS_PROC
> >         bool "Export atags in procfs"
> >         depends on ATAGS && KEXEC
> >         default y
> > 
> > Now, the fact that someone decided to start using it is pretty sad,
> > because it means that if you disable KEXEC, userspace breaks.  That's
> > not a kernel regression in any shape or form, because /proc/atags has
> > never been there without KEXEC enabled.  That's a userspace bug, plain
> > and simple.
> > 
> > Given that, I'm in two minds about whether to accept the last two
> > patches which make this more than just "for KEXEC use to enable a KEXEC
> > kernel to be booted."
> > 
> > Had it been provided without the KEXEC conditional, then I don't have
> > a problem with these two patches.
> > 
> 
> I understand it. Nokia originally invented their own entries in /proc/
> which export needed ATAGs from kernel in human-readable form, but all
> those entries were non-standard and specific for Nokia's kernels.
> 
> Do you have some other idea how to provide ATAGs information created
> dynamically by legacy closed proprietary bootloader to userspace from DT
> booted kernel?
> 
> Anyway, for supporting kexec (with passing ATAGs) it is needed to have
> working /proc/atags file, right?

Yeah I think that since we already have it in /proc, we should just
support it. And keep it behind CONFIG_KEXEC and CONFIG_ARM_APPENDED_DTB
and hope we don't find other users for it.. Then reconsider the Kconfig
dependencies if we do find other users.
 
> > It also sets a precedent: by adding this into DT, it is creating a new
> > DT ABI as well, and we'll end up seeing dts files with an ATAG block
> > patched into them.
> > 
> > Are the ATAGs at a fixed address on the N900?
> 
> Yes, in board-rx51.c is:
> 
> .atag_offset	= 0x100
> 
> and Nokia Bootloader (proprietary) store them to that address.
>
> > Can that be handled in
> > some kind of legacy file for the N900 which calls save_atags() on it, so
> > we don't end up introducing yet more stuff that we have to maintain into
> > the distant future?  If not, what about copying a known working atag
> > structure into a legacy file for the N900?
>
> I already asked question if it is possible to read ATAGs from DT booted
> kernel. And somebody (do not remember who) wrote to ML, that it is not
> possible and it can be done in that uncompress code.

I guess the other option would be to keep the raw ATAG area reserved,
and only initialize /proc/atags from a board specific initcall.
But I think that would complicate the already fragile uncompress
relocation code even further?

Regards,

Tony

  reply	other threads:[~2015-07-13 13:19 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-06 20:26 [PATCH 0/5] ATAGs to DT patches Pali Rohár
2015-07-06 20:26 ` [PATCH 1/5] arm: devtree: Set system_rev from DT "/revision" Pali Rohár
2015-12-24 19:02   ` Pali Rohár
2015-12-28 21:01     ` Frank Rowand
2015-12-28 22:27       ` Arnd Bergmann
2016-01-05 11:37         ` Pali Rohár
2016-01-05 11:45           ` Arnd Bergmann
2016-02-05 18:15             ` [PATCH] ARM: RX51: Set system_rev from ATAGS Ivaylo Dimitrov
2016-02-08 20:48               ` Tony Lindgren
2016-02-08 21:10               ` Pali Rohár
2016-02-09 16:17                 ` Tony Lindgren
2016-02-10 18:23                   ` [PATCH v1] " Ivaylo Dimitrov
2016-02-11  0:19                     ` Tony Lindgren
2015-07-06 20:26 ` [PATCH 2/5] arm: boot: convert ATAG_REVISION to DT "/revision" entry Pali Rohár
2015-07-06 20:26 ` [PATCH 3/5] arm: atags: Fix declaration of function save_atags Pali Rohár
2015-07-06 20:26 ` [PATCH 4/5] arm: devtree: Read ATAGs structure from DT "/chosen/linux, atags" entry Pali Rohár
2015-07-06 20:26 ` [PATCH 5/5] arm: boot: store ATAGs structure into " Pali Rohár
2015-07-07 11:32   ` [PATCH 5/5] arm: boot: store ATAGs structure into DT "/chosen/linux,atags" entry Russell King - ARM Linux
2015-07-07 11:58     ` Pali Rohár
2015-07-13 13:19       ` Tony Lindgren [this message]
2015-10-12 20:16         ` Tony Lindgren
2015-10-12 20:25           ` [PATCH 5/5] arm: boot: store ATAGs structure into DT "/chosen/linux, atags" entry Pali Rohár
2015-10-12 20:45             ` [PATCH 5/5] arm: boot: store ATAGs structure into DT "/chosen/linux,atags" entry Tony Lindgren
2015-10-13 14:37               ` Pali Rohár
2015-11-05 11:40                 ` Pali Rohár
2015-11-05 16:17                   ` Tony Lindgren
2015-11-12  1:10                     ` [PATCH 5/5] arm: boot: store ATAGs structure into DT "/chosen/linux, atags" entry Frank Rowand
2015-11-22  6:51                       ` [PATCH 5/5] arm: boot: store ATAGs structure into DT "/chosen/linux,atags" entry Pavel Machek
2015-11-23 14:45                         ` Pali Rohár
2015-11-25 18:16                           ` Tony Lindgren
2015-11-25 19:48                             ` [PATCH 5/5] arm: boot: store ATAGs structure into DT "/chosen/linux, atags" entry Arnd Bergmann
2015-11-25 21:03                               ` [PATCH 5/5] arm: boot: store ATAGs structure into DT "/chosen/linux,atags" entry Tony Lindgren
2015-11-25 21:29                                 ` [PATCH 5/5] arm: boot: store ATAGs structure into DT "/chosen/linux, atags" entry Arnd Bergmann
2015-11-25 21:44                                   ` Pali Rohár
2015-11-25 21:51                                     ` Arnd Bergmann
2015-11-25 22:00                                       ` Pali Rohár
2015-11-26  4:19                                 ` Frank Rowand
2015-11-26  9:07                                   ` [PATCH 5/5] arm: boot: store ATAGs structure into DT "/chosen/linux,atags" entry Pali Rohár
2015-11-26 20:39                                     ` Tony Lindgren
2015-11-26 21:12                                       ` Ivaylo Dimitrov
2015-11-27  8:38                                       ` Pali Rohár
2015-11-27  8:44                                         ` Michael Trimarchi
2015-11-27  8:52                                           ` Michael Trimarchi
2015-11-27 14:51                                         ` Tony Lindgren
2015-11-27 13:27                                     ` Russell King - ARM Linux
2015-11-27 19:51                                       ` Russell King - ARM Linux
2015-11-27 21:06                                         ` [PATCH 5/5] arm: boot: store ATAGs structure into DT "/chosen/linux, atags" entry Arnd Bergmann
2015-11-27 23:28                                           ` [PATCH 5/5] arm: boot: store ATAGs structure into DT "/chosen/linux,atags" entry Nicolas Pitre
2015-11-28 12:27                                             ` [PATCH 5/5] arm: boot: store ATAGs structure into DT "/chosen/linux, atags" entry Arnd Bergmann
2015-11-28 12:54                                               ` [PATCH 5/5] arm: boot: store ATAGs structure into DT "/chosen/linux,atags" entry Russell King - ARM Linux
2015-11-28 12:33                                             ` Russell King - ARM Linux
2015-11-28 17:34                                               ` Nicolas Pitre
2015-11-28 21:02                                                 ` [PATCH 5/5] arm: boot: store ATAGs structure into DT "/chosen/linux, atags" entry Frank Rowand
2015-11-29 18:09                                                 ` [PATCH 5/5] arm: boot: store ATAGs structure into DT "/chosen/linux,atags" entry Russell King - ARM Linux
2015-11-29 18:19                                                   ` [PATCH 5/5] arm: boot: store ATAGs structure into DT "/chosen/linux, atags" entry Pali Rohár
2015-11-29 23:13                                                     ` [PATCH 5/5] arm: boot: store ATAGs structure into DT "/chosen/linux,atags" entry Russell King - ARM Linux
2015-11-30  0:09                                                   ` Nicolas Pitre
2015-11-30  0:15                                                     ` [PATCH 5/5] arm: boot: store ATAGs structure into DT "/chosen/linux, atags" entry Pali Rohár
2015-11-30 15:23                                                       ` [PATCH 5/5] arm: boot: store ATAGs structure into DT "/chosen/linux,atags" entry Tony Lindgren
2015-11-30 15:39                                                         ` Pali Rohár
2015-11-30 16:09                                                           ` Nicolas Pitre
2015-12-15  9:33                                                             ` Pali Rohár
2015-12-15 11:04                                                               ` [PATCH 5/5] arm: boot: store ATAGs structure into DT "/chosen/linux, atags" entry Arnd Bergmann
2015-12-15 12:20                                                               ` [PATCH 5/5] arm: boot: store ATAGs structure into DT "/chosen/linux,atags" entry Russell King - ARM Linux
2015-12-15 17:24                                                                 ` Nicolas Pitre
2015-12-23 14:54                                                                 ` Ivaylo Dimitrov
2015-11-28  4:06 ` [PATCH 0/5] ATAGs to DT patches Frank Rowand
2015-11-28  5:55   ` Frank Rowand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150713131902.GH26485@atomide.com \
    --to=tony@atomide$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox