aboutsummaryrefslogtreecommitdiff
path: root/arch/mips
AgeCommit message (Collapse)AuthorFilesLines
2022-01-09MIPS: BCM47XX: Add support for Netgear WN2500RP v1 & v2Florian Fainelli3-0/+13
Add support for the Netgear WN2500 RP v1 and v2 Wi-Fi range extenders based on the BCM5357 chipset and supporting 802.11n and 802.11ac. Signed-off-by: Florian Fainelli <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2022-01-09MIPS: BCM47XX: Add support for Netgear R6300 v1Florian Fainelli3-0/+10
Add support for the Netgear R6300 v1 Wi-Fi router using a Broadcom BCM4706 chipset and supporting 802.11n and 802.11ac. Signed-off-by: Florian Fainelli <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2022-01-09MIPS: BCM47XX: Add LEDs and buttons for Asus RTN-10UFlorian Fainelli2-0/+20
Add the definitions for the buttons and LEDs used on the Asus RTN-10U router. Signed-off-by: Florian Fainelli <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2022-01-09MIPS: BCM47XX: Add board entry for Linksys WRT320N v1Florian Fainelli4-0/+21
This router is based on a Broadcom BCM4717A1 chipset and supports 802.11n Wi-Fi. Add a board entry for that router and register LEDs and buttons accordingly. Signed-off-by: Florian Fainelli <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2022-01-09MIPS: BCM47XX: Define Linksys WRT310N V2 buttonsFlorian Fainelli1-0/+9
Update the buttons registration code to register the two buttons (WPS, system rester) using the existing BCM47XX_BOARD_LINKSYS_WRT310NV2 board entry. Signed-off-by: Florian Fainelli <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2022-01-09MIPS: Remove duplicated include in local.hYang Li1-1/+0
Fix following includecheck warning: ./arch/mips/include/asm/local.h: asm/asm.h is included more than once. Reported-by: Abaci Robot <[email protected]> Signed-off-by: Yang Li <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2022-01-05MIPS: lantiq: dma: increase descritor countAleksander Jan Bajkowski1-1/+1
NAT Performance results on BT Home Hub 5A (kernel 5.10.89, mtu 1500): Down Up Before 539 Mbps 599 Mbps After 545 Mbps 625 Mbps Signed-off-by: Aleksander Jan Bajkowski <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
2022-01-05MIPS: retire "asm/llsc.h"Huang Pei6-69/+31
all that "asm/llsc.h" does is just to help inline asm, which can be stringifyed from "asm/asm.h" +. Since "asm/asm.h" has all we need, retire "asm/llsc.h" +. remove unused header file Inspired-by: Maciej W. Rozycki <[email protected]> Signed-off-by: Huang Pei <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2022-01-05MIPS: rework local_t operation on MIPS64Huang Pei2-45/+32
+. remove "asm/war.h" since R10000_LLSC_WAR became a config option +. clean up Suggested-by: Maciej W. Rozycki <[email protected]> Signed-off-by: Huang Pei <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2022-01-05MIPS: fix local_{add,sub}_return on MIPS64Huang Pei1-4/+5
Use "daddu/dsubu" for long int on MIPS64 instead of "addu/subu" Fixes: 7232311ef14c ("local_t: mips extension") Signed-off-by: Huang Pei <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2022-01-05mips/pci: remove redundant ret variableMinghao Chi1-3/+1
Return value from rt3883_pci_r32() directly instead of taking this in another redundant variable. Reported-by: Zeal Robot <[email protected]> Signed-off-by: Minghao Chi <[email protected]> Signed-off-by: CGEL ZTE <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2022-01-02MIPS: new Kconfig option ZBOOT_LOAD_ADDRESSYunQiang Su4-2/+14
If this option is not 0x0, it will be used for zboot load address. Otherwise, the result of calc_vmlinuz_load_addr will be used. The zload-y value for generic are also removed then, as the current value breaks booting on qemu -M boston. The result of calc_vmlinuz_load_addr works well for most of cases. The default value of bcm47xx keeps as it currently. Signed-off-by: YunQiang Su <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2022-01-02MIPS: enable both vmlinux.gz.itb and vmlinuz for genericYunQiang Su1-1/+1
vmlinux.gz.itb should be appended to all-$(CONFIG_MIPS_GENERIC) instead of replacing. Otherwise, no vmlinuz will be built. Signed-off-by: YunQiang Su <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2022-01-02MIPS: signal: Return immediately if call failsTiezhu Yang1-9/+11
When debug sigaltstack(), copy_siginfo_to_user() fails first in setup_rt_frame() if the alternate signal stack is too small, so it should return immediately if call fails, no need to call the following functions. Signed-off-by: Tiezhu Yang <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2022-01-02MIPS: signal: Protect against sigaltstack wraparoundTiezhu Yang1-0/+7
If a process uses alternative signal stack by using sigaltstack(), then that stack overflows and stack wraparound occurs. Simple Explanation: The accurate sp order is A,B,C,D,... But now the sp points to A,B,C and A,B,C again. This problem can reproduce by the following code: $ cat test_sigaltstack.c #include <stdio.h> #include <signal.h> #include <stdlib.h> #include <string.h> volatile int counter = 0; void print_sp() { unsigned long sp; __asm__ __volatile__("move %0, $sp" : "=r" (sp)); printf("sp = 0x%08lx\n", sp); } void segv_handler() { int *c = NULL; print_sp(); counter++; printf("%d\n", counter); if (counter == 23) abort(); *c = 1; // SEGV } int main() { int *c = NULL; char *s = malloc(SIGSTKSZ); stack_t stack; struct sigaction action; memset(s, 0, SIGSTKSZ); stack.ss_sp = s; stack.ss_flags = 0; stack.ss_size = SIGSTKSZ; if (sigaltstack(&stack, NULL)) { printf("Failed to use sigaltstack!\n"); return -1; } memset(&action, 0, sizeof(action)); action.sa_handler = segv_handler; action.sa_flags = SA_ONSTACK | SA_NODEFER; sigemptyset(&action.sa_mask); sigaction(SIGSEGV, &action, NULL); *c = 0; //SEGV if (!s) free(s); return 0; } $ gcc test_sigaltstack.c -o test_sigaltstack $ ./test_sigaltstack sp = 0x120015c80 1 sp = 0x120015900 2 sp = 0x120015580 3 sp = 0x120015200 4 sp = 0x120014e80 5 sp = 0x120014b00 6 sp = 0x120014780 7 sp = 0x120014400 8 sp = 0x120014080 9 sp = 0x120013d00 10 sp = 0x120015c80 11 # wraparound occurs! the 11nd output is same as 1st. sp = 0x120015900 12 sp = 0x120015580 13 sp = 0x120015200 14 sp = 0x120014e80 15 sp = 0x120014b00 16 sp = 0x120014780 17 sp = 0x120014400 18 sp = 0x120014080 19 sp = 0x120013d00 20 sp = 0x120015c80 21 # wraparound occurs! the 21nd output is same as 1st. sp = 0x120015900 22 sp = 0x120015580 23 Aborted With this patch: $ ./test_sigaltstack sp = 0x120015c80 1 sp = 0x120015900 2 sp = 0x120015580 3 sp = 0x120015200 4 sp = 0x120014e80 5 sp = 0x120014b00 6 sp = 0x120014780 7 sp = 0x120014400 8 sp = 0x120014080 9 Segmentation fault If we are on the alternate signal stack and would overflow it, don't. Return an always-bogus address instead so we will die with SIGSEGV. This patch is similar with commit 83bd01024b1f ("x86: protect against sigaltstack wraparound"). Signed-off-by: Tiezhu Yang <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2022-01-02mips: bcm63xx: add support for clk_set_parent()Randy Dunlap1-0/+6
The MIPS BMC63XX subarch does not provide/support clk_set_parent(). This causes build errors in a few drivers, so add a simple implementation of that function so that callers of it will build without errors. Fixes these build errors: ERROR: modpost: "clk_set_parent" [sound/soc/jz4740/snd-soc-jz4740-i2s.ko] undefined! ERROR: modpost: "clk_set_parent" [sound/soc/atmel/snd-soc-atmel-i2s.ko] undefined! Fixes: e7300d04bd08 ("MIPS: BCM63xx: Add support for the Broadcom BCM63xx family of SOCs." ) Signed-off-by: Randy Dunlap <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Acked-by: Florian Fainelli <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2022-01-02mips: lantiq: add support for clk_set_parent()Randy Dunlap1-0/+6
Provide a simple implementation of clk_set_parent() in the lantiq subarch so that callers of it will build without errors. Fixes these build errors: ERROR: modpost: "clk_set_parent" [sound/soc/jz4740/snd-soc-jz4740-i2s.ko] undefined! ERROR: modpost: "clk_set_parent" [sound/soc/atmel/snd-soc-atmel-i2s.ko] undefined! Fixes: 171bb2f19ed6 ("MIPS: Lantiq: Add initial support for Lantiq SoCs") Signed-off-by: Randy Dunlap <[email protected]> Reported-by: kernel test robot <[email protected]> [email protected] --cc="John Crispin <[email protected]>" --cc="Jonathan Cameron <[email protected]>" --cc="Russell King <[email protected]>" --cc="Andy Shevchenko <[email protected]>" [email protected] --to="Thomas Bogendoerfer <[email protected]>" Reviewed-by: Jonathan Cameron <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2022-01-02MIPS: Loongson64: DTS: Add pm block node for Loongson-2K1000Qing Zhang1-0/+5
The module is now supported, enable it. Signed-off-by: Qing Zhang <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2022-01-02MIPS: TXX9: Remove TX4939 SoC supportThomas Bogendoerfer7-1424/+0
After removal of RBTX4939 board support remove code for the TX4939 SoC. Signed-off-by: Thomas Bogendoerfer <[email protected]> Tested-by: Geert Uytterhoeven <[email protected]>
2022-01-02MIPS: TXX9: Remove rbtx4939 board supportThomas Bogendoerfer13-992/+0
No active MIPS user own this board, so let's remove it. Signed-off-by: Thomas Bogendoerfer <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Tested-by: Geert Uytterhoeven <[email protected]>
2021-12-31crypto: mips/sha - remove duplicate hash init functionTianjia Zhang3-87/+8
sha*_base_init() series functions has implemented the initialization of the hash context, this commit use sha*_base_init() function to replace repeated implementations. Signed-off-by: Tianjia Zhang <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2021-12-30Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/netJakub Kicinski3-4/+4
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c commit 077cdda764c7 ("net/mlx5e: TC, Fix memory leak with rules with internal port") commit 31108d142f36 ("net/mlx5: Fix some error handling paths in 'mlx5e_tc_add_fdb_flow()'") commit 4390c6edc0fb ("net/mlx5: Fix some error handling paths in 'mlx5e_tc_add_fdb_flow()'") https://lore.kernel.org/all/[email protected]/ net/smc/smc_wr.c commit 49dc9013e34b ("net/smc: Use the bitmap API when applicable") commit 349d43127dac ("net/smc: fix kernel panic caused by race of smc_sock") bitmap_zero()/memset() is removed by the fix Signed-off-by: Jakub Kicinski <[email protected]>
2021-12-28MIPS: BCM63XX: Provide platform data to watchdog deviceFlorian Fainelli1-0/+8
In order to utilize the bcm7038_wdt.c driver which needs to know the clock name to obtain, pass it via platform data using the bcm7038_wdt_platform_data structure. Signed-off-by: Florian Fainelli <[email protected]> Acked-by: Thomas Bogendoerfer <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
2021-12-21MIPS: generic: enable SMP on SMVP systemsSander Vanheule1-5/+6
In addition to CPS SMP setups, also try to initialise MT SMP setups with multiple VPEs per CPU core. CMP SMP support is not provided as it is considered deprecated. Additionally, rework the code by dropping the err variable and make it similar to how other platforms perform this initialisation. Co-developed-by: INAGAKI Hiroshi <[email protected]> Signed-off-by: INAGAKI Hiroshi <[email protected]> Signed-off-by: Sander Vanheule <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2021-12-21MIPS: only register MT SMP ops if MT is supportedSander Vanheule1-0/+3
Verify that the current CPU actually supports multi-threading before registering MT SMP ops, instead of unconditionally registering them if the kernel is compiled with CONFIG_MIPS_MT_SMP. Suggested-by: Jiaxun Yang <[email protected]> Signed-off-by: Sander Vanheule <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2021-12-21MIPS: Octeon: Fix build errors using clangTianjia Zhang1-2/+2
A large number of the following errors is reported when compiling with clang: cvmx-bootinfo.h:326:3: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int] ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_NULL) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cvmx-bootinfo.h:321:20: note: expanded from macro 'ENUM_BRD_TYPE_CASE' case x: return(#x + 16); /* Skip CVMX_BOARD_TYPE_ */ ~~~^~~~ cvmx-bootinfo.h:326:3: note: use array indexing to silence this warning cvmx-bootinfo.h:321:20: note: expanded from macro 'ENUM_BRD_TYPE_CASE' case x: return(#x + 16); /* Skip CVMX_BOARD_TYPE_ */ ^ Follow the prompts to use the address operator '&' to fix this error. Signed-off-by: Tianjia Zhang <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2021-12-19Merge tag 'mips-fixes_5.16_3' of ↵Linus Torvalds3-4/+4
git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS fix from Thomas Bogendoerfer: - only enable pci_remap_iospace() for Ralink devices * tag 'mips-fixes_5.16_3' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MIPS: Only define pci_remap_iospace() for Ralink
2021-12-17arch: Remove leftovers from prism54 wireless driverAlexandre Ghiti4-4/+0
This driver was removed so remove all references to it. Fixes: d249ff28b1d8 ("intersil: remove obsolete prism54 wireless driver") Signed-off-by: Alexandre Ghiti <[email protected]> Acked-by: Thomas Bogendoerfer <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
2021-12-17arch: Remove leftovers from mandatory file lockingAlexandre Ghiti3-3/+0
This config was removed so remove all references to it. Fixes: f7e33bdbd6d1 ("fs: remove mandatory file locking support") Signed-off-by: Alexandre Ghiti <[email protected]> Reviewed-by: Jeff Layton <[email protected]> Acked-by: Thomas Bogendoerfer <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
2021-12-17Documentation, arch: Remove leftovers from CIFS_WEAK_PW_HASHAlexandre Ghiti6-6/+0
This config was removed so remove all references to it. Fixes: 76a3c92ec9e0 ("cifs: remove support for NTLM and weaker authentication algorithms") Signed-off-by: Alexandre Ghiti <[email protected]> Reviewed-by: Steve French <[email protected]> Acked-by: Arnd Bergmann <[email protected]> [arch/arm/configs] Acked-by: Thomas Bogendoerfer <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
2021-12-16of/fdt: Rework early_init_dt_scan_memory() to call directlyRob Herring1-15/+4
Use of the of_scan_flat_dt() function predates libfdt and is discouraged as libfdt provides a nicer set of APIs. Rework early_init_dt_scan_memory() to be called directly and use libfdt. Cc: John Crispin <[email protected]> Cc: Thomas Bogendoerfer <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Frank Rowand <[email protected]> Cc: [email protected] Cc: [email protected] Reviewed-by: Frank Rowand <[email protected]> Signed-off-by: Rob Herring <[email protected]> Tested-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-12-16MIPS: OCTEON: add put_device() after of_find_device_by_node()Ye Guojin2-0/+3
This was found by coccicheck: ./arch/mips/cavium-octeon/octeon-platform.c, 332, 1-7, ERROR missing put_device; call of_find_device_by_node on line 324, but without a corresponding object release within this function. ./arch/mips/cavium-octeon/octeon-platform.c, 395, 1-7, ERROR missing put_device; call of_find_device_by_node on line 387, but without a corresponding object release within this function. ./arch/mips/cavium-octeon/octeon-usb.c, 512, 3-9, ERROR missing put_device; call of_find_device_by_node on line 515, but without a corresponding object release within this function. ./arch/mips/cavium-octeon/octeon-usb.c, 543, 1-7, ERROR missing put_device; call of_find_device_by_node on line 515, but without a corresponding object release within this function. Reported-by: Zeal Robot <[email protected]> Signed-off-by: Ye Guojin <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2021-12-16MIPS: BCM47XX: Replace strlcpy with strscpyJason Wang1-1/+1
The strlcpy should not be used because it doesn't limit the source length. As linus says, it's a completely useless function if you can't implicitly trust the source string - but that is almost always why people think they should use it! All in all the BSD function will lead some potential bugs. But the strscpy doesn't require reading memory from the src string beyond the specified "count" bytes, and since the return value is easier to error-check than strlcpy()'s. In addition, the implementation is robust to the string changing out from underneath it, unlike the current strlcpy() implementation. Thus, We prefer using strscpy instead of strlcpy. Signed-off-by: Jason Wang <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2021-12-16mips: fix Kconfig reference to PHYS_ADDR_T_64BITLukas Bulwahn1-1/+1
Commit d4a451d5fc84 ("arch: remove the ARCH_PHYS_ADDR_T_64BIT config symbol") removes config ARCH_PHYS_ADDR_T_64BIT with all instances of that config refactored appropriately. Since then, it is recommended to use the config PHYS_ADDR_T_64BIT instead. Commit 171543e75272 ("MIPS: Disallow CPU_SUPPORTS_HUGEPAGES for XPA,EVA") introduces the expression "!(32BIT && (ARCH_PHYS_ADDR_T_64BIT || EVA))" for config CPU_SUPPORTS_HUGEPAGES, which unintentionally refers to the non-existing symbol ARCH_PHYS_ADDR_T_64BIT instead of the intended PHYS_ADDR_T_64BIT. Fix this Kconfig reference to the intended PHYS_ADDR_T_64BIT. This issue was identified with the script ./scripts/checkkconfigsymbols.py. I then reported it on the mailing list and Paul confirmed the mistake in the linked email thread. Link: https://lore.kernel.org/lkml/[email protected]/ Suggested-by: Paul Cercueil <[email protected]> Fixes: 171543e75272 ("MIPS: Disallow CPU_SUPPORTS_HUGEPAGES for XPA,EVA") Signed-off-by: Lukas Bulwahn <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2021-12-16mips: txx9: remove left-over for removed TXX9_ACLC configsLukas Bulwahn2-31/+0
The patch series "Remove support for TX49xx" (see Link) was only partially applied: The ASoC driver was removed with commit a8644292ea46 ("ASoC: txx9: Remove driver"), which was patch 10/10 from that series. The mips architecture code to be removed with patch 1/10 from that series was not applied. This partial patch series application leaves the build config setup and code in the mips architecture in a slightly unclean, intermediate state. The configs HAS_TXX9_ACLC and SND_SOC_TXX9ACLC were removed, but are still referenced in the txx9-architecture Kconfig and generic setup. The script ./scripts/checkkconfigsymbols.py warns about this: HAS_TXX9_ACLC Referencing files: arch/mips/txx9/Kconfig SND_SOC_TXX9ACLC Referencing files: arch/mips/txx9/generic/setup.c Clean up the code for those removed references. Link: https://lore.kernel.org/all/[email protected]/ Signed-off-by: Lukas Bulwahn <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2021-12-16mips: alchemy: remove historic comment on gpio build constraintsLukas Bulwahn1-2/+0
In ./arch/mips/alchemy/common/gpiolib.c, the comment points out certain build constraints on CONFIG_GPIOLIB and CONFIG_ALCHEMY_GPIO_INDIRECT. The commit 832f5dacfa0b ("MIPS: Remove all the uses of custom gpio.h") makes all mips machines use the common gpio.h and removes the config ALCHEMY_GPIO_INDIRECT. So, this makes the comment in alchemy's gpiolib.c historic and obsolete, and can be removed after the commit above. The issue on the reference to a non-existing Kconfig symbol was identified with ./scripts/checkkconfigsymbols.py. This script has been quite useful to identify a number of bugs with Kconfig symbols and deserves to be executed and checked regularly. So, remove the historic comment to reduce the reports made the script and simplify to use this script, as new issues are easier to spot when the list of reports is shorter. Signed-off-by: Lukas Bulwahn <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2021-12-16mips: remove obsolete selection of CPU_HAS_LOAD_STORE_LRLukas Bulwahn1-1/+0
Commit 18d84e2e55b6 ("MIPS: make CPU_HAS_LOAD_STORE_LR opt-out") replaced the config CPU_HAS_LOAD_STORE_LR by the config with an inverted semantics, making the "LOAD_STORE_LR" cpu configuration the default. The ./arch/mips/Kconfig was adjusted accordingly. Later, commit 65ce6197ed40 ("Revert "MIPS: Remove unused R4300 CPU support"") reintroduces a select CPU_HAS_LOAD_STORE_LR through its revert commit, restoring the config CPU_R4300 in ./arch/mips/Kconfig before the refactoring above. This select however now refers to a non-existing config and is further unneeded, as LOAD_STORE_LR is the default now. Remove the obsolete select for the reintroduced mips R4300 architecture. This issue is identified with ./scripts/checkkconfigsymbols.py. Signed-off-by: Lukas Bulwahn <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2021-12-16mips: kgdb: adjust the comment to the actual ifdef conditionLukas Bulwahn1-1/+1
The comment refers to CONFIG_CPU_32BIT, but the ifdef uses CONFIG_32BIT. As this ifdef and comment was introduced with initial mips-kgdb commit 8854700115ec ("[MIPS] kgdb: add arch support for the kernel's kgdb core"), it is probably just a minor issue that was overlooked during the patch creation and refactoring before submission. This inconsistency was identified with ./scripts/checkkconfigsymbols.py. This script has been quite useful to identify a number of bugs with Kconfig symbols and deserves to be executed and checked regularly. So, adjust the comment to the actual ifdef condition to reduce the reports made the script and simplify to use this script, as new issues are easier to spot when the list of reports is shorter. Signed-off-by: Lukas Bulwahn <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2021-12-16mips: dec: provide the correctly capitalized config CPU_R4X00 in init error ↵Lukas Bulwahn1-1/+1
message The config for MIPS R4000-series processors is named CPU_R4X00 with upper-case X, not CPU_R4x00 as the error message suggests. Hence, ./scripts/checkkconfigsymbols.py reports this invalid reference: CPU_R4x00 Referencing files: arch/mips/dec/prom/init.c When human users encounter this error message, they probably just deal with this minor discrepancy; so, the spelling never was a big deal here. Still, the script ./scripts/checkkconfigsymbols.py has been quite useful to identify a number of bugs with Kconfig symbols and deserves to be executed and checked regularly. So, repair the error message to reduce the reports made the script and simplify to use this script, as new issues are easier to spot when the list of reports is shorter. Signed-off-by: Lukas Bulwahn <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2021-12-16mips: drop selecting non-existing config NR_CPUS_DEFAULT_2Lukas Bulwahn1-1/+0
Commit c5eaff3e857e ("MIPS: Kconfig: Drop obsolete NR_CPUS_DEFAULT_{1,2} options") removed the config NR_CPUS_DEFAULT_2, as with this commit, the NR_CPUS default value is 2. Commit 7505576d1c1a ("MIPS: add support for SGI Octane (IP30)") introduces the config SGI_IP30, which selects the removed config NR_CPUS_DEFAULT_2, but this has actually no effect. Fortunately, NR_CPUS defaults to 2 when there is no specific NR_CPUS_DEFAULT_* config selected. So, the effect of the intended 'select NR_CPUS_DEFAULT_2' is achieved without further ado. Drop selecting the non-existing config NR_CPUS_DEFAULT_2. The issue was identified with ./scripts/checkkconfigsymbols.py. Fixes: 7505576d1c1a ("MIPS: add support for SGI Octane (IP30)") Signed-off-by: Lukas Bulwahn <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2021-12-16mips: add SYS_HAS_CPU_MIPS64_R5 config for MIPS Release 5 supportLukas Bulwahn1-0/+4
Commit ab7c01fdc3cf ("mips: Add MIPS Release 5 support") adds the two configs CPU_MIPS32_R5 and CPU_MIPS64_R5, which depend on the corresponding SYS_HAS_CPU_MIPS32_R5 and SYS_HAS_CPU_MIPS64_R5, respectively. The config SYS_HAS_CPU_MIPS32_R5 was already introduced with commit c5b367835cfc ("MIPS: Add support for XPA."); the config SYS_HAS_CPU_MIPS64_R5, however, was never introduced. Hence, ./scripts/checkkconfigsymbols.py warns: SYS_HAS_CPU_MIPS64_R5 Referencing files: arch/mips/Kconfig, arch/mips/include/asm/cpu-type.h Add the definition for config SYS_HAS_CPU_MIPS64_R5 under the assumption that SYS_HAS_CPU_MIPS64_R5 follows the same pattern as the existing SYS_HAS_CPU_MIPS32_R5 and SYS_HAS_CPU_MIPS64_R6. Fixes: ab7c01fdc3cf ("mips: Add MIPS Release 5 support") Signed-off-by: Lukas Bulwahn <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2021-12-16MIPS: drop selected EARLY_PRINTK configs for MACH_REALTEK_RTLSander Vanheule1-3/+0
MACH_REALTEK_RTL declares that the system supports early printk , but this is not actually implemented as intended. The system is left with a non-functional early0 console because the setup_8250_early_printk_port() call provided for MIPS_GENERIC is never used to set this up. Generic ns16550a earlycon works, so devices should use that for early output. This means that SYS_HAS_EARLY_PRINTK and USE_GENERIC_EARLY_PRINTK_8250 do not need to be selected. Additionally, as reported by Lukas Bulwahn, the selected symbol SYS_HAS_EARLY_PRINTK_8250 does not actually exist, so should also be dropped. Cc: Lukas Bulwahn <[email protected]> Cc: Bert Vermeulen <[email protected]> Signed-off-by: Sander Vanheule <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2021-12-14Merge branch 'irq/urgent' into irq/msiThomas Gleixner1-1/+1
to pick up the PCI/MSI-x fixes. Signed-off-by: Thomas Gleixner <[email protected]>
2021-12-14mips: ralink: add missing of_node_put() call in ill_acc_of_setup()Wang Qing1-0/+1
of_find_compatible_node() takes a reference to the device_node which needs to be dropped when done. Signed-off-by: Wang Qing <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2021-12-14MIPS: fix typo in a commentJason Wang1-1/+1
The double `Address' in the comment in line 487 is repeated. Remove one of them from the comment. Signed-off-by: Jason Wang <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2021-12-14MIPS: lantiq: Fix typo in a commentJason Wang1-1/+1
The double `if' in the comment in line 144 is repeated. Remove one of them from the comment. Signed-off-by: Jason Wang <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2021-12-14MIPS: Fix typo in a commentJason Wang1-1/+1
The double `the' in the comment in line 344 is repeated. Remove one of them from the comment. Signed-off-by: Jason Wang <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2021-12-14MIPS: Makefile: Remove "ifdef need-compiler" for Kbuild.platformsTiezhu Yang1-2/+0
After commit 13ceb48bc19c ("MIPS: Loongson2ef: Remove unnecessary {as,cc}-option calls"), no need to use "ifdef need-compiler" for Kbuild.platforms, because the cause of the build issue mentioned in commit 0706f74f719e ("MIPS: fix *-pkg builds for loongson2ef platform") has been disappeared, so just remove it. Signed-off-by: Tiezhu Yang <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]> Reviewed-by: Masahiro Yamada <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2021-12-14MIPS: SGI-IP22: Remove unnecessary check of GCC optionTiezhu Yang1-5/+0
According to Documentation/process/changes.rst, the minimal version of GCC is 5.1, and -mr10k-cache-barrier=store is supported with GCC 5.1 [1], just remove the unnecessary check to fix the build error [2]: arch/mips/sgi-ip22/Platform:28: *** gcc doesn't support needed option -mr10k-cache-barrier=store. Stop. [1] https://gcc.gnu.org/onlinedocs/gcc-5.1.0/gcc/MIPS-Options.html [2] https://github.com/ClangBuiltLinux/linux/issues/1543 Reported-by: Ryutaroh Matsumoto <[email protected]> Suggested-by: Nathan Chancellor <[email protected]> Signed-off-by: Tiezhu Yang <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]> Reviewed-by: Masahiro Yamada <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
2021-12-13exit: Add and use make_task_dead.Eric W. Biederman1-1/+1
There are two big uses of do_exit. The first is it's design use to be the guts of the exit(2) system call. The second use is to terminate a task after something catastrophic has happened like a NULL pointer in kernel code. Add a function make_task_dead that is initialy exactly the same as do_exit to cover the cases where do_exit is called to handle catastrophic failure. In time this can probably be reduced to just a light wrapper around do_task_dead. For now keep it exactly the same so that there will be no behavioral differences introducing this new concept. Replace all of the uses of do_exit that use it for catastraphic task cleanup with make_task_dead to make it clear what the code is doing. As part of this rename rewind_stack_do_exit rewind_stack_and_make_dead. Signed-off-by: "Eric W. Biederman" <[email protected]>