Merge branches 'x86/apic', 'x86/asm', 'x86/mm' and 'x86/platform' into x86/core, to merge last updates
Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
commit
7ef3d7d58d
643 changed files with 9093 additions and 5866 deletions
|
|
@ -821,8 +821,6 @@ extern int scsi_cmd_ioctl(struct request_queue *, struct gendisk *, fmode_t,
|
|||
extern int sg_scsi_ioctl(struct request_queue *, struct gendisk *, fmode_t,
|
||||
struct scsi_ioctl_command __user *);
|
||||
|
||||
extern void blk_queue_bio(struct request_queue *q, struct bio *bio);
|
||||
|
||||
/*
|
||||
* A queue has just exitted congestion. Note this in the global counter of
|
||||
* congested queues, and wake up anyone who was waiting for requests to be
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
#define PHY_ID_BCM7250 0xae025280
|
||||
#define PHY_ID_BCM7364 0xae025260
|
||||
#define PHY_ID_BCM7366 0x600d8490
|
||||
#define PHY_ID_BCM7425 0x03625e60
|
||||
#define PHY_ID_BCM7425 0x600d86b0
|
||||
#define PHY_ID_BCM7429 0x600d8730
|
||||
#define PHY_ID_BCM7439 0x600d8480
|
||||
#define PHY_ID_BCM7439_2 0xae025080
|
||||
|
|
|
|||
|
|
@ -250,7 +250,7 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s
|
|||
({ union { typeof(x) __val; char __c[1]; } __u; __read_once_size(&(x), __u.__c, sizeof(x)); __u.__val; })
|
||||
|
||||
#define WRITE_ONCE(x, val) \
|
||||
({ typeof(x) __val = (val); __write_once_size(&(x), &__val, sizeof(__val)); __val; })
|
||||
({ union { typeof(x) __val; char __c[1]; } __u = { .__val = (val) }; __write_once_size(&(x), __u.__c, sizeof(x)); __u.__val; })
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
|
|
@ -450,7 +450,7 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s
|
|||
* with an explicit memory barrier or atomic instruction that provides the
|
||||
* required ordering.
|
||||
*
|
||||
* If possible use READ_ONCE/ASSIGN_ONCE instead.
|
||||
* If possible use READ_ONCE()/WRITE_ONCE() instead.
|
||||
*/
|
||||
#define __ACCESS_ONCE(x) ({ \
|
||||
__maybe_unused typeof(x) __var = (__force typeof(x)) 0; \
|
||||
|
|
|
|||
|
|
@ -151,10 +151,8 @@ static inline unsigned int cpumask_any_but(const struct cpumask *mask,
|
|||
return 1;
|
||||
}
|
||||
|
||||
static inline int cpumask_set_cpu_local_first(int i, int numa_node, cpumask_t *dstp)
|
||||
static inline unsigned int cpumask_local_spread(unsigned int i, int node)
|
||||
{
|
||||
set_bit(0, cpumask_bits(dstp));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -208,7 +206,7 @@ static inline unsigned int cpumask_next_zero(int n, const struct cpumask *srcp)
|
|||
|
||||
int cpumask_next_and(int n, const struct cpumask *, const struct cpumask *);
|
||||
int cpumask_any_but(const struct cpumask *mask, unsigned int cpu);
|
||||
int cpumask_set_cpu_local_first(int i, int numa_node, cpumask_t *dstp);
|
||||
unsigned int cpumask_local_spread(unsigned int i, int node);
|
||||
|
||||
/**
|
||||
* for_each_cpu - iterate over every cpu in a mask
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ struct sensor_hub_pending {
|
|||
* @usage: Usage id for this hub device instance.
|
||||
* @start_collection_index: Starting index for a phy type collection
|
||||
* @end_collection_index: Last index for a phy type collection
|
||||
* @mutex: synchronizing mutex.
|
||||
* @mutex_ptr: synchronizing mutex pointer.
|
||||
* @pending: Holds information of pending sync read request.
|
||||
*/
|
||||
struct hid_sensor_hub_device {
|
||||
|
|
@ -84,7 +84,7 @@ struct hid_sensor_hub_device {
|
|||
u32 usage;
|
||||
int start_collection_index;
|
||||
int end_collection_index;
|
||||
struct mutex mutex;
|
||||
struct mutex *mutex_ptr;
|
||||
struct sensor_hub_pending pending;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
#define _LINUX_IO_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/init.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/page.h>
|
||||
|
||||
|
|
@ -111,6 +112,13 @@ static inline void arch_phys_wc_del(int handle)
|
|||
}
|
||||
|
||||
#define arch_phys_wc_add arch_phys_wc_add
|
||||
#ifndef arch_phys_wc_index
|
||||
static inline int arch_phys_wc_index(int handle)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
#define arch_phys_wc_index arch_phys_wc_index
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* _LINUX_IO_H */
|
||||
|
|
|
|||
|
|
@ -166,19 +166,34 @@ static inline bool ktime_before(const ktime_t cmp1, const ktime_t cmp2)
|
|||
}
|
||||
|
||||
#if BITS_PER_LONG < 64
|
||||
extern u64 __ktime_divns(const ktime_t kt, s64 div);
|
||||
static inline u64 ktime_divns(const ktime_t kt, s64 div)
|
||||
extern s64 __ktime_divns(const ktime_t kt, s64 div);
|
||||
static inline s64 ktime_divns(const ktime_t kt, s64 div)
|
||||
{
|
||||
/*
|
||||
* Negative divisors could cause an inf loop,
|
||||
* so bug out here.
|
||||
*/
|
||||
BUG_ON(div < 0);
|
||||
if (__builtin_constant_p(div) && !(div >> 32)) {
|
||||
u64 ns = kt.tv64;
|
||||
do_div(ns, div);
|
||||
return ns;
|
||||
s64 ns = kt.tv64;
|
||||
u64 tmp = ns < 0 ? -ns : ns;
|
||||
|
||||
do_div(tmp, div);
|
||||
return ns < 0 ? -tmp : tmp;
|
||||
} else {
|
||||
return __ktime_divns(kt, div);
|
||||
}
|
||||
}
|
||||
#else /* BITS_PER_LONG < 64 */
|
||||
# define ktime_divns(kt, div) (u64)((kt).tv64 / (div))
|
||||
static inline s64 ktime_divns(const ktime_t kt, s64 div)
|
||||
{
|
||||
/*
|
||||
* 32-bit implementation cannot handle negative divisors,
|
||||
* so catch them on 64bit as well.
|
||||
*/
|
||||
WARN_ON(div < 0);
|
||||
return kt.tv64 / div;
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline s64 ktime_to_us(const ktime_t kt)
|
||||
|
|
|
|||
|
|
@ -32,4 +32,9 @@ static inline void osq_lock_init(struct optimistic_spin_queue *lock)
|
|||
extern bool osq_lock(struct optimistic_spin_queue *lock);
|
||||
extern void osq_unlock(struct optimistic_spin_queue *lock);
|
||||
|
||||
static inline bool osq_is_locked(struct optimistic_spin_queue *lock)
|
||||
{
|
||||
return atomic_read(&lock->tail) != OSQ_UNLOCKED_VAL;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -41,7 +41,12 @@ void percpu_counter_destroy(struct percpu_counter *fbc);
|
|||
void percpu_counter_set(struct percpu_counter *fbc, s64 amount);
|
||||
void __percpu_counter_add(struct percpu_counter *fbc, s64 amount, s32 batch);
|
||||
s64 __percpu_counter_sum(struct percpu_counter *fbc);
|
||||
int percpu_counter_compare(struct percpu_counter *fbc, s64 rhs);
|
||||
int __percpu_counter_compare(struct percpu_counter *fbc, s64 rhs, s32 batch);
|
||||
|
||||
static inline int percpu_counter_compare(struct percpu_counter *fbc, s64 rhs)
|
||||
{
|
||||
return __percpu_counter_compare(fbc, rhs, percpu_counter_batch);
|
||||
}
|
||||
|
||||
static inline void percpu_counter_add(struct percpu_counter *fbc, s64 amount)
|
||||
{
|
||||
|
|
@ -116,6 +121,12 @@ static inline int percpu_counter_compare(struct percpu_counter *fbc, s64 rhs)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline int
|
||||
__percpu_counter_compare(struct percpu_counter *fbc, s64 rhs, s32 batch)
|
||||
{
|
||||
return percpu_counter_compare(fbc, rhs);
|
||||
}
|
||||
|
||||
static inline void
|
||||
percpu_counter_add(struct percpu_counter *fbc, s64 amount)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5,8 +5,6 @@
|
|||
#ifndef __LINUX_PLATFORM_DATA_SI5351_H__
|
||||
#define __LINUX_PLATFORM_DATA_SI5351_H__
|
||||
|
||||
struct clk;
|
||||
|
||||
/**
|
||||
* enum si5351_pll_src - Si5351 pll clock source
|
||||
* @SI5351_PLL_SRC_DEFAULT: default, do not change eeprom config
|
||||
|
|
@ -107,8 +105,6 @@ struct si5351_clkout_config {
|
|||
* @clkout: array of clkout configuration
|
||||
*/
|
||||
struct si5351_platform_data {
|
||||
struct clk *clk_xtal;
|
||||
struct clk *clk_clkin;
|
||||
enum si5351_pll_src pll_src[2];
|
||||
struct si5351_clkout_config clkout[8];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
#ifndef _LINUX_RHASHTABLE_H
|
||||
#define _LINUX_RHASHTABLE_H
|
||||
|
||||
#include <linux/atomic.h>
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/jhash.h>
|
||||
|
|
@ -100,6 +101,7 @@ struct rhashtable;
|
|||
* @key_len: Length of key
|
||||
* @key_offset: Offset of key in struct to be hashed
|
||||
* @head_offset: Offset of rhash_head in struct to be hashed
|
||||
* @insecure_max_entries: Maximum number of entries (may be exceeded)
|
||||
* @max_size: Maximum size while expanding
|
||||
* @min_size: Minimum size while shrinking
|
||||
* @nulls_base: Base value to generate nulls marker
|
||||
|
|
@ -115,6 +117,7 @@ struct rhashtable_params {
|
|||
size_t key_len;
|
||||
size_t key_offset;
|
||||
size_t head_offset;
|
||||
unsigned int insecure_max_entries;
|
||||
unsigned int max_size;
|
||||
unsigned int min_size;
|
||||
u32 nulls_base;
|
||||
|
|
@ -286,6 +289,18 @@ static inline bool rht_grow_above_100(const struct rhashtable *ht,
|
|||
(!ht->p.max_size || tbl->size < ht->p.max_size);
|
||||
}
|
||||
|
||||
/**
|
||||
* rht_grow_above_max - returns true if table is above maximum
|
||||
* @ht: hash table
|
||||
* @tbl: current table
|
||||
*/
|
||||
static inline bool rht_grow_above_max(const struct rhashtable *ht,
|
||||
const struct bucket_table *tbl)
|
||||
{
|
||||
return ht->p.insecure_max_entries &&
|
||||
atomic_read(&ht->nelems) >= ht->p.insecure_max_entries;
|
||||
}
|
||||
|
||||
/* The bucket lock is selected based on the hash and protects mutations
|
||||
* on a group of hash buckets.
|
||||
*
|
||||
|
|
@ -589,6 +604,10 @@ restart:
|
|||
goto out;
|
||||
}
|
||||
|
||||
err = -E2BIG;
|
||||
if (unlikely(rht_grow_above_max(ht, tbl)))
|
||||
goto out;
|
||||
|
||||
if (unlikely(rht_grow_above_100(ht, tbl))) {
|
||||
slow_path:
|
||||
spin_unlock_bh(lock);
|
||||
|
|
|
|||
|
|
@ -252,7 +252,7 @@ extern char ___assert_task_state[1 - 2*!!(
|
|||
#define set_task_state(tsk, state_value) \
|
||||
do { \
|
||||
(tsk)->task_state_change = _THIS_IP_; \
|
||||
set_mb((tsk)->state, (state_value)); \
|
||||
smp_store_mb((tsk)->state, (state_value)); \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
|
|
@ -274,7 +274,7 @@ extern char ___assert_task_state[1 - 2*!!(
|
|||
#define set_current_state(state_value) \
|
||||
do { \
|
||||
current->task_state_change = _THIS_IP_; \
|
||||
set_mb(current->state, (state_value)); \
|
||||
smp_store_mb(current->state, (state_value)); \
|
||||
} while (0)
|
||||
|
||||
#else
|
||||
|
|
@ -282,7 +282,7 @@ extern char ___assert_task_state[1 - 2*!!(
|
|||
#define __set_task_state(tsk, state_value) \
|
||||
do { (tsk)->state = (state_value); } while (0)
|
||||
#define set_task_state(tsk, state_value) \
|
||||
set_mb((tsk)->state, (state_value))
|
||||
smp_store_mb((tsk)->state, (state_value))
|
||||
|
||||
/*
|
||||
* set_current_state() includes a barrier so that the write of current->state
|
||||
|
|
@ -298,7 +298,7 @@ extern char ___assert_task_state[1 - 2*!!(
|
|||
#define __set_current_state(state_value) \
|
||||
do { current->state = (state_value); } while (0)
|
||||
#define set_current_state(state_value) \
|
||||
set_mb(current->state, (state_value))
|
||||
smp_store_mb(current->state, (state_value))
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -176,6 +176,7 @@ struct nf_bridge_info {
|
|||
struct net_device *physindev;
|
||||
struct net_device *physoutdev;
|
||||
char neigh_header[8];
|
||||
__be32 ipv4_daddr;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -158,6 +158,8 @@ struct tcp_sock {
|
|||
* sum(delta(snd_una)), or how many bytes
|
||||
* were acked.
|
||||
*/
|
||||
struct u64_stats_sync syncp; /* protects 64bit vars (cf tcp_get_info()) */
|
||||
|
||||
u32 snd_una; /* First byte we want an ack for */
|
||||
u32 snd_sml; /* Last byte of the most recently transmitted small packet */
|
||||
u32 rcv_tstamp; /* timestamp of last received ACK (for keepalives) */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue