Re: [PATCH 09/13] KVM: x86: save/load state on SMM switch

2015-05-12 Thread Paolo Bonzini
On 13/05/2015 01:56, Bandan Das wrote: > I think it's ok just to replace the offset number with a name. > If you are concerned about readability, we could probably wrap the > "for loops" in the math calculations with a more serious sounding macro > eg. "#define foreach_smm_offset(val, start_offse

[RFT PATCH 2/8] clk: ti: clk-2xxx: Prevent possible ERR_PTR dereference

2015-05-12 Thread Krzysztof Kozlowski
Provide a wrapper to prevent possible ERR_PTR dereference by clk_get_rate(). The return value of clk_get_sys() was immediately used in clk_get_rate(). The first one may return ERR_PTR and the latter only checks if supplied argument is non-NULL. Signed-off-by: Krzysztof Kozlowski --- drivers/clk

[RFT PATCH 6/8] clk: ti: clk-43xx: Prevent possible ERR_PTR dereference

2015-05-12 Thread Krzysztof Kozlowski
The return value of clk_get_sys() was immediately used in clk_set_parent() and clk_set_rate(). The first one may return ERR_PTR and the latter only checks if supplied argument is non-NULL. Signed-off-by: Krzysztof Kozlowski --- drivers/clk/ti/clk-44xx.c | 16 1 file changed, 12

[RFT PATCH 3/8] clk: ti: clk-3xxx: Prevent possible ERR_PTR dereference

2015-05-12 Thread Krzysztof Kozlowski
Provide a wrapper to prevent possible ERR_PTR dereference by clk_get_rate(). The return value of clk_get_sys() was immediately used in clk_get_rate(). The first one may return ERR_PTR and the latter only checks if supplied argument is non-NULL. Signed-off-by: Krzysztof Kozlowski --- drivers/clk

[RFT PATCH 4/8] clk: ti: clk-33xx: Prevent possible ERR_PTR dereference

2015-05-12 Thread Krzysztof Kozlowski
The return value of clk_get_sys() was immediately used in clk_set_parent(). The first one may return ERR_PTR and the latter only checks if supplied argument is non-NULL. Signed-off-by: Krzysztof Kozlowski --- drivers/clk/ti/clk-33xx.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-

[RFT PATCH 7/8] clk: ti: clk-54xx: Prevent possible ERR_PTR dereference

2015-05-12 Thread Krzysztof Kozlowski
The return value of clk_get_sys() was immediately used in clk_set_parent() and clk_set_rate(). The first one may return ERR_PTR and the latter only checks if supplied argument is non-NULL. Signed-off-by: Krzysztof Kozlowski --- drivers/clk/ti/clk-54xx.c | 47 -

[RFT PATCH 8/8] clk: ti: clk-7xx: Prevent possible ERR_PTR dereference

2015-05-12 Thread Krzysztof Kozlowski
The return value of clk_get_sys() was immediately used in clk_set_parent() and clk_set_rate(). The first one may return ERR_PTR and the latter only checks if supplied argument is non-NULL. Signed-off-by: Krzysztof Kozlowski --- drivers/clk/ti/clk-7xx.c | 50 --

linux-next: build failure after merge of the gpio tree

2015-05-12 Thread Stephen Rothwell
' dln2->gpio.exported = true; ^ Caused by commit 6a4b6b0a3b55 ("gpio: sysfs: clean up chip class-device handling"). I have used the gpio tree from next-20150512 for today. -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpMxOmfERf4V.pgp Description: OpenPGP digital signature

[RFT PATCH 5/8] clk: ti: clk-43xx: Prevent possible ERR_PTR dereference

2015-05-12 Thread Krzysztof Kozlowski
The return value of clk_get_sys() was immediately used in clk_set_parent(). The first one may return ERR_PTR and the latter only checks if supplied argument is non-NULL. Signed-off-by: Krzysztof Kozlowski --- drivers/clk/ti/clk-43xx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[RFT PATCH 1/8] clk: ti: dra7-atl-clock: Fix possible ERR_PTR dereference

2015-05-12 Thread Krzysztof Kozlowski
of_clk_get_from_provider() returns ERR_PTR on failure. The dra7-atl-clock driver was not checking its return value and immediately used it in __clk_get_hw(). __clk_get_hw() dereferences supplied clock, if it is not NULL, so in that case it would dereference an ERR_PTR. Signed-off-by: Krzysztof Ko

[RFT PATCH 0/8] clk: ti: Fix possible ERR_PTR dereferences from clk_get_sys

2015-05-12 Thread Krzysztof Kozlowski
Hi, clk_get_sys() may return ERR_PTR but the drivers immediately dereferenced the return value. This could lead to oops. I tried only to fix possible ERR_PTR dereference and to not change the logic. This is why some of the patches look quite complex. For example in clk-7xx driver proceeds to nex

[PATCH v3 01/10] KVM: MMU: fix decoding cache type from MTRR

2015-05-12 Thread Xiao Guangrong
There are some bugs in current get_mtrr_type(); 1: bit 1 of mtrr_state->enabled is corresponding bit 11 of IA32_MTRR_DEF_TYPE MSR which completely control MTRR's enablement that means other bits are ignored if it is cleared 2: the fixed MTRR ranges are controlled by bit 0 of mtrr_state->e

[PATCH v3 02/10] KVM: MMU: introduce for_each_rmap_spte()

2015-05-12 Thread Xiao Guangrong
It's used to walk all the sptes on the rmap to clean up the code Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c | 53 arch/x86/kvm/mmu_audit.c | 4 +--- 2 files changed, 19 insertions(+), 38 deletions(-) diff --git a/arch/x86/kvm/mmu

[PATCH v3 03/10] KVM: MMU: introduce PT_MAX_HUGEPAGE_LEVEL

2015-05-12 Thread Xiao Guangrong
It's used to clean up the code. Thanks for Paolo Bonzini's suggestion Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c | 24 +--- arch/x86/kvm/mmu.h | 1 + 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index afc8

[PATCH v3 06/10] KVM: MMU: use slot_handle_level and its helper to clean up the code

2015-05-12 Thread Xiao Guangrong
slot_handle_level and its helper functions are ready now, use them to clean up the code Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c | 128 +++-- 1 file changed, 16 insertions(+), 112 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86

[PATCH v3 00/10] KVM: MTRR fixes and some cleanups

2015-05-12 Thread Xiao Guangrong
Changelog in v3: thanks for Paolo's comment: - do not apply for_each_rmap_spte to kvm_zap_rmapp and kvm_mmu_unlink_parents - fix a cosmetic issue in slot_handle_level_range - introduce PT_MAX_HUGEPAGE_LEVEL to clean up the code - improve code Indentation Changelog in v2: - fix the bit description

[PATCH v3 08/10] KVM: MMU: introduce kvm_zap_gfn_range

2015-05-12 Thread Xiao Guangrong
It is used to zap all the rmaps of the specified gfn range and will be used by the later patch Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c | 24 arch/x86/kvm/mmu.h | 1 + 2 files changed, 25 insertions(+) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c in

Re: [PATCH 03/18] f2fs crypto: declare some definitions for f2fs encryption feature

2015-05-12 Thread Jaegeuk Kim
On Wed, May 13, 2015 at 12:02:08PM +1000, Dave Chinner wrote: > On Fri, May 08, 2015 at 09:20:38PM -0700, Jaegeuk Kim wrote: > > This definitions will be used by inode and superblock for encyption. > > How much of this crypto stuff is common with or only slightly > modified from the ext4 code? Is

Re: [PATCH 01/12] target: Convert se_node_acl->device_list[] to RCU hlist

2015-05-12 Thread Christoph Hellwig
On Tue, May 12, 2015 at 11:20:12PM -0700, Nicholas A. Bellinger wrote: > Ugh, yes. Fixing up clear_lun_from_tpg + free_device_list_for_node to > use a common caller acquiring se_node_acl->lun_entry_mutex during > se_dev_entry release. > > Fixing up target_fabric_mappedlun_unlink() as well. Good

[PATCH v3 07/10] KVM: MMU: introduce kvm_zap_rmapp

2015-05-12 Thread Xiao Guangrong
Split kvm_unmap_rmapp and introduce kvm_zap_rmapp which will be used in the later patch Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index c059822..a990ad9 10

Re: Automatic clock disabling on clk_put()

2015-05-12 Thread Sascha Hauer
On Tue, May 12, 2015 at 04:23:48PM -0700, Stephen Boyd wrote: > On 05/10/15 23:01, Sascha Hauer wrote: > > Hi, > > > > Since we now have per-user clks we could automatically disable clks on > > clk_put() to make the drivers errors paths easier. AFAIR that was one > > of the motivations to switch to

Re: [LKP] [x86/smpboot] f5d6a52f511: BUG: kernel boot hang

2015-05-12 Thread Ingo Molnar
dconfig-c0-05111038/gcc-4.9/be67584d15684730aeed88cab355c5de8b0491fe/vmlinuz-4.1.0-rc3-01147-gbe67584 > -append 'root=/dev/ram0 user=lkp > job=/lkp/scheduled/vm-kbuild-yocto-i386-3/rand_boot-1-yocto-minimal-i386.cgz-i386-randconfig-c0-05111038-be67584d15684730aeed88cab355c5de8b0491fe-1

[PATCH v3 05/10] KVM: MMU: introduce slot_handle_level_range() and its helpers

2015-05-12 Thread Xiao Guangrong
There are several places walking all rmaps for the memslot so that introduce common functions to cleanup the code Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c | 69 ++ 1 file changed, 69 insertions(+) diff --git a/arch/x86/kvm/mmu.c b/

[PATCH v3 04/10] KVM: MMU: introduce for_each_slot_rmap_range

2015-05-12 Thread Xiao Guangrong
It's used to abstract the code from kvm_handle_hva_range and it will be used by later patch Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c | 97 +- 1 file changed, 75 insertions(+), 22 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/

[PATCH v3 09/10] KVM: MMU: fix MTRR update

2015-05-12 Thread Xiao Guangrong
Currently, whenever guest MTRR registers are changed kvm_mmu_reset_context is called to switch to the new root shadow page table, however, it's useless since: 1) the cache type is not cached into shadow page's attribute so that the original root shadow page will be reused 2) the cache type is s

[PATCH v3 10/10] KVM: x86: do not reset mmu if CR0.CD and CR0.NW are changed

2015-05-12 Thread Xiao Guangrong
CR0.CD and CR0.NW are not used by shadow page table so that need not adjust mmu if these two bit are changed Signed-off-by: Xiao Guangrong --- arch/x86/kvm/x86.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index bbe184f..457b908 1

Re: Automatic clock disabling on clk_put()

2015-05-12 Thread Uwe Kleine-König
Hello, On Tue, May 12, 2015 at 04:23:48PM -0700, Stephen Boyd wrote: > On 05/10/15 23:01, Sascha Hauer wrote: > > Hi, > > > > Since we now have per-user clks we could automatically disable clks on > > clk_put() to make the drivers errors paths easier. AFAIR that was one > > of the motivations to s

[PATCH v5 1/2] sysfs: added sysfs_link_entry_to_kobj()

2015-05-12 Thread Jarkko Sakkinen
Added a new function sysfs_link_group_to_kobj() that adds a symlink from attribute or group to a kobject. Exported kernfs_remove_by_name_ns in order to provide a way to remove such symlinks. Signed-off-by: Jarkko Sakkinen --- fs/sysfs/group.c | 42 ++

[PATCH v5 2/2] tpm: move the PPI attributes to character device directory.

2015-05-12 Thread Jarkko Sakkinen
Moved PPI attributes to the character device directory. This aligns with the sysfs guidelines and makes them race free because they are created atomically with the character device as part of device_register().The character device and the sysfs attributes appear at the same time to the user space.

[PATCH v5 0/2] Enable PPI sysfs interface for TPM 2.0

2015-05-12 Thread Jarkko Sakkinen
Changes since v4: * Removed dangling export of kernfs_remove_by_name_ns() from the sysfs patch. Changes since v3: * Use sysfs_remove_link() Changes since v2: * Fixed to_tpm_chip() macro. * Split into two patches. * Renamed sysfs_link_group_to_kobj to sysfs_link_entry_to_kobj * Only create the "

Re: [PATCH v6 1/2] PCI/MSI: Don't disable MSI/MSI-X at shutdown

2015-05-12 Thread Michael S. Tsirkin
On Tue, May 12, 2015 at 02:22:05PM -0500, Eric W. Biederman wrote: > "Michael S. Tsirkin" writes: > > > d52877c7b1af ("pci/irq: let pci_device_shutdown to call pci_msi_shutdown > > v2") disabled MSI/MSI-X at device shutdown to address a kexec problem. > > > > The change made by the above commit i

Re: [PATCH v3] imx27: dt: only map 4 Kbyte for fec registers

2015-05-12 Thread Uwe Kleine-König
On Wed, May 13, 2015 at 12:18:26AM +0200, Philippe Reynes wrote: > According to the imx27 documentation, fec has a 4 Kbyte > memory space map. Moreover, the actual 16 Kbyte mapping > overlaps the SCC (Security Controller) memory register > space. So, we reduce the memory register space to 4 Kbyte.

Re: [PATCH v2 7/7] ACPI / processor: Introduce invalid_phys_cpuid()

2015-05-12 Thread Hanjun Guo
On 2015年05月12日 00:35, Lorenzo Pieralisi wrote: On Tue, May 05, 2015 at 02:14:01PM +0100, Hanjun Guo wrote: On 2015???05???05??? 19:25, Sudeep Holla wrote: On 05/05/15 03:46, Hanjun Guo wrote: Introduce invalid_phys_cpuid() to identify cpu with invalid physical ID, then used it as replacement

Re: [PATCH 01/12] target: Convert se_node_acl->device_list[] to RCU hlist

2015-05-12 Thread Christoph Hellwig
Onemore comments from looking oer the RCU usage with all the patches applied: In core_get_se_deve_from_rtpi we dereference lun->lun_sep, so either struct se_port needs to be switched to kfree_rcu, or we need to mirror the rtpi value into the se_lun. -- To unsubscribe from this list: send the line

Re: [PATCH kernel v10 11/34] vfio: powerpc/spapr: Moving pinning/unpinning to helpers

2015-05-12 Thread Gavin Shan
On Tue, May 12, 2015 at 01:39:00AM +1000, Alexey Kardashevskiy wrote: >This is a pretty mechanical patch to make next patches simpler. > >New tce_iommu_unuse_page() helper does put_page() now but it might skip >that after the memory registering patch applied. > >As we are here, this removes unneces

Re: [PATCH kernel v10 06/34] vfio: powerpc/spapr: Move page pinning from arch code to VFIO IOMMU driver

2015-05-12 Thread Alexey Kardashevskiy
On 05/13/2015 03:58 PM, Gavin Shan wrote: On Tue, May 12, 2015 at 01:38:55AM +1000, Alexey Kardashevskiy wrote: This moves page pinning (get_user_pages_fast()/put_page()) code out of the platform IOMMU code and puts it to VFIO IOMMU driver where it belongs to as the platform code does not deal w

Re: [PATCH v11 02/10] iommu/vt-d: Items required for kdump

2015-05-12 Thread Alexander Duyck
On 05/12/2015 06:45 PM, Li, ZhenHua wrote: On 05/12/2015 04:17 PM, Dave Young wrote: On 05/11/15 at 05:52pm, Li, Zhen-Hua wrote: Add context entry functions needed for kdump. +/* + * Fix Crashdump failure caused by leftover DMA through a hardware IOMMU + * + * Fixes the crashdump kernel to deal

Re: [PATCH] numa,sched: only consider less busy nodes as numa balancing destination

2015-05-12 Thread Peter Zijlstra
On Wed, May 13, 2015 at 08:29:06AM +0200, Peter Zijlstra wrote: > @@ -1572,9 +1582,10 @@ static void numa_migrate_preferred(struct task_struct > *p) > * are added when they cause over 6/16 of the maximum number of faults, but > * only removed when they drop below 3/16. > */ > -static void up

Re: [PATCH kernel v10 05/34] powerpc/iommu: Always release iommu_table in iommu_free_table()

2015-05-12 Thread Alexey Kardashevskiy
On 05/13/2015 03:33 PM, Gavin Shan wrote: On Tue, May 12, 2015 at 01:38:54AM +1000, Alexey Kardashevskiy wrote: At the moment iommu_free_table() only releases memory if the table was initialized for the platform code use, i.e. it had it_map initialized (which purpose is to track DMA memory space

[PATCH] mtd: blktrans: change blktrans_getgeo rerurn value

2015-05-12 Thread Wenlin Kang
Modify function blktrans_getgeo()'s return value to -ENXIO when dev->tr->getgeo == NULL. We shouldn't make the return value to 0 when dev->tr->getgeo == NULL, because the function blktrans_getgeo() has an output value "hd_geometry" which is usually used by some application, if return 0, it will ma

Re: [PATCH 00/12] target: TPG/NodeACL LUN table conversion to RCU hlist

2015-05-12 Thread Christoph Hellwig
Thanks, I like this approach. Getting rid of the array defintively helps, and while I don't think the linked list will be enough to scale in the long run the actual data structure is abstracted away from most code (even more so with the remaining review comment fixed), so even if we need to move t

Re: [PATCH] numa,sched: only consider less busy nodes as numa balancing destination

2015-05-12 Thread Peter Zijlstra
On Tue, May 12, 2015 at 11:45:09AM -0400, Rik van Riel wrote: > I have a few poorly formed ideas on what could be done about that: > > 1) have fbq_classify_rq take the current task on the rq into account, >and adjust the fbq classification if all the runnable-but-queued >tasks are on the r

[tip:perf/urgent] perf tools: Use getconf to determine number of online CPUs

2015-05-12 Thread tip-bot for Will Deacon
Commit-ID: 466c1eb07f42bd27825af24d86b46d05e5e350b9 Gitweb: http://git.kernel.org/tip/466c1eb07f42bd27825af24d86b46d05e5e350b9 Author: Will Deacon AuthorDate: Thu, 23 Apr 2015 15:00:16 +0100 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 12 May 2015 18:11:16 -0300 perf tools: Use

Re: [PATCH 09/12] target: Convert se_portal_group->tpg_lun_list[] to RCU hlist

2015-05-12 Thread Christoph Hellwig
> FIXME: Figure out how sbp-target se_lun usage should work The Xen usage also looks really weird. Maybe Juergen can explain what scsiback_add_translation_entry is trying to do? Note that I think both sbp and xen really should be working on node ACLs. Right now both of them oly supported autog

[tip:perf/urgent] tools: Fix tools/vm build

2015-05-12 Thread tip-bot for Andi Kleen
Commit-ID: 85a9fb47c56aa5e43c54034002232c0585a4b781 Gitweb: http://git.kernel.org/tip/85a9fb47c56aa5e43c54034002232c0585a4b781 Author: Andi Kleen AuthorDate: Thu, 12 Mar 2015 15:39:13 -0700 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 12 May 2015 18:11:06 -0300 tools: Fix tools

Re: [GIT PULL 0/2] perf/urgent fixes

2015-05-12 Thread Ingo Molnar
* Arnaldo Carvalho de Melo wrote: > Hi Ingo, > > Please consider pulling, > > - Arnaldo > > The following changes since commit 44b11fee51711ca85aa2b121a49bf029d18a3722: > > perf/x86/rapl: Enable Broadwell-U RAPL support (2015-05-11 11:52:30 +0200) > > are available in the git reposi

[PATCH v2 1/7] sched/deadline: fix try to pull pinned dl tasks in pull algorithm

2015-05-12 Thread Wanpeng Li
Function pick_next_earliest_dl_task is used to pick earliest and pushable dl task from overloaded cpus in pull algorithm, however, it traverses runqueue rbtree instead of pushable task rbtree which is also ordered by tasks' deadlines. This will result in getting no candidates from overloaded cpus i

[PATCH v2 4/7] sched/deadline: reschedule if stop task slip in after pull operations

2015-05-12 Thread Wanpeng Li
pull_dl_task can drop (and re-acquire) rq->lock, this means a stop task can slip in, in which case we need to reschedule. This patch add the reschedule when the scenario occurs. Signed-off-by: Wanpeng Li --- kernel/sched/deadline.c | 16 +++- 1 file changed, 15 insertions(+), 1 delet

Re: [PATCH kernel v10 09/34] vfio: powerpc/spapr: Move locked_vm accounting to helpers

2015-05-12 Thread Gavin Shan
On Tue, May 12, 2015 at 01:38:58AM +1000, Alexey Kardashevskiy wrote: >There moves locked pages accounting to helpers. >Later they will be reused for Dynamic DMA windows (DDW). > >This reworks debug messages to show the current value and the limit. > >This stores the locked pages number in the cont

Re: [PATCH kernel v10 10/34] vfio: powerpc/spapr: Disable DMA mappings on disabled container

2015-05-12 Thread Gavin Shan
On Tue, May 12, 2015 at 01:38:59AM +1000, Alexey Kardashevskiy wrote: >At the moment DMA map/unmap requests are handled irrespective to >the container's state. This allows the user space to pin memory which >it might not be allowed to pin. > >This adds checks to MAP/UNMAP that the container is enab

[PATCH v2 7/7] sched/rt: reschedule if stop/dl task slip in after pull operations

2015-05-12 Thread Wanpeng Li
pull_rt_task() can drop (and re-acquire) rq->lock, this means a dl or stop task can slip in, in which case need to reschedule. This patch add the reschedule when the scenario occurs. Signed-off-by: Wanpeng Li --- kernel/sched/rt.c | 19 ++- 1 file changed, 18 insertions(+), 1 d

Re: [PATCH 01/12] target: Convert se_node_acl->device_list[] to RCU hlist

2015-05-12 Thread Nicholas A. Bellinger
On Wed, 2015-05-13 at 07:46 +0200, Christoph Hellwig wrote: > On Tue, May 12, 2015 at 09:25:25AM +, Nicholas A. Bellinger wrote: > > @@ -240,18 +237,12 @@ int core_free_device_list_for_node( > > { > > struct se_dev_entry *deve; > > struct se_lun *lun; > > - u32 i; > > - > > - if (!

Re: [RFC PATCH] Drop some asm from copy_user_64.S

2015-05-12 Thread Ingo Molnar
* Borislav Petkov wrote: > Hi guys, > > this is just an RFC first to sanity-check what I'm trying to do: > > I want to get rid of the asm glue in arch/x86/lib/copy_user_64.S which > prepares the copy_user* alternatives calls. And replace it with nice and > clean C. > > The other intention is

[PATCH v2 6/7] sched/core: remove superfluous resetting of dl_throttled flag

2015-05-12 Thread Wanpeng Li
Resetting dl_throttled flag in rt_mutex_setprio (for a task that is going to be boosted) is superfluous, as the natural place to do so is in replenish_dl_entity(). If the task was on the runqueue and it is boosted by a DL task, it will be enqueued back with ENQUEUE_REPLENISH flag set, which can gua

[PATCH v2 2/7] sched/deadline: make init_sched_dl_class() __init

2015-05-12 Thread Wanpeng Li
It's a bootstrap function, make init_sched_dl_class() __init. Signed-off-by: Wanpeng Li --- kernel/sched/deadline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c index f09f3ad..4303af2 100644 --- a/kernel/sched/deadline.c ++

[PATCH v2 3/7] sched/deadline: reduce rq lock contention by eliminating locking of non-feasible target

2015-05-12 Thread Wanpeng Li
This patch adds check that prevents futile attempts to move dl tasks to a CPU with active tasks of equal or earlier deadline. The same behavior as commit 80e3d87b2c55 ("sched/rt: Reduce rq lock contention by eliminating locking of non-feasible target") for rt class. Signed-off-by: Wanpeng Li ---

[PATCH v2 5/7] sched/deadline: drop duplicate init_sched_dl_class declaration

2015-05-12 Thread Wanpeng Li
There are two init_sched_dl_class declarations, this patch drop the duplicated one. Signed-off-by: Wanpeng Li --- v1 -> v2: * trim the changelog kernel/sched/sched.h | 1 - 1 file changed, 1 deletion(-) diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index d854555..d62b288 100644 --

Re: [PATCH 07/12] target/pr: Convert registration check to RCU pointer

2015-05-12 Thread Christoph Hellwig
On Tue, May 12, 2015 at 09:25:31AM +, Nicholas A. Bellinger wrote: > From: Nicholas Bellinger > > This patch converts core_scsi3_pr_seq_non_holder() check for non > reservation holding registrations to use se_deve->pr_reg as an RCU > protected pointer. ->pr_reg is only used a boolean flag:

Re: [PATCH kernel v10 08/34] vfio: powerpc/spapr: Use it_page_size

2015-05-12 Thread Gavin Shan
On Tue, May 12, 2015 at 01:38:57AM +1000, Alexey Kardashevskiy wrote: >This makes use of the it_page_size from the iommu_table struct >as page size can differ. > >This replaces missing IOMMU_PAGE_SHIFT macro in commented debug code >as recently introduced IOMMU_PAGE_XXX macros do not include >IOMMU

Re: [PATCH kernel v10 07/34] vfio: powerpc/spapr: Check that IOMMU page is fully contained by system page

2015-05-12 Thread Gavin Shan
On Tue, May 12, 2015 at 01:38:56AM +1000, Alexey Kardashevskiy wrote: >This checks that the TCE table page size is not bigger that the size of >a page we just pinned and going to put its physical address to the table. > >Otherwise the hardware gets unwanted access to physical memory between >the en

Re: [PATCH] KVM: x86: fix initial PAT value

2015-05-12 Thread Jan Kiszka
On 2015-05-13 07:02, Wanpeng Li wrote: > Hi Radim, > On Mon, Apr 27, 2015 at 03:11:25PM +0200, Radim Krčmář wrote: >> PAT should be 0007_0406_0007_0406h on RESET and not modified on INIT. > > Could you point out where this value is described in SDM? :) 11.12.4 (revision from September 2014) Jan

Re: [PATCH v3 2/3] Phy: DT binding documentation for Broadcom Cygnus USB PHY driver

2015-05-12 Thread Kishon Vijay Abraham I
Hi, On Wednesday 13 May 2015 03:35 AM, Arun Ramamurthy wrote: Hi On 15-05-11 07:11 AM, Kishon Vijay Abraham I wrote: Hi, On Thursday 23 April 2015 04:44 AM, Arun Ramamurthy wrote: Broadcom's Cygnus chip has a USB 2.0 host controller connected to three separate phys. One of the phs (port 2) i

Re: [RFC][PATCH] x86/hpet: fix NULL pointer dereference in msi_domain_alloc_irqs()

2015-05-12 Thread Jiang Liu
On 2015/5/12 12:14, Sergey Senozhatsky wrote: >> directly call __irq_domain_alloc_irqs() in hpet_assign_irq() and pass >> correct `arg' to fix the oops. >> > > oh, what I was thinking about... it should be as simple as this. > > 8<-8<- > > From 8be2eb548cefc788c87b05da22176b7360c6aca9 Mo

Re: [PATCH 06/12] target/pr: Convert se_dev_entry to kref for RCU

2015-05-12 Thread Christoph Hellwig
On Tue, May 12, 2015 at 09:25:30AM +, Nicholas A. Bellinger wrote: > From: Nicholas Bellinger > > This patch converts se_dev_entry->pr_ref_count access to use modern > struct kref counting. > > It updates core_enable_device_list_for_node() to kref_init() when se_dev_entry > is being enabled,

Re: [PATCH kernel v10 06/34] vfio: powerpc/spapr: Move page pinning from arch code to VFIO IOMMU driver

2015-05-12 Thread Gavin Shan
On Tue, May 12, 2015 at 01:38:55AM +1000, Alexey Kardashevskiy wrote: >This moves page pinning (get_user_pages_fast()/put_page()) code out of >the platform IOMMU code and puts it to VFIO IOMMU driver where it belongs >to as the platform code does not deal with page pinning. > >This makes iommu_take

Re: [PATCH 05/12] target: Convert transport_lookup_*_lun to RCU reader

2015-05-12 Thread Christoph Hellwig
> + rcu_read_lock(); > + deve = target_nacl_find_deve(nacl, unpacked_lun); > + if (deve && deve->lun_flags & TRANSPORT_LUNFLAGS_INITIATOR_ACCESS) { > + /* > + * Make sure that target_enable_device_list_for_node() > + * has not already cleared the RC

[LKP] [x86/smpboot] f5d6a52f511: BUG: kernel boot hang

2015-05-12 Thread Huang Ying
r=lkp job=/lkp/scheduled/vm-kbuild-yocto-i386-3/rand_boot-1-yocto-minimal-i386.cgz-i386-randconfig-c0-05111038-be67584d15684730aeed88cab355c5de8b0491fe-1-20150512-31766-1fzr1qi.yaml ARCH=i386 kconfig=i386-randconfig-c0-05111038 branch=linux-devel/devel-cairo-smoke-20150

Re: [PATCH 03/12] target/configfs: Convert mappedlun + SCSI MIBs to RCU reader

2015-05-12 Thread Christoph Hellwig
On Tue, May 12, 2015 at 10:09:23PM -0700, Nicholas A. Bellinger wrote: > > Why do we still need TRANSPORT_LUNFLAGS_INITIATOR_ACCESS? Isn't deve > > being not-NULL enough? > > > > Yep, I think this can go as well. Dropping now. Also might be worth to add a helper that has the ->se_lun_acl check

Re: [PATCH 02/12] target: Convert REPORT_LUN + MODE_SENSE to RCU reader

2015-05-12 Thread Christoph Hellwig
On Tue, May 12, 2015 at 09:25:26AM +, Nicholas A. Bellinger wrote: > From: Nicholas Bellinger > > This patch converts SPC emulation for REPORT_LUN + MODE_SENSE to use > RCU read locks for se_node_acl->lun_entry_hlist access. > > Also convert the MODE_SENSE special case in pscsi_transport_com

Re: [PATCH 01/12] target: Convert se_node_acl->device_list[] to RCU hlist

2015-05-12 Thread Christoph Hellwig
On Tue, May 12, 2015 at 09:25:25AM +, Nicholas A. Bellinger wrote: > @@ -240,18 +237,12 @@ int core_free_device_list_for_node( > { > struct se_dev_entry *deve; > struct se_lun *lun; > - u32 i; > - > - if (!nacl->device_list) > - return 0; > - > - spin_lock_i

Re: [PATCH v10 1/4] cgroups: use bitmask to filter for_each_subsys

2015-05-12 Thread Aleksa Sarai
Hi Tejun, > H... You can either convert all masks to ulong (which is fine) or > do something like the following. > > #define for_each_subsys_which(ss_mask, ss, ssid)\ > unsigned long __tmp_mask = (ss_mask); \ > for_each_set_bit(ssid, &__tmp_mask, CGROUP_SU

Re: [PATCH 01/12] target: Convert se_node_acl->device_list[] to RCU hlist

2015-05-12 Thread Nicholas A. Bellinger
On Wed, 2015-05-13 at 07:32 +0200, Christoph Hellwig wrote: > On Tue, May 12, 2015 at 10:08:51PM -0700, Nicholas A. Bellinger wrote: > > The series is bisectable. With patch #1 in place ->device_list[] is > > still kzalloc()'ed, but new RCU pointer assignments are made into > > lun_entry_hlist[].

Re: [RFC v2 6/7] x86/PCI/ACPI: Use common interface to support PCI host bridge

2015-05-12 Thread Jiang Liu
On 2015/5/12 20:19, Hanjun Guo wrote: > [...] >> struct pci_root_info { >> -struct acpi_device *bridge; >> -char name[16]; >> -struct pci_controller sd; >> +struct acpi_pci_root_info_common common; >> #ifdefCONFIG_PCI_MMCONFIG >> bool mcfg_added; >> u16 segment;

Re: [RFC v2 5/7] PCI/ACPI: Consolidate common PCI host bridge code into ACPI core

2015-05-12 Thread Jiang Liu
On 2015/5/11 21:36, Hanjun Guo wrote: > Hi Jiang, > > I have comments inline. > > On 2015年05月05日 10:46, Jiang Liu wrote: >> Introduce common interface acpi_pci_root_create() and related data >> structures to create PCI root bus for ACPI PCI host bridges. It will >> be used to kill duplicated arch

Re: [PATCH kernel v10 05/34] powerpc/iommu: Always release iommu_table in iommu_free_table()

2015-05-12 Thread Gavin Shan
On Tue, May 12, 2015 at 01:38:54AM +1000, Alexey Kardashevskiy wrote: >At the moment iommu_free_table() only releases memory if >the table was initialized for the platform code use, i.e. it had >it_map initialized (which purpose is to track DMA memory space use). > >With dynamic DMA windows, we wil

Re: [EDT][PATCH 1/1] hw_breakpoint.c :cpu hotplug handling

2015-05-12 Thread Baruch Siach
Hi Maninder Singh, On Wed, May 13, 2015 at 05:24:07AM +, Maninder Singh wrote: > EP-2DAD0AFA905A4ACB804C4F82A001242F > > Subject: [PATCH 1/1] hw_breakpoint.c :cpu hotplug handling > > This patch adds support for CPU hotplug, It re-installl all installed > watchpoints and breakpoints > back

Re: [PATCH 01/12] target: Convert se_node_acl->device_list[] to RCU hlist

2015-05-12 Thread Christoph Hellwig
On Tue, May 12, 2015 at 10:08:51PM -0700, Nicholas A. Bellinger wrote: > The series is bisectable. With patch #1 in place ->device_list[] is > still kzalloc()'ed, but new RCU pointer assignments are made into > lun_entry_hlist[]. > > Squashing the RCU reader paths (#2-6) for merge is OK, but it's

[PATCH v5 06/10] lib: sysctl handling (kernel glue code)

2015-05-12 Thread Hajime Tazaki
This interacts with fs/proc_fs.c for sysctl-like interface registered via lib_init() API. Signed-off-by: Hajime Tazaki --- arch/lib/sysctl.c | 270 ++ 1 file changed, 270 insertions(+) create mode 100644 arch/lib/sysctl.c diff --git a/arch/li

[PATCH v5 07/10] lib: other kernel glue layer code

2015-05-12 Thread Hajime Tazaki
These files are used to provide the same function calls so that other network stack code keeps untouched. Signed-off-by: Hajime Tazaki Signed-off-by: Christoph Paasch --- arch/lib/capability.c | 25 + arch/lib/filemap.c| 32 ++ arch/lib/fs.c | 70 arch/lib/gl

[PATCH v5 10/10] lib: tools used for test scripts

2015-05-12 Thread Hajime Tazaki
These auxiliary files are used for testing and debugging of net/ code with libos. a simple test is implemented with make test ARCH=lib. Signed-off-by: Hajime Tazaki --- tools/testing/libos/.gitignore | 6 + tools/testing/libos/Makefile | 38 +++ tools/testing/l

[PATCH v5 08/10] lib: auxiliary files for auto-generated asm-generic files of libos

2015-05-12 Thread Hajime Tazaki
these files works as stubs in order to transparently run the other kernel part (e.g., net/) on libos environment. Signed-off-by: Hajime Tazaki --- arch/lib/include/asm/Kbuild | 57 + arch/lib/include/asm/atomic.h | 59

[PATCH v5 09/10] lib: libos build scripts and documentation

2015-05-12 Thread Hajime Tazaki
document and build scripts for libos architecture. Signed-off-by: Hajime Tazaki Signed-off-by: Ryo Nakamura --- Documentation/virtual/libos-howto.txt | 144 MAINTAINERS | 9 + arch/lib/.gitignore | 3 + arch/lib/Kconfig

[PATCH v5 05/10] lib: context and scheduling functions (kernel glue code) for libos

2015-05-12 Thread Hajime Tazaki
context primitives of kernel such as soft interrupts, scheduling, tasklet are implemented for libos. these functions eventually call the functions registered by lib_init() API as well. Signed-off-by: Hajime Tazaki --- arch/lib/sched.c | 406 +++

[PATCH v5 04/10] lib: time handling (kernel glue code)

2015-05-12 Thread Hajime Tazaki
timer related (internal) functions such as add_timer(), do_gettimeofday() of kernel are trivially reimplemented for libos. these eventually call the functions registered by lib_init() API. Signed-off-by: Hajime Tazaki --- arch/lib/hrtimer.c | 122 +++ arch/lib/tasklet

[PATCH v5 02/10] slab: add SLIB (Library memory allocator) for arch/lib

2015-05-12 Thread Hajime Tazaki
add SLIB allocator for arch/lib (CONFIG_LIB) to wrap kmalloc and co. This will bring user's own allocator of libos: malloc(3) etc. Signed-off-by: Hajime Tazaki --- include/linux/slab.h | 6 +- include/linux/slib_def.h | 21 + mm/Makefile | 1 + mm/slab.h

[PATCH v5 03/10] lib: public headers and API implementations for userspace programs

2015-05-12 Thread Hajime Tazaki
userspace programs which uses libos access via a public API, lib_init(), with passed arguments struct SimImported and struct SimExported. Signed-off-by: Hajime Tazaki Signed-off-by: Ryo Nakamura --- arch/lib/include/sim-assert.h | 23 +++ arch/lib/include/sim-init.h | 134 ++ arc

[PATCH v5 01/10] sysctl: make some functions unstatic to access by arch/lib

2015-05-12 Thread Hajime Tazaki
libos (arch/lib) emulates a sysctl-like interface by a function call of userspace by enumerating sysctl tree from sysctl_table_root. It requires to be publicly accessible to this symbol and related functions. Signed-off-by: Hajime Tazaki --- fs/proc/proc_sysctl.c | 36 +++

[PATCH v5 00/10] an introduction of Linux library operating system (LibOS)

2015-05-12 Thread Hajime Tazaki
This is the 5th version of Linux LibOS patchset which reflects a couple of comments received from people. changes from v4: - Patch 09/10 ("lib: libos build scripts and documentation") 1) lib: fix dependency detection of kernel/time/timeconst.h (commented by Richard Weinberger) - Overall 2) reba

Re: [PATCH kernel v10 04/34] powerpc/iommu: Put IOMMU group explicitly

2015-05-12 Thread Gavin Shan
On Tue, May 12, 2015 at 01:38:53AM +1000, Alexey Kardashevskiy wrote: >So far an iommu_table lifetime was the same as PE. Dynamic DMA windows >will change this and iommu_free_table() will not always require >the group to be released. > >This moves iommu_group_put() out of iommu_free_table(). > >Thi

[EDT][PATCH 1/1] hw_breakpoint.c :cpu hotplug handling

2015-05-12 Thread Maninder Singh
EP-2DAD0AFA905A4ACB804C4F82A001242F Subject: [PATCH 1/1] hw_breakpoint.c :cpu hotplug handling This patch adds support for CPU hotplug, It re-installl all installed watchpoints and breakpoints back on H/W in case of cpu-hot plug. Signed-off-by: Vaneet Narang Signed-off-by: Maninder Singh Revi

Re: [PATCH kernel v10 03/34] powerpc/powernv/ioda: Clean up IOMMU group registration

2015-05-12 Thread Gavin Shan
On Tue, May 12, 2015 at 01:38:52AM +1000, Alexey Kardashevskiy wrote: >The existing code has 3 calls to iommu_register_group() and >all 3 branches actually cover all possible cases. > >This replaces 3 calls with one and moves the registration earlier; >the latter will make more sense when we add TC

Re: [PATCH] KVM: x86: fix initial PAT value

2015-05-12 Thread Wanpeng Li
Hi Radim, On Mon, Apr 27, 2015 at 03:11:25PM +0200, Radim Krčmář wrote: >PAT should be 0007_0406_0007_0406h on RESET and not modified on INIT. Could you point out where this value is described in SDM? :) Regards, Wanpeng Li >VMX used a wrong value (host's PAT) and while SVM used the right one,

Re: [PATCH kernel v10 02/34] powerpc/iommu/powernv: Get rid of set_iommu_table_base_and_group

2015-05-12 Thread Gavin Shan
On Tue, May 12, 2015 at 01:38:51AM +1000, Alexey Kardashevskiy wrote: >The set_iommu_table_base_and_group() name suggests that the function >sets table base and add a device to an IOMMU group. However actual >table base setting happens in pnv_pci_ioda_dma_dev_setup(). > On PHB3, the DMA32 IOMMU ta

linux-next: please clean up the clockevents tree

2015-05-12 Thread Stephen Rothwell
Hi Daniel, All the commits in the clockevents tree have appeared upstream (as different commits, unfortunately). Please clean up your tree it is just causing unnecessary conflicts. -- Cheers, Stephen Rothwells...@canb.auug.org.au pgpnviYYoEWcc.pgp Description: OpenPGP digi

Re: [EDT] [PATCH 1/1] Fix: hw watchpoint continually triggers callback

2015-05-12 Thread Vaneet Narang
EP-2DAD0AFA905A4ACB804C4F82A001242F >On Tue, May 12, 2015 at 02:12:54PM +0100, Vaneet Narang wrote: >> On Tue, May 12, 2015 at 12:48:13PM +0100, Maninder Singh wrote: >> >> On ARM, when a watchpoint is registered using >> >> register_wide_hw_breakpoint, >> >> the callback handler endlessly runs

Re: [PATCH 03/12] target/configfs: Convert mappedlun + SCSI MIBs to RCU reader

2015-05-12 Thread Nicholas A. Bellinger
On Tue, 2015-05-12 at 13:58 -0700, Andy Grover wrote: > On 05/12/2015 02:25 AM, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > This patch converts fabric independent configfs link/unlink to use > > RCU read path macros for se_node_acl->lun_entry_hlist access. > > > > It also con

Re: [PATCH 01/12] target: Convert se_node_acl->device_list[] to RCU hlist

2015-05-12 Thread Nicholas A. Bellinger
On Tue, 2015-05-12 at 13:58 -0700, Andy Grover wrote: > On 05/12/2015 02:25 AM, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > This patch converts se_node_acl->device_list[] table for mappedluns > > to modern RCU hlist_head usage in order to support an arbitrary number > > of no

Re: [PATCH 1/1] drivers: staging: fbtft: fbtft-core.c: Fix different address space warning

2015-05-12 Thread Sudip Mukherjee
On Tue, May 12, 2015 at 06:57:46PM -0700, Tolga Ceylan wrote: > To fix sparse warning of incorrect type when calling vfree() > (different address space), added annotation __force. Garret Kelly posted a similar patch before, please see the discussion about that patch at https://lkml.org/lkml/2015/4

Re: [PATCH 8/8] serial: tegra: Correct error handling on DMA setup

2015-05-12 Thread Alexandre Courbot
On Tue, May 12, 2015 at 6:51 PM, Jon Hunter wrote: > > On 12/05/15 09:39, Alexandre Courbot wrote: >> On Tue, May 5, 2015 at 11:17 PM, Jon Hunter wrote: >>> Function tegra_uart_dma_channel_allocate() does not check that >>> dma_map_single() mapped the DMA buffer correctly. Add a check for this >>

[PATCH 1/1] drivers: staging: comedi: drivers: ni_mio_common.c: removed no-effect right hand operand

2015-05-12 Thread Tolga Ceylan
In ni_ai_cmd() bitwise or construction of ai_trig in case of TRIG_NOW is faulty. Register address is accidentally in the expression, but this has no effect. This is an accidental left-over code that used to call a function with register address as one of the arguments. Signed-off-by: Tolga Ceylan

  1   2   3   4   5   6   7   8   9   10   >