]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
12 years agoACPICA: Update all copyrights to 2012
Bob Moore [Thu, 12 Jan 2012 05:27:23 +0000 (13:27 +0800)]
ACPICA: Update all copyrights to 2012

Update all copyrights to 2012.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
12 years agoACPICA: Add support for region address conflict checking
Lin Ming [Thu, 12 Jan 2012 05:10:32 +0000 (13:10 +0800)]
ACPICA: Add support for region address conflict checking

Allows drivers to determine if any memory or I/O addresses
will conflict with addresses used by ACPI operation regions.
Introduces a new interface, acpi_check_address_range.

http://marc.info/?t=132251388700002&r=1&w=2

Reported-and-tested-by: Luca Tettamanti <kronos.it@gmail.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
12 years agoACPICA: Update for larger ACPI 5 FADT size
Bob Moore [Thu, 12 Jan 2012 03:09:58 +0000 (11:09 +0800)]
ACPICA: Update for larger ACPI 5 FADT size

FADT is now larger than 256 bytes, so all FADT offsets must be
changed from 8 bits to 16 bits.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
12 years agoACPICA: Update to version 20111123
Bob Moore [Mon, 28 Nov 2011 02:18:24 +0000 (10:18 +0800)]
ACPICA: Update to version 20111123

This version contains full support for the ACPI 5.0 specification.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
12 years agoACPICA: Clean up Makefile
Lin Ming [Tue, 29 Nov 2011 06:16:05 +0000 (14:16 +0800)]
ACPICA: Clean up Makefile

Make the various files in alphabetical order to simplify
addition of new files.

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
12 years agoACPI 5.0: Allow _AEI method in walk resources
Zhang Rui [Wed, 16 Nov 2011 09:03:54 +0000 (17:03 +0800)]
ACPI 5.0: Allow _AEI method in walk resources

_AEI contains a resource template, this change adds support for
the walk resources function.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
12 years agoACPI 5.0: Add new predefined names
Bob Moore [Wed, 16 Nov 2011 06:59:17 +0000 (14:59 +0800)]
ACPI 5.0: Add new predefined names

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
12 years agoACPI 5.0: New interface, acpi_buffer_to_resource
Bob Moore [Wed, 16 Nov 2011 06:51:01 +0000 (14:51 +0800)]
ACPI 5.0: New interface, acpi_buffer_to_resource

This interface converts an AML buffer to an internal ACPI_RESOURCE.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
12 years agoACPI 5.0: New interface, acpi_get_event_resources
Bob Moore [Wed, 16 Nov 2011 06:46:57 +0000 (14:46 +0800)]
ACPI 5.0: New interface, acpi_get_event_resources

Executes _AEI and formats the result, similar to acpi_get_current_resources, etc.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
12 years agoACPI 5.0: Support for all new resource descriptors
Lin Ming [Wed, 16 Nov 2011 06:38:13 +0000 (14:38 +0800)]
ACPI 5.0: Support for all new resource descriptors

FixedDMA, GPIO descriptors, SerialBus descriptors

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
12 years agoACPI 5.0: Support for GeneralPurposeIo and GenericSerialBus operation region
Bob Moore [Wed, 16 Nov 2011 06:14:32 +0000 (14:14 +0800)]
ACPI 5.0: Support for GeneralPurposeIo and GenericSerialBus operation region

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
12 years agoACPI 5.0: Implement Connection() and AccessAs() changes
Bob Moore [Wed, 16 Nov 2011 05:39:07 +0000 (13:39 +0800)]
ACPI 5.0: Implement Connection() and AccessAs() changes

Support within the interpreter and operation region dispatch.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
12 years agoACPI 5.0: New interfaces to allow driver access to AML mutex objects
Lin Ming [Wed, 16 Nov 2011 03:08:30 +0000 (11:08 +0800)]
ACPI 5.0: New interfaces to allow driver access to AML mutex objects

Adds acpi_acquire_mutex, acpi_release_mutex external interfaces.
New file, utxfmutex.c.

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
12 years agoACPI 5.0: Add new/changed tables to headers
Bob Moore [Wed, 16 Nov 2011 03:04:00 +0000 (11:04 +0800)]
ACPI 5.0: Add new/changed tables to headers

Adds new file, actbl3.h

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
12 years agoACPI 5.0: Implement hardware-reduced option
Bob Moore [Wed, 16 Nov 2011 02:57:28 +0000 (10:57 +0800)]
ACPI 5.0: Implement hardware-reduced option

If HW-reduced flag is set in the FADT, do not attempt to access
or initialize any ACPI hardware, including SCI and global lock.
No FACS will be present.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
12 years agoACPI 5.0: Basic support for FADT version 5
Bob Moore [Wed, 16 Nov 2011 02:42:09 +0000 (10:42 +0800)]
ACPI 5.0: Basic support for FADT version 5

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
12 years agoACPICA: Do not abort table load on invalid space ID
Bob Moore [Wed, 30 Nov 2011 01:35:05 +0000 (09:35 +0800)]
ACPICA: Do not abort table load on invalid space ID

Ignore an invalid space ID during a table load. Instead, detect it
if a control method attempts access - then abort the method.

http://www.acpica.org/bugzilla/show_bug.cgi?id=925

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
12 years agoACPICA: Add error msg for Index/Bank field registers out-of-range
Bob Moore [Mon, 28 Nov 2011 02:10:10 +0000 (10:10 +0800)]
ACPICA: Add error msg for Index/Bank field registers out-of-range

Supplement the exception code with an actual message.

Found during ACPICA debugging.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
12 years agoACPICA: Add error msg for unsupported I/O requests (not 8/16/32 bit length)
Bob Moore [Mon, 28 Nov 2011 02:08:03 +0000 (10:08 +0800)]
ACPICA: Add error msg for unsupported I/O requests (not 8/16/32 bit length)

Found during ACPICA debugging.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
12 years agoACPICA: Fix to allow region arguments to reference other scopes
Lin Ming [Mon, 28 Nov 2011 01:46:02 +0000 (09:46 +0800)]
ACPICA: Fix to allow region arguments to reference other scopes

Allow referenced objects to be in a different scope.

http://www.acpica.org/bugzilla/show_bug.cgi?id=937
http://marc.info/?l=linux-acpi&m=131636632718222&w=2

ACPI Error: [RAMB] Namespace lookup failure, AE_NOT_FOUND (20110112/psargs-359)
ACPI Exception: AE_NOT_FOUND, Could not execute arguments for [RAMW] (Region) (20110112/nsinit-349)

    Scope (_SB)
    {
        Name (RAMB, 0xDF5A1018)
        OperationRegion (\RAMW, SystemMemory, RAMB, 0x00010000)
    }

For above ASL code, we need to save scope node(\_SB) to lookup
the argument node(\_SB.RAMB).

Reported-by: Jim Green <student.northwestern@gmail.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
12 years agoACPICA: Update for GCC 4
Bob Moore [Mon, 28 Nov 2011 01:43:52 +0000 (09:43 +0800)]
ACPICA: Update for GCC 4

Fixes several issues with GCC 4.6 related to the new checks for
unused variables.

http://www.acpica.org/bugzilla/show_bug.cgi?id=935

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
12 years agoMerge branch 'acpica-validate-address-regression' into next
Len Brown [Tue, 17 Jan 2012 08:33:49 +0000 (03:33 -0500)]
Merge branch 'acpica-validate-address-regression' into next

12 years agoACPICA: Put back the call to acpi_os_validate_address
Lin Ming [Tue, 29 Nov 2011 14:13:35 +0000 (22:13 +0800)]
ACPICA: Put back the call to acpi_os_validate_address

The call to acpi_os_validate_address in acpi_ds_get_region_arguments was
removed by mistake in commit 9ad19ac(ACPICA: Split large dsopcode and
dsload.c files).

Put it back.

Cc: stable@vger.kernel.org # 2.6.38+
Reported-and-bisected-by: Luca Tettamanti <kronos.it@gmail.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
12 years agox86/UV2: Add accounting for BAU strong nacks
Cliff Wickman [Mon, 16 Jan 2012 21:22:38 +0000 (15:22 -0600)]
x86/UV2: Add accounting for BAU strong nacks

This patch adds separate accounting of UV2 message "strong
nack's" in the BAU statistics.

Signed-off-by: Cliff Wickman <cpw@sgi.com>
Link: http://lkml.kernel.org/r/20120116212238.GF5767@sgi.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
12 years agox86/UV2: Ack BAU interrupt earlier
Cliff Wickman [Mon, 16 Jan 2012 21:21:46 +0000 (15:21 -0600)]
x86/UV2: Ack BAU interrupt earlier

This patch moves the ack of the BAU interrupt to the beginning
of  the interrupt handler so that there is less possibility of a
lost interrupt and slower response to a shootdown message.

Signed-off-by: Cliff Wickman <cpw@sgi.com>
Link: http://lkml.kernel.org/r/20120116212146.GE5767@sgi.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
12 years agox86/UV2: Remove stale no-resources test for UV2 BAU
Cliff Wickman [Mon, 16 Jan 2012 21:20:50 +0000 (15:20 -0600)]
x86/UV2: Remove stale no-resources test for UV2 BAU

This patch removes an unnecessary test for a
no-destination-resources-available condition that looks like a
destination timeout in UV1, but is separately distinguishable in
UV2.

Signed-off-by: Cliff Wickman <cpw@sgi.com>
Link: http://lkml.kernel.org/r/20120116212050.GD5767@sgi.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
12 years agox86/UV2: Work around BAU bug
Cliff Wickman [Mon, 16 Jan 2012 21:19:47 +0000 (15:19 -0600)]
x86/UV2: Work around BAU bug

This patch implements a workaround for a UV2 hardware bug.
The bug is a non-atomic update of a memory-mapped register. When
hardware message delivery and software message acknowledge occur
simultaneously the pending message acknowledge for the arriving
message may be lost.  This causes the sender's message status to
stay busy.

Part of the workaround is to not acknowledge a completed message
until it is verified that no other message is actually using the
resource that is mistakenly recorded in the completed message.

Part of the workaround is to test for long elapsed time in such
a busy condition, then handle it by using a spare sending
descriptor. The stay-busy condition is eventually timed out by
hardware, and then the original sending descriptor can be
re-used. Most of that logic change is in keeping track of the
current descriptor and the state of the spares.

The occurrences of the workaround are added to the BAU
statistics.

Signed-off-by: Cliff Wickman <cpw@sgi.com>
Link: http://lkml.kernel.org/r/20120116211947.GC5767@sgi.com
Cc: <stable@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
12 years agox86/UV2: Fix BAU destination timeout initialization
Cliff Wickman [Mon, 16 Jan 2012 21:18:48 +0000 (15:18 -0600)]
x86/UV2: Fix BAU destination timeout initialization

Move the call to enable_timeouts() forward so that
BAU_MISC_CONTROL is initialized before using it in
calculate_destination_timeout().

Fix the calculation of a BAU destination timeout
for UV2 (in calculate_destination_timeout()).

Signed-off-by: Cliff Wickman <cpw@sgi.com>
Link: http://lkml.kernel.org/r/20120116211848.GB5767@sgi.com
Cc: <stable@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
12 years agox86/UV2: Fix new UV2 hardware by using native UV2 broadcast mode
Cliff Wickman [Mon, 16 Jan 2012 21:17:50 +0000 (15:17 -0600)]
x86/UV2: Fix new UV2 hardware by using native UV2 broadcast mode

Update the use of the Broadcast Assist Unit on SGI Altix UV2 to
the use of native UV2 mode on new hardware (not the legacy mode).

UV2 native mode has a different format for a broadcast message.
We also need quick differentiaton between UV1 and UV2.

Signed-off-by: Cliff Wickman <cpw@sgi.com>
Link: http://lkml.kernel.org/r/20120116211750.GA5767@sgi.com
Cc: <stable@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
12 years agoMerge branch 'samsung-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene...
Olof Johansson [Tue, 17 Jan 2012 06:46:19 +0000 (22:46 -0800)]
Merge branch 'samsung-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into fixes

* 'samsung-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
  ARM: EXYNOS: Invert VCLK polarity for framebuffer on ORIGEN
  ARM: S3C64XX: Fix interrupt configuration for PCA935x on Cragganmore
  ARM: S3C64XX: Fix the memory mapped GPIOs on Cragganmore
  ARM: S3C64XX: Remove hsmmc1 from Cragganmore
  ARM: S3C64XX: Remove unconditional power domain disables
  ARM: SAMSUNG: Declare struct platform_device in plat/s3c64xx-spi.h
  ARM: SAMSUNG: dma-ops.h needs mach/dma.h
  ARM: SAMSUNG: Guard against multiple inclusion of plat/dma.h

12 years agoMerge branch 'fixes-for-arm-soc' of git://sources.calxeda.com/kernel/linux into fixes
Olof Johansson [Tue, 17 Jan 2012 06:46:06 +0000 (22:46 -0800)]
Merge branch 'fixes-for-arm-soc' of git://sources.calxeda.com/kernel/linux into fixes

* 'fixes-for-arm-soc' of git://sources.calxeda.com/kernel/linux:
  ARM: make BSYM macro assembly only
  ARM: highbank: remove incorrect BSYM usage
  ARM: imx: remove incorrect BSYM usage
  ARM: exynos: remove incorrect BSYM usage
  ARM: ux500: add missing ENDPROC to headsmp.S
  ARM: msm: Add missing ENDPROC to headsmp.S
  ARM: versatile: Add missing ENDPROC to headsmp.S

12 years agoMerge branch 'msm-fix' of git://codeaurora.org/quic/kernel/davidb/linux-msm into...
Olof Johansson [Tue, 17 Jan 2012 06:45:56 +0000 (22:45 -0800)]
Merge branch 'msm-fix' of git://codeaurora.org/quic/kernel/davidb/linux-msm into fixes

* 'msm-fix' of git://codeaurora.org/quic/kernel/davidb/linux-msm:
  ARM: msm: vreg is a module and so needs module.h

12 years agoMerge branch 'picoxcell-fixes' of git://github.com/jamieiles/linux-2.6-ji into fixes
Olof Johansson [Tue, 17 Jan 2012 06:45:42 +0000 (22:45 -0800)]
Merge branch 'picoxcell-fixes' of git://github.com/jamieiles/linux-2.6-ji into fixes

* 'picoxcell-fixes' of git://github.com/jamieiles/linux-2.6-ji:
  ARM: picoxcell: fix sched_clock() cleanup fallout

12 years agoMerge branch 'x86/rdrand' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Linus Torvalds [Tue, 17 Jan 2012 02:23:09 +0000 (18:23 -0800)]
Merge branch 'x86/rdrand' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

* 'x86/rdrand' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  random: Adjust the number of loops when initializing
  random: Use arch-specific RNG to initialize the entropy store

12 years agoMerge branch 'x86-syscall-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Tue, 17 Jan 2012 02:19:19 +0000 (18:19 -0800)]
Merge branch 'x86-syscall-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

* 'x86-syscall-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86: Move <asm/asm-offsets.h> from trace_syscalls.c to asm/syscall.h
  x86, um: Fix typo in 32-bit system call modifications
  um: Use $(srctree) not $(KBUILD_SRC)
  x86, um: Mark system call tables readonly
  x86, um: Use the same style generated syscall tables as native
  um: Generate headers before generating user-offsets.s
  um: Run host archheaders, allow use of host generated headers
  kbuild, headers.sh: Don't make archheaders explicitly
  x86, syscall: Allow syscall offset to be symbolic
  x86, syscall: Re-fix typo in comment
  x86: Simplify syscallhdr.sh
  x86: Generate system call tables and unistd_*.h from tables
  checksyscalls: Use arch/x86/syscalls/syscall_32.tbl as source
  x86: Machine-readable syscall tables and scripts to process them
  trace: Include <asm/asm-offsets.h> in trace_syscalls.c
  x86-64, ia32: Move compat_ni_syscall into C and its own file
  x86-64, syscall: Adjust comment spacing and remove typo
  kbuild: Add support for an "archheaders" target
  kbuild: Add support for installing generated asm headers

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt...
Linus Torvalds [Tue, 17 Jan 2012 01:53:27 +0000 (17:53 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest:
  ktest: Add INGORE_ERRORS to ignore warnings in boot up
  ktest: Still do reboot even for REBOOT_TYPE = script
  ktest: Fix compare script to test if options are not documented
  ktest: Detect typos in option names
  ktest: Have all values be set by defaults
  ktest: Change initialization of defaults hash to perl format
  ktest: Add options SWITCH_TO_GOOD and SWITCH_TO_TEST
  ktest: Allow overriding bisect test results
  ktest: Evaluate options before processing them
  ktest: Evaluate $KERNEL_VERSION in both install and post install
  ktest: Only ask options needed for install
  ktest: When creating a new config, ask for BUILD_OPTIONS
  ktest: Do not ask for some options if the only test is build
  ktest: Ask for type of test when creating a new config
  ktest: Allow bisect test to restart where it left off
  ktest: When creating new config, allow the use of ${THIS_DIR}
  ktest: Add default for ssh-user, build-target and target-image
  ktest: Allow success logs to be stored
  ktest: Save test output

12 years agoMerge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu
Linus Torvalds [Tue, 17 Jan 2012 01:47:27 +0000 (17:47 -0800)]
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu

* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
  ARM: OMAP3: fix build on !CONFIG_IOMMU_API

12 years agomce: fix warning messages about static struct mce_device
Greg Kroah-Hartman [Mon, 16 Jan 2012 22:40:28 +0000 (14:40 -0800)]
mce: fix warning messages about static struct mce_device

When suspending, there was a large list of warnings going something like:

Device 'machinecheck1' does not have a release() function, it is broken and must be fixed

This patch turns the static mce_devices into dynamically allocated, and
properly frees them when they are removed from the system.  It solves
the warning messages on my laptop here.

Reported-by: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Tested-by: Djalal Harouni <tixxdz@opendz.org>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Borislav Petkov <bp@amd64.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge branch 'fixes' of git://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-arm
Linus Torvalds [Mon, 16 Jan 2012 23:34:44 +0000 (15:34 -0800)]
Merge branch 'fixes' of git://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-arm

* 'fixes' of git://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-arm:
  ARM: sa11x0: assabet: fix build warning
  ARM: Add arm_memblock_steal() to allocate memory away from the kernel
  ARM: 7275/1: LPAE: Check the CPU support for the long descriptor format
  ARM: 7274/1: NUC900: Rename nuc900-audio platform device to nuc900-ac97
  ARM: 7272/1: S3C24XX: Fix build error for missing <mach/system-reset.h>
  ARM: 7271/1: Fix typo in conversion of ARCH_NR_GPIOS to Kconfig

12 years agoMerge tag 'nfs-for-3.3-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Linus Torvalds [Mon, 16 Jan 2012 23:08:13 +0000 (15:08 -0800)]
Merge tag 'nfs-for-3.3-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs

NFS client bugfixes and cleanups for Linux 3.3 (pull 2)

* tag 'nfs-for-3.3-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
  pnfsblock: alloc short extent before submit bio
  pnfsblock: remove rpc_call_ops from struct parallel_io
  pnfsblock: move find lock page logic out of bl_write_pagelist
  pnfsblock: cleanup bl_mark_sectors_init
  pnfsblock: limit bio page count
  pnfsblock: don't spinlock when freeing block_dev
  pnfsblock: clean up _add_entry
  pnfsblock: set read/write tk_status to pnfs_error
  pnfsblock: acquire im_lock in _preload_range
  NFS4: fix compile warnings in nfs4proc.c
  nfs: check for integer overflow in decode_devicenotify_args()
  NFS: cleanup endian type in decode_ds_addr()
  NFS: add an endian notation

12 years agoMerge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelv...
Linus Torvalds [Mon, 16 Jan 2012 23:07:46 +0000 (15:07 -0800)]
Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  hwmon: (sysfs-interface) Update tempX_type attribute to be more generic
  hwmon: (adm1031) Fix coding style issues
  hwmon: (it87) Add IT8728F support
  hwmon: (coretemp) Add missing section annotations
  hwmon: (lm90) Add range check to set_update_interval
  hwmon: (lm63) Support extended lookup table of LM96163
  hwmon: (lm63) Expose automatic fan speed control lookup table
  hwmon: (lm63) Fix incorrect comment about I2C address
  hwmon: (lm63) LM64 has a dedicated pin for tachometer
  hwmon: (lm63) Add sensor type attribute for external sensor on LM96163
  hwmon: (lm63) Add support for update_interval sysfs attribute
  hwmon: (lm63) Add support for writing the external critical temperature
  hwmon: (lm63) Add support for unsigned upper temperature limits
  hwmon: (lm63) Add support for LM96163
  hwmon: (lm63) Add support for external temperature offset register
  hwmon: (lm63) Fix checkpatch errors
  hwmon: (max1111) Change sysfs interface to in[0-3]_input in millivolts

12 years agoMerge branch 'pm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
Linus Torvalds [Mon, 16 Jan 2012 23:02:30 +0000 (15:02 -0800)]
Merge branch 'pm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

* 'pm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  PM / Hibernate: Drop the check of swap space size for compressed image
  PM / shmobile: fix A3SP suspend method
  PM / Domains: Skip governor functions for CONFIG_PM_RUNTIME unset
  PM / Domains: Fix build for CONFIG_PM_SLEEP unset
  PM: Make sysrq-o be available for CONFIG_PM unset

12 years agoMerge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Linus Torvalds [Mon, 16 Jan 2012 22:36:07 +0000 (14:36 -0800)]
Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild

* 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  scripts/coccinelle: improve the coverage of some semantic patches
  coccinelle: semantic patches related to devm_ functions (part 2)
  coccinelle: semantic patches related to devm_ functions (part 1)
  coccinelle.txt: update documentation to include M= option
  coccicheck: add M= option to control which dir is processed
  ctags: remove struct forward declarations
  scripts/tags.sh: Add Page flag function magic

12 years agoMerge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Linus Torvalds [Mon, 16 Jan 2012 22:35:34 +0000 (14:35 -0800)]
Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild

* 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  menuconfig: fix a regression when canceling the prompt dialog at exit
  kbuild: Fix compiler warning with assertion when calling 'fwrite'
  Improve update-po-config output
  menuconfig: let make not report error when not save configuration
  merge_config.sh: fix bug in final check
  merge_config.sh: whitespace cleanup
  merge_config.sh: use signal names compatible with dash and bash
  kconfig: add merge_config.sh script
  kconfig: use xfwrite wrapper function to silence warnings
  kconfig: fix set but not used warnings
  kconfig: fix warnings by specifing format arguments

12 years agoMerge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Linus Torvalds [Mon, 16 Jan 2012 22:34:54 +0000 (14:34 -0800)]
Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild

* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  Kbuild: Use dtc's -d (dependency) option
  dtc: Implement -d option to write out a dependency file
  kbuild: Fix comment in Makefile.lib
  scripts/genksyms: clean lex/yacc generated files
  kbuild: Correctly deal with make options which contain an "s"

12 years agoARM: sa11x0: assabet: fix build warning
Russell King [Sat, 14 Jan 2012 16:10:53 +0000 (16:10 +0000)]
ARM: sa11x0: assabet: fix build warning

Since a32618d2 (ARM: pgtable: switch to use pgtable-nopud.h), assabet
warns as follows:

arch/arm/mach-sa1100/assabet.c: In function 'map_sa1100_gpio_regs':
arch/arm/mach-sa1100/assabet.c:264: warning: passing argument 1 of 'pmd_offset' from incompatible pointer type

Fix this by adding the necessary pud_offset() macro.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agohwmon: (sysfs-interface) Update tempX_type attribute to be more generic
Guenter Roeck [Mon, 16 Jan 2012 21:51:48 +0000 (22:51 +0100)]
hwmon: (sysfs-interface) Update tempX_type attribute to be more generic

The temp[1-*]_type attribute reports the temperature sensor type. Sensor type 1
is described as "PII/Celeron Diode", which is quite restrictive; other CPUs
may also have an embedded temperature sensor diode with similar characteristics.
Change description to "CPU embedded diode" to be more generic.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
12 years agohwmon: (adm1031) Fix coding style issues
Guenter Roeck [Mon, 16 Jan 2012 21:51:48 +0000 (22:51 +0100)]
hwmon: (adm1031) Fix coding style issues

Fix almost all coding style issues except for the multi-line macro errors,
which do not really apply since the macros are not multi-line statements
but declarations.

Based on merged patch series from Zac Storer; fixed remaining checkpatch
errors and warnings.

Cc: Zac Storer <zac.3.14159@gmail.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
12 years agohwmon: (it87) Add IT8728F support
Jean Delvare [Mon, 16 Jan 2012 21:51:48 +0000 (22:51 +0100)]
hwmon: (it87) Add IT8728F support

Until we get a datasheet for the IT8728F, treat it as fully compatible
with the IT8721F, as it seems to work reasonably well.

This closes kernel bug #27262.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
12 years agohwmon: (coretemp) Add missing section annotations
Jean Delvare [Mon, 16 Jan 2012 21:51:47 +0000 (22:51 +0100)]
hwmon: (coretemp) Add missing section annotations

Many functions in the coretemp driver lack a proper section
annotation. Add them to let the kernel free the memory after
initialization when possible.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Durgadoss R <durgadoss.r@intel.com>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
12 years agohwmon: (lm90) Add range check to set_update_interval
Guenter Roeck [Mon, 16 Jan 2012 21:51:47 +0000 (22:51 +0100)]
hwmon: (lm90) Add range check to set_update_interval

When writing the update_interval attribute, the parameter value was
not range checked, which could cause an integer overflow and result
in an arbitrary update interval. Fix by limiting the value range to
<0, 100000>.

Reported-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
12 years agohwmon: (lm63) Support extended lookup table of LM96163
Jean Delvare [Mon, 16 Jan 2012 21:51:47 +0000 (22:51 +0100)]
hwmon: (lm63) Support extended lookup table of LM96163

The LM96163 has an extended lookup table with 12 entries instead of 8,
add support for that.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
12 years agohwmon: (lm63) Expose automatic fan speed control lookup table
Jean Delvare [Mon, 16 Jan 2012 21:51:47 +0000 (22:51 +0100)]
hwmon: (lm63) Expose automatic fan speed control lookup table

The LM63 and compatible devices have a lookup table to control the fan
speed automatically. Expose it in sysfs. Values are cached for 5
seconds, independently of the other register values to avoid slowing
down "sensors". We might make the table values writable in the future.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
12 years agohwmon: (lm63) Fix incorrect comment about I2C address
Jean Delvare [Mon, 16 Jan 2012 21:51:47 +0000 (22:51 +0100)]
hwmon: (lm63) Fix incorrect comment about I2C address

What was true of the LM63 doesn't apply to the LM64.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
12 years agohwmon: (lm63) LM64 has a dedicated pin for tachometer
Jean Delvare [Mon, 16 Jan 2012 21:51:46 +0000 (22:51 +0100)]
hwmon: (lm63) LM64 has a dedicated pin for tachometer

On the LM64, the tachometer function has a dedicated pin and fan speed
monitoring is always enabled.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
12 years agohwmon: (lm63) Add sensor type attribute for external sensor on LM96163
Guenter Roeck [Mon, 16 Jan 2012 21:51:46 +0000 (22:51 +0100)]
hwmon: (lm63) Add sensor type attribute for external sensor on LM96163

On LM96163, the external temperature sensor type is configurable to
either a thermal diode or a 3904 transistor. The chip reports a wrong
temperature if misconfigured. Add writable attribute to support it.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
12 years agohwmon: (lm63) Add support for update_interval sysfs attribute
Guenter Roeck [Mon, 16 Jan 2012 21:51:46 +0000 (22:51 +0100)]
hwmon: (lm63) Add support for update_interval sysfs attribute

The update interval is configurable on LM63 and compatibles. Add
support for it.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
12 years agohwmon: (lm63) Add support for writing the external critical temperature
Guenter Roeck [Mon, 16 Jan 2012 21:51:46 +0000 (22:51 +0100)]
hwmon: (lm63) Add support for writing the external critical temperature

On LM64, the external critical temperature limit is always writable. On LM96163,
it is writable if the chip is configured for it. Add conditional support for
writing the register dependent on chip type and configuration.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
12 years agohwmon: (lm63) Add support for unsigned upper temperature limits
Guenter Roeck [Mon, 16 Jan 2012 21:51:46 +0000 (22:51 +0100)]
hwmon: (lm63) Add support for unsigned upper temperature limits

LM96163 supports unsigned upper limits for the external temperature sensor.
Add support for it.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
12 years agohwmon: (lm63) Add support for LM96163
Guenter Roeck [Mon, 16 Jan 2012 21:51:45 +0000 (22:51 +0100)]
hwmon: (lm63) Add support for LM96163

LM96163 is an enhanced version of LM63 with improved PWM resolution. Add chip
detection code as well as support for improved PWM resolution if the chip is
configured to use it.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Tested-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
12 years agohwmon: (lm63) Add support for external temperature offset register
Guenter Roeck [Mon, 16 Jan 2012 21:51:45 +0000 (22:51 +0100)]
hwmon: (lm63) Add support for external temperature offset register

LM63 and compatibles support a temperature offset register for the external
temperature sensor. Add support for it.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
12 years agohwmon: (lm63) Fix checkpatch errors
Guenter Roeck [Mon, 16 Jan 2012 21:51:45 +0000 (22:51 +0100)]
hwmon: (lm63) Fix checkpatch errors

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Tested-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
12 years agohwmon: (max1111) Change sysfs interface to in[0-3]_input in millivolts
Eric Miao [Mon, 16 Jan 2012 21:51:45 +0000 (22:51 +0100)]
hwmon: (max1111) Change sysfs interface to in[0-3]_input in millivolts

This patch fixed the inconsistent max1111 sysfs interface as pointed
out by Jean Delvare:

    It was pointed to me that the max1111 driver doesn't implement the
    standard sysfs interface for hwmon drivers (as described in
    Documentation/hwmon/sysfs-interface). It exports files adc[0-3]_in,
    which
    aren't part of the standard interface. Presumably these should be
    renamed to in[0-3]_input. Renaming them is probably not sufficient
    though, as I see no scaling done in the driver. As the MAX1111 chip has
    a documented full scale of 2.048V, I take it that the LSB of the ADC
    has a weight of 8 mV. Exporting raw register values to user-space is
    not OK.

Reported-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
12 years agoBtrfs: use larger system chunks
Chris Mason [Mon, 16 Jan 2012 13:13:11 +0000 (08:13 -0500)]
Btrfs: use larger system chunks

system chunks by default are very small.  This makes them slightly
larger and also fixes the conditional checks to make sure we don't
allocate a billion of them at once.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoBtrfs: add a delalloc mutex to inodes for delalloc reservations
Josef Bacik [Fri, 13 Jan 2012 17:09:22 +0000 (12:09 -0500)]
Btrfs: add a delalloc mutex to inodes for delalloc reservations

I was using i_mutex for this, but we're getting bogus lockdep warnings by doing
that and theres no real way to get rid of those, so just stop using i_mutex to
protect delalloc metadata reservations and use a delalloc mutex instead.  This
shouldn't be contended often at all, only if you are writing and mmap writing to
the file at the same time.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
12 years agoBtrfs: space leak tracepoints
Josef Bacik [Tue, 10 Jan 2012 15:31:31 +0000 (10:31 -0500)]
Btrfs: space leak tracepoints

This in addition to a script in my btrfs-tracing tree will help track down space
leaks when we're getting space left over in block groups on umount.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
12 years agoBtrfs: protect orphan block rsv with spin_lock
Josef Bacik [Fri, 2 Dec 2011 20:44:12 +0000 (15:44 -0500)]
Btrfs: protect orphan block rsv with spin_lock

We've been seeing warnings coming out of the orphan commit stuff forever from
ceph.  Turns out it's because we're racing with checking if the orphan block
reserve is set, because we clear it outside of the spin_lock.  So leave the
normal fastpath checks where they are, but take the spin_lock and _recheck_ to
make sure we haven't had an orphan block rsv added in the meantime.  Then clear
the root's orphan block rsv and release the lock.  With this patch a user said
the warnings went away and they usually showed up pretty soon after he started
ceph.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
12 years agoBtrfs: add allocator tracepoints
Josef Bacik [Thu, 10 Nov 2011 13:29:20 +0000 (08:29 -0500)]
Btrfs: add allocator tracepoints

I used these tracepoints when figuring out what the cluster stuff was doing, so
add them to mainline in case we need to profile this stuff again.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
12 years agoBtrfs: don't call btrfs_throttle in file write
Josef Bacik [Fri, 13 Jan 2012 00:10:12 +0000 (19:10 -0500)]
Btrfs: don't call btrfs_throttle in file write

Btrfs_throttle will make us wait if there is a currently committing transaction
until we can open new transactions, which is ridiculous since we don't actually
start any transactions within the file write path anyway, so all this does is
introduce big latencies if we have a sync/fsync heavy workload going on while
somebody else is trying to do work.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoBtrfs: release space on error in page_mkwrite
Josef Bacik [Fri, 13 Jan 2012 00:10:12 +0000 (19:10 -0500)]
Btrfs: release space on error in page_mkwrite

If updating the inode gave us an ENOSPC we were just returning in page_mkwrite,
which is a problem since we make our reservation right before trying to update
the inode, so fix the out label so that we actually free our reservation.
Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoBtrfs: fix btrfsck error 400 when truncating a compressed
Miao Xie [Fri, 13 Jan 2012 00:10:12 +0000 (19:10 -0500)]
Btrfs: fix btrfsck error 400 when truncating a compressed

Reproduce steps:
 # mkfs.btrfs /dev/sdb5
 # mount /dev/sdb5 -o compress=lzo /mnt
 # dd if=/dev/zero of=/mnt/tmpfile bs=128K count=1
 # sync
 # truncate -s 64K /mnt/tmpfile
 root 5 inode 257 errors 400

This is because of the wrong if condition, which is used to check if we should
subtract the bytes of the dropped range from i_blocks/i_bytes of i-node or not.
When we truncate a compressed extent, btrfs substracts the bytes of the whole
extent, it's wrong. We should substract the real size that we truncate, no
matter it is a compressed extent or not. Fix it.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoBtrfs: do not use btrfs_end_transaction_throttle everywhere
Josef Bacik [Fri, 13 Jan 2012 00:10:12 +0000 (19:10 -0500)]
Btrfs: do not use btrfs_end_transaction_throttle everywhere

A user reported a problem where things like open with O_CREAT would take up to
30 seconds when he had nfs activity on the same mount.  This is because all of
our quick metadata operations, like create, symlink etc all do
btrfs_end_transaction_throttle, which if the transaction is blocked will wait
for the commit to complete before it returns.  This adds a ridiculous amount of
latency and isn't really needed.  The normal btrfs_end_transaction will mark the
transaction as blocked and wake the transaction kthread up if it thinks the
transaction needs to end (this being in the running out of global reserve space
scenario), and this is all that is really needed since we've already done
everything we're going to do, we just need to return.  This should help people
with the latency they were seeing when using synchronous heavy workloads.
Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoMerge branch 'integrity-check-patch-v2' of git://btrfs.giantdisaster.de/git/btrfs...
Chris Mason [Mon, 16 Jan 2012 20:27:58 +0000 (15:27 -0500)]
Merge branch 'integrity-check-patch-v2' of git://btrfs.giantdisaster.de/git/btrfs into integration

Conflicts:
fs/btrfs/ctree.h
fs/btrfs/super.c

Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoMerge branch 'for-chris' of git://git.jan-o-sch.net/btrfs-unstable into integration
Chris Mason [Mon, 16 Jan 2012 20:26:31 +0000 (15:26 -0500)]
Merge branch 'for-chris' of git://git.jan-o-sch.net/btrfs-unstable into integration

12 years agoMerge branch 'for-chris' of git://repo.or.cz/linux-btrfs-devel into integration
Chris Mason [Mon, 16 Jan 2012 20:26:17 +0000 (15:26 -0500)]
Merge branch 'for-chris' of git://repo.or.cz/linux-btrfs-devel into integration

Conflicts:
fs/btrfs/volumes.c

Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoMerge branch 'restriper' of git://github.com/idryomov/btrfs-unstable into integration
Chris Mason [Mon, 16 Jan 2012 20:26:02 +0000 (15:26 -0500)]
Merge branch 'restriper' of git://github.com/idryomov/btrfs-unstable into integration

12 years agoMerge branch 'allocation-fixes' into integration
Chris Mason [Mon, 16 Jan 2012 20:25:42 +0000 (15:25 -0500)]
Merge branch 'allocation-fixes' into integration

12 years agoBtrfs: add balance progress reporting
Ilya Dryomov [Mon, 16 Jan 2012 20:04:49 +0000 (22:04 +0200)]
Btrfs: add balance progress reporting

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
12 years agoBtrfs: allow for resuming restriper after it was paused
Ilya Dryomov [Mon, 16 Jan 2012 20:04:49 +0000 (22:04 +0200)]
Btrfs: allow for resuming restriper after it was paused

Recognize BTRFS_BALANCE_RESUME flag passed from userspace.  We use the
same heuristics used when recovering balance after a crash to try to
start where we left off last time.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
12 years agoBtrfs: allow for canceling restriper
Ilya Dryomov [Mon, 16 Jan 2012 20:04:49 +0000 (22:04 +0200)]
Btrfs: allow for canceling restriper

Implement an ioctl for canceling restriper.  Currently we wait until
relocation of the current block group is finished, in future this can be
done by triggering a commit.  Balance item is deleted and no memory
about the interrupted balance is kept.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
12 years agoBtrfs: allow for pausing restriper
Ilya Dryomov [Mon, 16 Jan 2012 20:04:49 +0000 (22:04 +0200)]
Btrfs: allow for pausing restriper

Implement an ioctl for pausing restriper.  This pauses the relocation,
but balance is still considered to be "in progress": balance item is
not deleted, other volume operations cannot be started, etc.  If paused
in the middle of profile changing operation we will continue making
allocations with the target profile.

Add a hook to close_ctree() to pause restriper and free its data
structures on unmount.  (It's safe to unmount when restriper is in
"paused" state, we will resume with the same parameters on the next
mount)

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
12 years agoBtrfs: add skip_balance mount option
Ilya Dryomov [Mon, 16 Jan 2012 20:04:48 +0000 (22:04 +0200)]
Btrfs: add skip_balance mount option

Since restriper kthread starts involuntarily on mount and can suck cpu
and memory bandwidth add a mount option to forcefully skip it.  The
restriper in that case hangs around in paused state and can be resumed
from userspace when it's convenient.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
12 years agoBtrfs: recover balance on mount
Ilya Dryomov [Mon, 16 Jan 2012 20:04:48 +0000 (22:04 +0200)]
Btrfs: recover balance on mount

On mount, if balance item is found, resume balance in a separate
kernel thread.

Try to be smart to continue roughly where previous balance (or convert)
was interrupted.  For chunk types that were being converted to some
profile we turn on soft convert, in case of a simple balance we turn on
usage filter and relocate only less-than-90%-full chunks of that type.
These are just heuristics but they help quite a bit, and can be improved
in future.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
12 years agoBtrfs: save balance parameters to disk
Ilya Dryomov [Mon, 16 Jan 2012 20:04:48 +0000 (22:04 +0200)]
Btrfs: save balance parameters to disk

Introduce a new btree objectid for storing balance item.  The reason is
to be able to resume restriper after a crash with the same parameters.
Balance item has a very high objectid and goes into tree of tree roots.

The key for the new item is as follows:

[ BTRFS_BALANCE_OBJECTID ; BTRFS_BALANCE_ITEM_KEY ; 0 ]

Older kernels simply ignore it so it's safe to mount with an older
kernel and then go back to the newer one.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
12 years agoBtrfs: soft profile changing mode (aka soft convert)
Ilya Dryomov [Mon, 16 Jan 2012 20:04:48 +0000 (22:04 +0200)]
Btrfs: soft profile changing mode (aka soft convert)

When doing convert from one profile to another if soft mode is on
restriper won't touch chunks that already have the profile we are
converting to.  This is useful if e.g. half of the FS was converted
earlier.

The soft mode switch is (like every other filter) per-type.  This means
that we can convert for example meta chunks the "hard" way while
converting data chunks selectively with soft switch.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
12 years agoBtrfs: implement online profile changing
Ilya Dryomov [Mon, 16 Jan 2012 20:04:48 +0000 (22:04 +0200)]
Btrfs: implement online profile changing

Profile changing is done by launching a balance with
BTRFS_BALANCE_CONVERT bits set and target fields of respective
btrfs_balance_args structs initialized.  Profile reducing code in this
case will pick restriper's target profile if it's available instead of
doing a blind reduce.  If target profile is not yet available it goes
back to a plain reduce.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
12 years agoBtrfs: do not reduce profile in do_chunk_alloc()
Ilya Dryomov [Mon, 16 Jan 2012 20:04:48 +0000 (22:04 +0200)]
Btrfs: do not reduce profile in do_chunk_alloc()

Every caller of do_chunk_alloc() feeds it the reduced allocation
profile, so stop trying to reduce it one more time.  Instead check the
validity of the passed profile.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
12 years agoBtrfs: virtual address space subset filter
Ilya Dryomov [Mon, 16 Jan 2012 20:04:48 +0000 (22:04 +0200)]
Btrfs: virtual address space subset filter

Select chunks which have at least one byte located inside a given
[vstart, vend) virtual address space range.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
12 years agoBtrfs: devid subset filter
Ilya Dryomov [Mon, 16 Jan 2012 20:04:48 +0000 (22:04 +0200)]
Btrfs: devid subset filter

Select chunks which have at least one byte of at least one stripe
located on a device with devid X in a given [pstart,pend) physical
address range.

This filter only works when devid filter is turned on.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
12 years agoBtrfs: devid filter
Ilya Dryomov [Mon, 16 Jan 2012 20:04:47 +0000 (22:04 +0200)]
Btrfs: devid filter

Relocate chunks which have at least one stripe located on a device with
devid X.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
12 years agoBtrfs: usage filter
Ilya Dryomov [Mon, 16 Jan 2012 20:04:47 +0000 (22:04 +0200)]
Btrfs: usage filter

Select chunks that are less than X percent full.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
12 years agoBtrfs: profiles filter
Ilya Dryomov [Mon, 16 Jan 2012 20:04:47 +0000 (22:04 +0200)]
Btrfs: profiles filter

Select chunks based on a given profile mask.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
12 years agoBtrfs: add basic infrastructure for selective balancing
Ilya Dryomov [Mon, 16 Jan 2012 20:04:47 +0000 (22:04 +0200)]
Btrfs: add basic infrastructure for selective balancing

This allows to have a separate set of filters for each chunk type
(data,meta,sys).  The code however is generic and switch on chunk type
is only done once.

This commit also adds a type filter: it allows to balance for example
meta and system chunks w/o touching data ones.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
12 years agoBtrfs: add basic restriper infrastructure
Ilya Dryomov [Mon, 16 Jan 2012 20:04:47 +0000 (22:04 +0200)]
Btrfs: add basic restriper infrastructure

Add basic restriper infrastructure: extended balancing ioctl and all
related ioctl data structures, add data structure for tracking
restriper's state to fs_info, etc.  The semantics of the old balancing
ioctl are fully preserved.

Explicitly disallow any volume operations when balance is in progress.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
12 years agoBtrfs: make avail_*_alloc_bits fields dynamic
Ilya Dryomov [Mon, 16 Jan 2012 20:04:47 +0000 (22:04 +0200)]
Btrfs: make avail_*_alloc_bits fields dynamic

Currently when new chunks are created respective avail_alloc_bits field
is updated to reflect profiles of all chunks present in the system.
However when chunks are removed profile bits are never cleared.

This patch clears profile bit of respective avail_alloc_bits field when
the last chunk with that profile is removed.  Restriper needs this to
properly operate when "downgrading".

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
12 years agoBtrfs: add BTRFS_AVAIL_ALLOC_BIT_SINGLE bit
Ilya Dryomov [Mon, 16 Jan 2012 20:04:47 +0000 (22:04 +0200)]
Btrfs: add BTRFS_AVAIL_ALLOC_BIT_SINGLE bit

Right now on-disk BTRFS_BLOCK_GROUP_* profile bits are used for
avail_{data,metadata,system}_alloc_bits fields, which gather info about
available allocation profiles in the FS.  When chunk is created or read
from disk, its profile is OR'ed with the corresponding avail_alloc_bits
field.  Since SINGLE is denoted by 0 in the on-disk format, currently
there is no way to tell when such chunks become avaialble.  Restriper
needs that information, so add a separate bit for SINGLE profile.

This bit is going to be in-memory only, it should never be written out
to disk, so it's not a disk format change.  However to avoid remappings
in future, reserve corresponding on-disk bit.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
12 years agoBtrfs: introduce masks for chunk type and profile
Ilya Dryomov [Mon, 16 Jan 2012 20:04:47 +0000 (22:04 +0200)]
Btrfs: introduce masks for chunk type and profile

Chunk's type and profile are encoded in u64 flags field.  Introduce
masks to easily access them.  Also fix the type of BTRFS_BLOCK_GROUP_*
constants, it should be ULL.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
12 years agoBtrfs: get rid of *_alloc_profile fields
Ilya Dryomov [Mon, 16 Jan 2012 20:04:47 +0000 (22:04 +0200)]
Btrfs: get rid of *_alloc_profile fields

{data,metadata,system}_alloc_profile fields have been unused for a long
time now.  Get rid of them.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
12 years agomac80211: fix tx->skb NULL pointer dereference
Yoni Divinsky [Mon, 16 Jan 2012 13:18:59 +0000 (15:18 +0200)]
mac80211: fix tx->skb NULL pointer dereference

In function ieee80211_tx_h_encrypt the var info was
initialized from tx->skb, since the fucntion
is called after the function ieee80211_tx_h_fragment
tx->skb is not valid anymore.

Signed-off-by: Yoni Divinsky <yoni.divinsky@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agowireless: iwlwifi: iwl-scan.c: Fix build warning
Fabio Estevam [Mon, 16 Jan 2012 02:47:12 +0000 (00:47 -0200)]
wireless: iwlwifi: iwl-scan.c: Fix build warning

Fix the following build warning:

drivers/net/wireless/iwlwifi/iwl-scan.c: In function ‘iwlagn_request_scan’:
drivers/net/wireless/iwlwifi/iwl-scan.c:572: warning: ‘cmd_len’ may be used uninitialized in this function

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>