David Daney [Tue, 18 Jun 2013 18:12:52 +0000 (18:12 +0000)]
MIPS: OCTEON: Set proper UART clock in internal device trees.
Following patch to use generic 8250 drivers will need proper clock
information. So when using the internal device tree, populate the
"clock-frequency" property with the correct value.
Paul Gortmaker [Tue, 18 Jun 2013 17:01:10 +0000 (17:01 +0000)]
MIPS: Delete Wind River ppmc eval board support.
This board has been EOL for many years now; lets not burden people doing
build coverage and other tree wide work with working on essentially dead
files.
[ralf@linux-mips.org: Also remove arch/mips/include/asm/mach-wrppmc/war.h.]
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: linux-mips@linux-mips.org Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Patchwork: http://patchwork.linux-mips.org/patch/5503/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Florian Fainelli [Tue, 18 Jun 2013 16:55:38 +0000 (16:55 +0000)]
MIPS: BCM63XX: remove bogus Kconfig selects
Remove the bogus selects on USB-related symbols for 6345 and 6338, not
only we do not yet support USB on BCM63XX, but they also cause the
following warnings:
warning: (BCM63XX_CPU_6338 && BCM63XX_CPU_6345) selects
USB_OHCI_BIG_ENDIAN_MMIO which has unmet direct dependencies
(USB_SUPPORT && USB && USB_OHCI_HCD)
warning: (BCM63XX_CPU_6338 && BCM63XX_CPU_6345) selects
USB_OHCI_BIG_ENDIAN_DESC which has unmet direct dependencies
(USB_SUPPORT && USB && USB_OHCI_HCD)
make[4]: Leaving directory `/home/florian/dev/linux'
Just get rid of these bogus Kconfig selects because neither 6345 nor
6338 actually have built-in USB host controllers.
Paul Burton [Sat, 15 Jun 2013 15:34:40 +0000 (15:34 +0000)]
MIPS: Fix execution hazard during watchpoint register probe
Writing a value to a WatchLo* register creates an execution hazard, so
if its value is then read before that hazard is cleared then said value
may be invalid. The mips_probe_watch_registers function must therefore
clear the execution hazard between setting the match bits in a WatchLo*
register & reading the register back in order to check which are set.
This fixes intermittent incorrect watchpoint register probing on some
MIPS cores such as interAptiv & proAptiv.
Signed-off-by: Paul Burton <paul.burton@imgtec.com> Reviewed-by: James Hogan <james.hogan@imgtec.com> Acked-by: Steven J. Hill <Steven.Hill@imgtec.com> Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/5474/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Markos Chandras [Mon, 17 Jun 2013 13:00:38 +0000 (13:00 +0000)]
MIPS: sibyte: Amend dependencies for SIBYTE_BUS_WATCHER
SIBYTE_BUS_WATCHER is only visible if CONFIG_SIBYTE_BCM112X
or CONFIG_SIBYTE_SB1250 is selected according to the
arch/mips/sibyte/Makefile.
This fixes the following build problem:
arch/mips/mm/cerr-sb1.c:254: undefined reference to `check_bus_watcher'
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Acked-by: Steven J. Hill <Steven.Hill@imgtec.com> Cc: sibyte-users@bitmover.com Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5482/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Markos Chandras [Mon, 17 Jun 2013 13:00:36 +0000 (13:00 +0000)]
MIPS: sibyte: Declare the cfe_write() buffer as constant
The write() prototype expects a const char * as argument so declare
it as such.
Fixes the following build problem:
arch/mips/sibyte/common/cfe_console.c:23:5: error: passing argument 2 of
'cfe_write' discards 'const' qualifier from pointer target type [-Werror]
arch/mips/sibyte/common/cfe_console.c:34:4: error: passing argument 2 of
'cfe_write' makes pointer from integer without a cast [-Werror]
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Acked-by: Steven J. Hill <Steven.Hill@imgtec.com> Cc: sibyte-users@bitmover.com Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5485/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Markos Chandras [Mon, 17 Jun 2013 13:00:37 +0000 (13:00 +0000)]
MIPS: Sibyte: Add missing sched.h header
It's needed for the TASK_INTERRUPTIBLE definition.
Fixes the following build problem:
arch/mips/sibyte/common/sb_tbprof.c:235:4: error: 'TASK_INTERRUPTIBLE'
undeclared (first use in this function)
[ralf@linux-mips.org: Ideally sched.h should be included into the actual
user of TASK_INTERRUPTIBLE, <linux/wait.h> but that seems way too risky
that close to a release.]
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Acked-by: Steven J. Hill <Steven.Hill@imgtec.com> Cc: sibyte-users@bitmover.com Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5479/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Markos Chandras [Mon, 17 Jun 2013 13:00:41 +0000 (13:00 +0000)]
MIPS: sibyte: Remove unused variable.
Fixes the following build problem:
arch/mips/sibyte/sb1250/bus_watcher.c: In function 'sibyte_bw_int':
arch/mips/sibyte/sb1250/bus_watcher.c:179:7: error: unused variable 'bw_buf'
[-Werror=unused-variable]
Steven J. Hill [Thu, 13 Jun 2013 19:55:06 +0000 (19:55 +0000)]
MIPS: malta: Remove software reset defines from generic header.
Remove the software reset register and reset value definitions
from the 'include/asm/mips-boards/generic.h' header file. Also
clean up header and whitespace in platform file.
Signed-off-by: Steven J. Hill <Steven.Hill@imgtec.com> Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5456/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Steven J. Hill [Thu, 13 Jun 2013 19:55:05 +0000 (19:55 +0000)]
MIPS: malta: Move defines of reset registers and values.
Remove usage of 'include/asm/mips-boards/generic.h' header file.
Instead, move the defines for SOFTRES_REG and GORESET local to
the platform file.
Signed-off-by: Steven J. Hill <Steven.Hill@imgtec.com> Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5455/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Steven J. Hill [Thu, 13 Jun 2013 19:55:04 +0000 (19:55 +0000)]
MIPS: sead3: Fix ability to perform a soft reset.
The soft reset register address and reset value to be written are
incorrect for the SEAD-3 platform. This patch fixes them such that
the SEAD-3 can actually perform a soft reset instead of causing an
exception. Also remove usage of 'include/asm/mips-boards/generic.h'
header file.
Signed-off-by: Steven J. Hill <Steven.Hill@imgtec.com> Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5454/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Aaro Koskinen [Tue, 19 Feb 2013 00:00:39 +0000 (02:00 +0200)]
MIPS: Loongson: Fix random early boot hang
Some Loongson boards (e.g. Lemote FuLoong mini-PC) use ISA/southbridge
device (CS5536 general purpose timer) for the timer interrupt. It starts
running early and is already enabled during the PCI configuration,
during which there is a small window in pci_read_base() when the register
access is temporarily disabled. If the timer interrupts at this point,
the system will hang. Fix this by adding a fixup that keeps the register
access always enabled.
David Daney [Wed, 12 Jun 2013 17:28:33 +0000 (17:28 +0000)]
MIPS: Octeon: Don't clobber bootloader data structures.
Commit abe77f90dc (MIPS: Octeon: Add kexec and kdump support) added a
bootmem region for the kernel image itself. The problem is that this
is rounded up to a 0x100000 boundary, which is memory that may not be
owned by the kernel. Depending on the kernel's configuration based
size, this 'extra' memory may contain data passed from the bootloader
to the kernel itself, which if clobbered makes the kernel crash in
various ways.
The fix: Quit rounding the size up, so that we only use memory
assigned to the kernel.
Ralf Baechle [Thu, 13 Jun 2013 12:05:03 +0000 (14:05 +0200)]
MIPS: IP27: Fix build errors with CONFIG_PCI disabled.
LD init/built-in.o
arch/mips/built-in.o: In function `xtalk_probe_node':
(.cpuinit.text+0x67c): undefined reference to `bridge_probe'
arch/mips/built-in.o: In function `xtalk_probe_node':
(.cpuinit.text+0x7d8): undefined reference to `bridge_probe'
Ralf Baechle [Thu, 13 Jun 2013 12:04:16 +0000 (14:04 +0200)]
MIPS: IP27: Fix build errors with CONFIG_PCI disabled.
LD init/built-in.o
arch/mips/built-in.o: In function `startup_bridge_irq':
ip27-irq.c:(.text+0x434): undefined reference to `irq_to_slot'
ip27-irq.c:(.text+0x43c): undefined reference to `irq_to_slot'
ip27-irq.c:(.text+0x460): undefined reference to `irq_to_bridge'
ip27-irq.c:(.text+0x464): undefined reference to `irq_to_bridge'
arch/mips/built-in.o: In function `shutdown_bridge_irq':
ip27-irq.c:(.text+0x564): undefined reference to `irq_to_bridge'
ip27-irq.c:(.text+0x56c): undefined reference to `irq_to_bridge'
ip27-irq.c:(.text+0x5a0): undefined reference to `irq_to_slot'
ip27-irq.c:(.text+0x5a4): undefined reference to `irq_to_slot'
Ralf Baechle [Thu, 13 Jun 2013 11:40:09 +0000 (13:40 +0200)]
MIPS: IP27: Fix build error with CONFIG_MAPPED_KERNEL
Some of the TLB bit definitions in <asm/pgtable-bits.h> have become rather
complex and are no longer usable from assembler resulting in an
explosion like this:
Ralf Baechle [Thu, 13 Jun 2013 08:21:27 +0000 (10:21 +0200)]
MIPS: Compat: Fix binfmt_elf build errors.
CONFIG_MIPS32_N32=y but CONFIG_BINFMT_ELF disabled results in the following
linker errors:
arch/mips/built-in.o: In function `elf_core_dump':
binfmt_elfn32.c:(.text+0x23dbc): undefined reference to `elf_core_extra_phdrs'
binfmt_elfn32.c:(.text+0x246e4): undefined reference to `elf_core_extra_data_size'
binfmt_elfn32.c:(.text+0x248d0): undefined reference to `elf_core_write_extra_phdrs'
binfmt_elfn32.c:(.text+0x24ac4): undefined reference to `elf_core_write_extra_data'
CONFIG_MIPS32_O32=y but CONFIG_BINFMT_ELF disabled results in the following
linker errors:
arch/mips/built-in.o: In function `elf_core_dump':
binfmt_elfo32.c:(.text+0x28a04): undefined reference to `elf_core_extra_phdrs'
binfmt_elfo32.c:(.text+0x29330): undefined reference to `elf_core_extra_data_size'
binfmt_elfo32.c:(.text+0x2951c): undefined reference to `elf_core_write_extra_phdrs'
binfmt_elfo32.c:(.text+0x29710): undefined reference to `elf_core_write_extra_data'
Fixed by building kernel/elfcore.o CONFIG_MIPS32_N32 and CONFIG_MIPS32_O32.
Ralf Baechle [Thu, 13 Jun 2013 00:45:53 +0000 (02:45 +0200)]
RAPIDIO: IDT_GEN2: Fix build error.
CC drivers/rapidio/switches/idt_gen2.o
drivers/rapidio/switches/idt_gen2.c: In function ‘idtg2_show_errlog’:
drivers/rapidio/switches/idt_gen2.c:379:30: error: ‘PAGE_SIZE’ undeclared (first use in this function)
drivers/rapidio/switches/idt_gen2.c:379:30: note: each undeclared identifier is reported only once for each function it appears in
Russell King [Tue, 18 Jun 2013 19:11:32 +0000 (20:11 +0100)]
Merge branch 'for-rmk/lpae' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into devel-stable
Conflicts:
arch/arm/kernel/smp.c
Please pull these miscellaneous LPAE fixes I've been collecting for a while
now for 3.11. They've been tested and reviewed by quite a few people, and most
of the patches are pretty trivial. -- Will Deacon.
Trond Myklebust [Tue, 18 Jun 2013 17:52:15 +0000 (13:52 -0400)]
Merge branch 'labeled-nfs' into linux-next
* labeled-nfs:
NFS: Add in v4.2 callback operation
NFS: Make callbacks minor version generic
Kconfig: Add Kconfig entry for Labeled NFS V4 client
NFS: Extend NFS xattr handlers to accept the security namespace
NFS: Client implementation of Labeled-NFS
NFS: Add label lifecycle management
NFS:Add labels to client function prototypes
NFSv4: Extend fattr bitmaps to support all 3 words
NFSv4: Introduce new label structure
NFSv4: Add label recommended attribute and NFSv4 flags
NFSv4.2: Added NFS v4.2 support to the NFS client
SELinux: Add new labeling type native labels
LSM: Add flags field to security_sb_set_mnt_opts for in kernel mount data.
Security: Add Hook to test if the particular xattr is part of a MAC model.
Security: Add hook to calculate context based on a negative dentry.
NFS: Add NFSv4.2 protocol constants
Trond Myklebust [Sat, 1 Jun 2013 15:50:58 +0000 (11:50 -0400)]
NFSv4: Move the DNS resolver into the NFSv4 module
The other protocols don't use it, so make it local to NFSv4, and
remove the EXPORT.
Also ensure that we only compile in cache_lib.o if we're using
the legacy DNS resolver.
The problem is that we're ending up in __rpc_lookup_create_exclusive
with a negative dentry that already has d_op set. A little debugging
has shown that when we hit this, the d_ops are already set to
simple_dentry_operations.
I believe that what's happening is that during a mount, idmapd is racing
in and doing a lookup of /var/lib/nfs/rpc_pipefs/nfs/clnt???/idmap.
Before that dentry reference is released, the kernel races in to create
that file and finds the new negative dentry, which already has the
d_op set.
This patch just avoids setting the d_op if it's already set.
simple_dentry_operations and rpc_dentry_operations are functionally
equivalent so it shouldn't matter which one it's set to.
Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Ming Lei [Sat, 15 Jun 2013 08:36:38 +0000 (16:36 +0800)]
firmware loader: fix use-after-free by double abort
fw_priv->buf is accessed in both request_firmware_load() and
writing to sysfs file of 'loading' context, but not protected
by 'fw_lock' entirely. The patch makes sure that access on
'fw_priv->buf' is protected by the lock.
So fixes the double abort problem reported by nirinA raseliarison:
Paul Gortmaker [Tue, 18 Jun 2013 13:38:59 +0000 (13:38 +0000)]
MIPS: Delete __cpuinit/__CPUINIT usage from MIPS code
The __cpuinit type of throwaway sections might have made sense
some time ago when RAM was more constrained, but now the savings
do not offset the cost and complications. For example, the fix in
commit 5e427ec2d0 ("x86: Fix bit corruption at CPU resume time")
is a good example of the nasty type of bugs that can be created
with improper use of the various __init prefixes.
After a discussion on LKML[1] it was decided that cpuinit should go
the way of devinit and be phased out. Once all the users are gone,
we can then finally remove the macros themselves from linux/init.h.
Note that some harmless section mismatch warnings may result, since
notify_cpu_starting() and cpu_up() are arch independent (kernel/cpu.c)
and are flagged as __cpuinit -- so if we remove the __cpuinit from
the arch specific callers, we will also get section mismatch warnings.
As an intermediate step, we intend to turn the linux/init.h cpuinit
related content into no-ops as early as possible, since that will get
rid of these warnings. In any case, they are temporary and harmless.
Here, we remove all the MIPS __cpuinit from C code and __CPUINIT
from asm files. MIPS is interesting in this respect, because there
are also uasm users hiding behind their own renamed versions of the
__cpuinit macros.
[1] https://lkml.org/lkml/2013/5/20/589
[ralf@linux-mips.org: Folded in Paul's followup fix.]
lib: Move fonts from drivers/video/console/ to lib/fonts/
Several drivers need font support independent of CONFIG_VT, cfr. commit 9cbce8d7e1dae0744ca4f68d62aa7de18196b6f4, "console/font: Refactor font
support code selection logic").
Hence move the fonts and their support logic from drivers/video/console/ to
its own library directory lib/fonts/.
This also allows to limit processing of drivers/video/console/Makefile to
CONFIG_VT=y again.
console/font: Refactor font support code selection logic
The current Makefile rules to build font support are messy and buggy.
Replace them by Kconfig rules:
- Introduce CONFIG_FONT_SUPPORT, which controls the building of all font
code,
- Select CONFIG_FONT_SUPPORT for all drivers that use fonts,
- Select CONFIG_FONT_8x16 for all drivers that default to the VGA8x16
font,
- Drop the bogus console dependency for CONFIG_VIDEO_VIVI,
- Always process drivers/video/console/Makefile, as some drivers need
fonts even if CONFIG_VT is not set.
This fixes (if CONFIG_SOLO6X10=y and there are no built-in console
drivers):
drivers/built-in.o: In function `solo_osd_print':
drivers/staging/media/solo6x10/solo6x10-enc.c:144: undefined reference to `.find_font'
This fixes (if CONFIG_VT=n):
drivers/built-in.o: In function `vivi_init':
vivi.c:(.init.text+0x1a3da): undefined reference to `find_font'
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> [original part] Acked-by: Randy Dunlap <rdunlap@infradead.org> [drivers/video/Makefile]