Commit a3a64a4d authored by Peter Oberparleiter's avatar Peter Oberparleiter Committed by Heiko Carstens

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: default avatarHeiko Carstens <hca@linux.ibm.com>
Reviewed-by: default avatarVineeth Vijayan <vneethv@linux.ibm.com>
Signed-off-by: default avatarPeter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
parent 86f48f92
...@@ -1091,8 +1091,8 @@ int __init chsc_init(void) ...@@ -1091,8 +1091,8 @@ int __init chsc_init(void)
{ {
int ret; int ret;
sei_page = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA); sei_page = (void *)get_zeroed_page(GFP_KERNEL);
chsc_page = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA); chsc_page = (void *)get_zeroed_page(GFP_KERNEL);
if (!sei_page || !chsc_page) { if (!sei_page || !chsc_page) {
ret = -ENOMEM; ret = -ENOMEM;
goto out_err; goto out_err;
......
...@@ -293,7 +293,7 @@ static int chsc_ioctl_start(void __user *user_area) ...@@ -293,7 +293,7 @@ static int chsc_ioctl_start(void __user *user_area)
if (!css_general_characteristics.dynio) if (!css_general_characteristics.dynio)
/* It makes no sense to try. */ /* It makes no sense to try. */
return -EOPNOTSUPP; return -EOPNOTSUPP;
chsc_area = (void *)get_zeroed_page(GFP_DMA | GFP_KERNEL); chsc_area = (void *)get_zeroed_page(GFP_KERNEL);
if (!chsc_area) if (!chsc_area)
return -ENOMEM; return -ENOMEM;
request = kzalloc(sizeof(*request), GFP_KERNEL); request = kzalloc(sizeof(*request), GFP_KERNEL);
...@@ -341,7 +341,7 @@ static int chsc_ioctl_on_close_set(void __user *user_area) ...@@ -341,7 +341,7 @@ static int chsc_ioctl_on_close_set(void __user *user_area)
ret = -ENOMEM; ret = -ENOMEM;
goto out_unlock; goto out_unlock;
} }
on_close_chsc_area = (void *)get_zeroed_page(GFP_DMA | GFP_KERNEL); on_close_chsc_area = (void *)get_zeroed_page(GFP_KERNEL);
if (!on_close_chsc_area) { if (!on_close_chsc_area) {
ret = -ENOMEM; ret = -ENOMEM;
goto out_free_request; goto out_free_request;
...@@ -393,7 +393,7 @@ static int chsc_ioctl_start_sync(void __user *user_area) ...@@ -393,7 +393,7 @@ static int chsc_ioctl_start_sync(void __user *user_area)
struct chsc_sync_area *chsc_area; struct chsc_sync_area *chsc_area;
int ret, ccode; int ret, ccode;
chsc_area = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA); chsc_area = (void *)get_zeroed_page(GFP_KERNEL);
if (!chsc_area) if (!chsc_area)
return -ENOMEM; return -ENOMEM;
if (copy_from_user(chsc_area, user_area, PAGE_SIZE)) { 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) ...@@ -439,7 +439,7 @@ static int chsc_ioctl_info_channel_path(void __user *user_cd)
u8 data[PAGE_SIZE - 20]; u8 data[PAGE_SIZE - 20];
} __attribute__ ((packed)) *scpcd_area; } __attribute__ ((packed)) *scpcd_area;
scpcd_area = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA); scpcd_area = (void *)get_zeroed_page(GFP_KERNEL);
if (!scpcd_area) if (!scpcd_area)
return -ENOMEM; return -ENOMEM;
cd = kzalloc(sizeof(*cd), GFP_KERNEL); cd = kzalloc(sizeof(*cd), GFP_KERNEL);
...@@ -501,7 +501,7 @@ static int chsc_ioctl_info_cu(void __user *user_cd) ...@@ -501,7 +501,7 @@ static int chsc_ioctl_info_cu(void __user *user_cd)
u8 data[PAGE_SIZE - 20]; u8 data[PAGE_SIZE - 20];
} __attribute__ ((packed)) *scucd_area; } __attribute__ ((packed)) *scucd_area;
scucd_area = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA); scucd_area = (void *)get_zeroed_page(GFP_KERNEL);
if (!scucd_area) if (!scucd_area)
return -ENOMEM; return -ENOMEM;
cd = kzalloc(sizeof(*cd), GFP_KERNEL); cd = kzalloc(sizeof(*cd), GFP_KERNEL);
...@@ -564,7 +564,7 @@ static int chsc_ioctl_info_sch_cu(void __user *user_cud) ...@@ -564,7 +564,7 @@ static int chsc_ioctl_info_sch_cu(void __user *user_cud)
u8 data[PAGE_SIZE - 20]; u8 data[PAGE_SIZE - 20];
} __attribute__ ((packed)) *sscud_area; } __attribute__ ((packed)) *sscud_area;
sscud_area = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA); sscud_area = (void *)get_zeroed_page(GFP_KERNEL);
if (!sscud_area) if (!sscud_area)
return -ENOMEM; return -ENOMEM;
cud = kzalloc(sizeof(*cud), GFP_KERNEL); cud = kzalloc(sizeof(*cud), GFP_KERNEL);
...@@ -626,7 +626,7 @@ static int chsc_ioctl_conf_info(void __user *user_ci) ...@@ -626,7 +626,7 @@ static int chsc_ioctl_conf_info(void __user *user_ci)
u8 data[PAGE_SIZE - 20]; u8 data[PAGE_SIZE - 20];
} __attribute__ ((packed)) *sci_area; } __attribute__ ((packed)) *sci_area;
sci_area = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA); sci_area = (void *)get_zeroed_page(GFP_KERNEL);
if (!sci_area) if (!sci_area)
return -ENOMEM; return -ENOMEM;
ci = kzalloc(sizeof(*ci), GFP_KERNEL); ci = kzalloc(sizeof(*ci), GFP_KERNEL);
...@@ -697,7 +697,7 @@ static int chsc_ioctl_conf_comp_list(void __user *user_ccl) ...@@ -697,7 +697,7 @@ static int chsc_ioctl_conf_comp_list(void __user *user_ccl)
u32 res; u32 res;
} __attribute__ ((packed)) *cssids_parm; } __attribute__ ((packed)) *cssids_parm;
sccl_area = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA); sccl_area = (void *)get_zeroed_page(GFP_KERNEL);
if (!sccl_area) if (!sccl_area)
return -ENOMEM; return -ENOMEM;
ccl = kzalloc(sizeof(*ccl), GFP_KERNEL); ccl = kzalloc(sizeof(*ccl), GFP_KERNEL);
...@@ -757,7 +757,7 @@ static int chsc_ioctl_chpd(void __user *user_chpd) ...@@ -757,7 +757,7 @@ static int chsc_ioctl_chpd(void __user *user_chpd)
int ret; int ret;
chpd = kzalloc(sizeof(*chpd), GFP_KERNEL); chpd = kzalloc(sizeof(*chpd), GFP_KERNEL);
scpd_area = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA); scpd_area = (void *)get_zeroed_page(GFP_KERNEL);
if (!scpd_area || !chpd) { if (!scpd_area || !chpd) {
ret = -ENOMEM; ret = -ENOMEM;
goto out_free; goto out_free;
...@@ -797,7 +797,7 @@ static int chsc_ioctl_dcal(void __user *user_dcal) ...@@ -797,7 +797,7 @@ static int chsc_ioctl_dcal(void __user *user_dcal)
u8 data[PAGE_SIZE - 36]; u8 data[PAGE_SIZE - 36];
} __attribute__ ((packed)) *sdcal_area; } __attribute__ ((packed)) *sdcal_area;
sdcal_area = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA); sdcal_area = (void *)get_zeroed_page(GFP_KERNEL);
if (!sdcal_area) if (!sdcal_area)
return -ENOMEM; return -ENOMEM;
dcal = kzalloc(sizeof(*dcal), GFP_KERNEL); dcal = kzalloc(sizeof(*dcal), GFP_KERNEL);
......
...@@ -228,7 +228,7 @@ int scm_update_information(void) ...@@ -228,7 +228,7 @@ int scm_update_information(void)
size_t num; size_t num;
int ret; int ret;
scm_info = (void *)__get_free_page(GFP_KERNEL | GFP_DMA); scm_info = (void *)__get_free_page(GFP_KERNEL);
if (!scm_info) if (!scm_info)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment