arch/arm/mach-s3c/irq-s3c24xx.c:529:31: sparse: sparse: incorrect type in initializer (different address spaces)
From: kernel test robot
Date: Tue Jul 13 2021 - 06:53:54 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 7fef2edf7cc753b51f7ccc74993971b0a9c81eca
commit: 71b9114d2c13a648fbe6523dd859e611c316ad90 ARM: s3c: move into a common directory
date: 11 months ago
config: arm-randconfig-s032-20210713 (attached as .config)
compiler: arm-linux-gnueabi-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
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=71b9114d2c13a648fbe6523dd859e611c316ad90
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 71b9114d2c13a648fbe6523dd859e611c316ad90
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
sparse warnings: (new ones prefixed by >>)
arch/arm/mach-s3c/irq-s3c24xx.c:360:39: sparse: sparse: symbol 's3c24xx_handle_irq' was not declared. Should it be static?
>> arch/arm/mach-s3c/irq-s3c24xx.c:529:31: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void [noderef] __iomem *base @@ got void * @@
arch/arm/mach-s3c/irq-s3c24xx.c:529:31: sparse: expected void [noderef] __iomem *base
arch/arm/mach-s3c/irq-s3c24xx.c:529:31: sparse: got void *
>> arch/arm/mach-s3c/irq-s3c24xx.c:573:22: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *base @@ got void * @@
arch/arm/mach-s3c/irq-s3c24xx.c:573:22: sparse: expected void [noderef] __iomem *base
arch/arm/mach-s3c/irq-s3c24xx.c:573:22: sparse: got void *
arch/arm/mach-s3c/irq-s3c24xx.c:1308:12: sparse: sparse: symbol 's3c2410_init_intc_of' was not declared. Should it be static?
arch/arm/mach-s3c/irq-s3c24xx.c:1330:12: sparse: sparse: symbol 's3c2416_init_intc_of' was not declared. Should it be static?
vim +529 arch/arm/mach-s3c/irq-s3c24xx.c
17453dd2e7df20 arch/arm/mach-s3c24xx/irq.c Heiko Stuebner 2013-03-07 359
17453dd2e7df20 arch/arm/mach-s3c24xx/irq.c Heiko Stuebner 2013-03-07 @360 asmlinkage void __exception_irq_entry s3c24xx_handle_irq(struct pt_regs *regs)
17453dd2e7df20 arch/arm/mach-s3c24xx/irq.c Heiko Stuebner 2013-03-07 361 {
17453dd2e7df20 arch/arm/mach-s3c24xx/irq.c Heiko Stuebner 2013-03-07 362 do {
658dc8fb9cbc77 drivers/irqchip/irq-s3c24xx.c Heiko Stuebner 2013-04-04 363 if (likely(s3c_intc[0]))
f0774d41da0e60 drivers/irqchip/irq-s3c24xx.c Heiko Stuebner 2013-04-04 364 if (s3c24xx_handle_intc(s3c_intc[0], regs, 0))
17453dd2e7df20 arch/arm/mach-s3c24xx/irq.c Heiko Stuebner 2013-03-07 365 continue;
17453dd2e7df20 arch/arm/mach-s3c24xx/irq.c Heiko Stuebner 2013-03-07 366
658dc8fb9cbc77 drivers/irqchip/irq-s3c24xx.c Heiko Stuebner 2013-04-04 367 if (s3c_intc[2])
f0774d41da0e60 drivers/irqchip/irq-s3c24xx.c Heiko Stuebner 2013-04-04 368 if (s3c24xx_handle_intc(s3c_intc[2], regs, 64))
17453dd2e7df20 arch/arm/mach-s3c24xx/irq.c Heiko Stuebner 2013-03-07 369 continue;
17453dd2e7df20 arch/arm/mach-s3c24xx/irq.c Heiko Stuebner 2013-03-07 370
17453dd2e7df20 arch/arm/mach-s3c24xx/irq.c Heiko Stuebner 2013-03-07 371 break;
17453dd2e7df20 arch/arm/mach-s3c24xx/irq.c Heiko Stuebner 2013-03-07 372 } while (1);
17453dd2e7df20 arch/arm/mach-s3c24xx/irq.c Heiko Stuebner 2013-03-07 373 }
17453dd2e7df20 arch/arm/mach-s3c24xx/irq.c Heiko Stuebner 2013-03-07 374
229fd8ffba57df arch/arm/plat-s3c24xx/irq.c Ben Dooks 2009-08-03 375 #ifdef CONFIG_FIQ
229fd8ffba57df arch/arm/plat-s3c24xx/irq.c Ben Dooks 2009-08-03 376 /**
229fd8ffba57df arch/arm/plat-s3c24xx/irq.c Ben Dooks 2009-08-03 377 * s3c24xx_set_fiq - set the FIQ routing
229fd8ffba57df arch/arm/plat-s3c24xx/irq.c Ben Dooks 2009-08-03 378 * @irq: IRQ number to route to FIQ on processor.
cd4bd8f9435ddf arch/arm/mach-s3c24xx/irq-s3c24xx.c Arnd Bergmann 2020-08-06 379 * @ack_ptr: pointer to a location for storing the bit mask
229fd8ffba57df arch/arm/plat-s3c24xx/irq.c Ben Dooks 2009-08-03 380 * @on: Whether to route @irq to the FIQ, or to remove the FIQ routing.
229fd8ffba57df arch/arm/plat-s3c24xx/irq.c Ben Dooks 2009-08-03 381 *
229fd8ffba57df arch/arm/plat-s3c24xx/irq.c Ben Dooks 2009-08-03 382 * Change the state of the IRQ to FIQ routing depending on @irq and @on. If
229fd8ffba57df arch/arm/plat-s3c24xx/irq.c Ben Dooks 2009-08-03 383 * @on is true, the @irq is checked to see if it can be routed and the
229fd8ffba57df arch/arm/plat-s3c24xx/irq.c Ben Dooks 2009-08-03 384 * interrupt controller updated to route the IRQ. If @on is false, the FIQ
229fd8ffba57df arch/arm/plat-s3c24xx/irq.c Ben Dooks 2009-08-03 385 * routing is cleared, regardless of which @irq is specified.
cd4bd8f9435ddf arch/arm/mach-s3c24xx/irq-s3c24xx.c Arnd Bergmann 2020-08-06 386 *
cd4bd8f9435ddf arch/arm/mach-s3c24xx/irq-s3c24xx.c Arnd Bergmann 2020-08-06 387 * returns the mask value for the register.
229fd8ffba57df arch/arm/plat-s3c24xx/irq.c Ben Dooks 2009-08-03 388 */
cd4bd8f9435ddf arch/arm/mach-s3c24xx/irq-s3c24xx.c Arnd Bergmann 2020-08-06 389 int s3c24xx_set_fiq(unsigned int irq, u32 *ack_ptr, bool on)
229fd8ffba57df arch/arm/plat-s3c24xx/irq.c Ben Dooks 2009-08-03 390 {
229fd8ffba57df arch/arm/plat-s3c24xx/irq.c Ben Dooks 2009-08-03 391 u32 intmod;
229fd8ffba57df arch/arm/plat-s3c24xx/irq.c Ben Dooks 2009-08-03 392 unsigned offs;
229fd8ffba57df arch/arm/plat-s3c24xx/irq.c Ben Dooks 2009-08-03 393
229fd8ffba57df arch/arm/plat-s3c24xx/irq.c Ben Dooks 2009-08-03 394 if (on) {
229fd8ffba57df arch/arm/plat-s3c24xx/irq.c Ben Dooks 2009-08-03 395 offs = irq - FIQ_START;
229fd8ffba57df arch/arm/plat-s3c24xx/irq.c Ben Dooks 2009-08-03 396 if (offs > 31)
cd4bd8f9435ddf arch/arm/mach-s3c24xx/irq-s3c24xx.c Arnd Bergmann 2020-08-06 397 return 0;
229fd8ffba57df arch/arm/plat-s3c24xx/irq.c Ben Dooks 2009-08-03 398
229fd8ffba57df arch/arm/plat-s3c24xx/irq.c Ben Dooks 2009-08-03 399 intmod = 1 << offs;
229fd8ffba57df arch/arm/plat-s3c24xx/irq.c Ben Dooks 2009-08-03 400 } else {
229fd8ffba57df arch/arm/plat-s3c24xx/irq.c Ben Dooks 2009-08-03 401 intmod = 0;
229fd8ffba57df arch/arm/plat-s3c24xx/irq.c Ben Dooks 2009-08-03 402 }
229fd8ffba57df arch/arm/plat-s3c24xx/irq.c Ben Dooks 2009-08-03 403
cd4bd8f9435ddf arch/arm/mach-s3c24xx/irq-s3c24xx.c Arnd Bergmann 2020-08-06 404 if (ack_ptr)
cd4bd8f9435ddf arch/arm/mach-s3c24xx/irq-s3c24xx.c Arnd Bergmann 2020-08-06 405 *ack_ptr = intmod;
353332855eef20 drivers/irqchip/irq-s3c24xx.c Ben Dooks 2016-06-21 406 writel_relaxed(intmod, S3C2410_INTMOD);
cd4bd8f9435ddf arch/arm/mach-s3c24xx/irq-s3c24xx.c Arnd Bergmann 2020-08-06 407
cd4bd8f9435ddf arch/arm/mach-s3c24xx/irq-s3c24xx.c Arnd Bergmann 2020-08-06 408 return intmod;
229fd8ffba57df arch/arm/plat-s3c24xx/irq.c Ben Dooks 2009-08-03 409 }
0f13c8248040d6 arch/arm/plat-s3c24xx/irq.c Ben Dooks 2009-12-07 410
0f13c8248040d6 arch/arm/plat-s3c24xx/irq.c Ben Dooks 2009-12-07 411 EXPORT_SYMBOL_GPL(s3c24xx_set_fiq);
229fd8ffba57df arch/arm/plat-s3c24xx/irq.c Ben Dooks 2009-08-03 412 #endif
229fd8ffba57df arch/arm/plat-s3c24xx/irq.c Ben Dooks 2009-08-03 413
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 414 static int s3c24xx_irq_map(struct irq_domain *h, unsigned int virq,
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 415 irq_hw_number_t hw)
a21765a70ec06b arch/arm/plat-s3c24xx/irq.c Ben Dooks 2007-02-11 416 {
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 417 struct s3c_irq_intc *intc = h->host_data;
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 418 struct s3c_irq_data *irq_data = &intc->irqs[hw];
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 419 struct s3c_irq_intc *parent_intc;
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 420 struct s3c_irq_data *parent_irq_data;
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 421 unsigned int irqno;
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 422
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 423 /* attach controller pointer to irq_data */
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 424 irq_data->intc = intc;
f5a25524508e68 drivers/irqchip/irq-s3c24xx.c Heiko Stuebner 2013-04-04 425 irq_data->offset = hw;
a21765a70ec06b arch/arm/plat-s3c24xx/irq.c Ben Dooks 2007-02-11 426
0fe3cb1ea5bf38 arch/arm/mach-s3c24xx/irq.c Heiko Stuebner 2013-03-07 427 parent_intc = intc->parent;
a21765a70ec06b arch/arm/plat-s3c24xx/irq.c Ben Dooks 2007-02-11 428
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 429 /* set handler and flags */
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 430 switch (irq_data->type) {
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 431 case S3C_IRQTYPE_NONE:
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 432 return 0;
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 433 case S3C_IRQTYPE_EINT:
1c8408e3137bcb arch/arm/mach-s3c24xx/irq.c Heiko Stuebner 2013-02-12 434 /* On the S3C2412, the EINT0to3 have a parent irq
1c8408e3137bcb arch/arm/mach-s3c24xx/irq.c Heiko Stuebner 2013-02-12 435 * but need the s3c_irq_eint0t4 chip
1c8408e3137bcb arch/arm/mach-s3c24xx/irq.c Heiko Stuebner 2013-02-12 436 */
0fe3cb1ea5bf38 arch/arm/mach-s3c24xx/irq.c Heiko Stuebner 2013-03-07 437 if (parent_intc && (!soc_is_s3c2412() || hw >= 4))
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 438 irq_set_chip_and_handler(virq, &s3c_irqext_chip,
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 439 handle_edge_irq);
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 440 else
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 441 irq_set_chip_and_handler(virq, &s3c_irq_eint0t4,
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 442 handle_edge_irq);
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 443 break;
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 444 case S3C_IRQTYPE_EDGE:
0fe3cb1ea5bf38 arch/arm/mach-s3c24xx/irq.c Heiko Stuebner 2013-03-07 445 if (parent_intc || intc->reg_pending == S3C2416_SRCPND2)
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 446 irq_set_chip_and_handler(virq, &s3c_irq_level_chip,
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 447 handle_edge_irq);
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 448 else
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 449 irq_set_chip_and_handler(virq, &s3c_irq_chip,
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 450 handle_edge_irq);
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 451 break;
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 452 case S3C_IRQTYPE_LEVEL:
0fe3cb1ea5bf38 arch/arm/mach-s3c24xx/irq.c Heiko Stuebner 2013-03-07 453 if (parent_intc)
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 454 irq_set_chip_and_handler(virq, &s3c_irq_level_chip,
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 455 handle_level_irq);
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 456 else
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 457 irq_set_chip_and_handler(virq, &s3c_irq_chip,
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 458 handle_level_irq);
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 459 break;
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 460 default:
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 461 pr_err("irq-s3c24xx: unsupported irqtype %d\n", irq_data->type);
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 462 return -EINVAL;
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 463 }
f5a25524508e68 drivers/irqchip/irq-s3c24xx.c Heiko Stuebner 2013-04-04 464
f5a25524508e68 drivers/irqchip/irq-s3c24xx.c Heiko Stuebner 2013-04-04 465 irq_set_chip_data(virq, irq_data);
f5a25524508e68 drivers/irqchip/irq-s3c24xx.c Heiko Stuebner 2013-04-04 466
0fe3cb1ea5bf38 arch/arm/mach-s3c24xx/irq.c Heiko Stuebner 2013-03-07 467 if (parent_intc && irq_data->type != S3C_IRQTYPE_NONE) {
502a29890cb102 arch/arm/mach-s3c24xx/irq.c Heiko Stuebner 2013-03-07 468 if (irq_data->parent_irq > 31) {
502a29890cb102 arch/arm/mach-s3c24xx/irq.c Heiko Stuebner 2013-03-07 469 pr_err("irq-s3c24xx: parent irq %lu is out of range\n",
502a29890cb102 arch/arm/mach-s3c24xx/irq.c Heiko Stuebner 2013-03-07 470 irq_data->parent_irq);
d17cab4451df1f drivers/irqchip/irq-s3c24xx.c Rob Herring 2015-08-29 471 return -EINVAL;
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 472 }
a21765a70ec06b arch/arm/plat-s3c24xx/irq.c Ben Dooks 2007-02-11 473
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 474 parent_irq_data = &parent_intc->irqs[irq_data->parent_irq];
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 475 parent_irq_data->sub_intc = intc;
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 476 parent_irq_data->sub_bits |= (1UL << hw);
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 477
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 478 /* attach the demuxer to the parent irq */
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 479 irqno = irq_find_mapping(parent_intc->domain,
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 480 irq_data->parent_irq);
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 481 if (!irqno) {
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 482 pr_err("irq-s3c24xx: could not find mapping for parent irq %lu\n",
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 483 irq_data->parent_irq);
d17cab4451df1f drivers/irqchip/irq-s3c24xx.c Rob Herring 2015-08-29 484 return -EINVAL;
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 485 }
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 486 irq_set_chained_handler(irqno, s3c_irq_demux);
a21765a70ec06b arch/arm/plat-s3c24xx/irq.c Ben Dooks 2007-02-11 487 }
a21765a70ec06b arch/arm/plat-s3c24xx/irq.c Ben Dooks 2007-02-11 488
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 489 return 0;
a21765a70ec06b arch/arm/plat-s3c24xx/irq.c Ben Dooks 2007-02-11 490 }
a21765a70ec06b arch/arm/plat-s3c24xx/irq.c Ben Dooks 2007-02-11 491
9600973656c697 drivers/irqchip/irq-s3c24xx.c Krzysztof Kozlowski 2015-04-27 492 static const struct irq_domain_ops s3c24xx_irq_ops = {
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 493 .map = s3c24xx_irq_map,
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 494 .xlate = irq_domain_xlate_twocell,
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 495 };
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 496
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 497 static void s3c24xx_clear_intc(struct s3c_irq_intc *intc)
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 498 {
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 499 void __iomem *reg_source;
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 500 unsigned long pend;
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 501 unsigned long last;
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 502 int i;
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 503
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 504 /* if intpnd is set, read the next pending irq from there */
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 505 reg_source = intc->reg_intpnd ? intc->reg_intpnd : intc->reg_pending;
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 506
a21765a70ec06b arch/arm/plat-s3c24xx/irq.c Ben Dooks 2007-02-11 507 last = 0;
a21765a70ec06b arch/arm/plat-s3c24xx/irq.c Ben Dooks 2007-02-11 508 for (i = 0; i < 4; i++) {
353332855eef20 drivers/irqchip/irq-s3c24xx.c Ben Dooks 2016-06-21 509 pend = readl_relaxed(reg_source);
a21765a70ec06b arch/arm/plat-s3c24xx/irq.c Ben Dooks 2007-02-11 510
a21765a70ec06b arch/arm/plat-s3c24xx/irq.c Ben Dooks 2007-02-11 511 if (pend == 0 || pend == last)
a21765a70ec06b arch/arm/plat-s3c24xx/irq.c Ben Dooks 2007-02-11 512 break;
a21765a70ec06b arch/arm/plat-s3c24xx/irq.c Ben Dooks 2007-02-11 513
353332855eef20 drivers/irqchip/irq-s3c24xx.c Ben Dooks 2016-06-21 514 writel_relaxed(pend, intc->reg_pending);
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 515 if (intc->reg_intpnd)
353332855eef20 drivers/irqchip/irq-s3c24xx.c Ben Dooks 2016-06-21 516 writel_relaxed(pend, intc->reg_intpnd);
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 517
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 518 pr_info("irq: clearing pending status %08x\n", (int)pend);
a21765a70ec06b arch/arm/plat-s3c24xx/irq.c Ben Dooks 2007-02-11 519 last = pend;
a21765a70ec06b arch/arm/plat-s3c24xx/irq.c Ben Dooks 2007-02-11 520 }
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 521 }
a21765a70ec06b arch/arm/plat-s3c24xx/irq.c Ben Dooks 2007-02-11 522
bc8fd900c4d460 drivers/irqchip/irq-s3c24xx.c Arnd Bergmann 2013-04-25 523 static struct s3c_irq_intc * __init s3c24xx_init_intc(struct device_node *np,
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 524 struct s3c_irq_data *irq_data,
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 525 struct s3c_irq_intc *parent,
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 526 unsigned long address)
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 527 {
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 528 struct s3c_irq_intc *intc;
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 @529 void __iomem *base = (void *)0xf6000000; /* static mapping */
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 530 int irq_num;
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 531 int irq_start;
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 532 int ret;
a21765a70ec06b arch/arm/plat-s3c24xx/irq.c Ben Dooks 2007-02-11 533
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 534 intc = kzalloc(sizeof(struct s3c_irq_intc), GFP_KERNEL);
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 535 if (!intc)
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 536 return ERR_PTR(-ENOMEM);
a21765a70ec06b arch/arm/plat-s3c24xx/irq.c Ben Dooks 2007-02-11 537
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 538 intc->irqs = irq_data;
a21765a70ec06b arch/arm/plat-s3c24xx/irq.c Ben Dooks 2007-02-11 539
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 540 if (parent)
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 541 intc->parent = parent;
a21765a70ec06b arch/arm/plat-s3c24xx/irq.c Ben Dooks 2007-02-11 542
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 543 /* select the correct data for the controller.
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 544 * Need to hard code the irq num start and offset
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 545 * to preserve the static mapping for now
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 546 */
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 547 switch (address) {
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 548 case 0x4a000000:
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 549 pr_debug("irq: found main intc\n");
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 550 intc->reg_pending = base;
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 551 intc->reg_mask = base + 0x08;
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 552 intc->reg_intpnd = base + 0x10;
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 553 irq_num = 32;
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 554 irq_start = S3C2410_IRQ(0);
a21765a70ec06b arch/arm/plat-s3c24xx/irq.c Ben Dooks 2007-02-11 555 break;
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 556 case 0x4a000018:
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 557 pr_debug("irq: found subintc\n");
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 558 intc->reg_pending = base + 0x18;
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 559 intc->reg_mask = base + 0x1c;
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 560 irq_num = 29;
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 561 irq_start = S3C2410_IRQSUB(0);
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 562 break;
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 563 case 0x4a000040:
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 564 pr_debug("irq: found intc2\n");
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 565 intc->reg_pending = base + 0x40;
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 566 intc->reg_mask = base + 0x48;
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 567 intc->reg_intpnd = base + 0x50;
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 568 irq_num = 8;
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 569 irq_start = S3C2416_IRQ(0);
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 570 break;
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 571 case 0x560000a4:
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 572 pr_debug("irq: found eintc\n");
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 @573 base = (void *)0xfd000000;
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 574
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 575 intc->reg_mask = base + 0xa4;
646dd2f0a98094 arch/arm/mach-s3c24xx/irq.c Sylwester Nawrocki 2013-04-09 576 intc->reg_pending = base + 0xa8;
5424f2188a76d0 arch/arm/mach-s3c24xx/irq.c Heiko Stuebner 2013-02-12 577 irq_num = 24;
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 578 irq_start = S3C2410_IRQ(32);
a21765a70ec06b arch/arm/plat-s3c24xx/irq.c Ben Dooks 2007-02-11 579 break;
a21765a70ec06b arch/arm/plat-s3c24xx/irq.c Ben Dooks 2007-02-11 580 default:
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 581 pr_err("irq: unsupported controller address\n");
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 582 ret = -EINVAL;
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 583 goto err;
a21765a70ec06b arch/arm/plat-s3c24xx/irq.c Ben Dooks 2007-02-11 584 }
a21765a70ec06b arch/arm/plat-s3c24xx/irq.c Ben Dooks 2007-02-11 585
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 586 /* now that all the data is complete, init the irq-domain */
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 587 s3c24xx_clear_intc(intc);
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 588 intc->domain = irq_domain_add_legacy(np, irq_num, irq_start,
5424f2188a76d0 arch/arm/mach-s3c24xx/irq.c Heiko Stuebner 2013-02-12 589 0, &s3c24xx_irq_ops,
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 590 intc);
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 591 if (!intc->domain) {
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 592 pr_err("irq: could not create irq-domain\n");
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 593 ret = -EINVAL;
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 594 goto err;
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 595 }
a21765a70ec06b arch/arm/plat-s3c24xx/irq.c Ben Dooks 2007-02-11 596
17453dd2e7df20 arch/arm/mach-s3c24xx/irq.c Heiko Stuebner 2013-03-07 597 set_handle_irq(s3c24xx_handle_irq);
17453dd2e7df20 arch/arm/mach-s3c24xx/irq.c Heiko Stuebner 2013-03-07 598
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 599 return intc;
a21765a70ec06b arch/arm/plat-s3c24xx/irq.c Ben Dooks 2007-02-11 600
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 601 err:
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 602 kfree(intc);
1f629b7a3ced8e arch/arm/plat-s3c24xx/irq.c Heiko Stuebner 2013-01-29 603 return ERR_PTR(ret);
a21765a70ec06b arch/arm/plat-s3c24xx/irq.c Ben Dooks 2007-02-11 604 }
a21765a70ec06b arch/arm/plat-s3c24xx/irq.c Ben Dooks 2007-02-11 605
:::::: The code at line 529 was first introduced by commit
:::::: 1f629b7a3ced8e73784a9ae3b0d9039496878f18 ARM: S3C24XX: transform irq handling into a declarative form
:::::: TO: Heiko Stuebner <heiko@xxxxxxxxx>
:::::: CC: Kukjin Kim <kgene.kim@xxxxxxxxxxx>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip