/linux-4.1.27/drivers/gpio/ |
H A D | gpio-janz-ttl.c | 62 struct ttl_module *mod = dev_get_drvdata(gpio->dev); ttl_get_value() local 67 shadow = &mod->porta_shadow; ttl_get_value() 69 shadow = &mod->portb_shadow; ttl_get_value() 72 shadow = &mod->portc_shadow; ttl_get_value() 76 spin_lock(&mod->lock); ttl_get_value() 78 spin_unlock(&mod->lock); ttl_get_value() 84 struct ttl_module *mod = dev_get_drvdata(gpio->dev); ttl_set_value() local 89 port = &mod->regs->porta; ttl_set_value() 90 shadow = &mod->porta_shadow; ttl_set_value() 92 port = &mod->regs->portb; ttl_set_value() 93 shadow = &mod->portb_shadow; ttl_set_value() 96 port = &mod->regs->portc; ttl_set_value() 97 shadow = &mod->portc_shadow; ttl_set_value() 101 spin_lock(&mod->lock); ttl_set_value() 108 spin_unlock(&mod->lock); ttl_set_value() 111 static void ttl_write_reg(struct ttl_module *mod, u8 reg, u16 val) ttl_write_reg() argument 113 iowrite16be(reg, &mod->regs->control); ttl_write_reg() 114 iowrite16be(val, &mod->regs->control); ttl_write_reg() 117 static void ttl_setup_device(struct ttl_module *mod) ttl_setup_device() argument 120 iowrite16be(0x0000, &mod->regs->control); ttl_setup_device() 121 iowrite16be(0x0001, &mod->regs->control); ttl_setup_device() 122 iowrite16be(0x0000, &mod->regs->control); ttl_setup_device() 125 ttl_write_reg(mod, PORTA_IOCTL, 0x00ff); ttl_setup_device() 126 ttl_write_reg(mod, PORTB_IOCTL, 0x00ff); ttl_setup_device() 127 ttl_write_reg(mod, PORTC_IOCTL, 0x000f); ttl_setup_device() 130 ttl_write_reg(mod, PORTA_DIRECTION, 0x0000); ttl_setup_device() 131 ttl_write_reg(mod, PORTB_DIRECTION, 0x0000); ttl_setup_device() 132 ttl_write_reg(mod, PORTC_DIRECTION, 0x0000); ttl_setup_device() 135 iowrite16be(0x0000, &mod->regs->porta); ttl_setup_device() 136 iowrite16be(0x0000, &mod->regs->portb); ttl_setup_device() 137 iowrite16be(0x0000, &mod->regs->portc); ttl_setup_device() 140 ttl_write_reg(mod, MASTER_CONF_CTL, CONF_PAE | CONF_PBE | CONF_PCE); ttl_setup_device() 147 struct ttl_module *mod; ttl_probe() local 158 mod = devm_kzalloc(dev, sizeof(*mod), GFP_KERNEL); ttl_probe() 159 if (!mod) ttl_probe() 162 platform_set_drvdata(pdev, mod); ttl_probe() 163 spin_lock_init(&mod->lock); ttl_probe() 167 mod->regs = devm_ioremap_resource(dev, res); ttl_probe() 168 if (IS_ERR(mod->regs)) ttl_probe() 169 return PTR_ERR(mod->regs); ttl_probe() 171 ttl_setup_device(mod); ttl_probe() 174 gpio = &mod->gpio; ttl_probe() 196 struct ttl_module *mod = platform_get_drvdata(pdev); ttl_remove() local 198 gpiochip_remove(&mod->gpio); ttl_remove()
|
/linux-4.1.27/sound/soc/sh/rcar/ |
H A D | src.c | 24 struct rsnd_mod mod; member in struct:rsnd_src 38 container_of((_mod), struct rsnd_src, mod) 120 static struct dma_chan *rsnd_src_dma_req(struct rsnd_mod *mod) rsnd_src_dma_req() argument 122 struct rsnd_priv *priv = rsnd_mod_to_priv(mod); rsnd_src_dma_req() 123 struct rsnd_dai_stream *io = rsnd_mod_to_io(mod); rsnd_src_dma_req() 127 mod, rsnd_src_dma_req() 240 struct rsnd_mod *mod = &src->mod; rsnd_src_convert_rate() local 241 struct rsnd_dai_stream *io = rsnd_mod_to_io(mod); rsnd_src_convert_rate() 286 static int rsnd_src_set_convert_rate(struct rsnd_mod *mod) rsnd_src_set_convert_rate() argument 288 struct rsnd_dai_stream *io = rsnd_mod_to_io(mod); rsnd_src_set_convert_rate() 290 struct rsnd_src *src = rsnd_mod_to_src(mod); rsnd_src_set_convert_rate() 298 rsnd_mod_write(mod, SRC_SWRSR, 0); rsnd_src_set_convert_rate() 299 rsnd_mod_write(mod, SRC_SWRSR, 1); rsnd_src_set_convert_rate() 302 rsnd_mod_write(mod, SRC_ADINR, rsnd_get_adinr(mod)); rsnd_src_set_convert_rate() 306 rsnd_mod_write(mod, SRC_IFSCR, 1); rsnd_src_set_convert_rate() 309 rsnd_mod_write(mod, SRC_IFSVR, fsrate); rsnd_src_set_convert_rate() 313 rsnd_mod_write(mod, SRC_BUSIF_MODE, 1); rsnd_src_set_convert_rate() 318 static int rsnd_src_hw_params(struct rsnd_mod *mod, rsnd_src_hw_params() argument 322 struct rsnd_src *src = rsnd_mod_to_src(mod); rsnd_src_hw_params() 353 static int rsnd_src_init(struct rsnd_mod *mod, rsnd_src_init() argument 356 struct rsnd_src *src = rsnd_mod_to_src(mod); rsnd_src_init() 358 rsnd_mod_hw_start(mod); rsnd_src_init() 369 rsnd_mod_write(mod, SRC_SRCIR, 1); rsnd_src_init() 374 static int rsnd_src_quit(struct rsnd_mod *mod, rsnd_src_quit() argument 377 struct rsnd_src *src = rsnd_mod_to_src(mod); rsnd_src_quit() 380 rsnd_mod_hw_stop(mod); rsnd_src_quit() 384 rsnd_mod_name(mod), rsnd_mod_id(mod), src->err); rsnd_src_quit() 394 static int rsnd_src_start(struct rsnd_mod *mod) rsnd_src_start() argument 400 rsnd_mod_write(mod, SRC_SRCIR, 0); rsnd_src_start() 405 static int rsnd_src_stop(struct rsnd_mod *mod) rsnd_src_stop() argument 414 static int rsnd_src_set_route_gen1(struct rsnd_mod *mod) rsnd_src_set_route_gen1() argument 416 struct rsnd_dai_stream *io = rsnd_mod_to_io(mod); rsnd_src_set_route_gen1() 435 id = rsnd_mod_id(mod); rsnd_src_set_route_gen1() 446 rsnd_mod_bset(mod, SRC_ROUTE_SEL, mask, val); rsnd_src_set_route_gen1() 451 static int rsnd_src_set_convert_timing_gen1(struct rsnd_mod *mod) rsnd_src_set_convert_timing_gen1() argument 453 struct rsnd_dai_stream *io = rsnd_mod_to_io(mod); rsnd_src_set_convert_timing_gen1() 454 struct rsnd_priv *priv = rsnd_mod_to_priv(mod); rsnd_src_set_convert_timing_gen1() 455 struct rsnd_src *src = rsnd_mod_to_src(mod); rsnd_src_set_convert_timing_gen1() 461 int id = rsnd_mod_id(mod); rsnd_src_set_convert_timing_gen1() 480 ret = rsnd_adg_set_convert_clk_gen1(priv, mod, rsnd_src_set_convert_timing_gen1() 496 rsnd_mod_bset(mod, SRC_TMG_SEL0, mask, val); rsnd_src_set_convert_timing_gen1() 499 rsnd_mod_bset(mod, SRC_TMG_SEL1, mask, val); rsnd_src_set_convert_timing_gen1() 502 rsnd_mod_bset(mod, SRC_TMG_SEL2, mask, val); rsnd_src_set_convert_timing_gen1() 509 static int rsnd_src_set_convert_rate_gen1(struct rsnd_mod *mod) rsnd_src_set_convert_rate_gen1() argument 511 struct rsnd_src *src = rsnd_mod_to_src(mod); rsnd_src_set_convert_rate_gen1() 514 ret = rsnd_src_set_convert_rate(mod); rsnd_src_set_convert_rate_gen1() 519 rsnd_mod_write(mod, SRC_SRCCR, 0x00010110); rsnd_src_set_convert_rate_gen1() 522 rsnd_mod_write(mod, SRC_MNFSR, rsnd_src_set_convert_rate_gen1() 523 rsnd_mod_read(mod, SRC_IFSVR) / 100 * 98); rsnd_src_set_convert_rate_gen1() 527 rsnd_mod_write(mod, SRC_ROUTE_MODE0, 1); rsnd_src_set_convert_rate_gen1() 534 static int rsnd_src_init_gen1(struct rsnd_mod *mod, rsnd_src_init_gen1() argument 539 ret = rsnd_src_init(mod, priv); rsnd_src_init_gen1() 543 ret = rsnd_src_set_route_gen1(mod); rsnd_src_init_gen1() 547 ret = rsnd_src_set_convert_rate_gen1(mod); rsnd_src_init_gen1() 551 ret = rsnd_src_set_convert_timing_gen1(mod); rsnd_src_init_gen1() 558 static int rsnd_src_start_gen1(struct rsnd_mod *mod, rsnd_src_start_gen1() argument 561 int id = rsnd_mod_id(mod); rsnd_src_start_gen1() 563 rsnd_mod_bset(mod, SRC_ROUTE_CTRL, (1 << id), (1 << id)); rsnd_src_start_gen1() 565 return rsnd_src_start(mod); rsnd_src_start_gen1() 568 static int rsnd_src_stop_gen1(struct rsnd_mod *mod, rsnd_src_stop_gen1() argument 571 int id = rsnd_mod_id(mod); rsnd_src_stop_gen1() 573 rsnd_mod_bset(mod, SRC_ROUTE_CTRL, (1 << id), 0); rsnd_src_stop_gen1() 575 return rsnd_src_stop(mod); rsnd_src_stop_gen1() 591 #define rsnd_src_irq_enable_gen2(mod) rsnd_src_irq_ctrol_gen2(mod, 1) 592 #define rsnd_src_irq_disable_gen2(mod) rsnd_src_irq_ctrol_gen2(mod, 0) rsnd_src_irq_ctrol_gen2() 593 static void rsnd_src_irq_ctrol_gen2(struct rsnd_mod *mod, int enable) rsnd_src_irq_ctrol_gen2() argument 595 struct rsnd_src *src = rsnd_mod_to_src(mod); rsnd_src_irq_ctrol_gen2() 598 int id = rsnd_mod_id(mod); rsnd_src_irq_ctrol_gen2() 614 rsnd_mod_write(mod, SRC_INT_ENABLE0, int_val); rsnd_src_irq_ctrol_gen2() 615 rsnd_mod_bset(mod, SCU_SYS_INT_EN0, sys_int_mask, sys_int_val); rsnd_src_irq_ctrol_gen2() 616 rsnd_mod_bset(mod, SCU_SYS_INT_EN1, sys_int_mask, sys_int_val); rsnd_src_irq_ctrol_gen2() 619 static void rsnd_src_error_clear_gen2(struct rsnd_mod *mod) rsnd_src_error_clear_gen2() argument 621 u32 val = OUF_SRC(rsnd_mod_id(mod)); rsnd_src_error_clear_gen2() 623 rsnd_mod_bset(mod, SCU_SYS_STATUS0, val, val); rsnd_src_error_clear_gen2() 624 rsnd_mod_bset(mod, SCU_SYS_STATUS1, val, val); rsnd_src_error_clear_gen2() 627 static bool rsnd_src_error_record_gen2(struct rsnd_mod *mod) rsnd_src_error_record_gen2() argument 629 u32 val = OUF_SRC(rsnd_mod_id(mod)); rsnd_src_error_record_gen2() 632 if ((rsnd_mod_read(mod, SCU_SYS_STATUS0) & val) || rsnd_src_error_record_gen2() 633 (rsnd_mod_read(mod, SCU_SYS_STATUS1) & val)) { rsnd_src_error_record_gen2() 634 struct rsnd_src *src = rsnd_mod_to_src(mod); rsnd_src_error_record_gen2() 641 rsnd_src_error_clear_gen2(mod); rsnd_src_error_record_gen2() 646 static int _rsnd_src_start_gen2(struct rsnd_mod *mod) _rsnd_src_start_gen2() argument 648 struct rsnd_dai_stream *io = rsnd_mod_to_io(mod); _rsnd_src_start_gen2() 651 rsnd_mod_write(mod, SRC_CTRL, val); _rsnd_src_start_gen2() 653 rsnd_src_error_clear_gen2(mod); _rsnd_src_start_gen2() 655 rsnd_src_start(mod); _rsnd_src_start_gen2() 657 rsnd_src_irq_enable_gen2(mod); _rsnd_src_start_gen2() 662 static int _rsnd_src_stop_gen2(struct rsnd_mod *mod) _rsnd_src_stop_gen2() argument 664 rsnd_src_irq_disable_gen2(mod); _rsnd_src_stop_gen2() 666 rsnd_mod_write(mod, SRC_CTRL, 0); _rsnd_src_stop_gen2() 668 rsnd_src_error_record_gen2(mod); _rsnd_src_stop_gen2() 670 return rsnd_src_stop(mod); _rsnd_src_stop_gen2() 675 struct rsnd_mod *mod = data; rsnd_src_interrupt_gen2() local 676 struct rsnd_dai_stream *io = rsnd_mod_to_io(mod); rsnd_src_interrupt_gen2() 681 if (rsnd_src_error_record_gen2(mod)) { rsnd_src_interrupt_gen2() 682 struct rsnd_priv *priv = rsnd_mod_to_priv(mod); rsnd_src_interrupt_gen2() 683 struct rsnd_src *src = rsnd_mod_to_src(mod); rsnd_src_interrupt_gen2() 687 rsnd_mod_name(mod), rsnd_mod_id(mod)); rsnd_src_interrupt_gen2() 689 _rsnd_src_stop_gen2(mod); rsnd_src_interrupt_gen2() 691 _rsnd_src_start_gen2(mod); rsnd_src_interrupt_gen2() 699 static int rsnd_src_set_convert_rate_gen2(struct rsnd_mod *mod) rsnd_src_set_convert_rate_gen2() argument 701 struct rsnd_priv *priv = rsnd_mod_to_priv(mod); rsnd_src_set_convert_rate_gen2() 703 struct rsnd_dai_stream *io = rsnd_mod_to_io(mod); rsnd_src_set_convert_rate_gen2() 705 struct rsnd_src *src = rsnd_mod_to_src(mod); rsnd_src_set_convert_rate_gen2() 724 ret = rsnd_src_set_convert_rate(mod); rsnd_src_set_convert_rate_gen2() 740 rsnd_mod_write(mod, SRC_SRCCR, cr); rsnd_src_set_convert_rate_gen2() 741 rsnd_mod_write(mod, SRC_ROUTE_MODE0, route); rsnd_src_set_convert_rate_gen2() 743 switch (rsnd_mod_id(mod)) { rsnd_src_set_convert_rate_gen2() 748 rsnd_mod_write(mod, SRC_BSDSR, 0x02400000); rsnd_src_set_convert_rate_gen2() 751 rsnd_mod_write(mod, SRC_BSDSR, 0x01800000); rsnd_src_set_convert_rate_gen2() 755 rsnd_mod_write(mod, SRC_BSISR, 0x00100060); rsnd_src_set_convert_rate_gen2() 760 static int rsnd_src_set_convert_timing_gen2(struct rsnd_mod *mod) rsnd_src_set_convert_timing_gen2() argument 762 struct rsnd_dai_stream *io = rsnd_mod_to_io(mod); rsnd_src_set_convert_timing_gen2() 764 struct rsnd_src *src = rsnd_mod_to_src(mod); rsnd_src_set_convert_timing_gen2() 769 ret = rsnd_adg_set_convert_clk_gen2(mod, io, rsnd_src_set_convert_timing_gen2() 773 ret = rsnd_adg_set_convert_timing_gen2(mod, io); rsnd_src_set_convert_timing_gen2() 778 static int rsnd_src_probe_gen2(struct rsnd_mod *mod, rsnd_src_probe_gen2() argument 781 struct rsnd_src *src = rsnd_mod_to_src(mod); rsnd_src_probe_gen2() 795 dev_name(dev), mod); rsnd_src_probe_gen2() 801 rsnd_mod_to_dma(mod), rsnd_src_probe_gen2() 807 static int rsnd_src_remove_gen2(struct rsnd_mod *mod, rsnd_src_remove_gen2() argument 810 rsnd_dma_quit(rsnd_mod_to_dma(mod)); rsnd_src_remove_gen2() 815 static int rsnd_src_init_gen2(struct rsnd_mod *mod, rsnd_src_init_gen2() argument 820 ret = rsnd_src_init(mod, priv); rsnd_src_init_gen2() 824 ret = rsnd_src_set_convert_rate_gen2(mod); rsnd_src_init_gen2() 828 ret = rsnd_src_set_convert_timing_gen2(mod); rsnd_src_init_gen2() 835 static int rsnd_src_start_gen2(struct rsnd_mod *mod, rsnd_src_start_gen2() argument 838 rsnd_dma_start(rsnd_mod_to_dma(mod)); rsnd_src_start_gen2() 840 return _rsnd_src_start_gen2(mod); rsnd_src_start_gen2() 843 static int rsnd_src_stop_gen2(struct rsnd_mod *mod, rsnd_src_stop_gen2() argument 848 ret = _rsnd_src_stop_gen2(mod); rsnd_src_stop_gen2() 850 rsnd_dma_stop(rsnd_mod_to_dma(mod)); rsnd_src_stop_gen2() 855 static void rsnd_src_reconvert_update(struct rsnd_mod *mod) rsnd_src_reconvert_update() argument 857 struct rsnd_dai_stream *io = rsnd_mod_to_io(mod); rsnd_src_reconvert_update() 859 struct rsnd_src *src = rsnd_mod_to_src(mod); rsnd_src_reconvert_update() 872 rsnd_mod_write(mod, SRC_IFSVR, fsrate); rsnd_src_reconvert_update() 875 static int rsnd_src_pcm_new(struct rsnd_mod *mod, rsnd_src_pcm_new() argument 878 struct rsnd_priv *priv = rsnd_mod_to_priv(mod); rsnd_src_pcm_new() 879 struct rsnd_dai_stream *io = rsnd_mod_to_io(mod); rsnd_src_pcm_new() 881 struct rsnd_src *src = rsnd_mod_to_src(mod); rsnd_src_pcm_new() 910 ret = rsnd_kctrl_new_s(mod, rtd, rsnd_src_pcm_new() 919 ret = rsnd_kctrl_new_s(mod, rtd, rsnd_src_pcm_new() 947 return &((struct rsnd_src *)(priv->src) + id)->mod; rsnd_src_mod_get() 1044 ret = rsnd_mod_init(&src->mod, ops, clk, RSND_MOD_SRC, i); for_each_rsnd_src() 1059 rsnd_mod_quit(&src->mod); for_each_rsnd_src()
|
H A D | ssi.c | 65 struct rsnd_mod mod; member in struct:rsnd_ssi 80 #define rsnd_mod_to_ssi(_mod) container_of((_mod), struct rsnd_ssi, mod) 89 int rsnd_ssi_use_busif(struct rsnd_mod *mod) rsnd_ssi_use_busif() argument 91 struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod); rsnd_ssi_use_busif() 92 struct rsnd_dai_stream *io = rsnd_mod_to_io(mod); rsnd_ssi_use_busif() 95 if (!rsnd_ssi_is_dma_mode(mod)) rsnd_ssi_use_busif() 106 static void rsnd_ssi_status_check(struct rsnd_mod *mod, rsnd_ssi_status_check() argument 109 struct rsnd_priv *priv = rsnd_mod_to_priv(mod); rsnd_ssi_status_check() 115 status = rsnd_mod_read(mod, SSISR); rsnd_ssi_status_check() 155 ret = rsnd_adg_ssi_clk_try_start(&ssi->mod, main_rate); rsnd_ssi_master_clk_start() 161 rsnd_mod_name(&ssi->mod), rsnd_ssi_master_clk_start() 162 rsnd_mod_id(&ssi->mod), rate); rsnd_ssi_master_clk_start() 176 rsnd_adg_ssi_clk_stop(&ssi->mod); rsnd_ssi_master_clk_stop() 189 rsnd_mod_hw_start(&ssi->mod); rsnd_ssi_hw_start() 199 cr_mode = rsnd_ssi_is_dma_mode(&ssi->mod) ? rsnd_ssi_hw_start() 209 rsnd_mod_write(&ssi->mod, SSICR, cr); rsnd_ssi_hw_start() 213 rsnd_mod_write(&ssi->mod, SSIWSR, CONT); rsnd_ssi_hw_start() 216 rsnd_mod_write(&ssi->mod, SSISR, 0); rsnd_ssi_hw_start() 221 rsnd_mod_name(&ssi->mod), rsnd_mod_id(&ssi->mod)); rsnd_ssi_hw_start() 226 struct rsnd_priv *priv = rsnd_mod_to_priv(&ssi->mod); rsnd_ssi_hw_stop() 227 struct rsnd_dai_stream *io = rsnd_mod_to_io(&ssi->mod); rsnd_ssi_hw_stop() 245 rsnd_mod_write(&ssi->mod, SSICR, cr | EN); rsnd_ssi_hw_stop() 246 rsnd_ssi_status_check(&ssi->mod, DIRQ); rsnd_ssi_hw_stop() 252 rsnd_mod_write(&ssi->mod, SSICR, cr); /* disabled all */ rsnd_ssi_hw_stop() 253 rsnd_ssi_status_check(&ssi->mod, IIRQ); rsnd_ssi_hw_stop() 262 rsnd_mod_hw_stop(&ssi->mod); rsnd_ssi_hw_stop() 266 rsnd_mod_name(&ssi->mod), rsnd_mod_id(&ssi->mod)); rsnd_ssi_hw_stop() 270 * SSI mod common functions 272 static int rsnd_ssi_init(struct rsnd_mod *mod, rsnd_ssi_init() argument 275 struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod); rsnd_ssi_init() 276 struct rsnd_dai_stream *io = rsnd_mod_to_io(mod); rsnd_ssi_init() 323 static int rsnd_ssi_quit(struct rsnd_mod *mod, rsnd_ssi_quit() argument 326 struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod); rsnd_ssi_quit() 331 rsnd_mod_name(mod), rsnd_mod_id(mod), ssi->err); rsnd_ssi_quit() 346 rsnd_mod_write(&ssi->mod, SSISR, 0); rsnd_ssi_record_error() 350 static int rsnd_ssi_start(struct rsnd_mod *mod, rsnd_ssi_start() argument 353 struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod); rsnd_ssi_start() 354 struct rsnd_dai_stream *io = rsnd_mod_to_io(mod); rsnd_ssi_start() 356 rsnd_src_ssiu_start(mod, rsnd_ssi_use_busif(mod)); rsnd_ssi_start() 360 rsnd_src_ssi_irq_enable(mod); rsnd_ssi_start() 365 static int rsnd_ssi_stop(struct rsnd_mod *mod, rsnd_ssi_stop() argument 368 struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod); rsnd_ssi_stop() 370 rsnd_src_ssi_irq_disable(mod); rsnd_ssi_stop() 372 rsnd_ssi_record_error(ssi, rsnd_mod_read(mod, SSISR)); rsnd_ssi_stop() 376 rsnd_src_ssiu_stop(mod); rsnd_ssi_stop() 384 struct rsnd_mod *mod = &ssi->mod; rsnd_ssi_interrupt() local 385 struct rsnd_priv *priv = rsnd_mod_to_priv(mod); rsnd_ssi_interrupt() 386 struct rsnd_dai_stream *io = rsnd_mod_to_io(mod); rsnd_ssi_interrupt() 387 int is_dma = rsnd_ssi_is_dma_mode(mod); rsnd_ssi_interrupt() 388 u32 status = rsnd_mod_read(mod, SSISR); rsnd_ssi_interrupt() 405 rsnd_mod_write(mod, SSITDR, *buf); rsnd_ssi_interrupt() 407 *buf = rsnd_mod_read(mod, SSIRDR); rsnd_ssi_interrupt() 420 rsnd_mod_name(mod), rsnd_mod_id(mod)); rsnd_ssi_interrupt() 422 rsnd_ssi_stop(mod, priv); rsnd_ssi_interrupt() 424 rsnd_ssi_start(mod, priv); rsnd_ssi_interrupt() 437 static int rsnd_ssi_pio_probe(struct rsnd_mod *mod, rsnd_ssi_pio_probe() argument 441 struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod); rsnd_ssi_pio_probe() 461 static int rsnd_ssi_dma_probe(struct rsnd_mod *mod, rsnd_ssi_dma_probe() argument 464 struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod); rsnd_ssi_dma_probe() 477 priv, rsnd_mod_to_dma(mod), rsnd_ssi_dma_probe() 483 static int rsnd_ssi_dma_remove(struct rsnd_mod *mod, rsnd_ssi_dma_remove() argument 486 struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod); rsnd_ssi_dma_remove() 490 rsnd_dma_quit(rsnd_mod_to_dma(mod)); rsnd_ssi_dma_remove() 498 static int rsnd_ssi_fallback(struct rsnd_mod *mod, rsnd_ssi_fallback() argument 510 mod->ops = &rsnd_ssi_pio_ops; rsnd_ssi_fallback() 513 rsnd_mod_name(mod), rsnd_mod_id(mod)); rsnd_ssi_fallback() 518 static int rsnd_ssi_dma_start(struct rsnd_mod *mod, rsnd_ssi_dma_start() argument 521 struct rsnd_dma *dma = rsnd_mod_to_dma(mod); rsnd_ssi_dma_start() 525 rsnd_ssi_start(mod, priv); rsnd_ssi_dma_start() 530 static int rsnd_ssi_dma_stop(struct rsnd_mod *mod, rsnd_ssi_dma_stop() argument 533 struct rsnd_dma *dma = rsnd_mod_to_dma(mod); rsnd_ssi_dma_stop() 535 rsnd_ssi_stop(mod, priv); rsnd_ssi_dma_stop() 542 static struct dma_chan *rsnd_ssi_dma_req(struct rsnd_mod *mod) rsnd_ssi_dma_req() argument 544 struct rsnd_priv *priv = rsnd_mod_to_priv(mod); rsnd_ssi_dma_req() 545 struct rsnd_dai_stream *io = rsnd_mod_to_io(mod); rsnd_ssi_dma_req() 549 if (rsnd_ssi_use_busif(mod)) rsnd_ssi_dma_req() 555 mod, name); rsnd_ssi_dma_req() 570 int rsnd_ssi_is_dma_mode(struct rsnd_mod *mod) rsnd_ssi_is_dma_mode() argument 572 return mod->ops == &rsnd_ssi_dma_ops; rsnd_ssi_is_dma_mode() 584 * ssi mod function 591 return &((struct rsnd_ssi *)(priv->ssi) + id)->mod; rsnd_ssi_mod_get() 594 int rsnd_ssi_is_pin_sharing(struct rsnd_mod *mod) rsnd_ssi_is_pin_sharing() argument 596 struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod); rsnd_ssi_is_pin_sharing() 603 if (!rsnd_ssi_is_pin_sharing(&ssi->mod)) rsnd_ssi_parent_clk_setup() 606 switch (rsnd_mod_id(&ssi->mod)) { rsnd_ssi_parent_clk_setup() 731 ret = rsnd_mod_init(&ssi->mod, ops, clk, RSND_MOD_SSI, i); for_each_rsnd_ssi() 748 rsnd_mod_quit(&ssi->mod); for_each_rsnd_ssi()
|
H A D | adg.c | 37 struct rsnd_mod *mod = rsnd_io_to_mod_ssi(io); rsnd_adg_ssi_ws_timing_gen2() local 38 struct rsnd_priv *priv = rsnd_mod_to_priv(mod); rsnd_adg_ssi_ws_timing_gen2() 39 int id = rsnd_mod_id(mod); rsnd_adg_ssi_ws_timing_gen2() 60 int rsnd_adg_set_cmd_timsel_gen2(struct rsnd_mod *mod, rsnd_adg_set_cmd_timsel_gen2() argument 63 int id = rsnd_mod_id(mod); rsnd_adg_set_cmd_timsel_gen2() 72 rsnd_mod_bset(mod, CMDOUT_TIMSEL, mask, val); rsnd_adg_set_cmd_timsel_gen2() 77 static int rsnd_adg_set_src_timsel_gen2(struct rsnd_mod *mod, rsnd_adg_set_src_timsel_gen2() argument 82 int id = rsnd_mod_id(mod); rsnd_adg_set_src_timsel_gen2() 98 rsnd_mod_bset(mod, SRCIN_TIMSEL0, mask, in); rsnd_adg_set_src_timsel_gen2() 99 rsnd_mod_bset(mod, SRCOUT_TIMSEL0, mask, out); rsnd_adg_set_src_timsel_gen2() 102 rsnd_mod_bset(mod, SRCIN_TIMSEL1, mask, in); rsnd_adg_set_src_timsel_gen2() 103 rsnd_mod_bset(mod, SRCOUT_TIMSEL1, mask, out); rsnd_adg_set_src_timsel_gen2() 106 rsnd_mod_bset(mod, SRCIN_TIMSEL2, mask, in); rsnd_adg_set_src_timsel_gen2() 107 rsnd_mod_bset(mod, SRCOUT_TIMSEL2, mask, out); rsnd_adg_set_src_timsel_gen2() 110 rsnd_mod_bset(mod, SRCIN_TIMSEL3, mask, in); rsnd_adg_set_src_timsel_gen2() 111 rsnd_mod_bset(mod, SRCOUT_TIMSEL3, mask, out); rsnd_adg_set_src_timsel_gen2() 114 rsnd_mod_bset(mod, SRCIN_TIMSEL4, mask, in); rsnd_adg_set_src_timsel_gen2() 115 rsnd_mod_bset(mod, SRCOUT_TIMSEL4, mask, out); rsnd_adg_set_src_timsel_gen2() 122 int rsnd_adg_set_convert_clk_gen2(struct rsnd_mod *mod, rsnd_adg_set_convert_clk_gen2() argument 127 struct rsnd_priv *priv = rsnd_mod_to_priv(mod); rsnd_adg_set_convert_clk_gen2() 178 ret = rsnd_adg_set_src_timsel_gen2(mod, io, val); rsnd_adg_set_convert_clk_gen2() 184 rsnd_mod_bset(mod, DIV_EN, en, en); rsnd_adg_set_convert_clk_gen2() 191 int rsnd_adg_set_convert_timing_gen2(struct rsnd_mod *mod, rsnd_adg_set_convert_timing_gen2() argument 196 return rsnd_adg_set_src_timsel_gen2(mod, io, val); rsnd_adg_set_convert_timing_gen2() 200 struct rsnd_mod *mod, rsnd_adg_set_convert_clk_gen1() 208 int id = rsnd_mod_id(mod); rsnd_adg_set_convert_clk_gen1() 241 rsnd_mod_bset(mod, AUDIO_CLK_SEL3, mask, val); rsnd_adg_set_convert_clk_gen1() 244 rsnd_mod_bset(mod, AUDIO_CLK_SEL4, mask, val); rsnd_adg_set_convert_clk_gen1() 247 rsnd_mod_bset(mod, AUDIO_CLK_SEL5, mask, val); rsnd_adg_set_convert_clk_gen1() 260 static void rsnd_adg_set_ssi_clk(struct rsnd_mod *mod, u32 val) rsnd_adg_set_ssi_clk() argument 262 int id = rsnd_mod_id(mod); rsnd_adg_set_ssi_clk() 277 rsnd_mod_bset(mod, AUDIO_CLK_SEL0, mask, val); rsnd_adg_set_ssi_clk() 280 rsnd_mod_bset(mod, AUDIO_CLK_SEL1, mask, val); rsnd_adg_set_ssi_clk() 283 rsnd_mod_bset(mod, AUDIO_CLK_SEL2, mask, val); rsnd_adg_set_ssi_clk() 288 int rsnd_adg_ssi_clk_stop(struct rsnd_mod *mod) rsnd_adg_ssi_clk_stop() argument 291 * "mod" = "ssi" here. rsnd_adg_ssi_clk_stop() 292 * we can get "ssi id" from mod rsnd_adg_ssi_clk_stop() 294 rsnd_adg_set_ssi_clk(mod, 0); rsnd_adg_ssi_clk_stop() 299 int rsnd_adg_ssi_clk_try_start(struct rsnd_mod *mod, unsigned int rate) rsnd_adg_ssi_clk_try_start() argument 301 struct rsnd_priv *priv = rsnd_mod_to_priv(mod); rsnd_adg_ssi_clk_try_start() 346 rsnd_mod_bset(mod, SSICKR, 0x00FF0000, adg->ckr); 347 rsnd_mod_write(mod, BRRA, 0x00000002); /* 1/6 */ 348 rsnd_mod_write(mod, BRRB, 0x00000002); /* 1/6 */ 351 * This "mod" = "ssi" here. 352 * we can get "ssi id" from mod 354 rsnd_adg_set_ssi_clk(mod, data); 357 rsnd_mod_id(mod), i, rate); 199 rsnd_adg_set_convert_clk_gen1(struct rsnd_priv *priv, struct rsnd_mod *mod, unsigned int src_rate, unsigned int dst_rate) rsnd_adg_set_convert_clk_gen1() argument
|
H A D | core.c | 54 * | +- playback -> [mod] -> [mod] -> [mod] -> ... 57 * | +- capture -> [mod] -> [mod] -> [mod] -> ... 61 * | +- playback -> [mod] -> [mod] -> [mod] -> ... 64 * | +- capture -> [mod] -> [mod] -> [mod] -> ... 90 * [mod] => [mod] => [mod] => ... 93 * [mod]->fn() -> [mod]->fn() -> [mod]->fn()... 132 char *rsnd_mod_name(struct rsnd_mod *mod) rsnd_mod_name() argument 134 if (!mod || !mod->ops) rsnd_mod_name() 137 return mod->ops->name; rsnd_mod_name() 140 struct dma_chan *rsnd_mod_dma_req(struct rsnd_mod *mod) rsnd_mod_dma_req() argument 142 if (!mod || !mod->ops || !mod->ops->dma_req) rsnd_mod_dma_req() 145 return mod->ops->dma_req(mod); rsnd_mod_dma_req() 148 int rsnd_mod_init(struct rsnd_mod *mod, rsnd_mod_init() argument 159 mod->id = id; rsnd_mod_init() 160 mod->ops = ops; rsnd_mod_init() 161 mod->type = type; rsnd_mod_init() 162 mod->clk = clk; rsnd_mod_init() 167 void rsnd_mod_quit(struct rsnd_mod *mod) rsnd_mod_quit() argument 169 if (mod->clk) rsnd_mod_quit() 170 clk_unprepare(mod->clk); rsnd_mod_quit() 176 u32 rsnd_get_adinr(struct rsnd_mod *mod) rsnd_get_adinr() argument 178 struct rsnd_priv *priv = rsnd_mod_to_priv(mod); rsnd_get_adinr() 179 struct rsnd_dai_stream *io = rsnd_mod_to_io(mod); rsnd_get_adinr() 202 #define __rsnd_mod_call(mod, func, param...) \ 204 struct rsnd_priv *priv = rsnd_mod_to_priv(mod); \ 209 if ((mod->status & mask) == call) { \ 211 rsnd_mod_name(mod), rsnd_mod_id(mod), #func); \ 212 ret = (mod)->ops->func(mod, param); \ 213 mod->status = (mod->status & ~mask) | (~call & mask); \ 218 #define rsnd_mod_call(mod, func, param...) \ 219 (!(mod) ? -ENODEV : \ 220 !((mod)->ops->func) ? 0 : \ 221 __rsnd_mod_call(mod, func, param)) 225 struct rsnd_mod *mod; \ 228 mod = (io)->mod[i]; \ 229 if (!mod) \ 231 ret = rsnd_mod_call(mod, fn, param); \ 238 static int rsnd_dai_connect(struct rsnd_mod *mod, rsnd_dai_connect() argument 241 if (!mod) rsnd_dai_connect() 244 if (io->mod[mod->type]) { rsnd_dai_connect() 245 struct rsnd_priv *priv = rsnd_mod_to_priv(mod); rsnd_dai_connect() 249 rsnd_mod_name(mod), rsnd_dai_connect() 250 rsnd_mod_id(mod)); rsnd_dai_connect() 254 io->mod[mod->type] = mod; rsnd_dai_connect() 255 mod->io = io; rsnd_dai_connect() 260 static void rsnd_dai_disconnect(struct rsnd_mod *mod, rsnd_dai_disconnect() argument 263 mod->io = NULL; rsnd_dai_disconnect() 264 io->mod[mod->type] = NULL; rsnd_dai_disconnect() 468 struct rsnd_mod *mod; \ 475 mod = rsnd_##type##_mod_get(priv, id); \ 476 ret = rsnd_dai_connect(mod, io); \ 484 struct rsnd_mod *mod; \ 490 mod = rsnd_##type##_mod_get(priv, id); \ 491 rsnd_dai_disconnect(mod, io); \ 810 struct rsnd_mod *mod = snd_kcontrol_chip(kctrl); rsnd_kctrl_put() local 825 cfg->update(mod); rsnd_kctrl_put() 830 static int __rsnd_kctrl_new(struct rsnd_mod *mod, __rsnd_kctrl_new() argument 834 void (*update)(struct rsnd_mod *mod)) __rsnd_kctrl_new() 848 kctrl = snd_ctl_new1(&knew, mod); __rsnd_kctrl_new() 870 int rsnd_kctrl_new_m(struct rsnd_mod *mod, rsnd_kctrl_new_m() argument 873 void (*update)(struct rsnd_mod *mod), rsnd_kctrl_new_m() 880 return __rsnd_kctrl_new(mod, rtd, name, &_cfg->cfg, update); rsnd_kctrl_new_m() 883 int rsnd_kctrl_new_s(struct rsnd_mod *mod, rsnd_kctrl_new_s() argument 886 void (*update)(struct rsnd_mod *mod), rsnd_kctrl_new_s() 893 return __rsnd_kctrl_new(mod, rtd, name, &_cfg->cfg, update); rsnd_kctrl_new_s() 896 int rsnd_kctrl_new_e(struct rsnd_mod *mod, rsnd_kctrl_new_e() argument 900 void (*update)(struct rsnd_mod *mod), rsnd_kctrl_new_e() 908 return __rsnd_kctrl_new(mod, rtd, name, &_cfg->cfg, update); rsnd_kctrl_new_e()
|
H A D | dvc.c | 19 struct rsnd_mod mod; member in struct:rsnd_dvc 31 container_of((_mod), struct rsnd_dvc, mod) 66 static void rsnd_dvc_volume_update(struct rsnd_mod *mod) rsnd_dvc_volume_update() argument 68 struct rsnd_dvc *dvc = rsnd_mod_to_dvc(mod); rsnd_dvc_volume_update() 78 rsnd_mod_write(mod, DVC_DVUER, 0); rsnd_dvc_volume_update() 88 rsnd_mod_write(mod, DVC_VRCTR, 0xff); rsnd_dvc_volume_update() 89 rsnd_mod_write(mod, DVC_VRPDR, dvc->rup.val << 8 | rsnd_dvc_volume_update() 97 rsnd_mod_write(mod, DVC_VRDBR, rsnd_dvc_volume_update() 107 rsnd_mod_write(mod, DVC_VOL0R, val[0]); rsnd_dvc_volume_update() 108 rsnd_mod_write(mod, DVC_VOL1R, val[1]); rsnd_dvc_volume_update() 113 rsnd_mod_write(mod, DVC_ZCMCR, mute); rsnd_dvc_volume_update() 116 rsnd_mod_write(mod, DVC_DVUCR, dvucr); rsnd_dvc_volume_update() 119 rsnd_mod_write(mod, DVC_DVUER, 1); rsnd_dvc_volume_update() 122 static int rsnd_dvc_remove_gen2(struct rsnd_mod *mod, rsnd_dvc_remove_gen2() argument 125 struct rsnd_dvc *dvc = rsnd_mod_to_dvc(mod); rsnd_dvc_remove_gen2() 183 static int rsnd_dvc_quit(struct rsnd_mod *mod, rsnd_dvc_quit() argument 186 rsnd_mod_hw_stop(mod); rsnd_dvc_quit() 191 static int rsnd_dvc_start(struct rsnd_mod *mod, rsnd_dvc_start() argument 194 rsnd_mod_write(mod, CMD_CTRL, 0x10); rsnd_dvc_start() 199 static int rsnd_dvc_stop(struct rsnd_mod *mod, rsnd_dvc_stop() argument 202 rsnd_mod_write(mod, CMD_CTRL, 0); rsnd_dvc_stop() 207 static int rsnd_dvc_pcm_new(struct rsnd_mod *mod, rsnd_dvc_pcm_new() argument 210 struct rsnd_dai_stream *io = rsnd_mod_to_io(mod); rsnd_dvc_pcm_new() 211 struct rsnd_dvc *dvc = rsnd_mod_to_dvc(mod); rsnd_dvc_pcm_new() 216 ret = rsnd_kctrl_new_m(mod, rtd, rsnd_dvc_pcm_new() 225 ret = rsnd_kctrl_new_m(mod, rtd, rsnd_dvc_pcm_new() 234 ret = rsnd_kctrl_new_s(mod, rtd, rsnd_dvc_pcm_new() 242 ret = rsnd_kctrl_new_e(mod, rtd, rsnd_dvc_pcm_new() 251 ret = rsnd_kctrl_new_e(mod, rtd, rsnd_dvc_pcm_new() 264 static struct dma_chan *rsnd_dvc_dma_req(struct rsnd_mod *mod) rsnd_dvc_dma_req() argument 266 struct rsnd_priv *priv = rsnd_mod_to_priv(mod); rsnd_dvc_dma_req() 269 mod, "tx"); rsnd_dvc_dma_req() 288 return &((struct rsnd_dvc *)(priv->dvc) + id)->mod; rsnd_dvc_mod_get() 369 ret = rsnd_mod_init(&dvc->mod, &rsnd_dvc_ops, for_each_rsnd_dvc() 385 rsnd_mod_quit(&dvc->mod); for_each_rsnd_dvc()
|
H A D | rsnd.h | 163 u32 rsnd_read(struct rsnd_priv *priv, struct rsnd_mod *mod, enum rsnd_reg reg); 164 void rsnd_write(struct rsnd_priv *priv, struct rsnd_mod *mod, 166 void rsnd_bset(struct rsnd_priv *priv, struct rsnd_mod *mod, enum rsnd_reg reg, 168 u32 rsnd_get_adinr(struct rsnd_mod *mod); 211 struct rsnd_mod *mod, char *name); 216 * R-Car sound mod 227 struct dma_chan* (*dma_req)(struct rsnd_mod *mod); 228 int (*probe)(struct rsnd_mod *mod, 230 int (*remove)(struct rsnd_mod *mod, 232 int (*init)(struct rsnd_mod *mod, 234 int (*quit)(struct rsnd_mod *mod, 236 int (*start)(struct rsnd_mod *mod, 238 int (*stop)(struct rsnd_mod *mod, 240 int (*pcm_new)(struct rsnd_mod *mod, 242 int (*hw_params)(struct rsnd_mod *mod, 245 int (*fallback)(struct rsnd_mod *mod, 292 #define rsnd_mod_to_priv(mod) (rsnd_io_to_priv(rsnd_mod_to_io(mod))) 293 #define rsnd_mod_to_dma(mod) (&(mod)->dma) 294 #define rsnd_mod_to_io(mod) ((mod)->io) 295 #define rsnd_mod_id(mod) ((mod)->id) 296 #define rsnd_mod_hw_start(mod) clk_enable((mod)->clk) 297 #define rsnd_mod_hw_stop(mod) clk_disable((mod)->clk) 299 int rsnd_mod_init(struct rsnd_mod *mod, 304 void rsnd_mod_quit(struct rsnd_mod *mod); 305 char *rsnd_mod_name(struct rsnd_mod *mod); 306 struct dma_chan *rsnd_mod_dma_req(struct rsnd_mod *mod); 315 struct rsnd_mod *mod[RSND_MOD_MAX]; member in struct:rsnd_dai_stream 323 #define rsnd_io_to_mod_ssi(io) ((io)->mod[RSND_MOD_SSI]) 324 #define rsnd_io_to_mod_src(io) ((io)->mod[RSND_MOD_SRC]) 325 #define rsnd_io_to_mod_dvc(io) ((io)->mod[RSND_MOD_DVC]) 367 struct rsnd_mod *mod, 377 int rsnd_adg_ssi_clk_stop(struct rsnd_mod *mod); 378 int rsnd_adg_ssi_clk_try_start(struct rsnd_mod *mod, unsigned int rate); 383 struct rsnd_mod *mod, 386 int rsnd_adg_set_convert_clk_gen2(struct rsnd_mod *mod, 390 int rsnd_adg_set_convert_timing_gen2(struct rsnd_mod *mod, 392 int rsnd_adg_set_cmd_timsel_gen2(struct rsnd_mod *mod, 463 void (*update)(struct rsnd_mod *mod); 482 int rsnd_kctrl_new_m(struct rsnd_mod *mod, 485 void (*update)(struct rsnd_mod *mod), 488 int rsnd_kctrl_new_s(struct rsnd_mod *mod, 491 void (*update)(struct rsnd_mod *mod), 494 int rsnd_kctrl_new_e(struct rsnd_mod *mod, 498 void (*update)(struct rsnd_mod *mod), 531 int rsnd_ssi_is_pin_sharing(struct rsnd_mod *mod); 532 int rsnd_ssi_is_dma_mode(struct rsnd_mod *mod); 533 int rsnd_ssi_use_busif(struct rsnd_mod *mod);
|
H A D | dma.c | 38 struct rsnd_mod *mod = rsnd_dma_to_mod(dma); rsnd_dmaen_complete() local 39 struct rsnd_dai_stream *io = rsnd_mod_to_io(mod); rsnd_dmaen_complete() 66 struct rsnd_mod *mod = rsnd_dma_to_mod(dma); rsnd_dmaen_start() local 67 struct rsnd_priv *priv = rsnd_mod_to_priv(mod); rsnd_dmaen_start() 68 struct rsnd_dai_stream *io = rsnd_mod_to_io(mod); rsnd_dmaen_start() 98 struct rsnd_mod *mod, char *name) rsnd_dma_request_channel() 105 if (i == rsnd_mod_id(mod)) for_each_child_of_node() 137 struct rsnd_mod *mod = rsnd_dma_to_mod(dma); rsnd_dmaen_init() local 138 struct rsnd_dai_stream *io = rsnd_mod_to_io(mod); rsnd_dmaen_init() 241 static u32 rsnd_dmapp_get_id(struct rsnd_mod *mod) rsnd_dmapp_get_id() argument 243 struct rsnd_dai_stream *io = rsnd_mod_to_io(mod); rsnd_dmapp_get_id() 248 int id = rsnd_mod_id(mod); rsnd_dmapp_get_id() 251 if (mod == ssi) { rsnd_dmapp_get_id() 254 } else if (mod == src) { rsnd_dmapp_get_id() 257 } else if (mod == dvc) { rsnd_dmapp_get_id() 283 struct rsnd_mod *mod = rsnd_dma_to_mod(dma); rsnd_dmapp_write() local 284 struct rsnd_priv *priv = rsnd_mod_to_priv(mod); rsnd_dmapp_write() 295 struct rsnd_mod *mod = rsnd_dma_to_mod(dma); rsnd_dmapp_read() local 296 struct rsnd_priv *priv = rsnd_mod_to_priv(mod); rsnd_dmapp_read() 364 * mod / DMAC in / DMAC out / DMAC PP in / DMAC pp out 390 struct rsnd_mod *mod, rsnd_gen2_dma_addr() 394 struct rsnd_dai_stream *io = rsnd_mod_to_io(mod); rsnd_gen2_dma_addr() 397 int is_ssi = !!(rsnd_io_to_mod_ssi(io) == mod); rsnd_gen2_dma_addr() 400 int id = rsnd_mod_id(mod); rsnd_gen2_dma_addr() 441 if (is_ssi && rsnd_ssi_use_busif(mod)) rsnd_gen2_dma_addr() 450 struct rsnd_mod *mod, rsnd_dma_addr() 459 if (!mod) rsnd_dma_addr() 462 return rsnd_gen2_dma_addr(priv, mod, is_play, is_from); rsnd_dma_addr() 476 struct rsnd_mod *mod[MOD_MAX]; rsnd_dma_of_path() local 481 mod[i] = NULL; rsnd_dma_of_path() 492 mod[0] = NULL; /* for "mem" */ rsnd_dma_of_path() 496 mod[i] = ssi; rsnd_dma_of_path() 498 mod[i] = src; rsnd_dma_of_path() 504 mod[i] = (is_play) ? src : dvc; rsnd_dma_of_path() 506 mod[i] = (is_play) ? dvc : src; rsnd_dma_of_path() 511 if (mod[i] == this) rsnd_dma_of_path() 514 if (mod[i] == ssi) rsnd_dma_of_path() 519 *mod_from = mod[index - 1]; rsnd_dma_of_path() 520 *mod_to = mod[index]; rsnd_dma_of_path() 522 *mod_from = mod[index]; rsnd_dma_of_path() 523 *mod_to = mod[index - 1]; rsnd_dma_of_path() 539 struct rsnd_mod *mod = rsnd_dma_to_mod(dma); rsnd_dma_quit() local 540 struct rsnd_priv *priv = rsnd_mod_to_priv(mod); rsnd_dma_quit() 551 struct rsnd_mod *mod = rsnd_dma_to_mod(dma); rsnd_dma_init() local 554 struct rsnd_dai_stream *io = rsnd_mod_to_io(mod); rsnd_dma_init() 97 rsnd_dma_request_channel(struct device_node *of_node, struct rsnd_mod *mod, char *name) rsnd_dma_request_channel() argument 389 rsnd_gen2_dma_addr(struct rsnd_priv *priv, struct rsnd_mod *mod, int is_play, int is_from) rsnd_gen2_dma_addr() argument 449 rsnd_dma_addr(struct rsnd_priv *priv, struct rsnd_mod *mod, int is_play, int is_from) rsnd_dma_addr() argument
|
H A D | gen.c | 73 struct rsnd_mod *mod, enum rsnd_reg reg) rsnd_read() 83 rsnd_mod_name(mod), rsnd_mod_id(mod), reg, val); rsnd_read() 85 regmap_fields_read(gen->regs[reg], rsnd_mod_id(mod), &val); rsnd_read() 91 struct rsnd_mod *mod, rsnd_write() 101 rsnd_mod_name(mod), rsnd_mod_id(mod), reg, data); rsnd_write() 103 regmap_fields_write(gen->regs[reg], rsnd_mod_id(mod), data); rsnd_write() 106 void rsnd_bset(struct rsnd_priv *priv, struct rsnd_mod *mod, rsnd_bset() argument 116 rsnd_mod_name(mod), rsnd_mod_id(mod), reg, data, mask); rsnd_bset() 118 regmap_fields_update_bits(gen->regs[reg], rsnd_mod_id(mod), rsnd_bset() 72 rsnd_read(struct rsnd_priv *priv, struct rsnd_mod *mod, enum rsnd_reg reg) rsnd_read() argument 90 rsnd_write(struct rsnd_priv *priv, struct rsnd_mod *mod, enum rsnd_reg reg, u32 data) rsnd_write() argument
|
/linux-4.1.27/include/trace/events/ |
H A D | module.h | 32 TP_PROTO(struct module *mod), 34 TP_ARGS(mod), 38 __string( name, mod->name ) 42 __entry->taints = mod->taints; 43 __assign_str(name, mod->name); 51 TP_PROTO(struct module *mod), 53 TP_ARGS(mod), 56 __string( name, mod->name ) 60 __assign_str(name, mod->name); 71 TP_PROTO(struct module *mod, unsigned long ip), 73 TP_ARGS(mod, ip), 78 __string( name, mod->name ) 83 __entry->refcnt = atomic_read(&mod->refcnt); 84 __assign_str(name, mod->name); 93 TP_PROTO(struct module *mod, unsigned long ip), 95 TP_ARGS(mod, ip) 100 TP_PROTO(struct module *mod, unsigned long ip), 102 TP_ARGS(mod, ip)
|
/linux-4.1.27/drivers/net/can/ |
H A D | janz-ican3.c | 266 static inline void ican3_set_page(struct ican3_dev *mod, unsigned int page) ican3_set_page() argument 269 iowrite8(page, &mod->dpmctrl->window_address); ican3_set_page() 279 * LOCKING: must hold mod->lock 283 static int ican3_old_recv_msg(struct ican3_dev *mod, struct ican3_msg *msg) ican3_old_recv_msg() argument 289 ican3_set_page(mod, QUEUE_OLD_CONTROL); ican3_old_recv_msg() 290 peer = ioread8(mod->dpm + MSYNC_PEER); ican3_old_recv_msg() 291 locl = ioread8(mod->dpm + MSYNC_LOCL); ican3_old_recv_msg() 295 netdev_dbg(mod->ndev, "no mbox for reading\n"); ican3_old_recv_msg() 307 ican3_set_page(mod, mbox_page); ican3_old_recv_msg() 308 memcpy_fromio(msg, mod->dpm, sizeof(*msg)); ican3_old_recv_msg() 316 ican3_set_page(mod, QUEUE_OLD_CONTROL); ican3_old_recv_msg() 317 iowrite8(locl, mod->dpm + MSYNC_LOCL); ican3_old_recv_msg() 324 * LOCKING: must hold mod->lock 328 static int ican3_old_send_msg(struct ican3_dev *mod, struct ican3_msg *msg) ican3_old_send_msg() argument 334 ican3_set_page(mod, QUEUE_OLD_CONTROL); ican3_old_send_msg() 335 peer = ioread8(mod->dpm + MSYNC_PEER); ican3_old_send_msg() 336 locl = ioread8(mod->dpm + MSYNC_LOCL); ican3_old_send_msg() 340 netdev_err(mod->ndev, "no mbox for writing\n"); ican3_old_send_msg() 349 ican3_set_page(mod, mbox_page); ican3_old_send_msg() 350 memcpy_toio(mod->dpm, msg, sizeof(*msg)); ican3_old_send_msg() 356 ican3_set_page(mod, QUEUE_OLD_CONTROL); ican3_old_send_msg() 357 iowrite8(locl, mod->dpm + MSYNC_LOCL); ican3_old_send_msg() 365 static void ican3_init_new_host_interface(struct ican3_dev *mod) ican3_init_new_host_interface() argument 372 spin_lock_irqsave(&mod->lock, flags); ican3_init_new_host_interface() 375 mod->rx_num = 0; ican3_init_new_host_interface() 376 mod->rx_int = 0; ican3_init_new_host_interface() 379 ican3_set_page(mod, QUEUE_TOHOST); ican3_init_new_host_interface() 380 dst = mod->dpm; ican3_init_new_host_interface() 385 desc.pointer = mod->free_page; ican3_init_new_host_interface() 393 mod->free_page++; ican3_init_new_host_interface() 397 ican3_set_page(mod, QUEUE_FROMHOST_MID); ican3_init_new_host_interface() 398 dst = mod->dpm; ican3_init_new_host_interface() 401 mod->tx_num = 0; ican3_init_new_host_interface() 406 desc.pointer = mod->free_page; ican3_init_new_host_interface() 414 mod->free_page++; ican3_init_new_host_interface() 418 ican3_set_page(mod, QUEUE_FROMHOST_HIGH); ican3_init_new_host_interface() 419 dst = mod->dpm; ican3_init_new_host_interface() 423 desc.pointer = mod->free_page; ican3_init_new_host_interface() 425 mod->free_page++; ican3_init_new_host_interface() 428 ican3_set_page(mod, QUEUE_FROMHOST_LOW); ican3_init_new_host_interface() 429 dst = mod->dpm; ican3_init_new_host_interface() 433 desc.pointer = mod->free_page; ican3_init_new_host_interface() 435 mod->free_page++; ican3_init_new_host_interface() 437 spin_unlock_irqrestore(&mod->lock, flags); ican3_init_new_host_interface() 444 static void ican3_init_fast_host_interface(struct ican3_dev *mod) ican3_init_fast_host_interface() argument 452 spin_lock_irqsave(&mod->lock, flags); ican3_init_fast_host_interface() 455 mod->fastrx_start = mod->free_page; ican3_init_fast_host_interface() 456 mod->fastrx_num = 0; ican3_init_fast_host_interface() 472 ican3_set_page(mod, mod->free_page); ican3_init_fast_host_interface() 475 dst = mod->dpm + addr; ican3_init_fast_host_interface() 482 mod->free_page++; ican3_init_fast_host_interface() 488 mod->free_page++; ican3_init_fast_host_interface() 491 mod->fasttx_start = mod->free_page; ican3_init_fast_host_interface() 492 mod->fasttx_num = 0; ican3_init_fast_host_interface() 508 ican3_set_page(mod, mod->free_page); ican3_init_fast_host_interface() 511 dst = mod->dpm + addr; ican3_init_fast_host_interface() 518 mod->free_page++; ican3_init_fast_host_interface() 522 spin_unlock_irqrestore(&mod->lock, flags); ican3_init_fast_host_interface() 530 * LOCKING: must hold mod->lock 532 static int ican3_new_send_msg(struct ican3_dev *mod, struct ican3_msg *msg) ican3_new_send_msg() argument 535 void __iomem *desc_addr = mod->dpm + (mod->tx_num * sizeof(desc)); ican3_new_send_msg() 538 ican3_set_page(mod, QUEUE_FROMHOST_MID); ican3_new_send_msg() 542 netdev_dbg(mod->ndev, "%s: no free buffers\n", __func__); ican3_new_send_msg() 547 ican3_set_page(mod, desc.pointer); ican3_new_send_msg() 548 memcpy_toio(mod->dpm, msg, sizeof(*msg)); ican3_new_send_msg() 551 ican3_set_page(mod, QUEUE_FROMHOST_MID); ican3_new_send_msg() 556 mod->tx_num = (desc.control & DESC_WRAP) ? 0 : (mod->tx_num + 1); ican3_new_send_msg() 561 * LOCKING: must hold mod->lock 563 static int ican3_new_recv_msg(struct ican3_dev *mod, struct ican3_msg *msg) ican3_new_recv_msg() argument 566 void __iomem *desc_addr = mod->dpm + (mod->rx_num * sizeof(desc)); ican3_new_recv_msg() 569 ican3_set_page(mod, QUEUE_TOHOST); ican3_new_recv_msg() 573 netdev_dbg(mod->ndev, "%s: no buffers to recv\n", __func__); ican3_new_recv_msg() 578 ican3_set_page(mod, desc.pointer); ican3_new_recv_msg() 579 memcpy_fromio(msg, mod->dpm, sizeof(*msg)); ican3_new_recv_msg() 582 ican3_set_page(mod, QUEUE_TOHOST); ican3_new_recv_msg() 587 mod->rx_num = (desc.control & DESC_WRAP) ? 0 : (mod->rx_num + 1); ican3_new_recv_msg() 595 static int ican3_send_msg(struct ican3_dev *mod, struct ican3_msg *msg) ican3_send_msg() argument 600 spin_lock_irqsave(&mod->lock, flags); ican3_send_msg() 602 if (mod->iftype == 0) ican3_send_msg() 603 ret = ican3_old_send_msg(mod, msg); ican3_send_msg() 605 ret = ican3_new_send_msg(mod, msg); ican3_send_msg() 607 spin_unlock_irqrestore(&mod->lock, flags); ican3_send_msg() 611 static int ican3_recv_msg(struct ican3_dev *mod, struct ican3_msg *msg) ican3_recv_msg() argument 616 spin_lock_irqsave(&mod->lock, flags); ican3_recv_msg() 618 if (mod->iftype == 0) ican3_recv_msg() 619 ret = ican3_old_recv_msg(mod, msg); ican3_recv_msg() 621 ret = ican3_new_recv_msg(mod, msg); ican3_recv_msg() 623 spin_unlock_irqrestore(&mod->lock, flags); ican3_recv_msg() 631 static int ican3_msg_connect(struct ican3_dev *mod) ican3_msg_connect() argument 639 return ican3_send_msg(mod, &msg); ican3_msg_connect() 642 static int ican3_msg_disconnect(struct ican3_dev *mod) ican3_msg_disconnect() argument 650 return ican3_send_msg(mod, &msg); ican3_msg_disconnect() 653 static int ican3_msg_newhostif(struct ican3_dev *mod) ican3_msg_newhostif() argument 663 WARN_ON(mod->iftype != 0); ican3_msg_newhostif() 665 ret = ican3_send_msg(mod, &msg); ican3_msg_newhostif() 670 mod->iftype = 1; ican3_msg_newhostif() 674 static int ican3_msg_fasthostif(struct ican3_dev *mod) ican3_msg_fasthostif() argument 684 addr = DPM_PAGE_ADDR(mod->fastrx_start); ican3_msg_fasthostif() 691 addr = DPM_PAGE_ADDR(mod->fasttx_start); ican3_msg_fasthostif() 698 WARN_ON(mod->iftype != 1); ican3_msg_fasthostif() 700 return ican3_send_msg(mod, &msg); ican3_msg_fasthostif() 707 static int ican3_set_id_filter(struct ican3_dev *mod, bool accept) ican3_set_id_filter() argument 724 ret = ican3_send_msg(mod, &msg); ican3_set_id_filter() 745 return ican3_send_msg(mod, &msg); ican3_set_id_filter() 751 static int ican3_set_bus_state(struct ican3_dev *mod, bool on) ican3_set_bus_state() argument 759 return ican3_send_msg(mod, &msg); ican3_set_bus_state() 762 static int ican3_set_termination(struct ican3_dev *mod, bool on) ican3_set_termination() argument 772 return ican3_send_msg(mod, &msg); ican3_set_termination() 775 static int ican3_send_inquiry(struct ican3_dev *mod, u8 subspec) ican3_send_inquiry() argument 785 return ican3_send_msg(mod, &msg); ican3_send_inquiry() 788 static int ican3_set_buserror(struct ican3_dev *mod, u8 quota) ican3_set_buserror() argument 798 return ican3_send_msg(mod, &msg); ican3_set_buserror() 805 static void ican3_to_can_frame(struct ican3_dev *mod, ican3_to_can_frame() argument 837 static void can_frame_to_ican3(struct ican3_dev *mod, can_frame_to_ican3() argument 850 if (mod->can.ctrlmode & CAN_CTRLMODE_ONE_SHOT) can_frame_to_ican3() 881 static void ican3_handle_idvers(struct ican3_dev *mod, struct ican3_msg *msg) ican3_handle_idvers() argument 883 netdev_dbg(mod->ndev, "IDVERS response: %s\n", msg->data); ican3_handle_idvers() 886 static void ican3_handle_msglost(struct ican3_dev *mod, struct ican3_msg *msg) ican3_handle_msglost() argument 888 struct net_device *dev = mod->ndev; ican3_handle_msglost() 899 netdev_err(mod->ndev, "lost %d control messages\n", msg->data[0]); ican3_handle_msglost() 928 static int ican3_handle_cevtind(struct ican3_dev *mod, struct ican3_msg *msg) ican3_handle_cevtind() argument 930 struct net_device *dev = mod->ndev; ican3_handle_cevtind() 932 enum can_state state = mod->can.state; ican3_handle_cevtind() 939 netdev_err(mod->ndev, "unable to handle errors on non-SJA1000\n"); ican3_handle_cevtind() 945 netdev_err(mod->ndev, "error message too short\n"); ican3_handle_cevtind() 967 netdev_dbg(mod->ndev, "bus error interrupt\n"); ican3_handle_cevtind() 971 kfree_skb(skb_dequeue(&mod->echoq)); ican3_handle_cevtind() 981 ret = ican3_set_buserror(mod, 1); ican3_handle_cevtind() 983 netdev_err(mod->ndev, "unable to re-enable bus-error\n"); ican3_handle_cevtind() 988 if (!(mod->can.ctrlmode & CAN_CTRLMODE_BERR_REPORTING)) ican3_handle_cevtind() 998 netdev_dbg(mod->ndev, "data overrun interrupt\n"); ican3_handle_cevtind() 1007 netdev_dbg(mod->ndev, "error warning + passive interrupt\n"); ican3_handle_cevtind() 1011 mod->can.can_stats.bus_off++; ican3_handle_cevtind() 1025 mod->can.can_stats.bus_error++; ican3_handle_cevtind() 1051 if (state != mod->can.state && (state == CAN_STATE_ERROR_WARNING || ican3_handle_cevtind() 1055 mod->can.can_stats.error_warning++; ican3_handle_cevtind() 1060 mod->can.can_stats.error_passive++; ican3_handle_cevtind() 1070 mod->can.state = state; ican3_handle_cevtind() 1075 static void ican3_handle_inquiry(struct ican3_dev *mod, struct ican3_msg *msg) ican3_handle_inquiry() argument 1080 mod->bec.rxerr = msg->data[5]; ican3_handle_inquiry() 1081 mod->bec.txerr = msg->data[6]; ican3_handle_inquiry() 1082 complete(&mod->buserror_comp); ican3_handle_inquiry() 1085 mod->termination_enabled = msg->data[6] & HWCONF_TERMINATE_ON; ican3_handle_inquiry() 1086 complete(&mod->termination_comp); ican3_handle_inquiry() 1089 netdev_err(mod->ndev, "received an unknown inquiry response\n"); ican3_handle_inquiry() 1094 static void ican3_handle_unknown_message(struct ican3_dev *mod, ican3_handle_unknown_message() argument 1097 netdev_warn(mod->ndev, "received unknown message: spec 0x%.2x length %d\n", ican3_handle_unknown_message() 1104 static void ican3_handle_message(struct ican3_dev *mod, struct ican3_msg *msg) ican3_handle_message() argument 1106 netdev_dbg(mod->ndev, "%s: modno %d spec 0x%.2x len %d bytes\n", __func__, ican3_handle_message() 1107 mod->num, msg->spec, le16_to_cpu(msg->len)); ican3_handle_message() 1111 ican3_handle_idvers(mod, msg); ican3_handle_message() 1115 ican3_handle_msglost(mod, msg); ican3_handle_message() 1118 ican3_handle_cevtind(mod, msg); ican3_handle_message() 1121 ican3_handle_inquiry(mod, msg); ican3_handle_message() 1124 ican3_handle_unknown_message(mod, msg); ican3_handle_message() 1133 static void ican3_put_echo_skb(struct ican3_dev *mod, struct sk_buff *skb) ican3_put_echo_skb() argument 1140 skb_queue_tail(&mod->echoq, skb); ican3_put_echo_skb() 1143 static unsigned int ican3_get_echo_skb(struct ican3_dev *mod) ican3_get_echo_skb() argument 1145 struct sk_buff *skb = skb_dequeue(&mod->echoq); ican3_get_echo_skb() 1151 netdev_err(mod->ndev, "BUG: echo skb not occupied\n"); ican3_get_echo_skb() 1167 skb->dev = mod->ndev; ican3_get_echo_skb() 1181 static bool ican3_echo_skb_matches(struct ican3_dev *mod, struct sk_buff *skb) ican3_echo_skb_matches() argument 1184 struct sk_buff *echo_skb = skb_peek(&mod->echoq); ican3_echo_skb_matches() 1203 * LOCKING: must hold mod->lock 1205 static bool ican3_txok(struct ican3_dev *mod) ican3_txok() argument 1211 if (skb_queue_len(&mod->echoq) >= ICAN3_TX_BUFFERS) ican3_txok() 1215 ican3_set_page(mod, mod->fasttx_start + (mod->fasttx_num / 16)); ican3_txok() 1216 desc = mod->dpm + ((mod->fasttx_num % 16) * sizeof(*desc)); ican3_txok() 1231 static int ican3_recv_skb(struct ican3_dev *mod) ican3_recv_skb() argument 1233 struct net_device *ndev = mod->ndev; ican3_recv_skb() 1241 spin_lock_irqsave(&mod->lock, flags); ican3_recv_skb() 1244 ican3_set_page(mod, mod->fastrx_start + (mod->fastrx_num / 16)); ican3_recv_skb() 1245 desc_addr = mod->dpm + ((mod->fastrx_num % 16) * sizeof(desc)); ican3_recv_skb() 1248 spin_unlock_irqrestore(&mod->lock, flags); ican3_recv_skb() 1262 ican3_to_can_frame(mod, &desc, cf); ican3_recv_skb() 1274 if (ican3_echo_skb_matches(mod, skb)) { ican3_recv_skb() 1276 stats->tx_bytes += ican3_get_echo_skb(mod); ican3_recv_skb() 1290 spin_lock_irqsave(&mod->lock, flags); ican3_recv_skb() 1292 ican3_set_page(mod, mod->fastrx_start + (mod->fastrx_num / 16)); ican3_recv_skb() 1296 mod->fastrx_num = (desc.control & DESC_WRAP) ? 0 ican3_recv_skb() 1297 : (mod->fastrx_num + 1); ican3_recv_skb() 1300 spin_unlock_irqrestore(&mod->lock, flags); ican3_recv_skb() 1306 struct ican3_dev *mod = container_of(napi, struct ican3_dev, napi); ican3_napi() local 1314 ret = ican3_recv_msg(mod, &msg); ican3_napi() 1318 ican3_handle_message(mod, &msg); ican3_napi() 1323 ret = ican3_recv_skb(mod); ican3_napi() 1335 spin_lock_irqsave(&mod->lock, flags); ican3_napi() 1338 if (netif_queue_stopped(mod->ndev) && ican3_txok(mod)) ican3_napi() 1339 netif_wake_queue(mod->ndev); ican3_napi() 1341 spin_unlock_irqrestore(&mod->lock, flags); ican3_napi() 1344 iowrite8(1 << mod->num, &mod->ctrl->int_enable); ican3_napi() 1350 struct ican3_dev *mod = dev_id; ican3_irq() local 1357 stat = ioread8(&mod->ctrl->int_disable) & (1 << mod->num); ican3_irq() 1358 if (stat == (1 << mod->num)) ican3_irq() 1362 ioread8(&mod->dpmctrl->interrupt); ican3_irq() 1365 iowrite8(1 << mod->num, &mod->ctrl->int_disable); ican3_irq() 1366 napi_schedule(&mod->napi); ican3_irq() 1379 static int ican3_reset_module(struct ican3_dev *mod) ican3_reset_module() argument 1385 iowrite8(1 << mod->num, &mod->ctrl->int_disable); ican3_reset_module() 1388 mod->free_page = DPM_FREE_START; ican3_reset_module() 1390 ican3_set_page(mod, QUEUE_OLD_CONTROL); ican3_reset_module() 1391 runold = ioread8(mod->dpm + TARGET_RUNNING); ican3_reset_module() 1394 iowrite8(0x00, &mod->dpmctrl->hwreset); ican3_reset_module() 1399 ican3_set_page(mod, QUEUE_OLD_CONTROL); ican3_reset_module() 1400 runnew = ioread8(mod->dpm + TARGET_RUNNING); ican3_reset_module() 1407 netdev_err(mod->ndev, "failed to reset CAN module\n"); ican3_reset_module() 1411 static void ican3_shutdown_module(struct ican3_dev *mod) ican3_shutdown_module() argument 1413 ican3_msg_disconnect(mod); ican3_shutdown_module() 1414 ican3_reset_module(mod); ican3_shutdown_module() 1420 static int ican3_startup_module(struct ican3_dev *mod) ican3_startup_module() argument 1424 ret = ican3_reset_module(mod); ican3_startup_module() 1426 netdev_err(mod->ndev, "unable to reset module\n"); ican3_startup_module() 1431 iowrite8(1 << mod->num, &mod->ctrl->int_enable); ican3_startup_module() 1433 ret = ican3_msg_connect(mod); ican3_startup_module() 1435 netdev_err(mod->ndev, "unable to connect to module\n"); ican3_startup_module() 1439 ican3_init_new_host_interface(mod); ican3_startup_module() 1440 ret = ican3_msg_newhostif(mod); ican3_startup_module() 1442 netdev_err(mod->ndev, "unable to switch to new-style interface\n"); ican3_startup_module() 1447 ret = ican3_set_termination(mod, true); ican3_startup_module() 1449 netdev_err(mod->ndev, "unable to enable termination\n"); ican3_startup_module() 1454 ret = ican3_set_buserror(mod, 1); ican3_startup_module() 1456 netdev_err(mod->ndev, "unable to set bus-error\n"); ican3_startup_module() 1460 ican3_init_fast_host_interface(mod); ican3_startup_module() 1461 ret = ican3_msg_fasthostif(mod); ican3_startup_module() 1463 netdev_err(mod->ndev, "unable to switch to fast host interface\n"); ican3_startup_module() 1467 ret = ican3_set_id_filter(mod, true); ican3_startup_module() 1469 netdev_err(mod->ndev, "unable to set acceptance filter\n"); ican3_startup_module() 1482 struct ican3_dev *mod = netdev_priv(ndev); ican3_open() local 1488 netdev_err(mod->ndev, "unable to start CAN layer\n"); ican3_open() 1493 ret = ican3_set_bus_state(mod, true); ican3_open() 1495 netdev_err(mod->ndev, "unable to set bus-on\n"); ican3_open() 1501 mod->can.state = CAN_STATE_ERROR_ACTIVE; ican3_open() 1509 struct ican3_dev *mod = netdev_priv(ndev); ican3_stop() local 1514 mod->can.state = CAN_STATE_STOPPED; ican3_stop() 1517 ret = ican3_set_bus_state(mod, false); ican3_stop() 1519 netdev_err(mod->ndev, "unable to set bus-off\n"); ican3_stop() 1524 skb_queue_purge(&mod->echoq); ican3_stop() 1533 struct ican3_dev *mod = netdev_priv(ndev); ican3_xmit() local 1542 spin_lock_irqsave(&mod->lock, flags); ican3_xmit() 1545 if (!ican3_txok(mod)) { ican3_xmit() 1546 netdev_err(mod->ndev, "BUG: no free descriptors\n"); ican3_xmit() 1547 spin_unlock_irqrestore(&mod->lock, flags); ican3_xmit() 1552 ican3_set_page(mod, mod->fasttx_start + (mod->fasttx_num / 16)); ican3_xmit() 1553 desc_addr = mod->dpm + ((mod->fasttx_num % 16) * sizeof(desc)); ican3_xmit() 1558 can_frame_to_ican3(mod, cf, &desc); ican3_xmit() 1566 ican3_put_echo_skb(mod, skb); ican3_xmit() 1577 iowrite8(0x01, &mod->dpmctrl->interrupt); ican3_xmit() 1583 mod->fasttx_num = (desc.control & DESC_WRAP) ? 0 ican3_xmit() 1584 : (mod->fasttx_num + 1); ican3_xmit() 1587 if (!ican3_txok(mod)) ican3_xmit() 1590 spin_unlock_irqrestore(&mod->lock, flags); ican3_xmit() 1626 struct ican3_dev *mod = netdev_priv(ndev); ican3_set_bittiming() local 1627 struct can_bittiming *bt = &mod->can.bittiming; ican3_set_bittiming() 1634 if (mod->can.ctrlmode & CAN_CTRLMODE_3_SAMPLES) ican3_set_bittiming() 1645 return ican3_send_msg(mod, &msg); ican3_set_bittiming() 1650 struct ican3_dev *mod = netdev_priv(ndev); ican3_set_mode() local 1657 ret = ican3_set_bus_state(mod, true); ican3_set_mode() 1664 mod->can.state = CAN_STATE_ERROR_ACTIVE; ican3_set_mode() 1675 struct ican3_dev *mod = netdev_priv(ndev); ican3_get_berr_counter() local 1678 ret = ican3_send_inquiry(mod, INQUIRY_STATUS); ican3_get_berr_counter() 1682 if (!wait_for_completion_timeout(&mod->buserror_comp, HZ)) { ican3_get_berr_counter() 1683 netdev_info(mod->ndev, "%s timed out\n", __func__); ican3_get_berr_counter() 1687 bec->rxerr = mod->bec.rxerr; ican3_get_berr_counter() 1688 bec->txerr = mod->bec.txerr; ican3_get_berr_counter() 1700 struct ican3_dev *mod = netdev_priv(to_net_dev(dev)); ican3_sysfs_show_term() local 1703 ret = ican3_send_inquiry(mod, INQUIRY_TERMINATION); ican3_sysfs_show_term() 1707 if (!wait_for_completion_timeout(&mod->termination_comp, HZ)) { ican3_sysfs_show_term() 1708 netdev_info(mod->ndev, "%s timed out\n", __func__); ican3_sysfs_show_term() 1712 return snprintf(buf, PAGE_SIZE, "%u\n", mod->termination_enabled); ican3_sysfs_show_term() 1719 struct ican3_dev *mod = netdev_priv(to_net_dev(dev)); ican3_sysfs_set_term() local 1726 ret = ican3_set_termination(mod, enable); ican3_sysfs_set_term() 1753 struct ican3_dev *mod; ican3_probe() local 1768 ndev = alloc_candev(sizeof(*mod), 0); ican3_probe() 1776 mod = netdev_priv(ndev); ican3_probe() 1777 mod->ndev = ndev; ican3_probe() 1778 mod->num = pdata->modno; ican3_probe() 1779 netif_napi_add(ndev, &mod->napi, ican3_napi, ICAN3_RX_BUFFERS); ican3_probe() 1780 skb_queue_head_init(&mod->echoq); ican3_probe() 1781 spin_lock_init(&mod->lock); ican3_probe() 1782 init_completion(&mod->termination_comp); ican3_probe() 1783 init_completion(&mod->buserror_comp); ican3_probe() 1789 mod->free_page = DPM_FREE_START; ican3_probe() 1795 mod->can.clock.freq = ICAN3_CAN_CLOCK; ican3_probe() 1796 mod->can.bittiming_const = &ican3_bittiming_const; ican3_probe() 1797 mod->can.do_set_bittiming = ican3_set_bittiming; ican3_probe() 1798 mod->can.do_set_mode = ican3_set_mode; ican3_probe() 1799 mod->can.do_get_berr_counter = ican3_get_berr_counter; ican3_probe() 1800 mod->can.ctrlmode_supported = CAN_CTRLMODE_3_SAMPLES ican3_probe() 1805 mod->irq = platform_get_irq(pdev, 0); ican3_probe() 1806 if (mod->irq < 0) { ican3_probe() 1812 ndev->irq = mod->irq; ican3_probe() 1822 mod->dpm = ioremap(res->start, resource_size(res)); ican3_probe() 1823 if (!mod->dpm) { ican3_probe() 1829 mod->dpmctrl = mod->dpm + DPM_PAGE_SIZE; ican3_probe() 1839 mod->ctrl = ioremap(res->start, resource_size(res)); ican3_probe() 1840 if (!mod->ctrl) { ican3_probe() 1847 iowrite8(1 << mod->num, &mod->ctrl->int_disable); ican3_probe() 1848 ret = request_irq(mod->irq, ican3_irq, IRQF_SHARED, DRV_NAME, mod); ican3_probe() 1855 napi_enable(&mod->napi); ican3_probe() 1856 ret = ican3_startup_module(mod); ican3_probe() 1873 napi_disable(&mod->napi); ican3_probe() 1874 iowrite8(1 << mod->num, &mod->ctrl->int_disable); ican3_probe() 1875 free_irq(mod->irq, mod); ican3_probe() 1877 iounmap(mod->ctrl); ican3_probe() 1879 iounmap(mod->dpm); ican3_probe() 1889 struct ican3_dev *mod = netdev_priv(ndev); ican3_remove() local 1893 napi_disable(&mod->napi); ican3_remove() 1894 iowrite8(1 << mod->num, &mod->ctrl->int_disable); ican3_remove() 1895 free_irq(mod->irq, mod); ican3_remove() 1898 ican3_shutdown_module(mod); ican3_remove() 1901 iounmap(mod->ctrl); ican3_remove() 1902 iounmap(mod->dpm); ican3_remove()
|
/linux-4.1.27/kernel/ |
H A D | module.c | 185 unsigned int sym, str, mod, vers, info, pcpu; member in struct:load_info::__anon13982 191 static inline int strong_try_module_get(struct module *mod) strong_try_module_get() argument 193 BUG_ON(mod && mod->state == MODULE_STATE_UNFORMED); strong_try_module_get() 194 if (mod && mod->state == MODULE_STATE_COMING) strong_try_module_get() 196 if (try_module_get(mod)) strong_try_module_get() 202 static inline void add_taint_module(struct module *mod, unsigned flag, add_taint_module() argument 206 mod->taints |= (1U << flag); add_taint_module() 213 void __module_put_and_exit(struct module *mod, long code) __module_put_and_exit() argument 215 module_put(mod); __module_put_and_exit() 304 struct module *mod; each_symbol_section() local 327 list_for_each_entry_rcu(mod, &modules, list) { each_symbol_section() 329 { mod->syms, mod->syms + mod->num_syms, mod->crcs, each_symbol_section() 331 { mod->gpl_syms, mod->gpl_syms + mod->num_gpl_syms, each_symbol_section() 332 mod->gpl_crcs, each_symbol_section() 334 { mod->gpl_future_syms, each_symbol_section() 335 mod->gpl_future_syms + mod->num_gpl_future_syms, each_symbol_section() 336 mod->gpl_future_crcs, each_symbol_section() 339 { mod->unused_syms, each_symbol_section() 340 mod->unused_syms + mod->num_unused_syms, each_symbol_section() 341 mod->unused_crcs, each_symbol_section() 343 { mod->unused_gpl_syms, each_symbol_section() 344 mod->unused_gpl_syms + mod->num_unused_gpl_syms, each_symbol_section() 345 mod->unused_gpl_crcs, each_symbol_section() 350 if (mod->state == MODULE_STATE_UNFORMED) each_symbol_section() 353 if (each_symbol_in_section(arr, ARRAY_SIZE(arr), mod, fn, data)) each_symbol_section() 461 struct module *mod; find_module_all() local 463 list_for_each_entry(mod, &modules, list) { find_module_all() 464 if (!even_unformed && mod->state == MODULE_STATE_UNFORMED) find_module_all() 466 if (strlen(mod->name) == len && !memcmp(mod->name, name, len)) find_module_all() 467 return mod; find_module_all() 480 static inline void __percpu *mod_percpu(struct module *mod) mod_percpu() argument 482 return mod->percpu; mod_percpu() 485 static int percpu_modalloc(struct module *mod, struct load_info *info) percpu_modalloc() argument 495 mod->name, align, PAGE_SIZE); percpu_modalloc() 499 mod->percpu = __alloc_reserved_percpu(pcpusec->sh_size, align); percpu_modalloc() 500 if (!mod->percpu) { percpu_modalloc() 502 mod->name, (unsigned long)pcpusec->sh_size); percpu_modalloc() 505 mod->percpu_size = pcpusec->sh_size; percpu_modalloc() 509 static void percpu_modfree(struct module *mod) percpu_modfree() argument 511 free_percpu(mod->percpu); percpu_modfree() 519 static void percpu_modcopy(struct module *mod, percpu_modcopy() argument 525 memcpy(per_cpu_ptr(mod->percpu, cpu), from, size); percpu_modcopy() 539 struct module *mod; is_module_percpu_address() local 544 list_for_each_entry_rcu(mod, &modules, list) { is_module_percpu_address() 545 if (mod->state == MODULE_STATE_UNFORMED) is_module_percpu_address() 547 if (!mod->percpu_size) is_module_percpu_address() 550 void *start = per_cpu_ptr(mod->percpu, cpu); for_each_possible_cpu() 553 (void *)addr < start + mod->percpu_size) { for_each_possible_cpu() 566 static inline void __percpu *mod_percpu(struct module *mod) mod_percpu() argument 570 static int percpu_modalloc(struct module *mod, struct load_info *info) percpu_modalloc() argument 577 static inline void percpu_modfree(struct module *mod) percpu_modfree() argument 584 static inline void percpu_modcopy(struct module *mod, percpu_modcopy() argument 598 static void setup_modinfo_##field(struct module *mod, const char *s) \ 600 mod->field = kstrdup(s, GFP_KERNEL); \ 605 return scnprintf(buffer, PAGE_SIZE, "%s\n", mk->mod->field); \ 607 static int modinfo_##field##_exists(struct module *mod) \ 609 return mod->field != NULL; \ 611 static void free_modinfo_##field(struct module *mod) \ 613 kfree(mod->field); \ 614 mod->field = NULL; \ 637 static int module_unload_init(struct module *mod) module_unload_init() argument 643 atomic_set(&mod->refcnt, MODULE_REF_BASE); module_unload_init() 645 INIT_LIST_HEAD(&mod->source_list); module_unload_init() 646 INIT_LIST_HEAD(&mod->target_list); module_unload_init() 649 atomic_inc(&mod->refcnt); module_unload_init() 717 static void module_unload_free(struct module *mod) module_unload_free() argument 722 list_for_each_entry_safe(use, tmp, &mod->target_list, target_list) { module_unload_free() 724 pr_debug("%s unusing %s\n", mod->name, i->name); module_unload_free() 749 static int try_release_module_ref(struct module *mod) try_release_module_ref() argument 754 ret = atomic_sub_return(MODULE_REF_BASE, &mod->refcnt); try_release_module_ref() 758 ret = atomic_add_unless(&mod->refcnt, MODULE_REF_BASE, 0); try_release_module_ref() 763 static int try_stop_module(struct module *mod, int flags, int *forced) try_stop_module() argument 766 if (try_release_module_ref(mod) != 0) { try_stop_module() 773 mod->state = MODULE_STATE_GOING; try_stop_module() 781 * @mod: the module we're checking 787 int module_refcount(struct module *mod) module_refcount() argument 789 return atomic_read(&mod->refcnt) - MODULE_REF_BASE; module_refcount() 794 static void free_module(struct module *mod); 799 struct module *mod; SYSCALL_DEFINE2() local 813 mod = find_module(name); SYSCALL_DEFINE2() 814 if (!mod) { SYSCALL_DEFINE2() 819 if (!list_empty(&mod->source_list)) { SYSCALL_DEFINE2() 826 if (mod->state != MODULE_STATE_LIVE) { SYSCALL_DEFINE2() 828 pr_debug("%s already dying\n", mod->name); SYSCALL_DEFINE2() 834 if (mod->init && !mod->exit) { SYSCALL_DEFINE2() 844 ret = try_stop_module(mod, flags, &forced); SYSCALL_DEFINE2() 850 if (mod->exit != NULL) SYSCALL_DEFINE2() 851 mod->exit(); SYSCALL_DEFINE2() 853 MODULE_STATE_GOING, mod); SYSCALL_DEFINE2() 857 strlcpy(last_unloaded_module, mod->name, sizeof(last_unloaded_module)); SYSCALL_DEFINE2() 859 free_module(mod); SYSCALL_DEFINE2() 866 static inline void print_unload_info(struct seq_file *m, struct module *mod) print_unload_info() argument 871 seq_printf(m, " %i ", module_refcount(mod)); print_unload_info() 877 list_for_each_entry(use, &mod->source_list, source_list) { print_unload_info() 882 if (mod->init != NULL && mod->exit == NULL) { print_unload_info() 927 return sprintf(buffer, "%i\n", module_refcount(mk->mod)); show_refcnt() 978 static inline void print_unload_info(struct seq_file *m, struct module *mod) print_unload_info() argument 984 static inline void module_unload_free(struct module *mod) module_unload_free() argument 994 static inline int module_unload_init(struct module *mod) module_unload_init() argument 1000 static size_t module_flags_taint(struct module *mod, char *buf) module_flags_taint() argument 1004 if (mod->taints & (1 << TAINT_PROPRIETARY_MODULE)) module_flags_taint() 1006 if (mod->taints & (1 << TAINT_OOT_MODULE)) module_flags_taint() 1008 if (mod->taints & (1 << TAINT_FORCED_MODULE)) module_flags_taint() 1010 if (mod->taints & (1 << TAINT_CRAP)) module_flags_taint() 1012 if (mod->taints & (1 << TAINT_UNSIGNED_MODULE)) module_flags_taint() 1027 switch (mk->mod->state) { show_initstate() 1063 return sprintf(buffer, "%u\n", mk->mod->core_size); show_coresize() 1072 return sprintf(buffer, "%u\n", mk->mod->init_size); show_initsize() 1083 l = module_flags_taint(mk->mod, buffer); show_taint() 1107 static int try_to_force_load(struct module *mod, const char *reason) try_to_force_load() argument 1111 pr_warn("%s: %s: kernel tainted.\n", mod->name, reason); try_to_force_load() 1112 add_taint_module(mod, TAINT_FORCED_MODULE, LOCKDEP_NOW_UNRELIABLE); try_to_force_load() 1134 struct module *mod, check_version() 1147 return try_to_force_load(mod, symname) == 0; check_version() 1164 pr_warn("%s: no symbol version for %s\n", mod->name, symname); check_version() 1169 mod->name, symname); check_version() 1175 struct module *mod) check_modstruct_version() 1185 VMLINUX_SYMBOL_STR(module_layout), mod, crc, check_modstruct_version() 1203 struct module *mod, check_version() 1212 struct module *mod) check_modstruct_version() 1225 static const struct kernel_symbol *resolve_symbol(struct module *mod, resolve_symbol() argument 1243 !(mod->taints & (1 << TAINT_PROPRIETARY_MODULE)), true); resolve_symbol() 1247 if (!check_version(info->sechdrs, info->index.vers, name, mod, crc, resolve_symbol() 1253 err = ref_module(mod, owner); resolve_symbol() 1268 resolve_symbol_wait(struct module *mod, resolve_symbol_wait() argument 1276 !IS_ERR(ksym = resolve_symbol(mod, info, name, owner)) resolve_symbol_wait() 1280 mod->name, owner); resolve_symbol_wait() 1326 static void add_sect_attrs(struct module *mod, const struct load_info *info) add_sect_attrs() argument 1371 if (sysfs_create_group(&mod->mkobj.kobj, §_attrs->grp)) add_sect_attrs() 1374 mod->sect_attrs = sect_attrs; add_sect_attrs() 1380 static void remove_sect_attrs(struct module *mod) remove_sect_attrs() argument 1382 if (mod->sect_attrs) { remove_sect_attrs() 1383 sysfs_remove_group(&mod->mkobj.kobj, remove_sect_attrs() 1384 &mod->sect_attrs->grp); remove_sect_attrs() 1387 free_sect_attrs(mod->sect_attrs); remove_sect_attrs() 1388 mod->sect_attrs = NULL; remove_sect_attrs() 1425 static void add_notes_attrs(struct module *mod, const struct load_info *info) add_notes_attrs() argument 1432 if (!mod->sect_attrs) add_notes_attrs() 1458 nattr->attr.name = mod->sect_attrs->attrs[loaded].name; add_notes_attrs() 1468 notes_attrs->dir = kobject_create_and_add("notes", &mod->mkobj.kobj); add_notes_attrs() 1477 mod->notes_attrs = notes_attrs; add_notes_attrs() 1484 static void remove_notes_attrs(struct module *mod) remove_notes_attrs() argument 1486 if (mod->notes_attrs) remove_notes_attrs() 1487 free_notes_attrs(mod->notes_attrs, mod->notes_attrs->notes); remove_notes_attrs() 1492 static inline void add_sect_attrs(struct module *mod, add_sect_attrs() argument 1497 static inline void remove_sect_attrs(struct module *mod) remove_sect_attrs() argument 1501 static inline void add_notes_attrs(struct module *mod, add_notes_attrs() argument 1506 static inline void remove_notes_attrs(struct module *mod) remove_notes_attrs() argument 1511 static void add_usage_links(struct module *mod) add_usage_links() argument 1518 list_for_each_entry(use, &mod->target_list, target_list) { add_usage_links() 1520 &mod->mkobj.kobj, mod->name); add_usage_links() 1526 static void del_usage_links(struct module *mod) del_usage_links() argument 1532 list_for_each_entry(use, &mod->target_list, target_list) del_usage_links() 1533 sysfs_remove_link(use->target->holders_dir, mod->name); del_usage_links() 1538 static int module_add_modinfo_attrs(struct module *mod) module_add_modinfo_attrs() argument 1545 mod->modinfo_attrs = kzalloc((sizeof(struct module_attribute) * module_add_modinfo_attrs() 1548 if (!mod->modinfo_attrs) module_add_modinfo_attrs() 1551 temp_attr = mod->modinfo_attrs; module_add_modinfo_attrs() 1554 (attr->test && attr->test(mod))) { module_add_modinfo_attrs() 1557 error = sysfs_create_file(&mod->mkobj.kobj, module_add_modinfo_attrs() 1565 static void module_remove_modinfo_attrs(struct module *mod) module_remove_modinfo_attrs() argument 1570 for (i = 0; (attr = &mod->modinfo_attrs[i]); i++) { module_remove_modinfo_attrs() 1574 sysfs_remove_file(&mod->mkobj.kobj, &attr->attr); module_remove_modinfo_attrs() 1576 attr->free(mod); module_remove_modinfo_attrs() 1578 kfree(mod->modinfo_attrs); module_remove_modinfo_attrs() 1581 static void mod_kobject_put(struct module *mod) mod_kobject_put() argument 1584 mod->mkobj.kobj_completion = &c; mod_kobject_put() 1585 kobject_put(&mod->mkobj.kobj); mod_kobject_put() 1589 static int mod_sysfs_init(struct module *mod) mod_sysfs_init() argument 1595 pr_err("%s: module sysfs not initialized\n", mod->name); mod_sysfs_init() 1600 kobj = kset_find_obj(module_kset, mod->name); mod_sysfs_init() 1602 pr_err("%s: module is already loaded\n", mod->name); mod_sysfs_init() 1608 mod->mkobj.mod = mod; mod_sysfs_init() 1610 memset(&mod->mkobj.kobj, 0, sizeof(mod->mkobj.kobj)); mod_sysfs_init() 1611 mod->mkobj.kobj.kset = module_kset; mod_sysfs_init() 1612 err = kobject_init_and_add(&mod->mkobj.kobj, &module_ktype, NULL, mod_sysfs_init() 1613 "%s", mod->name); mod_sysfs_init() 1615 mod_kobject_put(mod); mod_sysfs_init() 1622 static int mod_sysfs_setup(struct module *mod, mod_sysfs_setup() argument 1629 err = mod_sysfs_init(mod); mod_sysfs_setup() 1633 mod->holders_dir = kobject_create_and_add("holders", &mod->mkobj.kobj); mod_sysfs_setup() 1634 if (!mod->holders_dir) { mod_sysfs_setup() 1639 err = module_param_sysfs_setup(mod, kparam, num_params); mod_sysfs_setup() 1643 err = module_add_modinfo_attrs(mod); mod_sysfs_setup() 1647 add_usage_links(mod); mod_sysfs_setup() 1648 add_sect_attrs(mod, info); mod_sysfs_setup() 1649 add_notes_attrs(mod, info); mod_sysfs_setup() 1651 kobject_uevent(&mod->mkobj.kobj, KOBJ_ADD); mod_sysfs_setup() 1655 module_param_sysfs_remove(mod); mod_sysfs_setup() 1657 kobject_put(mod->holders_dir); mod_sysfs_setup() 1659 mod_kobject_put(mod); mod_sysfs_setup() 1664 static void mod_sysfs_fini(struct module *mod) mod_sysfs_fini() argument 1666 remove_notes_attrs(mod); mod_sysfs_fini() 1667 remove_sect_attrs(mod); mod_sysfs_fini() 1668 mod_kobject_put(mod); mod_sysfs_fini() 1673 static int mod_sysfs_setup(struct module *mod, mod_sysfs_setup() argument 1681 static void mod_sysfs_fini(struct module *mod) mod_sysfs_fini() argument 1685 static void module_remove_modinfo_attrs(struct module *mod) module_remove_modinfo_attrs() argument 1689 static void del_usage_links(struct module *mod) del_usage_links() argument 1695 static void mod_sysfs_teardown(struct module *mod) mod_sysfs_teardown() argument 1697 del_usage_links(mod); mod_sysfs_teardown() 1698 module_remove_modinfo_attrs(mod); mod_sysfs_teardown() 1699 module_param_sysfs_remove(mod); mod_sysfs_teardown() 1700 kobject_put(mod->mkobj.drivers_dir); mod_sysfs_teardown() 1701 kobject_put(mod->holders_dir); mod_sysfs_teardown() 1702 mod_sysfs_fini(mod); mod_sysfs_teardown() 1749 static void unset_module_core_ro_nx(struct module *mod) unset_module_core_ro_nx() argument 1751 set_page_attributes(mod->module_core + mod->core_text_size, unset_module_core_ro_nx() 1752 mod->module_core + mod->core_size, unset_module_core_ro_nx() 1754 set_page_attributes(mod->module_core, unset_module_core_ro_nx() 1755 mod->module_core + mod->core_ro_size, unset_module_core_ro_nx() 1759 static void unset_module_init_ro_nx(struct module *mod) unset_module_init_ro_nx() argument 1761 set_page_attributes(mod->module_init + mod->init_text_size, unset_module_init_ro_nx() 1762 mod->module_init + mod->init_size, unset_module_init_ro_nx() 1764 set_page_attributes(mod->module_init, unset_module_init_ro_nx() 1765 mod->module_init + mod->init_ro_size, unset_module_init_ro_nx() 1772 struct module *mod; set_all_modules_text_rw() local 1775 list_for_each_entry_rcu(mod, &modules, list) { set_all_modules_text_rw() 1776 if (mod->state == MODULE_STATE_UNFORMED) set_all_modules_text_rw() 1778 if ((mod->module_core) && (mod->core_text_size)) { set_all_modules_text_rw() 1779 set_page_attributes(mod->module_core, set_all_modules_text_rw() 1780 mod->module_core + mod->core_text_size, set_all_modules_text_rw() 1783 if ((mod->module_init) && (mod->init_text_size)) { set_all_modules_text_rw() 1784 set_page_attributes(mod->module_init, set_all_modules_text_rw() 1785 mod->module_init + mod->init_text_size, set_all_modules_text_rw() 1795 struct module *mod; set_all_modules_text_ro() local 1798 list_for_each_entry_rcu(mod, &modules, list) { set_all_modules_text_ro() 1799 if (mod->state == MODULE_STATE_UNFORMED) set_all_modules_text_ro() 1801 if ((mod->module_core) && (mod->core_text_size)) { set_all_modules_text_ro() 1802 set_page_attributes(mod->module_core, set_all_modules_text_ro() 1803 mod->module_core + mod->core_text_size, set_all_modules_text_ro() 1806 if ((mod->module_init) && (mod->init_text_size)) { set_all_modules_text_ro() 1807 set_page_attributes(mod->module_init, set_all_modules_text_ro() 1808 mod->module_init + mod->init_text_size, set_all_modules_text_ro() 1816 static void unset_module_core_ro_nx(struct module *mod) { } unset_module_init_ro_nx() argument 1817 static void unset_module_init_ro_nx(struct module *mod) { } unset_module_init_ro_nx() argument 1825 void __weak module_arch_cleanup(struct module *mod) module_arch_cleanup() argument 1829 void __weak module_arch_freeing_init(struct module *mod) module_arch_freeing_init() argument 1834 static void free_module(struct module *mod) free_module() argument 1836 trace_module_free(mod); free_module() 1838 mod_sysfs_teardown(mod); free_module() 1843 mod->state = MODULE_STATE_UNFORMED; free_module() 1847 ddebug_remove_module(mod->name); free_module() 1850 module_arch_cleanup(mod); free_module() 1853 module_unload_free(mod); free_module() 1856 destroy_params(mod->kp, mod->num_kp); free_module() 1861 list_del_rcu(&mod->list); free_module() 1863 module_bug_cleanup(mod); free_module() 1864 /* Wait for RCU synchronizing before releasing mod->list and buglist. */ free_module() 1869 unset_module_init_ro_nx(mod); free_module() 1870 module_arch_freeing_init(mod); free_module() 1871 module_memfree(mod->module_init); free_module() 1872 kfree(mod->args); free_module() 1873 percpu_modfree(mod); free_module() 1876 lockdep_free_key_range(mod->module_core, mod->core_size); free_module() 1879 unset_module_core_ro_nx(mod); free_module() 1880 module_memfree(mod->module_core); free_module() 1908 static int verify_export_symbols(struct module *mod) verify_export_symbols() argument 1917 { mod->syms, mod->num_syms }, verify_export_symbols() 1918 { mod->gpl_syms, mod->num_gpl_syms }, verify_export_symbols() 1919 { mod->gpl_future_syms, mod->num_gpl_future_syms }, verify_export_symbols() 1921 { mod->unused_syms, mod->num_unused_syms }, verify_export_symbols() 1922 { mod->unused_gpl_syms, mod->num_unused_gpl_syms }, verify_export_symbols() 1931 mod->name, s->name, module_name(owner)); verify_export_symbols() 1940 static int simplify_symbols(struct module *mod, const struct load_info *info) simplify_symbols() argument 1962 mod->name); simplify_symbols() 1973 ksym = resolve_symbol_wait(mod, info, name); simplify_symbols() 1985 mod->name, name, PTR_ERR(ksym)); simplify_symbols() 1992 secbase = (unsigned long)mod_percpu(mod); simplify_symbols() 2003 static int apply_relocations(struct module *mod, const struct load_info *info) apply_relocations() argument 2022 info->index.sym, i, mod); apply_relocations() 2025 info->index.sym, i, mod); apply_relocations() 2033 unsigned int __weak arch_mod_section_prepend(struct module *mod, arch_mod_section_prepend() argument 2041 static long get_offset(struct module *mod, unsigned int *size, get_offset() argument 2046 *size += arch_mod_section_prepend(mod, section); get_offset() 2056 static void layout_sections(struct module *mod, struct load_info *info) layout_sections() argument 2083 s->sh_entsize = get_offset(mod, &mod->core_size, s, i); layout_sections() 2088 mod->core_size = debug_align(mod->core_size); layout_sections() 2089 mod->core_text_size = mod->core_size; layout_sections() 2092 mod->core_size = debug_align(mod->core_size); layout_sections() 2093 mod->core_ro_size = mod->core_size; layout_sections() 2096 mod->core_size = debug_align(mod->core_size); layout_sections() 2112 s->sh_entsize = (get_offset(mod, &mod->init_size, s, i) layout_sections() 2118 mod->init_size = debug_align(mod->init_size); layout_sections() 2119 mod->init_text_size = mod->init_size; layout_sections() 2122 mod->init_size = debug_align(mod->init_size); layout_sections() 2123 mod->init_ro_size = mod->init_size; layout_sections() 2126 mod->init_size = debug_align(mod->init_size); layout_sections() 2132 static void set_license(struct module *mod, const char *license) set_license() argument 2140 mod->name, license); set_license() 2141 add_taint_module(mod, TAINT_PROPRIETARY_MODULE, set_license() 2179 static void setup_modinfo(struct module *mod, struct load_info *info) setup_modinfo() argument 2186 attr->setup(mod, get_modinfo(info, attr->attr.name)); setup_modinfo() 2190 static void free_modinfo(struct module *mod) free_modinfo() argument 2197 attr->free(mod); free_modinfo() 2213 const struct module *mod) is_exported() 2216 if (!mod) is_exported() 2219 ks = lookup_symbol(name, mod->syms, mod->syms + mod->num_syms); is_exported() 2292 static void layout_symtab(struct module *mod, struct load_info *info) layout_symtab() argument 2301 symsect->sh_entsize = get_offset(mod, &mod->init_size, symsect, layout_symtab() 2318 info->symoffs = ALIGN(mod->core_size, symsect->sh_addralign ?: 1); layout_symtab() 2319 info->stroffs = mod->core_size = info->symoffs + ndst * sizeof(Elf_Sym); layout_symtab() 2320 mod->core_size += strtab_size; layout_symtab() 2321 mod->core_size = debug_align(mod->core_size); layout_symtab() 2325 strsect->sh_entsize = get_offset(mod, &mod->init_size, strsect, layout_symtab() 2330 mod->init_size = ALIGN(mod->init_size, layout_symtab() 2332 info->mod_kallsyms_init_off = mod->init_size; layout_symtab() 2333 mod->init_size += sizeof(struct mod_kallsyms); layout_symtab() 2334 mod->init_size = debug_align(mod->init_size); layout_symtab() 2342 static void add_kallsyms(struct module *mod, const struct load_info *info) add_kallsyms() argument 2351 mod->kallsyms = mod->module_init + info->mod_kallsyms_init_off; add_kallsyms() 2353 mod->kallsyms->symtab = (void *)symsec->sh_addr; add_kallsyms() 2354 mod->kallsyms->num_symtab = symsec->sh_size / sizeof(Elf_Sym); add_kallsyms() 2356 mod->kallsyms->strtab = (void *)info->sechdrs[info->index.str].sh_addr; add_kallsyms() 2359 for (i = 0; i < mod->kallsyms->num_symtab; i++) add_kallsyms() 2360 mod->kallsyms->symtab[i].st_info add_kallsyms() 2361 = elf_type(&mod->kallsyms->symtab[i], info); add_kallsyms() 2364 mod->core_kallsyms.symtab = dst = mod->module_core + info->symoffs; add_kallsyms() 2365 mod->core_kallsyms.strtab = s = mod->module_core + info->stroffs; add_kallsyms() 2366 src = mod->kallsyms->symtab; add_kallsyms() 2367 for (ndst = i = 0; i < mod->kallsyms->num_symtab; i++) { add_kallsyms() 2371 dst[ndst++].st_name = s - mod->core_kallsyms.strtab; add_kallsyms() 2372 s += strlcpy(s, &mod->kallsyms->strtab[src[i].st_name], add_kallsyms() 2376 mod->core_kallsyms.num_symtab = ndst; add_kallsyms() 2379 static inline void layout_symtab(struct module *mod, struct load_info *info) layout_symtab() argument 2383 static void add_kallsyms(struct module *mod, const struct load_info *info) add_kallsyms() argument 2427 static void kmemleak_load_module(const struct module *mod, kmemleak_load_module() argument 2433 kmemleak_scan_area(mod, sizeof(struct module), GFP_KERNEL); kmemleak_load_module() 2447 static inline void kmemleak_load_module(const struct module *mod, kmemleak_load_module() argument 2458 const void *mod = info->hdr; module_sig_check() local 2461 memcmp(mod + info->len - markerlen, MODULE_SIG_STRING, markerlen) == 0) { module_sig_check() 2464 err = mod_verify_sig(mod, &info->len); module_sig_check() 2661 struct module *mod; setup_load_info() local 2683 info->index.mod = find_sec(info, ".gnu.linkonce.this_module"); setup_load_info() 2684 if (!info->index.mod) { setup_load_info() 2688 /* This is temporary: point mod into copy of data. */ setup_load_info() 2689 mod = (void *)info->sechdrs[info->index.mod].sh_addr; setup_load_info() 2692 pr_warn("%s: module has no symbols (stripped?)\n", mod->name); setup_load_info() 2699 if (!check_modstruct_version(info->sechdrs, info->index.vers, mod)) setup_load_info() 2702 return mod; setup_load_info() 2705 static int check_modinfo(struct module *mod, struct load_info *info, int flags) check_modinfo() argument 2715 err = try_to_force_load(mod, "bad vermagic"); check_modinfo() 2720 mod->name, modmagic, vermagic); check_modinfo() 2725 add_taint_module(mod, TAINT_OOT_MODULE, LOCKDEP_STILL_OK); check_modinfo() 2728 add_taint_module(mod, TAINT_CRAP, LOCKDEP_STILL_OK); check_modinfo() 2730 "is unknown, you have been warned.\n", mod->name); check_modinfo() 2734 set_license(mod, get_modinfo(info, "license")); check_modinfo() 2739 static int find_module_sections(struct module *mod, struct load_info *info) find_module_sections() argument 2741 mod->kp = section_objs(info, "__param", find_module_sections() 2742 sizeof(*mod->kp), &mod->num_kp); find_module_sections() 2743 mod->syms = section_objs(info, "__ksymtab", find_module_sections() 2744 sizeof(*mod->syms), &mod->num_syms); find_module_sections() 2745 mod->crcs = section_addr(info, "__kcrctab"); find_module_sections() 2746 mod->gpl_syms = section_objs(info, "__ksymtab_gpl", find_module_sections() 2747 sizeof(*mod->gpl_syms), find_module_sections() 2748 &mod->num_gpl_syms); find_module_sections() 2749 mod->gpl_crcs = section_addr(info, "__kcrctab_gpl"); find_module_sections() 2750 mod->gpl_future_syms = section_objs(info, find_module_sections() 2752 sizeof(*mod->gpl_future_syms), find_module_sections() 2753 &mod->num_gpl_future_syms); find_module_sections() 2754 mod->gpl_future_crcs = section_addr(info, "__kcrctab_gpl_future"); find_module_sections() 2757 mod->unused_syms = section_objs(info, "__ksymtab_unused", find_module_sections() 2758 sizeof(*mod->unused_syms), find_module_sections() 2759 &mod->num_unused_syms); find_module_sections() 2760 mod->unused_crcs = section_addr(info, "__kcrctab_unused"); find_module_sections() 2761 mod->unused_gpl_syms = section_objs(info, "__ksymtab_unused_gpl", find_module_sections() 2762 sizeof(*mod->unused_gpl_syms), find_module_sections() 2763 &mod->num_unused_gpl_syms); find_module_sections() 2764 mod->unused_gpl_crcs = section_addr(info, "__kcrctab_unused_gpl"); find_module_sections() 2767 mod->ctors = section_objs(info, ".ctors", find_module_sections() 2768 sizeof(*mod->ctors), &mod->num_ctors); find_module_sections() 2769 if (!mod->ctors) find_module_sections() 2770 mod->ctors = section_objs(info, ".init_array", find_module_sections() 2771 sizeof(*mod->ctors), &mod->num_ctors); find_module_sections() 2778 mod->name); find_module_sections() 2784 mod->tracepoints_ptrs = section_objs(info, "__tracepoints_ptrs", find_module_sections() 2785 sizeof(*mod->tracepoints_ptrs), find_module_sections() 2786 &mod->num_tracepoints); find_module_sections() 2789 mod->jump_entries = section_objs(info, "__jump_table", find_module_sections() 2790 sizeof(*mod->jump_entries), find_module_sections() 2791 &mod->num_jump_entries); find_module_sections() 2794 mod->trace_events = section_objs(info, "_ftrace_events", find_module_sections() 2795 sizeof(*mod->trace_events), find_module_sections() 2796 &mod->num_trace_events); find_module_sections() 2797 mod->trace_enums = section_objs(info, "_ftrace_enum_map", find_module_sections() 2798 sizeof(*mod->trace_enums), find_module_sections() 2799 &mod->num_trace_enums); find_module_sections() 2802 mod->trace_bprintk_fmt_start = section_objs(info, "__trace_printk_fmt", find_module_sections() 2803 sizeof(*mod->trace_bprintk_fmt_start), find_module_sections() 2804 &mod->num_trace_bprintk_fmt); find_module_sections() 2808 mod->ftrace_callsites = section_objs(info, "__mcount_loc", find_module_sections() 2809 sizeof(*mod->ftrace_callsites), find_module_sections() 2810 &mod->num_ftrace_callsites); find_module_sections() 2813 mod->extable = section_objs(info, "__ex_table", find_module_sections() 2814 sizeof(*mod->extable), &mod->num_exentries); find_module_sections() 2817 pr_warn("%s: Ignoring obsolete parameters\n", mod->name); find_module_sections() 2825 static int move_module(struct module *mod, struct load_info *info) move_module() argument 2831 ptr = module_alloc_update_bounds(mod->core_size); move_module() 2841 memset(ptr, 0, mod->core_size); move_module() 2842 mod->module_core = ptr; move_module() 2844 if (mod->init_size) { move_module() 2845 ptr = module_alloc_update_bounds(mod->init_size); move_module() 2854 module_memfree(mod->module_core); move_module() 2857 memset(ptr, 0, mod->init_size); move_module() 2858 mod->module_init = ptr; move_module() 2860 mod->module_init = NULL; move_module() 2872 dest = mod->module_init move_module() 2875 dest = mod->module_core + shdr->sh_entsize; move_module() 2888 static int check_module_license_and_versions(struct module *mod) check_module_license_and_versions() argument 2895 if (strcmp(mod->name, "ndiswrapper") == 0) check_module_license_and_versions() 2899 if (strcmp(mod->name, "driverloader") == 0) check_module_license_and_versions() 2900 add_taint_module(mod, TAINT_PROPRIETARY_MODULE, check_module_license_and_versions() 2904 if (strcmp(mod->name, "lve") == 0) check_module_license_and_versions() 2905 add_taint_module(mod, TAINT_PROPRIETARY_MODULE, check_module_license_and_versions() 2909 if ((mod->num_syms && !mod->crcs) check_module_license_and_versions() 2910 || (mod->num_gpl_syms && !mod->gpl_crcs) check_module_license_and_versions() 2911 || (mod->num_gpl_future_syms && !mod->gpl_future_crcs) check_module_license_and_versions() 2913 || (mod->num_unused_syms && !mod->unused_crcs) check_module_license_and_versions() 2914 || (mod->num_unused_gpl_syms && !mod->unused_gpl_crcs) check_module_license_and_versions() 2917 return try_to_force_load(mod, check_module_license_and_versions() 2924 static void flush_module_icache(const struct module *mod) flush_module_icache() argument 2937 if (mod->module_init) flush_module_icache() 2938 flush_icache_range((unsigned long)mod->module_init, flush_module_icache() 2939 (unsigned long)mod->module_init flush_module_icache() 2940 + mod->init_size); flush_module_icache() 2941 flush_icache_range((unsigned long)mod->module_core, flush_module_icache() 2942 (unsigned long)mod->module_core + mod->core_size); flush_module_icache() 2950 struct module *mod) module_frob_arch_sections() 2958 struct module *mod; layout_and_allocate() local 2961 mod = setup_load_info(info, flags); layout_and_allocate() 2962 if (IS_ERR(mod)) layout_and_allocate() 2963 return mod; layout_and_allocate() 2965 err = check_modinfo(mod, info, flags); layout_and_allocate() 2971 info->secstrings, mod); layout_and_allocate() 2981 layout_sections(mod, info); layout_and_allocate() 2982 layout_symtab(mod, info); layout_and_allocate() 2985 err = move_module(mod, info); layout_and_allocate() 2990 mod = (void *)info->sechdrs[info->index.mod].sh_addr; layout_and_allocate() 2991 kmemleak_load_module(mod, info); layout_and_allocate() 2992 return mod; layout_and_allocate() 2995 /* mod is no longer valid after this! */ module_deallocate() 2996 static void module_deallocate(struct module *mod, struct load_info *info) module_deallocate() argument 2998 percpu_modfree(mod); module_deallocate() 2999 module_arch_freeing_init(mod); module_deallocate() 3000 module_memfree(mod->module_init); module_deallocate() 3001 module_memfree(mod->module_core); module_deallocate() 3011 static int post_relocation(struct module *mod, const struct load_info *info) post_relocation() argument 3014 sort_extable(mod->extable, mod->extable + mod->num_exentries); post_relocation() 3017 percpu_modcopy(mod, (void *)info->sechdrs[info->index.pcpu].sh_addr, post_relocation() 3021 add_kallsyms(mod, info); post_relocation() 3024 return module_finalize(info->hdr, info->sechdrs, mod); post_relocation() 3030 struct module *mod; finished_loading() local 3040 mod = find_module_all(name, strlen(name), true); finished_loading() 3041 ret = !mod || mod->state == MODULE_STATE_LIVE finished_loading() 3042 || mod->state == MODULE_STATE_GOING; finished_loading() 3049 static void do_mod_ctors(struct module *mod) do_mod_ctors() argument 3054 for (i = 0; i < mod->num_ctors; i++) do_mod_ctors() 3055 mod->ctors[i](); do_mod_ctors() 3078 static noinline int do_init_module(struct module *mod) do_init_module() argument 3088 freeinit->module_init = mod->module_init; do_init_module() 3091 * We want to find out whether @mod uses async during init. Clear do_init_module() 3096 do_mod_ctors(mod); do_init_module() 3098 if (mod->init != NULL) do_init_module() 3099 ret = do_one_initcall(mod->init); do_init_module() 3107 __func__, mod->name, ret, __func__); do_init_module() 3112 mod->state = MODULE_STATE_LIVE; do_init_module() 3114 MODULE_STATE_LIVE, mod); do_init_module() 3138 module_put(mod); do_init_module() 3139 trim_init_extable(mod); do_init_module() 3142 rcu_assign_pointer(mod->kallsyms, &mod->core_kallsyms); do_init_module() 3144 unset_module_init_ro_nx(mod); do_init_module() 3145 module_arch_freeing_init(mod); do_init_module() 3146 mod->module_init = NULL; do_init_module() 3147 mod->init_size = 0; do_init_module() 3148 mod->init_ro_size = 0; do_init_module() 3149 mod->init_text_size = 0; do_init_module() 3166 mod->state = MODULE_STATE_GOING; do_init_module() 3168 module_put(mod); do_init_module() 3170 MODULE_STATE_GOING, mod); do_init_module() 3171 free_module(mod); do_init_module() 3189 static int add_unformed_module(struct module *mod) add_unformed_module() argument 3194 mod->state = MODULE_STATE_UNFORMED; add_unformed_module() 3198 old = find_module_all(mod->name, strlen(mod->name), true); add_unformed_module() 3205 finished_loading(mod->name)); add_unformed_module() 3213 list_add_rcu(&mod->list, &modules); add_unformed_module() 3222 static int complete_formation(struct module *mod, struct load_info *info) complete_formation() argument 3229 err = verify_export_symbols(mod); complete_formation() 3234 module_bug_finalize(info->hdr, info->sechdrs, mod); complete_formation() 3237 set_section_ro_nx(mod->module_core, complete_formation() 3238 mod->core_text_size, complete_formation() 3239 mod->core_ro_size, complete_formation() 3240 mod->core_size); complete_formation() 3243 set_section_ro_nx(mod->module_init, complete_formation() 3244 mod->init_text_size, complete_formation() 3245 mod->init_ro_size, complete_formation() 3246 mod->init_size); complete_formation() 3250 mod->state = MODULE_STATE_COMING; complete_formation() 3254 MODULE_STATE_COMING, mod); complete_formation() 3276 struct module *mod; load_module() local 3289 mod = layout_and_allocate(info, flags); load_module() 3290 if (IS_ERR(mod)) { load_module() 3291 err = PTR_ERR(mod); load_module() 3296 err = add_unformed_module(mod); load_module() 3301 mod->sig_ok = info->sig_ok; load_module() 3302 if (!mod->sig_ok) { load_module() 3305 "kernel\n", mod->name); load_module() 3306 add_taint_module(mod, TAINT_UNSIGNED_MODULE, LOCKDEP_STILL_OK); load_module() 3311 err = percpu_modalloc(mod, info); load_module() 3316 err = module_unload_init(mod); load_module() 3322 err = find_module_sections(mod, info); load_module() 3326 err = check_module_license_and_versions(mod); load_module() 3331 setup_modinfo(mod, info); load_module() 3334 err = simplify_symbols(mod, info); load_module() 3338 err = apply_relocations(mod, info); load_module() 3342 err = post_relocation(mod, info); load_module() 3346 flush_module_icache(mod); load_module() 3349 mod->args = strndup_user(uargs, ~0UL >> 1); load_module() 3350 if (IS_ERR(mod->args)) { load_module() 3351 err = PTR_ERR(mod->args); load_module() 3358 ftrace_module_init(mod); load_module() 3361 err = complete_formation(mod, info); load_module() 3366 after_dashes = parse_args(mod->name, mod->args, mod->kp, mod->num_kp, load_module() 3373 mod->name, after_dashes); load_module() 3377 err = mod_sysfs_setup(mod, info, mod->kp, mod->num_kp); load_module() 3385 trace_module_load(mod); load_module() 3387 return do_init_module(mod); load_module() 3392 module_bug_cleanup(mod); load_module() 3396 MODULE_STATE_GOING, mod); load_module() 3399 unset_module_init_ro_nx(mod); load_module() 3400 unset_module_core_ro_nx(mod); load_module() 3405 kfree(mod->args); load_module() 3407 module_arch_cleanup(mod); load_module() 3409 free_modinfo(mod); load_module() 3411 module_unload_free(mod); load_module() 3415 list_del_rcu(&mod->list); load_module() 3417 /* Wait for RCU synchronizing before releasing mod->list. */ load_module() 3422 lockdep_free_key_range(mod->module_core, mod->core_size); load_module() 3424 module_deallocate(mod, info); load_module() 3495 static const char *get_ksymbol(struct module *mod, get_ksymbol() argument 3502 struct mod_kallsyms *kallsyms = rcu_dereference_sched(mod->kallsyms); get_ksymbol() 3505 if (within_module_init(addr, mod)) get_ksymbol() 3506 nextval = (unsigned long)mod->module_init+mod->init_text_size; get_ksymbol() 3508 nextval = (unsigned long)mod->module_core+mod->core_text_size; get_ksymbol() 3548 struct module *mod; module_address_lookup() local 3552 list_for_each_entry_rcu(mod, &modules, list) { module_address_lookup() 3553 if (mod->state == MODULE_STATE_UNFORMED) module_address_lookup() 3555 if (within_module(addr, mod)) { module_address_lookup() 3557 *modname = mod->name; module_address_lookup() 3558 ret = get_ksymbol(mod, addr, size, offset); module_address_lookup() 3573 struct module *mod; lookup_module_symbol_name() local 3576 list_for_each_entry_rcu(mod, &modules, list) { lookup_module_symbol_name() 3577 if (mod->state == MODULE_STATE_UNFORMED) lookup_module_symbol_name() 3579 if (within_module(addr, mod)) { lookup_module_symbol_name() 3582 sym = get_ksymbol(mod, addr, NULL, NULL); lookup_module_symbol_name() 3598 struct module *mod; lookup_module_symbol_attrs() local 3601 list_for_each_entry_rcu(mod, &modules, list) { lookup_module_symbol_attrs() 3602 if (mod->state == MODULE_STATE_UNFORMED) lookup_module_symbol_attrs() 3604 if (within_module(addr, mod)) { lookup_module_symbol_attrs() 3607 sym = get_ksymbol(mod, addr, size, offset); lookup_module_symbol_attrs() 3611 strlcpy(modname, mod->name, MODULE_NAME_LEN); lookup_module_symbol_attrs() 3626 struct module *mod; module_get_kallsym() local 3629 list_for_each_entry_rcu(mod, &modules, list) { module_get_kallsym() 3632 if (mod->state == MODULE_STATE_UNFORMED) module_get_kallsym() 3634 kallsyms = rcu_dereference_sched(mod->kallsyms); module_get_kallsym() 3639 strlcpy(module_name, mod->name, MODULE_NAME_LEN); module_get_kallsym() 3640 *exported = is_exported(name, *value, mod); module_get_kallsym() 3650 static unsigned long mod_find_symname(struct module *mod, const char *name) mod_find_symname() argument 3653 struct mod_kallsyms *kallsyms = rcu_dereference_sched(mod->kallsyms); mod_find_symname() 3665 struct module *mod; module_kallsyms_lookup_name() local 3672 if ((mod = find_module_all(name, colon - name, false)) != NULL) module_kallsyms_lookup_name() 3673 ret = mod_find_symname(mod, colon+1); module_kallsyms_lookup_name() 3675 list_for_each_entry_rcu(mod, &modules, list) { module_kallsyms_lookup_name() 3676 if (mod->state == MODULE_STATE_UNFORMED) module_kallsyms_lookup_name() 3678 if ((ret = mod_find_symname(mod, name)) != 0) module_kallsyms_lookup_name() 3690 struct module *mod; module_kallsyms_on_each_symbol() local 3694 list_for_each_entry(mod, &modules, list) { module_kallsyms_on_each_symbol() 3696 struct mod_kallsyms *kallsyms = mod->kallsyms; module_kallsyms_on_each_symbol() 3698 if (mod->state == MODULE_STATE_UNFORMED) module_kallsyms_on_each_symbol() 3702 mod, kallsyms->symtab[i].st_value); module_kallsyms_on_each_symbol() 3711 static char *module_flags(struct module *mod, char *buf) module_flags() argument 3715 BUG_ON(mod->state == MODULE_STATE_UNFORMED); module_flags() 3716 if (mod->taints || module_flags() 3717 mod->state == MODULE_STATE_GOING || module_flags() 3718 mod->state == MODULE_STATE_COMING) { module_flags() 3720 bx += module_flags_taint(mod, buf + bx); module_flags() 3722 if (mod->state == MODULE_STATE_GOING) module_flags() 3725 if (mod->state == MODULE_STATE_COMING) module_flags() 3754 struct module *mod = list_entry(p, struct module, list); m_show() local 3758 if (mod->state == MODULE_STATE_UNFORMED) m_show() 3762 mod->name, mod->init_size + mod->core_size); m_show() 3763 print_unload_info(m, mod); m_show() 3767 mod->state == MODULE_STATE_GOING ? "Unloading" : m_show() 3768 mod->state == MODULE_STATE_COMING ? "Loading" : m_show() 3771 seq_printf(m, " 0x%pK", mod->module_core); m_show() 3774 if (mod->taints) m_show() 3775 seq_printf(m, " %s", module_flags(mod, buf)); m_show() 3817 struct module *mod; search_module_extables() local 3820 list_for_each_entry_rcu(mod, &modules, list) { search_module_extables() 3821 if (mod->state == MODULE_STATE_UNFORMED) search_module_extables() 3823 if (mod->num_exentries == 0) search_module_extables() 3826 e = search_extable(mod->extable, search_module_extables() 3827 mod->extable + mod->num_exentries - 1, search_module_extables() 3866 struct module *mod; __module_address() local 3871 list_for_each_entry_rcu(mod, &modules, list) { __module_address() 3872 if (mod->state == MODULE_STATE_UNFORMED) __module_address() 3874 if (within_module(addr, mod)) __module_address() 3875 return mod; __module_address() 3909 struct module *mod = __module_address(addr); __module_text_address() local 3910 if (mod) { __module_text_address() 3912 if (!within(addr, mod->module_init, mod->init_text_size) __module_text_address() 3913 && !within(addr, mod->module_core, mod->core_text_size)) __module_text_address() 3914 mod = NULL; __module_text_address() 3916 return mod; __module_text_address() 3923 struct module *mod; print_modules() local 3929 list_for_each_entry_rcu(mod, &modules, list) { print_modules() 3930 if (mod->state == MODULE_STATE_UNFORMED) print_modules() 3932 pr_cont(" %s%s", mod->name, module_flags(mod, buf)); print_modules() 3943 void module_layout(struct module *mod, module_layout() argument 1131 check_version(Elf_Shdr *sechdrs, unsigned int versindex, const char *symname, struct module *mod, const unsigned long *crc, const struct module *crc_owner) check_version() argument 1173 check_modstruct_version(Elf_Shdr *sechdrs, unsigned int versindex, struct module *mod) check_modstruct_version() argument 1200 check_version(Elf_Shdr *sechdrs, unsigned int versindex, const char *symname, struct module *mod, const unsigned long *crc, const struct module *crc_owner) check_version() argument 1210 check_modstruct_version(Elf_Shdr *sechdrs, unsigned int versindex, struct module *mod) check_modstruct_version() argument 2212 is_exported(const char *name, unsigned long value, const struct module *mod) is_exported() argument 2947 module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, char *secstrings, struct module *mod) module_frob_arch_sections() argument
|
H A D | jump_label.c | 228 struct module *mod; member in struct:static_key_mod 233 struct module *mod; __jump_label_mod_text_reserved() local 235 mod = __module_text_address((unsigned long)start); __jump_label_mod_text_reserved() 236 if (!mod) __jump_label_mod_text_reserved() 239 WARN_ON_ONCE(__module_text_address((unsigned long)end) != mod); __jump_label_mod_text_reserved() 241 return __jump_label_text_reserved(mod->jump_entries, __jump_label_mod_text_reserved() 242 mod->jump_entries + mod->num_jump_entries, __jump_label_mod_text_reserved() 248 struct static_key_mod *mod = key->next; __jump_label_mod_update() local 250 while (mod) { __jump_label_mod_update() 251 struct module *m = mod->mod; __jump_label_mod_update() 253 __jump_label_update(key, mod->entries, __jump_label_mod_update() 256 mod = mod->next; __jump_label_mod_update() 262 * @mod: module to patch 268 void jump_label_apply_nops(struct module *mod) jump_label_apply_nops() argument 270 struct jump_entry *iter_start = mod->jump_entries; jump_label_apply_nops() 271 struct jump_entry *iter_stop = iter_start + mod->num_jump_entries; jump_label_apply_nops() 283 static int jump_label_add_module(struct module *mod) jump_label_add_module() argument 285 struct jump_entry *iter_start = mod->jump_entries; jump_label_add_module() 286 struct jump_entry *iter_stop = iter_start + mod->num_jump_entries; jump_label_add_module() 305 if (__module_address(iter->key) == mod) { jump_label_add_module() 316 jlm->mod = mod; jump_label_add_module() 328 static void jump_label_del_module(struct module *mod) jump_label_del_module() argument 330 struct jump_entry *iter_start = mod->jump_entries; jump_label_del_module() 331 struct jump_entry *iter_stop = iter_start + mod->num_jump_entries; jump_label_del_module() 342 if (__module_address(iter->key) == mod) jump_label_del_module() 348 while (jlm && jlm->mod != mod) { jump_label_del_module() 360 static void jump_label_invalidate_module_init(struct module *mod) jump_label_invalidate_module_init() argument 362 struct jump_entry *iter_start = mod->jump_entries; jump_label_invalidate_module_init() 363 struct jump_entry *iter_stop = iter_start + mod->num_jump_entries; jump_label_invalidate_module_init() 367 if (within_module_init(iter->code, mod)) jump_label_invalidate_module_init() 376 struct module *mod = data; jump_label_module_notify() local 382 ret = jump_label_add_module(mod); jump_label_module_notify() 384 jump_label_del_module(mod); jump_label_module_notify() 389 jump_label_del_module(mod); jump_label_module_notify() 394 jump_label_invalidate_module_init(mod); jump_label_module_notify() 448 struct module *mod = __module_address((unsigned long)key); jump_label_update() local 452 if (mod) jump_label_update() 453 stop = mod->jump_entries + mod->num_jump_entries; jump_label_update()
|
H A D | tracepoint.c | 287 bool trace_module_has_bad_taint(struct module *mod) trace_module_has_bad_taint() argument 289 return mod->taints & ~((1 << TAINT_OOT_MODULE) | (1 << TAINT_CRAP) | trace_module_has_bad_taint() 361 static int tracepoint_module_coming(struct module *mod) tracepoint_module_coming() argument 366 if (!mod->num_tracepoints) tracepoint_module_coming() 374 if (trace_module_has_bad_taint(mod)) tracepoint_module_coming() 382 tp_mod->mod = mod; tracepoint_module_coming() 391 static void tracepoint_module_going(struct module *mod) tracepoint_module_going() argument 395 if (!mod->num_tracepoints) tracepoint_module_going() 400 if (tp_mod->mod == mod) { tracepoint_module_going() 409 tp_module_going_check_quiescent(mod->tracepoints_ptrs, tracepoint_module_going() 410 mod->tracepoints_ptrs + mod->num_tracepoints); tracepoint_module_going() 426 struct module *mod = data; tracepoint_module_notify() local 431 ret = tracepoint_module_coming(mod); tracepoint_module_notify() 436 tracepoint_module_going(mod); tracepoint_module_notify()
|
H A D | module_signing.c | 44 const void *mod, mod_make_digest() 85 ret = crypto_shash_finup(desc, mod, modlen, pks->digest); mod_make_digest() 187 int mod_verify_sig(const void *mod, unsigned long *_modlen) mod_verify_sig() argument 201 memcpy(&ms, mod + (modlen - sizeof(ms)), sizeof(ms)); mod_verify_sig() 213 sig = mod + modlen; mod_verify_sig() 229 pks = mod_make_digest(ms.hash, mod, modlen); mod_verify_sig() 43 mod_make_digest(enum hash_algo hash, const void *mod, unsigned long modlen) mod_make_digest() argument
|
H A D | params.c | 676 * @mod: module 681 * /sys/module/[mod->name]/parameters/ 683 int module_param_sysfs_setup(struct module *mod, module_param_sysfs_setup() argument 693 err = add_sysfs_param(&mod->mkobj, &kparam[i], kparam[i].name); module_param_sysfs_setup() 695 free_module_param_attrs(&mod->mkobj); module_param_sysfs_setup() 705 err = sysfs_create_group(&mod->mkobj.kobj, &mod->mkobj.mp->grp); module_param_sysfs_setup() 707 free_module_param_attrs(&mod->mkobj); module_param_sysfs_setup() 713 * @mod: module 718 void module_param_sysfs_remove(struct module *mod) module_param_sysfs_remove() argument 720 if (mod->mkobj.mp) { module_param_sysfs_remove() 721 sysfs_remove_group(&mod->mkobj.kobj, &mod->mkobj.mp->grp); module_param_sysfs_remove() 724 free_module_param_attrs(&mod->mkobj); module_param_sysfs_remove() 751 mk->mod = THIS_MODULE; locate_module_kobject()
|
H A D | cpu.c | 326 unsigned long mod; member in struct:take_cpu_down_param 341 cpu_notify(CPU_DYING | param->mod, param->hcpu); take_cpu_down() 354 unsigned long mod = tasks_frozen ? CPU_TASKS_FROZEN : 0; _cpu_down() local 356 .mod = mod, _cpu_down() 368 err = __cpu_notify(CPU_DOWN_PREPARE | mod, hcpu, -1, &nr_calls); _cpu_down() 371 __cpu_notify(CPU_DOWN_FAILED | mod, hcpu, nr_calls, NULL); _cpu_down() 402 cpu_notify_nofail(CPU_DOWN_FAILED | mod, hcpu); _cpu_down() 425 cpu_notify_nofail(CPU_DEAD | mod, hcpu); _cpu_down() 432 cpu_notify_nofail(CPU_POST_DEAD | mod, hcpu); _cpu_down() 492 unsigned long mod = tasks_frozen ? CPU_TASKS_FROZEN : 0; _cpu_up() local 512 ret = __cpu_notify(CPU_UP_PREPARE | mod, hcpu, -1, &nr_calls); _cpu_up() 527 cpu_notify(CPU_ONLINE | mod, hcpu); _cpu_up() 531 __cpu_notify(CPU_UP_CANCELED | mod, hcpu, nr_calls, NULL); _cpu_up()
|
/linux-4.1.27/arch/ia64/kernel/ |
H A D | module.c | 154 apply_imm64 (struct module *mod, struct insn *insn, uint64_t val) apply_imm64() argument 158 mod->name, slot(insn)); apply_imm64() 166 apply_imm60 (struct module *mod, struct insn *insn, uint64_t val) apply_imm60() argument 170 mod->name, slot(insn)); apply_imm60() 175 mod->name, (long) val); apply_imm60() 183 apply_imm22 (struct module *mod, struct insn *insn, uint64_t val) apply_imm22() argument 187 mod->name, (long)val); apply_imm22() 198 apply_imm21b (struct module *mod, struct insn *insn, uint64_t val) apply_imm21b() argument 202 mod->name, (long)val); apply_imm21b() 233 patch_plt (struct module *mod, struct plt_entry *plt, long target_ip, unsigned long target_gp) patch_plt() argument 235 if (apply_imm64(mod, (struct insn *) (plt->bundle[0] + 2), target_gp) patch_plt() 236 && apply_imm60(mod, (struct insn *) (plt->bundle[1] + 2), patch_plt() 283 patch_plt (struct module *mod, struct plt_entry *plt, long target_ip, unsigned long target_gp) patch_plt() argument 285 if (apply_imm64(mod, (struct insn *) (plt->bundle[0] + 2), target_ip) patch_plt() 286 && apply_imm64(mod, (struct insn *) (plt->bundle[1] + 2), target_gp)) patch_plt() 308 module_arch_freeing_init (struct module *mod) module_arch_freeing_init() argument 310 if (mod->arch.init_unw_table) { module_arch_freeing_init() 311 unw_remove_unwind_table(mod->arch.init_unw_table); module_arch_freeing_init() 312 mod->arch.init_unw_table = NULL; module_arch_freeing_init() 422 struct module *mod) module_frob_arch_sections() 433 mod->arch.core_plt = s; module_frob_arch_sections() 435 mod->arch.init_plt = s; module_frob_arch_sections() 437 mod->arch.got = s; module_frob_arch_sections() 439 mod->arch.opd = s; module_frob_arch_sections() 441 mod->arch.unwind = s; module_frob_arch_sections() 445 mod->arch.paravirt_bundles = s; module_frob_arch_sections() 448 mod->arch.paravirt_insts = s; module_frob_arch_sections() 451 if (!mod->arch.core_plt || !mod->arch.init_plt || !mod->arch.got || !mod->arch.opd) { module_frob_arch_sections() 452 printk(KERN_ERR "%s: sections missing\n", mod->name); module_frob_arch_sections() 472 mod->arch.core_plt->sh_type = SHT_NOBITS; module_frob_arch_sections() 473 mod->arch.core_plt->sh_flags = SHF_EXECINSTR | SHF_ALLOC; module_frob_arch_sections() 474 mod->arch.core_plt->sh_addralign = 16; module_frob_arch_sections() 475 mod->arch.core_plt->sh_size = core_plts * sizeof(struct plt_entry); module_frob_arch_sections() 476 mod->arch.init_plt->sh_type = SHT_NOBITS; module_frob_arch_sections() 477 mod->arch.init_plt->sh_flags = SHF_EXECINSTR | SHF_ALLOC; module_frob_arch_sections() 478 mod->arch.init_plt->sh_addralign = 16; module_frob_arch_sections() 479 mod->arch.init_plt->sh_size = init_plts * sizeof(struct plt_entry); module_frob_arch_sections() 480 mod->arch.got->sh_type = SHT_NOBITS; module_frob_arch_sections() 481 mod->arch.got->sh_flags = ARCH_SHF_SMALL | SHF_ALLOC; module_frob_arch_sections() 482 mod->arch.got->sh_addralign = 8; module_frob_arch_sections() 483 mod->arch.got->sh_size = gots * sizeof(struct got_entry); module_frob_arch_sections() 484 mod->arch.opd->sh_type = SHT_NOBITS; module_frob_arch_sections() 485 mod->arch.opd->sh_flags = SHF_ALLOC; module_frob_arch_sections() 486 mod->arch.opd->sh_addralign = 8; module_frob_arch_sections() 487 mod->arch.opd->sh_size = fdescs * sizeof(struct fdesc); module_frob_arch_sections() 489 __func__, mod->arch.core_plt->sh_size, mod->arch.init_plt->sh_size, module_frob_arch_sections() 490 mod->arch.got->sh_size, mod->arch.opd->sh_size); module_frob_arch_sections() 495 in_init (const struct module *mod, uint64_t addr) in_init() argument 497 return addr - (uint64_t) mod->module_init < mod->init_size; in_init() 501 in_core (const struct module *mod, uint64_t addr) in_core() argument 503 return addr - (uint64_t) mod->module_core < mod->core_size; in_core() 507 is_internal (const struct module *mod, uint64_t value) is_internal() argument 509 return in_init(mod, value) || in_core(mod, value); is_internal() 516 get_ltoff (struct module *mod, uint64_t value, int *okp) get_ltoff() argument 523 got = (void *) mod->arch.got->sh_addr; get_ltoff() 524 for (e = got; e < got + mod->arch.next_got_entry; ++e) get_ltoff() 529 BUG_ON(e >= (struct got_entry *) (mod->arch.got->sh_addr + mod->arch.got->sh_size)); get_ltoff() 532 ++mod->arch.next_got_entry; get_ltoff() 534 return (uint64_t) e - mod->arch.gp; get_ltoff() 538 gp_addressable (struct module *mod, uint64_t value) gp_addressable() argument 540 return value - mod->arch.gp + MAX_LTOFF/2 < MAX_LTOFF; gp_addressable() 545 get_plt (struct module *mod, const struct insn *insn, uint64_t value, int *okp) get_plt() argument 553 if (in_init(mod, (uint64_t) insn)) { get_plt() 554 plt = (void *) mod->arch.init_plt->sh_addr; get_plt() 555 plt_end = (void *) plt + mod->arch.init_plt->sh_size; get_plt() 557 plt = (void *) mod->arch.core_plt->sh_addr; get_plt() 558 plt_end = (void *) plt + mod->arch.core_plt->sh_size; get_plt() 573 if (!patch_plt(mod, plt, target_ip, target_gp)) { get_plt() 591 get_fdesc (struct module *mod, uint64_t value, int *okp) get_fdesc() argument 593 struct fdesc *fdesc = (void *) mod->arch.opd->sh_addr; get_fdesc() 599 printk(KERN_ERR "%s: fdesc for zero requested!\n", mod->name); get_fdesc() 603 if (!is_internal(mod, value)) get_fdesc() 614 if ((uint64_t) ++fdesc >= mod->arch.opd->sh_addr + mod->arch.opd->sh_size) get_fdesc() 620 fdesc->gp = mod->arch.gp; get_fdesc() 625 do_reloc (struct module *mod, uint8_t r_type, Elf64_Sym *sym, uint64_t addend, do_reloc() argument 640 case RV_GPREL: val -= mod->arch.gp; break; do_reloc() 641 case RV_LTREL: val = get_ltoff(mod, val, &ok); break; do_reloc() 642 case RV_PLTREL: val = get_plt(mod, location, val, &ok); break; do_reloc() 643 case RV_FPTR: val = get_fdesc(mod, val, &ok); break; do_reloc() 645 case RV_LTREL_FPTR: val = get_ltoff(mod, get_fdesc(mod, val, &ok), &ok); break; do_reloc() 650 if ((in_init(mod, val) && in_core(mod, (uint64_t)location)) || do_reloc() 651 (in_core(mod, val) && in_init(mod, (uint64_t)location))) { do_reloc() 658 val = get_fdesc(mod, val, &ok); do_reloc() 659 val = get_plt(mod, location, val, &ok); do_reloc() 661 } else if (!is_internal(mod, val)) do_reloc() 662 val = get_plt(mod, location, val, &ok); do_reloc() 686 val -= (uint64_t) (in_init(mod, val) ? mod->module_init : mod->module_core); do_reloc() 696 if (!is_internal(mod, val)) { do_reloc() 711 val = get_fdesc(mod, get_plt(mod, location, val, &ok), &ok); do_reloc() 723 if (gp_addressable(mod, val)) do_reloc() 724 val -= mod->arch.gp; do_reloc() 726 val = get_ltoff(mod, val, &ok); do_reloc() 731 if (gp_addressable(mod, val)) { do_reloc() 741 mod->name, reloc_name[r_type]); do_reloc() 744 mod->name, r_type); do_reloc() 756 mod->name, reloc_name[r_type] ? reloc_name[r_type] : "?"); do_reloc() 760 printk(KERN_ERR "%s: unknown reloc %x\n", mod->name, r_type); do_reloc() 771 case RF_INSN21B: ok = apply_imm21b(mod, location, (int64_t) val / 16); break; do_reloc() 772 case RF_INSN22: ok = apply_imm22(mod, location, val); break; do_reloc() 773 case RF_INSN64: ok = apply_imm64(mod, location, val); break; do_reloc() 774 case RF_INSN60: ok = apply_imm60(mod, location, (int64_t) val / 16); break; do_reloc() 783 mod->name, format, reloc_name[r_type] ? reloc_name[r_type] : "?"); do_reloc() 788 mod->name, reloc_name[r_type] ? reloc_name[r_type] : "?", format); do_reloc() 796 unsigned int relsec, struct module *mod) apply_relocate_add() 815 if (!mod->arch.gp) { apply_relocate_add() 821 if (mod->core_size > MAX_LTOFF) apply_relocate_add() 826 gp = mod->core_size - MAX_LTOFF / 2; apply_relocate_add() 828 gp = mod->core_size / 2; apply_relocate_add() 829 gp = (uint64_t) mod->module_core + ((gp + 7) & -8); apply_relocate_add() 830 mod->arch.gp = gp; apply_relocate_add() 835 ret = do_reloc(mod, ELF64_R_TYPE(rela[i].r_info), apply_relocate_add() 853 register_unwind_table (struct module *mod) register_unwind_table() argument 855 struct unw_table_entry *start = (void *) mod->arch.unwind->sh_addr; register_unwind_table() 856 struct unw_table_entry *end = start + mod->arch.unwind->sh_size / sizeof (*start); register_unwind_table() 862 if (in_init(mod, e1->start_offset)) register_unwind_table() 883 if (in_init(mod, start->start_offset)) { register_unwind_table() 892 mod->name, mod->arch.gp, num_init, num_core); register_unwind_table() 898 mod->arch.core_unw_table = unw_add_unwind_table(mod->name, 0, mod->arch.gp, register_unwind_table() 901 mod->arch.core_unw_table, core, core + num_core); register_unwind_table() 904 mod->arch.init_unw_table = unw_add_unwind_table(mod->name, 0, mod->arch.gp, register_unwind_table() 907 mod->arch.init_unw_table, init, init + num_init); register_unwind_table() 912 module_finalize (const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *mod) module_finalize() argument 914 DEBUGP("%s: init: entry=%p\n", __func__, mod->init); module_finalize() 915 if (mod->arch.unwind) module_finalize() 916 register_unwind_table(mod); module_finalize() 918 if (mod->arch.paravirt_bundles) { module_finalize() 921 mod->arch.paravirt_bundles->sh_addr; module_finalize() 924 (mod->arch.paravirt_bundles->sh_addr + module_finalize() 925 mod->arch.paravirt_bundles->sh_size); module_finalize() 929 if (mod->arch.paravirt_insts) { module_finalize() 932 mod->arch.paravirt_insts->sh_addr; module_finalize() 935 (mod->arch.paravirt_insts->sh_addr + module_finalize() 936 mod->arch.paravirt_insts->sh_size); module_finalize() 945 module_arch_cleanup (struct module *mod) module_arch_cleanup() argument 947 if (mod->arch.init_unw_table) module_arch_cleanup() 948 unw_remove_unwind_table(mod->arch.init_unw_table); module_arch_cleanup() 949 if (mod->arch.core_unw_table) module_arch_cleanup() 950 unw_remove_unwind_table(mod->arch.core_unw_table); module_arch_cleanup() 421 module_frob_arch_sections(Elf_Ehdr *ehdr, Elf_Shdr *sechdrs, char *secstrings, struct module *mod) module_frob_arch_sections() argument 795 apply_relocate_add(Elf64_Shdr *sechdrs, const char *strtab, unsigned int symindex, unsigned int relsec, struct module *mod) apply_relocate_add() argument
|
/linux-4.1.27/drivers/usb/renesas_usbhs/ |
H A D | Makefile | 7 renesas_usbhs-y := common.o mod.o pipe.o fifo.o rcar2.o
|
H A D | mod.c | 20 #include "mod.h" 75 void usbhs_mod_register(struct usbhs_priv *priv, struct usbhs_mod *mod, int id) usbhs_mod_register() argument 79 info->mod[id] = mod; usbhs_mod_register() 80 mod->priv = priv; usbhs_mod_register() 91 ret = info->mod[id]; usbhs_mod_get() 100 struct usbhs_mod *mod = usbhs_mod_get_current(priv); usbhs_mod_is_host() local 103 if (!mod) usbhs_mod_is_host() 106 return info->mod[USBHS_HOST] == mod; usbhs_mod_is_host() 119 struct usbhs_mod *mod = NULL; usbhs_mod_change() local 126 mod = info->mod[id]; usbhs_mod_change() 131 info->curt = mod; usbhs_mod_change() 214 struct usbhs_mod *mod = usbhs_mod_get_current(priv); usbhs_status_get_each_irq() local 227 if (mod) { usbhs_status_get_each_irq() 232 state->bempsts &= mod->irq_bempsts; usbhs_status_get_each_irq() 233 state->brdysts &= mod->irq_brdysts; usbhs_status_get_each_irq() 322 void usbhs_irq_callback_update(struct usbhs_priv *priv, struct usbhs_mod *mod) usbhs_irq_callback_update() argument 349 * but "mod->irq_dev_state" will be called. usbhs_irq_callback_update() 354 if (mod) { usbhs_irq_callback_update() 358 if (mod->irq_ctrl_stage) usbhs_irq_callback_update() 361 if (mod->irq_empty && mod->irq_bempsts) { usbhs_irq_callback_update() 362 usbhs_write(priv, BEMPENB, mod->irq_bempsts); usbhs_irq_callback_update() 366 if (mod->irq_ready && mod->irq_brdysts) { usbhs_irq_callback_update() 367 usbhs_write(priv, BRDYENB, mod->irq_brdysts); usbhs_irq_callback_update() 374 if (mod->irq_attch) usbhs_irq_callback_update() 377 if (mod->irq_dtch) usbhs_irq_callback_update() 380 if (mod->irq_sign) usbhs_irq_callback_update() 383 if (mod->irq_sack) usbhs_irq_callback_update()
|
H A D | mod.h | 90 struct usbhs_mod *mod[USBHS_MAX]; member in struct:usbhs_mod_info 91 struct usbhs_mod *curt; /* current mod */ 129 void usbhs_irq_callback_update(struct usbhs_priv *priv, struct usbhs_mod *mod); 134 struct usbhs_mod *mod; \ 135 mod = usbhs_mod_get_current(priv); \ 136 !mod ? -ENODEV : \ 137 !mod->func ? 0 : \ 138 mod->func(param); \
|
H A D | mod_gadget.c | 47 struct usbhs_mod mod; member in struct:usbhsg_gpriv 78 struct usbhsg_gpriv, mod) 98 #define usbhsg_gpriv_to_dev(gp) usbhs_priv_to_dev((gp)->mod.priv) 99 #define usbhsg_gpriv_to_priv(gp) ((gp)->mod.priv) 778 struct usbhs_mod *mod = usbhs_mod_get_current(priv); usbhsg_try_start() local 826 mod->irq_dev_state = usbhsg_irq_dev_state; usbhsg_try_start() 827 mod->irq_ctrl_stage = usbhsg_irq_ctrl_stage; usbhsg_try_start() 828 usbhs_irq_callback_update(priv, mod); usbhsg_try_start() 836 struct usbhs_mod *mod = usbhs_mod_get_current(priv); usbhsg_try_stop() local 862 mod->irq_dev_state = NULL; usbhsg_try_stop() 863 mod->irq_ctrl_stage = NULL; usbhsg_try_stop() 864 usbhs_irq_callback_update(priv, mod); usbhsg_try_stop() 1012 usbhs_mod_register(priv, &gpriv->mod, USBHS_GADGET); usbhs_mod_gadget_probe() 1015 gpriv->mod.name = "gadget"; usbhs_mod_gadget_probe() 1016 gpriv->mod.start = usbhsg_start; usbhs_mod_gadget_probe() 1017 gpriv->mod.stop = usbhsg_stop; usbhs_mod_gadget_probe()
|
H A D | mod_host.c | 94 struct usbhs_mod mod; member in struct:usbhsh_hpriv 111 container_of(usbhs_mod_get(priv, USBHS_HOST), struct usbhsh_hpriv, mod) 127 #define usbhsh_hpriv_to_priv(h) ((h)->mod.priv) 201 * by checking mod.irq_attch usbhsh_is_running() 206 return (hpriv->mod.irq_attch == NULL); usbhsh_is_running() 1346 hpriv->mod.irq_attch = NULL; usbhsh_irq_attch() 1347 usbhs_irq_callback_update(priv, &hpriv->mod); usbhsh_irq_attch() 1372 hpriv->mod.irq_attch = usbhsh_irq_attch; usbhsh_irq_dtch() 1373 usbhs_irq_callback_update(priv, &hpriv->mod); usbhsh_irq_dtch() 1465 struct usbhs_mod *mod = usbhs_mod_get_current(priv); usbhsh_start() local 1494 mod->irq_attch = usbhsh_irq_attch; usbhsh_start() 1495 mod->irq_dtch = usbhsh_irq_dtch; usbhsh_start() 1496 mod->irq_sack = usbhsh_irq_setup_ack; usbhsh_start() 1497 mod->irq_sign = usbhsh_irq_setup_err; usbhsh_start() 1498 usbhs_irq_callback_update(priv, mod); usbhsh_start() 1509 struct usbhs_mod *mod = usbhs_mod_get_current(priv); usbhsh_stop() local 1515 mod->irq_attch = NULL; usbhsh_stop() 1516 mod->irq_dtch = NULL; usbhsh_stop() 1517 mod->irq_sack = NULL; usbhsh_stop() 1518 mod->irq_sign = NULL; usbhsh_stop() 1519 usbhs_irq_callback_update(priv, mod); usbhsh_stop() 1560 usbhs_mod_register(priv, &hpriv->mod, USBHS_HOST); usbhs_mod_host_probe() 1563 hpriv->mod.name = "host"; usbhs_mod_host_probe() 1564 hpriv->mod.start = usbhsh_start; usbhs_mod_host_probe() 1565 hpriv->mod.stop = usbhsh_stop; usbhs_mod_host_probe()
|
H A D | common.c | 34 * mod.c 373 struct usbhs_mod *mod = usbhs_mod_get_current(priv); usbhsc_hotplug() local 389 if (enable && !mod) { usbhsc_hotplug() 417 } else if (!enable && mod) { usbhsc_hotplug() 716 struct usbhs_mod *mod = usbhs_mod_get_current(priv); usbhsc_suspend() local 718 if (mod) { usbhsc_suspend() 723 if (mod || !usbhsc_flags_has(priv, USBHSF_RUNTIME_PWCTRL)) usbhsc_suspend()
|
H A D | fifo.c | 224 struct usbhs_mod *mod = usbhs_mod_get_current(priv); \ 226 if (!mod) \ 229 mod->status |= status; \ 231 mod->status &= ~status; \ 232 usbhs_irq_callback_update(priv, mod); \ 1377 struct usbhs_mod *mod = usbhs_mod_get_current(priv); usbhs_fifo_init() local 1382 mod->irq_empty = usbhsf_irq_empty; usbhs_fifo_init() 1383 mod->irq_ready = usbhsf_irq_ready; usbhs_fifo_init() 1384 mod->irq_bempsts = 0; usbhs_fifo_init() 1385 mod->irq_brdysts = 0; usbhs_fifo_init() 1394 struct usbhs_mod *mod = usbhs_mod_get_current(priv); usbhs_fifo_quit() local 1396 mod->irq_empty = NULL; usbhs_fifo_quit() 1397 mod->irq_ready = NULL; usbhs_fifo_quit() 1398 mod->irq_bempsts = 0; usbhs_fifo_quit() 1399 mod->irq_brdysts = 0; usbhs_fifo_quit()
|
/linux-4.1.27/net/9p/ |
H A D | Makefile | 6 mod.o \
|
/linux-4.1.27/tools/power/cpupower/debug/kernel/ |
H A D | Makefile | 15 - rm -rf *.o *.ko .tmp-versions .*.cmd .*.mod.* *.mod.c
|
/linux-4.1.27/include/linux/ |
H A D | moduleloader.h | 19 struct module *mod); 22 unsigned int arch_mod_section_prepend(struct module *mod, unsigned int section); 40 struct module *mod); 63 struct module *mod); 80 struct module *mod); 83 void module_arch_cleanup(struct module *mod); 85 /* Any cleanup before freeing mod->module_init */ 86 void module_arch_freeing_init(struct module *mod);
|
H A D | kmod.h | 37 #define request_module(mod...) __request_module(true, mod) 38 #define request_module_nowait(mod...) __request_module(false, mod) 39 #define try_then_request_module(x, mod...) \ 40 ((x) ?: (__request_module(true, mod), (x))) 44 #define try_then_request_module(x, mod...) (x) request_module_nowait()
|
H A D | module.h | 41 struct module *mod; member in struct:module_kobject 381 static inline int module_is_live(struct module *mod) module_is_live() argument 383 return mod->state != MODULE_STATE_GOING; module_is_live() 393 const struct module *mod) within_module_core() 395 return (unsigned long)mod->module_core <= addr && within_module_core() 396 addr < (unsigned long)mod->module_core + mod->core_size; within_module_core() 400 const struct module *mod) within_module_init() 402 return (unsigned long)mod->module_init <= addr && within_module_init() 403 addr < (unsigned long)mod->module_init + mod->init_size; within_module_init() 406 static inline bool within_module(unsigned long addr, const struct module *mod) within_module() argument 408 return within_module_init(addr, mod) || within_module_core(addr, mod); within_module() 449 extern void __module_put_and_exit(struct module *mod, long code) 454 int module_refcount(struct module *mod); 487 #define module_name(mod) \ 489 struct module *__mod = (mod); \ 564 #define module_name(mod) "kernel" 653 struct module *mod) module_bug_finalize() 656 static inline void module_bug_cleanup(struct module *mod) {} argument 392 within_module_core(unsigned long addr, const struct module *mod) within_module_core() argument 399 within_module_init(unsigned long addr, const struct module *mod) within_module_init() argument 651 module_bug_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *mod) module_bug_finalize() argument
|
H A D | livepatch.h | 91 * @mod: kernel module associated with the patched object 103 struct module *mod; member in struct:klp_object 109 * @mod: reference to the live patch module 117 struct module *mod; member in struct:klp_patch
|
H A D | ccp.h | 284 * @mod: RSA modulus 291 * - key_size, exp, exp_len, mod, mod_len, src, dst, src_len 299 struct scatterlist *mod; member in struct:ccp_rsa_engine 457 * @mod: ECC modulus 464 * - function, mod, mod_len 471 struct scatterlist *mod; member in struct:ccp_ecc_engine
|
H A D | jump_label.h | 146 extern void jump_label_apply_nops(struct module *mod); 196 static inline int jump_label_apply_nops(struct module *mod) jump_label_apply_nops() argument
|
H A D | mpi.h | 118 int mpi_powm(MPI res, MPI base, MPI exp, MPI mod); 121 int mpi_mulpowm(MPI res, MPI *basearray, MPI *exparray, MPI mod);
|
H A D | dynamic_debug.h | 114 static inline int ddebug_remove_module(const char *mod) ddebug_remove_module() argument
|
H A D | highuid.h | 45 /* prevent uid mod 65536 effect by returning a default value for high UIDs */
|
H A D | ioc3.h | 52 spinlock_t ir_lock; /* SIO_IE[SC] mod lock */
|
/linux-4.1.27/drivers/usb/gadget/ |
H A D | functions.c | 23 if (!try_module_get(fd->mod)) { try_get_usb_function_instance() 29 module_put(fd->mod); try_get_usb_function_instance() 70 struct module *mod; usb_put_function_instance() local 75 mod = fi->fd->mod; usb_put_function_instance() 77 module_put(mod); usb_put_function_instance()
|
/linux-4.1.27/arch/blackfin/kernel/ |
H A D | module.c | 7 #define pr_fmt(fmt) "module %s: " fmt, mod->name 22 char *secstrings, struct module *mod) module_frob_arch_sections() 28 * in mod->arch to correctly free L1 I/D sram later. module_frob_arch_sections() 29 * NOTE: this breaks the semantic of mod->arch structure. module_frob_arch_sections() 45 mod->arch.text_l1 = dest; module_frob_arch_sections() 57 mod->arch.data_a_l1 = dest; module_frob_arch_sections() 69 mod->arch.bss_a_l1 = dest; module_frob_arch_sections() 78 mod->arch.data_b_l1 = dest; module_frob_arch_sections() 88 mod->arch.bss_b_l1 = dest; module_frob_arch_sections() 100 mod->arch.text_l2 = dest; module_frob_arch_sections() 112 mod->arch.data_l2 = dest; module_frob_arch_sections() 124 mod->arch.bss_l2 = dest; module_frob_arch_sections() 153 struct module *mod) apply_relocate_add() 235 const Elf_Shdr * sechdrs, struct module *mod) module_finalize() 270 symindex, i, mod); module_finalize() 279 void module_arch_cleanup(struct module *mod) module_arch_cleanup() argument 281 l1_inst_sram_free(mod->arch.text_l1); module_arch_cleanup() 282 l1_data_A_sram_free(mod->arch.data_a_l1); module_arch_cleanup() 283 l1_data_A_sram_free(mod->arch.bss_a_l1); module_arch_cleanup() 284 l1_data_B_sram_free(mod->arch.data_b_l1); module_arch_cleanup() 285 l1_data_B_sram_free(mod->arch.bss_b_l1); module_arch_cleanup() 286 l2_sram_free(mod->arch.text_l2); module_arch_cleanup() 287 l2_sram_free(mod->arch.data_l2); module_arch_cleanup() 288 l2_sram_free(mod->arch.bss_l2); module_arch_cleanup() 21 module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, char *secstrings, struct module *mod) module_frob_arch_sections() argument 151 apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, unsigned int symindex, unsigned int relsec, struct module *mod) apply_relocate_add() argument 234 module_finalize(const Elf_Ehdr * hdr, const Elf_Shdr * sechdrs, struct module *mod) module_finalize() argument
|
H A D | bfin_dma.c | 485 s16 mod; _dma_memcpy() local 507 mod = 1 << shift; _dma_memcpy() 509 mod *= -1; _dma_memcpy() 510 dst += size + mod; _dma_memcpy() 511 src += size + mod; _dma_memcpy() 520 __dma_memcpy(dst, mod, src, mod, size, conf); _dma_memcpy()
|
H A D | ftrace.c | 41 int ftrace_make_nop(struct module *mod, struct dyn_ftrace *rec, ftrace_make_nop() argument
|
/linux-4.1.27/drivers/gpu/drm/tilcdc/ |
H A D | tilcdc_tfp410.c | 52 struct tfp410_module *mod; member in struct:tfp410_encoder 74 gpio_direction_output(tfp410_encoder->mod->gpio, 1); tfp410_encoder_dpms() 77 gpio_direction_output(tfp410_encoder->mod->gpio, 0); tfp410_encoder_dpms() 122 struct tfp410_module *mod) tfp410_encoder_create() 135 tfp410_encoder->mod = mod; tfp410_encoder_create() 162 struct tfp410_module *mod; member in struct:tfp410_connector 181 if (drm_probe_ddc(tfp410_connector->mod->i2c)) tfp410_connector_detect() 193 edid = drm_get_edid(connector, tfp410_connector->mod->i2c); tfp410_connector_get_modes() 234 struct tfp410_module *mod, struct drm_encoder *encoder) tfp410_connector_create() 247 tfp410_connector->mod = mod; tfp410_connector_create() 278 static int tfp410_modeset_init(struct tilcdc_module *mod, struct drm_device *dev) tfp410_modeset_init() argument 280 struct tfp410_module *tfp410_mod = to_tfp410_module(mod); tfp410_modeset_init() 314 struct tilcdc_module *mod; tfp410_probe() local 329 mod = &tfp410_mod->base; tfp410_probe() 330 pdev->dev.platform_data = mod; tfp410_probe() 332 tilcdc_module_init(mod, "tfp410", &tfp410_module_ops); tfp410_probe() 343 mod->preferred_bpp = dvi_info.bpp; tfp410_probe() 379 tilcdc_module_cleanup(mod); tfp410_probe() 385 struct tilcdc_module *mod = dev_get_platdata(&pdev->dev); tfp410_remove() local 386 struct tfp410_module *tfp410_mod = to_tfp410_module(mod); tfp410_remove() 391 tilcdc_module_cleanup(mod); tfp410_remove() 121 tfp410_encoder_create(struct drm_device *dev, struct tfp410_module *mod) tfp410_encoder_create() argument 233 tfp410_connector_create(struct drm_device *dev, struct tfp410_module *mod, struct drm_encoder *encoder) tfp410_connector_create() argument
|
H A D | tilcdc_slave.c | 50 struct slave_module *mod; member in struct:slave_encoder 119 struct slave_module *mod) slave_encoder_create() 131 slave_encoder->mod = mod; slave_encoder_create() 143 ret = drm_i2c_encoder_init(dev, to_encoder_slave(encoder), mod->i2c, &info); slave_encoder_create() 162 struct slave_module *mod; member in struct:slave_connector 232 struct slave_module *mod, struct drm_encoder *encoder) slave_connector_create() 245 slave_connector->mod = mod; slave_connector_create() 278 static int slave_modeset_init(struct tilcdc_module *mod, struct drm_device *dev) slave_modeset_init() argument 280 struct slave_module *slave_mod = to_slave_module(mod); slave_modeset_init() 314 struct tilcdc_module *mod; slave_probe() local 355 mod = &slave_mod->base; slave_probe() 356 pdev->dev.platform_data = mod; slave_probe() 358 mod->preferred_bpp = slave_info.bpp; slave_probe() 362 tilcdc_module_init(mod, "slave", &slave_module_ops); slave_probe() 379 struct tilcdc_module *mod = dev_get_platdata(&pdev->dev); slave_remove() local 380 struct slave_module *slave_mod = to_slave_module(mod); slave_remove() 382 tilcdc_module_cleanup(mod); slave_remove() 118 slave_encoder_create(struct drm_device *dev, struct slave_module *mod) slave_encoder_create() argument 231 slave_connector_create(struct drm_device *dev, struct slave_module *mod, struct drm_encoder *encoder) slave_connector_create() argument
|
H A D | tilcdc_panel.c | 44 struct panel_module *mod; member in struct:panel_encoder 59 struct backlight_device *backlight = panel_encoder->mod->backlight; panel_encoder_dpms() 60 struct gpio_desc *gpio = panel_encoder->mod->enable_gpio; panel_encoder_dpms() 85 tilcdc_crtc_set_panel_info(encoder->crtc, panel_encoder->mod->info); panel_encoder_prepare() 113 struct panel_module *mod) panel_encoder_create() 125 panel_encoder->mod = mod; panel_encoder_create() 152 struct panel_module *mod; member in struct:panel_connector 176 struct display_timings *timings = panel_connector->mod->timings; panel_connector_get_modes() 229 struct panel_module *mod, struct drm_encoder *encoder) panel_connector_create() 242 panel_connector->mod = mod; panel_connector_create() 270 static int panel_modeset_init(struct tilcdc_module *mod, struct drm_device *dev) panel_modeset_init() argument 272 struct panel_module *panel_mod = to_panel_module(mod); panel_modeset_init() 353 struct tilcdc_module *mod; panel_probe() local 397 mod = &panel_mod->base; panel_probe() 398 pdev->dev.platform_data = mod; panel_probe() 400 tilcdc_module_init(mod, "panel", &panel_module_ops); panel_probe() 420 mod->preferred_bpp = panel_mod->info->bpp; panel_probe() 428 tilcdc_module_cleanup(mod); panel_probe() 438 struct tilcdc_module *mod = dev_get_platdata(&pdev->dev); panel_remove() local 439 struct panel_module *panel_mod = to_panel_module(mod); panel_remove() 447 tilcdc_module_cleanup(mod); panel_remove() 112 panel_encoder_create(struct drm_device *dev, struct panel_module *mod) panel_encoder_create() argument 228 panel_connector_create(struct drm_device *dev, struct panel_module *mod, struct drm_encoder *encoder) panel_connector_create() argument
|
H A D | tilcdc_drv.c | 31 void tilcdc_module_init(struct tilcdc_module *mod, const char *name, tilcdc_module_init() argument 34 mod->name = name; tilcdc_module_init() 35 mod->funcs = funcs; tilcdc_module_init() 36 INIT_LIST_HEAD(&mod->list); tilcdc_module_init() 37 list_add(&mod->list, &module_list); tilcdc_module_init() 40 void tilcdc_module_cleanup(struct tilcdc_module *mod) tilcdc_module_cleanup() argument 42 list_del(&mod->list); tilcdc_module_cleanup() 72 struct tilcdc_module *mod; modeset_init() local 78 list_for_each_entry(mod, &module_list, list) { modeset_init() 79 DBG("loading module: %s", mod->name); modeset_init() 80 mod->funcs->modeset_init(mod, dev); modeset_init() 161 struct tilcdc_module *mod; tilcdc_load() local 280 list_for_each_entry(mod, &module_list, list) { tilcdc_load() 281 DBG("%s: preferred_bpp: %d", mod->name, mod->preferred_bpp); tilcdc_load() 282 bpp = mod->preferred_bpp; tilcdc_load() 493 struct tilcdc_module *mod; tilcdc_debugfs_init() local 500 list_for_each_entry(mod, &module_list, list) tilcdc_debugfs_init() 501 if (mod->funcs->debugfs_init) tilcdc_debugfs_init() 502 mod->funcs->debugfs_init(mod, minor); tilcdc_debugfs_init() 514 struct tilcdc_module *mod; tilcdc_debugfs_cleanup() local 518 list_for_each_entry(mod, &module_list, list) tilcdc_debugfs_cleanup() 519 if (mod->funcs->debugfs_cleanup) tilcdc_debugfs_cleanup() 520 mod->funcs->debugfs_cleanup(mod, minor); tilcdc_debugfs_cleanup()
|
H A D | tilcdc_drv.h | 100 int (*modeset_init)(struct tilcdc_module *mod, struct drm_device *dev); 103 int (*debugfs_init)(struct tilcdc_module *mod, struct drm_minor *minor); 105 void (*debugfs_cleanup)(struct tilcdc_module *mod, struct drm_minor *minor); 116 void tilcdc_module_init(struct tilcdc_module *mod, const char *name, 118 void tilcdc_module_cleanup(struct tilcdc_module *mod);
|
/linux-4.1.27/net/can/ |
H A D | gw.c | 102 struct cf_mod *mod); 135 struct cf_mod mod; member in struct:cgw_job 156 struct cf_mod *mod) { op ; } 158 MODFUNC(mod_and_id, cf->can_id &= mod->modframe.and.can_id) 159 MODFUNC(mod_and_dlc, cf->can_dlc &= mod->modframe.and.can_dlc) 160 MODFUNC(mod_and_data, *(u64 *)cf->data &= *(u64 *)mod->modframe.and.data) 161 MODFUNC(mod_or_id, cf->can_id |= mod->modframe.or.can_id) 162 MODFUNC(mod_or_dlc, cf->can_dlc |= mod->modframe.or.can_dlc) 163 MODFUNC(mod_or_data, *(u64 *)cf->data |= *(u64 *)mod->modframe.or.data) 164 MODFUNC(mod_xor_id, cf->can_id ^= mod->modframe.xor.can_id) 165 MODFUNC(mod_xor_dlc, cf->can_dlc ^= mod->modframe.xor.can_dlc) 166 MODFUNC(mod_xor_data, *(u64 *)cf->data ^= *(u64 *)mod->modframe.xor.data) 167 MODFUNC(mod_set_id, cf->can_id = mod->modframe.set.can_id) 168 MODFUNC(mod_set_dlc, cf->can_dlc = mod->modframe.set.can_dlc) 169 MODFUNC(mod_set_data, *(u64 *)cf->data = *(u64 *)mod->modframe.set.data) 394 if (gwj->mod.modfunc[0]) can_can_gw_rcv() 417 while (modidx < MAX_MODFUNCTIONS && gwj->mod.modfunc[modidx]) can_can_gw_rcv() 418 (*gwj->mod.modfunc[modidx++])(cf, &gwj->mod); can_can_gw_rcv() 422 if (gwj->mod.csumfunc.crc8) can_can_gw_rcv() 423 (*gwj->mod.csumfunc.crc8)(cf, &gwj->mod.csum.crc8); can_can_gw_rcv() 425 if (gwj->mod.csumfunc.xor) can_can_gw_rcv() 426 (*gwj->mod.csumfunc.xor)(cf, &gwj->mod.csum.xor); can_can_gw_rcv() 523 if (gwj->mod.modtype.and) { cgw_put_job() 524 memcpy(&mb.cf, &gwj->mod.modframe.and, sizeof(mb.cf)); cgw_put_job() 525 mb.modtype = gwj->mod.modtype.and; cgw_put_job() 530 if (gwj->mod.modtype.or) { cgw_put_job() 531 memcpy(&mb.cf, &gwj->mod.modframe.or, sizeof(mb.cf)); cgw_put_job() 532 mb.modtype = gwj->mod.modtype.or; cgw_put_job() 537 if (gwj->mod.modtype.xor) { cgw_put_job() 538 memcpy(&mb.cf, &gwj->mod.modframe.xor, sizeof(mb.cf)); cgw_put_job() 539 mb.modtype = gwj->mod.modtype.xor; cgw_put_job() 544 if (gwj->mod.modtype.set) { cgw_put_job() 545 memcpy(&mb.cf, &gwj->mod.modframe.set, sizeof(mb.cf)); cgw_put_job() 546 mb.modtype = gwj->mod.modtype.set; cgw_put_job() 551 if (gwj->mod.csumfunc.crc8) { cgw_put_job() 553 &gwj->mod.csum.crc8) < 0) cgw_put_job() 557 if (gwj->mod.csumfunc.xor) { cgw_put_job() 559 &gwj->mod.csum.xor) < 0) cgw_put_job() 625 static int cgw_parse_attr(struct nlmsghdr *nlh, struct cf_mod *mod, cgw_parse_attr() argument 634 memset(mod, 0, sizeof(*mod)); cgw_parse_attr() 653 canframecpy(&mod->modframe.and, &mb.cf); cgw_parse_attr() 654 mod->modtype.and = mb.modtype; cgw_parse_attr() 657 mod->modfunc[modidx++] = mod_and_id; cgw_parse_attr() 660 mod->modfunc[modidx++] = mod_and_dlc; cgw_parse_attr() 663 mod->modfunc[modidx++] = mod_and_data; cgw_parse_attr() 669 canframecpy(&mod->modframe.or, &mb.cf); cgw_parse_attr() 670 mod->modtype.or = mb.modtype; cgw_parse_attr() 673 mod->modfunc[modidx++] = mod_or_id; cgw_parse_attr() 676 mod->modfunc[modidx++] = mod_or_dlc; cgw_parse_attr() 679 mod->modfunc[modidx++] = mod_or_data; cgw_parse_attr() 685 canframecpy(&mod->modframe.xor, &mb.cf); cgw_parse_attr() 686 mod->modtype.xor = mb.modtype; cgw_parse_attr() 689 mod->modfunc[modidx++] = mod_xor_id; cgw_parse_attr() 692 mod->modfunc[modidx++] = mod_xor_dlc; cgw_parse_attr() 695 mod->modfunc[modidx++] = mod_xor_data; cgw_parse_attr() 701 canframecpy(&mod->modframe.set, &mb.cf); cgw_parse_attr() 702 mod->modtype.set = mb.modtype; cgw_parse_attr() 705 mod->modfunc[modidx++] = mod_set_id; cgw_parse_attr() 708 mod->modfunc[modidx++] = mod_set_dlc; cgw_parse_attr() 711 mod->modfunc[modidx++] = mod_set_data; cgw_parse_attr() 725 nla_memcpy(&mod->csum.crc8, tb[CGW_CS_CRC8], cgw_parse_attr() 734 mod->csumfunc.crc8 = cgw_csum_crc8_rel; cgw_parse_attr() 736 mod->csumfunc.crc8 = cgw_csum_crc8_pos; cgw_parse_attr() 738 mod->csumfunc.crc8 = cgw_csum_crc8_neg; cgw_parse_attr() 749 nla_memcpy(&mod->csum.xor, tb[CGW_CS_XOR], cgw_parse_attr() 758 mod->csumfunc.xor = cgw_csum_xor_rel; cgw_parse_attr() 760 mod->csumfunc.xor = cgw_csum_xor_pos; cgw_parse_attr() 762 mod->csumfunc.xor = cgw_csum_xor_neg; cgw_parse_attr() 832 err = cgw_parse_attr(nlh, &gwj->mod, CGW_TYPE_CAN_CAN, &gwj->ccgw, cgw_create_job() 892 struct cf_mod mod; cgw_remove_job() local 911 err = cgw_parse_attr(nlh, &mod, CGW_TYPE_CAN_CAN, &ccgw, &limhops); cgw_remove_job() 934 if (memcmp(&gwj->mod, &mod, sizeof(mod))) cgw_remove_job()
|
/linux-4.1.27/lib/ |
H A D | bug.c | 66 struct module *mod; module_find_bug() local 70 list_for_each_entry_rcu(mod, &module_bug_list, bug_list) { module_find_bug() 73 bug = mod->bug_table; module_find_bug() 74 for (i = 0; i < mod->num_bugs; ++i, ++bug) module_find_bug() 86 struct module *mod) module_bug_finalize() 91 mod->bug_table = NULL; module_bug_finalize() 92 mod->num_bugs = 0; module_bug_finalize() 99 mod->bug_table = (void *) sechdrs[i].sh_addr; module_bug_finalize() 100 mod->num_bugs = sechdrs[i].sh_size / sizeof(struct bug_entry); module_bug_finalize() 111 list_add_rcu(&mod->bug_list, &module_bug_list); module_bug_finalize() 114 void module_bug_cleanup(struct module *mod) module_bug_cleanup() argument 116 list_del_rcu(&mod->bug_list); module_bug_cleanup() 85 module_bug_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *mod) module_bug_finalize() argument
|
H A D | bch.c | 225 * tttttttt mod g = r0 (precomputed) encode_bch() 226 * zzzzzzzz 00000000 mod g = r1 (precomputed) encode_bch() 227 * yyyyyyyy 00000000 00000000 mod g = r2 (precomputed) encode_bch() 228 * xxxxxxxx 00000000 00000000 00000000 mod g = r3 (precomputed) encode_bch() 229 * xxxxxxxx yyyyyyyy zzzzzzzz tttttttt mod g = r0^r1^r2^r3 encode_bch() 753 /* compute a mod b (modifies a) */ gf_poly_div() 792 * Given a polynomial f and an integer k, compute Tr(a^kX) mod f 802 /* z contains z^2j mod f */ compute_trace_bk_mod() 814 /* add a^(k*2^i)(z^(2^i) mod f) and compute (z^(2^i) mod f)^2 */ compute_trace_bk_mod() 825 /* z^(2(i+1)) mod f = (z^(2^i) mod f)^2 mod f */ compute_trace_bk_mod() 832 dbg("Tr(a^%d.X) mod f = %s\n", k, gf_poly_str(out)); compute_trace_bk_mod() 852 /* tk = Tr(a^k.X) mod f */ factor_polynomial() 1092 /* we want to compute (p(X).X^(8*b+deg(g))) mod g(X) */ build_mod8_tables()
|
H A D | div64.c | 176 * Iterative div/mod for use when dividend is not expected to be much
|
/linux-4.1.27/arch/arc/kernel/ |
H A D | module.c | 34 char *secstr, struct module *mod) module_frob_arch_sections() 39 mod->arch.unw_sec_idx = 0; module_frob_arch_sections() 40 mod->arch.unw_info = NULL; module_frob_arch_sections() 45 mod->arch.unw_sec_idx = i; module_frob_arch_sections() 53 void module_arch_cleanup(struct module *mod) module_arch_cleanup() argument 56 if (mod->arch.unw_info) module_arch_cleanup() 57 unwind_remove_table(mod->arch.unw_info, 0); module_arch_cleanup() 132 struct module *mod) module_finalize() 136 int unwsec = mod->arch.unw_sec_idx; module_finalize() 139 unw = unwind_add_table(mod, (void *)sechdrs[unwsec].sh_addr, module_finalize() 141 mod->arch.unw_info = unw; module_finalize() 33 module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, char *secstr, struct module *mod) module_frob_arch_sections() argument 131 module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *mod) module_finalize() argument
|
/linux-4.1.27/sound/soc/samsung/ |
H A D | s3c-i2s-v2.c | 81 u32 fic, con, mod; s3c2412_snd_txctrl() local 87 mod = readl(regs + S3C2412_IISMOD); s3c2412_snd_txctrl() 89 pr_debug("%s: IIS: CON=%x MOD=%x FIC=%x\n", __func__, con, mod, fic); s3c2412_snd_txctrl() 96 switch (mod & S3C2412_IISMOD_MODE_MASK) { s3c2412_snd_txctrl() 103 mod &= ~S3C2412_IISMOD_MODE_MASK; s3c2412_snd_txctrl() 104 mod |= S3C2412_IISMOD_MODE_TXRX; s3c2412_snd_txctrl() 109 mod & S3C2412_IISMOD_MODE_MASK); s3c2412_snd_txctrl() 114 writel(mod, regs + S3C2412_IISMOD); s3c2412_snd_txctrl() 125 switch (mod & S3C2412_IISMOD_MODE_MASK) { s3c2412_snd_txctrl() 127 mod &= ~S3C2412_IISMOD_MODE_MASK; s3c2412_snd_txctrl() 128 mod |= S3C2412_IISMOD_MODE_RXONLY; s3c2412_snd_txctrl() 132 mod &= ~S3C2412_IISMOD_MODE_MASK; s3c2412_snd_txctrl() 138 mod & S3C2412_IISMOD_MODE_MASK); s3c2412_snd_txctrl() 142 writel(mod, regs + S3C2412_IISMOD); s3c2412_snd_txctrl() 148 pr_debug("%s: IIS: CON=%x MOD=%x FIC=%x\n", __func__, con, mod, fic); s3c2412_snd_txctrl() 154 u32 fic, con, mod; s3c2412_snd_rxctrl() local 160 mod = readl(regs + S3C2412_IISMOD); s3c2412_snd_rxctrl() 162 pr_debug("%s: IIS: CON=%x MOD=%x FIC=%x\n", __func__, con, mod, fic); s3c2412_snd_rxctrl() 169 switch (mod & S3C2412_IISMOD_MODE_MASK) { s3c2412_snd_rxctrl() 176 mod &= ~S3C2412_IISMOD_MODE_MASK; s3c2412_snd_rxctrl() 177 mod |= S3C2412_IISMOD_MODE_TXRX; s3c2412_snd_rxctrl() 182 mod & S3C2412_IISMOD_MODE_MASK); s3c2412_snd_rxctrl() 185 writel(mod, regs + S3C2412_IISMOD); s3c2412_snd_rxctrl() 194 switch (mod & S3C2412_IISMOD_MODE_MASK) { s3c2412_snd_rxctrl() 197 mod &= ~S3C2412_IISMOD_MODE_MASK; s3c2412_snd_rxctrl() 201 mod &= ~S3C2412_IISMOD_MODE_MASK; s3c2412_snd_rxctrl() 202 mod |= S3C2412_IISMOD_MODE_TXONLY; s3c2412_snd_rxctrl() 207 mod & S3C2412_IISMOD_MODE_MASK); s3c2412_snd_rxctrl() 211 writel(mod, regs + S3C2412_IISMOD); s3c2412_snd_rxctrl() 215 pr_debug("%s: IIS: CON=%x MOD=%x FIC=%x\n", __func__, con, mod, fic); s3c2412_snd_rxctrl()
|
H A D | i2s.c | 119 u32 mod = readl(i2s->addr + I2SMOD); is_slave() local 120 return (mod & (1 << i2s->variant_regs->mss_off)) ? true : false; is_slave() 249 u32 mod = readl(i2s->addr + I2SMOD); set_rfs() local 252 mod &= ~(i2s->variant_regs->rfs_mask << rfs_shift); set_rfs() 256 mod |= (EXYNOS7_MOD_RCLK_192FS << rfs_shift); set_rfs() 259 mod |= (EXYNOS7_MOD_RCLK_96FS << rfs_shift); set_rfs() 262 mod |= (EXYNOS7_MOD_RCLK_128FS << rfs_shift); set_rfs() 265 mod |= (EXYNOS7_MOD_RCLK_64FS << rfs_shift); set_rfs() 268 mod |= (MOD_RCLK_768FS << rfs_shift); set_rfs() 271 mod |= (MOD_RCLK_512FS << rfs_shift); set_rfs() 274 mod |= (MOD_RCLK_384FS << rfs_shift); set_rfs() 277 mod |= (MOD_RCLK_256FS << rfs_shift); set_rfs() 281 writel(mod, i2s->addr + I2SMOD); set_rfs() 307 u32 mod = readl(i2s->addr + I2SMOD); set_bfs() local 317 mod &= ~(i2s->variant_regs->bfs_mask << bfs_shift); set_bfs() 321 mod |= (MOD_BCLK_48FS << bfs_shift); set_bfs() 324 mod |= (MOD_BCLK_32FS << bfs_shift); set_bfs() 327 mod |= (MOD_BCLK_24FS << bfs_shift); set_bfs() 330 mod |= (MOD_BCLK_16FS << bfs_shift); set_bfs() 333 mod |= (EXYNOS5420_MOD_BCLK_64FS << bfs_shift); set_bfs() 336 mod |= (EXYNOS5420_MOD_BCLK_96FS << bfs_shift); set_bfs() 339 mod |= (EXYNOS5420_MOD_BCLK_128FS << bfs_shift); set_bfs() 342 mod |= (EXYNOS5420_MOD_BCLK_192FS << bfs_shift); set_bfs() 345 mod |= (EXYNOS5420_MOD_BCLK_256FS << bfs_shift); set_bfs() 352 writel(mod, i2s->addr + I2SMOD); set_bfs() 375 u32 mod = readl(addr + I2SMOD) & ~(3 << txr_off); i2s_txctrl() local 390 mod |= 2 << txr_off; i2s_txctrl() 392 mod |= 0 << txr_off; i2s_txctrl() 410 mod |= 1 << txr_off; i2s_txctrl() 415 writel(mod, addr + I2SMOD); i2s_txctrl() 425 u32 mod = readl(addr + I2SMOD) & ~(3 << txr_off); i2s_rxctrl() local 432 mod |= 2 << txr_off; i2s_rxctrl() 434 mod |= 1 << txr_off; i2s_rxctrl() 440 mod |= 0 << txr_off; i2s_rxctrl() 445 writel(mod, addr + I2SMOD); i2s_rxctrl() 482 u32 mod, mask, val = 0; i2s_set_sysclk() local 486 mod = readl(i2s->addr + I2SMOD); i2s_set_sysclk() 503 && !(mod & cdcon_mask)) || i2s_set_sysclk() 505 && (mod & cdcon_mask))))) { i2s_set_sysclk() 529 if ((clk_id && !(mod & rsrc_mask)) || i2s_set_sysclk() 530 (!clk_id && (mod & rsrc_mask))) { i2s_set_sysclk() 558 } else if ((!clk_id && (mod & rsrc_mask)) i2s_set_sysclk() 559 || (clk_id && !(mod & rsrc_mask))) { i2s_set_sysclk() 579 mod = readl(i2s->addr + I2SMOD); i2s_set_sysclk() 580 mod = (mod & ~mask) | val; i2s_set_sysclk() 581 writel(mod, i2s->addr + I2SMOD); i2s_set_sysclk() 592 u32 mod, tmp = 0; i2s_set_fmt() local 654 mod = readl(i2s->addr + I2SMOD); i2s_set_fmt() 660 ((mod & (sdf_mask | lrp_rlow | mod_slave)) != tmp)) { i2s_set_fmt() 667 mod &= ~(sdf_mask | lrp_rlow | mod_slave); i2s_set_fmt() 668 mod |= tmp; i2s_set_fmt() 669 writel(mod, i2s->addr + I2SMOD); i2s_set_fmt() 679 u32 mod, mask = 0, val = 0; i2s_hw_params() local 750 mod = readl(i2s->addr + I2SMOD); i2s_hw_params() 751 mod = (mod & ~mask) | val; i2s_hw_params() 752 writel(mod, i2s->addr + I2SMOD); i2s_hw_params()
|
H A D | idma.c | 152 u32 mod = readl(idma.regs + I2SMOD); idma_hw_params() local 156 mod |= MOD_TXS_IDMA; idma_hw_params() 158 writel(mod, idma.regs + I2SMOD); idma_hw_params()
|
/linux-4.1.27/arch/cris/include/arch-v32/mach-fs/mach/hwregs/ |
H A D | reg_map.h | 6 * file: ../../mod/fakereg.rmap 12 * file: ../../mod/modreg.rmap 16 * by /n/asic/design/tools/rdesc/src/rdes2c -map -base 0xb0000000 ../../rtl/global.rmap ../../mod/modreg.rmap ../../inst/io_proc/rtl/guinness/iop_top.r ../../inst/memarb/rtl/guinness/marb_top.r ../../mod/fakereg.rmap
|
/linux-4.1.27/sound/aoa/core/ |
H A D | alsa.h | 13 extern int aoa_alsa_init(char *name, struct module *mod, struct device *dev);
|
H A D | alsa.c | 17 int aoa_alsa_init(char *name, struct module *mod, struct device *dev) aoa_alsa_init() argument 26 err = snd_card_new(dev, index, name, mod, sizeof(struct aoa_card), aoa_alsa_init()
|
/linux-4.1.27/kernel/livepatch/ |
H A D | core.c | 86 return !obj->name || obj->mod; klp_is_object_loaded() 89 /* sets obj->mod if object is not vmlinux and module is found */ klp_find_object_module() 92 struct module *mod; klp_find_object_module() local 103 mod = find_module(obj->name); klp_find_object_module() 108 * until mod->exit() finishes. This is especially important for klp_find_object_module() 111 if (mod && mod->klp_alive) klp_find_object_module() 112 obj->mod = mod; klp_find_object_module() 148 struct module *mod, unsigned long addr) klp_find_callback() 152 if ((mod && !args->objname) || (!mod && args->objname)) klp_find_callback() 158 if (args->objname && strcmp(args->objname, mod->name)) klp_find_callback() 206 struct module *mod, unsigned long addr) klp_verify_callback() 210 if (!mod && klp_verify_callback() 307 ret = klp_find_object_symbol(obj->mod->name, klp_write_object_relocations() 472 pr_notice("disabling patch '%s'\n", patch->mod->name); __klp_disable_patch() 532 pr_notice("enabling patch '%s'\n", patch->mod->name); __klp_enable_patch() 689 obj->mod = NULL; klp_free_object_loaded() 735 ret = klp_write_object_relocations(patch->mod, obj); klp_init_object_loaded() 759 obj->mod = NULL; klp_init_object() 801 klp_root_kobj, "%s", patch->mod->name); klp_init_patch() 873 if (!patch || !patch->mod) klp_register_patch() 883 if (!try_module_get(patch->mod)) klp_register_patch() 888 module_put(patch->mod); klp_register_patch() 897 struct module *pmod = patch->mod; klp_module_notify_coming() 898 struct module *mod = obj->mod; klp_module_notify_coming() local 909 pmod->name, mod->name); klp_module_notify_coming() 917 pmod->name, mod->name, ret); klp_module_notify_coming() 923 struct module *pmod = patch->mod; klp_module_notify_going() 924 struct module *mod = obj->mod; klp_module_notify_going() local 930 pmod->name, mod->name); klp_module_notify_going() 941 struct module *mod = data; klp_module_notify() local 955 mod->klp_alive = true; klp_module_notify() 957 mod->klp_alive = false; klp_module_notify() 961 if (!klp_is_module(obj) || strcmp(obj->name, mod->name)) klp_module_notify() 965 obj->mod = mod; klp_module_notify() 147 klp_find_callback(void *data, const char *name, struct module *mod, unsigned long addr) klp_find_callback() argument 205 klp_verify_callback(void *data, const char *name, struct module *mod, unsigned long addr) klp_verify_callback() argument
|
/linux-4.1.27/kernel/trace/ |
H A D | bpf_trace.c | 101 int mod[3] = {}; bpf_trace_printk() local 127 mod[fmt_cnt]++; bpf_trace_printk() 130 mod[fmt_cnt]++; bpf_trace_printk() 139 mod[fmt_cnt]++; bpf_trace_printk() 149 mod[0] == 2 ? r3 : mod[0] == 1 ? (long) r3 : (u32) r3, bpf_trace_printk() 150 mod[1] == 2 ? r4 : mod[1] == 1 ? (long) r4 : (u32) r4, bpf_trace_printk() 151 mod[2] == 2 ? r5 : mod[2] == 1 ? (long) r5 : (u32) r5); bpf_trace_printk()
|
H A D | trace_printk.c | 84 struct module *mod = data; module_trace_bprintk_format_notify() local 85 if (mod->num_trace_bprintk_fmt) { module_trace_bprintk_format_notify() 86 const char **start = mod->trace_bprintk_fmt_start; module_trace_bprintk_format_notify() 87 const char **end = start + mod->num_trace_bprintk_fmt; module_trace_bprintk_format_notify() 143 * v points to the address of the fmt field in the mod list find_next_mod_format()
|
H A D | trace_event_perf.c | 170 module_put(tp_event->mod); perf_trace_event_unreg() 217 try_module_get(tp_event->mod)) { perf_trace_init() 220 module_put(tp_event->mod); perf_trace_init()
|
H A D | trace_events.c | 1706 __register_event(struct ftrace_event_call *call, struct module *mod) __register_event() argument 1715 call->mod = mod; __register_event() 1983 static void trace_module_add_events(struct module *mod) trace_module_add_events() argument 1987 if (!mod->num_trace_events) trace_module_add_events() 1991 if (trace_module_has_bad_taint(mod)) { trace_module_add_events() 1993 mod->name); trace_module_add_events() 1997 start = mod->trace_events; trace_module_add_events() 1998 end = mod->trace_events + mod->num_trace_events; trace_module_add_events() 2001 __register_event(*call, mod); for_each_event() 2006 static void trace_module_remove_events(struct module *mod) trace_module_remove_events() argument 2013 if (call->mod == mod) { trace_module_remove_events() 2036 struct module *mod = data; trace_module_notify() local 2042 trace_module_add_events(mod); trace_module_notify() 2045 trace_module_remove_events(mod); trace_module_notify() 2196 module_put(data->file->event_call->mod); event_enable_free() 2305 ret = try_module_get(file->event_call->mod); event_enable_func() 2334 module_put(file->event_call->mod); event_enable_func() 2402 if (WARN_ON_ONCE(call->mod)) __trace_early_add_events()
|
H A D | ftrace.c | 2409 ftrace_code_disable(struct module *mod, struct dyn_ftrace *rec) ftrace_code_disable() argument 2416 ret = ftrace_make_nop(mod, rec, MCOUNT_ADDR); ftrace_code_disable() 2820 static int ftrace_update_code(struct module *mod, struct ftrace_page *new_pgs) ftrace_update_code() argument 2836 if (mod) { ftrace_update_code() 2870 if (!ftrace_code_disable(mod, p)) ftrace_update_code() 3470 ftrace_match_record(struct dyn_ftrace *rec, char *mod, ftrace_match_record() argument 3478 if (mod) { ftrace_match_record() 3480 if (!modname || strcmp(modname, mod)) ftrace_match_record() 3483 /* blank search means to match all funcs in the mod */ ftrace_match_record() 3493 int len, char *mod, int not) match_records() 3514 if (ftrace_match_record(rec, mod, search, search_len, type)) { do_for_each_ftrace_rec() 3536 ftrace_match_module_records(struct ftrace_hash *hash, char *buff, char *mod) ftrace_match_module_records() argument 3550 return match_records(hash, buff, strlen(buff), mod, not); ftrace_match_module_records() 3562 char *mod; ftrace_mod_callback() local 3566 * cmd == 'mod' because we only registered this func ftrace_mod_callback() 3567 * for the 'mod' ftrace_func_command. ftrace_mod_callback() 3577 mod = strsep(¶m, ":"); ftrace_mod_callback() 3578 if (!strlen(mod)) ftrace_mod_callback() 3581 ret = ftrace_match_module_records(hash, func, mod); ftrace_mod_callback() 3591 .name = "mod", 4792 static int ftrace_process_locs(struct module *mod, ftrace_process_locs() argument 4824 if (!mod) { ftrace_process_locs() 4879 if (!mod) ftrace_process_locs() 4881 ftrace_update_code(mod, start_pg); ftrace_process_locs() 4882 if (!mod) ftrace_process_locs() 4895 void ftrace_release_mod(struct module *mod) ftrace_release_mod() argument 4914 if (within_module_core(rec->ip, mod)) { ftrace_release_mod() 4937 static void ftrace_init_module(struct module *mod, ftrace_init_module() argument 4942 ftrace_process_locs(mod, start, end); ftrace_init_module() 4945 void ftrace_module_init(struct module *mod) ftrace_module_init() argument 4947 ftrace_init_module(mod, mod->ftrace_callsites, ftrace_module_init() 4948 mod->ftrace_callsites + ftrace_module_init() 4949 mod->num_ftrace_callsites); ftrace_module_init() 4955 struct module *mod = data; ftrace_module_notify_exit() local 4958 ftrace_release_mod(mod); ftrace_module_notify_exit() 3492 match_records(struct ftrace_hash *hash, char *buff, int len, char *mod, int not) match_records() argument
|
/linux-4.1.27/arch/x86/kernel/ |
H A D | livepatch.c | 30 * @mod: module in which the section to be modified is found 38 int klp_write_module_reloc(struct module *mod, unsigned long type, klp_write_module_reloc() argument 44 unsigned long core = (unsigned long)mod->module_core; klp_write_module_reloc() 45 unsigned long core_ro_size = mod->core_ro_size; klp_write_module_reloc() 46 unsigned long core_size = mod->core_size; klp_write_module_reloc()
|
H A D | alternative.c | 453 struct module *mod; member in struct:smp_alt_module 470 void __init_or_module alternatives_smp_module_add(struct module *mod, alternatives_smp_module_add() argument 490 smp->mod = mod; alternatives_smp_module_add() 507 void __init_or_module alternatives_smp_module_del(struct module *mod) alternatives_smp_module_del() argument 513 if (mod != item->mod) alternatives_smp_module_del() 524 struct smp_alt_module *mod; alternatives_enable_smp() local 536 list_for_each_entry(mod, &smp_alt_modules, next) alternatives_enable_smp() 537 alternatives_smp_lock(mod->locks, mod->locks_end, alternatives_enable_smp() 538 mod->text, mod->text_end); alternatives_enable_smp() 547 struct smp_alt_module *mod; alternatives_text_reserved() local 552 list_for_each_entry(mod, &smp_alt_modules, next) { alternatives_text_reserved() 553 if (mod->text > text_end || mod->text_end < text_start) alternatives_text_reserved() 555 for (poff = mod->locks; poff < mod->locks_end; poff++) { alternatives_text_reserved()
|
H A D | test_nx.c | 47 struct module *mod = THIS_MODULE; fudze_exception_table() local 56 if (mod->num_exentries > 1) { fudze_exception_table() 61 extable = (struct exception_table_entry *)mod->extable; fudze_exception_table()
|
H A D | module.c | 253 void module_arch_cleanup(struct module *mod) module_arch_cleanup() argument 255 alternatives_smp_module_del(mod); module_arch_cleanup()
|
/linux-4.1.27/arch/microblaze/lib/ |
H A D | modsi3.S | 7 * Output: op1 mod op2 in Reg r3 34 addik r3, r0, 0 /* clear mod */ 45 addc r3, r3, r3 /* move that bit into the mod register */ 48 /* move the r31 to mod since the result was positive */ 62 or r3, r0, r0 /* set result to 0 [both mod as well as div are 0] */
|
H A D | umodsi3.S | 7 * Output: op1 mod op2 in Reg r3 26 addik r30, r0, 0 /* clear mod */ 61 addc r3, r3, r3 /* move that bit into the mod register */ 64 /* move the r31 to mod since the result was positive */
|
H A D | divsi3.S | 31 addik r30, r0, 0 /* clear mod */ 45 addc r30, r30, r30 /* move that bit into the mod register */ 48 /* move the r31 to mod since the result was positive */
|
H A D | udivsi3.S | 26 addik r30, r0, 0 /* clear mod */ 59 addc r30, r30, r30 /* move that bit into the mod register */ 62 /* move the r31 to mod since the result was positive */
|
/linux-4.1.27/arch/x86/math-emu/ |
H A D | get_address.c | 69 /* Decode the SIB byte. This function assumes mod != 0 */ sib() 70 static int sib(int mod, unsigned long *fpu_eip) sib() argument 84 if ((mod == 0) && (base == 5)) sib() 98 if (mod == 1) { sib() 107 } else if (mod == 2 || base == 5) { /* The second condition also has mod==0 */ sib() 210 u_char mod; FPU_get_address() local 224 mod = (FPU_modrm >> 6) & 3; FPU_get_address() 226 if (rm == 4 && mod != 3) { FPU_get_address() 227 address = sib(mod, fpu_eip); FPU_get_address() 230 switch (mod) { FPU_get_address() 295 u_char mod; FPU_get_address_16() local 297 int address = 0; /* Default used for mod == 0 */ FPU_get_address_16() 308 mod = (FPU_modrm >> 6) & 3; FPU_get_address_16() 310 switch (mod) { FPU_get_address_16()
|
/linux-4.1.27/arch/powerpc/kernel/ |
H A D | ftrace.c | 106 __ftrace_make_nop(struct module *mod, __ftrace_make_nop() argument 134 if (module_trampoline_target(mod, tramp, &ptr)) { __ftrace_make_nop() 171 __ftrace_make_nop(struct module *mod, __ftrace_make_nop() argument 241 int ftrace_make_nop(struct module *mod, ftrace_make_nop() argument 265 if (!rec->arch.mod) { ftrace_make_nop() 266 if (!mod) { ftrace_make_nop() 270 rec->arch.mod = mod; ftrace_make_nop() 271 } else if (mod) { ftrace_make_nop() 272 if (mod != rec->arch.mod) { ftrace_make_nop() 273 pr_err("Record mod %p not equal to passed in mod %p\n", ftrace_make_nop() 274 rec->arch.mod, mod); ftrace_make_nop() 277 /* nothing to do if mod == rec->arch.mod */ ftrace_make_nop() 279 mod = rec->arch.mod; ftrace_make_nop() 281 return __ftrace_make_nop(mod, rec, addr); ftrace_make_nop() 315 if (!rec->arch.mod->arch.tramp) { __ftrace_make_call() 321 if (!create_branch(ip, rec->arch.mod->arch.tramp, BRANCH_SET_LINK)) { __ftrace_make_call() 326 if (patch_branch(ip, rec->arch.mod->arch.tramp, BRANCH_SET_LINK)) { __ftrace_make_call() 351 if (!rec->arch.mod->arch.tramp) { __ftrace_make_call() 358 rec->arch.mod->arch.tramp, BRANCH_SET_LINK); __ftrace_make_call() 397 if (!rec->arch.mod) { ftrace_make_call()
|
H A D | module_32.c | 185 struct module *mod) do_plt_call() 191 if (location >= mod->module_core do_plt_call() 192 && location < mod->module_core + mod->core_size) do_plt_call() 193 entry = (void *)sechdrs[mod->arch.core_plt_section].sh_addr; do_plt_call() 195 entry = (void *)sechdrs[mod->arch.init_plt_section].sh_addr; do_plt_call() 182 do_plt_call(void *location, Elf32_Addr val, Elf32_Shdr *sechdrs, struct module *mod) do_plt_call() argument
|
/linux-4.1.27/scripts/mod/ |
H A D | modpost.c | 121 struct module *mod; find_module() local 123 for (mod = modules; mod; mod = mod->next) find_module() 124 if (strcmp(mod->name, modname) == 0) find_module() 126 return mod; find_module() 131 struct module *mod; new_module() local 134 mod = NOFAIL(malloc(sizeof(*mod))); new_module() 135 memset(mod, 0, sizeof(*mod)); new_module() 141 mod->is_dot_o = 1; new_module() 145 mod->name = p; new_module() 146 mod->gpl_compatible = -1; new_module() 147 mod->next = modules; new_module() 148 modules = mod; new_module() 150 return mod; new_module() 305 static struct symbol *sym_add_exported(const char *name, struct module *mod, sym_add_exported() argument 311 s = new_symbol(name, mod, export); sym_add_exported() 315 "was in %s%s\n", mod->name, name, sym_add_exported() 320 s->module = mod; sym_add_exported() 324 s->vmlinux = is_vmlinux(mod->name); sym_add_exported() 330 static void sym_update_crc(const char *name, struct module *mod, sym_update_crc() argument 336 s = new_symbol(name, mod, export); sym_update_crc() 605 static void handle_modversions(struct module *mod, struct elf_info *info, handle_modversions() argument 611 if ((!is_vmlinux(mod->name) || mod->is_dot_o) && handle_modversions() 620 sym_update_crc(symname + strlen(CRC_PFX), mod, crc, handle_modversions() 629 warn("\"%s\" [%s] is COMMON symbol\n", symname, mod->name); handle_modversions() 664 mod->unres = alloc_symbol(symname, handle_modversions() 666 mod->unres); handle_modversions() 671 sym_add_exported(symname + strlen(KSYMTAB_PFX), mod, handle_modversions() 675 mod->has_init = 1; handle_modversions() 677 mod->has_cleanup = 1; handle_modversions() 1620 "OTHER_TEXT_SECTIONS in scripts/mod/modpost.c.\n", report_extable_warnings() 1892 static void check_sec_ref(struct module *mod, const char *modname, check_sec_ref() argument 1926 struct module *mod; read_symbols() local 1933 mod = new_module(modname); read_symbols() 1939 mod->skip = 1; read_symbols() 1949 mod->gpl_compatible = 1; read_symbols() 1951 mod->gpl_compatible = 0; read_symbols() 1961 handle_modversions(mod, &info, sym, symname); read_symbols() 1962 handle_moddevtable(mod, &info, sym, symname); read_symbols() 1966 check_sec_ref(mod, modname, &info); read_symbols() 1973 get_src_version(modname, mod->srcversion, read_symbols() 1974 sizeof(mod->srcversion)-1); read_symbols() 1983 mod->unres = alloc_symbol("module_layout", 0, mod->unres); read_symbols() 2077 static void check_exports(struct module *mod) check_exports() argument 2081 for (s = mod->unres; s; s = s->next) { check_exports() 2084 if (!exp || exp->module == mod) check_exports() 2086 basename = strrchr(mod->name, '/'); check_exports() 2090 basename = mod->name; check_exports() 2091 if (!mod->gpl_compatible) check_exports() 2100 static void add_header(struct buffer *b, struct module *mod) add_header() argument 2111 if (mod->has_init) add_header() 2113 if (mod->has_cleanup) add_header() 2138 static int add_versions(struct buffer *b, struct module *mod) add_versions() argument 2143 for (s = mod->unres; s; s = s->next) { add_versions() 2145 if (!exp || exp->module == mod) { add_versions() 2149 s->name, mod->name); add_versions() 2152 s->name, mod->name); add_versions() 2171 for (s = mod->unres; s; s = s->next) { add_versions() 2176 s->name, mod->name); add_versions() 2188 static void add_depends(struct buffer *b, struct module *mod, add_depends() argument 2203 for (s = mod->unres; s; s = s->next) { add_depends() 2223 static void add_srcversion(struct buffer *b, struct module *mod) add_srcversion() argument 2225 if (mod->srcversion[0]) { add_srcversion() 2228 mod->srcversion); add_srcversion() 2292 struct module *mod; read_dump() local 2308 mod = find_module(modname); read_dump() 2309 if (!mod) { read_dump() 2312 mod = new_module(modname); read_dump() 2313 mod->skip = 1; read_dump() 2315 s = sym_add_exported(symname, mod, export_no(export)); read_dump() 2318 sym_update_crc(symname, mod, crc, export_no(export)); read_dump() 2367 struct module *mod; main() local 2439 for (mod = modules; mod; mod = mod->next) { main() 2440 if (mod->skip) main() 2442 check_exports(mod); main() 2447 for (mod = modules; mod; mod = mod->next) { main() 2450 if (mod->skip) main() 2455 add_header(&buf, mod); main() 2457 add_staging_flag(&buf, mod->name); main() 2458 err |= add_versions(&buf, mod); main() 2459 add_depends(&buf, mod, modules); main() 2460 add_moddevtable(&buf, mod); main() 2461 add_srcversion(&buf, mod); main() 2463 sprintf(fname, "%s.mod.c", mod->name); main()
|
H A D | file2alias.c | 176 unsigned char max, struct module *mod) do_usb_entry() 237 buf_printf(&mod->dev_table_buf, do_usb_entry() 280 static void do_usb_entry_multi(void *symval, struct module *mod) do_usb_entry_multi() argument 327 do_usb_entry(symval, devlo, ndigits, clo, chi, max, mod); do_usb_entry_multi() 335 ndigits, clo, max, max, mod); do_usb_entry_multi() 341 ndigits, 0x0, chi, max, mod); do_usb_entry_multi() 346 struct module *mod) do_usb_table() 351 device_id_check(mod->name, "usb", size, id_size, symval); do_usb_table() 357 do_usb_entry_multi(symval + i, mod); do_usb_table() 526 struct module *mod) do_pnp_device_entry() 532 device_id_check(mod->name, "pnp", size, id_size, symval); do_pnp_device_entry() 539 buf_printf(&mod->dev_table_buf, do_pnp_device_entry() 545 buf_printf(&mod->dev_table_buf, do_pnp_device_entry() 552 struct module *mod) do_pnp_card_entries() 558 device_id_check(mod->name, "pnp", size, id_size, symval); do_pnp_card_entries() 594 buf_printf(&mod->dev_table_buf, do_pnp_card_entries() 600 buf_printf(&mod->dev_table_buf, do_pnp_card_entries() 1145 ADD(alias, "mod", model != X86_MODEL_ANY, model); do_x86cpu_entry() 1208 struct module *mod) do_table() 1214 device_id_check(mod->name, device_id, size, id_size, symval); do_table() 1219 if (do_entry(mod->name, symval+i, alias)) { do_table() 1220 buf_printf(&mod->dev_table_buf, do_table() 1228 * so we write into the mod->dev_table_buf buffer. */ handle_moddevtable() 1229 void handle_moddevtable(struct module *mod, struct elf_info *info, handle_moddevtable() argument 1272 do_usb_table(symval, sym->st_size, mod); handle_moddevtable() 1274 do_pnp_device_entry(symval, sym->st_size, mod); handle_moddevtable() 1276 do_pnp_card_entries(symval, sym->st_size, mod); handle_moddevtable() 1284 (*p)->device_id, (*p)->function, mod); handle_moddevtable() 1293 void add_moddevtable(struct buffer *buf, struct module *mod) add_moddevtable() argument 1296 buf_write(buf, mod->dev_table_buf.p, mod->dev_table_buf.pos); add_moddevtable() 1297 free(mod->dev_table_buf.p); add_moddevtable() 173 do_usb_entry(void *symval, unsigned int bcdDevice_initial, int bcdDevice_initial_digits, unsigned char range_lo, unsigned char range_hi, unsigned char max, struct module *mod) do_usb_entry() argument 345 do_usb_table(void *symval, unsigned long size, struct module *mod) do_usb_table() argument 525 do_pnp_device_entry(void *symval, unsigned long size, struct module *mod) do_pnp_device_entry() argument 551 do_pnp_card_entries(void *symval, unsigned long size, struct module *mod) do_pnp_card_entries() argument 1204 do_table(void *symval, unsigned long size, unsigned long id_size, const char *device_id, void *function, struct module *mod) do_table() argument
|
H A D | modpost.h | 169 void handle_moddevtable(struct module *mod, struct elf_info *info, 171 void add_moddevtable(struct buffer *buf, struct module *mod);
|
H A D | sumversion.c | 413 /* Source files for module are in .tmp_versions/modname.mod, get_src_version() 419 snprintf(filelist, sizeof(filelist), "%s/%.*s.mod", modverdir, get_src_version() 424 /* not a module or .mod file missing - ignore */ get_src_version()
|
/linux-4.1.27/arch/x86/lib/ |
H A D | insn.c | 156 * In 32-bits mode, if the [7:6] bits (mod bits of insn_get_prefixes() 257 insn_byte_t pfx_id, mod; insn_get_modrm() local 264 mod = get_next(insn_byte_t, insn); insn_get_modrm() 265 modrm->value = mod; insn_get_modrm() 269 insn->attr = inat_get_group_attribute(mod, pfx_id, insn_get_modrm() 301 * For rip-relative instructions, the mod field (top 2 bits) insn_rip_relative() 347 insn_byte_t mod, rm, base; insn_get_displacement() local 356 * mod = 00 - no displacement fields (exceptions below) insn_get_displacement() 357 * mod = 01 - 1-byte displacement field insn_get_displacement() 358 * mod = 10 - displacement field is 4 bytes, or 2 bytes if insn_get_displacement() 360 * mod = 11 - no memory operand insn_get_displacement() 363 * mod = 00, r/m = 110 - displacement field is 2 bytes insn_get_displacement() 366 * mod != 11, r/m = 100 - SIB byte exists insn_get_displacement() 367 * mod = 00, SIB base = 101 - displacement field is 4 bytes insn_get_displacement() 368 * mod = 00, r/m = 101 - rip-relative addressing, displacement insn_get_displacement() 371 mod = X86_MODRM_MOD(insn->modrm.value); insn_get_displacement() 374 if (mod == 3) insn_get_displacement() 376 if (mod == 1) { insn_get_displacement() 380 if ((mod == 0 && rm == 6) || mod == 2) { insn_get_displacement() 386 if ((mod == 0 && rm == 5) || mod == 2 || insn_get_displacement() 387 (mod == 0 && base == 5)) { insn_get_displacement()
|
/linux-4.1.27/scripts/ |
H A D | export_report.pl | 7 # Usage: export_report.pl -k Module.symvers [-o report_file ] -f *.mod.c 28 for my $mod (sort keys %$href) { 29 my $list = $href->{$mod}; 30 print "\t$mod:\n"; 43 "\t-f: treat all the non-option argument as .mod.c files. ", 54 while (<.tmp_versions/*.mod>) { 57 grep s/\.ko/.mod.c/, # change the suffix 179 $thismod =~ s/\.mod\.c/.ko/;
|
H A D | Makefile | 36 subdir-y += mod
|
H A D | tags.sh | 16 # tags and cscope files should also ignore MODVERSION *.mod.c files 17 ignore="$ignore ( -name *.mod.c ) -prune -o"
|
/linux-4.1.27/arch/parisc/kernel/ |
H A D | inventory.c | 214 dev->mod0 = pa_pdc_cell->mod[0]; pat_query_module() 226 pa_pdc_cell->mod[0]); pat_query_module() 232 pa_pdc_cell->mod[0], pa_pdc_cell->mod[1], pat_query_module() 233 pa_pdc_cell->mod[2]); pat_query_module() 253 printk(KERN_DEBUG "ranges %ld\n", pa_pdc_cell->mod[1]); pat_query_module() 254 for (i = 0; i < pa_pdc_cell->mod[1]; i++) { pat_query_module() 257 i, pa_pdc_cell->mod[2 + i * 3], /* type */ pat_query_module() 258 pa_pdc_cell->mod[3 + i * 3], /* start */ pat_query_module() 259 pa_pdc_cell->mod[4 + i * 3]); /* finish (ie end) */ pat_query_module() 262 i, io_pdc_cell->mod[2 + i * 3], /* type */ pat_query_module() 263 io_pdc_cell->mod[3 + i * 3], /* start */ pat_query_module() 264 io_pdc_cell->mod[4 + i * 3]); /* finish (ie end) */ pat_query_module() 456 * mod to get the HPA for the top-level devices. Bus adapters may have 462 int mod; snake_inventory() local 463 for (mod = 0; mod < 16; mod++) { snake_inventory() 470 module_path.path.mod = mod; snake_inventory() 476 module_path.path.bc[4] = mod; snake_inventory() 480 module_path.path.mod = func; snake_inventory()
|
H A D | drivers.c | 287 * Note that if @node is a parisc device, we don't fill in the 'mod' field. 288 * This is because both callers pass the parent and fill in the mod 299 path->mod = PCI_FUNC(devfn); get_node_path() 323 output += sprintf(output, "%u", (unsigned char) path->mod); print_hwpath() 341 path.mod = dev->hw_path; print_pa_hwpath() 471 return alloc_tree_node(parent, modpath->mod); create_parisc_device() 648 (modpath->mod == PCI_FUNC(devfn))); match_pci_device() 667 char id = (index == 6) ? modpath->mod : modpath->bc[index]; match_parisc_device() 762 path->mod = padev->hw_path; device_to_hwpath() 836 path.mod = i; walk_native_bus()
|
/linux-4.1.27/drivers/gpu/drm/armada/ |
H A D | armada_fb.h | 15 uint8_t mod; member in struct:armada_framebuffer
|
H A D | armada_fb.c | 45 #define FMT(drm, fmt, mod) \ armada_framebuffer_create() 48 config = mod; \ armada_framebuffer_create() 81 dfb->mod = config; armada_framebuffer_create()
|
/linux-4.1.27/arch/sparc/include/asm/ |
H A D | upa.h | 17 #define UPA_PORTID_ECCVALID 0x0000000400000000 /* Zero if mod can generate ECC */ 18 #define UPA_PORTID_ONEREAD 0x0000000200000000 /* Set if mod generates P_RASB */ 20 #define UPA_PORTID_PREQDQ 0x000000007e000000 /* slave-wr's to mod supported */ 22 #define UPA_PORTID_UPACAP 0x00000000001f0000 /* UPA capabilities of mod */
|
/linux-4.1.27/arch/cris/include/arch-v32/mach-fs/mach/hwregs/asm/ |
H A D | reg_map_asm.h | 6 * file: ../../mod/fakereg.rmap 12 * file: ../../mod/modreg.rmap 16 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/reg_map_asm.h -base 0xb0000000 ../../rtl/global.rmap ../../mod/modreg.rmap ../../inst/memarb/rtl/guinness/marb_top.r ../../mod/fakereg.rmap
|
/linux-4.1.27/arch/m68k/include/asm/ |
H A D | module.h | 38 extern void module_fixup(struct module *mod, struct m68k_fixup_info *start,
|
/linux-4.1.27/drivers/base/ |
H A D | module.c | 33 void module_add_driver(struct module *mod, struct device_driver *drv) module_add_driver() argument 42 if (mod) module_add_driver() 43 mk = &mod->mkobj; module_add_driver()
|
H A D | base.h | 138 extern void module_add_driver(struct module *mod, struct device_driver *drv); 141 static inline void module_add_driver(struct module *mod, module_add_driver() argument
|
/linux-4.1.27/sound/soc/intel/baytrail/ |
H A D | sst-baytrail-dsp.c | 69 struct sst_module *mod; sst_byt_parse_module() local 77 mod = sst_module_new(fw, &template, NULL); sst_byt_parse_module() 78 if (mod == NULL) sst_byt_parse_module() 92 mod->offset = block->ram_offset + sst_byt_parse_module() 94 mod->type = SST_MEM_IRAM; sst_byt_parse_module() 97 mod->offset = block->ram_offset + sst_byt_parse_module() 99 mod->type = SST_MEM_DRAM; sst_byt_parse_module() 102 mod->offset = block->ram_offset + sst_byt_parse_module() 104 mod->type = SST_MEM_CACHE; sst_byt_parse_module() 112 mod->size = block->size; sst_byt_parse_module() 113 mod->data = (void *)block + sizeof(*block); sst_byt_parse_module() 115 sst_module_alloc_blocks(mod); sst_byt_parse_module()
|
/linux-4.1.27/arch/nios2/kernel/ |
H A D | module.c | 46 struct module *mod) apply_relocate_add() 82 mod->name); apply_relocate_add() 92 mod->name); apply_relocate_add() 97 mod->name); apply_relocate_add() 125 mod->name, ELF32_R_TYPE(rela[i].r_info)); apply_relocate_add() 44 apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex, unsigned int relsec, struct module *mod) apply_relocate_add() argument
|
/linux-4.1.27/arch/m68k/kernel/ |
H A D | module.c | 104 struct module *mod) module_finalize() 106 module_fixup(mod, mod->arch.fixup_start, mod->arch.fixup_end); module_finalize() 112 void module_fixup(struct module *mod, struct m68k_fixup_info *start, module_fixup() argument 102 module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *mod) module_finalize() argument
|
/linux-4.1.27/tools/perf/arch/powerpc/util/ |
H A D | skip-callchain-idx.c | 93 static Dwarf_Frame *get_eh_frame(Dwfl_Module *mod, Dwarf_Addr pc) get_eh_frame() argument 100 cfi = dwfl_module_eh_cfi(mod, &bias); get_eh_frame() 118 static Dwarf_Frame *get_dwarf_frame(Dwfl_Module *mod, Dwarf_Addr pc) get_dwarf_frame() argument 125 cfi = dwfl_module_dwarf_cfi(mod, &bias); get_dwarf_frame() 152 Dwfl_Module *mod; check_return_addr() local 169 mod = dwfl_report_elf(dwfl, exec_file, exec_file, -1, check_return_addr() 171 if (!mod) { check_return_addr() 185 mod = dwfl_addrmodule(dwfl, pc); check_return_addr() 186 if (!mod) { check_return_addr() 195 frame = get_eh_frame(mod, pc); check_return_addr() 197 frame = get_dwarf_frame(mod, pc); check_return_addr()
|
/linux-4.1.27/drivers/staging/lustre/lustre/mdc/ |
H A D | mdc_request.c | 669 struct md_open_data *mod = req->rq_cb_data; mdc_replay_open() local 675 if (mod == NULL) { mdc_replay_open() 684 och = mod->mod_och; mdc_replay_open() 696 close_req = mod->mod_close_req; mdc_replay_open() 715 struct md_open_data *mod = req->rq_cb_data; mdc_commit_open() local 717 if (mod == NULL) mdc_commit_open() 722 * \var mod and will zero references to each other, \var mod will be mdc_commit_open() 732 * be put along with freeing \var mod. mdc_commit_open() 739 obd_mod_put(mod); mdc_commit_open() 746 struct md_open_data *mod; mdc_set_open_replay_data() local 764 mod = obd_mod_alloc(); mdc_set_open_replay_data() 765 if (mod == NULL) { mdc_set_open_replay_data() 772 * Take a reference on \var mod, to be freed on mdc_close(). mdc_set_open_replay_data() 773 * It protects \var mod from being freed on eviction (commit mdc_set_open_replay_data() 777 obd_mod_get(mod); mdc_set_open_replay_data() 778 obd_mod_get(mod); mdc_set_open_replay_data() 781 och->och_mod = mod; mdc_set_open_replay_data() 782 mod->mod_och = och; mdc_set_open_replay_data() 783 mod->mod_is_create = it_disposition(it, DISP_OPEN_CREATE) || mdc_set_open_replay_data() 785 mod->mod_open_req = open_req; mdc_set_open_replay_data() 786 open_req->rq_cb_data = mod; mdc_set_open_replay_data() 805 static void mdc_free_open(struct md_open_data *mod) mdc_free_open() argument 809 if (mod->mod_is_create == 0 && mdc_free_open() 810 imp_connect_disp_stripe(mod->mod_open_req->rq_import)) mdc_free_open() 813 LASSERT(mod->mod_open_req->rq_replay == 0); mdc_free_open() 815 DEBUG_REQ(D_RPCTRACE, mod->mod_open_req, "free open request\n"); mdc_free_open() 817 ptlrpc_request_committed(mod->mod_open_req, committed); mdc_free_open() 818 if (mod->mod_close_req) mdc_free_open() 819 ptlrpc_request_committed(mod->mod_close_req, committed); mdc_free_open() 825 struct md_open_data *mod = och->och_mod; mdc_clear_open_replay_data() local 828 * It is possible to not have \var mod in a case of eviction between mdc_clear_open_replay_data() 831 if (mod == NULL) mdc_clear_open_replay_data() 834 LASSERT(mod != LP_POISON); mdc_clear_open_replay_data() 835 LASSERT(mod->mod_open_req != NULL); mdc_clear_open_replay_data() 836 mdc_free_open(mod); mdc_clear_open_replay_data() 838 mod->mod_och = NULL; mdc_clear_open_replay_data() 840 obd_mod_put(mod); mdc_clear_open_replay_data() 862 struct md_open_data *mod, struct ptlrpc_request **request) mdc_close() 905 if (likely(mod != NULL)) { mdc_close() 906 LASSERTF(mod->mod_open_req != NULL && mdc_close() 907 mod->mod_open_req->rq_type != LI_POISON, mdc_close() 908 "POISONED open %p!\n", mod->mod_open_req); mdc_close() 910 mod->mod_close_req = req; mdc_close() 912 DEBUG_REQ(D_HA, mod->mod_open_req, "matched open"); mdc_close() 915 spin_lock(&mod->mod_open_req->rq_lock); mdc_close() 916 mod->mod_open_req->rq_replay = 0; mdc_close() 917 spin_unlock(&mod->mod_open_req->rq_lock); mdc_close() 957 * server failed before close was sent. Let's check if mod mdc_close() 960 if (mod) { mdc_close() 962 LASSERT(mod->mod_open_req != NULL); mdc_close() 963 if (mod->mod_open_req->rq_committed) mdc_close() 968 if (mod) { mdc_close() 970 mod->mod_close_req = NULL; mdc_close() 971 /* Since now, mod is accessed through open_req only, mdc_close() 972 * thus close req does not keep a reference on mod anymore. */ mdc_close() 973 obd_mod_put(mod); mdc_close() 981 struct md_open_data *mod) mdc_done_writing() 999 if (mod != NULL) { mdc_done_writing() 1000 LASSERTF(mod->mod_open_req != NULL && mdc_done_writing() 1001 mod->mod_open_req->rq_type != LI_POISON, mdc_done_writing() 1002 "POISONED setattr %p!\n", mod->mod_open_req); mdc_done_writing() 1004 mod->mod_close_req = req; mdc_done_writing() 1005 DEBUG_REQ(D_HA, mod->mod_open_req, "matched setattr"); mdc_done_writing() 1008 spin_lock(&mod->mod_open_req->rq_lock); mdc_done_writing() 1009 mod->mod_open_req->rq_replay = 0; mdc_done_writing() 1010 spin_unlock(&mod->mod_open_req->rq_lock); mdc_done_writing() 1024 * Let's check if mod exists and return no error in that case mdc_done_writing() 1026 if (mod) { mdc_done_writing() 1027 LASSERT(mod->mod_open_req != NULL); mdc_done_writing() 1028 if (mod->mod_open_req->rq_committed) mdc_done_writing() 1033 if (mod) { mdc_done_writing() 1035 mod->mod_close_req = NULL; mdc_done_writing() 1036 LASSERT(mod->mod_open_req != NULL); mdc_done_writing() 1037 mdc_free_open(mod); mdc_done_writing() 1039 /* Since now, mod is accessed through setattr req only, mdc_done_writing() 1040 * thus DW req does not keep a reference on mod anymore. */ mdc_done_writing() 1041 obd_mod_put(mod); mdc_done_writing() 861 mdc_close(struct obd_export *exp, struct md_op_data *op_data, struct md_open_data *mod, struct ptlrpc_request **request) mdc_close() argument 980 mdc_done_writing(struct obd_export *exp, struct md_op_data *op_data, struct md_open_data *mod) mdc_done_writing() argument
|
H A D | mdc_reint.c | 105 struct ptlrpc_request **request, struct md_open_data **mod) mdc_setattr() 154 if (mod && (op_data->op_flags & MF_EPOCH_OPEN) && mdc_setattr() 156 LASSERT(*mod == NULL); mdc_setattr() 158 *mod = obd_mod_alloc(); mdc_setattr() 159 if (*mod == NULL) { mdc_setattr() 163 req->rq_cb_data = *mod; mdc_setattr() 164 (*mod)->mod_open_req = req; mdc_setattr() 166 (*mod)->mod_is_create = true; mdc_setattr() 168 * Take an extra reference on \var mod, it protects \var mdc_setattr() 169 * mod from being freed on eviction (commit callback is mdc_setattr() 173 obd_mod_get(*mod); mdc_setattr() 199 /* Put an extra reference on \var mod on error case. */ mdc_setattr() 200 if (mod != NULL && *mod != NULL) mdc_setattr() 201 obd_mod_put(*mod); mdc_setattr() 103 mdc_setattr(struct obd_export *exp, struct md_op_data *op_data, void *ea, int ealen, void *ea2, int ea2len, struct ptlrpc_request **request, struct md_open_data **mod) mdc_setattr() argument
|
/linux-4.1.27/net/bluetooth/ |
H A D | ecc.c | 330 /* Computes result = (left + right) % mod. 331 * Assumes that left < mod and right < mod, result != mod. 334 const u64 *mod) vli_mod_add() 340 /* result > mod (result = mod + remainder), so subtract mod to vli_mod_add() 343 if (carry || vli_cmp(result, mod) >= 0) vli_mod_add() 344 vli_sub(result, result, mod); vli_mod_add() 347 /* Computes result = (left - right) % mod. 348 * Assumes that left < mod and right < mod, result != mod. 351 const u64 *mod) vli_mod_sub() 357 * result + mod (with overflow). vli_mod_sub() 360 vli_add(result, result, mod); vli_mod_sub() 459 /* Computes result = (1 / p_input) % mod. All VLIs are the same size. 463 static void vli_mod_inv(u64 *result, const u64 *input, const u64 *mod) vli_mod_inv() argument 476 vli_set(b, mod); vli_mod_inv() 488 carry = vli_add(u, u, mod); vli_mod_inv() 497 carry = vli_add(v, v, mod); vli_mod_inv() 507 vli_add(u, u, mod); vli_mod_inv() 511 carry = vli_add(u, u, mod); vli_mod_inv() 521 vli_add(v, v, mod); vli_mod_inv() 525 carry = vli_add(v, v, mod); vli_mod_inv() 333 vli_mod_add(u64 *result, const u64 *left, const u64 *right, const u64 *mod) vli_mod_add() argument 350 vli_mod_sub(u64 *result, const u64 *left, const u64 *right, const u64 *mod) vli_mod_sub() argument
|
/linux-4.1.27/include/linux/iio/imu/ |
H A D | adis.h | 202 #define ADIS_MOD_CHAN(_type, mod, addr, si, info_sep, info_all, bits) { \ 205 .channel2 = IIO_MOD_ ## mod, \ 220 #define ADIS_ACCEL_CHAN(mod, addr, si, info_sep, info_all, bits) \ 221 ADIS_MOD_CHAN(IIO_ACCEL, mod, addr, si, info_sep, info_all, bits) 223 #define ADIS_GYRO_CHAN(mod, addr, si, info_sep, info_all, bits) \ 224 ADIS_MOD_CHAN(IIO_ANGL_VEL, mod, addr, si, info_sep, info_all, bits) 226 #define ADIS_INCLI_CHAN(mod, addr, si, info_sep, info_all, bits) \ 227 ADIS_MOD_CHAN(IIO_INCLI, mod, addr, si, info_sep, info_all, bits) 229 #define ADIS_ROT_CHAN(mod, addr, si, info_sep, info_all, bits) \ 230 ADIS_MOD_CHAN(IIO_ROT, mod, addr, si, info_sep, info_all, bits)
|
/linux-4.1.27/arch/xtensa/kernel/ |
H A D | module.c | 53 struct module *mod) apply_relocate_add() 93 mod->name, relsec, i, apply_relocate_add() 117 mod->name, relsec, i, apply_relocate_add() 160 mod->name, apply_relocate_add() 180 mod->name, apply_relocate_add() 186 mod->name, apply_relocate_add() 49 apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex, unsigned int relsec, struct module *mod) apply_relocate_add() argument
|
/linux-4.1.27/tools/perf/util/ |
H A D | unwind-libdw.c | 26 Dwfl_Module *mod; __report_module() local 39 mod = dwfl_addrmodule(ui->dwfl, ip); __report_module() 40 if (!mod) __report_module() 41 mod = dwfl_report_elf(ui->dwfl, dso->short_name, __report_module() 45 return mod && dwfl_addrmodule(ui->dwfl, ip) == mod ? 0 : -1; __report_module()
|
H A D | trace-event-parse.c | 146 char *mod; parse_proc_kallsyms() local 151 mod = NULL; parse_proc_kallsyms() 157 mod = strtok_r(NULL, "]", &fmt); parse_proc_kallsyms() 159 if (mod) parse_proc_kallsyms() 160 mod = mod + 1; parse_proc_kallsyms() 162 pevent_register_function(pevent, func, addr, mod); parse_proc_kallsyms()
|
H A D | probe-finder.h | 28 Dwfl_Module *mod; member in struct:debuginfo 87 Dwfl_Module *mod; /* For solving symbols */ member in struct:trace_event_finder 95 Dwfl_Module *mod; /* For solving symbols */ member in struct:available_var_finder
|
H A D | parse-events.c | 719 static int get_event_modifier(struct event_modifier *mod, char *str, get_event_modifier() argument 735 memset(mod, 0, sizeof(*mod)); get_event_modifier() 788 mod->eu = eu; get_event_modifier() 789 mod->ek = ek; get_event_modifier() 790 mod->eh = eh; get_event_modifier() 791 mod->eH = eH; get_event_modifier() 792 mod->eG = eG; get_event_modifier() 793 mod->eI = eI; get_event_modifier() 794 mod->precise = precise; get_event_modifier() 795 mod->exclude_GH = exclude_GH; get_event_modifier() 796 mod->sample_read = sample_read; get_event_modifier() 797 mod->pinned = pinned; get_event_modifier() 826 struct event_modifier mod; parse_events__modifier_event() local 834 if (!add && get_event_modifier(&mod, str, NULL)) parse_events__modifier_event() 838 if (add && get_event_modifier(&mod, str, evsel)) __evlist__for_each() 841 evsel->attr.exclude_user = mod.eu; __evlist__for_each() 842 evsel->attr.exclude_kernel = mod.ek; __evlist__for_each() 843 evsel->attr.exclude_hv = mod.eh; __evlist__for_each() 844 evsel->attr.precise_ip = mod.precise; __evlist__for_each() 845 evsel->attr.exclude_host = mod.eH; __evlist__for_each() 846 evsel->attr.exclude_guest = mod.eG; __evlist__for_each() 847 evsel->attr.exclude_idle = mod.eI; __evlist__for_each() 848 evsel->exclude_GH = mod.exclude_GH; __evlist__for_each() 849 evsel->sample_read = mod.sample_read; __evlist__for_each() 852 evsel->attr.pinned = mod.pinned; __evlist__for_each()
|
H A D | probe-finder.c | 73 dbg->mod = dwfl_report_offline(dbg->dwfl, "", "", fd); debuginfo__init_offline_dwarf() 74 if (!dbg->mod) debuginfo__init_offline_dwarf() 77 dbg->dbg = dwfl_module_getdwarf(dbg->mod, &dbg->bias); debuginfo__init_offline_dwarf() 595 static int convert_to_trace_point(Dwarf_Die *sp_die, Dwfl_Module *mod, convert_to_trace_point() argument 623 symbol = dwfl_module_addrsym(mod, paddr, &sym, NULL); convert_to_trace_point() 1174 ret = convert_to_trace_point(&pf->sp_die, tf->mod, pf->addr, add_probe_trace_event() 1220 .mod = dbg->mod, .max_tevs = max_tevs}; debuginfo__find_trace_events() 1289 ret = convert_to_trace_point(&pf->sp_die, af->mod, pf->addr, add_available_vars() 1332 .mod = dbg->mod, debuginfo__find_available_vars_at()
|
/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/engine/gr/ |
H A D | ctxnv40.h | 77 _cp_bra(struct nvkm_grctx *ctx, u32 mod, int flag, int state, int name) _cp_bra() argument 81 if (mod != 2) { _cp_bra() 87 cp_out(ctx, CP_BRA | (mod << 18) | ip | flag | _cp_bra()
|
/linux-4.1.27/arch/x86/mm/ |
H A D | Makefile | 27 mmiotrace-y := kmmio.o pf_in.o mmio-mod.o
|
H A D | pf_in.c | 219 * Define register ident in mod/rm byte. 468 unsigned char mod; get_ins_imm_val() local 486 mod = mod_rm >> 6; get_ins_imm_val() 488 switch (mod) { get_ins_imm_val()
|
/linux-4.1.27/lib/mpi/ |
H A D | mpi-pow.c | 34 * RES = BASE ^ EXP mod MOD 36 int mpi_powm(MPI res, MPI base, MPI exp, MPI mod) mpi_powm() argument 53 msize = mod->nlimbs; mpi_powm() 56 msign = mod->sign; mpi_powm() 65 /* Exponent is zero, result is 1 mod MOD, i.e., 1 or 0 mpi_powm() 68 res->nlimbs = (msize == 1 && mod->d[0] == 1) ? 0 : 1; mpi_powm() 80 mod_shift_cnt = count_leading_zeros(mod->d[msize - 1]); mpi_powm() 82 mpihelp_lshift(mp, mod->d, msize, mod_shift_cnt); mpi_powm() 84 MPN_COPY(mp, mod->d, msize); mpi_powm()
|
/linux-4.1.27/drivers/scsi/bfa/ |
H A D | bfa_svc.c | 449 claim_fcxps_mem(struct bfa_fcxp_mod_s *mod) claim_fcxps_mem() argument 454 fcxp = (struct bfa_fcxp_s *) bfa_mem_kva_curp(mod); claim_fcxps_mem() 455 memset(fcxp, 0, sizeof(struct bfa_fcxp_s) * mod->num_fcxps); claim_fcxps_mem() 457 INIT_LIST_HEAD(&mod->fcxp_req_free_q); claim_fcxps_mem() 458 INIT_LIST_HEAD(&mod->fcxp_rsp_free_q); claim_fcxps_mem() 459 INIT_LIST_HEAD(&mod->fcxp_active_q); claim_fcxps_mem() 460 INIT_LIST_HEAD(&mod->fcxp_req_unused_q); claim_fcxps_mem() 461 INIT_LIST_HEAD(&mod->fcxp_rsp_unused_q); claim_fcxps_mem() 463 mod->fcxp_list = fcxp; claim_fcxps_mem() 465 for (i = 0; i < mod->num_fcxps; i++) { claim_fcxps_mem() 466 fcxp->fcxp_mod = mod; claim_fcxps_mem() 469 if (i < (mod->num_fcxps / 2)) { claim_fcxps_mem() 470 list_add_tail(&fcxp->qe, &mod->fcxp_req_free_q); claim_fcxps_mem() 473 list_add_tail(&fcxp->qe, &mod->fcxp_rsp_free_q); claim_fcxps_mem() 483 bfa_mem_kva_curp(mod) = (void *)fcxp; claim_fcxps_mem() 528 struct bfa_fcxp_mod_s *mod = BFA_FCXP_MOD(bfa); bfa_fcxp_attach() local 530 mod->bfa = bfa; bfa_fcxp_attach() 531 mod->num_fcxps = cfg->fwcfg.num_fcxp_reqs; bfa_fcxp_attach() 536 mod->req_pld_sz = mod->rsp_pld_sz = BFA_FCXP_MAX_IBUF_SZ; bfa_fcxp_attach() 538 mod->rsp_pld_sz = BFA_FCXP_MAX_LBUF_SZ; bfa_fcxp_attach() 540 INIT_LIST_HEAD(&mod->req_wait_q); bfa_fcxp_attach() 541 INIT_LIST_HEAD(&mod->rsp_wait_q); bfa_fcxp_attach() 543 claim_fcxps_mem(mod); bfa_fcxp_attach() 564 struct bfa_fcxp_mod_s *mod = BFA_FCXP_MOD(bfa); bfa_fcxp_iocdisable() local 569 list_splice_tail_init(&mod->fcxp_req_unused_q, &mod->fcxp_req_free_q); bfa_fcxp_iocdisable() 570 list_splice_tail_init(&mod->fcxp_rsp_unused_q, &mod->fcxp_rsp_free_q); bfa_fcxp_iocdisable() 572 list_for_each_safe(qe, qen, &mod->fcxp_active_q) { bfa_fcxp_iocdisable() 670 struct bfa_fcxp_mod_s *mod = fcxp->fcxp_mod; bfa_fcxp_put() local 674 bfa_q_deq(&mod->req_wait_q, &wqe); bfa_fcxp_put() 676 bfa_q_deq(&mod->rsp_wait_q, &wqe); bfa_fcxp_put() 679 bfa_trc(mod->bfa, fcxp->fcxp_tag); bfa_fcxp_put() 690 WARN_ON(!bfa_q_is_on_q(&mod->fcxp_active_q, fcxp)); bfa_fcxp_put() 694 list_add_tail(&fcxp->qe, &mod->fcxp_req_free_q); bfa_fcxp_put() 696 list_add_tail(&fcxp->qe, &mod->fcxp_rsp_free_q); bfa_fcxp_put() 724 struct bfa_fcxp_mod_s *mod = BFA_FCXP_MOD(bfa); hal_fcxp_send_comp() local 741 fcxp = BFA_FCXP_FROM_TAG(mod, fcxp_tag); hal_fcxp_send_comp() 745 hal_fcxp_rx_plog(mod->bfa, fcxp, fcxp_rsp); hal_fcxp_send_comp() 748 bfa_trc(mod->bfa, (NULL == fcxp->caller)); hal_fcxp_send_comp() 977 struct bfa_fcxp_mod_s *mod = fcxp->fcxp_mod; bfa_fcxp_get_reqbuf() local 981 reqbuf = bfa_mem_get_dmabuf_kva(mod, fcxp->fcxp_tag, bfa_fcxp_get_reqbuf() 982 mod->req_pld_sz + mod->rsp_pld_sz); bfa_fcxp_get_reqbuf() 989 struct bfa_fcxp_mod_s *mod = fcxp->fcxp_mod; bfa_fcxp_get_reqbufsz() local 991 return mod->req_pld_sz; bfa_fcxp_get_reqbufsz() 1004 struct bfa_fcxp_mod_s *mod = fcxp->fcxp_mod; bfa_fcxp_get_rspbuf() local 1009 fcxp_buf = bfa_mem_get_dmabuf_kva(mod, fcxp->fcxp_tag, bfa_fcxp_get_rspbuf() 1010 mod->req_pld_sz + mod->rsp_pld_sz); bfa_fcxp_get_rspbuf() 1013 return ((u8 *) fcxp_buf) + mod->req_pld_sz; bfa_fcxp_get_rspbuf() 1026 struct bfa_fcxp_mod_s *mod = fcxp->fcxp_mod; bfa_fcxp_free() local 1029 bfa_trc(mod->bfa, fcxp->fcxp_tag); bfa_fcxp_free() 1120 struct bfa_fcxp_mod_s *mod = BFA_FCXP_MOD(bfa); bfa_fcxp_req_rsp_alloc_wait() local 1123 WARN_ON(!list_empty(&mod->fcxp_req_free_q)); bfa_fcxp_req_rsp_alloc_wait() 1125 WARN_ON(!list_empty(&mod->fcxp_rsp_free_q)); bfa_fcxp_req_rsp_alloc_wait() 1139 list_add_tail(&wqe->qe, &mod->req_wait_q); bfa_fcxp_req_rsp_alloc_wait() 1141 list_add_tail(&wqe->qe, &mod->rsp_wait_q); bfa_fcxp_req_rsp_alloc_wait() 1147 struct bfa_fcxp_mod_s *mod = BFA_FCXP_MOD(bfa); bfa_fcxp_walloc_cancel() local 1149 WARN_ON(!bfa_q_is_on_q(&mod->req_wait_q, wqe) || bfa_fcxp_walloc_cancel() 1150 !bfa_q_is_on_q(&mod->rsp_wait_q, wqe)); bfa_fcxp_walloc_cancel() 1188 struct bfa_fcxp_mod_s *mod = BFA_FCXP_MOD(bfa); bfa_fcxp_get_maxrsp() local 1190 return mod->rsp_pld_sz; bfa_fcxp_get_maxrsp() 1196 struct bfa_fcxp_mod_s *mod = BFA_FCXP_MOD(bfa); bfa_fcxp_res_recfg() local 1200 for (i = 0; i < (mod->num_fcxps - num_fcxp_fw); i++) { bfa_fcxp_res_recfg() 1201 if (i < ((mod->num_fcxps - num_fcxp_fw) / 2)) { bfa_fcxp_res_recfg() 1202 bfa_q_deq_tail(&mod->fcxp_req_free_q, &qe); bfa_fcxp_res_recfg() 1203 list_add_tail(qe, &mod->fcxp_req_unused_q); bfa_fcxp_res_recfg() 1205 bfa_q_deq_tail(&mod->fcxp_rsp_free_q, &qe); bfa_fcxp_res_recfg() 1206 list_add_tail(qe, &mod->fcxp_rsp_unused_q); bfa_fcxp_res_recfg() 1533 struct bfa_lps_mod_s *mod = BFA_LPS_MOD(bfa); bfa_lps_attach() local 1537 mod->num_lps = BFA_LPS_MAX_LPORTS; bfa_lps_attach() 1539 mod->num_lps = BFA_LPS_MIN_LPORTS; bfa_lps_attach() 1541 mod->num_lps = BFA_LPS_MAX_LPORTS; bfa_lps_attach() 1542 mod->lps_arr = lps = (struct bfa_lps_s *) bfa_mem_kva_curp(mod); bfa_lps_attach() 1544 bfa_mem_kva_curp(mod) += mod->num_lps * sizeof(struct bfa_lps_s); bfa_lps_attach() 1546 INIT_LIST_HEAD(&mod->lps_free_q); bfa_lps_attach() 1547 INIT_LIST_HEAD(&mod->lps_active_q); bfa_lps_attach() 1548 INIT_LIST_HEAD(&mod->lps_login_q); bfa_lps_attach() 1550 for (i = 0; i < mod->num_lps; i++, lps++) { bfa_lps_attach() 1555 list_add_tail(&lps->qe, &mod->lps_free_q); bfa_lps_attach() 1580 struct bfa_lps_mod_s *mod = BFA_LPS_MOD(bfa); bfa_lps_iocdisable() local 1584 list_for_each_safe(qe, qen, &mod->lps_active_q) { bfa_lps_iocdisable() 1588 list_for_each_safe(qe, qen, &mod->lps_login_q) { bfa_lps_iocdisable() 1592 list_splice_tail_init(&mod->lps_login_q, &mod->lps_active_q); bfa_lps_iocdisable() 1601 struct bfa_lps_mod_s *mod = BFA_LPS_MOD(bfa); bfa_lps_login_rsp() local 1604 WARN_ON(rsp->bfa_tag >= mod->num_lps); bfa_lps_login_rsp() 1605 lps = BFA_LPS_FROM_TAG(mod, rsp->bfa_tag); bfa_lps_login_rsp() 1647 list_add_tail(&lps->qe, &mod->lps_active_q); bfa_lps_login_rsp() 1655 struct bfa_lps_mod_s *mod = BFA_LPS_MOD(bfa); bfa_lps_no_res() local 1669 list_add_tail(&lps->qe, &mod->lps_active_q); bfa_lps_no_res() 1682 struct bfa_lps_mod_s *mod = BFA_LPS_MOD(bfa); bfa_lps_logout_rsp() local 1685 WARN_ON(rsp->bfa_tag >= mod->num_lps); bfa_lps_logout_rsp() 1686 lps = BFA_LPS_FROM_TAG(mod, rsp->bfa_tag); bfa_lps_logout_rsp() 1697 struct bfa_lps_mod_s *mod = BFA_LPS_MOD(bfa); bfa_lps_rx_cvl_event() local 1700 lps = BFA_LPS_FROM_TAG(mod, cvl->bfa_tag); bfa_lps_rx_cvl_event() 1722 struct bfa_lps_mod_s *mod = BFA_LPS_MOD(lps->bfa); bfa_lps_free() local 1726 list_add_tail(&lps->qe, &mod->lps_free_q); bfa_lps_free() 1735 struct bfa_lps_mod_s *mod = BFA_LPS_MOD(lps->bfa); bfa_lps_send_login() local 1754 list_add_tail(&lps->qe, &mod->lps_login_q); bfa_lps_send_login() 1917 struct bfa_lps_mod_s *mod = BFA_LPS_MOD(bfa); bfa_lps_alloc() local 1920 bfa_q_deq(&mod->lps_free_q, &lps); bfa_lps_alloc() 1925 list_add_tail(&lps->qe, &mod->lps_active_q); bfa_lps_alloc() 1988 struct bfa_lps_mod_s *mod = BFA_LPS_MOD(bfa); bfa_lps_get_fwtag() local 1990 return BFA_LPS_FROM_TAG(mod, lp_tag)->fw_tag; bfa_lps_get_fwtag() 1999 struct bfa_lps_mod_s *mod = BFA_LPS_MOD(bfa); bfa_lps_get_tag_from_pid() local 2003 for (i = 0, lps = mod->lps_arr; i < mod->num_lps; i++, lps++) { bfa_lps_get_tag_from_pid() 2019 struct bfa_lps_mod_s *mod = BFA_LPS_MOD(bfa); bfa_lps_get_base_pid() local 2021 return BFA_LPS_FROM_TAG(mod, 0)->lp_pid; bfa_lps_get_base_pid() 4906 struct bfa_rport_mod_s *mod = BFA_RPORT_MOD(bfa); bfa_rport_attach() local 4910 INIT_LIST_HEAD(&mod->rp_free_q); bfa_rport_attach() 4911 INIT_LIST_HEAD(&mod->rp_active_q); bfa_rport_attach() 4912 INIT_LIST_HEAD(&mod->rp_unused_q); bfa_rport_attach() 4914 rp = (struct bfa_rport_s *) bfa_mem_kva_curp(mod); bfa_rport_attach() 4915 mod->rps_list = rp; bfa_rport_attach() 4916 mod->num_rports = cfg->fwcfg.num_rports; bfa_rport_attach() 4918 WARN_ON(!mod->num_rports || bfa_rport_attach() 4919 (mod->num_rports & (mod->num_rports - 1))); bfa_rport_attach() 4921 for (i = 0; i < mod->num_rports; i++, rp++) { bfa_rport_attach() 4931 list_add_tail(&rp->qe, &mod->rp_free_q); bfa_rport_attach() 4939 bfa_mem_kva_curp(mod) = (u8 *) rp; bfa_rport_attach() 4960 struct bfa_rport_mod_s *mod = BFA_RPORT_MOD(bfa); bfa_rport_iocdisable() local 4965 list_splice_tail_init(&mod->rp_unused_q, &mod->rp_free_q); bfa_rport_iocdisable() 4967 list_for_each_safe(qe, qen, &mod->rp_active_q) { bfa_rport_iocdisable() 4974 bfa_rport_alloc(struct bfa_rport_mod_s *mod) bfa_rport_alloc() argument 4978 bfa_q_deq(&mod->rp_free_q, &rport); bfa_rport_alloc() 4980 list_add_tail(&rport->qe, &mod->rp_active_q); bfa_rport_alloc() 4988 struct bfa_rport_mod_s *mod = BFA_RPORT_MOD(rport->bfa); bfa_rport_free() local 4990 WARN_ON(!bfa_q_is_on_q(&mod->rp_active_q, rport)); bfa_rport_free() 4992 list_add_tail(&rport->qe, &mod->rp_free_q); bfa_rport_free() 5145 struct bfa_rport_mod_s *mod = BFA_RPORT_MOD(bfa); bfa_rport_res_recfg() local 5149 for (i = 0; i < (mod->num_rports - num_rport_fw); i++) { bfa_rport_res_recfg() 5150 bfa_q_deq_tail(&mod->rp_free_q, &qe); bfa_rport_res_recfg() 5151 list_add_tail(qe, &mod->rp_unused_q); bfa_rport_res_recfg() 5287 struct bfa_sgpg_mod_s *mod = BFA_SGPG_MOD(bfa); bfa_sgpg_attach() local 5300 INIT_LIST_HEAD(&mod->sgpg_q); bfa_sgpg_attach() 5301 INIT_LIST_HEAD(&mod->sgpg_wait_q); bfa_sgpg_attach() 5305 mod->free_sgpgs = mod->num_sgpgs = cfg->drvcfg.num_sgpgs; bfa_sgpg_attach() 5311 hsgpg = (struct bfa_sgpg_s *) bfa_mem_kva_curp(mod); bfa_sgpg_attach() 5313 bfa_mem_dma_seg_iter(mod, seg_ptr, nsegs, idx) { bfa_mem_dma_seg_iter() 5335 list_add_tail(&hsgpg->qe, &mod->sgpg_q); bfa_mem_dma_seg_iter() 5343 bfa_mem_kva_curp(mod) = (u8 *) hsgpg; 5369 struct bfa_sgpg_mod_s *mod = BFA_SGPG_MOD(bfa); bfa_sgpg_malloc() local 5373 if (mod->free_sgpgs < nsgpgs) bfa_sgpg_malloc() 5377 bfa_q_deq(&mod->sgpg_q, &hsgpg); bfa_sgpg_malloc() 5382 mod->free_sgpgs -= nsgpgs; bfa_sgpg_malloc() 5389 struct bfa_sgpg_mod_s *mod = BFA_SGPG_MOD(bfa); bfa_sgpg_mfree() local 5392 mod->free_sgpgs += nsgpg; bfa_sgpg_mfree() 5393 WARN_ON(mod->free_sgpgs > mod->num_sgpgs); bfa_sgpg_mfree() 5395 list_splice_tail_init(sgpg_q, &mod->sgpg_q); bfa_sgpg_mfree() 5397 if (list_empty(&mod->sgpg_wait_q)) bfa_sgpg_mfree() 5404 wqe = bfa_q_first(&mod->sgpg_wait_q); bfa_sgpg_mfree() 5405 if (mod->free_sgpgs < wqe->nsgpg) bfa_sgpg_mfree() 5406 nsgpg = mod->free_sgpgs; bfa_sgpg_mfree() 5415 } while (mod->free_sgpgs && !list_empty(&mod->sgpg_wait_q)); bfa_sgpg_mfree() 5421 struct bfa_sgpg_mod_s *mod = BFA_SGPG_MOD(bfa); bfa_sgpg_wait() local 5424 WARN_ON(nsgpg <= mod->free_sgpgs); bfa_sgpg_wait() 5431 if (mod->free_sgpgs) { bfa_sgpg_wait() 5435 WARN_ON(!list_empty(&mod->sgpg_wait_q)); bfa_sgpg_wait() 5436 list_splice_tail_init(&mod->sgpg_q, &wqe->sgpg_q); bfa_sgpg_wait() 5437 wqe->nsgpg -= mod->free_sgpgs; bfa_sgpg_wait() 5438 mod->free_sgpgs = 0; bfa_sgpg_wait() 5441 list_add_tail(&wqe->qe, &mod->sgpg_wait_q); bfa_sgpg_wait() 5447 struct bfa_sgpg_mod_s *mod = BFA_SGPG_MOD(bfa); bfa_sgpg_wcancel() local 5449 WARN_ON(!bfa_q_is_on_q(&mod->sgpg_wait_q, wqe)); bfa_sgpg_wcancel() 5766 struct bfa_uf_mod_s *mod = BFA_UF_MOD(bfa); bfa_uf_res_recfg() local 5770 for (i = 0; i < (mod->num_ufs - num_uf_fw); i++) { bfa_uf_res_recfg() 5771 bfa_q_deq_tail(&mod->uf_free_q, &qe); bfa_uf_res_recfg() 5772 list_add_tail(qe, &mod->uf_unused_q); bfa_uf_res_recfg()
|
H A D | bfa_fcs.c | 74 struct bfa_fcs_mod_s *mod; bfa_fcs_attach() local 85 mod = &fcs_modules[i]; bfa_fcs_attach() 86 if (mod->attach) bfa_fcs_attach() 87 mod->attach(fcs); bfa_fcs_attach() 98 struct bfa_fcs_mod_s *mod; bfa_fcs_init() local 101 mod = &fcs_modules[i]; bfa_fcs_init() 102 if (mod->modinit) bfa_fcs_init() 103 mod->modinit(fcs); bfa_fcs_init() 182 struct bfa_fcs_mod_s *mod; bfa_fcs_exit() local 191 mod = &fcs_modules[i]; bfa_fcs_exit() 192 if (mod->modexit) { bfa_fcs_exit() 194 mod->modexit(fcs); bfa_fcs_exit()
|
/linux-4.1.27/drivers/staging/lustre/lustre/include/ |
H A D | lu_object.h | 1122 #define LU_KEY_INIT(mod, type) \ 1123 static void *mod##_key_init(const struct lu_context *ctx, \ 1136 struct __##mod##__dummy_init {;} /* semicolon catcher */ 1138 #define LU_KEY_FINI(mod, type) \ 1139 static void mod##_key_fini(const struct lu_context *ctx, \ 1146 struct __##mod##__dummy_fini {;} /* semicolon catcher */ 1148 #define LU_KEY_INIT_FINI(mod, type) \ 1149 LU_KEY_INIT(mod, type); \ 1150 LU_KEY_FINI(mod, type) 1152 #define LU_CONTEXT_KEY_DEFINE(mod, tags) \ 1153 struct lu_context_key mod##_thread_key = { \ 1155 .lct_init = mod##_key_init, \ 1156 .lct_fini = mod##_key_fini \ 1177 #define LU_KEY_INIT_GENERIC(mod) \ 1178 static void mod##_key_init_generic(struct lu_context_key *k, ...) \ 1191 #define LU_TYPE_INIT(mod, ...) \ 1192 LU_KEY_INIT_GENERIC(mod) \ 1193 static int mod##_type_init(struct lu_device_type *t) \ 1195 mod##_key_init_generic(__VA_ARGS__, NULL); \ 1198 struct __##mod##_dummy_type_init {;} 1200 #define LU_TYPE_FINI(mod, ...) \ 1201 static void mod##_type_fini(struct lu_device_type *t) \ 1205 struct __##mod##_dummy_type_fini {;} 1207 #define LU_TYPE_START(mod, ...) \ 1208 static void mod##_type_start(struct lu_device_type *t) \ 1212 struct __##mod##_dummy_type_start {;} 1214 #define LU_TYPE_STOP(mod, ...) \ 1215 static void mod##_type_stop(struct lu_device_type *t) \ 1219 struct __##mod##_dummy_type_stop {;} 1223 #define LU_TYPE_INIT_FINI(mod, ...) \ 1224 LU_TYPE_INIT(mod, __VA_ARGS__); \ 1225 LU_TYPE_FINI(mod, __VA_ARGS__); \ 1226 LU_TYPE_START(mod, __VA_ARGS__); \ 1227 LU_TYPE_STOP(mod, __VA_ARGS__)
|
H A D | obd.h | 1302 struct md_open_data **mod); 1407 struct md_open_data *mod; obd_mod_alloc() local 1409 OBD_ALLOC_PTR(mod); obd_mod_alloc() 1410 if (mod == NULL) obd_mod_alloc() 1412 atomic_set(&mod->mod_refcount, 1); obd_mod_alloc() 1413 return mod; obd_mod_alloc() 1416 #define obd_mod_get(mod) atomic_inc(&(mod)->mod_refcount) 1417 #define obd_mod_put(mod) \ 1419 if (atomic_dec_and_test(&(mod)->mod_refcount)) { \ 1420 if ((mod)->mod_open_req) \ 1421 ptlrpc_req_finished((mod)->mod_open_req); \ 1422 OBD_FREE_PTR(mod); \
|
/linux-4.1.27/fs/btrfs/ |
H A D | dir-item.c | 188 * we're searching in, and 'mod' tells us if you plan on deleting the 189 * item (use mod < 0) or changing the options (use mod > 0) 195 int mod) btrfs_lookup_dir_item() 199 int ins_len = mod < 0 ? -1 : 0; btrfs_lookup_dir_item() 200 int cow = mod != 0; btrfs_lookup_dir_item() 277 * we're searching in, and 'mod' tells us if you plan on deleting the 278 * item (use mod < 0) or changing the options (use mod > 0) 288 int mod) btrfs_lookup_dir_index_item() 292 int ins_len = mod < 0 ? -1 : 0; btrfs_lookup_dir_index_item() 293 int cow = mod != 0; btrfs_lookup_dir_index_item() 358 int mod) btrfs_lookup_xattr() 362 int ins_len = mod < 0 ? -1 : 0; btrfs_lookup_xattr() 363 int cow = mod != 0; btrfs_lookup_xattr() 191 btrfs_lookup_dir_item(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, u64 dir, const char *name, int name_len, int mod) btrfs_lookup_dir_item() argument 284 btrfs_lookup_dir_index_item(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, u64 dir, u64 objectid, const char *name, int name_len, int mod) btrfs_lookup_dir_index_item() argument 354 btrfs_lookup_xattr(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, u64 dir, const char *name, u16 name_len, int mod) btrfs_lookup_xattr() argument
|
H A D | inode-item.c | 418 struct btrfs_key *location, int mod) btrfs_lookup_inode() 420 int ins_len = mod < 0 ? -1 : 0; btrfs_lookup_inode() 421 int cow = mod != 0; btrfs_lookup_inode() 416 btrfs_lookup_inode(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, struct btrfs_key *location, int mod) btrfs_lookup_inode() argument
|
/linux-4.1.27/arch/cris/include/arch-v32/arch/hwregs/asm/ |
H A D | irq_nmi_defs_asm.h | 6 * file: ../../mod/irq_nmi.r 10 * by /n/asic/design/tools/rdesc/src/rdes2c -asm --outfile asm/irq_nmi_defs_asm.h ../../mod/irq_nmi.r
|
/linux-4.1.27/drivers/irqchip/ |
H A D | irq-tb10x.c | 57 uint32_t im, mod, pol; tb10x_irq_set_type() local 63 mod = ab_irqctl_readreg(gc, AB_IRQCTL_SRC_MODE) | im; tb10x_irq_set_type() 71 mod ^= im; tb10x_irq_set_type() 76 mod ^= im; tb10x_irq_set_type() 91 ab_irqctl_writereg(gc, AB_IRQCTL_SRC_MODE, mod); tb10x_irq_set_type()
|
/linux-4.1.27/fs/xfs/ |
H A D | xfs_linux.h | 230 __u32 mod; xfs_do_div() local 234 mod = *(__u32 *)a % b; xfs_do_div() 236 return mod; xfs_do_div() 258 /* Side effect free 64 bit mod operation */ xfs_do_mod() 286 __u32 mod; xfs_do_div() local 290 mod = *(__u32 *)a % b; xfs_do_div() 292 return mod; xfs_do_div() 294 mod = do_div(*(__u64 *)a, b); xfs_do_div() 295 return mod; xfs_do_div() 302 /* Side effect free 64 bit mod operation */ xfs_do_mod()
|
/linux-4.1.27/arch/x86/crypto/ |
H A D | aesni-intel_avx-x86_64.S | 148 # u8 shifted_hkey_1[16] store HashKey <<1 mod poly here 149 # u8 shifted_hkey_2[16] store HashKey^2 <<1 mod poly here 150 # u8 shifted_hkey_3[16] store HashKey^3 <<1 mod poly here 151 # u8 shifted_hkey_4[16] store HashKey^4 <<1 mod poly here 152 # u8 shifted_hkey_5[16] store HashKey^5 <<1 mod poly here 153 # u8 shifted_hkey_6[16] store HashKey^6 <<1 mod poly here 154 # u8 shifted_hkey_7[16] store HashKey^7 <<1 mod poly here 155 # u8 shifted_hkey_8[16] store HashKey^8 <<1 mod poly here 156 # u8 shifted_hkey_1_k[16] store XOR HashKey <<1 mod poly here (for Karatsuba purposes) 157 # u8 shifted_hkey_2_k[16] store XOR HashKey^2 <<1 mod poly here (for Karatsuba purposes) 158 # u8 shifted_hkey_3_k[16] store XOR HashKey^3 <<1 mod poly here (for Karatsuba purposes) 159 # u8 shifted_hkey_4_k[16] store XOR HashKey^4 <<1 mod poly here (for Karatsuba purposes) 160 # u8 shifted_hkey_5_k[16] store XOR HashKey^5 <<1 mod poly here (for Karatsuba purposes) 161 # u8 shifted_hkey_6_k[16] store XOR HashKey^6 <<1 mod poly here (for Karatsuba purposes) 162 # u8 shifted_hkey_7_k[16] store XOR HashKey^7 <<1 mod poly here (for Karatsuba purposes) 163 # u8 shifted_hkey_8_k[16] store XOR HashKey^8 <<1 mod poly here (for Karatsuba purposes) 166 HashKey = 16*11 # store HashKey <<1 mod poly here 167 HashKey_2 = 16*12 # store HashKey^2 <<1 mod poly here 168 HashKey_3 = 16*13 # store HashKey^3 <<1 mod poly here 169 HashKey_4 = 16*14 # store HashKey^4 <<1 mod poly here 170 HashKey_5 = 16*15 # store HashKey^5 <<1 mod poly here 171 HashKey_6 = 16*16 # store HashKey^6 <<1 mod poly here 172 HashKey_7 = 16*17 # store HashKey^7 <<1 mod poly here 173 HashKey_8 = 16*18 # store HashKey^8 <<1 mod poly here 174 HashKey_k = 16*19 # store XOR of HashKey <<1 mod poly here (for Karatsuba purposes) 175 HashKey_2_k = 16*20 # store XOR of HashKey^2 <<1 mod poly here (for Karatsuba purposes) 176 HashKey_3_k = 16*21 # store XOR of HashKey^3 <<1 mod poly here (for Karatsuba purposes) 177 HashKey_4_k = 16*22 # store XOR of HashKey^4 <<1 mod poly here (for Karatsuba purposes) 178 HashKey_5_k = 16*23 # store XOR of HashKey^5 <<1 mod poly here (for Karatsuba purposes) 179 HashKey_6_k = 16*24 # store XOR of HashKey^6 <<1 mod poly here (for Karatsuba purposes) 180 HashKey_7_k = 16*25 # store XOR of HashKey^7 <<1 mod poly here (for Karatsuba purposes) 181 HashKey_8_k = 16*26 # store XOR of HashKey^8 <<1 mod poly here (for Karatsuba purposes) 245 # GHASH_MUL MACRO to implement: Data*HashKey mod (128,127,126,121,0) 247 # Output: C = A*B*x mod poly, (i.e. >>1 ) 248 # To compute GH = GH*HashKey mod poly, give HK = HashKey<<1 mod poly as input 249 # GH = GH * HK * x mod poly which is equivalent to GH*HashKey mod poly. 306 GHASH_MUL_AVX \T5, \HK, \T1, \T3, \T4, \T6, \T2 # T5 = HashKey^2<<1 mod poly 307 vmovdqa \T5, HashKey_2(arg1) # [HashKey_2] = HashKey^2<<1 mod poly 312 GHASH_MUL_AVX \T5, \HK, \T1, \T3, \T4, \T6, \T2 # T5 = HashKey^3<<1 mod poly 318 GHASH_MUL_AVX \T5, \HK, \T1, \T3, \T4, \T6, \T2 # T5 = HashKey^4<<1 mod poly 324 GHASH_MUL_AVX \T5, \HK, \T1, \T3, \T4, \T6, \T2 # T5 = HashKey^5<<1 mod poly 330 GHASH_MUL_AVX \T5, \HK, \T1, \T3, \T4, \T6, \T2 # T5 = HashKey^6<<1 mod poly 336 GHASH_MUL_AVX \T5, \HK, \T1, \T3, \T4, \T6, \T2 # T5 = HashKey^7<<1 mod poly 342 GHASH_MUL_AVX \T5, \HK, \T1, \T3, \T4, \T6, \T2 # T5 = HashKey^8<<1 mod poly 352 ## num_initial_blocks = b mod 4# 1167 and $-16, %r13 # r13 = r13 - (r13 mod 16) 1281 and $15, %r13 # r13 = (arg4 mod 16) 1299 # number of bytes in plaintext mod 16) 1307 and $15, %r13 # r13 = (arg4 mod 16) 1322 # number of bytes in plaintext mod 16) 1464 ############### PRECOMPUTATION of HashKey<<1 mod poly from the HashKey 1476 vpxor %xmm2, %xmm6, %xmm6 # xmm6 holds the HashKey<<1 mod poly 1478 vmovdqa %xmm6, HashKey(arg1) # store HashKey<<1 mod poly 1537 # GHASH_MUL MACRO to implement: Data*HashKey mod (128,127,126,121,0) 1539 # Output: C = A*B*x mod poly, (i.e. >>1 ) 1540 # To compute GH = GH*HashKey mod poly, give HK = HashKey<<1 mod poly as input 1541 # GH = GH * HK * x mod poly which is equivalent to GH*HashKey mod poly. 1585 GHASH_MUL_AVX2 \T5, \HK, \T1, \T3, \T4, \T6, \T2 # T5 = HashKey^2<<1 mod poly 1586 vmovdqa \T5, HashKey_2(arg1) # [HashKey_2] = HashKey^2<<1 mod poly 1588 GHASH_MUL_AVX2 \T5, \HK, \T1, \T3, \T4, \T6, \T2 # T5 = HashKey^3<<1 mod poly 1591 GHASH_MUL_AVX2 \T5, \HK, \T1, \T3, \T4, \T6, \T2 # T5 = HashKey^4<<1 mod poly 1594 GHASH_MUL_AVX2 \T5, \HK, \T1, \T3, \T4, \T6, \T2 # T5 = HashKey^5<<1 mod poly 1597 GHASH_MUL_AVX2 \T5, \HK, \T1, \T3, \T4, \T6, \T2 # T5 = HashKey^6<<1 mod poly 1600 GHASH_MUL_AVX2 \T5, \HK, \T1, \T3, \T4, \T6, \T2 # T5 = HashKey^7<<1 mod poly 1603 GHASH_MUL_AVX2 \T5, \HK, \T1, \T3, \T4, \T6, \T2 # T5 = HashKey^8<<1 mod poly 1611 ## num_initial_blocks = b mod 4# 2444 and $-16, %r13 # r13 = r13 - (r13 mod 16) 2558 and $15, %r13 # r13 = (arg4 mod 16) 2576 # (r13 is the number of bytes in plaintext mod 16) 2584 and $15, %r13 # r13 = (arg4 mod 16) 2599 # number of bytes in plaintext mod 16) 2740 ############### PRECOMPUTATION of HashKey<<1 mod poly from the HashKey 2752 vpxor %xmm2, %xmm6, %xmm6 # xmm6 holds the HashKey<<1 mod poly 2754 vmovdqa %xmm6, HashKey(arg1) # store HashKey<<1 mod poly
|
H A D | crc32-pclmul_asm.S | 46 * [x4*128+32 mod P(x) << 32)]' << 1 = 0x154442bd4 49 * [(x4*128-32 mod P(x) << 32)]' << 1 = 0x1c6e41596 55 * [(x128+32 mod P(x) << 32)]' << 1 = 0x1751997d0 58 * [(x128-32 mod P(x) << 32)]' << 1 = 0x0ccaa009e 64 * [(x64 mod P(x) << 32)]' << 1 = 0x163cd6124
|
H A D | ghash-clmulni-intel_asm.S | 42 * SHASH: operand2, hash_key << 1 mod poly 44 * DATA: operand1 * operand2 mod poly
|
H A D | aesni-intel_asm.S | 75 #define HashKey 16*0 // store HashKey <<1 mod poly here 76 #define HashKey_2 16*1 // store HashKey^2 <<1 mod poly here 77 #define HashKey_3 16*2 // store HashKey^3 <<1 mod poly here 78 #define HashKey_4 16*3 // store HashKey^4 <<1 mod poly here 80 // bits of HashKey <<1 mod poly here 83 // bits of HashKey^2 <<1 mod poly here 86 // bits of HashKey^3 <<1 mod poly here 89 // bits of HashKey^4 <<1 mod poly here 154 /* GHASH_MUL MACRO to implement: Data*HashKey mod (128,127,126,121,0) 158 * Output: C = A*B*x mod poly, (i.e. >>1 ) 159 * To compute GH = GH*HashKey mod poly, give HK = HashKey<<1 mod poly as input 160 * GH = GH * HK * x mod poly which is equivalent to GH*HashKey mod poly. 217 * num_initial_blocks = b mod 4 357 # TMP5 = HashKey^2<<1 (mod poly) 359 # HashKey_2 = HashKey^2<<1 (mod poly) 371 # TMP5 = HashKey^3<<1 (mod poly) 384 # TMP5 = HashKey^3<<1 (mod poly) 442 * num_initial_blocks = b mod 4 578 # TMP5 = HashKey^2<<1 (mod poly) 580 # HashKey_2 = HashKey^2<<1 (mod poly) 592 # TMP5 = HashKey^3<<1 (mod poly) 605 # TMP5 = HashKey^3<<1 (mod poly) 1299 # Precompute HashKey<<1 (mod poly) from the hash key (required for GHASH) 1314 pxor %xmm2, %xmm13 # %xmm13 holds the HashKey<<1 (mod poly) 1319 movdqa %xmm13, HashKey(%rsp) # store HashKey<<1 (mod poly) 1321 and $-16, %r13 # %r13 = %r13 - (%r13 mod 16) 1362 and $15, %r13 # %r13 = arg4 (mod 16) 1378 # (%r13 is the number of bytes in plaintext mod 16) 1559 # precompute HashKey<<1 mod poly from the HashKey (required for GHASH) 1576 mov %arg4, %r13 # %xmm13 holds HashKey<<1 (mod poly) 1624 and $15, %r13 # %r13 = arg4 (mod 16) 1640 # (%r13 is the number of bytes in plaintext mod 16)
|
H A D | crct10dif-pcl-asm_64.S | 564 # rk1 = 2^(32*3) mod Q << 32 565 # rk2 = 2^(32*5) mod Q << 32 566 # rk3 = 2^(32*15) mod Q << 32 567 # rk4 = 2^(32*17) mod Q << 32 568 # rk5 = 2^(32*3) mod Q << 32 569 # rk6 = 2^(32*2) mod Q << 32
|
/linux-4.1.27/kernel/gcov/ |
H A D | base.c | 129 struct module *mod = data; gcov_module_notifier() local 139 if (within(info, mod->module_core, mod->core_size)) { gcov_module_notifier()
|
/linux-4.1.27/sound/soc/intel/haswell/ |
H A D | sst-haswell-dsp.c | 92 struct sst_module *mod; hsw_parse_module() local 120 mod = sst_module_new(fw, &template, NULL); hsw_parse_module() 121 if (mod == NULL) hsw_parse_module() 131 sst_module_free(mod); hsw_parse_module() 138 mod->offset = hsw_parse_module() 140 mod->type = SST_MEM_IRAM; hsw_parse_module() 145 mod->offset = block->ram_offset; hsw_parse_module() 146 mod->type = SST_MEM_DRAM; hsw_parse_module() 151 sst_module_free(mod); hsw_parse_module() 155 mod->size = block->size; hsw_parse_module() 156 mod->data = (void *)block + sizeof(*block); hsw_parse_module() 157 mod->data_offset = mod->data - fw->dma_buf; hsw_parse_module() 161 count, mod->type, block->size, ram, hsw_parse_module() 164 ret = sst_module_alloc_blocks(mod); hsw_parse_module() 168 sst_module_free(mod); hsw_parse_module() 174 mod->state = SST_MODULE_STATE_LOADED; hsw_parse_module()
|
/linux-4.1.27/drivers/media/platform/vivid/ |
H A D | vivid-radio-common.c | 120 int mod = 16000; vivid_radio_calc_sig_qual() local 122 int sig_qual, sig_qual_tx = mod; vivid_radio_calc_sig_qual() 129 mod /= 10; vivid_radio_calc_sig_qual() 132 sig_qual = (dev->radio_rx_freq + delta) % mod - delta; vivid_radio_calc_sig_qual()
|
/linux-4.1.27/drivers/scsi/sym53c8xx_2/ |
H A D | sym_defs.h | 179 #define SRST 0x40 /* mod: reset chip */ 205 #define FM 0x02 /* mod: fetch pin mode */ 206 #define WRIE 0x01 /* mod: write and invalidate enable */ 213 #define BDIS 0x80 /* mod: burst disable */ 214 #define MPEE 0x08 /* mod: master parity error enable */ 217 #define DFS 0x20 /* mod: dma fifo size */ 233 #define BL_2 0x80 /* mod: burst length shift value +2 */ 234 #define BL_1 0x40 /* mod: burst length shift value +1 */ 235 #define ERL 0x08 /* mod: enable read line */ 236 #define ERMP 0x04 /* mod: enable read multiple */ 237 #define BOF 0x02 /* mod: burst op code fetch */ 243 #define CLSE 0x80 /* mod: cache line size enable */ 245 #define PFEN 0x20 /* mod: pre-fetch enable */ 246 #define SSM 0x10 /* mod: single step mode */ 247 #define IRQM 0x08 /* mod: irq mode (1 = totem pole !) */ 249 #define IRQD 0x02 /* mod: irq disable */
|
/linux-4.1.27/arch/xtensa/lib/ |
H A D | memset.S | 65 .align 4 # 1 mod 4 alignment for LOOPNEZ 66 .byte 0 # (0 mod 4 alignment for LBEG) 134 .byte 0 # 1 mod 4 alignment for LOOPNEZ 135 # (0 mod 4 alignment for LBEG)
|
H A D | usercopy.S | 85 bbsi.l a2, 0, .Ldst1mod2 # if dst is 1 mod 2 86 bbsi.l a2, 1, .Ldst2mod4 # if dst is 2 mod 4 128 .byte 0 # 1 mod 4 alignment for LOOPNEZ 129 # (0 mod 4 alignment for LBEG) 153 .align 4 # 1 mod 4 alignment for LOOPNEZ 154 .byte 0 # (0 mod 4 alignment for LBEG) 214 .byte 0 # 1 mod 4 alignement for LOOPNEZ 215 # (0 mod 4 alignment for LBEG)
|
H A D | strncpy_user.S | 87 .Lsrc2mod4: # src address is 2 mod 4 109 .align 4 # 1 mod 4 alignment for LOOPNEZ 110 .byte 0 # (0 mod 4 alignment for LBEG) 186 .align 4 # 1 mod 4 alignment for LOOPNEZ 187 .byte 0 # (0 mod 4 alignment for LBEG)
|
H A D | memcopy.S | 78 .byte 0 # 1 mod 4 alignment for LOOPNEZ 79 # (0 mod 4 alignment for LBEG) 135 _bbsi.l a2, 0, .Ldst1mod2 # if dst is 1 mod 2 136 _bbsi.l a2, 1, .Ldst2mod4 # if dst is 2 mod 4 137 .Ldstaligned: # return here from .Ldst?mod? once dst is aligned 344 .byte 0 # 1 mod 4 alignment for LOOPNEZ 345 # (0 mod 4 alignment for LBEG) 409 _bbsi.l a5, 0, .Lbackdst1mod2 # if dst is 1 mod 2 410 _bbsi.l a5, 1, .Lbackdst2mod4 # if dst is 2 mod 4 411 .Lbackdstaligned: # return here from .Lbackdst?mod? once dst is aligned
|
/linux-4.1.27/arch/tile/lib/ |
H A D | strlen_32.c | 26 * This expression works because we know shift counts are taken mod 32. strlen()
|
H A D | memchr_32.c | 44 * shift counts are taken mod 32. memchr()
|
H A D | strchr_32.c | 36 * counts are taken mod 32. strchr()
|
H A D | string-endian.h | 16 * The MASK expression works because shift counts are taken mod 64.
|
H A D | memset_32.c | 90 /* Align out32 mod the cache line size so we can use wh64. */ memset()
|
H A D | memset_64.c | 89 /* Align out64 mod the cache line size so we can use wh64. */ memset()
|
/linux-4.1.27/arch/s390/include/asm/ |
H A D | livepatch.h | 28 static inline int klp_write_module_reloc(struct module *mod, unsigned long klp_write_module_reloc() argument
|
/linux-4.1.27/arch/mips/kernel/ |
H A D | vpe.c | 182 static void layout_sections(struct module *mod, const Elf_Ehdr *hdr, layout_sections() argument 208 get_offset((unsigned long *)&mod->core_size, s); layout_sections() 212 mod->core_text_size = mod->core_size; layout_sections() 481 unsigned int nsecs, struct module *mod) simplify_symbols() 537 const char *strtab, struct module *mod) dump_elfsymbols() 552 struct module *mod) find_vpe_symbols() 583 struct module mod; /* so we can re-use the relocations code */ vpe_elfload() local 585 memset(&mod, 0, sizeof(struct module)); vpe_elfload() 586 strcpy(mod.name, "VPE loader"); vpe_elfload() 641 layout_sections(&mod, hdr, sechdrs, secstrings); vpe_elfload() 644 v->load_addr = alloc_progmem(mod.core_size); vpe_elfload() 672 hdr->e_shnum, &mod); vpe_elfload() 689 symindex, i, &mod); vpe_elfload() 692 symindex, i, &mod); vpe_elfload() 734 if ((find_vpe_symbols(v, sechdrs, symindex, strtab, &mod)) < 0) { vpe_elfload() 477 simplify_symbols(Elf_Shdr *sechdrs, unsigned int symindex, const char *strtab, const char *secstrings, unsigned int nsecs, struct module *mod) simplify_symbols() argument 536 dump_elfsymbols(Elf_Shdr *sechdrs, unsigned int symindex, const char *strtab, struct module *mod) dump_elfsymbols() argument 550 find_vpe_symbols(struct vpe *v, Elf_Shdr *sechdrs, unsigned int symindex, const char *strtab, struct module *mod) find_vpe_symbols() argument
|
H A D | cpu-bugs64.c | 31 static inline void align_mod(const int align, const int mod) align_mod() argument 42 : GCC_IMM_ASM() (align), GCC_IMM_ASM() (mod)); align_mod() 46 const int align, const int mod) mult_sh_align_mod() 75 align_mod(align, mod); mult_sh_align_mod() 106 align_mod(align, mod); mult_sh_align_mod() 45 mult_sh_align_mod(long *v1, long *v2, long *w, const int align, const int mod) mult_sh_align_mod() argument
|
H A D | module.c | 293 void module_arch_cleanup(struct module *mod) module_arch_cleanup() argument 296 list_del(&mod->arch.dbe_list); module_arch_cleanup()
|
/linux-4.1.27/arch/cris/include/arch-v32/arch/hwregs/ |
H A D | irq_nmi_defs.h | 6 * file: ../../mod/irq_nmi.r 10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile irq_nmi_defs.h ../../mod/irq_nmi.r
|
H A D | Makefile | 52 REGDESC += $(BASEDIR)/mod/dma_common/rtl/dma_regdes.r 54 REGDESC += $(BASEDIR)/io/bif/mod/extmem/extmem_regs.r 108 extmem_defs.h: $(BASEDIR)/io/bif/mod/extmem/extmem_regs.r 127 reg_map.h: $(DESIGNDIR)/top/rtl/global.rmap $(DESIGNDIR)/top/mod/modreg.rmap 129 reg_map_asm.h: $(DESIGNDIR)/top/rtl/global.rmap $(DESIGNDIR)/top/mod/modreg.rmap
|
H A D | extmem_defs.h | 6 * file: ../../inst/ext_mem/mod/extmem_regs.r 10 * by /n/asic/design/tools/rdesc/src/rdes2c --outfile extmem_defs.h ../../inst/ext_mem/mod/extmem_regs.r
|
/linux-4.1.27/include/crypto/ |
H A D | public_key.h | 62 MPI y; /* DSA public-key value = g^x mod p */ 89 MPI s; /* m^d mod n */
|
/linux-4.1.27/arch/metag/kernel/ |
H A D | module.c | 163 Elf32_Shdr *sechdrs, struct module *mod) do_plt_call() 179 if (location >= mod->module_core do_plt_call() 180 && location < mod->module_core + mod->core_size) do_plt_call() 181 entry = (void *)sechdrs[mod->arch.core_plt_section].sh_addr; do_plt_call() 183 entry = (void *)sechdrs[mod->arch.init_plt_section].sh_addr; do_plt_call() 162 do_plt_call(void *location, Elf32_Addr val, Elf32_Shdr *sechdrs, struct module *mod) do_plt_call() argument
|
H A D | ftrace.c | 96 int ftrace_make_nop(struct module *mod, ftrace_make_nop() argument
|
/linux-4.1.27/drivers/iio/imu/ |
H A D | adis16400_core.c | 487 #define ADIS16400_GYRO_CHAN(mod, addr, bits) { \ 490 .channel2 = IIO_MOD_ ## mod, \ 497 .scan_index = ADIS16400_SCAN_GYRO_ ## mod, \ 507 #define ADIS16400_ACCEL_CHAN(mod, addr, bits) { \ 510 .channel2 = IIO_MOD_ ## mod, \ 517 .scan_index = ADIS16400_SCAN_ACC_ ## mod, \ 527 #define ADIS16400_MAGN_CHAN(mod, addr, bits) { \ 530 .channel2 = IIO_MOD_ ## mod, \ 536 .scan_index = ADIS16400_SCAN_MAGN_ ## mod, \ 550 #define ADIS16400_MOD_TEMP_CHAN(mod, addr, bits) { \ 554 .extend_name = ADIS16400_MOD_TEMP_NAME_ ## mod, \ 562 .scan_index = ADIS16350_SCAN_TEMP_ ## mod, \ 591 #define ADIS16400_INCLI_CHAN(mod, addr, bits) { \ 594 .channel2 = IIO_MOD_ ## mod, \ 599 .scan_index = ADIS16300_SCAN_INCLI_ ## mod, \
|
/linux-4.1.27/sound/mips/ |
H A D | hal2.c | 81 unsigned short mod; /* MOD value */ member in struct:hal2_codec 325 unsigned short mod; hal2_compute_rate() local 328 mod = 4 * 44100 / rate; hal2_compute_rate() 331 mod = 4 * 48000 / rate; hal2_compute_rate() 336 codec->mod = mod; hal2_compute_rate() 337 rate = 4 * codec->master / mod; hal2_compute_rate() 346 int mod = hal2->dac.mod; hal2_set_dac_rate() local 350 ((0xffff & (inc - mod - 1)) << 16) | inc); hal2_set_dac_rate() 357 int mod = hal2->adc.mod; hal2_set_adc_rate() local 361 ((0xffff & (inc - mod - 1)) << 16) | inc); hal2_set_adc_rate()
|
/linux-4.1.27/tools/iio/ |
H A D | iio_event_monitor.c | 107 enum iio_modifier mod = IIO_EVENT_CODE_EXTRACT_MODIFIER(event->id); event_is_known() local 138 switch (mod) { event_is_known() 203 enum iio_modifier mod = IIO_EVENT_CODE_EXTRACT_MODIFIER(event->id); print_event() local 218 if (mod != IIO_NO_MOD) { print_event() 221 iio_modifier_names[mod]); print_event()
|
/linux-4.1.27/arch/hexagon/kernel/ |
H A D | module.c | 38 * @mod - pointer to module 42 struct module *mod) module_frob_arch_sections() 63 mod->name); module_frob_arch_sections() 40 module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, char *secstrings, struct module *mod) module_frob_arch_sections() argument
|
/linux-4.1.27/arch/arm/mach-imx/ |
H A D | hardware.h | 28 #define addr_in_module(addr, mod) \ 29 ((unsigned long)(addr) - mod ## _BASE_ADDR < mod ## _SIZE)
|
/linux-4.1.27/drivers/media/radio/wl128x/ |
H A D | fmdrv_v4l2.c | 431 struct v4l2_modulator *mod) fm_v4l2_vidioc_g_modulator() 435 if (mod->index != 0) fm_v4l2_vidioc_g_modulator() 441 mod->txsubchans = ((fmdev->tx_data.aud_mode == FM_STEREO_MODE) ? fm_v4l2_vidioc_g_modulator() 446 mod->capability = V4L2_TUNER_CAP_STEREO | V4L2_TUNER_CAP_RDS | fm_v4l2_vidioc_g_modulator() 454 const struct v4l2_modulator *mod) fm_v4l2_vidioc_s_modulator() 461 if (mod->index != 0) fm_v4l2_vidioc_s_modulator() 472 aud_mode = (mod->txsubchans & V4L2_TUNER_SUB_STEREO) ? fm_v4l2_vidioc_s_modulator() 474 rds_mode = (mod->txsubchans & V4L2_TUNER_SUB_RDS) ? fm_v4l2_vidioc_s_modulator() 430 fm_v4l2_vidioc_g_modulator(struct file *file, void *priv, struct v4l2_modulator *mod) fm_v4l2_vidioc_g_modulator() argument 453 fm_v4l2_vidioc_s_modulator(struct file *file, void *priv, const struct v4l2_modulator *mod) fm_v4l2_vidioc_s_modulator() argument
|
/linux-4.1.27/arch/sh/kernel/ |
H A D | module.c | 123 void module_arch_cleanup(struct module *mod) module_arch_cleanup() argument 125 module_dwarf_cleanup(mod); module_arch_cleanup()
|
H A D | dwarf.c | 738 unsigned char *end, struct module *mod) dwarf_parse_cie() 858 if (mod != NULL) dwarf_parse_cie() 859 list_add_tail(&cie->link, &mod->arch.cie_list); dwarf_parse_cie() 869 unsigned char *end, struct module *mod) dwarf_parse_fde() 950 if (mod != NULL) dwarf_parse_fde() 951 list_add_tail(&fde->link, &mod->arch.fde_list); dwarf_parse_fde() 1024 * @mod: the kernel module containing the .eh_frame section 1029 struct module *mod) dwarf_parse_section() 1066 err = dwarf_parse_cie(entry, p, len, end, mod); dwarf_parse_section() 1073 end, mod); dwarf_parse_section() 1128 * module_dwarf_cleanup - remove FDE/CIEs associated with @mod 1129 * @mod: the module that is being unloaded 1132 * @mod's .eh_frame section because @mod is being unloaded. 1134 void module_dwarf_cleanup(struct module *mod) module_dwarf_cleanup() argument 1142 list_for_each_entry_safe(cie, ctmp, &mod->arch.cie_list, link) { module_dwarf_cleanup() 1152 list_for_each_entry_safe(fde, ftmp, &mod->arch.fde_list, link) { module_dwarf_cleanup() 737 dwarf_parse_cie(void *entry, void *p, unsigned long len, unsigned char *end, struct module *mod) dwarf_parse_cie() argument 867 dwarf_parse_fde(void *entry, u32 entry_type, void *start, unsigned long len, unsigned char *end, struct module *mod) dwarf_parse_fde() argument 1028 dwarf_parse_section(char *eh_frame_start, char *eh_frame_end, struct module *mod) dwarf_parse_section() argument
|
/linux-4.1.27/include/uapi/linux/ |
H A D | target_core_user.h | 28 * userspace should skip hdr->length bytes (mod cmdr_size) to find the 38 * hdr->length, mod cmdr_size. If cmd_tail doesn't equal cmd_head, it
|
/linux-4.1.27/arch/sh/include/asm/ |
H A D | switch_to_32.h | 28 "ldc.l @r2+, mod\n\t" \ 39 "stc.l mod, @-r2\n\t" \
|
/linux-4.1.27/arch/mips/include/asm/octeon/ |
H A D | cvmx-srxx-defs.h | 131 uint64_t mod:4; member in struct:cvmx_srxx_sw_tick_ctl::cvmx_srxx_sw_tick_ctl_s 137 uint64_t mod:4;
|
/linux-4.1.27/arch/arm/mach-omap2/ |
H A D | prm2xxx.h | 117 #define OMAP24XX_PRCM_IRQSTATUS_DSP 0x00f0 /* IVA mod */ 118 #define OMAP24XX_PRCM_IRQENABLE_DSP 0x00f4 /* IVA mod */
|
/linux-4.1.27/scripts/kconfig/ |
H A D | conf.c | 181 case mod: conf_sym() 190 if (oldval != mod && sym_tristate_within_range(sym, mod)) conf_sym() 210 newval = mod; conf_sym() 249 case mod: conf_choice() 258 case mod: conf_choice() 395 if (sym->curr.tri != mod) conf() 486 printf(" --allmodconfig New config where all options are answered with mod\n"); conf_usage()
|
H A D | symbol.c | 20 .curr = { "m", mod }, 220 if (tri == mod && (sym->type != S_TRISTATE || modules_val == no)) 232 if (tri == mod) 241 if (tri == mod && sym_get_type(sym) == S_BOOLEAN) 402 if (newval.tri == mod && sym_get_type(sym) == S_BOOLEAN) sym_calc_value() 484 if (type == S_BOOLEAN && val == mod) sym_tristate_within_range() 537 newval = mod; sym_toggle_tristate_value() 539 case mod: sym_toggle_tristate_value() 627 return sym_tristate_within_range(sym, mod); sym_string_within_range() 650 return sym_set_tristate_value(sym, mod); sym_set_string_value() 711 /* The visibility may limit the value from yes => mod */ sym_get_string_default() 731 /* transpose mod to yes if modules are not enabled */ sym_get_string_default() 732 if (val == mod) sym_get_string_default() 736 /* transpose mod to yes if type is bool */ sym_get_string_default() 737 if (sym->type == S_BOOLEAN && val == mod) sym_get_string_default() 745 case mod: return "m"; sym_get_string_default() 771 case mod: sym_get_string_value()
|
/linux-4.1.27/drivers/scsi/ |
H A D | ncr53c8xx.h | 699 #define SRST 0x40 /* mod: reset chip */ 726 #define FM 0x02 /* mod: fetch pin mode */ 727 #define WRIE 0x01 /* mod: write and invalidate enable */ 735 #define BDIS 0x80 /* mod: burst disable */ 736 #define MPEE 0x08 /* mod: master parity error enable */ 739 #define DFS 0x20 /* mod: dma fifo size */ 754 #define BL_2 0x80 /* mod: burst length shift value +2 */ 755 #define BL_1 0x40 /* mod: burst length shift value +1 */ 756 #define ERL 0x08 /* mod: enable read line */ 757 #define ERMP 0x04 /* mod: enable read multiple */ 758 #define BOF 0x02 /* mod: burst op code fetch */ 764 #define CLSE 0x80 /* mod: cache line size enable */ 766 #define PFEN 0x20 /* mod: pre-fetch enable */ 767 #define EA 0x20 /* mod: 720 enable-ack */ 768 #define SSM 0x10 /* mod: single step mode */ 769 #define IRQM 0x08 /* mod: irq mode (1 = totem pole !) */ 771 #define IRQD 0x02 /* mod: irq disable */
|
/linux-4.1.27/drivers/s390/cio/ |
H A D | orb.h | 22 u32 mod:1; /* modification control */ member in struct:cmd_orb
|
/linux-4.1.27/arch/x86/include/asm/ |
H A D | livepatch.h | 35 int klp_write_module_reloc(struct module *mod, unsigned long type,
|
H A D | inst.h | 202 .macro MODRM mod opd1 opd2 203 .byte \mod | (\opd1 & 7) | ((\opd2 & 7) << 3)
|
H A D | alternative.h | 61 extern void alternatives_smp_module_add(struct module *mod, char *name, 64 extern void alternatives_smp_module_del(struct module *mod); 69 static inline void alternatives_smp_module_add(struct module *mod, char *name, alternatives_smp_module_add() argument 72 static inline void alternatives_smp_module_del(struct module *mod) {} alternatives_enable_smp() argument
|
/linux-4.1.27/arch/x86/tools/ |
H A D | gen-insn-attr-x86.awk | 235 function convert_operands(count,opnd, i,j,imm,mod) 238 mod = null 251 mod = "INAT_MODRM" 253 return add_flags(imm, mod)
|
/linux-4.1.27/arch/sh/include/uapi/asm/ |
H A D | ptrace_32.h | 73 unsigned long mod; member in struct:pt_dspregs
|
/linux-4.1.27/arch/powerpc/include/asm/ |
H A D | ftrace.h | 56 struct module *mod; member in struct:dyn_arch_ftrace
|
H A D | module.h | 82 int module_trampoline_target(struct module *mod, u32 *trampoline,
|
/linux-4.1.27/samples/livepatch/ |
H A D | livepatch-sample.c | 64 .mod = THIS_MODULE,
|
/linux-4.1.27/drivers/video/console/ |
H A D | bitblit.c | 116 u32 shift_low = 0, mod = vc->vc_font.width % 8; bit_putcs_unaligned() local 132 shift_low, mod); bit_putcs_unaligned() 133 shift_low += mod; bit_putcs_unaligned() 153 u32 mod = vc->vc_font.width % 8, cnt, pitch, size; bit_putcs() local 184 if (!mod) bit_putcs()
|
H A D | fbcon_ccw.c | 30 int mod = vc->vc_font.height % 8; ccw_update_attr() local 33 if (mod) ccw_update_attr() 34 msk <<= (8 - mod); ccw_update_attr() 36 if (offset > mod) ccw_update_attr()
|
H A D | fbcon_ud.c | 125 u32 shift_low = 0, mod = vc->vc_font.width % 8; ud_putcs_unaligned() local 140 shift_low, mod); ud_putcs_unaligned() 141 shift_low += mod; ud_putcs_unaligned() 162 u32 mod = vc->vc_font.width % 8, cnt, pitch, size; ud_putcs() local 200 if (!mod) ud_putcs()
|
/linux-4.1.27/arch/arm/kernel/ |
H A D | module.c | 294 struct module *mod) module_finalize() 335 mod->arch.unwind[i] = module_finalize() 357 module_arch_cleanup(struct module *mod) module_arch_cleanup() argument 363 if (mod->arch.unwind[i]) module_arch_cleanup() 364 unwind_table_del(mod->arch.unwind[i]); module_arch_cleanup() 293 module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *mod) module_finalize() argument
|
/linux-4.1.27/drivers/iio/accel/ |
H A D | mma9553.c | 114 enum iio_modifier mod; member in struct:mma9553_event_info 119 .mod = IIO_NO_MOD, 124 .mod = IIO_MOD_STILL, 129 .mod = IIO_MOD_STILL, 134 .mod = IIO_MOD_WALKING, 139 .mod = IIO_MOD_WALKING, 144 .mod = IIO_MOD_JOGGING, 149 .mod = IIO_MOD_JOGGING, 154 .mod = IIO_MOD_RUNNING, 159 .mod = IIO_MOD_RUNNING, 239 enum iio_modifier mod, mma9553_get_event() 246 data->events[i].info->mod == mod && mma9553_get_event() 1084 ev_prev_activity->info->mod, mma9553_event_handler() 1092 ev_activity->info->mod, mma9553_event_handler() 237 mma9553_get_event(struct mma9553_data *data, enum iio_chan_type type, enum iio_modifier mod, enum iio_event_direction dir) mma9553_get_event() argument
|
/linux-4.1.27/drivers/staging/lustre/lustre/libcfs/ |
H A D | prng.c | 37 * x(n)=a*x(n-1)+carry mod 2^16 and y(n)=b*y(n-1)+carry mod 2^16,
|
/linux-4.1.27/arch/sparc/kernel/ |
H A D | module.c | 57 struct module *mod) module_frob_arch_sections() 66 printk("%s: no symtab found.\n", mod->name); module_frob_arch_sections() 54 module_frob_arch_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, char *secstrings, struct module *mod) module_frob_arch_sections() argument
|
H A D | ftrace.c | 55 int ftrace_make_nop(struct module *mod, struct dyn_ftrace *rec, unsigned long addr) ftrace_make_nop() argument
|
/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/subdev/bios/ |
H A D | M0209.c | 124 u8 mod = bits % 8; nvbios_M0209Sp() local 126 info->data[i] = info->data[i] >> mod; nvbios_M0209Sp()
|
/linux-4.1.27/arch/alpha/lib/ |
H A D | ev6-memcpy.S | 36 and $1, 7, $1 # E : are they the same mod 8? 39 /* source and dest are same mod 8 address */
|
/linux-4.1.27/fs/freevxfs/ |
H A D | vxfs_olt.h | 70 u_int32_t olt_mtime; /* time of last mod. (sec) */ 71 u_int32_t olt_mutime; /* time of last mod. (usec) */
|
/linux-4.1.27/drivers/macintosh/ |
H A D | windfarm_core.c | 287 struct module *mod = ct->ops->owner; wf_put_control() local 289 module_put(mod); wf_put_control() 400 struct module *mod = sr->ops->owner; wf_put_sensor() local 402 module_put(mod); wf_put_sensor()
|
/linux-4.1.27/drivers/mtd/ |
H A D | mtdoops.c | 159 int i = 0, j, ret, mod; mtdoops_workfunc_erase() local 165 mod = (cxt->nextpage * record_size) % mtd->erasesize; mtdoops_workfunc_erase() 166 if (mod != 0) { mtdoops_workfunc_erase() 167 cxt->nextpage = cxt->nextpage + ((mtd->erasesize - mod) / record_size); mtdoops_workfunc_erase()
|
/linux-4.1.27/fs/hfsplus/ |
H A D | btree.c | 77 u32 mod = max(node_size, block_size); hfsplus_calc_btree_clump_size() local 118 clump_size /= mod; hfsplus_calc_btree_clump_size() 119 clump_size *= mod; hfsplus_calc_btree_clump_size() 126 clump_size = mod; hfsplus_calc_btree_clump_size()
|
/linux-4.1.27/include/sound/ |
H A D | seq_device.h | 82 struct module *mod);
|
/linux-4.1.27/arch/parisc/include/asm/ |
H A D | pdcpat.h | 275 /* FIXME: mod[508] should really be a union of the various mod components */ 281 unsigned long mod[508]; /* PAT cell module components */ member in struct:pdc_pat_cell_mod_maddr_block 289 extern int pdc_pat_cell_module(unsigned long *actcnt, unsigned long ploc, unsigned long mod, unsigned long view_type, void *mem_addr);
|
/linux-4.1.27/arch/ia64/lib/ |
H A D | idiv32.S | 20 # define OP mod
|
H A D | idiv64.S | 20 # define OP mod
|
/linux-4.1.27/net/tipc/ |
H A D | link.h | 258 static inline u32 mod(u32 x) mod() function 265 return mod(right - left) < 32768u; less_eq() 275 return less_eq(left, right) && (mod(right) != mod(left)); less()
|
H A D | link.c | 706 uint ack = mod(link->next_in_no - 1); __tipc_link_xmit() 880 unsigned int ack = mod(link->next_in_no - 1); tipc_link_push_packets() 981 msg_set_ack(msg, mod(l_ptr->next_in_no - 1)); tipc_link_retransmit() 1008 post_synch = mod(pl->next_in_no - l->synch_point) - 1; link_synch() 1025 if (seq_no == mod(link->next_in_no)) link_retrieve_defq() 1140 if (unlikely(seq_no != mod(l_ptr->next_in_no))) { tipc_rcv() 1322 if (less(seq_no, mod(l_ptr->next_in_no))) { link_handle_out_of_seq_msg() 1363 u32 next_sent = mod(l_ptr->next_out_no); tipc_link_proto_xmit() 1372 gap = mod(rec - mod(l_ptr->next_in_no)); tipc_link_proto_xmit() 1380 msg_set_ack(msg, mod(l_ptr->next_in_no - 1)); tipc_link_proto_xmit() 1386 msg_set_ack(msg, mod(l_ptr->failover_checkpt - 1)); tipc_link_proto_xmit() 1400 msg_set_seqno(msg, mod(l_ptr->next_out_no + (0xffff/2))); tipc_link_proto_xmit() 1506 if (less_eq(mod(l_ptr->next_in_no), msg_next_sent(msg))) { tipc_link_proto_rcv() 1507 rec_gap = mod(msg_next_sent(msg) - tipc_link_proto_rcv() 1508 mod(l_ptr->next_in_no)); tipc_link_proto_rcv() 1656 msg_set_ack(msg, mod(link->next_in_no - 1)); skb_queue_walk()
|
/linux-4.1.27/arch/avr32/kernel/ |
H A D | module.c | 22 void module_arch_freeing_init(struct module *mod) module_arch_freeing_init() argument 24 vfree(mod->arch.syminfo); module_arch_freeing_init() 25 mod->arch.syminfo = NULL; module_arch_freeing_init()
|
/linux-4.1.27/drivers/s390/crypto/ |
H A D | zcrypt_msgtype50.c | 189 unsigned char *mod, *exp, *inp; ICAMEX_msg_to_type50MEX_msg() local 201 mod = meb1->modulus + sizeof(meb1->modulus) - mod_len; ICAMEX_msg_to_type50MEX_msg() 211 mod = meb2->modulus + sizeof(meb2->modulus) - mod_len; ICAMEX_msg_to_type50MEX_msg() 222 mod = meb3->modulus + sizeof(meb3->modulus) - mod_len; ICAMEX_msg_to_type50MEX_msg() 227 if (copy_from_user(mod, mex->n_modulus, mod_len) || ICAMEX_msg_to_type50MEX_msg()
|
/linux-4.1.27/drivers/isdn/hardware/mISDN/ |
H A D | mISDNisar.c | 943 int delay = (ch->mod == 3) ? 1000 : 200; isar_pump_statev_fax() 982 ch->mod = ch->newmod; isar_pump_statev_fax() 1014 ch->mod = ch->newmod; isar_pump_statev_fax() 1034 ch->cmd, 1, &ch->mod); isar_pump_statev_fax() 1367 ch->mod = para; isar_pump_cmd() 1372 (ch->cmd == PCTRL_CMD_FTM) && (ch->mod == para)) isar_pump_cmd() 1389 ch->mod = para; isar_pump_cmd() 1394 (ch->cmd == PCTRL_CMD_FTH) && (ch->mod == para)) isar_pump_cmd() 1411 ch->mod = para; isar_pump_cmd() 1416 (ch->cmd == PCTRL_CMD_FRM) && (ch->mod == para)) isar_pump_cmd() 1433 ch->mod = para; isar_pump_cmd() 1438 (ch->cmd == PCTRL_CMD_FRH) && (ch->mod == para)) isar_pump_cmd() 1548 pr_debug("%s: isar: new mod\n", ich->is->name); isar_l2l1()
|
/linux-4.1.27/drivers/staging/lustre/lustre/lov/ |
H A D | lov_offset.c | 82 * stripe, and it does its work "mod" the full length of all the stripes. 111 * on a 0 stripe, the "mod stripe width" math will pull it forward to the 237 * through the "mod stripe size" math. we detect it being shifted lov_stripe_intersects()
|
/linux-4.1.27/arch/powerpc/crypto/ |
H A D | sha1.c | 89 /* Pad out to 56 mod 64 */ sha1_final()
|
/linux-4.1.27/drivers/net/ethernet/brocade/bna/ |
H A D | bfa_ioc.c | 2144 struct bfa_ioc_mbox_mod *mod = &ioc->mbox_mod; bfa_ioc_mbox_attach() local 2147 INIT_LIST_HEAD(&mod->cmd_q); bfa_ioc_mbox_attach() 2149 mod->mbhdlr[mc].cbfn = NULL; bfa_ioc_mbox_attach() 2150 mod->mbhdlr[mc].cbarg = ioc->bfa; bfa_ioc_mbox_attach() 2158 struct bfa_ioc_mbox_mod *mod = &ioc->mbox_mod; bfa_ioc_mbox_poll() local 2167 if (list_empty(&mod->cmd_q)) bfa_ioc_mbox_poll() 2180 bfa_q_deq(&mod->cmd_q, &cmd); bfa_ioc_mbox_poll() 2198 struct bfa_ioc_mbox_mod *mod = &ioc->mbox_mod; bfa_ioc_mbox_flush() local 2201 while (!list_empty(&mod->cmd_q)) bfa_ioc_mbox_flush() 2202 bfa_q_deq(&mod->cmd_q, &cmd); bfa_ioc_mbox_flush() 2653 struct bfa_ioc_mbox_mod *mod = &ioc->mbox_mod; bfa_nw_ioc_mbox_regisr() local 2655 mod->mbhdlr[mc].cbfn = cbfn; bfa_nw_ioc_mbox_regisr() 2656 mod->mbhdlr[mc].cbarg = cbarg; bfa_nw_ioc_mbox_regisr() 2671 struct bfa_ioc_mbox_mod *mod = &ioc->mbox_mod; bfa_nw_ioc_mbox_queue() local 2680 if (!list_empty(&mod->cmd_q)) { bfa_nw_ioc_mbox_queue() 2681 list_add_tail(&cmd->qe, &mod->cmd_q); bfa_nw_ioc_mbox_queue() 2690 list_add_tail(&cmd->qe, &mod->cmd_q); bfa_nw_ioc_mbox_queue() 2706 struct bfa_ioc_mbox_mod *mod = &ioc->mbox_mod; bfa_nw_ioc_mbox_isr() local 2720 if ((mc >= BFI_MC_MAX) || (mod->mbhdlr[mc].cbfn == NULL)) bfa_nw_ioc_mbox_isr() 2723 mod->mbhdlr[mc].cbfn(mod->mbhdlr[mc].cbarg, &m); bfa_nw_ioc_mbox_isr()
|
/linux-4.1.27/drivers/base/power/ |
H A D | trace.c | 133 static unsigned int hash_string(unsigned int seed, const char *data, unsigned int mod) hash_string() argument 139 return seed % mod; hash_string()
|
/linux-4.1.27/arch/mips/cavium-octeon/crypto/ |
H A D | octeon-sha512.c | 122 /* Compute number of bytes mod 128. */ __octeon_sha512_update() 191 /* Pad out to 112 mod 128. */ octeon_sha512_final()
|
/linux-4.1.27/arch/mips/include/asm/ |
H A D | pgtable-bits.h | 22 * and mod bits in software. We have a software "yeah you can read 26 * process write to the page, this keeps a mod bit via the hardware
|