Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/cm-12.1' into cm-12.1_new
Browse files Browse the repository at this point in the history
  • Loading branch information
someone755 committed Feb 15, 2016
2 parents dd0a45f + 28a6663 commit abd0499
Show file tree
Hide file tree
Showing 72 changed files with 1,164 additions and 421 deletions.
6 changes: 6 additions & 0 deletions Documentation/devicetree/bindings/fb/mdss-dsi-panel.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ Optional properties:
"dfps_immediate_porch_mode" = FPS change request is
implemented immediately by changing panel porch
values.
- qcom,min-refresh-rate: Minimum refresh rate supported by the panel.
- qcom,max-refresh-rate: Maximum refresh rate supported by the panel. If max refresh
rate is not specified, then the frame rate of the panel in
qcom,mdss-dsi-panel-framerate is used.
- qcom,mdss-dsi-bl-pmic-control-type: A string that specifies the implementation of backlight
control for this panel.
"bl_ctrl_pwm" = Backlight controlled by PWM gpio.
Expand Down Expand Up @@ -409,6 +413,8 @@ Example:
qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled";
qcom,mdss-dsi-pan-enable-dynamic-fps;
qcom,mdss-dsi-pan-fps-update = "dfps_suspend_resume_mode";
qcom,min-refresh-rate = <30>;
qcom,max-refresh-rate = <60>;
qcom,mdss-dsi-bl-pmic-bank-select = <0>;
qcom,mdss-dsi-bl-pmic-pwm-frequency = <0>;
qcom,mdss-dsi-pwm-gpio = <&pm8941_mpps 5 0>;
Expand Down
17 changes: 17 additions & 0 deletions Documentation/security/keys.txt
Original file line number Diff line number Diff line change
Expand Up @@ -805,6 +805,23 @@ The keyctl syscall functions are:
kernel and resumes executing userspace.


(*) Invalidate a key.

long keyctl(KEYCTL_INVALIDATE, key_serial_t key);

This function marks a key as being invalidated and then wakes up the
garbage collector. The garbage collector immediately removes invalidated
keys from all keyrings and deletes the key when its reference count
reaches zero.

Keys that are marked invalidated become invisible to normal key operations
immediately, though they are still visible in /proc/keys until deleted
(they're marked with an 'i' flag).

A process must have search permission on the key for this function to be
successful.


===============
KERNEL SERVICES
===============
Expand Down
5 changes: 4 additions & 1 deletion arch/arm/boot/dts/dsi-panel-nt35590-720p-video.dtsi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
Expand Down Expand Up @@ -532,6 +532,9 @@
qcom,mdss-dsi-dma-trigger = "trigger_sw";
qcom,mdss-dsi-mdp-trigger = "none";
qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled";
qcom,mdss-dsi-pan-enable-dynamic-fps;
qcom,mdss-dsi-pan-fps-update = "dfps_immediate_porch_mode";
qcom,mdss-dsi-min-refresh-rate = <45>;
qcom,mdss-dsi-reset-sequence = <1 20>, <0 1>, <1 20>;
qcom,mdss-pan-physical-width-dimension = <59>;
qcom,mdss-pan-physical-height-dimension = <104>;
Expand Down
5 changes: 3 additions & 2 deletions arch/arm/boot/dts/dsi-panel-toshiba-720p-video.dtsi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2013,2015 The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
Expand Down Expand Up @@ -89,7 +89,8 @@
qcom,mdss-dsi-mdp-trigger = "none";
qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled";
qcom,mdss-dsi-pan-enable-dynamic-fps;
qcom,mdss-dsi-pan-fps-update = "dfps_suspend_resume_mode";
qcom,mdss-dsi-pan-fps-update = "dfps_immediate_porch_mode";
qcom,mdss-dsi-min-refresh-rate = <45>;
qcom,mdss-dsi-reset-sequence = <1 20>, <0 200>, <1 20>;
};
};
1 change: 1 addition & 0 deletions arch/arm/boot/dts/msm8226.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

adsp_mem: adsp_region {
linux,contiguous-region;
linux,memory-limit = <0x0>;
reg = <0 0x2a00000>;
label = "adsp_mem";
};
Expand Down
1 change: 1 addition & 0 deletions arch/arm/configs/cm_shinano_castor_windy_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -619,3 +619,4 @@ CONFIG_CRYPTO_TWOFISH=y
CONFIG_CRYPTO_ANSI_CPRNG=y
CONFIG_CRYPTO_DEV_QCE=y
CONFIG_CRYPTO_DEV_QCEDEV=y
CONFIG_MMC_ENABLE_CACHECTRL_SKHYNIX=y
75 changes: 50 additions & 25 deletions drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,10 @@ static void md_make_request(struct request_queue *q, struct bio *bio)
bio_io_error(bio);
return;
}
if (mddev->ro == 1 && unlikely(rw == WRITE)) {
bio_endio(bio, bio_sectors(bio) == 0 ? 0 : -EROFS);
return;
}
smp_rmb(); /* Ensure implications of 'active' are visible */
rcu_read_lock();
if (mddev->suspended) {
Expand Down Expand Up @@ -452,7 +456,7 @@ static void submit_flushes(struct work_struct *ws)
atomic_inc(&rdev->nr_pending);
atomic_inc(&rdev->nr_pending);
rcu_read_unlock();
bi = bio_alloc_mddev(GFP_KERNEL, 0, mddev);
bi = bio_alloc_mddev(GFP_NOIO, 0, mddev);
bi->bi_end_io = md_end_flush;
bi->bi_private = rdev;
bi->bi_bdev = rdev->bdev;
Expand Down Expand Up @@ -1143,8 +1147,11 @@ static int super_90_load(struct md_rdev *rdev, struct md_rdev *refdev, int minor
ret = 0;
}
rdev->sectors = rdev->sb_start;
/* Limit to 4TB as metadata cannot record more than that */
if (rdev->sectors >= (2ULL << 32))
/* Limit to 4TB as metadata cannot record more than that.
* (not needed for Linear and RAID0 as metadata doesn't
* record this size)
*/
if (rdev->sectors >= (2ULL << 32) && sb->level >= 1)
rdev->sectors = (2ULL << 32) - 2;

if (rdev->sectors < ((sector_t)sb->size) * 2 && sb->level >= 1)
Expand Down Expand Up @@ -1426,7 +1433,7 @@ super_90_rdev_size_change(struct md_rdev *rdev, sector_t num_sectors)
/* Limit to 4TB as metadata cannot record more than that.
* 4TB == 2^32 KB, or 2*2^32 sectors.
*/
if (num_sectors >= (2ULL << 32))
if (num_sectors >= (2ULL << 32) && rdev->mddev->level >= 1)
num_sectors = (2ULL << 32) - 2;
md_super_write(rdev->mddev, rdev, rdev->sb_start, rdev->sb_size,
rdev->sb_page);
Expand Down Expand Up @@ -1802,10 +1809,10 @@ static void super_1_sync(struct mddev *mddev, struct md_rdev *rdev)
memset(bbp, 0xff, PAGE_SIZE);

for (i = 0 ; i < bb->count ; i++) {
u64 internal_bb = *p++;
u64 internal_bb = p[i];
u64 store_bb = ((BB_OFFSET(internal_bb) << 10)
| BB_LEN(internal_bb));
*bbp++ = cpu_to_le64(store_bb);
bbp[i] = cpu_to_le64(store_bb);
}
bb->changed = 0;
if (read_seqretry(&bb->lock, seq))
Expand Down Expand Up @@ -2879,6 +2886,9 @@ rdev_size_store(struct md_rdev *rdev, const char *buf, size_t len)
} else if (!sectors)
sectors = (i_size_read(rdev->bdev->bd_inode) >> 9) -
rdev->data_offset;
if (!my_mddev->pers->resize)
/* Cannot change size for RAID0 or Linear etc */
return -EINVAL;
}
if (sectors < my_mddev->dev_sectors)
return -EINVAL; /* component must fit device */
Expand Down Expand Up @@ -3744,8 +3754,8 @@ array_state_show(struct mddev *mddev, char *page)
return sprintf(page, "%s\n", array_states[st]);
}

static int do_md_stop(struct mddev * mddev, int ro, int is_open);
static int md_set_readonly(struct mddev * mddev, int is_open);
static int do_md_stop(struct mddev * mddev, int ro, struct block_device *bdev);
static int md_set_readonly(struct mddev * mddev, struct block_device *bdev);
static int do_md_run(struct mddev * mddev);
static int restart_array(struct mddev *mddev);

Expand All @@ -3761,22 +3771,22 @@ array_state_store(struct mddev *mddev, const char *buf, size_t len)
/* stopping an active array */
if (atomic_read(&mddev->openers) > 0)
return -EBUSY;
err = do_md_stop(mddev, 0, 0);
err = do_md_stop(mddev, 0, NULL);
break;
case inactive:
/* stopping an active array */
if (mddev->pers) {
if (atomic_read(&mddev->openers) > 0)
return -EBUSY;
err = do_md_stop(mddev, 2, 0);
err = do_md_stop(mddev, 2, NULL);
} else
err = 0; /* already inactive */
break;
case suspended:
break; /* not supported yet */
case readonly:
if (mddev->pers)
err = md_set_readonly(mddev, 0);
err = md_set_readonly(mddev, NULL);
else {
mddev->ro = 1;
set_disk_ro(mddev->gendisk, 1);
Expand All @@ -3786,7 +3796,7 @@ array_state_store(struct mddev *mddev, const char *buf, size_t len)
case read_auto:
if (mddev->pers) {
if (mddev->ro == 0)
err = md_set_readonly(mddev, 0);
err = md_set_readonly(mddev, NULL);
else if (mddev->ro == 1)
err = restart_array(mddev);
if (err == 0) {
Expand Down Expand Up @@ -5124,15 +5134,17 @@ void md_stop(struct mddev *mddev)
}
EXPORT_SYMBOL_GPL(md_stop);

static int md_set_readonly(struct mddev *mddev, int is_open)
static int md_set_readonly(struct mddev *mddev, struct block_device *bdev)
{
int err = 0;
mutex_lock(&mddev->open_mutex);
if (atomic_read(&mddev->openers) > is_open) {
if (atomic_read(&mddev->openers) > !!bdev) {
printk("md: %s still in use.\n",mdname(mddev));
err = -EBUSY;
goto out;
}
if (bdev)
sync_blockdev(bdev);
if (mddev->pers) {
__md_stop_writes(mddev);

Expand All @@ -5154,18 +5166,26 @@ static int md_set_readonly(struct mddev *mddev, int is_open)
* 0 - completely stop and dis-assemble array
* 2 - stop but do not disassemble array
*/
static int do_md_stop(struct mddev * mddev, int mode, int is_open)
static int do_md_stop(struct mddev * mddev, int mode,
struct block_device *bdev)
{
struct gendisk *disk = mddev->gendisk;
struct md_rdev *rdev;

mutex_lock(&mddev->open_mutex);
if (atomic_read(&mddev->openers) > is_open ||
if (atomic_read(&mddev->openers) > !!bdev ||
mddev->sysfs_active) {
printk("md: %s still in use.\n",mdname(mddev));
mutex_unlock(&mddev->open_mutex);
return -EBUSY;
}
if (bdev)
/* It is possible IO was issued on some other
* open file which was closed before we took ->open_mutex.
* As that was not the last close __blkdev_put will not
* have called sync_blockdev, so we must.
*/
sync_blockdev(bdev);

if (mddev->pers) {
if (mddev->ro)
Expand Down Expand Up @@ -5239,7 +5259,7 @@ static void autorun_array(struct mddev *mddev)
err = do_md_run(mddev);
if (err) {
printk(KERN_WARNING "md: do_md_run() returned %d\n", err);
do_md_stop(mddev, 0, 0);
do_md_stop(mddev, 0, NULL);
}
}

Expand Down Expand Up @@ -5413,9 +5433,9 @@ static int get_bitmap_file(struct mddev * mddev, void __user * arg)
int err = -ENOMEM;

if (md_allow_write(mddev))
file = kmalloc(sizeof(*file), GFP_NOIO);
file = kzalloc(sizeof(*file), GFP_NOIO);
else
file = kmalloc(sizeof(*file), GFP_KERNEL);
file = kzalloc(sizeof(*file), GFP_KERNEL);

if (!file)
goto out;
Expand Down Expand Up @@ -6237,11 +6257,11 @@ static int md_ioctl(struct block_device *bdev, fmode_t mode,
goto done_unlock;

case STOP_ARRAY:
err = do_md_stop(mddev, 0, 1);
err = do_md_stop(mddev, 0, bdev);
goto done_unlock;

case STOP_ARRAY_RO:
err = md_set_readonly(mddev, 1);
err = md_set_readonly(mddev, bdev);
goto done_unlock;

case BLKROSET:
Expand Down Expand Up @@ -7407,6 +7427,8 @@ static int remove_and_add_spares(struct mddev *mddev)
}
}
}
if (removed)
set_bit(MD_CHANGE_DEVS, &mddev->flags);
return spares;
}

Expand All @@ -7420,9 +7442,11 @@ static void reap_sync_thread(struct mddev *mddev)
!test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery)) {
/* success...*/
/* activate any spares */
if (mddev->pers->spare_active(mddev))
if (mddev->pers->spare_active(mddev)) {
sysfs_notify(&mddev->kobj, NULL,
"degraded");
set_bit(MD_CHANGE_DEVS, &mddev->flags);
}
}
if (test_bit(MD_RECOVERY_RESHAPE, &mddev->recovery) &&
mddev->pers->finish_reshape)
Expand Down Expand Up @@ -7677,9 +7701,9 @@ int md_is_badblock(struct badblocks *bb, sector_t s, int sectors,
sector_t *first_bad, int *bad_sectors)
{
int hi;
int lo = 0;
int lo;
u64 *p = bb->page;
int rv = 0;
int rv;
sector_t target = s + sectors;
unsigned seq;

Expand All @@ -7694,7 +7718,8 @@ int md_is_badblock(struct badblocks *bb, sector_t s, int sectors,

retry:
seq = read_seqbegin(&bb->lock);

lo = 0;
rv = 0;
hi = bb->count;

/* Binary search between lo and hi for 'target'
Expand Down
3 changes: 2 additions & 1 deletion drivers/md/raid0.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,8 @@ static sector_t raid0_size(struct mddev *mddev, sector_t sectors, int raid_disks
"%s does not support generic reshape\n", __func__);

rdev_for_each(rdev, mddev)
array_sectors += rdev->sectors;
array_sectors += (rdev->sectors &
~(sector_t)(mddev->chunk_sectors-1));

return array_sectors;
}
Expand Down
8 changes: 4 additions & 4 deletions drivers/misc/qseecom.c
Original file line number Diff line number Diff line change
Expand Up @@ -1183,7 +1183,7 @@ static int qseecom_unload_app(struct qseecom_dev_handle *data,
return -EFAULT;
}
if (resp.result == QSEOS_RESULT_SUCCESS)
pr_info("App (%d) is unloaded!!\n",
pr_debug("App (%d) is unloaded!!\n",
data->client.app_id);
__qseecom_cleanup_app(data);
if (resp.result == QSEOS_RESULT_INCOMPLETE) {
Expand All @@ -1204,10 +1204,10 @@ static int qseecom_unload_app(struct qseecom_dev_handle *data,
} else {
if (ptr_app->ref_cnt == 1) {
ptr_app->ref_cnt = 0;
pr_info("ref_count set to 0\n");
pr_debug("ref_count set to 0\n");
} else {
ptr_app->ref_cnt--;
pr_info("Can't unload app(%d) inuse\n",
pr_debug("Can't unload app(%d) inuse\n",
ptr_app->app_id);
}
}
Expand Down Expand Up @@ -4114,7 +4114,7 @@ static int qseecom_release(struct inode *inode, struct file *file)
int ret = 0;

if (data->released == false) {
pr_warn("data: released = false, type = %d, data = 0x%x\n",
pr_debug("data: released = false, type = %d, data = 0x%x\n",
data->type, (u32)data);
switch (data->type) {
case QSEECOM_LISTENER_SERVICE:
Expand Down
4 changes: 0 additions & 4 deletions drivers/mmc/card/block.c
Original file line number Diff line number Diff line change
Expand Up @@ -3243,14 +3243,12 @@ static void mmc_blk_shutdown(struct mmc_card *card)
}
}

#ifdef CONFIG_MMC_CACHE_FEATURE
mmc_claim_host(card->host);
/* send cache off control */
rc = mmc_cache_ctrl(card->host, 0);
mmc_release_host(card->host);
if (rc)
goto cache_off_error;
#endif

/* send power off notification */
if (mmc_card_mmc(card)) {
Expand All @@ -3266,13 +3264,11 @@ static void mmc_blk_shutdown(struct mmc_card *card)
suspend_error:
pr_err("%s: mmc_queue_suspend returned error = %d",
mmc_hostname(card->host), rc);
#ifdef CONFIG_MMC_CACHE_FEATURE
return;

cache_off_error:
pr_err("%s: mmc_cache_ctrl returned error = %d",
mmc_hostname(card->host), rc);
#endif
}

#ifdef CONFIG_PM
Expand Down
Loading

0 comments on commit abd0499

Please sign in to comment.