Skip to content

Commit dd689a6

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha
Pull alpha update from Matt Turner: "A few fixes and wires up some additional syscalls." [ Some of this is technically not really rc7 material, but it's alpha, and it all looks safe anyway. Matt explains: "My alpha has been offline, hence the very late-in-cycle pull request" and hasn't caused problems before, so he gets to slide. - Linus ] * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha: alpha: uapi: Add support for __SANE_USERSPACE_TYPES__ alpha: Define ioremap_wc alpha: Fix section mismatches alpha: support R_ALPHA_REFLONG relocations for module loading alpha: Fix typo in ev6-copy_user.S alpha: Package string routines together alpha: Update for new syscalls alpha: Fix build error without CONFIG_VGA_HOSE.
2 parents 36fde05 + cec80d8 commit dd689a6

File tree

13 files changed

+68
-16
lines changed

13 files changed

+68
-16
lines changed

arch/alpha/include/asm/io.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ static inline void __iomem * ioremap_nocache(unsigned long offset,
299299
return ioremap(offset, size);
300300
}
301301

302+
#define ioremap_wc ioremap_nocache
302303
#define ioremap_uc ioremap_nocache
303304

304305
static inline void iounmap(volatile void __iomem *addr)

arch/alpha/include/asm/types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#ifndef _ALPHA_TYPES_H
22
#define _ALPHA_TYPES_H
33

4-
#include <asm-generic/int-ll64.h>
4+
#include <uapi/asm/types.h>
55

66
#endif /* _ALPHA_TYPES_H */

arch/alpha/include/asm/unistd.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#include <uapi/asm/unistd.h>
55

6-
#define NR_SYSCALLS 514
6+
#define NR_SYSCALLS 523
77

88
#define __ARCH_WANT_OLD_READDIR
99
#define __ARCH_WANT_STAT64

arch/alpha/include/uapi/asm/types.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,18 @@
99
* need to be careful to avoid a name clashes.
1010
*/
1111

12-
#ifndef __KERNEL__
12+
/*
13+
* This is here because we used to use l64 for alpha
14+
* and we don't want to impact user mode with our change to ll64
15+
* in the kernel.
16+
*
17+
* However, some user programs are fine with this. They can
18+
* flag __SANE_USERSPACE_TYPES__ to get int-ll64.h here.
19+
*/
20+
#if !defined(__SANE_USERSPACE_TYPES__) && !defined(__KERNEL__)
1321
#include <asm-generic/int-l64.h>
22+
#else
23+
#include <asm-generic/int-ll64.h>
1424
#endif
1525

1626
#endif /* _UAPI_ALPHA_TYPES_H */

arch/alpha/include/uapi/asm/unistd.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,5 +475,19 @@
475475
#define __NR_getrandom 511
476476
#define __NR_memfd_create 512
477477
#define __NR_execveat 513
478+
#define __NR_seccomp 514
479+
#define __NR_bpf 515
480+
#define __NR_userfaultfd 516
481+
#define __NR_membarrier 517
482+
#define __NR_mlock2 518
483+
#define __NR_copy_file_range 519
484+
#define __NR_preadv2 520
485+
#define __NR_pwritev2 521
486+
#define __NR_statx 522
487+
488+
/* Alpha doesn't have protection keys. */
489+
#define __IGNORE_pkey_mprotect
490+
#define __IGNORE_pkey_alloc
491+
#define __IGNORE_pkey_free
478492

479493
#endif /* _UAPI_ALPHA_UNISTD_H */

arch/alpha/kernel/core_marvel.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ marvel_init_io7(struct io7 *io7)
351351
}
352352
}
353353

354-
void
354+
void __init
355355
marvel_io7_present(gct6_node *node)
356356
{
357357
int pe;
@@ -369,6 +369,7 @@ marvel_io7_present(gct6_node *node)
369369
static void __init
370370
marvel_find_console_vga_hose(void)
371371
{
372+
#ifdef CONFIG_VGA_HOSE
372373
u64 *pu64 = (u64 *)((u64)hwrpb + hwrpb->ctbt_offset);
373374

374375
if (pu64[7] == 3) { /* TERM_TYPE == graphics */
@@ -402,9 +403,10 @@ marvel_find_console_vga_hose(void)
402403
pci_vga_hose = hose;
403404
}
404405
}
406+
#endif
405407
}
406408

407-
gct6_search_struct gct_wanted_node_list[] = {
409+
gct6_search_struct gct_wanted_node_list[] __initdata = {
408410
{ GCT_TYPE_HOSE, GCT_SUBTYPE_IO_PORT_MODULE, marvel_io7_present },
409411
{ 0, 0, NULL }
410412
};

arch/alpha/kernel/core_titan.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,13 +461,15 @@ titan_ioremap(unsigned long addr, unsigned long size)
461461
unsigned long *ptes;
462462
unsigned long pfn;
463463

464+
#ifdef CONFIG_VGA_HOSE
464465
/*
465466
* Adjust the address and hose, if necessary.
466467
*/
467468
if (pci_vga_hose && __is_mem_vga(addr)) {
468469
h = pci_vga_hose->index;
469470
addr += pci_vga_hose->mem_space->start;
470471
}
472+
#endif
471473

472474
/*
473475
* Find the hose.

arch/alpha/kernel/module.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,9 @@ apply_relocate_add(Elf64_Shdr *sechdrs, const char *strtab,
181181
switch (r_type) {
182182
case R_ALPHA_NONE:
183183
break;
184+
case R_ALPHA_REFLONG:
185+
*(u32 *)location = value;
186+
break;
184187
case R_ALPHA_REFQUAD:
185188
/* BUG() can produce misaligned relocations. */
186189
((u32 *)location)[0] = value;

arch/alpha/kernel/smp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ wait_boot_cpu_to_stop(int cpuid)
115115
/*
116116
* Where secondaries begin a life of C.
117117
*/
118-
void
118+
void __init
119119
smp_callin(void)
120120
{
121121
int cpuid = hard_smp_processor_id();

arch/alpha/kernel/systbls.S

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,15 @@ sys_call_table:
532532
.quad sys_getrandom
533533
.quad sys_memfd_create
534534
.quad sys_execveat
535+
.quad sys_seccomp
536+
.quad sys_bpf /* 515 */
537+
.quad sys_userfaultfd
538+
.quad sys_membarrier
539+
.quad sys_mlock2
540+
.quad sys_copy_file_range
541+
.quad sys_preadv2 /* 520 */
542+
.quad sys_pwritev2
543+
.quad sys_statx
535544

536545
.size sys_call_table, . - sys_call_table
537546
.type sys_call_table, @object

arch/alpha/lib/Makefile

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,8 @@ lib-y = __divqu.o __remqu.o __divlu.o __remlu.o \
2020
checksum.o \
2121
csum_partial_copy.o \
2222
$(ev67-y)strlen.o \
23-
$(ev67-y)strcat.o \
24-
strcpy.o \
25-
$(ev67-y)strncat.o \
26-
strncpy.o \
27-
$(ev6-y)stxcpy.o \
28-
$(ev6-y)stxncpy.o \
23+
stycpy.o \
24+
styncpy.o \
2925
$(ev67-y)strchr.o \
3026
$(ev67-y)strrchr.o \
3127
$(ev6-y)memchr.o \
@@ -49,3 +45,17 @@ AFLAGS___remlu.o = -DREM -DINTSIZE
4945
$(addprefix $(obj)/,__divqu.o __remqu.o __divlu.o __remlu.o): \
5046
$(src)/$(ev6-y)divide.S FORCE
5147
$(call if_changed_rule,as_o_S)
48+
49+
# There are direct branches between {str*cpy,str*cat} and stx*cpy.
50+
# Ensure the branches are within range by merging these objects.
51+
52+
LDFLAGS_stycpy.o := -r
53+
LDFLAGS_styncpy.o := -r
54+
55+
$(obj)/stycpy.o: $(obj)/strcpy.o $(obj)/$(ev67-y)strcat.o \
56+
$(obj)/$(ev6-y)stxcpy.o FORCE
57+
$(call if_changed,ld)
58+
59+
$(obj)/styncpy.o: $(obj)/strncpy.o $(obj)/$(ev67-y)strncat.o \
60+
$(obj)/$(ev6-y)stxncpy.o FORCE
61+
$(call if_changed,ld)

arch/alpha/lib/copy_user.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
.ent __copy_user
3535
__copy_user:
3636
.prologue 0
37-
and $18,$18,$0
37+
mov $18,$0
3838
and $16,7,$3
3939
beq $0,$35
4040
beq $3,$36

arch/alpha/lib/ev6-copy_user.S

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,10 @@
4545
# Pipeline info: Slotting & Comments
4646
__copy_user:
4747
.prologue 0
48-
andq $18, $18, $0
49-
subq $18, 32, $1 # .. E .. .. : Is this going to be a small copy?
50-
beq $0, $zerolength # U .. .. .. : U L U L
48+
mov $18, $0 # .. .. .. E
49+
subq $18, 32, $1 # .. .. E. .. : Is this going to be a small copy?
50+
nop # .. E .. ..
51+
beq $18, $zerolength # U .. .. .. : U L U L
5152

5253
and $16,7,$3 # .. .. .. E : is leading dest misalignment
5354
ble $1, $onebyteloop # .. .. U .. : 1st branch : small amount of data

0 commit comments

Comments
 (0)