Skip to content

Commit 2b6ae09

Browse files
committed
parisc: Avoid printing the hardware path twice
Avoid that the hardware path is shown twice in the kernel log, and clean up the output of the version numbers to show up in the same order as they are listed in the hardware database in the hardware.c file. Additionally, optimize the memory footprint of the hardware database and mark some code as init code. Fixes: cab56b5 ("parisc: Fix device names in /proc/iomem") Signed-off-by: Helge Deller <[email protected]> Cc: <[email protected]> # v4.9+
1 parent a0c9f1f commit 2b6ae09

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed

arch/parisc/include/asm/hardware.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
#define SVERSION_ANY_ID PA_SVERSION_ANY_ID
1111

1212
struct hp_hardware {
13-
unsigned short hw_type:5; /* HPHW_xxx */
14-
unsigned short hversion;
15-
unsigned long sversion:28;
16-
unsigned short opt;
17-
const char name[80]; /* The hardware description */
18-
};
13+
unsigned int hw_type:8; /* HPHW_xxx */
14+
unsigned int hversion:12;
15+
unsigned int sversion:12;
16+
unsigned char opt;
17+
unsigned char name[59]; /* The hardware description */
18+
} __packed;
1919

2020
struct parisc_device;
2121

arch/parisc/kernel/drivers.c

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -882,15 +882,13 @@ void __init walk_central_bus(void)
882882
&root);
883883
}
884884

885-
static void print_parisc_device(struct parisc_device *dev)
885+
static __init void print_parisc_device(struct parisc_device *dev)
886886
{
887-
char hw_path[64];
888-
static int count;
887+
static int count __initdata;
889888

890-
print_pa_hwpath(dev, hw_path);
891-
pr_info("%d. %s at %pap [%s] { %d, 0x%x, 0x%.3x, 0x%.5x }",
892-
++count, dev->name, &(dev->hpa.start), hw_path, dev->id.hw_type,
893-
dev->id.hversion_rev, dev->id.hversion, dev->id.sversion);
889+
pr_info("%d. %s at %pap { type:%d, hv:%#x, sv:%#x, rev:%#x }",
890+
++count, dev->name, &(dev->hpa.start), dev->id.hw_type,
891+
dev->id.hversion, dev->id.sversion, dev->id.hversion_rev);
894892

895893
if (dev->num_addrs) {
896894
int k;
@@ -1079,7 +1077,7 @@ static __init int qemu_print_iodc_data(struct device *lin_dev, void *data)
10791077

10801078

10811079

1082-
static int print_one_device(struct device * dev, void * data)
1080+
static __init int print_one_device(struct device * dev, void * data)
10831081
{
10841082
struct parisc_device * pdev = to_parisc_device(dev);
10851083

0 commit comments

Comments
 (0)