Skip to content

Commit 9a0b64c

Browse files
[bot] AutoMerging: merge all upstream's changes:
* https://github.com/coolsnowwolf/lede: fritz-tools: sync with upstream (coolsnowwolf#10574) [WIP] mediatek: add TP-Link TL-XDR6086/TL-XDR6088 kernel: bump to 5.4.226, 5.10.158, 5.15.82 (coolsnowwolf#10573)
2 parents 487e07f + 8d94a46 commit 9a0b64c

File tree

40 files changed

+666
-249
lines changed

40 files changed

+666
-249
lines changed

include/kernel-5.10

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
LINUX_VERSION-5.10 = .157
2-
LINUX_KERNEL_HASH-5.10.157 = fc4cd7c0777ed53f1350e73877e9918df3c40d8e8abe93c6e1a0eb21556d327f
1+
LINUX_VERSION-5.10 = .158
2+
LINUX_KERNEL_HASH-5.10.158 = 1e0a24bb5510caa18b3601b25e12cc2a1ce123948de551f4f2cdbb40aea707e7

include/kernel-5.15

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
LINUX_VERSION-5.15 = .81
2-
LINUX_KERNEL_HASH-5.15.81 = 8f885cdebd754d6e63b920cf6c3e5713e91bbf5f52e9d99eb0054ef7e8f096ab
1+
LINUX_VERSION-5.15 = .82
2+
LINUX_KERNEL_HASH-5.15.82 = fceef6bb79bac494663ccde34453521fc616cd94272fd30564752b3742381b65

include/kernel-5.4

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
LINUX_VERSION-5.4 = .225
2-
LINUX_KERNEL_HASH-5.4.225 = 59f596f6714317955cf481590babcf015aff2bc1900bd8e8dc8f7af73bc560aa
1+
LINUX_VERSION-5.4 = .226
2+
LINUX_KERNEL_HASH-5.4.226 = 0c1f552a1d2f63b3ecd4d33189f0003bc91fb8ff79967a7e295d015c280c9a44

package/utils/fritz-tools/src/fritz_tffs_nand_read.c

+34-19
Original file line numberDiff line numberDiff line change
@@ -73,21 +73,18 @@ static uint8_t readbuf[TFFS_SECTOR_SIZE];
7373
static uint8_t oobbuf[TFFS_SECTOR_OOB_SIZE];
7474
static uint32_t blocksize;
7575
static int mtdfd;
76-
struct tffs_sectors *sectors;
77-
78-
struct tffs_sectors {
79-
uint32_t num_sectors;
80-
uint8_t sectors[0];
81-
};
76+
static uint32_t num_sectors;
77+
static uint8_t *sectors;
78+
static uint32_t *sector_ids;
8279

8380
static inline void sector_mark_bad(int num)
8481
{
85-
sectors->sectors[num / 8] &= ~(0x80 >> (num % 8));
82+
sectors[num / 8] &= ~(0x80 >> (num % 8));
8683
};
8784

8885
static inline uint8_t sector_get_good(int num)
8986
{
90-
return sectors->sectors[num / 8] & 0x80 >> (num % 8);
87+
return sectors[num / 8] & 0x80 >> (num % 8);
9188
};
9289

9390
struct tffs_entry_segment {
@@ -139,6 +136,8 @@ static int read_sector(off_t pos)
139136
return -1;
140137
}
141138

139+
sector_ids[pos / TFFS_SECTOR_SIZE] = read_uint32(readbuf, 0x00);
140+
142141
return 0;
143142
}
144143

@@ -176,25 +175,39 @@ static int find_entry(uint32_t id, struct tffs_entry *entry)
176175

177176
off_t pos = 0;
178177
uint8_t block_end = 0;
179-
for (uint32_t sector = 0; sector < sectors->num_sectors; sector++, pos += TFFS_SECTOR_SIZE) {
178+
for (uint32_t sector = 0; sector < num_sectors; sector++, pos += TFFS_SECTOR_SIZE) {
180179
if (block_end) {
181180
if (pos % blocksize == 0) {
182181
block_end = 0;
183182
}
184183
} else if (sector_get_good(sector)) {
184+
if (sector_ids[sector]) {
185+
if (sector_ids[sector] == TFFS_ID_END) {
186+
/* no more entries in this block */
187+
block_end = 1;
188+
continue;
189+
}
190+
191+
if (sector_ids[sector] != id)
192+
continue;
193+
}
194+
185195
if (read_sectoroob(pos) || read_sector(pos)) {
186196
fprintf(stderr, "ERROR: sector isn't readable, but has been previously!\n");
187197
exit(EXIT_FAILURE);
188198
}
189-
uint32_t oob_id = read_uint32(oobbuf, 0x02);
190-
uint32_t oob_len = read_uint32(oobbuf, 0x06);
191-
uint32_t oob_rev = read_uint32(oobbuf, 0x0a);
192199
uint32_t read_id = read_uint32(readbuf, 0x00);
193200
uint32_t read_len = read_uint32(readbuf, 0x04);
194201
uint32_t read_rev = read_uint32(readbuf, 0x0c);
195-
if (read_oob_sector_health && (oob_id != read_id || oob_len != read_len || oob_rev != read_rev)) {
196-
fprintf(stderr, "Warning: sector has inconsistent metadata\n");
197-
continue;
202+
if (read_oob_sector_health) {
203+
uint32_t oob_id = read_uint32(oobbuf, 0x02);
204+
uint32_t oob_len = read_uint32(oobbuf, 0x06);
205+
uint32_t oob_rev = read_uint32(oobbuf, 0x0a);
206+
207+
if (oob_id != read_id || oob_len != read_len || oob_rev != read_rev) {
208+
fprintf(stderr, "Warning: sector has inconsistent metadata\n");
209+
continue;
210+
}
198211
}
199212
if (read_id == TFFS_ID_END) {
200213
/* no more entries in this block */
@@ -414,13 +427,14 @@ static int scan_mtd(void)
414427

415428
blocksize = info.erasesize;
416429

417-
sectors = malloc(sizeof(*sectors) + (info.size / TFFS_SECTOR_SIZE + 7) / 8);
418-
if (sectors == NULL) {
430+
num_sectors = info.size / TFFS_SECTOR_SIZE;
431+
sectors = malloc((num_sectors + 7) / 8);
432+
sector_ids = calloc(num_sectors, sizeof(uint32_t));
433+
if (!sectors || !sector_ids) {
419434
fprintf(stderr, "ERROR: memory allocation failed!\n");
420435
exit(EXIT_FAILURE);
421436
}
422-
sectors->num_sectors = info.size / TFFS_SECTOR_SIZE;
423-
memset(sectors->sectors, 0xff, (info.size / TFFS_SECTOR_SIZE + 7) / 8);
437+
memset(sectors, 0xff, (num_sectors + 7) / 8);
424438

425439
uint32_t sector = 0, valid_blocks = 0;
426440
uint8_t block_ok = 0;
@@ -564,6 +578,7 @@ int main(int argc, char *argv[])
564578
out_free_entry:
565579
free(name_table.val);
566580
out_free_sectors:
581+
free(sector_ids);
567582
free(sectors);
568583
out_close:
569584
close(mtdfd);

target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch

+1-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@
214214
#include <linux/uaccess.h>
215215
#include <linux/ipv6.h>
216216
#include <linux/icmpv6.h>
217-
@@ -864,10 +865,10 @@ static void tcp_v6_send_response(const s
217+
@@ -866,10 +867,10 @@ static void tcp_v6_send_response(const s
218218
topt = (__be32 *)(t1 + 1);
219219

220220
if (tsecr) {

target/linux/bcm27xx/patches-5.15/950-0070-MMC-added-alternative-MMC-driver.patch

+3-3
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ bcm2835-mmc: uninitialized_var is no more
291291
goto out;
292292
--- a/drivers/mmc/core/core.c
293293
+++ b/drivers/mmc/core/core.c
294-
@@ -1807,7 +1807,8 @@ EXPORT_SYMBOL(mmc_erase);
294+
@@ -1812,7 +1812,8 @@ EXPORT_SYMBOL(mmc_erase);
295295

296296
int mmc_can_erase(struct mmc_card *card)
297297
{
@@ -1984,7 +1984,7 @@ bcm2835-mmc: uninitialized_var is no more
19841984

19851985
#define MAX_TUNING_LOOP 40
19861986

1987-
@@ -3143,7 +3143,7 @@ static void sdhci_timeout_timer(struct t
1987+
@@ -3188,7 +3188,7 @@ static void sdhci_timeout_timer(struct t
19881988
spin_lock_irqsave(&host->lock, flags);
19891989

19901990
if (host->cmd && !sdhci_data_line_cmd(host->cmd)) {
@@ -1993,7 +1993,7 @@ bcm2835-mmc: uninitialized_var is no more
19931993
mmc_hostname(host->mmc));
19941994
sdhci_dumpregs(host);
19951995

1996-
@@ -3165,7 +3165,7 @@ static void sdhci_timeout_data_timer(str
1996+
@@ -3210,7 +3210,7 @@ static void sdhci_timeout_data_timer(str
19971997

19981998
if (host->data || host->data_cmd ||
19991999
(host->cmd && sdhci_data_line_cmd(host->cmd))) {

target/linux/generic/backport-5.10/732-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch

+1-1
Original file line numberDiff line numberDiff line change
@@ -1360,7 +1360,7 @@ Signed-off-by: David S. Miller <[email protected]>
13601360
int irq;
13611361
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
13621362
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
1363-
@@ -5000,7 +5000,7 @@ int stmmac_dvr_probe(struct device *devi
1363+
@@ -5008,7 +5008,7 @@ int stmmac_dvr_probe(struct device *devi
13641364
priv->wol_irq = res->wol_irq;
13651365
priv->lpi_irq = res->lpi_irq;
13661366

target/linux/generic/backport-5.15/020-v6.1-03-mm-vmscan.c-refactor-shrink_node.patch

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Change-Id: Iae734b5b4030205b7db6e8c841f747b6f6ae1a04
1515

1616
--- a/mm/vmscan.c
1717
+++ b/mm/vmscan.c
18-
@@ -2562,6 +2562,103 @@ enum scan_balance {
18+
@@ -2497,6 +2497,103 @@ enum scan_balance {
1919
SCAN_FILE,
2020
};
2121

@@ -119,15 +119,15 @@ Change-Id: Iae734b5b4030205b7db6e8c841f747b6f6ae1a04
119119
/*
120120
* Determine how aggressively the anon and file LRU lists should be
121121
* scanned. The relative value of each set of LRU lists is determined
122-
@@ -3030,7 +3127,6 @@ static void shrink_node(pg_data_t *pgdat
122+
@@ -2965,7 +3062,6 @@ static void shrink_node(pg_data_t *pgdat
123123
unsigned long nr_reclaimed, nr_scanned;
124124
struct lruvec *target_lruvec;
125125
bool reclaimable = false;
126126
- unsigned long file;
127127

128128
target_lruvec = mem_cgroup_lruvec(sc->target_mem_cgroup, pgdat);
129129

130-
@@ -3046,93 +3142,7 @@ again:
130+
@@ -2981,93 +3077,7 @@ again:
131131
nr_reclaimed = sc->nr_reclaimed;
132132
nr_scanned = sc->nr_scanned;
133133

target/linux/generic/backport-5.15/020-v6.1-04-mm-multigenerational-lru-groundwork.patch

+1-1
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ Change-Id: I71de7cd15b8dfa6f9fdd838023474693c4fee0a7
720720

721721
#include <asm/tlbflush.h>
722722
#include <asm/div64.h>
723-
@@ -2880,6 +2881,273 @@ static bool can_age_anon_pages(struct pg
723+
@@ -2815,6 +2816,273 @@ static bool can_age_anon_pages(struct pg
724724
return can_demote(pgdat->node_id, sc);
725725
}
726726

target/linux/generic/backport-5.15/020-v6.1-05-mm-multigenerational-lru-mm_struct-list.patch

+4-4
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ Change-Id: I25d9eda8c6bdc7c3653b9f210a159d6c247c81e8
387387
.dfl_cftypes = memory_files,
388388
--- a/mm/vmscan.c
389389
+++ b/mm/vmscan.c
390-
@@ -2929,6 +2929,306 @@ static bool __maybe_unused seq_is_valid(
390+
@@ -2864,6 +2864,306 @@ static bool __maybe_unused seq_is_valid(
391391
}
392392

393393
/******************************************************************************
@@ -694,15 +694,15 @@ Change-Id: I25d9eda8c6bdc7c3653b9f210a159d6c247c81e8
694694
* state change
695695
******************************************************************************/
696696

697-
@@ -3112,6 +3412,7 @@ void lru_gen_init_state(struct mem_cgrou
697+
@@ -3047,6 +3347,7 @@ void lru_gen_init_state(struct mem_cgrou
698698
int i;
699699
int gen, type, zone;
700700
struct lrugen *lrugen = &lruvec->evictable;
701701
+ struct lru_gen_mm_list *mm_list = get_mm_list(memcg);
702702

703703
lrugen->max_seq = MIN_NR_GENS + 1;
704704
lrugen->enabled[0] = lru_gen_enabled() && lru_gen_nr_swapfiles;
705-
@@ -3122,6 +3423,17 @@ void lru_gen_init_state(struct mem_cgrou
705+
@@ -3057,6 +3358,17 @@ void lru_gen_init_state(struct mem_cgrou
706706

707707
for_each_gen_type_zone(gen, type, zone)
708708
INIT_LIST_HEAD(&lrugen->lists[gen][type][zone]);
@@ -720,7 +720,7 @@ Change-Id: I25d9eda8c6bdc7c3653b9f210a159d6c247c81e8
720720
}
721721

722722
#ifdef CONFIG_MEMCG
723-
@@ -3129,18 +3441,37 @@ void lru_gen_init_memcg(struct mem_cgrou
723+
@@ -3064,18 +3376,37 @@ void lru_gen_init_memcg(struct mem_cgrou
724724
{
725725
int nid;
726726

target/linux/generic/backport-5.15/020-v6.1-06-mm-multigenerational-lru-aging.patch

+5-5
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ Change-Id: I3ae8abc3100d023cecb3a699d86020ae6fc10a45
193193

194194
#include <asm/tlbflush.h>
195195
#include <asm/div64.h>
196-
@@ -2887,6 +2889,15 @@ static bool can_age_anon_pages(struct pg
196+
@@ -2822,6 +2824,15 @@ static bool can_age_anon_pages(struct pg
197197
* shorthand helpers
198198
******************************************************************************/
199199

@@ -209,7 +209,7 @@ Change-Id: I3ae8abc3100d023cecb3a699d86020ae6fc10a45
209209
#define for_each_gen_type_zone(gen, type, zone) \
210210
for ((gen) = 0; (gen) < MAX_NR_GENS; (gen)++) \
211211
for ((type) = 0; (type) < ANON_AND_FILE; (type)++) \
212-
@@ -2899,6 +2910,12 @@ static int page_lru_gen(struct page *pag
212+
@@ -2834,6 +2845,12 @@ static int page_lru_gen(struct page *pag
213213
return ((flags & LRU_GEN_MASK) >> LRU_GEN_PGOFF) - 1;
214214
}
215215

@@ -222,7 +222,7 @@ Change-Id: I3ae8abc3100d023cecb3a699d86020ae6fc10a45
222222
static struct lruvec *get_lruvec(int nid, struct mem_cgroup *memcg)
223223
{
224224
struct pglist_data *pgdat = NODE_DATA(nid);
225-
@@ -3229,6 +3246,926 @@ done:
225+
@@ -3164,6 +3181,926 @@ done:
226226
}
227227

228228
/******************************************************************************
@@ -1149,7 +1149,7 @@ Change-Id: I3ae8abc3100d023cecb3a699d86020ae6fc10a45
11491149
* state change
11501150
******************************************************************************/
11511151

1152-
@@ -3477,6 +4414,12 @@ static int __init init_lru_gen(void)
1152+
@@ -3412,6 +4349,12 @@ static int __init init_lru_gen(void)
11531153
};
11541154
late_initcall(init_lru_gen);
11551155

@@ -1162,7 +1162,7 @@ Change-Id: I3ae8abc3100d023cecb3a699d86020ae6fc10a45
11621162
#endif /* CONFIG_LRU_GEN */
11631163

11641164
static void shrink_lruvec(struct lruvec *lruvec, struct scan_control *sc)
1165-
@@ -4331,6 +5274,11 @@ static void age_active_anon(struct pglis
1165+
@@ -4266,6 +5209,11 @@ static void age_active_anon(struct pglis
11661166
struct mem_cgroup *memcg;
11671167
struct lruvec *lruvec;
11681168

target/linux/generic/backport-5.15/020-v6.1-07-mm-multigenerational-lru-eviction.patch

+12-12
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ Change-Id: I64c06d8f2cdb83ac7d56c7e1d07f043483956cac
212212
may_enter_fs = (sc->gfp_mask & __GFP_FS) ||
213213
(PageSwapCache(page) && (sc->gfp_mask & __GFP_IO));
214214

215-
@@ -2570,6 +2577,9 @@ static void prepare_scan_count(pg_data_t
215+
@@ -2505,6 +2512,9 @@ static void prepare_scan_count(pg_data_t
216216
unsigned long file;
217217
struct lruvec *target_lruvec;
218218

@@ -222,7 +222,7 @@ Change-Id: I64c06d8f2cdb83ac7d56c7e1d07f043483956cac
222222
target_lruvec = mem_cgroup_lruvec(sc->target_mem_cgroup, pgdat);
223223

224224
/*
225-
@@ -2910,6 +2920,17 @@ static int page_lru_gen(struct page *pag
225+
@@ -2845,6 +2855,17 @@ static int page_lru_gen(struct page *pag
226226
return ((flags & LRU_GEN_MASK) >> LRU_GEN_PGOFF) - 1;
227227
}
228228

@@ -240,7 +240,7 @@ Change-Id: I64c06d8f2cdb83ac7d56c7e1d07f043483956cac
240240
static int get_swappiness(struct mem_cgroup *memcg)
241241
{
242242
return mem_cgroup_get_nr_swap_pages(memcg) >= MIN_BATCH_SIZE ?
243-
@@ -3246,6 +3267,91 @@ done:
243+
@@ -3181,6 +3202,91 @@ done:
244244
}
245245

246246
/******************************************************************************
@@ -332,31 +332,31 @@ Change-Id: I64c06d8f2cdb83ac7d56c7e1d07f043483956cac
332332
* the aging
333333
******************************************************************************/
334334

335-
@@ -3265,6 +3371,7 @@ static int page_update_gen(struct page *
335+
@@ -3200,6 +3306,7 @@ static int page_update_gen(struct page *
336336

337337
new_flags &= ~LRU_GEN_MASK;
338338
new_flags |= (gen + 1UL) << LRU_GEN_PGOFF;
339339
+ new_flags &= ~(LRU_REFS_MASK | LRU_REFS_FLAGS);
340340
} while (new_flags != old_flags &&
341341
cmpxchg(&page->flags, old_flags, new_flags) != old_flags);
342342

343-
@@ -3296,6 +3403,7 @@ static void page_inc_gen(struct page *pa
343+
@@ -3231,6 +3338,7 @@ static void page_inc_gen(struct page *pa
344344

345345
new_flags &= ~LRU_GEN_MASK;
346346
new_flags |= (new_gen + 1UL) << LRU_GEN_PGOFF;
347347
+ new_flags &= ~(LRU_REFS_MASK | LRU_REFS_FLAGS);
348348
/* for end_page_writeback() */
349349
if (reclaiming)
350350
new_flags |= BIT(PG_reclaim);
351-
@@ -3787,6 +3895,7 @@ static bool inc_min_seq(struct lruvec *l
351+
@@ -3722,6 +3830,7 @@ static bool inc_min_seq(struct lruvec *l
352352
}
353353
}
354354

355355
+ reset_ctrl_pos(lruvec, gen, type);
356356
WRITE_ONCE(lrugen->min_seq[type], lrugen->min_seq[type] + 1);
357357

358358
return true;
359-
@@ -3824,6 +3933,8 @@ next:
359+
@@ -3759,6 +3868,8 @@ next:
360360
if (min_seq[type] == lrugen->min_seq[type])
361361
continue;
362362

@@ -365,7 +365,7 @@ Change-Id: I64c06d8f2cdb83ac7d56c7e1d07f043483956cac
365365
WRITE_ONCE(lrugen->min_seq[type], min_seq[type]);
366366
success = true;
367367
}
368-
@@ -3885,6 +3996,9 @@ static void inc_max_seq(struct lruvec *l
368+
@@ -3820,6 +3931,9 @@ static void inc_max_seq(struct lruvec *l
369369
}
370370
}
371371

@@ -375,7 +375,7 @@ Change-Id: I64c06d8f2cdb83ac7d56c7e1d07f043483956cac
375375
WRITE_ONCE(lrugen->timestamps[gen], jiffies);
376376
/* make sure all preceding modifications appear first */
377377
smp_store_release(&lrugen->max_seq, lrugen->max_seq + 1);
378-
@@ -4166,6 +4280,433 @@ void lru_gen_look_around(struct page_vma
378+
@@ -4101,6 +4215,433 @@ void lru_gen_look_around(struct page_vma
379379
}
380380

381381
/******************************************************************************
@@ -809,7 +809,7 @@ Change-Id: I64c06d8f2cdb83ac7d56c7e1d07f043483956cac
809809
* state change
810810
******************************************************************************/
811811

812-
@@ -4420,6 +4961,10 @@ static void lru_gen_age_node(struct pgli
812+
@@ -4355,6 +4896,10 @@ static void lru_gen_age_node(struct pgli
813813
{
814814
}
815815

@@ -820,7 +820,7 @@ Change-Id: I64c06d8f2cdb83ac7d56c7e1d07f043483956cac
820820
#endif /* CONFIG_LRU_GEN */
821821

822822
static void shrink_lruvec(struct lruvec *lruvec, struct scan_control *sc)
823-
@@ -4433,6 +4978,11 @@ static void shrink_lruvec(struct lruvec
823+
@@ -4368,6 +4913,11 @@ static void shrink_lruvec(struct lruvec
824824
bool proportional_reclaim;
825825
struct blk_plug plug;
826826

@@ -832,7 +832,7 @@ Change-Id: I64c06d8f2cdb83ac7d56c7e1d07f043483956cac
832832
get_scan_count(lruvec, sc, nr);
833833

834834
/* Record the original scan target for proportional adjustments later */
835-
@@ -4904,6 +5454,9 @@ static void snapshot_refaults(struct mem
835+
@@ -4839,6 +5389,9 @@ static void snapshot_refaults(struct mem
836836
struct lruvec *target_lruvec;
837837
unsigned long refaults;
838838

0 commit comments

Comments
 (0)