linux-brain/arch
Anup Patel b8168792c3 RISC-V: Fix error code returned by riscv_hartid_to_cpuid()
[ Upstream commit 533b4f3a789d49574e7ae0f6ececed153f651f97 ]

We should return a negative error code upon failure in
riscv_hartid_to_cpuid() instead of NR_CPUS. This is also
aligned with all uses of riscv_hartid_to_cpuid() which
expect negative error code upon failure.

Fixes: 6825c7a80f ("RISC-V: Add logical CPU indexing for RISC-V")
Fixes: f99fb607fb ("RISC-V: Use Linux logical CPU number instead of hartid")
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-19 10:08:26 +02:00
..
alpha alpha: fix annotation of io{read,write}{16,32}be() 2020-08-26 10:40:58 +02:00
arc arc: kernel: Return -EFAULT if copy_to_user() fails 2021-04-21 12:56:13 +02:00
arm ARM: 9064/1: hw_breakpoint: Do not directly check the event's overflow_handler hook 2021-05-19 10:08:25 +02:00
arm64 arm64: dts: uniphier: Change phy-mode to RGMII-ID to enable delay pins for RTL8211E 2021-05-14 09:44:31 +02:00
c6x mm: consolidate pgtable_cache_init() and pgd_cache_init() 2019-09-24 15:54:09 -07:00
csky csky: change a Kconfig symbol name to fix e1000 build error 2021-04-28 13:19:16 +02:00
h8300 h8300: fix PREEMPTION build, TI_PRE_COUNT undefined 2021-02-17 10:35:18 +01:00
hexagon hexagon: define ioremap_uc 2020-05-10 10:31:31 +02:00
ia64 ia64: module: fix symbolizer crash on fdescr 2021-05-19 10:08:24 +02:00
m68k m68k: mvme147,mvme16x: Don't wipe PCC timer config bits 2021-05-14 09:44:19 +02:00
microblaze microblaze: Prevent the overflow of the start 2020-02-24 08:37:02 +01:00
mips MIPS: pci-legacy: stop using of_pci_range_to_resource 2021-05-14 09:44:30 +02:00
nds32 nds32: flush_dcache_page: use page_mapping_file to avoid races with swapoff 2021-04-14 08:24:10 +02:00
nios2 nios2 update for v5.4-rc1 2019-09-27 13:02:19 -07:00
openrisc openrisc: Fix issue with get_user for 64-bit values 2020-11-01 12:01:06 +01:00
parisc parisc: avoid a warning on u8 cast for cmpxchg on u8 pointers 2021-04-14 08:24:11 +02:00
powerpc powerpc/iommu: Annotate nested lock for lockdep 2021-05-19 10:08:24 +02:00
riscv RISC-V: Fix error code returned by riscv_hartid_to_cpuid() 2021-05-19 10:08:26 +02:00
s390 KVM: s390: split kvm_s390_real_to_abs 2021-05-14 09:44:15 +02:00
sh sh: dma: fix kconfig dependency for G2_DMA 2021-01-27 11:47:52 +01:00
sparc sparc64: Fix opcode filtering in handling of no fault loads 2021-03-30 14:35:22 +02:00
um um: mm: check more comprehensively for stub changes 2021-03-04 10:26:50 +01:00
unicore32 mm: treewide: clarify pgtable_page_{ctor,dtor}() naming 2019-09-26 10:10:44 -07:00
x86 KVM: x86/mmu: Remove the defunct update_pte() paging hook 2021-05-19 10:08:20 +02:00
xtensa xtensa: move coprocessor_flush to the .text section 2021-04-07 14:47:42 +02:00
.gitignore
Kconfig Revert: "ring-buffer: Remove HAVE_64BIT_ALIGNED_ACCESS" 2020-12-30 11:51:47 +01:00