diff options
| author | Ian Munsie <imunsie@au1.ibm.com> | 2012-11-08 00:10:29 -0500 |
|---|---|---|
| committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-11-14 23:08:07 -0500 |
| commit | cca55d9ddf6d431114ab9f7cad3e761b74255c9c (patch) | |
| tree | 5c831e4a5071febb7a4e3e52f6c812de71ba612d /arch/powerpc | |
| parent | 798042da4e039ef551ff6e1b1ead50a763181daa (diff) | |
powerpc: Move get_longbusy_msecs into hvcall.h and remove duplicate function
I am going to use this in the next patch, better to have this code in
one place rather than three.
Signed-off-by: Ian Munsie <imunsie@au1.ibm.com>
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
| -rw-r--r-- | arch/powerpc/include/asm/hvcall.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/hvcall.h b/arch/powerpc/include/asm/hvcall.h index a3d26d8f63c..0975e5c0bb1 100644 --- a/arch/powerpc/include/asm/hvcall.h +++ b/arch/powerpc/include/asm/hvcall.h | |||
| @@ -356,6 +356,26 @@ struct hvcall_mpp_x_data { | |||
| 356 | 356 | ||
| 357 | int h_get_mpp_x(struct hvcall_mpp_x_data *mpp_x_data); | 357 | int h_get_mpp_x(struct hvcall_mpp_x_data *mpp_x_data); |
| 358 | 358 | ||
| 359 | static inline unsigned int get_longbusy_msecs(int longbusy_rc) | ||
| 360 | { | ||
| 361 | switch (longbusy_rc) { | ||
| 362 | case H_LONG_BUSY_ORDER_1_MSEC: | ||
| 363 | return 1; | ||
| 364 | case H_LONG_BUSY_ORDER_10_MSEC: | ||
| 365 | return 10; | ||
| 366 | case H_LONG_BUSY_ORDER_100_MSEC: | ||
| 367 | return 100; | ||
| 368 | case H_LONG_BUSY_ORDER_1_SEC: | ||
| 369 | return 1000; | ||
| 370 | case H_LONG_BUSY_ORDER_10_SEC: | ||
| 371 | return 10000; | ||
| 372 | case H_LONG_BUSY_ORDER_100_SEC: | ||
| 373 | return 100000; | ||
| 374 | default: | ||
| 375 | return 1; | ||
| 376 | } | ||
| 377 | } | ||
| 378 | |||
| 359 | #ifdef CONFIG_PPC_PSERIES | 379 | #ifdef CONFIG_PPC_PSERIES |
| 360 | extern int CMO_PrPSP; | 380 | extern int CMO_PrPSP; |
| 361 | extern int CMO_SecPSP; | 381 | extern int CMO_SecPSP; |
