Commit graph

5852 commits

Author SHA1 Message Date
Ksawlii
beeee29a16 Revert "mm/swapfile: skip HugeTLB pages for unuse_vma"
This reverts commit e8eb8b10a3.
2024-11-24 00:22:53 +01:00
Ksawlii
bfa37c9cf0 Revert "wifi: mac80211: fix potential key use-after-free"
This reverts commit e5e07ee6ec.
2024-11-24 00:22:53 +01:00
Ksawlii
f172b138b7 Revert "KVM: Fix a data race on last_boosted_vcpu in kvm_vcpu_on_spin()"
This reverts commit 1ea1717b12.
2024-11-24 00:22:53 +01:00
Ksawlii
0a13b31c06 Revert "io_uring/sqpoll: do not allow pinning outside of cpuset"
This reverts commit 33068eaaff.
2024-11-24 00:22:53 +01:00
Ksawlii
2da7fc1273 Revert "io_uring/sqpoll: retain test for whether the CPU is valid"
This reverts commit 376645a224.
2024-11-24 00:22:53 +01:00
Ksawlii
7ea1210e5d Revert "io_uring/sqpoll: do not put cpumask on stack"
This reverts commit 43d03276a6.
2024-11-24 00:22:52 +01:00
Ksawlii
f3da6367d0 Revert "s390/sclp_vt220: Convert newlines to CRLF instead of LFCR"
This reverts commit 253e51ed4b.
2024-11-24 00:22:52 +01:00
Ksawlii
89c3aaef2c Revert "blk-rq-qos: fix crash on rq_qos_wait vs. rq_qos_wake_function race"
This reverts commit 6df069c465.
2024-11-24 00:22:52 +01:00
Ksawlii
05db595c67 Revert "io_uring/sqpoll: close race on waiting for sqring entries"
This reverts commit a00eccba07.
2024-11-24 00:22:52 +01:00
Ksawlii
9bf31e8691 Revert "drm/radeon: Fix encoder->possible_clones"
This reverts commit ff586b4f24.
2024-11-24 00:22:52 +01:00
Ksawlii
cd921badef Revert "drm/vmwgfx: Handle surface check failure correctly"
This reverts commit 9af2b41a3f.
2024-11-24 00:22:52 +01:00
Ksawlii
4cb2abe049 Revert "iio: dac: ad5770r: add missing select REGMAP_SPI in Kconfig"
This reverts commit 00b7cccb7b.
2024-11-24 00:22:52 +01:00
Ksawlii
4eb3f182c5 Revert "iio: dac: ltc1660: add missing select REGMAP_SPI in Kconfig"
This reverts commit 238d7da34f.
2024-11-24 00:22:52 +01:00
Ksawlii
587a58032f Revert "iio: dac: stm32-dac-core: add missing select REGMAP_MMIO in Kconfig"
This reverts commit ec258c5471.
2024-11-24 00:22:52 +01:00
Ksawlii
9f9f13b608 Revert "iio: adc: ti-ads8688: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig"
This reverts commit 99569caa32.
2024-11-24 00:22:52 +01:00
Ksawlii
f2d6a87edf Revert "iio: hid-sensors: Fix an error handling path in _hid_sensor_set_report_latency()"
This reverts commit e3f1ddd8b7.
2024-11-24 00:22:52 +01:00
Ksawlii
845b5cd07c Revert "iio: light: veml6030: fix ALS sensor resolution"
This reverts commit 1e4429e60a.
2024-11-24 00:22:52 +01:00
Ksawlii
fd58af9215 Revert "iio: light: veml6030: fix IIO device retrieval from embedded device"
This reverts commit 923da71956.
2024-11-24 00:22:52 +01:00
Ksawlii
c574fc2427 Revert "iio: light: opt3001: add missing full-scale range value"
This reverts commit 903685b6d9.
2024-11-24 00:22:52 +01:00
Ksawlii
58b3c7d501 Revert "iio: proximity: mb1232: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig"
This reverts commit a17505e7cc.
2024-11-24 00:22:52 +01:00
Ksawlii
d773aac6cb Revert "iio: adc: ti-ads124s08: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig"
This reverts commit 754f9225af.
2024-11-24 00:22:52 +01:00
Ksawlii
cafb5ebf44 Revert "Bluetooth: Remove debugfs directory on module init failure"
This reverts commit 66a71e8659.
2024-11-24 00:22:52 +01:00
Ksawlii
27042df7ec Revert "Bluetooth: btusb: Fix regression with fake CSR controllers 0a12:0001"
This reverts commit 2ae7c56a87.
2024-11-24 00:22:51 +01:00
Ksawlii
af649ff977 Revert "xhci: Fix incorrect stream context type macro"
This reverts commit 26ca5dede5.
2024-11-24 00:22:51 +01:00
Ksawlii
d4d4ab32a4 Revert "USB: serial: option: add support for Quectel EG916Q-GL"
This reverts commit a1a0afc6c9.
2024-11-24 00:22:51 +01:00
Ksawlii
781ec55e46 Revert "USB: serial: option: add Telit FN920C04 MBIM compositions"
This reverts commit ee0cc96a9d.
2024-11-24 00:22:51 +01:00
Ksawlii
d6fb0293d8 Revert "parport: Proper fix for array out-of-bounds access"
This reverts commit aad6868e15.
2024-11-24 00:22:51 +01:00
Ksawlii
f1cb82372f Revert "x86/resctrl: Annotate get_mem_config() functions as __init"
This reverts commit 8436a07c7a.
2024-11-24 00:22:51 +01:00
Ksawlii
57c42b3af7 Revert "x86/apic: Always explicitly disarm TSC-deadline timer"
This reverts commit 5a5d98e292.
2024-11-24 00:22:51 +01:00
Ksawlii
e19e6b3388 Revert "x86/entry_32: Do not clobber user EFLAGS.ZF"
This reverts commit 632fba79b9.
2024-11-24 00:22:51 +01:00
Ksawlii
5e83655d80 Revert "x86/entry_32: Clear CPU buffers after register restore in NMI return"
This reverts commit 0c7e61432d.
2024-11-24 00:22:51 +01:00
Ksawlii
a91e7ad42f Revert "irqchip/gic-v4: Don't allow a VMOVP on a dying VPE"
This reverts commit 9b97db363b.
2024-11-24 00:22:51 +01:00
Ksawlii
d22ac47288 Revert "mptcp: track and update contiguous data status"
This reverts commit dcd9060576.
2024-11-24 00:22:51 +01:00
Ksawlii
f17b8dfeea Revert "mptcp: handle consistently DSS corruption"
This reverts commit 3f4af240b0.
2024-11-24 00:22:51 +01:00
Ksawlii
6236b4ccaf Revert "tcp: fix mptcp DSS corruption due to large pmtu xmit"
This reverts commit cce6ef7552.
2024-11-24 00:22:51 +01:00
Ksawlii
3d2f22dcfc Revert "nilfs2: propagate directory read errors from nilfs_find_entry()"
This reverts commit b3a475e970.
2024-11-24 00:22:51 +01:00
Ksawlii
62d9425e52 Revert "powerpc/mm: Always update max/min_low_pfn in mem_topology_setup()"
This reverts commit d3b3390017.
2024-11-24 00:22:51 +01:00
Ksawlii
fa732d6508 Revert "ALSA: hda/conexant - Use cached pin control for Node 0x1d on HP EliteOne 1000 G2"
This reverts commit a717b5eb7d.
2024-11-24 00:22:50 +01:00
Greg Kroah-Hartman
b22a85dacf Linux 5.10.229
Link: https://lore.kernel.org/r/20241106120303.135636370@linuxfoundation.org
Tested-by: Pavel Machek (CIP) <pavel@denx.de>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-23 23:22:06 +01:00
Johannes Berg
a2b08af2ca mac80211: always have ieee80211_sta_restart()
commit 3fa5a0f5b0d69e31c6476cd81afeca3cc25a4927 upstream.

When CONFIG_PM isn't defined we don't have the function
ieee80211_sta_restart() compiled in, but we always need
it now for firmware restart. Move it out of the ifdef.

Fixes: 7d352ccf1e99 ("mac80211: Add support to trigger sta disconnect on hardware restart")
Link: https://lore.kernel.org/r/20220312221957.1fa96c72db51.I8ecaa5f9402fede0272161e0531ab930b97fba3e@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-23 23:22:06 +01:00
Jeongjun Park
8d0f1f6420 vt: prevent kernel-infoleak in con_font_get()
commit f956052e00de211b5c9ebaa1958366c23f82ee9e upstream.

font.data may not initialize all memory spaces depending on the implementation
of vc->vc_sw->con_font_get. This may cause info-leak, so to prevent this, it
is safest to modify it to initialize the allocated memory space to 0, and it
generally does not affect the overall performance of the system.

Cc: stable@vger.kernel.org
Reported-by: syzbot+955da2d57931604ee691@syzkaller.appspotmail.com
Fixes: 05e2600cb0a4 ("VT: Bump font size limitation to 64x128 pixels")
Signed-off-by: Jeongjun Park <aha310510@gmail.com>
Link: https://lore.kernel.org/r/20241010174619.59662-1-aha310510@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-23 23:22:06 +01:00
Wachowski, Karol
56c4cfaa0f drm/shmem-helper: Fix BUG_ON() on mmap(PROT_WRITE, MAP_PRIVATE)
commit 39bc27bd688066a63e56f7f64ad34fae03fbe3b8 upstream.

Lack of check for copy-on-write (COW) mapping in drm_gem_shmem_mmap
allows users to call mmap with PROT_WRITE and MAP_PRIVATE flag
causing a kernel panic due to BUG_ON in vmf_insert_pfn_prot:
BUG_ON((vma->vm_flags & VM_PFNMAP) && is_cow_mapping(vma->vm_flags));

Return -EINVAL early if COW mapping is detected.

This bug affects all drm drivers using default shmem helpers.
It can be reproduced by this simple example:
void *ptr = mmap(0, size, PROT_WRITE, MAP_PRIVATE, fd, mmap_offset);
ptr[0] = 0;

Fixes: 2194a63a818d ("drm: Add library for shmem backed GEM objects")
Cc: Noralf Trønnes <noralf@tronnes.org>
Cc: Eric Anholt <eric@anholt.net>
Cc: Rob Herring <robh@kernel.org>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: David Airlie <airlied@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Cc: <stable@vger.kernel.org> # v5.2+
Signed-off-by: Wachowski, Karol <karol.wachowski@intel.com>
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20240520100514.925681-1-jacek.lawrynowicz@linux.intel.com
[ Artem: bp to fix CVE-2024-39497, in order to adapt this patch to branch 5.10
  add header file mm/internal.h]
Signed-off-by: Artem Sdvizhkov <raclesdv@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-23 23:22:06 +01:00
Jason-JH.Lin
1a6bf429eb Revert "drm/mipi-dsi: Set the fwnode for mipi_dsi_device"
This reverts commit 139c27648f8d3b2283f74715d8e7f0df7f5e55ca which is
commit a26cc2934331b57b5a7164bff344f0a2ec245fc0 upstream.

Reason for revert:
1. The commit [1] does not land on linux-5.15, so this patch does not
fix anything.

2. Since the fw_devlink improvements series [2] does not land on
linux-5.15, using device_set_fwnode() causes the panel to flash during
bootup.

Incorrect link management may lead to incorrect device initialization,
affecting firmware node links and consumer relationships.
The fwnode setting of panel to the DSI device would cause a DSI
initialization error without series[2], so this patch was reverted to
avoid using the incomplete fw_devlink functionality.

[1] commit 3fb16866b51d ("driver core: fw_devlink: Make cycle detection more robust")
[2] Link: https://lore.kernel.org/all/20230207014207.1678715-1-saravanak@google.com

Cc: stable@vger.kernel.org # 5.15.169
Cc: stable@vger.kernel.org # 5.10.228
Cc: stable@vger.kernel.org # 5.4.284
Signed-off-by: Jason-JH.Lin <jason-jh.lin@mediatek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-23 23:22:06 +01:00
Jeongjun Park
29086c3102 mm: shmem: fix data-race in shmem_getattr()
commit d949d1d14fa281ace388b1de978e8f2cd52875cf upstream.

I got the following KCSAN report during syzbot testing:

==================================================================
BUG: KCSAN: data-race in generic_fillattr / inode_set_ctime_current

write to 0xffff888102eb3260 of 4 bytes by task 6565 on cpu 1:
 inode_set_ctime_to_ts include/linux/fs.h:1638 [inline]
 inode_set_ctime_current+0x169/0x1d0 fs/inode.c:2626
 shmem_mknod+0x117/0x180 mm/shmem.c:3443
 shmem_create+0x34/0x40 mm/shmem.c:3497
 lookup_open fs/namei.c:3578 [inline]
 open_last_lookups fs/namei.c:3647 [inline]
 path_openat+0xdbc/0x1f00 fs/namei.c:3883
 do_filp_open+0xf7/0x200 fs/namei.c:3913
 do_sys_openat2+0xab/0x120 fs/open.c:1416
 do_sys_open fs/open.c:1431 [inline]
 __do_sys_openat fs/open.c:1447 [inline]
 __se_sys_openat fs/open.c:1442 [inline]
 __x64_sys_openat+0xf3/0x120 fs/open.c:1442
 x64_sys_call+0x1025/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:258
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0x54/0x120 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x76/0x7e

read to 0xffff888102eb3260 of 4 bytes by task 3498 on cpu 0:
 inode_get_ctime_nsec include/linux/fs.h:1623 [inline]
 inode_get_ctime include/linux/fs.h:1629 [inline]
 generic_fillattr+0x1dd/0x2f0 fs/stat.c:62
 shmem_getattr+0x17b/0x200 mm/shmem.c:1157
 vfs_getattr_nosec fs/stat.c:166 [inline]
 vfs_getattr+0x19b/0x1e0 fs/stat.c:207
 vfs_statx_path fs/stat.c:251 [inline]
 vfs_statx+0x134/0x2f0 fs/stat.c:315
 vfs_fstatat+0xec/0x110 fs/stat.c:341
 __do_sys_newfstatat fs/stat.c:505 [inline]
 __se_sys_newfstatat+0x58/0x260 fs/stat.c:499
 __x64_sys_newfstatat+0x55/0x70 fs/stat.c:499
 x64_sys_call+0x141f/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:263
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0x54/0x120 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x76/0x7e

value changed: 0x2755ae53 -> 0x27ee44d3

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 3498 Comm: udevd Not tainted 6.11.0-rc6-syzkaller-00326-gd1f2d51b711a-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
==================================================================

When calling generic_fillattr(), if you don't hold read lock, data-race
will occur in inode member variables, which can cause unexpected
behavior.

Since there is no special protection when shmem_getattr() calls
generic_fillattr(), data-race occurs by functions such as shmem_unlink()
or shmem_mknod(). This can cause unexpected results, so commenting it out
is not enough.

Therefore, when calling generic_fillattr() from shmem_getattr(), it is
appropriate to protect the inode using inode_lock_shared() and
inode_unlock_shared() to prevent data-race.

Link: https://lkml.kernel.org/r/20240909123558.70229-1-aha310510@gmail.com
Fixes: 44a30220bc0a ("shmem: recalculate file inode when fstat")
Signed-off-by: Jeongjun Park <aha310510@gmail.com>
Reported-by: syzbot <syzkaller@googlegroup.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Yu Zhao <yuzhao@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-23 23:22:06 +01:00
Ryusuke Konishi
903d35b110 nilfs2: fix kernel bug due to missing clearing of checked flag
commit 41e192ad2779cae0102879612dfe46726e4396aa upstream.

Syzbot reported that in directory operations after nilfs2 detects
filesystem corruption and degrades to read-only,
__block_write_begin_int(), which is called to prepare block writes, may
fail the BUG_ON check for accesses exceeding the folio/page size,
triggering a kernel bug.

This was found to be because the "checked" flag of a page/folio was not
cleared when it was discarded by nilfs2's own routine, which causes the
sanity check of directory entries to be skipped when the directory
page/folio is reloaded.  So, fix that.

This was necessary when the use of nilfs2's own page discard routine was
applied to more than just metadata files.

Link: https://lkml.kernel.org/r/20241017193359.5051-1-konishi.ryusuke@gmail.com
Fixes: 8c26c4e2694a ("nilfs2: fix issue with flush kernel thread after remount in RO mode because of driver's internal error or metadata corruption")
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Reported-by: syzbot+d6ca2daf692c7a82f959@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=d6ca2daf692c7a82f959
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-23 23:22:06 +01:00
Pawan Gupta
9bae1af719 x86/bugs: Use code segment selector for VERW operand
commit e4d2102018542e3ae5e297bc6e229303abff8a0f upstream.

Robert Gill reported below #GP in 32-bit mode when dosemu software was
executing vm86() system call:

  general protection fault: 0000 [#1] PREEMPT SMP
  CPU: 4 PID: 4610 Comm: dosemu.bin Not tainted 6.6.21-gentoo-x86 #1
  Hardware name: Dell Inc. PowerEdge 1950/0H723K, BIOS 2.7.0 10/30/2010
  EIP: restore_all_switch_stack+0xbe/0xcf
  EAX: 00000000 EBX: 00000000 ECX: 00000000 EDX: 00000000
  ESI: 00000000 EDI: 00000000 EBP: 00000000 ESP: ff8affdc
  DS: 0000 ES: 0000 FS: 0000 GS: 0033 SS: 0068 EFLAGS: 00010046
  CR0: 80050033 CR2: 00c2101c CR3: 04b6d000 CR4: 000406d0
  Call Trace:
   show_regs+0x70/0x78
   die_addr+0x29/0x70
   exc_general_protection+0x13c/0x348
   exc_bounds+0x98/0x98
   handle_exception+0x14d/0x14d
   exc_bounds+0x98/0x98
   restore_all_switch_stack+0xbe/0xcf
   exc_bounds+0x98/0x98
   restore_all_switch_stack+0xbe/0xcf

This only happens in 32-bit mode when VERW based mitigations like MDS/RFDS
are enabled. This is because segment registers with an arbitrary user value
can result in #GP when executing VERW. Intel SDM vol. 2C documents the
following behavior for VERW instruction:

  #GP(0) - If a memory operand effective address is outside the CS, DS, ES,
	   FS, or GS segment limit.

CLEAR_CPU_BUFFERS macro executes VERW instruction before returning to user
space. Use %cs selector to reference VERW operand. This ensures VERW will
not #GP for an arbitrary user %ds.

[ mingo: Fixed the SOB chain. ]

Fixes: a0e2dab44d22 ("x86/entry_32: Add VERW just before userspace transition")
Reported-by: Robert Gill <rtgill82@gmail.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com
Cc: stable@vger.kernel.org # 5.10+
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218707
Closes: https://lore.kernel.org/all/8c77ccfd-d561-45a1-8ed5-6b75212c7a58@leemhuis.info/
Suggested-by: Dave Hansen <dave.hansen@linux.intel.com>
Suggested-by: Brian Gerst <brgerst@gmail.com>
Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-23 23:22:06 +01:00
Edward Adam Davis
fb4fbc22a1 ocfs2: pass u64 to ocfs2_truncate_inline maybe overflow
[ Upstream commit bc0a2f3a73fcdac651fca64df39306d1e5ebe3b0 ]

Syzbot reported a kernel BUG in ocfs2_truncate_inline.  There are two
reasons for this: first, the parameter value passed is greater than
ocfs2_max_inline_data_with_xattr, second, the start and end parameters of
ocfs2_truncate_inline are "unsigned int".

So, we need to add a sanity check for byte_start and byte_len right before
ocfs2_truncate_inline() in ocfs2_remove_inode_range(), if they are greater
than ocfs2_max_inline_data_with_xattr return -EINVAL.

Link: https://lkml.kernel.org/r/tencent_D48DB5122ADDAEDDD11918CFB68D93258C07@qq.com
Fixes: 1afc32b95233 ("ocfs2: Write support for inline data")
Signed-off-by: Edward Adam Davis <eadavis@qq.com>
Reported-by: syzbot+81092778aac03460d6b7@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=81092778aac03460d6b7
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Joseph Qi <joseph.qi@linux.alibaba.com>
Cc: Mark Fasheh <mark@fasheh.com>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Changwei Ge <gechangwei@live.cn>
Cc: Gang He <ghe@suse.com>
Cc: Jun Piao <piaojun@huawei.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-23 23:22:06 +01:00
Chunyan Zhang
af2887171f riscv: Remove duplicated GET_RM
[ Upstream commit 164f66de6bb6ef454893f193c898dc8f1da6d18b ]

The macro GET_RM defined twice in this file, one can be removed.

Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Signed-off-by: Chunyan Zhang <zhangchunyan@iscas.ac.cn>
Fixes: 956d705dd279 ("riscv: Unaligned load/store handling for M_MODE")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20241008094141.549248-3-zhangchunyan@iscas.ac.cn
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-23 23:22:06 +01:00
Chunyan Zhang
9090748908 riscv: Remove unused GENERATING_ASM_OFFSETS
[ Upstream commit 46d4e5ac6f2f801f97bcd0ec82365969197dc9b1 ]

The macro is not used in the current version of kernel, it looks like
can be removed to avoid a build warning:

../arch/riscv/kernel/asm-offsets.c: At top level:
../arch/riscv/kernel/asm-offsets.c:7: warning: macro "GENERATING_ASM_OFFSETS" is not used [-Wunused-macros]
    7 | #define GENERATING_ASM_OFFSETS

Fixes: 9639a44394b9 ("RISC-V: Provide a cleaner raw_smp_processor_id()")
Cc: stable@vger.kernel.org
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Tested-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Signed-off-by: Chunyan Zhang <zhangchunyan@iscas.ac.cn>
Link: https://lore.kernel.org/r/20241008094141.549248-2-zhangchunyan@iscas.ac.cn
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-23 23:22:05 +01:00
WangYuli
c062db9752 riscv: Use '%u' to format the output of 'cpu'
[ Upstream commit e0872ab72630dada3ae055bfa410bf463ff1d1e0 ]

'cpu' is an unsigned integer, so its conversion specifier should
be %u, not %d.

Suggested-by: Wentao Guan <guanwentao@uniontech.com>
Suggested-by: Maciej W. Rozycki <macro@orcam.me.uk>
Link: https://lore.kernel.org/all/alpine.DEB.2.21.2409122309090.40372@angie.orcam.me.uk/
Signed-off-by: WangYuli <wangyuli@uniontech.com>
Reviewed-by: Charlie Jenkins <charlie@rivosinc.com>
Tested-by: Charlie Jenkins <charlie@rivosinc.com>
Fixes: f1e58583b9c7 ("RISC-V: Support cpu hotplug")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/4C127DEECDA287C8+20241017032010.96772-1-wangyuli@uniontech.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-23 23:22:05 +01:00