[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e94b289c3dfb4ac0b05a7134f9ae8bb3@AcuMS.aculab.com>
Date: Wed, 2 Sep 2020 11:13:38 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Colin Ian King' <colin.king@...onical.com>,
"Rafael J. Wysocki" <rjw@...ysocki.net>
CC: Len Brown <lenb@...nel.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
Andrew Morton <akpm@...ux-foundation.org>,
"linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>
Subject: RE: [PATCH] ACPI: sysfs: copy ACPI data using io memory copying
From: Colin Ian King
> Sent: 02 September 2020 11:27
>
> On 14/03/2020 10:23, Rafael J. Wysocki wrote:
> > On Thursday, March 12, 2020 12:13:45 PM CET Colin King wrote:
> >> From: Colin Ian King <colin.king@...onical.com>
> >>
> >> Reading ACPI data on ARM64 at a non-aligned offset from
> >> /sys/firmware/acpi/tables/data/BERT will cause a splat because
> >> the data is I/O memory mapped and being read with just a memcpy.
> >> Fix this by introducing an I/O variant of memory_read_from_buffer
> >> and using I/O memory mapped copies instead.
..
> >> +/**
> >> + * memory_read_from_io_buffer - copy data from a io memory mapped buffer
> >> + * @to: the kernel space buffer to read to
> >> + * @count: the maximum number of bytes to read
> >> + * @ppos: the current position in the buffer
> >> + * @from: the buffer to read from
> >> + * @available: the size of the buffer
> >> + *
> >> + * The memory_read_from_buffer() function reads up to @count bytes from the
> >> + * io memory mappy buffer @from at offset @ppos into the kernel space address
> >> + * starting at @to.
> >> + *
> >> + * On success, the number of bytes read is returned and the offset @ppos is
> >> + * advanced by this number, or negative value is returned on error.
> >> + **/
Apart from the return value how is this different from the generic
memcpy_from_io() ?
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists