diff options
Diffstat (limited to 'arch/xtensa')
-rw-r--r-- | arch/xtensa/include/asm/atomic.h | 3 | ||||
-rw-r--r-- | arch/xtensa/include/asm/bitops.h | 11 | ||||
-rw-r--r-- | arch/xtensa/kernel/init_task.c | 1 | ||||
-rw-r--r-- | arch/xtensa/platforms/iss/network.c | 21 |
4 files changed, 21 insertions, 15 deletions
diff --git a/arch/xtensa/include/asm/atomic.h b/arch/xtensa/include/asm/atomic.h index b3b23540f14..67ad67bed8c 100644 --- a/arch/xtensa/include/asm/atomic.h +++ b/arch/xtensa/include/asm/atomic.h | |||
@@ -14,8 +14,7 @@ | |||
14 | #define _XTENSA_ATOMIC_H | 14 | #define _XTENSA_ATOMIC_H |
15 | 15 | ||
16 | #include <linux/stringify.h> | 16 | #include <linux/stringify.h> |
17 | 17 | #include <linux/types.h> | |
18 | typedef struct { volatile int counter; } atomic_t; | ||
19 | 18 | ||
20 | #ifdef __KERNEL__ | 19 | #ifdef __KERNEL__ |
21 | #include <asm/processor.h> | 20 | #include <asm/processor.h> |
diff --git a/arch/xtensa/include/asm/bitops.h b/arch/xtensa/include/asm/bitops.h index 23261e8f2e5..6c3930397bd 100644 --- a/arch/xtensa/include/asm/bitops.h +++ b/arch/xtensa/include/asm/bitops.h | |||
@@ -82,6 +82,16 @@ static inline int fls (unsigned int x) | |||
82 | return 32 - __cntlz(x); | 82 | return 32 - __cntlz(x); |
83 | } | 83 | } |
84 | 84 | ||
85 | /** | ||
86 | * __fls - find last (most-significant) set bit in a long word | ||
87 | * @word: the word to search | ||
88 | * | ||
89 | * Undefined if no set bit exists, so code should check against 0 first. | ||
90 | */ | ||
91 | static inline unsigned long __fls(unsigned long word) | ||
92 | { | ||
93 | return 31 - __cntlz(word); | ||
94 | } | ||
85 | #else | 95 | #else |
86 | 96 | ||
87 | /* Use the generic implementation if we don't have the nsa/nsau instructions. */ | 97 | /* Use the generic implementation if we don't have the nsa/nsau instructions. */ |
@@ -90,6 +100,7 @@ static inline int fls (unsigned int x) | |||
90 | # include <asm-generic/bitops/__ffs.h> | 100 | # include <asm-generic/bitops/__ffs.h> |
91 | # include <asm-generic/bitops/ffz.h> | 101 | # include <asm-generic/bitops/ffz.h> |
92 | # include <asm-generic/bitops/fls.h> | 102 | # include <asm-generic/bitops/fls.h> |
103 | # include <asm-generic/bitops/__fls.h> | ||
93 | 104 | ||
94 | #endif | 105 | #endif |
95 | 106 | ||
diff --git a/arch/xtensa/kernel/init_task.c b/arch/xtensa/kernel/init_task.c index 3df469dbe81..e07f5c9fcd3 100644 --- a/arch/xtensa/kernel/init_task.c +++ b/arch/xtensa/kernel/init_task.c | |||
@@ -21,7 +21,6 @@ | |||
21 | 21 | ||
22 | #include <asm/uaccess.h> | 22 | #include <asm/uaccess.h> |
23 | 23 | ||
24 | static struct fs_struct init_fs = INIT_FS; | ||
25 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | 24 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); |
26 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | 25 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); |
27 | struct mm_struct init_mm = INIT_MM(init_mm); | 26 | struct mm_struct init_mm = INIT_MM(init_mm); |
diff --git a/arch/xtensa/platforms/iss/network.c b/arch/xtensa/platforms/iss/network.c index 4eb36fd0f93..edad4156d89 100644 --- a/arch/xtensa/platforms/iss/network.c +++ b/arch/xtensa/platforms/iss/network.c | |||
@@ -365,7 +365,7 @@ static int tuntap_probe(struct iss_net_private *lp, int index, char *init) | |||
365 | 365 | ||
366 | static int iss_net_rx(struct net_device *dev) | 366 | static int iss_net_rx(struct net_device *dev) |
367 | { | 367 | { |
368 | struct iss_net_private *lp = dev->priv; | 368 | struct iss_net_private *lp = netdev_priv(dev); |
369 | int pkt_len; | 369 | int pkt_len; |
370 | struct sk_buff *skb; | 370 | struct sk_buff *skb; |
371 | 371 | ||
@@ -456,7 +456,7 @@ static void iss_net_timer(unsigned long priv) | |||
456 | 456 | ||
457 | static int iss_net_open(struct net_device *dev) | 457 | static int iss_net_open(struct net_device *dev) |
458 | { | 458 | { |
459 | struct iss_net_private *lp = dev->priv; | 459 | struct iss_net_private *lp = netdev_priv(dev); |
460 | char addr[sizeof "255.255.255.255\0"]; | 460 | char addr[sizeof "255.255.255.255\0"]; |
461 | int err; | 461 | int err; |
462 | 462 | ||
@@ -496,7 +496,7 @@ out: | |||
496 | 496 | ||
497 | static int iss_net_close(struct net_device *dev) | 497 | static int iss_net_close(struct net_device *dev) |
498 | { | 498 | { |
499 | struct iss_net_private *lp = dev->priv; | 499 | struct iss_net_private *lp = netdev_priv(dev); |
500 | printk("iss_net_close!\n"); | 500 | printk("iss_net_close!\n"); |
501 | netif_stop_queue(dev); | 501 | netif_stop_queue(dev); |
502 | spin_lock(&lp->lock); | 502 | spin_lock(&lp->lock); |
@@ -515,7 +515,7 @@ printk("iss_net_close!\n"); | |||
515 | 515 | ||
516 | static int iss_net_start_xmit(struct sk_buff *skb, struct net_device *dev) | 516 | static int iss_net_start_xmit(struct sk_buff *skb, struct net_device *dev) |
517 | { | 517 | { |
518 | struct iss_net_private *lp = dev->priv; | 518 | struct iss_net_private *lp = netdev_priv(dev); |
519 | unsigned long flags; | 519 | unsigned long flags; |
520 | int len; | 520 | int len; |
521 | 521 | ||
@@ -551,7 +551,7 @@ static int iss_net_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
551 | 551 | ||
552 | static struct net_device_stats *iss_net_get_stats(struct net_device *dev) | 552 | static struct net_device_stats *iss_net_get_stats(struct net_device *dev) |
553 | { | 553 | { |
554 | struct iss_net_private *lp = dev->priv; | 554 | struct iss_net_private *lp = netdev_priv(dev); |
555 | return &lp->stats; | 555 | return &lp->stats; |
556 | } | 556 | } |
557 | 557 | ||
@@ -578,7 +578,7 @@ static void iss_net_tx_timeout(struct net_device *dev) | |||
578 | static int iss_net_set_mac(struct net_device *dev, void *addr) | 578 | static int iss_net_set_mac(struct net_device *dev, void *addr) |
579 | { | 579 | { |
580 | #if 0 | 580 | #if 0 |
581 | struct iss_net_private *lp = dev->priv; | 581 | struct iss_net_private *lp = netdev_priv(dev); |
582 | struct sockaddr *hwaddr = addr; | 582 | struct sockaddr *hwaddr = addr; |
583 | 583 | ||
584 | spin_lock(&lp->lock); | 584 | spin_lock(&lp->lock); |
@@ -592,7 +592,7 @@ static int iss_net_set_mac(struct net_device *dev, void *addr) | |||
592 | static int iss_net_change_mtu(struct net_device *dev, int new_mtu) | 592 | static int iss_net_change_mtu(struct net_device *dev, int new_mtu) |
593 | { | 593 | { |
594 | #if 0 | 594 | #if 0 |
595 | struct iss_net_private *lp = dev->priv; | 595 | struct iss_net_private *lp = netdev_priv(dev); |
596 | int err = 0; | 596 | int err = 0; |
597 | 597 | ||
598 | spin_lock(&lp->lock); | 598 | spin_lock(&lp->lock); |
@@ -636,7 +636,7 @@ static int iss_net_configure(int index, char *init) | |||
636 | 636 | ||
637 | /* Initialize private element. */ | 637 | /* Initialize private element. */ |
638 | 638 | ||
639 | lp = dev->priv; | 639 | lp = netdev_priv(dev); |
640 | *lp = ((struct iss_net_private) { | 640 | *lp = ((struct iss_net_private) { |
641 | .device_list = LIST_HEAD_INIT(lp->device_list), | 641 | .device_list = LIST_HEAD_INIT(lp->device_list), |
642 | .opened_list = LIST_HEAD_INIT(lp->opened_list), | 642 | .opened_list = LIST_HEAD_INIT(lp->opened_list), |
@@ -660,10 +660,7 @@ static int iss_net_configure(int index, char *init) | |||
660 | 660 | ||
661 | printk(KERN_INFO "Netdevice %d ", index); | 661 | printk(KERN_INFO "Netdevice %d ", index); |
662 | if (lp->have_mac) | 662 | if (lp->have_mac) |
663 | printk("(%02x:%02x:%02x:%02x:%02x:%02x) ", | 663 | printk("(%pM) ", lp->mac); |
664 | lp->mac[0], lp->mac[1], | ||
665 | lp->mac[2], lp->mac[3], | ||
666 | lp->mac[4], lp->mac[5]); | ||
667 | printk(": "); | 664 | printk(": "); |
668 | 665 | ||
669 | /* sysfs register */ | 666 | /* sysfs register */ |