Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v6.7.5-scx1 #12

Merged
merged 131 commits into from
Feb 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
6b0d486
ext4: regenerate buddy after block freeing failed if under fc replay
LiBaokun96 Jan 4, 2024
7e81c9e
dmaengine: fsl-dpaa2-qdma: Fix the size of dma pools
Jan 18, 2024
d48e89f
dmaengine: ti: k3-udma: Report short packet errors
jailuthra Jan 3, 2024
1905e4f
dmaengine: fsl-qdma: Fix a memory leak related to the status queue DMA
tititiou36 Jan 7, 2024
198270d
dmaengine: fsl-qdma: Fix a memory leak related to the queue command DMA
tititiou36 Jan 7, 2024
ee77826
phy: qcom-qmp-usb: fix register offsets for ipq8074/ipq6018
mantas-p Jan 23, 2024
8befbbe
phy: qcom-qmp-usb: fix serdes init sequence for IPQ6018
mantas-p Jan 23, 2024
433e6b9
phy: renesas: rcar-gen3-usb2: Fix returning wrong error code
shimoday Jan 5, 2024
f2dfbcf
perf tests: Add perf script test
captain5050 Dec 7, 2023
1696ee0
perf test: Fix 'perf script' tests on s390
Jan 25, 2024
fd17d74
perf evlist: Fix evlist__new_default() for > 1 core PMU
James-A-Clark Jan 24, 2024
4506077
dmaengine: fix is_slave_direction() return false when DMA_DEV_TO_DEV
nxpfrankli Jan 23, 2024
396e17a
phy: ti: phy-omap-usb2: Fix NULL pointer dereference for SRP
tmlind Jan 28, 2024
7454c0e
cifs: avoid redundant calls to disable multichannel
sprasad-microsoft Feb 1, 2024
22a6c5b
cifs: failure to add channel on iface should bump up weight
sprasad-microsoft Feb 1, 2024
0615d27
drm/msms/dp: fixed link clock divider bits be over written in BPC unk…
Jan 10, 2024
e9ecfb5
drm/msm/dp: return correct Colorimetry for DP_TEST_DYNAMIC_RANGE_CEA …
Jan 17, 2024
eb4f56f
drm/msm/dpu: check for valid hw_pp in dpu_encoder_helper_phys_cleanup
Jan 17, 2024
8dcd2aa
wifi: iwlwifi: mvm: skip adding debugfs symlink for reconfig
benzea Jan 23, 2024
7f3e756
x86/efistub: Give up if memory attribute protocol returns an error
ardbiesheuvel Jan 26, 2024
83eb64e
x86/efistub: Avoid placing the kernel below LOAD_PHYSICAL_ADDR
ardbiesheuvel Jan 30, 2024
3b48c9e
net: stmmac: xgmac: fix handling of DPP safety error for DMA channels
Jan 31, 2024
7af9b4d
wifi: cfg80211: consume both probe response and beacon IEs
benzea Dec 11, 2023
ce112c9
wifi: cfg80211: detect stuck ECSA element in probe resp
jmberg-intel Jan 29, 2024
ea88bde
wifi: mac80211: improve CSA/ECSA connection refusal
jmberg-intel Jan 29, 2024
c255c3b
wifi: mac80211: fix RCU use in TDLS fast-xmit
jmberg-intel Jan 29, 2024
f86f72f
wifi: mac80211: fix unsolicited broadcast probe config
jmberg-intel Jan 29, 2024
1c91546
wifi: mac80211: fix waiting for beacons logic
jmberg-intel Jan 31, 2024
2bedd9a
wifi: iwlwifi: exit eSR only after the FW does
Miriam-Rachel Feb 1, 2024
d32fe55
wifi: brcmfmac: Adjust n_channels usage for __counted_by
kees Jan 26, 2024
d91964c
netdevsim: avoid potential loop in nsim_dev_trap_report_work()
Feb 1, 2024
e42e334
net: atlantic: Fix DMA mapping for PTP hwts ring
Feb 1, 2024
ac031e5
selftests: net: cut more slack for gro fwd tests.
Feb 1, 2024
4228fff
selftests/net: convert unicast_extensions.sh to run it in unique name…
liuhangbin Dec 2, 2023
0d661ec
selftests/net: convert pmtu.sh to run it in unique namespace
liuhangbin Dec 19, 2023
743f994
selftests/net: change shebang to bash to support "source"
Yujie-Liu Dec 29, 2023
2840519
selftests: net: fix tcp listener handling in pmtu.sh
Feb 1, 2024
3689096
selftests: net: avoid just another constant wait
Feb 1, 2024
f2e3190
tsnep: Fix mapping for zero copy XDP_TX action
Jan 31, 2024
7dc9feb
tunnels: fix out of bounds access when building IPv6 PMTU error
atenart Feb 1, 2024
c267f63
atm: idt77252: fix a memleak in open_card_ubr0
AlexiousLu Feb 1, 2024
1731cb9
octeontx2-pf: Fix a memleak otx2_sq_init
AlexiousLu Feb 1, 2024
8083fdf
hwmon: (aspeed-pwm-tacho) mutex for tach reading
lprylli Nov 3, 2023
3a7753b
hwmon: (coretemp) Fix out-of-bounds memory access
zhang-rui Feb 2, 2024
8b8cbb0
hwmon: (coretemp) Fix bogus core_id to attr name mapping
zhang-rui Feb 2, 2024
307fa8a
inet: read sk->sk_family once in inet_recv_error()
Feb 2, 2024
86e0a09
drm/i915/gvt: Fix uninitialized variable in handle_mmio()
Jan 26, 2024
4adeeff
x86/efistub: Use 1:1 file:memory mapping for PE/COFF .compat section
ardbiesheuvel Feb 5, 2024
edc8201
rxrpc: Fix generation of serial numbers to skip zero
dhowells Feb 2, 2024
63719f4
rxrpc: Fix delayed ACKs to not set the reference serial number
dhowells Feb 2, 2024
033edcf
rxrpc: Fix response to PING RESPONSE ACKs to a dead call
dhowells Feb 2, 2024
2fb1d2b
rxrpc: Fix counting of new acks and nacks
dhowells Feb 2, 2024
c44e8d4
selftests: net: let big_tcp test cope with slow env
Feb 2, 2024
0cd331d
tipc: Check the bearer type before calling tipc_udp_nl_bearer_add()
Jan 31, 2024
82ae47c
af_unix: Call kfree_skb() for dead unix_(sk)->oob_skb in GC.
q2ven Feb 3, 2024
319d215
devlink: avoid potential loop in devlink_rel_nested_in_notify_work()
Feb 5, 2024
210d938
ppp_async: limit MRU to 64K
Feb 5, 2024
972d0dd
selftests: cmsg_ipv6: repeat the exact packet
kuba-moo Feb 4, 2024
36e38d8
netfilter: nft_compat: narrow down revision to unsigned 8-bits
ummakynes Feb 1, 2024
af12244
netfilter: nft_compat: reject unused compat flag
ummakynes Feb 1, 2024
c45aea3
netfilter: nft_compat: restrict match/target protocol to u16
ummakynes Feb 1, 2024
0c863ca
drm/amd/display: Fix 'panel_cntl' could be null in 'dcn21_set_backlig…
srishanm Jan 27, 2024
39f24c0
drm/amd/display: Add NULL test for 'timing generator' in 'dcn21_set_p…
srishanm Jan 31, 2024
a938eab
drm/amd/display: Implement bounds check for stream encoder creation i…
srishanm Feb 7, 2024
b4b2571
netfilter: nft_set_pipapo: remove static in nft_pipapo_get()
ummakynes Feb 2, 2024
fc46e23
netfilter: nft_ct: reject direction for ct id
ummakynes Feb 5, 2024
383182d
netfilter: nf_tables: use timestamp to check for set element timeout
ummakynes Feb 5, 2024
3c0c0cf
netfilter: nfnetlink_queue: un-break NF_REPEAT
Feb 6, 2024
70e02eb
netfilter: nft_set_pipapo: store index in scratch maps
Feb 7, 2024
14429a7
netfilter: nft_set_pipapo: add helper to release pcpu scratch area
Feb 7, 2024
f125d00
netfilter: nft_set_pipapo: remove scratch_aligned pointer
Feb 8, 2024
686820f
fs/ntfs3: Fix an NULL dereference bug
Oct 17, 2023
2b89c3f
mm: Introduce flush_cache_vmap_early()
Dec 12, 2023
4a67cb9
riscv: mm: execute local TLB flush after populating vmemmap
VincentZWC Jan 17, 2024
ee0948b
riscv: Fix set_huge_pte_at() for NAPOT mapping
Jan 17, 2024
0424da2
riscv: Fix hugetlb_mask_last_page() when NAPOT is enabled
Jan 17, 2024
412dc60
scsi: core: Move scsi_host_busy() out of host lock if it is for per-c…
Feb 3, 2024
d3607ac
riscv: Flush the tlb when a page directory is freed
Jan 28, 2024
e6140f2
libceph: rename read_sparse_msg_*() to read_partial_sparse_msg_*()
lxbsz Dec 14, 2023
bd9442e
libceph: just wait for more data to be available on the socket
lxbsz Dec 14, 2023
524b788
ceph: always set initial i_blkbits to CEPH_FSCRYPT_BLOCK_SHIFT
lxbsz Jan 18, 2024
ac4be33
riscv: Fix arch_hugetlb_migration_supported() for NAPOT
Jan 30, 2024
389870b
riscv: declare overflow_stack as exported from traps.c
bjdooks-ct Nov 23, 2023
dc1fc14
nvme-host: fix the updating of the firmware version
maurizio-lombardi Jan 18, 2024
a56d283
selftests: core: include linux/close_range.h for CLOSE_RANGE_* macros
musamaanjum Oct 24, 2023
cd33b33
blk-iocost: Fix an UBSAN shift-out-of-bounds warning
htejun Nov 20, 2023
db58ef7
ALSA: usb-audio: Add delay quirk for MOTU M Series 2nd revision
puleglot Jan 24, 2024
800de2b
ALSA: usb-audio: Add a quirk for Yamaha YIT-W12TX transmitter
belegdol Jan 23, 2024
0864d65
ALSA: usb-audio: add quirk for RODE NT-USB+
seanyoung Jan 24, 2024
5b123ea
USB: serial: qcserial: add new usb-id for Dell Wireless DW5826e
JackBBWu Jan 23, 2024
9eb61d8
USB: serial: option: add Fibocom FM101-GL variant
LuPuliang Jan 31, 2024
f81f4d9
USB: serial: cp210x: add ID for IMST iM871A-USB
ldallmayr Jan 5, 2024
a87cc08
Revert "usb: typec: tcpm: fix cc role at port reset"
Jan 17, 2024
f41943e
Revert "drm/amd/pm: fix the high voltage and temperature issue"
superm1 Jan 19, 2024
2da241c
x86/lib: Revert to _ASM_EXTABLE_UA() for {get,put}_user() fixups
qzhuo2 Jan 29, 2024
c5a2550
usb: dwc3: host: Set XHCI_SG_TRB_CACHE_SIZE_QUIRK
Jan 16, 2024
e420429
usb: host: xhci-plat: Add support for XHCI_SG_TRB_CACHE_SIZE_QUIRK
Jan 16, 2024
783e69d
xhci: process isoc TD properly when there was a transaction error mid…
matnyman Jan 25, 2024
418456c
xhci: handle isoc Babble and Buffer Overrun events properly
Jan 25, 2024
2fff7bb
usb: dwc3: pci: add support for the Intel Arrow Lake-H
Jan 15, 2024
6424f6e
hrtimer: Report offline hrtimer enqueue
Jan 29, 2024
672049b
Input: i8042 - fix strange behavior of touchpad on Clevo NS70PU
tuxedo-wse Dec 5, 2023
2d470b1
Input: atkbd - skip ATKBD_CMD_SETLEDS when skipping ATKBD_CMD_GETID
jwrdegoede Jan 26, 2024
30f3841
wifi: iwlwifi: mvm: fix a battery life regression
egrumbach Jan 28, 2024
5f42b16
io_uring/net: fix sr->len for IORING_OP_RECV with MSG_WAITALL and buf…
axboe Feb 1, 2024
995d020
io_uring/poll: move poll execution helpers higher up
axboe Jan 29, 2024
f43a63e
io_uring/net: un-indent mshot retry path in io_recv_finish()
axboe Jan 29, 2024
01960f1
io_uring/rw: ensure poll based multishot read retries appropriately
axboe Jan 27, 2024
ef90508
PCI/ASPM: Fix deadlock when enabling ASPM
jhovold Jan 30, 2024
9b9a2f1
new helper: user_path_locked_at()
Nov 16, 2023
dc610c4
bch2_ioctl_subvolume_destroy(): fix locking
Nov 14, 2023
f114cfc
bcachefs: Don't pass memcmp() as a pointer
Jan 15, 2024
6763051
bcachefs: rebalance should wakeup on shutdown if disabled
YellowOnion Nov 26, 2023
9a26938
bcachefs: Add missing bch2_moving_ctxt_flush_all()
Jan 15, 2024
a12bbb4
bcachefs: bch2_kthread_io_clock_wait() no longer sleeps until full am…
Jan 15, 2024
5659067
bcachefs: kvfree bch_fs::snapshots in bch2_fs_snapshots_exit
Damenly Jan 16, 2024
5b41d3f
bcachefs: grab s_umount only if snapshotting
Damenly Jan 15, 2024
4571eb9
bcachefs: fix incorrect usage of REQ_OP_FLUSH
Jan 11, 2024
a18ae02
bcachefs: unlock parent dir if entry is not found in subvolume deletion
ouonline Jan 28, 2024
3183d7a
bcachefs: time_stats: Check for last_event == 0 when updating freq stats
Feb 2, 2024
e8fd56f
Revert "ASoC: amd: Add new dmi entries for acp5x platform"
gregkh Feb 13, 2024
4023b7b
io_uring/poll: add requeue return code from poll multishot handling
axboe Jan 29, 2024
3438de3
io_uring/net: limit inline multishot retries
axboe Jan 29, 2024
50d0dff
net: Fix from address in memcpy_to_iter_csum()
michaellass Jan 31, 2024
9b16230
net: stmmac: xgmac: use #define for string constants
horms Feb 8, 2024
87d1f70
ALSA: usb-audio: Sort quirk table entries
tiwai Jan 24, 2024
e749566
net: stmmac: xgmac: fix a typo of register name in DPP safety handling
Feb 3, 2024
6eb1444
netfilter: nft_set_rbtree: skip end interval element from gc
ummakynes Feb 7, 2024
004dcea
Linux 6.7.5
gregkh Feb 16, 2024
0de69ee
Merge tag 'v6.7.5' into merge_latest
Byte-Lab Feb 17, 2024
8434f90
v6.7.5-scx1
Byte-Lab Feb 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 6
PATCHLEVEL = 7
SUBLEVEL = 4
EXTRAVERSION = -scx2
SUBLEVEL = 5
EXTRAVERSION = -scx1
NAME = Hurr durr I'ma ninja sloth

# *DOCUMENTATION*
Expand Down
1 change: 1 addition & 0 deletions arch/arc/include/asm/cacheflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ void dma_cache_wback(phys_addr_t start, unsigned long sz);

/* TBD: optimize this */
#define flush_cache_vmap(start, end) flush_cache_all()
#define flush_cache_vmap_early(start, end) do { } while (0)
#define flush_cache_vunmap(start, end) flush_cache_all()

#define flush_cache_dup_mm(mm) /* called on fork (VIVT only) */
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/include/asm/cacheflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,8 @@ static inline void flush_cache_vmap(unsigned long start, unsigned long end)
dsb(ishst);
}

#define flush_cache_vmap_early(start, end) do { } while (0)

static inline void flush_cache_vunmap(unsigned long start, unsigned long end)
{
if (!cache_is_vipt_nonaliasing())
Expand Down
1 change: 1 addition & 0 deletions arch/csky/abiv1/inc/abi/cacheflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ static inline void flush_anon_page(struct vm_area_struct *vma,
*/
extern void flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end);
#define flush_cache_vmap(start, end) cache_wbinv_all()
#define flush_cache_vmap_early(start, end) do { } while (0)
#define flush_cache_vunmap(start, end) cache_wbinv_all()

#define flush_icache_range(start, end) cache_wbinv_range(start, end)
Expand Down
1 change: 1 addition & 0 deletions arch/csky/abiv2/inc/abi/cacheflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ void flush_icache_mm_range(struct mm_struct *mm,
void flush_icache_deferred(struct mm_struct *mm);

#define flush_cache_vmap(start, end) do { } while (0)
#define flush_cache_vmap_early(start, end) do { } while (0)
#define flush_cache_vunmap(start, end) do { } while (0)

#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
Expand Down
1 change: 1 addition & 0 deletions arch/m68k/include/asm/cacheflush_mm.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ extern void cache_push_v(unsigned long vaddr, int len);
#define flush_cache_all() __flush_cache_all()

#define flush_cache_vmap(start, end) flush_cache_all()
#define flush_cache_vmap_early(start, end) do { } while (0)
#define flush_cache_vunmap(start, end) flush_cache_all()

static inline void flush_cache_mm(struct mm_struct *mm)
Expand Down
2 changes: 2 additions & 0 deletions arch/mips/include/asm/cacheflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ static inline void flush_cache_vmap(unsigned long start, unsigned long end)
__flush_cache_vmap();
}

#define flush_cache_vmap_early(start, end) do { } while (0)

extern void (*__flush_cache_vunmap)(void);

static inline void flush_cache_vunmap(unsigned long start, unsigned long end)
Expand Down
1 change: 1 addition & 0 deletions arch/nios2/include/asm/cacheflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ void flush_icache_pages(struct vm_area_struct *vma, struct page *page,
#define flush_icache_pages flush_icache_pages

#define flush_cache_vmap(start, end) flush_dcache_range(start, end)
#define flush_cache_vmap_early(start, end) do { } while (0)
#define flush_cache_vunmap(start, end) flush_dcache_range(start, end)

extern void copy_to_user_page(struct vm_area_struct *vma, struct page *page,
Expand Down
1 change: 1 addition & 0 deletions arch/parisc/include/asm/cacheflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ void flush_kernel_vmap_range(void *vaddr, int size);
void invalidate_kernel_vmap_range(void *vaddr, int size);

#define flush_cache_vmap(start, end) flush_cache_all()
#define flush_cache_vmap_early(start, end) do { } while (0)
#define flush_cache_vunmap(start, end) flush_cache_all()

void flush_dcache_folio(struct folio *folio);
Expand Down
3 changes: 2 additions & 1 deletion arch/riscv/include/asm/cacheflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ static inline void flush_dcache_page(struct page *page)
flush_icache_mm(vma->vm_mm, 0)

#ifdef CONFIG_64BIT
#define flush_cache_vmap(start, end) flush_tlb_kernel_range(start, end)
#define flush_cache_vmap(start, end) flush_tlb_kernel_range(start, end)
#define flush_cache_vmap_early(start, end) local_flush_tlb_kernel_range(start, end)
#endif

#ifndef CONFIG_SMP
Expand Down
3 changes: 3 additions & 0 deletions arch/riscv/include/asm/hugetlb.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ static inline void arch_clear_hugepage_flags(struct page *page)
}
#define arch_clear_hugepage_flags arch_clear_hugepage_flags

bool arch_hugetlb_migration_supported(struct hstate *h);
#define arch_hugetlb_migration_supported arch_hugetlb_migration_supported

#ifdef CONFIG_RISCV_ISA_SVNAPOT
#define __HAVE_ARCH_HUGE_PTE_CLEAR
void huge_pte_clear(struct mm_struct *mm, unsigned long addr,
Expand Down
5 changes: 5 additions & 0 deletions arch/riscv/include/asm/stacktrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,9 @@ static inline bool on_thread_stack(void)
return !(((unsigned long)(current->stack) ^ current_stack_pointer) & ~(THREAD_SIZE - 1));
}


#ifdef CONFIG_VMAP_STACK
DECLARE_PER_CPU(unsigned long [OVERFLOW_STACK_SIZE/sizeof(long)], overflow_stack);
#endif /* CONFIG_VMAP_STACK */

#endif /* _ASM_RISCV_STACKTRACE_H */
2 changes: 1 addition & 1 deletion arch/riscv/include/asm/tlb.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ static void tlb_flush(struct mmu_gather *tlb);
static inline void tlb_flush(struct mmu_gather *tlb)
{
#ifdef CONFIG_MMU
if (tlb->fullmm || tlb->need_flush_all)
if (tlb->fullmm || tlb->need_flush_all || tlb->freed_tables)
flush_tlb_mm(tlb->mm);
else
flush_tlb_mm_range(tlb->mm, tlb->start, tlb->end,
Expand Down
2 changes: 2 additions & 0 deletions arch/riscv/include/asm/tlbflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long addr);
void flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
unsigned long end);
void flush_tlb_kernel_range(unsigned long start, unsigned long end);
void local_flush_tlb_kernel_range(unsigned long start, unsigned long end);
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
#define __HAVE_ARCH_FLUSH_PMD_TLB_RANGE
void flush_pmd_tlb_range(struct vm_area_struct *vma, unsigned long start,
Expand All @@ -66,6 +67,7 @@ static inline void flush_tlb_kernel_range(unsigned long start,

#define flush_tlb_mm(mm) flush_tlb_all()
#define flush_tlb_mm_range(mm, start, end, page_size) flush_tlb_all()
#define local_flush_tlb_kernel_range(start, end) flush_tlb_all()
#endif /* !CONFIG_SMP || !CONFIG_MMU */

#endif /* _ASM_RISCV_TLBFLUSH_H */
78 changes: 73 additions & 5 deletions arch/riscv/mm/hugetlbpage.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,26 @@ pte_t *huge_pte_offset(struct mm_struct *mm,
return pte;
}

unsigned long hugetlb_mask_last_page(struct hstate *h)
{
unsigned long hp_size = huge_page_size(h);

switch (hp_size) {
#ifndef __PAGETABLE_PMD_FOLDED
case PUD_SIZE:
return P4D_SIZE - PUD_SIZE;
#endif
case PMD_SIZE:
return PUD_SIZE - PMD_SIZE;
case napot_cont_size(NAPOT_CONT64KB_ORDER):
return PMD_SIZE - napot_cont_size(NAPOT_CONT64KB_ORDER);
default:
break;
}

return 0UL;
}

static pte_t get_clear_contig(struct mm_struct *mm,
unsigned long addr,
pte_t *ptep,
Expand Down Expand Up @@ -177,13 +197,36 @@ pte_t arch_make_huge_pte(pte_t entry, unsigned int shift, vm_flags_t flags)
return entry;
}

static void clear_flush(struct mm_struct *mm,
unsigned long addr,
pte_t *ptep,
unsigned long pgsize,
unsigned long ncontig)
{
struct vm_area_struct vma = TLB_FLUSH_VMA(mm, 0);
unsigned long i, saddr = addr;

for (i = 0; i < ncontig; i++, addr += pgsize, ptep++)
ptep_get_and_clear(mm, addr, ptep);

flush_tlb_range(&vma, saddr, addr);
}

/*
* When dealing with NAPOT mappings, the privileged specification indicates that
* "if an update needs to be made, the OS generally should first mark all of the
* PTEs invalid, then issue SFENCE.VMA instruction(s) covering all 4 KiB regions
* within the range, [...] then update the PTE(s), as described in Section
* 4.2.1.". That's the equivalent of the Break-Before-Make approach used by
* arm64.
*/
void set_huge_pte_at(struct mm_struct *mm,
unsigned long addr,
pte_t *ptep,
pte_t pte,
unsigned long sz)
{
unsigned long hugepage_shift;
unsigned long hugepage_shift, pgsize;
int i, pte_num;

if (sz >= PGDIR_SIZE)
Expand All @@ -198,7 +241,22 @@ void set_huge_pte_at(struct mm_struct *mm,
hugepage_shift = PAGE_SHIFT;

pte_num = sz >> hugepage_shift;
for (i = 0; i < pte_num; i++, ptep++, addr += (1 << hugepage_shift))
pgsize = 1 << hugepage_shift;

if (!pte_present(pte)) {
for (i = 0; i < pte_num; i++, ptep++, addr += pgsize)
set_ptes(mm, addr, ptep, pte, 1);
return;
}

if (!pte_napot(pte)) {
set_ptes(mm, addr, ptep, pte, 1);
return;
}

clear_flush(mm, addr, ptep, pgsize, pte_num);

for (i = 0; i < pte_num; i++, ptep++, addr += pgsize)
set_pte_at(mm, addr, ptep, pte);
}

Expand Down Expand Up @@ -306,7 +364,7 @@ void huge_pte_clear(struct mm_struct *mm,
pte_clear(mm, addr, ptep);
}

static __init bool is_napot_size(unsigned long size)
static bool is_napot_size(unsigned long size)
{
unsigned long order;

Expand Down Expand Up @@ -334,7 +392,7 @@ arch_initcall(napot_hugetlbpages_init);

#else

static __init bool is_napot_size(unsigned long size)
static bool is_napot_size(unsigned long size)
{
return false;
}
Expand All @@ -351,7 +409,7 @@ int pmd_huge(pmd_t pmd)
return pmd_leaf(pmd);
}

bool __init arch_hugetlb_valid_size(unsigned long size)
static bool __hugetlb_valid_size(unsigned long size)
{
if (size == HPAGE_SIZE)
return true;
Expand All @@ -363,6 +421,16 @@ bool __init arch_hugetlb_valid_size(unsigned long size)
return false;
}

bool __init arch_hugetlb_valid_size(unsigned long size)
{
return __hugetlb_valid_size(size);
}

bool arch_hugetlb_migration_supported(struct hstate *h)
{
return __hugetlb_valid_size(huge_page_size(h));
}

#ifdef CONFIG_CONTIG_ALLOC
static __init int gigantic_pages_init(void)
{
Expand Down
4 changes: 4 additions & 0 deletions arch/riscv/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1385,6 +1385,10 @@ void __init misc_mem_init(void)
early_memtest(min_low_pfn << PAGE_SHIFT, max_low_pfn << PAGE_SHIFT);
arch_numa_init();
sparse_init();
#ifdef CONFIG_SPARSEMEM_VMEMMAP
/* The entire VMEMMAP region has been populated. Flush TLB for this region */
local_flush_tlb_kernel_range(VMEMMAP_START, VMEMMAP_END);
#endif
zone_sizes_init();
arch_reserve_crashkernel();
memblock_dump_all();
Expand Down
6 changes: 6 additions & 0 deletions arch/riscv/mm/tlbflush.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ static inline void local_flush_tlb_range_asid(unsigned long start,
local_flush_tlb_range_threshold_asid(start, size, stride, asid);
}

/* Flush a range of kernel pages without broadcasting */
void local_flush_tlb_kernel_range(unsigned long start, unsigned long end)
{
local_flush_tlb_range_asid(start, end - start, PAGE_SIZE, FLUSH_TLB_NO_ASID);
}

static void __ipi_flush_tlb_all(void *info)
{
local_flush_tlb_all();
Expand Down
1 change: 1 addition & 0 deletions arch/sh/include/asm/cacheflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ extern void copy_from_user_page(struct vm_area_struct *vma,
unsigned long len);

#define flush_cache_vmap(start, end) local_flush_cache_all(NULL)
#define flush_cache_vmap_early(start, end) do { } while (0)
#define flush_cache_vunmap(start, end) local_flush_cache_all(NULL)

#define flush_dcache_mmap_lock(mapping) do { } while (0)
Expand Down
1 change: 1 addition & 0 deletions arch/sparc/include/asm/cacheflush_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ static inline void flush_dcache_page(struct page *page)
#define flush_dcache_mmap_unlock(mapping) do { } while (0)

#define flush_cache_vmap(start, end) flush_cache_all()
#define flush_cache_vmap_early(start, end) do { } while (0)
#define flush_cache_vunmap(start, end) flush_cache_all()

/* When a context switch happens we must flush all user windows so that
Expand Down
1 change: 1 addition & 0 deletions arch/sparc/include/asm/cacheflush_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ void flush_ptrace_access(struct vm_area_struct *, struct page *,
#define flush_dcache_mmap_unlock(mapping) do { } while (0)

#define flush_cache_vmap(start, end) do { } while (0)
#define flush_cache_vmap_early(start, end) do { } while (0)
#define flush_cache_vunmap(start, end) do { } while (0)

#endif /* !__ASSEMBLY__ */
Expand Down
14 changes: 6 additions & 8 deletions arch/x86/boot/header.S
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ extra_header_fields:
.word 0 # MinorSubsystemVersion
.long 0 # Win32VersionValue

.long setup_size + ZO__end + pecompat_vsize
# SizeOfImage
.long setup_size + ZO__end # SizeOfImage

.long salign # SizeOfHeaders
.long 0 # CheckSum
Expand Down Expand Up @@ -143,7 +142,7 @@ section_table:
.ascii ".setup"
.byte 0
.byte 0
.long setup_size - salign # VirtualSize
.long pecompat_fstart - salign # VirtualSize
.long salign # VirtualAddress
.long pecompat_fstart - salign # SizeOfRawData
.long salign # PointerToRawData
Expand All @@ -156,8 +155,8 @@ section_table:
#ifdef CONFIG_EFI_MIXED
.asciz ".compat"

.long 8 # VirtualSize
.long setup_size + ZO__end # VirtualAddress
.long pecompat_fsize # VirtualSize
.long pecompat_fstart # VirtualAddress
.long pecompat_fsize # SizeOfRawData
.long pecompat_fstart # PointerToRawData

Expand All @@ -172,17 +171,16 @@ section_table:
* modes this image supports.
*/
.pushsection ".pecompat", "a", @progbits
.balign falign
.set pecompat_vsize, salign
.balign salign
.globl pecompat_fstart
pecompat_fstart:
.byte 0x1 # Version
.byte 8 # Size
.word IMAGE_FILE_MACHINE_I386 # PE machine type
.long setup_size + ZO_efi32_pe_entry # Entrypoint
.byte 0x0 # Sentinel
.popsection
#else
.set pecompat_vsize, 0
.set pecompat_fstart, setup_size
#endif
.ascii ".text"
Expand Down
6 changes: 3 additions & 3 deletions arch/x86/boot/setup.ld
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ SECTIONS
.text : { *(.text .text.*) }
.text32 : { *(.text32) }

.pecompat : { *(.pecompat) }
PROVIDE(pecompat_fsize = setup_size - pecompat_fstart);

. = ALIGN(16);
.rodata : { *(.rodata*) }

Expand All @@ -36,9 +39,6 @@ SECTIONS
. = ALIGN(16);
.data : { *(.data*) }

.pecompat : { *(.pecompat) }
PROVIDE(pecompat_fsize = setup_size - pecompat_fstart);

.signature : {
setup_sig = .;
LONG(0x5a5aaa55)
Expand Down
Loading