Skip to content

Commit 8db4a02

Browse files
committed
Merge tag 'for-5.20/parisc-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull parisc updates from Helge Deller: "One real bugfix to change the io_pgetevents_time64() syscall to use the compat implementation when running in compat mode, otherwise the signed int32 parameters min_nr and nr will be incorrectly handled as unsigned int64 values. Other than that just small cleanups: - hardware database housekeeping and proper /proc/iomem output - add proper function exit code if probe functions fail - drop stale variables (pa_swapper_pg_lock) - drop unneccessary zero-initializations - typo fixes in comments" * tag 'for-5.20/parisc-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: Input: gscps2 - check return value of ioremap() in gscps2_probe() parisc: io_pgetevents_time64() needs compat syscall in 32-bit compat mode parisc: Drop zero variable initialisations in mm/init.c parisc: Do not initialise statics to 0 parisc: Check the return value of ioremap() in lba_driver_probe() parisc: Drop pa_swapper_pg_lock spinlock parisc: Fix comment typo in fault.c parisc: Fix device names in /proc/iomem parisc: Clean up names in hardware database
2 parents 98586bd + e61b312 commit 8db4a02

File tree

9 files changed

+22
-21
lines changed

9 files changed

+22
-21
lines changed

arch/parisc/kernel/cache.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ void flush_instruction_cache_local(void); /* flushes local code-cache only */
5050
*/
5151
DEFINE_SPINLOCK(pa_tlb_flush_lock);
5252

53-
/* Swapper page setup lock. */
54-
DEFINE_SPINLOCK(pa_swapper_pg_lock);
55-
5653
#if defined(CONFIG_64BIT) && defined(CONFIG_SMP)
5754
int pa_serialize_tlb_flushes __ro_after_init;
5855
#endif

arch/parisc/kernel/drivers.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,6 @@ alloc_pa_dev(unsigned long hpa, struct hardware_path *mod_path)
520520
dev->id.hversion_rev = iodc_data[1] & 0x0f;
521521
dev->id.sversion = ((iodc_data[4] & 0x0f) << 16) |
522522
(iodc_data[5] << 8) | iodc_data[6];
523-
dev->hpa.name = parisc_pathname(dev);
524523
dev->hpa.start = hpa;
525524
/* This is awkward. The STI spec says that gfx devices may occupy
526525
* 32MB or 64MB. Unfortunately, we don't know how to tell whether
@@ -534,10 +533,10 @@ alloc_pa_dev(unsigned long hpa, struct hardware_path *mod_path)
534533
dev->hpa.end = hpa + 0xfff;
535534
}
536535
dev->hpa.flags = IORESOURCE_MEM;
537-
name = parisc_hardware_description(&dev->id);
538-
if (name) {
539-
strlcpy(dev->name, name, sizeof(dev->name));
540-
}
536+
dev->hpa.name = dev->name;
537+
name = parisc_hardware_description(&dev->id) ? : "unknown";
538+
snprintf(dev->name, sizeof(dev->name), "%s [%s]",
539+
name, parisc_pathname(dev));
541540

542541
/* Silently fail things like mouse ports which are subsumed within
543542
* the keyboard controller

arch/parisc/kernel/hardware.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@
2323
* HP PARISC Hardware Database
2424
* Access to this database is only possible during bootup
2525
* so don't reference this table after starting the init process
26-
*
27-
* NOTE: Product names which are listed here and ends with a '?'
28-
* are guessed. If you know the correct name, please let us know.
2926
*/
3027

3128
static struct hp_hardware hp_hardware_list[] __initdata = {
@@ -212,7 +209,7 @@ static struct hp_hardware hp_hardware_list[] __initdata = {
212209
{HPHW_NPROC,0x5DD,0x4,0x81,"Duet W2"},
213210
{HPHW_NPROC,0x5DE,0x4,0x81,"Piccolo W+"},
214211
{HPHW_NPROC,0x5DF,0x4,0x81,"Cantata W2"},
215-
{HPHW_NPROC,0x5DF,0x0,0x00,"Marcato W+ (rp5470)?"},
212+
{HPHW_NPROC,0x5DF,0x0,0x00,"Marcato W+ (rp5470)"},
216213
{HPHW_NPROC,0x5E0,0x4,0x91,"Cantata DC- W2"},
217214
{HPHW_NPROC,0x5E1,0x4,0x91,"Crescendo DC- W2"},
218215
{HPHW_NPROC,0x5E2,0x4,0x91,"Crescendo 650 W2"},
@@ -266,11 +263,11 @@ static struct hp_hardware hp_hardware_list[] __initdata = {
266263
{HPHW_NPROC,0x888,0x4,0x91,"Storm Peak Fast DC-"},
267264
{HPHW_NPROC,0x889,0x4,0x91,"Storm Peak Fast"},
268265
{HPHW_NPROC,0x88A,0x4,0x91,"Crestone Peak Slow"},
269-
{HPHW_NPROC,0x88B,0x4,0x91,"Crestone Peak Fast?"},
266+
{HPHW_NPROC,0x88B,0x4,0x91,"Crestone Peak Fast"},
270267
{HPHW_NPROC,0x88C,0x4,0x91,"Orca Mako+"},
271268
{HPHW_NPROC,0x88D,0x4,0x91,"Rainier/Medel Mako+ Slow"},
272269
{HPHW_NPROC,0x88E,0x4,0x91,"Rainier/Medel Mako+ Fast"},
273-
{HPHW_NPROC,0x892,0x4,0x91,"Mt. Hamilton Slow Mako+?"},
270+
{HPHW_NPROC,0x892,0x4,0x91,"Mt. Hamilton Slow Mako+"},
274271
{HPHW_NPROC,0x894,0x4,0x91,"Mt. Hamilton Fast Mako+"},
275272
{HPHW_NPROC,0x895,0x4,0x91,"Storm Peak Slow Mako+"},
276273
{HPHW_NPROC,0x896,0x4,0x91,"Storm Peak Fast Mako+"},
@@ -1198,7 +1195,7 @@ static struct hp_hardware hp_hardware_list[] __initdata = {
11981195
{HPHW_FIO, 0x004, 0x00340, 0x0, "BARCO CX4500 VME Grphx Cnsl"},
11991196
{HPHW_FIO, 0x004, 0x00360, 0x0, "Hughes TOG VME FDDI"},
12001197
{HPHW_FIO, 0x076, 0x000AD, 0x0, "Crestone Peak Core RS-232"},
1201-
{HPHW_FIO, 0x077, 0x000AD, 0x0, "Crestone Peak Fast? Core RS-232"},
1198+
{HPHW_FIO, 0x077, 0x000AD, 0x0, "Crestone Peak Fast Core RS-232"},
12021199
{HPHW_IOA, 0x185, 0x0000B, 0x00, "Java BC Summit Port"},
12031200
{HPHW_IOA, 0x1FF, 0x0000B, 0x00, "Hitachi Ghostview Summit Port"},
12041201
{HPHW_IOA, 0x580, 0x0000B, 0x10, "U2-IOA BC Runway Port"},

arch/parisc/kernel/pci-dma.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
#include <asm/tlbflush.h> /* for purge_tlb_*() macros */
3737

3838
static struct proc_dir_entry * proc_gsc_root __read_mostly = NULL;
39-
static unsigned long pcxl_used_bytes __read_mostly = 0;
40-
static unsigned long pcxl_used_pages __read_mostly = 0;
39+
static unsigned long pcxl_used_bytes __read_mostly;
40+
static unsigned long pcxl_used_pages __read_mostly;
4141

4242
extern unsigned long pcxl_dma_start; /* Start of pcxl dma mapping area */
4343
static DEFINE_SPINLOCK(pcxl_res_lock);

arch/parisc/kernel/syscalls/syscall.tbl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@
413413
412 32 utimensat_time64 sys_utimensat sys_utimensat
414414
413 32 pselect6_time64 sys_pselect6 compat_sys_pselect6_time64
415415
414 32 ppoll_time64 sys_ppoll compat_sys_ppoll_time64
416-
416 32 io_pgetevents_time64 sys_io_pgetevents sys_io_pgetevents
416+
416 32 io_pgetevents_time64 sys_io_pgetevents compat_sys_io_pgetevents_time64
417417
417 32 recvmmsg_time64 sys_recvmmsg compat_sys_recvmmsg_time64
418418
418 32 mq_timedsend_time64 sys_mq_timedsend sys_mq_timedsend
419419
419 32 mq_timedreceive_time64 sys_mq_timedreceive sys_mq_timedreceive

arch/parisc/mm/fault.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ int show_unhandled_signals = 1;
3838
/*
3939
* parisc_acctyp(unsigned int inst) --
4040
* Given a PA-RISC memory access instruction, determine if the
41-
* the instruction would perform a memory read or memory write
41+
* instruction would perform a memory read or memory write
4242
* operation.
4343
*
4444
* This function assumes that the given instruction is a memory access

arch/parisc/mm/init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,7 @@ static unsigned long space_id[SID_ARRAY_SIZE] = { 1 }; /* disallow space 0 */
722722
static unsigned long dirty_space_id[SID_ARRAY_SIZE];
723723
static unsigned long space_id_index;
724724
static unsigned long free_space_ids = NR_SPACE_IDS - 1;
725-
static unsigned long dirty_space_ids = 0;
725+
static unsigned long dirty_space_ids;
726726

727727
static DEFINE_SPINLOCK(sid_lock);
728728

drivers/input/serio/gscps2.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,10 @@ static int __init gscps2_probe(struct parisc_device *dev)
350350
ps2port->port = serio;
351351
ps2port->padev = dev;
352352
ps2port->addr = ioremap(hpa, GSC_STATUS + 4);
353+
if (!ps2port->addr) {
354+
ret = -ENOMEM;
355+
goto fail_nomem;
356+
}
353357
spin_lock_init(&ps2port->lock);
354358

355359
gscps2_reset(ps2port);

drivers/parisc/lba_pci.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1476,9 +1476,13 @@ lba_driver_probe(struct parisc_device *dev)
14761476
u32 func_class;
14771477
void *tmp_obj;
14781478
char *version;
1479-
void __iomem *addr = ioremap(dev->hpa.start, 4096);
1479+
void __iomem *addr;
14801480
int max;
14811481

1482+
addr = ioremap(dev->hpa.start, 4096);
1483+
if (addr == NULL)
1484+
return -ENOMEM;
1485+
14821486
/* Read HW Rev First */
14831487
func_class = READ_REG32(addr + LBA_FCLASS);
14841488

0 commit comments

Comments
 (0)