Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
e509996
xfrm: extract dst lookup parameters into a struct
ebirger Sep 3, 2024
b846972
xfrm: respect ip protocols rules criteria when performing dst lookups
ebirger Sep 3, 2024
645546a
xfrm: policy: remove last remnants of pernet inexact list
Sep 18, 2024
3f0ab59
xfrm: validate new SA's prefixlen using SA family when sel.family is …
qsn Oct 1, 2024
6889cd2
xfrm: fix one more kernel-infoleak in algo dumping
Oct 8, 2024
1230fe7
netfilter: bpf: must hold reference on net namespace
Oct 10, 2024
bf9821b
btrfs: zoned: fix zone unusable accounting for freed reserved extent
naota Oct 1, 2024
74ec2f3
bcachefs: fix restart handling in bch2_rename2()
Oct 15, 2024
94bdeec
bcachefs: fix bch2_hash_delete() error path
Oct 15, 2024
e1c4d2f
bcachefs: fix restart handling in bch2_fiemap()
Oct 15, 2024
028f3c1
bcachefs: fix missing restart handling in bch2_read_retry_nodecode()
Oct 15, 2024
7ee4be9
bcachefs: fix restart handling in bch2_do_invalidates_work()
Oct 15, 2024
d8b5059
bcachefs: fix restart handling in bch2_alloc_write_key()
Oct 16, 2024
29fd10a
bcachefs: fix restart handling in __bch2_resume_logged_op_finsert()
Oct 16, 2024
6bee2a0
bcachefs: handle restarts in bch2_bucket_io_time_reset()
Oct 15, 2024
a0d11fe
bcachefs: Don't use commit_do() unnecessarily
Oct 14, 2024
4007bbb
bcachefS: ec: fix data type on stripe deletion
Oct 16, 2024
81e0b6c
bcachefs: fix disk reservation accounting in bch2_folio_reservation_g…
Oct 14, 2024
335d318
bcachefs: bch2_folio_reservation_get_partial() is now better behaved
Oct 17, 2024
97535cd
bcachefs: Fix data corruption on -ENOSPC in buffered write path
Oct 17, 2024
07cf8ba
bcachefs: fix incorrect show_options results
Sep 26, 2024
489ecc4
bcachefs: skip mount option handle for empty string.
Oct 10, 2024
b96f8cd
bcachefs: Run in-kernel offline fsck without ratelimit errors
Oct 18, 2024
78cf0ae
bcachefs: INODE_STR_HASH() for bch_inode_unpacked
Oct 18, 2024
d8e8793
bcachefs: Add hash seed, type to inode_to_text()
Sep 28, 2024
15a3836
bcachefs: Repair mismatches in inode hash seed, type
Oct 18, 2024
dc96656
bcachefs: bch2_hash_set_or_get_in_snapshot()
Oct 18, 2024
bc6d2d1
bcachefs: fsck: Improve hash_check_key()
Oct 18, 2024
293c485
HID: i2c-hid: Delayed i2c resume wakeup for 0x0d42 Goodix touchpad
PolyMeilex Oct 7, 2024
526748b
HID: multitouch: Add quirk for Logitech Bolt receiver w/ Casa touchpad
Oct 4, 2024
5126887
HID: lenovo: Add support for Thinkpad X1 Tablet Gen 3 keyboard
jwrdegoede Oct 10, 2024
f2767a4
net: pse-pd: Fix out of bound for loop
kmaincent Oct 15, 2024
2cb3f56
net/sun3_82586: fix potential memory leak in sun3_82586_send_packet()
Oct 15, 2024
e4dd8bf
be2net: fix potential memory leak in be_xmit()
Oct 15, 2024
f99cf99
net: plip: fix break; causing plip to never transmit
Oct 15, 2024
9f86df0
MAINTAINERS: add Simon as an official reviewer
kuba-moo Oct 15, 2024
de96f6a
net: phy: dp83822: Fix reset pin definitions
lxmchl Oct 16, 2024
4ab3e49
bnxt_en: replace ptp_lock with irqsave variant
vvfedorenko Oct 16, 2024
bd28df2
octeon_ep: Implement helper for iterating packets in Rx queue
Oct 17, 2024
eb59200
octeon_ep: Add SKB allocation failures handling in __octep_oq_process…
Oct 17, 2024
12bc149
net: dsa: mv88e6xxx: Fix error when setting port policy on mv88e6393x
prashle Oct 16, 2024
3e14d8e
mailmap: update entry for Jesper Dangaard Brouer
netoptimizer Oct 16, 2024
3b05b9c
MAINTAINERS: add samples/pktgen to NETWORKING [GENERAL]
liuhangbin Oct 18, 2024
eb5db64
bcachefs: Fix __bch2_fsck_err() warning
Oct 19, 2024
3956ff8
bcachefs: Don't use wait_event_interruptible() in recovery
Oct 19, 2024
f0d3302
bcachefs: Workaround for kvmalloc() not supporting > INT_MAX allocations
Oct 19, 2024
e04ee86
bcachefs: Mark more errors as AUTOFIX
Oct 20, 2024
a069f01
bcachefs: Set bch_inode_unpacked.bi_snapshot in old inode path
Oct 20, 2024
a552e2e
bpf, arm64: Fix address emission with tag-based KASAN enabled
pcc Oct 18, 2024
efeddd5
fsl/fman: Save device references taken in mac_probe()
Oct 15, 2024
1dec67e
fsl/fman: Fix refcount handling of fman-related devices
Oct 15, 2024
374d410
Merge branch 'fsl-fman-fix-refcount-handling-of-fman-related-devices'
Oct 21, 2024
306ed17
netfilter: xtables: fix typo causing some targets not to load on IPv6
ummakynes Oct 20, 2024
47dd544
net: wwan: fix global oob in wwan_rtnl_policy
f0rm2l1n Oct 15, 2024
95ecba6
net: fix races in netdev_tx_sent_queue()/dev_watchdog()
edumazet Oct 15, 2024
d95d9a3
virtio_net: fix integer overflow in stats
mstsirkin Oct 16, 2024
b69269c
LoongArch: Use "Exception return address" to comment ERA
Oct 21, 2024
b7296f9
LoongArch: Get correct cores_per_package for SMT systems
chenhuacai Oct 21, 2024
69cc6fa
LoongArch: Enable IRQ if do_ale() triggered in irq-enabled context
chenhuacai Oct 21, 2024
2ed119a
LoongArch: Set correct size for vDSO code mapping
chenhuacai Oct 21, 2024
134475a
LoongArch: Don't crash in stack_top() for tasks without vDSO
t-8ch Oct 21, 2024
d2f8671
LoongArch: Set initial pte entry with PAGE_GLOBAL for kernel space
bibo-mao Oct 21, 2024
aff1871
objpool: fix choosing allocation for percpu slots
viktormalik Aug 26, 2024
fa28755
Merge tag 'nf-24-10-21' of git://git.kernel.org/pub/scm/linux/kernel/…
Oct 22, 2024
f7b4cf0
mlxsw: spectrum_router: fix xa_store() error checking
Oct 17, 2024
8a7d12d
net: usb: usbnet: fix name regression
oneukum Oct 17, 2024
3510e68
btrfs: clear force-compress on remount when compress mount option is …
fdmanana Oct 14, 2024
5f9062a
btrfs: qgroup: set a more sane default value for subtree drop threshold
adam900710 Sep 10, 2024
f10f59f
btrfs: fix the delalloc range locking if sector size < page size
adam900710 Oct 8, 2024
7a23390
btrfs: fix read corruption due to race with extent map merging
boryas Oct 18, 2024
3c36a72
btrfs: reject ro->rw reconfiguration if there are hard ro requirements
adam900710 Sep 19, 2024
75f49c3
btrfs: fix passing 0 to ERR_PTR in btrfs_search_dir_index_item()
Oct 22, 2024
67373ca
jfs: Fix sanity check in dbMount
kleikamp Oct 22, 2024
1f97c03
bpf: Preserve param->string when parsing mount options
Oct 22, 2024
6fad274
bpf: Add MEM_WRITE attribute
borkmann Oct 21, 2024
8ea6073
bpf: Fix overloading of MEM_UNINIT's meaning
borkmann Oct 21, 2024
14a3d3e
bpf: Remove MEM_UNINIT from skb/xdp MTU helpers
borkmann Oct 21, 2024
baa802d
selftests/bpf: Add test for writes to .rodata
borkmann Oct 21, 2024
82bbe13
selftests/bpf: Add test for passing in uninit mtu_len
borkmann Oct 21, 2024
73f3508
tracing/probes: Fix MAX_TRACE_ARGS limit handling
mikelr Sep 30, 2024
0b6e2e2
tracing: Consider the NULL character when validating the event length
Leo-Yan Oct 7, 2024
34d35b4
net/sched: act_api: deny mismatched skip_sw/skip_hw flags for actions…
vladimiroltean Oct 17, 2024
f504465
net: sched: fix use-after-free in taprio_change()
dmantipov Oct 18, 2024
b22db8b
net: sched: use RCU read-side critical section in taprio_dump()
dmantipov Oct 18, 2024
10ce0db
r8169: avoid unsolicited interrupts
hkallweit Oct 18, 2024
6e62807
posix-clock: posix-clock: Fix unbalanced locking in pc_clock_settime()
Oct 18, 2024
3c25226
LoongArch: Make KASAN usable for variable cpu_vabits
chenhuacai Oct 23, 2024
73adbd9
LoongArch: KVM: Mark hrtimer to expire in hard interrupt context
chenhuacai Oct 23, 2024
989fa51
Bluetooth: hci_core: Disable works on hci_unregister_dev
Vudentz Oct 22, 2024
1bf4470
Bluetooth: SCO: Fix UAF on sco_sock_timeout
Vudentz Oct 22, 2024
246b435
Bluetooth: ISO: Fix UAF on iso_sock_timeout
Vudentz Oct 22, 2024
0ee288e
bpf,perf: Fix perf_event_detach_bpf_prog error handling
olsajiri Oct 23, 2024
9806f28
bpf: fix do_misc_fixups() for bpf_get_branch_snapshot()
anakryiko Oct 23, 2024
1e424d0
Merge tag 'ipsec-2024-10-22' of git://git.kernel.org/pub/scm/linux/ke…
Oct 24, 2024
1876479
Merge tag 'for-net-2024-10-23' of git://git.kernel.org/pub/scm/linux/…
Oct 24, 2024
ee76eb2
net: dsa: microchip: disable EEE for KSZ879x/KSZ877x/KSZ876x
Gateworks Oct 18, 2024
4c26280
hv_netvsc: Fix VF namespace also in synthetic NIC NETDEV_REGISTER event
haiyangz Oct 18, 2024
64761c9
net: usb: qmi_wwan: add Fibocom FG132 0x0112 composition
Oct 18, 2024
67af86a
net: dsa: mv88e6xxx: group cycle counter coefficients
shenghaoyang Oct 20, 2024
7e3c180
net: dsa: mv88e6xxx: read cycle counter period from hardware
shenghaoyang Oct 20, 2024
3e65ede
net: dsa: mv88e6xxx: support 4000ps cycle counter period
shenghaoyang Oct 20, 2024
9efc44f
Merge branch 'net-dsa-mv88e6xxx-fix-mv88e6393x-phc-frequency-on-inter…
Oct 24, 2024
c2f8030
bpf: Add the missing BPF_LINK_TYPE invocation for sockmap
Oct 24, 2024
8421d4c
bpf: Check validity of link->type in bpf_link_show_fdinfo()
Oct 24, 2024
d5fb316
Merge branch 'add-the-missing-bpf_link_type-invocation-for-sockmap'
anakryiko Oct 24, 2024
f009e94
Revert "9p: Enable multipage folios"
martinetd Oct 23, 2024
c1e8227
Merge tag 'bcachefs-2024-10-22' of https://github.com/koverstreet/bca…
torvalds Oct 24, 2024
6cc65ab
Merge tag 'jfs-6.12-rc5' of github.com:kleikamp/linux-shaggy
torvalds Oct 24, 2024
4e46774
Merge tag 'for-6.12-rc4-tag' of git://git.kernel.org/pub/scm/linux/ke…
torvalds Oct 24, 2024
c2cd8e4
Merge tag 'probes-fixes-v6.12-rc4.2' of git://git.kernel.org/pub/scm/…
torvalds Oct 24, 2024
3964f82
Merge tag 'loongarch-fixes-6.12-1' of git://git.kernel.org/pub/scm/li…
torvalds Oct 24, 2024
c9a50b9
Merge tag 'hid-for-linus-20241024' of git://git.kernel.org/pub/scm/li…
torvalds Oct 24, 2024
d44cd82
Merge tag 'net-6.12-rc5' of git://git.kernel.org/pub/scm/linux/kernel…
torvalds Oct 24, 2024
ae90f6a
Merge tag 'bpf-fixes' of git://git.kernel.org/pub/scm/linux/kernel/gi…
torvalds Oct 24, 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
5 changes: 5 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,11 @@ Jens Axboe <axboe@kernel.dk> <axboe@fb.com>
Jens Axboe <axboe@kernel.dk> <axboe@meta.com>
Jens Osterkamp <Jens.Osterkamp@de.ibm.com>
Jernej Skrabec <jernej.skrabec@gmail.com> <jernej.skrabec@siol.net>
Jesper Dangaard Brouer <hawk@kernel.org> <brouer@redhat.com>
Jesper Dangaard Brouer <hawk@kernel.org> <hawk@comx.dk>
Jesper Dangaard Brouer <hawk@kernel.org> <jbrouer@redhat.com>
Jesper Dangaard Brouer <hawk@kernel.org> <jdb@comx.dk>
Jesper Dangaard Brouer <hawk@kernel.org> <netoptimizer@brouer.com>
Jessica Zhang <quic_jesszhan@quicinc.com> <jesszhan@codeaurora.org>
Jilai Wang <quic_jilaiw@quicinc.com> <jilaiw@codeaurora.org>
Jiri Kosina <jikos@kernel.org> <jikos@jikos.cz>
Expand Down
2 changes: 2 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -16042,6 +16042,7 @@ M: "David S. Miller" <davem@davemloft.net>
M: Eric Dumazet <edumazet@google.com>
M: Jakub Kicinski <kuba@kernel.org>
M: Paolo Abeni <pabeni@redhat.com>
R: Simon Horman <horms@kernel.org>
L: netdev@vger.kernel.org
S: Maintained
P: Documentation/process/maintainer-netdev.rst
Expand Down Expand Up @@ -16084,6 +16085,7 @@ F: include/uapi/linux/rtnetlink.h
F: lib/net_utils.c
F: lib/random32.c
F: net/
F: samples/pktgen/
F: tools/net/
F: tools/testing/selftests/net/
X: Documentation/networking/mac80211-injection.rst
Expand Down
12 changes: 10 additions & 2 deletions arch/arm64/net/bpf_jit_comp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2220,7 +2220,11 @@ static int prepare_trampoline(struct jit_ctx *ctx, struct bpf_tramp_image *im,
emit(A64_STR64I(A64_R(20), A64_SP, regs_off + 8), ctx);

if (flags & BPF_TRAMP_F_CALL_ORIG) {
emit_a64_mov_i64(A64_R(0), (const u64)im, ctx);
/* for the first pass, assume the worst case */
if (!ctx->image)
ctx->idx += 4;
else
emit_a64_mov_i64(A64_R(0), (const u64)im, ctx);
emit_call((const u64)__bpf_tramp_enter, ctx);
}

Expand Down Expand Up @@ -2264,7 +2268,11 @@ static int prepare_trampoline(struct jit_ctx *ctx, struct bpf_tramp_image *im,

if (flags & BPF_TRAMP_F_CALL_ORIG) {
im->ip_epilogue = ctx->ro_image + ctx->idx;
emit_a64_mov_i64(A64_R(0), (const u64)im, ctx);
/* for the first pass, assume the worst case */
if (!ctx->image)
ctx->idx += 4;
else
emit_a64_mov_i64(A64_R(0), (const u64)im, ctx);
emit_call((const u64)__bpf_tramp_exit, ctx);
}

Expand Down
4 changes: 4 additions & 0 deletions arch/loongarch/include/asm/bootinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ struct loongson_board_info {

#define NR_WORDS DIV_ROUND_UP(NR_CPUS, BITS_PER_LONG)

/*
* The "core" of cores_per_node and cores_per_package stands for a
* logical core, which means in a SMT system it stands for a thread.
*/
struct loongson_system_configuration {
int nr_cpus;
int nr_nodes;
Expand Down
2 changes: 1 addition & 1 deletion arch/loongarch/include/asm/kasan.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#define XRANGE_SHIFT (48)

/* Valid address length */
#define XRANGE_SHADOW_SHIFT (PGDIR_SHIFT + PAGE_SHIFT - 3)
#define XRANGE_SHADOW_SHIFT min(cpu_vabits, VA_BITS)
/* Used for taking out the valid address */
#define XRANGE_SHADOW_MASK GENMASK_ULL(XRANGE_SHADOW_SHIFT - 1, 0)
/* One segment whole address space size */
Expand Down
2 changes: 1 addition & 1 deletion arch/loongarch/include/asm/loongarch.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@
#define CSR_ESTAT_IS_WIDTH 15
#define CSR_ESTAT_IS (_ULCAST_(0x7fff) << CSR_ESTAT_IS_SHIFT)

#define LOONGARCH_CSR_ERA 0x6 /* ERA */
#define LOONGARCH_CSR_ERA 0x6 /* Exception return address */

#define LOONGARCH_CSR_BADV 0x7 /* Bad virtual address */

Expand Down
11 changes: 11 additions & 0 deletions arch/loongarch/include/asm/pgalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#define __HAVE_ARCH_PMD_ALLOC_ONE
#define __HAVE_ARCH_PUD_ALLOC_ONE
#define __HAVE_ARCH_PTE_ALLOC_ONE_KERNEL
#include <asm-generic/pgalloc.h>

static inline void pmd_populate_kernel(struct mm_struct *mm,
Expand Down Expand Up @@ -44,6 +45,16 @@ extern void pagetable_init(void);

extern pgd_t *pgd_alloc(struct mm_struct *mm);

static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm)
{
pte_t *pte = __pte_alloc_one_kernel(mm);

if (pte)
kernel_pte_init(pte);

return pte;
}

#define __pte_free_tlb(tlb, pte, address) \
do { \
pagetable_pte_dtor(page_ptdesc(pte)); \
Expand Down
35 changes: 7 additions & 28 deletions arch/loongarch/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ extern void set_pmd_at(struct mm_struct *mm, unsigned long addr, pmd_t *pmdp, pm
extern void pgd_init(void *addr);
extern void pud_init(void *addr);
extern void pmd_init(void *addr);
extern void kernel_pte_init(void *addr);

/*
* Encode/decode swap entries and swap PTEs. Swap PTEs are all PTEs that
Expand Down Expand Up @@ -325,39 +326,17 @@ static inline void set_pte(pte_t *ptep, pte_t pteval)
{
WRITE_ONCE(*ptep, pteval);

if (pte_val(pteval) & _PAGE_GLOBAL) {
pte_t *buddy = ptep_buddy(ptep);
/*
* Make sure the buddy is global too (if it's !none,
* it better already be global)
*/
if (pte_none(ptep_get(buddy))) {
#ifdef CONFIG_SMP
/*
* For SMP, multiple CPUs can race, so we need
* to do this atomically.
*/
__asm__ __volatile__(
__AMOR "$zero, %[global], %[buddy] \n"
: [buddy] "+ZB" (buddy->pte)
: [global] "r" (_PAGE_GLOBAL)
: "memory");

DBAR(0b11000); /* o_wrw = 0b11000 */
#else /* !CONFIG_SMP */
WRITE_ONCE(*buddy, __pte(pte_val(ptep_get(buddy)) | _PAGE_GLOBAL));
#endif /* CONFIG_SMP */
}
}
if (pte_val(pteval) & _PAGE_GLOBAL)
DBAR(0b11000); /* o_wrw = 0b11000 */
#endif
}

static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep)
{
/* Preserve global status for the pair */
if (pte_val(ptep_get(ptep_buddy(ptep))) & _PAGE_GLOBAL)
set_pte(ptep, __pte(_PAGE_GLOBAL));
else
set_pte(ptep, __pte(0));
pte_t pte = ptep_get(ptep);
pte_val(pte) &= _PAGE_GLOBAL;
set_pte(ptep, pte);
}

#define PGD_T_LOG2 (__builtin_ffs(sizeof(pgd_t)) - 1)
Expand Down
16 changes: 9 additions & 7 deletions arch/loongarch/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,13 +293,15 @@ unsigned long stack_top(void)
{
unsigned long top = TASK_SIZE & PAGE_MASK;

/* Space for the VDSO & data page */
top -= PAGE_ALIGN(current->thread.vdso->size);
top -= VVAR_SIZE;

/* Space to randomize the VDSO base */
if (current->flags & PF_RANDOMIZE)
top -= VDSO_RANDOMIZE_SIZE;
if (current->thread.vdso) {
/* Space for the VDSO & data page */
top -= PAGE_ALIGN(current->thread.vdso->size);
top -= VVAR_SIZE;

/* Space to randomize the VDSO base */
if (current->flags & PF_RANDOMIZE)
top -= VDSO_RANDOMIZE_SIZE;
}

return top;
}
Expand Down
3 changes: 2 additions & 1 deletion arch/loongarch/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
#define SMBIOS_FREQHIGH_OFFSET 0x17
#define SMBIOS_FREQLOW_MASK 0xFF
#define SMBIOS_CORE_PACKAGE_OFFSET 0x23
#define SMBIOS_THREAD_PACKAGE_OFFSET 0x25
#define LOONGSON_EFI_ENABLE (1 << 3)

unsigned long fw_arg0, fw_arg1, fw_arg2;
Expand Down Expand Up @@ -125,7 +126,7 @@ static void __init parse_cpu_table(const struct dmi_header *dm)
cpu_clock_freq = freq_temp * 1000000;

loongson_sysconf.cpuname = (void *)dmi_string_parse(dm, dmi_data[16]);
loongson_sysconf.cores_per_package = *(dmi_data + SMBIOS_CORE_PACKAGE_OFFSET);
loongson_sysconf.cores_per_package = *(dmi_data + SMBIOS_THREAD_PACKAGE_OFFSET);

pr_info("CpuClock = %llu\n", cpu_clock_freq);
}
Expand Down
5 changes: 5 additions & 0 deletions arch/loongarch/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,9 @@ asmlinkage void noinstr do_ale(struct pt_regs *regs)
#else
unsigned int *pc;

if (regs->csr_prmd & CSR_PRMD_PIE)
local_irq_enable();

perf_sw_event(PERF_COUNT_SW_ALIGNMENT_FAULTS, 1, regs, regs->csr_badvaddr);

/*
Expand All @@ -579,6 +582,8 @@ asmlinkage void noinstr do_ale(struct pt_regs *regs)
die_if_kernel("Kernel ale access", regs);
force_sig_fault(SIGBUS, BUS_ADRALN, (void __user *)regs->csr_badvaddr);
out:
if (regs->csr_prmd & CSR_PRMD_PIE)
local_irq_disable();
#endif
irqentry_exit(regs, state);
}
Expand Down
8 changes: 4 additions & 4 deletions arch/loongarch/kernel/vdso.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ static union {
struct loongarch_vdso_data vdata;
} loongarch_vdso_data __page_aligned_data;

static struct page *vdso_pages[] = { NULL };
struct vdso_data *vdso_data = generic_vdso_data.data;
struct vdso_pcpu_data *vdso_pdata = loongarch_vdso_data.vdata.pdata;
struct vdso_rng_data *vdso_rng_data = &loongarch_vdso_data.vdata.rng_data;
Expand Down Expand Up @@ -85,10 +84,8 @@ static vm_fault_t vvar_fault(const struct vm_special_mapping *sm,

struct loongarch_vdso_info vdso_info = {
.vdso = vdso_start,
.size = PAGE_SIZE,
.code_mapping = {
.name = "[vdso]",
.pages = vdso_pages,
.mremap = vdso_mremap,
},
.data_mapping = {
Expand All @@ -103,11 +100,14 @@ static int __init init_vdso(void)
unsigned long i, cpu, pfn;

BUG_ON(!PAGE_ALIGNED(vdso_info.vdso));
BUG_ON(!PAGE_ALIGNED(vdso_info.size));

for_each_possible_cpu(cpu)
vdso_pdata[cpu].node = cpu_to_node(cpu);

vdso_info.size = PAGE_ALIGN(vdso_end - vdso_start);
vdso_info.code_mapping.pages =
kcalloc(vdso_info.size / PAGE_SIZE, sizeof(struct page *), GFP_KERNEL);

pfn = __phys_to_pfn(__pa_symbol(vdso_info.vdso));
for (i = 0; i < vdso_info.size / PAGE_SIZE; i++)
vdso_info.code_mapping.pages[i] = pfn_to_page(pfn + i);
Expand Down
7 changes: 4 additions & 3 deletions arch/loongarch/kvm/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,11 @@ static void _kvm_save_timer(struct kvm_vcpu *vcpu)
if (kvm_vcpu_is_blocking(vcpu)) {

/*
* HRTIMER_MODE_PINNED is suggested since vcpu may run in
* the same physical cpu in next time
* HRTIMER_MODE_PINNED_HARD is suggested since vcpu may run in
* the same physical cpu in next time, and the timer should run
* in hardirq context even in the PREEMPT_RT case.
*/
hrtimer_start(&vcpu->arch.swtimer, expire, HRTIMER_MODE_ABS_PINNED);
hrtimer_start(&vcpu->arch.swtimer, expire, HRTIMER_MODE_ABS_PINNED_HARD);
}
}

Expand Down
2 changes: 1 addition & 1 deletion arch/loongarch/kvm/vcpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1457,7 +1457,7 @@ int kvm_arch_vcpu_create(struct kvm_vcpu *vcpu)
vcpu->arch.vpid = 0;
vcpu->arch.flush_gpa = INVALID_GPA;

hrtimer_init(&vcpu->arch.swtimer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_PINNED);
hrtimer_init(&vcpu->arch.swtimer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_PINNED_HARD);
vcpu->arch.swtimer.function = kvm_swtimer_wakeup;

vcpu->arch.handle_exit = kvm_handle_exit;
Expand Down
2 changes: 2 additions & 0 deletions arch/loongarch/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ pte_t * __init populate_kernel_pte(unsigned long addr)
pte = memblock_alloc(PAGE_SIZE, PAGE_SIZE);
if (!pte)
panic("%s: Failed to allocate memory\n", __func__);

pmd_populate_kernel(&init_mm, pmd, pte);
kernel_pte_init(pte);
}

return pte_offset_kernel(pmd, addr);
Expand Down
20 changes: 20 additions & 0 deletions arch/loongarch/mm/pgtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,26 @@ void pud_init(void *addr)
EXPORT_SYMBOL_GPL(pud_init);
#endif

void kernel_pte_init(void *addr)
{
unsigned long *p, *end;

p = (unsigned long *)addr;
end = p + PTRS_PER_PTE;

do {
p[0] = _PAGE_GLOBAL;
p[1] = _PAGE_GLOBAL;
p[2] = _PAGE_GLOBAL;
p[3] = _PAGE_GLOBAL;
p[4] = _PAGE_GLOBAL;
p += 8;
p[-3] = _PAGE_GLOBAL;
p[-2] = _PAGE_GLOBAL;
p[-1] = _PAGE_GLOBAL;
} while (p != end);
}

pmd_t mk_pmd(struct page *page, pgprot_t prot)
{
pmd_t pmd;
Expand Down
2 changes: 2 additions & 0 deletions drivers/hid/hid-ids.h
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,7 @@
#define I2C_DEVICE_ID_GOODIX_01E8 0x01e8
#define I2C_DEVICE_ID_GOODIX_01E9 0x01e9
#define I2C_DEVICE_ID_GOODIX_01F0 0x01f0
#define I2C_DEVICE_ID_GOODIX_0D42 0x0d42

#define USB_VENDOR_ID_GOODTOUCH 0x1aad
#define USB_DEVICE_ID_GOODTOUCH_000f 0x000f
Expand Down Expand Up @@ -868,6 +869,7 @@
#define USB_DEVICE_ID_LOGITECH_NANO_RECEIVER_LIGHTSPEED_1 0xc539
#define USB_DEVICE_ID_LOGITECH_NANO_RECEIVER_LIGHTSPEED_1_1 0xc53f
#define USB_DEVICE_ID_LOGITECH_NANO_RECEIVER_POWERPLAY 0xc53a
#define USB_DEVICE_ID_LOGITECH_BOLT_RECEIVER 0xc548
#define USB_DEVICE_ID_SPACETRAVELLER 0xc623
#define USB_DEVICE_ID_SPACENAVIGATOR 0xc626
#define USB_DEVICE_ID_DINOVO_DESKTOP 0xc704
Expand Down
8 changes: 8 additions & 0 deletions drivers/hid/hid-lenovo.c
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,7 @@ static int lenovo_input_mapping(struct hid_device *hdev,
return lenovo_input_mapping_tp10_ultrabook_kbd(hdev, hi, field,
usage, bit, max);
case USB_DEVICE_ID_LENOVO_X1_TAB:
case USB_DEVICE_ID_LENOVO_X1_TAB3:
return lenovo_input_mapping_x1_tab_kbd(hdev, hi, field, usage, bit, max);
default:
return 0;
Expand Down Expand Up @@ -583,6 +584,7 @@ static ssize_t attr_fn_lock_store(struct device *dev,
break;
case USB_DEVICE_ID_LENOVO_TP10UBKBD:
case USB_DEVICE_ID_LENOVO_X1_TAB:
case USB_DEVICE_ID_LENOVO_X1_TAB3:
ret = lenovo_led_set_tp10ubkbd(hdev, TP10UBKBD_FN_LOCK_LED, value);
if (ret)
return ret;
Expand Down Expand Up @@ -776,6 +778,7 @@ static int lenovo_event(struct hid_device *hdev, struct hid_field *field,
return lenovo_event_cptkbd(hdev, field, usage, value);
case USB_DEVICE_ID_LENOVO_TP10UBKBD:
case USB_DEVICE_ID_LENOVO_X1_TAB:
case USB_DEVICE_ID_LENOVO_X1_TAB3:
return lenovo_event_tp10ubkbd(hdev, field, usage, value);
default:
return 0;
Expand Down Expand Up @@ -1056,6 +1059,7 @@ static int lenovo_led_brightness_set(struct led_classdev *led_cdev,
break;
case USB_DEVICE_ID_LENOVO_TP10UBKBD:
case USB_DEVICE_ID_LENOVO_X1_TAB:
case USB_DEVICE_ID_LENOVO_X1_TAB3:
ret = lenovo_led_set_tp10ubkbd(hdev, tp10ubkbd_led[led_nr], value);
break;
}
Expand Down Expand Up @@ -1286,6 +1290,7 @@ static int lenovo_probe(struct hid_device *hdev,
break;
case USB_DEVICE_ID_LENOVO_TP10UBKBD:
case USB_DEVICE_ID_LENOVO_X1_TAB:
case USB_DEVICE_ID_LENOVO_X1_TAB3:
ret = lenovo_probe_tp10ubkbd(hdev);
break;
default:
Expand Down Expand Up @@ -1372,6 +1377,7 @@ static void lenovo_remove(struct hid_device *hdev)
break;
case USB_DEVICE_ID_LENOVO_TP10UBKBD:
case USB_DEVICE_ID_LENOVO_X1_TAB:
case USB_DEVICE_ID_LENOVO_X1_TAB3:
lenovo_remove_tp10ubkbd(hdev);
break;
}
Expand Down Expand Up @@ -1421,6 +1427,8 @@ static const struct hid_device_id lenovo_devices[] = {
*/
{ HID_DEVICE(BUS_USB, HID_GROUP_GENERIC,
USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_X1_TAB) },
{ HID_DEVICE(BUS_USB, HID_GROUP_GENERIC,
USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_X1_TAB3) },
{ }
};

Expand Down
Loading