Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android
This commit is contained in:
commit
fb99e783cf
15 changed files with 63 additions and 43 deletions
2
Makefile
2
Makefile
|
|
@ -1,6 +1,6 @@
|
|||
VERSION = 4
|
||||
PATCHLEVEL = 4
|
||||
SUBLEVEL = 85
|
||||
SUBLEVEL = 86
|
||||
EXTRAVERSION =
|
||||
NAME = Blurry Fish Butt
|
||||
|
||||
|
|
|
|||
|
|
@ -157,9 +157,11 @@ void fpsimd_thread_switch(struct task_struct *next)
|
|||
|
||||
void fpsimd_flush_thread(void)
|
||||
{
|
||||
preempt_disable();
|
||||
memset(¤t->thread.fpsimd_state, 0, sizeof(struct fpsimd_state));
|
||||
fpsimd_flush_task_state(current);
|
||||
set_thread_flag(TIF_FOREIGN_FPSTATE);
|
||||
preempt_enable();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -366,8 +366,11 @@ retry:
|
|||
* signal first. We do not need to release the mmap_sem because it
|
||||
* would already be released in __lock_page_or_retry in mm/filemap.c.
|
||||
*/
|
||||
if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current))
|
||||
if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current)) {
|
||||
if (!user_mode(regs))
|
||||
goto no_context;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Major/minor page fault accounting is only done on the initial
|
||||
|
|
|
|||
|
|
@ -304,13 +304,13 @@ static inline unsigned type in##bwl##_p(int port) \
|
|||
static inline void outs##bwl(int port, const void *addr, unsigned long count) \
|
||||
{ \
|
||||
asm volatile("rep; outs" #bwl \
|
||||
: "+S"(addr), "+c"(count) : "d"(port)); \
|
||||
: "+S"(addr), "+c"(count) : "d"(port) : "memory"); \
|
||||
} \
|
||||
\
|
||||
static inline void ins##bwl(int port, void *addr, unsigned long count) \
|
||||
{ \
|
||||
asm volatile("rep; ins" #bwl \
|
||||
: "+D"(addr), "+c"(count) : "d"(port)); \
|
||||
: "+D"(addr), "+c"(count) : "d"(port) : "memory"); \
|
||||
}
|
||||
|
||||
BUILDIO(b, b, char)
|
||||
|
|
|
|||
|
|
@ -635,7 +635,8 @@ hsw_unclaimed_reg_detect(struct drm_i915_private *dev_priv)
|
|||
"enabling oneshot unclaimed register reporting. "
|
||||
"Please use i915.mmio_debug=N for more information.\n");
|
||||
__raw_i915_write32(dev_priv, FPGA_DBG, FPGA_DBG_RM_NOCLAIM);
|
||||
i915.mmio_debug = mmio_debug_once--;
|
||||
i915.mmio_debug = mmio_debug_once;
|
||||
mmio_debug_once = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -786,10 +786,6 @@ static int jz4780_i2c_probe(struct platform_device *pdev)
|
|||
|
||||
jz4780_i2c_writew(i2c, JZ4780_I2C_INTM, 0x0);
|
||||
|
||||
i2c->cmd = 0;
|
||||
memset(i2c->cmd_buf, 0, BUFSIZE);
|
||||
memset(i2c->data_buf, 0, BUFSIZE);
|
||||
|
||||
i2c->irq = platform_get_irq(pdev, 0);
|
||||
ret = devm_request_irq(&pdev->dev, i2c->irq, jz4780_i2c_irq, 0,
|
||||
dev_name(&pdev->dev), i2c);
|
||||
|
|
|
|||
|
|
@ -488,7 +488,7 @@ int p54_scan(struct p54_common *priv, u16 mode, u16 dwell)
|
|||
|
||||
entry += sizeof(__le16);
|
||||
chan->pa_points_per_curve = 8;
|
||||
memset(chan->curve_data, 0, sizeof(*chan->curve_data));
|
||||
memset(chan->curve_data, 0, sizeof(chan->curve_data));
|
||||
memcpy(chan->curve_data, entry,
|
||||
sizeof(struct p54_pa_curve_data_sample) *
|
||||
min((u8)8, curve_data->points_per_channel));
|
||||
|
|
|
|||
|
|
@ -66,6 +66,9 @@ const char *rnc_state_name(enum scis_sds_remote_node_context_states state)
|
|||
{
|
||||
static const char * const strings[] = RNC_STATES;
|
||||
|
||||
if (state >= ARRAY_SIZE(strings))
|
||||
return "UNKNOWN";
|
||||
|
||||
return strings[state];
|
||||
}
|
||||
#undef C
|
||||
|
|
|
|||
|
|
@ -1054,7 +1054,10 @@ stop_rr_fcf_flogi:
|
|||
lpfc_sli4_unreg_all_rpis(vport);
|
||||
}
|
||||
}
|
||||
lpfc_issue_reg_vfi(vport);
|
||||
|
||||
/* Do not register VFI if the driver aborted FLOGI */
|
||||
if (!lpfc_error_lost_link(irsp))
|
||||
lpfc_issue_reg_vfi(vport);
|
||||
lpfc_nlp_put(ndlp);
|
||||
goto out;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -153,6 +153,7 @@ typedef struct sg_fd { /* holds the state of a file descriptor */
|
|||
struct sg_device *parentdp; /* owning device */
|
||||
wait_queue_head_t read_wait; /* queue read until command done */
|
||||
rwlock_t rq_list_lock; /* protect access to list in req_arr */
|
||||
struct mutex f_mutex; /* protect against changes in this fd */
|
||||
int timeout; /* defaults to SG_DEFAULT_TIMEOUT */
|
||||
int timeout_user; /* defaults to SG_DEFAULT_TIMEOUT_USER */
|
||||
Sg_scatter_hold reserve; /* buffer held for this file descriptor */
|
||||
|
|
@ -166,6 +167,7 @@ typedef struct sg_fd { /* holds the state of a file descriptor */
|
|||
unsigned char next_cmd_len; /* 0: automatic, >0: use on next write() */
|
||||
char keep_orphan; /* 0 -> drop orphan (def), 1 -> keep for read() */
|
||||
char mmap_called; /* 0 -> mmap() never called on this fd */
|
||||
char res_in_use; /* 1 -> 'reserve' array in use */
|
||||
struct kref f_ref;
|
||||
struct execute_work ew;
|
||||
} Sg_fd;
|
||||
|
|
@ -209,7 +211,6 @@ static void sg_remove_sfp(struct kref *);
|
|||
static Sg_request *sg_get_rq_mark(Sg_fd * sfp, int pack_id);
|
||||
static Sg_request *sg_add_request(Sg_fd * sfp);
|
||||
static int sg_remove_request(Sg_fd * sfp, Sg_request * srp);
|
||||
static int sg_res_in_use(Sg_fd * sfp);
|
||||
static Sg_device *sg_get_dev(int dev);
|
||||
static void sg_device_destroy(struct kref *kref);
|
||||
|
||||
|
|
@ -625,6 +626,7 @@ sg_write(struct file *filp, const char __user *buf, size_t count, loff_t * ppos)
|
|||
}
|
||||
buf += SZ_SG_HEADER;
|
||||
__get_user(opcode, buf);
|
||||
mutex_lock(&sfp->f_mutex);
|
||||
if (sfp->next_cmd_len > 0) {
|
||||
cmd_size = sfp->next_cmd_len;
|
||||
sfp->next_cmd_len = 0; /* reset so only this write() effected */
|
||||
|
|
@ -633,6 +635,7 @@ sg_write(struct file *filp, const char __user *buf, size_t count, loff_t * ppos)
|
|||
if ((opcode >= 0xc0) && old_hdr.twelve_byte)
|
||||
cmd_size = 12;
|
||||
}
|
||||
mutex_unlock(&sfp->f_mutex);
|
||||
SCSI_LOG_TIMEOUT(4, sg_printk(KERN_INFO, sdp,
|
||||
"sg_write: scsi opcode=0x%02x, cmd_size=%d\n", (int) opcode, cmd_size));
|
||||
/* Determine buffer size. */
|
||||
|
|
@ -732,7 +735,7 @@ sg_new_write(Sg_fd *sfp, struct file *file, const char __user *buf,
|
|||
sg_remove_request(sfp, srp);
|
||||
return -EINVAL; /* either MMAP_IO or DIRECT_IO (not both) */
|
||||
}
|
||||
if (sg_res_in_use(sfp)) {
|
||||
if (sfp->res_in_use) {
|
||||
sg_remove_request(sfp, srp);
|
||||
return -EBUSY; /* reserve buffer already being used */
|
||||
}
|
||||
|
|
@ -902,7 +905,7 @@ sg_ioctl(struct file *filp, unsigned int cmd_in, unsigned long arg)
|
|||
return result;
|
||||
if (val) {
|
||||
sfp->low_dma = 1;
|
||||
if ((0 == sfp->low_dma) && (0 == sg_res_in_use(sfp))) {
|
||||
if ((0 == sfp->low_dma) && !sfp->res_in_use) {
|
||||
val = (int) sfp->reserve.bufflen;
|
||||
sg_remove_scat(sfp, &sfp->reserve);
|
||||
sg_build_reserve(sfp, val);
|
||||
|
|
@ -977,12 +980,18 @@ sg_ioctl(struct file *filp, unsigned int cmd_in, unsigned long arg)
|
|||
return -EINVAL;
|
||||
val = min_t(int, val,
|
||||
max_sectors_bytes(sdp->device->request_queue));
|
||||
mutex_lock(&sfp->f_mutex);
|
||||
if (val != sfp->reserve.bufflen) {
|
||||
if (sg_res_in_use(sfp) || sfp->mmap_called)
|
||||
if (sfp->mmap_called ||
|
||||
sfp->res_in_use) {
|
||||
mutex_unlock(&sfp->f_mutex);
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
sg_remove_scat(sfp, &sfp->reserve);
|
||||
sg_build_reserve(sfp, val);
|
||||
}
|
||||
mutex_unlock(&sfp->f_mutex);
|
||||
return 0;
|
||||
case SG_GET_RESERVED_SIZE:
|
||||
val = min_t(int, sfp->reserve.bufflen,
|
||||
|
|
@ -1737,13 +1746,22 @@ sg_start_req(Sg_request *srp, unsigned char *cmd)
|
|||
md = &map_data;
|
||||
|
||||
if (md) {
|
||||
if (!sg_res_in_use(sfp) && dxfer_len <= rsv_schp->bufflen)
|
||||
mutex_lock(&sfp->f_mutex);
|
||||
if (dxfer_len <= rsv_schp->bufflen &&
|
||||
!sfp->res_in_use) {
|
||||
sfp->res_in_use = 1;
|
||||
sg_link_reserve(sfp, srp, dxfer_len);
|
||||
else {
|
||||
} else if ((hp->flags & SG_FLAG_MMAP_IO) && sfp->res_in_use) {
|
||||
mutex_unlock(&sfp->f_mutex);
|
||||
return -EBUSY;
|
||||
} else {
|
||||
res = sg_build_indirect(req_schp, sfp, dxfer_len);
|
||||
if (res)
|
||||
if (res) {
|
||||
mutex_unlock(&sfp->f_mutex);
|
||||
return res;
|
||||
}
|
||||
}
|
||||
mutex_unlock(&sfp->f_mutex);
|
||||
|
||||
md->pages = req_schp->pages;
|
||||
md->page_order = req_schp->page_order;
|
||||
|
|
@ -2034,6 +2052,8 @@ sg_unlink_reserve(Sg_fd * sfp, Sg_request * srp)
|
|||
req_schp->sglist_len = 0;
|
||||
sfp->save_scat_len = 0;
|
||||
srp->res_used = 0;
|
||||
/* Called without mutex lock to avoid deadlock */
|
||||
sfp->res_in_use = 0;
|
||||
}
|
||||
|
||||
static Sg_request *
|
||||
|
|
@ -2145,6 +2165,7 @@ sg_add_sfp(Sg_device * sdp)
|
|||
rwlock_init(&sfp->rq_list_lock);
|
||||
|
||||
kref_init(&sfp->f_ref);
|
||||
mutex_init(&sfp->f_mutex);
|
||||
sfp->timeout = SG_DEFAULT_TIMEOUT;
|
||||
sfp->timeout_user = SG_DEFAULT_TIMEOUT_USER;
|
||||
sfp->force_packid = SG_DEF_FORCE_PACK_ID;
|
||||
|
|
@ -2220,20 +2241,6 @@ sg_remove_sfp(struct kref *kref)
|
|||
schedule_work(&sfp->ew.work);
|
||||
}
|
||||
|
||||
static int
|
||||
sg_res_in_use(Sg_fd * sfp)
|
||||
{
|
||||
const Sg_request *srp;
|
||||
unsigned long iflags;
|
||||
|
||||
read_lock_irqsave(&sfp->rq_list_lock, iflags);
|
||||
for (srp = sfp->headrp; srp; srp = srp->nextrp)
|
||||
if (srp->res_used)
|
||||
break;
|
||||
read_unlock_irqrestore(&sfp->rq_list_lock, iflags);
|
||||
return srp ? 1 : 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SCSI_PROC_FS
|
||||
static int
|
||||
sg_idr_max_id(int id, void *p, void *data)
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ const struct btrfs_raid_attr btrfs_raid_array[BTRFS_NR_RAID_TYPES] = {
|
|||
},
|
||||
};
|
||||
|
||||
const u64 const btrfs_raid_group[BTRFS_NR_RAID_TYPES] = {
|
||||
const u64 btrfs_raid_group[BTRFS_NR_RAID_TYPES] = {
|
||||
[BTRFS_RAID_RAID10] = BTRFS_BLOCK_GROUP_RAID10,
|
||||
[BTRFS_RAID_RAID1] = BTRFS_BLOCK_GROUP_RAID1,
|
||||
[BTRFS_RAID_DUP] = BTRFS_BLOCK_GROUP_DUP,
|
||||
|
|
|
|||
|
|
@ -310,6 +310,7 @@ static inline struct ppa_addr dev_to_generic_addr(struct nvm_dev *dev,
|
|||
{
|
||||
struct ppa_addr l;
|
||||
|
||||
l.ppa = 0;
|
||||
/*
|
||||
* (r.ppa << X offset) & X len bitmask. X eq. blk, pg, etc.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -98,6 +98,12 @@ void __gcov_merge_icall_topn(gcov_type *counters, unsigned int n_counters)
|
|||
}
|
||||
EXPORT_SYMBOL(__gcov_merge_icall_topn);
|
||||
|
||||
void __gcov_exit(void)
|
||||
{
|
||||
/* Unused. */
|
||||
}
|
||||
EXPORT_SYMBOL(__gcov_exit);
|
||||
|
||||
/**
|
||||
* gcov_enable_events - enable event reporting through gcov_event()
|
||||
*
|
||||
|
|
|
|||
|
|
@ -18,7 +18,9 @@
|
|||
#include <linux/vmalloc.h>
|
||||
#include "gcov.h"
|
||||
|
||||
#if __GNUC__ == 5 && __GNUC_MINOR__ >= 1
|
||||
#if (__GNUC__ >= 7)
|
||||
#define GCOV_COUNTERS 9
|
||||
#elif (__GNUC__ > 5) || (__GNUC__ == 5 && __GNUC_MINOR__ >= 1)
|
||||
#define GCOV_COUNTERS 10
|
||||
#elif __GNUC__ == 4 && __GNUC_MINOR__ >= 9
|
||||
#define GCOV_COUNTERS 9
|
||||
|
|
|
|||
|
|
@ -2150,8 +2150,7 @@ vortex_adb_allocroute(vortex_t *vortex, int dma, int nr_ch, int dir,
|
|||
stream->resources, en,
|
||||
VORTEX_RESOURCE_SRC)) < 0) {
|
||||
memset(stream->resources, 0,
|
||||
sizeof(unsigned char) *
|
||||
VORTEX_RESOURCE_LAST);
|
||||
sizeof(stream->resources));
|
||||
return -EBUSY;
|
||||
}
|
||||
if (stream->type != VORTEX_PCM_A3D) {
|
||||
|
|
@ -2161,7 +2160,7 @@ vortex_adb_allocroute(vortex_t *vortex, int dma, int nr_ch, int dir,
|
|||
VORTEX_RESOURCE_MIXIN)) < 0) {
|
||||
memset(stream->resources,
|
||||
0,
|
||||
sizeof(unsigned char) * VORTEX_RESOURCE_LAST);
|
||||
sizeof(stream->resources));
|
||||
return -EBUSY;
|
||||
}
|
||||
}
|
||||
|
|
@ -2174,8 +2173,7 @@ vortex_adb_allocroute(vortex_t *vortex, int dma, int nr_ch, int dir,
|
|||
stream->resources, en,
|
||||
VORTEX_RESOURCE_A3D)) < 0) {
|
||||
memset(stream->resources, 0,
|
||||
sizeof(unsigned char) *
|
||||
VORTEX_RESOURCE_LAST);
|
||||
sizeof(stream->resources));
|
||||
dev_err(vortex->card->dev,
|
||||
"out of A3D sources. Sorry\n");
|
||||
return -EBUSY;
|
||||
|
|
@ -2289,8 +2287,7 @@ vortex_adb_allocroute(vortex_t *vortex, int dma, int nr_ch, int dir,
|
|||
VORTEX_RESOURCE_MIXOUT))
|
||||
< 0) {
|
||||
memset(stream->resources, 0,
|
||||
sizeof(unsigned char) *
|
||||
VORTEX_RESOURCE_LAST);
|
||||
sizeof(stream->resources));
|
||||
return -EBUSY;
|
||||
}
|
||||
if ((src[i] =
|
||||
|
|
@ -2298,8 +2295,7 @@ vortex_adb_allocroute(vortex_t *vortex, int dma, int nr_ch, int dir,
|
|||
stream->resources, en,
|
||||
VORTEX_RESOURCE_SRC)) < 0) {
|
||||
memset(stream->resources, 0,
|
||||
sizeof(unsigned char) *
|
||||
VORTEX_RESOURCE_LAST);
|
||||
sizeof(stream->resources));
|
||||
return -EBUSY;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue