Skip to content

Commit a2d616b

Browse files
committed
Merge tag 'for-5.15/parisc' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull parisc architecture updates from Helge Deller: - Fix a kernel crash when a signal is delivered to bad userspace stack - Fix fall-through warnings in math-emu code - Increase size of gcc stack frame check - Switch coding from 'pci_' to 'dma_' API - Make struct parisc_driver::remove() return void - Some parisc related Makefile changes - Minor cleanups, e.g. change to octal permissions, fix macro collisions, fix PMD_ORDER collision, replace spaces with tabs * tag 'for-5.15/parisc' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: math-emu: Fix fall-through warnings parisc: fix crash with signals and alloca parisc: Fix compile failure when building 64-bit kernel natively parisc: ccio-dma.c: Added tab instead of spaces parisc/parport_gsc: switch from 'pci_' to 'dma_' API parisc: move core-y in arch/parisc/Makefile to arch/parisc/Kbuild parisc: switch from 'pci_' to 'dma_' API parisc: Make struct parisc_driver::remove() return void parisc: remove unused arch/parisc/boot/install.sh and its phony target parisc: Rename PMD_ORDER to PMD_TABLE_ORDER parisc: math-emu: Avoid "fmt" macro collision parisc: Increase size of gcc stack frame check parisc: Replace symbolic permissions with octal permissions
2 parents b5d6d26 + 6f1fce5 commit a2d616b

28 files changed

Lines changed: 147 additions & 171 deletions

File tree

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,11 @@ ifeq ($(ARCH),sparc64)
404404
SRCARCH := sparc
405405
endif
406406

407+
# Additional ARCH settings for parisc
408+
ifeq ($(ARCH),parisc64)
409+
SRCARCH := parisc
410+
endif
411+
407412
export cross_compiling :=
408413
ifneq ($(SRCARCH),$(SUBARCH))
409414
cross_compiling := 1

arch/parisc/Kbuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
# SPDX-License-Identifier: GPL-2.0-only
2+
obj-y += mm/ kernel/ math-emu/

arch/parisc/Makefile

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,18 @@ CHECKFLAGS += -D__hppa__=1
2525
ifdef CONFIG_64BIT
2626
UTS_MACHINE := parisc64
2727
CHECKFLAGS += -D__LP64__=1
28-
CC_ARCHES = hppa64
2928
LD_BFD := elf64-hppa-linux
3029
else # 32-bit
31-
CC_ARCHES = hppa hppa2.0 hppa1.1
3230
LD_BFD := elf32-hppa-linux
3331
endif
3432

3533
# select defconfig based on actual architecture
36-
ifeq ($(shell uname -m),parisc64)
34+
ifeq ($(ARCH),parisc64)
3735
KBUILD_DEFCONFIG := generic-64bit_defconfig
36+
CC_ARCHES := hppa64
3837
else
3938
KBUILD_DEFCONFIG := generic-32bit_defconfig
39+
CC_ARCHES := hppa hppa2.0 hppa1.1
4040
endif
4141

4242
export LD_BFD
@@ -111,9 +111,6 @@ KBUILD_CFLAGS += $(cflags-y)
111111
LIBGCC := $(shell $(CC) -print-libgcc-file-name)
112112
export LIBGCC
113113

114-
kernel-y := mm/ kernel/ math-emu/
115-
116-
core-y += $(addprefix arch/parisc/, $(kernel-y))
117114
libs-y += arch/parisc/lib/ $(LIBGCC)
118115

119116
boot := arch/parisc/boot

arch/parisc/boot/Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,3 @@ $(obj)/bzImage: $(obj)/compressed/vmlinux FORCE
1515

1616
$(obj)/compressed/vmlinux: FORCE
1717
$(Q)$(MAKE) $(build)=$(obj)/compressed $@
18-
19-
install: $(CONFIGURE) $(obj)/bzImage
20-
sh -x $(srctree)/$(obj)/install.sh $(KERNELRELEASE) $(obj)/bzImage \
21-
System.map "$(INSTALL_PATH)"

arch/parisc/boot/install.sh

Lines changed: 0 additions & 65 deletions
This file was deleted.

arch/parisc/include/asm/parisc-device.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ struct parisc_driver {
3434
struct parisc_driver *next;
3535
char *name;
3636
const struct parisc_device_id *id_table;
37-
int (*probe) (struct parisc_device *dev); /* New device discovered */
38-
int (*remove) (struct parisc_device *dev);
37+
int (*probe)(struct parisc_device *dev); /* New device discovered */
38+
void (*remove)(struct parisc_device *dev);
3939
struct device_driver drv;
4040
};
4141

arch/parisc/include/asm/pgalloc.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address)
4848
{
4949
pmd_t *pmd;
5050

51-
pmd = (pmd_t *)__get_free_pages(GFP_PGTABLE_KERNEL, PMD_ORDER);
51+
pmd = (pmd_t *)__get_free_pages(GFP_PGTABLE_KERNEL, PMD_TABLE_ORDER);
5252
if (likely(pmd))
53-
memset ((void *)pmd, 0, PAGE_SIZE << PMD_ORDER);
53+
memset ((void *)pmd, 0, PAGE_SIZE << PMD_TABLE_ORDER);
5454
return pmd;
5555
}
5656

5757
static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
5858
{
59-
free_pages((unsigned long)pmd, PMD_ORDER);
59+
free_pages((unsigned long)pmd, PMD_TABLE_ORDER);
6060
}
6161
#endif
6262

arch/parisc/include/asm/pgtable.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ static inline void purge_tlb_entries(struct mm_struct *mm, unsigned long addr)
112112
#define KERNEL_INITIAL_SIZE (1 << KERNEL_INITIAL_ORDER)
113113

114114
#if CONFIG_PGTABLE_LEVELS == 3
115-
#define PMD_ORDER 1
115+
#define PMD_TABLE_ORDER 1
116116
#define PGD_ORDER 0
117117
#else
118118
#define PGD_ORDER 1
@@ -131,7 +131,7 @@ static inline void purge_tlb_entries(struct mm_struct *mm, unsigned long addr)
131131
#define PMD_SHIFT (PLD_SHIFT + BITS_PER_PTE)
132132
#define PMD_SIZE (1UL << PMD_SHIFT)
133133
#define PMD_MASK (~(PMD_SIZE-1))
134-
#define BITS_PER_PMD (PAGE_SHIFT + PMD_ORDER - BITS_PER_PMD_ENTRY)
134+
#define BITS_PER_PMD (PAGE_SHIFT + PMD_TABLE_ORDER - BITS_PER_PMD_ENTRY)
135135
#define PTRS_PER_PMD (1UL << BITS_PER_PMD)
136136
#else
137137
#define BITS_PER_PMD 0

arch/parisc/kernel/signal.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,12 @@ setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs,
237237
#endif
238238

239239
usp = (regs->gr[30] & ~(0x01UL));
240+
#ifdef CONFIG_64BIT
241+
if (is_compat_task()) {
242+
/* The gcc alloca implementation leaves garbage in the upper 32 bits of sp */
243+
usp = (compat_uint_t)usp;
244+
}
245+
#endif
240246
/*FIXME: frame_size parameter is unused, remove it. */
241247
frame = get_sigframe(&ksig->ka, usp, sizeof(*frame));
242248

arch/parisc/math-emu/decode_exc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
#define SIGNALCODE(signal, code) ((signal) << 24 | (code))
4747
#define copropbit 1<<31-2 /* bit position 2 */
4848
#define opclass 9 /* bits 21 & 22 */
49-
#define fmt 11 /* bits 19 & 20 */
49+
#define fmtbits 11 /* bits 19 & 20 */
5050
#define df 13 /* bits 17 & 18 */
5151
#define twobits 3 /* mask low-order 2 bits */
5252
#define fivebits 31 /* mask low-order 5 bits */
@@ -57,7 +57,7 @@
5757
#define Excp_instr(index) Instructionfield(Fpu_register[index])
5858
#define Clear_excp_register(index) Allexception(Fpu_register[index]) = 0
5959
#define Excp_format() \
60-
(current_ir >> ((current_ir>>opclass & twobits)==1 ? df : fmt) & twobits)
60+
(current_ir >> ((current_ir>>opclass & twobits) == 1 ? df : fmtbits) & twobits)
6161

6262
/* Miscellaneous definitions */
6363
#define Fpu_sgl(index) Fpu_register[index*2]

0 commit comments

Comments
 (0)