dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

54537 Commits

Author SHA1 Message Date
Pekka Enberg fd76bab2fa slab: introduce krealloc
This introduce krealloc() that reallocates memory while keeping the contents
unchanged.  The allocator avoids reallocation if the new size fits the
currently used cache.  I also added a simple non-optimized version for
mm/slob.c for compatibility.

[akpm@linux-foundation.org: fix warnings]
Acked-by: Josef Sipek <jsipek@fsl.cs.sunysb.edu>
Acked-by: Matt Mackall <mpm@selenic.com>
Acked-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-07 12:12:50 -07:00
Linus Torvalds e3ebadd95c Revert "[PATCH] x86: __pa and __pa_symbol address space separation"
This was broken.  It adds complexity, for no good reason.  Rather than
separate __pa() and __pa_symbol(), we should deprecate __pa_symbol(),
and preferably __pa() too - and just use "virt_to_phys()" instead, which
is more readable and has nicer semantics.

However, right now, just undo the separation, and make __pa_symbol() be
the exact same as __pa().  That fixes the bugs this patch introduced,
and we can do the fairly obvious cleanups later.

Do the new __phys_addr() function (which is now the actual workhorse for
the unified __pa()/__pa_symbol()) as a real external function, that way
all the potential issues with compile/link-time optimizations of
constant symbol addresses go away, and we can also, if we choose to, add
more sanity-checking of the argument.

Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Vivek Goyal <vgoyal@in.ibm.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-07 08:44:24 -07:00
Ivo van Doorn cf4328cd94 [NET]: rfkill: add support for input key to control wireless radio
The RF kill patch that provides infrastructure for implementing
switches controlling radio states on various network and other cards.

[dtor@insightbb.com: address review comments]
[akpm@linux-foundation.org: cleanups, build fixes]

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-05-07 00:34:20 -07:00
Josef 'Jeff' Sipek 2396a22e09 [NET] net/core: Fix error handling
Upon failure to register "ptype" procfs entry, "softnet_stat" was not
removed, and an incorrect attempt was made to remove the "ptype" entry.

Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-05-07 00:33:18 -07:00
David S. Miller d5bb306b42 Merge git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-2.6 2007-05-07 00:27:53 -07:00
Michael Chan 823036ed32 [TG3]: Update version and reldate.
Update version to 3.76.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-05-07 00:26:30 -07:00
Michael Chan c04cb34725 [TG3]: Eliminate spurious interrupts.
Spurious interrupts are often encountered especially on systems
using the 8259 PIC mode.  This is because the I/O write to deassert
the interrupt is posted and won't get to the chip immediately.  As
a result, the IRQ may remain asserted after the IRQ handler exits,
causing spurious interrupts.

Flush the interrupt mailbox in non-MSI handlers to de-assert the
IRQ immediately.  This seems to be the most straight forward approach
after discussion with Jeff Garzik and David Miller.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-05-07 00:26:15 -07:00
Matt Carlson 8ed5d97e5e [TG3]: Add ASPM workaround.
This patch adds workaround to fix performance problems caused by slow
PCIE L1->L0 transitions on ICH8 platforms.

Changed all magic numbers to constants as suggested by Jeff Garzik.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-05-07 00:25:49 -07:00
David S. Miller 90a660a454 [SERIAL] sunsu: Fix section mismatch warnings.
Mark sunsu_console_setup() as __init and rename 'sunsu_cons'
to 'sunsu_console' so that it matches modpost.c's whitelist.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-05-07 00:14:13 -07:00
David S. Miller e7f11aeed0 [SPARC64]: pgtable_cache_init() should be __init.
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-05-07 00:02:46 -07:00
David S. Miller c35a376d60 [SPARC64]: Fix section mismatch warnings in arch/sparc64/kernel/prom.c
The IRQ translation init routines should all be __init.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-05-07 00:02:24 -07:00
David S. Miller a6009dda97 [SPARC64]: Fix section mismatch warnings in arch/sparc64/kernel/pci.c
apb_calc_first_last(), apb_fake_ranges(), pci_of_scan_bus(),
of_scan_pci_bridge(), pci_of_scan_bus(), and pci_scan_one_pbm()
should all be __devinit.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-05-07 00:01:38 -07:00
David S. Miller 23abc9ec6a [SPARC64]: Fix section mismatch warnings in arch/sparc64/kernel/console.c
probe_other_fhcs() and central_probe() should be __init

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-05-07 00:00:37 -07:00
David S. Miller 6a5b518f22 [MM]: sparse_init() should be __init.
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-05-06 23:54:25 -07:00
David S. Miller 7db00552d9 [SPARC64]: Update defconfig.
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-05-06 22:47:14 -07:00
David S. Miller 7122752145 [VIDEO]: Add Sun XVR-2500 framebuffer driver.
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-05-06 22:45:50 -07:00
David S. Miller 453e93b348 [VIDEO]: Add Sun XVR-500 framebuffer driver.
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-05-06 22:45:08 -07:00
David S. Miller 861fe90656 [SPARC64]: SUN4U PCI-E controller support.
Some minor refactoring in the generic code was necessary for
this:

1) This controller requires 8-byte access to the interrupt map
   and clear register.  They are 64-bits on all the other
   SBUS and PCI controllers anyways, so this was easy to cure.

2) The IMAP register has a different layout and some bits that we
   need to preserve, so use a read/modify/write when making
   changes to the IMAP register in generic code.

3) Flushing the entire IOMMU TLB is best done with a single write
   to a register on this PCI controller, add a iommu->iommu_flushinv
   for this.

Still lacks MSI support, that will come later.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-05-06 22:44:06 -07:00
David S. Miller 4cad69174f [SPARC]: Fix comment typo in smp4m_blackbox_current().
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-05-06 22:43:46 -07:00
David S. Miller 6025dfe5b2 [SCSI] SUNESP: sun_esp.c needs linux/delay.h
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-05-06 22:43:41 -07:00
Roland Dreier 8d1cc86a62 IPoIB: Convert to NAPI
Convert the IP-over-InfiniBand network device driver over to using
NAPI to handle completions for the main CQ.  This covers all receives
as well as datagram mode sends; send completions for connected mode
connections are still handled from interrupt context.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-05-06 21:18:11 -07:00
Roland Dreier ed23a72778 IB: Return "maybe missed event" hint from ib_req_notify_cq()
The semantics defined by the InfiniBand specification say that
completion events are only generated when a completions is added to a
completion queue (CQ) after completion notification is requested.  In
other words, this means that the following race is possible:

	while (CQ is not empty)
		ib_poll_cq(CQ);
	// new completion is added after while loop is exited
	ib_req_notify_cq(CQ);
	// no event is generated for the existing completion

To close this race, the IB spec recommends doing another poll of the
CQ after requesting notification.

However, it is not always possible to arrange code this way (for
example, we have found that NAPI for IPoIB cannot poll after
requesting notification).  Also, some hardware (eg Mellanox HCAs)
actually will generate an event for completions added before the call
to ib_req_notify_cq() -- which is allowed by the spec, since there's
no way for any upper-layer consumer to know exactly when a completion
was really added -- so the extra poll of the CQ is just a waste.

Motivated by this, we add a new flag "IB_CQ_REPORT_MISSED_EVENTS" for
ib_req_notify_cq() so that it can return a hint about whether the a
completion may have been added before the request for notification.
The return value of ib_req_notify_cq() is extended so:

	 < 0	means an error occurred while requesting notification
	== 0	means notification was requested successfully, and if
		IB_CQ_REPORT_MISSED_EVENTS was passed in, then no
		events were missed and it is safe to wait for another
		event.
	 > 0	is only returned if IB_CQ_REPORT_MISSED_EVENTS was
		passed in.  It means that the consumer must poll the
		CQ again to make sure it is empty to avoid the race
		described above.

We add a flag to enable this behavior rather than turning it on
unconditionally, because checking for missed events may incur
significant overhead for some low-level drivers, and consumers that
don't care about the results of this test shouldn't be forced to pay
for the test.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-05-06 21:18:11 -07:00
Michael S. Tsirkin f4fd0b224d IB: Add CQ comp_vector support
Add a num_comp_vectors member to struct ib_device and extend
ib_create_cq() to pass in a comp_vector parameter -- this parallels
the userspace libibverbs API.  Update all hardware drivers to set
num_comp_vectors to 1 and have all ULPs pass 0 for the comp_vector
value.  Pass the value of num_comp_vectors to userspace rather than
hard-coding a value of 1.

We want multiple CQ event vector support (via MSI-X or similar for
adapters that can generate multiple interrupts), but it's not clear
how many vectors we want, or how we want to deal with policy issues
such as how to decide which vector to use or how to set up interrupt
affinity.  This patch is useful for experimenting, since no core
changes will be necessary when updating a driver to support multiple
vectors, and we know that we want to make at least these changes
anyway.

Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-05-06 21:18:11 -07:00
Ralph Campbell 154257f362 IB/ipath: Fix a race condition when generating ACKs
Fix a problem where simple ACKs can be sent ahead of RDMA read
responses thus implicitly NAKing the RDMA read.

Signed-off-by: Ralph Campbell <ralph.cambpell@qlogic.com>
Signed-off-by: Robert Walsh <robert.walsh@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-05-06 21:18:11 -07:00
Ralph Campbell 6ed89b9574 IB/ipath: Fix two more spin lock problems
Fix a missing unlock in ipath_rc_rcv_resp() and remove an extra unlock
from ipath_rc_rcv_error().

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-05-06 21:18:11 -07:00
Roland Dreier 1a70a05d9d IB/fmr_pool: Add prefix to all printks
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-05-06 21:18:11 -07:00
Roland Dreier b7f008fdc9 IB/srp: Set proc_name
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-05-06 21:18:11 -07:00
Ishai Rabinovitz 3633b3d096 IB/srp: Add orig_dgid sysfs attribute to scsi_host
Add an orig_dgid attribute in sysfs for SRP scsi_hosts, so that
userspace can tell what the original dgid value written to the
add_target file was, even if the connection is redirected to a
different port while connecting.

Signed-off-by: Ishai Rabinovitz <ishai@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-05-06 21:18:11 -07:00
Michael S. Tsirkin d6ef7d68f6 IPoIB/cm: Don't crash if remote side uses one QP for both directions
The IPoIB CM spec allows the use of a single connection in both
active->passive and passive->active directions.  The current Linux
code uses one connection for both directions, but if another node only
uses one connection for both directions, we oops when we try to look
up the passive connection.  Fix by checking that qp_context is
non-NULL before dereferencing it.

Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
2007-05-06 21:18:11 -07:00
Steve Wise aff9e39d97 RDMA/cxgb3: Support for new abort logic
The HW now posts 2 ABORT_RPL and/or PEER_ABORT_REQ messages.  We need
to handle them by silenty dropping the 1st but mark that we're ready
for the final message.  This plugs some close races between the uP and
HW.  Also update the minimum required firmware version.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2007-05-06 21:18:08 -07:00
Ryusuke Sakato 39374aadcd sh: R7785RP board updates.
Some fixups for the R7785RP board. Gets iVDR working.

Signed-off-by: Ryusuke Sakato <sakato.ryusuke@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:11:57 +00:00
Paul Mundt 9c37dc6330 sh: Update r7780rp defconfig.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:11:57 +00:00
Paul Mundt 3a2e117e22 sh: Add die chain notifiers.
Add the atomic die chains in, kprobes needs these.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:11:57 +00:00
Kristoffer Ericson 3dde7a3c74 sh: Fix APM emulation on hp6xx.
With the shared APM emulation code being introduced, hp6xx was missed
in the conversion. Get it building again.

Signed-off-by: Kristoffer Ericson <kristoffer.ericson@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:11:57 +00:00
Takashi YOSHII 70fe4d87bf sh: Wire up more IRQs for SH7709.
hp6xx requires some additional IRQs that aren't currently enabled in
the SH7709 setup code. Wire them up.

Signed-off-by: Takashi YOSHII <takashi.yoshii.ze@hitachi.com>
Signed-off-by: Kristoffer Ericson <kristoffer.ericson@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:11:57 +00:00
Ryusuke Sakato 6865f0ea6a sh: Solution Engine 7722 board support.
This adds more full-featured support for the SH7722 Solution Engine.
Previously this was using the generic board, and lacked most of the
peripheral support.

Signed-off-by: Ryusuke Sakato <sakato.ryusuke@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:11:57 +00:00
Paul Mundt 6b817c0348 sh: Fix r7780rp build.
With the addition of the R7780MP and R7785RP, the R7780RP build
ended up breaking. Trivial compile fix.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:11:57 +00:00
Paul Mundt 4d5ade5b29 sh: kdump support.
This adds support for kexec based crash dumps.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:11:56 +00:00
Paul Mundt db62e5bd29 sh: Move clock reporting to its own proc entry.
Previously this was done in cpuinfo, but with the number of clocks
growing, it makes more sense to place this in a different proc entry.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:11:56 +00:00
Nobuhiro Iwamatsu 2a8ff4596c sh: Solution Engine SH7705 board and CPU updates.
This fixes up SH7705 CPU support and the SE7705 board
for some of the recent changes.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.zh@hitachi.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:11:56 +00:00
Paul Mundt 005a336e71 serial: sh-sci: Fix module clock refcount for serial console.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:11:56 +00:00
dmitry pervushin 1534a3b3dc serial: sh-sci: Fix module clock refcounting.
This adds the enable/disable hooks for the port clock to sh-sci.

Signed-off-by: dmitry pervushin <dimka@nomadgs.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:11:56 +00:00
dmitry pervushin 1929cb340b sh: SH7722 clock framework support.
This adds support for the SH7722 (MobileR) to the clock framework.

Signed-off-by: dmitry pervushin <dimka@nomadgs.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:11:56 +00:00
Kristoffer Ericson 34a780a0af sh: hp6xx pata_platform support.
Drop the hd64461 I/O ops and wire up pata_platform for MMIO.

Signed-off-by: Kristoffer Ericson <Kristoffer_e1@hotmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:11:56 +00:00
Paul Mundt dd12666278 sh: Obey CONFIG_HZ for HZ definition.
This wasn't being set before, so now it's set for when it makes sense.
The shwdt case still requires HZ to be fixed at 1000 for the WOVF period,
so this is still preserved.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:11:56 +00:00
SUGIOKA Toshinobu 760bcb1dee sh: Fix fstatat64() syscall.
Signed-off-by: SUGIOKA Toshinobu <sugioka@itonet.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:11:55 +00:00
Nobuhiro Iwamatsu b7aee517c8 sh: se7780 PCI support.
Add support for the SH7780 PCIC on the Solution Engine 7780,
missing from the previous board-support patch.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.zh@hitachi.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:11:55 +00:00
Nobuhiro Iwamatsu b75762302e sh: SH7780 Solution Engine board support.
This adds support for the SH7780-based Solution Engine reference board.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.zh@hitachi.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:11:55 +00:00
Paul Mundt cd6c7ea234 sh: Add a dummy SH-4 PCIC fixup.
By default we don't have anything to fix up for the SH-4 PCIC, boards can
overload this as necessary.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:11:55 +00:00
Paul Mundt 0264f16039 sh: Tidy up L-BOX area5 addresses.
L-BOX can use the normal PA_AREA5_IO, there's no reason for it to
reproduce it.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-05-07 02:11:55 +00:00