aboutsummaryrefslogtreecommitdiff
path: root/arch/nios2/kernel/cpuinfo.c
AgeCommit message (Collapse)AuthorFilesLines
2024-12-16nios2: Use str_yes_no() helper in show_cpuinfo()Thorsten Blum1-5/+5
Remove hard-coded strings by using the str_yes_no() helper function. Signed-off-by: Thorsten Blum <[email protected]> Signed-off-by: Dinh Nguyen <[email protected]>
2023-06-13nios2: Replace all non-returning strlcpy with strscpyAzeem Shaikh1-1/+1
strlcpy() reads the entire source buffer first. This read may exceed the destination size limit. This is both inefficient and can lead to linear read overflows if a source string is not NUL-terminated [1]. In an effort to remove strlcpy() completely [2], replace strlcpy() here with strscpy(). No return values were used, so direct replacement is safe. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy [2] https://github.com/KSPP/linux/issues/89 Reviewed-by: Kees Cook <[email protected]> Signed-off-by: Azeem Shaikh <[email protected]> Signed-off-by: Dinh Nguyen <[email protected]>
2019-05-21treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13Thomas Gleixner1-14/+1
Based on 2 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not see http www gnu org licenses this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details [based] [from] [clk] [highbank] [c] you should have received a copy of the gnu general public license along with this program if not see http www gnu org licenses extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 355 file(s). Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Kate Stewart <[email protected]> Reviewed-by: Jilayne Lovejoy <[email protected]> Reviewed-by: Steve Winslow <[email protected]> Reviewed-by: Allison Randal <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-09-28nios2: get cpu node with of_get_cpu_nodeRob Herring1-1/+3
"device_type" use is deprecated for FDT though it has continued to be used for nodes like cpu nodes. Use of_get_cpu_node() instead which works using node names by default. This will allow the eventually removal of cpu device_type properties. Also, fix a leaked reference by adding a missing of_node_put. Cc: Ley Foon Tan <[email protected]> Cc: [email protected] Signed-off-by: Rob Herring <[email protected]>
2017-05-08nios2: Add CDX supportMarek Vasut1-2/+8
Add support for the CDX Code Density Extensions present in Nios II R2 . This introduces new 16bit instruction set to improve code density while retaining support for the 32bit Nios II R2 instructions. Signed-off-by: Marek Vasut <[email protected]> Cc: Ley Foon Tan <[email protected]>
2017-05-08nios2: Add BMX supportMarek Vasut1-2/+8
Add support for the BMX Bit Manipulation Extensions present in Nios II R2 . This introduces three new instructions, EXTRACT, INSERT and MERGE. Signed-off-by: Marek Vasut <[email protected]> Cc: Ley Foon Tan <[email protected]>
2017-05-08nios2: Add NIOS2_ARCH_REVISION to select between R1 and R2Marek Vasut1-0/+2
Allow user to select between Nios2 R1 and R2. Since R1 and R2 are not binary compatible, we cannot have a single kernel binary and there is no point in having DT property for discerning these two. Signed-off-by: Marek Vasut <[email protected]> Cc: Ley Foon Tan <[email protected]>
2016-10-06nios2: use of_property_read_boolLey Foon Tan1-10/+5
Use of_property_read_bool instead of open-coding it as fpcu_has. Convert the members of struct cpuinfo from u32 to bool accordingly as they are only used as boolean anyhow. Signed-off-by: Tobias Klauser <[email protected]> Acked-by: Ley Foon Tan <[email protected]>
2015-04-15nios2: cpuinfo: remove use of seq_printf return valueJoe Perches1-39/+38
The seq_printf return value, because it's frequently misused, will eventually be converted to void. See: commit 1f33c41c03da ("seq_file: Rename seq_overflow() to seq_has_overflowed() and make public") Signed-off-by: Joe Perches <[email protected]> Cc: Ley Foon Tan <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2014-12-31nios2: Initialize cpuinfo.mmuWalter Goossens1-0/+1
This patch initializes the mmu field of the cpuinfo structure to the value supplied by the devicetree. Signed-off-by: Walter Goossens <[email protected]> Acked-by: Ley Foon Tan <[email protected]>
2014-12-08nios2: Use IS_ENABLED instead of #ifdefs to check config symbolsTobias Klauser1-9/+5
Make the checking for div/mul/mulx instruction config symbols easier to read by using IS_ENABLED instead of #ifdefs. Signed-off-by: Tobias Klauser <[email protected]> Acked-by: Ley Foon Tan <[email protected]>
2014-12-08nios2: Cpuinfo handlingLey Foon Tan1-0/+201
Signed-off-by: Ley Foon Tan <[email protected]>