- Apr 19, 2011
-
-
Rafael J. Wysocki authored
Device suspend/resume infrastructure is used not only by the suspend and hibernate code in kernel/power, but also by APM, Xen and the kexec jump feature. However, commit 40dc166c (PM / Core: Introduce struct syscore_ops for core subsystems PM) failed to add syscore_suspend() and syscore_resume() calls to that code, which generally leads to breakage when the features in question are used. To fix this problem, add the missing syscore_suspend() and syscore_resume() calls to arch/x86/kernel/apm_32.c, kernel/kexec.c and drivers/xen/manage.c. Signed-off-by:
Rafael J. Wysocki <rjw@sisk.pl> Acked-by:
Greg Kroah-Hartman <gregkh@suse.de> Acked-by:
Ian Campbell <ian.campbell@citrix.com>
-
- Apr 11, 2011
-
-
Rafael J. Wysocki authored
Xen save/restore is going to use hibernate device callbacks for quiescing devices and putting them back to normal operations and it would need to select CONFIG_HIBERNATION for this purpose. However, that also would cause the hibernate interfaces for user space to be enabled, which might confuse user space, because the Xen kernels don't support hibernation. Moreover, it would be wasteful, as it would make the Xen kernels include a substantial amount of code that they would never use. To address this issue introduce new power management Kconfig option CONFIG_HIBERNATE_CALLBACKS, such that it will only select the code that is necessary for the hibernate device callbacks to work and make CONFIG_HIBERNATION select it. Then, Xen save/restore will be able to select CONFIG_HIBERNATE_CALLBACKS without dragging the entire hibernate code along with it. Signed-off-by:
Rafael J. Wysocki <rjw@sisk.pl> Tested-by:
Shriram Rajagopalan <rshriram@cs.ubc.ca>
-
- Mar 31, 2011
-
-
Lucas De Marchi authored
Fixes generated by 'codespell' and manually reviewed. Signed-off-by:
Lucas De Marchi <lucas.demarchi@profusion.mobi>
-
- Mar 30, 2011
-
-
Nicolas Kaiser authored
Checking 'irq < 0' doesn't work when 'irq' is unsigned. The assigned bind_evtchn_to_irq() and bind_virq_to_irq() return int, so using int appears appropriate. Signed-off-by:
Nicolas Kaiser <nikai@nikai.net> Signed-off-by:
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-
- Mar 29, 2011
-
-
Thomas Gleixner authored
These functions take irq_data as an argument and avoid a redundant lookup in the sparse irq case. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Cc: Ian Campbell <ian.campbell@citrix.com> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by:
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-
Thomas Gleixner authored
Converted with coccinelle. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Acked-by:
Ian Campbell <ian.campbell@citrix.com> Signed-off-by:
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-
Thomas Gleixner authored
These functions take irq_data as an argument and avoid a redundant lookup in the sparse irq case. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Cc: Ian Campbell <ian.campbell@citrix.com> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-
Thomas Gleixner authored
Converted with coccinelle. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de>
-
- Mar 24, 2011
-
-
Dan Carpenter authored
We should unlock here and also decrement the number of &map->users. Signed-off-by:
Dan Carpenter <error27@gmail.com> Signed-off-by:
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-
Dan Carpenter authored
copy_to_user() returns the amount of data remaining to be copied. We want to return a negative error code here. The upper layers just call WARN_ON() if we return non-zero so this doesn't change the behavior. But returning -EFAULT is still cleaner. Signed-off-by:
Dan Carpenter <error27@gmail.com> Signed-off-by:
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-
- Mar 16, 2011
-
-
Shriram Rajagopalan authored
Use PM_FREEZE, PM_THAW and PM_RESTORE power events for suspend/resume/checkpoint functionality, instead of PM_SUSPEND and PM_RESUME. Use of these pm events fixes the Xen Guest hangup when taking checkpoints. When a suspend event is cancelled (while taking checkpoints once/continuously), we use PM_THAW instead of PM_RESUME. PM_RESTORE is used when suspend is not cancelled. See Documentation/power/devices.txt and linux/pm.h for more info about freeze, thaw and restore. The sequence of pm events in a suspend-resume scenario is shown below. dpm_suspend_start(PMSG_FREEZE); dpm_suspend_noirq(PMSG_FREEZE); sysdev_suspend(PMSG_FREEZE); cancelled = suspend_hypercall() sysdev_resume(); dpm_resume_noirq(cancelled ? PMSG_THAW : PMSG_RESTORE); dpm_resume_end(cancelled ? PMSG_THAW : PMSG_RESTORE); Acked-by:
Ian Campbell <ian.campbell@citrix.com> Signed-off-by:
Shriram Rajagopalan <rshriram@cs.ubc.ca> Signed-off-by:
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-
Kazuhiro SUZUKI authored
Make xenbus frontend device subscribe to PM events to receive suspend/resume/freeze/thaw/restore notifications. Signed-off-by:
Kenji Wakamiya <wkenji@jp.fujitsu.com> Signed-off-by:
Kazuhiro Suzuki <kaz@jp.fujitsu.com> Signed-off-by:
Shriram Rajagopalan <rshriram@cs.ubc.ca> Acked-by:
Ian Campbell <ian.campbell@citrix.com> [shriram--minor mods and improved commit message] Signed-off-by:
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-
Daniel De Graaf authored
Grant mappings cause the PFN<->MFN mapping to be lost on the pages used for the mapping. Instead of leaking memory, use pages that have already been ballooned out and so have no valid mapping. This removes the need for the bad-page leak workaround as pages are repopulated by the balloon driver. Acked-by:
Ian Campbell <ian.campbell@citrix.com> Signed-off-by:
Daniel De Graaf <dgdegra@tycho.nsa.gov> Signed-off-by:
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-
Konrad Rzeszutek Wilk authored
Pages that have been ballooned are useful for other Xen drivers doing grant table actions, because these pages have valid struct page/PFNs but have no valid MFN so are available for remapping. Acked-by:
Ian Campbell <ian.campbell@citrix.com> Signed-off-by:
Daniel De Graaf <dgdegra@tycho.nsa.gov> [v2: Deal with rebasing on top of modified balloon code] Signed-off-by:
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-
Daniel De Graaf authored
The basic functionality of ballooning pages is useful for Xen drivers in general. Rather than require a dependency on the balloon module, split the functionality that is reused into the core. The balloon module is still required to follow ballooning requests from xenstore or to view balloon statistics in sysfs. Acked-by:
Ian Campbell <ian.campbell@citrix.com> Signed-off-by:
Daniel De Graaf <dgdegra@tycho.nsa.gov> Signed-off-by:
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-
Konrad Rzeszutek Wilk authored
In the past the retry_count (in other form of this code) was zero. Meaning retry forever. Do the same thing here without changing it to the value 16. Also remove some of the pr_info as there is no need to spam the user. Acked-by:
Ian Campbell <Ian.Campbell@eu.citrix.com> Signed-off-by:
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-
- Mar 15, 2011
-
-
Konrad Rzeszutek Wilk authored
drivers/xen/events.c:396: error: 'struct irq_data' has no member named 'affinity' Reported-by:
Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by:
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-
- Mar 14, 2011
-
-
Daniel Kiper authored
Protect against CPU exhaust by event/x process during errors by adding some delays in scheduling next event and retry count limit. Signed-off-by:
Daniel Kiper <dkiper@net-space.pl> Signed-off-by:
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-
Daniel Kiper authored
Migration from mod_timer() to schedule_delayed_work(). Signed-off-by:
Daniel Kiper <dkiper@net-space.pl> Signed-off-by:
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-
Daniel Kiper authored
Removal of driver_pages (I do not have seen any references to it). Signed-off-by:
Daniel Kiper <dkiper@net-space.pl> Signed-off-by:
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-
Ian Campbell authored
One of those spin_lock() calls should be an unlock... Signed-off-by:
Ian Campbell <ian.campbell@citrix.com> Signed-off-by:
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-
- Mar 10, 2011
-
-
Ian Campbell authored
Running out of IRQs need not be fatal to the machine as a whole. Signed-off-by:
Ian Campbell <ian.campbell@citrix.com> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Signed-off-by:
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-
Ian Campbell authored
With the introduction of e7bcecb7 "genirq: Make nr_irqs runtime expandable" nr_irqs can grow as necessary to accommodate our allocation requests. Signed-off-by:
Ian Campbell <ian.campbell@citrix.com> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Signed-off-by:
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-
Ian Campbell authored
There isn't really much relationship between the two, other than nr_irqs often being the larger of the two. Allows us to remove a nr_irqs sized array, the only users of this array are MSI setup and restore, neither of which are particularly performance critical. Signed-off-by:
Ian Campbell <ian.campbell@citrix.com> Signed-off-by:
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-
Ian Campbell authored
Removes nr_irq sized array allocation at start of day. Signed-off-by:
Ian Campbell <ian.campbell@citrix.com> Signed-off-by:
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-
Ian Campbell authored
In a PVHVM kernel not all interrupts are Xen interrupts (APIC interrupts can also be present). Currently we get away with walking over all interrupts because the lookup in the irq_info array simply returns IRQT_UNBOUND and we ignore it. However this array will be going away in a future patch so we need to manually track which interrupts have been allocated by the Xen events infrastructure. Signed-off-by:
Ian Campbell <ian.campbell@citrix.com> Signed-off-by:
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-
Ian Campbell authored
Encapsulate setup of XXX_to_irq array in the relevant xen_irq_info_*_init function. Signed-off-by:
Ian Campbell <ian.campbell@citrix.com> Signed-off-by:
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-
Ian Campbell authored
Signed-off-by:
Ian Campbell <ian.campbell@citrix.com> Signed-off-by:
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-
Ian Campbell authored
I can't see any reason why it isn't already. Signed-off-by:
Ian Campbell <ian.campbell@citrix.com> Signed-off-by:
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-
Ian Campbell authored
Following the example set by xen_allocate_pirq_msi and xen_bind_pirq_msi_to_irq: xen_allocate_pirq becomes xen_allocate_pirq_gsi and now only allocates a pirq number and does not bind it. xen_map_pirq_gsi becomes xen_bind_pirq_gsi_to_irq and binds an existing pirq. Signed-off-by:
Ian Campbell <ian.campbell@citrix.com> Signed-off-by:
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-
Ian Campbell authored
There is nothing per-cpu about this function. Signed-off-by:
Ian Campbell <ian.campbell@citrix.com> Signed-off-by:
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-
Ian Campbell authored
I was unable to find any user of these functions in either the functionality pending for 2.6.39 or the xen/next-2.6.32 branch of xen.git An exception to this was xen_gsi_from_irq which did appear to be used in xen/next-2.6.32's pciback. However in the 2.6.39 version of pciback xen_pirq_from_irq is, correctly AFAICT, used instead. Only a minority of functions in events.h use "extern" so drop it from those places for consistency. Signed-off-by:
Ian Campbell <ian.campbell@citrix.com> Signed-off-by:
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-
Ian Campbell authored
Fix initial value of irq so that first goto out (if pirq or gsi arguments are too large) actually returns an error. Signed-off-by:
Ian Campbell <ian.campbell@citrix.com> Signed-off-by:
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-
Ian Campbell authored
It is never valid assume any particular relationship between a Xen PIRQ number and and Linux IRQ number so there is no need to hedge when saying so. Signed-off-by:
Ian Campbell <ian.campbell@citrix.com> Signed-off-by:
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-
Ian Campbell authored
Clarifies which bit the comment applies to. Signed-off-by:
Ian Campbell <ian.campbell@citrix.com> Signed-off-by:
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-
Keir Fraser authored
Signed-off-by:
Keir Fraser <keir.fraser@citrix.com> Signed-off-by:
Ian Campbell <ian.campbell@citrix.com> [ijc: forward ported from linux-2.6.18-xen.hg 991:9ba6d9f3fbc0] Signed-off-by:
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-
Keir Fraser authored
(except for starting l2 word, which we scan in two parts). Signed-off-by:
Keir Fraser <keir.fraser@citrix.com> Signed-off-by:
Ian Campbell <ian.campbell@citrix.com> [ijc: forward ported from linux-2.6.18-xen.hg 990:427276ac595d] Signed-off-by:
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-
Keir Fraser authored
Also fixes a couple of boundary cases. Signed-off-by:
Keir Fraser <keir.fraser@citrix.com> Signed-off-by:
Ian Campbell <ian.campbell@citrix.com> [ijc: forward ported from linux-2.6.18-xen.hg 988:c88a02a22a05] Signed-off-by:
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-
Ian Campbell authored
Signed-off-by:
Ian Campbell <ian.campbell@citrix.com> [ijc: forward ported from linux-2.6.18-xen.hg 325:b2768401db94] Signed-off-by:
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-
Scott Rixner authored
Avoids fairness issue resulting from domain 0 processing lowest numbered event channel first. Fixes bug #1115 "Event channel port scanning unfair". Bugzilla: http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1115 Signed-off-by:
Ian Campbell <ian.campbell@citrix.com> [ijc: forward ported from linux-2.6.18-xen.hg 324:7fe1c6d02a2b various variables have different names in this tree: l1 -> pending_words l2 -> pending_bits l1i -> word_idx l2i -> bit_idx] Signed-off-by:
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-