firefly-linux-kernel-4.4.55.git
16 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Wed, 18 Jul 2007 17:24:36 +0000 (10:24 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (24 commits)
  [NETFILTER]: xt_connlimit needs to depend on nf_conntrack
  [NETFILTER]: ipt_iprange.h must #include <linux/types.h>
  [IrDA]: Fix IrDA build failure
  [ATM]: nicstar needs virt_to_bus
  [NET]: move __dev_addr_discard adjacent to dev_addr_discard for readability
  [NET]: merge dev_unicast_discard and dev_mc_discard into one
  [NET]: move dev_mc_discard from dev_mcast.c to dev.c
  [NETLINK]: negative groups in netlink_setsockopt
  [PPPOL2TP]: Reset meta-data in xmit function
  [PPPOL2TP]: Fix use-after-free
  [PKT_SCHED]: Some typo fixes in net/sched/Kconfig
  [XFRM]: Fix crash introduced by struct dst_entry reordering
  [TCP]: remove unused argument to cong_avoid op
  [ATM]: [idt77252] Rename CONFIG_ATM_IDT77252_SEND_IDLE to not resemble a Kconfig variable
  [ATM]: [drivers] ioremap balanced with iounmap
  [ATM]: [lanai] sram_test_word() must be __devinit
  [ATM]: [nicstar] Replace C code with call to ARRAY_SIZE() macro.
  [ATM]: Eliminate dead config variable CONFIG_BR2684_FAST_TRANS.
  [ATM]: Replacing kmalloc/memset combination with kzalloc.
  [NET]: gen_estimator deadlock fix
  ...

16 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Wed, 18 Jul 2007 17:23:37 +0000 (10:23 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/sparc-2.6

* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: Set vio->desc_buf to NULL after freeing.
  [SPARC]: Mark sparc and sparc64 as not having virt_to_bus
  [SPARC64]: Fix reset handling in VNET driver.
  [SPARC64]: Handle reset events in vio_link_state_change().
  [SPARC64]: Handle LDC resets properly in domain-services driver.
  [SPARC64]: Massively simplify VIO device layer and support hot add/remove.
  [SPARC64]: Simplify VNET probing.
  [SPARC64]: Simplify VDC device probing.
  [SPARC64]: Add basic infrastructure for MD add/remove notification.

16 years agoMerge branch 'xen-upstream' of ssh://master.kernel.org/pub/scm/linux/kernel/git/jerem...
Linus Torvalds [Wed, 18 Jul 2007 17:18:39 +0000 (10:18 -0700)]
Merge branch 'xen-upstream' of ssh:///linux/kernel/git/jeremy/xen

* 'xen-upstream' of ssh://master.kernel.org/pub/scm/linux/kernel/git/jeremy/xen: (44 commits)
  xen: disable all non-virtual drivers
  xen: use iret directly when possible
  xen: suppress abs symbol warnings for unused reloc pointers
  xen: Attempt to patch inline versions of common operations
  xen: Place vcpu_info structure into per-cpu memory
  xen: handle external requests for shutdown, reboot and sysrq
  xen: machine operations
  xen: add virtual network device driver
  xen: add virtual block device driver.
  xen: add the Xenbus sysfs and virtual device hotplug driver
  xen: Add grant table support
  xen: use the hvc console infrastructure for Xen console
  xen: hack to prevent bad segment register reload
  xen: lazy-mmu operations
  xen: Add support for preemption
  xen: SMP guest support
  xen: Implement sched_clock
  xen: Account for stolen time
  xen: ignore RW mapping of RO pages in pagetable_init
  xen: Complete pagetable pinning
  ...

16 years agoRevert "[POWERPC] Do firmware feature fixups after features are initialised"
Tony Breeds [Wed, 18 Jul 2007 06:17:48 +0000 (16:17 +1000)]
Revert "[POWERPC] Do firmware feature fixups after features are initialised"

This reverts commit 5a26f6bbb767d7ad23311a1e81cfdd2bebefb855.

The original patch causes boot failures when built with ppc64_defconfig.  The
quickest fix is to revert it while alterates are investigated.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoFix compile failure in arch/powerpc/kernel/pci-common.c
Tony Breeds [Wed, 18 Jul 2007 01:03:55 +0000 (11:03 +1000)]
Fix compile failure in arch/powerpc/kernel/pci-common.c

This fixes the fallout from the recent powerpc merge (commit
489de30259e667d7bc47da9da44a0270b050cd97):

   CC      arch/powerpc/kernel/pci-common.o
  arch/powerpc/kernel/pci-common.c:160: error: conflicting types for 'pcibios_add_platform_entries'
  include/linux/pci.h:889: error: previous declaration of 'pcibios_add_platform_entries' was here

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Tested-by: Bret Towe <magnade@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoxen: disable all non-virtual drivers
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:07 +0000 (18:37 -0700)]
xen: disable all non-virtual drivers

A domU Xen environment has no non-virtual drivers, so make sure
they're all disabled at once.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
16 years agoxen: use iret directly when possible
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:07 +0000 (18:37 -0700)]
xen: use iret directly when possible

Most of the time we can simply use the iret instruction to exit the
kernel, rather than having to use the iret hypercall - the only
exception is if we're returning into vm86 mode, or from delivering an
NMI (which we don't support yet).

When running native, iret has the behaviour of testing for a pending
interrupt atomically with re-enabling interrupts.  Unfortunately
there's no way to do this with Xen, so there's a window in which we
could get a recursive exception after enabling events but before
actually returning to userspace.

This causes a problem: if the nested interrupt causes one of the
task's TIF_WORK_MASK flags to be set, they will not be checked again
before returning to userspace.  This means that pending work may be
left pending indefinitely, until the process enters and leaves the
kernel again.  The net effect is that a pending signal or reschedule
event could be delayed for an unbounded amount of time.

To deal with this, the xen event upcall handler checks to see if the
EIP is within the critical section of the iret code, after events
are (potentially) enabled up to the iret itself.  If its within this
range, it calls the iret critical section fixup, which adjusts the
stack to deal with any unrestored registers, and then shifts the
stack frame up to replace the previous invocation.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
16 years agoxen: suppress abs symbol warnings for unused reloc pointers
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:07 +0000 (18:37 -0700)]
xen: suppress abs symbol warnings for unused reloc pointers

arch/i386/xen/xen-asm.S defines some small pieces of code which are
used to implement a few paravirt_ops.  They're designed so they can be
used either in-place, or be inline patched into their callsites if
there's enough space.

Some of those operations need to make calls out (specifically, if you
re-enable events [interrupts], and there's a pending event at that
time).  These calls need the call instruction to be relocated if the
code is patched inline.  In this case xen_foo_reloc is a
section-relative symbol which points to xen_foo's required relocation.

Other operations have no need of a relocation, and so their
corresponding xen_bar_reloc is absolute 0.  These are the cases which
are triggering the warning.

This patch adds those symbols to the list of safe abs symbols.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Adrian Bunk <bunk@stusta.de>
16 years agoxen: Attempt to patch inline versions of common operations
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:07 +0000 (18:37 -0700)]
xen: Attempt to patch inline versions of common operations

This patchs adds the mechanism to allow us to patch inline versions of
common operations.

The implementations of the direct-access versions save_fl, restore_fl,
irq_enable and irq_disable are now in assembler, and the same code is
used for both out of line and inline uses.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Chris Wright <chrisw@sous-sol.org>
Cc: Keir Fraser <keir@xensource.com>
16 years agoxen: Place vcpu_info structure into per-cpu memory
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:07 +0000 (18:37 -0700)]
xen: Place vcpu_info structure into per-cpu memory

An experimental patch for Xen allows guests to place their vcpu_info
structs anywhere.  We try to use this to place the vcpu_info into the
PDA, which allows direct access.

If this works, then switch to using direct access operations for
irq_enable, disable, save_fl and restore_fl.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Chris Wright <chrisw@sous-sol.org>
Cc: Keir Fraser <keir@xensource.com>
16 years agoxen: handle external requests for shutdown, reboot and sysrq
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:07 +0000 (18:37 -0700)]
xen: handle external requests for shutdown, reboot and sysrq

The guest domain can be asked to shutdown or reboot itself, or have a
sysrq key injected, via xenbus.  This patch adds a watcher for those
events, and does the appropriate action.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Chris Wright <chrisw@sous-sol.org>
16 years agoxen: machine operations
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:07 +0000 (18:37 -0700)]
xen: machine operations

Make the appropriate hypercalls to halt and reboot the virtual machine.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Acked-by: Chris Wright <chrisw@sous-sol.org>
16 years agoxen: add virtual network device driver
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:06 +0000 (18:37 -0700)]
xen: add virtual network device driver

The network device frontend driver allows the kernel to access network
devices exported exported by a virtual machine containing a physical
network device driver.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Acked-by: Jeff Garzik <jeff@garzik.org>
Cc: Ian Pratt <ian.pratt@xensource.com>
Cc: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Cc: Stephen Hemminger <shemminger@linux-foundation.org>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: netdev@vger.kernel.org
16 years agoxen: add virtual block device driver.
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:06 +0000 (18:37 -0700)]
xen: add virtual block device driver.

The block device frontend driver allows the kernel to access block
devices exported exported by a virtual machine containing a physical
block device driver.

Signed-off-by: Ian Pratt <ian.pratt@xensource.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Cc: Arjan van de Ven <arjan@infradead.org>
Cc: Greg KH <greg@kroah.com>
Cc: Jens Axboe <axboe@kernel.dk>
16 years agoxen: add the Xenbus sysfs and virtual device hotplug driver
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:06 +0000 (18:37 -0700)]
xen: add the Xenbus sysfs and virtual device hotplug driver

This communicates with the machine control software via a registry
residing in a controlling virtual machine. This allows dynamic
creation, destruction and modification of virtual device
configurations (network devices, block devices and CPUS, to name some
examples).

[ Greg, would you mind giving this a review?  Thanks -J ]

Signed-off-by: Ian Pratt <ian.pratt@xensource.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Cc: Greg KH <greg@kroah.com>
16 years agoxen: Add grant table support
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:06 +0000 (18:37 -0700)]
xen: Add grant table support

Add Xen 'grant table' driver which allows granting of access to
selected local memory pages by other virtual machines and,
symmetrically, the mapping of remote memory pages which other virtual
machines have granted access to.

This driver is a prerequisite for many of the Xen virtual device
drivers, which grant the 'device driver domain' restricted and
temporary access to only those memory pages that are currently
involved in I/O operations.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Ian Pratt <ian.pratt@xensource.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
16 years agoxen: use the hvc console infrastructure for Xen console
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:06 +0000 (18:37 -0700)]
xen: use the hvc console infrastructure for Xen console

Implement a Xen back-end for hvc console.

* * *
Add early printk support via hvc console, enable using
"earlyprintk=xen" on the kernel command line.

From: Gerd Hoffmann <kraxel@suse.de>
Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Olof Johansson <olof@lixom.net>
16 years agoxen: hack to prevent bad segment register reload
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:06 +0000 (18:37 -0700)]
xen: hack to prevent bad segment register reload

The hypervisor saves and restores the segment registers as part of the
state is saves while context switching.  If, during a context switch,
the next process doesn't use the TLS segments, it invalidates the GDT
entry, causing the segment register reload to fault.  This fault
effectively doubles the cost of a context switch.

This patch is a band-aid workaround which clears the usermode %gs
after it has been saved for the previous process, but before it gets
reloaded for the next, and it avoids having the hypervisor attempt to
erroneously reload it.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
16 years agoxen: lazy-mmu operations
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:06 +0000 (18:37 -0700)]
xen: lazy-mmu operations

This patch uses the lazy-mmu hooks to batch mmu operations where
possible.  This is primarily useful for batching operations applied to
active pagetables, which happens during mprotect, munmap, mremap and
the like (mmap does not do bulk pagetable operations, so it isn't
helped).

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Acked-by: Chris Wright <chrisw@sous-sol.org>
16 years agoxen: Add support for preemption
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:06 +0000 (18:37 -0700)]
xen: Add support for preemption

Add Xen support for preemption.  This is mostly a cleanup of existing
preempt_enable/disable calls, or just comments to explain the current
usage.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
16 years agoxen: SMP guest support
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:06 +0000 (18:37 -0700)]
xen: SMP guest support

This is a fairly straightforward Xen implementation of smp_ops.

Xen has its own IPI mechanisms, and has no dependency on any
APIC-based IPI.  The smp_ops hooks and the flush_tlb_others pv_op
allow a Xen guest to avoid all APIC code in arch/i386 (the only apic
operation is a single apic_read for the apic version number).

One subtle point which needs to be addressed is unpinning pagetables
when another cpu may have a lazy tlb reference to the pagetable. Xen
will not allow an in-use pagetable to be unpinned, so we must find any
other cpus with a reference to the pagetable and get them to shoot
down their references.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Cc: Benjamin LaHaise <bcrl@kvack.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Andi Kleen <ak@suse.de>
16 years agoxen: Implement sched_clock
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:05 +0000 (18:37 -0700)]
xen: Implement sched_clock

Implement xen_sched_clock, which returns the number of ns the current
vcpu has been actually in an unstolen state (ie, running or blocked,
vs runnable-but-not-running, or offline) since boot.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Acked-by: Chris Wright <chrisw@sous-sol.org>
Cc: john stultz <johnstul@us.ibm.com>
16 years agoxen: Account for stolen time
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:05 +0000 (18:37 -0700)]
xen: Account for stolen time

This patch accounts for the time stolen from our VCPUs.  Stolen time is
time where a vcpu is runnable and could be running, but all available
physical CPUs are being used for something else.

This accounting gets run on each timer interrupt, just as a way to get
it run relatively often, and when interesting things are going on.
Stolen time is not really used by much in the kernel; it is reported
in /proc/stats, and that's about it.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Acked-by: Chris Wright <chrisw@sous-sol.org>
Cc: john stultz <johnstul@us.ibm.com>
Cc: Rik van Riel <riel@redhat.com>
16 years agoxen: ignore RW mapping of RO pages in pagetable_init
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:05 +0000 (18:37 -0700)]
xen: ignore RW mapping of RO pages in pagetable_init

When setting up the initial pagetable, which includes mappings of all
low physical memory, ignore a mapping which tries to set the RW bit on
an RO pte.  An RO pte indicates a page which is part of the current
pagetable, and so it cannot be allowed to become RW.

Once xen_pagetable_setup_done is called, set_pte reverts to its normal
behaviour.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Acked-by: Chris Wright <chrisw@sous-sol.org>
Cc: ebiederm@xmission.com (Eric W. Biederman)
16 years agoxen: Complete pagetable pinning
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:05 +0000 (18:37 -0700)]
xen: Complete pagetable pinning

Xen requires all active pagetables to be marked read-only.  When the
base of the pagetable is loaded into %cr3, the hypervisor validates
the entire pagetable and only allows the load to proceed if it all
checks out.

This is pretty slow, so to mitigate this cost Xen has a notion of
pinned pagetables.  Pinned pagetables are pagetables which are
considered to be active even if no processor's cr3 is pointing to is.
This means that it must remain read-only and all updates are validated
by the hypervisor.  This makes context switches much cheaper, because
the hypervisor doesn't need to revalidate the pagetable each time.

This also adds a new paravirt hook which is called during setup once
the zones and memory allocator have been initialized.  When the
init_mm pagetable is first built, the struct page array does not yet
exist, and so there's nowhere to put he init_mm pagetable's PG_pinned
flags.  Once the zones are initialized and the struct page array
exists, we can set the PG_pinned flags for those pages.

This patch also adds the Xen support for pte pages allocated out of
highmem (highpte) by implementing xen_kmap_atomic_pte.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Cc: Zach Amsden <zach@vmware.com>
16 years agoxen: add pinned page flag
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:05 +0000 (18:37 -0700)]
xen: add pinned page flag

Add a new definition for PG_owner_priv_1 to define PG_pinned on Xen
pagetable pages.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
16 years agoxen: configuration
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:05 +0000 (18:37 -0700)]
xen: configuration

Put config options for Xen after the core pieces are in place.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
16 years agoxen: time implementation
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:05 +0000 (18:37 -0700)]
xen: time implementation

Xen maintains a base clock which measures nanoseconds since system
boot.  This is provided to guests via a shared page which contains a
base time in ns, a tsc timestamp at that point and tsc frequency
parameters.  Guests can compute the current time by reading the tsc
and using it to extrapolate the current time from the basetime.  The
hypervisor makes sure that the frequency parameters are updated
regularly, paricularly if the tsc changes rate or stops.

This is implemented as a clocksource, so the interface to the rest of
the kernel is a simple clocksource which simply returns the current
time directly in nanoseconds.

Xen also provides a simple timer mechanism, which allows a timeout to
be set in the future.  When that time arrives, a timer event is sent
to the guest.  There are two timer interfaces:
 - An old one which also delivers a stream of (unused) ticks at 100Hz,
   and on the same event, the actual timer events.  The 100Hz ticks
   cause a lot of spurious wakeups, but are basically harmless.
 - The new timer interface doesn't have the 100Hz ticks, and can also
   fail if the specified time is in the past.

This code presents the Xen timer as a clockevent driver, and uses the
new interface by preference.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
16 years agoxen: event channels
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:05 +0000 (18:37 -0700)]
xen: event channels

Xen implements interrupts in terms of event channels.  Each guest
domain gets 1024 event channels which can be used for a variety of
purposes, such as Xen timer events, inter-domain events,
inter-processor events (IPI) or for real hardware IRQs.

Within the kernel, we map the event channels to IRQs, and implement
the whole interrupt handling using a Xen irq_chip.

Rather than setting NR_IRQ to 1024 under PARAVIRT in order to
accomodate Xen, we create a dynamic mapping between event channels and
IRQs.  Ideally, Linux will eventually move towards dynamically
allocating per-irq structures, and we can use a 1:1 mapping between
event channels and irqs.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Eric W. Biederman <ebiederm@xmission.com>
16 years agoxen: virtual mmu
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:04 +0000 (18:37 -0700)]
xen: virtual mmu

Xen pagetable handling, including the machinery to implement direct
pagetables.

Xen presents the real CPU's pagetables directly to guests, with no
added shadowing or other layer of abstraction.  Naturally this means
the hypervisor must maintain close control over what the guest can put
into the pagetable.

When the guest modifies the pte/pmd/pgd, it must convert its
domain-specific notion of a "physical" pfn into a global machine frame
number (mfn) before inserting the entry into the pagetable.  Xen will
check to make sure the domain is allowed to create a mapping of the
given mfn.

Xen also requires that all mappings the guest has of its own active
pagetable are read-only.  This is relatively easy to implement in
Linux because all pagetables share the same pte pages for kernel
mappings, so updating the pte in one pagetable will implicitly update
the mapping in all pagetables.

Normally a pagetable becomes active when you point to it with cr3 (or
the Xen equivalent), but when you do so, Xen must check the whole
pagetable for correctness, which is clearly a performance problem.

Xen solves this with pinning which keeps a pagetable effectively
active even if its currently unused, which means that all the normal
update rules are enforced.  This means that it need not revalidate the
pagetable when loading cr3.

This patch has a first-cut implementation of pinning, but it is more
fully implemented in a later patch.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
16 years agoxen: Core Xen implementation
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:04 +0000 (18:37 -0700)]
xen: Core Xen implementation

This patch is a rollup of all the core pieces of the Xen
implementation, including:
 - booting and setup
 - pagetable setup
 - privileged instructions
 - segmentation
 - interrupt flags
 - upcalls
 - multicall batching

BOOTING AND SETUP

The vmlinux image is decorated with ELF notes which tell the Xen
domain builder what the kernel's requirements are; the domain builder
then constructs the address space accordingly and starts the kernel.

Xen has its own entrypoint for the kernel (contained in an ELF note).
The ELF notes are set up by xen-head.S, which is included into head.S.
In principle it could be linked separately, but it seems to provoke
lots of binutils bugs.

Because the domain builder starts the kernel in a fairly sane state
(32-bit protected mode, paging enabled, flat segments set up), there's
not a lot of setup needed before starting the kernel proper.  The main
steps are:
  1. Install the Xen paravirt_ops, which is simply a matter of a
     structure assignment.
  2. Set init_mm to use the Xen-supplied pagetables (analogous to the
     head.S generated pagetables in a native boot).
  3. Reserve address space for Xen, since it takes a chunk at the top
     of the address space for its own use.
  4. Call start_kernel()

PAGETABLE SETUP

Once we hit the main kernel boot sequence, it will end up calling back
via paravirt_ops to set up various pieces of Xen specific state.  One
of the critical things which requires a bit of extra care is the
construction of the initial init_mm pagetable.  Because Xen places
tight constraints on pagetables (an active pagetable must always be
valid, and must always be mapped read-only to the guest domain), we
need to be careful when constructing the new pagetable to keep these
constraints in mind.  It turns out that the easiest way to do this is
use the initial Xen-provided pagetable as a template, and then just
insert new mappings for memory where a mapping doesn't already exist.

This means that during pagetable setup, it uses a special version of
xen_set_pte which ignores any attempt to remap a read-only page as
read-write (since Xen will map its own initial pagetable as RO), but
lets other changes to the ptes happen, so that things like NX are set
properly.

PRIVILEGED INSTRUCTIONS AND SEGMENTATION

When the kernel runs under Xen, it runs in ring 1 rather than ring 0.
This means that it is more privileged than user-mode in ring 3, but it
still can't run privileged instructions directly.  Non-performance
critical instructions are dealt with by taking a privilege exception
and trapping into the hypervisor and emulating the instruction, but
more performance-critical instructions have their own specific
paravirt_ops.  In many cases we can avoid having to do any hypercalls
for these instructions, or the Xen implementation is quite different
from the normal native version.

The privileged instructions fall into the broad classes of:
  Segmentation: setting up the GDT and the GDT entries, LDT,
     TLS and so on.  Xen doesn't allow the GDT to be directly
     modified; all GDT updates are done via hypercalls where the new
     entries can be validated.  This is important because Xen uses
     segment limits to prevent the guest kernel from damaging the
     hypervisor itself.
  Traps and exceptions: Xen uses a special format for trap entrypoints,
     so when the kernel wants to set an IDT entry, it needs to be
     converted to the form Xen expects.  Xen sets int 0x80 up specially
     so that the trap goes straight from userspace into the guest kernel
     without going via the hypervisor.  sysenter isn't supported.
  Kernel stack: The esp0 entry is extracted from the tss and provided to
     Xen.
  TLB operations: the various TLB calls are mapped into corresponding
     Xen hypercalls.
  Control registers: all the control registers are privileged.  The most
     important is cr3, which points to the base of the current pagetable,
     and we handle it specially.

Another instruction we treat specially is CPUID, even though its not
privileged.  We want to control what CPU features are visible to the
rest of the kernel, and so CPUID ends up going into a paravirt_op.
Xen implements this mainly to disable the ACPI and APIC subsystems.

INTERRUPT FLAGS

Xen maintains its own separate flag for masking events, which is
contained within the per-cpu vcpu_info structure.  Because the guest
kernel runs in ring 1 and not 0, the IF flag in EFLAGS is completely
ignored (and must be, because even if a guest domain disables
interrupts for itself, it can't disable them overall).

(A note on terminology: "events" and interrupts are effectively
synonymous.  However, rather than using an "enable flag", Xen uses a
"mask flag", which blocks event delivery when it is non-zero.)

There are paravirt_ops for each of cli/sti/save_fl/restore_fl, which
are implemented to manage the Xen event mask state.  The only thing
worth noting is that when events are unmasked, we need to explicitly
see if there's a pending event and call into the hypervisor to make
sure it gets delivered.

UPCALLS

Xen needs a couple of upcall (or callback) functions to be implemented
by each guest.  One is the event upcalls, which is how events
(interrupts, effectively) are delivered to the guests.  The other is
the failsafe callback, which is used to report errors in either
reloading a segment register, or caused by iret.  These are
implemented in i386/kernel/entry.S so they can jump into the normal
iret_exc path when necessary.

MULTICALL BATCHING

Xen provides a multicall mechanism, which allows multiple hypercalls
to be issued at once in order to mitigate the cost of trapping into
the hypervisor.  This is particularly useful for context switches,
since the 4-5 hypercalls they would normally need (reload cr3, update
TLS, maybe update LDT) can be reduced to one.  This patch implements a
generic batching mechanism for hypercalls, which gets used in many
places in the Xen code.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Cc: Ian Pratt <ian.pratt@xensource.com>
Cc: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Cc: Adrian Bunk <bunk@stusta.de>
16 years agoxen: Add Xen interface header files
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:04 +0000 (18:37 -0700)]
xen: Add Xen interface header files

Add Xen interface header files. These are taken fairly directly from
the Xen tree, but somewhat rearranged to suit the kernel's conventions.

Define macros and inline functions for doing hypercalls into the
hypervisor.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Ian Pratt <ian.pratt@xensource.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
16 years agoAdd nosegneg capability to the vsyscall page notes
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:04 +0000 (18:37 -0700)]
Add nosegneg capability to the vsyscall page notes

Add the "nosegneg" fake capabilty to the vsyscall page notes. This is
used by the runtime linker to select a glibc version which then
disables negative-offset accesses to the thread-local segment via
%gs. These accesses require emulation in Xen (because segments are
truncated to protect the hypervisor address space) and avoiding them
provides a measurable performance boost.

Signed-off-by: Ian Pratt <ian.pratt@xensource.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Acked-by: Zachary Amsden <zach@vmware.com>
Cc: Roland McGrath <roland@redhat.com>
Cc: Ulrich Drepper <drepper@redhat.com>
16 years agoAdd a sched_clock paravirt_op
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:04 +0000 (18:37 -0700)]
Add a sched_clock paravirt_op

The tsc-based get_scheduled_cycles interface is not a good match for
Xen's runstate accounting, which reports everything in nanoseconds.

This patch replaces this interface with a sched_clock interface, which
matches both Xen and VMI's requirements.

In order to do this, we:
   1. replace get_scheduled_cycles with sched_clock
   2. hoist cycles_2_ns into a common header
   3. update vmi accordingly

One thing to note: because sched_clock is implemented as a weak
function in kernel/sched.c, we must define a real function in order to
override this weak binding.  This means the usual paravirt_ops
technique of using an inline function won't work in this case.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Zachary Amsden <zach@vmware.com>
Cc: Dan Hecht <dhecht@vmware.com>
Cc: john stultz <johnstul@us.ibm.com>
16 years agoparavirt: helper to disable all IO space
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:04 +0000 (18:37 -0700)]
paravirt: helper to disable all IO space

In a virtual environment, device drivers such as legacy IDE will waste
quite a lot of time probing for their devices which will never appear.
This helper function allows a paravirt implementation to lay claim to
the whole iomem and ioport space, thereby disabling all device drivers
trying to claim IO resources.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
16 years agoAllocate and free vmalloc areas
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:04 +0000 (18:37 -0700)]
Allocate and free vmalloc areas

Allocate/release a chunk of vmalloc address space:
 alloc_vm_area reserves a chunk of address space, and makes sure all
 the pagetables are constructed for that address range - but no pages.

 free_vm_area releases the address space range.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Ian Pratt <ian.pratt@xensource.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Cc: "Jan Beulich" <JBeulich@novell.com>
Cc: "Andi Kleen" <ak@muc.de>
16 years agoparavirt: export __supported_pte_mask
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:04 +0000 (18:37 -0700)]
paravirt: export __supported_pte_mask

__supported_pte_mask is needed when constructing pte values.  Xen
device drivers need to do this to make mappings of foreign pages (ie,
pages granted to us by other domains).

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
16 years agoparavirt: make siblingmap functions visible
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:03 +0000 (18:37 -0700)]
paravirt: make siblingmap functions visible

Paravirt implementations need to set the sibling map on new cpus.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
16 years agoparavirt: unstatic smp_store_cpu_info
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:03 +0000 (18:37 -0700)]
paravirt: unstatic smp_store_cpu_info

Paravirt implementations need to store cpu info when bringing up cpus.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
16 years agoparavirt: unstatic leave_mm
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:03 +0000 (18:37 -0700)]
paravirt: unstatic leave_mm

Make globally leave_mm visible, specifically so that Xen can use it to
shoot-down lazy uses of cr3.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
16 years agoparavirt: increase IRQ limit
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:03 +0000 (18:37 -0700)]
paravirt: increase IRQ limit

When running with CONFIG_PARAVIRT, we may want lots of IRQs even if
there's no IO APIC.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
16 years agoparavirt: add a hook for once the allocator is ready
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:03 +0000 (18:37 -0700)]
paravirt: add a hook for once the allocator is ready

Add a hook so that the paravirt backend knows when the allocator is
ready.  This is useful for the obvious reason that the allocator is
available, but the other side-effect of having the bootmem allocator
available is that each page now has an associated "struct page".

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
16 years agoparavirt: add an "mm" argument to alloc_pt
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:03 +0000 (18:37 -0700)]
paravirt: add an "mm" argument to alloc_pt

It's useful to know which mm is allocating a pagetable.  Xen uses this
to determine whether the pagetable being added to is pinned or not.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
16 years agouse elfnote.h to generate vsyscall notes.
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:03 +0000 (18:37 -0700)]
use elfnote.h to generate vsyscall notes.

Use existing elfnote.h to generate vsyscall notes, rather than doing
it locally.  Changes elfnote.h a bit to suit, since this is the first
asm user, and it wasn't quite right.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Roland McGrath <roland@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.com>
16 years agousermodehelper: Tidy up waiting
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:03 +0000 (18:37 -0700)]
usermodehelper: Tidy up waiting

Rather than using a tri-state integer for the wait flag in
call_usermodehelper_exec, define a proper enum, and use that.  I've
preserved the integer values so that any callers I've missed should
still work OK.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Andi Kleen <ak@suse.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Joel Becker <joel.becker@oracle.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Srivatsa Vaddagiri <vatsa@in.ibm.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: David Howells <dhowells@redhat.com>
16 years agoAdd common orderly_poweroff()
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:02 +0000 (18:37 -0700)]
Add common orderly_poweroff()

Various pieces of code around the kernel want to be able to trigger an
orderly poweroff.  This pulls them together into a single
implementation.

By default the poweroff command is /sbin/poweroff, but it can be set
via sysctl: kernel/poweroff_cmd.  This is split at whitespace, so it
can include command-line arguments.

This patch replaces four other instances of invoking either "poweroff"
or "shutdown -h now": two sbus drivers, and acpi thermal
management.

sparc64 has its own "powerd"; still need to determine whether it should
be replaced by orderly_poweroff().

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Acked-by: Len Brown <lenb@kernel.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: David S. Miller <davem@davemloft.net>
16 years agousermodehelper: split setup from execution
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:02 +0000 (18:37 -0700)]
usermodehelper: split setup from execution

Rather than having hundreds of variations of call_usermodehelper for
various pieces of usermode state which could be set up, split the
info allocation and initialization from the actual process execution.

This means the general pattern becomes:
 info = call_usermodehelper_setup(path, argv, envp); /* basic state */
 call_usermodehelper_<SET EXTRA STATE>(info, stuff...); /* extra state */
 call_usermodehelper_exec(info, wait); /* run process and free info */

This patch introduces wrappers for all the existing calling styles for
call_usermodehelper_*, but folds their implementations into one.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: David Howells <dhowells@redhat.com>
Cc: Bj?rn Steinbrink <B.Steinbrink@gmx.de>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
16 years agoadd argv_split()
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:02 +0000 (18:37 -0700)]
add argv_split()

argv_split() is a helper function which takes a string, splits it at
whitespace, and returns a NULL-terminated argv vector.  This is
deliberately simple - it does no quote processing of any kind.

[ Seems to me that this is something which is already being done in
  the kernel, but I couldn't find any other implementations, either to
  steal or replace.  Keep an eye out. ]

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
16 years agoadd kstrndup
Jeremy Fitzhardinge [Wed, 18 Jul 2007 01:37:02 +0000 (18:37 -0700)]
add kstrndup

Add a kstrndup function, modelled on strndup.  Like strndup this
returns a string copied into its own allocated memory, but it copies
no more than the specified number of bytes from the source.

Remove private strndup() from irda code.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Cc: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@mandriva.com>
Cc: Al Viro <viro@ftp.linux.org.uk>
Cc: Panagiotis Issaris <takis@issaris.org>
Cc: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
16 years agozs: move to the serial subsystem
Maciej W. Rozycki [Wed, 18 Jul 2007 07:49:11 +0000 (00:49 -0700)]
zs: move to the serial subsystem

This is a reimplementation of the zs driver for the serial subsystem.  Any
resemblance to the old driver is purely coincidential.  ;-) I do hope I got
the handling of modem lines right -- better do not tackle me about the
issue unless you feel too good...

Any users of the old driver: please note the numbers of the serial lines
have now been swapped, i.e.  ttyS0 <-> ttyS1 and ttyS2 <-> ttyS3.  It has
to do with the modem lines mentioned above; basically the port A in a given
chip has to be initialised before the port B if you want to use the latter
as the serial console (which is usually the case), as operations on modem
lines of the serial line associated with the port B access both ports (see
the comment at the top of the driver for the details of wiring used).
Please update your scripts.

This is also the reason each SCC now requests an IRQ once only (as seen in
"/proc/interrupts") -- the handler takes care of both ports at once as the
line associated with the port B has to take status update interrupts from
both ports (and yet the line of the port A takes its own for itself too).
The old driver never got it right...

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoserial: add early_serial_setup() back to header file
Yinghai Lu [Wed, 18 Jul 2007 07:49:10 +0000 (00:49 -0700)]
serial: add early_serial_setup() back to header file

early_serial_setup was removed from serial.h, but forgot to put in
serial_8250.h

Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agofbdev: make fb_append_extra_logo() depend on fb=y
Arnd Bergmann [Wed, 18 Jul 2007 07:49:09 +0000 (00:49 -0700)]
fbdev: make fb_append_extra_logo() depend on fb=y

We can't show the extra logo from boot code if FB is built as a module.
Make the FB_LOGO_EXTRA depend on FB=y.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agodm: fix memory leak in dm_create_persistent() when starting metadata update thread...
Jesper Juhl [Wed, 18 Jul 2007 07:49:08 +0000 (00:49 -0700)]
dm: fix memory leak in dm_create_persistent() when starting metadata update thread fails

If, in dm_create_persistent(), the call to create_singlethread_workqueue()
fails then we'll return without freeing the memory allocated to 'ps', thus
leaking sizeof(struct pstore) bytes.  This patch fixes the leak.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com
Acked-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[NETFILTER]: xt_connlimit needs to depend on nf_conntrack
Cornelia Huck [Wed, 18 Jul 2007 09:38:32 +0000 (02:38 -0700)]
[NETFILTER]: xt_connlimit needs to depend on nf_conntrack

With NF_CONNTRACK=n, NETFILTER_XT_MATCH_CONNLIMIT=m I get the
following errors on current git:

  CC [M]  net/netfilter/xt_connlimit.o
  In file included from net/netfilter/xt_connlimit.c:27:
  include/net/netfilter/nf_conntrack.h:100: error: field 'ct_general' has incomplete type
  include/net/netfilter/nf_conntrack.h: In function 'nf_ct_get':
  include/net/netfilter/nf_conntrack.h:164: error: 'const struct sk_buff' has no member named 'nfct'
  include/net/netfilter/nf_conntrack.h: In function 'nf_ct_put':
  include/net/netfilter/nf_conntrack.h:171: warning: implicit declaration of function 'nf_conntrack_put'
  include/net/netfilter/nf_conntrack.h: In function 'nf_ct_is_untracked':
  include/net/netfilter/nf_conntrack.h:253: error: 'const struct sk_buff' has no member named 'nfct'
  In file included from net/netfilter/xt_connlimit.c:28:
  include/net/netfilter/nf_conntrack_core.h: In function 'nf_conntrack_confirm':
  include/net/netfilter/nf_conntrack_core.h:68: error: 'struct sk_buff' has no member named 'nfct'

Adding a dependency in Kconfig fixes this.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: ipt_iprange.h must #include <linux/types.h>
Adrian Bunk [Wed, 18 Jul 2007 09:21:50 +0000 (02:21 -0700)]
[NETFILTER]: ipt_iprange.h must #include <linux/types.h>

ipt_iprange.h must #include <linux/types.h> since it uses __be32.

This patch fixes kernel Bugzilla #7604.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IrDA]: Fix IrDA build failure
Samuel Ortiz [Wed, 18 Jul 2007 09:16:30 +0000 (02:16 -0700)]
[IrDA]: Fix IrDA build failure

When having built-in IrDA, we hit the following error:

`irda_sysctl_unregister' referenced in section `.init.text' of
net/built-in.o: defined in discarded section `.exit.text' of
net/built-in.o
`irda_proc_unregister' referenced in section `.init.text' of
net/built-in.o: defined in discarded section `.exit.text' of
net/built-in.o
`irsock_cleanup' referenced in section `.init.text' of net/built-in.o:
defined in discarded section `.exit.text' of net/built-in.o
`irttp_cleanup' referenced in section `.init.text' of net/built-in.o:
defined in discarded section `.exit.text' of net/built-in.o
`iriap_cleanup' referenced in section `.init.text' of net/built-in.o:
defined in discarded section `.exit.text' of net/built-in.o
`irda_device_cleanup' referenced in section `.init.text' of
net/built-in.o: defined in discarded section `.exit.text' of
net/built-in.o
`irlap_cleanup' referenced in section `.init.text' of net/built-in.o:
defined in discarded section `.exit.text' of net/built-in.o
`irlmp_cleanup' referenced in section `.init.text' of net/built-in.o:
defined in discarded section `.exit.text' of net/built-in.o
make[1]: *** [.tmp_vmlinux1] Error 1
make: *** [_all] Error 2

This is due to the irda_init fix recently added, where we call __exit
routines from an __init one. It is a build failure that I didn't catch
because it doesn't show up when building IrDA as a module. My apologies
for that.
The following patch fixes that failure and is against your net-2.6
tree. I hope it can make it to the merge window, and stable@kernel.org
is CCed on this mail.

Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[ATM]: nicstar needs virt_to_bus
Stephen Rothwell [Wed, 18 Jul 2007 09:13:42 +0000 (02:13 -0700)]
[ATM]: nicstar needs virt_to_bus

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NET]: move __dev_addr_discard adjacent to dev_addr_discard for readability
Denis Cheng [Wed, 18 Jul 2007 09:12:56 +0000 (02:12 -0700)]
[NET]: move __dev_addr_discard adjacent to dev_addr_discard for readability

Signed-off-by: Denis Cheng <crquan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NET]: merge dev_unicast_discard and dev_mc_discard into one
Denis Cheng [Wed, 18 Jul 2007 09:12:03 +0000 (02:12 -0700)]
[NET]: merge dev_unicast_discard and dev_mc_discard into one

this two functions could share the dev->_xmit_lock acquired context.

Signed-off-by: Denis Cheng <crquan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NET]: move dev_mc_discard from dev_mcast.c to dev.c
Denis Cheng [Wed, 18 Jul 2007 09:10:54 +0000 (02:10 -0700)]
[NET]: move dev_mc_discard from dev_mcast.c to dev.c

Because this function is only called by unregister_netdevice,
this moving could make this non-global function static,
and also remove its declaration in netdevice.h;

Any further, function __dev_addr_discard is also just called by
dev_mc_discard and dev_unicast_discard, keeping this two functions
both in one c file could make __dev_addr_discard also static
and remove its declaration in netdevice.h;

Futhermore, the sequential call to dev_unicast_discard and then
dev_mc_discard in unregister_netdevice have a similar mechanism that:
(netif_tx_lock_bh / __dev_addr_discard / netif_tx_unlock_bh),
they should merged into one to eliminate duplicates in acquiring and
releasing the dev->_xmit_lock, this would be done in my following patch.

Signed-off-by: Denis Cheng <crquan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETLINK]: negative groups in netlink_setsockopt
Johannes Berg [Wed, 18 Jul 2007 09:07:51 +0000 (02:07 -0700)]
[NETLINK]: negative groups in netlink_setsockopt

Reading netlink_setsockopt it's not immediately clear why there isn't a
bug when you pass in negative numbers, the reason being that the >=
comparison is really unsigned although 'val' is signed because
nlk->ngroups is unsigned. Make 'val' unsigned too.

[ Update the get_user() cast to match.  --DaveM ]

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[PPPOL2TP]: Reset meta-data in xmit function
Patrick McHardy [Wed, 18 Jul 2007 09:04:39 +0000 (02:04 -0700)]
[PPPOL2TP]: Reset meta-data in xmit function

Reset netfilter data and IP CB, fix dst_entry leak.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[PPPOL2TP]: Fix use-after-free
Patrick McHardy [Wed, 18 Jul 2007 09:04:09 +0000 (02:04 -0700)]
[PPPOL2TP]: Fix use-after-free

Don't use skb->len after passing it to ip_queue_xmit.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[PKT_SCHED]: Some typo fixes in net/sched/Kconfig
Gabriel Craciunescu [Wed, 18 Jul 2007 09:00:04 +0000 (02:00 -0700)]
[PKT_SCHED]: Some typo fixes in net/sched/Kconfig

Signed-off-by: Gabriel Craciunescu <nix.or.die@googlemail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[XFRM]: Fix crash introduced by struct dst_entry reordering
Patrick McHardy [Wed, 18 Jul 2007 08:55:52 +0000 (01:55 -0700)]
[XFRM]: Fix crash introduced by struct dst_entry reordering

XFRM expects xfrm_dst->u.next to be same pointer as dst->next, which
was broken by the dst_entry reordering in commit 1e19e02c~, causing
an oops in xfrm_bundle_ok when walking the bundle upwards.

Kill xfrm_dst->u.next and change the only user to use dst->next instead.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[TCP]: remove unused argument to cong_avoid op
Stephen Hemminger [Tue, 17 Jul 2007 01:35:52 +0000 (18:35 -0700)]
[TCP]: remove unused argument to cong_avoid op

None of the existing TCP congestion controls use the rtt value pased
in the ca_ops->cong_avoid interface.  Which is lucky because seq_rtt
could have been -1 when handling a duplicate ack.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[ATM]: [idt77252] Rename CONFIG_ATM_IDT77252_SEND_IDLE to not resemble a Kconfig...
Robert P. J. Day [Tue, 17 Jul 2007 01:35:07 +0000 (18:35 -0700)]
[ATM]: [idt77252] Rename CONFIG_ATM_IDT77252_SEND_IDLE to not resemble a Kconfig variable

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: chas williams <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[ATM]: [drivers] ioremap balanced with iounmap
Amol Lad [Tue, 17 Jul 2007 01:34:36 +0000 (18:34 -0700)]
[ATM]: [drivers] ioremap balanced with iounmap

Signed-off-by: Amol Lad <amol@verismonetworks.com>
Signed-off-by: chas williams <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[ATM]: [lanai] sram_test_word() must be __devinit
Adrian Bunk [Tue, 17 Jul 2007 01:34:04 +0000 (18:34 -0700)]
[ATM]: [lanai] sram_test_word() must be __devinit

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: chas williams <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[ATM]: [nicstar] Replace C code with call to ARRAY_SIZE() macro.
Robert P. J. Day [Tue, 17 Jul 2007 01:31:51 +0000 (18:31 -0700)]
[ATM]: [nicstar] Replace C code with call to ARRAY_SIZE() macro.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: chas williams <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[ATM]: Eliminate dead config variable CONFIG_BR2684_FAST_TRANS.
Robert P. J. Day [Tue, 17 Jul 2007 01:31:24 +0000 (18:31 -0700)]
[ATM]: Eliminate dead config variable CONFIG_BR2684_FAST_TRANS.

Signed-off-by: chas williams <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[ATM]: Replacing kmalloc/memset combination with kzalloc.
vignesh babu [Tue, 17 Jul 2007 01:30:36 +0000 (18:30 -0700)]
[ATM]: Replacing kmalloc/memset combination with kzalloc.

Signed-off-by: vignesh babu <vignesh.babu@wipro.com>
Signed-off-by: chas williams <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NET]: gen_estimator deadlock fix
Ranko Zivojnovic [Tue, 17 Jul 2007 01:28:32 +0000 (18:28 -0700)]
[NET]: gen_estimator deadlock fix

-Fixes ABBA deadlock noted by Patrick McHardy <kaber@trash.net>:

> There is at least one ABBA deadlock, est_timer() does:
> read_lock(&est_lock)
> spin_lock(e->stats_lock) (which is dev->queue_lock)
>
> and qdisc_destroy calls htb_destroy under dev->queue_lock, which
> calls htb_destroy_class, then gen_kill_estimator and this
> write_locks est_lock.

To fix the ABBA deadlock the rate estimators are now kept on an rcu list.

-The est_lock changes the use from protecting the list to protecting
the update to the 'bstat' pointer in order to avoid NULL dereferencing.

-The 'interval' member of the gen_estimator structure removed as it is
not needed.

Signed-off-by: Ranko Zivojnovic <ranko@spidernet.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2]: Update version to 1.6.3.
Michael Chan [Tue, 17 Jul 2007 01:27:32 +0000 (18:27 -0700)]
[BNX2]: Update version to 1.6.3.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2]: Use constants for stats ticks.
Michael Chan [Tue, 17 Jul 2007 01:27:10 +0000 (18:27 -0700)]
[BNX2]: Use constants for stats ticks.

Change all stats related magic numbers to constants.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2]: Add delay before reading firmware version.
Michael Chan [Tue, 17 Jul 2007 01:26:43 +0000 (18:26 -0700)]
[BNX2]: Add delay before reading firmware version.

The management firmware may still be loading during bnx2_init_one()
because of the D3hot -> D0 transition and the firmware version may
not be available without waiting a bit.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2]: Support NVRAM on 5709.
Michael Chan [Tue, 17 Jul 2007 01:26:23 +0000 (18:26 -0700)]
[BNX2]: Support NVRAM on 5709.

The NVRAM interface is slightly modified on the 5709.  To properly
support it, we need to change the buffered flag in the flash data
structure into multiple flags to indicate buffered operation, address
translation, and the use of write enable (WREN).  The 5709 flash
only requires the buffered operation bit to be set.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC64]: Set vio->desc_buf to NULL after freeing.
David S. Miller [Wed, 18 Jul 2007 07:33:23 +0000 (00:33 -0700)]
[SPARC64]: Set vio->desc_buf to NULL after freeing.

Otherwise we trigger assertions on the next link-up.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC]: Mark sparc and sparc64 as not having virt_to_bus
Stephen Rothwell [Wed, 18 Jul 2007 07:09:30 +0000 (00:09 -0700)]
[SPARC]: Mark sparc and sparc64 as not having virt_to_bus

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC64]: Fix reset handling in VNET driver.
David S. Miller [Wed, 18 Jul 2007 07:07:39 +0000 (00:07 -0700)]
[SPARC64]: Fix reset handling in VNET driver.

In vnet_event(), if the channel was reset, try to get the link
going again by invoking vio_port_up() after dropping the lock.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC64]: Handle reset events in vio_link_state_change().
David S. Miller [Wed, 18 Jul 2007 07:06:22 +0000 (00:06 -0700)]
[SPARC64]: Handle reset events in vio_link_state_change().

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC64]: Handle LDC resets properly in domain-services driver.
David S. Miller [Wed, 18 Jul 2007 06:12:20 +0000 (23:12 -0700)]
[SPARC64]: Handle LDC resets properly in domain-services driver.

Reset the handshake and per-capability state so that when the
link comes back up we'll renegotiate the DS version and then
reregister all of the services.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC64]: Massively simplify VIO device layer and support hot add/remove.
David S. Miller [Wed, 18 Jul 2007 06:03:47 +0000 (23:03 -0700)]
[SPARC64]: Massively simplify VIO device layer and support hot add/remove.

Create and destroy VIO devices in response to MD update events.  These
run synchronously inside of the MD update mutex so the VIO layer
doesn't need to do internal locking of any sort.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC64]: Simplify VNET probing.
David S. Miller [Wed, 18 Jul 2007 05:19:10 +0000 (22:19 -0700)]
[SPARC64]: Simplify VNET probing.

Only probe on the vdc-port VIO devices, create parent
vnet objects on-demand.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC64]: Simplify VDC device probing.
David S. Miller [Wed, 18 Jul 2007 04:46:00 +0000 (21:46 -0700)]
[SPARC64]: Simplify VDC device probing.

We just need to match on the vdc-port nodes, the parent
is really not interesting at all.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC64]: Add basic infrastructure for MD add/remove notification.
David S. Miller [Wed, 18 Jul 2007 04:37:35 +0000 (21:37 -0700)]
[SPARC64]: Add basic infrastructure for MD add/remove notification.

And add dummy handlers for the VIO device layer.  These will be filled
in with real code after the vdc, vnet, and ds drivers are reworked to
have simpler dependencies on the VIO device tree.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoslob: Kill off duplicate kzalloc() definition.
Paul Mundt [Wed, 18 Jul 2007 00:18:36 +0000 (09:18 +0900)]
slob: Kill off duplicate kzalloc() definition.

With the slab zeroing allocations cleanups Christoph stubbed in a generic
kzalloc(), which was missed on SLOB. Follow the SLAB/SLUB changes and
kill off the __kzalloc() wrapper that SLOB was using.

Reported-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoRevert drivers/ide/ide.c scsi_cmd_ioctl() usage changes
Linus Torvalds [Tue, 17 Jul 2007 22:57:42 +0000 (15:57 -0700)]
Revert drivers/ide/ide.c scsi_cmd_ioctl() usage changes

The old IDE driver is not ready to take generic SCSI commands, even if
it uses them for some specific issues (ie the tray open/close ioctls for
IDE CD-ROM's). Pointed out by Bartlomiej.

I'm sure we'll have it fixed properly soon enough, but for now we should
not allow it to cause problems.

Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMake the "z/VM unit record device driver" depend on S390
Linus Torvalds [Tue, 17 Jul 2007 22:43:56 +0000 (15:43 -0700)]
Make the "z/VM unit record device driver" depend on S390

I really don't see anybody else wanting to select it ;)

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
Linus Torvalds [Tue, 17 Jul 2007 22:29:33 +0000 (15:29 -0700)]
Merge branch 'for-linus' of git://git390.osdl.marist.edu/linux-2.6

* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
  [S390] Fix broken logic, SIGA flags must be bitwise ORed
  [S390] cio: Dont print trailing \0 in modalias_show().
  [S390] Simplify stack trace.
  [S390] z/VM unit record device driver
  [S390] vmcp cleanup
  [S390] qdio: output queue stall on FCP and network devices
  [S390] Fix disassembly of RX_URRD, SI_URD & PC-relative instructions.
  [S390] Update default configuration.

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
Linus Torvalds [Tue, 17 Jul 2007 22:28:18 +0000 (15:28 -0700)]
Merge git://git./linux/kernel/git/wim/linux-2.6-watchdog

* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog: (21 commits)
  [WATCHDOG] at32ap700x_wdt.c - Fix compilation warnings
  [WATCHDOG] at32ap700x_wdt.c - Add spinlock support
  [WATCHDOG] at32ap700x_wdt.c - Add nowayout + MAGICCLOSE features
  [WATCHDOG] at32ap700x_wdt.c - timeout module parameter patch
  [WATCHDOG] at32ap700x_wdt.c - checkpatch.pl-0.05 clean-up's
  [WATCHDOG] change s3c2410_wdt to using dev_() macros for output
  [WATCHDOG] s3c2410_wdt announce initialisation
  [WATCHDOG] at32ap700x-wdt: add iounmap if probe function fails
  [WATCHDOG] at32ap700x-wdt: add missing iounmap in _remove
  [WATCHDOG] watchdog-driver-for-at32ap700x-devices-fix-2
  [WATCHDOG] watchdog-driver-for-at32ap700x-devices-fix
  [WATCHDOG] Watchdog driver for AT32AP700X devices
  [WATCHDOG] Mixcom Watchdog - CodingStyle clean-up
  [WATCHDOG] Mixcom Watchdog - clean-up printk's
  [WATCHDOG] Mixcom Watchdog - clean-up printk's
  [WATCHDOG] Mixcom Watchdog - checkcard part 2
  [WATCHDOG] Mixcom Watchdog - checkcard
  [WATCHDOG] Mixcom Watchdog - get rid of port offset's
  [WATCHDOG] Mixcom Watchdog - update "Documentation"
  [WATCHDOG] Remove the redundant check for pwrite() in EP93XXX watchdog.
  ...

16 years agoMerge branch 'bsg' of git://git.kernel.dk/data/git/linux-2.6-block
Linus Torvalds [Tue, 17 Jul 2007 22:26:31 +0000 (15:26 -0700)]
Merge branch 'bsg' of git://git.kernel.dk/data/git/linux-2.6-block

* 'bsg' of git://git.kernel.dk/data/git/linux-2.6-block:
  bsg: fix missing space in version print
  Don't define empty struct bsg_class_device if !CONFIG_BLK_DEV_BSG
  bsg: Kconfig updates
  bsg: minor cleanup
  bsg: device hash table cleanup
  bsg: fix initialization error handling bugs
  bsg: mark FUJITA Tomonori as bsg maintainer
  bsg: convert to dynamic major
  bsg: address various review comments

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh...
Linus Torvalds [Tue, 17 Jul 2007 22:23:50 +0000 (15:23 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ericvh/v9fs

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs:
  9p: fix debug compilation error

16 years agoMerge branch 'isdn-cleanup' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Tue, 17 Jul 2007 22:23:37 +0000 (15:23 -0700)]
Merge branch 'isdn-cleanup' of /linux/kernel/git/jgarzik/misc-2.6

* 'isdn-cleanup' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6:
  [ISDN] HiSax hfc_pci: minor cleanups
  [ISDN] HiSax bkm_a4t: split setup into two smaller functions
  [ISDN] HiSax enternow: split setup into 3 smaller functions
  [ISDN] HiSax netjet_u: split setup into 3 smaller functions
  [ISDN] HiSax netjet_s: code movement, prep for hotplug
  [ISDN] HiSax: move card state alloc/setup code into separate functions
  [ISDN] HiSax: move card setup into separate function

16 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Tue, 17 Jul 2007 22:19:27 +0000 (15:19 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/sparc-2.6

* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: Kill bogus set_fs(KERNEL_DS) in do_rt_sigreturn().
  [SPARC64]: Update defconfig.
  [SPARC64]: Kill explicit %gl register reference.

16 years agoMerge branch 'uninit-var' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Tue, 17 Jul 2007 22:19:06 +0000 (15:19 -0700)]
Merge branch 'uninit-var' of /linux/kernel/git/jgarzik/misc-2.6

* 'uninit-var' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6:
  arch/i386/* fs/* ipc/*: mark variables with uninitialized_var()
  drivers/*: mark variables with uninitialized_var()

16 years agoMerge branch 'warnings' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6
Linus Torvalds [Tue, 17 Jul 2007 22:18:33 +0000 (15:18 -0700)]
Merge branch 'warnings' of /linux/kernel/git/jgarzik/misc-2.6

* 'warnings' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6:
  drivers/atm/ambassador: kill uninit'd var warning, and fix bug
  [libata] sata_mv: use pci_try_set_mwi()
  drivers/infiniband/hw/mthca/mthca_qp: kill uninit'd var warning
  drivers/net/wan/sbni: kill uninit'd var warning
  drivers/mtd/ubi/eba: minor cleanup: tighten scope of a local var
  drivers/telephony/ixj: cleanup and fix gcc warning
  drivers/net/wan/pc300_drv: fix bug caught by gcc warning
  drivers/usb/misc/auerswald: fix status check, remove redundant check
  [netdrvr] eepro100, ne2k-pci: abort resume if pci_enable_device() fails
  [netdrvr] natsemi: Fix device removal bug
  kernel/auditfilter: kill bogus uninit'd-var compiler warning

16 years agosmp_call_function_single() should be a macro on UP
Al Viro [Tue, 17 Jul 2007 21:29:46 +0000 (22:29 +0100)]
smp_call_function_single() should be a macro on UP

... or we end up with header include order problems from hell.

E.g. on m68k this is 100% fatal - local_irq_enable() there
wants preempt_count(), which wants task_struct fields, which
we won't have when we are in smp.h pulled from sched.h.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[SPARC64]: Kill bogus set_fs(KERNEL_DS) in do_rt_sigreturn().
Oleg Nesterov [Tue, 17 Jul 2007 21:37:54 +0000 (14:37 -0700)]
[SPARC64]: Kill bogus set_fs(KERNEL_DS) in do_rt_sigreturn().

From: Oleg Nesterov <oleg@tv-sign.ru>

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[ISDN] HiSax hfc_pci: minor cleanups
Jeff Garzik [Mon, 16 Jul 2007 01:48:07 +0000 (21:48 -0400)]
[ISDN] HiSax hfc_pci: minor cleanups

* trim trailing whitespace
* remove CONFIG_PCI ifdefs, this driver is always PCI (Kconfig enforced)
* remove return statements at the tail of a function
* remove indentation levels by returning an error code immediately.
  Makes the code much more readable, and easier to update to PCI hotplug
  API.

Signed-off-by: Jeff Garzik <jeff@garzik.org>