Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
This commit is contained in:
@@ -587,7 +587,7 @@ extern int acpi_nvs_for_each_region(int (*func)(__u64, __u64, void *),
|
||||
const struct acpi_device_id *acpi_match_device(const struct acpi_device_id *ids,
|
||||
const struct device *dev);
|
||||
|
||||
void *acpi_get_match_data(const struct device *dev);
|
||||
const void *acpi_device_get_match_data(const struct device *dev);
|
||||
extern bool acpi_driver_match_device(struct device *dev,
|
||||
const struct device_driver *drv);
|
||||
int acpi_device_uevent_modalias(struct device *, struct kobj_uevent_env *);
|
||||
@@ -766,7 +766,7 @@ static inline const struct acpi_device_id *acpi_match_device(
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline void *acpi_get_match_data(const struct device *dev)
|
||||
static inline const void *acpi_device_get_match_data(const struct device *dev)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
@@ -49,7 +49,7 @@ struct blk_stat_callback;
|
||||
#define BLKDEV_MIN_RQ 4
|
||||
#define BLKDEV_MAX_RQ 128 /* Default maximum */
|
||||
|
||||
/* Must be consisitent with blk_mq_poll_stats_bkt() */
|
||||
/* Must be consistent with blk_mq_poll_stats_bkt() */
|
||||
#define BLK_MQ_POLL_STATS_BKTS 16
|
||||
|
||||
/*
|
||||
|
@@ -167,8 +167,6 @@
|
||||
|
||||
#if GCC_VERSION >= 40100
|
||||
# define __compiletime_object_size(obj) __builtin_object_size(obj, 0)
|
||||
|
||||
#define __nostackprotector __attribute__((__optimize__("no-stack-protector")))
|
||||
#endif
|
||||
|
||||
#if GCC_VERSION >= 40300
|
||||
@@ -196,6 +194,11 @@
|
||||
#endif /* __CHECKER__ */
|
||||
#endif /* GCC_VERSION >= 40300 */
|
||||
|
||||
#if GCC_VERSION >= 40400
|
||||
#define __optimize(level) __attribute__((__optimize__(level)))
|
||||
#define __nostackprotector __optimize("no-stack-protector")
|
||||
#endif /* GCC_VERSION >= 40400 */
|
||||
|
||||
#if GCC_VERSION >= 40500
|
||||
|
||||
#ifndef __CHECKER__
|
||||
|
@@ -277,6 +277,10 @@ unsigned long read_word_at_a_time(const void *addr)
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#ifndef __optimize
|
||||
# define __optimize(level)
|
||||
#endif
|
||||
|
||||
/* Compile time object size, -1 for unknown */
|
||||
#ifndef __compiletime_object_size
|
||||
# define __compiletime_object_size(obj) -1
|
||||
|
@@ -225,7 +225,7 @@ static inline void cpuidle_coupled_parallel_barrier(struct cpuidle_device *dev,
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_HAS_CPU_RELAX
|
||||
#if defined(CONFIG_CPU_IDLE) && defined(CONFIG_ARCH_HAS_CPU_RELAX)
|
||||
void cpuidle_poll_state_init(struct cpuidle_driver *drv);
|
||||
#else
|
||||
static inline void cpuidle_poll_state_init(struct cpuidle_driver *drv) {}
|
||||
|
@@ -170,6 +170,8 @@ static inline unsigned int cpumask_local_spread(unsigned int i, int node)
|
||||
for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask)
|
||||
#define for_each_cpu_not(cpu, mask) \
|
||||
for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask)
|
||||
#define for_each_cpu_wrap(cpu, mask, start) \
|
||||
for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask, (void)(start))
|
||||
#define for_each_cpu_and(cpu, mask, and) \
|
||||
for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask, (void)and)
|
||||
#else
|
||||
|
@@ -578,7 +578,7 @@ static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
|
||||
|
||||
/*
|
||||
* This is a hack for the legacy x86 forbid_dac and iommu_sac_force. Please
|
||||
* don't use this is new code.
|
||||
* don't use this in new code.
|
||||
*/
|
||||
#ifndef arch_dma_supported
|
||||
#define arch_dma_supported(dev, mask) (1)
|
||||
|
@@ -73,8 +73,8 @@ struct fwnode_operations {
|
||||
struct fwnode_handle *(*get)(struct fwnode_handle *fwnode);
|
||||
void (*put)(struct fwnode_handle *fwnode);
|
||||
bool (*device_is_available)(const struct fwnode_handle *fwnode);
|
||||
void *(*device_get_match_data)(const struct fwnode_handle *fwnode,
|
||||
const struct device *dev);
|
||||
const void *(*device_get_match_data)(const struct fwnode_handle *fwnode,
|
||||
const struct device *dev);
|
||||
bool (*property_present)(const struct fwnode_handle *fwnode,
|
||||
const char *propname);
|
||||
int (*property_read_int_array)(const struct fwnode_handle *fwnode,
|
||||
|
@@ -10,6 +10,7 @@ enum kcore_type {
|
||||
KCORE_VMALLOC,
|
||||
KCORE_RAM,
|
||||
KCORE_VMEMMAP,
|
||||
KCORE_USER,
|
||||
KCORE_OTHER,
|
||||
};
|
||||
|
||||
|
@@ -127,10 +127,4 @@ static __always_inline enum lru_list page_lru(struct page *page)
|
||||
|
||||
#define lru_to_page(head) (list_entry((head)->prev, struct page, lru))
|
||||
|
||||
#ifdef arch_unmap_kpfn
|
||||
extern void arch_unmap_kpfn(unsigned long pfn);
|
||||
#else
|
||||
static __always_inline void arch_unmap_kpfn(unsigned long pfn) { }
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@@ -19,20 +19,6 @@
|
||||
static inline unsigned long array_index_mask_nospec(unsigned long index,
|
||||
unsigned long size)
|
||||
{
|
||||
/*
|
||||
* Warn developers about inappropriate array_index_nospec() usage.
|
||||
*
|
||||
* Even if the CPU speculates past the WARN_ONCE branch, the
|
||||
* sign bit of @index is taken into account when generating the
|
||||
* mask.
|
||||
*
|
||||
* This warning is compiled out when the compiler can infer that
|
||||
* @index and @size are less than LONG_MAX.
|
||||
*/
|
||||
if (WARN_ONCE(index > LONG_MAX || size > LONG_MAX,
|
||||
"array_index_nospec() limited to range of [0, LONG_MAX]\n"))
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Always calculate and emit the mask even if the compiler
|
||||
* thinks the mask is not needed. The compiler does not take
|
||||
@@ -43,6 +29,26 @@ static inline unsigned long array_index_mask_nospec(unsigned long index,
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Warn developers about inappropriate array_index_nospec() usage.
|
||||
*
|
||||
* Even if the CPU speculates past the WARN_ONCE branch, the
|
||||
* sign bit of @index is taken into account when generating the
|
||||
* mask.
|
||||
*
|
||||
* This warning is compiled out when the compiler can infer that
|
||||
* @index and @size are less than LONG_MAX.
|
||||
*/
|
||||
#define array_index_mask_nospec_check(index, size) \
|
||||
({ \
|
||||
if (WARN_ONCE(index > LONG_MAX || size > LONG_MAX, \
|
||||
"array_index_nospec() limited to range of [0, LONG_MAX]\n")) \
|
||||
_mask = 0; \
|
||||
else \
|
||||
_mask = array_index_mask_nospec(index, size); \
|
||||
_mask; \
|
||||
})
|
||||
|
||||
/*
|
||||
* array_index_nospec - sanitize an array index after a bounds check
|
||||
*
|
||||
@@ -61,7 +67,7 @@ static inline unsigned long array_index_mask_nospec(unsigned long index,
|
||||
({ \
|
||||
typeof(index) _i = (index); \
|
||||
typeof(size) _s = (size); \
|
||||
unsigned long _mask = array_index_mask_nospec(_i, _s); \
|
||||
unsigned long _mask = array_index_mask_nospec_check(_i, _s); \
|
||||
\
|
||||
BUILD_BUG_ON(sizeof(_i) > sizeof(long)); \
|
||||
BUILD_BUG_ON(sizeof(_s) > sizeof(long)); \
|
||||
|
@@ -283,7 +283,7 @@ bool device_dma_supported(struct device *dev);
|
||||
|
||||
enum dev_dma_attr device_get_dma_attr(struct device *dev);
|
||||
|
||||
void *device_get_match_data(struct device *dev);
|
||||
const void *device_get_match_data(struct device *dev);
|
||||
|
||||
int device_get_phy_mode(struct device *dev);
|
||||
|
||||
|
@@ -470,7 +470,7 @@ static inline int ptr_ring_consume_batched_bh(struct ptr_ring *r,
|
||||
*/
|
||||
static inline void **__ptr_ring_init_queue_alloc(unsigned int size, gfp_t gfp)
|
||||
{
|
||||
if (size * sizeof(void *) > KMALLOC_MAX_SIZE)
|
||||
if (size > KMALLOC_MAX_SIZE / sizeof(void *))
|
||||
return NULL;
|
||||
return kvmalloc_array(size, sizeof(void *), gfp | __GFP_ZERO);
|
||||
}
|
||||
|
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* Distributed under the terms of the GNU GPL, version 2
|
||||
*
|
||||
* Please see kernel/semaphore.c for documentation of these functions
|
||||
* Please see kernel/locking/semaphore.c for documentation of these functions
|
||||
*/
|
||||
#ifndef __LINUX_SEMAPHORE_H
|
||||
#define __LINUX_SEMAPHORE_H
|
||||
|
@@ -3649,7 +3649,7 @@ static inline bool __skb_checksum_validate_needed(struct sk_buff *skb,
|
||||
return true;
|
||||
}
|
||||
|
||||
/* For small packets <= CHECKSUM_BREAK peform checksum complete directly
|
||||
/* For small packets <= CHECKSUM_BREAK perform checksum complete directly
|
||||
* in checksum_init.
|
||||
*/
|
||||
#define CHECKSUM_BREAK 76
|
||||
|
Reference in New Issue
Block a user