Matthew Wilcox [Tue, 6 Feb 2007 00:34:00 +0000 (16:34 -0800)]
[PATCH] PA-RISC: Fix bogus warnings from modpost
parisc and parisc64 seem to name sections a little differently from other
targets. parisc64 gives spurious warnings like:
WARNING: drivers/net/dummy.o - Section mismatch: reference to .init.text:dummy_setup from .data.rel.ro between '.LC1' (at offset 0x0) and '.LC6'
and parisc gives spurious warnings like:
WARNING: drivers/net/dummy.o - Section mismatch: reference to .init.text:dummy_setup from .rodata.cst4 between '.LC1' (at offset 0x0) and '.LC6'
Given the other comments in modpost.c, it seems that the best solution is
to move rodata down to the 'match at start of name' section and add
.data.rel.ro to the 'match entire name' section.
Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Kyle McMartin <kyle@mcmartin.ca> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Matthew Wilcox [Sat, 18 Nov 2006 17:11:03 +0000 (10:11 -0700)]
[PARISC] Fix PCI bus numbering in the presence of Cardbus bridges
Firmware ignores Cardbus bridges, so when Linux assigns bus numbers,
it must override firmware's notion of what the busses are numbered.
This is not sufficient to support the Cardbus bridge as there is also
no interrupt routing table entry for them.
Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Ryan Bradetich [Fri, 10 Nov 2006 04:06:14 +0000 (04:06 +0000)]
[PARISC] [MUX] Get the hversion directly from the parisc_device
Willy pointed out the hversion is already stored
in the parisc_device, so I do not need to extract
this information directly from the IODC data.
Also by using the information in the parisc_device
I can avoid re-reading the IODC data for the Muxes
with specifed port counts.
Signed-off-by: Ryan Bradetich <rbrad@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Ryan Bradetich [Fri, 10 Nov 2006 03:08:45 +0000 (03:08 +0000)]
[PARISC] [MUX] Correctly report the number of available ports
This patch adds a new function to return the actual number
of ports available. Some of the built-in Muxes return the
number of supported ports, but not all of these port are
available for use.
Signed-off-by: Ryan Bradetich <rbrad@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Ryan Bradetich [Thu, 9 Nov 2006 04:45:08 +0000 (04:45 +0000)]
[PARISC] [MUX] Detect multiple cards in the correct order
This patch follows the example of the 8250_gsc
driver by probing for specific built-in Mux
cards first. This allows the system to preserve
the correct detection order with multiple Mux
cards.
Signed-off-by: Ryan Bradetich <rbrad@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Ryan Bradetich [Sun, 5 Nov 2006 01:21:44 +0000 (01:21 +0000)]
[PARISC] [MUX] Make the Serial Mux driver work as module
The following updates are based off a patch from willy:
* Removal of the mux_card list.
* Add the mux_remove function.
Other updates:
* Re-organize the driver structure a bit to make the
mux_init and mux_exit functions more symmetrical.
* Added the del_timer.
* Unregistered the console.
At this point I can insmod, rmmod, and re-insmod the
mux without any failures.
Signed-off-by: Ryan Bradetich <rbrad@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Ryan Bradetich [Fri, 3 Nov 2006 05:05:01 +0000 (05:05 +0000)]
[PARISC] HPPB bus updates for E-Class systems
This patch addresses the following issues:
* Removes an incorrect comment.
* Fixes a couple of compiler warnings.
* Properly detects the HP-PB bus on E-Class systems.
Signed-off-by: Ryan Bradetich <rbrad@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Matthew Wilcox [Fri, 13 Oct 2006 18:32:50 +0000 (12:32 -0600)]
[PARISC] Delete arch/parisc/mm/kmap.c again
I deleted this file from 2.4 5 years ago. Unfortunately, that change
never got merged to Linus and so when we switched to 2.5 it came back
and nobody noticed. It's never been built in 2.5/2.6 as it was never
in the Makefile.
Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Linus Torvalds [Fri, 8 Dec 2006 00:18:46 +0000 (16:18 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6: (55 commits)
ieee1394: sbp2: code formatting around work_struct stuff
ieee1394: nodemgr: remove a kcalloc
ieee1394: conditionally export ieee1394_bus_type
ieee1394: Consolidate driver registering
ieee1394: sbp2: convert from PCI DMA to generic DMA
ieee1394: nodemgr: spaces to tabs
ieee1394: nodemgr: fix deadlock in shutdown
ieee1394: nodemgr: remove duplicate assignment
sbp2: make 1bit bitfield unsigned
ieee1394: schedule *_oui sysfs attributes for removal
ieee1394: schedule unused symbol exports for removal
ieee1394: dv1394: schedule for feature removal
ieee1394: raw1394: defer feature removal of old isoch interface
ieee1394: ohci1394: call PMac code in shutdown only for proper machines
ieee1394: ohci1394: reformat PPC_PMAC platform code
ieee1394: ohci1394: add PPC_PMAC platform code to driver probe
ieee1394: sbp2: wrap two functions into one
ieee1394: sbp2: update comment on things to do
ieee1394: sbp2: use list_move_tail()
ieee1394: sbp2: more concise names for types and variables
...
Linus Torvalds [Thu, 7 Dec 2006 23:40:39 +0000 (15:40 -0800)]
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (76 commits)
[ARM] 4002/1: S3C24XX: leave parent IRQs unmasked
[ARM] 4001/1: S3C24XX: shorten reboot time
[ARM] 3983/2: remove unused argument to __bug()
[ARM] 4000/1: Osiris: add third serial port in
[ARM] 3999/1: RX3715: suspend to RAM support
[ARM] 3998/1: VR1000: LED platform devices
[ARM] 3995/1: iop13xx: add iop13xx support
[ARM] 3968/1: iop13xx: add iop13xx_defconfig
[ARM] Update mach-types
[ARM] Allow gcc to optimise arm_add_memory a little more
[ARM] 3991/1: i.MX/MX1 high resolution time source
[ARM] 3990/1: i.MX/MX1 more precise PLL decode
[ARM] 3986/1: H1940: suspend to RAM support
[ARM] 3985/1: ixp4xx clocksource cleanup
[ARM] 3984/1: ixp4xx/nslu2: Fix disk LED numbering (take 2)
[ARM] 3994/1: ixp23xx: fix handling of pci master aborts
[ARM] 3981/1: sched_clock for PXA2xx
[ARM] 3980/1: extend the ARM Versatile sched_clock implementation from 32 to 63 bit
[ARM] 3979/1: extend the SA11x0 sched_clock implementation from 32 to 63 bit period
[ARM] 3978/1: macro to provide a 63-bit value from a 32-bit hardware counter
...
Linus Torvalds [Thu, 7 Dec 2006 23:39:22 +0000 (15:39 -0800)]
Merge branch 'release' of master.kernel.org:/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of master.kernel.org:/pub/scm/linux/kernel/git/aegl/linux-2.6:
[IA64] replace kmalloc+memset with kzalloc
[IA64] resolve name clash by renaming is_available_memory()
[IA64] Need export for csum_ipv6_magic
[IA64] Fix DISCONTIGMEM without VIRTUAL_MEM_MAP
[PATCH] Add support for type argument in PAL_GET_PSTATE
[IA64] tidy up return value of ip_fast_csum
[IA64] implement csum_ipv6_magic for ia64.
[IA64] More Itanium PAL spec updates
[IA64] Update processor_info features
[IA64] Add se bit to Processor State Parameter structure
[IA64] Add dp bit to cache and bus check structs
[IA64] SN: Correctly update smp_affinty mask
[IA64] sparse cleanups
[IA64] IA64 Kexec/kdump
Russell King [Thu, 7 Dec 2006 23:07:26 +0000 (23:07 +0000)]
[ARM] Merge individual ARM sub-trees
Merge:
Atmel AT91RM9200 and AT91SAM9260 changes
General ARM developments
Disconfiguous memory cleanups
64-bit/32-bit division and sched_clock extension patches
EP93xx support changes
IOP support changes
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Jeff Garzik [Thu, 7 Dec 2006 22:56:06 +0000 (17:56 -0500)]
PCI MSI: always toggle legacy-INTx-enable bit upon MSI entry/exit
The current code (prior to this change) would disable the PCI INTx
legacy interrupt when enabling MSI... but only on PCI Express. We
should do this for all MSI devices, for safety's sake.
Nicolas Pitre [Thu, 7 Dec 2006 18:09:20 +0000 (19:09 +0100)]
[ARM] 3983/2: remove unused argument to __bug()
It appears that include/asm-arm/bug.h requires include/linux/stddef.h
for the definition of NULL. It seems that stddef.h was always included
indirectly in most cases, and that issue was properly fixed a while ago.
Because the third argument to __bug() is never used anyway, RMK suggested
getting rid of it entirely instead of readding #include <linux/stddef.h>
which this patch does.
Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Ben Dooks [Thu, 7 Dec 2006 19:47:58 +0000 (20:47 +0100)]
[ARM] 3999/1: RX3715: suspend to RAM support
The RX3715 is similar to the H1940 in the way
that suspend to RAM works, so we can use most
of the extant support for the H1940 with only
a few modifictions
Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Stefan Richter [Fri, 24 Nov 2006 19:19:09 +0000 (20:19 +0100)]
ieee1394: conditionally export ieee1394_bus_type
Follow-up to patch "Consolidate driver registering":
Since I plan the lifetime of Linux 2.6.20 to be the deprecation phase
of CONFIG_IEEE1394_EXPORT_FULL_API, it seems fair to keep all previously
exported symbols available with this option until this phase is over.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Ben Collins [Thu, 23 Nov 2006 18:59:48 +0000 (13:59 -0500)]
ieee1394: Consolidate driver registering
This patch consolidates some bookkeeping for driver registering. It
closely models what pci_register_driver() does. The main addition is
that the owner of the driver is set, so we get a proper symlink
for /sys/bus/ieee1394/driver/*/module.
Also moves setting of name and bus type into nodemgr. Because of this,
we can remove the EXPORT_SYMBOL for ieee1394_bus_type, since it's now
only used in ieee1394.ko.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Wed, 22 Nov 2006 20:09:42 +0000 (21:09 +0100)]
ieee1394: nodemgr: fix deadlock in shutdown
If "modprobe ohci1394" was quickly followed by "modprobe -r ohci1394",
say with 1 second pause in between, the modprobe -r got stuck in
uninterruptible sleep in kthread_stop. At the same time the knodemgrd
slept uninterruptibly in bus_rescan_devices_helper. That's because
driver_detach took the semaphore of the PCI device and
bus_rescan_devices_helper wanted to take the semaphore of the FireWire
host device's parent, which is the same semaphore. This was a regression
since Linux 2.6.16, commit bf74ad5bc41727d5f2f1c6bedb2c1fac394de731,
"Hold the device's parent's lock during probe and remove".
The fix (or workaround) adds a dummy driver to the hpsb_host device. Now
bus_rescan_devices_helper won't scan the host device anymore. This
doesn't hurt since we have no drivers which will bind to these devices
and it is unlikely that there will ever be such a driver. The dummy
driver is befittingly presented as a representation of ieee1394 itself.
Fixes: http://bugzilla.kernel.org/show_bug.cgi?id=6706 Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Sun, 19 Nov 2006 22:04:31 +0000 (23:04 +0100)]
ieee1394: schedule *_oui sysfs attributes for removal
There is no manpower available to reform oui.db into a library for use
in more kernel subsystems. The low ratio of usefulness to size and the
occasional need to update oui.db from IEEE's official list suggest to
drop oui.db. I plan to make a userspace script available which
translates the remaining numeric sysfs attributes to names of
organizations.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Sun, 19 Nov 2006 23:05:05 +0000 (00:05 +0100)]
ieee1394: raw1394: defer feature removal of old isoch interface
Known to be affected:
- libdc1394: prefers video1394 for now, old-style raw1394 support might
be dropped eventually
- OpenH323 PWLib, AVC video input module: uses libraw1394's old API
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Fri, 10 Nov 2006 23:22:35 +0000 (00:22 +0100)]
ieee1394: ohci1394: add PPC_PMAC platform code to driver probe
Fixes http://bugzilla.kernel.org/show_bug.cgi?id=7431
iBook G3 threw a machine check exception and put the display backlight
to full brightness after ohci1394 was unloaded and reloaded.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Thu, 2 Nov 2006 20:16:08 +0000 (21:16 +0100)]
ieee1394: sbp2: more concise names for types and variables
"struct scsi_id_instance_data" represents a logical unit.
Rename it to "struct sbp2_lu", and "scsi_id" to "lu".
Rename some other variables too.
Wrap almost all lines after at most 80 columns.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Thu, 2 Nov 2006 20:16:08 +0000 (21:16 +0100)]
ieee1394: sbp2: consolidate log levels
Replace some calls to SBP2_ERR and SBP2_WARN by SBP2_INFO.
Remove logging macros SBP2_NOTICE and SBP2_WARN.
Remove direct usage of HPSB_ logging macros.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Thu, 2 Nov 2006 20:16:08 +0000 (21:16 +0100)]
ieee1394: sbp2: remove duplicate code
The same case is handled further below in sbp2scsi_complete_command.
Note, the second version behaves slightly different but looks
preferable. It's an extremely unlikely case by the way.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Thu, 2 Nov 2006 20:16:08 +0000 (21:16 +0100)]
ieee1394: sbp2: clean up function declarations
Remove unnecessary function prototypes.
Remove variable names from function prototypes.
Move declarations from sbp2.h to sbp2.c.
Move definitions of driver templates together near the top of sbp2.c.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Thu, 2 Nov 2006 20:16:08 +0000 (21:16 +0100)]
ieee1394: sbp2: remove irritating log message
The queue depth can be read from /sys/bus/scsi/devices/*/queue_depth,
so don't log it. And the hint about speed improvements is misleading,
at least under current kernels. If serialization is switched off, read
performance is typically increased by less than 10%. (I did not test
write performance recently.) On the other hand, serialize_io=0 is not
yet safe due to some implementation issues that are not trivial to fix.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Sun, 29 Oct 2006 18:58:25 +0000 (19:58 +0100)]
ieee1394: ohci1394: proper log messages in suspend and resume
- correct thinko in one of my last commits: cannot use PRINT macro with
ohci == NULL
- add log messages on ohci == NULL and on pci_enable_device != 0
- update log macros from patch "revert fail on error in suspend" to use
PRINT and DBGMSG where possible
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Sun, 29 Oct 2006 18:52:49 +0000 (19:52 +0100)]
ieee1394: ohci1394: revert fail on error in suspend
Some errors during preparation for suspended state can be skipped with a
warning instead of a failure of the whole suspend transition, notably an
error in pci_set_power_state.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Sun, 22 Oct 2006 14:16:27 +0000 (16:16 +0200)]
ieee1394: nodemgr: revise semaphore protection of driver core data
- The list "struct class.children" is supposed to be protected by
class.sem, not by class.subsys.rwsem.
- nodemgr_remove_uds() iterated over nodemgr_ud_class.children without
proper protection. This was never observed as a bug since the code
is usually only accessed by knodemgrd. All knodemgrds are currently
globally serialized. But userspace can trigger this code too by
writing to /sys/bus/ieee1394/destroy_node.
- Clean up access to the FireWire bus type's subsys.rwsem: Access it
uniformly via ieee1394_bus_type. Shrink rwsem protected regions
where possible. Expand them where necessary. The latter wasn't a
problem so far because knodemgr is globally serialized.
This should harden the interaction of ieee1394 with sysfs and lay ground
for deserialized operation of multiple knodemgrds and for implementation
of subthreads for parallelized scanning and probing.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Daniel Drake [Fri, 20 Oct 2006 13:56:01 +0000 (14:56 +0100)]
video1394: remove BKL contention
video1394 does not need to take the BKL. The data structures shared between
file_operations and interrupts are already protected through context-specific
spinlocks.
The only other danger is video1394_release() being called during another
operation, however this cannot happen because release is only ever invoked
when the last thread has closed the fd.
Signed-off-by: Daniel Drake <ddrake@brontes3d.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Daniel Drake [Wed, 18 Oct 2006 20:37:14 +0000 (21:37 +0100)]
video1394: small optimizations to frame retrieval codepath
Add some GCC branch prediction optimizations to unlikely error/safety
conditions in the ioctl handling code commonly called during an application's
capture loop.
Signed-off-by: Daniel Drake <ddrake@brontes3d.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Bernhard Kaindl [Wed, 6 Sep 2006 12:58:30 +0000 (14:58 +0200)]
ohci1394: steps to implement suspend/resume
I did a quick shot on what I described and the appended patch
does the first thing needed for working suspend/resume
in ohci1394 which is HW de- and re-initialisation.
It works with suspend2disk on my Ricoh R5C552 IEEE 1394 Controller
with the 2.6.17 kernel to the extent that if I call dvgrab --interactive
after suspend2disk without unloading ohci1394, it does not lock up
dvgrab with 100% CPU but properly connects to the camera, given
that I first unplug and plug the camera after coming back from
suspend.
I guess that could be fixed by forcing a bus reset in the resume
function.
I cannot test suspend to RAM here at the moment and should
follow the guidelines in Documentation/power/pci.txt also,
so this is rather a quick report than a finished patch and
there are some rough edges:
However, with this patch, I have to unload at least some in-kernel
users of ohci1394 like dv1394 or video1394 before suspending.
Not doing that caused an Oops and a bad tasklet error, probably from
not handling ISO tasklets during suspend/resume properly.
Maybe these can be temporarily cleared or unregistered and
re-registered for suspend/resume with help from the other
layers or from the highlevel 1394 core, but I do not really
know what these do.
But this patch provides a useful base to start from and is
already of much help for people which do not need dv1394
and video1394 or can unload them at least during suspend.
I cannot test function with sbp2 at the moment, but raw1394
seems to work fine.
Signed-off-by: Bernhard Kaindl <bk@fsfe.org>
Update 1: merge with previous two ohci1394 suspend/resume patches
Update 2: version for application on top of Linux 2.6.19-rc4
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>