Skip to content

Commit

Permalink
13.20.10.75
Browse files Browse the repository at this point in the history
  • Loading branch information
shakalaca committed Mar 11, 2017
1 parent 125a318 commit a49113a
Show file tree
Hide file tree
Showing 37 changed files with 935 additions and 449 deletions.
41 changes: 27 additions & 14 deletions Documentation/sysctl/kernel.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ show up in /proc/sys/kernel:
- overflowuid
- panic
- panic_on_oops
- panic_on_unrecovered_nmi
- panic_on_stackoverflow
- panic_on_unrecovered_nmi
- perf_cpu_time_max_percent
- perf_event_paranoid
- pid_max
- powersave-nap [ PPC only ]
- printk
Expand Down Expand Up @@ -566,19 +568,6 @@ the recommended setting is 60.

==============================================================

panic_on_unrecovered_nmi:

The default Linux behaviour on an NMI of either memory or unknown is
to continue operation. For many environments such as scientific
computing it is preferable that the box is taken out and the error
dealt with than an uncorrected parity/ECC error get propagated.

A small number of systems do generate NMI's for bizarre random reasons
such as power management so the default is off. That sysctl works like
the existing panic controls already in that directory.

==============================================================

panic_on_oops:

Controls the kernel's behaviour when an oops or BUG is encountered.
Expand All @@ -602,6 +591,19 @@ This file shows up if CONFIG_DEBUG_STACKOVERFLOW is enabled.

==============================================================

panic_on_unrecovered_nmi:

The default Linux behaviour on an NMI of either memory or unknown is
to continue operation. For many environments such as scientific
computing it is preferable that the box is taken out and the error
dealt with than an uncorrected parity/ECC error get propagated.

A small number of systems do generate NMI's for bizarre random reasons
such as power management so the default is off. That sysctl works like
the existing panic controls already in that directory.

==============================================================

perf_cpu_time_max_percent:

Hints to the kernel how much CPU time it should be allowed to
Expand All @@ -628,6 +630,17 @@ allowed to execute.

==============================================================

perf_event_paranoid:

Controls use of the performance events system by unprivileged
users (without CAP_SYS_ADMIN). The default value is 1.

-1: Allow use of (almost) all events by all users
>=0: Disallow raw tracepoint access by users without CAP_IOC_LOCK
>=1: Disallow CPU event access by users without CAP_SYS_ADMIN
>=2: Disallow kernel profiling by users without CAP_SYS_ADMIN

==============================================================

pid_max:

Expand Down
1 change: 1 addition & 0 deletions arch/arm64/configs/ze552kl-perf_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,7 @@ CONFIG_DEBUG_SET_MODULE_RONX=y
CONFIG_DEBUG_RODATA=y
CONFIG_SECURITY=y
CONFIG_SECURITY_NETWORK=y
CONFIG_SECURITY_PERF_EVENTS_RESTRICT=y
CONFIG_LSM_MMAP_MIN_ADDR=4096
CONFIG_SECURITY_SELINUX=y
CONFIG_CRYPTO_NULL=y
Expand Down
31 changes: 31 additions & 0 deletions drivers/platform/msm/qpnp-power-on.c
Original file line number Diff line number Diff line change
Expand Up @@ -933,6 +933,32 @@ void set_vib_enable(int value)
printk("ASDF: set vibrator enable. (%s ms)\n", timeout_ms);
}


void pwk_counting(void)
{
struct file *fp = NULL;
mm_segment_t oldfs;
char value[20];
loff_t pos = 0;

fp = filp_open("/asdf/pwk_count", O_RDWR|O_CREAT, 0664);
if(IS_ERR_OR_NULL(fp)) return;

oldfs = get_fs();
set_fs(KERNEL_DS);

if(vfs_read(fp, value, strlen(value), &pos) >= 0) {
sprintf(value,"%ld",simple_strtol(value,NULL,10)+1);
pos = 0;
vfs_write(fp, value, strlen(value), &pos);
}

set_fs(oldfs);
vfs_fsync(fp,0);
filp_close(fp,NULL);
}


#define TIMEOUT_COUNT 55
static struct work_struct __wait_for_power_key_6s_work;
static unsigned long press_time;
Expand Down Expand Up @@ -964,6 +990,9 @@ void wait_for_power_key_6s_work(struct work_struct *work)
if (((i == TIMEOUT_COUNT) || (slow_ok == 1) ||
time_after_eq(jiffies, timeout)) &&
(is_holding_power_key()) && (i > 0)) {

pwk_counting();

duration = (jiffies - startime)*10/HZ;
ASUSEvtlog("ASDF: reset device after power press %d.%d sec (%d)\n",
duration/10, duration%10, i);
Expand All @@ -978,7 +1007,9 @@ void wait_for_power_key_6s_work(struct work_struct *work)
printk(KERN_CRIT "asus_global.ramdump_enable_magic = 0x%x\n",
asus_global.ramdump_enable_magic);
printk("force reset device!!\n");

kernel_restart(NULL);

}

power_key_6s_running = 0;
Expand Down
9 changes: 7 additions & 2 deletions drivers/sensors/rgb_sensor/cm3323e.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,12 @@ static void rgbSensor_setDelay(void)

void rgbSensor_workAround(void)
{
_cm3323e_I2C_Write_Word(CM3323E_ADDR, CM3323E_RESERVE, 0);
RGB_DBG("%s: done\n", __func__);
if (cm_lp_info) {
_cm3323e_I2C_Write_Word(CM3323E_ADDR, CM3323E_RESERVE, 0);
RGB_DBG("%s: done\n", __func__);
} else{
RGB_DBG_E("%s: rgb sensor isn't registered\n", __func__);
}
}

static int rgbSensor_doEnable(bool enabled)
Expand Down Expand Up @@ -1390,6 +1394,7 @@ static int cm3323e_probe(struct i2c_client *client,
err_rgbSensor_setup:
mutex_destroy(&als_enable_mutex);
kfree(lpi);
cm_lp_info = NULL;
return ret;
}

Expand Down
Loading

0 comments on commit a49113a

Please sign in to comment.