Lines Matching refs:gentry

162 	struct mtrr_gentry gentry;  in mtrr_ioctl()  local
165 memset(&gentry, 0, sizeof(gentry)); in mtrr_ioctl()
181 if (copy_from_user(&gentry, arg, sizeof(gentry))) in mtrr_ioctl()
208 err = get_user(gentry.regnum, &g32->regnum); in mtrr_ioctl()
209 err |= get_user(gentry.base, &g32->base); in mtrr_ioctl()
210 err |= get_user(gentry.size, &g32->size); in mtrr_ioctl()
211 err |= get_user(gentry.type, &g32->type); in mtrr_ioctl()
252 if (gentry.regnum >= num_var_ranges) in mtrr_ioctl()
254 mtrr_if->get(gentry.regnum, &base, &size, &type); in mtrr_ioctl()
257 if (base + size - 1 >= (1UL << (8 * sizeof(gentry.size) - PAGE_SHIFT)) in mtrr_ioctl()
258 || size >= (1UL << (8 * sizeof(gentry.size) - PAGE_SHIFT))) in mtrr_ioctl()
259 gentry.base = gentry.size = gentry.type = 0; in mtrr_ioctl()
261 gentry.base = base << PAGE_SHIFT; in mtrr_ioctl()
262 gentry.size = size << PAGE_SHIFT; in mtrr_ioctl()
263 gentry.type = type; in mtrr_ioctl()
298 if (gentry.regnum >= num_var_ranges) in mtrr_ioctl()
300 mtrr_if->get(gentry.regnum, &base, &size, &type); in mtrr_ioctl()
302 if (size != (__typeof__(gentry.size))size) in mtrr_ioctl()
303 gentry.base = gentry.size = gentry.type = 0; in mtrr_ioctl()
305 gentry.base = base; in mtrr_ioctl()
306 gentry.size = size; in mtrr_ioctl()
307 gentry.type = type; in mtrr_ioctl()
318 if (copy_to_user(arg, &gentry, sizeof(gentry))) in mtrr_ioctl()
327 err = put_user(gentry.base, &g32->base); in mtrr_ioctl()
328 err |= put_user(gentry.size, &g32->size); in mtrr_ioctl()
329 err |= put_user(gentry.regnum, &g32->regnum); in mtrr_ioctl()
330 err |= put_user(gentry.type, &g32->type); in mtrr_ioctl()