[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTik2TP_DUWstn_qmq1oz4HaPHqkoGkN5f1oUiHQa@mail.gmail.com>
Date: Tue, 16 Nov 2010 17:16:14 -0700
From: Grant Likely <grant.likely@...retlab.ca>
To: dirk.brandewie@...il.com
Cc: devicetree-discuss@...ts.ozlabs.org, linux-arch@...r.kernel.org,
linux-kbuild@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
linux-kernel@...r.kernel.org, sodaville@...utronix.de,
microblaze-uclinux@...e.uq.edu.au, arjan@...ux.intel.com
Subject: Re: [PATCH 2/5] of/fdt: add kernel command line option for dtb_compat string
On Tue, Nov 16, 2010 at 3:41 PM, <dirk.brandewie@...il.com> wrote:
> From: Dirk Brandewie <dirk.brandewie@...il.com>
>
> Adds a kernel command line option "dtb_compat=<string>" and functions
> for architecture/platform specific code to retrieve the command line
> string and locate the compatible DTB linked into the kernel
>
> of_flat_dt_get_dtb_compatible_string() returns a pointer string passed
> from the command line or a pointer to an empty string.
>
> of_flat_dt_find_compatible_dtb() returns a pointer to a DTB that is
> compatible with the "compatible" string or a NULL pointer if no
> matching DTB is present.
>
> Signed-off-by: Dirk Brandewie <dirk.brandewie@...il.com>
> ---
[...]
> +void __init *of_flat_dt_find_compatible_dtb(char *name)
> +{
> + void *rc = NULL;
> + unsigned long root, size;
> + struct boot_param_header *orig_initial_boot_params;
> + uint8_t *blob;
> +
> + orig_initial_boot_params = initial_boot_params;
> + blob = __dtb_start;
> + initial_boot_params = (struct boot_param_header *)blob;
> +
> + while (blob < __dtb_end &&
> + (be32_to_cpu(initial_boot_params->magic) == OF_DT_HEADER)) {
The kernel needs to complain *loudly* if this occurs because it
represents a bug. I'm tempted to say use BUG, but that would halt the
kernel and prevent any possibility of kernel log output. WARN_ON() is
probably best.
g.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists