Skip to content

Commit 88d661a

Browse files
committed
Merge pull request #31 from torvalds/master
Sync up with Linus
2 parents f6befec + 9d82f5e commit 88d661a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+663
-446
lines changed

Documentation/networking/netlink_mmap.txt

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -199,16 +199,9 @@ frame header.
199199
TX limitations
200200
--------------
201201

202-
Kernel processing usually involves validation of the message received by
203-
user-space, then processing its contents. The kernel must assure that
204-
userspace is not able to modify the message contents after they have been
205-
validated. In order to do so, the message is copied from the ring frame
206-
to an allocated buffer if either of these conditions is false:
207-
208-
- only a single mapping of the ring exists
209-
- the file descriptor is not shared between processes
210-
211-
This means that for threaded programs, the kernel will fall back to copying.
202+
As of Jan 2015 the message is always copied from the ring frame to an
203+
allocated buffer due to unresolved security concerns.
204+
See commit 4682a0358639b29cf ("netlink: Always copy on mmap TX.").
212205

213206
Example
214207
-------

arch/x86/pci/common.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,22 @@ static const struct dmi_system_id pciprobe_dmi_table[] __initconst = {
448448
DMI_MATCH(DMI_PRODUCT_NAME, "ftServer"),
449449
},
450450
},
451+
{
452+
.callback = set_scan_all,
453+
.ident = "Stratus/NEC ftServer",
454+
.matches = {
455+
DMI_MATCH(DMI_SYS_VENDOR, "NEC"),
456+
DMI_MATCH(DMI_PRODUCT_NAME, "Express5800/R32"),
457+
},
458+
},
459+
{
460+
.callback = set_scan_all,
461+
.ident = "Stratus/NEC ftServer",
462+
.matches = {
463+
DMI_MATCH(DMI_SYS_VENDOR, "NEC"),
464+
DMI_MATCH(DMI_PRODUCT_NAME, "Express5800/R31"),
465+
},
466+
},
451467
{}
452468
};
453469

drivers/acpi/acpi_lpss.c

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* ACPI support for Intel Lynxpoint LPSS.
33
*
4-
* Copyright (C) 2013, 2014, Intel Corporation
4+
* Copyright (C) 2013, Intel Corporation
55
* Authors: Mika Westerberg <[email protected]>
66
* Rafael J. Wysocki <[email protected]>
77
*
@@ -60,8 +60,6 @@ ACPI_MODULE_NAME("acpi_lpss");
6060
#define LPSS_CLK_DIVIDER BIT(2)
6161
#define LPSS_LTR BIT(3)
6262
#define LPSS_SAVE_CTX BIT(4)
63-
#define LPSS_DEV_PROXY BIT(5)
64-
#define LPSS_PROXY_REQ BIT(6)
6563

6664
struct lpss_private_data;
6765

@@ -72,10 +70,8 @@ struct lpss_device_desc {
7270
void (*setup)(struct lpss_private_data *pdata);
7371
};
7472

75-
static struct device *proxy_device;
76-
7773
static struct lpss_device_desc lpss_dma_desc = {
78-
.flags = LPSS_CLK | LPSS_PROXY_REQ,
74+
.flags = LPSS_CLK,
7975
};
8076

8177
struct lpss_private_data {
@@ -150,24 +146,22 @@ static struct lpss_device_desc byt_pwm_dev_desc = {
150146
};
151147

152148
static struct lpss_device_desc byt_uart_dev_desc = {
153-
.flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_CLK_DIVIDER | LPSS_SAVE_CTX |
154-
LPSS_DEV_PROXY,
149+
.flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_CLK_DIVIDER | LPSS_SAVE_CTX,
155150
.prv_offset = 0x800,
156151
.setup = lpss_uart_setup,
157152
};
158153

159154
static struct lpss_device_desc byt_spi_dev_desc = {
160-
.flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_CLK_DIVIDER | LPSS_SAVE_CTX |
161-
LPSS_DEV_PROXY,
155+
.flags = LPSS_CLK | LPSS_CLK_GATE | LPSS_CLK_DIVIDER | LPSS_SAVE_CTX,
162156
.prv_offset = 0x400,
163157
};
164158

165159
static struct lpss_device_desc byt_sdio_dev_desc = {
166-
.flags = LPSS_CLK | LPSS_DEV_PROXY,
160+
.flags = LPSS_CLK,
167161
};
168162

169163
static struct lpss_device_desc byt_i2c_dev_desc = {
170-
.flags = LPSS_CLK | LPSS_SAVE_CTX | LPSS_DEV_PROXY,
164+
.flags = LPSS_CLK | LPSS_SAVE_CTX,
171165
.prv_offset = 0x800,
172166
.setup = byt_i2c_setup,
173167
};
@@ -374,8 +368,6 @@ static int acpi_lpss_create_device(struct acpi_device *adev,
374368
adev->driver_data = pdata;
375369
pdev = acpi_create_platform_device(adev);
376370
if (!IS_ERR_OR_NULL(pdev)) {
377-
if (!proxy_device && dev_desc->flags & LPSS_DEV_PROXY)
378-
proxy_device = &pdev->dev;
379371
return 1;
380372
}
381373

@@ -600,27 +592,14 @@ static int acpi_lpss_runtime_suspend(struct device *dev)
600592
if (pdata->dev_desc->flags & LPSS_SAVE_CTX)
601593
acpi_lpss_save_ctx(dev, pdata);
602594

603-
ret = acpi_dev_runtime_suspend(dev);
604-
if (ret)
605-
return ret;
606-
607-
if (pdata->dev_desc->flags & LPSS_PROXY_REQ && proxy_device)
608-
return pm_runtime_put_sync_suspend(proxy_device);
609-
610-
return 0;
595+
return acpi_dev_runtime_suspend(dev);
611596
}
612597

613598
static int acpi_lpss_runtime_resume(struct device *dev)
614599
{
615600
struct lpss_private_data *pdata = acpi_driver_data(ACPI_COMPANION(dev));
616601
int ret;
617602

618-
if (pdata->dev_desc->flags & LPSS_PROXY_REQ && proxy_device) {
619-
ret = pm_runtime_get_sync(proxy_device);
620-
if (ret)
621-
return ret;
622-
}
623-
624603
ret = acpi_dev_runtime_resume(dev);
625604
if (ret)
626605
return ret;

drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ static void destroy_kernel_queue_cpsch(struct device_queue_manager *dqm,
822822
* Unconditionally decrement this counter, regardless of the queue's
823823
* type.
824824
*/
825-
dqm->total_queue_count++;
825+
dqm->total_queue_count--;
826826
pr_debug("Total of %d queues are accountable so far\n",
827827
dqm->total_queue_count);
828828
mutex_unlock(&dqm->lock);

drivers/gpu/drm/amd/amdkfd/kfd_module.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ static int __init kfd_module_init(void)
9595
}
9696

9797
/* Verify module parameters */
98-
if ((max_num_of_queues_per_device < 0) ||
98+
if ((max_num_of_queues_per_device < 1) ||
9999
(max_num_of_queues_per_device >
100100
KFD_MAX_NUM_OF_QUEUES_PER_DEVICE)) {
101-
pr_err("kfd: max_num_of_queues_per_device must be between 0 to KFD_MAX_NUM_OF_QUEUES_PER_DEVICE\n");
101+
pr_err("kfd: max_num_of_queues_per_device must be between 1 to KFD_MAX_NUM_OF_QUEUES_PER_DEVICE\n");
102102
return -1;
103103
}
104104

drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,11 @@ int pqm_update_queue(struct process_queue_manager *pqm, unsigned int qid,
315315
BUG_ON(!pqm);
316316

317317
pqn = get_queue_by_qid(pqm, qid);
318-
BUG_ON(!pqn);
318+
if (!pqn) {
319+
pr_debug("amdkfd: No queue %d exists for update operation\n",
320+
qid);
321+
return -EFAULT;
322+
}
319323

320324
pqn->q->properties.queue_address = p->queue_address;
321325
pqn->q->properties.queue_size = p->queue_size;

drivers/gpu/drm/cirrus/cirrus_drv.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,12 @@
1616
#include "cirrus_drv.h"
1717

1818
int cirrus_modeset = -1;
19+
int cirrus_bpp = 24;
1920

2021
MODULE_PARM_DESC(modeset, "Disable/Enable modesetting");
2122
module_param_named(modeset, cirrus_modeset, int, 0400);
23+
MODULE_PARM_DESC(bpp, "Max bits-per-pixel (default:24)");
24+
module_param_named(bpp, cirrus_bpp, int, 0400);
2225

2326
/*
2427
* This is the generic driver code. This binds the driver to the drm core,

drivers/gpu/drm/cirrus/cirrus_drv.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,4 +262,7 @@ static inline void cirrus_bo_unreserve(struct cirrus_bo *bo)
262262

263263
int cirrus_bo_push_sysram(struct cirrus_bo *bo);
264264
int cirrus_bo_pin(struct cirrus_bo *bo, u32 pl_flag, u64 *gpu_addr);
265+
266+
extern int cirrus_bpp;
267+
265268
#endif /* __CIRRUS_DRV_H__ */

drivers/gpu/drm/cirrus/cirrus_main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,8 @@ bool cirrus_check_framebuffer(struct cirrus_device *cdev, int width, int height,
320320
const int max_pitch = 0x1FF << 3; /* (4096 - 1) & ~111b bytes */
321321
const int max_size = cdev->mc.vram_size;
322322

323+
if (bpp > cirrus_bpp)
324+
return false;
323325
if (bpp > 32)
324326
return false;
325327

drivers/gpu/drm/cirrus/cirrus_mode.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -501,8 +501,13 @@ static int cirrus_vga_get_modes(struct drm_connector *connector)
501501
int count;
502502

503503
/* Just add a static list of modes */
504-
count = drm_add_modes_noedid(connector, 1280, 1024);
505-
drm_set_preferred_mode(connector, 1024, 768);
504+
if (cirrus_bpp <= 24) {
505+
count = drm_add_modes_noedid(connector, 1280, 1024);
506+
drm_set_preferred_mode(connector, 1024, 768);
507+
} else {
508+
count = drm_add_modes_noedid(connector, 800, 600);
509+
drm_set_preferred_mode(connector, 800, 600);
510+
}
506511
return count;
507512
}
508513

0 commit comments

Comments
 (0)