]> xenbits.xensource.com Git - people/ssmith/netchannel2-pvops.git/log
people/ssmith/netchannel2-pvops.git
15 years agoIntroduce a live_maps facility for tracking which domain foreign pages were mapped...
Steven Smith [Fri, 2 Oct 2009 15:52:00 +0000 (16:52 +0100)]
Introduce a live_maps facility for tracking which domain foreign pages were mapped from in a reasonably uniform way.

This isn't terribly useful at present, but will make it much easier to
forward mapped packets between domains when there are multiple drivers
loaded which can produce such packets (e.g. netback1 and netback2).

Signed-off-by: Steven Smith <steven.smith@citrix.com>
15 years agoxen/netback: use smart polling instead of event notification
Dongxiao Xu [Wed, 30 Sep 2009 06:37:41 +0000 (14:37 +0800)]
xen/netback: use smart polling instead of event notification

Netback will not notify netfront until it finds that the netfront has
stopped polling.

Netback will set a flag in xenstore to indicate whether netback
supports the smart polling feature.  If there is only one side
supporting it, the communication mechanism will fall back to default,
and the new feature will not be used. The feature is enabled only
when both sides have the flag set in xenstore.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen/netback: remove debug noise
Jeremy Fitzhardinge [Wed, 9 Sep 2009 22:19:15 +0000 (15:19 -0700)]
xen/netback: remove debug noise

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen/netback: reinstate missing code
Jeremy Fitzhardinge [Fri, 4 Sep 2009 21:55:43 +0000 (14:55 -0700)]
xen/netback: reinstate missing code

Change c3219dc868fe3e84070d6da2d0759a834b6f7251, "Completely drop flip
support" was a bit too aggressive in removing code, and removed a chunk
which was used for not only flip but if a buffer crossed a page boundary.
Reinstate that code.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agonetback: convert to net_device_ops
Jeremy Fitzhardinge [Mon, 29 Jun 2009 21:04:23 +0000 (14:04 -0700)]
netback: convert to net_device_ops

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen/netback: use dev_name() instead of removed ->bus_id.
Christophe Saout [Sun, 12 Apr 2009 11:40:27 +0000 (13:40 +0200)]
xen/netback: use dev_name() instead of removed ->bus_id.

Signed-off-by: Christophe Saout <chtephan@leto.intern.saout.de>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen/netback: document PKT_PROT_LEN
Jeremy Fitzhardinge [Sat, 21 Mar 2009 06:18:12 +0000 (23:18 -0700)]
xen/netback: document PKT_PROT_LEN

Document the rationale for the existence and value of PKT_PROT_LEN.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen/netback: move code around
Jeremy Fitzhardinge [Fri, 20 Mar 2009 05:30:24 +0000 (22:30 -0700)]
xen/netback: move code around

net_tx_action() into several functions; move variables into
their innermost scopes; rename "i" to "idx".

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen/netback: make netif_get/put inlines
Jeremy Fitzhardinge [Fri, 20 Mar 2009 05:28:52 +0000 (22:28 -0700)]
xen/netback: make netif_get/put inlines

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen/netback: remove CONFIG_XEN_NETDEV_PIPELINED_TRANSMITTER
Jeremy Fitzhardinge [Thu, 19 Mar 2009 22:48:10 +0000 (15:48 -0700)]
xen/netback: remove CONFIG_XEN_NETDEV_PIPELINED_TRANSMITTER

Keir says:
> > Does CONFIG_XEN_NETDEV_PIPELINED_TRANSMITTER need to be a config
> > option?  Could/should we always/never set it?
> It doesn't work well with local delivery into dom0, nor even with IP
> fragment reassembly. I don't think we would ever turn it on these days.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen/netback: pre-initialize list and spinlocks; use empty list to indicate not on...
Jeremy Fitzhardinge [Thu, 19 Mar 2009 22:45:45 +0000 (15:45 -0700)]
xen/netback: pre-initialize list and spinlocks; use empty list to indicate not on list

Statically pre-initialize net_schedule_list head and lock.

Use an empty list to mark when a xen_netif is not on the schedule list,
rather than NULL (which may upset list debugging).

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen/netback: rename NR_PENDING_REQS to nr_pending_reqs()
Jeremy Fitzhardinge [Thu, 19 Mar 2009 22:31:32 +0000 (15:31 -0700)]
xen/netback: rename NR_PENDING_REQS to nr_pending_reqs()

Use function syntax to show its actually computing a value, rather than
a constant.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen/netback: convert PEND_RING_IDX into a proper typedef name
Jeremy Fitzhardinge [Thu, 19 Mar 2009 22:29:30 +0000 (15:29 -0700)]
xen/netback: convert PEND_RING_IDX into a proper typedef name

Rename PEND_RING_IDX to pending_ring_idx_t.  Its not used that much,
the extra typing won't kill anyone.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen/netback: demacro MASK_PEND_IDX
Jeremy Fitzhardinge [Thu, 19 Mar 2009 22:19:39 +0000 (15:19 -0700)]
xen/netback: demacro MASK_PEND_IDX

Replace it with a more meaningful inline: pending_index().

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen/netback: completely drop flip support
Jeremy Fitzhardinge [Thu, 19 Mar 2009 20:31:26 +0000 (13:31 -0700)]
xen/netback: completely drop flip support

Nobody uses it?

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen/netback: use NET_SKB_PAD rather than "16"
Jeremy Fitzhardinge [Thu, 19 Mar 2009 19:42:36 +0000 (12:42 -0700)]
xen/netback: use NET_SKB_PAD rather than "16"

There's a constant for the default skb headroom.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agonetback: parent sysfs device should be set before registering.
Ian Campbell [Mon, 16 Mar 2009 22:05:16 +0000 (22:05 +0000)]
netback: parent sysfs device should be set before registering.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
15 years agonetback: make queue length parameter writeable in sysfs
Ian Campbell [Fri, 6 Mar 2009 08:29:33 +0000 (08:29 +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.

[ijc-ported from linux-2.6.18-xen.hg 793:3aa9b8a7876b]
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
15 years agonetback: add ethtool stat to track copied skbs.
Ian Campbell [Fri, 6 Mar 2009 08:29:32 +0000 (08:29 +0000)]
netback: add ethtool stat to track copied skbs.

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

[ijc-ported from linux-2.6.18-xen.hg 792:db9857bb0320]
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
15 years agolinux/netback: unmap tx ring gref when mapping of rx ring gref failed
Jan Beulich [Fri, 6 Mar 2009 08:29:31 +0000 (08:29 +0000)]
linux/netback: unmap tx ring gref when mapping of rx ring gref failed

[ijc-ported from linux-2.6.18-xen.hg 782:51decc39e5e7]
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
15 years agoxen/netback: use mod_timer
Jeremy Fitzhardinge [Wed, 18 Feb 2009 23:55:18 +0000 (15:55 -0800)]
xen/netback: use mod_timer

__mod_timer is no longer a public API.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen/netback: don't include xen/evtchn.h
Jeremy Fitzhardinge [Tue, 10 Feb 2009 00:39:01 +0000 (16:39 -0800)]
xen/netback: don't include xen/evtchn.h

Its a usermode header for users of /dev/evtchn

Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org>
15 years agoxen-add-multicall-index-defines
Jeremy Fitzhardinge [Mon, 9 Feb 2009 20:05:52 +0000 (12:05 -0800)]
xen-add-multicall-index-defines

15 years agoxen-netback-porting
Jeremy Fitzhardinge [Mon, 9 Feb 2009 20:05:52 +0000 (12:05 -0800)]
xen-netback-porting

15 years agoxen-netback
Jeremy Fitzhardinge [Mon, 9 Feb 2009 20:05:52 +0000 (12:05 -0800)]
xen-netback

15 years agoxen-add-foreign-page-flag
Jeremy Fitzhardinge [Mon, 9 Feb 2009 20:05:52 +0000 (12:05 -0800)]
xen-add-foreign-page-flag

15 years agoxen-add-gnttab_copy_grant_page
Jeremy Fitzhardinge [Mon, 9 Feb 2009 20:05:52 +0000 (12:05 -0800)]
xen-add-gnttab_copy_grant_page

15 years agoxen-fix-types-in-xen.h
Jeremy Fitzhardinge [Mon, 9 Feb 2009 20:05:51 +0000 (12:05 -0800)]
xen-fix-types-in-xen.h

15 years agoxen/xenbus: make frontend bus GPL
Jeremy Fitzhardinge [Fri, 27 Mar 2009 23:29:44 +0000 (16:29 -0700)]
xen/xenbus: make frontend bus GPL

Make sure frontend xenbus has a GPL module license, so it can access
all the xenbus symbols exported GPL only.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen/netfront: select XEN_XENBUS_FRONTEND
Jeremy Fitzhardinge [Fri, 27 Mar 2009 23:28:34 +0000 (16:28 -0700)]
xen/netfront: select XEN_XENBUS_FRONTEND

Make sure the Xen frontend xenbus is enabled.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen/xenbus: making backend support modular is too complex
Jeremy Fitzhardinge [Sun, 22 Mar 2009 06:29:34 +0000 (23:29 -0700)]
xen/xenbus: making backend support modular is too complex

Impact: build fix

Making the xenbus backend support a separate module is needlessly complex
and causes build failures.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen/xenbus: make sure backend bus is registered earlier
Jeremy Fitzhardinge [Thu, 5 Mar 2009 06:32:16 +0000 (22:32 -0800)]
xen/xenbus: make sure backend bus is registered earlier

Impact: bugfix

Need to register it before any drivers want to attach.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxenbus/frontend: register bus earlier
Jeremy Fitzhardinge [Thu, 5 Mar 2009 06:31:45 +0000 (22:31 -0800)]
xenbus/frontend: register bus earlier

Impact: bugfix

Make sure the frontend bus is registered early, before
any drivers want to attach.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen: remove xen/evtchn.h
Jeremy Fitzhardinge [Tue, 10 Feb 2009 00:37:23 +0000 (16:37 -0800)]
xen: remove xen/evtchn.h

Impact: cleanup

It's a usermode header for users of /dev/evtchn.

Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org>
15 years agoxen: add backend driver support
Ian Campbell [Mon, 9 Feb 2009 20:05:51 +0000 (12:05 -0800)]
xen: add backend driver support

Impact: backend device support

Add the basic machinery to support backend drivers.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen: export set_phys_to_machine
Ian Campbell [Mon, 9 Feb 2009 20:05:51 +0000 (12:05 -0800)]
xen: export set_phys_to_machine

Impact: export Xen API to modules

It is used by the backend drivers. get_phys_to_machine is already
exported.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
15 years agoxen: separate out frontend xenbus
Ian Campbell [Mon, 9 Feb 2009 20:05:51 +0000 (12:05 -0800)]
xen: separate out frontend xenbus

Impact: refactor

Make a distinct frontend xenbus, in preparation for adding a backend xenbus.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen: Include xen/interface/xen.h in grant_table.h
Ian Campbell [Mon, 9 Feb 2009 20:05:50 +0000 (12:05 -0800)]
xen: Include xen/interface/xen.h in grant_table.h

Impact: compile fix

otherwise build fails with CONFIG_XEN_DOM0=n

In file included from /local/scratch/ianc/devel/kernels/paravirt/include/xen/grant_table.h:41,
                 from /local/scratch/ianc/devel/kernels/paravirt/drivers/pci/xen-iommu.c:13:
/local/scratch/ianc/devel/kernels/paravirt/include/xen/interface/grant_table.h:96: error: expected specifier-qualifier-list before 'domid_t'

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
15 years agoxen: implement bind_interdomain_evtchn_to_irqhandler for backend drivers
Ian Campbell [Mon, 9 Feb 2009 20:05:50 +0000 (12:05 -0800)]
xen: implement bind_interdomain_evtchn_to_irqhandler for backend drivers

Impact: new Xen-internal API

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen: define alloc_empty_pages_and_pagevec
Ian Campbell [Mon, 9 Feb 2009 20:05:49 +0000 (12:05 -0800)]
xen: define alloc_empty_pages_and_pagevec

Impact: new Xen-internal API

This is used by backend to allocate memory regions.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen: define gnttab_set_map_op/unmap_op
Ian Campbell [Mon, 9 Feb 2009 20:05:49 +0000 (12:05 -0800)]
xen: define gnttab_set_map_op/unmap_op

Impact: hypercall definitions

These functions populate the gnttab data structures used by the
granttab map and unmap ops and are used in the backend drivers.

Originally xen-unstable.hg 9625:c3bb51c443a7

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen: define BIOVEC_PHYS_MERGEABLE()
Jeremy Fitzhardinge [Mon, 9 Feb 2009 20:05:46 +0000 (12:05 -0800)]
xen: define BIOVEC_PHYS_MERGEABLE()

Impact: allow Xen control of bio merging

When running in Xen domain with device access, we need to make sure
the block subsystem doesn't merge requests across pages which aren't
machine physically contiguous.  To do this, we define our own
BIOVEC_PHYS_MERGEABLE.  When CONFIG_XEN isn't enabled, or we're not
running in a Xen domain, this has identical behaviour to the normal
implementation.  When running under Xen, we also make sure the
underlying machine pages are the same or adjacent.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen: Allow unprivileged Xen domains to create iomap pages
Alex Nixon [Mon, 9 Feb 2009 20:05:46 +0000 (12:05 -0800)]
xen: Allow unprivileged Xen domains to create iomap pages

PV DomU domains are allowed to map hardware MFNs for PCI passthrough,
but are not generally allowed to map raw machine pages.  In particular,
various pieces of code try to map DMI and ACPI tables in the ISA ROM
range.  We disallow _PAGE_IOMAP for those mappings, so that they are
redirected to a set of local zeroed pages we reserve for that purpose.

[ Impact: prevent passthrough of ISA space, as we only allow PCI ]

Signed-off-by: Alex Nixon <alex.nixon@citrix.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen: Don't disable the I/O space
Alex Nixon [Mon, 9 Feb 2009 20:05:46 +0000 (12:05 -0800)]
xen: Don't disable the I/O space

If a guest domain wants to access PCI devices through the frontend
driver (coming later in the patch series), it will need access to the
I/O space.

[ Impact: Allow for domU IO access, preparing for pci passthrough ]

Signed-off-by: Alex Nixon <alex.nixon@citrix.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agox86/mtrr: add missing asm/mtrr.h
Jeremy Fitzhardinge [Fri, 19 Jun 2009 18:51:36 +0000 (11:51 -0700)]
x86/mtrr: add missing asm/mtrr.h

Include asm/mtrr.h for MTRR_MAX_VAR_RANGES definition.

[ Impact: compile fix ]

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen mtrr: Add xen_{get,set}_mtrr() implementations
Mark McLoughlin [Tue, 29 Jan 2008 17:43:25 +0000 (17:43 +0000)]
xen mtrr: Add xen_{get,set}_mtrr() implementations

Straightforward apart from the hack to turn mtrr_ops->set()
into a no-op on all but one CPU.

[ Impact: complete Xen mtrr implementation ]

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen: set cpu_callout_mask to make mtrr work
Jeremy Fitzhardinge [Tue, 24 Feb 2009 01:56:29 +0000 (17:56 -0800)]
xen: set cpu_callout_mask to make mtrr work

The mtrr code uses num_booting_cpus() to manage its corrdinated mtrr update,
which in turn depends on cpu_callout_mask.

[ Impact: bugfix; make /proc/mtrr writes work in Xen ]
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen/mtrr: Add mtrr_if support for Xen mtrr
Stephen Tweedie [Thu, 18 Jun 2009 23:54:24 +0000 (16:54 -0700)]
xen/mtrr: Add mtrr_if support for Xen mtrr

Add a Xen mtrr type, and reorganise mtrr initialisation slightly to
allow the mtrr driver to set up num_var_ranges (Xen needs to do this by
querying the hypervisor itself.)

Only the boot path is handled for now: we set up a xen-specific mtrr_if
and set up the mtrr tables based on hypervisor information, but we don't
yet handle mtrr entry add/delete.

[ Impact: add basic MTRR support (enough to get started) ]

Signed-off-by: Stephen Tweedie <sct@redhat.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agox86/mtrr: Extend mtrr_if to include num_var_ranges
Stephen Tweedie [Sat, 7 Feb 2009 03:09:47 +0000 (19:09 -0800)]
x86/mtrr: Extend mtrr_if to include num_var_ranges

Reorganise mtrr initialisation slightly to allow the mtrr driver to
set up num_var_ranges.  This cleans things up by making each driver
return the number of ranges rather than having a single function with
magic knowledge.

[ Impact: clean up num_var_ranges operation ]

Signed-off-by: Stephen Tweedie <sct@redhat.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen: implement IO permission bitmap
Jeremy Fitzhardinge [Thu, 18 Jun 2009 22:04:16 +0000 (15:04 -0700)]
xen: implement IO permission bitmap

Add Xen implementation of IO permission bitmap pvop.

[ Impact: allow guests to set usermode IO permission bitmaps. ]

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agox86: don't need "changed" parameter for set_io_bitmap()
Jeremy Fitzhardinge [Fri, 20 Feb 2009 22:25:23 +0000 (14:25 -0800)]
x86: don't need "changed" parameter for set_io_bitmap()

The "changed" parameter isn't really used, so don't bother passing it.

[ Impact: cleanup ]

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agox86/paravirt: paravirtualize IO permission bitmap
Christophe Saout [Sat, 17 Jan 2009 16:30:17 +0000 (17:30 +0100)]
x86/paravirt: paravirtualize IO permission bitmap

Paravirtualized x86 systems don't have an exposed TSS, as it is only
directly visible in ring 0.  The IO permission bitmap is part of
the TSS, so with out a TSS, it must be paravirtualized separately,
like the iopl mask.

[ Impact: make ioperm bitmap work under Xen ]

Signed-off-by: Christophe Saout <chtephan@leto.intern.saout.de>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agox86: make /dev/mem mappings _PAGE_IOMAP
Jeremy Fitzhardinge [Fri, 20 Feb 2009 21:42:11 +0000 (13:42 -0800)]
x86: make /dev/mem mappings _PAGE_IOMAP

Use _PAGE_IOMAP on /dev/mem mappings.

[ Impact: allow hardware to be mapped via /dev/mem in Xen ]

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen/dom0: add XEN_DOM0 config option
Jeremy Fitzhardinge [Mon, 9 Feb 2009 20:05:49 +0000 (12:05 -0800)]
xen/dom0: add XEN_DOM0 config option

Allow dom0 to be configured.  Requires more patches to do something useful.
Also announce whether we're running dom0 as part of xen boot message.

[ Impact: add Kconfig to enable XEN_DOM0 ]

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen/i386: make sure initial VGA/ISA mappings are not overridden
Jeremy Fitzhardinge [Mon, 27 Apr 2009 20:03:13 +0000 (13:03 -0700)]
xen/i386: make sure initial VGA/ISA mappings are not overridden

arch/x86/mm/init_32.c overrides the ISA/VGA mappings with direct mappings
which do not have _PAGE_IOMAP set, thereby making the ISA space inaccessible.

This patch adds to the existing hack to make sure the pre-constructed
ISA mappings are not incorrectly overwritten.

Thanks to Gerd Hoffman for pointing this out.

[ Impact: Makes 32-bit dom0 VGA work properly. ]

Diagnosed-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen: allow enable use of VGA console on dom0
Jeremy Fitzhardinge [Mon, 9 Feb 2009 20:05:54 +0000 (12:05 -0800)]
xen: allow enable use of VGA console on dom0

Get the information about the VGA console hardware from Xen, and put
it into the form the bootloader normally generates, so that the rest
of the kernel can deal with VGA as usual.

[ Impact: make VGA console work in dom0 ]

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen: clear reserved bits in l3 entries given in the initial pagetables
Ian Campbell [Sat, 7 Feb 2009 03:17:22 +0000 (19:17 -0800)]
xen: clear reserved bits in l3 entries given in the initial pagetables

In native PAE, the only flag that may be legitimately set in an L3
entry is Present.  When Xen grafts the top-level PAE L3 pagetable
entries into the L4 pagetable, it must also set the other permissions
flags so that the mapped pages are actually accessible.

However, due to a bug in the hypervisor, it validates update to the L3
entries as formal PAE entries, so it will refuse to validate these
entries with the extra bits requires for 4-level pagetables.

This patch simply masks the entries back to the bare PAE level,
leaving Xen to add whatever bits it feels are necessary.

[ Impact: workaround Xen bug in 32-on-64 dom0 ]

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen: implement XENMEM_machphys_mapping
Ian Campbell [Sat, 7 Feb 2009 03:15:40 +0000 (19:15 -0800)]
xen: implement XENMEM_machphys_mapping

This hypercall allows Xen to specify a non-default location for the
machine to physical mapping. This capability is used when running a 32
bit domain 0 on a 64 bit hypervisor to shrink the hypervisor hole to
exactly the size required.

[ Impact: add Xen hypercall definitions ]

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen/dom0: Use host E820 map
Ian Campbell [Sat, 7 Feb 2009 03:09:48 +0000 (19:09 -0800)]
xen/dom0: Use host E820 map

Unlike the non-paravirt Xen port we do not have distinct psuedo-physical
and I/O memory resource-spaces and therefore resources in the two
can clash. Fix this by registering a memory map which matches the
underlying I/O map. Currently this wastes the memory in the reserved
regions. Eventually we should remap this memory to the end of the
address space.

[ Impact: synthesize virtual E820 using real one as template ]

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen/dom0: use _PAGE_IOMAP in ioremap to do machine mappings
Jeremy Fitzhardinge [Sat, 7 Feb 2009 03:09:47 +0000 (19:09 -0800)]
xen/dom0: use _PAGE_IOMAP in ioremap to do machine mappings

In a Xen domain, ioremap operates on machine addresses, not
pseudo-physical addresses.  We use _PAGE_IOMAP to determine whether a
mapping is intended for machine addresses.

[ Impact: allow Xen domain to map real hardware ]

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen: disable PAT via cpuid
Jeremy Fitzhardinge [Thu, 18 Jun 2009 23:28:23 +0000 (16:28 -0700)]
xen: disable PAT via cpuid

We don't currently support guest PAT usage (Xen's PAT layout is different
from Linux's), so disable it in CPUID.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen dom0: Add support for the platform_ops hypercall
Stephen Tweedie [Sat, 7 Feb 2009 03:09:47 +0000 (19:09 -0800)]
xen dom0: Add support for the platform_ops hypercall

Minimal changes to get platform ops (renamed dom0_ops on pv_ops) working
on pv_ops builds.  Pulls in upstream linux-2.6.18-xen.hg's platform.h

[ Impact: add Xen hypercall definitions ]

Signed-off-by: Stephen Tweedie <sct@redhat.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
15 years agoxen dom0: Set up basic IO permissions for dom0.
Juan Quintela [Sat, 7 Feb 2009 03:09:46 +0000 (19:09 -0800)]
xen dom0: Set up basic IO permissions for dom0.

Add the direct mapping area for ISA bus access, and enable IO space
access for the guest when running as dom0.

[ Impact: set iopl for dom0 kernel; map ISA ]

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
15 years agoxen dom0: Initialize xenbus for dom0.
Juan Quintela [Sat, 7 Feb 2009 03:09:46 +0000 (19:09 -0800)]
xen dom0: Initialize xenbus for dom0.

Do initial xenbus/xenstore setup in dom0.  In dom0 we need to actually
allocate the xenstore resources, rather than being given them from
outside.

[ Impact: initialize Xenbus ]

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
15 years agoxen dom0: Make hvc_xen console work for dom0.
Jeremy Fitzhardinge [Sat, 7 Feb 2009 03:09:46 +0000 (19:09 -0800)]
xen dom0: Make hvc_xen console work for dom0.

Use the console hypercalls for dom0 console.

[ Impact: Add Xen dom0 console ]
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
15 years agoMerge branch 'kmemleak' of git://linux-arm.org/linux-2.6
Linus Torvalds [Wed, 17 Jun 2009 17:42:21 +0000 (10:42 -0700)]
Merge branch 'kmemleak' of git://linux-arm.org/linux-2.6

* 'kmemleak' of git://linux-arm.org/linux-2.6:
  kmemleak: Fix some typos in comments
  kmemleak: Rename kmemleak_panic to kmemleak_stop
  kmemleak: Only use GFP_KERNEL|GFP_ATOMIC for the internal allocations

15 years agokmemleak: Fix some typos in comments
Catalin Marinas [Wed, 17 Jun 2009 17:29:04 +0000 (18:29 +0100)]
kmemleak: Fix some typos in comments

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
15 years agokmemleak: Rename kmemleak_panic to kmemleak_stop
Catalin Marinas [Wed, 17 Jun 2009 17:29:03 +0000 (18:29 +0100)]
kmemleak: Rename kmemleak_panic to kmemleak_stop

This is to avoid the confusion created by the "panic" word.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
15 years agokmemleak: Only use GFP_KERNEL|GFP_ATOMIC for the internal allocations
Catalin Marinas [Wed, 17 Jun 2009 17:29:02 +0000 (18:29 +0100)]
kmemleak: Only use GFP_KERNEL|GFP_ATOMIC for the internal allocations

Kmemleak allocates memory for pointer tracking and it tries to avoid
using GFP_ATOMIC if the caller doesn't require it. However other gfp
flags may be passed by the caller which aren't required by kmemleak.
This patch filters the gfp flags so that only GFP_KERNEL | GFP_ATOMIC
are used.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
15 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq
Linus Torvalds [Wed, 17 Jun 2009 16:51:50 +0000 (09:51 -0700)]
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
  [CPUFREQ] cpumask: new cpumask operators for arch/x86/kernel/cpu/cpufreq/powernow-k8.c
  [CPUFREQ] cpumask: avoid playing with cpus_allowed in powernow-k8.c
  [CPUFREQ] cpumask: avoid cpumask games in arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c
  [CPUFREQ] cpumask: avoid playing with cpus_allowed in speedstep-ich.c
  [CPUFREQ] powernow-k8: get drv data for correct CPU
  [CPUFREQ] powernow-k8: read P-state from HW
  [CPUFREQ] reduce scope of ACPI_PSS_BIOS_BUG_MSG[]
  [CPUFREQ] Clean up convoluted code in arch/x86/kernel/tsc.c:time_cpufreq_notifier()
  [CPUFREQ] minor correction to cpu-freq documentation
  [CPUFREQ] powernow-k8.c: mess cleanup
  [CPUFREQ] Only set sampling_rate_max deprecated, sampling_rate_min is useful
  [CPUFREQ] powernow-k8: Set transition latency to 1 if ACPI tables export 0
  [CPUFREQ] ondemand: Uncouple minimal sampling rate from HZ in NO_HZ case

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
Linus Torvalds [Wed, 17 Jun 2009 16:50:44 +0000 (09:50 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6:
  [SCSI] aic79xx: make driver respect nvram for IU and QAS settings
  [SCSI] don't attach ULD to Dell Universal Xport
  [SCSI] lpfc 8.3.3 : Update driver version to 8.3.3
  [SCSI] lpfc 8.3.3 : Add support for Target Reset handler entrypoint
  [SCSI] lpfc 8.3.3 : Fix a couple of spin_lock and memory issues and a crash
  [SCSI] lpfc 8.3.3 : FC/FCOE discovery fixes
  [SCSI] lpfc 8.3.3 : Fix various SLI-3 vs SLI-4 differences
  [SCSI] qla2xxx: Resolve a performance issue in interrupt
  [SCSI] cnic, bnx2i: Fix build failure when CONFIG_PCI is not set.
  [SCSI] nsp_cs: time_out reaches -1
  [SCSI] qla2xxx: fix printk format warnings
  [SCSI] ncr53c8xx: div reaches -1
  [SCSI] compat: don't perform unneeded copy in sg_io code
  [SCSI] zfcp: Update FC pass-through support
  [SCSI] zfcp: Add FC pass-through support
  [SCSI] FC Pass Thru support

15 years agoMerge branch 'linux-next' of git://git.infradead.org/ubi-2.6
Linus Torvalds [Wed, 17 Jun 2009 16:48:30 +0000 (09:48 -0700)]
Merge branch 'linux-next' of git://git.infradead.org/ubi-2.6

* 'linux-next' of git://git.infradead.org/ubi-2.6: (21 commits)
  UBI: add reboot notifier
  UBI: handle more error codes
  UBI: fix multiple spelling typos
  UBI: fix kmem_cache_free on error patch
  UBI: print amount of reserved PEBs
  UBI: improve messages in the WL worker
  UBI: make gluebi a separate module
  UBI: remove built-in gluebi
  UBI: add notification API
  UBI: do not switch to R/O mode on read errors
  UBI: fix and clean-up error paths in WL worker
  UBI: introduce new constants
  UBI: fix race condition
  UBI: minor serialization fix
  UBI: do not panic if volume check fails
  UBI: add dump_stack in checking code
  UBI: fix races in I/O debugging checks
  UBI: small debugging code optimization
  UBI: improve debugging messages
  UBI: re-name volumes_mutex to device_mutex
  ...

15 years agoMerge branch 'linux-next' of git://git.infradead.org/ubifs-2.6
Linus Torvalds [Wed, 17 Jun 2009 16:46:33 +0000 (09:46 -0700)]
Merge branch 'linux-next' of git://git.infradead.org/ubifs-2.6

* 'linux-next' of git://git.infradead.org/ubifs-2.6:
  UBIFS: start using hrtimers
  hrtimer: export ktime_add_safe
  UBIFS: do not forget to register BDI device
  UBIFS: allow sync option in rootflags
  UBIFS: remove dead code
  UBIFS: use anonymous device
  UBIFS: return proper error code if the compr is not present
  UBIFS: return error if link and unlink race
  UBIFS: reset no_space flag after inode deletion

15 years agoDocumentation/vm/Makefile: don't try to build slqbinfo
Andrew Morton [Wed, 17 Jun 2009 05:38:29 +0000 (22:38 -0700)]
Documentation/vm/Makefile: don't try to build slqbinfo

For it is only in linux-next at this stage.

Cc: Wu Fengguang <fengguang.wu@intel.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Matt Mackall <mpm@selenic.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodrm/radeon/kms: remove the _DRM_DRIVER from the KMS paths.
Dave Airlie [Wed, 17 Jun 2009 07:21:13 +0000 (17:21 +1000)]
drm/radeon/kms: remove the _DRM_DRIVER from the KMS paths.

This causes an issue since we fixed the drm mappings to do the right thing,
so its just a copy and pasto.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg...
Linus Torvalds [Wed, 17 Jun 2009 16:41:25 +0000 (09:41 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6:
  SLUB: Fix early boot GFP_DMA allocations
  SLUB: Don't print out OOM warning for __GFP_NOFAIL
  SLUB: fix build when !SLUB_DEBUG
  SLUB: Out-of-memory diagnostics
  slab: document kzfree() zeroing behavior
  slab: fix generic PAGE_POISONING conflict with SLAB_RED_ZONE
  slob: use PG_slab for identifying SLOB pages

15 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Wed, 17 Jun 2009 16:13:52 +0000 (09:13 -0700)]
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (47 commits)
  MIPS: Add hibernation support
  MIPS: Move Cavium CP0 hwrena impl bits to cpu-feature-overrides.h
  MIPS: Allow CPU specific overriding of CP0 hwrena impl bits.
  MIPS: Kconfig Add SYS_SUPPORTS_HUGETLBFS and enable it for some systems.
  Hugetlbfs: Enable hugetlbfs for more systems in Kconfig.
  MIPS: TLB support for hugetlbfs.
  MIPS: Add hugetlbfs page defines.
  MIPS: Add support files for hugetlbfs.
  MIPS: Remove unused parameters from iPTE_LW.
  Staging: Add octeon-ethernet driver files.
  MIPS: Export erratum function needed by octeon-ethernet driver.
  MIPS: Cavium-Octeon: Add more chip specific feature tests.
  MIPS: Cavium-Octeon: Add more board type constants.
  MIPS: Export cvmx_sysinfo_get needed by octeon-ethernet driver.
  MIPS: Add named alloc functions to OCTEON boot monitor memory allocator.
  MIPS: Alchemy: devboards: Convert to gpio calls.
  MIPS: Alchemy: xxs1500: use linux gpio api.
  MIPS: Alchemy: MTX-1: Use linux gpio api.
  MIPS: Alchemy: Rewrite GPIO support.
  MIPS: Alchemy: Remove unused au1000_gpio.h header
  ...

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
Linus Torvalds [Wed, 17 Jun 2009 15:46:57 +0000 (08:46 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
  get rid of BKL in fs/sysv
  get rid of BKL in fs/minix
  get rid of BKL in fs/efs
  befs ->pust_super() doesn't need BKL
  Cleanup of adfs headers
  9P doesn't need BKL in ->umount_begin()
  fuse doesn't need BKL in ->umount_begin()
  No instance of ->bmap() needs BKL
  remove unlock_kernel() left accidentally
  ext4: avoid unnecessary spinlock in critical POSIX ACL path
  ext3: avoid unnecessary spinlock in critical POSIX ACL path

15 years agoMIPS: Add hibernation support
Wu Zhangjin [Thu, 4 Jun 2009 12:27:10 +0000 (20:27 +0800)]
MIPS: Add hibernation support

[Ralf: SMP support requires CPU hotplugging which MIPS currently doesn't
support.  As implemented in this patch cache and tlb flushing will also be
invoked with interrupts disabled so smp_call_function() will blow up in
charming ways.  So limit to !SMP.]

Reviewed-by: Pavel Machek <pavel@ucw.cz>
Reviewed-by: Yan Hua <yanh@lemote.com>
Reviewed-by: Arnaud Patard <apatard@mandriva.com>
Reviewed-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Wu Zhangjin <wuzj@lemote.com>
Signed-off-by: Hu Hongbing <huhb@lemote.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Move Cavium CP0 hwrena impl bits to cpu-feature-overrides.h
David Daney [Wed, 13 May 2009 22:59:56 +0000 (15:59 -0700)]
MIPS: Move Cavium CP0 hwrena impl bits to cpu-feature-overrides.h

We had an ugly #ifdef for Cavium Octeon hwrena bits in traps.c, remove
it to mach-cavium-octeon/cpu-feature-overrides.h

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Allow CPU specific overriding of CP0 hwrena impl bits.
David Daney [Wed, 13 May 2009 22:59:55 +0000 (15:59 -0700)]
MIPS: Allow CPU specific overriding of CP0 hwrena impl bits.

Some CPUs have implementation dependent rdhwr registers.  Allow them
to be enabled on a per CPU basis.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Kconfig Add SYS_SUPPORTS_HUGETLBFS and enable it for some systems.
David Daney [Thu, 28 May 2009 00:47:46 +0000 (17:47 -0700)]
MIPS: Kconfig Add SYS_SUPPORTS_HUGETLBFS and enable it for some systems.

Add new kconfig variables SYS_SUPPORTS_HUGETLBFS and
CPU_SUPPORTS_HUGEPAGES.  They are enabled for systems that are known
to support huge pages.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoHugetlbfs: Enable hugetlbfs for more systems in Kconfig.
David Daney [Thu, 28 May 2009 00:47:45 +0000 (17:47 -0700)]
Hugetlbfs: Enable hugetlbfs for more systems in Kconfig.

As part of adding hugetlbfs support for MIPS, I am adding a new
kconfig variable 'SYS_SUPPORTS_HUGETLBFS'.  Since some mips cpu
varients don't yet support it, we can enable selection of HUGETLBFS on
a system by system basis from the arch/mips/Kconfig.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
CC: William Irwin <wli@holomorphy.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: TLB support for hugetlbfs.
David Daney [Thu, 28 May 2009 00:47:44 +0000 (17:47 -0700)]
MIPS: TLB support for hugetlbfs.

The TLB handlers need to check for huge pages and give them special
handling.  Huge pages consist of two contiguous sub-pages of physical
memory.

* Loading entrylo0 and entrylo1 need to be handled specially.

* The page mask must be set for huge pages and then restored after
  writing the TLB entries.

* The PTE for huge pages resides in the PMD, we halt traversal of the
  tables there.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Add hugetlbfs page defines.
David Daney [Thu, 28 May 2009 00:47:43 +0000 (17:47 -0700)]
MIPS: Add hugetlbfs page defines.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Add support files for hugetlbfs.
David Daney [Thu, 28 May 2009 00:47:42 +0000 (17:47 -0700)]
MIPS: Add support files for hugetlbfs.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Remove unused parameters from iPTE_LW.
David Daney [Fri, 8 May 2009 22:10:50 +0000 (15:10 -0700)]
MIPS: Remove unused parameters from iPTE_LW.

The l parameter to iPTE_LW() is unused. Remove it and from some of its
callers as well.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoStaging: Add octeon-ethernet driver files.
David Daney [Wed, 6 May 2009 00:35:21 +0000 (17:35 -0700)]
Staging: Add octeon-ethernet driver files.

The octeon-ethernet driver supports the sgmii, rgmii, spi, and xaui
ports present on the Cavium OCTEON family of SOCs.  These SOCs are
multi-core mips64 processors with existing support over in arch/mips.

The driver files can be categorized into three basic groups:

1) Register definitions, these are named cvmx-*-defs.h

2) Main driver code, these have names that don't start cvmx-.

3) Interface specific functions and other utility code, names starting
with cvmx-

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Export erratum function needed by octeon-ethernet driver.
David Daney [Wed, 6 May 2009 00:35:20 +0000 (17:35 -0700)]
MIPS: Export erratum function needed by octeon-ethernet driver.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Cavium-Octeon: Add more chip specific feature tests.
David Daney [Wed, 6 May 2009 00:35:19 +0000 (17:35 -0700)]
MIPS: Cavium-Octeon: Add more chip specific feature tests.

The octeon-ethernet driver needs to check for additional chip specific
features, we add them to the octeon_has_feature() framework.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Cavium-Octeon: Add more board type constants.
David Daney [Wed, 6 May 2009 00:35:18 +0000 (17:35 -0700)]
MIPS: Cavium-Octeon: Add more board type constants.

The bootloader now uses additional board type constants.  The
octeon-ethernet driver needs some of the new values.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Export cvmx_sysinfo_get needed by octeon-ethernet driver.
David Daney [Wed, 6 May 2009 00:35:17 +0000 (17:35 -0700)]
MIPS: Export cvmx_sysinfo_get needed by octeon-ethernet driver.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Add named alloc functions to OCTEON boot monitor memory allocator.
David Daney [Wed, 6 May 2009 00:35:16 +0000 (17:35 -0700)]
MIPS: Add named alloc functions to OCTEON boot monitor memory allocator.

The various Octeon ethernet drivers use these new functions.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Alchemy: devboards: Convert to gpio calls.
Manuel Lauss [Sat, 6 Jun 2009 12:09:58 +0000 (14:09 +0200)]
MIPS: Alchemy: devboards: Convert to gpio calls.

Replace a few open-coded GPIO register accesses with gpio calls.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Alchemy: xxs1500: use linux gpio api.
Manuel Lauss [Sat, 6 Jun 2009 12:09:57 +0000 (14:09 +0200)]
MIPS: Alchemy: xxs1500: use linux gpio api.

Replace a few GPIO register accesses in the board init code with calls to
the gpio api.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Alchemy: MTX-1: Use linux gpio api.
Manuel Lauss [Sat, 6 Jun 2009 12:09:56 +0000 (14:09 +0200)]
MIPS: Alchemy: MTX-1: Use linux gpio api.

Replace a few GPIO register accesses in the board init code with calls
to the gpio api.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Alchemy: Rewrite GPIO support.
Manuel Lauss [Sat, 6 Jun 2009 12:09:55 +0000 (14:09 +0200)]
MIPS: Alchemy: Rewrite GPIO support.

The current in-kernel Alchemy GPIO support is far too inflexible for
all my use cases.  To address this, the following changes are made:

* create generic functions which deal with manipulating the on-chip
  GPIO1/2 blocks.  Such functions are universally useful.
* Macros for GPIO2 shared interrupt management and block control.
* support for both built-in CONFIG_GPIOLIB and fast, inlined GPIO macros.

  If CONFIG_GPIOLIB is not enabled, provide linux gpio framework
  compatibility by directly inlining the GPIO1/2 functions.  GPIO access
  is limited to on-chip ones and they can be accessed as documented in
  the datasheets (GPIO0-31 and 200-215).

  If CONFIG_GPIOLIB is selected, two (2) gpio_chip-s, one for GPIO1 and
  one for GPIO2, are registered.  GPIOs can still be accessed by using
  the numberspace established in the databooks.

  However this is not yet flexible enough for my uses:  My Alchemy
  systems have a documented "external" gpio interface (fixed, different
  numberspace) and can support a variety of baseboards, some of which
  are equipped with I2C gpio expanders.  I want to be able to provide
  the default 16 GPIOs of the CPU board numbered as 0..15 and also
  support gpio expanders, if present, starting as gpio16.

  To achieve this, a new Kconfig symbol for Alchemy is introduced,
  CONFIG_ALCHEMY_GPIO_INDIRECT, which boards can enable to signal
  that they don't want the Alchemy numberspace exposed to the outside
  world, but instead want to provide their own.  Boards are now respon-
  sible for providing the linux gpio interface glue code (either in a
  custom gpio.h header (in board include directory) or with gpio_chips).

  To make the board-specific inlined gpio functions work, the MIPS
  Makefile must be changed so that the mach-au1x00/gpio.h header is
  included _after_ the board headers, by moving the inclusion of
  the mach-au1x00/ to the end of the header list.

  See arch/mips/include/asm/mach-au1x00/gpio.h for more info.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Acked-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Alchemy: Remove unused au1000_gpio.h header
Manuel Lauss [Sat, 6 Jun 2009 12:09:54 +0000 (14:09 +0200)]
MIPS: Alchemy: Remove unused au1000_gpio.h header

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: BCM47xx: Fix gpio_direction_output
Matthieu Castet [Sun, 24 May 2009 17:48:51 +0000 (19:48 +0200)]
MIPS: BCM47xx: Fix gpio_direction_output

gpio_direction_output should also set an output value according to the API.

Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
Acked-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: ioctl.h: Cleanup.
Ralf Baechle [Wed, 17 Jun 2009 10:06:28 +0000 (11:06 +0100)]
MIPS: ioctl.h: Cleanup.

 o Rewrite to use <asm-generic/ioctl.h>.  Cuts down the file from 40 to
   16 lines.
 o Delete _IOC_VOID, _IOC_OUT, _IOC_IN and _IOC_INOUT.  They were added
   for 2.1.14 but I was not able to find any user - not even historical
   ones.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>