From patchwork Tue Aug 24 13:47:04 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Wang X-Patchwork-Id: 126541 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o7ODlHnB030142 for ; Tue, 24 Aug 2010 13:47:18 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755294Ab0HXNrI (ORCPT ); Tue, 24 Aug 2010 09:47:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:12357 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751660Ab0HXNrH (ORCPT ); Tue, 24 Aug 2010 09:47:07 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o7ODl7eX029073 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 24 Aug 2010 09:47:07 -0400 Received: from [127.0.1.1] (dhcp-65-37.nay.redhat.com [10.66.65.37]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o7ODl4S6007229; Tue, 24 Aug 2010 09:47:05 -0400 Subject: [PATCH kvm-unit-tests 02/10] Remove trailing whitespaces To: jasowang@redhat.com, mtosatti@redhat.com, avi@redhat.com, kvm@vger.kernel.org From: Jason Wang Date: Tue, 24 Aug 2010 21:47:04 +0800 Message-ID: <20100824134704.17082.76080.stgit@FreeLancer> In-Reply-To: <20100824134523.17082.8727.stgit@FreeLancer> References: <20100824134523.17082.8727.stgit@FreeLancer> User-Agent: StGit/0.15 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 24 Aug 2010 13:47:18 +0000 (UTC) diff --git a/config-x86-common.mak b/config-x86-common.mak index 19bffd4..2d2965f 100644 --- a/config-x86-common.mak +++ b/config-x86-common.mak @@ -32,18 +32,18 @@ tests_and_config = $(TEST_DIR)/*.flat $(TEST_DIR)/unittests.cfg test_cases: $(tests-common) $(tests) $(TEST_DIR)/%.o: CFLAGS += -std=gnu99 -ffreestanding -I lib -I lib/x86 - + $(TEST_DIR)/access.flat: $(cstart.o) $(TEST_DIR)/access.o $(TEST_DIR)/print.o - + $(TEST_DIR)/hypercall.flat: $(cstart.o) $(TEST_DIR)/hypercall.o - + $(TEST_DIR)/sieve.flat: $(cstart.o) $(TEST_DIR)/sieve.o \ $(TEST_DIR)/vm.o - + $(TEST_DIR)/vmexit.flat: $(cstart.o) $(TEST_DIR)/vmexit.o - + $(TEST_DIR)/smptest.flat: $(cstart.o) $(TEST_DIR)/smptest.o - + $(TEST_DIR)/emulator.flat: $(cstart.o) $(TEST_DIR)/emulator.o \ $(TEST_DIR)/vm.o $(TEST_DIR)/print.o @@ -52,7 +52,7 @@ $(TEST_DIR)/port80.flat: $(cstart.o) $(TEST_DIR)/port80.o $(TEST_DIR)/tsc.flat: $(cstart.o) $(TEST_DIR)/tsc.o $(TEST_DIR)/apic.flat: $(cstart.o) $(TEST_DIR)/apic.o $(TEST_DIR)/vm.o \ - $(TEST_DIR)/print.o + $(TEST_DIR)/print.o $(TEST_DIR)/realmode.flat: $(TEST_DIR)/realmode.o $(CC) -m32 -nostdlib -o $@ -Wl,-T,$(TEST_DIR)/realmode.lds $^ diff --git a/x86/access.c b/x86/access.c index a0d88e1..067565b 100644 --- a/x86/access.c +++ b/x86/access.c @@ -157,7 +157,7 @@ static void ac_test_show(ac_test_t *at); void lidt(idt_entry_t *idt, int nentries) { descriptor_table_t dt; - + dt.limit = nentries * sizeof(*idt) - 1; dt.linear_addr = (unsigned long)idt; asm volatile ("lidt %0" : : "m"(dt)); diff --git a/x86/cstart64.S b/x86/cstart64.S index cc4c80f..5d358ad 100644 --- a/x86/cstart64.S +++ b/x86/cstart64.S @@ -19,7 +19,7 @@ stacktop: ring0stacktop: .data - + .align 4096 ptl2: i = 0 @@ -38,7 +38,7 @@ ptl3: .align 4096 ptl4: .quad ptl3 + 7 - + .align 4096 gdt64_desc: diff --git a/x86/print.S b/x86/print.S index c1b1c0d..b445381 100644 --- a/x86/print.S +++ b/x86/print.S @@ -3,12 +3,12 @@ #define PSEUDO_SERIAL_PORT 0xf1 - + .text PRINT "boo" hlt 1: jmp 1b - + .globl print print: push %rax @@ -24,7 +24,7 @@ putchar: outsb jmp putchar done: - + pop %rdx pop %rsi pop %rax diff --git a/x86/sieve.c b/x86/sieve.c index ef4a5a0..6cbcd6d 100644 --- a/x86/sieve.c +++ b/x86/sieve.c @@ -46,6 +46,6 @@ int main() test_sieve("virtual", v, VSIZE); vfree(v); } - + return 0; } diff --git a/x86/vm.c b/x86/vm.c index 62b3ba8..b34449f 100644 --- a/x86/vm.c +++ b/x86/vm.c @@ -30,7 +30,7 @@ void *alloc_page() if (!free) return 0; - + p = free; free = *(void **)free; @@ -184,7 +184,7 @@ void *vmalloc(unsigned long size) unsigned pages; size += sizeof(unsigned long); - + size = (size + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1); vfree_top -= size; mem = p = vfree_top; @@ -201,7 +201,7 @@ void *vmalloc(unsigned long size) void vfree(void *mem) { unsigned long size = ((unsigned long *)mem)[-1]; - + while (size) { free_page(phys_to_virt(get_pte(phys_to_virt(read_cr3()), mem) & PTE_ADDR)); mem += PAGE_SIZE;