]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
15 years agoriowatchdog: Convert to pure OF driver.
David S. Miller [Fri, 29 Aug 2008 22:35:59 +0000 (15:35 -0700)]
riowatchdog: Convert to pure OF driver.

This also cleans up a lot of crud in this driver:

1) Don't touch the BBC regs, just leave the watchdog trigger
   behavior whatever the firmware programmed it to.

2) Use WATCHDOG_MINOR instead of hardcoded and not properly
   allocated RIOWD_MINOR.

Hey, I haven't touched it since I wrote it years ago :-)

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc64: Use generic starfire RTC driver.
David S. Miller [Fri, 29 Aug 2008 08:35:19 +0000 (01:35 -0700)]
sparc64: Use generic starfire RTC driver.

Also, delete the mini RTC driver, no longer used.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agortc: Add Starfire platform RTC driver.
David S. Miller [Fri, 29 Aug 2008 06:02:36 +0000 (23:02 -0700)]
rtc: Add Starfire platform RTC driver.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc64: Use generic sun4v RTC driver.
David S. Miller [Fri, 29 Aug 2008 08:34:27 +0000 (01:34 -0700)]
sparc64: Use generic sun4v RTC driver.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agortc: Add Sun4V hypervisor RTC driver.
David S. Miller [Fri, 29 Aug 2008 08:32:43 +0000 (01:32 -0700)]
rtc: Add Sun4V hypervisor RTC driver.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc64: Use generic BQ4802 RTC driver.
David S. Miller [Fri, 29 Aug 2008 04:54:34 +0000 (21:54 -0700)]
sparc64: Use generic BQ4802 RTC driver.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agortc: Add TI BQ4802 RTC driver.
David S. Miller [Fri, 29 Aug 2008 08:29:53 +0000 (01:29 -0700)]
rtc: Add TI BQ4802 RTC driver.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc64: Use generic CMOS driver.
David S. Miller [Fri, 29 Aug 2008 05:16:15 +0000 (22:16 -0700)]
sparc64: Use generic CMOS driver.

Based largely upon a patch by Krzysztof Helt <krzysztof.h1@poczta.fm>

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc: asm/mostek.h is now 32-bit only
David S. Miller [Thu, 28 Aug 2008 23:46:23 +0000 (16:46 -0700)]
sparc: asm/mostek.h is now 32-bit only

No need for the 64-bit header version any more.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc64: Convert Mostek rtc to use generic RTC layer driver.
David S. Miller [Fri, 29 Aug 2008 04:06:27 +0000 (21:06 -0700)]
sparc64: Convert Mostek rtc to use generic RTC layer driver.

Based largely upon a patch by Krzysztof Helt <krzysztof.h1@poczta.fm>

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc64: Check for RTC class device in update_persistent_clock().
David S. Miller [Fri, 29 Aug 2008 00:34:31 +0000 (17:34 -0700)]
sparc64: Check for RTC class device in update_persistent_clock().

As we convert the various by-hand sparc64 RTC drivers to use the
generic RTC framework and drivers, we need to keep the NTP
set_rtc_mmss() support via update_persistent_clock() working.

In the end, after all the RTC device cases are converted, this
local set_rtc_mmss() function will be deleted.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc64: Select RTC_CLASS
David S. Miller [Fri, 29 Aug 2008 00:28:37 +0000 (17:28 -0700)]
sparc64: Select RTC_CLASS

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agortc: Allow RTC_DRV_CMOS to be used on SPARC.
David S. Miller [Fri, 29 Aug 2008 02:54:17 +0000 (19:54 -0700)]
rtc: Allow RTC_DRV_CMOS to be used on SPARC.

Add Sparc to the Kconfig depends list.

Add __sparc___ to address_sparc = 128 ifdef.

Finally, don't be concerned about 24-hour BCD mode support if the RTC
doesn't have a valid IRQ.  We won't even use the alarm code in this
case and the Sparc RTCs have this limitation.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc: Remove Documentation/sparc/sbus_drivers.txt
David S. Miller [Thu, 28 Aug 2008 02:59:48 +0000 (19:59 -0700)]
sparc: Remove Documentation/sparc/sbus_drivers.txt

None of the text in this document is relevant any more.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc: Delete asm/sbus*.h
David S. Miller [Wed, 27 Aug 2008 12:04:18 +0000 (05:04 -0700)]
sparc: Delete asm/sbus*.h

No longer used.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc: Kill now spurious includes of sbus.h
David S. Miller [Thu, 28 Aug 2008 02:54:01 +0000 (19:54 -0700)]
sparc: Kill now spurious includes of sbus.h

In order to make this week I also had to add an include
of linux/dma-mapping.h to asm/pci_32.h because drivers/pci/pci.c
really depends upon getting this header somehow.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc32: Kill iounit_map_dma_*().
David S. Miller [Wed, 27 Aug 2008 04:14:05 +0000 (21:14 -0700)]
sparc32: Kill iounit_map_dma_*().

Unused.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc: Kill sbus_bus_type.
David S. Miller [Thu, 28 Aug 2008 02:45:20 +0000 (19:45 -0700)]
sparc: Kill sbus_bus_type.

No longer used.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc: Remove generic SBUS probing layer.
David S. Miller [Wed, 27 Aug 2008 11:54:04 +0000 (04:54 -0700)]
sparc: Remove generic SBUS probing layer.

The individual SBUS IOMMU arch code now sets the IOMMU information
directly into the OF device objects.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc: Add OF archdata propagation helper.
David S. Miller [Wed, 27 Aug 2008 11:22:37 +0000 (04:22 -0700)]
sparc: Add OF archdata propagation helper.

Add a helper function that, given a bus of_device node, propagates
all iommu, stc, and host_controller values down to the child nodes.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc: Kill sbus_arch_preinit().
David S. Miller [Wed, 27 Aug 2008 11:20:14 +0000 (04:20 -0700)]
sparc: Kill sbus_arch_preinit().

32-bit sparc just needed it to register the ioport procfs bits, do this
via an arch_initcall() instead.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc32: Kill sbus_is_slave().
David S. Miller [Wed, 27 Aug 2008 11:18:55 +0000 (04:18 -0700)]
sparc32: Kill sbus_is_slave().

Unused.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc: Kill OBP property members of sbus_dev and sbus_bus
David S. Miller [Wed, 27 Aug 2008 11:18:02 +0000 (04:18 -0700)]
sparc: Kill OBP property members of sbus_dev and sbus_bus

Unused.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc: Kill sbus_devaddr() and sbus_dev_slot().
David S. Miller [Wed, 27 Aug 2008 11:17:24 +0000 (04:17 -0700)]
sparc: Kill sbus_devaddr() and sbus_dev_slot().

Unused.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc: Kill sbus_ioremap() and sbus_iounmap().
David S. Miller [Wed, 27 Aug 2008 11:11:16 +0000 (04:11 -0700)]
sparc: Kill sbus_ioremap() and sbus_iounmap().

No more users.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc: Convert remaining sbus_ioremap() and sbus_iounmap() users.
David S. Miller [Wed, 27 Aug 2008 11:05:35 +0000 (04:05 -0700)]
sparc: Convert remaining sbus_ioremap() and sbus_iounmap() users.

Use of_ioremap() and of_iounmap() instead.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc: Remove dinky old-style SBUS probing facilities.
David S. Miller [Wed, 27 Aug 2008 10:47:56 +0000 (03:47 -0700)]
sparc: Remove dinky old-style SBUS probing facilities.

No drivers or code uses this stuff any more, every driver has been
converted over to OF device probing.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc: Remove SBUS layer resource and irq handling.
David S. Miller [Wed, 27 Aug 2008 10:38:42 +0000 (03:38 -0700)]
sparc: Remove SBUS layer resource and irq handling.

All the drivers use OF device objects now for this
information.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc: Kill SBUS layer IRQ hooks.
David S. Miller [Wed, 27 Aug 2008 09:56:39 +0000 (02:56 -0700)]
sparc: Kill SBUS layer IRQ hooks.

IRQs are obtained by drivers from the of_device struct.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc32: Convert sun4d IRQ code to use generic device tree probing.
David S. Miller [Wed, 27 Aug 2008 09:50:57 +0000 (02:50 -0700)]
sparc32: Convert sun4d IRQ code to use generic device tree probing.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc32: Convert pmc to OF driver.
David S. Miller [Wed, 27 Aug 2008 09:48:26 +0000 (02:48 -0700)]
sparc32: Convert pmc to OF driver.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc32: Convert apc to OF driver.
David S. Miller [Wed, 27 Aug 2008 09:45:36 +0000 (02:45 -0700)]
sparc32: Convert apc to OF driver.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc32: Make mmu_map_dma_area and mmu_unmap_dma_area take a device pointer.
David S. Miller [Thu, 28 Aug 2008 01:40:38 +0000 (18:40 -0700)]
sparc32: Make mmu_map_dma_area and mmu_unmap_dma_area take a device pointer.

This lets us kill this "map it in every IOMMU" crazy code, and also
some of the final references to sbus_root.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc32: Kill mmu_translate_dvma and implementations.
David S. Miller [Wed, 27 Aug 2008 09:29:50 +0000 (02:29 -0700)]
sparc32: Kill mmu_translate_dvma and implementations.

No longer used.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc32: Kill mmu_translate_dvma() usage.
David S. Miller [Wed, 27 Aug 2008 09:20:35 +0000 (02:20 -0700)]
sparc32: Kill mmu_translate_dvma() usage.

Just simply use virt_to_page() on the provided virtual address pointer.

Kill #if 0'd code.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc64: Convert SBUS floppy probing to use OF device objects.
David S. Miller [Wed, 27 Aug 2008 08:55:54 +0000 (01:55 -0700)]
sparc64: Convert SBUS floppy probing to use OF device objects.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc: Convert uctrl driver to OF driver.
David S. Miller [Thu, 28 Aug 2008 01:39:47 +0000 (18:39 -0700)]
sparc: Convert uctrl driver to OF driver.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc: Convert flash driver to OF device probing.
David S. Miller [Wed, 27 Aug 2008 08:13:12 +0000 (01:13 -0700)]
sparc: Convert flash driver to OF device probing.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agofore200e: Convert over to pure OF driver.
David S. Miller [Wed, 27 Aug 2008 08:06:07 +0000 (01:06 -0700)]
fore200e: Convert over to pure OF driver.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agocs4231: Convert SBUS side to OF driver.
David S. Miller [Thu, 28 Aug 2008 01:24:01 +0000 (18:24 -0700)]
cs4231: Convert SBUS side to OF driver.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoalsa: Remove special SBUS dma support code.
David S. Miller [Wed, 27 Aug 2008 07:33:26 +0000 (00:33 -0700)]
alsa: Remove special SBUS dma support code.

No longer used.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agocs4231: Use SNDRV_DMA_TYPE_DEV instead of SNDRV_DMA_TYPE_SBUS.
David S. Miller [Wed, 27 Aug 2008 07:31:36 +0000 (00:31 -0700)]
cs4231: Use SNDRV_DMA_TYPE_DEV instead of SNDRV_DMA_TYPE_SBUS.

SBUS layer now uses dma_*() interfaces, no need for special DMA code
any longer.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodbri: Convert to pure OF driver.
David S. Miller [Wed, 27 Aug 2008 07:30:59 +0000 (00:30 -0700)]
dbri: Convert to pure OF driver.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoamd7930: Convert to pure OF driver.
David S. Miller [Wed, 27 Aug 2008 07:29:27 +0000 (00:29 -0700)]
amd7930: Convert to pure OF driver.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoqlogicpti: Convert to pure OF driver.
David S. Miller [Wed, 27 Aug 2008 07:24:00 +0000 (00:24 -0700)]
qlogicpti: Convert to pure OF driver.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosun_esp: Convert to pure OF driver.
David S. Miller [Wed, 27 Aug 2008 07:20:58 +0000 (00:20 -0700)]
sun_esp: Convert to pure OF driver.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoparport_sunbpp: Convert to pure OF driver.
David S. Miller [Wed, 27 Aug 2008 07:17:50 +0000 (00:17 -0700)]
parport_sunbpp: Convert to pure OF driver.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosunqe: Convert to pure OF driver.
David S. Miller [Wed, 27 Aug 2008 07:12:27 +0000 (00:12 -0700)]
sunqe: Convert to pure OF driver.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosunlance: Convert to pure OF driver.
David S. Miller [Wed, 27 Aug 2008 07:07:53 +0000 (00:07 -0700)]
sunlance: Convert to pure OF driver.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosunhme: Convert to pure OF driver.
David S. Miller [Fri, 29 Aug 2008 09:14:29 +0000 (02:14 -0700)]
sunhme: Convert to pure OF driver.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosunbmac: Convert to pure OF driver.
David S. Miller [Wed, 27 Aug 2008 06:40:25 +0000 (23:40 -0700)]
sunbmac: Convert to pure OF driver.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomyri_sbus: Convert to pure OF driver.
David S. Miller [Wed, 27 Aug 2008 06:36:58 +0000 (23:36 -0700)]
myri_sbus: Convert to pure OF driver.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc: Move SBUS DMA attribute interfaces out of asm/sbus.h
David S. Miller [Wed, 27 Aug 2008 06:33:42 +0000 (23:33 -0700)]
sparc: Move SBUS DMA attribute interfaces out of asm/sbus.h

This is in preparation for the subsequent asm/sbus.h removal.

Also, make these routines take a "struct device" or no
arguments, as appropriate.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc: Convert all SBUS drivers to dma_*() interfaces.
David S. Miller [Thu, 28 Aug 2008 01:09:11 +0000 (18:09 -0700)]
sparc: Convert all SBUS drivers to dma_*() interfaces.

And all the SBUS dma interfaces are deleted.

A private implementation remains inside of the 32-bit sparc port which
exists only for the sake of the implementation of dma_*().

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc32: Implement more generic dma_*() interfaces.
David S. Miller [Thu, 28 Aug 2008 01:01:36 +0000 (18:01 -0700)]
sparc32: Implement more generic dma_*() interfaces.

These dispatch to either PCI or SBUS routines based upon
the device bus type.

This will allow us to let SBUS drivers call these routines.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc32: Make mmu_{get,release}_*() take a struct device pointer.
David S. Miller [Wed, 27 Aug 2008 06:00:58 +0000 (23:00 -0700)]
sparc32: Make mmu_{get,release}_*() take a struct device pointer.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc: Make SBUS DMA interfaces take struct device.
David S. Miller [Thu, 28 Aug 2008 01:37:58 +0000 (18:37 -0700)]
sparc: Make SBUS DMA interfaces take struct device.

This is the first step in converting all the SBUS drivers
over to generic dma_*().

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc: Propagate SBUS iommu archdata into real of_device objects.
David S. Miller [Tue, 26 Aug 2008 05:52:37 +0000 (22:52 -0700)]
sparc: Propagate SBUS iommu archdata into real of_device objects.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc32: Make IOMMU and IO-UNIT init work with device nodes.
David S. Miller [Tue, 26 Aug 2008 05:47:20 +0000 (22:47 -0700)]
sparc32: Make IOMMU and IO-UNIT init work with device nodes.

And stick the iommu archdata pointer into the generic OF device tree
of_device struct as well.

We still have to pass the sbus_bus object down into the routines so
that the SBUS bus objects get the iommu cookies set properly.  After
drivers get converted to being pure OF drivers, that can go away.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc: Kill SBUS DVMA layer.
David S. Miller [Thu, 28 Aug 2008 00:01:57 +0000 (17:01 -0700)]
sparc: Kill SBUS DVMA layer.

This thing was completely pointless.

Just find the OF device in the parent of drivers that want to program
this device, and map the DMA regs inside such drivers too.

This also moves the dummy claim_dma_lock() and release_dma_lock()
implementation to floppy_32.h, which makes it handle this issue
just like floppy_64.h does.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc: Kill videopix SBUS driver.
David S. Miller [Wed, 27 Aug 2008 05:26:21 +0000 (22:26 -0700)]
sparc: Kill videopix SBUS driver.

This has been marked BROKEN for a long time and it's more likely
to get rewritten from scratch than to be fixed up and made usable.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc: Delete bare sbus char bpp driver, obsoleted by parport_sunbpp
David S. Miller [Wed, 27 Aug 2008 05:25:03 +0000 (22:25 -0700)]
sparc: Delete bare sbus char bpp driver, obsoleted by parport_sunbpp

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc64: Fix irq_of_parse_and_map() and irq_dispose_mapping().
David S. Miller [Mon, 25 Aug 2008 23:44:58 +0000 (16:44 -0700)]
sparc64: Fix irq_of_parse_and_map() and irq_dispose_mapping().

Stephen Rothwell noticed that I committed an earlier version
of the patch that didn't have two things fixed:

1) irq_of_parse_and_map() should return "unsigned int" not "int"
   and it should return zero for "no irq"

2) irq_dispose_mapping() should be an inline function, not a macro,
   for type checking

With feedback and suggestions from Anton Vorontsov.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc64: Use the cond_syscall()s in kernel/sys_ni.c instead of home-grown copy.
David S. Miller [Mon, 25 Aug 2008 23:21:08 +0000 (16:21 -0700)]
sparc64: Use the cond_syscall()s in kernel/sys_ni.c instead of home-grown copy.

This also allows arch/sparc64/kernel/pci.c to be properly CONFIG_PCI
conditional compiled in the Makefile.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc64: Add JBUS UltraSPARC-IIIi support to memory controller driver.
David S. Miller [Mon, 25 Aug 2008 20:38:30 +0000 (13:38 -0700)]
sparc64: Add JBUS UltraSPARC-IIIi support to memory controller driver.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc64: Allow chmc to be built as a module.
David S. Miller [Mon, 25 Aug 2008 05:17:29 +0000 (22:17 -0700)]
sparc64: Allow chmc to be built as a module.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc64: Add generic interface for registering a dimm printing handler.
David S. Miller [Mon, 25 Aug 2008 05:08:34 +0000 (22:08 -0700)]
sparc64: Add generic interface for registering a dimm printing handler.

The way to do this varies by platform type and the exact memory
controller the cpu uses.

For Spitfire cpus we currently just use prom_getunumber() and hope
that works.

For Cheetah cpus we have a memory controller driver that can
compute this information.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc64: Use consistent chmc_ prefix in variables, types, and functions.
David S. Miller [Mon, 25 Aug 2008 04:45:44 +0000 (21:45 -0700)]
sparc64: Use consistent chmc_ prefix in variables, types, and functions.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc64: Convert UltraSPARC-III memory controller driver to OF driver probing.
David S. Miller [Mon, 25 Aug 2008 04:32:42 +0000 (21:32 -0700)]
sparc64: Convert UltraSPARC-III memory controller driver to OF driver probing.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agohwmon: Add Ultra45 workstation hwmon driver.
David S. Miller [Mon, 25 Aug 2008 03:59:49 +0000 (20:59 -0700)]
hwmon: Add Ultra45 workstation hwmon driver.

This is a PIC16F747 based controller that monitors and consolidates
the hardware access to various fan and temperature values reported by
adr7462 and similar devices behind an I2C bus.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc64: Kill duplicated sys_pause() implementation.
David S. Miller [Mon, 25 Aug 2008 03:13:42 +0000 (20:13 -0700)]
sparc64: Kill duplicated sys_pause() implementation.

sys32_pause() is identical to the generically provided
sys_pause() in kernel/signal.c

Noticed by Christoph Hellwig.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc64: Split syscall_trace() into two functions.
David S. Miller [Mon, 25 Aug 2008 03:10:23 +0000 (20:10 -0700)]
sparc64: Split syscall_trace() into two functions.

Christoph Hellwig noticed that having both entry and exit
logic in one function no longer makes sense, and having
seperate ones simplifies things a lot.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc: Add GPIO layer support.
David S. Miller [Thu, 21 Aug 2008 06:03:24 +0000 (23:03 -0700)]
sparc: Add GPIO layer support.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc: Implement irq_of_parse_and_map() and irq_dispose_mapping().
David S. Miller [Wed, 20 Aug 2008 23:34:39 +0000 (16:34 -0700)]
sparc: Implement irq_of_parse_and_map() and irq_dispose_mapping().

This allows more OF layer code to be shared between powerpc and
sparc.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc: Add mutex for set property calls.
David S. Miller [Wed, 20 Aug 2008 04:56:35 +0000 (21:56 -0700)]
sparc: Add mutex for set property calls.

On some platforms, the I2C controller is shared between the OS and
OBP.  OBP uses this I2C controller to access the EEPROM, and thus is
programmed when the kernel calls prom_setprop().

Wrap such calls with the new of_set_property_mutex.

Relevant I2C bus drivers can grab this mutex around top-level I2C
operations to provide the proper protection.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc64: Add JBUS NUMA detection.
David S. Miller [Tue, 19 Aug 2008 03:36:17 +0000 (20:36 -0700)]
sparc64: Add JBUS NUMA detection.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoFix oops in acer_wmi driver (acer_wmi_init)
Arjan van de Ven [Sun, 24 Aug 2008 04:45:21 +0000 (21:45 -0700)]
Fix oops in acer_wmi driver (acer_wmi_init)

The acer_wmi driver does a DMI scan for quirks, and then sets flags into the
"interface" datastructure for some cases. However, the quirks happen real early
before "interface" is per se initialized from NULL.

The patch below 1) adds a NULL pointer check and 2) (re)runs the quirks at the
end, when "interface" has it's final value.

Reported-by: kerneloops.org
Acked-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
CC: stable@vger.kernel.org
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Sat, 23 Aug 2008 19:14:42 +0000 (12:14 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  ipv6: protocol for address routes
  icmp: icmp_sk() should not use smp_processor_id() in preemptible code
  pkt_sched: Fix qdisc list locking
  pkt_sched: Fix qdisc_watchdog() vs. dev_deactivate() race
  sctp: fix potential panics in the SCTP-AUTH API.

15 years agoremoved unused #include <linux/version.h>'s
Adrian Bunk [Sun, 17 Aug 2008 14:36:59 +0000 (17:36 +0300)]
removed unused #include <linux/version.h>'s

This patch lets the files using linux/version.h match the files that
#include it.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoipv6: protocol for address routes
Stephen Hemminger [Sat, 23 Aug 2008 12:16:46 +0000 (05:16 -0700)]
ipv6: protocol for address routes

This fixes a problem spotted with zebra, but not sure if it is
necessary a kernel problem.  With IPV6 when an address is added to an
interface, Zebra creates a duplicate RIB entry, one as a connected
route, and other as a kernel route.

When an address is added to an interface the RTN_NEWADDR message
causes Zebra to create a connected route. In IPV4 when an address is
added to an interface a RTN_NEWROUTE message is set to user space with
the protocol RTPROT_KERNEL. Zebra ignores these messages, because it
already has the connected route.

The problem is that route created in IPV6 has route protocol ==
RTPROT_BOOT.  Was this a design decision or a bug? This fixes it. Same
patch applies to both net-2.6 and stable.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoicmp: icmp_sk() should not use smp_processor_id() in preemptible code
Denis V. Lunev [Sat, 23 Aug 2008 11:43:33 +0000 (04:43 -0700)]
icmp: icmp_sk() should not use smp_processor_id() in preemptible code

Pass namespace into icmp_xmit_lock, obtain socket inside and return
it as a result for caller.

Thanks Alexey Dobryan for this report:

Steps to reproduce:

CONFIG_PREEMPT=y
CONFIG_DEBUG_PREEMPT=y
tracepath <something>

BUG: using smp_processor_id() in preemptible [00000000] code: tracepath/3205
caller is icmp_sk+0x15/0x30
Pid: 3205, comm: tracepath Not tainted 2.6.27-rc4 #1

Call Trace:
 [<ffffffff8031af14>] debug_smp_processor_id+0xe4/0xf0
 [<ffffffff80409405>] icmp_sk+0x15/0x30
 [<ffffffff8040a17b>] icmp_send+0x4b/0x3f0
 [<ffffffff8025a415>] ? trace_hardirqs_on_caller+0xd5/0x160
 [<ffffffff8025a4ad>] ? trace_hardirqs_on+0xd/0x10
 [<ffffffff8023a475>] ? local_bh_enable_ip+0x95/0x110
 [<ffffffff804285b9>] ? _spin_unlock_bh+0x39/0x40
 [<ffffffff8025a26c>] ? mark_held_locks+0x4c/0x90
 [<ffffffff8025a4ad>] ? trace_hardirqs_on+0xd/0x10
 [<ffffffff8025a415>] ? trace_hardirqs_on_caller+0xd5/0x160
 [<ffffffff803e91b4>] ip_fragment+0x8d4/0x900
 [<ffffffff803e7030>] ? ip_finish_output2+0x0/0x290
 [<ffffffff803e91e0>] ? ip_finish_output+0x0/0x60
 [<ffffffff803e6650>] ? dst_output+0x0/0x10
 [<ffffffff803e922c>] ip_finish_output+0x4c/0x60
 [<ffffffff803e92e3>] ip_output+0xa3/0xf0
 [<ffffffff803e68d0>] ip_local_out+0x20/0x30
 [<ffffffff803e753f>] ip_push_pending_frames+0x27f/0x400
 [<ffffffff80406313>] udp_push_pending_frames+0x233/0x3d0
 [<ffffffff804067d1>] udp_sendmsg+0x321/0x6f0
 [<ffffffff8040d155>] inet_sendmsg+0x45/0x80
 [<ffffffff803b967f>] sock_sendmsg+0xdf/0x110
 [<ffffffff8024a100>] ? autoremove_wake_function+0x0/0x40
 [<ffffffff80257ce5>] ? validate_chain+0x415/0x1010
 [<ffffffff8027dc10>] ? __do_fault+0x140/0x450
 [<ffffffff802597d0>] ? __lock_acquire+0x260/0x590
 [<ffffffff803b9e55>] ? sockfd_lookup_light+0x45/0x80
 [<ffffffff803ba50a>] sys_sendto+0xea/0x120
 [<ffffffff80428e42>] ? _spin_unlock_irqrestore+0x42/0x80
 [<ffffffff803134bc>] ? __up_read+0x4c/0xb0
 [<ffffffff8024e0c6>] ? up_read+0x26/0x30
 [<ffffffff8020b8bb>] system_call_fastpath+0x16/0x1b

icmp6_sk() is similar.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Fri, 22 Aug 2008 15:38:00 +0000 (08:38 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: authenc - Avoid using clobbered request pointer

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Fri, 22 Aug 2008 15:37:45 +0000 (08:37 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Fix call of alc888_coef_init()
  ALSA: hda_intel: enable snoop for nvidia HDA controller

15 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Linus Torvalds [Fri, 22 Aug 2008 15:37:07 +0000 (08:37 -0700)]
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
  ext4: Update documentation to remind users to update mke2fs.conf
  ext4: Fix small file fragmentation
  ext4: Initialize writeback_index to 0 when allocating a new inode
  ext4: make sure ext4_has_free_blocks returns 0 for ENOSPC
  ext4: journal credit fix for the delayed allocation's writepages() function
  ext4: Rework the ext4_da_writepages() function
  ext4: journal credits reservation fixes for DIO, fallocate
  ext4: journal credits reservation fixes for extent file writepage
  ext4: journal credits calulation cleanup and fix for non-extent writepage
  ext4: Fix bug where we return ENOSPC even though we have plenty of inodes
  ext4: don't try to resize if there are no reserved gdt blocks left
  ext4: Use ext4_discard_reservations instead of mballoc-specific call
  ext4: Fix ext4_dx_readdir hash collision handling
  ext4: Fix delalloc release block reservation for truncate
  ext4: Fix potential truncate BUG due to i_prealloc_list being non-empty
  ext4: Handle unwritten extent properly with delayed allocation

15 years agoMerge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 22 Aug 2008 15:36:55 +0000 (08:36 -0700)]
Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  sched: enable LB_BIAS by default

15 years agoMerge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 22 Aug 2008 15:36:42 +0000 (08:36 -0700)]
Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  rcu: fix synchronize_rcu() so that kernel-doc works

15 years agoMerge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 22 Aug 2008 15:36:20 +0000 (08:36 -0700)]
Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  nohz: fix wrong event handler after online an offlined cpu

15 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 22 Aug 2008 15:23:53 +0000 (08:23 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: work around MTRR mask setting, v2
  x86: fix section mismatch warning - uv_cpu_init
  x86: fix VMI for early params
  x86: fix two modpost warnings in mm/init_64.c
  x86: fix 1:1 mapping init on 64-bit (memory hotplug case)
  x86: work around MTRR mask setting
  x86: PAT Update validate_pat_support for intel CPUs
  devmem, x86: PAT Change /dev/mem mmap with O_SYNC to use UC_MINUS
  x86: PAT proper tracking of set_memory_uc and friends
  x86: fix BUG: unable to handle kernel paging request (numaq_tsc_disable)
  x86: export pv_lock_ops non-GPL
  x86, mmiotrace: silence section mismatch warning - leave_uniprocessor
  x86: use WARN() in arch/x86/kernel
  x86: use WARN() in arch/x86/mm/ioremap.c
  werror: fix pci calgary
  x86: fix oprofile + hibernation badness
  x86, SGI UV: hardcode the TLB flush interrupt system vector
  x86: fix Xorg startup/shutdown slowdown with PAT
  x86: fix "kernel won't boot on a Cyrix MediaGXm (Geode)"
  x86 iommu: remove unneeded parenthesis

15 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Fri, 22 Aug 2008 15:22:33 +0000 (08:22 -0700)]
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  [libata] pata_it821x: fix warning
  libata: Fix a large collection of DMA mode mismatches
  ahci: sis controllers actually can do PMP
  pata_via: clean up recent tf_load changes
  libata: restore SControl on detach
  libata: use ata_link_printk() when printing SError
  libata: always do follow-up SRST if hardreset returned -EAGAIN
  libata: fix EH action overwriting in ata_eh_reset()
  sata_mv: add the Gen IIE flag to the SoC devices.
  ata_piix: IDE Mode SATA patch for Intel Ibex Peak DeviceIDs
  ahci: RAID mode SATA patch for Intel Ibex Peak DeviceIDs
  sata_mv: don't issue two DMA commands concurrently
  libata: implement no[hs]rst force params

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Fri, 22 Aug 2008 15:21:48 +0000 (08:21 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IPoIB: Fix deadlock on RTNL in ipoib_stop()
  IB/ipath: Fix incorrect check for max physical address in TID
  IB/ipath: Fix lost UD send work request

15 years agocrypto: authenc - Avoid using clobbered request pointer
Herbert Xu [Fri, 22 Aug 2008 15:04:06 +0000 (01:04 +1000)]
crypto: authenc - Avoid using clobbered request pointer

Authenc works in two stages for encryption, it first encrypts and
then computes an ICV.  The context memory of the request is used
by both operations.  The problem is that when an asynchronous
encryption completes, we will compute the ICV and then reread the
context memory of the encryption to get the original request.

It just happens that we have a buffer of 16 bytes in front of the
request pointer, so ICVs of 16 bytes (such as SHA1) do not trigger
the bug.  However, any attempt to uses a larger ICV instantly kills
the machine when the first asynchronous encryption is completed.

This patch fixes this by saving the request pointer before we start
the ICV computation.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
15 years agoALSA: hda - Fix call of alc888_coef_init()
Takashi Iwai [Fri, 22 Aug 2008 13:24:22 +0000 (15:24 +0200)]
ALSA: hda - Fix call of alc888_coef_init()

Using init_hook to call alc888_coef_init() is problematic for configurations
that already set another init_hook.  Better to put it in alc_init() as is
(although it looks a bit hackish).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agox86: work around MTRR mask setting, v2
Ingo Molnar [Fri, 22 Aug 2008 06:22:23 +0000 (08:22 +0200)]
x86: work around MTRR mask setting, v2

improve the debug printout:

- make it actually display something
- print it only once

would be nice to have a WARN_ONCE() facility, to feed such things to
kerneloops.org.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: fix section mismatch warning - uv_cpu_init
Marcin Slusarz [Thu, 21 Aug 2008 18:49:05 +0000 (20:49 +0200)]
x86: fix section mismatch warning - uv_cpu_init

WARNING: vmlinux.o(.cpuinit.text+0x3cc4): Section mismatch in reference from the function uv_cpu_init() to the function .init.text:uv_system_init()
The function __cpuinit uv_cpu_init() references
a function __init uv_system_init().
If uv_system_init is only used by uv_cpu_init then
annotate uv_system_init with a matching annotation.

uv_system_init was ment to be called only once, so do it from codepath
(native_smp_prepare_cpus) which is called once, right before activation
of other cpus (smp_init).

Note: old code relied on uv_node_to_blade being initialized to 0,
but it'a not initialized from anywhere.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Acked-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agopkt_sched: Fix qdisc list locking
Jarek Poplawski [Fri, 22 Aug 2008 10:24:05 +0000 (03:24 -0700)]
pkt_sched: Fix qdisc list locking

Since some qdiscs call qdisc_tree_decrease_qlen() (so qdisc_lookup())
without rtnl_lock(), adding and deleting from a qdisc list needs
additional locking. This patch adds global spinlock qdisc_list_lock
and wrapper functions for modifying the list. It is considered as a
temporary solution until hfsc_dequeue(), netem_dequeue() and
tbf_dequeue() (or qdisc_tree_decrease_qlen()) are redone.

With feedback from Herbert Xu and David S. Miller.

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years ago[libata] pata_it821x: fix warning
Jeff Garzik [Fri, 22 Aug 2008 06:33:23 +0000 (02:33 -0400)]
[libata] pata_it821x: fix warning

Reported by Andrew Morton:
drivers/ata/pata_it821x.c: In function 'it821x_port_start':
drivers/ata/pata_it821x.c:609: warning: 'mtype' may be used uninitialized in
this function

Pretty horrid fix, but so's a warning..

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agolibata: Fix a large collection of DMA mode mismatches
Alan Cox [Fri, 1 Aug 2008 08:18:34 +0000 (09:18 +0100)]
libata: Fix a large collection of DMA mode mismatches

Dave Müller sent a diff for the pata_oldpiix that highlighted a problem
where a lot of the ATA drivers assume dma_mode == 0 means "no DMA" while
the core code uses 0xFF.

This turns out to have other consequences such as code doing >= XFER_UDMA_0
also catching 0xFF as UDMAlots. Fortunately it doesn't generally affect
set_dma_mode, although some drivers call back into their own set mode code
from other points.

Having been through the drivers I've added helpers for using_udma/using_mwdma
dma_enabled so that people don't open code ranges that may change (eg if UDMA8
appears somewhere)

Thanks to David for the initial bits
[and added fix for pata_oldpiix from and signed-off-by Dave Mueller
 <dave.mueller@gmx.ch>  -jg]

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agoahci: sis controllers actually can do PMP
Tejun Heo [Fri, 1 Aug 2008 03:51:43 +0000 (12:51 +0900)]
ahci: sis controllers actually can do PMP

SIS controllers were blacklisted for PMP as enabling it made device
detection fail whether the device was PMP or not - the natural
conclusion was the controller chokes on SRST w/ pmp==15.  However, it
turned out that the controller just didn't like issuing SRST after
hardreset w/o clearing SError first.  Interestingly, the SRST itself
succeeds but the following commands fail.

If SError is cleared between hardreset and SRST, which is the default
behavior now, everything works fine and SIS controllers work with PMPs
happily.

Remove PMP blacklisting for SIS AHCIs.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Piter PUNK <piterpunk@slackware.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agopata_via: clean up recent tf_load changes
Tejun Heo [Thu, 31 Jul 2008 09:02:35 +0000 (18:02 +0900)]
pata_via: clean up recent tf_load changes

Commit bfce5e0179ad059035df28558724ff60af708e09 implemented custom
tf_load for pata_via.  This patch cleans it up a bit.

* Instead of duplicating whole body, copy tf and set ATA_TFLAG_DEVICE
  when necessary.

* Rename via_ata_tf_load() to via_tf_load().

* No need to set .tf_load in via_port_ops_noirq as it inherits from
  via_port_ops.

* Clean up indentation.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Joseph Chan <JosephChan@via.com.tw>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agolibata: restore SControl on detach
Tejun Heo [Thu, 31 Jul 2008 07:09:34 +0000 (16:09 +0900)]
libata: restore SControl on detach

Save SControl during probing and restore it on detach.  This prevents
adjustments made by libata drivers to seep into the next driver which
gets attached (be it a libata one or not).

It's not clear whether SControl also needs to be restored on suspend.
The next system to have control (ACPI or kexec'd kernel) would
probably like to see the original SControl value but there's no
guarantee that a link is gonna keep working after SControl is adjusted
without a reset and adding a reset and modified recovery cycle soley
for this is an overkill.  For now, do it only for detach.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>