Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4c9a44ae authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'akpm' (Andrew's patch-bomb)

Merge the rest of Andrew's patches for -rc1:
 "A bunch of fixes and misc missed-out-on things.

  That'll do for -rc1.  I still have a batch of IPC patches which still
  have a possible bug report which I'm chasing down."

* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (25 commits)
  keys: use keyring_alloc() to create module signing keyring
  keys: fix unreachable code
  sendfile: allows bypassing of notifier events
  SGI-XP: handle non-fatal traps
  fat: fix incorrect function comment
  Documentation: ABI: remove testing/sysfs-devices-node
  proc: fix inconsistent lock state
  linux/kernel.h: fix DIV_ROUND_CLOSEST with unsigned divisors
  memcg: don't register hotcpu notifier from ->css_alloc()
  checkpatch: warn on uapi #includes that #include <uapi/...
  revert "rtc: recycle id when unloading a rtc driver"
  mm: clean up transparent hugepage sysfs error messages
  hfsplus: add error message for the case of failure of sync fs in delayed_sync_fs() method
  hfsplus: rework processing of hfs_btree_write() returned error
  hfsplus: rework processing errors in hfsplus_free_extents()
  hfsplus: avoid crash on failed block map free
  kcmp: include linux/ptrace.h
  drivers/rtc/rtc-imxdi.c: must include <linux/spinlock.h>
  mm: cma: WARN if freed memory is still in use
  exec: do not leave bprm->interp on stack
  ...
parents 1f0377ff cfde8190
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
What:		/sys/devices/system/node/nodeX/compact
Date:		February 2010
Contact:	Mel Gorman <mel@csn.ul.ie>
Description:
		When this file is written to, all memory within that node
		will be compacted. When it completes, memory will be freed
		into blocks which have as many contiguous pages as possible
+0 −6
Original line number Diff line number Diff line
@@ -446,12 +446,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
			possible to determine what the correct size should be.
			This option provides an override for these situations.

	capability.disable=
			[SECURITY] Disable capabilities.  This would normally
			be used only if an alternative security model is to be
			configured.  Potentially dangerous and should only be
			used if you are entirely sure of the consequences.

	ccw_timeout_log [S390]
			See Documentation/s390/CommonIO for details.

+61 −17
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
 */
static char dmi_empty_string[] = "        ";

static u16 __initdata dmi_ver;
/*
 * Catch too early calls to dmi_check_system():
 */
@@ -118,12 +119,12 @@ static int __init dmi_walk_early(void (*decode)(const struct dmi_header *,
	return 0;
}

static int __init dmi_checksum(const u8 *buf)
static int __init dmi_checksum(const u8 *buf, u8 len)
{
	u8 sum = 0;
	int a;

	for (a = 0; a < 15; a++)
	for (a = 0; a < len; a++)
		sum += buf[a];

	return sum == 0;
@@ -161,8 +162,10 @@ static void __init dmi_save_uuid(const struct dmi_header *dm, int slot, int inde
		return;

	for (i = 0; i < 16 && (is_ff || is_00); i++) {
		if(d[i] != 0x00) is_ff = 0;
		if(d[i] != 0xFF) is_00 = 0;
		if (d[i] != 0x00)
			is_00 = 0;
		if (d[i] != 0xFF)
			is_ff = 0;
	}

	if (is_ff || is_00)
@@ -172,6 +175,14 @@ static void __init dmi_save_uuid(const struct dmi_header *dm, int slot, int inde
	if (!s)
		return;

	/*
	 * As of version 2.6 of the SMBIOS specification, the first 3 fields of
	 * the UUID are supposed to be little-endian encoded.  The specification
	 * says that this is the defacto standard.
	 */
	if (dmi_ver >= 0x0206)
		sprintf(s, "%pUL", d);
	else
		sprintf(s, "%pUB", d);

        dmi_ident[slot] = s;
@@ -404,29 +415,57 @@ static int __init dmi_present(const char __iomem *p)
	u8 buf[15];

	memcpy_fromio(buf, p, 15);
	if ((memcmp(buf, "_DMI_", 5) == 0) && dmi_checksum(buf)) {
	if (dmi_checksum(buf, 15)) {
		dmi_num = (buf[13] << 8) | buf[12];
		dmi_len = (buf[7] << 8) | buf[6];
		dmi_base = (buf[11] << 24) | (buf[10] << 16) |
			(buf[9] << 8) | buf[8];

		/*
		 * DMI version 0.0 means that the real version is taken from
		 * the SMBIOS version, which we don't know at this point.
		 */
		if (buf[14] != 0)
			printk(KERN_INFO "DMI %d.%d present.\n",
			       buf[14] >> 4, buf[14] & 0xF);
		else
			printk(KERN_INFO "DMI present.\n");
		if (dmi_walk_early(dmi_decode) == 0) {
			if (dmi_ver)
				pr_info("SMBIOS %d.%d present.\n",
				       dmi_ver >> 8, dmi_ver & 0xFF);
			else {
				dmi_ver = (buf[14] & 0xF0) << 4 |
					   (buf[14] & 0x0F);
				pr_info("Legacy DMI %d.%d present.\n",
				       dmi_ver >> 8, dmi_ver & 0xFF);
			}
			dmi_dump_ids();
			return 0;
		}
	}
	dmi_ver = 0;
	return 1;
}

static int __init smbios_present(const char __iomem *p)
{
	u8 buf[32];
	int offset = 0;

	memcpy_fromio(buf, p, 32);
	if ((buf[5] < 32) && dmi_checksum(buf, buf[5])) {
		dmi_ver = (buf[6] << 8) + buf[7];

		/* Some BIOS report weird SMBIOS version, fix that up */
		switch (dmi_ver) {
		case 0x021F:
		case 0x0221:
			pr_debug("SMBIOS version fixup(2.%d->2.%d)\n",
			       dmi_ver & 0xFF, 3);
			dmi_ver = 0x0203;
			break;
		case 0x0233:
			pr_debug("SMBIOS version fixup(2.%d->2.%d)\n", 51, 6);
			dmi_ver = 0x0206;
			break;
		}
		offset = 16;
	}
	return dmi_present(buf + offset);
}

void __init dmi_scan_machine(void)
{
	char __iomem *p, *q;
@@ -444,7 +483,7 @@ void __init dmi_scan_machine(void)
		if (p == NULL)
			goto error;

		rc = dmi_present(p + 0x10); /* offset of _DMI_ string */
		rc = smbios_present(p);
		dmi_iounmap(p, 32);
		if (!rc) {
			dmi_available = 1;
@@ -462,7 +501,12 @@ void __init dmi_scan_machine(void)
			goto error;

		for (q = p; q < p + 0x10000; q += 16) {
			if (memcmp(q, "_SM_", 4) == 0 && q - p <= 0xFFE0)
				rc = smbios_present(q);
			else if (memcmp(q, "_DMI_", 5) == 0)
				rc = dmi_present(q);
			else
				continue;
			if (!rc) {
				dmi_available = 1;
				dmi_iounmap(p, 0x10000);
+32 −2
Original line number Diff line number Diff line
@@ -53,6 +53,10 @@
#include <linux/kthread.h>
#include "xpc.h"

#ifdef CONFIG_X86_64
#include <asm/traps.h>
#endif

/* define two XPC debug device structures to be used with dev_dbg() et al */

struct device_driver xpc_dbg_name = {
@@ -1079,6 +1083,9 @@ xpc_system_reboot(struct notifier_block *nb, unsigned long event, void *unused)
	return NOTIFY_DONE;
}

/* Used to only allow one cpu to complete disconnect */
static unsigned int xpc_die_disconnecting;

/*
 * Notify other partitions to deactivate from us by first disengaging from all
 * references to our memory.
@@ -1092,6 +1099,9 @@ xpc_die_deactivate(void)
	long keep_waiting;
	long wait_to_print;

	if (cmpxchg(&xpc_die_disconnecting, 0, 1))
		return;

	/* keep xpc_hb_checker thread from doing anything (just in case) */
	xpc_exiting = 1;

@@ -1159,7 +1169,7 @@ xpc_die_deactivate(void)
 * about the lack of a heartbeat.
 */
static int
xpc_system_die(struct notifier_block *nb, unsigned long event, void *unused)
xpc_system_die(struct notifier_block *nb, unsigned long event, void *_die_args)
{
#ifdef CONFIG_IA64		/* !!! temporary kludge */
	switch (event) {
@@ -1191,7 +1201,27 @@ xpc_system_die(struct notifier_block *nb, unsigned long event, void *unused)
		break;
	}
#else
	struct die_args *die_args = _die_args;

	switch (event) {
	case DIE_TRAP:
		if (die_args->trapnr == X86_TRAP_DF)
			xpc_die_deactivate();

		if (((die_args->trapnr == X86_TRAP_MF) ||
		     (die_args->trapnr == X86_TRAP_XF)) &&
		    !user_mode_vm(die_args->regs))
			xpc_die_deactivate();

		break;
	case DIE_INT3:
	case DIE_DEBUG:
		break;
	case DIE_OOPS:
	case DIE_GPF:
	default:
		xpc_die_deactivate();
	}
#endif

	return NOTIFY_DONE;
+0 −1
Original line number Diff line number Diff line
@@ -244,7 +244,6 @@ void rtc_device_unregister(struct rtc_device *rtc)
		rtc_proc_del_device(rtc);
		device_unregister(&rtc->dev);
		rtc->ops = NULL;
		ida_simple_remove(&rtc_ida, rtc->id);
		mutex_unlock(&rtc->ops_lock);
		put_device(&rtc->dev);
	}
Loading