Skip to content

Commit e9541d0

Browse files
hdellerKyle McMartin
authored andcommitted
[PARISC] fix section mismatches in arch/parisc/kernel
Hi Kyle, this patch fixes two section mismatches in arch/parisc/kernel: WARNING: arch/parisc/kernel/built-in.o(.data.read_mostly+0xd8): Section mismatch: reference to .init.text:processor_probe (between 'cpu_driver' and 'boot_cpu_data') WARNING: arch/parisc/kernel/built-in.o(.text.alloc_pa_dev+0x140): Section mismatch: reference to .init.text:parisc_hardware_description (after 'alloc_pa_dev') Additionally, mark some tables as constants. Please apply, Helge Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
1 parent 25971f6 commit e9541d0

4 files changed

Lines changed: 11 additions & 11 deletions

File tree

‎arch/parisc/kernel/hardware.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
* so don't reference this table after starting the init process
3939
*/
4040

41-
static struct hp_hardware hp_hardware_list[] __initdata = {
41+
static struct hp_hardware hp_hardware_list[] __devinitdata = {
4242
{HPHW_NPROC,0x01,0x4,0x0,"Indigo (840, 930)"},
4343
{HPHW_NPROC,0x8,0x4,0x01,"Firefox(825,925)"},
4444
{HPHW_NPROC,0xA,0x4,0x01,"Top Gun (835,834,935,635)"},
@@ -1219,7 +1219,7 @@ static struct hp_cpu_type_mask {
12191219
unsigned short model;
12201220
unsigned short mask;
12211221
enum cpu_type cpu;
1222-
} hp_cpu_type_mask_list[] __initdata = {
1222+
} hp_cpu_type_mask_list[] __devinitdata = {
12231223

12241224
{ 0x0000, 0x0ff0, pcx }, /* 0x0000 - 0x000f */
12251225
{ 0x0048, 0x0ff0, pcxl }, /* 0x0040 - 0x004f */
@@ -1300,7 +1300,7 @@ static struct hp_cpu_type_mask {
13001300
{ 0x0000, 0x0000, pcx } /* terminate table */
13011301
};
13021302

1303-
char *cpu_name_version[][2] = {
1303+
const char * const cpu_name_version[][2] = {
13041304
[pcx] = { "PA7000 (PCX)", "1.0" },
13051305
[pcxs] = { "PA7000 (PCX-S)", "1.1a" },
13061306
[pcxt] = { "PA7100 (PCX-T)", "1.1b" },
@@ -1316,7 +1316,7 @@ char *cpu_name_version[][2] = {
13161316
[mako2] = { "PA8900 (Shortfin)", "2.0" }
13171317
};
13181318

1319-
const char * __init
1319+
const char * __devinit
13201320
parisc_hardware_description(struct parisc_device_id *id)
13211321
{
13221322
struct hp_hardware *listptr;
@@ -1355,7 +1355,7 @@ parisc_hardware_description(struct parisc_device_id *id)
13551355

13561356

13571357
/* Interpret hversion (ret[0]) from PDC_MODEL(4)/PDC_MODEL_INFO(0) */
1358-
enum cpu_type __init
1358+
enum cpu_type __cpuinit
13591359
parisc_get_cpu_type(unsigned long hversion)
13601360
{
13611361
struct hp_cpu_type_mask *ptr;

‎arch/parisc/kernel/processor.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ extern int update_cr16_clocksource(void); /* from time.c */
7676
* (return 1). If so, initialize the chip and tell other partners in crime
7777
* they have work to do.
7878
*/
79-
static int __init processor_probe(struct parisc_device *dev)
79+
static int __cpuinit processor_probe(struct parisc_device *dev)
8080
{
8181
unsigned long txn_addr;
8282
unsigned long cpuid;
@@ -381,12 +381,12 @@ show_cpuinfo (struct seq_file *m, void *v)
381381
return 0;
382382
}
383383

384-
static struct parisc_device_id processor_tbl[] __read_mostly = {
384+
static const struct parisc_device_id processor_tbl[] = {
385385
{ HPHW_NPROC, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, SVERSION_ANY_ID },
386386
{ 0, }
387387
};
388388

389-
static struct parisc_driver cpu_driver __read_mostly = {
389+
static struct parisc_driver cpu_driver = {
390390
.name = "CPU",
391391
.id_table = processor_tbl,
392392
.probe = processor_probe

‎include/asm-parisc/hardware.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ enum cpu_type {
3535
mako2 = 12 /* pa8900 pa 2.0 */
3636
};
3737

38-
extern char *cpu_name_version[][2]; /* mapping from enum cpu_type to strings */
38+
extern const char * const cpu_name_version[][2]; /* mapping from enum cpu_type to strings */
3939

4040
struct parisc_driver;
4141

‎include/asm-parisc/processor.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ struct system_cpuinfo_parisc {
6969
char sys_model_name[81]; /* PDC-ROM returnes this model name */
7070
} pdc;
7171

72-
char *cpu_name; /* e.g. "PA7300LC (PCX-L2)" */
73-
char *family_name; /* e.g. "1.1e" */
72+
const char *cpu_name; /* e.g. "PA7300LC (PCX-L2)" */
73+
const char *family_name; /* e.g. "1.1e" */
7474
};
7575

7676

0 commit comments

Comments
 (0)