mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-03 09:41:54 +09:00
Merge tag 'v3.10.35' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into odroidc-3.10.y
This is the 3.10.35 stable release Change-Id: I79cba01b7f2cb25ac74af95a6543e3731c098e46
This commit is contained in:
2
Makefile
2
Makefile
@@ -1,6 +1,6 @@
|
||||
VERSION = 3
|
||||
PATCHLEVEL = 10
|
||||
SUBLEVEL = 34
|
||||
SUBLEVEL = 35
|
||||
EXTRAVERSION =
|
||||
NAME = TOSSUG Baby Fish
|
||||
|
||||
|
||||
@@ -37,10 +37,10 @@ struct outer_cache_fns {
|
||||
void (*resume)(void);
|
||||
};
|
||||
|
||||
#ifdef CONFIG_OUTER_CACHE
|
||||
|
||||
extern struct outer_cache_fns outer_cache;
|
||||
|
||||
#ifdef CONFIG_OUTER_CACHE
|
||||
|
||||
static inline void outer_inv_range(phys_addr_t start, phys_addr_t end)
|
||||
{
|
||||
if (outer_cache.inv_range)
|
||||
|
||||
@@ -65,14 +65,12 @@ void highbank_set_cpu_jump(int cpu, void *jump_addr)
|
||||
HB_JUMP_TABLE_PHYS(cpu) + 15);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CACHE_L2X0
|
||||
static void highbank_l2x0_disable(void)
|
||||
{
|
||||
outer_flush_all();
|
||||
/* Disable PL310 L2 Cache controller */
|
||||
highbank_smc1(0x102, 0x0);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void __init highbank_init_irq(void)
|
||||
{
|
||||
@@ -81,12 +79,13 @@ static void __init highbank_init_irq(void)
|
||||
if (of_find_compatible_node(NULL, NULL, "arm,cortex-a9"))
|
||||
highbank_scu_map_io();
|
||||
|
||||
#ifdef CONFIG_CACHE_L2X0
|
||||
/* Enable PL310 L2 Cache controller */
|
||||
highbank_smc1(0x102, 0x1);
|
||||
l2x0_of_init(0, ~0UL);
|
||||
outer_cache.disable = highbank_l2x0_disable;
|
||||
#endif
|
||||
if (IS_ENABLED(CONFIG_CACHE_L2X0) &&
|
||||
of_find_compatible_node(NULL, NULL, "arm,pl310-cache")) {
|
||||
highbank_smc1(0x102, 0x1);
|
||||
l2x0_of_init(0, ~0UL);
|
||||
outer_cache.disable = highbank_l2x0_disable;
|
||||
}
|
||||
}
|
||||
|
||||
static void __init highbank_timer_init(void)
|
||||
|
||||
@@ -2585,6 +2585,9 @@ static int __direct_map(struct kvm_vcpu *vcpu, gpa_t v, int write,
|
||||
int emulate = 0;
|
||||
gfn_t pseudo_gfn;
|
||||
|
||||
if (!VALID_PAGE(vcpu->arch.mmu.root_hpa))
|
||||
return 0;
|
||||
|
||||
for_each_shadow_entry(vcpu, (u64)gfn << PAGE_SHIFT, iterator) {
|
||||
if (iterator.level == level) {
|
||||
mmu_set_spte(vcpu, iterator.sptep, ACC_ALL,
|
||||
@@ -2748,6 +2751,9 @@ static bool fast_page_fault(struct kvm_vcpu *vcpu, gva_t gva, int level,
|
||||
bool ret = false;
|
||||
u64 spte = 0ull;
|
||||
|
||||
if (!VALID_PAGE(vcpu->arch.mmu.root_hpa))
|
||||
return false;
|
||||
|
||||
if (!page_fault_can_be_fast(vcpu, error_code))
|
||||
return false;
|
||||
|
||||
@@ -3139,6 +3145,9 @@ static u64 walk_shadow_page_get_mmio_spte(struct kvm_vcpu *vcpu, u64 addr)
|
||||
struct kvm_shadow_walk_iterator iterator;
|
||||
u64 spte = 0ull;
|
||||
|
||||
if (!VALID_PAGE(vcpu->arch.mmu.root_hpa))
|
||||
return spte;
|
||||
|
||||
walk_shadow_page_lockless_begin(vcpu);
|
||||
for_each_shadow_entry_lockless(vcpu, addr, iterator, spte)
|
||||
if (!is_shadow_present_pte(spte))
|
||||
@@ -4329,6 +4338,9 @@ int kvm_mmu_get_spte_hierarchy(struct kvm_vcpu *vcpu, u64 addr, u64 sptes[4])
|
||||
u64 spte;
|
||||
int nr_sptes = 0;
|
||||
|
||||
if (!VALID_PAGE(vcpu->arch.mmu.root_hpa))
|
||||
return nr_sptes;
|
||||
|
||||
walk_shadow_page_lockless_begin(vcpu);
|
||||
for_each_shadow_entry_lockless(vcpu, addr, iterator, spte) {
|
||||
sptes[iterator.level-1] = spte;
|
||||
|
||||
@@ -423,6 +423,9 @@ static int FNAME(fetch)(struct kvm_vcpu *vcpu, gva_t addr,
|
||||
if (FNAME(gpte_changed)(vcpu, gw, top_level))
|
||||
goto out_gpte_changed;
|
||||
|
||||
if (!VALID_PAGE(vcpu->arch.mmu.root_hpa))
|
||||
goto out_gpte_changed;
|
||||
|
||||
for (shadow_walk_init(&it, vcpu, addr);
|
||||
shadow_walk_okay(&it) && it.level > gw->level;
|
||||
shadow_walk_next(&it)) {
|
||||
@@ -671,6 +674,11 @@ static void FNAME(invlpg)(struct kvm_vcpu *vcpu, gva_t gva)
|
||||
*/
|
||||
mmu_topup_memory_caches(vcpu);
|
||||
|
||||
if (!VALID_PAGE(vcpu->arch.mmu.root_hpa)) {
|
||||
WARN_ON(1);
|
||||
return;
|
||||
}
|
||||
|
||||
spin_lock(&vcpu->kvm->mmu_lock);
|
||||
for_each_shadow_entry(vcpu, gva, iterator) {
|
||||
level = iterator.level;
|
||||
|
||||
@@ -7133,8 +7133,8 @@ static void vmx_free_vcpu(struct kvm_vcpu *vcpu)
|
||||
struct vcpu_vmx *vmx = to_vmx(vcpu);
|
||||
|
||||
free_vpid(vmx);
|
||||
free_nested(vmx);
|
||||
free_loaded_vmcs(vmx->loaded_vmcs);
|
||||
free_nested(vmx);
|
||||
kfree(vmx->guest_msrs);
|
||||
kvm_vcpu_uninit(vcpu);
|
||||
kmem_cache_free(kvm_vcpu_cache, vmx);
|
||||
|
||||
@@ -140,7 +140,7 @@ bpf_slow_path_byte_msh:
|
||||
push %r9; \
|
||||
push SKBDATA; \
|
||||
/* rsi already has offset */ \
|
||||
mov $SIZE,%ecx; /* size */ \
|
||||
mov $SIZE,%edx; /* size */ \
|
||||
call bpf_internal_load_pointer_neg_helper; \
|
||||
test %rax,%rax; \
|
||||
pop SKBDATA; \
|
||||
|
||||
@@ -486,6 +486,7 @@ static void elantech_input_sync_v4(struct psmouse *psmouse)
|
||||
unsigned char *packet = psmouse->packet;
|
||||
|
||||
input_report_key(dev, BTN_LEFT, packet[0] & 0x01);
|
||||
input_report_key(dev, BTN_RIGHT, packet[0] & 0x02);
|
||||
input_mt_report_pointer_emulation(dev, true);
|
||||
input_sync(dev);
|
||||
}
|
||||
@@ -953,6 +954,44 @@ static int elantech_get_resolution_v4(struct psmouse *psmouse,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Advertise INPUT_PROP_BUTTONPAD for clickpads. The testing of bit 12 in
|
||||
* fw_version for this is based on the following fw_version & caps table:
|
||||
*
|
||||
* Laptop-model: fw_version: caps: buttons:
|
||||
* Acer S3 0x461f00 10, 13, 0e clickpad
|
||||
* Acer S7-392 0x581f01 50, 17, 0d clickpad
|
||||
* Acer V5-131 0x461f02 01, 16, 0c clickpad
|
||||
* Acer V5-551 0x461f00 ? clickpad
|
||||
* Asus K53SV 0x450f01 78, 15, 0c 2 hw buttons
|
||||
* Asus G46VW 0x460f02 00, 18, 0c 2 hw buttons
|
||||
* Asus G750JX 0x360f00 00, 16, 0c 2 hw buttons
|
||||
* Asus UX31 0x361f00 20, 15, 0e clickpad
|
||||
* Asus UX32VD 0x361f02 00, 15, 0e clickpad
|
||||
* Avatar AVIU-145A2 0x361f00 ? clickpad
|
||||
* Gigabyte U2442 0x450f01 58, 17, 0c 2 hw buttons
|
||||
* Lenovo L430 0x350f02 b9, 15, 0c 2 hw buttons (*)
|
||||
* Samsung NF210 0x150b00 78, 14, 0a 2 hw buttons
|
||||
* Samsung NP770Z5E 0x575f01 10, 15, 0f clickpad
|
||||
* Samsung NP700Z5B 0x361f06 21, 15, 0f clickpad
|
||||
* Samsung NP900X3E-A02 0x575f03 ? clickpad
|
||||
* Samsung NP-QX410 0x851b00 19, 14, 0c clickpad
|
||||
* Samsung RC512 0x450f00 08, 15, 0c 2 hw buttons
|
||||
* Samsung RF710 0x450f00 ? 2 hw buttons
|
||||
* System76 Pangolin 0x250f01 ? 2 hw buttons
|
||||
* (*) + 3 trackpoint buttons
|
||||
*/
|
||||
static void elantech_set_buttonpad_prop(struct psmouse *psmouse)
|
||||
{
|
||||
struct input_dev *dev = psmouse->dev;
|
||||
struct elantech_data *etd = psmouse->private;
|
||||
|
||||
if (etd->fw_version & 0x001000) {
|
||||
__set_bit(INPUT_PROP_BUTTONPAD, dev->propbit);
|
||||
__clear_bit(BTN_RIGHT, dev->keybit);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Set the appropriate event bits for the input subsystem
|
||||
*/
|
||||
@@ -996,6 +1035,8 @@ static int elantech_set_input_params(struct psmouse *psmouse)
|
||||
__set_bit(INPUT_PROP_SEMI_MT, dev->propbit);
|
||||
/* fall through */
|
||||
case 3:
|
||||
if (etd->hw_version == 3)
|
||||
elantech_set_buttonpad_prop(psmouse);
|
||||
input_set_abs_params(dev, ABS_X, x_min, x_max, 0, 0);
|
||||
input_set_abs_params(dev, ABS_Y, y_min, y_max, 0, 0);
|
||||
if (etd->reports_pressure) {
|
||||
@@ -1017,9 +1058,7 @@ static int elantech_set_input_params(struct psmouse *psmouse)
|
||||
*/
|
||||
psmouse_warn(psmouse, "couldn't query resolution data.\n");
|
||||
}
|
||||
/* v4 is clickpad, with only one button. */
|
||||
__set_bit(INPUT_PROP_BUTTONPAD, dev->propbit);
|
||||
__clear_bit(BTN_RIGHT, dev->keybit);
|
||||
elantech_set_buttonpad_prop(psmouse);
|
||||
__set_bit(BTN_TOOL_QUADTAP, dev->keybit);
|
||||
/* For X to recognize me as touchpad. */
|
||||
input_set_abs_params(dev, ABS_X, x_min, x_max, 0, 0);
|
||||
|
||||
@@ -339,7 +339,7 @@ static int wacom_parse_hid(struct usb_interface *intf,
|
||||
struct usb_device *dev = interface_to_usbdev(intf);
|
||||
char limit = 0;
|
||||
/* result has to be defined as int for some devices */
|
||||
int result = 0;
|
||||
int result = 0, touch_max = 0;
|
||||
int i = 0, usage = WCM_UNDEFINED, finger = 0, pen = 0;
|
||||
unsigned char *report;
|
||||
|
||||
@@ -386,7 +386,8 @@ static int wacom_parse_hid(struct usb_interface *intf,
|
||||
if (usage == WCM_DESKTOP) {
|
||||
if (finger) {
|
||||
features->device_type = BTN_TOOL_FINGER;
|
||||
|
||||
/* touch device at least supports one touch point */
|
||||
touch_max = 1;
|
||||
switch (features->type) {
|
||||
case TABLETPC2FG:
|
||||
features->pktlen = WACOM_PKGLEN_TPC2FG;
|
||||
@@ -539,6 +540,8 @@ static int wacom_parse_hid(struct usb_interface *intf,
|
||||
}
|
||||
|
||||
out:
|
||||
if (!features->touch_max && touch_max)
|
||||
features->touch_max = touch_max;
|
||||
result = 0;
|
||||
kfree(report);
|
||||
return result;
|
||||
|
||||
@@ -327,13 +327,16 @@ void cx18_read_eeprom(struct cx18 *cx, struct tveeprom *tv)
|
||||
struct i2c_client *c;
|
||||
u8 eedata[256];
|
||||
|
||||
memset(tv, 0, sizeof(*tv));
|
||||
|
||||
c = kzalloc(sizeof(*c), GFP_KERNEL);
|
||||
if (!c)
|
||||
return;
|
||||
|
||||
strlcpy(c->name, "cx18 tveeprom tmp", sizeof(c->name));
|
||||
c->adapter = &cx->i2c_adap[0];
|
||||
c->addr = 0xa0 >> 1;
|
||||
|
||||
memset(tv, 0, sizeof(*tv));
|
||||
if (tveeprom_read(c, eedata, sizeof(eedata)))
|
||||
goto ret;
|
||||
|
||||
|
||||
@@ -149,6 +149,7 @@ static int cxusb_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[],
|
||||
int num)
|
||||
{
|
||||
struct dvb_usb_device *d = i2c_get_adapdata(adap);
|
||||
int ret;
|
||||
int i;
|
||||
|
||||
if (mutex_lock_interruptible(&d->i2c_mutex) < 0)
|
||||
@@ -173,7 +174,8 @@ static int cxusb_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[],
|
||||
if (1 + msg[i].len > sizeof(ibuf)) {
|
||||
warn("i2c rd: len=%d is too big!\n",
|
||||
msg[i].len);
|
||||
return -EOPNOTSUPP;
|
||||
ret = -EOPNOTSUPP;
|
||||
goto unlock;
|
||||
}
|
||||
obuf[0] = 0;
|
||||
obuf[1] = msg[i].len;
|
||||
@@ -193,12 +195,14 @@ static int cxusb_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[],
|
||||
if (3 + msg[i].len > sizeof(obuf)) {
|
||||
warn("i2c wr: len=%d is too big!\n",
|
||||
msg[i].len);
|
||||
return -EOPNOTSUPP;
|
||||
ret = -EOPNOTSUPP;
|
||||
goto unlock;
|
||||
}
|
||||
if (1 + msg[i + 1].len > sizeof(ibuf)) {
|
||||
warn("i2c rd: len=%d is too big!\n",
|
||||
msg[i + 1].len);
|
||||
return -EOPNOTSUPP;
|
||||
ret = -EOPNOTSUPP;
|
||||
goto unlock;
|
||||
}
|
||||
obuf[0] = msg[i].len;
|
||||
obuf[1] = msg[i+1].len;
|
||||
@@ -223,7 +227,8 @@ static int cxusb_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[],
|
||||
if (2 + msg[i].len > sizeof(obuf)) {
|
||||
warn("i2c wr: len=%d is too big!\n",
|
||||
msg[i].len);
|
||||
return -EOPNOTSUPP;
|
||||
ret = -EOPNOTSUPP;
|
||||
goto unlock;
|
||||
}
|
||||
obuf[0] = msg[i].addr;
|
||||
obuf[1] = msg[i].len;
|
||||
@@ -237,8 +242,14 @@ static int cxusb_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[],
|
||||
}
|
||||
}
|
||||
|
||||
if (i == num)
|
||||
ret = num;
|
||||
else
|
||||
ret = -EREMOTEIO;
|
||||
|
||||
unlock:
|
||||
mutex_unlock(&d->i2c_mutex);
|
||||
return i == num ? num : -EREMOTEIO;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static u32 cxusb_i2c_func(struct i2c_adapter *adapter)
|
||||
|
||||
@@ -301,6 +301,7 @@ static int dw2102_serit_i2c_transfer(struct i2c_adapter *adap,
|
||||
static int dw2102_earda_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[], int num)
|
||||
{
|
||||
struct dvb_usb_device *d = i2c_get_adapdata(adap);
|
||||
int ret;
|
||||
|
||||
if (!d)
|
||||
return -ENODEV;
|
||||
@@ -316,7 +317,8 @@ static int dw2102_earda_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg ms
|
||||
if (2 + msg[1].len > sizeof(ibuf)) {
|
||||
warn("i2c rd: len=%d is too big!\n",
|
||||
msg[1].len);
|
||||
return -EOPNOTSUPP;
|
||||
ret = -EOPNOTSUPP;
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
obuf[0] = msg[0].addr << 1;
|
||||
@@ -340,7 +342,8 @@ static int dw2102_earda_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg ms
|
||||
if (2 + msg[0].len > sizeof(obuf)) {
|
||||
warn("i2c wr: len=%d is too big!\n",
|
||||
msg[1].len);
|
||||
return -EOPNOTSUPP;
|
||||
ret = -EOPNOTSUPP;
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
obuf[0] = msg[0].addr << 1;
|
||||
@@ -357,7 +360,8 @@ static int dw2102_earda_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg ms
|
||||
if (2 + msg[0].len > sizeof(obuf)) {
|
||||
warn("i2c wr: len=%d is too big!\n",
|
||||
msg[1].len);
|
||||
return -EOPNOTSUPP;
|
||||
ret = -EOPNOTSUPP;
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
obuf[0] = msg[0].addr << 1;
|
||||
@@ -386,15 +390,17 @@ static int dw2102_earda_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg ms
|
||||
|
||||
break;
|
||||
}
|
||||
ret = num;
|
||||
|
||||
unlock:
|
||||
mutex_unlock(&d->i2c_mutex);
|
||||
return num;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int dw2104_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[], int num)
|
||||
{
|
||||
struct dvb_usb_device *d = i2c_get_adapdata(adap);
|
||||
int len, i, j;
|
||||
int len, i, j, ret;
|
||||
|
||||
if (!d)
|
||||
return -ENODEV;
|
||||
@@ -430,7 +436,8 @@ static int dw2104_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[], i
|
||||
if (2 + msg[j].len > sizeof(ibuf)) {
|
||||
warn("i2c rd: len=%d is too big!\n",
|
||||
msg[j].len);
|
||||
return -EOPNOTSUPP;
|
||||
ret = -EOPNOTSUPP;
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
dw210x_op_rw(d->udev, 0xc3,
|
||||
@@ -466,7 +473,8 @@ static int dw2104_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[], i
|
||||
if (2 + msg[j].len > sizeof(obuf)) {
|
||||
warn("i2c wr: len=%d is too big!\n",
|
||||
msg[j].len);
|
||||
return -EOPNOTSUPP;
|
||||
ret = -EOPNOTSUPP;
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
obuf[0] = msg[j].addr << 1;
|
||||
@@ -481,15 +489,18 @@ static int dw2104_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[], i
|
||||
}
|
||||
|
||||
}
|
||||
ret = num;
|
||||
|
||||
unlock:
|
||||
mutex_unlock(&d->i2c_mutex);
|
||||
return num;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int dw3101_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
|
||||
int num)
|
||||
{
|
||||
struct dvb_usb_device *d = i2c_get_adapdata(adap);
|
||||
int ret;
|
||||
int i;
|
||||
|
||||
if (!d)
|
||||
@@ -506,7 +517,8 @@ static int dw3101_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
|
||||
if (2 + msg[1].len > sizeof(ibuf)) {
|
||||
warn("i2c rd: len=%d is too big!\n",
|
||||
msg[1].len);
|
||||
return -EOPNOTSUPP;
|
||||
ret = -EOPNOTSUPP;
|
||||
goto unlock;
|
||||
}
|
||||
obuf[0] = msg[0].addr << 1;
|
||||
obuf[1] = msg[0].len;
|
||||
@@ -530,7 +542,8 @@ static int dw3101_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
|
||||
if (2 + msg[0].len > sizeof(obuf)) {
|
||||
warn("i2c wr: len=%d is too big!\n",
|
||||
msg[0].len);
|
||||
return -EOPNOTSUPP;
|
||||
ret = -EOPNOTSUPP;
|
||||
goto unlock;
|
||||
}
|
||||
obuf[0] = msg[0].addr << 1;
|
||||
obuf[1] = msg[0].len;
|
||||
@@ -556,9 +569,11 @@ static int dw3101_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
|
||||
msg[i].flags == 0 ? ">>>" : "<<<");
|
||||
debug_dump(msg[i].buf, msg[i].len, deb_xfer);
|
||||
}
|
||||
ret = num;
|
||||
|
||||
unlock:
|
||||
mutex_unlock(&d->i2c_mutex);
|
||||
return num;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int s6x0_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
|
||||
@@ -566,7 +581,7 @@ static int s6x0_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
|
||||
{
|
||||
struct dvb_usb_device *d = i2c_get_adapdata(adap);
|
||||
struct usb_device *udev;
|
||||
int len, i, j;
|
||||
int len, i, j, ret;
|
||||
|
||||
if (!d)
|
||||
return -ENODEV;
|
||||
@@ -618,7 +633,8 @@ static int s6x0_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
|
||||
if (msg[j].len > sizeof(ibuf)) {
|
||||
warn("i2c rd: len=%d is too big!\n",
|
||||
msg[j].len);
|
||||
return -EOPNOTSUPP;
|
||||
ret = -EOPNOTSUPP;
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
dw210x_op_rw(d->udev, 0x91, 0, 0,
|
||||
@@ -652,7 +668,8 @@ static int s6x0_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
|
||||
if (2 + msg[j].len > sizeof(obuf)) {
|
||||
warn("i2c wr: len=%d is too big!\n",
|
||||
msg[j].len);
|
||||
return -EOPNOTSUPP;
|
||||
ret = -EOPNOTSUPP;
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
obuf[0] = msg[j + 1].len;
|
||||
@@ -671,7 +688,8 @@ static int s6x0_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
|
||||
if (2 + msg[j].len > sizeof(obuf)) {
|
||||
warn("i2c wr: len=%d is too big!\n",
|
||||
msg[j].len);
|
||||
return -EOPNOTSUPP;
|
||||
ret = -EOPNOTSUPP;
|
||||
goto unlock;
|
||||
}
|
||||
obuf[0] = msg[j].len + 1;
|
||||
obuf[1] = (msg[j].addr << 1);
|
||||
@@ -685,9 +703,11 @@ static int s6x0_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
|
||||
}
|
||||
}
|
||||
}
|
||||
ret = num;
|
||||
|
||||
unlock:
|
||||
mutex_unlock(&d->i2c_mutex);
|
||||
return num;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int su3000_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
|
||||
|
||||
@@ -3039,7 +3039,7 @@ static void __e100_shutdown(struct pci_dev *pdev, bool *enable_wake)
|
||||
*enable_wake = false;
|
||||
}
|
||||
|
||||
pci_disable_device(pdev);
|
||||
pci_clear_master(pdev);
|
||||
}
|
||||
|
||||
static int __e100_power_off(struct pci_dev *pdev, bool wake)
|
||||
|
||||
@@ -587,7 +587,7 @@ static void p54_rx_stats(struct p54_common *priv, struct sk_buff *skb)
|
||||
chan = priv->curchan;
|
||||
if (chan) {
|
||||
struct survey_info *survey = &priv->survey[chan->hw_value];
|
||||
survey->noise = clamp_t(s8, priv->noise, -128, 127);
|
||||
survey->noise = clamp(priv->noise, -128, 127);
|
||||
survey->channel_time = priv->survey_raw.active;
|
||||
survey->channel_time_tx = priv->survey_raw.tx;
|
||||
survey->channel_time_busy = priv->survey_raw.tx +
|
||||
|
||||
@@ -1712,8 +1712,6 @@ static int _regulator_do_disable(struct regulator_dev *rdev)
|
||||
|
||||
trace_regulator_disable_complete(rdev_get_name(rdev));
|
||||
|
||||
_notifier_call_chain(rdev, REGULATOR_EVENT_DISABLE,
|
||||
NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1737,6 +1735,8 @@ static int _regulator_disable(struct regulator_dev *rdev)
|
||||
rdev_err(rdev, "failed to disable\n");
|
||||
return ret;
|
||||
}
|
||||
_notifier_call_chain(rdev, REGULATOR_EVENT_DISABLE,
|
||||
NULL);
|
||||
}
|
||||
|
||||
rdev->use_count = 0;
|
||||
@@ -1789,20 +1789,16 @@ static int _regulator_force_disable(struct regulator_dev *rdev)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
/* force disable */
|
||||
if (rdev->desc->ops->disable) {
|
||||
/* ah well, who wants to live forever... */
|
||||
ret = rdev->desc->ops->disable(rdev);
|
||||
if (ret < 0) {
|
||||
rdev_err(rdev, "failed to force disable\n");
|
||||
return ret;
|
||||
}
|
||||
/* notify other consumers that power has been forced off */
|
||||
_notifier_call_chain(rdev, REGULATOR_EVENT_FORCE_DISABLE |
|
||||
REGULATOR_EVENT_DISABLE, NULL);
|
||||
ret = _regulator_do_disable(rdev);
|
||||
if (ret < 0) {
|
||||
rdev_err(rdev, "failed to force disable\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
return ret;
|
||||
_notifier_call_chain(rdev, REGULATOR_EVENT_FORCE_DISABLE |
|
||||
REGULATOR_EVENT_DISABLE, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3788,8 +3784,6 @@ int regulator_suspend_finish(void)
|
||||
|
||||
mutex_lock(®ulator_list_mutex);
|
||||
list_for_each_entry(rdev, ®ulator_list, list) {
|
||||
struct regulator_ops *ops = rdev->desc->ops;
|
||||
|
||||
mutex_lock(&rdev->mutex);
|
||||
if (rdev->use_count > 0 || rdev->constraints->always_on) {
|
||||
error = _regulator_do_enable(rdev);
|
||||
@@ -3798,12 +3792,10 @@ int regulator_suspend_finish(void)
|
||||
} else {
|
||||
if (!has_full_constraints)
|
||||
goto unlock;
|
||||
if (!ops->disable)
|
||||
goto unlock;
|
||||
if (!_regulator_is_enabled(rdev))
|
||||
goto unlock;
|
||||
|
||||
error = ops->disable(rdev);
|
||||
error = _regulator_do_disable(rdev);
|
||||
if (error)
|
||||
ret = error;
|
||||
}
|
||||
@@ -3993,7 +3985,7 @@ static int __init regulator_init_complete(void)
|
||||
ops = rdev->desc->ops;
|
||||
c = rdev->constraints;
|
||||
|
||||
if (!ops->disable || (c && c->always_on))
|
||||
if (c && c->always_on)
|
||||
continue;
|
||||
|
||||
mutex_lock(&rdev->mutex);
|
||||
@@ -4014,7 +4006,7 @@ static int __init regulator_init_complete(void)
|
||||
/* We log since this may kill the system if it
|
||||
* goes wrong. */
|
||||
rdev_info(rdev, "disabling\n");
|
||||
ret = ops->disable(rdev);
|
||||
ret = _regulator_do_disable(rdev);
|
||||
if (ret != 0) {
|
||||
rdev_err(rdev, "couldn't disable: %d\n", ret);
|
||||
}
|
||||
|
||||
@@ -113,6 +113,11 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
|
||||
xhci_dbg(xhci, "QUIRK: Resetting on resume\n");
|
||||
xhci->quirks |= XHCI_TRUST_TX_LENGTH;
|
||||
}
|
||||
if (pdev->vendor == PCI_VENDOR_ID_RENESAS &&
|
||||
pdev->device == 0x0015 &&
|
||||
pdev->subsystem_vendor == PCI_VENDOR_ID_SAMSUNG &&
|
||||
pdev->subsystem_device == 0xc0cd)
|
||||
xhci->quirks |= XHCI_RESET_ON_RESUME;
|
||||
if (pdev->vendor == PCI_VENDOR_ID_VIA)
|
||||
xhci->quirks |= XHCI_RESET_ON_RESUME;
|
||||
}
|
||||
|
||||
@@ -138,6 +138,7 @@ struct ceph_osd_request {
|
||||
__le64 *r_request_pool;
|
||||
void *r_request_pgid;
|
||||
__le32 *r_request_attempts;
|
||||
bool r_paused;
|
||||
struct ceph_eversion *r_request_reassert_version;
|
||||
|
||||
int r_result;
|
||||
|
||||
@@ -325,10 +325,6 @@ enum {
|
||||
FILTER_TRACE_FN,
|
||||
};
|
||||
|
||||
#define EVENT_STORAGE_SIZE 128
|
||||
extern struct mutex event_storage_mutex;
|
||||
extern char event_storage[EVENT_STORAGE_SIZE];
|
||||
|
||||
extern int trace_event_raw_init(struct ftrace_event_call *call);
|
||||
extern int trace_define_field(struct ftrace_event_call *call, const char *type,
|
||||
const char *name, int offset, int size,
|
||||
|
||||
@@ -299,15 +299,12 @@ static struct trace_event_functions ftrace_event_type_funcs_##call = { \
|
||||
#undef __array
|
||||
#define __array(type, item, len) \
|
||||
do { \
|
||||
mutex_lock(&event_storage_mutex); \
|
||||
char *type_str = #type"["__stringify(len)"]"; \
|
||||
BUILD_BUG_ON(len > MAX_FILTER_STR_VAL); \
|
||||
snprintf(event_storage, sizeof(event_storage), \
|
||||
"%s[%d]", #type, len); \
|
||||
ret = trace_define_field(event_call, event_storage, #item, \
|
||||
ret = trace_define_field(event_call, type_str, #item, \
|
||||
offsetof(typeof(field), item), \
|
||||
sizeof(field.item), \
|
||||
is_signed_type(type), FILTER_OTHER); \
|
||||
mutex_unlock(&event_storage_mutex); \
|
||||
if (ret) \
|
||||
return ret; \
|
||||
} while (0);
|
||||
|
||||
@@ -77,8 +77,6 @@ static inline struct autogroup *autogroup_create(void)
|
||||
if (IS_ERR(tg))
|
||||
goto out_free;
|
||||
|
||||
sched_online_group(tg, &root_task_group);
|
||||
|
||||
kref_init(&ag->kref);
|
||||
init_rwsem(&ag->lock);
|
||||
ag->id = atomic_inc_return(&autogroup_seq_nr);
|
||||
@@ -98,6 +96,7 @@ static inline struct autogroup *autogroup_create(void)
|
||||
#endif
|
||||
tg->autogroup = ag;
|
||||
|
||||
sched_online_group(tg, &root_task_group);
|
||||
return ag;
|
||||
|
||||
out_free:
|
||||
|
||||
@@ -27,12 +27,6 @@
|
||||
|
||||
DEFINE_MUTEX(event_mutex);
|
||||
|
||||
DEFINE_MUTEX(event_storage_mutex);
|
||||
EXPORT_SYMBOL_GPL(event_storage_mutex);
|
||||
|
||||
char event_storage[EVENT_STORAGE_SIZE];
|
||||
EXPORT_SYMBOL_GPL(event_storage);
|
||||
|
||||
LIST_HEAD(ftrace_events);
|
||||
static LIST_HEAD(ftrace_common_fields);
|
||||
|
||||
|
||||
@@ -95,15 +95,12 @@ static void __always_unused ____ftrace_check_##name(void) \
|
||||
#undef __array
|
||||
#define __array(type, item, len) \
|
||||
do { \
|
||||
char *type_str = #type"["__stringify(len)"]"; \
|
||||
BUILD_BUG_ON(len > MAX_FILTER_STR_VAL); \
|
||||
mutex_lock(&event_storage_mutex); \
|
||||
snprintf(event_storage, sizeof(event_storage), \
|
||||
"%s[%d]", #type, len); \
|
||||
ret = trace_define_field(event_call, event_storage, #item, \
|
||||
ret = trace_define_field(event_call, type_str, #item, \
|
||||
offsetof(typeof(field), item), \
|
||||
sizeof(field.item), \
|
||||
is_signed_type(type), filter_type); \
|
||||
mutex_unlock(&event_storage_mutex); \
|
||||
if (ret) \
|
||||
return ret; \
|
||||
} while (0);
|
||||
|
||||
@@ -1224,6 +1224,22 @@ void ceph_osdc_set_request_linger(struct ceph_osd_client *osdc,
|
||||
}
|
||||
EXPORT_SYMBOL(ceph_osdc_set_request_linger);
|
||||
|
||||
/*
|
||||
* Returns whether a request should be blocked from being sent
|
||||
* based on the current osdmap and osd_client settings.
|
||||
*
|
||||
* Caller should hold map_sem for read.
|
||||
*/
|
||||
static bool __req_should_be_paused(struct ceph_osd_client *osdc,
|
||||
struct ceph_osd_request *req)
|
||||
{
|
||||
bool pauserd = ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_PAUSERD);
|
||||
bool pausewr = ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_PAUSEWR) ||
|
||||
ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_FULL);
|
||||
return (req->r_flags & CEPH_OSD_FLAG_READ && pauserd) ||
|
||||
(req->r_flags & CEPH_OSD_FLAG_WRITE && pausewr);
|
||||
}
|
||||
|
||||
/*
|
||||
* Pick an osd (the first 'up' osd in the pg), allocate the osd struct
|
||||
* (as needed), and set the request r_osd appropriately. If there is
|
||||
@@ -1241,6 +1257,7 @@ static int __map_request(struct ceph_osd_client *osdc,
|
||||
int acting[CEPH_PG_MAX_SIZE];
|
||||
int o = -1, num = 0;
|
||||
int err;
|
||||
bool was_paused;
|
||||
|
||||
dout("map_request %p tid %lld\n", req, req->r_tid);
|
||||
err = ceph_calc_ceph_pg(&pgid, req->r_oid, osdc->osdmap,
|
||||
@@ -1257,12 +1274,18 @@ static int __map_request(struct ceph_osd_client *osdc,
|
||||
num = err;
|
||||
}
|
||||
|
||||
was_paused = req->r_paused;
|
||||
req->r_paused = __req_should_be_paused(osdc, req);
|
||||
if (was_paused && !req->r_paused)
|
||||
force_resend = 1;
|
||||
|
||||
if ((!force_resend &&
|
||||
req->r_osd && req->r_osd->o_osd == o &&
|
||||
req->r_sent >= req->r_osd->o_incarnation &&
|
||||
req->r_num_pg_osds == num &&
|
||||
memcmp(req->r_pg_osds, acting, sizeof(acting[0])*num) == 0) ||
|
||||
(req->r_osd == NULL && o == -1))
|
||||
(req->r_osd == NULL && o == -1) ||
|
||||
req->r_paused)
|
||||
return 0; /* no change */
|
||||
|
||||
dout("map_request tid %llu pgid %lld.%x osd%d (was osd%d)\n",
|
||||
@@ -1606,14 +1629,17 @@ static void reset_changed_osds(struct ceph_osd_client *osdc)
|
||||
*
|
||||
* Caller should hold map_sem for read.
|
||||
*/
|
||||
static void kick_requests(struct ceph_osd_client *osdc, int force_resend)
|
||||
static void kick_requests(struct ceph_osd_client *osdc, bool force_resend,
|
||||
bool force_resend_writes)
|
||||
{
|
||||
struct ceph_osd_request *req, *nreq;
|
||||
struct rb_node *p;
|
||||
int needmap = 0;
|
||||
int err;
|
||||
bool force_resend_req;
|
||||
|
||||
dout("kick_requests %s\n", force_resend ? " (force resend)" : "");
|
||||
dout("kick_requests %s %s\n", force_resend ? " (force resend)" : "",
|
||||
force_resend_writes ? " (force resend writes)" : "");
|
||||
mutex_lock(&osdc->request_mutex);
|
||||
for (p = rb_first(&osdc->requests); p; ) {
|
||||
req = rb_entry(p, struct ceph_osd_request, r_node);
|
||||
@@ -1638,7 +1664,10 @@ static void kick_requests(struct ceph_osd_client *osdc, int force_resend)
|
||||
continue;
|
||||
}
|
||||
|
||||
err = __map_request(osdc, req, force_resend);
|
||||
force_resend_req = force_resend ||
|
||||
(force_resend_writes &&
|
||||
req->r_flags & CEPH_OSD_FLAG_WRITE);
|
||||
err = __map_request(osdc, req, force_resend_req);
|
||||
if (err < 0)
|
||||
continue; /* error */
|
||||
if (req->r_osd == NULL) {
|
||||
@@ -1658,7 +1687,8 @@ static void kick_requests(struct ceph_osd_client *osdc, int force_resend)
|
||||
r_linger_item) {
|
||||
dout("linger req=%p req->r_osd=%p\n", req, req->r_osd);
|
||||
|
||||
err = __map_request(osdc, req, force_resend);
|
||||
err = __map_request(osdc, req,
|
||||
force_resend || force_resend_writes);
|
||||
dout("__map_request returned %d\n", err);
|
||||
if (err == 0)
|
||||
continue; /* no change and no osd was specified */
|
||||
@@ -1700,6 +1730,7 @@ void ceph_osdc_handle_map(struct ceph_osd_client *osdc, struct ceph_msg *msg)
|
||||
struct ceph_osdmap *newmap = NULL, *oldmap;
|
||||
int err;
|
||||
struct ceph_fsid fsid;
|
||||
bool was_full;
|
||||
|
||||
dout("handle_map have %u\n", osdc->osdmap ? osdc->osdmap->epoch : 0);
|
||||
p = msg->front.iov_base;
|
||||
@@ -1713,6 +1744,8 @@ void ceph_osdc_handle_map(struct ceph_osd_client *osdc, struct ceph_msg *msg)
|
||||
|
||||
down_write(&osdc->map_sem);
|
||||
|
||||
was_full = ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_FULL);
|
||||
|
||||
/* incremental maps */
|
||||
ceph_decode_32_safe(&p, end, nr_maps, bad);
|
||||
dout(" %d inc maps\n", nr_maps);
|
||||
@@ -1737,7 +1770,10 @@ void ceph_osdc_handle_map(struct ceph_osd_client *osdc, struct ceph_msg *msg)
|
||||
ceph_osdmap_destroy(osdc->osdmap);
|
||||
osdc->osdmap = newmap;
|
||||
}
|
||||
kick_requests(osdc, 0);
|
||||
was_full = was_full ||
|
||||
ceph_osdmap_flag(osdc->osdmap,
|
||||
CEPH_OSDMAP_FULL);
|
||||
kick_requests(osdc, 0, was_full);
|
||||
} else {
|
||||
dout("ignoring incremental map %u len %d\n",
|
||||
epoch, maplen);
|
||||
@@ -1780,7 +1816,10 @@ void ceph_osdc_handle_map(struct ceph_osd_client *osdc, struct ceph_msg *msg)
|
||||
skipped_map = 1;
|
||||
ceph_osdmap_destroy(oldmap);
|
||||
}
|
||||
kick_requests(osdc, skipped_map);
|
||||
was_full = was_full ||
|
||||
ceph_osdmap_flag(osdc->osdmap,
|
||||
CEPH_OSDMAP_FULL);
|
||||
kick_requests(osdc, skipped_map, was_full);
|
||||
}
|
||||
p += maplen;
|
||||
nr_maps--;
|
||||
@@ -1797,7 +1836,9 @@ done:
|
||||
* we find out when we are no longer full and stop returning
|
||||
* ENOSPC.
|
||||
*/
|
||||
if (ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_FULL))
|
||||
if (ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_FULL) ||
|
||||
ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_PAUSERD) ||
|
||||
ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_PAUSEWR))
|
||||
ceph_monc_request_next_osdmap(&osdc->client->monc);
|
||||
|
||||
mutex_lock(&osdc->request_mutex);
|
||||
|
||||
@@ -62,7 +62,7 @@ create_package() {
|
||||
fi
|
||||
|
||||
# Create the package
|
||||
dpkg-gencontrol -isp $forcearch -p$pname -P"$pdir"
|
||||
dpkg-gencontrol -isp $forcearch -Vkernel:debarch="${debarch:-$(dpkg --print-architecture)}" -p$pname -P"$pdir"
|
||||
dpkg --build "$pdir" ..
|
||||
}
|
||||
|
||||
@@ -252,15 +252,14 @@ mkdir -p "$destdir"
|
||||
(cd $objtree; tar -c -f - -T "$objtree/debian/hdrobjfiles") | (cd $destdir; tar -xf -)
|
||||
ln -sf "/usr/src/linux-headers-$version" "$kernel_headers_dir/lib/modules/$version/build"
|
||||
rm -f "$objtree/debian/hdrsrcfiles" "$objtree/debian/hdrobjfiles"
|
||||
arch=$(dpkg --print-architecture)
|
||||
|
||||
cat <<EOF >> debian/control
|
||||
|
||||
Package: $kernel_headers_packagename
|
||||
Provides: linux-headers, linux-headers-2.6
|
||||
Architecture: $arch
|
||||
Description: Linux kernel headers for $KERNELRELEASE on $arch
|
||||
This package provides kernel header files for $KERNELRELEASE on $arch
|
||||
Architecture: any
|
||||
Description: Linux kernel headers for $KERNELRELEASE on \${kernel:debarch}
|
||||
This package provides kernel header files for $KERNELRELEASE on \${kernel:debarch}
|
||||
.
|
||||
This is useful for people who need to build external modules
|
||||
EOF
|
||||
|
||||
@@ -133,7 +133,7 @@ static int snd_compr_open(struct inode *inode, struct file *f)
|
||||
kfree(data);
|
||||
}
|
||||
snd_card_unref(compr->card);
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int snd_compr_free(struct inode *inode, struct file *f)
|
||||
|
||||
@@ -336,6 +336,7 @@ static bool max98090_readable_register(struct device *dev, unsigned int reg)
|
||||
case M98090_REG_RECORD_TDM_SLOT:
|
||||
case M98090_REG_SAMPLE_RATE:
|
||||
case M98090_REG_DMIC34_BIQUAD_BASE ... M98090_REG_DMIC34_BIQUAD_BASE + 0x0E:
|
||||
case M98090_REG_REVISION_ID:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user