--- /dev/null
+From 94c163663fc1dcfc067a5fb3cc1446b9469975ce Mon Sep 17 00:00:00 2001
+From: Heiko Carstens <heiko.carstens@de.ibm.com>
+Date: Thu, 25 Apr 2013 10:03:15 +0200
+Subject: s390/memory hotplug: prevent offline of active memory increments
+
+From: Heiko Carstens <heiko.carstens@de.ibm.com>
+
+commit 94c163663fc1dcfc067a5fb3cc1446b9469975ce upstream.
+
+In case a machine supports memory hotplug all active memory increments
+present at IPL time have been initialized with a "usecount" of 1.
+This is wrong if the memory increment size is larger than the memory
+section size of the memory hotplug code. If that is the case the
+usecount must be initialized with the number of memory sections that
+fit into one memory increment.
+Otherwise it is possible to put a memory increment into standby state
+even if there are still active sections.
+Afterwards addressing exceptions might happen which cause the kernel
+to panic.
+However even worse, if a memory increment was put into standby state
+and afterwards into active state again, it's contents would have been
+zeroed, leading to memory corruption.
+
+This was only an issue for machines that support standby memory and
+have at least 256GB memory.
+
+This is broken since commit fdb1bb15 "[S390] sclp/memory hotplug: fix
+initial usecount of increments".
+
+Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
+Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
+Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/s390/char/sclp_cmd.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/s390/char/sclp_cmd.c
++++ b/drivers/s390/char/sclp_cmd.c
+@@ -507,6 +507,8 @@ static void __init sclp_add_standby_memo
+ add_memory_merged(0);
+ }
+
++#define MEM_SCT_SIZE (1UL << SECTION_SIZE_BITS)
++
+ static void __init insert_increment(u16 rn, int standby, int assigned)
+ {
+ struct memory_increment *incr, *new_incr;
+@@ -519,7 +521,7 @@ static void __init insert_increment(u16
+ new_incr->rn = rn;
+ new_incr->standby = standby;
+ if (!standby)
+- new_incr->usecount = 1;
++ new_incr->usecount = rzm > MEM_SCT_SIZE ? rzm/MEM_SCT_SIZE : 1;
+ last_rn = 0;
+ prev = &sclp_mem_list;
+ list_for_each_entry(incr, &sclp_mem_list, list) {
--- /dev/null
+From 5a65dcc04cda41f4122aacc37a5a348454645399 Mon Sep 17 00:00:00 2001
+From: Federico Vaga <federico.vaga@gmail.com>
+Date: Mon, 15 Apr 2013 16:01:07 +0200
+Subject: serial_core.c: add put_device() after device_find_child()
+
+From: Federico Vaga <federico.vaga@gmail.com>
+
+commit 5a65dcc04cda41f4122aacc37a5a348454645399 upstream.
+
+The serial core uses device_find_child() but does not drop the reference to
+the retrieved child after using it. This patch add the missing put_device().
+
+What I have done to test this issue.
+
+I used a machine with an AMBA PL011 serial driver. I tested the patch on
+next-20120408 because the last branch [next-20120415] does not boot on this
+board.
+
+For test purpose, I added some pr_info() messages to print the refcount
+after device_find_child() (lines: 1937,2009), and after put_device()
+(lines: 1947, 2021).
+
+Boot the machine *without* put_device(). Then:
+
+echo reboot > /sys/power/disk
+echo disk > /sys/power/state
+[ 87.058575] uart_suspend_port:1937 refcount 4
+[ 87.058582] uart_suspend_port:1947 refcount 4
+[ 87.098083] uart_resume_port:2009refcount 5
+[ 87.098088] uart_resume_port:2021 refcount 5
+
+echo disk > /sys/power/state
+[ 103.055574] uart_suspend_port:1937 refcount 6
+[ 103.055580] uart_suspend_port:1947 refcount 6
+[ 103.095322] uart_resume_port:2009 refcount 7
+[ 103.095327] uart_resume_port:2021 refcount 7
+
+echo disk > /sys/power/state
+[ 252.459580] uart_suspend_port:1937 refcount 8
+[ 252.459586] uart_suspend_port:1947 refcount 8
+[ 252.499611] uart_resume_port:2009 refcount 9
+[ 252.499616] uart_resume_port:2021 refcount 9
+
+The refcount continuously increased.
+
+Boot the machine *with* this patch. Then:
+
+echo reboot > /sys/power/disk
+echo disk > /sys/power/state
+[ 159.333559] uart_suspend_port:1937 refcount 4
+[ 159.333566] uart_suspend_port:1947 refcount 3
+[ 159.372751] uart_resume_port:2009 refcount 4
+[ 159.372755] uart_resume_port:2021 refcount 3
+
+echo disk > /sys/power/state
+[ 185.713614] uart_suspend_port:1937 refcount 4
+[ 185.713621] uart_suspend_port:1947 refcount 3
+[ 185.752935] uart_resume_port:2009 refcount 4
+[ 185.752940] uart_resume_port:2021 refcount 3
+
+echo disk > /sys/power/state
+[ 207.458584] uart_suspend_port:1937 refcount 4
+[ 207.458591] uart_suspend_port:1947 refcount 3
+[ 207.498598] uart_resume_port:2009 refcount 4
+[ 207.498605] uart_resume_port:2021 refcount 3
+
+The refcount correctly handled.
+
+Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/tty/serial/serial_core.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/tty/serial/serial_core.c
++++ b/drivers/tty/serial/serial_core.c
+@@ -1917,6 +1917,8 @@ int uart_suspend_port(struct uart_driver
+ mutex_unlock(&port->mutex);
+ return 0;
+ }
++ put_device(tty_dev);
++
+ if (console_suspend_enabled || !uart_console(uport))
+ uport->suspended = 1;
+
+@@ -1982,9 +1984,11 @@ int uart_resume_port(struct uart_driver
+ disable_irq_wake(uport->irq);
+ uport->irq_wake = 0;
+ }
++ put_device(tty_dev);
+ mutex_unlock(&port->mutex);
+ return 0;
+ }
++ put_device(tty_dev);
+ uport->suspended = 0;
+
+ /*
powerpc-spufs-initialise-inode-i_ino-in-spufs_new_inode.patch
usb-serial-option-added-support-olivetti-olicard-145.patch
usb-option-add-a-d-link-dwm-156-variant.patch
+usb-misc-appledisplay-add-24-led-cinema-display.patch
+usb-add-ftdi_sio-usb-id-for-gdm-boost-v1.x.patch
+usb-ftdi_sio-correct-st-micro-connect-lite-pids.patch
+usbfs-always-allow-ctrl-requests-with-usb_recip_endpoint-on-the-ctrl-ep.patch
+usb-storage-cy7c68300a-chips-do-not-support-cypress-atacb.patch
+s390-memory-hotplug-prevent-offline-of-active-memory-increments.patch
+xen-time-fix-kasprintf-splat-when-allocating-timer-d-irq-line.patch
+serial_core.c-add-put_device-after-device_find_child.patch
+tty-fix-up-atime-mtime-mess-take-three.patch
--- /dev/null
+From b0b885657b6c8ef63a46bc9299b2a7715d19acde Mon Sep 17 00:00:00 2001
+From: Linus Torvalds <torvalds@linux-foundation.org>
+Date: Wed, 1 May 2013 07:32:21 -0700
+Subject: tty: fix up atime/mtime mess, take three
+
+From: Linus Torvalds <torvalds@linux-foundation.org>
+
+commit b0b885657b6c8ef63a46bc9299b2a7715d19acde upstream.
+
+We first tried to avoid updating atime/mtime entirely (commit
+b0de59b5733d: "TTY: do not update atime/mtime on read/write"), and then
+limited it to only update it occasionally (commit 37b7f3c76595: "TTY:
+fix atime/mtime regression"), but it turns out that this was both
+insufficient and overkill.
+
+It was insufficient because we let people attach to the shared ptmx node
+to see activity without even reading atime/mtime, and it was overkill
+because the "only once a minute" means that you can't really tell an
+idle person from an active one with 'w'.
+
+So this tries to fix the problem properly. It marks the shared ptmx
+node as un-notifiable, and it lowers the "only once a minute" to a few
+seconds instead - still long enough that you can't time individual
+keystrokes, but short enough that you can tell whether somebody is
+active or not.
+
+Reported-by: Simon Kirby <sim@hostway.ca>
+Acked-by: Jiri Slaby <jslaby@suse.cz>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/tty/pty.c | 3 +++
+ drivers/tty/tty_io.c | 4 ++--
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+--- a/drivers/tty/pty.c
++++ b/drivers/tty/pty.c
+@@ -669,6 +669,9 @@ static int ptmx_open(struct inode *inode
+
+ nonseekable_open(inode, filp);
+
++ /* We refuse fsnotify events on ptmx, since it's a shared resource */
++ filp->f_mode |= FMODE_NONOTIFY;
++
+ retval = tty_alloc_file(filp);
+ if (retval)
+ return retval;
+--- a/drivers/tty/tty_io.c
++++ b/drivers/tty/tty_io.c
+@@ -939,10 +939,10 @@ void start_tty(struct tty_struct *tty)
+
+ EXPORT_SYMBOL(start_tty);
+
++/* We limit tty time update visibility to every 8 seconds or so. */
+ static void tty_update_time(struct timespec *time)
+ {
+- unsigned long sec = get_seconds();
+- sec -= sec % 60;
++ unsigned long sec = get_seconds() & ~7;
+ if ((long)(sec - time->tv_sec) > 0)
+ time->tv_sec = sec;
+ }
--- /dev/null
+From 58f8b6c4fa5a13cb2ddb400e26e9e65766d71e38 Mon Sep 17 00:00:00 2001
+From: Stefani Seibold <stefani@seibold.net>
+Date: Sun, 7 Apr 2013 12:08:55 +0200
+Subject: USB: add ftdi_sio USB ID for GDM Boost V1.x
+
+From: Stefani Seibold <stefani@seibold.net>
+
+commit 58f8b6c4fa5a13cb2ddb400e26e9e65766d71e38 upstream.
+
+This patch add a missing usb device id for the GDMBoost V1.x device
+
+The patch is against 3.9-rc5
+
+Signed-off-by: Stefani Seibold <stefani@seibold.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/ftdi_sio.c | 1 +
+ drivers/usb/serial/ftdi_sio_ids.h | 1 +
+ 2 files changed, 2 insertions(+)
+
+--- a/drivers/usb/serial/ftdi_sio.c
++++ b/drivers/usb/serial/ftdi_sio.c
+@@ -195,6 +195,7 @@ static struct usb_device_id id_table_com
+ { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_THROTTLE_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_GATEWAY_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_GBM_PID) },
++ { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_GBM_BOOST_PID) },
+ { USB_DEVICE(NEWPORT_VID, NEWPORT_AGILIS_PID) },
+ { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_IOBOARD_PID) },
+ { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_MINI_IOBOARD_PID) },
+--- a/drivers/usb/serial/ftdi_sio_ids.h
++++ b/drivers/usb/serial/ftdi_sio_ids.h
+@@ -74,6 +74,7 @@
+ #define FTDI_OPENDCC_THROTTLE_PID 0xBFDA
+ #define FTDI_OPENDCC_GATEWAY_PID 0xBFDB
+ #define FTDI_OPENDCC_GBM_PID 0xBFDC
++#define FTDI_OPENDCC_GBM_BOOST_PID 0xBFDD
+
+ /* NZR SEM 16+ USB (http://www.nzr.de) */
+ #define FTDI_NZR_SEM_USB_PID 0xC1E0 /* NZR SEM-LOG16+ */
--- /dev/null
+From 9f06d15f8db6946e41f73196a122b84a37938878 Mon Sep 17 00:00:00 2001
+From: Adrian Thomasset <adrian.thomasset@st.com>
+Date: Tue, 23 Apr 2013 12:46:29 +0100
+Subject: USB: ftdi_sio: correct ST Micro Connect Lite PIDs
+
+From: Adrian Thomasset <adrian.thomasset@st.com>
+
+commit 9f06d15f8db6946e41f73196a122b84a37938878 upstream.
+
+The current ST Micro Connect Lite uses the FT4232H hi-speed quad USB
+UART FTDI chip. It is also possible to drive STM reference targets
+populated with an on-board JTAG debugger based on the FT2232H chip with
+the same STMicroelectronics tools.
+
+For this reason, the ST Micro Connect Lite PIDs should be
+ST_STMCLT_2232_PID: 0x3746
+ST_STMCLT_4232_PID: 0x3747
+
+Signed-off-by: Adrian Thomasset <adrian.thomasset@st.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/ftdi_sio.c | 4 +++-
+ drivers/usb/serial/ftdi_sio_ids.h | 3 ++-
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/serial/ftdi_sio.c
++++ b/drivers/usb/serial/ftdi_sio.c
+@@ -877,7 +877,9 @@ static struct usb_device_id id_table_com
+ { USB_DEVICE(FTDI_VID, FTDI_DOTEC_PID) },
+ { USB_DEVICE(QIHARDWARE_VID, MILKYMISTONE_JTAGSERIAL_PID),
+ .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
+- { USB_DEVICE(ST_VID, ST_STMCLT1030_PID),
++ { USB_DEVICE(ST_VID, ST_STMCLT_2232_PID),
++ .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
++ { USB_DEVICE(ST_VID, ST_STMCLT_4232_PID),
+ .driver_info = (kernel_ulong_t)&ftdi_stmclite_quirk },
+ { USB_DEVICE(FTDI_VID, FTDI_RF_R106) },
+ { USB_DEVICE(FTDI_VID, FTDI_DISTORTEC_JTAG_LOCK_PICK_PID),
+--- a/drivers/usb/serial/ftdi_sio_ids.h
++++ b/drivers/usb/serial/ftdi_sio_ids.h
+@@ -1151,7 +1151,8 @@
+ * STMicroelectonics
+ */
+ #define ST_VID 0x0483
+-#define ST_STMCLT1030_PID 0x3747 /* ST Micro Connect Lite STMCLT1030 */
++#define ST_STMCLT_2232_PID 0x3746
++#define ST_STMCLT_4232_PID 0x3747
+
+ /*
+ * Papouch products (http://www.papouch.com/)
--- /dev/null
+From e7d3b6e22c871ba36d052ca99bc8ceca4d546a60 Mon Sep 17 00:00:00 2001
+From: Ben Jencks <ben@bjencks.net>
+Date: Tue, 2 Apr 2013 00:35:08 -0400
+Subject: usb/misc/appledisplay: Add 24" LED Cinema display
+
+From: Ben Jencks <ben@bjencks.net>
+
+commit e7d3b6e22c871ba36d052ca99bc8ceca4d546a60 upstream.
+
+Add the Apple 24" LED Cinema display to the supported devices.
+
+Signed-off-by: Ben Jencks <ben@bjencks.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/misc/appledisplay.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/usb/misc/appledisplay.c
++++ b/drivers/usb/misc/appledisplay.c
+@@ -63,6 +63,7 @@ static const struct usb_device_id appled
+ { APPLEDISPLAY_DEVICE(0x9219) },
+ { APPLEDISPLAY_DEVICE(0x921c) },
+ { APPLEDISPLAY_DEVICE(0x921d) },
++ { APPLEDISPLAY_DEVICE(0x9236) },
+
+ /* Terminating entry */
+ { }
--- /dev/null
+From 671b4b2ba9266cbcfe7210a704e9ea487dcaa988 Mon Sep 17 00:00:00 2001
+From: Tormod Volden <debian.tormod@gmail.com>
+Date: Sat, 20 Apr 2013 14:24:04 +0200
+Subject: usb-storage: CY7C68300A chips do not support Cypress ATACB
+
+From: Tormod Volden <debian.tormod@gmail.com>
+
+commit 671b4b2ba9266cbcfe7210a704e9ea487dcaa988 upstream.
+
+Many cards based on CY7C68300A/B/C use the USB ID 04b4:6830 but only the
+B and C variants (EZ-USB AT2LP) support the ATA Command Block
+functionality, according to the data sheets. The A variant (EZ-USB AT2)
+locks up if ATACB is attempted, until a typical 30 seconds timeout runs
+out and a USB reset is performed.
+
+https://bugs.launchpad.net/bugs/428469
+
+It seems that one way to spot a CY7C68300A (at least where the card
+manufacturer left Cypress' EEPROM default vaules, against Cypress'
+recommendations) is to look at the USB string descriptor indices.
+
+A http://media.digikey.com/pdf/Data%20Sheets/Cypress%20PDFs/CY7C68300A.pdf
+B http://www.farnell.com/datasheets/43456.pdf
+C http://www.cypress.com/?rID=14189
+
+Note that a CY7C68300B/C chip appears as CY7C68300A if it is running
+in Backward Compatibility Mode, and if ATACB would be supported in this
+case there is anyway no way to tell which chip it really is.
+
+For 5 years my external USB drive has been locking up for half a minute
+when plugged in and ata_id is run by udev, or anytime hdparm or similar
+is run on it.
+
+Finally looking at the /correct/ datasheet I think I found the reason. I
+am aware the quirk in this patch is a bit hacky, but the hardware
+manufacturers haven't made it easy for us.
+
+Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/storage/cypress_atacb.c | 16 ++++++++++++++--
+ 1 file changed, 14 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/storage/cypress_atacb.c
++++ b/drivers/usb/storage/cypress_atacb.c
+@@ -248,14 +248,26 @@ static int cypress_probe(struct usb_inte
+ {
+ struct us_data *us;
+ int result;
++ struct usb_device *device;
+
+ result = usb_stor_probe1(&us, intf, id,
+ (id - cypress_usb_ids) + cypress_unusual_dev_list);
+ if (result)
+ return result;
+
+- us->protocol_name = "Transparent SCSI with Cypress ATACB";
+- us->proto_handler = cypress_atacb_passthrough;
++ /* Among CY7C68300 chips, the A revision does not support Cypress ATACB
++ * Filter out this revision from EEPROM default descriptor values
++ */
++ device = interface_to_usbdev(intf);
++ if (device->descriptor.iManufacturer != 0x38 ||
++ device->descriptor.iProduct != 0x4e ||
++ device->descriptor.iSerialNumber != 0x64) {
++ us->protocol_name = "Transparent SCSI with Cypress ATACB";
++ us->proto_handler = cypress_atacb_passthrough;
++ } else {
++ us->protocol_name = "Transparent SCSI";
++ us->proto_handler = usb_stor_transparent_scsi_command;
++ }
+
+ result = usb_stor_probe2(us);
+ return result;
--- /dev/null
+From 1361bf4b9f9ef45e628a5b89e0fd9bedfdcb7104 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Tue, 16 Apr 2013 11:08:33 +0200
+Subject: usbfs: Always allow ctrl requests with USB_RECIP_ENDPOINT on the ctrl ep
+
+From: Hans de Goede <hdegoede@redhat.com>
+
+commit 1361bf4b9f9ef45e628a5b89e0fd9bedfdcb7104 upstream.
+
+When usbfs receives a ctrl-request from userspace it calls check_ctrlrecip,
+which for a request with USB_RECIP_ENDPOINT tries to map this to an interface
+to see if this interface is claimed, except for ctrl-requests with a type of
+USB_TYPE_VENDOR.
+
+When trying to use this device: http://www.akaipro.com/eiepro
+redirected to a Windows vm running on qemu on top of Linux.
+
+The windows driver makes a ctrl-req with USB_TYPE_CLASS and
+USB_RECIP_ENDPOINT with index 0, and the mapping of the endpoint (0) to
+the interface fails since ep 0 is the ctrl endpoint and thus never is
+part of an interface.
+
+This patch fixes this ctrl-req failing by skipping the checkintf call for
+USB_RECIP_ENDPOINT ctrl-reqs on the ctrl endpoint.
+
+Reported-by: Dave Stikkolorum <d.r.stikkolorum@hhs.nl>
+Tested-by: Dave Stikkolorum <d.r.stikkolorum@hhs.nl>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Acked-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/core/devio.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/usb/core/devio.c
++++ b/drivers/usb/core/devio.c
+@@ -642,6 +642,8 @@ static int check_ctrlrecip(struct dev_st
+ index &= 0xff;
+ switch (requesttype & USB_RECIP_MASK) {
+ case USB_RECIP_ENDPOINT:
++ if ((index & ~USB_DIR_IN) == 0)
++ return 0;
+ ret = findintfep(ps->dev, index);
+ if (ret >= 0)
+ ret = checkintf(ps, ret);
--- /dev/null
+From 7918c92ae9638eb8a6ec18e2b4a0de84557cccc8 Mon Sep 17 00:00:00 2001
+From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
+Date: Tue, 16 Apr 2013 15:18:00 -0400
+Subject: xen/time: Fix kasprintf splat when allocating timer%d IRQ line.
+
+From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
+
+commit 7918c92ae9638eb8a6ec18e2b4a0de84557cccc8 upstream.
+
+When we online the CPU, we get this splat:
+
+smpboot: Booting Node 0 Processor 1 APIC 0x2
+installing Xen timer for CPU 1
+BUG: sleeping function called from invalid context at /home/konrad/ssd/konrad/linux/mm/slab.c:3179
+in_atomic(): 1, irqs_disabled(): 0, pid: 0, name: swapper/1
+Pid: 0, comm: swapper/1 Not tainted 3.9.0-rc6upstream-00001-g3884fad #1
+Call Trace:
+ [<ffffffff810c1fea>] __might_sleep+0xda/0x100
+ [<ffffffff81194617>] __kmalloc_track_caller+0x1e7/0x2c0
+ [<ffffffff81303758>] ? kasprintf+0x38/0x40
+ [<ffffffff813036eb>] kvasprintf+0x5b/0x90
+ [<ffffffff81303758>] kasprintf+0x38/0x40
+ [<ffffffff81044510>] xen_setup_timer+0x30/0xb0
+ [<ffffffff810445af>] xen_hvm_setup_cpu_clockevents+0x1f/0x30
+ [<ffffffff81666d0a>] start_secondary+0x19c/0x1a8
+
+The solution to that is use kasprintf in the CPU hotplug path
+that 'online's the CPU. That is, do it in in xen_hvm_cpu_notify,
+and remove the call to in xen_hvm_setup_cpu_clockevents.
+
+Unfortunatly the later is not a good idea as the bootup path
+does not use xen_hvm_cpu_notify so we would end up never allocating
+timer%d interrupt lines when booting. As such add the check for
+atomic() to continue.
+
+Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/xen/enlighten.c | 5 ++++-
+ arch/x86/xen/time.c | 6 +++++-
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+--- a/arch/x86/xen/enlighten.c
++++ b/arch/x86/xen/enlighten.c
+@@ -1365,8 +1365,11 @@ static int __cpuinit xen_hvm_cpu_notify(
+ switch (action) {
+ case CPU_UP_PREPARE:
+ xen_vcpu_setup(cpu);
+- if (xen_have_vector_callback)
++ if (xen_have_vector_callback) {
+ xen_init_lock_cpu(cpu);
++ if (xen_feature(XENFEAT_hvm_safe_pvclock))
++ xen_setup_timer(cpu);
++ }
+ break;
+ default:
+ break;
+--- a/arch/x86/xen/time.c
++++ b/arch/x86/xen/time.c
+@@ -482,7 +482,11 @@ static void xen_hvm_setup_cpu_clockevent
+ {
+ int cpu = smp_processor_id();
+ xen_setup_runstate_info(cpu);
+- xen_setup_timer(cpu);
++ /*
++ * xen_setup_timer(cpu) - snprintf is bad in atomic context. Hence
++ * doing it xen_hvm_cpu_notify (which gets called by smp_init during
++ * early bootup and also during CPU hotplug events).
++ */
+ xen_setup_cpu_clockevents();
+ }
+