Skip to content
This repository was archived by the owner on Oct 3, 2024. It is now read-only.

Commit 320cd26

Browse files
committed
Merge remote-tracking branch 'vfio-upstream/for-linus' into gvt-staging
2 parents ebea934 + afe4e37 commit 320cd26

File tree

177 files changed

+2037
-1081
lines changed

Some content is hidden

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

177 files changed

+2037
-1081
lines changed

MAINTAINERS

+2-2
Original file line numberDiff line numberDiff line change
@@ -4976,6 +4976,7 @@ Q: http://patchwork.kernel.org/project/linux-clk/list/
49764976
T: git git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git
49774977
F: Documentation/devicetree/bindings/clock/
49784978
F: drivers/clk/
4979+
F: include/dt-bindings/clock/
49794980
F: include/linux/clk-pr*
49804981
F: include/linux/clk/
49814982
F: include/linux/of_clk.h
@@ -14432,9 +14433,8 @@ F: Documentation/devicetree/bindings/sound/nxp,tfa989x.yaml
1443214433
F: sound/soc/codecs/tfa989x.c
1443314434

1443414435
NXP-NCI NFC DRIVER
14435-
R: Charles Gorand <[email protected]>
1443614436
L: [email protected] (subscribers-only)
14437-
S: Supported
14437+
S: Orphan
1443814438
F: Documentation/devicetree/bindings/net/nfc/nxp,nci.yaml
1443914439
F: drivers/nfc/nxp-nci
1444014440

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
VERSION = 5
33
PATCHLEVEL = 19
44
SUBLEVEL = 0
5-
EXTRAVERSION = -rc4
5+
EXTRAVERSION = -rc5
66
NAME = Superb Owl
77

88
# *DOCUMENTATION*

arch/arm64/mm/hugetlbpage.c

+21-9
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,19 @@ static pte_t get_clear_contig(struct mm_struct *mm,
214214
return orig_pte;
215215
}
216216

217+
static pte_t get_clear_contig_flush(struct mm_struct *mm,
218+
unsigned long addr,
219+
pte_t *ptep,
220+
unsigned long pgsize,
221+
unsigned long ncontig)
222+
{
223+
pte_t orig_pte = get_clear_contig(mm, addr, ptep, pgsize, ncontig);
224+
struct vm_area_struct vma = TLB_FLUSH_VMA(mm, 0);
225+
226+
flush_tlb_range(&vma, addr, addr + (pgsize * ncontig));
227+
return orig_pte;
228+
}
229+
217230
/*
218231
* Changing some bits of contiguous entries requires us to follow a
219232
* Break-Before-Make approach, breaking the whole contiguous set
@@ -447,19 +460,20 @@ int huge_ptep_set_access_flags(struct vm_area_struct *vma,
447460
int ncontig, i;
448461
size_t pgsize = 0;
449462
unsigned long pfn = pte_pfn(pte), dpfn;
463+
struct mm_struct *mm = vma->vm_mm;
450464
pgprot_t hugeprot;
451465
pte_t orig_pte;
452466

453467
if (!pte_cont(pte))
454468
return ptep_set_access_flags(vma, addr, ptep, pte, dirty);
455469

456-
ncontig = find_num_contig(vma->vm_mm, addr, ptep, &pgsize);
470+
ncontig = find_num_contig(mm, addr, ptep, &pgsize);
457471
dpfn = pgsize >> PAGE_SHIFT;
458472

459473
if (!__cont_access_flags_changed(ptep, pte, ncontig))
460474
return 0;
461475

462-
orig_pte = get_clear_contig(vma->vm_mm, addr, ptep, pgsize, ncontig);
476+
orig_pte = get_clear_contig_flush(mm, addr, ptep, pgsize, ncontig);
463477

464478
/* Make sure we don't lose the dirty or young state */
465479
if (pte_dirty(orig_pte))
@@ -470,7 +484,7 @@ int huge_ptep_set_access_flags(struct vm_area_struct *vma,
470484

471485
hugeprot = pte_pgprot(pte);
472486
for (i = 0; i < ncontig; i++, ptep++, addr += pgsize, pfn += dpfn)
473-
set_pte_at(vma->vm_mm, addr, ptep, pfn_pte(pfn, hugeprot));
487+
set_pte_at(mm, addr, ptep, pfn_pte(pfn, hugeprot));
474488

475489
return 1;
476490
}
@@ -492,7 +506,7 @@ void huge_ptep_set_wrprotect(struct mm_struct *mm,
492506
ncontig = find_num_contig(mm, addr, ptep, &pgsize);
493507
dpfn = pgsize >> PAGE_SHIFT;
494508

495-
pte = get_clear_contig(mm, addr, ptep, pgsize, ncontig);
509+
pte = get_clear_contig_flush(mm, addr, ptep, pgsize, ncontig);
496510
pte = pte_wrprotect(pte);
497511

498512
hugeprot = pte_pgprot(pte);
@@ -505,17 +519,15 @@ void huge_ptep_set_wrprotect(struct mm_struct *mm,
505519
pte_t huge_ptep_clear_flush(struct vm_area_struct *vma,
506520
unsigned long addr, pte_t *ptep)
507521
{
522+
struct mm_struct *mm = vma->vm_mm;
508523
size_t pgsize;
509524
int ncontig;
510-
pte_t orig_pte;
511525

512526
if (!pte_cont(READ_ONCE(*ptep)))
513527
return ptep_clear_flush(vma, addr, ptep);
514528

515-
ncontig = find_num_contig(vma->vm_mm, addr, ptep, &pgsize);
516-
orig_pte = get_clear_contig(vma->vm_mm, addr, ptep, pgsize, ncontig);
517-
flush_tlb_range(vma, addr, addr + pgsize * ncontig);
518-
return orig_pte;
529+
ncontig = find_num_contig(mm, addr, ptep, &pgsize);
530+
return get_clear_contig_flush(mm, addr, ptep, pgsize, ncontig);
519531
}
520532

521533
static int __init hugetlbpage_init(void)

arch/parisc/kernel/asm-offsets.c

+5
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,13 @@ int main(void)
224224
BLANK();
225225
DEFINE(ASM_SIGFRAME_SIZE, PARISC_RT_SIGFRAME_SIZE);
226226
DEFINE(SIGFRAME_CONTEXT_REGS, offsetof(struct rt_sigframe, uc.uc_mcontext) - PARISC_RT_SIGFRAME_SIZE);
227+
#ifdef CONFIG_64BIT
227228
DEFINE(ASM_SIGFRAME_SIZE32, PARISC_RT_SIGFRAME_SIZE32);
228229
DEFINE(SIGFRAME_CONTEXT_REGS32, offsetof(struct compat_rt_sigframe, uc.uc_mcontext) - PARISC_RT_SIGFRAME_SIZE32);
230+
#else
231+
DEFINE(ASM_SIGFRAME_SIZE32, PARISC_RT_SIGFRAME_SIZE);
232+
DEFINE(SIGFRAME_CONTEXT_REGS32, offsetof(struct rt_sigframe, uc.uc_mcontext) - PARISC_RT_SIGFRAME_SIZE);
233+
#endif
229234
BLANK();
230235
DEFINE(ICACHE_BASE, offsetof(struct pdc_cache_info, ic_base));
231236
DEFINE(ICACHE_STRIDE, offsetof(struct pdc_cache_info, ic_stride));

arch/parisc/kernel/unaligned.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ static int emulate_ldw(struct pt_regs *regs, int toreg, int flop)
146146
" depw %%r0,31,2,%4\n"
147147
"1: ldw 0(%%sr1,%4),%0\n"
148148
"2: ldw 4(%%sr1,%4),%3\n"
149-
" subi 32,%4,%2\n"
149+
" subi 32,%2,%2\n"
150150
" mtctl %2,11\n"
151151
" vshd %0,%3,%0\n"
152152
"3: \n"

arch/powerpc/Kconfig

+4
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,10 @@ config ARCH_SUSPEND_NONZERO_CPU
358358
def_bool y
359359
depends on PPC_POWERNV || PPC_PSERIES
360360

361+
config ARCH_HAS_ADD_PAGES
362+
def_bool y
363+
depends on ARCH_ENABLE_MEMORY_HOTPLUG
364+
361365
config PPC_DCR_NATIVE
362366
bool
363367

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
#ifndef _ASM_POWERPC_BPF_PERF_EVENT_H
3+
#define _ASM_POWERPC_BPF_PERF_EVENT_H
4+
5+
#include <asm/ptrace.h>
6+
7+
typedef struct user_pt_regs bpf_user_pt_regs_t;
8+
9+
#endif /* _ASM_POWERPC_BPF_PERF_EVENT_H */

arch/powerpc/include/uapi/asm/bpf_perf_event.h

-9
This file was deleted.

arch/powerpc/kernel/prom_init_check.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# If you really need to reference something from prom_init.o add
1414
# it to the list below:
1515

16-
grep "^CONFIG_KASAN=y$" .config >/dev/null
16+
grep "^CONFIG_KASAN=y$" ${KCONFIG_CONFIG} >/dev/null
1717
if [ $? -eq 0 ]
1818
then
1919
MEM_FUNCS="__memcpy __memset"

arch/powerpc/mm/mem.c

+32-1
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,37 @@ void __ref arch_remove_linear_mapping(u64 start, u64 size)
105105
vm_unmap_aliases();
106106
}
107107

108+
/*
109+
* After memory hotplug the variables max_pfn, max_low_pfn and high_memory need
110+
* updating.
111+
*/
112+
static void update_end_of_memory_vars(u64 start, u64 size)
113+
{
114+
unsigned long end_pfn = PFN_UP(start + size);
115+
116+
if (end_pfn > max_pfn) {
117+
max_pfn = end_pfn;
118+
max_low_pfn = end_pfn;
119+
high_memory = (void *)__va(max_pfn * PAGE_SIZE - 1) + 1;
120+
}
121+
}
122+
123+
int __ref add_pages(int nid, unsigned long start_pfn, unsigned long nr_pages,
124+
struct mhp_params *params)
125+
{
126+
int ret;
127+
128+
ret = __add_pages(nid, start_pfn, nr_pages, params);
129+
if (ret)
130+
return ret;
131+
132+
/* update max_pfn, max_low_pfn and high_memory */
133+
update_end_of_memory_vars(start_pfn << PAGE_SHIFT,
134+
nr_pages << PAGE_SHIFT);
135+
136+
return ret;
137+
}
138+
108139
int __ref arch_add_memory(int nid, u64 start, u64 size,
109140
struct mhp_params *params)
110141
{
@@ -115,7 +146,7 @@ int __ref arch_add_memory(int nid, u64 start, u64 size,
115146
rc = arch_create_linear_mapping(nid, start, size, params);
116147
if (rc)
117148
return rc;
118-
rc = __add_pages(nid, start_pfn, nr_pages, params);
149+
rc = add_pages(nid, start_pfn, nr_pages, params);
119150
if (rc)
120151
arch_remove_linear_mapping(start, size);
121152
return rc;

arch/powerpc/mm/nohash/book3e_pgtable.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ int __ref map_kernel_page(unsigned long ea, unsigned long pa, pgprot_t prot)
9696
pgdp = pgd_offset_k(ea);
9797
p4dp = p4d_offset(pgdp, ea);
9898
if (p4d_none(*p4dp)) {
99-
pmdp = early_alloc_pgtable(PMD_TABLE_SIZE);
100-
p4d_populate(&init_mm, p4dp, pmdp);
99+
pudp = early_alloc_pgtable(PUD_TABLE_SIZE);
100+
p4d_populate(&init_mm, p4dp, pudp);
101101
}
102102
pudp = pud_offset(p4dp, ea);
103103
if (pud_none(*pudp)) {
@@ -106,7 +106,7 @@ int __ref map_kernel_page(unsigned long ea, unsigned long pa, pgprot_t prot)
106106
}
107107
pmdp = pmd_offset(pudp, ea);
108108
if (!pmd_present(*pmdp)) {
109-
ptep = early_alloc_pgtable(PAGE_SIZE);
109+
ptep = early_alloc_pgtable(PTE_TABLE_SIZE);
110110
pmd_populate_kernel(&init_mm, pmdp, ptep);
111111
}
112112
ptep = pte_offset_kernel(pmdp, ea);

arch/powerpc/sysdev/xive/spapr.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <linux/of_fdt.h>
1616
#include <linux/slab.h>
1717
#include <linux/spinlock.h>
18+
#include <linux/bitmap.h>
1819
#include <linux/cpumask.h>
1920
#include <linux/mm.h>
2021
#include <linux/delay.h>
@@ -57,7 +58,7 @@ static int __init xive_irq_bitmap_add(int base, int count)
5758
spin_lock_init(&xibm->lock);
5859
xibm->base = base;
5960
xibm->count = count;
60-
xibm->bitmap = kzalloc(xibm->count, GFP_KERNEL);
61+
xibm->bitmap = bitmap_zalloc(xibm->count, GFP_KERNEL);
6162
if (!xibm->bitmap) {
6263
kfree(xibm);
6364
return -ENOMEM;
@@ -75,7 +76,7 @@ static void xive_irq_bitmap_remove_all(void)
7576

7677
list_for_each_entry_safe(xibm, tmp, &xive_irq_bitmaps, list) {
7778
list_del(&xibm->list);
78-
kfree(xibm->bitmap);
79+
bitmap_free(xibm->bitmap);
7980
kfree(xibm);
8081
}
8182
}

arch/s390/Kconfig

-1
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,6 @@ config KEXEC
484484
config KEXEC_FILE
485485
bool "kexec file based system call"
486486
select KEXEC_CORE
487-
select BUILD_BIN2C
488487
depends on CRYPTO
489488
depends on CRYPTO_SHA256
490489
depends on CRYPTO_SHA256_S390

0 commit comments

Comments
 (0)