Commit Graph

122 Commits

Author SHA1 Message Date
Tobenna P. Igwe 1566ac0bc9 staging: unisys: uislib: Fixed missing blank line coding style issue
Fixed coding style issue "Missing a blank line after declarations"
detected by the 'checkpatch.pl' script.

Signed-off-by: Tobenna P. Igwe <ptigwe@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:08 -07:00
Benjamin Romer 11c4eba1ad staging: unisys: fix spacing in vbusdeviceinfo.h
There was a missing line between declarations and code in vbusdeviceinfo.h.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:07 -07:00
Benjamin Romer ffe5845749 staging: unisys: clean up vmcall functions
Clean up the format of the vmcall functions in iovmcall_gnuc.h. These functions
are rewritten for clarity and to correct the indention, without changing any
functionality.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:07 -07:00
Benjamin Romer 3c1a653b90 staging: unisys: fix spacing in iovmcall_gnuc.h
There are spacing errors in the functions in iovmcall_gnuc. Fix these.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:07 -07:00
Benjamin Romer 3239c1cc15 staging: unisys: fix line lengths in controlvmcompletionstatus.h
The controlVM status file had comments going over the 80 character limit. These
are moved to the next line and the spacing is fixed.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:07 -07:00
Benjamin Romer 613cbd9f00 staging: unisys: fix whitespace in uisutils.h
Correct a couple of missing blank lines in uisutils.h.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:07 -07:00
Benjamin Romer 746c28e1af staging: unisys: get rid of uiscmpxchg64
Remove the uiscmpxchg64 macro from uisqueue.h and uisqueue.c.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:07 -07:00
Benjamin Romer 52d13a618a staging: unisys: remove unused macros from timskmod.h
Several macros in timskmod.h are unused. Remove them.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:07 -07:00
Benjamin Romer f2170625b2 staging: unisys: get rid of semaphore macros
Remove all of the semaphore macros from timskmod.h and switch all uses of those
types to the correct function names.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:07 -07:00
Benjamin Romer e5700df523 staging: unisys: fix formatting in timskmod.h
Fix all whitespace formatting issues in timskmod.h.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:07 -07:00
Benjamin Romer fb75fc5c0b staging: unisys: get rid of unused VMMIO types
Delete the unused common VMMIO types in timskmod.h.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:07 -07:00
Benjamin Romer 1d2def986d staging: unisys: remove commontypes.h
Delete commontypes.h, and replace all of the places that #included it with
correct #includes for the types used in that file.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:06 -07:00
Benjamin Romer 15fe5f2ced staging: unisys: move remaining macros from commontypes.h to channel.h
All of the remaining macros in commontypes.h - the CHANNEL_*_MISMATCH macros
and UltraLogEvent() - are used only in channel.h. Move the entire set of them
to their new home.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:06 -07:00
Benjamin Romer 2e4701ae2c staging: unisys: remove OFFSETOF from commontypes
The only place OFFSETOF was being used was in iochannel.h. Remove the macro
from commontypes.h and replace all uses of it in iochannel.h with offsetof()
instead.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:06 -07:00
Benjamin Romer af96e9c058 staging: unisys: remove GUEST_PHYSICAL_ADDRESS from commontypes.h
The typedef for GUEST_PHYSICAL address is only used in two files, so remove it
from commontypes.h and add it to visorchipset/file.c and controlvmchannel.h.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:06 -07:00
Benjamin Romer 2046fcca74 staging: unisys: remove INLINE define from commontypes
There was a macro for INLINE. Delete it and fix the one occurrance of it to
just use 'inline' instead, though that function looks awfully big for an
inline...

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:06 -07:00
Benjamin Romer e87cfde4a1 staging: unisys: remove MEMORYBARRIER AND VolatileBarrier from commontypes
Remove the MEMORYBARRIER and VolatileBarrier() defines from commontypes.h and
convert the spots that used this to mb(). Add comments to each use to indicate
that the barrier is used to ensure channel synchronization between guests.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:06 -07:00
Benjamin Romer 2e20c4a7c8 staging: unisys: remove MEMCPY functions from commontypes.h
This patch removes MEMCPY, MEMCPY_FROMIO, and MEMCPY_TOIO from commontypes.h,
and switches all use of these macros to the appropriate built in definition.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:06 -07:00
Vincent Bernat d746cb55b0 staging: visorchipset: fix sparse warnings about static declaration
Some functions were prototyped as static but the actual definition
wasn't. While this is valid (the function is static because the two
declarations don't conflict and the first one is static), this makes
sparse unhappy and cause confusion of normal people too.

Signed-off-by: Vincent Bernat <vincent@bernat.im>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-01 14:39:26 -07:00
Benjamin Romer 1496125efd staging: unisys: remove MEMCMP_IO
This patch removes MEMCMP_IO from commontypes.h and fixes the one use of the
macro so it calls uuid_cmp_le() instead. The old code was comparing UUIDs
directly.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-01 14:38:45 -07:00
Benjamin Romer 30de72dbb5 staging: unisys: remove MEMSET define
Remove the redundant MEMSET define in commontypes.h and fix everyplace that
uses it.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-01 14:38:45 -07:00
Benjamin Romer 90f3b509bf staging: unisys: remove UINTN type
This patch removes UINTN from commontypes.h, using u64 in the one spot this
type was used.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-01 14:38:45 -07:00
Benjamin Romer 87b7307ae1 staging: unisys: remove unused defines from commontypes.h
Delete #defines that aren't used anywhere.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-01 14:38:45 -07:00
Benjamin Romer f6f7005abe staging: unisys: remove non-kernel code from commontypes.h
This patch deletes everything in common types that was in the else section
of a #ifdef __KERNEL__ block.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-01 14:38:45 -07:00
Benjamin Romer ec03a7db32 staging: unisys: remove S64 type
This patch switches all use of the S64 typedef to use the kernel's s64 type
instead.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-01 14:38:45 -07:00
Benjamin Romer c14f13ba30 staging: unisys: remove S32 type
Delete the S32 type from commontypes.h since it wasn't being used.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-01 14:38:45 -07:00
Benjamin Romer 15c564ecf2 staging: unisys: remove S16 type
This patch switches all use of the S16 typedef to use the kernel's s16 type
instead.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-01 14:38:44 -07:00
Benjamin Romer d717723439 staging: unisys: remove S8 type
Delete the S8 type from commontypes.h since it wasn't being used.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-01 14:38:44 -07:00
Benjamin Romer 5fc0229ae5 staging: unisys: remove U64 type
This patch switches all use of the U64 typedef to use the kernel's u64 type
instead.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-01 14:38:44 -07:00
Benjamin Romer b3c55b13a1 staging: unisys: remove U32 type
This patch switches all use of the U32 typedef to use the kernel's u32 type
instead.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-01 14:38:44 -07:00
Benjamin Romer b06bdf7d5b staging: unisys: remove U16 type
This patch switches all use of the U16 typedef to use the kernel's u16 type
instead.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-01 14:38:44 -07:00
Benjamin Romer c242233e5b staging: unisys: remove U8 type
This patch switches all use of the U8 typedef to use the kernel's u8 type
instead.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 17:11:10 -07:00
Benjamin Romer e56fa7cd3d staging: unisys: add sysfs entries for parahotplug support
This patch adds new a new directory parahotplug to the visorchipset sysfs
directory, and two new attributes, deviceenabled, and devicedisabled, into the
new directory, to add s-Par parahotplug support.

The parahotplug interface is used to deal with SR-IOV recovery situations on
s-Par guest partitions. The command service partition will send a message to a
guest when an SR-IOV device that guest is using needs to be temporarily removed.
The message triggers a udev event that will cause a recovery script to run.
When that script has completed its work, it will write to one of the
parahotplug interfaces to send a message back to Command, indicating that the
recovery action has completed.

When a guest that is sharing an SR-IOV device is restarted, that guest will
take down the PF driver on the device, but any guests with VFs will not know
that their device needs to be reset as well. The recovery script makes it so
the device will be shut down fully and then restarted after the sharing guest
comes back up, and ensures that the timing is correct.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 17:09:53 -07:00
Benjamin Romer e721310aac staging: unisys: remove parahotplug proc entry
Remove the parahotplug proc code entirely in preparation for replacement with
sysfs entries. Since visorchipset_proc_read_writeonly() is orphaned by the
removal, it is removed as well.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 17:09:53 -07:00
Rickard Strandqvist 4c86db6aac staging: unisys: include: uisutils.h: Cleaning up missing null-terminate in conjunction with strncpy
Replacing strncpy with strlcpy to avoid strings that lacks null terminate.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 11:39:45 -07:00
Benjamin Romer 89d1bdc824 staging: unisys: remove partition information from proc
Debugging information for the guest's channels was being exposed in proc.
Remove the code that creates these entries, which are no longer needed.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 11:26:50 -07:00
Benjamin Romer 66e24b7686 staging: unisys: fix visorchipset sysfs attribute functions
This patch cleans up the style, error handling, and string handling in the sysfs
functions recently added to visorchipset:

- Use of sscanf() was changed to type-appropriate kstrto*() functions
- error handling was simplified
- the error return value of visorchannel_write() was corrected
- switch use of driver-specific types to kernel types

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-27 08:57:38 -07:00
Benjamin Romer 1ddb8a0626 staging: unisys: ABI documentation for new sysfs entries
This patch adds a documentation file for all of the interfaces that were moved
to sysfs by the other patches in this set.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-24 15:07:59 -07:00
Benjamin Romer bec684638c staging: unisys: clean up diagdump proc entry code
Remove remnant code left over from the diagdump proc entry.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-24 15:06:44 -07:00
Benjamin Romer 18b87ed1d0 staging: unisys: move chipsetready to sysfs
Move the chipsetready proc entry to sysfs under a new directory guest. This
entry is used by Unisys application software on the guest to acknowledge
completion of specific events for integration purposes, but these
acknowledgements are not required for the guest to operate correctly.

The store function is simplified as well, to use scanf() instead of copying
the buffer and using strsep().

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-24 15:06:44 -07:00
Benjamin Romer 422af17c67 staging: unisys: move installer to sysfs and split fields
The installer entry in /proc/visorchipset/installer was composed of three
separate fields as one entry. This patch removes the proc entry and associated
functions, and creates new fields with distinct entries under sysfs in the
visorchipset/install directory. The fields are:

	textid: used to send the ID of a string that should be displayed on
		s-Par's automatic installation progress screen. Setting this
		field when not in installation mode (boottotool was set on
		the previous guest boot) has no effect.

	remaining_steps: used to set the value of the progress bar on the
		s-Par automatic installation progress screen. This field has
		no effect if not in installation mode.

	error: used to send the ID of a string that should be displayed on
		s-Par's automatic installation progress screen when an error
		is encountered during installation. This field has no effect
		if not in installation mode.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-24 15:06:44 -07:00
Erik Arfvidson cfe4571f72 staging: unisys: fix and remove virthba comments
This patch fixes formatting and cleans up unneeded comments

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-22 16:18:56 -07:00
Benjamin Romer 54b3122900 staging: unisys: move boottotool out of proc to sysfs
Move the proc entry controlling the boottotool flag to procfs. The field
appears in /sys/devices/platform/visorchipset/install/boottotool.

The boottotool flag controls s-Par behavior on the next boot of this guest.
Setting the flag will cause the guest to boot from the utility and installation
image, which will use the value in the toolaction field to determine what
operation is being requested.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-22 16:11:00 -07:00
Benjamin Romer 19f6634f41 staging: unisys: add toolaction to sysfs
Move the proc entry for controlling the toolaction field to sysfs. The field
appears in /sys/devices/platform/visorchipset/install/toolaction.

This field is used to tell s-Par which type of recovery tool action to perform
on the next guest boot-up. The meaning of the value is dependent on the type
of installation software used to commission the guest.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-22 16:11:00 -07:00
Erik Arfvidson 79014eb1f2 staging: unisys: added virthba enable_ints entry
This patch adds enable_ints entry to virthba directory

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21 14:27:34 -07:00
Erik Arfvidson 5d1501913b staging: unisys: added virthba rqwait entry
This patch adds the rqwait entry into the virthba debugfs directory

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21 14:27:34 -07:00
Erik Arfvidson d9c5607e51 staging: unisys: added virthba debugfs dir and info entry
This patch adds virthba debugfs directory and info entry

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21 14:25:17 -07:00
Erik Arfvidson 29a2600ce4 staging: unisys: remove virthba proc files
This patch removes all proc entries, directories, and functions

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-21 14:23:08 -07:00
Benjamin Romer 8a1182eb34 staging: unisys: detect controlvm channel on module load
The controlvm channel is not removable from a guest after the guest starts,
so it makes no sense to constantly check for it. Move the channel address
discovery to visorchipset_init(), and remove all of the checks for the channel
address from the rest of the module, as the module will not load if the
channel pointer is not valid.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-17 18:11:33 -07:00
Benjamin Romer 524b0b63a1 staging: unisys: simplify controlvm channel address function
There is no reason to have controlvm_get_channel_address() defined in a
separate file. Move it to visorchipset_main.c, remove the no-op functions
controlvm_init() and controlvm_deinit() from visorchipset_main.c, and remove
the controlvm.h and controlvm_direct.c files from the module.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-17 18:11:33 -07:00