Skip to content

Commit d74de2f

Browse files
committed
Merge remote-tracking branch 'stable/linux-3.10.y' into rpi-3.10.y
2 parents 5f3cdc4 + 8f0c10e commit d74de2f

19 files changed

Lines changed: 154 additions & 76 deletions

File tree

‎Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
VERSION = 3
22
PATCHLEVEL = 10
3-
SUBLEVEL = 35
3+
SUBLEVEL = 36
44
EXTRAVERSION =
55
NAME = TOSSUG Baby Fish
66

‎arch/x86/include/asm/topology.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,10 @@ static inline void setup_node_to_cpumask_map(void) { }
119119

120120
extern const struct cpumask *cpu_coregroup_mask(int cpu);
121121

122-
#ifdef ENABLE_TOPO_DEFINES
123122
#define topology_physical_package_id(cpu) (cpu_data(cpu).phys_proc_id)
124123
#define topology_core_id(cpu) (cpu_data(cpu).cpu_core_id)
124+
125+
#ifdef ENABLE_TOPO_DEFINES
125126
#define topology_core_cpumask(cpu) (per_cpu(cpu_core_map, cpu))
126127
#define topology_thread_cpumask(cpu) (per_cpu(cpu_sibling_map, cpu))
127128

‎drivers/block/aoe/aoecmd.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -899,7 +899,7 @@ bio_pageinc(struct bio *bio)
899899
* but this has never been seen here.
900900
*/
901901
if (unlikely(PageCompound(page)))
902-
if (compound_trans_head(page) != page) {
902+
if (compound_head(page) != page) {
903903
pr_crit("page tail used for block I/O\n");
904904
BUG();
905905
}

‎drivers/input/mouse/cypress_ps2.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,6 @@ static int cypress_set_input_params(struct input_dev *input,
410410
__clear_bit(REL_X, input->relbit);
411411
__clear_bit(REL_Y, input->relbit);
412412

413-
__set_bit(INPUT_PROP_BUTTONPAD, input->propbit);
414413
__set_bit(EV_KEY, input->evbit);
415414
__set_bit(BTN_LEFT, input->keybit);
416415
__set_bit(BTN_RIGHT, input->keybit);

‎drivers/input/mouse/synaptics.c‎

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,11 +265,22 @@ static int synaptics_identify(struct psmouse *psmouse)
265265
* Read touchpad resolution and maximum reported coordinates
266266
* Resolution is left zero if touchpad does not support the query
267267
*/
268+
269+
static const int *quirk_min_max;
270+
268271
static int synaptics_resolution(struct psmouse *psmouse)
269272
{
270273
struct synaptics_data *priv = psmouse->private;
271274
unsigned char resp[3];
272275

276+
if (quirk_min_max) {
277+
priv->x_min = quirk_min_max[0];
278+
priv->x_max = quirk_min_max[1];
279+
priv->y_min = quirk_min_max[2];
280+
priv->y_max = quirk_min_max[3];
281+
return 0;
282+
}
283+
273284
if (SYN_ID_MAJOR(priv->identity) < 4)
274285
return 0;
275286

@@ -1485,10 +1496,54 @@ static const struct dmi_system_id __initconst olpc_dmi_table[] = {
14851496
{ }
14861497
};
14871498

1499+
static const struct dmi_system_id min_max_dmi_table[] __initconst = {
1500+
#if defined(CONFIG_DMI)
1501+
{
1502+
/* Lenovo ThinkPad Helix */
1503+
.matches = {
1504+
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
1505+
DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad Helix"),
1506+
},
1507+
.driver_data = (int []){1024, 5052, 2258, 4832},
1508+
},
1509+
{
1510+
/* Lenovo ThinkPad X240 */
1511+
.matches = {
1512+
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
1513+
DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X240"),
1514+
},
1515+
.driver_data = (int []){1232, 5710, 1156, 4696},
1516+
},
1517+
{
1518+
/* Lenovo ThinkPad T440s */
1519+
.matches = {
1520+
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
1521+
DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T440"),
1522+
},
1523+
.driver_data = (int []){1024, 5112, 2024, 4832},
1524+
},
1525+
{
1526+
/* Lenovo ThinkPad T540p */
1527+
.matches = {
1528+
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
1529+
DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T540"),
1530+
},
1531+
.driver_data = (int []){1024, 5056, 2058, 4832},
1532+
},
1533+
#endif
1534+
{ }
1535+
};
1536+
14881537
void __init synaptics_module_init(void)
14891538
{
1539+
const struct dmi_system_id *min_max_dmi;
1540+
14901541
impaired_toshiba_kbc = dmi_check_system(toshiba_dmi_table);
14911542
broken_olpc_ec = dmi_check_system(olpc_dmi_table);
1543+
1544+
min_max_dmi = dmi_first_match(min_max_dmi_table);
1545+
if (min_max_dmi)
1546+
quirk_min_max = min_max_dmi->driver_data;
14921547
}
14931548

14941549
static int __synaptics_init(struct psmouse *psmouse, bool absolute_mode)

‎drivers/input/mousedev.c‎

Lines changed: 42 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ struct mousedev {
6767
struct device dev;
6868
struct cdev cdev;
6969
bool exist;
70-
bool is_mixdev;
7170

7271
struct list_head mixdev_node;
7372
bool opened_by_mixdev;
@@ -77,6 +76,9 @@ struct mousedev {
7776
int old_x[4], old_y[4];
7877
int frac_dx, frac_dy;
7978
unsigned long touch;
79+
80+
int (*open_device)(struct mousedev *mousedev);
81+
void (*close_device)(struct mousedev *mousedev);
8082
};
8183

8284
enum mousedev_emul {
@@ -116,9 +118,6 @@ static unsigned char mousedev_imex_seq[] = { 0xf3, 200, 0xf3, 200, 0xf3, 80 };
116118
static struct mousedev *mousedev_mix;
117119
static LIST_HEAD(mousedev_mix_list);
118120

119-
static void mixdev_open_devices(void);
120-
static void mixdev_close_devices(void);
121-
122121
#define fx(i) (mousedev->old_x[(mousedev->pkt_count - (i)) & 03])
123122
#define fy(i) (mousedev->old_y[(mousedev->pkt_count - (i)) & 03])
124123

@@ -428,9 +427,7 @@ static int mousedev_open_device(struct mousedev *mousedev)
428427
if (retval)
429428
return retval;
430429

431-
if (mousedev->is_mixdev)
432-
mixdev_open_devices();
433-
else if (!mousedev->exist)
430+
if (!mousedev->exist)
434431
retval = -ENODEV;
435432
else if (!mousedev->open++) {
436433
retval = input_open_device(&mousedev->handle);
@@ -446,9 +443,7 @@ static void mousedev_close_device(struct mousedev *mousedev)
446443
{
447444
mutex_lock(&mousedev->mutex);
448445

449-
if (mousedev->is_mixdev)
450-
mixdev_close_devices();
451-
else if (mousedev->exist && !--mousedev->open)
446+
if (mousedev->exist && !--mousedev->open)
452447
input_close_device(&mousedev->handle);
453448

454449
mutex_unlock(&mousedev->mutex);
@@ -459,41 +454,52 @@ static void mousedev_close_device(struct mousedev *mousedev)
459454
* stream. Note that this function is called with mousedev_mix->mutex
460455
* held.
461456
*/
462-
static void mixdev_open_devices(void)
457+
static int mixdev_open_devices(struct mousedev *mixdev)
463458
{
464-
struct mousedev *mousedev;
459+
int error;
460+
461+
error = mutex_lock_interruptible(&mixdev->mutex);
462+
if (error)
463+
return error;
465464

466-
if (mousedev_mix->open++)
467-
return;
465+
if (!mixdev->open++) {
466+
struct mousedev *mousedev;
468467

469-
list_for_each_entry(mousedev, &mousedev_mix_list, mixdev_node) {
470-
if (!mousedev->opened_by_mixdev) {
471-
if (mousedev_open_device(mousedev))
472-
continue;
468+
list_for_each_entry(mousedev, &mousedev_mix_list, mixdev_node) {
469+
if (!mousedev->opened_by_mixdev) {
470+
if (mousedev_open_device(mousedev))
471+
continue;
473472

474-
mousedev->opened_by_mixdev = true;
473+
mousedev->opened_by_mixdev = true;
474+
}
475475
}
476476
}
477+
478+
mutex_unlock(&mixdev->mutex);
479+
return 0;
477480
}
478481

479482
/*
480483
* Close all devices that were opened as part of multiplexed
481484
* device. Note that this function is called with mousedev_mix->mutex
482485
* held.
483486
*/
484-
static void mixdev_close_devices(void)
487+
static void mixdev_close_devices(struct mousedev *mixdev)
485488
{
486-
struct mousedev *mousedev;
489+
mutex_lock(&mixdev->mutex);
487490

488-
if (--mousedev_mix->open)
489-
return;
491+
if (!--mixdev->open) {
492+
struct mousedev *mousedev;
490493

491-
list_for_each_entry(mousedev, &mousedev_mix_list, mixdev_node) {
492-
if (mousedev->opened_by_mixdev) {
493-
mousedev->opened_by_mixdev = false;
494-
mousedev_close_device(mousedev);
494+
list_for_each_entry(mousedev, &mousedev_mix_list, mixdev_node) {
495+
if (mousedev->opened_by_mixdev) {
496+
mousedev->opened_by_mixdev = false;
497+
mousedev_close_device(mousedev);
498+
}
495499
}
496500
}
501+
502+
mutex_unlock(&mixdev->mutex);
497503
}
498504

499505

@@ -522,7 +528,7 @@ static int mousedev_release(struct inode *inode, struct file *file)
522528
mousedev_detach_client(mousedev, client);
523529
kfree(client);
524530

525-
mousedev_close_device(mousedev);
531+
mousedev->close_device(mousedev);
526532

527533
return 0;
528534
}
@@ -550,7 +556,7 @@ static int mousedev_open(struct inode *inode, struct file *file)
550556
client->mousedev = mousedev;
551557
mousedev_attach_client(mousedev, client);
552558

553-
error = mousedev_open_device(mousedev);
559+
error = mousedev->open_device(mousedev);
554560
if (error)
555561
goto err_free_client;
556562

@@ -861,16 +867,21 @@ static struct mousedev *mousedev_create(struct input_dev *dev,
861867

862868
if (mixdev) {
863869
dev_set_name(&mousedev->dev, "mice");
870+
871+
mousedev->open_device = mixdev_open_devices;
872+
mousedev->close_device = mixdev_close_devices;
864873
} else {
865874
int dev_no = minor;
866875
/* Normalize device number if it falls into legacy range */
867876
if (dev_no < MOUSEDEV_MINOR_BASE + MOUSEDEV_MINORS)
868877
dev_no -= MOUSEDEV_MINOR_BASE;
869878
dev_set_name(&mousedev->dev, "mouse%d", dev_no);
879+
880+
mousedev->open_device = mousedev_open_device;
881+
mousedev->close_device = mousedev_close_device;
870882
}
871883

872884
mousedev->exist = true;
873-
mousedev->is_mixdev = mixdev;
874885
mousedev->handle.dev = input_get_device(dev);
875886
mousedev->handle.name = dev_name(&mousedev->dev);
876887
mousedev->handle.handler = handler;
@@ -919,7 +930,7 @@ static void mousedev_destroy(struct mousedev *mousedev)
919930
device_del(&mousedev->dev);
920931
mousedev_cleanup(mousedev);
921932
input_free_minor(MINOR(mousedev->dev.devt));
922-
if (!mousedev->is_mixdev)
933+
if (mousedev != mousedev_mix)
923934
input_unregister_handle(&mousedev->handle);
924935
put_device(&mousedev->dev);
925936
}

‎drivers/net/ethernet/marvell/mvneta.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
#define MVNETA_GMAC_MAX_RX_SIZE_MASK 0x7ffc
120120
#define MVNETA_GMAC0_PORT_ENABLE BIT(0)
121121
#define MVNETA_GMAC_CTRL_2 0x2c08
122-
#define MVNETA_GMAC2_PSC_ENABLE BIT(3)
122+
#define MVNETA_GMAC2_PCS_ENABLE BIT(3)
123123
#define MVNETA_GMAC2_PORT_RGMII BIT(4)
124124
#define MVNETA_GMAC2_PORT_RESET BIT(6)
125125
#define MVNETA_GMAC_STATUS 0x2c10
@@ -655,7 +655,7 @@ static void mvneta_port_sgmii_config(struct mvneta_port *pp)
655655
u32 val;
656656

657657
val = mvreg_read(pp, MVNETA_GMAC_CTRL_2);
658-
val |= MVNETA_GMAC2_PSC_ENABLE;
658+
val |= MVNETA_GMAC2_PCS_ENABLE;
659659
mvreg_write(pp, MVNETA_GMAC_CTRL_2, val);
660660
}
661661

‎drivers/vfio/vfio_iommu_type1.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,12 @@ static bool is_invalid_reserved_pfn(unsigned long pfn)
138138
if (pfn_valid(pfn)) {
139139
bool reserved;
140140
struct page *tail = pfn_to_page(pfn);
141-
struct page *head = compound_trans_head(tail);
141+
struct page *head = compound_head(tail);
142142
reserved = !!(PageReserved(head));
143143
if (head != tail) {
144144
/*
145145
* "head" is not a dangling pointer
146-
* (compound_trans_head takes care of that)
146+
* (compound_head takes care of that)
147147
* but the hugepage may have been split
148148
* from under us (and we may not hold a
149149
* reference count on the head page so it can

‎fs/ext4/inode.c‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#include <linux/slab.h>
3939
#include <linux/ratelimit.h>
4040
#include <linux/aio.h>
41+
#include <linux/bitops.h>
4142

4243
#include "ext4_jbd2.h"
4344
#include "xattr.h"
@@ -4044,18 +4045,20 @@ int ext4_get_inode_loc(struct inode *inode, struct ext4_iloc *iloc)
40444045
void ext4_set_inode_flags(struct inode *inode)
40454046
{
40464047
unsigned int flags = EXT4_I(inode)->i_flags;
4048+
unsigned int new_fl = 0;
40474049

4048-
inode->i_flags &= ~(S_SYNC|S_APPEND|S_IMMUTABLE|S_NOATIME|S_DIRSYNC);
40494050
if (flags & EXT4_SYNC_FL)
4050-
inode->i_flags |= S_SYNC;
4051+
new_fl |= S_SYNC;
40514052
if (flags & EXT4_APPEND_FL)
4052-
inode->i_flags |= S_APPEND;
4053+
new_fl |= S_APPEND;
40534054
if (flags & EXT4_IMMUTABLE_FL)
4054-
inode->i_flags |= S_IMMUTABLE;
4055+
new_fl |= S_IMMUTABLE;
40554056
if (flags & EXT4_NOATIME_FL)
4056-
inode->i_flags |= S_NOATIME;
4057+
new_fl |= S_NOATIME;
40574058
if (flags & EXT4_DIRSYNC_FL)
4058-
inode->i_flags |= S_DIRSYNC;
4059+
new_fl |= S_DIRSYNC;
4060+
set_mask_bits(&inode->i_flags,
4061+
S_SYNC|S_APPEND|S_IMMUTABLE|S_NOATIME|S_DIRSYNC, new_fl);
40594062
}
40604063

40614064
/* Propagate flags from i_flags to EXT4_I(inode)->i_flags */

‎fs/proc/page.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ u64 stable_page_flags(struct page *page)
121121
* just checks PG_head/PG_tail, so we need to check PageLRU to make
122122
* sure a given page is a thp, not a non-huge compound page.
123123
*/
124-
else if (PageTransCompound(page) && PageLRU(compound_trans_head(page)))
124+
else if (PageTransCompound(page) && PageLRU(compound_head(page)))
125125
u |= 1 << KPF_THP;
126126

127127
/*

0 commit comments

Comments
 (0)