--- a/drivers/base/core.c
+++ b/drivers/base/core.c
-@@ -161,10 +161,10 @@ static int device_reorder_to_tail(struct
+@@ -162,10 +162,10 @@ static int device_reorder_to_tail(struct
* of the link. If DL_FLAG_PM_RUNTIME is not set, DL_FLAG_RPM_ACTIVE will be
* ignored.
*
*
* A side effect of the link creation is re-ordering of dpm_list and the
* devices_kset list by moving the consumer device and all devices depending
-@@ -181,7 +181,8 @@ struct device_link *device_link_add(stru
- struct device_link *link;
+@@ -183,7 +183,8 @@ struct device_link *device_link_add(stru
+ bool rpm_put_supplier = false;
if (!consumer || !supplier ||
- ((flags & DL_FLAG_STATELESS) && (flags & DL_FLAG_AUTOREMOVE)))
+ (flags & DL_FLAG_AUTOREMOVE_CONSUMER)))
return NULL;
- device_links_write_lock();
-@@ -199,8 +200,10 @@ struct device_link *device_link_add(stru
+ if (flags & DL_FLAG_PM_RUNTIME && flags & DL_FLAG_RPM_ACTIVE) {
+@@ -209,8 +210,10 @@ struct device_link *device_link_add(stru
}
list_for_each_entry(link, &supplier->links.consumers, s_node)
link = kzalloc(sizeof(*link), GFP_KERNEL);
if (!link)
-@@ -232,6 +235,7 @@ struct device_link *device_link_add(stru
+@@ -237,6 +240,7 @@ struct device_link *device_link_add(stru
link->consumer = consumer;
INIT_LIST_HEAD(&link->c_node);
link->flags = flags;
/* Determine the initial link state. */
if (flags & DL_FLAG_STATELESS) {
-@@ -302,8 +306,10 @@ static void __device_link_free_srcu(stru
+@@ -311,8 +315,10 @@ static void __device_link_free_srcu(stru
device_link_free(container_of(rhead, struct device_link, rcu_head));
}
dev_info(link->consumer, "Dropping the link to %s\n",
dev_name(link->supplier));
-@@ -315,8 +321,10 @@ static void __device_link_del(struct dev
+@@ -324,8 +330,10 @@ static void __device_link_del(struct dev
call_srcu(&device_links_srcu, &link->rcu_head, __device_link_free_srcu);
}
#else /* !CONFIG_SRCU */
dev_info(link->consumer, "Dropping the link to %s\n",
dev_name(link->supplier));
-@@ -334,18 +342,50 @@ static void __device_link_del(struct dev
+@@ -343,18 +351,50 @@ static void __device_link_del(struct dev
* @link: Device link to delete.
*
* The caller must ensure proper synchronization of this function with runtime
static void device_links_missing_supplier(struct device *dev)
{
struct device_link *link;
-@@ -453,8 +493,8 @@ static void __device_links_no_driver(str
+@@ -462,8 +502,8 @@ static void __device_links_no_driver(str
if (link->flags & DL_FLAG_STATELESS)
continue;
else if (link->status != DL_STATE_SUPPLIER_UNBIND)
WRITE_ONCE(link->status, DL_STATE_AVAILABLE);
}
-@@ -489,8 +529,18 @@ void device_links_driver_cleanup(struct
+@@ -498,8 +538,18 @@ void device_links_driver_cleanup(struct
if (link->flags & DL_FLAG_STATELESS)
continue;
WRITE_ONCE(link->status, DL_STATE_DORMANT);
}
-@@ -607,13 +657,13 @@ static void device_links_purge(struct de
+@@ -616,13 +666,13 @@ static void device_links_purge(struct de
list_for_each_entry_safe_reverse(link, ln, &dev->links.suppliers, c_node) {
WARN_ON(link->status == DL_STATE_ACTIVE);
}
device_links_write_unlock();
-@@ -1035,6 +1085,34 @@ static ssize_t online_store(struct devic
+@@ -1044,6 +1094,34 @@ static ssize_t online_store(struct devic
}
static DEVICE_ATTR_RW(online);
int device_add_groups(struct device *dev, const struct attribute_group **groups)
{
return sysfs_create_groups(&dev->kobj, groups);
-@@ -1206,8 +1284,20 @@ static int device_add_attrs(struct devic
+@@ -1215,8 +1293,20 @@ static int device_add_attrs(struct devic
goto err_remove_dev_groups;
}
err_remove_dev_groups:
device_remove_groups(dev, dev->groups);
err_remove_type_groups:
-@@ -1225,6 +1315,8 @@ static void device_remove_attrs(struct d
+@@ -1234,6 +1324,8 @@ static void device_remove_attrs(struct d
struct class *class = dev->class;
const struct device_type *type = dev->type;
} else if (has_acpi_companion(dma_dev)) {
--- a/drivers/gpu/ipu-v3/ipu-pre.c
+++ b/drivers/gpu/ipu-v3/ipu-pre.c
-@@ -124,7 +124,8 @@ ipu_pre_lookup_by_phandle(struct device
+@@ -125,7 +125,8 @@ ipu_pre_lookup_by_phandle(struct device
list_for_each_entry(pre, &ipu_pre_list, list) {
if (pre_node == pre->dev->of_node) {
mutex_unlock(&ipu_pre_list_mutex);
extern int __must_check bus_create_file(struct bus_type *,
struct bus_attribute *);
-@@ -750,14 +752,16 @@ enum device_link_state {
+@@ -751,14 +753,16 @@ enum device_link_state {
* Device link flags.
*
* STATELESS: The core won't track the presence of supplier/consumer drivers.
/**
* struct device_link - Device link representation.
-@@ -768,6 +772,7 @@ enum device_link_state {
+@@ -769,6 +773,7 @@ enum device_link_state {
* @status: The state of the link (with respect to the presence of drivers).
* @flags: Link flags.
* @rpm_active: Whether or not the consumer device is runtime-PM-active.
* @rcu_head: An RCU head to use for deferred execution of SRCU callbacks.
*/
struct device_link {
-@@ -778,6 +783,7 @@ struct device_link {
+@@ -779,6 +784,7 @@ struct device_link {
enum device_link_state status;
u32 flags;
bool rpm_active;
#ifdef CONFIG_SRCU
struct rcu_head rcu_head;
#endif
-@@ -850,6 +856,8 @@ struct dev_links_info {
+@@ -851,6 +857,8 @@ struct dev_links_info {
* @coherent_dma_mask: Like dma_mask, but for alloc_coherent mapping as not all
* hardware supports 64-bit addresses for consistent allocations
* such descriptors.
* @dma_pfn_offset: offset of DMA memory range relatively of RAM
* @dma_parms: A low level driver may set these to teach IOMMU code about
* segment limitations.
-@@ -929,6 +937,7 @@ struct device {
+@@ -930,6 +938,7 @@ struct device {
not all hardware supports
64 bit addresses for consistent
allocations such descriptors. */
unsigned long dma_pfn_offset;
struct device_dma_parameters *dma_parms;
-@@ -1267,6 +1276,7 @@ extern const char *dev_driver_string(con
+@@ -1268,6 +1277,7 @@ extern const char *dev_driver_string(con
struct device_link *device_link_add(struct device *consumer,
struct device *supplier, u32 flags);
void device_link_del(struct device_link *link);
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
-@@ -2344,7 +2344,8 @@ int register_netdevice_notifier(struct n
+@@ -2349,7 +2349,8 @@ int register_netdevice_notifier(struct n
int unregister_netdevice_notifier(struct notifier_block *nb);
struct netdev_notifier_info {
};
struct netdev_notifier_info_ext {
-@@ -2376,6 +2377,7 @@ static inline void netdev_notifier_info_
+@@ -2381,6 +2382,7 @@ static inline void netdev_notifier_info_
struct net_device *dev)
{
info->dev = dev;
}
static inline struct net_device *
-@@ -2384,6 +2386,12 @@ netdev_notifier_info_to_dev(const struct
+@@ -2389,6 +2391,12 @@ netdev_notifier_info_to_dev(const struct
return info->dev;
}
void __kfree_skb(struct sk_buff *skb);
extern struct kmem_cache *skbuff_head_cache;
-@@ -3297,6 +3298,7 @@ static inline void skb_free_datagram_loc
+@@ -3315,6 +3316,7 @@ static inline void skb_free_datagram_loc
}
int skb_kill_datagram(struct sock *sk, struct sk_buff *skb, unsigned int flags);
int skb_copy_bits(const struct sk_buff *skb, int offset, void *to, int len);