Displaying 20 results from an estimated 169 matches for "ppos".
Did you mean:
pos
2010 Apr 15
1
[PATCH] ocfs2: avoid direct write if we fall back to buffered v2
...ct_io) {
- ret = generic_segment_checks(iov, &nr_segs, &ocount,
- VERIFY_READ);
- if (ret)
- goto out_dio;
+ ret = generic_segment_checks(iov, &nr_segs, &ocount,
+ VERIFY_READ);
+ if (ret)
+ goto out_dio;
- count = ocount;
- ret = generic_write_checks(file, ppos, &count,
- S_ISBLK(inode->i_mode));
- if (ret)
- goto out_dio;
+ count = ocount;
+ ret = generic_write_checks(file, ppos, &count,
+ S_ISBLK(inode->i_mode));
+ if (ret)
+ goto out_dio;
+ if (direct_io) {
written = generic_file_direct_write(iocb, iov, &nr_segs,...
2020 Oct 16
2
[PATCH v4 10/10] drm/fb_helper: Support framebuffers in I/O memory
...t; &clip_copy, 1);
> @@ -755,6 +754,136 @@ void drm_fb_helper_sys_imageblit(struct fb_info *info,
> }
> EXPORT_SYMBOL(drm_fb_helper_sys_imageblit);
>
> +static ssize_t drm_fb_helper_cfb_read(struct fb_info *info, char __user *buf,
> + size_t count, loff_t *ppos)
> +{
> + unsigned long p = *ppos;
> + u8 *dst;
> + u8 __iomem *src;
> + int c, err = 0;
> + unsigned long total_size;
> + unsigned long alloc_size;
> + ssize_t ret = 0;
> +
> + if (info->state != FBINFO_STATE_RUNNING)
> + return -EPERM;
> +
> + total_size...
2020 Oct 16
1
[PATCH v4 10/10] drm/fb_helper: Support framebuffers in I/O memory
...> @@ -755,6 +754,136 @@ void drm_fb_helper_sys_imageblit(struct fb_info *info,
> }
> EXPORT_SYMBOL(drm_fb_helper_sys_imageblit);
>
So far everything looks good.
> +static ssize_t drm_fb_helper_cfb_read(struct fb_info *info, char __user *buf,
> + size_t count, loff_t *ppos)
> +{
> + unsigned long p = *ppos;
> + u8 *dst;
> + u8 __iomem *src;
> + int c, err = 0;
> + unsigned long total_size;
> + unsigned long alloc_size;
> + ssize_t ret = 0;
> +
> + if (info->state != FBINFO_STATE_RUNNING)
> + return -EPERM;
> +
> + total_size...
2013 Jul 25
0
[PATCH V8 21/33] ocfs2: add support for read_iter and write_iter
...cb *iocb,
+ struct iov_iter *iter,
+ loff_t pos)
{
int ret, direct_io, appending, rw_level, have_alloc_sem = 0;
int can_do_direct, has_refcount = 0;
ssize_t written = 0;
- size_t ocount; /* original count */
size_t count; /* after file limit checks */
loff_t old_size, *ppos = &iocb->ki_pos;
u32 old_clusters;
@@ -2239,11 +2237,11 @@ static ssize_t ocfs2_file_aio_write(struct kiocb *iocb,
OCFS2_MOUNT_COHERENCY_BUFFERED);
int unaligned_dio = 0;
- trace_ocfs2_file_aio_write(inode, file, file->f_path.dentry,
+ trace_ocfs2_file_write_iter(inode, f...
2013 Jan 09
0
[PATCH V5 19/30] ocfs2: add support for read_iter, write_iter, and direct_IO_bvec
...cb *iocb,
+ struct iov_iter *iter,
+ loff_t pos)
{
int ret, direct_io, appending, rw_level, have_alloc_sem = 0;
int can_do_direct, has_refcount = 0;
ssize_t written = 0;
- size_t ocount; /* original count */
size_t count; /* after file limit checks */
loff_t old_size, *ppos = &iocb->ki_pos;
u32 old_clusters;
@@ -2238,11 +2236,11 @@ static ssize_t ocfs2_file_aio_write(struct kiocb *iocb,
OCFS2_MOUNT_COHERENCY_BUFFERED);
int unaligned_dio = 0;
- trace_ocfs2_file_aio_write(inode, file, file->f_path.dentry,
+ trace_ocfs2_file_write_iter(inode, f...
2020 Oct 02
2
[PATCH v3 6/7] drm/fb_helper: Support framebuffers in I/O memory
...t; &clip_copy, 1);
> @@ -771,6 +770,136 @@ void drm_fb_helper_sys_imageblit(struct fb_info *info,
> }
> EXPORT_SYMBOL(drm_fb_helper_sys_imageblit);
>
> +static ssize_t drm_fb_helper_cfb_read(struct fb_info *info, char __user *buf,
> + size_t count, loff_t *ppos)
> +{
> + unsigned long p = *ppos;
> + u8 *dst;
> + u8 __iomem *src;
> + int c, err = 0;
> + unsigned long total_size;
> + unsigned long alloc_size;
> + ssize_t ret = 0;
> +
> + if (info->state != FBINFO_STATE_RUNNING)
> + return -EPERM;
> +
> + total_size...
2020 Oct 15
0
[PATCH v4 10/10] drm/fb_helper: Support framebuffers in I/O memory
...dirty(helper->fb, NULL, 0, 0,
&clip_copy, 1);
@@ -755,6 +754,136 @@ void drm_fb_helper_sys_imageblit(struct fb_info *info,
}
EXPORT_SYMBOL(drm_fb_helper_sys_imageblit);
+static ssize_t drm_fb_helper_cfb_read(struct fb_info *info, char __user *buf,
+ size_t count, loff_t *ppos)
+{
+ unsigned long p = *ppos;
+ u8 *dst;
+ u8 __iomem *src;
+ int c, err = 0;
+ unsigned long total_size;
+ unsigned long alloc_size;
+ ssize_t ret = 0;
+
+ if (info->state != FBINFO_STATE_RUNNING)
+ return -EPERM;
+
+ total_size = info->screen_size;
+
+ if (total_size == 0)
+ total_size =...
2020 Oct 16
0
[PATCH v4 10/10] drm/fb_helper: Support framebuffers in I/O memory
...; @@ -755,6 +754,136 @@ void drm_fb_helper_sys_imageblit(struct fb_info
> > *info, }
> > EXPORT_SYMBOL(drm_fb_helper_sys_imageblit);
> >
> > +static ssize_t drm_fb_helper_cfb_read(struct fb_info *info, char __user
> > *buf,
> > + size_t count, loff_t *ppos)
> > +{
> > + unsigned long p = *ppos;
> > + u8 *dst;
> > + u8 __iomem *src;
> > + int c, err = 0;
> > + unsigned long total_size;
> > + unsigned long alloc_size;
> > + ssize_t ret = 0;
> > +
> > + if (info->state != FBINFO_STATE_RUNNIN...
2018 Apr 10
0
[RFC] vhost: introduce mdev based hardware vhost backend
...=================================
>
> The read()/write()/ioctl()/mmap()/open()/release() mdev
> parent ops have been provided for accelerators' drivers
> to provide mdev instances.
>
> ssize_t vdpa_read(struct mdev_device *mdev, char __user *buf,
> size_t count, loff_t *ppos);
> ssize_t vdpa_write(struct mdev_device *mdev, const char __user *buf,
> size_t count, loff_t *ppos);
> long vdpa_ioctl(struct mdev_device *mdev, unsigned int cmd, unsigned long arg);
> int vdpa_mmap(struct mdev_device *mdev, struct vm_area_struct *vma);
> int vdpa_open(struct...
2020 Oct 08
1
[PATCH v3 6/7] drm/fb_helper: Support framebuffers in I/O memory
...drm_fb_helper_sys_imageblit(struct fb_info *info,
>>> }
>>> EXPORT_SYMBOL(drm_fb_helper_sys_imageblit);
>>>
>>> +static ssize_t drm_fb_helper_cfb_read(struct fb_info *info, char __user *buf,
>>> + size_t count, loff_t *ppos)
>>> +{
>>> + unsigned long p = *ppos;
>>> + u8 *dst;
>>> + u8 __iomem *src;
>>> + int c, err = 0;
>>> + unsigned long total_size;
>>> + unsigned long alloc_size;
>>> + ssize_t ret = 0;
>>>...
2018 Apr 02
2
[RFC] vhost: introduce mdev based hardware vhost backend
...ovide mdev instances
=============================================
The read()/write()/ioctl()/mmap()/open()/release() mdev
parent ops have been provided for accelerators' drivers
to provide mdev instances.
ssize_t vdpa_read(struct mdev_device *mdev, char __user *buf,
size_t count, loff_t *ppos);
ssize_t vdpa_write(struct mdev_device *mdev, const char __user *buf,
size_t count, loff_t *ppos);
long vdpa_ioctl(struct mdev_device *mdev, unsigned int cmd, unsigned long arg);
int vdpa_mmap(struct mdev_device *mdev, struct vm_area_struct *vma);
int vdpa_open(struct mdev_device *mdev);
void...
2018 Apr 02
2
[RFC] vhost: introduce mdev based hardware vhost backend
...ovide mdev instances
=============================================
The read()/write()/ioctl()/mmap()/open()/release() mdev
parent ops have been provided for accelerators' drivers
to provide mdev instances.
ssize_t vdpa_read(struct mdev_device *mdev, char __user *buf,
size_t count, loff_t *ppos);
ssize_t vdpa_write(struct mdev_device *mdev, const char __user *buf,
size_t count, loff_t *ppos);
long vdpa_ioctl(struct mdev_device *mdev, unsigned int cmd, unsigned long arg);
int vdpa_mmap(struct mdev_device *mdev, struct vm_area_struct *vma);
int vdpa_open(struct mdev_device *mdev);
void...
2020 Oct 16
0
[PATCH v4 10/10] drm/fb_helper: Support framebuffers in I/O memory
...r_sys_imageblit(struct fb_info
> > *info, }
> > EXPORT_SYMBOL(drm_fb_helper_sys_imageblit);
> >
> So far everything looks good.
>
> > +static ssize_t drm_fb_helper_cfb_read(struct fb_info *info, char __user
> > *buf,
> > + size_t count, loff_t *ppos)
> > +{
> > + unsigned long p = *ppos;
> > + u8 *dst;
> > + u8 __iomem *src;
> > + int c, err = 0;
> > + unsigned long total_size;
> > + unsigned long alloc_size;
> > + ssize_t ret = 0;
> > +
> > + if (info->state != FBINFO_STATE_RUNNIN...
2020 Sep 29
0
[PATCH v3 6/7] drm/fb_helper: Support framebuffers in I/O memory
...dirty(helper->fb, NULL, 0, 0,
&clip_copy, 1);
@@ -771,6 +770,136 @@ void drm_fb_helper_sys_imageblit(struct fb_info *info,
}
EXPORT_SYMBOL(drm_fb_helper_sys_imageblit);
+static ssize_t drm_fb_helper_cfb_read(struct fb_info *info, char __user *buf,
+ size_t count, loff_t *ppos)
+{
+ unsigned long p = *ppos;
+ u8 *dst;
+ u8 __iomem *src;
+ int c, err = 0;
+ unsigned long total_size;
+ unsigned long alloc_size;
+ ssize_t ret = 0;
+
+ if (info->state != FBINFO_STATE_RUNNING)
+ return -EPERM;
+
+ total_size = info->screen_size;
+
+ if (total_size == 0)
+ total_size =...
2020 Oct 02
0
[PATCH v3 6/7] drm/fb_helper: Support framebuffers in I/O memory
...70,136 @@ void drm_fb_helper_sys_imageblit(struct fb_info *info,
> > }
> > EXPORT_SYMBOL(drm_fb_helper_sys_imageblit);
> >
> > +static ssize_t drm_fb_helper_cfb_read(struct fb_info *info, char __user *buf,
> > + size_t count, loff_t *ppos)
> > +{
> > + unsigned long p = *ppos;
> > + u8 *dst;
> > + u8 __iomem *src;
> > + int c, err = 0;
> > + unsigned long total_size;
> > + unsigned long alloc_size;
> > + ssize_t ret = 0;
> > +
> > + if (info-...
2019 Sep 24
3
[PATCH V2 5/8] mdev: introduce device specific ops
...ctl))
> + if (unlikely(!ops->ioctl))
> return -EINVAL;
>
> - return parent->ops->ioctl(mdev, cmd, arg);
> + return ops->ioctl(mdev, cmd, arg);
> }
>
> static ssize_t vfio_mdev_read(void *device_data, char __user *buf,
> size_t count, loff_t *ppos)
> {
> struct mdev_device *mdev = device_data;
> - struct mdev_parent *parent = mdev->parent;
> + const struct vfio_mdev_device_ops *ops = mdev_get_dev_ops(mdev);
>
> - if (unlikely(!parent->ops->read))
> + if (unlikely(!ops->read))
> return -EINVAL;
>...
2019 Sep 24
3
[PATCH V2 5/8] mdev: introduce device specific ops
...ctl))
> + if (unlikely(!ops->ioctl))
> return -EINVAL;
>
> - return parent->ops->ioctl(mdev, cmd, arg);
> + return ops->ioctl(mdev, cmd, arg);
> }
>
> static ssize_t vfio_mdev_read(void *device_data, char __user *buf,
> size_t count, loff_t *ppos)
> {
> struct mdev_device *mdev = device_data;
> - struct mdev_parent *parent = mdev->parent;
> + const struct vfio_mdev_device_ops *ops = mdev_get_dev_ops(mdev);
>
> - if (unlikely(!parent->ops->read))
> + if (unlikely(!ops->read))
> return -EINVAL;
>...
2019 Sep 23
0
[PATCH 2/6] mdev: introduce device specific ops
...ev_device *mdev = device_data;
struct mdev_parent *parent = mdev->parent;
+ const struct vfio_mdev_parent_ops *ops = parent->ops->device_ops;
- if (unlikely(!parent->ops->read))
+ if (unlikely(!ops->read))
return -EINVAL;
- return parent->ops->read(mdev, buf, count, ppos);
+ return ops->read(mdev, buf, count, ppos);
}
static ssize_t vfio_mdev_write(void *device_data, const char __user *buf,
@@ -80,22 +85,24 @@ static ssize_t vfio_mdev_write(void *device_data, const char __user *buf,
{
struct mdev_device *mdev = device_data;
struct mdev_parent *parent =...
2019 Sep 24
0
[PATCH V2 5/8] mdev: introduce device specific ops
...dev);
- if (unlikely(!parent->ops->ioctl))
+ if (unlikely(!ops->ioctl))
return -EINVAL;
- return parent->ops->ioctl(mdev, cmd, arg);
+ return ops->ioctl(mdev, cmd, arg);
}
static ssize_t vfio_mdev_read(void *device_data, char __user *buf,
size_t count, loff_t *ppos)
{
struct mdev_device *mdev = device_data;
- struct mdev_parent *parent = mdev->parent;
+ const struct vfio_mdev_device_ops *ops = mdev_get_dev_ops(mdev);
- if (unlikely(!parent->ops->read))
+ if (unlikely(!ops->read))
return -EINVAL;
- return parent->ops->read(mdev, buf...
2019 Jul 03
0
[RFC v2] vhost: introduce mdev based hardware vhost backend
...+ vdpa->ops->stop(vdpa);
> + mdev_set_drvdata(mdev, NULL);
> + mutex_destroy(&vdpa->ops_lock);
> + kfree(vdpa);
> +}
> +EXPORT_SYMBOL(vdpa_free);
> +
> +static ssize_t vdpa_handle_config_read(struct mdev_device *mdev,
> + char __user *buf, size_t count, loff_t *ppos)
> +{
> + struct vdpa_dev *vdpa;
> + struct vhost_vfio_op *op = NULL;
> + loff_t pos = *ppos;
> + loff_t offset;
> + int ret;
> +
> + vdpa = mdev_get_drvdata(mdev);
> + if (!vdpa) {
> + ret = -ENODEV;
> + goto out;
> + }
> +
> + offset = VDPA_VFIO_VHOST_R...