Niels de Vos [Tue, 17 Dec 2013 17:20:16 +0000 (18:20 +0100)]
NFS: dprintk() should not print negative fileids and inode numbers
A fileid in NFS is a uint64. There are some occurrences where dprintk()
outputs a signed fileid. This leads to confusion and more difficult to
read debugging (negative fileids matching positive inode numbers).
Signed-off-by: Niels de Vos <ndevos@redhat.com> CC: Santosh Pradhan <spradhan@redhat.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Alexander Aring [Sat, 21 Dec 2013 04:39:04 +0000 (05:39 +0100)]
nfs: fix dead code of ipv6_addr_scope
The correct way to check on IPV6_ADDR_SCOPE_LINKLOCAL is to check with
the ipv6_addr_src_scope function.
Currently this can't be work, because ipv6_addr_scope returns a int with
a mask of IPV6_ADDR_SCOPE_MASK (0x00f0U) and IPV6_ADDR_SCOPE_LINKLOCAL
is 0x02. So the condition is always false.
Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
When a task enters call_refreshresult with status 0 from call_refresh and
!rpcauth_uptodatecred(task) it enters call_refresh again with no rate-limiting
or max number of retries.
Instead of trying forever, make use of the retry path that other errors use.
This only seems to be possible when the crrefresh callback is gss_refresh_null,
which only happens when destroying the context.
To reproduce:
1) mount with sec=krb5 (or sec=sys with krb5 negotiated for non FSID specific
operations).
2) reboot - the client will be stuck and will need to be hard rebooted
Jiang Liu [Thu, 19 Dec 2013 12:47:46 +0000 (20:47 +0800)]
ACPI / extlog: replace open-coded _DSM code with helper functions
Use helper functions to simplify _DSM related code in acpi_extlog driver.
Also mark initialization data and functions with __init and __initdata
to reduce memory footprint.
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com> Tested-by: Chen, Gong <gong.chen@linux.intel.com> Reviewed-by: Chen, Gong <gong.chen@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Jiang Liu [Thu, 19 Dec 2013 12:38:22 +0000 (20:38 +0800)]
ACPI / nouveau: replace open-coded _DSM code with helper functions
Use helper functions to simplify _DSM related code in nouveau driver.
After analyzing the ACPI _DSM related code, I changed nouveau_optimus_dsm()
to expect a buffer and nouveau_dsm() to expect an integer only.
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Jiang Liu [Thu, 19 Dec 2013 12:38:20 +0000 (20:38 +0800)]
ACPI / i915: replace open-coded _DSM code with helper functions
Use helper functions to simplify _DSM related code in i915 driver.
Function intel_dsm() is used to check functions supported by ACPI _DSM
method, but it has strange check for special value 0x80000002. After
digging into nouveau driver, I think the check is copied from nouveau
driver and is useless for i915 driver, so remove it.
Acked-by: Daniel Vetter <daniel@ffwll.ch> Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Jiang Liu [Thu, 19 Dec 2013 12:38:18 +0000 (20:38 +0800)]
ACPI / TPM: detect PPI features by checking availability of _DSM functions
Detecting physical presence interface features by checking availbility
of corresponding ACPI _DSM functions, it should be more accurate than
checking TPM version number.
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Jiang Liu [Thu, 19 Dec 2013 12:38:17 +0000 (20:38 +0800)]
ACPI / TPM: replace open-coded _DSM code with helper functions
Use helper functions to simplify _DSM related code in TPM driver.
This patch also help to get rid of following warning messages:
[ 163.509575] ACPI Error: Incorrect return type [Buffer] requested [Package]
(20130517/nsxfeval-135)
But there is still an warning left.
[ 181.637366] ACPI Warning: \_SB_.IIO0.LPC0.TPM_._DSM: Argument #4 type
mismatch - Found [Buffer], ACPI requires [Package] (20130517/nsarguments-95)
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Jiang Liu [Thu, 19 Dec 2013 12:38:14 +0000 (20:38 +0800)]
PCI / pci-label: treat PCI label with index 0 as valid label
Current pci-label driver detects ACPI label by checking label index
returned by ACPI _DSM method, and treats it as valid if label index
is positive. According to ACPI Firmware specification 3.1, zero is
also an valid label index. So change code to detect availability of
ACPI slot label by checking availaiblity of ACPI _DSM function for
PCI label.
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Jiang Liu [Thu, 19 Dec 2013 12:38:10 +0000 (20:38 +0800)]
ACPI: introduce helper interfaces for _DSM method
There are several drivers making use of ACPI _DSM method to detect
and invoke device specific methods. Currently every driver has
implemented its private version to support ACPI _DSM method.
So this patch introduces three helper functions to support ACPI _DSM
method, which will be used to replace open-coded versions.
It helps to simplify code and improve code readability.
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Jiang Liu [Thu, 19 Dec 2013 12:38:15 +0000 (20:38 +0800)]
ACPI / TPM: fix memory leak when walking ACPI namespace
In function ppi_callback(), memory allocated by acpi_get_name() will get
leaked when current device isn't the desired TPM device, so fix the
memory leak.
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com> Cc: All applicable <stable@vger.kernel.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Alexander Mezin [Sat, 4 Jan 2014 02:07:59 +0000 (09:07 +0700)]
ACPI / AC: change notification handler type to ACPI_ALL_NOTIFY
With kernel 3.13rc5 there are no AC adapter notifications on my laptop.
Commit cc8ef5270734 "ACPI / AC: convert ACPI ac driver to platform bus"
changed the driver to listen to device notifications only. However, AML
code on my laptop notifies the driver with zero event.
This patch changes the driver to listen to all events again.
Fixes: cc8ef5270734 (ACPI / AC: convert ACPI ac driver to platform bus)
References: https://bugzilla.kernel.org/show_bug.cgi?id=67821 Signed-off-by: Alexander Mezin <mezin.alexander@gmail.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* pm-cpufreq:
cpufreq: Select PM_OPP rather than depending on it
cpufreq: Make ARM big.LITTLE switcher depend on ARM
intel_pstate: Remove periodic P state boost
intel_pstate: Add setting voltage value for baytrail P states.
cpufreq: SPEAr: clk_round_rate() can return a zero upon error
cpufreq: cpufreq-cpu0: clk_round_rate() can return a zero upon error
* pm-sleep:
PM / Sleep: Add macro to define common late/early system PM callbacks
PM / hibernate: export hibernation_set_ops
* pm-runtime:
PM / Runtime: Implement the pm_generic_runtime functions for CONFIG_PM
PM / Runtime: Add second macro for definition of runtime PM callbacks
Rob Herring [Fri, 3 Jan 2014 15:17:44 +0000 (16:17 +0100)]
ARM: 7933/1: rename ioremap_cached to ioremap_cache
ioremap_cache is more aligned with other architectures.
There are only 2 users of this in the kernel: pxa2xx-flash and Xen.
This fixes Xen build failures on arm64:
drivers/tty/hvc/hvc_xen.c:233:2: error: implicit declaration of function 'ioremap_cached' [-Werror=implicit-function-declaration]
drivers/xen/grant-table.c:1174:3: error: implicit declaration of function 'ioremap_cached' [-Werror=implicit-function-declaration]
drivers/xen/xenbus/xenbus_probe.c:778:4: error: implicit declaration of function 'ioremap_cached' [-Werror=implicit-function-declaration]
Signed-off-by: Rob Herring <rob.herring@calxeda.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Russell King [Thu, 2 Jan 2014 17:14:45 +0000 (17:14 +0000)]
CRYPTO: Fix more AES build errors
Building a multi-arch kernel results in:
arch/arm/crypto/built-in.o: In function `aesbs_xts_decrypt':
sha1_glue.c:(.text+0x15c8): undefined reference to `bsaes_xts_decrypt'
arch/arm/crypto/built-in.o: In function `aesbs_xts_encrypt':
sha1_glue.c:(.text+0x1664): undefined reference to `bsaes_xts_encrypt'
arch/arm/crypto/built-in.o: In function `aesbs_ctr_encrypt':
sha1_glue.c:(.text+0x184c): undefined reference to `bsaes_ctr32_encrypt_blocks'
arch/arm/crypto/built-in.o: In function `aesbs_cbc_decrypt':
sha1_glue.c:(.text+0x19b4): undefined reference to `bsaes_cbc_encrypt'
This code is already runtime-conditional on NEON being supported, so
there's no point compiling it out depending on the minimum build
architecture.
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Russell King [Wed, 1 Jan 2014 11:59:44 +0000 (11:59 +0000)]
Fix select-induced Kconfig warning for ZBOOT_ROM
warning: (ARCH_MULTIPLATFORM && ARCH_CLPS711X && ARCH_PXA &&
SOC_EXYNOS5440 && ARCH_EMEV2) selects AUTO_ZRELADDR which
has unmet direct dependencies (!ZBOOT_ROM)
This is because it's possible to have ZBOOT_ROM enabled, but at the
same time have another option enabled which selects AUTO_ZRELADDR
overriding the !ZBOOT_ROM dependency. Fix this by reversing the
dependencies between ZBOOT_ROM and the options which depend on
!ZBOOT_ROM.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
1) Missing include can lead to build failure, from Kirill Tkhai.
2) Use dev_is_pci() where applicable, from Yijing Wang.
3) Enable irqs after we enable preemption in cpu startup path, from
Kirill Tkhai.
4) Revert a __copy_{to,from}_user_inatomic change that broke
iov_iter_copy_from_user_atomic() and thus several tests in xfstests
and LTP. From Dave Kleikamp.
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
Revert "sparc64: Fix __copy_{to,from}_user_inatomic defines."
sparc64: smp_callin: Enable irqs after preemption is disabled
sparc/PCI: Use dev_is_pci() to identify PCI devices
sparc64: Fix build regression
This commit broke the behavior of __copy_from_user_inatomic when
it is only partially successful. Instead of returning the number
of bytes not copied, it now returns 1. This translates to the
wrong value being returned by iov_iter_copy_from_user_atomic.
xfstests generic/246 and LTP writev01 both fail on btrfs and nfs
because of this.
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com> Cc: Hugh Dickins <hughd@google.com> Cc: David S. Miller <davem@davemloft.net> Cc: sparclinux@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
Yijing Wang [Wed, 11 Dec 2013 06:00:26 +0000 (14:00 +0800)]
sparc/PCI: Use dev_is_pci() to identify PCI devices
Use dev_is_pci() instead of checking bus type directly.
Signed-off-by: Yijing Wang <wangyijing@huawei.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Olof Johansson [Sat, 4 Jan 2014 19:43:53 +0000 (11:43 -0800)]
Merge tag 'samsung-dt-3' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/dt
From Kukjin Kim:
Samsung DT 3rd updates for v3.14
- add exynos4412-tiny4412 board dt for FriendlyARM's TINY4412
board including initial support UART, SD card and LEDs
- add exynos5420-arndale-octa board dt for Arndale Octa board
* tag 'samsung-dt-3' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
ARM: dts: add support for EXYNOS4412 based TINY4412 board
ARM: dts: Add initial support for Arndale Octa board
Guenter Roeck [Wed, 25 Dec 2013 15:25:59 +0000 (07:25 -0800)]
hwmon: (nct6775) Re-enable logical device mapping for NCT6791 during resume
After a suspend/resume cycle, the NCT6791 is back to its original BIOS
programming. In this state, HWMON IO access may be locked.
Re-enable it during resume.