.. | .. |
---|
1459 | 1459 | static int fcoe_alloc_paged_crc_eof(struct sk_buff *skb, int tlen) |
---|
1460 | 1460 | { |
---|
1461 | 1461 | struct fcoe_percpu_s *fps; |
---|
1462 | | - int rc; |
---|
| 1462 | + int rc, cpu = get_cpu_light(); |
---|
1463 | 1463 | |
---|
1464 | | - fps = &get_cpu_var(fcoe_percpu); |
---|
| 1464 | + fps = &per_cpu(fcoe_percpu, cpu); |
---|
1465 | 1465 | rc = fcoe_get_paged_crc_eof(skb, tlen, fps); |
---|
1466 | | - put_cpu_var(fcoe_percpu); |
---|
| 1466 | + put_cpu_light(); |
---|
1467 | 1467 | |
---|
1468 | 1468 | return rc; |
---|
1469 | 1469 | } |
---|
.. | .. |
---|
1650 | 1650 | return 0; |
---|
1651 | 1651 | } |
---|
1652 | 1652 | |
---|
1653 | | - stats = per_cpu_ptr(lport->stats, get_cpu()); |
---|
| 1653 | + stats = per_cpu_ptr(lport->stats, get_cpu_light()); |
---|
1654 | 1654 | stats->InvalidCRCCount++; |
---|
1655 | 1655 | if (stats->InvalidCRCCount < 5) |
---|
1656 | 1656 | printk(KERN_WARNING "fcoe: dropping frame with CRC error\n"); |
---|
1657 | | - put_cpu(); |
---|
| 1657 | + put_cpu_light(); |
---|
1658 | 1658 | return -EINVAL; |
---|
1659 | 1659 | } |
---|
1660 | 1660 | |
---|
.. | .. |
---|
1697 | 1697 | */ |
---|
1698 | 1698 | hp = (struct fcoe_hdr *) skb_network_header(skb); |
---|
1699 | 1699 | |
---|
1700 | | - stats = per_cpu_ptr(lport->stats, get_cpu()); |
---|
| 1700 | + stats = per_cpu_ptr(lport->stats, get_cpu_light()); |
---|
1701 | 1701 | if (unlikely(FC_FCOE_DECAPS_VER(hp) != FC_FCOE_VER)) { |
---|
1702 | 1702 | if (stats->ErrorFrames < 5) |
---|
1703 | 1703 | printk(KERN_WARNING "fcoe: FCoE version " |
---|
.. | .. |
---|
1729 | 1729 | goto drop; |
---|
1730 | 1730 | |
---|
1731 | 1731 | if (!fcoe_filter_frames(lport, fp)) { |
---|
1732 | | - put_cpu(); |
---|
| 1732 | + put_cpu_light(); |
---|
1733 | 1733 | fc_exch_recv(lport, fp); |
---|
1734 | 1734 | return; |
---|
1735 | 1735 | } |
---|
1736 | 1736 | drop: |
---|
1737 | 1737 | stats->ErrorFrames++; |
---|
1738 | | - put_cpu(); |
---|
| 1738 | + put_cpu_light(); |
---|
1739 | 1739 | kfree_skb(skb); |
---|
1740 | 1740 | } |
---|
1741 | 1741 | |
---|