aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio (follow)
AgeCommit message (Collapse)AuthorFilesLines
2007-02-12Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6Linus Torvalds3-4/+33
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6: [S390] remove __io_virt and mmiowb. [S390] cio: use ARRAY_SIZE in device_id.c [S390] cio: Fixup interface for setting options on ccw devices. [S390] smp_call_function/smp_call_function_on locking.
2007-02-12[PATCH] mark struct file_operations const 5Arjan van de Ven1-1/+1
Many struct file_operations in the kernel can be "const". Marking them const moves these to the .rodata section, which avoids false sharing with potential dirty data. In addition it'll catch accidental writes at compile time to these shared resources. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-12[S390] cio: use ARRAY_SIZE in device_id.cAhmed S. Darwish1-1/+2
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-02-12[S390] cio: Fixup interface for setting options on ccw devices.Cornelia Huck2-3/+31
The current ccw_device_set_options() sets a specified mask of options and clears those not specified, but there is no way to find out which options have already been set. In order to fix this up, introduce the following interface changes: ccw_device_set_options() now only sets the specified bits, but does not clear those that are not specified. ccw_device_clear_options() clears the specified bits. ccw_device_set_options_mask() provides the old semantics (setting only the specified bits and clearing the others). Device drivers now work as expected. qdio has been adapted. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-02-05[S390] Avoid excessive inlining.Heiko Carstens11-67/+67
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-02-05[S390] Convert memory detection into C code.Heiko Carstens1-5/+5
Hopefully this will make it more maintainable and less error prone. Code makes use of search_exception_tables(). Since it calls this function before the kernel exeception table is sorted, there is an early call to sort_main_extable(). This way it's easy to use the already present infrastructure of fixup sections. Also this would allows to easily convert the rest of head[31|64].S into C code. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-02-05[S390] ETR support.Martin Schwidefsky1-2/+15
This patch adds support for clock synchronization to an external time reference (ETR). The external time reference sends an oscillator signal and a synchronization signal every 2^20 microseconds to keep the TOD clocks of all connected servers in sync. For availability two ETR units can be connected to a machine. If the clock deviates for more than the sync-check tolerance all cpus get a machine check that indicates that the clock is out of sync. For the lovely details how to get the clock back in sync see the code below. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-02-05[S390] cio: Don't spam debug feature.Cornelia Huck1-1/+1
Lower priority of "Blacklisted device detected" messages so we don't overwrite more useful messages. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-02-05[S390] Cleanup of CHSC event handling.Peter Oberparleiter1-120/+112
Change CHSC event handling to be more easily extensible. Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-02-05[S390] cio: declare hardware structures packed.Peter Oberparleiter2-12/+12
Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-02-05[S390] cio: Catch operand exceptions on stsch.Cornelia Huck2-2/+2
If we have a subchannel id which has been generated via for_each_subchannel(), it might contain an invalid subchannel set id. We need to catch the ensuing operand exception by using stsch_err() instead of stsch() in all possible cases. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-02-05[S390] cio: Use device_{create,remove}_bin_file.Cornelia Huck1-7/+5
Create/remove the channel measurement binary files with device_{create,remove}_bin_file instead of sysfs_{create,remove}_bin_file. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-02-05[S390] cio: Restart path verification after unsolicited interrupt.Cornelia Huck1-0/+2
If we try to start path verification when an unsolicited interrupt is already pending, stctl shows status pending and we delay path verification again. We need to check for the doverify bit when the unsolicited interrupt comes in and then do path verification. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-02-05[S390] cio: Remove check for ssd in chpids_show().Cornelia Huck1-5/+2
Since ssd_info is now available before the subchannel is registered, we don't need to check whether it is available. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-02-05[S390] Get rid of a lot of sparse warnings.Heiko Carstens8-9/+11
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-01-09[S390] cio: use barrier() in stsch_reset.Heiko Carstens1-8/+4
Use barrier() in stsch_reset() instead of duplicating the stsch() inline assembly and adding "memory" to the clobberlist. Pointed out by Chuck Ebbert. Real fix would be to add a fixup section to the stsch() and extend the basic program check handler so it searches the exception tables in case of a program check. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-12-28[S390] cio: fix stsch_reset.Michael Holzheu1-3/+10
Copy inline assembly of stsch and add "memory" to clobber list in order to prevent gcc from optimizing away the checking of the global variable "pgm_check_occured". Signed-off-by: Michael Holzheu <holzheu@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-12-15[S390] cio: css_register_subchannel race.Stefan Bader1-1/+2
Asynchronous probe can release memory of a subchannel before css_get_ssd_info is called. To fix this call css_get_ssd_info before registering with driver core. Signed-off-by: Stefan Bader <shbader@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-12-15[S390] Fix reboot hang on LPARsMichael Holzheu1-2/+23
Reboot hangs on LPARs without diag308 support. The reason for this is, that before the reboot is done, the channel subsystem is shut down. During the reset on each possible subchannel a "store subchannel" is done. This operation can end in a program check interruption, if the specified subchannel set is not implemented by the hardware. During the reset, currently we do not have a program check handler, which leads to the described kernel bug. We install now a new program check handler for the reboot code to fix this problem. Signed-off-by: Michael Holzheu <holzheu@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-12-15[S390] Hipersocket multicast queue: make sure outbound handler is calledUrsula Braun1-5/+8
A HiperSocket multicast queue works asynchronously. When sending buffers, the buffer state change from PRIMED to EMPTY may happen delayed. Reschedule the checking for changes in the outbound queue, if there are still PRIMED buffers. Signed-off-by: Ursula Braun <braunu@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-12-08[S390] Use dev->groups for adding/removing the subchannel attribute group.Cornelia Huck3-11/+11
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-12-08[S390] Support for disconnected devices reappearing on another subchannel.Cornelia Huck7-59/+296
- create a 'pseudo_subchannel' per channel subsystem (the 'orphanage') - use the orphanage as a shelter for ccw_devices that can't remain on the same subchannel Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-12-08[S390] subchannel lock conversion.Cornelia Huck6-63/+98
Convert the subchannel lock to a pointer to a lock. Needed for the dynamic subchannel mapping patch. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-12-08[S390] Some preparations for the dynamic subchannel mapping patch.Cornelia Huck4-47/+78
- Move adding subchannel attributes to css_register_subchannel(). - Don't call device_trigger_reprobe() for non-operational devices. - Introduce io_subchannel_create_ccwdev(). Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-12-08[S390] runtime switch for qdio performance statisticsUrsula Braun2-119/+135
Remove CONFIG_QETH_PERF_STATS and use a sysfs attribute instead. We want to have the ability to turn the statistics on/off at runtime. Signed-off-by: Ursula Braun <braunu@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-12-08[S390] more workqueue fixes.Martin Schwidefsky5-39/+56
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-12-06[PATCH] More work_struct induced breakage (s390)Al Viro1-5/+4
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-04[S390] cio: Use device_reprobe() instead of bus_rescan_devices().Cornelia Huck1-1/+13
In io_subchannel_register(), it is better to just reprobe the current device if it hasn't a driver yet than to rescan the whole bus. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-12-04[S390] cio: Retry internal operations after vary off.Cornelia Huck7-11/+90
If I/O was running on a just varied off chpid, it will be terminated. If this was a common I/O layer internal I/O, it needs to be retried. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-12-04[S390] cio: Use path verification for last path gone after vary off.Cornelia Huck3-10/+24
If the last path to a device is gone after a chpid has been varied off, putting it on the slow queue doesn't prevent a device driver from still attempting to use it (it may stay on the slow queue for a long time). Instead, trigger a verify event which will prevent I/O attempts from the device driver immediately. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-12-04[S390] non-unique constant/macro identifiers.Ursula Braun2-7/+5
Add some prefixes to constands defined in drivers/s390/net/qdio.h and drivers/s390/lcs.h to make it possible to include the three header files drivers/s390/net/qeth.h, drivers/s390/net/qdio.h and drivers/net/s390/lcs.h in one C file. This is required for the patch that generates the kerntypes.o file for use by lcrash. Signed-off-by: Ursula Braun <braunu@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-12-04[S390] Reset infrastructure for re-IPL.Heiko Carstens2-63/+100
In case of re-IPL and diag308 doesn't work we have to reset all devices manually and wait synchronously that each reset finished. This patch adds the necessary infrastucture and the first exploiter of it. Subsystems that need to add a function that needs to be called at re-IPL may register/unregister this function via struct reset_call { struct reset_call *next; void (*fn)(void); }; void register_reset_call(struct reset_call *reset); void unregister_reset_call(struct reset_call *reset); When the registered function get called the context is: - all cpus beside the current one are stopped - all machine checks and interrupts are disabled - prefixing is disabled - a default machine check handler is available for use The registered functions may not take any locks are sleep. For the common I/O layer part of this patch: Introduce a reset_call css_reset that does the following: - clear all subchannels - perform a rchp on all channel paths and wait for the resulting machine checks This replaces the calls to clear_all_subchannels() and cio_reset_channel_paths() for kexec and ccw reipl. reipl_ccw_dev() now uses reipl_find_schid() to determine the subchannel id for a given device id. Also remove cio_reset_channel_paths() and friends since they are not needed anymore. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-10-27[S390] cio: Make ccw_device_register() static.Cornelia Huck2-3/+1
ccw_device_register() is only called from io_subchannel_register() and io_subchannel_probe() and will never be called for possible non-io subchannels. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-10-27[S390] cio: css_probe_device() must be called enabled.Cornelia Huck1-4/+3
Move css_probe_device() behind giving up the lock for the old subchannel in css_evaluate_known_subchannel() so we aren't disabled when we call it. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-10-18[S390] cio: sch_no -> schid.sch_no conversion.Cornelia Huck1-1/+1
Overlooked one sch_no -> schid.sch_no conversion. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-10-18[S390] cio: invalid device operational notificationPeter Oberparleiter1-0/+4
Reset device operational notification flag when channel paths become unavailable during path verification. Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-10-11[S390] cio: remove casts from/to (void *).Cornelia Huck4-26/+26
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-10-11[S390] cio: Remove grace period for vary off chpid.Cornelia Huck5-76/+14
The grace period handling introduced needless complexity. It didn't help the dasd driver (which can handle terminated I/O just well), and it doesn't help for long running channel programs (which won't complete during the grace period anyway). Terminating I/O using a path that just disappeared immediately is much more consistent with what the user expects. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-10-11[S390] cio: Use ccw_dev_id and subchannel_id in ccw_device_privateCornelia Huck8-53/+56
Use the proper structures to identify device and subchannel. Change get_disc_ccwdev_by_devno() to get_disc_ccwdev_by_dev_id(). Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-10-11[S390] cio: add missing KERN_INFO printk header.Cornelia Huck1-1/+2
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-10-11[S390] irq change improvements.Heiko Carstens1-2/+2
Remove the last few places where a pointer to pt_regs gets passed. Also make sure we call set_irq_regs() before irq_enter() and after irq_exit(). This doesn't fix anything but makes sure s390 looks the same like all other architectures. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-10-06[S390] irq change build fixes.Heiko Carstens1-1/+5
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-10-06[S390] cio: 0 is a valid chpid.Cornelia Huck1-9/+16
In order to determine chpid validity, we need to check whether the corresponding path is specified in the pim. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-10-04[S390] cio: improve unit check handling for internal operationsPeter Oberparleiter1-4/+4
Retry internal operation after unit check instead of aborting them. Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-10-04[S390] cio: add timeout handler for internal operations.Peter Oberparleiter1-0/+3
Add timeout handler for common-I/O-layer-internal I/O operations. Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-10-04[S390] Add timeouts during sense PGID, path verification and disband PGID.Cornelia Huck3-0/+13
While the machine owns us an interrupt in these cases (and we should get one), reality isn't always like that... Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-09-28[S390] Inline assembly cleanup.Martin Schwidefsky3-304/+146
Major cleanup of all s390 inline assemblies. They now have a common coding style. Quite a few have been shortened, mainly by using register asm variables. Use of the EX_TABLE macro helps as well. The atomic ops, bit ops and locking inlines new use the Q-constraint if a newer gcc is used. That results in slightly better code. Thanks to Christian Borntraeger for proof reading the changes. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-09-20[S390] cio: subchannel evaluation function operates without lockPeter Oberparleiter1-99/+104
css_evaluate_subchannel() operates subchannel without lock which can lead to erratic behavior caused by concurrent device access. Also split evaluation function to make it more readable. Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-09-20[S390] cio: always query all paths on path verification.Peter Oberparleiter5-61/+68
Reappearing channel paths are sometimes not utilized by CCW devices because path verification incorrectly relies on path-operational-mask information which is not updated until a channel path has been used again. Modify path verification procedure to always query all available paths to a device. Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-09-20[S390] cio: update path groups on logical CHPID changes.Peter Oberparleiter2-2/+15
CHPIDs that are logically varied off will not be removed from a CCW device's path group because resign-from-pathgroup command is issued with invalid path mask of 0 because internal CCW operations are masked by the logical path mask after the relevant bits are cleared by the vary operation. Do not apply logical path mask to internal operations. Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>