lkml.org 
[lkml]   [2004]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: module.viomap support for ppc64
From
Date
On Thu, 2004-08-12 at 12:37, Olaf Hering wrote:
> Current MODULE_DEVICE_TABLE(vio, $table); defines 2 char pointers. I'm
> not sure if depmod can really handle it. Where do they point to in the
> module binary? I could find an answer, so far. I just declared an array.

Olaf explained on irc that output_vio_entry() below was finding NULL for
the name and compat pointers. Perhaps some additional relocation needs
to take place before those can be used?

> diff -p -purN module-init-tools-3.0-pre10.orig/moduleops_core.c module-init-tools-3.0-pre10/moduleops_core.c
> --- module-init-tools-3.0-pre10.orig/moduleops_core.c 2003-12-24 06:17:07.000000000 +0100
> +++ module-init-tools-3.0-pre10/moduleops_core.c 2004-08-12 15:21:44.000000000 +0200
> @@ -176,6 +176,10 @@ static void PERBIT(fetch_tables)(struct
> module->ccw_table = PERBIT(deref_sym)(module->data,
> "__mod_ccw_device_table");
>
> + module->vio_size = PERBIT(VIO_DEVICE_SIZE);
> + module->vio_table = PERBIT(deref_sym)(module->data,
> + "__mod_vio_device_table");
> +
> module->ieee1394_size = PERBIT(IEEE1394_DEVICE_SIZE);
> module->ieee1394_table = PERBIT(deref_sym)(module->data,
> "__mod_ieee1394_device_table");
> diff -p -purN module-init-tools-3.0-pre10.orig/tables.c module-init-tools-3.0-pre10/tables.c
> --- module-init-tools-3.0-pre10.orig/tables.c 2003-12-24 06:23:38.000000000 +0100
> +++ module-init-tools-3.0-pre10/tables.c 2004-08-12 19:19:01.708780583 +0200
> @@ -127,7 +127,31 @@ void output_ieee1394_table(struct module
> output_ieee1394_entry(fw, shortname, out);
> }
> }
> +static void output_vio_entry(struct vio_device_id *fw, char *name, FILE *out)
> +{
> + fprintf(out, "%-20s %-32s %s\n",
> + name, fw->name, fw->compat);
> +}
>
> +void output_vio_table(struct module *modules, FILE *out)
> +{
> + struct module *i;
> +
> + fprintf(out, "%-20s %-32s compatible\n", "# vio module", "name");
> +
> + for (i = modules; i; i = i->next) {
> + struct vio_device_id *fw;
> + char shortname[strlen(i->pathname) + 1];
> +
> + if (!i->vio_table)
> + continue;
> +
> + make_shortname(shortname, i->pathname);
> + for (fw = i->vio_table; *fw->name;
> + fw = (void *) fw + i->vio_size)
> + output_vio_entry(fw, shortname, out);
> + }
> +}
>
> /* We set driver_data to zero */
> static void output_ccw_entry(struct ccw_device_id *ccw, char *name, FILE *out)

--
Hollis Blanchard
IBM Linux Technology Center

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.494 / U:0.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site