[PATCH 3/3] MIPS: KVM: Uninit VCPU in vcpu_create error path

2015-11-11 Thread James Hogan
KVM") Signed-off-by: James Hogan Cc: Ralf Baechle Cc: Paolo Bonzini Cc: Gleb Natapov Cc: linux-m...@linux-mips.org Cc: k...@vger.kernel.org Cc: # 3.10.x- --- arch/mips/kvm/mips.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/mips/kvm/mips.c b/arch/mips/kvm/

[PATCH 1/3] MIPS: KVM: Fix ASID restoration logic

2015-11-11 Thread James Hogan
late implementation of KVM, so it doesn't need to check the supervisor bit as that mode is not implemented in the guest. Fixes: b680f70fc111 ("KVM/MIPS32: Entry point for trampolining to...") Signed-off-by: James Hogan Cc: Ralf Baechle Cc: Paolo Bonzini Cc: Gleb Natapov Cc: linux-m...@l

[PATCH 0/3] MIPS: KVM: Misc fixes

2015-11-11 Thread James Hogan
A few misc MIPS KVM fixes for issues that have been around since the code was merged in v3.10. James Hogan (3): MIPS: KVM: Fix ASID restoration logic MIPS: KVM: Fix CACHE immediate offset sign extension MIPS: KVM: Uninit VCPU in vcpu_create error path arch/mips/kvm/emulate.c | 2 +- arch

[PATCH 2/3] MIPS: KVM: Fix CACHE immediate offset sign extension

2015-11-11 Thread James Hogan
The immediate field of the CACHE instruction is signed, so ensure that it gets sign extended by casting it to an int16_t rather than just masking the low 16 bits. Fixes: e685c689f3a8 ("KVM/MIPS32: Privileged instruction/target branch emulation.") Signed-off-by: James Hogan Cc: Ralf B

Re: [PATCH 0/3] MIPS: KVM: Misc fixes

2015-11-11 Thread James Hogan
Hi Paolo, On Wed, Nov 11, 2015 at 03:43:14PM +0100, Paolo Bonzini wrote: > On 11/11/2015 15:21, James Hogan wrote: > > A few misc MIPS KVM fixes for issues that have been around since the > > code was merged in v3.10. > > > > James Hogan (3): > > MIPS

[PATCH 1/2] MIPS: Don't unwind to user mode with EVA

2015-12-04 Thread James Hogan
the unwind should stop there. Signed-off-by: James Hogan Cc: Leonid Yegoshin Cc: Ralf Baechle Cc: linux-m...@linux-mips.org Cc: # 3.15+ --- arch/mips/kernel/process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index f2

[PATCH 2/2] MIPS: Avoid using unwind_stack() with usermode

2015-12-04 Thread James Hogan
only meant for unwinding kernel code, so to be correct it should use the raw backtracing instead. Signed-off-by: James Hogan Cc: Leonid Yegoshin Cc: Ralf Baechle Cc: linux-m...@linux-mips.org Cc: # 3.15+ Signed-off-by: James Hogan --- arch/mips/kernel/traps.c | 2 +- 1 file changed, 1 inse

[PATCH 0/2] MIPS: Minor EVA related unwind fixes

2015-12-04 Thread James Hogan
ll back to raw backtrace for user mode register contexts, rather than using unwind_stack(). This is used on certain faults which can be triggered by userland (namely unaligned accesses when reporting is enabled in debugfs). James Hogan (2): MIPS: Don't unwind to user mode with EVA MI

Re: [PATCH 1/2] MIPS: Don't unwind to user mode with EVA

2015-12-07 Thread James Hogan
On Fri, Dec 04, 2015 at 04:21:09PM -0800, Leonid Yegoshin wrote: > OK. Thanks Leonid. Can that be taken as a Reviewed-by? Cheers James signature.asc Description: Digital signature

[PATCH backport v3.10 1/4] MIPS: KVM: Fix ASID restoration logic

2015-12-11 Thread James Hogan
. Note, this assembly is specific to the trap & emulate implementation of KVM, so it doesn't need to check the supervisor bit as that mode is not implemented in the guest. Fixes: b680f70fc111 ("KVM/MIPS32: Entry point for trampolining to...") Signed-off-by: James Hogan Cc: Ralf

[PATCH backport v3.10..v3.14 3/4] MIPS: KVM: Fix CACHE immediate offset sign extension

2015-12-11 Thread James Hogan
ranch emulation.") Signed-off-by: James Hogan Cc: Ralf Baechle Cc: Paolo Bonzini Cc: Gleb Natapov Cc: linux-m...@linux-mips.org Cc: k...@vger.kernel.org Signed-off-by: Paolo Bonzini Signed-off-by: James Hogan --- arch/mips/kvm/kvm_mips_emul.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[PATCH backport v3.12..v3.14 2/4] MIPS: KVM: Fix ASID restoration logic

2015-12-11 Thread James Hogan
. Note, this assembly is specific to the trap & emulate implementation of KVM, so it doesn't need to check the supervisor bit as that mode is not implemented in the guest. Fixes: b680f70fc111 ("KVM/MIPS32: Entry point for trampolining to...") Signed-off-by: James Hogan Cc: Ralf

[PATCH backport v3.10..v3.14 4/4] MIPS: KVM: Uninit VCPU in vcpu_create error path

2015-12-11 Thread James Hogan
s: 669e846e6c4e ("KVM/MIPS32: MIPS arch specific APIs for KVM") Signed-off-by: James Hogan Cc: Ralf Baechle Cc: Paolo Bonzini Cc: Gleb Natapov Cc: linux-m...@linux-mips.org Cc: k...@vger.kernel.org Signed-off-by: Paolo Bonzini Signed-off-by: James Hogan --- arch/mips/kvm/kvm_mips.c | 5

Re: [PATCH 3/3] MIPS: uaccess: Take EVA into account in [__]clear_user

2016-01-04 Thread James Hogan
Hi stable folk, On Wed, Aug 05, 2015 at 04:41:39PM +0100, James Hogan wrote: > __clear_user() (and clear_user() which uses it), always access the user > mode address space, which results in EVA store instructions when EVA is > enabled even if the current user address limit is KERNEL_DS.

[PATCH backport v3.15..v4.1 0/2] MIPS: uaccess: EVA fixes

2016-01-04 Thread James Hogan
nt_eq() directly, along with config_enabled(CONFIG_EVA) where necessary to avoid module symbol errors. James Hogan (2): MIPS: uaccess: Take EVA into account in __copy_from_user() MIPS: uaccess: Take EVA into account in [__]clear_user arch/mips/include/asm/uaccess.h

[PATCH backport v3.15..v4.1 2/2] MIPS: uaccess: Take EVA into account in [__]clear_user

2016-01-04 Thread James Hogan
__bzero_kernel for the normal kernel address space bzero in EVA mode, and call that from __clear_user() if eva_kernel_access(). Signed-off-by: James Hogan Cc: Markos Chandras Cc: Paul Burton Cc: Leonid Yegoshin Cc: linux-m...@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/10844

[PATCH backport v3.15..v4.1 1/2] MIPS: uaccess: Take EVA into account in __copy_from_user()

2016-01-04 Thread James Hogan
0>] direct_splice_actor+0x24/0x30 [<8017d394>] splice_direct_to_actor+0xd8/0x208 [<8017d51c>] do_splice_direct+0x58/0x7c [<8014eaf4>] do_sendfile+0x1dc/0x39c [<8014f82c>] SyS_sendfile+0x90/0xf8 Add the eva_kernel_access() check in __copy_from_user() like the one in copy_fr

Re: [PATCH backport v3.15..v4.1 1/2] MIPS: uaccess: Take EVA into account in __copy_from_user()

2016-01-04 Thread James Hogan
Hi Leonid, On Mon, Jan 04, 2016 at 01:33:51PM -0800, Leonid Yegoshin wrote: > On 01/04/2016 12:29 PM, James Hogan wrote: > > Add the eva_kernel_access() check in __copy_from_user() like the one in > > copy_from_user(). ... > Adding a user space check in __copy_from_user()

Re: [PATCH] MIPS: stack protector: Fix per-task canary switch

2013-10-14 Thread James Hogan
Hi Greg, On 11/10/13 00:16, Greg KH wrote: > On Mon, Oct 07, 2013 at 02:48:59PM +0200, Ralf Baechle wrote: >> On Mon, Oct 07, 2013 at 12:14:26PM +0100, James Hogan wrote: >> >>> Ralf: This is a regression in v3.11, so please consider for v3.12. >> >> Applied, w

[PATCH] clk: clk-divider: fix divisor > 255 bug

2013-12-16 Thread James Hogan
resultant clock rate to be too high. E.g. in my case an 11bit divider was supposed to divide 24.576 MHz down to 32.768KHz. The divisor was correctly calculated as 750 (0x2ee). This was masked to 238 (0xee) resulting in a frequency of 103.26KHz. Signed-off-by: James Hogan Cc: Rajendra Nayak Cc: Mike

Re: [PATCH] clk: clk-divider: fix divisor > 255 bug

2014-01-06 Thread James Hogan
On 03/01/14 04:15, Mike Turquette wrote: > Quoting James Hogan (2013-12-16 02:41:38) >> Commit 6d9252bd9a4bb (clk: Add support for power of two type dividers) >> merged in v3.6 added the _get_val function to convert a divisor value to >> a register field value depending on

[PATCH] MIPS: stack protector: Fix per-task canary switch

2013-10-07 Thread James Hogan
G_S can then use to write into it. Reported-by: bobjones (via #mipslinux on IRC) Signed-off-by: James Hogan Cc: Ralf Baechle Cc: Gregory Fong Cc: linux-m...@linux-mips.org Cc: #3.11 --- Ralf: This is a regression in v3.11, so please consider for v3.12. (Sorry, resent to Cc stable

Re: [PATCH v3] kernel/signal.c: fix BUG_ON with SIG128 (MIPS)

2013-06-26 Thread James Hogan
On 25/06/13 23:13, James Hogan wrote: > On 25 June 2013 22:40, Andrew Morton wrote: >> Meanwhile, unprivileged users can make a MIPS kernel go BUG. >> >> How much of a problem is this? Obviously less of a problem with MIPS >> than it would be with some other CPU types,

Re: [PATCH v3] kernel/signal.c: fix BUG_ON with SIG128 (MIPS)

2013-06-28 Thread James Hogan
On 26/06/13 18:15, Oleg Nesterov wrote: > On 06/26, Ralf Baechle wrote: >> >> On Wed, Jun 26, 2013 at 06:14:52PM +0200, Oleg Nesterov wrote: >> >>> Or simply remove the BUG_ON(), this can equally confuse wait(status). >>> 128 & 0x7f == 0. >>> >>> Still I think it would be better to change _NSIG on

[PATCH v4] MIPS: Reduce _NSIG from 128 to 127 to avoid BUG_ON

2013-06-28 Thread James Hogan
le program would ever need to use 96 RT signals: "programs should never refer to real-time signals using hard-coded numbers, but instead should always refer to real-time signals using the notation SIGRTMIN+n, and include suitable (run-time) checks that SIGRTMIN+n does not exceed SIGRTMAX.&q

[PATCH] MIPS: KVM: Fix memory leak on VCPU

2014-07-03 Thread James Hogan
@vger.kernel.org Reviewed-by: James Hogan Signed-off-by: Paolo Bonzini [james.ho...@imgtec.com: Backported due to conflict without commit c6c0a6637f9d (MIPS: KVM: Remove redundant NULL checks before kfree())] Signed-off-by: James Hogan --- arch/mips/kvm/kvm_mips.c | 1 + 1 file changed, 1

[PATCH] MIPS: smp-mt: Fix link error when PROC_FS=n

2014-07-04 Thread James Hogan
around the procfs handling code in smp-mt.c. Reported-by: Markos Chandras Signed-off-by: James Hogan Reviewed-by: Markos Chandras Cc: Ralf Baechle Cc: linux-m...@linux-mips.org Cc: # >= 3.15 --- arch/mips/kernel/smp-mt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/mips/kern

Re: [PATCH] MIPS: tlbex: fix a missing statement for HUGETLB

2014-07-30 Thread James Hogan
Hi Huacai, On Tuesday 29 July 2014 14:54:40 Huacai Chen wrote: > In commit 2c8c53e28f1 (MIPS: Optimize TLB handlers for Octeon CPUs) > build_r4000_tlb_refill_handler() is modified. But it doesn't compatible > with the original code in HUGETLB case. Because there is a copy & paste > error and one l

Re: [PATCH] MIPS: tlbex: fix a missing statement for HUGETLB

2014-07-31 Thread James Hogan
Hi, On 31/07/14 02:13, David Daney wrote: > On 07/30/2014 05:48 PM, Huacai Chen wrote: >> For non-Octeon CPU, htlb_info.huge_pte is equal to K0, but I don't >> know much about Octeon. So I think you know whether we should use K0 >> or htlb_info.huge_pte here, since you are the original author. >>

[PATCH] irq-metag*: stop set_affinity vectoring to offline cpus

2014-02-25 Thread James Hogan
et an IRQ affinity to 0x3 it vectors the interrupt onto CPU0 even though it is offline. Reported-by: Thomas Gleixner Signed-off-by: James Hogan Cc: Thomas Gleixner Cc: linux-me...@vger.kernel.org Cc: stable@vger.kernel.org --- I'll apply this patch for v3.14. drivers/irqchip/irq-metag

[PATCH 1/4] MIPS: KVM: Pass reserved instruction exceptions to guest

2014-03-14 Thread James Hogan
in a branch delay slot in which case the PC will already point to the branch target. Also turn the printk messages relating to these cases into kvm_debug messages so that they aren't usually visible. This allows crashme to run in the guest without killing the entire VM. Signed-off-by: James

Re: [PATCH] MIPS: tlbex: fix a missing statement for HUGETLB

2014-08-04 Thread James Hogan
Hi Aurelien, On 02/08/14 22:35, Aurelien Jarno wrote: > On Thu, Jul 31, 2014 at 10:33:55AM -0700, David Daney wrote: >> diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c >> index f99ec587..341add1 100644 >> --- a/arch/mips/mm/tlbex.c >> +++ b/arch/mips/mm/tlbex.c >> @@ -1299,6 +1299,8 @@ st

Re: [PATCH] MIPS: tlbex: fix a missing statement for HUGETLB

2014-08-04 Thread James Hogan
On 04/08/14 14:05, Aurelien Jarno wrote: > On Mon, Aug 04, 2014 at 11:08:50AM +0100, James Hogan wrote: >> Hi Aurelien, >> >> On 02/08/14 22:35, Aurelien Jarno wrote: >>> On Thu, Jul 31, 2014 at 10:33:55AM -0700, David Daney wrote: >>>> diff --git a/a

Re: [PATCH v2 05/11] MIPS: ptrace: Always copy FCSR in FP regset

2014-08-20 Thread James Hogan
Hi Ralf, On 24/07/14 13:50, Alex Smith wrote: > Copy FCSR in the FP regset to match the original pre-regset core dumper. > The code paths for where sizeof(union fpureg) == sizeof(elf_fpreg_t) > already do so, but they actually copy 4 bytes more than they should do > as FCSR is only 32 bits. The no

[PATCH v2 01/23] MIPS: KVM: Allocate at least 16KB for exception handlers

2014-05-29 Thread James Hogan
overwritten and infinitely recursive exceptions on the next exit from the guest. Increase the minimum size from 0x200 to 0x4000 to cover the full use of the page. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: Gleb Natapov Cc: k...@vger.kernel.org Cc: Ralf Baechle Cc: linux-m...@linux-mips.org Cc

[PATCH 01/21] MIPS: KVM: Allocate at least 16KB for exception handlers

2014-04-25 Thread James Hogan
overwritten and infinitely recursive exceptions on the next exit from the guest. Increase the minimum size from 0x200 to 0x4000 to cover the full use of the page. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: Gleb Natapov Cc: k...@vger.kernel.org Cc: Ralf Baechle Cc: linux-m...@linux-mips.org Cc

[PATCH stable 3.12, 3.14] KVM: MIPS: Don't leak FPU/DSP to guest

2015-03-02 Thread James Hogan
ther than being lazily restored, so for that it is simpler to just clear the MX bit again when re-entering the guest. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: Ralf Baechle Cc: Sanjay Lal Cc: Gleb Natapov Cc: k...@vger.kernel.org Cc: linux-m...@linux-mips.org Cc: # v3.10+: 044f0f03eca0:

[PATCH stable 3.10] KVM: MIPS: Don't leak FPU/DSP to guest

2015-03-02 Thread James Hogan
ther than being lazily restored, so for that it is simpler to just clear the MX bit again when re-entering the guest. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: Ralf Baechle Cc: Sanjay Lal Cc: Gleb Natapov Cc: k...@vger.kernel.org Cc: linux-m...@linux-mips.org Cc: # v3.10+: 044f0f03eca0:

Re: [PATCH 3.14 58/73] KVM: MIPS: Dont leak FPU/DSP to guest

2015-03-04 Thread James Hogan
Hi Greg, On Tue, Mar 03, 2015 at 10:13:26PM -0800, Greg Kroah-Hartman wrote: > 3.14-stable review patch. If anyone has any objections, please let me know. > > -- > > From: James Hogan > > commit f798217dfd038af981a18bbe4bc57027a08bb182 upstream. >

Re: v3.12-stable-queue build failure (mips:cavium_octeon_defconfig)

2015-03-05 Thread James Hogan
ve_fp' > > I assume the culprit is 'MIPS: Export FP functions used by lose_fpu(1) for > KVM' > by James Hogan, just as with 3.10 and 3.14. Right, sorry about that :-(. I'll look into fixing it. Cheers James signature.asc Description: Digital signature

[PATCH stable 3.10, 3.12, 3.14] MIPS: Export FP functions used by lose_fpu(1) for KVM

2015-03-05 Thread James Hogan
MIPS: Don't leak FPU/DSP to guest"): ERROR: "_save_fp" [arch/mips/kvm/kvm.ko] undefined! Signed-off-by: James Hogan Fixes: f798217dfd03 (KVM: MIPS: Don't leak FPU/DSP to guest) Cc: Paolo Bonzini Cc: Ralf Baechle Cc: Paul Burton Cc: Gleb Natapov Cc: k...@vger.kernel.org

[PATCH 01/20] MIPS: KVM: Handle MSA Disabled exceptions from guest

2015-03-11 Thread James Hogan
e MSA Disabled exception by emulating a Reserved Instruction exception in the guest, via a new handle_msa_disabled() KVM callback. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: Paul Burton Cc: Ralf Baechle Cc: Gleb Natapov Cc: linux-m...@linux-mips.org Cc: k...@vger.kernel.org Cc: #

[PATCH] MIPS: dma-default: Fix 32-bit fall back to GFP_DMA

2015-03-26 Thread James Hogan
physical address available anyway. Correct that case to compare against a mask the size of phys_addr_t instead of always using a 64-bit mask. Fixes: a2e715a86c6d ("MIPS: DMA: Fix computation of DMA flags from device's coherent_dma_mask.") Signed-off-by: James Hogan Cc: Ralf Baech

[PATCH v2] MIPS: dma-default: Fix 32-bit fall back to GFP_DMA

2015-03-27 Thread James Hogan
physical address available anyway. Correct that case to compare against a mask the size of phys_addr_t instead of always using a 64-bit mask. Fixes: a2e715a86c6d ("MIPS: DMA: Fix computation of DMA flags from device's coherent_dma_mask.") Signed-off-by: James Hogan Cc: Ralf Baech

Re: [REVIEW PATCH 1/2] img-ir/hw: Avoid clearing filter for no-op protocol change

2014-12-08 Thread James Hogan
Hi Mauro, On 04/12/14 17:38, Mauro Carvalho Chehab wrote: > Em Mon, 1 Dec 2014 12:55:09 + > James Hogan escreveu: > >> When the img-ir driver is asked to change protocol, if the chosen >> decoder is already loaded then don't call img_ir_set_decoder(), so as &

[REVIEW PATCH v2] rc-main: Re-apply filter for no-op protocol change

2014-12-08 Thread James Hogan
a6e162d6a46 ("[media] rc-core: simplify sysfs code") Reported-by: Sifan Naeem Signed-off-by: James Hogan Cc: Mauro Carvalho Chehab Cc: David Härdeman Cc: # v3.17+ Cc: linux-me...@vger.kernel.org --- Changes in v2: - Move fix to store_protocols(). Still set filter again even if protoc

Re: [PATCH 2/3] MIPS: HTW: Prevent accidental HTW start due to nested htw_{start,stop}

2015-01-26 Thread James Hogan
Hi Markos, On 26/01/15 09:40, Markos Chandras wrote: > activate_mm() and switch_mm() call get_new_mmu_context() which in turn > can enable the HTW before the entryhi is changed with the new ASID. > Since the latter will enable the HTW in local_flush_tlb_all(), > then there is a small timing window

Re: [PATCH 2/3] MIPS: HTW: Prevent accidental HTW start due to nested htw_{start,stop}

2015-01-26 Thread James Hogan
On 26/01/15 11:36, James Hogan wrote: >> diff --git a/arch/mips/include/asm/pgtable.h >> b/arch/mips/include/asm/pgtable.h >> index 7f7c558de9fc..d2c7e9e7447e 100644 >> --- a/arch/mips/include/asm/pgtable.h >> +++ b/arch/mips/include/asm/pgtable.h >> @@ -99,

Re: [PATCH 2/3] MIPS: HTW: Prevent accidental HTW start due to nested htw_{start,stop}

2015-01-26 Thread James Hogan
On 26/01/15 11:47, Markos Chandras wrote: > On 01/26/2015 11:36 AM, James Hogan wrote: > >> >>> + raw_current_cpu_data.htw_seq++; \ >> >> not "if (!raw_current_cpu_data.htw_seq++)) {"? > Why? > > on _stop() c

[PATCH] clk-divider: Fix READ_ONLY when divider > 1

2014-11-14 Thread James Hogan
SPI clock was set, the other child clocks were miscalculated. The UART clock was recalculated using the PLL rate as the parent rate, resulting in a UART new_rate of double what it should be, and a UART which spewed forth garbage when the rate changes were propagated. Signed-off-by: James Hogan Cc

[REVIEW PATCH FOR v3.18 1/5] img-ir/hw: Always read data to clear buffer

2014-11-17 Thread James Hogan
is unchanged since the powerup key data was never read. This is worked around by always reading the IMG_IR_DATA_x in img_ir_set_decoder(), rather than only when the IMG_IR_RXDVAL or IMG_IR_RXDVALD2 bit is set. Signed-off-by: Dylan Rajaratnam Signed-off-by: James Hogan Cc: Mauro Carvalho

[PATCH] mmc: dw_mmc: avoid write to CDTHRCTL on older versions

2014-11-17 Thread James Hogan
the version id < 240A, return early from dw_mci_ctl_rd_thld() so as not to hit this problem. Fixes: f1d2736c8156 (mmc: dw_mmc: control card read threshold) Signed-off-by: James Hogan Cc: # v3.13+ Cc: Seungwon Jeon Cc: Jaehoon Chung Cc: Chris Ball Cc: Ulf Hansson Cc: linux-...@vger.kernel.

Re: [PATCH] MIPS: mm: tlbex: Fix potential HTW race on TLBL/M/S handlers

2014-11-27 Thread James Hogan
/* race condition happens, leaving */ How about expanding this comment a bit for people trying to figure out the code. Technically though: Reviewed-by: James Hogan Thanks James > + uasm_i_ehb(p); > + uasm_i_mfc0(p, w

[REVIEW PATCH 2/2] img-ir/hw: Fix potential deadlock stopping timer

2014-12-01 Thread James Hogan
;(&priv->lock)->rlock#2); *** DEADLOCK *** This is fixed by releasing the main spin lock while performing the del_timer_sync() call. The timer is prevented from restarting before the lock is reacquired by a new "stopping" flag which img_ir_handle_data() checks before updati

[REVIEW PATCH 1/2] img-ir/hw: Avoid clearing filter for no-op protocol change

2014-12-01 Thread James Hogan
tocols $ echo 0x > filter_mask $ echo nec > protocols After this, messages which don't match the filter still get received. Reported-by: Sifan Naeem Signed-off-by: James Hogan Cc: Mauro Carvalho Chehab Cc: # v3.15+ Cc: linux-me...@vger.kernel.org --- drivers/media/rc/img-ir/img-ir

[PATCH v2] MIPS: malta-time: Don't reinitialise RTC

2015-07-17 Thread James Hogan
initialise the RTC at boot") Signed-off-by: James Hogan Reviewed-by: Paul Burton Cc: Ralf Baechle Cc: Maciej W. Rozycki Cc: linux-m...@linux-mips.org Cc: # 3.14+ --- arch/mips/mti-malta/malta-time.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/arch/

[PATCH] MIPS: do_mcheck: Fix kernel code dump with EVA

2015-07-27 Thread James Hogan
__get_user to use normal loads to read the kernel code. Signed-off-by: James Hogan Cc: Ralf Baechle Cc: Markos Chandras Cc: Leonid Yegoshin Cc: linux-m...@linux-mips.org Cc: # 3.15+ --- arch/mips/kernel/traps.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/mips/kernel/traps.c b/arch

[PATCH] MIPS: show_stack: Fix stack trace with EVA

2015-07-27 Thread James Hogan
0110e800 1f3abd6c 1f17c6a0 ... Signed-off-by: James Hogan Cc: Ralf Baechle Cc: Markos Chandras Cc: Leonid Yegoshin Cc: linux

Re: [PATCH 1/8] i2c: img-scb: enable fencing for all versions of the ip

2015-07-27 Thread James Hogan
ed-off-by: Sifan Naeem > Cc: Stable kernel (v3.19+) That's a fairly non-conventional way to specify stable versions. The recommended way to Cc stable according to Documentation/stable_kernel_rules.txt is more like this: Cc: # 3.19.x- Patch looks fine though Acked-by: James

Re: [PATCH 1/8] i2c: img-scb: enable fencing for all versions of the ip

2015-07-28 Thread James Hogan
On 28/07/15 10:26, Sifan Naeem wrote: > Hi James, > >> -Original Message----- >> From: James Hogan >> Sent: 27 July 2015 21:21 >> To: Sifan Naeem >> Cc: Wolfram Sang; linux-...@vger.kernel.org; Stable kernel (v3.19+) >> Subject: Re: [PATCH 1/8] i2c: i

Re: [PATCH 3/8] i2c: img-scb: use DIV_ROUND_UP to round divisor values

2015-07-28 Thread James Hogan
> Cc: Stable kernel (v3.19+) Acked-by: James Hogan Cheers James > --- > drivers/i2c/busses/i2c-img-scb.c |8 ++-- > 1 file changed, 2 insertions(+), 6 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-img-scb.c > b/drivers/i2c/busses/i2c-img-scb.c > index 03

Re: [PATCH 4/8] i2c: img-scb: fix LOW and HIGH period values for the SCL clock

2015-07-28 Thread James Hogan
g requirements > + */ > + tckh = int_bitrate / 2; > + tckl = int_bitrate - tckh; too much indentation here. Otherwise looks good to me. Acked-by: James Hogan Cheers James > > - if (tckh > 0) > - data = tckh - 1; > -

Re: [PATCH 5/8] i2c: img-scb: reset interrupts in img_i2c_soft_reset

2015-07-28 Thread James Hogan
On 27/07/15 12:47, Sifan Naeem wrote: > Reset interrupt enable register and clear any generated interrupts > to make sure of a clean slate after a soft reset. Not doing so might > leave unhandle line status or generated interrupts which can cause > issues when handling new transfers. That already

Re: [PATCH 5/8] i2c: img-scb: reset interrupts in img_i2c_soft_reset

2015-07-28 Thread James Hogan
On 28/07/15 12:46, Sifan Naeem wrote: > Hi James, > >> -Original Message----- >> From: James Hogan >> Sent: 28 July 2015 12:36 >> To: Sifan Naeem; Wolfram Sang; linux-...@vger.kernel.org >> Cc: Stable kernel (v3.19+) >> Subject: Re: [PA

Re: [PATCH 6/8] i2c: img-scb: remove start bit detected status after handling

2015-07-28 Thread James Hogan
On 27/07/15 12:47, Sifan Naeem wrote: > Remove start bit detected status after it is handled, > doing so will prevent this condition being hit for > every interrupt on a particular transfer. > > Fixes: 27bce4 ("i2c: img-scb: Add Imagination Technologies I2C SCB driver") > Signed-off-by: Sifan Naee

Re: [PATCH 8/8] i2c: img-scb: verify support for requested bit rate

2015-07-29 Thread James Hogan
On 27/07/15 12:47, Sifan Naeem wrote: > The requested bit rate can be outside the range supported by the driver. > The maximum bit rate this driver supports at the moment is 400Khz. > > Return -EINVAL if the bit rate is larger than 400khz. > > Maximum speed supported by the driver can be increase

Re: [PATCH 7/8] i2c: img-scb: improve transaction complete handle

2015-07-29 Thread James Hogan
Hi Sifan, On 27/07/15 12:47, Sifan Naeem wrote: > Clear line status and all interrupts when transaction is complete, > as not doing so might leave unserviced interrupts that might be Do you have a specific example of when this might happen, and whether it could occur after img_i2c_complete_transa

[PATCH] MIPS: Flush RPS on kernel entry with EVA

2015-07-31 Thread James Hogan
be sensitive in the kernel address space due to EVA's overlapping user/kernel address spaces. Signed-off-by: James Hogan Cc: Ralf Baechle Cc: Markos Chandras Cc: Leonid Yegoshin Cc: linux-m...@linux-mips.org Cc: # 3.15.x- --- arch/mips/include/asm/stackframe.h

[PATCH 1/3] MIPS: uaccess: Fix strlen_user with EVA

2015-08-05 Thread James Hogan
se of strlen_user() has been all but eradicated from the mainline kernel, so only out of tree modules could be affected. Fixes: e3a9b07a9caf ("MIPS: asm: uaccess: Add EVA support for str*_user operations") Signed-off-by: James Hogan Cc: Ralf Baechle Cc: Markos Chandras Cc: Paul Bur

[PATCH 0/3] MIPS: uaccess: EVA fixes

2015-08-05 Thread James Hogan
These patches fix bugs in the MIPS uaccess functions for MIPS Enhanced Virtual Addressing (EVA). Only the first is tagged for stable, as the other two use eva_kernel_access() which was only added in v4.2. I'll submit backports of them after they get merged. James Hogan (3): MIPS: uaccess

[PATCH] MIPS: Fix enabling of DEBUG_STACKOVERFLOW

2015-06-04 Thread James Hogan
nifests to the preprocessor as CONFIG_DEBUG_STACKOVERFLOW, so switch it to using that definition instead. Fixes: 334c86c494b9 ("MIPS: IRQ: Add stackoverflow detection") Signed-off-by: James Hogan Cc: Ralf Baechle Cc: Adam Jiang Cc: linux-m...@linux-mips.org Cc: # 2.6.37+ --- arch/m

Re: [PATCH] MIPS: KVM: do not sign extend on unsigned MMIO load

2015-06-08 Thread James Hogan
Hi stable folk, On 08/05/15 15:16, James Hogan wrote: > On 07/05/15 13:47, Nicholas Mc Guire wrote: >> Fix possible unintended sign extension in unsigned MMIO loads by casting >> to uint16_t in the case of mmio_needed != 2. >> >> Signed-off-by: Nicholas Mc Guire >

[PATCH stable <3.17] MIPS: KVM: Do not sign extend on unsigned MMIO load

2015-07-08 Thread James Hogan
From: Nicholas Mc Guire commit ed9244e6c534612d2b5ae47feab2f55a0d4b4ced upstream. Fix possible unintended sign extension in unsigned MMIO loads by casting to uint16_t in the case of mmio_needed != 2. Signed-off-by: Nicholas Mc Guire Reviewed-by: James Hogan Tested-by: James Hogan Cc: Gleb

[PATCH 0/2] ttyFDC: Fix build problems due to use of module_{init,exit}

2015-10-06 Thread James Hogan
Fix ttyFDC build breakage since v4.2-rc3, due to use of module_driver() without including module.h (its currently a builtin only driver). The first patch adds a macro used by second patch, so they both need to go into stable v4.2 together. James Hogan (2): MIPS: CDMM: Add

[PATCH 2/2] ttyFDC: Fix build problems due to use of module_{init,exit}

2015-10-06 Thread James Hogan
dded later, the code can always be resurrected. Signed-off-by: James Hogan Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Paul Gortmaker Cc: linux-m...@linux-mips.org Cc: # 4.2.x- --- drivers/tty/mips_ejtag_fdc.c | 35 +-- 1 file changed, 1 insertion(+), 34 deletion

[PATCH 1/2] MIPS: CDMM: Add builtin_mips_cdmm_driver() macro

2015-10-06 Thread James Hogan
Add helper macro builtin_mips_cdmm_driver() for builtin CDMM drivers that don't do anything special in init and have no exit. The module_mips_cdmm_driver() helper isn't really appropriate for drivers that can't be built as a module. Signed-off-by: James Hogan Cc: Greg Kroah-Ha

Re: [PATCH 2/2] ttyFDC: Fix build problems due to use of module_{init,exit}

2015-10-06 Thread James Hogan
Hi Paul, On Tue, Oct 06, 2015 at 06:23:00PM -0400, Paul Gortmaker wrote: > [[PATCH 2/2] ttyFDC: Fix build problems due to use of module_{init,exit}] On > 06/10/2015 (Tue 15:12) James Hogan wrote: > > > Commit 0fd972a7d91d (module: relocate module_init from init.h to > >

Re: patch "ttyFDC: Fix build problems due to use of module_{init,exit}" added to tty-next

2015-10-19 Thread James Hogan
about this process, please let me know. > > > From 3e8137a185240fa6da0ff91cd9c604716371903b Mon Sep 17 00:00:00 2001 > From: James Hogan > Date: Tue, 6 Oct 2015 15:12:06 +0100 > Subject: ttyFDC: Fix build problems due to use of module_{init,exit} > MIME-Version: 1.0 > Content-Type: text/pl

Re: patch "ttyFDC: Fix build problems due to use of module_{init,exit}" added to tty-next

2015-10-19 Thread James Hogan
On Mon, Oct 19, 2015 at 08:11:52AM -0700, Greg KH wrote: > On Mon, Oct 19, 2015 at 10:59:17AM +0100, James Hogan wrote: > > Hi Greg, > > > > On Sun, Oct 18, 2015 at 09:07:52AM -0700, gre...@linuxfoundation.org wrote: > > > > > > This is a note to let

Re: [PATCH v2 2/2] MIPS: fix kernel lockup or crash after CPU offline/online

2015-01-30 Thread James Hogan
Hi Maciej, On 30/01/15 09:25, Maciej W. Rozycki wrote: > On Thu, 15 Jan 2015, Aaro Koskinen wrote: > >> As printk() invocation can cause e.g. a TLB miss, printk() cannot be >> called before the exception handlers have been properly initialized. >> This can happen e.g. when netconsole has been loa

Re: [PATCH v2 2/2] MIPS: fix kernel lockup or crash after CPU offline/online

2015-01-30 Thread James Hogan
On 30/01/15 12:47, Maciej W. Rozycki wrote: > On Fri, 30 Jan 2015, James Hogan wrote: > >>> Hmm, why can a call to `printk' cause a TLB miss, what's so special about >>> this function? Does it use kernel mapped addresses for any purpose such >>&g

[PATCH 2/2] MIPS: traps: Fix inline asm ctc1 missing .set hardfloat

2015-01-30 Thread James Hogan
.o' failed Fix that to use the new write_32bit_cp1_register() macro so that ".set hardfloat" is automatically added when -msoft-float is in use. Fixes 842dfc11ea9a ("MIPS: Fix build with binutils 2.24.51+") Signed-off-by: James Hogan Cc: Ralf Baechle Cc: Paul Burton Cc: linux-m...@li

Re: [PATCH v2 2/2] MIPS: fix kernel lockup or crash after CPU offline/online

2015-01-30 Thread James Hogan
On Fri, Jan 30, 2015 at 07:55:32PM +0200, Aaro Koskinen wrote: > Hi, > > On Fri, Jan 30, 2015 at 02:59:57PM +0000, James Hogan wrote: > > On 30/01/15 12:47, Maciej W. Rozycki wrote: > > > On Fri, 30 Jan 2015, James Hogan wrote: > > > > > >>>

[PATCH] KVM: MIPS: Disable HTW while in guest

2015-02-04 Thread James Hogan
cases the HTW is only disabled in normal kernel mode while interrupts are disabled, so that the HTW doesn't get left disabled if the process is preempted. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: Ralf Baechle Cc: Markos Chandras Cc: Gleb Natapov Cc: k...@vger.kernel.org Cc: linux-

[PATCH] KVM: MIPS: Don't leak FPU/DSP to guest

2015-02-04 Thread James Hogan
clear the MX bit again when re-entering the guest. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: Ralf Baechle Cc: Sanjay Lal Cc: Gleb Natapov Cc: k...@vger.kernel.org Cc: linux-m...@linux-mips.org Cc: # v3.10+: 044f0f03eca0: MIPS: KVM: Deliver guest interrupts Cc: # v3.10+ --- arch

Re: Build failures in (3.10, 3.14, 3.18)-stable-queue

2015-02-09 Thread James Hogan
Hi Greg, On 09/02/15 08:16, Greg Kroah-Hartman wrote: > On Sun, Feb 08, 2015 at 09:35:29AM -0800, Guenter Roeck wrote: >> All mips builds (3.18 only) >> >> arch/mips/kernel/traps.c: In function 'enable_restore_fp_context': >> arch/mips/kernel/traps.c:1187:4: error: implicit declaration of function

Re: Build failures in (3.10, 3.14, 3.18)-stable-queue

2015-02-09 Thread James Hogan
On 09/02/15 15:35, Greg Kroah-Hartman wrote: > On Mon, Feb 09, 2015 at 10:10:33AM +0000, James Hogan wrote: >> Hi Greg, >> >> On 09/02/15 08:16, Greg Kroah-Hartman wrote: >>> On Sun, Feb 08, 2015 at 09:35:29AM -0800, Guenter Roeck wrote: >>>> All mips bui

Re: [PATCH] KVM: MIPS: Don't leak FPU/DSP to guest

2015-02-09 Thread James Hogan
Hi Paolo, On Wed, Feb 04, 2015 at 05:06:37PM +, James Hogan wrote: > The FPU and DSP are enabled via the CP0 Status CU1 and MX bits by > kvm_mips_set_c0_status() on a guest exit, presumably in case there is > active state that needs saving if pre-emption occurs. However neither o

Re: [PATCH] KVM: MIPS: Don't leak FPU/DSP to guest

2015-02-10 Thread James Hogan
On Tue, Feb 10, 2015 at 09:01:07AM +0100, Paolo Bonzini wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > > On 09/02/2015 23:58, James Hogan wrote: > >> First lets save and disable the FPU (and MSA) state with > >> lose_fpu(1) > > >

[PATCH 2/2] MIPS: Export MSA functions used by lose_fpu(1) for KVM

2015-02-10 Thread James Hogan
"): ERROR: "_save_msa" [arch/mips/kvm/kvm.ko] undefined! Fixes: f798217dfd03 (KVM: MIPS: Don't leak FPU/DSP to guest) Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: Ralf Baechle Cc: Paul Burton Cc: Gleb Natapov Cc: k...@vger.kernel.org Cc: linux-m...@linux-mips.org Cc:

[PATCH 0/2] MIPS: Export functions used by lose_fpu(1) for KVM

2015-02-10 Thread James Hogan
leak FPU/DSP to guest) Cc: Paolo Bonzini Cc: Ralf Baechle Cc: Paul Burton Cc: Gleb Natapov Cc: k...@vger.kernel.org Cc: linux-m...@linux-mips.org Cc: James Hogan (2): MIPS: Export FP functions used by lose_fpu(1) for KVM MIPS: Export MSA functions used by lose_fpu(1) for KVM arch/mips/ker

[PATCH 1/2] MIPS: Export FP functions used by lose_fpu(1) for KVM

2015-02-10 Thread James Hogan
_save_fp" [arch/mips/kvm/kvm.ko] undefined! Fixes: f798217dfd03 (KVM: MIPS: Don't leak FPU/DSP to guest) Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: Ralf Baechle Cc: Paul Burton Cc: Gleb Natapov Cc: k...@vger.kernel.org Cc: linux-m...@linux-mips.org Cc: # 3.10+ --- arch/mips/ker

[PATCH] MIPS: KVM: Fix trace event to save PC directly

2015-02-24 Thread James Hogan
he correct value is accessible later. Fixes: 669e846e6c4e ("KVM/MIPS32: MIPS arch specific APIs for KVM") Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: Ralf Baechle Cc: Marcelo Tosatti Cc: Gleb Natapov Cc: Steven Rostedt Cc: Ingo Molnar Cc: linux-m...@linux-mips.org Cc: k..

[PATCH] sunrpc: Fix trace events to store data in the struct

2015-02-24 Thread James Hogan
rpc: add some tracepoints around enqueue ...") Signed-off-by: James Hogan Cc: Jeff Layton Cc: J. Bruce Fields Cc: Trond Myklebust Cc: Steven Rostedt Cc: Ingo Molnar Cc: # v3.19+ --- Build tested only. Perhaps somebody familiar with the code could give it a spin to sanity check the tr

[PATCH] metag: Fix KSTK_EIP() and KSTK_ESP() macros

2015-02-24 Thread James Hogan
And /proc//stat now correctly reports the PC in libuClibc (134320308 = 0x80190b4) and the A0StP in the [stack] region (989864576 = 0x3b002280): # cat /proc/self/stat 51 (cat) R ... 989864576 134320308 ... Reported-by: Alexey Brodkin Reported-by: Vineet Gupta Signed-off-by: James

Re: [PATCH] sunrpc: Fix trace events to store data in the struct

2015-02-24 Thread James Hogan
Hi Trond, On 24/02/15 13:36, Trond Myklebust wrote: > On Tue, Feb 24, 2015 at 6:47 AM, James Hogan wrote: >> Commit 83a712e0afef ("sunrpc: add some tracepoints around enqueue and >> dequeue of svc_xprt") merged in v3.19-rc1 added some new trace events, >> howeve

Re: [PATCH] sunrpc: Fix trace events to store data in the struct

2015-02-24 Thread James Hogan
Hi Steven, On 24/02/15 14:09, Steven Rostedt wrote: > On Tue, 24 Feb 2015 11:47:56 + > James Hogan wrote: > > > >> TP_printk("xprt=0x%p addr=%pIScp pid=%d flags=%s", __entry->xprt, >> -(struct sockaddr *)&__entry->xprt->xp

[PATCH 1/4] MIPS: Fix KVM guest fixmap address

2015-04-27 Thread James Hogan
fine FIXADDR_TOP as 0x7ffe in the guest kernel mapped region when CONFIG_KVM_GUEST is defined. Signed-off-by: James Hogan Cc: Ralf Baechle Cc: linux-m...@linux-mips.org Cc: # v3.10+ --- arch/mips/include/asm/mach-generic/spaces.h | 4 1 file changed, 4 insertions(+) diff --git a/arch/