]> git.openfabrics.org - ~emulex/compat.git/commitdiff
Merge branch 'master' into ofed
authorVladimir Sokolovsky <vlad@mellanox.com>
Sun, 10 Jun 2012 07:30:03 +0000 (10:30 +0300)
committerVladimir Sokolovsky <vlad@mellanox.com>
Sun, 10 Jun 2012 07:33:27 +0000 (10:33 +0300)
Conflicts:
compat/Makefile
compat/compat-3.2.c
include/linux/compat-2.6.35.h
include/linux/compat-3.1.h

1  2 
compat/compat-3.2.c
include/linux/compat-2.6.33.h
include/linux/compat-2.6.35.h
include/linux/compat-2.6.37.h
include/linux/compat-2.6.38.h
include/linux/compat-3.1.h

index ee3d192ecc43e29db691786da2e119ca266fa1e8,55ae6af0f935e6398e2447041f9a8cd80e5485df..79a0e91f07d3a76832bf89240a2d8f2ce3c51cb1
@@@ -35,79 -31,4 +35,79 @@@ int __netdev_printk(const char *level, 
  
        return r;
  }
- EXPORT_SYMBOL(__netdev_printk);
+ EXPORT_SYMBOL_GPL(__netdev_printk);
 +
 +int __ethtool_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
 +{
 +        ASSERT_RTNL();
 +
 +        if (!dev->ethtool_ops || !dev->ethtool_ops->get_settings)
 +                return -EOPNOTSUPP;
 +
 +        memset(cmd, 0, sizeof(struct ethtool_cmd));
 +        cmd->cmd = ETHTOOL_GSET;
 +        return dev->ethtool_ops->get_settings(dev, cmd);
 +}
 +EXPORT_SYMBOL(__ethtool_get_settings);
 +
 +#ifndef CONFIG_COMPAT_SLES_11_2
 +/**
 + * llist_add_batch - add several linked entries in batch
 + * @new_first:        first entry in batch to be added
 + * @new_last: last entry in batch to be added
 + * @head:     the head for your lock-less list
 + *
 + * Return whether list is empty before adding.
 + */
 +bool llist_add_batch(struct llist_node *new_first, struct llist_node *new_last,
 +                   struct llist_head *head)
 +{
 +      struct llist_node *entry, *old_entry;
 +
 +      entry = head->first;
 +      for (;;) {
 +              old_entry = entry;
 +              new_last->next = entry;
 +              entry = cmpxchg(&head->first, old_entry, new_first);
 +              if (entry == old_entry)
 +                      break;
 +      }
 +
 +      return old_entry == NULL;
 +}
 +EXPORT_SYMBOL_GPL(llist_add_batch);
 +
 +/**
 + * llist_del_first - delete the first entry of lock-less list
 + * @head:     the head for your lock-less list
 + *
 + * If list is empty, return NULL, otherwise, return the first entry
 + * deleted, this is the newest added one.
 + *
 + * Only one llist_del_first user can be used simultaneously with
 + * multiple llist_add users without lock.  Because otherwise
 + * llist_del_first, llist_add, llist_add (or llist_del_all, llist_add,
 + * llist_add) sequence in another user may change @head->first->next,
 + * but keep @head->first.  If multiple consumers are needed, please
 + * use llist_del_all or use lock between consumers.
 + */
 +struct llist_node *llist_del_first(struct llist_head *head)
 +{
 +      struct llist_node *entry, *old_entry, *next;
 +
 +      entry = head->first;
 +      for (;;) {
 +              if (entry == NULL)
 +                      return NULL;
 +              old_entry = entry;
 +              next = entry->next;
 +              entry = cmpxchg(&head->first, old_entry, next);
 +              if (entry == old_entry)
 +                      break;
 +      }
 +
 +      return entry;
 +}
 +EXPORT_SYMBOL_GPL(llist_del_first);
 +
 +#endif /* CONFIG_COMPAT_SLES_11_2 */
index 6ffc1cbf7b492ac254cd668d3cd8c7716e603a86,0c71af99938ab3726af858a92c299d54c85e03ad..441a331a70ca133f5545946d35cebeb5d61c51e3
@@@ -14,9 -14,8 +14,9 @@@
  #endif
  #include <linux/firmware.h>
  #include <linux/input.h>
 +#include <linux/sched.h>
  
- #if defined(CONFIG_COMPAT_FIRMWARE_CLASS)
+ #if defined(CONFIG_FW_LOADER) || defined(CONFIG_FW_LOADER_MODULE)
  #define release_firmware compat_release_firmware
  #define request_firmware compat_request_firmware
  #define request_firmware_nowait compat_request_firmware_nowait
index 0640973cda5e5ba2cbbfbaf538318ec9cbcd047f,581412392e69bdd9088a40005981146b568e696a..5798b411fadd4fdaac71e86dd448d6588bca1233
  #define  SDIO_BUS_ECSI                0x20    /* Enable continuous SPI interrupt */
  #define  SDIO_BUS_SCSI                0x40    /* Support continuous SPI interrupt */
  
 -#define netdev_hw_addr dev_mc_list
 -
+ /*
+  * We cannot backport this guy as the IRQ data structure
+  * was modified in the kernel itself to support this. We
+  * treat the system as uni-processor in this case.
+  */
+ static inline int irq_set_affinity_hint(unsigned int irq,
+                                       const struct cpumask *m)
+ {
+       return -EINVAL;
+ }
  static inline wait_queue_head_t *sk_sleep(struct sock *sk)
  {
        return sk->sk_sleep;
Simple merge
Simple merge
index 164ab6fb5aca61ba72c12ecf6121d52d98921029,da8e971c870a974ab2f7cc454f14901400ef1c24..cfe166a536c60a33861949f0adecea0f6ba4da48
@@@ -6,31 -6,49 +6,71 @@@
  #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))
  
  #include <linux/security.h>
+ #include <linux/skbuff.h>
+ #include <net/ip.h>
+ #include <linux/idr.h>
 +#include <net/dst.h>
 +
 +static inline struct neighbour *dst_get_neighbour(struct dst_entry *dst)
 +{
 +      return dst->neighbour;
 +}
 +
 +static inline void dst_set_neighbour(struct dst_entry *dst, struct neighbour *neigh)
 +{
 +      dst->neighbour = neigh;
 +}
 +
 +static inline struct neighbour *dst_get_neighbour_raw(struct dst_entry *dst)
 +{
 +      return rcu_dereference_raw(dst->neighbour);
 +}
  
+ /* Backports 56f8a75c */
+ static inline bool ip_is_fragment(const struct iphdr *iph)
+ {
+       return (iph->frag_off & htons(IP_MF | IP_OFFSET)) != 0;
+ }
+ static inline struct sk_buff *__netdev_alloc_skb_ip_align(struct net_device *dev,
+                                                         unsigned int length, gfp_t gfp)
+ {
+       struct sk_buff *skb = __netdev_alloc_skb(dev, length + NET_IP_ALIGN, gfp);
+       if (NET_IP_ALIGN && skb)
+               skb_reserve(skb, NET_IP_ALIGN);
+       return skb;
+ }
 +#ifndef NEED_MIN_DUMP_ALLOC_ARG
 +#include <linux/netlink.h>
 +/* remove last arg */
 +#define netlink_dump_start(a, b, c, d, e, f) netlink_dump_start(a, b, c, d, e)
 +#endif
 +
+ /*
+  * Getting something that works in C and CPP for an arg that may or may
+  * not be defined is tricky.  Here, if we have "#define CONFIG_BOOGER 1"
+  * we match on the placeholder define, insert the "0," for arg1 and generate
+  * the triplet (0, 1, 0).  Then the last step cherry picks the 2nd arg (a one).
+  * When CONFIG_BOOGER is not defined, we generate a (... 1, 0) pair, and when
+  * the last step cherry picks the 2nd arg, we get a zero.
+  */
+ #define __ARG_PLACEHOLDER_1 0,
+ #define config_enabled(cfg) _config_enabled(cfg)
+ #define _config_enabled(value) __config_enabled(__ARG_PLACEHOLDER_##value)
+ #define __config_enabled(arg1_or_junk) ___config_enabled(arg1_or_junk 1, 0)
+ #define ___config_enabled(__ignored, val, ...) val
  #define genl_dump_check_consistent(cb, user_hdr, family)
  
+ /*
+  * IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',
+  * 0 otherwise.
+  *
+  */
+ #define IS_ENABLED(option) \
+         (config_enabled(option) || config_enabled(option##_MODULE))
  #define IFF_TX_SKB_SHARING    0x10000 /* The interface supports sharing
                                         * skbs on transmit */