Skip to content

Commit 03785a6

Browse files
committed
Merge tag 's390-6.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 updates from Vasily Gorbik: - Make use of the IBM z16 processor activity instrumentation facility extension to count neural network processor assist operations: add a new PMU device driver so that perf can make use of this. - Rework memcpy_real() to avoid DAT-off mode. - Rework absolute lowcore access code. - Various small fixes and improvements all over the code. * tag 's390-6.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/pci: remove unused bus_next field from struct zpci_dev s390/cio: remove unused ccw_device_force_console() declaration s390/pai: Add support for PAI Extension 1 NNPA counters s390/mm: fix no previous prototype warnings in maccess.c s390/mm: uninline copy_oldmem_kernel() function s390/mm,ptdump: add real memory copy page markers s390/mm: rework memcpy_real() to avoid DAT-off mode s390/dump: save IPL CPU registers once DAT is available s390/pci: convert high_memory to physical address s390/smp,ptdump: add absolute lowcore markers s390/smp: rework absolute lowcore access s390/smp: call smp_reinit_ipl_cpu() before scheduler is available s390/ptdump: add missing amode31 markers s390/mm: split lowcore pages with set_memory_4k() s390/mm: remove unused access parameter from do_fault_error() s390/delay: sync comment within __delay() with reality s390: move from strlcpy with unused retval to strscpy
2 parents 2e64066 + 8fb65e0 commit 03785a6

Some content is hidden

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

42 files changed

+1176
-263
lines changed

arch/s390/boot/startup.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,14 @@
1010
#include <asm/sclp.h>
1111
#include <asm/diag.h>
1212
#include <asm/uv.h>
13+
#include <asm/abs_lowcore.h>
1314
#include "decompressor.h"
1415
#include "boot.h"
1516
#include "uv.h"
1617

1718
unsigned long __bootdata_preserved(__kaslr_offset);
19+
unsigned long __bootdata_preserved(__abs_lowcore);
20+
unsigned long __bootdata_preserved(__memcpy_real_area);
1821
unsigned long __bootdata(__amode31_base);
1922
unsigned long __bootdata_preserved(VMALLOC_START);
2023
unsigned long __bootdata_preserved(VMALLOC_END);
@@ -180,7 +183,10 @@ static void setup_kernel_memory_layout(void)
180183
/* force vmalloc and modules below kasan shadow */
181184
vmax = min(vmax, KASAN_SHADOW_START);
182185
#endif
183-
MODULES_END = vmax;
186+
__memcpy_real_area = round_down(vmax - PAGE_SIZE, PAGE_SIZE);
187+
__abs_lowcore = round_down(__memcpy_real_area - ABS_LOWCORE_MAP_SIZE,
188+
sizeof(struct lowcore));
189+
MODULES_END = round_down(__abs_lowcore, _SEGMENT_SIZE);
184190
MODULES_VADDR = MODULES_END - MODULES_LEN;
185191
VMALLOC_END = MODULES_VADDR;
186192

arch/s390/include/asm/abs_lowcore.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
#ifndef _ASM_S390_ABS_LOWCORE_H
3+
#define _ASM_S390_ABS_LOWCORE_H
4+
5+
#include <asm/lowcore.h>
6+
7+
#define ABS_LOWCORE_MAP_SIZE (NR_CPUS * sizeof(struct lowcore))
8+
9+
extern unsigned long __abs_lowcore;
10+
extern bool abs_lowcore_mapped;
11+
12+
struct lowcore *get_abs_lowcore(unsigned long *flags);
13+
void put_abs_lowcore(struct lowcore *lc, unsigned long flags);
14+
int abs_lowcore_map(int cpu, struct lowcore *lc, bool alloc);
15+
void abs_lowcore_unmap(int cpu);
16+
17+
#endif /* _ASM_S390_ABS_LOWCORE_H */

arch/s390/include/asm/ccwdev.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@ extern struct ccw_device *ccw_device_create_console(struct ccw_driver *);
214214
extern void ccw_device_destroy_console(struct ccw_device *);
215215
extern int ccw_device_enable_console(struct ccw_device *);
216216
extern void ccw_device_wait_idle(struct ccw_device *);
217-
extern int ccw_device_force_console(struct ccw_device *);
218217

219218
extern void *ccw_device_dma_zalloc(struct ccw_device *cdev, size_t size);
220219
extern void ccw_device_dma_free(struct ccw_device *cdev,

arch/s390/include/asm/ctl_reg.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ union ctlreg0 {
9595
Interruption-Filtering Override */
9696
unsigned long : 3;
9797
unsigned long ccc : 1; /* Cryptography counter control */
98-
unsigned long : 18;
98+
unsigned long pec : 1; /* PAI extension control */
99+
unsigned long : 17;
99100
unsigned long : 3;
100101
unsigned long lap : 1; /* Low-address-protection control */
101102
unsigned long : 4;

arch/s390/include/asm/lowcore.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,9 @@ struct lowcore {
203203
__u8 pad_0x1400[0x1500-0x1400]; /* 0x1400 */
204204
/* Cryptography-counter designation */
205205
__u64 ccd; /* 0x1500 */
206-
__u8 pad_0x1508[0x1800-0x1508]; /* 0x1508 */
206+
/* AI-extension counter designation */
207+
__u64 aicd; /* 0x1508 */
208+
__u8 pad_0x1510[0x1800-0x1510]; /* 0x1510 */
207209

208210
/* Transaction abort diagnostic block */
209211
struct pgm_tdb pgm_tdb; /* 0x1800 */

arch/s390/include/asm/maccess.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
#ifndef __ASM_S390_MACCESS_H
3+
#define __ASM_S390_MACCESS_H
4+
5+
#include <linux/types.h>
6+
7+
struct iov_iter;
8+
9+
extern unsigned long __memcpy_real_area;
10+
void memcpy_real_init(void);
11+
size_t memcpy_real_iter(struct iov_iter *iter, unsigned long src, size_t count);
12+
int memcpy_real(void *dest, unsigned long src, size_t count);
13+
#ifdef CONFIG_CRASH_DUMP
14+
int copy_oldmem_kernel(void *dst, unsigned long src, size_t count);
15+
#endif
16+
17+
#endif /* __ASM_S390_MACCESS_H */

arch/s390/include/asm/os_info.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,6 @@ u32 os_info_csum(struct os_info *os_info);
4141

4242
#ifdef CONFIG_CRASH_DUMP
4343
void *os_info_old_entry(int nr, unsigned long *size);
44-
size_t copy_oldmem_iter(struct iov_iter *iter, unsigned long src, size_t count);
45-
46-
static inline int copy_oldmem_kernel(void *dst, unsigned long src, size_t count)
47-
{
48-
struct iov_iter iter;
49-
struct kvec kvec;
50-
51-
kvec.iov_base = dst;
52-
kvec.iov_len = count;
53-
iov_iter_kvec(&iter, WRITE, &kvec, 1, count);
54-
if (copy_oldmem_iter(&iter, src, count) < count)
55-
return -EFAULT;
56-
return 0;
57-
}
5844
#else
5945
static inline void *os_info_old_entry(int nr, unsigned long *size)
6046
{

arch/s390/include/asm/pai.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ struct qpaci_info_block {
1717
struct {
1818
u64 : 8;
1919
u64 num_cc : 8; /* # of supported crypto counters */
20-
u64 : 48;
20+
u64 : 9;
21+
u64 num_nnpa : 7; /* # of supported NNPA counters */
22+
u64 : 32;
2123
};
2224
};
2325

@@ -42,6 +44,8 @@ static inline int qpaci(struct qpaci_info_block *info)
4244
#define PAI_CRYPTO_BASE 0x1000 /* First event number */
4345
#define PAI_CRYPTO_MAXCTR 256 /* Max # of event counters */
4446
#define PAI_CRYPTO_KERNEL_OFFSET 2048
47+
#define PAI_NNPA_BASE 0x1800 /* First event number */
48+
#define PAI_NNPA_MAXCTR 128 /* Max # of event counters */
4549

4650
DECLARE_STATIC_KEY_FALSE(pai_key);
4751

arch/s390/include/asm/pci.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ struct zpci_bus {
117117
struct zpci_dev {
118118
struct zpci_bus *zbus;
119119
struct list_head entry; /* list of all zpci_devices, needed for hotplug, etc. */
120-
struct list_head bus_next;
121120
struct kref kref;
122121
struct hotplug_slot hotplug_slot;
123122

arch/s390/include/asm/pgtable.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1777,6 +1777,10 @@ static inline swp_entry_t __swp_entry(unsigned long type, unsigned long offset)
17771777

17781778
extern int vmem_add_mapping(unsigned long start, unsigned long size);
17791779
extern void vmem_remove_mapping(unsigned long start, unsigned long size);
1780+
extern int __vmem_map_4k_page(unsigned long addr, unsigned long phys, pgprot_t prot, bool alloc);
1781+
extern int vmem_map_4k_page(unsigned long addr, unsigned long phys, pgprot_t prot);
1782+
extern void vmem_unmap_4k_page(unsigned long addr);
1783+
extern pte_t *vmem_get_alloc_pte(unsigned long addr, bool alloc);
17801784
extern int s390_enable_sie(void);
17811785
extern int s390_enable_skey(void);
17821786
extern void s390_reset_cmma(struct mm_struct *mm);

0 commit comments

Comments
 (0)