aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-04-02 23:53:45 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-02 23:53:45 -0400
commitcd6362befe4cc7bf589a5236d2a780af2d47bcc9 (patch)
tree3bd4e13ec3f92a00dc4f6c3d65e820b54dbfe46e /arch
parent0f1b1e6d73cb989ce2c071edc57deade3b084dfe (diff)
parentb1586f099ba897542ece36e8a23c1a62907261ef (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking updates from David Miller: "Here is my initial pull request for the networking subsystem during this merge window: 1) Support for ESN in AH (RFC 4302) from Fan Du. 2) Add full kernel doc for ethtool command structures, from Ben Hutchings. 3) Add BCM7xxx PHY driver, from Florian Fainelli. 4) Export computed TCP rate information in netlink socket dumps, from Eric Dumazet. 5) Allow IPSEC SA to be dumped partially using a filter, from Nicolas Dichtel. 6) Convert many drivers to pci_enable_msix_range(), from Alexander Gordeev. 7) Record SKB timestamps more efficiently, from Eric Dumazet. 8) Switch to microsecond resolution for TCP round trip times, also from Eric Dumazet. 9) Clean up and fix 6lowpan fragmentation handling by making use of the existing inet_frag api for it's implementation. 10) Add TX grant mapping to xen-netback driver, from Zoltan Kiss. 11) Auto size SKB lengths when composing netlink messages based upon past message sizes used, from Eric Dumazet. 12) qdisc dumps can take a long time, add a cond_resched(), From Eric Dumazet. 13) Sanitize netpoll core and drivers wrt. SKB handling semantics. Get rid of never-used-in-tree netpoll RX handling. From Eric W Biederman. 14) Support inter-address-family and namespace changing in VTI tunnel driver(s). From Steffen Klassert. 15) Add Altera TSE driver, from Vince Bridgers. 16) Optimizing csum_replace2() so that it doesn't adjust the checksum by checksumming the entire header, from Eric Dumazet. 17) Expand BPF internal implementation for faster interpreting, more direct translations into JIT'd code, and much cleaner uses of BPF filtering in non-socket ocntexts. From Daniel Borkmann and Alexei Starovoitov" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1976 commits) netpoll: Use skb_irq_freeable to make zap_completion_queue safe. net: Add a test to see if a skb is freeable in irq context qlcnic: Fix build failure due to undefined reference to `vxlan_get_rx_port' net: ptp: move PTP classifier in its own file net: sxgbe: make "core_ops" static net: sxgbe: fix logical vs bitwise operation net: sxgbe: sxgbe_mdio_register() frees the bus Call efx_set_channels() before efx->type->dimension_resources() xen-netback: disable rogue vif in kthread context net/mlx4: Set proper build dependancy with vxlan be2net: fix build dependency on VxLAN mac802154: make csma/cca parameters per-wpan mac802154: allow only one WPAN to be up at any given time net: filter: minor: fix kdoc in __sk_run_filter netlink: don't compare the nul-termination in nla_strcmp can: c_can: Avoid led toggling for every packet. can: c_can: Simplify TX interrupt cleanup can: c_can: Store dlc private can: c_can: Reduce register access can: c_can: Make the code readable ...
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap2/board-omap3pandora.c6
-rw-r--r--arch/arm/mach-omap2/board-rx51-peripherals.c13
-rw-r--r--arch/arm/net/bpf_jit_32.c7
-rw-r--r--arch/powerpc/net/bpf_jit_comp.c7
-rw-r--r--arch/s390/net/bpf_jit_comp.c13
-rw-r--r--arch/sparc/net/bpf_jit_comp.c5
-rw-r--r--arch/um/drivers/net_kern.c2
-rw-r--r--arch/x86/net/bpf_jit_comp.c11
8 files changed, 33 insertions, 31 deletions
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
index de1bc6bbe585..cf18340eb3bb 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -536,11 +536,13 @@ static struct spi_board_info omap3pandora_spi_board_info[] __initdata = {
536 536
537static void __init pandora_wl1251_init(void) 537static void __init pandora_wl1251_init(void)
538{ 538{
539 struct wl12xx_platform_data pandora_wl1251_pdata; 539 struct wl1251_platform_data pandora_wl1251_pdata;
540 int ret; 540 int ret;
541 541
542 memset(&pandora_wl1251_pdata, 0, sizeof(pandora_wl1251_pdata)); 542 memset(&pandora_wl1251_pdata, 0, sizeof(pandora_wl1251_pdata));
543 543
544 pandora_wl1251_pdata.power_gpio = -1;
545
544 ret = gpio_request_one(PANDORA_WIFI_IRQ_GPIO, GPIOF_IN, "wl1251 irq"); 546 ret = gpio_request_one(PANDORA_WIFI_IRQ_GPIO, GPIOF_IN, "wl1251 irq");
545 if (ret < 0) 547 if (ret < 0)
546 goto fail; 548 goto fail;
@@ -550,7 +552,7 @@ static void __init pandora_wl1251_init(void)
550 goto fail_irq; 552 goto fail_irq;
551 553
552 pandora_wl1251_pdata.use_eeprom = true; 554 pandora_wl1251_pdata.use_eeprom = true;
553 ret = wl12xx_set_platform_data(&pandora_wl1251_pdata); 555 ret = wl1251_set_platform_data(&pandora_wl1251_pdata);
554 if (ret < 0) 556 if (ret < 0)
555 goto fail_irq; 557 goto fail_irq;
556 558
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index 8760bbe3baab..ddfc8df83c6a 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -84,7 +84,7 @@ enum {
84 RX51_SPI_MIPID, /* LCD panel */ 84 RX51_SPI_MIPID, /* LCD panel */
85}; 85};
86 86
87static struct wl12xx_platform_data wl1251_pdata; 87static struct wl1251_platform_data wl1251_pdata;
88static struct tsc2005_platform_data tsc2005_pdata; 88static struct tsc2005_platform_data tsc2005_pdata;
89 89
90#if defined(CONFIG_SENSORS_LIS3_I2C) || defined(CONFIG_SENSORS_LIS3_I2C_MODULE) 90#if defined(CONFIG_SENSORS_LIS3_I2C) || defined(CONFIG_SENSORS_LIS3_I2C_MODULE)
@@ -1173,13 +1173,7 @@ static inline void board_smc91x_init(void)
1173 1173
1174#endif 1174#endif
1175 1175
1176static void rx51_wl1251_set_power(bool enable)
1177{
1178 gpio_set_value(RX51_WL1251_POWER_GPIO, enable);
1179}
1180
1181static struct gpio rx51_wl1251_gpios[] __initdata = { 1176static struct gpio rx51_wl1251_gpios[] __initdata = {
1182 { RX51_WL1251_POWER_GPIO, GPIOF_OUT_INIT_LOW, "wl1251 power" },
1183 { RX51_WL1251_IRQ_GPIO, GPIOF_IN, "wl1251 irq" }, 1177 { RX51_WL1251_IRQ_GPIO, GPIOF_IN, "wl1251 irq" },
1184}; 1178};
1185 1179
@@ -1196,17 +1190,16 @@ static void __init rx51_init_wl1251(void)
1196 if (irq < 0) 1190 if (irq < 0)
1197 goto err_irq; 1191 goto err_irq;
1198 1192
1199 wl1251_pdata.set_power = rx51_wl1251_set_power; 1193 wl1251_pdata.power_gpio = RX51_WL1251_POWER_GPIO;
1200 rx51_peripherals_spi_board_info[RX51_SPI_WL1251].irq = irq; 1194 rx51_peripherals_spi_board_info[RX51_SPI_WL1251].irq = irq;
1201 1195
1202 return; 1196 return;
1203 1197
1204err_irq: 1198err_irq:
1205 gpio_free(RX51_WL1251_IRQ_GPIO); 1199 gpio_free(RX51_WL1251_IRQ_GPIO);
1206 gpio_free(RX51_WL1251_POWER_GPIO);
1207error: 1200error:
1208 printk(KERN_ERR "wl1251 board initialisation failed\n"); 1201 printk(KERN_ERR "wl1251 board initialisation failed\n");
1209 wl1251_pdata.set_power = NULL; 1202 wl1251_pdata.power_gpio = -1;
1210 1203
1211 /* 1204 /*
1212 * Now rx51_peripherals_spi_board_info[1].irq is zero and 1205 * Now rx51_peripherals_spi_board_info[1].irq is zero and
diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c
index 271b5e971568..6f879c319a9d 100644
--- a/arch/arm/net/bpf_jit_32.c
+++ b/arch/arm/net/bpf_jit_32.c
@@ -825,8 +825,8 @@ b_epilogue:
825 break; 825 break;
826 case BPF_S_ANC_RXHASH: 826 case BPF_S_ANC_RXHASH:
827 ctx->seen |= SEEN_SKB; 827 ctx->seen |= SEEN_SKB;
828 BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, rxhash) != 4); 828 BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, hash) != 4);
829 off = offsetof(struct sk_buff, rxhash); 829 off = offsetof(struct sk_buff, hash);
830 emit(ARM_LDR_I(r_A, r_skb, off), ctx); 830 emit(ARM_LDR_I(r_A, r_skb, off), ctx);
831 break; 831 break;
832 case BPF_S_ANC_VLAN_TAG: 832 case BPF_S_ANC_VLAN_TAG:
@@ -925,6 +925,7 @@ void bpf_jit_compile(struct sk_filter *fp)
925 bpf_jit_dump(fp->len, alloc_size, 2, ctx.target); 925 bpf_jit_dump(fp->len, alloc_size, 2, ctx.target);
926 926
927 fp->bpf_func = (void *)ctx.target; 927 fp->bpf_func = (void *)ctx.target;
928 fp->jited = 1;
928out: 929out:
929 kfree(ctx.offsets); 930 kfree(ctx.offsets);
930 return; 931 return;
@@ -932,7 +933,7 @@ out:
932 933
933void bpf_jit_free(struct sk_filter *fp) 934void bpf_jit_free(struct sk_filter *fp)
934{ 935{
935 if (fp->bpf_func != sk_run_filter) 936 if (fp->jited)
936 module_free(NULL, fp->bpf_func); 937 module_free(NULL, fp->bpf_func);
937 kfree(fp); 938 kfree(fp);
938} 939}
diff --git a/arch/powerpc/net/bpf_jit_comp.c b/arch/powerpc/net/bpf_jit_comp.c
index 555034f8505e..808ce1cae21a 100644
--- a/arch/powerpc/net/bpf_jit_comp.c
+++ b/arch/powerpc/net/bpf_jit_comp.c
@@ -390,9 +390,9 @@ static int bpf_jit_build_body(struct sk_filter *fp, u32 *image,
390 mark)); 390 mark));
391 break; 391 break;
392 case BPF_S_ANC_RXHASH: 392 case BPF_S_ANC_RXHASH:
393 BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, rxhash) != 4); 393 BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, hash) != 4);
394 PPC_LWZ_OFFS(r_A, r_skb, offsetof(struct sk_buff, 394 PPC_LWZ_OFFS(r_A, r_skb, offsetof(struct sk_buff,
395 rxhash)); 395 hash));
396 break; 396 break;
397 case BPF_S_ANC_VLAN_TAG: 397 case BPF_S_ANC_VLAN_TAG:
398 case BPF_S_ANC_VLAN_TAG_PRESENT: 398 case BPF_S_ANC_VLAN_TAG_PRESENT:
@@ -689,6 +689,7 @@ void bpf_jit_compile(struct sk_filter *fp)
689 ((u64 *)image)[0] = (u64)code_base; 689 ((u64 *)image)[0] = (u64)code_base;
690 ((u64 *)image)[1] = local_paca->kernel_toc; 690 ((u64 *)image)[1] = local_paca->kernel_toc;
691 fp->bpf_func = (void *)image; 691 fp->bpf_func = (void *)image;
692 fp->jited = 1;
692 } 693 }
693out: 694out:
694 kfree(addrs); 695 kfree(addrs);
@@ -697,7 +698,7 @@ out:
697 698
698void bpf_jit_free(struct sk_filter *fp) 699void bpf_jit_free(struct sk_filter *fp)
699{ 700{
700 if (fp->bpf_func != sk_run_filter) 701 if (fp->jited)
701 module_free(NULL, fp->bpf_func); 702 module_free(NULL, fp->bpf_func);
702 kfree(fp); 703 kfree(fp);
703} 704}
diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c
index 708d60e40066..9c36dc398f90 100644
--- a/arch/s390/net/bpf_jit_comp.c
+++ b/arch/s390/net/bpf_jit_comp.c
@@ -737,10 +737,10 @@ call_fn: /* lg %r1,<d(function)>(%r13) */
737 /* icm %r5,3,<d(type)>(%r1) */ 737 /* icm %r5,3,<d(type)>(%r1) */
738 EMIT4_DISP(0xbf531000, offsetof(struct net_device, type)); 738 EMIT4_DISP(0xbf531000, offsetof(struct net_device, type));
739 break; 739 break;
740 case BPF_S_ANC_RXHASH: /* A = skb->rxhash */ 740 case BPF_S_ANC_RXHASH: /* A = skb->hash */
741 BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, rxhash) != 4); 741 BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, hash) != 4);
742 /* l %r5,<d(rxhash)>(%r2) */ 742 /* l %r5,<d(hash)>(%r2) */
743 EMIT4_DISP(0x58502000, offsetof(struct sk_buff, rxhash)); 743 EMIT4_DISP(0x58502000, offsetof(struct sk_buff, hash));
744 break; 744 break;
745 case BPF_S_ANC_VLAN_TAG: 745 case BPF_S_ANC_VLAN_TAG:
746 case BPF_S_ANC_VLAN_TAG_PRESENT: 746 case BPF_S_ANC_VLAN_TAG_PRESENT:
@@ -877,6 +877,7 @@ void bpf_jit_compile(struct sk_filter *fp)
877 if (jit.start) { 877 if (jit.start) {
878 set_memory_ro((unsigned long)header, header->pages); 878 set_memory_ro((unsigned long)header, header->pages);
879 fp->bpf_func = (void *) jit.start; 879 fp->bpf_func = (void *) jit.start;
880 fp->jited = 1;
880 } 881 }
881out: 882out:
882 kfree(addrs); 883 kfree(addrs);
@@ -887,10 +888,12 @@ void bpf_jit_free(struct sk_filter *fp)
887 unsigned long addr = (unsigned long)fp->bpf_func & PAGE_MASK; 888 unsigned long addr = (unsigned long)fp->bpf_func & PAGE_MASK;
888 struct bpf_binary_header *header = (void *)addr; 889 struct bpf_binary_header *header = (void *)addr;
889 890
890 if (fp->bpf_func == sk_run_filter) 891 if (!fp->jited)
891 goto free_filter; 892 goto free_filter;
893
892 set_memory_rw(addr, header->pages); 894 set_memory_rw(addr, header->pages);
893 module_free(NULL, header); 895 module_free(NULL, header);
896
894free_filter: 897free_filter:
895 kfree(fp); 898 kfree(fp);
896} 899}
diff --git a/arch/sparc/net/bpf_jit_comp.c b/arch/sparc/net/bpf_jit_comp.c
index 01fe9946d388..a82c6b2a9780 100644
--- a/arch/sparc/net/bpf_jit_comp.c
+++ b/arch/sparc/net/bpf_jit_comp.c
@@ -618,7 +618,7 @@ void bpf_jit_compile(struct sk_filter *fp)
618 emit_load16(r_A, struct net_device, type, r_A); 618 emit_load16(r_A, struct net_device, type, r_A);
619 break; 619 break;
620 case BPF_S_ANC_RXHASH: 620 case BPF_S_ANC_RXHASH:
621 emit_skb_load32(rxhash, r_A); 621 emit_skb_load32(hash, r_A);
622 break; 622 break;
623 case BPF_S_ANC_VLAN_TAG: 623 case BPF_S_ANC_VLAN_TAG:
624 case BPF_S_ANC_VLAN_TAG_PRESENT: 624 case BPF_S_ANC_VLAN_TAG_PRESENT:
@@ -809,6 +809,7 @@ cond_branch: f_offset = addrs[i + filter[i].jf];
809 if (image) { 809 if (image) {
810 bpf_flush_icache(image, image + proglen); 810 bpf_flush_icache(image, image + proglen);
811 fp->bpf_func = (void *)image; 811 fp->bpf_func = (void *)image;
812 fp->jited = 1;
812 } 813 }
813out: 814out:
814 kfree(addrs); 815 kfree(addrs);
@@ -817,7 +818,7 @@ out:
817 818
818void bpf_jit_free(struct sk_filter *fp) 819void bpf_jit_free(struct sk_filter *fp)
819{ 820{
820 if (fp->bpf_func != sk_run_filter) 821 if (fp->jited)
821 module_free(NULL, fp->bpf_func); 822 module_free(NULL, fp->bpf_func);
822 kfree(fp); 823 kfree(fp);
823} 824}
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c
index 39f186252e02..7d26d9c0b2fb 100644
--- a/arch/um/drivers/net_kern.c
+++ b/arch/um/drivers/net_kern.c
@@ -240,7 +240,7 @@ static int uml_net_start_xmit(struct sk_buff *skb, struct net_device *dev)
240 240
241 spin_unlock_irqrestore(&lp->lock, flags); 241 spin_unlock_irqrestore(&lp->lock, flags);
242 242
243 dev_kfree_skb(skb); 243 dev_consume_skb_any(skb);
244 244
245 return NETDEV_TX_OK; 245 return NETDEV_TX_OK;
246} 246}
diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c
index 4ed75dd81d05..dc017735bb91 100644
--- a/arch/x86/net/bpf_jit_comp.c
+++ b/arch/x86/net/bpf_jit_comp.c
@@ -553,13 +553,13 @@ void bpf_jit_compile(struct sk_filter *fp)
553 } 553 }
554 break; 554 break;
555 case BPF_S_ANC_RXHASH: 555 case BPF_S_ANC_RXHASH:
556 BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, rxhash) != 4); 556 BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, hash) != 4);
557 if (is_imm8(offsetof(struct sk_buff, rxhash))) { 557 if (is_imm8(offsetof(struct sk_buff, hash))) {
558 /* mov off8(%rdi),%eax */ 558 /* mov off8(%rdi),%eax */
559 EMIT3(0x8b, 0x47, offsetof(struct sk_buff, rxhash)); 559 EMIT3(0x8b, 0x47, offsetof(struct sk_buff, hash));
560 } else { 560 } else {
561 EMIT2(0x8b, 0x87); 561 EMIT2(0x8b, 0x87);
562 EMIT(offsetof(struct sk_buff, rxhash), 4); 562 EMIT(offsetof(struct sk_buff, hash), 4);
563 } 563 }
564 break; 564 break;
565 case BPF_S_ANC_QUEUE: 565 case BPF_S_ANC_QUEUE:
@@ -772,6 +772,7 @@ cond_branch: f_offset = addrs[i + filter[i].jf] - addrs[i];
772 bpf_flush_icache(header, image + proglen); 772 bpf_flush_icache(header, image + proglen);
773 set_memory_ro((unsigned long)header, header->pages); 773 set_memory_ro((unsigned long)header, header->pages);
774 fp->bpf_func = (void *)image; 774 fp->bpf_func = (void *)image;
775 fp->jited = 1;
775 } 776 }
776out: 777out:
777 kfree(addrs); 778 kfree(addrs);
@@ -791,7 +792,7 @@ static void bpf_jit_free_deferred(struct work_struct *work)
791 792
792void bpf_jit_free(struct sk_filter *fp) 793void bpf_jit_free(struct sk_filter *fp)
793{ 794{
794 if (fp->bpf_func != sk_run_filter) { 795 if (fp->jited) {
795 INIT_WORK(&fp->work, bpf_jit_free_deferred); 796 INIT_WORK(&fp->work, bpf_jit_free_deferred);
796 schedule_work(&fp->work); 797 schedule_work(&fp->work);
797 } else { 798 } else {