Skip to content

Commit c79fe35

Browse files
committed
Linux 3.0.61
1 parent fc0ac05 commit c79fe35

20 files changed

Lines changed: 188 additions & 44 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 = 0
3-
SUBLEVEL = 60
3+
SUBLEVEL = 61
44
EXTRAVERSION =
55
NAME = Sneaky Weasel
66

arch/x86/include/asm/traps.h

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#ifndef _ASM_X86_TRAPS_H
22
#define _ASM_X86_TRAPS_H
33

4+
#include <linux/kprobes.h>
45
#include <asm/debugreg.h>
56
#include <asm/siginfo.h> /* TRAP_TRACE, ... */
67

@@ -87,4 +88,29 @@ asmlinkage void smp_thermal_interrupt(void);
8788
asmlinkage void mce_threshold_interrupt(void);
8889
#endif
8990

91+
/* Interrupts/Exceptions */
92+
enum {
93+
X86_TRAP_DE = 0, /* 0, Divide-by-zero */
94+
X86_TRAP_DB, /* 1, Debug */
95+
X86_TRAP_NMI, /* 2, Non-maskable Interrupt */
96+
X86_TRAP_BP, /* 3, Breakpoint */
97+
X86_TRAP_OF, /* 4, Overflow */
98+
X86_TRAP_BR, /* 5, Bound Range Exceeded */
99+
X86_TRAP_UD, /* 6, Invalid Opcode */
100+
X86_TRAP_NM, /* 7, Device Not Available */
101+
X86_TRAP_DF, /* 8, Double Fault */
102+
X86_TRAP_OLD_MF, /* 9, Coprocessor Segment Overrun */
103+
X86_TRAP_TS, /* 10, Invalid TSS */
104+
X86_TRAP_NP, /* 11, Segment Not Present */
105+
X86_TRAP_SS, /* 12, Stack Segment Fault */
106+
X86_TRAP_GP, /* 13, General Protection Fault */
107+
X86_TRAP_PF, /* 14, Page Fault */
108+
X86_TRAP_SPURIOUS, /* 15, Spurious Interrupt */
109+
X86_TRAP_MF, /* 16, x87 Floating-Point Exception */
110+
X86_TRAP_AC, /* 17, Alignment Check */
111+
X86_TRAP_MC, /* 18, Machine Check */
112+
X86_TRAP_XF, /* 19, SIMD Floating-Point Exception */
113+
X86_TRAP_IRET = 32, /* 32, IRET Exception */
114+
};
115+
90116
#endif /* _ASM_X86_TRAPS_H */

drivers/acpi/processor_idle.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,6 +991,9 @@ static int acpi_processor_setup_cpuidle(struct acpi_processor *pr)
991991
return -EINVAL;
992992
}
993993

994+
if (!dev)
995+
return -EINVAL;
996+
994997
dev->cpu = pr->id;
995998
for (i = 0; i < CPUIDLE_STATE_MAX; i++) {
996999
dev->states[i].name[0] = '\0';

drivers/ata/ahci.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,12 @@ static const struct pci_device_id ahci_pci_tbl[] = {
402402
/* Promise */
403403
{ PCI_VDEVICE(PROMISE, 0x3f20), board_ahci }, /* PDC42819 */
404404

405+
/* Asmedia */
406+
{ PCI_VDEVICE(ASMEDIA, 0x0601), board_ahci }, /* ASM1060 */
407+
{ PCI_VDEVICE(ASMEDIA, 0x0602), board_ahci }, /* ASM1060 */
408+
{ PCI_VDEVICE(ASMEDIA, 0x0611), board_ahci }, /* ASM1061 */
409+
{ PCI_VDEVICE(ASMEDIA, 0x0612), board_ahci }, /* ASM1062 */
410+
405411
/* Generic, PCI class code for AHCI */
406412
{ PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
407413
PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff, board_ahci },

drivers/dma/ioat/dma_v3.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -949,7 +949,7 @@ static int __devinit ioat_xor_val_self_test(struct ioatdma_device *device)
949949
goto free_resources;
950950
}
951951
}
952-
dma_sync_single_for_device(dev, dest_dma, PAGE_SIZE, DMA_TO_DEVICE);
952+
dma_sync_single_for_device(dev, dest_dma, PAGE_SIZE, DMA_FROM_DEVICE);
953953

954954
/* skip validate if the capability is not present */
955955
if (!dma_has_cap(DMA_XOR_VAL, dma_chan->device->cap_mask))

drivers/firmware/dmi_scan.c

Lines changed: 61 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
*/
1717
static char dmi_empty_string[] = " ";
1818

19+
static u16 __initdata dmi_ver;
1920
/*
2021
* Catch too early calls to dmi_check_system():
2122
*/
@@ -118,12 +119,12 @@ static int __init dmi_walk_early(void (*decode)(const struct dmi_header *,
118119
return 0;
119120
}
120121

121-
static int __init dmi_checksum(const u8 *buf)
122+
static int __init dmi_checksum(const u8 *buf, u8 len)
122123
{
123124
u8 sum = 0;
124125
int a;
125126

126-
for (a = 0; a < 15; a++)
127+
for (a = 0; a < len; a++)
127128
sum += buf[a];
128129

129130
return sum == 0;
@@ -161,8 +162,10 @@ static void __init dmi_save_uuid(const struct dmi_header *dm, int slot, int inde
161162
return;
162163

163164
for (i = 0; i < 16 && (is_ff || is_00); i++) {
164-
if(d[i] != 0x00) is_ff = 0;
165-
if(d[i] != 0xFF) is_00 = 0;
165+
if (d[i] != 0x00)
166+
is_00 = 0;
167+
if (d[i] != 0xFF)
168+
is_ff = 0;
166169
}
167170

168171
if (is_ff || is_00)
@@ -172,7 +175,15 @@ static void __init dmi_save_uuid(const struct dmi_header *dm, int slot, int inde
172175
if (!s)
173176
return;
174177

175-
sprintf(s, "%pUB", d);
178+
/*
179+
* As of version 2.6 of the SMBIOS specification, the first 3 fields of
180+
* the UUID are supposed to be little-endian encoded. The specification
181+
* says that this is the defacto standard.
182+
*/
183+
if (dmi_ver >= 0x0206)
184+
sprintf(s, "%pUL", d);
185+
else
186+
sprintf(s, "%pUB", d);
176187

177188
dmi_ident[slot] = s;
178189
}
@@ -404,29 +415,57 @@ static int __init dmi_present(const char __iomem *p)
404415
u8 buf[15];
405416

406417
memcpy_fromio(buf, p, 15);
407-
if ((memcmp(buf, "_DMI_", 5) == 0) && dmi_checksum(buf)) {
418+
if (dmi_checksum(buf, 15)) {
408419
dmi_num = (buf[13] << 8) | buf[12];
409420
dmi_len = (buf[7] << 8) | buf[6];
410421
dmi_base = (buf[11] << 24) | (buf[10] << 16) |
411422
(buf[9] << 8) | buf[8];
412423

413-
/*
414-
* DMI version 0.0 means that the real version is taken from
415-
* the SMBIOS version, which we don't know at this point.
416-
*/
417-
if (buf[14] != 0)
418-
printk(KERN_INFO "DMI %d.%d present.\n",
419-
buf[14] >> 4, buf[14] & 0xF);
420-
else
421-
printk(KERN_INFO "DMI present.\n");
422424
if (dmi_walk_early(dmi_decode) == 0) {
425+
if (dmi_ver)
426+
pr_info("SMBIOS %d.%d present.\n",
427+
dmi_ver >> 8, dmi_ver & 0xFF);
428+
else {
429+
dmi_ver = (buf[14] & 0xF0) << 4 |
430+
(buf[14] & 0x0F);
431+
pr_info("Legacy DMI %d.%d present.\n",
432+
dmi_ver >> 8, dmi_ver & 0xFF);
433+
}
423434
dmi_dump_ids();
424435
return 0;
425436
}
426437
}
438+
dmi_ver = 0;
427439
return 1;
428440
}
429441

442+
static int __init smbios_present(const char __iomem *p)
443+
{
444+
u8 buf[32];
445+
int offset = 0;
446+
447+
memcpy_fromio(buf, p, 32);
448+
if ((buf[5] < 32) && dmi_checksum(buf, buf[5])) {
449+
dmi_ver = (buf[6] << 8) + buf[7];
450+
451+
/* Some BIOS report weird SMBIOS version, fix that up */
452+
switch (dmi_ver) {
453+
case 0x021F:
454+
case 0x0221:
455+
pr_debug("SMBIOS version fixup(2.%d->2.%d)\n",
456+
dmi_ver & 0xFF, 3);
457+
dmi_ver = 0x0203;
458+
break;
459+
case 0x0233:
460+
pr_debug("SMBIOS version fixup(2.%d->2.%d)\n", 51, 6);
461+
dmi_ver = 0x0206;
462+
break;
463+
}
464+
offset = 16;
465+
}
466+
return dmi_present(buf + offset);
467+
}
468+
430469
void __init dmi_scan_machine(void)
431470
{
432471
char __iomem *p, *q;
@@ -444,7 +483,7 @@ void __init dmi_scan_machine(void)
444483
if (p == NULL)
445484
goto error;
446485

447-
rc = dmi_present(p + 0x10); /* offset of _DMI_ string */
486+
rc = smbios_present(p);
448487
dmi_iounmap(p, 32);
449488
if (!rc) {
450489
dmi_available = 1;
@@ -462,7 +501,12 @@ void __init dmi_scan_machine(void)
462501
goto error;
463502

464503
for (q = p; q < p + 0x10000; q += 16) {
465-
rc = dmi_present(q);
504+
if (memcmp(q, "_SM_", 4) == 0 && q - p <= 0xFFE0)
505+
rc = smbios_present(q);
506+
else if (memcmp(q, "_DMI_", 5) == 0)
507+
rc = dmi_present(q);
508+
else
509+
continue;
466510
if (!rc) {
467511
dmi_available = 1;
468512
dmi_iounmap(p, 0x10000);

drivers/gpu/drm/i915/i915_gem_execbuffer.c

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,8 @@ i915_gem_execbuffer_relocate_slow(struct drm_device *dev,
655655
total = 0;
656656
for (i = 0; i < count; i++) {
657657
struct drm_i915_gem_relocation_entry __user *user_relocs;
658+
u64 invalid_offset = (u64)-1;
659+
int j;
658660

659661
user_relocs = (void __user *)(uintptr_t)exec[i].relocs_ptr;
660662

@@ -665,6 +667,25 @@ i915_gem_execbuffer_relocate_slow(struct drm_device *dev,
665667
goto err;
666668
}
667669

670+
/* As we do not update the known relocation offsets after
671+
* relocating (due to the complexities in lock handling),
672+
* we need to mark them as invalid now so that we force the
673+
* relocation processing next time. Just in case the target
674+
* object is evicted and then rebound into its old
675+
* presumed_offset before the next execbuffer - if that
676+
* happened we would make the mistake of assuming that the
677+
* relocations were valid.
678+
*/
679+
for (j = 0; j < exec[i].relocation_count; j++) {
680+
if (copy_to_user(&user_relocs[j].presumed_offset,
681+
&invalid_offset,
682+
sizeof(invalid_offset))) {
683+
ret = -EFAULT;
684+
mutex_lock(&dev->struct_mutex);
685+
goto err;
686+
}
687+
}
688+
668689
reloc_offset[i] = total;
669690
total += exec[i].relocation_count;
670691
}

drivers/gpu/drm/i915/i915_reg.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727

2828
#define _PIPE(pipe, a, b) ((a) + (pipe)*((b)-(a)))
2929

30+
#define _MASKED_BIT_ENABLE(a) (((a) << 16) | (a))
31+
3032
/*
3133
* The Bridge device's PCI config space has information about the
3234
* fb aperture size and the amount of pre-reserved memory.
@@ -354,6 +356,7 @@
354356
* the enables for writing to the corresponding low bit.
355357
*/
356358
#define _3D_CHICKEN 0x02084
359+
#define _3D_CHICKEN_HIZ_PLANE_DISABLE_MSAA_4X_SNB (1 << 10)
357360
#define _3D_CHICKEN2 0x0208c
358361
/* Disables pipelining of read flushes past the SF-WIZ interface.
359362
* Required on all Ironlake steppings according to the B-Spec, but the

drivers/gpu/drm/i915/intel_display.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7412,6 +7412,10 @@ static void gen6_init_clock_gating(struct drm_device *dev)
74127412
I915_READ(ILK_DISPLAY_CHICKEN2) |
74137413
ILK_ELPIN_409_SELECT);
74147414

7415+
/* WaDisableHiZPlanesWhenMSAAEnabled */
7416+
I915_WRITE(_3D_CHICKEN,
7417+
_MASKED_BIT_ENABLE(_3D_CHICKEN_HIZ_PLANE_DISABLE_MSAA_4X_SNB));
7418+
74157419
I915_WRITE(WM3_LP_ILK, 0);
74167420
I915_WRITE(WM2_LP_ILK, 0);
74177421
I915_WRITE(WM1_LP_ILK, 0);

drivers/misc/sgi-xp/xpc_main.c

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@
5353
#include <linux/kthread.h>
5454
#include "xpc.h"
5555

56+
#ifdef CONFIG_X86_64
57+
#include <asm/traps.h>
58+
#endif
59+
5660
/* define two XPC debug device structures to be used with dev_dbg() et al */
5761

5862
struct device_driver xpc_dbg_name = {
@@ -1079,6 +1083,9 @@ xpc_system_reboot(struct notifier_block *nb, unsigned long event, void *unused)
10791083
return NOTIFY_DONE;
10801084
}
10811085

1086+
/* Used to only allow one cpu to complete disconnect */
1087+
static unsigned int xpc_die_disconnecting;
1088+
10821089
/*
10831090
* Notify other partitions to deactivate from us by first disengaging from all
10841091
* references to our memory.
@@ -1092,6 +1099,9 @@ xpc_die_deactivate(void)
10921099
long keep_waiting;
10931100
long wait_to_print;
10941101

1102+
if (cmpxchg(&xpc_die_disconnecting, 0, 1))
1103+
return;
1104+
10951105
/* keep xpc_hb_checker thread from doing anything (just in case) */
10961106
xpc_exiting = 1;
10971107

@@ -1159,7 +1169,7 @@ xpc_die_deactivate(void)
11591169
* about the lack of a heartbeat.
11601170
*/
11611171
static int
1162-
xpc_system_die(struct notifier_block *nb, unsigned long event, void *unused)
1172+
xpc_system_die(struct notifier_block *nb, unsigned long event, void *_die_args)
11631173
{
11641174
#ifdef CONFIG_IA64 /* !!! temporary kludge */
11651175
switch (event) {
@@ -1191,7 +1201,27 @@ xpc_system_die(struct notifier_block *nb, unsigned long event, void *unused)
11911201
break;
11921202
}
11931203
#else
1194-
xpc_die_deactivate();
1204+
struct die_args *die_args = _die_args;
1205+
1206+
switch (event) {
1207+
case DIE_TRAP:
1208+
if (die_args->trapnr == X86_TRAP_DF)
1209+
xpc_die_deactivate();
1210+
1211+
if (((die_args->trapnr == X86_TRAP_MF) ||
1212+
(die_args->trapnr == X86_TRAP_XF)) &&
1213+
!user_mode_vm(die_args->regs))
1214+
xpc_die_deactivate();
1215+
1216+
break;
1217+
case DIE_INT3:
1218+
case DIE_DEBUG:
1219+
break;
1220+
case DIE_OOPS:
1221+
case DIE_GPF:
1222+
default:
1223+
xpc_die_deactivate();
1224+
}
11951225
#endif
11961226

11971227
return NOTIFY_DONE;

0 commit comments

Comments
 (0)