Skip to content

Commit fb7ba21

Browse files
committed
Merge remote branch 'korg/drm-fixes' into drm-vmware-next
necessary for some of the vmware fixes to be pushed in. Conflicts: drivers/gpu/drm/drm_gem.c drivers/gpu/drm/i915/intel_fb.c include/drm/drmP.h
2 parents 9a170ca + abb295f commit fb7ba21

81 files changed

Lines changed: 645 additions & 375 deletions

Some content is hidden

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

‎MAINTAINERS‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2677,6 +2677,8 @@ M: Guenter Roeck <guenter.roeck@ericsson.com>
26772677
L: lm-sensors@lm-sensors.org
26782678
W: http://www.lm-sensors.org/
26792679
T: quilt kernel.org/pub/linux/kernel/people/jdelvare/linux-2.6/jdelvare-hwmon/
2680+
T: quilt kernel.org/pub/linux/kernel/people/groeck/linux-staging/
2681+
T: git git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git
26802682
S: Maintained
26812683
F: Documentation/hwmon/
26822684
F: drivers/hwmon/

‎arch/alpha/kernel/entry.S‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@
7373
ldq $20, HAE_REG($19); \
7474
stq $21, HAE_CACHE($19); \
7575
stq $21, 0($20); \
76-
ldq $0, 0($sp); \
77-
ldq $1, 8($sp); \
7876
99:; \
7977
ldq $19, 72($sp); \
8078
ldq $20, 80($sp); \
@@ -316,7 +314,7 @@ ret_from_sys_call:
316314
cmovne $26, 0, $19 /* $19 = 0 => non-restartable */
317315
ldq $0, SP_OFF($sp)
318316
and $0, 8, $0
319-
beq $0, restore_all
317+
beq $0, ret_to_kernel
320318
ret_to_user:
321319
/* Make sure need_resched and sigpending don't change between
322320
sampling and the rti. */
@@ -329,6 +327,11 @@ restore_all:
329327
RESTORE_ALL
330328
call_pal PAL_rti
331329

330+
ret_to_kernel:
331+
lda $16, 7
332+
call_pal PAL_swpipl
333+
br restore_all
334+
332335
.align 3
333336
$syscall_error:
334337
/*
@@ -657,7 +660,7 @@ kernel_thread:
657660
/* We don't actually care for a3 success widgetry in the kernel.
658661
Not for positive errno values. */
659662
stq $0, 0($sp) /* $0 */
660-
br restore_all
663+
br ret_to_kernel
661664
.end kernel_thread
662665

663666
/*

‎arch/alpha/kernel/process.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ dump_elf_thread(elf_greg_t *dest, struct pt_regs *pt, struct thread_info *ti)
356356
dest[27] = pt->r27;
357357
dest[28] = pt->r28;
358358
dest[29] = pt->gp;
359-
dest[30] = rdusp();
359+
dest[30] = ti == current_thread_info() ? rdusp() : ti->pcb.usp;
360360
dest[31] = pt->pc;
361361

362362
/* Once upon a time this was the PS value. Which is stupid

‎arch/m32r/include/asm/signal.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ typedef struct sigaltstack {
157157
#undef __HAVE_ARCH_SIG_BITOPS
158158

159159
struct pt_regs;
160-
extern int do_signal(struct pt_regs *regs, sigset_t *oldset);
161160

162161
#define ptrace_signal_deliver(regs, cookie) do { } while (0)
163162

‎arch/m32r/include/asm/unistd.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@
351351
#define __ARCH_WANT_SYS_OLD_GETRLIMIT /*will be unused*/
352352
#define __ARCH_WANT_SYS_OLDUMOUNT
353353
#define __ARCH_WANT_SYS_RT_SIGACTION
354+
#define __ARCH_WANT_SYS_RT_SIGSUSPEND
354355

355356
#define __IGNORE_lchown
356357
#define __IGNORE_setuid

‎arch/m32r/kernel/entry.S‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,9 @@ work_resched:
235235
work_notifysig: ; deal with pending signals and
236236
; notify-resume requests
237237
mv r0, sp ; arg1 : struct pt_regs *regs
238-
ldi r1, #0 ; arg2 : sigset_t *oldset
239-
mv r2, r9 ; arg3 : __u32 thread_info_flags
238+
mv r1, r9 ; arg2 : __u32 thread_info_flags
240239
bl do_notify_resume
241-
bra restore_all
240+
bra resume_userspace
242241

243242
; perform syscall exit tracing
244243
ALIGN

‎arch/m32r/kernel/ptrace.c‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -592,16 +592,17 @@ void user_enable_single_step(struct task_struct *child)
592592

593593
if (access_process_vm(child, pc&~3, &insn, sizeof(insn), 0)
594594
!= sizeof(insn))
595-
break;
595+
return -EIO;
596596

597597
compute_next_pc(insn, pc, &next_pc, child);
598598
if (next_pc & 0x80000000)
599-
break;
599+
return -EIO;
600600

601601
if (embed_debug_trap(child, next_pc))
602-
break;
602+
return -EIO;
603603

604604
invalidate_cache();
605+
return 0;
605606
}
606607

607608
void user_disable_single_step(struct task_struct *child)

‎arch/m32r/kernel/signal.c‎

Lines changed: 41 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -28,37 +28,6 @@
2828

2929
#define DEBUG_SIG 0
3030

31-
#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
32-
33-
int do_signal(struct pt_regs *, sigset_t *);
34-
35-
asmlinkage int
36-
sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize,
37-
unsigned long r2, unsigned long r3, unsigned long r4,
38-
unsigned long r5, unsigned long r6, struct pt_regs *regs)
39-
{
40-
sigset_t newset;
41-
42-
/* XXX: Don't preclude handling different sized sigset_t's. */
43-
if (sigsetsize != sizeof(sigset_t))
44-
return -EINVAL;
45-
46-
if (copy_from_user(&newset, unewset, sizeof(newset)))
47-
return -EFAULT;
48-
sigdelsetmask(&newset, sigmask(SIGKILL)|sigmask(SIGSTOP));
49-
50-
spin_lock_irq(&current->sighand->siglock);
51-
current->saved_sigmask = current->blocked;
52-
current->blocked = newset;
53-
recalc_sigpending();
54-
spin_unlock_irq(&current->sighand->siglock);
55-
56-
current->state = TASK_INTERRUPTIBLE;
57-
schedule();
58-
set_thread_flag(TIF_RESTORE_SIGMASK);
59-
return -ERESTARTNOHAND;
60-
}
61-
6231
asmlinkage int
6332
sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,
6433
unsigned long r2, unsigned long r3, unsigned long r4,
@@ -218,7 +187,7 @@ get_sigframe(struct k_sigaction *ka, unsigned long sp, size_t frame_size)
218187
return (void __user *)((sp - frame_size) & -8ul);
219188
}
220189

221-
static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
190+
static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
222191
sigset_t *set, struct pt_regs *regs)
223192
{
224193
struct rt_sigframe __user *frame;
@@ -275,22 +244,34 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
275244
current->comm, current->pid, frame, regs->pc);
276245
#endif
277246

278-
return;
247+
return 0;
279248

280249
give_sigsegv:
281250
force_sigsegv(sig, current);
251+
return -EFAULT;
252+
}
253+
254+
static int prev_insn(struct pt_regs *regs)
255+
{
256+
u16 inst;
257+
if (get_user(&inst, (u16 __user *)(regs->bpc - 2)))
258+
return -EFAULT;
259+
if ((inst & 0xfff0) == 0x10f0) /* trap ? */
260+
regs->bpc -= 2;
261+
else
262+
regs->bpc -= 4;
263+
regs->syscall_nr = -1;
264+
return 0;
282265
}
283266

284267
/*
285268
* OK, we're invoking a handler
286269
*/
287270

288-
static void
271+
static int
289272
handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
290273
sigset_t *oldset, struct pt_regs *regs)
291274
{
292-
unsigned short inst;
293-
294275
/* Are we from a system call? */
295276
if (regs->syscall_nr >= 0) {
296277
/* If so, check system call restarting.. */
@@ -308,36 +289,35 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
308289
/* fallthrough */
309290
case -ERESTARTNOINTR:
310291
regs->r0 = regs->orig_r0;
311-
inst = *(unsigned short *)(regs->bpc - 2);
312-
if ((inst & 0xfff0) == 0x10f0) /* trap ? */
313-
regs->bpc -= 2;
314-
else
315-
regs->bpc -= 4;
292+
if (prev_insn(regs) < 0)
293+
return -EFAULT;
316294
}
317295
}
318296

319297
/* Set up the stack frame */
320-
setup_rt_frame(sig, ka, info, oldset, regs);
298+
if (setup_rt_frame(sig, ka, info, oldset, regs))
299+
return -EFAULT;
321300

322301
spin_lock_irq(&current->sighand->siglock);
323302
sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
324303
if (!(ka->sa.sa_flags & SA_NODEFER))
325304
sigaddset(&current->blocked,sig);
326305
recalc_sigpending();
327306
spin_unlock_irq(&current->sighand->siglock);
307+
return 0;
328308
}
329309

330310
/*
331311
* Note that 'init' is a special process: it doesn't get signals it doesn't
332312
* want to handle. Thus you cannot kill init even with a SIGKILL even by
333313
* mistake.
334314
*/
335-
int do_signal(struct pt_regs *regs, sigset_t *oldset)
315+
static void do_signal(struct pt_regs *regs)
336316
{
337317
siginfo_t info;
338318
int signr;
339319
struct k_sigaction ka;
340-
unsigned short inst;
320+
sigset_t *oldset;
341321

342322
/*
343323
* We want the common case to go fast, which
@@ -346,12 +326,14 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset)
346326
* if so.
347327
*/
348328
if (!user_mode(regs))
349-
return 1;
329+
return;
350330

351331
if (try_to_freeze())
352332
goto no_signal;
353333

354-
if (!oldset)
334+
if (test_thread_flag(TIF_RESTORE_SIGMASK))
335+
oldset = &current->saved_sigmask;
336+
else
355337
oldset = &current->blocked;
356338

357339
signr = get_signal_to_deliver(&info, &ka, regs, NULL);
@@ -363,8 +345,10 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset)
363345
*/
364346

365347
/* Whee! Actually deliver the signal. */
366-
handle_signal(signr, &ka, &info, oldset, regs);
367-
return 1;
348+
if (handle_signal(signr, &ka, &info, oldset, regs) == 0)
349+
clear_thread_flag(TIF_RESTORE_SIGMASK);
350+
351+
return;
368352
}
369353

370354
no_signal:
@@ -375,39 +359,32 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset)
375359
regs->r0 == -ERESTARTSYS ||
376360
regs->r0 == -ERESTARTNOINTR) {
377361
regs->r0 = regs->orig_r0;
378-
inst = *(unsigned short *)(regs->bpc - 2);
379-
if ((inst & 0xfff0) == 0x10f0) /* trap ? */
380-
regs->bpc -= 2;
381-
else
382-
regs->bpc -= 4;
383-
}
384-
if (regs->r0 == -ERESTART_RESTARTBLOCK){
362+
prev_insn(regs);
363+
} else if (regs->r0 == -ERESTART_RESTARTBLOCK){
385364
regs->r0 = regs->orig_r0;
386365
regs->r7 = __NR_restart_syscall;
387-
inst = *(unsigned short *)(regs->bpc - 2);
388-
if ((inst & 0xfff0) == 0x10f0) /* trap ? */
389-
regs->bpc -= 2;
390-
else
391-
regs->bpc -= 4;
366+
prev_insn(regs);
392367
}
393368
}
394-
return 0;
369+
if (test_thread_flag(TIF_RESTORE_SIGMASK)) {
370+
clear_thread_flag(TIF_RESTORE_SIGMASK);
371+
sigprocmask(SIG_SETMASK, &current->saved_sigmask, NULL);
372+
}
395373
}
396374

397375
/*
398376
* notification of userspace execution resumption
399377
* - triggered by current->work.notify_resume
400378
*/
401-
void do_notify_resume(struct pt_regs *regs, sigset_t *oldset,
402-
__u32 thread_info_flags)
379+
void do_notify_resume(struct pt_regs *regs, __u32 thread_info_flags)
403380
{
404381
/* Pending single-step? */
405382
if (thread_info_flags & _TIF_SINGLESTEP)
406383
clear_thread_flag(TIF_SINGLESTEP);
407384

408385
/* deal with pending signal delivery */
409386
if (thread_info_flags & _TIF_SIGPENDING)
410-
do_signal(regs,oldset);
387+
do_signal(regs);
411388

412389
if (thread_info_flags & _TIF_NOTIFY_RESUME) {
413390
clear_thread_flag(TIF_NOTIFY_RESUME);

‎arch/tile/kernel/intvec_32.S‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1506,13 +1506,6 @@ handle_ill:
15061506
}
15071507
STD_ENDPROC(handle_ill)
15081508

1509-
.pushsection .rodata, "a"
1510-
.align 8
1511-
bpt_code:
1512-
bpt
1513-
ENDPROC(bpt_code)
1514-
.popsection
1515-
15161509
/* Various stub interrupt handlers and syscall handlers */
15171510

15181511
STD_ENTRY_LOCAL(_kernel_double_fault)

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@
168168
#define X86_FEATURE_XSAVEOPT (7*32+ 4) /* Optimized Xsave */
169169
#define X86_FEATURE_PLN (7*32+ 5) /* Intel Power Limit Notification */
170170
#define X86_FEATURE_PTS (7*32+ 6) /* Intel Package Thermal Status */
171+
#define X86_FEATURE_DTS (7*32+ 7) /* Digital Thermal Sensor */
171172

172173
/* Virtualization flags: Linux defined, word 8 */
173174
#define X86_FEATURE_TPR_SHADOW (8*32+ 0) /* Intel TPR Shadow */

0 commit comments

Comments
 (0)