summaryrefslogtreecommitdiff
path: root/arch
AgeCommit message (Collapse)AuthorFilesLines
2015-11-04Merge pull request #15 from jk-ozlabs/openbmc/config-fixesopenbmc-20151104-1devJeremy Kerr1-4/+2
Openbmc/config fixes
2015-11-04arm/configs/aspeed_defconfig: Enable i2c driversJeremy Kerr1-1/+2
We have these listed in the device tree. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
2015-11-04arm/configs/aspeed_defconfig: Remove i2c debuggingJeremy Kerr1-3/+0
... so we don't lose too much dmesg output. These can be enabled through dynamic debug anyway. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
2015-11-04arch/arm/boot/dts/ast2400: Add #address- & #size-cells properties to i2cJeremy Kerr1-0/+26
We geta bunch of warnings at the moment. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
2015-11-04arch/arm/boot/dts: Use a common dtsi file for aspeed devicesJeremy Kerr3-585/+326
the dts files for palmetto and barreleye are mostly the same; use a dtsi file for the common chip parts, keeping only the board-specific things in the per-platform files. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
2015-11-02arm/dts/aspeed: Added i2c busses and devicesopenbmc-20151102-1Norman James2-7/+354
Signed-off-by: Joel Stanley <joel@jms.id.au>
2015-10-30aspeed/i2c: add all buses to device treeJoel Stanley1-0/+99
They will only be enabled if the status property is changed from "disabled". Signed-off-by: Joel Stanley <joel@jms.id.au>
2015-10-30aspeed/i2c: Add working driver for multiple busesJoel Stanley1-18/+16
We do not support DMA, and have not tested any slave support, however master mode byte-at-a-time is working. The device tree currently includes the first and second buses. Signed-off-by: Joel Stanley <joel@jms.id.au>
2015-10-27gpio/aspeed: Implement interrupts for GPIO banksJeremy Kerr1-0/+1
We have a set of interrupt registers in each bank; this change adds a gpio irqchip to hook them up to the GPIO code. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
2015-10-27gpio/aspeed: Expose entire bank as one gpio chipJeremy Kerr1-27/+2
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
2015-10-23arm/dts/aspeeed: Fix unit address for ibtJeremy Kerr1-1/+1
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
2015-10-23misc/bt-host: use a more explicit compatible stringJeremy Kerr1-1/+1
The interface we're using here is specific to the aspeed hardware implementation. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
2015-10-16arm/aspeed_defconfig: change CONFIG_USB_G_SERIAL to yJeremy Kerr1-1/+1
It's the only module present. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
2015-10-16arm/mach-aspeed: Enable UART clock divisorJeremy Kerr1-0/+10
Our .dts assumes that the UART clock is divided by 13, but different u-boots may leave this bit in different states. Initialise it in aspeed_early_init explicitly. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
2015-10-13arm/aspeed_defconfig: Add required options to boot with systemdCyril Bur1-3/+8
2015-10-06config: update defconfig for ipmi bt host driverJoel Stanley1-0/+5
Signed-off-by: Joel Stanley <joel@jms.id.au>
2015-10-06dts: update device tree for ncsi supportJoel Stanley1-0/+1
Signed-off-by: Joel Stanley <joel@jms.id.au>
2015-10-06bt/ipmi: Add Aspeed BT IPMI host driverAlistair Popple1-0/+5
This patch adds a simple device driver to expose the iBT interface on Aspeed chips as a character device (/dev/bt). Signed-off-by: Alistair Popple <alistair@popple.id.au>
2015-10-06aspeed: update defconfigJoel Stanley1-2438/+13
Signed-off-by: Joel Stanley <joel@jms.id.au>
2015-10-06i2c wipJoel Stanley1-2/+10
2015-09-14Add DS3231 driver to device tree and defconfigJoel Stanley1-2/+1
Signed-off-by: Joel Stanley <joel@jms.id.au>
2015-09-14i2c: fix crap driver so it worksJoel Stanley3-1/+19
Only the first I2C master for now
2015-09-14gpio: Add Aspeed AST2400 driverJoel Stanley2-0/+42
Signed-off-by: Joel Stanley <joel@jms.id.au>
2015-09-14aspeed: Build sram driverJoel Stanley2-0/+6
We have a 32K chunk of SRAM on the AHB bus. Use the existing driver to provide access to the memory via genalloc. Signed-off-by: Joel Stanley <joel@jms.id.au>
2015-09-14aspeed: Add hpll to dtsJoel Stanley1-7/+12
The i2c driver might need to query what the frequency is Signed-off-by: Joel Stanley <joel@jms.id.au>
2015-09-14LOCAL: add path to my initramfsJoel Stanley1-0/+1
2015-09-14Add aspeed defconfig suitable for palmettoJoel Stanley1-0/+2618
Signed-off-by: Joel Stanley <joel@jms.id.au>
2015-09-14rtc: Add Aspeed AST2400 rtc driverJoel Stanley2-0/+6
Read and writes the time to the non-battery backed RTC in the Aspeed AST2400 system on chip. TODO: support timer functionality. Signed-off-by: Joel Stanley <joel@jms.id.au>
2015-09-14watchdog: Add Aspeed ast2400 watchdog driverJoel Stanley2-10/+7
We now use a notifier to perform reset, so the reboot callback can be removed from the platform code. Signed-off-by: Joel Stanley <joel@jms.id.au>
2015-09-14aspeed: Register APB clock with clk subsystemJoel Stanley1-0/+14
This uses the fixed clock that Ben added to the device tree. It allows us to use the clock framework to query speeds from drivers.
2015-09-14aspeed: Add syscon device to platformJoel Stanley2-1/+10
Adds the device tree and kconfig options. The reg and interrupt properties should be correct. Doesn't do anything yet. Signed-off-by: Joel Stanley <joel@jms.id.au>
2015-09-14pinctl: Add Aspeed driverJoel Stanley1-0/+2
Doesn't do anything yet. Signed-off-by: Joel Stanley <joel@jms.id.au>
2015-09-14arm: ast2400.h was not being included due to thisJoel Stanley1-2/+0
TODO: Fix it properly Signed-off-by: Joel Stanley <joel@jms.id.au>
2015-09-14aspeed: Use defines for aspeed machineJoel Stanley2-22/+20
2015-09-14aspeed: Add some device definitionsJoel Stanley2-16/+137
Signed-off-by: Joel Stanley <joel@jms.id.au>
2015-09-14Fix rebootJoel Stanley1-1/+1
aspeed_restart was declarted __init, so machine_restart was jumping into random memory. We can now reboot using the watchdog. Signed-off-by: Joel Stanley <joel@jms.id.au>
2015-09-14Get some network going...Benjamin Herrenschmidt1-1/+7
2015-09-14WIPBenjamin Herrenschmidt9-0/+372
2015-08-28Merge tag 'powerpc-4.2-4' of ↵Linus Torvalds1-0/+3
git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "Fix MSI/MSI-X on pseries from Guilherme" * tag 'powerpc-4.2-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/PCI: Disable MSI/MSI-X interrupts at PCI probe time in OF case PCI: Make pci_msi_setup_pci_dev() non-static for use by arch code
2015-08-27Merge tag 'arm64-fixes' of ↵Linus Torvalds1-6/+6
git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull amr64 kvm fix from Will Deacon: "We've uncovered a nasty bug in the arm64 KVM code which allows a badly behaved 32-bit guest to bring down the host. The fix is simple (it's what I believe we call a "brown paper bag" bug) and I don't think it makes sense to sit on this, particularly as Russell ended up triggering this rather than just somebody noticing a potential problem by inspection. Usually arm64 KVM changes would go via Paolo's tree, but he's on holiday at the moment and the deal is that anything urgent gets shuffled via the arch trees, so here it is. Summary: Fix arm64 KVM issue when injecting an abort into a 32-bit guest, which would lead to an illegal exception return at EL2 and a subsequent host crash" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: KVM: Fix host crash when injecting a fault into a 32bit guest
2015-08-27arm64: KVM: Fix host crash when injecting a fault into a 32bit guestMarc Zyngier1-6/+6
When injecting a fault into a misbehaving 32bit guest, it seems rather idiotic to also inject a 64bit fault that is only going to corrupt the guest state. This leads to a situation where we perform an illegal exception return at EL2 causing the host to crash instead of killing the guest. Just fix the stupid bug that has been there from day 1. Cc: <stable@vger.kernel.org> Reported-by: Russell King <rmk+kernel@arm.linux.org.uk> Tested-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-08-26powerpc/PCI: Disable MSI/MSI-X interrupts at PCI probe time in OF caseGuilherme G. Piccoli1-0/+3
Since commit 1851617cd2da ("PCI/MSI: Disable MSI at enumeration even if kernel doesn't support MSI"), the setup of dev->msi_cap/msix_cap and the disable of MSI/MSI-X interrupts isn't being done at PCI probe time, as the logic responsible for this was moved in the aforementioned commit from pci_device_add() to pci_setup_device(). The latter function is not reachable on PowerPC pseries platform during Open Firmware PCI probing time. This exhibits as drivers not being able to enable MSI, eg: bnx2x 0000:01:00.0: no msix capability found This patch calls pci_msi_setup_pci_dev() explicitly to disable MSI/MSI-X during PCI probe time on pSeries platform. Fixes: 1851617cd2da ("PCI/MSI: Disable MSI at enumeration even if kernel doesn't support MSI") [mpe: Flesh out change log and clarify comment] Signed-off-by: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2015-08-25Merge branch 'x86-urgent-for-linus' of ↵Linus Torvalds1-7/+7
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fix from Thomas Gleixner: "A single fix for a APIC regression introduced in 4.0 which went undetected until now. I screwed up the x2apic cleanup in a subtle way. The screwup is only visible on systems which have x2apic preenabled in the BIOS and need to disable it during boot" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/apic: Fix fallout from x2apic cleanup
2015-08-23Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linusLinus Torvalds1-1/+1
Pull MIPS bug fixes from Ralf Baechle: "Two more fixes for 4.2. One fixes a build issue with the LLVM assembler - LLVM assembler macro names are case sensitive, GNU as macro names are insensitive; the other corrects a license string (GPL v2, not GPLv2) such that the module loader will recognice the license correctly" * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: FIRMWARE: bcm47xx_nvram: Fix module license. MIPS: Fix LLVM build issue.
2015-08-23Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-armLinus Torvalds2-1/+4
Pull ARM fixes from Russell King: "Another couple of small ARM fixes. A patch from Masahiro Yamada who noticed that "make -jN all zImage" would end up generating bad images where N > 1, and a patch from Nicolas to fix the Marvell CPU user access optimisation code when page faults are disabled" * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm: ARM: 8418/1: add boot image dependencies to not generate invalid images ARM: 8414/1: __copy_to_user_memcpy: fix mmap semaphore usage
2015-08-22Merge branch 'x86-urgent-for-linus' of ↵Linus Torvalds5-11/+14
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: "Various low level fixes: fix more fallout from the FPU rework and the asm entry code rework, plus an MSI rework fix, and an idle-tracing fix" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/fpu/math-emu: Fix crash in fork() x86/fpu/math-emu: Fix math-emu boot crash x86/idle: Restore trace_cpu_idle to mwait_idle() calls x86/irq: Build correct vector mapping for multiple MSI interrupts Revert "sched/x86_64: Don't save flags on context switch"
2015-08-22x86/apic: Fix fallout from x2apic cleanupThomas Gleixner1-7/+7
In the recent x2apic cleanup I got two things really wrong: 1) The safety check in __disable_x2apic which allows the function to be called unconditionally is backwards. The check is there to prevent access to the apic MSR in case that the machine has no apic. Though right now it returns if the machine has an apic and therefor the disabling of x2apic is never invoked. 2) x2apic_disable() sets x2apic_mode to 0 after registering the local apic. That's wrong, because register_lapic_address() checks x2apic mode and therefor takes the wrong code path. This results in boot failures on machines with x2apic preenabled by BIOS and can also lead to an fatal MSR access on machines without apic. The solutions are simple: 1) Correct the sanity check for apic availability 2) Clear x2apic_mode _before_ calling register_lapic_address() Fixes: 659006bf3ae3 'x86/x2apic: Split enable and setup function' Reported-and-tested-by: Javier Monteagudo <javiermon@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://bugzilla.redhat.com/show_bug.cgi?id=1224764 Cc: stable@vger.kernel.org # 4.0+ Cc: Laura Abbott <labbott@redhat.com> Cc: Jiang Liu <jiang.liu@linux.intel.com> Cc: Joerg Roedel <joro@8bytes.org> Cc: Tony Luck <tony.luck@intel.com> Cc: Borislav Petkov <bp@alien8.de>
2015-08-22Merge branch 'irq-urgent-for-linus' of ↵Linus Torvalds1-0/+1
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Thomas Gleixner: "A series of small fixlets for a regression visible on OMAP devices caused by the conversion of the OMAP interrupt chips to hierarchical interrupt domains. Mostly one liners on the driver side plus a small helper function in the core to avoid open coded mess in the drivers" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/crossbar: Restore set_wake functionality irqchip/crossbar: Restore the mask on suspend behaviour ARM: OMAP: wakeupgen: Restore the irq_set_type() mechanism irqchip/crossbar: Restore the irq_set_type() mechanism genirq: Introduce irq_chip_set_type_parent() helper genirq: Don't return ENOSYS in irq_chip_retrigger_hierarchy
2015-08-22x86/fpu/math-emu: Fix crash in fork()Ingo Molnar1-1/+1
During later stages of math-emu bootup the following crash triggers: math_emulate: 0060:c100d0a8 Kernel panic - not syncing: Math emulation needed in kernel CPU: 0 PID: 1511 Comm: login Not tainted 4.2.0-rc7+ #1012 [...] Call Trace: [<c181d50d>] dump_stack+0x41/0x52 [<c181c918>] panic+0x77/0x189 [<c1003530>] ? math_error+0x140/0x140 [<c164c2d7>] math_emulate+0xba7/0xbd0 [<c100d0a8>] ? fpu__copy+0x138/0x1c0 [<c1109c3c>] ? __alloc_pages_nodemask+0x12c/0x870 [<c136ac20>] ? proc_clear_tty+0x40/0x70 [<c136ac6e>] ? session_clear_tty+0x1e/0x30 [<c1003530>] ? math_error+0x140/0x140 [<c1003575>] do_device_not_available+0x45/0x70 [<c100d0a8>] ? fpu__copy+0x138/0x1c0 [<c18258e6>] error_code+0x5a/0x60 [<c1003530>] ? math_error+0x140/0x140 [<c100d0a8>] ? fpu__copy+0x138/0x1c0 [<c100c205>] arch_dup_task_struct+0x25/0x30 [<c1048cea>] copy_process.part.51+0xea/0x1480 [<c115a8e5>] ? dput+0x175/0x200 [<c136af70>] ? no_tty+0x30/0x30 [<c1157242>] ? do_vfs_ioctl+0x322/0x540 [<c104a21a>] _do_fork+0xca/0x340 [<c1057b06>] ? SyS_rt_sigaction+0x66/0x90 [<c104a557>] SyS_clone+0x27/0x30 [<c1824a80>] sysenter_do_call+0x12/0x12 The reason is the incorrect assumption in fpu_copy(), that FNSAVE can be executed from math-emu kernels as well. Don't try to copy the registers, the soft state will be copied by fork anyway, so the child task inherits the parent task's soft math state. With this fix applied math-emu kernels boot up fine on modern hardware and the 'no387 nofxsr' boot options. Cc: Andy Lutomirski <luto@amacapital.net> Cc: Bobby Powers <bobbypowers@gmail.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Quentin Casasnovas <quentin.casasnovas@oracle.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-08-22x86/fpu/math-emu: Fix math-emu boot crashIngo Molnar1-1/+6
On a math-emu bootup the following crash occurs: Initializing CPU#0 ------------[ cut here ]------------ kernel BUG at arch/x86/kernel/traps.c:779! invalid opcode: 0000 [#1] SMP [...] EIP is at do_device_not_available+0xe/0x70 [...] Call Trace: [<c18238e6>] error_code+0x5a/0x60 [<c1002bd0>] ? math_error+0x140/0x140 [<c100bbd9>] ? fpu__init_cpu+0x59/0xa0 [<c1012322>] cpu_init+0x202/0x330 [<c104509f>] ? __native_set_fixmap+0x1f/0x30 [<c1b56ab0>] trap_init+0x305/0x346 [<c1b548af>] start_kernel+0x1a5/0x35d [<c1b542b4>] i386_start_kernel+0x82/0x86 The reason is that in the following commit: b1276c48e91b ("x86/fpu: Initialize fpregs in fpu__init_cpu_generic()") I failed to consider math-emu's limitation that it cannot execute the FNINIT instruction in kernel mode. The long term fix might be to allow math-emu to execute (certain) kernel mode FPU instructions, but for now apply the safe (albeit somewhat ugly) fix: initialize the emulation state explicitly without trapping out to the FPU emulator. Cc: Andy Lutomirski <luto@amacapital.net> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Quentin Casasnovas <quentin.casasnovas@oracle.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>