Re: Re-tune x86 uaccess code for PREEMPT_VOLUNTARY

2013-08-09 Thread Mike Galbraith
On Fri, 2013-08-09 at 21:42 -0700, H. Peter Anvin wrote: > On 08/09/2013 04:04 PM, Andi Kleen wrote: > > > > This patch kit is an attempt to get us back to sane code, > > mostly by doing proper inlining and doing sleep checks in the right > > place. Unfortunately I had to add one tree sweep to

Re: Re-tune x86 uaccess code for PREEMPT_VOLUNTARY

2013-08-09 Thread H. Peter Anvin
On 08/09/2013 04:04 PM, Andi Kleen wrote: > > This patch kit is an attempt to get us back to sane code, > mostly by doing proper inlining and doing sleep checks in the right > place. Unfortunately I had to add one tree sweep to avoid an nasty > include loop. > > It costs a bit of text space,

Re: [PATCH 5/8] rcu: eliminate deadlock for rcu read site

2013-08-09 Thread Lai Jiangshan
Hi, Steven I was considering rtmutex's lock->wait_lock is a scheduler lock, But it is not, and it is just a spinlock of process context. I hope you change it to a spinlock of irq context. 1) it causes rcu read site more deadlockable, example: x is a spinlock of softirq context. CPU1

Re: [PATCH 35/35] cpufreq: tegra: use cpufreq_table_validate_and_show()

2013-08-09 Thread Viresh Kumar
On 10 August 2013 03:38, Stephen Warren wrote: > Well, I don't see any issues running this, although the cpufreq sysfs > files seem to have disappeared on Tegra, even without your changes, so > I'm not sure how to really verify cpufreq. > > Did the sysfs files go away, or do I need to investigate

Re: cpufreq crash in pm/linux-next 08-07-2013

2013-08-09 Thread Viresh Kumar
On 10 August 2013 05:56, Yinghai Lu wrote: > from your pm/linux-next > > > [7.918603] calling acpi_cpufreq_init+0x0/0x1df @ 1 > [7.923917] BUG: unable to handle kernel NULL pointer dereference > at (null) > [7.926780] IP: [] __list_del_entry+0xb7/0xe0 > [7.927799] PGD 0

Re: x86: early boot crash: "alloc_low_page: ran out of memory" (bisected)

2013-08-09 Thread Yinghai Lu
On Fri, Aug 9, 2013 at 7:10 PM, Yinghai Lu wrote: > On Fri, Aug 9, 2013 at 6:19 PM, Dave Hansen wrote: >> On 08/09/2013 04:23 PM, Yinghai Lu wrote: >>> On Fri, Aug 9, 2013 at 4:18 PM, Dave Hansen wrote: I'm getting a 100% reproducible panic early in boot: >> ... > early console in

Re: [PATCH] regulator: da9210: Remove redundant MODULE_ALIAS

2013-08-09 Thread Axel Lin
2013/8/10 Mark Brown : > On Sat, Aug 10, 2013 at 12:25:58AM +0800, Axel Lin wrote: > >> -MODULE_AUTHOR("S Twiss "); >> +MODULE_AUTHOR("Steve Twiss "); > > It's perfectly reasonable for someone to want to be referred to by their > initial, or their full spelled out name, or a nickname, or... Oh, I

Re: [PATCH] ACPI, cpu hotplug: move try_offline_node() after acpi_unmap_lsapic()

2013-08-09 Thread Toshi Kani
On Sat, 2013-08-10 at 01:29 +0200, Rafael J. Wysocki wrote: > On Friday, August 09, 2013 04:16:56 PM Toshi Kani wrote: > > On Fri, 2013-08-09 at 15:28 +0800, Tang Chen wrote: > > > On 08/07/2013 12:56 AM, Toshi Kani wrote: > > > > On Tue, 2013-08-06 at 19:11 +0900, Yasuaki Ishimatsu wrote: > > >

Re: x86: early boot crash: "alloc_low_page: ran out of memory" (bisected)

2013-08-09 Thread Yinghai Lu
On Fri, Aug 9, 2013 at 6:19 PM, Dave Hansen wrote: > On 08/09/2013 04:23 PM, Yinghai Lu wrote: >> On Fri, Aug 9, 2013 at 4:18 PM, Dave Hansen wrote: >>> I'm getting a 100% reproducible panic early in boot: > ... early console in setup code [0.00] Initializing cgroup subsys

Re: [PATCH 10/13] tracing/uprobes: Fetch args before reserving a ring buffer

2013-08-09 Thread zhangwei(Jovi)
On Sat, Aug 10, 2013 at 9:26 AM, zhangwei(Jovi) wrote: > On Sat, Aug 10, 2013 at 12:20 AM, Oleg Nesterov wrote: >> >> Sorry, I didn't read this series yet. Not that I think this needs my >> help, but I'll try to do this a later... >> >> On 08/09, Masami Hiramatsu wrote: >> > >> > I just concern

Re: cpufreq crash in pm/linux-next 08-07-2013

2013-08-09 Thread Rafael J. Wysocki
On Friday, August 09, 2013 05:50:45 PM Yinghai Lu wrote: > On Fri, Aug 9, 2013 at 5:26 PM, Yinghai Lu wrote: > > from your pm/linux-next > > > > > > [7.918603] calling acpi_cpufreq_init+0x0/0x1df @ 1 > > [7.923917] BUG: unable to handle kernel NULL pointer dereference > > at

Re: [PATCH 10/13] tracing/uprobes: Fetch args before reserving a ring buffer

2013-08-09 Thread zhangwei(Jovi)
On Sat, Aug 10, 2013 at 12:20 AM, Oleg Nesterov wrote: > > Sorry, I didn't read this series yet. Not that I think this needs my > help, but I'll try to do this a later... > > On 08/09, Masami Hiramatsu wrote: > > > > I just concern using kmalloc() in the event handler. > > GFP_KERNEL should be

Re: x86: early boot crash: "alloc_low_page: ran out of memory" (bisected)

2013-08-09 Thread Dave Hansen
On 08/09/2013 04:23 PM, Yinghai Lu wrote: > On Fri, Aug 9, 2013 at 4:18 PM, Dave Hansen wrote: >> I'm getting a 100% reproducible panic early in boot: ... >>> early console in setup code >>> [0.00] Initializing cgroup subsys cpuset >>> [0.00] Initializing cgroup subsys cpu >>> [

[PATCH v2] usb: Move definition of USB_EHCI_BIG_ENDIAN_MMIO et al. out side of the ifs.

2013-08-09 Thread David Daney
From: David Daney When CONFIG_USB_SUPPORT is not selected we get things like: scripts/kconfig/mconf Kconfig warning: (MIPS_SEAD3 && PMC_MSP && CPU_CAVIUM_OCTEON) selects USB_EHCI_BIG_ENDIAN_MMIO which has unmet direct dependencies (USB_SUPPORT && USB) It is much cleaner to make the various

Re: [HANG] Trouble with NEC-based USB adapter in PCMCIA slot on E7110

2013-08-09 Thread Alan Stern
On Sat, 10 Aug 2013, Thomas Richter wrote: > Hi Alan, > > >> Will try and report back, thanks. I've bisected it down in the meantime > >> to a change from 2.6.31.6 to 2.6.32.6. Interestingly, this is very much > >> the same time when the udev userland changed. It works with 2.6.31.6 old > >>

Re: [PATCH] usb: Move definition of USB_EHCI_BIG_ENDIAN_MMIO out side of the ifs.

2013-08-09 Thread Alan Stern
On Fri, 9 Aug 2013, David Daney wrote: > From: David Daney > > When CONFIG_USB_SUPPORT is not selected we get things like: > > scripts/kconfig/mconf Kconfig > warning: (MIPS_SEAD3 && PMC_MSP && CPU_CAVIUM_OCTEON) selects > USB_EHCI_BIG_ENDIAN_MMIO which has unmet direct dependencies

Re: cpufreq crash in pm/linux-next 08-07-2013

2013-08-09 Thread Yinghai Lu
On Fri, Aug 9, 2013 at 5:26 PM, Yinghai Lu wrote: > from your pm/linux-next > > > [7.918603] calling acpi_cpufreq_init+0x0/0x1df @ 1 > [7.923917] BUG: unable to handle kernel NULL pointer dereference > at (null) > [7.926780] IP: [] __list_del_entry+0xb7/0xe0 > [

Re: [PATCH 1/1] pagemap: fix buffer overflow in add_page_map()

2013-08-09 Thread yonghua zheng
Update the patch according to Naoya's comment, I also run ./scripts/checkpatch.pl, and it passed ;D. >From 96826b0fdf9ec6d6e16c2c595f371dbb841250f7 Mon Sep 17 00:00:00 2001 From: Yonghua Zheng Date: Mon, 5 Aug 2013 12:12:24 +0800 Subject: [PATCH 1/1] pagemap: fix buffer overflow in

Re: [RFC v02 0/5] Power Capping Framework and RAPL Driver

2013-08-09 Thread Srinivas Pandruvada
On 08/07/2013 09:12 AM, Srinivas Pandruvada wrote: Overview With the evolution of technologies, which enables power monitoring and limiting, more and more devices are able to constrain their power consumption under certain limits. There are several use cases for such technologies: - Power

cpufreq crash in pm/linux-next 08-07-2013

2013-08-09 Thread Yinghai Lu
from your pm/linux-next [7.918603] calling acpi_cpufreq_init+0x0/0x1df @ 1 [7.923917] BUG: unable to handle kernel NULL pointer dereference at (null) [7.926780] IP: [] __list_del_entry+0xb7/0xe0 [7.927799] PGD 0 [7.927799] Oops: [#1] SMP [7.927799] Modules

[PATCH] usb: Move definition of USB_EHCI_BIG_ENDIAN_MMIO out side of the ifs.

2013-08-09 Thread David Daney
From: David Daney When CONFIG_USB_SUPPORT is not selected we get things like: scripts/kconfig/mconf Kconfig warning: (MIPS_SEAD3 && PMC_MSP && CPU_CAVIUM_OCTEON) selects USB_EHCI_BIG_ENDIAN_MMIO which has unmet direct dependencies (USB_SUPPORT && USB) It is much cleaner to make the various

Re: [RFC][PATCH 3/2] x86/jump labels: Count and display the short jumps used

2013-08-09 Thread Andy Lutomirski
On 08/07/2013 02:56 PM, Linus Torvalds wrote: > > Both of the biased cases *might* also want things like "save register > state in the unlikely path so that the *likely* path doesn't have to". > Think things like "it's a leaf function, and the likely path doesn't > need any temporaries, but the

Re: [v2] Enhanced support for MPC8xx/8xxx watchdog

2013-08-09 Thread Scott Wood
On Thu, 2013-08-08 at 07:50 +0200, leroy christophe wrote: > Le 26/06/2013 01:04, Scott Wood a écrit : > > What happens if there's a race? If another CPU updates wdt_last_ping in > > parallel, then you could see wdt_last_ping greater than the value you > > read for jiffies. Since this is an

[GIT PATCH] Staging driver fixes for 3.11-rc5

2013-08-09 Thread Greg KH
The following changes since commit 5ae90d8e467e625e447000cb4335c4db973b1095: Linux 3.11-rc3 (2013-07-28 20:53:33 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/ tags/staging-3.11-rc5 for you to fetch changes up to

[GIT PATCH] USB fixes for 3.11-rc5

2013-08-09 Thread Greg KH
The following changes since commit c095ba7224d8edc71dcef0d655911399a8bd4a3f: Linux 3.11-rc4 (2013-08-04 13:46:46 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/ tags/usb-3.11-rc5 for you to fetch changes up to

Re: linux-next: Tree for Aug 9

2013-08-09 Thread Stephen Rothwell
Hi Randy, On Fri, 09 Aug 2013 09:53:36 -0700 Randy Dunlap wrote: > > and if you are not using git but are using tarballs instead, > where is the patch file? Yeah, sorry I did not notice the error from kup. It should be there now. -- Cheers, Stephen Rothwell

Re: [PATCH 001/001] CHAR DRIVERS: a simple device to give daemons a /sys-like interface

2013-08-09 Thread Greg Kroah-Hartman
On Fri, Aug 09, 2013 at 04:35:16PM -0700, Bob Smith wrote: > Greg Kroah-Hartman wrote: > >Good protocols exist, look at protobufs from Google if you want to > >define your own. Never create your own protocol these days, it doesn't > >make sense, be it a text one or something else. > > OK. I was

Re: [PATCH v4 1/1] ASoc: kirkwood: add DT support to the mvebu audio subsystem

2013-08-09 Thread Mark Brown
On Fri, Aug 09, 2013 at 09:38:47PM +0100, Russell King - ARM Linux wrote: > On Fri, Aug 09, 2013 at 08:44:34PM +0100, Mark Brown wrote: > > If someone wants to it should also be possible to convert the existing > > platforms without S/PDIF support over to DT, providing you don't mind > > changing

Re: [PATCH] zram: bug fix: delay lock holding in zram_slot_free_noity

2013-08-09 Thread Greg Kroah-Hartman
On Tue, Aug 06, 2013 at 01:26:34AM +0900, Minchan Kim wrote: > On Mon, Aug 05, 2013 at 04:18:34PM +0900, Minchan Kim wrote: > > I was preparing to promote zram and it was almost done. > > Before sending patch, I tried to test and eyebrows went up. > > > > [1] introduced down_write in

Re: [PATCH 001/001] CHAR DRIVERS: a simple device to give daemons a /sys-like interface

2013-08-09 Thread Bob Smith
Greg Kroah-Hartman wrote: Good protocols exist, look at protobufs from Google if you want to define your own. Never create your own protocol these days, it doesn't make sense, be it a text one or something else. OK. I was using the term in the broader sense in which _meaning_ is assigned to

Re: [PATCH part4 2/4] x86, acpica, acpi: Try to find if SRAT is overrided earlier.

2013-08-09 Thread Yinghai Lu
On Fri, Aug 9, 2013 at 2:41 AM, Tang Chen wrote: > On 08/09/2013 12:29 AM, Yinghai Lu wrote: > .. > >> >> Please check if you can reuse first half of my patchset, so find and copy >> override table earlier. the copied acpi tables could be near kernel code >> range. >> > > I don't think we

Re: [ 000/102] 3.10.6-stable review

2013-08-09 Thread Greg Kroah-Hartman
On Fri, Aug 09, 2013 at 04:21:42PM -0700, Guenter Roeck wrote: > On 08/09/2013 12:11 PM, Greg Kroah-Hartman wrote: > >On Thu, Aug 08, 2013 at 11:57:55PM -0700, Guenter Roeck wrote: > >>On 08/08/2013 06:56 PM, Greg Kroah-Hartman wrote: > >>>This is the start of the stable review cycle for the

[PATCH 05/16] rename __get_map() to efi_get_memory_map(), add parameter to optionally return mmap key. The mmap key is required to exit EFI boot services, and allows efi_get_memory_map() to be used fo

2013-08-09 Thread Roy Franz
Signed-off-by: Roy Franz --- drivers/firmware/efi/efi-stub-helper.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/firmware/efi/efi-stub-helper.c b/drivers/firmware/efi/efi-stub-helper.c index 40cd16e..1d0a079 100644 ---

[PATCH 03/16] Rename memory allocation/free functions

2013-08-09 Thread Roy Franz
Rename them to be more similar, as low_free() could be used to free memory allocated by both high_alloc() and low_alloc(). high_alloc() -> efi_high_alloc() low_alloc() -> efi_low_alloc() low_free() -> efi_free() Signed-off-by: Roy Franz --- arch/x86/boot/compressed/eboot.c | 19

[PATCH 02/16] Add system pointer argument to shared EFI stub related functions so they no longer use global system table pointer as they did when part of eboot.c. This code is now shared, so using a g

2013-08-09 Thread Roy Franz
Signed-off-by: Roy Franz --- arch/x86/boot/compressed/eboot.c | 38 +++-- drivers/firmware/efi/efi-stub-helper.c | 96 +--- 2 files changed, 72 insertions(+), 62 deletions(-) diff --git a/arch/x86/boot/compressed/eboot.c

[PATCH 10/16] Move EFI_READ_CHUNK_SIZE define to shared location.

2013-08-09 Thread Roy Franz
This #define is only used the the shared code, so move it there. Signed-off-by: Roy Franz --- arch/x86/boot/compressed/eboot.h |1 - drivers/firmware/efi/efi-stub-helper.c |2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/x86/boot/compressed/eboot.h

[PATCH 06/16] Enforce minimum alignment of 1 page on allocations. The efi_high_alloc() and efi_low_alloc() functions use the EFI_ALLOCATE_ADDRESS option to the EFI function allocate_pages(), which req

2013-08-09 Thread Roy Franz
The existing code could fail to allocate depending on allocation size, as although repeated allocation attempts were made, none were guaranteed to be page aligned. Signed-off-by: Roy Franz --- drivers/firmware/efi/efi-stub-helper.c | 14 ++ 1 file changed, 14 insertions(+) diff

[PATCH 08/16] Generalize handle_ramdisks() and rename to handle_cmdline_files().

2013-08-09 Thread Roy Franz
The handle_cmdline_files now takes the option to handle as a string, and returns the loaded data through parameters, rather than taking an x86 specific setup_header structure. For ARM, this will be used to load a device tree blob in addition to initrd images. Signed-off-by: Roy Franz ---

[PATCH 09/16] Renames in handle_cmdline_files() to complete generalization.

2013-08-09 Thread Roy Franz
Rename variables to be not initrd specific, as now the function loads arbitrary files. Signed-off-by: Roy Franz --- drivers/firmware/efi/efi-stub-helper.c | 92 1 file changed, 46 insertions(+), 46 deletions(-) diff --git

[PATCH 13/16] resolve warnings found on ARM compile

2013-08-09 Thread Roy Franz
2 unused labels 1 "value computed is not used" Signed-off-by: Roy Franz --- drivers/firmware/efi/efi-stub-helper.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/firmware/efi/efi-stub-helper.c b/drivers/firmware/efi/efi-stub-helper.c index 4bb542f..3e82cb0

[PATCH 11/16] Add proper definitions for some EFI function pointers.

2013-08-09 Thread Roy Franz
The x86/AMD64 EFI stubs must us a call wrapper to convert between the Linux and EFI ABIs, so void pointers are sufficient. For ARM, the ABIs are compatible, so we can directly invoke the function pointers. The functions that are used by the ARM stub are updated to match the EFI definitions.

[PATCH 07/16] Allow efi_free() to be called with size of 0, and do nothing in that case.

2013-08-09 Thread Roy Franz
Make efi_free() safely callable with size of 0, similar to free() being callable with NULL pointers. Remove size checks that this makes redundant. This also avoids some size checks in the ARM EFI stub code that will be added as well. Signed-off-by: Roy Franz ---

[PATCH 16/16] Add config EFI_STUB for ARM to Kconfig

2013-08-09 Thread Roy Franz
Signed-off-by: Roy Franz --- arch/arm/Kconfig | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 43594d5..8607d03 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1805,6 +1805,17 @@ config UACCESS_WITH_MEMCPY However, if

[PATCH 12/16] Fix types in EFI calls to match EFI function definitions.

2013-08-09 Thread Roy Franz
EFI calls can made directly on ARM, so the function pointers are directly invoked. This allows types to be checked at compile time, so here we ensure that the parameters match the function signature. Signed-off-by: Roy Franz --- drivers/firmware/efi/efi-stub-helper.c | 15 +-- 1

[PATCH V3 RFC 00/16] EFI stub for ARM

2013-08-09 Thread Roy Franz
This patch series adds EFI stub support for the ARM architecture. Some code that was previously only used by x86/x86_64 is now shared and has been made more general. The stub for ARM is implemented in a similar manner to x86 in that it is a shim layer between EFI and the normal zImage/bzImage

[PATCH 01/16] Move common EFI stub code from x86 arch code to common location

2013-08-09 Thread Roy Franz
No code changes made, just moving functions from x86 arch directory to common location. Code is shared using #include, similar to how decompression code is shared among architectures. Signed-off-by: Roy Franz --- arch/x86/boot/compressed/eboot.c | 442 +-

[PATCH 04/16] Add minimum address parameter to efi_low_alloc()

2013-08-09 Thread Roy Franz
This allows allocations to be made low in memory while avoiding allocations at the base of memory. Signed-off-by: Roy Franz --- arch/x86/boot/compressed/eboot.c | 11 ++- drivers/firmware/efi/efi-stub-helper.c |7 +-- 2 files changed, 11 insertions(+), 7 deletions(-)

[PATCH 14/16] Add strstr to compressed string.c for ARM.

2013-08-09 Thread Roy Franz
The shared efi-stub-helper.c functions require a strstr implementation. Implementation copied from arch/x86/boot/string.c Signed-off-by: Roy Franz --- arch/arm/boot/compressed/string.c | 21 + 1 file changed, 21 insertions(+) diff --git a/arch/arm/boot/compressed/string.c

[PATCH 15/16] Add EFI stub for ARM

2013-08-09 Thread Roy Franz
This patch adds EFI stub support for the ARM Linux kernel. The EFI stub operations similarly to the x86 stub: it is a shim between the EFI firmware and the normal zImage entry point, and sets up the environment that the zImage is expecting. This includes loading the initrd (optionaly) and device

Re: x86: early boot crash: "alloc_low_page: ran out of memory" (bisected)

2013-08-09 Thread Yinghai Lu
ple of config options that need to get set just right to trigger it, > but CONFIG_DEBUG_PAGEALLOC seems to be the main one. Full config is here: > > http://sr71.net/~dave/intel/foo/config-bigbox-crash-20130809.txt > > I bisected it back to this commit (which I seem to r

Re: [ 000/102] 3.10.6-stable review

2013-08-09 Thread Guenter Roeck
On 08/09/2013 12:11 PM, Greg Kroah-Hartman wrote: On Thu, Aug 08, 2013 at 11:57:55PM -0700, Guenter Roeck wrote: On 08/08/2013 06:56 PM, Greg Kroah-Hartman wrote: This is the start of the stable review cycle for the 3.10.6 release. There are 102 patches in this series, all will be posted as a

Re: [PATCH] ACPI, cpu hotplug: move try_offline_node() after acpi_unmap_lsapic()

2013-08-09 Thread Rafael J. Wysocki
On Friday, August 09, 2013 04:16:56 PM Toshi Kani wrote: > On Fri, 2013-08-09 at 15:28 +0800, Tang Chen wrote: > > On 08/07/2013 12:56 AM, Toshi Kani wrote: > > > On Tue, 2013-08-06 at 19:11 +0900, Yasuaki Ishimatsu wrote: > > >> try_offline_node() checks that all cpus related with removed node

x86: early boot crash: "alloc_low_page: ran out of memory" (bisected)

2013-08-09 Thread Dave Hansen
ger it, but CONFIG_DEBUG_PAGEALLOC seems to be the main one. Full config is here: http://sr71.net/~dave/intel/foo/config-bigbox-crash-20130809.txt I bisected it back to this commit (which I seem to remember causing some other probems): > commit 8170e6bed465b4b0c7687f93e9948aca4358a33b > Author: H. Pe

Re: [PATCH] genalloc: fix overflow of ending address of memory chunk

2013-08-09 Thread Andrew Morton
On Wed, 07 Aug 2013 14:26:18 +0900 Joonyoung Shim wrote: > In struct gen_pool_chunk, end_addr means ending address of memory chunk, > but actually it is starting address + size of memory chunk in codes, so > it points the address increased one instead of correct ending address. > > The ending

[PATCH 12/13] x86: move __copy_*_nocache might fault check out of line

2013-08-09 Thread Andi Kleen
From: Andi Kleen Can as well do the normal conditional resched check out of line. This saves one function call. Signed-off-by: Andi Kleen --- arch/x86/include/asm/uaccess_64.h | 6 -- arch/x86/lib/copy_user_nocache_64.S | 7 +++ 2 files changed, 11 insertions(+), 2 deletions(-)

[PATCH 11/13] sched: Inline the need_resched test into the caller for _cond_resched

2013-08-09 Thread Andi Kleen
From: Andi Kleen _cond_resched is very common in kernel calls, e.g. it's used in every user access. Usually it does at least two explicit calls just to decide to do nothing: _cond_resched and should_resched(). Inline a need_resched() into the caller to avoid these calls in the common case of no

[PATCH 01/13] x86: Add 1/2/4/8 byte optimization to 64bit __copy_{from,to}_user_inatomic

2013-08-09 Thread Andi Kleen
From: Andi Kleen The 64bit __copy_{from,to}_user_inatomic always called copy_from_user_generic, but skipped the special optimizations for 1/2/4/8 byte accesses. This especially hurts the futex call, which accesses the 4 byte futex user value with a complicated fast string operation in a

[PATCH 09/13] x86: Move cond_resched into the out of line get_user code

2013-08-09 Thread Andi Kleen
From: Andi Kleen CONFIG_PREEMPT_VOLUNTARY kernels always do a cond_resched in get_user(). Currently this is done in the caller and in a inefficient way (multiple function calls to decide to do nothing). Move the reschedule check into the low level functions instead, where it can be merged

[PATCH 08/13] x86: Move cond_resched into the out of line put_user code

2013-08-09 Thread Andi Kleen
From: Andi Kleen CONFIG_PREEMPT_VOLUNTARY kernels always do a cond_resched in put_user(). Currently this is done in the caller and in a inefficient way (multiple function calls to decide to do nothing). Move the reschedule check into the low level functions instead, where it can be merged

[PATCH 13/13] x86: drop cond rescheds from __copy_{from,to}_user

2013-08-09 Thread Andi Kleen
From: Andi Kleen The __copy_* variants are right now more expensive than the non __ copy*user in CONFIG_PREEMPT_VOLUNTARY because they have a additional function call to might_fault(). Since they are usually used in a row with other functions, which also schedule or only in the thin compat

[PATCH 10/13] x86: Move cond resched for copy_{from,to}_user into low level code 64bit

2013-08-09 Thread Andi Kleen
From: Andi Kleen Move the cond_resched() check for CONFIG_PREEMPT_VOLUNTARY into the low level copy_*_user code. This avoids some code bloat and makes check much more efficient by avoiding unnecessary function calls. This is currently only for the non __ variants. For the sleep debug case the

[PATCH 07/13] Add might_fault_debug_only()

2013-08-09 Thread Andi Kleen
From: Andi Kleen Add a might_fault_debug_only() that only does something in the PROVE_LOCKING case, but does not cond_resched for PREEMPT_VOLUNTARY. This is for cases when the cond_resched is done elsewhere Signed-off-by: Andi Kleen --- include/linux/sched.h | 2 ++ 1 file changed, 2

[PATCH 03/13] tree-sweep: Include linux/sched.h for might_sleep users

2013-08-09 Thread Andi Kleen
From: Andi Kleen might_sleep is moving from linux/kernel.h to linux/sched.h, so any users need to include linux/sched.h This was done with a mechanistic script and some uses may be redundant (already included in some other include file). However it's good practice to always include any needed

[PATCH 05/13] sched: mark should_resched() __always_inline

2013-08-09 Thread Andi Kleen
From: Andi Kleen At least gcc 4.6 and some earlier ones does not inline this function. Since it's small and on relatively hot paths force inline it. Signed-off-by: Andi Kleen --- kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/core.c

Re: [PATCH 001/001] CHAR DRIVERS: a simple device to give daemons a /sys-like interface

2013-08-09 Thread Greg Kroah-Hartman
On Fri, Aug 09, 2013 at 03:51:39PM -0700, Bob Smith wrote: > Greg Kroah-Hartman wrote: > >On Wed, Aug 07, 2013 at 02:53:50PM -0700, Bob Smith wrote: > >>Agreed. But you need root permissions to install an application > >>and part of that installation can be setting up systemd files > >>that

[PATCH 06/13] x86: Add 32bit versions of SAVE_ALL/RESTORE_ALL to calling.h

2013-08-09 Thread Andi Kleen
From: Andi Kleen Add 32bit versions of SAVE/RESTORE_ALL to calling.h. Needed for the following patches. These are much simplified over both 64bit and the 32bit entry* version, just saving and restoring all registers without anything fancy. These are different from the entry_32.S versions in not

[PATCH 04/13] Move might_sleep and friends from kernel.h to sched.h

2013-08-09 Thread Andi Kleen
From: Andi Kleen These are really related to scheduling, so they should be in sched.h Users usually will need to schedule anyways. The advantage of having them there is that we can access some of the scheduler inlines to make their fast path more efficient. This will come in a followon patch.

Re-tune x86 uaccess code for PREEMPT_VOLUNTARY

2013-08-09 Thread Andi Kleen
The x86 user access functions (*_user) were originally very well tuned, with partial inline code and other optimizations. Then over time various new checks -- particularly the sleep checks for a voluntary preempt kernel -- destroyed a lot of the tunings A typical user access operation is now

[PATCH 02/13] x86: Include linux/sched.h in asm/uaccess.h

2013-08-09 Thread Andi Kleen
From: Andi Kleen uaccess.h uses might_sleep, but there is currently no explicit include for this. Since a upcoming patch moves might_sleep into sched.h include sched.h here. Signed-off-by: Andi Kleen --- arch/x86/include/asm/uaccess.h | 1 + 1 file changed, 1 insertion(+) diff --git

Re: [PATCH 001/001] CHAR DRIVERS: a simple device to give daemons a /sys-like interface

2013-08-09 Thread Greg Kroah-Hartman
On Fri, Aug 09, 2013 at 03:14:10PM -0700, Bob Smith wrote: > Greg Kroah-Hartman wrote: > (snip) > > You are mixing protocols and bindings and system calls up it seems.> They > > are not the same at all. > > Yes, I may be using the term binding wrong. As I understand it > - We should use a

Re: [patch 0/9] mm: thrash detection-based file cache sizing v3

2013-08-09 Thread Andrew Morton
On Tue, 6 Aug 2013 18:44:01 -0400 Johannes Weiner wrote: > This series solves the problem by maintaining a history of pages > evicted from the inactive list, enabling the VM to tell streaming IO > from thrashing and rebalance the page cache lists when appropriate. Looks nice. The lack of

[tip:x86/urgent] x86: Don' t clear olpc_ofw_header when sentinel is detected

2013-08-09 Thread tip-bot for Daniel Drake
Commit-ID: d55e37bb0f51316e552376ddc0a3fff34ca7108b Gitweb: http://git.kernel.org/tip/d55e37bb0f51316e552376ddc0a3fff34ca7108b Author: Daniel Drake AuthorDate: Fri, 9 Aug 2013 18:14:20 -0400 Committer: H. Peter Anvin CommitDate: Fri, 9 Aug 2013 15:29:48 -0700 x86: Don't clear

Re: [PATCH 001/001] CHAR DRIVERS: a simple device to give daemons a /sys-like interface

2013-08-09 Thread Bob Smith
Greg Kroah-Hartman wrote: On Wed, Aug 07, 2013 at 02:53:50PM -0700, Bob Smith wrote: Agreed. But you need root permissions to install an application and part of that installation can be setting up systemd files that allocate resources at boot. Do you have examples of those systemd files?

Re: [patch 8/9] mm: thrash detection-based file cache sizing

2013-08-09 Thread Andrew Morton
On Tue, 6 Aug 2013 18:44:09 -0400 Johannes Weiner wrote: > To accomplish this, a per-zone counter is increased every time a page > is evicted and a snapshot of that counter is stored as shadow entry in > the page's now empty page cache radix tree slot. How do you handle wraparound of that

Re: [PATCH v2] tile: support LSI MEGARAID SAS HBA hybrid dma_ops

2013-08-09 Thread Bjorn Helgaas
On Thu, Aug 08, 2013 at 12:47:10PM -0400, Chris Metcalf wrote: > On 8/6/2013 1:48 PM, Bjorn Helgaas wrote: > > [+cc Myron, Adam] > > > > On Fri, Aug 2, 2013 at 10:24 AM, Chris Metcalf wrote: > >> According to LSI, > >> the firmware is not fully functional yet. This change implements a > >> kind

Re: [PATCH 3/3] power_supply: add throttle state

2013-08-09 Thread Anton Vorontsov
On Sun, Jul 14, 2013 at 11:08:15PM +0530, Jenny TC wrote: > The charger and battery temperature contribute to the > platform thermal. The only way to control the temperature > is to control the charging. The charging can be controlled in different > way. This could be disabling charger, disabling

Re: linux-next: manual merge of the akpm tree with the ext4 tree

2013-08-09 Thread Andrew Morton
On Fri, 9 Aug 2013 15:21:04 -0700 Kees Cook wrote: > Hi, > > On Wed, Aug 07, 2013 at 03:19:03PM +1000, Stephen Rothwell wrote: > > Hi Andrew, > > > > list_for_each_safe(cur, tmp, >s_es_lru) { > > + int ret; > > + > > /* > > * If we have already reclaimed

Re: [PATCH 1/3] power_supply: Add charger control properties

2013-08-09 Thread Anton Vorontsov
On Sun, Jul 14, 2013 at 11:07:45PM +0530, Jenny TC wrote: > The battery charger needs to have control path along > with the reporting charger properties. In existing solutions > this is implemented using regulator framework. A regulator > framework doesn't fit a charger driver requirement because

i915: build warning in i915_hangcheck_elapsed

2013-08-09 Thread Kees Cook
9107e9d227e3b0893829baee4ac59feb874d4c23 introduced "score", and while it's actually not possible for it to be uninitialized (given the return values of ring_stuck()), the warning should be suppressed. It probably just needs a "default:" added to the switch statement.

Re: [PATCH 2/2] drivers: power: Add support for BATTERY_ARIESVE

2013-08-09 Thread Anton Vorontsov
On Wed, Jul 24, 2013 at 04:27:10PM +0200, Balint Czobor wrote: > Add initial support for the battery in Samsung ARIESVE. > > Signed-off-by: Balint Czobor > --- > arch/arm/mach-msm/include/mach/msm_battery.h | 31 + > arch/arm/mach-msm/include/mach/msm_rpcrouter.h | 376 >

Re: linux-next: manual merge of the akpm tree with the ext4 tree

2013-08-09 Thread Kees Cook
Hi, On Wed, Aug 07, 2013 at 03:19:03PM +1000, Stephen Rothwell wrote: > Hi Andrew, > > Today's linux-next merge of the akpm tree got a conflict in > fs/ext4/extents_status.c between commit 49c6efc7b80e ("ext4: add new > ioctl EXT4_IOC_PRECACHE_EXTENTS") from the ext4 tree and commit >

Re: [PATCH 001/001] CHAR DRIVERS: a simple device to give daemons a /sys-like interface

2013-08-09 Thread Bob Smith
Greg Kroah-Hartman wrote: On Thu, Aug 08, 2013 at 02:23:06PM -0700, Bob Smith wrote: Greg I'll reply again to this message but for now let me try another explanation that does not mention sysfs, procfs, or device drivers. This is probably how I should have started. I fail to understand

Re: [PATCH] ACPI, cpu hotplug: move try_offline_node() after acpi_unmap_lsapic()

2013-08-09 Thread Toshi Kani
On Fri, 2013-08-09 at 15:28 +0800, Tang Chen wrote: > On 08/07/2013 12:56 AM, Toshi Kani wrote: > > On Tue, 2013-08-06 at 19:11 +0900, Yasuaki Ishimatsu wrote: > >> try_offline_node() checks that all cpus related with removed node have been > >> removed by using cpu_present_bits. If all cpus

Re: [PATCH 001/001] CHAR DRIVERS: a simple device to give daemons a /sys-like interface

2013-08-09 Thread Bob Smith
Greg Kroah-Hartman wrote: (snip) > You are mixing protocols and bindings and system calls up it seems.> They are not the same at all. Yes, I may be using the term binding wrong. As I understand it - We should use a _syscall_ to open a unix socket on the daemon, then - define a _protocol_ to

[PATCH RESEND] x86: don't clear olpc_ofw_header when sentinel is detected

2013-08-09 Thread Daniel Drake
OpenFirmware wasn't quite following the protocol described in boot.txt and the kernel has detected this through use of the sentinel value in boot_params. OFW does zero out almost all of the stuff that it should do, but not the sentinel. This causes the kernel to clear olpc_ofw_header, which

Re: [PATCH 33/35] power: use dev_get_platdata()

2013-08-09 Thread Anton Vorontsov
On Tue, Jul 30, 2013 at 05:19:27PM +0900, Jingoo Han wrote: > Use the wrapper function for retrieving the platform data instead of > accessing dev->platform_data directly. Um.. what is the benefit or rationale of this patch? Thanks, Anton -- To unsubscribe from this list: send the line

Re: [PATCH 35/35] cpufreq: tegra: use cpufreq_table_validate_and_show()

2013-08-09 Thread Stephen Warren
add >>>> that >>>> additional patch and send it to you and will get this change out of this >>>> commit. >>> >>> The two commits look like this now attached too in case you want >>> to test: >> >> I'd be happy to test, but th

Re: [PATCH] power: power: replace strict_strtol() with kstrtol()

2013-08-09 Thread Anton Vorontsov
On Fri, Jul 19, 2013 at 04:06:16PM +0900, Jingoo Han wrote: > The usage of strict_strtol() is not preferred, because > strict_strtol() is obsolete. Thus, kstrtol() should be > used. > > Signed-off-by: Jingoo Han > --- Applied, thanks. > drivers/power/power_supply_sysfs.c |2 +- > 1 file

Re: [PATCH 001/001] CHAR DRIVERS: a simple device to give daemons a /sys-like interface

2013-08-09 Thread Greg Kroah-Hartman
On Wed, Aug 07, 2013 at 02:53:50PM -0700, Bob Smith wrote: > Greg Kroah-Hartman wrote: > >>The proxy device nodes are application specific and need to be > >>created as needed by applications. > > > >But applications do not have the permissions in a system to create > >device nodes. Nor should

Re: [PATCH 001/001] CHAR DRIVERS: a simple device to give daemons a /sys-like interface

2013-08-09 Thread Greg Kroah-Hartman
On Thu, Aug 08, 2013 at 02:23:06PM -0700, Bob Smith wrote: > Greg Kroah-Hartman wrote:> > > You are mixing protocols and bindings and system calls up it seems. > > They are not the same at all. > > > How can you control a robot with this code? > > What do you want to do in order to control your

AMD FX-4130 part only runs at 2.6/3.4GHz

2013-08-09 Thread Pavel Machek
Hi! I have DMI: Gigabyte Technology Co., Ltd. GA-78LMT-S2P/GA-78LMT-S2P, BIOS F3 10/18/2012 mainboard and AMD FX-4130 processor. processor : 3 vendor_id : AuthenticAMD cpu family : 21 model : 1 model name: AMD FX(tm)-4130 Quad-Core Processor stepping : 2

[PATCH] thp: Fix deadlock situation in vma_adjust with huge page in page cache.

2013-08-09 Thread Ning Qu
In vma_adjust, the current code grabs i_mmap_mutex before calling vma_adjust_trans_huge. This used to be fine until huge page in page cache comes in. The problem is the underlying function split_file_huge_page will also grab the i_mmap_mutex before splitting the huge page in page cache. Obviously

Re: [PATCH v2] backlight: Convert from Legacy pm ops to dev_pm_ops

2013-08-09 Thread Shuah Khan
On 08/09/2013 03:28 PM, David Brown wrote: > On Wed, Nov 14, 2040 at 04:27:17AM -0700, Shuah Khan wrote: >> ... > > The clock on your computer might be running just a wee bit ahead. > > Either that, or we're getting patches from the future. > > David > David, I know what happened. I was testing

Re: [PATCH v2] backlight: Convert from Legacy pm ops to dev_pm_ops

2013-08-09 Thread David Brown
On Wed, Nov 14, 2040 at 04:27:17AM -0700, Shuah Khan wrote: ... The clock on your computer might be running just a wee bit ahead. Either that, or we're getting patches from the future. David -- sent by an employee of the Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc.

Re: Linux Plumbers ACPI/PM, PCI Microconference

2013-08-09 Thread Rafael J. Wysocki
On Friday, August 09, 2013 12:12:24 PM Myron Stowe wrote: > Time is passing quickly and there are still a few topic areas that we > would like discussed during the microconference but still do not have > any proposals/knowledgable speakers for. > > For the following people I'm specifically

pty FIONREAD returning zero breaks emacs in 3.11rc3

2013-08-09 Thread Andi Kleen
When I run emacs over ssh terminal (no X) on 3.11-rc3 it often ignores key strokes. I first thought the system was busy or so, but when stracing the emacs it was not blocked. Here's a typical sequence. select/SIGIO wakes it up, but then FIONREAD returns 0. I'm not fully sure when it started.

[PATCH] tile: remove set/clear_fixmap APIs

2013-08-09 Thread Chris Metcalf
Nothing in the codebase was using them, and as written they took "unsigned long" as the physical address rather than "phys_addr_t", which is wrong on tilepro anyway. Rather than fixing stale APIs, just remove them; if there's ever demand for them on this platform, we can put them back.

[PATCH] tile: fix some -Wsign-compare warnings

2013-08-09 Thread Chris Metcalf
Normally the build doesn't include these warnings, but at one point I built with -Wsign-compare, and noticed a few things that are technically bugs. This change fixes those things. Signed-off-by: Chris Metcalf --- arch/tile/include/asm/io.h | 6 +++--- arch/tile/include/asm/mmzone.h

[PATCH] tile: group .hottext* sections properly in vmlinux.lds

2013-08-09 Thread Chris Metcalf
With this change such sections are grouped with regular text in the vmlinux image; this change puts them at the front, which is where the standard Linux includes .text.hot*. This change should fix a recently-observed bug where a bunch of symbols were being omitted from the /proc/kallsyms output

[PATCH] tile: fix strncpy_from_user bug

2013-08-09 Thread Chris Metcalf
In strncpy_from_user_asm, when the destination buffer length was the same as the actual string length, we were returning the size of the destination buffer. But since it's a NUL terminated string, we should return the length of the string instead. Signed-off-by: Chris Metcalf ---

  1   2   3   4   5   6   7   8   9   10   >