Skip to content

Commit 72646f8

Browse files
committed
s390/cio: remove unneeded DMA zone allocation
JIRA: https://issues.redhat.com/browse/RHEL-86670 commit a3a64a4 Author: Peter Oberparleiter <[email protected]> Date: Thu Jan 18 16:09:39 2024 +0100 s390/cio: remove unneeded DMA zone allocation Remove GFP_DMA flag when allocating memory to be used for CHSC control blocks. The CHSC instruction can access memory beyond the DMA zone. Suggested-by: Heiko Carstens <[email protected]> Reviewed-by: Vineeth Vijayan <[email protected]> Signed-off-by: Peter Oberparleiter <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Thomas Huth <[email protected]>
1 parent f28234d commit 72646f8

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

drivers/s390/cio/chsc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,8 +1128,8 @@ int __init chsc_init(void)
11281128
{
11291129
int ret;
11301130

1131-
sei_page = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA);
1132-
chsc_page = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA);
1131+
sei_page = (void *)get_zeroed_page(GFP_KERNEL);
1132+
chsc_page = (void *)get_zeroed_page(GFP_KERNEL);
11331133
if (!sei_page || !chsc_page) {
11341134
ret = -ENOMEM;
11351135
goto out_err;

drivers/s390/cio/chsc_sch.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ static int chsc_ioctl_start(void __user *user_area)
293293
if (!css_general_characteristics.dynio)
294294
/* It makes no sense to try. */
295295
return -EOPNOTSUPP;
296-
chsc_area = (void *)get_zeroed_page(GFP_DMA | GFP_KERNEL);
296+
chsc_area = (void *)get_zeroed_page(GFP_KERNEL);
297297
if (!chsc_area)
298298
return -ENOMEM;
299299
request = kzalloc(sizeof(*request), GFP_KERNEL);
@@ -341,7 +341,7 @@ static int chsc_ioctl_on_close_set(void __user *user_area)
341341
ret = -ENOMEM;
342342
goto out_unlock;
343343
}
344-
on_close_chsc_area = (void *)get_zeroed_page(GFP_DMA | GFP_KERNEL);
344+
on_close_chsc_area = (void *)get_zeroed_page(GFP_KERNEL);
345345
if (!on_close_chsc_area) {
346346
ret = -ENOMEM;
347347
goto out_free_request;
@@ -393,7 +393,7 @@ static int chsc_ioctl_start_sync(void __user *user_area)
393393
struct chsc_sync_area *chsc_area;
394394
int ret, ccode;
395395

396-
chsc_area = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA);
396+
chsc_area = (void *)get_zeroed_page(GFP_KERNEL);
397397
if (!chsc_area)
398398
return -ENOMEM;
399399
if (copy_from_user(chsc_area, user_area, PAGE_SIZE)) {
@@ -439,7 +439,7 @@ static int chsc_ioctl_info_channel_path(void __user *user_cd)
439439
u8 data[PAGE_SIZE - 20];
440440
} __attribute__ ((packed)) *scpcd_area;
441441

442-
scpcd_area = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA);
442+
scpcd_area = (void *)get_zeroed_page(GFP_KERNEL);
443443
if (!scpcd_area)
444444
return -ENOMEM;
445445
cd = kzalloc(sizeof(*cd), GFP_KERNEL);
@@ -501,7 +501,7 @@ static int chsc_ioctl_info_cu(void __user *user_cd)
501501
u8 data[PAGE_SIZE - 20];
502502
} __attribute__ ((packed)) *scucd_area;
503503

504-
scucd_area = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA);
504+
scucd_area = (void *)get_zeroed_page(GFP_KERNEL);
505505
if (!scucd_area)
506506
return -ENOMEM;
507507
cd = kzalloc(sizeof(*cd), GFP_KERNEL);
@@ -564,7 +564,7 @@ static int chsc_ioctl_info_sch_cu(void __user *user_cud)
564564
u8 data[PAGE_SIZE - 20];
565565
} __attribute__ ((packed)) *sscud_area;
566566

567-
sscud_area = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA);
567+
sscud_area = (void *)get_zeroed_page(GFP_KERNEL);
568568
if (!sscud_area)
569569
return -ENOMEM;
570570
cud = kzalloc(sizeof(*cud), GFP_KERNEL);
@@ -626,7 +626,7 @@ static int chsc_ioctl_conf_info(void __user *user_ci)
626626
u8 data[PAGE_SIZE - 20];
627627
} __attribute__ ((packed)) *sci_area;
628628

629-
sci_area = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA);
629+
sci_area = (void *)get_zeroed_page(GFP_KERNEL);
630630
if (!sci_area)
631631
return -ENOMEM;
632632
ci = kzalloc(sizeof(*ci), GFP_KERNEL);
@@ -697,7 +697,7 @@ static int chsc_ioctl_conf_comp_list(void __user *user_ccl)
697697
u32 res;
698698
} __attribute__ ((packed)) *cssids_parm;
699699

700-
sccl_area = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA);
700+
sccl_area = (void *)get_zeroed_page(GFP_KERNEL);
701701
if (!sccl_area)
702702
return -ENOMEM;
703703
ccl = kzalloc(sizeof(*ccl), GFP_KERNEL);
@@ -757,7 +757,7 @@ static int chsc_ioctl_chpd(void __user *user_chpd)
757757
int ret;
758758

759759
chpd = kzalloc(sizeof(*chpd), GFP_KERNEL);
760-
scpd_area = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA);
760+
scpd_area = (void *)get_zeroed_page(GFP_KERNEL);
761761
if (!scpd_area || !chpd) {
762762
ret = -ENOMEM;
763763
goto out_free;
@@ -797,7 +797,7 @@ static int chsc_ioctl_dcal(void __user *user_dcal)
797797
u8 data[PAGE_SIZE - 36];
798798
} __attribute__ ((packed)) *sdcal_area;
799799

800-
sdcal_area = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA);
800+
sdcal_area = (void *)get_zeroed_page(GFP_KERNEL);
801801
if (!sdcal_area)
802802
return -ENOMEM;
803803
dcal = kzalloc(sizeof(*dcal), GFP_KERNEL);

drivers/s390/cio/scm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ int scm_update_information(void)
228228
size_t num;
229229
int ret;
230230

231-
scm_info = (void *)__get_free_page(GFP_KERNEL | GFP_DMA);
231+
scm_info = (void *)__get_free_page(GFP_KERNEL);
232232
if (!scm_info)
233233
return -ENOMEM;
234234

0 commit comments

Comments
 (0)