[PATCH v5 9/9] mm/mmu_notifier: set MMU_NOTIFIER_USE_CHANGE_PTE flag where appropriate v2

2019-02-19 Thread jglisse
From: Jérôme Glisse When notifying change for a range use MMU_NOTIFIER_USE_CHANGE_PTE flag for page table update that use set_pte_at_notify() and where the we are going either from read and write to read only with same pfn or read only to read and write with new pfn. Note that set_pte_at_notify(

[PATCH v5 6/9] mm/mmu_notifier: use correct mmu_notifier events for each invalidation

2019-02-19 Thread jglisse
From: Jérôme Glisse This update each existing invalidation to use the correct mmu notifier event that represent what is happening to the CPU page table. See the patch which introduced the events to see the rational behind this. Signed-off-by: Jérôme Glisse Cc: Christian König Cc: Joonas Lahtin

[PATCH v5 7/9] mm/mmu_notifier: pass down vma and reasons why mmu notifier is happening v2

2019-02-19 Thread jglisse
From: Jérôme Glisse CPU page table update can happens for many reasons, not only as a result of a syscall (munmap(), mprotect(), mremap(), madvise(), ...) but also as a result of kernel activities (memory compression, reclaim, migration, ...). Users of mmu notifier API track changes to the CPU p

[PATCH v5 4/9] mm/mmu_notifier: contextual information for event enums

2019-02-19 Thread jglisse
From: Jérôme Glisse CPU page table update can happens for many reasons, not only as a result of a syscall (munmap(), mprotect(), mremap(), madvise(), ...) but also as a result of kernel activities (memory compression, reclaim, migration, ...). This patch introduce a set of enums that can be asso

[PATCH v5 5/9] mm/mmu_notifier: contextual information for event triggering invalidation v2

2019-02-19 Thread jglisse
From: Jérôme Glisse CPU page table update can happens for many reasons, not only as a result of a syscall (munmap(), mprotect(), mremap(), madvise(), ...) but also as a result of kernel activities (memory compression, reclaim, migration, ...). Users of mmu notifier API track changes to the CPU p

[PATCH v5 0/9] mmu notifier provide context informations

2019-02-19 Thread jglisse
From: Jérôme Glisse Since last version [4] i added the extra bits needed for the change_pte optimization (which is a KSM thing). Here i am not posting users of this, they will be posted to the appropriate sub-systems (KVM, GPU, RDMA, ...) once this serie get upstream. If you want to look at users

[PATCH v5 3/9] mm/mmu_notifier: convert mmu_notifier_range->blockable to a flags

2019-02-19 Thread jglisse
From: Jérôme Glisse Use an unsigned field for flags other than blockable and convert the blockable field to be one of those flags. Signed-off-by: Jérôme Glisse Cc: Christian König Cc: Joonas Lahtinen Cc: Jani Nikula Cc: Rodrigo Vivi Cc: Jan Kara Cc: Andrea Arcangeli Cc: Peter Xu Cc: Feli

[PATCH v5 2/9] mm/mmu_notifier: convert user range->blockable to helper function

2019-02-19 Thread jglisse
From: Jérôme Glisse Use the mmu_notifier_range_blockable() helper function instead of directly dereferencing the range->blockable field. This is done to make it easier to change the mmu_notifier range field. This patch is the outcome of the following coccinelle patch: %<

[PATCH v5 1/9] mm/mmu_notifier: helper to test if a range invalidation is blockable

2019-02-19 Thread jglisse
From: Jérôme Glisse Simple helpers to test if range invalidation is blockable. Latter patches use cocinnelle to convert all direct dereference of range-> blockable to use this function instead so that we can convert the blockable field to an unsigned for more flags. Signed-off-by: Jérôme Glisse

[PATCH 1/5] PCI: dwc: Make use of IS_ALIGNED()

2019-02-19 Thread Andrey Smirnov
Make the intent a bit more clear as well as get rid of explicit arithmetic by using IS_ALIGNED() to determine if "addr" is aligned to "size". No functional change intended. Signed-off-by: Andrey Smirnov Acked-by: Gustavo Pimentel Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Fabio Estevam Cc: C

[PATCH 2/5] PCI: dwc: Share code for dw_pcie_rd/wr_other_conf()

2019-02-19 Thread Andrey Smirnov
Default implementation of pcie_rd_other_conf() and dw_pcie_wd_other_conf() share more than 80% of their code. Move shared code into a dedicated subroutine and convert pcie_rd_other_conf() and dw_pcie_wd_other_conf() to use it. No functional change intended. Signed-off-by: Andrey Smirnov Acked-by:

[PATCH 4/5] PCI: dwc: Make use of GENMASK/FIELD_PREP

2019-02-19 Thread Andrey Smirnov
Convert various multi-bit fields to be defined using GENMASK/FIELD_PREP. This way bit field boundaries are defined in a single place only, as well as defined in a way that makes it easier to verify them against reference manual. No functional change intended. Signed-off-by: Andrey Smirnov Acked-b

[PATCH 5/5] PCI: dwc: Remove superfluous shifting in definitions

2019-02-19 Thread Andrey Smirnov
Surrounding definitions no longer use explicit shift, so "<< 0" here serve no purpose. Remove them. No functional change intended. Signed-off-by: Andrey Smirnov Acked-by: Gustavo Pimentel Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Fabio Estevam Cc: Chris Healy Cc: Lucas Stach Cc: Leonard C

[PATCH 3/5] PCI: dwc: Make use of BIT() in constant definitions

2019-02-19 Thread Andrey Smirnov
Avoid using explicit left shifts and convert various definitions to use BIT() instead. No functional change intended. Signed-off-by: Andrey Smirnov Acked-by: Gustavo Pimentel Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Fabio Estevam Cc: Chris Healy Cc: Lucas Stach Cc: Leonard Crestez Cc: "

[PATCH 0/5] DesignWare PCI improvements

2019-02-19 Thread Andrey Smirnov
Everyone: This is the series is a spin-off from [imx6-dwc] containing only small improvements that I made while reading the code and researching commit history of pcie-designware*.c. All changes are optional, so commits that don't seem like an improvement can be easily dropped. Hopefully each patc

Re: [RFC][Patch v8 0/7] KVM: Guest Free Page Hinting

2019-02-19 Thread David Hildenbrand
On 19.02.19 20:58, Michael S. Tsirkin wrote: > On Tue, Feb 19, 2019 at 10:06:35AM -0800, Alexander Duyck wrote: >>> I tend to like an asynchronous reporting approach as discussed in this >>> thread, we would have to see if Nitesh could get it implemented. >> >> I agree it would be great if it could

Re: [PATCH] powerpc/pseries: Fix dn reference error in dlpar_cpu_remove_by_index

2019-02-19 Thread Tyrel Datwyler
On 02/19/2019 07:46 AM, Michael Bringmann wrote: > powerpc/pseries: Fix dn reference error in dlpar_cpu_remove_by_index() > > A reference to the device node of the CPU to be removed is released > upon successful removal of the associated CPU device. If the call > to remove the CPU device fails, d

[PATCH 00/10] perf: Multi-die/package support

2019-02-19 Thread kan . liang
From: Kan Liang Add Linux perf support for multi-die/package. The first product with multi-die is Xeon Cascade Lake-AP (CLX-AP). The code bases on the top of Len's multi-die/package support. https://lkml.org/lkml/2019/2/18/1534 Patch 1-4: They are generic codes for previous platforms. Perf suppo

[PATCH v4 7/8] platform/x86: intel-wmi-thunderbolt: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()

2019-02-19 Thread Mattias Jacobsson
WMI drivers can if they have specified an array of struct wmi_device_id use the MODULE_DEVICE_TABLE() macro to automatically generate the appropriate MODULE_ALIAS() output. Thus avoiding to keep both the array of struct wmi_device_id and the MODULE_ALIAS() declaration(s) in sync. Change driver to

[PATCH 03/10] perf/x86/intel/uncore: Apply "domain" for uncore

2019-02-19 Thread kan . liang
From: Kan Liang The uncore counters are not package scope only anymore. For example, there will be die scope counters on CLX-AP. Apply "domain" for uncore, and make it easy to be extended later. Add domain_type in intel_uncore_type to indicate the domain type of uncore counters. The default is p

[PATCH v4 4/8] platform/x86: dell-wmi-descriptor: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()

2019-02-19 Thread Mattias Jacobsson
WMI drivers can if they have specified an array of struct wmi_device_id use the MODULE_DEVICE_TABLE() macro to automatically generate the appropriate MODULE_ALIAS() output. Thus avoiding to keep both the array of struct wmi_device_id and the MODULE_ALIAS() declaration(s) in sync. Change driver to

[PATCH 05/10] perf/x86/intel/domain: Add new domain type for die

2019-02-19 Thread kan . liang
From: Kan Liang Starts from CLX-AP, some uncore and RAPL counters are die scope. Add a new domain type DIE_DOMAIN for die scope counters. To distinguish different die among package, unique die id is used as domain id. Signed-off-by: Kan Liang --- arch/x86/events/domain.c | 11 +++ ar

[PATCH 01/10] perf/x86/intel: Introduce a concept "domain" as the scope of counters

2019-02-19 Thread kan . liang
From: Kan Liang Perf supports miscellaneous modules, e.g cstate, RAPL and uncore. The counters of these modules have different scope of effect than core. So these modules maintain their own scope information independently. Actually, the scope of counters among these modules are similar. It's very

[PATCH 09/10] perf header: Add die information in cpu topology

2019-02-19 Thread kan . liang
From: Kan Liang With the new CPUID.1F, a new level type of processor topology, 'die', is introduced. The 'die' information in cpu topology should be added in perf header. To be compatible with old perf.data, the patch checks the section size before reading the die information. It never reads dat

[PATCH 10/10] perf stat: Support per-die aggregation

2019-02-19 Thread kan . liang
From: Kan Liang It is useful to aggregate counts per processor die. Introduce a new option "--per-die" to support per-die aggregation. The global id for each core has been changed to socket + die id + core id. The global id for each die is socket + die id. Add die information for per-core aggr

[PATCH 06/10] perf/x86/intel/cstate: Support die scope counters on CLX-AP

2019-02-19 Thread kan . liang
From: Kan Liang CLX-AP has the same PKG Cstate counters as SKX, but they are die scope. Add clx_ap_cstates for CLX-AP. Share the package code with die for now. Signed-off-by: Kan Liang --- arch/x86/events/intel/cstate.c | 27 --- 1 file changed, 24 insertions(+), 3 del

[PATCH 04/10] perf/x86/intel/rapl: Apply "domain" for RAPL

2019-02-19 Thread kan . liang
From: Kan Liang The RAPL counters are not package scope only anymore. For example, there will be die scope RAPL counters on CLX-AP. Apply "domain" for RAPL, and make it easy to be extended later. Each type of domain needs a dedicated rapl_pmus. The struct rapl_pmus is modified accordingly. - Th

[PATCH 08/10] perf/x86/intel/rapl: Support die scope counters on CLX-AP

2019-02-19 Thread kan . liang
From: Kan Liang CLX-AP has the same RAPL counters as SKX, but they are die scope. Add clx_ap_rapl_init for CLX-AP. Add new attr_groups for DIE_DOMAIN. Signed-off-by: Kan Liang --- arch/x86/events/intel/rapl.c | 27 ++- 1 file changed, 26 insertions(+), 1 deletion(-) d

[PATCH 07/10] perf/x86/intel/uncore: Support die scope counters on CLX-AP

2019-02-19 Thread kan . liang
From: Kan Liang CLX-AP has the same uncore counters as SKX, but they are die scope. Add a bool variable to indicate die scope only uncore counters. Signed-off-by: Kan Liang --- arch/x86/events/intel/uncore.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch/x86/events/in

[PATCH v4 8/8] platform/x86: wmi-bmof: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()

2019-02-19 Thread Mattias Jacobsson
WMI drivers can if they have specified an array of struct wmi_device_id use the MODULE_DEVICE_TABLE() macro to automatically generate the appropriate MODULE_ALIAS() output. Thus avoiding to keep both the array of struct wmi_device_id and the MODULE_ALIAS() declaration(s) in sync. Change driver to

[PATCH v4 2/8] platform/x86: wmi: add WMI support to MODULE_DEVICE_TABLE()

2019-02-19 Thread Mattias Jacobsson
The kernel provides the macro MODULE_DEVICE_TABLE() where driver authors can specify their device type and their array of device_ids and thereby trigger the generation of the appropriate MODULE_ALIAS() output. This is opposed to having to specify one MODULE_ALIAS() for each device. The WMI device t

[PATCH 02/10] perf/x86/intel/cstate: Apply "domain" for cstate

2019-02-19 Thread kan . liang
From: Kan Liang There are duplicate codes implemented to support different scopes of counters. Apply the new concept, "domain", for cstate to reduce the redundancy. Add struct cstate_pmus to store the PMU related information. Each available type needs a dedicated cstate_pmus, which is allocated

[PATCH v4 6/8] platform/x86: huawei-wmi: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()

2019-02-19 Thread Mattias Jacobsson
WMI drivers can if they have specified an array of struct wmi_device_id use the MODULE_DEVICE_TABLE() macro to automatically generate the appropriate MODULE_ALIAS() output. Thus avoiding to keep both the array of struct wmi_device_id and the MODULE_ALIAS() declaration(s) in sync. Change driver to

[PATCH v4 3/8] platform/x86: dell-smbios-wmi: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()

2019-02-19 Thread Mattias Jacobsson
WMI drivers can if they have specified an array of struct wmi_device_id use the MODULE_DEVICE_TABLE() macro to automatically generate the appropriate MODULE_ALIAS() output. Thus avoiding to keep both the array of struct wmi_device_id and the MODULE_ALIAS() declaration(s) in sync. Change driver to

[PATCH v4 5/8] platform/x86: dell-wmi: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()

2019-02-19 Thread Mattias Jacobsson
WMI drivers can if they have specified an array of struct wmi_device_id use the MODULE_DEVICE_TABLE() macro to automatically generate the appropriate MODULE_ALIAS() output. Thus avoiding to keep both the array of struct wmi_device_id and the MODULE_ALIAS() declaration(s) in sync. Change driver to

[PATCH v4 1/8] platform/x86: wmi: move struct wmi_device_id to mod_devicetable.h

2019-02-19 Thread Mattias Jacobsson
In preparation for adding WMI support to MODULE_DEVICE_TABLE() move the definition of struct wmi_device_id to mod_devicetable.h and inline guid_string in the struct. Changing guid_string to an inline char array changes the loop conditions when looping over an array of struct wmi_device_id. Therefo

[PATCH v4 0/8] platform/x86: wmi: add WMI support to

2019-02-19 Thread Mattias Jacobsson
The kernel provides the macro MODULE_DEVICE_TABLE() which can help driver authors to generate the appropriate MODULE_ALIAS() output. The WMI device type is currently not supported by MODULE_DEVICE_TABLE(). While using MODULE_DEVICE_TABLE() does increase the complexity as well as spreading out the

Re: [PATCH] ARM: mvebu: kirkwood: remove error message when retrieving mac address

2019-02-19 Thread Chris Packham
On 20/02/19 4:14 AM, Gregory CLEMENT wrote: > Hi Chris, > > On lun., févr. 18 2019, Chris Packham > wrote: > >> Kirkwood has always had the ability to retrieve the local-mac-address >> from the hardware (usually this was configured by the bootloader). This >> is particularly useful when dea

Re: [RFC][Patch v8 0/7] KVM: Guest Free Page Hinting

2019-02-19 Thread Michael S. Tsirkin
On Tue, Feb 19, 2019 at 10:06:35AM -0800, Alexander Duyck wrote: > > I tend to like an asynchronous reporting approach as discussed in this > > thread, we would have to see if Nitesh could get it implemented. > > I agree it would be great if it could work. However I have concerns > given that work

Re: [PATCH] drivers: spi: core: Add optional stall delay between cs_change transfers

2019-02-19 Thread Geert Uytterhoeven
Hi Stefan, Thanks for your patch! On Tue, Feb 19, 2019 at 6:02 PM Stefan Popa wrote: > From: Michael Hennerich > > Some devices like the ADIS16460 IMU require a stall period between > transfers. This is not just about the period between transfers (which is handled by delay_usecs), but about th

Re: [PATCH 2/3] media: vicodec: avoic clang frame size warning

2019-02-19 Thread Hans Verkuil
On 2/19/19 6:01 PM, Arnd Bergmann wrote: > Clang-9 makes some different inlining decisions compared to gcc, which > leads to a warning about a possible stack overflow problem when building > with CONFIG_KASAN, including when setting asan-stack=0, which avoids > most other frame overflow warnings: >

Re: [PATCH] drm/amd/powerplay/smu10_hwmgr: use struct_size() in kzalloc()

2019-02-19 Thread Alex Deucher
On Tue, Feb 19, 2019 at 1:55 PM Gustavo A. R. Silva wrote: > > One of the more common cases of allocation size calculations is finding > the size of a structure that has a zero-sized array at the end, along > with memory for some number of elements for that array. For example: > > struct foo { >

Re: [PATCH v3 2/9] s390: ap: kvm: setting a hook for PQAP instructions

2019-02-19 Thread Pierre Morel
On 18/02/2019 23:42, Cornelia Huck wrote: On Mon, 18 Feb 2019 19:29:10 +0100 Pierre Morel wrote: On 15/02/2019 23:02, Tony Krowiak wrote: On 2/14/19 8:51 AM, Pierre Morel wrote: +/* + * handle_pqap: Handling pqap interception + * @vcpu: the vcpu having issue the pqap instruction + * + * Th

Re: [PATCH v2 00/20] i.MX6, DesignWare PCI improvements

2019-02-19 Thread Andrey Smirnov
On Tue, Feb 19, 2019 at 4:22 AM Lorenzo Pieralisi wrote: > > On Thu, Feb 14, 2019 at 04:59:04PM -0800, Andrey Smirnov wrote: > > [...] > > > Lorenzo, can you apply the dwc specific patches that are already > > reviewed by Gustavo Pimentel from this series, to keep things moving > > while we are wa

Re: [PATCH v2 15/20] vmalloc: New flags for safe vfree on special perms

2019-02-19 Thread Edgecombe, Rick P
Thanks Boris. Ard, Will: An arm question came up below. Any thoughts? On Tue, 2019-02-19 at 13:48 +0100, Borislav Petkov wrote: > On Mon, Jan 28, 2019 at 04:34:17PM -0800, Rick Edgecombe wrote: > > This adds a new flags VM_HAS_SPECIAL_PERMS, for enabling vfree operations > > s/This adds/add/ - y

Re: [PATCH v3 8/9] s390: ap: Cleanup on removing the AP device

2019-02-19 Thread Pierre Morel
On 16/02/2019 00:36, Tony Krowiak wrote: On 2/14/19 8:51 AM, Pierre Morel wrote: When the device is remove, we must make sure to clear the interruption and reset the AP device. ...snip... @@ -74,6 +159,13 @@ static void vfio_ap_queue_dev_remove(struct ap_device *apdev)   struct vfio_ap_

Re: [PATCH 0/2] perf evsel: add support for inlined function in callchains

2019-02-19 Thread Arnaldo Carvalho de Melo
Em Tue, Feb 19, 2019 at 07:38:08PM +0100, Jonas Rabenstein escreveu: > Hi, > sample__fprintf_callchain currently did not use the already available > code to get the symbols of an inlined function if such information is > available in a dso. This patchset adds the required logic to add > appropriate

Re: [PATCH 05/11] x86 topology: export die_siblings

2019-02-19 Thread Liang, Kan
On 2/19/2019 1:43 PM, Brown, Len wrote: Thanks for the comments, Kan, diff --git a/Documentation/cputopology.txt b/Documentation/cputopology.txt index 287213b4517b..7dd2ae3df233 100644 --- a/Documentation/cputopology.txt +++ b/Documentation/cputopology.txt @@ -56,6 +56,16 @@ core_siblings_li

Re: [PATCH] i2c: Allow recovery of the initial IRQ by an I2C client device.

2019-02-19 Thread Jim Broadus
Apologies.. This should have been marked v2. On Tue, Feb 19, 2019 at 11:30 AM Jim Broadus wrote: > > A previous change allowed I2C client devices to discover new IRQs upon > reprobe by clearing the IRQ in i2c_device_remove. However, if an IRQ was > assigned in i2c_new_device, that information is

[PATCH] i2c: Allow recovery of the initial IRQ by an I2C client device.

2019-02-19 Thread Jim Broadus
A previous change allowed I2C client devices to discover new IRQs upon reprobe by clearing the IRQ in i2c_device_remove. However, if an IRQ was assigned in i2c_new_device, that information is lost. For example, the touchscreen and trackpad devices on a Dell Inspiron laptop are I2C devices whose IR

Re: [PATCH v3 8/9] s390: ap: Cleanup on removing the AP device

2019-02-19 Thread Pierre Morel
On 16/02/2019 00:29, Tony Krowiak wrote: On 2/14/19 8:51 AM, Pierre Morel wrote: When the device is remove, we must make sure to clear the interruption and reset the AP device. We also need to clear the CRYCB of the guest. Signed-off-by: Pierre Morel ---   drivers/s390/crypto/vfio_ap_drv.c   

RE: [PATCH 03/11] x86 topology: Add CPUID.1F multi-die/package support

2019-02-19 Thread Brown, Len
>> @@ -461,7 +463,7 @@ static bool match_llc(struct cpuinfo_x86 *c, struct >> cpuinfo_x86 *o) >>*/ >> static bool match_die(struct cpuinfo_x86 *c, struct cpuinfo_x86 *o) >> { >> -if (c->>phys_proc_id == o->>phys_proc_id) >> +if (c->>cpu_die_id == o->>cpu_die_id) >> ret

Re: [PATCH v3 7/9] s390: ap: implement PAPQ AQIC interception in kernel

2019-02-19 Thread Pierre Morel
On 16/02/2019 00:11, Tony Krowiak wrote: On 2/14/19 8:51 AM, Pierre Morel wrote: We register the AP PQAP instruction hook during the open of the mediated device. And unregister it on release. In the AP PQAP instruction hook, if we receive a demand to enable IRQs, - we retrieve the vfio_ap_queue

Re: [PATCH 2/3] media: vicodec: avoic clang frame size warning

2019-02-19 Thread Arnd Bergmann
On Tue, Feb 19, 2019 at 8:02 PM Nick Desaulniers wrote: > On Tue, Feb 19, 2019 at 9:02 AM Arnd Bergmann wrote: > > > > Clang-9 makes some different inlining decisions compared to gcc, which > > leads to a warning about a possible stack overflow problem when building > > with CONFIG_KASAN, includi

[PATCH] pinctrl: qcom: spmi-gpio: Reorder debug print

2019-02-19 Thread Bjorn Andersson
It's reasonable to expect that people turn to the "gpio" debugfs file to first and foremost learn about the direction and value of a gpio, and second to that about it's pinconf. So reorder the value so each line reads: gpioN: direction value ... This also makes it consistent with the TLMM pinctrl

[PATCH v3 2/2] iommu/vt-d: Enable ATS only if the device uses page aligned address.

2019-02-19 Thread sathyanarayanan . kuppuswamy
From: Kuppuswamy Sathyanarayanan As per Intel vt-d specification, Rev 3.0 (section 7.5.1.1, title "Page Request Descriptor"), Intel IOMMU page request descriptor only uses bits[63:12] of the page address. Hence Intel IOMMU driver would only permit devices that advertise they would only send Page

[PATCH v3 0/2] Add page alignment check in Intel IOMMU.

2019-02-19 Thread sathyanarayanan . kuppuswamy
From: Kuppuswamy Sathyanarayanan As per Intel vt-d specification, Rev 3.0 (section 7.5.1.1, title "Page Request Descriptor"), Intel IOMMU page request descriptor only uses bits[63:12] of the Page Address. Hence its required to enforce that the device will only send page request with page-aligned

[PATCH v3 1/2] PCI/ATS: Add pci_ats_page_aligned() interface

2019-02-19 Thread sathyanarayanan . kuppuswamy
From: Kuppuswamy Sathyanarayanan Return the Page Aligned Request bit in the ATS Capability Register. As per PCIe spec r4.0, sec 10.5.1.2, if the Page Aligned Request bit is set, it indicates the Untranslated Addresses generated by the device are always aligned to a 4096 byte boundary. An IOMMU

[PATCH v3 2/2] iommu/vt-d: Fix PRI/PASID dependency issue.

2019-02-19 Thread sathyanarayanan . kuppuswamy
From: Kuppuswamy Sathyanarayanan In Intel IOMMU, if the Page Request Queue (PRQ) is full, it will automatically respond to the device with a success message as a keep alive. And when sending the success message, IOMMU will include PASID in the Response Message when the Page Request has a PASID in

[PATCH v3 1/2] PCI/ATS: Add pci_prg_resp_pasid_required() interface.

2019-02-19 Thread sathyanarayanan . kuppuswamy
From: Kuppuswamy Sathyanarayanan Return the PRG Response PASID Required bit in the Page Request Status Register. As per PCIe spec r4.0, sec 10.5.2.3, if this bit is Set, the device expects a PASID TLP Prefix on PRG Response Messages when the corresponding Page Requests had a PASID TLP Prefix. If

Re: [PATCH RESEND 0/3] Add quirk for reading BD_ADDR from fwnode property

2019-02-19 Thread Matthias Kaehlcke
Hi Marcel, On Mon, Feb 18, 2019 at 11:48:21AM +0100, Marcel Holtmann wrote: > Hi Matthias, > > > [initial post: https://lore.kernel.org/patchwork/cover/1028184/] > > > > On some systems the Bluetooth Device Address (BD_ADDR) isn't stored > > on the Bluetooth chip itself. One way to configure the

[PATCH v3 0/2] Add PGR response PASID requirement check in Intel IOMMU.

2019-02-19 Thread sathyanarayanan . kuppuswamy
From: Kuppuswamy Sathyanarayanan Intel IOMMU responds automatically when receiving page-requests from a PCIe endpoint and the page-request queue is full and it cannot accept any more page-requests. When it auto-responds to page-requests with a success to the endpoint, it automatically responds wi

Re: [PATCH] iwlwifi: mvm: Use div64_s64 instead of do_div in iwl_mvm_debug_range_resp

2019-02-19 Thread Nick Desaulniers
On Tue, Feb 19, 2019 at 10:21 AM Nathan Chancellor wrote: > > Clang warns: > > drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c:465:2: warning: > comparison of distinct pointer types ('typeof ((rtt_avg)) *' (aka 'long > long *') and 'uint64_t *' (aka 'unsigned long long *')) > [-Wcompare-dis

Re: [PATCH 1/2 v2] kprobe: Do not use uaccess functions to access kernel memory that can fault

2019-02-19 Thread Steven Rostedt
On Tue, 19 Feb 2019 10:43:36 -0800 Linus Torvalds wrote: > On Tue, Feb 19, 2019 at 8:18 AM Steven Rostedt wrote: > > > > > So it would be good to not just say "user or kernel", but actually say > > > what *kind* of kernel access it expects. > > > > Note, kprobes are a different kind of beast

Re: [PATCH v3 6/9] vfio: ap: register IOMMU VFIO notifier

2019-02-19 Thread Pierre Morel
On 19/02/2019 10:59, Halil Pasic wrote: On Fri, 15 Feb 2019 17:55:35 -0500 Tony Krowiak wrote: On 2/14/19 8:51 AM, Pierre Morel wrote: To be able to use the VFIO interface to facilitate the mediated device memory pining/unpining we need to register a notifier for IOMMU. Signed-off-by: Pierre

Re: [PATCH 2/3] media: vicodec: avoic clang frame size warning

2019-02-19 Thread Nick Desaulniers
On Tue, Feb 19, 2019 at 9:02 AM Arnd Bergmann wrote: > > Clang-9 makes some different inlining decisions compared to gcc, which > leads to a warning about a possible stack overflow problem when building > with CONFIG_KASAN, including when setting asan-stack=0, which avoids > most other frame overf

Re: [PATCH] ASoC: fsl_spdif: fix sysclk_df type

2019-02-19 Thread Nicolin Chen
On Mon, Feb 18, 2019 at 03:25:00PM +, Viorel Suman wrote: > According to RM SPDIF STC SYSCLK_DF field is 9-bit wide, values > being in 0..511 range. Use a proper type to handle sysclk_df. > > Signed-off-by: Viorel Suman Acked-by: Nicolin Chen > --- > sound/soc/fsl/fsl_spdif.c | 10 ++-

Re: [PATCH (resend)] Input: uinput - Set name/phys to NULL before kfree().

2019-02-19 Thread Dmitry Torokhov
On Mon, Feb 18, 2019 at 07:10:23PM +0900, Tetsuo Handa wrote: > Thank you for responding. > > On 2019/02/18 6:07, Dmitry Torokhov wrote: > > The commit tries to send final uevent for objects for which "add" uevent > > has been sent, but not "remove" event. However in uinput (and general > > input

[PATCH 1/2] EDAC, altera: Add separate SDRAM EDAC config

2019-02-19 Thread thor . thayer
From: Thor Thayer The CONFIG_ALTERA_EDAC flag always enables the SDRAM EDAC. On the newer architectures, there are cases where the peripheral EDACs are enabled but SDRAM needs to be disabled. This change moves SDRAM functions so they can be contained inside the conditional CONFIG. Create new CONF

[PATCH 2/2] ARM: socfpga_defconfig: enable EDAC by default

2019-02-19 Thread thor . thayer
From: Thor Thayer Enable the different ECC blocks by default on Cyclone5 and Arria10. Signed-off-by: Thor Thayer --- arch/arm/configs/socfpga_defconfig | 36 ++-- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/arch/arm/configs/socfpga_defconfig

[PATCH 0/2] Distinct SOCFPGA SDRAM EDAC config

2019-02-19 Thread thor . thayer
From: Thor Thayer Most users want EDAC support so make it the default. SOCFPGA SDRAM EDAC reporting was enabled by the parent EDAC config (CONFIG_ALTERA_EDAC) since initial customers always wanted SDRAM EDAC enabled. There are cases where the SDRAM needs to be disabled while the other block EDAC

Re: [PATCH] input : avoid too late kobject_uevent(KOBJ_REMOVE) call

2019-02-19 Thread Dmitry Torokhov
Hi Tetsuo, On Mon, Feb 18, 2019 at 07:09:23PM +0900, Tetsuo Handa wrote: > syzbot is hitting use-after-free bug in uinput module [1]. This is because > kobject_uevent(KOBJ_REMOVE) is called again due to commit 0f4dafc0563c6c49 > ("Kobject: auto-cleanup on final unref") after memory allocation faul

Re: [PATCH] ASoC: fsl_spdif: fix TXCLK_DF mask

2019-02-19 Thread Nicolin Chen
On Mon, Feb 18, 2019 at 02:12:17PM +, Viorel Suman wrote: > According to RM SPDIF TXCLK_DF mask is 7-bit wide. > > Signed-off-by: Viorel Suman Acked-by: Nicolin Chen > --- > sound/soc/fsl/fsl_spdif.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sound/soc/fsl/f

[PATCH] drm/amd/powerplay/smu10_hwmgr: use struct_size() in kzalloc()

2019-02-19 Thread Gustavo A. R. Silva
One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct foo { int stuff; struct boo entry[]; }; size = sizeof(struct foo) + cou

Re: [PATCH v2 1/1] s390: vfio_ap: link the vfio_ap devices to the vfio_ap bus subsystem

2019-02-19 Thread Tony Krowiak
On 2/18/19 1:08 PM, Pierre Morel wrote: Libudev relies on having a subsystem link for non-root devices. To avoid libudev (and potentially other userspace tools) choking on the matrix device let us introduce a vfio_ap bus and with that the vfio_ap bus subsytem, and make the matrix device reside wi

Re: [PATCH] hwrng: bcm2835 - fix probe as platform device

2019-02-19 Thread Florian Fainelli
On 2/19/19 4:16 AM, Jonas Gorski wrote: > BCM63XX (MIPS) does not use device tree, so there cannot be any > of_device_id, causing the driver to fail on probe: > > [0.904564] bcm2835-rng: probe of bcm63xx-rng failed with error -22 > > Fix this by checking for match data only if we are probing

[GIT PULL] ARM: dts: exynos: Second pull for v5.1

2019-02-19 Thread Krzysztof Kozlowski
Hi, On top of previous pull request. Best regards, Krzysztof The following changes since commit ec33745bccc8f336957c751f4153421cc9ef5a54: ARM: dts: exynos: Fix pinctrl definition for eMMC RTSN line on Odroid X2/U3 (2019-01-25 20:18:10 +0100) are available in the Git repository at: https

Re: [PATCH v3 6/9] vfio: ap: register IOMMU VFIO notifier

2019-02-19 Thread Pierre Morel
On 15/02/2019 23:55, Tony Krowiak wrote: On 2/14/19 8:51 AM, Pierre Morel wrote: To be able to use the VFIO interface to facilitate the mediated device memory pining/unpining we need to register a notifier for IOMMU. Signed-off-by: Pierre Morel ---   drivers/s390/crypto/vfio_ap_ops.c | 64

[PATCH] drm/msm: Remove pm_runtime calls from msm_iommu.c

2019-02-19 Thread Jordan Crouse
Currently the IOMMU code calls pm_runtime_get/put on the GPU or display device before doing a IOMMU operation. This was because usually the IOMMU driver didn't do power control of its own and since the hardware used the same clocks and power as the respective multimedia device it was a easy way to

Re: [PATCH] s390/setup: fix early warning messages

2019-02-19 Thread Guenter Roeck
Hi Cornelia, On 2/18/19 2:30 PM, Cornelia Huck wrote: What is your qemu command line ? Ignoring any additional devices: s390x-softmmu/qemu-system-s390x -M s390-ccw-virtio,accel=tcg -cpu max -m 1024 -nographic -device virtio-scsi-ccw,id=scsi0,devno=fe.0.0001 -drive file=/home/cohuck/vm-ima

Re: [PATCH] s390/setup: fix early warning messages

2019-02-19 Thread Guenter Roeck
On Mon, Feb 18, 2019 at 06:21:06PM +0100, Martin Schwidefsky wrote: > On Mon, 18 Feb 2019 18:01:46 +0100 > Martin Schwidefsky wrote: > > > On Mon, 18 Feb 2019 07:46:40 -0800 > > Guenter Roeck wrote: > > > > > Hi, > > > > > > On Thu, Feb 14, 2019 at 03:40:56PM +0100, Martin Schwidefsky wrote:

Re: [PATCH 1/2 v2] kprobe: Do not use uaccess functions to access kernel memory that can fault

2019-02-19 Thread Linus Torvalds
On Tue, Feb 19, 2019 at 8:18 AM Steven Rostedt wrote: > > > So it would be good to not just say "user or kernel", but actually say > > what *kind* of kernel access it expects. > > Note, kprobes are a different kind of beast. I've used kprobes to probe > userspace information as well as kernel. Hec

RE: [PATCH 05/11] x86 topology: export die_siblings

2019-02-19 Thread Brown, Len
Thanks for the comments, Kan, >> diff --git a/Documentation/cputopology.txt >> b/Documentation/cputopology.txt index 287213b4517b..7dd2ae3df233 >> 100644 >> --- a/Documentation/cputopology.txt >> +++ b/Documentation/cputopology.txt >> @@ -56,6 +56,16 @@ core_siblings_list: >> human-readable

Re: [PATCH 4.20 71/92] Revert "mm: slowly shrink slabs with a relatively small number of objects"

2019-02-19 Thread Wolfgang Walter
Am Montag, 18. Februar 2019, 14:34:52 schrieb Sasha Levin: > On Mon, Feb 18, 2019 at 10:30:44AM -0500, Rik van Riel wrote: > >On Mon, 2019-02-18 at 14:43 +0100, Greg Kroah-Hartman wrote: > >> 4.20-stable review patch. If anyone has any objections, please let > >> me know. > >> > >> --

[PATCH] drm/amd/powerplay/smu8_hwmgr: use struct_size() in kzalloc()

2019-02-19 Thread Gustavo A. R. Silva
One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct foo { int stuff; struct boo entry[]; }; size = sizeof(struct foo) + cou

Re: [PATCH 1/3] media: saa7146: avoid high stack usage with clang

2019-02-19 Thread Nick Desaulniers
On Tue, Feb 19, 2019 at 9:02 AM Arnd Bergmann wrote: > > Two saa7146/hexium files contain a construct that causes a warning > when built with clang: > > drivers/media/pci/saa7146/hexium_orion.c:210:12: error: stack frame size of > 2272 bytes in function 'hexium_probe' > [-Werror,-Wframe-lar

[PATCH RESEND] drm/msm: Truncate the buffer object name if the copy from user failed

2019-02-19 Thread Jordan Crouse
(Resend since there was a compile error that I forgot to commit before sending) If there is a error while doing a copy_from_user() for MSM_INFO_SET_NAME make sure to truncate the object name so that there isn't a chance that we'll have random data in the string. This is on top of [1] reported and

Re: [RFC][PATCH 0/3] arm64 relaxed ABI

2019-02-19 Thread Szabolcs Nagy
On 12/02/2019 18:02, Catalin Marinas wrote: > On Mon, Feb 11, 2019 at 12:32:55PM -0800, Evgenii Stepanov wrote: >> On Mon, Feb 11, 2019 at 9:28 AM Kevin Brodsky wrote: >>> On 19/12/2018 12:52, Dave Martin wrote: Really, the kernel should do the expected thing with all "non-weird" memory.

[PATCH 0/2] perf evsel: add support for inlined function in callchains

2019-02-19 Thread Jonas Rabenstein
Hi, sample__fprintf_callchain currently did not use the already available code to get the symbols of an inlined function if such information is available in a dso. This patchset adds the required logic to add appropriate lines. As I am quite new to the code base of perf I am not sure how to test t

[PATCH 1/2] perf evsel: split sample__fprintf_callchain in output and iteration

2019-02-19 Thread Jonas Rabenstein
Split the iteration over the callchain and the actual output of an link in the callchain into separate functions. This allows to reuse the output function in a follow up patch to add inline symbols to the output. Signed-off-by: Jonas Rabenstein --- tools/perf/util/evsel_fprintf.c | 111 +

[PATCH 2/2] perf evsel: add inline functions to sample callchain output

2019-02-19 Thread Jonas Rabenstein
Whenever a callchain shall be printed search for each address whether inline information is available and add those symbols to the output if symbol_conf.inline_name is enabled. Signed-off-by: Jonas Rabenstein --- tools/perf/util/evsel_fprintf.c | 46 + 1 file chan

[PATCH] drm/msm: Truncate the buffer object name if the copy from user failed

2019-02-19 Thread Jordan Crouse
If there is a error while doing a copy_from_user() for MSM_INFO_SET_NAME make sure to truncate the object name so that there isn't a chance that we'll have random data in the string. This is on top of [1] reported and fixed by Dan Carpenter. [1] https://patchwork.freedesktop.org/series/56656/ Fi

Re: [RFC][Patch v8 0/7] KVM: Guest Free Page Hinting

2019-02-19 Thread David Hildenbrand
>>> This essentially just ends up being another trade-off of CPU versus >>> memory though. Assuming we aren't using THP we are going to take a >>> penalty in terms of performance but could then free individual pages >>> less than HUGETLB_PAGE_ORDER, but the CPU utilization is going to be >>> much h

AQQQ

2019-02-19 Thread Iddo Hackenburg
Dear Friend, This is a personal e-mail directed to you, and I request that it's been treated as such. I would like to thank you for giving this opportunity a chance by welcoming my individual business that i brought to your way. And the details should be given to you when confirm the arrival of t

[PATCH] Hold back_lock when calling iscsi_complete_task

2019-02-19 Thread Lee Duncan
From: Lee Duncan If there is an error queueing an iscsi command in iscsi_queuecommand(), for example if the transport fails to take the command in sessuin->tt->xmit_task(), then the error path can call iscsi_complete_task() without first aquiring the back_lock as required. This can lead to things

Re: [PATCH -next] mm: fix set but not used warning

2019-02-19 Thread Kani, Toshi
On Mon, 2019-02-18 at 13:57 +, YueHaibing wrote: > Fixes gcc '-Wunused-but-set-variable' warning: > > lib/ioremap.c: In function 'ioremap_page_range': > lib/ioremap.c:203:16: warning: > variable 'start' set but not used [-Wunused-but-set-variable] > > flush_cache_vmap may no need param, so a

[PATCH] iwlwifi: mvm: Use div64_s64 instead of do_div in iwl_mvm_debug_range_resp

2019-02-19 Thread Nathan Chancellor
Clang warns: drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c:465:2: warning: comparison of distinct pointer types ('typeof ((rtt_avg)) *' (aka 'long long *') and 'uint64_t *' (aka 'unsigned long long *')) [-Wcompare-distinct-pointer-types] do_div(rtt_avg, ); ^~~~

Re: linux-next: build failure after merge of the kvm tree

2019-02-19 Thread Paolo Bonzini
On 19/02/19 16:36, Sean Christopherson wrote: > On Mon, Feb 18, 2019 at 02:42:00PM +1100, Stephen Rothwell wrote: >> Hi all, > > ... > >> Caused by commits >> >> 1561fcbc8e16 ("KVM: x86: Explicitly #define the VCPU_REGS_* indices") >> a46e726511f4 ("KVM: VMX: Move vCPU-run code to a proper as

Re: [PATCH mmotm] mm: ksm: do not block on page lock when searching stable tree fix

2019-02-19 Thread Yang Shi
On 2/18/19 9:26 PM, Hugh Dickins wrote: I hit the kernel BUG at mm/ksm.c:809! quite easily under KSM swapping load. That's the BUG_ON(age > 1) in remove_rmap_item_from_tree(). There is a comment above it, but explaining in more detail: KSM saves effort by not fully maintaining the unstable t

Re: [RFC][Patch v8 0/7] KVM: Guest Free Page Hinting

2019-02-19 Thread Alexander Duyck
On Mon, Feb 18, 2019 at 11:55 PM David Hildenbrand wrote: > > On 19.02.19 01:01, Alexander Duyck wrote: > > On Mon, Feb 18, 2019 at 1:04 PM David Hildenbrand wrote: > >> > >> On 18.02.19 21:40, Nitesh Narayan Lal wrote: > >>> On 2/18/19 3:31 PM, Michael S. Tsirkin wrote: > On Mon, Feb 18, 20

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