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 <hca@linux.ibm.com> Reviewed-by: Vineeth Vijayan <vneethv@linux.ibm.com> Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
This commit is contained in:
committed by
Heiko Carstens
parent
86f48f922b
commit
a3a64a4def
@@ -1091,8 +1091,8 @@ int __init chsc_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
sei_page = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA);
|
||||
chsc_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);
|
||||
if (!sei_page || !chsc_page) {
|
||||
ret = -ENOMEM;
|
||||
goto out_err;
|
||||
|
||||
+10
-10
@@ -293,7 +293,7 @@ static int chsc_ioctl_start(void __user *user_area)
|
||||
if (!css_general_characteristics.dynio)
|
||||
/* It makes no sense to try. */
|
||||
return -EOPNOTSUPP;
|
||||
chsc_area = (void *)get_zeroed_page(GFP_DMA | GFP_KERNEL);
|
||||
chsc_area = (void *)get_zeroed_page(GFP_KERNEL);
|
||||
if (!chsc_area)
|
||||
return -ENOMEM;
|
||||
request = kzalloc(sizeof(*request), GFP_KERNEL);
|
||||
@@ -341,7 +341,7 @@ static int chsc_ioctl_on_close_set(void __user *user_area)
|
||||
ret = -ENOMEM;
|
||||
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) {
|
||||
ret = -ENOMEM;
|
||||
goto out_free_request;
|
||||
@@ -393,7 +393,7 @@ static int chsc_ioctl_start_sync(void __user *user_area)
|
||||
struct chsc_sync_area *chsc_area;
|
||||
int ret, ccode;
|
||||
|
||||
chsc_area = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA);
|
||||
chsc_area = (void *)get_zeroed_page(GFP_KERNEL);
|
||||
if (!chsc_area)
|
||||
return -ENOMEM;
|
||||
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)
|
||||
u8 data[PAGE_SIZE - 20];
|
||||
} __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)
|
||||
return -ENOMEM;
|
||||
cd = kzalloc(sizeof(*cd), GFP_KERNEL);
|
||||
@@ -501,7 +501,7 @@ static int chsc_ioctl_info_cu(void __user *user_cd)
|
||||
u8 data[PAGE_SIZE - 20];
|
||||
} __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)
|
||||
return -ENOMEM;
|
||||
cd = kzalloc(sizeof(*cd), GFP_KERNEL);
|
||||
@@ -564,7 +564,7 @@ static int chsc_ioctl_info_sch_cu(void __user *user_cud)
|
||||
u8 data[PAGE_SIZE - 20];
|
||||
} __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)
|
||||
return -ENOMEM;
|
||||
cud = kzalloc(sizeof(*cud), GFP_KERNEL);
|
||||
@@ -626,7 +626,7 @@ static int chsc_ioctl_conf_info(void __user *user_ci)
|
||||
u8 data[PAGE_SIZE - 20];
|
||||
} __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)
|
||||
return -ENOMEM;
|
||||
ci = kzalloc(sizeof(*ci), GFP_KERNEL);
|
||||
@@ -697,7 +697,7 @@ static int chsc_ioctl_conf_comp_list(void __user *user_ccl)
|
||||
u32 res;
|
||||
} __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)
|
||||
return -ENOMEM;
|
||||
ccl = kzalloc(sizeof(*ccl), GFP_KERNEL);
|
||||
@@ -757,7 +757,7 @@ static int chsc_ioctl_chpd(void __user *user_chpd)
|
||||
int ret;
|
||||
|
||||
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) {
|
||||
ret = -ENOMEM;
|
||||
goto out_free;
|
||||
@@ -797,7 +797,7 @@ static int chsc_ioctl_dcal(void __user *user_dcal)
|
||||
u8 data[PAGE_SIZE - 36];
|
||||
} __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)
|
||||
return -ENOMEM;
|
||||
dcal = kzalloc(sizeof(*dcal), GFP_KERNEL);
|
||||
|
||||
@@ -228,7 +228,7 @@ int scm_update_information(void)
|
||||
size_t num;
|
||||
int ret;
|
||||
|
||||
scm_info = (void *)__get_free_page(GFP_KERNEL | GFP_DMA);
|
||||
scm_info = (void *)__get_free_page(GFP_KERNEL);
|
||||
if (!scm_info)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user