Commit 83b57531 authored by Eric W. Biederman's avatar Eric W. Biederman
Browse files

mm/memory_failure: Remove unused trapno from memory_failure



Today 4 architectures set ARCH_SUPPORTS_MEMORY_FAILURE (arm64, parisc,
powerpc, and x86), while 4 other architectures set __ARCH_SI_TRAPNO
(alpha, metag, sparc, and tile).  These two sets of architectures do
not interesect so remove the trapno paramater to remove confusion.

Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
parent f71dd7dc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -325,7 +325,7 @@ static int pdt_mainloop(void *unused)
#ifdef CONFIG_MEMORY_FAILURE
			if ((pde & PDT_ADDR_PERM_ERR) ||
			    ((pde & PDT_ADDR_SINGLE_ERR) == 0))
				memory_failure(pde >> PAGE_SHIFT, 0, 0);
				memory_failure(pde >> PAGE_SHIFT, 0);
			else
				soft_offline_page(
					pfn_to_page(pde >> PAGE_SHIFT), 0);
+1 −1
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ static void handle_memory_error_event(struct OpalMemoryErrorData *merr_evt)
	}

	for (; paddr_start < paddr_end; paddr_start += PAGE_SIZE) {
		memory_failure(paddr_start >> PAGE_SHIFT, 0, 0);
		memory_failure(paddr_start >> PAGE_SHIFT, 0);
	}
}

+3 −3
Original line number Diff line number Diff line
@@ -582,7 +582,7 @@ static int srao_decode_notifier(struct notifier_block *nb, unsigned long val,

	if (mce_usable_address(mce) && (mce->severity == MCE_AO_SEVERITY)) {
		pfn = mce->addr >> PAGE_SHIFT;
		memory_failure(pfn, MCE_VECTOR, 0);
		memory_failure(pfn, 0);
	}

	return NOTIFY_OK;
@@ -1046,7 +1046,7 @@ static int do_memory_failure(struct mce *m)
	pr_err("Uncorrected hardware memory error in user-access at %llx", m->addr);
	if (!(m->mcgstatus & MCG_STATUS_RIPV))
		flags |= MF_MUST_KILL;
	ret = memory_failure(m->addr >> PAGE_SHIFT, MCE_VECTOR, flags);
	ret = memory_failure(m->addr >> PAGE_SHIFT, flags);
	if (ret)
		pr_err("Memory error not recovered");
	return ret;
@@ -1325,7 +1325,7 @@ out_ist:
EXPORT_SYMBOL_GPL(do_machine_check);

#ifndef CONFIG_MEMORY_FAILURE
int memory_failure(unsigned long pfn, int vector, int flags)
int memory_failure(unsigned long pfn, int flags)
{
	/* mce_severity() should not hand us an ACTION_REQUIRED error */
	BUG_ON(flags & MF_ACTION_REQUIRED);
+1 −1
Original line number Diff line number Diff line
@@ -410,7 +410,7 @@ static void ghes_handle_memory_failure(struct acpi_hest_generic_data *gdata, int
		flags = 0;

	if (flags != -1)
		memory_failure_queue(pfn, 0, flags);
		memory_failure_queue(pfn, flags);
#endif
}

+1 −1
Original line number Diff line number Diff line
@@ -569,7 +569,7 @@ store_hard_offline_page(struct device *dev,
	if (kstrtoull(buf, 0, &pfn) < 0)
		return -EINVAL;
	pfn >>= PAGE_SHIFT;
	ret = memory_failure(pfn, 0, 0);
	ret = memory_failure(pfn, 0);
	return ret ? ret : count;
}

Loading