linux-2.6
14 years agoubifs: register backing_dev_info
Jens Axboe [Fri, 29 May 2009 07:19:23 +0000 (09:19 +0200)] 
ubifs: register backing_dev_info

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agobtrfs: properly register fs backing device
Jens Axboe [Fri, 12 Jun 2009 12:43:40 +0000 (14:43 +0200)] 
btrfs: properly register fs backing device

btrfs assigns this bdi to all inodes on that file system, so make
sure it's registered. This isn't really important now, but will be
when we put dirty inodes there. Even now, we miss the stats when the
bdi isn't visible.

Also fixes failure to check bdi_init() return value, and bad inherit of
->capabilities flags from the default bdi.

Acked-by: Chris Mason <chris.mason@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agoblock: don't overwrite bdi->state after bdi_init() has been run
Jens Axboe [Fri, 12 Jun 2009 12:42:56 +0000 (14:42 +0200)] 
block: don't overwrite bdi->state after bdi_init() has been run

Move the defaults to where we do the init of the backing_dev_info.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agocfq: cleanup for last_end_request in cfq_data
Gui Jianfeng [Fri, 12 Jun 2009 13:27:50 +0000 (15:27 +0200)] 
cfq: cleanup for last_end_request in cfq_data

Actually, last_end_request in cfq_data isn't used now. So lets
just remove it.

Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
14 years agousb/ps3: Add missing annotations
Geert Uytterhoeven [Wed, 10 Jun 2009 04:38:59 +0000 (04:38 +0000)] 
usb/ps3: Add missing annotations

probe functions should be __devinit
initialization functions should be __init

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agopowerpc: Add memory clobber to mtspr()
Benjamin Herrenschmidt [Sun, 14 Jun 2009 16:16:10 +0000 (16:16 +0000)] 
powerpc: Add memory clobber to mtspr()

Without this clobber, mtspr can be re-ordered by gcc vs. surrounding
memory accesses. While this might be ok for some cases, it's not in
others and I'm not confident that all callers get it right (In fact
I'm sure some of them don't).

So for now, let's make mtspr() itself contain a memory clobber until
we can audit and fix everything, at which point we can remove it
if we think it's worth doing so.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agopowerpc: Fix invalid construct in our CPU selection Kconfig
Benjamin Herrenschmidt [Sun, 14 Jun 2009 14:45:50 +0000 (14:45 +0000)] 
powerpc: Fix invalid construct in our CPU selection Kconfig

commit 5b7c3c918c9c26c50d220b2b50359208cb5a1dbe introduced an invalid
construct in our CPU selection. This caused warnings, though it still
appeared to do the right thing.

This fixes it properly by having separate formal definitions of
PPC_BOOK3S_32 and PPC_BOOK3S_64 and one statement defining
PPC_BOOK3S based on the two above.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agops3rom: Use ps3_system_bus_[gs]et_drvdata() instead of direct access
Geert Uytterhoeven [Wed, 10 Jun 2009 04:38:56 +0000 (04:38 +0000)] 
ps3rom: Use ps3_system_bus_[gs]et_drvdata() instead of direct access

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Acked-by: James E.J. Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agopowerpc: Add configurable -Werror for arch/powerpc
Michael Ellerman [Tue, 9 Jun 2009 20:48:51 +0000 (20:48 +0000)] 
powerpc: Add configurable -Werror for arch/powerpc

Add the option to build the code under arch/powerpc with -Werror.

The intention is to make it harder for people to inadvertantly introduce
warnings in the arch/powerpc code. It needs to be configurable so that
if a warning is introduced, people can easily work around it while it's
being fixed.

The option is a negative, ie. don't enable -Werror, so that it will be
turned on for allyes and allmodconfig builds.

The default is n, in the hope that developers will build with -Werror,
that will probably lead to some build breaks, I am prepared to be flamed.

It's not enabled for math-emu, which is a steaming pile of warnings.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agoof_serial: Add UPF_FIXED_TYPE flag
Dave Mitchell [Tue, 9 Jun 2009 13:39:47 +0000 (13:39 +0000)] 
of_serial: Add UPF_FIXED_TYPE flag

This patch adds the UPF_FIXED_TYPE flag which will bypass the
8250's autoconfig probe for uart type. The uart type identified
by the of_serial's parse of the flat device tree will be utilized
as defined.

Signed-off-by: Dave Mitchell <dmitchell@amcc.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agodrivers/hvc: Add missing __devexit_p()
Mike Frysinger [Wed, 10 Jun 2009 09:42:30 +0000 (09:42 +0000)] 
drivers/hvc: Add missing __devexit_p()

The remove function uses __devexit, so the .remove assignment needs
__devexit_p() to fix a build error with hotplug disabled.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agonet/ps3: gelic - Add missing annotations
Geert Uytterhoeven [Wed, 10 Jun 2009 04:38:58 +0000 (04:38 +0000)] 
net/ps3: gelic - Add missing annotations

probe functions should be __devinit

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agopowerpc: Introduce macro spin_event_timeout()
Timur Tabi [Tue, 26 May 2009 05:21:41 +0000 (05:21 +0000)] 
powerpc: Introduce macro spin_event_timeout()

The macro spin_event_timeout() takes a condition and timeout value
(in microseconds) as parameters.  It spins until either the condition is true
or the timeout expires.  It returns the result of the condition when the loop
was terminated.

This primary purpose of this macro is to poll on a hardware register until a
status bit changes.  The timeout ensures that the loop still terminates if the
bit doesn't change as expected.  This macro makes it easier for driver
developers to perform this kind of operation properly.

Signed-off-by: Timur Tabi <timur@freescale.com>
Acked-by: Geoff Thorpe <Geoff.Thorpe@freescale.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agopowerpc/warp: Fix ISA_DMA_THRESHOLD default
Sean MacLennan [Wed, 10 Jun 2009 15:09:23 +0000 (15:09 +0000)] 
powerpc/warp: Fix ISA_DMA_THRESHOLD default

If no device is passed to __dma_alloc_coherent, it defaults to using ISA_DMA_THRESHOLD
for the mask. This patch provides a reasonable default rather than 0.

Signed-off-by: Sean MacLennan <smaclennan@pikatech.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agopowerpc/bootwrapper: Custom build options for XPedite52xx targets
Nate Case [Thu, 11 Jun 2009 19:43:01 +0000 (14:43 -0500)] 
powerpc/bootwrapper: Custom build options for XPedite52xx targets

Some XPedite52xx boards have a legacy boot loader requiring some special
care in the boot wrapper.  The use of cuboot-85xx is needed to fix
up embedded device trees, and a custom link address is specified to
accommodate the boot loader and larger kernel image sizes used on X-ES
MPC85xx platforms.

Signed-off-by: Nate Case <ncase@xes-inc.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agopowerpc/85xx: Add defconfig for X-ES MPC85xx boards
Nate Case [Thu, 11 Jun 2009 19:43:00 +0000 (14:43 -0500)] 
powerpc/85xx: Add defconfig for X-ES MPC85xx boards

Signed-off-by: Nate Case <ncase@xes-inc.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agopowerpc/85xx: Add dts files for X-ES MPC85xx boards
Nate Case [Thu, 11 Jun 2009 19:42:59 +0000 (14:42 -0500)] 
powerpc/85xx: Add dts files for X-ES MPC85xx boards

Add device tree source files for various MPC85xx boards from Extreme
Engineering Solutions.  Supported boards include XPedite5370,
XPedite5200, XPedite5301, XPedite5330, and XCalibur1501.

Signed-off-by: Nate Case <ncase@xes-inc.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agopowerpc/85xx: Add platform support for X-ES MPC85xx boards
Nate Case [Thu, 11 Jun 2009 19:42:58 +0000 (14:42 -0500)] 
powerpc/85xx: Add platform support for X-ES MPC85xx boards

Add support for X-ES single-board computers based on the Freescale
MPC85xx processors.

Signed-off-by: Nate Case <ncase@xes-inc.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years ago83xx: add support for the kmeter1 board.
Heiko Schocher [Mon, 15 Jun 2009 07:38:18 +0000 (09:38 +0200)] 
83xx: add support for the kmeter1 board.

The following series implements basic board support for
the kmeter1 board from keymile, based on a MPC8360.

This series provides the following functionality:

- The board can boot with a serial console on UART1
- Ethernet:
    UCC1 in RGMII mode
    UCC2 in RGMII mode
    UCC4 in RMII mode
    UCC5 in RMII mode
    UCC6 in RMII mode
    UCC7 in RMII mode
    UCC8 in RMII mode

    following patch is necessary for working UCC in RMII mode:

    http://lists.ozlabs.org/pipermail/linuxppc-dev/2009-April/070804.html

- Flash accessed via MTD layer

  On this hardware there is an Intel P30 flash, following patch
  series is necessary for working with this hardware:

  http://lists.ozlabs.org/pipermail/linuxppc-dev/2009-April/070624.html

- I2C using I2C Bus 1 from the MPC8360 cpu

Signed-off-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agopowerpc/85xx: Add nor flash partitions for mpc8569mds
Kevin Hao [Wed, 27 May 2009 02:05:05 +0000 (10:05 +0800)] 
powerpc/85xx: Add nor flash partitions for mpc8569mds

Add 4 partitions in nor flash. Also fix nor flash bank width bug. The
flash is capable of x8/x16 width but is configured for x8.

Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agopowerpc/fsl: Increase the number of possible localbus banks
mware@internode.on.net [Wed, 10 Jun 2009 17:01:19 +0000 (17:01 +0000)] 
powerpc/fsl: Increase the number of possible localbus banks

Currently the fsl,*lbc devices support 8 banks (ie OR and BR registers).
This is adequate for most pq2 and pq3 processors, but not the MPC8280 which
has 12 banks.

Signed-Off-By: Mark Ware <mware@elphinstone.net>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agorio: warn_unused_result warnings fix
Yang Li [Mon, 11 May 2009 22:36:02 +0000 (22:36 +0000)] 
rio: warn_unused_result warnings fix

Adding failure path for the following two cases.

warning: ignoring return value of 'device_add', declared with attribute warn_unused_result
warning: ignoring return value of 'sysfs_create_bin_file', declared with attribute warn_unused_result

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agopowerpc/85xx: cuboot - Fix up ethernet3 MAC address on MPC85xx
Nate Case [Mon, 8 Jun 2009 22:17:42 +0000 (17:17 -0500)] 
powerpc/85xx: cuboot - Fix up ethernet3 MAC address on MPC85xx

Some MPC85xx platforms do support 4 ethernet ports, so make sure the boot
wrapper fixes up all of them in the fdt.

Since MAC addresses are at the end of the bd_t structure there is no harm
in expanding to support 4 MAC address on older 85xx systems that might not
have that many.

Signed-off-by: Nate Case <ncase@xes-inc.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agoserial: Make ucc_uart work in HW UART mode
Dave Liu [Mon, 8 Jun 2009 14:24:36 +0000 (22:24 +0800)] 
serial: Make ucc_uart work in HW UART mode

In HW UART mode the TxBD[READY] is not cleared by H/W (RISC engine) when
the user send characters to Tx buffer of QE UART.  So, these characters
stay on the QE forever, never go to UART line.

Signed-off-by: Dave Liu <daveliu@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agopowerpc: Enable additional BAT registers in setup_745x_specifics()
Gerhard Pircher [Sat, 6 Jun 2009 11:12:36 +0000 (11:12 +0000)] 
powerpc: Enable additional BAT registers in setup_745x_specifics()

Currently the kernel expects the additional four IBAT and DBAT registers
to be available, but doesn't enable these registers on 745x CPUs, which
have them disabled after reset. Thus set the HIGH_BAT_EN bit in HID0
register, if the corresponding MMU feature is defined.

Signed-off-by: Gerhard Pircher <gerhard_pircher@gmx.net>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agopowerpc/mpc83xx: Fix usb mux setup for mpc834x
Peter Korsgaard [Tue, 9 Jun 2009 11:43:32 +0000 (13:43 +0200)] 
powerpc/mpc83xx: Fix usb mux setup for mpc834x

usb0 and usb1 mux settings in the sicrl register were swapped (twice!)
in mpc834x_usb_cfg(), leading to various strange issues with fsl-ehci
and full speed devices.

The USB port config on mpc834x is done using 2 muxes: Port 0 is always
used for MPH port 0, and port 1 can either be used for MPH port 1 or DR
(unless DR uses UTMI phy or OTG, then it uses both ports) - See 8349 RM
figure 1-4..

mpc8349_usb_cfg() had this inverted for the DR, and it also had the bit
positions of the usb0 / usb1 mux settings swapped. It would basically
work if you specified port1 instead of port0 for the MPH controller (and
happened to use ULPI phys), which is what all the 834x dts have done,
even though that configuration is physically invalid.

Instead fix mpc8349_usb_cfg() and adjust the dts files to match reality.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agopowerpc/83xx: Add MSI interrupts to DTS of MPC8315E-RDB
leon.woestenberg@gmail.com [Sat, 6 Jun 2009 16:15:13 +0000 (09:15 -0700)] 
powerpc/83xx: Add MSI interrupts to DTS of MPC8315E-RDB

The PCIe MSI interrupts are missing from the device tree source, and
thus were not enabled. This patch adds them.

Tested to work on MPC8315E-RDB with custom FPGA PCIe device.

Signed-off-by: Leon Woestenberg <leon@sidebranch.com>
Tested-by: Leon Woestenberg <leon@sidebranch.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agopowerpc/86xx: Add I2C device mappings in DTS for SBC610
Martyn Welch [Tue, 19 May 2009 09:40:57 +0000 (10:40 +0100)] 
powerpc/86xx: Add I2C device mappings in DTS for SBC610

Mappings for temperature sensors (adt7461 and lm92) are missing from the
SBC610's DTS file.

Signed-off-by: Martyn Welch <martyn.welch@gefanuc.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agopowerpc/85xx: Add UCC6 and UCC8 nodes in SGMII mode for MPC8569MDS
Haiying Wang [Tue, 2 Jun 2009 14:04:16 +0000 (10:04 -0400)] 
powerpc/85xx: Add UCC6 and UCC8 nodes in SGMII mode for MPC8569MDS

Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agopowerpc/83xx: Update sdhci nodes per new bindings
Anton Vorontsov [Wed, 10 Jun 2009 15:19:26 +0000 (19:19 +0400)] 
powerpc/83xx: Update sdhci nodes per new bindings

As of commit 404614728f857d0ac63d29c3a29d0cf392a15598 ("Update FSL
esdhc binding"), we use "fsl,esdhc" compatible entry as a base
match. U-Boot will use the same compatible to fixup esdhc nodes.

This patch updates 83xx dts files so that they conform to the new
bindings.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agopowerpc/fsl-booke: Enable L1 cache on e500v1/e500v2/e500mc CPUs
Nate Case [Wed, 10 Jun 2009 20:37:28 +0000 (15:37 -0500)] 
powerpc/fsl-booke: Enable L1 cache on e500v1/e500v2/e500mc CPUs

Some boot loaders may not enable L1 instruction/data cache.  Check if
data and instruction caches are enabled, and enable them if needed.

Signed-off-by: Nate Case <ncase@xes-inc.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agopowerpc/mpc8272ads: fix device tree for 8 MB flash size
Wolfgang Denk [Tue, 12 May 2009 19:06:14 +0000 (21:06 +0200)] 
powerpc/mpc8272ads: fix device tree for 8 MB flash size

The current device tree for the MPC8272ADS assumes a mapping of 32 MB
of NOR flash at 0xFE00.0000, while there are actually only 8 MB on
the boards, mapped at 0xFF80.0000. When booting an uImage with such a
device tree, the kernel crashes because 0xFE00.0000 is not mapped.

Also introduce aliases for serial[01] and ethernet[01].

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agopowerpc/85xx: Add SWIOTLB support to FSL boards
Kumar Gala [Fri, 15 May 2009 05:37:35 +0000 (00:37 -0500)] 
powerpc/85xx: Add SWIOTLB support to FSL boards

Add the platform-specific code for enabling SWIOTLB if needed on P2020DS,
MPC85xx DS, and MPC85xx MDS boards as they are capable of having >4G of
memory.

We determine if we need to enable swiotlb based on how much memory is in
the board and if it exceeds 4G or what we can map via PCI inbound
windows.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agopowerpc: Add 86xx support for SWIOTLB
Becky Bruce [Thu, 14 May 2009 22:42:29 +0000 (17:42 -0500)] 
powerpc: Add 86xx support for SWIOTLB

This is the final bit of code to allow enabling swiotlb on
mpc86xx.  The platform-specific code is very small and consists
of enabling SWIOTLB in the config file, registering the
swiotlb_setup_bus_notifier initcall, and setting pci_dma_ops
to point to swiotlb_pci_dma_ops if we have more memory than
can be mapped by the inbound PCI windows.

Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agoBtrfs: always update root items for fs trees at commit time
Yan Zheng [Tue, 16 Jun 2009 00:01:02 +0000 (20:01 -0400)] 
Btrfs: always update root items for fs trees at commit time

commit_fs_roots skips updating root items for fs trees that aren't modified.
This is unsafe now that relocation code modifies root item's last_snapshot
field without modifying corresponding fs tree.

Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoocfs2/net: Use wait_event() in o2net_send_message_vec()
Sunil Mushran [Thu, 11 Jun 2009 18:02:03 +0000 (11:02 -0700)] 
ocfs2/net: Use wait_event() in o2net_send_message_vec()

Replace wait_event_interruptible() with wait_event() in o2net_send_message_vec().
This is because this function is called by the dlm that expects signals to be
blocked.

Fixes oss bugzilla#1126
http://oss.oracle.com/bugzilla/show_bug.cgi?id=1126

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
14 years agoocfs2: Adjust rightmost path in ocfs2_add_branch.
Tao Ma [Fri, 12 Jun 2009 06:18:36 +0000 (14:18 +0800)] 
ocfs2: Adjust rightmost path in ocfs2_add_branch.

In ocfs2_add_branch, we use the rightmost rec of the leaf extent block
to generate the e_cpos for the newly added branch. In the most case, it
is OK but if the parent extent block's rightmost rec covers more clusters
than the leaf does, it will cause kernel panic if we insert some clusters
in it. The message is something like:
(7445,1):ocfs2_insert_at_leaf:3775 ERROR: bug expression:
le16_to_cpu(el->l_next_free_rec) >= le16_to_cpu(el->l_count)
(7445,1):ocfs2_insert_at_leaf:3775 ERROR: inode 66053, depth 0, count 28,
next free 28, rec.cpos 270, rec.clusters 1, insert.cpos 275, insert.clusters 1
 [<fa7ad565>] ? ocfs2_do_insert_extent+0xb58/0xda0 [ocfs2]
 [<fa7b08f2>] ? ocfs2_insert_extent+0x5bd/0x6ba [ocfs2]
 [<fa7b1b8b>] ? ocfs2_add_clusters_in_btree+0x37f/0x564 [ocfs2]
...

The panic can be easily reproduced by the following small test case
(with bs=512, cs=4K, and I remove all the error handling so that it looks
clear enough for reading).

int main(int argc, char **argv)
{
int fd, i;
char buf[5] = "test";

fd = open(argv[1], O_RDWR|O_CREAT);

for (i = 0; i < 30; i++) {
lseek(fd, 40960 * i, SEEK_SET);
write(fd, buf, 5);
}

ftruncate(fd, 1146880);

lseek(fd, 1126400, SEEK_SET);
write(fd, buf, 5);

close(fd);

return 0;
}

The reason of the panic is that:
the 30 writes and the ftruncate makes the file's extent list looks like:

Tree Depth: 1   Count: 19   Next Free Rec: 1
## Offset        Clusters       Block#
0  0             280            86183
SubAlloc Bit: 7   SubAlloc Slot: 0
Blknum: 86183   Next Leaf: 0
CRC32: 00000000   ECC: 0000
Tree Depth: 0   Count: 28   Next Free Rec: 28
## Offset        Clusters       Block#          Flags
0  0             1              143368          0x0
1  10            1              143376          0x0
...
26 260           1              143576          0x0
27 270           1              143584          0x0

Now another write at 1126400(275 cluster) whiich will write at the gap
between 271 and 280 will trigger ocfs2_add_branch, but the result after
the function looks like:
Tree Depth: 1   Count: 19   Next Free Rec: 2
## Offset        Clusters       Block#
0  0             280            86183
1  271           0             143592
So the extent record is intersected and make the following operation bug out.

This patch just try to remove the gap before we add the new branch, so that
the root(branch) rightmost rec will cover the same right position. So in the
above case, before adding branch the tree will be changed to
Tree Depth: 1   Count: 19   Next Free Rec: 1
## Offset        Clusters       Block#
0  0             271            86183
SubAlloc Bit: 7   SubAlloc Slot: 0
Blknum: 86183   Next Leaf: 0
CRC32: 00000000   ECC: 0000
Tree Depth: 0   Count: 28   Next Free Rec: 28
## Offset        Clusters       Block#          Flags
0  0             1              143368          0x0
1  10            1              143376          0x0
...
26 260           1              143576          0x0
27 270           1              143584          0x0
And after branch add, the tree looks like
Tree Depth: 1   Count: 19   Next Free Rec: 2
## Offset        Clusters       Block#
0  0             271            86183
1  271           0             143592

Signed-off-by: Tao Ma <tao.ma@oracle.com>
Acked-by: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
14 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Mon, 15 Jun 2009 17:38:06 +0000 (10:38 -0700)] 
Merge branch 'release' of git://git./linux/kernel/git/aegl/linux-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] fix compile error in arch/ia64/mm/extable.c

14 years agoMerge branch 'timers-for-linus-migration' of git://git.kernel.org/pub/scm/linux/kerne...
Linus Torvalds [Mon, 15 Jun 2009 17:06:19 +0000 (10:06 -0700)] 
Merge branch 'timers-for-linus-migration' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'timers-for-linus-migration' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  timers: Logic to move non pinned timers
  timers: /proc/sys sysctl hook to enable timer migration
  timers: Identifying the existing pinned timers
  timers: Framework for identifying pinned timers
  timers: allow deferrable timers for intervals tv2-tv5 to be deferred

Fix up conflicts in kernel/sched.c and kernel/timer.c manually

14 years agoMerge branch 'timers-for-linus-clockevents' of git://git.kernel.org/pub/scm/linux...
Linus Torvalds [Mon, 15 Jun 2009 16:58:50 +0000 (09:58 -0700)] 
Merge branch 'timers-for-linus-clockevents' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'timers-for-linus-clockevents' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  clockevent: export register_device and delta2ns
  clockevents: tick_broadcast_device can become static

14 years agoMerge branch 'timers-for-linus-clocksource' of git://git.kernel.org/pub/scm/linux...
Linus Torvalds [Mon, 15 Jun 2009 16:58:33 +0000 (09:58 -0700)] 
Merge branch 'timers-for-linus-clocksource' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'timers-for-linus-clocksource' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  clocksource: prevent selection of low resolution clocksourse also for nohz=on
  clocksource: sanity check sysfs clocksource changes

14 years agoMerge branch 'timers-for-linus-ntp' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 15 Jun 2009 16:43:24 +0000 (09:43 -0700)] 
Merge branch 'timers-for-linus-ntp' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'timers-for-linus-ntp' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  ntp: fix comment typos
  ntp: adjust SHIFT_PLL to improve NTP convergence

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
Linus Torvalds [Mon, 15 Jun 2009 16:40:05 +0000 (09:40 -0700)] 
Merge git://git./linux/kernel/git/davem/net-next-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1244 commits)
  pkt_sched: Rename PSCHED_US2NS and PSCHED_NS2US
  ipv4: Fix fib_trie rebalancing
  Bluetooth: Fix issue with uninitialized nsh.type in DTL-1 driver
  Bluetooth: Fix Kconfig issue with RFKILL integration
  PIM-SM: namespace changes
  ipv4: update ARPD help text
  net: use a deferred timer in rt_check_expire
  ieee802154: fix kconfig bool/tristate muckup
  bonding: initialization rework
  bonding: use is_zero_ether_addr
  bonding: network device names are case sensative
  bonding: elminate bad refcount code
  bonding: fix style issues
  bonding: fix destructor
  bonding: remove bonding read/write semaphore
  bonding: initialize before registration
  bonding: bond_create always called with default parameters
  x_tables: Convert printk to pr_err
  netfilter: conntrack: optional reliable conntrack event delivery
  list_nulls: add hlist_nulls_add_head and hlist_nulls_del
  ...

14 years agohwmon: (max6650) Add support for alarms
Christian Engelmayer [Mon, 15 Jun 2009 16:39:52 +0000 (18:39 +0200)] 
hwmon: (max6650) Add support for alarms

Export the alarm flags provided by the MAX6650/MAX6651 fan-speed regulator
and monitor chips via sysfs.

Signed-off-by: Christian Engelmayer <christian.engelmayer@frequentis.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agohwmon: (f71882fg) Add support for the F71858F
Hans de Goede [Mon, 15 Jun 2009 16:39:52 +0000 (18:39 +0200)] 
hwmon: (f71882fg) Add support for the F71858F

Add support for the hwmon part of the Fintek F71858FG superio IC to the
f71882fg driver. Many thanks to Jelle de Jong for lending me a motherboard
with this superio on it.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agohwmon: (f71882fg) Add temp#_fault sysfs attr for f8000
Hans de Goede [Mon, 15 Jun 2009 16:39:51 +0000 (18:39 +0200)] 
hwmon: (f71882fg) Add temp#_fault sysfs attr for f8000

While working on f71852fg support I noticed that the f8000 sysfs attr
table was missing entries for temp#_fault, which the f8000 does have and
which we were already reading.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agohwmon: (f71882fg) Sanity check f8000 pwm settings
Hans de Goede [Mon, 15 Jun 2009 16:39:51 +0000 (18:39 +0200)] 
hwmon: (f71882fg) Sanity check f8000 pwm settings

We depend up on the pwm_enable register (0x96) not containing any reserved
settings in various places. We were already checking to make sure there
were no reserved settings in the register for the f71862fg, this patch adds
the same checking for the f8000, while at it it also moves the code to
a more apropriate place so we don't need to check if the fan/pwm part
of the IC is enabled twice.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agohwmon: (f71882fg) Cleanup f8000 pwm handling
Hans de Goede [Mon, 15 Jun 2009 16:39:50 +0000 (18:39 +0200)] 
hwmon: (f71882fg) Cleanup f8000 pwm handling

Currently we are using separate per model sysfs attr for the 3th pwm, because
the 3th pwm of the f8000 only has automatic mode and not manual mode. Doing
things this way was getting in the way for adding f71858fg support, so this
patch makes the pwm attr identical for all models, and instead adds a check
to store_pwm_enable() disallowing setting the 3th pwm to manual mode
on a f8000 IC.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agohwmon: PCI quirk for hwmon access on MSI MS-7031 board
Jean Delvare [Mon, 15 Jun 2009 16:39:50 +0000 (18:39 +0200)] 
hwmon: PCI quirk for hwmon access on MSI MS-7031 board

The MSI MS-7031 is based on an ATI IXP300 south bridge. On this south
bridge, accessible I/O ports must be enabled explicitly. Unfortunately
the BIOS forgets to enable access to the hardware monitoring chip I/O
ports, so hardware monitoring fails.

Add a quirk enabling access to the required ports (0x295-0x296). This
is exactly what MSI's own hardware monitoring application is doing, so
it has to be the right way.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agohwmon: (w83627ehf) Add W83627DHG-P support
Jean Delvare [Mon, 15 Jun 2009 16:39:50 +0000 (18:39 +0200)] 
hwmon: (w83627ehf) Add W83627DHG-P support

Add support for the new incarnation of the Winbond/Nuvoton W83627DHG
chip known as W83627DHG-P. It is basically the same as the original
W83627DHG with an additional automatic can speed control mode (not
supported by the driver yet.)

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Madhu <madhu.chinakonda@gmail.com>
14 years agohwmon: (tmp401) Add documentation
Andre Prendel [Mon, 15 Jun 2009 16:39:49 +0000 (18:39 +0200)] 
hwmon: (tmp401) Add documentation

Documentation for the tmp401 driver.

The documentation describes the tmp401 driver and the supported Texas
Instruments TMP401 and TMP411 temperature sensor chips.

Further documentation for new sysfs attributes supported by this
driver is added to Documentation/hwmon/sysfs-interface.

Signed-off-by: Andre Prendel <andre.prendel@gmx.de>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agohwmon: (tmp401) Add support for TI's TMP411 sensors chip
Andre Prendel [Mon, 15 Jun 2009 16:39:47 +0000 (18:39 +0200)] 
hwmon: (tmp401) Add support for TI's TMP411 sensors chip

This adds support for TI's TMP411 sensor chip.

Preliminary support were done by Gabriel Konat, Sander Leget and
Wouter Willems. The chip is compatible with TI's TMP401 sensor
chip. It has additional support for historical minimun/maximum
measurements.

Signed-off-by: Andre Prendel <andre.prendel@gmx.de>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agohwmon: (tmp401) Add support for TI's TMP401 sensor chip
Hans de Goede [Mon, 15 Jun 2009 16:39:46 +0000 (18:39 +0200)] 
hwmon: (tmp401) Add support for TI's TMP401 sensor chip

This is a new hwmon driver for TI's TMP401 temperature sensor IC. This driver
was written on behalf of an embedded systems vendor under the
Linux driver project.

It has been tested using a TI TMP401 sample attached to a i2c-tiny-usb adapter.
Which was provided by Till Harbaum, many thanks to him for this!

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agohwmon: (ibmaem) Automatically load on HC10 blade
Darrick J. Wong [Mon, 15 Jun 2009 16:39:46 +0000 (18:39 +0200)] 
hwmon: (ibmaem) Automatically load on HC10 blade

Enable auto-probing for the HC10 blade and amend the supported system
list.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agohwmon: Fix more __devexit_p glitches
Jean Delvare [Mon, 15 Jun 2009 16:39:45 +0000 (18:39 +0200)] 
hwmon: Fix more __devexit_p glitches

Make sure __devexit and devexit_p() match in all hwmon drivers.
Suggested by a similar fix from Mike Frysinger.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
14 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Mon, 15 Jun 2009 16:32:52 +0000 (09:32 -0700)] 
Merge branch 'merge' of git://git./linux/kernel/git/benh/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (103 commits)
  powerpc: Fix bug in move of altivec code to vector.S
  powerpc: Add support for swiotlb on 32-bit
  powerpc/spufs: Remove unused error path
  powerpc: Fix warning when printing a resource_size_t
  powerpc/xmon: Remove unused variable in xmon.c
  powerpc/pseries: Fix warnings when printing resource_size_t
  powerpc: Shield code specific to 64-bit server processors
  powerpc: Separate PACA fields for server CPUs
  powerpc: Split exception handling out of head_64.S
  powerpc: Introduce CONFIG_PPC_BOOK3S
  powerpc: Move VMX and VSX asm code to vector.S
  powerpc: Set init_bootmem_done on NUMA platforms as well
  powerpc/mm: Fix a AB->BA deadlock scenario with nohash MMU context lock
  powerpc/mm: Fix some SMP issues with MMU context handling
  powerpc: Add PTRACE_SINGLEBLOCK support
  fbdev: Add PLB support and cleanup DCR in xilinxfb driver.
  powerpc/virtex: Add ml510 reference design device tree
  powerpc/virtex: Add Xilinx ML510 reference design support
  powerpc/virtex: refactor intc driver and add support for i8259 cascading
  powerpc/virtex: Add support for Xilinx PCI host bridge
  ...

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6
Linus Torvalds [Mon, 15 Jun 2009 16:27:37 +0000 (09:27 -0700)] 
Merge branch 'for-linus' of git://git./linux/kernel/git/lrg/voltage-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6:
  regulator/max1586: fix V3 gain calculation integer overflow
  regulator/max1586: support increased V3 voltage range
  regulator: lp3971 - fix driver link error when built-in.
  LP3971 PMIC regulator driver (updated and combined version)
  regulator: remove driver_data direct access of struct device
  regulator: Set MODULE_ALIAS for regulator drivers
  regulator: Support list_voltage for fixed voltage regulator
  regulator: Move regulator drivers to subsys_initcall()
  regulator: build fix for powerpc - renamed show_state
  regulator: add userspace-consumer driver
  Maxim 1586 regulator driver

14 years ago[IA64] fix compile error in arch/ia64/mm/extable.c
Rusty Russell [Sat, 13 Jun 2009 05:20:15 +0000 (14:50 +0930)] 
[IA64] fix compile error in arch/ia64/mm/extable.c

ad6561dffa17f17bb68d7207d422c26c381c4313 ("module: trim exception table on init
free.") put a bogus trim_init_extable() function into ia64 which didn't compile.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Tony Luck <tony.luck@intel.com>
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke...
Linus Torvalds [Mon, 15 Jun 2009 16:13:49 +0000 (09:13 -0700)] 
Merge branch 'for-linus' of git://git./linux/kernel/git/ryusuke/nilfs2

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2: (22 commits)
  nilfs2: support contiguous lookup of blocks
  nilfs2: add sync_page method to page caches of meta data
  nilfs2: use device's backing_dev_info for btree node caches
  nilfs2: return EBUSY against delete request on snapshot
  nilfs2: modify list of unsupported features in caveats
  nilfs2: enable sync_page method
  nilfs2: set bio unplug flag for the last bio in segment
  nilfs2: allow future expansion of metadata read out via get info ioctl
  NILFS2: Pagecache usage optimization on NILFS2
  nilfs2: remove nilfs_btree_operations from btree mapping
  nilfs2: remove nilfs_direct_operations from direct mapping
  nilfs2: remove bmap pointer operations
  nilfs2: remove useless b_low and b_high fields from nilfs_bmap struct
  nilfs2: remove pointless NULL check of bpop_commit_alloc_ptr function
  nilfs2: move get block functions in bmap.c into btree codes
  nilfs2: remove nilfs_bmap_delete_block
  nilfs2: remove nilfs_bmap_put_block
  nilfs2: remove header file for segment list operations
  nilfs2: eliminate removal list of segments
  nilfs2: add sufile function that can modify multiple segment usages
  ...

14 years agotherm_windtunnel: Convert to a new-style i2c driver
Jean Delvare [Mon, 15 Jun 2009 16:01:52 +0000 (18:01 +0200)] 
therm_windtunnel: Convert to a new-style i2c driver

The legacy i2c binding model is going away soon, so convert the ppc
therm_windtunnel driver to the new model or it will break.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
14 years agotherm_adt746x: Convert to a new-style i2c driver
Jean Delvare [Mon, 15 Jun 2009 16:01:51 +0000 (18:01 +0200)] 
therm_adt746x: Convert to a new-style i2c driver

The legacy i2c binding model is going away soon, so convert the ppc
therm_adt746x driver to the new model or it will break.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Andreas Schwab <schwab@linux-m68k.org>
Tested-by: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agowindfarm: Convert to new-style i2c drivers
Jean Delvare [Mon, 15 Jun 2009 16:01:51 +0000 (18:01 +0200)] 
windfarm: Convert to new-style i2c drivers

The legacy i2c binding model is going away soon, so convert the
macintosh windfarm drivers to the new model or they will break.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Johannes Berg <johannes@sipsolutions.net>
Tested-by: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agotherm_pm72: Convert to a new-style i2c driver
Jean Delvare [Mon, 15 Jun 2009 16:01:50 +0000 (18:01 +0200)] 
therm_pm72: Convert to a new-style i2c driver

The legacy i2c binding model is going away soon, so convert the
macintosh therm_pm72 driver to the new model or it will break.

This is really a quick and dirty conversion, that should do the trick
for now, but no doubt that something cleaner can be done if anyone is
interested.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Tested-by: Paul Mackerras <paulus@samba.org>
14 years agoi2c-viapro: Add new PCI device ID for VX855
Harald Welte [Mon, 15 Jun 2009 16:01:49 +0000 (18:01 +0200)] 
i2c-viapro: Add new PCI device ID for VX855

The south bridge of the VIA VX855 chipset has a different PCI Device ID
so i2c-viapro.c needs to be updated with this.

Signed-off-by: Harald Welte <HaraldWelte@viatech.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agoi2c/chips: Move max6875 to drivers/misc/eeprom
Wolfram Sang [Mon, 15 Jun 2009 16:01:49 +0000 (18:01 +0200)] 
i2c/chips: Move max6875 to drivers/misc/eeprom

This driver only reads the user EEPROM of that chip, so we can move it
to the eeprom-directory in order to further clean up (and later remove)
drivers/i2c/chips.

The Kconfig text was updated to match the current functionality,
dropping the meanwhile obsoleted parts.

Defconfigs have been adapted.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Ben Gardner <gardner.ben@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agoi2c: Do not give adapters a default parent
Jean Delvare [Mon, 15 Jun 2009 16:01:48 +0000 (18:01 +0200)] 
i2c: Do not give adapters a default parent

We don't need to give adapters a parent if they don't have one. The
driver core will put them in the virtual device directory and all will
be fine.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agoi2c: Do not probe for TV chips on Voodoo3 adapters
Jean Delvare [Mon, 15 Jun 2009 16:01:48 +0000 (18:01 +0200)] 
i2c: Do not probe for TV chips on Voodoo3 adapters

There's no point in giving the I2C bus of Voodoo3 adapters a class
value, there's no video chip driver checking for it anymore. If
support is ever needed, the video device should be instantiated
explicitly rather than probed.

To the best of my knowledge the only video chip that can be found on
these boards is a BT869 video encoder, for which no support exists
currently.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
14 years agoi2c: Retry automatically on arbitration loss
Clifford Wolf [Mon, 15 Jun 2009 16:01:46 +0000 (18:01 +0200)] 
i2c: Retry automatically on arbitration loss

Some small changes in i2c core to retry i2c xfers until either the
maximum number of retries or the timeout is hit.

Signed-off-by: Clifford Wolf <clifford@clifford.at>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agoi2c: Remove void casts
Jack Stone [Mon, 15 Jun 2009 16:01:46 +0000 (18:01 +0200)] 
i2c: Remove void casts

Remove uneeded void casts.

Signed-off-by: Jack Stone <jwjstone@fastmail.fm>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agoALSA: ctxfi - Fix deadlock with xfi-timer
Takashi Iwai [Mon, 15 Jun 2009 12:50:52 +0000 (14:50 +0200)] 
ALSA: ctxfi - Fix deadlock with xfi-timer

The PCM x-fi native update routine can cause deadlocks when the
trigger(START) is called while the stream is running.

This patch fixes the deadlock by just postponing the pcm period update
to the next possible wake-up.  Also it adds the flip of ti->running
flag (just to be sure as now).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: intel8x0 - Fix PCM position craziness
Takashi Iwai [Mon, 15 Jun 2009 10:31:38 +0000 (12:31 +0200)] 
ALSA: intel8x0 - Fix PCM position craziness

The PCM pointer callback sometimes returns invalid positions and this
screws up the hw_ptr updater in PCM core.  Especially since now the
jiffies check is optional with xrun_debug, the invalid position is
handled as is, and causes serious sound skips, etc.

This patch simplifies the position-fix strategy in intel8x0 to be more
robust:
- just falls back to the last position if bogus position is detected
- another sanity check for the backward move of the position due to
  a race of register update and the base-index update

This patch is applicable also for 2.6.30.

Tested-by: David Miller <davem@davemloft.net>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoregulator/max1586: fix V3 gain calculation integer overflow
Philipp Zabel [Thu, 28 May 2009 19:00:03 +0000 (21:00 +0200)] 
regulator/max1586: fix V3 gain calculation integer overflow

On Thu, May 28, 2009 at 10:59 AM, Mark Brown <broonie@opensource.wolfsonmicro.com> wrote:
> On Thu, May 28, 2009 at 07:15:16AM +0200, Philipp Zabel wrote:
>> The V3 regulator can be configured with an external resistor
>> connected to the feedback pin (R24 in the data sheet) to
>> increase the voltage range.
>>
>> For example, hx4700 has R24 = 3.32 kOhm to achieve a maximum
>> V3 voltage of 1.55 V which is needed for 624 MHz CPU frequency.
>>
>> Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
>
> Looks good.
>
> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

Thanks, but it turns out I hit a 32 bit integer overflow in
the gain calculation. I'd like to mend that with the following
patch. Now max_uV could be increased up to 4.294 V, enough to
charge LiPo cells.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoregulator/max1586: support increased V3 voltage range
Philipp Zabel [Thu, 28 May 2009 05:15:16 +0000 (07:15 +0200)] 
regulator/max1586: support increased V3 voltage range

The V3 regulator can be configured with an external resistor
connected to the feedback pin (R24 in the data sheet) to
increase the voltage range.

For example, hx4700 has R24 = 3.32 kOhm to achieve a maximum
V3 voltage of 1.55 V which is needed for 624 MHz CPU frequency.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoregulator: lp3971 - fix driver link error when built-in.
Liam Girdwood [Tue, 19 May 2009 10:44:37 +0000 (11:44 +0100)] 
regulator: lp3971 - fix driver link error when built-in.

lp3971_i2c_remove' referenced in section `.data' of drivers/built-in.o:
defined in discarded section `.devexit.text' of drivers/built-in.o

Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoLP3971 PMIC regulator driver (updated and combined version)
Marek Szyprowski [Tue, 19 May 2009 05:33:55 +0000 (07:33 +0200)] 
LP3971 PMIC regulator driver (updated and combined version)

This patch adds regulator drivers for National Semiconductors LP3971 PMIC.
This LP3971 PMIC controller has 3 DC/DC voltage converters and 5 low
drop-out (LDO) regulators. LP3971 PMIC controller uses I2C interface.

Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoregulator: remove driver_data direct access of struct device
Greg Kroah-Hartman [Thu, 30 Apr 2009 22:21:37 +0000 (15:21 -0700)] 
regulator: remove driver_data direct access of struct device

In the near future, the driver core is going to not allow direct access
to the driver_data pointer in struct device.  Instead, the functions
dev_get_drvdata() and dev_set_drvdata() should be used.  These functions
have been around since the beginning, so are backwards compatible with
all older kernel versions.

Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoregulator: Set MODULE_ALIAS for regulator drivers
Mark Brown [Tue, 28 Apr 2009 10:13:55 +0000 (11:13 +0100)] 
regulator: Set MODULE_ALIAS for regulator drivers

Several of the regulator drivers didn't have MODULE_ALIAS so couldn't be
auto loaded. Add the MODULE_ALIAS in case they do get built as modules.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoregulator: Support list_voltage for fixed voltage regulator
Mark Brown [Tue, 28 Apr 2009 10:13:54 +0000 (11:13 +0100)] 
regulator: Support list_voltage for fixed voltage regulator

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoregulator: Move regulator drivers to subsys_initcall()
Mark Brown [Mon, 27 Apr 2009 17:21:18 +0000 (18:21 +0100)] 
regulator: Move regulator drivers to subsys_initcall()

Regulators need to be available early in init in order to allow them
to be available for consumers when requested. This is generally done
by registering them at subsys_initcall() time but not all regulator
drivers have done that. Convert these drivers to do so in order to
mimimise future support.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoregulator: build fix for powerpc - renamed show_state
Liam Girdwood [Tue, 28 Apr 2009 11:01:16 +0000 (12:01 +0100)] 
regulator: build fix for powerpc - renamed show_state

This patch fixes the follwing build failure on powerpc:-

> Today's linux-next build (powerpc allyesconfig) failed like this:
>
> drivers/regulator/userspace-consumer.c:43: error: conflicting types
> for 'show_state'
> include/linux/sched.h:273: note: previous definition of 'show_state'
> was here
>
> Caused by commit 5defa2bce704ca4151cfe24e4297aa7797cafd22 ("regulator:
> add userspace-consumer driver") which I have reverted for today.

Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoregulator: add userspace-consumer driver
Mike Rapoport [Sun, 26 Apr 2009 13:49:39 +0000 (16:49 +0300)] 
regulator: add userspace-consumer driver

The userspace-consumer driver allows control of voltage and current
regulator state from userspace. This is required for fine-grained
power management of devices that are completely controller by userspace
applications, e.g. a GPS transciever connected to a serial port.

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoMaxim 1586 regulator driver
Robert Jarzmik [Thu, 23 Apr 2009 18:10:43 +0000 (20:10 +0200)] 
Maxim 1586 regulator driver

The Maxim 1586 regulator is a voltage regulator with 2
voltage outputs, specially suitable for Marvell PXA
chips. One output is in the range of required VCC_CORE by
the PXA27x chips, the other in the VCC_USIM required as well
by PXA27x chips.

The chip is controlled through the I2C bus.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
David S. Miller [Mon, 15 Jun 2009 10:02:23 +0000 (03:02 -0700)] 
Merge branch 'master' of /linux/kernel/git/torvalds/linux-2.6

Conflicts:
Documentation/feature-removal-schedule.txt
drivers/scsi/fcoe/fcoe.c
net/core/drop_monitor.c
net/core/net-traces.c

14 years agopkt_sched: Rename PSCHED_US2NS and PSCHED_NS2US
Jarek Poplawski [Mon, 15 Jun 2009 09:31:47 +0000 (02:31 -0700)] 
pkt_sched: Rename PSCHED_US2NS and PSCHED_NS2US

Let's use TICKS instead of US, so PSCHED_TICKS2NS and PSCHED_NS2TICKS
(like in PSCHED_TICKS_PER_SEC already) to avoid misleading.

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv4: Fix fib_trie rebalancing
Jarek Poplawski [Mon, 15 Jun 2009 09:31:29 +0000 (02:31 -0700)] 
ipv4: Fix fib_trie rebalancing

While doing trie_rebalance(): resize(), inflate(), halve() RCU free
tnodes before updating their parents. It depends on RCU delaying the
real destruction, but if RCU readers start after call_rcu() and before
parent update they could access freed memory.

It is currently prevented with preempt_disable() on the update side,
but it's not safe, except maybe classic RCU, plus it conflicts with
memory allocations with GFP_KERNEL flag used from these functions.

This patch explicitly delays freeing of tnodes by adding them to the
list, which is flushed after the update is finished.

Reported-by: Yan Zheng <zheng.yan@oracle.com>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agops3flash: Always read chunks of 256 KiB, and cache them
Geert Uytterhoeven [Wed, 10 Jun 2009 04:39:08 +0000 (04:39 +0000)] 
ps3flash: Always read chunks of 256 KiB, and cache them

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agops3flash: Cache the last accessed FLASH chunk
Geert Uytterhoeven [Wed, 10 Jun 2009 04:39:07 +0000 (04:39 +0000)] 
ps3flash: Cache the last accessed FLASH chunk

Add support for caching, to reduce FLASH wear when writing using small
blocksizes. As we also don't care anymore about heads and tails in case of
partial writes, this greatly simplifies the code for handling writes.

Note: We don't bother caching reads smaller than the FLASH chunk size
(256 KiB).

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agops3: Replace direct file operations by callback
Geert Uytterhoeven [Wed, 10 Jun 2009 04:39:06 +0000 (04:39 +0000)] 
ps3: Replace direct file operations by callback

Currently the FLASH database is updated by the kernel using file operations,
meant for userspace only. While this works for us because copy_{from,to}_user()
on powerpc can handle kernel pointers, this is unportable and a bad example.
Replace the file operations by callbacks, registered by the ps3flash driver.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: Geoff Levand <geoffrey.levand@am.sony.com>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agops3: Switch ps3_os_area_[gs]et_rtc_diff to EXPORT_SYMBOL_GPL()
Geert Uytterhoeven [Wed, 10 Jun 2009 04:39:05 +0000 (04:39 +0000)] 
ps3: Switch ps3_os_area_[gs]et_rtc_diff to EXPORT_SYMBOL_GPL()

They were never intended to be exported using EXPORT_SYMBOL() anyway

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: Geoff Levand <geoffrey.levand@am.sony.com>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agops3: Correct debug message in dma_ioc0_map_pages()
Geert Uytterhoeven [Wed, 10 Jun 2009 04:39:04 +0000 (04:39 +0000)] 
ps3: Correct debug message in dma_ioc0_map_pages()

It reports the failure of a call to lv1_put_iopte(), not
lv1_map_device_dma_region().

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: Geoff Levand <geoffrey.levand@am.sony.com>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agodrivers/ps3: Add missing annotations
Geert Uytterhoeven [Wed, 10 Jun 2009 04:39:00 +0000 (04:39 +0000)] 
drivers/ps3: Add missing annotations

probe functions should be __devinit
initialization functions should be __init

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: Geoff Levand <geoffrey.levand@am.sony.com>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agops3fb: Use ps3_system_bus_[gs]et_drvdata() instead of direct access
Geert Uytterhoeven [Wed, 10 Jun 2009 04:38:57 +0000 (04:38 +0000)] 
ps3fb: Use ps3_system_bus_[gs]et_drvdata() instead of direct access

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: linux-fbdev-devel@lists.sourceforge.net
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agops3flash: Use ps3_system_bus_[gs]et_drvdata() instead of direct access
Geert Uytterhoeven [Wed, 10 Jun 2009 04:38:55 +0000 (04:38 +0000)] 
ps3flash: Use ps3_system_bus_[gs]et_drvdata() instead of direct access

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agops3: shorten ps3_system_bus_[gs]et_driver_data to ps3_system_bus_[gs]et_drvdata
Geert Uytterhoeven [Wed, 10 Jun 2009 04:38:54 +0000 (04:38 +0000)] 
ps3: shorten ps3_system_bus_[gs]et_driver_data to ps3_system_bus_[gs]et_drvdata

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: Geoff Levand <geoffrey.levand@am.sony.com>
Cc: Jim Paris <jim@jtan.com>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agops3: Use dev_[gs]et_drvdata() instead of direct access for system bus devices
Geert Uytterhoeven [Wed, 10 Jun 2009 04:38:53 +0000 (04:38 +0000)] 
ps3: Use dev_[gs]et_drvdata() instead of direct access for system bus devices

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: Geoff Levand <geoffrey.levand@am.sony.com>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agoblock/ps3: remove driver_data direct access of struct device
Roel Kluin [Wed, 10 Jun 2009 04:38:52 +0000 (04:38 +0000)] 
block/ps3: remove driver_data direct access of struct device

In the near future, the driver core is going to not allow direct access
to the driver_data pointer in struct device.  Instead, the functions
dev_get_drvdata() and dev_set_drvdata() should be used.  These functions
have been around since the beginning, so are backwards compatible with
all older kernel versions.

[Geert: Use ps3_system_bus_[gs]et_driver_data() for ps3_system_bus_device]

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: Jim Paris <jim@jtan.com>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agops3vram: Make ps3vram_priv.reports a void *
Geert Uytterhoeven [Wed, 10 Jun 2009 04:38:51 +0000 (04:38 +0000)] 
ps3vram: Make ps3vram_priv.reports a void *

So we can kill a cast.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: Jim Paris <jim@jtan.com>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agops3vram: Remove no longer used ps3vram_priv.ddr_base
Geert Uytterhoeven [Wed, 10 Jun 2009 04:38:50 +0000 (04:38 +0000)] 
ps3vram: Remove no longer used ps3vram_priv.ddr_base

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: Jim Paris <jim@jtan.com>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agops3vram: Replace mutex by spinlock + bio_list
Geert Uytterhoeven [Wed, 10 Jun 2009 04:38:41 +0000 (04:38 +0000)] 
ps3vram: Replace mutex by spinlock + bio_list

Remove the mutex serializing access to the cache.
Instead, queue up new requests on a bio_list if the driver is busy.

This improves sequential write performance by ca. 2%.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: Jim Paris <jim@jtan.com>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agoblock: Add bio_list_peek()
Geert Uytterhoeven [Wed, 10 Jun 2009 04:38:40 +0000 (04:38 +0000)] 
block: Add bio_list_peek()

Introduce bio_list_peek(), to obtain a pointer to the first bio on the bio_list
without actually removing it from the list. This is needed when you want to
serialize based on the list being empty or not.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Acked-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>