[PATCH 06/14] mwifiex: don't short-circuit netdev notifiers on interface deletion

2017-05-24 Thread Brian Norris
When we leave the delete interface function, there are still netdev hooks that might try to process the device. We're short-circuiting some of that by changing the interface type and clearing ieee80211_ptr. This means we skip NETDEV_UNREGISTER_FINAL in cfg80211. Fortunately, that is currently a no-

[PATCH 12/14] mwifiex: don't open-code ARRAY_SIZE()

2017-05-24 Thread Brian Norris
Signed-off-by: Brian Norris --- drivers/net/wireless/marvell/mwifiex/cfp.c | 4 +--- drivers/net/wireless/marvell/mwifiex/sta_cmd.c | 8 ++-- drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c | 5 ++--- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/drivers/net/w

[PATCH 13/14] mwifiex: drop 'add_tail' param from mwifiex_insert_cmd_to_pending_q()

2017-05-24 Thread Brian Norris
It's always called with 'true' -- we only determine it 'false' locally within this function. So drop the parameter. Also, this should be 'bool' (since we use true/false), not 'u32'. Signed-off-by: Brian Norris --- drivers/net/wireless/marvell/mwifiex/cmdevt.c | 5 +++-- drivers/net/wireless/mar

[PATCH 14/14] mwifiex: pcie: fix whitespace

2017-05-24 Thread Brian Norris
This keeps annoying me. Signed-off-by: Brian Norris --- drivers/net/wireless/marvell/mwifiex/pcie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c index c86119b05f52..4f1d946ea460 1006

[PATCH 08/14] mwifiex: ensure "disable auto DS" struct is initialized

2017-05-24 Thread Brian Norris
The .idle_time field *should* be unused, but technically, we're allowing unitialized stack garbage to pass all the way through to the firmware host command. Let's zero it out instead. Signed-off-by: Brian Norris --- drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | 6 +++--- 1 file changed, 3 i

[PATCH 09/14] mwifiex: pcie: remove redundant synchronize_irq()

2017-05-24 Thread Brian Norris
free_irq() already calls synchronize_irq() in a non-racy manner. Calling synchronize_irq() here is redundant. Signed-off-by: Brian Norris --- drivers/net/wireless/marvell/mwifiex/pcie.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/n

[PATCH 02/14] mwifiex: reunite copy-and-pasted remove/reset code

2017-05-24 Thread Brian Norris
When PCIe FLR code was added, it explicitly copy-and-pasted much of mwifiex_remove_card() into mwifiex_shutdown_sw(). This is unnecessary, as almost all of the code should be reused. Let's reunite what we can for now. The only functional changes for now: * call netif_device_detach() in the remo

Re: [PATCH V2] workqueue: Implement delayed_work_busy()

2017-05-24 Thread kbuild test robot
Hi Alex, [auto build test WARNING on next-20170522] [also build test WARNING on v4.12-rc2] [cannot apply to v4.9-rc8 v4.9-rc7 v4.9-rc6] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Alex-Naidis

[PATCH 04/14] mwifiex: pcie: don't allow cmd buffer reuse after reset

2017-05-24 Thread Brian Norris
In rogue cases (due to other bugs) it's possible we try to process an old command response *after* resetting the device. This could trigger a double-free (or the SKB can get reallocated elsewhere...causing other memory corruptions) in mwifiex_pcie_process_cmd_complete(). For safety (and symmetry)

Re: [tpmdd-devel] [PATCH v6 3/3] tpm: vtpm_proxy: Prevent userspace from sending driver command

2017-05-24 Thread Jarkko Sakkinen
On Wed, May 24, 2017 at 03:22:11PM -0700, Jarkko Sakkinen wrote: > On Wed, May 24, 2017 at 05:39:41PM -0400, Stefan Berger wrote: > > To prevent userspace from sending the TPM driver command to set > > the locality, we need to check every command that is sent from > > user space. To distinguish use

Re: [PATCH v6 2/3] tpm: vtpm_proxy: Implement request_locality function.

2017-05-24 Thread Jarkko Sakkinen
On Wed, May 24, 2017 at 07:03:27PM -0400, Stefan Berger wrote: > On 05/24/2017 06:21 PM, Jarkko Sakkinen wrote: > > On Wed, May 24, 2017 at 05:39:40PM -0400, Stefan Berger wrote: > > > Implement the request_locality function. To set the locality on the > > > backend we define vendor-specific TPM 1.

Re: [PATCH 7/8] firmware: vpd: remove platform driver

2017-05-24 Thread Julius Werner
I'm not a kernel expert so maybe I don't understand this right, but... I think this might have been done this way to ensure that the driver can get initialized correctly regardless of probe ordering. coreboot_table_find() may fail with -EPROBE_DEFER if the coreboot_table driver and its dependent (c

[PATCH v4 5/7] arch/sparc: Enable queued rwlocks for SPARC

2017-05-24 Thread Babu Moger
Enable queued rwlocks for SPARC. Here are the discussions on this feature when this was introduced. https://lwn.net/Articles/572765/ https://lwn.net/Articles/582200/ Cleaned-up the arch_read_xxx and arch_write_xxx definitions in spinlock_64.h. These routines are replaced by the functions in includ

[PATCH v4 7/7] arch/sparc: Enable queued spinlock support for SPARC

2017-05-24 Thread Babu Moger
This patch makes the necessary changes in SPARC architecture to enable queued spinlock support. Here are some of the earlier discussions about this feature. https://lwn.net/Articles/561775/ https://lwn.net/Articles/590243/ Cleaned-up the spinlock_64.h. The definitions of arch_spin_xxx are replaced

[PATCH v4 0/7] Enable queued rwlock and queued spinlock for SPARC

2017-05-24 Thread Babu Moger
This series of patches enables queued rwlock and queued spinlock support for SPARC. These features were introduced some time ago in upstream. Here are some of the earlier discussions. https://lwn.net/Articles/572765/ https://lwn.net/Articles/582200/ https://lwn.net/Articles/561775/ https://lwn.net/

[PATCH v4 3/7] arch/sparc: Define config parameter CPU_BIG_ENDIAN

2017-05-24 Thread Babu Moger
Found this problem while enabling queued rwlock on SPARC. The parameter CONFIG_CPU_BIG_ENDIAN is used to clear the specific byte in qrwlock structure. Without this parameter, we clear the wrong byte. Here is the code. static inline u8 *__qrwlock_write_byte(struct qrwlock *lock) { return (

[PATCH v4 2/7] kernel/locking: Fix compile error with qrwlock.c

2017-05-24 Thread Babu Moger
Saw these compile errors on SPARC when queued rwlock feature is enabled. CC kernel/locking/qrwlock.o kernel/locking/qrwlock.c: In function ‘queued_read_lock_slowpath’: kernel/locking/qrwlock.c:89: error: implicit declaration of function ‘arch_spin_lock’ kernel/locking/qrwlock.c:102: error:

[PATCH v4 6/7] arch/sparc: Introduce xchg16 for SPARC

2017-05-24 Thread Babu Moger
SPARC supports 32 bit and 64 bit xchg right now. Add the support for 16 bit (2 byte) xchg. This is required to support queued spinlock feature which uses 2 byte xchg. This is achieved using 4 byte cas instructions with byte manipulations. Also re-arranged the code to call __cmpxchg_u32 inside xchg

[PATCH v4 1/7] arch/sparc: Remove the check #ifndef __LINUX_SPINLOCK_TYPES_H

2017-05-24 Thread Babu Moger
Saw these compile errors on SPARC when queued rwlock feature is enabled. CC kernel/locking/qrwlock.o In file included from ./include/asm-generic/qrwlock_types.h:5, from ./arch/sparc/include/asm/qrwlock.h:4, from kernel/locking/qrwlock.c:24: ./arch/sparc/

Re: [Patch 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc

2017-05-24 Thread Michael Bringmann
On 05/24/2017 06:19 AM, Michael Ellerman wrote: > Michael Bringmann writes: > >> On 05/23/2017 04:49 PM, Reza Arbab wrote: >>> On Tue, May 23, 2017 at 03:05:08PM -0500, Michael Bringmann wrote: On 05/23/2017 10:52 AM, Reza Arbab wrote: > On Tue, May 23, 2017 at 10:15:44AM -0500, Michae

[PATCH v4 4/7] arch/sparc: Introduce cmpxchg_u8 SPARC

2017-05-24 Thread Babu Moger
SPARC supports 32 bit and 64 bit cmpxchg right now. Add support for 8 bit (1 byte) cmpxchg. This is required to support queued rwlocks feature which uses 1 byte cmpxchg. The function __cmpxchg_u8 here uses the 4 byte cas instruction with a byte manipulation to achieve 1 byte cmpxchg. Signed-off-

Re: [PATCH v2] bug: fix problem including from linux/kernel.h

2017-05-24 Thread kbuild test robot
Hi Ian, [auto build test ERROR on linus/master] [also build test ERROR on v4.12-rc2 next-20170524] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Ian-Abbott/bug-fix-problem-including-linux-bug

Re: [PATCH] test_bpf: Add a couple of tests for BPF_JSGE.

2017-05-24 Thread Daniel Borkmann
On 05/25/2017 01:35 AM, David Daney wrote: Some JITs can optimize comparisons with zero. Add a couple of BPF_JSGE tests against immediate zero. Signed-off-by: David Daney Thanks for the tests! Acked-by: Daniel Borkmann

[GIT PULL] SCSI fixes for 4.12-rc2

2017-05-24 Thread James Bottomley
This is quite a big update because it includes a rework of the lpfc driver to separate the NVMe part from the FC part. The reason for doing this is because two separate trees (the nvme and scsi trees respectively) want to update the individual components and this separation will prevent a really n

[PATCH v4 3/5] mtd: handle partitioning on devices with 0 erasesize

2017-05-24 Thread Chris Packham
erasesize is meaningful for flash devices but for SRAM there is no concept of an erase block so erasesize is set to 0. When partitioning these devices instead of ensuring partitions fall on erasesize boundaries we ensure they fall on writesize boundaries. Helped-by: Boris Brezillon Signed-off-by:

[PATCH v4 5/5] mtd: mchp23k256: Add support for mchp23lcv1024

2017-05-24 Thread Chris Packham
The mchp23lcv1024 is similar to the mchp23k256, the differences (from a software point of view) are the capacity of the chip and the size of the addresses used. There is no way to detect the specific chip so we must be told via a Device Tree or default to mchp23k256 when device tree is not used.

[PATCH v4 4/5] mtd: mchp23k256: add partitioning support

2017-05-24 Thread Chris Packham
Setting the of_node for the mtd device allows the generic mtd code to setup the partitions. Additionally we must specify a non-zero erasesize for the partitions to be writeable. Signed-off-by: Chris Packham Reviewed-by: Andrew Lunn Tested-by: Andrew Lunn --- Changes in v2 - collect revew/test f

[PATCH v4 2/5] mtd: mchp23k256: switch to mtd_device_register()

2017-05-24 Thread Chris Packham
Use mtd_device_register() instead of mtd_device_parse_register() to eliminate two unused parameters. Signed-off-by: Chris Packham Reviewed-by: Andrew Lunn Tested-by: Andrew Lunn --- Changes in v2 - collect review/test from Andrew Changes in v3: - None Changes in v4: - None drivers/mtd/devices

[PATCH v4 0/5] mtd: mchp23k256: device tree and mchp23lcv1024

2017-05-24 Thread Chris Packham
This series adds device tree support to the mchp23k256 driver and support for the mchp23lcv1024 chip. I suspect there are more compatible variants that we could now enumerate if desired. Chris Packham (5): mtd: mchp23k256: Add OF device ID table mtd: mchp23k256: switch to mtd_device_register()

[PATCH v4 1/5] mtd: mchp23k256: Add OF device ID table

2017-05-24 Thread Chris Packham
This allows registering of this device via a Device Tree. Signed-off-by: Chris Packham Reviewed-by: Andrew Lunn Tested-by: Andrew Lunn --- Changes in v2: - collect review/test from Andrew Changes in v3: - None Changes in v4: - None .../devicetree/bindings/mtd/microchip,mchp23k256.txt | 18 +

Re: [Patch 2/2]: powerpc/hotplug/mm: Fix hot-add memory node assoc

2017-05-24 Thread Michael Bringmann
I will get a log based on the latest 4.12 kernel to show what happens one way or the other, with this patch removed. On 05/24/2017 09:36 AM, Reza Arbab wrote: > On Tue, May 23, 2017 at 05:44:23PM -0500, Michael Bringmann wrote: >> On 05/23/2017 04:49 PM, Reza Arbab wrote: >>> On Tue, May 23, 2017

Re: [PATCH v2 for-4.12-fixes 1/2] sched/fair: Use task_groups instead of leaf_cfs_rq_list to walk all cfs_rqs

2017-05-24 Thread Tim Chen
On 05/09/2017 09:17 AM, Tejun Heo wrote: Currently, rq->leaf_cfs_rq_list is a traversal ordered list of all live cfs_rqs which have ever been active on the CPU; unfortunately, this makes update_blocked_averages() O(total number of CPU cgroups) which isn't scalable at all. The next patch will m

Re: [PATCH] workqueue: Ensure that cpumask set for pools created after boot

2017-05-24 Thread Michael Bringmann
On 05/23/2017 03:10 PM, Tejun Heo wrote: > Hello, > > On Tue, May 23, 2017 at 03:09:07PM -0500, Michael Bringmann wrote: >> To confirm, you want the WARN_ON(cpumask_any(pool->attrs->cpumask) >= >> NR_CPUS) >> at the point where I place my current patch? > > Yeah, cpumask_weight() probably is a

[PATCH] test_bpf: Add a couple of tests for BPF_JSGE.

2017-05-24 Thread David Daney
Some JITs can optimize comparisons with zero. Add a couple of BPF_JSGE tests against immediate zero. Signed-off-by: David Daney --- lib/test_bpf.c | 38 ++ 1 file changed, 38 insertions(+) diff --git a/lib/test_bpf.c b/lib/test_bpf.c index 889bc31..be88cba 1

Re: [PATCH 5/5] drm: dw-hdmi-i2s: add .get_dai_id callback for ALSA SoC

2017-05-24 Thread Kuninori Morimoto
Hi Mark Cc: DRM maintainer > > ALSA SoC needs to know connected DAI ID for probing. > > It is not a big problem if device/driver was only for sound, > > but getting DAI ID will be difficult if device includes both > > Video/Sound, like HDMI. > > As far as I understand what's going on with the gr

linux-next: manual merge of the net-next tree with the net tree

2017-05-24 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the net-next tree got a conflict in: drivers/net/phy/marvell.c between commit: f2899788353c ("net: phy: marvell: Limit errata to 88m1101") from the net tree and commit: 0c3439bc7773 ("net: phy: Marvell: checkpatch - Comments") from the net-next tree.

Re: [patch] compiler, clang: suppress warning for unused static inline functions

2017-05-24 Thread Doug Anderson
Hi, On Wed, May 24, 2017 at 2:32 PM, Andrew Morton wrote: > On Wed, 24 May 2017 14:22:29 -0700 Matthias Kaehlcke > wrote: > >> I'm not a kernel maintainer, so it's not my decision whether this >> warning should be silenced, my personal opinion is that it's benfits >> outweigh the inconveniences

Re: [PATCH] Staging: bcm2835-audio: bcm2835-ctl.c: Fixed a comment coding style issue.

2017-05-24 Thread Tobin C. Harding
On Wed, May 24, 2017 at 08:03:14PM +0530, srishti sharma wrote: This driver is not in Greg KH's staging tree. You may like to work off of that tree when doing staging patches. https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/ To aid you future patches here are a couple of minor

Re: [PATCH v2] bug: fix problem including from linux/kernel.h

2017-05-24 Thread kbuild test robot
Hi Ian, [auto build test WARNING on linus/master] [also build test WARNING on v4.12-rc2 next-20170524] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Ian-Abbott/bug-fix-problem-including-linux

[PATCH] staging: iio: light: Replace snprintf calls with scnprintf

2017-05-24 Thread Harinath Nampally
This patch fixes the miscoded use of return value of snprintf by using the scnprintf function which returns the length of actual string created in the buffer. Signed-off-by: Harinath Nampally --- drivers/staging/iio/light/tsl2x7x.c | 20 ++-- 1 file changed, 10 insertions(+), 10

Re: [PATCH] x86/ftrace: Make sure that ftrace trampolines are not RWX

2017-05-24 Thread Luis R. Rodriguez
before freeing again. > > I applied this patch, and it appears to fix the bug for me. > > Signed-off-by: Steven Rostedt (VMware) Awesome, this also cures my panic: mcgrof@piggy ~/linux-next (git::20170524-fixwarn)$ sudo tools/testing/selftests/ftrace/ftracetest ... # of passed: 45 # of failed: 0 # of unresolved: 0 # of untested: 0 # of unsupported: 0 # of xfailed: 0 # of undefined(test bug): 0 So the combination of both: Tested-by: Luis R. Rodriguez Luis

[PATCH] MAINTAINERS: give proc sysctl some maintainer love

2017-05-24 Thread Luis R. Rodriguez
We poke at proc sysctl enough that really we should declare it maintained. We'll just be Cc'd and sending updates / ACK'ing changes through akpm's tree. Acked-by: Kees Cook Signed-off-by: Luis R. Rodriguez --- MAINTAINERS | 11 +++ 1 file changed, 11 insertions(+) diff --git a/MAINTAIN

Re: [PATCH v2] bug: fix problem including from linux/kernel.h

2017-05-24 Thread Ian Abbott
On 2017-05-24 17:06, Ian Abbott wrote: If "include/linux/kernel.h" includes , a circular dependency is introduced when "include/asm-generic/bug.h" includes . This results in build breakage when something includes before for architectures that select `CONFIG_GENERIC_BUG` because `struct bug_ent

Re: [PATCH v6 2/3] tpm: vtpm_proxy: Implement request_locality function.

2017-05-24 Thread Stefan Berger
On 05/24/2017 06:21 PM, Jarkko Sakkinen wrote: On Wed, May 24, 2017 at 05:39:40PM -0400, Stefan Berger wrote: Implement the request_locality function. To set the locality on the backend we define vendor-specific TPM 1.2 and TPM 2 ordinals and send a command to the backend to set the locality for

Re: [PATCH 2/2] Revert "ACPI / button: Change default behavior to lid_init_state=open"

2017-05-24 Thread Rafael J. Wysocki
On Wed, May 24, 2017 at 10:08 AM, Benjamin Tissoires wrote: > Hi Rafael, > > On May 15 2017 or thereabouts, Rafael J. Wysocki wrote: >> >> >> Benjamin, my understanding is that this is the case, is it correct? >> >> > >> >> > That is correct. This patch I reverted introduces regression for >> >>

Re: [PATCH v6 1/3] tpm: Introduce flag TPM_TRANSMIT_RAW

2017-05-24 Thread Stefan Berger
On 05/24/2017 06:18 PM, Jarkko Sakkinen wrote: On Wed, May 24, 2017 at 05:39:39PM -0400, Stefan Berger wrote: Introduce the flag TPM_TRANSMIT_RAW that allows us to transmit a command without recursing into the requesting of locality. Signed-off-by: Stefan Berger Reviewed-by: Jarkko Sakkinen

Re: pxa3xx-nand failing to find device on linux-next

2017-05-24 Thread Chris Packham
>>>>>> nand: No NAND device found >>>>>> pxa3xx-nand f10d.flash: failed to scan nand at cs 0 >>>>>> >>>>>> This was working around 4.11. I'll try to do some more digging tomorrow >>>>>> to narro

[PATCH net] sky2: Do not deadlock on sky2_hw_down

2017-05-24 Thread Joshua Emele
From: Joshua Emele The sky2_hw_down uses sky2_tx_complete to free pending frames stuck in the HW queue. Because sky2_hw_down can be called from a process context, the call to u64_stats_update_begin can result in deadlock. Because the statistics do not require update as part of the sky2_hw_down s

Re: [PATCH v2] firmware: fix sending -ERESTARTSYS due to signal on fallback

2017-05-24 Thread Luis R. Rodriguez
On Wed, May 24, 2017 at 3:00 PM, Andy Lutomirski wrote: > On Wed, May 24, 2017 at 2:40 PM, Luis R. Rodriguez wrote: >> From: Martin Fuzzey >> >> Commit 0cb64249ca500 ("firmware_loader: abort request if wait_for_completion >> is interrupted") added via 4.0 added support to abort the fallback mech

Re: pxa3xx-nand failing to find device on linux-next

2017-05-24 Thread Boris Brezillon
at cs 0 > >>>> > >>>> This was working around 4.11. I'll try to do some more digging tomorrow > >>>> to narrow down a failure point but I thought I'd send this out now just > >>>> in case it rings any bells. > >>>> &g

[rcu:ms 7/7] ERROR: "percpu_downgrade_write" [drivers/misc/sgi-gru/gru.ko] undefined!

2017-05-24 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git ms head: 7daa984159c77d85f3ee053d5688ed7a47854613 commit: 7daa984159c77d85f3ee053d5688ed7a47854613 [7/7] mmap_sem: Use percpu_rw_sema config: x86_64-rhel (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 201

Re: [PATCH] tpm: remove struct tpm_pcrextend_in

2017-05-24 Thread Jarkko Sakkinen
On Wed, May 24, 2017 at 03:27:31PM -0700, Jarkko Sakkinen wrote: > Removed struct tpm_pcrextend_in as it is not used for anything anymore. > > Signed-off-by: Jarkko Sakkinen Another bit of code that I just push. /Jarkko > --- > drivers/char/tpm/tpm.h | 6 -- > 1 file changed, 6 deletions(

[PATCH] tpm: remove struct tpm_pcrextend_in

2017-05-24 Thread Jarkko Sakkinen
Removed struct tpm_pcrextend_in as it is not used for anything anymore. Signed-off-by: Jarkko Sakkinen --- drivers/char/tpm/tpm.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h index dd1173427fb2..af05c1403c6e 100644 --- a/drivers/char/tp

Re: [PATCH] x86/ftrace: Make sure that ftrace trampolines are not RWX

2017-05-24 Thread Steven Rostedt
On Wed, 24 May 2017 21:13:27 +0200 (CEST) Thomas Gleixner wrote: > > Oops: 0003 [#1] SMP > > Modules linked in: > > CPU: 3 PID: 1 Comm: swapper/0 Not tainted 4.12.0-rc2-test+ #42 > > Hardware name: MSI MS-7823/CSM-H87M-G43 (MS-7823), BIOS V1.6 > > 02/22/2014 task: 8802153a8000 task.stack: ff

Re: [PATCH v3] ext4: fix quota charging for shared xattr blocks

2017-05-24 Thread Theodore Ts'o
On Wed, May 24, 2017 at 04:35:19AM -0700, Tahsin Erdogan wrote: > ext4_xattr_block_set() calls dquot_alloc_block() to charge for an xattr > block when new references are made. However if dquot_initialize() hasn't > been called on an inode, request for charging is effectively ignored > because ext4_

Re: [PATCH v6 3/3] tpm: vtpm_proxy: Prevent userspace from sending driver command

2017-05-24 Thread Jarkko Sakkinen
On Wed, May 24, 2017 at 05:39:41PM -0400, Stefan Berger wrote: > To prevent userspace from sending the TPM driver command to set > the locality, we need to check every command that is sent from > user space. To distinguish user space commands from internally > sent commands we introduce an addition

Re: [PATCH v6 2/3] tpm: vtpm_proxy: Implement request_locality function.

2017-05-24 Thread Jarkko Sakkinen
On Wed, May 24, 2017 at 05:39:40PM -0400, Stefan Berger wrote: > Implement the request_locality function. To set the locality on the > backend we define vendor-specific TPM 1.2 and TPM 2 ordinals and send > a command to the backend to set the locality for the next commands. > > To avoid recursing

Re: mm/migrate: Fix ref-count handling when !hugepage_migration_supported()

2017-05-24 Thread Manoj Iyer
On Wed, 24 May 2017, Punit Agrawal wrote: On failing to migrate a page, soft_offline_huge_page() performs the necessary update to the hugepage ref-count. When !hugepage_migration_supported() , unmap_and_move_hugepage() also decrements the page ref-count for the hugepage. The combined behaviour l

Re: [PATCH v6 1/3] tpm: Introduce flag TPM_TRANSMIT_RAW

2017-05-24 Thread Jarkko Sakkinen
On Wed, May 24, 2017 at 05:39:39PM -0400, Stefan Berger wrote: > Introduce the flag TPM_TRANSMIT_RAW that allows us to transmit > a command without recursing into the requesting of locality. > > Signed-off-by: Stefan Berger > Reviewed-by: Jarkko Sakkinen I'll rename the constant as TPM_TRANSMIT

[rcu:ms 7/7] include/linux/rwsem.h:166:46: error: 'struct percpu_rw_semaphore' has no member named 'dep_map'

2017-05-24 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git ms head: 7daa984159c77d85f3ee053d5688ed7a47854613 commit: 7daa984159c77d85f3ee053d5688ed7a47854613 [7/7] mmap_sem: Use percpu_rw_sema config: x86_64-acpi-redef+CONFIG_DEBUG_INFO_REDUCED (attached as .config) compiler:

Re: [PATCH 1/3] mm/slub: Only define kmalloc_large_node_hook() for NUMA systems

2017-05-24 Thread Matthias Kaehlcke
Hi David, El Wed, May 24, 2017 at 01:36:21PM -0700 David Rientjes ha dit: > On Tue, 23 May 2017, Matthias Kaehlcke wrote: > > > > diff --git a/include/linux/compiler-clang.h > > > b/include/linux/compiler-clang.h > > > index de179993e039..e1895ce6fa1b 100644 > > > --- a/include/linux/compiler-c

Re: [PATCH] um: add dummy ioremap and iounmap functions

2017-05-24 Thread Logan Gunthorpe
On 24/05/17 04:05 PM, Al Viro wrote: >> I have designs to use these functions in scatterlist.c where they'd >> almost certainly never be called on the um architecture but it does need >> to compile. > > Then make it fail there. Ok, will do. I'll send a v2 patch shortly. > Incidentally, s390 ha

[PATCH 1/2] nvme: Wait at least 6000ms before entering the deepest idle state

2017-05-24 Thread Andy Lutomirski
This should at least make vendors less nervous about Linux's APST policy. I'm not aware of any concrete bugs it would fix (although I was hoping it would fix the Samsung/Dell quirk). Cc: sta...@vger.kernel.org # v4.11 Cc: Kai-Heng Feng Cc: Mario Limonciello Signed-off-by: Andy Lutomirski ---

[PATCH 0/2] nvme APST fixes

2017-05-24 Thread Andy Lutomirski
This should fix all known regressions. Andy Lutomirski (2): nvme: Wait at least 6000ms before entering the deepest idle state nvme: Quirk APST on Intel 600P/P3100 devices drivers/nvme/host/core.c | 38 +++--- drivers/nvme/host/pci.c | 2 ++ 2 files changed,

[PATCH 2/2] nvme: Quirk APST on Intel 600P/P3100 devices

2017-05-24 Thread Andy Lutomirski
They have known firmware bugs. A fix is apparently in the works -- once fixed firmware is available, someone from Intel (Hi, Keith!) can adjust the quirk accordingly. Cc: sta...@vger.kernel.org # v4.11 Cc: Kai-Heng Feng Cc: Mario Limonciello Signed-off-by: Andy Lutomirski --- drivers/nvme/hos

Re: [PATCH] um: add dummy ioremap and iounmap functions

2017-05-24 Thread Al Viro
On Wed, May 24, 2017 at 04:00:52PM -0600, Logan Gunthorpe wrote: > The user mode architecture does not provide ioremap or iounmap, and > because of this, the arch won't build when the functions are used in some > core libraries. > > I have designs to use these functions in scatterlist.c where they

Re: pxa3xx-nand failing to find device on linux-next

2017-05-24 Thread Chris Packham
#x27;d send this out now just >>>> in case it rings any bells. >>>> >>>> The board I'm using (DB-88F6820-AMC) is unfortunately out-of tree but it >>>> should be pretty close to the armada-388-db. I can make my dts available >>>> if it&#x

[PATCH] tile: provide default ioremap declaration

2017-05-24 Thread Logan Gunthorpe
Add a default ioremap function which was not provided in all circumstances. (Only when CONFIG_PCI and CONFIG_TILEGX was set). I have designs to use them in scatterlist.c where they'd likely never be called with this architecture, but it is needed to compile. Signed-off-by: Logan Gunthorpe Signed

[PATCH] um: add dummy ioremap and iounmap functions

2017-05-24 Thread Logan Gunthorpe
The user mode architecture does not provide ioremap or iounmap, and because of this, the arch won't build when the functions are used in some core libraries. I have designs to use these functions in scatterlist.c where they'd almost certainly never be called on the um architecture but it does need

Re: [PATCH v2] firmware: fix sending -ERESTARTSYS due to signal on fallback

2017-05-24 Thread Andy Lutomirski
On Wed, May 24, 2017 at 2:40 PM, Luis R. Rodriguez wrote: > From: Martin Fuzzey > > Commit 0cb64249ca500 ("firmware_loader: abort request if wait_for_completion > is interrupted") added via 4.0 added support to abort the fallback mechanism > when a signal was detected and wait_for_completion_inte

[PATCH] kfifo: cleanup example to not use page_link

2017-05-24 Thread Logan Gunthorpe
This is a layering violation so we replace the uses with calls to sg_page(). This is a prep patch for replacing page_link and this is one of the very few uses outside of scatterlist.h. Signed-off-by: Logan Gunthorpe Signed-off-by: Stephen Bates Cc: Stefani Seibold Cc: Greg KH Cc: Andrew Morton

[PATCH] staging: ccree: Cleanup: remove references to page_link

2017-05-24 Thread Logan Gunthorpe
This is a layering violation so we replace it with calls to sg_page. This is a prep patch for replacing page_link and this is one of the very few uses outside of scatterlist.h. Signed-off-by: Logan Gunthorpe Signed-off-by: Stephen Bates Cc: Greg Kroah-Hartman Cc: Gilad Ben-Yossef --- drivers/

[PATCH] dmaengine: ste_dma40, imx-dma: Cleanup scatterlist layering violations

2017-05-24 Thread Logan Gunthorpe
Two dma engine drivers directly accesses page_link assuming knowledge that should be contained only in scatterlist.h. We replace these with calls to sg_chain and sg_assign_page. Signed-off-by: Logan Gunthorpe Signed-off-by: Stephen Bates Cc: Dan Williams Cc: Vinod Koul Cc: Linus Walleij ---

Re: [PATCH v5 0/2] Add PCIe host driver support for Mediatek SoCs

2017-05-24 Thread Bjorn Helgaas
On Sun, May 21, 2017 at 11:42:23AM +0800, Ryder Lee wrote: > Hi, > > This patch series add Mediatek Gen2 PCIe host controller driver and > dt-binding document. It can be found on MT7623 series SoCs. > > This driver was validated using Broadcom Tigon3 and Intel(R) 82575/82576 > gigabit ethernet ca

Re: [PATCH] tpm, tpm_infineon: remove useless snprintf() calls

2017-05-24 Thread Jarkko Sakkinen
On Wed, May 24, 2017 at 02:29:16PM -0700, Jarkko Sakkinen wrote: > The memory copy from rodata to stack is useless. > > Signed-off-by: Jarkko Sakkinen I already applied this, reviewed-by would be nice for this one but given how obvious this change is, it is not mandatory. I take my chances on th

Re: [RFC PATCH 2/2] mm, memory_hotplug: drop CONFIG_MOVABLE_NODE

2017-05-24 Thread Reza Arbab
On Wed, May 24, 2017 at 02:24:11PM +0200, Michal Hocko wrote: 20b2f52b73fe ("numa: add CONFIG_MOVABLE_NODE for movable-dedicated node") has introduced CONFIG_MOVABLE_NODE without a good explanation on why it is actually useful. It makes a lot of sense to make movable node semantic opt in but we a

Re: [RFC PATCH 1/2] mm, memory_hotplug: drop artificial restriction on online/offline

2017-05-24 Thread Reza Arbab
On Wed, May 24, 2017 at 02:24:10PM +0200, Michal Hocko wrote: 74d42d8fe146 ("memory_hotplug: ensure every online node has NORMAL memory") has added can_offline_normal which checks the amount of memory in !movable zones as long as CONFIG_MOVABLE_NODE is disable. It disallows to offline memory if t

[RFC PATCH 08/16] scatterlist: add iomem support to sg_miter and sg_copy_*

2017-05-24 Thread Logan Gunthorpe
IO memory support can be indicated by an iteratee with the SG_MITRE_SUPPORTS_IOMEM flag. If an unmappable sgl gets into a miter without this support, the kernel will BUGON. For supported cases, the sg_miter code will set the ioaddr pointer and leave addr NULL. sg_copy_buffer is changed to support

[RFC PATCH 02/16] staging: ccree: Cleanup: remove references to page_link

2017-05-24 Thread Logan Gunthorpe
This is a layering violation so we replace it with calls to sg_page. This is a prep patch for replacing page_link and this is one of the very few uses outside of scatterlist.h. Signed-off-by: Logan Gunthorpe Signed-off-by: Stephen Bates --- drivers/staging/ccree/ssi_buffer_mgr.c | 17 --

[RFC PATCH 10/16] bvec: massive conversion of all bv_page users

2017-05-24 Thread Logan Gunthorpe
Convert all uses of bv_page to bvec_page and bvec_set page as introduced in the previous patch. This is mostly done with the following coccinelle script plus some additional fussing by hand. @@ expression bv; expression x; @@ -bv->bv_page = x; +bvec_set_page(bv, x); @@ expression bv; expression

[RFC PATCH 16/16] nvmet: use unmappable sgl in rdma target

2017-05-24 Thread Logan Gunthorpe
This is incomplete but is given to test the unmappable sg page code. Further work would actually use p2p memory in the rdma target. (One should imagine something vaguely resembling our original p2pmem RFC[1] being on top of this.) We convert to using an unmappable sgl in the rdma nvme target drive

[RFC PATCH 01/16] dmaengine: ste_dma40, imx-dma: Cleanup scatterlist layering violations

2017-05-24 Thread Logan Gunthorpe
Two dma engine drivers directly accesses page_link assuming knowledge that should be contained only in scatterlist.h. We replace these with calls to sg_chain and sg_assign_page. Signed-off-by: Logan Gunthorpe Signed-off-by: Stephen Bates --- drivers/dma/imx-dma.c | 7 ++- drivers/dma/ste

[RFC PATCH 09/16] bvec: introduce bvec_page and bvec_set_page accessors

2017-05-24 Thread Logan Gunthorpe
Introduce two accessor functions for bv_page: bvec_page to return the page and bvec_set_page. A follow on patch will mechanically convert all the individual uses within the kernel. Signed-off-by: Logan Gunthorpe Signed-off-by: Stephen Bates --- include/linux/bvec.h | 10 ++ 1 file chang

[RFC PATCH 06/16] scatterlist: convert page_link to pfn_t

2017-05-24 Thread Logan Gunthorpe
This patch replaces the old page_link bits with the somewhat safer pfn_t. This change seems to have been planned for in the design of pfn_t by Dan. The conversion is surprisingly straightforward. sg_assign_pfn and sg_set_pfn helpers are added which are similar analogs to their page_link versions.

[RFC PATCH 14/16] block: bio: go straight from pfn_t to phys instead of through page

2017-05-24 Thread Logan Gunthorpe
Going straight from pfn_t to physical address is cheaper and avoids the potential BUG_ON in bvec_page for unmappable memory. Signed-off-by: Logan Gunthorpe Signed-off-by: Stephen Bates --- include/linux/bio.h | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/lin

[RFC PATCH 15/16] dma-mapping: introduce and use unmappable safe sg_virt call

2017-05-24 Thread Logan Gunthorpe
Introduce sg_try_virt which is safe to call with a potentially unmappable sgl. sg_try_virt returns NULL in cases that the sgl doesn't have an accessible virtual address to return. Then, in dma_map_sg_attrs, we use the new function instead of sg_virt when marking memory as initialized. Signed-off-

[RFC PATCH 03/16] kfifo: Cleanup example to not use page_link

2017-05-24 Thread Logan Gunthorpe
This is a layering violation so we replace the uses with calls to sg_page(). This is a prep patch for replacing page_link and this is one of the very few uses outside of scatterlist.h. Signed-off-by: Logan Gunthorpe Signed-off-by: Stephen Bates --- samples/kfifo/dma-example.c | 8 1 fi

[RFC PATCH 11/16] bvec: convert to using pfn_t internally

2017-05-24 Thread Logan Gunthorpe
With bv_page fenced off, we can now convert it to a pfn_t fairly simply. Everything should work the same with the exception of a BUG_ON for potentially unmappable pfns. A couple of initializers that assign {NULL} to a bio_vec had to also be changed to {} to prevent a warning seeing pfn_t is actual

[RFC PATCH 13/16] block: bio: introduce bio_add_pfn

2017-05-24 Thread Logan Gunthorpe
We introduce bio_add_pfn which is the same as bio_add_page but expects a pfn_t instead of a page pointer. bio_add_page is then converted to be an inline call to bio_add_pfn. Signed-off-by: Logan Gunthorpe Signed-off-by: Stephen Bates --- block/bio.c | 16 include/linu

[RFC PATCH 12/16] bvec: use sg_set_pfn when mapping a bio to an sgl

2017-05-24 Thread Logan Gunthorpe
Going through bvec_page and sg_set_page now implies a conversion to and then from a struct page as well as a potential unnecessary BUG_ON check. Instead we go directly from bv_pfn to sg_set_pfn. This is done easily with the following coccinelle patch: @@ expression sg; expression bv; expression l

[RFC PATCH 05/16] tile: provide default ioremap declaration

2017-05-24 Thread Logan Gunthorpe
Add a default ioremap function which was not provided in all circumstances. (Only when CONFIG_PCI and CONFIG_TILEGX was set). I have designs to use them in scatterlist.c where they'd likely never be called with this architecture, but it is needed to compile. Signed-off-by: Logan Gunthorpe Signed

[RFC PATCH 00/16] Unmappable memory in SGLs for p2p transfers

2017-05-24 Thread Logan Gunthorpe
Hi, This RFC patchset continues my work attempting to enforce iomem safety within scatterlists. This takes a bit of a different tack from my last series [1] which tried to introduce a common scatterlist mapping function. Instead, this series takes the approach of marking SGLs that may contain unma

[RFC PATCH 04/16] um: add dummy ioremap and iounmap functions

2017-05-24 Thread Logan Gunthorpe
The user mode architecture does not provide ioremap or iounmap, and because of this, the arch won't build when the functions are used in some core libraries. I have designs to use these functions in scatterlist.c where they'd almost certainly never be called on the um architecture but it does need

[RFC PATCH 07/16] scatterlist: support unmappable memory in the scatterlist

2017-05-24 Thread Logan Gunthorpe
This patch introduces the PFN_MAYBE_UNMAPPABLE flag which indicates the sgl or pfn may point to unmappable memory. This flag would be set by a call to sg_init_unmappable_table which sets the flag for all entries in the table. Once set, any attempt to call sg_page, sg_virt, etc on the sgl will BUG_O

Re: [PATCH v1 2/2] PCI: Correct PCI_STD_RESOURCE_END usage

2017-05-24 Thread Bjorn Helgaas
On Fri, May 19, 2017 at 02:58:55PM -0500, Bjorn Helgaas wrote: > PCI_STD_RESOURCE_END is (confusingly) the index of the last valid BAR, not > the *number* of BARs. To iterate through all possible BARs, we need to > include PCI_STD_RESOURCE_END. > > Fixes: 9fe373f9997b ("PCI: Increase IBM ipr SAS

Re: [RFC] fix race in drivers/char/random.c:get_reg()

2017-05-24 Thread Theodore Ts'o
On Sun, Apr 30, 2017 at 07:49:21PM +1200, Michael Schmitz wrote: > get_reg() can be reentered on architectures with prioritized interrupts > (m68k in this case), causing f->reg_index to be incremented after the > range check. Out of bounds memory access past the pt_regs struct results. > This will

Re: [PATCH v1 2/2] MIPS: PCI: Remove unused busn_offset

2017-05-24 Thread Bjorn Helgaas
On Fri, May 19, 2017 at 02:56:06PM -0500, Bjorn Helgaas wrote: > pci_add_resource_offset() is for host bridge windows where the bridge > translates CPU addresses to PCI bus addresses by adding an offset. To my > knowledge, no host bridge translates bus numbers, so this is only useful > for MEM and

[PATCH v6 2/3] tpm: vtpm_proxy: Implement request_locality function.

2017-05-24 Thread Stefan Berger
Implement the request_locality function. To set the locality on the backend we define vendor-specific TPM 1.2 and TPM 2 ordinals and send a command to the backend to set the locality for the next commands. To avoid recursing into requesting the locality, we set the TPM_TRANSMIT_RAW flag when calli

[PATCH v2] firmware: fix sending -ERESTARTSYS due to signal on fallback

2017-05-24 Thread Luis R. Rodriguez
e pushed out two new branches based on linux-next tag next-20170524, one is just the driver-data API [0], and the other one just has this patch applied on top of the driver-data API [1]. You'll want to use driver-data-stable if you are working on the cache or the fallback mechanism since t

[PATCH v6 1/3] tpm: Introduce flag TPM_TRANSMIT_RAW

2017-05-24 Thread Stefan Berger
Introduce the flag TPM_TRANSMIT_RAW that allows us to transmit a command without recursing into the requesting of locality. Signed-off-by: Stefan Berger Reviewed-by: Jarkko Sakkinen --- drivers/char/tpm/tpm-interface.c | 3 ++- drivers/char/tpm/tpm.h | 1 + 2 files changed, 3 insertio

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