Skip to content

Commit da7a889

Browse files
committed
Merge remote-tracking branch 'stable/linux-6.10.y' into v6.10+
2 parents d56bab0 + 049be94 commit da7a889

436 files changed

Lines changed: 4628 additions & 3085 deletions

File tree

Some content is hidden

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

Documentation/admin-guide/cgroup-v2.rst

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1706,9 +1706,10 @@ PAGE_SIZE multiple when read back.
17061706
entries fault back in or are written out to disk.
17071707

17081708
memory.zswap.writeback
1709-
A read-write single value file. The default value is "1". The
1710-
initial value of the root cgroup is 1, and when a new cgroup is
1711-
created, it inherits the current value of its parent.
1709+
A read-write single value file. The default value is "1".
1710+
Note that this setting is hierarchical, i.e. the writeback would be
1711+
implicitly disabled for child cgroups if the upper hierarchy
1712+
does so.
17121713

17131714
When this is set to 0, all swapping attempts to swapping devices
17141715
are disabled. This included both zswap writebacks, and swapping due
@@ -2346,8 +2347,12 @@ Cpuset Interface Files
23462347
is always a subset of it.
23472348

23482349
Users can manually set it to a value that is different from
2349-
"cpuset.cpus". The only constraint in setting it is that the
2350-
list of CPUs must be exclusive with respect to its sibling.
2350+
"cpuset.cpus". One constraint in setting it is that the list of
2351+
CPUs must be exclusive with respect to "cpuset.cpus.exclusive"
2352+
of its sibling. If "cpuset.cpus.exclusive" of a sibling cgroup
2353+
isn't set, its "cpuset.cpus" value, if set, cannot be a subset
2354+
of it to leave at least one CPU available when the exclusive
2355+
CPUs are taken away.
23512356

23522357
For a parent cgroup, any one of its exclusive CPUs can only
23532358
be distributed to at most one of its child cgroups. Having an

Documentation/devicetree/bindings/nvmem/xlnx,zynqmp-nvmem.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ unevaluatedProperties: false
2828

2929
examples:
3030
- |
31-
nvmem {
31+
soc-nvmem {
3232
compatible = "xlnx,zynqmp-nvmem-fw";
3333
nvmem-layout {
3434
compatible = "fixed-layout";

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22
VERSION = 6
33
PATCHLEVEL = 10
4-
SUBLEVEL = 9
4+
SUBLEVEL = 10
55
EXTRAVERSION =
66
NAME = Baby Opossum Posse
77

arch/arm64/include/asm/acpi.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,18 @@ static inline u32 get_acpi_id_for_cpu(unsigned int cpu)
119119
return acpi_cpu_get_madt_gicc(cpu)->uid;
120120
}
121121

122+
static inline int get_cpu_for_acpi_id(u32 uid)
123+
{
124+
int cpu;
125+
126+
for (cpu = 0; cpu < nr_cpu_ids; cpu++)
127+
if (acpi_cpu_get_madt_gicc(cpu) &&
128+
uid == get_acpi_id_for_cpu(cpu))
129+
return cpu;
130+
131+
return -EINVAL;
132+
}
133+
122134
static inline void arch_fix_phys_package_id(int num, u32 slot) { }
123135
void __init acpi_init_cpus(void);
124136
int apei_claim_sea(struct pt_regs *regs);

arch/arm64/kernel/acpi_numa.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,6 @@ int __init acpi_numa_get_nid(unsigned int cpu)
3434
return acpi_early_node_map[cpu];
3535
}
3636

37-
static inline int get_cpu_for_acpi_id(u32 uid)
38-
{
39-
int cpu;
40-
41-
for (cpu = 0; cpu < nr_cpu_ids; cpu++)
42-
if (uid == get_acpi_id_for_cpu(cpu))
43-
return cpu;
44-
45-
return -EINVAL;
46-
}
47-
4837
static int __init acpi_parse_gicc_pxm(union acpi_subtable_headers *header,
4938
const unsigned long end)
5039
{

arch/loongarch/include/asm/hugetlb.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ static inline pte_t huge_ptep_get_and_clear(struct mm_struct *mm,
3434
unsigned long addr, pte_t *ptep)
3535
{
3636
pte_t clear;
37-
pte_t pte = *ptep;
37+
pte_t pte = ptep_get(ptep);
3838

3939
pte_val(clear) = (unsigned long)invalid_pte_table;
4040
set_pte_at(mm, addr, ptep, clear);
@@ -65,7 +65,7 @@ static inline int huge_ptep_set_access_flags(struct vm_area_struct *vma,
6565
pte_t *ptep, pte_t pte,
6666
int dirty)
6767
{
68-
int changed = !pte_same(*ptep, pte);
68+
int changed = !pte_same(ptep_get(ptep), pte);
6969

7070
if (changed) {
7171
set_pte_at(vma->vm_mm, addr, ptep, pte);

arch/loongarch/include/asm/kfence.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ static inline bool kfence_protect_page(unsigned long addr, bool protect)
5353
{
5454
pte_t *pte = virt_to_kpte(addr);
5555

56-
if (WARN_ON(!pte) || pte_none(*pte))
56+
if (WARN_ON(!pte) || pte_none(ptep_get(pte)))
5757
return false;
5858

5959
if (protect)
60-
set_pte(pte, __pte(pte_val(*pte) & ~(_PAGE_VALID | _PAGE_PRESENT)));
60+
set_pte(pte, __pte(pte_val(ptep_get(pte)) & ~(_PAGE_VALID | _PAGE_PRESENT)));
6161
else
62-
set_pte(pte, __pte(pte_val(*pte) | (_PAGE_VALID | _PAGE_PRESENT)));
62+
set_pte(pte, __pte(pte_val(ptep_get(pte)) | (_PAGE_VALID | _PAGE_PRESENT)));
6363

6464
preempt_disable();
6565
local_flush_tlb_one(addr);

arch/loongarch/include/asm/pgtable.h

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)];
106106
#define KFENCE_AREA_START (VMEMMAP_END + 1)
107107
#define KFENCE_AREA_END (KFENCE_AREA_START + KFENCE_AREA_SIZE - 1)
108108

109+
#define ptep_get(ptep) READ_ONCE(*(ptep))
110+
#define pmdp_get(pmdp) READ_ONCE(*(pmdp))
111+
109112
#define pte_ERROR(e) \
110113
pr_err("%s:%d: bad pte %016lx.\n", __FILE__, __LINE__, pte_val(e))
111114
#ifndef __PAGETABLE_PMD_FOLDED
@@ -147,19 +150,19 @@ static inline int p4d_present(p4d_t p4d)
147150
return p4d_val(p4d) != (unsigned long)invalid_pud_table;
148151
}
149152

150-
static inline void p4d_clear(p4d_t *p4dp)
151-
{
152-
p4d_val(*p4dp) = (unsigned long)invalid_pud_table;
153-
}
154-
155153
static inline pud_t *p4d_pgtable(p4d_t p4d)
156154
{
157155
return (pud_t *)p4d_val(p4d);
158156
}
159157

160158
static inline void set_p4d(p4d_t *p4d, p4d_t p4dval)
161159
{
162-
*p4d = p4dval;
160+
WRITE_ONCE(*p4d, p4dval);
161+
}
162+
163+
static inline void p4d_clear(p4d_t *p4dp)
164+
{
165+
set_p4d(p4dp, __p4d((unsigned long)invalid_pud_table));
163166
}
164167

165168
#define p4d_phys(p4d) PHYSADDR(p4d_val(p4d))
@@ -193,17 +196,20 @@ static inline int pud_present(pud_t pud)
193196
return pud_val(pud) != (unsigned long)invalid_pmd_table;
194197
}
195198

196-
static inline void pud_clear(pud_t *pudp)
199+
static inline pmd_t *pud_pgtable(pud_t pud)
197200
{
198-
pud_val(*pudp) = ((unsigned long)invalid_pmd_table);
201+
return (pmd_t *)pud_val(pud);
199202
}
200203

201-
static inline pmd_t *pud_pgtable(pud_t pud)
204+
static inline void set_pud(pud_t *pud, pud_t pudval)
202205
{
203-
return (pmd_t *)pud_val(pud);
206+
WRITE_ONCE(*pud, pudval);
204207
}
205208

206-
#define set_pud(pudptr, pudval) do { *(pudptr) = (pudval); } while (0)
209+
static inline void pud_clear(pud_t *pudp)
210+
{
211+
set_pud(pudp, __pud((unsigned long)invalid_pmd_table));
212+
}
207213

208214
#define pud_phys(pud) PHYSADDR(pud_val(pud))
209215
#define pud_page(pud) (pfn_to_page(pud_phys(pud) >> PAGE_SHIFT))
@@ -231,12 +237,15 @@ static inline int pmd_present(pmd_t pmd)
231237
return pmd_val(pmd) != (unsigned long)invalid_pte_table;
232238
}
233239

234-
static inline void pmd_clear(pmd_t *pmdp)
240+
static inline void set_pmd(pmd_t *pmd, pmd_t pmdval)
235241
{
236-
pmd_val(*pmdp) = ((unsigned long)invalid_pte_table);
242+
WRITE_ONCE(*pmd, pmdval);
237243
}
238244

239-
#define set_pmd(pmdptr, pmdval) do { *(pmdptr) = (pmdval); } while (0)
245+
static inline void pmd_clear(pmd_t *pmdp)
246+
{
247+
set_pmd(pmdp, __pmd((unsigned long)invalid_pte_table));
248+
}
240249

241250
#define pmd_phys(pmd) PHYSADDR(pmd_val(pmd))
242251

@@ -314,7 +323,8 @@ extern void paging_init(void);
314323

315324
static inline void set_pte(pte_t *ptep, pte_t pteval)
316325
{
317-
*ptep = pteval;
326+
WRITE_ONCE(*ptep, pteval);
327+
318328
if (pte_val(pteval) & _PAGE_GLOBAL) {
319329
pte_t *buddy = ptep_buddy(ptep);
320330
/*
@@ -341,16 +351,16 @@ static inline void set_pte(pte_t *ptep, pte_t pteval)
341351
: [buddy] "+m" (buddy->pte), [tmp] "=&r" (tmp)
342352
: [global] "r" (page_global));
343353
#else /* !CONFIG_SMP */
344-
if (pte_none(*buddy))
345-
pte_val(*buddy) = pte_val(*buddy) | _PAGE_GLOBAL;
354+
if (pte_none(ptep_get(buddy)))
355+
WRITE_ONCE(*buddy, __pte(pte_val(ptep_get(buddy)) | _PAGE_GLOBAL));
346356
#endif /* CONFIG_SMP */
347357
}
348358
}
349359

350360
static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
351361
{
352362
/* Preserve global status for the pair */
353-
if (pte_val(*ptep_buddy(ptep)) & _PAGE_GLOBAL)
363+
if (pte_val(ptep_get(ptep_buddy(ptep))) & _PAGE_GLOBAL)
354364
set_pte(ptep, __pte(_PAGE_GLOBAL));
355365
else
356366
set_pte(ptep, __pte(0));
@@ -589,7 +599,7 @@ static inline pmd_t pmd_mkinvalid(pmd_t pmd)
589599
static inline pmd_t pmdp_huge_get_and_clear(struct mm_struct *mm,
590600
unsigned long address, pmd_t *pmdp)
591601
{
592-
pmd_t old = *pmdp;
602+
pmd_t old = pmdp_get(pmdp);
593603

594604
pmd_clear(pmdp);
595605

arch/loongarch/kernel/relocate.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include <asm/bootinfo.h>
1414
#include <asm/early_ioremap.h>
1515
#include <asm/inst.h>
16+
#include <asm/io.h>
1617
#include <asm/sections.h>
1718
#include <asm/setup.h>
1819

@@ -170,7 +171,7 @@ unsigned long __init relocate_kernel(void)
170171
unsigned long kernel_length;
171172
unsigned long random_offset = 0;
172173
void *location_new = _text; /* Default to original kernel start */
173-
char *cmdline = early_ioremap(fw_arg1, COMMAND_LINE_SIZE); /* Boot command line is passed in fw_arg1 */
174+
char *cmdline = early_memremap_ro(fw_arg1, COMMAND_LINE_SIZE); /* Boot command line is passed in fw_arg1 */
174175

175176
strscpy(boot_command_line, cmdline, COMMAND_LINE_SIZE);
176177

@@ -182,6 +183,7 @@ unsigned long __init relocate_kernel(void)
182183
random_offset = (unsigned long)location_new - (unsigned long)(_text);
183184
#endif
184185
reloc_offset = (unsigned long)_text - VMLINUX_LOAD_ADDRESS;
186+
early_memunmap(cmdline, COMMAND_LINE_SIZE);
185187

186188
if (random_offset) {
187189
kernel_length = (long)(_end) - (long)(_text);

arch/loongarch/kvm/mmu.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -695,19 +695,19 @@ static int host_pfn_mapping_level(struct kvm *kvm, gfn_t gfn,
695695
* value) and then p*d_offset() walks into the target huge page instead
696696
* of the old page table (sees the new value).
697697
*/
698-
pgd = READ_ONCE(*pgd_offset(kvm->mm, hva));
698+
pgd = pgdp_get(pgd_offset(kvm->mm, hva));
699699
if (pgd_none(pgd))
700700
goto out;
701701

702-
p4d = READ_ONCE(*p4d_offset(&pgd, hva));
702+
p4d = p4dp_get(p4d_offset(&pgd, hva));
703703
if (p4d_none(p4d) || !p4d_present(p4d))
704704
goto out;
705705

706-
pud = READ_ONCE(*pud_offset(&p4d, hva));
706+
pud = pudp_get(pud_offset(&p4d, hva));
707707
if (pud_none(pud) || !pud_present(pud))
708708
goto out;
709709

710-
pmd = READ_ONCE(*pmd_offset(&pud, hva));
710+
pmd = pmdp_get(pmd_offset(&pud, hva));
711711
if (pmd_none(pmd) || !pmd_present(pmd))
712712
goto out;
713713

0 commit comments

Comments
 (0)