diff options
Diffstat (limited to 'drivers/s390/cio/qdio.c')
| -rw-r--r-- | drivers/s390/cio/qdio.c | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/drivers/s390/cio/qdio.c b/drivers/s390/cio/qdio.c index 40a3208c7cf3..e2a781b6b21d 100644 --- a/drivers/s390/cio/qdio.c +++ b/drivers/s390/cio/qdio.c | |||
| @@ -48,11 +48,11 @@ | |||
| 48 | #include <asm/debug.h> | 48 | #include <asm/debug.h> |
| 49 | #include <asm/s390_rdev.h> | 49 | #include <asm/s390_rdev.h> |
| 50 | #include <asm/qdio.h> | 50 | #include <asm/qdio.h> |
| 51 | #include <asm/airq.h> | ||
| 51 | 52 | ||
| 52 | #include "cio.h" | 53 | #include "cio.h" |
| 53 | #include "css.h" | 54 | #include "css.h" |
| 54 | #include "device.h" | 55 | #include "device.h" |
| 55 | #include "airq.h" | ||
| 56 | #include "qdio.h" | 56 | #include "qdio.h" |
| 57 | #include "ioasm.h" | 57 | #include "ioasm.h" |
| 58 | #include "chsc.h" | 58 | #include "chsc.h" |
| @@ -96,7 +96,7 @@ static debug_info_t *qdio_dbf_slsb_in; | |||
| 96 | static volatile struct qdio_q *tiq_list=NULL; /* volatile as it could change | 96 | static volatile struct qdio_q *tiq_list=NULL; /* volatile as it could change |
| 97 | during a while loop */ | 97 | during a while loop */ |
| 98 | static DEFINE_SPINLOCK(ttiq_list_lock); | 98 | static DEFINE_SPINLOCK(ttiq_list_lock); |
| 99 | static int register_thinint_result; | 99 | static void *tiqdio_ind; |
| 100 | static void tiqdio_tl(unsigned long); | 100 | static void tiqdio_tl(unsigned long); |
| 101 | static DECLARE_TASKLET(tiqdio_tasklet,tiqdio_tl,0); | 101 | static DECLARE_TASKLET(tiqdio_tasklet,tiqdio_tl,0); |
| 102 | 102 | ||
| @@ -399,7 +399,7 @@ qdio_get_indicator(void) | |||
| 399 | { | 399 | { |
| 400 | int i; | 400 | int i; |
| 401 | 401 | ||
| 402 | for (i=1;i<INDICATORS_PER_CACHELINE;i++) | 402 | for (i = 0; i < INDICATORS_PER_CACHELINE; i++) |
| 403 | if (!indicator_used[i]) { | 403 | if (!indicator_used[i]) { |
| 404 | indicator_used[i]=1; | 404 | indicator_used[i]=1; |
| 405 | return indicators+i; | 405 | return indicators+i; |
| @@ -1408,8 +1408,7 @@ __tiqdio_inbound_processing(struct qdio_q *q, int spare_ind_was_set) | |||
| 1408 | if (q->hydra_gives_outbound_pcis) { | 1408 | if (q->hydra_gives_outbound_pcis) { |
| 1409 | if (!q->siga_sync_done_on_thinints) { | 1409 | if (!q->siga_sync_done_on_thinints) { |
| 1410 | SYNC_MEMORY_ALL; | 1410 | SYNC_MEMORY_ALL; |
| 1411 | } else if ((!q->siga_sync_done_on_outb_tis)&& | 1411 | } else if (!q->siga_sync_done_on_outb_tis) { |
| 1412 | (q->hydra_gives_outbound_pcis)) { | ||
| 1413 | SYNC_MEMORY_ALL_OUTB; | 1412 | SYNC_MEMORY_ALL_OUTB; |
| 1414 | } | 1413 | } |
| 1415 | } else { | 1414 | } else { |
| @@ -1911,8 +1910,7 @@ qdio_fill_thresholds(struct qdio_irq *irq_ptr, | |||
| 1911 | } | 1910 | } |
| 1912 | } | 1911 | } |
| 1913 | 1912 | ||
| 1914 | static int | 1913 | static void tiqdio_thinint_handler(void *ind, void *drv_data) |
| 1915 | tiqdio_thinint_handler(void) | ||
| 1916 | { | 1914 | { |
| 1917 | QDIO_DBF_TEXT4(0,trace,"thin_int"); | 1915 | QDIO_DBF_TEXT4(0,trace,"thin_int"); |
| 1918 | 1916 | ||
| @@ -1925,7 +1923,6 @@ tiqdio_thinint_handler(void) | |||
| 1925 | tiqdio_clear_global_summary(); | 1923 | tiqdio_clear_global_summary(); |
| 1926 | 1924 | ||
| 1927 | tiqdio_inbound_checks(); | 1925 | tiqdio_inbound_checks(); |
| 1928 | return 0; | ||
| 1929 | } | 1926 | } |
| 1930 | 1927 | ||
| 1931 | static void | 1928 | static void |
| @@ -2445,7 +2442,7 @@ tiqdio_set_subchannel_ind(struct qdio_irq *irq_ptr, int reset_to_zero) | |||
| 2445 | real_addr_dev_st_chg_ind=0; | 2442 | real_addr_dev_st_chg_ind=0; |
| 2446 | } else { | 2443 | } else { |
| 2447 | real_addr_local_summary_bit= | 2444 | real_addr_local_summary_bit= |
| 2448 | virt_to_phys((volatile void *)indicators); | 2445 | virt_to_phys((volatile void *)tiqdio_ind); |
| 2449 | real_addr_dev_st_chg_ind= | 2446 | real_addr_dev_st_chg_ind= |
| 2450 | virt_to_phys((volatile void *)irq_ptr->dev_st_chg_ind); | 2447 | virt_to_phys((volatile void *)irq_ptr->dev_st_chg_ind); |
| 2451 | } | 2448 | } |
| @@ -3740,23 +3737,25 @@ static void | |||
| 3740 | tiqdio_register_thinints(void) | 3737 | tiqdio_register_thinints(void) |
| 3741 | { | 3738 | { |
| 3742 | char dbf_text[20]; | 3739 | char dbf_text[20]; |
| 3743 | register_thinint_result= | 3740 | |
| 3744 | s390_register_adapter_interrupt(&tiqdio_thinint_handler); | 3741 | tiqdio_ind = |
| 3745 | if (register_thinint_result) { | 3742 | s390_register_adapter_interrupt(&tiqdio_thinint_handler, NULL); |
| 3746 | sprintf(dbf_text,"regthn%x",(register_thinint_result&0xff)); | 3743 | if (IS_ERR(tiqdio_ind)) { |
| 3744 | sprintf(dbf_text, "regthn%lx", PTR_ERR(tiqdio_ind)); | ||
| 3747 | QDIO_DBF_TEXT0(0,setup,dbf_text); | 3745 | QDIO_DBF_TEXT0(0,setup,dbf_text); |
| 3748 | QDIO_PRINT_ERR("failed to register adapter handler " \ | 3746 | QDIO_PRINT_ERR("failed to register adapter handler " \ |
| 3749 | "(rc=%i).\nAdapter interrupts might " \ | 3747 | "(rc=%li).\nAdapter interrupts might " \ |
| 3750 | "not work. Continuing.\n", | 3748 | "not work. Continuing.\n", |
| 3751 | register_thinint_result); | 3749 | PTR_ERR(tiqdio_ind)); |
| 3750 | tiqdio_ind = NULL; | ||
| 3752 | } | 3751 | } |
| 3753 | } | 3752 | } |
| 3754 | 3753 | ||
| 3755 | static void | 3754 | static void |
| 3756 | tiqdio_unregister_thinints(void) | 3755 | tiqdio_unregister_thinints(void) |
| 3757 | { | 3756 | { |
| 3758 | if (!register_thinint_result) | 3757 | if (tiqdio_ind) |
| 3759 | s390_unregister_adapter_interrupt(&tiqdio_thinint_handler); | 3758 | s390_unregister_adapter_interrupt(tiqdio_ind); |
| 3760 | } | 3759 | } |
| 3761 | 3760 | ||
| 3762 | static int | 3761 | static int |
| @@ -3768,8 +3767,8 @@ qdio_get_qdio_memory(void) | |||
| 3768 | for (i=1;i<INDICATORS_PER_CACHELINE;i++) | 3767 | for (i=1;i<INDICATORS_PER_CACHELINE;i++) |
| 3769 | indicator_used[i]=0; | 3768 | indicator_used[i]=0; |
| 3770 | indicators = kzalloc(sizeof(__u32)*(INDICATORS_PER_CACHELINE), | 3769 | indicators = kzalloc(sizeof(__u32)*(INDICATORS_PER_CACHELINE), |
| 3771 | GFP_KERNEL); | 3770 | GFP_KERNEL); |
| 3772 | if (!indicators) | 3771 | if (!indicators) |
| 3773 | return -ENOMEM; | 3772 | return -ENOMEM; |
| 3774 | return 0; | 3773 | return 0; |
| 3775 | } | 3774 | } |
| @@ -3780,7 +3779,6 @@ qdio_release_qdio_memory(void) | |||
| 3780 | kfree(indicators); | 3779 | kfree(indicators); |
| 3781 | } | 3780 | } |
| 3782 | 3781 | ||
| 3783 | |||
| 3784 | static void | 3782 | static void |
| 3785 | qdio_unregister_dbf_views(void) | 3783 | qdio_unregister_dbf_views(void) |
| 3786 | { | 3784 | { |
