Skip to content

Commit 50471f8

Browse files
committed
Merge tag 'parisc-for-6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull parisc architecture updates from Helge Deller: "A fix which allows booting on the very old 710 workstations, and two fixes in the syscall entry/exit path which allow to execute 64-bit userspace binaries. Note that although we currently have a 64-bit (static) kernel to allow more than 4 GB physical RAM, there is no support for 64-bit userspace for parisc-linux yet, but Dave and Sven are making slowly progress to port and fix glibc and gcc. Summary: - Fix boot on 710 workstation by not reprogramming ASP chip - Fix 64bit userspace syscalls (64-bit userspace is still being developed) - minor code cleanups in asm/bug.h and perf_regs.c" * tag 'parisc-for-6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Do not reprogram affinitiy on ASP chip parisc: Drop linux/kernel.h include from asm/bug.h header parisc: remove unneeded semicolon in perf_regs.c parisc: entry.S: fix space adjustment on interruption for 64-bit userspace parisc: entry: set W bit for !compat tasks in syscall_restore_rfi() parisc: Drop padding fields and layers entries from inventory log
2 parents 0d1d440 + dca7da2 commit 50471f8

6 files changed

Lines changed: 19 additions & 15 deletions

File tree

arch/parisc/include/asm/bug.h

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

5-
#include <linux/kernel.h> /* for BUGFLAG_TAINT */
6-
75
/*
86
* Tell the user there is some problem.
97
* The offending file and line are encoded in the __bug_table section.

arch/parisc/kernel/asm-offsets.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,8 @@ int main(void)
258258
BLANK();
259259
DEFINE(TIF_BLOCKSTEP_PA_BIT, 31-TIF_BLOCKSTEP);
260260
DEFINE(TIF_SINGLESTEP_PA_BIT, 31-TIF_SINGLESTEP);
261+
DEFINE(TIF_32BIT_PA_BIT, 31-TIF_32BIT);
262+
261263
BLANK();
262264
DEFINE(ASM_PMD_SHIFT, PMD_SHIFT);
263265
DEFINE(ASM_PGDIR_SHIFT, PGDIR_SHIFT);

arch/parisc/kernel/drivers.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,11 +1043,7 @@ static __init int qemu_print_iodc_data(struct device *lin_dev, void *data)
10431043
(unsigned char)mod_path.path.bc[3],
10441044
(unsigned char)mod_path.path.bc[4],
10451045
(unsigned char)mod_path.path.bc[5]);
1046-
pr_cont(".mod = 0x%x ", mod_path.path.mod);
1047-
pr_cont(" },\n");
1048-
pr_cont("\t.layers = { 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x }\n",
1049-
mod_path.layers[0], mod_path.layers[1], mod_path.layers[2],
1050-
mod_path.layers[3], mod_path.layers[4], mod_path.layers[5]);
1046+
pr_cont(".mod = 0x%x }\n", mod_path.path.mod);
10511047
pr_cont("};\n");
10521048

10531049
pr_info("static struct pdc_iodc iodc_data_hpa_%08lx = {\n", hpa);
@@ -1067,8 +1063,6 @@ static __init int qemu_print_iodc_data(struct device *lin_dev, void *data)
10671063
DO(checksum);
10681064
DO(length);
10691065
#undef DO
1070-
pr_cont("\t/* pad: 0x%04x, 0x%04x */\n",
1071-
iodc_data.pad[0], iodc_data.pad[1]);
10721066
pr_cont("};\n");
10731067

10741068
pr_info("#define HPA_%08lx_num_addr %d\n", hpa, dev->num_addrs);

arch/parisc/kernel/entry.S

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,8 +1059,6 @@ ENTRY_CFI(intr_save) /* for os_hpmc */
10591059
STREG %r17, PT_IOR(%r29)
10601060

10611061
#if defined(CONFIG_64BIT)
1062-
b,n intr_save2
1063-
10641062
skip_save_ior:
10651063
/* We have a itlb miss, and when executing code above 4 Gb on ILP64, we
10661064
* need to adjust iasq/iaoq here in the same way we adjusted isr/ior
@@ -1069,10 +1067,17 @@ skip_save_ior:
10691067
bb,COND(>=),n %r8,PSW_W_BIT,intr_save2
10701068
LDREG PT_IASQ0(%r29), %r16
10711069
LDREG PT_IAOQ0(%r29), %r17
1072-
/* adjust iasq/iaoq */
1070+
/* adjust iasq0/iaoq0 */
10731071
space_adjust %r16,%r17,%r1
10741072
STREG %r16, PT_IASQ0(%r29)
10751073
STREG %r17, PT_IAOQ0(%r29)
1074+
1075+
LDREG PT_IASQ1(%r29), %r16
1076+
LDREG PT_IAOQ1(%r29), %r17
1077+
/* adjust iasq1/iaoq1 */
1078+
space_adjust %r16,%r17,%r1
1079+
STREG %r16, PT_IASQ1(%r29)
1080+
STREG %r17, PT_IAOQ1(%r29)
10761081
#else
10771082
skip_save_ior:
10781083
#endif
@@ -1841,6 +1846,10 @@ syscall_restore_rfi:
18411846
extru,= %r19,TIF_BLOCKSTEP_PA_BIT,1,%r0
18421847
depi -1,7,1,%r20 /* T bit */
18431848

1849+
#ifdef CONFIG_64BIT
1850+
extru,<> %r19,TIF_32BIT_PA_BIT,1,%r0
1851+
depi -1,4,1,%r20 /* W bit */
1852+
#endif
18441853
STREG %r20,TASK_PT_PSW(%r1)
18451854

18461855
/* Always store space registers, since sr3 can be changed (e.g. fork) */
@@ -1854,7 +1863,6 @@ syscall_restore_rfi:
18541863
STREG %r25,TASK_PT_IASQ0(%r1)
18551864
STREG %r25,TASK_PT_IASQ1(%r1)
18561865

1857-
/* XXX W bit??? */
18581866
/* Now if old D bit is clear, it means we didn't save all registers
18591867
* on syscall entry, so do that now. This only happens on TRACEME
18601868
* calls, or if someone attached to us while we were on a syscall.

arch/parisc/kernel/perf_regs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ u64 perf_reg_value(struct pt_regs *regs, int idx)
2727
return regs->ior;
2828
case PERF_REG_PARISC_IPSW: /* CR22 */
2929
return regs->ipsw;
30-
};
30+
}
3131
WARN_ON_ONCE((u32)idx >= PERF_REG_PARISC_MAX);
3232
return 0;
3333
}

drivers/parisc/gsc.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,9 @@ static int gsc_set_affinity_irq(struct irq_data *d, const struct cpumask *dest,
154154
gsc_dev->eim = ((u32) gsc_dev->gsc_irq.txn_addr) | gsc_dev->gsc_irq.txn_data;
155155

156156
/* switch IRQ's for devices below LASI/WAX to other CPU */
157-
gsc_writel(gsc_dev->eim, gsc_dev->hpa + OFFSET_IAR);
157+
/* ASP chip (svers 0x70) does not support reprogramming */
158+
if (gsc_dev->gsc->id.sversion != 0x70)
159+
gsc_writel(gsc_dev->eim, gsc_dev->hpa + OFFSET_IAR);
158160

159161
irq_data_update_effective_affinity(d, &tmask);
160162

0 commit comments

Comments
 (0)