Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 370781
b: refs/heads/master
c: 973e2ab
h: refs/heads/master
i:
  370779: 8504464
v: v3
  • Loading branch information
Benjamin Herrenschmidt committed Apr 24, 2013
1 parent d073f75 commit bab347a
Show file tree
Hide file tree
Showing 10 changed files with 68 additions and 12 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: 016af59f0f8cd10f27773df8f0034b5f3b46a138
refs/heads/master: 973e2abd15326114ff9a099d6dfe0ef6be6fc7e6
1 change: 1 addition & 0 deletions trunk/arch/powerpc/kernel/lparcfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ static void parse_system_parameter_string(struct seq_file *m)
__pa(rtas_data_buf),
RTAS_DATA_BUF_SIZE);
memcpy(local_buffer, rtas_data_buf, SPLPAR_MAXLENGTH);
local_buffer[SPLPAR_MAXLENGTH - 1] = '\0';
spin_unlock(&rtas_data_buf_lock);

if (call_status != 0) {
Expand Down
8 changes: 4 additions & 4 deletions trunk/arch/powerpc/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -910,10 +910,6 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
flush_altivec_to_thread(src);
flush_vsx_to_thread(src);
flush_spe_to_thread(src);
#ifdef CONFIG_HAVE_HW_BREAKPOINT
flush_ptrace_hw_breakpoint(src);
#endif /* CONFIG_HAVE_HW_BREAKPOINT */

*dst = *src;
return 0;
}
Expand Down Expand Up @@ -984,6 +980,10 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
p->thread.ksp_limit = (unsigned long)task_stack_page(p) +
_ALIGN_UP(sizeof(struct thread_info), 16);

#ifdef CONFIG_HAVE_HW_BREAKPOINT
p->thread.ptrace_bps[0] = NULL;
#endif

#ifdef CONFIG_PPC_STD_MMU_64
if (mmu_has_feature(MMU_FTR_SLB)) {
unsigned long sp_vsid;
Expand Down
4 changes: 4 additions & 0 deletions trunk/arch/powerpc/kernel/vdso.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ static struct vdso_patch_def vdso_patches[] = {
CPU_FTR_USE_TB, 0,
"__kernel_get_tbfreq", NULL
},
{
CPU_FTR_USE_TB, 0,
"__kernel_time", NULL
},
};

/*
Expand Down
26 changes: 26 additions & 0 deletions trunk/arch/powerpc/kernel/vdso32/gettimeofday.S
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,32 @@ V_FUNCTION_BEGIN(__kernel_clock_getres)
V_FUNCTION_END(__kernel_clock_getres)


/*
* Exact prototype of time()
*
* time_t time(time *t);
*
*/
V_FUNCTION_BEGIN(__kernel_time)
.cfi_startproc
mflr r12
.cfi_register lr,r12

mr r11,r3 /* r11 holds t */
bl __get_datapage@local
mr r9, r3 /* datapage ptr in r9 */

lwz r3,STAMP_XTIME+TSPEC_TV_SEC(r9)

cmplwi r11,0 /* check if t is NULL */
beq 2f
stw r3,0(r11) /* store result at *t */
2: mtlr r12
crclr cr0*4+so
blr
.cfi_endproc
V_FUNCTION_END(__kernel_time)

/*
* This is the core of clock_gettime() and gettimeofday(),
* it returns the current time in r3 (seconds) and r4.
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/powerpc/kernel/vdso32/vdso32.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ VERSION
#ifdef CONFIG_PPC64
__kernel_getcpu;
#endif
__kernel_time;

local: *;
};
Expand Down
26 changes: 26 additions & 0 deletions trunk/arch/powerpc/kernel/vdso64/gettimeofday.S
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,32 @@ V_FUNCTION_BEGIN(__kernel_clock_getres)
.cfi_endproc
V_FUNCTION_END(__kernel_clock_getres)

/*
* Exact prototype of time()
*
* time_t time(time *t);
*
*/
V_FUNCTION_BEGIN(__kernel_time)
.cfi_startproc
mflr r12
.cfi_register lr,r12

mr r11,r3 /* r11 holds t */
bl V_LOCAL_FUNC(__get_datapage)

ld r4,STAMP_XTIME+TSPC64_TV_SEC(r3)

cmpldi r11,0 /* check if t is NULL */
beq 2f
std r4,0(r11) /* store result at *t */
2: mtlr r12
crclr cr0*4+so
mr r3,r4
blr
.cfi_endproc
V_FUNCTION_END(__kernel_time)


/*
* This is the core of clock_gettime() and gettimeofday(),
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/powerpc/kernel/vdso64/vdso64.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ VERSION
__kernel_sync_dicache_p5;
__kernel_sigtramp_rt64;
__kernel_getcpu;
__kernel_time;

local: *;
};
Expand Down
6 changes: 1 addition & 5 deletions trunk/drivers/macintosh/smu.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,7 @@ static void smu_start_cmd(void)

DPRINTK("SMU: starting cmd %x, %d bytes data\n", cmd->cmd,
cmd->data_len);
DPRINTK("SMU: data buffer: %02x %02x %02x %02x %02x %02x %02x %02x\n",
((u8 *)cmd->data_buf)[0], ((u8 *)cmd->data_buf)[1],
((u8 *)cmd->data_buf)[2], ((u8 *)cmd->data_buf)[3],
((u8 *)cmd->data_buf)[4], ((u8 *)cmd->data_buf)[5],
((u8 *)cmd->data_buf)[6], ((u8 *)cmd->data_buf)[7]);
DPRINTK("SMU: data buffer: %8ph\n", cmd->data_buf);

/* Fill the SMU command buffer */
smu->cmd_buf->cmd = cmd->cmd;
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/macintosh/via-pmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -750,8 +750,9 @@ done_battery_state_smart(struct adb_request* req)
voltage = (req->reply[8] << 8) | req->reply[9];
break;
default:
printk(KERN_WARNING "pmu.c : unrecognized battery info, len: %d, %02x %02x %02x %02x\n",
req->reply_len, req->reply[0], req->reply[1], req->reply[2], req->reply[3]);
pr_warn("pmu.c: unrecognized battery info, "
"len: %d, %4ph\n", req->reply_len,
req->reply);
break;
}
}
Expand Down

0 comments on commit bab347a

Please sign in to comment.