dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

49 Commits

Author SHA1 Message Date
Bill Pemberton c3bf2e26b3 Staging: hv: remove ASSERT()s in Channel.c
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:36:13 -07:00
Bill Pemberton 7e052d98f2 Staging: hv: check return value of osd_PageAlloc()
The return value of osd_PageAlloc() was checked using an ASSERT().
Change that to more useful behaviour.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:36:12 -07:00
Hank Janssen c88c4e4c7a Staging: hv: Added new hv_utils driver with shutdown as first functionality
Addition of new driver for Hyper-V called hv_utils.
This driver is intended to support things like KVP, Timesync, Heartbeat etc.

This first release has support for Gracefull shutdown.
e.g. Select shutdown from the Hyper-V main admin screen and the Linux VM
will do a gracefull shutdown.

Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:36:03 -07:00
Hank Janssen 3e18951955 staging: hv: Corrected all header comment formats kernel-doc format
Removed kerneldoc /** from functions that should not have them.
Added proper kerneldoc headers to functions that should have them.

This includes fixes as pointed out by Randy Dunlap and Joe Perches.

Cc: Joe Perches <joe@perches.com>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:35:32 -07:00
Tejun Heo 5a0e3ad6af include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files.  percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed.  Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability.  As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

  http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
  only the necessary includes are there.  ie. if only gfp is used,
  gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
  blocks and try to put the new include such that its order conforms
  to its surrounding.  It's put in the include block which contains
  core kernel includes, in the same order that the rest are ordered -
  alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
  doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
  because the file doesn't have fitting include block), it prints out
  an error message indicating which .h file needs to be added to the
  file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
   over 4000 files, deleting around 700 includes and adding ~480 gfp.h
   and ~3000 slab.h inclusions.  The script emitted errors for ~400
   files.

2. Each error was manually checked.  Some didn't need the inclusion,
   some needed manual addition while adding it to implementation .h or
   embedding .c file was more appropriate for others.  This step added
   inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
   from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
   e.g. lib/decompress_*.c used malloc/free() wrappers around slab
   APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
   editing them as sprinkling gfp.h and slab.h inclusions around .h
   files could easily lead to inclusion dependency hell.  Most gfp.h
   inclusion directives were ignored as stuff from gfp.h was usually
   wildly available and often used in preprocessor macros.  Each
   slab.h inclusion directive was examined and added manually as
   necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
   were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
   distributed build env didn't work with gcov compiles) and a few
   more options had to be turned off depending on archs to make things
   build (like ipr on powerpc/64 which failed due to missing writeq).

   * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
   * powerpc and powerpc64 SMP allmodconfig
   * sparc and sparc64 SMP allmodconfig
   * ia64 SMP allmodconfig
   * s390 SMP allmodconfig
   * alpha SMP allmodconfig
   * um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
   a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-30 22:02:32 +09:00
Chris Nicholson 0fa37b1ee9 Staging: hv: fix brace coding style issue in Channel.c
This is a patch to the Channel.c file that fixes up a brace
warning found by checkpatch.pl

Signed-off-by: Chris Nicholson <chris.nicholson@cnick.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:37 -08:00
Haiyang Zhang 5996b3ddc4 Staging: hv: Fix vmbus event handler bug
The flag ENABLE_POLLING is always enabled in original Makefile, but
accidently removed during porting to mainline kernel. The patch fixes
this bug which can cause stalled network communication.  Credit needs to
go to Eric Sesterhenn <eric.sesterhenn@lsexperts.de> For pointing out a
typo in the original code as well.

Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-11-30 16:39:29 -08:00
Bill Pemberton 53af545b27 Staging: hv: remove more usages of internal list routines
The hv driver has it's own linked list routines.  This removes them
from more places in hv.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:04 -07:00
Greg Kroah-Hartman 7903506975 Staging: hv: remove PFN_CHANNEL_CALLBACK
Come on people, it doesn't get simpler than this, why
have a typedef for something so tiny...

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:03 -07:00
Greg Kroah-Hartman f4266e3425 Staging: hv: coding style cleanup for Channel.c
All clean now.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:02 -07:00
Greg Kroah-Hartman 645954c542 Staging: hv: move logging.h
Move it out of the include subdirectory.

No code changes here, just file movements.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:00 -07:00
Greg Kroah-Hartman 8dc0a06ad1 Staging: hv: remove typedefs from VmbusPacketFormat.h
All spiffied up now, shines like a brass button on the bump of a barge's
bilge.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:59 -07:00
Greg Kroah-Hartman 82250213d0 Staging: hv: typedef removal for ChannelMessages.h
ChannelMessages.h is now coding style clean.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:58 -07:00
Greg Kroah-Hartman ee3d7ddfe5 Staging: hv: typedef removal for VmbusApi.h
The function pointers still have ugly names, but the structures
are now cleaned up.

Note, a comment was added where the driver structure is pointing
at a problem that needs to be fixed up later in the code.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:58 -07:00
Greg Kroah-Hartman eacb1b4d24 Staging: hv: typdef fixes for HvSynicApi.h
Still some volatile mis-usages left to fix.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:57 -07:00
Greg Kroah-Hartman caf26a31b5 Staging: hv: osd.h: remove GUID typedef
GUID should not be a typedef.  As proof of the problem of typedefs,
look, we are passing 2 of these as a value in functions!  Bah...

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:56 -07:00
Greg Kroah-Hartman 4983b39a06 Staging: hv: move osd.h
This moves osd.h out of the include/ subdirectory.

No code changes are made here.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:56 -07:00
Greg Kroah-Hartman aded7165f2 Staging: hv: clean up typedefs in ChannelMgmt.h
This removes the typedefs from ChannelMgmt.h, it's now clean from a
codingstyle.pl standpoint.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:56 -07:00
Greg Kroah-Hartman a0086dc512 Staging: hv: remove Sources.c
It's a .c file including other .c files, ick.
Remove that mess now that the header files are unwound.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:55 -07:00
Greg Kroah-Hartman 46a0525385 Staging: hv: cleanup coding style issues in Channel.h
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:55 -07:00
Nicolas Palix b219b3f732 Staging: hv: Replace typedef SG_BUFFER_LIST by struct scatterlist
typedef SG_BUFFER_LIST is removed and its uses are replaced by the use of
struct scatterlist.

Signed-off-by: Nicolas Palix <npalix@diku.dk>
Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:54 -07:00
Greg Kroah-Hartman c8a429a465 Staging: hv: remove timer wrapper functions
Use a real timer (there's only one in the code), no wrapper is needed,
it just increases the complexity for no reason.

Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:54 -07:00
Greg Kroah-Hartman bfc30aae73 Staging: hv: osd: add osd_ prefix to global functions
Put a "osd_" prefix on the osd.c functions in order for us to play nicer
in the kernel namespace.

Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:54 -07:00
Greg Kroah-Hartman fa56d361b0 Staging: hv: osd: remove physical address wrapper functions
Use the real functions the kernel provides, so that people can see what
is actually going on in the code easier.

Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:53 -07:00
Bill Pemberton f488841708 Staging: hv: remove wrapper functions for atomic operations
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:53 -07:00
Bill Pemberton 7c369f405b Staging: hv: remove wrapper functions for bit operations
There were several Bit* functions that did nothing but call the kernel
functions with the parameters reversed.  Remove these and call the
functions directly.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:53 -07:00
Bill Pemberton 420beac4fc Staging: hv: remove WaitEventClose()
All WaitEventClose() close did was call kfree(), so get rid of it and
replace it with a call to kfree()

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:53 -07:00
Greg Kroah-Hartman bd1de70916 Staging: hv: fix sparse static warnings
This fixes up all of the sparse warnings about static functions.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:52 -07:00
Greg Kroah-Hartman b7d7ae6f1d Staging: hv: properly fix the printk() warnings
This fixes the printk() warnings on all platforms now (x86-64 and i386).

Cc: Hank Janssen  <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:52 -07:00
Greg Kroah-Hartman bafd2c2a16 Staging: hv: remove more printk() warnings
This should fix up the rest of the printk() warnings on an i386 build

Cc: Hank Janssen  <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:52 -07:00
Bill Pemberton 3fcc523adc Staging: hv: remove VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER typedef
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:51 -07:00
Bill Pemberton 0cf4fa8078 Staging: hv: remove VMBUS_CHANNEL_PACKET_PAGE_BUFFER typedef
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:51 -07:00
Bill Pemberton 454f18a963 Staging: hv: Remove C99 comments
Remove C99 // comments with traditional /* */ comments

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:50 -07:00
Bill Pemberton 226408a499 Staging: hv: Use %ld instead of %d for a long ints
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:49 -07:00
Greg Kroah-Hartman 0f5e44ca6e Staging: hv: make gVmbusConnection.ChannelLock a real spinlock
Don't use the wrapper functions for this lock, make it a real
lock so that we know what is going on.

I don't think we really want to be doing a irqsave for this code, but I
left it alone to preserve the original codepath.  It should be reviewed
later.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:48 -07:00
Greg Kroah-Hartman dd0813b6f5 Staging: hv: make gVmbusConnection.ChannelMsgLock a real spinlock
Don't use the wrapper functions for this lock, make it a real
lock so that we know what is going on.

I don't think we really want to be doing a irqsave for this code, but I
left it alone to preserve the original codepath.  It should be reviewed
later.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:48 -07:00
Greg Kroah-Hartman 54411c425f Staging: hv: make Channel->InboundLock a real spinlock
Don't use the wrapper functions for this lock, make it a real
lock so that we know what is going on.

I don't think we really want to be doing a irqsave for this code, but I
left it alone to preserve the original codepath.  It should be reviewed
later.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:48 -07:00
Greg Kroah-Hartman 8c69f52ab3 Staging: hv: osd: remove MemFree wrapper
Use the "real" kfree call instead of a wrapper function.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:47 -07:00
Greg Kroah-Hartman e276a3a578 Staging: hv: osd: remove MemAllocZeroed wrapper
Use the "real" kzalloc call instead of a wrapper function.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:47 -07:00
Greg Kroah-Hartman e40d37cc00 Staging: hv: osd: remove MemAlloc wrapper
Use the "real" kmalloc call instead of a wrapper function.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:47 -07:00
Greg Kroah-Hartman c4b0bc9482 Staging: hv: remove ULONG_PTR typedef
The ULONG_PTR typedef is now removed from the Hyper-V driver code.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:46 -07:00
Greg Kroah-Hartman 59471438cc Staging: hv: remove UINT64 and INT64 and UCHAR typedefs
The UINT64 and INT64 and UCHAR typedefs are now removed from the Hyper-V
driver code.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:46 -07:00
Greg Kroah-Hartman 4d64311468 Staging: hv: remove UINT32 and INT32 typedefs
The UINT32 and INT32 typedefs are now removed from the Hyper-V driver
code.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:46 -07:00
Greg Kroah-Hartman 5cd508bc3a Staging: hv: remove UINT16 and INT16 typedefs
The UINT16 and INT16 typedefs are now removed from the Hyper-V driver
code.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:46 -07:00
Greg Kroah-Hartman 5654e93226 Staging: hv: remove UINT8 and INT8 typedefs
The UINT8 and INT8 typedefs are now removed from the Hyper-V driver
code.

Had to include <linux/kernel.h> in a few places to get the
build to work properly as well.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:46 -07:00
Greg Kroah-Hartman e20f683b64 Staging: hv: remove VOID typedef
The VOID typedef is now removed from the Hyper-V driver code.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:45 -07:00
Greg Kroah-Hartman 8282c40014 Staging: hv: remove PVOID typedef
The PVOID typedef is now removed from the Hyper-V driver code.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:45 -07:00
Greg Kroah-Hartman 09d50ff8a2 Staging: hv: make the Hyper-V virtual bus code build
The #define KERNEL_2_6_27 needs to be set, and I adjusted the include
directories a bit to get things to build properly.

I also fixed up the direct access of bus_id, as that field is now gone.

The hv_vmbus code should now build properly, with no errors.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:44 -07:00
Hank Janssen 3e7ee4902f Staging: hv: add the Hyper-V virtual bus
This is the virtual bus that all of the Linux Hyper-V drivers use.

Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:43 -07:00