mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 18:13:41 +02:00
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:
parent
86f48f922b
commit
a3a64a4def
|
|
@ -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)
|
||||||
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)
|
||||||
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)
|
||||||
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)
|
||||||
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)
|
||||||
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)
|
||||||
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)
|
||||||
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)
|
||||||
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)
|
||||||
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)
|
||||||
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)
|
||||||
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;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user