tree: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git for-next head: 13bec8d49bdf10aab4e1570ef42417f6bfbb6126 commit: 13bec8d49bdf10aab4e1570ef42417f6bfbb6126 [49/49] pinctrl: qcom: use scm_call to route GPIO irq to Apps config: arm64-allmodconfig (attached as .config) compiler: aarch64-linux-gcc (GCC) 9.3.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout 13bec8d49bdf10aab4e1570ef42417f6bfbb6126 # save the attached .config to linux build tree GCC_VERSION=9.3.0 make.cross ARCH=arm64 If you fix the issue, kindly add following tag Reported-by: kbuild test robot <lkp@xxxxxxxxx> All errors (new ones prefixed by >>): >> drivers/pinctrl/qcom/pinctrl-msm.c:909:4: error: expected identifier or '(' before 'else' 909 | } else { | ^~~~ drivers/pinctrl/qcom/pinctrl-msm.c:921:2: warning: data definition has no type or storage class 921 | val = msm_readl_intr_cfg(pctrl, g); | ^~~ >> drivers/pinctrl/qcom/pinctrl-msm.c:921:2: error: type defaults to 'int' in declaration of 'val' [-Werror=implicit-int] >> drivers/pinctrl/qcom/pinctrl-msm.c:921:27: error: 'pctrl' undeclared here (not in a function); did you mean 'pinctrl'? 921 | val = msm_readl_intr_cfg(pctrl, g); | ^~~~~ | pinctrl >> drivers/pinctrl/qcom/pinctrl-msm.c:921:34: error: 'g' undeclared here (not in a function) 921 | val = msm_readl_intr_cfg(pctrl, g); | ^ >> drivers/pinctrl/qcom/pinctrl-msm.c:922:6: error: expected '=', ',', ';', 'asm' or '__attribute__' before '|=' token 922 | val |= BIT(g->intr_raw_status_bit); | ^~ >> drivers/pinctrl/qcom/pinctrl-msm.c:923:2: error: expected identifier or '(' before 'if' 923 | if (g->intr_detection_width == 2) { | ^~ drivers/pinctrl/qcom/pinctrl-msm.c:945:4: error: expected identifier or '(' before 'else' 945 | } else if (g->intr_detection_width == 1) { | ^~~~ drivers/pinctrl/qcom/pinctrl-msm.c:966:4: error: expected identifier or '(' before 'else' 966 | } else { | ^~~~ drivers/pinctrl/qcom/pinctrl-msm.c:969:2: warning: data definition has no type or storage class 969 | msm_writel_intr_cfg(val, pctrl, g); | ^~~~~~~~~~~~~~~~~~~ >> drivers/pinctrl/qcom/pinctrl-msm.c:969:2: error: type defaults to 'int' in declaration of 'msm_writel_intr_cfg' [-Werror=implicit-int] drivers/pinctrl/qcom/pinctrl-msm.c:969:2: warning: parameter names (without types) in function declaration >> drivers/pinctrl/qcom/pinctrl-msm.c:969:2: error: conflicting types for 'msm_writel_intr_cfg' drivers/pinctrl/qcom/pinctrl-msm.c:84:13: note: previous definition of 'msm_writel_intr_cfg' was here 84 | static void msm_writel_##name(u32 val, struct msm_pinctrl *pctrl, \ | ^~~~~~~~~~~ drivers/pinctrl/qcom/pinctrl-msm.c:92:1: note: in expansion of macro 'MSM_ACCESSOR' 92 | MSM_ACCESSOR(intr_cfg) | ^~~~~~~~~~~~ drivers/pinctrl/qcom/pinctrl-msm.c:971:2: error: expected identifier or '(' before 'if' 971 | if (test_bit(d->hwirq, pctrl->dual_edge_irqs)) | ^~ In file included from include/linux/mm_types.h:9, from arch/arm64/include/asm/tlbflush.h:13, from arch/arm64/include/asm/pgtable.h:14, from arch/arm64/include/asm/io.h:16, from include/linux/io.h:13, from drivers/pinctrl/qcom/pinctrl-msm.c:9: >> include/linux/spinlock.h:286:2: error: expected identifier or '(' before 'do' 286 | do { \ | ^~ drivers/pinctrl/qcom/pinctrl-msm.c:974:2: note: in expansion of macro 'raw_spin_unlock_irqrestore' 974 | raw_spin_unlock_irqrestore(&pctrl->lock, flags); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ >> include/linux/spinlock.h:289:4: error: expected identifier or '(' before 'while' 289 | } while (0) | ^~~~~ drivers/pinctrl/qcom/pinctrl-msm.c:974:2: note: in expansion of macro 'raw_spin_unlock_irqrestore' 974 | raw_spin_unlock_irqrestore(&pctrl->lock, flags); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/pinctrl/qcom/pinctrl-msm.c:976:2: error: expected identifier or '(' before 'if' 976 | if (type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH)) | ^~ drivers/pinctrl/qcom/pinctrl-msm.c:978:2: error: expected identifier or '(' before 'else' 978 | else if (type & (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING)) | ^~~~ >> drivers/pinctrl/qcom/pinctrl-msm.c:981:2: error: expected identifier or '(' before 'return' 981 | return 0; | ^~~~~~ >> drivers/pinctrl/qcom/pinctrl-msm.c:982:1: error: expected identifier or '(' before '}' token 982 | } | ^ drivers/pinctrl/qcom/pinctrl-msm.c: In function 'msm_gpio_irq_set_type': drivers/pinctrl/qcom/pinctrl-msm.c:909:2: warning: control reaches end of non-void function [-Wreturn-type] 909 | } else { | ^ At top level: drivers/pinctrl/qcom/pinctrl-msm.c:84:13: warning: 'msm_writel_intr_target' defined but not used [-Wunused-function] 84 | static void msm_writel_##name(u32 val, struct msm_pinctrl *pctrl, \ | ^~~~~~~~~~~ drivers/pinctrl/qcom/pinctrl-msm.c:94:1: note: in expansion of macro 'MSM_ACCESSOR' 94 | MSM_ACCESSOR(intr_target) | ^~~~~~~~~~~~ drivers/pinctrl/qcom/pinctrl-msm.c:79:12: warning: 'msm_readl_intr_target' defined but not used [-Wunused-function] 79 | static u32 msm_readl_##name(struct msm_pinctrl *pctrl, \ | ^~~~~~~~~~ drivers/pinctrl/qcom/pinctrl-msm.c:94:1: note: in expansion of macro 'MSM_ACCESSOR' 94 | MSM_ACCESSOR(intr_target) | ^~~~~~~~~~~~ cc1: some warnings being treated as errors vim +909 drivers/pinctrl/qcom/pinctrl-msm.c 863 864 static int msm_gpio_irq_set_type(struct irq_data *d, unsigned int type) 865 { 866 struct gpio_chip *gc = irq_data_get_irq_chip_data(d); 867 struct msm_pinctrl *pctrl = gpiochip_get_data(gc); 868 const struct msm_pingroup *g; 869 unsigned long flags; 870 u32 val; 871 872 if (d->parent_data) 873 irq_chip_set_type_parent(d, type); 874 875 if (test_bit(d->hwirq, pctrl->skip_wake_irqs)) 876 return 0; 877 878 g = &pctrl->soc->groups[d->hwirq]; 879 880 raw_spin_lock_irqsave(&pctrl->lock, flags); 881 882 /* 883 * For hw without possibility of detecting both edges 884 */ 885 if (g->intr_detection_width == 1 && type == IRQ_TYPE_EDGE_BOTH) 886 set_bit(d->hwirq, pctrl->dual_edge_irqs); 887 else 888 clear_bit(d->hwirq, pctrl->dual_edge_irqs); 889 890 /* Route interrupts to application cpu. 891 * With intr_target_use_scm interrupts are routed to 892 * application cpu using scm calls. 893 */ 894 if (pctrl->intr_target_use_scm) { 895 u32 addr = pctrl->phys_base[0] + g->intr_target_reg; 896 int ret; 897 898 qcom_scm_io_readl(addr, &val); 899 900 val &= ~(7 << g->intr_target_bit); 901 val |= g->intr_target_kpss_val << g->intr_target_bit; 902 903 ret = qcom_scm_io_writel(addr, val); 904 if (ret) 905 dev_err(pctrl->dev, 906 "Failed routing %lu interrupt to Apps proc", 907 d->hwirq); 908 } > 909 } else { 910 val = msm_readl_intr_target(pctrl, g); 911 val &= ~(7 << g->intr_target_bit); 912 val |= g->intr_target_kpss_val << g->intr_target_bit; 913 msm_writel_intr_target(val, pctrl, g); 914 } 915 916 /* Update configuration for gpio. 917 * RAW_STATUS_EN is left on for all gpio irqs. Due to the 918 * internal circuitry of TLMM, toggling the RAW_STATUS 919 * could cause the INTR_STATUS to be set for EDGE interrupts. 920 */ > 921 val = msm_readl_intr_cfg(pctrl, g); > 922 val |= BIT(g->intr_raw_status_bit); > 923 if (g->intr_detection_width == 2) { 924 val &= ~(3 << g->intr_detection_bit); 925 val &= ~(1 << g->intr_polarity_bit); 926 switch (type) { 927 case IRQ_TYPE_EDGE_RISING: 928 val |= 1 << g->intr_detection_bit; 929 val |= BIT(g->intr_polarity_bit); 930 break; 931 case IRQ_TYPE_EDGE_FALLING: 932 val |= 2 << g->intr_detection_bit; 933 val |= BIT(g->intr_polarity_bit); 934 break; 935 case IRQ_TYPE_EDGE_BOTH: 936 val |= 3 << g->intr_detection_bit; 937 val |= BIT(g->intr_polarity_bit); 938 break; 939 case IRQ_TYPE_LEVEL_LOW: 940 break; 941 case IRQ_TYPE_LEVEL_HIGH: 942 val |= BIT(g->intr_polarity_bit); 943 break; 944 } 945 } else if (g->intr_detection_width == 1) { 946 val &= ~(1 << g->intr_detection_bit); 947 val &= ~(1 << g->intr_polarity_bit); 948 switch (type) { 949 case IRQ_TYPE_EDGE_RISING: 950 val |= BIT(g->intr_detection_bit); 951 val |= BIT(g->intr_polarity_bit); 952 break; 953 case IRQ_TYPE_EDGE_FALLING: 954 val |= BIT(g->intr_detection_bit); 955 break; 956 case IRQ_TYPE_EDGE_BOTH: 957 val |= BIT(g->intr_detection_bit); 958 val |= BIT(g->intr_polarity_bit); 959 break; 960 case IRQ_TYPE_LEVEL_LOW: 961 break; 962 case IRQ_TYPE_LEVEL_HIGH: 963 val |= BIT(g->intr_polarity_bit); 964 break; 965 } 966 } else { 967 BUG(); 968 } > 969 msm_writel_intr_cfg(val, pctrl, g); 970 971 if (test_bit(d->hwirq, pctrl->dual_edge_irqs)) 972 msm_gpio_update_dual_edge_pos(pctrl, g, d); 973 974 raw_spin_unlock_irqrestore(&pctrl->lock, flags); 975 976 if (type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH)) 977 irq_set_handler_locked(d, handle_level_irq); 978 else if (type & (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING)) 979 irq_set_handler_locked(d, handle_edge_irq); 980 > 981 return 0; > 982 } 983 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip