Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 161094
b: refs/heads/master
c: b592e89
h: refs/heads/master
v: v3
  • Loading branch information
Christof Schmitt authored and James Bottomley committed Sep 5, 2009
1 parent 5d32bae commit 17f6b1f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 24 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0fac3f477b6b520ae7d972ceb6e958e6807c8e1a
refs/heads/master: b592e89ac9af521be164490e45c53c93e89c776f
8 changes: 8 additions & 0 deletions trunk/arch/s390/include/asm/timex.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ int get_sync_clock(unsigned long long *clock);
void init_cpu_timer(void);
unsigned long long monotonic_clock(void);

void tod_to_timeval(__u64, struct timespec *);

static inline
void stck_to_timespec(unsigned long long stck, struct timespec *ts)
{
tod_to_timeval(stck - TOD_UNIX_EPOCH, ts);
}

extern u64 sched_clock_base_cc;

#endif
8 changes: 1 addition & 7 deletions trunk/arch/s390/kernel/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ typedef struct
} debug_sprintf_entry_t;


extern void tod_to_timeval(uint64_t todval, struct timespec *xtime);

/* internal function prototyes */

static int debug_init(void);
Expand Down Expand Up @@ -1450,17 +1448,13 @@ debug_dflt_header_fn(debug_info_t * id, struct debug_view *view,
int area, debug_entry_t * entry, char *out_buf)
{
struct timespec time_spec;
unsigned long long time;
char *except_str;
unsigned long caller;
int rc = 0;
unsigned int level;

level = entry->id.fields.level;
time = entry->id.stck;
/* adjust todclock to 1970 */
time -= 0x8126d60e46000000LL - (0x3c26700LL * 1000000 * 4096);
tod_to_timeval(time, &time_spec);
stck_to_timespec(entry->id.stck, &time_spec);

if (entry->id.fields.exception)
except_str = "*";
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/s390/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ void tod_to_timeval(__u64 todval, struct timespec *xtime)
todval -= (sec * 1000000) << 12;
xtime->tv_nsec = ((todval * 1000) >> 12);
}
EXPORT_SYMBOL(tod_to_timeval);

void clock_comparator_work(void)
{
Expand Down
19 changes: 3 additions & 16 deletions trunk/drivers/s390/scsi/zfcp_dbf.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,6 @@ static void zfcp_dbf_hexdump(debug_info_t *dbf, void *to, int to_len,
}
}

/* FIXME: this duplicate this code in s390 debug feature */
static void zfcp_dbf_timestamp(unsigned long long stck, struct timespec *time)
{
unsigned long long sec;

stck -= 0x8126d60e46000000LL - (0x3c26700LL * 1000000 * 4096);
sec = stck >> 12;
do_div(sec, 1000000);
time->tv_sec = sec;
stck -= (sec * 1000000) << 12;
time->tv_nsec = ((stck * 1000) >> 12);
}

static void zfcp_dbf_tag(char **p, const char *label, const char *tag)
{
int i;
Expand Down Expand Up @@ -107,7 +94,7 @@ static int zfcp_dbf_view_header(debug_info_t *id, struct debug_view *view,
char *p = out_buf;

if (strncmp(dump->tag, "dump", ZFCP_DBF_TAG_SIZE) != 0) {
zfcp_dbf_timestamp(entry->id.stck, &t);
stck_to_timespec(entry->id.stck, &t);
zfcp_dbf_out(&p, "timestamp", "%011lu:%06lu",
t.tv_sec, t.tv_nsec);
zfcp_dbf_out(&p, "cpu", "%02i", entry->id.fields.cpuid);
Expand Down Expand Up @@ -320,7 +307,7 @@ static void zfcp_dbf_hba_view_response(char **p,
zfcp_dbf_out(p, "fsf_command", "0x%08x", r->fsf_command);
zfcp_dbf_out(p, "fsf_reqid", "0x%0Lx", r->fsf_reqid);
zfcp_dbf_out(p, "fsf_seqno", "0x%08x", r->fsf_seqno);
zfcp_dbf_timestamp(r->fsf_issued, &t);
stck_to_timespec(r->fsf_issued, &t);
zfcp_dbf_out(p, "fsf_issued", "%011lu:%06lu", t.tv_sec, t.tv_nsec);
zfcp_dbf_out(p, "fsf_prot_status", "0x%08x", r->fsf_prot_status);
zfcp_dbf_out(p, "fsf_status", "0x%08x", r->fsf_status);
Expand Down Expand Up @@ -976,7 +963,7 @@ static int zfcp_dbf_scsi_view_format(debug_info_t *id, struct debug_view *view,
zfcp_dbf_out(&p, "old_fsf_reqid", "0x%0Lx", r->old_fsf_reqid);
zfcp_dbf_out(&p, "fsf_reqid", "0x%0Lx", r->fsf_reqid);
zfcp_dbf_out(&p, "fsf_seqno", "0x%08x", r->fsf_seqno);
zfcp_dbf_timestamp(r->fsf_issued, &t);
stck_to_timespec(r->fsf_issued, &t);
zfcp_dbf_out(&p, "fsf_issued", "%011lu:%06lu", t.tv_sec, t.tv_nsec);

if (strncmp(r->tag, "rslt", ZFCP_DBF_TAG_SIZE) == 0) {
Expand Down

0 comments on commit 17f6b1f

Please sign in to comment.