summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2011-08-22 17:33:44 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2011-08-24 12:53:03 -0500
commit5d30abd488109fafecdfb3119449aefa5dd685b2 (patch)
tree8ef9d0d49b15507b8d1f3d82a52ce27d8af242d7 /src
parent0977c6da14b8fc1623043daa429041863498aeae (diff)
downloadtalos-hostboot-5d30abd488109fafecdfb3119449aefa5dd685b2.tar.gz
talos-hostboot-5d30abd488109fafecdfb3119449aefa5dd685b2.zip
Add environment var to remove debug messages.
- Add printkd function. - Create HOSTBOOT_DEBUG env var for printk. - Update trace interfaces to utilize HOSTBOOT_DEBUG. - Fix compile errors due to unused variables. Change-Id: Ib18c3ecd51ca333e0118949bf35476e9c5aa46a7 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/273 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/include/algorithm22
-rw-r--r--src/include/kernel/console.H10
-rw-r--r--src/include/usr/trace/interface.H12
-rw-r--r--src/kernel/msghandler.C2
-rw-r--r--src/kernel/ptmgr.C41
-rw-r--r--src/kernel/syscall.C4
-rwxr-xr-xsrc/libc++/builtins.C16
-rw-r--r--src/sys/vfs/vfs_main.C10
-rw-r--r--src/usr/cxxtest/test/cxxtesttest.H3
-rw-r--r--src/usr/example/test/exampletest.H2
-rw-r--r--src/usr/initservice/initsvcunittesttask2/tasktest2.H1
-rw-r--r--src/usr/testcore/kernel/ptmgrtest.H52
-rw-r--r--src/usr/testcore/kernel/slbtest.H12
-rw-r--r--src/usr/vfs/vfsrp.C9
14 files changed, 118 insertions, 78 deletions
diff --git a/src/include/algorithm b/src/include/algorithm
index 17c9380a3..32dd9e6a6 100644
--- a/src/include/algorithm
+++ b/src/include/algorithm
@@ -1,3 +1,25 @@
+// IBM_PROLOG_BEGIN_TAG
+// This is an automatically generated prolog.
+//
+// $Source: src/include/algorithm $
+//
+// IBM CONFIDENTIAL
+//
+// COPYRIGHT International Business Machines Corp. 2011
+//
+// p1
+//
+// Object Code Only (OCO) source materials
+// Licensed Internal Code Source Materials
+// IBM HostBoot Licensed Internal Code
+//
+// The source code for this program is not published or other-
+// wise divested of its trade secrets, irrespective of what has
+// been deposited with the U.S. Copyright Office.
+//
+// Origin: 30
+//
+// IBM_PROLOG_END
#ifndef ALGORITHM
#define ALGORITHM
diff --git a/src/include/kernel/console.H b/src/include/kernel/console.H
index 2d2cb08fc..51a729960 100644
--- a/src/include/kernel/console.H
+++ b/src/include/kernel/console.H
@@ -27,13 +27,19 @@
#include <string.h>
#include <builtins.h>
+#ifdef HOSTBOOT_DEBUG
+ #define printkd(format...) printk(## format)
+#else
+ #define printkd(format...)
+#endif
+
void printk(const char*, ...) FORMAT_PRINTF;
class Console
{
public:
int putc(int);
-
+
enum { BUFFER_SIZE = 1024 * 16 };
protected:
@@ -41,7 +47,7 @@ class Console
~Console() {};
private:
- size_t iv_pos;
+ size_t iv_pos;
char * iv_buffer;
};
diff --git a/src/include/usr/trace/interface.H b/src/include/usr/trace/interface.H
index 746a5aec1..2b684ccd6 100644
--- a/src/include/usr/trace/interface.H
+++ b/src/include/usr/trace/interface.H
@@ -90,7 +90,16 @@ const uint32_t TRACE_FIELD = 0; //Indicates trace is field
#define TRACDCOMP(des,printf_string,args...) do {} while(0)
#define TRACDBIN(des,descString,address,length) do {} while(0)
-#else /* direct them to real function calls */
+#else
+#ifndef HOSTBOOT_DEBUG
+
+#define TRACDCOMP(des,printf_string,args...) do {} while(0)
+#define TRACDBIN(des,descString,address,length) do {} while(0)
+
+#else
+
+/* direct them to real function calls */
+
/**
* @fn void TRACDCOMP0(des, printf_string)
@@ -134,6 +143,7 @@ const uint32_t TRACE_FIELD = 0; //Indicates trace is field
address, \
len, \
TRACE_DEBUG)
+#endif /* HOSTBOOT_DEBUG */
#endif /* TRAC_DEBUG_OUT */
/**
diff --git a/src/kernel/msghandler.C b/src/kernel/msghandler.C
index e414455b2..32da05673 100644
--- a/src/kernel/msghandler.C
+++ b/src/kernel/msghandler.C
@@ -86,7 +86,7 @@ int MessageHandler::recvMessage(msg_t* i_msg)
// Verify userspace didn't give a non-kernel message type.
if (i_msg->type < MSG_FIRST_SYS_TYPE)
{
- printk("MessageHandler::recvMessage> type=%d\n", i_msg->type);
+ printkd("MessageHandler::recvMessage> type=%d\n", i_msg->type);
return -EINVAL;
}
diff --git a/src/kernel/ptmgr.C b/src/kernel/ptmgr.C
index dd7f0b6a8..f1e72bbca 100644
--- a/src/kernel/ptmgr.C
+++ b/src/kernel/ptmgr.C
@@ -27,7 +27,7 @@
#include <arch/ppc.H>
#include <assert.h>
-//#define Dprintk(...) printk(args...)
+//#define Dprintk(...) printkd(args...)
#define Dprintk(args...)
#define Tprintk(args...)
#define Eprintk(args...) printk(args)
@@ -267,7 +267,7 @@ PageTableManager::PageTableManager( bool i_userSpace )
}
else
{
- printk( "Page Table is at 0x%.16lX : 0x%.16lX\n", getAddress(), getAddress() + getSize() );
+ printkd( "Page Table is at 0x%.16lX : 0x%.16lX\n", getAddress(), getAddress() + getSize() );
}
//initialize the table to be invalid
@@ -678,31 +678,32 @@ void PageTableManager::printPTE( const char* i_label,
{
if( i_pte == NULL )
{
- if( i_label ) { printk( "%s :: ", i_label ); }
- printk( "NULL PTE\n" );
+ if( i_label ) { printkd( "%s :: ", i_label ); }
+ printkd( "NULL PTE\n" );
return;
}
uint64_t pte_num = (((uint64_t)i_pte) - getAddress()) / sizeof(PageTableEntry);
+ pte_num++; pte_num--;
- if( i_label ) { printk( "%s :: ", i_label ); }
+ if( i_label ) { printkd( "%s :: ", i_label ); }
if( i_verbose )
{
- printk( "[%4ld:%4ld]> @%p\n", pte_num/PTEG_SIZE, pte_num%PTEG_SIZE, i_pte );
- printk( "Dword : %.16lX %.16lX\n", ((uint64_t*)i_pte)[0], ((uint64_t*)i_pte)[1] );
- printk( "-AVA : 0x%.14lX\n", i_pte->AVA );
- printk( "-SW : %ld\n", i_pte->SW );
- printk( "-LRU : %ld\n", i_pte->LRU );
- printk( "-V : %ld\n", i_pte->V );
- printk( "-RC : %ld%ld\n", i_pte->R, i_pte->C );
- printk( "-WIMG : 0x%.1lX\n", i_pte->WIMG );
- printk( "-pp0 : %ld\n", i_pte->pp0 );
- printk( "-pp1_2 : %ld\n", i_pte->pp1_2 );
- printk( "-PN : %ld\n", i_pte->PN );
+ printkd( "[%4ld:%4ld]> @%p\n", pte_num/PTEG_SIZE, pte_num%PTEG_SIZE, i_pte );
+ printkd( "Dword : %.16lX %.16lX\n", ((uint64_t*)i_pte)[0], ((uint64_t*)i_pte)[1] );
+ printkd( "-AVA : 0x%.14lX\n", i_pte->AVA );
+ printkd( "-SW : %ld\n", i_pte->SW );
+ printkd( "-LRU : %ld\n", i_pte->LRU );
+ printkd( "-V : %ld\n", i_pte->V );
+ printkd( "-RC : %ld%ld\n", i_pte->R, i_pte->C );
+ printkd( "-WIMG : 0x%.1lX\n", i_pte->WIMG );
+ printkd( "-pp0 : %ld\n", i_pte->pp0 );
+ printkd( "-pp1_2 : %ld\n", i_pte->pp1_2 );
+ printkd( "-PN : %ld\n", i_pte->PN );
}
else
{
- printk( "[%4ld:%4ld]> @%p : %.16lX %.16lX : AVA=%16lX, PN=%ld\n", pte_num/PTEG_SIZE, pte_num%PTEG_SIZE, i_pte, i_pte->dword0, i_pte->dword1, i_pte->AVA, i_pte->PN );
+ printkd( "[%4ld:%4ld]> @%p : %.16lX %.16lX : AVA=%16lX, PN=%ld\n", pte_num/PTEG_SIZE, pte_num%PTEG_SIZE, i_pte, i_pte->dword0, i_pte->dword1, i_pte->AVA, i_pte->PN );
}
}
@@ -713,10 +714,10 @@ void PageTableManager::printPTE( const char* i_label,
*/
void PageTableManager::_printPT( void )
{
- printk( "- -Page Table --\n" );
+ printkd( "- -Page Table --\n" );
uint64_t pt_addr = getAddress();
PageTableEntry* pte = (PageTableEntry*) pt_addr;
- printk( "@%p..0x%.16lX\n", pte, pt_addr + getSize() );
+ printkd( "@%p..0x%.16lX\n", pte, pt_addr + getSize() );
uint64_t num_ptes = getSize() / sizeof(PageTableEntry);
for( uint64_t x = 0; x < num_ptes; x++ )
@@ -729,7 +730,7 @@ void PageTableManager::_printPT( void )
pte++;
}
- printk( "-- End Page Table --\n" );
+ printkd( "-- End Page Table --\n" );
}
/**
diff --git a/src/kernel/syscall.C b/src/kernel/syscall.C
index 07e34a5f5..c33f2b40a 100644
--- a/src/kernel/syscall.C
+++ b/src/kernel/syscall.C
@@ -200,7 +200,7 @@ namespace Systemcalls
if (m->type >= MSG_FIRST_SYS_TYPE)
{
- printk("MsgSend> type=%d\n", m->type);
+ printkd("MsgSend> type=%d\n", m->type);
TASK_SETRTN(t, -EINVAL);
return;
}
@@ -234,7 +234,7 @@ namespace Systemcalls
if (m->type >= MSG_FIRST_SYS_TYPE)
{
- printk("MsgSendRecv> type=%d\n", m->type);
+ printkd("MsgSendRecv> type=%d\n", m->type);
TASK_SETRTN(t, -EINVAL);
return;
}
diff --git a/src/libc++/builtins.C b/src/libc++/builtins.C
index 0306556cf..e65d1d967 100755
--- a/src/libc++/builtins.C
+++ b/src/libc++/builtins.C
@@ -25,7 +25,6 @@
#include <arch/ppc.H>
#include <util/locked/list.H>
-//#include <kernel/console.H>
void* operator new(size_t s)
{
@@ -63,19 +62,19 @@ extern "C" int __cxa_guard_acquire(volatile uint64_t* gv)
// 0 -> uninitialized
// 1 -> locked
// 2 -> unlocked and initialized
-
+
uint32_t v = __sync_val_compare_and_swap((volatile uint32_t*)gv, 0, 1);
if (v == 0)
return 1;
if (v == 2)
return 0;
-
+
// Wait for peer thread to perform initialization (state 2).
while(2 != *(volatile uint32_t*)gv);
-
+
// Instruction barrier to ensure value is set before later loads execute.
- isync();
-
+ isync();
+
return 0;
}
@@ -127,7 +126,7 @@ Util::Locked::List<DtorEntry_t, DtorEntry_t::key_type> g_dtorRegistry;
void call_dtors(void * i_dso_handle)
{
DtorEntry_t * entry = NULL;
- // A module is never exited by different threads so
+ // A module is never exited by different threads so
// assume no locking needed here.
while( NULL != (entry = g_dtorRegistry.find(i_dso_handle)) )
{
@@ -142,12 +141,11 @@ extern "C" int __cxa_atexit(void (*i_dtor)(void*),
void* i_arg,
void* i_dso_handle)
{
- // Base kernel code may try to call this before mem heap is
+ // Base kernel code may try to call this before mem heap is
// available - so don't add it.
// TODO - Only need dtors for extended image modules
if(i_dso_handle != __dso_handle)
{
- // printk("Register dtor for %p\n",i_dso_handle);
DtorEntry_t * entry = new DtorEntry_t;
entry->key = i_dso_handle;
entry->dtor = i_dtor;
diff --git a/src/sys/vfs/vfs_main.C b/src/sys/vfs/vfs_main.C
index 33d79d8f2..a4d066c85 100644
--- a/src/sys/vfs/vfs_main.C
+++ b/src/sys/vfs/vfs_main.C
@@ -92,8 +92,8 @@ void vfs_main(void* i_barrier)
e->msg_q = (msg_q_t) msg->data[0];
vfsContents.insert(e);
- printk("VFS: Registering %p as %s\n",
- e->msg_q, e->key.key);
+ printkd("VFS: Registering %p as %s\n",
+ e->msg_q, e->key.key);
msg_respond(vfsMsgQ, msg);
}
break;
@@ -113,8 +113,8 @@ void vfs_main(void* i_barrier)
case VFS_MSG_EXEC:
{
- printk("VFS: Got exec request of %s\n",
- (const char*)msg->data[0]);
+ printkd("VFS: Got exec request of %s\n",
+ (const char*)msg->data[0]);
VfsSystemModule* module =
vfs_find_module(VFS_MODULES,
@@ -177,6 +177,6 @@ tid_t vfs_exec(VfsSystemModule * i_module, void* i_param)
}
return child;
}
-
+
diff --git a/src/usr/cxxtest/test/cxxtesttest.H b/src/usr/cxxtest/test/cxxtesttest.H
index 145dd046f..0c925aea3 100644
--- a/src/usr/cxxtest/test/cxxtesttest.H
+++ b/src/usr/cxxtest/test/cxxtesttest.H
@@ -52,8 +52,11 @@ public:
void testCxxTestTrace(void)
{
int32_t l_dec = 1234567890;
+ l_dec--; l_dec++;
uint32_t l_hex = 0x12345678;
+ l_hex--; l_hex++;
uint64_t l_bighex = 0x1234567890abcdef;
+ l_bighex--; l_bighex++;
TS_TRACE( "CxxTest Trace dec=%d", l_dec );
TS_TRACE( "CxxTest Trace hex=0x%x", l_hex );
diff --git a/src/usr/example/test/exampletest.H b/src/usr/example/test/exampletest.H
index 8e89cb03d..c08a30db5 100644
--- a/src/usr/example/test/exampletest.H
+++ b/src/usr/example/test/exampletest.H
@@ -102,7 +102,9 @@ public:
void testExampleForceTrace(void)
{
uint32_t i_32test = 0xdeadbeef;
+ i_32test--; i_32test++;
uint64_t i_64test = 0xbadc0ffee0ddf00d;
+ i_64test--; i_64test++;
TS_TRACE("Run TS_TRACE() as part of the example test\n" );
diff --git a/src/usr/initservice/initsvcunittesttask2/tasktest2.H b/src/usr/initservice/initsvcunittesttask2/tasktest2.H
index 3d3099da7..9dc1434d0 100644
--- a/src/usr/initservice/initsvcunittesttask2/tasktest2.H
+++ b/src/usr/initservice/initsvcunittesttask2/tasktest2.H
@@ -33,7 +33,6 @@
// Includes
/******************************************************************************/
#include <stdint.h>
-#include <kernel/console.H> // printk
#include <util/singleton.H>
namespace INITSERVICE
diff --git a/src/usr/testcore/kernel/ptmgrtest.H b/src/usr/testcore/kernel/ptmgrtest.H
index 3a60483c5..9d1793710 100644
--- a/src/usr/testcore/kernel/ptmgrtest.H
+++ b/src/usr/testcore/kernel/ptmgrtest.H
@@ -57,11 +57,11 @@ const pte_test_t TEST_DATA[] = {
{ 0x0000000040001FF8, 0x0000000000040001, 109, true, false }, // just before a page boundary
//2 addresses in the same page
- { 0x0000000090000040, 0x0000000000090000, 110, true, false },
- { 0x0000000090000100, 0x0000000000090000, 110, true, false },
+ { 0x0000000090000040, 0x0000000000090000, 110, true, false },
+ { 0x0000000090000100, 0x0000000000090000, 110, true, false },
//Out of range address (too big) ??
- { 0x0040000000000000, 0x0000000000004000, 111, true, false },
+ { 0x0040000000000000, 0x0000000000004000, 111, true, false },
//Several addresses with the same PTEG, enough to overflow a PTEG
{ 0x0000000080803000, 0x0000000000080803, 112, false, true }, // 2TB+8MB+12K
@@ -84,7 +84,7 @@ class ptmgrtest : public CxxTest::TestSuite
VA_RANGE_FINISH = 0x0000000085800000,
PN_RANGE_START = 107,
- PN_RANGE_FINISH = 115,
+ PN_RANGE_FINISH = 115,
};
public:
@@ -96,7 +96,7 @@ class ptmgrtest : public CxxTest::TestSuite
void test_hash40( void )
{
TS_TRACE( ">> test_hash40 <<" );
- printk( ">> test_hash40 <<\n" );
+ printkd( ">> test_hash40 <<\n" );
uint64_t fails, total = 0;
// Initialize the Page Table
@@ -110,12 +110,12 @@ class ptmgrtest : public CxxTest::TestSuite
if( TEST_DATA[x].hash != hash )
{
TS_FAIL( "ptmgrtest::test_hash40> ERROR : Hash mismatch" );
- printk( "VA=0x%.16lX, Exp: %.16lX, Act: %.16lX\n", TEST_DATA[x].va, TEST_DATA[x].hash, hash );
+ printkd( "VA=0x%.16lX, Exp: %.16lX, Act: %.16lX\n", TEST_DATA[x].va, TEST_DATA[x].hash, hash );
fails++;
}
else
{
- PASS_TRACE( "ptmgrtest::test_hash40> PASS : 0x%.16lX", TEST_DATA[x].va );
+ PASS_TRACE( "ptmgrtest::test_hash40> PASS : 0x%.16lX", TEST_DATA[x].va );
}
total++;
}
@@ -123,7 +123,7 @@ class ptmgrtest : public CxxTest::TestSuite
delete ptmgr;
TS_TRACE( "ptmgrtest::test_hash40> fails=%d/%d", fails, total );
- printk( "ptmgrtest::test_hash40> fails=%ld/%ld\n", fails, total );
+ printkd( "ptmgrtest::test_hash40> fails=%ld/%ld\n", fails, total );
}
/**
@@ -135,7 +135,7 @@ class ptmgrtest : public CxxTest::TestSuite
void test_addEntry( void )
{
TS_TRACE( ">> test_addEntry <<" );
- printk( ">> test_addEntry <<\n" );
+ printkd( ">> test_addEntry <<\n" );
uint64_t fails = 0;
uint64_t total = 0;
uint64_t status = 0;
@@ -217,7 +217,7 @@ class ptmgrtest : public CxxTest::TestSuite
delete ptmgr;
TS_TRACE( "ptmgrtest::test_addEntry> fails=%d/%d", fails, total );
- printk( "ptmgrtest::test_addEntry> fails=%ld/%ld\n", fails, total );
+ printkd( "ptmgrtest::test_addEntry> fails=%ld/%ld\n", fails, total );
}
/**
@@ -228,12 +228,12 @@ class ptmgrtest : public CxxTest::TestSuite
void test_delEntry( void )
{
TS_TRACE( ">> test_delEntry <<" );
- printk( ">> test_delEntry <<\n" );
+ printkd( ">> test_delEntry <<\n" );
uint64_t fails = 0;
uint64_t total = 0;
uint64_t ignored = 0;
- // 1) Initialize the Page Table
+ // 1) Initialize the Page Table
PageTableManager* ptmgr = new PageTableManager(true);
// 2) Populate the Page Table
@@ -249,7 +249,7 @@ class ptmgrtest : public CxxTest::TestSuite
if( status & PageTableManager::PTE_VALID )
{
TS_FAIL( "ptmgrtest::test_delEntry> ERROR : entry still present!" );
- printk( "VA = %.16lX\n", TEST_DATA[x].va );
+ printkd( "VA = %.16lX\n", TEST_DATA[x].va );
PageTableManager::printPTE( TEST_DATA[x].va, true );
fails++;
}
@@ -266,7 +266,7 @@ class ptmgrtest : public CxxTest::TestSuite
delete ptmgr;
TS_TRACE( "ptmgrtest::test_delEntry> fails=%d/%d", fails, total );
- printk( "ptmgrtest::test_delEntry> fails=%ld/%ld\n", fails, total );
+ printkd( "ptmgrtest::test_delEntry> fails=%ld/%ld\n", fails, total );
}
/**
@@ -277,13 +277,13 @@ class ptmgrtest : public CxxTest::TestSuite
*/
void test_delRangeVA( void )
{
- TS_TRACE( ">> test_delRangeVA <<" );
- printk( ">> test_delRangeVA <<\n" );
+ TS_TRACE( ">> test_delRangeVA <<" );
+ printkd( ">> test_delRangeVA <<\n" );
uint64_t fails = 0;
uint64_t total = 0;
uint64_t ignored = 0;
- // 1) Initialize the Page Table
+ // 1) Initialize the Page Table
PageTableManager* ptmgr = new PageTableManager(true);
// 2) Populate the Page Table
@@ -302,14 +302,14 @@ class ptmgrtest : public CxxTest::TestSuite
if( (status & PageTableManager::PTE_VALID) && TEST_DATA[x].delrangeva )
{
TS_FAIL( "ptmgrtest::test_delRangeVA> ERROR1 : entry still present" );
- printk( "addr = %.16lX\n", TEST_DATA[x].va );
+ printkd( "addr = %.16lX\n", TEST_DATA[x].va );
PageTableManager::printPTE( TEST_DATA[x].va, false );
fails++;
}
else if( !(status & PageTableManager::PTE_VALID) && !TEST_DATA[x].delrangeva )
{
TS_FAIL( "ptmgrtest::test_delRangeVA> ERROR2 : deleted a wrong entry" );
- printk( "addr = %.16lX\n", TEST_DATA[x].va );
+ printkd( "addr = %.16lX\n", TEST_DATA[x].va );
PageTableManager::printPTE( TEST_DATA[x].va, false );
fails++;
}
@@ -326,7 +326,7 @@ class ptmgrtest : public CxxTest::TestSuite
delete ptmgr;
TS_TRACE( "ptmgrtest::test_delRangeVA> fails=%d/%d", fails, total );
- printk( "ptmgrtest::test_delRangeVA> fails=%ld/%ld\n", fails, total );
+ printkd( "ptmgrtest::test_delRangeVA> fails=%ld/%ld\n", fails, total );
}
/**
@@ -337,13 +337,13 @@ class ptmgrtest : public CxxTest::TestSuite
*/
void test_delRangePN( void )
{
- TS_TRACE( ">> test_delRangePN <<" );
- printk( ">> test_delRangePN <<\n" );
+ TS_TRACE( ">> test_delRangePN <<" );
+ printkd( ">> test_delRangePN <<\n" );
uint64_t fails = 0;
uint64_t total = 0;
uint64_t pagenum = 0;
- // 1) Initialize the Page Table
+ // 1) Initialize the Page Table
PageTableManager* ptmgr = new PageTableManager(true);
// 2) Populate the Page Table
@@ -364,7 +364,7 @@ class ptmgrtest : public CxxTest::TestSuite
&& (pagenum <= PN_RANGE_FINISH) )
{
TS_FAIL( "ptmgrtest::test_delRangePN> ERROR1 : entry still present" );
- printk( "addr = %.16lX, page=%ld\n", TEST_DATA[x].va, pagenum );
+ printkd( "addr = %.16lX, page=%ld\n", TEST_DATA[x].va, pagenum );
PageTableManager::printPTE( TEST_DATA[x].va, false );
fails++;
}
@@ -373,7 +373,7 @@ class ptmgrtest : public CxxTest::TestSuite
&& (pagenum > PN_RANGE_FINISH) )
{
TS_FAIL( "ptmgrtest::test_delRangePN> ERROR2 : deleted a wrong entry" );
- printk( "addr = %.16lX, page=%ld\n", TEST_DATA[x].va, pagenum );
+ printkd( "addr = %.16lX, page=%ld\n", TEST_DATA[x].va, pagenum );
PageTableManager::printPTE( TEST_DATA[x].va, false );
fails++;
}
@@ -390,7 +390,7 @@ class ptmgrtest : public CxxTest::TestSuite
delete ptmgr;
TS_TRACE( "ptmgrtest::test_delRangePN> fails=%d/%d", fails, total );
- printk( "ptmgrtest::test_delRangePN> fails=%ld/%ld\n", fails, total );
+ printkd( "ptmgrtest::test_delRangePN> fails=%ld/%ld\n", fails, total );
}
//@todo - Test LRU
diff --git a/src/usr/testcore/kernel/slbtest.H b/src/usr/testcore/kernel/slbtest.H
index e82617f66..82a8d26b0 100644
--- a/src/usr/testcore/kernel/slbtest.H
+++ b/src/usr/testcore/kernel/slbtest.H
@@ -57,28 +57,28 @@ class slbtest: public CxxTest::TestSuite
{
int rc = 0;
uint64_t ra = 2*1024*1024;
- printk("Map Device @ ra = 0x%lX using mmio_map\n",ra);
+ printkd("Map Device @ ra = 0x%lX using mmio_map\n",ra);
uint64_t* virtAddrMMIO = static_cast<uint64_t*>
(mmio_map(reinterpret_cast<void*>(ra), 1));
if (virtAddrMMIO == NULL)
{
TS_FAIL("Failed to map using mmio_map\n");
}
- printk("Unmap Device @ va = %p using mmio_unmap\n",virtAddrMMIO);
+ printkd("Unmap Device @ va = %p using mmio_unmap\n",virtAddrMMIO);
rc = mmio_unmap(reinterpret_cast<void*>(virtAddrMMIO), 1);
if (rc != 0)
{
TS_FAIL("Failed to unmap using mmio_unmap\n");
}
- printk("Map Device @ ra = 0x%lX using dev_map\n",ra);
+ printkd("Map Device @ ra = 0x%lX using dev_map\n",ra);
uint64_t* virtAddrDEV = static_cast<uint64_t*>
(mmio_dev_map(reinterpret_cast<void*>(ra), THIRTYTWO_GB));
if (virtAddrDEV == NULL)
{
TS_FAIL("Failed to map using mmio_dev_map\n");
}
- printk("Unmap Device @ va = %p using dev_unmap\n",virtAddrDEV);
+ printkd("Unmap Device @ va = %p using dev_unmap\n",virtAddrDEV);
rc = mmio_dev_unmap(reinterpret_cast<void*>(virtAddrDEV));
if (rc != 0)
{
@@ -92,7 +92,7 @@ class slbtest: public CxxTest::TestSuite
msg_q_t mq = msg_q_create(); //Create empty message queue
uint64_t va = 0xC800000000; //800GB
uint64_t size = 0x100000; //1MB
- printk("Allocate 1MB block with empty msgq @ vaddr = 800GB within base segment\n");
+ printkd("Allocate 1MB block with empty msgq @ vaddr = 800GB within base segment\n");
rc = mm_alloc_block(mq,reinterpret_cast<void*>(va),size);
if (rc != 0)
{
@@ -101,7 +101,7 @@ class slbtest: public CxxTest::TestSuite
msg_q_t mq2 = msg_q_create(); //Create empty message queue
uint64_t va2 = 0xE100000000; //900GB
uint64_t size2 = 0x100000; //1MB
- printk("Allocate 1MB block with empty msgq @ vaddr = 900GB within base segment\n");
+ printkd("Allocate 1MB block with empty msgq @ vaddr = 900GB within base segment\n");
rc = mm_alloc_block(mq2,reinterpret_cast<void*>(va2),size2);
if (rc != 0)
{
diff --git a/src/usr/vfs/vfsrp.C b/src/usr/vfs/vfsrp.C
index d450339be..76cfd2c0e 100644
--- a/src/usr/vfs/vfsrp.C
+++ b/src/usr/vfs/vfsrp.C
@@ -21,7 +21,7 @@
//
// IBM_PROLOG_END
/**
- * @file vfsrp.C
+ * @file vfsrp.C
* @brief Virtual File system Extended image support
*/
@@ -70,7 +70,7 @@ void VfsRp::init( void * i_taskArgs )
errlHndl_t err = NULL;
err = Singleton<VfsRp>::instance()._init();
INITSERVICE::TaskArgs::TaskArgs* args = (INITSERVICE::TaskArgs::TaskArgs*)i_taskArgs;
- if(err)
+ if(err)
{
args->postErrorLog(err);
}
@@ -187,9 +187,8 @@ void VfsRp::msgHandler()
case VFS_MSG_EXEC:
{
- msg_t * msg1 = (msg_t *) msg->data[0];
TRACDCOMP(g_trac_vfs, "VFS: Got exec request of %s",
- (const char*)msg1->data[0]);
+ (const char*)((msg_t*)msg->data[0])->data[0]);
// run in own task so page faults can be handled
task_create(exec, msg);
@@ -290,7 +289,7 @@ void VfsRp::_exec(msg_t * i_msg)
// The TOC for the extended image sits at the start of the image and is
// not location dependant, so just use the one pointed to by iv_pnor_vaddr
// to avoid having to copy it to this block
- VfsSystemModule * module =
+ VfsSystemModule * module =
vfs_find_module((VfsSystemModule *)(iv_pnor_vaddr +
VFS_EXTENDED_MODULE_TABLE_OFFSET),
(const char*) msg1->data[0]);
OpenPOWER on IntegriCloud