Skip to content

Commit b89e32c

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha
Pull alpha updates from Matt Turner: "A few small fixes and clean ups" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha: alpha: fix crash if pthread_create races with signal delivery alpha: fix formating of stack content alpha: fix reboot on Avanti platform alpha: deprecate pci_get_bus_and_slot() alpha: Fix mixed up args in EXC macro in futex operations alpha: osf_sys.c: use timespec64 where appropriate alpha: osf_sys.c: fix put_tv32 regression alpha: make thread_saved_pc static alpha: make XTABS equivalent to TAB3
2 parents 03f51d4 + 21ffced commit b89e32c

8 files changed

Lines changed: 26 additions & 18 deletions

File tree

‎arch/alpha/include/asm/futex.h‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
"3: .subsection 2\n" \
2121
"4: br 1b\n" \
2222
" .previous\n" \
23-
EXC(1b,3b,%1,$31) \
24-
EXC(2b,3b,%1,$31) \
23+
EXC(1b,3b,$31,%1) \
24+
EXC(2b,3b,$31,%1) \
2525
: "=&r" (oldval), "=&r"(ret) \
2626
: "r" (uaddr), "r"(oparg) \
2727
: "memory")
@@ -82,8 +82,8 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
8282
"3: .subsection 2\n"
8383
"4: br 1b\n"
8484
" .previous\n"
85-
EXC(1b,3b,%0,$31)
86-
EXC(2b,3b,%0,$31)
85+
EXC(1b,3b,$31,%0)
86+
EXC(2b,3b,$31,%0)
8787
: "+r"(ret), "=&r"(prev), "=&r"(cmp)
8888
: "r"(uaddr), "r"((long)(int)oldval), "r"(newval)
8989
: "memory");

‎arch/alpha/include/asm/processor.h‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,12 @@ typedef struct {
4040
struct thread_struct { };
4141
#define INIT_THREAD { }
4242

43-
/* Return saved PC of a blocked thread. */
44-
struct task_struct;
45-
extern unsigned long thread_saved_pc(struct task_struct *);
46-
4743
/* Do necessary setup to start up a newly executed thread. */
4844
struct pt_regs;
4945
extern void start_thread(struct pt_regs *, unsigned long, unsigned long);
5046

5147
/* Free all resources held by a thread. */
48+
struct task_struct;
5249
extern void release_thread(struct task_struct *);
5350

5451
unsigned long get_wchan(struct task_struct *p);

‎arch/alpha/include/uapi/asm/termbits.h‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,11 @@ struct ktermios {
110110
#define VTDLY 00200000
111111
#define VT0 00000000
112112
#define VT1 00200000
113-
#define XTABS 01000000 /* Hmm.. Linux/i386 considers this part of TABDLY.. */
113+
/*
114+
* Should be equivalent to TAB3, see description of TAB3 in
115+
* POSIX.1-2008, Ch. 11.2.3 "Output Modes"
116+
*/
117+
#define XTABS TAB3
114118

115119
/* c_cflag bit meaning */
116120
#define CBAUD 0000037

‎arch/alpha/kernel/pci.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ sys_pciconfig_iobase(long which, unsigned long bus, unsigned long dfn)
425425
if (bus == 0 && dfn == 0) {
426426
hose = pci_isa_hose;
427427
} else {
428-
dev = pci_get_bus_and_slot(bus, dfn);
428+
dev = pci_get_domain_bus_and_slot(0, bus, dfn);
429429
if (!dev)
430430
return -ENODEV;
431431
hose = dev->sysdata;

‎arch/alpha/kernel/pci_impl.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ struct pci_iommu_arena
144144
};
145145

146146
#if defined(CONFIG_ALPHA_SRM) && \
147-
(defined(CONFIG_ALPHA_CIA) || defined(CONFIG_ALPHA_LCA))
147+
(defined(CONFIG_ALPHA_CIA) || defined(CONFIG_ALPHA_LCA) || \
148+
defined(CONFIG_ALPHA_AVANTI))
148149
# define NEED_SRM_SAVE_RESTORE
149150
#else
150151
# undef NEED_SRM_SAVE_RESTORE

‎arch/alpha/kernel/process.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,12 +269,13 @@ copy_thread(unsigned long clone_flags, unsigned long usp,
269269
application calling fork. */
270270
if (clone_flags & CLONE_SETTLS)
271271
childti->pcb.unique = regs->r20;
272+
else
273+
regs->r20 = 0; /* OSF/1 has some strange fork() semantics. */
272274
childti->pcb.usp = usp ?: rdusp();
273275
*childregs = *regs;
274276
childregs->r0 = 0;
275277
childregs->r19 = 0;
276278
childregs->r20 = 1; /* OSF/1 has some strange fork() semantics. */
277-
regs->r20 = 0;
278279
stack = ((struct switch_stack *) regs) - 1;
279280
*childstack = *stack;
280281
childstack->r26 = (unsigned long) ret_from_fork;
@@ -361,7 +362,7 @@ EXPORT_SYMBOL(dump_elf_task_fp);
361362
* all. -- r~
362363
*/
363364

364-
unsigned long
365+
static unsigned long
365366
thread_saved_pc(struct task_struct *t)
366367
{
367368
unsigned long base = (unsigned long)task_stack_page(t);

‎arch/alpha/kernel/sys_nautilus.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ nautilus_init_pci(void)
237237
bus = hose->bus = bridge->bus;
238238
pcibios_claim_one_bus(bus);
239239

240-
irongate = pci_get_bus_and_slot(0, 0);
240+
irongate = pci_get_domain_bus_and_slot(pci_domain_nr(bus), 0, 0);
241241
bus->self = irongate;
242242
bus->resource[0] = &irongate_io;
243243
bus->resource[1] = &irongate_mem;

‎arch/alpha/kernel/traps.c‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,16 @@ void show_stack(struct task_struct *task, unsigned long *sp)
160160
for(i=0; i < kstack_depth_to_print; i++) {
161161
if (((long) stack & (THREAD_SIZE-1)) == 0)
162162
break;
163-
if (i && ((i % 4) == 0))
164-
printk("\n ");
165-
printk("%016lx ", *stack++);
163+
if ((i % 4) == 0) {
164+
if (i)
165+
pr_cont("\n");
166+
printk(" ");
167+
} else {
168+
pr_cont(" ");
169+
}
170+
pr_cont("%016lx", *stack++);
166171
}
167-
printk("\n");
172+
pr_cont("\n");
168173
dik_show_trace(sp);
169174
}
170175

0 commit comments

Comments
 (0)