From 742433b00b1c53d447a10f215cf887e4cb3406b5 Mon Sep 17 00:00:00 2001 From: Matthew Wilcox Date: Mon, 5 Feb 2007 16:34:00 -0800 Subject: [PATCH] PA-RISC: Fix bogus warnings from modpost parisc and parisc64 seem to name sections a little differently from other targets. parisc64 gives spurious warnings like: WARNING: drivers/net/dummy.o - Section mismatch: reference to .init.text:dummy_setup from .data.rel.ro between '.LC1' (at offset 0x0) and '.LC6' and parisc gives spurious warnings like: WARNING: drivers/net/dummy.o - Section mismatch: reference to .init.text:dummy_setup from .rodata.cst4 between '.LC1' (at offset 0x0) and '.LC6' Given the other comments in modpost.c, it seems that the best solution is to move rodata down to the 'match at start of name' section and add .data.rel.ro to the 'match entire name' section. Cc: Sam Ravnborg Cc: Kyle McMartin Signed-off-by: Andrew Morton --- scripts/mod/modpost.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts/mod') diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index ac0a5822299..e26381e3fc0 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -910,7 +910,7 @@ static int init_section_ref_ok(const char *name) ".opd", /* see comment [OPD] at exit_section_ref_ok() */ ".toc1", /* used by ppc64 */ ".stab", - ".rodata", + ".data.rel.ro", /* used by parisc64 */ ".parainstructions", ".text.lock", "__bug_table", /* used by powerpc for BUG() */ @@ -933,6 +933,7 @@ static int init_section_ref_ok(const char *name) ".eh_frame", ".debug", ".parainstructions", + ".rodata", NULL }; /* part of section name */ -- cgit v1.2.3 From f3cf2673358e4221afbb59721a8580a8f35479a5 Mon Sep 17 00:00:00 2001 From: Kyle McMartin Date: Sat, 13 Jan 2007 14:58:21 -0500 Subject: [PARISC] generate modalias for parisc_device_id tables Signed-off-by: Kyle McMartin --- scripts/mod/file2alias.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'scripts/mod') diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index f61c9ccef6a..717b04a3b40 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c @@ -452,6 +452,24 @@ static int do_eisa_entry(const char *filename, struct eisa_device_id *eisa, return 1; } +/* Looks like: parisc:tNhvNrevNsvN */ +static int do_parisc_entry(const char *filename, struct parisc_device_id *id, + char *alias) +{ + id->hw_type = TO_NATIVE(id->hw_type); + id->hversion = TO_NATIVE(id->hversion); + id->hversion_rev = TO_NATIVE(id->hversion_rev); + id->sversion = TO_NATIVE(id->sversion); + + strcpy(alias, "parisc:"); + ADD(alias, "t", id->hw_type != HWTYPE_ANY_ID, id->hw_type); + ADD(alias, "hv", id->hversion != HVERSION_ANY_ID, id->hversion); + ADD(alias, "rev", id->hversion_rev != HVERSION_REV_ANY_ID, id->hversion_rev); + ADD(alias, "sv", id->sversion != SVERSION_ANY_ID, id->sversion); + + return 1; +} + /* Ignore any prefix, eg. v850 prepends _ */ static inline int sym_is(const char *symbol, const char *name) { @@ -559,6 +577,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info, do_table(symval, sym->st_size, sizeof(struct eisa_device_id), "eisa", do_eisa_entry, mod); + else if (sym_is(symname, "__mod_parisc_device_table")) + do_table(symval, sym->st_size, + sizeof(struct parisc_device_id), "parisc", + do_parisc_entry, mod); } /* Now add out buffered information to the generated C source */ -- cgit v1.2.3 From f354ef8abe5d6d967c023b21980241e6f883a698 Mon Sep 17 00:00:00 2001 From: Kyle McMartin Date: Sat, 13 Jan 2007 15:02:09 -0500 Subject: [PARISC] rename *_ANY_ID to PA_*_ANY_ID in the exported header Signed-off-by: Kyle McMartin --- scripts/mod/file2alias.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts/mod') diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 717b04a3b40..b2f73ffb40b 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c @@ -462,10 +462,10 @@ static int do_parisc_entry(const char *filename, struct parisc_device_id *id, id->sversion = TO_NATIVE(id->sversion); strcpy(alias, "parisc:"); - ADD(alias, "t", id->hw_type != HWTYPE_ANY_ID, id->hw_type); - ADD(alias, "hv", id->hversion != HVERSION_ANY_ID, id->hversion); - ADD(alias, "rev", id->hversion_rev != HVERSION_REV_ANY_ID, id->hversion_rev); - ADD(alias, "sv", id->sversion != SVERSION_ANY_ID, id->sversion); + ADD(alias, "t", id->hw_type != PA_HWTYPE_ANY_ID, id->hw_type); + ADD(alias, "hv", id->hversion != PA_HVERSION_ANY_ID, id->hversion); + ADD(alias, "rev", id->hversion_rev != PA_HVERSION_REV_ANY_ID, id->hversion_rev); + ADD(alias, "sv", id->sversion != PA_SVERSION_ANY_ID, id->sversion); return 1; } -- cgit v1.2.3