Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/mpic: remove unused functions

Drop unused fsl_mpic_primary_get_version(), mpic_set_clk_ratio(),
mpic_set_serial_int().

+ fsl_mpic_primary_get_version() is just a safe wrapper around
fsl_mpic_get_version() for SMP configurations. While the latter is
called explicitly for handling PIC initialization and setting up error
interrupt vector depending on PIC hardware version, the former isn't
used for anything.

+ As for mpic_set_clk_ratio() and mpic_set_serial_int(), they both are
almost nine years old[1] but still have no chance to be called even from
out-of-tree modules because they both are __init and of course aren't
exported.

[1] https://lists.ozlabs.org/pipermail/linuxppc-dev/2006-June/023867.html

Signed-off-by: Arseny Solokha <asolokha@kb.kras.ru>
Cc: hongtao.jia@freescale.com
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

authored by

Arseny Solokha and committed by
Michael Ellerman
5e86bfde f98e7f2f

-55
-20
arch/powerpc/include/asm/mpic.h
··· 34 34 #define MPIC_GREG_GCONF_BASE_MASK 0x000fffff 35 35 #define MPIC_GREG_GCONF_MCK 0x08000000 36 36 #define MPIC_GREG_GLOBAL_CONF_1 0x00030 37 - #define MPIC_GREG_GLOBAL_CONF_1_SIE 0x08000000 38 - #define MPIC_GREG_GLOBAL_CONF_1_CLK_RATIO_MASK 0x70000000 39 - #define MPIC_GREG_GLOBAL_CONF_1_CLK_RATIO(r) \ 40 - (((r) << 28) & MPIC_GREG_GLOBAL_CONF_1_CLK_RATIO_MASK) 41 37 #define MPIC_GREG_VENDOR_0 0x00040 42 38 #define MPIC_GREG_VENDOR_1 0x00050 43 39 #define MPIC_GREG_VENDOR_2 0x00060 ··· 391 395 #define MPIC_REGSET_STANDARD MPIC_REGSET(0) /* Original MPIC */ 392 396 #define MPIC_REGSET_TSI108 MPIC_REGSET(1) /* Tsi108/109 PIC */ 393 397 394 - /* Get the version of primary MPIC */ 395 - #ifdef CONFIG_MPIC 396 - extern u32 fsl_mpic_primary_get_version(void); 397 - #else 398 - static inline u32 fsl_mpic_primary_get_version(void) 399 - { 400 - return 0; 401 - } 402 - #endif 403 - 404 398 /* Allocate the controller structure and setup the linux irq descs 405 399 * for the range if interrupts passed in. No HW initialization is 406 400 * actually performed. ··· 481 495 extern unsigned int mpic_get_coreint_irq(void); 482 496 /* Fetch Machine Check interrupt from primary mpic */ 483 497 extern unsigned int mpic_get_mcirq(void); 484 - 485 - /* Set the EPIC clock ratio */ 486 - void mpic_set_clk_ratio(struct mpic *mpic, u32 clock_ratio); 487 - 488 - /* Enable/Disable EPIC serial interrupt mode */ 489 - void mpic_set_serial_int(struct mpic *mpic, int enable); 490 498 491 499 #endif /* __KERNEL__ */ 492 500 #endif /* _ASM_POWERPC_MPIC_H */
-35
arch/powerpc/sysdev/mpic.c
··· 1219 1219 * Exported functions 1220 1220 */ 1221 1221 1222 - u32 fsl_mpic_primary_get_version(void) 1223 - { 1224 - struct mpic *mpic = mpic_primary; 1225 - 1226 - if (mpic) 1227 - return fsl_mpic_get_version(mpic); 1228 - 1229 - return 0; 1230 - } 1231 - 1232 1222 struct mpic * __init mpic_alloc(struct device_node *node, 1233 1223 phys_addr_t phys_addr, 1234 1224 unsigned int flags, ··· 1664 1674 /* FSL mpic error interrupt intialization */ 1665 1675 if (mpic->flags & MPIC_FSL_HAS_EIMR) 1666 1676 mpic_err_int_init(mpic, MPIC_FSL_ERR_INT); 1667 - } 1668 - 1669 - void __init mpic_set_clk_ratio(struct mpic *mpic, u32 clock_ratio) 1670 - { 1671 - u32 v; 1672 - 1673 - v = mpic_read(mpic->gregs, MPIC_GREG_GLOBAL_CONF_1); 1674 - v &= ~MPIC_GREG_GLOBAL_CONF_1_CLK_RATIO_MASK; 1675 - v |= MPIC_GREG_GLOBAL_CONF_1_CLK_RATIO(clock_ratio); 1676 - mpic_write(mpic->gregs, MPIC_GREG_GLOBAL_CONF_1, v); 1677 - } 1678 - 1679 - void __init mpic_set_serial_int(struct mpic *mpic, int enable) 1680 - { 1681 - unsigned long flags; 1682 - u32 v; 1683 - 1684 - raw_spin_lock_irqsave(&mpic_lock, flags); 1685 - v = mpic_read(mpic->gregs, MPIC_GREG_GLOBAL_CONF_1); 1686 - if (enable) 1687 - v |= MPIC_GREG_GLOBAL_CONF_1_SIE; 1688 - else 1689 - v &= ~MPIC_GREG_GLOBAL_CONF_1_SIE; 1690 - mpic_write(mpic->gregs, MPIC_GREG_GLOBAL_CONF_1, v); 1691 - raw_spin_unlock_irqrestore(&mpic_lock, flags); 1692 1677 } 1693 1678 1694 1679 void mpic_irq_set_priority(unsigned int irq, unsigned int pri)