[PATCH] objtool: Fix gcov check for older versions of GCC

2017-07-24 Thread Josh Poimboeuf
Objtool tries to silence 'unreachable instruction' warnings when it detects gcov is enabled, because gcov produces a lot of unreachable instructions and they don't really matter. However, the 0-day bot is still reporting some unreachable instruction warnings with CONFIG_GCOV_KERNEL=y on GCC

Re: RCU stall warnings...

2017-07-24 Thread David Miller
From: "Paul E. McKenney" Date: Mon, 24 Jul 2017 16:20:33 -0700 > It looks like the system isn't letting the rcu_sched grace-period kthread > run: > > [402138.240512] rcu_sched kthread starved for 2757 jiffies! g53669 c53668 > f0x0 RCU_GP_WAIT_FQS(3) ->state=0x1 > > This kthread tried to wait

Re: [PATCH] netvsc: fix ptr_ret.cocci warnings

2017-07-24 Thread David Miller
From: Stephen Hemminger Date: Mon, 24 Jul 2017 16:21:57 -0700 > On Mon, 24 Jul 2017 16:20:28 -0700 (PDT) > David Miller wrote: > >> From: kbuild test robot >> Date: Sat, 22 Jul 2017 02:54:43 +0800 >> >> >

Re: [PATCH] netvsc: fix ptr_ret.cocci warnings

2017-07-24 Thread David Miller
From: Stephen Hemminger Date: Mon, 24 Jul 2017 16:21:57 -0700 > On Mon, 24 Jul 2017 16:20:28 -0700 (PDT) > David Miller wrote: > >> From: kbuild test robot >> Date: Sat, 22 Jul 2017 02:54:43 +0800 >> >> > drivers/net/hyperv/netvsc_drv.c:737:8-14: WARNING: PTR_ERR_OR_ZERO can be >> > used >>

Re: [PATCH] netvsc: fix ptr_ret.cocci warnings

2017-07-24 Thread Stephen Hemminger
On Mon, 24 Jul 2017 16:20:28 -0700 (PDT) David Miller wrote: > From: kbuild test robot > Date: Sat, 22 Jul 2017 02:54:43 +0800 > > > drivers/net/hyperv/netvsc_drv.c:737:8-14: WARNING: PTR_ERR_OR_ZERO can be > > used > > > > > > Use

Re: [PATCH] netvsc: fix ptr_ret.cocci warnings

2017-07-24 Thread Stephen Hemminger
On Mon, 24 Jul 2017 16:20:28 -0700 (PDT) David Miller wrote: > From: kbuild test robot > Date: Sat, 22 Jul 2017 02:54:43 +0800 > > > drivers/net/hyperv/netvsc_drv.c:737:8-14: WARNING: PTR_ERR_OR_ZERO can be > > used > > > > > > Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR > >

Re: RCU stall warnings...

2017-07-24 Thread Paul E. McKenney
On Mon, Jul 24, 2017 at 03:32:48PM -0700, David Miller wrote: > > Paul and other RCU experts, > > Starting with 4.13-rc1 we're getting RCU stall dumps on sparc64, they > definitely didn't happen in 4.12 > > I tried to look for low hanging fruit in the kernel/rcu/ changes this > merge window,

Re: RCU stall warnings...

2017-07-24 Thread Paul E. McKenney
On Mon, Jul 24, 2017 at 03:32:48PM -0700, David Miller wrote: > > Paul and other RCU experts, > > Starting with 4.13-rc1 we're getting RCU stall dumps on sparc64, they > definitely didn't happen in 4.12 > > I tried to look for low hanging fruit in the kernel/rcu/ changes this > merge window,

Re: [PATCH] netvsc: fix ptr_ret.cocci warnings

2017-07-24 Thread David Miller
From: kbuild test robot Date: Sat, 22 Jul 2017 02:54:43 +0800 > drivers/net/hyperv/netvsc_drv.c:737:8-14: WARNING: PTR_ERR_OR_ZERO can be used > > > Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR > > Generated by: scripts/coccinelle/api/ptr_ret.cocci > >

Re: [PATCH] netvsc: fix ptr_ret.cocci warnings

2017-07-24 Thread David Miller
From: kbuild test robot Date: Sat, 22 Jul 2017 02:54:43 +0800 > drivers/net/hyperv/netvsc_drv.c:737:8-14: WARNING: PTR_ERR_OR_ZERO can be used > > > Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR > > Generated by: scripts/coccinelle/api/ptr_ret.cocci > > Fixes: 9749fed5d43d

Re: [PATCH net-next 0/2] rxrpc: Rearrange headers

2017-07-24 Thread David Miller
From: David Howells Date: Fri, 21 Jul 2017 19:29:42 +0100 > > Here's a pair of patches that rearrange some of the AF_RXRPC header files > that are outside of the net/rxrpc/ directory: > > (1) The bits userspace need are moved to uapi/linux/rxrpc.h. [Should this > be

Re: [PATCH net-next 0/2] rxrpc: Rearrange headers

2017-07-24 Thread David Miller
From: David Howells Date: Fri, 21 Jul 2017 19:29:42 +0100 > > Here's a pair of patches that rearrange some of the AF_RXRPC header files > that are outside of the net/rxrpc/ directory: > > (1) The bits userspace need are moved to uapi/linux/rxrpc.h. [Should this > be af_rxrpc.h instead,

[PATCH] PM / USB: hcd_pci: Skip secondary root hub check for HCD_DEAD()

2017-07-24 Thread Rafael J. Wysocki
From: Rafael J. Wysocki If HCD_DEAD(hcd) is "true" in check_root_hub_suspended(), it is rather pointless to check the secondary root hub, so return early then. This actually fixes occasional suspend failures on one of my test machines. Signed-off-by: Rafael J.

[PATCH] PM / USB: hcd_pci: Skip secondary root hub check for HCD_DEAD()

2017-07-24 Thread Rafael J. Wysocki
From: Rafael J. Wysocki If HCD_DEAD(hcd) is "true" in check_root_hub_suspended(), it is rather pointless to check the secondary root hub, so return early then. This actually fixes occasional suspend failures on one of my test machines. Signed-off-by: Rafael J. Wysocki ---

[PATCH v2 01/23] percpu: setup_first_chunk enforce dynamic region must exist

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" The first chunk is handled as a special case as it is composed of the static, reserved, and dynamic regions. The code handles each case individually. The next several patches will merge these code paths and lay the foundation for the bitmap

[PATCH v2 01/23] percpu: setup_first_chunk enforce dynamic region must exist

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" The first chunk is handled as a special case as it is composed of the static, reserved, and dynamic regions. The code handles each case individually. The next several patches will merge these code paths and lay the foundation for the bitmap allocator. This patch

[PATCH v2 06/23] percpu: end chunk area maps page aligned for the populated bitmap

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" The area map allocator manages the first chunk area by hiding all but the region it is responsible for serving in the area map. To align this with the populated page bitmap, end_offset is introduced to keep track of the delta to end page

[PATCH v2 06/23] percpu: end chunk area maps page aligned for the populated bitmap

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" The area map allocator manages the first chunk area by hiding all but the region it is responsible for serving in the area map. To align this with the populated page bitmap, end_offset is introduced to keep track of the delta to end page aligned. The area map is

[PATCH v2 03/23] percpu: remove has_reserved from pcpu_chunk

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" Prior this variable was used to manage statistics when the first chunk had a reserved region. The previous patch introduced start_offset to keep track of the offset by value rather than boolean. Therefore, has_reserved can be removed.

[PATCH v2 08/23] percpu: modify base_addr to be region specific

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" Originally, the first chunk was served by one or two chunks, each given a region they are responsible for. Despite this, the arithmetic was based off of the true base_addr of the chunk making it be overly inclusive. This patch moves the

[PATCH v2 03/23] percpu: remove has_reserved from pcpu_chunk

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" Prior this variable was used to manage statistics when the first chunk had a reserved region. The previous patch introduced start_offset to keep track of the offset by value rather than boolean. Therefore, has_reserved can be removed. Signed-off-by: Dennis Zhou

[PATCH v2 08/23] percpu: modify base_addr to be region specific

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" Originally, the first chunk was served by one or two chunks, each given a region they are responsible for. Despite this, the arithmetic was based off of the true base_addr of the chunk making it be overly inclusive. This patch moves the base_addr of chunks that

[PATCH v2 07/23] percpu: setup_first_chunk rename schunk/dchunk to chunk

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" There is no need to have the static chunk and dynamic chunk be named separately as the allocations are sequential. This preemptively solves the misnomer problem with the base_addrs being moved up in the following patch. It also removes a

[PATCH v2 07/23] percpu: setup_first_chunk rename schunk/dchunk to chunk

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" There is no need to have the static chunk and dynamic chunk be named separately as the allocations are sequential. This preemptively solves the misnomer problem with the base_addrs being moved up in the following patch. It also removes a ternary operation deciding

[PATCH v2 4/4] can: m_can: Add call to of_can_transceiver_fixed

2017-07-24 Thread Franklin S Cooper Jr
Add call to new generic functions that provides support via a binding to limit the arbitration rate and/or data rate imposed by the physical transceiver connected to the MCAN peripheral. Signed-off-by: Franklin S Cooper Jr --- drivers/net/can/m_can/m_can.c | 2 ++ 1 file

[PATCH v2 09/23] percpu: combine percpu address checks

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" The percpu address checks for the reserved and dynamic region chunks are now specific to each region. The address checking logic can be combined taking advantage of the global references to the dynamic and static region chunks.

[PATCH v2 4/4] can: m_can: Add call to of_can_transceiver_fixed

2017-07-24 Thread Franklin S Cooper Jr
Add call to new generic functions that provides support via a binding to limit the arbitration rate and/or data rate imposed by the physical transceiver connected to the MCAN peripheral. Signed-off-by: Franklin S Cooper Jr --- drivers/net/can/m_can/m_can.c | 2 ++ 1 file changed, 2

[PATCH v2 09/23] percpu: combine percpu address checks

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" The percpu address checks for the reserved and dynamic region chunks are now specific to each region. The address checking logic can be combined taking advantage of the global references to the dynamic and static region chunks. Signed-off-by: Dennis Zhou ---

[PATCH v2 3/4] can: m_can: Update documentation to mention new fixed transceiver binding

2017-07-24 Thread Franklin S Cooper Jr
Add information regarding fixed transceiver binding. This is especially important for MCAN since the IP allows CAN FD mode to run significantly faster than what most transceivers are capable of. Signed-off-by: Franklin S Cooper Jr --- Version 2 changes: Drop unit address

[PATCH v2 3/4] can: m_can: Update documentation to mention new fixed transceiver binding

2017-07-24 Thread Franklin S Cooper Jr
Add information regarding fixed transceiver binding. This is especially important for MCAN since the IP allows CAN FD mode to run significantly faster than what most transceivers are capable of. Signed-off-by: Franklin S Cooper Jr --- Version 2 changes: Drop unit address

[PATCH v2 0/4] can: Add new binding to limit bit rate used

2017-07-24 Thread Franklin S Cooper Jr
Add a new generic binding that CAN drivers can use to specify the max arbitration and data bit rate supported by a transceiver. This is useful since in some instances the maximum speeds may be limited by the transceiver used. However, transceivers may not provide a means to determine this

[PATCH v2 2/4] can: fixed-transceiver: Add documentation for CAN fixed transceiver bindings

2017-07-24 Thread Franklin S Cooper Jr
Add documentation to describe usage of the new fixed transceiver binding. This new binding is applicable for any CAN device therefore it exists as its own document. Signed-off-by: Franklin S Cooper Jr --- Version 2: Tweak commit message working Tweak wording for properties Drop

[PATCH v2 0/4] can: Add new binding to limit bit rate used

2017-07-24 Thread Franklin S Cooper Jr
Add a new generic binding that CAN drivers can use to specify the max arbitration and data bit rate supported by a transceiver. This is useful since in some instances the maximum speeds may be limited by the transceiver used. However, transceivers may not provide a means to determine this

[PATCH v2 2/4] can: fixed-transceiver: Add documentation for CAN fixed transceiver bindings

2017-07-24 Thread Franklin S Cooper Jr
Add documentation to describe usage of the new fixed transceiver binding. This new binding is applicable for any CAN device therefore it exists as its own document. Signed-off-by: Franklin S Cooper Jr --- Version 2: Tweak commit message working Tweak wording for properties Drop unit addressing

[PATCH v2 1/4] can: dev: Add support for limiting configured bitrate

2017-07-24 Thread Franklin S Cooper Jr
Various CAN or CAN-FD IP may be able to run at a faster rate than what the transceiver the CAN node is connected to. This can lead to unexpected errors. However, CAN transceivers typically have fixed limitations and provide no means to discover these limitations at runtime. Therefore, add support

[PATCH v2 1/4] can: dev: Add support for limiting configured bitrate

2017-07-24 Thread Franklin S Cooper Jr
Various CAN or CAN-FD IP may be able to run at a faster rate than what the transceiver the CAN node is connected to. This can lead to unexpected errors. However, CAN transceivers typically have fixed limitations and provide no means to discover these limitations at runtime. Therefore, add support

[PATCH v2 12/23] percpu: increase minimum percpu allocation size and align first regions

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" This patch increases the minimum allocation size of percpu memory to 4-bytes. This change will help minimize the metadata overhead associated with the bitmap allocator. The assumption is that most allocations will be of objects or structs

[PATCH v2 12/23] percpu: increase minimum percpu allocation size and align first regions

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" This patch increases the minimum allocation size of percpu memory to 4-bytes. This change will help minimize the metadata overhead associated with the bitmap allocator. The assumption is that most allocations will be of objects or structs greater than 2 bytes with

[PATCH v2 17/23] percpu: skip chunks if the alloc does not fit in the contig hint

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" This patch adds chunk->contig_bits_start to keep track of the contig hint's offset and the check to skip the chunk if it does not fit. If the chunk's contig hint starting offset cannot satisfy an allocation, the allocator assumes there is

[PATCH v2 14/23] percpu: replace area map allocator with bitmap allocator

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" The percpu memory allocator is experiencing scalability issues when allocating and freeing large numbers of counters as in BPF. Additionally, there is a corner case where iteration is triggered over all chunks if the contig_hint is the right

[PATCH v2 17/23] percpu: skip chunks if the alloc does not fit in the contig hint

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" This patch adds chunk->contig_bits_start to keep track of the contig hint's offset and the check to skip the chunk if it does not fit. If the chunk's contig hint starting offset cannot satisfy an allocation, the allocator assumes there is enough memory pressure in

[PATCH v2 14/23] percpu: replace area map allocator with bitmap allocator

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" The percpu memory allocator is experiencing scalability issues when allocating and freeing large numbers of counters as in BPF. Additionally, there is a corner case where iteration is triggered over all chunks if the contig_hint is the right size, but wrong

[PATCH v2 19/23] percpu: update alloc path to only scan if contig hints are broken

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" Metadata is kept per block to keep track of where the contig hints are. Scanning can be avoided when the contig hints are not broken. In that case, left and right contigs have to be managed manually. This patch changes the allocation path

[PATCH v2 19/23] percpu: update alloc path to only scan if contig hints are broken

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" Metadata is kept per block to keep track of where the contig hints are. Scanning can be avoided when the contig hints are not broken. In that case, left and right contigs have to be managed manually. This patch changes the allocation path hint updating to only

[PATCH v2 16/23] percpu: add first_bit to keep track of the first free in the bitmap

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" This patch adds first_bit to keep track of the first free bit in the bitmap. This hint helps prevent scanning of fully allocated blocks. Signed-off-by: Dennis Zhou --- mm/percpu-internal.h | 2 +- mm/percpu-stats.c

[PATCH v2 13/23] percpu: generalize bitmap (un)populated iterators

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" The area map allocator only used a bitmap for the backing page state. The new bitmap allocator will use bitmaps to manage the allocation region in addition to this. This patch generalizes the bitmap iterators so they can be reused with the

[PATCH v2 16/23] percpu: add first_bit to keep track of the first free in the bitmap

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" This patch adds first_bit to keep track of the first free bit in the bitmap. This hint helps prevent scanning of fully allocated blocks. Signed-off-by: Dennis Zhou --- mm/percpu-internal.h | 2 +- mm/percpu-stats.c| 1 + mm/percpu.c | 17

[PATCH v2 13/23] percpu: generalize bitmap (un)populated iterators

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" The area map allocator only used a bitmap for the backing page state. The new bitmap allocator will use bitmaps to manage the allocation region in addition to this. This patch generalizes the bitmap iterators so they can be reused with the bitmap allocator.

[PATCH v2 21/23] percpu: use metadata blocks to update the chunk contig hint

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" The largest free region will either be a block level contig hint or an aggregate over the left_free and right_free areas of blocks. This is a much smaller set of free areas that need to be checked than a full traverse. Signed-off-by: Dennis

[PATCH v2 15/23] percpu: introduce bitmap metadata blocks

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" This patch introduces the bitmap metadata blocks and adds the skeleton of the code that will be used to maintain these blocks. Each chunk's bitmap is made up of full metadata blocks. These blocks maintain basic metadata to help prevent

[PATCH v2 18/23] percpu: keep track of the best offset for contig hints

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" This patch makes the contig hint starting offset optimization from the previous patch as honest as it can be. For both chunk and block starting offsets, make sure it keeps the starting offset with the best alignment. The block skip

[PATCH v2 21/23] percpu: use metadata blocks to update the chunk contig hint

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" The largest free region will either be a block level contig hint or an aggregate over the left_free and right_free areas of blocks. This is a much smaller set of free areas that need to be checked than a full traverse. Signed-off-by: Dennis Zhou --- mm/percpu.c

[PATCH v2 15/23] percpu: introduce bitmap metadata blocks

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" This patch introduces the bitmap metadata blocks and adds the skeleton of the code that will be used to maintain these blocks. Each chunk's bitmap is made up of full metadata blocks. These blocks maintain basic metadata to help prevent scanning unnecssarily to

[PATCH v2 18/23] percpu: keep track of the best offset for contig hints

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" This patch makes the contig hint starting offset optimization from the previous patch as honest as it can be. For both chunk and block starting offsets, make sure it keeps the starting offset with the best alignment. The block skip optimization is added in a later

[PATCH v2 23/23] percpu: update header to contain bitmap allocator explanation.

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" The other patches contain a lot of information, so adding this information in a separate patch. It adds my copyright and a brief explanation of how the bitmap allocator works. There is a minor typo as well in the prior explanation so that is

[PATCH v2 23/23] percpu: update header to contain bitmap allocator explanation.

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" The other patches contain a lot of information, so adding this information in a separate patch. It adds my copyright and a brief explanation of how the bitmap allocator works. There is a minor typo as well in the prior explanation so that is fixed. Signed-off-by:

[PATCH v2 22/23] percpu: update pcpu_find_block_fit to use an iterator

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" The simple, and expensive, way to find a free area is to iterate over the entire bitmap until an area is found that fits the allocation size and alignment. This patch makes use of an iterate that find an area to check by using the block level

[PATCH v2 22/23] percpu: update pcpu_find_block_fit to use an iterator

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" The simple, and expensive, way to find a free area is to iterate over the entire bitmap until an area is found that fits the allocation size and alignment. This patch makes use of an iterate that find an area to check by using the block level contig hints. It will

[PATCH v2 20/23] percpu: update free path to take advantage of contig hints

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" The bitmap allocator must keep metadata consistent. The easiest way is to scan after every allocation for each affected block and the entire chunk. This is rather expensive. The free path can take advantage of current contig hints to prevent

[PATCH v2 20/23] percpu: update free path to take advantage of contig hints

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" The bitmap allocator must keep metadata consistent. The easiest way is to scan after every allocation for each affected block and the entire chunk. This is rather expensive. The free path can take advantage of current contig hints to prevent scanning within the

Re: [PATCH V2 net-next 01/21] net-next/hinic: Initialize hw interface

2017-07-24 Thread Francois Romieu
Aviad Krawczyk : [...] > hinic_remove - If insmod failed and someone calls rmmod, we will get a > crash because the resource are already free. Therefore we test if the > device exists, please tell me if you meant to something different The module won't even proceed

Re: [PATCH V2 net-next 01/21] net-next/hinic: Initialize hw interface

2017-07-24 Thread Francois Romieu
Aviad Krawczyk : [...] > hinic_remove - If insmod failed and someone calls rmmod, we will get a > crash because the resource are already free. Therefore we test if the > device exists, please tell me if you meant to something different The module won't even proceed through the pci_driver remove

[PATCH v2 11/23] percpu: introduce nr_empty_pop_pages to help empty page accounting

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" pcpu_nr_empty_pop_pages is used to ensure there are a handful of free pages around to serve atomic allocations. A new field, nr_empty_pop_pages, is added to the pcpu_chunk struct to keep track of the number of empty pages. This field is

[PATCH v2 11/23] percpu: introduce nr_empty_pop_pages to help empty page accounting

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" pcpu_nr_empty_pop_pages is used to ensure there are a handful of free pages around to serve atomic allocations. A new field, nr_empty_pop_pages, is added to the pcpu_chunk struct to keep track of the number of empty pages. This field is needed as the number of

[PATCH v2 10/23] percpu: change the number of pages marked in the first_chunk pop bitmap

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" The populated bitmap represents the state of the pages the chunk serves. Prior, the bitmap was marked completely used as the first chunk was allocated and immutable. This is misleading because the first chunk may not be completely filled.

[PATCH v2 10/23] percpu: change the number of pages marked in the first_chunk pop bitmap

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" The populated bitmap represents the state of the pages the chunk serves. Prior, the bitmap was marked completely used as the first chunk was allocated and immutable. This is misleading because the first chunk may not be completely filled. Additionally, with moving

[PATCH v2 05/23] percpu: unify allocation of schunk and dchunk

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" Create a common allocator for first chunk initialization, pcpu_alloc_first_chunk. Comments for this function will be added in a later patch once the bitmap allocator is added. Signed-off-by: Dennis Zhou ---

[PATCH v2 05/23] percpu: unify allocation of schunk and dchunk

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" Create a common allocator for first chunk initialization, pcpu_alloc_first_chunk. Comments for this function will be added in a later patch once the bitmap allocator is added. Signed-off-by: Dennis Zhou --- mm/percpu.c | 73

[PATCH v2 04/23] percpu: setup_first_chunk remove dyn_size and consolidate logic

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" There is logic for setting variables in the static chunk init code that could be consolidated with the dynamic chunk init code. This combines this logic to setup for combining the allocation paths. reserved_size is used as the conditional as

[PATCH v2 02/23] percpu: introduce start_offset to pcpu_chunk

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" The reserved chunk arithmetic uses a global variable pcpu_reserved_chunk_limit that is set in the first chunk init code to hide a portion of the area map. The bitmap allocator to come will eventually move the base_addr up and require both the

[PATCH v2 02/23] percpu: introduce start_offset to pcpu_chunk

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" The reserved chunk arithmetic uses a global variable pcpu_reserved_chunk_limit that is set in the first chunk init code to hide a portion of the area map. The bitmap allocator to come will eventually move the base_addr up and require both the reserved chunk and

[PATCH v2 04/23] percpu: setup_first_chunk remove dyn_size and consolidate logic

2017-07-24 Thread Dennis Zhou
From: "Dennis Zhou (Facebook)" There is logic for setting variables in the static chunk init code that could be consolidated with the dynamic chunk init code. This combines this logic to setup for combining the allocation paths. reserved_size is used as the conditional as a dynamic region will

[PATCH v2 00/23] percpu: replace percpu area map allocator with bitmap allocator

2017-07-24 Thread Dennis Zhou
Hi everyone, V2: There was a good bit of refactoring. Several variable names were modified to more descriptive. First bit is now kept track of instead of first block. Chunk slots are back to being managed in bytes. The reserved region is no longer expanded to be page aligned. The other regions

[PATCH v2 00/23] percpu: replace percpu area map allocator with bitmap allocator

2017-07-24 Thread Dennis Zhou
Hi everyone, V2: There was a good bit of refactoring. Several variable names were modified to more descriptive. First bit is now kept track of instead of first block. Chunk slots are back to being managed in bytes. The reserved region is no longer expanded to be page aligned. The other regions

[PATCH v2 1/3] can: m_can: Make hclk optional

2017-07-24 Thread Franklin S Cooper Jr
Hclk is the MCAN's interface clock. However, for OMAP based devices such as DRA7 SoC family the interface clock is handled by hwmod. Therefore, this interface clock is managed by hwmod driver via pm_runtime_get and pm_runtime_put calls. Therefore, this interface clock isn't defined in DT and thus

[PATCH v2 1/3] can: m_can: Make hclk optional

2017-07-24 Thread Franklin S Cooper Jr
Hclk is the MCAN's interface clock. However, for OMAP based devices such as DRA7 SoC family the interface clock is handled by hwmod. Therefore, this interface clock is managed by hwmod driver via pm_runtime_get and pm_runtime_put calls. Therefore, this interface clock isn't defined in DT and thus

Re: [PATCH v1 07/13] xen/pvcalls: implement accept command

2017-07-24 Thread Stefano Stabellini
On Mon, 24 Jul 2017, Juergen Gross wrote: > On 22/07/17 02:11, Stefano Stabellini wrote: > > Send PVCALLS_ACCEPT to the backend. Allocate a new active socket. Make > > sure that only one accept command is executed at any given time by > > setting PVCALLS_FLAG_ACCEPT_INFLIGHT and waiting on the > >

Re: [PATCH v1 07/13] xen/pvcalls: implement accept command

2017-07-24 Thread Stefano Stabellini
On Mon, 24 Jul 2017, Juergen Gross wrote: > On 22/07/17 02:11, Stefano Stabellini wrote: > > Send PVCALLS_ACCEPT to the backend. Allocate a new active socket. Make > > sure that only one accept command is executed at any given time by > > setting PVCALLS_FLAG_ACCEPT_INFLIGHT and waiting on the > >

[PATCH v2 0/3] can: m_can: Add PM Runtime Support

2017-07-24 Thread Franklin S Cooper Jr
Add PM runtime support to the MCAN driver. To support devices that don't use PM runtime leave the original clk calls in the driver. Perhaps in the future when it makes sense we can remove these non pm runtime clk calls. Version 2 changes: Used NULL instead of 0 for unused hclk handle Franklin S

[PATCH v2 0/3] can: m_can: Add PM Runtime Support

2017-07-24 Thread Franklin S Cooper Jr
Add PM runtime support to the MCAN driver. To support devices that don't use PM runtime leave the original clk calls in the driver. Perhaps in the future when it makes sense we can remove these non pm runtime clk calls. Version 2 changes: Used NULL instead of 0 for unused hclk handle Franklin S

[PATCH v2 3/3] can: m_can: Add PM Runtime

2017-07-24 Thread Franklin S Cooper Jr
Add support for PM Runtime which is the new way to handle managing clocks. However, to avoid breaking SoCs not using PM_RUNTIME leave the old clk management approach in place. PM_RUNTIME is required by OMAP based devices to handle clock management. Therefore, this allows future Texas Instruments

[PATCH v2 3/3] can: m_can: Add PM Runtime

2017-07-24 Thread Franklin S Cooper Jr
Add support for PM Runtime which is the new way to handle managing clocks. However, to avoid breaking SoCs not using PM_RUNTIME leave the old clk management approach in place. PM_RUNTIME is required by OMAP based devices to handle clock management. Therefore, this allows future Texas Instruments

[PATCH v2 2/3] can: m_can: Update documentation to indicate that hclk may be optional

2017-07-24 Thread Franklin S Cooper Jr
Update the documentation to reflect that hclk is now an optional clock. Signed-off-by: Franklin S Cooper Jr Acked-by: Rob Herring --- Documentation/devicetree/bindings/net/can/m_can.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH v2 2/3] can: m_can: Update documentation to indicate that hclk may be optional

2017-07-24 Thread Franklin S Cooper Jr
Update the documentation to reflect that hclk is now an optional clock. Signed-off-by: Franklin S Cooper Jr Acked-by: Rob Herring --- Documentation/devicetree/bindings/net/can/m_can.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: [PATCH v1 06/13] xen/pvcalls: implement listen command

2017-07-24 Thread Stefano Stabellini
On Mon, 24 Jul 2017, Juergen Gross wrote: > On 22/07/17 02:11, Stefano Stabellini wrote: > > Send PVCALLS_LISTEN to the backend. > > > > Signed-off-by: Stefano Stabellini > > CC: boris.ostrov...@oracle.com > > CC: jgr...@suse.com > > --- > > drivers/xen/pvcalls-front.c | 49

Re: [PATCH v1 06/13] xen/pvcalls: implement listen command

2017-07-24 Thread Stefano Stabellini
On Mon, 24 Jul 2017, Juergen Gross wrote: > On 22/07/17 02:11, Stefano Stabellini wrote: > > Send PVCALLS_LISTEN to the backend. > > > > Signed-off-by: Stefano Stabellini > > CC: boris.ostrov...@oracle.com > > CC: jgr...@suse.com > > --- > > drivers/xen/pvcalls-front.c | 49 > >

Re: [PATCH v1 05/13] xen/pvcalls: implement bind command

2017-07-24 Thread Stefano Stabellini
On Mon, 24 Jul 2017, Juergen Gross wrote: > On 22/07/17 02:11, Stefano Stabellini wrote: > > Send PVCALLS_BIND to the backend. Introduce a new structure, part of > > struct sock_mapping, to store information specific to passive sockets. > > > > Introduce a status field to keep track of the status

[ANNOUNCE] Git v2.14.0-rc1

2017-07-24 Thread Junio C Hamano
A release candidate Git v2.14.0-rc1 is now available for testing at the usual places. It is comprised of 708 non-merge commits since v2.13.0, contributed by 61 people, 14 of which are new faces. The tarballs are found at: https://www.kernel.org/pub/software/scm/git/testing/ The following

Re: [PATCH v1 05/13] xen/pvcalls: implement bind command

2017-07-24 Thread Stefano Stabellini
On Mon, 24 Jul 2017, Juergen Gross wrote: > On 22/07/17 02:11, Stefano Stabellini wrote: > > Send PVCALLS_BIND to the backend. Introduce a new structure, part of > > struct sock_mapping, to store information specific to passive sockets. > > > > Introduce a status field to keep track of the status

[ANNOUNCE] Git v2.14.0-rc1

2017-07-24 Thread Junio C Hamano
A release candidate Git v2.14.0-rc1 is now available for testing at the usual places. It is comprised of 708 non-merge commits since v2.13.0, contributed by 61 people, 14 of which are new faces. The tarballs are found at: https://www.kernel.org/pub/software/scm/git/testing/ The following

Re: [PATCH v1 04/13] xen/pvcalls: implement connect command

2017-07-24 Thread Stefano Stabellini
On Mon, 24 Jul 2017, Juergen Gross wrote: > On 22/07/17 02:11, Stefano Stabellini wrote: > > Send PVCALLS_CONNECT to the backend. Allocate a new ring and evtchn for > > the active socket. > > > > Introduce a data structure to keep track of sockets. Introduce a > > waitqueue to allow the frontend

Re: [PATCH v1 04/13] xen/pvcalls: implement connect command

2017-07-24 Thread Stefano Stabellini
On Mon, 24 Jul 2017, Juergen Gross wrote: > On 22/07/17 02:11, Stefano Stabellini wrote: > > Send PVCALLS_CONNECT to the backend. Allocate a new ring and evtchn for > > the active socket. > > > > Introduce a data structure to keep track of sockets. Introduce a > > waitqueue to allow the frontend

[PATCH] drm/amdgpu: fix spelling mistake: "suuport"-> "support"

2017-07-24 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in WARN_ONCE message Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] drm/amdgpu: fix spelling mistake: "suuport"-> "support"

2017-07-24 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in WARN_ONCE message Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

[PATCH v3] KVM: LAPIC: Fix reentrancy issues with preempt notifiers

2017-07-24 Thread Wanpeng Li
From: Wanpeng Li Preempt can occur in the preemption timer expiration handler: CPU0CPU1 preemption timer vmexit handle_preemption_timer(vCPU0) kvm_lapic_expired_hv_timer hv_timer_is_use == true sched_out

[PATCH v3] KVM: LAPIC: Fix reentrancy issues with preempt notifiers

2017-07-24 Thread Wanpeng Li
From: Wanpeng Li Preempt can occur in the preemption timer expiration handler: CPU0CPU1 preemption timer vmexit handle_preemption_timer(vCPU0) kvm_lapic_expired_hv_timer hv_timer_is_use == true sched_out sched_in

Re: [PATCH v1 08/13] xen/pvcalls: implement sendmsg

2017-07-24 Thread Stefano Stabellini
On Mon, 24 Jul 2017, Juergen Gross wrote: > On 22/07/17 02:11, Stefano Stabellini wrote: > > Send data to an active socket by copying data to the "out" ring. Take > > the active socket out_mutex so that only one function can access the > > ring at any given time. > > > > If not enough room is

Re: [PATCH v1 09/13] xen/pvcalls: implement recvmsg

2017-07-24 Thread Stefano Stabellini
On Mon, 24 Jul 2017, Juergen Gross wrote: > On 22/07/17 02:11, Stefano Stabellini wrote: > > Implement recvmsg by copying data from the "in" ring. If not enough data > > is available and the recvmsg call is blocking, then wait on the > > inflight_conn_req waitqueue. Take the active socket in_mutex

Re: [PATCH v1 08/13] xen/pvcalls: implement sendmsg

2017-07-24 Thread Stefano Stabellini
On Mon, 24 Jul 2017, Juergen Gross wrote: > On 22/07/17 02:11, Stefano Stabellini wrote: > > Send data to an active socket by copying data to the "out" ring. Take > > the active socket out_mutex so that only one function can access the > > ring at any given time. > > > > If not enough room is

Re: [PATCH v1 09/13] xen/pvcalls: implement recvmsg

2017-07-24 Thread Stefano Stabellini
On Mon, 24 Jul 2017, Juergen Gross wrote: > On 22/07/17 02:11, Stefano Stabellini wrote: > > Implement recvmsg by copying data from the "in" ring. If not enough data > > is available and the recvmsg call is blocking, then wait on the > > inflight_conn_req waitqueue. Take the active socket in_mutex

<    1   2   3   4   5   6   7   8   9   10   >