Re: [PATCH RFC 2/6] mm: convert PG_balloon to PG_offline

2018-11-14 Thread David Hildenbrand
On 14.11.18 23:23, Matthew Wilcox wrote: > On Wed, Nov 14, 2018 at 10:17:00PM +0100, David Hildenbrand wrote: >> Rename PG_balloon to PG_offline. This is an indicator that the page is >> logically offline, the content stale and that it should not be touched >> (e.g. a hypervisor would have to

Re: [PATCH RFC 2/6] mm: convert PG_balloon to PG_offline

2018-11-14 Thread Matthew Wilcox
On Wed, Nov 14, 2018 at 10:17:00PM +0100, David Hildenbrand wrote: > Rename PG_balloon to PG_offline. This is an indicator that the page is > logically offline, the content stale and that it should not be touched > (e.g. a hypervisor would have to allocate backing storage in order for the > guest

Re: [PATCH RFC 0/6] mm/kdump: allow to exclude pages that are logically offline

2018-11-14 Thread David Hildenbrand
On 14.11.18 23:57, Nadav Amit wrote: > From: David Hildenbrand > Sent: November 14, 2018 at 9:16:58 PM GMT >> Subject: [PATCH RFC 0/6] mm/kdump: allow to exclude pages that are logically >> offline >> >> >> Right now, pages inflated as part of a balloon driver will be dumped >> by dump tools like

Re: [PATCH RFC 0/6] mm/kdump: allow to exclude pages that are logically offline

2018-11-14 Thread Nadav Amit
From: David Hildenbrand Sent: November 14, 2018 at 9:16:58 PM GMT > Subject: [PATCH RFC 0/6] mm/kdump: allow to exclude pages that are logically > offline > > > Right now, pages inflated as part of a balloon driver will be dumped > by dump tools like makedumpfile. While XEN is able to check in

Re: [PATCH RFC 0/6] mm/kdump: allow to exclude pages that are logically offline

2018-11-14 Thread Nadav Amit
From: David Hildenbrand Sent: November 14, 2018 at 11:05:38 PM GMT > Subject: Re: [PATCH RFC 0/6] mm/kdump: allow to exclude pages that are > logically offline > > > On 14.11.18 23:57, Nadav Amit wrote: >> From: David Hildenbrand >> Sent: November 14, 2018 at 9:16:58 PM GMT >>> Subject: [PATCH

Re: [PATCH v2 0/2] Staging: vchi: Add license id and change int type

2018-11-14 Thread Stefan Wahren
Hi Andre, Am 13.11.2018 um 01:37 schrieb andrealm...@riseup.net: > From: André Almeida > > Fix the following checkpatch issues: > > WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 > CHECK: Prefer kernel type 's32' over 'int32_t' > > Changes in v2: > - Splits commits in a

[PATCH 03/16] staging: vchiq_shim: delete vchi_service_create

2018-11-14 Thread Nicolas Saenz Julienne
No one is using the API neither in the actual staging tree nor in the downstream tree (https://github.com/raspberrypi/linux). Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/interface/vchi/vchi.h | 5 --- .../interface/vchiq_arm/vchiq_shim.c | 32 ---

[PATCH 01/16] staging: vchiq_core: rework vchiq_get_config

2018-11-14 Thread Nicolas Saenz Julienne
The function is overly complicated for what it's ultimately achieving. It's simply filling up a structure. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_arm.c | 12 .../interface/vchiq_arm/vchiq_core.c | 30 +--

[PATCH 00/16] staging: vchiq: dead code removal & misc fixes

2018-11-14 Thread Nicolas Saenz Julienne
Hi All, This series was written in parallel with reading and understanding the vchiq code. So excuse me for the lack of logic in the sequence of patches. The main focus was to delete as much code as possible, I've counted around 550 lines, which is not bad. Apart from that there are some patches

[PATCH 06/16] staging: vchiq_arm: rework vchiq_ioc_copy_element_data

2018-11-14 Thread Nicolas Saenz Julienne
The function is passed to vchiq_core.c for it to go trough all the transfer elements (an array of pointers to data) and copy them into the actual transfer memory (contiguous memory). The logic in the function was "copy an element and return, except when the element is empty, in which case look

[PATCH 13/16] staging: vchiq_core: fix logic redundancy in parse_open

2018-11-14 Thread Nicolas Saenz Julienne
We update sync to reflect that the firmware version is compatible with that option. We don't need to check both of them again further down the code. Signed-off-by: Nicolas Saenz Julienne --- .../staging/vc04_services/interface/vchiq_arm/vchiq_core.c| 4 +--- 1 file changed, 1 insertion(+),

[PATCH 09/16] staging: vchiq_core: do not initialize semaphores twice

2018-11-14 Thread Nicolas Saenz Julienne
vchiq_init_state() initialises a series of semaphores to then call remote_event_create() on the same semaphores, which initializes them again. We get rid of the second initialization. Signed-off-by: Nicolas Saenz Julienne --- .../vc04_services/interface/vchiq_arm/vchiq_core.c| 11

[PATCH 04/16] staging: vchiq_arm: use list_for_each_entry when accessing bulk_waiter_list

2018-11-14 Thread Nicolas Saenz Julienne
The resulting code is way more readeable and intuitive compared to plain list_for_each. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_arm.c | 52 ++- 1 file changed, 16 insertions(+), 36 deletions(-) diff --git

[PATCH 02/16] staging: vchiq_arm: rework close/remove_service IOCTLS

2018-11-14 Thread Nicolas Saenz Julienne
The implementation of both IOCTLS was the same except for one function call. This joins both implementations and updates the code to avoid unneeded indentations. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_arm.c | 66 +++ 1 file changed, 24

Re: [PATCH RFC 2/6] mm: convert PG_balloon to PG_offline

2018-11-14 Thread Mike Rapoport
On Wed, Nov 14, 2018 at 11:49:15PM +0100, David Hildenbrand wrote: > On 14.11.18 23:23, Matthew Wilcox wrote: > > On Wed, Nov 14, 2018 at 10:17:00PM +0100, David Hildenbrand wrote: > >> Rename PG_balloon to PG_offline. This is an indicator that the page is > >> logically offline, the content stale

Re: [PATCH RFC 0/6] mm/kdump: allow to exclude pages that are logically offline

2018-11-14 Thread Julien Freche
>On 11/14/18, 3:41 PM, "Nadav Amit" wrote: >>From: David Hildenbrand >>Sent: November 14, 2018 at 11:05:38 PM GMT >> Subject: Re: [PATCH RFC 0/6] mm/kdump: allow to exclude pages that are >> logically offline >> >> >> Can you share if something like this is also desired for vmware's >>

Re: [PATCH RFC 3/6] kexec: export PG_offline to VMCOREINFO

2018-11-14 Thread Dave Young
Hi David, On 11/14/18 at 10:17pm, David Hildenbrand wrote: > Let's export PG_offline via PAGE_OFFLINE_MAPCOUNT_VALUE, so > makedumpfile can directly skip pages that are logically offline and the > content therefore stale. It would be good to copy some background info from cover letter to the

Re: [PATCH RFC 6/6] PM / Hibernate: exclude all PageOffline() pages

2018-11-14 Thread Pavel Machek
On Wed 2018-11-14 22:17:04, David Hildenbrand wrote: > The content of pages that are marked PG_offline is not of interest > (e.g. inflated by a balloon driver), let's skip these pages. > > Cc: "Rafael J. Wysocki" Acked-by: Pavel Machek > diff --git a/kernel/power/snapshot.c

Re: [PATCH][staging-next] drivers: staging: cedrus: find ctx before dereferencing it ctx

2018-11-14 Thread Hans Verkuil
On 11/02/18 20:01, Colin King wrote: > From: Colin Ian King > > Currently if count is an invalid value the v4l2_info message will > dereference a null ctx pointer to get the dev information. Fix > this by finding ctx first and then checking for an invalid count, > this way ctxt will be non-null

Re: [PATCH] greybus: gpio: switch GPIO portions to use GPIOLIB_IRQCHIP

2018-11-14 Thread Johan Hovold
On Tue, Nov 13, 2018 at 11:48:09PM +0530, Nishad Kamdar wrote: > On Mon, Nov 12, 2018 at 04:15:09PM +0100, Johan Hovold wrote: > > On Fri, Nov 09, 2018 at 01:17:41PM +0530, Nishad Kamdar wrote: > > > @@ -40,8 +38,6 @@ struct gb_gpio_controller { > > > struct gpio_chipchip; > > >

[PATCH v2] staging: greybus: gpio: switch GPIO portions to use GPIOLIB_IRQCHIP

2018-11-14 Thread Nishad Kamdar
Convert the GPIO driver to use the GPIO irqchip library GPIOLIB_IRQCHIP instead of reimplementing the same. Signed-off-by: Nishad Kamdar --- Changes in v2: - Retained irq.h and irqdomain.h headers. - Dropped function gb_gpio_irqchip_add() and called gpiochip_irqchip_add() from probe(). -

Re: [PATCH v3 4/4] staging: iio: ad7816: Add device tree table.

2018-11-14 Thread Nishad Kamdar
On Fri, Nov 09, 2018 at 08:11:57AM +, Ardelean, Alexandru wrote: > On Fri, 2018-11-09 at 13:08 +0530, Nishad Kamdar wrote: > > Add device tree table for matching vendor ID. > > One comment inline for this. > > Thanks > Alex > > > > > Signed-off-by: Nishad Kamdar > > --- > >

[PATCH v4 4/4] staging: iio: ad7816: Add device tree table.

2018-11-14 Thread Nishad Kamdar
Add device tree table for matching vendor ID. Signed-off-by: Nishad Kamdar --- drivers/staging/iio/adc/ad7816.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/staging/iio/adc/ad7816.c b/drivers/staging/iio/adc/ad7816.c index a2fead85cd46..925f7086bc07 100644 ---

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

2018-11-14 Thread Lubomir Rintel
Hello, On Fri, 2018-10-19 at 16:36 +0300, Andy Shevchenko wrote: > On Wed, Oct 10, 2018 at 8:24 PM Lubomir Rintel > wrote: > > 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. > >

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

2018-11-14 Thread Lubomir Rintel
On Sun, 2018-11-04 at 15:37 +0100, Pavel Machek wrote: > Hi! > > > 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 > > Reviewed-by: Andy Shevchenko > > Ok... > > >

[PATCH v4 0/4] staging: iio: ad7816: Switch to the gpio descriptor interface

2018-11-14 Thread Nishad Kamdar
Changes in v4: - Add all parts to the dt bindings as they are functionally different. Changes in v3: - Drop busy pin in case of AD7818. - Set RD/WR pin and CONVST pin as outputs. - Add device tree table. Nishad Kamdar (4): staging: iio: ad7816: Switch to the gpio descriptor interface

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

2018-11-14 Thread Lubomir Rintel
Hello, On Fri, 2018-10-19 at 16:43 +0300, Andy Shevchenko wrote: > On Wed, Oct 10, 2018 at 8:23 PM Lubomir Rintel > wrote: > > 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. > > +int

Re: [PATCH v3 4/4] staging: iio: ad7816: Add device tree table.

2018-11-14 Thread Nishad Kamdar
On Sun, Nov 11, 2018 at 12:38:02PM +, Jonathan Cameron wrote: > On Fri, 9 Nov 2018 08:11:57 + > "Ardelean, Alexandru" wrote: > > > On Fri, 2018-11-09 at 13:08 +0530, Nishad Kamdar wrote: > > > Add device tree table for matching vendor ID. > > > > One comment inline for this. > > > >

Re: [PATCH v3 1/4] staging: iio: ad7816: Switch to the gpio descriptor interface

2018-11-14 Thread Nishad Kamdar
On Sun, Nov 11, 2018 at 12:31:54PM +, Jonathan Cameron wrote: > On Sun, 11 Nov 2018 12:24:05 + > Jonathan Cameron wrote: > > > On Fri, 9 Nov 2018 13:05:17 +0530 > > Nishad Kamdar wrote: > > > > > Use the gpiod interface for rdwr_pin, convert_pin and busy_pin > > > instead of the

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

2018-11-14 Thread Lubomir Rintel
On Fri, 2018-10-19 at 16:50 +0300, Andy Shevchenko wrote: > On Wed, Oct 10, 2018 at 8:24 PM Lubomir Rintel > wrote: > > 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. >

[PATCH 07/16] staging: vchiq-core: get rid of is_master distinction

2018-11-14 Thread Nicolas Saenz Julienne
VCHIQ bulk transfers are what most people call DMA transfers. The CPU sends a list of physical addresses to the VideoCore which then access the memory directly without the need for CPU interaction. With this setup we call the CPU the "slave" and the VideoCore the "master". There seems to be an

[PATCH 14/16] staging: vchiq_arm: rework probe and init functions

2018-11-14 Thread Nicolas Saenz Julienne
Moves the allocation of a chardev region and class creation to the init function of the driver since those functions are meant to be run on a per driver basis, as opposed to the code run in the probe function which is run in a per device basis. Signed-off-by: Nicolas Saenz Julienne ---

[PATCH 15/16] staging: vchiq_arm: fix open/release cdev functions

2018-11-14 Thread Nicolas Saenz Julienne
Both functions checked the minor number of the cdev prior running the code. This was useless since the number of devices is already limited by alloc_chrdev_region. This removes the check and reindents the code where relevant. Signed-off-by: Nicolas Saenz Julienne ---

[PATCH 10/16] staging: vchiq_core: don't add a wmb() before remote_event_signal()

2018-11-14 Thread Nicolas Saenz Julienne
It's the first thing remote_event_signal() does. Signed-off-by: Nicolas Saenz Julienne --- .../staging/vc04_services/interface/vchiq_arm/vchiq_core.c| 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c

[PATCH 05/16] staging: vchiq_arm: get rid of vchi_mh.h

2018-11-14 Thread Nicolas Saenz Julienne
The concept of VCHI_MEM_HANDLE_T is introduced by this header file and was meant to be used with bulk transfers. After a quick look in vchiq_core.c it is pretty clear that it actually accomplishes nothing nor alters the bulk transfers in any way. Signed-off-by: Nicolas Saenz Julienne ---

[PATCH 12/16] staging: vchiq_util: get rid of unneeded memory barriers

2018-11-14 Thread Nicolas Saenz Julienne
All the memory operations featured in this file modify/access memory that is only accessed by the CPU. So we can assume that all the memory barrier handling done by the completion routines is good enough for us. Signed-off-by: Nicolas Saenz Julienne --- .../interface/vchiq_arm/vchiq_util.c

[PATCH 08/16] staging: vchiq_core: remove unnecessary safety checks in vchiq_init_state

2018-11-14 Thread Nicolas Saenz Julienne
vchiq_init_state() checks the initial contents of slot_zero are correct. These are set in vchiq_init_slots(), using the same hard-coded defaults as the checks. Both functions are called sequentially and Video Core isn't yet aware of the slot's address. There is no way the contents of slot_zero

[PATCH 16/16] staging: vchiq: add more tasks to the TODO list

2018-11-14 Thread Nicolas Saenz Julienne
The TODO list was missing some tasks needed before upstreaming the device. Signed-off-by: Nicolas Saenz Julienne --- .../staging/vc04_services/interface/vchi/TODO | 42 +++ 1 file changed, 42 insertions(+) diff --git a/drivers/staging/vc04_services/interface/vchi/TODO

[PATCH 11/16] staging: vchiq: use completions instead of semaphores

2018-11-14 Thread Nicolas Saenz Julienne
It is preferred in the kernel to avoid using semaphores to wait for events, as they are optimised for the opposite situation; where the common case is that they are available and may block only occasionally. FYI see this thread: https://lkml.org/lkml/2008/4/11/323. Also completions are

[PATCH RFC 2/6] mm: convert PG_balloon to PG_offline

2018-11-14 Thread David Hildenbrand
PG_balloon was introduced to implement page migration/compaction for pages inflated in virtio-balloon. Nowadays, it is only a marker that a page is part of virtio-balloon and therefore logically offline. We also want to make use of this flag in other balloon drivers - for inflated pages or when

[PATCH RFC 4/6] xen/balloon: mark inflated pages PG_offline

2018-11-14 Thread David Hildenbrand
Mark inflated and never onlined pages PG_offline, to tell the world that the content is stale and should not be dumped. Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Cc: Andrew Morton Cc: Matthew Wilcox Cc: Michal Hocko Cc: "Michael S. Tsirkin" Signed-off-by: David

[PATCH RFC 0/6] mm/kdump: allow to exclude pages that are logically offline

2018-11-14 Thread David Hildenbrand
Right now, pages inflated as part of a balloon driver will be dumped by dump tools like makedumpfile. While XEN is able to check in the crash kernel whether a certain pfn is actuall backed by memory in the hypervisor (see xen_oldmem_pfn_is_ram) and optimize this case, dumps of virtio-balloon and

[PATCH RFC 6/6] PM / Hibernate: exclude all PageOffline() pages

2018-11-14 Thread David Hildenbrand
The content of pages that are marked PG_offline is not of interest (e.g. inflated by a balloon driver), let's skip these pages. Cc: "Rafael J. Wysocki" Cc: Pavel Machek Cc: Len Brown Cc: Andrew Morton Cc: Matthew Wilcox Cc: Michal Hocko Cc: "Michael S. Tsirkin" Signed-off-by: David

[PATCH RFC 5/6] hv_balloon: mark inflated pages PG_offline

2018-11-14 Thread David Hildenbrand
Mark inflated and never onlined pages PG_offline, to tell the world that the content is stale and should not be dumped. Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Stephen Hemminger Cc: Kairui Song Cc: Vitaly Kuznetsov Cc: Andrew Morton Cc: Matthew Wilcox Cc: Michal Hocko Cc: "Michael S.

[PATCH RFC 3/6] kexec: export PG_offline to VMCOREINFO

2018-11-14 Thread David Hildenbrand
Let's export PG_offline via PAGE_OFFLINE_MAPCOUNT_VALUE, so makedumpfile can directly skip pages that are logically offline and the content therefore stale. Cc: Andrew Morton Cc: Dave Young Cc: "Kirill A. Shutemov" Cc: Baoquan He Cc: Omar Sandoval Cc: Arnd Bergmann Cc: Matthew Wilcox Cc:

[PATCH RFC 1/6] mm: balloon: update comment about isolation/migration/compaction

2018-11-14 Thread David Hildenbrand
Commit b1123ea6d3b3 ("mm: balloon: use general non-lru movable page feature") reworked balloon handling to make use of the general non-lru movable page feature. The big comment block in balloon_compaction.h contains quite some outdated information. Let's fix this. Cc: Andrew Morton Cc: Matthew