tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 8a11187eb62b8b910d2c5484e1f5d160e8b11eb4 commit: 6b9a5f88e90983c7725ee56437b5f6ae8974152d [54/13209] Merge remote-tracking branch 'origin/master' into h8300-next config: h8300-randconfig-s031-20220316 (https://download.01.org/0day-ci/archive/20220317/202203171059.Kq93mGUL-lkp@xxxxxxxxx/config) compiler: h8300-linux-gcc (GCC) 11.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # apt-get install sparse # sparse version: v0.6.4-dirty # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=6b9a5f88e90983c7725ee56437b5f6ae8974152d git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout 6b9a5f88e90983c7725ee56437b5f6ae8974152d # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=h8300 SHELL=/bin/bash drivers/irqchip/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> sparse warnings: (new ones prefixed by >>) drivers/irqchip/irq-renesas-h8s.c:48:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void * @@ drivers/irqchip/irq-renesas-h8s.c:48:14: sparse: expected void [noderef] __iomem *addr drivers/irqchip/irq-renesas-h8s.c:48:14: sparse: got void * >> drivers/irqchip/irq-renesas-h8s.c:54:35: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void * @@ drivers/irqchip/irq-renesas-h8s.c:54:35: sparse: expected void const volatile [noderef] __iomem *addr drivers/irqchip/irq-renesas-h8s.c:54:35: sparse: got void * drivers/irqchip/irq-renesas-h8s.c:56:35: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void * @@ drivers/irqchip/irq-renesas-h8s.c:56:35: sparse: expected void const volatile [noderef] __iomem *addr drivers/irqchip/irq-renesas-h8s.c:56:35: sparse: got void * drivers/irqchip/irq-renesas-h8s.c:71:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *addr @@ got void * @@ drivers/irqchip/irq-renesas-h8s.c:71:14: sparse: expected void [noderef] __iomem *addr drivers/irqchip/irq-renesas-h8s.c:71:14: sparse: got void * drivers/irqchip/irq-renesas-h8s.c:78:35: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void * @@ drivers/irqchip/irq-renesas-h8s.c:78:35: sparse: expected void const volatile [noderef] __iomem *addr drivers/irqchip/irq-renesas-h8s.c:78:35: sparse: got void * drivers/irqchip/irq-renesas-h8s.c:80:35: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void * @@ drivers/irqchip/irq-renesas-h8s.c:80:35: sparse: expected void const volatile [noderef] __iomem *addr drivers/irqchip/irq-renesas-h8s.c:80:35: sparse: got void * drivers/irqchip/irq-renesas-h8s.c:91:35: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void * @@ drivers/irqchip/irq-renesas-h8s.c:91:35: sparse: expected void const volatile [noderef] __iomem *addr drivers/irqchip/irq-renesas-h8s.c:91:35: sparse: got void * drivers/irqchip/irq-renesas-h8s.c:93:35: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void * @@ drivers/irqchip/irq-renesas-h8s.c:93:35: sparse: expected void const volatile [noderef] __iomem *addr drivers/irqchip/irq-renesas-h8s.c:93:35: sparse: got void * >> drivers/irqchip/irq-renesas-h8s.c:123:18: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *static [toplevel] ipr_base @@ got void [noderef] __iomem * @@ drivers/irqchip/irq-renesas-h8s.c:123:18: sparse: expected void *static [toplevel] ipr_base drivers/irqchip/irq-renesas-h8s.c:123:18: sparse: got void [noderef] __iomem * >> drivers/irqchip/irq-renesas-h8s.c:124:18: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *static [toplevel] icr_base @@ got void [noderef] __iomem * @@ drivers/irqchip/irq-renesas-h8s.c:124:18: sparse: expected void *static [toplevel] icr_base drivers/irqchip/irq-renesas-h8s.c:124:18: sparse: got void [noderef] __iomem * drivers/irqchip/irq-renesas-h8s.c:130:43: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void * @@ drivers/irqchip/irq-renesas-h8s.c:130:43: sparse: expected void const volatile [noderef] __iomem *addr drivers/irqchip/irq-renesas-h8s.c:130:43: sparse: got void * drivers/irqchip/irq-renesas-h8s.c:132:30: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void * @@ drivers/irqchip/irq-renesas-h8s.c:132:30: sparse: expected void const volatile [noderef] __iomem *addr drivers/irqchip/irq-renesas-h8s.c:132:30: sparse: got void * drivers/irqchip/irq-renesas-h8s.c: note: in included file (through include/linux/io.h, include/linux/irq.h): arch/h8300/include/asm/io.h:20:18: sparse: sparse: cast removes address space '__iomem' of expression arch/h8300/include/asm/io.h:38:11: sparse: sparse: cast removes address space '__iomem' of expression arch/h8300/include/asm/io.h:20:18: sparse: sparse: cast removes address space '__iomem' of expression arch/h8300/include/asm/io.h:38:11: sparse: sparse: cast removes address space '__iomem' of expression arch/h8300/include/asm/io.h:20:18: sparse: sparse: cast removes address space '__iomem' of expression arch/h8300/include/asm/io.h:38:11: sparse: sparse: cast removes address space '__iomem' of expression arch/h8300/include/asm/io.h:20:18: sparse: sparse: cast removes address space '__iomem' of expression arch/h8300/include/asm/io.h:38:11: sparse: sparse: cast removes address space '__iomem' of expression arch/h8300/include/asm/io.h:20:18: sparse: sparse: cast removes address space '__iomem' of expression arch/h8300/include/asm/io.h:38:11: sparse: sparse: cast removes address space '__iomem' of expression arch/h8300/include/asm/io.h:38:11: sparse: sparse: cast removes address space '__iomem' of expression arch/h8300/include/asm/io.h:38:11: sparse: sparse: cast removes address space '__iomem' of expression vim +54 drivers/irqchip/irq-renesas-h8s.c 8a7644821ae00b Yoshinori Sato 2015-05-10 36 8a7644821ae00b Yoshinori Sato 2015-05-10 37 static void h8s_disable_irq(struct irq_data *data) 8a7644821ae00b Yoshinori Sato 2015-05-10 38 { 8a7644821ae00b Yoshinori Sato 2015-05-10 39 int pos; 558e6694cd4da8 Yoshinori Sato 2018-08-13 40 void __iomem *addr; 8a7644821ae00b Yoshinori Sato 2015-05-10 41 unsigned short pri; beab3d5cb0e14e Yoshinori Sato 2020-04-15 42 int irq = data->irq - 16; beab3d5cb0e14e Yoshinori Sato 2020-04-15 43 unsigned short ier; beab3d5cb0e14e Yoshinori Sato 2020-04-15 44 beab3d5cb0e14e Yoshinori Sato 2020-04-15 45 if (irq < 0) beab3d5cb0e14e Yoshinori Sato 2020-04-15 46 return; 8a7644821ae00b Yoshinori Sato 2015-05-10 47 beab3d5cb0e14e Yoshinori Sato 2020-04-15 @48 addr = IPRA + ((ipr_table[irq] & 0xf0) >> 3); beab3d5cb0e14e Yoshinori Sato 2020-04-15 49 pos = (ipr_table[irq] & 0x0f) * 4; 8a7644821ae00b Yoshinori Sato 2015-05-10 50 pri = ~(0x000f << pos); 2c496a11304da8 Yoshinori Sato 2019-12-26 51 pri &= __raw_readw(addr); 2c496a11304da8 Yoshinori Sato 2019-12-26 52 __raw_writew(pri, addr); beab3d5cb0e14e Yoshinori Sato 2020-04-15 53 if (irq < 16) { beab3d5cb0e14e Yoshinori Sato 2020-04-15 @54 ier = __raw_readw(IER); beab3d5cb0e14e Yoshinori Sato 2020-04-15 55 ier &= ~(1 << irq); beab3d5cb0e14e Yoshinori Sato 2020-04-15 56 __raw_writew(ier, IER); beab3d5cb0e14e Yoshinori Sato 2020-04-15 57 } 8a7644821ae00b Yoshinori Sato 2015-05-10 58 } 8a7644821ae00b Yoshinori Sato 2015-05-10 59 8a7644821ae00b Yoshinori Sato 2015-05-10 60 static void h8s_enable_irq(struct irq_data *data) 8a7644821ae00b Yoshinori Sato 2015-05-10 61 { 8a7644821ae00b Yoshinori Sato 2015-05-10 62 int pos; 558e6694cd4da8 Yoshinori Sato 2018-08-13 63 void __iomem *addr; 8a7644821ae00b Yoshinori Sato 2015-05-10 64 unsigned short pri; beab3d5cb0e14e Yoshinori Sato 2020-04-15 65 int irq = data->irq - 16; beab3d5cb0e14e Yoshinori Sato 2020-04-15 66 unsigned short ier; beab3d5cb0e14e Yoshinori Sato 2020-04-15 67 beab3d5cb0e14e Yoshinori Sato 2020-04-15 68 if (irq < 0) beab3d5cb0e14e Yoshinori Sato 2020-04-15 69 return; 8a7644821ae00b Yoshinori Sato 2015-05-10 70 beab3d5cb0e14e Yoshinori Sato 2020-04-15 71 addr = IPRA + ((ipr_table[irq] & 0xf0) >> 3); beab3d5cb0e14e Yoshinori Sato 2020-04-15 72 pos = (ipr_table[irq] & 0x0f) * 4; 8a7644821ae00b Yoshinori Sato 2015-05-10 73 pri = ~(0x000f << pos); 2c496a11304da8 Yoshinori Sato 2019-12-26 74 pri &= __raw_readw(addr); 8a7644821ae00b Yoshinori Sato 2015-05-10 75 pri |= 1 << pos; 2c496a11304da8 Yoshinori Sato 2019-12-26 76 __raw_writew(pri, addr); beab3d5cb0e14e Yoshinori Sato 2020-04-15 77 if (irq < 16) { beab3d5cb0e14e Yoshinori Sato 2020-04-15 78 ier = __raw_readw(IER); beab3d5cb0e14e Yoshinori Sato 2020-04-15 79 ier &= ~(1 << irq); beab3d5cb0e14e Yoshinori Sato 2020-04-15 @80 __raw_writew(ier, IER); beab3d5cb0e14e Yoshinori Sato 2020-04-15 81 } 2c496a11304da8 Yoshinori Sato 2019-12-26 82 } 2c496a11304da8 Yoshinori Sato 2019-12-26 83 2c496a11304da8 Yoshinori Sato 2019-12-26 84 static void h8s_ack_irq(struct irq_data *data) 2c496a11304da8 Yoshinori Sato 2019-12-26 85 { 2c496a11304da8 Yoshinori Sato 2019-12-26 86 int irq = data->irq; 2c496a11304da8 Yoshinori Sato 2019-12-26 87 uint16_t isr; 2c496a11304da8 Yoshinori Sato 2019-12-26 88 2c496a11304da8 Yoshinori Sato 2019-12-26 89 if (irq >= 16 && irq < 32) { 2c496a11304da8 Yoshinori Sato 2019-12-26 90 irq -= 16; beab3d5cb0e14e Yoshinori Sato 2020-04-15 @91 isr = __raw_readw(ISR); 2c496a11304da8 Yoshinori Sato 2019-12-26 92 isr &= ~(1 << irq); beab3d5cb0e14e Yoshinori Sato 2020-04-15 93 __raw_writew(isr, ISR); 2c496a11304da8 Yoshinori Sato 2019-12-26 94 } 8a7644821ae00b Yoshinori Sato 2015-05-10 95 } 8a7644821ae00b Yoshinori Sato 2015-05-10 96 8a7644821ae00b Yoshinori Sato 2015-05-10 97 struct irq_chip h8s_irq_chip = { 8a7644821ae00b Yoshinori Sato 2015-05-10 98 .name = "H8S-INTC", 8a7644821ae00b Yoshinori Sato 2015-05-10 99 .irq_enable = h8s_enable_irq, 8a7644821ae00b Yoshinori Sato 2015-05-10 100 .irq_disable = h8s_disable_irq, 2c496a11304da8 Yoshinori Sato 2019-12-26 101 .irq_ack = h8s_ack_irq, 8a7644821ae00b Yoshinori Sato 2015-05-10 102 }; 8a7644821ae00b Yoshinori Sato 2015-05-10 103 8a7644821ae00b Yoshinori Sato 2015-05-10 104 static __init int irq_map(struct irq_domain *h, unsigned int virq, 8a7644821ae00b Yoshinori Sato 2015-05-10 105 irq_hw_number_t hw_irq_num) 8a7644821ae00b Yoshinori Sato 2015-05-10 106 { 8a7644821ae00b Yoshinori Sato 2015-05-10 107 irq_set_chip_and_handler(virq, &h8s_irq_chip, handle_simple_irq); 8a7644821ae00b Yoshinori Sato 2015-05-10 108 8a7644821ae00b Yoshinori Sato 2015-05-10 109 return 0; 8a7644821ae00b Yoshinori Sato 2015-05-10 110 } 8a7644821ae00b Yoshinori Sato 2015-05-10 111 c9262475fa592c Tobias Klauser 2017-06-02 112 static const struct irq_domain_ops irq_ops = { 8a7644821ae00b Yoshinori Sato 2015-05-10 113 .map = irq_map, 8a7644821ae00b Yoshinori Sato 2015-05-10 114 .xlate = irq_domain_xlate_onecell, 8a7644821ae00b Yoshinori Sato 2015-05-10 115 }; 8a7644821ae00b Yoshinori Sato 2015-05-10 116 8a7644821ae00b Yoshinori Sato 2015-05-10 117 static int __init h8s_intc_of_init(struct device_node *intc, 8a7644821ae00b Yoshinori Sato 2015-05-10 118 struct device_node *parent) 8a7644821ae00b Yoshinori Sato 2015-05-10 119 { 8a7644821ae00b Yoshinori Sato 2015-05-10 120 struct irq_domain *domain; 8a7644821ae00b Yoshinori Sato 2015-05-10 121 int n; 8a7644821ae00b Yoshinori Sato 2015-05-10 122 2c496a11304da8 Yoshinori Sato 2019-12-26 @123 ipr_base = of_iomap(intc, 0); 2c496a11304da8 Yoshinori Sato 2019-12-26 @124 icr_base = of_iomap(intc, 1); 2c496a11304da8 Yoshinori Sato 2019-12-26 125 BUG_ON(!ipr_base || !icr_base); 8a7644821ae00b Yoshinori Sato 2015-05-10 126 8a7644821ae00b Yoshinori Sato 2015-05-10 127 /* All interrupt priority is 0 (disable) */ 8a7644821ae00b Yoshinori Sato 2015-05-10 128 /* IPRA to IPRK */ 8a7644821ae00b Yoshinori Sato 2015-05-10 129 for (n = 0; n <= 'k' - 'a'; n++) 2c496a11304da8 Yoshinori Sato 2019-12-26 130 __raw_writew(0x0000, IPRA + (n * 2)); 8a7644821ae00b Yoshinori Sato 2015-05-10 131 beab3d5cb0e14e Yoshinori Sato 2020-04-15 132 __raw_writew(0xffff, IER); 8a7644821ae00b Yoshinori Sato 2015-05-10 133 domain = irq_domain_add_linear(intc, NR_IRQS, &irq_ops, NULL); 8a7644821ae00b Yoshinori Sato 2015-05-10 134 BUG_ON(!domain); 8a7644821ae00b Yoshinori Sato 2015-05-10 135 irq_set_default_host(domain); 8a7644821ae00b Yoshinori Sato 2015-05-10 136 return 0; 8a7644821ae00b Yoshinori Sato 2015-05-10 137 } 8a7644821ae00b Yoshinori Sato 2015-05-10 138 :::::: The code at line 54 was first introduced by commit :::::: beab3d5cb0e14e6397c4e596b3dbf1d36bf49d06 irq-renesas-h8s: Fix external interrupt control. :::::: TO: Yoshinori Sato <ysato@xxxxxxxxxxxxxxxxxxxx> :::::: CC: Yoshinori Sato <ysato@xxxxxxxxxxxxxxxxxxxx> --- 0-DAY CI Kernel Test Service https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx