Update to 3.4-final. master
authorJeff Mahoney <jeffm@suse.com>
Mon, 21 May 2012 12:49:11 +0000 (08:49 -0400)
committerJeff Mahoney <jeffm@suse.com>
Mon, 21 May 2012 12:49:11 +0000 (08:49 -0400)
suse-commit: 91b2c6e7dedeaf80ebee53861f8eaadf972c40fe

1  2 
Makefile
arch/x86/Makefile
arch/x86/kernel/acpi/boot.c
arch/x86/kernel/cpu/mcheck/mce.c
drivers/acpi/scan.c
drivers/tty/vt/keyboard.c
include/linux/blkdev.h
include/linux/fs.h
kernel/irq/chip.c
kernel/sched/core.c

diff --combined Makefile
+++ b/Makefile
@@@ -1,7 -1,7 +1,7 @@@
  VERSION = 3
  PATCHLEVEL = 4
  SUBLEVEL = 0
- EXTRAVERSION = -rc7
+ EXTRAVERSION =
  NAME = Saber-toothed Squirrel
  
  # *DOCUMENTATION*
@@@ -65,20 -65,6 +65,20 @@@ ifndef KBUILD_CHECKSR
    KBUILD_CHECKSRC = 0
  endif
  
 +# Call message checker as part of the C compilation
 +#
 +# Use 'make D=1' to enable checking
 +# Use 'make D=2' to create the message catalog
 +
 +ifdef D
 +  ifeq ("$(origin D)", "command line")
 +    KBUILD_KMSG_CHECK = $(D)
 +  endif
 +endif
 +ifndef KBUILD_KMSG_CHECK
 +  KBUILD_KMSG_CHECK = 0
 +endif
 +
  # Use make M=dir to specify directory of external module to build
  # Old syntax make ... SUBDIRS=$PWD is still supported
  # Setting the environment variable KBUILD_EXTMOD take precedence
@@@ -361,7 -347,6 +361,7 @@@ CHECK              = spars
  
  CHECKFLAGS     := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
                  -Wbitwise -Wno-return-void $(CF)
 +KMSG_CHECK    = $(srctree)/scripts/kmsg-doc
  CFLAGS_MODULE   =
  AFLAGS_MODULE   =
  LDFLAGS_MODULE  =
@@@ -391,11 -376,6 +391,11 @@@ KBUILD_AFLAGS_MODULE  := -DMODUL
  KBUILD_CFLAGS_MODULE  := -DMODULE
  KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds
  
 +# Warn about unsupported modules in kernels built inside Autobuild
 +ifneq ($(wildcard /.buildenv),)
 +CFLAGS                += -DUNSUPPORTED_MODULES=2
 +endif
 +
  # Read KERNELRELEASE from include/config/kernel.release (if it exists)
  KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
  KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
@@@ -412,7 -392,6 +412,7 @@@ export KBUILD_AFLAGS AFLAGS_KERNEL AFLA
  export KBUILD_AFLAGS_MODULE KBUILD_CFLAGS_MODULE KBUILD_LDFLAGS_MODULE
  export KBUILD_AFLAGS_KERNEL KBUILD_CFLAGS_KERNEL
  export KBUILD_ARFLAGS
 +export KBUILD_KMSG_CHECK KMSG_CHECK
  
  # When compiling out-of-tree modules, put MODVERDIR in the module
  # tree rather than in the kernel tree. The kernel tree might
@@@ -463,7 -442,7 +463,7 @@@ asm-generic
  
  no-dot-config-targets := clean mrproper distclean \
                         cscope gtags TAGS tags help %docs check% coccicheck \
-                        include/linux/version.h headers_% archheaders \
+                        include/linux/version.h headers_% archheaders archscripts \
                         kernelversion %src-pkg
  
  config-targets := 0
@@@ -613,11 -592,6 +613,11 @@@ KBUILD_CFLAGS    += -fomit-frame-pointe
  endif
  endif
  
 +ifdef CONFIG_UNWIND_INFO
 +KBUILD_CFLAGS += -fasynchronous-unwind-tables
 +LDFLAGS_vmlinux       += --eh-frame-hdr
 +endif
 +
  ifdef CONFIG_DEBUG_INFO
  KBUILD_CFLAGS += -g
  KBUILD_AFLAGS += -gdwarf-2
@@@ -1005,7 -979,7 +1005,7 @@@ prepare1: prepare2 include/linux/versio
                     include/config/auto.conf
        $(cmd_crmodverdir)
  
- archprepare: archheaders prepare1 scripts_basic
+ archprepare: archheaders archscripts prepare1 scripts_basic
  
  prepare0: archprepare FORCE
        $(Q)$(MAKE) $(build)=.
@@@ -1053,7 -1027,7 +1053,7 @@@ depend dep
  
  # ---------------------------------------------------------------------------
  # Firmware install
 -INSTALL_FW_PATH=$(INSTALL_MOD_PATH)/lib/firmware
 +INSTALL_FW_PATH=$(INSTALL_MOD_PATH)/lib/firmware/$(KERNELRELEASE)
  export INSTALL_FW_PATH
  
  PHONY += firmware_install
@@@ -1075,8 -1049,11 +1075,11 @@@ hdr-dst = $(if $(KBUILD_HEADERS), dst=i
  PHONY += archheaders
  archheaders:
  
+ PHONY += archscripts
+ archscripts:
  PHONY += __headers
- __headers: include/linux/version.h scripts_basic asm-generic archheaders FORCE
+ __headers: include/linux/version.h scripts_basic asm-generic archheaders archscripts FORCE
        $(Q)$(MAKE) $(build)=scripts build_unifdef
  
  PHONY += headers_install_all
diff --combined arch/x86/Makefile
@@@ -126,9 -126,7 +126,9 @@@ KBUILD_CFLAGS += -pip
  # Workaround for a gcc prelease that unfortunately was shipped in a suse release
  KBUILD_CFLAGS += -Wno-sign-compare
  #
 +ifneq ($(CONFIG_UNWIND_INFO),y)
  KBUILD_CFLAGS += -fno-asynchronous-unwind-tables
 +endif
  # prevent gcc from generating any FP code by mistake
  KBUILD_CFLAGS += $(call cc-option,-mno-sse -mno-mmx -mno-sse2 -mno-3dnow,)
  KBUILD_CFLAGS += $(call cc-option,-mno-avx,)
  KBUILD_CFLAGS += $(mflags-y)
  KBUILD_AFLAGS += $(mflags-y)
  
+ archscripts:
+       $(Q)$(MAKE) $(build)=arch/x86/tools relocs
  ###
  # Syscall table generation
  
@@@ -174,28 -175,9 +177,28 @@@ boot := arch/x86/boo
  
  BOOT_TARGETS = bzlilo bzdisk fdimage fdimage144 fdimage288 isoimage
  
 -PHONY += bzImage $(BOOT_TARGETS)
 +PHONY += bzImage vmlinuz $(BOOT_TARGETS)
 +
 +ifdef CONFIG_XEN
 +LINUXINCLUDE := -D__XEN_INTERFACE_VERSION__=$(CONFIG_XEN_INTERFACE_VERSION) \
 +      -I$(srctree)/arch/x86/include/mach-xen $(LINUXINCLUDE)
 +
 +ifdef CONFIG_X86_64
 +LDFLAGS_vmlinux := -e startup_64
 +endif
  
  # Default kernel to build
 +all: vmlinuz
 +
 +# KBUILD_IMAGE specifies the target image being built
 +KBUILD_IMAGE := $(boot)/vmlinuz
 +
 +vmlinuz: vmlinux
 +      $(Q)$(MAKE) $(build)=$(boot) $(KBUILD_IMAGE)
 +      $(Q)mkdir -p $(objtree)/arch/$(UTS_MACHINE)/boot
 +      $(Q)ln -fsn ../../x86/boot/$@ $(objtree)/arch/$(UTS_MACHINE)/boot/$@
 +else
 +# Default kernel to build
  all: bzImage
  
  # KBUILD_IMAGE specify target image being built
@@@ -208,7 -190,6 +211,7 @@@ endi
        $(Q)$(MAKE) $(build)=$(boot) $(KBUILD_IMAGE)
        $(Q)mkdir -p $(objtree)/arch/$(UTS_MACHINE)/boot
        $(Q)ln -fsn ../../x86/boot/bzImage $(objtree)/arch/$(UTS_MACHINE)/boot/$@
 +endif
  
  $(BOOT_TARGETS): vmlinux
        $(Q)$(MAKE) $(build)=$(boot) $@
@@@ -70,7 -70,6 +70,7 @@@ int acpi_strict
  
  u8 acpi_sci_flags __initdata;
  int acpi_sci_override_gsi __initdata;
 +#ifndef CONFIG_XEN
  int acpi_skip_timer_override __initdata;
  int acpi_use_timer_override __initdata;
  int acpi_fix_pin2_polarity __initdata;
  #ifdef CONFIG_X86_LOCAL_APIC
  static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE;
  #endif
 +#else
 +#define acpi_skip_timer_override 0
 +#define acpi_fix_pin2_polarity 0
 +#endif
  
  #ifndef __HAVE_ARCH_CMPXCHG
  #warning ACPI uses CMPXCHG, i486 and later hardware
@@@ -187,7 -182,6 +187,7 @@@ static int __init acpi_parse_madt(struc
                return -ENODEV;
        }
  
 +#ifndef CONFIG_XEN
        if (madt->address) {
                acpi_lapic_addr = (u64) madt->address;
  
  
        default_acpi_madt_oem_check(madt->header.oem_id,
                                    madt->header.oem_table_id);
 +#endif
  
        return 0;
  }
  
  static void __cpuinit acpi_register_lapic(int id, u8 enabled)
  {
 +#ifndef CONFIG_XEN
        unsigned int ver = 0;
  
        if (id >= (MAX_LOCAL_APIC-1)) {
                ver = apic_version[boot_cpu_physical_apicid];
  
        generic_processor_info(id, ver);
 +#endif
  }
  
  static int __init
@@@ -252,7 -243,7 +252,7 @@@ acpi_parse_x2apic(struct acpi_subtable_
                printk(KERN_WARNING PREFIX "x2apic entry ignored\n");
        else
                acpi_register_lapic(apic_id, enabled);
 -#else
 +#elif !defined(CONFIG_XEN)
        printk(KERN_WARNING PREFIX "x2apic entry ignored\n");
  #endif
  
@@@ -306,7 -297,6 +306,7 @@@ static int __ini
  acpi_parse_lapic_addr_ovr(struct acpi_subtable_header * header,
                          const unsigned long end)
  {
 +#ifndef CONFIG_XEN
        struct acpi_madt_local_apic_override *lapic_addr_ovr = NULL;
  
        lapic_addr_ovr = (struct acpi_madt_local_apic_override *)header;
                return -EINVAL;
  
        acpi_lapic_addr = lapic_addr_ovr->address;
 +#endif
  
        return 0;
  }
@@@ -604,8 -593,7 +604,8 @@@ void __init acpi_set_irq_model_ioapic(v
  #ifdef CONFIG_ACPI_HOTPLUG_CPU
  #include <acpi/processor.h>
  
 +#ifndef CONFIG_XEN
- static void __cpuinitdata acpi_map_cpu2node(acpi_handle handle, int cpu, int physid)
+ static void __cpuinit acpi_map_cpu2node(acpi_handle handle, int cpu, int physid)
  {
  #ifdef CONFIG_ACPI_NUMA
        int nid;
@@@ -691,9 -679,6 +691,9 @@@ free_tmp_map
  out:
        return retval;
  }
 +#else
 +#define _acpi_map_lsapic(h, p) (-EINVAL)
 +#endif
  
  /* wrapper to silence section mismatch warning */
  int __ref acpi_map_lsapic(acpi_handle handle, int *pcpu)
@@@ -704,11 -689,9 +704,11 @@@ EXPORT_SYMBOL(acpi_map_lsapic)
  
  int acpi_unmap_lsapic(int cpu)
  {
 +#ifndef CONFIG_XEN
        per_cpu(x86_cpu_to_apicid, cpu) = -1;
        set_cpu_present(cpu, false);
        num_processors--;
 +#endif
  
        return (0);
  }
@@@ -1350,7 -1333,6 +1350,7 @@@ static int __init dmi_disable_acpi(cons
        return 0;
  }
  
 +#ifndef CONFIG_XEN
  /*
   * Force ignoring BIOS IRQ0 pin2 override
   */
@@@ -1368,22 -1350,6 +1368,22 @@@ static int __init dmi_ignore_irq0_timer
        }
        return 0;
  }
 +#endif
 +
 +static int __init force_acpi_rsdt(const struct dmi_system_id *d)
 +{
 +      if (!acpi_force) {
 +              printk(KERN_NOTICE "%s detected: force use of acpi=rsdt\n",
 +                     d->ident);
 +              acpi_rsdt_forced = 1;
 +      } else {
 +              printk(KERN_NOTICE
 +                     "Warning: acpi=force overrules DMI blacklist: "
 +                     "acpi=rsdt\n");
 +      }
 +      return 0;
 +
 +}
  
  /*
   * If your system is blacklisted here, but you find that acpi=force
@@@ -1460,36 -1426,9 +1460,36 @@@ static struct dmi_system_id __initdata 
                     DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 360"),
                     },
         },
 +
 +      /*
 +       * Boxes that need RSDT as ACPI root table
 +       */
 +      {
 +          .callback = force_acpi_rsdt,
 +          .ident = "ThinkPad ", /* R40e, broken C-states */
 +          .matches = {
 +              DMI_MATCH(DMI_BIOS_VENDOR, "IBM"),
 +              DMI_MATCH(DMI_BIOS_VERSION, "1SET")},
 +      },
 +      {
 +          .callback = force_acpi_rsdt,
 +          .ident = "ThinkPad ", /* R50e, slow booting */
 +          .matches = {
 +              DMI_MATCH(DMI_BIOS_VENDOR, "IBM"),
 +              DMI_MATCH(DMI_BIOS_VERSION, "1WET")},
 +      },
 +      {
 +          .callback = force_acpi_rsdt,
 +          .ident = "ThinkPad ", /* T40, T40p, T41, T41p, T42, T42p
 +                                   R50, R50p */
 +          .matches = {
 +              DMI_MATCH(DMI_BIOS_VENDOR, "IBM"),
 +              DMI_MATCH(DMI_BIOS_VERSION, "1RET")},
 +      },
        {}
  };
  
 +#ifndef CONFIG_XEN
  /* second table for DMI checks that should run after early-quirks */
  static struct dmi_system_id __initdata acpi_dmi_table_late[] = {
        /*
         },
        {}
  };
 +#endif
  
  /*
   * acpi_boot_table_init() and acpi_boot_init()
@@@ -1609,10 -1547,8 +1609,10 @@@ int __init early_acpi_boot_init(void
  
  int __init acpi_boot_init(void)
  {
 +#ifndef CONFIG_XEN
        /* those are executed after early-quirks are executed */
        dmi_check_system(acpi_dmi_table_late);
 +#endif
  
        /*
         * If acpi_disabled, bail out
@@@ -1677,18 -1613,6 +1677,18 @@@ static int __init parse_acpi(char *arg
  }
  early_param("acpi", parse_acpi);
  
 +/* Alias for acpi=rsdt for compatibility with openSUSE 11.1 and SLE11 */
 +static int __init parse_acpi_root_table(char *opt)
 +{
 +      if (!strcmp(opt, "rsdt")) {
 +              acpi_rsdt_forced = 1;
 +              printk(KERN_WARNING "acpi_root_table=rsdt is deprecated. "
 +                     "Please use acpi=rsdt instead.\n");
 +      }
 +      return 0;
 +}
 +early_param("acpi_root_table", parse_acpi_root_table);
 +
  /* FIXME: Using pci= for an ACPI parameter is a travesty. */
  static int __init parse_pci(char *arg)
  {
@@@ -1712,7 -1636,7 +1712,7 @@@ int __init acpi_mps_check(void
        return 0;
  }
  
 -#ifdef CONFIG_X86_IO_APIC
 +#if defined(CONFIG_X86_IO_APIC) && !defined(CONFIG_XEN)
  static int __init parse_acpi_skip_timer_override(char *arg)
  {
        acpi_skip_timer_override = 1;
@@@ -118,10 -118,8 +118,10 @@@ void mce_setup(struct mce *m
        m->time = get_seconds();
        m->cpuvendor = boot_cpu_data.x86_vendor;
        m->cpuid = cpuid_eax(1);
 +#ifndef CONFIG_XEN
        m->socketid = cpu_data(m->extcpu).phys_proc_id;
        m->apicid = cpu_data(m->extcpu).initial_apicid;
 +#endif
        rdmsrl(MSR_IA32_MCG_CAP, m->mcgcap);
  }
  
@@@ -268,14 -266,9 +268,14 @@@ static void print_mce(struct mce *m
         * Note this output is parsed by external tools and old fields
         * should not be changed.
         */
 +#ifndef CONFIG_XEN
        pr_emerg(HW_ERR "PROCESSOR %u:%x TIME %llu SOCKET %u APIC %x microcode %x\n",
                m->cpuvendor, m->cpuid, m->time, m->socketid, m->apicid,
                cpu_data(m->extcpu).microcode);
 +#else
 +      pr_emerg(HW_ERR "PROCESSOR %u:%x TIME %llu SOCKET %u APIC %x\n",
 +              m->cpuvendor, m->cpuid, m->time, m->socketid, m->apicid);
 +#endif
  
        /*
         * Print out human-readable details about the MCE error,
@@@ -952,9 -945,10 +952,10 @@@ struct mce_info 
        atomic_t                inuse;
        struct task_struct      *t;
        __u64                   paddr;
+       int                     restartable;
  } mce_info[MCE_INFO_MAX];
  
- static void mce_save_info(__u64 addr)
+ static void mce_save_info(__u64 addr, int c)
  {
        struct mce_info *mi;
  
                if (atomic_cmpxchg(&mi->inuse, 0, 1) == 0) {
                        mi->t = current;
                        mi->paddr = addr;
+                       mi->restartable = c;
                        return;
                }
        }
@@@ -1137,7 -1132,7 +1139,7 @@@ void do_machine_check(struct pt_regs *r
                        mce_panic("Fatal machine check on current CPU", &m, msg);
                if (worst == MCE_AR_SEVERITY) {
                        /* schedule action before return to userland */
-                       mce_save_info(m.addr);
+                       mce_save_info(m.addr, m.mcgstatus & MCG_STATUS_RIPV);
                        set_thread_flag(TIF_MCE_NOTIFY);
                } else if (kill_it) {
                        force_sig(SIGBUS, current);
@@@ -1186,7 -1181,13 +1188,13 @@@ void mce_notify_process(void
  
        pr_err("Uncorrected hardware memory error in user-access at %llx",
                 mi->paddr);
-       if (memory_failure(pfn, MCE_VECTOR, MF_ACTION_REQUIRED) < 0) {
+       /*
+        * We must call memory_failure() here even if the current process is
+        * doomed. We still need to mark the page as poisoned and alert any
+        * other users of the page.
+        */
+       if (memory_failure(pfn, MCE_VECTOR, MF_ACTION_REQUIRED) < 0 ||
+                          mi->restartable == 0) {
                pr_err("Memory error not recovered");
                force_sig(SIGBUS, current);
        }
@@@ -1235,15 -1236,8 +1243,15 @@@ void mce_log_therm_throt_event(__u64 st
   * Periodic polling timer for "silent" machine check errors.  If the
   * poller finds an MCE, poll 2x faster.  When the poller finds no more
   * errors, poll 2x slower (up to check_interval seconds).
 + *
 + * We will disable polling in DOM0 since all CMCI/Polling
 + * mechanism will be done in XEN for Intel CPUs
   */
 +#if defined (CONFIG_X86_XEN_MCE)
 +static int check_interval = 0; /* disable polling */
 +#else
  static int check_interval = 5 * 60; /* 5 minutes */
 +#endif
  
  static DEFINE_PER_CPU(int, mce_next_interval); /* in jiffies */
  static DEFINE_PER_CPU(struct timer_list, mce_timer);
@@@ -1416,7 -1410,6 +1424,7 @@@ static int __cpuinit __mcheck_cpu_apply
  
        /* This should be disabled by the BIOS, but isn't always */
        if (c->x86_vendor == X86_VENDOR_AMD) {
 +#ifndef CONFIG_XEN
                if (c->x86 == 15 && banks > 4) {
                        /*
                         * disable GART TBL walk error reporting, which
                         */
                        clear_bit(10, (unsigned long *)&mce_banks[4].ctl);
                }
 +#endif
                if (c->x86 <= 17 && mce_bootlog < 0) {
                        /*
                         * Lots of broken BIOS around that don't clear them
@@@ -1498,7 -1490,6 +1506,7 @@@ static int __cpuinit __mcheck_cpu_ancie
  
  static void __mcheck_cpu_init_vendor(struct cpuinfo_x86 *c)
  {
 +#ifndef CONFIG_X86_64_XEN
        switch (c->x86_vendor) {
        case X86_VENDOR_INTEL:
                mce_intel_feature_init(c);
        default:
                break;
        }
 +#endif
  }
  
  static void __mcheck_cpu_init_timer(void)
@@@ -2298,16 -2288,6 +2306,16 @@@ static __init int mcheck_init_device(vo
        /* register character device /dev/mcelog */
        misc_register(&mce_chrdev_device);
  
 +#ifdef CONFIG_X86_XEN_MCE
 +      if (is_initial_xendomain()) {
 +              /* Register vIRQ handler for MCE LOG processing */
 +              extern int bind_virq_for_mce(void);
 +
 +              printk(KERN_DEBUG "MCE: bind virq for DOM0 logging\n");
 +              bind_virq_for_mce();
 +      }
 +#endif
 +
        return err;
  }
  device_initcall(mcheck_init_device);
diff --combined drivers/acpi/scan.c
@@@ -175,16 -175,6 +175,16 @@@ acpi_device_hid_show(struct device *dev
  }
  static DEVICE_ATTR(hid, 0444, acpi_device_hid_show, NULL);
  
 +#ifdef CONFIG_PCI_GUESTDEV
 +static ssize_t
 +acpi_device_uid_show(struct device *dev, struct device_attribute *attr, char *buf) {
 +      struct acpi_device *acpi_dev = to_acpi_device(dev);
 +
 +      return sprintf(buf, "%s\n", acpi_dev->pnp.unique_id);
 +}
 +static DEVICE_ATTR(uid, 0444, acpi_device_uid_show, NULL);
 +#endif
 +
  static ssize_t
  acpi_device_path_show(struct device *dev, struct device_attribute *attr, char *buf) {
        struct acpi_device *acpi_dev = to_acpi_device(dev);
@@@ -227,13 -217,6 +227,13 @@@ static int acpi_device_setup_files(stru
                        goto end;
        }
  
 +#ifdef CONFIG_PCI_GUESTDEV
 +      if(dev->pnp.unique_id) {
 +              result = device_create_file(&dev->dev, &dev_attr_uid);
 +              if(result)
 +                      goto end;
 +      }
 +#endif
          /*
           * If device has _EJ0, 'eject' file is created that is used to trigger
           * hot-removal function from userland.
@@@ -297,9 -280,6 +297,9 @@@ static void acpi_free_ids(struct acpi_d
                kfree(id->id);
                kfree(id);
        }
 +#ifdef CONFIG_PCI_GUESTDEV
 +      kfree(device->pnp.unique_id);
 +#endif
  }
  
  static void acpi_device_release(struct device *dev)
@@@ -928,6 -908,10 +928,10 @@@ static int acpi_bus_get_power_flags(str
        device->power.states[ACPI_STATE_D3].flags.valid = 1;
        device->power.states[ACPI_STATE_D3].power = 0;
  
+       /* Set D3cold's explicit_set flag if _PS3 exists. */
+       if (device->power.states[ACPI_STATE_D3_HOT].flags.explicit_set)
+               device->power.states[ACPI_STATE_D3_COLD].flags.explicit_set = 1;
        acpi_bus_init_power(device);
  
        return 0;
@@@ -1154,11 -1138,6 +1158,11 @@@ static void acpi_device_set_id(struct a
                        for (i = 0; i < cid_list->count; i++)
                                acpi_add_id(device, cid_list->ids[i].string);
                }
 +#ifdef CONFIG_PCI_GUESTDEV
 +              if (info->valid & ACPI_VALID_UID)
 +                      device->pnp.unique_id = kstrdup(info->unique_id.string,
 +                                                      GFP_KERNEL);
 +#endif
                if (info->valid & ACPI_VALID_ADR) {
                        device->pnp.bus_address = info->address;
                        device->flags.bus_address = 1;
@@@ -45,8 -45,6 +45,8 @@@
  
  #include <asm/irq_regs.h>
  
 +#include <linux/bootsplash.h>
 +
  extern void ctrl_alt_del(void);
  
  /*
@@@ -1294,13 -1292,6 +1294,13 @@@ static void kbd_keycode(unsigned int ke
                                pr_warning("can't emulate rawmode for keycode %d\n",
                                           keycode);
  
 +      /* This code has to be redone for some non-x86 platforms */
 +      if (down == 1 && (keycode == 0x3c || keycode == 0x01)) {
 +              /* F2 and ESC on PC keyboard */
 +              if (splash_verbose())
 +                      return;
 +      }
 +
  #ifdef CONFIG_SPARC
        if (keycode == KEY_A && sparc_l1_a_state) {
                sparc_l1_a_state = false;
@@@ -2053,7 -2044,7 +2053,7 @@@ int vt_do_kdskled(int console, int cmd
                kbd->default_ledflagstate = ((arg >> 4) & 7);
                set_leds();
                  spin_unlock_irqrestore(&kbd_event_lock, flags);
-               break;
+               return 0;
  
        /* the ioctls below only set the lights, not the functions */
        /* for those, see KDGKBLED and KDSKBLED above */
diff --combined include/linux/blkdev.h
@@@ -1,9 -1,10 +1,10 @@@
  #ifndef _LINUX_BLKDEV_H
  #define _LINUX_BLKDEV_H
  
+ #include <linux/sched.h>
  #ifdef CONFIG_BLOCK
  
- #include <linux/sched.h>
  #include <linux/major.h>
  #include <linux/genhd.h>
  #include <linux/list.h>
@@@ -975,11 -976,7 +976,11 @@@ extern int blk_verify_command(unsigned 
  enum blk_default_limits {
        BLK_MAX_SEGMENTS        = 128,
        BLK_SAFE_MAX_SECTORS    = 255,
 +#ifndef CONFIG_KERNEL_DESKTOP
 +      BLK_DEF_MAX_SECTORS     = 2048,
 +#else
        BLK_DEF_MAX_SECTORS     = 1024,
 +#endif
        BLK_MAX_SEGMENT_SIZE    = 65536,
        BLK_SEG_BOUNDARY_MASK   = 0xFFFFFFFFUL,
  };
diff --combined include/linux/fs.h
@@@ -205,7 -205,7 +205,7 @@@ struct inodes_stat_t 
  #define MS_VERBOSE    32768   /* War is peace. Verbosity is silence.
                                   MS_VERBOSE is deprecated. */
  #define MS_SILENT     32768
 -#define MS_POSIXACL   (1<<16) /* VFS does not apply the umask */
 +#define MS_POSIXACL   (1<<16) /* Supports POSIX ACLs */
  #define MS_UNBINDABLE (1<<17) /* change to unbindable */
  #define MS_PRIVATE    (1<<18) /* change to private */
  #define MS_SLAVE      (1<<19) /* change to slave */
  #define MS_KERNMOUNT  (1<<22) /* this is a kern_mount call */
  #define MS_I_VERSION  (1<<23) /* Update inode I_version field */
  #define MS_STRICTATIME        (1<<24) /* Always perform atime updates */
 +#define MS_RICHACL    (1<<25) /* Supports richacls */
  #define MS_NOSEC      (1<<28)
  #define MS_BORN               (1<<29)
  #define MS_ACTIVE     (1<<30)
  #define IS_APPEND(inode)      ((inode)->i_flags & S_APPEND)
  #define IS_IMMUTABLE(inode)   ((inode)->i_flags & S_IMMUTABLE)
  #define IS_POSIXACL(inode)    __IS_FLG(inode, MS_POSIXACL)
 +#define IS_RICHACL(inode)     __IS_FLG(inode, MS_RICHACL)
  
  #define IS_DEADDIR(inode)     ((inode)->i_flags & S_DEAD)
  #define IS_NOCMTIME(inode)    ((inode)->i_flags & S_NOCMTIME)
  #define IS_AUTOMOUNT(inode)   ((inode)->i_flags & S_AUTOMOUNT)
  #define IS_NOSEC(inode)               ((inode)->i_flags & S_NOSEC)
  
 +/*
 + * IS_ACL() tells the VFS to not apply the umask
 + * and use iop->check_acl for acl permission checks when defined.
 + */
 +#define IS_ACL(inode)         __IS_FLG(inode, MS_POSIXACL | MS_RICHACL)
 +
  /* the read-only stuff doesn't really belong here, but any other place is
     probably as bad and I don't want to create yet another include file. */
  
@@@ -1672,10 -1664,6 +1672,10 @@@ struct inode_operations 
        void (*truncate_range)(struct inode *, loff_t, loff_t);
        int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start,
                      u64 len);
 +      int (*may_create) (struct inode *, int);
 +      int (*may_delete) (struct inode *, struct inode *, int);
 +
 +
  } ____cacheline_aligned;
  
  struct seq_file;
@@@ -2063,6 -2051,7 +2063,7 @@@ extern void unregister_blkdev(unsigned 
  extern struct block_device *bdget(dev_t);
  extern struct block_device *bdgrab(struct block_device *bdev);
  extern void bd_set_size(struct block_device *, loff_t size);
+ extern sector_t blkdev_max_block(struct block_device *bdev);
  extern void bd_forget(struct inode *inode);
  extern void bdput(struct block_device *);
  extern void invalidate_bdev(struct block_device *);
diff --combined kernel/irq/chip.c
@@@ -89,7 -89,6 +89,7 @@@ int irq_set_handler_data(unsigned int i
  }
  EXPORT_SYMBOL(irq_set_handler_data);
  
 +#ifndef CONFIG_XEN
  /**
   *    irq_set_msi_desc - set MSI descriptor data for an irq
   *    @irq:   Interrupt number
@@@ -110,7 -109,6 +110,7 @@@ int irq_set_msi_desc(unsigned int irq, 
        irq_put_desc_unlock(desc, flags);
        return 0;
  }
 +#endif
  
  /**
   *    irq_set_chip_data - set irq chip data for an irq
@@@ -520,6 -518,7 +520,7 @@@ handle_edge_irq(unsigned int irq, struc
  out_unlock:
        raw_spin_unlock(&desc->lock);
  }
+ EXPORT_SYMBOL(handle_edge_irq);
  
  #ifdef CONFIG_IRQ_EDGE_EOI_HANDLER
  /**
diff --combined kernel/sched/core.c
@@@ -2656,48 -2656,6 +2656,48 @@@ static inline void task_group_account_f
  }
  
  
 +#if !defined(CONFIG_XEN) || defined(CONFIG_VIRT_CPU_ACCOUNTING)
 +# define cputime_to_u64(t) ((__force u64)(t))
 +#else
 +# include <linux/syscore_ops.h>
 +# define NS_PER_TICK (1000000000 / HZ)
 +
 +static DEFINE_PER_CPU(u64, steal_snapshot);
 +static DEFINE_PER_CPU(unsigned int, steal_residual);
 +
 +static u64 cputime_to_u64(cputime_t t)
 +{
 +      u64 s = this_vcpu_read(runstate.time[RUNSTATE_runnable]);
 +      unsigned long adj = div_u64_rem(s - __this_cpu_read(steal_snapshot)
 +                                        + __this_cpu_read(steal_residual),
 +                                      NS_PER_TICK,
 +                                      &__get_cpu_var(steal_residual));
 +
 +      __this_cpu_write(steal_snapshot, s);
 +      if (t < jiffies_to_cputime(adj))
 +              return 0;
 +
 +      return (__force u64)(t - jiffies_to_cputime(adj));
 +}
 +
 +static void steal_resume(void)
 +{
 +      cputime_to_u64(((cputime_t)1 << (BITS_PER_LONG * sizeof(cputime_t)
 +                                       / sizeof(long) - 1)) - 1);
 +}
 +
 +static struct syscore_ops steal_syscore_ops = {
 +      .resume = steal_resume,
 +};
 +
 +static int __init steal_register(void)
 +{
 +      register_syscore_ops(&steal_syscore_ops);
 +      return 0;
 +}
 +core_initcall(steal_register);
 +#endif
 +
  /*
   * Account user cpu time to a process.
   * @p: the process that the cpu time gets accounted to
@@@ -2717,7 -2675,7 +2717,7 @@@ void account_user_time(struct task_stru
        index = (TASK_NICE(p) > 0) ? CPUTIME_NICE : CPUTIME_USER;
  
        /* Add user time to cpustat. */
 -      task_group_account_field(p, index, (__force u64) cputime);
 +      task_group_account_field(p, index, cputime_to_u64(cputime));
  
        /* Account for user time used */
        acct_update_integrals(p);
@@@ -2767,7 -2725,7 +2767,7 @@@ void __account_system_time(struct task_
        account_group_system_time(p, cputime);
  
        /* Add system time to cpustat. */
 -      task_group_account_field(p, index, (__force u64) cputime);
 +      task_group_account_field(p, index, cputime_to_u64(cputime));
  
        /* Account for system time used */
        acct_update_integrals(p);
@@@ -2821,9 -2779,9 +2821,9 @@@ void account_idle_time(cputime_t cputim
        struct rq *rq = this_rq();
  
        if (atomic_read(&rq->nr_iowait) > 0)
 -              cpustat[CPUTIME_IOWAIT] += (__force u64) cputime;
 +              cpustat[CPUTIME_IOWAIT] += cputime_to_u64(cputime);
        else
 -              cpustat[CPUTIME_IDLE] += (__force u64) cputime;
 +              cpustat[CPUTIME_IDLE] += cputime_to_u64(cputime);
  }
  
  static __always_inline bool steal_account_process_tick(void)
@@@ -2879,9 -2837,9 +2879,9 @@@ static void irqtime_account_process_tic
                return;
  
        if (irqtime_account_hi_update()) {
 -              cpustat[CPUTIME_IRQ] += (__force u64) cputime_one_jiffy;
 +              cpustat[CPUTIME_IRQ] += cputime_to_u64(cputime_one_jiffy);
        } else if (irqtime_account_si_update()) {
 -              cpustat[CPUTIME_SOFTIRQ] += (__force u64) cputime_one_jiffy;
 +              cpustat[CPUTIME_SOFTIRQ] += cputime_to_u64(cputime_one_jiffy);
        } else if (this_cpu_ksoftirqd() == p) {
                /*
                 * ksoftirqd time do not get accounted in cpu_softirq_time.
@@@ -3327,11 -3285,6 +3327,11 @@@ void __sched schedule_preempt_disabled(
  }
  
  #ifdef CONFIG_MUTEX_SPIN_ON_OWNER
 +#include <asm/mutex.h>
 +
 +#ifndef arch_cpu_is_running
 +#define arch_cpu_is_running(cpu) true
 +#endif
  
  static inline bool owner_running(struct mutex *lock, struct task_struct *owner)
  {
         */
        barrier();
  
 -      return owner->on_cpu;
 +      return owner->on_cpu
 +             && arch_cpu_is_running(task_thread_info(owner)->cpu);
  }
  
  /*
@@@ -6430,6 -6382,8 +6430,8 @@@ static int __sdt_alloc(const struct cpu
                        if (!sg)
                                return -ENOMEM;
  
+                       sg->next = sg;
                        *per_cpu_ptr(sdd->sg, j) = sg;
  
                        sgp = kzalloc_node(sizeof(struct sched_group_power),