diff options
Diffstat (limited to 'arch/s390/include/asm/idals.h')
| -rw-r--r-- | arch/s390/include/asm/idals.h | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/arch/s390/include/asm/idals.h b/arch/s390/include/asm/idals.h index e82c10efe65a..aae276d00383 100644 --- a/arch/s390/include/asm/idals.h +++ b/arch/s390/include/asm/idals.h | |||
| @@ -44,24 +44,18 @@ idal_is_needed(void *vaddr, unsigned int length) | |||
| 44 | /* | 44 | /* |
| 45 | * Return the number of idal words needed for an address/length pair. | 45 | * Return the number of idal words needed for an address/length pair. |
| 46 | */ | 46 | */ |
| 47 | static inline unsigned int | 47 | static inline unsigned int idal_nr_words(void *vaddr, unsigned int length) |
| 48 | idal_nr_words(void *vaddr, unsigned int length) | ||
| 49 | { | 48 | { |
| 50 | #ifdef __s390x__ | 49 | return ((__pa(vaddr) & (IDA_BLOCK_SIZE-1)) + length + |
| 51 | if (idal_is_needed(vaddr, length)) | 50 | (IDA_BLOCK_SIZE-1)) >> IDA_SIZE_LOG; |
| 52 | return ((__pa(vaddr) & (IDA_BLOCK_SIZE-1)) + length + | ||
| 53 | (IDA_BLOCK_SIZE-1)) >> IDA_SIZE_LOG; | ||
| 54 | #endif | ||
| 55 | return 0; | ||
| 56 | } | 51 | } |
| 57 | 52 | ||
| 58 | /* | 53 | /* |
| 59 | * Create the list of idal words for an address/length pair. | 54 | * Create the list of idal words for an address/length pair. |
| 60 | */ | 55 | */ |
| 61 | static inline unsigned long * | 56 | static inline unsigned long *idal_create_words(unsigned long *idaws, |
| 62 | idal_create_words(unsigned long *idaws, void *vaddr, unsigned int length) | 57 | void *vaddr, unsigned int length) |
| 63 | { | 58 | { |
| 64 | #ifdef __s390x__ | ||
| 65 | unsigned long paddr; | 59 | unsigned long paddr; |
| 66 | unsigned int cidaw; | 60 | unsigned int cidaw; |
| 67 | 61 | ||
| @@ -74,7 +68,6 @@ idal_create_words(unsigned long *idaws, void *vaddr, unsigned int length) | |||
| 74 | paddr += IDA_BLOCK_SIZE; | 68 | paddr += IDA_BLOCK_SIZE; |
| 75 | *idaws++ = paddr; | 69 | *idaws++ = paddr; |
| 76 | } | 70 | } |
| 77 | #endif | ||
| 78 | return idaws; | 71 | return idaws; |
| 79 | } | 72 | } |
| 80 | 73 | ||
