Skip to content

Commit

Permalink
BHYVE: Fix vmm lint errors
Browse files Browse the repository at this point in the history
"../../i86pc/io/vmm/vmm.c", line 2848: internal compiler error: Wasted space
  • Loading branch information
citrus-it committed Mar 1, 2018
1 parent b6b02f0 commit 5247e0a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
9 changes: 9 additions & 0 deletions usr/src/compat/freebsd/amd64/machine/vmparam.h
Expand Up @@ -20,6 +20,13 @@
extern caddr_t kpm_vbase;
extern size_t kpm_size;

#if defined(lint)

#define PHYS_TO_DMAP(x) ((uintptr_t)(x) | (uintptr_t)kpm_vbase)
#define DMAP_TO_PHYS(x) ((uintptr_t)(x) & ~(uintptr_t)kpm_vbase)

#else

#define PHYS_TO_DMAP(x) ({ \
ASSERT((uintptr_t)(x) < kpm_size); \
(uintptr_t)(x) | (uintptr_t)kpm_vbase; })
Expand All @@ -29,5 +36,7 @@ extern size_t kpm_size;
ASSERT((uintptr_t)(x) < ((uintptr_t)kpm_vbase + kpm_size)); \
(uintptr_t)(x) & ~(uintptr_t)kpm_vbase; }) \

#endif /* lint */


#endif /* _COMPAT_FREEBSD_AMD64_MACHINE_VMPARAM_H_ */
3 changes: 3 additions & 0 deletions usr/src/uts/i86pc/Makefile.rules
Expand Up @@ -501,6 +501,9 @@ $(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/vmm/intel/%.c
$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/vmm/io/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))

$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/vmm/amd/%.s
@($(LHEAD) $(LINT.s) $< $(LTAIL))

$(LINTS_DIR)/%.ln: $(UTSBASE)/i86pc/io/vmm/intel/%.s
@($(LHEAD) $(LINT.s) $< $(LTAIL))

Expand Down
3 changes: 2 additions & 1 deletion usr/src/uts/i86pc/io/vmm/amd/svm_support.s
Expand Up @@ -27,7 +27,6 @@
*/
#include <machine/asmacros.h>

#include "svm_assym.h"

/* Porting note: This is named 'svm_support.S' upstream. */

Expand All @@ -43,6 +42,8 @@ svm_launch(uint64_t pa, struct svm_regctx *gctx, struct pcpu *pcpu)

#else /* lint */

#include "svm_assym.h"

/*
* Be friendly to DTrace FBT's prologue/epilogue pattern matching.
*
Expand Down

0 comments on commit 5247e0a

Please sign in to comment.