Skip to content

Commit b618703

Browse files
committed
Merge branch 'linux-6.6.y' of https://github.com/deepin-community/kernel into linux-6.6.y
Signed-off-by: gfdgd_xi <3025613752@qq.com>
2 parents 224b25b + fdb52f5 commit b618703

675 files changed

Lines changed: 12398 additions & 3675 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/hwmon/aht10.rst‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ Supported chips:
2020

2121
English: http://www.aosong.com/userfiles/files/media/Data%20Sheet%20AHT20.pdf
2222

23+
* Aosong DHT20
24+
25+
Prefix: 'dht20'
26+
27+
Addresses scanned: None
28+
29+
Datasheet: https://www.digikey.co.nz/en/htmldatasheets/production/9184855/0/0/1/101020932
30+
2331
Author: Johannes Cornelis Draaijer <jcdra1@gmail.com>
2432

2533

@@ -33,7 +41,7 @@ The address of this i2c device may only be 0x38
3341
Special Features
3442
----------------
3543

36-
AHT20 has additional CRC8 support which is sent as the last byte of the sensor
44+
AHT20, DHT20 has additional CRC8 support which is sent as the last byte of the sensor
3745
values.
3846

3947
Usage Notes

‎Makefile‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22
VERSION = 6
33
PATCHLEVEL = 6
4-
SUBLEVEL = 129
4+
SUBLEVEL = 130
55
EXTRAVERSION =
66
NAME = Pinguïn Aangedreven
77

@@ -1374,13 +1374,13 @@ ifneq ($(wildcard $(resolve_btfids_O)),)
13741374
$(Q)$(MAKE) -sC $(srctree)/tools/bpf/resolve_btfids O=$(resolve_btfids_O) clean
13751375
endif
13761376

1377-
PHONY += objtool_clean
1377+
PHONY += objtool_clean objtool_mrproper
13781378

13791379
objtool_O = $(abspath $(objtree))/tools/objtool
13801380

1381-
objtool_clean:
1381+
objtool_clean objtool_mrproper:
13821382
ifneq ($(wildcard $(objtool_O)),)
1383-
$(Q)$(MAKE) -sC $(abs_srctree)/tools/objtool O=$(objtool_O) srctree=$(abs_srctree) clean
1383+
$(Q)$(MAKE) -sC $(abs_srctree)/tools/objtool O=$(objtool_O) srctree=$(abs_srctree) $(patsubst objtool_%,%,$@)
13841384
endif
13851385

13861386
tools/: FORCE
@@ -1547,7 +1547,7 @@ PHONY += $(mrproper-dirs) mrproper
15471547
$(mrproper-dirs):
15481548
$(Q)$(MAKE) $(clean)=$(patsubst _mrproper_%,%,$@)
15491549

1550-
mrproper: clean $(mrproper-dirs)
1550+
mrproper: clean objtool_mrproper $(mrproper-dirs)
15511551
$(call cmd,rmfiles)
15521552
@find . $(RCS_FIND_IGNORE) \
15531553
\( -name '*.rmeta' \) \

‎arch/arm/include/asm/string.h‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,17 @@ static inline void *memset32(uint32_t *p, uint32_t v, __kernel_size_t n)
3939
}
4040

4141
#define __HAVE_ARCH_MEMSET64
42-
extern void *__memset64(uint64_t *, uint32_t low, __kernel_size_t, uint32_t hi);
42+
extern void *__memset64(uint64_t *, uint32_t first, __kernel_size_t, uint32_t second);
4343
static inline void *memset64(uint64_t *p, uint64_t v, __kernel_size_t n)
4444
{
45-
if (IS_ENABLED(CONFIG_CPU_LITTLE_ENDIAN))
46-
return __memset64(p, v, n * 8, v >> 32);
47-
else
48-
return __memset64(p, v >> 32, n * 8, v);
45+
union {
46+
uint64_t val;
47+
struct {
48+
uint32_t first, second;
49+
};
50+
} word = { .val = v };
51+
52+
return __memset64(p, word.first, n * 8, word.second);
4953
}
5054

5155
/*

‎arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,6 @@
245245
regulator-min-microvolt = <1800000>;
246246
regulator-max-microvolt = <1800000>;
247247
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
248-
regulator-boot-on;
249248
};
250249

251250
vreg_l14a_1p88: ldo14 {

‎arch/arm64/boot/dts/rockchip/rk3568.dtsi‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
<0x0 0xf2000000 0x0 0x00100000>;
9898
ranges = <0x01000000 0x0 0xf2100000 0x0 0xf2100000 0x0 0x00100000>,
9999
<0x02000000 0x0 0xf2200000 0x0 0xf2200000 0x0 0x01e00000>,
100-
<0x03000000 0x0 0x40000000 0x3 0x40000000 0x0 0x40000000>;
100+
<0x03000000 0x3 0x40000000 0x3 0x40000000 0x0 0x40000000>;
101101
reg-names = "dbi", "apb", "config";
102102
resets = <&cru SRST_PCIE30X1_POWERUP>;
103103
reset-names = "pipe";
@@ -150,7 +150,7 @@
150150
<0x0 0xf0000000 0x0 0x00100000>;
151151
ranges = <0x01000000 0x0 0xf0100000 0x0 0xf0100000 0x0 0x00100000>,
152152
<0x02000000 0x0 0xf0200000 0x0 0xf0200000 0x0 0x01e00000>,
153-
<0x03000000 0x0 0x40000000 0x3 0x80000000 0x0 0x40000000>;
153+
<0x03000000 0x3 0x80000000 0x3 0x80000000 0x0 0x40000000>;
154154
reg-names = "dbi", "apb", "config";
155155
resets = <&cru SRST_PCIE30X2_POWERUP>;
156156
reset-names = "pipe";

‎arch/arm64/boot/dts/rockchip/rk356x.dtsi‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,7 @@
997997
power-domains = <&power RK3568_PD_PIPE>;
998998
ranges = <0x01000000 0x0 0xf4100000 0x0 0xf4100000 0x0 0x00100000>,
999999
<0x02000000 0x0 0xf4200000 0x0 0xf4200000 0x0 0x01e00000>,
1000-
<0x03000000 0x0 0x40000000 0x3 0x00000000 0x0 0x40000000>;
1000+
<0x03000000 0x3 0x00000000 0x3 0x00000000 0x0 0x40000000>;
10011001
resets = <&cru SRST_PCIE20_POWERUP>;
10021002
reset-names = "pipe";
10031003
#address-cells = <3>;

‎arch/arm64/include/asm/pgtable-prot.h‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@
4545

4646
#define _PAGE_DEFAULT (_PROT_DEFAULT | PTE_ATTRINDX(MT_NORMAL))
4747

48-
#define _PAGE_KERNEL (PROT_NORMAL)
49-
#define _PAGE_KERNEL_RO ((PROT_NORMAL & ~PTE_WRITE) | PTE_RDONLY)
50-
#define _PAGE_KERNEL_ROX ((PROT_NORMAL & ~(PTE_WRITE | PTE_PXN)) | PTE_RDONLY)
51-
#define _PAGE_KERNEL_EXEC (PROT_NORMAL & ~PTE_PXN)
52-
#define _PAGE_KERNEL_EXEC_CONT ((PROT_NORMAL & ~PTE_PXN) | PTE_CONT)
48+
#define _PAGE_KERNEL (PROT_NORMAL | PTE_DIRTY)
49+
#define _PAGE_KERNEL_RO ((PROT_NORMAL & ~PTE_WRITE) | PTE_RDONLY | PTE_DIRTY)
50+
#define _PAGE_KERNEL_ROX ((PROT_NORMAL & ~(PTE_WRITE | PTE_PXN)) | PTE_RDONLY | PTE_DIRTY)
51+
#define _PAGE_KERNEL_EXEC ((PROT_NORMAL & ~PTE_PXN) | PTE_DIRTY)
52+
#define _PAGE_KERNEL_EXEC_CONT ((PROT_NORMAL & ~PTE_PXN) | PTE_CONT | PTE_DIRTY)
5353

5454
#define _PAGE_SHARED (_PAGE_DEFAULT | PTE_USER | PTE_RDONLY | PTE_NG | PTE_PXN | PTE_UXN | PTE_WRITE)
5555
#define _PAGE_SHARED_EXEC (_PAGE_DEFAULT | PTE_USER | PTE_RDONLY | PTE_NG | PTE_PXN | PTE_WRITE)

‎arch/arm64/include/asm/pgtable.h‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,14 @@ static inline pte_t pte_mkdevmap(pte_t pte)
261261
return set_pte_bit(pte, __pgprot(PTE_DEVMAP | PTE_SPECIAL));
262262
}
263263

264-
static inline void set_pte(pte_t *ptep, pte_t pte)
264+
static inline void set_pte_nosync(pte_t *ptep, pte_t pte)
265265
{
266266
WRITE_ONCE(*ptep, pte);
267+
}
268+
269+
static inline void set_pte(pte_t *ptep, pte_t pte)
270+
{
271+
set_pte_nosync(ptep, pte);
267272

268273
/*
269274
* Only if the new pte is valid and kernel, otherwise TLB maintenance

‎arch/arm64/mm/mmu.c‎

Lines changed: 51 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -114,28 +114,12 @@ EXPORT_SYMBOL(phys_mem_access_prot);
114114
static phys_addr_t __init early_pgtable_alloc(int shift)
115115
{
116116
phys_addr_t phys;
117-
void *ptr;
118117

119118
phys = memblock_phys_alloc_range(PAGE_SIZE, PAGE_SIZE, 0,
120119
MEMBLOCK_ALLOC_NOLEAKTRACE);
121120
if (!phys)
122121
panic("Failed to allocate page table page\n");
123122

124-
/*
125-
* The FIX_{PGD,PUD,PMD} slots may be in active use, but the FIX_PTE
126-
* slot will be free, so we can (ab)use the FIX_PTE slot to initialise
127-
* any level of table.
128-
*/
129-
ptr = pte_set_fixmap(phys);
130-
131-
memset(ptr, 0, PAGE_SIZE);
132-
133-
/*
134-
* Implicit barriers also ensure the zeroed page is visible to the page
135-
* table walker
136-
*/
137-
pte_clear_fixmap();
138-
139123
return phys;
140124
}
141125

@@ -177,16 +161,25 @@ bool pgattr_change_is_safe(u64 old, u64 new)
177161
return ((old ^ new) & ~mask) == 0;
178162
}
179163

180-
static void init_pte(pmd_t *pmdp, unsigned long addr, unsigned long end,
181-
phys_addr_t phys, pgprot_t prot)
164+
static void init_clear_pgtable(void *table)
182165
{
183-
pte_t *ptep;
166+
clear_page(table);
184167

185-
ptep = pte_set_fixmap_offset(pmdp, addr);
168+
/* Ensure the zeroing is observed by page table walks. */
169+
dsb(ishst);
170+
}
171+
172+
static void init_pte(pte_t *ptep, unsigned long addr, unsigned long end,
173+
phys_addr_t phys, pgprot_t prot)
174+
{
186175
do {
187176
pte_t old_pte = READ_ONCE(*ptep);
188177

189-
set_pte(ptep, pfn_pte(__phys_to_pfn(phys), prot));
178+
/*
179+
* Required barriers to make this visible to the table walker
180+
* are deferred to the end of alloc_init_cont_pte().
181+
*/
182+
set_pte_nosync(ptep, pfn_pte(__phys_to_pfn(phys), prot));
190183

191184
/*
192185
* After the PTE entry has been populated once, we
@@ -197,8 +190,6 @@ static void init_pte(pmd_t *pmdp, unsigned long addr, unsigned long end,
197190

198191
phys += PAGE_SIZE;
199192
} while (ptep++, addr += PAGE_SIZE, addr != end);
200-
201-
pte_clear_fixmap();
202193
}
203194

204195
static void alloc_init_cont_pte(pmd_t *pmdp, unsigned long addr,
@@ -209,6 +200,7 @@ static void alloc_init_cont_pte(pmd_t *pmdp, unsigned long addr,
209200
{
210201
unsigned long next;
211202
pmd_t pmd = READ_ONCE(*pmdp);
203+
pte_t *ptep;
212204

213205
BUG_ON(pmd_sect(pmd));
214206
if (pmd_none(pmd)) {
@@ -219,10 +211,14 @@ static void alloc_init_cont_pte(pmd_t *pmdp, unsigned long addr,
219211
pmdval |= PMD_TABLE_PXN;
220212
BUG_ON(!pgtable_alloc);
221213
pte_phys = pgtable_alloc(PAGE_SHIFT);
214+
ptep = pte_set_fixmap(pte_phys);
215+
init_clear_pgtable(ptep);
216+
ptep += pte_index(addr);
222217
__pmd_populate(pmdp, pte_phys, pmdval);
223-
pmd = READ_ONCE(*pmdp);
218+
} else {
219+
BUG_ON(pmd_bad(pmd));
220+
ptep = pte_set_fixmap_offset(pmdp, addr);
224221
}
225-
BUG_ON(pmd_bad(pmd));
226222

227223
do {
228224
pgprot_t __prot = prot;
@@ -234,20 +230,26 @@ static void alloc_init_cont_pte(pmd_t *pmdp, unsigned long addr,
234230
(flags & NO_CONT_MAPPINGS) == 0)
235231
__prot = __pgprot(pgprot_val(prot) | PTE_CONT);
236232

237-
init_pte(pmdp, addr, next, phys, __prot);
233+
init_pte(ptep, addr, next, phys, __prot);
238234

235+
ptep += pte_index(next) - pte_index(addr);
239236
phys += next - addr;
240237
} while (addr = next, addr != end);
238+
239+
/*
240+
* Note: barriers and maintenance necessary to clear the fixmap slot
241+
* ensure that all previous pgtable writes are visible to the table
242+
* walker.
243+
*/
244+
pte_clear_fixmap();
241245
}
242246

243-
static void init_pmd(pud_t *pudp, unsigned long addr, unsigned long end,
247+
static void init_pmd(pmd_t *pmdp, unsigned long addr, unsigned long end,
244248
phys_addr_t phys, pgprot_t prot,
245249
phys_addr_t (*pgtable_alloc)(int), int flags)
246250
{
247251
unsigned long next;
248-
pmd_t *pmdp;
249252

250-
pmdp = pmd_set_fixmap_offset(pudp, addr);
251253
do {
252254
pmd_t old_pmd = READ_ONCE(*pmdp);
253255

@@ -273,8 +275,6 @@ static void init_pmd(pud_t *pudp, unsigned long addr, unsigned long end,
273275
}
274276
phys += next - addr;
275277
} while (pmdp++, addr = next, addr != end);
276-
277-
pmd_clear_fixmap();
278278
}
279279

280280
static void alloc_init_cont_pmd(pud_t *pudp, unsigned long addr,
@@ -284,6 +284,7 @@ static void alloc_init_cont_pmd(pud_t *pudp, unsigned long addr,
284284
{
285285
unsigned long next;
286286
pud_t pud = READ_ONCE(*pudp);
287+
pmd_t *pmdp;
287288

288289
/*
289290
* Check for initial section mappings in the pgd/pud.
@@ -297,10 +298,14 @@ static void alloc_init_cont_pmd(pud_t *pudp, unsigned long addr,
297298
pudval |= PUD_TABLE_PXN;
298299
BUG_ON(!pgtable_alloc);
299300
pmd_phys = pgtable_alloc(PMD_SHIFT);
301+
pmdp = pmd_set_fixmap(pmd_phys);
302+
init_clear_pgtable(pmdp);
303+
pmdp += pmd_index(addr);
300304
__pud_populate(pudp, pmd_phys, pudval);
301-
pud = READ_ONCE(*pudp);
305+
} else {
306+
BUG_ON(pud_bad(pud));
307+
pmdp = pmd_set_fixmap_offset(pudp, addr);
302308
}
303-
BUG_ON(pud_bad(pud));
304309

305310
do {
306311
pgprot_t __prot = prot;
@@ -312,10 +317,13 @@ static void alloc_init_cont_pmd(pud_t *pudp, unsigned long addr,
312317
(flags & NO_CONT_MAPPINGS) == 0)
313318
__prot = __pgprot(pgprot_val(prot) | PTE_CONT);
314319

315-
init_pmd(pudp, addr, next, phys, __prot, pgtable_alloc, flags);
320+
init_pmd(pmdp, addr, next, phys, __prot, pgtable_alloc, flags);
316321

322+
pmdp += pmd_index(next) - pmd_index(addr);
317323
phys += next - addr;
318324
} while (addr = next, addr != end);
325+
326+
pmd_clear_fixmap();
319327
}
320328

321329
static void alloc_init_pud(pgd_t *pgdp, unsigned long addr, unsigned long end,
@@ -336,12 +344,15 @@ static void alloc_init_pud(pgd_t *pgdp, unsigned long addr, unsigned long end,
336344
p4dval |= P4D_TABLE_PXN;
337345
BUG_ON(!pgtable_alloc);
338346
pud_phys = pgtable_alloc(PUD_SHIFT);
347+
pudp = pud_set_fixmap(pud_phys);
348+
init_clear_pgtable(pudp);
349+
pudp += pud_index(addr);
339350
__p4d_populate(p4dp, pud_phys, p4dval);
340-
p4d = READ_ONCE(*p4dp);
351+
} else {
352+
BUG_ON(p4d_bad(p4d));
353+
pudp = pud_set_fixmap_offset(p4dp, addr);
341354
}
342-
BUG_ON(p4d_bad(p4d));
343355

344-
pudp = pud_set_fixmap_offset(p4dp, addr);
345356
do {
346357
pud_t old_pud = READ_ONCE(*pudp);
347358

@@ -432,11 +443,10 @@ void create_kpti_ng_temp_pgd(pgd_t *pgdir, phys_addr_t phys, unsigned long virt,
432443

433444
static phys_addr_t __pgd_pgtable_alloc(int shift)
434445
{
435-
void *ptr = (void *)__get_free_page(GFP_PGTABLE_KERNEL);
436-
BUG_ON(!ptr);
446+
/* Page is zeroed by init_clear_pgtable() so don't duplicate effort. */
447+
void *ptr = (void *)__get_free_page(GFP_PGTABLE_KERNEL & ~__GFP_ZERO);
437448

438-
/* Ensure the zeroed page is visible to the page table walker */
439-
dsb(ishst);
449+
BUG_ON(!ptr);
440450
return __pa(ptr);
441451
}
442452

‎arch/loongarch/include/asm/uaccess.h‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,13 @@ do { \
196196
\
197197
__get_kernel_common(*((type *)(dst)), sizeof(type), \
198198
(__force type *)(src)); \
199-
if (unlikely(__gu_err)) \
199+
if (unlikely(__gu_err)) { \
200+
pr_info("%s: memory access failed, ecode 0x%x\n", \
201+
__func__, read_csr_excode()); \
202+
pr_info("%s: the caller is %pS\n", \
203+
__func__, __builtin_return_address(0)); \
200204
goto err_label; \
205+
} \
201206
} while (0)
202207

203208
#define __put_kernel_nofault(dst, src, type, err_label) \
@@ -207,8 +212,13 @@ do { \
207212
\
208213
__pu_val = *(__force type *)(src); \
209214
__put_kernel_common(((type *)(dst)), sizeof(type)); \
210-
if (unlikely(__pu_err)) \
215+
if (unlikely(__pu_err)) { \
216+
pr_info("%s: memory access failed, ecode 0x%x\n", \
217+
__func__, read_csr_excode()); \
218+
pr_info("%s: the caller is %pS\n", \
219+
__func__, __builtin_return_address(0)); \
211220
goto err_label; \
221+
} \
212222
} while (0)
213223

214224
extern unsigned long __copy_user(void *to, const void *from, __kernel_size_t n);

0 commit comments

Comments
 (0)