diff -druNp --no-dereference linux-libre-4.17-gnu/arch/alpha/include/asm/Kbuild linux-libre-4.18-rc8-gnu/arch/alpha/include/asm/Kbuild
--- linux-libre-4.17-gnu/arch/alpha/include/asm/Kbuild	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/alpha/include/asm/Kbuild	2018-08-05 15:37:41.000000000 -0400
@@ -1,6 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 
 
+generic-y += compat.h
 generic-y += exec.h
 generic-y += export.h
 generic-y += fb.h
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/alpha/include/asm/pci.h linux-libre-4.18-rc8-gnu/arch/alpha/include/asm/pci.h
--- linux-libre-4.17-gnu/arch/alpha/include/asm/pci.h	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/alpha/include/asm/pci.h	2018-08-05 15:37:41.000000000 -0400
@@ -56,11 +56,6 @@ struct pci_controller {
 
 /* IOMMU controls.  */
 
-/* The PCI address space does not equal the physical memory address space.
-   The networking and block device layers use this boolean for bounce buffer
-   decisions.  */
-#define PCI_DMA_BUS_IS_PHYS  0
-
 /* TODO: integrate with include/asm-generic/pci.h ? */
 static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
 {
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/alpha/include/uapi/asm/ipcbuf.h linux-libre-4.18-rc8-gnu/arch/alpha/include/uapi/asm/ipcbuf.h
--- linux-libre-4.17-gnu/arch/alpha/include/uapi/asm/ipcbuf.h	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/alpha/include/uapi/asm/ipcbuf.h	1969-12-31 19:00:00.000000000 -0500
@@ -1,2 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-#include <asm-generic/ipcbuf.h>
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/alpha/include/uapi/asm/Kbuild linux-libre-4.18-rc8-gnu/arch/alpha/include/uapi/asm/Kbuild
--- linux-libre-4.17-gnu/arch/alpha/include/uapi/asm/Kbuild	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/alpha/include/uapi/asm/Kbuild	2018-08-05 15:37:41.000000000 -0400
@@ -2,4 +2,8 @@
 include include/uapi/asm-generic/Kbuild.asm
 
 generic-y += bpf_perf_event.h
+generic-y += ipcbuf.h
+generic-y += msgbuf.h
 generic-y += poll.h
+generic-y += sembuf.h
+generic-y += shmbuf.h
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/alpha/include/uapi/asm/msgbuf.h linux-libre-4.18-rc8-gnu/arch/alpha/include/uapi/asm/msgbuf.h
--- linux-libre-4.17-gnu/arch/alpha/include/uapi/asm/msgbuf.h	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/alpha/include/uapi/asm/msgbuf.h	1969-12-31 19:00:00.000000000 -0500
@@ -1,28 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-#ifndef _ALPHA_MSGBUF_H
-#define _ALPHA_MSGBUF_H
-
-/* 
- * The msqid64_ds structure for alpha architecture.
- * Note extra padding because this structure is passed back and forth
- * between kernel and user space.
- *
- * Pad space is left for:
- * - 2 miscellaneous 64-bit values
- */
-
-struct msqid64_ds {
-	struct ipc64_perm msg_perm;
-	__kernel_time_t msg_stime;	/* last msgsnd time */
-	__kernel_time_t msg_rtime;	/* last msgrcv time */
-	__kernel_time_t msg_ctime;	/* last change time */
-	unsigned long  msg_cbytes;	/* current number of bytes on queue */
-	unsigned long  msg_qnum;	/* number of messages in queue */
-	unsigned long  msg_qbytes;	/* max number of bytes on queue */
-	__kernel_pid_t msg_lspid;	/* pid of last msgsnd */
-	__kernel_pid_t msg_lrpid;	/* last receive pid */
-	unsigned long  __unused1;
-	unsigned long  __unused2;
-};
-
-#endif /* _ALPHA_MSGBUF_H */
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/alpha/include/uapi/asm/sembuf.h linux-libre-4.18-rc8-gnu/arch/alpha/include/uapi/asm/sembuf.h
--- linux-libre-4.17-gnu/arch/alpha/include/uapi/asm/sembuf.h	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/alpha/include/uapi/asm/sembuf.h	1969-12-31 19:00:00.000000000 -0500
@@ -1,23 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-#ifndef _ALPHA_SEMBUF_H
-#define _ALPHA_SEMBUF_H
-
-/* 
- * The semid64_ds structure for alpha architecture.
- * Note extra padding because this structure is passed back and forth
- * between kernel and user space.
- *
- * Pad space is left for:
- * - 2 miscellaneous 64-bit values
- */
-
-struct semid64_ds {
-	struct ipc64_perm sem_perm;		/* permissions .. see ipc.h */
-	__kernel_time_t	sem_otime;		/* last semop time */
-	__kernel_time_t	sem_ctime;		/* last change time */
-	unsigned long	sem_nsems;		/* no. of semaphores in array */
-	unsigned long	__unused1;
-	unsigned long	__unused2;
-};
-
-#endif /* _ALPHA_SEMBUF_H */
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/alpha/include/uapi/asm/shmbuf.h linux-libre-4.18-rc8-gnu/arch/alpha/include/uapi/asm/shmbuf.h
--- linux-libre-4.17-gnu/arch/alpha/include/uapi/asm/shmbuf.h	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/alpha/include/uapi/asm/shmbuf.h	1969-12-31 19:00:00.000000000 -0500
@@ -1,39 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-#ifndef _ALPHA_SHMBUF_H
-#define _ALPHA_SHMBUF_H
-
-/* 
- * The shmid64_ds structure for alpha architecture.
- * Note extra padding because this structure is passed back and forth
- * between kernel and user space.
- *
- * Pad space is left for:
- * - 2 miscellaneous 64-bit values
- */
-
-struct shmid64_ds {
-	struct ipc64_perm	shm_perm;	/* operation perms */
-	size_t			shm_segsz;	/* size of segment (bytes) */
-	__kernel_time_t		shm_atime;	/* last attach time */
-	__kernel_time_t		shm_dtime;	/* last detach time */
-	__kernel_time_t		shm_ctime;	/* last change time */
-	__kernel_pid_t		shm_cpid;	/* pid of creator */
-	__kernel_pid_t		shm_lpid;	/* pid of last operator */
-	unsigned long		shm_nattch;	/* no. of current attaches */
-	unsigned long		__unused1;
-	unsigned long		__unused2;
-};
-
-struct shminfo64 {
-	unsigned long	shmmax;
-	unsigned long	shmmin;
-	unsigned long	shmmni;
-	unsigned long	shmseg;
-	unsigned long	shmall;
-	unsigned long	__unused1;
-	unsigned long	__unused2;
-	unsigned long	__unused3;
-	unsigned long	__unused4;
-};
-
-#endif /* _ALPHA_SHMBUF_H */
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/alpha/include/uapi/asm/siginfo.h linux-libre-4.18-rc8-gnu/arch/alpha/include/uapi/asm/siginfo.h
--- linux-libre-4.17-gnu/arch/alpha/include/uapi/asm/siginfo.h	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/alpha/include/uapi/asm/siginfo.h	2018-08-05 15:37:41.000000000 -0400
@@ -7,18 +7,4 @@
 
 #include <asm-generic/siginfo.h>
 
-/*
- * SIGFPE si_codes
- */
-#ifdef __KERNEL__
-#define FPE_FIXME	0	/* Broken dup of SI_USER */
-#endif /* __KERNEL__ */
-
-/*
- * SIGTRAP si_codes
- */
-#ifdef __KERNEL__
-#define TRAP_FIXME	0	/* Broken dup of SI_USER */
-#endif /* __KERNEL__ */
-
 #endif
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/alpha/Kconfig linux-libre-4.18-rc8-gnu/arch/alpha/Kconfig
--- linux-libre-4.17-gnu/arch/alpha/Kconfig	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/alpha/Kconfig	2018-08-05 15:37:41.000000000 -0400
@@ -10,6 +10,8 @@ config ALPHA
 	select HAVE_OPROFILE
 	select HAVE_PCSPKR_PLATFORM
 	select HAVE_PERF_EVENTS
+	select NEED_DMA_MAP_STATE
+	select NEED_SG_DMA_LENGTH
 	select VIRT_TO_BUS
 	select GENERIC_IRQ_PROBE
 	select AUTO_IRQ_AFFINITY if SMP
@@ -64,15 +66,6 @@ config ZONE_DMA
 	bool
 	default y
 
-config ARCH_DMA_ADDR_T_64BIT
-	def_bool y
-
-config NEED_DMA_MAP_STATE
-       def_bool y
-
-config NEED_SG_DMA_LENGTH
-	def_bool y
-
 config GENERIC_ISA_DMA
 	bool
 	default y
@@ -346,9 +339,6 @@ config PCI_DOMAINS
 config PCI_SYSCALL
 	def_bool PCI
 
-config IOMMU_HELPER
-	def_bool PCI
-
 config ALPHA_NONAME
 	bool
 	depends on ALPHA_BOOK1 || ALPHA_NONAME_CH
@@ -565,11 +555,6 @@ config SMP
 
 	  If you don't know what to do here, say N.
 
-config HAVE_DEC_LOCK
-	bool
-	depends on SMP
-	default y
-
 config NR_CPUS
 	int "Maximum number of CPUs (2-32)"
 	range 2 32
@@ -586,7 +571,7 @@ config ARCH_DISCONTIGMEM_ENABLE
 	  Say Y to support efficient handling of discontiguous physical memory,
 	  for architectures which are either NUMA (Non-Uniform Memory Access)
 	  or have huge holes in the physical address space for other reasons.
-	  See <file:Documentation/vm/numa> for more.
+	  See <file:Documentation/vm/numa.rst> for more.
 
 source "mm/Kconfig"
 
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/alpha/kernel/osf_sys.c linux-libre-4.18-rc8-gnu/arch/alpha/kernel/osf_sys.c
--- linux-libre-4.17-gnu/arch/alpha/kernel/osf_sys.c	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/alpha/kernel/osf_sys.c	2018-08-05 15:37:41.000000000 -0400
@@ -871,8 +871,7 @@ SYSCALL_DEFINE5(osf_setsysinfo, unsigned
 		   send a signal.  Old exceptions are not signaled.  */
 		fex = (exc >> IEEE_STATUS_TO_EXCSUM_SHIFT) & swcr;
  		if (fex) {
-			siginfo_t info;
-			int si_code = 0;
+			int si_code = FPE_FLTUNK;
 
 			if (fex & IEEE_TRAP_ENABLE_DNO) si_code = FPE_FLTUND;
 			if (fex & IEEE_TRAP_ENABLE_INE) si_code = FPE_FLTRES;
@@ -881,11 +880,9 @@ SYSCALL_DEFINE5(osf_setsysinfo, unsigned
 			if (fex & IEEE_TRAP_ENABLE_DZE) si_code = FPE_FLTDIV;
 			if (fex & IEEE_TRAP_ENABLE_INV) si_code = FPE_FLTINV;
 
-			info.si_signo = SIGFPE;
-			info.si_errno = 0;
-			info.si_code = si_code;
-			info.si_addr = NULL;  /* FIXME */
- 			send_sig_info(SIGFPE, &info, current);
+			send_sig_fault(SIGFPE, si_code,
+				       (void __user *)NULL,  /* FIXME */
+				       0, current);
  		}
 		return 0;
 	}
@@ -1183,13 +1180,10 @@ SYSCALL_DEFINE2(osf_getrusage, int, who,
 SYSCALL_DEFINE4(osf_wait4, pid_t, pid, int __user *, ustatus, int, options,
 		struct rusage32 __user *, ur)
 {
-	unsigned int status = 0;
 	struct rusage r;
-	long err = kernel_wait4(pid, &status, options, &r);
+	long err = kernel_wait4(pid, ustatus, options, &r);
 	if (err <= 0)
 		return err;
-	if (put_user(status, ustatus))
-		return -EFAULT;
 	if (!ur)
 		return err;
 	if (put_tv_to_tv32(&ur->ru_utime, &r.ru_utime))
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/alpha/kernel/signal.c linux-libre-4.18-rc8-gnu/arch/alpha/kernel/signal.c
--- linux-libre-4.17-gnu/arch/alpha/kernel/signal.c	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/alpha/kernel/signal.c	2018-08-05 15:37:41.000000000 -0400
@@ -219,14 +219,8 @@ do_sigreturn(struct sigcontext __user *s
 
 	/* Send SIGTRAP if we're single-stepping: */
 	if (ptrace_cancel_bpt (current)) {
-		siginfo_t info;
-
-		info.si_signo = SIGTRAP;
-		info.si_errno = 0;
-		info.si_code = TRAP_BRKPT;
-		info.si_addr = (void __user *) regs->pc;
-		info.si_trapno = 0;
-		send_sig_info(SIGTRAP, &info, current);
+		send_sig_fault(SIGTRAP, TRAP_BRKPT, (void __user *) regs->pc, 0,
+			       current);
 	}
 	return;
 
@@ -253,14 +247,8 @@ do_rt_sigreturn(struct rt_sigframe __use
 
 	/* Send SIGTRAP if we're single-stepping: */
 	if (ptrace_cancel_bpt (current)) {
-		siginfo_t info;
-
-		info.si_signo = SIGTRAP;
-		info.si_errno = 0;
-		info.si_code = TRAP_BRKPT;
-		info.si_addr = (void __user *) regs->pc;
-		info.si_trapno = 0;
-		send_sig_info(SIGTRAP, &info, current);
+		send_sig_fault(SIGTRAP, TRAP_BRKPT, (void __user *) regs->pc, 0,
+			       current);
 	}
 	return;
 
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/alpha/kernel/traps.c linux-libre-4.18-rc8-gnu/arch/alpha/kernel/traps.c
--- linux-libre-4.17-gnu/arch/alpha/kernel/traps.c	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/alpha/kernel/traps.c	2018-08-05 15:37:41.000000000 -0400
@@ -213,7 +213,6 @@ do_entArith(unsigned long summary, unsig
 	    struct pt_regs *regs)
 {
 	long si_code = FPE_FLTINV;
-	siginfo_t info;
 
 	if (summary & 1) {
 		/* Software-completion summary bit is set, so try to
@@ -228,17 +227,12 @@ do_entArith(unsigned long summary, unsig
 	}
 	die_if_kernel("Arithmetic fault", regs, 0, NULL);
 
-	info.si_signo = SIGFPE;
-	info.si_errno = 0;
-	info.si_code = si_code;
-	info.si_addr = (void __user *) regs->pc;
-	send_sig_info(SIGFPE, &info, current);
+	send_sig_fault(SIGFPE, si_code, (void __user *) regs->pc, 0, current);
 }
 
 asmlinkage void
 do_entIF(unsigned long type, struct pt_regs *regs)
 {
-	siginfo_t info;
 	int signo, code;
 
 	if ((regs->ps & ~IPL_MAX) == 0) {
@@ -270,31 +264,20 @@ do_entIF(unsigned long type, struct pt_r
 
 	switch (type) {
 	      case 0: /* breakpoint */
-		info.si_signo = SIGTRAP;
-		info.si_errno = 0;
-		info.si_code = TRAP_BRKPT;
-		info.si_trapno = 0;
-		info.si_addr = (void __user *) regs->pc;
-
 		if (ptrace_cancel_bpt(current)) {
 			regs->pc -= 4;	/* make pc point to former bpt */
 		}
 
-		send_sig_info(SIGTRAP, &info, current);
+		send_sig_fault(SIGTRAP, TRAP_BRKPT, (void __user *)regs->pc, 0,
+			       current);
 		return;
 
 	      case 1: /* bugcheck */
-		info.si_signo = SIGTRAP;
-		info.si_errno = 0;
-		info.si_code = TRAP_FIXME;
-		info.si_addr = (void __user *) regs->pc;
-		info.si_trapno = 0;
-		send_sig_info(SIGTRAP, &info, current);
+		send_sig_fault(SIGTRAP, TRAP_UNK, (void __user *) regs->pc, 0,
+			       current);
 		return;
 		
 	      case 2: /* gentrap */
-		info.si_addr = (void __user *) regs->pc;
-		info.si_trapno = regs->r16;
 		switch ((long) regs->r16) {
 		case GEN_INTOVF:
 			signo = SIGFPE;
@@ -326,7 +309,7 @@ do_entIF(unsigned long type, struct pt_r
 			break;
 		case GEN_ROPRAND:
 			signo = SIGFPE;
-			code = FPE_FIXME;
+			code = FPE_FLTUNK;
 			break;
 
 		case GEN_DECOVF:
@@ -348,15 +331,12 @@ do_entIF(unsigned long type, struct pt_r
 		case GEN_SUBRNG7:
 		default:
 			signo = SIGTRAP;
-			code = TRAP_FIXME;
+			code = TRAP_UNK;
 			break;
 		}
 
-		info.si_signo = signo;
-		info.si_errno = 0;
-		info.si_code = code;
-		info.si_addr = (void __user *) regs->pc;
-		send_sig_info(signo, &info, current);
+		send_sig_fault(signo, code, (void __user *) regs->pc, regs->r16,
+			       current);
 		return;
 
 	      case 4: /* opDEC */
@@ -380,11 +360,9 @@ do_entIF(unsigned long type, struct pt_r
 			if (si_code == 0)
 				return;
 			if (si_code > 0) {
-				info.si_signo = SIGFPE;
-				info.si_errno = 0;
-				info.si_code = si_code;
-				info.si_addr = (void __user *) regs->pc;
-				send_sig_info(SIGFPE, &info, current);
+				send_sig_fault(SIGFPE, si_code,
+					       (void __user *) regs->pc, 0,
+					       current);
 				return;
 			}
 		}
@@ -409,11 +387,7 @@ do_entIF(unsigned long type, struct pt_r
 		      ;
 	}
 
-	info.si_signo = SIGILL;
-	info.si_errno = 0;
-	info.si_code = ILL_ILLOPC;
-	info.si_addr = (void __user *) regs->pc;
-	send_sig_info(SIGILL, &info, current);
+	send_sig_fault(SIGILL, ILL_ILLOPC, (void __user *)regs->pc, 0, current);
 }
 
 /* There is an ifdef in the PALcode in MILO that enables a 
@@ -426,15 +400,9 @@ do_entIF(unsigned long type, struct pt_r
 asmlinkage void
 do_entDbg(struct pt_regs *regs)
 {
-	siginfo_t info;
-
 	die_if_kernel("Instruction fault", regs, 0, NULL);
 
-	info.si_signo = SIGILL;
-	info.si_errno = 0;
-	info.si_code = ILL_ILLOPC;
-	info.si_addr = (void __user *) regs->pc;
-	force_sig_info(SIGILL, &info, current);
+	force_sig_fault(SIGILL, ILL_ILLOPC, (void __user *)regs->pc, 0, current);
 }
 
 
@@ -758,7 +726,7 @@ do_entUnaUser(void __user * va, unsigned
 
 	unsigned long tmp1, tmp2, tmp3, tmp4;
 	unsigned long fake_reg, *reg_addr = &fake_reg;
-	siginfo_t info;
+	int si_code;
 	long error;
 
 	/* Check the UAC bits to decide what the user wants us to do
@@ -981,34 +949,27 @@ do_entUnaUser(void __user * va, unsigned
 
 give_sigsegv:
 	regs->pc -= 4;  /* make pc point to faulting insn */
-	info.si_signo = SIGSEGV;
-	info.si_errno = 0;
 
 	/* We need to replicate some of the logic in mm/fault.c,
 	   since we don't have access to the fault code in the
 	   exception handling return path.  */
 	if ((unsigned long)va >= TASK_SIZE)
-		info.si_code = SEGV_ACCERR;
+		si_code = SEGV_ACCERR;
 	else {
 		struct mm_struct *mm = current->mm;
 		down_read(&mm->mmap_sem);
 		if (find_vma(mm, (unsigned long)va))
-			info.si_code = SEGV_ACCERR;
+			si_code = SEGV_ACCERR;
 		else
-			info.si_code = SEGV_MAPERR;
+			si_code = SEGV_MAPERR;
 		up_read(&mm->mmap_sem);
 	}
-	info.si_addr = va;
-	send_sig_info(SIGSEGV, &info, current);
+	send_sig_fault(SIGSEGV, si_code, va, 0, current);
 	return;
 
 give_sigbus:
 	regs->pc -= 4;
-	info.si_signo = SIGBUS;
-	info.si_errno = 0;
-	info.si_code = BUS_ADRALN;
-	info.si_addr = va;
-	send_sig_info(SIGBUS, &info, current);
+	send_sig_fault(SIGBUS, BUS_ADRALN, va, 0, current);
 	return;
 }
 
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/alpha/lib/dec_and_lock.c linux-libre-4.18-rc8-gnu/arch/alpha/lib/dec_and_lock.c
--- linux-libre-4.17-gnu/arch/alpha/lib/dec_and_lock.c	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/alpha/lib/dec_and_lock.c	1969-12-31 19:00:00.000000000 -0500
@@ -1,44 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * arch/alpha/lib/dec_and_lock.c
- *
- * ll/sc version of atomic_dec_and_lock()
- * 
- */
-
-#include <linux/spinlock.h>
-#include <linux/atomic.h>
-#include <linux/export.h>
-
-  asm (".text					\n\
-	.global _atomic_dec_and_lock		\n\
-	.ent _atomic_dec_and_lock		\n\
-	.align	4				\n\
-_atomic_dec_and_lock:				\n\
-	.prologue 0				\n\
-1:	ldl_l	$1, 0($16)			\n\
-	subl	$1, 1, $1			\n\
-	beq	$1, 2f				\n\
-	stl_c	$1, 0($16)			\n\
-	beq	$1, 4f				\n\
-	mb					\n\
-	clr	$0				\n\
-	ret					\n\
-2:	br	$29, 3f				\n\
-3:	ldgp	$29, 0($29)			\n\
-	br	$atomic_dec_and_lock_1..ng	\n\
-	.subsection 2				\n\
-4:	br	1b				\n\
-	.previous				\n\
-	.end _atomic_dec_and_lock");
-
-static int __used atomic_dec_and_lock_1(atomic_t *atomic, spinlock_t *lock)
-{
-	/* Slow path */
-	spin_lock(lock);
-	if (atomic_dec_and_test(atomic))
-		return 1;
-	spin_unlock(lock);
-	return 0;
-}
-EXPORT_SYMBOL(_atomic_dec_and_lock);
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/alpha/lib/Makefile linux-libre-4.18-rc8-gnu/arch/alpha/lib/Makefile
--- linux-libre-4.17-gnu/arch/alpha/lib/Makefile	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/alpha/lib/Makefile	2018-08-05 15:37:41.000000000 -0400
@@ -35,8 +35,6 @@ lib-y =	__divqu.o __remqu.o __divlu.o __
 	callback_srm.o srm_puts.o srm_printk.o \
 	fls.o
 
-lib-$(CONFIG_SMP) += dec_and_lock.o
-
 # The division routines are built from single source, with different defines.
 AFLAGS___divqu.o = -DDIV
 AFLAGS___remqu.o =       -DREM
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/alpha/Makefile linux-libre-4.18-rc8-gnu/arch/alpha/Makefile
--- linux-libre-4.17-gnu/arch/alpha/Makefile	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/alpha/Makefile	2018-08-05 15:37:41.000000000 -0400
@@ -11,7 +11,7 @@
 NM := $(NM) -B
 
 LDFLAGS_vmlinux	:= -static -N #-relax
-CHECKFLAGS	+= -D__alpha__ -m64
+CHECKFLAGS	+= -D__alpha__
 cflags-y	:= -pipe -mno-fp-regs -ffixed-8
 cflags-y	+= $(call cc-option, -fno-jump-tables)
 
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/alpha/mm/fault.c linux-libre-4.18-rc8-gnu/arch/alpha/mm/fault.c
--- linux-libre-4.17-gnu/arch/alpha/mm/fault.c	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/alpha/mm/fault.c	2018-08-05 15:37:41.000000000 -0400
@@ -88,7 +88,6 @@ do_page_fault(unsigned long address, uns
 	struct mm_struct *mm = current->mm;
 	const struct exception_table_entry *fixup;
 	int fault, si_code = SEGV_MAPERR;
-	siginfo_t info;
 	unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE;
 
 	/* As of EV6, a load into $31/$f31 is a prefetch, and never faults
@@ -221,21 +220,13 @@ retry:
 	up_read(&mm->mmap_sem);
 	/* Send a sigbus, regardless of whether we were in kernel
 	   or user mode.  */
-	info.si_signo = SIGBUS;
-	info.si_errno = 0;
-	info.si_code = BUS_ADRERR;
-	info.si_addr = (void __user *) address;
-	force_sig_info(SIGBUS, &info, current);
+	force_sig_fault(SIGBUS, BUS_ADRERR, (void __user *) address, 0, current);
 	if (!user_mode(regs))
 		goto no_context;
 	return;
 
  do_sigsegv:
-	info.si_signo = SIGSEGV;
-	info.si_errno = 0;
-	info.si_code = si_code;
-	info.si_addr = (void __user *) address;
-	force_sig_info(SIGSEGV, &info, current);
+	force_sig_fault(SIGSEGV, si_code, (void __user *) address, 0, current);
 	return;
 
 #ifdef CONFIG_ALPHA_LARGE_VMALLOC
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/arc/configs/axs101_defconfig linux-libre-4.18-rc8-gnu/arch/arc/configs/axs101_defconfig
--- linux-libre-4.17-gnu/arch/arc/configs/axs101_defconfig	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/arc/configs/axs101_defconfig	2018-08-05 15:37:41.000000000 -0400
@@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y
 # CONFIG_UTS_NS is not set
 # CONFIG_PID_NS is not set
 CONFIG_BLK_DEV_INITRD=y
-CONFIG_INITRAMFS_SOURCE="../arc_initramfs/"
 CONFIG_EMBEDDED=y
 CONFIG_PERF_EVENTS=y
 # CONFIG_VM_EVENT_COUNTERS is not set
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/arc/configs/axs103_defconfig linux-libre-4.18-rc8-gnu/arch/arc/configs/axs103_defconfig
--- linux-libre-4.17-gnu/arch/arc/configs/axs103_defconfig	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/arc/configs/axs103_defconfig	2018-08-05 15:37:41.000000000 -0400
@@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y
 # CONFIG_UTS_NS is not set
 # CONFIG_PID_NS is not set
 CONFIG_BLK_DEV_INITRD=y
-CONFIG_INITRAMFS_SOURCE="../../arc_initramfs_hs/"
 CONFIG_EMBEDDED=y
 CONFIG_PERF_EVENTS=y
 # CONFIG_VM_EVENT_COUNTERS is not set
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/arc/configs/axs103_smp_defconfig linux-libre-4.18-rc8-gnu/arch/arc/configs/axs103_smp_defconfig
--- linux-libre-4.17-gnu/arch/arc/configs/axs103_smp_defconfig	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/arc/configs/axs103_smp_defconfig	2018-08-05 15:37:41.000000000 -0400
@@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y
 # CONFIG_UTS_NS is not set
 # CONFIG_PID_NS is not set
 CONFIG_BLK_DEV_INITRD=y
-CONFIG_INITRAMFS_SOURCE="../../arc_initramfs_hs/"
 CONFIG_EMBEDDED=y
 CONFIG_PERF_EVENTS=y
 # CONFIG_VM_EVENT_COUNTERS is not set
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/arc/configs/haps_hs_defconfig linux-libre-4.18-rc8-gnu/arch/arc/configs/haps_hs_defconfig
--- linux-libre-4.17-gnu/arch/arc/configs/haps_hs_defconfig	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/arc/configs/haps_hs_defconfig	2018-08-05 15:37:41.000000000 -0400
@@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y
 # CONFIG_UTS_NS is not set
 # CONFIG_PID_NS is not set
 CONFIG_BLK_DEV_INITRD=y
-CONFIG_INITRAMFS_SOURCE="../../arc_initramfs_hs/"
 CONFIG_EXPERT=y
 CONFIG_PERF_EVENTS=y
 # CONFIG_COMPAT_BRK is not set
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/arc/configs/haps_hs_smp_defconfig linux-libre-4.18-rc8-gnu/arch/arc/configs/haps_hs_smp_defconfig
--- linux-libre-4.17-gnu/arch/arc/configs/haps_hs_smp_defconfig	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/arc/configs/haps_hs_smp_defconfig	2018-08-05 15:37:41.000000000 -0400
@@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y
 # CONFIG_UTS_NS is not set
 # CONFIG_PID_NS is not set
 CONFIG_BLK_DEV_INITRD=y
-CONFIG_INITRAMFS_SOURCE="../../arc_initramfs_hs/"
 CONFIG_EMBEDDED=y
 CONFIG_PERF_EVENTS=y
 # CONFIG_VM_EVENT_COUNTERS is not set
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/arc/configs/hsdk_defconfig linux-libre-4.18-rc8-gnu/arch/arc/configs/hsdk_defconfig
--- linux-libre-4.17-gnu/arch/arc/configs/hsdk_defconfig	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/arc/configs/hsdk_defconfig	2018-08-05 15:37:41.000000000 -0400
@@ -9,7 +9,6 @@ CONFIG_NAMESPACES=y
 # CONFIG_UTS_NS is not set
 # CONFIG_PID_NS is not set
 CONFIG_BLK_DEV_INITRD=y
-CONFIG_INITRAMFS_SOURCE="../../arc_initramfs_hs/"
 CONFIG_EMBEDDED=y
 CONFIG_PERF_EVENTS=y
 # CONFIG_VM_EVENT_COUNTERS is not set
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/arc/configs/nsim_700_defconfig linux-libre-4.18-rc8-gnu/arch/arc/configs/nsim_700_defconfig
--- linux-libre-4.17-gnu/arch/arc/configs/nsim_700_defconfig	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/arc/configs/nsim_700_defconfig	2018-08-05 15:37:41.000000000 -0400
@@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y
 # CONFIG_UTS_NS is not set
 # CONFIG_PID_NS is not set
 CONFIG_BLK_DEV_INITRD=y
-CONFIG_INITRAMFS_SOURCE="../arc_initramfs/"
 CONFIG_KALLSYMS_ALL=y
 CONFIG_EMBEDDED=y
 CONFIG_PERF_EVENTS=y
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/arc/configs/nsim_hs_defconfig linux-libre-4.18-rc8-gnu/arch/arc/configs/nsim_hs_defconfig
--- linux-libre-4.17-gnu/arch/arc/configs/nsim_hs_defconfig	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/arc/configs/nsim_hs_defconfig	2018-08-05 15:37:41.000000000 -0400
@@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y
 # CONFIG_UTS_NS is not set
 # CONFIG_PID_NS is not set
 CONFIG_BLK_DEV_INITRD=y
-CONFIG_INITRAMFS_SOURCE="../../arc_initramfs_hs/"
 CONFIG_KALLSYMS_ALL=y
 CONFIG_EMBEDDED=y
 CONFIG_PERF_EVENTS=y
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/arc/configs/nsim_hs_smp_defconfig linux-libre-4.18-rc8-gnu/arch/arc/configs/nsim_hs_smp_defconfig
--- linux-libre-4.17-gnu/arch/arc/configs/nsim_hs_smp_defconfig	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/arc/configs/nsim_hs_smp_defconfig	2018-08-05 15:37:41.000000000 -0400
@@ -9,7 +9,6 @@ CONFIG_NAMESPACES=y
 # CONFIG_UTS_NS is not set
 # CONFIG_PID_NS is not set
 CONFIG_BLK_DEV_INITRD=y
-CONFIG_INITRAMFS_SOURCE="../arc_initramfs_hs/"
 CONFIG_KALLSYMS_ALL=y
 CONFIG_EMBEDDED=y
 CONFIG_PERF_EVENTS=y
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/arc/configs/nsimosci_defconfig linux-libre-4.18-rc8-gnu/arch/arc/configs/nsimosci_defconfig
--- linux-libre-4.17-gnu/arch/arc/configs/nsimosci_defconfig	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/arc/configs/nsimosci_defconfig	2018-08-05 15:37:41.000000000 -0400
@@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y
 # CONFIG_UTS_NS is not set
 # CONFIG_PID_NS is not set
 CONFIG_BLK_DEV_INITRD=y
-CONFIG_INITRAMFS_SOURCE="../arc_initramfs/"
 CONFIG_KALLSYMS_ALL=y
 CONFIG_EMBEDDED=y
 CONFIG_PERF_EVENTS=y
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/arc/configs/nsimosci_hs_defconfig linux-libre-4.18-rc8-gnu/arch/arc/configs/nsimosci_hs_defconfig
--- linux-libre-4.17-gnu/arch/arc/configs/nsimosci_hs_defconfig	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/arc/configs/nsimosci_hs_defconfig	2018-08-05 15:37:41.000000000 -0400
@@ -11,7 +11,6 @@ CONFIG_NAMESPACES=y
 # CONFIG_UTS_NS is not set
 # CONFIG_PID_NS is not set
 CONFIG_BLK_DEV_INITRD=y
-CONFIG_INITRAMFS_SOURCE="../arc_initramfs_hs/"
 CONFIG_KALLSYMS_ALL=y
 CONFIG_EMBEDDED=y
 CONFIG_PERF_EVENTS=y
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/arc/configs/nsimosci_hs_smp_defconfig linux-libre-4.18-rc8-gnu/arch/arc/configs/nsimosci_hs_smp_defconfig
--- linux-libre-4.17-gnu/arch/arc/configs/nsimosci_hs_smp_defconfig	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/arc/configs/nsimosci_hs_smp_defconfig	2018-08-05 15:37:41.000000000 -0400
@@ -9,7 +9,6 @@ CONFIG_IKCONFIG_PROC=y
 # CONFIG_UTS_NS is not set
 # CONFIG_PID_NS is not set
 CONFIG_BLK_DEV_INITRD=y
-CONFIG_INITRAMFS_SOURCE="../arc_initramfs_hs/"
 CONFIG_PERF_EVENTS=y
 # CONFIG_COMPAT_BRK is not set
 CONFIG_KPROBES=y
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/arc/configs/tb10x_defconfig linux-libre-4.18-rc8-gnu/arch/arc/configs/tb10x_defconfig
--- linux-libre-4.17-gnu/arch/arc/configs/tb10x_defconfig	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/arc/configs/tb10x_defconfig	2018-08-05 15:37:41.000000000 -0400
@@ -56,7 +56,6 @@ CONFIG_STMMAC_ETH=y
 # CONFIG_INPUT is not set
 # CONFIG_SERIO is not set
 # CONFIG_VT is not set
-CONFIG_DEVPTS_MULTIPLE_INSTANCES=y
 # CONFIG_LEGACY_PTYS is not set
 # CONFIG_DEVKMEM is not set
 CONFIG_SERIAL_8250=y
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/arc/include/asm/cache.h linux-libre-4.18-rc8-gnu/arch/arc/include/asm/cache.h
--- linux-libre-4.17-gnu/arch/arc/include/asm/cache.h	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/arc/include/asm/cache.h	2018-08-05 15:37:41.000000000 -0400
@@ -48,7 +48,9 @@
 })
 
 /* Largest line length for either L1 or L2 is 128 bytes */
-#define ARCH_DMA_MINALIGN      128
+#define SMP_CACHE_BYTES		128
+#define cache_line_size()	SMP_CACHE_BYTES
+#define ARCH_DMA_MINALIGN	SMP_CACHE_BYTES
 
 extern void arc_cache_init(void);
 extern char *arc_cache_mumbojumbo(int cpu_id, char *buf, int len);
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/arc/include/asm/delay.h linux-libre-4.18-rc8-gnu/arch/arc/include/asm/delay.h
--- linux-libre-4.17-gnu/arch/arc/include/asm/delay.h	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/arc/include/asm/delay.h	2018-08-05 15:37:41.000000000 -0400
@@ -17,8 +17,11 @@
 #ifndef __ASM_ARC_UDELAY_H
 #define __ASM_ARC_UDELAY_H
 
+#include <asm-generic/types.h>
 #include <asm/param.h>		/* HZ */
 
+extern unsigned long loops_per_jiffy;
+
 static inline void __delay(unsigned long loops)
 {
 	__asm__ __volatile__(
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/arc/include/asm/dma-mapping.h linux-libre-4.18-rc8-gnu/arch/arc/include/asm/dma-mapping.h
--- linux-libre-4.17-gnu/arch/arc/include/asm/dma-mapping.h	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/arc/include/asm/dma-mapping.h	1969-12-31 19:00:00.000000000 -0500
@@ -1,21 +0,0 @@
-/*
- * DMA Mapping glue for ARC
- *
- * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#ifndef ASM_ARC_DMA_MAPPING_H
-#define ASM_ARC_DMA_MAPPING_H
-
-extern const struct dma_map_ops arc_dma_ops;
-
-static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
-{
-	return &arc_dma_ops;
-}
-
-#endif
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/arc/include/asm/entry-compact.h linux-libre-4.18-rc8-gnu/arch/arc/include/asm/entry-compact.h
--- linux-libre-4.17-gnu/arch/arc/include/asm/entry-compact.h	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/arc/include/asm/entry-compact.h	2018-08-05 15:37:41.000000000 -0400
@@ -234,6 +234,9 @@
 	POP	gp
 	RESTORE_R12_TO_R0
 
+#ifdef CONFIG_ARC_CURR_IN_REG
+	ld	r25, [sp, 12]
+#endif
 	ld  sp, [sp] /* restore original sp */
 	/* orig_r0, ECR, user_r25 skipped automatically */
 .endm
@@ -315,6 +318,9 @@
 	POP	gp
 	RESTORE_R12_TO_R0
 
+#ifdef CONFIG_ARC_CURR_IN_REG
+	ld	r25, [sp, 12]
+#endif
 	ld  sp, [sp] /* restore original sp */
 	/* orig_r0, ECR, user_r25 skipped automatically */
 .endm
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/arc/include/asm/entry.h linux-libre-4.18-rc8-gnu/arch/arc/include/asm/entry.h
--- linux-libre-4.17-gnu/arch/arc/include/asm/entry.h	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/arc/include/asm/entry.h	2018-08-05 15:37:41.000000000 -0400
@@ -86,9 +86,6 @@
 	POP	r1
 	POP	r0
 
-#ifdef CONFIG_ARC_CURR_IN_REG
-	ld	r25, [sp, 12]
-#endif
 .endm
 
 /*--------------------------------------------------------------
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/arc/include/asm/Kbuild linux-libre-4.18-rc8-gnu/arch/arc/include/asm/Kbuild
--- linux-libre-4.17-gnu/arch/arc/include/asm/Kbuild	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/arc/include/asm/Kbuild	2018-08-05 15:37:41.000000000 -0400
@@ -1,7 +1,9 @@
 # SPDX-License-Identifier: GPL-2.0
 generic-y += bugs.h
+generic-y += compat.h
 generic-y += device.h
 generic-y += div64.h
+generic-y += dma-mapping.h
 generic-y += emergency-restart.h
 generic-y += extable.h
 generic-y += fb.h
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/arc/include/asm/mach_desc.h linux-libre-4.18-rc8-gnu/arch/arc/include/asm/mach_desc.h
--- linux-libre-4.17-gnu/arch/arc/include/asm/mach_desc.h	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/arc/include/asm/mach_desc.h	2018-08-05 15:37:41.000000000 -0400
@@ -34,9 +34,7 @@ struct machine_desc {
 	const char		*name;
 	const char		**dt_compat;
 	void			(*init_early)(void);
-#ifdef CONFIG_SMP
 	void			(*init_per_cpu)(unsigned int);
-#endif
 	void			(*init_machine)(void);
 	void			(*init_late)(void);
 
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/arc/include/asm/page.h linux-libre-4.18-rc8-gnu/arch/arc/include/asm/page.h
--- linux-libre-4.17-gnu/arch/arc/include/asm/page.h	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/arc/include/asm/page.h	2018-08-05 15:37:41.000000000 -0400
@@ -105,7 +105,7 @@ typedef pte_t * pgtable_t;
 #define virt_addr_valid(kaddr)  pfn_valid(virt_to_pfn(kaddr))
 
 /* Default Permissions for stack/heaps pages (Non Executable) */
-#define VM_DATA_DEFAULT_FLAGS   (VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE)
+#define VM_DATA_DEFAULT_FLAGS   (VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
 
 #define WANT_PAGE_VIRTUAL   1
 
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/arc/include/asm/pci.h linux-libre-4.18-rc8-gnu/arch/arc/include/asm/pci.h
--- linux-libre-4.17-gnu/arch/arc/include/asm/pci.h	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/arc/include/asm/pci.h	2018-08-05 15:37:41.000000000 -0400
@@ -16,12 +16,6 @@
 #define PCIBIOS_MIN_MEM 0x100000
 
 #define pcibios_assign_all_busses()	1
-/*
- * The PCI address space does equal the physical memory address space.
- * The networking and block device layers use this boolean for bounce
- * buffer decisions.
- */
-#define PCI_DMA_BUS_IS_PHYS	1
 
 #endif /* __KERNEL__ */
 
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/arc/include/asm/pgtable.h linux-libre-4.18-rc8-gnu/arch/arc/include/asm/pgtable.h
--- linux-libre-4.17-gnu/arch/arc/include/asm/pgtable.h	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/arc/include/asm/pgtable.h	2018-08-05 15:37:41.000000000 -0400
@@ -320,8 +320,6 @@ PTE_BIT_FUNC(mkexec,	|= (_PAGE_EXECUTE))
 PTE_BIT_FUNC(mkspecial,	|= (_PAGE_SPECIAL));
 PTE_BIT_FUNC(mkhuge,	|= (_PAGE_HW_SZ));
 
-#define __HAVE_ARCH_PTE_SPECIAL
-
 static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
 {
 	return __pte((pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot));
@@ -379,7 +377,7 @@ void update_mmu_cache(struct vm_area_str
 
 /* Decode a PTE containing swap "identifier "into constituents */
 #define __swp_type(pte_lookalike)	(((pte_lookalike).val) & 0x1f)
-#define __swp_offset(pte_lookalike)	((pte_lookalike).val << 13)
+#define __swp_offset(pte_lookalike)	((pte_lookalike).val >> 13)
 
 /* NOPs, to keep generic kernel happy */
 #define __pte_to_swp_entry(pte)	((swp_entry_t) { pte_val(pte) })
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/arc/Kconfig linux-libre-4.18-rc8-gnu/arch/arc/Kconfig
--- linux-libre-4.17-gnu/arch/arc/Kconfig	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/arc/Kconfig	2018-08-05 15:37:41.000000000 -0400
@@ -9,11 +9,15 @@
 config ARC
 	def_bool y
 	select ARC_TIMERS
+	select ARCH_HAS_SYNC_DMA_FOR_CPU
+	select ARCH_HAS_SYNC_DMA_FOR_DEVICE
 	select ARCH_HAS_SG_CHAIN
 	select ARCH_SUPPORTS_ATOMIC_RMW if ARC_HAS_LLSC
 	select BUILDTIME_EXTABLE_SORT
 	select CLONE_BACKWARDS
 	select COMMON_CLK
+	select DMA_NONCOHERENT_OPS
+	select DMA_NONCOHERENT_MMAP
 	select GENERIC_ATOMIC64 if !ISA_ARCV2 || !(ARC_HAS_LL64 && ARC_HAS_LLSC)
 	select GENERIC_CLOCKEVENTS
 	select GENERIC_FIND_FIRST_BIT
@@ -44,6 +48,10 @@ config ARC
 	select HAVE_GENERIC_DMA_COHERENT
 	select HAVE_KERNEL_GZIP
 	select HAVE_KERNEL_LZMA
+	select ARCH_HAS_PTE_SPECIAL
+
+config ARCH_HAS_CACHE_LINE_SIZE
+	def_bool y
 
 config MIGHT_HAVE_PCI
 	bool
@@ -408,7 +416,7 @@ config ARC_HAS_DIV_REM
 
 config ARC_HAS_ACCL_REGS
 	bool "Reg Pair ACCL:ACCH (FPU and/or MPY > 6)"
-	default n
+	default y
 	help
 	  Depending on the configuration, CPU can contain accumulator reg-pair
 	  (also referred to as r58:r59). These can also be used by gcc as GPR so
@@ -453,16 +461,11 @@ config ARC_HAS_PAE40
 	default n
 	depends on ISA_ARCV2
 	select HIGHMEM
+	select PHYS_ADDR_T_64BIT
 	help
 	  Enable access to physical memory beyond 4G, only supported on
 	  ARC cores with 40 bit Physical Addressing support
 
-config ARCH_PHYS_ADDR_T_64BIT
-	def_bool ARC_HAS_PAE40
-
-config ARCH_DMA_ADDR_T_64BIT
-	bool
-
 config ARC_KVADDR_SIZE
 	int "Kernel Virtual Address Space size (MB)"
 	range 0 512
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/arc/kernel/irq.c linux-libre-4.18-rc8-gnu/arch/arc/kernel/irq.c
--- linux-libre-4.17-gnu/arch/arc/kernel/irq.c	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/arc/kernel/irq.c	2018-08-05 15:37:41.000000000 -0400
@@ -31,10 +31,10 @@ void __init init_IRQ(void)
 	/* a SMP H/w block could do IPI IRQ request here */
 	if (plat_smp_ops.init_per_cpu)
 		plat_smp_ops.init_per_cpu(smp_processor_id());
+#endif
 
 	if (machine_desc->init_per_cpu)
 		machine_desc->init_per_cpu(smp_processor_id());
-#endif
 }
 
 /*
diff -druNp --no-dereference linux-libre-4.17-gnu/arch/arc/kernel/process.c linux-libre-4.18-rc8-gnu/arch/arc/kernel/process.c
--- linux-libre-4.17-gnu/arch/arc/kernel/process.c	2018-06-03 17:15:21.000000000 -0400
+++ linux-libre-4.18-rc8-gnu/arch/arc/kernel/process.c	2018-08-05 15:37:41.000000000 -0400
@@ -47,7 +47,8 @@ SYSCALL_DEFINE0(arc_gettls)
 SYSCALL_DEFINE3(arc_usr_cmpxchg, int *, uaddr, int, expected, int, new)
 {
 	struct pt_regs *regs = current_pt_regs();
-	int uval = -EFAULT;
+	u32 uval;
+	int ret;
 
 	/*
 	 * This is only for old cores lacking LLOCK/SCOND, which by defintion
@@ -60,23 +61,47 @@ SYSCALL_DEFINE3(arc_usr_cmpxchg, int *,
 	/* Z indicates to userspace if operation succeded */
 	regs->status32 &= ~STATUS_Z_MASK;
 
-	if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int)))
-		return -EFAULT;
+	ret = access_ok(VERIFY_WRITE, uaddr, sizeof(*uaddr));
+	if (!ret)
+		 goto fail;
 
+again:
 	preempt_disable();
 
-	if (__get_user(uval, uaddr))
-		goto done;
+	ret = __get_user(uval, uaddr);
+	if (ret)
+		 goto fault;
 
-	if (uval == expected) {
-		if (!__put_user(new, uaddr))
-			regs->status32 |= STATUS_Z_MASK;
-	}
+	if (uval != expected)
+		 goto ou