Direct io failed with ion

2018-10-10 Thread Rock Lee
Hi I tested direct io with a ion allocated buffer, got a -EFAULT error. It turned out that ion_mmap() set VM_IO & VM_PFNMAP, but check_vma_flags() (do_direct_IO() calls it) doesn't allow that VMA has these flags set. Could you give me any hit that could solve this issue? -- Cheers, Rock _

Re: [PATCH v5 1/2] memory_hotplug: Free pages as higher order

2018-10-10 Thread Arun KS
On 2018-10-10 23:03, Michal Hocko wrote: On Wed 10-10-18 22:26:41, Arun KS wrote: On 2018-10-10 21:00, Vlastimil Babka wrote: > On 10/5/18 10:10 AM, Arun KS wrote: > > When free pages are done with higher order, time spend on > > coalescing pages by buddy allocator can be reduced. With > > secti

Re: [PATCH 1/3] staging: greybus: loopback.c: remove unused gb_loopback::lbid

2018-10-10 Thread Bryan O'Donoghue
On 05/10/2018 15:28, Rasmus Villemoes wrote: Since lbid isn't mentioned anywhere else in greybus/, it's hard to figure out how it was meant to be used. It does seem like entirely dead (write-only) code. yep, dead code Reviewed-by: Bryan O'Donoghue

Re: [PATCH 2/3] staging: greybus: loopback.c: do insertion in O(n) instead of O(n lg n)

2018-10-10 Thread Bryan O'Donoghue
On 05/10/2018 15:28, Rasmus Villemoes wrote: Signed-off-by: Rasmus Villemoes --- I have no idea if the performance matters (it probably doesn't). Feel free to ignore this and the followup cleanup. What's the problem you're fixing here ? Is it tested ? __

[PATCH v3] staging: gasket: Fix sparse "incorrect type in assignment" warnings.

2018-10-10 Thread Laurence Rochfort
Remove the coherent buffer __iomem cookie because the buffer is allocated from dma_alloc_coherent(). warning: incorrect type in assignment (different address spaces) expected unsigned char [noderef] [usertype] *virt_base got void *[assigned] mem warning: incorrect type in argument 3 (differe

[PATCH] staging: vboxvideo: make a couple of funcs static

2018-10-10 Thread Craig Kewley
Fix Sparse warnings: drivers/staging/vboxvideo/vbox_mode.c:309:6: warning: symbol 'vbox_primary_atomic_disable' was not declared. Should it be static? drivers/staging/vboxvideo/vbox_mode.c:452:6: warning: symbol 'vbox_cursor_atomic_disable' was not declared. Should it be static? Signed-off-by: Cr

Re: [PATCH 0/15] Add support for OLPC XO 1.75 Embedded Controller

2018-10-10 Thread Rob Herring
On Wed, Oct 10, 2018 at 12:23 PM Lubomir Rintel wrote: > > Hi. > > This patchset adds support for the Embedded Controller on an OLPC XO > 1.75 machine. OLPC XO 1.75 is a MMP2 based ARM laptop. It plugs into > the existing OLPC platform infrastructure, currently used by the x86 > based models. > >

Re: [PATCH v5 1/2] memory_hotplug: Free pages as higher order

2018-10-10 Thread Michal Hocko
On Wed 10-10-18 22:26:41, Arun KS wrote: > On 2018-10-10 21:00, Vlastimil Babka wrote: > > On 10/5/18 10:10 AM, Arun KS wrote: > > > When free pages are done with higher order, time spend on > > > coalescing pages by buddy allocator can be reduced. With > > > section size of 256MB, hot add latency

[PATCH 15/15] power: supply: olpc_battery: Add OLPC XO 1.75 support

2018-10-10 Thread Lubomir Rintel
The battery and the protocol are essentially the same as OLPC XO 1.5, but the responses from the EC are LSB first. Signed-off-by: Lubomir Rintel --- drivers/power/supply/olpc_battery.c | 23 ++- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/drivers/power/supp

[PATCH 08/15] Platform: OLPC: Move EC-specific functionality out from x86

2018-10-10 Thread Lubomir Rintel
It is actually plaform independent. Move it to the olpc-ec driver from the X86 OLPC platform, so that it could be used by the ARM based laptops too. Signed-off-by: Lubomir Rintel --- arch/x86/include/asm/olpc.h | 17 - arch/x86/platform/olpc/olpc.c | 119 +-

[PATCH 06/15] Platform: OLPC: Add XO-1.75 EC driver

2018-10-10 Thread Lubomir Rintel
It's based off the driver from the OLPC kernel sources. Somewhat modernized and cleaned up, for better or worse. Modified to plug into the olpc-ec driver infrastructure (so that battery interface and debugfs could be reused) and the SPI slave framework. Signed-off-by: Lubomir Rintel --- drivers

[PATCH 11/15] x86, olpc: Use a correct version when making up a battery node

2018-10-10 Thread Lubomir Rintel
The XO-1 and XO-1.5 batteries apparently differ in an ability to report ambient temperature. Add a different compatible string to the 1.5 battery. Signed-off-by: Lubomir Rintel --- arch/x86/platform/olpc/olpc_dt.c | 59 +++- 1 file changed, 42 insertions(+), 17 deleti

[PATCH 13/15] power: supply: olpc_battery: Move priv data to a struct

2018-10-10 Thread Lubomir Rintel
The global variables for private data are not too nice. I'd like some more, and that would clutter the global name space even further. Signed-off-by: Lubomir Rintel --- drivers/power/supply/olpc_battery.c | 73 +++-- 1 file changed, 38 insertions(+), 35 deletions(-) diff

[PATCH 14/15] power: supply: olpc_battery: Avoid using platform_info

2018-10-10 Thread Lubomir Rintel
This wouldn't work on the DT-based ARM platform. Let's read the EC version directly from the EC driver instead. This makes the driver no longer x86 specific. Signed-off-by: Lubomir Rintel --- drivers/power/supply/Kconfig| 2 +- drivers/power/supply/olpc_battery.c | 35 +

[PATCH 07/15] Platform: OLPC: Avoid a warning if the EC didn't register yet

2018-10-10 Thread Lubomir Rintel
Just return ENODEV, so that whoever attempted to use the EC call can defer their work. Signed-off-by: Lubomir Rintel --- drivers/platform/olpc/olpc-ec.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/platform/olpc/olpc-ec.c b/drivers/platform/olpc/olpc-ec.c in

[PATCH 09/15] Platform: OLPC: add a regulator for the DCON

2018-10-10 Thread Lubomir Rintel
All OLPC ECs are able to turn the power to the DCON on an off. Use the regulator framework to expose the functionality. Signed-off-by: Lubomir Rintel --- drivers/platform/olpc/Kconfig | 1 + drivers/platform/olpc/olpc-ec.c | 65 + 2 files changed, 66 insertions

[PATCH 12/15] power: supply: olpc_battery: Use DT to get battery version

2018-10-10 Thread Lubomir Rintel
Avoid using the x86 OLPC platform specific call to get the board version. It won't work on FDT-based ARM MMP2 platform. Signed-off-by: Lubomir Rintel --- drivers/power/supply/olpc_battery.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/power/supply/olpc_b

[PATCH 01/15] power: supply: olpc_battery: correct the temperature units

2018-10-10 Thread Lubomir Rintel
According to [1] and [2], the temperature values are in tenths of degree Celsius. Exposing the Celsius value makes the battery appear on fire: $ upower -i /org/freedesktop/UPower/devices/battery_olpc_battery ... temperature: 236.9 degrees C Tested on OLPC XO-1 and OLPC XO-1.75 l

[PATCH 05/15] Platform: OLPC: Move OLPC config symbol out of x86 tree

2018-10-10 Thread Lubomir Rintel
There are ARM OLPC machines that use mostly the same drivers, including EC infrastructure, DCON and Battery. While at that, fix Kconfig to allow building this as a module. Signed-off-by: Lubomir Rintel --- arch/x86/Kconfig | 11 --- drivers/input/mouse/Kconfig |

[PATCH 03/15] dt-bindings: olpc, xo1.75-ec: Add OLPC XO-1.75 EC bindings

2018-10-10 Thread Lubomir Rintel
The OLPC XO-1.75 Embedded Controller is a SPI master that uses extra signals for handshaking. It needs to know when is the slave (Linux) side's TX FIFO ready for transfer (the ready-gpio signal on the SPI controller node) and when does it wish to respond with a command (the cmd-gpio property). Sig

[PATCH 04/15] Platform: OLPC: Remove an unused include

2018-10-10 Thread Lubomir Rintel
Also, the header is x86 specific, while there are non-x86 OLPC machines. Signed-off-by: Lubomir Rintel --- drivers/platform/olpc/olpc-ec.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/platform/olpc/olpc-ec.c b/drivers/platform/olpc/olpc-ec.c index f99b183d5296..35a21c66cd0d 100644

[PATCH 10/15] dt-bindings: olpc_battery: Add XO-1.5 battery

2018-10-10 Thread Lubomir Rintel
The XO-1 and XO-1.5 batteries apparently differ in an ability to report ambient temperature. Signed-off-by: Lubomir Rintel --- Documentation/devicetree/bindings/power/supply/olpc_battery.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/pow

[PATCH 02/15] Revert "platform/olpc: Make ec explicitly non-modular"

2018-10-10 Thread Lubomir Rintel
It doesn't make sense to always have this built-in, e.g. on ARM multiplatform kernels. A better way to address the problem the original commit aimed to solve is to fix Kconfig. This reverts commit f48d1496b8537d75776478c6942dd87f34d7f270. Signed-off-by: Lubomir Rintel --- drivers/platform/olpc/

[PATCH 0/15] Add support for OLPC XO 1.75 Embedded Controller

2018-10-10 Thread Lubomir Rintel
Hi. This patchset adds support for the Embedded Controller on an OLPC XO 1.75 machine. OLPC XO 1.75 is a MMP2 based ARM laptop. It plugs into the existing OLPC platform infrastructure, currently used by the x86 based models. The EC operates in SPI master mode, meaning the SOC is the SPI slave. It

Re: [PATCH v5 1/2] memory_hotplug: Free pages as higher order

2018-10-10 Thread Arun KS
On 2018-10-10 21:00, Vlastimil Babka wrote: On 10/5/18 10:10 AM, Arun KS wrote: When free pages are done with higher order, time spend on coalescing pages by buddy allocator can be reduced. With section size of 256MB, hot add latency of a single section shows improvement from 50-60 ms to less th

Re: [PATCH v5 2/2] mm/page_alloc: remove software prefetching in __free_pages_core

2018-10-10 Thread Vlastimil Babka
On 10/5/18 10:10 AM, Arun KS wrote: > They not only increase the code footprint, they actually make things > slower rather than faster. Remove them as contemporary hardware doesn't > need any hint. > > Suggested-by: Dan Williams > Signed-off-by: Arun KS Yeah, a tight loop with fixed stride is a

Re: [PATCH v5 1/2] memory_hotplug: Free pages as higher order

2018-10-10 Thread Vlastimil Babka
On 10/5/18 10:10 AM, Arun KS wrote: > When free pages are done with higher order, time spend on > coalescing pages by buddy allocator can be reduced. With > section size of 256MB, hot add latency of a single section > shows improvement from 50-60 ms to less than 1 ms, hence > improving the hot add

Re: [PATCH] staging: gasket: Fix sparse "incorrect type in assignment" warnings.

2018-10-10 Thread Greg Kroah-Hartman
On Wed, Oct 10, 2018 at 03:03:05PM +0100, Laurence Rochfort wrote: > On Tue, Oct 09, 2018 at 03:13:03PM +0200, Greg Kroah-Hartman wrote: > > On Thu, Oct 04, 2018 at 06:52:25PM +0100, Laurence Rochfort wrote: > > > Silence the below sparse warnings by casting betwen u8 __iomem *, and > > > void *. >

Re: [PATCH] staging: gasket: Fix sparse "incorrect type in assignment" warnings.

2018-10-10 Thread Laurence Rochfort
On Tue, Oct 09, 2018 at 03:13:03PM +0200, Greg Kroah-Hartman wrote: > On Thu, Oct 04, 2018 at 06:52:25PM +0100, Laurence Rochfort wrote: > > Silence the below sparse warnings by casting betwen u8 __iomem *, and > > void *. > > > > warning: incorrect type in assignment (different address spaces) >

Re: [PATCH v5 1/2] memory_hotplug: Free pages as higher order

2018-10-10 Thread Oscar Salvador
On Wed, Oct 10, 2018 at 04:21:16PM +0530, Arun KS wrote: > diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c > index e379e85..2416136 100644 > --- a/mm/memory_hotplug.c > +++ b/mm/memory_hotplug.c > @@ -690,9 +690,13 @@ static int online_pages_range(unsigned long start_pfn, > unsigned long nr_

Re: [PATCH v5 1/2] memory_hotplug: Free pages as higher order

2018-10-10 Thread Arun KS
On 2018-10-10 13:37, Oscar Salvador wrote: On Fri, Oct 05, 2018 at 01:40:05PM +0530, Arun KS wrote: When free pages are done with higher order, time spend on coalescing pages by buddy allocator can be reduced. With section size of 256MB, hot add latency of a single section shows improvement from

Re: [PATCH 1/2] media: v4l: Add definitions for the HEVC slice format and controls

2018-10-10 Thread Tomasz Figa
Hi Paul, On Tue, Aug 28, 2018 at 5:02 PM Paul Kocialkowski wrote: > > This introduces the required definitions for HEVC decoding support with > stateless VPUs. The controls associated to the HEVC slice format provide > the required meta-data for decoding slices extracted from the bitstream. > So

Re: [PATCH v5 1/2] memory_hotplug: Free pages as higher order

2018-10-10 Thread Oscar Salvador
On Fri, Oct 05, 2018 at 01:40:05PM +0530, Arun KS wrote: > When free pages are done with higher order, time spend on > coalescing pages by buddy allocator can be reduced. With > section size of 256MB, hot add latency of a single section > shows improvement from 50-60 ms to less than 1 ms, hence > i