Skip to content

Commit 552ebfe

Browse files
committed
Merge tag 'for-5.16/parisc-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull parisc updates from Helge Deller: "Lots of new features and fixes: - Added TOC (table of content) support, which is a debugging feature which is either initiated by pressing the TOC button or via command in the BMC. If pressed the Linux built-in KDB/KGDB will be called (Sven Schnelle) - Fix CONFIG_PREEMPT (Sven) - Fix unwinder on 64-bit kernels (Sven) - Various kgdb fixes (Sven) - Added KFENCE support (me) - Switch to ARCH_STACKWALK implementation (me) - Fix ptrace check on syscall return (me) - Fix kernel crash with fixmaps on PA1.x machines (me) - Move thread_info into task struct, aka CONFIG_THREAD_INFO_IN_TASK (me) - Updated defconfigs - Smaller cleanups, including Makefile cleanups (Masahiro Yamada), use kthread_run() macro (Cai Huoqing), use swap() macro (Yihao Han)" * tag 'for-5.16/parisc-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: (36 commits) parisc: Fix set_fixmap() on PA1.x CPUs parisc: Use swap() to swap values in setup_bootmem() parisc: Update defconfigs parisc: decompressor: clean up Makefile parisc: decompressor: remove repeated depenency of misc.o parisc: Remove unused constants from asm-offsets.c parisc/ftrace: use static key to enable/disable function graph tracer parisc/ftrace: set function trace function parisc: Make use of the helper macro kthread_run() parisc: mark xchg functions notrace parisc: enhance warning regarding usage of O_NONBLOCK parisc: Drop ifdef __KERNEL__ from non-uapi kernel headers parisc: Use PRIV_USER and PRIV_KERNEL in ptrace.h parisc: Use PRIV_USER in syscall.S parisc/kgdb: add kgdb_roundup() to make kgdb work with idle polling parisc: Move thread_info into task struct parisc: add support for TOC (transfer of control) parisc/firmware: add functions to retrieve TOC data parisc: add PIM TOC data structures parisc: move virt_map macro to assembly.h ...
2 parents 46f8763 + 6e866a4 commit 552ebfe

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+622
-321
lines changed

Documentation/features/core/thread-info-in-task/arch-support.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
| nds32: | ok |
2121
| nios2: | TODO |
2222
| openrisc: | TODO |
23-
| parisc: | TODO |
23+
| parisc: | ok |
2424
| powerpc: | ok |
2525
| riscv: | ok |
2626
| s390: | ok |

arch/parisc/Kconfig

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ config PARISC
1313
select ARCH_NO_SG_CHAIN
1414
select ARCH_SUPPORTS_HUGETLBFS if PA20
1515
select ARCH_SUPPORTS_MEMORY_FAILURE
16+
select ARCH_STACKWALK
17+
select HAVE_RELIABLE_STACKTRACE
1618
select DMA_OPS
1719
select RTC_CLASS
1820
select RTC_DRV_GENERIC
@@ -46,13 +48,15 @@ config PARISC
4648
select HAVE_ARCH_HASH
4749
select HAVE_ARCH_JUMP_LABEL
4850
select HAVE_ARCH_JUMP_LABEL_RELATIVE
51+
select HAVE_ARCH_KFENCE
4952
select HAVE_ARCH_SECCOMP_FILTER
5053
select HAVE_ARCH_TRACEHOOK
5154
select HAVE_REGS_AND_STACK_ACCESS_API
5255
select GENERIC_SCHED_CLOCK
5356
select HAVE_UNSTABLE_SCHED_CLOCK if SMP
5457
select LEGACY_TIMER_TICK
5558
select CPU_NO_EFFICIENT_FFS
59+
select THREAD_INFO_IN_TASK
5660
select NEED_DMA_MAP_STATE
5761
select NEED_SG_DMA_LENGTH
5862
select HAVE_ARCH_KGDB
@@ -252,11 +256,11 @@ config PARISC_PAGE_SIZE_4KB
252256

253257
config PARISC_PAGE_SIZE_16KB
254258
bool "16KB"
255-
depends on PA8X00 && BROKEN
259+
depends on PA8X00 && BROKEN && !KFENCE
256260

257261
config PARISC_PAGE_SIZE_64KB
258262
bool "64KB"
259-
depends on PA8X00 && BROKEN
263+
depends on PA8X00 && BROKEN && !KFENCE
260264

261265
endchoice
262266

@@ -288,6 +292,20 @@ config SMP
288292

289293
If you don't know what to do here, say N.
290294

295+
config TOC
296+
bool "Support TOC switch"
297+
default y if 64BIT || !SMP
298+
help
299+
Most PA-RISC machines have either a switch at the back of the machine
300+
or a command in BMC to trigger a TOC interrupt. If you say Y here a
301+
handler will be installed which will either show a backtrace on all
302+
CPUs, or enter a possible configured debugger like kgdb/kdb.
303+
304+
Note that with this option enabled, the kernel will use an additional 16KB
305+
per possible CPU as a special stack for the TOC handler.
306+
307+
If you don't want to debug the Kernel, say N.
308+
291309
config PARISC_CPU_TOPOLOGY
292310
bool "Support cpu topology definition"
293311
depends on SMP

arch/parisc/boot/compressed/Makefile

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ KCOV_INSTRUMENT := n
99
GCOV_PROFILE := n
1010
UBSAN_SANITIZE := n
1111

12+
OBJECTS := head.o real2.o firmware.o misc.o piggy.o
1213
targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2
1314
targets += vmlinux.bin.xz vmlinux.bin.lzma vmlinux.bin.lzo vmlinux.bin.lz4
14-
targets += misc.o piggy.o sizes.h head.o real2.o firmware.o
15+
targets += $(OBJECTS) sizes.h
1516
targets += real2.S firmware.c
1617

1718
KBUILD_CFLAGS := -D__KERNEL__ -O2 -DBOOTLOADER
@@ -23,10 +24,8 @@ ifndef CONFIG_64BIT
2324
KBUILD_CFLAGS += -mfast-indirect-calls
2425
endif
2526

26-
OBJECTS += $(obj)/head.o $(obj)/real2.o $(obj)/firmware.o $(obj)/misc.o $(obj)/piggy.o
27-
2827
LDFLAGS_vmlinux := -X -e startup --as-needed -T
29-
$(obj)/vmlinux: $(obj)/vmlinux.lds $(OBJECTS) $(LIBGCC) FORCE
28+
$(obj)/vmlinux: $(obj)/vmlinux.lds $(addprefix $(obj)/, $(OBJECTS)) $(LIBGCC) FORCE
3029
$(call if_changed,ld)
3130

3231
sed-sizes := -e 's/^\([0-9a-fA-F]*\) . \(__bss_start\|_end\|parisc_kernel_start\)$$/\#define SZ\2 0x\1/p'
@@ -52,8 +51,6 @@ $(obj)/real2.o: $(obj)/real2.S
5251
$(obj)/real2.S: $(srctree)/arch/$(SRCARCH)/kernel/real2.S
5352
$(call cmd,shipped)
5453

55-
$(obj)/misc.o: $(obj)/sizes.h
56-
5754
CPPFLAGS_vmlinux.lds += -I$(objtree)/$(obj) -DBOOTLOADER
5855
$(obj)/vmlinux.lds: $(obj)/sizes.h
5956

arch/parisc/configs/generic-32bit_defconfig

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ CONFIG_PCI_LBA=y
2222
CONFIG_MODULES=y
2323
CONFIG_MODULE_UNLOAD=y
2424
CONFIG_MODULE_FORCE_UNLOAD=y
25-
# CONFIG_BLK_DEV_BSG is not set
2625
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
2726
CONFIG_BINFMT_MISC=m
2827
CONFIG_NET=y
@@ -55,13 +54,14 @@ CONFIG_BLK_DEV_SD=y
5554
CONFIG_CHR_DEV_ST=y
5655
CONFIG_BLK_DEV_SR=y
5756
CONFIG_CHR_DEV_SG=y
57+
# CONFIG_BLK_DEV_BSG is not set
5858
CONFIG_SCSI_LASI700=y
5959
CONFIG_SCSI_SYM53C8XX_2=y
6060
CONFIG_SCSI_ZALON=y
6161
CONFIG_SCSI_DH=y
6262
CONFIG_ATA=y
63-
CONFIG_ATA_GENERIC=y
6463
CONFIG_PATA_NS87415=y
64+
CONFIG_ATA_GENERIC=y
6565
CONFIG_MD=y
6666
CONFIG_BLK_DEV_MD=m
6767
CONFIG_MD_LINEAR=m
@@ -212,7 +212,6 @@ CONFIG_NFS_FS=m
212212
CONFIG_NFSD=m
213213
CONFIG_NFSD_V3=y
214214
CONFIG_CIFS=m
215-
CONFIG_CIFS_WEAK_PW_HASH=y
216215
CONFIG_CIFS_XATTR=y
217216
CONFIG_CIFS_POSIX=y
218217
# CONFIG_CIFS_DEBUG is not set
@@ -221,16 +220,12 @@ CONFIG_CRYPTO_HMAC=y
221220
CONFIG_CRYPTO_MD5=y
222221
CONFIG_CRYPTO_MICHAEL_MIC=m
223222
CONFIG_CRYPTO_SHA1=y
224-
CONFIG_CRYPTO_TGR192=m
225223
CONFIG_CRYPTO_WP512=m
226-
CONFIG_CRYPTO_ANUBIS=m
227224
CONFIG_CRYPTO_BLOWFISH=m
228225
CONFIG_CRYPTO_CAST5=m
229226
CONFIG_CRYPTO_CAST6=m
230227
CONFIG_CRYPTO_DES=y
231-
CONFIG_CRYPTO_KHAZAD=m
232228
CONFIG_CRYPTO_SERPENT=m
233-
CONFIG_CRYPTO_TEA=m
234229
CONFIG_CRYPTO_TWOFISH=m
235230
CONFIG_CRYPTO_DEFLATE=y
236231
CONFIG_CRC_CCITT=m

arch/parisc/configs/generic-64bit_defconfig

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ CONFIG_TASKSTATS=y
88
CONFIG_TASK_DELAY_ACCT=y
99
CONFIG_TASK_XACCT=y
1010
CONFIG_TASK_IO_ACCOUNTING=y
11+
CONFIG_IKCONFIG=y
12+
CONFIG_IKCONFIG_PROC=y
1113
CONFIG_CGROUPS=y
1214
CONFIG_MEMCG=y
13-
CONFIG_MEMCG_SWAP=y
1415
CONFIG_CGROUP_PIDS=y
1516
CONFIG_CPUSETS=y
1617
CONFIG_RELAY=y
@@ -124,21 +125,21 @@ CONFIG_QLCNIC=m
124125
# CONFIG_NET_VENDOR_TI is not set
125126
# CONFIG_NET_VENDOR_VIA is not set
126127
# CONFIG_NET_VENDOR_WIZNET is not set
127-
CONFIG_MDIO_BITBANG=m
128128
CONFIG_PHYLIB=y
129129
CONFIG_BROADCOM_PHY=m
130130
CONFIG_CICADA_PHY=m
131131
CONFIG_DAVICOM_PHY=m
132132
CONFIG_ICPLUS_PHY=m
133-
CONFIG_LSI_ET1011C_PHY=m
134133
CONFIG_LXT_PHY=m
134+
CONFIG_LSI_ET1011C_PHY=m
135135
CONFIG_MARVELL_PHY=m
136136
CONFIG_NATIONAL_PHY=m
137137
CONFIG_QSEMI_PHY=m
138138
CONFIG_REALTEK_PHY=m
139139
CONFIG_SMSC_PHY=m
140140
CONFIG_STE10XP=m
141141
CONFIG_VITESSE_PHY=m
142+
CONFIG_MDIO_BITBANG=m
142143
CONFIG_SLIP=m
143144
# CONFIG_WLAN is not set
144145
CONFIG_INPUT_EVDEV=y
@@ -150,7 +151,6 @@ CONFIG_SERIO_SERPORT=m
150151
# CONFIG_HP_SDC is not set
151152
CONFIG_SERIO_RAW=m
152153
# CONFIG_LEGACY_PTYS is not set
153-
CONFIG_NOZOMI=m
154154
CONFIG_SERIAL_8250=y
155155
# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set
156156
CONFIG_SERIAL_8250_CONSOLE=y
@@ -160,6 +160,7 @@ CONFIG_SERIAL_8250_EXTENDED=y
160160
CONFIG_SERIAL_8250_MANY_PORTS=y
161161
CONFIG_SERIAL_8250_SHARE_IRQ=y
162162
CONFIG_SERIAL_JSM=m
163+
CONFIG_NOZOMI=m
163164
CONFIG_IPMI_HANDLER=y
164165
CONFIG_IPMI_DEVICE_INTERFACE=y
165166
CONFIG_IPMI_SI=y
@@ -188,9 +189,13 @@ CONFIG_AGP=y
188189
CONFIG_AGP_PARISC=y
189190
CONFIG_DRM=y
190191
CONFIG_DRM_RADEON=y
191-
CONFIG_FIRMWARE_EDID=y
192-
CONFIG_FB_MODE_HELPERS=y
193-
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
192+
CONFIG_FB=y
193+
CONFIG_FB_MATROX=y
194+
CONFIG_FB_MATROX_MYSTIQUE=y
195+
CONFIG_FB_MATROX_G=y
196+
CONFIG_FB_MATROX_I2C=y
197+
CONFIG_FB_MATROX_MAVEN=y
198+
CONFIG_FB_RADEON=y
194199
CONFIG_HIDRAW=y
195200
CONFIG_HID_PID=y
196201
CONFIG_USB_HIDDEV=y
@@ -202,7 +207,6 @@ CONFIG_UIO_SERCOS3=m
202207
CONFIG_UIO_PCI_GENERIC=m
203208
CONFIG_STAGING=y
204209
CONFIG_QLGE=m
205-
CONFIG_HP100=m
206210
CONFIG_EXT2_FS=y
207211
CONFIG_EXT2_FS_XATTR=y
208212
CONFIG_EXT2_FS_SECURITY=y
@@ -245,7 +249,6 @@ CONFIG_CRYPTO_PCBC=m
245249
CONFIG_CRYPTO_MD4=m
246250
CONFIG_CRYPTO_MD5=y
247251
CONFIG_CRYPTO_MICHAEL_MIC=m
248-
CONFIG_CRYPTO_ARC4=m
249252
CONFIG_CRYPTO_FCRYPT=m
250253
CONFIG_CRYPTO_DEFLATE=m
251254
# CONFIG_CRYPTO_HW is not set

arch/parisc/include/asm/assembly.h

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@
4242
#define ASM_ULONG_INSN .word
4343
#endif
4444

45+
/* Frame alignment for 32- and 64-bit */
46+
#define FRAME_ALIGN 64
47+
4548
#define CALLEE_SAVE_FRAME_SIZE (CALLEE_REG_FRAME_SIZE + CALLEE_FLOAT_FRAME_SIZE)
4649

4750
#ifdef CONFIG_PA20
@@ -58,6 +61,10 @@
5861
#define PA_ASM_LEVEL 1.1
5962
#endif
6063

64+
/* Privilege level field in the rightmost two bits of the IA queues */
65+
#define PRIV_USER 3
66+
#define PRIV_KERNEL 0
67+
6168
#ifdef __ASSEMBLY__
6269

6370
#ifdef CONFIG_64BIT
@@ -71,6 +78,7 @@
7178
#include <asm/types.h>
7279

7380
#include <asm/asmregs.h>
81+
#include <asm/psw.h>
7482

7583
sp = 30
7684
gp = 27
@@ -497,6 +505,30 @@
497505
nop /* 7 */
498506
.endm
499507

508+
/* Switch to virtual mapping, trashing only %r1 */
509+
.macro virt_map
510+
/* pcxt_ssm_bug */
511+
rsm PSW_SM_I, %r0 /* barrier for "Relied upon Translation */
512+
mtsp %r0, %sr4
513+
mtsp %r0, %sr5
514+
mtsp %r0, %sr6
515+
tovirt_r1 %r29
516+
load32 KERNEL_PSW, %r1
517+
518+
rsm PSW_SM_QUIET,%r0 /* second "heavy weight" ctl op */
519+
mtctl %r0, %cr17 /* Clear IIASQ tail */
520+
mtctl %r0, %cr17 /* Clear IIASQ head */
521+
mtctl %r1, %ipsw
522+
load32 4f, %r1
523+
mtctl %r1, %cr18 /* Set IIAOQ tail */
524+
ldo 4(%r1), %r1
525+
mtctl %r1, %cr18 /* Set IIAOQ head */
526+
rfir
527+
nop
528+
4:
529+
.endm
530+
531+
500532
/*
501533
* ASM_EXCEPTIONTABLE_ENTRY
502534
*

arch/parisc/include/asm/bitops.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,6 @@ static __inline__ int test_and_change_bit(int nr, volatile unsigned long * addr)
104104

105105
#include <asm-generic/bitops/non-atomic.h>
106106

107-
#ifdef __KERNEL__
108-
109107
/**
110108
* __ffs - find first bit in word. returns 0 to "BITS_PER_LONG-1".
111109
* @word: The word to search
@@ -205,16 +203,8 @@ static __inline__ int fls(unsigned int x)
205203
#include <asm-generic/bitops/hweight.h>
206204
#include <asm-generic/bitops/lock.h>
207205
#include <asm-generic/bitops/sched.h>
208-
209-
#endif /* __KERNEL__ */
210-
211206
#include <asm-generic/bitops/find.h>
212-
213-
#ifdef __KERNEL__
214-
215207
#include <asm-generic/bitops/le.h>
216208
#include <asm-generic/bitops/ext2-atomic-setbit.h>
217209

218-
#endif /* __KERNEL__ */
219-
220210
#endif /* _PARISC_BITOPS_H */

arch/parisc/include/asm/current.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
#ifndef _ASM_PARISC_CURRENT_H
3+
#define _ASM_PARISC_CURRENT_H
4+
5+
#include <asm/special_insns.h>
6+
7+
#ifndef __ASSEMBLY__
8+
struct task_struct;
9+
10+
static __always_inline struct task_struct *get_current(void)
11+
{
12+
return (struct task_struct *) mfctl(30);
13+
}
14+
15+
#define current get_current()
16+
17+
#endif /* __ASSEMBLY__ */
18+
19+
#endif /* _ASM_PARISC_CURRENT_H */

arch/parisc/include/asm/futex.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
#ifndef _ASM_PARISC_FUTEX_H
33
#define _ASM_PARISC_FUTEX_H
44

5-
#ifdef __KERNEL__
6-
75
#include <linux/futex.h>
86
#include <linux/uaccess.h>
97
#include <asm/atomic.h>
@@ -119,5 +117,4 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
119117
return 0;
120118
}
121119

122-
#endif /*__KERNEL__*/
123120
#endif /*_ASM_PARISC_FUTEX_H*/

arch/parisc/include/asm/ide.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
#ifndef __ASM_PARISC_IDE_H
1313
#define __ASM_PARISC_IDE_H
1414

15-
#ifdef __KERNEL__
16-
1715
/* Generic I/O and MEMIO string operations. */
1816

1917
#define __ide_insw insw
@@ -53,6 +51,4 @@ static __inline__ void __ide_mm_outsl(void __iomem *port, void *addr, u32 count)
5351
}
5452
}
5553

56-
#endif /* __KERNEL__ */
57-
5854
#endif /* __ASM_PARISC_IDE_H */

0 commit comments

Comments
 (0)