]> xenbits.xensource.com Git - legacy/linux-2.6.18-xen.git/log
legacy/linux-2.6.18-xen.git
16 years agopci: Fix the non-PCI_IOV build.
Keir Fraser [Thu, 19 Mar 2009 13:48:52 +0000 (13:48 +0000)]
pci: Fix the non-PCI_IOV build.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agoXen: Sync physdev.h public header.
Keir Fraser [Thu, 19 Mar 2009 10:25:31 +0000 (10:25 +0000)]
Xen: Sync physdev.h public header.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agoPCI: pass ARI and SR-IOV device information to the hypervisor
Keir Fraser [Thu, 19 Mar 2009 10:21:46 +0000 (10:21 +0000)]
PCI: pass ARI and SR-IOV device information to the hypervisor

PCIe Alternative Routing-ID Interpretation (ARI) ECN defines the Extended
Function -- a function whose function number is greater than 7 within an
ARI Device. Intel VT-d spec 1.2 section 8.3.2 specifies that the Extended
Function is under the scope of the same remapping unit as the traditional
function. The hypervisor needs to know if a function is Extended
Function so it can find proper DMAR for it.

And section 8.3.3 specifies that the SR-IOV Virtual Function is under the
scope of the same remapping unit as the Physical Function. The hypervisor
also needs to know if a function is the Virtual Function and which
Physical Function it's associated with for same reason.

Signed-off-by: Yu Zhao <yu.zhao@intel.com>
16 years agoPCI: save and restore PCIe 2.0 registers
Keir Fraser [Thu, 19 Mar 2009 10:21:21 +0000 (10:21 +0000)]
PCI: save and restore PCIe 2.0 registers

PCIe 2.0 defines several new registers (Device Control 2, Link Control
2, and Slot Control 2). Save and retore them in pci_save_pcie_state()
and pci_restore_pcie_state().

Signed-off-by: Yu Zhao <yu.zhao@intel.com>
16 years agoPCI: add a SR-IOV quirk for Intel 82576 NIC
Keir Fraser [Thu, 19 Mar 2009 10:20:59 +0000 (10:20 +0000)]
PCI: add a SR-IOV quirk for Intel 82576 NIC

If BIOS doesn't allocate resources for VF BARs, zero Flash BAR and
program VF BARs to use the old Flash Memory Space.

Please refer to Intel 82576 Gigabit Ethernet Controller Datasheet
section 7.9.2.14.2 for details.
http://download.intel.com/design/network/datashts/82576_Datasheet.pdf

Signed-off-by: Yu Zhao <yu.zhao@intel.com>
16 years agolinux/PCI-MSI: fix compiler warnings resulting from c/s 790
Keir Fraser [Thu, 19 Mar 2009 10:07:31 +0000 (10:07 +0000)]
linux/PCI-MSI: fix compiler warnings resulting from c/s 790

The one in pci_enable_msix() is rather meaningful, as the
uninitialized inner msi_dev_entry was indeed hiding the initialized
outer one.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agolinux pciback/pcifront: work queue management fixes
Keir Fraser [Thu, 19 Mar 2009 10:06:52 +0000 (10:06 +0000)]
linux pciback/pcifront: work queue management fixes

flush_scheduled_work() only flushes work queued to the global
keventd_wq, but pciback is using its own local work queue, so that is
what needs to be flushed.

Calling cancel_delayed_work() on something never inserted through
queue_delayed_work() or schedule_delayed_work() is pointless.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agoPVUSB: fix the license header of usbfront-hub.c
Keir Fraser [Thu, 19 Mar 2009 10:06:14 +0000 (10:06 +0000)]
PVUSB: fix the license header of usbfront-hub.c

The license of the PVUSB driver is Dual BSD/GPL.

Signed-off-by: Noboru Iwamatsu <n_iwamatsu@jp.fujitsu.com>
16 years agodom0 linux: Fix descriptions in kernel-parameters.txt
Keir Fraser [Thu, 19 Mar 2009 10:05:39 +0000 (10:05 +0000)]
dom0 linux: Fix descriptions in kernel-parameters.txt

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
16 years agoSync Xen public headers.
Keir Fraser [Wed, 18 Mar 2009 15:43:57 +0000 (15:43 +0000)]
Sync Xen public headers.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agoxen: remove dead event channel declarations
Keir Fraser [Wed, 18 Mar 2009 15:28:03 +0000 (15:28 +0000)]
xen: remove dead event channel declarations

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agox86: Fix interaction of NTP and dom0->xen time updates
Keir Fraser [Wed, 18 Mar 2009 11:51:05 +0000 (11:51 +0000)]
x86: Fix interaction of NTP and dom0->xen time updates

Don't discard NTP sync when updating Xen wallclock time from dom0,
as that's almost the first thing we do when we become synced.
Move the call to ntp_clear() into do_settimeofday(), which is the
only caller of __update_wallclock() that looks like it should break
NTP sync.

This fixes the timer chain that sets Xen's wallclock every minute when
dom0 is NTP synced, which in turn greatly improves wallclock accuracy
in PV domU.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
16 years agobackport: allocate cap save buffers for PCIe/PCI-X.
Keir Fraser [Wed, 18 Mar 2009 11:45:30 +0000 (11:45 +0000)]
backport: allocate cap save buffers for PCIe/PCI-X.

Changeset 819:e8a9f8910a3f doesn't backport all the necessary code.
This patch adds the missing part. It is also backported from upstream
Linux kernel and the git commit is:

commit 63f4898ace2788a89ed685672aab092e1c3e50e6
Author: Rafael J. Wysocki <rjw@sisk.pl>
Date:   Sun Dec 7 22:02:58 2008 +0100

    PCI: handle PCI state saving with interrupts disabled

    Since interrupts will soon be disabled at PCI resume time, we need
    to
    pre-allocate memory to save/restore PCI config space (or use
    GFP_ATOMIC=, but this is safer).

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>=
16 years agoPVUSB: add kernel config options
Keir Fraser [Wed, 18 Mar 2009 11:43:57 +0000 (11:43 +0000)]
PVUSB: add kernel config options

Signed-off-by: Noboru Iwamatsu <n_iwamatsu@jp.fujitsu.com>
16 years agoPVUSB: backend driver
Keir Fraser [Wed, 18 Mar 2009 11:43:24 +0000 (11:43 +0000)]
PVUSB: backend driver

Signed-off-by: Noboru Iwamatsu <n_iwamatsu@jp.fujitsu.com>
16 years agoPVUSB: frontend driver
Keir Fraser [Wed, 18 Mar 2009 11:42:51 +0000 (11:42 +0000)]
PVUSB: frontend driver

Signed-off-by: Noboru Iwamatsu <n_iwamatsu@jp.fujitsu.com>
16 years agoPVUSB: add io interface header for PVUSB
Keir Fraser [Wed, 18 Mar 2009 11:42:19 +0000 (11:42 +0000)]
PVUSB: add io interface header for PVUSB

Signed-off-by: Noboru Iwamatsu <n_iwamatsu@jp.fujitsu.com>
16 years agoPCI: add SR-IOV API for Physical Function driver
Keir Fraser [Wed, 18 Mar 2009 11:40:10 +0000 (11:40 +0000)]
PCI: add SR-IOV API for Physical Function driver

Add or remove the Virtual Function when the SR-IOV is enabled or
disabled by the device driver. This can happen anytime rather than
only at the device probe stage.

Signed-off-by: Yu Zhao <yu.zhao@intel.com>
16 years agoPCI: centralize device setup code
Keir Fraser [Wed, 18 Mar 2009 11:39:56 +0000 (11:39 +0000)]
PCI: centralize device setup code

Move the device setup stuff into pci_setup_device() which will be used
to setup the Virtual Function later.

Signed-off-by: Yu Zhao <yu.zhao@intel.com>
16 years agoPCI: reserve bus range for SR-IOV device
Keir Fraser [Wed, 18 Mar 2009 11:39:32 +0000 (11:39 +0000)]
PCI: reserve bus range for SR-IOV device

Reserve the bus number range used by the Virtual Function when
pcibios_assign_all_busses() returns true.

Signed-off-by: Yu Zhao <yu.zhao@intel.com>
16 years agoPCI: restore saved SR-IOV state
Keir Fraser [Wed, 18 Mar 2009 11:39:18 +0000 (11:39 +0000)]
PCI: restore saved SR-IOV state

Restore the volatile registers in the SR-IOV capability after the
D3->D0 transition.

Signed-off-by: Yu Zhao <yu.zhao@intel.com>
16 years agoPCI: initialize and release SR-IOV capability
Keir Fraser [Wed, 18 Mar 2009 11:39:04 +0000 (11:39 +0000)]
PCI: initialize and release SR-IOV capability

If a device has the SR-IOV capability, initialize it (set the ARI
Capable Hierarchy in the lowest numbered PF if necessary; calculate
the System Page Size for the VF MMIO, probe the VF Offset, Stride
and BARs). A lock for the VF bus allocation is also initialized if
a PF is the lowest numbered PF.

Signed-off-by: Yu Zhao <yu.zhao@intel.com>
16 years agoxenbus: Add new states to xenbus_strstate()
Keir Fraser [Tue, 17 Mar 2009 14:27:31 +0000 (14:27 +0000)]
xenbus: Add new states to xenbus_strstate()

This patch adds the following states to the xenbus_strstate().
- XenbusStateReconfiguring
- XenbusStateReconfigured

Signed-off-by: Noboru Iwamatsu <n_iwamatsu@jp.fujitsu.com>
16 years agonetback: parent sysfs device should be set before registering.
Keir Fraser [Tue, 17 Mar 2009 14:21:51 +0000 (14:21 +0000)]
netback: parent sysfs device should be set before registering.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
16 years agoSave/restore PCIe/PCI-X states across S3.
Keir Fraser [Fri, 13 Mar 2009 10:08:22 +0000 (10:08 +0000)]
Save/restore PCIe/PCI-X states across S3.

This patch is backported from upstream Linux kernel.

commit b56a5a23bfecd9cac9187164a9d5f22d287c48b9
Author: Michael S. Tsirkin <mst@mellanox.co.il>
Date:   Mon Aug 21 16:22:22 2006 +0300

    PCI: Restore PCI Express capability registers after PM event

    Restore PCI Express capability registers after PM event.
    This includes maxumum MTU for PCI express and other vital data.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
commit cc692a5f1e9816671b77da77c6d6c463156ba1c7
Author: Stephen Hemminger <shemminger@osdl.org>
Date:   Wed Nov 8 16:17:15 2006 -0800

    PCI: save/restore PCI-X state

    Shouldn't PCI-X state be saved/restored?  No device really needs
    this
    right now. qla24xx (fc HBA) and mthca (infiniband) don't do
    suspend,
    and sky2 resets its tweaks when links are brought up.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
16 years agoBackport: PCI: add a new function to map BAR offsets
Keir Fraser [Fri, 13 Mar 2009 08:51:09 +0000 (08:51 +0000)]
Backport: PCI: add a new function to map BAR offsets

    commit 613e7ed6f72b1a115f7ece8ce1b66cf095de1348
    Author: Yu Zhao <yu.zhao@intel.com>
    Date:   Sat Nov 22 02:41:27 2008 +0800

    PCI: add a new function to map BAR offsets

    Add a function to map a given resource number to a corresponding
    register so drivers can get the offset and type of device specific
    BARs.

Signed-off-by: Yu Zhao <yu.zhao@intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Yu Zhao <yu.zhao@intel.com>
16 years agoBackport: PCI: remove unnecessary condition check in pci_restore_bars()
Keir Fraser [Fri, 13 Mar 2009 08:50:44 +0000 (08:50 +0000)]
Backport: PCI: remove unnecessary condition check in pci_restore_bars()

    commit bc5f5a8277cb353161454b6704b3186ebcf3a2a3
    Author: Yu Zhao <yu.zhao@intel.com>
    Date:   Sat Nov 22 02:40:00 2008 +0800

    PCI: remove unnecessary condition check in pci_restore_bars()

    Remove the unnecessary number of resources condition checks
    because
    the pci_update_resource() will check availability of the
    resources.

Signed-off-by: Yu Zhao <yu.zhao@intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Yu Zhao <yu.zhao@intel.com>
16 years agoBackport: PCI: define PCI resource names in an 'enum'
Keir Fraser [Fri, 13 Mar 2009 08:50:15 +0000 (08:50 +0000)]
Backport: PCI: define PCI resource names in an 'enum'

    commit fde09c6d8f92de0c9f75698a75f0989f2234c517
    Author: Yu Zhao <yu.zhao@intel.com>
    Date:   Sat Nov 22 02:39:32 2008 +0800

    PCI: define PCI resource names in an 'enum'

    This patch moves all definitions of the PCI resource names to an
    'enum',
    and also replaces some hard-coded resource variables with symbol
    names. This change eases introduction of device specific
    resources.

Reviewed-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Yu Zhao <yu.zhao@intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Yu Zhao <yu.zhao@intel.com>
16 years agoBackport: PCI: remove unnecessary arg of pci_update_resource()
Keir Fraser [Fri, 13 Mar 2009 07:42:13 +0000 (07:42 +0000)]
Backport: PCI: remove unnecessary arg of pci_update_resource()

    commit 14add80b5120966fe0659d61815b9e9b4b68fdc5
    Author: Yu Zhao <yu.zhao@intel.com>
    Date:   Sat Nov 22 02:38:52 2008 +0800

    PCI: remove unnecessary arg of pci_update_resource()

    This cleanup removes unnecessary argument 'struct resource *res'
    in
    pci_update_resource(), so it takes same arguments as other
    companion
    functions (pci_assign_resource(), etc.).

Signed-off-by: Yu Zhao <yu.zhao@intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Yu Zhao <yu.zhao@intel.com>
16 years agoBackport: PCI: allow pci_alloc_child_bus() to handle a NULL bridge
Keir Fraser [Fri, 13 Mar 2009 07:41:52 +0000 (07:41 +0000)]
Backport: PCI: allow pci_alloc_child_bus() to handle a NULL bridge

    commit 3789fa8a2e534523c896a32a9f27f78d52ad7d82
    Author: Yu Zhao <yu.zhao@intel.com>
    Date:   Sat Nov 22 02:41:07 2008 +0800

    PCI: allow pci_alloc_child_bus() to handle a NULL bridge

    Allow pci_alloc_child_bus() to allocate buses without bridge
    devices.
    Some SR-IOV devices can occupy more than one bus number, but there
    is no
    explicit bridges because that have internal routing mechanism.

Signed-off-by: Yu Zhao <yu.zhao@intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Yu Zhao <yu.zhao@intel.com>
16 years agoBackport: PCI: enhance pci_ari_enabled()
Keir Fraser [Fri, 13 Mar 2009 07:41:39 +0000 (07:41 +0000)]
Backport: PCI: enhance pci_ari_enabled()

    commit 6a49d8120021897e139641062236215aac5d220e
    Author: Yu Zhao <yu.zhao@intel.com>
    Date:   Sat Nov 22 02:38:21 2008 +0800

    PCI: enhance pci_ari_enabled()

    Change parameter of pci_ari_enabled() from 'pci_dev' to 'pci_bus'.

    ARI forwarding on the bridge mostly concerns the subordinate
    devices
    rather than the bridge itself. So this change will make the
    function
    easier to use.

Signed-off-by: Yu Zhao <yu.zhao@intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Yu Zhao <yu.zhao@intel.com>
16 years agoBackport: PCI: fix ARI code to be compatible with mixed ARI/non-ARI
Keir Fraser [Fri, 13 Mar 2009 07:41:23 +0000 (07:41 +0000)]
Backport: PCI: fix ARI code to be compatible with mixed ARI/non-ARI
systems

    commit 8113587c2d14d3be2414190845b2e2617c0aa33b
    Author: Zhao, Yu <yu.zhao@intel.com>
    Date:   Thu Oct 23 13:15:39 2008 +0800

    PCI: fix ARI code to be compatible with mixed ARI/non-ARI systems

    The original ARI support code has a compatibility problem with
    non-ARI
    devices.  If a device doesn't support ARI, turning on ARI
    forwarding on
    its upper level bridge will cause undefined behavior.

    This fix turns on ARI forwarding only when the subordinate devices
    support it.

Tested-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Yu Zhao <yu.zhao@intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Yu Zhao <yu.zhao@intel.com>
16 years agoBackport: PCI: support PCIe ARI capability
Keir Fraser [Fri, 13 Mar 2009 07:40:54 +0000 (07:40 +0000)]
Backport: PCI: support PCIe ARI capability

    commit 58c3a727cb73b75a9104d295f096cca12959a5a5
    Author: Yu Zhao <yu.zhao@intel.com>
    Date:   Tue Oct 14 14:02:53 2008 +0800

    PCI: support PCIe ARI capability

    This patch adds support for PCI Express Alternative Routing-ID
    Interpretation (ARI) capability.

    The ARI capability extends the Function Number field of the PCI
    Express
    Endpoint by reusing the Device Number which is otherwise hardwired
    to 0.
    With ARI, an Endpoint can have up to 256 functions.

Signed-off-by: Yu Zhao <yu.zhao@intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Yu Zhao <yu.zhao@intel.com>
16 years agoBackport: PCI: export __pci_read_base()
Keir Fraser [Fri, 13 Mar 2009 07:40:36 +0000 (07:40 +0000)]
Backport: PCI: export __pci_read_base()

    commit 0b400c7ed4d027e02f6231afa39852a2d48e6f25
    Author: Yu Zhao <yu.zhao@intel.com>
    Date:   Sat Nov 22 02:40:40 2008 +0800

    PCI: export __pci_read_base()

    Export __pci_read_base() so it can be used by whole PCI subsystem.

Signed-off-by: Yu Zhao <yu.zhao@intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Yu Zhao <yu.zhao@intel.com>
16 years agoBackport: PCI: fix 64-vbit prefetchable memory resource BARs
Keir Fraser [Fri, 13 Mar 2009 07:40:22 +0000 (07:40 +0000)]
Backport: PCI: fix 64-vbit prefetchable memory resource BARs

    commit e354597cce8d219d135d65e585dc4f30323486b9
    Author: Peter Chubb <peterc@gelato.unsw.edu.au>
    Date:   Mon Oct 13 11:49:04 2008 +1100

    PCI: fix 64-vbit prefetchable memory resource BARs

    Since patch 6ac665c63dcac8fcec534a1d224ecbb8b867ad59 my infiniband
    controller hasn't worked.  This is because it has 64-bit
    prefetchable
    memory, which was mistakenly being  taken to be 32-bit memory.
    The
    resource flags in this case are PCI_BASE_ADDRESS_MEM_TYPE_64 |
    PCI_BASE_ADDRESS_MEM_PREFETCH.

    This patch checks only for the PCI_BASE_ADDRESS_MEM_TYPE_64 bit;
    thus
    whether the region is prefetchable or not is ignored.  This fixes
    my
    Infiniband.

Reviewed-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Peter Chubb <peterc@gelato.unsw.edu.au>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Yu Zhao <yu.zhao@intel.com>
16 years agoBackport: PCI: handle 64-bit resources better on 32-bit machines
Keir Fraser [Fri, 13 Mar 2009 07:40:10 +0000 (07:40 +0000)]
Backport: PCI: handle 64-bit resources better on 32-bit machines

    commit cc5499c3a607a392e8a7adb934aaf14b2c6a3519
    Author: Matthew Wilcox <matthew@wil.cx>
    Date:   Mon Jul 28 13:39:00 2008 -0400

    PCI: handle 64-bit resources better on 32-bit machines

    If the kernel is configured to support 64-bit resources on a
    32-bit
    machine, we can support 64-bit BARs properly.  Just change the
    condition
    to check sizeof(resource_size_t) instead of BITS_PER_LONG.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Yu Zhao <yu.zhao@intel.com>
16 years agoBackport: PCI: rewrite PCI BAR reading code
Keir Fraser [Fri, 13 Mar 2009 07:39:48 +0000 (07:39 +0000)]
Backport: PCI: rewrite PCI BAR reading code

    commit 6ac665c63dcac8fcec534a1d224ecbb8b867ad59
    Author: Matthew Wilcox <matthew@wil.cx>
    Date:   Mon Jul 28 13:38:59 2008 -0400

    PCI: rewrite PCI BAR reading code

    Factor out the code to read one BAR from the loop in
    pci_read_bases into
    a new function, __pci_read_base.  The new code is slightly more
    readable, better commented and removes the ifdef.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Yu Zhao <yu.zhao@intel.com>
16 years agoblkfront: Fix the build by expanding sg_init_table() in place.
Keir Fraser [Fri, 6 Mar 2009 12:51:33 +0000 (12:51 +0000)]
blkfront: Fix the build by expanding sg_init_table() in place.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agolinux/blkfront: use blk_rq_map_sg to generate ring entries
Keir Fraser [Thu, 5 Mar 2009 14:42:00 +0000 (14:42 +0000)]
linux/blkfront: use blk_rq_map_sg to generate ring entries

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agolinux/evtchn: fix off-by-one error in the pirq range check
Keir Fraser [Thu, 5 Mar 2009 14:40:35 +0000 (14:40 +0000)]
linux/evtchn: fix off-by-one error in the pirq range check

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agonetfront: Unregister inetdev notifiers on failure
Keir Fraser [Mon, 2 Mar 2009 11:06:52 +0000 (11:06 +0000)]
netfront: Unregister inetdev notifiers on failure
If you attempt to modprobe the pv-on-hvm netfront driver on a machine
not running under Xen (say, bare-metal, or under another hypervisor), the
netfront code correctly returns an ENODEV and fails to load.  However, if you
then shutdown that machine, you will oops while tearing down the network.
This is because we forget to unregister the the inetaddr_notifier on failure,
and so the kernel takes a fatal page fault.  The attached patch just unregisters
the notifier on failure, and solves the problem for me.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
16 years agopci: Fix the definition of PCI_PM_CTRL_NO_SOFT_RESET.
Keir Fraser [Mon, 2 Mar 2009 11:02:00 +0000 (11:02 +0000)]
pci: Fix the definition of PCI_PM_CTRL_NO_SOFT_RESET.
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
16 years agopciback: Fix invalid use of pci_match_id()
Keir Fraser [Mon, 2 Mar 2009 10:57:56 +0000 (10:57 +0000)]
pciback: Fix invalid use of pci_match_id()

We cannot use pci_match_id() because the first argument (tmp_quirk->devid)
is not an array of pci device ids. Instead this patch adds a utility
function to compare a pci_device_id and a pci_dev.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
16 years agoACPI: Backport to support ACPI throttling s/w coordination
Keir Fraser [Mon, 2 Mar 2009 10:54:44 +0000 (10:54 +0000)]
ACPI: Backport to support ACPI throttling s/w coordination

commit 3abbd337c60591305cbfeb984ff2922c175be37f
Author: Zhao Yakui <yakui.zhao@intel.com>
Date:   Mon Jan 28 13:53:21 2008 +0800

    ACPI: Set _PSD ACPI_PDC_SMP_T_SWCOORD

    The ACPI_PDC_SMP_T_SWCOORD bit is set by and OS that is capable of
    native ACPI throttling software coordination for mutli-processors
    using the _TSD information.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Wei Gang <gang.wei@intel.com>
16 years agoACPI: Backport to get correct throtting info after evaluating _PDC
Keir Fraser [Mon, 2 Mar 2009 10:54:26 +0000 (10:54 +0000)]
ACPI: Backport to get correct throtting info after evaluating _PDC

commit 0ac3c571315a53c14d2733564f14ebdb911fe903
Author: Zhao Yakui <yakui.zhao@intel.com>
Date:   Thu Nov 15 17:05:46 2007 +0800

    ACPI: Get throttling info from BIOS only after evaluating _PDC

    Previously _PDC was evaluated later, and thus we'd not get
    the chance to tell the BIOS that we can suport FixedHW registers
    (MSRs)
    and the BIOS would always ask us to use System I/O access
    for throttling.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Li Shaohua <shaohua.li@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Wei Gang <gang.wei@intel.com>
16 years agoACPI: Backport missing part for T-State MSR support
Keir Fraser [Mon, 2 Mar 2009 10:53:59 +0000 (10:53 +0000)]
ACPI: Backport missing part for T-State MSR support

Part of below kernel commit was missed while packporting T-State
support.

commit f79f06ab9f86d7203006d2ec8992ac80df36a34e
Author: Zhao Yakui <yakui.zhao@intel.com>
Date:   Thu Nov 15 17:06:36 2007 +0800

    ACPI: Enable MSR (FixedHW) support for T-States

    Add throttling control via MSR when T-states uses
    the FixHW Control Status registers.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Li Shaohua <shaohua.li@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Wei Gang <gang.wei@intel.com>
16 years agolinux/x86: fix off-by-one error in the pirq range checks
Keir Fraser [Tue, 17 Feb 2009 11:31:13 +0000 (11:31 +0000)]
linux/x86: fix off-by-one error in the pirq range checks

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agoAdd the igb driver for dom0
Keir Fraser [Tue, 17 Feb 2009 11:25:51 +0000 (11:25 +0000)]
Add the igb driver for dom0

backport the driver from RHEL5.3 and make it work.

signed-off-by: Zhang Yang <yang.zhang@intel.com>

16 years agoAdd the e1000e driver for dom0
Keir Fraser [Tue, 17 Feb 2009 11:25:22 +0000 (11:25 +0000)]
Add the e1000e driver for dom0

backport the driver from RHEL5.3 and make it work.

signed-off-by: Zhang Yang <yang.zhang@intel.com>

16 years agopvSCSI: add new device assignment mode
Keir Fraser [Tue, 17 Feb 2009 11:17:11 +0000 (11:17 +0000)]
pvSCSI: add new device assignment mode

Add a new device assignment mode, which assigns whole HBA
(SCSI host) to guest domain. Current implementation requires SCSI
command emulation on backend driver, and it causes limitations for
some SCSI commands. (Please see
"http://www.xen.org/files/xensummit_tokyo/24_Hitoshi%20Matsumoto_en.pdf"
for detail about why we need the new assignment mode.

SCSI command emulation on backend driver is bypassed when "host" mode
is specified.

Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
16 years agonetback: make queue length parameter writeable in sysfs
Keir Fraser [Fri, 6 Feb 2009 12:01:56 +0000 (12:01 +0000)]
netback: make queue length parameter writeable in sysfs

Any changes will only take effect for newly created VIFs.

Also hook up the vif devices to their parent and publish bus info via
ethtool.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
16 years agonetback: add ethtool stat to track copied skbs.
Keir Fraser [Thu, 5 Feb 2009 15:24:46 +0000 (15:24 +0000)]
netback: add ethtool stat to track copied skbs.

Copied skbs should be rare but we have no way of verifying that.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
16 years agolinux: fix IRQ handling for PV passthrough
Keir Fraser [Wed, 4 Feb 2009 12:26:00 +0000 (12:26 +0000)]
linux: fix IRQ handling for PV passthrough

For DomU-s registering PIRQ-s must be done separately, as they don't
use the IO-APIC code.

Additionally make sure the IRQ chip doesn't get set twice (and the
event channel information overwritten) for an IRQ possibly in use by
more than one device.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agolinux: remove xen specific member from pci_dev
Keir Fraser [Wed, 4 Feb 2009 12:25:09 +0000 (12:25 +0000)]
linux: remove xen specific member from pci_dev

Move msi related variable irq_old out of struct pci_dev. This is
logically more consistent and has the additional benefit that xen
kernel and vanilla kernel now have the same pci_dev layout

Signed-off-by: Qing He <qing.he@intel.com>
16 years agofbfront: Improve diagnostics when kthread_run() fails
Keir Fraser [Tue, 3 Feb 2009 13:59:17 +0000 (13:59 +0000)]
fbfront: Improve diagnostics when kthread_run() fails

Failure is reported with xenbus_dev_fatal(..."register_framebuffer"),
which was already suboptimal before it got moved away from
register_framebuffer(), and is outright misleading now.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
16 years agoxenfb: Revert mm_lock changes. They're not needed.
Keir Fraser [Fri, 30 Jan 2009 10:54:10 +0000 (10:54 +0000)]
xenfb: Revert mm_lock changes. They're not needed.
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
16 years agonet: Intel ixgbe driver
Keir Fraser [Fri, 30 Jan 2009 10:52:47 +0000 (10:52 +0000)]
net: Intel ixgbe driver

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
16 years agomerge with linux-2.6.18-xen.hg
Isaku Yamahata [Fri, 30 Jan 2009 01:53:27 +0000 (10:53 +0900)]
merge with linux-2.6.18-xen.hg

16 years agoxenfb: eliminate the update_wanted field.
Keir Fraser [Thu, 29 Jan 2009 11:28:58 +0000 (11:28 +0000)]
xenfb: eliminate the update_wanted field.

Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
16 years agolinux/netback: unmap tx ring gref when mapping of rx ring gref failed
Keir Fraser [Wed, 28 Jan 2009 13:42:09 +0000 (13:42 +0000)]
linux/netback: unmap tx ring gref when mapping of rx ring gref failed

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agoxenfb: fix xenfb_update_screen bogus rect
Keir Fraser [Wed, 28 Jan 2009 13:41:33 +0000 (13:41 +0000)]
xenfb: fix xenfb_update_screen bogus rect
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agomerge with linux-2.6.18-xen.hg
Isaku Yamahata [Wed, 28 Jan 2009 04:07:23 +0000 (13:07 +0900)]
merge with linux-2.6.18-xen.hg

16 years ago[IA64] xencomm: support XEN_DOMCTL_[gs]et_address_size
Isaku Yamahata [Wed, 28 Jan 2009 03:27:28 +0000 (12:27 +0900)]
[IA64] xencomm: support XEN_DOMCTL_[gs]et_address_size

xencomm: support XEN_DOMCTL_[gs]et_address_size for dump-core.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
16 years agoFix !CONFIG_PM compilation problem
Keir Fraser [Tue, 20 Jan 2009 13:28:35 +0000 (13:28 +0000)]
Fix !CONFIG_PM compilation problem

Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
16 years agoMake CONFIG_PCI_GUESTDEV depend on ACPI
Keir Fraser [Tue, 20 Jan 2009 13:28:17 +0000 (13:28 +0000)]
Make CONFIG_PCI_GUESTDEV depend on ACPI

Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
16 years agopciback: Global 'permissive' module parameter.
Keir Fraser [Mon, 19 Jan 2009 16:25:17 +0000 (16:25 +0000)]
pciback: Global 'permissive' module parameter.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agogso: Ensure that the packet is long enough
Keir Fraser [Wed, 14 Jan 2009 14:04:07 +0000 (14:04 +0000)]
gso: Ensure that the packet is long enough

When we get a GSO packet from an untrusted source, we need to
ensure that it is sufficiently long so that we don't end up
crashing.

Based on discovery and patch by Ian Campbell.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
16 years agorevert: "netfront/back: do not mark packets of length < MSS as GSO"
Keir Fraser [Wed, 14 Jan 2009 14:03:42 +0000 (14:03 +0000)]
revert: "netfront/back: do not mark packets of length < MSS as GSO"

  changeset:   774:107e10e0e07c
  user:        Keir Fraser <keir.fraser@citrix.com>
  date:        Tue Jan 13 15:17:54 2009 +0000
  summary:     netfront/back: do not mark packets of length < MSS as GSO

Herbert Xu suggested a better fix in the network
stack which will follow.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
16 years agoSync Xen public memory.h header file.
Keir Fraser [Wed, 14 Jan 2009 11:44:54 +0000 (11:44 +0000)]
Sync Xen public memory.h header file.

Remove ia64 translations of removed hypercall structs.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agonetfront/back: do not mark packets of length < MSS as GSO
Keir Fraser [Tue, 13 Jan 2009 15:17:54 +0000 (15:17 +0000)]
netfront/back: do not mark packets of length < MSS as GSO

Linux assumes that skbs marked for GSO are longer than MSS. In
particular tcp_tso_segment assumes that skb_segment will return a
chain of at least 2 skbs.

Both netfront and back should therefor not pass such a packet up the
stack.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
16 years agomerge with linux-2.6.18-xen.hg
Isaku Yamahata [Wed, 7 Jan 2009 03:21:54 +0000 (12:21 +0900)]
merge with linux-2.6.18-xen.hg

16 years agoevtchn: Fix CPU offlining to switch all affected ports belonging to a
Keir Fraser [Mon, 5 Jan 2009 11:29:42 +0000 (11:29 +0000)]
evtchn: Fix CPU offlining to switch all affected ports belonging to a
particular /dev/evcthn user.

Original patch by James Harper <james.harper@bendigoit.com.au>

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agoCleanup function name relating resource reassignment.
Keir Fraser [Mon, 5 Jan 2009 10:54:36 +0000 (10:54 +0000)]
Cleanup function name relating resource reassignment.

Existing functions don't have "pci_" prefix. But they are part of PCI
driver. So the patch adds "pci_" prefix to them.

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
16 years agoBind PCI back driver to PCI device specified by "guestdev=".
Keir Fraser [Mon, 5 Jan 2009 10:54:08 +0000 (10:54 +0000)]
Bind PCI back driver to PCI device specified by "guestdev=".

This patch binds PCI back driver to PCI device specified by
"guestdev=" boot parameter.

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
16 years agoAdd "guestdev=" boot parameter.
Keir Fraser [Mon, 5 Jan 2009 10:53:44 +0000 (10:53 +0000)]
Add "guestdev=" boot parameter.

This patch adds "guestdev=" boot parameter. This boot parameter is
used to reassign page-aligned memory resource and bind PCI back driver.

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
16 years agoExpose HID, UID, SEG, BBN of PCI root bridge via sysfs.
Keir Fraser [Mon, 5 Jan 2009 10:53:06 +0000 (10:53 +0000)]
Expose HID, UID, SEG, BBN of PCI root bridge via sysfs.

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
16 years ago[IA64] xencomm: add PHYSDEVOP_pirq_eoi_gmfn support.
Isaku Yamahata [Mon, 5 Jan 2009 05:13:49 +0000 (14:13 +0900)]
[IA64] xencomm: add PHYSDEVOP_pirq_eoi_gmfn support.

This patch fixes some weird issues in upstream.
Dom0 uses one page shared with hypervisor to notify which pirqs need EOI
writes, but the page is set incorrectly for ia64 due to following reasons:
1. the related two hypercalls are not enabled in the correct way, so this page
is not really used by dom0 and hypervisor do nothing when dom0 writes eoi.

Signed-off-by : Xiantao Zhang <xiantao.zhang@intel.com>

16 years ago[IA64] clean up of xcom_hcall.c.
Isaku Yamahata [Mon, 5 Jan 2009 03:11:43 +0000 (12:11 +0900)]
[IA64] clean up of xcom_hcall.c.

make xencommize_xxx() calling convention consistent.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
16 years ago[IA64] add unwind info to xen_event_callback
Isaku Yamahata [Mon, 5 Jan 2009 02:32:31 +0000 (11:32 +0900)]
[IA64] add unwind info to xen_event_callback

Unwind info for xen_event_callback is missing.
This patch adds it.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
16 years agonetback: handle non-netback foreign pages
Keir Fraser [Thu, 18 Dec 2008 11:51:36 +0000 (11:51 +0000)]
netback: handle non-netback foreign pages

An SKB can contain pages which are foreign but not tracked by netback,
such as those created by gnttab_copy_grant_page when in
NETBK_DELAYED_COPY_SKB mode. These pages do not have a mapping field
which points to a valid offset in the pending_tx_info array.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
16 years agodom0: Enable C3 without bm control only for CST based C3
Keir Fraser [Sat, 13 Dec 2008 16:00:43 +0000 (16:00 +0000)]
dom0: Enable C3 without bm control only for CST based C3

commit ed3110efb538d7acbf635095c1382118f7414f75
Author: Venki Pallipadi <venkatesh.pallipadi@intel.com>
Date:   Tue Jul 31 12:04:31 2007 -0700

    ACPI: fix "Time Problems with 2.6.23-rc1-gf695baf2"

    Enable C3 without bm control only for CST based C3.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoadd hvc compatibility mode to xencons.
Ian Campbell [Thu, 11 Dec 2008 13:38:48 +0000 (13:38 +0000)]
add hvc compatibility mode to xencons.

Makes switching back and forth with a pvops kernel easier. Taken from
http://lists.alioth.debian.org/pipermail/pkg-xen-devel/2008-October/002098.html
http://svn.debian.org/viewsvn/kernel?rev=12337&view=rev with thanks to
Bastian Blank.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
16 years agoblktap, gntdev: fix highpte handling
Keir Fraser [Wed, 10 Dec 2008 13:32:32 +0000 (13:32 +0000)]
blktap, gntdev: fix highpte handling

In case of highpte, virt_to_machine() can't be used. Introduce
ptep_to_machine() and use it, also to simplify xen_l1_entry_update().

Original patch from: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agolinux/evtchn: allocate pirq_needs_eoi bitmap dynamically
Keir Fraser [Wed, 10 Dec 2008 13:31:38 +0000 (13:31 +0000)]
linux/evtchn: allocate pirq_needs_eoi bitmap dynamically

Original patch from: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agopvSCSI: fix slight issue
Keir Fraser [Wed, 10 Dec 2008 13:21:23 +0000 (13:21 +0000)]
pvSCSI: fix slight issue

Signed-off-by: James Harper <james.harper@bendigoit.com.au>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
16 years ago[PVSCSI] rmmod not supported
Keir Fraser [Tue, 9 Dec 2008 13:03:44 +0000 (13:03 +0000)]
[PVSCSI] rmmod not supported

Signed-off-by: James Harper <james.harper@bendigoit.com.au>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
16 years ago[PVSCSI] Fix some issues
Keir Fraser [Tue, 9 Dec 2008 13:03:14 +0000 (13:03 +0000)]
[PVSCSI] Fix some issues

Signed-off-by: James Harper <james.harper@bendigoit.com.au>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
16 years ago[PVSCSI] bug fix report_lun
Keir Fraser [Tue, 9 Dec 2008 13:02:38 +0000 (13:02 +0000)]
[PVSCSI] bug fix report_lun

Signed-off-by: James Harper <james.harper@bendigoit.com.au>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
16 years ago[PVSCSI] Fix sense_len
Keir Fraser [Tue, 9 Dec 2008 13:02:20 +0000 (13:02 +0000)]
[PVSCSI] Fix sense_len

Signed-off-by: James Harper <james.harper@bendigoit.com.au>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
16 years ago[LINUX][PVSCSI] add platform-compat.h
Keir Fraser [Tue, 9 Dec 2008 13:02:02 +0000 (13:02 +0000)]
[LINUX][PVSCSI] add platform-compat.h

Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
16 years agomerge with linux-2.6.18-xen.hg
Isaku Yamahata [Thu, 4 Dec 2008 02:02:17 +0000 (11:02 +0900)]
merge with linux-2.6.18-xen.hg

16 years agoevtchn, phydev: rename PHYSDEVOP_pirq_eoi_mfn to PHYSDEVOP_pirq_eoi_gmfn
Keir Fraser [Wed, 3 Dec 2008 11:54:23 +0000 (11:54 +0000)]
evtchn, phydev: rename PHYSDEVOP_pirq_eoi_mfn to PHYSDEVOP_pirq_eoi_gmfn

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agoIA64: xencomm support for multi call with physdev_op and event_channel_op.
Isaku Yamahata [Wed, 3 Dec 2008 02:38:32 +0000 (11:38 +0900)]
IA64: xencomm support for multi call with physdev_op and event_channel_op.

Recently the c/s of d545a95fca73 makes use of multi call
with __HYPERVISOR_event_channel_op and __HYPERVISOR_physdev_op.
This patch adds support of those hypercall.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
16 years agoFix buggy mask_base in saving/restoring MSI-X table during S3
Keir Fraser [Tue, 2 Dec 2008 11:54:47 +0000 (11:54 +0000)]
Fix buggy mask_base in saving/restoring MSI-X table during S3

Fix mask_base (actually MSI-X table base, copy name from native) to be
a virtual address rather than a physical address. And remove wrong
printk in pci_disable_msix.

Signed-off-by: Shan Haitao <haitao.shan@intel.com>
16 years agoevtchn: Fix the build.
Keir Fraser [Fri, 28 Nov 2008 13:41:38 +0000 (13:41 +0000)]
evtchn: Fix the build.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
16 years agolinux/x86: cleanup IO-APIC code
Keir Fraser [Fri, 28 Nov 2008 13:31:21 +0000 (13:31 +0000)]
linux/x86: cleanup IO-APIC code

- get 32-bit code in sync with 64-bit wrt ExtINT pin detection being
  unnecessary
- eliminate build warnings resulting from c/s 725

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agolinux/x86: revert the effect of xen_limit_pages_to_max_mfn()
Keir Fraser [Fri, 28 Nov 2008 13:30:58 +0000 (13:30 +0000)]
linux/x86: revert the effect of xen_limit_pages_to_max_mfn()

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agolinux/x86: use shared page indicating the need for an EOI notification
Keir Fraser [Fri, 28 Nov 2008 13:30:27 +0000 (13:30 +0000)]
linux/x86: use shared page indicating the need for an EOI notification

Signed-off-by: Jan Beulich <jbeulich@novell.com>
16 years agodom0 linux: Fix and cleanup reassigning memory resource code.
Keir Fraser [Fri, 28 Nov 2008 13:07:36 +0000 (13:07 +0000)]
dom0 linux: Fix and cleanup reassigning memory resource code.

When we use PCI pass-through, we have to assign page-aligned resources
to device. To do this, we round up the alignment to PAGE_SIZE, if
device is specified by "reassigndev=" boot parameter.

"pdev_sort_resources" function uses the alignment. But it does not
round up the alignment to PAGE_SIZE. This patch makes
"pdev_sort_resources" function round up the alignment to PAGE_SIZE.

"pbus_size_mem" function round up the alignment of bridge's resource
window as well as that of normal resource. But we don't need to do
this. This patch makes "pbus_size_mem" function exclude bridges's
resource window.

This patch also cleanups code of reassigning memory resource.

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
16 years agoMerge with ia64 tree.
Keir Fraser [Wed, 26 Nov 2008 11:13:49 +0000 (11:13 +0000)]
Merge with ia64 tree.