Skip to content

Commit 7286d2a

Browse files
committed
Merge branch 'parisc-5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull parisc updates from Helge Deller: - Added fw_cfg support for parisc on qemu - Added font support in sti text console driver for byte- and word-mode ROMs - Switch to more fine grained lws locks and improve spinlock handling - Add ioread64_hi_lo() and iowrite64_hi_lo() to avoid 0-day linking errors - Mark pointers volatile in __xchg8(), __xchg32() and __xchg64() to help compiler - Header file cleanups, mostly removal of unused HP-UX compat defines - Drop one bit from our O_NONBLOCK define to become now 000200000 - Add MAP_UNINITIALIZED define to avoid userspace compile errors - Drop CONFIG_IDE from defconfigs - Speed up synchronize_caches() on UP machines - Rewrite tlb flush threshold calculation - Comment fixes and cleanups * 'parisc-5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc/sticon: Add user font support parisc/sticon: Always register sticon console driver parisc: Add MAP_UNINITIALIZED define parisc: Improve spinlock handling parisc: Install vmlinuz instead of zImage file parisc: Rewrite tlb flush threshold calculation parisc: Switch to more fine grained lws locks parisc: Mark pointers volatile in __xchg8(), __xchg32() and __xchg64() parisc: Fix comments and enable interrupts later parisc: Add alternative patching to synchronize_caches define parisc: Add ioread64_hi_lo() and iowrite64_hi_lo() parisc: disable CONFIG_IDE in defconfigs parisc: Drop useless comments in uapi/asm/signal.h parisc: Define O_NONBLOCK to become 000200000 parisc: Drop HP-UX specific fcntl and signal flags parisc: Avoid external interrupts when IPI finishes parisc: Add qemu fw_cfg interface fw_cfg: Add support for parisc architecture
2 parents 578a715 + 7ff3f14 commit 7286d2a

26 files changed

Lines changed: 453 additions & 346 deletions

File tree

arch/parisc/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,5 +375,6 @@ config KEXEC_FILE
375375

376376
endmenu
377377

378+
source "drivers/firmware/Kconfig"
378379

379380
source "drivers/parisc/Kconfig"

arch/parisc/configs/generic-32bit_defconfig

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,6 @@ CONFIG_BLK_DEV_LOOP=y
5252
CONFIG_BLK_DEV_CRYPTOLOOP=y
5353
CONFIG_BLK_DEV_RAM=y
5454
CONFIG_BLK_DEV_RAM_SIZE=6144
55-
CONFIG_IDE=y
56-
CONFIG_BLK_DEV_IDECD=y
57-
CONFIG_BLK_DEV_GENERIC=y
58-
CONFIG_BLK_DEV_NS87415=y
5955
CONFIG_BLK_DEV_SD=y
6056
CONFIG_CHR_DEV_ST=y
6157
CONFIG_BLK_DEV_SR=y
@@ -65,6 +61,8 @@ CONFIG_SCSI_SYM53C8XX_2=y
6561
CONFIG_SCSI_ZALON=y
6662
CONFIG_SCSI_DH=y
6763
CONFIG_ATA=y
64+
CONFIG_ATA_GENERIC=y
65+
CONFIG_PATA_NS87415=y
6866
CONFIG_MD=y
6967
CONFIG_BLK_DEV_MD=m
7068
CONFIG_MD_LINEAR=m

arch/parisc/configs/generic-64bit_defconfig

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,6 @@ CONFIG_PCI_IOV=y
5858
CONFIG_DEVTMPFS=y
5959
CONFIG_DEVTMPFS_MOUNT=y
6060
CONFIG_BLK_DEV_LOOP=y
61-
CONFIG_IDE=y
62-
CONFIG_IDE_GD=m
63-
CONFIG_IDE_GD_ATAPI=y
64-
CONFIG_BLK_DEV_IDECD=m
65-
CONFIG_BLK_DEV_NS87415=y
6661
# CONFIG_SCSI_PROC_FS is not set
6762
CONFIG_BLK_DEV_SD=y
6863
CONFIG_BLK_DEV_SR=y
@@ -76,6 +71,7 @@ CONFIG_SCSI_ZALON=y
7671
CONFIG_SCSI_QLA_ISCSI=m
7772
CONFIG_SCSI_DH=y
7873
CONFIG_ATA=y
74+
CONFIG_PATA_NS87415=y
7975
CONFIG_PATA_SIL680=y
8076
CONFIG_ATA_GENERIC=y
8177
CONFIG_MD=y

arch/parisc/include/asm/barrier.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@
22
#ifndef __ASM_BARRIER_H
33
#define __ASM_BARRIER_H
44

5+
#include <asm/alternative.h>
6+
57
#ifndef __ASSEMBLY__
68

79
/* The synchronize caches instruction executes as a nop on systems in
810
which all memory references are performed in order. */
9-
#define synchronize_caches() __asm__ __volatile__ ("sync" : : : "memory")
11+
#define synchronize_caches() asm volatile("sync" \
12+
ALTERNATIVE(ALT_COND_NO_SMP, INSN_NOP) \
13+
: : : "memory")
1014

1115
#if defined(CONFIG_SMP)
1216
#define mb() do { synchronize_caches(); } while (0)

arch/parisc/include/asm/cmpxchg.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,22 @@
1414
extern void __xchg_called_with_bad_pointer(void);
1515

1616
/* __xchg32/64 defined in arch/parisc/lib/bitops.c */
17-
extern unsigned long __xchg8(char, char *);
18-
extern unsigned long __xchg32(int, int *);
17+
extern unsigned long __xchg8(char, volatile char *);
18+
extern unsigned long __xchg32(int, volatile int *);
1919
#ifdef CONFIG_64BIT
20-
extern unsigned long __xchg64(unsigned long, unsigned long *);
20+
extern unsigned long __xchg64(unsigned long, volatile unsigned long *);
2121
#endif
2222

2323
/* optimizer better get rid of switch since size is a constant */
2424
static inline unsigned long
25-
__xchg(unsigned long x, __volatile__ void *ptr, int size)
25+
__xchg(unsigned long x, volatile void *ptr, int size)
2626
{
2727
switch (size) {
2828
#ifdef CONFIG_64BIT
29-
case 8: return __xchg64(x, (unsigned long *) ptr);
29+
case 8: return __xchg64(x, (volatile unsigned long *) ptr);
3030
#endif
31-
case 4: return __xchg32((int) x, (int *) ptr);
32-
case 1: return __xchg8((char) x, (char *) ptr);
31+
case 4: return __xchg32((int) x, (volatile int *) ptr);
32+
case 1: return __xchg8((char) x, (volatile char *) ptr);
3333
}
3434
__xchg_called_with_bad_pointer();
3535
return x;

arch/parisc/include/asm/futex.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ static inline void
1616
_futex_spin_lock_irqsave(u32 __user *uaddr, unsigned long int *flags)
1717
{
1818
extern u32 lws_lock_start[];
19-
long index = ((long)uaddr & 0xf0) >> 2;
19+
long index = ((long)uaddr & 0x3f8) >> 1;
2020
arch_spinlock_t *s = (arch_spinlock_t *)&lws_lock_start[index];
2121
local_irq_save(*flags);
2222
arch_spin_lock(s);
@@ -26,7 +26,7 @@ static inline void
2626
_futex_spin_unlock_irqrestore(u32 __user *uaddr, unsigned long int *flags)
2727
{
2828
extern u32 lws_lock_start[];
29-
long index = ((long)uaddr & 0xf0) >> 2;
29+
long index = ((long)uaddr & 0x3f8) >> 1;
3030
arch_spinlock_t *s = (arch_spinlock_t *)&lws_lock_start[index];
3131
arch_spin_unlock(s);
3232
local_irq_restore(*flags);

arch/parisc/include/asm/socket.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
#include <uapi/asm/socket.h>
66

7-
/* O_NONBLOCK clashes with the bits used for socket types. Therefore we
8-
* have to define SOCK_NONBLOCK to a different value here.
7+
/* O_NONBLOCK clashed with the bits used for socket types. Therefore we
8+
* had to define SOCK_NONBLOCK to a different value here.
99
*/
1010
#define SOCK_NONBLOCK 0x40000000
1111

arch/parisc/include/asm/spinlock.h

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,21 @@
1010
static inline int arch_spin_is_locked(arch_spinlock_t *x)
1111
{
1212
volatile unsigned int *a = __ldcw_align(x);
13-
return *a == 0;
13+
return READ_ONCE(*a) == 0;
1414
}
1515

16-
#define arch_spin_lock(lock) arch_spin_lock_flags(lock, 0)
16+
static inline void arch_spin_lock(arch_spinlock_t *x)
17+
{
18+
volatile unsigned int *a;
19+
20+
a = __ldcw_align(x);
21+
while (__ldcw(a) == 0)
22+
while (*a == 0)
23+
continue;
24+
}
1725

1826
static inline void arch_spin_lock_flags(arch_spinlock_t *x,
19-
unsigned long flags)
27+
unsigned long flags)
2028
{
2129
volatile unsigned int *a;
2230

@@ -25,10 +33,8 @@ static inline void arch_spin_lock_flags(arch_spinlock_t *x,
2533
while (*a == 0)
2634
if (flags & PSW_SM_I) {
2735
local_irq_enable();
28-
cpu_relax();
2936
local_irq_disable();
30-
} else
31-
cpu_relax();
37+
}
3238
}
3339
#define arch_spin_lock_flags arch_spin_lock_flags
3440

@@ -44,12 +50,9 @@ static inline void arch_spin_unlock(arch_spinlock_t *x)
4450
static inline int arch_spin_trylock(arch_spinlock_t *x)
4551
{
4652
volatile unsigned int *a;
47-
int ret;
4853

4954
a = __ldcw_align(x);
50-
ret = __ldcw(a) != 0;
51-
52-
return ret;
55+
return __ldcw(a) != 0;
5356
}
5457

5558
/*

arch/parisc/include/uapi/asm/fcntl.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,19 @@
33
#define _PARISC_FCNTL_H
44

55
#define O_APPEND 000000010
6-
#define O_BLKSEEK 000000100 /* HPUX only */
76
#define O_CREAT 000000400 /* not fcntl */
87
#define O_EXCL 000002000 /* not fcntl */
98
#define O_LARGEFILE 000004000
109
#define __O_SYNC 000100000
1110
#define O_SYNC (__O_SYNC|O_DSYNC)
12-
#define O_NONBLOCK 000200004 /* HPUX has separate NDELAY & NONBLOCK */
11+
#define O_NONBLOCK 000200000
1312
#define O_NOCTTY 000400000 /* not fcntl */
14-
#define O_DSYNC 001000000 /* HPUX only */
15-
#define O_RSYNC 002000000 /* HPUX only */
13+
#define O_DSYNC 001000000
1614
#define O_NOATIME 004000000
1715
#define O_CLOEXEC 010000000 /* set close_on_exec */
1816

1917
#define O_DIRECTORY 000010000 /* must be a directory */
2018
#define O_NOFOLLOW 000000200 /* don't follow links */
21-
#define O_INVISIBLE 004000000 /* invisible I/O, for DMAPI/XDSM */
2219

2320
#define O_PATH 020000000
2421
#define __O_TMPFILE 040000000

arch/parisc/include/uapi/asm/mman.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#define MAP_STACK 0x40000 /* give out an address that is best suited for process/thread stacks */
2626
#define MAP_HUGETLB 0x80000 /* create a huge page mapping */
2727
#define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED which doesn't unmap underlying mapping */
28+
#define MAP_UNINITIALIZED 0 /* uninitialized anonymous mmap */
2829

2930
#define MS_SYNC 1 /* synchronous memory sync */
3031
#define MS_ASYNC 2 /* sync memory asynchronously */

0 commit comments

Comments
 (0)